From: Mohammed Adnène Trojette Date: Fri, 1 Apr 2011 19:20:22 +0000 (+0100) Subject: Import p7zip_9.20.1~dfsg.1.orig.tar.gz X-Git-Tag: archive/raspbian/9.20.1_dfsg.1-4+rpi2+deb7u3^2~2 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=5f520000c21cda4f4edebda17fbffec8945efa9a;p=p7zip.git Import p7zip_9.20.1~dfsg.1.orig.tar.gz [dgit import orig p7zip_9.20.1~dfsg.1.orig.tar.gz] --- 5f520000c21cda4f4edebda17fbffec8945efa9a diff --git a/Asm/x64/7zCrcT8U.asm b/Asm/x64/7zCrcT8U.asm new file mode 100644 index 0000000..ad62d84 --- /dev/null +++ b/Asm/x64/7zCrcT8U.asm @@ -0,0 +1,103 @@ + + +global CrcUpdateT8:function +global _CrcUpdateT8:function + +SECTION .text + +%macro CRC1b 0 + movzx EDX, BYTE [RSI] + inc RSI + movzx EBX, AL + xor EDX, EBX + shr EAX, 8 + xor EAX, [RDI + RDX * 4] + dec R8 +%endmacro + + + +align 16 +CrcUpdateT8: +_CrcUpdateT8: + + push RBX + ; push RSI + ; push RDI + push RBP + + mov EAX, EDI ; EAX = CRC + ; RSI = BUF + mov R8, RDX ; R8 = LEN + mov RDI, RCX ; RDI = table + + + test R8, R8 + jz sl_end + sl: + test RSI, 7 + jz sl_end + CRC1b + jnz sl + sl_end: + + cmp R8, 16 + jb crc_end + mov R9, R8 + and R8, 7 + add R8, 8 + sub R9, R8 + + add R9, RSI + xor EAX, [RSI] + mov EBX, [RSI + 4] + movzx ECX, BL + align 16 + main_loop: + mov EDX, [RDI + RCX*4 + 0C00h] + movzx EBP, BH + xor EDX, [RDI + RBP*4 + 0800h] + shr EBX, 16 + movzx ECX, BL + xor EDX, [RSI + 8] + xor EDX, [RDI + RCX*4 + 0400h] + movzx ECX, AL + movzx EBP, BH + xor EDX, [RDI + RBP*4 + 0000h] + + mov EBX, [RSI + 12] + + xor EDX, [RDI + RCX*4 + 01C00h] + movzx EBP, AH + shr EAX, 16 + movzx ECX, AL + xor EDX, [RDI + RBP*4 + 01800h] + movzx EBP, AH + mov EAX, [RDI + RCX*4 + 01400h] + add RSI, 8 + xor EAX, [RDI + RBP*4 + 01000h] + movzx ECX, BL + xor EAX,EDX + + cmp RSI, R9 + jne main_loop + xor EAX, [RSI] + + + + crc_end: + + test R8, R8 + jz fl_end + fl: + CRC1b + jnz fl + fl_end: + + pop RBP + ; pop RDI + ; pop RSI + pop RBX + ret + +end diff --git a/Asm/x86/7zCrcT8U.asm b/Asm/x86/7zCrcT8U.asm new file mode 100644 index 0000000..f49013c --- /dev/null +++ b/Asm/x86/7zCrcT8U.asm @@ -0,0 +1,101 @@ + +SECTION .text + +%macro CRC1b 0 + movzx EDX, BYTE [ESI] + inc ESI + movzx EBX, AL + xor EDX, EBX + shr EAX, 8 + xor EAX, [EBP + EDX * 4] + dec EDI +%endmacro + +data_size equ (28) +crc_table equ (data_size + 4) + +align 16 +global CrcUpdateT8 +global _CrcUpdateT8 +CrcUpdateT8: +_CrcUpdateT8: + push EBX + push ESI + push EDI + push EBP + + mov EAX, [ESP + 20] ; CRC + mov ESI, [ESP + 24] ; buf + mov EDI, [ESP + data_size] ; size + mov EBP, [ESP + crc_table] ; tables + + test EDI, EDI + jz sl_end + sl: + test ESI, 7 + jz sl_end + CRC1b + jnz sl + sl_end: + + cmp EDI, 16 + jb NEAR crc_end + mov [ESP + data_size], EDI + sub EDI, 8 + and EDI, ~ 7 + sub [ESP + data_size], EDI + + add EDI, ESI + xor EAX, [ESI] + mov EBX, [ESI + 4] + movzx ECX, BL + align 16 + main_loop: + mov EDX, [EBP + ECX*4 + 0C00h] + movzx ECX, BH + xor EDX, [EBP + ECX*4 + 0800h] + shr EBX, 16 + movzx ECX, BL + xor EDX, [EBP + ECX*4 + 0400h] + xor EDX, [ESI + 8] + movzx ECX, AL + movzx EBX, BH + xor EDX, [EBP + EBX*4 + 0000h] + + mov EBX, [ESI + 12] + + xor EDX, [EBP + ECX*4 + 01C00h] + movzx ECX, AH + add ESI, 8 + shr EAX, 16 + xor EDX, [EBP + ECX*4 + 01800h] + movzx ECX, AL + xor EDX, [EBP + ECX*4 + 01400h] + movzx ECX, AH + mov EAX, [EBP + ECX*4 + 01000h] + movzx ECX, BL + xor EAX,EDX + + cmp ESI, EDI + jne main_loop + xor EAX, [ESI] + + mov EDI, [ESP + data_size] + + crc_end: + + test EDI, EDI + jz fl_end + fl: + CRC1b + jnz fl + fl_end: + + pop EBP + pop EDI + pop ESI + pop EBX + ret ; 8 + + +; end diff --git a/C/7zBuf.h b/C/7zBuf.h new file mode 100644 index 0000000..e9f2f31 --- /dev/null +++ b/C/7zBuf.h @@ -0,0 +1,39 @@ +/* 7zBuf.h -- Byte Buffer +2009-02-07 : Igor Pavlov : Public domain */ + +#ifndef __7Z_BUF_H +#define __7Z_BUF_H + +#include "Types.h" + +#ifdef __cplusplus +extern "C" { +#endif + +typedef struct +{ + Byte *data; + size_t size; +} CBuf; + +void Buf_Init(CBuf *p); +int Buf_Create(CBuf *p, size_t size, ISzAlloc *alloc); +void Buf_Free(CBuf *p, ISzAlloc *alloc); + +typedef struct +{ + Byte *data; + size_t size; + size_t pos; +} CDynBuf; + +void DynBuf_Construct(CDynBuf *p); +void DynBuf_SeekToBeg(CDynBuf *p); +int DynBuf_Write(CDynBuf *p, const Byte *buf, size_t size, ISzAlloc *alloc); +void DynBuf_Free(CDynBuf *p, ISzAlloc *alloc); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/C/7zBuf2.c b/C/7zBuf2.c new file mode 100644 index 0000000..8d17e0d --- /dev/null +++ b/C/7zBuf2.c @@ -0,0 +1,45 @@ +/* 7zBuf2.c -- Byte Buffer +2008-10-04 : Igor Pavlov : Public domain */ + +#include +#include "7zBuf.h" + +void DynBuf_Construct(CDynBuf *p) +{ + p->data = 0; + p->size = 0; + p->pos = 0; +} + +void DynBuf_SeekToBeg(CDynBuf *p) +{ + p->pos = 0; +} + +int DynBuf_Write(CDynBuf *p, const Byte *buf, size_t size, ISzAlloc *alloc) +{ + if (size > p->size - p->pos) + { + size_t newSize = p->pos + size; + Byte *data; + newSize += newSize / 4; + data = (Byte *)alloc->Alloc(alloc, newSize); + if (data == 0) + return 0; + p->size = newSize; + memcpy(data, p->data, p->pos); + alloc->Free(alloc, p->data); + p->data = data; + } + memcpy(p->data + p->pos, buf, size); + p->pos += size; + return 1; +} + +void DynBuf_Free(CDynBuf *p, ISzAlloc *alloc) +{ + alloc->Free(alloc, p->data); + p->data = 0; + p->size = 0; + p->pos = 0; +} diff --git a/C/7zCrc.c b/C/7zCrc.c new file mode 100644 index 0000000..404090e --- /dev/null +++ b/C/7zCrc.c @@ -0,0 +1,76 @@ +/* 7zCrc.c -- CRC32 calculation +2009-11-23 : Igor Pavlov : Public domain */ + +#include "7zCrc.h" +#include "CpuArch.h" + +#define kCrcPoly 0xEDB88320 + +#ifdef MY_CPU_LE +#define CRC_NUM_TABLES 8 +#else +#define CRC_NUM_TABLES 1 +#endif + +typedef UInt32 (MY_FAST_CALL *CRC_FUNC)(UInt32 v, const void *data, size_t size, const UInt32 *table); + +static CRC_FUNC g_CrcUpdate; +UInt32 g_CrcTable[256 * CRC_NUM_TABLES]; + +#if CRC_NUM_TABLES == 1 + +#define CRC_UPDATE_BYTE_2(crc, b) (table[((crc) ^ (b)) & 0xFF] ^ ((crc) >> 8)) + +static UInt32 MY_FAST_CALL CrcUpdateT1(UInt32 v, const void *data, size_t size, const UInt32 *table) +{ + const Byte *p = (const Byte *)data; + for (; size > 0; size--, p++) + v = CRC_UPDATE_BYTE_2(v, *p); + return v; +} + +#else + +UInt32 MY_FAST_CALL CrcUpdateT4(UInt32 v, const void *data, size_t size, const UInt32 *table); +UInt32 MY_FAST_CALL CrcUpdateT8(UInt32 v, const void *data, size_t size, const UInt32 *table); + +#endif + +UInt32 MY_FAST_CALL CrcUpdate(UInt32 v, const void *data, size_t size) +{ + return g_CrcUpdate(v, data, size, g_CrcTable); +} + +UInt32 MY_FAST_CALL CrcCalc(const void *data, size_t size) +{ + return g_CrcUpdate(CRC_INIT_VAL, data, size, g_CrcTable) ^ CRC_INIT_VAL; +} + +void MY_FAST_CALL CrcGenerateTable() +{ + UInt32 i; + for (i = 0; i < 256; i++) + { + UInt32 r = i; + unsigned j; + for (j = 0; j < 8; j++) + r = (r >> 1) ^ (kCrcPoly & ~((r & 1) - 1)); + g_CrcTable[i] = r; + } + #if CRC_NUM_TABLES == 1 + g_CrcUpdate = CrcUpdateT1; + #else + for (; i < 256 * CRC_NUM_TABLES; i++) + { + UInt32 r = g_CrcTable[i - 256]; + g_CrcTable[i] = g_CrcTable[r & 0xFF] ^ (r >> 8); + } + g_CrcUpdate = CrcUpdateT4; +/* FIXME + #ifdef MY_CPU_X86_OR_AMD64 + if (!CPU_Is_InOrder()) + g_CrcUpdate = CrcUpdateT8; + #endif +*/ + #endif +} diff --git a/C/7zCrc.h b/C/7zCrc.h new file mode 100644 index 0000000..38e3e5f --- /dev/null +++ b/C/7zCrc.h @@ -0,0 +1,25 @@ +/* 7zCrc.h -- CRC32 calculation +2009-11-21 : Igor Pavlov : Public domain */ + +#ifndef __7Z_CRC_H +#define __7Z_CRC_H + +#include "Types.h" + +EXTERN_C_BEGIN + +extern UInt32 g_CrcTable[]; + +/* Call CrcGenerateTable one time before other CRC functions */ +void MY_FAST_CALL CrcGenerateTable(void); + +#define CRC_INIT_VAL 0xFFFFFFFF +#define CRC_GET_DIGEST(crc) ((crc) ^ CRC_INIT_VAL) +#define CRC_UPDATE_BYTE(crc, b) (g_CrcTable[((crc) ^ (b)) & 0xFF] ^ ((crc) >> 8)) + +UInt32 MY_FAST_CALL CrcUpdate(UInt32 crc, const void *data, size_t size); +UInt32 MY_FAST_CALL CrcCalc(const void *data, size_t size); + +EXTERN_C_END + +#endif diff --git a/C/7zCrcOpt.c b/C/7zCrcOpt.c new file mode 100644 index 0000000..6c766a2 --- /dev/null +++ b/C/7zCrcOpt.c @@ -0,0 +1,34 @@ +/* 7zCrcOpt.c -- CRC32 calculation : optimized version +2009-11-23 : Igor Pavlov : Public domain */ + +#include "CpuArch.h" + +#ifdef MY_CPU_LE + +#define CRC_UPDATE_BYTE_2(crc, b) (table[((crc) ^ (b)) & 0xFF] ^ ((crc) >> 8)) + +UInt32 MY_FAST_CALL CrcUpdateT4(UInt32 v, const void *data, size_t size, const UInt32 *table) +{ + const Byte *p = (const Byte *)data; + for (; size > 0 && ((unsigned)(ptrdiff_t)p & 3) != 0; size--, p++) + v = CRC_UPDATE_BYTE_2(v, *p); + for (; size >= 4; size -= 4, p += 4) + { + v ^= *(const UInt32 *)p; + v = + table[0x300 + (v & 0xFF)] ^ + table[0x200 + ((v >> 8) & 0xFF)] ^ + table[0x100 + ((v >> 16) & 0xFF)] ^ + table[0x000 + ((v >> 24))]; + } + for (; size > 0; size--, p++) + v = CRC_UPDATE_BYTE_2(v, *p); + return v; +} + +UInt32 MY_FAST_CALL CrcUpdateT8(UInt32 v, const void *data, size_t size, const UInt32 *table) +{ + return CrcUpdateT4(v, data, size, table); +} + +#endif diff --git a/C/7zCrcT8.c b/C/7zCrcT8.c new file mode 100644 index 0000000..cd80e26 --- /dev/null +++ b/C/7zCrcT8.c @@ -0,0 +1,43 @@ +/* 7zCrcT8.c -- CRC32 calculation with 8 tables +2008-03-19 +Igor Pavlov +Public domain */ + +#include "7zCrc.h" + +#define kCrcPoly 0xEDB88320 +#define CRC_NUM_TABLES 8 + +UInt32 g_CrcTable[256 * CRC_NUM_TABLES]; + +void MY_FAST_CALL CrcGenerateTable() +{ + UInt32 i; + for (i = 0; i < 256; i++) + { + UInt32 r = i; + int j; + for (j = 0; j < 8; j++) + r = (r >> 1) ^ (kCrcPoly & ~((r & 1) - 1)); + g_CrcTable[i] = r; + } + #if CRC_NUM_TABLES > 1 + for (; i < 256 * CRC_NUM_TABLES; i++) + { + UInt32 r = g_CrcTable[i - 256]; + g_CrcTable[i] = g_CrcTable[r & 0xFF] ^ (r >> 8); + } + #endif +} + +UInt32 MY_FAST_CALL CrcUpdateT8(UInt32 v, const void *data, size_t size, const UInt32 *table); + +UInt32 MY_FAST_CALL CrcUpdate(UInt32 v, const void *data, size_t size) +{ + return CrcUpdateT8(v, data, size, g_CrcTable); +} + +UInt32 MY_FAST_CALL CrcCalc(const void *data, size_t size) +{ + return CrcUpdateT8(CRC_INIT_VAL, data, size, g_CrcTable) ^ 0xFFFFFFFF; +} diff --git a/C/7zStream.c b/C/7zStream.c new file mode 100644 index 0000000..0ebb7b5 --- /dev/null +++ b/C/7zStream.c @@ -0,0 +1,169 @@ +/* 7zStream.c -- 7z Stream functions +2010-03-11 : Igor Pavlov : Public domain */ + +#include + +#include "Types.h" + +SRes SeqInStream_Read2(ISeqInStream *stream, void *buf, size_t size, SRes errorType) +{ + while (size != 0) + { + size_t processed = size; + RINOK(stream->Read(stream, buf, &processed)); + if (processed == 0) + return errorType; + buf = (void *)((Byte *)buf + processed); + size -= processed; + } + return SZ_OK; +} + +SRes SeqInStream_Read(ISeqInStream *stream, void *buf, size_t size) +{ + return SeqInStream_Read2(stream, buf, size, SZ_ERROR_INPUT_EOF); +} + +SRes SeqInStream_ReadByte(ISeqInStream *stream, Byte *buf) +{ + size_t processed = 1; + RINOK(stream->Read(stream, buf, &processed)); + return (processed == 1) ? SZ_OK : SZ_ERROR_INPUT_EOF; +} + +SRes LookInStream_SeekTo(ILookInStream *stream, UInt64 offset) +{ + Int64 t = offset; + return stream->Seek(stream, &t, SZ_SEEK_SET); +} + +SRes LookInStream_LookRead(ILookInStream *stream, void *buf, size_t *size) +{ + const void *lookBuf; + if (*size == 0) + return SZ_OK; + RINOK(stream->Look(stream, &lookBuf, size)); + memcpy(buf, lookBuf, *size); + return stream->Skip(stream, *size); +} + +SRes LookInStream_Read2(ILookInStream *stream, void *buf, size_t size, SRes errorType) +{ + while (size != 0) + { + size_t processed = size; + RINOK(stream->Read(stream, buf, &processed)); + if (processed == 0) + return errorType; + buf = (void *)((Byte *)buf + processed); + size -= processed; + } + return SZ_OK; +} + +SRes LookInStream_Read(ILookInStream *stream, void *buf, size_t size) +{ + return LookInStream_Read2(stream, buf, size, SZ_ERROR_INPUT_EOF); +} + +static SRes LookToRead_Look_Lookahead(void *pp, const void **buf, size_t *size) +{ + SRes res = SZ_OK; + CLookToRead *p = (CLookToRead *)pp; + size_t size2 = p->size - p->pos; + if (size2 == 0 && *size > 0) + { + p->pos = 0; + size2 = LookToRead_BUF_SIZE; + res = p->realStream->Read(p->realStream, p->buf, &size2); + p->size = size2; + } + if (size2 < *size) + *size = size2; + *buf = p->buf + p->pos; + return res; +} + +static SRes LookToRead_Look_Exact(void *pp, const void **buf, size_t *size) +{ + SRes res = SZ_OK; + CLookToRead *p = (CLookToRead *)pp; + size_t size2 = p->size - p->pos; + if (size2 == 0 && *size > 0) + { + p->pos = 0; + if (*size > LookToRead_BUF_SIZE) + *size = LookToRead_BUF_SIZE; + res = p->realStream->Read(p->realStream, p->buf, size); + size2 = p->size = *size; + } + if (size2 < *size) + *size = size2; + *buf = p->buf + p->pos; + return res; +} + +static SRes LookToRead_Skip(void *pp, size_t offset) +{ + CLookToRead *p = (CLookToRead *)pp; + p->pos += offset; + return SZ_OK; +} + +static SRes LookToRead_Read(void *pp, void *buf, size_t *size) +{ + CLookToRead *p = (CLookToRead *)pp; + size_t rem = p->size - p->pos; + if (rem == 0) + return p->realStream->Read(p->realStream, buf, size); + if (rem > *size) + rem = *size; + memcpy(buf, p->buf + p->pos, rem); + p->pos += rem; + *size = rem; + return SZ_OK; +} + +static SRes LookToRead_Seek(void *pp, Int64 *pos, ESzSeek origin) +{ + CLookToRead *p = (CLookToRead *)pp; + p->pos = p->size = 0; + return p->realStream->Seek(p->realStream, pos, origin); +} + +void LookToRead_CreateVTable(CLookToRead *p, int lookahead) +{ + p->s.Look = lookahead ? + LookToRead_Look_Lookahead : + LookToRead_Look_Exact; + p->s.Skip = LookToRead_Skip; + p->s.Read = LookToRead_Read; + p->s.Seek = LookToRead_Seek; +} + +void LookToRead_Init(CLookToRead *p) +{ + p->pos = p->size = 0; +} + +static SRes SecToLook_Read(void *pp, void *buf, size_t *size) +{ + CSecToLook *p = (CSecToLook *)pp; + return LookInStream_LookRead(p->realStream, buf, size); +} + +void SecToLook_CreateVTable(CSecToLook *p) +{ + p->s.Read = SecToLook_Read; +} + +static SRes SecToRead_Read(void *pp, void *buf, size_t *size) +{ + CSecToRead *p = (CSecToRead *)pp; + return p->realStream->Read(p->realStream, buf, size); +} + +void SecToRead_CreateVTable(CSecToRead *p) +{ + p->s.Read = SecToRead_Read; +} diff --git a/C/7zVersion.h b/C/7zVersion.h new file mode 100644 index 0000000..9d99c5d --- /dev/null +++ b/C/7zVersion.h @@ -0,0 +1,7 @@ +#define MY_VER_MAJOR 9 +#define MY_VER_MINOR 20 +#define MY_VER_BUILD 0 +#define MY_VERSION "9.20" +#define MY_DATE "2010-11-18" +#define MY_COPYRIGHT ": Igor Pavlov : Public domain" +#define MY_VERSION_COPYRIGHT_DATE MY_VERSION " " MY_COPYRIGHT " : " MY_DATE diff --git a/C/Aes.c b/C/Aes.c new file mode 100644 index 0000000..1bb6587 --- /dev/null +++ b/C/Aes.c @@ -0,0 +1,284 @@ +/* Aes.c -- AES encryption / decryption +2009-11-23 : Igor Pavlov : Public domain */ + +#include "Aes.h" +#include "CpuArch.h" + +static UInt32 T[256 * 4]; +static Byte Sbox[256] = { + 0x63, 0x7c, 0x77, 0x7b, 0xf2, 0x6b, 0x6f, 0xc5, 0x30, 0x01, 0x67, 0x2b, 0xfe, 0xd7, 0xab, 0x76, + 0xca, 0x82, 0xc9, 0x7d, 0xfa, 0x59, 0x47, 0xf0, 0xad, 0xd4, 0xa2, 0xaf, 0x9c, 0xa4, 0x72, 0xc0, + 0xb7, 0xfd, 0x93, 0x26, 0x36, 0x3f, 0xf7, 0xcc, 0x34, 0xa5, 0xe5, 0xf1, 0x71, 0xd8, 0x31, 0x15, + 0x04, 0xc7, 0x23, 0xc3, 0x18, 0x96, 0x05, 0x9a, 0x07, 0x12, 0x80, 0xe2, 0xeb, 0x27, 0xb2, 0x75, + 0x09, 0x83, 0x2c, 0x1a, 0x1b, 0x6e, 0x5a, 0xa0, 0x52, 0x3b, 0xd6, 0xb3, 0x29, 0xe3, 0x2f, 0x84, + 0x53, 0xd1, 0x00, 0xed, 0x20, 0xfc, 0xb1, 0x5b, 0x6a, 0xcb, 0xbe, 0x39, 0x4a, 0x4c, 0x58, 0xcf, + 0xd0, 0xef, 0xaa, 0xfb, 0x43, 0x4d, 0x33, 0x85, 0x45, 0xf9, 0x02, 0x7f, 0x50, 0x3c, 0x9f, 0xa8, + 0x51, 0xa3, 0x40, 0x8f, 0x92, 0x9d, 0x38, 0xf5, 0xbc, 0xb6, 0xda, 0x21, 0x10, 0xff, 0xf3, 0xd2, + 0xcd, 0x0c, 0x13, 0xec, 0x5f, 0x97, 0x44, 0x17, 0xc4, 0xa7, 0x7e, 0x3d, 0x64, 0x5d, 0x19, 0x73, + 0x60, 0x81, 0x4f, 0xdc, 0x22, 0x2a, 0x90, 0x88, 0x46, 0xee, 0xb8, 0x14, 0xde, 0x5e, 0x0b, 0xdb, + 0xe0, 0x32, 0x3a, 0x0a, 0x49, 0x06, 0x24, 0x5c, 0xc2, 0xd3, 0xac, 0x62, 0x91, 0x95, 0xe4, 0x79, + 0xe7, 0xc8, 0x37, 0x6d, 0x8d, 0xd5, 0x4e, 0xa9, 0x6c, 0x56, 0xf4, 0xea, 0x65, 0x7a, 0xae, 0x08, + 0xba, 0x78, 0x25, 0x2e, 0x1c, 0xa6, 0xb4, 0xc6, 0xe8, 0xdd, 0x74, 0x1f, 0x4b, 0xbd, 0x8b, 0x8a, + 0x70, 0x3e, 0xb5, 0x66, 0x48, 0x03, 0xf6, 0x0e, 0x61, 0x35, 0x57, 0xb9, 0x86, 0xc1, 0x1d, 0x9e, + 0xe1, 0xf8, 0x98, 0x11, 0x69, 0xd9, 0x8e, 0x94, 0x9b, 0x1e, 0x87, 0xe9, 0xce, 0x55, 0x28, 0xdf, + 0x8c, 0xa1, 0x89, 0x0d, 0xbf, 0xe6, 0x42, 0x68, 0x41, 0x99, 0x2d, 0x0f, 0xb0, 0x54, 0xbb, 0x16}; + +void MY_FAST_CALL AesCbc_Encode(UInt32 *ivAes, Byte *data, size_t numBlocks); +void MY_FAST_CALL AesCbc_Decode(UInt32 *ivAes, Byte *data, size_t numBlocks); +void MY_FAST_CALL AesCtr_Code(UInt32 *ivAes, Byte *data, size_t numBlocks); + +void MY_FAST_CALL AesCbc_Encode_Intel(UInt32 *ivAes, Byte *data, size_t numBlocks); +void MY_FAST_CALL AesCbc_Decode_Intel(UInt32 *ivAes, Byte *data, size_t numBlocks); +void MY_FAST_CALL AesCtr_Code_Intel(UInt32 *ivAes, Byte *data, size_t numBlocks); + +AES_CODE_FUNC g_AesCbc_Encode; +AES_CODE_FUNC g_AesCbc_Decode; +AES_CODE_FUNC g_AesCtr_Code; + +static UInt32 D[256 * 4]; +static Byte InvS[256]; + +static Byte Rcon[11] = { 0x00, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x1b, 0x36 }; + +#define xtime(x) ((((x) << 1) ^ (((x) & 0x80) != 0 ? 0x1B : 0)) & 0xFF) + +#define Ui32(a0, a1, a2, a3) ((UInt32)(a0) | ((UInt32)(a1) << 8) | ((UInt32)(a2) << 16) | ((UInt32)(a3) << 24)) + +#define gb0(x) ( (x) & 0xFF) +#define gb1(x) (((x) >> ( 8)) & 0xFF) +#define gb2(x) (((x) >> (16)) & 0xFF) +#define gb3(x) (((x) >> (24)) & 0xFF) + +void AesGenTables(void) +{ + unsigned i; + for (i = 0; i < 256; i++) + InvS[Sbox[i]] = (Byte)i; + for (i = 0; i < 256; i++) + { + { + UInt32 a1 = Sbox[i]; + UInt32 a2 = xtime(a1); + UInt32 a3 = a2 ^ a1; + T[ i] = Ui32(a2, a1, a1, a3); + T[0x100 + i] = Ui32(a3, a2, a1, a1); + T[0x200 + i] = Ui32(a1, a3, a2, a1); + T[0x300 + i] = Ui32(a1, a1, a3, a2); + } + { + UInt32 a1 = InvS[i]; + UInt32 a2 = xtime(a1); + UInt32 a4 = xtime(a2); + UInt32 a8 = xtime(a4); + UInt32 a9 = a8 ^ a1; + UInt32 aB = a8 ^ a2 ^ a1; + UInt32 aD = a8 ^ a4 ^ a1; + UInt32 aE = a8 ^ a4 ^ a2; + D[ i] = Ui32(aE, a9, aD, aB); + D[0x100 + i] = Ui32(aB, aE, a9, aD); + D[0x200 + i] = Ui32(aD, aB, aE, a9); + D[0x300 + i] = Ui32(a9, aD, aB, aE); + } + } + g_AesCbc_Encode = AesCbc_Encode; + g_AesCbc_Decode = AesCbc_Decode; + g_AesCtr_Code = AesCtr_Code; +/* FIXME + #ifdef MY_CPU_X86_OR_AMD64 + if (CPU_Is_Aes_Supported()) + { + g_AesCbc_Encode = AesCbc_Encode_Intel; + g_AesCbc_Decode = AesCbc_Decode_Intel; + g_AesCtr_Code = AesCtr_Code_Intel; + } + #endif +*/ +} + +#define HT(i, x, s) (T + (x << 8))[gb ## x(s[(i + x) & 3])] +#define HT4(m, i, s, p) m[i] = \ + HT(i, 0, s) ^ \ + HT(i, 1, s) ^ \ + HT(i, 2, s) ^ \ + HT(i, 3, s) ^ w[p + i] +/* such order (2031) in HT16 is for VC6/K8 speed optimization) */ +#define HT16(m, s, p) \ + HT4(m, 2, s, p); \ + HT4(m, 0, s, p); \ + HT4(m, 3, s, p); \ + HT4(m, 1, s, p); \ + +#define FT(i, x) Sbox[gb ## x(m[(i + x) & 3])] +#define FT4(i) dest[i] = Ui32(FT(i, 0), FT(i, 1), FT(i, 2), FT(i, 3)) ^ w[i]; + +#define HD(i, x, s) (D + (x << 8))[gb ## x(s[(i - x) & 3])] +#define HD4(m, i, s, p) m[i] = \ + HD(i, 0, s) ^ \ + HD(i, 1, s) ^ \ + HD(i, 2, s) ^ \ + HD(i, 3, s) ^ w[p + i]; +/* such order (0231) in HD16 is for VC6/K8 speed optimization) */ +#define HD16(m, s, p) \ + HD4(m, 0, s, p); \ + HD4(m, 2, s, p); \ + HD4(m, 3, s, p); \ + HD4(m, 1, s, p); \ + +#define FD(i, x) InvS[gb ## x(m[(i - x) & 3])] +#define FD4(i) dest[i] = Ui32(FD(i, 0), FD(i, 1), FD(i, 2), FD(i, 3)) ^ w[i]; + +void MY_FAST_CALL Aes_SetKey_Enc(UInt32 *w, const Byte *key, unsigned keySize) +{ + unsigned i, wSize; + wSize = keySize + 28; + keySize /= 4; + w[0] = ((UInt32)keySize / 2) + 3; + w += 4; + + for (i = 0; i < keySize; i++, key += 4) + w[i] = GetUi32(key); + + for (; i < wSize; i++) + { + UInt32 t = w[i - 1]; + unsigned rem = i % keySize; + if (rem == 0) + t = Ui32(Sbox[gb1(t)] ^ Rcon[i / keySize], Sbox[gb2(t)], Sbox[gb3(t)], Sbox[gb0(t)]); + else if (keySize > 6 && rem == 4) + t = Ui32(Sbox[gb0(t)], Sbox[gb1(t)], Sbox[gb2(t)], Sbox[gb3(t)]); + w[i] = w[i - keySize] ^ t; + } +} + +void MY_FAST_CALL Aes_SetKey_Dec(UInt32 *w, const Byte *key, unsigned keySize) +{ + unsigned i, num; + Aes_SetKey_Enc(w, key, keySize); + num = keySize + 20; + w += 8; + for (i = 0; i < num; i++) + { + UInt32 r = w[i]; + w[i] = + D[ Sbox[gb0(r)]] ^ + D[0x100 + Sbox[gb1(r)]] ^ + D[0x200 + Sbox[gb2(r)]] ^ + D[0x300 + Sbox[gb3(r)]]; + } +} + +/* Aes_Encode and Aes_Decode functions work with little-endian words. + src and dest are pointers to 4 UInt32 words. + arc and dest can point to same block */ + +static void Aes_Encode(const UInt32 *w, UInt32 *dest, const UInt32 *src) +{ + UInt32 s[4]; + UInt32 m[4]; + UInt32 numRounds2 = w[0]; + w += 4; + s[0] = src[0] ^ w[0]; + s[1] = src[1] ^ w[1]; + s[2] = src[2] ^ w[2]; + s[3] = src[3] ^ w[3]; + w += 4; + for (;;) + { + HT16(m, s, 0); + if (--numRounds2 == 0) + break; + HT16(s, m, 4); + w += 8; + } + w += 4; + FT4(0); FT4(1); FT4(2); FT4(3); +} + +static void Aes_Decode(const UInt32 *w, UInt32 *dest, const UInt32 *src) +{ + UInt32 s[4]; + UInt32 m[4]; + UInt32 numRounds2 = w[0]; + w += 4 + numRounds2 * 8; + s[0] = src[0] ^ w[0]; + s[1] = src[1] ^ w[1]; + s[2] = src[2] ^ w[2]; + s[3] = src[3] ^ w[3]; + for (;;) + { + w -= 8; + HD16(m, s, 4); + if (--numRounds2 == 0) + break; + HD16(s, m, 0); + } + FD4(0); FD4(1); FD4(2); FD4(3); +} + +void AesCbc_Init(UInt32 *p, const Byte *iv) +{ + unsigned i; + for (i = 0; i < 4; i++) + p[i] = GetUi32(iv + i * 4); +} + +void MY_FAST_CALL AesCbc_Encode(UInt32 *p, Byte *data, size_t numBlocks) +{ + for (; numBlocks != 0; numBlocks--, data += AES_BLOCK_SIZE) + { + p[0] ^= GetUi32(data); + p[1] ^= GetUi32(data + 4); + p[2] ^= GetUi32(data + 8); + p[3] ^= GetUi32(data + 12); + + Aes_Encode(p + 4, p, p); + + SetUi32(data, p[0]); + SetUi32(data + 4, p[1]); + SetUi32(data + 8, p[2]); + SetUi32(data + 12, p[3]); + } +} + +void MY_FAST_CALL AesCbc_Decode(UInt32 *p, Byte *data, size_t numBlocks) +{ + UInt32 in[4], out[4]; + for (; numBlocks != 0; numBlocks--, data += AES_BLOCK_SIZE) + { + in[0] = GetUi32(data); + in[1] = GetUi32(data + 4); + in[2] = GetUi32(data + 8); + in[3] = GetUi32(data + 12); + + Aes_Decode(p + 4, out, in); + + SetUi32(data, p[0] ^ out[0]); + SetUi32(data + 4, p[1] ^ out[1]); + SetUi32(data + 8, p[2] ^ out[2]); + SetUi32(data + 12, p[3] ^ out[3]); + + p[0] = in[0]; + p[1] = in[1]; + p[2] = in[2]; + p[3] = in[3]; + } +} + +void MY_FAST_CALL AesCtr_Code(UInt32 *p, Byte *data, size_t numBlocks) +{ + for (; numBlocks != 0; numBlocks--) + { + UInt32 temp[4]; + Byte buf[16]; + int i; + if (++p[0] == 0) + p[1]++; + Aes_Encode(p + 4, temp, p); + SetUi32(buf, temp[0]); + SetUi32(buf + 4, temp[1]); + SetUi32(buf + 8, temp[2]); + SetUi32(buf + 12, temp[3]); + for (i = 0; i < 16; i++) + *data++ ^= buf[i]; + } +} diff --git a/C/Aes.h b/C/Aes.h new file mode 100644 index 0000000..c9b0677 --- /dev/null +++ b/C/Aes.h @@ -0,0 +1,38 @@ +/* Aes.h -- AES encryption / decryption +2009-11-23 : Igor Pavlov : Public domain */ + +#ifndef __AES_H +#define __AES_H + +#include "Types.h" + +EXTERN_C_BEGIN + +#define AES_BLOCK_SIZE 16 + +/* Call AesGenTables one time before other AES functions */ +void AesGenTables(void); + +/* UInt32 pointers must be 16-byte aligned */ + +/* 16-byte (4 * 32-bit words) blocks: 1 (IV) + 1 (keyMode) + 15 (AES-256 roundKeys) */ +#define AES_NUM_IVMRK_WORDS ((1 + 1 + 15) * 4) + +/* aes - 16-byte aligned pointer to keyMode+roundKeys sequence */ +/* keySize = 16 or 24 or 32 (bytes) */ +typedef void (MY_FAST_CALL *AES_SET_KEY_FUNC)(UInt32 *aes, const Byte *key, unsigned keySize); +void MY_FAST_CALL Aes_SetKey_Enc(UInt32 *aes, const Byte *key, unsigned keySize); +void MY_FAST_CALL Aes_SetKey_Dec(UInt32 *aes, const Byte *key, unsigned keySize); + +/* ivAes - 16-byte aligned pointer to iv+keyMode+roundKeys sequence: UInt32[AES_NUM_IVMRK_WORDS] */ +void AesCbc_Init(UInt32 *ivAes, const Byte *iv); /* iv size is AES_BLOCK_SIZE */ +/* data - 16-byte aligned pointer to data */ +/* numBlocks - the number of 16-byte blocks in data array */ +typedef void (MY_FAST_CALL *AES_CODE_FUNC)(UInt32 *ivAes, Byte *data, size_t numBlocks); +extern AES_CODE_FUNC g_AesCbc_Encode; +extern AES_CODE_FUNC g_AesCbc_Decode; +extern AES_CODE_FUNC g_AesCtr_Code; + +EXTERN_C_END + +#endif diff --git a/C/Alloc.back3 b/C/Alloc.back3 new file mode 100644 index 0000000..a0cf827 --- /dev/null +++ b/C/Alloc.back3 @@ -0,0 +1,238 @@ +/* Alloc.c -- Memory allocation functions +2008-09-24 +Igor Pavlov +Public domain */ + +#include +#include +#include +#include + +#ifdef _7ZIP_LARGE_PAGES + +#ifdef __linux__ + +#ifndef _7ZIP_ST +#include +#endif +#include +#include +#include +#include +#include +#include + +#ifndef SHM_HUGETLB +#warning SHM_HUGETLB undefined ? +#define SHM_HUGETLB 04000 +#endif + +/* Only ia64 requires this */ +#ifdef __ia64__ +#define ADDR (void *)(0x8000000000000000UL) +#define SHMAT_FLAGS (SHM_RND) +#else +#define ADDR (void *)(0x0UL) +#define SHMAT_FLAGS (0) +#endif + + +#endif /* __linux__ */ + +#endif /* _7ZIP_LARGE_PAGES */ + +#include "Alloc.h" + +/* #define _SZ_ALLOC_DEBUG */ + +/* use _SZ_ALLOC_DEBUG to debug alloc/free operations */ +#ifdef _SZ_ALLOC_DEBUG +#include +int g_allocCount = 0; +int g_allocCountMid = 0; +int g_allocCountBig = 0; +#endif + +void *MyAlloc(size_t size) +{ + if (size == 0) + return 0; + #ifdef _SZ_ALLOC_DEBUG + { + void *p = malloc(size); + fprintf(stderr, "\nAlloc %10d bytes, count = %10d, addr = %8X", size, g_allocCount++, (unsigned)p); + return p; + } + #else + return malloc(size); + #endif +} + +void MyFree(void *address) +{ + #ifdef _SZ_ALLOC_DEBUG + if (address != 0) + fprintf(stderr, "\nFree; count = %10d, addr = %8X", --g_allocCount, (unsigned)address); + #endif + free(address); +} + +#ifdef __linux__ +#define _7ZIP_MAX_HUGE_ALLOCS 64 +static void *g_HugePageAddr[_7ZIP_MAX_HUGE_ALLOCS] = { NULL }; +static void *g_HugePageShmid[_7ZIP_MAX_HUGE_ALLOCS]; +static size_t g_HugePageLen[_7ZIP_MAX_HUGE_ALLOCS]; +#endif + +static void *VirtualAlloc(void *address, size_t size, int AllocLargePages) +{ + #ifdef _7ZIP_LARGE_PAGES + if (AllocLargePages) + { + #ifdef __linux__ + /* huge pages support for Linux; added by Joachim Henke */ + #ifndef _7ZIP_ST + static pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; + #endif + int i; + + address = NULL; + #ifndef _7ZIP_ST + pthread_mutex_lock(&mutex); + #endif + for (i = 0; i < _7ZIP_MAX_HUGE_ALLOCS; ++i) + { + if (g_HugePageAddr[i] == NULL) + { + char *shmaddr; + int shmid = shmget(2, size, SHM_HUGETLB | IPC_CREAT | SHM_R | SHM_W); + if (shmid < 0) + { + fprintf(stderr,"Warning shmget : %s\n",strerror(errno)); + address = NULL; + break; + } + shmaddr = shmat(shmid, ADDR, SHMAT_FLAGS); + if (shmaddr == (char *)-1) + { + fprintf(stderr,"Warning shmat : %s\n",strerror(errno)); + shmctl(shmid, IPC_RMID, NULL); + address = NULL; + break; + } + + g_HugePageShmid[i] = shmid; + g_HugePageLen[i] = size; + g_HugePageAddr[i] = address; +printf("HUGE[%d]=%ld %p\n",i,(long)size,address); + break; + } + } + #ifndef _7ZIP_ST + pthread_mutex_unlock(&mutex); + #endif + return address; + #endif + } + #endif + return malloc(size); +} + +static int VirtualFree(void *address) +{ + #ifdef _7ZIP_LARGE_PAGES + #ifdef __linux__ + int i; + + for (i = 0; i < _7ZIP_MAX_HUGE_ALLOCS; ++i) + { + if (g_HugePageAddr[i] == address) + { + shmdt(g_HugePageAddr[i]); + shmctl(g_HugePageLen[i], IPC_RMID, NULL); + g_HugePageAddr[i] = NULL; + return 1; + } + } + #endif + #endif + free(address); + return 1; +} + +void *MidAlloc(size_t size) +{ + if (size == 0) + return 0; + #ifdef _SZ_ALLOC_DEBUG + fprintf(stderr, "\nAlloc_Mid %10d bytes; count = %10d", size, g_allocCountMid++); + #endif + return VirtualAlloc(0, size, 0); +} + +void MidFree(void *address) +{ + #ifdef _SZ_ALLOC_DEBUG + if (address != 0) + fprintf(stderr, "\nFree_Mid; count = %10d", --g_allocCountMid); + #endif + if (address == 0) + return; + VirtualFree(address); +} + +#ifdef _7ZIP_LARGE_PAGES +size_t g_LargePageSize = 0; +#endif + +void SetLargePageSize() +{ +printf("SetLargePageSize : <>\n"); + #ifdef _7ZIP_LARGE_PAGES + size_t size = 0; + +#if defined(__linux__) + size = sysconf(_SC_PAGESIZE); +printf("SetLargePageSize : size=%ld\n",(long)size); + if (size == -1) size = 0; +#endif + + if (size == 0 || (size & (size - 1)) != 0) + return; + g_LargePageSize = size; +printf("SetLargePageSize : %ld\n",(long)g_LargePageSize); + #endif +} + + +void *BigAlloc(size_t size) +{ + if (size == 0) + return 0; + #ifdef _SZ_ALLOC_DEBUG + fprintf(stderr, "\nAlloc_Big %10d bytes; count = %10d", size, g_allocCountBig++); + #endif + + #ifdef _7ZIP_LARGE_PAGES + if (g_LargePageSize != 0 && g_LargePageSize <= (1 << 30) && size >= (1 << 18)) + { + void *res = VirtualAlloc(0, (size + g_LargePageSize - 1) & (~(g_LargePageSize - 1)),1); +printf("BigAlloc : %ld %ld => %p\n",(long)g_LargePageSize,(long)size,res); + if (res != 0) + return res; + } + #endif + return VirtualAlloc(0, size, 0); +} + +void BigFree(void *address) +{ + #ifdef _SZ_ALLOC_DEBUG + if (address != 0) + fprintf(stderr, "\nFree_Big; count = %10d", --g_allocCountBig); + #endif + + if (address == 0) + return; + VirtualFree(address); +} diff --git a/C/Alloc.c b/C/Alloc.c new file mode 100644 index 0000000..be02a92 --- /dev/null +++ b/C/Alloc.c @@ -0,0 +1,280 @@ +/* Alloc.c -- Memory allocation functions +2008-09-24 +Igor Pavlov +Public domain */ + +#ifdef _WIN32 +#include +#endif +#include +#include + +#ifdef _7ZIP_LARGE_PAGES +#ifdef __linux__ +#ifndef _7ZIP_ST +#include +#endif +#include +#include +#include +#include +#include +#endif +#endif + +#include "Alloc.h" + +/* #define _SZ_ALLOC_DEBUG */ + +/* use _SZ_ALLOC_DEBUG to debug alloc/free operations */ +#ifdef _SZ_ALLOC_DEBUG +#include +int g_allocCount = 0; +int g_allocCountMid = 0; +int g_allocCountBig = 0; +#endif + +void *MyAlloc(size_t size) +{ + if (size == 0) + return 0; + #ifdef _SZ_ALLOC_DEBUG + { + void *p = malloc(size); + fprintf(stderr, "\nAlloc %10d bytes, count = %10d, addr = %8X", size, g_allocCount++, (unsigned)p); + return p; + } + #else + return malloc(size); + #endif +} + +void MyFree(void *address) +{ + #ifdef _SZ_ALLOC_DEBUG + if (address != 0) + fprintf(stderr, "\nFree; count = %10d, addr = %8X", --g_allocCount, (unsigned)address); + #endif + free(address); +} + +#ifndef _WIN32 + +#ifdef _7ZIP_LARGE_PAGES + +#ifdef __linux__ +#define _7ZIP_MAX_HUGE_ALLOCS 64 +static void *g_HugePageAddr[_7ZIP_MAX_HUGE_ALLOCS] = { NULL }; +static size_t g_HugePageLen[_7ZIP_MAX_HUGE_ALLOCS]; +static char *g_HugetlbPath; +#endif + +#endif + +static void *VirtualAlloc(size_t size, int memLargePages) +{ + #ifdef _7ZIP_LARGE_PAGES + if (memLargePages) + { + #ifdef __linux__ + /* huge pages support for Linux; added by Joachim Henke */ + #ifndef _7ZIP_ST + static pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; + #endif + int i; + + void * address = NULL; + #ifndef _7ZIP_ST + pthread_mutex_lock(&mutex); + #endif + for (i = 0; i < _7ZIP_MAX_HUGE_ALLOCS; ++i) + { + if (g_HugePageAddr[i] == NULL) + { + int fd, pathlen = strlen(g_HugetlbPath); + char tempname[pathlen+12]; + + memcpy(tempname, g_HugetlbPath, pathlen); + memcpy(tempname + pathlen, "/7z-XXXXXX", 11); + fd = mkstemp(tempname); + unlink(tempname); + if (fd < 0) + { + fprintf(stderr,"cant't open %s (%s)\n",tempname,strerror(errno)); + break; + } + address = mmap(NULL, size, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0); + close(fd); + if (address == MAP_FAILED) + { + address = NULL; + break; + } + g_HugePageLen[i] = size; + g_HugePageAddr[i] = address; +// fprintf(stderr,"HUGE[%d]=%ld %p\n",i,(long)size,address); + break; + } + } + #ifndef _7ZIP_ST + pthread_mutex_unlock(&mutex); + #endif + return address; + #endif + } + #endif + return malloc(size); +} + +static int VirtualFree(void *address) +{ + #ifdef _7ZIP_LARGE_PAGES + #ifdef __linux__ + int i; + + for (i = 0; i < _7ZIP_MAX_HUGE_ALLOCS; ++i) + { + if (g_HugePageAddr[i] == address) + { + munmap(address, g_HugePageLen[i]); + g_HugePageAddr[i] = NULL; + return 1; + } + } + #endif + #endif + free(address); + return 1; +} + +#endif + +void *MidAlloc(size_t size) +{ + if (size == 0) + return 0; + #ifdef _SZ_ALLOC_DEBUG + fprintf(stderr, "\nAlloc_Mid %10d bytes; count = %10d", size, g_allocCountMid++); + #endif + return VirtualAlloc(size, 0); +} + +void MidFree(void *address) +{ + #ifdef _SZ_ALLOC_DEBUG + if (address != 0) + fprintf(stderr, "\nFree_Mid; count = %10d", --g_allocCountMid); + #endif + if (address == 0) + return; + VirtualFree(address); +} + +#ifdef _7ZIP_LARGE_PAGES +size_t g_LargePageSize = 0; +#ifdef _WIN32 +typedef SIZE_T (WINAPI *GetLargePageMinimumP)(); +#elif defined(__linux__) +size_t largePageMinimum() +{ + size_t size; + + g_HugetlbPath = getenv("HUGETLB_PATH"); + + if (g_HugetlbPath == NULL) + { + // not defined => try to find out the directory + static char dir_hugetlbfs[1024]; + const char * filename = "/etc/mtab"; // mounted filesystems + FILE *fp; + struct mntent * info; + + dir_hugetlbfs[0]=0; + + fp = setmntent(filename,"r"); + if (fp) + { + info = getmntent(fp); + while(info) + { +/* + printf("%s:\n",info->mnt_fsname); + printf(" dir='%s'\n",info->mnt_dir); + printf(" type='%s'\n",info->mnt_type); +*/ + + if (strcmp(info->mnt_type,"hugetlbfs") == 0) + { + strcpy(dir_hugetlbfs,info->mnt_dir); + break; + } + + info = getmntent(fp); + } + endmntent(fp); + } + + if (dir_hugetlbfs[0]) + { + g_HugetlbPath = dir_hugetlbfs; + // fprintf(stderr," Found hugetlbfs = '%s'\n",g_HugetlbPath); + } + } + if (g_HugetlbPath == NULL || (size = pathconf(g_HugetlbPath, _PC_REC_MIN_XFER_SIZE)) <= getpagesize()) + return 0; + return size; +} +#else +#define largePageMinimum() 0 +#endif +#endif + +void SetLargePageSize() +{ + #ifdef _7ZIP_LARGE_PAGES + size_t size; + #ifdef _WIN32 + GetLargePageMinimumP largePageMinimum = (GetLargePageMinimumP) + GetProcAddress(GetModuleHandle(TEXT("kernel32.dll")), "GetLargePageMinimum"); + if (largePageMinimum == 0) + return; + #endif + size = largePageMinimum(); + if (size == 0 || (size & (size - 1)) != 0) + return; + g_LargePageSize = size; + // fprintf(stderr,"SetLargePageSize : %ld\n",(long)g_LargePageSize); + #endif +} + + +void *BigAlloc(size_t size) +{ + if (size == 0) + return 0; + #ifdef _SZ_ALLOC_DEBUG + fprintf(stderr, "\nAlloc_Big %10d bytes; count = %10d", size, g_allocCountBig++); + #endif + + #ifdef _7ZIP_LARGE_PAGES + if (g_LargePageSize != 0 && g_LargePageSize <= (1 << 30) && size >= (1 << 18)) + { + void *res = VirtualAlloc( (size + g_LargePageSize - 1) & (~(g_LargePageSize - 1)), 1); + if (res != 0) + return res; + } + #endif + return VirtualAlloc(size, 0); +} + +void BigFree(void *address) +{ + #ifdef _SZ_ALLOC_DEBUG + if (address != 0) + fprintf(stderr, "\nFree_Big; count = %10d", --g_allocCountBig); + #endif + + if (address == 0) + return; + VirtualFree(address); +} diff --git a/C/Alloc.c.back b/C/Alloc.c.back new file mode 100644 index 0000000..1916b47 --- /dev/null +++ b/C/Alloc.c.back @@ -0,0 +1,243 @@ +/* Alloc.c -- Memory allocation functions +2008-09-24 +Igor Pavlov +Public domain */ + +#ifdef _WIN32 +#include +#endif +#include + +#ifdef _7ZIP_LARGE_PAGES +#ifdef __linux__ +#ifndef _7ZIP_ST +#include +#endif +#include +#include +#include +#endif +#endif + +#include "Alloc.h" + +/* #define _SZ_ALLOC_DEBUG */ + +/* use _SZ_ALLOC_DEBUG to debug alloc/free operations */ +#ifdef _SZ_ALLOC_DEBUG +#include +int g_allocCount = 0; +int g_allocCountMid = 0; +int g_allocCountBig = 0; +#endif + +void *MyAlloc(size_t size) +{ + if (size == 0) + return 0; + #ifdef _SZ_ALLOC_DEBUG + { + void *p = malloc(size); + fprintf(stderr, "\nAlloc %10d bytes, count = %10d, addr = %8X", size, g_allocCount++, (unsigned)p); + return p; + } + #else + return malloc(size); + #endif +} + +void MyFree(void *address) +{ + #ifdef _SZ_ALLOC_DEBUG + if (address != 0) + fprintf(stderr, "\nFree; count = %10d, addr = %8X", --g_allocCount, (unsigned)address); + #endif + free(address); +} + +#ifndef _WIN32 + +#define PAGE_READWRITE 0x04 +#define MEM_COMMIT 0x1000 +#define MEM_RELEASE 0x8000 +#ifdef _7ZIP_LARGE_PAGES +#define MEM_LARGE_PAGES 0x20000000 +#ifdef __linux__ +#define _7ZIP_MAX_HUGE_ALLOCS 64 +static void *g_HugePageAddr[_7ZIP_MAX_HUGE_ALLOCS] = { NULL }; +static size_t g_HugePageLen[_7ZIP_MAX_HUGE_ALLOCS]; +static char *g_HugetlbPath; +#endif +#endif + +static void *VirtualAlloc(void *address, size_t size, unsigned int type, unsigned int protect) +{ + #ifdef _7ZIP_LARGE_PAGES + if (type & MEM_LARGE_PAGES) + { + #ifdef __linux__ + /* huge pages support for Linux; added by Joachim Henke */ + #ifndef _7ZIP_ST + static pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; + #endif + int i; + + address = NULL; + #ifndef _7ZIP_ST + pthread_mutex_lock(&mutex); + #endif + for (i = 0; i < _7ZIP_MAX_HUGE_ALLOCS; ++i) + { + if (g_HugePageAddr[i] == NULL) + { + int fd, pathlen = strlen(g_HugetlbPath); + char tempname[pathlen+12]; + + memcpy(tempname, g_HugetlbPath, pathlen); + memcpy(tempname + pathlen, "/7z-XXXXXX", 11); + fd = mkstemp(tempname); +printf("BigAlloc(%s)=>%d\n",tempname,fd); + unlink(tempname); + if (fd < 0) + break; + address = mmap(NULL, size, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0); + close(fd); + if (address == MAP_FAILED) + { + address = NULL; + break; + } + g_HugePageLen[i] = size; + g_HugePageAddr[i] = address; +printf("HUGE[%d]=%ld %p\n",i,(long)size,address); + break; + } + } + #ifndef _7ZIP_ST + pthread_mutex_unlock(&mutex); + #endif + return address; + #endif + } + #endif + return malloc(size); +} + +static int VirtualFree(void *address, size_t size, unsigned int type) +{ + #ifdef _7ZIP_LARGE_PAGES + #ifdef __linux__ + int i; + + for (i = 0; i < _7ZIP_MAX_HUGE_ALLOCS; ++i) + { + if (g_HugePageAddr[i] == address) + { + munmap(address, g_HugePageLen[i]); + g_HugePageAddr[i] = NULL; + return 1; + } + } + #endif + #endif + free(address); + return 1; +} + +#endif + +void *MidAlloc(size_t size) +{ + if (size == 0) + return 0; + #ifdef _SZ_ALLOC_DEBUG + fprintf(stderr, "\nAlloc_Mid %10d bytes; count = %10d", size, g_allocCountMid++); + #endif + return VirtualAlloc(0, size, MEM_COMMIT, PAGE_READWRITE); +} + +void MidFree(void *address) +{ + #ifdef _SZ_ALLOC_DEBUG + if (address != 0) + fprintf(stderr, "\nFree_Mid; count = %10d", --g_allocCountMid); + #endif + if (address == 0) + return; + VirtualFree(address, 0, MEM_RELEASE); +} + +#ifndef MEM_LARGE_PAGES +#undef _7ZIP_LARGE_PAGES +#endif + +#ifdef _7ZIP_LARGE_PAGES +size_t g_LargePageSize = 0; +#ifdef _WIN32 +typedef SIZE_T (WINAPI *GetLargePageMinimumP)(); +#elif defined(__linux__) +size_t largePageMinimum() +{ + size_t size; + + g_HugetlbPath = getenv("HUGETLB_PATH"); + if (g_HugetlbPath == NULL || (size = pathconf(g_HugetlbPath, _PC_REC_MIN_XFER_SIZE)) <= getpagesize()) + return 0; + return size; +} +#else +#define largePageMinimum() 0 +#endif +#endif + +void SetLargePageSize() +{ + #ifdef _7ZIP_LARGE_PAGES + size_t size; + #ifdef _WIN32 + GetLargePageMinimumP largePageMinimum = (GetLargePageMinimumP) + GetProcAddress(GetModuleHandle(TEXT("kernel32.dll")), "GetLargePageMinimum"); + if (largePageMinimum == 0) + return; + #endif + size = largePageMinimum(); + if (size == 0 || (size & (size - 1)) != 0) + return; + g_LargePageSize = size; +printf("SetLargePageSize : %ld\n",(long)g_LargePageSize); + #endif +} + + +void *BigAlloc(size_t size) +{ + if (size == 0) + return 0; + #ifdef _SZ_ALLOC_DEBUG + fprintf(stderr, "\nAlloc_Big %10d bytes; count = %10d", size, g_allocCountBig++); + #endif + + #ifdef _7ZIP_LARGE_PAGES + if (g_LargePageSize != 0 && g_LargePageSize <= (1 << 30) && size >= (1 << 18)) + { + void *res = VirtualAlloc(0, (size + g_LargePageSize - 1) & (~(g_LargePageSize - 1)), + MEM_COMMIT | MEM_LARGE_PAGES, PAGE_READWRITE); +printf("BigAlloc : %ld %ld => %p\n",(long)g_LargePageSize,(long)size,res); + if (res != 0) + return res; + } + #endif + return VirtualAlloc(0, size, MEM_COMMIT, PAGE_READWRITE); +} + +void BigFree(void *address) +{ + #ifdef _SZ_ALLOC_DEBUG + if (address != 0) + fprintf(stderr, "\nFree_Big; count = %10d", --g_allocCountBig); + #endif + + if (address == 0) + return; + VirtualFree(address, 0, MEM_RELEASE); +} diff --git a/C/Alloc.c.back2 b/C/Alloc.c.back2 new file mode 100644 index 0000000..1ba5711 --- /dev/null +++ b/C/Alloc.c.back2 @@ -0,0 +1,222 @@ +/* Alloc.c -- Memory allocation functions +2008-09-24 +Igor Pavlov +Public domain */ + +#include +#include + +#ifdef _7ZIP_LARGE_PAGES + +#ifdef __linux__ + + + +#ifndef _7ZIP_ST +#include +#endif +#include +#include +#include +#define PROTECTION (PROT_READ | PROT_WRITE) + +#ifndef MAP_HUGETLB +#error 1 +#define MAP_HUGETLB 0x40 +#endif + +/* Only ia64 requires this */ +#ifdef __ia64__ +#define ADDR (void *)(0x8000000000000000UL) +#define FLAGS (MAP_PRIVATE | MAP_ANONYMOUS | MAP_HUGETLB | MAP_FIXED) +#else +#define ADDR (void *)(0x0UL) +#define FLAGS (MAP_PRIVATE | MAP_ANONYMOUS | MAP_HUGETLB) +#endif + + +#endif /* __linux__ */ + +#endif /* _7ZIP_LARGE_PAGES */ + +#include "Alloc.h" + +/* #define _SZ_ALLOC_DEBUG */ + +/* use _SZ_ALLOC_DEBUG to debug alloc/free operations */ +#ifdef _SZ_ALLOC_DEBUG +#include +int g_allocCount = 0; +int g_allocCountMid = 0; +int g_allocCountBig = 0; +#endif + +void *MyAlloc(size_t size) +{ + if (size == 0) + return 0; + #ifdef _SZ_ALLOC_DEBUG + { + void *p = malloc(size); + fprintf(stderr, "\nAlloc %10d bytes, count = %10d, addr = %8X", size, g_allocCount++, (unsigned)p); + return p; + } + #else + return malloc(size); + #endif +} + +void MyFree(void *address) +{ + #ifdef _SZ_ALLOC_DEBUG + if (address != 0) + fprintf(stderr, "\nFree; count = %10d, addr = %8X", --g_allocCount, (unsigned)address); + #endif + free(address); +} + +#ifdef __linux__ +#define _7ZIP_MAX_HUGE_ALLOCS 64 +static void *g_HugePageAddr[_7ZIP_MAX_HUGE_ALLOCS] = { NULL }; +static size_t g_HugePageLen[_7ZIP_MAX_HUGE_ALLOCS]; +#endif + +static void *VirtualAlloc(void *address, size_t size, int AllocLargePages) +{ + #ifdef _7ZIP_LARGE_PAGES + if (AllocLargePages) + { + #ifdef __linux__ + /* huge pages support for Linux; added by Joachim Henke */ + #ifndef _7ZIP_ST + static pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; + #endif + int i; + + address = NULL; + #ifndef _7ZIP_ST + pthread_mutex_lock(&mutex); + #endif + for (i = 0; i < _7ZIP_MAX_HUGE_ALLOCS; ++i) + { + if (g_HugePageAddr[i] == NULL) + { + address = mmap(ADDR, size, PROTECTION, FLAGS, 0, 0); + if (address == MAP_FAILED) + { + address = NULL; + break; + } + g_HugePageLen[i] = size; + g_HugePageAddr[i] = address; +printf("HUGE[%d]=%ld %p\n",i,(long)size,address); + break; + } + } + #ifndef _7ZIP_ST + pthread_mutex_unlock(&mutex); + #endif + return address; + #endif + } + #endif + return malloc(size); +} + +static int VirtualFree(void *address) +{ + #ifdef _7ZIP_LARGE_PAGES + #ifdef __linux__ + int i; + + for (i = 0; i < _7ZIP_MAX_HUGE_ALLOCS; ++i) + { + if (g_HugePageAddr[i] == address) + { + munmap(address, g_HugePageLen[i]); + g_HugePageAddr[i] = NULL; + return 1; + } + } + #endif + #endif + free(address); + return 1; +} + +void *MidAlloc(size_t size) +{ + if (size == 0) + return 0; + #ifdef _SZ_ALLOC_DEBUG + fprintf(stderr, "\nAlloc_Mid %10d bytes; count = %10d", size, g_allocCountMid++); + #endif + return VirtualAlloc(0, size, 0); +} + +void MidFree(void *address) +{ + #ifdef _SZ_ALLOC_DEBUG + if (address != 0) + fprintf(stderr, "\nFree_Mid; count = %10d", --g_allocCountMid); + #endif + if (address == 0) + return; + VirtualFree(address); +} + +#ifdef _7ZIP_LARGE_PAGES +size_t g_LargePageSize = 0; +#endif + +void SetLargePageSize() +{ +printf("SetLargePageSize : <>\n"); + #ifdef _7ZIP_LARGE_PAGES + size_t size = 0; + +#if defined(__linux__) + size = sysconf(_SC_PAGESIZE); +printf("SetLargePageSize : size=%ld\n",(long)size); + if (size == -1) size = 0; +#endif + + if (size == 0 || (size & (size - 1)) != 0) + return; + g_LargePageSize = size; +printf("SetLargePageSize : %ld\n",(long)g_LargePageSize); + #endif +} + + +void *BigAlloc(size_t size) +{ + if (size == 0) + return 0; + #ifdef _SZ_ALLOC_DEBUG + fprintf(stderr, "\nAlloc_Big %10d bytes; count = %10d", size, g_allocCountBig++); + #endif + + #ifdef _7ZIP_LARGE_PAGES + if (g_LargePageSize != 0 && g_LargePageSize <= (1 << 30) && size >= (1 << 18)) + { + void *res = VirtualAlloc(0, (size + g_LargePageSize - 1) & (~(g_LargePageSize - 1)),1); +printf("BigAlloc : %ld %ld => %p\n",(long)g_LargePageSize,(long)size,res); + if (res != 0) + return res; + } + #endif + return VirtualAlloc(0, size, 0); +} + +void BigFree(void *address) +{ + #ifdef _SZ_ALLOC_DEBUG + if (address != 0) + fprintf(stderr, "\nFree_Big; count = %10d", --g_allocCountBig); + #endif + + if (address == 0) + return; + VirtualFree(address); +} diff --git a/C/Alloc.h b/C/Alloc.h new file mode 100644 index 0000000..7ef372e --- /dev/null +++ b/C/Alloc.h @@ -0,0 +1,27 @@ +/* Alloc.h -- Memory allocation functions +2009-02-07 : Igor Pavlov : Public domain */ + +#ifndef __COMMON_ALLOC_H +#define __COMMON_ALLOC_H + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +void *MyAlloc(size_t size); +void MyFree(void *address); + +void SetLargePageSize(); + +void *MidAlloc(size_t size); +void MidFree(void *address); +void *BigAlloc(size_t size); +void BigFree(void *address); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/C/Bra.c b/C/Bra.c new file mode 100644 index 0000000..2e47b14 --- /dev/null +++ b/C/Bra.c @@ -0,0 +1,133 @@ +/* Bra.c -- Converters for RISC code +2010-04-16 : Igor Pavlov : Public domain */ + +#include "Bra.h" + +SizeT ARM_Convert(Byte *data, SizeT size, UInt32 ip, int encoding) +{ + SizeT i; + if (size < 4) + return 0; + size -= 4; + ip += 8; + for (i = 0; i <= size; i += 4) + { + if (data[i + 3] == 0xEB) + { + UInt32 dest; + UInt32 src = ((UInt32)data[i + 2] << 16) | ((UInt32)data[i + 1] << 8) | (data[i + 0]); + src <<= 2; + if (encoding) + dest = ip + (UInt32)i + src; + else + dest = src - (ip + (UInt32)i); + dest >>= 2; + data[i + 2] = (Byte)(dest >> 16); + data[i + 1] = (Byte)(dest >> 8); + data[i + 0] = (Byte)dest; + } + } + return i; +} + +SizeT ARMT_Convert(Byte *data, SizeT size, UInt32 ip, int encoding) +{ + SizeT i; + if (size < 4) + return 0; + size -= 4; + ip += 4; + for (i = 0; i <= size; i += 2) + { + if ((data[i + 1] & 0xF8) == 0xF0 && + (data[i + 3] & 0xF8) == 0xF8) + { + UInt32 dest; + UInt32 src = + (((UInt32)data[i + 1] & 0x7) << 19) | + ((UInt32)data[i + 0] << 11) | + (((UInt32)data[i + 3] & 0x7) << 8) | + (data[i + 2]); + + src <<= 1; + if (encoding) + dest = ip + (UInt32)i + src; + else + dest = src - (ip + (UInt32)i); + dest >>= 1; + + data[i + 1] = (Byte)(0xF0 | ((dest >> 19) & 0x7)); + data[i + 0] = (Byte)(dest >> 11); + data[i + 3] = (Byte)(0xF8 | ((dest >> 8) & 0x7)); + data[i + 2] = (Byte)dest; + i += 2; + } + } + return i; +} + +SizeT PPC_Convert(Byte *data, SizeT size, UInt32 ip, int encoding) +{ + SizeT i; + if (size < 4) + return 0; + size -= 4; + for (i = 0; i <= size; i += 4) + { + if ((data[i] >> 2) == 0x12 && (data[i + 3] & 3) == 1) + { + UInt32 src = ((UInt32)(data[i + 0] & 3) << 24) | + ((UInt32)data[i + 1] << 16) | + ((UInt32)data[i + 2] << 8) | + ((UInt32)data[i + 3] & (~3)); + + UInt32 dest; + if (encoding) + dest = ip + (UInt32)i + src; + else + dest = src - (ip + (UInt32)i); + data[i + 0] = (Byte)(0x48 | ((dest >> 24) & 0x3)); + data[i + 1] = (Byte)(dest >> 16); + data[i + 2] = (Byte)(dest >> 8); + data[i + 3] &= 0x3; + data[i + 3] |= dest; + } + } + return i; +} + +SizeT SPARC_Convert(Byte *data, SizeT size, UInt32 ip, int encoding) +{ + UInt32 i; + if (size < 4) + return 0; + size -= 4; + for (i = 0; i <= size; i += 4) + { + if ((data[i] == 0x40 && (data[i + 1] & 0xC0) == 0x00) || + (data[i] == 0x7F && (data[i + 1] & 0xC0) == 0xC0)) + { + UInt32 src = + ((UInt32)data[i + 0] << 24) | + ((UInt32)data[i + 1] << 16) | + ((UInt32)data[i + 2] << 8) | + ((UInt32)data[i + 3]); + UInt32 dest; + + src <<= 2; + if (encoding) + dest = ip + i + src; + else + dest = src - (ip + i); + dest >>= 2; + + dest = (((0 - ((dest >> 22) & 1)) << 22) & 0x3FFFFFFF) | (dest & 0x3FFFFF) | 0x40000000; + + data[i + 0] = (Byte)(dest >> 24); + data[i + 1] = (Byte)(dest >> 16); + data[i + 2] = (Byte)(dest >> 8); + data[i + 3] = (Byte)dest; + } + } + return i; +} diff --git a/C/Bra.h b/C/Bra.h new file mode 100644 index 0000000..5748c1c --- /dev/null +++ b/C/Bra.h @@ -0,0 +1,68 @@ +/* Bra.h -- Branch converters for executables +2009-02-07 : Igor Pavlov : Public domain */ + +#ifndef __BRA_H +#define __BRA_H + +#include "Types.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* +These functions convert relative addresses to absolute addresses +in CALL instructions to increase the compression ratio. + + In: + data - data buffer + size - size of data + ip - current virtual Instruction Pinter (IP) value + state - state variable for x86 converter + encoding - 0 (for decoding), 1 (for encoding) + + Out: + state - state variable for x86 converter + + Returns: + The number of processed bytes. If you call these functions with multiple calls, + you must start next call with first byte after block of processed bytes. + + Type Endian Alignment LookAhead + + x86 little 1 4 + ARMT little 2 2 + ARM little 4 0 + PPC big 4 0 + SPARC big 4 0 + IA64 little 16 0 + + size must be >= Alignment + LookAhead, if it's not last block. + If (size < Alignment + LookAhead), converter returns 0. + + Example: + + UInt32 ip = 0; + for () + { + ; size must be >= Alignment + LookAhead, if it's not last block + SizeT processed = Convert(data, size, ip, 1); + data += processed; + size -= processed; + ip += processed; + } +*/ + +#define x86_Convert_Init(state) { state = 0; } +SizeT x86_Convert(Byte *data, SizeT size, UInt32 ip, UInt32 *state, int encoding); +SizeT ARM_Convert(Byte *data, SizeT size, UInt32 ip, int encoding); +SizeT ARMT_Convert(Byte *data, SizeT size, UInt32 ip, int encoding); +SizeT PPC_Convert(Byte *data, SizeT size, UInt32 ip, int encoding); +SizeT SPARC_Convert(Byte *data, SizeT size, UInt32 ip, int encoding); +SizeT IA64_Convert(Byte *data, SizeT size, UInt32 ip, int encoding); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/C/Bra86.c b/C/Bra86.c new file mode 100644 index 0000000..1ee0e70 --- /dev/null +++ b/C/Bra86.c @@ -0,0 +1,85 @@ +/* Bra86.c -- Converter for x86 code (BCJ) +2008-10-04 : Igor Pavlov : Public domain */ + +#include "Bra.h" + +#define Test86MSByte(b) ((b) == 0 || (b) == 0xFF) + +const Byte kMaskToAllowedStatus[8] = {1, 1, 1, 0, 1, 0, 0, 0}; +const Byte kMaskToBitNumber[8] = {0, 1, 2, 2, 3, 3, 3, 3}; + +SizeT x86_Convert(Byte *data, SizeT size, UInt32 ip, UInt32 *state, int encoding) +{ + SizeT bufferPos = 0, prevPosT; + UInt32 prevMask = *state & 0x7; + if (size < 5) + return 0; + ip += 5; + prevPosT = (SizeT)0 - 1; + + for (;;) + { + Byte *p = data + bufferPos; + Byte *limit = data + size - 4; + for (; p < limit; p++) + if ((*p & 0xFE) == 0xE8) + break; + bufferPos = (SizeT)(p - data); + if (p >= limit) + break; + prevPosT = bufferPos - prevPosT; + if (prevPosT > 3) + prevMask = 0; + else + { + prevMask = (prevMask << ((int)prevPosT - 1)) & 0x7; + if (prevMask != 0) + { + Byte b = p[4 - kMaskToBitNumber[prevMask]]; + if (!kMaskToAllowedStatus[prevMask] || Test86MSByte(b)) + { + prevPosT = bufferPos; + prevMask = ((prevMask << 1) & 0x7) | 1; + bufferPos++; + continue; + } + } + } + prevPosT = bufferPos; + + if (Test86MSByte(p[4])) + { + UInt32 src = ((UInt32)p[4] << 24) | ((UInt32)p[3] << 16) | ((UInt32)p[2] << 8) | ((UInt32)p[1]); + UInt32 dest; + for (;;) + { + Byte b; + int index; + if (encoding) + dest = (ip + (UInt32)bufferPos) + src; + else + dest = src - (ip + (UInt32)bufferPos); + if (prevMask == 0) + break; + index = kMaskToBitNumber[prevMask] * 8; + b = (Byte)(dest >> (24 - index)); + if (!Test86MSByte(b)) + break; + src = dest ^ ((1 << (32 - index)) - 1); + } + p[4] = (Byte)(~(((dest >> 24) & 1) - 1)); + p[3] = (Byte)(dest >> 16); + p[2] = (Byte)(dest >> 8); + p[1] = (Byte)dest; + bufferPos += 5; + } + else + { + prevMask = ((prevMask << 1) & 0x7) | 1; + bufferPos++; + } + } + prevPosT = bufferPos - prevPosT; + *state = ((prevPosT > 3) ? 0 : ((prevMask << ((int)prevPosT - 1)) & 0x7)); + return bufferPos; +} diff --git a/C/BraIA64.c b/C/BraIA64.c new file mode 100644 index 0000000..0b4ee85 --- /dev/null +++ b/C/BraIA64.c @@ -0,0 +1,67 @@ +/* BraIA64.c -- Converter for IA-64 code +2008-10-04 : Igor Pavlov : Public domain */ + +#include "Bra.h" + +static const Byte kBranchTable[32] = +{ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 4, 4, 6, 6, 0, 0, 7, 7, + 4, 4, 0, 0, 4, 4, 0, 0 +}; + +SizeT IA64_Convert(Byte *data, SizeT size, UInt32 ip, int encoding) +{ + SizeT i; + if (size < 16) + return 0; + size -= 16; + for (i = 0; i <= size; i += 16) + { + UInt32 instrTemplate = data[i] & 0x1F; + UInt32 mask = kBranchTable[instrTemplate]; + UInt32 bitPos = 5; + int slot; + for (slot = 0; slot < 3; slot++, bitPos += 41) + { + UInt32 bytePos, bitRes; + UInt64 instruction, instNorm; + int j; + if (((mask >> slot) & 1) == 0) + continue; + bytePos = (bitPos >> 3); + bitRes = bitPos & 0x7; + instruction = 0; + for (j = 0; j < 6; j++) + instruction += (UInt64)data[i + j + bytePos] << (8 * j); + + instNorm = instruction >> bitRes; + if (((instNorm >> 37) & 0xF) == 0x5 && ((instNorm >> 9) & 0x7) == 0) + { + UInt32 src = (UInt32)((instNorm >> 13) & 0xFFFFF); + UInt32 dest; + src |= ((UInt32)(instNorm >> 36) & 1) << 20; + + src <<= 4; + + if (encoding) + dest = ip + (UInt32)i + src; + else + dest = src - (ip + (UInt32)i); + + dest >>= 4; + + instNorm &= ~((UInt64)(0x8FFFFF) << 13); + instNorm |= ((UInt64)(dest & 0xFFFFF) << 13); + instNorm |= ((UInt64)(dest & 0x100000) << (36 - 20)); + + instruction &= (1 << bitRes) - 1; + instruction |= (instNorm << bitRes); + for (j = 0; j < 6; j++) + data[i + j + bytePos] = (Byte)(instruction >> (8 * j)); + } + } + } + return i; +} diff --git a/C/BwtSort.c b/C/BwtSort.c new file mode 100644 index 0000000..2073050 --- /dev/null +++ b/C/BwtSort.c @@ -0,0 +1,516 @@ +/* BwtSort.c -- BWT block sorting +2008-08-17 +Igor Pavlov +Public domain */ + +#include "BwtSort.h" +#include "Sort.h" + +/* #define BLOCK_SORT_USE_HEAP_SORT */ + +#define NO_INLINE MY_FAST_CALL + +/* Don't change it !!! */ +#define kNumHashBytes 2 +#define kNumHashValues (1 << (kNumHashBytes * 8)) + +/* kNumRefBitsMax must be < (kNumHashBytes * 8) = 16 */ +#define kNumRefBitsMax 12 + +#define BS_TEMP_SIZE kNumHashValues + +#ifdef BLOCK_SORT_EXTERNAL_FLAGS + +/* 32 Flags in UInt32 word */ +#define kNumFlagsBits 5 +#define kNumFlagsInWord (1 << kNumFlagsBits) +#define kFlagsMask (kNumFlagsInWord - 1) +#define kAllFlags 0xFFFFFFFF + +#else + +#define kNumBitsMax 20 +#define kIndexMask ((1 << kNumBitsMax) - 1) +#define kNumExtraBits (32 - kNumBitsMax) +#define kNumExtra0Bits (kNumExtraBits - 2) +#define kNumExtra0Mask ((1 << kNumExtra0Bits) - 1) + +#define SetFinishedGroupSize(p, size) \ + { *(p) |= ((((size) - 1) & kNumExtra0Mask) << kNumBitsMax); \ + if ((size) > (1 << kNumExtra0Bits)) { \ + *(p) |= 0x40000000; *((p) + 1) |= ((((size) - 1)>> kNumExtra0Bits) << kNumBitsMax); } } \ + +static void SetGroupSize(UInt32 *p, UInt32 size) +{ + if (--size == 0) + return; + *p |= 0x80000000 | ((size & kNumExtra0Mask) << kNumBitsMax); + if (size >= (1 << kNumExtra0Bits)) + { + *p |= 0x40000000; + p[1] |= ((size >> kNumExtra0Bits) << kNumBitsMax); + } +} + +#endif + +/* +SortGroup - is recursive Range-Sort function with HeapSort optimization for small blocks + "range" is not real range. It's only for optimization. +returns: 1 - if there are groups, 0 - no more groups +*/ + +UInt32 NO_INLINE SortGroup(UInt32 BlockSize, UInt32 NumSortedBytes, UInt32 groupOffset, UInt32 groupSize, int NumRefBits, UInt32 *Indices + #ifndef BLOCK_SORT_USE_HEAP_SORT + , UInt32 left, UInt32 range + #endif + ) +{ + UInt32 *ind2 = Indices + groupOffset; + UInt32 *Groups; + if (groupSize <= 1) + { + /* + #ifndef BLOCK_SORT_EXTERNAL_FLAGS + SetFinishedGroupSize(ind2, 1); + #endif + */ + return 0; + } + Groups = Indices + BlockSize + BS_TEMP_SIZE; + if (groupSize <= ((UInt32)1 << NumRefBits) + #ifndef BLOCK_SORT_USE_HEAP_SORT + && groupSize <= range + #endif + ) + { + UInt32 *temp = Indices + BlockSize; + UInt32 j; + UInt32 mask, thereAreGroups, group, cg; + { + UInt32 gPrev; + UInt32 gRes = 0; + { + UInt32 sp = ind2[0] + NumSortedBytes; + if (sp >= BlockSize) sp -= BlockSize; + gPrev = Groups[sp]; + temp[0] = (gPrev << NumRefBits); + } + + for (j = 1; j < groupSize; j++) + { + UInt32 sp = ind2[j] + NumSortedBytes; + UInt32 g; + if (sp >= BlockSize) sp -= BlockSize; + g = Groups[sp]; + temp[j] = (g << NumRefBits) | j; + gRes |= (gPrev ^ g); + } + if (gRes == 0) + { + #ifndef BLOCK_SORT_EXTERNAL_FLAGS + SetGroupSize(ind2, groupSize); + #endif + return 1; + } + } + + HeapSort(temp, groupSize); + mask = ((1 << NumRefBits) - 1); + thereAreGroups = 0; + + group = groupOffset; + cg = (temp[0] >> NumRefBits); + temp[0] = ind2[temp[0] & mask]; + + { + #ifdef BLOCK_SORT_EXTERNAL_FLAGS + UInt32 *Flags = Groups + BlockSize; + #else + UInt32 prevGroupStart = 0; + #endif + + for (j = 1; j < groupSize; j++) + { + UInt32 val = temp[j]; + UInt32 cgCur = (val >> NumRefBits); + + if (cgCur != cg) + { + cg = cgCur; + group = groupOffset + j; + + #ifdef BLOCK_SORT_EXTERNAL_FLAGS + { + UInt32 t = group - 1; + Flags[t >> kNumFlagsBits] &= ~(1 << (t & kFlagsMask)); + } + #else + SetGroupSize(temp + prevGroupStart, j - prevGroupStart); + prevGroupStart = j; + #endif + } + else + thereAreGroups = 1; + { + UInt32 ind = ind2[val & mask]; + temp[j] = ind; + Groups[ind] = group; + } + } + + #ifndef BLOCK_SORT_EXTERNAL_FLAGS + SetGroupSize(temp + prevGroupStart, j - prevGroupStart); + #endif + } + + for (j = 0; j < groupSize; j++) + ind2[j] = temp[j]; + return thereAreGroups; + } + + /* Check that all strings are in one group (cannot sort) */ + { + UInt32 group, j; + UInt32 sp = ind2[0] + NumSortedBytes; if (sp >= BlockSize) sp -= BlockSize; + group = Groups[sp]; + for (j = 1; j < groupSize; j++) + { + sp = ind2[j] + NumSortedBytes; if (sp >= BlockSize) sp -= BlockSize; + if (Groups[sp] != group) + break; + } + if (j == groupSize) + { + #ifndef BLOCK_SORT_EXTERNAL_FLAGS + SetGroupSize(ind2, groupSize); + #endif + return 1; + } + } + + #ifndef BLOCK_SORT_USE_HEAP_SORT + { + /* ---------- Range Sort ---------- */ + UInt32 i; + UInt32 mid; + for (;;) + { + UInt32 j; + if (range <= 1) + { + #ifndef BLOCK_SORT_EXTERNAL_FLAGS + SetGroupSize(ind2, groupSize); + #endif + return 1; + } + mid = left + ((range + 1) >> 1); + j = groupSize; + i = 0; + do + { + UInt32 sp = ind2[i] + NumSortedBytes; if (sp >= BlockSize) sp -= BlockSize; + if (Groups[sp] >= mid) + { + for (j--; j > i; j--) + { + sp = ind2[j] + NumSortedBytes; if (sp >= BlockSize) sp -= BlockSize; + if (Groups[sp] < mid) + { + UInt32 temp = ind2[i]; ind2[i] = ind2[j]; ind2[j] = temp; + break; + } + } + if (i >= j) + break; + } + } + while (++i < j); + if (i == 0) + { + range = range - (mid - left); + left = mid; + } + else if (i == groupSize) + range = (mid - left); + else + break; + } + + #ifdef BLOCK_SORT_EXTERNAL_FLAGS + { + UInt32 t = (groupOffset + i - 1); + UInt32 *Flags = Groups + BlockSize; + Flags[t >> kNumFlagsBits] &= ~(1 << (t & kFlagsMask)); + } + #endif + + { + UInt32 j; + for (j = i; j < groupSize; j++) + Groups[ind2[j]] = groupOffset + i; + } + + { + UInt32 res = SortGroup(BlockSize, NumSortedBytes, groupOffset, i, NumRefBits, Indices, left, mid - left); + return res | SortGroup(BlockSize, NumSortedBytes, groupOffset + i, groupSize - i, NumRefBits, Indices, mid, range - (mid - left)); + } + + } + + #else + + /* ---------- Heap Sort ---------- */ + + { + UInt32 j; + for (j = 0; j < groupSize; j++) + { + UInt32 sp = ind2[j] + NumSortedBytes; if (sp >= BlockSize) sp -= BlockSize; + ind2[j] = sp; + } + + HeapSortRef(ind2, Groups, groupSize); + + /* Write Flags */ + { + UInt32 sp = ind2[0]; + UInt32 group = Groups[sp]; + + #ifdef BLOCK_SORT_EXTERNAL_FLAGS + UInt32 *Flags = Groups + BlockSize; + #else + UInt32 prevGroupStart = 0; + #endif + + for (j = 1; j < groupSize; j++) + { + sp = ind2[j]; + if (Groups[sp] != group) + { + group = Groups[sp]; + #ifdef BLOCK_SORT_EXTERNAL_FLAGS + { + UInt32 t = groupOffset + j - 1; + Flags[t >> kNumFlagsBits] &= ~(1 << (t & kFlagsMask)); + } + #else + SetGroupSize(ind2 + prevGroupStart, j - prevGroupStart); + prevGroupStart = j; + #endif + } + } + + #ifndef BLOCK_SORT_EXTERNAL_FLAGS + SetGroupSize(ind2 + prevGroupStart, j - prevGroupStart); + #endif + } + { + /* Write new Groups values and Check that there are groups */ + UInt32 thereAreGroups = 0; + for (j = 0; j < groupSize; j++) + { + UInt32 group = groupOffset + j; + #ifndef BLOCK_SORT_EXTERNAL_FLAGS + UInt32 subGroupSize = ((ind2[j] & ~0xC0000000) >> kNumBitsMax); + if ((ind2[j] & 0x40000000) != 0) + subGroupSize += ((ind2[j + 1] >> kNumBitsMax) << kNumExtra0Bits); + subGroupSize++; + for (;;) + { + UInt32 original = ind2[j]; + UInt32 sp = original & kIndexMask; + if (sp < NumSortedBytes) sp += BlockSize; sp -= NumSortedBytes; + ind2[j] = sp | (original & ~kIndexMask); + Groups[sp] = group; + if (--subGroupSize == 0) + break; + j++; + thereAreGroups = 1; + } + #else + UInt32 *Flags = Groups + BlockSize; + for (;;) + { + UInt32 sp = ind2[j]; if (sp < NumSortedBytes) sp += BlockSize; sp -= NumSortedBytes; + ind2[j] = sp; + Groups[sp] = group; + if ((Flags[(groupOffset + j) >> kNumFlagsBits] & (1 << ((groupOffset + j) & kFlagsMask))) == 0) + break; + j++; + thereAreGroups = 1; + } + #endif + } + return thereAreGroups; + } + } + #endif +} + +/* conditions: blockSize > 0 */ +UInt32 BlockSort(UInt32 *Indices, const Byte *data, UInt32 blockSize) +{ + UInt32 *counters = Indices + blockSize; + UInt32 i; + UInt32 *Groups; + #ifdef BLOCK_SORT_EXTERNAL_FLAGS + UInt32 *Flags; + #endif + + /* Radix-Sort for 2 bytes */ + for (i = 0; i < kNumHashValues; i++) + counters[i] = 0; + for (i = 0; i < blockSize - 1; i++) + counters[((UInt32)data[i] << 8) | data[i + 1]]++; + counters[((UInt32)data[i] << 8) | data[0]]++; + + Groups = counters + BS_TEMP_SIZE; + #ifdef BLOCK_SORT_EXTERNAL_FLAGS + Flags = Groups + blockSize; + { + UInt32 numWords = (blockSize + kFlagsMask) >> kNumFlagsBits; + for (i = 0; i < numWords; i++) + Flags[i] = kAllFlags; + } + #endif + + { + UInt32 sum = 0; + for (i = 0; i < kNumHashValues; i++) + { + UInt32 groupSize = counters[i]; + if (groupSize > 0) + { + #ifdef BLOCK_SORT_EXTERNAL_FLAGS + UInt32 t = sum + groupSize - 1; + Flags[t >> kNumFlagsBits] &= ~(1 << (t & kFlagsMask)); + #endif + sum += groupSize; + } + counters[i] = sum - groupSize; + } + + for (i = 0; i < blockSize - 1; i++) + Groups[i] = counters[((UInt32)data[i] << 8) | data[i + 1]]; + Groups[i] = counters[((UInt32)data[i] << 8) | data[0]]; + + for (i = 0; i < blockSize - 1; i++) + Indices[counters[((UInt32)data[i] << 8) | data[i + 1]]++] = i; + Indices[counters[((UInt32)data[i] << 8) | data[0]]++] = i; + + #ifndef BLOCK_SORT_EXTERNAL_FLAGS + { + UInt32 prev = 0; + for (i = 0; i < kNumHashValues; i++) + { + UInt32 prevGroupSize = counters[i] - prev; + if (prevGroupSize == 0) + continue; + SetGroupSize(Indices + prev, prevGroupSize); + prev = counters[i]; + } + } + #endif + } + + { + int NumRefBits; + UInt32 NumSortedBytes; + for (NumRefBits = 0; ((blockSize - 1) >> NumRefBits) != 0; NumRefBits++); + NumRefBits = 32 - NumRefBits; + if (NumRefBits > kNumRefBitsMax) + NumRefBits = kNumRefBitsMax; + + for (NumSortedBytes = kNumHashBytes; ; NumSortedBytes <<= 1) + { + #ifndef BLOCK_SORT_EXTERNAL_FLAGS + UInt32 finishedGroupSize = 0; + #endif + UInt32 newLimit = 0; + for (i = 0; i < blockSize;) + { + UInt32 groupSize; + #ifdef BLOCK_SORT_EXTERNAL_FLAGS + + if ((Flags[i >> kNumFlagsBits] & (1 << (i & kFlagsMask))) == 0) + { + i++; + continue; + } + for (groupSize = 1; + (Flags[(i + groupSize) >> kNumFlagsBits] & (1 << ((i + groupSize) & kFlagsMask))) != 0; + groupSize++); + + groupSize++; + + #else + + groupSize = ((Indices[i] & ~0xC0000000) >> kNumBitsMax); + { + Bool finishedGroup = ((Indices[i] & 0x80000000) == 0); + if ((Indices[i] & 0x40000000) != 0) + { + groupSize += ((Indices[i + 1] >> kNumBitsMax) << kNumExtra0Bits); + Indices[i + 1] &= kIndexMask; + } + Indices[i] &= kIndexMask; + groupSize++; + if (finishedGroup || groupSize == 1) + { + Indices[i - finishedGroupSize] &= kIndexMask; + if (finishedGroupSize > 1) + Indices[i - finishedGroupSize + 1] &= kIndexMask; + { + UInt32 newGroupSize = groupSize + finishedGroupSize; + SetFinishedGroupSize(Indices + i - finishedGroupSize, newGroupSize); + finishedGroupSize = newGroupSize; + } + i += groupSize; + continue; + } + finishedGroupSize = 0; + } + + #endif + + if (NumSortedBytes >= blockSize) + { + UInt32 j; + for (j = 0; j < groupSize; j++) + { + UInt32 t = (i + j); + /* Flags[t >> kNumFlagsBits] &= ~(1 << (t & kFlagsMask)); */ + Groups[Indices[t]] = t; + } + } + else + if (SortGroup(blockSize, NumSortedBytes, i, groupSize, NumRefBits, Indices + #ifndef BLOCK_SORT_USE_HEAP_SORT + , 0, blockSize + #endif + ) != 0) + newLimit = i + groupSize; + i += groupSize; + } + if (newLimit == 0) + break; + } + } + #ifndef BLOCK_SORT_EXTERNAL_FLAGS + for (i = 0; i < blockSize;) + { + UInt32 groupSize = ((Indices[i] & ~0xC0000000) >> kNumBitsMax); + if ((Indices[i] & 0x40000000) != 0) + { + groupSize += ((Indices[i + 1] >> kNumBitsMax) << kNumExtra0Bits); + Indices[i + 1] &= kIndexMask; + } + Indices[i] &= kIndexMask; + groupSize++; + i += groupSize; + } + #endif + return Groups[0]; +} + diff --git a/C/BwtSort.h b/C/BwtSort.h new file mode 100644 index 0000000..ce5598f --- /dev/null +++ b/C/BwtSort.h @@ -0,0 +1,30 @@ +/* BwtSort.h -- BWT block sorting +2009-02-07 : Igor Pavlov : Public domain */ + +#ifndef __BWT_SORT_H +#define __BWT_SORT_H + +#include "Types.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* use BLOCK_SORT_EXTERNAL_FLAGS if blockSize can be > 1M */ +/* #define BLOCK_SORT_EXTERNAL_FLAGS */ + +#ifdef BLOCK_SORT_EXTERNAL_FLAGS +#define BLOCK_SORT_EXTERNAL_SIZE(blockSize) ((((blockSize) + 31) >> 5)) +#else +#define BLOCK_SORT_EXTERNAL_SIZE(blockSize) 0 +#endif + +#define BLOCK_SORT_BUF_SIZE(blockSize) ((blockSize) * 2 + BLOCK_SORT_EXTERNAL_SIZE(blockSize) + (1 << 16)) + +UInt32 BlockSort(UInt32 *indices, const Byte *data, UInt32 blockSize); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/C/CpuArch.c b/C/CpuArch.c new file mode 100644 index 0000000..260cc1f --- /dev/null +++ b/C/CpuArch.c @@ -0,0 +1,168 @@ +/* CpuArch.c -- CPU specific code +2010-10-26: Igor Pavlov : Public domain */ + +#include "CpuArch.h" + +#ifdef MY_CPU_X86_OR_AMD64 + +#if (defined(_MSC_VER) && !defined(MY_CPU_AMD64)) || defined(__GNUC__) +#define USE_ASM +#endif + +#if defined(USE_ASM) && !defined(MY_CPU_AMD64) +static UInt32 CheckFlag(UInt32 flag) +{ + #ifdef _MSC_VER + __asm pushfd; + __asm pop EAX; + __asm mov EDX, EAX; + __asm xor EAX, flag; + __asm push EAX; + __asm popfd; + __asm pushfd; + __asm pop EAX; + __asm xor EAX, EDX; + __asm push EDX; + __asm popfd; + __asm and flag, EAX; + #else + __asm__ __volatile__ ( + "pushf\n\t" + "pop %%EAX\n\t" + "movl %%EAX,%%EDX\n\t" + "xorl %0,%%EAX\n\t" + "push %%EAX\n\t" + "popf\n\t" + "pushf\n\t" + "pop %%EAX\n\t" + "xorl %%EDX,%%EAX\n\t" + "push %%EDX\n\t" + "popf\n\t" + "andl %%EAX, %0\n\t": + "=c" (flag) : "c" (flag)); + #endif + return flag; +} +#define CHECK_CPUID_IS_SUPPORTED if (CheckFlag(1 << 18) == 0 || CheckFlag(1 << 21) == 0) return False; +#else +#define CHECK_CPUID_IS_SUPPORTED +#endif + +static void MyCPUID(UInt32 function, UInt32 *a, UInt32 *b, UInt32 *c, UInt32 *d) +{ + #ifdef USE_ASM + + #ifdef _MSC_VER + + UInt32 a2, b2, c2, d2; + __asm xor EBX, EBX; + __asm xor ECX, ECX; + __asm xor EDX, EDX; + __asm mov EAX, function; + __asm cpuid; + __asm mov a2, EAX; + __asm mov b2, EBX; + __asm mov c2, ECX; + __asm mov d2, EDX; + + *a = a2; + *b = b2; + *c = c2; + *d = d2; + + #else + + __asm__ __volatile__ ( + "cpuid" + : "=a" (*a) , + "=b" (*b) , + "=c" (*c) , + "=d" (*d) + : "0" (function)) ; + + #endif + + #else + + int CPUInfo[4]; + __cpuid(CPUInfo, function); + *a = CPUInfo[0]; + *b = CPUInfo[1]; + *c = CPUInfo[2]; + *d = CPUInfo[3]; + + #endif +} + +Bool x86cpuid_CheckAndRead(Cx86cpuid *p) +{ + CHECK_CPUID_IS_SUPPORTED + MyCPUID(0, &p->maxFunc, &p->vendor[0], &p->vendor[2], &p->vendor[1]); + MyCPUID(1, &p->ver, &p->b, &p->c, &p->d); + return True; +} + +static UInt32 kVendors[][3] = +{ + { 0x756E6547, 0x49656E69, 0x6C65746E}, + { 0x68747541, 0x69746E65, 0x444D4163}, + { 0x746E6543, 0x48727561, 0x736C7561} +}; + +int x86cpuid_GetFirm(const Cx86cpuid *p) +{ + unsigned i; + for (i = 0; i < sizeof(kVendors) / sizeof(kVendors[i]); i++) + { + const UInt32 *v = kVendors[i]; + if (v[0] == p->vendor[0] && + v[1] == p->vendor[1] && + v[2] == p->vendor[2]) + return (int)i; + } + return -1; +} + +Bool CPU_Is_InOrder() +{ + Cx86cpuid p; + int firm; + UInt32 family, model; + if (!x86cpuid_CheckAndRead(&p)) + return True; + family = x86cpuid_GetFamily(&p); + model = x86cpuid_GetModel(&p); + firm = x86cpuid_GetFirm(&p); + switch (firm) + { + case CPU_FIRM_INTEL: return (family < 6 || (family == 6 && model == 0x100C)); + case CPU_FIRM_AMD: return (family < 5 || (family == 5 && (model < 6 || model == 0xA))); + case CPU_FIRM_VIA: return (family < 6 || (family == 6 && model < 0xF)); + } + return True; +} + +#if !defined(MY_CPU_AMD64) && defined(_WIN32) +static Bool CPU_Sys_Is_SSE_Supported() +{ + OSVERSIONINFO vi; + vi.dwOSVersionInfoSize = sizeof(vi); + if (!GetVersionEx(&vi)) + return False; + return (vi.dwMajorVersion >= 5); +} +#define CHECK_SYS_SSE_SUPPORT if (!CPU_Sys_Is_SSE_Supported()) return False; +#else +#define CHECK_SYS_SSE_SUPPORT +#endif + +Bool CPU_Is_Aes_Supported() +{ + Cx86cpuid p; + CHECK_SYS_SSE_SUPPORT + if (!x86cpuid_CheckAndRead(&p)) + return False; + return (p.c >> 25) & 1; +} + +#endif diff --git a/C/CpuArch.h b/C/CpuArch.h new file mode 100644 index 0000000..01930c7 --- /dev/null +++ b/C/CpuArch.h @@ -0,0 +1,155 @@ +/* CpuArch.h -- CPU specific code +2010-10-26: Igor Pavlov : Public domain */ + +#ifndef __CPU_ARCH_H +#define __CPU_ARCH_H + +#include "Types.h" + +EXTERN_C_BEGIN + +/* +MY_CPU_LE means that CPU is LITTLE ENDIAN. +If MY_CPU_LE is not defined, we don't know about that property of platform (it can be LITTLE ENDIAN). + +MY_CPU_LE_UNALIGN means that CPU is LITTLE ENDIAN and CPU supports unaligned memory accesses. +If MY_CPU_LE_UNALIGN is not defined, we don't know about these properties of platform. +*/ + +#if defined(_M_X64) || defined(_M_AMD64) || defined(__x86_64__) +#define MY_CPU_AMD64 +#endif + +#if defined(MY_CPU_AMD64) || defined(_M_IA64) +#define MY_CPU_64BIT +#endif + +#if defined(_M_IX86) || defined(__i386__) +#define MY_CPU_X86 +#endif + +#if defined(MY_CPU_X86) || defined(MY_CPU_AMD64) +#define MY_CPU_X86_OR_AMD64 +#endif + +#if defined(MY_CPU_X86) || defined(_M_ARM) +#define MY_CPU_32BIT +#endif + +#if defined(_WIN32) && defined(_M_ARM) +#define MY_CPU_ARM_LE +#endif + +#if defined(_WIN32) && defined(_M_IA64) +#define MY_CPU_IA64_LE +#endif + +#if defined(MY_CPU_X86_OR_AMD64) +#define MY_CPU_LE_UNALIGN +#endif + +#if defined(MY_CPU_X86_OR_AMD64) || defined(MY_CPU_ARM_LE) || defined(MY_CPU_IA64_LE) || defined(__ARMEL__) || defined(__MIPSEL__) || defined(__LITTLE_ENDIAN__) +#define MY_CPU_LE +#endif + +#if defined(__BIG_ENDIAN__) +#define MY_CPU_BE +#endif + +#if defined(MY_CPU_LE) && defined(MY_CPU_BE) +Stop_Compiling_Bad_Endian +#endif + +#ifdef MY_CPU_LE_UNALIGN + +#define GetUi16(p) (*(const UInt16 *)(p)) +#define GetUi32(p) (*(const UInt32 *)(p)) +#define GetUi64(p) (*(const UInt64 *)(p)) +#define SetUi16(p, d) *(UInt16 *)(p) = (d); +#define SetUi32(p, d) *(UInt32 *)(p) = (d); +#define SetUi64(p, d) *(UInt64 *)(p) = (d); + +#else + +#define GetUi16(p) (((const Byte *)(p))[0] | ((UInt16)((const Byte *)(p))[1] << 8)) + +#define GetUi32(p) ( \ + ((const Byte *)(p))[0] | \ + ((UInt32)((const Byte *)(p))[1] << 8) | \ + ((UInt32)((const Byte *)(p))[2] << 16) | \ + ((UInt32)((const Byte *)(p))[3] << 24)) + +#define GetUi64(p) (GetUi32(p) | ((UInt64)GetUi32(((const Byte *)(p)) + 4) << 32)) + +#define SetUi16(p, d) { UInt32 _x_ = (d); \ + ((Byte *)(p))[0] = (Byte)_x_; \ + ((Byte *)(p))[1] = (Byte)(_x_ >> 8); } + +#define SetUi32(p, d) { UInt32 _x_ = (d); \ + ((Byte *)(p))[0] = (Byte)_x_; \ + ((Byte *)(p))[1] = (Byte)(_x_ >> 8); \ + ((Byte *)(p))[2] = (Byte)(_x_ >> 16); \ + ((Byte *)(p))[3] = (Byte)(_x_ >> 24); } + +#define SetUi64(p, d) { UInt64 _x64_ = (d); \ + SetUi32(p, (UInt32)_x64_); \ + SetUi32(((Byte *)(p)) + 4, (UInt32)(_x64_ >> 32)); } + +#endif + +#if defined(MY_CPU_LE_UNALIGN) && defined(_WIN64) && (_MSC_VER >= 1300) + +#pragma intrinsic(_byteswap_ulong) +#pragma intrinsic(_byteswap_uint64) +#define GetBe32(p) _byteswap_ulong(*(const UInt32 *)(const Byte *)(p)) +#define GetBe64(p) _byteswap_uint64(*(const UInt64 *)(const Byte *)(p)) + +#else + +#define GetBe32(p) ( \ + ((UInt32)((const Byte *)(p))[0] << 24) | \ + ((UInt32)((const Byte *)(p))[1] << 16) | \ + ((UInt32)((const Byte *)(p))[2] << 8) | \ + ((const Byte *)(p))[3] ) + +#define GetBe64(p) (((UInt64)GetBe32(p) << 32) | GetBe32(((const Byte *)(p)) + 4)) + +#endif + +#define GetBe16(p) (((UInt16)((const Byte *)(p))[0] << 8) | ((const Byte *)(p))[1]) + + +#ifdef MY_CPU_X86_OR_AMD64 + +typedef struct +{ + UInt32 maxFunc; + UInt32 vendor[3]; + UInt32 ver; + UInt32 b; + UInt32 c; + UInt32 d; +} Cx86cpuid; + +enum +{ + CPU_FIRM_INTEL, + CPU_FIRM_AMD, + CPU_FIRM_VIA +}; + +Bool x86cpuid_CheckAndRead(Cx86cpuid *p); +int x86cpuid_GetFirm(const Cx86cpuid *p); + +#define x86cpuid_GetFamily(p) (((p)->ver >> 8) & 0xFF00F) +#define x86cpuid_GetModel(p) (((p)->ver >> 4) & 0xF00F) +#define x86cpuid_GetStepping(p) ((p)->ver & 0xF) + +Bool CPU_Is_InOrder(); +Bool CPU_Is_Aes_Supported(); + +#endif + +EXTERN_C_END + +#endif diff --git a/C/Delta.c b/C/Delta.c new file mode 100644 index 0000000..2b327f1 --- /dev/null +++ b/C/Delta.c @@ -0,0 +1,62 @@ +/* Delta.c -- Delta converter +2009-05-26 : Igor Pavlov : Public domain */ + +#include "Delta.h" + +void Delta_Init(Byte *state) +{ + unsigned i; + for (i = 0; i < DELTA_STATE_SIZE; i++) + state[i] = 0; +} + +static void MyMemCpy(Byte *dest, const Byte *src, unsigned size) +{ + unsigned i; + for (i = 0; i < size; i++) + dest[i] = src[i]; +} + +void Delta_Encode(Byte *state, unsigned delta, Byte *data, SizeT size) +{ + Byte buf[DELTA_STATE_SIZE]; + unsigned j = 0; + MyMemCpy(buf, state, delta); + { + SizeT i; + for (i = 0; i < size;) + { + for (j = 0; j < delta && i < size; i++, j++) + { + Byte b = data[i]; + data[i] = (Byte)(b - buf[j]); + buf[j] = b; + } + } + } + if (j == delta) + j = 0; + MyMemCpy(state, buf + j, delta - j); + MyMemCpy(state + delta - j, buf, j); +} + +void Delta_Decode(Byte *state, unsigned delta, Byte *data, SizeT size) +{ + Byte buf[DELTA_STATE_SIZE]; + unsigned j = 0; + MyMemCpy(buf, state, delta); + { + SizeT i; + for (i = 0; i < size;) + { + for (j = 0; j < delta && i < size; i++, j++) + { + buf[j] = data[i] = (Byte)(buf[j] + data[i]); + } + } + } + if (j == delta) + j = 0; + MyMemCpy(state, buf + j, delta - j); + MyMemCpy(state + delta - j, buf, j); +} diff --git a/C/Delta.h b/C/Delta.h new file mode 100644 index 0000000..0d4cd62 --- /dev/null +++ b/C/Delta.h @@ -0,0 +1,23 @@ +/* Delta.h -- Delta converter +2009-04-15 : Igor Pavlov : Public domain */ + +#ifndef __DELTA_H +#define __DELTA_H + +#include "Types.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#define DELTA_STATE_SIZE 256 + +void Delta_Init(Byte *state); +void Delta_Encode(Byte *state, unsigned delta, Byte *data, SizeT size); +void Delta_Decode(Byte *state, unsigned delta, Byte *data, SizeT size); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/C/HuffEnc.c b/C/HuffEnc.c new file mode 100644 index 0000000..561c7e5 --- /dev/null +++ b/C/HuffEnc.c @@ -0,0 +1,146 @@ +/* HuffEnc.c -- functions for Huffman encoding +2009-09-02 : Igor Pavlov : Public domain */ + +#include "HuffEnc.h" +#include "Sort.h" + +#define kMaxLen 16 +#define NUM_BITS 10 +#define MASK ((1 << NUM_BITS) - 1) + +#define NUM_COUNTERS 64 + +#define HUFFMAN_SPEED_OPT + +void Huffman_Generate(const UInt32 *freqs, UInt32 *p, Byte *lens, UInt32 numSymbols, UInt32 maxLen) +{ + UInt32 num = 0; + /* if (maxLen > 10) maxLen = 10; */ + { + UInt32 i; + + #ifdef HUFFMAN_SPEED_OPT + + UInt32 counters[NUM_COUNTERS]; + for (i = 0; i < NUM_COUNTERS; i++) + counters[i] = 0; + for (i = 0; i < numSymbols; i++) + { + UInt32 freq = freqs[i]; + counters[(freq < NUM_COUNTERS - 1) ? freq : NUM_COUNTERS - 1]++; + } + + for (i = 1; i < NUM_COUNTERS; i++) + { + UInt32 temp = counters[i]; + counters[i] = num; + num += temp; + } + + for (i = 0; i < numSymbols; i++) + { + UInt32 freq = freqs[i]; + if (freq == 0) + lens[i] = 0; + else + p[counters[((freq < NUM_COUNTERS - 1) ? freq : NUM_COUNTERS - 1)]++] = i | (freq << NUM_BITS); + } + counters[0] = 0; + HeapSort(p + counters[NUM_COUNTERS - 2], counters[NUM_COUNTERS - 1] - counters[NUM_COUNTERS - 2]); + + #else + + for (i = 0; i < numSymbols; i++) + { + UInt32 freq = freqs[i]; + if (freq == 0) + lens[i] = 0; + else + p[num++] = i | (freq << NUM_BITS); + } + HeapSort(p, num); + + #endif + } + + if (num < 2) + { + unsigned minCode = 0; + unsigned maxCode = 1; + if (num == 1) + { + maxCode = (unsigned)p[0] & MASK; + if (maxCode == 0) + maxCode++; + } + p[minCode] = 0; + p[maxCode] = 1; + lens[minCode] = lens[maxCode] = 1; + return; + } + + { + UInt32 b, e, i; + + i = b = e = 0; + do + { + UInt32 n, m, freq; + n = (i != num && (b == e || (p[i] >> NUM_BITS) <= (p[b] >> NUM_BITS))) ? i++ : b++; + freq = (p[n] & ~MASK); + p[n] = (p[n] & MASK) | (e << NUM_BITS); + m = (i != num && (b == e || (p[i] >> NUM_BITS) <= (p[b] >> NUM_BITS))) ? i++ : b++; + freq += (p[m] & ~MASK); + p[m] = (p[m] & MASK) | (e << NUM_BITS); + p[e] = (p[e] & MASK) | freq; + e++; + } + while (num - e > 1); + + { + UInt32 lenCounters[kMaxLen + 1]; + for (i = 0; i <= kMaxLen; i++) + lenCounters[i] = 0; + + p[--e] &= MASK; + lenCounters[1] = 2; + while (e > 0) + { + UInt32 len = (p[p[--e] >> NUM_BITS] >> NUM_BITS) + 1; + p[e] = (p[e] & MASK) | (len << NUM_BITS); + if (len >= maxLen) + for (len = maxLen - 1; lenCounters[len] == 0; len--); + lenCounters[len]--; + lenCounters[len + 1] += 2; + } + + { + UInt32 len; + i = 0; + for (len = maxLen; len != 0; len--) + { + UInt32 num; + for (num = lenCounters[len]; num != 0; num--) + lens[p[i++] & MASK] = (Byte)len; + } + } + + { + UInt32 nextCodes[kMaxLen + 1]; + { + UInt32 code = 0; + UInt32 len; + for (len = 1; len <= kMaxLen; len++) + nextCodes[len] = code = (code + lenCounters[len - 1]) << 1; + } + /* if (code + lenCounters[kMaxLen] - 1 != (1 << kMaxLen) - 1) throw 1; */ + + { + UInt32 i; + for (i = 0; i < numSymbols; i++) + p[i] = nextCodes[lens[i]]++; + } + } + } + } +} diff --git a/C/HuffEnc.h b/C/HuffEnc.h new file mode 100644 index 0000000..9cf4bfd --- /dev/null +++ b/C/HuffEnc.h @@ -0,0 +1,27 @@ +/* HuffEnc.h -- Huffman encoding +2009-02-07 : Igor Pavlov : Public domain */ + +#ifndef __HUFF_ENC_H +#define __HUFF_ENC_H + +#include "Types.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* +Conditions: + num <= 1024 = 2 ^ NUM_BITS + Sum(freqs) < 4M = 2 ^ (32 - NUM_BITS) + maxLen <= 16 = kMaxLen + Num_Items(p) >= HUFFMAN_TEMP_SIZE(num) +*/ + +void Huffman_Generate(const UInt32 *freqs, UInt32 *p, Byte *lens, UInt32 num, UInt32 maxLen); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/C/LzFind.c b/C/LzFind.c new file mode 100644 index 0000000..e3ecb05 --- /dev/null +++ b/C/LzFind.c @@ -0,0 +1,761 @@ +/* LzFind.c -- Match finder for LZ algorithms +2009-04-22 : Igor Pavlov : Public domain */ + +#include + +#include "LzFind.h" +#include "LzHash.h" + +#define kEmptyHashValue 0 +#define kMaxValForNormalize ((UInt32)0xFFFFFFFF) +#define kNormalizeStepMin (1 << 10) /* it must be power of 2 */ +#define kNormalizeMask (~(kNormalizeStepMin - 1)) +#define kMaxHistorySize ((UInt32)3 << 30) + +#define kStartMaxLen 3 + +static void LzInWindow_Free(CMatchFinder *p, ISzAlloc *alloc) +{ + if (!p->directInput) + { + alloc->Free(alloc, p->bufferBase); + p->bufferBase = 0; + } +} + +/* keepSizeBefore + keepSizeAfter + keepSizeReserv must be < 4G) */ + +static int LzInWindow_Create(CMatchFinder *p, UInt32 keepSizeReserv, ISzAlloc *alloc) +{ + UInt32 blockSize = p->keepSizeBefore + p->keepSizeAfter + keepSizeReserv; + if (p->directInput) + { + p->blockSize = blockSize; + return 1; + } + if (p->bufferBase == 0 || p->blockSize != blockSize) + { + LzInWindow_Free(p, alloc); + p->blockSize = blockSize; + p->bufferBase = (Byte *)alloc->Alloc(alloc, (size_t)blockSize); + } + return (p->bufferBase != 0); +} + +Byte *MatchFinder_GetPointerToCurrentPos(CMatchFinder *p) { return p->buffer; } +Byte MatchFinder_GetIndexByte(CMatchFinder *p, Int32 index) { return p->buffer[index]; } + +UInt32 MatchFinder_GetNumAvailableBytes(CMatchFinder *p) { return p->streamPos - p->pos; } + +void MatchFinder_ReduceOffsets(CMatchFinder *p, UInt32 subValue) +{ + p->posLimit -= subValue; + p->pos -= subValue; + p->streamPos -= subValue; +} + +static void MatchFinder_ReadBlock(CMatchFinder *p) +{ + if (p->streamEndWasReached || p->result != SZ_OK) + return; + if (p->directInput) + { + UInt32 curSize = 0xFFFFFFFF - p->streamPos; + if (curSize > p->directInputRem) + curSize = (UInt32)p->directInputRem; + p->directInputRem -= curSize; + p->streamPos += curSize; + if (p->directInputRem == 0) + p->streamEndWasReached = 1; + return; + } + for (;;) + { + Byte *dest = p->buffer + (p->streamPos - p->pos); + size_t size = (p->bufferBase + p->blockSize - dest); + if (size == 0) + return; + p->result = p->stream->Read(p->stream, dest, &size); + if (p->result != SZ_OK) + return; + if (size == 0) + { + p->streamEndWasReached = 1; + return; + } + p->streamPos += (UInt32)size; + if (p->streamPos - p->pos > p->keepSizeAfter) + return; + } +} + +void MatchFinder_MoveBlock(CMatchFinder *p) +{ + memmove(p->bufferBase, + p->buffer - p->keepSizeBefore, + (size_t)(p->streamPos - p->pos + p->keepSizeBefore)); + p->buffer = p->bufferBase + p->keepSizeBefore; +} + +int MatchFinder_NeedMove(CMatchFinder *p) +{ + if (p->directInput) + return 0; + /* if (p->streamEndWasReached) return 0; */ + return ((size_t)(p->bufferBase + p->blockSize - p->buffer) <= p->keepSizeAfter); +} + +void MatchFinder_ReadIfRequired(CMatchFinder *p) +{ + if (p->streamEndWasReached) + return; + if (p->keepSizeAfter >= p->streamPos - p->pos) + MatchFinder_ReadBlock(p); +} + +static void MatchFinder_CheckAndMoveAndRead(CMatchFinder *p) +{ + if (MatchFinder_NeedMove(p)) + MatchFinder_MoveBlock(p); + MatchFinder_ReadBlock(p); +} + +static void MatchFinder_SetDefaultSettings(CMatchFinder *p) +{ + p->cutValue = 32; + p->btMode = 1; + p->numHashBytes = 4; + p->bigHash = 0; +} + +#define kCrcPoly 0xEDB88320 + +void MatchFinder_Construct(CMatchFinder *p) +{ + UInt32 i; + p->bufferBase = 0; + p->directInput = 0; + p->hash = 0; + MatchFinder_SetDefaultSettings(p); + + for (i = 0; i < 256; i++) + { + UInt32 r = i; + int j; + for (j = 0; j < 8; j++) + r = (r >> 1) ^ (kCrcPoly & ~((r & 1) - 1)); + p->crc[i] = r; + } +} + +static void MatchFinder_FreeThisClassMemory(CMatchFinder *p, ISzAlloc *alloc) +{ + alloc->Free(alloc, p->hash); + p->hash = 0; +} + +void MatchFinder_Free(CMatchFinder *p, ISzAlloc *alloc) +{ + MatchFinder_FreeThisClassMemory(p, alloc); + LzInWindow_Free(p, alloc); +} + +static CLzRef* AllocRefs(UInt32 num, ISzAlloc *alloc) +{ + size_t sizeInBytes = (size_t)num * sizeof(CLzRef); + if (sizeInBytes / sizeof(CLzRef) != num) + return 0; + return (CLzRef *)alloc->Alloc(alloc, sizeInBytes); +} + +int MatchFinder_Create(CMatchFinder *p, UInt32 historySize, + UInt32 keepAddBufferBefore, UInt32 matchMaxLen, UInt32 keepAddBufferAfter, + ISzAlloc *alloc) +{ + UInt32 sizeReserv; + if (historySize > kMaxHistorySize) + { + MatchFinder_Free(p, alloc); + return 0; + } + sizeReserv = historySize >> 1; + if (historySize > ((UInt32)2 << 30)) + sizeReserv = historySize >> 2; + sizeReserv += (keepAddBufferBefore + matchMaxLen + keepAddBufferAfter) / 2 + (1 << 19); + + p->keepSizeBefore = historySize + keepAddBufferBefore + 1; + p->keepSizeAfter = matchMaxLen + keepAddBufferAfter; + /* we need one additional byte, since we use MoveBlock after pos++ and before dictionary using */ + if (LzInWindow_Create(p, sizeReserv, alloc)) + { + UInt32 newCyclicBufferSize = historySize + 1; + UInt32 hs; + p->matchMaxLen = matchMaxLen; + { + p->fixedHashSize = 0; + if (p->numHashBytes == 2) + hs = (1 << 16) - 1; + else + { + hs = historySize - 1; + hs |= (hs >> 1); + hs |= (hs >> 2); + hs |= (hs >> 4); + hs |= (hs >> 8); + hs >>= 1; + hs |= 0xFFFF; /* don't change it! It's required for Deflate */ + if (hs > (1 << 24)) + { + if (p->numHashBytes == 3) + hs = (1 << 24) - 1; + else + hs >>= 1; + } + } + p->hashMask = hs; + hs++; + if (p->numHashBytes > 2) p->fixedHashSize += kHash2Size; + if (p->numHashBytes > 3) p->fixedHashSize += kHash3Size; + if (p->numHashBytes > 4) p->fixedHashSize += kHash4Size; + hs += p->fixedHashSize; + } + + { + UInt32 prevSize = p->hashSizeSum + p->numSons; + UInt32 newSize; + p->historySize = historySize; + p->hashSizeSum = hs; + p->cyclicBufferSize = newCyclicBufferSize; + p->numSons = (p->btMode ? newCyclicBufferSize * 2 : newCyclicBufferSize); + newSize = p->hashSizeSum + p->numSons; + if (p->hash != 0 && prevSize == newSize) + return 1; + MatchFinder_FreeThisClassMemory(p, alloc); + p->hash = AllocRefs(newSize, alloc); + if (p->hash != 0) + { + p->son = p->hash + p->hashSizeSum; + return 1; + } + } + } + MatchFinder_Free(p, alloc); + return 0; +} + +static void MatchFinder_SetLimits(CMatchFinder *p) +{ + UInt32 limit = kMaxValForNormalize - p->pos; + UInt32 limit2 = p->cyclicBufferSize - p->cyclicBufferPos; + if (limit2 < limit) + limit = limit2; + limit2 = p->streamPos - p->pos; + if (limit2 <= p->keepSizeAfter) + { + if (limit2 > 0) + limit2 = 1; + } + else + limit2 -= p->keepSizeAfter; + if (limit2 < limit) + limit = limit2; + { + UInt32 lenLimit = p->streamPos - p->pos; + if (lenLimit > p->matchMaxLen) + lenLimit = p->matchMaxLen; + p->lenLimit = lenLimit; + } + p->posLimit = p->pos + limit; +} + +void MatchFinder_Init(CMatchFinder *p) +{ + UInt32 i; + for (i = 0; i < p->hashSizeSum; i++) + p->hash[i] = kEmptyHashValue; + p->cyclicBufferPos = 0; + p->buffer = p->bufferBase; + p->pos = p->streamPos = p->cyclicBufferSize; + p->result = SZ_OK; + p->streamEndWasReached = 0; + MatchFinder_ReadBlock(p); + MatchFinder_SetLimits(p); +} + +static UInt32 MatchFinder_GetSubValue(CMatchFinder *p) +{ + return (p->pos - p->historySize - 1) & kNormalizeMask; +} + +void MatchFinder_Normalize3(UInt32 subValue, CLzRef *items, UInt32 numItems) +{ + UInt32 i; + for (i = 0; i < numItems; i++) + { + UInt32 value = items[i]; + if (value <= subValue) + value = kEmptyHashValue; + else + value -= subValue; + items[i] = value; + } +} + +static void MatchFinder_Normalize(CMatchFinder *p) +{ + UInt32 subValue = MatchFinder_GetSubValue(p); + MatchFinder_Normalize3(subValue, p->hash, p->hashSizeSum + p->numSons); + MatchFinder_ReduceOffsets(p, subValue); +} + +static void MatchFinder_CheckLimits(CMatchFinder *p) +{ + if (p->pos == kMaxValForNormalize) + MatchFinder_Normalize(p); + if (!p->streamEndWasReached && p->keepSizeAfter == p->streamPos - p->pos) + MatchFinder_CheckAndMoveAndRead(p); + if (p->cyclicBufferPos == p->cyclicBufferSize) + p->cyclicBufferPos = 0; + MatchFinder_SetLimits(p); +} + +static UInt32 * Hc_GetMatchesSpec(UInt32 lenLimit, UInt32 curMatch, UInt32 pos, const Byte *cur, CLzRef *son, + UInt32 _cyclicBufferPos, UInt32 _cyclicBufferSize, UInt32 cutValue, + UInt32 *distances, UInt32 maxLen) +{ + son[_cyclicBufferPos] = curMatch; + for (;;) + { + UInt32 delta = pos - curMatch; + if (cutValue-- == 0 || delta >= _cyclicBufferSize) + return distances; + { + const Byte *pb = cur - delta; + curMatch = son[_cyclicBufferPos - delta + ((delta > _cyclicBufferPos) ? _cyclicBufferSize : 0)]; + if (pb[maxLen] == cur[maxLen] && *pb == *cur) + { + UInt32 len = 0; + while (++len != lenLimit) + if (pb[len] != cur[len]) + break; + if (maxLen < len) + { + *distances++ = maxLen = len; + *distances++ = delta - 1; + if (len == lenLimit) + return distances; + } + } + } + } +} + +UInt32 * GetMatchesSpec1(UInt32 lenLimit, UInt32 curMatch, UInt32 pos, const Byte *cur, CLzRef *son, + UInt32 _cyclicBufferPos, UInt32 _cyclicBufferSize, UInt32 cutValue, + UInt32 *distances, UInt32 maxLen) +{ + CLzRef *ptr0 = son + (_cyclicBufferPos << 1) + 1; + CLzRef *ptr1 = son + (_cyclicBufferPos << 1); + UInt32 len0 = 0, len1 = 0; + for (;;) + { + UInt32 delta = pos - curMatch; + if (cutValue-- == 0 || delta >= _cyclicBufferSize) + { + *ptr0 = *ptr1 = kEmptyHashValue; + return distances; + } + { + CLzRef *pair = son + ((_cyclicBufferPos - delta + ((delta > _cyclicBufferPos) ? _cyclicBufferSize : 0)) << 1); + const Byte *pb = cur - delta; + UInt32 len = (len0 < len1 ? len0 : len1); + if (pb[len] == cur[len]) + { + if (++len != lenLimit && pb[len] == cur[len]) + while (++len != lenLimit) + if (pb[len] != cur[len]) + break; + if (maxLen < len) + { + *distances++ = maxLen = len; + *distances++ = delta - 1; + if (len == lenLimit) + { + *ptr1 = pair[0]; + *ptr0 = pair[1]; + return distances; + } + } + } + if (pb[len] < cur[len]) + { + *ptr1 = curMatch; + ptr1 = pair + 1; + curMatch = *ptr1; + len1 = len; + } + else + { + *ptr0 = curMatch; + ptr0 = pair; + curMatch = *ptr0; + len0 = len; + } + } + } +} + +static void SkipMatchesSpec(UInt32 lenLimit, UInt32 curMatch, UInt32 pos, const Byte *cur, CLzRef *son, + UInt32 _cyclicBufferPos, UInt32 _cyclicBufferSize, UInt32 cutValue) +{ + CLzRef *ptr0 = son + (_cyclicBufferPos << 1) + 1; + CLzRef *ptr1 = son + (_cyclicBufferPos << 1); + UInt32 len0 = 0, len1 = 0; + for (;;) + { + UInt32 delta = pos - curMatch; + if (cutValue-- == 0 || delta >= _cyclicBufferSize) + { + *ptr0 = *ptr1 = kEmptyHashValue; + return; + } + { + CLzRef *pair = son + ((_cyclicBufferPos - delta + ((delta > _cyclicBufferPos) ? _cyclicBufferSize : 0)) << 1); + const Byte *pb = cur - delta; + UInt32 len = (len0 < len1 ? len0 : len1); + if (pb[len] == cur[len]) + { + while (++len != lenLimit) + if (pb[len] != cur[len]) + break; + { + if (len == lenLimit) + { + *ptr1 = pair[0]; + *ptr0 = pair[1]; + return; + } + } + } + if (pb[len] < cur[len]) + { + *ptr1 = curMatch; + ptr1 = pair + 1; + curMatch = *ptr1; + len1 = len; + } + else + { + *ptr0 = curMatch; + ptr0 = pair; + curMatch = *ptr0; + len0 = len; + } + } + } +} + +#define MOVE_POS \ + ++p->cyclicBufferPos; \ + p->buffer++; \ + if (++p->pos == p->posLimit) MatchFinder_CheckLimits(p); + +#define MOVE_POS_RET MOVE_POS return offset; + +static void MatchFinder_MovePos(CMatchFinder *p) { MOVE_POS; } + +#define GET_MATCHES_HEADER2(minLen, ret_op) \ + UInt32 lenLimit; UInt32 hashValue; const Byte *cur; UInt32 curMatch; \ + lenLimit = p->lenLimit; { if (lenLimit < minLen) { MatchFinder_MovePos(p); ret_op; }} \ + cur = p->buffer; + +#define GET_MATCHES_HEADER(minLen) GET_MATCHES_HEADER2(minLen, return 0) +#define SKIP_HEADER(minLen) GET_MATCHES_HEADER2(minLen, continue) + +#define MF_PARAMS(p) p->pos, p->buffer, p->son, p->cyclicBufferPos, p->cyclicBufferSize, p->cutValue + +#define GET_MATCHES_FOOTER(offset, maxLen) \ + offset = (UInt32)(GetMatchesSpec1(lenLimit, curMatch, MF_PARAMS(p), \ + distances + offset, maxLen) - distances); MOVE_POS_RET; + +#define SKIP_FOOTER \ + SkipMatchesSpec(lenLimit, curMatch, MF_PARAMS(p)); MOVE_POS; + +static UInt32 Bt2_MatchFinder_GetMatches(CMatchFinder *p, UInt32 *distances) +{ + UInt32 offset; + GET_MATCHES_HEADER(2) + HASH2_CALC; + curMatch = p->hash[hashValue]; + p->hash[hashValue] = p->pos; + offset = 0; + GET_MATCHES_FOOTER(offset, 1) +} + +UInt32 Bt3Zip_MatchFinder_GetMatches(CMatchFinder *p, UInt32 *distances) +{ + UInt32 offset; + GET_MATCHES_HEADER(3) + HASH_ZIP_CALC; + curMatch = p->hash[hashValue]; + p->hash[hashValue] = p->pos; + offset = 0; + GET_MATCHES_FOOTER(offset, 2) +} + +static UInt32 Bt3_MatchFinder_GetMatches(CMatchFinder *p, UInt32 *distances) +{ + UInt32 hash2Value, delta2, maxLen, offset; + GET_MATCHES_HEADER(3) + + HASH3_CALC; + + delta2 = p->pos - p->hash[hash2Value]; + curMatch = p->hash[kFix3HashSize + hashValue]; + + p->hash[hash2Value] = + p->hash[kFix3HashSize + hashValue] = p->pos; + + + maxLen = 2; + offset = 0; + if (delta2 < p->cyclicBufferSize && *(cur - delta2) == *cur) + { + for (; maxLen != lenLimit; maxLen++) + if (cur[(ptrdiff_t)maxLen - delta2] != cur[maxLen]) + break; + distances[0] = maxLen; + distances[1] = delta2 - 1; + offset = 2; + if (maxLen == lenLimit) + { + SkipMatchesSpec(lenLimit, curMatch, MF_PARAMS(p)); + MOVE_POS_RET; + } + } + GET_MATCHES_FOOTER(offset, maxLen) +} + +static UInt32 Bt4_MatchFinder_GetMatches(CMatchFinder *p, UInt32 *distances) +{ + UInt32 hash2Value, hash3Value, delta2, delta3, maxLen, offset; + GET_MATCHES_HEADER(4) + + HASH4_CALC; + + delta2 = p->pos - p->hash[ hash2Value]; + delta3 = p->pos - p->hash[kFix3HashSize + hash3Value]; + curMatch = p->hash[kFix4HashSize + hashValue]; + + p->hash[ hash2Value] = + p->hash[kFix3HashSize + hash3Value] = + p->hash[kFix4HashSize + hashValue] = p->pos; + + maxLen = 1; + offset = 0; + if (delta2 < p->cyclicBufferSize && *(cur - delta2) == *cur) + { + distances[0] = maxLen = 2; + distances[1] = delta2 - 1; + offset = 2; + } + if (delta2 != delta3 && delta3 < p->cyclicBufferSize && *(cur - delta3) == *cur) + { + maxLen = 3; + distances[offset + 1] = delta3 - 1; + offset += 2; + delta2 = delta3; + } + if (offset != 0) + { + for (; maxLen != lenLimit; maxLen++) + if (cur[(ptrdiff_t)maxLen - delta2] != cur[maxLen]) + break; + distances[offset - 2] = maxLen; + if (maxLen == lenLimit) + { + SkipMatchesSpec(lenLimit, curMatch, MF_PARAMS(p)); + MOVE_POS_RET; + } + } + if (maxLen < 3) + maxLen = 3; + GET_MATCHES_FOOTER(offset, maxLen) +} + +static UInt32 Hc4_MatchFinder_GetMatches(CMatchFinder *p, UInt32 *distances) +{ + UInt32 hash2Value, hash3Value, delta2, delta3, maxLen, offset; + GET_MATCHES_HEADER(4) + + HASH4_CALC; + + delta2 = p->pos - p->hash[ hash2Value]; + delta3 = p->pos - p->hash[kFix3HashSize + hash3Value]; + curMatch = p->hash[kFix4HashSize + hashValue]; + + p->hash[ hash2Value] = + p->hash[kFix3HashSize + hash3Value] = + p->hash[kFix4HashSize + hashValue] = p->pos; + + maxLen = 1; + offset = 0; + if (delta2 < p->cyclicBufferSize && *(cur - delta2) == *cur) + { + distances[0] = maxLen = 2; + distances[1] = delta2 - 1; + offset = 2; + } + if (delta2 != delta3 && delta3 < p->cyclicBufferSize && *(cur - delta3) == *cur) + { + maxLen = 3; + distances[offset + 1] = delta3 - 1; + offset += 2; + delta2 = delta3; + } + if (offset != 0) + { + for (; maxLen != lenLimit; maxLen++) + if (cur[(ptrdiff_t)maxLen - delta2] != cur[maxLen]) + break; + distances[offset - 2] = maxLen; + if (maxLen == lenLimit) + { + p->son[p->cyclicBufferPos] = curMatch; + MOVE_POS_RET; + } + } + if (maxLen < 3) + maxLen = 3; + offset = (UInt32)(Hc_GetMatchesSpec(lenLimit, curMatch, MF_PARAMS(p), + distances + offset, maxLen) - (distances)); + MOVE_POS_RET +} + +UInt32 Hc3Zip_MatchFinder_GetMatches(CMatchFinder *p, UInt32 *distances) +{ + UInt32 offset; + GET_MATCHES_HEADER(3) + HASH_ZIP_CALC; + curMatch = p->hash[hashValue]; + p->hash[hashValue] = p->pos; + offset = (UInt32)(Hc_GetMatchesSpec(lenLimit, curMatch, MF_PARAMS(p), + distances, 2) - (distances)); + MOVE_POS_RET +} + +static void Bt2_MatchFinder_Skip(CMatchFinder *p, UInt32 num) +{ + do + { + SKIP_HEADER(2) + HASH2_CALC; + curMatch = p->hash[hashValue]; + p->hash[hashValue] = p->pos; + SKIP_FOOTER + } + while (--num != 0); +} + +void Bt3Zip_MatchFinder_Skip(CMatchFinder *p, UInt32 num) +{ + do + { + SKIP_HEADER(3) + HASH_ZIP_CALC; + curMatch = p->hash[hashValue]; + p->hash[hashValue] = p->pos; + SKIP_FOOTER + } + while (--num != 0); +} + +static void Bt3_MatchFinder_Skip(CMatchFinder *p, UInt32 num) +{ + do + { + UInt32 hash2Value; + SKIP_HEADER(3) + HASH3_CALC; + curMatch = p->hash[kFix3HashSize + hashValue]; + p->hash[hash2Value] = + p->hash[kFix3HashSize + hashValue] = p->pos; + SKIP_FOOTER + } + while (--num != 0); +} + +static void Bt4_MatchFinder_Skip(CMatchFinder *p, UInt32 num) +{ + do + { + UInt32 hash2Value, hash3Value; + SKIP_HEADER(4) + HASH4_CALC; + curMatch = p->hash[kFix4HashSize + hashValue]; + p->hash[ hash2Value] = + p->hash[kFix3HashSize + hash3Value] = p->pos; + p->hash[kFix4HashSize + hashValue] = p->pos; + SKIP_FOOTER + } + while (--num != 0); +} + +static void Hc4_MatchFinder_Skip(CMatchFinder *p, UInt32 num) +{ + do + { + UInt32 hash2Value, hash3Value; + SKIP_HEADER(4) + HASH4_CALC; + curMatch = p->hash[kFix4HashSize + hashValue]; + p->hash[ hash2Value] = + p->hash[kFix3HashSize + hash3Value] = + p->hash[kFix4HashSize + hashValue] = p->pos; + p->son[p->cyclicBufferPos] = curMatch; + MOVE_POS + } + while (--num != 0); +} + +void Hc3Zip_MatchFinder_Skip(CMatchFinder *p, UInt32 num) +{ + do + { + SKIP_HEADER(3) + HASH_ZIP_CALC; + curMatch = p->hash[hashValue]; + p->hash[hashValue] = p->pos; + p->son[p->cyclicBufferPos] = curMatch; + MOVE_POS + } + while (--num != 0); +} + +void MatchFinder_CreateVTable(CMatchFinder *p, IMatchFinder *vTable) +{ + vTable->Init = (Mf_Init_Func)MatchFinder_Init; + vTable->GetIndexByte = (Mf_GetIndexByte_Func)MatchFinder_GetIndexByte; + vTable->GetNumAvailableBytes = (Mf_GetNumAvailableBytes_Func)MatchFinder_GetNumAvailableBytes; + vTable->GetPointerToCurrentPos = (Mf_GetPointerToCurrentPos_Func)MatchFinder_GetPointerToCurrentPos; + if (!p->btMode) + { + vTable->GetMatches = (Mf_GetMatches_Func)Hc4_MatchFinder_GetMatches; + vTable->Skip = (Mf_Skip_Func)Hc4_MatchFinder_Skip; + } + else if (p->numHashBytes == 2) + { + vTable->GetMatches = (Mf_GetMatches_Func)Bt2_MatchFinder_GetMatches; + vTable->Skip = (Mf_Skip_Func)Bt2_MatchFinder_Skip; + } + else if (p->numHashBytes == 3) + { + vTable->GetMatches = (Mf_GetMatches_Func)Bt3_MatchFinder_GetMatches; + vTable->Skip = (Mf_Skip_Func)Bt3_MatchFinder_Skip; + } + else + { + vTable->GetMatches = (Mf_GetMatches_Func)Bt4_MatchFinder_GetMatches; + vTable->Skip = (Mf_Skip_Func)Bt4_MatchFinder_Skip; + } +} diff --git a/C/LzFind.h b/C/LzFind.h new file mode 100644 index 0000000..010c4b9 --- /dev/null +++ b/C/LzFind.h @@ -0,0 +1,115 @@ +/* LzFind.h -- Match finder for LZ algorithms +2009-04-22 : Igor Pavlov : Public domain */ + +#ifndef __LZ_FIND_H +#define __LZ_FIND_H + +#include "Types.h" + +#ifdef __cplusplus +extern "C" { +#endif + +typedef UInt32 CLzRef; + +typedef struct _CMatchFinder +{ + Byte *buffer; + UInt32 pos; + UInt32 posLimit; + UInt32 streamPos; + UInt32 lenLimit; + + UInt32 cyclicBufferPos; + UInt32 cyclicBufferSize; /* it must be = (historySize + 1) */ + + UInt32 matchMaxLen; + CLzRef *hash; + CLzRef *son; + UInt32 hashMask; + UInt32 cutValue; + + Byte *bufferBase; + ISeqInStream *stream; + int streamEndWasReached; + + UInt32 blockSize; + UInt32 keepSizeBefore; + UInt32 keepSizeAfter; + + UInt32 numHashBytes; + int directInput; + size_t directInputRem; + int btMode; + int bigHash; + UInt32 historySize; + UInt32 fixedHashSize; + UInt32 hashSizeSum; + UInt32 numSons; + SRes result; + UInt32 crc[256]; +} CMatchFinder; + +#define Inline_MatchFinder_GetPointerToCurrentPos(p) ((p)->buffer) +#define Inline_MatchFinder_GetIndexByte(p, index) ((p)->buffer[(Int32)(index)]) + +#define Inline_MatchFinder_GetNumAvailableBytes(p) ((p)->streamPos - (p)->pos) + +int MatchFinder_NeedMove(CMatchFinder *p); +Byte *MatchFinder_GetPointerToCurrentPos(CMatchFinder *p); +void MatchFinder_MoveBlock(CMatchFinder *p); +void MatchFinder_ReadIfRequired(CMatchFinder *p); + +void MatchFinder_Construct(CMatchFinder *p); + +/* Conditions: + historySize <= 3 GB + keepAddBufferBefore + matchMaxLen + keepAddBufferAfter < 511MB +*/ +int MatchFinder_Create(CMatchFinder *p, UInt32 historySize, + UInt32 keepAddBufferBefore, UInt32 matchMaxLen, UInt32 keepAddBufferAfter, + ISzAlloc *alloc); +void MatchFinder_Free(CMatchFinder *p, ISzAlloc *alloc); +void MatchFinder_Normalize3(UInt32 subValue, CLzRef *items, UInt32 numItems); +void MatchFinder_ReduceOffsets(CMatchFinder *p, UInt32 subValue); + +UInt32 * GetMatchesSpec1(UInt32 lenLimit, UInt32 curMatch, UInt32 pos, const Byte *buffer, CLzRef *son, + UInt32 _cyclicBufferPos, UInt32 _cyclicBufferSize, UInt32 _cutValue, + UInt32 *distances, UInt32 maxLen); + +/* +Conditions: + Mf_GetNumAvailableBytes_Func must be called before each Mf_GetMatchLen_Func. + Mf_GetPointerToCurrentPos_Func's result must be used only before any other function +*/ + +typedef void (*Mf_Init_Func)(void *object); +typedef Byte (*Mf_GetIndexByte_Func)(void *object, Int32 index); +typedef UInt32 (*Mf_GetNumAvailableBytes_Func)(void *object); +typedef const Byte * (*Mf_GetPointerToCurrentPos_Func)(void *object); +typedef UInt32 (*Mf_GetMatches_Func)(void *object, UInt32 *distances); +typedef void (*Mf_Skip_Func)(void *object, UInt32); + +typedef struct _IMatchFinder +{ + Mf_Init_Func Init; + Mf_GetIndexByte_Func GetIndexByte; + Mf_GetNumAvailableBytes_Func GetNumAvailableBytes; + Mf_GetPointerToCurrentPos_Func GetPointerToCurrentPos; + Mf_GetMatches_Func GetMatches; + Mf_Skip_Func Skip; +} IMatchFinder; + +void MatchFinder_CreateVTable(CMatchFinder *p, IMatchFinder *vTable); + +void MatchFinder_Init(CMatchFinder *p); +UInt32 Bt3Zip_MatchFinder_GetMatches(CMatchFinder *p, UInt32 *distances); +UInt32 Hc3Zip_MatchFinder_GetMatches(CMatchFinder *p, UInt32 *distances); +void Bt3Zip_MatchFinder_Skip(CMatchFinder *p, UInt32 num); +void Hc3Zip_MatchFinder_Skip(CMatchFinder *p, UInt32 num); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/C/LzFindMt.c b/C/LzFindMt.c new file mode 100644 index 0000000..aa41ed9 --- /dev/null +++ b/C/LzFindMt.c @@ -0,0 +1,793 @@ +/* LzFindMt.c -- multithreaded Match finder for LZ algorithms +2009-09-20 : Igor Pavlov : Public domain */ + +#include "LzHash.h" + +#include "LzFindMt.h" + +void MtSync_Construct(CMtSync *p) +{ + p->wasCreated = False; + p->csWasInitialized = False; + p->csWasEntered = False; + Thread_Construct(&p->thread); + Event_Construct(&p->canStart); + Event_Construct(&p->wasStarted); + Event_Construct(&p->wasStopped); + Semaphore_Construct(&p->freeSemaphore); + Semaphore_Construct(&p->filledSemaphore); +} + +void MtSync_GetNextBlock(CMtSync *p) +{ + if (p->needStart) + { + p->numProcessedBlocks = 1; + p->needStart = False; + p->stopWriting = False; + p->exit = False; + Event_Reset(&p->wasStarted); + Event_Reset(&p->wasStopped); + + Event_Set(&p->canStart); + Event_Wait(&p->wasStarted); + } + else + { + CriticalSection_Leave(&p->cs); + p->csWasEntered = False; + p->numProcessedBlocks++; + Semaphore_Release1(&p->freeSemaphore); + } + Semaphore_Wait(&p->filledSemaphore); + CriticalSection_Enter(&p->cs); + p->csWasEntered = True; +} + +/* MtSync_StopWriting must be called if Writing was started */ + +void MtSync_StopWriting(CMtSync *p) +{ + UInt32 myNumBlocks = p->numProcessedBlocks; + if (!Thread_WasCreated(&p->thread) || p->needStart) + return; + p->stopWriting = True; + if (p->csWasEntered) + { + CriticalSection_Leave(&p->cs); + p->csWasEntered = False; + } + Semaphore_Release1(&p->freeSemaphore); + + Event_Wait(&p->wasStopped); + + while (myNumBlocks++ != p->numProcessedBlocks) + { + Semaphore_Wait(&p->filledSemaphore); + Semaphore_Release1(&p->freeSemaphore); + } + p->needStart = True; +} + +void MtSync_Destruct(CMtSync *p) +{ + if (Thread_WasCreated(&p->thread)) + { + MtSync_StopWriting(p); + p->exit = True; + if (p->needStart) + Event_Set(&p->canStart); + Thread_Wait(&p->thread); + Thread_Close(&p->thread); + } + if (p->csWasInitialized) + { + CriticalSection_Delete(&p->cs); + p->csWasInitialized = False; + } + + Event_Close(&p->canStart); + Event_Close(&p->wasStarted); + Event_Close(&p->wasStopped); + Semaphore_Close(&p->freeSemaphore); + Semaphore_Close(&p->filledSemaphore); + + p->wasCreated = False; +} + +#define RINOK_THREAD(x) { if ((x) != 0) return SZ_ERROR_THREAD; } + +static SRes MtSync_Create2(CMtSync *p, unsigned (MY_STD_CALL *startAddress)(void *), void *obj, UInt32 numBlocks) +{ + if (p->wasCreated) + return SZ_OK; + + RINOK_THREAD(CriticalSection_Init(&p->cs)); + p->csWasInitialized = True; + + RINOK_THREAD(AutoResetEvent_CreateNotSignaled(&p->canStart)); + RINOK_THREAD(AutoResetEvent_CreateNotSignaled(&p->wasStarted)); + RINOK_THREAD(AutoResetEvent_CreateNotSignaled(&p->wasStopped)); + + RINOK_THREAD(Semaphore_Create(&p->freeSemaphore, numBlocks, numBlocks)); + RINOK_THREAD(Semaphore_Create(&p->filledSemaphore, 0, numBlocks)); + + p->needStart = True; + + RINOK_THREAD(Thread_Create(&p->thread, startAddress, obj)); + p->wasCreated = True; + return SZ_OK; +} + +static SRes MtSync_Create(CMtSync *p, unsigned (MY_STD_CALL *startAddress)(void *), void *obj, UInt32 numBlocks) +{ + SRes res = MtSync_Create2(p, startAddress, obj, numBlocks); + if (res != SZ_OK) + MtSync_Destruct(p); + return res; +} + +void MtSync_Init(CMtSync *p) { p->needStart = True; } + +#define kMtMaxValForNormalize 0xFFFFFFFF + +#define DEF_GetHeads2(name, v, action) \ +static void GetHeads ## name(const Byte *p, UInt32 pos, \ +UInt32 *hash, UInt32 hashMask, UInt32 *heads, UInt32 numHeads, const UInt32 *crc) \ +{ action; for (; numHeads != 0; numHeads--) { \ +const UInt32 value = (v); p++; *heads++ = pos - hash[value]; hash[value] = pos++; } } + +#define DEF_GetHeads(name, v) DEF_GetHeads2(name, v, ;) + +DEF_GetHeads2(2, (p[0] | ((UInt32)p[1] << 8)), hashMask = hashMask; crc = crc; ) +DEF_GetHeads(3, (crc[p[0]] ^ p[1] ^ ((UInt32)p[2] << 8)) & hashMask) +DEF_GetHeads(4, (crc[p[0]] ^ p[1] ^ ((UInt32)p[2] << 8) ^ (crc[p[3]] << 5)) & hashMask) +DEF_GetHeads(4b, (crc[p[0]] ^ p[1] ^ ((UInt32)p[2] << 8) ^ ((UInt32)p[3] << 16)) & hashMask) +/* DEF_GetHeads(5, (crc[p[0]] ^ p[1] ^ ((UInt32)p[2] << 8) ^ (crc[p[3]] << 5) ^ (crc[p[4]] << 3)) & hashMask) */ + +void HashThreadFunc(CMatchFinderMt *mt) +{ + CMtSync *p = &mt->hashSync; + for (;;) + { + UInt32 numProcessedBlocks = 0; + Event_Wait(&p->canStart); + Event_Set(&p->wasStarted); + for (;;) + { + if (p->exit) + return; + if (p->stopWriting) + { + p->numProcessedBlocks = numProcessedBlocks; + Event_Set(&p->wasStopped); + break; + } + + { + CMatchFinder *mf = mt->MatchFinder; + if (MatchFinder_NeedMove(mf)) + { + CriticalSection_Enter(&mt->btSync.cs); + CriticalSection_Enter(&mt->hashSync.cs); + { + const Byte *beforePtr = MatchFinder_GetPointerToCurrentPos(mf); + const Byte *afterPtr; + MatchFinder_MoveBlock(mf); + afterPtr = MatchFinder_GetPointerToCurrentPos(mf); + mt->pointerToCurPos -= beforePtr - afterPtr; + mt->buffer -= beforePtr - afterPtr; + } + CriticalSection_Leave(&mt->btSync.cs); + CriticalSection_Leave(&mt->hashSync.cs); + continue; + } + + Semaphore_Wait(&p->freeSemaphore); + + MatchFinder_ReadIfRequired(mf); + if (mf->pos > (kMtMaxValForNormalize - kMtHashBlockSize)) + { + UInt32 subValue = (mf->pos - mf->historySize - 1); + MatchFinder_ReduceOffsets(mf, subValue); + MatchFinder_Normalize3(subValue, mf->hash + mf->fixedHashSize, mf->hashMask + 1); + } + { + UInt32 *heads = mt->hashBuf + ((numProcessedBlocks++) & kMtHashNumBlocksMask) * kMtHashBlockSize; + UInt32 num = mf->streamPos - mf->pos; + heads[0] = 2; + heads[1] = num; + if (num >= mf->numHashBytes) + { + num = num - mf->numHashBytes + 1; + if (num > kMtHashBlockSize - 2) + num = kMtHashBlockSize - 2; + mt->GetHeadsFunc(mf->buffer, mf->pos, mf->hash + mf->fixedHashSize, mf->hashMask, heads + 2, num, mf->crc); + heads[0] += num; + } + mf->pos += num; + mf->buffer += num; + } + } + + Semaphore_Release1(&p->filledSemaphore); + } + } +} + +void MatchFinderMt_GetNextBlock_Hash(CMatchFinderMt *p) +{ + MtSync_GetNextBlock(&p->hashSync); + p->hashBufPosLimit = p->hashBufPos = ((p->hashSync.numProcessedBlocks - 1) & kMtHashNumBlocksMask) * kMtHashBlockSize; + p->hashBufPosLimit += p->hashBuf[p->hashBufPos++]; + p->hashNumAvail = p->hashBuf[p->hashBufPos++]; +} + +#define kEmptyHashValue 0 + +/* #define MFMT_GM_INLINE */ + +#ifdef MFMT_GM_INLINE + +#define NO_INLINE MY_FAST_CALL + +Int32 NO_INLINE GetMatchesSpecN(UInt32 lenLimit, UInt32 pos, const Byte *cur, CLzRef *son, + UInt32 _cyclicBufferPos, UInt32 _cyclicBufferSize, UInt32 _cutValue, + UInt32 *_distances, UInt32 _maxLen, const UInt32 *hash, Int32 limit, UInt32 size, UInt32 *posRes) +{ + do + { + UInt32 *distances = _distances + 1; + UInt32 curMatch = pos - *hash++; + + CLzRef *ptr0 = son + (_cyclicBufferPos << 1) + 1; + CLzRef *ptr1 = son + (_cyclicBufferPos << 1); + UInt32 len0 = 0, len1 = 0; + UInt32 cutValue = _cutValue; + UInt32 maxLen = _maxLen; + for (;;) + { + UInt32 delta = pos - curMatch; + if (cutValue-- == 0 || delta >= _cyclicBufferSize) + { + *ptr0 = *ptr1 = kEmptyHashValue; + break; + } + { + CLzRef *pair = son + ((_cyclicBufferPos - delta + ((delta > _cyclicBufferPos) ? _cyclicBufferSize : 0)) << 1); + const Byte *pb = cur - delta; + UInt32 len = (len0 < len1 ? len0 : len1); + if (pb[len] == cur[len]) + { + if (++len != lenLimit && pb[len] == cur[len]) + while (++len != lenLimit) + if (pb[len] != cur[len]) + break; + if (maxLen < len) + { + *distances++ = maxLen = len; + *distances++ = delta - 1; + if (len == lenLimit) + { + *ptr1 = pair[0]; + *ptr0 = pair[1]; + break; + } + } + } + if (pb[len] < cur[len]) + { + *ptr1 = curMatch; + ptr1 = pair + 1; + curMatch = *ptr1; + len1 = len; + } + else + { + *ptr0 = curMatch; + ptr0 = pair; + curMatch = *ptr0; + len0 = len; + } + } + } + pos++; + _cyclicBufferPos++; + cur++; + { + UInt32 num = (UInt32)(distances - _distances); + *_distances = num - 1; + _distances += num; + limit -= num; + } + } + while (limit > 0 && --size != 0); + *posRes = pos; + return limit; +} + +#endif + +void BtGetMatches(CMatchFinderMt *p, UInt32 *distances) +{ + UInt32 numProcessed = 0; + UInt32 curPos = 2; + UInt32 limit = kMtBtBlockSize - (p->matchMaxLen * 2); + distances[1] = p->hashNumAvail; + while (curPos < limit) + { + if (p->hashBufPos == p->hashBufPosLimit) + { + MatchFinderMt_GetNextBlock_Hash(p); + distances[1] = numProcessed + p->hashNumAvail; + if (p->hashNumAvail >= p->numHashBytes) + continue; + for (; p->hashNumAvail != 0; p->hashNumAvail--) + distances[curPos++] = 0; + break; + } + { + UInt32 size = p->hashBufPosLimit - p->hashBufPos; + UInt32 lenLimit = p->matchMaxLen; + UInt32 pos = p->pos; + UInt32 cyclicBufferPos = p->cyclicBufferPos; + if (lenLimit >= p->hashNumAvail) + lenLimit = p->hashNumAvail; + { + UInt32 size2 = p->hashNumAvail - lenLimit + 1; + if (size2 < size) + size = size2; + size2 = p->cyclicBufferSize - cyclicBufferPos; + if (size2 < size) + size = size2; + } + #ifndef MFMT_GM_INLINE + while (curPos < limit && size-- != 0) + { + UInt32 *startDistances = distances + curPos; + UInt32 num = (UInt32)(GetMatchesSpec1(lenLimit, pos - p->hashBuf[p->hashBufPos++], + pos, p->buffer, p->son, cyclicBufferPos, p->cyclicBufferSize, p->cutValue, + startDistances + 1, p->numHashBytes - 1) - startDistances); + *startDistances = num - 1; + curPos += num; + cyclicBufferPos++; + pos++; + p->buffer++; + } + #else + { + UInt32 posRes; + curPos = limit - GetMatchesSpecN(lenLimit, pos, p->buffer, p->son, cyclicBufferPos, p->cyclicBufferSize, p->cutValue, + distances + curPos, p->numHashBytes - 1, p->hashBuf + p->hashBufPos, (Int32)(limit - curPos) , size, &posRes); + p->hashBufPos += posRes - pos; + cyclicBufferPos += posRes - pos; + p->buffer += posRes - pos; + pos = posRes; + } + #endif + + numProcessed += pos - p->pos; + p->hashNumAvail -= pos - p->pos; + p->pos = pos; + if (cyclicBufferPos == p->cyclicBufferSize) + cyclicBufferPos = 0; + p->cyclicBufferPos = cyclicBufferPos; + } + } + distances[0] = curPos; +} + +void BtFillBlock(CMatchFinderMt *p, UInt32 globalBlockIndex) +{ + CMtSync *sync = &p->hashSync; + if (!sync->needStart) + { + CriticalSection_Enter(&sync->cs); + sync->csWasEntered = True; + } + + BtGetMatches(p, p->btBuf + (globalBlockIndex & kMtBtNumBlocksMask) * kMtBtBlockSize); + + if (p->pos > kMtMaxValForNormalize - kMtBtBlockSize) + { + UInt32 subValue = p->pos - p->cyclicBufferSize; + MatchFinder_Normalize3(subValue, p->son, p->cyclicBufferSize * 2); + p->pos -= subValue; + } + + if (!sync->needStart) + { + CriticalSection_Leave(&sync->cs); + sync->csWasEntered = False; + } +} + +void BtThreadFunc(CMatchFinderMt *mt) +{ + CMtSync *p = &mt->btSync; + for (;;) + { + UInt32 blockIndex = 0; + Event_Wait(&p->canStart); + Event_Set(&p->wasStarted); + for (;;) + { + if (p->exit) + return; + if (p->stopWriting) + { + p->numProcessedBlocks = blockIndex; + MtSync_StopWriting(&mt->hashSync); + Event_Set(&p->wasStopped); + break; + } + Semaphore_Wait(&p->freeSemaphore); + BtFillBlock(mt, blockIndex++); + Semaphore_Release1(&p->filledSemaphore); + } + } +} + +void MatchFinderMt_Construct(CMatchFinderMt *p) +{ + p->hashBuf = 0; + MtSync_Construct(&p->hashSync); + MtSync_Construct(&p->btSync); +} + +void MatchFinderMt_FreeMem(CMatchFinderMt *p, ISzAlloc *alloc) +{ + alloc->Free(alloc, p->hashBuf); + p->hashBuf = 0; +} + +void MatchFinderMt_Destruct(CMatchFinderMt *p, ISzAlloc *alloc) +{ + MtSync_Destruct(&p->hashSync); + MtSync_Destruct(&p->btSync); + MatchFinderMt_FreeMem(p, alloc); +} + +#define kHashBufferSize (kMtHashBlockSize * kMtHashNumBlocks) +#define kBtBufferSize (kMtBtBlockSize * kMtBtNumBlocks) + +static unsigned MY_STD_CALL HashThreadFunc2(void *p) { HashThreadFunc((CMatchFinderMt *)p); return 0; } +static unsigned MY_STD_CALL BtThreadFunc2(void *p) +{ + Byte allocaDummy[0x180]; + int i = 0; + for (i = 0; i < 16; i++) + allocaDummy[i] = (Byte)i; + BtThreadFunc((CMatchFinderMt *)p); + return 0; +} + +SRes MatchFinderMt_Create(CMatchFinderMt *p, UInt32 historySize, UInt32 keepAddBufferBefore, + UInt32 matchMaxLen, UInt32 keepAddBufferAfter, ISzAlloc *alloc) +{ + CMatchFinder *mf = p->MatchFinder; + p->historySize = historySize; + if (kMtBtBlockSize <= matchMaxLen * 4) + return SZ_ERROR_PARAM; + if (p->hashBuf == 0) + { + p->hashBuf = (UInt32 *)alloc->Alloc(alloc, (kHashBufferSize + kBtBufferSize) * sizeof(UInt32)); + if (p->hashBuf == 0) + return SZ_ERROR_MEM; + p->btBuf = p->hashBuf + kHashBufferSize; + } + keepAddBufferBefore += (kHashBufferSize + kBtBufferSize); + keepAddBufferAfter += kMtHashBlockSize; + if (!MatchFinder_Create(mf, historySize, keepAddBufferBefore, matchMaxLen, keepAddBufferAfter, alloc)) + return SZ_ERROR_MEM; + + RINOK(MtSync_Create(&p->hashSync, HashThreadFunc2, p, kMtHashNumBlocks)); + RINOK(MtSync_Create(&p->btSync, BtThreadFunc2, p, kMtBtNumBlocks)); + return SZ_OK; +} + +/* Call it after ReleaseStream / SetStream */ +void MatchFinderMt_Init(CMatchFinderMt *p) +{ + CMatchFinder *mf = p->MatchFinder; + p->btBufPos = p->btBufPosLimit = 0; + p->hashBufPos = p->hashBufPosLimit = 0; + MatchFinder_Init(mf); + p->pointerToCurPos = MatchFinder_GetPointerToCurrentPos(mf); + p->btNumAvailBytes = 0; + p->lzPos = p->historySize + 1; + + p->hash = mf->hash; + p->fixedHashSize = mf->fixedHashSize; + p->crc = mf->crc; + + p->son = mf->son; + p->matchMaxLen = mf->matchMaxLen; + p->numHashBytes = mf->numHashBytes; + p->pos = mf->pos; + p->buffer = mf->buffer; + p->cyclicBufferPos = mf->cyclicBufferPos; + p->cyclicBufferSize = mf->cyclicBufferSize; + p->cutValue = mf->cutValue; +} + +/* ReleaseStream is required to finish multithreading */ +void MatchFinderMt_ReleaseStream(CMatchFinderMt *p) +{ + MtSync_StopWriting(&p->btSync); + /* p->MatchFinder->ReleaseStream(); */ +} + +void MatchFinderMt_Normalize(CMatchFinderMt *p) +{ + MatchFinder_Normalize3(p->lzPos - p->historySize - 1, p->hash, p->fixedHashSize); + p->lzPos = p->historySize + 1; +} + +void MatchFinderMt_GetNextBlock_Bt(CMatchFinderMt *p) +{ + UInt32 blockIndex; + MtSync_GetNextBlock(&p->btSync); + blockIndex = ((p->btSync.numProcessedBlocks - 1) & kMtBtNumBlocksMask); + p->btBufPosLimit = p->btBufPos = blockIndex * kMtBtBlockSize; + p->btBufPosLimit += p->btBuf[p->btBufPos++]; + p->btNumAvailBytes = p->btBuf[p->btBufPos++]; + if (p->lzPos >= kMtMaxValForNormalize - kMtBtBlockSize) + MatchFinderMt_Normalize(p); +} + +const Byte * MatchFinderMt_GetPointerToCurrentPos(CMatchFinderMt *p) +{ + return p->pointerToCurPos; +} + +#define GET_NEXT_BLOCK_IF_REQUIRED if (p->btBufPos == p->btBufPosLimit) MatchFinderMt_GetNextBlock_Bt(p); + +UInt32 MatchFinderMt_GetNumAvailableBytes(CMatchFinderMt *p) +{ + GET_NEXT_BLOCK_IF_REQUIRED; + return p->btNumAvailBytes; +} + +Byte MatchFinderMt_GetIndexByte(CMatchFinderMt *p, Int32 index) +{ + return p->pointerToCurPos[index]; +} + +UInt32 * MixMatches2(CMatchFinderMt *p, UInt32 matchMinPos, UInt32 *distances) +{ + UInt32 hash2Value, curMatch2; + UInt32 *hash = p->hash; + const Byte *cur = p->pointerToCurPos; + UInt32 lzPos = p->lzPos; + MT_HASH2_CALC + + curMatch2 = hash[hash2Value]; + hash[hash2Value] = lzPos; + + if (curMatch2 >= matchMinPos) + if (cur[(ptrdiff_t)curMatch2 - lzPos] == cur[0]) + { + *distances++ = 2; + *distances++ = lzPos - curMatch2 - 1; + } + return distances; +} + +UInt32 * MixMatches3(CMatchFinderMt *p, UInt32 matchMinPos, UInt32 *distances) +{ + UInt32 hash2Value, hash3Value, curMatch2, curMatch3; + UInt32 *hash = p->hash; + const Byte *cur = p->pointerToCurPos; + UInt32 lzPos = p->lzPos; + MT_HASH3_CALC + + curMatch2 = hash[ hash2Value]; + curMatch3 = hash[kFix3HashSize + hash3Value]; + + hash[ hash2Value] = + hash[kFix3HashSize + hash3Value] = + lzPos; + + if (curMatch2 >= matchMinPos && cur[(ptrdiff_t)curMatch2 - lzPos] == cur[0]) + { + distances[1] = lzPos - curMatch2 - 1; + if (cur[(ptrdiff_t)curMatch2 - lzPos + 2] == cur[2]) + { + distances[0] = 3; + return distances + 2; + } + distances[0] = 2; + distances += 2; + } + if (curMatch3 >= matchMinPos && cur[(ptrdiff_t)curMatch3 - lzPos] == cur[0]) + { + *distances++ = 3; + *distances++ = lzPos - curMatch3 - 1; + } + return distances; +} + +/* +UInt32 *MixMatches4(CMatchFinderMt *p, UInt32 matchMinPos, UInt32 *distances) +{ + UInt32 hash2Value, hash3Value, hash4Value, curMatch2, curMatch3, curMatch4; + UInt32 *hash = p->hash; + const Byte *cur = p->pointerToCurPos; + UInt32 lzPos = p->lzPos; + MT_HASH4_CALC + + curMatch2 = hash[ hash2Value]; + curMatch3 = hash[kFix3HashSize + hash3Value]; + curMatch4 = hash[kFix4HashSize + hash4Value]; + + hash[ hash2Value] = + hash[kFix3HashSize + hash3Value] = + hash[kFix4HashSize + hash4Value] = + lzPos; + + if (curMatch2 >= matchMinPos && cur[(ptrdiff_t)curMatch2 - lzPos] == cur[0]) + { + distances[1] = lzPos - curMatch2 - 1; + if (cur[(ptrdiff_t)curMatch2 - lzPos + 2] == cur[2]) + { + distances[0] = (cur[(ptrdiff_t)curMatch2 - lzPos + 3] == cur[3]) ? 4 : 3; + return distances + 2; + } + distances[0] = 2; + distances += 2; + } + if (curMatch3 >= matchMinPos && cur[(ptrdiff_t)curMatch3 - lzPos] == cur[0]) + { + distances[1] = lzPos - curMatch3 - 1; + if (cur[(ptrdiff_t)curMatch3 - lzPos + 3] == cur[3]) + { + distances[0] = 4; + return distances + 2; + } + distances[0] = 3; + distances += 2; + } + + if (curMatch4 >= matchMinPos) + if ( + cur[(ptrdiff_t)curMatch4 - lzPos] == cur[0] && + cur[(ptrdiff_t)curMatch4 - lzPos + 3] == cur[3] + ) + { + *distances++ = 4; + *distances++ = lzPos - curMatch4 - 1; + } + return distances; +} +*/ + +#define INCREASE_LZ_POS p->lzPos++; p->pointerToCurPos++; + +UInt32 MatchFinderMt2_GetMatches(CMatchFinderMt *p, UInt32 *distances) +{ + const UInt32 *btBuf = p->btBuf + p->btBufPos; + UInt32 len = *btBuf++; + p->btBufPos += 1 + len; + p->btNumAvailBytes--; + { + UInt32 i; + for (i = 0; i < len; i += 2) + { + *distances++ = *btBuf++; + *distances++ = *btBuf++; + } + } + INCREASE_LZ_POS + return len; +} + +UInt32 MatchFinderMt_GetMatches(CMatchFinderMt *p, UInt32 *distances) +{ + const UInt32 *btBuf = p->btBuf + p->btBufPos; + UInt32 len = *btBuf++; + p->btBufPos += 1 + len; + + if (len == 0) + { + if (p->btNumAvailBytes-- >= 4) + len = (UInt32)(p->MixMatchesFunc(p, p->lzPos - p->historySize, distances) - (distances)); + } + else + { + /* Condition: there are matches in btBuf with length < p->numHashBytes */ + UInt32 *distances2; + p->btNumAvailBytes--; + distances2 = p->MixMatchesFunc(p, p->lzPos - btBuf[1], distances); + do + { + *distances2++ = *btBuf++; + *distances2++ = *btBuf++; + } + while ((len -= 2) != 0); + len = (UInt32)(distances2 - (distances)); + } + INCREASE_LZ_POS + return len; +} + +#define SKIP_HEADER2_MT do { GET_NEXT_BLOCK_IF_REQUIRED +#define SKIP_HEADER_MT(n) SKIP_HEADER2_MT if (p->btNumAvailBytes-- >= (n)) { const Byte *cur = p->pointerToCurPos; UInt32 *hash = p->hash; +#define SKIP_FOOTER_MT } INCREASE_LZ_POS p->btBufPos += p->btBuf[p->btBufPos] + 1; } while (--num != 0); + +void MatchFinderMt0_Skip(CMatchFinderMt *p, UInt32 num) +{ + SKIP_HEADER2_MT { p->btNumAvailBytes--; + SKIP_FOOTER_MT +} + +void MatchFinderMt2_Skip(CMatchFinderMt *p, UInt32 num) +{ + SKIP_HEADER_MT(2) + UInt32 hash2Value; + MT_HASH2_CALC + hash[hash2Value] = p->lzPos; + SKIP_FOOTER_MT +} + +void MatchFinderMt3_Skip(CMatchFinderMt *p, UInt32 num) +{ + SKIP_HEADER_MT(3) + UInt32 hash2Value, hash3Value; + MT_HASH3_CALC + hash[kFix3HashSize + hash3Value] = + hash[ hash2Value] = + p->lzPos; + SKIP_FOOTER_MT +} + +/* +void MatchFinderMt4_Skip(CMatchFinderMt *p, UInt32 num) +{ + SKIP_HEADER_MT(4) + UInt32 hash2Value, hash3Value, hash4Value; + MT_HASH4_CALC + hash[kFix4HashSize + hash4Value] = + hash[kFix3HashSize + hash3Value] = + hash[ hash2Value] = + p->lzPos; + SKIP_FOOTER_MT +} +*/ + +void MatchFinderMt_CreateVTable(CMatchFinderMt *p, IMatchFinder *vTable) +{ + vTable->Init = (Mf_Init_Func)MatchFinderMt_Init; + vTable->GetIndexByte = (Mf_GetIndexByte_Func)MatchFinderMt_GetIndexByte; + vTable->GetNumAvailableBytes = (Mf_GetNumAvailableBytes_Func)MatchFinderMt_GetNumAvailableBytes; + vTable->GetPointerToCurrentPos = (Mf_GetPointerToCurrentPos_Func)MatchFinderMt_GetPointerToCurrentPos; + vTable->GetMatches = (Mf_GetMatches_Func)MatchFinderMt_GetMatches; + switch(p->MatchFinder->numHashBytes) + { + case 2: + p->GetHeadsFunc = GetHeads2; + p->MixMatchesFunc = (Mf_Mix_Matches)0; + vTable->Skip = (Mf_Skip_Func)MatchFinderMt0_Skip; + vTable->GetMatches = (Mf_GetMatches_Func)MatchFinderMt2_GetMatches; + break; + case 3: + p->GetHeadsFunc = GetHeads3; + p->MixMatchesFunc = (Mf_Mix_Matches)MixMatches2; + vTable->Skip = (Mf_Skip_Func)MatchFinderMt2_Skip; + break; + default: + /* case 4: */ + p->GetHeadsFunc = p->MatchFinder->bigHash ? GetHeads4b : GetHeads4; + /* p->GetHeadsFunc = GetHeads4; */ + p->MixMatchesFunc = (Mf_Mix_Matches)MixMatches3; + vTable->Skip = (Mf_Skip_Func)MatchFinderMt3_Skip; + break; + /* + default: + p->GetHeadsFunc = GetHeads5; + p->MixMatchesFunc = (Mf_Mix_Matches)MixMatches4; + vTable->Skip = (Mf_Skip_Func)MatchFinderMt4_Skip; + break; + */ + } +} diff --git a/C/LzFindMt.h b/C/LzFindMt.h new file mode 100644 index 0000000..b985af5 --- /dev/null +++ b/C/LzFindMt.h @@ -0,0 +1,105 @@ +/* LzFindMt.h -- multithreaded Match finder for LZ algorithms +2009-02-07 : Igor Pavlov : Public domain */ + +#ifndef __LZ_FIND_MT_H +#define __LZ_FIND_MT_H + +#include "LzFind.h" +#include "Threads.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#define kMtHashBlockSize (1 << 13) +#define kMtHashNumBlocks (1 << 3) +#define kMtHashNumBlocksMask (kMtHashNumBlocks - 1) + +#define kMtBtBlockSize (1 << 14) +#define kMtBtNumBlocks (1 << 6) +#define kMtBtNumBlocksMask (kMtBtNumBlocks - 1) + +typedef struct _CMtSync +{ + Bool wasCreated; + Bool needStart; + Bool exit; + Bool stopWriting; + + CThread thread; + CAutoResetEvent canStart; + CAutoResetEvent wasStarted; + CAutoResetEvent wasStopped; + CSemaphore freeSemaphore; + CSemaphore filledSemaphore; + Bool csWasInitialized; + Bool csWasEntered; + CCriticalSection cs; + UInt32 numProcessedBlocks; +} CMtSync; + +typedef UInt32 * (*Mf_Mix_Matches)(void *p, UInt32 matchMinPos, UInt32 *distances); + +/* kMtCacheLineDummy must be >= size_of_CPU_cache_line */ +#define kMtCacheLineDummy 128 + +typedef void (*Mf_GetHeads)(const Byte *buffer, UInt32 pos, + UInt32 *hash, UInt32 hashMask, UInt32 *heads, UInt32 numHeads, const UInt32 *crc); + +typedef struct _CMatchFinderMt +{ + /* LZ */ + const Byte *pointerToCurPos; + UInt32 *btBuf; + UInt32 btBufPos; + UInt32 btBufPosLimit; + UInt32 lzPos; + UInt32 btNumAvailBytes; + + UInt32 *hash; + UInt32 fixedHashSize; + UInt32 historySize; + const UInt32 *crc; + + Mf_Mix_Matches MixMatchesFunc; + + /* LZ + BT */ + CMtSync btSync; + Byte btDummy[kMtCacheLineDummy]; + + /* BT */ + UInt32 *hashBuf; + UInt32 hashBufPos; + UInt32 hashBufPosLimit; + UInt32 hashNumAvail; + + CLzRef *son; + UInt32 matchMaxLen; + UInt32 numHashBytes; + UInt32 pos; + Byte *buffer; + UInt32 cyclicBufferPos; + UInt32 cyclicBufferSize; /* it must be historySize + 1 */ + UInt32 cutValue; + + /* BT + Hash */ + CMtSync hashSync; + /* Byte hashDummy[kMtCacheLineDummy]; */ + + /* Hash */ + Mf_GetHeads GetHeadsFunc; + CMatchFinder *MatchFinder; +} CMatchFinderMt; + +void MatchFinderMt_Construct(CMatchFinderMt *p); +void MatchFinderMt_Destruct(CMatchFinderMt *p, ISzAlloc *alloc); +SRes MatchFinderMt_Create(CMatchFinderMt *p, UInt32 historySize, UInt32 keepAddBufferBefore, + UInt32 matchMaxLen, UInt32 keepAddBufferAfter, ISzAlloc *alloc); +void MatchFinderMt_CreateVTable(CMatchFinderMt *p, IMatchFinder *vTable); +void MatchFinderMt_ReleaseStream(CMatchFinderMt *p); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/C/LzHash.h b/C/LzHash.h new file mode 100644 index 0000000..f3e8996 --- /dev/null +++ b/C/LzHash.h @@ -0,0 +1,54 @@ +/* LzHash.h -- HASH functions for LZ algorithms +2009-02-07 : Igor Pavlov : Public domain */ + +#ifndef __LZ_HASH_H +#define __LZ_HASH_H + +#define kHash2Size (1 << 10) +#define kHash3Size (1 << 16) +#define kHash4Size (1 << 20) + +#define kFix3HashSize (kHash2Size) +#define kFix4HashSize (kHash2Size + kHash3Size) +#define kFix5HashSize (kHash2Size + kHash3Size + kHash4Size) + +#define HASH2_CALC hashValue = cur[0] | ((UInt32)cur[1] << 8); + +#define HASH3_CALC { \ + UInt32 temp = p->crc[cur[0]] ^ cur[1]; \ + hash2Value = temp & (kHash2Size - 1); \ + hashValue = (temp ^ ((UInt32)cur[2] << 8)) & p->hashMask; } + +#define HASH4_CALC { \ + UInt32 temp = p->crc[cur[0]] ^ cur[1]; \ + hash2Value = temp & (kHash2Size - 1); \ + hash3Value = (temp ^ ((UInt32)cur[2] << 8)) & (kHash3Size - 1); \ + hashValue = (temp ^ ((UInt32)cur[2] << 8) ^ (p->crc[cur[3]] << 5)) & p->hashMask; } + +#define HASH5_CALC { \ + UInt32 temp = p->crc[cur[0]] ^ cur[1]; \ + hash2Value = temp & (kHash2Size - 1); \ + hash3Value = (temp ^ ((UInt32)cur[2] << 8)) & (kHash3Size - 1); \ + hash4Value = (temp ^ ((UInt32)cur[2] << 8) ^ (p->crc[cur[3]] << 5)); \ + hashValue = (hash4Value ^ (p->crc[cur[4]] << 3)) & p->hashMask; \ + hash4Value &= (kHash4Size - 1); } + +/* #define HASH_ZIP_CALC hashValue = ((cur[0] | ((UInt32)cur[1] << 8)) ^ p->crc[cur[2]]) & 0xFFFF; */ +#define HASH_ZIP_CALC hashValue = ((cur[2] | ((UInt32)cur[0] << 8)) ^ p->crc[cur[1]]) & 0xFFFF; + + +#define MT_HASH2_CALC \ + hash2Value = (p->crc[cur[0]] ^ cur[1]) & (kHash2Size - 1); + +#define MT_HASH3_CALC { \ + UInt32 temp = p->crc[cur[0]] ^ cur[1]; \ + hash2Value = temp & (kHash2Size - 1); \ + hash3Value = (temp ^ ((UInt32)cur[2] << 8)) & (kHash3Size - 1); } + +#define MT_HASH4_CALC { \ + UInt32 temp = p->crc[cur[0]] ^ cur[1]; \ + hash2Value = temp & (kHash2Size - 1); \ + hash3Value = (temp ^ ((UInt32)cur[2] << 8)) & (kHash3Size - 1); \ + hash4Value = (temp ^ ((UInt32)cur[2] << 8) ^ (p->crc[cur[3]] << 5)) & (kHash4Size - 1); } + +#endif diff --git a/C/Lzma2Dec.c b/C/Lzma2Dec.c new file mode 100644 index 0000000..7ea1cc9 --- /dev/null +++ b/C/Lzma2Dec.c @@ -0,0 +1,356 @@ +/* Lzma2Dec.c -- LZMA2 Decoder +2009-05-03 : Igor Pavlov : Public domain */ + +/* #define SHOW_DEBUG_INFO */ + +#ifdef SHOW_DEBUG_INFO +#include +#endif + +#include + +#include "Lzma2Dec.h" + +/* +00000000 - EOS +00000001 U U - Uncompressed Reset Dic +00000010 U U - Uncompressed No Reset +100uuuuu U U P P - LZMA no reset +101uuuuu U U P P - LZMA reset state +110uuuuu U U P P S - LZMA reset state + new prop +111uuuuu U U P P S - LZMA reset state + new prop + reset dic + + u, U - Unpack Size + P - Pack Size + S - Props +*/ + +#define LZMA2_CONTROL_LZMA (1 << 7) +#define LZMA2_CONTROL_COPY_NO_RESET 2 +#define LZMA2_CONTROL_COPY_RESET_DIC 1 +#define LZMA2_CONTROL_EOF 0 + +#define LZMA2_IS_UNCOMPRESSED_STATE(p) (((p)->control & LZMA2_CONTROL_LZMA) == 0) + +#define LZMA2_GET_LZMA_MODE(p) (((p)->control >> 5) & 3) +#define LZMA2_IS_THERE_PROP(mode) ((mode) >= 2) + +#define LZMA2_LCLP_MAX 4 +#define LZMA2_DIC_SIZE_FROM_PROP(p) (((UInt32)2 | ((p) & 1)) << ((p) / 2 + 11)) + +#ifdef SHOW_DEBUG_INFO +#define PRF(x) x +#else +#define PRF(x) +#endif + +typedef enum +{ + LZMA2_STATE_CONTROL, + LZMA2_STATE_UNPACK0, + LZMA2_STATE_UNPACK1, + LZMA2_STATE_PACK0, + LZMA2_STATE_PACK1, + LZMA2_STATE_PROP, + LZMA2_STATE_DATA, + LZMA2_STATE_DATA_CONT, + LZMA2_STATE_FINISHED, + LZMA2_STATE_ERROR +} ELzma2State; + +static SRes Lzma2Dec_GetOldProps(Byte prop, Byte *props) +{ + UInt32 dicSize; + if (prop > 40) + return SZ_ERROR_UNSUPPORTED; + dicSize = (prop == 40) ? 0xFFFFFFFF : LZMA2_DIC_SIZE_FROM_PROP(prop); + props[0] = (Byte)LZMA2_LCLP_MAX; + props[1] = (Byte)(dicSize); + props[2] = (Byte)(dicSize >> 8); + props[3] = (Byte)(dicSize >> 16); + props[4] = (Byte)(dicSize >> 24); + return SZ_OK; +} + +SRes Lzma2Dec_AllocateProbs(CLzma2Dec *p, Byte prop, ISzAlloc *alloc) +{ + Byte props[LZMA_PROPS_SIZE]; + RINOK(Lzma2Dec_GetOldProps(prop, props)); + return LzmaDec_AllocateProbs(&p->decoder, props, LZMA_PROPS_SIZE, alloc); +} + +SRes Lzma2Dec_Allocate(CLzma2Dec *p, Byte prop, ISzAlloc *alloc) +{ + Byte props[LZMA_PROPS_SIZE]; + RINOK(Lzma2Dec_GetOldProps(prop, props)); + return LzmaDec_Allocate(&p->decoder, props, LZMA_PROPS_SIZE, alloc); +} + +void Lzma2Dec_Init(CLzma2Dec *p) +{ + p->state = LZMA2_STATE_CONTROL; + p->needInitDic = True; + p->needInitState = True; + p->needInitProp = True; + LzmaDec_Init(&p->decoder); +} + +static ELzma2State Lzma2Dec_UpdateState(CLzma2Dec *p, Byte b) +{ + switch(p->state) + { + case LZMA2_STATE_CONTROL: + p->control = b; + PRF(printf("\n %4X ", p->decoder.dicPos)); + PRF(printf(" %2X", b)); + if (p->control == 0) + return LZMA2_STATE_FINISHED; + if (LZMA2_IS_UNCOMPRESSED_STATE(p)) + { + if ((p->control & 0x7F) > 2) + return LZMA2_STATE_ERROR; + p->unpackSize = 0; + } + else + p->unpackSize = (UInt32)(p->control & 0x1F) << 16; + return LZMA2_STATE_UNPACK0; + + case LZMA2_STATE_UNPACK0: + p->unpackSize |= (UInt32)b << 8; + return LZMA2_STATE_UNPACK1; + + case LZMA2_STATE_UNPACK1: + p->unpackSize |= (UInt32)b; + p->unpackSize++; + PRF(printf(" %8d", p->unpackSize)); + return (LZMA2_IS_UNCOMPRESSED_STATE(p)) ? LZMA2_STATE_DATA : LZMA2_STATE_PACK0; + + case LZMA2_STATE_PACK0: + p->packSize = (UInt32)b << 8; + return LZMA2_STATE_PACK1; + + case LZMA2_STATE_PACK1: + p->packSize |= (UInt32)b; + p->packSize++; + PRF(printf(" %8d", p->packSize)); + return LZMA2_IS_THERE_PROP(LZMA2_GET_LZMA_MODE(p)) ? LZMA2_STATE_PROP: + (p->needInitProp ? LZMA2_STATE_ERROR : LZMA2_STATE_DATA); + + case LZMA2_STATE_PROP: + { + int lc, lp; + if (b >= (9 * 5 * 5)) + return LZMA2_STATE_ERROR; + lc = b % 9; + b /= 9; + p->decoder.prop.pb = b / 5; + lp = b % 5; + if (lc + lp > LZMA2_LCLP_MAX) + return LZMA2_STATE_ERROR; + p->decoder.prop.lc = lc; + p->decoder.prop.lp = lp; + p->needInitProp = False; + return LZMA2_STATE_DATA; + } + } + return LZMA2_STATE_ERROR; +} + +static void LzmaDec_UpdateWithUncompressed(CLzmaDec *p, const Byte *src, SizeT size) +{ + memcpy(p->dic + p->dicPos, src, size); + p->dicPos += size; + if (p->checkDicSize == 0 && p->prop.dicSize - p->processedPos <= size) + p->checkDicSize = p->prop.dicSize; + p->processedPos += (UInt32)size; +} + +void LzmaDec_InitDicAndState(CLzmaDec *p, Bool initDic, Bool initState); + +SRes Lzma2Dec_DecodeToDic(CLzma2Dec *p, SizeT dicLimit, + const Byte *src, SizeT *srcLen, ELzmaFinishMode finishMode, ELzmaStatus *status) +{ + SizeT inSize = *srcLen; + *srcLen = 0; + *status = LZMA_STATUS_NOT_SPECIFIED; + + while (p->state != LZMA2_STATE_FINISHED) + { + SizeT dicPos = p->decoder.dicPos; + if (p->state == LZMA2_STATE_ERROR) + return SZ_ERROR_DATA; + if (dicPos == dicLimit && finishMode == LZMA_FINISH_ANY) + { + *status = LZMA_STATUS_NOT_FINISHED; + return SZ_OK; + } + if (p->state != LZMA2_STATE_DATA && p->state != LZMA2_STATE_DATA_CONT) + { + if (*srcLen == inSize) + { + *status = LZMA_STATUS_NEEDS_MORE_INPUT; + return SZ_OK; + } + (*srcLen)++; + p->state = Lzma2Dec_UpdateState(p, *src++); + continue; + } + { + SizeT destSizeCur = dicLimit - dicPos; + SizeT srcSizeCur = inSize - *srcLen; + ELzmaFinishMode curFinishMode = LZMA_FINISH_ANY; + + if (p->unpackSize <= destSizeCur) + { + destSizeCur = (SizeT)p->unpackSize; + curFinishMode = LZMA_FINISH_END; + } + + if (LZMA2_IS_UNCOMPRESSED_STATE(p)) + { + if (*srcLen == inSize) + { + *status = LZMA_STATUS_NEEDS_MORE_INPUT; + return SZ_OK; + } + + if (p->state == LZMA2_STATE_DATA) + { + Bool initDic = (p->control == LZMA2_CONTROL_COPY_RESET_DIC); + if (initDic) + p->needInitProp = p->needInitState = True; + else if (p->needInitDic) + return SZ_ERROR_DATA; + p->needInitDic = False; + LzmaDec_InitDicAndState(&p->decoder, initDic, False); + } + + if (srcSizeCur > destSizeCur) + srcSizeCur = destSizeCur; + + if (srcSizeCur == 0) + return SZ_ERROR_DATA; + + LzmaDec_UpdateWithUncompressed(&p->decoder, src, srcSizeCur); + + src += srcSizeCur; + *srcLen += srcSizeCur; + p->unpackSize -= (UInt32)srcSizeCur; + p->state = (p->unpackSize == 0) ? LZMA2_STATE_CONTROL : LZMA2_STATE_DATA_CONT; + } + else + { + SizeT outSizeProcessed; + SRes res; + + if (p->state == LZMA2_STATE_DATA) + { + int mode = LZMA2_GET_LZMA_MODE(p); + Bool initDic = (mode == 3); + Bool initState = (mode > 0); + if ((!initDic && p->needInitDic) || (!initState && p->needInitState)) + return SZ_ERROR_DATA; + + LzmaDec_InitDicAndState(&p->decoder, initDic, initState); + p->needInitDic = False; + p->needInitState = False; + p->state = LZMA2_STATE_DATA_CONT; + } + if (srcSizeCur > p->packSize) + srcSizeCur = (SizeT)p->packSize; + + res = LzmaDec_DecodeToDic(&p->decoder, dicPos + destSizeCur, src, &srcSizeCur, curFinishMode, status); + + src += srcSizeCur; + *srcLen += srcSizeCur; + p->packSize -= (UInt32)srcSizeCur; + + outSizeProcessed = p->decoder.dicPos - dicPos; + p->unpackSize -= (UInt32)outSizeProcessed; + + RINOK(res); + if (*status == LZMA_STATUS_NEEDS_MORE_INPUT) + return res; + + if (srcSizeCur == 0 && outSizeProcessed == 0) + { + if (*status != LZMA_STATUS_MAYBE_FINISHED_WITHOUT_MARK || + p->unpackSize != 0 || p->packSize != 0) + return SZ_ERROR_DATA; + p->state = LZMA2_STATE_CONTROL; + } + if (*status == LZMA_STATUS_MAYBE_FINISHED_WITHOUT_MARK) + *status = LZMA_STATUS_NOT_FINISHED; + } + } + } + *status = LZMA_STATUS_FINISHED_WITH_MARK; + return SZ_OK; +} + +SRes Lzma2Dec_DecodeToBuf(CLzma2Dec *p, Byte *dest, SizeT *destLen, const Byte *src, SizeT *srcLen, ELzmaFinishMode finishMode, ELzmaStatus *status) +{ + SizeT outSize = *destLen, inSize = *srcLen; + *srcLen = *destLen = 0; + for (;;) + { + SizeT srcSizeCur = inSize, outSizeCur, dicPos; + ELzmaFinishMode curFinishMode; + SRes res; + if (p->decoder.dicPos == p->decoder.dicBufSize) + p->decoder.dicPos = 0; + dicPos = p->decoder.dicPos; + if (outSize > p->decoder.dicBufSize - dicPos) + { + outSizeCur = p->decoder.dicBufSize; + curFinishMode = LZMA_FINISH_ANY; + } + else + { + outSizeCur = dicPos + outSize; + curFinishMode = finishMode; + } + + res = Lzma2Dec_DecodeToDic(p, outSizeCur, src, &srcSizeCur, curFinishMode, status); + src += srcSizeCur; + inSize -= srcSizeCur; + *srcLen += srcSizeCur; + outSizeCur = p->decoder.dicPos - dicPos; + memcpy(dest, p->decoder.dic + dicPos, outSizeCur); + dest += outSizeCur; + outSize -= outSizeCur; + *destLen += outSizeCur; + if (res != 0) + return res; + if (outSizeCur == 0 || outSize == 0) + return SZ_OK; + } +} + +SRes Lzma2Decode(Byte *dest, SizeT *destLen, const Byte *src, SizeT *srcLen, + Byte prop, ELzmaFinishMode finishMode, ELzmaStatus *status, ISzAlloc *alloc) +{ + CLzma2Dec decoder; + SRes res; + SizeT outSize = *destLen, inSize = *srcLen; + Byte props[LZMA_PROPS_SIZE]; + + Lzma2Dec_Construct(&decoder); + + *destLen = *srcLen = 0; + *status = LZMA_STATUS_NOT_SPECIFIED; + decoder.decoder.dic = dest; + decoder.decoder.dicBufSize = outSize; + + RINOK(Lzma2Dec_GetOldProps(prop, props)); + RINOK(LzmaDec_AllocateProbs(&decoder.decoder, props, LZMA_PROPS_SIZE, alloc)); + + *srcLen = inSize; + res = Lzma2Dec_DecodeToDic(&decoder, outSize, src, srcLen, finishMode, status); + *destLen = decoder.decoder.dicPos; + if (res == SZ_OK && *status == LZMA_STATUS_NEEDS_MORE_INPUT) + res = SZ_ERROR_INPUT_EOF; + + LzmaDec_FreeProbs(&decoder.decoder, alloc); + return res; +} diff --git a/C/Lzma2Dec.h b/C/Lzma2Dec.h new file mode 100644 index 0000000..6bc07bb --- /dev/null +++ b/C/Lzma2Dec.h @@ -0,0 +1,84 @@ +/* Lzma2Dec.h -- LZMA2 Decoder +2009-05-03 : Igor Pavlov : Public domain */ + +#ifndef __LZMA2_DEC_H +#define __LZMA2_DEC_H + +#include "LzmaDec.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* ---------- State Interface ---------- */ + +typedef struct +{ + CLzmaDec decoder; + UInt32 packSize; + UInt32 unpackSize; + int state; + Byte control; + Bool needInitDic; + Bool needInitState; + Bool needInitProp; +} CLzma2Dec; + +#define Lzma2Dec_Construct(p) LzmaDec_Construct(&(p)->decoder) +#define Lzma2Dec_FreeProbs(p, alloc) LzmaDec_FreeProbs(&(p)->decoder, alloc); +#define Lzma2Dec_Free(p, alloc) LzmaDec_Free(&(p)->decoder, alloc); + +SRes Lzma2Dec_AllocateProbs(CLzma2Dec *p, Byte prop, ISzAlloc *alloc); +SRes Lzma2Dec_Allocate(CLzma2Dec *p, Byte prop, ISzAlloc *alloc); +void Lzma2Dec_Init(CLzma2Dec *p); + + +/* +finishMode: + It has meaning only if the decoding reaches output limit (*destLen or dicLimit). + LZMA_FINISH_ANY - use smallest number of input bytes + LZMA_FINISH_END - read EndOfStream marker after decoding + +Returns: + SZ_OK + status: + LZMA_STATUS_FINISHED_WITH_MARK + LZMA_STATUS_NOT_FINISHED + LZMA_STATUS_NEEDS_MORE_INPUT + SZ_ERROR_DATA - Data error +*/ + +SRes Lzma2Dec_DecodeToDic(CLzma2Dec *p, SizeT dicLimit, + const Byte *src, SizeT *srcLen, ELzmaFinishMode finishMode, ELzmaStatus *status); + +SRes Lzma2Dec_DecodeToBuf(CLzma2Dec *p, Byte *dest, SizeT *destLen, + const Byte *src, SizeT *srcLen, ELzmaFinishMode finishMode, ELzmaStatus *status); + + +/* ---------- One Call Interface ---------- */ + +/* +finishMode: + It has meaning only if the decoding reaches output limit (*destLen). + LZMA_FINISH_ANY - use smallest number of input bytes + LZMA_FINISH_END - read EndOfStream marker after decoding + +Returns: + SZ_OK + status: + LZMA_STATUS_FINISHED_WITH_MARK + LZMA_STATUS_NOT_FINISHED + SZ_ERROR_DATA - Data error + SZ_ERROR_MEM - Memory allocation error + SZ_ERROR_UNSUPPORTED - Unsupported properties + SZ_ERROR_INPUT_EOF - It needs more bytes in input buffer (src). +*/ + +SRes Lzma2Decode(Byte *dest, SizeT *destLen, const Byte *src, SizeT *srcLen, + Byte prop, ELzmaFinishMode finishMode, ELzmaStatus *status, ISzAlloc *alloc); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/C/Lzma2Enc.c b/C/Lzma2Enc.c new file mode 100644 index 0000000..e97597f --- /dev/null +++ b/C/Lzma2Enc.c @@ -0,0 +1,477 @@ +/* Lzma2Enc.c -- LZMA2 Encoder +2010-09-24 : Igor Pavlov : Public domain */ + +/* #include */ +#include + +/* #define _7ZIP_ST */ + +#include "Lzma2Enc.h" + +#ifndef _7ZIP_ST +#include "MtCoder.h" +#else +#define NUM_MT_CODER_THREADS_MAX 1 +#endif + +#define LZMA2_CONTROL_LZMA (1 << 7) +#define LZMA2_CONTROL_COPY_NO_RESET 2 +#define LZMA2_CONTROL_COPY_RESET_DIC 1 +#define LZMA2_CONTROL_EOF 0 + +#define LZMA2_LCLP_MAX 4 + +#define LZMA2_DIC_SIZE_FROM_PROP(p) (((UInt32)2 | ((p) & 1)) << ((p) / 2 + 11)) + +#define LZMA2_PACK_SIZE_MAX (1 << 16) +#define LZMA2_COPY_CHUNK_SIZE LZMA2_PACK_SIZE_MAX +#define LZMA2_UNPACK_SIZE_MAX (1 << 21) +#define LZMA2_KEEP_WINDOW_SIZE LZMA2_UNPACK_SIZE_MAX + +#define LZMA2_CHUNK_SIZE_COMPRESSED_MAX ((1 << 16) + 16) + + +#define PRF(x) /* x */ + +/* ---------- CLzma2EncInt ---------- */ + +typedef struct +{ + CLzmaEncHandle enc; + UInt64 srcPos; + Byte props; + Bool needInitState; + Bool needInitProp; +} CLzma2EncInt; + +static SRes Lzma2EncInt_Init(CLzma2EncInt *p, const CLzma2EncProps *props) +{ + Byte propsEncoded[LZMA_PROPS_SIZE]; + SizeT propsSize = LZMA_PROPS_SIZE; + RINOK(LzmaEnc_SetProps(p->enc, &props->lzmaProps)); + RINOK(LzmaEnc_WriteProperties(p->enc, propsEncoded, &propsSize)); + p->srcPos = 0; + p->props = propsEncoded[0]; + p->needInitState = True; + p->needInitProp = True; + return SZ_OK; +} + +SRes LzmaEnc_PrepareForLzma2(CLzmaEncHandle pp, ISeqInStream *inStream, UInt32 keepWindowSize, + ISzAlloc *alloc, ISzAlloc *allocBig); +SRes LzmaEnc_MemPrepare(CLzmaEncHandle pp, const Byte *src, SizeT srcLen, + UInt32 keepWindowSize, ISzAlloc *alloc, ISzAlloc *allocBig); +SRes LzmaEnc_CodeOneMemBlock(CLzmaEncHandle pp, Bool reInit, + Byte *dest, size_t *destLen, UInt32 desiredPackSize, UInt32 *unpackSize); +const Byte *LzmaEnc_GetCurBuf(CLzmaEncHandle pp); +void LzmaEnc_Finish(CLzmaEncHandle pp); +void LzmaEnc_SaveState(CLzmaEncHandle pp); +void LzmaEnc_RestoreState(CLzmaEncHandle pp); + + +static SRes Lzma2EncInt_EncodeSubblock(CLzma2EncInt *p, Byte *outBuf, + size_t *packSizeRes, ISeqOutStream *outStream) +{ + size_t packSizeLimit = *packSizeRes; + size_t packSize = packSizeLimit; + UInt32 unpackSize = LZMA2_UNPACK_SIZE_MAX; + unsigned lzHeaderSize = 5 + (p->needInitProp ? 1 : 0); + Bool useCopyBlock; + SRes res; + + *packSizeRes = 0; + if (packSize < lzHeaderSize) + return SZ_ERROR_OUTPUT_EOF; + packSize -= lzHeaderSize; + + LzmaEnc_SaveState(p->enc); + res = LzmaEnc_CodeOneMemBlock(p->enc, p->needInitState, + outBuf + lzHeaderSize, &packSize, LZMA2_PACK_SIZE_MAX, &unpackSize); + + PRF(printf("\npackSize = %7d unpackSize = %7d ", packSize, unpackSize)); + + if (unpackSize == 0) + return res; + + if (res == SZ_OK) + useCopyBlock = (packSize + 2 >= unpackSize || packSize > (1 << 16)); + else + { + if (res != SZ_ERROR_OUTPUT_EOF) + return res; + res = SZ_OK; + useCopyBlock = True; + } + + if (useCopyBlock) + { + size_t destPos = 0; + PRF(printf("################# COPY ")); + while (unpackSize > 0) + { + UInt32 u = (unpackSize < LZMA2_COPY_CHUNK_SIZE) ? unpackSize : LZMA2_COPY_CHUNK_SIZE; + if (packSizeLimit - destPos < u + 3) + return SZ_ERROR_OUTPUT_EOF; + outBuf[destPos++] = (Byte)(p->srcPos == 0 ? LZMA2_CONTROL_COPY_RESET_DIC : LZMA2_CONTROL_COPY_NO_RESET); + outBuf[destPos++] = (Byte)((u - 1) >> 8); + outBuf[destPos++] = (Byte)(u - 1); + memcpy(outBuf + destPos, LzmaEnc_GetCurBuf(p->enc) - unpackSize, u); + unpackSize -= u; + destPos += u; + p->srcPos += u; + if (outStream) + { + *packSizeRes += destPos; + if (outStream->Write(outStream, outBuf, destPos) != destPos) + return SZ_ERROR_WRITE; + destPos = 0; + } + else + *packSizeRes = destPos; + /* needInitState = True; */ + } + LzmaEnc_RestoreState(p->enc); + return SZ_OK; + } + { + size_t destPos = 0; + UInt32 u = unpackSize - 1; + UInt32 pm = (UInt32)(packSize - 1); + unsigned mode = (p->srcPos == 0) ? 3 : (p->needInitState ? (p->needInitProp ? 2 : 1) : 0); + + PRF(printf(" ")); + + outBuf[destPos++] = (Byte)(LZMA2_CONTROL_LZMA | (mode << 5) | ((u >> 16) & 0x1F)); + outBuf[destPos++] = (Byte)(u >> 8); + outBuf[destPos++] = (Byte)u; + outBuf[destPos++] = (Byte)(pm >> 8); + outBuf[destPos++] = (Byte)pm; + + if (p->needInitProp) + outBuf[destPos++] = p->props; + + p->needInitProp = False; + p->needInitState = False; + destPos += packSize; + p->srcPos += unpackSize; + + if (outStream) + if (outStream->Write(outStream, outBuf, destPos) != destPos) + return SZ_ERROR_WRITE; + *packSizeRes = destPos; + return SZ_OK; + } +} + +/* ---------- Lzma2 Props ---------- */ + +void Lzma2EncProps_Init(CLzma2EncProps *p) +{ + LzmaEncProps_Init(&p->lzmaProps); + p->numTotalThreads = -1; + p->numBlockThreads = -1; + p->blockSize = 0; +} + +void Lzma2EncProps_Normalize(CLzma2EncProps *p) +{ + int t1, t1n, t2, t3; + { + CLzmaEncProps lzmaProps = p->lzmaProps; + LzmaEncProps_Normalize(&lzmaProps); + t1n = lzmaProps.numThreads; + } + + t1 = p->lzmaProps.numThreads; + t2 = p->numBlockThreads; + t3 = p->numTotalThreads; + + if (t2 > NUM_MT_CODER_THREADS_MAX) + t2 = NUM_MT_CODER_THREADS_MAX; + + if (t3 <= 0) + { + if (t2 <= 0) + t2 = 1; + t3 = t1n * t2; + } + else if (t2 <= 0) + { + t2 = t3 / t1n; + if (t2 == 0) + { + t1 = 1; + t2 = t3; + } + if (t2 > NUM_MT_CODER_THREADS_MAX) + t2 = NUM_MT_CODER_THREADS_MAX; + } + else if (t1 <= 0) + { + t1 = t3 / t2; + if (t1 == 0) + t1 = 1; + } + else + t3 = t1n * t2; + + p->lzmaProps.numThreads = t1; + p->numBlockThreads = t2; + p->numTotalThreads = t3; + LzmaEncProps_Normalize(&p->lzmaProps); + + if (p->blockSize == 0) + { + UInt32 dictSize = p->lzmaProps.dictSize; + UInt64 blockSize = (UInt64)dictSize << 2; + const UInt32 kMinSize = (UInt32)1 << 20; + const UInt32 kMaxSize = (UInt32)1 << 28; + if (blockSize < kMinSize) blockSize = kMinSize; + if (blockSize > kMaxSize) blockSize = kMaxSize; + if (blockSize < dictSize) blockSize = dictSize; + p->blockSize = (size_t)blockSize; + } +} + +static SRes Progress(ICompressProgress *p, UInt64 inSize, UInt64 outSize) +{ + return (p && p->Progress(p, inSize, outSize) != SZ_OK) ? SZ_ERROR_PROGRESS : SZ_OK; +} + +/* ---------- Lzma2 ---------- */ + +typedef struct +{ + Byte propEncoded; + CLzma2EncProps props; + + Byte *outBuf; + + ISzAlloc *alloc; + ISzAlloc *allocBig; + + CLzma2EncInt coders[NUM_MT_CODER_THREADS_MAX]; + + #ifndef _7ZIP_ST + CMtCoder mtCoder; + #endif + +} CLzma2Enc; + + +/* ---------- Lzma2EncThread ---------- */ + +static SRes Lzma2Enc_EncodeMt1(CLzma2EncInt *p, CLzma2Enc *mainEncoder, + ISeqOutStream *outStream, ISeqInStream *inStream, ICompressProgress *progress) +{ + UInt64 packTotal = 0; + SRes res = SZ_OK; + + if (mainEncoder->outBuf == 0) + { + mainEncoder->outBuf = (Byte *)IAlloc_Alloc(mainEncoder->alloc, LZMA2_CHUNK_SIZE_COMPRESSED_MAX); + if (mainEncoder->outBuf == 0) + return SZ_ERROR_MEM; + } + RINOK(Lzma2EncInt_Init(p, &mainEncoder->props)); + RINOK(LzmaEnc_PrepareForLzma2(p->enc, inStream, LZMA2_KEEP_WINDOW_SIZE, + mainEncoder->alloc, mainEncoder->allocBig)); + for (;;) + { + size_t packSize = LZMA2_CHUNK_SIZE_COMPRESSED_MAX; + res = Lzma2EncInt_EncodeSubblock(p, mainEncoder->outBuf, &packSize, outStream); + if (res != SZ_OK) + break; + packTotal += packSize; + res = Progress(progress, p->srcPos, packTotal); + if (res != SZ_OK) + break; + if (packSize == 0) + break; + } + LzmaEnc_Finish(p->enc); + if (res == SZ_OK) + { + Byte b = 0; + if (outStream->Write(outStream, &b, 1) != 1) + return SZ_ERROR_WRITE; + } + return res; +} + +#ifndef _7ZIP_ST + +typedef struct +{ + IMtCoderCallback funcTable; + CLzma2Enc *lzma2Enc; +} CMtCallbackImp; + +static SRes MtCallbackImp_Code(void *pp, unsigned index, Byte *dest, size_t *destSize, + const Byte *src, size_t srcSize, int finished) +{ + CMtCallbackImp *imp = (CMtCallbackImp *)pp; + CLzma2Enc *mainEncoder = imp->lzma2Enc; + CLzma2EncInt *p = &mainEncoder->coders[index]; + + SRes res = SZ_OK; + { + size_t destLim = *destSize; + *destSize = 0; + + if (srcSize != 0) + { + RINOK(Lzma2EncInt_Init(p, &mainEncoder->props)); + + RINOK(LzmaEnc_MemPrepare(p->enc, src, srcSize, LZMA2_KEEP_WINDOW_SIZE, + mainEncoder->alloc, mainEncoder->allocBig)); + + while (p->srcPos < srcSize) + { + size_t packSize = destLim - *destSize; + res = Lzma2EncInt_EncodeSubblock(p, dest + *destSize, &packSize, NULL); + if (res != SZ_OK) + break; + *destSize += packSize; + + if (packSize == 0) + { + res = SZ_ERROR_FAIL; + break; + } + + if (MtProgress_Set(&mainEncoder->mtCoder.mtProgress, index, p->srcPos, *destSize) != SZ_OK) + { + res = SZ_ERROR_PROGRESS; + break; + } + } + LzmaEnc_Finish(p->enc); + if (res != SZ_OK) + return res; + } + if (finished) + { + if (*destSize == destLim) + return SZ_ERROR_OUTPUT_EOF; + dest[(*destSize)++] = 0; + } + } + return res; +} + +#endif + +/* ---------- Lzma2Enc ---------- */ + +CLzma2EncHandle Lzma2Enc_Create(ISzAlloc *alloc, ISzAlloc *allocBig) +{ + CLzma2Enc *p = (CLzma2Enc *)alloc->Alloc(alloc, sizeof(CLzma2Enc)); + if (p == 0) + return NULL; + Lzma2EncProps_Init(&p->props); + Lzma2EncProps_Normalize(&p->props); + p->outBuf = 0; + p->alloc = alloc; + p->allocBig = allocBig; + { + unsigned i; + for (i = 0; i < NUM_MT_CODER_THREADS_MAX; i++) + p->coders[i].enc = 0; + } + #ifndef _7ZIP_ST + MtCoder_Construct(&p->mtCoder); + #endif + + return p; +} + +void Lzma2Enc_Destroy(CLzma2EncHandle pp) +{ + CLzma2Enc *p = (CLzma2Enc *)pp; + unsigned i; + for (i = 0; i < NUM_MT_CODER_THREADS_MAX; i++) + { + CLzma2EncInt *t = &p->coders[i]; + if (t->enc) + { + LzmaEnc_Destroy(t->enc, p->alloc, p->allocBig); + t->enc = 0; + } + } + + #ifndef _7ZIP_ST + MtCoder_Destruct(&p->mtCoder); + #endif + + IAlloc_Free(p->alloc, p->outBuf); + IAlloc_Free(p->alloc, pp); +} + +SRes Lzma2Enc_SetProps(CLzma2EncHandle pp, const CLzma2EncProps *props) +{ + CLzma2Enc *p = (CLzma2Enc *)pp; + CLzmaEncProps lzmaProps = props->lzmaProps; + LzmaEncProps_Normalize(&lzmaProps); + if (lzmaProps.lc + lzmaProps.lp > LZMA2_LCLP_MAX) + return SZ_ERROR_PARAM; + p->props = *props; + Lzma2EncProps_Normalize(&p->props); + return SZ_OK; +} + +Byte Lzma2Enc_WriteProperties(CLzma2EncHandle pp) +{ + CLzma2Enc *p = (CLzma2Enc *)pp; + unsigned i; + UInt32 dicSize = LzmaEncProps_GetDictSize(&p->props.lzmaProps); + for (i = 0; i < 40; i++) + if (dicSize <= LZMA2_DIC_SIZE_FROM_PROP(i)) + break; + return (Byte)i; +} + +SRes Lzma2Enc_Encode(CLzma2EncHandle pp, + ISeqOutStream *outStream, ISeqInStream *inStream, ICompressProgress *progress) +{ + CLzma2Enc *p = (CLzma2Enc *)pp; + int i; + + for (i = 0; i < p->props.numBlockThreads; i++) + { + CLzma2EncInt *t = &p->coders[i]; + if (t->enc == NULL) + { + t->enc = LzmaEnc_Create(p->alloc); + if (t->enc == NULL) + return SZ_ERROR_MEM; + } + } + + #ifndef _7ZIP_ST + if (p->props.numBlockThreads <= 1) + #endif + return Lzma2Enc_EncodeMt1(&p->coders[0], p, outStream, inStream, progress); + + #ifndef _7ZIP_ST + + { + CMtCallbackImp mtCallback; + + mtCallback.funcTable.Code = MtCallbackImp_Code; + mtCallback.lzma2Enc = p; + + p->mtCoder.progress = progress; + p->mtCoder.inStream = inStream; + p->mtCoder.outStream = outStream; + p->mtCoder.alloc = p->alloc; + p->mtCoder.mtCallback = &mtCallback.funcTable; + + p->mtCoder.blockSize = p->props.blockSize; + p->mtCoder.destBlockSize = p->props.blockSize + (p->props.blockSize >> 10) + 16; + p->mtCoder.numThreads = p->props.numBlockThreads; + + return MtCoder_Code(&p->mtCoder); + } + #endif +} diff --git a/C/Lzma2Enc.h b/C/Lzma2Enc.h new file mode 100644 index 0000000..2835255 --- /dev/null +++ b/C/Lzma2Enc.h @@ -0,0 +1,66 @@ +/* Lzma2Enc.h -- LZMA2 Encoder +2009-02-07 : Igor Pavlov : Public domain */ + +#ifndef __LZMA2_ENC_H +#define __LZMA2_ENC_H + +#include "LzmaEnc.h" + +#ifdef __cplusplus +extern "C" { +#endif + +typedef struct +{ + CLzmaEncProps lzmaProps; + size_t blockSize; + int numBlockThreads; + int numTotalThreads; +} CLzma2EncProps; + +void Lzma2EncProps_Init(CLzma2EncProps *p); +void Lzma2EncProps_Normalize(CLzma2EncProps *p); + +/* ---------- CLzmaEnc2Handle Interface ---------- */ + +/* Lzma2Enc_* functions can return the following exit codes: +Returns: + SZ_OK - OK + SZ_ERROR_MEM - Memory allocation error + SZ_ERROR_PARAM - Incorrect paramater in props + SZ_ERROR_WRITE - Write callback error + SZ_ERROR_PROGRESS - some break from progress callback + SZ_ERROR_THREAD - errors in multithreading functions (only for Mt version) +*/ + +typedef void * CLzma2EncHandle; + +CLzma2EncHandle Lzma2Enc_Create(ISzAlloc *alloc, ISzAlloc *allocBig); +void Lzma2Enc_Destroy(CLzma2EncHandle p); +SRes Lzma2Enc_SetProps(CLzma2EncHandle p, const CLzma2EncProps *props); +Byte Lzma2Enc_WriteProperties(CLzma2EncHandle p); +SRes Lzma2Enc_Encode(CLzma2EncHandle p, + ISeqOutStream *outStream, ISeqInStream *inStream, ICompressProgress *progress); + +/* ---------- One Call Interface ---------- */ + +/* Lzma2Encode +Return code: + SZ_OK - OK + SZ_ERROR_MEM - Memory allocation error + SZ_ERROR_PARAM - Incorrect paramater + SZ_ERROR_OUTPUT_EOF - output buffer overflow + SZ_ERROR_THREAD - errors in multithreading functions (only for Mt version) +*/ + +/* +SRes Lzma2Encode(Byte *dest, SizeT *destLen, const Byte *src, SizeT srcLen, + const CLzmaEncProps *props, Byte *propsEncoded, int writeEndMark, + ICompressProgress *progress, ISzAlloc *alloc, ISzAlloc *allocBig); +*/ + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/C/LzmaDec.c b/C/LzmaDec.c new file mode 100644 index 0000000..2036761 --- /dev/null +++ b/C/LzmaDec.c @@ -0,0 +1,999 @@ +/* LzmaDec.c -- LZMA Decoder +2009-09-20 : Igor Pavlov : Public domain */ + +#include "LzmaDec.h" + +#include + +#define kNumTopBits 24 +#define kTopValue ((UInt32)1 << kNumTopBits) + +#define kNumBitModelTotalBits 11 +#define kBitModelTotal (1 << kNumBitModelTotalBits) +#define kNumMoveBits 5 + +#define RC_INIT_SIZE 5 + +#define NORMALIZE if (range < kTopValue) { range <<= 8; code = (code << 8) | (*buf++); } + +#define IF_BIT_0(p) ttt = *(p); NORMALIZE; bound = (range >> kNumBitModelTotalBits) * ttt; if (code < bound) +#define UPDATE_0(p) range = bound; *(p) = (CLzmaProb)(ttt + ((kBitModelTotal - ttt) >> kNumMoveBits)); +#define UPDATE_1(p) range -= bound; code -= bound; *(p) = (CLzmaProb)(ttt - (ttt >> kNumMoveBits)); +#define GET_BIT2(p, i, A0, A1) IF_BIT_0(p) \ + { UPDATE_0(p); i = (i + i); A0; } else \ + { UPDATE_1(p); i = (i + i) + 1; A1; } +#define GET_BIT(p, i) GET_BIT2(p, i, ; , ;) + +#define TREE_GET_BIT(probs, i) { GET_BIT((probs + i), i); } +#define TREE_DECODE(probs, limit, i) \ + { i = 1; do { TREE_GET_BIT(probs, i); } while (i < limit); i -= limit; } + +/* #define _LZMA_SIZE_OPT */ + +#ifdef _LZMA_SIZE_OPT +#define TREE_6_DECODE(probs, i) TREE_DECODE(probs, (1 << 6), i) +#else +#define TREE_6_DECODE(probs, i) \ + { i = 1; \ + TREE_GET_BIT(probs, i); \ + TREE_GET_BIT(probs, i); \ + TREE_GET_BIT(probs, i); \ + TREE_GET_BIT(probs, i); \ + TREE_GET_BIT(probs, i); \ + TREE_GET_BIT(probs, i); \ + i -= 0x40; } +#endif + +#define NORMALIZE_CHECK if (range < kTopValue) { if (buf >= bufLimit) return DUMMY_ERROR; range <<= 8; code = (code << 8) | (*buf++); } + +#define IF_BIT_0_CHECK(p) ttt = *(p); NORMALIZE_CHECK; bound = (range >> kNumBitModelTotalBits) * ttt; if (code < bound) +#define UPDATE_0_CHECK range = bound; +#define UPDATE_1_CHECK range -= bound; code -= bound; +#define GET_BIT2_CHECK(p, i, A0, A1) IF_BIT_0_CHECK(p) \ + { UPDATE_0_CHECK; i = (i + i); A0; } else \ + { UPDATE_1_CHECK; i = (i + i) + 1; A1; } +#define GET_BIT_CHECK(p, i) GET_BIT2_CHECK(p, i, ; , ;) +#define TREE_DECODE_CHECK(probs, limit, i) \ + { i = 1; do { GET_BIT_CHECK(probs + i, i) } while (i < limit); i -= limit; } + + +#define kNumPosBitsMax 4 +#define kNumPosStatesMax (1 << kNumPosBitsMax) + +#define kLenNumLowBits 3 +#define kLenNumLowSymbols (1 << kLenNumLowBits) +#define kLenNumMidBits 3 +#define kLenNumMidSymbols (1 << kLenNumMidBits) +#define kLenNumHighBits 8 +#define kLenNumHighSymbols (1 << kLenNumHighBits) + +#define LenChoice 0 +#define LenChoice2 (LenChoice + 1) +#define LenLow (LenChoice2 + 1) +#define LenMid (LenLow + (kNumPosStatesMax << kLenNumLowBits)) +#define LenHigh (LenMid + (kNumPosStatesMax << kLenNumMidBits)) +#define kNumLenProbs (LenHigh + kLenNumHighSymbols) + + +#define kNumStates 12 +#define kNumLitStates 7 + +#define kStartPosModelIndex 4 +#define kEndPosModelIndex 14 +#define kNumFullDistances (1 << (kEndPosModelIndex >> 1)) + +#define kNumPosSlotBits 6 +#define kNumLenToPosStates 4 + +#define kNumAlignBits 4 +#define kAlignTableSize (1 << kNumAlignBits) + +#define kMatchMinLen 2 +#define kMatchSpecLenStart (kMatchMinLen + kLenNumLowSymbols + kLenNumMidSymbols + kLenNumHighSymbols) + +#define IsMatch 0 +#define IsRep (IsMatch + (kNumStates << kNumPosBitsMax)) +#define IsRepG0 (IsRep + kNumStates) +#define IsRepG1 (IsRepG0 + kNumStates) +#define IsRepG2 (IsRepG1 + kNumStates) +#define IsRep0Long (IsRepG2 + kNumStates) +#define PosSlot (IsRep0Long + (kNumStates << kNumPosBitsMax)) +#define SpecPos (PosSlot + (kNumLenToPosStates << kNumPosSlotBits)) +#define Align (SpecPos + kNumFullDistances - kEndPosModelIndex) +#define LenCoder (Align + kAlignTableSize) +#define RepLenCoder (LenCoder + kNumLenProbs) +#define Literal (RepLenCoder + kNumLenProbs) + +#define LZMA_BASE_SIZE 1846 +#define LZMA_LIT_SIZE 768 + +#define LzmaProps_GetNumProbs(p) ((UInt32)LZMA_BASE_SIZE + (LZMA_LIT_SIZE << ((p)->lc + (p)->lp))) + +#if Literal != LZMA_BASE_SIZE +StopCompilingDueBUG +#endif + +#define LZMA_DIC_MIN (1 << 12) + +/* First LZMA-symbol is always decoded. +And it decodes new LZMA-symbols while (buf < bufLimit), but "buf" is without last normalization +Out: + Result: + SZ_OK - OK + SZ_ERROR_DATA - Error + p->remainLen: + < kMatchSpecLenStart : normal remain + = kMatchSpecLenStart : finished + = kMatchSpecLenStart + 1 : Flush marker + = kMatchSpecLenStart + 2 : State Init Marker +*/ + +static int MY_FAST_CALL LzmaDec_DecodeReal(CLzmaDec *p, SizeT limit, const Byte *bufLimit) +{ + CLzmaProb *probs = p->probs; + + unsigned state = p->state; + UInt32 rep0 = p->reps[0], rep1 = p->reps[1], rep2 = p->reps[2], rep3 = p->reps[3]; + unsigned pbMask = ((unsigned)1 << (p->prop.pb)) - 1; + unsigned lpMask = ((unsigned)1 << (p->prop.lp)) - 1; + unsigned lc = p->prop.lc; + + Byte *dic = p->dic; + SizeT dicBufSize = p->dicBufSize; + SizeT dicPos = p->dicPos; + + UInt32 processedPos = p->processedPos; + UInt32 checkDicSize = p->checkDicSize; + unsigned len = 0; + + const Byte *buf = p->buf; + UInt32 range = p->range; + UInt32 code = p->code; + + do + { + CLzmaProb *prob; + UInt32 bound; + unsigned ttt; + unsigned posState = processedPos & pbMask; + + prob = probs + IsMatch + (state << kNumPosBitsMax) + posState; + IF_BIT_0(prob) + { + unsigned symbol; + UPDATE_0(prob); + prob = probs + Literal; + if (checkDicSize != 0 || processedPos != 0) + prob += (LZMA_LIT_SIZE * (((processedPos & lpMask) << lc) + + (dic[(dicPos == 0 ? dicBufSize : dicPos) - 1] >> (8 - lc)))); + + if (state < kNumLitStates) + { + state -= (state < 4) ? state : 3; + symbol = 1; + do { GET_BIT(prob + symbol, symbol) } while (symbol < 0x100); + } + else + { + unsigned matchByte = p->dic[(dicPos - rep0) + ((dicPos < rep0) ? dicBufSize : 0)]; + unsigned offs = 0x100; + state -= (state < 10) ? 3 : 6; + symbol = 1; + do + { + unsigned bit; + CLzmaProb *probLit; + matchByte <<= 1; + bit = (matchByte & offs); + probLit = prob + offs + bit + symbol; + GET_BIT2(probLit, symbol, offs &= ~bit, offs &= bit) + } + while (symbol < 0x100); + } + dic[dicPos++] = (Byte)symbol; + processedPos++; + continue; + } + else + { + UPDATE_1(prob); + prob = probs + IsRep + state; + IF_BIT_0(prob) + { + UPDATE_0(prob); + state += kNumStates; + prob = probs + LenCoder; + } + else + { + UPDATE_1(prob); + if (checkDicSize == 0 && processedPos == 0) + return SZ_ERROR_DATA; + prob = probs + IsRepG0 + state; + IF_BIT_0(prob) + { + UPDATE_0(prob); + prob = probs + IsRep0Long + (state << kNumPosBitsMax) + posState; + IF_BIT_0(prob) + { + UPDATE_0(prob); + dic[dicPos] = dic[(dicPos - rep0) + ((dicPos < rep0) ? dicBufSize : 0)]; + dicPos++; + processedPos++; + state = state < kNumLitStates ? 9 : 11; + continue; + } + UPDATE_1(prob); + } + else + { + UInt32 distance; + UPDATE_1(prob); + prob = probs + IsRepG1 + state; + IF_BIT_0(prob) + { + UPDATE_0(prob); + distance = rep1; + } + else + { + UPDATE_1(prob); + prob = probs + IsRepG2 + state; + IF_BIT_0(prob) + { + UPDATE_0(prob); + distance = rep2; + } + else + { + UPDATE_1(prob); + distance = rep3; + rep3 = rep2; + } + rep2 = rep1; + } + rep1 = rep0; + rep0 = distance; + } + state = state < kNumLitStates ? 8 : 11; + prob = probs + RepLenCoder; + } + { + unsigned limit, offset; + CLzmaProb *probLen = prob + LenChoice; + IF_BIT_0(probLen) + { + UPDATE_0(probLen); + probLen = prob + LenLow + (posState << kLenNumLowBits); + offset = 0; + limit = (1 << kLenNumLowBits); + } + else + { + UPDATE_1(probLen); + probLen = prob + LenChoice2; + IF_BIT_0(probLen) + { + UPDATE_0(probLen); + probLen = prob + LenMid + (posState << kLenNumMidBits); + offset = kLenNumLowSymbols; + limit = (1 << kLenNumMidBits); + } + else + { + UPDATE_1(probLen); + probLen = prob + LenHigh; + offset = kLenNumLowSymbols + kLenNumMidSymbols; + limit = (1 << kLenNumHighBits); + } + } + TREE_DECODE(probLen, limit, len); + len += offset; + } + + if (state >= kNumStates) + { + UInt32 distance; + prob = probs + PosSlot + + ((len < kNumLenToPosStates ? len : kNumLenToPosStates - 1) << kNumPosSlotBits); + TREE_6_DECODE(prob, distance); + if (distance >= kStartPosModelIndex) + { + unsigned posSlot = (unsigned)distance; + int numDirectBits = (int)(((distance >> 1) - 1)); + distance = (2 | (distance & 1)); + if (posSlot < kEndPosModelIndex) + { + distance <<= numDirectBits; + prob = probs + SpecPos + distance - posSlot - 1; + { + UInt32 mask = 1; + unsigned i = 1; + do + { + GET_BIT2(prob + i, i, ; , distance |= mask); + mask <<= 1; + } + while (--numDirectBits != 0); + } + } + else + { + numDirectBits -= kNumAlignBits; + do + { + NORMALIZE + range >>= 1; + + { + UInt32 t; + code -= range; + t = (0 - ((UInt32)code >> 31)); /* (UInt32)((Int32)code >> 31) */ + distance = (distance << 1) + (t + 1); + code += range & t; + } + /* + distance <<= 1; + if (code >= range) + { + code -= range; + distance |= 1; + } + */ + } + while (--numDirectBits != 0); + prob = probs + Align; + distance <<= kNumAlignBits; + { + unsigned i = 1; + GET_BIT2(prob + i, i, ; , distance |= 1); + GET_BIT2(prob + i, i, ; , distance |= 2); + GET_BIT2(prob + i, i, ; , distance |= 4); + GET_BIT2(prob + i, i, ; , distance |= 8); + } + if (distance == (UInt32)0xFFFFFFFF) + { + len += kMatchSpecLenStart; + state -= kNumStates; + break; + } + } + } + rep3 = rep2; + rep2 = rep1; + rep1 = rep0; + rep0 = distance + 1; + if (checkDicSize == 0) + { + if (distance >= processedPos) + return SZ_ERROR_DATA; + } + else if (distance >= checkDicSize) + return SZ_ERROR_DATA; + state = (state < kNumStates + kNumLitStates) ? kNumLitStates : kNumLitStates + 3; + } + + len += kMatchMinLen; + + if (limit == dicPos) + return SZ_ERROR_DATA; + { + SizeT rem = limit - dicPos; + unsigned curLen = ((rem < len) ? (unsigned)rem : len); + SizeT pos = (dicPos - rep0) + ((dicPos < rep0) ? dicBufSize : 0); + + processedPos += curLen; + + len -= curLen; + if (pos + curLen <= dicBufSize) + { + Byte *dest = dic + dicPos; + ptrdiff_t src = (ptrdiff_t)pos - (ptrdiff_t)dicPos; + const Byte *lim = dest + curLen; + dicPos += curLen; + do + *(dest) = (Byte)*(dest + src); + while (++dest != lim); + } + else + { + do + { + dic[dicPos++] = dic[pos]; + if (++pos == dicBufSize) + pos = 0; + } + while (--curLen != 0); + } + } + } + } + while (dicPos < limit && buf < bufLimit); + NORMALIZE; + p->buf = buf; + p->range = range; + p->code = code; + p->remainLen = len; + p->dicPos = dicPos; + p->processedPos = processedPos; + p->reps[0] = rep0; + p->reps[1] = rep1; + p->reps[2] = rep2; + p->reps[3] = rep3; + p->state = state; + + return SZ_OK; +} + +static void MY_FAST_CALL LzmaDec_WriteRem(CLzmaDec *p, SizeT limit) +{ + if (p->remainLen != 0 && p->remainLen < kMatchSpecLenStart) + { + Byte *dic = p->dic; + SizeT dicPos = p->dicPos; + SizeT dicBufSize = p->dicBufSize; + unsigned len = p->remainLen; + UInt32 rep0 = p->reps[0]; + if (limit - dicPos < len) + len = (unsigned)(limit - dicPos); + + if (p->checkDicSize == 0 && p->prop.dicSize - p->processedPos <= len) + p->checkDicSize = p->prop.dicSize; + + p->processedPos += len; + p->remainLen -= len; + while (len-- != 0) + { + dic[dicPos] = dic[(dicPos - rep0) + ((dicPos < rep0) ? dicBufSize : 0)]; + dicPos++; + } + p->dicPos = dicPos; + } +} + +static int MY_FAST_CALL LzmaDec_DecodeReal2(CLzmaDec *p, SizeT limit, const Byte *bufLimit) +{ + do + { + SizeT limit2 = limit; + if (p->checkDicSize == 0) + { + UInt32 rem = p->prop.dicSize - p->processedPos; + if (limit - p->dicPos > rem) + limit2 = p->dicPos + rem; + } + RINOK(LzmaDec_DecodeReal(p, limit2, bufLimit)); + if (p->processedPos >= p->prop.dicSize) + p->checkDicSize = p->prop.dicSize; + LzmaDec_WriteRem(p, limit); + } + while (p->dicPos < limit && p->buf < bufLimit && p->remainLen < kMatchSpecLenStart); + + if (p->remainLen > kMatchSpecLenStart) + { + p->remainLen = kMatchSpecLenStart; + } + return 0; +} + +typedef enum +{ + DUMMY_ERROR, /* unexpected end of input stream */ + DUMMY_LIT, + DUMMY_MATCH, + DUMMY_REP +} ELzmaDummy; + +static ELzmaDummy LzmaDec_TryDummy(const CLzmaDec *p, const Byte *buf, SizeT inSize) +{ + UInt32 range = p->range; + UInt32 code = p->code; + const Byte *bufLimit = buf + inSize; + CLzmaProb *probs = p->probs; + unsigned state = p->state; + ELzmaDummy res; + + { + CLzmaProb *prob; + UInt32 bound; + unsigned ttt; + unsigned posState = (p->processedPos) & ((1 << p->prop.pb) - 1); + + prob = probs + IsMatch + (state << kNumPosBitsMax) + posState; + IF_BIT_0_CHECK(prob) + { + UPDATE_0_CHECK + + /* if (bufLimit - buf >= 7) return DUMMY_LIT; */ + + prob = probs + Literal; + if (p->checkDicSize != 0 || p->processedPos != 0) + prob += (LZMA_LIT_SIZE * + ((((p->processedPos) & ((1 << (p->prop.lp)) - 1)) << p->prop.lc) + + (p->dic[(p->dicPos == 0 ? p->dicBufSize : p->dicPos) - 1] >> (8 - p->prop.lc)))); + + if (state < kNumLitStates) + { + unsigned symbol = 1; + do { GET_BIT_CHECK(prob + symbol, symbol) } while (symbol < 0x100); + } + else + { + unsigned matchByte = p->dic[p->dicPos - p->reps[0] + + ((p->dicPos < p->reps[0]) ? p->dicBufSize : 0)]; + unsigned offs = 0x100; + unsigned symbol = 1; + do + { + unsigned bit; + CLzmaProb *probLit; + matchByte <<= 1; + bit = (matchByte & offs); + probLit = prob + offs + bit + symbol; + GET_BIT2_CHECK(probLit, symbol, offs &= ~bit, offs &= bit) + } + while (symbol < 0x100); + } + res = DUMMY_LIT; + } + else + { + unsigned len; + UPDATE_1_CHECK; + + prob = probs + IsRep + state; + IF_BIT_0_CHECK(prob) + { + UPDATE_0_CHECK; + state = 0; + prob = probs + LenCoder; + res = DUMMY_MATCH; + } + else + { + UPDATE_1_CHECK; + res = DUMMY_REP; + prob = probs + IsRepG0 + state; + IF_BIT_0_CHECK(prob) + { + UPDATE_0_CHECK; + prob = probs + IsRep0Long + (state << kNumPosBitsMax) + posState; + IF_BIT_0_CHECK(prob) + { + UPDATE_0_CHECK; + NORMALIZE_CHECK; + return DUMMY_REP; + } + else + { + UPDATE_1_CHECK; + } + } + else + { + UPDATE_1_CHECK; + prob = probs + IsRepG1 + state; + IF_BIT_0_CHECK(prob) + { + UPDATE_0_CHECK; + } + else + { + UPDATE_1_CHECK; + prob = probs + IsRepG2 + state; + IF_BIT_0_CHECK(prob) + { + UPDATE_0_CHECK; + } + else + { + UPDATE_1_CHECK; + } + } + } + state = kNumStates; + prob = probs + RepLenCoder; + } + { + unsigned limit, offset; + CLzmaProb *probLen = prob + LenChoice; + IF_BIT_0_CHECK(probLen) + { + UPDATE_0_CHECK; + probLen = prob + LenLow + (posState << kLenNumLowBits); + offset = 0; + limit = 1 << kLenNumLowBits; + } + else + { + UPDATE_1_CHECK; + probLen = prob + LenChoice2; + IF_BIT_0_CHECK(probLen) + { + UPDATE_0_CHECK; + probLen = prob + LenMid + (posState << kLenNumMidBits); + offset = kLenNumLowSymbols; + limit = 1 << kLenNumMidBits; + } + else + { + UPDATE_1_CHECK; + probLen = prob + LenHigh; + offset = kLenNumLowSymbols + kLenNumMidSymbols; + limit = 1 << kLenNumHighBits; + } + } + TREE_DECODE_CHECK(probLen, limit, len); + len += offset; + } + + if (state < 4) + { + unsigned posSlot; + prob = probs + PosSlot + + ((len < kNumLenToPosStates ? len : kNumLenToPosStates - 1) << + kNumPosSlotBits); + TREE_DECODE_CHECK(prob, 1 << kNumPosSlotBits, posSlot); + if (posSlot >= kStartPosModelIndex) + { + int numDirectBits = ((posSlot >> 1) - 1); + + /* if (bufLimit - buf >= 8) return DUMMY_MATCH; */ + + if (posSlot < kEndPosModelIndex) + { + prob = probs + SpecPos + ((2 | (posSlot & 1)) << numDirectBits) - posSlot - 1; + } + else + { + numDirectBits -= kNumAlignBits; + do + { + NORMALIZE_CHECK + range >>= 1; + code -= range & (((code - range) >> 31) - 1); + /* if (code >= range) code -= range; */ + } + while (--numDirectBits != 0); + prob = probs + Align; + numDirectBits = kNumAlignBits; + } + { + unsigned i = 1; + do + { + GET_BIT_CHECK(prob + i, i); + } + while (--numDirectBits != 0); + } + } + } + } + } + NORMALIZE_CHECK; + return res; +} + + +static void LzmaDec_InitRc(CLzmaDec *p, const Byte *data) +{ + p->code = ((UInt32)data[1] << 24) | ((UInt32)data[2] << 16) | ((UInt32)data[3] << 8) | ((UInt32)data[4]); + p->range = 0xFFFFFFFF; + p->needFlush = 0; +} + +void LzmaDec_InitDicAndState(CLzmaDec *p, Bool initDic, Bool initState) +{ + p->needFlush = 1; + p->remainLen = 0; + p->tempBufSize = 0; + + if (initDic) + { + p->processedPos = 0; + p->checkDicSize = 0; + p->needInitState = 1; + } + if (initState) + p->needInitState = 1; +} + +void LzmaDec_Init(CLzmaDec *p) +{ + p->dicPos = 0; + LzmaDec_InitDicAndState(p, True, True); +} + +static void LzmaDec_InitStateReal(CLzmaDec *p) +{ + UInt32 numProbs = Literal + ((UInt32)LZMA_LIT_SIZE << (p->prop.lc + p->prop.lp)); + UInt32 i; + CLzmaProb *probs = p->probs; + for (i = 0; i < numProbs; i++) + probs[i] = kBitModelTotal >> 1; + p->reps[0] = p->reps[1] = p->reps[2] = p->reps[3] = 1; + p->state = 0; + p->needInitState = 0; +} + +SRes LzmaDec_DecodeToDic(CLzmaDec *p, SizeT dicLimit, const Byte *src, SizeT *srcLen, + ELzmaFinishMode finishMode, ELzmaStatus *status) +{ + SizeT inSize = *srcLen; + (*srcLen) = 0; + LzmaDec_WriteRem(p, dicLimit); + + *status = LZMA_STATUS_NOT_SPECIFIED; + + while (p->remainLen != kMatchSpecLenStart) + { + int checkEndMarkNow; + + if (p->needFlush != 0) + { + for (; inSize > 0 && p->tempBufSize < RC_INIT_SIZE; (*srcLen)++, inSize--) + p->tempBuf[p->tempBufSize++] = *src++; + if (p->tempBufSize < RC_INIT_SIZE) + { + *status = LZMA_STATUS_NEEDS_MORE_INPUT; + return SZ_OK; + } + if (p->tempBuf[0] != 0) + return SZ_ERROR_DATA; + + LzmaDec_InitRc(p, p->tempBuf); + p->tempBufSize = 0; + } + + checkEndMarkNow = 0; + if (p->dicPos >= dicLimit) + { + if (p->remainLen == 0 && p->code == 0) + { + *status = LZMA_STATUS_MAYBE_FINISHED_WITHOUT_MARK; + return SZ_OK; + } + if (finishMode == LZMA_FINISH_ANY) + { + *status = LZMA_STATUS_NOT_FINISHED; + return SZ_OK; + } + if (p->remainLen != 0) + { + *status = LZMA_STATUS_NOT_FINISHED; + return SZ_ERROR_DATA; + } + checkEndMarkNow = 1; + } + + if (p->needInitState) + LzmaDec_InitStateReal(p); + + if (p->tempBufSize == 0) + { + SizeT processed; + const Byte *bufLimit; + if (inSize < LZMA_REQUIRED_INPUT_MAX || checkEndMarkNow) + { + int dummyRes = LzmaDec_TryDummy(p, src, inSize); + if (dummyRes == DUMMY_ERROR) + { + memcpy(p->tempBuf, src, inSize); + p->tempBufSize = (unsigned)inSize; + (*srcLen) += inSize; + *status = LZMA_STATUS_NEEDS_MORE_INPUT; + return SZ_OK; + } + if (checkEndMarkNow && dummyRes != DUMMY_MATCH) + { + *status = LZMA_STATUS_NOT_FINISHED; + return SZ_ERROR_DATA; + } + bufLimit = src; + } + else + bufLimit = src + inSize - LZMA_REQUIRED_INPUT_MAX; + p->buf = src; + if (LzmaDec_DecodeReal2(p, dicLimit, bufLimit) != 0) + return SZ_ERROR_DATA; + processed = (SizeT)(p->buf - src); + (*srcLen) += processed; + src += processed; + inSize -= processed; + } + else + { + unsigned rem = p->tempBufSize, lookAhead = 0; + while (rem < LZMA_REQUIRED_INPUT_MAX && lookAhead < inSize) + p->tempBuf[rem++] = src[lookAhead++]; + p->tempBufSize = rem; + if (rem < LZMA_REQUIRED_INPUT_MAX || checkEndMarkNow) + { + int dummyRes = LzmaDec_TryDummy(p, p->tempBuf, rem); + if (dummyRes == DUMMY_ERROR) + { + (*srcLen) += lookAhead; + *status = LZMA_STATUS_NEEDS_MORE_INPUT; + return SZ_OK; + } + if (checkEndMarkNow && dummyRes != DUMMY_MATCH) + { + *status = LZMA_STATUS_NOT_FINISHED; + return SZ_ERROR_DATA; + } + } + p->buf = p->tempBuf; + if (LzmaDec_DecodeReal2(p, dicLimit, p->buf) != 0) + return SZ_ERROR_DATA; + lookAhead -= (rem - (unsigned)(p->buf - p->tempBuf)); + (*srcLen) += lookAhead; + src += lookAhead; + inSize -= lookAhead; + p->tempBufSize = 0; + } + } + if (p->code == 0) + *status = LZMA_STATUS_FINISHED_WITH_MARK; + return (p->code == 0) ? SZ_OK : SZ_ERROR_DATA; +} + +SRes LzmaDec_DecodeToBuf(CLzmaDec *p, Byte *dest, SizeT *destLen, const Byte *src, SizeT *srcLen, ELzmaFinishMode finishMode, ELzmaStatus *status) +{ + SizeT outSize = *destLen; + SizeT inSize = *srcLen; + *srcLen = *destLen = 0; + for (;;) + { + SizeT inSizeCur = inSize, outSizeCur, dicPos; + ELzmaFinishMode curFinishMode; + SRes res; + if (p->dicPos == p->dicBufSize) + p->dicPos = 0; + dicPos = p->dicPos; + if (outSize > p->dicBufSize - dicPos) + { + outSizeCur = p->dicBufSize; + curFinishMode = LZMA_FINISH_ANY; + } + else + { + outSizeCur = dicPos + outSize; + curFinishMode = finishMode; + } + + res = LzmaDec_DecodeToDic(p, outSizeCur, src, &inSizeCur, curFinishMode, status); + src += inSizeCur; + inSize -= inSizeCur; + *srcLen += inSizeCur; + outSizeCur = p->dicPos - dicPos; + memcpy(dest, p->dic + dicPos, outSizeCur); + dest += outSizeCur; + outSize -= outSizeCur; + *destLen += outSizeCur; + if (res != 0) + return res; + if (outSizeCur == 0 || outSize == 0) + return SZ_OK; + } +} + +void LzmaDec_FreeProbs(CLzmaDec *p, ISzAlloc *alloc) +{ + alloc->Free(alloc, p->probs); + p->probs = 0; +} + +static void LzmaDec_FreeDict(CLzmaDec *p, ISzAlloc *alloc) +{ + alloc->Free(alloc, p->dic); + p->dic = 0; +} + +void LzmaDec_Free(CLzmaDec *p, ISzAlloc *alloc) +{ + LzmaDec_FreeProbs(p, alloc); + LzmaDec_FreeDict(p, alloc); +} + +SRes LzmaProps_Decode(CLzmaProps *p, const Byte *data, unsigned size) +{ + UInt32 dicSize; + Byte d; + + if (size < LZMA_PROPS_SIZE) + return SZ_ERROR_UNSUPPORTED; + else + dicSize = data[1] | ((UInt32)data[2] << 8) | ((UInt32)data[3] << 16) | ((UInt32)data[4] << 24); + + if (dicSize < LZMA_DIC_MIN) + dicSize = LZMA_DIC_MIN; + p->dicSize = dicSize; + + d = data[0]; + if (d >= (9 * 5 * 5)) + return SZ_ERROR_UNSUPPORTED; + + p->lc = d % 9; + d /= 9; + p->pb = d / 5; + p->lp = d % 5; + + return SZ_OK; +} + +static SRes LzmaDec_AllocateProbs2(CLzmaDec *p, const CLzmaProps *propNew, ISzAlloc *alloc) +{ + UInt32 numProbs = LzmaProps_GetNumProbs(propNew); + if (p->probs == 0 || numProbs != p->numProbs) + { + LzmaDec_FreeProbs(p, alloc); + p->probs = (CLzmaProb *)alloc->Alloc(alloc, numProbs * sizeof(CLzmaProb)); + p->numProbs = numProbs; + if (p->probs == 0) + return SZ_ERROR_MEM; + } + return SZ_OK; +} + +SRes LzmaDec_AllocateProbs(CLzmaDec *p, const Byte *props, unsigned propsSize, ISzAlloc *alloc) +{ + CLzmaProps propNew; + RINOK(LzmaProps_Decode(&propNew, props, propsSize)); + RINOK(LzmaDec_AllocateProbs2(p, &propNew, alloc)); + p->prop = propNew; + return SZ_OK; +} + +SRes LzmaDec_Allocate(CLzmaDec *p, const Byte *props, unsigned propsSize, ISzAlloc *alloc) +{ + CLzmaProps propNew; + SizeT dicBufSize; + RINOK(LzmaProps_Decode(&propNew, props, propsSize)); + RINOK(LzmaDec_AllocateProbs2(p, &propNew, alloc)); + dicBufSize = propNew.dicSize; + if (p->dic == 0 || dicBufSize != p->dicBufSize) + { + LzmaDec_FreeDict(p, alloc); + p->dic = (Byte *)alloc->Alloc(alloc, dicBufSize); + if (p->dic == 0) + { + LzmaDec_FreeProbs(p, alloc); + return SZ_ERROR_MEM; + } + } + p->dicBufSize = dicBufSize; + p->prop = propNew; + return SZ_OK; +} + +SRes LzmaDecode(Byte *dest, SizeT *destLen, const Byte *src, SizeT *srcLen, + const Byte *propData, unsigned propSize, ELzmaFinishMode finishMode, + ELzmaStatus *status, ISzAlloc *alloc) +{ + CLzmaDec p; + SRes res; + SizeT inSize = *srcLen; + SizeT outSize = *destLen; + *srcLen = *destLen = 0; + if (inSize < RC_INIT_SIZE) + return SZ_ERROR_INPUT_EOF; + + LzmaDec_Construct(&p); + res = LzmaDec_AllocateProbs(&p, propData, propSize, alloc); + if (res != 0) + return res; + p.dic = dest; + p.dicBufSize = outSize; + + LzmaDec_Init(&p); + + *srcLen = inSize; + res = LzmaDec_DecodeToDic(&p, outSize, src, srcLen, finishMode, status); + + if (res == SZ_OK && *status == LZMA_STATUS_NEEDS_MORE_INPUT) + res = SZ_ERROR_INPUT_EOF; + + (*destLen) = p.dicPos; + LzmaDec_FreeProbs(&p, alloc); + return res; +} diff --git a/C/LzmaDec.h b/C/LzmaDec.h new file mode 100644 index 0000000..bf7f084 --- /dev/null +++ b/C/LzmaDec.h @@ -0,0 +1,231 @@ +/* LzmaDec.h -- LZMA Decoder +2009-02-07 : Igor Pavlov : Public domain */ + +#ifndef __LZMA_DEC_H +#define __LZMA_DEC_H + +#include "Types.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* #define _LZMA_PROB32 */ +/* _LZMA_PROB32 can increase the speed on some CPUs, + but memory usage for CLzmaDec::probs will be doubled in that case */ + +#ifdef _LZMA_PROB32 +#define CLzmaProb UInt32 +#else +#define CLzmaProb UInt16 +#endif + + +/* ---------- LZMA Properties ---------- */ + +#define LZMA_PROPS_SIZE 5 + +typedef struct _CLzmaProps +{ + unsigned lc, lp, pb; + UInt32 dicSize; +} CLzmaProps; + +/* LzmaProps_Decode - decodes properties +Returns: + SZ_OK + SZ_ERROR_UNSUPPORTED - Unsupported properties +*/ + +SRes LzmaProps_Decode(CLzmaProps *p, const Byte *data, unsigned size); + + +/* ---------- LZMA Decoder state ---------- */ + +/* LZMA_REQUIRED_INPUT_MAX = number of required input bytes for worst case. + Num bits = log2((2^11 / 31) ^ 22) + 26 < 134 + 26 = 160; */ + +#define LZMA_REQUIRED_INPUT_MAX 20 + +typedef struct +{ + CLzmaProps prop; + CLzmaProb *probs; + Byte *dic; + const Byte *buf; + UInt32 range, code; + SizeT dicPos; + SizeT dicBufSize; + UInt32 processedPos; + UInt32 checkDicSize; + unsigned state; + UInt32 reps[4]; + unsigned remainLen; + int needFlush; + int needInitState; + UInt32 numProbs; + unsigned tempBufSize; + Byte tempBuf[LZMA_REQUIRED_INPUT_MAX]; +} CLzmaDec; + +#define LzmaDec_Construct(p) { (p)->dic = 0; (p)->probs = 0; } + +void LzmaDec_Init(CLzmaDec *p); + +/* There are two types of LZMA streams: + 0) Stream with end mark. That end mark adds about 6 bytes to compressed size. + 1) Stream without end mark. You must know exact uncompressed size to decompress such stream. */ + +typedef enum +{ + LZMA_FINISH_ANY, /* finish at any point */ + LZMA_FINISH_END /* block must be finished at the end */ +} ELzmaFinishMode; + +/* ELzmaFinishMode has meaning only if the decoding reaches output limit !!! + + You must use LZMA_FINISH_END, when you know that current output buffer + covers last bytes of block. In other cases you must use LZMA_FINISH_ANY. + + If LZMA decoder sees end marker before reaching output limit, it returns SZ_OK, + and output value of destLen will be less than output buffer size limit. + You can check status result also. + + You can use multiple checks to test data integrity after full decompression: + 1) Check Result and "status" variable. + 2) Check that output(destLen) = uncompressedSize, if you know real uncompressedSize. + 3) Check that output(srcLen) = compressedSize, if you know real compressedSize. + You must use correct finish mode in that case. */ + +typedef enum +{ + LZMA_STATUS_NOT_SPECIFIED, /* use main error code instead */ + LZMA_STATUS_FINISHED_WITH_MARK, /* stream was finished with end mark. */ + LZMA_STATUS_NOT_FINISHED, /* stream was not finished */ + LZMA_STATUS_NEEDS_MORE_INPUT, /* you must provide more input bytes */ + LZMA_STATUS_MAYBE_FINISHED_WITHOUT_MARK /* there is probability that stream was finished without end mark */ +} ELzmaStatus; + +/* ELzmaStatus is used only as output value for function call */ + + +/* ---------- Interfaces ---------- */ + +/* There are 3 levels of interfaces: + 1) Dictionary Interface + 2) Buffer Interface + 3) One Call Interface + You can select any of these interfaces, but don't mix functions from different + groups for same object. */ + + +/* There are two variants to allocate state for Dictionary Interface: + 1) LzmaDec_Allocate / LzmaDec_Free + 2) LzmaDec_AllocateProbs / LzmaDec_FreeProbs + You can use variant 2, if you set dictionary buffer manually. + For Buffer Interface you must always use variant 1. + +LzmaDec_Allocate* can return: + SZ_OK + SZ_ERROR_MEM - Memory allocation error + SZ_ERROR_UNSUPPORTED - Unsupported properties +*/ + +SRes LzmaDec_AllocateProbs(CLzmaDec *p, const Byte *props, unsigned propsSize, ISzAlloc *alloc); +void LzmaDec_FreeProbs(CLzmaDec *p, ISzAlloc *alloc); + +SRes LzmaDec_Allocate(CLzmaDec *state, const Byte *prop, unsigned propsSize, ISzAlloc *alloc); +void LzmaDec_Free(CLzmaDec *state, ISzAlloc *alloc); + +/* ---------- Dictionary Interface ---------- */ + +/* You can use it, if you want to eliminate the overhead for data copying from + dictionary to some other external buffer. + You must work with CLzmaDec variables directly in this interface. + + STEPS: + LzmaDec_Constr() + LzmaDec_Allocate() + for (each new stream) + { + LzmaDec_Init() + while (it needs more decompression) + { + LzmaDec_DecodeToDic() + use data from CLzmaDec::dic and update CLzmaDec::dicPos + } + } + LzmaDec_Free() +*/ + +/* LzmaDec_DecodeToDic + + The decoding to internal dictionary buffer (CLzmaDec::dic). + You must manually update CLzmaDec::dicPos, if it reaches CLzmaDec::dicBufSize !!! + +finishMode: + It has meaning only if the decoding reaches output limit (dicLimit). + LZMA_FINISH_ANY - Decode just dicLimit bytes. + LZMA_FINISH_END - Stream must be finished after dicLimit. + +Returns: + SZ_OK + status: + LZMA_STATUS_FINISHED_WITH_MARK + LZMA_STATUS_NOT_FINISHED + LZMA_STATUS_NEEDS_MORE_INPUT + LZMA_STATUS_MAYBE_FINISHED_WITHOUT_MARK + SZ_ERROR_DATA - Data error +*/ + +SRes LzmaDec_DecodeToDic(CLzmaDec *p, SizeT dicLimit, + const Byte *src, SizeT *srcLen, ELzmaFinishMode finishMode, ELzmaStatus *status); + + +/* ---------- Buffer Interface ---------- */ + +/* It's zlib-like interface. + See LzmaDec_DecodeToDic description for information about STEPS and return results, + but you must use LzmaDec_DecodeToBuf instead of LzmaDec_DecodeToDic and you don't need + to work with CLzmaDec variables manually. + +finishMode: + It has meaning only if the decoding reaches output limit (*destLen). + LZMA_FINISH_ANY - Decode just destLen bytes. + LZMA_FINISH_END - Stream must be finished after (*destLen). +*/ + +SRes LzmaDec_DecodeToBuf(CLzmaDec *p, Byte *dest, SizeT *destLen, + const Byte *src, SizeT *srcLen, ELzmaFinishMode finishMode, ELzmaStatus *status); + + +/* ---------- One Call Interface ---------- */ + +/* LzmaDecode + +finishMode: + It has meaning only if the decoding reaches output limit (*destLen). + LZMA_FINISH_ANY - Decode just destLen bytes. + LZMA_FINISH_END - Stream must be finished after (*destLen). + +Returns: + SZ_OK + status: + LZMA_STATUS_FINISHED_WITH_MARK + LZMA_STATUS_NOT_FINISHED + LZMA_STATUS_MAYBE_FINISHED_WITHOUT_MARK + SZ_ERROR_DATA - Data error + SZ_ERROR_MEM - Memory allocation error + SZ_ERROR_UNSUPPORTED - Unsupported properties + SZ_ERROR_INPUT_EOF - It needs more bytes in input buffer (src). +*/ + +SRes LzmaDecode(Byte *dest, SizeT *destLen, const Byte *src, SizeT *srcLen, + const Byte *propData, unsigned propSize, ELzmaFinishMode finishMode, + ELzmaStatus *status, ISzAlloc *alloc); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/C/LzmaEnc.c b/C/LzmaEnc.c new file mode 100644 index 0000000..cf13138 --- /dev/null +++ b/C/LzmaEnc.c @@ -0,0 +1,2268 @@ +/* LzmaEnc.c -- LZMA Encoder +2010-04-16 : Igor Pavlov : Public domain */ + +#include + +/* #define SHOW_STAT */ +/* #define SHOW_STAT2 */ + +#if defined(SHOW_STAT) || defined(SHOW_STAT2) +#include +#endif + +#include "LzmaEnc.h" + +#include "LzFind.h" +#ifndef _7ZIP_ST +#include "LzFindMt.h" +#endif + +#ifdef SHOW_STAT +static int ttt = 0; +#endif + +#define kBlockSizeMax ((1 << LZMA_NUM_BLOCK_SIZE_BITS) - 1) + +#define kBlockSize (9 << 10) +#define kUnpackBlockSize (1 << 18) +#define kMatchArraySize (1 << 21) +#define kMatchRecordMaxSize ((LZMA_MATCH_LEN_MAX * 2 + 3) * LZMA_MATCH_LEN_MAX) + +#define kNumMaxDirectBits (31) + +#define kNumTopBits 24 +#define kTopValue ((UInt32)1 << kNumTopBits) + +#define kNumBitModelTotalBits 11 +#define kBitModelTotal (1 << kNumBitModelTotalBits) +#define kNumMoveBits 5 +#define kProbInitValue (kBitModelTotal >> 1) + +#define kNumMoveReducingBits 4 +#define kNumBitPriceShiftBits 4 +#define kBitPrice (1 << kNumBitPriceShiftBits) + +void LzmaEncProps_Init(CLzmaEncProps *p) +{ + p->level = 5; + p->dictSize = p->mc = 0; + p->lc = p->lp = p->pb = p->algo = p->fb = p->btMode = p->numHashBytes = p->numThreads = -1; + p->writeEndMark = 0; +} + +void LzmaEncProps_Normalize(CLzmaEncProps *p) +{ + int level = p->level; + if (level < 0) level = 5; + p->level = level; + if (p->dictSize == 0) p->dictSize = (level <= 5 ? (1 << (level * 2 + 14)) : (level == 6 ? (1 << 25) : (1 << 26))); + if (p->lc < 0) p->lc = 3; + if (p->lp < 0) p->lp = 0; + if (p->pb < 0) p->pb = 2; + if (p->algo < 0) p->algo = (level < 5 ? 0 : 1); + if (p->fb < 0) p->fb = (level < 7 ? 32 : 64); + if (p->btMode < 0) p->btMode = (p->algo == 0 ? 0 : 1); + if (p->numHashBytes < 0) p->numHashBytes = 4; + if (p->mc == 0) p->mc = (16 + (p->fb >> 1)) >> (p->btMode ? 0 : 1); + if (p->numThreads < 0) + p->numThreads = + #ifndef _7ZIP_ST + ((p->btMode && p->algo) ? 2 : 1); + #else + 1; + #endif +} + +UInt32 LzmaEncProps_GetDictSize(const CLzmaEncProps *props2) +{ + CLzmaEncProps props = *props2; + LzmaEncProps_Normalize(&props); + return props.dictSize; +} + +/* #define LZMA_LOG_BSR */ +/* Define it for Intel's CPU */ + + +#ifdef LZMA_LOG_BSR + +#define kDicLogSizeMaxCompress 30 + +#define BSR2_RET(pos, res) { unsigned long i; _BitScanReverse(&i, (pos)); res = (i + i) + ((pos >> (i - 1)) & 1); } + +UInt32 GetPosSlot1(UInt32 pos) +{ + UInt32 res; + BSR2_RET(pos, res); + return res; +} +#define GetPosSlot2(pos, res) { BSR2_RET(pos, res); } +#define GetPosSlot(pos, res) { if (pos < 2) res = pos; else BSR2_RET(pos, res); } + +#else + +#define kNumLogBits (9 + (int)sizeof(size_t) / 2) +#define kDicLogSizeMaxCompress ((kNumLogBits - 1) * 2 + 7) + +void LzmaEnc_FastPosInit(Byte *g_FastPos) +{ + int c = 2, slotFast; + g_FastPos[0] = 0; + g_FastPos[1] = 1; + + for (slotFast = 2; slotFast < kNumLogBits * 2; slotFast++) + { + UInt32 k = (1 << ((slotFast >> 1) - 1)); + UInt32 j; + for (j = 0; j < k; j++, c++) + g_FastPos[c] = (Byte)slotFast; + } +} + +#define BSR2_RET(pos, res) { UInt32 i = 6 + ((kNumLogBits - 1) & \ + (0 - (((((UInt32)1 << (kNumLogBits + 6)) - 1) - pos) >> 31))); \ + res = p->g_FastPos[pos >> i] + (i * 2); } +/* +#define BSR2_RET(pos, res) { res = (pos < (1 << (kNumLogBits + 6))) ? \ + p->g_FastPos[pos >> 6] + 12 : \ + p->g_FastPos[pos >> (6 + kNumLogBits - 1)] + (6 + (kNumLogBits - 1)) * 2; } +*/ + +#define GetPosSlot1(pos) p->g_FastPos[pos] +#define GetPosSlot2(pos, res) { BSR2_RET(pos, res); } +#define GetPosSlot(pos, res) { if (pos < kNumFullDistances) res = p->g_FastPos[pos]; else BSR2_RET(pos, res); } + +#endif + + +#define LZMA_NUM_REPS 4 + +typedef unsigned CState; + +typedef struct +{ + UInt32 price; + + CState state; + int prev1IsChar; + int prev2; + + UInt32 posPrev2; + UInt32 backPrev2; + + UInt32 posPrev; + UInt32 backPrev; + UInt32 backs[LZMA_NUM_REPS]; +} COptimal; + +#define kNumOpts (1 << 12) + +#define kNumLenToPosStates 4 +#define kNumPosSlotBits 6 +#define kDicLogSizeMin 0 +#define kDicLogSizeMax 32 +#define kDistTableSizeMax (kDicLogSizeMax * 2) + + +#define kNumAlignBits 4 +#define kAlignTableSize (1 << kNumAlignBits) +#define kAlignMask (kAlignTableSize - 1) + +#define kStartPosModelIndex 4 +#define kEndPosModelIndex 14 +#define kNumPosModels (kEndPosModelIndex - kStartPosModelIndex) + +#define kNumFullDistances (1 << (kEndPosModelIndex >> 1)) + +#ifdef _LZMA_PROB32 +#define CLzmaProb UInt32 +#else +#define CLzmaProb UInt16 +#endif + +#define LZMA_PB_MAX 4 +#define LZMA_LC_MAX 8 +#define LZMA_LP_MAX 4 + +#define LZMA_NUM_PB_STATES_MAX (1 << LZMA_PB_MAX) + + +#define kLenNumLowBits 3 +#define kLenNumLowSymbols (1 << kLenNumLowBits) +#define kLenNumMidBits 3 +#define kLenNumMidSymbols (1 << kLenNumMidBits) +#define kLenNumHighBits 8 +#define kLenNumHighSymbols (1 << kLenNumHighBits) + +#define kLenNumSymbolsTotal (kLenNumLowSymbols + kLenNumMidSymbols + kLenNumHighSymbols) + +#define LZMA_MATCH_LEN_MIN 2 +#define LZMA_MATCH_LEN_MAX (LZMA_MATCH_LEN_MIN + kLenNumSymbolsTotal - 1) + +#define kNumStates 12 + +typedef struct +{ + CLzmaProb choice; + CLzmaProb choice2; + CLzmaProb low[LZMA_NUM_PB_STATES_MAX << kLenNumLowBits]; + CLzmaProb mid[LZMA_NUM_PB_STATES_MAX << kLenNumMidBits]; + CLzmaProb high[kLenNumHighSymbols]; +} CLenEnc; + +typedef struct +{ + CLenEnc p; + UInt32 prices[LZMA_NUM_PB_STATES_MAX][kLenNumSymbolsTotal]; + UInt32 tableSize; + UInt32 counters[LZMA_NUM_PB_STATES_MAX]; +} CLenPriceEnc; + +typedef struct +{ + UInt32 range; + Byte cache; + UInt64 low; + UInt64 cacheSize; + Byte *buf; + Byte *bufLim; + Byte *bufBase; + ISeqOutStream *outStream; + UInt64 processed; + SRes res; +} CRangeEnc; + +typedef struct +{ + CLzmaProb *litProbs; + + CLzmaProb isMatch[kNumStates][LZMA_NUM_PB_STATES_MAX]; + CLzmaProb isRep[kNumStates]; + CLzmaProb isRepG0[kNumStates]; + CLzmaProb isRepG1[kNumStates]; + CLzmaProb isRepG2[kNumStates]; + CLzmaProb isRep0Long[kNumStates][LZMA_NUM_PB_STATES_MAX]; + + CLzmaProb posSlotEncoder[kNumLenToPosStates][1 << kNumPosSlotBits]; + CLzmaProb posEncoders[kNumFullDistances - kEndPosModelIndex]; + CLzmaProb posAlignEncoder[1 << kNumAlignBits]; + + CLenPriceEnc lenEnc; + CLenPriceEnc repLenEnc; + + UInt32 reps[LZMA_NUM_REPS]; + UInt32 state; +} CSaveState; + +typedef struct +{ + IMatchFinder matchFinder; + void *matchFinderObj; + + #ifndef _7ZIP_ST + Bool mtMode; + CMatchFinderMt matchFinderMt; + #endif + + CMatchFinder matchFinderBase; + + #ifndef _7ZIP_ST + Byte pad[128]; + #endif + + UInt32 optimumEndIndex; + UInt32 optimumCurrentIndex; + + UInt32 longestMatchLength; + UInt32 numPairs; + UInt32 numAvail; + COptimal opt[kNumOpts]; + + #ifndef LZMA_LOG_BSR + Byte g_FastPos[1 << kNumLogBits]; + #endif + + UInt32 ProbPrices[kBitModelTotal >> kNumMoveReducingBits]; + UInt32 matches[LZMA_MATCH_LEN_MAX * 2 + 2 + 1]; + UInt32 numFastBytes; + UInt32 additionalOffset; + UInt32 reps[LZMA_NUM_REPS]; + UInt32 state; + + UInt32 posSlotPrices[kNumLenToPosStates][kDistTableSizeMax]; + UInt32 distancesPrices[kNumLenToPosStates][kNumFullDistances]; + UInt32 alignPrices[kAlignTableSize]; + UInt32 alignPriceCount; + + UInt32 distTableSize; + + unsigned lc, lp, pb; + unsigned lpMask, pbMask; + + CLzmaProb *litProbs; + + CLzmaProb isMatch[kNumStates][LZMA_NUM_PB_STATES_MAX]; + CLzmaProb isRep[kNumStates]; + CLzmaProb isRepG0[kNumStates]; + CLzmaProb isRepG1[kNumStates]; + CLzmaProb isRepG2[kNumStates]; + CLzmaProb isRep0Long[kNumStates][LZMA_NUM_PB_STATES_MAX]; + + CLzmaProb posSlotEncoder[kNumLenToPosStates][1 << kNumPosSlotBits]; + CLzmaProb posEncoders[kNumFullDistances - kEndPosModelIndex]; + CLzmaProb posAlignEncoder[1 << kNumAlignBits]; + + CLenPriceEnc lenEnc; + CLenPriceEnc repLenEnc; + + unsigned lclp; + + Bool fastMode; + + CRangeEnc rc; + + Bool writeEndMark; + UInt64 nowPos64; + UInt32 matchPriceCount; + Bool finished; + Bool multiThread; + + SRes result; + UInt32 dictSize; + UInt32 matchFinderCycles; + + int needInit; + + CSaveState saveState; +} CLzmaEnc; + +void LzmaEnc_SaveState(CLzmaEncHandle pp) +{ + CLzmaEnc *p = (CLzmaEnc *)pp; + CSaveState *dest = &p->saveState; + int i; + dest->lenEnc = p->lenEnc; + dest->repLenEnc = p->repLenEnc; + dest->state = p->state; + + for (i = 0; i < kNumStates; i++) + { + memcpy(dest->isMatch[i], p->isMatch[i], sizeof(p->isMatch[i])); + memcpy(dest->isRep0Long[i], p->isRep0Long[i], sizeof(p->isRep0Long[i])); + } + for (i = 0; i < kNumLenToPosStates; i++) + memcpy(dest->posSlotEncoder[i], p->posSlotEncoder[i], sizeof(p->posSlotEncoder[i])); + memcpy(dest->isRep, p->isRep, sizeof(p->isRep)); + memcpy(dest->isRepG0, p->isRepG0, sizeof(p->isRepG0)); + memcpy(dest->isRepG1, p->isRepG1, sizeof(p->isRepG1)); + memcpy(dest->isRepG2, p->isRepG2, sizeof(p->isRepG2)); + memcpy(dest->posEncoders, p->posEncoders, sizeof(p->posEncoders)); + memcpy(dest->posAlignEncoder, p->posAlignEncoder, sizeof(p->posAlignEncoder)); + memcpy(dest->reps, p->reps, sizeof(p->reps)); + memcpy(dest->litProbs, p->litProbs, (0x300 << p->lclp) * sizeof(CLzmaProb)); +} + +void LzmaEnc_RestoreState(CLzmaEncHandle pp) +{ + CLzmaEnc *dest = (CLzmaEnc *)pp; + const CSaveState *p = &dest->saveState; + int i; + dest->lenEnc = p->lenEnc; + dest->repLenEnc = p->repLenEnc; + dest->state = p->state; + + for (i = 0; i < kNumStates; i++) + { + memcpy(dest->isMatch[i], p->isMatch[i], sizeof(p->isMatch[i])); + memcpy(dest->isRep0Long[i], p->isRep0Long[i], sizeof(p->isRep0Long[i])); + } + for (i = 0; i < kNumLenToPosStates; i++) + memcpy(dest->posSlotEncoder[i], p->posSlotEncoder[i], sizeof(p->posSlotEncoder[i])); + memcpy(dest->isRep, p->isRep, sizeof(p->isRep)); + memcpy(dest->isRepG0, p->isRepG0, sizeof(p->isRepG0)); + memcpy(dest->isRepG1, p->isRepG1, sizeof(p->isRepG1)); + memcpy(dest->isRepG2, p->isRepG2, sizeof(p->isRepG2)); + memcpy(dest->posEncoders, p->posEncoders, sizeof(p->posEncoders)); + memcpy(dest->posAlignEncoder, p->posAlignEncoder, sizeof(p->posAlignEncoder)); + memcpy(dest->reps, p->reps, sizeof(p->reps)); + memcpy(dest->litProbs, p->litProbs, (0x300 << dest->lclp) * sizeof(CLzmaProb)); +} + +SRes LzmaEnc_SetProps(CLzmaEncHandle pp, const CLzmaEncProps *props2) +{ + CLzmaEnc *p = (CLzmaEnc *)pp; + CLzmaEncProps props = *props2; + LzmaEncProps_Normalize(&props); + + if (props.lc > LZMA_LC_MAX || props.lp > LZMA_LP_MAX || props.pb > LZMA_PB_MAX || + props.dictSize > ((UInt32)1 << kDicLogSizeMaxCompress) || props.dictSize > ((UInt32)1 << 30)) + return SZ_ERROR_PARAM; + p->dictSize = props.dictSize; + p->matchFinderCycles = props.mc; + { + unsigned fb = props.fb; + if (fb < 5) + fb = 5; + if (fb > LZMA_MATCH_LEN_MAX) + fb = LZMA_MATCH_LEN_MAX; + p->numFastBytes = fb; + } + p->lc = props.lc; + p->lp = props.lp; + p->pb = props.pb; + p->fastMode = (props.algo == 0); + p->matchFinderBase.btMode = props.btMode; + { + UInt32 numHashBytes = 4; + if (props.btMode) + { + if (props.numHashBytes < 2) + numHashBytes = 2; + else if (props.numHashBytes < 4) + numHashBytes = props.numHashBytes; + } + p->matchFinderBase.numHashBytes = numHashBytes; + } + + p->matchFinderBase.cutValue = props.mc; + + p->writeEndMark = props.writeEndMark; + + #ifndef _7ZIP_ST + /* + if (newMultiThread != _multiThread) + { + ReleaseMatchFinder(); + _multiThread = newMultiThread; + } + */ + p->multiThread = (props.numThreads > 1); + #endif + + return SZ_OK; +} + +static const int kLiteralNextStates[kNumStates] = {0, 0, 0, 0, 1, 2, 3, 4, 5, 6, 4, 5}; +static const int kMatchNextStates[kNumStates] = {7, 7, 7, 7, 7, 7, 7, 10, 10, 10, 10, 10}; +static const int kRepNextStates[kNumStates] = {8, 8, 8, 8, 8, 8, 8, 11, 11, 11, 11, 11}; +static const int kShortRepNextStates[kNumStates]= {9, 9, 9, 9, 9, 9, 9, 11, 11, 11, 11, 11}; + +#define IsCharState(s) ((s) < 7) + +#define GetLenToPosState(len) (((len) < kNumLenToPosStates + 1) ? (len) - 2 : kNumLenToPosStates - 1) + +#define kInfinityPrice (1 << 30) + +static void RangeEnc_Construct(CRangeEnc *p) +{ + p->outStream = 0; + p->bufBase = 0; +} + +#define RangeEnc_GetProcessed(p) ((p)->processed + ((p)->buf - (p)->bufBase) + (p)->cacheSize) + +#define RC_BUF_SIZE (1 << 16) +static int RangeEnc_Alloc(CRangeEnc *p, ISzAlloc *alloc) +{ + if (p->bufBase == 0) + { + p->bufBase = (Byte *)alloc->Alloc(alloc, RC_BUF_SIZE); + if (p->bufBase == 0) + return 0; + p->bufLim = p->bufBase + RC_BUF_SIZE; + } + return 1; +} + +static void RangeEnc_Free(CRangeEnc *p, ISzAlloc *alloc) +{ + alloc->Free(alloc, p->bufBase); + p->bufBase = 0; +} + +static void RangeEnc_Init(CRangeEnc *p) +{ + /* Stream.Init(); */ + p->low = 0; + p->range = 0xFFFFFFFF; + p->cacheSize = 1; + p->cache = 0; + + p->buf = p->bufBase; + + p->processed = 0; + p->res = SZ_OK; +} + +static void RangeEnc_FlushStream(CRangeEnc *p) +{ + size_t num; + if (p->res != SZ_OK) + return; + num = p->buf - p->bufBase; + if (num != p->outStream->Write(p->outStream, p->bufBase, num)) + p->res = SZ_ERROR_WRITE; + p->processed += num; + p->buf = p->bufBase; +} + +static void MY_FAST_CALL RangeEnc_ShiftLow(CRangeEnc *p) +{ + if ((UInt32)p->low < (UInt32)0xFF000000 || (int)(p->low >> 32) != 0) + { + Byte temp = p->cache; + do + { + Byte *buf = p->buf; + *buf++ = (Byte)(temp + (Byte)(p->low >> 32)); + p->buf = buf; + if (buf == p->bufLim) + RangeEnc_FlushStream(p); + temp = 0xFF; + } + while (--p->cacheSize != 0); + p->cache = (Byte)((UInt32)p->low >> 24); + } + p->cacheSize++; + p->low = (UInt32)p->low << 8; +} + +static void RangeEnc_FlushData(CRangeEnc *p) +{ + int i; + for (i = 0; i < 5; i++) + RangeEnc_ShiftLow(p); +} + +static void RangeEnc_EncodeDirectBits(CRangeEnc *p, UInt32 value, int numBits) +{ + do + { + p->range >>= 1; + p->low += p->range & (0 - ((value >> --numBits) & 1)); + if (p->range < kTopValue) + { + p->range <<= 8; + RangeEnc_ShiftLow(p); + } + } + while (numBits != 0); +} + +static void RangeEnc_EncodeBit(CRangeEnc *p, CLzmaProb *prob, UInt32 symbol) +{ + UInt32 ttt = *prob; + UInt32 newBound = (p->range >> kNumBitModelTotalBits) * ttt; + if (symbol == 0) + { + p->range = newBound; + ttt += (kBitModelTotal - ttt) >> kNumMoveBits; + } + else + { + p->low += newBound; + p->range -= newBound; + ttt -= ttt >> kNumMoveBits; + } + *prob = (CLzmaProb)ttt; + if (p->range < kTopValue) + { + p->range <<= 8; + RangeEnc_ShiftLow(p); + } +} + +static void LitEnc_Encode(CRangeEnc *p, CLzmaProb *probs, UInt32 symbol) +{ + symbol |= 0x100; + do + { + RangeEnc_EncodeBit(p, probs + (symbol >> 8), (symbol >> 7) & 1); + symbol <<= 1; + } + while (symbol < 0x10000); +} + +static void LitEnc_EncodeMatched(CRangeEnc *p, CLzmaProb *probs, UInt32 symbol, UInt32 matchByte) +{ + UInt32 offs = 0x100; + symbol |= 0x100; + do + { + matchByte <<= 1; + RangeEnc_EncodeBit(p, probs + (offs + (matchByte & offs) + (symbol >> 8)), (symbol >> 7) & 1); + symbol <<= 1; + offs &= ~(matchByte ^ symbol); + } + while (symbol < 0x10000); +} + +void LzmaEnc_InitPriceTables(UInt32 *ProbPrices) +{ + UInt32 i; + for (i = (1 << kNumMoveReducingBits) / 2; i < kBitModelTotal; i += (1 << kNumMoveReducingBits)) + { + const int kCyclesBits = kNumBitPriceShiftBits; + UInt32 w = i; + UInt32 bitCount = 0; + int j; + for (j = 0; j < kCyclesBits; j++) + { + w = w * w; + bitCount <<= 1; + while (w >= ((UInt32)1 << 16)) + { + w >>= 1; + bitCount++; + } + } + ProbPrices[i >> kNumMoveReducingBits] = ((kNumBitModelTotalBits << kCyclesBits) - 15 - bitCount); + } +} + + +#define GET_PRICE(prob, symbol) \ + p->ProbPrices[((prob) ^ (((-(int)(symbol))) & (kBitModelTotal - 1))) >> kNumMoveReducingBits]; + +#define GET_PRICEa(prob, symbol) \ + ProbPrices[((prob) ^ ((-((int)(symbol))) & (kBitModelTotal - 1))) >> kNumMoveReducingBits]; + +#define GET_PRICE_0(prob) p->ProbPrices[(prob) >> kNumMoveReducingBits] +#define GET_PRICE_1(prob) p->ProbPrices[((prob) ^ (kBitModelTotal - 1)) >> kNumMoveReducingBits] + +#define GET_PRICE_0a(prob) ProbPrices[(prob) >> kNumMoveReducingBits] +#define GET_PRICE_1a(prob) ProbPrices[((prob) ^ (kBitModelTotal - 1)) >> kNumMoveReducingBits] + +static UInt32 LitEnc_GetPrice(const CLzmaProb *probs, UInt32 symbol, UInt32 *ProbPrices) +{ + UInt32 price = 0; + symbol |= 0x100; + do + { + price += GET_PRICEa(probs[symbol >> 8], (symbol >> 7) & 1); + symbol <<= 1; + } + while (symbol < 0x10000); + return price; +} + +static UInt32 LitEnc_GetPriceMatched(const CLzmaProb *probs, UInt32 symbol, UInt32 matchByte, UInt32 *ProbPrices) +{ + UInt32 price = 0; + UInt32 offs = 0x100; + symbol |= 0x100; + do + { + matchByte <<= 1; + price += GET_PRICEa(probs[offs + (matchByte & offs) + (symbol >> 8)], (symbol >> 7) & 1); + symbol <<= 1; + offs &= ~(matchByte ^ symbol); + } + while (symbol < 0x10000); + return price; +} + + +static void RcTree_Encode(CRangeEnc *rc, CLzmaProb *probs, int numBitLevels, UInt32 symbol) +{ + UInt32 m = 1; + int i; + for (i = numBitLevels; i != 0;) + { + UInt32 bit; + i--; + bit = (symbol >> i) & 1; + RangeEnc_EncodeBit(rc, probs + m, bit); + m = (m << 1) | bit; + } +} + +static void RcTree_ReverseEncode(CRangeEnc *rc, CLzmaProb *probs, int numBitLevels, UInt32 symbol) +{ + UInt32 m = 1; + int i; + for (i = 0; i < numBitLevels; i++) + { + UInt32 bit = symbol & 1; + RangeEnc_EncodeBit(rc, probs + m, bit); + m = (m << 1) | bit; + symbol >>= 1; + } +} + +static UInt32 RcTree_GetPrice(const CLzmaProb *probs, int numBitLevels, UInt32 symbol, UInt32 *ProbPrices) +{ + UInt32 price = 0; + symbol |= (1 << numBitLevels); + while (symbol != 1) + { + price += GET_PRICEa(probs[symbol >> 1], symbol & 1); + symbol >>= 1; + } + return price; +} + +static UInt32 RcTree_ReverseGetPrice(const CLzmaProb *probs, int numBitLevels, UInt32 symbol, UInt32 *ProbPrices) +{ + UInt32 price = 0; + UInt32 m = 1; + int i; + for (i = numBitLevels; i != 0; i--) + { + UInt32 bit = symbol & 1; + symbol >>= 1; + price += GET_PRICEa(probs[m], bit); + m = (m << 1) | bit; + } + return price; +} + + +static void LenEnc_Init(CLenEnc *p) +{ + unsigned i; + p->choice = p->choice2 = kProbInitValue; + for (i = 0; i < (LZMA_NUM_PB_STATES_MAX << kLenNumLowBits); i++) + p->low[i] = kProbInitValue; + for (i = 0; i < (LZMA_NUM_PB_STATES_MAX << kLenNumMidBits); i++) + p->mid[i] = kProbInitValue; + for (i = 0; i < kLenNumHighSymbols; i++) + p->high[i] = kProbInitValue; +} + +static void LenEnc_Encode(CLenEnc *p, CRangeEnc *rc, UInt32 symbol, UInt32 posState) +{ + if (symbol < kLenNumLowSymbols) + { + RangeEnc_EncodeBit(rc, &p->choice, 0); + RcTree_Encode(rc, p->low + (posState << kLenNumLowBits), kLenNumLowBits, symbol); + } + else + { + RangeEnc_EncodeBit(rc, &p->choice, 1); + if (symbol < kLenNumLowSymbols + kLenNumMidSymbols) + { + RangeEnc_EncodeBit(rc, &p->choice2, 0); + RcTree_Encode(rc, p->mid + (posState << kLenNumMidBits), kLenNumMidBits, symbol - kLenNumLowSymbols); + } + else + { + RangeEnc_EncodeBit(rc, &p->choice2, 1); + RcTree_Encode(rc, p->high, kLenNumHighBits, symbol - kLenNumLowSymbols - kLenNumMidSymbols); + } + } +} + +static void LenEnc_SetPrices(CLenEnc *p, UInt32 posState, UInt32 numSymbols, UInt32 *prices, UInt32 *ProbPrices) +{ + UInt32 a0 = GET_PRICE_0a(p->choice); + UInt32 a1 = GET_PRICE_1a(p->choice); + UInt32 b0 = a1 + GET_PRICE_0a(p->choice2); + UInt32 b1 = a1 + GET_PRICE_1a(p->choice2); + UInt32 i = 0; + for (i = 0; i < kLenNumLowSymbols; i++) + { + if (i >= numSymbols) + return; + prices[i] = a0 + RcTree_GetPrice(p->low + (posState << kLenNumLowBits), kLenNumLowBits, i, ProbPrices); + } + for (; i < kLenNumLowSymbols + kLenNumMidSymbols; i++) + { + if (i >= numSymbols) + return; + prices[i] = b0 + RcTree_GetPrice(p->mid + (posState << kLenNumMidBits), kLenNumMidBits, i - kLenNumLowSymbols, ProbPrices); + } + for (; i < numSymbols; i++) + prices[i] = b1 + RcTree_GetPrice(p->high, kLenNumHighBits, i - kLenNumLowSymbols - kLenNumMidSymbols, ProbPrices); +} + +static void MY_FAST_CALL LenPriceEnc_UpdateTable(CLenPriceEnc *p, UInt32 posState, UInt32 *ProbPrices) +{ + LenEnc_SetPrices(&p->p, posState, p->tableSize, p->prices[posState], ProbPrices); + p->counters[posState] = p->tableSize; +} + +static void LenPriceEnc_UpdateTables(CLenPriceEnc *p, UInt32 numPosStates, UInt32 *ProbPrices) +{ + UInt32 posState; + for (posState = 0; posState < numPosStates; posState++) + LenPriceEnc_UpdateTable(p, posState, ProbPrices); +} + +static void LenEnc_Encode2(CLenPriceEnc *p, CRangeEnc *rc, UInt32 symbol, UInt32 posState, Bool updatePrice, UInt32 *ProbPrices) +{ + LenEnc_Encode(&p->p, rc, symbol, posState); + if (updatePrice) + if (--p->counters[posState] == 0) + LenPriceEnc_UpdateTable(p, posState, ProbPrices); +} + + + + +static void MovePos(CLzmaEnc *p, UInt32 num) +{ + #ifdef SHOW_STAT + ttt += num; + printf("\n MovePos %d", num); + #endif + if (num != 0) + { + p->additionalOffset += num; + p->matchFinder.Skip(p->matchFinderObj, num); + } +} + +static UInt32 ReadMatchDistances(CLzmaEnc *p, UInt32 *numDistancePairsRes) +{ + UInt32 lenRes = 0, numPairs; + p->numAvail = p->matchFinder.GetNumAvailableBytes(p->matchFinderObj); + numPairs = p->matchFinder.GetMatches(p->matchFinderObj, p->matches); + #ifdef SHOW_STAT + printf("\n i = %d numPairs = %d ", ttt, numPairs / 2); + ttt++; + { + UInt32 i; + for (i = 0; i < numPairs; i += 2) + printf("%2d %6d | ", p->matches[i], p->matches[i + 1]); + } + #endif + if (numPairs > 0) + { + lenRes = p->matches[numPairs - 2]; + if (lenRes == p->numFastBytes) + { + const Byte *pby = p->matchFinder.GetPointerToCurrentPos(p->matchFinderObj) - 1; + UInt32 distance = p->matches[numPairs - 1] + 1; + UInt32 numAvail = p->numAvail; + if (numAvail > LZMA_MATCH_LEN_MAX) + numAvail = LZMA_MATCH_LEN_MAX; + { + const Byte *pby2 = pby - distance; + for (; lenRes < numAvail && pby[lenRes] == pby2[lenRes]; lenRes++); + } + } + } + p->additionalOffset++; + *numDistancePairsRes = numPairs; + return lenRes; +} + + +#define MakeAsChar(p) (p)->backPrev = (UInt32)(-1); (p)->prev1IsChar = False; +#define MakeAsShortRep(p) (p)->backPrev = 0; (p)->prev1IsChar = False; +#define IsShortRep(p) ((p)->backPrev == 0) + +static UInt32 GetRepLen1Price(CLzmaEnc *p, UInt32 state, UInt32 posState) +{ + return + GET_PRICE_0(p->isRepG0[state]) + + GET_PRICE_0(p->isRep0Long[state][posState]); +} + +static UInt32 GetPureRepPrice(CLzmaEnc *p, UInt32 repIndex, UInt32 state, UInt32 posState) +{ + UInt32 price; + if (repIndex == 0) + { + price = GET_PRICE_0(p->isRepG0[state]); + price += GET_PRICE_1(p->isRep0Long[state][posState]); + } + else + { + price = GET_PRICE_1(p->isRepG0[state]); + if (repIndex == 1) + price += GET_PRICE_0(p->isRepG1[state]); + else + { + price += GET_PRICE_1(p->isRepG1[state]); + price += GET_PRICE(p->isRepG2[state], repIndex - 2); + } + } + return price; +} + +static UInt32 GetRepPrice(CLzmaEnc *p, UInt32 repIndex, UInt32 len, UInt32 state, UInt32 posState) +{ + return p->repLenEnc.prices[posState][len - LZMA_MATCH_LEN_MIN] + + GetPureRepPrice(p, repIndex, state, posState); +} + +static UInt32 Backward(CLzmaEnc *p, UInt32 *backRes, UInt32 cur) +{ + UInt32 posMem = p->opt[cur].posPrev; + UInt32 backMem = p->opt[cur].backPrev; + p->optimumEndIndex = cur; + do + { + if (p->opt[cur].prev1IsChar) + { + MakeAsChar(&p->opt[posMem]) + p->opt[posMem].posPrev = posMem - 1; + if (p->opt[cur].prev2) + { + p->opt[posMem - 1].prev1IsChar = False; + p->opt[posMem - 1].posPrev = p->opt[cur].posPrev2; + p->opt[posMem - 1].backPrev = p->opt[cur].backPrev2; + } + } + { + UInt32 posPrev = posMem; + UInt32 backCur = backMem; + + backMem = p->opt[posPrev].backPrev; + posMem = p->opt[posPrev].posPrev; + + p->opt[posPrev].backPrev = backCur; + p->opt[posPrev].posPrev = cur; + cur = posPrev; + } + } + while (cur != 0); + *backRes = p->opt[0].backPrev; + p->optimumCurrentIndex = p->opt[0].posPrev; + return p->optimumCurrentIndex; +} + +#define LIT_PROBS(pos, prevByte) (p->litProbs + ((((pos) & p->lpMask) << p->lc) + ((prevByte) >> (8 - p->lc))) * 0x300) + +static UInt32 GetOptimum(CLzmaEnc *p, UInt32 position, UInt32 *backRes) +{ + UInt32 numAvail, mainLen, numPairs, repMaxIndex, i, posState, lenEnd, len, cur; + UInt32 matchPrice, repMatchPrice, normalMatchPrice; + UInt32 reps[LZMA_NUM_REPS], repLens[LZMA_NUM_REPS]; + UInt32 *matches; + const Byte *data; + Byte curByte, matchByte; + if (p->optimumEndIndex != p->optimumCurrentIndex) + { + const COptimal *opt = &p->opt[p->optimumCurrentIndex]; + UInt32 lenRes = opt->posPrev - p->optimumCurrentIndex; + *backRes = opt->backPrev; + p->optimumCurrentIndex = opt->posPrev; + return lenRes; + } + p->optimumCurrentIndex = p->optimumEndIndex = 0; + + if (p->additionalOffset == 0) + mainLen = ReadMatchDistances(p, &numPairs); + else + { + mainLen = p->longestMatchLength; + numPairs = p->numPairs; + } + + numAvail = p->numAvail; + if (numAvail < 2) + { + *backRes = (UInt32)(-1); + return 1; + } + if (numAvail > LZMA_MATCH_LEN_MAX) + numAvail = LZMA_MATCH_LEN_MAX; + + data = p->matchFinder.GetPointerToCurrentPos(p->matchFinderObj) - 1; + repMaxIndex = 0; + for (i = 0; i < LZMA_NUM_REPS; i++) + { + UInt32 lenTest; + const Byte *data2; + reps[i] = p->reps[i]; + data2 = data - (reps[i] + 1); + if (data[0] != data2[0] || data[1] != data2[1]) + { + repLens[i] = 0; + continue; + } + for (lenTest = 2; lenTest < numAvail && data[lenTest] == data2[lenTest]; lenTest++); + repLens[i] = lenTest; + if (lenTest > repLens[repMaxIndex]) + repMaxIndex = i; + } + if (repLens[repMaxIndex] >= p->numFastBytes) + { + UInt32 lenRes; + *backRes = repMaxIndex; + lenRes = repLens[repMaxIndex]; + MovePos(p, lenRes - 1); + return lenRes; + } + + matches = p->matches; + if (mainLen >= p->numFastBytes) + { + *backRes = matches[numPairs - 1] + LZMA_NUM_REPS; + MovePos(p, mainLen - 1); + return mainLen; + } + curByte = *data; + matchByte = *(data - (reps[0] + 1)); + + if (mainLen < 2 && curByte != matchByte && repLens[repMaxIndex] < 2) + { + *backRes = (UInt32)-1; + return 1; + } + + p->opt[0].state = (CState)p->state; + + posState = (position & p->pbMask); + + { + const CLzmaProb *probs = LIT_PROBS(position, *(data - 1)); + p->opt[1].price = GET_PRICE_0(p->isMatch[p->state][posState]) + + (!IsCharState(p->state) ? + LitEnc_GetPriceMatched(probs, curByte, matchByte, p->ProbPrices) : + LitEnc_GetPrice(probs, curByte, p->ProbPrices)); + } + + MakeAsChar(&p->opt[1]); + + matchPrice = GET_PRICE_1(p->isMatch[p->state][posState]); + repMatchPrice = matchPrice + GET_PRICE_1(p->isRep[p->state]); + + if (matchByte == curByte) + { + UInt32 shortRepPrice = repMatchPrice + GetRepLen1Price(p, p->state, posState); + if (shortRepPrice < p->opt[1].price) + { + p->opt[1].price = shortRepPrice; + MakeAsShortRep(&p->opt[1]); + } + } + lenEnd = ((mainLen >= repLens[repMaxIndex]) ? mainLen : repLens[repMaxIndex]); + + if (lenEnd < 2) + { + *backRes = p->opt[1].backPrev; + return 1; + } + + p->opt[1].posPrev = 0; + for (i = 0; i < LZMA_NUM_REPS; i++) + p->opt[0].backs[i] = reps[i]; + + len = lenEnd; + do + p->opt[len--].price = kInfinityPrice; + while (len >= 2); + + for (i = 0; i < LZMA_NUM_REPS; i++) + { + UInt32 repLen = repLens[i]; + UInt32 price; + if (repLen < 2) + continue; + price = repMatchPrice + GetPureRepPrice(p, i, p->state, posState); + do + { + UInt32 curAndLenPrice = price + p->repLenEnc.prices[posState][repLen - 2]; + COptimal *opt = &p->opt[repLen]; + if (curAndLenPrice < opt->price) + { + opt->price = curAndLenPrice; + opt->posPrev = 0; + opt->backPrev = i; + opt->prev1IsChar = False; + } + } + while (--repLen >= 2); + } + + normalMatchPrice = matchPrice + GET_PRICE_0(p->isRep[p->state]); + + len = ((repLens[0] >= 2) ? repLens[0] + 1 : 2); + if (len <= mainLen) + { + UInt32 offs = 0; + while (len > matches[offs]) + offs += 2; + for (; ; len++) + { + COptimal *opt; + UInt32 distance = matches[offs + 1]; + + UInt32 curAndLenPrice = normalMatchPrice + p->lenEnc.prices[posState][len - LZMA_MATCH_LEN_MIN]; + UInt32 lenToPosState = GetLenToPosState(len); + if (distance < kNumFullDistances) + curAndLenPrice += p->distancesPrices[lenToPosState][distance]; + else + { + UInt32 slot; + GetPosSlot2(distance, slot); + curAndLenPrice += p->alignPrices[distance & kAlignMask] + p->posSlotPrices[lenToPosState][slot]; + } + opt = &p->opt[len]; + if (curAndLenPrice < opt->price) + { + opt->price = curAndLenPrice; + opt->posPrev = 0; + opt->backPrev = distance + LZMA_NUM_REPS; + opt->prev1IsChar = False; + } + if (len == matches[offs]) + { + offs += 2; + if (offs == numPairs) + break; + } + } + } + + cur = 0; + + #ifdef SHOW_STAT2 + if (position >= 0) + { + unsigned i; + printf("\n pos = %4X", position); + for (i = cur; i <= lenEnd; i++) + printf("\nprice[%4X] = %d", position - cur + i, p->opt[i].price); + } + #endif + + for (;;) + { + UInt32 numAvailFull, newLen, numPairs, posPrev, state, posState, startLen; + UInt32 curPrice, curAnd1Price, matchPrice, repMatchPrice; + Bool nextIsChar; + Byte curByte, matchByte; + const Byte *data; + COptimal *curOpt; + COptimal *nextOpt; + + cur++; + if (cur == lenEnd) + return Backward(p, backRes, cur); + + newLen = ReadMatchDistances(p, &numPairs); + if (newLen >= p->numFastBytes) + { + p->numPairs = numPairs; + p->longestMatchLength = newLen; + return Backward(p, backRes, cur); + } + position++; + curOpt = &p->opt[cur]; + posPrev = curOpt->posPrev; + if (curOpt->prev1IsChar) + { + posPrev--; + if (curOpt->prev2) + { + state = p->opt[curOpt->posPrev2].state; + if (curOpt->backPrev2 < LZMA_NUM_REPS) + state = kRepNextStates[state]; + else + state = kMatchNextStates[state]; + } + else + state = p->opt[posPrev].state; + state = kLiteralNextStates[state]; + } + else + state = p->opt[posPrev].state; + if (posPrev == cur - 1) + { + if (IsShortRep(curOpt)) + state = kShortRepNextStates[state]; + else + state = kLiteralNextStates[state]; + } + else + { + UInt32 pos; + const COptimal *prevOpt; + if (curOpt->prev1IsChar && curOpt->prev2) + { + posPrev = curOpt->posPrev2; + pos = curOpt->backPrev2; + state = kRepNextStates[state]; + } + else + { + pos = curOpt->backPrev; + if (pos < LZMA_NUM_REPS) + state = kRepNextStates[state]; + else + state = kMatchNextStates[state]; + } + prevOpt = &p->opt[posPrev]; + if (pos < LZMA_NUM_REPS) + { + UInt32 i; + reps[0] = prevOpt->backs[pos]; + for (i = 1; i <= pos; i++) + reps[i] = prevOpt->backs[i - 1]; + for (; i < LZMA_NUM_REPS; i++) + reps[i] = prevOpt->backs[i]; + } + else + { + UInt32 i; + reps[0] = (pos - LZMA_NUM_REPS); + for (i = 1; i < LZMA_NUM_REPS; i++) + reps[i] = prevOpt->backs[i - 1]; + } + } + curOpt->state = (CState)state; + + curOpt->backs[0] = reps[0]; + curOpt->backs[1] = reps[1]; + curOpt->backs[2] = reps[2]; + curOpt->backs[3] = reps[3]; + + curPrice = curOpt->price; + nextIsChar = False; + data = p->matchFinder.GetPointerToCurrentPos(p->matchFinderObj) - 1; + curByte = *data; + matchByte = *(data - (reps[0] + 1)); + + posState = (position & p->pbMask); + + curAnd1Price = curPrice + GET_PRICE_0(p->isMatch[state][posState]); + { + const CLzmaProb *probs = LIT_PROBS(position, *(data - 1)); + curAnd1Price += + (!IsCharState(state) ? + LitEnc_GetPriceMatched(probs, curByte, matchByte, p->ProbPrices) : + LitEnc_GetPrice(probs, curByte, p->ProbPrices)); + } + + nextOpt = &p->opt[cur + 1]; + + if (curAnd1Price < nextOpt->price) + { + nextOpt->price = curAnd1Price; + nextOpt->posPrev = cur; + MakeAsChar(nextOpt); + nextIsChar = True; + } + + matchPrice = curPrice + GET_PRICE_1(p->isMatch[state][posState]); + repMatchPrice = matchPrice + GET_PRICE_1(p->isRep[state]); + + if (matchByte == curByte && !(nextOpt->posPrev < cur && nextOpt->backPrev == 0)) + { + UInt32 shortRepPrice = repMatchPrice + GetRepLen1Price(p, state, posState); + if (shortRepPrice <= nextOpt->price) + { + nextOpt->price = shortRepPrice; + nextOpt->posPrev = cur; + MakeAsShortRep(nextOpt); + nextIsChar = True; + } + } + numAvailFull = p->numAvail; + { + UInt32 temp = kNumOpts - 1 - cur; + if (temp < numAvailFull) + numAvailFull = temp; + } + + if (numAvailFull < 2) + continue; + numAvail = (numAvailFull <= p->numFastBytes ? numAvailFull : p->numFastBytes); + + if (!nextIsChar && matchByte != curByte) /* speed optimization */ + { + /* try Literal + rep0 */ + UInt32 temp; + UInt32 lenTest2; + const Byte *data2 = data - (reps[0] + 1); + UInt32 limit = p->numFastBytes + 1; + if (limit > numAvailFull) + limit = numAvailFull; + + for (temp = 1; temp < limit && data[temp] == data2[temp]; temp++); + lenTest2 = temp - 1; + if (lenTest2 >= 2) + { + UInt32 state2 = kLiteralNextStates[state]; + UInt32 posStateNext = (position + 1) & p->pbMask; + UInt32 nextRepMatchPrice = curAnd1Price + + GET_PRICE_1(p->isMatch[state2][posStateNext]) + + GET_PRICE_1(p->isRep[state2]); + /* for (; lenTest2 >= 2; lenTest2--) */ + { + UInt32 curAndLenPrice; + COptimal *opt; + UInt32 offset = cur + 1 + lenTest2; + while (lenEnd < offset) + p->opt[++lenEnd].price = kInfinityPrice; + curAndLenPrice = nextRepMatchPrice + GetRepPrice(p, 0, lenTest2, state2, posStateNext); + opt = &p->opt[offset]; + if (curAndLenPrice < opt->price) + { + opt->price = curAndLenPrice; + opt->posPrev = cur + 1; + opt->backPrev = 0; + opt->prev1IsChar = True; + opt->prev2 = False; + } + } + } + } + + startLen = 2; /* speed optimization */ + { + UInt32 repIndex; + for (repIndex = 0; repIndex < LZMA_NUM_REPS; repIndex++) + { + UInt32 lenTest; + UInt32 lenTestTemp; + UInt32 price; + const Byte *data2 = data - (reps[repIndex] + 1); + if (data[0] != data2[0] || data[1] != data2[1]) + continue; + for (lenTest = 2; lenTest < numAvail && data[lenTest] == data2[lenTest]; lenTest++); + while (lenEnd < cur + lenTest) + p->opt[++lenEnd].price = kInfinityPrice; + lenTestTemp = lenTest; + price = repMatchPrice + GetPureRepPrice(p, repIndex, state, posState); + do + { + UInt32 curAndLenPrice = price + p->repLenEnc.prices[posState][lenTest - 2]; + COptimal *opt = &p->opt[cur + lenTest]; + if (curAndLenPrice < opt->price) + { + opt->price = curAndLenPrice; + opt->posPrev = cur; + opt->backPrev = repIndex; + opt->prev1IsChar = False; + } + } + while (--lenTest >= 2); + lenTest = lenTestTemp; + + if (repIndex == 0) + startLen = lenTest + 1; + + /* if (_maxMode) */ + { + UInt32 lenTest2 = lenTest + 1; + UInt32 limit = lenTest2 + p->numFastBytes; + UInt32 nextRepMatchPrice; + if (limit > numAvailFull) + limit = numAvailFull; + for (; lenTest2 < limit && data[lenTest2] == data2[lenTest2]; lenTest2++); + lenTest2 -= lenTest + 1; + if (lenTest2 >= 2) + { + UInt32 state2 = kRepNextStates[state]; + UInt32 posStateNext = (position + lenTest) & p->pbMask; + UInt32 curAndLenCharPrice = + price + p->repLenEnc.prices[posState][lenTest - 2] + + GET_PRICE_0(p->isMatch[state2][posStateNext]) + + LitEnc_GetPriceMatched(LIT_PROBS(position + lenTest, data[lenTest - 1]), + data[lenTest], data2[lenTest], p->ProbPrices); + state2 = kLiteralNextStates[state2]; + posStateNext = (position + lenTest + 1) & p->pbMask; + nextRepMatchPrice = curAndLenCharPrice + + GET_PRICE_1(p->isMatch[state2][posStateNext]) + + GET_PRICE_1(p->isRep[state2]); + + /* for (; lenTest2 >= 2; lenTest2--) */ + { + UInt32 curAndLenPrice; + COptimal *opt; + UInt32 offset = cur + lenTest + 1 + lenTest2; + while (lenEnd < offset) + p->opt[++lenEnd].price = kInfinityPrice; + curAndLenPrice = nextRepMatchPrice + GetRepPrice(p, 0, lenTest2, state2, posStateNext); + opt = &p->opt[offset]; + if (curAndLenPrice < opt->price) + { + opt->price = curAndLenPrice; + opt->posPrev = cur + lenTest + 1; + opt->backPrev = 0; + opt->prev1IsChar = True; + opt->prev2 = True; + opt->posPrev2 = cur; + opt->backPrev2 = repIndex; + } + } + } + } + } + } + /* for (UInt32 lenTest = 2; lenTest <= newLen; lenTest++) */ + if (newLen > numAvail) + { + newLen = numAvail; + for (numPairs = 0; newLen > matches[numPairs]; numPairs += 2); + matches[numPairs] = newLen; + numPairs += 2; + } + if (newLen >= startLen) + { + UInt32 normalMatchPrice = matchPrice + GET_PRICE_0(p->isRep[state]); + UInt32 offs, curBack, posSlot; + UInt32 lenTest; + while (lenEnd < cur + newLen) + p->opt[++lenEnd].price = kInfinityPrice; + + offs = 0; + while (startLen > matches[offs]) + offs += 2; + curBack = matches[offs + 1]; + GetPosSlot2(curBack, posSlot); + for (lenTest = /*2*/ startLen; ; lenTest++) + { + UInt32 curAndLenPrice = normalMatchPrice + p->lenEnc.prices[posState][lenTest - LZMA_MATCH_LEN_MIN]; + UInt32 lenToPosState = GetLenToPosState(lenTest); + COptimal *opt; + if (curBack < kNumFullDistances) + curAndLenPrice += p->distancesPrices[lenToPosState][curBack]; + else + curAndLenPrice += p->posSlotPrices[lenToPosState][posSlot] + p->alignPrices[curBack & kAlignMask]; + + opt = &p->opt[cur + lenTest]; + if (curAndLenPrice < opt->price) + { + opt->price = curAndLenPrice; + opt->posPrev = cur; + opt->backPrev = curBack + LZMA_NUM_REPS; + opt->prev1IsChar = False; + } + + if (/*_maxMode && */lenTest == matches[offs]) + { + /* Try Match + Literal + Rep0 */ + const Byte *data2 = data - (curBack + 1); + UInt32 lenTest2 = lenTest + 1; + UInt32 limit = lenTest2 + p->numFastBytes; + UInt32 nextRepMatchPrice; + if (limit > numAvailFull) + limit = numAvailFull; + for (; lenTest2 < limit && data[lenTest2] == data2[lenTest2]; lenTest2++); + lenTest2 -= lenTest + 1; + if (lenTest2 >= 2) + { + UInt32 state2 = kMatchNextStates[state]; + UInt32 posStateNext = (position + lenTest) & p->pbMask; + UInt32 curAndLenCharPrice = curAndLenPrice + + GET_PRICE_0(p->isMatch[state2][posStateNext]) + + LitEnc_GetPriceMatched(LIT_PROBS(position + lenTest, data[lenTest - 1]), + data[lenTest], data2[lenTest], p->ProbPrices); + state2 = kLiteralNextStates[state2]; + posStateNext = (posStateNext + 1) & p->pbMask; + nextRepMatchPrice = curAndLenCharPrice + + GET_PRICE_1(p->isMatch[state2][posStateNext]) + + GET_PRICE_1(p->isRep[state2]); + + /* for (; lenTest2 >= 2; lenTest2--) */ + { + UInt32 offset = cur + lenTest + 1 + lenTest2; + UInt32 curAndLenPrice; + COptimal *opt; + while (lenEnd < offset) + p->opt[++lenEnd].price = kInfinityPrice; + curAndLenPrice = nextRepMatchPrice + GetRepPrice(p, 0, lenTest2, state2, posStateNext); + opt = &p->opt[offset]; + if (curAndLenPrice < opt->price) + { + opt->price = curAndLenPrice; + opt->posPrev = cur + lenTest + 1; + opt->backPrev = 0; + opt->prev1IsChar = True; + opt->prev2 = True; + opt->posPrev2 = cur; + opt->backPrev2 = curBack + LZMA_NUM_REPS; + } + } + } + offs += 2; + if (offs == numPairs) + break; + curBack = matches[offs + 1]; + if (curBack >= kNumFullDistances) + GetPosSlot2(curBack, posSlot); + } + } + } + } +} + +#define ChangePair(smallDist, bigDist) (((bigDist) >> 7) > (smallDist)) + +static UInt32 GetOptimumFast(CLzmaEnc *p, UInt32 *backRes) +{ + UInt32 numAvail, mainLen, mainDist, numPairs, repIndex, repLen, i; + const Byte *data; + const UInt32 *matches; + + if (p->additionalOffset == 0) + mainLen = ReadMatchDistances(p, &numPairs); + else + { + mainLen = p->longestMatchLength; + numPairs = p->numPairs; + } + + numAvail = p->numAvail; + *backRes = (UInt32)-1; + if (numAvail < 2) + return 1; + if (numAvail > LZMA_MATCH_LEN_MAX) + numAvail = LZMA_MATCH_LEN_MAX; + data = p->matchFinder.GetPointerToCurrentPos(p->matchFinderObj) - 1; + + repLen = repIndex = 0; + for (i = 0; i < LZMA_NUM_REPS; i++) + { + UInt32 len; + const Byte *data2 = data - (p->reps[i] + 1); + if (data[0] != data2[0] || data[1] != data2[1]) + continue; + for (len = 2; len < numAvail && data[len] == data2[len]; len++); + if (len >= p->numFastBytes) + { + *backRes = i; + MovePos(p, len - 1); + return len; + } + if (len > repLen) + { + repIndex = i; + repLen = len; + } + } + + matches = p->matches; + if (mainLen >= p->numFastBytes) + { + *backRes = matches[numPairs - 1] + LZMA_NUM_REPS; + MovePos(p, mainLen - 1); + return mainLen; + } + + mainDist = 0; /* for GCC */ + if (mainLen >= 2) + { + mainDist = matches[numPairs - 1]; + while (numPairs > 2 && mainLen == matches[numPairs - 4] + 1) + { + if (!ChangePair(matches[numPairs - 3], mainDist)) + break; + numPairs -= 2; + mainLen = matches[numPairs - 2]; + mainDist = matches[numPairs - 1]; + } + if (mainLen == 2 && mainDist >= 0x80) + mainLen = 1; + } + + if (repLen >= 2 && ( + (repLen + 1 >= mainLen) || + (repLen + 2 >= mainLen && mainDist >= (1 << 9)) || + (repLen + 3 >= mainLen && mainDist >= (1 << 15)))) + { + *backRes = repIndex; + MovePos(p, repLen - 1); + return repLen; + } + + if (mainLen < 2 || numAvail <= 2) + return 1; + + p->longestMatchLength = ReadMatchDistances(p, &p->numPairs); + if (p->longestMatchLength >= 2) + { + UInt32 newDistance = matches[p->numPairs - 1]; + if ((p->longestMatchLength >= mainLen && newDistance < mainDist) || + (p->longestMatchLength == mainLen + 1 && !ChangePair(mainDist, newDistance)) || + (p->longestMatchLength > mainLen + 1) || + (p->longestMatchLength + 1 >= mainLen && mainLen >= 3 && ChangePair(newDistance, mainDist))) + return 1; + } + + data = p->matchFinder.GetPointerToCurrentPos(p->matchFinderObj) - 1; + for (i = 0; i < LZMA_NUM_REPS; i++) + { + UInt32 len, limit; + const Byte *data2 = data - (p->reps[i] + 1); + if (data[0] != data2[0] || data[1] != data2[1]) + continue; + limit = mainLen - 1; + for (len = 2; len < limit && data[len] == data2[len]; len++); + if (len >= limit) + return 1; + } + *backRes = mainDist + LZMA_NUM_REPS; + MovePos(p, mainLen - 2); + return mainLen; +} + +static void WriteEndMarker(CLzmaEnc *p, UInt32 posState) +{ + UInt32 len; + RangeEnc_EncodeBit(&p->rc, &p->isMatch[p->state][posState], 1); + RangeEnc_EncodeBit(&p->rc, &p->isRep[p->state], 0); + p->state = kMatchNextStates[p->state]; + len = LZMA_MATCH_LEN_MIN; + LenEnc_Encode2(&p->lenEnc, &p->rc, len - LZMA_MATCH_LEN_MIN, posState, !p->fastMode, p->ProbPrices); + RcTree_Encode(&p->rc, p->posSlotEncoder[GetLenToPosState(len)], kNumPosSlotBits, (1 << kNumPosSlotBits) - 1); + RangeEnc_EncodeDirectBits(&p->rc, (((UInt32)1 << 30) - 1) >> kNumAlignBits, 30 - kNumAlignBits); + RcTree_ReverseEncode(&p->rc, p->posAlignEncoder, kNumAlignBits, kAlignMask); +} + +static SRes CheckErrors(CLzmaEnc *p) +{ + if (p->result != SZ_OK) + return p->result; + if (p->rc.res != SZ_OK) + p->result = SZ_ERROR_WRITE; + if (p->matchFinderBase.result != SZ_OK) + p->result = SZ_ERROR_READ; + if (p->result != SZ_OK) + p->finished = True; + return p->result; +} + +static SRes Flush(CLzmaEnc *p, UInt32 nowPos) +{ + /* ReleaseMFStream(); */ + p->finished = True; + if (p->writeEndMark) + WriteEndMarker(p, nowPos & p->pbMask); + RangeEnc_FlushData(&p->rc); + RangeEnc_FlushStream(&p->rc); + return CheckErrors(p); +} + +static void FillAlignPrices(CLzmaEnc *p) +{ + UInt32 i; + for (i = 0; i < kAlignTableSize; i++) + p->alignPrices[i] = RcTree_ReverseGetPrice(p->posAlignEncoder, kNumAlignBits, i, p->ProbPrices); + p->alignPriceCount = 0; +} + +static void FillDistancesPrices(CLzmaEnc *p) +{ + UInt32 tempPrices[kNumFullDistances]; + UInt32 i, lenToPosState; + for (i = kStartPosModelIndex; i < kNumFullDistances; i++) + { + UInt32 posSlot = GetPosSlot1(i); + UInt32 footerBits = ((posSlot >> 1) - 1); + UInt32 base = ((2 | (posSlot & 1)) << footerBits); + tempPrices[i] = RcTree_ReverseGetPrice(p->posEncoders + base - posSlot - 1, footerBits, i - base, p->ProbPrices); + } + + for (lenToPosState = 0; lenToPosState < kNumLenToPosStates; lenToPosState++) + { + UInt32 posSlot; + const CLzmaProb *encoder = p->posSlotEncoder[lenToPosState]; + UInt32 *posSlotPrices = p->posSlotPrices[lenToPosState]; + for (posSlot = 0; posSlot < p->distTableSize; posSlot++) + posSlotPrices[posSlot] = RcTree_GetPrice(encoder, kNumPosSlotBits, posSlot, p->ProbPrices); + for (posSlot = kEndPosModelIndex; posSlot < p->distTableSize; posSlot++) + posSlotPrices[posSlot] += ((((posSlot >> 1) - 1) - kNumAlignBits) << kNumBitPriceShiftBits); + + { + UInt32 *distancesPrices = p->distancesPrices[lenToPosState]; + UInt32 i; + for (i = 0; i < kStartPosModelIndex; i++) + distancesPrices[i] = posSlotPrices[i]; + for (; i < kNumFullDistances; i++) + distancesPrices[i] = posSlotPrices[GetPosSlot1(i)] + tempPrices[i]; + } + } + p->matchPriceCount = 0; +} + +void LzmaEnc_Construct(CLzmaEnc *p) +{ + RangeEnc_Construct(&p->rc); + MatchFinder_Construct(&p->matchFinderBase); + #ifndef _7ZIP_ST + MatchFinderMt_Construct(&p->matchFinderMt); + p->matchFinderMt.MatchFinder = &p->matchFinderBase; + #endif + + { + CLzmaEncProps props; + LzmaEncProps_Init(&props); + LzmaEnc_SetProps(p, &props); + } + + #ifndef LZMA_LOG_BSR + LzmaEnc_FastPosInit(p->g_FastPos); + #endif + + LzmaEnc_InitPriceTables(p->ProbPrices); + p->litProbs = 0; + p->saveState.litProbs = 0; +} + +CLzmaEncHandle LzmaEnc_Create(ISzAlloc *alloc) +{ + void *p; + p = alloc->Alloc(alloc, sizeof(CLzmaEnc)); + if (p != 0) + LzmaEnc_Construct((CLzmaEnc *)p); + return p; +} + +void LzmaEnc_FreeLits(CLzmaEnc *p, ISzAlloc *alloc) +{ + alloc->Free(alloc, p->litProbs); + alloc->Free(alloc, p->saveState.litProbs); + p->litProbs = 0; + p->saveState.litProbs = 0; +} + +void LzmaEnc_Destruct(CLzmaEnc *p, ISzAlloc *alloc, ISzAlloc *allocBig) +{ + #ifndef _7ZIP_ST + MatchFinderMt_Destruct(&p->matchFinderMt, allocBig); + #endif + MatchFinder_Free(&p->matchFinderBase, allocBig); + LzmaEnc_FreeLits(p, alloc); + RangeEnc_Free(&p->rc, alloc); +} + +void LzmaEnc_Destroy(CLzmaEncHandle p, ISzAlloc *alloc, ISzAlloc *allocBig) +{ + LzmaEnc_Destruct((CLzmaEnc *)p, alloc, allocBig); + alloc->Free(alloc, p); +} + +static SRes LzmaEnc_CodeOneBlock(CLzmaEnc *p, Bool useLimits, UInt32 maxPackSize, UInt32 maxUnpackSize) +{ + UInt32 nowPos32, startPos32; + if (p->needInit) + { + p->matchFinder.Init(p->matchFinderObj); + p->needInit = 0; + } + + if (p->finished) + return p->result; + RINOK(CheckErrors(p)); + + nowPos32 = (UInt32)p->nowPos64; + startPos32 = nowPos32; + + if (p->nowPos64 == 0) + { + UInt32 numPairs; + Byte curByte; + if (p->matchFinder.GetNumAvailableBytes(p->matchFinderObj) == 0) + return Flush(p, nowPos32); + ReadMatchDistances(p, &numPairs); + RangeEnc_EncodeBit(&p->rc, &p->isMatch[p->state][0], 0); + p->state = kLiteralNextStates[p->state]; + curByte = p->matchFinder.GetIndexByte(p->matchFinderObj, 0 - p->additionalOffset); + LitEnc_Encode(&p->rc, p->litProbs, curByte); + p->additionalOffset--; + nowPos32++; + } + + if (p->matchFinder.GetNumAvailableBytes(p->matchFinderObj) != 0) + for (;;) + { + UInt32 pos, len, posState; + + if (p->fastMode) + len = GetOptimumFast(p, &pos); + else + len = GetOptimum(p, nowPos32, &pos); + + #ifdef SHOW_STAT2 + printf("\n pos = %4X, len = %d pos = %d", nowPos32, len, pos); + #endif + + posState = nowPos32 & p->pbMask; + if (len == 1 && pos == (UInt32)-1) + { + Byte curByte; + CLzmaProb *probs; + const Byte *data; + + RangeEnc_EncodeBit(&p->rc, &p->isMatch[p->state][posState], 0); + data = p->matchFinder.GetPointerToCurrentPos(p->matchFinderObj) - p->additionalOffset; + curByte = *data; + probs = LIT_PROBS(nowPos32, *(data - 1)); + if (IsCharState(p->state)) + LitEnc_Encode(&p->rc, probs, curByte); + else + LitEnc_EncodeMatched(&p->rc, probs, curByte, *(data - p->reps[0] - 1)); + p->state = kLiteralNextStates[p->state]; + } + else + { + RangeEnc_EncodeBit(&p->rc, &p->isMatch[p->state][posState], 1); + if (pos < LZMA_NUM_REPS) + { + RangeEnc_EncodeBit(&p->rc, &p->isRep[p->state], 1); + if (pos == 0) + { + RangeEnc_EncodeBit(&p->rc, &p->isRepG0[p->state], 0); + RangeEnc_EncodeBit(&p->rc, &p->isRep0Long[p->state][posState], ((len == 1) ? 0 : 1)); + } + else + { + UInt32 distance = p->reps[pos]; + RangeEnc_EncodeBit(&p->rc, &p->isRepG0[p->state], 1); + if (pos == 1) + RangeEnc_EncodeBit(&p->rc, &p->isRepG1[p->state], 0); + else + { + RangeEnc_EncodeBit(&p->rc, &p->isRepG1[p->state], 1); + RangeEnc_EncodeBit(&p->rc, &p->isRepG2[p->state], pos - 2); + if (pos == 3) + p->reps[3] = p->reps[2]; + p->reps[2] = p->reps[1]; + } + p->reps[1] = p->reps[0]; + p->reps[0] = distance; + } + if (len == 1) + p->state = kShortRepNextStates[p->state]; + else + { + LenEnc_Encode2(&p->repLenEnc, &p->rc, len - LZMA_MATCH_LEN_MIN, posState, !p->fastMode, p->ProbPrices); + p->state = kRepNextStates[p->state]; + } + } + else + { + UInt32 posSlot; + RangeEnc_EncodeBit(&p->rc, &p->isRep[p->state], 0); + p->state = kMatchNextStates[p->state]; + LenEnc_Encode2(&p->lenEnc, &p->rc, len - LZMA_MATCH_LEN_MIN, posState, !p->fastMode, p->ProbPrices); + pos -= LZMA_NUM_REPS; + GetPosSlot(pos, posSlot); + RcTree_Encode(&p->rc, p->posSlotEncoder[GetLenToPosState(len)], kNumPosSlotBits, posSlot); + + if (posSlot >= kStartPosModelIndex) + { + UInt32 footerBits = ((posSlot >> 1) - 1); + UInt32 base = ((2 | (posSlot & 1)) << footerBits); + UInt32 posReduced = pos - base; + + if (posSlot < kEndPosModelIndex) + RcTree_ReverseEncode(&p->rc, p->posEncoders + base - posSlot - 1, footerBits, posReduced); + else + { + RangeEnc_EncodeDirectBits(&p->rc, posReduced >> kNumAlignBits, footerBits - kNumAlignBits); + RcTree_ReverseEncode(&p->rc, p->posAlignEncoder, kNumAlignBits, posReduced & kAlignMask); + p->alignPriceCount++; + } + } + p->reps[3] = p->reps[2]; + p->reps[2] = p->reps[1]; + p->reps[1] = p->reps[0]; + p->reps[0] = pos; + p->matchPriceCount++; + } + } + p->additionalOffset -= len; + nowPos32 += len; + if (p->additionalOffset == 0) + { + UInt32 processed; + if (!p->fastMode) + { + if (p->matchPriceCount >= (1 << 7)) + FillDistancesPrices(p); + if (p->alignPriceCount >= kAlignTableSize) + FillAlignPrices(p); + } + if (p->matchFinder.GetNumAvailableBytes(p->matchFinderObj) == 0) + break; + processed = nowPos32 - startPos32; + if (useLimits) + { + if (processed + kNumOpts + 300 >= maxUnpackSize || + RangeEnc_GetProcessed(&p->rc) + kNumOpts * 2 >= maxPackSize) + break; + } + else if (processed >= (1 << 15)) + { + p->nowPos64 += nowPos32 - startPos32; + return CheckErrors(p); + } + } + } + p->nowPos64 += nowPos32 - startPos32; + return Flush(p, nowPos32); +} + +#define kBigHashDicLimit ((UInt32)1 << 24) + +static SRes LzmaEnc_Alloc(CLzmaEnc *p, UInt32 keepWindowSize, ISzAlloc *alloc, ISzAlloc *allocBig) +{ + UInt32 beforeSize = kNumOpts; + Bool btMode; + if (!RangeEnc_Alloc(&p->rc, alloc)) + return SZ_ERROR_MEM; + btMode = (p->matchFinderBase.btMode != 0); + #ifndef _7ZIP_ST + p->mtMode = (p->multiThread && !p->fastMode && btMode); + #endif + + { + unsigned lclp = p->lc + p->lp; + if (p->litProbs == 0 || p->saveState.litProbs == 0 || p->lclp != lclp) + { + LzmaEnc_FreeLits(p, alloc); + p->litProbs = (CLzmaProb *)alloc->Alloc(alloc, (0x300 << lclp) * sizeof(CLzmaProb)); + p->saveState.litProbs = (CLzmaProb *)alloc->Alloc(alloc, (0x300 << lclp) * sizeof(CLzmaProb)); + if (p->litProbs == 0 || p->saveState.litProbs == 0) + { + LzmaEnc_FreeLits(p, alloc); + return SZ_ERROR_MEM; + } + p->lclp = lclp; + } + } + + p->matchFinderBase.bigHash = (p->dictSize > kBigHashDicLimit); + + if (beforeSize + p->dictSize < keepWindowSize) + beforeSize = keepWindowSize - p->dictSize; + + #ifndef _7ZIP_ST + if (p->mtMode) + { + RINOK(MatchFinderMt_Create(&p->matchFinderMt, p->dictSize, beforeSize, p->numFastBytes, LZMA_MATCH_LEN_MAX, allocBig)); + p->matchFinderObj = &p->matchFinderMt; + MatchFinderMt_CreateVTable(&p->matchFinderMt, &p->matchFinder); + } + else + #endif + { + if (!MatchFinder_Create(&p->matchFinderBase, p->dictSize, beforeSize, p->numFastBytes, LZMA_MATCH_LEN_MAX, allocBig)) + return SZ_ERROR_MEM; + p->matchFinderObj = &p->matchFinderBase; + MatchFinder_CreateVTable(&p->matchFinderBase, &p->matchFinder); + } + return SZ_OK; +} + +void LzmaEnc_Init(CLzmaEnc *p) +{ + UInt32 i; + p->state = 0; + for (i = 0 ; i < LZMA_NUM_REPS; i++) + p->reps[i] = 0; + + RangeEnc_Init(&p->rc); + + + for (i = 0; i < kNumStates; i++) + { + UInt32 j; + for (j = 0; j < LZMA_NUM_PB_STATES_MAX; j++) + { + p->isMatch[i][j] = kProbInitValue; + p->isRep0Long[i][j] = kProbInitValue; + } + p->isRep[i] = kProbInitValue; + p->isRepG0[i] = kProbInitValue; + p->isRepG1[i] = kProbInitValue; + p->isRepG2[i] = kProbInitValue; + } + + { + UInt32 num = 0x300 << (p->lp + p->lc); + for (i = 0; i < num; i++) + p->litProbs[i] = kProbInitValue; + } + + { + for (i = 0; i < kNumLenToPosStates; i++) + { + CLzmaProb *probs = p->posSlotEncoder[i]; + UInt32 j; + for (j = 0; j < (1 << kNumPosSlotBits); j++) + probs[j] = kProbInitValue; + } + } + { + for (i = 0; i < kNumFullDistances - kEndPosModelIndex; i++) + p->posEncoders[i] = kProbInitValue; + } + + LenEnc_Init(&p->lenEnc.p); + LenEnc_Init(&p->repLenEnc.p); + + for (i = 0; i < (1 << kNumAlignBits); i++) + p->posAlignEncoder[i] = kProbInitValue; + + p->optimumEndIndex = 0; + p->optimumCurrentIndex = 0; + p->additionalOffset = 0; + + p->pbMask = (1 << p->pb) - 1; + p->lpMask = (1 << p->lp) - 1; +} + +void LzmaEnc_InitPrices(CLzmaEnc *p) +{ + if (!p->fastMode) + { + FillDistancesPrices(p); + FillAlignPrices(p); + } + + p->lenEnc.tableSize = + p->repLenEnc.tableSize = + p->numFastBytes + 1 - LZMA_MATCH_LEN_MIN; + LenPriceEnc_UpdateTables(&p->lenEnc, 1 << p->pb, p->ProbPrices); + LenPriceEnc_UpdateTables(&p->repLenEnc, 1 << p->pb, p->ProbPrices); +} + +static SRes LzmaEnc_AllocAndInit(CLzmaEnc *p, UInt32 keepWindowSize, ISzAlloc *alloc, ISzAlloc *allocBig) +{ + UInt32 i; + for (i = 0; i < (UInt32)kDicLogSizeMaxCompress; i++) + if (p->dictSize <= ((UInt32)1 << i)) + break; + p->distTableSize = i * 2; + + p->finished = False; + p->result = SZ_OK; + RINOK(LzmaEnc_Alloc(p, keepWindowSize, alloc, allocBig)); + LzmaEnc_Init(p); + LzmaEnc_InitPrices(p); + p->nowPos64 = 0; + return SZ_OK; +} + +static SRes LzmaEnc_Prepare(CLzmaEncHandle pp, ISeqOutStream *outStream, ISeqInStream *inStream, + ISzAlloc *alloc, ISzAlloc *allocBig) +{ + CLzmaEnc *p = (CLzmaEnc *)pp; + p->matchFinderBase.stream = inStream; + p->needInit = 1; + p->rc.outStream = outStream; + return LzmaEnc_AllocAndInit(p, 0, alloc, allocBig); +} + +SRes LzmaEnc_PrepareForLzma2(CLzmaEncHandle pp, + ISeqInStream *inStream, UInt32 keepWindowSize, + ISzAlloc *alloc, ISzAlloc *allocBig) +{ + CLzmaEnc *p = (CLzmaEnc *)pp; + p->matchFinderBase.stream = inStream; + p->needInit = 1; + return LzmaEnc_AllocAndInit(p, keepWindowSize, alloc, allocBig); +} + +static void LzmaEnc_SetInputBuf(CLzmaEnc *p, const Byte *src, SizeT srcLen) +{ + p->matchFinderBase.directInput = 1; + p->matchFinderBase.bufferBase = (Byte *)src; + p->matchFinderBase.directInputRem = srcLen; +} + +SRes LzmaEnc_MemPrepare(CLzmaEncHandle pp, const Byte *src, SizeT srcLen, + UInt32 keepWindowSize, ISzAlloc *alloc, ISzAlloc *allocBig) +{ + CLzmaEnc *p = (CLzmaEnc *)pp; + LzmaEnc_SetInputBuf(p, src, srcLen); + p->needInit = 1; + + return LzmaEnc_AllocAndInit(p, keepWindowSize, alloc, allocBig); +} + +void LzmaEnc_Finish(CLzmaEncHandle pp) +{ + #ifndef _7ZIP_ST + CLzmaEnc *p = (CLzmaEnc *)pp; + if (p->mtMode) + MatchFinderMt_ReleaseStream(&p->matchFinderMt); + #else + pp = pp; + #endif +} + +typedef struct +{ + ISeqOutStream funcTable; + Byte *data; + SizeT rem; + Bool overflow; +} CSeqOutStreamBuf; + +static size_t MyWrite(void *pp, const void *data, size_t size) +{ + CSeqOutStreamBuf *p = (CSeqOutStreamBuf *)pp; + if (p->rem < size) + { + size = p->rem; + p->overflow = True; + } + memcpy(p->data, data, size); + p->rem -= size; + p->data += size; + return size; +} + + +UInt32 LzmaEnc_GetNumAvailableBytes(CLzmaEncHandle pp) +{ + const CLzmaEnc *p = (CLzmaEnc *)pp; + return p->matchFinder.GetNumAvailableBytes(p->matchFinderObj); +} + +const Byte *LzmaEnc_GetCurBuf(CLzmaEncHandle pp) +{ + const CLzmaEnc *p = (CLzmaEnc *)pp; + return p->matchFinder.GetPointerToCurrentPos(p->matchFinderObj) - p->additionalOffset; +} + +SRes LzmaEnc_CodeOneMemBlock(CLzmaEncHandle pp, Bool reInit, + Byte *dest, size_t *destLen, UInt32 desiredPackSize, UInt32 *unpackSize) +{ + CLzmaEnc *p = (CLzmaEnc *)pp; + UInt64 nowPos64; + SRes res; + CSeqOutStreamBuf outStream; + + outStream.funcTable.Write = MyWrite; + outStream.data = dest; + outStream.rem = *destLen; + outStream.overflow = False; + + p->writeEndMark = False; + p->finished = False; + p->result = SZ_OK; + + if (reInit) + LzmaEnc_Init(p); + LzmaEnc_InitPrices(p); + nowPos64 = p->nowPos64; + RangeEnc_Init(&p->rc); + p->rc.outStream = &outStream.funcTable; + + res = LzmaEnc_CodeOneBlock(p, True, desiredPackSize, *unpackSize); + + *unpackSize = (UInt32)(p->nowPos64 - nowPos64); + *destLen -= outStream.rem; + if (outStream.overflow) + return SZ_ERROR_OUTPUT_EOF; + + return res; +} + +static SRes LzmaEnc_Encode2(CLzmaEnc *p, ICompressProgress *progress) +{ + SRes res = SZ_OK; + + #ifndef _7ZIP_ST + Byte allocaDummy[0x300]; + int i = 0; + for (i = 0; i < 16; i++) + allocaDummy[i] = (Byte)i; + #endif + + for (;;) + { + res = LzmaEnc_CodeOneBlock(p, False, 0, 0); + if (res != SZ_OK || p->finished != 0) + break; + if (progress != 0) + { + res = progress->Progress(progress, p->nowPos64, RangeEnc_GetProcessed(&p->rc)); + if (res != SZ_OK) + { + res = SZ_ERROR_PROGRESS; + break; + } + } + } + LzmaEnc_Finish(p); + return res; +} + +SRes LzmaEnc_Encode(CLzmaEncHandle pp, ISeqOutStream *outStream, ISeqInStream *inStream, ICompressProgress *progress, + ISzAlloc *alloc, ISzAlloc *allocBig) +{ + RINOK(LzmaEnc_Prepare(pp, outStream, inStream, alloc, allocBig)); + return LzmaEnc_Encode2((CLzmaEnc *)pp, progress); +} + +SRes LzmaEnc_WriteProperties(CLzmaEncHandle pp, Byte *props, SizeT *size) +{ + CLzmaEnc *p = (CLzmaEnc *)pp; + int i; + UInt32 dictSize = p->dictSize; + if (*size < LZMA_PROPS_SIZE) + return SZ_ERROR_PARAM; + *size = LZMA_PROPS_SIZE; + props[0] = (Byte)((p->pb * 5 + p->lp) * 9 + p->lc); + + for (i = 11; i <= 30; i++) + { + if (dictSize <= ((UInt32)2 << i)) + { + dictSize = (2 << i); + break; + } + if (dictSize <= ((UInt32)3 << i)) + { + dictSize = (3 << i); + break; + } + } + + for (i = 0; i < 4; i++) + props[1 + i] = (Byte)(dictSize >> (8 * i)); + return SZ_OK; +} + +SRes LzmaEnc_MemEncode(CLzmaEncHandle pp, Byte *dest, SizeT *destLen, const Byte *src, SizeT srcLen, + int writeEndMark, ICompressProgress *progress, ISzAlloc *alloc, ISzAlloc *allocBig) +{ + SRes res; + CLzmaEnc *p = (CLzmaEnc *)pp; + + CSeqOutStreamBuf outStream; + + LzmaEnc_SetInputBuf(p, src, srcLen); + + outStream.funcTable.Write = MyWrite; + outStream.data = dest; + outStream.rem = *destLen; + outStream.overflow = False; + + p->writeEndMark = writeEndMark; + + p->rc.outStream = &outStream.funcTable; + res = LzmaEnc_MemPrepare(pp, src, srcLen, 0, alloc, allocBig); + if (res == SZ_OK) + res = LzmaEnc_Encode2(p, progress); + + *destLen -= outStream.rem; + if (outStream.overflow) + return SZ_ERROR_OUTPUT_EOF; + return res; +} + +SRes LzmaEncode(Byte *dest, SizeT *destLen, const Byte *src, SizeT srcLen, + const CLzmaEncProps *props, Byte *propsEncoded, SizeT *propsSize, int writeEndMark, + ICompressProgress *progress, ISzAlloc *alloc, ISzAlloc *allocBig) +{ + CLzmaEnc *p = (CLzmaEnc *)LzmaEnc_Create(alloc); + SRes res; + if (p == 0) + return SZ_ERROR_MEM; + + res = LzmaEnc_SetProps(p, props); + if (res == SZ_OK) + { + res = LzmaEnc_WriteProperties(p, propsEncoded, propsSize); + if (res == SZ_OK) + res = LzmaEnc_MemEncode(p, dest, destLen, src, srcLen, + writeEndMark, progress, alloc, allocBig); + } + + LzmaEnc_Destroy(p, alloc, allocBig); + return res; +} diff --git a/C/LzmaEnc.h b/C/LzmaEnc.h new file mode 100644 index 0000000..200d60e --- /dev/null +++ b/C/LzmaEnc.h @@ -0,0 +1,80 @@ +/* LzmaEnc.h -- LZMA Encoder +2009-02-07 : Igor Pavlov : Public domain */ + +#ifndef __LZMA_ENC_H +#define __LZMA_ENC_H + +#include "Types.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#define LZMA_PROPS_SIZE 5 + +typedef struct _CLzmaEncProps +{ + int level; /* 0 <= level <= 9 */ + UInt32 dictSize; /* (1 << 12) <= dictSize <= (1 << 27) for 32-bit version + (1 << 12) <= dictSize <= (1 << 30) for 64-bit version + default = (1 << 24) */ + int lc; /* 0 <= lc <= 8, default = 3 */ + int lp; /* 0 <= lp <= 4, default = 0 */ + int pb; /* 0 <= pb <= 4, default = 2 */ + int algo; /* 0 - fast, 1 - normal, default = 1 */ + int fb; /* 5 <= fb <= 273, default = 32 */ + int btMode; /* 0 - hashChain Mode, 1 - binTree mode - normal, default = 1 */ + int numHashBytes; /* 2, 3 or 4, default = 4 */ + UInt32 mc; /* 1 <= mc <= (1 << 30), default = 32 */ + unsigned writeEndMark; /* 0 - do not write EOPM, 1 - write EOPM, default = 0 */ + int numThreads; /* 1 or 2, default = 2 */ +} CLzmaEncProps; + +void LzmaEncProps_Init(CLzmaEncProps *p); +void LzmaEncProps_Normalize(CLzmaEncProps *p); +UInt32 LzmaEncProps_GetDictSize(const CLzmaEncProps *props2); + + +/* ---------- CLzmaEncHandle Interface ---------- */ + +/* LzmaEnc_* functions can return the following exit codes: +Returns: + SZ_OK - OK + SZ_ERROR_MEM - Memory allocation error + SZ_ERROR_PARAM - Incorrect paramater in props + SZ_ERROR_WRITE - Write callback error. + SZ_ERROR_PROGRESS - some break from progress callback + SZ_ERROR_THREAD - errors in multithreading functions (only for Mt version) +*/ + +typedef void * CLzmaEncHandle; + +CLzmaEncHandle LzmaEnc_Create(ISzAlloc *alloc); +void LzmaEnc_Destroy(CLzmaEncHandle p, ISzAlloc *alloc, ISzAlloc *allocBig); +SRes LzmaEnc_SetProps(CLzmaEncHandle p, const CLzmaEncProps *props); +SRes LzmaEnc_WriteProperties(CLzmaEncHandle p, Byte *properties, SizeT *size); +SRes LzmaEnc_Encode(CLzmaEncHandle p, ISeqOutStream *outStream, ISeqInStream *inStream, + ICompressProgress *progress, ISzAlloc *alloc, ISzAlloc *allocBig); +SRes LzmaEnc_MemEncode(CLzmaEncHandle p, Byte *dest, SizeT *destLen, const Byte *src, SizeT srcLen, + int writeEndMark, ICompressProgress *progress, ISzAlloc *alloc, ISzAlloc *allocBig); + +/* ---------- One Call Interface ---------- */ + +/* LzmaEncode +Return code: + SZ_OK - OK + SZ_ERROR_MEM - Memory allocation error + SZ_ERROR_PARAM - Incorrect paramater + SZ_ERROR_OUTPUT_EOF - output buffer overflow + SZ_ERROR_THREAD - errors in multithreading functions (only for Mt version) +*/ + +SRes LzmaEncode(Byte *dest, SizeT *destLen, const Byte *src, SizeT srcLen, + const CLzmaEncProps *props, Byte *propsEncoded, SizeT *propsSize, int writeEndMark, + ICompressProgress *progress, ISzAlloc *alloc, ISzAlloc *allocBig); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/C/LzmaUtil/Lzma86Dec.c b/C/LzmaUtil/Lzma86Dec.c new file mode 100644 index 0000000..b801dd1 --- /dev/null +++ b/C/LzmaUtil/Lzma86Dec.c @@ -0,0 +1,61 @@ +/* Lzma86Dec.c -- LZMA + x86 (BCJ) Filter Decoder +2008-04-07 +Igor Pavlov +Public domain */ + +#include "Lzma86Dec.h" + +#include "../Alloc.h" +#include "../Bra.h" +#include "../LzmaDec.h" + +#define LZMA86_SIZE_OFFSET (1 + LZMA_PROPS_SIZE) +#define LZMA86_HEADER_SIZE (LZMA86_SIZE_OFFSET + 8) + +static void *SzAlloc(void *p, size_t size) { p = p; return MyAlloc(size); } +static void SzFree(void *p, void *address) { p = p; MyFree(address); } +static ISzAlloc g_Alloc = { SzAlloc, SzFree }; + +SRes Lzma86_GetUnpackSize(const Byte *src, SizeT srcLen, UInt64 *unpackSize) +{ + unsigned i; + if (srcLen < LZMA86_HEADER_SIZE) + return SZ_ERROR_INPUT_EOF; + *unpackSize = 0; + for (i = 0; i < sizeof(UInt64); i++) + *unpackSize += ((UInt64)src[LZMA86_SIZE_OFFSET + i]) << (8 * i); + return SZ_OK; +} + +SRes Lzma86_Decode(Byte *dest, SizeT *destLen, const Byte *src, SizeT *srcLen) +{ + SRes res; + int useFilter; + SizeT inSizePure; + ELzmaStatus status; + + if (*srcLen < LZMA86_HEADER_SIZE) + return SZ_ERROR_INPUT_EOF; + + useFilter = src[0]; + + if (useFilter > 1) + { + *destLen = 0; + return SZ_ERROR_UNSUPPORTED; + } + + inSizePure = *srcLen - LZMA86_HEADER_SIZE; + res = LzmaDecode(dest, destLen, src + LZMA86_HEADER_SIZE, &inSizePure, + src + 1, LZMA_PROPS_SIZE, LZMA_FINISH_ANY, &status, &g_Alloc); + *srcLen = inSizePure + LZMA86_HEADER_SIZE; + if (res != SZ_OK) + return res; + if (useFilter == 1) + { + UInt32 x86State; + x86_Convert_Init(x86State); + x86_Convert(dest, *destLen, 0, &x86State, 0); + } + return SZ_OK; +} diff --git a/C/LzmaUtil/Lzma86Dec.h b/C/LzmaUtil/Lzma86Dec.h new file mode 100644 index 0000000..138ce1f --- /dev/null +++ b/C/LzmaUtil/Lzma86Dec.h @@ -0,0 +1,51 @@ +/* Lzma86Dec.h -- LZMA + x86 (BCJ) Filter Decoder +2009-02-07 : Igor Pavlov : Public domain */ + +#ifndef __LZMA86_DEC_H +#define __LZMA86_DEC_H + +#include "../Types.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* +Lzma86_GetUnpackSize: + In: + src - input data + srcLen - input data size + Out: + unpackSize - size of uncompressed stream + Return code: + SZ_OK - OK + SZ_ERROR_INPUT_EOF - Error in headers +*/ + +SRes Lzma86_GetUnpackSize(const Byte *src, SizeT srcLen, UInt64 *unpackSize); + +/* +Lzma86_Decode: + In: + dest - output data + destLen - output data size + src - input data + srcLen - input data size + Out: + destLen - processed output size + srcLen - processed input size + Return code: + SZ_OK - OK + SZ_ERROR_DATA - Data error + SZ_ERROR_MEM - Memory allocation error + SZ_ERROR_UNSUPPORTED - unsupported file + SZ_ERROR_INPUT_EOF - it needs more bytes in input buffer +*/ + +SRes Lzma86_Decode(Byte *dest, SizeT *destLen, const Byte *src, SizeT *srcLen); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/C/LzmaUtil/Lzma86Enc.c b/C/LzmaUtil/Lzma86Enc.c new file mode 100644 index 0000000..efc81ea --- /dev/null +++ b/C/LzmaUtil/Lzma86Enc.c @@ -0,0 +1,113 @@ +/* Lzma86Enc.c -- LZMA + x86 (BCJ) Filter Encoder +2008-08-05 +Igor Pavlov +Public domain */ + +#include + +#include "Lzma86Enc.h" + +#include "../Alloc.h" +#include "../Bra.h" +#include "../LzmaEnc.h" + +#define SZE_OUT_OVERFLOW SZE_DATA_ERROR + +static void *SzAlloc(void *p, size_t size) { p = p; return MyAlloc(size); } +static void SzFree(void *p, void *address) { p = p; MyFree(address); } +static ISzAlloc g_Alloc = { SzAlloc, SzFree }; + +#define LZMA86_SIZE_OFFSET (1 + LZMA_PROPS_SIZE) +#define LZMA86_HEADER_SIZE (LZMA86_SIZE_OFFSET + 8) + +int Lzma86_Encode(Byte *dest, size_t *destLen, const Byte *src, size_t srcLen, + int level, UInt32 dictSize, int filterMode) +{ + size_t outSize2 = *destLen; + Byte *filteredStream; + Bool useFilter; + int mainResult = SZ_ERROR_OUTPUT_EOF; + CLzmaEncProps props; + LzmaEncProps_Init(&props); + props.level = level; + props.dictSize = dictSize; + + *destLen = 0; + if (outSize2 < LZMA86_HEADER_SIZE) + return SZ_ERROR_OUTPUT_EOF; + + { + int i; + UInt64 t = srcLen; + for (i = 0; i < 8; i++, t >>= 8) + dest[LZMA86_SIZE_OFFSET + i] = (Byte)t; + } + + filteredStream = 0; + useFilter = (filterMode != SZ_FILTER_NO); + if (useFilter) + { + if (srcLen != 0) + { + filteredStream = (Byte *)MyAlloc(srcLen); + if (filteredStream == 0) + return SZ_ERROR_MEM; + memcpy(filteredStream, src, srcLen); + } + { + UInt32 x86State; + x86_Convert_Init(x86State); + x86_Convert(filteredStream, srcLen, 0, &x86State, 1); + } + } + + { + size_t minSize = 0; + Bool bestIsFiltered = False; + + /* passes for SZ_FILTER_AUTO: + 0 - BCJ + LZMA + 1 - LZMA + 2 - BCJ + LZMA agaian, if pass 0 (BCJ + LZMA) is better. + */ + int numPasses = (filterMode == SZ_FILTER_AUTO) ? 3 : 1; + + int i; + for (i = 0; i < numPasses; i++) + { + size_t outSizeProcessed = outSize2 - LZMA86_HEADER_SIZE; + size_t outPropsSize = 5; + SRes curRes; + Bool curModeIsFiltered = (numPasses > 1 && i == numPasses - 1); + if (curModeIsFiltered && !bestIsFiltered) + break; + if (useFilter && i == 0) + curModeIsFiltered = True; + + curRes = LzmaEncode(dest + LZMA86_HEADER_SIZE, &outSizeProcessed, + curModeIsFiltered ? filteredStream : src, srcLen, + &props, dest + 1, &outPropsSize, 0, + NULL, &g_Alloc, &g_Alloc); + + if (curRes != SZ_ERROR_OUTPUT_EOF) + { + if (curRes != SZ_OK) + { + mainResult = curRes; + break; + } + if (outSizeProcessed <= minSize || mainResult != SZ_OK) + { + minSize = outSizeProcessed; + bestIsFiltered = curModeIsFiltered; + mainResult = SZ_OK; + } + } + } + dest[0] = (bestIsFiltered ? 1 : 0); + *destLen = LZMA86_HEADER_SIZE + minSize; + } + if (useFilter) + MyFree(filteredStream); + return mainResult; +} diff --git a/C/LzmaUtil/Lzma86Enc.h b/C/LzmaUtil/Lzma86Enc.h new file mode 100644 index 0000000..355bf34 --- /dev/null +++ b/C/LzmaUtil/Lzma86Enc.h @@ -0,0 +1,78 @@ +/* Lzma86Enc.h -- LZMA + x86 (BCJ) Filter Encoder +2009-02-07 : Igor Pavlov : Public domain */ + +#ifndef __LZMA86_ENC_H +#define __LZMA86_ENC_H + +#include "../Types.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* +It's an example for LZMA + x86 Filter use. +You can use .lzma86 extension, if you write that stream to file. +.lzma86 header adds one additional byte to standard .lzma header. +.lzma86 header (14 bytes): + Offset Size Description + 0 1 = 0 - no filter, + = 1 - x86 filter + 1 1 lc, lp and pb in encoded form + 2 4 dictSize (little endian) + 6 8 uncompressed size (little endian) + + +Lzma86_Encode +------------- +level - compression level: 0 <= level <= 9, the default value for "level" is 5. + + +dictSize - The dictionary size in bytes. The maximum value is + 128 MB = (1 << 27) bytes for 32-bit version + 1 GB = (1 << 30) bytes for 64-bit version + The default value is 16 MB = (1 << 24) bytes, for level = 5. + It's recommended to use the dictionary that is larger than 4 KB and + that can be calculated as (1 << N) or (3 << N) sizes. + For better compression ratio dictSize must be >= inSize. + +filterMode: + SZ_FILTER_NO - no Filter + SZ_FILTER_YES - x86 Filter + SZ_FILTER_AUTO - it tries both alternatives to select best. + Encoder will use 2 or 3 passes: + 2 passes when FILTER_NO provides better compression. + 3 passes when FILTER_YES provides better compression. + +Lzma86Encode allocates Data with MyAlloc functions. +RAM Requirements for compressing: + RamSize = dictionarySize * 11.5 + 6MB + FilterBlockSize + filterMode FilterBlockSize + SZ_FILTER_NO 0 + SZ_FILTER_YES inSize + SZ_FILTER_AUTO inSize + + +Return code: + SZ_OK - OK + SZ_ERROR_MEM - Memory allocation error + SZ_ERROR_PARAM - Incorrect paramater + SZ_ERROR_OUTPUT_EOF - output buffer overflow + SZ_ERROR_THREAD - errors in multithreading functions (only for Mt version) +*/ + +enum ESzFilterMode +{ + SZ_FILTER_NO, + SZ_FILTER_YES, + SZ_FILTER_AUTO +}; + +SRes Lzma86_Encode(Byte *dest, size_t *destLen, const Byte *src, size_t srcLen, + int level, UInt32 dictSize, int filterMode); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/C/MtCoder.c b/C/MtCoder.c new file mode 100644 index 0000000..946fbbc --- /dev/null +++ b/C/MtCoder.c @@ -0,0 +1,327 @@ +/* MtCoder.c -- Multi-thread Coder +2010-09-24 : Igor Pavlov : Public domain */ + +#include + +#include "MtCoder.h" + +void LoopThread_Construct(CLoopThread *p) +{ + Thread_Construct(&p->thread); + Event_Construct(&p->startEvent); + Event_Construct(&p->finishedEvent); +} + +void LoopThread_Close(CLoopThread *p) +{ + Thread_Close(&p->thread); + Event_Close(&p->startEvent); + Event_Close(&p->finishedEvent); +} + +static THREAD_FUNC_RET_TYPE THREAD_FUNC_CALL_TYPE LoopThreadFunc(void *pp) +{ + CLoopThread *p = (CLoopThread *)pp; + for (;;) + { + if (Event_Wait(&p->startEvent) != 0) + return SZ_ERROR_THREAD; + if (p->stop) + return 0; + p->res = p->func(p->param); + if (Event_Set(&p->finishedEvent) != 0) + return SZ_ERROR_THREAD; + } +} + +WRes LoopThread_Create(CLoopThread *p) +{ + p->stop = 0; + RINOK(AutoResetEvent_CreateNotSignaled(&p->startEvent)); + RINOK(AutoResetEvent_CreateNotSignaled(&p->finishedEvent)); + return Thread_Create(&p->thread, LoopThreadFunc, p); +} + +WRes LoopThread_StopAndWait(CLoopThread *p) +{ + p->stop = 1; + if (Event_Set(&p->startEvent) != 0) + return SZ_ERROR_THREAD; + return Thread_Wait(&p->thread); +} + +WRes LoopThread_StartSubThread(CLoopThread *p) { return Event_Set(&p->startEvent); } +WRes LoopThread_WaitSubThread(CLoopThread *p) { return Event_Wait(&p->finishedEvent); } + +static SRes Progress(ICompressProgress *p, UInt64 inSize, UInt64 outSize) +{ + return (p && p->Progress(p, inSize, outSize) != SZ_OK) ? SZ_ERROR_PROGRESS : SZ_OK; +} + +static void MtProgress_Init(CMtProgress *p, ICompressProgress *progress) +{ + unsigned i; + for (i = 0; i < NUM_MT_CODER_THREADS_MAX; i++) + p->inSizes[i] = p->outSizes[i] = 0; + p->totalInSize = p->totalOutSize = 0; + p->progress = progress; + p->res = SZ_OK; +} + +static void MtProgress_Reinit(CMtProgress *p, unsigned index) +{ + p->inSizes[index] = 0; + p->outSizes[index] = 0; +} + +#define UPDATE_PROGRESS(size, prev, total) \ + if (size != (UInt64)(Int64)-1) { total += size - prev; prev = size; } + +SRes MtProgress_Set(CMtProgress *p, unsigned index, UInt64 inSize, UInt64 outSize) +{ + SRes res; + CriticalSection_Enter(&p->cs); + UPDATE_PROGRESS(inSize, p->inSizes[index], p->totalInSize) + UPDATE_PROGRESS(outSize, p->outSizes[index], p->totalOutSize) + if (p->res == SZ_OK) + p->res = Progress(p->progress, p->totalInSize, p->totalOutSize); + res = p->res; + CriticalSection_Leave(&p->cs); + return res; +} + +static void MtProgress_SetError(CMtProgress *p, SRes res) +{ + CriticalSection_Enter(&p->cs); + if (p->res == SZ_OK) + p->res = res; + CriticalSection_Leave(&p->cs); +} + +static void MtCoder_SetError(CMtCoder* p, SRes res) +{ + CriticalSection_Enter(&p->cs); + if (p->res == SZ_OK) + p->res = res; + CriticalSection_Leave(&p->cs); +} + +/* ---------- MtThread ---------- */ + +void CMtThread_Construct(CMtThread *p, CMtCoder *mtCoder) +{ + p->mtCoder = mtCoder; + p->outBuf = 0; + p->inBuf = 0; + Event_Construct(&p->canRead); + Event_Construct(&p->canWrite); + LoopThread_Construct(&p->thread); +} + +#define RINOK_THREAD(x) { if((x) != 0) return SZ_ERROR_THREAD; } + +static void CMtThread_CloseEvents(CMtThread *p) +{ + Event_Close(&p->canRead); + Event_Close(&p->canWrite); +} + +static void CMtThread_Destruct(CMtThread *p) +{ + CMtThread_CloseEvents(p); + + if (Thread_WasCreated(&p->thread.thread)) + { + LoopThread_StopAndWait(&p->thread); + LoopThread_Close(&p->thread); + } + + if (p->mtCoder->alloc) + IAlloc_Free(p->mtCoder->alloc, p->outBuf); + p->outBuf = 0; + + if (p->mtCoder->alloc) + IAlloc_Free(p->mtCoder->alloc, p->inBuf); + p->inBuf = 0; +} + +#define MY_BUF_ALLOC(buf, size, newSize) \ + if (buf == 0 || size != newSize) \ + { IAlloc_Free(p->mtCoder->alloc, buf); \ + size = newSize; buf = (Byte *)IAlloc_Alloc(p->mtCoder->alloc, size); \ + if (buf == 0) return SZ_ERROR_MEM; } + +static SRes CMtThread_Prepare(CMtThread *p) +{ + MY_BUF_ALLOC(p->inBuf, p->inBufSize, p->mtCoder->blockSize) + MY_BUF_ALLOC(p->outBuf, p->outBufSize, p->mtCoder->destBlockSize) + + p->stopReading = False; + p->stopWriting = False; + RINOK_THREAD(AutoResetEvent_CreateNotSignaled(&p->canRead)); + RINOK_THREAD(AutoResetEvent_CreateNotSignaled(&p->canWrite)); + + return SZ_OK; +} + +static SRes FullRead(ISeqInStream *stream, Byte *data, size_t *processedSize) +{ + size_t size = *processedSize; + *processedSize = 0; + while (size != 0) + { + size_t curSize = size; + SRes res = stream->Read(stream, data, &curSize); + *processedSize += curSize; + data += curSize; + size -= curSize; + RINOK(res); + if (curSize == 0) + return SZ_OK; + } + return SZ_OK; +} + +#define GET_NEXT_THREAD(p) &p->mtCoder->threads[p->index == p->mtCoder->numThreads - 1 ? 0 : p->index + 1] + +static SRes MtThread_Process(CMtThread *p, Bool *stop) +{ + CMtThread *next; + *stop = True; + if (Event_Wait(&p->canRead) != 0) + return SZ_ERROR_THREAD; + + next = GET_NEXT_THREAD(p); + + if (p->stopReading) + { + next->stopReading = True; + return Event_Set(&next->canRead) == 0 ? SZ_OK : SZ_ERROR_THREAD; + } + + { + size_t size = p->mtCoder->blockSize; + size_t destSize = p->outBufSize; + + RINOK(FullRead(p->mtCoder->inStream, p->inBuf, &size)); + next->stopReading = *stop = (size != p->mtCoder->blockSize); + if (Event_Set(&next->canRead) != 0) + return SZ_ERROR_THREAD; + + RINOK(p->mtCoder->mtCallback->Code(p->mtCoder->mtCallback, p->index, + p->outBuf, &destSize, p->inBuf, size, *stop)); + + MtProgress_Reinit(&p->mtCoder->mtProgress, p->index); + + if (Event_Wait(&p->canWrite) != 0) + return SZ_ERROR_THREAD; + if (p->stopWriting) + return SZ_ERROR_FAIL; + if (p->mtCoder->outStream->Write(p->mtCoder->outStream, p->outBuf, destSize) != destSize) + return SZ_ERROR_WRITE; + return Event_Set(&next->canWrite) == 0 ? SZ_OK : SZ_ERROR_THREAD; + } +} + +static THREAD_FUNC_RET_TYPE THREAD_FUNC_CALL_TYPE ThreadFunc(void *pp) +{ + CMtThread *p = (CMtThread *)pp; + for (;;) + { + Bool stop; + CMtThread *next = GET_NEXT_THREAD(p); + SRes res = MtThread_Process(p, &stop); + if (res != SZ_OK) + { + MtCoder_SetError(p->mtCoder, res); + MtProgress_SetError(&p->mtCoder->mtProgress, res); + next->stopReading = True; + next->stopWriting = True; + Event_Set(&next->canRead); + Event_Set(&next->canWrite); + return res; + } + if (stop) + return 0; + } +} + +void MtCoder_Construct(CMtCoder* p) +{ + unsigned i; + p->alloc = 0; + for (i = 0; i < NUM_MT_CODER_THREADS_MAX; i++) + { + CMtThread *t = &p->threads[i]; + t->index = i; + CMtThread_Construct(t, p); + } + CriticalSection_Init(&p->cs); + CriticalSection_Init(&p->mtProgress.cs); +} + +void MtCoder_Destruct(CMtCoder* p) +{ + unsigned i; + for (i = 0; i < NUM_MT_CODER_THREADS_MAX; i++) + CMtThread_Destruct(&p->threads[i]); + CriticalSection_Delete(&p->cs); + CriticalSection_Delete(&p->mtProgress.cs); +} + +SRes MtCoder_Code(CMtCoder *p) +{ + unsigned i, numThreads = p->numThreads; + SRes res = SZ_OK; + p->res = SZ_OK; + + MtProgress_Init(&p->mtProgress, p->progress); + + for (i = 0; i < numThreads; i++) + { + RINOK(CMtThread_Prepare(&p->threads[i])); + } + + for (i = 0; i < numThreads; i++) + { + CMtThread *t = &p->threads[i]; + CLoopThread *lt = &t->thread; + + if (!Thread_WasCreated(<->thread)) + { + lt->func = ThreadFunc; + lt->param = t; + + if (LoopThread_Create(lt) != SZ_OK) + { + res = SZ_ERROR_THREAD; + break; + } + } + } + + if (res == SZ_OK) + { + unsigned j; + for (i = 0; i < numThreads; i++) + { + CMtThread *t = &p->threads[i]; + if (LoopThread_StartSubThread(&t->thread) != SZ_OK) + { + res = SZ_ERROR_THREAD; + p->threads[0].stopReading = True; + break; + } + } + + Event_Set(&p->threads[0].canWrite); + Event_Set(&p->threads[0].canRead); + + for (j = 0; j < i; j++) + LoopThread_WaitSubThread(&p->threads[j].thread); + } + + for (i = 0; i < numThreads; i++) + CMtThread_CloseEvents(&p->threads[i]); + return (res == SZ_OK) ? p->res : res; +} diff --git a/C/MtCoder.h b/C/MtCoder.h new file mode 100644 index 0000000..f0f06da --- /dev/null +++ b/C/MtCoder.h @@ -0,0 +1,98 @@ +/* MtCoder.h -- Multi-thread Coder +2009-11-19 : Igor Pavlov : Public domain */ + +#ifndef __MT_CODER_H +#define __MT_CODER_H + +#include "Threads.h" + +EXTERN_C_BEGIN + +typedef struct +{ + CThread thread; + CAutoResetEvent startEvent; + CAutoResetEvent finishedEvent; + int stop; + + THREAD_FUNC_TYPE func; + LPVOID param; + THREAD_FUNC_RET_TYPE res; +} CLoopThread; + +void LoopThread_Construct(CLoopThread *p); +void LoopThread_Close(CLoopThread *p); +WRes LoopThread_Create(CLoopThread *p); +WRes LoopThread_StopAndWait(CLoopThread *p); +WRes LoopThread_StartSubThread(CLoopThread *p); +WRes LoopThread_WaitSubThread(CLoopThread *p); + +#ifndef _7ZIP_ST +#define NUM_MT_CODER_THREADS_MAX 32 +#else +#define NUM_MT_CODER_THREADS_MAX 1 +#endif + +typedef struct +{ + UInt64 totalInSize; + UInt64 totalOutSize; + ICompressProgress *progress; + SRes res; + CCriticalSection cs; + UInt64 inSizes[NUM_MT_CODER_THREADS_MAX]; + UInt64 outSizes[NUM_MT_CODER_THREADS_MAX]; +} CMtProgress; + +SRes MtProgress_Set(CMtProgress *p, unsigned index, UInt64 inSize, UInt64 outSize); + +struct _CMtCoder; + +typedef struct +{ + struct _CMtCoder *mtCoder; + Byte *outBuf; + size_t outBufSize; + Byte *inBuf; + size_t inBufSize; + unsigned index; + CLoopThread thread; + + Bool stopReading; + Bool stopWriting; + CAutoResetEvent canRead; + CAutoResetEvent canWrite; +} CMtThread; + +typedef struct +{ + SRes (*Code)(void *p, unsigned index, Byte *dest, size_t *destSize, + const Byte *src, size_t srcSize, int finished); +} IMtCoderCallback; + +typedef struct _CMtCoder +{ + size_t blockSize; + size_t destBlockSize; + unsigned numThreads; + + ISeqInStream *inStream; + ISeqOutStream *outStream; + ICompressProgress *progress; + ISzAlloc *alloc; + + IMtCoderCallback *mtCallback; + CCriticalSection cs; + SRes res; + + CMtProgress mtProgress; + CMtThread threads[NUM_MT_CODER_THREADS_MAX]; +} CMtCoder; + +void MtCoder_Construct(CMtCoder* p); +void MtCoder_Destruct(CMtCoder* p); +SRes MtCoder_Code(CMtCoder *p); + +EXTERN_C_END + +#endif diff --git a/C/Ppmd.h b/C/Ppmd.h new file mode 100644 index 0000000..621d927 --- /dev/null +++ b/C/Ppmd.h @@ -0,0 +1,85 @@ +/* Ppmd.h -- PPMD codec common code +2010-03-12 : Igor Pavlov : Public domain +This code is based on PPMd var.H (2001): Dmitry Shkarin : Public domain */ + +#ifndef __PPMD_H +#define __PPMD_H + +#include "Types.h" +#include "CpuArch.h" + +EXTERN_C_BEGIN + +#ifdef MY_CPU_32BIT + #define PPMD_32BIT +#endif + +#define PPMD_INT_BITS 7 +#define PPMD_PERIOD_BITS 7 +#define PPMD_BIN_SCALE (1 << (PPMD_INT_BITS + PPMD_PERIOD_BITS)) + +#define PPMD_GET_MEAN_SPEC(summ, shift, round) (((summ) + (1 << ((shift) - (round)))) >> (shift)) +#define PPMD_GET_MEAN(summ) PPMD_GET_MEAN_SPEC((summ), PPMD_PERIOD_BITS, 2) +#define PPMD_UPDATE_PROB_0(prob) ((prob) + (1 << PPMD_INT_BITS) - PPMD_GET_MEAN(prob)) +#define PPMD_UPDATE_PROB_1(prob) ((prob) - PPMD_GET_MEAN(prob)) + +#define PPMD_N1 4 +#define PPMD_N2 4 +#define PPMD_N3 4 +#define PPMD_N4 ((128 + 3 - 1 * PPMD_N1 - 2 * PPMD_N2 - 3 * PPMD_N3) / 4) +#define PPMD_NUM_INDEXES (PPMD_N1 + PPMD_N2 + PPMD_N3 + PPMD_N4) + +#pragma pack(push,1) + +/* SEE-contexts for PPM-contexts with masked symbols */ +typedef struct +{ + UInt16 Summ; /* Freq */ + Byte Shift; /* Speed of Freq change; low Shift is for fast change */ + Byte Count; /* Count to next change of Shift */ +} CPpmd_See; + +#define Ppmd_See_Update(p) if ((p)->Shift < PPMD_PERIOD_BITS && --(p)->Count == 0) \ + { (p)->Summ <<= 1; (p)->Count = (Byte)(3 << (p)->Shift++); } + +typedef struct +{ + Byte Symbol; + Byte Freq; + UInt16 SuccessorLow; + UInt16 SuccessorHigh; +} CPpmd_State; + +#pragma pack(pop) + +typedef + #ifdef PPMD_32BIT + CPpmd_State * + #else + UInt32 + #endif + CPpmd_State_Ref; + +typedef + #ifdef PPMD_32BIT + void * + #else + UInt32 + #endif + CPpmd_Void_Ref; + +typedef + #ifdef PPMD_32BIT + Byte * + #else + UInt32 + #endif + CPpmd_Byte_Ref; + +#define PPMD_SetAllBitsIn256Bytes(p) \ + { unsigned i; for (i = 0; i < 256 / sizeof(p[0]); i += 8) { \ + p[i+7] = p[i+6] = p[i+5] = p[i+4] = p[i+3] = p[i+2] = p[i+1] = p[i+0] = ~(size_t)0; }} + +EXTERN_C_END + +#endif diff --git a/C/Ppmd7.c b/C/Ppmd7.c new file mode 100644 index 0000000..060d86d --- /dev/null +++ b/C/Ppmd7.c @@ -0,0 +1,708 @@ +/* Ppmd7.c -- PPMdH codec +2010-03-12 : Igor Pavlov : Public domain +This code is based on PPMd var.H (2001): Dmitry Shkarin : Public domain */ + +#include + +#include "Ppmd7.h" + +const Byte PPMD7_kExpEscape[16] = { 25, 14, 9, 7, 5, 5, 4, 4, 4, 3, 3, 3, 2, 2, 2, 2 }; +static const UInt16 kInitBinEsc[] = { 0x3CDD, 0x1F3F, 0x59BF, 0x48F3, 0x64A1, 0x5ABC, 0x6632, 0x6051}; + +#define MAX_FREQ 124 +#define UNIT_SIZE 12 + +#define U2B(nu) ((UInt32)(nu) * UNIT_SIZE) +#define U2I(nu) (p->Units2Indx[(nu) - 1]) +#define I2U(indx) (p->Indx2Units[indx]) + +#ifdef PPMD_32BIT + #define REF(ptr) (ptr) +#else + #define REF(ptr) ((UInt32)((Byte *)(ptr) - (p)->Base)) +#endif + +#define STATS_REF(ptr) ((CPpmd_State_Ref)REF(ptr)) + +#define CTX(ref) ((CPpmd7_Context *)Ppmd7_GetContext(p, ref)) +#define STATS(ctx) Ppmd7_GetStats(p, ctx) +#define ONE_STATE(ctx) Ppmd7Context_OneState(ctx) +#define SUFFIX(ctx) CTX((ctx)->Suffix) + +typedef CPpmd7_Context * CTX_PTR; + +struct CPpmd7_Node_; + +typedef + #ifdef PPMD_32BIT + struct CPpmd7_Node_ * + #else + UInt32 + #endif + CPpmd7_Node_Ref; + +typedef struct CPpmd7_Node_ +{ + UInt16 Stamp; /* must be at offset 0 as CPpmd7_Context::NumStats. Stamp=0 means free */ + UInt16 NU; + CPpmd7_Node_Ref Next; /* must be at offset >= 4 */ + CPpmd7_Node_Ref Prev; +} CPpmd7_Node; + +#ifdef PPMD_32BIT + #define NODE(ptr) (ptr) +#else + #define NODE(offs) ((CPpmd7_Node *)(p->Base + (offs))) +#endif + +void Ppmd7_Construct(CPpmd7 *p) +{ + unsigned i, k, m; + + p->Base = 0; + + for (i = 0, k = 0; i < PPMD_NUM_INDEXES; i++) + { + unsigned step = (i >= 12 ? 4 : (i >> 2) + 1); + do { p->Units2Indx[k++] = (Byte)i; } while(--step); + p->Indx2Units[i] = (Byte)k; + } + + p->NS2BSIndx[0] = (0 << 1); + p->NS2BSIndx[1] = (1 << 1); + memset(p->NS2BSIndx + 2, (2 << 1), 9); + memset(p->NS2BSIndx + 11, (3 << 1), 256 - 11); + + for (i = 0; i < 3; i++) + p->NS2Indx[i] = (Byte)i; + for (m = i, k = 1; i < 256; i++) + { + p->NS2Indx[i] = (Byte)m; + if (--k == 0) + k = (++m) - 2; + } + + memset(p->HB2Flag, 0, 0x40); + memset(p->HB2Flag + 0x40, 8, 0x100 - 0x40); +} + +void Ppmd7_Free(CPpmd7 *p, ISzAlloc *alloc) +{ + alloc->Free(alloc, p->Base); + p->Size = 0; + p->Base = 0; +} + +Bool Ppmd7_Alloc(CPpmd7 *p, UInt32 size, ISzAlloc *alloc) +{ + if (p->Base == 0 || p->Size != size) + { + Ppmd7_Free(p, alloc); + p->AlignOffset = + #ifdef PPMD_32BIT + (4 - size) & 3; + #else + 4 - (size & 3); + #endif + if ((p->Base = (Byte *)alloc->Alloc(alloc, p->AlignOffset + size + #ifndef PPMD_32BIT + + UNIT_SIZE + #endif + )) == 0) + return False; + p->Size = size; + } + return True; +} + +static void InsertNode(CPpmd7 *p, void *node, unsigned indx) +{ + *((CPpmd_Void_Ref *)node) = p->FreeList[indx]; + p->FreeList[indx] = REF(node); +} + +static void *RemoveNode(CPpmd7 *p, unsigned indx) +{ + CPpmd_Void_Ref *node = (CPpmd_Void_Ref *)Ppmd7_GetPtr(p, p->FreeList[indx]); + p->FreeList[indx] = *node; + return node; +} + +static void SplitBlock(CPpmd7 *p, void *ptr, unsigned oldIndx, unsigned newIndx) +{ + unsigned i, nu = I2U(oldIndx) - I2U(newIndx); + ptr = (Byte *)ptr + U2B(I2U(newIndx)); + if (I2U(i = U2I(nu)) != nu) + { + unsigned k = I2U(--i); + InsertNode(p, ((Byte *)ptr) + U2B(k), nu - k - 1); + } + InsertNode(p, ptr, i); +} + +static void GlueFreeBlocks(CPpmd7 *p) +{ + #ifdef PPMD_32BIT + CPpmd7_Node headItem; + CPpmd7_Node_Ref head = &headItem; + #else + CPpmd7_Node_Ref head = p->AlignOffset + p->Size; + #endif + + CPpmd7_Node_Ref n = head; + unsigned i; + + p->GlueCount = 255; + + /* create doubly-linked list of free blocks */ + for (i = 0; i < PPMD_NUM_INDEXES; i++) + { + UInt16 nu = I2U(i); + CPpmd7_Node_Ref next = (CPpmd7_Node_Ref)p->FreeList[i]; + p->FreeList[i] = 0; + while (next != 0) + { + CPpmd7_Node *node = NODE(next); + node->Next = n; + n = NODE(n)->Prev = next; + next = *(const CPpmd7_Node_Ref *)node; + node->Stamp = 0; + node->NU = (UInt16)nu; + } + } + NODE(head)->Stamp = 1; + NODE(head)->Next = n; + NODE(n)->Prev = head; + if (p->LoUnit != p->HiUnit) + ((CPpmd7_Node *)p->LoUnit)->Stamp = 1; + + /* Glue free blocks */ + while (n != head) + { + CPpmd7_Node *node = NODE(n); + UInt32 nu = (UInt32)node->NU; + for (;;) + { + CPpmd7_Node *node2 = NODE(n) + nu; + nu += node2->NU; + if (node2->Stamp != 0 || nu >= 0x10000) + break; + NODE(node2->Prev)->Next = node2->Next; + NODE(node2->Next)->Prev = node2->Prev; + node->NU = (UInt16)nu; + } + n = node->Next; + } + + /* Fill lists of free blocks */ + for (n = NODE(head)->Next; n != head;) + { + CPpmd7_Node *node = NODE(n); + unsigned nu; + CPpmd7_Node_Ref next = node->Next; + for (nu = node->NU; nu > 128; nu -= 128, node += 128) + InsertNode(p, node, PPMD_NUM_INDEXES - 1); + if (I2U(i = U2I(nu)) != nu) + { + unsigned k = I2U(--i); + InsertNode(p, node + k, nu - k - 1); + } + InsertNode(p, node, i); + n = next; + } +} + +static void *AllocUnitsRare(CPpmd7 *p, unsigned indx) +{ + unsigned i; + void *retVal; + if (p->GlueCount == 0) + { + GlueFreeBlocks(p); + if (p->FreeList[indx] != 0) + return RemoveNode(p, indx); + } + i = indx; + do + { + if (++i == PPMD_NUM_INDEXES) + { + UInt32 numBytes = U2B(I2U(indx)); + p->GlueCount--; + return ((UInt32)(p->UnitsStart - p->Text) > numBytes) ? (p->UnitsStart -= numBytes) : (NULL); + } + } + while (p->FreeList[i] == 0); + retVal = RemoveNode(p, i); + SplitBlock(p, retVal, i, indx); + return retVal; +} + +static void *AllocUnits(CPpmd7 *p, unsigned indx) +{ + UInt32 numBytes; + if (p->FreeList[indx] != 0) + return RemoveNode(p, indx); + numBytes = U2B(I2U(indx)); + if (numBytes <= (UInt32)(p->HiUnit - p->LoUnit)) + { + void *retVal = p->LoUnit; + p->LoUnit += numBytes; + return retVal; + } + return AllocUnitsRare(p, indx); +} + +#define MyMem12Cpy(dest, src, num) \ + { UInt32 *d = (UInt32 *)dest; const UInt32 *s = (const UInt32 *)src; UInt32 n = num; \ + do { d[0] = s[0]; d[1] = s[1]; d[2] = s[2]; s += 3; d += 3; } while(--n); } + +static void *ShrinkUnits(CPpmd7 *p, void *oldPtr, unsigned oldNU, unsigned newNU) +{ + unsigned i0 = U2I(oldNU); + unsigned i1 = U2I(newNU); + if (i0 == i1) + return oldPtr; + if (p->FreeList[i1] != 0) + { + void *ptr = RemoveNode(p, i1); + MyMem12Cpy(ptr, oldPtr, newNU); + InsertNode(p, oldPtr, i0); + return ptr; + } + SplitBlock(p, oldPtr, i0, i1); + return oldPtr; +} + +#define SUCCESSOR(p) ((CPpmd_Void_Ref)((p)->SuccessorLow | ((UInt32)(p)->SuccessorHigh << 16))) + +static void SetSuccessor(CPpmd_State *p, CPpmd_Void_Ref v) +{ + (p)->SuccessorLow = (UInt16)((UInt32)(v) & 0xFFFF); + (p)->SuccessorHigh = (UInt16)(((UInt32)(v) >> 16) & 0xFFFF); +} + +static void RestartModel(CPpmd7 *p) +{ + unsigned i, k, m; + + memset(p->FreeList, 0, sizeof(p->FreeList)); + p->Text = p->Base + p->AlignOffset; + p->HiUnit = p->Text + p->Size; + p->LoUnit = p->UnitsStart = p->HiUnit - p->Size / 8 / UNIT_SIZE * 7 * UNIT_SIZE; + p->GlueCount = 0; + + p->OrderFall = p->MaxOrder; + p->RunLength = p->InitRL = -(Int32)((p->MaxOrder < 12) ? p->MaxOrder : 12) - 1; + p->PrevSuccess = 0; + + p->MinContext = p->MaxContext = (CTX_PTR)(p->HiUnit -= UNIT_SIZE); /* AllocContext(p); */ + p->MinContext->Suffix = 0; + p->MinContext->NumStats = 256; + p->MinContext->SummFreq = 256 + 1; + p->FoundState = (CPpmd_State *)p->LoUnit; /* AllocUnits(p, PPMD_NUM_INDEXES - 1); */ + p->LoUnit += U2B(256 / 2); + p->MinContext->Stats = REF(p->FoundState); + for (i = 0; i < 256; i++) + { + CPpmd_State *s = &p->FoundState[i]; + s->Symbol = (Byte)i; + s->Freq = 1; + SetSuccessor(s, 0); + } + + for (i = 0; i < 128; i++) + for (k = 0; k < 8; k++) + { + UInt16 *dest = p->BinSumm[i] + k; + UInt16 val = (UInt16)(PPMD_BIN_SCALE - kInitBinEsc[k] / (i + 2)); + for (m = 0; m < 64; m += 8) + dest[m] = val; + } + + for (i = 0; i < 25; i++) + for (k = 0; k < 16; k++) + { + CPpmd_See *s = &p->See[i][k]; + s->Summ = (UInt16)((5 * i + 10) << (s->Shift = PPMD_PERIOD_BITS - 4)); + s->Count = 4; + } +} + +void Ppmd7_Init(CPpmd7 *p, unsigned maxOrder) +{ + p->MaxOrder = maxOrder; + RestartModel(p); + p->DummySee.Shift = PPMD_PERIOD_BITS; + p->DummySee.Summ = 0; /* unused */ + p->DummySee.Count = 64; /* unused */ +} + +static CTX_PTR CreateSuccessors(CPpmd7 *p, Bool skip) +{ + CPpmd_State upState; + CTX_PTR c = p->MinContext; + CPpmd_Byte_Ref upBranch = (CPpmd_Byte_Ref)SUCCESSOR(p->FoundState); + CPpmd_State *ps[PPMD7_MAX_ORDER]; + unsigned numPs = 0; + + if (!skip) + ps[numPs++] = p->FoundState; + + while (c->Suffix) + { + CPpmd_Void_Ref successor; + CPpmd_State *s; + c = SUFFIX(c); + if (c->NumStats != 1) + { + for (s = STATS(c); s->Symbol != p->FoundState->Symbol; s++); + } + else + s = ONE_STATE(c); + successor = SUCCESSOR(s); + if (successor != upBranch) + { + c = CTX(successor); + if (numPs == 0) + return c; + break; + } + ps[numPs++] = s; + } + + upState.Symbol = *(const Byte *)Ppmd7_GetPtr(p, upBranch); + SetSuccessor(&upState, upBranch + 1); + + if (c->NumStats == 1) + upState.Freq = ONE_STATE(c)->Freq; + else + { + UInt32 cf, s0; + CPpmd_State *s; + for (s = STATS(c); s->Symbol != upState.Symbol; s++); + cf = s->Freq - 1; + s0 = c->SummFreq - c->NumStats - cf; + upState.Freq = (Byte)(1 + ((2 * cf <= s0) ? (5 * cf > s0) : ((2 * cf + 3 * s0 - 1) / (2 * s0)))); + } + + do + { + /* Create Child */ + CTX_PTR c1; /* = AllocContext(p); */ + if (p->HiUnit != p->LoUnit) + c1 = (CTX_PTR)(p->HiUnit -= UNIT_SIZE); + else if (p->FreeList[0] != 0) + c1 = (CTX_PTR)RemoveNode(p, 0); + else + { + c1 = (CTX_PTR)AllocUnitsRare(p, 0); + if (!c1) + return NULL; + } + c1->NumStats = 1; + *ONE_STATE(c1) = upState; + c1->Suffix = REF(c); + SetSuccessor(ps[--numPs], REF(c1)); + c = c1; + } + while (numPs != 0); + + return c; +} + +static void SwapStates(CPpmd_State *t1, CPpmd_State *t2) +{ + CPpmd_State tmp = *t1; + *t1 = *t2; + *t2 = tmp; +} + +static void UpdateModel(CPpmd7 *p) +{ + CPpmd_Void_Ref successor, fSuccessor = SUCCESSOR(p->FoundState); + CTX_PTR c; + unsigned s0, ns; + + if (p->FoundState->Freq < MAX_FREQ / 4 && p->MinContext->Suffix != 0) + { + c = SUFFIX(p->MinContext); + + if (c->NumStats == 1) + { + CPpmd_State *s = ONE_STATE(c); + if (s->Freq < 32) + s->Freq++; + } + else + { + CPpmd_State *s = STATS(c); + if (s->Symbol != p->FoundState->Symbol) + { + do { s++; } while (s->Symbol != p->FoundState->Symbol); + if (s[0].Freq >= s[-1].Freq) + { + SwapStates(&s[0], &s[-1]); + s--; + } + } + if (s->Freq < MAX_FREQ - 9) + { + s->Freq += 2; + c->SummFreq += 2; + } + } + } + + if (p->OrderFall == 0) + { + p->MinContext = p->MaxContext = CreateSuccessors(p, True); + if (p->MinContext == 0) + { + RestartModel(p); + return; + } + SetSuccessor(p->FoundState, REF(p->MinContext)); + return; + } + + *p->Text++ = p->FoundState->Symbol; + successor = REF(p->Text); + if (p->Text >= p->UnitsStart) + { + RestartModel(p); + return; + } + + if (fSuccessor) + { + if (fSuccessor <= successor) + { + CTX_PTR cs = CreateSuccessors(p, False); + if (cs == NULL) + { + RestartModel(p); + return; + } + fSuccessor = REF(cs); + } + if (--p->OrderFall == 0) + { + successor = fSuccessor; + p->Text -= (p->MaxContext != p->MinContext); + } + } + else + { + SetSuccessor(p->FoundState, successor); + fSuccessor = REF(p->MinContext); + } + + s0 = p->MinContext->SummFreq - (ns = p->MinContext->NumStats) - (p->FoundState->Freq - 1); + + for (c = p->MaxContext; c != p->MinContext; c = SUFFIX(c)) + { + unsigned ns1; + UInt32 cf, sf; + if ((ns1 = c->NumStats) != 1) + { + if ((ns1 & 1) == 0) + { + /* Expand for one UNIT */ + unsigned oldNU = ns1 >> 1; + unsigned i = U2I(oldNU); + if (i != U2I(oldNU + 1)) + { + void *ptr = AllocUnits(p, i + 1); + void *oldPtr; + if (!ptr) + { + RestartModel(p); + return; + } + oldPtr = STATS(c); + MyMem12Cpy(ptr, oldPtr, oldNU); + InsertNode(p, oldPtr, i); + c->Stats = STATS_REF(ptr); + } + } + c->SummFreq = (UInt16)(c->SummFreq + (2 * ns1 < ns) + 2 * ((4 * ns1 <= ns) & (c->SummFreq <= 8 * ns1))); + } + else + { + CPpmd_State *s = (CPpmd_State*)AllocUnits(p, 0); + if (!s) + { + RestartModel(p); + return; + } + *s = *ONE_STATE(c); + c->Stats = REF(s); + if (s->Freq < MAX_FREQ / 4 - 1) + s->Freq <<= 1; + else + s->Freq = MAX_FREQ - 4; + c->SummFreq = (UInt16)(s->Freq + p->InitEsc + (ns > 3)); + } + cf = 2 * (UInt32)p->FoundState->Freq * (c->SummFreq + 6); + sf = (UInt32)s0 + c->SummFreq; + if (cf < 6 * sf) + { + cf = 1 + (cf > sf) + (cf >= 4 * sf); + c->SummFreq += 3; + } + else + { + cf = 4 + (cf >= 9 * sf) + (cf >= 12 * sf) + (cf >= 15 * sf); + c->SummFreq = (UInt16)(c->SummFreq + cf); + } + { + CPpmd_State *s = STATS(c) + ns1; + SetSuccessor(s, successor); + s->Symbol = p->FoundState->Symbol; + s->Freq = (Byte)cf; + c->NumStats = (UInt16)(ns1 + 1); + } + } + p->MaxContext = p->MinContext = CTX(fSuccessor); +} + +static void Rescale(CPpmd7 *p) +{ + unsigned i, adder, sumFreq, escFreq; + CPpmd_State *stats = STATS(p->MinContext); + CPpmd_State *s = p->FoundState; + { + CPpmd_State tmp = *s; + for (; s != stats; s--) + s[0] = s[-1]; + *s = tmp; + } + escFreq = p->MinContext->SummFreq - s->Freq; + s->Freq += 4; + adder = (p->OrderFall != 0); + s->Freq = (Byte)((s->Freq + adder) >> 1); + sumFreq = s->Freq; + + i = p->MinContext->NumStats - 1; + do + { + escFreq -= (++s)->Freq; + s->Freq = (Byte)((s->Freq + adder) >> 1); + sumFreq += s->Freq; + if (s[0].Freq > s[-1].Freq) + { + CPpmd_State *s1 = s; + CPpmd_State tmp = *s1; + do + s1[0] = s1[-1]; + while (--s1 != stats && tmp.Freq > s1[-1].Freq); + *s1 = tmp; + } + } + while (--i); + + if (s->Freq == 0) + { + unsigned numStats = p->MinContext->NumStats; + unsigned n0, n1; + do { i++; } while ((--s)->Freq == 0); + escFreq += i; + p->MinContext->NumStats = (UInt16)(p->MinContext->NumStats - i); + if (p->MinContext->NumStats == 1) + { + CPpmd_State tmp = *stats; + do + { + tmp.Freq = (Byte)(tmp.Freq - (tmp.Freq >> 1)); + escFreq >>= 1; + } + while (escFreq > 1); + InsertNode(p, stats, U2I(((numStats + 1) >> 1))); + *(p->FoundState = ONE_STATE(p->MinContext)) = tmp; + return; + } + n0 = (numStats + 1) >> 1; + n1 = (p->MinContext->NumStats + 1) >> 1; + if (n0 != n1) + p->MinContext->Stats = STATS_REF(ShrinkUnits(p, stats, n0, n1)); + } + p->MinContext->SummFreq = (UInt16)(sumFreq + escFreq - (escFreq >> 1)); + p->FoundState = STATS(p->MinContext); +} + +CPpmd_See *Ppmd7_MakeEscFreq(CPpmd7 *p, unsigned numMasked, UInt32 *escFreq) +{ + CPpmd_See *see; + unsigned nonMasked = p->MinContext->NumStats - numMasked; + if (p->MinContext->NumStats != 256) + { + see = p->See[p->NS2Indx[nonMasked - 1]] + + (nonMasked < (unsigned)SUFFIX(p->MinContext)->NumStats - p->MinContext->NumStats) + + 2 * (p->MinContext->SummFreq < 11 * p->MinContext->NumStats) + + 4 * (numMasked > nonMasked) + + p->HiBitsFlag; + { + unsigned r = (see->Summ >> see->Shift); + see->Summ = (UInt16)(see->Summ - r); + *escFreq = r + (r == 0); + } + } + else + { + see = &p->DummySee; + *escFreq = 1; + } + return see; +} + +static void NextContext(CPpmd7 *p) +{ + CTX_PTR c = CTX(SUCCESSOR(p->FoundState)); + if (p->OrderFall == 0 && (Byte *)c > p->Text) + p->MinContext = p->MaxContext = c; + else + UpdateModel(p); +} + +void Ppmd7_Update1(CPpmd7 *p) +{ + CPpmd_State *s = p->FoundState; + s->Freq += 4; + p->MinContext->SummFreq += 4; + if (s[0].Freq > s[-1].Freq) + { + SwapStates(&s[0], &s[-1]); + p->FoundState = --s; + if (s->Freq > MAX_FREQ) + Rescale(p); + } + NextContext(p); +} + +void Ppmd7_Update1_0(CPpmd7 *p) +{ + p->PrevSuccess = (2 * p->FoundState->Freq > p->MinContext->SummFreq); + p->RunLength += p->PrevSuccess; + p->MinContext->SummFreq += 4; + if ((p->FoundState->Freq += 4) > MAX_FREQ) + Rescale(p); + NextContext(p); +} + +void Ppmd7_UpdateBin(CPpmd7 *p) +{ + p->FoundState->Freq = (Byte)(p->FoundState->Freq + (p->FoundState->Freq < 128 ? 1: 0)); + p->PrevSuccess = 1; + p->RunLength++; + NextContext(p); +} + +void Ppmd7_Update2(CPpmd7 *p) +{ + p->MinContext->SummFreq += 4; + if ((p->FoundState->Freq += 4) > MAX_FREQ) + Rescale(p); + p->RunLength = p->InitRL; + UpdateModel(p); +} diff --git a/C/Ppmd7.h b/C/Ppmd7.h new file mode 100644 index 0000000..96521c3 --- /dev/null +++ b/C/Ppmd7.h @@ -0,0 +1,140 @@ +/* Ppmd7.h -- PPMdH compression codec +2010-03-12 : Igor Pavlov : Public domain +This code is based on PPMd var.H (2001): Dmitry Shkarin : Public domain */ + +/* This code supports virtual RangeDecoder and includes the implementation +of RangeCoder from 7z, instead of RangeCoder from original PPMd var.H. +If you need the compatibility with original PPMd var.H, you can use external RangeDecoder */ + +#ifndef __PPMD7_H +#define __PPMD7_H + +#include "Ppmd.h" + +EXTERN_C_BEGIN + +#define PPMD7_MIN_ORDER 2 +#define PPMD7_MAX_ORDER 64 + +#define PPMD7_MIN_MEM_SIZE (1 << 11) +#define PPMD7_MAX_MEM_SIZE (0xFFFFFFFF - 12 * 3) + +struct CPpmd7_Context_; + +typedef + #ifdef PPMD_32BIT + struct CPpmd7_Context_ * + #else + UInt32 + #endif + CPpmd7_Context_Ref; + +typedef struct CPpmd7_Context_ +{ + UInt16 NumStats; + UInt16 SummFreq; + CPpmd_State_Ref Stats; + CPpmd7_Context_Ref Suffix; +} CPpmd7_Context; + +#define Ppmd7Context_OneState(p) ((CPpmd_State *)&(p)->SummFreq) + +typedef struct +{ + CPpmd7_Context *MinContext, *MaxContext; + CPpmd_State *FoundState; + unsigned OrderFall, InitEsc, PrevSuccess, MaxOrder, HiBitsFlag; + Int32 RunLength, InitRL; /* must be 32-bit at least */ + + UInt32 Size; + UInt32 GlueCount; + Byte *Base, *LoUnit, *HiUnit, *Text, *UnitsStart; + UInt32 AlignOffset; + + Byte Indx2Units[PPMD_NUM_INDEXES]; + Byte Units2Indx[128]; + CPpmd_Void_Ref FreeList[PPMD_NUM_INDEXES]; + Byte NS2Indx[256], NS2BSIndx[256], HB2Flag[256]; + CPpmd_See DummySee, See[25][16]; + UInt16 BinSumm[128][64]; +} CPpmd7; + +void Ppmd7_Construct(CPpmd7 *p); +Bool Ppmd7_Alloc(CPpmd7 *p, UInt32 size, ISzAlloc *alloc); +void Ppmd7_Free(CPpmd7 *p, ISzAlloc *alloc); +void Ppmd7_Init(CPpmd7 *p, unsigned maxOrder); +#define Ppmd7_WasAllocated(p) ((p)->Base != NULL) + + +/* ---------- Internal Functions ---------- */ + +extern const Byte PPMD7_kExpEscape[16]; + +#ifdef PPMD_32BIT + #define Ppmd7_GetPtr(p, ptr) (ptr) + #define Ppmd7_GetContext(p, ptr) (ptr) + #define Ppmd7_GetStats(p, ctx) ((ctx)->Stats) +#else + #define Ppmd7_GetPtr(p, offs) ((void *)((p)->Base + (offs))) + #define Ppmd7_GetContext(p, offs) ((CPpmd7_Context *)Ppmd7_GetPtr((p), (offs))) + #define Ppmd7_GetStats(p, ctx) ((CPpmd_State *)Ppmd7_GetPtr((p), ((ctx)->Stats))) +#endif + +void Ppmd7_Update1(CPpmd7 *p); +void Ppmd7_Update1_0(CPpmd7 *p); +void Ppmd7_Update2(CPpmd7 *p); +void Ppmd7_UpdateBin(CPpmd7 *p); + +#define Ppmd7_GetBinSumm(p) \ + &p->BinSumm[Ppmd7Context_OneState(p->MinContext)->Freq - 1][p->PrevSuccess + \ + p->NS2BSIndx[Ppmd7_GetContext(p, p->MinContext->Suffix)->NumStats - 1] + \ + (p->HiBitsFlag = p->HB2Flag[p->FoundState->Symbol]) + \ + 2 * p->HB2Flag[Ppmd7Context_OneState(p->MinContext)->Symbol] + \ + ((p->RunLength >> 26) & 0x20)] + +CPpmd_See *Ppmd7_MakeEscFreq(CPpmd7 *p, unsigned numMasked, UInt32 *scale); + + +/* ---------- Decode ---------- */ + +typedef struct +{ + UInt32 (*GetThreshold)(void *p, UInt32 total); + void (*Decode)(void *p, UInt32 start, UInt32 size); + UInt32 (*DecodeBit)(void *p, UInt32 size0); +} IPpmd7_RangeDec; + +typedef struct +{ + IPpmd7_RangeDec p; + UInt32 Range; + UInt32 Code; + IByteIn *Stream; +} CPpmd7z_RangeDec; + +void Ppmd7z_RangeDec_CreateVTable(CPpmd7z_RangeDec *p); +Bool Ppmd7z_RangeDec_Init(CPpmd7z_RangeDec *p); +#define Ppmd7z_RangeDec_IsFinishedOK(p) ((p)->Code == 0) + +int Ppmd7_DecodeSymbol(CPpmd7 *p, IPpmd7_RangeDec *rc); + + +/* ---------- Encode ---------- */ + +typedef struct +{ + UInt64 Low; + UInt32 Range; + Byte Cache; + UInt64 CacheSize; + IByteOut *Stream; +} CPpmd7z_RangeEnc; + +void Ppmd7z_RangeEnc_Init(CPpmd7z_RangeEnc *p); +void Ppmd7z_RangeEnc_FlushData(CPpmd7z_RangeEnc *p); + +void Ppmd7_EncodeSymbol(CPpmd7 *p, CPpmd7z_RangeEnc *rc, int symbol); + +EXTERN_C_END + +#endif diff --git a/C/Ppmd7Dec.c b/C/Ppmd7Dec.c new file mode 100644 index 0000000..68438d5 --- /dev/null +++ b/C/Ppmd7Dec.c @@ -0,0 +1,187 @@ +/* Ppmd7Dec.c -- PPMdH Decoder +2010-03-12 : Igor Pavlov : Public domain +This code is based on PPMd var.H (2001): Dmitry Shkarin : Public domain */ + +#include "Ppmd7.h" + +#define kTopValue (1 << 24) + +Bool Ppmd7z_RangeDec_Init(CPpmd7z_RangeDec *p) +{ + unsigned i; + p->Code = 0; + p->Range = 0xFFFFFFFF; + if (p->Stream->Read((void *)p->Stream) != 0) + return False; + for (i = 0; i < 4; i++) + p->Code = (p->Code << 8) | p->Stream->Read((void *)p->Stream); + return (p->Code < 0xFFFFFFFF); +} + +static UInt32 Range_GetThreshold(void *pp, UInt32 total) +{ + CPpmd7z_RangeDec *p = (CPpmd7z_RangeDec *)pp; + return (p->Code) / (p->Range /= total); +} + +static void Range_Normalize(CPpmd7z_RangeDec *p) +{ + if (p->Range < kTopValue) + { + p->Code = (p->Code << 8) | p->Stream->Read((void *)p->Stream); + p->Range <<= 8; + if (p->Range < kTopValue) + { + p->Code = (p->Code << 8) | p->Stream->Read((void *)p->Stream); + p->Range <<= 8; + } + } +} + +static void Range_Decode(void *pp, UInt32 start, UInt32 size) +{ + CPpmd7z_RangeDec *p = (CPpmd7z_RangeDec *)pp; + p->Code -= start * p->Range; + p->Range *= size; + Range_Normalize(p); +} + +static UInt32 Range_DecodeBit(void *pp, UInt32 size0) +{ + CPpmd7z_RangeDec *p = (CPpmd7z_RangeDec *)pp; + UInt32 newBound = (p->Range >> 14) * size0; + UInt32 symbol; + if (p->Code < newBound) + { + symbol = 0; + p->Range = newBound; + } + else + { + symbol = 1; + p->Code -= newBound; + p->Range -= newBound; + } + Range_Normalize(p); + return symbol; +} + +void Ppmd7z_RangeDec_CreateVTable(CPpmd7z_RangeDec *p) +{ + p->p.GetThreshold = Range_GetThreshold; + p->p.Decode = Range_Decode; + p->p.DecodeBit = Range_DecodeBit; +} + + +#define MASK(sym) ((signed char *)charMask)[sym] + +int Ppmd7_DecodeSymbol(CPpmd7 *p, IPpmd7_RangeDec *rc) +{ + size_t charMask[256 / sizeof(size_t)]; + if (p->MinContext->NumStats != 1) + { + CPpmd_State *s = Ppmd7_GetStats(p, p->MinContext); + unsigned i; + UInt32 count, hiCnt; + if ((count = rc->GetThreshold(rc, p->MinContext->SummFreq)) < (hiCnt = s->Freq)) + { + Byte symbol; + rc->Decode(rc, 0, s->Freq); + p->FoundState = s; + symbol = s->Symbol; + Ppmd7_Update1_0(p); + return symbol; + } + p->PrevSuccess = 0; + i = p->MinContext->NumStats - 1; + do + { + if ((hiCnt += (++s)->Freq) > count) + { + Byte symbol; + rc->Decode(rc, hiCnt - s->Freq, s->Freq); + p->FoundState = s; + symbol = s->Symbol; + Ppmd7_Update1(p); + return symbol; + } + } + while (--i); + if (count >= p->MinContext->SummFreq) + return -2; + p->HiBitsFlag = p->HB2Flag[p->FoundState->Symbol]; + rc->Decode(rc, hiCnt, p->MinContext->SummFreq - hiCnt); + PPMD_SetAllBitsIn256Bytes(charMask); + MASK(s->Symbol) = 0; + i = p->MinContext->NumStats - 1; + do { MASK((--s)->Symbol) = 0; } while (--i); + } + else + { + UInt16 *prob = Ppmd7_GetBinSumm(p); + if (rc->DecodeBit(rc, *prob) == 0) + { + Byte symbol; + *prob = (UInt16)PPMD_UPDATE_PROB_0(*prob); + symbol = (p->FoundState = Ppmd7Context_OneState(p->MinContext))->Symbol; + Ppmd7_UpdateBin(p); + return symbol; + } + *prob = (UInt16)PPMD_UPDATE_PROB_1(*prob); + p->InitEsc = PPMD7_kExpEscape[*prob >> 10]; + PPMD_SetAllBitsIn256Bytes(charMask); + MASK(Ppmd7Context_OneState(p->MinContext)->Symbol) = 0; + p->PrevSuccess = 0; + } + for (;;) + { + CPpmd_State *ps[256], *s; + UInt32 freqSum, count, hiCnt; + CPpmd_See *see; + unsigned i, num, numMasked = p->MinContext->NumStats; + do + { + p->OrderFall++; + if (!p->MinContext->Suffix) + return -1; + p->MinContext = Ppmd7_GetContext(p, p->MinContext->Suffix); + } + while (p->MinContext->NumStats == numMasked); + hiCnt = 0; + s = Ppmd7_GetStats(p, p->MinContext); + i = 0; + num = p->MinContext->NumStats - numMasked; + do + { + int k = (int)(MASK(s->Symbol)); + hiCnt += (s->Freq & k); + ps[i] = s++; + i -= k; + } + while (i != num); + + see = Ppmd7_MakeEscFreq(p, numMasked, &freqSum); + freqSum += hiCnt; + count = rc->GetThreshold(rc, freqSum); + + if (count < hiCnt) + { + Byte symbol; + CPpmd_State **pps = ps; + for (hiCnt = 0; (hiCnt += (*pps)->Freq) <= count; pps++); + s = *pps; + rc->Decode(rc, hiCnt - s->Freq, s->Freq); + Ppmd_See_Update(see); + p->FoundState = s; + symbol = s->Symbol; + Ppmd7_Update2(p); + return symbol; + } + if (count >= freqSum) + return -2; + rc->Decode(rc, hiCnt, freqSum - hiCnt); + see->Summ = (UInt16)(see->Summ + freqSum); + do { MASK(ps[--i]->Symbol) = 0; } while (i != 0); + } +} diff --git a/C/Ppmd7Enc.c b/C/Ppmd7Enc.c new file mode 100644 index 0000000..8247757 --- /dev/null +++ b/C/Ppmd7Enc.c @@ -0,0 +1,185 @@ +/* Ppmd7Enc.c -- PPMdH Encoder +2010-03-12 : Igor Pavlov : Public domain +This code is based on PPMd var.H (2001): Dmitry Shkarin : Public domain */ + +#include "Ppmd7.h" + +#define kTopValue (1 << 24) + +void Ppmd7z_RangeEnc_Init(CPpmd7z_RangeEnc *p) +{ + p->Low = 0; + p->Range = 0xFFFFFFFF; + p->Cache = 0; + p->CacheSize = 1; +} + +static void RangeEnc_ShiftLow(CPpmd7z_RangeEnc *p) +{ + if ((UInt32)p->Low < (UInt32)0xFF000000 || (unsigned)(p->Low >> 32) != 0) + { + Byte temp = p->Cache; + do + { + p->Stream->Write(p->Stream, (Byte)(temp + (Byte)(p->Low >> 32))); + temp = 0xFF; + } + while(--p->CacheSize != 0); + p->Cache = (Byte)((UInt32)p->Low >> 24); + } + p->CacheSize++; + p->Low = (UInt32)p->Low << 8; +} + +static void RangeEnc_Encode(CPpmd7z_RangeEnc *p, UInt32 start, UInt32 size, UInt32 total) +{ + p->Low += start * (p->Range /= total); + p->Range *= size; + while (p->Range < kTopValue) + { + p->Range <<= 8; + RangeEnc_ShiftLow(p); + } +} + +static void RangeEnc_EncodeBit_0(CPpmd7z_RangeEnc *p, UInt32 size0) +{ + p->Range = (p->Range >> 14) * size0; + while (p->Range < kTopValue) + { + p->Range <<= 8; + RangeEnc_ShiftLow(p); + } +} + +static void RangeEnc_EncodeBit_1(CPpmd7z_RangeEnc *p, UInt32 size0) +{ + UInt32 newBound = (p->Range >> 14) * size0; + p->Low += newBound; + p->Range -= newBound; + while (p->Range < kTopValue) + { + p->Range <<= 8; + RangeEnc_ShiftLow(p); + } +} + +void Ppmd7z_RangeEnc_FlushData(CPpmd7z_RangeEnc *p) +{ + unsigned i; + for (i = 0; i < 5; i++) + RangeEnc_ShiftLow(p); +} + + +#define MASK(sym) ((signed char *)charMask)[sym] + +void Ppmd7_EncodeSymbol(CPpmd7 *p, CPpmd7z_RangeEnc *rc, int symbol) +{ + size_t charMask[256 / sizeof(size_t)]; + if (p->MinContext->NumStats != 1) + { + CPpmd_State *s = Ppmd7_GetStats(p, p->MinContext); + UInt32 sum; + unsigned i; + if (s->Symbol == symbol) + { + RangeEnc_Encode(rc, 0, s->Freq, p->MinContext->SummFreq); + p->FoundState = s; + Ppmd7_Update1_0(p); + return; + } + p->PrevSuccess = 0; + sum = s->Freq; + i = p->MinContext->NumStats - 1; + do + { + if ((++s)->Symbol == symbol) + { + RangeEnc_Encode(rc, sum, s->Freq, p->MinContext->SummFreq); + p->FoundState = s; + Ppmd7_Update1(p); + return; + } + sum += s->Freq; + } + while (--i); + + p->HiBitsFlag = p->HB2Flag[p->FoundState->Symbol]; + PPMD_SetAllBitsIn256Bytes(charMask); + MASK(s->Symbol) = 0; + i = p->MinContext->NumStats - 1; + do { MASK((--s)->Symbol) = 0; } while (--i); + RangeEnc_Encode(rc, sum, p->MinContext->SummFreq - sum, p->MinContext->SummFreq); + } + else + { + UInt16 *prob = Ppmd7_GetBinSumm(p); + CPpmd_State *s = Ppmd7Context_OneState(p->MinContext); + if (s->Symbol == symbol) + { + RangeEnc_EncodeBit_0(rc, *prob); + *prob = (UInt16)PPMD_UPDATE_PROB_0(*prob); + p->FoundState = s; + Ppmd7_UpdateBin(p); + return; + } + else + { + RangeEnc_EncodeBit_1(rc, *prob); + *prob = (UInt16)PPMD_UPDATE_PROB_1(*prob); + p->InitEsc = PPMD7_kExpEscape[*prob >> 10]; + PPMD_SetAllBitsIn256Bytes(charMask); + MASK(s->Symbol) = 0; + p->PrevSuccess = 0; + } + } + for (;;) + { + UInt32 escFreq; + CPpmd_See *see; + CPpmd_State *s; + UInt32 sum; + unsigned i, numMasked = p->MinContext->NumStats; + do + { + p->OrderFall++; + if (!p->MinContext->Suffix) + return; /* EndMarker (symbol = -1) */ + p->MinContext = Ppmd7_GetContext(p, p->MinContext->Suffix); + } + while (p->MinContext->NumStats == numMasked); + + see = Ppmd7_MakeEscFreq(p, numMasked, &escFreq); + s = Ppmd7_GetStats(p, p->MinContext); + sum = 0; + i = p->MinContext->NumStats; + do + { + int cur = s->Symbol; + if (cur == symbol) + { + UInt32 low = sum; + CPpmd_State *s1 = s; + do + { + sum += (s->Freq & (int)(MASK(s->Symbol))); + s++; + } + while (--i); + RangeEnc_Encode(rc, low, s1->Freq, sum + escFreq); + Ppmd_See_Update(see); + p->FoundState = s1; + Ppmd7_Update2(p); + return; + } + sum += (s->Freq & (int)(MASK(cur))); + MASK(cur) = 0; + s++; + } + while (--i); + + RangeEnc_Encode(rc, sum, escFreq, sum + escFreq); + see->Summ = (UInt16)(see->Summ + sum + escFreq); + } +} diff --git a/C/Ppmd8.c b/C/Ppmd8.c new file mode 100644 index 0000000..9187a88 --- /dev/null +++ b/C/Ppmd8.c @@ -0,0 +1,1120 @@ +/* Ppmd8.c -- PPMdI codec +2010-03-24 : Igor Pavlov : Public domain +This code is based on PPMd var.I (2002): Dmitry Shkarin : Public domain */ + +#include + +#include "Ppmd8.h" + +const Byte PPMD8_kExpEscape[16] = { 25, 14, 9, 7, 5, 5, 4, 4, 4, 3, 3, 3, 2, 2, 2, 2 }; +static const UInt16 kInitBinEsc[] = { 0x3CDD, 0x1F3F, 0x59BF, 0x48F3, 0x64A1, 0x5ABC, 0x6632, 0x6051}; + +#define MAX_FREQ 124 +#define UNIT_SIZE 12 + +#define U2B(nu) ((UInt32)(nu) * UNIT_SIZE) +#define U2I(nu) (p->Units2Indx[(nu) - 1]) +#define I2U(indx) (p->Indx2Units[indx]) + +#ifdef PPMD_32BIT + #define REF(ptr) (ptr) +#else + #define REF(ptr) ((UInt32)((Byte *)(ptr) - (p)->Base)) +#endif + +#define STATS_REF(ptr) ((CPpmd_State_Ref)REF(ptr)) + +#define CTX(ref) ((CPpmd8_Context *)Ppmd8_GetContext(p, ref)) +#define STATS(ctx) Ppmd8_GetStats(p, ctx) +#define ONE_STATE(ctx) Ppmd8Context_OneState(ctx) +#define SUFFIX(ctx) CTX((ctx)->Suffix) + +typedef CPpmd8_Context * CTX_PTR; + +struct CPpmd8_Node_; + +typedef + #ifdef PPMD_32BIT + struct CPpmd8_Node_ * + #else + UInt32 + #endif + CPpmd8_Node_Ref; + +typedef struct CPpmd8_Node_ +{ + UInt32 Stamp; + CPpmd8_Node_Ref Next; + UInt32 NU; +} CPpmd8_Node; + +#ifdef PPMD_32BIT + #define NODE(ptr) (ptr) +#else + #define NODE(offs) ((CPpmd8_Node *)(p->Base + (offs))) +#endif + +#define EMPTY_NODE 0xFFFFFFFF + +void Ppmd8_Construct(CPpmd8 *p) +{ + unsigned i, k, m; + + p->Base = 0; + + for (i = 0, k = 0; i < PPMD_NUM_INDEXES; i++) + { + unsigned step = (i >= 12 ? 4 : (i >> 2) + 1); + do { p->Units2Indx[k++] = (Byte)i; } while(--step); + p->Indx2Units[i] = (Byte)k; + } + + p->NS2BSIndx[0] = (0 << 1); + p->NS2BSIndx[1] = (1 << 1); + memset(p->NS2BSIndx + 2, (2 << 1), 9); + memset(p->NS2BSIndx + 11, (3 << 1), 256 - 11); + + for (i = 0; i < 5; i++) + p->NS2Indx[i] = (Byte)i; + for (m = i, k = 1; i < 260; i++) + { + p->NS2Indx[i] = (Byte)m; + if (--k == 0) + k = (++m) - 4; + } +} + +void Ppmd8_Free(CPpmd8 *p, ISzAlloc *alloc) +{ + alloc->Free(alloc, p->Base); + p->Size = 0; + p->Base = 0; +} + +Bool Ppmd8_Alloc(CPpmd8 *p, UInt32 size, ISzAlloc *alloc) +{ + if (p->Base == 0 || p->Size != size) + { + Ppmd8_Free(p, alloc); + p->AlignOffset = + #ifdef PPMD_32BIT + (4 - size) & 3; + #else + 4 - (size & 3); + #endif + if ((p->Base = (Byte *)alloc->Alloc(alloc, p->AlignOffset + size)) == 0) + return False; + p->Size = size; + } + return True; +} + +static void InsertNode(CPpmd8 *p, void *node, unsigned indx) +{ + ((CPpmd8_Node *)node)->Stamp = EMPTY_NODE; + ((CPpmd8_Node *)node)->Next = (CPpmd8_Node_Ref)p->FreeList[indx]; + ((CPpmd8_Node *)node)->NU = I2U(indx); + p->FreeList[indx] = REF(node); + p->Stamps[indx]++; +} + +static void *RemoveNode(CPpmd8 *p, unsigned indx) +{ + CPpmd8_Node *node = NODE((CPpmd8_Node_Ref)p->FreeList[indx]); + p->FreeList[indx] = node->Next; + p->Stamps[indx]--; + return node; +} + +static void SplitBlock(CPpmd8 *p, void *ptr, unsigned oldIndx, unsigned newIndx) +{ + unsigned i, nu = I2U(oldIndx) - I2U(newIndx); + ptr = (Byte *)ptr + U2B(I2U(newIndx)); + if (I2U(i = U2I(nu)) != nu) + { + unsigned k = I2U(--i); + InsertNode(p, ((Byte *)ptr) + U2B(k), nu - k - 1); + } + InsertNode(p, ptr, i); +} + +static void GlueFreeBlocks(CPpmd8 *p) +{ + CPpmd8_Node_Ref head = 0; + CPpmd8_Node_Ref *prev = &head; + unsigned i; + + p->GlueCount = 1 << 13; + memset(p->Stamps, 0, sizeof(p->Stamps)); + + /* Order-0 context is always at top UNIT, so we don't need guard NODE at the end. + All blocks up to p->LoUnit can be free, so we need guard NODE at LoUnit. */ + if (p->LoUnit != p->HiUnit) + ((CPpmd8_Node *)p->LoUnit)->Stamp = 0; + + /* Glue free blocks */ + for (i = 0; i < PPMD_NUM_INDEXES; i++) + { + CPpmd8_Node_Ref next = (CPpmd8_Node_Ref)p->FreeList[i]; + p->FreeList[i] = 0; + while (next != 0) + { + CPpmd8_Node *node = NODE(next); + if (node->NU != 0) + { + CPpmd8_Node *node2; + *prev = next; + prev = &(node->Next); + while ((node2 = node + node->NU)->Stamp == EMPTY_NODE) + { + node->NU += node2->NU; + node2->NU = 0; + } + } + next = node->Next; + } + } + *prev = 0; + + /* Fill lists of free blocks */ + while (head != 0) + { + CPpmd8_Node *node = NODE(head); + unsigned nu; + head = node->Next; + nu = node->NU; + if (nu == 0) + continue; + for (; nu > 128; nu -= 128, node += 128) + InsertNode(p, node, PPMD_NUM_INDEXES - 1); + if (I2U(i = U2I(nu)) != nu) + { + unsigned k = I2U(--i); + InsertNode(p, node + k, nu - k - 1); + } + InsertNode(p, node, i); + } +} + +static void *AllocUnitsRare(CPpmd8 *p, unsigned indx) +{ + unsigned i; + void *retVal; + if (p->GlueCount == 0) + { + GlueFreeBlocks(p); + if (p->FreeList[indx] != 0) + return RemoveNode(p, indx); + } + i = indx; + do + { + if (++i == PPMD_NUM_INDEXES) + { + UInt32 numBytes = U2B(I2U(indx)); + p->GlueCount--; + return ((UInt32)(p->UnitsStart - p->Text) > numBytes) ? (p->UnitsStart -= numBytes) : (NULL); + } + } + while (p->FreeList[i] == 0); + retVal = RemoveNode(p, i); + SplitBlock(p, retVal, i, indx); + return retVal; +} + +static void *AllocUnits(CPpmd8 *p, unsigned indx) +{ + UInt32 numBytes; + if (p->FreeList[indx] != 0) + return RemoveNode(p, indx); + numBytes = U2B(I2U(indx)); + if (numBytes <= (UInt32)(p->HiUnit - p->LoUnit)) + { + void *retVal = p->LoUnit; + p->LoUnit += numBytes; + return retVal; + } + return AllocUnitsRare(p, indx); +} + +#define MyMem12Cpy(dest, src, num) \ + { UInt32 *d = (UInt32 *)dest; const UInt32 *s = (const UInt32 *)src; UInt32 n = num; \ + do { d[0] = s[0]; d[1] = s[1]; d[2] = s[2]; s += 3; d += 3; } while(--n); } + +static void *ShrinkUnits(CPpmd8 *p, void *oldPtr, unsigned oldNU, unsigned newNU) +{ + unsigned i0 = U2I(oldNU); + unsigned i1 = U2I(newNU); + if (i0 == i1) + return oldPtr; + if (p->FreeList[i1] != 0) + { + void *ptr = RemoveNode(p, i1); + MyMem12Cpy(ptr, oldPtr, newNU); + InsertNode(p, oldPtr, i0); + return ptr; + } + SplitBlock(p, oldPtr, i0, i1); + return oldPtr; +} + +static void FreeUnits(CPpmd8 *p, void *ptr, unsigned nu) +{ + InsertNode(p, ptr, U2I(nu)); +} + +static void SpecialFreeUnit(CPpmd8 *p, void *ptr) +{ + if ((Byte *)ptr != p->UnitsStart) + InsertNode(p, ptr, 0); + else + { + #ifdef PPMD8_FREEZE_SUPPORT + *(UInt32 *)ptr = EMPTY_NODE; /* it's used for (Flags == 0xFF) check in RemoveBinContexts */ + #endif + p->UnitsStart += UNIT_SIZE; + } +} + +static void *MoveUnitsUp(CPpmd8 *p, void *oldPtr, unsigned nu) +{ + unsigned indx = U2I(nu); + void *ptr; + if ((Byte *)oldPtr > p->UnitsStart + 16 * 1024 || REF(oldPtr) > p->FreeList[indx]) + return oldPtr; + ptr = RemoveNode(p, indx); + MyMem12Cpy(ptr, oldPtr, nu); + if ((Byte*)oldPtr != p->UnitsStart) + InsertNode(p, oldPtr, indx); + else + p->UnitsStart += U2B(I2U(indx)); + return ptr; +} + +static void ExpandTextArea(CPpmd8 *p) +{ + UInt32 count[PPMD_NUM_INDEXES]; + unsigned i; + memset(count, 0, sizeof(count)); + if (p->LoUnit != p->HiUnit) + ((CPpmd8_Node *)p->LoUnit)->Stamp = 0; + + { + CPpmd8_Node *node = (CPpmd8_Node *)p->UnitsStart; + for (; node->Stamp == EMPTY_NODE; node += node->NU) + { + node->Stamp = 0; + count[U2I(node->NU)]++; + } + p->UnitsStart = (Byte *)node; + } + + for (i = 0; i < PPMD_NUM_INDEXES; i++) + { + CPpmd8_Node_Ref *next = (CPpmd8_Node_Ref *)&p->FreeList[i]; + while (count[i] != 0) + { + CPpmd8_Node *node = NODE(*next); + while (node->Stamp == 0) + { + *next = node->Next; + node = NODE(*next); + p->Stamps[i]--; + if (--count[i] == 0) + break; + } + next = &node->Next; + } + } +} + +#define SUCCESSOR(p) ((CPpmd_Void_Ref)((p)->SuccessorLow | ((UInt32)(p)->SuccessorHigh << 16))) + +static void SetSuccessor(CPpmd_State *p, CPpmd_Void_Ref v) +{ + (p)->SuccessorLow = (UInt16)((UInt32)(v) & 0xFFFF); + (p)->SuccessorHigh = (UInt16)(((UInt32)(v) >> 16) & 0xFFFF); +} + +#define RESET_TEXT(offs) { p->Text = p->Base + p->AlignOffset + (offs); } + +static void RestartModel(CPpmd8 *p) +{ + unsigned i, k, m, r; + + memset(p->FreeList, 0, sizeof(p->FreeList)); + memset(p->Stamps, 0, sizeof(p->Stamps)); + RESET_TEXT(0); + p->HiUnit = p->Text + p->Size; + p->LoUnit = p->UnitsStart = p->HiUnit - p->Size / 8 / UNIT_SIZE * 7 * UNIT_SIZE; + p->GlueCount = 0; + + p->OrderFall = p->MaxOrder; + p->RunLength = p->InitRL = -(Int32)((p->MaxOrder < 12) ? p->MaxOrder : 12) - 1; + p->PrevSuccess = 0; + + p->MinContext = p->MaxContext = (CTX_PTR)(p->HiUnit -= UNIT_SIZE); /* AllocContext(p); */ + p->MinContext->Suffix = 0; + p->MinContext->NumStats = 255; + p->MinContext->Flags = 0; + p->MinContext->SummFreq = 256 + 1; + p->FoundState = (CPpmd_State *)p->LoUnit; /* AllocUnits(p, PPMD_NUM_INDEXES - 1); */ + p->LoUnit += U2B(256 / 2); + p->MinContext->Stats = REF(p->FoundState); + for (i = 0; i < 256; i++) + { + CPpmd_State *s = &p->FoundState[i]; + s->Symbol = (Byte)i; + s->Freq = 1; + SetSuccessor(s, 0); + } + + for (i = m = 0; m < 25; m++) + { + while (p->NS2Indx[i] == m) + i++; + for (k = 0; k < 8; k++) + { + UInt16 val = (UInt16)(PPMD_BIN_SCALE - kInitBinEsc[k] / (i + 1)); + UInt16 *dest = p->BinSumm[m] + k; + for (r = 0; r < 64; r += 8) + dest[r] = val; + } + } + + for (i = m = 0; m < 24; m++) + { + while (p->NS2Indx[i + 3] == m + 3) + i++; + for (k = 0; k < 32; k++) + { + CPpmd_See *s = &p->See[m][k]; + s->Summ = (UInt16)((2 * i + 5) << (s->Shift = PPMD_PERIOD_BITS - 4)); + s->Count = 7; + } + } +} + +void Ppmd8_Init(CPpmd8 *p, unsigned maxOrder, unsigned restoreMethod) +{ + p->MaxOrder = maxOrder; + p->RestoreMethod = restoreMethod; + RestartModel(p); + p->DummySee.Shift = PPMD_PERIOD_BITS; + p->DummySee.Summ = 0; /* unused */ + p->DummySee.Count = 64; /* unused */ +} + +static void Refresh(CPpmd8 *p, CTX_PTR ctx, unsigned oldNU, unsigned scale) +{ + unsigned i = ctx->NumStats, escFreq, sumFreq, flags; + CPpmd_State *s = (CPpmd_State *)ShrinkUnits(p, STATS(ctx), oldNU, (i + 2) >> 1); + ctx->Stats = REF(s); + #ifdef PPMD8_FREEZE_SUPPORT + /* fixed over Shkarin's code. Fixed code is not compatible with original code for some files in FREEZE mode. */ + scale |= (ctx->SummFreq >= ((UInt32)1 << 15)); + #endif + flags = (ctx->Flags & (0x10 + 0x04 * scale)) + 0x08 * (s->Symbol >= 0x40); + escFreq = ctx->SummFreq - s->Freq; + sumFreq = (s->Freq = (Byte)((s->Freq + scale) >> scale)); + do + { + escFreq -= (++s)->Freq; + sumFreq += (s->Freq = (Byte)((s->Freq + scale) >> scale)); + flags |= 0x08 * (s->Symbol >= 0x40); + } + while (--i); + ctx->SummFreq = (UInt16)(sumFreq + ((escFreq + scale) >> scale)); + ctx->Flags = (Byte)flags; +} + +static void SwapStates(CPpmd_State *t1, CPpmd_State *t2) +{ + CPpmd_State tmp = *t1; + *t1 = *t2; + *t2 = tmp; +} + +static CPpmd_Void_Ref CutOff(CPpmd8 *p, CTX_PTR ctx, unsigned order) +{ + int i; + unsigned tmp; + CPpmd_State *s; + + if (!ctx->NumStats) + { + s = ONE_STATE(ctx); + if ((Byte *)Ppmd8_GetPtr(p, SUCCESSOR(s)) >= p->UnitsStart) + { + if (order < p->MaxOrder) + SetSuccessor(s, CutOff(p, CTX(SUCCESSOR(s)), order + 1)); + else + SetSuccessor(s, 0); + if (SUCCESSOR(s) || order <= 9) /* O_BOUND */ + return REF(ctx); + } + SpecialFreeUnit(p, ctx); + return 0; + } + + ctx->Stats = STATS_REF(MoveUnitsUp(p, STATS(ctx), tmp = ((unsigned)ctx->NumStats + 2) >> 1)); + + for (s = STATS(ctx) + (i = ctx->NumStats); s >= STATS(ctx); s--) + if ((Byte *)Ppmd8_GetPtr(p, SUCCESSOR(s)) < p->UnitsStart) + { + CPpmd_State *s2 = STATS(ctx) + (i--); + SetSuccessor(s, 0); + SwapStates(s, s2); + } + else if (order < p->MaxOrder) + SetSuccessor(s, CutOff(p, CTX(SUCCESSOR(s)), order + 1)); + else + SetSuccessor(s, 0); + + if (i != ctx->NumStats && order) + { + ctx->NumStats = (Byte)i; + s = STATS(ctx); + if (i < 0) + { + FreeUnits(p, s, tmp); + SpecialFreeUnit(p, ctx); + return 0; + } + if (i == 0) + { + ctx->Flags = (ctx->Flags & 0x10) + 0x08 * (s->Symbol >= 0x40); + *ONE_STATE(ctx) = *s; + FreeUnits(p, s, tmp); + ONE_STATE(ctx)->Freq = (Byte)((unsigned)ONE_STATE(ctx)->Freq + 11) >> 3; + } + else + Refresh(p, ctx, tmp, ctx->SummFreq > 16 * i); + } + return REF(ctx); +} + +#ifdef PPMD8_FREEZE_SUPPORT +static CPpmd_Void_Ref RemoveBinContexts(CPpmd8 *p, CTX_PTR ctx, unsigned order) +{ + CPpmd_State *s; + if (!ctx->NumStats) + { + s = ONE_STATE(ctx); + if ((Byte *)Ppmd8_GetPtr(p, SUCCESSOR(s)) >= p->UnitsStart && order < p->MaxOrder) + SetSuccessor(s, RemoveBinContexts(p, CTX(SUCCESSOR(s)), order + 1)); + else + SetSuccessor(s, 0); + /* Suffix context can be removed already, since different (high-order) + Successors may refer to same context. So we check Flags == 0xFF (Stamp == EMPTY_NODE) */ + if (!SUCCESSOR(s) && (!SUFFIX(ctx)->NumStats || SUFFIX(ctx)->Flags == 0xFF)) + { + FreeUnits(p, ctx, 1); + return 0; + } + else + return REF(ctx); + } + + for (s = STATS(ctx) + ctx->NumStats; s >= STATS(ctx); s--) + if ((Byte *)Ppmd8_GetPtr(p, SUCCESSOR(s)) >= p->UnitsStart && order < p->MaxOrder) + SetSuccessor(s, RemoveBinContexts(p, CTX(SUCCESSOR(s)), order + 1)); + else + SetSuccessor(s, 0); + + return REF(ctx); +} +#endif + +static UInt32 GetUsedMemory(const CPpmd8 *p) +{ + UInt32 v = 0; + unsigned i; + for (i = 0; i < PPMD_NUM_INDEXES; i++) + v += p->Stamps[i] * I2U(i); + return p->Size - (UInt32)(p->HiUnit - p->LoUnit) - (UInt32)(p->UnitsStart - p->Text) - U2B(v); +} + +#ifdef PPMD8_FREEZE_SUPPORT + #define RESTORE_MODEL(c1, fSuccessor) RestoreModel(p, c1, fSuccessor) +#else + #define RESTORE_MODEL(c1, fSuccessor) RestoreModel(p, c1) +#endif + +static void RestoreModel(CPpmd8 *p, CTX_PTR c1 + #ifdef PPMD8_FREEZE_SUPPORT + , CTX_PTR fSuccessor + #endif + ) +{ + CTX_PTR c; + CPpmd_State *s; + RESET_TEXT(0); + for (c = p->MaxContext; c != c1; c = SUFFIX(c)) + if (--(c->NumStats) == 0) + { + s = STATS(c); + c->Flags = (c->Flags & 0x10) + 0x08 * (s->Symbol >= 0x40); + *ONE_STATE(c) = *s; + SpecialFreeUnit(p, s); + ONE_STATE(c)->Freq = (ONE_STATE(c)->Freq + 11) >> 3; + } + else + Refresh(p, c, (c->NumStats+3) >> 1, 0); + + for (; c != p->MinContext; c = SUFFIX(c)) + if (!c->NumStats) + ONE_STATE(c)->Freq -= ONE_STATE(c)->Freq >> 1; + else if ((c->SummFreq += 4) > 128 + 4 * c->NumStats) + Refresh(p, c, (c->NumStats + 2) >> 1, 1); + + #ifdef PPMD8_FREEZE_SUPPORT + if (p->RestoreMethod > PPMD8_RESTORE_METHOD_FREEZE) + { + p->MaxContext = fSuccessor; + p->GlueCount += !(p->Stamps[1] & 1); + } + else if (p->RestoreMethod == PPMD8_RESTORE_METHOD_FREEZE) + { + while (p->MaxContext->Suffix) + p->MaxContext = SUFFIX(p->MaxContext); + RemoveBinContexts(p, p->MaxContext, 0); + p->RestoreMethod++; + p->GlueCount = 0; + p->OrderFall = p->MaxOrder; + } + else + #endif + if (p->RestoreMethod == PPMD8_RESTORE_METHOD_RESTART || GetUsedMemory(p) < (p->Size >> 1)) + RestartModel(p); + else + { + while (p->MaxContext->Suffix) + p->MaxContext = SUFFIX(p->MaxContext); + do + { + CutOff(p, p->MaxContext, 0); + ExpandTextArea(p); + } + while (GetUsedMemory(p) > 3 * (p->Size >> 2)); + p->GlueCount = 0; + p->OrderFall = p->MaxOrder; + } +} + +static CTX_PTR CreateSuccessors(CPpmd8 *p, Bool skip, CPpmd_State *s1, CTX_PTR c) +{ + CPpmd_State upState; + Byte flags; + CPpmd_Byte_Ref upBranch = (CPpmd_Byte_Ref)SUCCESSOR(p->FoundState); + /* fixed over Shkarin's code. Maybe it could work without + 1 too. */ + CPpmd_State *ps[PPMD8_MAX_ORDER + 1]; + unsigned numPs = 0; + + if (!skip) + ps[numPs++] = p->FoundState; + + while (c->Suffix) + { + CPpmd_Void_Ref successor; + CPpmd_State *s; + c = SUFFIX(c); + if (s1) + { + s = s1; + s1 = NULL; + } + else if (c->NumStats != 0) + { + for (s = STATS(c); s->Symbol != p->FoundState->Symbol; s++); + if (s->Freq < MAX_FREQ - 9) + { + s->Freq++; + c->SummFreq++; + } + } + else + { + s = ONE_STATE(c); + s->Freq += (!SUFFIX(c)->NumStats & (s->Freq < 24)); + } + successor = SUCCESSOR(s); + if (successor != upBranch) + { + c = CTX(successor); + if (numPs == 0) + return c; + break; + } + ps[numPs++] = s; + } + + upState.Symbol = *(const Byte *)Ppmd8_GetPtr(p, upBranch); + SetSuccessor(&upState, upBranch + 1); + flags = 0x10 * (p->FoundState->Symbol >= 0x40) + 0x08 * (upState.Symbol >= 0x40); + + if (c->NumStats == 0) + upState.Freq = ONE_STATE(c)->Freq; + else + { + UInt32 cf, s0; + CPpmd_State *s; + for (s = STATS(c); s->Symbol != upState.Symbol; s++); + cf = s->Freq - 1; + s0 = c->SummFreq - c->NumStats - cf; + upState.Freq = (Byte)(1 + ((2 * cf <= s0) ? (5 * cf > s0) : ((cf + 2 * s0 - 3) / s0))); + } + + do + { + /* Create Child */ + CTX_PTR c1; /* = AllocContext(p); */ + if (p->HiUnit != p->LoUnit) + c1 = (CTX_PTR)(p->HiUnit -= UNIT_SIZE); + else if (p->FreeList[0] != 0) + c1 = (CTX_PTR)RemoveNode(p, 0); + else + { + c1 = (CTX_PTR)AllocUnitsRare(p, 0); + if (!c1) + return NULL; + } + c1->NumStats = 0; + c1->Flags = flags; + *ONE_STATE(c1) = upState; + c1->Suffix = REF(c); + SetSuccessor(ps[--numPs], REF(c1)); + c = c1; + } + while (numPs != 0); + + return c; +} + +static CTX_PTR ReduceOrder(CPpmd8 *p, CPpmd_State *s1, CTX_PTR c) +{ + CPpmd_State *s = NULL; + CTX_PTR c1 = c; + CPpmd_Void_Ref upBranch = REF(p->Text); + + #ifdef PPMD8_FREEZE_SUPPORT + /* The BUG in Shkarin's code was fixed: ps could overflow in CUT_OFF mode. */ + CPpmd_State *ps[PPMD8_MAX_ORDER + 1]; + unsigned numPs = 0; + ps[numPs++] = p->FoundState; + #endif + + SetSuccessor(p->FoundState, upBranch); + p->OrderFall++; + + for (;;) + { + if (s1) + { + c = SUFFIX(c); + s = s1; + s1 = NULL; + } + else + { + if (!c->Suffix) + { + #ifdef PPMD8_FREEZE_SUPPORT + if (p->RestoreMethod > PPMD8_RESTORE_METHOD_FREEZE) + { + do { SetSuccessor(ps[--numPs], REF(c)); } while (numPs); + RESET_TEXT(1); + p->OrderFall = 1; + } + #endif + return c; + } + c = SUFFIX(c); + if (c->NumStats) + { + if ((s = STATS(c))->Symbol != p->FoundState->Symbol) + do { s++; } while (s->Symbol != p->FoundState->Symbol); + if (s->Freq < MAX_FREQ - 9) + { + s->Freq += 2; + c->SummFreq += 2; + } + } + else + { + s = ONE_STATE(c); + s->Freq += (s->Freq < 32); + } + } + if (SUCCESSOR(s)) + break; + #ifdef PPMD8_FREEZE_SUPPORT + ps[numPs++] = s; + #endif + SetSuccessor(s, upBranch); + p->OrderFall++; + } + + #ifdef PPMD8_FREEZE_SUPPORT + if (p->RestoreMethod > PPMD8_RESTORE_METHOD_FREEZE) + { + c = CTX(SUCCESSOR(s)); + do { SetSuccessor(ps[--numPs], REF(c)); } while (numPs); + RESET_TEXT(1); + p->OrderFall = 1; + return c; + } + else + #endif + if (SUCCESSOR(s) <= upBranch) + { + CTX_PTR successor; + CPpmd_State *s1 = p->FoundState; + p->FoundState = s; + + successor = CreateSuccessors(p, False, NULL, c); + if (successor == NULL) + SetSuccessor(s, 0); + else + SetSuccessor(s, REF(successor)); + p->FoundState = s1; + } + + if (p->OrderFall == 1 && c1 == p->MaxContext) + { + SetSuccessor(p->FoundState, SUCCESSOR(s)); + p->Text--; + } + if (SUCCESSOR(s) == 0) + return NULL; + return CTX(SUCCESSOR(s)); +} + +static void UpdateModel(CPpmd8 *p) +{ + CPpmd_Void_Ref successor, fSuccessor = SUCCESSOR(p->FoundState); + CTX_PTR c; + unsigned s0, ns, fFreq = p->FoundState->Freq; + Byte flag, fSymbol = p->FoundState->Symbol; + CPpmd_State *s = NULL; + + if (p->FoundState->Freq < MAX_FREQ / 4 && p->MinContext->Suffix != 0) + { + c = SUFFIX(p->MinContext); + + if (c->NumStats == 0) + { + s = ONE_STATE(c); + if (s->Freq < 32) + s->Freq++; + } + else + { + s = STATS(c); + if (s->Symbol != p->FoundState->Symbol) + { + do { s++; } while (s->Symbol != p->FoundState->Symbol); + if (s[0].Freq >= s[-1].Freq) + { + SwapStates(&s[0], &s[-1]); + s--; + } + } + if (s->Freq < MAX_FREQ - 9) + { + s->Freq += 2; + c->SummFreq += 2; + } + } + } + + c = p->MaxContext; + if (p->OrderFall == 0 && fSuccessor) + { + CTX_PTR cs = CreateSuccessors(p, True, s, p->MinContext); + if (cs == 0) + { + SetSuccessor(p->FoundState, 0); + RESTORE_MODEL(c, CTX(fSuccessor)); + } + else + { + SetSuccessor(p->FoundState, REF(cs)); + p->MaxContext = cs; + } + return; + } + + *p->Text++ = p->FoundState->Symbol; + successor = REF(p->Text); + if (p->Text >= p->UnitsStart) + { + RESTORE_MODEL(c, CTX(fSuccessor)); /* check it */ + return; + } + + if (!fSuccessor) + { + CTX_PTR cs = ReduceOrder(p, s, p->MinContext); + if (cs == NULL) + { + RESTORE_MODEL(c, 0); + return; + } + fSuccessor = REF(cs); + } + else if ((Byte *)Ppmd8_GetPtr(p, fSuccessor) < p->UnitsStart) + { + CTX_PTR cs = CreateSuccessors(p, False, s, p->MinContext); + if (cs == NULL) + { + RESTORE_MODEL(c, 0); + return; + } + fSuccessor = REF(cs); + } + + if (--p->OrderFall == 0) + { + successor = fSuccessor; + p->Text -= (p->MaxContext != p->MinContext); + } + #ifdef PPMD8_FREEZE_SUPPORT + else if (p->RestoreMethod > PPMD8_RESTORE_METHOD_FREEZE) + { + successor = fSuccessor; + RESET_TEXT(0); + p->OrderFall = 0; + } + #endif + + s0 = p->MinContext->SummFreq - (ns = p->MinContext->NumStats) - fFreq; + flag = 0x08 * (fSymbol >= 0x40); + + for (; c != p->MinContext; c = SUFFIX(c)) + { + unsigned ns1; + UInt32 cf, sf; + if ((ns1 = c->NumStats) != 0) + { + if ((ns1 & 1) != 0) + { + /* Expand for one UNIT */ + unsigned oldNU = (ns1 + 1) >> 1; + unsigned i = U2I(oldNU); + if (i != U2I(oldNU + 1)) + { + void *ptr = AllocUnits(p, i + 1); + void *oldPtr; + if (!ptr) + { + RESTORE_MODEL(c, CTX(fSuccessor)); + return; + } + oldPtr = STATS(c); + MyMem12Cpy(ptr, oldPtr, oldNU); + InsertNode(p, oldPtr, i); + c->Stats = STATS_REF(ptr); + } + } + c->SummFreq = (UInt16)(c->SummFreq + (3 * ns1 + 1 < ns)); + } + else + { + CPpmd_State *s = (CPpmd_State*)AllocUnits(p, 0); + if (!s) + { + RESTORE_MODEL(c, CTX(fSuccessor)); + return; + } + *s = *ONE_STATE(c); + c->Stats = REF(s); + if (s->Freq < MAX_FREQ / 4 - 1) + s->Freq <<= 1; + else + s->Freq = MAX_FREQ - 4; + c->SummFreq = (UInt16)(s->Freq + p->InitEsc + (ns > 2)); + } + cf = 2 * fFreq * (c->SummFreq + 6); + sf = (UInt32)s0 + c->SummFreq; + if (cf < 6 * sf) + { + cf = 1 + (cf > sf) + (cf >= 4 * sf); + c->SummFreq += 4; + } + else + { + cf = 4 + (cf > 9 * sf) + (cf > 12 * sf) + (cf > 15 * sf); + c->SummFreq = (UInt16)(c->SummFreq + cf); + } + { + CPpmd_State *s = STATS(c) + ns1 + 1; + SetSuccessor(s, successor); + s->Symbol = fSymbol; + s->Freq = (Byte)cf; + c->Flags |= flag; + c->NumStats = (Byte)(ns1 + 1); + } + } + p->MaxContext = p->MinContext = CTX(fSuccessor); +} + +static void Rescale(CPpmd8 *p) +{ + unsigned i, adder, sumFreq, escFreq; + CPpmd_State *stats = STATS(p->MinContext); + CPpmd_State *s = p->FoundState; + { + CPpmd_State tmp = *s; + for (; s != stats; s--) + s[0] = s[-1]; + *s = tmp; + } + escFreq = p->MinContext->SummFreq - s->Freq; + s->Freq += 4; + adder = (p->OrderFall != 0 + #ifdef PPMD8_FREEZE_SUPPORT + || p->RestoreMethod > PPMD8_RESTORE_METHOD_FREEZE + #endif + ); + s->Freq = (Byte)((s->Freq + adder) >> 1); + sumFreq = s->Freq; + + i = p->MinContext->NumStats; + do + { + escFreq -= (++s)->Freq; + s->Freq = (Byte)((s->Freq + adder) >> 1); + sumFreq += s->Freq; + if (s[0].Freq > s[-1].Freq) + { + CPpmd_State *s1 = s; + CPpmd_State tmp = *s1; + do + s1[0] = s1[-1]; + while (--s1 != stats && tmp.Freq > s1[-1].Freq); + *s1 = tmp; + } + } + while (--i); + + if (s->Freq == 0) + { + unsigned numStats = p->MinContext->NumStats; + unsigned n0, n1; + do { i++; } while ((--s)->Freq == 0); + escFreq += i; + p->MinContext->NumStats = (Byte)(p->MinContext->NumStats - i); + if (p->MinContext->NumStats == 0) + { + CPpmd_State tmp = *stats; + tmp.Freq = (Byte)((2 * tmp.Freq + escFreq - 1) / escFreq); + if (tmp.Freq > MAX_FREQ / 3) + tmp.Freq = MAX_FREQ / 3; + InsertNode(p, stats, U2I((numStats + 2) >> 1)); + p->MinContext->Flags = (p->MinContext->Flags & 0x10) + 0x08 * (tmp.Symbol >= 0x40); + *(p->FoundState = ONE_STATE(p->MinContext)) = tmp; + return; + } + n0 = (numStats + 2) >> 1; + n1 = (p->MinContext->NumStats + 2) >> 1; + if (n0 != n1) + p->MinContext->Stats = STATS_REF(ShrinkUnits(p, stats, n0, n1)); + p->MinContext->Flags &= ~0x08; + p->MinContext->Flags |= 0x08 * ((s = STATS(p->MinContext))->Symbol >= 0x40); + i = p->MinContext->NumStats; + do { p->MinContext->Flags |= 0x08*((++s)->Symbol >= 0x40); } while (--i); + } + p->MinContext->SummFreq = (UInt16)(sumFreq + escFreq - (escFreq >> 1)); + p->MinContext->Flags |= 0x4; + p->FoundState = STATS(p->MinContext); +} + +CPpmd_See *Ppmd8_MakeEscFreq(CPpmd8 *p, unsigned numMasked1, UInt32 *escFreq) +{ + CPpmd_See *see; + if (p->MinContext->NumStats != 0xFF) + { + see = p->See[p->NS2Indx[p->MinContext->NumStats + 2] - 3] + + (p->MinContext->SummFreq > 11 * ((unsigned)p->MinContext->NumStats + 1)) + + 2 * (2 * (unsigned)p->MinContext->NumStats < + ((unsigned)SUFFIX(p->MinContext)->NumStats + numMasked1)) + + p->MinContext->Flags; + { + unsigned r = (see->Summ >> see->Shift); + see->Summ = (UInt16)(see->Summ - r); + *escFreq = r + (r == 0); + } + } + else + { + see = &p->DummySee; + *escFreq = 1; + } + return see; +} + +static void NextContext(CPpmd8 *p) +{ + CTX_PTR c = CTX(SUCCESSOR(p->FoundState)); + if (p->OrderFall == 0 && (Byte *)c >= p->UnitsStart) + p->MinContext = p->MaxContext = c; + else + { + UpdateModel(p); + p->MinContext = p->MaxContext; + } +} + +void Ppmd8_Update1(CPpmd8 *p) +{ + CPpmd_State *s = p->FoundState; + s->Freq += 4; + p->MinContext->SummFreq += 4; + if (s[0].Freq > s[-1].Freq) + { + SwapStates(&s[0], &s[-1]); + p->FoundState = --s; + if (s->Freq > MAX_FREQ) + Rescale(p); + } + NextContext(p); +} + +void Ppmd8_Update1_0(CPpmd8 *p) +{ + p->PrevSuccess = (2 * p->FoundState->Freq >= p->MinContext->SummFreq); + p->RunLength += p->PrevSuccess; + p->MinContext->SummFreq += 4; + if ((p->FoundState->Freq += 4) > MAX_FREQ) + Rescale(p); + NextContext(p); +} + +void Ppmd8_UpdateBin(CPpmd8 *p) +{ + p->FoundState->Freq = (Byte)(p->FoundState->Freq + (p->FoundState->Freq < 196)); + p->PrevSuccess = 1; + p->RunLength++; + NextContext(p); +} + +void Ppmd8_Update2(CPpmd8 *p) +{ + p->MinContext->SummFreq += 4; + if ((p->FoundState->Freq += 4) > MAX_FREQ) + Rescale(p); + p->RunLength = p->InitRL; + UpdateModel(p); + p->MinContext = p->MaxContext; +} + +/* H->I changes: + NS2Indx + GlewCount, and Glue method + BinSum + See / EscFreq + CreateSuccessors updates more suffix contexts + UpdateModel consts. + PrevSuccess Update +*/ diff --git a/C/Ppmd8.h b/C/Ppmd8.h new file mode 100644 index 0000000..870dc9d --- /dev/null +++ b/C/Ppmd8.h @@ -0,0 +1,133 @@ +/* Ppmd8.h -- PPMdI codec +2010-03-24 : Igor Pavlov : Public domain +This code is based on: + PPMd var.I (2002): Dmitry Shkarin : Public domain + Carryless rangecoder (1999): Dmitry Subbotin : Public domain */ + +#ifndef __PPMD8_H +#define __PPMD8_H + +#include "Ppmd.h" + +EXTERN_C_BEGIN + +#define PPMD8_MIN_ORDER 2 +#define PPMD8_MAX_ORDER 16 + +struct CPpmd8_Context_; + +typedef + #ifdef PPMD_32BIT + struct CPpmd8_Context_ * + #else + UInt32 + #endif + CPpmd8_Context_Ref; + +typedef struct CPpmd8_Context_ +{ + Byte NumStats; + Byte Flags; + UInt16 SummFreq; + CPpmd_State_Ref Stats; + CPpmd8_Context_Ref Suffix; +} CPpmd8_Context; + +#define Ppmd8Context_OneState(p) ((CPpmd_State *)&(p)->SummFreq) + +/* The BUG in Shkarin's code for FREEZE mode was fixed, but that fixed + code is not compatible with original code for some files compressed + in FREEZE mode. So we disable FREEZE mode support. */ + +enum +{ + PPMD8_RESTORE_METHOD_RESTART, + PPMD8_RESTORE_METHOD_CUT_OFF + #ifdef PPMD8_FREEZE_SUPPORT + , PPMD8_RESTORE_METHOD_FREEZE + #endif +}; + +typedef struct +{ + CPpmd8_Context *MinContext, *MaxContext; + CPpmd_State *FoundState; + unsigned OrderFall, InitEsc, PrevSuccess, MaxOrder; + Int32 RunLength, InitRL; /* must be 32-bit at least */ + + UInt32 Size; + UInt32 GlueCount; + Byte *Base, *LoUnit, *HiUnit, *Text, *UnitsStart; + UInt32 AlignOffset; + unsigned RestoreMethod; + + /* Range Coder */ + UInt32 Range; + UInt32 Code; + UInt32 Low; + union + { + IByteIn *In; + IByteOut *Out; + } Stream; + + Byte Indx2Units[PPMD_NUM_INDEXES]; + Byte Units2Indx[128]; + CPpmd_Void_Ref FreeList[PPMD_NUM_INDEXES]; + UInt32 Stamps[PPMD_NUM_INDEXES]; + + Byte NS2BSIndx[256], NS2Indx[260]; + CPpmd_See DummySee, See[24][32]; + UInt16 BinSumm[25][64]; +} CPpmd8; + +void Ppmd8_Construct(CPpmd8 *p); +Bool Ppmd8_Alloc(CPpmd8 *p, UInt32 size, ISzAlloc *alloc); +void Ppmd8_Free(CPpmd8 *p, ISzAlloc *alloc); +void Ppmd8_Init(CPpmd8 *p, unsigned maxOrder, unsigned restoreMethod); +#define Ppmd8_WasAllocated(p) ((p)->Base != NULL) + + +/* ---------- Internal Functions ---------- */ + +extern const Byte PPMD8_kExpEscape[16]; + +#ifdef PPMD_32BIT + #define Ppmd8_GetPtr(p, ptr) (ptr) + #define Ppmd8_GetContext(p, ptr) (ptr) + #define Ppmd8_GetStats(p, ctx) ((ctx)->Stats) +#else + #define Ppmd8_GetPtr(p, offs) ((void *)((p)->Base + (offs))) + #define Ppmd8_GetContext(p, offs) ((CPpmd8_Context *)Ppmd8_GetPtr((p), (offs))) + #define Ppmd8_GetStats(p, ctx) ((CPpmd_State *)Ppmd8_GetPtr((p), ((ctx)->Stats))) +#endif + +void Ppmd8_Update1(CPpmd8 *p); +void Ppmd8_Update1_0(CPpmd8 *p); +void Ppmd8_Update2(CPpmd8 *p); +void Ppmd8_UpdateBin(CPpmd8 *p); + +#define Ppmd8_GetBinSumm(p) \ + &p->BinSumm[p->NS2Indx[Ppmd8Context_OneState(p->MinContext)->Freq - 1]][ \ + p->NS2BSIndx[Ppmd8_GetContext(p, p->MinContext->Suffix)->NumStats] + \ + p->PrevSuccess + p->MinContext->Flags + ((p->RunLength >> 26) & 0x20)] + +CPpmd_See *Ppmd8_MakeEscFreq(CPpmd8 *p, unsigned numMasked, UInt32 *scale); + + +/* ---------- Decode ---------- */ + +Bool Ppmd8_RangeDec_Init(CPpmd8 *p); +#define Ppmd8_RangeDec_IsFinishedOK(p) ((p)->Code == 0) +int Ppmd8_DecodeSymbol(CPpmd8 *p); /* returns: -1 as EndMarker, -2 as DataError */ + + +/* ---------- Encode ---------- */ + +#define Ppmd8_RangeEnc_Init(p) { (p)->Low = 0; (p)->Range = 0xFFFFFFFF; } +void Ppmd8_RangeEnc_FlushData(CPpmd8 *p); +void Ppmd8_EncodeSymbol(CPpmd8 *p, int symbol); /* symbol = -1 means EndMarker */ + +EXTERN_C_END + +#endif diff --git a/C/Ppmd8Dec.c b/C/Ppmd8Dec.c new file mode 100644 index 0000000..c54e02a --- /dev/null +++ b/C/Ppmd8Dec.c @@ -0,0 +1,155 @@ +/* Ppmd8Dec.c -- PPMdI Decoder +2010-04-16 : Igor Pavlov : Public domain +This code is based on: + PPMd var.I (2002): Dmitry Shkarin : Public domain + Carryless rangecoder (1999): Dmitry Subbotin : Public domain */ + +#include "Ppmd8.h" + +#define kTop (1 << 24) +#define kBot (1 << 15) + +Bool Ppmd8_RangeDec_Init(CPpmd8 *p) +{ + unsigned i; + p->Low = 0; + p->Range = 0xFFFFFFFF; + p->Code = 0; + for (i = 0; i < 4; i++) + p->Code = (p->Code << 8) | p->Stream.In->Read(p->Stream.In); + return (p->Code < 0xFFFFFFFF); +} + +static UInt32 RangeDec_GetThreshold(CPpmd8 *p, UInt32 total) +{ + return p->Code / (p->Range /= total); +} + +static void RangeDec_Decode(CPpmd8 *p, UInt32 start, UInt32 size) +{ + start *= p->Range; + p->Low += start; + p->Code -= start; + p->Range *= size; + + while ((p->Low ^ (p->Low + p->Range)) < kTop || + (p->Range < kBot && ((p->Range = (0 - p->Low) & (kBot - 1)), 1))) + { + p->Code = (p->Code << 8) | p->Stream.In->Read(p->Stream.In); + p->Range <<= 8; + p->Low <<= 8; + } +} + +#define MASK(sym) ((signed char *)charMask)[sym] + +int Ppmd8_DecodeSymbol(CPpmd8 *p) +{ + size_t charMask[256 / sizeof(size_t)]; + if (p->MinContext->NumStats != 0) + { + CPpmd_State *s = Ppmd8_GetStats(p, p->MinContext); + unsigned i; + UInt32 count, hiCnt; + if ((count = RangeDec_GetThreshold(p, p->MinContext->SummFreq)) < (hiCnt = s->Freq)) + { + Byte symbol; + RangeDec_Decode(p, 0, s->Freq); + p->FoundState = s; + symbol = s->Symbol; + Ppmd8_Update1_0(p); + return symbol; + } + p->PrevSuccess = 0; + i = p->MinContext->NumStats; + do + { + if ((hiCnt += (++s)->Freq) > count) + { + Byte symbol; + RangeDec_Decode(p, hiCnt - s->Freq, s->Freq); + p->FoundState = s; + symbol = s->Symbol; + Ppmd8_Update1(p); + return symbol; + } + } + while (--i); + if (count >= p->MinContext->SummFreq) + return -2; + RangeDec_Decode(p, hiCnt, p->MinContext->SummFreq - hiCnt); + PPMD_SetAllBitsIn256Bytes(charMask); + MASK(s->Symbol) = 0; + i = p->MinContext->NumStats; + do { MASK((--s)->Symbol) = 0; } while (--i); + } + else + { + UInt16 *prob = Ppmd8_GetBinSumm(p); + if (((p->Code / (p->Range >>= 14)) < *prob)) + { + Byte symbol; + RangeDec_Decode(p, 0, *prob); + *prob = (UInt16)PPMD_UPDATE_PROB_0(*prob); + symbol = (p->FoundState = Ppmd8Context_OneState(p->MinContext))->Symbol; + Ppmd8_UpdateBin(p); + return symbol; + } + RangeDec_Decode(p, *prob, (1 << 14) - *prob); + *prob = (UInt16)PPMD_UPDATE_PROB_1(*prob); + p->InitEsc = PPMD8_kExpEscape[*prob >> 10]; + PPMD_SetAllBitsIn256Bytes(charMask); + MASK(Ppmd8Context_OneState(p->MinContext)->Symbol) = 0; + p->PrevSuccess = 0; + } + for (;;) + { + CPpmd_State *ps[256], *s; + UInt32 freqSum, count, hiCnt; + CPpmd_See *see; + unsigned i, num, numMasked = p->MinContext->NumStats; + do + { + p->OrderFall++; + if (!p->MinContext->Suffix) + return -1; + p->MinContext = Ppmd8_GetContext(p, p->MinContext->Suffix); + } + while (p->MinContext->NumStats == numMasked); + hiCnt = 0; + s = Ppmd8_GetStats(p, p->MinContext); + i = 0; + num = p->MinContext->NumStats - numMasked; + do + { + int k = (int)(MASK(s->Symbol)); + hiCnt += (s->Freq & k); + ps[i] = s++; + i -= k; + } + while (i != num); + + see = Ppmd8_MakeEscFreq(p, numMasked, &freqSum); + freqSum += hiCnt; + count = RangeDec_GetThreshold(p, freqSum); + + if (count < hiCnt) + { + Byte symbol; + CPpmd_State **pps = ps; + for (hiCnt = 0; (hiCnt += (*pps)->Freq) <= count; pps++); + s = *pps; + RangeDec_Decode(p, hiCnt - s->Freq, s->Freq); + Ppmd_See_Update(see); + p->FoundState = s; + symbol = s->Symbol; + Ppmd8_Update2(p); + return symbol; + } + if (count >= freqSum) + return -2; + RangeDec_Decode(p, hiCnt, freqSum - hiCnt); + see->Summ = (UInt16)(see->Summ + freqSum); + do { MASK(ps[--i]->Symbol) = 0; } while (i != 0); + } +} diff --git a/C/Ppmd8Enc.c b/C/Ppmd8Enc.c new file mode 100644 index 0000000..8da727e --- /dev/null +++ b/C/Ppmd8Enc.c @@ -0,0 +1,161 @@ +/* Ppmd8Enc.c -- PPMdI Encoder +2010-04-16 : Igor Pavlov : Public domain +This code is based on: + PPMd var.I (2002): Dmitry Shkarin : Public domain + Carryless rangecoder (1999): Dmitry Subbotin : Public domain */ + +#include "Ppmd8.h" + +#define kTop (1 << 24) +#define kBot (1 << 15) + +void Ppmd8_RangeEnc_FlushData(CPpmd8 *p) +{ + unsigned i; + for (i = 0; i < 4; i++, p->Low <<= 8 ) + p->Stream.Out->Write(p->Stream.Out, (Byte)(p->Low >> 24)); +} + +static void RangeEnc_Normalize(CPpmd8 *p) +{ + while ((p->Low ^ (p->Low + p->Range)) < kTop || + (p->Range < kBot && ((p->Range = (0 - p->Low) & (kBot - 1)), 1))) + { + p->Stream.Out->Write(p->Stream.Out, (Byte)(p->Low >> 24)); + p->Range <<= 8; + p->Low <<= 8; + } +} + +static void RangeEnc_Encode(CPpmd8 *p, UInt32 start, UInt32 size, UInt32 total) +{ + p->Low += start * (p->Range /= total); + p->Range *= size; + RangeEnc_Normalize(p); +} + +static void RangeEnc_EncodeBit_0(CPpmd8 *p, UInt32 size0) +{ + p->Range >>= 14; + p->Range *= size0; + RangeEnc_Normalize(p); +} + +static void RangeEnc_EncodeBit_1(CPpmd8 *p, UInt32 size0) +{ + p->Low += size0 * (p->Range >>= 14); + p->Range *= ((1 << 14) - size0); + RangeEnc_Normalize(p); +} + + +#define MASK(sym) ((signed char *)charMask)[sym] + +void Ppmd8_EncodeSymbol(CPpmd8 *p, int symbol) +{ + size_t charMask[256 / sizeof(size_t)]; + if (p->MinContext->NumStats != 0) + { + CPpmd_State *s = Ppmd8_GetStats(p, p->MinContext); + UInt32 sum; + unsigned i; + if (s->Symbol == symbol) + { + RangeEnc_Encode(p, 0, s->Freq, p->MinContext->SummFreq); + p->FoundState = s; + Ppmd8_Update1_0(p); + return; + } + p->PrevSuccess = 0; + sum = s->Freq; + i = p->MinContext->NumStats; + do + { + if ((++s)->Symbol == symbol) + { + RangeEnc_Encode(p, sum, s->Freq, p->MinContext->SummFreq); + p->FoundState = s; + Ppmd8_Update1(p); + return; + } + sum += s->Freq; + } + while (--i); + + PPMD_SetAllBitsIn256Bytes(charMask); + MASK(s->Symbol) = 0; + i = p->MinContext->NumStats; + do { MASK((--s)->Symbol) = 0; } while (--i); + RangeEnc_Encode(p, sum, p->MinContext->SummFreq - sum, p->MinContext->SummFreq); + } + else + { + UInt16 *prob = Ppmd8_GetBinSumm(p); + CPpmd_State *s = Ppmd8Context_OneState(p->MinContext); + if (s->Symbol == symbol) + { + RangeEnc_EncodeBit_0(p, *prob); + *prob = (UInt16)PPMD_UPDATE_PROB_0(*prob); + p->FoundState = s; + Ppmd8_UpdateBin(p); + return; + } + else + { + RangeEnc_EncodeBit_1(p, *prob); + *prob = (UInt16)PPMD_UPDATE_PROB_1(*prob); + p->InitEsc = PPMD8_kExpEscape[*prob >> 10]; + PPMD_SetAllBitsIn256Bytes(charMask); + MASK(s->Symbol) = 0; + p->PrevSuccess = 0; + } + } + for (;;) + { + UInt32 escFreq; + CPpmd_See *see; + CPpmd_State *s; + UInt32 sum; + unsigned i, numMasked = p->MinContext->NumStats; + do + { + p->OrderFall++; + if (!p->MinContext->Suffix) + return; /* EndMarker (symbol = -1) */ + p->MinContext = Ppmd8_GetContext(p, p->MinContext->Suffix); + } + while (p->MinContext->NumStats == numMasked); + + see = Ppmd8_MakeEscFreq(p, numMasked, &escFreq); + s = Ppmd8_GetStats(p, p->MinContext); + sum = 0; + i = p->MinContext->NumStats + 1; + do + { + int cur = s->Symbol; + if (cur == symbol) + { + UInt32 low = sum; + CPpmd_State *s1 = s; + do + { + sum += (s->Freq & (int)(MASK(s->Symbol))); + s++; + } + while (--i); + RangeEnc_Encode(p, low, s1->Freq, sum + escFreq); + Ppmd_See_Update(see); + p->FoundState = s1; + Ppmd8_Update2(p); + return; + } + sum += (s->Freq & (int)(MASK(cur))); + MASK(cur) = 0; + s++; + } + while (--i); + + RangeEnc_Encode(p, sum, escFreq, sum + escFreq); + see->Summ = (UInt16)(see->Summ + sum + escFreq); + } +} diff --git a/C/RotateDefs.h b/C/RotateDefs.h new file mode 100644 index 0000000..c3a1385 --- /dev/null +++ b/C/RotateDefs.h @@ -0,0 +1,20 @@ +/* RotateDefs.h -- Rotate functions +2009-02-07 : Igor Pavlov : Public domain */ + +#ifndef __ROTATE_DEFS_H +#define __ROTATE_DEFS_H + +#ifdef _MSC_VER + +#include +#define rotlFixed(x, n) _rotl((x), (n)) +#define rotrFixed(x, n) _rotr((x), (n)) + +#else + +#define rotlFixed(x, n) (((x) << (n)) | ((x) >> (32 - (n)))) +#define rotrFixed(x, n) (((x) >> (n)) | ((x) << (32 - (n)))) + +#endif + +#endif diff --git a/C/Sha256.c b/C/Sha256.c new file mode 100644 index 0000000..eb4fc61 --- /dev/null +++ b/C/Sha256.c @@ -0,0 +1,204 @@ +/* Crypto/Sha256.c -- SHA-256 Hash +2010-06-11 : Igor Pavlov : Public domain +This code is based on public domain code from Wei Dai's Crypto++ library. */ + +#include "RotateDefs.h" +#include "Sha256.h" + +/* define it for speed optimization */ +/* #define _SHA256_UNROLL */ +/* #define _SHA256_UNROLL2 */ + +void Sha256_Init(CSha256 *p) +{ + p->state[0] = 0x6a09e667; + p->state[1] = 0xbb67ae85; + p->state[2] = 0x3c6ef372; + p->state[3] = 0xa54ff53a; + p->state[4] = 0x510e527f; + p->state[5] = 0x9b05688c; + p->state[6] = 0x1f83d9ab; + p->state[7] = 0x5be0cd19; + p->count = 0; +} + +#define S0(x) (rotrFixed(x, 2) ^ rotrFixed(x,13) ^ rotrFixed(x, 22)) +#define S1(x) (rotrFixed(x, 6) ^ rotrFixed(x,11) ^ rotrFixed(x, 25)) +#define s0(x) (rotrFixed(x, 7) ^ rotrFixed(x,18) ^ (x >> 3)) +#define s1(x) (rotrFixed(x,17) ^ rotrFixed(x,19) ^ (x >> 10)) + +#define blk0(i) (W[i] = data[i]) +#define blk2(i) (W[i&15] += s1(W[(i-2)&15]) + W[(i-7)&15] + s0(W[(i-15)&15])) + +#define Ch(x,y,z) (z^(x&(y^z))) +#define Maj(x,y,z) ((x&y)|(z&(x|y))) + +#define a(i) T[(0-(i))&7] +#define b(i) T[(1-(i))&7] +#define c(i) T[(2-(i))&7] +#define d(i) T[(3-(i))&7] +#define e(i) T[(4-(i))&7] +#define f(i) T[(5-(i))&7] +#define g(i) T[(6-(i))&7] +#define h(i) T[(7-(i))&7] + + +#ifdef _SHA256_UNROLL2 + +#define R(a,b,c,d,e,f,g,h, i) h += S1(e) + Ch(e,f,g) + K[i+j] + (j?blk2(i):blk0(i));\ + d += h; h += S0(a) + Maj(a, b, c) + +#define RX_8(i) \ + R(a,b,c,d,e,f,g,h, i); \ + R(h,a,b,c,d,e,f,g, i+1); \ + R(g,h,a,b,c,d,e,f, i+2); \ + R(f,g,h,a,b,c,d,e, i+3); \ + R(e,f,g,h,a,b,c,d, i+4); \ + R(d,e,f,g,h,a,b,c, i+5); \ + R(c,d,e,f,g,h,a,b, i+6); \ + R(b,c,d,e,f,g,h,a, i+7) + +#else + +#define R(i) h(i) += S1(e(i)) + Ch(e(i),f(i),g(i)) + K[i+j] + (j?blk2(i):blk0(i));\ + d(i) += h(i); h(i) += S0(a(i)) + Maj(a(i), b(i), c(i)) + +#ifdef _SHA256_UNROLL + +#define RX_8(i) R(i+0); R(i+1); R(i+2); R(i+3); R(i+4); R(i+5); R(i+6); R(i+7); + +#endif + +#endif + +static const UInt32 K[64] = { + 0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5, + 0x3956c25b, 0x59f111f1, 0x923f82a4, 0xab1c5ed5, + 0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3, + 0x72be5d74, 0x80deb1fe, 0x9bdc06a7, 0xc19bf174, + 0xe49b69c1, 0xefbe4786, 0x0fc19dc6, 0x240ca1cc, + 0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da, + 0x983e5152, 0xa831c66d, 0xb00327c8, 0xbf597fc7, + 0xc6e00bf3, 0xd5a79147, 0x06ca6351, 0x14292967, + 0x27b70a85, 0x2e1b2138, 0x4d2c6dfc, 0x53380d13, + 0x650a7354, 0x766a0abb, 0x81c2c92e, 0x92722c85, + 0xa2bfe8a1, 0xa81a664b, 0xc24b8b70, 0xc76c51a3, + 0xd192e819, 0xd6990624, 0xf40e3585, 0x106aa070, + 0x19a4c116, 0x1e376c08, 0x2748774c, 0x34b0bcb5, + 0x391c0cb3, 0x4ed8aa4a, 0x5b9cca4f, 0x682e6ff3, + 0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208, + 0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2 +}; + +static void Sha256_Transform(UInt32 *state, const UInt32 *data) +{ + UInt32 W[16]; + unsigned j; + #ifdef _SHA256_UNROLL2 + UInt32 a,b,c,d,e,f,g,h; + a = state[0]; + b = state[1]; + c = state[2]; + d = state[3]; + e = state[4]; + f = state[5]; + g = state[6]; + h = state[7]; + #else + UInt32 T[8]; + for (j = 0; j < 8; j++) + T[j] = state[j]; + #endif + + for (j = 0; j < 64; j += 16) + { + #if defined(_SHA256_UNROLL) || defined(_SHA256_UNROLL2) + RX_8(0); RX_8(8); + #else + unsigned i; + for (i = 0; i < 16; i++) { R(i); } + #endif + } + + #ifdef _SHA256_UNROLL2 + state[0] += a; + state[1] += b; + state[2] += c; + state[3] += d; + state[4] += e; + state[5] += f; + state[6] += g; + state[7] += h; + #else + for (j = 0; j < 8; j++) + state[j] += T[j]; + #endif + + /* Wipe variables */ + /* memset(W, 0, sizeof(W)); */ + /* memset(T, 0, sizeof(T)); */ +} + +#undef S0 +#undef S1 +#undef s0 +#undef s1 + +static void Sha256_WriteByteBlock(CSha256 *p) +{ + UInt32 data32[16]; + unsigned i; + for (i = 0; i < 16; i++) + data32[i] = + ((UInt32)(p->buffer[i * 4 ]) << 24) + + ((UInt32)(p->buffer[i * 4 + 1]) << 16) + + ((UInt32)(p->buffer[i * 4 + 2]) << 8) + + ((UInt32)(p->buffer[i * 4 + 3])); + Sha256_Transform(p->state, data32); +} + +void Sha256_Update(CSha256 *p, const Byte *data, size_t size) +{ + UInt32 curBufferPos = (UInt32)p->count & 0x3F; + while (size > 0) + { + p->buffer[curBufferPos++] = *data++; + p->count++; + size--; + if (curBufferPos == 64) + { + curBufferPos = 0; + Sha256_WriteByteBlock(p); + } + } +} + +void Sha256_Final(CSha256 *p, Byte *digest) +{ + UInt64 lenInBits = (p->count << 3); + UInt32 curBufferPos = (UInt32)p->count & 0x3F; + unsigned i; + p->buffer[curBufferPos++] = 0x80; + while (curBufferPos != (64 - 8)) + { + curBufferPos &= 0x3F; + if (curBufferPos == 0) + Sha256_WriteByteBlock(p); + p->buffer[curBufferPos++] = 0; + } + for (i = 0; i < 8; i++) + { + p->buffer[curBufferPos++] = (Byte)(lenInBits >> 56); + lenInBits <<= 8; + } + Sha256_WriteByteBlock(p); + + for (i = 0; i < 8; i++) + { + *digest++ = (Byte)(p->state[i] >> 24); + *digest++ = (Byte)(p->state[i] >> 16); + *digest++ = (Byte)(p->state[i] >> 8); + *digest++ = (Byte)(p->state[i]); + } + Sha256_Init(p); +} diff --git a/C/Sha256.h b/C/Sha256.h new file mode 100644 index 0000000..530f513 --- /dev/null +++ b/C/Sha256.h @@ -0,0 +1,26 @@ +/* Sha256.h -- SHA-256 Hash +2010-06-11 : Igor Pavlov : Public domain */ + +#ifndef __CRYPTO_SHA256_H +#define __CRYPTO_SHA256_H + +#include "Types.h" + +EXTERN_C_BEGIN + +#define SHA256_DIGEST_SIZE 32 + +typedef struct +{ + UInt32 state[8]; + UInt64 count; + Byte buffer[64]; +} CSha256; + +void Sha256_Init(CSha256 *p); +void Sha256_Update(CSha256 *p, const Byte *data, size_t size); +void Sha256_Final(CSha256 *p, Byte *digest); + +EXTERN_C_END + +#endif diff --git a/C/Sort.c b/C/Sort.c new file mode 100644 index 0000000..388d228 --- /dev/null +++ b/C/Sort.c @@ -0,0 +1,93 @@ +/* Sort.c -- Sort functions +2010-09-17 : Igor Pavlov : Public domain */ + +#include "Sort.h" + +#define HeapSortDown(p, k, size, temp) \ + { for (;;) { \ + UInt32 s = (k << 1); \ + if (s > size) break; \ + if (s < size && p[s + 1] > p[s]) s++; \ + if (temp >= p[s]) break; \ + p[k] = p[s]; k = s; \ + } p[k] = temp; } + +void HeapSort(UInt32 *p, UInt32 size) +{ + if (size <= 1) + return; + p--; + { + UInt32 i = size / 2; + do + { + UInt32 temp = p[i]; + UInt32 k = i; + HeapSortDown(p, k, size, temp) + } + while (--i != 0); + } + /* + do + { + UInt32 k = 1; + UInt32 temp = p[size]; + p[size--] = p[1]; + HeapSortDown(p, k, size, temp) + } + while (size > 1); + */ + while (size > 3) + { + UInt32 temp = p[size]; + UInt32 k = (p[3] > p[2]) ? 3 : 2; + p[size--] = p[1]; + p[1] = p[k]; + HeapSortDown(p, k, size, temp) + } + { + UInt32 temp = p[size]; + p[size] = p[1]; + if (size > 2 && p[2] < temp) + { + p[1] = p[2]; + p[2] = temp; + } + else + p[1] = temp; + } +} + +/* +#define HeapSortRefDown(p, vals, n, size, temp) \ + { UInt32 k = n; UInt32 val = vals[temp]; for (;;) { \ + UInt32 s = (k << 1); \ + if (s > size) break; \ + if (s < size && vals[p[s + 1]] > vals[p[s]]) s++; \ + if (val >= vals[p[s]]) break; \ + p[k] = p[s]; k = s; \ + } p[k] = temp; } + +void HeapSortRef(UInt32 *p, UInt32 *vals, UInt32 size) +{ + if (size <= 1) + return; + p--; + { + UInt32 i = size / 2; + do + { + UInt32 temp = p[i]; + HeapSortRefDown(p, vals, i, size, temp); + } + while (--i != 0); + } + do + { + UInt32 temp = p[size]; + p[size--] = p[1]; + HeapSortRefDown(p, vals, 1, size, temp); + } + while (size > 1); +} +*/ diff --git a/C/Sort.h b/C/Sort.h new file mode 100644 index 0000000..65dfc6f --- /dev/null +++ b/C/Sort.h @@ -0,0 +1,20 @@ +/* Sort.h -- Sort functions +2009-02-07 : Igor Pavlov : Public domain */ + +#ifndef __7Z_SORT_H +#define __7Z_SORT_H + +#include "Types.h" + +#ifdef __cplusplus +extern "C" { +#endif + +void HeapSort(UInt32 *p, UInt32 size); +/* void HeapSortRef(UInt32 *p, UInt32 *vals, UInt32 size); */ + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/C/Threads.c b/C/Threads.c new file mode 100644 index 0000000..1b8203f --- /dev/null +++ b/C/Threads.c @@ -0,0 +1,582 @@ +/* Threads.c */ + +#include "Threads.h" + +#ifdef ENV_BEOS +#include +#else +#include +#include +#endif + +#include + +#if defined(__linux__) +#define PTHREAD_MUTEX_ERRORCHECK PTHREAD_MUTEX_ERRORCHECK_NP +#endif + +#ifdef ENV_BEOS + +/* TODO : optimize the code and verify the returned values */ + +WRes Thread_Create(CThread *thread, THREAD_FUNC_RET_TYPE (THREAD_FUNC_CALL_TYPE *startAddress)(void *), LPVOID parameter) +{ + thread->_tid = spawn_thread((int32 (*)(void *))startAddress, "CThread", B_LOW_PRIORITY, parameter); + if (thread->_tid >= B_OK) { + resume_thread(thread->_tid); + } else { + thread->_tid = B_BAD_THREAD_ID; + } + thread->_created = 1; + return 0; // SZ_OK; +} + +WRes Thread_Wait(CThread *thread) +{ + int ret; + + if (thread->_created == 0) + return EINVAL; + + if (thread->_tid >= B_OK) + { + status_t exit_value; + wait_for_thread(thread->_tid, &exit_value); + thread->_tid = B_BAD_THREAD_ID; + } else { + return EINVAL; + } + + thread->_created = 0; + + return 0; +} + +WRes Thread_Close(CThread *thread) +{ + if (!thread->_created) return SZ_OK; + + thread->_tid = B_BAD_THREAD_ID; + thread->_created = 0; + return SZ_OK; +} + + +WRes Event_Create(CEvent *p, BOOL manualReset, int initialSignaled) +{ + p->_index_waiting = 0; + p->_manual_reset = manualReset; + p->_state = (initialSignaled ? TRUE : FALSE); + p->_created = 1; + p->_sem = create_sem(1,"event"); + return 0; +} + +WRes Event_Set(CEvent *p) { + int index; + acquire_sem(p->_sem); + p->_state = TRUE; + for(index = 0 ; index < p->_index_waiting ; index++) + { + send_data(p->_waiting[index], '7zCN', NULL, 0); + } + p->_index_waiting = 0; + release_sem(p->_sem); + return 0; +} + +WRes Event_Reset(CEvent *p) { + acquire_sem(p->_sem); + p->_state = FALSE; + release_sem(p->_sem); + return 0; +} + +WRes Event_Wait(CEvent *p) { + acquire_sem(p->_sem); + while (p->_state == FALSE) + { + thread_id sender; + p->_waiting[p->_index_waiting++] = find_thread(NULL); + release_sem(p->_sem); + /* int msg = */ receive_data(&sender, NULL, 0); + acquire_sem(p->_sem); + } + if (p->_manual_reset == FALSE) + { + p->_state = FALSE; + } + release_sem(p->_sem); + return 0; +} + +WRes Event_Close(CEvent *p) { + if (p->_created) + { + p->_created = 0; + delete_sem(p->_sem); + } + return 0; +} + +WRes Semaphore_Create(CSemaphore *p, UInt32 initiallyCount, UInt32 maxCount) +{ + p->_index_waiting = 0; + p->_count = initiallyCount; + p->_maxCount = maxCount; + p->_created = 1; + p->_sem = create_sem(1,"sem"); + return 0; +} + +WRes Semaphore_ReleaseN(CSemaphore *p, UInt32 releaseCount) +{ + UInt32 newCount; + int index; + + if (releaseCount < 1) return EINVAL; + + acquire_sem(p->_sem); + newCount = p->_count + releaseCount; + if (newCount > p->_maxCount) + { + release_sem(p->_sem); + return EINVAL; + } + p->_count = newCount; + for(index = 0 ; index < p->_index_waiting ; index++) + { + send_data(p->_waiting[index], '7zCN', NULL, 0); + } + p->_index_waiting = 0; + release_sem(p->_sem); + return 0; +} + +WRes Semaphore_Wait(CSemaphore *p) { + acquire_sem(p->_sem); + while (p->_count < 1) + { + thread_id sender; + p->_waiting[p->_index_waiting++] = find_thread(NULL); + release_sem(p->_sem); + /* int msg = */ receive_data(&sender, NULL, 0); + acquire_sem(p->_sem); + } + p->_count--; + release_sem(p->_sem); + return 0; +} + +WRes Semaphore_Close(CSemaphore *p) { + if (p->_created) + { + p->_created = 0; + delete_sem(p->_sem); + } + return 0; +} + +WRes CriticalSection_Init(CCriticalSection * lpCriticalSection) +{ + lpCriticalSection->_sem = create_sem(1,"cc"); + return 0; +} + +#else /* !ENV_BEOS */ + +WRes Thread_Create(CThread *thread, THREAD_FUNC_RET_TYPE (THREAD_FUNC_CALL_TYPE *startAddress)(void *), LPVOID parameter) +{ + pthread_attr_t attr; + int ret; + + thread->_created = 0; + + ret = pthread_attr_init(&attr); + if (ret) return ret; + + ret = pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_JOINABLE); + if (ret) return ret; + + ret = pthread_create(&thread->_tid, &attr, (void * (*)(void *))startAddress, parameter); + + /* ret2 = */ pthread_attr_destroy(&attr); + + if (ret) return ret; + + thread->_created = 1; + + return 0; // SZ_OK; +} + +WRes Thread_Wait(CThread *thread) +{ + void *thread_return; + int ret; + + if (thread->_created == 0) + return EINVAL; + + ret = pthread_join(thread->_tid,&thread_return); + thread->_created = 0; + + return ret; +} + +WRes Thread_Close(CThread *thread) +{ + if (!thread->_created) return SZ_OK; + + pthread_detach(thread->_tid); + thread->_tid = 0; + thread->_created = 0; + return SZ_OK; +} + +#ifdef DEBUG_SYNCHRO + +#include + +static void dump_error(int ligne,int ret,const char *text,void *param) +{ + printf("\n##T%d#ERROR2 (l=%d) %s : param=%p ret = %d (%s)##\n",(int)pthread_self(),ligne,text,param,ret,strerror(ret)); + // abort(); +} + +WRes Event_Create(CEvent *p, BOOL manualReset, int initialSignaled) +{ + int ret; + pthread_mutexattr_t mutexattr; + memset(&mutexattr,0,sizeof(mutexattr)); + ret = pthread_mutexattr_init(&mutexattr); + if (ret != 0) dump_error(__LINE__,ret,"Event_Create::pthread_mutexattr_init",&mutexattr); + ret = pthread_mutexattr_settype(&mutexattr,PTHREAD_MUTEX_ERRORCHECK); + if (ret != 0) dump_error(__LINE__,ret,"Event_Create::pthread_mutexattr_settype",&mutexattr); + ret = pthread_mutex_init(&p->_mutex,&mutexattr); + if (ret != 0) dump_error(__LINE__,ret,"Event_Create::pthread_mutexattr_init",&p->_mutex); + if (ret == 0) + { + ret = pthread_cond_init(&p->_cond,0); + if (ret != 0) dump_error(__LINE__,ret,"Event_Create::pthread_cond_init",&p->_cond); + p->_manual_reset = manualReset; + p->_state = (initialSignaled ? TRUE : FALSE); + p->_created = 1; + } + return ret; +} + +WRes Event_Set(CEvent *p) { + int ret = pthread_mutex_lock(&p->_mutex); + if (ret != 0) dump_error(__LINE__,ret,"ES::pthread_mutex_lock",&p->_mutex); + if (ret == 0) + { + p->_state = TRUE; + ret = pthread_cond_broadcast(&p->_cond); + if (ret != 0) dump_error(__LINE__,ret,"ES::pthread_cond_broadcast",&p->_cond); + if (ret == 0) + { + ret = pthread_mutex_unlock(&p->_mutex); + if (ret != 0) dump_error(__LINE__,ret,"ES::pthread_mutex_unlock",&p->_mutex); + } + } + return ret; +} + +WRes Event_Reset(CEvent *p) { + int ret = pthread_mutex_lock(&p->_mutex); + if (ret != 0) dump_error(__LINE__,ret,"ER::pthread_mutex_lock",&p->_mutex); + if (ret == 0) + { + p->_state = FALSE; + ret = pthread_mutex_unlock(&p->_mutex); + if (ret != 0) dump_error(__LINE__,ret,"ER::pthread_mutex_unlock",&p->_mutex); + } + return ret; +} + +WRes Event_Wait(CEvent *p) { + int ret = pthread_mutex_lock(&p->_mutex); + if (ret != 0) dump_error(__LINE__,ret,"EW::pthread_mutex_lock",&p->_mutex); + if (ret == 0) + { + while ((p->_state == FALSE) && (ret == 0)) + { + ret = pthread_cond_wait(&p->_cond, &p->_mutex); + if (ret != 0) dump_error(__LINE__,ret,"EW::pthread_cond_wait",&p->_mutex); + } + if (ret == 0) + { + if (p->_manual_reset == FALSE) + { + p->_state = FALSE; + } + ret = pthread_mutex_unlock(&p->_mutex); + if (ret != 0) dump_error(__LINE__,ret,"EW::pthread_mutex_unlock",&p->_mutex); + } + } + return ret; +} + +WRes Event_Close(CEvent *p) { + if (p->_created) + { + int ret; + p->_created = 0; + ret = pthread_mutex_destroy(&p->_mutex); + if (ret != 0) dump_error(__LINE__,ret,"EC::pthread_mutex_destroy",&p->_mutex); + ret = pthread_cond_destroy(&p->_cond); + if (ret != 0) dump_error(__LINE__,ret,"EC::pthread_cond_destroy",&p->_cond); + } + return 0; +} + +WRes Semaphore_Create(CSemaphore *p, UInt32 initiallyCount, UInt32 maxCount) +{ + int ret; + pthread_mutexattr_t mutexattr; + memset(&mutexattr,0,sizeof(mutexattr)); + ret = pthread_mutexattr_init(&mutexattr); + if (ret != 0) dump_error(__LINE__,ret,"SemC::pthread_mutexattr_init",&mutexattr); + ret = pthread_mutexattr_settype(&mutexattr,PTHREAD_MUTEX_ERRORCHECK); + if (ret != 0) dump_error(__LINE__,ret,"SemC::pthread_mutexattr_settype",&mutexattr); + ret = pthread_mutex_init(&p->_mutex,&mutexattr); + if (ret != 0) dump_error(__LINE__,ret,"SemC::pthread_mutexattr_init",&p->_mutex); + if (ret == 0) + { + ret = pthread_cond_init(&p->_cond,0); + if (ret != 0) dump_error(__LINE__,ret,"SemC::pthread_cond_init",&p->_mutex); + p->_count = initiallyCount; + p->_maxCount = maxCount; + p->_created = 1; + } + return ret; +} + +WRes Semaphore_ReleaseN(CSemaphore *p, UInt32 releaseCount) +{ + int ret; + if (releaseCount < 1) return EINVAL; + + ret = pthread_mutex_lock(&p->_mutex); + if (ret != 0) dump_error(__LINE__,ret,"SemR::pthread_mutex_lock",&p->_mutex); + if (ret == 0) + { + UInt32 newCount = p->_count + releaseCount; + if (newCount > p->_maxCount) + { + ret = pthread_mutex_unlock(&p->_mutex); + if (ret != 0) dump_error(__LINE__,ret,"SemR::pthread_mutex_unlock",&p->_mutex); + return EINVAL; + } + p->_count = newCount; + ret = pthread_cond_broadcast(&p->_cond); + if (ret != 0) dump_error(__LINE__,ret,"SemR::pthread_cond_broadcast",&p->_cond); + if (ret == 0) + { + ret = pthread_mutex_unlock(&p->_mutex); + if (ret != 0) dump_error(__LINE__,ret,"SemR::pthread_mutex_unlock",&p->_mutex); + } + } + return ret; +} + +WRes Semaphore_Wait(CSemaphore *p) { + int ret = pthread_mutex_lock(&p->_mutex); + if (ret != 0) dump_error(__LINE__,ret,"SemW::pthread_mutex_lock",&p->_mutex); + if (ret == 0) + { + while ((p->_count < 1) && (ret == 0)) + { + ret = pthread_cond_wait(&p->_cond, &p->_mutex); + if (ret != 0) dump_error(__LINE__,ret,"SemW::pthread_cond_wait",&p->_mutex); + } + if (ret == 0) + { + p->_count--; + ret = pthread_mutex_unlock(&p->_mutex); + if (ret != 0) dump_error(__LINE__,ret,"SemW::pthread_mutex_unlock",&p->_mutex); + } + } + return ret; +} + +WRes Semaphore_Close(CSemaphore *p) { + if (p->_created) + { + int ret; + p->_created = 0; + ret = pthread_mutex_destroy(&p->_mutex); + if (ret != 0) dump_error(__LINE__,ret,"Semc::pthread_mutex_destroy",&p->_mutex); + ret = pthread_cond_destroy(&p->_cond); + if (ret != 0) dump_error(__LINE__,ret,"Semc::pthread_cond_destroy",&p->_cond); + } + return 0; +} + +WRes CriticalSection_Init(CCriticalSection * lpCriticalSection) +{ + if (lpCriticalSection) + { + int ret; + pthread_mutexattr_t mutexattr; + memset(&mutexattr,0,sizeof(mutexattr)); + ret = pthread_mutexattr_init(&mutexattr); + if (ret != 0) dump_error(__LINE__,ret,"CS I::pthread_mutexattr_init",&mutexattr); + ret = pthread_mutexattr_settype(&mutexattr,PTHREAD_MUTEX_ERRORCHECK); + if (ret != 0) dump_error(__LINE__,ret,"CS I::pthread_mutexattr_settype",&mutexattr); + ret = pthread_mutex_init(&lpCriticalSection->_mutex,&mutexattr); + if (ret != 0) dump_error(__LINE__,ret,"CS I::pthread_mutexattr_init",&lpCriticalSection->_mutex); + return ret; + } + return EINTR; +} + +void CriticalSection_Enter(CCriticalSection * lpCriticalSection) +{ + if (lpCriticalSection) + { + int ret = pthread_mutex_lock(&(lpCriticalSection->_mutex)); + if (ret != 0) dump_error(__LINE__,ret,"CS::pthread_mutex_lock",&(lpCriticalSection->_mutex)); + } +} + +void CriticalSection_Leave(CCriticalSection * lpCriticalSection) +{ + if (lpCriticalSection) + { + int ret = pthread_mutex_unlock(&(lpCriticalSection->_mutex)); + if (ret != 0) dump_error(__LINE__,ret,"CS::pthread_mutex_unlock",&(lpCriticalSection->_mutex)); + } +} + +void CriticalSection_Delete(CCriticalSection * lpCriticalSection) +{ + if (lpCriticalSection) + { + int ret = pthread_mutex_destroy(&(lpCriticalSection->_mutex)); + if (ret != 0) dump_error(__LINE__,ret,"CS::pthread_mutex_destroy",&(lpCriticalSection->_mutex)); + } +} + +#else + +WRes Event_Create(CEvent *p, BOOL manualReset, int initialSignaled) +{ + pthread_mutex_init(&p->_mutex,0); + pthread_cond_init(&p->_cond,0); + p->_manual_reset = manualReset; + p->_state = (initialSignaled ? TRUE : FALSE); + p->_created = 1; + return 0; +} + +WRes Event_Set(CEvent *p) { + pthread_mutex_lock(&p->_mutex); + p->_state = TRUE; + pthread_cond_broadcast(&p->_cond); + pthread_mutex_unlock(&p->_mutex); + return 0; +} + +WRes Event_Reset(CEvent *p) { + pthread_mutex_lock(&p->_mutex); + p->_state = FALSE; + pthread_mutex_unlock(&p->_mutex); + return 0; +} + +WRes Event_Wait(CEvent *p) { + pthread_mutex_lock(&p->_mutex); + while (p->_state == FALSE) + { + pthread_cond_wait(&p->_cond, &p->_mutex); + } + if (p->_manual_reset == FALSE) + { + p->_state = FALSE; + } + pthread_mutex_unlock(&p->_mutex); + return 0; +} + +WRes Event_Close(CEvent *p) { + if (p->_created) + { + p->_created = 0; + pthread_mutex_destroy(&p->_mutex); + pthread_cond_destroy(&p->_cond); + } + return 0; +} + +WRes Semaphore_Create(CSemaphore *p, UInt32 initiallyCount, UInt32 maxCount) +{ + pthread_mutex_init(&p->_mutex,0); + pthread_cond_init(&p->_cond,0); + p->_count = initiallyCount; + p->_maxCount = maxCount; + p->_created = 1; + return 0; +} + +WRes Semaphore_ReleaseN(CSemaphore *p, UInt32 releaseCount) +{ + UInt32 newCount; + + if (releaseCount < 1) return EINVAL; + + pthread_mutex_lock(&p->_mutex); + + newCount = p->_count + releaseCount; + if (newCount > p->_maxCount) + { + pthread_mutex_unlock(&p->_mutex); + return EINVAL; + } + p->_count = newCount; + pthread_cond_broadcast(&p->_cond); + pthread_mutex_unlock(&p->_mutex); + return 0; +} + +WRes Semaphore_Wait(CSemaphore *p) { + pthread_mutex_lock(&p->_mutex); + while (p->_count < 1) + { + pthread_cond_wait(&p->_cond, &p->_mutex); + } + p->_count--; + pthread_mutex_unlock(&p->_mutex); + return 0; +} + +WRes Semaphore_Close(CSemaphore *p) { + if (p->_created) + { + p->_created = 0; + pthread_mutex_destroy(&p->_mutex); + pthread_cond_destroy(&p->_cond); + } + return 0; +} + +WRes CriticalSection_Init(CCriticalSection * lpCriticalSection) +{ + return pthread_mutex_init(&(lpCriticalSection->_mutex),0); +} + +#endif /* DEBUG_SYNCHRO */ + +#endif /* ENV_BEOS */ + +WRes ManualResetEvent_Create(CManualResetEvent *p, int initialSignaled) + { return Event_Create(p, TRUE, initialSignaled); } + +WRes ManualResetEvent_CreateNotSignaled(CManualResetEvent *p) + { return ManualResetEvent_Create(p, 0); } + +WRes AutoResetEvent_Create(CAutoResetEvent *p, int initialSignaled) + { return Event_Create(p, FALSE, initialSignaled); } +WRes AutoResetEvent_CreateNotSignaled(CAutoResetEvent *p) + { return AutoResetEvent_Create(p, 0); } + diff --git a/C/Threads.h b/C/Threads.h new file mode 100644 index 0000000..07b05be --- /dev/null +++ b/C/Threads.h @@ -0,0 +1,123 @@ +/* Threads.h -- multithreading library +2008-11-22 : Igor Pavlov : Public domain */ + +#ifndef __7Z_THRESDS_H +#define __7Z_THRESDS_H + +#include "Types.h" +#include "windows.h" + +#ifdef ENV_BEOS +#include +#define MAX_THREAD 256 +#else +#include +#endif + +/* #define DEBUG_SYNCHRO 1 */ + +typedef struct _CThread +{ +#ifdef ENV_BEOS + thread_id _tid; +#else + pthread_t _tid; +#endif + int _created; + +} CThread; + +#define Thread_Construct(thread) (thread)->_created = 0 +#define Thread_WasCreated(thread) ((thread)->_created != 0) + +typedef unsigned THREAD_FUNC_RET_TYPE; +#define THREAD_FUNC_CALL_TYPE MY_STD_CALL +#define THREAD_FUNC_DECL THREAD_FUNC_RET_TYPE THREAD_FUNC_CALL_TYPE + +typedef THREAD_FUNC_RET_TYPE (THREAD_FUNC_CALL_TYPE * THREAD_FUNC_TYPE)(void *); + +WRes Thread_Create(CThread *thread, THREAD_FUNC_TYPE startAddress, LPVOID parameter); +WRes Thread_Wait(CThread *thread); +WRes Thread_Close(CThread *thread); + +typedef struct _CEvent +{ + int _created; + int _manual_reset; + int _state; +#ifdef ENV_BEOS + thread_id _waiting[MAX_THREAD]; + int _index_waiting; + sem_id _sem; +#else + pthread_mutex_t _mutex; + pthread_cond_t _cond; +#endif +} CEvent; + +typedef CEvent CAutoResetEvent; +typedef CEvent CManualResetEvent; + +#define Event_Construct(event) (event)->_created = 0 +#define Event_IsCreated(event) ((event)->_created) + +WRes ManualResetEvent_Create(CManualResetEvent *event, int initialSignaled); +WRes ManualResetEvent_CreateNotSignaled(CManualResetEvent *event); +WRes AutoResetEvent_Create(CAutoResetEvent *event, int initialSignaled); +WRes AutoResetEvent_CreateNotSignaled(CAutoResetEvent *event); +WRes Event_Set(CEvent *event); +WRes Event_Reset(CEvent *event); +WRes Event_Wait(CEvent *event); +WRes Event_Close(CEvent *event); + + +typedef struct _CSemaphore +{ + int _created; + UInt32 _count; + UInt32 _maxCount; +#ifdef ENV_BEOS + thread_id _waiting[MAX_THREAD]; + int _index_waiting; + sem_id _sem; +#else + pthread_mutex_t _mutex; + pthread_cond_t _cond; +#endif +} CSemaphore; + +#define Semaphore_Construct(p) (p)->_created = 0 + +WRes Semaphore_Create(CSemaphore *p, UInt32 initiallyCount, UInt32 maxCount); +WRes Semaphore_ReleaseN(CSemaphore *p, UInt32 num); +#define Semaphore_Release1(p) Semaphore_ReleaseN(p, 1) +WRes Semaphore_Wait(CSemaphore *p); +WRes Semaphore_Close(CSemaphore *p); + +typedef struct { +#ifdef ENV_BEOS + sem_id _sem; +#else + pthread_mutex_t _mutex; +#endif +} CCriticalSection; + +WRes CriticalSection_Init(CCriticalSection *p); +#ifdef ENV_BEOS +#define CriticalSection_Delete(p) delete_sem((p)->_sem) +#define CriticalSection_Enter(p) acquire_sem((p)->_sem) +#define CriticalSection_Leave(p) release_sem((p)->_sem) +#else +#ifdef DEBUG_SYNCHRO +void CriticalSection_Delete(CCriticalSection *); +void CriticalSection_Enter(CCriticalSection *); +void CriticalSection_Leave(CCriticalSection *); +#else +#define CriticalSection_Delete(p) pthread_mutex_destroy(&((p)->_mutex)) +#define CriticalSection_Enter(p) pthread_mutex_lock(&((p)->_mutex)) +#define CriticalSection_Leave(p) pthread_mutex_unlock(&((p)->_mutex)) +#endif +#endif + +#endif + diff --git a/C/Types.h b/C/Types.h new file mode 100644 index 0000000..7732c24 --- /dev/null +++ b/C/Types.h @@ -0,0 +1,254 @@ +/* Types.h -- Basic types +2010-10-09 : Igor Pavlov : Public domain */ + +#ifndef __7Z_TYPES_H +#define __7Z_TYPES_H + +#include + +#ifdef _WIN32 +#include +#endif + +#ifndef EXTERN_C_BEGIN +#ifdef __cplusplus +#define EXTERN_C_BEGIN extern "C" { +#define EXTERN_C_END } +#else +#define EXTERN_C_BEGIN +#define EXTERN_C_END +#endif +#endif + +EXTERN_C_BEGIN + +#define SZ_OK 0 + +#define SZ_ERROR_DATA 1 +#define SZ_ERROR_MEM 2 +#define SZ_ERROR_CRC 3 +#define SZ_ERROR_UNSUPPORTED 4 +#define SZ_ERROR_PARAM 5 +#define SZ_ERROR_INPUT_EOF 6 +#define SZ_ERROR_OUTPUT_EOF 7 +#define SZ_ERROR_READ 8 +#define SZ_ERROR_WRITE 9 +#define SZ_ERROR_PROGRESS 10 +#define SZ_ERROR_FAIL 11 +#define SZ_ERROR_THREAD 12 + +#define SZ_ERROR_ARCHIVE 16 +#define SZ_ERROR_NO_ARCHIVE 17 + +typedef int SRes; + +#ifdef _WIN32 +typedef DWORD WRes; +#else +typedef int WRes; +#endif + +#ifndef RINOK +#define RINOK(x) { int __result__ = (x); if (__result__ != 0) return __result__; } +#endif + +typedef unsigned char Byte; +typedef short Int16; +typedef unsigned short UInt16; + +#ifdef _LZMA_UINT32_IS_ULONG +typedef long Int32; +typedef unsigned long UInt32; +#else +typedef int Int32; +typedef unsigned int UInt32; +#endif + +#ifdef _SZ_NO_INT_64 + +/* define _SZ_NO_INT_64, if your compiler doesn't support 64-bit integers. + NOTES: Some code will work incorrectly in that case! */ + +typedef long Int64; +typedef unsigned long UInt64; + +#else + +#if defined(_MSC_VER) || defined(__BORLANDC__) +typedef __int64 Int64; +typedef unsigned __int64 UInt64; +#define UINT64_CONST(n) n +#else +typedef long long int Int64; +typedef unsigned long long int UInt64; +#define UINT64_CONST(n) n ## ULL +#endif + +#endif + +#ifdef _LZMA_NO_SYSTEM_SIZE_T +typedef UInt32 SizeT; +#else +typedef size_t SizeT; +#endif + +typedef int Bool; +#define True 1 +#define False 0 + + +#ifdef _WIN32 +#define MY_STD_CALL __stdcall +#else +#define MY_STD_CALL +#endif + +#ifdef _MSC_VER + +#if _MSC_VER >= 1300 +#define MY_NO_INLINE __declspec(noinline) +#else +#define MY_NO_INLINE +#endif + +#define MY_CDECL __cdecl +#define MY_FAST_CALL __fastcall + +#else + +#define MY_CDECL +#define MY_FAST_CALL + +#endif + + +/* The following interfaces use first parameter as pointer to structure */ + +typedef struct +{ + Byte (*Read)(void *p); /* reads one byte, returns 0 in case of EOF or error */ +} IByteIn; + +typedef struct +{ + void (*Write)(void *p, Byte b); +} IByteOut; + +typedef struct +{ + SRes (*Read)(void *p, void *buf, size_t *size); + /* if (input(*size) != 0 && output(*size) == 0) means end_of_stream. + (output(*size) < input(*size)) is allowed */ +} ISeqInStream; + +/* it can return SZ_ERROR_INPUT_EOF */ +SRes SeqInStream_Read(ISeqInStream *stream, void *buf, size_t size); +SRes SeqInStream_Read2(ISeqInStream *stream, void *buf, size_t size, SRes errorType); +SRes SeqInStream_ReadByte(ISeqInStream *stream, Byte *buf); + +typedef struct +{ + size_t (*Write)(void *p, const void *buf, size_t size); + /* Returns: result - the number of actually written bytes. + (result < size) means error */ +} ISeqOutStream; + +typedef enum +{ + SZ_SEEK_SET = 0, + SZ_SEEK_CUR = 1, + SZ_SEEK_END = 2 +} ESzSeek; + +typedef struct +{ + SRes (*Read)(void *p, void *buf, size_t *size); /* same as ISeqInStream::Read */ + SRes (*Seek)(void *p, Int64 *pos, ESzSeek origin); +} ISeekInStream; + +typedef struct +{ + SRes (*Look)(void *p, const void **buf, size_t *size); + /* if (input(*size) != 0 && output(*size) == 0) means end_of_stream. + (output(*size) > input(*size)) is not allowed + (output(*size) < input(*size)) is allowed */ + SRes (*Skip)(void *p, size_t offset); + /* offset must be <= output(*size) of Look */ + + SRes (*Read)(void *p, void *buf, size_t *size); + /* reads directly (without buffer). It's same as ISeqInStream::Read */ + SRes (*Seek)(void *p, Int64 *pos, ESzSeek origin); +} ILookInStream; + +SRes LookInStream_LookRead(ILookInStream *stream, void *buf, size_t *size); +SRes LookInStream_SeekTo(ILookInStream *stream, UInt64 offset); + +/* reads via ILookInStream::Read */ +SRes LookInStream_Read2(ILookInStream *stream, void *buf, size_t size, SRes errorType); +SRes LookInStream_Read(ILookInStream *stream, void *buf, size_t size); + +#define LookToRead_BUF_SIZE (1 << 14) + +typedef struct +{ + ILookInStream s; + ISeekInStream *realStream; + size_t pos; + size_t size; + Byte buf[LookToRead_BUF_SIZE]; +} CLookToRead; + +void LookToRead_CreateVTable(CLookToRead *p, int lookahead); +void LookToRead_Init(CLookToRead *p); + +typedef struct +{ + ISeqInStream s; + ILookInStream *realStream; +} CSecToLook; + +void SecToLook_CreateVTable(CSecToLook *p); + +typedef struct +{ + ISeqInStream s; + ILookInStream *realStream; +} CSecToRead; + +void SecToRead_CreateVTable(CSecToRead *p); + +typedef struct +{ + SRes (*Progress)(void *p, UInt64 inSize, UInt64 outSize); + /* Returns: result. (result != SZ_OK) means break. + Value (UInt64)(Int64)-1 for size means unknown value. */ +} ICompressProgress; + +typedef struct +{ + void *(*Alloc)(void *p, size_t size); + void (*Free)(void *p, void *address); /* address can be 0 */ +} ISzAlloc; + +#define IAlloc_Alloc(p, size) (p)->Alloc((p), size) +#define IAlloc_Free(p, a) (p)->Free((p), a) + +#ifdef _WIN32 + +#define CHAR_PATH_SEPARATOR '\\' +#define WCHAR_PATH_SEPARATOR L'\\' +#define STRING_PATH_SEPARATOR "\\" +#define WSTRING_PATH_SEPARATOR L"\\" + +#else + +#define CHAR_PATH_SEPARATOR '/' +#define WCHAR_PATH_SEPARATOR L'/' +#define STRING_PATH_SEPARATOR "/" +#define WSTRING_PATH_SEPARATOR L"/" + +#endif + +EXTERN_C_END + +#endif diff --git a/C/Xz.c b/C/Xz.c new file mode 100644 index 0000000..18caba2 --- /dev/null +++ b/C/Xz.c @@ -0,0 +1,88 @@ +/* Xz.c - Xz +2009-04-15 : Igor Pavlov : Public domain */ + +#include "7zCrc.h" +#include "CpuArch.h" +#include "Xz.h" +#include "XzCrc64.h" + +Byte XZ_SIG[XZ_SIG_SIZE] = { 0xFD, '7', 'z', 'X', 'Z', 0 }; +Byte XZ_FOOTER_SIG[XZ_FOOTER_SIG_SIZE] = { 'Y', 'Z' }; + +unsigned Xz_WriteVarInt(Byte *buf, UInt64 v) +{ + unsigned i = 0; + do + { + buf[i++] = (Byte)((v & 0x7F) | 0x80); + v >>= 7; + } + while (v != 0); + buf[i - 1] &= 0x7F; + return i; +} + +void Xz_Construct(CXzStream *p) +{ + p->numBlocks = p->numBlocksAllocated = 0; + p->blocks = 0; + p->flags = 0; +} + +void Xz_Free(CXzStream *p, ISzAlloc *alloc) +{ + alloc->Free(alloc, p->blocks); + p->numBlocks = p->numBlocksAllocated = 0; + p->blocks = 0; +} + +unsigned XzFlags_GetCheckSize(CXzStreamFlags f) +{ + int t = XzFlags_GetCheckType(f); + return (t == 0) ? 0 : (4 << ((t - 1) / 3)); +} + +void XzCheck_Init(CXzCheck *p, int mode) +{ + p->mode = mode; + switch (mode) + { + case XZ_CHECK_CRC32: p->crc = CRC_INIT_VAL; break; + case XZ_CHECK_CRC64: p->crc64 = CRC64_INIT_VAL; break; + case XZ_CHECK_SHA256: Sha256_Init(&p->sha); break; + } +} + +void XzCheck_Update(CXzCheck *p, const void *data, size_t size) +{ + switch (p->mode) + { + case XZ_CHECK_CRC32: p->crc = CrcUpdate(p->crc, data, size); break; + case XZ_CHECK_CRC64: p->crc64 = Crc64Update(p->crc64, data, size); break; + case XZ_CHECK_SHA256: Sha256_Update(&p->sha, (const Byte *)data, size); break; + } +} + +int XzCheck_Final(CXzCheck *p, Byte *digest) +{ + switch (p->mode) + { + case XZ_CHECK_CRC32: + SetUi32(digest, CRC_GET_DIGEST(p->crc)); + break; + case XZ_CHECK_CRC64: + { + int i; + UInt64 v = CRC64_GET_DIGEST(p->crc64); + for (i = 0; i < 8; i++, v >>= 8) + digest[i] = (Byte)(v & 0xFF); + break; + } + case XZ_CHECK_SHA256: + Sha256_Final(&p->sha, digest); + break; + default: + return 0; + } + return 1; +} diff --git a/C/Xz.h b/C/Xz.h new file mode 100644 index 0000000..2cfa1b7 --- /dev/null +++ b/C/Xz.h @@ -0,0 +1,252 @@ +/* Xz.h - Xz interface +2010-09-17 : Igor Pavlov : Public domain */ + +#ifndef __XZ_H +#define __XZ_H + +#include "Sha256.h" + +EXTERN_C_BEGIN + +#define XZ_ID_Subblock 1 +#define XZ_ID_Delta 3 +#define XZ_ID_X86 4 +#define XZ_ID_PPC 5 +#define XZ_ID_IA64 6 +#define XZ_ID_ARM 7 +#define XZ_ID_ARMT 8 +#define XZ_ID_SPARC 9 +#define XZ_ID_LZMA2 0x21 + +unsigned Xz_ReadVarInt(const Byte *p, size_t maxSize, UInt64 *value); +unsigned Xz_WriteVarInt(Byte *buf, UInt64 v); + +/* ---------- xz block ---------- */ + +#define XZ_BLOCK_HEADER_SIZE_MAX 1024 + +#define XZ_NUM_FILTERS_MAX 4 +#define XZ_BF_NUM_FILTERS_MASK 3 +#define XZ_BF_PACK_SIZE (1 << 6) +#define XZ_BF_UNPACK_SIZE (1 << 7) + +#define XZ_FILTER_PROPS_SIZE_MAX 20 + +typedef struct +{ + UInt64 id; + UInt32 propsSize; + Byte props[XZ_FILTER_PROPS_SIZE_MAX]; +} CXzFilter; + +typedef struct +{ + UInt64 packSize; + UInt64 unpackSize; + Byte flags; + CXzFilter filters[XZ_NUM_FILTERS_MAX]; +} CXzBlock; + +#define XzBlock_GetNumFilters(p) (((p)->flags & XZ_BF_NUM_FILTERS_MASK) + 1) +#define XzBlock_HasPackSize(p) (((p)->flags & XZ_BF_PACK_SIZE) != 0) +#define XzBlock_HasUnpackSize(p) (((p)->flags & XZ_BF_UNPACK_SIZE) != 0) + +SRes XzBlock_Parse(CXzBlock *p, const Byte *header); +SRes XzBlock_ReadHeader(CXzBlock *p, ISeqInStream *inStream, Bool *isIndex, UInt32 *headerSizeRes); + +/* ---------- xz stream ---------- */ + +#define XZ_SIG_SIZE 6 +#define XZ_FOOTER_SIG_SIZE 2 + +extern Byte XZ_SIG[XZ_SIG_SIZE]; +extern Byte XZ_FOOTER_SIG[XZ_FOOTER_SIG_SIZE]; + +#define XZ_STREAM_FLAGS_SIZE 2 +#define XZ_STREAM_CRC_SIZE 4 + +#define XZ_STREAM_HEADER_SIZE (XZ_SIG_SIZE + XZ_STREAM_FLAGS_SIZE + XZ_STREAM_CRC_SIZE) +#define XZ_STREAM_FOOTER_SIZE (XZ_FOOTER_SIG_SIZE + XZ_STREAM_FLAGS_SIZE + XZ_STREAM_CRC_SIZE + 4) + +#define XZ_CHECK_MASK 0xF +#define XZ_CHECK_NO 0 +#define XZ_CHECK_CRC32 1 +#define XZ_CHECK_CRC64 4 +#define XZ_CHECK_SHA256 10 + +typedef struct +{ + int mode; + UInt32 crc; + UInt64 crc64; + CSha256 sha; +} CXzCheck; + +void XzCheck_Init(CXzCheck *p, int mode); +void XzCheck_Update(CXzCheck *p, const void *data, size_t size); +int XzCheck_Final(CXzCheck *p, Byte *digest); + +typedef UInt16 CXzStreamFlags; + +#define XzFlags_IsSupported(f) ((f) <= XZ_CHECK_MASK) +#define XzFlags_GetCheckType(f) ((f) & XZ_CHECK_MASK) +#define XzFlags_HasDataCrc32(f) (Xz_GetCheckType(f) == XZ_CHECK_CRC32) +unsigned XzFlags_GetCheckSize(CXzStreamFlags f); + +SRes Xz_ParseHeader(CXzStreamFlags *p, const Byte *buf); +SRes Xz_ReadHeader(CXzStreamFlags *p, ISeqInStream *inStream); + +typedef struct +{ + UInt64 unpackSize; + UInt64 totalSize; +} CXzBlockSizes; + +typedef struct +{ + CXzStreamFlags flags; + size_t numBlocks; + size_t numBlocksAllocated; + CXzBlockSizes *blocks; + UInt64 startOffset; +} CXzStream; + +void Xz_Construct(CXzStream *p); +void Xz_Free(CXzStream *p, ISzAlloc *alloc); + +#define XZ_SIZE_OVERFLOW ((UInt64)(Int64)-1) + +UInt64 Xz_GetUnpackSize(const CXzStream *p); +UInt64 Xz_GetPackSize(const CXzStream *p); + +typedef struct +{ + size_t num; + size_t numAllocated; + CXzStream *streams; +} CXzs; + +void Xzs_Construct(CXzs *p); +void Xzs_Free(CXzs *p, ISzAlloc *alloc); +SRes Xzs_ReadBackward(CXzs *p, ILookInStream *inStream, Int64 *startOffset, ICompressProgress *progress, ISzAlloc *alloc); + +UInt64 Xzs_GetNumBlocks(const CXzs *p); +UInt64 Xzs_GetUnpackSize(const CXzs *p); + +typedef enum +{ + CODER_STATUS_NOT_SPECIFIED, /* use main error code instead */ + CODER_STATUS_FINISHED_WITH_MARK, /* stream was finished with end mark. */ + CODER_STATUS_NOT_FINISHED, /* stream was not finished */ + CODER_STATUS_NEEDS_MORE_INPUT /* you must provide more input bytes */ +} ECoderStatus; + +typedef enum +{ + CODER_FINISH_ANY, /* finish at any point */ + CODER_FINISH_END /* block must be finished at the end */ +} ECoderFinishMode; + +typedef struct _IStateCoder +{ + void *p; + void (*Free)(void *p, ISzAlloc *alloc); + SRes (*SetProps)(void *p, const Byte *props, size_t propSize, ISzAlloc *alloc); + void (*Init)(void *p); + SRes (*Code)(void *p, Byte *dest, SizeT *destLen, const Byte *src, SizeT *srcLen, + int srcWasFinished, ECoderFinishMode finishMode, int *wasFinished); +} IStateCoder; + +#define MIXCODER_NUM_FILTERS_MAX 4 + +typedef struct +{ + ISzAlloc *alloc; + Byte *buf; + int numCoders; + int finished[MIXCODER_NUM_FILTERS_MAX - 1]; + size_t pos[MIXCODER_NUM_FILTERS_MAX - 1]; + size_t size[MIXCODER_NUM_FILTERS_MAX - 1]; + UInt64 ids[MIXCODER_NUM_FILTERS_MAX]; + IStateCoder coders[MIXCODER_NUM_FILTERS_MAX]; +} CMixCoder; + +void MixCoder_Construct(CMixCoder *p, ISzAlloc *alloc); +void MixCoder_Free(CMixCoder *p); +void MixCoder_Init(CMixCoder *p); +SRes MixCoder_SetFromMethod(CMixCoder *p, int coderIndex, UInt64 methodId); +SRes MixCoder_Code(CMixCoder *p, Byte *dest, SizeT *destLen, + const Byte *src, SizeT *srcLen, int srcWasFinished, + ECoderFinishMode finishMode, ECoderStatus *status); + +typedef enum +{ + XZ_STATE_STREAM_HEADER, + XZ_STATE_STREAM_INDEX, + XZ_STATE_STREAM_INDEX_CRC, + XZ_STATE_STREAM_FOOTER, + XZ_STATE_STREAM_PADDING, + XZ_STATE_BLOCK_HEADER, + XZ_STATE_BLOCK, + XZ_STATE_BLOCK_FOOTER +} EXzState; + +typedef struct +{ + EXzState state; + UInt32 pos; + unsigned alignPos; + unsigned indexPreSize; + + CXzStreamFlags streamFlags; + + UInt32 blockHeaderSize; + UInt64 packSize; + UInt64 unpackSize; + + UInt64 numBlocks; + UInt64 indexSize; + UInt64 indexPos; + UInt64 padSize; + + UInt64 numStreams; + + UInt32 crc; + CMixCoder decoder; + CXzBlock block; + CXzCheck check; + CSha256 sha; + Byte shaDigest[SHA256_DIGEST_SIZE]; + Byte buf[XZ_BLOCK_HEADER_SIZE_MAX]; +} CXzUnpacker; + +SRes XzUnpacker_Create(CXzUnpacker *p, ISzAlloc *alloc); +void XzUnpacker_Free(CXzUnpacker *p); + +/* +finishMode: + It has meaning only if the decoding reaches output limit (*destLen). + LZMA_FINISH_ANY - use smallest number of input bytes + LZMA_FINISH_END - read EndOfStream marker after decoding + +Returns: + SZ_OK + status: + LZMA_STATUS_FINISHED_WITH_MARK + LZMA_STATUS_NOT_FINISHED + SZ_ERROR_DATA - Data error + SZ_ERROR_MEM - Memory allocation error + SZ_ERROR_UNSUPPORTED - Unsupported properties + SZ_ERROR_INPUT_EOF - It needs more bytes in input buffer (src). +*/ + + +SRes XzUnpacker_Code(CXzUnpacker *p, Byte *dest, SizeT *destLen, + const Byte *src, SizeT *srcLen, /* int srcWasFinished, */ int finishMode, + ECoderStatus *status); + +Bool XzUnpacker_IsStreamWasFinished(CXzUnpacker *p); + +EXTERN_C_END + +#endif diff --git a/C/XzCrc64.c b/C/XzCrc64.c new file mode 100644 index 0000000..0369554 --- /dev/null +++ b/C/XzCrc64.c @@ -0,0 +1,33 @@ +/* XzCrc64.c -- CRC64 calculation +2010-04-16 : Igor Pavlov : Public domain */ + +#include "XzCrc64.h" + +#define kCrc64Poly UINT64_CONST(0xC96C5795D7870F42) +UInt64 g_Crc64Table[256]; + +void MY_FAST_CALL Crc64GenerateTable(void) +{ + UInt32 i; + for (i = 0; i < 256; i++) + { + UInt64 r = i; + int j; + for (j = 0; j < 8; j++) + r = (r >> 1) ^ ((UInt64)kCrc64Poly & ~((r & 1) - 1)); + g_Crc64Table[i] = r; + } +} + +UInt64 MY_FAST_CALL Crc64Update(UInt64 v, const void *data, size_t size) +{ + const Byte *p = (const Byte *)data; + for (; size > 0 ; size--, p++) + v = CRC64_UPDATE_BYTE(v, *p); + return v; +} + +UInt64 MY_FAST_CALL Crc64Calc(const void *data, size_t size) +{ + return CRC64_GET_DIGEST(Crc64Update(CRC64_INIT_VAL, data, size)); +} diff --git a/C/XzCrc64.h b/C/XzCrc64.h new file mode 100644 index 0000000..0e8efd7 --- /dev/null +++ b/C/XzCrc64.h @@ -0,0 +1,26 @@ +/* XzCrc64.h -- CRC64 calculation +2010-04-16 : Igor Pavlov : Public domain */ + +#ifndef __XZ_CRC64_H +#define __XZ_CRC64_H + +#include + +#include "Types.h" + +EXTERN_C_BEGIN + +extern UInt64 g_Crc64Table[]; + +void MY_FAST_CALL Crc64GenerateTable(void); + +#define CRC64_INIT_VAL UINT64_CONST(0xFFFFFFFFFFFFFFFF) +#define CRC64_GET_DIGEST(crc) ((crc) ^ CRC64_INIT_VAL) +#define CRC64_UPDATE_BYTE(crc, b) (g_Crc64Table[((crc) ^ (b)) & 0xFF] ^ ((crc) >> 8)) + +UInt64 MY_FAST_CALL Crc64Update(UInt64 crc, const void *data, size_t size); +UInt64 MY_FAST_CALL Crc64Calc(const void *data, size_t size); + +EXTERN_C_END + +#endif diff --git a/C/XzDec.c b/C/XzDec.c new file mode 100644 index 0000000..40f1a2a --- /dev/null +++ b/C/XzDec.c @@ -0,0 +1,875 @@ +/* XzDec.c -- Xz Decode +2010-04-16 : Igor Pavlov : Public domain */ + +/* #define XZ_DUMP */ + +#ifdef XZ_DUMP +#include +#endif + +#include +#include + +#include "7zCrc.h" +#include "Alloc.h" +#include "Bra.h" +#include "CpuArch.h" +#include "Delta.h" +#include "Lzma2Dec.h" + +#ifdef USE_SUBBLOCK +#include "SbDec.h" +#endif + +#include "Xz.h" + +#define XZ_CHECK_SIZE_MAX 64 + +#define CODER_BUF_SIZE (1 << 17) + +unsigned Xz_ReadVarInt(const Byte *p, size_t maxSize, UInt64 *value) +{ + int i, limit; + *value = 0; + limit = (maxSize > 9) ? 9 : (int)maxSize; + + for (i = 0; i < limit;) + { + Byte b = p[i]; + *value |= (UInt64)(b & 0x7F) << (7 * i++); + if ((b & 0x80) == 0) + return (b == 0 && i != 1) ? 0 : i; + } + return 0; +} + +/* ---------- BraState ---------- */ + +#define BRA_BUF_SIZE (1 << 14) + +typedef struct +{ + size_t bufPos; + size_t bufConv; + size_t bufTotal; + + UInt32 methodId; + int encodeMode; + UInt32 delta; + UInt32 ip; + UInt32 x86State; + Byte deltaState[DELTA_STATE_SIZE]; + + Byte buf[BRA_BUF_SIZE]; +} CBraState; + +void BraState_Free(void *pp, ISzAlloc *alloc) +{ + alloc->Free(alloc, pp); +} + +SRes BraState_SetProps(void *pp, const Byte *props, size_t propSize, ISzAlloc *alloc) +{ + CBraState *p = ((CBraState *)pp); + alloc = alloc; + p->encodeMode = 0; + p->ip = 0; + if (p->methodId == XZ_ID_Delta) + { + if (propSize != 1) + return SZ_ERROR_UNSUPPORTED; + p->delta = (unsigned)props[0] + 1; + } + else + { + if (propSize == 4) + { + UInt32 v = GetUi32(props); + switch(p->methodId) + { + case XZ_ID_PPC: + case XZ_ID_ARM: + case XZ_ID_SPARC: + if ((v & 3) != 0) + return SZ_ERROR_UNSUPPORTED; + break; + case XZ_ID_ARMT: + if ((v & 1) != 0) + return SZ_ERROR_UNSUPPORTED; + break; + case XZ_ID_IA64: + if ((v & 0xF) != 0) + return SZ_ERROR_UNSUPPORTED; + break; + } + p->ip = v; + } + else if (propSize != 0) + return SZ_ERROR_UNSUPPORTED; + } + return SZ_OK; +} + +void BraState_Init(void *pp) +{ + CBraState *p = ((CBraState *)pp); + p->bufPos = p->bufConv = p->bufTotal = 0; + x86_Convert_Init(p->x86State); + if (p->methodId == XZ_ID_Delta) + Delta_Init(p->deltaState); +} + +#define CASE_BRA_CONV(isa) case XZ_ID_ ## isa: p->bufConv = isa ## _Convert(p->buf, p->bufTotal, p->ip, p->encodeMode); break; + +static SRes BraState_Code(void *pp, Byte *dest, SizeT *destLen, const Byte *src, SizeT *srcLen, + int srcWasFinished, ECoderFinishMode finishMode, int *wasFinished) +{ + CBraState *p = ((CBraState *)pp); + SizeT destLenOrig = *destLen; + SizeT srcLenOrig = *srcLen; + *destLen = 0; + *srcLen = 0; + finishMode = finishMode; + *wasFinished = 0; + while (destLenOrig > 0) + { + if (p->bufPos != p->bufConv) + { + size_t curSize = p->bufConv - p->bufPos; + if (curSize > destLenOrig) + curSize = destLenOrig; + memcpy(dest, p->buf + p->bufPos, curSize); + p->bufPos += curSize; + *destLen += curSize; + dest += curSize; + destLenOrig -= curSize; + continue; + } + p->bufTotal -= p->bufPos; + memmove(p->buf, p->buf + p->bufPos, p->bufTotal); + p->bufPos = 0; + p->bufConv = 0; + { + size_t curSize = BRA_BUF_SIZE - p->bufTotal; + if (curSize > srcLenOrig) + curSize = srcLenOrig; + memcpy(p->buf + p->bufTotal, src, curSize); + *srcLen += curSize; + src += curSize; + srcLenOrig -= curSize; + p->bufTotal += curSize; + } + if (p->bufTotal == 0) + break; + switch(p->methodId) + { + case XZ_ID_Delta: + if (p->encodeMode) + Delta_Encode(p->deltaState, p->delta, p->buf, p->bufTotal); + else + Delta_Decode(p->deltaState, p->delta, p->buf, p->bufTotal); + p->bufConv = p->bufTotal; + break; + case XZ_ID_X86: + p->bufConv = x86_Convert(p->buf, p->bufTotal, p->ip, &p->x86State, p->encodeMode); + break; + CASE_BRA_CONV(PPC) + CASE_BRA_CONV(IA64) + CASE_BRA_CONV(ARM) + CASE_BRA_CONV(ARMT) + CASE_BRA_CONV(SPARC) + default: + return SZ_ERROR_UNSUPPORTED; + } + p->ip += (UInt32)p->bufConv; + + if (p->bufConv == 0) + { + if (!srcWasFinished) + break; + p->bufConv = p->bufTotal; + } + } + if (p->bufTotal == p->bufPos && srcLenOrig == 0 && srcWasFinished) + *wasFinished = 1; + return SZ_OK; +} + +SRes BraState_SetFromMethod(IStateCoder *p, UInt64 id, ISzAlloc *alloc) +{ + CBraState *decoder; + if (id != XZ_ID_Delta && + id != XZ_ID_X86 && + id != XZ_ID_PPC && + id != XZ_ID_IA64 && + id != XZ_ID_ARM && + id != XZ_ID_ARMT && + id != XZ_ID_SPARC) + return SZ_ERROR_UNSUPPORTED; + p->p = 0; + decoder = alloc->Alloc(alloc, sizeof(CBraState)); + if (decoder == 0) + return SZ_ERROR_MEM; + decoder->methodId = (UInt32)id; + p->p = decoder; + p->Free = BraState_Free; + p->SetProps = BraState_SetProps; + p->Init = BraState_Init; + p->Code = BraState_Code; + return SZ_OK; +} + +/* ---------- SbState ---------- */ + +#ifdef USE_SUBBLOCK + +static void SbState_Free(void *pp, ISzAlloc *alloc) +{ + CSubblockDec *p = (CSubblockDec *)pp; + SubblockDec_Free(p, alloc); + alloc->Free(alloc, pp); +} + +static SRes SbState_SetProps(void *pp, const Byte *props, size_t propSize, ISzAlloc *alloc) +{ + pp = pp; + props = props; + alloc = alloc; + return (propSize == 0) ? SZ_OK : SZ_ERROR_UNSUPPORTED; +} + +static void SbState_Init(void *pp) +{ + SubblockDec_Init((CSubblockDec *)pp); +} + +static SRes SbState_Code(void *pp, Byte *dest, SizeT *destLen, const Byte *src, SizeT *srcLen, + int srcWasFinished, ECoderFinishMode finishMode, int *wasFinished) +{ + ECoderStatus status; + SRes res = SubblockDec_Decode((CSubblockDec *)pp, dest, destLen, src, srcLen, finishMode, &status); + srcWasFinished = srcWasFinished; + *wasFinished = (status == LZMA_STATUS_FINISHED_WITH_MARK); + return res; +} + +SRes SbState_SetFromMethod(IStateCoder *p, ISzAlloc *alloc) +{ + CSubblockDec *decoder; + p->p = 0; + decoder = alloc->Alloc(alloc, sizeof(CSubblockDec)); + if (decoder == 0) + return SZ_ERROR_MEM; + p->p = decoder; + p->Free = SbState_Free; + p->SetProps = SbState_SetProps; + p->Init = SbState_Init; + p->Code = SbState_Code; + SubblockDec_Construct(decoder); + return SZ_OK; +} +#endif + +/* ---------- Lzma2State ---------- */ + +static void Lzma2State_Free(void *pp, ISzAlloc *alloc) +{ + Lzma2Dec_Free((CLzma2Dec *)pp, alloc); + alloc->Free(alloc, pp); +} + +static SRes Lzma2State_SetProps(void *pp, const Byte *props, size_t propSize, ISzAlloc *alloc) +{ + if (propSize != 1) + return SZ_ERROR_UNSUPPORTED; + return Lzma2Dec_Allocate((CLzma2Dec *)pp, props[0], alloc); +} + +static void Lzma2State_Init(void *pp) +{ + Lzma2Dec_Init((CLzma2Dec *)pp); +} + +static SRes Lzma2State_Code(void *pp, Byte *dest, SizeT *destLen, const Byte *src, SizeT *srcLen, + int srcWasFinished, ECoderFinishMode finishMode, int *wasFinished) +{ + ELzmaStatus status; + /* ELzmaFinishMode fm = (finishMode == LZMA_FINISH_ANY) ? LZMA_FINISH_ANY : LZMA_FINISH_END; */ + SRes res = Lzma2Dec_DecodeToBuf((CLzma2Dec *)pp, dest, destLen, src, srcLen, finishMode, &status); + srcWasFinished = srcWasFinished; + *wasFinished = (status == LZMA_STATUS_FINISHED_WITH_MARK); + return res; +} + +static SRes Lzma2State_SetFromMethod(IStateCoder *p, ISzAlloc *alloc) +{ + CLzma2Dec *decoder = alloc->Alloc(alloc, sizeof(CLzma2Dec)); + p->p = decoder; + if (decoder == 0) + return SZ_ERROR_MEM; + p->Free = Lzma2State_Free; + p->SetProps = Lzma2State_SetProps; + p->Init = Lzma2State_Init; + p->Code = Lzma2State_Code; + Lzma2Dec_Construct(decoder); + return SZ_OK; +} + + +void MixCoder_Construct(CMixCoder *p, ISzAlloc *alloc) +{ + int i; + p->alloc = alloc; + p->buf = 0; + p->numCoders = 0; + for (i = 0; i < MIXCODER_NUM_FILTERS_MAX; i++) + p->coders[i].p = NULL; +} + +void MixCoder_Free(CMixCoder *p) +{ + int i; + for (i = 0; i < p->numCoders; i++) + { + IStateCoder *sc = &p->coders[i]; + if (p->alloc && sc->p) + sc->Free(sc->p, p->alloc); + } + p->numCoders = 0; + if (p->buf) + p->alloc->Free(p->alloc, p->buf); +} + +void MixCoder_Init(CMixCoder *p) +{ + int i; + for (i = 0; i < p->numCoders - 1; i++) + { + p->size[i] = 0; + p->pos[i] = 0; + p->finished[i] = 0; + } + for (i = 0; i < p->numCoders; i++) + { + IStateCoder *coder = &p->coders[i]; + coder->Init(coder->p); + } +} + +SRes MixCoder_SetFromMethod(CMixCoder *p, int coderIndex, UInt64 methodId) +{ + IStateCoder *sc = &p->coders[coderIndex]; + p->ids[coderIndex] = methodId; + switch(methodId) + { + case XZ_ID_LZMA2: return Lzma2State_SetFromMethod(sc, p->alloc); + #ifdef USE_SUBBLOCK + case XZ_ID_Subblock: return SbState_SetFromMethod(sc, p->alloc); + #endif + } + if (coderIndex == 0) + return SZ_ERROR_UNSUPPORTED; + return BraState_SetFromMethod(sc, methodId, p->alloc); +} + +SRes MixCoder_Code(CMixCoder *p, Byte *dest, SizeT *destLen, + const Byte *src, SizeT *srcLen, int srcWasFinished, + ECoderFinishMode finishMode, ECoderStatus *status) +{ + SizeT destLenOrig = *destLen; + SizeT srcLenOrig = *srcLen; + Bool allFinished = True; + *destLen = 0; + *srcLen = 0; + *status = CODER_STATUS_NOT_FINISHED; + + if (p->buf == 0) + { + p->buf = p->alloc->Alloc(p->alloc, CODER_BUF_SIZE * (MIXCODER_NUM_FILTERS_MAX - 1)); + if (p->buf == 0) + return SZ_ERROR_MEM; + } + + if (p->numCoders != 1) + finishMode = CODER_FINISH_ANY; + + for (;;) + { + Bool processed = False; + int i; + /* + if (p->numCoders == 1 && *destLen == destLenOrig && finishMode == LZMA_FINISH_ANY) + break; + */ + + for (i = 0; i < p->numCoders; i++) + { + SRes res; + IStateCoder *coder = &p->coders[i]; + Byte *destCur; + SizeT destLenCur, srcLenCur; + const Byte *srcCur; + int srcFinishedCur; + int encodingWasFinished; + + if (i == 0) + { + srcCur = src; + srcLenCur = srcLenOrig - *srcLen; + srcFinishedCur = srcWasFinished; + } + else + { + srcCur = p->buf + (CODER_BUF_SIZE * (i - 1)) + p->pos[i - 1]; + srcLenCur = p->size[i - 1] - p->pos[i - 1]; + srcFinishedCur = p->finished[i - 1]; + } + + if (i == p->numCoders - 1) + { + destCur = dest; + destLenCur = destLenOrig - *destLen; + } + else + { + if (p->pos[i] != p->size[i]) + continue; + destCur = p->buf + (CODER_BUF_SIZE * i); + destLenCur = CODER_BUF_SIZE; + } + + res = coder->Code(coder->p, destCur, &destLenCur, srcCur, &srcLenCur, srcFinishedCur, finishMode, &encodingWasFinished); + + if (!encodingWasFinished) + allFinished = False; + + if (i == 0) + { + *srcLen += srcLenCur; + src += srcLenCur; + } + else + { + p->pos[i - 1] += srcLenCur; + } + + if (i == p->numCoders - 1) + { + *destLen += destLenCur; + dest += destLenCur; + } + else + { + p->size[i] = destLenCur; + p->pos[i] = 0; + p->finished[i] = encodingWasFinished; + } + + if (res != SZ_OK) + return res; + + if (destLenCur != 0 || srcLenCur != 0) + processed = True; + } + if (!processed) + break; + } + if (allFinished) + *status = CODER_STATUS_FINISHED_WITH_MARK; + return SZ_OK; +} + +SRes Xz_ParseHeader(CXzStreamFlags *p, const Byte *buf) +{ + *p = (CXzStreamFlags)GetBe16(buf + XZ_SIG_SIZE); + if (CrcCalc(buf + XZ_SIG_SIZE, XZ_STREAM_FLAGS_SIZE) != + GetUi32(buf + XZ_SIG_SIZE + XZ_STREAM_FLAGS_SIZE)) + return SZ_ERROR_NO_ARCHIVE; + return XzFlags_IsSupported(*p) ? SZ_OK : SZ_ERROR_UNSUPPORTED; +} + +static Bool Xz_CheckFooter(CXzStreamFlags flags, UInt64 indexSize, const Byte *buf) +{ + return + indexSize == (((UInt64)GetUi32(buf + 4) + 1) << 2) && + (GetUi32(buf) == CrcCalc(buf + 4, 6) && + flags == GetBe16(buf + 8) && + memcmp(buf + 10, XZ_FOOTER_SIG, XZ_FOOTER_SIG_SIZE) == 0); +} + +#define READ_VARINT_AND_CHECK(buf, pos, size, res) \ + { unsigned s = Xz_ReadVarInt(buf + pos, size - pos, res); \ + if (s == 0) return SZ_ERROR_ARCHIVE; pos += s; } + + +SRes XzBlock_Parse(CXzBlock *p, const Byte *header) +{ + unsigned pos; + int numFilters, i; + UInt32 headerSize = (UInt32)header[0] << 2; + + if (CrcCalc(header, headerSize) != GetUi32(header + headerSize)) + return SZ_ERROR_ARCHIVE; + + pos = 1; + if (pos == headerSize) + return SZ_ERROR_ARCHIVE; + p->flags = header[pos++]; + + if (XzBlock_HasPackSize(p)) + { + READ_VARINT_AND_CHECK(header, pos, headerSize, &p->packSize); + if (p->packSize == 0 || p->packSize + headerSize >= (UInt64)1 << 63) + return SZ_ERROR_ARCHIVE; + } + + if (XzBlock_HasUnpackSize(p)) + READ_VARINT_AND_CHECK(header, pos, headerSize, &p->unpackSize); + + numFilters = XzBlock_GetNumFilters(p); + for (i = 0; i < numFilters; i++) + { + CXzFilter *filter = p->filters + i; + UInt64 size; + READ_VARINT_AND_CHECK(header, pos, headerSize, &filter->id); + READ_VARINT_AND_CHECK(header, pos, headerSize, &size); + if (size > headerSize - pos || size > XZ_FILTER_PROPS_SIZE_MAX) + return SZ_ERROR_ARCHIVE; + filter->propsSize = (UInt32)size; + memcpy(filter->props, header + pos, (size_t)size); + pos += (unsigned)size; + + #ifdef XZ_DUMP + printf("\nf[%d] = %2X: ", i, filter->id); + { + int i; + for (i = 0; i < size; i++) + printf(" %2X", filter->props[i]); + } + #endif + } + + while (pos < headerSize) + if (header[pos++] != 0) + return SZ_ERROR_ARCHIVE; + return SZ_OK; +} + +SRes XzDec_Init(CMixCoder *p, const CXzBlock *block) +{ + int i; + Bool needReInit = True; + int numFilters = XzBlock_GetNumFilters(block); + if (numFilters == p->numCoders) + { + for (i = 0; i < numFilters; i++) + if (p->ids[i] != block->filters[numFilters - 1 - i].id) + break; + needReInit = (i != numFilters); + } + if (needReInit) + { + MixCoder_Free(p); + p->numCoders = numFilters; + for (i = 0; i < numFilters; i++) + { + const CXzFilter *f = &block->filters[numFilters - 1 - i]; + RINOK(MixCoder_SetFromMethod(p, i, f->id)); + } + } + for (i = 0; i < numFilters; i++) + { + const CXzFilter *f = &block->filters[numFilters - 1 - i]; + IStateCoder *sc = &p->coders[i]; + RINOK(sc->SetProps(sc->p, f->props, f->propsSize, p->alloc)); + } + MixCoder_Init(p); + return SZ_OK; +} + +SRes XzUnpacker_Create(CXzUnpacker *p, ISzAlloc *alloc) +{ + MixCoder_Construct(&p->decoder, alloc); + p->state = XZ_STATE_STREAM_HEADER; + p->pos = 0; + p->numStreams = 0; + return SZ_OK; +} + +void XzUnpacker_Free(CXzUnpacker *p) +{ + MixCoder_Free(&p->decoder); +} + +SRes XzUnpacker_Code(CXzUnpacker *p, Byte *dest, SizeT *destLen, + const Byte *src, SizeT *srcLen, int finishMode, ECoderStatus *status) +{ + SizeT destLenOrig = *destLen; + SizeT srcLenOrig = *srcLen; + *destLen = 0; + *srcLen = 0; + *status = CODER_STATUS_NOT_SPECIFIED; + for (;;) + { + SizeT srcRem = srcLenOrig - *srcLen; + + if (p->state == XZ_STATE_BLOCK) + { + SizeT destLen2 = destLenOrig - *destLen; + SizeT srcLen2 = srcLenOrig - *srcLen; + SRes res; + if (srcLen2 == 0 && destLen2 == 0) + { + *status = CODER_STATUS_NOT_FINISHED; + return SZ_OK; + } + + res = MixCoder_Code(&p->decoder, dest, &destLen2, src, &srcLen2, False, finishMode, status); + XzCheck_Update(&p->check, dest, destLen2); + + (*srcLen) += srcLen2; + src += srcLen2; + p->packSize += srcLen2; + + (*destLen) += destLen2; + dest += destLen2; + p->unpackSize += destLen2; + + RINOK(res); + + if (*status == CODER_STATUS_FINISHED_WITH_MARK) + { + Byte temp[32]; + unsigned num = Xz_WriteVarInt(temp, p->packSize + p->blockHeaderSize + XzFlags_GetCheckSize(p->streamFlags)); + num += Xz_WriteVarInt(temp + num, p->unpackSize); + Sha256_Update(&p->sha, temp, num); + p->indexSize += num; + p->numBlocks++; + + p->state = XZ_STATE_BLOCK_FOOTER; + p->pos = 0; + p->alignPos = 0; + } + else if (srcLen2 == 0 && destLen2 == 0) + return SZ_OK; + + continue; + } + + if (srcRem == 0) + { + *status = CODER_STATUS_NEEDS_MORE_INPUT; + return SZ_OK; + } + + switch(p->state) + { + case XZ_STATE_STREAM_HEADER: + { + if (p->pos < XZ_STREAM_HEADER_SIZE) + { + if (p->pos < XZ_SIG_SIZE && *src != XZ_SIG[p->pos]) + return SZ_ERROR_NO_ARCHIVE; + p->buf[p->pos++] = *src++; + (*srcLen)++; + } + else + { + RINOK(Xz_ParseHeader(&p->streamFlags, p->buf)); + p->state = XZ_STATE_BLOCK_HEADER; + Sha256_Init(&p->sha); + p->indexSize = 0; + p->numBlocks = 0; + p->pos = 0; + } + break; + } + + case XZ_STATE_BLOCK_HEADER: + { + if (p->pos == 0) + { + p->buf[p->pos++] = *src++; + (*srcLen)++; + if (p->buf[0] == 0) + { + p->indexPreSize = 1 + Xz_WriteVarInt(p->buf + 1, p->numBlocks); + p->indexPos = p->indexPreSize; + p->indexSize += p->indexPreSize; + Sha256_Final(&p->sha, p->shaDigest); + Sha256_Init(&p->sha); + p->crc = CrcUpdate(CRC_INIT_VAL, p->buf, p->indexPreSize); + p->state = XZ_STATE_STREAM_INDEX; + } + p->blockHeaderSize = ((UInt32)p->buf[0] << 2) + 4; + } + else if (p->pos != p->blockHeaderSize) + { + UInt32 cur = p->blockHeaderSize - p->pos; + if (cur > srcRem) + cur = (UInt32)srcRem; + memcpy(p->buf + p->pos, src, cur); + p->pos += cur; + (*srcLen) += cur; + src += cur; + } + else + { + RINOK(XzBlock_Parse(&p->block, p->buf)); + p->state = XZ_STATE_BLOCK; + p->packSize = 0; + p->unpackSize = 0; + XzCheck_Init(&p->check, XzFlags_GetCheckType(p->streamFlags)); + RINOK(XzDec_Init(&p->decoder, &p->block)); + } + break; + } + + case XZ_STATE_BLOCK_FOOTER: + { + if (((p->packSize + p->alignPos) & 3) != 0) + { + (*srcLen)++; + p->alignPos++; + if (*src++ != 0) + return SZ_ERROR_CRC; + } + else + { + UInt32 checkSize = XzFlags_GetCheckSize(p->streamFlags); + UInt32 cur = checkSize - p->pos; + if (cur != 0) + { + if (cur > srcRem) + cur = (UInt32)srcRem; + memcpy(p->buf + p->pos, src, cur); + p->pos += cur; + (*srcLen) += cur; + src += cur; + } + else + { + Byte digest[XZ_CHECK_SIZE_MAX]; + p->state = XZ_STATE_BLOCK_HEADER; + p->pos = 0; + if (XzCheck_Final(&p->check, digest) && memcmp(digest, p->buf, checkSize) != 0) + return SZ_ERROR_CRC; + } + } + break; + } + + case XZ_STATE_STREAM_INDEX: + { + if (p->pos < p->indexPreSize) + { + (*srcLen)++; + if (*src++ != p->buf[p->pos++]) + return SZ_ERROR_CRC; + } + else + { + if (p->indexPos < p->indexSize) + { + UInt64 cur = p->indexSize - p->indexPos; + if (srcRem > cur) + srcRem = (SizeT)cur; + p->crc = CrcUpdate(p->crc, src, srcRem); + Sha256_Update(&p->sha, src, srcRem); + (*srcLen) += srcRem; + src += srcRem; + p->indexPos += srcRem; + } + else if ((p->indexPos & 3) != 0) + { + Byte b = *src++; + p->crc = CRC_UPDATE_BYTE(p->crc, b); + (*srcLen)++; + p->indexPos++; + p->indexSize++; + if (b != 0) + return SZ_ERROR_CRC; + } + else + { + Byte digest[SHA256_DIGEST_SIZE]; + p->state = XZ_STATE_STREAM_INDEX_CRC; + p->indexSize += 4; + p->pos = 0; + Sha256_Final(&p->sha, digest); + if (memcmp(digest, p->shaDigest, SHA256_DIGEST_SIZE) != 0) + return SZ_ERROR_CRC; + } + } + break; + } + + case XZ_STATE_STREAM_INDEX_CRC: + { + if (p->pos < 4) + { + (*srcLen)++; + p->buf[p->pos++] = *src++; + } + else + { + p->state = XZ_STATE_STREAM_FOOTER; + p->pos = 0; + if (CRC_GET_DIGEST(p->crc) != GetUi32(p->buf)) + return SZ_ERROR_CRC; + } + break; + } + + case XZ_STATE_STREAM_FOOTER: + { + UInt32 cur = XZ_STREAM_FOOTER_SIZE - p->pos; + if (cur > srcRem) + cur = (UInt32)srcRem; + memcpy(p->buf + p->pos, src, cur); + p->pos += cur; + (*srcLen) += cur; + src += cur; + if (p->pos == XZ_STREAM_FOOTER_SIZE) + { + p->state = XZ_STATE_STREAM_PADDING; + p->numStreams++; + p->padSize = 0; + if (!Xz_CheckFooter(p->streamFlags, p->indexSize, p->buf)) + return SZ_ERROR_CRC; + } + break; + } + + case XZ_STATE_STREAM_PADDING: + { + if (*src != 0) + { + if (((UInt32)p->padSize & 3) != 0) + return SZ_ERROR_NO_ARCHIVE; + p->pos = 0; + p->state = XZ_STATE_STREAM_HEADER; + } + else + { + (*srcLen)++; + src++; + p->padSize++; + } + break; + } + + case XZ_STATE_BLOCK: break; /* to disable GCC warning */ + } + } + /* + if (p->state == XZ_STATE_FINISHED) + *status = CODER_STATUS_FINISHED_WITH_MARK; + return SZ_OK; + */ +} + +Bool XzUnpacker_IsStreamWasFinished(CXzUnpacker *p) +{ + return (p->state == XZ_STATE_STREAM_PADDING) && (((UInt32)p->padSize & 3) == 0); +} diff --git a/C/XzEnc.c b/C/XzEnc.c new file mode 100644 index 0000000..721b4e7 --- /dev/null +++ b/C/XzEnc.c @@ -0,0 +1,497 @@ +/* XzEnc.c -- Xz Encode +2009-06-04 : Igor Pavlov : Public domain */ + +#include +#include + +#include "7zCrc.h" +#include "Alloc.h" +#include "Bra.h" +#include "CpuArch.h" +#ifdef USE_SUBBLOCK +#include "SbEnc.h" +#endif + +#include "XzEnc.h" + +static void *SzBigAlloc(void *p, size_t size) { p = p; return BigAlloc(size); } +static void SzBigFree(void *p, void *address) { p = p; BigFree(address); } +static ISzAlloc g_BigAlloc = { SzBigAlloc, SzBigFree }; + +static void *SzAlloc(void *p, size_t size) { p = p; return MyAlloc(size); } +static void SzFree(void *p, void *address) { p = p; MyFree(address); } +static ISzAlloc g_Alloc = { SzAlloc, SzFree }; + +#define XzBlock_ClearFlags(p) (p)->flags = 0; +#define XzBlock_SetNumFilters(p, n) (p)->flags |= ((n) - 1); +#define XzBlock_SetHasPackSize(p) (p)->flags |= XZ_BF_PACK_SIZE; +#define XzBlock_SetHasUnpackSize(p) (p)->flags |= XZ_BF_UNPACK_SIZE; + +static SRes WriteBytes(ISeqOutStream *s, const void *buf, UInt32 size) +{ + return (s->Write(s, buf, size) == size) ? SZ_OK : SZ_ERROR_WRITE; +} + +static SRes WriteBytesAndCrc(ISeqOutStream *s, const void *buf, UInt32 size, UInt32 *crc) +{ + *crc = CrcUpdate(*crc, buf, size); + return WriteBytes(s, buf, size); +} + +SRes Xz_WriteHeader(CXzStreamFlags f, ISeqOutStream *s) +{ + UInt32 crc; + Byte header[XZ_STREAM_HEADER_SIZE]; + memcpy(header, XZ_SIG, XZ_SIG_SIZE); + header[XZ_SIG_SIZE] = (Byte)(f >> 8); + header[XZ_SIG_SIZE + 1] = (Byte)(f & 0xFF); + crc = CrcCalc(header + XZ_SIG_SIZE, XZ_STREAM_FLAGS_SIZE); + SetUi32(header + XZ_SIG_SIZE + XZ_STREAM_FLAGS_SIZE, crc); + return WriteBytes(s, header, XZ_STREAM_HEADER_SIZE); +} + +SRes XzBlock_WriteHeader(const CXzBlock *p, ISeqOutStream *s) +{ + Byte header[XZ_BLOCK_HEADER_SIZE_MAX]; + + unsigned pos = 1; + int numFilters, i; + header[pos++] = p->flags; + + if (XzBlock_HasPackSize(p)) pos += Xz_WriteVarInt(header + pos, p->packSize); + if (XzBlock_HasUnpackSize(p)) pos += Xz_WriteVarInt(header + pos, p->unpackSize); + numFilters = XzBlock_GetNumFilters(p); + for (i = 0; i < numFilters; i++) + { + const CXzFilter *f = &p->filters[i]; + pos += Xz_WriteVarInt(header + pos, f->id); + pos += Xz_WriteVarInt(header + pos, f->propsSize); + memcpy(header + pos, f->props, f->propsSize); + pos += f->propsSize; + } + while((pos & 3) != 0) + header[pos++] = 0; + header[0] = (Byte)(pos >> 2); + SetUi32(header + pos, CrcCalc(header, pos)); + return WriteBytes(s, header, pos + 4); +} + +SRes Xz_WriteFooter(CXzStream *p, ISeqOutStream *s) +{ + Byte buf[32]; + UInt64 globalPos; + { + UInt32 crc = CRC_INIT_VAL; + unsigned pos = 1 + Xz_WriteVarInt(buf + 1, p->numBlocks); + size_t i; + + globalPos = pos; + buf[0] = 0; + RINOK(WriteBytesAndCrc(s, buf, pos, &crc)); + for (i = 0; i < p->numBlocks; i++) + { + const CXzBlockSizes *block = &p->blocks[i]; + pos = Xz_WriteVarInt(buf, block->totalSize); + pos += Xz_WriteVarInt(buf + pos, block->unpackSize); + globalPos += pos; + RINOK(WriteBytesAndCrc(s, buf, pos, &crc)); + } + pos = ((unsigned)globalPos & 3); + if (pos != 0) + { + buf[0] = buf[1] = buf[2] = 0; + RINOK(WriteBytesAndCrc(s, buf, 4 - pos, &crc)); + globalPos += 4 - pos; + } + { + SetUi32(buf, CRC_GET_DIGEST(crc)); + RINOK(WriteBytes(s, buf, 4)); + globalPos += 4; + } + } + + { + UInt32 indexSize = (UInt32)((globalPos >> 2) - 1); + SetUi32(buf + 4, indexSize); + buf[8] = (Byte)(p->flags >> 8); + buf[9] = (Byte)(p->flags & 0xFF); + SetUi32(buf, CrcCalc(buf + 4, 6)); + memcpy(buf + 10, XZ_FOOTER_SIG, XZ_FOOTER_SIG_SIZE); + return WriteBytes(s, buf, 12); + } +} + +SRes Xz_AddIndexRecord(CXzStream *p, UInt64 unpackSize, UInt64 totalSize, ISzAlloc *alloc) +{ + if (p->blocks == 0 || p->numBlocksAllocated == p->numBlocks) + { + size_t num = (p->numBlocks + 1) * 2; + size_t newSize = sizeof(CXzBlockSizes) * num; + CXzBlockSizes *blocks; + if (newSize / sizeof(CXzBlockSizes) != num) + return SZ_ERROR_MEM; + blocks = alloc->Alloc(alloc, newSize); + if (blocks == 0) + return SZ_ERROR_MEM; + if (p->numBlocks != 0) + { + memcpy(blocks, p->blocks, p->numBlocks * sizeof(CXzBlockSizes)); + Xz_Free(p, alloc); + } + p->blocks = blocks; + p->numBlocksAllocated = num; + } + { + CXzBlockSizes *block = &p->blocks[p->numBlocks++]; + block->totalSize = totalSize; + block->unpackSize = unpackSize; + } + return SZ_OK; +} + +/* ---------- CSeqCheckInStream ---------- */ + +typedef struct +{ + ISeqInStream p; + ISeqInStream *realStream; + UInt64 processed; + CXzCheck check; +} CSeqCheckInStream; + +void SeqCheckInStream_Init(CSeqCheckInStream *p, int mode) +{ + p->processed = 0; + XzCheck_Init(&p->check, mode); +} + +void SeqCheckInStream_GetDigest(CSeqCheckInStream *p, Byte *digest) +{ + XzCheck_Final(&p->check, digest); +} + +static SRes SeqCheckInStream_Read(void *pp, void *data, size_t *size) +{ + CSeqCheckInStream *p = (CSeqCheckInStream *)pp; + SRes res = p->realStream->Read(p->realStream, data, size); + XzCheck_Update(&p->check, data, *size); + p->processed += *size; + return res; +} + +/* ---------- CSeqSizeOutStream ---------- */ + +typedef struct +{ + ISeqOutStream p; + ISeqOutStream *realStream; + UInt64 processed; +} CSeqSizeOutStream; + +static size_t MyWrite(void *pp, const void *data, size_t size) +{ + CSeqSizeOutStream *p = (CSeqSizeOutStream *)pp; + size = p->realStream->Write(p->realStream, data, size); + p->processed += size; + return size; +} + +/* ---------- CSeqInFilter ---------- */ + +/* +typedef struct _IFilter +{ + void *p; + void (*Free)(void *p, ISzAlloc *alloc); + SRes (*SetProps)(void *p, const Byte *props, size_t propSize, ISzAlloc *alloc); + void (*Init)(void *p); + size_t (*Filter)(void *p, Byte *data, SizeT destLen); +} IFilter; + +#define FILT_BUF_SIZE (1 << 19) + +typedef struct +{ + ISeqInStream p; + ISeqInStream *realStream; + UInt32 x86State; + UInt32 ip; + UInt64 processed; + CXzCheck check; + Byte buf[FILT_BUF_SIZE]; + UInt32 bufferPos; + UInt32 convertedPosBegin; + UInt32 convertedPosEnd; + IFilter *filter; +} CSeqInFilter; + +static SRes SeqInFilter_Read(void *pp, void *data, size_t *size) +{ + CSeqInFilter *p = (CSeqInFilter *)pp; + size_t remSize = *size; + *size = 0; + + while (remSize > 0) + { + int i; + if (p->convertedPosBegin != p->convertedPosEnd) + { + UInt32 sizeTemp = p->convertedPosEnd - p->convertedPosBegin; + if (remSize < sizeTemp) + sizeTemp = (UInt32)remSize; + memmove(data, p->buf + p->convertedPosBegin, sizeTemp); + p->convertedPosBegin += sizeTemp; + data = (void *)((Byte *)data + sizeTemp); + remSize -= sizeTemp; + *size += sizeTemp; + break; + } + for (i = 0; p->convertedPosEnd + i < p->bufferPos; i++) + p->buf[i] = p->buf[i + p->convertedPosEnd]; + p->bufferPos = i; + p->convertedPosBegin = p->convertedPosEnd = 0; + { + size_t processedSizeTemp = FILT_BUF_SIZE - p->bufferPos; + RINOK(p->realStream->Read(p->realStream, p->buf + p->bufferPos, &processedSizeTemp)); + p->bufferPos = p->bufferPos + (UInt32)processedSizeTemp; + } + p->convertedPosEnd = (UInt32)p->filter->Filter(p->filter->p, p->buf, p->bufferPos); + if (p->convertedPosEnd == 0) + { + if (p->bufferPos == 0) + break; + else + { + p->convertedPosEnd = p->bufferPos; + continue; + } + } + if (p->convertedPosEnd > p->bufferPos) + { + for (; p->bufferPos < p->convertedPosEnd; p->bufferPos++) + p->buf[p->bufferPos] = 0; + p->convertedPosEnd = (UInt32)p->filter->Filter(p->filter->p, p->buf, p->bufferPos); + } + } + return SZ_OK; +} +*/ + +/* +typedef struct +{ + ISeqInStream p; + ISeqInStream *realStream; + CMixCoder mixCoder; + Byte buf[FILT_BUF_SIZE]; + UInt32 bufPos; + UInt32 bufSize; +} CMixCoderSeqInStream; + +static SRes CMixCoderSeqInStream_Read(void *pp, void *data, size_t *size) +{ + CMixCoderSeqInStream *p = (CMixCoderSeqInStream *)pp; + SRes res = SZ_OK; + size_t remSize = *size; + *size = 0; + while (remSize > 0) + { + if (p->bufPos == p->bufSize) + { + size_t curSize; + p->bufPos = p->bufSize = 0; + if (*size != 0) + break; + curSize = FILT_BUF_SIZE; + RINOK(p->realStream->Read(p->realStream, p->buf, &curSize)); + p->bufSize = (UInt32)curSize; + } + { + SizeT destLen = remSize; + SizeT srcLen = p->bufSize - p->bufPos; + res = MixCoder_Code(&p->mixCoder, data, &destLen, p->buf + p->bufPos, &srcLen, 0); + data = (void *)((Byte *)data + destLen); + remSize -= destLen; + *size += destLen; + p->bufPos += srcLen; + } + } + return res; +} +*/ + +#ifdef USE_SUBBLOCK +typedef struct +{ + ISeqInStream p; + CSubblockEnc sb; + UInt64 processed; +} CSbEncInStream; + +void SbEncInStream_Init(CSbEncInStream *p) +{ + p->processed = 0; + SubblockEnc_Init(&p->sb); +} + +static SRes SbEncInStream_Read(void *pp, void *data, size_t *size) +{ + CSbEncInStream *p = (CSbEncInStream *)pp; + SRes res = SubblockEnc_Read(&p->sb, data, size); + p->processed += *size; + return res; +} +#endif + +typedef struct +{ + /* CMixCoderSeqInStream inStream; */ + CLzma2EncHandle lzma2; + #ifdef USE_SUBBLOCK + CSbEncInStream sb; + #endif + ISzAlloc *alloc; + ISzAlloc *bigAlloc; +} CLzma2WithFilters; + + +static void Lzma2WithFilters_Construct(CLzma2WithFilters *p, ISzAlloc *alloc, ISzAlloc *bigAlloc) +{ + p->alloc = alloc; + p->bigAlloc = bigAlloc; + p->lzma2 = NULL; + #ifdef USE_SUBBLOCK + p->sb.p.Read = SbEncInStream_Read; + SubblockEnc_Construct(&p->sb.sb, p->alloc); + #endif +} + +static SRes Lzma2WithFilters_Create(CLzma2WithFilters *p) +{ + p->lzma2 = Lzma2Enc_Create(p->alloc, p->bigAlloc); + if (p->lzma2 == 0) + return SZ_ERROR_MEM; + return SZ_OK; +} + +static void Lzma2WithFilters_Free(CLzma2WithFilters *p) +{ + #ifdef USE_SUBBLOCK + SubblockEnc_Free(&p->sb.sb); + #endif + if (p->lzma2) + { + Lzma2Enc_Destroy(p->lzma2); + p->lzma2 = NULL; + } +} + +static SRes Xz_Compress(CXzStream *xz, + CLzma2WithFilters *lzmaf, + ISeqOutStream *outStream, + ISeqInStream *inStream, + const CLzma2EncProps *lzma2Props, + Bool useSubblock, + ICompressProgress *progress) +{ + xz->flags = XZ_CHECK_CRC32; + + RINOK(Lzma2Enc_SetProps(lzmaf->lzma2, lzma2Props)); + RINOK(Xz_WriteHeader(xz->flags, outStream)); + + { + CSeqCheckInStream checkInStream; + CSeqSizeOutStream seqSizeOutStream; + CXzBlock block; + int filterIndex = 0; + + XzBlock_ClearFlags(&block); + XzBlock_SetNumFilters(&block, 1 + (useSubblock ? 1 : 0)); + + if (useSubblock) + { + CXzFilter *f = &block.filters[filterIndex++]; + f->id = XZ_ID_Subblock; + f->propsSize = 0; + } + + { + CXzFilter *f = &block.filters[filterIndex++]; + f->id = XZ_ID_LZMA2; + f->propsSize = 1; + f->props[0] = Lzma2Enc_WriteProperties(lzmaf->lzma2); + } + + seqSizeOutStream.p.Write = MyWrite; + seqSizeOutStream.realStream = outStream; + seqSizeOutStream.processed = 0; + + RINOK(XzBlock_WriteHeader(&block, &seqSizeOutStream.p)); + + checkInStream.p.Read = SeqCheckInStream_Read; + checkInStream.realStream = inStream; + SeqCheckInStream_Init(&checkInStream, XzFlags_GetCheckType(xz->flags)); + + #ifdef USE_SUBBLOCK + if (useSubblock) + { + lzmaf->sb.sb.inStream = &checkInStream.p; + SubblockEnc_Init(&lzmaf->sb.sb); + } + #endif + + { + UInt64 packPos = seqSizeOutStream.processed; + SRes res = Lzma2Enc_Encode(lzmaf->lzma2, &seqSizeOutStream.p, + #ifdef USE_SUBBLOCK + useSubblock ? &lzmaf->sb.p: + #endif + &checkInStream.p, + progress); + RINOK(res); + block.unpackSize = checkInStream.processed; + block.packSize = seqSizeOutStream.processed - packPos; + } + + { + unsigned padSize = 0; + Byte buf[128]; + while((((unsigned)block.packSize + padSize) & 3) != 0) + buf[padSize++] = 0; + SeqCheckInStream_GetDigest(&checkInStream, buf + padSize); + RINOK(WriteBytes(&seqSizeOutStream.p, buf, padSize + XzFlags_GetCheckSize(xz->flags))); + RINOK(Xz_AddIndexRecord(xz, block.unpackSize, seqSizeOutStream.processed - padSize, &g_Alloc)); + } + } + return Xz_WriteFooter(xz, outStream); +} + +SRes Xz_Encode(ISeqOutStream *outStream, ISeqInStream *inStream, + const CLzma2EncProps *lzma2Props, Bool useSubblock, + ICompressProgress *progress) +{ + SRes res; + CXzStream xz; + CLzma2WithFilters lzmaf; + Xz_Construct(&xz); + Lzma2WithFilters_Construct(&lzmaf, &g_Alloc, &g_BigAlloc); + res = Lzma2WithFilters_Create(&lzmaf); + if (res == SZ_OK) + res = Xz_Compress(&xz, &lzmaf, outStream, inStream, + lzma2Props, useSubblock, progress); + Lzma2WithFilters_Free(&lzmaf); + Xz_Free(&xz, &g_Alloc); + return res; +} + +SRes Xz_EncodeEmpty(ISeqOutStream *outStream) +{ + SRes res; + CXzStream xz; + Xz_Construct(&xz); + res = Xz_WriteHeader(xz.flags, outStream); + if (res == SZ_OK) + res = Xz_WriteFooter(&xz, outStream); + Xz_Free(&xz, &g_Alloc); + return res; +} diff --git a/C/XzEnc.h b/C/XzEnc.h new file mode 100644 index 0000000..13390df --- /dev/null +++ b/C/XzEnc.h @@ -0,0 +1,25 @@ +/* XzEnc.h -- Xz Encode +2009-04-15 : Igor Pavlov : Public domain */ + +#ifndef __XZ_ENC_H +#define __XZ_ENC_H + +#include "Lzma2Enc.h" + +#include "Xz.h" + +#ifdef __cplusplus +extern "C" { +#endif + +SRes Xz_Encode(ISeqOutStream *outStream, ISeqInStream *inStream, + const CLzma2EncProps *lzma2Props, Bool useSubblock, + ICompressProgress *progress); + +SRes Xz_EncodeEmpty(ISeqOutStream *outStream); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/C/XzIn.c b/C/XzIn.c new file mode 100644 index 0000000..f8ea863 --- /dev/null +++ b/C/XzIn.c @@ -0,0 +1,306 @@ +/* XzIn.c - Xz input +2009-06-19 : Igor Pavlov : Public domain */ + +#include + +#include "7zCrc.h" +#include "CpuArch.h" +#include "Xz.h" + +SRes Xz_ReadHeader(CXzStreamFlags *p, ISeqInStream *inStream) +{ + Byte sig[XZ_STREAM_HEADER_SIZE]; + RINOK(SeqInStream_Read2(inStream, sig, XZ_STREAM_HEADER_SIZE, SZ_ERROR_NO_ARCHIVE)); + if (memcmp(sig, XZ_SIG, XZ_SIG_SIZE) != 0) + return SZ_ERROR_NO_ARCHIVE; + return Xz_ParseHeader(p, sig); +} + +#define READ_VARINT_AND_CHECK(buf, pos, size, res) \ + { unsigned s = Xz_ReadVarInt(buf + pos, size - pos, res); \ + if (s == 0) return SZ_ERROR_ARCHIVE; pos += s; } + +SRes XzBlock_ReadHeader(CXzBlock *p, ISeqInStream *inStream, Bool *isIndex, UInt32 *headerSizeRes) +{ + Byte header[XZ_BLOCK_HEADER_SIZE_MAX]; + unsigned headerSize; + *headerSizeRes = 0; + RINOK(SeqInStream_ReadByte(inStream, &header[0])); + headerSize = ((unsigned)header[0] << 2) + 4; + if (headerSize == 0) + { + *headerSizeRes = 1; + *isIndex = True; + return SZ_OK; + } + + *isIndex = False; + *headerSizeRes = headerSize; + RINOK(SeqInStream_Read(inStream, header + 1, headerSize - 1)); + return XzBlock_Parse(p, header); +} + +#define ADD_SIZE_CHECH(size, val) \ + { UInt64 newSize = size + (val); if (newSize < size) return XZ_SIZE_OVERFLOW; size = newSize; } + +UInt64 Xz_GetUnpackSize(const CXzStream *p) +{ + UInt64 size = 0; + size_t i; + for (i = 0; i < p->numBlocks; i++) + ADD_SIZE_CHECH(size, p->blocks[i].unpackSize); + return size; +} + +UInt64 Xz_GetPackSize(const CXzStream *p) +{ + UInt64 size = 0; + size_t i; + for (i = 0; i < p->numBlocks; i++) + ADD_SIZE_CHECH(size, (p->blocks[i].totalSize + 3) & ~(UInt64)3); + return size; +} + +/* +SRes XzBlock_ReadFooter(CXzBlock *p, CXzStreamFlags f, ISeqInStream *inStream) +{ + return SeqInStream_Read(inStream, p->check, XzFlags_GetCheckSize(f)); +} +*/ + +static SRes Xz_ReadIndex2(CXzStream *p, const Byte *buf, size_t size, ISzAlloc *alloc) +{ + size_t i, numBlocks, crcStartPos, pos = 1; + UInt32 crc; + + if (size < 5 || buf[0] != 0) + return SZ_ERROR_ARCHIVE; + + size -= 4; + crc = CrcCalc(buf, size); + if (crc != GetUi32(buf + size)) + return SZ_ERROR_ARCHIVE; + + { + UInt64 numBlocks64; + READ_VARINT_AND_CHECK(buf, pos, size, &numBlocks64); + numBlocks = (size_t)numBlocks64; + if (numBlocks != numBlocks64 || numBlocks * 2 > size) + return SZ_ERROR_ARCHIVE; + } + + crcStartPos = pos; + Xz_Free(p, alloc); + if (numBlocks != 0) + { + p->numBlocks = numBlocks; + p->numBlocksAllocated = numBlocks; + p->blocks = alloc->Alloc(alloc, sizeof(CXzBlockSizes) * numBlocks); + if (p->blocks == 0) + return SZ_ERROR_MEM; + for (i = 0; i < numBlocks; i++) + { + CXzBlockSizes *block = &p->blocks[i]; + READ_VARINT_AND_CHECK(buf, pos, size, &block->totalSize); + READ_VARINT_AND_CHECK(buf, pos, size, &block->unpackSize); + if (block->totalSize == 0) + return SZ_ERROR_ARCHIVE; + } + } + while ((pos & 3) != 0) + if (buf[pos++] != 0) + return SZ_ERROR_ARCHIVE; + return (pos == size) ? SZ_OK : SZ_ERROR_ARCHIVE; +} + +static SRes Xz_ReadIndex(CXzStream *p, ILookInStream *stream, UInt64 indexSize, ISzAlloc *alloc) +{ + SRes res; + size_t size; + Byte *buf; + if (indexSize > ((UInt32)1 << 31)) + return SZ_ERROR_UNSUPPORTED; + size = (size_t)indexSize; + if (size != indexSize) + return SZ_ERROR_UNSUPPORTED; + buf = alloc->Alloc(alloc, size); + if (buf == 0) + return SZ_ERROR_MEM; + res = LookInStream_Read2(stream, buf, size, SZ_ERROR_UNSUPPORTED); + if (res == SZ_OK) + res = Xz_ReadIndex2(p, buf, size, alloc); + alloc->Free(alloc, buf); + return res; +} + +static SRes SeekFromCur(ILookInStream *inStream, Int64 *res) +{ + return inStream->Seek(inStream, res, SZ_SEEK_CUR); +} + +static SRes Xz_ReadBackward(CXzStream *p, ILookInStream *stream, Int64 *startOffset, ISzAlloc *alloc) +{ + UInt64 indexSize; + Byte buf[XZ_STREAM_FOOTER_SIZE]; + + if ((*startOffset & 3) != 0 || *startOffset < XZ_STREAM_FOOTER_SIZE) + return SZ_ERROR_NO_ARCHIVE; + *startOffset = -XZ_STREAM_FOOTER_SIZE; + RINOK(SeekFromCur(stream, startOffset)); + + RINOK(LookInStream_Read2(stream, buf, XZ_STREAM_FOOTER_SIZE, SZ_ERROR_NO_ARCHIVE)); + + if (memcmp(buf + 10, XZ_FOOTER_SIG, XZ_FOOTER_SIG_SIZE) != 0) + { + Int64 i = 0; + *startOffset += XZ_STREAM_FOOTER_SIZE; + for (;;) + { + int j; + size_t processedSize; + #define TEMP_BUF_SIZE (1 << 10) + Byte tempBuf[TEMP_BUF_SIZE]; + if (*startOffset < XZ_STREAM_FOOTER_SIZE || i > (1 << 16)) + return SZ_ERROR_NO_ARCHIVE; + processedSize = (*startOffset > TEMP_BUF_SIZE) ? TEMP_BUF_SIZE : (size_t)*startOffset; + i += processedSize; + *startOffset = -(Int64)processedSize; + RINOK(SeekFromCur(stream, startOffset)); + RINOK(LookInStream_Read2(stream, tempBuf, processedSize, SZ_ERROR_NO_ARCHIVE)); + for (j = (int)processedSize; j >= 1; j--) // FIXED j >= 0 => j >= 1 + if (tempBuf[j -1] != 0) + break; + if (j != 0) + { + if ((j & 3) != 0) + return SZ_ERROR_NO_ARCHIVE; + *startOffset += j; + if (*startOffset < XZ_STREAM_FOOTER_SIZE) + return SZ_ERROR_NO_ARCHIVE; + *startOffset -= XZ_STREAM_FOOTER_SIZE; + RINOK(stream->Seek(stream, startOffset, SZ_SEEK_SET)); + RINOK(LookInStream_Read2(stream, buf, XZ_STREAM_FOOTER_SIZE, SZ_ERROR_NO_ARCHIVE)); + if (memcmp(buf + 10, XZ_FOOTER_SIG, XZ_FOOTER_SIG_SIZE) != 0) + return SZ_ERROR_NO_ARCHIVE; + break; + } + } + } + + p->flags = (CXzStreamFlags)GetBe16(buf + 8); + + if (!XzFlags_IsSupported(p->flags)) + return SZ_ERROR_UNSUPPORTED; + + if (GetUi32(buf) != CrcCalc(buf + 4, 6)) + return SZ_ERROR_ARCHIVE; + + indexSize = ((UInt64)GetUi32(buf + 4) + 1) << 2; + + *startOffset = -(Int64)(indexSize + XZ_STREAM_FOOTER_SIZE); + RINOK(SeekFromCur(stream, startOffset)); + + RINOK(Xz_ReadIndex(p, stream, indexSize, alloc)); + + { + UInt64 totalSize = Xz_GetPackSize(p); + UInt64 sum = XZ_STREAM_HEADER_SIZE + totalSize + indexSize; + if (totalSize == XZ_SIZE_OVERFLOW || + sum >= ((UInt64)1 << 63) || + totalSize >= ((UInt64)1 << 63)) + return SZ_ERROR_ARCHIVE; + *startOffset = -(Int64)sum; + RINOK(SeekFromCur(stream, startOffset)); + } + { + CXzStreamFlags headerFlags; + CSecToRead secToRead; + SecToRead_CreateVTable(&secToRead); + secToRead.realStream = stream; + + RINOK(Xz_ReadHeader(&headerFlags, &secToRead.s)); + return (p->flags == headerFlags) ? SZ_OK : SZ_ERROR_ARCHIVE; + } +} + + +/* ---------- Xz Streams ---------- */ + +void Xzs_Construct(CXzs *p) +{ + p->num = p->numAllocated = 0; + p->streams = 0; +} + +void Xzs_Free(CXzs *p, ISzAlloc *alloc) +{ + size_t i; + for (i = 0; i < p->num; i++) + Xz_Free(&p->streams[i], alloc); + alloc->Free(alloc, p->streams); + p->num = p->numAllocated = 0; + p->streams = 0; +} + +UInt64 Xzs_GetNumBlocks(const CXzs *p) +{ + UInt64 num = 0; + size_t i; + for (i = 0; i < p->num; i++) + num += p->streams[i].numBlocks; + return num; +} + +UInt64 Xzs_GetUnpackSize(const CXzs *p) +{ + UInt64 size = 0; + size_t i; + for (i = 0; i < p->num; i++) + ADD_SIZE_CHECH(size, Xz_GetUnpackSize(&p->streams[i])); + return size; +} + +/* +UInt64 Xzs_GetPackSize(const CXzs *p) +{ + UInt64 size = 0; + size_t i; + for (i = 0; i < p->num; i++) + ADD_SIZE_CHECH(size, Xz_GetTotalSize(&p->streams[i])); + return size; +} +*/ + +SRes Xzs_ReadBackward(CXzs *p, ILookInStream *stream, Int64 *startOffset, ICompressProgress *progress, ISzAlloc *alloc) +{ + Int64 endOffset = 0; + RINOK(stream->Seek(stream, &endOffset, SZ_SEEK_END)); + *startOffset = endOffset; + for (;;) + { + CXzStream st; + SRes res; + Xz_Construct(&st); + res = Xz_ReadBackward(&st, stream, startOffset, alloc); + st.startOffset = *startOffset; + RINOK(res); + if (p->num == p->numAllocated) + { + size_t newNum = p->num + p->num / 4 + 1; + Byte *data = (Byte *)alloc->Alloc(alloc, newNum * sizeof(CXzStream)); + if (data == 0) + return SZ_ERROR_MEM; + p->numAllocated = newNum; + memcpy(data, p->streams, p->num * sizeof(CXzStream)); + alloc->Free(alloc, p->streams); + p->streams = (CXzStream *)data; + } + p->streams[p->num++] = st; + if (*startOffset == 0) + break; + RINOK(stream->Seek(stream, startOffset, SZ_SEEK_SET)); + if (progress && progress->Progress(progress, endOffset - *startOffset, (UInt64)(Int64)-1) != SZ_OK) + return SZ_ERROR_PROGRESS; + } + return SZ_OK; +} diff --git a/CPP/7zip/Archive/7z/7zCompressionMode.cpp b/CPP/7zip/Archive/7z/7zCompressionMode.cpp new file mode 100644 index 0000000..6774fc4 --- /dev/null +++ b/CPP/7zip/Archive/7z/7zCompressionMode.cpp @@ -0,0 +1,3 @@ +// CompressionMethod.cpp + +#include "StdAfx.h" diff --git a/CPP/7zip/Archive/7z/7zCompressionMode.h b/CPP/7zip/Archive/7z/7zCompressionMode.h new file mode 100644 index 0000000..55bbc68 --- /dev/null +++ b/CPP/7zip/Archive/7z/7zCompressionMode.h @@ -0,0 +1,50 @@ +// 7zCompressionMode.h + +#ifndef __7Z_COMPRESSION_MODE_H +#define __7Z_COMPRESSION_MODE_H + +#include "../../../Common/MyString.h" + +#include "../../../Windows/PropVariant.h" + +#include "../../Common/MethodProps.h" + +namespace NArchive { +namespace N7z { + +struct CMethodFull: public CMethod +{ + UInt32 NumInStreams; + UInt32 NumOutStreams; + bool IsSimpleCoder() const { return (NumInStreams == 1) && (NumOutStreams == 1); } +}; + +struct CBind +{ + UInt32 InCoder; + UInt32 InStream; + UInt32 OutCoder; + UInt32 OutStream; +}; + +struct CCompressionMethodMode +{ + CObjectVector Methods; + CRecordVector Binds; + #ifndef _7ZIP_ST + UInt32 NumThreads; + #endif + bool PasswordIsDefined; + UString Password; + + bool IsEmpty() const { return (Methods.IsEmpty() && !PasswordIsDefined); } + CCompressionMethodMode(): PasswordIsDefined(false) + #ifndef _7ZIP_ST + , NumThreads(1) + #endif + {} +}; + +}} + +#endif diff --git a/CPP/7zip/Archive/7z/7zDecode.cpp b/CPP/7zip/Archive/7z/7zDecode.cpp new file mode 100644 index 0000000..425a341 --- /dev/null +++ b/CPP/7zip/Archive/7z/7zDecode.cpp @@ -0,0 +1,332 @@ +// 7zDecode.cpp + +#include "StdAfx.h" + +#include "../../Common/LimitedStreams.h" +#include "../../Common/LockedStream.h" +#include "../../Common/ProgressUtils.h" +#include "../../Common/StreamObjects.h" + +#include "7zDecode.h" + +namespace NArchive { +namespace N7z { + +static void ConvertFolderItemInfoToBindInfo(const CFolder &folder, + CBindInfoEx &bindInfo) +{ + bindInfo.Clear(); + int i; + for (i = 0; i < folder.BindPairs.Size(); i++) + { + NCoderMixer::CBindPair bindPair; + bindPair.InIndex = (UInt32)folder.BindPairs[i].InIndex; + bindPair.OutIndex = (UInt32)folder.BindPairs[i].OutIndex; + bindInfo.BindPairs.Add(bindPair); + } + UInt32 outStreamIndex = 0; + for (i = 0; i < folder.Coders.Size(); i++) + { + NCoderMixer::CCoderStreamsInfo coderStreamsInfo; + const CCoderInfo &coderInfo = folder.Coders[i]; + coderStreamsInfo.NumInStreams = (UInt32)coderInfo.NumInStreams; + coderStreamsInfo.NumOutStreams = (UInt32)coderInfo.NumOutStreams; + bindInfo.Coders.Add(coderStreamsInfo); + bindInfo.CoderMethodIDs.Add(coderInfo.MethodID); + for (UInt32 j = 0; j < coderStreamsInfo.NumOutStreams; j++, outStreamIndex++) + if (folder.FindBindPairForOutStream(outStreamIndex) < 0) + bindInfo.OutStreams.Add(outStreamIndex); + } + for (i = 0; i < folder.PackStreams.Size(); i++) + bindInfo.InStreams.Add((UInt32)folder.PackStreams[i]); +} + +static bool AreCodersEqual(const NCoderMixer::CCoderStreamsInfo &a1, + const NCoderMixer::CCoderStreamsInfo &a2) +{ + return (a1.NumInStreams == a2.NumInStreams) && + (a1.NumOutStreams == a2.NumOutStreams); +} + +static bool AreBindPairsEqual(const NCoderMixer::CBindPair &a1, const NCoderMixer::CBindPair &a2) +{ + return (a1.InIndex == a2.InIndex) && + (a1.OutIndex == a2.OutIndex); +} + +static bool AreBindInfoExEqual(const CBindInfoEx &a1, const CBindInfoEx &a2) +{ + if (a1.Coders.Size() != a2.Coders.Size()) + return false; + int i; + for (i = 0; i < a1.Coders.Size(); i++) + if (!AreCodersEqual(a1.Coders[i], a2.Coders[i])) + return false; + if (a1.BindPairs.Size() != a2.BindPairs.Size()) + return false; + for (i = 0; i < a1.BindPairs.Size(); i++) + if (!AreBindPairsEqual(a1.BindPairs[i], a2.BindPairs[i])) + return false; + for (i = 0; i < a1.CoderMethodIDs.Size(); i++) + if (a1.CoderMethodIDs[i] != a2.CoderMethodIDs[i]) + return false; + if (a1.InStreams.Size() != a2.InStreams.Size()) + return false; + if (a1.OutStreams.Size() != a2.OutStreams.Size()) + return false; + return true; +} + +CDecoder::CDecoder(bool multiThread) +{ + #ifndef _ST_MODE + multiThread = true; + #endif + _multiThread = multiThread; + _bindInfoExPrevIsDefined = false; +} + +HRESULT CDecoder::Decode( + DECL_EXTERNAL_CODECS_LOC_VARS + IInStream *inStream, + UInt64 startPos, + const UInt64 *packSizes, + const CFolder &folderInfo, + ISequentialOutStream *outStream, + ICompressProgressInfo *compressProgress + #ifndef _NO_CRYPTO + , ICryptoGetTextPassword *getTextPassword, bool &passwordIsDefined + #endif + #if !defined(_7ZIP_ST) && !defined(_SFX) + , bool mtMode, UInt32 numThreads + #endif + ) +{ + if (!folderInfo.CheckStructure()) + return E_NOTIMPL; + #ifndef _NO_CRYPTO + passwordIsDefined = false; + #endif + CObjectVector< CMyComPtr > inStreams; + + CLockedInStream lockedInStream; + lockedInStream.Init(inStream); + + for (int j = 0; j < folderInfo.PackStreams.Size(); j++) + { + CLockedSequentialInStreamImp *lockedStreamImpSpec = new + CLockedSequentialInStreamImp; + CMyComPtr lockedStreamImp = lockedStreamImpSpec; + lockedStreamImpSpec->Init(&lockedInStream, startPos); + startPos += packSizes[j]; + + CLimitedSequentialInStream *streamSpec = new + CLimitedSequentialInStream; + CMyComPtr inStream = streamSpec; + streamSpec->SetStream(lockedStreamImp); + streamSpec->Init(packSizes[j]); + inStreams.Add(inStream); + } + + int numCoders = folderInfo.Coders.Size(); + + CBindInfoEx bindInfo; + ConvertFolderItemInfoToBindInfo(folderInfo, bindInfo); + bool createNewCoders; + if (!_bindInfoExPrevIsDefined) + createNewCoders = true; + else + createNewCoders = !AreBindInfoExEqual(bindInfo, _bindInfoExPrev); + if (createNewCoders) + { + int i; + _decoders.Clear(); + // _decoders2.Clear(); + + _mixerCoder.Release(); + + if (_multiThread) + { + _mixerCoderMTSpec = new NCoderMixer::CCoderMixer2MT; + _mixerCoder = _mixerCoderMTSpec; + _mixerCoderCommon = _mixerCoderMTSpec; + } + else + { + #ifdef _ST_MODE + _mixerCoderSTSpec = new NCoderMixer::CCoderMixer2ST; + _mixerCoder = _mixerCoderSTSpec; + _mixerCoderCommon = _mixerCoderSTSpec; + #endif + } + RINOK(_mixerCoderCommon->SetBindInfo(bindInfo)); + + for (i = 0; i < numCoders; i++) + { + const CCoderInfo &coderInfo = folderInfo.Coders[i]; + + + CMyComPtr decoder; + CMyComPtr decoder2; + RINOK(CreateCoder( + EXTERNAL_CODECS_LOC_VARS + coderInfo.MethodID, decoder, decoder2, false)); + CMyComPtr decoderUnknown; + if (coderInfo.IsSimpleCoder()) + { + if (decoder == 0) + return E_NOTIMPL; + + decoderUnknown = (IUnknown *)decoder; + + if (_multiThread) + _mixerCoderMTSpec->AddCoder(decoder); + #ifdef _ST_MODE + else + _mixerCoderSTSpec->AddCoder(decoder, false); + #endif + } + else + { + if (decoder2 == 0) + return E_NOTIMPL; + decoderUnknown = (IUnknown *)decoder2; + if (_multiThread) + _mixerCoderMTSpec->AddCoder2(decoder2); + #ifdef _ST_MODE + else + _mixerCoderSTSpec->AddCoder2(decoder2, false); + #endif + } + _decoders.Add(decoderUnknown); + #ifdef EXTERNAL_CODECS + CMyComPtr setCompressCodecsInfo; + decoderUnknown.QueryInterface(IID_ISetCompressCodecsInfo, (void **)&setCompressCodecsInfo); + if (setCompressCodecsInfo) + { + RINOK(setCompressCodecsInfo->SetCompressCodecsInfo(codecsInfo)); + } + #endif + } + _bindInfoExPrev = bindInfo; + _bindInfoExPrevIsDefined = true; + } + int i; + _mixerCoderCommon->ReInit(); + + UInt32 packStreamIndex = 0, unpackStreamIndex = 0; + UInt32 coderIndex = 0; + // UInt32 coder2Index = 0; + + for (i = 0; i < numCoders; i++) + { + const CCoderInfo &coderInfo = folderInfo.Coders[i]; + CMyComPtr &decoder = _decoders[coderIndex]; + + { + CMyComPtr setDecoderProperties; + decoder.QueryInterface(IID_ICompressSetDecoderProperties2, &setDecoderProperties); + if (setDecoderProperties) + { + const CByteBuffer &props = coderInfo.Props; + size_t size = props.GetCapacity(); + if (size > 0xFFFFFFFF) + return E_NOTIMPL; + // if (size > 0) + { + RINOK(setDecoderProperties->SetDecoderProperties2((const Byte *)props, (UInt32)size)); + } + } + } + + #if !defined(_7ZIP_ST) && !defined(_SFX) + if (mtMode) + { + CMyComPtr setCoderMt; + decoder.QueryInterface(IID_ICompressSetCoderMt, &setCoderMt); + if (setCoderMt) + { + RINOK(setCoderMt->SetNumberOfThreads(numThreads)); + } + } + #endif + + #ifndef _NO_CRYPTO + { + CMyComPtr cryptoSetPassword; + decoder.QueryInterface(IID_ICryptoSetPassword, &cryptoSetPassword); + if (cryptoSetPassword) + { + if (getTextPassword == 0) + return E_FAIL; + CMyComBSTR passwordBSTR; + RINOK(getTextPassword->CryptoGetTextPassword(&passwordBSTR)); + CByteBuffer buffer; + passwordIsDefined = true; + const UString password(passwordBSTR); + const UInt32 sizeInBytes = password.Length() * 2; + buffer.SetCapacity(sizeInBytes); + for (int i = 0; i < password.Length(); i++) + { + wchar_t c = password[i]; + ((Byte *)buffer)[i * 2] = (Byte)c; + ((Byte *)buffer)[i * 2 + 1] = (Byte)(c >> 8); + } + RINOK(cryptoSetPassword->CryptoSetPassword((const Byte *)buffer, sizeInBytes)); + } + } + #endif + + coderIndex++; + + UInt32 numInStreams = (UInt32)coderInfo.NumInStreams; + UInt32 numOutStreams = (UInt32)coderInfo.NumOutStreams; + CRecordVector packSizesPointers; + CRecordVector unpackSizesPointers; + packSizesPointers.Reserve(numInStreams); + unpackSizesPointers.Reserve(numOutStreams); + UInt32 j; + for (j = 0; j < numOutStreams; j++, unpackStreamIndex++) + unpackSizesPointers.Add(&folderInfo.UnpackSizes[unpackStreamIndex]); + + for (j = 0; j < numInStreams; j++, packStreamIndex++) + { + int bindPairIndex = folderInfo.FindBindPairForInStream(packStreamIndex); + if (bindPairIndex >= 0) + packSizesPointers.Add( + &folderInfo.UnpackSizes[(UInt32)folderInfo.BindPairs[bindPairIndex].OutIndex]); + else + { + int index = folderInfo.FindPackStreamArrayIndex(packStreamIndex); + if (index < 0) + return E_FAIL; + packSizesPointers.Add(&packSizes[index]); + } + } + + _mixerCoderCommon->SetCoderInfo(i, + &packSizesPointers.Front(), + &unpackSizesPointers.Front()); + } + UInt32 mainCoder, temp; + bindInfo.FindOutStream(bindInfo.OutStreams[0], mainCoder, temp); + + if (_multiThread) + _mixerCoderMTSpec->SetProgressCoderIndex(mainCoder); + /* + else + _mixerCoderSTSpec->SetProgressCoderIndex(mainCoder);; + */ + + if (numCoders == 0) + return 0; + CRecordVector inStreamPointers; + inStreamPointers.Reserve(inStreams.Size()); + for (i = 0; i < inStreams.Size(); i++) + inStreamPointers.Add(inStreams[i]); + ISequentialOutStream *outStreamPointer = outStream; + return _mixerCoder->Code(&inStreamPointers.Front(), NULL, + inStreams.Size(), &outStreamPointer, NULL, 1, compressProgress); +} + +}} diff --git a/CPP/7zip/Archive/7z/7zDecode.h b/CPP/7zip/Archive/7z/7zDecode.h new file mode 100644 index 0000000..d8a424a --- /dev/null +++ b/CPP/7zip/Archive/7z/7zDecode.h @@ -0,0 +1,68 @@ +// 7zDecode.h + +#ifndef __7Z_DECODE_H +#define __7Z_DECODE_H + +#include "../../IStream.h" +#include "../../IPassword.h" + +#include "../Common/CoderMixer2.h" +#include "../Common/CoderMixer2MT.h" +#ifdef _ST_MODE +#include "../Common/CoderMixer2ST.h" +#endif + +#include "../../Common/CreateCoder.h" + +#include "7zItem.h" + +namespace NArchive { +namespace N7z { + +struct CBindInfoEx: public NCoderMixer::CBindInfo +{ + CRecordVector CoderMethodIDs; + void Clear() + { + CBindInfo::Clear(); + CoderMethodIDs.Clear(); + } +}; + +class CDecoder +{ + bool _bindInfoExPrevIsDefined; + CBindInfoEx _bindInfoExPrev; + + bool _multiThread; + #ifdef _ST_MODE + NCoderMixer::CCoderMixer2ST *_mixerCoderSTSpec; + #endif + NCoderMixer::CCoderMixer2MT *_mixerCoderMTSpec; + NCoderMixer::CCoderMixer2 *_mixerCoderCommon; + + CMyComPtr _mixerCoder; + CObjectVector > _decoders; + // CObjectVector > _decoders2; +public: + CDecoder(bool multiThread); + HRESULT Decode( + DECL_EXTERNAL_CODECS_LOC_VARS + IInStream *inStream, + UInt64 startPos, + const UInt64 *packSizes, + const CFolder &folder, + ISequentialOutStream *outStream, + ICompressProgressInfo *compressProgress + #ifndef _NO_CRYPTO + , ICryptoGetTextPassword *getTextPasswordSpec, bool &passwordIsDefined + #endif + #if !defined(_7ZIP_ST) && !defined(_SFX) + , bool mtMode, UInt32 numThreads + #endif + ); +}; + +}} + +#endif diff --git a/CPP/7zip/Archive/7z/7zEncode.cpp b/CPP/7zip/Archive/7z/7zEncode.cpp new file mode 100644 index 0000000..87996bc --- /dev/null +++ b/CPP/7zip/Archive/7z/7zEncode.cpp @@ -0,0 +1,444 @@ +// 7zEncode.cpp + +#include "StdAfx.h" + +#include "../../Common/CreateCoder.h" +#include "../../Common/FilterCoder.h" +#include "../../Common/LimitedStreams.h" +#include "../../Common/InOutTempBuffer.h" +#include "../../Common/ProgressUtils.h" +#include "../../Common/StreamObjects.h" + +#include "7zEncode.h" +#include "7zSpecStream.h" + +static const UInt64 k_Delta = 0x03; +static const UInt64 k_BCJ = 0x03030103; +static const UInt64 k_BCJ2 = 0x0303011B; + +namespace NArchive { +namespace N7z { + +static void ConvertBindInfoToFolderItemInfo(const NCoderMixer::CBindInfo &bindInfo, + const CRecordVector decompressionMethods, + CFolder &folder) +{ + folder.Coders.Clear(); + // bindInfo.CoderMethodIDs.Clear(); + // folder.OutStreams.Clear(); + folder.PackStreams.Clear(); + folder.BindPairs.Clear(); + int i; + for (i = 0; i < bindInfo.BindPairs.Size(); i++) + { + CBindPair bindPair; + bindPair.InIndex = bindInfo.BindPairs[i].InIndex; + bindPair.OutIndex = bindInfo.BindPairs[i].OutIndex; + folder.BindPairs.Add(bindPair); + } + for (i = 0; i < bindInfo.Coders.Size(); i++) + { + CCoderInfo coderInfo; + const NCoderMixer::CCoderStreamsInfo &coderStreamsInfo = bindInfo.Coders[i]; + coderInfo.NumInStreams = coderStreamsInfo.NumInStreams; + coderInfo.NumOutStreams = coderStreamsInfo.NumOutStreams; + coderInfo.MethodID = decompressionMethods[i]; + folder.Coders.Add(coderInfo); + } + for (i = 0; i < bindInfo.InStreams.Size(); i++) + folder.PackStreams.Add(bindInfo.InStreams[i]); +} + +HRESULT CEncoder::CreateMixerCoder( + DECL_EXTERNAL_CODECS_LOC_VARS + const UInt64 *inSizeForReduce) +{ + _mixerCoderSpec = new NCoderMixer::CCoderMixer2MT; + _mixerCoder = _mixerCoderSpec; + RINOK(_mixerCoderSpec->SetBindInfo(_bindInfo)); + for (int i = 0; i < _options.Methods.Size(); i++) + { + const CMethodFull &methodFull = _options.Methods[i]; + _codersInfo.Add(CCoderInfo()); + CCoderInfo &encodingInfo = _codersInfo.Back(); + encodingInfo.MethodID = methodFull.Id; + CMyComPtr encoder; + CMyComPtr encoder2; + + + RINOK(CreateCoder( + EXTERNAL_CODECS_LOC_VARS + methodFull.Id, encoder, encoder2, true)); + + if (!encoder && !encoder2) + return E_FAIL; + + CMyComPtr encoderCommon = encoder ? (IUnknown *)encoder : (IUnknown *)encoder2; + + #ifndef _7ZIP_ST + { + CMyComPtr setCoderMt; + encoderCommon.QueryInterface(IID_ICompressSetCoderMt, &setCoderMt); + if (setCoderMt) + { + RINOK(setCoderMt->SetNumberOfThreads(_options.NumThreads)); + } + } + #endif + + + RINOK(SetMethodProperties(methodFull, inSizeForReduce, encoderCommon)); + + /* + CMyComPtr resetSalt; + encoderCommon.QueryInterface(IID_ICryptoResetSalt, (void **)&resetSalt); + if (resetSalt != NULL) + { + resetSalt->ResetSalt(); + } + */ + + #ifdef EXTERNAL_CODECS + CMyComPtr setCompressCodecsInfo; + encoderCommon.QueryInterface(IID_ISetCompressCodecsInfo, (void **)&setCompressCodecsInfo); + if (setCompressCodecsInfo) + { + RINOK(setCompressCodecsInfo->SetCompressCodecsInfo(codecsInfo)); + } + #endif + + CMyComPtr cryptoSetPassword; + encoderCommon.QueryInterface(IID_ICryptoSetPassword, &cryptoSetPassword); + + if (cryptoSetPassword) + { + CByteBuffer buffer; + const UInt32 sizeInBytes = _options.Password.Length() * 2; + buffer.SetCapacity(sizeInBytes); + for (int i = 0; i < _options.Password.Length(); i++) + { + wchar_t c = _options.Password[i]; + ((Byte *)buffer)[i * 2] = (Byte)c; + ((Byte *)buffer)[i * 2 + 1] = (Byte)(c >> 8); + } + RINOK(cryptoSetPassword->CryptoSetPassword((const Byte *)buffer, sizeInBytes)); + } + + if (encoder) + _mixerCoderSpec->AddCoder(encoder); + else + _mixerCoderSpec->AddCoder2(encoder2); + } + return S_OK; +} + +HRESULT CEncoder::Encode( + DECL_EXTERNAL_CODECS_LOC_VARS + ISequentialInStream *inStream, + const UInt64 *inStreamSize, const UInt64 *inSizeForReduce, + CFolder &folderItem, + ISequentialOutStream *outStream, + CRecordVector &packSizes, + ICompressProgressInfo *compressProgress) +{ + RINOK(EncoderConstr()); + + if (_mixerCoderSpec == NULL) + { + RINOK(CreateMixerCoder(EXTERNAL_CODECS_LOC_VARS inSizeForReduce)); + } + _mixerCoderSpec->ReInit(); + // _mixerCoderSpec->SetCoderInfo(0, NULL, NULL, progress); + + CObjectVector inOutTempBuffers; + CObjectVector tempBufferSpecs; + CObjectVector > tempBuffers; + int numMethods = _bindInfo.Coders.Size(); + int i; + for (i = 1; i < _bindInfo.OutStreams.Size(); i++) + { + inOutTempBuffers.Add(CInOutTempBuffer()); + inOutTempBuffers.Back().Create(); + inOutTempBuffers.Back().InitWriting(); + } + for (i = 1; i < _bindInfo.OutStreams.Size(); i++) + { + CSequentialOutTempBufferImp *tempBufferSpec = new CSequentialOutTempBufferImp; + CMyComPtr tempBuffer = tempBufferSpec; + tempBufferSpec->Init(&inOutTempBuffers[i - 1]); + tempBuffers.Add(tempBuffer); + tempBufferSpecs.Add(tempBufferSpec); + } + + for (i = 0; i < numMethods; i++) + _mixerCoderSpec->SetCoderInfo(i, NULL, NULL); + + if (_bindInfo.InStreams.IsEmpty()) + return E_FAIL; + UInt32 mainCoderIndex, mainStreamIndex; + _bindInfo.FindInStream(_bindInfo.InStreams[0], mainCoderIndex, mainStreamIndex); + + if (inStreamSize != NULL) + { + CRecordVector sizePointers; + for (UInt32 i = 0; i < _bindInfo.Coders[mainCoderIndex].NumInStreams; i++) + if (i == mainStreamIndex) + sizePointers.Add(inStreamSize); + else + sizePointers.Add(NULL); + _mixerCoderSpec->SetCoderInfo(mainCoderIndex, &sizePointers.Front(), NULL); + } + + + // UInt64 outStreamStartPos; + // RINOK(stream->Seek(0, STREAM_SEEK_CUR, &outStreamStartPos)); + + CSequentialInStreamSizeCount2 *inStreamSizeCountSpec = new CSequentialInStreamSizeCount2; + CMyComPtr inStreamSizeCount = inStreamSizeCountSpec; + CSequentialOutStreamSizeCount *outStreamSizeCountSpec = new CSequentialOutStreamSizeCount; + CMyComPtr outStreamSizeCount = outStreamSizeCountSpec; + + inStreamSizeCountSpec->Init(inStream); + outStreamSizeCountSpec->SetStream(outStream); + outStreamSizeCountSpec->Init(); + + CRecordVector inStreamPointers; + CRecordVector outStreamPointers; + inStreamPointers.Add(inStreamSizeCount); + outStreamPointers.Add(outStreamSizeCount); + for (i = 1; i < _bindInfo.OutStreams.Size(); i++) + outStreamPointers.Add(tempBuffers[i - 1]); + + for (i = 0; i < _codersInfo.Size(); i++) + { + CCoderInfo &encodingInfo = _codersInfo[i]; + + CMyComPtr resetInitVector; + _mixerCoderSpec->_coders[i].QueryInterface(IID_ICryptoResetInitVector, (void **)&resetInitVector); + if (resetInitVector != NULL) + { + resetInitVector->ResetInitVector(); + } + + CMyComPtr writeCoderProperties; + _mixerCoderSpec->_coders[i].QueryInterface(IID_ICompressWriteCoderProperties, (void **)&writeCoderProperties); + if (writeCoderProperties != NULL) + { + CDynBufSeqOutStream *outStreamSpec = new CDynBufSeqOutStream; + CMyComPtr outStream(outStreamSpec); + outStreamSpec->Init(); + writeCoderProperties->WriteCoderProperties(outStream); + outStreamSpec->CopyToBuffer(encodingInfo.Props); + } + } + + UInt32 progressIndex = mainCoderIndex; + + for (i = 0; i + 1 < _codersInfo.Size(); i++) + { + UInt64 m = _codersInfo[i].MethodID; + if (m == k_Delta || m == k_BCJ || m == k_BCJ2) + progressIndex = i + 1; + } + + _mixerCoderSpec->SetProgressCoderIndex(progressIndex); + + RINOK(_mixerCoder->Code(&inStreamPointers.Front(), NULL, 1, + &outStreamPointers.Front(), NULL, outStreamPointers.Size(), compressProgress)); + + ConvertBindInfoToFolderItemInfo(_decompressBindInfo, _decompressionMethods, folderItem); + + packSizes.Add(outStreamSizeCountSpec->GetSize()); + + for (i = 1; i < _bindInfo.OutStreams.Size(); i++) + { + CInOutTempBuffer &inOutTempBuffer = inOutTempBuffers[i - 1]; + RINOK(inOutTempBuffer.WriteToStream(outStream)); + packSizes.Add(inOutTempBuffer.GetDataSize()); + } + + for (i = 0; i < (int)_bindReverseConverter->NumSrcInStreams; i++) + { + int binder = _bindInfo.FindBinderForInStream( + _bindReverseConverter->DestOutToSrcInMap[i]); + UInt64 streamSize; + if (binder < 0) + streamSize = inStreamSizeCountSpec->GetSize(); + else + streamSize = _mixerCoderSpec->GetWriteProcessedSize(binder); + folderItem.UnpackSizes.Add(streamSize); + } + for (i = numMethods - 1; i >= 0; i--) + folderItem.Coders[numMethods - 1 - i].Props = _codersInfo[i].Props; + return S_OK; +} + + +CEncoder::CEncoder(const CCompressionMethodMode &options): + _bindReverseConverter(0), + _constructed(false) +{ + if (options.IsEmpty()) + throw 1; + + _options = options; + _mixerCoderSpec = NULL; +} + +HRESULT CEncoder::EncoderConstr() +{ + if (_constructed) + return S_OK; + if (_options.Methods.IsEmpty()) + { + // it has only password method; + if (!_options.PasswordIsDefined) + throw 1; + if (!_options.Binds.IsEmpty()) + throw 1; + NCoderMixer::CCoderStreamsInfo coderStreamsInfo; + CMethodFull method; + + method.NumInStreams = 1; + method.NumOutStreams = 1; + coderStreamsInfo.NumInStreams = 1; + coderStreamsInfo.NumOutStreams = 1; + method.Id = k_AES; + + _options.Methods.Add(method); + _bindInfo.Coders.Add(coderStreamsInfo); + + _bindInfo.InStreams.Add(0); + _bindInfo.OutStreams.Add(0); + } + else + { + + UInt32 numInStreams = 0, numOutStreams = 0; + int i; + for (i = 0; i < _options.Methods.Size(); i++) + { + const CMethodFull &methodFull = _options.Methods[i]; + NCoderMixer::CCoderStreamsInfo coderStreamsInfo; + coderStreamsInfo.NumInStreams = methodFull.NumOutStreams; + coderStreamsInfo.NumOutStreams = methodFull.NumInStreams; + if (_options.Binds.IsEmpty()) + { + if (i < _options.Methods.Size() - 1) + { + NCoderMixer::CBindPair bindPair; + bindPair.InIndex = numInStreams + coderStreamsInfo.NumInStreams; + bindPair.OutIndex = numOutStreams; + _bindInfo.BindPairs.Add(bindPair); + } + else + _bindInfo.OutStreams.Insert(0, numOutStreams); + for (UInt32 j = 1; j < coderStreamsInfo.NumOutStreams; j++) + _bindInfo.OutStreams.Add(numOutStreams + j); + } + + numInStreams += coderStreamsInfo.NumInStreams; + numOutStreams += coderStreamsInfo.NumOutStreams; + + _bindInfo.Coders.Add(coderStreamsInfo); + } + + if (!_options.Binds.IsEmpty()) + { + for (i = 0; i < _options.Binds.Size(); i++) + { + NCoderMixer::CBindPair bindPair; + const CBind &bind = _options.Binds[i]; + bindPair.InIndex = _bindInfo.GetCoderInStreamIndex(bind.InCoder) + bind.InStream; + bindPair.OutIndex = _bindInfo.GetCoderOutStreamIndex(bind.OutCoder) + bind.OutStream; + _bindInfo.BindPairs.Add(bindPair); + } + for (i = 0; i < (int)numOutStreams; i++) + if (_bindInfo.FindBinderForOutStream(i) == -1) + _bindInfo.OutStreams.Add(i); + } + + for (i = 0; i < (int)numInStreams; i++) + if (_bindInfo.FindBinderForInStream(i) == -1) + _bindInfo.InStreams.Add(i); + + if (_bindInfo.InStreams.IsEmpty()) + throw 1; // this is error + + // Make main stream first in list + int inIndex = _bindInfo.InStreams[0]; + for (;;) + { + UInt32 coderIndex, coderStreamIndex; + _bindInfo.FindInStream(inIndex, coderIndex, coderStreamIndex); + UInt32 outIndex = _bindInfo.GetCoderOutStreamIndex(coderIndex); + int binder = _bindInfo.FindBinderForOutStream(outIndex); + if (binder >= 0) + { + inIndex = _bindInfo.BindPairs[binder].InIndex; + continue; + } + for (i = 0; i < _bindInfo.OutStreams.Size(); i++) + if (_bindInfo.OutStreams[i] == outIndex) + { + _bindInfo.OutStreams.Delete(i); + _bindInfo.OutStreams.Insert(0, outIndex); + break; + } + break; + } + + if (_options.PasswordIsDefined) + { + int numCryptoStreams = _bindInfo.OutStreams.Size(); + + for (i = 0; i < numCryptoStreams; i++) + { + NCoderMixer::CBindPair bindPair; + bindPair.InIndex = numInStreams + i; + bindPair.OutIndex = _bindInfo.OutStreams[i]; + _bindInfo.BindPairs.Add(bindPair); + } + _bindInfo.OutStreams.Clear(); + + /* + if (numCryptoStreams == 0) + numCryptoStreams = 1; + */ + + for (i = 0; i < numCryptoStreams; i++) + { + NCoderMixer::CCoderStreamsInfo coderStreamsInfo; + CMethodFull method; + method.NumInStreams = 1; + method.NumOutStreams = 1; + coderStreamsInfo.NumInStreams = method.NumOutStreams; + coderStreamsInfo.NumOutStreams = method.NumInStreams; + method.Id = k_AES; + + _options.Methods.Add(method); + _bindInfo.Coders.Add(coderStreamsInfo); + _bindInfo.OutStreams.Add(numOutStreams + i); + } + } + + } + + for (int i = _options.Methods.Size() - 1; i >= 0; i--) + { + const CMethodFull &methodFull = _options.Methods[i]; + _decompressionMethods.Add(methodFull.Id); + } + + _bindReverseConverter = new NCoderMixer::CBindReverseConverter(_bindInfo); + _bindReverseConverter->CreateReverseBindInfo(_decompressBindInfo); + _constructed = true; + return S_OK; +} + +CEncoder::~CEncoder() +{ + delete _bindReverseConverter; +} + +}} diff --git a/CPP/7zip/Archive/7z/7zEncode.h b/CPP/7zip/Archive/7z/7zEncode.h new file mode 100644 index 0000000..4909a6e --- /dev/null +++ b/CPP/7zip/Archive/7z/7zEncode.h @@ -0,0 +1,55 @@ +// 7zEncode.h + +#ifndef __7Z_ENCODE_H +#define __7Z_ENCODE_H + +// #include "../../Common/StreamObjects.h" + +#include "7zCompressionMode.h" + +#include "../Common/CoderMixer2.h" +#include "../Common/CoderMixer2MT.h" +#ifdef _ST_MODE +#include "../Common/CoderMixer2ST.h" +#endif +#include "7zItem.h" + +#include "../../Common/CreateCoder.h" + +namespace NArchive { +namespace N7z { + +class CEncoder +{ + NCoderMixer::CCoderMixer2MT *_mixerCoderSpec; + CMyComPtr _mixerCoder; + + CObjectVector _codersInfo; + + CCompressionMethodMode _options; + NCoderMixer::CBindInfo _bindInfo; + NCoderMixer::CBindInfo _decompressBindInfo; + NCoderMixer::CBindReverseConverter *_bindReverseConverter; + CRecordVector _decompressionMethods; + + HRESULT CreateMixerCoder(DECL_EXTERNAL_CODECS_LOC_VARS + const UInt64 *inSizeForReduce); + + bool _constructed; +public: + CEncoder(const CCompressionMethodMode &options); + ~CEncoder(); + HRESULT EncoderConstr(); + HRESULT Encode( + DECL_EXTERNAL_CODECS_LOC_VARS + ISequentialInStream *inStream, + const UInt64 *inStreamSize, const UInt64 *inSizeForReduce, + CFolder &folderItem, + ISequentialOutStream *outStream, + CRecordVector &packSizes, + ICompressProgressInfo *compressProgress); +}; + +}} + +#endif diff --git a/CPP/7zip/Archive/7z/7zExtract.cpp b/CPP/7zip/Archive/7z/7zExtract.cpp new file mode 100644 index 0000000..d55f38e --- /dev/null +++ b/CPP/7zip/Archive/7z/7zExtract.cpp @@ -0,0 +1,270 @@ +// 7zExtract.cpp + +#include "StdAfx.h" + +#include "../../../Common/ComTry.h" + +#include "../../Common/ProgressUtils.h" + +#include "7zDecode.h" +// #include "7z1Decode.h" +#include "7zFolderOutStream.h" +#include "7zHandler.h" + +namespace NArchive { +namespace N7z { + +struct CExtractFolderInfo +{ + #ifdef _7Z_VOL + int VolumeIndex; + #endif + CNum FileIndex; + CNum FolderIndex; + CBoolVector ExtractStatuses; + UInt64 UnpackSize; + CExtractFolderInfo( + #ifdef _7Z_VOL + int volumeIndex, + #endif + CNum fileIndex, CNum folderIndex): + #ifdef _7Z_VOL + VolumeIndex(volumeIndex), + #endif + FileIndex(fileIndex), + FolderIndex(folderIndex), + UnpackSize(0) + { + if (fileIndex != kNumNoIndex) + { + ExtractStatuses.Reserve(1); + ExtractStatuses.Add(true); + } + }; +}; + +STDMETHODIMP CHandler::Extract(const UInt32 *indices, UInt32 numItems, + Int32 testModeSpec, IArchiveExtractCallback *extractCallbackSpec) +{ + COM_TRY_BEGIN + bool testMode = (testModeSpec != 0); + CMyComPtr extractCallback = extractCallbackSpec; + UInt64 importantTotalUnpacked = 0; + + bool allFilesMode = (numItems == (UInt32)-1); + if (allFilesMode) + numItems = + #ifdef _7Z_VOL + _refs.Size(); + #else + _db.Files.Size(); + #endif + + if(numItems == 0) + return S_OK; + + /* + if(_volumes.Size() != 1) + return E_FAIL; + const CVolume &volume = _volumes.Front(); + const CArchiveDatabaseEx &_db = volume.Database; + IInStream *_inStream = volume.Stream; + */ + + CObjectVector extractFolderInfoVector; + for (UInt32 ii = 0; ii < numItems; ii++) + { + // UInt32 fileIndex = allFilesMode ? indexIndex : indices[indexIndex]; + UInt32 ref2Index = allFilesMode ? ii : indices[ii]; + // const CRef2 &ref2 = _refs[ref2Index]; + + // for (UInt32 ri = 0; ri < ref2.Refs.Size(); ri++) + { + #ifdef _7Z_VOL + // const CRef &ref = ref2.Refs[ri]; + const CRef &ref = _refs[ref2Index]; + + int volumeIndex = ref.VolumeIndex; + const CVolume &volume = _volumes[volumeIndex]; + const CArchiveDatabaseEx &db = volume.Database; + UInt32 fileIndex = ref.ItemIndex; + #else + const CArchiveDatabaseEx &db = _db; + UInt32 fileIndex = ref2Index; + #endif + + CNum folderIndex = db.FileIndexToFolderIndexMap[fileIndex]; + if (folderIndex == kNumNoIndex) + { + extractFolderInfoVector.Add(CExtractFolderInfo( + #ifdef _7Z_VOL + volumeIndex, + #endif + fileIndex, kNumNoIndex)); + continue; + } + if (extractFolderInfoVector.IsEmpty() || + folderIndex != extractFolderInfoVector.Back().FolderIndex + #ifdef _7Z_VOL + || volumeIndex != extractFolderInfoVector.Back().VolumeIndex + #endif + ) + { + extractFolderInfoVector.Add(CExtractFolderInfo( + #ifdef _7Z_VOL + volumeIndex, + #endif + kNumNoIndex, folderIndex)); + const CFolder &folderInfo = db.Folders[folderIndex]; + UInt64 unpackSize = folderInfo.GetUnpackSize(); + importantTotalUnpacked += unpackSize; + extractFolderInfoVector.Back().UnpackSize = unpackSize; + } + + CExtractFolderInfo &efi = extractFolderInfoVector.Back(); + + // const CFolderInfo &folderInfo = m_dam_Folders[folderIndex]; + CNum startIndex = db.FolderStartFileIndex[folderIndex]; + for (CNum index = efi.ExtractStatuses.Size(); + index <= fileIndex - startIndex; index++) + { + // UInt64 unpackSize = _db.Files[startIndex + index].UnpackSize; + // Count partial_folder_size + // efi.UnpackSize += unpackSize; + // importantTotalUnpacked += unpackSize; + efi.ExtractStatuses.Add(index == fileIndex - startIndex); + } + } + } + + RINOK(extractCallback->SetTotal(importantTotalUnpacked)); + + CDecoder decoder( + #ifdef _ST_MODE + false + #else + true + #endif + ); + // CDecoder1 decoder; + + UInt64 totalPacked = 0; + UInt64 totalUnpacked = 0; + UInt64 curPacked, curUnpacked; + + CLocalProgress *lps = new CLocalProgress; + CMyComPtr progress = lps; + lps->Init(extractCallback, false); + + for (int i = 0;; i++, totalUnpacked += curUnpacked, totalPacked += curPacked) + { + lps->OutSize = totalUnpacked; + lps->InSize = totalPacked; + RINOK(lps->SetCur()); + + if (i >= extractFolderInfoVector.Size()) + break; + + const CExtractFolderInfo &efi = extractFolderInfoVector[i]; + curUnpacked = efi.UnpackSize; + curPacked = 0; + + CFolderOutStream *folderOutStream = new CFolderOutStream; + CMyComPtr outStream(folderOutStream); + + #ifdef _7Z_VOL + const CVolume &volume = _volumes[efi.VolumeIndex]; + const CArchiveDatabaseEx &db = volume.Database; + #else + const CArchiveDatabaseEx &db = _db; + #endif + + CNum startIndex; + if (efi.FileIndex != kNumNoIndex) + startIndex = efi.FileIndex; + else + startIndex = db.FolderStartFileIndex[efi.FolderIndex]; + + HRESULT result = folderOutStream->Init(&db, + #ifdef _7Z_VOL + volume.StartRef2Index, + #else + 0, + #endif + startIndex, + &efi.ExtractStatuses, extractCallback, testMode, _crcSize != 0); + + RINOK(result); + + if (efi.FileIndex != kNumNoIndex) + continue; + + CNum folderIndex = efi.FolderIndex; + const CFolder &folderInfo = db.Folders[folderIndex]; + + curPacked = _db.GetFolderFullPackSize(folderIndex); + + CNum packStreamIndex = db.FolderStartPackStreamIndex[folderIndex]; + UInt64 folderStartPackPos = db.GetFolderStreamPos(folderIndex, 0); + + #ifndef _NO_CRYPTO + CMyComPtr getTextPassword; + if (extractCallback) + extractCallback.QueryInterface(IID_ICryptoGetTextPassword, &getTextPassword); + #endif + + try + { + #ifndef _NO_CRYPTO + bool passwordIsDefined; + #endif + + HRESULT result = decoder.Decode( + EXTERNAL_CODECS_VARS + #ifdef _7Z_VOL + volume.Stream, + #else + _inStream, + #endif + folderStartPackPos, + &db.PackSizes[packStreamIndex], + folderInfo, + outStream, + progress + #ifndef _NO_CRYPTO + , getTextPassword, passwordIsDefined + #endif + #if !defined(_7ZIP_ST) && !defined(_SFX) + , true, _numThreads + #endif + ); + + if (result == S_FALSE) + { + RINOK(folderOutStream->FlushCorrupted(NExtract::NOperationResult::kDataError)); + continue; + } + if (result == E_NOTIMPL) + { + RINOK(folderOutStream->FlushCorrupted(NExtract::NOperationResult::kUnSupportedMethod)); + continue; + } + if (result != S_OK) + return result; + if (folderOutStream->WasWritingFinished() != S_OK) + { + RINOK(folderOutStream->FlushCorrupted(NExtract::NOperationResult::kDataError)); + continue; + } + } + catch(...) + { + RINOK(folderOutStream->FlushCorrupted(NExtract::NOperationResult::kDataError)); + continue; + } + } + return S_OK; + COM_TRY_END +} + +}} diff --git a/CPP/7zip/Archive/7z/7zFolderInStream.cpp b/CPP/7zip/Archive/7z/7zFolderInStream.cpp new file mode 100644 index 0000000..edd276b --- /dev/null +++ b/CPP/7zip/Archive/7z/7zFolderInStream.cpp @@ -0,0 +1,123 @@ +// 7zFolderInStream.cpp + +#include "StdAfx.h" + +#include "7zFolderInStream.h" + +namespace NArchive { +namespace N7z { + +CFolderInStream::CFolderInStream() +{ + _inStreamWithHashSpec = new CSequentialInStreamWithCRC; + _inStreamWithHash = _inStreamWithHashSpec; +} + +void CFolderInStream::Init(IArchiveUpdateCallback *updateCallback, + const UInt32 *fileIndices, UInt32 numFiles) +{ + _updateCallback = updateCallback; + _numFiles = numFiles; + _fileIndex = 0; + _fileIndices = fileIndices; + Processed.Clear(); + CRCs.Clear(); + Sizes.Clear(); + _fileIsOpen = false; + _currentSizeIsDefined = false; +} + +HRESULT CFolderInStream::OpenStream() +{ + _filePos = 0; + while (_fileIndex < _numFiles) + { + CMyComPtr stream; + HRESULT result = _updateCallback->GetStream(_fileIndices[_fileIndex], &stream); + if (result != S_OK && result != S_FALSE) + return result; + _fileIndex++; + _inStreamWithHashSpec->SetStream(stream); + _inStreamWithHashSpec->Init(); + if (stream) + { + _fileIsOpen = true; + CMyComPtr streamGetSize; + stream.QueryInterface(IID_IStreamGetSize, &streamGetSize); + if (streamGetSize) + { + RINOK(streamGetSize->GetSize(&_currentSize)); + _currentSizeIsDefined = true; + } + return S_OK; + } + RINOK(_updateCallback->SetOperationResult(NArchive::NUpdate::NOperationResult::kOK)); + Sizes.Add(0); + Processed.Add(result == S_OK); + AddDigest(); + } + return S_OK; +} + +void CFolderInStream::AddDigest() +{ + CRCs.Add(_inStreamWithHashSpec->GetCRC()); +} + +HRESULT CFolderInStream::CloseStream() +{ + RINOK(_updateCallback->SetOperationResult(NArchive::NUpdate::NOperationResult::kOK)); + _inStreamWithHashSpec->ReleaseStream(); + _fileIsOpen = false; + _currentSizeIsDefined = false; + Processed.Add(true); + Sizes.Add(_filePos); + AddDigest(); + return S_OK; +} + +STDMETHODIMP CFolderInStream::Read(void *data, UInt32 size, UInt32 *processedSize) +{ + if (processedSize != 0) + *processedSize = 0; + while (size > 0) + { + if (_fileIsOpen) + { + UInt32 processed2; + RINOK(_inStreamWithHash->Read(data, size, &processed2)); + if (processed2 == 0) + { + RINOK(CloseStream()); + continue; + } + if (processedSize != 0) + *processedSize = processed2; + _filePos += processed2; + break; + } + if (_fileIndex >= _numFiles) + break; + RINOK(OpenStream()); + } + return S_OK; +} + +STDMETHODIMP CFolderInStream::GetSubStreamSize(UInt64 subStream, UInt64 *value) +{ + *value = 0; + int index2 = (int)subStream; + if (index2 < 0 || subStream > Sizes.Size()) + return E_FAIL; + if (index2 < Sizes.Size()) + { + *value = Sizes[index2]; + return S_OK; + } + if (!_currentSizeIsDefined) + return S_FALSE; + *value = _currentSize; + return S_OK; +} + +}} diff --git a/CPP/7zip/Archive/7z/7zFolderInStream.h b/CPP/7zip/Archive/7z/7zFolderInStream.h new file mode 100644 index 0000000..6df3672 --- /dev/null +++ b/CPP/7zip/Archive/7z/7zFolderInStream.h @@ -0,0 +1,58 @@ +// 7zFolderInStream.h + +#ifndef __7Z_FOLDER_IN_STREAM_H +#define __7Z_FOLDER_IN_STREAM_H + +#include "../../ICoder.h" +#include "../IArchive.h" +#include "../Common/InStreamWithCRC.h" + +#include "7zItem.h" + +namespace NArchive { +namespace N7z { + +class CFolderInStream: + public ISequentialInStream, + public ICompressGetSubStreamSize, + public CMyUnknownImp +{ + CSequentialInStreamWithCRC *_inStreamWithHashSpec; + CMyComPtr _inStreamWithHash; + CMyComPtr _updateCallback; + + bool _currentSizeIsDefined; + bool _fileIsOpen; + UInt64 _currentSize; + UInt64 _filePos; + const UInt32 *_fileIndices; + UInt32 _numFiles; + UInt32 _fileIndex; + + HRESULT OpenStream(); + HRESULT CloseStream(); + void AddDigest(); + +public: + CRecordVector Processed; + CRecordVector CRCs; + CRecordVector Sizes; + + MY_UNKNOWN_IMP1(ICompressGetSubStreamSize) + STDMETHOD(Read)(void *data, UInt32 size, UInt32 *processedSize); + STDMETHOD(GetSubStreamSize)(UInt64 subStream, UInt64 *value); + + CFolderInStream(); + void Init(IArchiveUpdateCallback *updateCallback, const UInt32 *fileIndices, UInt32 numFiles); + UInt64 GetFullSize() const + { + UInt64 size = 0; + for (int i = 0; i < Sizes.Size(); i++) + size += Sizes[i]; + return size; + } +}; + +}} + +#endif diff --git a/CPP/7zip/Archive/7z/7zFolderOutStream.cpp b/CPP/7zip/Archive/7z/7zFolderOutStream.cpp new file mode 100644 index 0000000..22c4600 --- /dev/null +++ b/CPP/7zip/Archive/7z/7zFolderOutStream.cpp @@ -0,0 +1,149 @@ +// 7zFolderOutStream.cpp + +#include "StdAfx.h" + +#include "7zFolderOutStream.h" + +namespace NArchive { +namespace N7z { + +CFolderOutStream::CFolderOutStream() +{ + _crcStreamSpec = new COutStreamWithCRC; + _crcStream = _crcStreamSpec; +} + +HRESULT CFolderOutStream::Init( + const CArchiveDatabaseEx *db, + UInt32 ref2Offset, UInt32 startIndex, + const CBoolVector *extractStatuses, + IArchiveExtractCallback *extractCallback, + bool testMode, bool checkCrc) +{ + _db = db; + _ref2Offset = ref2Offset; + _startIndex = startIndex; + + _extractStatuses = extractStatuses; + _extractCallback = extractCallback; + _testMode = testMode; + _checkCrc = checkCrc; + + _currentIndex = 0; + _fileIsOpen = false; + return ProcessEmptyFiles(); +} + +HRESULT CFolderOutStream::OpenFile() +{ + Int32 askMode = ((*_extractStatuses)[_currentIndex]) ? (_testMode ? + NExtract::NAskMode::kTest : + NExtract::NAskMode::kExtract) : + NExtract::NAskMode::kSkip; + CMyComPtr realOutStream; + UInt32 index = _startIndex + _currentIndex; + RINOK(_extractCallback->GetStream(_ref2Offset + index, &realOutStream, askMode)); + _crcStreamSpec->SetStream(realOutStream); + _crcStreamSpec->Init(_checkCrc); + _fileIsOpen = true; + const CFileItem &fi = _db->Files[index]; + _rem = fi.Size; + if (askMode == NExtract::NAskMode::kExtract && !realOutStream && + !_db->IsItemAnti(index) && !fi.IsDir) + askMode = NExtract::NAskMode::kSkip; + return _extractCallback->PrepareOperation(askMode); +} + +HRESULT CFolderOutStream::CloseFileAndSetResult(Int32 res) +{ + _crcStreamSpec->ReleaseStream(); + _fileIsOpen = false; + _currentIndex++; + return _extractCallback->SetOperationResult(res); +} + +HRESULT CFolderOutStream::CloseFileAndSetResult() +{ + const CFileItem &fi = _db->Files[_startIndex + _currentIndex]; + return CloseFileAndSetResult( + (fi.IsDir || !fi.CrcDefined || !_checkCrc || fi.Crc == _crcStreamSpec->GetCRC()) ? + NExtract::NOperationResult::kOK : + NExtract::NOperationResult::kCRCError); +} + +HRESULT CFolderOutStream::ProcessEmptyFiles() +{ + while (_currentIndex < _extractStatuses->Size() && _db->Files[_startIndex + _currentIndex].Size == 0) + { + RINOK(OpenFile()); + RINOK(CloseFileAndSetResult()); + } + return S_OK; +} + +STDMETHODIMP CFolderOutStream::Write(const void *data, UInt32 size, UInt32 *processedSize) +{ + if (processedSize != NULL) + *processedSize = 0; + while (size != 0) + { + if (_fileIsOpen) + { + UInt32 cur = size < _rem ? size : (UInt32)_rem; + RINOK(_crcStream->Write(data, cur, &cur)); + if (cur == 0) + break; + data = (const Byte *)data + cur; + size -= cur; + _rem -= cur; + if (processedSize != NULL) + *processedSize += cur; + if (_rem == 0) + { + RINOK(CloseFileAndSetResult()); + RINOK(ProcessEmptyFiles()); + continue; + } + } + else + { + RINOK(ProcessEmptyFiles()); + if (_currentIndex == _extractStatuses->Size()) + { + // we support partial extracting + if (processedSize != NULL) + *processedSize += size; + break; + } + RINOK(OpenFile()); + } + } + return S_OK; +} + +STDMETHODIMP CFolderOutStream::GetSubStreamSize(UInt64 subStream, UInt64 *value) +{ + *value = 0; + if ((int)subStream >= _extractStatuses->Size()) + return S_FALSE; + *value = _db->Files[_startIndex + (int)subStream].Size; + return S_OK; +} + +HRESULT CFolderOutStream::FlushCorrupted(Int32 resultEOperationResult) +{ + while (_currentIndex < _extractStatuses->Size()) + { + if (_fileIsOpen) + { + RINOK(CloseFileAndSetResult(resultEOperationResult)); + } + else + { + RINOK(OpenFile()); + } + } + return S_OK; +} + +}} diff --git a/CPP/7zip/Archive/7z/7zFolderOutStream.h b/CPP/7zip/Archive/7z/7zFolderOutStream.h new file mode 100644 index 0000000..f9bb1af --- /dev/null +++ b/CPP/7zip/Archive/7z/7zFolderOutStream.h @@ -0,0 +1,58 @@ +// 7zFolderOutStream.h + +#ifndef __7Z_FOLDER_OUT_STREAM_H +#define __7Z_FOLDER_OUT_STREAM_H + +#include "../../IStream.h" +#include "../IArchive.h" +#include "../Common/OutStreamWithCRC.h" + +#include "7zIn.h" + +namespace NArchive { +namespace N7z { + +class CFolderOutStream: + public ISequentialOutStream, + public ICompressGetSubStreamSize, + public CMyUnknownImp +{ + COutStreamWithCRC *_crcStreamSpec; + CMyComPtr _crcStream; + const CArchiveDatabaseEx *_db; + const CBoolVector *_extractStatuses; + CMyComPtr _extractCallback; + UInt32 _ref2Offset; + UInt32 _startIndex; + int _currentIndex; + bool _testMode; + bool _checkCrc; + bool _fileIsOpen; + UInt64 _rem; + + HRESULT OpenFile(); + HRESULT CloseFileAndSetResult(Int32 res); + HRESULT CloseFileAndSetResult(); + HRESULT ProcessEmptyFiles(); +public: + MY_UNKNOWN_IMP1(ICompressGetSubStreamSize) + + CFolderOutStream(); + + STDMETHOD(Write)(const void *data, UInt32 size, UInt32 *processedSize); + STDMETHOD(GetSubStreamSize)(UInt64 subStream, UInt64 *value); + + HRESULT Init( + const CArchiveDatabaseEx *db, + UInt32 ref2Offset, UInt32 startIndex, + const CBoolVector *extractStatuses, + IArchiveExtractCallback *extractCallback, + bool testMode, bool checkCrc); + HRESULT FlushCorrupted(Int32 resultEOperationResult); + HRESULT WasWritingFinished() const + { return (_currentIndex == _extractStatuses->Size()) ? S_OK: E_FAIL; } +}; + +}} + +#endif diff --git a/CPP/7zip/Archive/7z/7zHandler.cpp b/CPP/7zip/Archive/7z/7zHandler.cpp new file mode 100644 index 0000000..4ab7afa --- /dev/null +++ b/CPP/7zip/Archive/7z/7zHandler.cpp @@ -0,0 +1,482 @@ +// 7zHandler.cpp + +#include "StdAfx.h" + +#include "../../../../C/CpuArch.h" + +#include "../../../Common/ComTry.h" +#include "../../../Common/IntToString.h" + +#ifndef __7Z_SET_PROPERTIES +#include "../../../Windows/System.h" +#endif + +#include "../Common/ItemNameUtils.h" + +#include "7zHandler.h" +#include "7zProperties.h" + +#ifdef __7Z_SET_PROPERTIES +#ifdef EXTRACT_ONLY +#include "../Common/ParseProperties.h" +#endif +#endif + +using namespace NWindows; + +extern UString ConvertMethodIdToString(UInt64 id); + +namespace NArchive { +namespace N7z { + +CHandler::CHandler() +{ + _crcSize = 4; + + #ifndef _NO_CRYPTO + _passwordIsDefined = false; + #endif + + #ifdef EXTRACT_ONLY + #ifdef __7Z_SET_PROPERTIES + _numThreads = NSystem::GetNumberOfProcessors(); + #endif + #else + Init(); + #endif +} + +STDMETHODIMP CHandler::GetNumberOfItems(UInt32 *numItems) +{ + *numItems = _db.Files.Size(); + return S_OK; +} + +#ifdef _SFX + +IMP_IInArchive_ArcProps_NO + +STDMETHODIMP CHandler::GetNumberOfProperties(UInt32 * /* numProperties */) +{ + return E_NOTIMPL; +} + +STDMETHODIMP CHandler::GetPropertyInfo(UInt32 /* index */, + BSTR * /* name */, PROPID * /* propID */, VARTYPE * /* varType */) +{ + return E_NOTIMPL; +} + + +#else + +STATPROPSTG kArcProps[] = +{ + { NULL, kpidMethod, VT_BSTR}, + { NULL, kpidSolid, VT_BOOL}, + { NULL, kpidNumBlocks, VT_UI4}, + { NULL, kpidPhySize, VT_UI8}, + { NULL, kpidHeadersSize, VT_UI8}, + { NULL, kpidOffset, VT_UI8} +}; + +STDMETHODIMP CHandler::GetArchiveProperty(PROPID propID, PROPVARIANT *value) +{ + COM_TRY_BEGIN + NCOM::CPropVariant prop; + switch(propID) + { + case kpidMethod: + { + UString resString; + CRecordVector ids; + int i; + for (i = 0; i < _db.Folders.Size(); i++) + { + const CFolder &f = _db.Folders[i]; + for (int j = f.Coders.Size() - 1; j >= 0; j--) + ids.AddToUniqueSorted(f.Coders[j].MethodID); + } + + for (i = 0; i < ids.Size(); i++) + { + UInt64 id = ids[i]; + UString methodName; + /* bool methodIsKnown = */ FindMethod(EXTERNAL_CODECS_VARS id, methodName); + if (methodName.IsEmpty()) + methodName = ConvertMethodIdToString(id); + if (!resString.IsEmpty()) + resString += L' '; + resString += methodName; + } + prop = resString; + break; + } + case kpidSolid: prop = _db.IsSolid(); break; + case kpidNumBlocks: prop = (UInt32)_db.Folders.Size(); break; + case kpidHeadersSize: prop = _db.HeadersSize; break; + case kpidPhySize: prop = _db.PhySize; break; + case kpidOffset: if (_db.ArchiveInfo.StartPosition != 0) prop = _db.ArchiveInfo.StartPosition; break; + } + prop.Detach(value); + return S_OK; + COM_TRY_END +} + +IMP_IInArchive_ArcProps + +#endif + +static void SetPropFromUInt64Def(CUInt64DefVector &v, int index, NCOM::CPropVariant &prop) +{ + UInt64 value; + if (v.GetItem(index, value)) + { + FILETIME ft; + ft.dwLowDateTime = (DWORD)value; + ft.dwHighDateTime = (DWORD)(value >> 32); + prop = ft; + } +} + +#ifndef _SFX + +static UString ConvertUInt32ToString(UInt32 value) +{ + wchar_t buffer[32]; + ConvertUInt64ToString(value, buffer); + return buffer; +} + +static UString GetStringForSizeValue(UInt32 value) +{ + for (int i = 31; i >= 0; i--) + if ((UInt32(1) << i) == value) + return ConvertUInt32ToString(i); + UString result; + if (value % (1 << 20) == 0) + { + result += ConvertUInt32ToString(value >> 20); + result += L"m"; + } + else if (value % (1 << 10) == 0) + { + result += ConvertUInt32ToString(value >> 10); + result += L"k"; + } + else + { + result += ConvertUInt32ToString(value); + result += L"b"; + } + return result; +} + +static const UInt64 k_Copy = 0x0; +static const UInt64 k_Delta = 3; +static const UInt64 k_LZMA2 = 0x21; +static const UInt64 k_LZMA = 0x030101; +static const UInt64 k_PPMD = 0x030401; + +static wchar_t GetHex(Byte value) +{ + return (wchar_t)((value < 10) ? (L'0' + value) : (L'A' + (value - 10))); +} +static inline void AddHexToString(UString &res, Byte value) +{ + res += GetHex((Byte)(value >> 4)); + res += GetHex((Byte)(value & 0xF)); +} + +#endif + +bool CHandler::IsEncrypted(UInt32 index2) const +{ + CNum folderIndex = _db.FileIndexToFolderIndexMap[index2]; + if (folderIndex != kNumNoIndex) + return _db.Folders[folderIndex].IsEncrypted(); + return false; +} + +STDMETHODIMP CHandler::GetProperty(UInt32 index, PROPID propID, PROPVARIANT *value) +{ + COM_TRY_BEGIN + NCOM::CPropVariant prop; + + /* + const CRef2 &ref2 = _refs[index]; + if (ref2.Refs.IsEmpty()) + return E_FAIL; + const CRef &ref = ref2.Refs.Front(); + */ + + const CFileItem &item = _db.Files[index]; + UInt32 index2 = index; + + switch(propID) + { + case kpidPath: + if (!item.Name.IsEmpty()) + prop = NItemName::GetOSName(item.Name); + break; + case kpidIsDir: prop = item.IsDir; break; + case kpidSize: + { + prop = item.Size; + // prop = ref2.Size; + break; + } + case kpidPackSize: + { + // prop = ref2.PackSize; + { + CNum folderIndex = _db.FileIndexToFolderIndexMap[index2]; + if (folderIndex != kNumNoIndex) + { + if (_db.FolderStartFileIndex[folderIndex] == (CNum)index2) + prop = _db.GetFolderFullPackSize(folderIndex); + /* + else + prop = (UInt64)0; + */ + } + else + prop = (UInt64)0; + } + break; + } + case kpidPosition: { UInt64 v; if (_db.StartPos.GetItem(index2, v)) prop = v; break; } + case kpidCTime: SetPropFromUInt64Def(_db.CTime, index2, prop); break; + case kpidATime: SetPropFromUInt64Def(_db.ATime, index2, prop); break; + case kpidMTime: SetPropFromUInt64Def(_db.MTime, index2, prop); break; + case kpidAttrib: if (item.AttribDefined) prop = item.Attrib; break; + case kpidCRC: if (item.CrcDefined) prop = item.Crc; break; + case kpidEncrypted: prop = IsEncrypted(index2); break; + case kpidIsAnti: prop = _db.IsItemAnti(index2); break; + #ifndef _SFX + case kpidMethod: + { + CNum folderIndex = _db.FileIndexToFolderIndexMap[index2]; + if (folderIndex != kNumNoIndex) + { + const CFolder &folderInfo = _db.Folders[folderIndex]; + UString methodsString; + for (int i = folderInfo.Coders.Size() - 1; i >= 0; i--) + { + const CCoderInfo &coder = folderInfo.Coders[i]; + if (!methodsString.IsEmpty()) + methodsString += L' '; + + UString methodName, propsString; + bool methodIsKnown = FindMethod( + EXTERNAL_CODECS_VARS + coder.MethodID, methodName); + + if (!methodIsKnown) + methodsString += ConvertMethodIdToString(coder.MethodID); + else + { + methodsString += methodName; + if (coder.MethodID == k_Delta && coder.Props.GetCapacity() == 1) + propsString = ConvertUInt32ToString((UInt32)coder.Props[0] + 1); + else if (coder.MethodID == k_LZMA && coder.Props.GetCapacity() == 5) + { + UInt32 dicSize = GetUi32((const Byte *)coder.Props + 1); + propsString = GetStringForSizeValue(dicSize); + } + else if (coder.MethodID == k_LZMA2 && coder.Props.GetCapacity() == 1) + { + Byte p = coder.Props[0]; + UInt32 dicSize = (((UInt32)2 | ((p) & 1)) << ((p) / 2 + 11)); + propsString = GetStringForSizeValue(dicSize); + } + else if (coder.MethodID == k_PPMD && coder.Props.GetCapacity() == 5) + { + Byte order = *(const Byte *)coder.Props; + propsString = L'o'; + propsString += ConvertUInt32ToString(order); + propsString += L":mem"; + UInt32 dicSize = GetUi32((const Byte *)coder.Props + 1); + propsString += GetStringForSizeValue(dicSize); + } + else if (coder.MethodID == k_AES && coder.Props.GetCapacity() >= 1) + { + const Byte *data = (const Byte *)coder.Props; + Byte firstByte = *data++; + UInt32 numCyclesPower = firstByte & 0x3F; + propsString = ConvertUInt32ToString(numCyclesPower); + /* + if ((firstByte & 0xC0) != 0) + { + UInt32 saltSize = (firstByte >> 7) & 1; + UInt32 ivSize = (firstByte >> 6) & 1; + if (coder.Props.GetCapacity() >= 2) + { + Byte secondByte = *data++; + saltSize += (secondByte >> 4); + ivSize += (secondByte & 0x0F); + } + } + */ + } + } + if (!propsString.IsEmpty()) + { + methodsString += L':'; + methodsString += propsString; + } + else if (coder.Props.GetCapacity() > 0) + { + methodsString += L":["; + for (size_t bi = 0; bi < coder.Props.GetCapacity(); bi++) + { + if (bi > 5 && bi + 1 < coder.Props.GetCapacity()) + { + methodsString += L".."; + break; + } + else + AddHexToString(methodsString, coder.Props[bi]); + } + methodsString += L']'; + } + } + prop = methodsString; + } + } + break; + case kpidBlock: + { + CNum folderIndex = _db.FileIndexToFolderIndexMap[index2]; + if (folderIndex != kNumNoIndex) + prop = (UInt32)folderIndex; + } + break; + case kpidPackedSize0: + case kpidPackedSize1: + case kpidPackedSize2: + case kpidPackedSize3: + case kpidPackedSize4: + { + CNum folderIndex = _db.FileIndexToFolderIndexMap[index2]; + if (folderIndex != kNumNoIndex) + { + const CFolder &folderInfo = _db.Folders[folderIndex]; + if (_db.FolderStartFileIndex[folderIndex] == (CNum)index2 && + folderInfo.PackStreams.Size() > (int)(propID - kpidPackedSize0)) + { + prop = _db.GetFolderPackStreamSize(folderIndex, propID - kpidPackedSize0); + } + else + prop = (UInt64)0; + } + else + prop = (UInt64)0; + } + break; + #endif + } + prop.Detach(value); + return S_OK; + COM_TRY_END +} + +STDMETHODIMP CHandler::Open(IInStream *stream, + const UInt64 *maxCheckStartPosition, + IArchiveOpenCallback *openArchiveCallback) +{ + COM_TRY_BEGIN + Close(); + #ifndef _SFX + _fileInfoPopIDs.Clear(); + #endif + try + { + CMyComPtr openArchiveCallbackTemp = openArchiveCallback; + + #ifndef _NO_CRYPTO + CMyComPtr getTextPassword; + if (openArchiveCallback) + { + openArchiveCallbackTemp.QueryInterface( + IID_ICryptoGetTextPassword, &getTextPassword); + } + #endif + CInArchive archive; + RINOK(archive.Open(stream, maxCheckStartPosition)); + #ifndef _NO_CRYPTO + _passwordIsDefined = false; + UString password; + #endif + HRESULT result = archive.ReadDatabase( + EXTERNAL_CODECS_VARS + _db + #ifndef _NO_CRYPTO + , getTextPassword, _passwordIsDefined + #endif + ); + RINOK(result); + _db.Fill(); + _inStream = stream; + } + catch(...) + { + Close(); + return S_FALSE; + } + // _inStream = stream; + #ifndef _SFX + FillPopIDs(); + #endif + return S_OK; + COM_TRY_END +} + +STDMETHODIMP CHandler::Close() +{ + COM_TRY_BEGIN + _inStream.Release(); + _db.Clear(); + return S_OK; + COM_TRY_END +} + +#ifdef __7Z_SET_PROPERTIES +#ifdef EXTRACT_ONLY + +STDMETHODIMP CHandler::SetProperties(const wchar_t **names, const PROPVARIANT *values, Int32 numProperties) +{ + COM_TRY_BEGIN + const UInt32 numProcessors = NSystem::GetNumberOfProcessors(); + _numThreads = numProcessors; + + for (int i = 0; i < numProperties; i++) + { + UString name = names[i]; + name.MakeUpper(); + if (name.IsEmpty()) + return E_INVALIDARG; + const PROPVARIANT &value = values[i]; + UInt32 number; + int index = ParseStringToUInt32(name, number); + if (index == 0) + { + if(name.Left(2).CompareNoCase(L"MT") == 0) + { + RINOK(ParseMtProp(name.Mid(2), value, numProcessors, _numThreads)); + continue; + } + else + return E_INVALIDARG; + } + } + return S_OK; + COM_TRY_END +} + +#endif +#endif + +IMPL_ISetCompressCodecsInfo + +}} diff --git a/CPP/7zip/Archive/7z/7zHandler.h b/CPP/7zip/Archive/7z/7zHandler.h new file mode 100644 index 0000000..56062d4 --- /dev/null +++ b/CPP/7zip/Archive/7z/7zHandler.h @@ -0,0 +1,119 @@ +// 7z/Handler.h + +#ifndef __7Z_HANDLER_H +#define __7Z_HANDLER_H + +#include "../../ICoder.h" +#include "../IArchive.h" + +#include "../../Common/CreateCoder.h" + +#ifndef EXTRACT_ONLY +#include "../Common/HandlerOut.h" +#endif + +#include "7zCompressionMode.h" +#include "7zIn.h" + +namespace NArchive { +namespace N7z { + +#ifndef __7Z_SET_PROPERTIES + +#ifdef EXTRACT_ONLY +#if !defined(_7ZIP_ST) && !defined(_SFX) +#define __7Z_SET_PROPERTIES +#endif +#else +#define __7Z_SET_PROPERTIES +#endif + +#endif + + +class CHandler: + #ifndef EXTRACT_ONLY + public NArchive::COutHandler, + #endif + public IInArchive, + #ifdef __7Z_SET_PROPERTIES + public ISetProperties, + #endif + #ifndef EXTRACT_ONLY + public IOutArchive, + #endif + PUBLIC_ISetCompressCodecsInfo + public CMyUnknownImp +{ +public: + MY_QUERYINTERFACE_BEGIN2(IInArchive) + #ifdef __7Z_SET_PROPERTIES + MY_QUERYINTERFACE_ENTRY(ISetProperties) + #endif + #ifndef EXTRACT_ONLY + MY_QUERYINTERFACE_ENTRY(IOutArchive) + #endif + QUERY_ENTRY_ISetCompressCodecsInfo + MY_QUERYINTERFACE_END + MY_ADDREF_RELEASE + + INTERFACE_IInArchive(;) + + #ifdef __7Z_SET_PROPERTIES + STDMETHOD(SetProperties)(const wchar_t **names, const PROPVARIANT *values, Int32 numProperties); + #endif + + #ifndef EXTRACT_ONLY + INTERFACE_IOutArchive(;) + #endif + + DECL_ISetCompressCodecsInfo + + CHandler(); + +private: + CMyComPtr _inStream; + NArchive::N7z::CArchiveDatabaseEx _db; + #ifndef _NO_CRYPTO + bool _passwordIsDefined; + #endif + + #ifdef EXTRACT_ONLY + + #ifdef __7Z_SET_PROPERTIES + UInt32 _numThreads; + #endif + + UInt32 _crcSize; + + #else + + CRecordVector _binds; + + HRESULT SetCompressionMethod(CCompressionMethodMode &method, + CObjectVector &methodsInfo + #ifndef _7ZIP_ST + , UInt32 numThreads + #endif + ); + + HRESULT SetCompressionMethod( + CCompressionMethodMode &method, + CCompressionMethodMode &headerMethod); + + #endif + + bool IsEncrypted(UInt32 index2) const; + #ifndef _SFX + + CRecordVector _fileInfoPopIDs; + void FillPopIDs(); + + #endif + + DECL_EXTERNAL_CODECS_VARS +}; + +}} + +#endif diff --git a/CPP/7zip/Archive/7z/7zHandlerOut.cpp b/CPP/7zip/Archive/7z/7zHandlerOut.cpp new file mode 100644 index 0000000..a8ccab6 --- /dev/null +++ b/CPP/7zip/Archive/7z/7zHandlerOut.cpp @@ -0,0 +1,483 @@ +// 7zHandlerOut.cpp + +#include "StdAfx.h" + +#include "../../../Windows/PropVariant.h" + +#include "../../../Common/ComTry.h" +#include "../../../Common/StringToInt.h" + +#include "../../ICoder.h" + +#include "../Common/ItemNameUtils.h" +#include "../Common/ParseProperties.h" + +#include "7zHandler.h" +#include "7zOut.h" +#include "7zUpdate.h" + +using namespace NWindows; + +namespace NArchive { +namespace N7z { + +static const wchar_t *kLZMAMethodName = L"LZMA"; +static const wchar_t *kCopyMethod = L"Copy"; +static const wchar_t *kDefaultMethodName = kLZMAMethodName; + +static const UInt32 kLzmaAlgorithmX5 = 1; +static const wchar_t *kLzmaMatchFinderForHeaders = L"BT2"; +static const UInt32 kDictionaryForHeaders = + #ifdef UNDER_CE + 1 << 18 + #else + 1 << 20 + #endif +; +static const UInt32 kNumFastBytesForHeaders = 273; +static const UInt32 kAlgorithmForHeaders = kLzmaAlgorithmX5; + +static inline bool IsCopyMethod(const UString &methodName) + { return (methodName.CompareNoCase(kCopyMethod) == 0); } + +STDMETHODIMP CHandler::GetFileTimeType(UInt32 *type) +{ + *type = NFileTimeType::kWindows; + return S_OK; +} + +HRESULT CHandler::SetCompressionMethod( + CCompressionMethodMode &methodMode, + CCompressionMethodMode &headerMethod) +{ + HRESULT res = SetCompressionMethod(methodMode, _methods + #ifndef _7ZIP_ST + , _numThreads + #endif + ); + RINOK(res); + methodMode.Binds = _binds; + + if (_compressHeaders) + { + // headerMethod.Methods.Add(methodMode.Methods.Back()); + + CObjectVector headerMethodInfoVector; + COneMethodInfo oneMethodInfo; + oneMethodInfo.MethodName = kLZMAMethodName; + { + CProp prop; + prop.Id = NCoderPropID::kMatchFinder; + prop.Value = kLzmaMatchFinderForHeaders; + oneMethodInfo.Props.Add(prop); + } + { + CProp prop; + prop.Id = NCoderPropID::kAlgorithm; + prop.Value = kAlgorithmForHeaders; + oneMethodInfo.Props.Add(prop); + } + { + CProp prop; + prop.Id = NCoderPropID::kNumFastBytes; + prop.Value = (UInt32)kNumFastBytesForHeaders; + oneMethodInfo.Props.Add(prop); + } + { + CProp prop; + prop.Id = NCoderPropID::kDictionarySize; + prop.Value = (UInt32)kDictionaryForHeaders; + oneMethodInfo.Props.Add(prop); + } + headerMethodInfoVector.Add(oneMethodInfo); + HRESULT res = SetCompressionMethod(headerMethod, headerMethodInfoVector + #ifndef _7ZIP_ST + , 1 + #endif + ); + RINOK(res); + } + return S_OK; +} + +HRESULT CHandler::SetCompressionMethod( + CCompressionMethodMode &methodMode, + CObjectVector &methodsInfo + #ifndef _7ZIP_ST + , UInt32 numThreads + #endif + ) +{ + UInt32 level = _level; + + if (methodsInfo.IsEmpty()) + { + COneMethodInfo oneMethodInfo; + oneMethodInfo.MethodName = ((level == 0) ? kCopyMethod : kDefaultMethodName); + methodsInfo.Add(oneMethodInfo); + } + + bool needSolid = false; + for(int i = 0; i < methodsInfo.Size(); i++) + { + COneMethodInfo &oneMethodInfo = methodsInfo[i]; + SetCompressionMethod2(oneMethodInfo + #ifndef _7ZIP_ST + , numThreads + #endif + ); + + if (!IsCopyMethod(oneMethodInfo.MethodName)) + needSolid = true; + + CMethodFull methodFull; + + if (!FindMethod( + EXTERNAL_CODECS_VARS + oneMethodInfo.MethodName, methodFull.Id, methodFull.NumInStreams, methodFull.NumOutStreams)) + return E_INVALIDARG; + methodFull.Props = oneMethodInfo.Props; + methodMode.Methods.Add(methodFull); + + if (!_numSolidBytesDefined) + { + for (int j = 0; j < methodFull.Props.Size(); j++) + { + const CProp &prop = methodFull.Props[j]; + if ((prop.Id == NCoderPropID::kDictionarySize || + prop.Id == NCoderPropID::kUsedMemorySize) && prop.Value.vt == VT_UI4) + { + _numSolidBytes = ((UInt64)prop.Value.ulVal) << 7; + const UInt64 kMinSize = (1 << 24); + if (_numSolidBytes < kMinSize) + _numSolidBytes = kMinSize; + _numSolidBytesDefined = true; + break; + } + } + } + } + + if (!needSolid && !_numSolidBytesDefined) + { + _numSolidBytesDefined = true; + _numSolidBytes = 0; + } + return S_OK; +} + +static HRESULT GetTime(IArchiveUpdateCallback *updateCallback, int index, bool writeTime, PROPID propID, UInt64 &ft, bool &ftDefined) +{ + ft = 0; + ftDefined = false; + if (!writeTime) + return S_OK; + NCOM::CPropVariant prop; + RINOK(updateCallback->GetProperty(index, propID, &prop)); + if (prop.vt == VT_FILETIME) + { + ft = prop.filetime.dwLowDateTime | ((UInt64)prop.filetime.dwHighDateTime << 32); + ftDefined = true; + } + else if (prop.vt != VT_EMPTY) + return E_INVALIDARG; + return S_OK; +} + +STDMETHODIMP CHandler::UpdateItems(ISequentialOutStream *outStream, UInt32 numItems, + IArchiveUpdateCallback *updateCallback) +{ + COM_TRY_BEGIN + + const CArchiveDatabaseEx *db = 0; + #ifdef _7Z_VOL + if (_volumes.Size() > 1) + return E_FAIL; + const CVolume *volume = 0; + if (_volumes.Size() == 1) + { + volume = &_volumes.Front(); + db = &volume->Database; + } + #else + if (_inStream != 0) + db = &_db; + #endif + + CObjectVector updateItems; + + for (UInt32 i = 0; i < numItems; i++) + { + Int32 newData, newProps; + UInt32 indexInArchive; + if (!updateCallback) + return E_FAIL; + RINOK(updateCallback->GetUpdateItemInfo(i, &newData, &newProps, &indexInArchive)); + CUpdateItem ui; + ui.NewProps = IntToBool(newProps); + ui.NewData = IntToBool(newData); + ui.IndexInArchive = indexInArchive; + ui.IndexInClient = i; + ui.IsAnti = false; + ui.Size = 0; + + if (ui.IndexInArchive != -1) + { + if (db == 0 || ui.IndexInArchive >= db->Files.Size()) + return E_INVALIDARG; + const CFileItem &fi = db->Files[ui.IndexInArchive]; + ui.Name = fi.Name; + ui.IsDir = fi.IsDir; + ui.Size = fi.Size; + ui.IsAnti = db->IsItemAnti(ui.IndexInArchive); + + ui.CTimeDefined = db->CTime.GetItem(ui.IndexInArchive, ui.CTime); + ui.ATimeDefined = db->ATime.GetItem(ui.IndexInArchive, ui.ATime); + ui.MTimeDefined = db->MTime.GetItem(ui.IndexInArchive, ui.MTime); + } + + if (ui.NewProps) + { + bool nameIsDefined; + bool folderStatusIsDefined; + { + NCOM::CPropVariant prop; + RINOK(updateCallback->GetProperty(i, kpidAttrib, &prop)); + if (prop.vt == VT_EMPTY) + ui.AttribDefined = false; + else if (prop.vt != VT_UI4) + return E_INVALIDARG; + else + { + ui.Attrib = prop.ulVal; + ui.AttribDefined = true; + } + } + + // we need MTime to sort files. + RINOK(GetTime(updateCallback, i, WriteCTime, kpidCTime, ui.CTime, ui.CTimeDefined)); + RINOK(GetTime(updateCallback, i, WriteATime, kpidATime, ui.ATime, ui.ATimeDefined)); + RINOK(GetTime(updateCallback, i, true, kpidMTime, ui.MTime, ui.MTimeDefined)); + + { + NCOM::CPropVariant prop; + RINOK(updateCallback->GetProperty(i, kpidPath, &prop)); + if (prop.vt == VT_EMPTY) + nameIsDefined = false; + else if (prop.vt != VT_BSTR) + return E_INVALIDARG; + else + { + ui.Name = NItemName::MakeLegalName(prop.bstrVal); + nameIsDefined = true; + } + } + { + NCOM::CPropVariant prop; + RINOK(updateCallback->GetProperty(i, kpidIsDir, &prop)); + if (prop.vt == VT_EMPTY) + folderStatusIsDefined = false; + else if (prop.vt != VT_BOOL) + return E_INVALIDARG; + else + { + ui.IsDir = (prop.boolVal != VARIANT_FALSE); + folderStatusIsDefined = true; + } + } + + { + NCOM::CPropVariant prop; + RINOK(updateCallback->GetProperty(i, kpidIsAnti, &prop)); + if (prop.vt == VT_EMPTY) + ui.IsAnti = false; + else if (prop.vt != VT_BOOL) + return E_INVALIDARG; + else + ui.IsAnti = (prop.boolVal != VARIANT_FALSE); + } + + if (ui.IsAnti) + { + ui.AttribDefined = false; + + ui.CTimeDefined = false; + ui.ATimeDefined = false; + ui.MTimeDefined = false; + + ui.Size = 0; + } + + if (!folderStatusIsDefined && ui.AttribDefined) + ui.SetDirStatusFromAttrib(); + } + + if (ui.NewData) + { + NCOM::CPropVariant prop; + RINOK(updateCallback->GetProperty(i, kpidSize, &prop)); + if (prop.vt != VT_UI8) + return E_INVALIDARG; + ui.Size = (UInt64)prop.uhVal.QuadPart; + if (ui.Size != 0 && ui.IsAnti) + return E_INVALIDARG; + } + updateItems.Add(ui); + } + + CCompressionMethodMode methodMode, headerMethod; + RINOK(SetCompressionMethod(methodMode, headerMethod)); + #ifndef _7ZIP_ST + methodMode.NumThreads = _numThreads; + headerMethod.NumThreads = 1; + #endif + + CMyComPtr getPassword2; + updateCallback->QueryInterface(IID_ICryptoGetTextPassword2, (void **)&getPassword2); + + if (getPassword2) + { + CMyComBSTR password; + Int32 passwordIsDefined; + RINOK(getPassword2->CryptoGetTextPassword2(&passwordIsDefined, &password)); + methodMode.PasswordIsDefined = IntToBool(passwordIsDefined); + if (methodMode.PasswordIsDefined) + methodMode.Password = password; + } + else + methodMode.PasswordIsDefined = false; + + bool compressMainHeader = _compressHeaders; // check it + + bool encryptHeaders = false; + + if (methodMode.PasswordIsDefined) + { + if (_encryptHeadersSpecified) + encryptHeaders = _encryptHeaders; + #ifndef _NO_CRYPTO + else + encryptHeaders = _passwordIsDefined; + #endif + compressMainHeader = true; + if (encryptHeaders) + { + headerMethod.PasswordIsDefined = methodMode.PasswordIsDefined; + headerMethod.Password = methodMode.Password; + } + } + + if (numItems < 2) + compressMainHeader = false; + + CUpdateOptions options; + options.Method = &methodMode; + options.HeaderMethod = (_compressHeaders || encryptHeaders) ? &headerMethod : 0; + options.UseFilters = _level != 0 && _autoFilter; + options.MaxFilter = _level >= 8; + + options.HeaderOptions.CompressMainHeader = compressMainHeader; + options.HeaderOptions.WriteCTime = WriteCTime; + options.HeaderOptions.WriteATime = WriteATime; + options.HeaderOptions.WriteMTime = WriteMTime; + + options.NumSolidFiles = _numSolidFiles; + options.NumSolidBytes = _numSolidBytes; + options.SolidExtension = _solidExtension; + options.RemoveSfxBlock = _removeSfxBlock; + options.VolumeMode = _volumeMode; + + COutArchive archive; + CArchiveDatabase newDatabase; + + CMyComPtr getPassword; + updateCallback->QueryInterface(IID_ICryptoGetTextPassword, (void **)&getPassword); + + HRESULT res = Update( + EXTERNAL_CODECS_VARS + #ifdef _7Z_VOL + volume ? volume->Stream: 0, + volume ? db : 0, + #else + _inStream, + db, + #endif + updateItems, + archive, newDatabase, outStream, updateCallback, options + #ifndef _NO_CRYPTO + , getPassword + #endif + ); + + RINOK(res); + + updateItems.ClearAndFree(); + + return archive.WriteDatabase(EXTERNAL_CODECS_VARS + newDatabase, options.HeaderMethod, options.HeaderOptions); + + COM_TRY_END +} + +static HRESULT GetBindInfoPart(UString &srcString, UInt32 &coder, UInt32 &stream) +{ + stream = 0; + int index = ParseStringToUInt32(srcString, coder); + if (index == 0) + return E_INVALIDARG; + srcString.Delete(0, index); + if (srcString[0] == 'S') + { + srcString.Delete(0); + int index = ParseStringToUInt32(srcString, stream); + if (index == 0) + return E_INVALIDARG; + srcString.Delete(0, index); + } + return S_OK; +} + +static HRESULT GetBindInfo(UString &srcString, CBind &bind) +{ + RINOK(GetBindInfoPart(srcString, bind.OutCoder, bind.OutStream)); + if (srcString[0] != ':') + return E_INVALIDARG; + srcString.Delete(0); + RINOK(GetBindInfoPart(srcString, bind.InCoder, bind.InStream)); + if (!srcString.IsEmpty()) + return E_INVALIDARG; + return S_OK; +} + +STDMETHODIMP CHandler::SetProperties(const wchar_t **names, const PROPVARIANT *values, Int32 numProperties) +{ + COM_TRY_BEGIN + _binds.Clear(); + BeforeSetProperty(); + + for (int i = 0; i < numProperties; i++) + { + UString name = names[i]; + name.MakeUpper(); + if (name.IsEmpty()) + return E_INVALIDARG; + + const PROPVARIANT &value = values[i]; + + if (name[0] == 'B') + { + name.Delete(0); + CBind bind; + RINOK(GetBindInfo(name, bind)); + _binds.Add(bind); + continue; + } + + RINOK(SetProperty(name, value)); + } + + return S_OK; + COM_TRY_END +} + +}} diff --git a/CPP/7zip/Archive/7z/7zHeader.cpp b/CPP/7zip/Archive/7z/7zHeader.cpp new file mode 100644 index 0000000..5b5f2fb --- /dev/null +++ b/CPP/7zip/Archive/7z/7zHeader.cpp @@ -0,0 +1,14 @@ +// 7zHeader.cpp + +#include "StdAfx.h" +#include "7zHeader.h" + +namespace NArchive { +namespace N7z { + +Byte kSignature[kSignatureSize] = {'7', 'z', 0xBC, 0xAF, 0x27, 0x1C}; +#ifdef _7Z_VOL +Byte kFinishSignature[kSignatureSize] = {'7', 'z', 0xBC, 0xAF, 0x27, 0x1C + 1}; +#endif + +}} diff --git a/CPP/7zip/Archive/7z/7zHeader.h b/CPP/7zip/Archive/7z/7zHeader.h new file mode 100644 index 0000000..30622b9 --- /dev/null +++ b/CPP/7zip/Archive/7z/7zHeader.h @@ -0,0 +1,97 @@ +// 7z/7zHeader.h + +#ifndef __7Z_HEADER_H +#define __7Z_HEADER_H + +#include "../../../Common/Types.h" + +namespace NArchive { +namespace N7z { + +const int kSignatureSize = 6; +extern Byte kSignature[kSignatureSize]; + +// #define _7Z_VOL +// 7z-MultiVolume is not finished yet. +// It can work already, but I still do not like some +// things of that new multivolume format. +// So please keep it commented. + +#ifdef _7Z_VOL +extern Byte kFinishSignature[kSignatureSize]; +#endif + +struct CArchiveVersion +{ + Byte Major; + Byte Minor; +}; + +const Byte kMajorVersion = 0; + +struct CStartHeader +{ + UInt64 NextHeaderOffset; + UInt64 NextHeaderSize; + UInt32 NextHeaderCRC; +}; + +const UInt32 kStartHeaderSize = 20; + +#ifdef _7Z_VOL +struct CFinishHeader: public CStartHeader +{ + UInt64 ArchiveStartOffset; // data offset from end if that struct + UInt64 AdditionalStartBlockSize; // start signature & start header size +}; + +const UInt32 kFinishHeaderSize = kStartHeaderSize + 16; +#endif + +namespace NID +{ + enum EEnum + { + kEnd, + + kHeader, + + kArchiveProperties, + + kAdditionalStreamsInfo, + kMainStreamsInfo, + kFilesInfo, + + kPackInfo, + kUnpackInfo, + kSubStreamsInfo, + + kSize, + kCRC, + + kFolder, + + kCodersUnpackSize, + kNumUnpackStream, + + kEmptyStream, + kEmptyFile, + kAnti, + + kName, + kCTime, + kATime, + kMTime, + kWinAttributes, + kComment, + + kEncodedHeader, + + kStartPos, + kDummy + }; +} + +}} + +#endif diff --git a/CPP/7zip/Archive/7z/7zIn.cpp b/CPP/7zip/Archive/7z/7zIn.cpp new file mode 100644 index 0000000..0feb81d --- /dev/null +++ b/CPP/7zip/Archive/7z/7zIn.cpp @@ -0,0 +1,1276 @@ +// 7zIn.cpp + +#include "StdAfx.h" + +#include "../../../../C/7zCrc.h" +#include "../../../../C/CpuArch.h" + +#include "../../Common/StreamObjects.h" +#include "../../Common/StreamUtils.h" + +#include "7zDecode.h" +#include "7zIn.h" + +#define Get16(p) GetUi16(p) +#define Get32(p) GetUi32(p) +#define Get64(p) GetUi64(p) + +// define FORMAT_7Z_RECOVERY if you want to recover multivolume archives with empty StartHeader +#ifndef _SFX +#define FORMAT_7Z_RECOVERY +#endif + +namespace NArchive { +namespace N7z { + +static void BoolVector_Fill_False(CBoolVector &v, int size) +{ + v.Clear(); + v.Reserve(size); + for (int i = 0; i < size; i++) + v.Add(false); +} + +static bool BoolVector_GetAndSet(CBoolVector &v, UInt32 index) +{ + if (index >= (UInt32)v.Size()) + return true; + bool res = v[index]; + v[index] = true; + return res; +} + +bool CFolder::CheckStructure() const +{ + const int kNumCodersMax = sizeof(UInt32) * 8; // don't change it + const int kMaskSize = sizeof(UInt32) * 8; // it must be >= kNumCodersMax + const int kNumBindsMax = 32; + + if (Coders.Size() > kNumCodersMax || BindPairs.Size() > kNumBindsMax) + return false; + + { + CBoolVector v; + BoolVector_Fill_False(v, BindPairs.Size() + PackStreams.Size()); + + int i; + for (i = 0; i < BindPairs.Size(); i++) + if (BoolVector_GetAndSet(v, BindPairs[i].InIndex)) + return false; + for (i = 0; i < PackStreams.Size(); i++) + if (BoolVector_GetAndSet(v, PackStreams[i])) + return false; + + BoolVector_Fill_False(v, UnpackSizes.Size()); + for (i = 0; i < BindPairs.Size(); i++) + if (BoolVector_GetAndSet(v, BindPairs[i].OutIndex)) + return false; + } + + UInt32 mask[kMaskSize]; + int i; + for (i = 0; i < kMaskSize; i++) + mask[i] = 0; + + { + CIntVector inStreamToCoder, outStreamToCoder; + for (i = 0; i < Coders.Size(); i++) + { + CNum j; + const CCoderInfo &coder = Coders[i]; + for (j = 0; j < coder.NumInStreams; j++) + inStreamToCoder.Add(i); + for (j = 0; j < coder.NumOutStreams; j++) + outStreamToCoder.Add(i); + } + + for (i = 0; i < BindPairs.Size(); i++) + { + const CBindPair &bp = BindPairs[i]; + mask[inStreamToCoder[bp.InIndex]] |= (1 << outStreamToCoder[bp.OutIndex]); + } + } + + for (i = 0; i < kMaskSize; i++) + for (int j = 0; j < kMaskSize; j++) + if (((1 << j) & mask[i]) != 0) + mask[i] |= mask[j]; + + for (i = 0; i < kMaskSize; i++) + if (((1 << i) & mask[i]) != 0) + return false; + + return true; +} + +class CInArchiveException {}; + +static void ThrowException() { throw CInArchiveException(); } +static inline void ThrowEndOfData() { ThrowException(); } +static inline void ThrowUnsupported() { ThrowException(); } +static inline void ThrowIncorrect() { ThrowException(); } +static inline void ThrowUnsupportedVersion() { ThrowException(); } + +/* +class CInArchiveException +{ +public: + enum CCauseType + { + kUnsupportedVersion = 0, + kUnsupported, + kIncorrect, + kEndOfData + } Cause; + CInArchiveException(CCauseType cause): Cause(cause) {}; +}; + +static void ThrowException(CInArchiveException::CCauseType c) { throw CInArchiveException(c); } +static void ThrowEndOfData() { ThrowException(CInArchiveException::kEndOfData); } +static void ThrowUnsupported() { ThrowException(CInArchiveException::kUnsupported); } +static void ThrowIncorrect() { ThrowException(CInArchiveException::kIncorrect); } +static void ThrowUnsupportedVersion() { ThrowException(CInArchiveException::kUnsupportedVersion); } +*/ + +class CStreamSwitch +{ + CInArchive *_archive; + bool _needRemove; +public: + CStreamSwitch(): _needRemove(false) {} + ~CStreamSwitch() { Remove(); } + void Remove(); + void Set(CInArchive *archive, const Byte *data, size_t size); + void Set(CInArchive *archive, const CByteBuffer &byteBuffer); + void Set(CInArchive *archive, const CObjectVector *dataVector); +}; + +void CStreamSwitch::Remove() +{ + if (_needRemove) + { + _archive->DeleteByteStream(); + _needRemove = false; + } +} + +void CStreamSwitch::Set(CInArchive *archive, const Byte *data, size_t size) +{ + Remove(); + _archive = archive; + _archive->AddByteStream(data, size); + _needRemove = true; +} + +void CStreamSwitch::Set(CInArchive *archive, const CByteBuffer &byteBuffer) +{ + Set(archive, byteBuffer, byteBuffer.GetCapacity()); +} + +void CStreamSwitch::Set(CInArchive *archive, const CObjectVector *dataVector) +{ + Remove(); + Byte external = archive->ReadByte(); + if (external != 0) + { + int dataIndex = (int)archive->ReadNum(); + if (dataIndex < 0 || dataIndex >= dataVector->Size()) + ThrowIncorrect(); + Set(archive, (*dataVector)[dataIndex]); + } +} + +Byte CInByte2::ReadByte() +{ + if (_pos >= _size) + ThrowEndOfData(); + return _buffer[_pos++]; +} + +void CInByte2::ReadBytes(Byte *data, size_t size) +{ + if (size > _size - _pos) + ThrowEndOfData(); + for (size_t i = 0; i < size; i++) + data[i] = _buffer[_pos++]; +} + +void CInByte2::SkipData(UInt64 size) +{ + if (size > _size - _pos) + ThrowEndOfData(); + _pos += (size_t)size; +} + +void CInByte2::SkipData() +{ + SkipData(ReadNumber()); +} + +UInt64 CInByte2::ReadNumber() +{ + if (_pos >= _size) + ThrowEndOfData(); + Byte firstByte = _buffer[_pos++]; + Byte mask = 0x80; + UInt64 value = 0; + for (int i = 0; i < 8; i++) + { + if ((firstByte & mask) == 0) + { + UInt64 highPart = firstByte & (mask - 1); + value += (highPart << (i * 8)); + return value; + } + if (_pos >= _size) + ThrowEndOfData(); + value |= ((UInt64)_buffer[_pos++] << (8 * i)); + mask >>= 1; + } + return value; +} + +CNum CInByte2::ReadNum() +{ + UInt64 value = ReadNumber(); + if (value > kNumMax) + ThrowUnsupported(); + return (CNum)value; +} + +UInt32 CInByte2::ReadUInt32() +{ + if (_pos + 4 > _size) + ThrowEndOfData(); + UInt32 res = Get32(_buffer + _pos); + _pos += 4; + return res; +} + +UInt64 CInByte2::ReadUInt64() +{ + if (_pos + 8 > _size) + ThrowEndOfData(); + UInt64 res = Get64(_buffer + _pos); + _pos += 8; + return res; +} + +void CInByte2::ReadString(UString &s) +{ + const Byte *buf = _buffer + _pos; + size_t rem = (_size - _pos) / 2 * 2; + { + size_t i; + for (i = 0; i < rem; i += 2) + if (buf[i] == 0 && buf[i + 1] == 0) + break; + if (i == rem) + ThrowEndOfData(); + rem = i; + } + int len = (int)(rem / 2); + if (len < 0 || (size_t)len * 2 != rem) + ThrowUnsupported(); + wchar_t *p = s.GetBuffer(len); + int i; + for (i = 0; i < len; i++, buf += 2) + p[i] = (wchar_t)Get16(buf); + s.ReleaseBuffer(len); + _pos += rem + 2; +} + +static inline bool TestSignature(const Byte *p) +{ + for (int i = 0; i < kSignatureSize; i++) + if (p[i] != kSignature[i]) + return false; + return CrcCalc(p + 12, 20) == GetUi32(p + 8); +} + +#ifdef FORMAT_7Z_RECOVERY +static inline bool TestSignature2(const Byte *p) +{ + int i; + for (i = 0; i < kSignatureSize; i++) + if (p[i] != kSignature[i]) + return false; + if (CrcCalc(p + 12, 20) == GetUi32(p + 8)) + return true; + for (i = 8; i < kHeaderSize; i++) + if (p[i] != 0) + return false; + return (p[6] != 0 || p[7] != 0); +} +#else +#define TestSignature2(p) TestSignature(p) +#endif + +HRESULT CInArchive::FindAndReadSignature(IInStream *stream, const UInt64 *searchHeaderSizeLimit) +{ + RINOK(ReadStream_FALSE(stream, _header, kHeaderSize)); + + if (TestSignature2(_header)) + return S_OK; + + CByteBuffer byteBuffer; + const UInt32 kBufferSize = (1 << 16); + byteBuffer.SetCapacity(kBufferSize); + Byte *buffer = byteBuffer; + UInt32 numPrevBytes = kHeaderSize; + memcpy(buffer, _header, kHeaderSize); + UInt64 curTestPos = _arhiveBeginStreamPosition; + for (;;) + { + if (searchHeaderSizeLimit != NULL) + if (curTestPos - _arhiveBeginStreamPosition > *searchHeaderSizeLimit) + break; + do + { + UInt32 numReadBytes = kBufferSize - numPrevBytes; + UInt32 processedSize; + RINOK(stream->Read(buffer + numPrevBytes, numReadBytes, &processedSize)); + numPrevBytes += processedSize; + if (processedSize == 0) + return S_FALSE; + } + while (numPrevBytes <= kHeaderSize); + UInt32 numTests = numPrevBytes - kHeaderSize; + for (UInt32 pos = 0; pos < numTests; pos++) + { + for (; buffer[pos] != '7' && pos < numTests; pos++); + if (pos == numTests) + break; + if (TestSignature(buffer + pos)) + { + memcpy(_header, buffer + pos, kHeaderSize); + curTestPos += pos; + _arhiveBeginStreamPosition = curTestPos; + return stream->Seek(curTestPos + kHeaderSize, STREAM_SEEK_SET, NULL); + } + } + curTestPos += numTests; + numPrevBytes -= numTests; + memmove(buffer, buffer + numTests, numPrevBytes); + } + return S_FALSE; +} + +// S_FALSE means that file is not archive +HRESULT CInArchive::Open(IInStream *stream, const UInt64 *searchHeaderSizeLimit) +{ + HeadersSize = 0; + Close(); + RINOK(stream->Seek(0, STREAM_SEEK_CUR, &_arhiveBeginStreamPosition)) + RINOK(FindAndReadSignature(stream, searchHeaderSizeLimit)); + _stream = stream; + return S_OK; +} + +void CInArchive::Close() +{ + _stream.Release(); +} + +void CInArchive::ReadArchiveProperties(CInArchiveInfo & /* archiveInfo */) +{ + for (;;) + { + if (ReadID() == NID::kEnd) + break; + SkipData(); + } +} + +void CInArchive::GetNextFolderItem(CFolder &folder) +{ + CNum numCoders = ReadNum(); + + folder.Coders.Clear(); + folder.Coders.Reserve((int)numCoders); + CNum numInStreams = 0; + CNum numOutStreams = 0; + CNum i; + for (i = 0; i < numCoders; i++) + { + folder.Coders.Add(CCoderInfo()); + CCoderInfo &coder = folder.Coders.Back(); + + { + Byte mainByte = ReadByte(); + int idSize = (mainByte & 0xF); + Byte longID[15]; + ReadBytes(longID, idSize); + if (idSize > 8) + ThrowUnsupported(); + UInt64 id = 0; + for (int j = 0; j < idSize; j++) + id |= (UInt64)longID[idSize - 1 - j] << (8 * j); + coder.MethodID = id; + + if ((mainByte & 0x10) != 0) + { + coder.NumInStreams = ReadNum(); + coder.NumOutStreams = ReadNum(); + } + else + { + coder.NumInStreams = 1; + coder.NumOutStreams = 1; + } + if ((mainByte & 0x20) != 0) + { + CNum propsSize = ReadNum(); + coder.Props.SetCapacity((size_t)propsSize); + ReadBytes((Byte *)coder.Props, (size_t)propsSize); + } + if ((mainByte & 0x80) != 0) + ThrowUnsupported(); + } + numInStreams += coder.NumInStreams; + numOutStreams += coder.NumOutStreams; + } + + CNum numBindPairs = numOutStreams - 1; + folder.BindPairs.Clear(); + folder.BindPairs.Reserve(numBindPairs); + for (i = 0; i < numBindPairs; i++) + { + CBindPair bp; + bp.InIndex = ReadNum(); + bp.OutIndex = ReadNum(); + folder.BindPairs.Add(bp); + } + + if (numInStreams < numBindPairs) + ThrowUnsupported(); + CNum numPackStreams = numInStreams - numBindPairs; + folder.PackStreams.Reserve(numPackStreams); + if (numPackStreams == 1) + { + for (i = 0; i < numInStreams; i++) + if (folder.FindBindPairForInStream(i) < 0) + { + folder.PackStreams.Add(i); + break; + } + if (folder.PackStreams.Size() != 1) + ThrowUnsupported(); + } + else + for (i = 0; i < numPackStreams; i++) + folder.PackStreams.Add(ReadNum()); +} + +void CInArchive::WaitAttribute(UInt64 attribute) +{ + for (;;) + { + UInt64 type = ReadID(); + if (type == attribute) + return; + if (type == NID::kEnd) + ThrowIncorrect(); + SkipData(); + } +} + +void CInArchive::ReadHashDigests(int numItems, + CBoolVector &digestsDefined, + CRecordVector &digests) +{ + ReadBoolVector2(numItems, digestsDefined); + digests.Clear(); + digests.Reserve(numItems); + for (int i = 0; i < numItems; i++) + { + UInt32 crc = 0; + if (digestsDefined[i]) + crc = ReadUInt32(); + digests.Add(crc); + } +} + +void CInArchive::ReadPackInfo( + UInt64 &dataOffset, + CRecordVector &packSizes, + CBoolVector &packCRCsDefined, + CRecordVector &packCRCs) +{ + dataOffset = ReadNumber(); + CNum numPackStreams = ReadNum(); + + WaitAttribute(NID::kSize); + packSizes.Clear(); + packSizes.Reserve(numPackStreams); + for (CNum i = 0; i < numPackStreams; i++) + packSizes.Add(ReadNumber()); + + UInt64 type; + for (;;) + { + type = ReadID(); + if (type == NID::kEnd) + break; + if (type == NID::kCRC) + { + ReadHashDigests(numPackStreams, packCRCsDefined, packCRCs); + continue; + } + SkipData(); + } + if (packCRCsDefined.IsEmpty()) + { + BoolVector_Fill_False(packCRCsDefined, numPackStreams); + packCRCs.Reserve(numPackStreams); + packCRCs.Clear(); + for (CNum i = 0; i < numPackStreams; i++) + packCRCs.Add(0); + } +} + +void CInArchive::ReadUnpackInfo( + const CObjectVector *dataVector, + CObjectVector &folders) +{ + WaitAttribute(NID::kFolder); + CNum numFolders = ReadNum(); + + { + CStreamSwitch streamSwitch; + streamSwitch.Set(this, dataVector); + folders.Clear(); + folders.Reserve(numFolders); + for (CNum i = 0; i < numFolders; i++) + { + folders.Add(CFolder()); + GetNextFolderItem(folders.Back()); + } + } + + WaitAttribute(NID::kCodersUnpackSize); + + CNum i; + for (i = 0; i < numFolders; i++) + { + CFolder &folder = folders[i]; + CNum numOutStreams = folder.GetNumOutStreams(); + folder.UnpackSizes.Reserve(numOutStreams); + for (CNum j = 0; j < numOutStreams; j++) + folder.UnpackSizes.Add(ReadNumber()); + } + + for (;;) + { + UInt64 type = ReadID(); + if (type == NID::kEnd) + return; + if (type == NID::kCRC) + { + CBoolVector crcsDefined; + CRecordVector crcs; + ReadHashDigests(numFolders, crcsDefined, crcs); + for (i = 0; i < numFolders; i++) + { + CFolder &folder = folders[i]; + folder.UnpackCRCDefined = crcsDefined[i]; + folder.UnpackCRC = crcs[i]; + } + continue; + } + SkipData(); + } +} + +void CInArchive::ReadSubStreamsInfo( + const CObjectVector &folders, + CRecordVector &numUnpackStreamsInFolders, + CRecordVector &unpackSizes, + CBoolVector &digestsDefined, + CRecordVector &digests) +{ + numUnpackStreamsInFolders.Clear(); + numUnpackStreamsInFolders.Reserve(folders.Size()); + UInt64 type; + for (;;) + { + type = ReadID(); + if (type == NID::kNumUnpackStream) + { + for (int i = 0; i < folders.Size(); i++) + numUnpackStreamsInFolders.Add(ReadNum()); + continue; + } + if (type == NID::kCRC || type == NID::kSize) + break; + if (type == NID::kEnd) + break; + SkipData(); + } + + if (numUnpackStreamsInFolders.IsEmpty()) + for (int i = 0; i < folders.Size(); i++) + numUnpackStreamsInFolders.Add(1); + + int i; + for (i = 0; i < numUnpackStreamsInFolders.Size(); i++) + { + // v3.13 incorrectly worked with empty folders + // v4.07: we check that folder is empty + CNum numSubstreams = numUnpackStreamsInFolders[i]; + if (numSubstreams == 0) + continue; + UInt64 sum = 0; + for (CNum j = 1; j < numSubstreams; j++) + if (type == NID::kSize) + { + UInt64 size = ReadNumber(); + unpackSizes.Add(size); + sum += size; + } + unpackSizes.Add(folders[i].GetUnpackSize() - sum); + } + if (type == NID::kSize) + type = ReadID(); + + int numDigests = 0; + int numDigestsTotal = 0; + for (i = 0; i < folders.Size(); i++) + { + CNum numSubstreams = numUnpackStreamsInFolders[i]; + if (numSubstreams != 1 || !folders[i].UnpackCRCDefined) + numDigests += numSubstreams; + numDigestsTotal += numSubstreams; + } + + for (;;) + { + if (type == NID::kCRC) + { + CBoolVector digestsDefined2; + CRecordVector digests2; + ReadHashDigests(numDigests, digestsDefined2, digests2); + int digestIndex = 0; + for (i = 0; i < folders.Size(); i++) + { + CNum numSubstreams = numUnpackStreamsInFolders[i]; + const CFolder &folder = folders[i]; + if (numSubstreams == 1 && folder.UnpackCRCDefined) + { + digestsDefined.Add(true); + digests.Add(folder.UnpackCRC); + } + else + for (CNum j = 0; j < numSubstreams; j++, digestIndex++) + { + digestsDefined.Add(digestsDefined2[digestIndex]); + digests.Add(digests2[digestIndex]); + } + } + } + else if (type == NID::kEnd) + { + if (digestsDefined.IsEmpty()) + { + BoolVector_Fill_False(digestsDefined, numDigestsTotal); + digests.Clear(); + for (int i = 0; i < numDigestsTotal; i++) + digests.Add(0); + } + return; + } + else + SkipData(); + type = ReadID(); + } +} + +void CInArchive::ReadStreamsInfo( + const CObjectVector *dataVector, + UInt64 &dataOffset, + CRecordVector &packSizes, + CBoolVector &packCRCsDefined, + CRecordVector &packCRCs, + CObjectVector &folders, + CRecordVector &numUnpackStreamsInFolders, + CRecordVector &unpackSizes, + CBoolVector &digestsDefined, + CRecordVector &digests) +{ + for (;;) + { + UInt64 type = ReadID(); + if (type > ((UInt32)1 << 30)) + ThrowIncorrect(); + switch((UInt32)type) + { + case NID::kEnd: + return; + case NID::kPackInfo: + { + ReadPackInfo(dataOffset, packSizes, packCRCsDefined, packCRCs); + break; + } + case NID::kUnpackInfo: + { + ReadUnpackInfo(dataVector, folders); + break; + } + case NID::kSubStreamsInfo: + { + ReadSubStreamsInfo(folders, numUnpackStreamsInFolders, + unpackSizes, digestsDefined, digests); + break; + } + default: + ThrowIncorrect(); + } + } +} + +void CInArchive::ReadBoolVector(int numItems, CBoolVector &v) +{ + v.Clear(); + v.Reserve(numItems); + Byte b = 0; + Byte mask = 0; + for (int i = 0; i < numItems; i++) + { + if (mask == 0) + { + b = ReadByte(); + mask = 0x80; + } + v.Add((b & mask) != 0); + mask >>= 1; + } +} + +void CInArchive::ReadBoolVector2(int numItems, CBoolVector &v) +{ + Byte allAreDefined = ReadByte(); + if (allAreDefined == 0) + { + ReadBoolVector(numItems, v); + return; + } + v.Clear(); + v.Reserve(numItems); + for (int i = 0; i < numItems; i++) + v.Add(true); +} + +void CInArchive::ReadUInt64DefVector(const CObjectVector &dataVector, + CUInt64DefVector &v, int numFiles) +{ + ReadBoolVector2(numFiles, v.Defined); + + CStreamSwitch streamSwitch; + streamSwitch.Set(this, &dataVector); + v.Values.Reserve(numFiles); + + for (int i = 0; i < numFiles; i++) + { + UInt64 t = 0; + if (v.Defined[i]) + t = ReadUInt64(); + v.Values.Add(t); + } +} + +HRESULT CInArchive::ReadAndDecodePackedStreams( + DECL_EXTERNAL_CODECS_LOC_VARS + UInt64 baseOffset, + UInt64 &dataOffset, CObjectVector &dataVector + #ifndef _NO_CRYPTO + , ICryptoGetTextPassword *getTextPassword, bool &passwordIsDefined + #endif + ) +{ + CRecordVector packSizes; + CBoolVector packCRCsDefined; + CRecordVector packCRCs; + CObjectVector folders; + + CRecordVector numUnpackStreamsInFolders; + CRecordVector unpackSizes; + CBoolVector digestsDefined; + CRecordVector digests; + + ReadStreamsInfo(NULL, + dataOffset, + packSizes, + packCRCsDefined, + packCRCs, + folders, + numUnpackStreamsInFolders, + unpackSizes, + digestsDefined, + digests); + + // db.ArchiveInfo.DataStartPosition2 += db.ArchiveInfo.StartPositionAfterHeader; + + CNum packIndex = 0; + CDecoder decoder( + #ifdef _ST_MODE + false + #else + true + #endif + ); + UInt64 dataStartPos = baseOffset + dataOffset; + for (int i = 0; i < folders.Size(); i++) + { + const CFolder &folder = folders[i]; + dataVector.Add(CByteBuffer()); + CByteBuffer &data = dataVector.Back(); + UInt64 unpackSize64 = folder.GetUnpackSize(); + size_t unpackSize = (size_t)unpackSize64; + if (unpackSize != unpackSize64) + ThrowUnsupported(); + data.SetCapacity(unpackSize); + + CBufPtrSeqOutStream *outStreamSpec = new CBufPtrSeqOutStream; + CMyComPtr outStream = outStreamSpec; + outStreamSpec->Init(data, unpackSize); + + HRESULT result = decoder.Decode( + EXTERNAL_CODECS_LOC_VARS + _stream, dataStartPos, + &packSizes[packIndex], folder, outStream, NULL + #ifndef _NO_CRYPTO + , getTextPassword, passwordIsDefined + #endif + #if !defined(_7ZIP_ST) && !defined(_SFX) + , false, 1 + #endif + ); + RINOK(result); + + if (folder.UnpackCRCDefined) + if (CrcCalc(data, unpackSize) != folder.UnpackCRC) + ThrowIncorrect(); + for (int j = 0; j < folder.PackStreams.Size(); j++) + { + UInt64 packSize = packSizes[packIndex++]; + dataStartPos += packSize; + HeadersSize += packSize; + } + } + return S_OK; +} + +HRESULT CInArchive::ReadHeader( + DECL_EXTERNAL_CODECS_LOC_VARS + CArchiveDatabaseEx &db + #ifndef _NO_CRYPTO + , ICryptoGetTextPassword *getTextPassword, bool &passwordIsDefined + #endif + ) +{ + UInt64 type = ReadID(); + + if (type == NID::kArchiveProperties) + { + ReadArchiveProperties(db.ArchiveInfo); + type = ReadID(); + } + + CObjectVector dataVector; + + if (type == NID::kAdditionalStreamsInfo) + { + HRESULT result = ReadAndDecodePackedStreams( + EXTERNAL_CODECS_LOC_VARS + db.ArchiveInfo.StartPositionAfterHeader, + db.ArchiveInfo.DataStartPosition2, + dataVector + #ifndef _NO_CRYPTO + , getTextPassword, passwordIsDefined + #endif + ); + RINOK(result); + db.ArchiveInfo.DataStartPosition2 += db.ArchiveInfo.StartPositionAfterHeader; + type = ReadID(); + } + + CRecordVector unpackSizes; + CBoolVector digestsDefined; + CRecordVector digests; + + if (type == NID::kMainStreamsInfo) + { + ReadStreamsInfo(&dataVector, + db.ArchiveInfo.DataStartPosition, + db.PackSizes, + db.PackCRCsDefined, + db.PackCRCs, + db.Folders, + db.NumUnpackStreamsVector, + unpackSizes, + digestsDefined, + digests); + db.ArchiveInfo.DataStartPosition += db.ArchiveInfo.StartPositionAfterHeader; + type = ReadID(); + } + else + { + for (int i = 0; i < db.Folders.Size(); i++) + { + db.NumUnpackStreamsVector.Add(1); + CFolder &folder = db.Folders[i]; + unpackSizes.Add(folder.GetUnpackSize()); + digestsDefined.Add(folder.UnpackCRCDefined); + digests.Add(folder.UnpackCRC); + } + } + + db.Files.Clear(); + + if (type == NID::kEnd) + return S_OK; + if (type != NID::kFilesInfo) + ThrowIncorrect(); + + CNum numFiles = ReadNum(); + db.Files.Reserve(numFiles); + CNum i; + for (i = 0; i < numFiles; i++) + db.Files.Add(CFileItem()); + + db.ArchiveInfo.FileInfoPopIDs.Add(NID::kSize); + if (!db.PackSizes.IsEmpty()) + db.ArchiveInfo.FileInfoPopIDs.Add(NID::kPackInfo); + if (numFiles > 0 && !digests.IsEmpty()) + db.ArchiveInfo.FileInfoPopIDs.Add(NID::kCRC); + + CBoolVector emptyStreamVector; + BoolVector_Fill_False(emptyStreamVector, (int)numFiles); + CBoolVector emptyFileVector; + CBoolVector antiFileVector; + CNum numEmptyStreams = 0; + + for (;;) + { + UInt64 type = ReadID(); + if (type == NID::kEnd) + break; + UInt64 size = ReadNumber(); + size_t ppp = _inByteBack->_pos; + bool addPropIdToList = true; + bool isKnownType = true; + if (type > ((UInt32)1 << 30)) + isKnownType = false; + else switch((UInt32)type) + { + case NID::kName: + { + CStreamSwitch streamSwitch; + streamSwitch.Set(this, &dataVector); + for (int i = 0; i < db.Files.Size(); i++) + _inByteBack->ReadString(db.Files[i].Name); + break; + } + case NID::kWinAttributes: + { + CBoolVector boolVector; + ReadBoolVector2(db.Files.Size(), boolVector); + CStreamSwitch streamSwitch; + streamSwitch.Set(this, &dataVector); + for (i = 0; i < numFiles; i++) + { + CFileItem &file = db.Files[i]; + file.AttribDefined = boolVector[i]; + if (file.AttribDefined) + file.Attrib = ReadUInt32(); + } + break; + } + case NID::kEmptyStream: + { + ReadBoolVector(numFiles, emptyStreamVector); + for (i = 0; i < (CNum)emptyStreamVector.Size(); i++) + if (emptyStreamVector[i]) + numEmptyStreams++; + + BoolVector_Fill_False(emptyFileVector, numEmptyStreams); + BoolVector_Fill_False(antiFileVector, numEmptyStreams); + + break; + } + case NID::kEmptyFile: ReadBoolVector(numEmptyStreams, emptyFileVector); break; + case NID::kAnti: ReadBoolVector(numEmptyStreams, antiFileVector); break; + case NID::kStartPos: ReadUInt64DefVector(dataVector, db.StartPos, (int)numFiles); break; + case NID::kCTime: ReadUInt64DefVector(dataVector, db.CTime, (int)numFiles); break; + case NID::kATime: ReadUInt64DefVector(dataVector, db.ATime, (int)numFiles); break; + case NID::kMTime: ReadUInt64DefVector(dataVector, db.MTime, (int)numFiles); break; + case NID::kDummy: + { + for (UInt64 j = 0; j < size; j++) + if (ReadByte() != 0) + ThrowIncorrect(); + addPropIdToList = false; + break; + } + default: + addPropIdToList = isKnownType = false; + } + if (isKnownType) + { + if(addPropIdToList) + db.ArchiveInfo.FileInfoPopIDs.Add(type); + } + else + SkipData(size); + bool checkRecordsSize = (db.ArchiveInfo.Version.Major > 0 || + db.ArchiveInfo.Version.Minor > 2); + if (checkRecordsSize && _inByteBack->_pos - ppp != size) + ThrowIncorrect(); + } + + CNum emptyFileIndex = 0; + CNum sizeIndex = 0; + + CNum numAntiItems = 0; + for (i = 0; i < numEmptyStreams; i++) + if (antiFileVector[i]) + numAntiItems++; + + for (i = 0; i < numFiles; i++) + { + CFileItem &file = db.Files[i]; + bool isAnti; + file.HasStream = !emptyStreamVector[i]; + if (file.HasStream) + { + file.IsDir = false; + isAnti = false; + file.Size = unpackSizes[sizeIndex]; + file.Crc = digests[sizeIndex]; + file.CrcDefined = digestsDefined[sizeIndex]; + sizeIndex++; + } + else + { + file.IsDir = !emptyFileVector[emptyFileIndex]; + isAnti = antiFileVector[emptyFileIndex]; + emptyFileIndex++; + file.Size = 0; + file.CrcDefined = false; + } + if (numAntiItems != 0) + db.IsAnti.Add(isAnti); + } + return S_OK; +} + + +void CArchiveDatabaseEx::FillFolderStartPackStream() +{ + FolderStartPackStreamIndex.Clear(); + FolderStartPackStreamIndex.Reserve(Folders.Size()); + CNum startPos = 0; + for (int i = 0; i < Folders.Size(); i++) + { + FolderStartPackStreamIndex.Add(startPos); + startPos += (CNum)Folders[i].PackStreams.Size(); + } +} + +void CArchiveDatabaseEx::FillStartPos() +{ + PackStreamStartPositions.Clear(); + PackStreamStartPositions.Reserve(PackSizes.Size()); + UInt64 startPos = 0; + for (int i = 0; i < PackSizes.Size(); i++) + { + PackStreamStartPositions.Add(startPos); + startPos += PackSizes[i]; + } +} + +void CArchiveDatabaseEx::FillFolderStartFileIndex() +{ + FolderStartFileIndex.Clear(); + FolderStartFileIndex.Reserve(Folders.Size()); + FileIndexToFolderIndexMap.Clear(); + FileIndexToFolderIndexMap.Reserve(Files.Size()); + + int folderIndex = 0; + CNum indexInFolder = 0; + for (int i = 0; i < Files.Size(); i++) + { + const CFileItem &file = Files[i]; + bool emptyStream = !file.HasStream; + if (emptyStream && indexInFolder == 0) + { + FileIndexToFolderIndexMap.Add(kNumNoIndex); + continue; + } + if (indexInFolder == 0) + { + // v3.13 incorrectly worked with empty folders + // v4.07: Loop for skipping empty folders + for (;;) + { + if (folderIndex >= Folders.Size()) + ThrowIncorrect(); + FolderStartFileIndex.Add(i); // check it + if (NumUnpackStreamsVector[folderIndex] != 0) + break; + folderIndex++; + } + } + FileIndexToFolderIndexMap.Add(folderIndex); + if (emptyStream) + continue; + indexInFolder++; + if (indexInFolder >= NumUnpackStreamsVector[folderIndex]) + { + folderIndex++; + indexInFolder = 0; + } + } +} + +HRESULT CInArchive::ReadDatabase2( + DECL_EXTERNAL_CODECS_LOC_VARS + CArchiveDatabaseEx &db + #ifndef _NO_CRYPTO + , ICryptoGetTextPassword *getTextPassword, bool &passwordIsDefined + #endif + ) +{ + db.Clear(); + db.ArchiveInfo.StartPosition = _arhiveBeginStreamPosition; + + db.ArchiveInfo.Version.Major = _header[6]; + db.ArchiveInfo.Version.Minor = _header[7]; + + if (db.ArchiveInfo.Version.Major != kMajorVersion) + ThrowUnsupportedVersion(); + + UInt32 crcFromArchive = Get32(_header + 8); + UInt64 nextHeaderOffset = Get64(_header + 0xC); + UInt64 nextHeaderSize = Get64(_header + 0x14); + UInt32 nextHeaderCRC = Get32(_header + 0x1C); + UInt32 crc = CrcCalc(_header + 0xC, 20); + + #ifdef FORMAT_7Z_RECOVERY + if (crcFromArchive == 0 && nextHeaderOffset == 0 && nextHeaderSize == 0 && nextHeaderCRC == 0) + { + UInt64 cur, cur2; + RINOK(_stream->Seek(0, STREAM_SEEK_CUR, &cur)); + const int kCheckSize = 500; + Byte buf[kCheckSize]; + RINOK(_stream->Seek(0, STREAM_SEEK_END, &cur2)); + int checkSize = kCheckSize; + if (cur2 - cur < kCheckSize) + checkSize = (int)(cur2 - cur); + RINOK(_stream->Seek(-checkSize, STREAM_SEEK_END, &cur2)); + + RINOK(ReadStream_FALSE(_stream, buf, (size_t)checkSize)); + + int i; + for (i = (int)checkSize - 2; i >= 0; i--) + if (buf[i] == 0x17 && buf[i + 1] == 0x6 || buf[i] == 0x01 && buf[i + 1] == 0x04) + break; + if (i < 0) + return S_FALSE; + nextHeaderSize = checkSize - i; + nextHeaderOffset = cur2 - cur + i; + nextHeaderCRC = CrcCalc(buf + i, (size_t)nextHeaderSize); + RINOK(_stream->Seek(cur, STREAM_SEEK_SET, NULL)); + } + else + #endif + { + if (crc != crcFromArchive) + ThrowIncorrect(); + } + + db.ArchiveInfo.StartPositionAfterHeader = _arhiveBeginStreamPosition + kHeaderSize; + + if (nextHeaderSize == 0) + return S_OK; + + if (nextHeaderSize > (UInt64)0xFFFFFFFF) + return S_FALSE; + + if ((Int64)nextHeaderOffset < 0) + return S_FALSE; + + RINOK(_stream->Seek(nextHeaderOffset, STREAM_SEEK_CUR, NULL)); + + CByteBuffer buffer2; + buffer2.SetCapacity((size_t)nextHeaderSize); + + RINOK(ReadStream_FALSE(_stream, buffer2, (size_t)nextHeaderSize)); + HeadersSize += kHeaderSize + nextHeaderSize; + db.PhySize = kHeaderSize + nextHeaderOffset + nextHeaderSize; + + if (CrcCalc(buffer2, (UInt32)nextHeaderSize) != nextHeaderCRC) + ThrowIncorrect(); + + CStreamSwitch streamSwitch; + streamSwitch.Set(this, buffer2); + + CObjectVector dataVector; + + UInt64 type = ReadID(); + if (type != NID::kHeader) + { + if (type != NID::kEncodedHeader) + ThrowIncorrect(); + HRESULT result = ReadAndDecodePackedStreams( + EXTERNAL_CODECS_LOC_VARS + db.ArchiveInfo.StartPositionAfterHeader, + db.ArchiveInfo.DataStartPosition2, + dataVector + #ifndef _NO_CRYPTO + , getTextPassword, passwordIsDefined + #endif + ); + RINOK(result); + if (dataVector.Size() == 0) + return S_OK; + if (dataVector.Size() > 1) + ThrowIncorrect(); + streamSwitch.Remove(); + streamSwitch.Set(this, dataVector.Front()); + if (ReadID() != NID::kHeader) + ThrowIncorrect(); + } + + db.HeadersSize = HeadersSize; + + return ReadHeader( + EXTERNAL_CODECS_LOC_VARS + db + #ifndef _NO_CRYPTO + , getTextPassword, passwordIsDefined + #endif + ); +} + +HRESULT CInArchive::ReadDatabase( + DECL_EXTERNAL_CODECS_LOC_VARS + CArchiveDatabaseEx &db + #ifndef _NO_CRYPTO + , ICryptoGetTextPassword *getTextPassword, bool &passwordIsDefined + #endif + ) +{ + try + { + return ReadDatabase2( + EXTERNAL_CODECS_LOC_VARS db + #ifndef _NO_CRYPTO + , getTextPassword, passwordIsDefined + #endif + ); + } + catch(CInArchiveException &) { return S_FALSE; } +} + +}} diff --git a/CPP/7zip/Archive/7z/7zIn.h b/CPP/7zip/Archive/7z/7zIn.h new file mode 100644 index 0000000..971f27b --- /dev/null +++ b/CPP/7zip/Archive/7z/7zIn.h @@ -0,0 +1,245 @@ +// 7zIn.h + +#ifndef __7Z_IN_H +#define __7Z_IN_H + +#include "../../../Common/MyCom.h" + +#include "../../IPassword.h" +#include "../../IStream.h" + +#include "../../Common/CreateCoder.h" +#include "../../Common/InBuffer.h" + +#include "7zItem.h" + +namespace NArchive { +namespace N7z { + +struct CInArchiveInfo +{ + CArchiveVersion Version; + UInt64 StartPosition; + UInt64 StartPositionAfterHeader; + UInt64 DataStartPosition; + UInt64 DataStartPosition2; + CRecordVector FileInfoPopIDs; + void Clear() + { + FileInfoPopIDs.Clear(); + } +}; + +struct CArchiveDatabaseEx: public CArchiveDatabase +{ + CInArchiveInfo ArchiveInfo; + CRecordVector PackStreamStartPositions; + CRecordVector FolderStartPackStreamIndex; + CRecordVector FolderStartFileIndex; + CRecordVector FileIndexToFolderIndexMap; + + UInt64 HeadersSize; + UInt64 PhySize; + + void Clear() + { + CArchiveDatabase::Clear(); + ArchiveInfo.Clear(); + PackStreamStartPositions.Clear(); + FolderStartPackStreamIndex.Clear(); + FolderStartFileIndex.Clear(); + FileIndexToFolderIndexMap.Clear(); + + HeadersSize = 0; + PhySize = 0; + } + + void FillFolderStartPackStream(); + void FillStartPos(); + void FillFolderStartFileIndex(); + + void Fill() + { + FillFolderStartPackStream(); + FillStartPos(); + FillFolderStartFileIndex(); + } + + UInt64 GetFolderStreamPos(int folderIndex, int indexInFolder) const + { + return ArchiveInfo.DataStartPosition + + PackStreamStartPositions[FolderStartPackStreamIndex[folderIndex] + indexInFolder]; + } + + UInt64 GetFolderFullPackSize(int folderIndex) const + { + CNum packStreamIndex = FolderStartPackStreamIndex[folderIndex]; + const CFolder &folder = Folders[folderIndex]; + UInt64 size = 0; + for (int i = 0; i < folder.PackStreams.Size(); i++) + size += PackSizes[packStreamIndex + i]; + return size; + } + + UInt64 GetFolderPackStreamSize(int folderIndex, int streamIndex) const + { + return PackSizes[FolderStartPackStreamIndex[folderIndex] + streamIndex]; + } + + UInt64 GetFilePackSize(CNum fileIndex) const + { + CNum folderIndex = FileIndexToFolderIndexMap[fileIndex]; + if (folderIndex != kNumNoIndex) + if (FolderStartFileIndex[folderIndex] == fileIndex) + return GetFolderFullPackSize(folderIndex); + return 0; + } +}; + +class CInByte2 +{ + const Byte *_buffer; + size_t _size; +public: + size_t _pos; + void Init(const Byte *buffer, size_t size) + { + _buffer = buffer; + _size = size; + _pos = 0; + } + Byte ReadByte(); + void ReadBytes(Byte *data, size_t size); + void SkipData(UInt64 size); + void SkipData(); + UInt64 ReadNumber(); + CNum ReadNum(); + UInt32 ReadUInt32(); + UInt64 ReadUInt64(); + void ReadString(UString &s); +}; + +class CStreamSwitch; + +const UInt32 kHeaderSize = 32; + +class CInArchive +{ + friend class CStreamSwitch; + + CMyComPtr _stream; + + CObjectVector _inByteVector; + CInByte2 *_inByteBack; + + UInt64 _arhiveBeginStreamPosition; + + Byte _header[kHeaderSize]; + + UInt64 HeadersSize; + + void AddByteStream(const Byte *buffer, size_t size) + { + _inByteVector.Add(CInByte2()); + _inByteBack = &_inByteVector.Back(); + _inByteBack->Init(buffer, size); + } + + void DeleteByteStream() + { + _inByteVector.DeleteBack(); + if (!_inByteVector.IsEmpty()) + _inByteBack = &_inByteVector.Back(); + } + +private: + HRESULT FindAndReadSignature(IInStream *stream, const UInt64 *searchHeaderSizeLimit); + + void ReadBytes(Byte *data, size_t size) { _inByteBack->ReadBytes(data, size); } + Byte ReadByte() { return _inByteBack->ReadByte(); } + UInt64 ReadNumber() { return _inByteBack->ReadNumber(); } + CNum ReadNum() { return _inByteBack->ReadNum(); } + UInt64 ReadID() { return _inByteBack->ReadNumber(); } + UInt32 ReadUInt32() { return _inByteBack->ReadUInt32(); } + UInt64 ReadUInt64() { return _inByteBack->ReadUInt64(); } + void SkipData(UInt64 size) { _inByteBack->SkipData(size); } + void SkipData() { _inByteBack->SkipData(); } + void WaitAttribute(UInt64 attribute); + + void ReadArchiveProperties(CInArchiveInfo &archiveInfo); + void GetNextFolderItem(CFolder &itemInfo); + void ReadHashDigests(int numItems, + CBoolVector &digestsDefined, CRecordVector &digests); + + void ReadPackInfo( + UInt64 &dataOffset, + CRecordVector &packSizes, + CBoolVector &packCRCsDefined, + CRecordVector &packCRCs); + + void ReadUnpackInfo( + const CObjectVector *dataVector, + CObjectVector &folders); + + void ReadSubStreamsInfo( + const CObjectVector &folders, + CRecordVector &numUnpackStreamsInFolders, + CRecordVector &unpackSizes, + CBoolVector &digestsDefined, + CRecordVector &digests); + + void ReadStreamsInfo( + const CObjectVector *dataVector, + UInt64 &dataOffset, + CRecordVector &packSizes, + CBoolVector &packCRCsDefined, + CRecordVector &packCRCs, + CObjectVector &folders, + CRecordVector &numUnpackStreamsInFolders, + CRecordVector &unpackSizes, + CBoolVector &digestsDefined, + CRecordVector &digests); + + + void ReadBoolVector(int numItems, CBoolVector &v); + void ReadBoolVector2(int numItems, CBoolVector &v); + void ReadUInt64DefVector(const CObjectVector &dataVector, + CUInt64DefVector &v, int numFiles); + HRESULT ReadAndDecodePackedStreams( + DECL_EXTERNAL_CODECS_LOC_VARS + UInt64 baseOffset, UInt64 &dataOffset, + CObjectVector &dataVector + #ifndef _NO_CRYPTO + , ICryptoGetTextPassword *getTextPassword, bool &passwordIsDefined + #endif + ); + HRESULT ReadHeader( + DECL_EXTERNAL_CODECS_LOC_VARS + CArchiveDatabaseEx &db + #ifndef _NO_CRYPTO + ,ICryptoGetTextPassword *getTextPassword, bool &passwordIsDefined + #endif + ); + HRESULT ReadDatabase2( + DECL_EXTERNAL_CODECS_LOC_VARS + CArchiveDatabaseEx &db + #ifndef _NO_CRYPTO + ,ICryptoGetTextPassword *getTextPassword, bool &passwordIsDefined + #endif + ); +public: + HRESULT Open(IInStream *stream, const UInt64 *searchHeaderSizeLimit); // S_FALSE means is not archive + void Close(); + + HRESULT ReadDatabase( + DECL_EXTERNAL_CODECS_LOC_VARS + CArchiveDatabaseEx &db + #ifndef _NO_CRYPTO + ,ICryptoGetTextPassword *getTextPassword, bool &passwordIsDefined + #endif + ); +}; + +}} + +#endif diff --git a/CPP/7zip/Archive/7z/7zItem.h b/CPP/7zip/Archive/7z/7zItem.h new file mode 100644 index 0000000..34f1077 --- /dev/null +++ b/CPP/7zip/Archive/7z/7zItem.h @@ -0,0 +1,268 @@ +// 7zItem.h + +#ifndef __7Z_ITEM_H +#define __7Z_ITEM_H + +#include "../../../Common/Buffer.h" +#include "../../../Common/MyString.h" + +#include "../../Common/MethodId.h" + +#include "7zHeader.h" + +namespace NArchive { +namespace N7z { + +const UInt64 k_AES = 0x06F10701; + +typedef UInt32 CNum; +const CNum kNumMax = 0x7FFFFFFF; +const CNum kNumNoIndex = 0xFFFFFFFF; + +struct CCoderInfo +{ + CMethodId MethodID; + CByteBuffer Props; + CNum NumInStreams; + CNum NumOutStreams; + bool IsSimpleCoder() const { return (NumInStreams == 1) && (NumOutStreams == 1); } +}; + +struct CBindPair +{ + CNum InIndex; + CNum OutIndex; +}; + +struct CFolder +{ + CObjectVector Coders; + CRecordVector BindPairs; + CRecordVector PackStreams; + CRecordVector UnpackSizes; + UInt32 UnpackCRC; + bool UnpackCRCDefined; + + CFolder(): UnpackCRCDefined(false) {} + + UInt64 GetUnpackSize() const // test it + { + if (UnpackSizes.IsEmpty()) + return 0; + for (int i = UnpackSizes.Size() - 1; i >= 0; i--) + if (FindBindPairForOutStream(i) < 0) + return UnpackSizes[i]; + throw 1; + } + + CNum GetNumOutStreams() const + { + CNum result = 0; + for (int i = 0; i < Coders.Size(); i++) + result += Coders[i].NumOutStreams; + return result; + } + + int FindBindPairForInStream(CNum inStreamIndex) const + { + for(int i = 0; i < BindPairs.Size(); i++) + if (BindPairs[i].InIndex == inStreamIndex) + return i; + return -1; + } + int FindBindPairForOutStream(CNum outStreamIndex) const + { + for(int i = 0; i < BindPairs.Size(); i++) + if (BindPairs[i].OutIndex == outStreamIndex) + return i; + return -1; + } + int FindPackStreamArrayIndex(CNum inStreamIndex) const + { + for(int i = 0; i < PackStreams.Size(); i++) + if (PackStreams[i] == inStreamIndex) + return i; + return -1; + } + + bool IsEncrypted() const + { + for (int i = Coders.Size() - 1; i >= 0; i--) + if (Coders[i].MethodID == k_AES) + return true; + return false; + } + + bool CheckStructure() const; +}; + +struct CUInt64DefVector +{ + CRecordVector Values; + CRecordVector Defined; + + void Clear() + { + Values.Clear(); + Defined.Clear(); + } + + void ReserveDown() + { + Values.ReserveDown(); + Values.ReserveDown(); + } + + bool GetItem(int index, UInt64 &value) const + { + if (index < Defined.Size() && Defined[index]) + { + value = Values[index]; + return true; + } + value = 0; + return false; + } + + void SetItem(int index, bool defined, UInt64 value) + { + while (index >= Defined.Size()) + Defined.Add(false); + Defined[index] = defined; + if (!defined) + return; + while (index >= Values.Size()) + Values.Add(0); + Values[index] = value; + } + + bool CheckSize(int size) const { return Defined.Size() == size || Defined.Size() == 0; } +}; + +struct CFileItem +{ + UInt64 Size; + UInt32 Attrib; + UInt32 Crc; + UString Name; + + bool HasStream; // Test it !!! it means that there is + // stream in some folder. It can be empty stream + bool IsDir; + bool CrcDefined; + bool AttribDefined; + + CFileItem(): + HasStream(true), + IsDir(false), + CrcDefined(false), + AttribDefined(false) + {} + void SetAttrib(UInt32 attrib) + { + AttribDefined = true; + Attrib = attrib; + } +}; + +struct CFileItem2 +{ + UInt64 CTime; + UInt64 ATime; + UInt64 MTime; + UInt64 StartPos; + bool CTimeDefined; + bool ATimeDefined; + bool MTimeDefined; + bool StartPosDefined; + bool IsAnti; +}; + +struct CArchiveDatabase +{ + CRecordVector PackSizes; + CRecordVector PackCRCsDefined; + CRecordVector PackCRCs; + CObjectVector Folders; + CRecordVector NumUnpackStreamsVector; + CObjectVector Files; + + CUInt64DefVector CTime; + CUInt64DefVector ATime; + CUInt64DefVector MTime; + CUInt64DefVector StartPos; + CRecordVector IsAnti; + + void Clear() + { + PackSizes.Clear(); + PackCRCsDefined.Clear(); + PackCRCs.Clear(); + Folders.Clear(); + NumUnpackStreamsVector.Clear(); + Files.Clear(); + CTime.Clear(); + ATime.Clear(); + MTime.Clear(); + StartPos.Clear(); + IsAnti.Clear(); + } + + void ReserveDown() + { + PackSizes.ReserveDown(); + PackCRCsDefined.ReserveDown(); + PackCRCs.ReserveDown(); + Folders.ReserveDown(); + NumUnpackStreamsVector.ReserveDown(); + Files.ReserveDown(); + CTime.ReserveDown(); + ATime.ReserveDown(); + MTime.ReserveDown(); + StartPos.ReserveDown(); + IsAnti.ReserveDown(); + } + + bool IsEmpty() const + { + return (PackSizes.IsEmpty() && + PackCRCsDefined.IsEmpty() && + PackCRCs.IsEmpty() && + Folders.IsEmpty() && + NumUnpackStreamsVector.IsEmpty() && + Files.IsEmpty()); + } + + bool CheckNumFiles() const + { + int size = Files.Size(); + return ( + CTime.CheckSize(size) && + ATime.CheckSize(size) && + MTime.CheckSize(size) && + StartPos.CheckSize(size) && + (size == IsAnti.Size() || IsAnti.Size() == 0)); + } + + bool IsSolid() const + { + for (int i = 0; i < NumUnpackStreamsVector.Size(); i++) + if (NumUnpackStreamsVector[i] > 1) + return true; + return false; + } + bool IsItemAnti(int index) const { return (index < IsAnti.Size() && IsAnti[index]); } + void SetItemAnti(int index, bool isAnti) + { + while (index >= IsAnti.Size()) + IsAnti.Add(false); + IsAnti[index] = isAnti; + } + + void GetFile(int index, CFileItem &file, CFileItem2 &file2) const; + void AddFile(const CFileItem &file, const CFileItem2 &file2); +}; + +}} + +#endif diff --git a/CPP/7zip/Archive/7z/7zOut.cpp b/CPP/7zip/Archive/7z/7zOut.cpp new file mode 100644 index 0000000..0c8aa7e --- /dev/null +++ b/CPP/7zip/Archive/7z/7zOut.cpp @@ -0,0 +1,866 @@ +// 7zOut.cpp + +#include "StdAfx.h" + +#include "../../../../C/7zCrc.h" + +#include "../../../Common/AutoPtr.h" + +#include "../../Common/StreamObjects.h" + +#include "7zOut.h" + +static HRESULT WriteBytes(ISequentialOutStream *stream, const void *data, size_t size) +{ + while (size > 0) + { + UInt32 curSize = (UInt32)MyMin(size, (size_t)0xFFFFFFFF); + UInt32 processedSize; + RINOK(stream->Write(data, curSize, &processedSize)); + if (processedSize == 0) + return E_FAIL; + data = (const void *)((const Byte *)data + processedSize); + size -= processedSize; + } + return S_OK; +} + +namespace NArchive { +namespace N7z { + +HRESULT COutArchive::WriteDirect(const void *data, UInt32 size) +{ + return ::WriteBytes(SeqStream, data, size); +} + +HRESULT COutArchive::WriteSignature() +{ + Byte buf[8]; + memcpy(buf, kSignature, kSignatureSize); + buf[kSignatureSize] = kMajorVersion; + buf[kSignatureSize + 1] = 3; + return WriteDirect(buf, 8); +} + +#ifdef _7Z_VOL +HRESULT COutArchive::WriteFinishSignature() +{ + RINOK(WriteDirect(kFinishSignature, kSignatureSize)); + CArchiveVersion av; + av.Major = kMajorVersion; + av.Minor = 2; + RINOK(WriteDirectByte(av.Major)); + return WriteDirectByte(av.Minor); +} +#endif + +static void SetUInt32(Byte *p, UInt32 d) +{ + for (int i = 0; i < 4; i++, d >>= 8) + p[i] = (Byte)d; +} + +static void SetUInt64(Byte *p, UInt64 d) +{ + for (int i = 0; i < 8; i++, d >>= 8) + p[i] = (Byte)d; +} + +HRESULT COutArchive::WriteStartHeader(const CStartHeader &h) +{ + Byte buf[24]; + SetUInt64(buf + 4, h.NextHeaderOffset); + SetUInt64(buf + 12, h.NextHeaderSize); + SetUInt32(buf + 20, h.NextHeaderCRC); + SetUInt32(buf, CrcCalc(buf + 4, 20)); + return WriteDirect(buf, 24); +} + +#ifdef _7Z_VOL +HRESULT COutArchive::WriteFinishHeader(const CFinishHeader &h) +{ + CCRC crc; + crc.UpdateUInt64(h.NextHeaderOffset); + crc.UpdateUInt64(h.NextHeaderSize); + crc.UpdateUInt32(h.NextHeaderCRC); + crc.UpdateUInt64(h.ArchiveStartOffset); + crc.UpdateUInt64(h.AdditionalStartBlockSize); + RINOK(WriteDirectUInt32(crc.GetDigest())); + RINOK(WriteDirectUInt64(h.NextHeaderOffset)); + RINOK(WriteDirectUInt64(h.NextHeaderSize)); + RINOK(WriteDirectUInt32(h.NextHeaderCRC)); + RINOK(WriteDirectUInt64(h.ArchiveStartOffset)); + return WriteDirectUInt64(h.AdditionalStartBlockSize); +} +#endif + +HRESULT COutArchive::Create(ISequentialOutStream *stream, bool endMarker) +{ + Close(); + #ifdef _7Z_VOL + // endMarker = false; + _endMarker = endMarker; + #endif + SeqStream = stream; + if (!endMarker) + { + SeqStream.QueryInterface(IID_IOutStream, &Stream); + if (!Stream) + { + return E_NOTIMPL; + // endMarker = true; + } + } + #ifdef _7Z_VOL + if (endMarker) + { + /* + CStartHeader sh; + sh.NextHeaderOffset = (UInt32)(Int32)-1; + sh.NextHeaderSize = (UInt32)(Int32)-1; + sh.NextHeaderCRC = 0; + WriteStartHeader(sh); + */ + } + else + #endif + { + if (!Stream) + return E_FAIL; + RINOK(WriteSignature()); + RINOK(Stream->Seek(0, STREAM_SEEK_CUR, &_prefixHeaderPos)); + } + return S_OK; +} + +void COutArchive::Close() +{ + SeqStream.Release(); + Stream.Release(); +} + +HRESULT COutArchive::SkipPrefixArchiveHeader() +{ + #ifdef _7Z_VOL + if (_endMarker) + return S_OK; + #endif + return Stream->Seek(24, STREAM_SEEK_CUR, NULL); +} + +UInt64 COutArchive::GetPos() const +{ + if (_countMode) + return _countSize; + if (_writeToStream) + return _outByte.GetProcessedSize(); + return _outByte2.GetPos(); +} + +void COutArchive::WriteBytes(const void *data, size_t size) +{ + if (_countMode) + _countSize += size; + else if (_writeToStream) + { + _outByte.WriteBytes(data, size); + _crc = CrcUpdate(_crc, data, size); + } + else + _outByte2.WriteBytes(data, size); +} + +void COutArchive::WriteByte(Byte b) +{ + if (_countMode) + _countSize++; + else if (_writeToStream) + { + _outByte.WriteByte(b); + _crc = CRC_UPDATE_BYTE(_crc, b); + } + else + _outByte2.WriteByte(b); +} + +void COutArchive::WriteUInt32(UInt32 value) +{ + for (int i = 0; i < 4; i++) + { + WriteByte((Byte)value); + value >>= 8; + } +} + +void COutArchive::WriteUInt64(UInt64 value) +{ + for (int i = 0; i < 8; i++) + { + WriteByte((Byte)value); + value >>= 8; + } +} + +void COutArchive::WriteNumber(UInt64 value) +{ + Byte firstByte = 0; + Byte mask = 0x80; + int i; + for (i = 0; i < 8; i++) + { + if (value < ((UInt64(1) << ( 7 * (i + 1))))) + { + firstByte |= Byte(value >> (8 * i)); + break; + } + firstByte |= mask; + mask >>= 1; + } + WriteByte(firstByte); + for (;i > 0; i--) + { + WriteByte((Byte)value); + value >>= 8; + } +} + +static UInt32 GetBigNumberSize(UInt64 value) +{ + int i; + for (i = 1; i < 9; i++) + if (value < (((UInt64)1 << (i * 7)))) + break; + return i; +} + +#ifdef _7Z_VOL +UInt32 COutArchive::GetVolHeadersSize(UInt64 dataSize, int nameLength, bool props) +{ + UInt32 result = GetBigNumberSize(dataSize) * 2 + 41; + if (nameLength != 0) + { + nameLength = (nameLength + 1) * 2; + result += nameLength + GetBigNumberSize(nameLength) + 2; + } + if (props) + { + result += 20; + } + if (result >= 128) + result++; + result += kSignatureSize + 2 + kFinishHeaderSize; + return result; +} + +UInt64 COutArchive::GetVolPureSize(UInt64 volSize, int nameLength, bool props) +{ + UInt32 headersSizeBase = COutArchive::GetVolHeadersSize(1, nameLength, props); + int testSize; + if (volSize > headersSizeBase) + testSize = volSize - headersSizeBase; + else + testSize = 1; + UInt32 headersSize = COutArchive::GetVolHeadersSize(testSize, nameLength, props); + UInt64 pureSize = 1; + if (volSize > headersSize) + pureSize = volSize - headersSize; + return pureSize; +} +#endif + +void COutArchive::WriteFolder(const CFolder &folder) +{ + WriteNumber(folder.Coders.Size()); + int i; + for (i = 0; i < folder.Coders.Size(); i++) + { + const CCoderInfo &coder = folder.Coders[i]; + { + size_t propsSize = coder.Props.GetCapacity(); + + UInt64 id = coder.MethodID; + int idSize; + for (idSize = 1; idSize < sizeof(id); idSize++) + if ((id >> (8 * idSize)) == 0) + break; + BYTE longID[15]; + for (int t = idSize - 1; t >= 0 ; t--, id >>= 8) + longID[t] = (Byte)(id & 0xFF); + Byte b; + b = (Byte)(idSize & 0xF); + bool isComplex = !coder.IsSimpleCoder(); + b |= (isComplex ? 0x10 : 0); + b |= ((propsSize != 0) ? 0x20 : 0 ); + WriteByte(b); + WriteBytes(longID, idSize); + if (isComplex) + { + WriteNumber(coder.NumInStreams); + WriteNumber(coder.NumOutStreams); + } + if (propsSize == 0) + continue; + WriteNumber(propsSize); + WriteBytes(coder.Props, propsSize); + } + } + for (i = 0; i < folder.BindPairs.Size(); i++) + { + const CBindPair &bindPair = folder.BindPairs[i]; + WriteNumber(bindPair.InIndex); + WriteNumber(bindPair.OutIndex); + } + if (folder.PackStreams.Size() > 1) + for (i = 0; i < folder.PackStreams.Size(); i++) + { + WriteNumber(folder.PackStreams[i]); + } +} + +void COutArchive::WriteBoolVector(const CBoolVector &boolVector) +{ + Byte b = 0; + Byte mask = 0x80; + for (int i = 0; i < boolVector.Size(); i++) + { + if (boolVector[i]) + b |= mask; + mask >>= 1; + if (mask == 0) + { + WriteByte(b); + mask = 0x80; + b = 0; + } + } + if (mask != 0x80) + WriteByte(b); +} + + +void COutArchive::WriteHashDigests( + const CRecordVector &digestsDefined, + const CRecordVector &digests) +{ + int numDefined = 0; + int i; + for (i = 0; i < digestsDefined.Size(); i++) + if (digestsDefined[i]) + numDefined++; + if (numDefined == 0) + return; + + WriteByte(NID::kCRC); + if (numDefined == digestsDefined.Size()) + WriteByte(1); + else + { + WriteByte(0); + WriteBoolVector(digestsDefined); + } + for (i = 0; i < digests.Size(); i++) + if (digestsDefined[i]) + WriteUInt32(digests[i]); +} + +void COutArchive::WritePackInfo( + UInt64 dataOffset, + const CRecordVector &packSizes, + const CRecordVector &packCRCsDefined, + const CRecordVector &packCRCs) +{ + if (packSizes.IsEmpty()) + return; + WriteByte(NID::kPackInfo); + WriteNumber(dataOffset); + WriteNumber(packSizes.Size()); + WriteByte(NID::kSize); + for (int i = 0; i < packSizes.Size(); i++) + WriteNumber(packSizes[i]); + + WriteHashDigests(packCRCsDefined, packCRCs); + + WriteByte(NID::kEnd); +} + +void COutArchive::WriteUnpackInfo(const CObjectVector &folders) +{ + if (folders.IsEmpty()) + return; + + WriteByte(NID::kUnpackInfo); + + WriteByte(NID::kFolder); + WriteNumber(folders.Size()); + { + WriteByte(0); + for (int i = 0; i < folders.Size(); i++) + WriteFolder(folders[i]); + } + + WriteByte(NID::kCodersUnpackSize); + int i; + for (i = 0; i < folders.Size(); i++) + { + const CFolder &folder = folders[i]; + for (int j = 0; j < folder.UnpackSizes.Size(); j++) + WriteNumber(folder.UnpackSizes[j]); + } + + CRecordVector unpackCRCsDefined; + CRecordVector unpackCRCs; + for (i = 0; i < folders.Size(); i++) + { + const CFolder &folder = folders[i]; + unpackCRCsDefined.Add(folder.UnpackCRCDefined); + unpackCRCs.Add(folder.UnpackCRC); + } + WriteHashDigests(unpackCRCsDefined, unpackCRCs); + + WriteByte(NID::kEnd); +} + +void COutArchive::WriteSubStreamsInfo( + const CObjectVector &folders, + const CRecordVector &numUnpackStreamsInFolders, + const CRecordVector &unpackSizes, + const CRecordVector &digestsDefined, + const CRecordVector &digests) +{ + WriteByte(NID::kSubStreamsInfo); + + int i; + for (i = 0; i < numUnpackStreamsInFolders.Size(); i++) + { + if (numUnpackStreamsInFolders[i] != 1) + { + WriteByte(NID::kNumUnpackStream); + for (i = 0; i < numUnpackStreamsInFolders.Size(); i++) + WriteNumber(numUnpackStreamsInFolders[i]); + break; + } + } + + + bool needFlag = true; + CNum index = 0; + for (i = 0; i < numUnpackStreamsInFolders.Size(); i++) + for (CNum j = 0; j < numUnpackStreamsInFolders[i]; j++) + { + if (j + 1 != numUnpackStreamsInFolders[i]) + { + if (needFlag) + WriteByte(NID::kSize); + needFlag = false; + WriteNumber(unpackSizes[index]); + } + index++; + } + + CRecordVector digestsDefined2; + CRecordVector digests2; + + int digestIndex = 0; + for (i = 0; i < folders.Size(); i++) + { + int numSubStreams = (int)numUnpackStreamsInFolders[i]; + if (numSubStreams == 1 && folders[i].UnpackCRCDefined) + digestIndex++; + else + for (int j = 0; j < numSubStreams; j++, digestIndex++) + { + digestsDefined2.Add(digestsDefined[digestIndex]); + digests2.Add(digests[digestIndex]); + } + } + WriteHashDigests(digestsDefined2, digests2); + WriteByte(NID::kEnd); +} + +void COutArchive::SkipAlign(unsigned /* pos */, unsigned /* alignSize */) +{ + return; +} + +/* +7-Zip 4.50 - 4.58 contain BUG, so they do not support .7z archives with Unknown field. + +void COutArchive::SkipAlign(unsigned pos, unsigned alignSize) +{ + pos += (unsigned)GetPos(); + pos &= (alignSize - 1); + if (pos == 0) + return; + unsigned skip = alignSize - pos; + if (skip < 2) + skip += alignSize; + skip -= 2; + WriteByte(NID::kDummy); + WriteByte((Byte)skip); + for (unsigned i = 0; i < skip; i++) + WriteByte(0); +} +*/ + +static inline unsigned Bv_GetSizeInBytes(const CBoolVector &v) { return ((unsigned)v.Size() + 7) / 8; } + +void COutArchive::WriteAlignedBoolHeader(const CBoolVector &v, int numDefined, Byte type, unsigned itemSize) +{ + const unsigned bvSize = (numDefined == v.Size()) ? 0 : Bv_GetSizeInBytes(v); + const UInt64 dataSize = (UInt64)numDefined * itemSize + bvSize + 2; + SkipAlign(3 + (unsigned)bvSize + (unsigned)GetBigNumberSize(dataSize), itemSize); + + WriteByte(type); + WriteNumber(dataSize); + if (numDefined == v.Size()) + WriteByte(1); + else + { + WriteByte(0); + WriteBoolVector(v); + } + WriteByte(0); +} + +void COutArchive::WriteUInt64DefVector(const CUInt64DefVector &v, Byte type) +{ + int numDefined = 0; + + int i; + for (i = 0; i < v.Defined.Size(); i++) + if (v.Defined[i]) + numDefined++; + + if (numDefined == 0) + return; + + WriteAlignedBoolHeader(v.Defined, numDefined, type, 8); + + for (i = 0; i < v.Defined.Size(); i++) + if (v.Defined[i]) + WriteUInt64(v.Values[i]); +} + +HRESULT COutArchive::EncodeStream( + DECL_EXTERNAL_CODECS_LOC_VARS + CEncoder &encoder, const CByteBuffer &data, + CRecordVector &packSizes, CObjectVector &folders) +{ + CBufInStream *streamSpec = new CBufInStream; + CMyComPtr stream = streamSpec; + streamSpec->Init(data, data.GetCapacity()); + CFolder folderItem; + folderItem.UnpackCRCDefined = true; + folderItem.UnpackCRC = CrcCalc(data, data.GetCapacity()); + UInt64 dataSize64 = data.GetCapacity(); + RINOK(encoder.Encode( + EXTERNAL_CODECS_LOC_VARS + stream, NULL, &dataSize64, folderItem, SeqStream, packSizes, NULL)) + folders.Add(folderItem); + return S_OK; +} + +void COutArchive::WriteHeader( + const CArchiveDatabase &db, + const CHeaderOptions &headerOptions, + UInt64 &headerOffset) +{ + int i; + + UInt64 packedSize = 0; + for (i = 0; i < db.PackSizes.Size(); i++) + packedSize += db.PackSizes[i]; + + headerOffset = packedSize; + + WriteByte(NID::kHeader); + + // Archive Properties + + if (db.Folders.Size() > 0) + { + WriteByte(NID::kMainStreamsInfo); + WritePackInfo(0, db.PackSizes, + db.PackCRCsDefined, + db.PackCRCs); + + WriteUnpackInfo(db.Folders); + + CRecordVector unpackSizes; + CRecordVector digestsDefined; + CRecordVector digests; + for (i = 0; i < db.Files.Size(); i++) + { + const CFileItem &file = db.Files[i]; + if (!file.HasStream) + continue; + unpackSizes.Add(file.Size); + digestsDefined.Add(file.CrcDefined); + digests.Add(file.Crc); + } + + WriteSubStreamsInfo( + db.Folders, + db.NumUnpackStreamsVector, + unpackSizes, + digestsDefined, + digests); + WriteByte(NID::kEnd); + } + + if (db.Files.IsEmpty()) + { + WriteByte(NID::kEnd); + return; + } + + WriteByte(NID::kFilesInfo); + WriteNumber(db.Files.Size()); + + { + /* ---------- Empty Streams ---------- */ + CBoolVector emptyStreamVector; + emptyStreamVector.Reserve(db.Files.Size()); + int numEmptyStreams = 0; + for (i = 0; i < db.Files.Size(); i++) + if (db.Files[i].HasStream) + emptyStreamVector.Add(false); + else + { + emptyStreamVector.Add(true); + numEmptyStreams++; + } + if (numEmptyStreams > 0) + { + WriteByte(NID::kEmptyStream); + WriteNumber(Bv_GetSizeInBytes(emptyStreamVector)); + WriteBoolVector(emptyStreamVector); + + CBoolVector emptyFileVector, antiVector; + emptyFileVector.Reserve(numEmptyStreams); + antiVector.Reserve(numEmptyStreams); + CNum numEmptyFiles = 0, numAntiItems = 0; + for (i = 0; i < db.Files.Size(); i++) + { + const CFileItem &file = db.Files[i]; + if (!file.HasStream) + { + emptyFileVector.Add(!file.IsDir); + if (!file.IsDir) + numEmptyFiles++; + bool isAnti = db.IsItemAnti(i); + antiVector.Add(isAnti); + if (isAnti) + numAntiItems++; + } + } + + if (numEmptyFiles > 0) + { + WriteByte(NID::kEmptyFile); + WriteNumber(Bv_GetSizeInBytes(emptyFileVector)); + WriteBoolVector(emptyFileVector); + } + + if (numAntiItems > 0) + { + WriteByte(NID::kAnti); + WriteNumber(Bv_GetSizeInBytes(antiVector)); + WriteBoolVector(antiVector); + } + } + } + + + { + /* ---------- Names ---------- */ + + int numDefined = 0; + size_t namesDataSize = 0; + for (int i = 0; i < db.Files.Size(); i++) + { + const UString &name = db.Files[i].Name; + if (!name.IsEmpty()) + numDefined++; + namesDataSize += (name.Length() + 1) * 2; + } + + if (numDefined > 0) + { + namesDataSize++; + SkipAlign(2 + GetBigNumberSize(namesDataSize), 2); + + WriteByte(NID::kName); + WriteNumber(namesDataSize); + WriteByte(0); + for (int i = 0; i < db.Files.Size(); i++) + { + const UString &name = db.Files[i].Name; + for (int t = 0; t <= name.Length(); t++) + { + wchar_t c = name[t]; + WriteByte((Byte)c); + WriteByte((Byte)(c >> 8)); + } + } + } + } + + if (headerOptions.WriteCTime) WriteUInt64DefVector(db.CTime, NID::kCTime); + if (headerOptions.WriteATime) WriteUInt64DefVector(db.ATime, NID::kATime); + if (headerOptions.WriteMTime) WriteUInt64DefVector(db.MTime, NID::kMTime); + WriteUInt64DefVector(db.StartPos, NID::kStartPos); + + { + /* ---------- Write Attrib ---------- */ + CBoolVector boolVector; + boolVector.Reserve(db.Files.Size()); + int numDefined = 0; + for (i = 0; i < db.Files.Size(); i++) + { + bool defined = db.Files[i].AttribDefined; + boolVector.Add(defined); + if (defined) + numDefined++; + } + if (numDefined > 0) + { + WriteAlignedBoolHeader(boolVector, numDefined, NID::kWinAttributes, 4); + for (i = 0; i < db.Files.Size(); i++) + { + const CFileItem &file = db.Files[i]; + if (file.AttribDefined) + WriteUInt32(file.Attrib); + } + } + } + + WriteByte(NID::kEnd); // for files + WriteByte(NID::kEnd); // for headers +} + +HRESULT COutArchive::WriteDatabase( + DECL_EXTERNAL_CODECS_LOC_VARS + const CArchiveDatabase &db, + const CCompressionMethodMode *options, + const CHeaderOptions &headerOptions) +{ + if (!db.CheckNumFiles()) + return E_FAIL; + + UInt64 headerOffset; + UInt32 headerCRC; + UInt64 headerSize; + if (db.IsEmpty()) + { + headerSize = 0; + headerOffset = 0; + headerCRC = CrcCalc(0, 0); + } + else + { + bool encodeHeaders = false; + if (options != 0) + if (options->IsEmpty()) + options = 0; + if (options != 0) + if (options->PasswordIsDefined || headerOptions.CompressMainHeader) + encodeHeaders = true; + + _outByte.SetStream(SeqStream); + _outByte.Init(); + _crc = CRC_INIT_VAL; + _countMode = encodeHeaders; + _writeToStream = true; + _countSize = 0; + WriteHeader(db, headerOptions, headerOffset); + + if (encodeHeaders) + { + CByteBuffer buf; + buf.SetCapacity(_countSize); + _outByte2.Init((Byte *)buf, _countSize); + + _countMode = false; + _writeToStream = false; + WriteHeader(db, headerOptions, headerOffset); + + if (_countSize != _outByte2.GetPos()) + return E_FAIL; + + CCompressionMethodMode encryptOptions; + encryptOptions.PasswordIsDefined = options->PasswordIsDefined; + encryptOptions.Password = options->Password; + CEncoder encoder(headerOptions.CompressMainHeader ? *options : encryptOptions); + CRecordVector packSizes; + CObjectVector folders; + RINOK(EncodeStream( + EXTERNAL_CODECS_LOC_VARS + encoder, buf, + packSizes, folders)); + + _writeToStream = true; + + if (folders.Size() == 0) + throw 1; + + WriteID(NID::kEncodedHeader); + WritePackInfo(headerOffset, packSizes, + CRecordVector(), CRecordVector()); + WriteUnpackInfo(folders); + WriteByte(NID::kEnd); + for (int i = 0; i < packSizes.Size(); i++) + headerOffset += packSizes[i]; + } + RINOK(_outByte.Flush()); + headerCRC = CRC_GET_DIGEST(_crc); + headerSize = _outByte.GetProcessedSize(); + } + #ifdef _7Z_VOL + if (_endMarker) + { + CFinishHeader h; + h.NextHeaderSize = headerSize; + h.NextHeaderCRC = headerCRC; + h.NextHeaderOffset = + UInt64(0) - (headerSize + + 4 + kFinishHeaderSize); + h.ArchiveStartOffset = h.NextHeaderOffset - headerOffset; + h.AdditionalStartBlockSize = 0; + RINOK(WriteFinishHeader(h)); + return WriteFinishSignature(); + } + else + #endif + { + CStartHeader h; + h.NextHeaderSize = headerSize; + h.NextHeaderCRC = headerCRC; + h.NextHeaderOffset = headerOffset; + RINOK(Stream->Seek(_prefixHeaderPos, STREAM_SEEK_SET, NULL)); + return WriteStartHeader(h); + } +} + +void CArchiveDatabase::GetFile(int index, CFileItem &file, CFileItem2 &file2) const +{ + file = Files[index]; + file2.CTimeDefined = CTime.GetItem(index, file2.CTime); + file2.ATimeDefined = ATime.GetItem(index, file2.ATime); + file2.MTimeDefined = MTime.GetItem(index, file2.MTime); + file2.StartPosDefined = StartPos.GetItem(index, file2.StartPos); + file2.IsAnti = IsItemAnti(index); +} + +void CArchiveDatabase::AddFile(const CFileItem &file, const CFileItem2 &file2) +{ + int index = Files.Size(); + CTime.SetItem(index, file2.CTimeDefined, file2.CTime); + ATime.SetItem(index, file2.ATimeDefined, file2.ATime); + MTime.SetItem(index, file2.MTimeDefined, file2.MTime); + StartPos.SetItem(index, file2.StartPosDefined, file2.StartPos); + SetItemAnti(index, file2.IsAnti); + Files.Add(file); +} + +}} diff --git a/CPP/7zip/Archive/7z/7zOut.h b/CPP/7zip/Archive/7z/7zOut.h new file mode 100644 index 0000000..7b1b528 --- /dev/null +++ b/CPP/7zip/Archive/7z/7zOut.h @@ -0,0 +1,152 @@ +// 7zOut.h + +#ifndef __7Z_OUT_H +#define __7Z_OUT_H + +#include "7zCompressionMode.h" +#include "7zEncode.h" +#include "7zHeader.h" +#include "7zItem.h" + +#include "../../Common/OutBuffer.h" + +namespace NArchive { +namespace N7z { + +class CWriteBufferLoc +{ + Byte *_data; + size_t _size; + size_t _pos; +public: + CWriteBufferLoc(): _size(0), _pos(0) {} + void Init(Byte *data, size_t size) + { + _data = data; + _size = size; + _pos = 0; + } + void WriteBytes(const void *data, size_t size) + { + if (size > _size - _pos) + throw 1; + memcpy(_data + _pos, data, size); + _pos += size; + } + void WriteByte(Byte b) + { + if (_size == _pos) + throw 1; + _data[_pos++] = b; + } + size_t GetPos() const { return _pos; } +}; + +struct CHeaderOptions +{ + bool CompressMainHeader; + bool WriteCTime; + bool WriteATime; + bool WriteMTime; + + CHeaderOptions(): + CompressMainHeader(true), + WriteCTime(false), + WriteATime(false), + WriteMTime(true) + {} +}; + +class COutArchive +{ + UInt64 _prefixHeaderPos; + + HRESULT WriteDirect(const void *data, UInt32 size); + + UInt64 GetPos() const; + void WriteBytes(const void *data, size_t size); + void WriteBytes(const CByteBuffer &data) { WriteBytes(data, data.GetCapacity()); } + void WriteByte(Byte b); + void WriteUInt32(UInt32 value); + void WriteUInt64(UInt64 value); + void WriteNumber(UInt64 value); + void WriteID(UInt64 value) { WriteNumber(value); } + + void WriteFolder(const CFolder &folder); + HRESULT WriteFileHeader(const CFileItem &itemInfo); + void WriteBoolVector(const CBoolVector &boolVector); + void WriteHashDigests( + const CRecordVector &digestsDefined, + const CRecordVector &hashDigests); + + void WritePackInfo( + UInt64 dataOffset, + const CRecordVector &packSizes, + const CRecordVector &packCRCsDefined, + const CRecordVector &packCRCs); + + void WriteUnpackInfo(const CObjectVector &folders); + + void WriteSubStreamsInfo( + const CObjectVector &folders, + const CRecordVector &numUnpackStreamsInFolders, + const CRecordVector &unpackSizes, + const CRecordVector &digestsDefined, + const CRecordVector &hashDigests); + + void SkipAlign(unsigned pos, unsigned alignSize); + void WriteAlignedBoolHeader(const CBoolVector &v, int numDefined, Byte type, unsigned itemSize); + void WriteUInt64DefVector(const CUInt64DefVector &v, Byte type); + + HRESULT EncodeStream( + DECL_EXTERNAL_CODECS_LOC_VARS + CEncoder &encoder, const CByteBuffer &data, + CRecordVector &packSizes, CObjectVector &folders); + void WriteHeader( + const CArchiveDatabase &db, + const CHeaderOptions &headerOptions, + UInt64 &headerOffset); + + bool _countMode; + bool _writeToStream; + size_t _countSize; + UInt32 _crc; + COutBuffer _outByte; + CWriteBufferLoc _outByte2; + + #ifdef _7Z_VOL + bool _endMarker; + #endif + + HRESULT WriteSignature(); + #ifdef _7Z_VOL + HRESULT WriteFinishSignature(); + #endif + HRESULT WriteStartHeader(const CStartHeader &h); + #ifdef _7Z_VOL + HRESULT WriteFinishHeader(const CFinishHeader &h); + #endif + CMyComPtr Stream; +public: + + COutArchive() { _outByte.Create(1 << 16); } + CMyComPtr SeqStream; + HRESULT Create(ISequentialOutStream *stream, bool endMarker); + void Close(); + HRESULT SkipPrefixArchiveHeader(); + HRESULT WriteDatabase( + DECL_EXTERNAL_CODECS_LOC_VARS + const CArchiveDatabase &db, + const CCompressionMethodMode *options, + const CHeaderOptions &headerOptions); + + #ifdef _7Z_VOL + static UInt32 GetVolHeadersSize(UInt64 dataSize, int nameLength = 0, bool props = false); + static UInt64 GetVolPureSize(UInt64 volSize, int nameLength = 0, bool props = false); + #endif + +}; + +}} + +#endif diff --git a/CPP/7zip/Archive/7z/7zProperties.cpp b/CPP/7zip/Archive/7z/7zProperties.cpp new file mode 100644 index 0000000..fd4af49 --- /dev/null +++ b/CPP/7zip/Archive/7z/7zProperties.cpp @@ -0,0 +1,164 @@ +// 7zProperties.cpp + +#include "StdAfx.h" + +#include "7zProperties.h" +#include "7zHeader.h" +#include "7zHandler.h" + +// #define _MULTI_PACK + +namespace NArchive { +namespace N7z { + +struct CPropMap +{ + UInt64 FilePropID; + STATPROPSTG StatPROPSTG; +}; + +CPropMap kPropMap[] = +{ + { NID::kName, { NULL, kpidPath, VT_BSTR } }, + { NID::kSize, { NULL, kpidSize, VT_UI8 } }, + { NID::kPackInfo, { NULL, kpidPackSize, VT_UI8 } }, + + #ifdef _MULTI_PACK + { 100, { L"Pack0", kpidPackedSize0, VT_UI8 } }, + { 101, { L"Pack1", kpidPackedSize1, VT_UI8 } }, + { 102, { L"Pack2", kpidPackedSize2, VT_UI8 } }, + { 103, { L"Pack3", kpidPackedSize3, VT_UI8 } }, + { 104, { L"Pack4", kpidPackedSize4, VT_UI8 } }, + #endif + + { NID::kCTime, { NULL, kpidCTime, VT_FILETIME } }, + { NID::kMTime, { NULL, kpidMTime, VT_FILETIME } }, + { NID::kATime, { NULL, kpidATime, VT_FILETIME } }, + { NID::kWinAttributes, { NULL, kpidAttrib, VT_UI4 } }, + { NID::kStartPos, { NULL, kpidPosition, VT_UI4 } }, + + { NID::kCRC, { NULL, kpidCRC, VT_UI4 } }, + + { NID::kAnti, { NULL, kpidIsAnti, VT_BOOL } } + + #ifndef _SFX + , + { 97, { NULL,kpidEncrypted, VT_BOOL } }, + { 98, { NULL,kpidMethod, VT_BSTR } }, + { 99, { NULL,kpidBlock, VT_UI4 } } + #endif +}; + +static const int kPropMapSize = sizeof(kPropMap) / sizeof(kPropMap[0]); + +static int FindPropInMap(UInt64 filePropID) +{ + for (int i = 0; i < kPropMapSize; i++) + if (kPropMap[i].FilePropID == filePropID) + return i; + return -1; +} + +static void CopyOneItem(CRecordVector &src, + CRecordVector &dest, UInt32 item) +{ + for (int i = 0; i < src.Size(); i++) + if (src[i] == item) + { + dest.Add(item); + src.Delete(i); + return; + } +} + +static void RemoveOneItem(CRecordVector &src, UInt32 item) +{ + for (int i = 0; i < src.Size(); i++) + if (src[i] == item) + { + src.Delete(i); + return; + } +} + +static void InsertToHead(CRecordVector &dest, UInt32 item) +{ + for (int i = 0; i < dest.Size(); i++) + if (dest[i] == item) + { + dest.Delete(i); + break; + } + dest.Insert(0, item); +} + +void CHandler::FillPopIDs() +{ + _fileInfoPopIDs.Clear(); + + #ifdef _7Z_VOL + if(_volumes.Size() < 1) + return; + const CVolume &volume = _volumes.Front(); + const CArchiveDatabaseEx &_db = volume.Database; + #endif + + CRecordVector fileInfoPopIDs = _db.ArchiveInfo.FileInfoPopIDs; + + RemoveOneItem(fileInfoPopIDs, NID::kEmptyStream); + RemoveOneItem(fileInfoPopIDs, NID::kEmptyFile); + + CopyOneItem(fileInfoPopIDs, _fileInfoPopIDs, NID::kName); + CopyOneItem(fileInfoPopIDs, _fileInfoPopIDs, NID::kAnti); + CopyOneItem(fileInfoPopIDs, _fileInfoPopIDs, NID::kSize); + CopyOneItem(fileInfoPopIDs, _fileInfoPopIDs, NID::kPackInfo); + CopyOneItem(fileInfoPopIDs, _fileInfoPopIDs, NID::kCTime); + CopyOneItem(fileInfoPopIDs, _fileInfoPopIDs, NID::kMTime); + CopyOneItem(fileInfoPopIDs, _fileInfoPopIDs, NID::kATime); + CopyOneItem(fileInfoPopIDs, _fileInfoPopIDs, NID::kWinAttributes); + CopyOneItem(fileInfoPopIDs, _fileInfoPopIDs, NID::kCRC); + CopyOneItem(fileInfoPopIDs, _fileInfoPopIDs, NID::kComment); + _fileInfoPopIDs += fileInfoPopIDs; + + #ifndef _SFX + _fileInfoPopIDs.Add(97); + _fileInfoPopIDs.Add(98); + _fileInfoPopIDs.Add(99); + #endif + #ifdef _MULTI_PACK + _fileInfoPopIDs.Add(100); + _fileInfoPopIDs.Add(101); + _fileInfoPopIDs.Add(102); + _fileInfoPopIDs.Add(103); + _fileInfoPopIDs.Add(104); + #endif + + #ifndef _SFX + InsertToHead(_fileInfoPopIDs, NID::kMTime); + InsertToHead(_fileInfoPopIDs, NID::kPackInfo); + InsertToHead(_fileInfoPopIDs, NID::kSize); + InsertToHead(_fileInfoPopIDs, NID::kName); + #endif +} + +STDMETHODIMP CHandler::GetNumberOfProperties(UInt32 *numProperties) +{ + *numProperties = _fileInfoPopIDs.Size(); + return S_OK; +} + +STDMETHODIMP CHandler::GetPropertyInfo(UInt32 index, BSTR *name, PROPID *propID, VARTYPE *varType) +{ + if ((int)index >= _fileInfoPopIDs.Size()) + return E_INVALIDARG; + int indexInMap = FindPropInMap(_fileInfoPopIDs[index]); + if (indexInMap == -1) + return E_INVALIDARG; + const STATPROPSTG &srcItem = kPropMap[indexInMap].StatPROPSTG; + *propID = srcItem.propid; + *varType = srcItem.vt; + *name = 0; + return S_OK; +} + +}} diff --git a/CPP/7zip/Archive/7z/7zProperties.h b/CPP/7zip/Archive/7z/7zProperties.h new file mode 100644 index 0000000..6618179 --- /dev/null +++ b/CPP/7zip/Archive/7z/7zProperties.h @@ -0,0 +1,22 @@ +// 7zProperties.h + +#ifndef __7Z_PROPERTIES_H +#define __7Z_PROPERTIES_H + +#include "../../PropID.h" + +namespace NArchive { +namespace N7z { + +enum +{ + kpidPackedSize0 = kpidUserDefined, + kpidPackedSize1, + kpidPackedSize2, + kpidPackedSize3, + kpidPackedSize4 +}; + +}} + +#endif diff --git a/CPP/7zip/Archive/7z/7zRegister.cpp b/CPP/7zip/Archive/7z/7zRegister.cpp new file mode 100644 index 0000000..6e9bf6b --- /dev/null +++ b/CPP/7zip/Archive/7z/7zRegister.cpp @@ -0,0 +1,18 @@ +// 7zRegister.cpp + +#include "StdAfx.h" + +#include "../../Common/RegisterArc.h" + +#include "7zHandler.h" +static IInArchive *CreateArc() { return new NArchive::N7z::CHandler; } +#ifndef EXTRACT_ONLY +static IOutArchive *CreateArcOut() { return new NArchive::N7z::CHandler; } +#else +#define CreateArcOut 0 +#endif + +static CArcInfo g_ArcInfo = + { L"7z", L"7z", 0, 7, {'7', 'z', 0xBC, 0xAF, 0x27, 0x1C}, 6, false, CreateArc, CreateArcOut }; + +REGISTER_ARC(7z) diff --git a/CPP/7zip/Archive/7z/7zSpecStream.cpp b/CPP/7zip/Archive/7z/7zSpecStream.cpp new file mode 100644 index 0000000..0696963 --- /dev/null +++ b/CPP/7zip/Archive/7z/7zSpecStream.cpp @@ -0,0 +1,24 @@ +// 7zSpecStream.cpp + +#include "StdAfx.h" + +#include "7zSpecStream.h" + +STDMETHODIMP CSequentialInStreamSizeCount2::Read(void *data, UInt32 size, UInt32 *processedSize) +{ + UInt32 realProcessedSize; + HRESULT result = _stream->Read(data, size, &realProcessedSize); + _size += realProcessedSize; + if (processedSize != 0) + *processedSize = realProcessedSize; + return result; +} + +STDMETHODIMP CSequentialInStreamSizeCount2::GetSubStreamSize( + UInt64 subStream, UInt64 *value) +{ + if (_getSubStreamSize == NULL) + return E_NOTIMPL; + return _getSubStreamSize->GetSubStreamSize(subStream, value); +} + diff --git a/CPP/7zip/Archive/7z/7zSpecStream.h b/CPP/7zip/Archive/7z/7zSpecStream.h new file mode 100644 index 0000000..2e26efd --- /dev/null +++ b/CPP/7zip/Archive/7z/7zSpecStream.h @@ -0,0 +1,35 @@ +// 7zSpecStream.h + +#ifndef __7Z_SPEC_STREAM_H +#define __7Z_SPEC_STREAM_H + +#include "../../IStream.h" +#include "../../ICoder.h" +#include "../../../Common/MyCom.h" + +class CSequentialInStreamSizeCount2: + public ISequentialInStream, + public ICompressGetSubStreamSize, + public CMyUnknownImp +{ + CMyComPtr _stream; + CMyComPtr _getSubStreamSize; + UInt64 _size; +public: + void Init(ISequentialInStream *stream) + { + _stream = stream; + _getSubStreamSize = 0; + _stream.QueryInterface(IID_ICompressGetSubStreamSize, &_getSubStreamSize); + _size = 0; + } + UInt64 GetSize() const { return _size; } + + MY_UNKNOWN_IMP1(ICompressGetSubStreamSize) + + STDMETHOD(Read)(void *data, UInt32 size, UInt32 *processedSize); + + STDMETHOD(GetSubStreamSize)(UInt64 subStream, UInt64 *value); +}; + +#endif diff --git a/CPP/7zip/Archive/7z/7zUpdate.cpp b/CPP/7zip/Archive/7z/7zUpdate.cpp new file mode 100644 index 0000000..f07efc1 --- /dev/null +++ b/CPP/7zip/Archive/7z/7zUpdate.cpp @@ -0,0 +1,1216 @@ +// 7zUpdate.cpp + +#include "StdAfx.h" + +#include "../../../../C/CpuArch.h" + +#include "../../Common/LimitedStreams.h" +#include "../../Common/ProgressUtils.h" + +#include "../../Common/CreateCoder.h" + +#include "../../Compress/CopyCoder.h" + +#include "../Common/ItemNameUtils.h" +#include "../Common/OutStreamWithCRC.h" + +#include "7zDecode.h" +#include "7zEncode.h" +#include "7zFolderInStream.h" +#include "7zHandler.h" +#include "7zOut.h" +#include "7zUpdate.h" + +#ifndef WIN32 +#include "Windows/FileIO.h" +#endif + +namespace NArchive { +namespace N7z { + +static const UInt64 k_LZMA = 0x030101; +static const UInt64 k_BCJ = 0x03030103; +static const UInt64 k_BCJ2 = 0x0303011B; + +static const wchar_t *kMatchFinderForBCJ2_LZMA = L"BT2"; +static const UInt32 kDictionaryForBCJ2_LZMA = 1 << 20; +static const UInt32 kAlgorithmForBCJ2_LZMA = 1; +static const UInt32 kNumFastBytesForBCJ2_LZMA = 64; + +#ifdef MY_CPU_X86_OR_AMD64 +#define USE_86_FILTER +#endif + +static HRESULT WriteRange(IInStream *inStream, ISequentialOutStream *outStream, + UInt64 position, UInt64 size, ICompressProgressInfo *progress) +{ + RINOK(inStream->Seek(position, STREAM_SEEK_SET, 0)); + CLimitedSequentialInStream *streamSpec = new CLimitedSequentialInStream; + CMyComPtr inStreamLimited(streamSpec); + streamSpec->SetStream(inStream); + streamSpec->Init(size); + + NCompress::CCopyCoder *copyCoderSpec = new NCompress::CCopyCoder; + CMyComPtr copyCoder = copyCoderSpec; + RINOK(copyCoder->Code(inStreamLimited, outStream, NULL, NULL, progress)); + return (copyCoderSpec->TotalSize == size ? S_OK : E_FAIL); +} + +static int GetReverseSlashPos(const UString &name) +{ + int slashPos = name.ReverseFind(L'/'); + #ifdef _WIN32 + int slash1Pos = name.ReverseFind(L'\\'); + slashPos = MyMax(slashPos, slash1Pos); + #endif + return slashPos; +} + +int CUpdateItem::GetExtensionPos() const +{ + int slashPos = GetReverseSlashPos(Name); + int dotPos = Name.ReverseFind(L'.'); + if (dotPos < 0 || (dotPos < slashPos && slashPos >= 0)) + return Name.Length(); + return dotPos + 1; +} + +UString CUpdateItem::GetExtension() const +{ + return Name.Mid(GetExtensionPos()); +} + +#define RINOZ(x) { int __tt = (x); if (__tt != 0) return __tt; } + +#define RINOZ_COMP(a, b) RINOZ(MyCompare(a, b)) + +static int CompareBuffers(const CByteBuffer &a1, const CByteBuffer &a2) +{ + size_t c1 = a1.GetCapacity(); + size_t c2 = a2.GetCapacity(); + RINOZ_COMP(c1, c2); + for (size_t i = 0; i < c1; i++) + RINOZ_COMP(a1[i], a2[i]); + return 0; +} + +static int CompareCoders(const CCoderInfo &c1, const CCoderInfo &c2) +{ + RINOZ_COMP(c1.NumInStreams, c2.NumInStreams); + RINOZ_COMP(c1.NumOutStreams, c2.NumOutStreams); + RINOZ_COMP(c1.MethodID, c2.MethodID); + return CompareBuffers(c1.Props, c2.Props); +} + +static int CompareBindPairs(const CBindPair &b1, const CBindPair &b2) +{ + RINOZ_COMP(b1.InIndex, b2.InIndex); + return MyCompare(b1.OutIndex, b2.OutIndex); +} + +static int CompareFolders(const CFolder &f1, const CFolder &f2) +{ + int s1 = f1.Coders.Size(); + int s2 = f2.Coders.Size(); + RINOZ_COMP(s1, s2); + int i; + for (i = 0; i < s1; i++) + RINOZ(CompareCoders(f1.Coders[i], f2.Coders[i])); + s1 = f1.BindPairs.Size(); + s2 = f2.BindPairs.Size(); + RINOZ_COMP(s1, s2); + for (i = 0; i < s1; i++) + RINOZ(CompareBindPairs(f1.BindPairs[i], f2.BindPairs[i])); + return 0; +} + +/* +static int CompareFiles(const CFileItem &f1, const CFileItem &f2) +{ + return MyStringCompareNoCase(f1.Name, f2.Name); +} +*/ + +struct CFolderRepack +{ + int FolderIndex; + int Group; + CNum NumCopyFiles; +}; + +static int CompareFolderRepacks(const CFolderRepack *p1, const CFolderRepack *p2, void *param) +{ + RINOZ_COMP(p1->Group, p2->Group); + int i1 = p1->FolderIndex; + int i2 = p2->FolderIndex; + const CArchiveDatabaseEx &db = *(const CArchiveDatabaseEx *)param; + RINOZ(CompareFolders( + db.Folders[i1], + db.Folders[i2])); + return MyCompare(i1, i2); + /* + RINOZ_COMP( + db.NumUnpackStreamsVector[i1], + db.NumUnpackStreamsVector[i2]); + if (db.NumUnpackStreamsVector[i1] == 0) + return 0; + return CompareFiles( + db.Files[db.FolderStartFileIndex[i1]], + db.Files[db.FolderStartFileIndex[i2]]); + */ +} + +//////////////////////////////////////////////////////////// + +static int CompareEmptyItems(const int *p1, const int *p2, void *param) +{ + const CObjectVector &updateItems = *(const CObjectVector *)param; + const CUpdateItem &u1 = updateItems[*p1]; + const CUpdateItem &u2 = updateItems[*p2]; + if (u1.IsDir != u2.IsDir) + return (u1.IsDir) ? 1 : -1; + if (u1.IsDir) + { + if (u1.IsAnti != u2.IsAnti) + return (u1.IsAnti ? 1 : -1); + int n = MyStringCompareNoCase(u1.Name, u2.Name); + return -n; + } + if (u1.IsAnti != u2.IsAnti) + return (u1.IsAnti ? 1 : -1); + return MyStringCompareNoCase(u1.Name, u2.Name); +} + +static const char *g_Exts = + " lzma 7z ace arc arj bz bz2 deb lzo lzx gz pak rpm sit tgz tbz tbz2 tgz cab ha lha lzh rar zoo" + " zip jar ear war msi" + " 3gp avi mov mpeg mpg mpe wmv" + " aac ape fla flac la mp3 m4a mp4 ofr ogg pac ra rm rka shn swa tta wv wma wav" + " swf " + " chm hxi hxs" + " gif jpeg jpg jp2 png tiff bmp ico psd psp" + " awg ps eps cgm dxf svg vrml wmf emf ai md" + " cad dwg pps key sxi" + " max 3ds" + " iso bin nrg mdf img pdi tar cpio xpi" + " vfd vhd vud vmc vsv" + " vmdk dsk nvram vmem vmsd vmsn vmss vmtm" + " inl inc idl acf asa h hpp hxx c cpp cxx rc java cs pas bas vb cls ctl frm dlg def" + " f77 f f90 f95" + " asm sql manifest dep " + " mak clw csproj vcproj sln dsp dsw " + " class " + " bat cmd" + " xml xsd xsl xslt hxk hxc htm html xhtml xht mht mhtml htw asp aspx css cgi jsp shtml" + " awk sed hta js php php3 php4 php5 phptml pl pm py pyo rb sh tcl vbs" + " text txt tex ans asc srt reg ini doc docx mcw dot rtf hlp xls xlr xlt xlw ppt pdf" + " sxc sxd sxi sxg sxw stc sti stw stm odt ott odg otg odp otp ods ots odf" + " abw afp cwk lwp wpd wps wpt wrf wri" + " abf afm bdf fon mgf otf pcf pfa snf ttf" + " dbf mdb nsf ntf wdb db fdb gdb" + " exe dll ocx vbx sfx sys tlb awx com obj lib out o so " + " pdb pch idb ncb opt"; + +int GetExtIndex(const char *ext) +{ + int extIndex = 1; + const char *p = g_Exts; + for (;;) + { + char c = *p++; + if (c == 0) + return extIndex; + if (c == ' ') + continue; + int pos = 0; + for (;;) + { + char c2 = ext[pos++]; + if (c2 == 0 && (c == 0 || c == ' ')) + return extIndex; + if (c != c2) + break; + c = *p++; + } + extIndex++; + for (;;) + { + if (c == 0) + return extIndex; + if (c == ' ') + break; + c = *p++; + } + } +} + +struct CRefItem +{ + const CUpdateItem *UpdateItem; + UInt32 Index; + UInt32 ExtensionPos; + UInt32 NamePos; + int ExtensionIndex; + CRefItem(UInt32 index, const CUpdateItem &ui, bool sortByType): + UpdateItem(&ui), + Index(index), + ExtensionPos(0), + NamePos(0), + ExtensionIndex(0) + { + if (sortByType) + { + int slashPos = GetReverseSlashPos(ui.Name); + NamePos = ((slashPos >= 0) ? (slashPos + 1) : 0); + int dotPos = ui.Name.ReverseFind(L'.'); + if (dotPos < 0 || (dotPos < slashPos && slashPos >= 0)) + ExtensionPos = ui.Name.Length(); + else + { + ExtensionPos = dotPos + 1; + UString us = ui.Name.Mid(ExtensionPos); + if (!us.IsEmpty()) + { + us.MakeLower(); + int i; + AString s; + for (i = 0; i < us.Length(); i++) + { + wchar_t c = us[i]; + if (c >= 0x80) + break; + s += (char)c; + } + if (i == us.Length()) + ExtensionIndex = GetExtIndex(s); + else + ExtensionIndex = 0; + } + } + } + } +}; + +static int CompareUpdateItems(const CRefItem *p1, const CRefItem *p2, void *param) +{ + const CRefItem &a1 = *p1; + const CRefItem &a2 = *p2; + const CUpdateItem &u1 = *a1.UpdateItem; + const CUpdateItem &u2 = *a2.UpdateItem; + int n; + if (u1.IsDir != u2.IsDir) + return (u1.IsDir) ? 1 : -1; + if (u1.IsDir) + { + if (u1.IsAnti != u2.IsAnti) + return (u1.IsAnti ? 1 : -1); + n = MyStringCompareNoCase(u1.Name, u2.Name); + return -n; + } + bool sortByType = *(bool *)param; + if (sortByType) + { + RINOZ_COMP(a1.ExtensionIndex, a2.ExtensionIndex); + RINOZ(MyStringCompareNoCase(u1.Name + a1.ExtensionPos, u2.Name + a2.ExtensionPos)); + RINOZ(MyStringCompareNoCase(u1.Name + a1.NamePos, u2.Name + a2.NamePos)); + if (!u1.MTimeDefined && u2.MTimeDefined) return 1; + if (u1.MTimeDefined && !u2.MTimeDefined) return -1; + if (u1.MTimeDefined && u2.MTimeDefined) RINOZ_COMP(u1.MTime, u2.MTime); + RINOZ_COMP(u1.Size, u2.Size); + } + return MyStringCompareNoCase(u1.Name, u2.Name); +} + +struct CSolidGroup +{ + CRecordVector Indices; +}; + +#ifdef _WIN32 +static wchar_t *g_ExeExts[] = +{ + L"dll", + L"exe", + L"ocx", + L"sfx", + L"sys" +}; + +static bool IsExeExt(const UString &ext) +{ + for (int i = 0; i < sizeof(g_ExeExts) / sizeof(g_ExeExts[0]); i++) + if (ext.CompareNoCase(g_ExeExts[i]) == 0) + return true; + return false; +} +#else +static bool IsExeFile(const CUpdateItem &ui) +{ + if (ui.Attrib & FILE_ATTRIBUTE_UNIX_EXTENSION) { + unsigned short st_mode = ui.Attrib >> 16; + if ((st_mode & 00111) && (ui.Size >= 2048)) + { + // file has the execution flag and it's big enought + // try to find if the file is a script + NWindows::NFile::NIO::CInFile file; + if (file.Open(ui.Name)) + { + char buffer[512]; + UINT32 processedSize; + if (file.Read(buffer,sizeof(buffer),processedSize)) + { + for(UInt32 i = 0; i < processedSize ; i++) + { + if (buffer[i] == 0) + { + return true; // this file is not a text (ascii, utf8, ...) ! + } + } + } + } + } + } + return false; +} +#endif + +#ifdef USE_86_FILTER + +static inline void GetMethodFull(UInt64 methodID, UInt32 numInStreams, CMethodFull &methodResult) +{ + methodResult.Id = methodID; + methodResult.NumInStreams = numInStreams; + methodResult.NumOutStreams = 1; +} + +static void MakeExeMethod(const CCompressionMethodMode &method, + bool bcj2Filter, CCompressionMethodMode &exeMethod) +{ + exeMethod = method; + if (bcj2Filter) + { + CMethodFull methodFull; + GetMethodFull(k_BCJ2, 4, methodFull); + exeMethod.Methods.Insert(0, methodFull); + GetMethodFull(k_LZMA, 1, methodFull); + { + CProp prop; + prop.Id = NCoderPropID::kAlgorithm; + prop.Value = kAlgorithmForBCJ2_LZMA; + methodFull.Props.Add(prop); + } + { + CProp prop; + prop.Id = NCoderPropID::kMatchFinder; + prop.Value = kMatchFinderForBCJ2_LZMA; + methodFull.Props.Add(prop); + } + { + CProp prop; + prop.Id = NCoderPropID::kDictionarySize; + prop.Value = kDictionaryForBCJ2_LZMA; + methodFull.Props.Add(prop); + } + { + CProp prop; + prop.Id = NCoderPropID::kNumFastBytes; + prop.Value = kNumFastBytesForBCJ2_LZMA; + methodFull.Props.Add(prop); + } + { + CProp prop; + prop.Id = NCoderPropID::kNumThreads; + prop.Value = (UInt32)1; + methodFull.Props.Add(prop); + } + + exeMethod.Methods.Add(methodFull); + exeMethod.Methods.Add(methodFull); + CBind bind; + + bind.OutCoder = 0; + bind.InStream = 0; + + bind.InCoder = 1; + bind.OutStream = 0; + exeMethod.Binds.Add(bind); + + bind.InCoder = 2; + bind.OutStream = 1; + exeMethod.Binds.Add(bind); + + bind.InCoder = 3; + bind.OutStream = 2; + exeMethod.Binds.Add(bind); + } + else + { + CMethodFull methodFull; + GetMethodFull(k_BCJ, 1, methodFull); + exeMethod.Methods.Insert(0, methodFull); + CBind bind; + bind.OutCoder = 0; + bind.InStream = 0; + bind.InCoder = 1; + bind.OutStream = 0; + exeMethod.Binds.Add(bind); + } +} + +#endif + +static void FromUpdateItemToFileItem(const CUpdateItem &ui, + CFileItem &file, CFileItem2 &file2) +{ + file.Name = NItemName::MakeLegalName(ui.Name); + if (ui.AttribDefined) + file.SetAttrib(ui.Attrib); + + file2.CTime = ui.CTime; file2.CTimeDefined = ui.CTimeDefined; + file2.ATime = ui.ATime; file2.ATimeDefined = ui.ATimeDefined; + file2.MTime = ui.MTime; file2.MTimeDefined = ui.MTimeDefined; + file2.IsAnti = ui.IsAnti; + file2.StartPosDefined = false; + + file.Size = ui.Size; + file.IsDir = ui.IsDir; + file.HasStream = ui.HasStream(); +} + +class CFolderOutStream2: + public ISequentialOutStream, + public CMyUnknownImp +{ + COutStreamWithCRC *_crcStreamSpec; + CMyComPtr _crcStream; + const CArchiveDatabaseEx *_db; + const CBoolVector *_extractStatuses; + CMyComPtr _outStream; + UInt32 _startIndex; + int _currentIndex; + bool _fileIsOpen; + UInt64 _rem; + + void OpenFile(); + void CloseFile(); + HRESULT CloseFileAndSetResult(); + HRESULT ProcessEmptyFiles(); +public: + MY_UNKNOWN_IMP + + CFolderOutStream2() + { + _crcStreamSpec = new COutStreamWithCRC; + _crcStream = _crcStreamSpec; + } + + HRESULT Init(const CArchiveDatabaseEx *db, UInt32 startIndex, + const CBoolVector *extractStatuses, ISequentialOutStream *outStream); + void ReleaseOutStream(); + HRESULT CheckFinishedState() const { return (_currentIndex == _extractStatuses->Size()) ? S_OK: E_FAIL; } + + STDMETHOD(Write)(const void *data, UInt32 size, UInt32 *processedSize); +}; + +HRESULT CFolderOutStream2::Init(const CArchiveDatabaseEx *db, UInt32 startIndex, + const CBoolVector *extractStatuses, ISequentialOutStream *outStream) +{ + _db = db; + _startIndex = startIndex; + _extractStatuses = extractStatuses; + _outStream = outStream; + + _currentIndex = 0; + _fileIsOpen = false; + return ProcessEmptyFiles(); +} + +void CFolderOutStream2::ReleaseOutStream() +{ + _outStream.Release(); + _crcStreamSpec->ReleaseStream(); +} + +void CFolderOutStream2::OpenFile() +{ + _crcStreamSpec->SetStream((*_extractStatuses)[_currentIndex] ? (ISequentialOutStream *)_outStream : NULL); // FIXED for gcc 2.95 + _crcStreamSpec->Init(true); + _fileIsOpen = true; + _rem = _db->Files[_startIndex + _currentIndex].Size; +} + +void CFolderOutStream2::CloseFile() +{ + _crcStreamSpec->ReleaseStream(); + _fileIsOpen = false; + _currentIndex++; +} + +HRESULT CFolderOutStream2::CloseFileAndSetResult() +{ + const CFileItem &file = _db->Files[_startIndex + _currentIndex]; + CloseFile(); + return (file.IsDir || !file.CrcDefined || file.Crc == _crcStreamSpec->GetCRC()) ? S_OK: S_FALSE; +} + +HRESULT CFolderOutStream2::ProcessEmptyFiles() +{ + while (_currentIndex < _extractStatuses->Size() && _db->Files[_startIndex + _currentIndex].Size == 0) + { + OpenFile(); + RINOK(CloseFileAndSetResult()); + } + return S_OK; +} + +STDMETHODIMP CFolderOutStream2::Write(const void *data, UInt32 size, UInt32 *processedSize) +{ + if (processedSize != NULL) + *processedSize = 0; + while (size != 0) + { + if (_fileIsOpen) + { + UInt32 cur = size < _rem ? size : (UInt32)_rem; + RINOK(_crcStream->Write(data, cur, &cur)); + if (cur == 0) + break; + data = (const Byte *)data + cur; + size -= cur; + _rem -= cur; + if (processedSize != NULL) + *processedSize += cur; + if (_rem == 0) + { + RINOK(CloseFileAndSetResult()); + RINOK(ProcessEmptyFiles()); + continue; + } + } + else + { + RINOK(ProcessEmptyFiles()); + if (_currentIndex == _extractStatuses->Size()) + { + // we don't support partial extracting + return E_FAIL; + } + OpenFile(); + } + } + return S_OK; +} + +class CThreadDecoder: public CVirtThread +{ +public: + HRESULT Result; + CMyComPtr InStream; + + CFolderOutStream2 *FosSpec; + CMyComPtr Fos; + + UInt64 StartPos; + const UInt64 *PackSizes; + const CFolder *Folder; + #ifndef _NO_CRYPTO + CMyComPtr GetTextPassword; + #endif + + DECL_EXTERNAL_CODECS_VARS + CDecoder Decoder; + + #ifndef _7ZIP_ST + bool MtMode; + UInt32 NumThreads; + #endif + + CThreadDecoder(): + Decoder(true) + { + #ifndef _7ZIP_ST + MtMode = false; + NumThreads = 1; + #endif + FosSpec = new CFolderOutStream2; + Fos = FosSpec; + Result = E_FAIL; + } + virtual void Execute(); +}; + +void CThreadDecoder::Execute() +{ + try + { + #ifndef _NO_CRYPTO + bool passwordIsDefined; + #endif + Result = Decoder.Decode( + EXTERNAL_CODECS_VARS + InStream, + StartPos, + PackSizes, + *Folder, + Fos, + NULL + #ifndef _NO_CRYPTO + , GetTextPassword, passwordIsDefined + #endif + #ifndef _7ZIP_ST + , MtMode, NumThreads + #endif + ); + } + catch(...) + { + Result = E_FAIL; + } + if (Result == S_OK) + Result = FosSpec->CheckFinishedState(); + FosSpec->ReleaseOutStream(); +} + +bool static Is86FilteredFolder(const CFolder &f) +{ + for (int i = 0; i < f.Coders.Size(); i++) + { + CMethodId m = f.Coders[i].MethodID; + if (m == k_BCJ || m == k_BCJ2) + return true; + } + return false; +} + +#ifndef _NO_CRYPTO + +class CCryptoGetTextPassword: + public ICryptoGetTextPassword, + public CMyUnknownImp +{ +public: + UString Password; + + MY_UNKNOWN_IMP + STDMETHOD(CryptoGetTextPassword)(BSTR *password); +}; + +STDMETHODIMP CCryptoGetTextPassword::CryptoGetTextPassword(BSTR *password) +{ + return StringToBstr(Password, password); +} + +#endif + +static const int kNumGroupsMax = 4; + +#ifdef USE_86_FILTER +static bool Is86Group(int group) { return (group & 1) != 0; } +#endif +static bool IsEncryptedGroup(int group) { return (group & 2) != 0; } +static int GetGroupIndex(bool encrypted, int bcjFiltered) + { return (encrypted ? 2 : 0) + (bcjFiltered ? 1 : 0); } + +HRESULT Update( + DECL_EXTERNAL_CODECS_LOC_VARS + IInStream *inStream, + const CArchiveDatabaseEx *db, + const CObjectVector &updateItems, + COutArchive &archive, + CArchiveDatabase &newDatabase, + ISequentialOutStream *seqOutStream, + IArchiveUpdateCallback *updateCallback, + const CUpdateOptions &options + #ifndef _NO_CRYPTO + , ICryptoGetTextPassword *getDecoderPassword + #endif + ) +{ + UInt64 numSolidFiles = options.NumSolidFiles; + if (numSolidFiles == 0) + numSolidFiles = 1; + /* + CMyComPtr outStream; + RINOK(seqOutStream->QueryInterface(IID_IOutStream, (void **)&outStream)); + if (!outStream) + return E_NOTIMPL; + */ + + UInt64 startBlockSize = db != 0 ? db->ArchiveInfo.StartPosition: 0; + if (startBlockSize > 0 && !options.RemoveSfxBlock) + { + RINOK(WriteRange(inStream, seqOutStream, 0, startBlockSize, NULL)); + } + + CRecordVector fileIndexToUpdateIndexMap; + CRecordVector folderRefs; + UInt64 complexity = 0; + UInt64 inSizeForReduce2 = 0; + bool needEncryptedRepack = false; + if (db != 0) + { + fileIndexToUpdateIndexMap.Reserve(db->Files.Size()); + int i; + for (i = 0; i < db->Files.Size(); i++) + fileIndexToUpdateIndexMap.Add(-1); + + for (i = 0; i < updateItems.Size(); i++) + { + int index = updateItems[i].IndexInArchive; + if (index != -1) + fileIndexToUpdateIndexMap[index] = i; + } + + for (i = 0; i < db->Folders.Size(); i++) + { + CNum indexInFolder = 0; + CNum numCopyItems = 0; + CNum numUnpackStreams = db->NumUnpackStreamsVector[i]; + UInt64 repackSize = 0; + for (CNum fi = db->FolderStartFileIndex[i]; indexInFolder < numUnpackStreams; fi++) + { + const CFileItem &file = db->Files[fi]; + if (file.HasStream) + { + indexInFolder++; + int updateIndex = fileIndexToUpdateIndexMap[fi]; + if (updateIndex >= 0 && !updateItems[updateIndex].NewData) + { + numCopyItems++; + repackSize += file.Size; + } + } + } + + if (numCopyItems == 0) + continue; + + CFolderRepack rep; + rep.FolderIndex = i; + rep.NumCopyFiles = numCopyItems; + const CFolder &f = db->Folders[i]; + bool isEncrypted = f.IsEncrypted(); + rep.Group = GetGroupIndex(isEncrypted, Is86FilteredFolder(f)); + folderRefs.Add(rep); + if (numCopyItems == numUnpackStreams) + complexity += db->GetFolderFullPackSize(i); + else + { + complexity += repackSize; + if (repackSize > inSizeForReduce2) + inSizeForReduce2 = repackSize; + if (isEncrypted) + needEncryptedRepack = true; + } + } + folderRefs.Sort(CompareFolderRepacks, (void *)db); + } + + UInt64 inSizeForReduce = 0; + int i; + for (i = 0; i < updateItems.Size(); i++) + { + const CUpdateItem &ui = updateItems[i]; + if (ui.NewData) + { + complexity += ui.Size; + if (numSolidFiles != 1) + inSizeForReduce += ui.Size; + else if (ui.Size > inSizeForReduce) + inSizeForReduce = ui.Size; + } + } + + if (inSizeForReduce2 > inSizeForReduce) + inSizeForReduce = inSizeForReduce2; + + const UInt32 kMinReduceSize = (1 << 16); + if (inSizeForReduce < kMinReduceSize) + inSizeForReduce = kMinReduceSize; + + RINOK(updateCallback->SetTotal(complexity)); + + CLocalProgress *lps = new CLocalProgress; + CMyComPtr progress = lps; + lps->Init(updateCallback, true); + + CThreadDecoder threadDecoder; + if (!folderRefs.IsEmpty()) + { + #ifdef EXTERNAL_CODECS + threadDecoder._codecsInfo = codecsInfo; + threadDecoder._externalCodecs = *externalCodecs; + #endif + RINOK(threadDecoder.Create()); + } + + CObjectVector groups; + for (i = 0; i < kNumGroupsMax; i++) + groups.Add(CSolidGroup()); + + { + // ---------- Split files to 2 groups ---------- + + bool useFilters = options.UseFilters; + const CCompressionMethodMode &method = *options.Method; + if (method.Methods.Size() != 1 || method.Binds.Size() != 0) + useFilters = false; + for (i = 0; i < updateItems.Size(); i++) + { + const CUpdateItem &ui = updateItems[i]; + if (!ui.NewData || !ui.HasStream()) + continue; + bool filteredGroup = false; + if (useFilters) + { +#ifdef _WIN32 + int dotPos = ui.Name.ReverseFind(L'.'); + if (dotPos >= 0) + filteredGroup = IsExeExt(ui.Name.Mid(dotPos + 1)); +#else + filteredGroup = IsExeFile(ui); +#endif + } + groups[GetGroupIndex(method.PasswordIsDefined, filteredGroup)].Indices.Add(i); + } + } + + #ifndef _NO_CRYPTO + + CCryptoGetTextPassword *getPasswordSpec = NULL; + if (needEncryptedRepack) + { + getPasswordSpec = new CCryptoGetTextPassword; + threadDecoder.GetTextPassword = getPasswordSpec; + + if (options.Method->PasswordIsDefined) + getPasswordSpec->Password = options.Method->Password; + else + { + if (!getDecoderPassword) + return E_NOTIMPL; + CMyComBSTR password; + RINOK(getDecoderPassword->CryptoGetTextPassword(&password)); + getPasswordSpec->Password = password; + } + } + + #endif + + // ---------- Compress ---------- + + RINOK(archive.Create(seqOutStream, false)); + RINOK(archive.SkipPrefixArchiveHeader()); + + int folderRefIndex = 0; + lps->ProgressOffset = 0; + + for (int groupIndex = 0; groupIndex < kNumGroupsMax; groupIndex++) + { + const CSolidGroup &group = groups[groupIndex]; + + CCompressionMethodMode method; + #ifdef USE_86_FILTER + if (Is86Group(groupIndex)) + MakeExeMethod(*options.Method, options.MaxFilter, method); + else + #endif + method = *options.Method; + + if (IsEncryptedGroup(groupIndex)) + { + if (!method.PasswordIsDefined) + { + #ifndef _NO_CRYPTO + if (getPasswordSpec) + method.Password = getPasswordSpec->Password; + #endif + method.PasswordIsDefined = true; + } + } + else + { + method.PasswordIsDefined = false; + method.Password.Empty(); + } + + CEncoder encoder(method); + + for (; folderRefIndex < folderRefs.Size(); folderRefIndex++) + { + const CFolderRepack &rep = folderRefs[folderRefIndex]; + if (rep.Group != groupIndex) + break; + int folderIndex = rep.FolderIndex; + + if (rep.NumCopyFiles == db->NumUnpackStreamsVector[folderIndex]) + { + UInt64 packSize = db->GetFolderFullPackSize(folderIndex); + RINOK(WriteRange(inStream, archive.SeqStream, + db->GetFolderStreamPos(folderIndex, 0), packSize, progress)); + lps->ProgressOffset += packSize; + + const CFolder &folder = db->Folders[folderIndex]; + CNum startIndex = db->FolderStartPackStreamIndex[folderIndex]; + for (int j = 0; j < folder.PackStreams.Size(); j++) + { + newDatabase.PackSizes.Add(db->PackSizes[startIndex + j]); + // newDatabase.PackCRCsDefined.Add(db.PackCRCsDefined[startIndex + j]); + // newDatabase.PackCRCs.Add(db.PackCRCs[startIndex + j]); + } + newDatabase.Folders.Add(folder); + } + else + { + CStreamBinder sb; + RINOK(sb.CreateEvents()); + CMyComPtr sbOutStream; + CMyComPtr sbInStream; + sb.CreateStreams(&sbInStream, &sbOutStream); + CBoolVector extractStatuses; + + CNum numUnpackStreams = db->NumUnpackStreamsVector[folderIndex]; + CNum indexInFolder = 0; + + for (CNum fi = db->FolderStartFileIndex[folderIndex]; indexInFolder < numUnpackStreams; fi++) + { + bool needExtract = false; + if (db->Files[fi].HasStream) + { + indexInFolder++; + int updateIndex = fileIndexToUpdateIndexMap[fi]; + if (updateIndex >= 0 && !updateItems[updateIndex].NewData) + needExtract = true; + } + extractStatuses.Add(needExtract); + } + + RINOK(threadDecoder.FosSpec->Init(db, db->FolderStartFileIndex[folderIndex], &extractStatuses, sbOutStream)); + sbOutStream.Release(); + + threadDecoder.InStream = inStream; + threadDecoder.Folder = &db->Folders[folderIndex]; + threadDecoder.StartPos = db->GetFolderStreamPos(folderIndex, 0); + threadDecoder.PackSizes = &db->PackSizes[db->FolderStartPackStreamIndex[folderIndex]]; + + threadDecoder.Start(); + + int startPackIndex = newDatabase.PackSizes.Size(); + CFolder newFolder; + RINOK(encoder.Encode( + EXTERNAL_CODECS_LOC_VARS + sbInStream, NULL, &inSizeForReduce, newFolder, + archive.SeqStream, newDatabase.PackSizes, progress)); + + threadDecoder.WaitFinish(); + + RINOK(threadDecoder.Result); + + for (; startPackIndex < newDatabase.PackSizes.Size(); startPackIndex++) + lps->OutSize += newDatabase.PackSizes[startPackIndex]; + lps->InSize += newFolder.GetUnpackSize(); + + newDatabase.Folders.Add(newFolder); + } + + newDatabase.NumUnpackStreamsVector.Add(rep.NumCopyFiles); + + CNum numUnpackStreams = db->NumUnpackStreamsVector[folderIndex]; + + CNum indexInFolder = 0; + for (CNum fi = db->FolderStartFileIndex[folderIndex]; indexInFolder < numUnpackStreams; fi++) + { + CFileItem file; + CFileItem2 file2; + db->GetFile(fi, file, file2); + if (file.HasStream) + { + indexInFolder++; + int updateIndex = fileIndexToUpdateIndexMap[fi]; + if (updateIndex >= 0) + { + const CUpdateItem &ui = updateItems[updateIndex]; + if (ui.NewData) + continue; + if (ui.NewProps) + { + CFileItem uf; + FromUpdateItemToFileItem(ui, uf, file2); + uf.Size = file.Size; + uf.Crc = file.Crc; + uf.CrcDefined = file.CrcDefined; + uf.HasStream = file.HasStream; + file = uf; + } + newDatabase.AddFile(file, file2); + } + } + } + } + + int numFiles = group.Indices.Size(); + if (numFiles == 0) + continue; + CRecordVector refItems; + refItems.Reserve(numFiles); + bool sortByType = (numSolidFiles > 1); + for (i = 0; i < numFiles; i++) + refItems.Add(CRefItem(group.Indices[i], updateItems[group.Indices[i]], sortByType)); + refItems.Sort(CompareUpdateItems, (void *)&sortByType); + + CRecordVector indices; + indices.Reserve(numFiles); + + for (i = 0; i < numFiles; i++) + { + UInt32 index = refItems[i].Index; + indices.Add(index); + /* + const CUpdateItem &ui = updateItems[index]; + CFileItem file; + if (ui.NewProps) + FromUpdateItemToFileItem(ui, file); + else + file = db.Files[ui.IndexInArchive]; + if (file.IsAnti || file.IsDir) + return E_FAIL; + newDatabase.Files.Add(file); + */ + } + + for (i = 0; i < numFiles;) + { + UInt64 totalSize = 0; + int numSubFiles; + UString prevExtension; + for (numSubFiles = 0; i + numSubFiles < numFiles && + numSubFiles < numSolidFiles; numSubFiles++) + { + const CUpdateItem &ui = updateItems[indices[i + numSubFiles]]; + totalSize += ui.Size; + if (totalSize > options.NumSolidBytes) + break; + if (options.SolidExtension) + { + UString ext = ui.GetExtension(); + if (numSubFiles == 0) + prevExtension = ext; + else + if (ext.CompareNoCase(prevExtension) != 0) + break; + } + } + if (numSubFiles < 1) + numSubFiles = 1; + + CFolderInStream *inStreamSpec = new CFolderInStream; + CMyComPtr solidInStream(inStreamSpec); + inStreamSpec->Init(updateCallback, &indices[i], numSubFiles); + + CFolder folderItem; + + int startPackIndex = newDatabase.PackSizes.Size(); + RINOK(encoder.Encode( + EXTERNAL_CODECS_LOC_VARS + solidInStream, NULL, &inSizeForReduce, folderItem, + archive.SeqStream, newDatabase.PackSizes, progress)); + + for (; startPackIndex < newDatabase.PackSizes.Size(); startPackIndex++) + lps->OutSize += newDatabase.PackSizes[startPackIndex]; + + lps->InSize += folderItem.GetUnpackSize(); + // for () + // newDatabase.PackCRCsDefined.Add(false); + // newDatabase.PackCRCs.Add(0); + + newDatabase.Folders.Add(folderItem); + + CNum numUnpackStreams = 0; + for (int subIndex = 0; subIndex < numSubFiles; subIndex++) + { + const CUpdateItem &ui = updateItems[indices[i + subIndex]]; + CFileItem file; + CFileItem2 file2; + if (ui.NewProps) + FromUpdateItemToFileItem(ui, file, file2); + else + db->GetFile(ui.IndexInArchive, file, file2); + if (file2.IsAnti || file.IsDir) + return E_FAIL; + + /* + CFileItem &file = newDatabase.Files[ + startFileIndexInDatabase + i + subIndex]; + */ + if (!inStreamSpec->Processed[subIndex]) + { + continue; + // file.Name += L".locked"; + } + + file.Crc = inStreamSpec->CRCs[subIndex]; + file.Size = inStreamSpec->Sizes[subIndex]; + if (file.Size != 0) + { + file.CrcDefined = true; + file.HasStream = true; + numUnpackStreams++; + } + else + { + file.CrcDefined = false; + file.HasStream = false; + } + newDatabase.AddFile(file, file2); + } + // numUnpackStreams = 0 is very bad case for locked files + // v3.13 doesn't understand it. + newDatabase.NumUnpackStreamsVector.Add(numUnpackStreams); + i += numSubFiles; + } + } + + if (folderRefIndex != folderRefs.Size()) + return E_FAIL; + + /* + folderRefs.ClearAndFree(); + fileIndexToUpdateIndexMap.ClearAndFree(); + groups.ClearAndFree(); + */ + + { + // ---------- Write Folders & Empty Files ---------- + + CRecordVector emptyRefs; + for (i = 0; i < updateItems.Size(); i++) + { + const CUpdateItem &ui = updateItems[i]; + if (ui.NewData) + { + if (ui.HasStream()) + continue; + } + else if (ui.IndexInArchive != -1 && db->Files[ui.IndexInArchive].HasStream) + continue; + emptyRefs.Add(i); + } + emptyRefs.Sort(CompareEmptyItems, (void *)&updateItems); + for (i = 0; i < emptyRefs.Size(); i++) + { + const CUpdateItem &ui = updateItems[emptyRefs[i]]; + CFileItem file; + CFileItem2 file2; + if (ui.NewProps) + FromUpdateItemToFileItem(ui, file, file2); + else + db->GetFile(ui.IndexInArchive, file, file2); + newDatabase.AddFile(file, file2); + } + } + + newDatabase.ReserveDown(); + return S_OK; +} + +}} diff --git a/CPP/7zip/Archive/7z/7zUpdate.h b/CPP/7zip/Archive/7z/7zUpdate.h new file mode 100644 index 0000000..31e3622 --- /dev/null +++ b/CPP/7zip/Archive/7z/7zUpdate.h @@ -0,0 +1,88 @@ +// 7zUpdate.h + +#ifndef __7Z_UPDATE_H +#define __7Z_UPDATE_H + +#include "7zCompressionMode.h" +#include "7zIn.h" +#include "7zOut.h" + +#include "../IArchive.h" + +namespace NArchive { +namespace N7z { + +struct CUpdateItem +{ + int IndexInArchive; + int IndexInClient; + + UInt64 CTime; + UInt64 ATime; + UInt64 MTime; + + UInt64 Size; + UString Name; + + UInt32 Attrib; + + bool NewData; + bool NewProps; + + bool IsAnti; + bool IsDir; + + bool AttribDefined; + bool CTimeDefined; + bool ATimeDefined; + bool MTimeDefined; + + bool HasStream() const { return !IsDir && !IsAnti && Size != 0; } + + CUpdateItem(): + IsAnti(false), + IsDir(false), + AttribDefined(false), + CTimeDefined(false), + ATimeDefined(false), + MTimeDefined(false) + {} + void SetDirStatusFromAttrib() { IsDir = ((Attrib & FILE_ATTRIBUTE_DIRECTORY) != 0); }; + + int GetExtensionPos() const; + UString GetExtension() const; +}; + +struct CUpdateOptions +{ + const CCompressionMethodMode *Method; + const CCompressionMethodMode *HeaderMethod; + bool UseFilters; + bool MaxFilter; + + CHeaderOptions HeaderOptions; + + UInt64 NumSolidFiles; + UInt64 NumSolidBytes; + bool SolidExtension; + bool RemoveSfxBlock; + bool VolumeMode; +}; + +HRESULT Update( + DECL_EXTERNAL_CODECS_LOC_VARS + IInStream *inStream, + const CArchiveDatabaseEx *db, + const CObjectVector &updateItems, + COutArchive &archive, + CArchiveDatabase &newDatabase, + ISequentialOutStream *seqOutStream, + IArchiveUpdateCallback *updateCallback, + const CUpdateOptions &options + #ifndef _NO_CRYPTO + , ICryptoGetTextPassword *getDecoderPassword + #endif + ); +}} + +#endif diff --git a/CPP/7zip/Archive/ApmHandler.cpp b/CPP/7zip/Archive/ApmHandler.cpp new file mode 100644 index 0000000..a3b5e19 --- /dev/null +++ b/CPP/7zip/Archive/ApmHandler.cpp @@ -0,0 +1,356 @@ +// ApmHandler.cpp + +#include "StdAfx.h" + +#include "../../../C/CpuArch.h" + +#include "Common/ComTry.h" +#include "Common/IntToString.h" +#include "Common/MyString.h" + +#include "Windows/PropVariant.h" + +#include "../Common/LimitedStreams.h" +#include "../Common/ProgressUtils.h" +#include "../Common/RegisterArc.h" +#include "../Common/StreamUtils.h" + +#include "../Compress/CopyCoder.h" + +#define Get16(p) GetBe16(p) +#define Get32(p) GetBe32(p) + +using namespace NWindows; + +namespace NArchive { +namespace NApm { + +struct CItem +{ + UInt32 StartBlock; + UInt32 NumBlocks; + char Name[32]; + char Type[32]; + /* + UInt32 DataStartBlock; + UInt32 NumDataBlocks; + UInt32 Status; + UInt32 BootStartBlock; + UInt32 BootSize; + UInt32 BootAddr; + UInt32 BootEntry; + UInt32 BootChecksum; + char Processor[16]; + */ + + bool Parse(const Byte *p, UInt32 &numBlocksInMap) + { + if (p[0] != 0x50 || p[1] != 0x4D || p[2] != 0 || p[3] != 0) + return false; + numBlocksInMap = Get32(p + 4); + StartBlock = Get32(p + 8); + NumBlocks = Get32(p + 0xC); + memcpy(Name, p + 0x10, 32); + memcpy(Type, p + 0x30, 32); + /* + DataStartBlock = Get32(p + 0x50); + NumDataBlocks = Get32(p + 0x54); + Status = Get32(p + 0x58); + BootStartBlock = Get32(p + 0x5C); + BootSize = Get32(p + 0x60); + BootAddr = Get32(p + 0x64); + if (Get32(p + 0x68) != 0) + return false; + BootEntry = Get32(p + 0x6C); + if (Get32(p + 0x70) != 0) + return false; + BootChecksum = Get32(p + 0x74); + memcpy(Processor, p + 0x78, 16); + */ + return true; + } +}; + +class CHandler: + public IInArchive, + public IInArchiveGetStream, + public CMyUnknownImp +{ + CMyComPtr _stream; + CRecordVector _items; + + int _blockSizeLog; + UInt32 _numBlocks; + + HRESULT ReadTables(IInStream *stream); + UInt64 BlocksToBytes(UInt32 i) const { return (UInt64)i << _blockSizeLog; } + UInt64 GetItemSize(const CItem &item) { return BlocksToBytes(item.NumBlocks); } +public: + MY_UNKNOWN_IMP2(IInArchive, IInArchiveGetStream) + INTERFACE_IInArchive(;) + STDMETHOD(GetStream)(UInt32 index, ISequentialInStream **stream); +}; + +static inline int GetLog(UInt32 num) +{ + for (int i = 0; i < 31; i++) + if (((UInt32)1 << i) == num) + return i; + return -1; +} + +HRESULT CHandler::ReadTables(IInStream *stream) +{ + const UInt32 kSectorSize = 512; + Byte buf[kSectorSize]; + { + RINOK(ReadStream_FALSE(stream, buf, kSectorSize)); + if (buf[0] != 0x45 || buf[1] != 0x52) + return S_FALSE; + _blockSizeLog = GetLog(Get16(buf + 2)); + if (_blockSizeLog < 9 || _blockSizeLog > 14) + return S_FALSE; + _numBlocks = Get32(buf + 4); + for (int i = 8; i < 16; i++) + if (buf[i] != 0) + return S_FALSE; + } + + unsigned numSkips = (unsigned)1 << (_blockSizeLog - 9); + for (unsigned j = 1; j < numSkips; j++) + { + RINOK(ReadStream_FALSE(stream, buf, kSectorSize)); + } + + UInt32 numBlocksInMap = 0; + for (unsigned i = 0;;) + { + RINOK(ReadStream_FALSE(stream, buf, kSectorSize)); + + CItem item; + + UInt32 numBlocksInMap2; + if (!item.Parse(buf, numBlocksInMap2)) + return S_FALSE; + if (i == 0) + { + numBlocksInMap = numBlocksInMap2; + if (numBlocksInMap > (1 << 8)) + return S_FALSE; + } + else if (numBlocksInMap2 != numBlocksInMap) + return S_FALSE; + + UInt32 finish = item.StartBlock + item.NumBlocks; + if (finish < item.StartBlock) + return S_FALSE; + _numBlocks = MyMax(_numBlocks, finish); + + _items.Add(item); + for (unsigned j = 1; j < numSkips; j++) + { + RINOK(ReadStream_FALSE(stream, buf, kSectorSize)); + } + if (++i == numBlocksInMap) + break; + } + return S_OK; +} + +STDMETHODIMP CHandler::Open(IInStream *stream, + const UInt64 * /* maxCheckStartPosition */, + IArchiveOpenCallback * /* openArchiveCallback */) +{ + COM_TRY_BEGIN + Close(); + RINOK(ReadTables(stream)); + _stream = stream; + return S_OK; + COM_TRY_END +} + +STDMETHODIMP CHandler::Close() +{ + _items.Clear(); + _stream.Release(); + return S_OK; +} + +STATPROPSTG kProps[] = +{ + { NULL, kpidPath, VT_BSTR}, + { NULL, kpidSize, VT_UI8}, + { NULL, kpidOffset, VT_UI8} +}; + +STATPROPSTG kArcProps[] = +{ + { NULL, kpidClusterSize, VT_UI4}, + { NULL, kpidPhySize, VT_UI8} +}; + +IMP_IInArchive_Props +IMP_IInArchive_ArcProps + +static AString GetString(const char *s) +{ + AString res; + for (int i = 0; i < 32 && s[i] != 0; i++) + res += s[i]; + return res; +} + +STDMETHODIMP CHandler::GetArchiveProperty(PROPID propID, PROPVARIANT *value) +{ + COM_TRY_BEGIN + NCOM::CPropVariant prop; + switch(propID) + { + case kpidMainSubfile: + { + int mainIndex = -1; + for (int i = 0; i < _items.Size(); i++) + { + AString s = GetString(_items[i].Type); + if (s != "Apple_Free" && + s != "Apple_partition_map") + { + if (mainIndex >= 0) + { + mainIndex = -1; + break; + } + mainIndex = i; + } + } + if (mainIndex >= 0) + prop = (UInt32)mainIndex; + break; + } + case kpidClusterSize: prop = (UInt32)1 << _blockSizeLog; break; + case kpidPhySize: prop = BlocksToBytes(_numBlocks); break; + } + prop.Detach(value); + return S_OK; + COM_TRY_END +} + +STDMETHODIMP CHandler::GetNumberOfItems(UInt32 *numItems) +{ + *numItems = _items.Size(); + return S_OK; +} + +STDMETHODIMP CHandler::GetProperty(UInt32 index, PROPID propID, PROPVARIANT *value) +{ + COM_TRY_BEGIN + NCOM::CPropVariant prop; + const CItem &item = _items[index]; + switch(propID) + { + case kpidPath: + { + AString s = GetString(item.Name); + if (s.IsEmpty()) + { + char s2[32]; + ConvertUInt32ToString(index, s2); + s = s2; + } + AString type = GetString(item.Type); + if (type == "Apple_HFS") + type = "hfs"; + if (!type.IsEmpty()) + { + s += '.'; + s += type; + } + prop = s; + break; + } + case kpidSize: + case kpidPackSize: + prop = GetItemSize(item); + break; + case kpidOffset: prop = BlocksToBytes(item.StartBlock); break; + } + prop.Detach(value); + return S_OK; + COM_TRY_END +} + +STDMETHODIMP CHandler::Extract(const UInt32 *indices, UInt32 numItems, + Int32 testMode, IArchiveExtractCallback *extractCallback) +{ + COM_TRY_BEGIN + bool allFilesMode = (numItems == (UInt32)-1); + if (allFilesMode) + numItems = _items.Size(); + if (numItems == 0) + return S_OK; + UInt64 totalSize = 0; + UInt32 i; + for (i = 0; i < numItems; i++) + totalSize += GetItemSize(_items[allFilesMode ? i : indices[i]]); + extractCallback->SetTotal(totalSize); + + totalSize = 0; + + NCompress::CCopyCoder *copyCoderSpec = new NCompress::CCopyCoder(); + CMyComPtr copyCoder = copyCoderSpec; + + CLocalProgress *lps = new CLocalProgress; + CMyComPtr progress = lps; + lps->Init(extractCallback, false); + + CLimitedSequentialInStream *streamSpec = new CLimitedSequentialInStream; + CMyComPtr inStream(streamSpec); + streamSpec->SetStream(_stream); + + for (i = 0; i < numItems; i++) + { + lps->InSize = totalSize; + lps->OutSize = totalSize; + RINOK(lps->SetCur()); + CMyComPtr outStream; + Int32 askMode = testMode ? + NExtract::NAskMode::kTest : + NExtract::NAskMode::kExtract; + Int32 index = allFilesMode ? i : indices[i]; + const CItem &item = _items[index]; + + RINOK(extractCallback->GetStream(index, &outStream, askMode)); + UInt64 size = GetItemSize(item); + totalSize += size; + if (!testMode && !outStream) + continue; + RINOK(extractCallback->PrepareOperation(askMode)); + + RINOK(_stream->Seek(BlocksToBytes(item.StartBlock), STREAM_SEEK_SET, NULL)); + streamSpec->Init(size); + RINOK(copyCoder->Code(inStream, outStream, NULL, NULL, progress)); + outStream.Release(); + RINOK(extractCallback->SetOperationResult(copyCoderSpec->TotalSize == size ? + NExtract::NOperationResult::kOK: + NExtract::NOperationResult::kDataError)); + } + return S_OK; + COM_TRY_END +} + +STDMETHODIMP CHandler::GetStream(UInt32 index, ISequentialInStream **stream) +{ + COM_TRY_BEGIN + const CItem &item = _items[index]; + return CreateLimitedInStream(_stream, BlocksToBytes(item.StartBlock), GetItemSize(item), stream); + COM_TRY_END +} + +static IInArchive *CreateArc() { return new CHandler; } + +static CArcInfo g_ArcInfo = + { L"APM", L"", 0, 0xD4, { 0x50, 0x4D, 0, 0, 0, 0, 0 }, 7, false, CreateArc, 0 }; + +REGISTER_ARC(Apm) + +}} diff --git a/CPP/7zip/Archive/ArchiveExports.cpp b/CPP/7zip/Archive/ArchiveExports.cpp new file mode 100644 index 0000000..c7908b5 --- /dev/null +++ b/CPP/7zip/Archive/ArchiveExports.cpp @@ -0,0 +1,135 @@ +// ArchiveExports.cpp + +#include "StdAfx.h" + +#include "../../Common/ComTry.h" + +#include "../../Windows/PropVariant.h" + +#include "../Common/RegisterArc.h" + +static const unsigned int kNumArcsMax = 48; +static unsigned int g_NumArcs = 0; +static unsigned int g_DefaultArcIndex = 0; +static const CArcInfo *g_Arcs[kNumArcsMax]; +void RegisterArc(const CArcInfo *arcInfo) +{ + if (g_NumArcs < kNumArcsMax) + { + const wchar_t *p = arcInfo->Name; + if (p[0] == '7' && p[1] == 'z' && p[2] == 0) + g_DefaultArcIndex = g_NumArcs; + g_Arcs[g_NumArcs++] = arcInfo; + } +} + +DEFINE_GUID(CLSID_CArchiveHandler, +0x23170F69, 0x40C1, 0x278A, 0x10, 0x00, 0x00, 0x01, 0x10, 0x00, 0x00, 0x00); + +#define CLS_ARC_ID_ITEM(cls) ((cls).Data4[5]) + +static inline HRESULT SetPropString(const char *s, unsigned int size, PROPVARIANT *value) +{ + if ((value->bstrVal = ::SysAllocStringByteLen(s, size)) != 0) + value->vt = VT_BSTR; + return S_OK; +} + +static inline HRESULT SetPropGUID(const GUID &guid, PROPVARIANT *value) +{ + return SetPropString((const char *)&guid, sizeof(GUID), value); +} + +int FindFormatCalssId(const GUID *clsID) +{ + GUID cls = *clsID; + CLS_ARC_ID_ITEM(cls) = 0; + if (cls != CLSID_CArchiveHandler) + return -1; + Byte id = CLS_ARC_ID_ITEM(*clsID); + for (unsigned i = 0; i < g_NumArcs; i++) + if (g_Arcs[i]->ClassId == id) + return (int)i; + return -1; +} + +STDAPI CreateArchiver(const GUID *clsid, const GUID *iid, void **outObject) +{ + COM_TRY_BEGIN + { + int needIn = (*iid == IID_IInArchive); + int needOut = (*iid == IID_IOutArchive); + if (!needIn && !needOut) + return E_NOINTERFACE; + int formatIndex = FindFormatCalssId(clsid); + if (formatIndex < 0) + return CLASS_E_CLASSNOTAVAILABLE; + + const CArcInfo &arc = *g_Arcs[formatIndex]; + if (needIn) + { + *outObject = arc.CreateInArchive(); + ((IInArchive *)*outObject)->AddRef(); + } + else + { + if (!arc.CreateOutArchive) + return CLASS_E_CLASSNOTAVAILABLE; + *outObject = arc.CreateOutArchive(); + ((IOutArchive *)*outObject)->AddRef(); + } + } + COM_TRY_END + return S_OK; +} + +STDAPI GetHandlerProperty2(UInt32 formatIndex, PROPID propID, PROPVARIANT *value) +{ + COM_TRY_BEGIN + if (formatIndex >= g_NumArcs) + return E_INVALIDARG; + const CArcInfo &arc = *g_Arcs[formatIndex]; + NWindows::NCOM::CPropVariant prop; + switch(propID) + { + case NArchive::kName: + prop = arc.Name; + break; + case NArchive::kClassID: + { + GUID clsId = CLSID_CArchiveHandler; + CLS_ARC_ID_ITEM(clsId) = arc.ClassId; + return SetPropGUID(clsId, value); + } + case NArchive::kExtension: + if (arc.Ext != 0) + prop = arc.Ext; + break; + case NArchive::kAddExtension: + if (arc.AddExt != 0) + prop = arc.AddExt; + break; + case NArchive::kUpdate: + prop = (bool)(arc.CreateOutArchive != 0); + break; + case NArchive::kKeepName: + prop = arc.KeepName; + break; + case NArchive::kStartSignature: + return SetPropString((const char *)arc.Signature, arc.SignatureSize, value); + } + prop.Detach(value); + return S_OK; + COM_TRY_END +} + +STDAPI GetHandlerProperty(PROPID propID, PROPVARIANT *value) +{ + return GetHandlerProperty2(g_DefaultArcIndex, propID, value); +} + +STDAPI GetNumberOfFormats(UINT32 *numFormats) +{ + *numFormats = g_NumArcs; + return S_OK; +} diff --git a/CPP/7zip/Archive/ArjHandler.cpp b/CPP/7zip/Archive/ArjHandler.cpp new file mode 100644 index 0000000..4dd686e --- /dev/null +++ b/CPP/7zip/Archive/ArjHandler.cpp @@ -0,0 +1,798 @@ +// ArjHandler.cpp + +#include "StdAfx.h" + +#include "../../../C/CpuArch.h" + +#include "Common/ComTry.h" +#include "Common/StringConvert.h" + +#include "Windows/PropVariant.h" +#include "Windows/Time.h" + +#include "../Common/LimitedStreams.h" +#include "../Common/ProgressUtils.h" +#include "../Common/RegisterArc.h" +#include "../Common/StreamObjects.h" +#include "../Common/StreamUtils.h" + +#include "../Compress/ArjDecoder1.h" +#include "../Compress/ArjDecoder2.h" +#include "../Compress/CopyCoder.h" + +#include "Common/ItemNameUtils.h" +#include "Common/OutStreamWithCRC.h" + +using namespace NWindows; + +#define Get16(p) GetUi16(p) +#define Get32(p) GetUi32(p) + +namespace NArchive { +namespace NArj { + +const int kBlockSizeMin = 30; +const int kBlockSizeMax = 2600; + +namespace NSignature +{ + const Byte kSig0 = 0x60; + const Byte kSig1 = 0xEA; +} + +namespace NFileHeader +{ + namespace NCompressionMethod + { + enum + { + kStored = 0, + kCompressed1a = 1, + kCompressed1b = 2, + kCompressed1c = 3, + kCompressed2 = 4, + kNoDataNoCRC = 8, + kNoData = 9 + }; + } + + namespace NFileType + { + enum + { + kBinary = 0, + k7BitText = 1, + kArchiveHeader = 2, + kDirectory = 3, + kVolumeLablel = 4, + kChapterLabel = 5 + }; + } + + namespace NFlags + { + const Byte kGarbled = 1; + const Byte kVolume = 4; + const Byte kExtFile = 8; + const Byte kPathSym = 0x10; + const Byte kBackup = 0x20; + } + + namespace NHostOS + { + enum EEnum + { + kMSDOS = 0, // filesystem used by MS-DOS, OS/2, Win32 + // pkarj 2.50 (FAT / VFAT / FAT32 file systems) + kPRIMOS, + kUnix, + kAMIGA, + kMac, + kOS_2, + kAPPLE_GS, + kAtari_ST, + kNext, + kVAX_VMS, + kWIN95 + }; + } +} + +struct CArchiveHeader +{ + // Byte ArchiverVersion; + // Byte ExtractVersion; + Byte HostOS; + // Byte Flags; + // Byte SecuryVersion; + // Byte FileType; + // Byte Reserved; + UInt32 CTime; + UInt32 MTime; + UInt32 ArchiveSize; + // UInt32 SecurityEnvelopeFilePosition; + // UInt16 FilespecPositionInFilename; + // UInt16 LengthOfSecurityEnvelopeSata; + // Byte EncryptionVersion; + // Byte LastChapter; + AString Name; + AString Comment; + + HRESULT Parse(const Byte *p, unsigned size); +}; + +static HRESULT ReadString(const Byte *p, unsigned &size, AString &res) +{ + AString s; + for (unsigned i = 0; i < size;) + { + char c = (char)p[i++]; + if (c == 0) + { + size = i; + res = s; + return S_OK; + } + s += c; + } + return S_FALSE; +} + +HRESULT CArchiveHeader::Parse(const Byte *p, unsigned size) +{ + if (size < kBlockSizeMin) + return S_FALSE; + Byte firstHeaderSize = p[0]; + if (firstHeaderSize > size) + return S_FALSE; + // ArchiverVersion = p[1]; + // ExtractVersion = p[2]; + HostOS = p[3]; + // Flags = p[4]; + // SecuryVersion = p[5]; + if (p[6] != NFileHeader::NFileType::kArchiveHeader) + return S_FALSE; + // Reserved = p[7]; + CTime = Get32(p + 8); + MTime = Get32(p + 12); + ArchiveSize = Get32(p + 16); + // SecurityEnvelopeFilePosition = Get32(p + 20); + // UInt16 filespecPositionInFilename = Get16(p + 24); + // LengthOfSecurityEnvelopeSata = Get16(p + 26); + // EncryptionVersion = p[28]; + // LastChapter = p[29]; + unsigned pos = firstHeaderSize; + unsigned size1 = size - pos; + RINOK(ReadString(p + pos, size1, Name)); + pos += size1; + size1 = size - pos; + RINOK(ReadString(p + pos, size1, Comment)); + pos += size1; + return S_OK; +} + +struct CItem +{ + AString Name; + AString Comment; + + UInt32 MTime; + UInt32 PackSize; + UInt32 Size; + UInt32 FileCRC; + UInt32 SplitPos; + + Byte Version; + Byte ExtractVersion; + Byte HostOS; + Byte Flags; + Byte Method; + Byte FileType; + + // UInt16 FilespecPositionInFilename; + UInt16 FileAccessMode; + // Byte FirstChapter; + // Byte LastChapter; + + UInt64 DataPosition; + + bool IsEncrypted() const { return (Flags & NFileHeader::NFlags::kGarbled) != 0; } + bool IsDir() const { return (FileType == NFileHeader::NFileType::kDirectory); } + bool IsSplitAfter() const { return (Flags & NFileHeader::NFlags::kVolume) != 0; } + bool IsSplitBefore() const { return (Flags & NFileHeader::NFlags::kExtFile) != 0; } + UInt32 GetWinAttributes() const + { + UInt32 winAtrributes; + switch(HostOS) + { + case NFileHeader::NHostOS::kMSDOS: + case NFileHeader::NHostOS::kWIN95: + winAtrributes = FileAccessMode; + break; + default: + winAtrributes = 0; + } + if (IsDir()) + winAtrributes |= FILE_ATTRIBUTE_DIRECTORY; + return winAtrributes; + } + + HRESULT Parse(const Byte *p, unsigned size); +}; + +HRESULT CItem::Parse(const Byte *p, unsigned size) +{ + if (size < kBlockSizeMin) + return S_FALSE; + + Byte firstHeaderSize = p[0]; + + Version = p[1]; + ExtractVersion = p[2]; + HostOS = p[3]; + Flags = p[4]; + Method = p[5]; + FileType = p[6]; + // Reserved = p[7]; + MTime = Get32(p + 8); + PackSize = Get32(p + 12); + Size = Get32(p + 16); + FileCRC = Get32(p + 20); + // FilespecPositionInFilename = Get16(p + 24); + FileAccessMode = Get16(p + 26); + // FirstChapter = p[28]; + // FirstChapter = p[29]; + + SplitPos = 0; + if (IsSplitBefore() && firstHeaderSize >= 34) + SplitPos = Get32(p + 30); + + unsigned pos = firstHeaderSize; + unsigned size1 = size - pos; + RINOK(ReadString(p + pos, size1, Name)); + pos += size1; + size1 = size - pos; + RINOK(ReadString(p + pos, size1, Comment)); + pos += size1; + + return S_OK; +} + +struct CInArchiveException +{ + enum CCauseType + { + kUnexpectedEndOfArchive = 0, + kCRCError, + kIncorrectArchive + } + Cause; + CInArchiveException(CCauseType cause): Cause(cause) {}; +}; + +class CInArchive +{ + UInt32 _blockSize; + Byte _block[kBlockSizeMax + 4]; + + HRESULT ReadBlock(bool &filled); + HRESULT ReadSignatureAndBlock(bool &filled); + HRESULT SkipExtendedHeaders(); + + HRESULT SafeReadBytes(void *data, UInt32 size); + +public: + CArchiveHeader Header; + + IInStream *Stream; + IArchiveOpenCallback *Callback; + UInt64 NumFiles; + UInt64 NumBytes; + + HRESULT Open(const UInt64 *searchHeaderSizeLimit); + HRESULT GetNextItem(bool &filled, CItem &item); +}; + +static inline bool TestMarkerCandidate(const Byte *p, unsigned maxSize) +{ + if (p[0] != NSignature::kSig0 || p[1] != NSignature::kSig1) + return false; + UInt32 blockSize = Get16(p + 2); + p += 4; + if (p[6] != NFileHeader::NFileType::kArchiveHeader || + p[0] > blockSize || + maxSize < 2 + 2 + blockSize + 4 || + blockSize < kBlockSizeMin || blockSize > kBlockSizeMax || + p[28] > 8) // EncryptionVersion + return false; + // return (Get32(p + blockSize) == CrcCalc(p, blockSize)); + return true; +} + +static HRESULT FindAndReadMarker(ISequentialInStream *stream, const UInt64 *searchHeaderSizeLimit, UInt64 &position) +{ + position = 0; + + const int kMarkerSizeMin = 2 + 2 + kBlockSizeMin + 4; + const int kMarkerSizeMax = 2 + 2 + kBlockSizeMax + 4; + + CByteBuffer byteBuffer; + const UInt32 kBufSize = 1 << 16; + byteBuffer.SetCapacity(kBufSize); + Byte *buf = byteBuffer; + + size_t processedSize = kMarkerSizeMax; + RINOK(ReadStream(stream, buf, &processedSize)); + if (processedSize < kMarkerSizeMin) + return S_FALSE; + if (TestMarkerCandidate(buf, (unsigned)processedSize)) + return S_OK; + + UInt32 numBytesPrev = (UInt32)processedSize - 1; + memmove(buf, buf + 1, numBytesPrev); + UInt64 curTestPos = 1; + for (;;) + { + if (searchHeaderSizeLimit != NULL) + if (curTestPos > *searchHeaderSizeLimit) + return S_FALSE; + processedSize = kBufSize - numBytesPrev; + RINOK(ReadStream(stream, buf + numBytesPrev, &processedSize)); + UInt32 numBytesInBuffer = numBytesPrev + (UInt32)processedSize; + if (numBytesInBuffer < kMarkerSizeMin) + return S_FALSE; + UInt32 numTests = numBytesInBuffer - kMarkerSizeMin + 1; + UInt32 pos; + for (pos = 0; pos < numTests; pos++) + { + for (; buf[pos] != NSignature::kSig0 && pos < numTests; pos++); + if (pos == numTests) + break; + if (TestMarkerCandidate(buf + pos, numBytesInBuffer - pos)) + { + position = curTestPos + pos; + return S_OK; + } + } + curTestPos += pos; + numBytesPrev = numBytesInBuffer - numTests; + memmove(buf, buf + numTests, numBytesPrev); + } +} + +HRESULT CInArchive::SafeReadBytes(void *data, UInt32 size) +{ + size_t processed = size; + RINOK(ReadStream(Stream, data, &processed)); + if (processed != size) + throw CInArchiveException(CInArchiveException::kUnexpectedEndOfArchive); + return S_OK; +} + +HRESULT CInArchive::ReadBlock(bool &filled) +{ + filled = false; + Byte buf[2]; + RINOK(SafeReadBytes(buf, 2)); + _blockSize = Get16(buf); + if (_blockSize == 0) + return S_OK; + if (_blockSize > kBlockSizeMax) + throw CInArchiveException(CInArchiveException::kIncorrectArchive); + RINOK(SafeReadBytes(_block, _blockSize + 4)); + NumBytes += _blockSize + 6; + if (Get32(_block + _blockSize) != CrcCalc(_block, _blockSize)) + throw CInArchiveException(CInArchiveException::kCRCError); + filled = true; + return S_OK; +} + +HRESULT CInArchive::ReadSignatureAndBlock(bool &filled) +{ + Byte id[2]; + RINOK(SafeReadBytes(id, 2)); + if (id[0] != NSignature::kSig0 || id[1] != NSignature::kSig1) + throw CInArchiveException(CInArchiveException::kIncorrectArchive); + return ReadBlock(filled); +} + +HRESULT CInArchive::SkipExtendedHeaders() +{ + for (UInt32 i = 0;; i++) + { + bool filled; + RINOK(ReadBlock(filled)); + if (!filled) + return S_OK; + if (Callback && (i & 0xFF) == 0) + RINOK(Callback->SetCompleted(&NumFiles, &NumBytes)); + } +} + +HRESULT CInArchive::Open(const UInt64 *searchHeaderSizeLimit) +{ + UInt64 position = 0; + RINOK(FindAndReadMarker(Stream, searchHeaderSizeLimit, position)); + RINOK(Stream->Seek(position, STREAM_SEEK_SET, NULL)); + bool filled; + RINOK(ReadSignatureAndBlock(filled)); + if (!filled) + return S_FALSE; + RINOK(Header.Parse(_block, _blockSize)); + return SkipExtendedHeaders(); +} + +HRESULT CInArchive::GetNextItem(bool &filled, CItem &item) +{ + RINOK(ReadSignatureAndBlock(filled)); + if (!filled) + return S_OK; + filled = false; + RINOK(item.Parse(_block, _blockSize)); + /* + UInt32 extraData; + if ((header.Flags & NFileHeader::NFlags::kExtFile) != 0) + extraData = GetUi32(_block + pos); + */ + + RINOK(SkipExtendedHeaders()); + filled = true; + return S_OK; +} + +class CHandler: + public IInArchive, + public CMyUnknownImp +{ +public: + MY_UNKNOWN_IMP1(IInArchive) + + INTERFACE_IInArchive(;) + + HRESULT Open2(IInStream *inStream, const UInt64 *maxCheckStartPosition, + IArchiveOpenCallback *callback); +private: + CInArchive _archive; + CObjectVector _items; + CMyComPtr _stream; +}; + +const wchar_t *kHostOS[] = +{ + L"MSDOS", + L"PRIMOS", + L"UNIX", + L"AMIGA", + L"MAC", + L"OS/2", + L"APPLE GS", + L"ATARI ST", + L"NEXT", + L"VAX VMS", + L"WIN95" +}; + +const wchar_t *kUnknownOS = L"Unknown"; + +const int kNumHostOSes = sizeof(kHostOS) / sizeof(kHostOS[0]); + +STATPROPSTG kArcProps[] = +{ + { NULL, kpidName, VT_BSTR}, + { NULL, kpidCTime, VT_BSTR}, + { NULL, kpidMTime, VT_BSTR}, + { NULL, kpidHostOS, VT_BSTR}, + { NULL, kpidComment, VT_BSTR} +}; + +STATPROPSTG kProps[] = +{ + { NULL, kpidPath, VT_BSTR}, + { NULL, kpidIsDir, VT_BOOL}, + { NULL, kpidSize, VT_UI4}, + { NULL, kpidPosition, VT_UI8}, + { NULL, kpidPackSize, VT_UI4}, + { NULL, kpidMTime, VT_FILETIME}, + { NULL, kpidAttrib, VT_UI4}, + { NULL, kpidEncrypted, VT_BOOL}, + { NULL, kpidCRC, VT_UI4}, + { NULL, kpidMethod, VT_UI1}, + { NULL, kpidHostOS, VT_BSTR}, + { NULL, kpidComment, VT_BSTR} +}; + +IMP_IInArchive_Props +IMP_IInArchive_ArcProps + +static void SetTime(UInt32 dosTime, NWindows::NCOM::CPropVariant &prop) +{ + if (dosTime == 0) + return; + FILETIME localFileTime, utc; + if (NTime::DosTimeToFileTime(dosTime, localFileTime)) + { + if (!LocalFileTimeToFileTime(&localFileTime, &utc)) + utc.dwHighDateTime = utc.dwLowDateTime = 0; + } + else + utc.dwHighDateTime = utc.dwLowDateTime = 0; + prop = utc; +} + +static void SetHostOS(Byte hostOS, NWindows::NCOM::CPropVariant &prop) +{ + prop = hostOS < kNumHostOSes ? kHostOS[hostOS] : kUnknownOS; +} + +static void SetUnicodeString(const AString &s, NWindows::NCOM::CPropVariant &prop) +{ + if (!s.IsEmpty()) + prop = MultiByteToUnicodeString(s, CP_OEMCP); +} + +STDMETHODIMP CHandler::GetArchiveProperty(PROPID propID, PROPVARIANT *value) +{ + COM_TRY_BEGIN + NWindows::NCOM::CPropVariant prop; + switch(propID) + { + case kpidName: SetUnicodeString(_archive.Header.Name, prop); break; + case kpidCTime: SetTime(_archive.Header.CTime, prop); break; + case kpidMTime: SetTime(_archive.Header.MTime, prop); break; + case kpidHostOS: SetHostOS(_archive.Header.HostOS, prop); break; + case kpidComment: SetUnicodeString(_archive.Header.Comment, prop); break; + } + prop.Detach(value); + return S_OK; + COM_TRY_END +} + +STDMETHODIMP CHandler::GetNumberOfItems(UInt32 *numItems) +{ + *numItems = _items.Size(); + return S_OK; +} + +STDMETHODIMP CHandler::GetProperty(UInt32 index, PROPID propID, PROPVARIANT *value) +{ + COM_TRY_BEGIN + NWindows::NCOM::CPropVariant prop; + const CItem &item = _items[index]; + switch(propID) + { + case kpidPath: prop = NItemName::GetOSName(MultiByteToUnicodeString(item.Name, CP_OEMCP)); break; + case kpidIsDir: prop = item.IsDir(); break; + case kpidSize: prop = item.Size; break; + case kpidPackSize: prop = item.PackSize; break; + case kpidPosition: if (item.IsSplitBefore() || item.IsSplitAfter()) prop = (UInt64)item.SplitPos; break; + case kpidAttrib: prop = item.GetWinAttributes(); break; + case kpidEncrypted: prop = item.IsEncrypted(); break; + case kpidCRC: prop = item.FileCRC; break; + case kpidMethod: prop = item.Method; break; + case kpidHostOS: SetHostOS(item.HostOS, prop); break; + case kpidMTime: SetTime(item.MTime, prop); break; + case kpidComment: SetUnicodeString(item.Comment, prop); break; + } + prop.Detach(value); + return S_OK; + COM_TRY_END +} + +HRESULT CHandler::Open2(IInStream *inStream, const UInt64 *maxCheckStartPosition, + IArchiveOpenCallback *callback) +{ + Close(); + + UInt64 endPos = 0; + if (callback != NULL) + { + RINOK(inStream->Seek(0, STREAM_SEEK_END, &endPos)); + RINOK(inStream->Seek(0, STREAM_SEEK_SET, NULL)); + } + + _archive.Stream = inStream; + _archive.Callback = callback; + _archive.NumFiles = _archive.NumBytes = 0; + + RINOK(_archive.Open(maxCheckStartPosition)); + if (callback != NULL) + RINOK(callback->SetTotal(NULL, &endPos)); + for (;;) + { + CItem item; + bool filled; + + + RINOK(_archive.GetNextItem(filled, item)); + + RINOK(inStream->Seek(0, STREAM_SEEK_CUR, &item.DataPosition)); + + if (!filled) + break; + _items.Add(item); + + if (inStream->Seek(item.PackSize, STREAM_SEEK_CUR, NULL) != S_OK) + throw CInArchiveException(CInArchiveException::kUnexpectedEndOfArchive); + + _archive.NumFiles = _items.Size(); + _archive.NumBytes = item.DataPosition; + + if (callback != NULL && _items.Size() % 100 == 0) + { + RINOK(callback->SetCompleted(&_archive.NumFiles, &_archive.NumBytes)); + } + } + return S_OK; +} + +STDMETHODIMP CHandler::Open(IInStream *inStream, + const UInt64 *maxCheckStartPosition, IArchiveOpenCallback *callback) +{ + COM_TRY_BEGIN + HRESULT res; + try + { + res = Open2(inStream, maxCheckStartPosition, callback); + if (res == S_OK) + { + _stream = inStream; + return S_OK; + } + } + catch(const CInArchiveException &) { res = S_FALSE; } + Close(); + return res; + COM_TRY_END +} + +STDMETHODIMP CHandler::Close() +{ + _items.Clear(); + _stream.Release(); + return S_OK; +} + +STDMETHODIMP CHandler::Extract(const UInt32 *indices, UInt32 numItems, + Int32 testMode, IArchiveExtractCallback *extractCallback) +{ + COM_TRY_BEGIN + UInt64 totalUnpacked = 0, totalPacked = 0; + bool allFilesMode = (numItems == (UInt32)-1); + if (allFilesMode) + numItems = _items.Size(); + if (numItems == 0) + return S_OK; + UInt32 i; + for (i = 0; i < numItems; i++) + { + const CItem &item = _items[allFilesMode ? i : indices[i]]; + totalUnpacked += item.Size; + totalPacked += item.PackSize; + } + extractCallback->SetTotal(totalUnpacked); + + totalUnpacked = totalPacked = 0; + UInt64 curUnpacked, curPacked; + + CMyComPtr arj1Decoder; + CMyComPtr arj2Decoder; + NCompress::CCopyCoder *copyCoderSpec = new NCompress::CCopyCoder(); + CMyComPtr copyCoder = copyCoderSpec; + + CLocalProgress *lps = new CLocalProgress; + CMyComPtr progress = lps; + lps->Init(extractCallback, false); + + CLimitedSequentialInStream *inStreamSpec = new CLimitedSequentialInStream; + CMyComPtr inStream(inStreamSpec); + inStreamSpec->SetStream(_stream); + + for (i = 0; i < numItems; i++, totalUnpacked += curUnpacked, totalPacked += curPacked) + { + lps->InSize = totalPacked; + lps->OutSize = totalUnpacked; + RINOK(lps->SetCur()); + + curUnpacked = curPacked = 0; + + CMyComPtr realOutStream; + Int32 askMode = testMode ? + NExtract::NAskMode::kTest : + NExtract::NAskMode::kExtract; + Int32 index = allFilesMode ? i : indices[i]; + const CItem &item = _items[index]; + RINOK(extractCallback->GetStream(index, &realOutStream, askMode)); + + if (item.IsDir()) + { + // if (!testMode) + { + RINOK(extractCallback->PrepareOperation(askMode)); + RINOK(extractCallback->SetOperationResult(NExtract::NOperationResult::kOK)); + } + continue; + } + + if (!testMode && !realOutStream) + continue; + + RINOK(extractCallback->PrepareOperation(askMode)); + curUnpacked = item.Size; + curPacked = item.PackSize; + + { + COutStreamWithCRC *outStreamSpec = new COutStreamWithCRC; + CMyComPtr outStream(outStreamSpec); + outStreamSpec->SetStream(realOutStream); + realOutStream.Release(); + outStreamSpec->Init(); + + inStreamSpec->Init(item.PackSize); + + UInt64 pos; + _stream->Seek(item.DataPosition, STREAM_SEEK_SET, &pos); + + HRESULT result = S_OK; + Int32 opRes = NExtract::NOperationResult::kOK; + + if (item.IsEncrypted()) + opRes = NExtract::NOperationResult::kUnSupportedMethod; + else + { + switch(item.Method) + { + case NFileHeader::NCompressionMethod::kStored: + { + result = copyCoder->Code(inStream, outStream, NULL, NULL, progress); + if (result == S_OK && copyCoderSpec->TotalSize != item.PackSize) + result = S_FALSE; + break; + } + case NFileHeader::NCompressionMethod::kCompressed1a: + case NFileHeader::NCompressionMethod::kCompressed1b: + case NFileHeader::NCompressionMethod::kCompressed1c: + { + if (!arj1Decoder) + arj1Decoder = new NCompress::NArj::NDecoder1::CCoder; + result = arj1Decoder->Code(inStream, outStream, NULL, &curUnpacked, progress); + break; + } + case NFileHeader::NCompressionMethod::kCompressed2: + { + if (!arj2Decoder) + arj2Decoder = new NCompress::NArj::NDecoder2::CCoder; + result = arj2Decoder->Code(inStream, outStream, NULL, &curUnpacked, progress); + break; + } + default: + opRes = NExtract::NOperationResult::kUnSupportedMethod; + } + } + if (opRes == NExtract::NOperationResult::kOK) + { + if (result == S_FALSE) + opRes = NExtract::NOperationResult::kDataError; + else + { + RINOK(result); + opRes = (outStreamSpec->GetCRC() == item.FileCRC) ? + NExtract::NOperationResult::kOK: + NExtract::NOperationResult::kCRCError; + } + } + outStream.Release(); + RINOK(extractCallback->SetOperationResult(opRes)); + } + } + return S_OK; + COM_TRY_END +} + +static IInArchive *CreateArc() { return new CHandler; } + +static CArcInfo g_ArcInfo = + { L"Arj", L"arj", 0, 4, { 0x60, 0xEA }, 2, false, CreateArc, 0 }; + +REGISTER_ARC(Arj) + +}} diff --git a/CPP/7zip/Archive/Bz2Handler.cpp b/CPP/7zip/Archive/Bz2Handler.cpp new file mode 100644 index 0000000..98cbcc1 --- /dev/null +++ b/CPP/7zip/Archive/Bz2Handler.cpp @@ -0,0 +1,423 @@ +// Bz2Handler.cpp + +#include "StdAfx.h" + +#include "Common/ComTry.h" + +#include "Windows/PropVariant.h" + +#ifndef _7ZIP_ST +#include "../../Windows/System.h" +#endif + +#include "../Common/CreateCoder.h" +#include "../Common/ProgressUtils.h" +#include "../Common/RegisterArc.h" +#include "../Common/StreamUtils.h" + +#include "../Compress/BZip2Decoder.h" +#include "../Compress/BZip2Encoder.h" +#include "../Compress/CopyCoder.h" + +#include "Common/DummyOutStream.h" +#include "Common/ParseProperties.h" + +using namespace NWindows; + +namespace NArchive { +namespace NBz2 { + +static const UInt32 kNumPassesX1 = 1; +static const UInt32 kNumPassesX7 = 2; +static const UInt32 kNumPassesX9 = 7; + +static const UInt32 kDicSizeX1 = 100000; +static const UInt32 kDicSizeX3 = 500000; +static const UInt32 kDicSizeX5 = 900000; + +class CHandler: + public IInArchive, + public IArchiveOpenSeq, + public IOutArchive, + public ISetProperties, + public CMyUnknownImp +{ + CMyComPtr _stream; + CMyComPtr _seqStream; + UInt64 _packSize; + UInt64 _startPosition; + bool _packSizeDefined; + + UInt32 _level; + UInt32 _dicSize; + UInt32 _numPasses; + #ifndef _7ZIP_ST + UInt32 _numThreads; + #endif + + void InitMethodProperties() + { + _level = 5; + _dicSize = + _numPasses = 0xFFFFFFFF; + #ifndef _7ZIP_ST + _numThreads = NWindows::NSystem::GetNumberOfProcessors();; + #endif + } + +public: + MY_UNKNOWN_IMP4(IInArchive, IArchiveOpenSeq, IOutArchive, ISetProperties) + + INTERFACE_IInArchive(;) + INTERFACE_IOutArchive(;) + STDMETHOD(OpenSeq)(ISequentialInStream *stream); + STDMETHOD(SetProperties)(const wchar_t **names, const PROPVARIANT *values, Int32 numProps); + + CHandler() { InitMethodProperties(); } +}; + +STATPROPSTG kProps[] = +{ + { NULL, kpidPackSize, VT_UI8} +}; + +IMP_IInArchive_Props +IMP_IInArchive_ArcProps_NO_Table + +STDMETHODIMP CHandler::GetArchiveProperty(PROPID propID, PROPVARIANT *value) +{ + NCOM::CPropVariant prop; + switch(propID) + { + case kpidPhySize: if (_packSizeDefined) prop = _packSize; break; + } + prop.Detach(value); + return S_OK; +} + +STDMETHODIMP CHandler::GetNumberOfItems(UInt32 *numItems) +{ + *numItems = 1; + return S_OK; +} + +STDMETHODIMP CHandler::GetProperty(UInt32 /* index */, PROPID propID, PROPVARIANT *value) +{ + NWindows::NCOM::CPropVariant prop; + switch(propID) + { + case kpidPackSize: if (_packSizeDefined) prop = _packSize; break; + } + prop.Detach(value); + return S_OK; +} + +STDMETHODIMP CHandler::Open(IInStream *stream, + const UInt64 * /* maxCheckStartPosition */, + IArchiveOpenCallback * /* openArchiveCallback */) +{ + COM_TRY_BEGIN + try + { + Close(); + RINOK(stream->Seek(0, STREAM_SEEK_CUR, &_startPosition)); + const int kSignatureSize = 3; + Byte buf[kSignatureSize]; + RINOK(ReadStream_FALSE(stream, buf, kSignatureSize)); + if (buf[0] != 'B' || buf[1] != 'Z' || buf[2] != 'h') + return S_FALSE; + + UInt64 endPosition; + RINOK(stream->Seek(0, STREAM_SEEK_END, &endPosition)); + _packSize = endPosition - _startPosition; + _packSizeDefined = true; + _stream = stream; + _seqStream = stream; + } + catch(...) { return S_FALSE; } + return S_OK; + COM_TRY_END +} + +STDMETHODIMP CHandler::OpenSeq(ISequentialInStream *stream) +{ + Close(); + _seqStream = stream; + return S_OK; +} + +STDMETHODIMP CHandler::Close() +{ + _packSizeDefined = false; + _seqStream.Release(); + _stream.Release(); + return S_OK; +} + +STDMETHODIMP CHandler::Extract(const UInt32 *indices, UInt32 numItems, + Int32 testMode, IArchiveExtractCallback *extractCallback) +{ + COM_TRY_BEGIN + if (numItems == 0) + return S_OK; + if (numItems != (UInt32)-1 && (numItems != 1 || indices[0] != 0)) + return E_INVALIDARG; + + if (_stream) + extractCallback->SetTotal(_packSize); + UInt64 currentTotalPacked = 0; + RINOK(extractCallback->SetCompleted(¤tTotalPacked)); + CMyComPtr realOutStream; + Int32 askMode = testMode ? + NExtract::NAskMode::kTest : + NExtract::NAskMode::kExtract; + RINOK(extractCallback->GetStream(0, &realOutStream, askMode)); + if (!testMode && !realOutStream) + return S_OK; + + extractCallback->PrepareOperation(askMode); + + NCompress::NBZip2::CDecoder *decoderSpec = new NCompress::NBZip2::CDecoder; + CMyComPtr decoder = decoderSpec; + + if (_stream) + { + RINOK(_stream->Seek(_startPosition, STREAM_SEEK_SET, NULL)); + } + + decoderSpec->SetInStream(_seqStream); + + #ifndef _7ZIP_ST + RINOK(decoderSpec->SetNumberOfThreads(_numThreads)); + #endif + + CDummyOutStream *outStreamSpec = new CDummyOutStream; + CMyComPtr outStream(outStreamSpec); + outStreamSpec->SetStream(realOutStream); + outStreamSpec->Init(); + + realOutStream.Release(); + + CLocalProgress *lps = new CLocalProgress; + CMyComPtr progress = lps; + lps->Init(extractCallback, true); + + HRESULT result = S_OK; + + bool firstItem = true; + for (;;) + { + lps->InSize = currentTotalPacked; + lps->OutSize = outStreamSpec->GetSize(); + + RINOK(lps->SetCur()); + + bool isBz2; + result = decoderSpec->CodeResume(outStream, isBz2, progress); + + if (result != S_OK) + break; + if (!isBz2) + { + if (firstItem) + result = S_FALSE; + break; + } + firstItem = false; + + _packSize = currentTotalPacked = decoderSpec->GetInputProcessedSize(); + _packSizeDefined = true; + } + decoderSpec->ReleaseInStream(); + outStream.Release(); + + Int32 retResult; + if (result == S_OK) + retResult = NExtract::NOperationResult::kOK; + else if (result == S_FALSE) + retResult = NExtract::NOperationResult::kDataError; + else + return result; + return extractCallback->SetOperationResult(retResult); + + COM_TRY_END +} + +static HRESULT UpdateArchive( + UInt64 unpackSize, + ISequentialOutStream *outStream, + int indexInClient, + UInt32 dictionary, + UInt32 numPasses, + #ifndef _7ZIP_ST + UInt32 numThreads, + #endif + IArchiveUpdateCallback *updateCallback) +{ + RINOK(updateCallback->SetTotal(unpackSize)); + UInt64 complexity = 0; + RINOK(updateCallback->SetCompleted(&complexity)); + + CMyComPtr fileInStream; + + RINOK(updateCallback->GetStream(indexInClient, &fileInStream)); + + CLocalProgress *localProgressSpec = new CLocalProgress; + CMyComPtr localProgress = localProgressSpec; + localProgressSpec->Init(updateCallback, true); + + NCompress::NBZip2::CEncoder *encoderSpec = new NCompress::NBZip2::CEncoder; + CMyComPtr encoder = encoderSpec; + { + NWindows::NCOM::CPropVariant properties[] = + { + dictionary, + numPasses + #ifndef _7ZIP_ST + , numThreads + #endif + }; + PROPID propIDs[] = + { + NCoderPropID::kDictionarySize, + NCoderPropID::kNumPasses + #ifndef _7ZIP_ST + , NCoderPropID::kNumThreads + #endif + }; + RINOK(encoderSpec->SetCoderProperties(propIDs, properties, sizeof(propIDs) / sizeof(propIDs[0]))); + } + + RINOK(encoder->Code(fileInStream, outStream, NULL, NULL, localProgress)); + + return updateCallback->SetOperationResult(NArchive::NUpdate::NOperationResult::kOK); +} + +STDMETHODIMP CHandler::GetFileTimeType(UInt32 *type) +{ + *type = NFileTimeType::kUnix; + return S_OK; +} + +STDMETHODIMP CHandler::UpdateItems(ISequentialOutStream *outStream, UInt32 numItems, + IArchiveUpdateCallback *updateCallback) +{ + if (numItems != 1) + return E_INVALIDARG; + + Int32 newData, newProps; + UInt32 indexInArchive; + if (!updateCallback) + return E_FAIL; + RINOK(updateCallback->GetUpdateItemInfo(0, &newData, &newProps, &indexInArchive)); + + if (IntToBool(newProps)) + { + { + NCOM::CPropVariant prop; + RINOK(updateCallback->GetProperty(0, kpidIsDir, &prop)); + if (prop.vt == VT_BOOL) + { + if (prop.boolVal != VARIANT_FALSE) + return E_INVALIDARG; + } + else if (prop.vt != VT_EMPTY) + return E_INVALIDARG; + } + } + + if (IntToBool(newData)) + { + UInt64 size; + { + NCOM::CPropVariant prop; + RINOK(updateCallback->GetProperty(0, kpidSize, &prop)); + if (prop.vt != VT_UI8) + return E_INVALIDARG; + size = prop.uhVal.QuadPart; + } + + UInt32 dicSize = _dicSize; + if (dicSize == 0xFFFFFFFF) + dicSize = (_level >= 5 ? kDicSizeX5 : + (_level >= 3 ? kDicSizeX3 : + kDicSizeX1)); + + UInt32 numPasses = _numPasses; + if (numPasses == 0xFFFFFFFF) + numPasses = (_level >= 9 ? kNumPassesX9 : + (_level >= 7 ? kNumPassesX7 : + kNumPassesX1)); + + return UpdateArchive( + size, outStream, 0, dicSize, numPasses, + #ifndef _7ZIP_ST + _numThreads, + #endif + updateCallback); + } + if (indexInArchive != 0) + return E_INVALIDARG; + if (_stream) + RINOK(_stream->Seek(_startPosition, STREAM_SEEK_SET, NULL)); + return NCompress::CopyStream(_stream, outStream, NULL); +} + +STDMETHODIMP CHandler::SetProperties(const wchar_t **names, const PROPVARIANT *values, Int32 numProps) +{ + InitMethodProperties(); + #ifndef _7ZIP_ST + const UInt32 numProcessors = NSystem::GetNumberOfProcessors(); + _numThreads = numProcessors; + #endif + + for (int i = 0; i < numProps; i++) + { + UString name = names[i]; + name.MakeUpper(); + if (name.IsEmpty()) + return E_INVALIDARG; + const PROPVARIANT &prop = values[i]; + if (name[0] == L'X') + { + UInt32 level = 9; + RINOK(ParsePropValue(name.Mid(1), prop, level)); + _level = level; + } + else if (name[0] == L'D') + { + UInt32 dicSize = kDicSizeX5; + RINOK(ParsePropDictionaryValue(name.Mid(1), prop, dicSize)); + _dicSize = dicSize; + } + else if (name.Left(4) == L"PASS") + { + UInt32 num = kNumPassesX9; + RINOK(ParsePropValue(name.Mid(4), prop, num)); + _numPasses = num; + } + else if (name.Left(2) == L"MT") + { + #ifndef _7ZIP_ST + RINOK(ParseMtProp(name.Mid(2), prop, numProcessors, _numThreads)); + #endif + } + else + return E_INVALIDARG; + } + return S_OK; +} + +static IInArchive *CreateArc() { return new CHandler; } +#ifndef EXTRACT_ONLY +static IOutArchive *CreateArcOut() { return new CHandler; } +#else +#define CreateArcOut 0 +#endif + +static CArcInfo g_ArcInfo = + { L"bzip2", L"bz2 bzip2 tbz2 tbz", L"* * .tar .tar", 2, { 'B', 'Z', 'h' }, 3, true, CreateArc, CreateArcOut }; + +REGISTER_ARC(BZip2) + +}} diff --git a/CPP/7zip/Archive/Cab/CabBlockInStream.cpp b/CPP/7zip/Archive/Cab/CabBlockInStream.cpp new file mode 100644 index 0000000..12c73eb --- /dev/null +++ b/CPP/7zip/Archive/Cab/CabBlockInStream.cpp @@ -0,0 +1,189 @@ +// CabBlockInStream.cpp + +#include "StdAfx.h" + +#include "../../../../C/Alloc.h" + +#include "Common/Defs.h" + +#include "../../Common/StreamUtils.h" + +#include "CabBlockInStream.h" + +namespace NArchive { +namespace NCab { + +static const UInt32 kBlockSize = (1 << 16); + +bool CCabBlockInStream::Create() +{ + if (!_buffer) + _buffer = (Byte *)::MyAlloc(kBlockSize); + return (_buffer != 0); +} + +CCabBlockInStream::~CCabBlockInStream() +{ + MyFree(_buffer); +} + +class CCheckSum2 +{ + UInt32 m_Value; + int m_Pos; + Byte m_Hist[4]; +public: + CCheckSum2(): m_Value(0){}; + void Init() { m_Value = 0; m_Pos = 0; } + void Update(const void *data, UInt32 size); + void FinishDataUpdate() + { + for (int i = 0; i < m_Pos; i++) + m_Value ^= ((UInt32)(m_Hist[i])) << (8 * (m_Pos - i - 1)); + } + void UpdateUInt32(UInt32 v) { m_Value ^= v; } + UInt32 GetResult() const { return m_Value; } +}; + +void CCheckSum2::Update(const void *data, UInt32 size) +{ + UInt32 checkSum = m_Value; + const Byte *dataPointer = (const Byte *)data; + + while (size != 0 && m_Pos != 0) + { + m_Hist[m_Pos] = *dataPointer++; + m_Pos = (m_Pos + 1) & 3; + size--; + if (m_Pos == 0) + for (int i = 0; i < 4; i++) + checkSum ^= ((UInt32)m_Hist[i]) << (8 * i); + } + + int numWords = size / 4; + + while (numWords-- != 0) + { + UInt32 temp = *dataPointer++; + temp |= ((UInt32)(*dataPointer++)) << 8; + temp |= ((UInt32)(*dataPointer++)) << 16; + temp |= ((UInt32)(*dataPointer++)) << 24; + checkSum ^= temp; + } + m_Value = checkSum; + + size &= 3; + + while (size != 0) + { + m_Hist[m_Pos] = *dataPointer++; + m_Pos = (m_Pos + 1) & 3; + size--; + } +} + +static const UInt32 kDataBlockHeaderSize = 8; + +class CTempCabInBuffer2 +{ +public: + Byte Buffer[kDataBlockHeaderSize]; + UInt32 Pos; + Byte ReadByte() + { + return Buffer[Pos++]; + } + UInt32 ReadUInt32() + { + UInt32 value = 0; + for (int i = 0; i < 4; i++) + value |= (((UInt32)ReadByte()) << (8 * i)); + return value; + } + UInt16 ReadUInt16() + { + UInt16 value = 0; + for (int i = 0; i < 2; i++) + value |= (((UInt16)ReadByte()) << (8 * i)); + return value; + } +}; + +HRESULT CCabBlockInStream::PreRead(UInt32 &packSize, UInt32 &unpackSize) +{ + CTempCabInBuffer2 inBuffer; + inBuffer.Pos = 0; + RINOK(ReadStream_FALSE(_stream, inBuffer.Buffer, kDataBlockHeaderSize)) + + UInt32 checkSum = inBuffer.ReadUInt32(); + packSize = inBuffer.ReadUInt16(); + unpackSize = inBuffer.ReadUInt16(); + if (ReservedSize != 0) + { + RINOK(ReadStream_FALSE(_stream, _buffer, ReservedSize)); + } + _pos = 0; + CCheckSum2 checkSumCalc; + checkSumCalc.Init(); + UInt32 packSize2 = packSize; + if (MsZip && _size == 0) + { + if (packSize < 2) + return S_FALSE; // bad block; + Byte sig[2]; + RINOK(ReadStream_FALSE(_stream, sig, 2)); + if (sig[0] != 0x43 || sig[1] != 0x4B) + return S_FALSE; + packSize2 -= 2; + checkSumCalc.Update(sig, 2); + } + + if (kBlockSize - _size < packSize2) + return S_FALSE; + + UInt32 curSize = packSize2; + if (curSize != 0) + { + size_t processedSizeLoc = curSize; + RINOK(ReadStream(_stream, _buffer + _size, &processedSizeLoc)); + checkSumCalc.Update(_buffer + _size, (UInt32)processedSizeLoc); + _size += (UInt32)processedSizeLoc; + if (processedSizeLoc != curSize) + return S_FALSE; + } + TotalPackSize = _size; + + checkSumCalc.FinishDataUpdate(); + + bool dataError; + if (checkSum == 0) + dataError = false; + else + { + checkSumCalc.UpdateUInt32(packSize | (((UInt32)unpackSize) << 16)); + dataError = (checkSumCalc.GetResult() != checkSum); + } + DataError |= dataError; + return dataError ? S_FALSE : S_OK; +} + +STDMETHODIMP CCabBlockInStream::Read(void *data, UInt32 size, UInt32 *processedSize) +{ + if (processedSize != 0) + *processedSize = 0; + if (size == 0) + return S_OK; + if (_size != 0) + { + size = MyMin(_size, size); + memmove(data, _buffer + _pos, size); + _pos += size; + _size -= size; + if (processedSize != 0) + *processedSize = size; + return S_OK; + } + return S_OK; // no blocks data +} + +}} diff --git a/CPP/7zip/Archive/Cab/CabBlockInStream.h b/CPP/7zip/Archive/Cab/CabBlockInStream.h new file mode 100644 index 0000000..1db3835 --- /dev/null +++ b/CPP/7zip/Archive/Cab/CabBlockInStream.h @@ -0,0 +1,44 @@ +// CabBlockInStream.cpp + +#ifndef __CABBLOCKINSTREAM_H +#define __CABBLOCKINSTREAM_H + +#include "Common/MyCom.h" +#include "../../IStream.h" + +namespace NArchive { +namespace NCab { + +class CCabBlockInStream: + public ISequentialInStream, + public CMyUnknownImp +{ + CMyComPtr _stream; + Byte *_buffer; + UInt32 _pos; + UInt32 _size; + +public: + UInt32 TotalPackSize; + UInt32 ReservedSize; + bool DataError; + bool MsZip; + + CCabBlockInStream(): _buffer(0), ReservedSize(0), MsZip(false), DataError(false), TotalPackSize(0) {} + ~CCabBlockInStream(); + bool Create(); + void SetStream(ISequentialInStream *stream) { _stream = stream; } + + void InitForNewFolder() { TotalPackSize = 0; } + void InitForNewBlock() { _size = 0; } + + MY_UNKNOWN_IMP + + STDMETHOD(Read)(void *data, UInt32 size, UInt32 *processedSize); + + HRESULT PreRead(UInt32 &packSize, UInt32 &unpackSize); +}; + +}} + +#endif diff --git a/CPP/7zip/Archive/Cab/CabHandler.cpp b/CPP/7zip/Archive/Cab/CabHandler.cpp new file mode 100644 index 0000000..20f670d --- /dev/null +++ b/CPP/7zip/Archive/Cab/CabHandler.cpp @@ -0,0 +1,929 @@ +// CabHandler.cpp + +#include "StdAfx.h" + +#include "../../../../C/Alloc.h" + +#include "Common/Buffer.h" +#include "Common/ComTry.h" +#include "Common/Defs.h" +#include "Common/IntToString.h" +#include "Common/StringConvert.h" +#include "Common/UTFConvert.h" + +#include "Windows/PropVariant.h" +#include "Windows/Time.h" + +#include "../../Common/ProgressUtils.h" +#include "../../Common/StreamUtils.h" + +#include "../../Compress/CopyCoder.h" +#include "../../Compress/DeflateDecoder.h" +#include "../../Compress/LzxDecoder.h" +#include "../../Compress/QuantumDecoder.h" + +#include "../Common/ItemNameUtils.h" + +#include "CabBlockInStream.h" +#include "CabHandler.h" + +using namespace NWindows; + +namespace NArchive { +namespace NCab { + +// #define _CAB_DETAILS + +#ifdef _CAB_DETAILS +enum +{ + kpidBlockReal = kpidUserDefined +}; +#endif + +static STATPROPSTG kProps[] = +{ + { NULL, kpidPath, VT_BSTR}, + { NULL, kpidSize, VT_UI8}, + { NULL, kpidMTime, VT_FILETIME}, + { NULL, kpidAttrib, VT_UI4}, + { NULL, kpidMethod, VT_BSTR}, + { NULL, kpidBlock, VT_I4} + #ifdef _CAB_DETAILS + , + { L"BlockReal", kpidBlockReal, VT_UI4}, + { NULL, kpidOffset, VT_UI4}, + { NULL, kpidVolume, VT_UI4} + #endif +}; + +static const char *kMethods[] = +{ + "None", + "MSZip", + "Quantum", + "LZX" +}; + +static const int kNumMethods = sizeof(kMethods) / sizeof(kMethods[0]); +static const char *kUnknownMethod = "Unknown"; + +static STATPROPSTG kArcProps[] = +{ + { NULL, kpidMethod, VT_BSTR}, + // { NULL, kpidSolid, VT_BOOL}, + { NULL, kpidNumBlocks, VT_UI4}, + { NULL, kpidNumVolumes, VT_UI4} +}; + +IMP_IInArchive_Props +IMP_IInArchive_ArcProps + +STDMETHODIMP CHandler::GetArchiveProperty(PROPID propID, PROPVARIANT *value) +{ + COM_TRY_BEGIN + NWindows::NCOM::CPropVariant prop; + switch(propID) + { + case kpidMethod: + { + AString resString; + CRecordVector ids; + int i; + for (int v = 0; v < m_Database.Volumes.Size(); v++) + { + const CDatabaseEx &de = m_Database.Volumes[v]; + for (i = 0; i < de.Folders.Size(); i++) + ids.AddToUniqueSorted(de.Folders[i].GetCompressionMethod()); + } + for (i = 0; i < ids.Size(); i++) + { + Byte id = ids[i]; + AString method = (id < kNumMethods) ? kMethods[id] : kUnknownMethod; + if (!resString.IsEmpty()) + resString += ' '; + resString += method; + } + prop = resString; + break; + } + // case kpidSolid: prop = _database.IsSolid(); break; + case kpidNumBlocks: + { + UInt32 numFolders = 0; + for (int v = 0; v < m_Database.Volumes.Size(); v++) + numFolders += m_Database.Volumes[v].Folders.Size(); + prop = numFolders; + break; + } + case kpidNumVolumes: + { + prop = (UInt32)m_Database.Volumes.Size(); + break; + } + } + prop.Detach(value); + return S_OK; + COM_TRY_END +} + +STDMETHODIMP CHandler::GetProperty(UInt32 index, PROPID propID, PROPVARIANT *value) +{ + COM_TRY_BEGIN + NWindows::NCOM::CPropVariant prop; + + const CMvItem &mvItem = m_Database.Items[index]; + const CDatabaseEx &db = m_Database.Volumes[mvItem.VolumeIndex]; + int itemIndex = mvItem.ItemIndex; + const CItem &item = db.Items[itemIndex]; + switch(propID) + { + case kpidPath: + { + UString unicodeName; + if (item.IsNameUTF()) + ConvertUTF8ToUnicode(item.Name, unicodeName); + else + unicodeName = MultiByteToUnicodeString(item.Name, CP_ACP); + prop = (const wchar_t *)NItemName::WinNameToOSName(unicodeName); + break; + } + case kpidIsDir: prop = item.IsDir(); break; + case kpidSize: prop = item.Size; break; + case kpidAttrib: prop = item.GetWinAttributes(); break; + + case kpidMTime: + { + FILETIME localFileTime, utcFileTime; + if (NTime::DosTimeToFileTime(item.Time, localFileTime)) + { + if (!LocalFileTimeToFileTime(&localFileTime, &utcFileTime)) + utcFileTime.dwHighDateTime = utcFileTime.dwLowDateTime = 0; + } + else + utcFileTime.dwHighDateTime = utcFileTime.dwLowDateTime = 0; + prop = utcFileTime; + break; + } + + case kpidMethod: + { + UInt32 realFolderIndex = item.GetFolderIndex(db.Folders.Size()); + const CFolder &folder = db.Folders[realFolderIndex]; + int methodIndex = folder.GetCompressionMethod(); + AString method = (methodIndex < kNumMethods) ? kMethods[methodIndex] : kUnknownMethod; + if (methodIndex == NHeader::NCompressionMethodMajor::kLZX || + methodIndex == NHeader::NCompressionMethodMajor::kQuantum) + { + method += ':'; + char temp[32]; + ConvertUInt64ToString(folder.CompressionTypeMinor, temp); + method += temp; + } + prop = method; + break; + } + case kpidBlock: prop = (Int32)m_Database.GetFolderIndex(&mvItem); break; + + #ifdef _CAB_DETAILS + + case kpidBlockReal: prop = (UInt32)item.FolderIndex; break; + case kpidOffset: prop = (UInt32)item.Offset; break; + case kpidVolume: prop = (UInt32)mvItem.VolumeIndex; break; + + #endif + } + prop.Detach(value); + return S_OK; + COM_TRY_END +} + +/* +class CProgressImp: public CProgressVirt +{ + CMyComPtr m_OpenArchiveCallback; +public: + STDMETHOD(SetTotal)(const UInt64 *numFiles); + STDMETHOD(SetCompleted)(const UInt64 *numFiles); + void Init(IArchiveOpenCallback *openArchiveCallback) + { m_OpenArchiveCallback = openArchiveCallback; } +}; + +STDMETHODIMP CProgressImp::SetTotal(const UInt64 *numFiles) +{ + if (m_OpenArchiveCallback) + return m_OpenArchiveCallback->SetCompleted(numFiles, NULL); + return S_OK; +} + +STDMETHODIMP CProgressImp::SetCompleted(const UInt64 *numFiles) +{ + if (m_OpenArchiveCallback) + return m_OpenArchiveCallback->SetCompleted(numFiles, NULL); + return S_OK; +} +*/ + +STDMETHODIMP CHandler::Open(IInStream *inStream, + const UInt64 *maxCheckStartPosition, + IArchiveOpenCallback *callback) +{ + COM_TRY_BEGIN + Close(); + HRESULT res = S_FALSE; + CInArchive archive; + CMyComPtr openVolumeCallback; + callback->QueryInterface(IID_IArchiveOpenVolumeCallback, (void **)&openVolumeCallback); + + CMyComPtr nextStream = inStream; + bool prevChecked = false; + UInt64 numItems = 0; + try + { + while (nextStream != 0) + { + CDatabaseEx db; + db.Stream = nextStream; + res = archive.Open(maxCheckStartPosition, db); + if (res == S_OK) + { + if (!m_Database.Volumes.IsEmpty()) + { + const CDatabaseEx &dbPrev = m_Database.Volumes[prevChecked ? m_Database.Volumes.Size() - 1 : 0]; + if (dbPrev.ArchiveInfo.SetID != db.ArchiveInfo.SetID || + dbPrev.ArchiveInfo.CabinetNumber + (prevChecked ? 1: - 1) != + db.ArchiveInfo.CabinetNumber) + res = S_FALSE; + } + } + if (res == S_OK) + m_Database.Volumes.Insert(prevChecked ? m_Database.Volumes.Size() : 0, db); + else if (res != S_FALSE) + return res; + else + { + if (m_Database.Volumes.IsEmpty()) + return S_FALSE; + if (prevChecked) + break; + prevChecked = true; + } + + numItems += db.Items.Size(); + RINOK(callback->SetCompleted(&numItems, NULL)); + + nextStream = 0; + for (;;) + { + const COtherArchive *otherArchive = 0; + if (!prevChecked) + { + const CInArchiveInfo &ai = m_Database.Volumes.Front().ArchiveInfo; + if (ai.IsTherePrev()) + otherArchive = &ai.PrevArc; + else + prevChecked = true; + } + if (otherArchive == 0) + { + const CInArchiveInfo &ai = m_Database.Volumes.Back().ArchiveInfo; + if (ai.IsThereNext()) + otherArchive = &ai.NextArc; + } + if (!otherArchive) + break; + const UString fullName = MultiByteToUnicodeString(otherArchive->FileName, CP_ACP); + if (!openVolumeCallback) + break; + + HRESULT result = openVolumeCallback->GetStream(fullName, &nextStream); + if (result == S_OK) + break; + if (result != S_FALSE) + return result; + if (prevChecked) + break; + prevChecked = true; + } + } + if (res == S_OK) + { + m_Database.FillSortAndShrink(); + if (!m_Database.Check()) + res = S_FALSE; + } + } + catch(...) + { + res = S_FALSE; + } + if (res != S_OK) + { + Close(); + return res; + } + COM_TRY_END + return S_OK; +} + +STDMETHODIMP CHandler::Close() +{ + m_Database.Clear(); + return S_OK; +} + +class CFolderOutStream: + public ISequentialOutStream, + public CMyUnknownImp +{ +public: + MY_UNKNOWN_IMP + + STDMETHOD(Write)(const void *data, UInt32 size, UInt32 *processedSize); +private: + const CMvDatabaseEx *m_Database; + const CRecordVector *m_ExtractStatuses; + + Byte *TempBuf; + UInt32 TempBufSize; + int NumIdenticalFiles; + bool TempBufMode; + UInt32 m_BufStartFolderOffset; + + int m_StartIndex; + int m_CurrentIndex; + CMyComPtr m_ExtractCallback; + bool m_TestMode; + + CMyComPtr m_RealOutStream; + + bool m_IsOk; + bool m_FileIsOpen; + UInt32 m_RemainFileSize; + UInt64 m_FolderSize; + UInt64 m_PosInFolder; + + void FreeTempBuf() + { + ::MyFree(TempBuf); + TempBuf = NULL; + } + + HRESULT OpenFile(); + HRESULT CloseFileWithResOp(Int32 resOp); + HRESULT CloseFile(); + HRESULT Write2(const void *data, UInt32 size, UInt32 *processedSize, bool isOK); +public: + HRESULT WriteEmptyFiles(); + + CFolderOutStream(): TempBuf(NULL) {} + ~CFolderOutStream() { FreeTempBuf(); } + void Init( + const CMvDatabaseEx *database, + const CRecordVector *extractStatuses, + int startIndex, + UInt64 folderSize, + IArchiveExtractCallback *extractCallback, + bool testMode); + HRESULT FlushCorrupted(); + HRESULT Unsupported(); + + UInt64 GetRemain() const { return m_FolderSize - m_PosInFolder; } + UInt64 GetPosInFolder() const { return m_PosInFolder; } +}; + +void CFolderOutStream::Init( + const CMvDatabaseEx *database, + const CRecordVector *extractStatuses, + int startIndex, + UInt64 folderSize, + IArchiveExtractCallback *extractCallback, + bool testMode) +{ + m_Database = database; + m_ExtractStatuses = extractStatuses; + m_StartIndex = startIndex; + m_FolderSize = folderSize; + + m_ExtractCallback = extractCallback; + m_TestMode = testMode; + + m_CurrentIndex = 0; + m_PosInFolder = 0; + m_FileIsOpen = false; + m_IsOk = true; + TempBufMode = false; + NumIdenticalFiles = 0; +} + +HRESULT CFolderOutStream::CloseFileWithResOp(Int32 resOp) +{ + m_RealOutStream.Release(); + m_FileIsOpen = false; + NumIdenticalFiles--; + return m_ExtractCallback->SetOperationResult(resOp); +} + +HRESULT CFolderOutStream::CloseFile() +{ + return CloseFileWithResOp(m_IsOk ? + NExtract::NOperationResult::kOK: + NExtract::NOperationResult::kDataError); +} + +HRESULT CFolderOutStream::OpenFile() +{ + if (NumIdenticalFiles == 0) + { + const CMvItem &mvItem = m_Database->Items[m_StartIndex + m_CurrentIndex]; + const CItem &item = m_Database->Volumes[mvItem.VolumeIndex].Items[mvItem.ItemIndex]; + int numExtractItems = 0; + int curIndex; + for (curIndex = m_CurrentIndex; curIndex < m_ExtractStatuses->Size(); curIndex++) + { + const CMvItem &mvItem2 = m_Database->Items[m_StartIndex + curIndex]; + const CItem &item2 = m_Database->Volumes[mvItem2.VolumeIndex].Items[mvItem2.ItemIndex]; + if (item.Offset != item2.Offset || + item.Size != item2.Size || + item.Size == 0) + break; + if (!m_TestMode && (*m_ExtractStatuses)[curIndex]) + numExtractItems++; + } + NumIdenticalFiles = (curIndex - m_CurrentIndex); + if (NumIdenticalFiles == 0) + NumIdenticalFiles = 1; + TempBufMode = false; + if (numExtractItems > 1) + { + if (!TempBuf || item.Size > TempBufSize) + { + FreeTempBuf(); + TempBuf = (Byte *)MyAlloc(item.Size); + TempBufSize = item.Size; + if (TempBuf == NULL) + return E_OUTOFMEMORY; + } + TempBufMode = true; + m_BufStartFolderOffset = item.Offset; + } + else if (numExtractItems == 1) + { + while (NumIdenticalFiles && !(*m_ExtractStatuses)[m_CurrentIndex]) + { + CMyComPtr stream; + RINOK(m_ExtractCallback->GetStream(m_StartIndex + m_CurrentIndex, &stream, NExtract::NAskMode::kSkip)); + if (stream) + return E_FAIL; + RINOK(m_ExtractCallback->PrepareOperation(NExtract::NAskMode::kSkip)); + m_CurrentIndex++; + m_FileIsOpen = true; + CloseFile(); + } + } + } + + Int32 askMode = (*m_ExtractStatuses)[m_CurrentIndex] ? (m_TestMode ? + NExtract::NAskMode::kTest : + NExtract::NAskMode::kExtract) : + NExtract::NAskMode::kSkip; + RINOK(m_ExtractCallback->GetStream(m_StartIndex + m_CurrentIndex, &m_RealOutStream, askMode)); + if (!m_RealOutStream && !m_TestMode) + askMode = NExtract::NAskMode::kSkip; + return m_ExtractCallback->PrepareOperation(askMode); +} + +HRESULT CFolderOutStream::WriteEmptyFiles() +{ + if (m_FileIsOpen) + return S_OK; + for (; m_CurrentIndex < m_ExtractStatuses->Size(); m_CurrentIndex++) + { + const CMvItem &mvItem = m_Database->Items[m_StartIndex + m_CurrentIndex]; + const CItem &item = m_Database->Volumes[mvItem.VolumeIndex].Items[mvItem.ItemIndex]; + UInt64 fileSize = item.Size; + if (fileSize != 0) + return S_OK; + HRESULT result = OpenFile(); + m_RealOutStream.Release(); + RINOK(result); + RINOK(m_ExtractCallback->SetOperationResult(NExtract::NOperationResult::kOK)); + } + return S_OK; +} + +// This is Write function +HRESULT CFolderOutStream::Write2(const void *data, UInt32 size, UInt32 *processedSize, bool isOK) +{ + COM_TRY_BEGIN + UInt32 realProcessed = 0; + if (processedSize != NULL) + *processedSize = 0; + while (size != 0) + { + if (m_FileIsOpen) + { + UInt32 numBytesToWrite = MyMin(m_RemainFileSize, size); + HRESULT res = S_OK; + if (numBytesToWrite > 0) + { + if (!isOK) + m_IsOk = false; + if (m_RealOutStream) + { + UInt32 processedSizeLocal = 0; + res = m_RealOutStream->Write((const Byte *)data, numBytesToWrite, &processedSizeLocal); + numBytesToWrite = processedSizeLocal; + } + if (TempBufMode && TempBuf) + memcpy(TempBuf + (m_PosInFolder - m_BufStartFolderOffset), data, numBytesToWrite); + } + realProcessed += numBytesToWrite; + if (processedSize != NULL) + *processedSize = realProcessed; + data = (const void *)((const Byte *)data + numBytesToWrite); + size -= numBytesToWrite; + m_RemainFileSize -= numBytesToWrite; + m_PosInFolder += numBytesToWrite; + if (res != S_OK) + return res; + if (m_RemainFileSize == 0) + { + RINOK(CloseFile()); + + while (NumIdenticalFiles) + { + HRESULT result = OpenFile(); + m_FileIsOpen = true; + m_CurrentIndex++; + if (result == S_OK && m_RealOutStream && TempBuf) + result = WriteStream(m_RealOutStream, TempBuf, (size_t)(m_PosInFolder - m_BufStartFolderOffset)); + + if (!TempBuf && TempBufMode && m_RealOutStream) + { + RINOK(CloseFileWithResOp(NExtract::NOperationResult::kUnSupportedMethod)); + } + else + { + RINOK(CloseFile()); + } + RINOK(result); + } + TempBufMode = false; + } + if (realProcessed > 0) + break; // with this break this function works as Write-Part + } + else + { + if (m_CurrentIndex >= m_ExtractStatuses->Size()) + return E_FAIL; + + const CMvItem &mvItem = m_Database->Items[m_StartIndex + m_CurrentIndex]; + const CItem &item = m_Database->Volumes[mvItem.VolumeIndex].Items[mvItem.ItemIndex]; + + m_RemainFileSize = item.Size; + + UInt32 fileOffset = item.Offset; + if (fileOffset < m_PosInFolder) + return E_FAIL; + if (fileOffset > m_PosInFolder) + { + UInt32 numBytesToWrite = MyMin(fileOffset - (UInt32)m_PosInFolder, size); + realProcessed += numBytesToWrite; + if (processedSize != NULL) + *processedSize = realProcessed; + data = (const void *)((const Byte *)data + numBytesToWrite); + size -= numBytesToWrite; + m_PosInFolder += numBytesToWrite; + } + if (fileOffset == m_PosInFolder) + { + RINOK(OpenFile()); + m_FileIsOpen = true; + m_CurrentIndex++; + m_IsOk = true; + } + } + } + return WriteEmptyFiles(); + COM_TRY_END +} + +STDMETHODIMP CFolderOutStream::Write(const void *data, UInt32 size, UInt32 *processedSize) +{ + return Write2(data, size, processedSize, true); +} + +HRESULT CFolderOutStream::FlushCorrupted() +{ + const UInt32 kBufferSize = (1 << 10); + Byte buffer[kBufferSize]; + for (int i = 0; i < kBufferSize; i++) + buffer[i] = 0; + for (;;) + { + UInt64 remain = GetRemain(); + if (remain == 0) + return S_OK; + UInt32 size = (UInt32)MyMin(remain, (UInt64)kBufferSize); + UInt32 processedSizeLocal = 0; + RINOK(Write2(buffer, size, &processedSizeLocal, false)); + } +} + +HRESULT CFolderOutStream::Unsupported() +{ + while(m_CurrentIndex < m_ExtractStatuses->Size()) + { + HRESULT result = OpenFile(); + if (result != S_FALSE && result != S_OK) + return result; + m_RealOutStream.Release(); + RINOK(m_ExtractCallback->SetOperationResult(NExtract::NOperationResult::kUnSupportedMethod)); + m_CurrentIndex++; + } + return S_OK; +} + + +STDMETHODIMP CHandler::Extract(const UInt32 *indices, UInt32 numItems, + Int32 testModeSpec, IArchiveExtractCallback *extractCallback) +{ + COM_TRY_BEGIN + bool allFilesMode = (numItems == (UInt32)-1); + if (allFilesMode) + numItems = m_Database.Items.Size(); + if(numItems == 0) + return S_OK; + bool testMode = (testModeSpec != 0); + UInt64 totalUnPacked = 0; + + UInt32 i; + int lastFolder = -2; + UInt64 lastFolderSize = 0; + for(i = 0; i < numItems; i++) + { + int index = allFilesMode ? i : indices[i]; + const CMvItem &mvItem = m_Database.Items[index]; + const CItem &item = m_Database.Volumes[mvItem.VolumeIndex].Items[mvItem.ItemIndex]; + if (item.IsDir()) + continue; + int folderIndex = m_Database.GetFolderIndex(&mvItem); + if (folderIndex != lastFolder) + totalUnPacked += lastFolderSize; + lastFolder = folderIndex; + lastFolderSize = item.GetEndOffset(); + } + totalUnPacked += lastFolderSize; + + extractCallback->SetTotal(totalUnPacked); + + totalUnPacked = 0; + + UInt64 totalPacked = 0; + + CLocalProgress *lps = new CLocalProgress; + CMyComPtr progress = lps; + lps->Init(extractCallback, false); + + NCompress::CCopyCoder *copyCoderSpec = new NCompress::CCopyCoder; + CMyComPtr copyCoder = copyCoderSpec; + + NCompress::NDeflate::NDecoder::CCOMCoder *deflateDecoderSpec = NULL; + CMyComPtr deflateDecoder; + + NCompress::NLzx::CDecoder *lzxDecoderSpec = NULL; + CMyComPtr lzxDecoder; + + NCompress::NQuantum::CDecoder *quantumDecoderSpec = NULL; + CMyComPtr quantumDecoder; + + CCabBlockInStream *cabBlockInStreamSpec = new CCabBlockInStream(); + CMyComPtr cabBlockInStream = cabBlockInStreamSpec; + if (!cabBlockInStreamSpec->Create()) + return E_OUTOFMEMORY; + + CRecordVector extractStatuses; + for(i = 0; i < numItems;) + { + int index = allFilesMode ? i : indices[i]; + + const CMvItem &mvItem = m_Database.Items[index]; + const CDatabaseEx &db = m_Database.Volumes[mvItem.VolumeIndex]; + int itemIndex = mvItem.ItemIndex; + const CItem &item = db.Items[itemIndex]; + + i++; + if (item.IsDir()) + { + Int32 askMode = testMode ? + NExtract::NAskMode::kTest : + NExtract::NAskMode::kExtract; + CMyComPtr realOutStream; + RINOK(extractCallback->GetStream(index, &realOutStream, askMode)); + RINOK(extractCallback->PrepareOperation(askMode)); + realOutStream.Release(); + RINOK(extractCallback->SetOperationResult(NExtract::NOperationResult::kOK)); + continue; + } + int folderIndex = m_Database.GetFolderIndex(&mvItem); + if (folderIndex < 0) + { + // If we need previous archive + Int32 askMode= testMode ? + NExtract::NAskMode::kTest : + NExtract::NAskMode::kExtract; + CMyComPtr realOutStream; + RINOK(extractCallback->GetStream(index, &realOutStream, askMode)); + RINOK(extractCallback->PrepareOperation(askMode)); + realOutStream.Release(); + RINOK(extractCallback->SetOperationResult(NExtract::NOperationResult::kDataError)); + continue; + } + int startIndex2 = m_Database.FolderStartFileIndex[folderIndex]; + int startIndex = startIndex2; + extractStatuses.Clear(); + for (; startIndex < index; startIndex++) + extractStatuses.Add(false); + extractStatuses.Add(true); + startIndex++; + UInt64 curUnpack = item.GetEndOffset(); + for(;i < numItems; i++) + { + int indexNext = allFilesMode ? i : indices[i]; + const CMvItem &mvItem = m_Database.Items[indexNext]; + const CItem &item = m_Database.Volumes[mvItem.VolumeIndex].Items[mvItem.ItemIndex]; + if (item.IsDir()) + continue; + int newFolderIndex = m_Database.GetFolderIndex(&mvItem); + + if (newFolderIndex != folderIndex) + break; + for (; startIndex < indexNext; startIndex++) + extractStatuses.Add(false); + extractStatuses.Add(true); + startIndex++; + curUnpack = item.GetEndOffset(); + } + + lps->OutSize = totalUnPacked; + lps->InSize = totalPacked; + RINOK(lps->SetCur()); + + CFolderOutStream *cabFolderOutStream = new CFolderOutStream; + CMyComPtr outStream(cabFolderOutStream); + + const CFolder &folder = db.Folders[item.GetFolderIndex(db.Folders.Size())]; + + cabFolderOutStream->Init(&m_Database, &extractStatuses, startIndex2, + curUnpack, extractCallback, testMode); + + cabBlockInStreamSpec->MsZip = false; + switch(folder.GetCompressionMethod()) + { + case NHeader::NCompressionMethodMajor::kNone: + break; + case NHeader::NCompressionMethodMajor::kMSZip: + if(deflateDecoderSpec == NULL) + { + deflateDecoderSpec = new NCompress::NDeflate::NDecoder::CCOMCoder; + deflateDecoder = deflateDecoderSpec; + } + cabBlockInStreamSpec->MsZip = true; + break; + case NHeader::NCompressionMethodMajor::kLZX: + if(lzxDecoderSpec == NULL) + { + lzxDecoderSpec = new NCompress::NLzx::CDecoder; + lzxDecoder = lzxDecoderSpec; + } + RINOK(lzxDecoderSpec->SetParams(folder.CompressionTypeMinor)); + break; + case NHeader::NCompressionMethodMajor::kQuantum: + if(quantumDecoderSpec == NULL) + { + quantumDecoderSpec = new NCompress::NQuantum::CDecoder; + quantumDecoder = quantumDecoderSpec; + } + quantumDecoderSpec->SetParams(folder.CompressionTypeMinor); + break; + default: + { + RINOK(cabFolderOutStream->Unsupported()); + totalUnPacked += curUnpack; + continue; + } + } + + cabBlockInStreamSpec->InitForNewFolder(); + + HRESULT res = S_OK; + + { + int volIndex = mvItem.VolumeIndex; + int locFolderIndex = item.GetFolderIndex(db.Folders.Size()); + bool keepHistory = false; + bool keepInputBuffer = false; + for (UInt32 f = 0; cabFolderOutStream->GetRemain() != 0;) + { + if (volIndex >= m_Database.Volumes.Size()) + { + res = S_FALSE; + break; + } + + const CDatabaseEx &db = m_Database.Volumes[volIndex]; + const CFolder &folder = db.Folders[locFolderIndex]; + if (f == 0) + { + cabBlockInStreamSpec->SetStream(db.Stream); + cabBlockInStreamSpec->ReservedSize = db.ArchiveInfo.GetDataBlockReserveSize(); + RINOK(db.Stream->Seek(db.StartPosition + folder.DataStart, STREAM_SEEK_SET, NULL)); + } + if (f == folder.NumDataBlocks) + { + volIndex++; + locFolderIndex = 0; + f = 0; + continue; + } + f++; + + cabBlockInStreamSpec->DataError = false; + + if (!keepInputBuffer) + cabBlockInStreamSpec->InitForNewBlock(); + + UInt32 packSize, unpackSize; + res = cabBlockInStreamSpec->PreRead(packSize, unpackSize); + if (res == S_FALSE) + break; + RINOK(res); + keepInputBuffer = (unpackSize == 0); + if (keepInputBuffer) + continue; + + UInt64 totalUnPacked2 = totalUnPacked + cabFolderOutStream->GetPosInFolder(); + totalPacked += packSize; + + lps->OutSize = totalUnPacked2; + lps->InSize = totalPacked; + RINOK(lps->SetCur()); + + UInt64 unpackRemain = cabFolderOutStream->GetRemain(); + + const UInt32 kBlockSizeMax = (1 << 15); + if (unpackRemain > kBlockSizeMax) + unpackRemain = kBlockSizeMax; + if (unpackRemain > unpackSize) + unpackRemain = unpackSize; + + switch(folder.GetCompressionMethod()) + { + case NHeader::NCompressionMethodMajor::kNone: + res = copyCoder->Code(cabBlockInStream, outStream, NULL, &unpackRemain, NULL); + break; + case NHeader::NCompressionMethodMajor::kMSZip: + deflateDecoderSpec->SetKeepHistory(keepHistory); + res = deflateDecoder->Code(cabBlockInStream, outStream, NULL, &unpackRemain, NULL); + break; + case NHeader::NCompressionMethodMajor::kLZX: + lzxDecoderSpec->SetKeepHistory(keepHistory); + res = lzxDecoder->Code(cabBlockInStream, outStream, NULL, &unpackRemain, NULL); + break; + case NHeader::NCompressionMethodMajor::kQuantum: + quantumDecoderSpec->SetKeepHistory(keepHistory); + res = quantumDecoder->Code(cabBlockInStream, outStream, NULL, &unpackRemain, NULL); + break; + } + if (res != S_OK) + { + if (res != S_FALSE) + RINOK(res); + break; + } + keepHistory = true; + } + if (res == S_OK) + { + RINOK(cabFolderOutStream->WriteEmptyFiles()); + } + } + if (res != S_OK || cabFolderOutStream->GetRemain() != 0) + { + RINOK(cabFolderOutStream->FlushCorrupted()); + } + totalUnPacked += curUnpack; + } + return S_OK; + COM_TRY_END +} + +STDMETHODIMP CHandler::GetNumberOfItems(UInt32 *numItems) +{ + *numItems = m_Database.Items.Size(); + return S_OK; +} + +}} diff --git a/CPP/7zip/Archive/Cab/CabHandler.h b/CPP/7zip/Archive/Cab/CabHandler.h new file mode 100644 index 0000000..1edcd11 --- /dev/null +++ b/CPP/7zip/Archive/Cab/CabHandler.h @@ -0,0 +1,28 @@ +// CabHandler.h + +#ifndef __CAB_HANDLER_H +#define __CAB_HANDLER_H + +#include "Common/MyCom.h" +#include "../IArchive.h" +#include "CabIn.h" + +namespace NArchive { +namespace NCab { + +class CHandler: + public IInArchive, + public CMyUnknownImp +{ +public: + MY_UNKNOWN_IMP1(IInArchive) + + INTERFACE_IInArchive(;) + +private: + CMvDatabaseEx m_Database; +}; + +}} + +#endif diff --git a/CPP/7zip/Archive/Cab/CabHeader.cpp b/CPP/7zip/Archive/Cab/CabHeader.cpp new file mode 100644 index 0000000..0cba1b0 --- /dev/null +++ b/CPP/7zip/Archive/Cab/CabHeader.cpp @@ -0,0 +1,15 @@ +// CabHeader.cpp + +#include "StdAfx.h" + +#include "CabHeader.h" + +namespace NArchive { +namespace NCab { +namespace NHeader { + +Byte kMarker[kMarkerSize] = {'M', 'S', 'C', 'F', 0, 0, 0, 0 }; + +// struct CSignatureInitializer { CSignatureInitializer() { kMarker[0]--; }; } g_SignatureInitializer; + +}}} diff --git a/CPP/7zip/Archive/Cab/CabHeader.h b/CPP/7zip/Archive/Cab/CabHeader.h new file mode 100644 index 0000000..0f0d2af --- /dev/null +++ b/CPP/7zip/Archive/Cab/CabHeader.h @@ -0,0 +1,44 @@ +// Archive/Cab/Header.h + +#ifndef __ARCHIVE_CAB_HEADER_H +#define __ARCHIVE_CAB_HEADER_H + +#include "Common/Types.h" + +namespace NArchive { +namespace NCab { +namespace NHeader { + +const unsigned kMarkerSize = 8; +extern Byte kMarker[kMarkerSize]; + +namespace NArchive +{ + namespace NFlags + { + const int kPrevCabinet = 0x0001; + const int kNextCabinet = 0x0002; + const int kReservePresent = 0x0004; + } +} + +namespace NCompressionMethodMajor +{ + const Byte kNone = 0; + const Byte kMSZip = 1; + const Byte kQuantum = 2; + const Byte kLZX = 3; +} + +const int kFileNameIsUTFAttributeMask = 0x80; + +namespace NFolderIndex +{ + const int kContinuedFromPrev = 0xFFFD; + const int kContinuedToNext = 0xFFFE; + const int kContinuedPrevAndNext = 0xFFFF; +} + +}}} + +#endif diff --git a/CPP/7zip/Archive/Cab/CabIn.cpp b/CPP/7zip/Archive/Cab/CabIn.cpp new file mode 100644 index 0000000..c0bffa2 --- /dev/null +++ b/CPP/7zip/Archive/Cab/CabIn.cpp @@ -0,0 +1,272 @@ +// Archive/CabIn.cpp + +#include "StdAfx.h" + +#include "../Common/FindSignature.h" + +#include "CabIn.h" + +namespace NArchive { +namespace NCab { + +Byte CInArchive::Read8() +{ + Byte b; + if (!inBuffer.ReadByte(b)) + throw CInArchiveException(CInArchiveException::kUnsupported); + return b; +} + +UInt16 CInArchive::Read16() +{ + UInt16 value = 0; + for (int i = 0; i < 2; i++) + { + Byte b = Read8(); + value |= (UInt16(b) << (8 * i)); + } + return value; +} + +UInt32 CInArchive::Read32() +{ + UInt32 value = 0; + for (int i = 0; i < 4; i++) + { + Byte b = Read8(); + value |= (UInt32(b) << (8 * i)); + } + return value; +} + +AString CInArchive::SafeReadName() +{ + AString name; + for (;;) + { + Byte b = Read8(); + if (b == 0) + return name; + name += (char)b; + } +} + +void CInArchive::ReadOtherArchive(COtherArchive &oa) +{ + oa.FileName = SafeReadName(); + oa.DiskName = SafeReadName(); +} + +void CInArchive::Skip(UInt32 size) +{ + while (size-- != 0) + Read8(); +} + +HRESULT CInArchive::Open(const UInt64 *searchHeaderSizeLimit, CDatabaseEx &db) +{ + IInStream *stream = db.Stream; + db.Clear(); + RINOK(stream->Seek(0, STREAM_SEEK_SET, &db.StartPosition)); + + RINOK(FindSignatureInStream(stream, NHeader::kMarker, NHeader::kMarkerSize, + searchHeaderSizeLimit, db.StartPosition)); + + RINOK(stream->Seek(db.StartPosition + NHeader::kMarkerSize, STREAM_SEEK_SET, NULL)); + if (!inBuffer.Create(1 << 17)) + return E_OUTOFMEMORY; + inBuffer.SetStream(stream); + inBuffer.Init(); + + CInArchiveInfo &ai = db.ArchiveInfo; + + ai.Size = Read32(); + if (Read32() != 0) + return S_FALSE; + ai.FileHeadersOffset = Read32(); + if (Read32() != 0) + return S_FALSE; + + ai.VersionMinor = Read8(); + ai.VersionMajor = Read8(); + ai.NumFolders = Read16(); + ai.NumFiles = Read16(); + ai.Flags = Read16(); + if (ai.Flags > 7) + return S_FALSE; + ai.SetID = Read16(); + ai.CabinetNumber = Read16(); + + if (ai.ReserveBlockPresent()) + { + ai.PerCabinetAreaSize = Read16(); + ai.PerFolderAreaSize = Read8(); + ai.PerDataBlockAreaSize = Read8(); + + Skip(ai.PerCabinetAreaSize); + } + + { + if (ai.IsTherePrev()) + ReadOtherArchive(ai.PrevArc); + if (ai.IsThereNext()) + ReadOtherArchive(ai.NextArc); + } + + int i; + for (i = 0; i < ai.NumFolders; i++) + { + CFolder folder; + + folder.DataStart = Read32(); + folder.NumDataBlocks = Read16(); + folder.CompressionTypeMajor = Read8(); + folder.CompressionTypeMinor = Read8(); + + Skip(ai.PerFolderAreaSize); + db.Folders.Add(folder); + } + + RINOK(stream->Seek(db.StartPosition + ai.FileHeadersOffset, STREAM_SEEK_SET, NULL)); + + inBuffer.SetStream(stream); + inBuffer.Init(); + for (i = 0; i < ai.NumFiles; i++) + { + CItem item; + item.Size = Read32(); + item.Offset = Read32(); + item.FolderIndex = Read16(); + UInt16 pureDate = Read16(); + UInt16 pureTime = Read16(); + item.Time = ((UInt32(pureDate) << 16)) | pureTime; + item.Attributes = Read16(); + item.Name = SafeReadName(); + int folderIndex = item.GetFolderIndex(db.Folders.Size()); + if (folderIndex >= db.Folders.Size()) + return S_FALSE; + db.Items.Add(item); + } + return S_OK; +} + +#define RINOZ(x) { int __tt = (x); if (__tt != 0) return __tt; } + +static int CompareMvItems(const CMvItem *p1, const CMvItem *p2, void *param) +{ + const CMvDatabaseEx &mvDb = *(const CMvDatabaseEx *)param; + const CDatabaseEx &db1 = mvDb.Volumes[p1->VolumeIndex]; + const CDatabaseEx &db2 = mvDb.Volumes[p2->VolumeIndex]; + const CItem &item1 = db1.Items[p1->ItemIndex]; + const CItem &item2 = db2.Items[p2->ItemIndex];; + bool isDir1 = item1.IsDir(); + bool isDir2 = item2.IsDir(); + if (isDir1 && !isDir2) + return -1; + if (isDir2 && !isDir1) + return 1; + int f1 = mvDb.GetFolderIndex(p1); + int f2 = mvDb.GetFolderIndex(p2); + RINOZ(MyCompare(f1, f2)); + RINOZ(MyCompare(item1.Offset, item2.Offset)); + RINOZ(MyCompare(item1.Size, item2.Size)); + RINOZ(MyCompare(p1->VolumeIndex, p2->VolumeIndex)); + return MyCompare(p1->ItemIndex, p2->ItemIndex); +} + +bool CMvDatabaseEx::AreItemsEqual(int i1, int i2) +{ + const CMvItem *p1 = &Items[i1]; + const CMvItem *p2 = &Items[i2]; + const CDatabaseEx &db1 = Volumes[p1->VolumeIndex]; + const CDatabaseEx &db2 = Volumes[p2->VolumeIndex]; + const CItem &item1 = db1.Items[p1->ItemIndex]; + const CItem &item2 = db2.Items[p2->ItemIndex];; + return GetFolderIndex(p1) == GetFolderIndex(p2) && + item1.Offset == item2.Offset && + item1.Size == item2.Size && + item1.Name == item2.Name; +} + +void CMvDatabaseEx::FillSortAndShrink() +{ + Items.Clear(); + StartFolderOfVol.Clear(); + FolderStartFileIndex.Clear(); + int offset = 0; + for (int v = 0; v < Volumes.Size(); v++) + { + const CDatabaseEx &db = Volumes[v]; + int curOffset = offset; + if (db.IsTherePrevFolder()) + curOffset--; + StartFolderOfVol.Add(curOffset); + offset += db.GetNumberOfNewFolders(); + + CMvItem mvItem; + mvItem.VolumeIndex = v; + for (int i = 0 ; i < db.Items.Size(); i++) + { + mvItem.ItemIndex = i; + Items.Add(mvItem); + } + } + + Items.Sort(CompareMvItems, (void *)this); + int j = 1; + int i; + for (i = 1; i < Items.Size(); i++) + if (!AreItemsEqual(i, i -1)) + Items[j++] = Items[i]; + Items.DeleteFrom(j); + + for (i = 0; i < Items.Size(); i++) + { + int folderIndex = GetFolderIndex(&Items[i]); + if (folderIndex >= FolderStartFileIndex.Size()) + FolderStartFileIndex.Add(i); + } +} + +bool CMvDatabaseEx::Check() +{ + for (int v = 1; v < Volumes.Size(); v++) + { + const CDatabaseEx &db1 = Volumes[v]; + if (db1.IsTherePrevFolder()) + { + const CDatabaseEx &db0 = Volumes[v - 1]; + if (db0.Folders.IsEmpty() || db1.Folders.IsEmpty()) + return false; + const CFolder &f0 = db0.Folders.Back(); + const CFolder &f1 = db1.Folders.Front(); + if (f0.CompressionTypeMajor != f1.CompressionTypeMajor || + f0.CompressionTypeMinor != f1.CompressionTypeMinor) + return false; + } + } + UInt32 beginPos = 0; + UInt64 endPos = 0; + int prevFolder = -2; + for (int i = 0; i < Items.Size(); i++) + { + const CMvItem &mvItem = Items[i]; + int fIndex = GetFolderIndex(&mvItem); + if (fIndex >= FolderStartFileIndex.Size()) + return false; + const CItem &item = Volumes[mvItem.VolumeIndex].Items[mvItem.ItemIndex]; + if (item.IsDir()) + continue; + int folderIndex = GetFolderIndex(&mvItem); + if (folderIndex != prevFolder) + prevFolder = folderIndex; + else if (item.Offset < endPos && + (item.Offset != beginPos || item.GetEndOffset() != endPos)) + return false; + beginPos = item.Offset; + endPos = item.GetEndOffset(); + } + return true; +} + +}} diff --git a/CPP/7zip/Archive/Cab/CabIn.h b/CPP/7zip/Archive/Cab/CabIn.h new file mode 100644 index 0000000..1e9b188 --- /dev/null +++ b/CPP/7zip/Archive/Cab/CabIn.h @@ -0,0 +1,161 @@ +// Archive/CabIn.h + +#ifndef __ARCHIVE_CAB_IN_H +#define __ARCHIVE_CAB_IN_H + +#include "../../IStream.h" +#include "../../Common/InBuffer.h" +#include "CabHeader.h" +#include "CabItem.h" + +namespace NArchive { +namespace NCab { + +class CInArchiveException +{ +public: + enum CCauseType + { + kUnexpectedEndOfArchive = 0, + kIncorrectArchive, + kUnsupported + } Cause; + CInArchiveException(CCauseType cause) : Cause(cause) {} +}; + +struct COtherArchive +{ + AString FileName; + AString DiskName; +}; + +struct CArchiveInfo +{ + Byte VersionMinor; /* cabinet file format version, minor */ + Byte VersionMajor; /* cabinet file format version, major */ + UInt16 NumFolders; /* number of CFFOLDER entries in this cabinet */ + UInt16 NumFiles; /* number of CFFILE entries in this cabinet */ + UInt16 Flags; /* cabinet file option indicators */ + UInt16 SetID; /* must be the same for all cabinets in a set */ + UInt16 CabinetNumber; /* number of this cabinet file in a set */ + + bool ReserveBlockPresent() const { return (Flags & NHeader::NArchive::NFlags::kReservePresent) != 0; } + + bool IsTherePrev() const { return (Flags & NHeader::NArchive::NFlags::kPrevCabinet) != 0; } + bool IsThereNext() const { return (Flags & NHeader::NArchive::NFlags::kNextCabinet) != 0; } + + UInt16 PerCabinetAreaSize; // (optional) size of per-cabinet reserved area + Byte PerFolderAreaSize; // (optional) size of per-folder reserved area + Byte PerDataBlockAreaSize; // (optional) size of per-datablock reserved area + + Byte GetDataBlockReserveSize() const { return (Byte)(ReserveBlockPresent() ? PerDataBlockAreaSize : 0); } + + COtherArchive PrevArc; + COtherArchive NextArc; + + CArchiveInfo() + { + Clear(); + } + + void Clear() + { + PerCabinetAreaSize = 0; + PerFolderAreaSize = 0; + PerDataBlockAreaSize = 0; + } +}; + +struct CInArchiveInfo: public CArchiveInfo +{ + UInt32 Size; /* size of this cabinet file in bytes */ + UInt32 FileHeadersOffset; // offset of the first CFFILE entry +}; + + +struct CDatabase +{ + UInt64 StartPosition; + CInArchiveInfo ArchiveInfo; + CObjectVector Folders; + CObjectVector Items; + + void Clear() + { + ArchiveInfo.Clear(); + Folders.Clear(); + Items.Clear(); + } + bool IsTherePrevFolder() const + { + for (int i = 0; i < Items.Size(); i++) + if (Items[i].ContinuedFromPrev()) + return true; + return false; + } + int GetNumberOfNewFolders() const + { + int res = Folders.Size(); + if (IsTherePrevFolder()) + res--; + return res; + } + UInt32 GetFileOffset(int index) const { return Items[index].Offset; } + UInt32 GetFileSize(int index) const { return Items[index].Size; } +}; + +struct CDatabaseEx: public CDatabase +{ + CMyComPtr Stream; +}; + +struct CMvItem +{ + int VolumeIndex; + int ItemIndex; +}; + +class CMvDatabaseEx +{ + bool AreItemsEqual(int i1, int i2); +public: + CObjectVector Volumes; + CRecordVector Items; + CRecordVector StartFolderOfVol; + CRecordVector FolderStartFileIndex; + + int GetFolderIndex(const CMvItem *mvi) const + { + const CDatabaseEx &db = Volumes[mvi->VolumeIndex]; + return StartFolderOfVol[mvi->VolumeIndex] + + db.Items[mvi->ItemIndex].GetFolderIndex(db.Folders.Size()); + } + void Clear() + { + Volumes.Clear(); + Items.Clear(); + StartFolderOfVol.Clear(); + FolderStartFileIndex.Clear(); + } + void FillSortAndShrink(); + bool Check(); +}; + +class CInArchive +{ + CInBuffer inBuffer; + + Byte Read8(); + UInt16 Read16(); + UInt32 Read32(); + AString SafeReadName(); + void Skip(UInt32 size); + void ReadOtherArchive(COtherArchive &oa); + +public: + HRESULT Open(const UInt64 *searchHeaderSizeLimit, CDatabaseEx &db); +}; + +}} + +#endif diff --git a/CPP/7zip/Archive/Cab/CabItem.h b/CPP/7zip/Archive/Cab/CabItem.h new file mode 100644 index 0000000..63a1e85 --- /dev/null +++ b/CPP/7zip/Archive/Cab/CabItem.h @@ -0,0 +1,63 @@ +// Archive/CabItem.h + +#ifndef __ARCHIVE_CAB_ITEM_H +#define __ARCHIVE_CAB_ITEM_H + +#include "Common/Types.h" +#include "Common/MyString.h" +#include "CabHeader.h" + +namespace NArchive { +namespace NCab { + +struct CFolder +{ + UInt32 DataStart; // offset of the first CFDATA block in this folder + UInt16 NumDataBlocks; // number of CFDATA blocks in this folder + Byte CompressionTypeMajor; + Byte CompressionTypeMinor; + Byte GetCompressionMethod() const { return (Byte)(CompressionTypeMajor & 0xF); } +}; + +struct CItem +{ + AString Name; + UInt32 Offset; + UInt32 Size; + UInt32 Time; + UInt16 FolderIndex; + UInt16 Flags; + UInt16 Attributes; + + UInt64 GetEndOffset() const { return (UInt64)Offset + Size; } + UInt32 GetWinAttributes() const { return (Attributes & ~NHeader::kFileNameIsUTFAttributeMask); } + bool IsNameUTF() const { return (Attributes & NHeader::kFileNameIsUTFAttributeMask) != 0; } + bool IsDir() const { return (Attributes & FILE_ATTRIBUTE_DIRECTORY) != 0; } + + bool ContinuedFromPrev() const + { + return + (FolderIndex == NHeader::NFolderIndex::kContinuedFromPrev) || + (FolderIndex == NHeader::NFolderIndex::kContinuedPrevAndNext); + } + + bool ContinuedToNext() const + { + return + (FolderIndex == NHeader::NFolderIndex::kContinuedToNext) || + (FolderIndex == NHeader::NFolderIndex::kContinuedPrevAndNext); + } + + int GetFolderIndex(int numFolders) const + { + if (ContinuedFromPrev()) + return 0; + if (ContinuedToNext()) + return (numFolders - 1); + return FolderIndex; + } +}; + +}} + +#endif diff --git a/CPP/7zip/Archive/Cab/CabRegister.cpp b/CPP/7zip/Archive/Cab/CabRegister.cpp new file mode 100644 index 0000000..15fe409 --- /dev/null +++ b/CPP/7zip/Archive/Cab/CabRegister.cpp @@ -0,0 +1,13 @@ +// CabRegister.cpp + +#include "StdAfx.h" + +#include "../../Common/RegisterArc.h" + +#include "CabHandler.h" +static IInArchive *CreateArc() { return new NArchive::NCab::CHandler; } + +static CArcInfo g_ArcInfo = + { L"Cab", L"cab", 0, 8, { 0x4D, 0x53, 0x43, 0x46 }, 4, false, CreateArc, 0 }; + +REGISTER_ARC(Cab) diff --git a/CPP/7zip/Archive/Chm/ChmHandler.cpp b/CPP/7zip/Archive/Chm/ChmHandler.cpp new file mode 100644 index 0000000..a9e334b --- /dev/null +++ b/CPP/7zip/Archive/Chm/ChmHandler.cpp @@ -0,0 +1,721 @@ +// ChmHandler.cpp + +#include "StdAfx.h" + +#include "Common/ComTry.h" +#include "Common/Defs.h" +#include "Common/StringConvert.h" +#include "Common/UTFConvert.h" + +#include "Windows/PropVariant.h" +#include "Windows/Time.h" + +#include "../../Common/LimitedStreams.h" +#include "../../Common/ProgressUtils.h" +#include "../../Common/StreamUtils.h" + +#include "../../Compress/CopyCoder.h" +#include "../../Compress/LzxDecoder.h" + +#include "../Common/ItemNameUtils.h" + +#include "ChmHandler.h" + +using namespace NWindows; +using namespace NTime; + +namespace NArchive { +namespace NChm { + +// #define _CHM_DETAILS + +#ifdef _CHM_DETAILS + +enum +{ + kpidSection = kpidUserDefined +}; + +#endif + +STATPROPSTG kProps[] = +{ + { NULL, kpidPath, VT_BSTR}, + { NULL, kpidSize, VT_UI8}, + { NULL, kpidMethod, VT_BSTR}, + { NULL, kpidBlock, VT_UI4} + + #ifdef _CHM_DETAILS + , + { L"Section", kpidSection, VT_UI4}, + { NULL, kpidOffset, VT_UI4} + #endif +}; + +STATPROPSTG kArcProps[] = +{ + { NULL, kpidNumBlocks, VT_UI8} +}; + +IMP_IInArchive_Props + +IMP_IInArchive_ArcProps_NO +/* +IMP_IInArchive_ArcProps + +STDMETHODIMP CHandler::GetArchiveProperty(PROPID propID, PROPVARIANT *value) +{ + COM_TRY_BEGIN + NWindows::NCOM::CPropVariant prop; + switch(propID) + { + case kpidNumBlocks: + { + UInt64 numBlocks = 0; + for (int i = 0; i < m_Database.Sections.Size(); i++) + { + const CSectionInfo &s = m_Database.Sections[i]; + for (int j = 0; j < s.Methods.Size(); j++) + { + const CMethodInfo &m = s.Methods[j]; + if (m.IsLzx()) + numBlocks += m.LzxInfo.ResetTable.GetNumBlocks(); + } + } + prop = numBlocks; + break; + } + } + prop.Detach(value); + return S_OK; + COM_TRY_END +} +*/ + +STDMETHODIMP CHandler::GetProperty(UInt32 index, PROPID propID, PROPVARIANT *value) +{ + COM_TRY_BEGIN + NWindows::NCOM::CPropVariant prop; + if (m_Database.NewFormat) + { + switch(propID) + { + case kpidSize: + prop = (UInt64)m_Database.NewFormatString.Length(); + break; + } + prop.Detach(value); + return S_OK; + } + int entryIndex; + if (m_Database.LowLevel) + entryIndex = index; + else + entryIndex = m_Database.Indices[index]; + const CItem &item = m_Database.Items[entryIndex]; + switch(propID) + { + case kpidPath: + { + UString us; + if (ConvertUTF8ToUnicode(item.Name, us)) + { + if (!m_Database.LowLevel) + { + if (us.Length() > 1) + if (us[0] == L'/') + us.Delete(0); + } + prop = NItemName::GetOSName2(us); + } + break; + } + case kpidIsDir: prop = item.IsDir(); break; + case kpidSize: prop = item.Size; break; + case kpidMethod: + { + if (!item.IsDir()) + if (item.Section == 0) + prop = L"Copy"; + else if (item.Section < m_Database.Sections.Size()) + prop = m_Database.Sections[(int)item.Section].GetMethodName(); + break; + } + case kpidBlock: + if (m_Database.LowLevel) + prop = item.Section; + else if (item.Section != 0) + prop = m_Database.GetFolder(index); + break; + + #ifdef _CHM_DETAILS + + case kpidSection: prop = (UInt32)item.Section; break; + case kpidOffset: prop = (UInt32)item.Offset; break; + + #endif + } + prop.Detach(value); + return S_OK; + COM_TRY_END +} + +class CProgressImp: public CProgressVirt +{ + CMyComPtr _callback; +public: + STDMETHOD(SetTotal)(const UInt64 *numFiles); + STDMETHOD(SetCompleted)(const UInt64 *numFiles); + CProgressImp(IArchiveOpenCallback *callback): _callback(callback) {}; +}; + +STDMETHODIMP CProgressImp::SetTotal(const UInt64 *numFiles) +{ + if (_callback) + return _callback->SetCompleted(numFiles, NULL); + return S_OK; +} + +STDMETHODIMP CProgressImp::SetCompleted(const UInt64 *numFiles) +{ + if (_callback) + return _callback->SetCompleted(numFiles, NULL); + return S_OK; +} + +STDMETHODIMP CHandler::Open(IInStream *inStream, + const UInt64 *maxCheckStartPosition, + IArchiveOpenCallback * /* openArchiveCallback */) +{ + COM_TRY_BEGIN + m_Stream.Release(); + try + { + CInArchive archive; + // CProgressImp progressImp(openArchiveCallback); + RINOK(archive.Open(inStream, maxCheckStartPosition, m_Database)); + /* + if (m_Database.LowLevel) + return S_FALSE; + */ + m_Stream = inStream; + } + catch(...) + { + return S_FALSE; + } + return S_OK; + COM_TRY_END +} + +STDMETHODIMP CHandler::Close() +{ + m_Database.Clear(); + m_Stream.Release(); + return S_OK; +} + +class CChmFolderOutStream: + public ISequentialOutStream, + public CMyUnknownImp +{ +public: + MY_UNKNOWN_IMP + + HRESULT Write2(const void *data, UInt32 size, UInt32 *processedSize, bool isOK); + STDMETHOD(Write)(const void *data, UInt32 size, UInt32 *processedSize); + + UInt64 m_FolderSize; + UInt64 m_PosInFolder; + UInt64 m_PosInSection; + const CRecordVector *m_ExtractStatuses; + int m_StartIndex; + int m_CurrentIndex; + int m_NumFiles; + +private: + const CFilesDatabase *m_Database; + CMyComPtr m_ExtractCallback; + bool m_TestMode; + + bool m_IsOk; + bool m_FileIsOpen; + UInt64 m_RemainFileSize; + CMyComPtr m_RealOutStream; + + HRESULT OpenFile(); + HRESULT WriteEmptyFiles(); +public: + void Init( + const CFilesDatabase *database, + IArchiveExtractCallback *extractCallback, + bool testMode); + HRESULT FlushCorrupted(UInt64 maxSize); +}; + +void CChmFolderOutStream::Init( + const CFilesDatabase *database, + IArchiveExtractCallback *extractCallback, + bool testMode) +{ + m_Database = database; + m_ExtractCallback = extractCallback; + m_TestMode = testMode; + + m_CurrentIndex = 0; + m_FileIsOpen = false; +} + +HRESULT CChmFolderOutStream::OpenFile() +{ + Int32 askMode = (*m_ExtractStatuses)[m_CurrentIndex] ? (m_TestMode ? + NExtract::NAskMode::kTest : + NExtract::NAskMode::kExtract) : + NExtract::NAskMode::kSkip; + m_RealOutStream.Release(); + RINOK(m_ExtractCallback->GetStream(m_StartIndex + m_CurrentIndex, &m_RealOutStream, askMode)); + if (!m_RealOutStream && !m_TestMode) + askMode = NExtract::NAskMode::kSkip; + return m_ExtractCallback->PrepareOperation(askMode); +} + +HRESULT CChmFolderOutStream::WriteEmptyFiles() +{ + if (m_FileIsOpen) + return S_OK; + for (;m_CurrentIndex < m_NumFiles; m_CurrentIndex++) + { + UInt64 fileSize = m_Database->GetFileSize(m_StartIndex + m_CurrentIndex); + if (fileSize != 0) + return S_OK; + HRESULT result = OpenFile(); + m_RealOutStream.Release(); + RINOK(result); + RINOK(m_ExtractCallback->SetOperationResult(NExtract::NOperationResult::kOK)); + } + return S_OK; +} + +// This is WritePart function +HRESULT CChmFolderOutStream::Write2(const void *data, UInt32 size, UInt32 *processedSize, bool isOK) +{ + UInt32 realProcessed = 0; + if (processedSize != NULL) + *processedSize = 0; + while(size != 0) + { + if (m_FileIsOpen) + { + UInt32 numBytesToWrite = (UInt32)MyMin(m_RemainFileSize, (UInt64)(size)); + HRESULT res = S_OK; + if (numBytesToWrite > 0) + { + if (!isOK) + m_IsOk = false; + if (m_RealOutStream) + { + UInt32 processedSizeLocal = 0; + res = m_RealOutStream->Write((const Byte *)data, numBytesToWrite, &processedSizeLocal); + numBytesToWrite = processedSizeLocal; + } + } + realProcessed += numBytesToWrite; + if (processedSize != NULL) + *processedSize = realProcessed; + data = (const void *)((const Byte *)data + numBytesToWrite); + size -= numBytesToWrite; + m_RemainFileSize -= numBytesToWrite; + m_PosInSection += numBytesToWrite; + m_PosInFolder += numBytesToWrite; + if (res != S_OK) + return res; + if (m_RemainFileSize == 0) + { + m_RealOutStream.Release(); + RINOK(m_ExtractCallback->SetOperationResult( + m_IsOk ? + NExtract::NOperationResult::kOK: + NExtract::NOperationResult::kDataError)); + m_FileIsOpen = false; + } + if (realProcessed > 0) + break; // with this break this function works as write part + } + else + { + if (m_CurrentIndex >= m_NumFiles) + return E_FAIL; + int fullIndex = m_StartIndex + m_CurrentIndex; + m_RemainFileSize = m_Database->GetFileSize(fullIndex); + UInt64 fileOffset = m_Database->GetFileOffset(fullIndex); + if (fileOffset < m_PosInSection) + return E_FAIL; + if (fileOffset > m_PosInSection) + { + UInt32 numBytesToWrite = (UInt32)MyMin(fileOffset - m_PosInSection, UInt64(size)); + realProcessed += numBytesToWrite; + if (processedSize != NULL) + *processedSize = realProcessed; + data = (const void *)((const Byte *)data + numBytesToWrite); + size -= numBytesToWrite; + m_PosInSection += numBytesToWrite; + m_PosInFolder += numBytesToWrite; + } + if (fileOffset == m_PosInSection) + { + RINOK(OpenFile()); + m_FileIsOpen = true; + m_CurrentIndex++; + m_IsOk = true; + } + } + } + return WriteEmptyFiles(); +} + +STDMETHODIMP CChmFolderOutStream::Write(const void *data, UInt32 size, UInt32 *processedSize) +{ + return Write2(data, size, processedSize, true); +} + +HRESULT CChmFolderOutStream::FlushCorrupted(UInt64 maxSize) +{ + const UInt32 kBufferSize = (1 << 10); + Byte buffer[kBufferSize]; + for (int i = 0; i < kBufferSize; i++) + buffer[i] = 0; + if (maxSize > m_FolderSize) + maxSize = m_FolderSize; + while (m_PosInFolder < maxSize) + { + UInt32 size = (UInt32)MyMin(maxSize - m_PosInFolder, (UInt64)kBufferSize); + UInt32 processedSizeLocal = 0; + RINOK(Write2(buffer, size, &processedSizeLocal, false)); + if (processedSizeLocal == 0) + return S_OK; + } + return S_OK; +} + + +STDMETHODIMP CHandler::Extract(const UInt32 *indices, UInt32 numItems, + Int32 testModeSpec, IArchiveExtractCallback *extractCallback) +{ + COM_TRY_BEGIN + bool allFilesMode = (numItems == (UInt32)-1); + + if (allFilesMode) + numItems = m_Database.NewFormat ? 1: + (m_Database.LowLevel ? + m_Database.Items.Size(): + m_Database.Indices.Size()); + if (numItems == 0) + return S_OK; + bool testMode = (testModeSpec != 0); + + UInt64 currentTotalSize = 0; + + NCompress::CCopyCoder *copyCoderSpec = new NCompress::CCopyCoder(); + CMyComPtr copyCoder = copyCoderSpec; + UInt32 i; + + CLocalProgress *lps = new CLocalProgress; + CMyComPtr progress = lps; + lps->Init(extractCallback, false); + + CLimitedSequentialInStream *streamSpec = new CLimitedSequentialInStream; + CMyComPtr inStream(streamSpec); + streamSpec->SetStream(m_Stream); + + if (m_Database.LowLevel) + { + UInt64 currentItemSize = 0; + UInt64 totalSize = 0; + if (m_Database.NewFormat) + totalSize = m_Database.NewFormatString.Length(); + else + for (i = 0; i < numItems; i++) + totalSize += m_Database.Items[allFilesMode ? i : indices[i]].Size; + extractCallback->SetTotal(totalSize); + + for (i = 0; i < numItems; i++, currentTotalSize += currentItemSize) + { + currentItemSize = 0; + lps->InSize = currentTotalSize; // Change it + lps->OutSize = currentTotalSize; + + RINOK(lps->SetCur()); + CMyComPtr realOutStream; + Int32 askMode= testMode ? + NExtract::NAskMode::kTest : + NExtract::NAskMode::kExtract; + Int32 index = allFilesMode ? i : indices[i]; + RINOK(extractCallback->GetStream(index, &realOutStream, askMode)); + + if (m_Database.NewFormat) + { + if (index != 0) + return E_FAIL; + if (!testMode && !realOutStream) + continue; + if (!testMode) + { + UInt32 size = m_Database.NewFormatString.Length(); + RINOK(WriteStream(realOutStream, (const char *)m_Database.NewFormatString, size)); + } + RINOK(extractCallback->SetOperationResult(NExtract::NOperationResult::kOK)); + continue; + } + const CItem &item = m_Database.Items[index]; + + currentItemSize = item.Size; + + if (!testMode && !realOutStream) + continue; + RINOK(extractCallback->PrepareOperation(askMode)); + if (item.Section != 0) + { + RINOK(extractCallback->SetOperationResult(NExtract::NOperationResult::kUnSupportedMethod)); + continue; + } + + if (testMode) + { + RINOK(extractCallback->SetOperationResult(NExtract::NOperationResult::kOK)); + continue; + } + + RINOK(m_Stream->Seek(m_Database.ContentOffset + item.Offset, STREAM_SEEK_SET, NULL)); + streamSpec->Init(item.Size); + + RINOK(copyCoder->Code(inStream, realOutStream, NULL, NULL, progress)); + realOutStream.Release(); + RINOK(extractCallback->SetOperationResult((copyCoderSpec->TotalSize == item.Size) ? + NExtract::NOperationResult::kOK: + NExtract::NOperationResult::kDataError)); + } + return S_OK; + } + + UInt64 lastFolderIndex = ((UInt64)0 - 1); + for (i = 0; i < numItems; i++) + { + UInt32 index = allFilesMode ? i : indices[i]; + int entryIndex = m_Database.Indices[index]; + const CItem &item = m_Database.Items[entryIndex]; + UInt64 sectionIndex = item.Section; + if (item.IsDir() || item.Size == 0) + continue; + if (sectionIndex == 0) + { + currentTotalSize += item.Size; + continue; + } + const CSectionInfo §ion = m_Database.Sections[(int)item.Section]; + if (section.IsLzx()) + { + const CLzxInfo &lzxInfo = section.Methods[0].LzxInfo; + UInt64 folderIndex = m_Database.GetFolder(index); + if (lastFolderIndex == folderIndex) + folderIndex++; + lastFolderIndex = m_Database.GetLastFolder(index); + for (; folderIndex <= lastFolderIndex; folderIndex++) + currentTotalSize += lzxInfo.GetFolderSize(); + } + } + + RINOK(extractCallback->SetTotal(currentTotalSize)); + + NCompress::NLzx::CDecoder *lzxDecoderSpec = 0; + CMyComPtr lzxDecoder; + CChmFolderOutStream *chmFolderOutStream = 0; + CMyComPtr outStream; + + currentTotalSize = 0; + + CRecordVector extractStatuses; + for (i = 0; i < numItems;) + { + RINOK(extractCallback->SetCompleted(¤tTotalSize)); + UInt32 index = allFilesMode ? i : indices[i]; + i++; + int entryIndex = m_Database.Indices[index]; + const CItem &item = m_Database.Items[entryIndex]; + UInt64 sectionIndex = item.Section; + Int32 askMode= testMode ? + NExtract::NAskMode::kTest : + NExtract::NAskMode::kExtract; + if (item.IsDir()) + { + CMyComPtr realOutStream; + RINOK(extractCallback->GetStream(index, &realOutStream, askMode)); + RINOK(extractCallback->PrepareOperation(askMode)); + realOutStream.Release(); + RINOK(extractCallback->SetOperationResult(NExtract::NOperationResult::kOK)); + continue; + } + + lps->InSize = currentTotalSize; // Change it + lps->OutSize = currentTotalSize; + + if (item.Size == 0 || sectionIndex == 0) + { + CMyComPtr realOutStream; + RINOK(extractCallback->GetStream(index, &realOutStream, askMode)); + if (!testMode && !realOutStream) + continue; + RINOK(extractCallback->PrepareOperation(askMode)); + Int32 opRes = NExtract::NOperationResult::kOK; + if (!testMode && item.Size != 0) + { + RINOK(m_Stream->Seek(m_Database.ContentOffset + item.Offset, STREAM_SEEK_SET, NULL)); + streamSpec->Init(item.Size); + RINOK(copyCoder->Code(inStream, realOutStream, NULL, NULL, progress)); + if (copyCoderSpec->TotalSize != item.Size) + opRes = NExtract::NOperationResult::kDataError; + } + realOutStream.Release(); + RINOK(extractCallback->SetOperationResult(opRes)); + currentTotalSize += item.Size; + continue; + } + + const CSectionInfo §ion = m_Database.Sections[(int)sectionIndex]; + + if (!section.IsLzx()) + { + CMyComPtr realOutStream; + RINOK(extractCallback->GetStream(index, &realOutStream, askMode)); + if (!testMode && !realOutStream) + continue; + RINOK(extractCallback->PrepareOperation(askMode)); + RINOK(extractCallback->SetOperationResult(NExtract::NOperationResult::kUnSupportedMethod)); + continue; + } + + const CLzxInfo &lzxInfo = section.Methods[0].LzxInfo; + + if (chmFolderOutStream == 0) + { + chmFolderOutStream = new CChmFolderOutStream; + outStream = chmFolderOutStream; + } + + chmFolderOutStream->Init(&m_Database, extractCallback, testMode); + + if (lzxDecoderSpec == NULL) + { + lzxDecoderSpec = new NCompress::NLzx::CDecoder; + lzxDecoder = lzxDecoderSpec; + } + + UInt64 folderIndex = m_Database.GetFolder(index); + + UInt64 compressedPos = m_Database.ContentOffset + section.Offset; + UInt32 numDictBits = lzxInfo.GetNumDictBits(); + RINOK(lzxDecoderSpec->SetParams(numDictBits)); + + const CItem *lastItem = &item; + extractStatuses.Clear(); + extractStatuses.Add(true); + + for (;; folderIndex++) + { + RINOK(extractCallback->SetCompleted(¤tTotalSize)); + + UInt64 startPos = lzxInfo.GetFolderPos(folderIndex); + UInt64 finishPos = lastItem->Offset + lastItem->Size; + UInt64 limitFolderIndex = lzxInfo.GetFolder(finishPos); + + lastFolderIndex = m_Database.GetLastFolder(index); + UInt64 folderSize = lzxInfo.GetFolderSize(); + UInt64 unPackSize = folderSize; + if (extractStatuses.IsEmpty()) + chmFolderOutStream->m_StartIndex = index + 1; + else + chmFolderOutStream->m_StartIndex = index; + if (limitFolderIndex == folderIndex) + { + for (; i < numItems; i++) + { + UInt32 nextIndex = allFilesMode ? i : indices[i]; + int entryIndex = m_Database.Indices[nextIndex]; + const CItem &nextItem = m_Database.Items[entryIndex]; + if (nextItem.Section != sectionIndex) + break; + UInt64 nextFolderIndex = m_Database.GetFolder(nextIndex); + if (nextFolderIndex != folderIndex) + break; + for (index++; index < nextIndex; index++) + extractStatuses.Add(false); + extractStatuses.Add(true); + index = nextIndex; + lastItem = &nextItem; + if (nextItem.Size != 0) + finishPos = nextItem.Offset + nextItem.Size; + lastFolderIndex = m_Database.GetLastFolder(index); + } + } + unPackSize = MyMin(finishPos - startPos, unPackSize); + + chmFolderOutStream->m_FolderSize = folderSize; + chmFolderOutStream->m_PosInFolder = 0; + chmFolderOutStream->m_PosInSection = startPos; + chmFolderOutStream->m_ExtractStatuses = &extractStatuses; + chmFolderOutStream->m_NumFiles = extractStatuses.Size(); + chmFolderOutStream->m_CurrentIndex = 0; + try + { + UInt64 startBlock = lzxInfo.GetBlockIndexFromFolderIndex(folderIndex); + const CResetTable &rt = lzxInfo.ResetTable; + UInt32 numBlocks = (UInt32)rt.GetNumBlocks(unPackSize); + for (UInt32 b = 0; b < numBlocks; b++) + { + UInt64 completedSize = currentTotalSize + chmFolderOutStream->m_PosInSection - startPos; + RINOK(extractCallback->SetCompleted(&completedSize)); + UInt64 bCur = startBlock + b; + if (bCur >= rt.ResetOffsets.Size()) + return E_FAIL; + UInt64 offset = rt.ResetOffsets[(int)bCur]; + UInt64 compressedSize; + rt.GetCompressedSizeOfBlock(bCur, compressedSize); + UInt64 rem = finishPos - chmFolderOutStream->m_PosInSection; + if (rem > rt.BlockSize) + rem = rt.BlockSize; + RINOK(m_Stream->Seek(compressedPos + offset, STREAM_SEEK_SET, NULL)); + streamSpec->SetStream(m_Stream); + streamSpec->Init(compressedSize); + lzxDecoderSpec->SetKeepHistory(b > 0); + HRESULT res = lzxDecoder->Code(inStream, outStream, NULL, &rem, NULL); + if (res != S_OK) + { + if (res != S_FALSE) + return res; + throw 1; + } + } + } + catch(...) + { + RINOK(chmFolderOutStream->FlushCorrupted(unPackSize)); + } + currentTotalSize += folderSize; + if (folderIndex == lastFolderIndex) + break; + extractStatuses.Clear(); + } + } + return S_OK; + COM_TRY_END +} + +STDMETHODIMP CHandler::GetNumberOfItems(UInt32 *numItems) +{ + *numItems = m_Database.NewFormat ? 1: + (m_Database.LowLevel ? + m_Database.Items.Size(): + m_Database.Indices.Size()); + return S_OK; +} + +}} diff --git a/CPP/7zip/Archive/Chm/ChmHandler.h b/CPP/7zip/Archive/Chm/ChmHandler.h new file mode 100644 index 0000000..440c50f --- /dev/null +++ b/CPP/7zip/Archive/Chm/ChmHandler.h @@ -0,0 +1,29 @@ +// ChmHandler.h + +#ifndef __ARCHIVE_CHM_HANDLER_H +#define __ARCHIVE_CHM_HANDLER_H + +#include "Common/MyCom.h" +#include "../IArchive.h" +#include "ChmIn.h" + +namespace NArchive { +namespace NChm { + +class CHandler: + public IInArchive, + public CMyUnknownImp +{ +public: + MY_UNKNOWN_IMP1(IInArchive) + + INTERFACE_IInArchive(;) + +private: + CFilesDatabase m_Database; + CMyComPtr m_Stream; +}; + +}} + +#endif diff --git a/CPP/7zip/Archive/Chm/ChmHeader.cpp b/CPP/7zip/Archive/Chm/ChmHeader.cpp new file mode 100644 index 0000000..e8dc9f3 --- /dev/null +++ b/CPP/7zip/Archive/Chm/ChmHeader.cpp @@ -0,0 +1,24 @@ +// Archive/Chm/Header.h + +#include "StdAfx.h" + +#include "ChmHeader.h" + +namespace NArchive{ +namespace NChm{ +namespace NHeader{ + +UInt32 kItsfSignature = 0x46535449 + 1; +UInt32 kItolSignature = 0x4C4F5449 + 1; +static class CSignatureInitializer +{ +public: + CSignatureInitializer() + { + kItsfSignature--; + kItolSignature--; + } +}g_SignatureInitializer; + + +}}} diff --git a/CPP/7zip/Archive/Chm/ChmHeader.h b/CPP/7zip/Archive/Chm/ChmHeader.h new file mode 100644 index 0000000..9f1bd42 --- /dev/null +++ b/CPP/7zip/Archive/Chm/ChmHeader.h @@ -0,0 +1,28 @@ +// Archive/Chm/Header.h + +#ifndef __ARCHIVE_CHM_HEADER_H +#define __ARCHIVE_CHM_HEADER_H + +#include "Common/Types.h" + +namespace NArchive { +namespace NChm { +namespace NHeader{ + +const UInt32 kItspSignature = 0x50535449; +const UInt32 kPmglSignature = 0x4C474D50; +const UInt32 kLzxcSignature = 0x43585A4C; + +const UInt32 kIfcmSignature = 0x4D434649; +const UInt32 kAollSignature = 0x4C4C4F41; +const UInt32 kCaolSignature = 0x4C4F4143; + +extern UInt32 kItsfSignature; + +extern UInt32 kItolSignature; +const UInt32 kItlsSignature = 0x534C5449; +UInt64 inline GetHxsSignature() { return ((UInt64)kItlsSignature << 32) | kItolSignature; } + +}}} + +#endif diff --git a/CPP/7zip/Archive/Chm/ChmIn.cpp b/CPP/7zip/Archive/Chm/ChmIn.cpp new file mode 100644 index 0000000..d52b9ba --- /dev/null +++ b/CPP/7zip/Archive/Chm/ChmIn.cpp @@ -0,0 +1,937 @@ +// Archive/ChmIn.cpp + +#include "StdAfx.h" + +#include "Common/IntToString.h" +#include "Common/UTFConvert.h" + +#include "../../Common/LimitedStreams.h" + +#include "ChmIn.h" + +namespace NArchive { +namespace NChm { + +// define CHM_LOW, if you want to see low level items +// #define CHM_LOW + +static const GUID kChmLzxGuid = { 0x7FC28940, 0x9D31, 0x11D0, { 0x9B, 0x27, 0x00, 0xA0, 0xC9, 0x1E, 0x9C, 0x7C } }; +static const GUID kHelp2LzxGuid = { 0x0A9007C6, 0x4076, 0x11D3, { 0x87, 0x89, 0x00, 0x00, 0xF8, 0x10, 0x57, 0x54 } }; +static const GUID kDesGuid = { 0x67F6E4A2, 0x60BF, 0x11D3, { 0x85, 0x40, 0x00, 0xC0, 0x4F, 0x58, 0xC3, 0xCF } }; + +static bool AreGuidsEqual(REFGUID g1, REFGUID g2) +{ + if (g1.Data1 != g2.Data1 || + g1.Data2 != g2.Data2 || + g1.Data3 != g2.Data3) + return false; + for (int i = 0; i < 8; i++) + if (g1.Data4[i] != g2.Data4[i]) + return false; + return true; +} + +static char GetHex(Byte value) +{ + return (char)((value < 10) ? ('0' + value) : ('A' + (value - 10))); +} + +static void PrintByte(Byte b, AString &s) +{ + s += GetHex(b >> 4); + s += GetHex(b & 0xF); +} + +static void PrintUInt16(UInt16 v, AString &s) +{ + PrintByte((Byte)(v >> 8), s); + PrintByte((Byte)v, s); +} + +static void PrintUInt32(UInt32 v, AString &s) +{ + PrintUInt16((UInt16)(v >> 16), s); + PrintUInt16((UInt16)v, s); +} + +AString CMethodInfo::GetGuidString() const +{ + AString s; + s += '{'; + PrintUInt32(Guid.Data1, s); + s += '-'; + PrintUInt16(Guid.Data2, s); + s += '-'; + PrintUInt16(Guid.Data3, s); + s += '-'; + PrintByte(Guid.Data4[0], s); + PrintByte(Guid.Data4[1], s); + s += '-'; + for (int i = 2; i < 8; i++) + PrintByte(Guid.Data4[i], s); + s += '}'; + return s; +} + +bool CMethodInfo::IsLzx() const +{ + if (AreGuidsEqual(Guid, kChmLzxGuid)) + return true; + return AreGuidsEqual(Guid, kHelp2LzxGuid); +} + +bool CMethodInfo::IsDes() const +{ + return AreGuidsEqual(Guid, kDesGuid); +} + +UString CMethodInfo::GetName() const +{ + UString s; + if (IsLzx()) + { + s = L"LZX:"; + wchar_t temp[16]; + ConvertUInt32ToString(LzxInfo.GetNumDictBits(), temp); + s += temp; + } + else + { + AString s2; + if (IsDes()) + s2 = "DES"; + else + { + s2 = GetGuidString(); + if (ControlData.GetCapacity() > 0) + { + s2 += ':'; + for (size_t i = 0; i < ControlData.GetCapacity(); i++) + PrintByte(ControlData[i], s2); + } + } + ConvertUTF8ToUnicode(s2, s); + } + return s; +} + +bool CSectionInfo::IsLzx() const +{ + if (Methods.Size() != 1) + return false; + return Methods[0].IsLzx(); +} + +UString CSectionInfo::GetMethodName() const +{ + UString s; + if (!IsLzx()) + { + UString temp; + if (ConvertUTF8ToUnicode(Name, temp)) + s += temp; + s += L": "; + } + for (int i = 0; i < Methods.Size(); i++) + { + if (i != 0) + s += L' '; + s += Methods[i].GetName(); + } + return s; +} + +Byte CInArchive::ReadByte() +{ + Byte b; + if (!_inBuffer.ReadByte(b)) + throw 1; + return b; +} + +void CInArchive::Skip(size_t size) +{ + while (size-- != 0) + ReadByte(); +} + +void CInArchive::ReadBytes(Byte *data, UInt32 size) +{ + for (UInt32 i = 0; i < size; i++) + data[i] = ReadByte(); +} + +UInt16 CInArchive::ReadUInt16() +{ + UInt16 value = 0; + for (int i = 0; i < 2; i++) + value |= ((UInt16)(ReadByte()) << (8 * i)); + return value; +} + +UInt32 CInArchive::ReadUInt32() +{ + UInt32 value = 0; + for (int i = 0; i < 4; i++) + value |= ((UInt32)(ReadByte()) << (8 * i)); + return value; +} + +UInt64 CInArchive::ReadUInt64() +{ + UInt64 value = 0; + for (int i = 0; i < 8; i++) + value |= ((UInt64)(ReadByte()) << (8 * i)); + return value; +} + +UInt64 CInArchive::ReadEncInt() +{ + UInt64 val = 0;; + for (int i = 0; i < 10; i++) + { + Byte b = ReadByte(); + val |= (b & 0x7F); + if (b < 0x80) + return val; + val <<= 7; + } + throw 1; +} + +void CInArchive::ReadGUID(GUID &g) +{ + g.Data1 = ReadUInt32(); + g.Data2 = ReadUInt16(); + g.Data3 = ReadUInt16(); + ReadBytes(g.Data4, 8); +} + +void CInArchive::ReadString(int size, AString &s) +{ + s.Empty(); + while(size-- != 0) + { + char c = (char)ReadByte(); + if (c == 0) + { + Skip(size); + return; + } + s += c; + } +} + +void CInArchive::ReadUString(int size, UString &s) +{ + s.Empty(); + while(size-- != 0) + { + wchar_t c = ReadUInt16(); + if (c == 0) + { + Skip(2 * size); + return; + } + s += c; + } +} + +HRESULT CInArchive::ReadChunk(IInStream *inStream, UInt64 pos, UInt64 size) +{ + RINOK(inStream->Seek(pos, STREAM_SEEK_SET, NULL)); + CLimitedSequentialInStream *streamSpec = new CLimitedSequentialInStream; + CMyComPtr limitedStream(streamSpec); + streamSpec->SetStream(inStream); + streamSpec->Init(size); + _inBuffer.SetStream(limitedStream); + _inBuffer.Init(); + return S_OK; +} + +HRESULT CInArchive::ReadDirEntry(CDatabase &database) +{ + CItem item; + UInt64 nameLength = ReadEncInt(); + if (nameLength == 0 || nameLength >= 0x10000000) + return S_FALSE; + ReadString((int)nameLength, item.Name); + item.Section = ReadEncInt(); + item.Offset = ReadEncInt(); + item.Size = ReadEncInt(); + database.Items.Add(item); + return S_OK; +} + +HRESULT CInArchive::OpenChm(IInStream *inStream, CDatabase &database) +{ + UInt32 headerSize = ReadUInt32(); + if (headerSize != 0x60) + return S_FALSE; + UInt32 unknown1 = ReadUInt32(); + if (unknown1 != 0 && unknown1 != 1) // it's 0 in one .sll file + return S_FALSE; + /* UInt32 timeStamp = */ ReadUInt32(); + // Considered as a big-endian DWORD, it appears to contain seconds (MSB) and + // fractional seconds (second byte). + // The third and fourth bytes may contain even more fractional bits. + // The 4 least significant bits in the last byte are constant. + /* UInt32 lang = */ ReadUInt32(); + GUID g; + ReadGUID(g); // {7C01FD10-7BAA-11D0-9E0C-00A0-C922-E6EC} + ReadGUID(g); // {7C01FD11-7BAA-11D0-9E0C-00A0-C922-E6EC} + const int kNumSections = 2; + UInt64 sectionOffsets[kNumSections]; + UInt64 sectionSizes[kNumSections]; + int i; + for (i = 0; i < kNumSections; i++) + { + sectionOffsets[i] = ReadUInt64(); + sectionSizes[i] = ReadUInt64(); + } + // if (chmVersion == 3) + database.ContentOffset = ReadUInt64(); + /* + else + database.ContentOffset = _startPosition + 0x58 + */ + + /* + // Section 0 + ReadChunk(inStream, sectionOffsets[0], sectionSizes[0]); + if (sectionSizes[0] != 0x18) + return S_FALSE; + ReadUInt32(); // unknown: 01FE + ReadUInt32(); // unknown: 0 + UInt64 fileSize = ReadUInt64(); + ReadUInt32(); // unknown: 0 + ReadUInt32(); // unknown: 0 + */ + + // Section 1: The Directory Listing + ReadChunk(inStream, sectionOffsets[1], sectionSizes[1]); + if (ReadUInt32() != NHeader::kItspSignature) + return S_FALSE; + if (ReadUInt32() != 1) // version + return S_FALSE; + /* UInt32 dirHeaderSize = */ ReadUInt32(); + ReadUInt32(); // 0x0A (unknown) + UInt32 dirChunkSize = ReadUInt32(); // $1000 + if (dirChunkSize < 32) + return S_FALSE; + /* UInt32 density = */ ReadUInt32(); // "Density" of quickref section, usually 2. + /* UInt32 depth = */ ReadUInt32(); // Depth of the index tree: 1 there is no index, + // 2 if there is one level of PMGI chunks. + + /* UInt32 chunkNumber = */ ReadUInt32(); // Chunk number of root index chunk, -1 if there is none + // (though at least one file has 0 despite there being no + // index chunk, probably a bug.) + /* UInt32 firstPmglChunkNumber = */ ReadUInt32(); // Chunk number of first PMGL (listing) chunk + /* UInt32 lastPmglChunkNumber = */ ReadUInt32(); // Chunk number of last PMGL (listing) chunk + ReadUInt32(); // -1 (unknown) + UInt32 numDirChunks = ReadUInt32(); // Number of directory chunks (total) + /* UInt32 windowsLangId = */ ReadUInt32(); + ReadGUID(g); // {5D02926A-212E-11D0-9DF9-00A0C922E6EC} + ReadUInt32(); // 0x54 (This is the length again) + ReadUInt32(); // -1 (unknown) + ReadUInt32(); // -1 (unknown) + ReadUInt32(); // -1 (unknown) + + for (UInt32 ci = 0; ci < numDirChunks; ci++) + { + UInt64 chunkPos = _inBuffer.GetProcessedSize(); + if (ReadUInt32() == NHeader::kPmglSignature) + { + // The quickref area is written backwards from the end of the chunk. + // One quickref entry exists for every n entries in the file, where n + // is calculated as 1 + (1 << quickref density). So for density = 2, n = 5. + + UInt32 quickrefLength = ReadUInt32(); // Length of free space and/or quickref area at end of directory chunk + if (quickrefLength > dirChunkSize || quickrefLength < 2) + return S_FALSE; + ReadUInt32(); // Always 0 + ReadUInt32(); // Chunk number of previous listing chunk when reading + // directory in sequence (-1 if this is the first listing chunk) + ReadUInt32(); // Chunk number of next listing chunk when reading + // directory in sequence (-1 if this is the last listing chunk) + int numItems = 0; + for (;;) + { + UInt64 offset = _inBuffer.GetProcessedSize() - chunkPos; + UInt32 offsetLimit = dirChunkSize - quickrefLength; + if (offset > offsetLimit) + return S_FALSE; + if (offset == offsetLimit) + break; + RINOK(ReadDirEntry(database)); + numItems++; + } + Skip(quickrefLength - 2); + if (ReadUInt16() != numItems) + return S_FALSE; + } + else + Skip(dirChunkSize - 4); + } + return S_OK; +} + +HRESULT CInArchive::OpenHelp2(IInStream *inStream, CDatabase &database) +{ + if (ReadUInt32() != 1) // version + return S_FALSE; + if (ReadUInt32() != 0x28) // Location of header section table + return S_FALSE; + UInt32 numHeaderSections = ReadUInt32(); + const int kNumHeaderSectionsMax = 5; + if (numHeaderSections != kNumHeaderSectionsMax) + return S_FALSE; + ReadUInt32(); // Length of post-header table + GUID g; + ReadGUID(g); // {0A9007C1-4076-11D3-8789-0000F8105754} + + // header section table + UInt64 sectionOffsets[kNumHeaderSectionsMax]; + UInt64 sectionSizes[kNumHeaderSectionsMax]; + UInt32 i; + for (i = 0; i < numHeaderSections; i++) + { + sectionOffsets[i] = ReadUInt64(); + sectionSizes[i] = ReadUInt64(); + } + + // Post-Header + ReadUInt32(); // 2 + ReadUInt32(); // 0x98: offset to CAOL from beginning of post-header) + // ----- Directory information + ReadUInt64(); // Chunk number of top-level AOLI chunk in directory, or -1 + ReadUInt64(); // Chunk number of first AOLL chunk in directory + ReadUInt64(); // Chunk number of last AOLL chunk in directory + ReadUInt64(); // 0 (unknown) + ReadUInt32(); // $2000 (Directory chunk size of directory) + ReadUInt32(); // Quickref density for main directory, usually 2 + ReadUInt32(); // 0 (unknown) + ReadUInt32(); // Depth of main directory index tree + // 1 there is no index, 2 if there is one level of AOLI chunks. + ReadUInt64(); // 0 (unknown) + UInt64 numDirEntries = ReadUInt64(); // Number of directory entries + // ----- Directory Index Information + ReadUInt64(); // -1 (unknown, probably chunk number of top-level AOLI in directory index) + ReadUInt64(); // Chunk number of first AOLL chunk in directory index + ReadUInt64(); // Chunk number of last AOLL chunk in directory index + ReadUInt64(); // 0 (unknown) + ReadUInt32(); // $200 (Directory chunk size of directory index) + ReadUInt32(); // Quickref density for directory index, usually 2 + ReadUInt32(); // 0 (unknown) + ReadUInt32(); // Depth of directory index index tree. + ReadUInt64(); // Possibly flags -- sometimes 1, sometimes 0. + ReadUInt64(); // Number of directory index entries (same as number of AOLL + // chunks in main directory) + + // (The obvious guess for the following two fields, which recur in a number + // of places, is they are maximum sizes for the directory and directory index. + // However, I have seen no direct evidence that this is the case.) + + ReadUInt32(); // $100000 (Same as field following chunk size in directory) + ReadUInt32(); // $20000 (Same as field following chunk size in directory index) + + ReadUInt64(); // 0 (unknown) + if (ReadUInt32() != NHeader::kCaolSignature) + return S_FALSE; + if (ReadUInt32() != 2) // (Most likely a version number) + return S_FALSE; + UInt32 caolLength = ReadUInt32(); // $50 (Length of the CAOL section, which includes the ITSF section) + if (caolLength >= 0x2C) + { + /* UInt32 c7 = */ ReadUInt16(); // Unknown. Remains the same when identical files are built. + // Does not appear to be a checksum. Many files have + // 'HH' (HTML Help?) here, indicating this may be a compiler ID + // field. But at least one ITOL/ITLS compiler does not set this + // field to a constant value. + ReadUInt16(); // 0 (Unknown. Possibly part of 00A4 field) + ReadUInt32(); // Unknown. Two values have been seen -- $43ED, and 0. + ReadUInt32(); // $2000 (Directory chunk size of directory) + ReadUInt32(); // $200 (Directory chunk size of directory index) + ReadUInt32(); // $100000 (Same as field following chunk size in directory) + ReadUInt32(); // $20000 (Same as field following chunk size in directory index) + ReadUInt32(); // 0 (unknown) + ReadUInt32(); // 0 (Unknown) + if (caolLength == 0x2C) + { + database.ContentOffset = 0; + database.NewFormat = true; + } + else if (caolLength == 0x50) + { + ReadUInt32(); // 0 (Unknown) + if (ReadUInt32() != NHeader::kItsfSignature) + return S_FALSE; + if (ReadUInt32() != 4) // $4 (Version number -- CHM uses 3) + return S_FALSE; + if (ReadUInt32() != 0x20) // $20 (length of ITSF) + return S_FALSE; + UInt32 unknown = ReadUInt32(); + if (unknown != 0 && unknown != 1) // = 0 for some HxW files, 1 in other cases; + return S_FALSE; + database.ContentOffset = _startPosition + ReadUInt64(); + /* UInt32 timeStamp = */ ReadUInt32(); + // A timestamp of some sort. + // Considered as a big-endian DWORD, it appears to contain + // seconds (MSB) and fractional seconds (second byte). + // The third and fourth bytes may contain even more fractional + // bits. The 4 least significant bits in the last byte are constant. + /* UInt32 lang = */ ReadUInt32(); // BE? + } + else + return S_FALSE; + } + + /* + // Section 0 + ReadChunk(inStream, _startPosition + sectionOffsets[0], sectionSizes[0]); + if (sectionSizes[0] != 0x18) + return S_FALSE; + ReadUInt32(); // unknown: 01FE + ReadUInt32(); // unknown: 0 + UInt64 fileSize = ReadUInt64(); + ReadUInt32(); // unknown: 0 + ReadUInt32(); // unknown: 0 + */ + + // Section 1: The Directory Listing + ReadChunk(inStream, _startPosition + sectionOffsets[1], sectionSizes[1]); + if (ReadUInt32() != NHeader::kIfcmSignature) + return S_FALSE; + if (ReadUInt32() != 1) // (probably a version number) + return S_FALSE; + UInt32 dirChunkSize = ReadUInt32(); // $2000 + if (dirChunkSize < 64) + return S_FALSE; + ReadUInt32(); // $100000 (unknown) + ReadUInt32(); // -1 (unknown) + ReadUInt32(); // -1 (unknown) + UInt32 numDirChunks = ReadUInt32(); + ReadUInt32(); // 0 (unknown, probably high word of above) + + for (UInt32 ci = 0; ci < numDirChunks; ci++) + { + UInt64 chunkPos = _inBuffer.GetProcessedSize(); + if (ReadUInt32() == NHeader::kAollSignature) + { + UInt32 quickrefLength = ReadUInt32(); // Length of quickref area at end of directory chunk + if (quickrefLength > dirChunkSize || quickrefLength < 2) + return S_FALSE; + ReadUInt64(); // Directory chunk number + // This must match physical position in file, that is + // the chunk size times the chunk number must be the + // offset from the end of the directory header. + ReadUInt64(); // Chunk number of previous listing chunk when reading + // directory in sequence (-1 if first listing chunk) + ReadUInt64(); // Chunk number of next listing chunk when reading + // directory in sequence (-1 if last listing chunk) + ReadUInt64(); // Number of first listing entry in this chunk + ReadUInt32(); // 1 (unknown -- other values have also been seen here) + ReadUInt32(); // 0 (unknown) + + int numItems = 0; + for (;;) + { + UInt64 offset = _inBuffer.GetProcessedSize() - chunkPos; + UInt32 offsetLimit = dirChunkSize - quickrefLength; + if (offset > offsetLimit) + return S_FALSE; + if (offset == offsetLimit) + break; + if (database.NewFormat) + { + UInt16 nameLength = ReadUInt16(); + if (nameLength == 0) + return S_FALSE; + UString name; + ReadUString((int)nameLength, name); + AString s; + ConvertUnicodeToUTF8(name, s); + Byte b = ReadByte(); + s += ' '; + PrintByte(b, s); + s += ' '; + UInt64 len = ReadEncInt(); + // then number of items ? + // then length ? + // then some data (binary encoding?) + while (len-- != 0) + { + b = ReadByte(); + PrintByte(b, s); + } + database.NewFormatString += s; + database.NewFormatString += "\r\n"; + } + else + { + RINOK(ReadDirEntry(database)); + } + numItems++; + } + Skip(quickrefLength - 2); + if (ReadUInt16() != numItems) + return S_FALSE; + if (numItems > numDirEntries) + return S_FALSE; + numDirEntries -= numItems; + } + else + Skip(dirChunkSize - 4); + } + return numDirEntries == 0 ? S_OK : S_FALSE; +} + +HRESULT CInArchive::DecompressStream(IInStream *inStream, const CDatabase &database, const AString &name) +{ + int index = database.FindItem(name); + if (index < 0) + return S_FALSE; + const CItem &item = database.Items[index]; + _chunkSize = item.Size; + return ReadChunk(inStream, database.ContentOffset + item.Offset, item.Size); +} + + +#define DATA_SPACE "::DataSpace/" +static const char *kNameList = DATA_SPACE "NameList"; +static const char *kStorage = DATA_SPACE "Storage/"; +static const char *kContent = "Content"; +static const char *kControlData = "ControlData"; +static const char *kSpanInfo = "SpanInfo"; +static const char *kTransform = "Transform/"; +static const char *kResetTable = "/InstanceData/ResetTable"; +static const char *kTransformList = "List"; + +static AString GetSectionPrefix(const AString &name) +{ + return AString(kStorage) + name + AString("/"); +} + +#define RINOZ(x) { int __tt = (x); if (__tt != 0) return __tt; } + +static int CompareFiles(const int *p1, const int *p2, void *param) +{ + const CObjectVector &items = *(const CObjectVector *)param; + const CItem &item1 = items[*p1]; + const CItem &item2 = items[*p2]; + bool isDir1 = item1.IsDir(); + bool isDir2 = item2.IsDir(); + if (isDir1 && !isDir2) + return -1; + if (isDir2) + { + if (isDir1) + return MyCompare(*p1, *p2); + return 1; + } + RINOZ(MyCompare(item1.Section, item2.Section)); + RINOZ(MyCompare(item1.Offset, item2.Offset)); + RINOZ(MyCompare(item1.Size, item2.Size)); + return MyCompare(*p1, *p2); +} + +void CFilesDatabase::SetIndices() +{ + for (int i = 0; i < Items.Size(); i++) + { + const CItem &item = Items[i]; + if (item.IsUserItem() && item.Name.Length() != 1) + Indices.Add(i); + } +} + +void CFilesDatabase::Sort() +{ + Indices.Sort(CompareFiles, (void *)&Items); +} + +bool CFilesDatabase::Check() +{ + UInt64 maxPos = 0; + UInt64 prevSection = 0; + for(int i = 0; i < Indices.Size(); i++) + { + const CItem &item = Items[Indices[i]]; + if (item.Section == 0 || item.IsDir()) + continue; + if (item.Section != prevSection) + { + prevSection = item.Section; + maxPos = 0; + continue; + } + if (item.Offset < maxPos) + return false; + maxPos = item.Offset + item.Size; + if (maxPos < item.Offset) + return false; + } + return true; +} + +HRESULT CInArchive::OpenHighLevel(IInStream *inStream, CFilesDatabase &database) +{ + { + // The NameList file + RINOK(DecompressStream(inStream, database, kNameList)); + /* UInt16 length = */ ReadUInt16(); + UInt16 numSections = ReadUInt16(); + for (int i = 0; i < numSections; i++) + { + CSectionInfo section; + UInt16 nameLength = ReadUInt16(); + UString name; + ReadUString(nameLength, name); + if (ReadUInt16() != 0) + return S_FALSE; + if (!ConvertUnicodeToUTF8(name, section.Name)) + return S_FALSE; + database.Sections.Add(section); + } + } + + int i; + for (i = 1; i < database.Sections.Size(); i++) + { + CSectionInfo §ion = database.Sections[i]; + AString sectionPrefix = GetSectionPrefix(section.Name); + { + // Content + int index = database.FindItem(sectionPrefix + kContent); + if (index < 0) + return S_FALSE; + const CItem &item = database.Items[index]; + section.Offset = item.Offset; + section.CompressedSize = item.Size; + } + AString transformPrefix = sectionPrefix + kTransform; + if (database.Help2Format) + { + // Transform List + RINOK(DecompressStream(inStream, database, transformPrefix + kTransformList)); + if ((_chunkSize & 0xF) != 0) + return S_FALSE; + int numGuids = (int)(_chunkSize / 0x10); + if (numGuids < 1) + return S_FALSE; + for (int i = 0; i < numGuids; i++) + { + CMethodInfo method; + ReadGUID(method.Guid); + section.Methods.Add(method); + } + } + else + { + CMethodInfo method; + method.Guid = kChmLzxGuid; + section.Methods.Add(method); + } + + { + // Control Data + RINOK(DecompressStream(inStream, database, sectionPrefix + kControlData)); + for (int mi = 0; mi < section.Methods.Size(); mi++) + { + CMethodInfo &method = section.Methods[mi]; + UInt32 numDWORDS = ReadUInt32(); + if (method.IsLzx()) + { + if (numDWORDS < 5) + return S_FALSE; + if (ReadUInt32() != NHeader::kLzxcSignature) + return S_FALSE; + CLzxInfo &li = method.LzxInfo; + li.Version = ReadUInt32(); + if (li.Version != 2 && li.Version != 3) + return S_FALSE; + li.ResetInterval = ReadUInt32(); + li.WindowSize = ReadUInt32(); + li.CacheSize = ReadUInt32(); + if ( + li.ResetInterval != 1 && + li.ResetInterval != 2 && + li.ResetInterval != 4 && + li.ResetInterval != 8 && + li.ResetInterval != 16 && + li.ResetInterval != 32 && + li.ResetInterval != 64) + return S_FALSE; + if ( + li.WindowSize != 1 && + li.WindowSize != 2 && + li.WindowSize != 4 && + li.WindowSize != 8 && + li.WindowSize != 16 && + li.WindowSize != 32 && + li.WindowSize != 64) + return S_FALSE; + numDWORDS -= 5; + while (numDWORDS-- != 0) + ReadUInt32(); + } + else + { + UInt32 numBytes = numDWORDS * 4; + method.ControlData.SetCapacity(numBytes); + ReadBytes(method.ControlData, numBytes); + } + } + } + + { + // SpanInfo + RINOK(DecompressStream(inStream, database, sectionPrefix + kSpanInfo)); + section.UncompressedSize = ReadUInt64(); + } + + // read ResetTable for LZX + for (int mi = 0; mi < section.Methods.Size(); mi++) + { + CMethodInfo &method = section.Methods[mi]; + if (method.IsLzx()) + { + // ResetTable; + RINOK(DecompressStream(inStream, database, transformPrefix + + method.GetGuidString() + kResetTable)); + CResetTable &rt = method.LzxInfo.ResetTable; + if (_chunkSize < 4) + { + if (_chunkSize != 0) + return S_FALSE; + // ResetTable is empty in .chw files + if (section.UncompressedSize != 0) + return S_FALSE; + rt.UncompressedSize = 0; + rt.CompressedSize = 0; + rt.BlockSize = 0; + } + else + { + UInt32 ver = ReadUInt32(); // 2 unknown (possibly a version number) + if (ver != 2 && ver != 3) + return S_FALSE; + UInt32 numEntries = ReadUInt32(); + if (ReadUInt32() != 8) // Size of table entry (bytes) + return S_FALSE; + if (ReadUInt32() != 0x28) // Length of table header + return S_FALSE; + rt.UncompressedSize = ReadUInt64(); + rt.CompressedSize = ReadUInt64(); + rt.BlockSize = ReadUInt64(); // 0x8000 block size for locations below + if (rt.BlockSize != 0x8000) + return S_FALSE; + rt.ResetOffsets.Reserve(numEntries); + for (UInt32 i = 0; i < numEntries; i++) + rt.ResetOffsets.Add(ReadUInt64()); + } + } + } + } + + database.SetIndices(); + database.Sort(); + return database.Check() ? S_OK : S_FALSE; +} + +HRESULT CInArchive::Open2(IInStream *inStream, + const UInt64 *searchHeaderSizeLimit, + CFilesDatabase &database) +{ + database.Clear(); + + RINOK(inStream->Seek(0, STREAM_SEEK_CUR, &_startPosition)); + + database.Help2Format = false; + const UInt32 chmVersion = 3; + { + if (!_inBuffer.Create(1 << 14)) + return E_OUTOFMEMORY; + _inBuffer.SetStream(inStream); + _inBuffer.Init(); + UInt64 value = 0; + const int kSignatureSize = 8; + UInt64 hxsSignature = NHeader::GetHxsSignature(); + UInt64 chmSignature = ((UInt64)chmVersion << 32)| NHeader::kItsfSignature; + UInt64 limit = 1 << 18; + if (searchHeaderSizeLimit) + if (limit > *searchHeaderSizeLimit) + limit = *searchHeaderSizeLimit; + + for (;;) + { + Byte b; + if (!_inBuffer.ReadByte(b)) + return S_FALSE; + value >>= 8; + value |= ((UInt64)b) << ((kSignatureSize - 1) * 8); + if (_inBuffer.GetProcessedSize() >= kSignatureSize) + { + if (value == chmSignature) + break; + if (value == hxsSignature) + { + database.Help2Format = true; + break; + } + if (_inBuffer.GetProcessedSize() > limit) + return S_FALSE; + } + } + _startPosition += _inBuffer.GetProcessedSize() - kSignatureSize; + } + + if (database.Help2Format) + { + RINOK(OpenHelp2(inStream, database)); + if (database.NewFormat) + return S_OK; + } + else + { + RINOK(OpenChm(inStream, database)); + } + + #ifndef CHM_LOW + try + { + HRESULT res = OpenHighLevel(inStream, database); + if (res == S_FALSE) + { + database.HighLevelClear(); + return S_OK; + } + RINOK(res); + database.LowLevel = false; + } + catch(...) + { + return S_OK; + } + #endif + return S_OK; +} + +HRESULT CInArchive::Open(IInStream *inStream, + const UInt64 *searchHeaderSizeLimit, + CFilesDatabase &database) +{ + try + { + HRESULT res = Open2(inStream, searchHeaderSizeLimit, database); + _inBuffer.ReleaseStream(); + return res; + } + catch(...) + { + _inBuffer.ReleaseStream(); + throw; + } +} + +}} diff --git a/CPP/7zip/Archive/Chm/ChmIn.h b/CPP/7zip/Archive/Chm/ChmIn.h new file mode 100644 index 0000000..4719a48 --- /dev/null +++ b/CPP/7zip/Archive/Chm/ChmIn.h @@ -0,0 +1,244 @@ +// Archive/ChmIn.h + +#ifndef __ARCHIVE_CHM_IN_H +#define __ARCHIVE_CHM_IN_H + +#include "Common/Buffer.h" +#include "Common/MyString.h" + +#include "../../IStream.h" +#include "../../Common/InBuffer.h" + +#include "ChmHeader.h" + +namespace NArchive { +namespace NChm { + +struct CItem +{ + UInt64 Section; + UInt64 Offset; + UInt64 Size; + AString Name; + + bool IsFormatRelatedItem() const + { + if (Name.Length() < 2) + return false; + return Name[0] == ':' && Name[1] == ':'; + } + + bool IsUserItem() const + { + if (Name.Length() < 2) + return false; + return Name[0] == '/'; + } + + bool IsDir() const + { + if (Name.Length() == 0) + return false; + return (Name[Name.Length() - 1] == '/'); + } +}; + +struct CDatabase +{ + UInt64 ContentOffset; + CObjectVector Items; + AString NewFormatString; + bool Help2Format; + bool NewFormat; + + int FindItem(const AString &name) const + { + for (int i = 0; i < Items.Size(); i++) + if (Items[i].Name == name) + return i; + return -1; + } + + void Clear() + { + NewFormat = false; + NewFormatString.Empty(); + Help2Format = false; + Items.Clear(); + } +}; + +struct CResetTable +{ + UInt64 UncompressedSize; + UInt64 CompressedSize; + UInt64 BlockSize; + CRecordVector ResetOffsets; + bool GetCompressedSizeOfBlocks(UInt64 blockIndex, UInt32 numBlocks, UInt64 &size) const + { + if (blockIndex >= ResetOffsets.Size()) + return false; + UInt64 startPos = ResetOffsets[(int)blockIndex]; + if (blockIndex + numBlocks >= ResetOffsets.Size()) + size = CompressedSize - startPos; + else + size = ResetOffsets[(int)(blockIndex + numBlocks)] - startPos; + return true; + } + bool GetCompressedSizeOfBlock(UInt64 blockIndex, UInt64 &size) const + { + return GetCompressedSizeOfBlocks(blockIndex, 1, size); + } + UInt64 GetNumBlocks(UInt64 size) const + { + return (size + BlockSize - 1) / BlockSize; + } +}; + +struct CLzxInfo +{ + UInt32 Version; + UInt32 ResetInterval; + UInt32 WindowSize; + UInt32 CacheSize; + CResetTable ResetTable; + + UInt32 GetNumDictBits() const + { + if (Version == 2 || Version == 3) + { + for (int i = 0; i <= 31; i++) + if (((UInt32)1 << i) >= WindowSize) + return 15 + i; + } + return 0; + } + + UInt64 GetFolderSize() const { return ResetTable.BlockSize * ResetInterval; }; + UInt64 GetFolder(UInt64 offset) const { return offset / GetFolderSize(); }; + UInt64 GetFolderPos(UInt64 folderIndex) const { return folderIndex * GetFolderSize(); }; + UInt64 GetBlockIndexFromFolderIndex(UInt64 folderIndex) const { return folderIndex * ResetInterval; }; + bool GetOffsetOfFolder(UInt64 folderIndex, UInt64 &offset) const + { + UInt64 blockIndex = GetBlockIndexFromFolderIndex(folderIndex); + if (blockIndex >= ResetTable.ResetOffsets.Size()) + return false; + offset = ResetTable.ResetOffsets[(int)blockIndex]; + return true; + } + bool GetCompressedSizeOfFolder(UInt64 folderIndex, UInt64 &size) const + { + UInt64 blockIndex = GetBlockIndexFromFolderIndex(folderIndex); + return ResetTable.GetCompressedSizeOfBlocks(blockIndex, ResetInterval, size); + } +}; + +struct CMethodInfo +{ + GUID Guid; + CByteBuffer ControlData; + CLzxInfo LzxInfo; + bool IsLzx() const; + bool IsDes() const; + AString GetGuidString() const; + UString GetName() const; +}; + +struct CSectionInfo +{ + UInt64 Offset; + UInt64 CompressedSize; + UInt64 UncompressedSize; + + AString Name; + CObjectVector Methods; + + bool IsLzx() const; + UString GetMethodName() const; +}; + +class CFilesDatabase: public CDatabase +{ +public: + bool LowLevel; + CRecordVector Indices; + CObjectVector Sections; + + UInt64 GetFileSize(int fileIndex) const { return Items[Indices[fileIndex]].Size; } + UInt64 GetFileOffset(int fileIndex) const { return Items[Indices[fileIndex]].Offset; } + + UInt64 GetFolder(int fileIndex) const + { + const CItem &item = Items[Indices[fileIndex]]; + const CSectionInfo §ion = Sections[(int)item.Section]; + if (section.IsLzx()) + return section.Methods[0].LzxInfo.GetFolder(item.Offset); + return 0; + } + + UInt64 GetLastFolder(int fileIndex) const + { + const CItem &item = Items[Indices[fileIndex]]; + const CSectionInfo §ion = Sections[(int)item.Section]; + if (section.IsLzx()) + return section.Methods[0].LzxInfo.GetFolder(item.Offset + item.Size - 1); + return 0; + } + + void HighLevelClear() + { + LowLevel = true; + Indices.Clear(); + Sections.Clear(); + } + + void Clear() + { + CDatabase::Clear(); + HighLevelClear(); + } + void SetIndices(); + void Sort(); + bool Check(); +}; + +class CProgressVirt +{ +public: + STDMETHOD(SetTotal)(const UInt64 *numFiles) PURE; + STDMETHOD(SetCompleted)(const UInt64 *numFiles) PURE; +}; + +class CInArchive +{ + UInt64 _startPosition; + ::CInBuffer _inBuffer; + UInt64 _chunkSize; + + Byte ReadByte(); + void ReadBytes(Byte *data, UInt32 size); + void Skip(size_t size); + UInt16 ReadUInt16(); + UInt32 ReadUInt32(); + UInt64 ReadUInt64(); + UInt64 ReadEncInt(); + void ReadString(int size, AString &s); + void ReadUString(int size, UString &s); + void ReadGUID(GUID &g); + + HRESULT ReadChunk(IInStream *inStream, UInt64 pos, UInt64 size); + + HRESULT ReadDirEntry(CDatabase &database); + HRESULT DecompressStream(IInStream *inStream, const CDatabase &database, const AString &name); + +public: + HRESULT OpenChm(IInStream *inStream, CDatabase &database); + HRESULT OpenHelp2(IInStream *inStream, CDatabase &database); + HRESULT OpenHighLevel(IInStream *inStream, CFilesDatabase &database); + HRESULT Open2(IInStream *inStream, const UInt64 *searchHeaderSizeLimit, CFilesDatabase &database); + HRESULT Open(IInStream *inStream, const UInt64 *searchHeaderSizeLimit, CFilesDatabase &database); +}; + +}} + +#endif diff --git a/CPP/7zip/Archive/Chm/ChmRegister.cpp b/CPP/7zip/Archive/Chm/ChmRegister.cpp new file mode 100644 index 0000000..e5f38af --- /dev/null +++ b/CPP/7zip/Archive/Chm/ChmRegister.cpp @@ -0,0 +1,13 @@ +// ChmRegister.cpp + +#include "StdAfx.h" + +#include "../../Common/RegisterArc.h" + +#include "ChmHandler.h" +static IInArchive *CreateArc() { return new NArchive::NChm::CHandler; } + +static CArcInfo g_ArcInfo = + { L"Chm", L"chm chi chq chw hxs hxi hxr hxq hxw lit", 0, 0xE9, { 'I', 'T', 'S', 'F' }, 4, false, CreateArc, 0 }; + +REGISTER_ARC(Chm) diff --git a/CPP/7zip/Archive/Com/ComHandler.cpp b/CPP/7zip/Archive/Com/ComHandler.cpp new file mode 100644 index 0000000..58f7643 --- /dev/null +++ b/CPP/7zip/Archive/Com/ComHandler.cpp @@ -0,0 +1,239 @@ +// ComHandler.cpp + +#include "StdAfx.h" + +#include "Common/ComTry.h" + +#include "Windows/PropVariant.h" + +#include "../../Common/LimitedStreams.h" +#include "../../Common/ProgressUtils.h" +#include "../../Common/StreamUtils.h" + +#include "../../Compress/CopyCoder.h" + +#include "ComHandler.h" + +namespace NArchive { +namespace NCom { + +STATPROPSTG kProps[] = +{ + { NULL, kpidPath, VT_BSTR}, + { NULL, kpidIsDir, VT_BOOL}, + { NULL, kpidSize, VT_UI8}, + { NULL, kpidPackSize, VT_UI8}, + { NULL, kpidCTime, VT_FILETIME}, + { NULL, kpidMTime, VT_FILETIME} +}; + +STATPROPSTG kArcProps[] = +{ + { NULL, kpidClusterSize, VT_UI4}, + { NULL, kpidSectorSize, VT_UI4} +}; + +IMP_IInArchive_Props +IMP_IInArchive_ArcProps + +STDMETHODIMP CHandler::GetArchiveProperty(PROPID propID, PROPVARIANT *value) +{ + COM_TRY_BEGIN + NWindows::NCOM::CPropVariant prop; + switch(propID) + { + case kpidClusterSize: prop = (UInt32)1 << _db.SectorSizeBits; break; + case kpidSectorSize: prop = (UInt32)1 << _db.MiniSectorSizeBits; break; + case kpidMainSubfile: if (_db.MainSubfile >= 0) prop = (UInt32)_db.MainSubfile; break; + } + prop.Detach(value); + return S_OK; + COM_TRY_END +} + +STDMETHODIMP CHandler::GetProperty(UInt32 index, PROPID propID, PROPVARIANT *value) +{ + COM_TRY_BEGIN + NWindows::NCOM::CPropVariant prop; + const CRef &ref = _db.Refs[index]; + const CItem &item = _db.Items[ref.Did]; + + switch(propID) + { + case kpidPath: prop = _db.GetItemPath(index); break; + case kpidIsDir: prop = item.IsDir(); break; + case kpidCTime: prop = item.CTime; break; + case kpidMTime: prop = item.MTime; break; + case kpidPackSize: if (!item.IsDir()) prop = _db.GetItemPackSize(item.Size); break; + case kpidSize: if (!item.IsDir()) prop = item.Size; break; + } + prop.Detach(value); + return S_OK; + COM_TRY_END +} + +STDMETHODIMP CHandler::Open(IInStream *inStream, + const UInt64 * /* maxCheckStartPosition */, + IArchiveOpenCallback * /* openArchiveCallback */) +{ + COM_TRY_BEGIN + Close(); + try + { + if (_db.Open(inStream) != S_OK) + return S_FALSE; + _stream = inStream; + } + catch(...) { return S_FALSE; } + return S_OK; + COM_TRY_END +} + +STDMETHODIMP CHandler::Close() +{ + _db.Clear(); + _stream.Release(); + return S_OK; +} + +STDMETHODIMP CHandler::Extract(const UInt32 *indices, UInt32 numItems, + Int32 testMode, IArchiveExtractCallback *extractCallback) +{ + COM_TRY_BEGIN + bool allFilesMode = (numItems == (UInt32)-1); + if (allFilesMode) + numItems = _db.Refs.Size(); + if (numItems == 0) + return S_OK; + UInt32 i; + UInt64 totalSize = 0; + for(i = 0; i < numItems; i++) + { + const CItem &item = _db.Items[_db.Refs[allFilesMode ? i : indices[i]].Did]; + if (!item.IsDir()) + totalSize += item.Size; + } + RINOK(extractCallback->SetTotal(totalSize)); + + UInt64 totalPackSize; + totalSize = totalPackSize = 0; + + NCompress::CCopyCoder *copyCoderSpec = new NCompress::CCopyCoder(); + CMyComPtr copyCoder = copyCoderSpec; + + CLocalProgress *lps = new CLocalProgress; + CMyComPtr progress = lps; + lps->Init(extractCallback, false); + + for (i = 0; i < numItems; i++) + { + lps->InSize = totalPackSize; + lps->OutSize = totalSize; + RINOK(lps->SetCur()); + Int32 index = allFilesMode ? i : indices[i]; + const CItem &item = _db.Items[_db.Refs[index].Did]; + + CMyComPtr outStream; + Int32 askMode = testMode ? + NExtract::NAskMode::kTest : + NExtract::NAskMode::kExtract; + RINOK(extractCallback->GetStream(index, &outStream, askMode)); + + if (item.IsDir()) + { + RINOK(extractCallback->PrepareOperation(askMode)); + RINOK(extractCallback->SetOperationResult(NExtract::NOperationResult::kOK)); + continue; + } + + totalPackSize += _db.GetItemPackSize(item.Size); + totalSize += item.Size; + + if (!testMode && !outStream) + continue; + RINOK(extractCallback->PrepareOperation(askMode)); + Int32 res = NExtract::NOperationResult::kDataError; + CMyComPtr inStream; + HRESULT hres = GetStream(index, &inStream); + if (hres == S_FALSE) + res = NExtract::NOperationResult::kDataError; + else if (hres == E_NOTIMPL) + res = NExtract::NOperationResult::kUnSupportedMethod; + else + { + RINOK(hres); + if (inStream) + { + RINOK(copyCoder->Code(inStream, outStream, NULL, NULL, progress)); + if (copyCoderSpec->TotalSize == item.Size) + res = NExtract::NOperationResult::kOK; + } + } + outStream.Release(); + RINOK(extractCallback->SetOperationResult(res)); + } + return S_OK; + COM_TRY_END +} + +STDMETHODIMP CHandler::GetNumberOfItems(UInt32 *numItems) +{ + *numItems = _db.Refs.Size(); + return S_OK; +} + +STDMETHODIMP CHandler::GetStream(UInt32 index, ISequentialInStream **stream) +{ + COM_TRY_BEGIN + *stream = 0; + const CItem &item = _db.Items[_db.Refs[index].Did]; + CClusterInStream *streamSpec = new CClusterInStream; + CMyComPtr streamTemp = streamSpec; + streamSpec->Stream = _stream; + streamSpec->StartOffset = 0; + + bool isLargeStream = _db.IsLargeStream(item.Size); + int bsLog = isLargeStream ? _db.SectorSizeBits : _db.MiniSectorSizeBits; + streamSpec->BlockSizeLog = bsLog; + streamSpec->Size = item.Size; + + UInt32 clusterSize = (UInt32)1 << bsLog; + UInt64 numClusters64 = (item.Size + clusterSize - 1) >> bsLog; + if (numClusters64 >= ((UInt32)1 << 31)) + return E_NOTIMPL; + streamSpec->Vector.Reserve((int)numClusters64); + UInt32 sid = item.Sid; + UInt64 size = item.Size; + + if (size != 0) + { + for (;; size -= clusterSize) + { + if (isLargeStream) + { + if (sid >= _db.FatSize) + return S_FALSE; + streamSpec->Vector.Add(sid + 1); + sid = _db.Fat[sid]; + } + else + { + UInt64 val; + if (sid >= _db.MatSize || !_db.GetMiniCluster(sid, val) || val >= (UInt64)1 << 32) + return S_FALSE; + streamSpec->Vector.Add((UInt32)val); + sid = _db.Mat[sid]; + } + if (size <= clusterSize) + break; + } + } + if (sid != NFatID::kEndOfChain) + return S_FALSE; + RINOK(streamSpec->InitAndSeek()); + *stream = streamTemp.Detach(); + return S_OK; + COM_TRY_END +} + +}} diff --git a/CPP/7zip/Archive/Com/ComHandler.h b/CPP/7zip/Archive/Com/ComHandler.h new file mode 100644 index 0000000..f2b7de9 --- /dev/null +++ b/CPP/7zip/Archive/Com/ComHandler.h @@ -0,0 +1,28 @@ +// ComHandler.h + +#ifndef __ARCHIVE_COM_HANDLER_H +#define __ARCHIVE_COM_HANDLER_H + +#include "Common/MyCom.h" +#include "../IArchive.h" +#include "ComIn.h" + +namespace NArchive { +namespace NCom { + +class CHandler: + public IInArchive, + public IInArchiveGetStream, + public CMyUnknownImp +{ + CMyComPtr _stream; + CDatabase _db; +public: + MY_UNKNOWN_IMP2(IInArchive, IInArchiveGetStream) + INTERFACE_IInArchive(;) + STDMETHOD(GetStream)(UInt32 index, ISequentialInStream **stream); +}; + +}} + +#endif diff --git a/CPP/7zip/Archive/Com/ComIn.cpp b/CPP/7zip/Archive/Com/ComIn.cpp new file mode 100644 index 0000000..2203ca5 --- /dev/null +++ b/CPP/7zip/Archive/Com/ComIn.cpp @@ -0,0 +1,389 @@ +// Archive/ComIn.cpp + +#include "StdAfx.h" + +#include "../../../../C/Alloc.h" +#include "../../../../C/CpuArch.h" + +#include "Common/IntToString.h" +#include "Common/MyCom.h" + +#include "../../Common/StreamUtils.h" + +#include "ComIn.h" + +#define Get16(p) GetUi16(p) +#define Get32(p) GetUi32(p) + +namespace NArchive{ +namespace NCom{ + +static const UInt32 kSignatureSize = 8; +static const Byte kSignature[kSignatureSize] = { 0xD0, 0xCF, 0x11, 0xE0, 0xA1, 0xB1, 0x1A, 0xE1 }; + +void CUInt32Buf::Free() +{ + MyFree(_buf); + _buf = 0; +} + +bool CUInt32Buf::Allocate(UInt32 numItems) +{ + Free(); + if (numItems == 0) + return true; + size_t newSize = (size_t)numItems * sizeof(UInt32); + if (newSize / sizeof(UInt32) != numItems) + return false; + _buf = (UInt32 *)MyAlloc(newSize); + return (_buf != 0); +} + +static HRESULT ReadSector(IInStream *inStream, Byte *buf, int sectorSizeBits, UInt32 sid) +{ + RINOK(inStream->Seek((((UInt64)sid + 1) << sectorSizeBits), STREAM_SEEK_SET, NULL)); + return ReadStream_FALSE(inStream, buf, (UInt32)1 << sectorSizeBits); +} + +static HRESULT ReadIDs(IInStream *inStream, Byte *buf, int sectorSizeBits, UInt32 sid, UInt32 *dest) +{ + RINOK(ReadSector(inStream, buf, sectorSizeBits, sid)); + UInt32 sectorSize = (UInt32)1 << sectorSizeBits; + for (UInt32 t = 0; t < sectorSize; t += 4) + *dest++ = Get32(buf + t); + return S_OK; +} + +static void GetFileTimeFromMem(const Byte *p, FILETIME *ft) +{ + ft->dwLowDateTime = Get32(p); + ft->dwHighDateTime = Get32(p + 4); +} + +void CItem::Parse(const Byte *p, bool mode64bit) +{ + memcpy(Name, p, kNameSizeMax); + // NameSize = Get16(p + 64); + Type = p[66]; + LeftDid = Get32(p + 68); + RightDid = Get32(p + 72); + SonDid = Get32(p + 76); + // Flags = Get32(p + 96); + GetFileTimeFromMem(p + 100, &CTime); + GetFileTimeFromMem(p + 108, &MTime); + Sid = Get32(p + 116); + Size = Get32(p + 120); + if (mode64bit) + Size |= ((UInt64)Get32(p + 124) << 32); +} + +void CDatabase::Clear() +{ + Fat.Free(); + MiniSids.Free(); + Mat.Free(); + Items.Clear(); + Refs.Clear(); +} + +static const UInt32 kNoDid = 0xFFFFFFFF; + +HRESULT CDatabase::AddNode(int parent, UInt32 did) +{ + if (did == kNoDid) + return S_OK; + if (did >= (UInt32)Items.Size()) + return S_FALSE; + const CItem &item = Items[did]; + if (item.IsEmpty()) + return S_FALSE; + CRef ref; + ref.Parent = parent; + ref.Did = did; + int index = Refs.Add(ref); + if (Refs.Size() > Items.Size()) + return S_FALSE; + RINOK(AddNode(parent, item.LeftDid)); + RINOK(AddNode(parent, item.RightDid)); + if (item.IsDir()) + { + RINOK(AddNode(index, item.SonDid)); + } + return S_OK; +} + +static const char kCharOpenBracket = '['; +static const char kCharCloseBracket = ']'; + +static UString CompoundNameToFileName(const UString &s) +{ + UString res; + for (int i = 0; i < s.Length(); i++) + { + wchar_t c = s[i]; + if (c < 0x20) + { + res += kCharOpenBracket; + wchar_t buf[32]; + ConvertUInt32ToString(c, buf); + res += buf; + res += kCharCloseBracket; + } + else + res += c; + } + return res; +} + +static char g_MsiChars[] = +"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz._"; + +static const wchar_t *kMsi_ID = L""; // L"{msi}"; + +static const int kMsiNumBits = 6; +static const UInt32 kMsiNumChars = 1 << kMsiNumBits; +static const UInt32 kMsiCharMask = kMsiNumChars - 1; +static const UInt32 kMsiStartUnicodeChar = 0x3800; +static const UInt32 kMsiUnicodeRange = kMsiNumChars * (kMsiNumChars + 1); + +bool CompoundMsiNameToFileName(const UString &name, UString &resultName) +{ + resultName.Empty(); + for (int i = 0; i < name.Length(); i++) + { + wchar_t c = name[i]; + if (c < kMsiStartUnicodeChar || c > kMsiStartUnicodeChar + kMsiUnicodeRange) + return false; + if (i == 0) + resultName += kMsi_ID; + c -= kMsiStartUnicodeChar; + + UInt32 c0 = c & kMsiCharMask; + UInt32 c1 = c >> kMsiNumBits; + + if (c1 <= kMsiNumChars) + { + resultName += (wchar_t)g_MsiChars[c0]; + if (c1 == kMsiNumChars) + break; + resultName += (wchar_t)g_MsiChars[c1]; + } + else + resultName += L'!'; + } + return true; +} + +static UString ConvertName(const Byte *p, bool &isMsi) +{ + isMsi = false; + UString s; + for (int i = 0; i < kNameSizeMax; i += 2) + { + wchar_t c = (p[i] | (wchar_t)p[i + 1] << 8); + if (c == 0) + break; + s += c; + } + UString msiName; + if (CompoundMsiNameToFileName(s, msiName)) + { + isMsi = true; + return msiName; + } + return CompoundNameToFileName(s); +} + +static UString ConvertName(const Byte *p) +{ + bool isMsi; + return ConvertName(p, isMsi); +} + +UString CDatabase::GetItemPath(UInt32 index) const +{ + UString s; + while (index != kNoDid) + { + const CRef &ref = Refs[index]; + const CItem &item = Items[ref.Did]; + if (!s.IsEmpty()) + s = (UString)WCHAR_PATH_SEPARATOR + s; + s = ConvertName(item.Name) + s; + index = ref.Parent; + } + return s; +} + +HRESULT CDatabase::Open(IInStream *inStream) +{ + MainSubfile = -1; + static const UInt32 kHeaderSize = 512; + Byte p[kHeaderSize]; + RINOK(ReadStream_FALSE(inStream, p, kHeaderSize)); + if (memcmp(p, kSignature, kSignatureSize) != 0) + return S_FALSE; + if (Get16(p + 0x1A) > 4) // majorVer + return S_FALSE; + if (Get16(p + 0x1C) != 0xFFFE) + return S_FALSE; + int sectorSizeBits = Get16(p + 0x1E); + bool mode64bit = (sectorSizeBits >= 12); + int miniSectorSizeBits = Get16(p + 0x20); + SectorSizeBits = sectorSizeBits; + MiniSectorSizeBits = miniSectorSizeBits; + + if (sectorSizeBits > 28 || miniSectorSizeBits > 28 || + sectorSizeBits < 7 || miniSectorSizeBits < 2 || miniSectorSizeBits > sectorSizeBits) + return S_FALSE; + UInt32 numSectorsForFAT = Get32(p + 0x2C); + LongStreamMinSize = Get32(p + 0x38); + + UInt32 sectSize = (UInt32)1 << (int)sectorSizeBits; + + CByteBuffer sect; + sect.SetCapacity(sectSize); + + int ssb2 = (int)(sectorSizeBits - 2); + UInt32 numSidsInSec = (UInt32)1 << ssb2; + UInt32 numFatItems = numSectorsForFAT << ssb2; + if ((numFatItems >> ssb2) != numSectorsForFAT) + return S_FALSE; + FatSize = numFatItems; + + { + CUInt32Buf bat; + UInt32 numSectorsForBat = Get32(p + 0x48); + const UInt32 kNumHeaderBatItems = 109; + UInt32 numBatItems = kNumHeaderBatItems + (numSectorsForBat << ssb2); + if (numBatItems < kNumHeaderBatItems || ((numBatItems - kNumHeaderBatItems) >> ssb2) != numSectorsForBat) + return S_FALSE; + if (!bat.Allocate(numBatItems)) + return S_FALSE; + UInt32 i; + for (i = 0; i < kNumHeaderBatItems; i++) + bat[i] = Get32(p + 0x4c + i * 4); + UInt32 sid = Get32(p + 0x44); + for (UInt32 s = 0; s < numSectorsForBat; s++) + { + RINOK(ReadIDs(inStream, sect, sectorSizeBits, sid, bat + i)); + i += numSidsInSec - 1; + sid = bat[i]; + } + numBatItems = i; + + if (!Fat.Allocate(numFatItems)) + return S_FALSE; + UInt32 j = 0; + + for (i = 0; i < numFatItems; j++, i += numSidsInSec) + { + if (j >= numBatItems) + return S_FALSE; + RINOK(ReadIDs(inStream, sect, sectorSizeBits, bat[j], Fat + i)); + } + } + + UInt32 numMatItems; + { + UInt32 numSectorsForMat = Get32(p + 0x40); + numMatItems = (UInt32)numSectorsForMat << ssb2; + if ((numMatItems >> ssb2) != numSectorsForMat) + return S_FALSE; + if (!Mat.Allocate(numMatItems)) + return S_FALSE; + UInt32 i; + UInt32 sid = Get32(p + 0x3C); + for (i = 0; i < numMatItems; i += numSidsInSec) + { + RINOK(ReadIDs(inStream, sect, sectorSizeBits, sid, Mat + i)); + if (sid >= numFatItems) + return S_FALSE; + sid = Fat[sid]; + } + if (sid != NFatID::kEndOfChain) + return S_FALSE; + } + + { + UInt32 sid = Get32(p + 0x30); + for (;;) + { + if (sid >= numFatItems) + return S_FALSE; + RINOK(ReadSector(inStream, sect, sectorSizeBits, sid)); + for (UInt32 i = 0; i < sectSize; i += 128) + { + CItem item; + item.Parse(sect + i, mode64bit); + Items.Add(item); + } + sid = Fat[sid]; + if (sid == NFatID::kEndOfChain) + break; + } + } + + CItem root = Items[0]; + + { + UInt32 numSectorsInMiniStream; + { + UInt64 numSatSects64 = (root.Size + sectSize - 1) >> sectorSizeBits; + if (numSatSects64 > NFatID::kMaxValue) + return S_FALSE; + numSectorsInMiniStream = (UInt32)numSatSects64; + } + NumSectorsInMiniStream = numSectorsInMiniStream; + if (!MiniSids.Allocate(numSectorsInMiniStream)) + return S_FALSE; + { + UInt64 matSize64 = (root.Size + ((UInt64)1 << miniSectorSizeBits) - 1) >> miniSectorSizeBits; + if (matSize64 > NFatID::kMaxValue) + return S_FALSE; + MatSize = (UInt32)matSize64; + if (numMatItems < MatSize) + return S_FALSE; + } + + UInt32 sid = root.Sid; + for (UInt32 i = 0; ; i++) + { + if (sid == NFatID::kEndOfChain) + { + if (i != numSectorsInMiniStream) + return S_FALSE; + break; + } + if (i >= numSectorsInMiniStream) + return S_FALSE; + MiniSids[i] = sid; + if (sid >= numFatItems) + return S_FALSE; + sid = Fat[sid]; + } + } + + RINOK(AddNode(-1, root.SonDid)); + + unsigned numCabs = 0; + for (int i = 0; i < Refs.Size(); i++) + { + const CItem &item = Items[Refs[i].Did]; + if (item.IsDir() || numCabs > 1) + continue; + bool isMsiName; + UString msiName = ConvertName(item.Name, isMsiName); + if (isMsiName && msiName.Right(4).CompareNoCase(L".cab") == 0) + { + numCabs++; + MainSubfile = i; + } + } + if (numCabs > 1) + MainSubfile = -1; + + return S_OK; +} + +}} diff --git a/CPP/7zip/Archive/Com/ComIn.h b/CPP/7zip/Archive/Com/ComIn.h new file mode 100644 index 0000000..429d379 --- /dev/null +++ b/CPP/7zip/Archive/Com/ComIn.h @@ -0,0 +1,119 @@ +// Archive/ComIn.h + +#ifndef __ARCHIVE_COM_IN_H +#define __ARCHIVE_COM_IN_H + +#include "Common/MyString.h" +#include "Common/Buffer.h" + +namespace NArchive { +namespace NCom { + +struct CUInt32Buf +{ + UInt32 *_buf; +public: + CUInt32Buf(): _buf(0) {} + ~CUInt32Buf() { Free(); } + void Free(); + bool Allocate(UInt32 numItems); + operator UInt32 *() const { return _buf; }; +}; + +namespace NFatID +{ + const UInt32 kFree = 0xFFFFFFFF; + const UInt32 kEndOfChain = 0xFFFFFFFE; + const UInt32 kFatSector = 0xFFFFFFFD; + const UInt32 kMatSector = 0xFFFFFFFC; + const UInt32 kMaxValue = 0xFFFFFFFA; +} + +namespace NItemType +{ + const Byte kEmpty = 0; + const Byte kStorage = 1; + const Byte kStream = 2; + const Byte kLockBytes = 3; + const Byte kProperty = 4; + const Byte kRootStorage = 5; +} + +const UInt32 kNameSizeMax = 64; + +struct CItem +{ + Byte Name[kNameSizeMax]; + // UInt16 NameSize; + // UInt32 Flags; + FILETIME CTime; + FILETIME MTime; + UInt64 Size; + UInt32 LeftDid; + UInt32 RightDid; + UInt32 SonDid; + UInt32 Sid; + Byte Type; + + bool IsEmpty() const { return Type == NItemType::kEmpty; } + bool IsDir() const { return Type == NItemType::kStorage || Type == NItemType::kRootStorage; } + + void Parse(const Byte *p, bool mode64bit); +}; + +struct CRef +{ + int Parent; + UInt32 Did; +}; + +class CDatabase +{ + UInt32 NumSectorsInMiniStream; + CUInt32Buf MiniSids; + + HRESULT AddNode(int parent, UInt32 did); +public: + + CUInt32Buf Fat; + UInt32 FatSize; + + CUInt32Buf Mat; + UInt32 MatSize; + + CObjectVector Items; + CRecordVector Refs; + + UInt32 LongStreamMinSize; + int SectorSizeBits; + int MiniSectorSizeBits; + + Int32 MainSubfile; + + void Clear(); + bool IsLargeStream(UInt64 size) const { return size >= LongStreamMinSize; } + UString GetItemPath(UInt32 index) const; + + UInt64 GetItemPackSize(UInt64 size) const + { + UInt64 mask = ((UInt64)1 << (IsLargeStream(size) ? SectorSizeBits : MiniSectorSizeBits)) - 1; + return (size + mask) & ~mask; + } + + bool GetMiniCluster(UInt32 sid, UInt64 &res) const + { + int subBits = SectorSizeBits - MiniSectorSizeBits; + UInt32 fid = sid >> subBits; + if (fid >= NumSectorsInMiniStream) + return false; + res = (((UInt64)MiniSids[fid] + 1) << subBits) + (sid & ((1 << subBits) - 1)); + return true; + } + + HRESULT Open(IInStream *inStream); +}; + + +}} + +#endif diff --git a/CPP/7zip/Archive/Com/ComRegister.cpp b/CPP/7zip/Archive/Com/ComRegister.cpp new file mode 100644 index 0000000..6712b89 --- /dev/null +++ b/CPP/7zip/Archive/Com/ComRegister.cpp @@ -0,0 +1,13 @@ +// ComRegister.cpp + +#include "StdAfx.h" + +#include "../../Common/RegisterArc.h" + +#include "ComHandler.h" +static IInArchive *CreateArc() { return new NArchive::NCom::CHandler; } + +static CArcInfo g_ArcInfo = + { L"Compound", L"msi msp doc xls ppt", 0, 0xE5, { 0xD0, 0xCF, 0x11, 0xE0, 0xA1, 0xB1, 0x1A, 0xE1 }, 8, false, CreateArc, 0 }; + +REGISTER_ARC(Com) diff --git a/CPP/7zip/Archive/Common/CoderMixer2.cpp b/CPP/7zip/Archive/Common/CoderMixer2.cpp new file mode 100644 index 0000000..0b06a48 --- /dev/null +++ b/CPP/7zip/Archive/Common/CoderMixer2.cpp @@ -0,0 +1,121 @@ +// CoderMixer2.cpp + +#include "StdAfx.h" + +#include "CoderMixer2.h" + +namespace NCoderMixer { + +CBindReverseConverter::CBindReverseConverter(const CBindInfo &srcBindInfo): + _srcBindInfo(srcBindInfo) +{ + srcBindInfo.GetNumStreams(NumSrcInStreams, _numSrcOutStreams); + + UInt32 j; + for (j = 0; j < NumSrcInStreams; j++) + { + _srcInToDestOutMap.Add(0); + DestOutToSrcInMap.Add(0); + } + for (j = 0; j < _numSrcOutStreams; j++) + { + _srcOutToDestInMap.Add(0); + _destInToSrcOutMap.Add(0); + } + + UInt32 destInOffset = 0; + UInt32 destOutOffset = 0; + UInt32 srcInOffset = NumSrcInStreams; + UInt32 srcOutOffset = _numSrcOutStreams; + + for (int i = srcBindInfo.Coders.Size() - 1; i >= 0; i--) + { + const CCoderStreamsInfo &srcCoderInfo = srcBindInfo.Coders[i]; + + srcInOffset -= srcCoderInfo.NumInStreams; + srcOutOffset -= srcCoderInfo.NumOutStreams; + + UInt32 j; + for (j = 0; j < srcCoderInfo.NumInStreams; j++, destOutOffset++) + { + UInt32 index = srcInOffset + j; + _srcInToDestOutMap[index] = destOutOffset; + DestOutToSrcInMap[destOutOffset] = index; + } + for (j = 0; j < srcCoderInfo.NumOutStreams; j++, destInOffset++) + { + UInt32 index = srcOutOffset + j; + _srcOutToDestInMap[index] = destInOffset; + _destInToSrcOutMap[destInOffset] = index; + } + } +} + +void CBindReverseConverter::CreateReverseBindInfo(CBindInfo &destBindInfo) +{ + destBindInfo.Coders.Clear(); + destBindInfo.BindPairs.Clear(); + destBindInfo.InStreams.Clear(); + destBindInfo.OutStreams.Clear(); + + int i; + for (i = _srcBindInfo.Coders.Size() - 1; i >= 0; i--) + { + const CCoderStreamsInfo &srcCoderInfo = _srcBindInfo.Coders[i]; + CCoderStreamsInfo destCoderInfo; + destCoderInfo.NumInStreams = srcCoderInfo.NumOutStreams; + destCoderInfo.NumOutStreams = srcCoderInfo.NumInStreams; + destBindInfo.Coders.Add(destCoderInfo); + } + for (i = _srcBindInfo.BindPairs.Size() - 1; i >= 0; i--) + { + const CBindPair &srcBindPair = _srcBindInfo.BindPairs[i]; + CBindPair destBindPair; + destBindPair.InIndex = _srcOutToDestInMap[srcBindPair.OutIndex]; + destBindPair.OutIndex = _srcInToDestOutMap[srcBindPair.InIndex]; + destBindInfo.BindPairs.Add(destBindPair); + } + for (i = 0; i < _srcBindInfo.InStreams.Size(); i++) + destBindInfo.OutStreams.Add(_srcInToDestOutMap[_srcBindInfo.InStreams[i]]); + for (i = 0; i < _srcBindInfo.OutStreams.Size(); i++) + destBindInfo.InStreams.Add(_srcOutToDestInMap[_srcBindInfo.OutStreams[i]]); +} + +CCoderInfo2::CCoderInfo2(UInt32 numInStreams, UInt32 numOutStreams): + NumInStreams(numInStreams), + NumOutStreams(numOutStreams) +{ + InSizes.Reserve(NumInStreams); + InSizePointers.Reserve(NumInStreams); + OutSizes.Reserve(NumOutStreams); + OutSizePointers.Reserve(NumOutStreams); +} + +static void SetSizes(const UInt64 **srcSizes, CRecordVector &sizes, + CRecordVector &sizePointers, UInt32 numItems) +{ + sizes.Clear(); + sizePointers.Clear(); + for(UInt32 i = 0; i < numItems; i++) + { + if (srcSizes == 0 || srcSizes[i] == NULL) + { + sizes.Add(0); + sizePointers.Add(NULL); + } + else + { + sizes.Add(*srcSizes[i]); + sizePointers.Add(&sizes.Back()); + } + } +} + +void CCoderInfo2::SetCoderInfo(const UInt64 **inSizes, + const UInt64 **outSizes) +{ + SetSizes(inSizes, InSizes, InSizePointers, NumInStreams); + SetSizes(outSizes, OutSizes, OutSizePointers, NumOutStreams); +} + +} diff --git a/CPP/7zip/Archive/Common/CoderMixer2.h b/CPP/7zip/Archive/Common/CoderMixer2.h new file mode 100644 index 0000000..a03722d --- /dev/null +++ b/CPP/7zip/Archive/Common/CoderMixer2.h @@ -0,0 +1,174 @@ +// CoderMixer2.h + +#ifndef __CODER_MIXER2_H +#define __CODER_MIXER2_H + +#include "../../../Common/MyVector.h" +#include "../../../Common/Types.h" +#include "../../../Common/MyCom.h" +#include "../../ICoder.h" + +namespace NCoderMixer { + +struct CBindPair +{ + UInt32 InIndex; + UInt32 OutIndex; +}; + +struct CCoderStreamsInfo +{ + UInt32 NumInStreams; + UInt32 NumOutStreams; +}; + +struct CBindInfo +{ + CRecordVector Coders; + CRecordVector BindPairs; + CRecordVector InStreams; + CRecordVector OutStreams; + + void Clear() + { + Coders.Clear(); + BindPairs.Clear(); + InStreams.Clear(); + OutStreams.Clear(); + } + + /* + UInt32 GetCoderStartOutStream(UInt32 coderIndex) const + { + UInt32 numOutStreams = 0; + for (UInt32 i = 0; i < coderIndex; i++) + numOutStreams += Coders[i].NumOutStreams; + return numOutStreams; + } + */ + + + void GetNumStreams(UInt32 &numInStreams, UInt32 &numOutStreams) const + { + numInStreams = 0; + numOutStreams = 0; + for (int i = 0; i < Coders.Size(); i++) + { + const CCoderStreamsInfo &coderStreamsInfo = Coders[i]; + numInStreams += coderStreamsInfo.NumInStreams; + numOutStreams += coderStreamsInfo.NumOutStreams; + } + } + + int FindBinderForInStream(UInt32 inStream) const + { + for (int i = 0; i < BindPairs.Size(); i++) + if (BindPairs[i].InIndex == inStream) + return i; + return -1; + } + int FindBinderForOutStream(UInt32 outStream) const + { + for (int i = 0; i < BindPairs.Size(); i++) + if (BindPairs[i].OutIndex == outStream) + return i; + return -1; + } + + UInt32 GetCoderInStreamIndex(UInt32 coderIndex) const + { + UInt32 streamIndex = 0; + for (UInt32 i = 0; i < coderIndex; i++) + streamIndex += Coders[i].NumInStreams; + return streamIndex; + } + + UInt32 GetCoderOutStreamIndex(UInt32 coderIndex) const + { + UInt32 streamIndex = 0; + for (UInt32 i = 0; i < coderIndex; i++) + streamIndex += Coders[i].NumOutStreams; + return streamIndex; + } + + + void FindInStream(UInt32 streamIndex, UInt32 &coderIndex, + UInt32 &coderStreamIndex) const + { + for (coderIndex = 0; coderIndex < (UInt32)Coders.Size(); coderIndex++) + { + UInt32 curSize = Coders[coderIndex].NumInStreams; + if (streamIndex < curSize) + { + coderStreamIndex = streamIndex; + return; + } + streamIndex -= curSize; + } + throw 1; + } + void FindOutStream(UInt32 streamIndex, UInt32 &coderIndex, + UInt32 &coderStreamIndex) const + { + for (coderIndex = 0; coderIndex < (UInt32)Coders.Size(); coderIndex++) + { + UInt32 curSize = Coders[coderIndex].NumOutStreams; + if (streamIndex < curSize) + { + coderStreamIndex = streamIndex; + return; + } + streamIndex -= curSize; + } + throw 1; + } +}; + +class CBindReverseConverter +{ + UInt32 _numSrcOutStreams; + NCoderMixer::CBindInfo _srcBindInfo; + CRecordVector _srcInToDestOutMap; + CRecordVector _srcOutToDestInMap; + CRecordVector _destInToSrcOutMap; +public: + UInt32 NumSrcInStreams; + CRecordVector DestOutToSrcInMap; + + CBindReverseConverter(const NCoderMixer::CBindInfo &srcBindInfo); + void CreateReverseBindInfo(NCoderMixer::CBindInfo &destBindInfo); +}; + +struct CCoderInfo2 +{ + CMyComPtr Coder; + CMyComPtr Coder2; + UInt32 NumInStreams; + UInt32 NumOutStreams; + + CRecordVector InSizes; + CRecordVector OutSizes; + CRecordVector InSizePointers; + CRecordVector OutSizePointers; + + CCoderInfo2(UInt32 numInStreams, UInt32 numOutStreams); + void SetCoderInfo(const UInt64 **inSizes, const UInt64 **outSizes); + + HRESULT QueryInterface(REFGUID iid, void** pp) const + { + IUnknown *p = Coder ? (IUnknown *)Coder : (IUnknown *)Coder2; + return p->QueryInterface(iid, pp); + } +}; + +class CCoderMixer2 +{ +public: + virtual HRESULT SetBindInfo(const CBindInfo &bindInfo) = 0; + virtual void ReInit() = 0; + virtual void SetCoderInfo(UInt32 coderIndex, const UInt64 **inSizes, const UInt64 **outSizes) = 0; +}; + +} +#endif + diff --git a/CPP/7zip/Archive/Common/CoderMixer2MT.cpp b/CPP/7zip/Archive/Common/CoderMixer2MT.cpp new file mode 100644 index 0000000..d76450b --- /dev/null +++ b/CPP/7zip/Archive/Common/CoderMixer2MT.cpp @@ -0,0 +1,240 @@ +// CoderMixer2MT.cpp + +#include "StdAfx.h" + +#include "CoderMixer2MT.h" + +namespace NCoderMixer { + +CCoder2::CCoder2(UInt32 numInStreams, UInt32 numOutStreams): + CCoderInfo2(numInStreams, numOutStreams) +{ + InStreams.Reserve(NumInStreams); + InStreamPointers.Reserve(NumInStreams); + OutStreams.Reserve(NumOutStreams); + OutStreamPointers.Reserve(NumOutStreams); +} + +void CCoder2::Execute() { Code(NULL); } + +void CCoder2::Code(ICompressProgressInfo *progress) +{ + InStreamPointers.Clear(); + OutStreamPointers.Clear(); + UInt32 i; + for (i = 0; i < NumInStreams; i++) + { + if (InSizePointers[i] != NULL) + InSizePointers[i] = &InSizes[i]; + InStreamPointers.Add((ISequentialInStream *)InStreams[i]); + } + for (i = 0; i < NumOutStreams; i++) + { + if (OutSizePointers[i] != NULL) + OutSizePointers[i] = &OutSizes[i]; + OutStreamPointers.Add((ISequentialOutStream *)OutStreams[i]); + } + if (Coder) + Result = Coder->Code(InStreamPointers[0], OutStreamPointers[0], + InSizePointers[0], OutSizePointers[0], progress); + else + Result = Coder2->Code(&InStreamPointers.Front(), &InSizePointers.Front(), NumInStreams, + &OutStreamPointers.Front(), &OutSizePointers.Front(), NumOutStreams, progress); + { + int i; + for (i = 0; i < InStreams.Size(); i++) + InStreams[i].Release(); + for (i = 0; i < OutStreams.Size(); i++) + OutStreams[i].Release(); + } +} + +static void SetSizes(const UInt64 **srcSizes, CRecordVector &sizes, + CRecordVector &sizePointers, UInt32 numItems) +{ + sizes.Clear(); + sizePointers.Clear(); + for (UInt32 i = 0; i < numItems; i++) + { + if (srcSizes == 0 || srcSizes[i] == NULL) + { + sizes.Add(0); + sizePointers.Add(NULL); + } + else + { + sizes.Add(*srcSizes[i]); + sizePointers.Add(&sizes.Back()); + } + } +} + + +void CCoder2::SetCoderInfo(const UInt64 **inSizes, const UInt64 **outSizes) +{ + SetSizes(inSizes, InSizes, InSizePointers, NumInStreams); + SetSizes(outSizes, OutSizes, OutSizePointers, NumOutStreams); +} + +////////////////////////////////////// +// CCoderMixer2MT + +HRESULT CCoderMixer2MT::SetBindInfo(const CBindInfo &bindInfo) +{ + _bindInfo = bindInfo; + _streamBinders.Clear(); + for (int i = 0; i < _bindInfo.BindPairs.Size(); i++) + { + _streamBinders.Add(CStreamBinder()); + RINOK(_streamBinders.Back().CreateEvents()); + } + return S_OK; +} + +void CCoderMixer2MT::AddCoderCommon() +{ + const CCoderStreamsInfo &c = _bindInfo.Coders[_coders.Size()]; + CCoder2 threadCoderInfo(c.NumInStreams, c.NumOutStreams); + _coders.Add(threadCoderInfo); +} + +void CCoderMixer2MT::AddCoder(ICompressCoder *coder) +{ + AddCoderCommon(); + _coders.Back().Coder = coder; +} + +void CCoderMixer2MT::AddCoder2(ICompressCoder2 *coder) +{ + AddCoderCommon(); + _coders.Back().Coder2 = coder; +} + + +void CCoderMixer2MT::ReInit() +{ + for (int i = 0; i < _streamBinders.Size(); i++) + _streamBinders[i].ReInit(); +} + + +HRESULT CCoderMixer2MT::Init(ISequentialInStream **inStreams, ISequentialOutStream **outStreams) +{ + /* + if (_coders.Size() != _bindInfo.Coders.Size()) + throw 0; + */ + int i; + for (i = 0; i < _coders.Size(); i++) + { + CCoder2 &coderInfo = _coders[i]; + const CCoderStreamsInfo &coderStreamsInfo = _bindInfo.Coders[i]; + coderInfo.InStreams.Clear(); + UInt32 j; + for (j = 0; j < coderStreamsInfo.NumInStreams; j++) + coderInfo.InStreams.Add(NULL); + coderInfo.OutStreams.Clear(); + for (j = 0; j < coderStreamsInfo.NumOutStreams; j++) + coderInfo.OutStreams.Add(NULL); + } + + for (i = 0; i < _bindInfo.BindPairs.Size(); i++) + { + const CBindPair &bindPair = _bindInfo.BindPairs[i]; + UInt32 inCoderIndex, inCoderStreamIndex; + UInt32 outCoderIndex, outCoderStreamIndex; + _bindInfo.FindInStream(bindPair.InIndex, inCoderIndex, inCoderStreamIndex); + _bindInfo.FindOutStream(bindPair.OutIndex, outCoderIndex, outCoderStreamIndex); + + _streamBinders[i].CreateStreams( + &_coders[inCoderIndex].InStreams[inCoderStreamIndex], + &_coders[outCoderIndex].OutStreams[outCoderStreamIndex]); + + CMyComPtr inSetSize, outSetSize; + _coders[inCoderIndex].QueryInterface(IID_ICompressSetBufSize, (void **)&inSetSize); + _coders[outCoderIndex].QueryInterface(IID_ICompressSetBufSize, (void **)&outSetSize); + if (inSetSize && outSetSize) + { + const UInt32 kBufSize = 1 << 19; + inSetSize->SetInBufSize(inCoderStreamIndex, kBufSize); + outSetSize->SetOutBufSize(outCoderStreamIndex, kBufSize); + } + } + + for (i = 0; i < _bindInfo.InStreams.Size(); i++) + { + UInt32 inCoderIndex, inCoderStreamIndex; + _bindInfo.FindInStream(_bindInfo.InStreams[i], inCoderIndex, inCoderStreamIndex); + _coders[inCoderIndex].InStreams[inCoderStreamIndex] = inStreams[i]; + } + + for (i = 0; i < _bindInfo.OutStreams.Size(); i++) + { + UInt32 outCoderIndex, outCoderStreamIndex; + _bindInfo.FindOutStream(_bindInfo.OutStreams[i], outCoderIndex, outCoderStreamIndex); + _coders[outCoderIndex].OutStreams[outCoderStreamIndex] = outStreams[i]; + } + return S_OK; +} + +HRESULT CCoderMixer2MT::ReturnIfError(HRESULT code) +{ + for (int i = 0; i < _coders.Size(); i++) + if (_coders[i].Result == code) + return code; + return S_OK; +} + +STDMETHODIMP CCoderMixer2MT::Code(ISequentialInStream **inStreams, + const UInt64 ** /* inSizes */, + UInt32 numInStreams, + ISequentialOutStream **outStreams, + const UInt64 ** /* outSizes */, + UInt32 numOutStreams, + ICompressProgressInfo *progress) +{ + if (numInStreams != (UInt32)_bindInfo.InStreams.Size() || + numOutStreams != (UInt32)_bindInfo.OutStreams.Size()) + return E_INVALIDARG; + + Init(inStreams, outStreams); + + int i; + for (i = 0; i < _coders.Size(); i++) + if (i != _progressCoderIndex) + { + RINOK(_coders[i].Create()); + } + + for (i = 0; i < _coders.Size(); i++) + if (i != _progressCoderIndex) + _coders[i].Start(); + + _coders[_progressCoderIndex].Code(progress); + + for (i = 0; i < _coders.Size(); i++) + if (i != _progressCoderIndex) + _coders[i].WaitFinish(); + + RINOK(ReturnIfError(E_ABORT)); + RINOK(ReturnIfError(E_OUTOFMEMORY)); + + for (i = 0; i < _coders.Size(); i++) + { + HRESULT result = _coders[i].Result; + if (result != S_OK && result != E_FAIL && result != S_FALSE) + return result; + } + + RINOK(ReturnIfError(S_FALSE)); + + for (i = 0; i < _coders.Size(); i++) + { + HRESULT result = _coders[i].Result; + if (result != S_OK) + return result; + } + return S_OK; +} + +} diff --git a/CPP/7zip/Archive/Common/CoderMixer2MT.h b/CPP/7zip/Archive/Common/CoderMixer2MT.h new file mode 100644 index 0000000..d1c7f4d --- /dev/null +++ b/CPP/7zip/Archive/Common/CoderMixer2MT.h @@ -0,0 +1,80 @@ +// CoderMixer2MT.h + +#ifndef __CODER_MIXER2_MT_H +#define __CODER_MIXER2_MT_H + +#include "CoderMixer2.h" +#include "../../../Common/MyCom.h" +#include "../../Common/StreamBinder.h" +#include "../../Common/VirtThread.h" + +namespace NCoderMixer { + +struct CCoder2: public CCoderInfo2, public CVirtThread +{ + HRESULT Result; + CObjectVector< CMyComPtr > InStreams; + CObjectVector< CMyComPtr > OutStreams; + CRecordVector InStreamPointers; + CRecordVector OutStreamPointers; + + CCoder2(UInt32 numInStreams, UInt32 numOutStreams); + void SetCoderInfo(const UInt64 **inSizes, const UInt64 **outSizes); + virtual void Execute(); + void Code(ICompressProgressInfo *progress); +}; + + +/* + SetBindInfo() + for each coder + AddCoder[2]() + SetProgressIndex(UInt32 coderIndex); + + for each file + { + ReInit() + for each coder + SetCoderInfo + Code + } +*/ + +class CCoderMixer2MT: + public ICompressCoder2, + public CCoderMixer2, + public CMyUnknownImp +{ + CBindInfo _bindInfo; + CObjectVector _streamBinders; + int _progressCoderIndex; + + void AddCoderCommon(); + HRESULT Init(ISequentialInStream **inStreams, ISequentialOutStream **outStreams); + HRESULT ReturnIfError(HRESULT code); +public: + CObjectVector _coders; + MY_UNKNOWN_IMP + + STDMETHOD(Code)(ISequentialInStream **inStreams, + const UInt64 **inSizes, + UInt32 numInStreams, + ISequentialOutStream **outStreams, + const UInt64 **outSizes, + UInt32 numOutStreams, + ICompressProgressInfo *progress); + + HRESULT SetBindInfo(const CBindInfo &bindInfo); + void AddCoder(ICompressCoder *coder); + void AddCoder2(ICompressCoder2 *coder); + void SetProgressCoderIndex(int coderIndex) { _progressCoderIndex = coderIndex; } + + void ReInit(); + void SetCoderInfo(UInt32 coderIndex, const UInt64 **inSizes, const UInt64 **outSizes) + { _coders[coderIndex].SetCoderInfo(inSizes, outSizes); } + UInt64 GetWriteProcessedSize(UInt32 binderIndex) const + { return _streamBinders[binderIndex].ProcessedSize; } +}; + +} +#endif diff --git a/CPP/7zip/Archive/Common/CoderMixer2ST.cpp b/CPP/7zip/Archive/Common/CoderMixer2ST.cpp new file mode 100644 index 0000000..a59ce5f --- /dev/null +++ b/CPP/7zip/Archive/Common/CoderMixer2ST.cpp @@ -0,0 +1,239 @@ +// CoderMixer2ST.cpp + +#include "StdAfx.h" + +#include "CoderMixer2ST.h" + +namespace NCoderMixer2 { + +CCoderMixer2ST::CCoderMixer2ST() {} + +CCoderMixer2ST::~CCoderMixer2ST(){ } + +HRESULT CCoderMixer2ST::SetBindInfo(const CBindInfo &bindInfo) +{ + _bindInfo = bindInfo; + return S_OK; +} + +void CCoderMixer2ST::AddCoderCommon(bool isMain) +{ + const CCoderStreamsInfo &csi = _bindInfo.Coders[_coders.Size()]; + _coders.Add(CSTCoderInfo(csi.NumInStreams, csi.NumOutStreams, isMain)); +} + +void CCoderMixer2ST::AddCoder(ICompressCoder *coder, bool isMain) +{ + AddCoderCommon(isMain); + _coders.Back().Coder = coder; +} + +void CCoderMixer2ST::AddCoder2(ICompressCoder2 *coder, bool isMain) +{ + AddCoderCommon(isMain); + _coders.Back().Coder2 = coder; +} + +void CCoderMixer2ST::ReInit() { } + +HRESULT CCoderMixer2ST::GetInStream( + ISequentialInStream **inStreams, const UInt64 **inSizes, + UInt32 streamIndex, ISequentialInStream **inStreamRes) +{ + CMyComPtr seqInStream; + int i; + for(i = 0; i < _bindInfo.InStreams.Size(); i++) + if (_bindInfo.InStreams[i] == streamIndex) + { + seqInStream = inStreams[i]; + *inStreamRes = seqInStream.Detach(); + return S_OK; + } + int binderIndex = _bindInfo.FindBinderForInStream(streamIndex); + if (binderIndex < 0) + return E_INVALIDARG; + + UInt32 coderIndex, coderStreamIndex; + _bindInfo.FindOutStream(_bindInfo.BindPairs[binderIndex].OutIndex, + coderIndex, coderStreamIndex); + + CCoderInfo &coder = _coders[coderIndex]; + if (!coder.Coder) + return E_NOTIMPL; + coder.Coder.QueryInterface(IID_ISequentialInStream, &seqInStream); + if (!seqInStream) + return E_NOTIMPL; + + UInt32 startIndex = _bindInfo.GetCoderInStreamIndex(coderIndex); + + CMyComPtr setInStream; + if (!coder.Coder) + return E_NOTIMPL; + coder.Coder.QueryInterface(IID_ICompressSetInStream, &setInStream); + if (!setInStream) + return E_NOTIMPL; + + if (coder.NumInStreams > 1) + return E_NOTIMPL; + for (i = 0; i < (int)coder.NumInStreams; i++) + { + CMyComPtr seqInStream2; + RINOK(GetInStream(inStreams, inSizes, startIndex + i, &seqInStream2)); + RINOK(setInStream->SetInStream(seqInStream2)); + } + *inStreamRes = seqInStream.Detach(); + return S_OK; +} + +HRESULT CCoderMixer2ST::GetOutStream( + ISequentialOutStream **outStreams, const UInt64 **outSizes, + UInt32 streamIndex, ISequentialOutStream **outStreamRes) +{ + CMyComPtr seqOutStream; + int i; + for(i = 0; i < _bindInfo.OutStreams.Size(); i++) + if (_bindInfo.OutStreams[i] == streamIndex) + { + seqOutStream = outStreams[i]; + *outStreamRes = seqOutStream.Detach(); + return S_OK; + } + int binderIndex = _bindInfo.FindBinderForOutStream(streamIndex); + if (binderIndex < 0) + return E_INVALIDARG; + + UInt32 coderIndex, coderStreamIndex; + _bindInfo.FindInStream(_bindInfo.BindPairs[binderIndex].InIndex, + coderIndex, coderStreamIndex); + + CCoderInfo &coder = _coders[coderIndex]; + if (!coder.Coder) + return E_NOTIMPL; + coder.Coder.QueryInterface(IID_ISequentialOutStream, &seqOutStream); + if (!seqOutStream) + return E_NOTIMPL; + + UInt32 startIndex = _bindInfo.GetCoderOutStreamIndex(coderIndex); + + CMyComPtr setOutStream; + if (!coder.Coder) + return E_NOTIMPL; + coder.Coder.QueryInterface(IID_ICompressSetOutStream, &setOutStream); + if (!setOutStream) + return E_NOTIMPL; + + if (coder.NumOutStreams > 1) + return E_NOTIMPL; + for (i = 0; i < (int)coder.NumOutStreams; i++) + { + CMyComPtr seqOutStream2; + RINOK(GetOutStream(outStreams, outSizes, startIndex + i, &seqOutStream2)); + RINOK(setOutStream->SetOutStream(seqOutStream2)); + } + *outStreamRes = seqOutStream.Detach(); + return S_OK; +} + + +STDMETHODIMP CCoderMixer2ST::Code(ISequentialInStream **inStreams, + const UInt64 **inSizes, + UInt32 numInStreams, + ISequentialOutStream **outStreams, + const UInt64 **outSizes, + UInt32 numOutStreams, + ICompressProgressInfo *progress) +{ + if (numInStreams != (UInt32)_bindInfo.InStreams.Size() || + numOutStreams != (UInt32)_bindInfo.OutStreams.Size()) + return E_INVALIDARG; + + // Find main coder + int _mainCoderIndex = -1; + int i; + for (i = 0; i < _coders.Size(); i++) + if (_coders[i].IsMain) + { + _mainCoderIndex = i; + break; + } + if (_mainCoderIndex < 0) + for (i = 0; i < _coders.Size(); i++) + if (_coders[i].NumInStreams > 1) + { + if (_mainCoderIndex >= 0) + return E_NOTIMPL; + _mainCoderIndex = i; + } + if (_mainCoderIndex < 0) + _mainCoderIndex = 0; + + // _mainCoderIndex = 0; + // _mainCoderIndex = _coders.Size() - 1; + CCoderInfo &mainCoder = _coders[_mainCoderIndex]; + + CObjectVector< CMyComPtr > seqInStreams; + CObjectVector< CMyComPtr > seqOutStreams; + UInt32 startInIndex = _bindInfo.GetCoderInStreamIndex(_mainCoderIndex); + UInt32 startOutIndex = _bindInfo.GetCoderOutStreamIndex(_mainCoderIndex); + for (i = 0; i < (int)mainCoder.NumInStreams; i++) + { + CMyComPtr seqInStream; + RINOK(GetInStream(inStreams, inSizes, startInIndex + i, &seqInStream)); + seqInStreams.Add(seqInStream); + } + for (i = 0; i < (int)mainCoder.NumOutStreams; i++) + { + CMyComPtr seqOutStream; + RINOK(GetOutStream(outStreams, outSizes, startOutIndex + i, &seqOutStream)); + seqOutStreams.Add(seqOutStream); + } + CRecordVector< ISequentialInStream * > seqInStreamsSpec; + CRecordVector< ISequentialOutStream * > seqOutStreamsSpec; + for (i = 0; i < (int)mainCoder.NumInStreams; i++) + seqInStreamsSpec.Add(seqInStreams[i]); + for (i = 0; i < (int)mainCoder.NumOutStreams; i++) + seqOutStreamsSpec.Add(seqOutStreams[i]); + + for (i = 0; i < _coders.Size(); i++) + { + if (i == _mainCoderIndex) + continue; + CCoderInfo &coder = _coders[i]; + CMyComPtr setOutStreamSize; + coder.Coder.QueryInterface(IID_ICompressSetOutStreamSize, &setOutStreamSize); + if (setOutStreamSize) + { + RINOK(setOutStreamSize->SetOutStreamSize(coder.OutSizePointers[0])); + } + } + if (mainCoder.Coder) + { + RINOK(mainCoder.Coder->Code( + seqInStreamsSpec[0], seqOutStreamsSpec[0], + mainCoder.InSizePointers[0], mainCoder.OutSizePointers[0], + progress)); + } + else + { + RINOK(mainCoder.Coder2->Code( + &seqInStreamsSpec.Front(), + &mainCoder.InSizePointers.Front(), mainCoder.NumInStreams, + &seqOutStreamsSpec.Front(), + &mainCoder.OutSizePointers.Front(), mainCoder.NumOutStreams, + progress)); + } + CMyComPtr flush; + seqOutStreams.Front().QueryInterface(IID_IOutStreamFlush, &flush); + if (flush) + return flush->Flush(); + return S_OK; +} + +/* +UInt64 CCoderMixer2ST::GetWriteProcessedSize(UInt32 binderIndex) const +{ + return _streamBinders[binderIndex].ProcessedSize; +} +*/ + +} diff --git a/CPP/7zip/Archive/Common/CoderMixer2ST.h b/CPP/7zip/Archive/Common/CoderMixer2ST.h new file mode 100644 index 0000000..a4ea7e8 --- /dev/null +++ b/CPP/7zip/Archive/Common/CoderMixer2ST.h @@ -0,0 +1,88 @@ +// CoderMixer2ST.h + +#ifndef __CODER_MIXER2_ST_H +#define __CODER_MIXER2_ST_H + +#include "CoderMixer2.h" +#include "../../../Common/MyCom.h" +#include "../../ICoder.h" + +namespace NCoderMixer2 { + +// SetBindInfo() +// for each coder +// { +// AddCoder[2]() +// } +// +// for each file +// { +// ReInit() +// for each coder +// { +// SetCoderInfo +// } +// SetProgressIndex(UInt32 coderIndex); +// Code +// } + +struct CSTCoderInfo: public CCoderInfo +{ + bool IsMain; + CSTCoderInfo(UInt32 numInStreams, UInt32 numOutStreams, bool isMain): + CCoderInfo(numInStreams, numOutStreams),IsMain(isMain) {} +}; + +class CCoderMixer2ST: + public ICompressCoder2, + public CCoderMixer2, + public CMyUnknownImp +{ + MY_UNKNOWN_IMP + + HRESULT GetInStream( + ISequentialInStream **inStreams, const UInt64 **inSizes, + UInt32 streamIndex, ISequentialInStream **inStreamRes); + HRESULT GetOutStream( + ISequentialOutStream **outStreams, const UInt64 **outSizes, + UInt32 streamIndex, ISequentialOutStream **outStreamRes); +public: + STDMETHOD(Code)(ISequentialInStream **inStreams, + const UInt64 **inSizes, + UInt32 numInStreams, + ISequentialOutStream **outStreams, + const UInt64 **outSizes, + UInt32 numOutStreams, + ICompressProgressInfo *progress); + + CCoderMixer2ST(); + ~CCoderMixer2ST(); + void AddCoderCommon(bool isMain); + void AddCoder(ICompressCoder *coder, bool isMain); + void AddCoder2(ICompressCoder2 *coder, bool isMain); + + void ReInit(); + void SetCoderInfo(UInt32 coderIndex, const UInt64 **inSizes, const UInt64 **outSizes) + { + { _coders[coderIndex].SetCoderInfo(inSizes, outSizes); } + } + + void SetProgressCoderIndex(UInt32 /*coderIndex*/) + { + // _progressCoderIndex = coderIndex; + } + + // UInt64 GetWriteProcessedSize(UInt32 binderIndex) const; + +private: + CBindInfo _bindInfo; + CObjectVector _coders; + int _mainCoderIndex; +public: + HRESULT SetBindInfo(const CBindInfo &bindInfo); + +}; + +} +#endif + diff --git a/CPP/7zip/Archive/Common/CrossThreadProgress.cpp b/CPP/7zip/Archive/Common/CrossThreadProgress.cpp new file mode 100644 index 0000000..a974b54 --- /dev/null +++ b/CPP/7zip/Archive/Common/CrossThreadProgress.cpp @@ -0,0 +1,15 @@ +// CrossThreadProgress.cpp + +#include "StdAfx.h" + +#include "CrossThreadProgress.h" + +STDMETHODIMP CCrossThreadProgress::SetRatioInfo(const UInt64 *inSize, const UInt64 *outSize) +{ + InSize = inSize; + OutSize = outSize; + ProgressEvent.Set(); + WaitEvent.Lock(); + return Result; +} + diff --git a/CPP/7zip/Archive/Common/CrossThreadProgress.h b/CPP/7zip/Archive/Common/CrossThreadProgress.h new file mode 100644 index 0000000..7e0b105 --- /dev/null +++ b/CPP/7zip/Archive/Common/CrossThreadProgress.h @@ -0,0 +1,37 @@ +// CrossThreadProgress.h + +#ifndef __CROSSTHREADPROGRESS_H +#define __CROSSTHREADPROGRESS_H + +#include "../../ICoder.h" +#include "../../../Windows/Synchronization.h" +#include "../../../Common/MyCom.h" + +class CCrossThreadProgress: + public ICompressProgressInfo, + public CMyUnknownImp +{ +public: + const UInt64 *InSize; + const UInt64 *OutSize; + HRESULT Result; + NWindows::NSynchronization::CAutoResetEvent ProgressEvent; + NWindows::NSynchronization::CAutoResetEvent WaitEvent; + + HRes Create() + { + RINOK(ProgressEvent.CreateIfNotCreated()); + return WaitEvent.CreateIfNotCreated(); + } + void Init() + { + ProgressEvent.Reset(); + WaitEvent.Reset(); + } + + MY_UNKNOWN_IMP + + STDMETHOD(SetRatioInfo)(const UInt64 *inSize, const UInt64 *outSize); +}; + +#endif diff --git a/CPP/7zip/Archive/Common/DummyOutStream.cpp b/CPP/7zip/Archive/Common/DummyOutStream.cpp new file mode 100644 index 0000000..54bcfec --- /dev/null +++ b/CPP/7zip/Archive/Common/DummyOutStream.cpp @@ -0,0 +1,22 @@ +// DummyOutStream.cpp + +#include "StdAfx.h" + +#include "DummyOutStream.h" + +STDMETHODIMP CDummyOutStream::Write(const void *data, UInt32 size, UInt32 *processedSize) +{ + UInt32 realProcessedSize; + HRESULT result; + if(!_stream) + { + realProcessedSize = size; + result = S_OK; + } + else + result = _stream->Write(data, size, &realProcessedSize); + _size += realProcessedSize; + if(processedSize != NULL) + *processedSize = realProcessedSize; + return result; +} diff --git a/CPP/7zip/Archive/Common/DummyOutStream.h b/CPP/7zip/Archive/Common/DummyOutStream.h new file mode 100644 index 0000000..13d5b62 --- /dev/null +++ b/CPP/7zip/Archive/Common/DummyOutStream.h @@ -0,0 +1,24 @@ +// DummyOutStream.h + +#ifndef __DUMMYOUTSTREAM_H +#define __DUMMYOUTSTREAM_H + +#include "../../IStream.h" +#include "Common/MyCom.h" + +class CDummyOutStream: + public ISequentialOutStream, + public CMyUnknownImp +{ + CMyComPtr _stream; + UInt64 _size; +public: + void SetStream(ISequentialOutStream *outStream) { _stream = outStream; } + void ReleaseStream() { _stream.Release(); } + void Init() { _size = 0; } + MY_UNKNOWN_IMP + STDMETHOD(Write)(const void *data, UInt32 size, UInt32 *processedSize); + UInt64 GetSize() const { return _size; } +}; + +#endif diff --git a/CPP/7zip/Archive/Common/FindSignature.cpp b/CPP/7zip/Archive/Common/FindSignature.cpp new file mode 100644 index 0000000..15aa6ce --- /dev/null +++ b/CPP/7zip/Archive/Common/FindSignature.cpp @@ -0,0 +1,62 @@ +// FindSignature.cpp + +#include "StdAfx.h" + +#include "Common/Buffer.h" + +#include "FindSignature.h" + +#include "../../Common/StreamUtils.h" + +HRESULT FindSignatureInStream(ISequentialInStream *stream, + const Byte *signature, unsigned signatureSize, + const UInt64 *limit, UInt64 &resPos) +{ + resPos = 0; + CByteBuffer byteBuffer2; + byteBuffer2.SetCapacity(signatureSize); + RINOK(ReadStream_FALSE(stream, byteBuffer2, signatureSize)); + + if (memcmp(byteBuffer2, signature, signatureSize) == 0) + return S_OK; + + const UInt32 kBufferSize = (1 << 16); + CByteBuffer byteBuffer; + byteBuffer.SetCapacity(kBufferSize); + Byte *buffer = byteBuffer; + UInt32 numPrevBytes = signatureSize - 1; + memcpy(buffer, (const Byte *)byteBuffer2 + 1, numPrevBytes); + resPos = 1; + for (;;) + { + if (limit != NULL) + if (resPos > *limit) + return S_FALSE; + do + { + UInt32 numReadBytes = kBufferSize - numPrevBytes; + UInt32 processedSize; + RINOK(stream->Read(buffer + numPrevBytes, numReadBytes, &processedSize)); + numPrevBytes += processedSize; + if (processedSize == 0) + return S_FALSE; + } + while (numPrevBytes < signatureSize); + UInt32 numTests = numPrevBytes - signatureSize + 1; + for (UInt32 pos = 0; pos < numTests; pos++) + { + Byte b = signature[0]; + for (; buffer[pos] != b && pos < numTests; pos++); + if (pos == numTests) + break; + if (memcmp(buffer + pos, signature, signatureSize) == 0) + { + resPos += pos; + return S_OK; + } + } + resPos += numTests; + numPrevBytes -= numTests; + memmove(buffer, buffer + numTests, numPrevBytes); + } +} diff --git a/CPP/7zip/Archive/Common/FindSignature.h b/CPP/7zip/Archive/Common/FindSignature.h new file mode 100644 index 0000000..e15af57 --- /dev/null +++ b/CPP/7zip/Archive/Common/FindSignature.h @@ -0,0 +1,12 @@ +// FindSignature.h + +#ifndef __FINDSIGNATURE_H +#define __FINDSIGNATURE_H + +#include "../../IStream.h" + +HRESULT FindSignatureInStream(ISequentialInStream *stream, + const Byte *signature, unsigned signatureSize, + const UInt64 *limit, UInt64 &resPos); + +#endif diff --git a/CPP/7zip/Archive/Common/HandlerOut.cpp b/CPP/7zip/Archive/Common/HandlerOut.cpp new file mode 100644 index 0000000..70ad47a --- /dev/null +++ b/CPP/7zip/Archive/Common/HandlerOut.cpp @@ -0,0 +1,623 @@ +// HandlerOut.cpp + +#include "StdAfx.h" + +#include "../../../Common/StringToInt.h" + +#include "../../../Windows/PropVariant.h" + +#ifndef _7ZIP_ST +#include "../../../Windows/System.h" +#endif + +#include "../../ICoder.h" + +#include "../Common/ParseProperties.h" + +#include "HandlerOut.h" + +using namespace NWindows; + +namespace NArchive { + +static const wchar_t *kCopyMethod = L"Copy"; +static const wchar_t *kLZMAMethodName = L"LZMA"; +static const wchar_t *kLZMA2MethodName = L"LZMA2"; +static const wchar_t *kBZip2MethodName = L"BZip2"; +static const wchar_t *kPpmdMethodName = L"PPMd"; +static const wchar_t *kDeflateMethodName = L"Deflate"; +static const wchar_t *kDeflate64MethodName = L"Deflate64"; + +static const wchar_t *kLzmaMatchFinderX1 = L"HC4"; +static const wchar_t *kLzmaMatchFinderX5 = L"BT4"; + +static const UInt32 kLzmaAlgoX1 = 0; +static const UInt32 kLzmaAlgoX5 = 1; + +static const UInt32 kLzmaDicSizeX1 = 1 << 16; +static const UInt32 kLzmaDicSizeX3 = 1 << 20; +static const UInt32 kLzmaDicSizeX5 = 1 << 24; +static const UInt32 kLzmaDicSizeX7 = 1 << 25; +static const UInt32 kLzmaDicSizeX9 = 1 << 26; + +static const UInt32 kLzmaFastBytesX1 = 32; +static const UInt32 kLzmaFastBytesX7 = 64; + +static const UInt32 kPpmdMemSizeX1 = (1 << 22); +static const UInt32 kPpmdMemSizeX5 = (1 << 24); +static const UInt32 kPpmdMemSizeX7 = (1 << 26); +static const UInt32 kPpmdMemSizeX9 = (192 << 20); + +static const UInt32 kPpmdOrderX1 = 4; +static const UInt32 kPpmdOrderX5 = 6; +static const UInt32 kPpmdOrderX7 = 16; +static const UInt32 kPpmdOrderX9 = 32; + +static const UInt32 kDeflateAlgoX1 = 0; +static const UInt32 kDeflateAlgoX5 = 1; + +static const UInt32 kDeflateFastBytesX1 = 32; +static const UInt32 kDeflateFastBytesX7 = 64; +static const UInt32 kDeflateFastBytesX9 = 128; + +static const UInt32 kDeflatePassesX1 = 1; +static const UInt32 kDeflatePassesX7 = 3; +static const UInt32 kDeflatePassesX9 = 10; + +static const UInt32 kBZip2NumPassesX1 = 1; +static const UInt32 kBZip2NumPassesX7 = 2; +static const UInt32 kBZip2NumPassesX9 = 7; + +static const UInt32 kBZip2DicSizeX1 = 100000; +static const UInt32 kBZip2DicSizeX3 = 500000; +static const UInt32 kBZip2DicSizeX5 = 900000; + +static const wchar_t *kDefaultMethodName = kLZMAMethodName; + +static const wchar_t *kLzmaMatchFinderForHeaders = L"BT2"; +static const UInt32 kDictionaryForHeaders = 1 << 20; +static const UInt32 kNumFastBytesForHeaders = 273; +static const UInt32 kAlgorithmForHeaders = kLzmaAlgoX5; + +static bool AreEqual(const UString &methodName, const wchar_t *s) + { return (methodName.CompareNoCase(s) == 0); } + +bool COneMethodInfo::IsLzma() const +{ + return + AreEqual(MethodName, kLZMAMethodName) || + AreEqual(MethodName, kLZMA2MethodName); +} + +static inline bool IsBZip2Method(const UString &methodName) + { return AreEqual(methodName, kBZip2MethodName); } + +static inline bool IsPpmdMethod(const UString &methodName) + { return AreEqual(methodName, kPpmdMethodName); } + +static inline bool IsDeflateMethod(const UString &methodName) +{ + return + AreEqual(methodName, kDeflateMethodName) || + AreEqual(methodName, kDeflate64MethodName); +} + +struct CNameToPropID +{ + PROPID PropID; + VARTYPE VarType; + const wchar_t *Name; +}; + +static CNameToPropID g_NameToPropID[] = +{ + { NCoderPropID::kBlockSize, VT_UI4, L"C" }, + { NCoderPropID::kDictionarySize, VT_UI4, L"D" }, + { NCoderPropID::kUsedMemorySize, VT_UI4, L"MEM" }, + + { NCoderPropID::kOrder, VT_UI4, L"O" }, + { NCoderPropID::kPosStateBits, VT_UI4, L"PB" }, + { NCoderPropID::kLitContextBits, VT_UI4, L"LC" }, + { NCoderPropID::kLitPosBits, VT_UI4, L"LP" }, + { NCoderPropID::kEndMarker, VT_BOOL, L"eos" }, + + { NCoderPropID::kNumPasses, VT_UI4, L"Pass" }, + { NCoderPropID::kNumFastBytes, VT_UI4, L"fb" }, + { NCoderPropID::kMatchFinderCycles, VT_UI4, L"mc" }, + { NCoderPropID::kAlgorithm, VT_UI4, L"a" }, + { NCoderPropID::kMatchFinder, VT_BSTR, L"mf" }, + { NCoderPropID::kNumThreads, VT_UI4, L"mt" }, + { NCoderPropID::kDefaultProp, VT_UI4, L"" } +}; + +static bool ConvertProperty(PROPVARIANT srcProp, VARTYPE varType, NCOM::CPropVariant &destProp) +{ + if (varType == srcProp.vt) + { + destProp = srcProp; + return true; + } + if (varType == VT_UI1) + { + if (srcProp.vt == VT_UI4) + { + UInt32 value = srcProp.ulVal; + if (value > 0xFF) + return false; + destProp = (Byte)value; + return true; + } + } + else if (varType == VT_BOOL) + { + bool res; + if (SetBoolProperty(res, srcProp) != S_OK) + return false; + destProp = res; + return true; + } + return false; +} + +static int FindPropIdExact(const UString &name) +{ + for (int i = 0; i < sizeof(g_NameToPropID) / sizeof(g_NameToPropID[0]); i++) + if (name.CompareNoCase(g_NameToPropID[i].Name) == 0) + return i; + return -1; +} + +static int FindPropIdStart(const UString &name) +{ + for (int i = 0; i < sizeof(g_NameToPropID) / sizeof(g_NameToPropID[0]); i++) + { + UString t = g_NameToPropID[i].Name; + if (t.CompareNoCase(name.Left(t.Length())) == 0) + return i; + } + return -1; +} + +static void SetMethodProp(COneMethodInfo &m, PROPID propID, const NCOM::CPropVariant &value) +{ + for (int j = 0; j < m.Props.Size(); j++) + if (m.Props[j].Id == propID) + return; + CProp prop; + prop.Id = propID; + prop.Value = value; + m.Props.Add(prop); +} + +void COutHandler::SetCompressionMethod2(COneMethodInfo &oneMethodInfo + #ifndef _7ZIP_ST + , UInt32 numThreads + #endif + ) +{ + UInt32 level = _level; + if (oneMethodInfo.MethodName.IsEmpty()) + oneMethodInfo.MethodName = kDefaultMethodName; + + if (oneMethodInfo.IsLzma()) + { + UInt32 dicSize = + (level >= 9 ? kLzmaDicSizeX9 : + (level >= 7 ? kLzmaDicSizeX7 : + (level >= 5 ? kLzmaDicSizeX5 : + (level >= 3 ? kLzmaDicSizeX3 : + kLzmaDicSizeX1)))); + + UInt32 algo = + (level >= 5 ? kLzmaAlgoX5 : + kLzmaAlgoX1); + + UInt32 fastBytes = + (level >= 7 ? kLzmaFastBytesX7 : + kLzmaFastBytesX1); + + const wchar_t *matchFinder = + (level >= 5 ? kLzmaMatchFinderX5 : + kLzmaMatchFinderX1); + + SetMethodProp(oneMethodInfo, NCoderPropID::kDictionarySize, dicSize); + SetMethodProp(oneMethodInfo, NCoderPropID::kAlgorithm, algo); + SetMethodProp(oneMethodInfo, NCoderPropID::kNumFastBytes, fastBytes); + SetMethodProp(oneMethodInfo, NCoderPropID::kMatchFinder, matchFinder); + #ifndef _7ZIP_ST + SetMethodProp(oneMethodInfo, NCoderPropID::kNumThreads, numThreads); + #endif + } + else if (IsDeflateMethod(oneMethodInfo.MethodName)) + { + UInt32 fastBytes = + (level >= 9 ? kDeflateFastBytesX9 : + (level >= 7 ? kDeflateFastBytesX7 : + kDeflateFastBytesX1)); + + UInt32 numPasses = + (level >= 9 ? kDeflatePassesX9 : + (level >= 7 ? kDeflatePassesX7 : + kDeflatePassesX1)); + + UInt32 algo = + (level >= 5 ? kDeflateAlgoX5 : + kDeflateAlgoX1); + + SetMethodProp(oneMethodInfo, NCoderPropID::kAlgorithm, algo); + SetMethodProp(oneMethodInfo, NCoderPropID::kNumFastBytes, fastBytes); + SetMethodProp(oneMethodInfo, NCoderPropID::kNumPasses, numPasses); + } + else if (IsBZip2Method(oneMethodInfo.MethodName)) + { + UInt32 numPasses = + (level >= 9 ? kBZip2NumPassesX9 : + (level >= 7 ? kBZip2NumPassesX7 : + kBZip2NumPassesX1)); + + UInt32 dicSize = + (level >= 5 ? kBZip2DicSizeX5 : + (level >= 3 ? kBZip2DicSizeX3 : + kBZip2DicSizeX1)); + + SetMethodProp(oneMethodInfo, NCoderPropID::kNumPasses, numPasses); + SetMethodProp(oneMethodInfo, NCoderPropID::kDictionarySize, dicSize); + #ifndef _7ZIP_ST + SetMethodProp(oneMethodInfo, NCoderPropID::kNumThreads, numThreads); + #endif + } + else if (IsPpmdMethod(oneMethodInfo.MethodName)) + { + UInt32 useMemSize = + (level >= 9 ? kPpmdMemSizeX9 : + (level >= 7 ? kPpmdMemSizeX7 : + (level >= 5 ? kPpmdMemSizeX5 : + kPpmdMemSizeX1))); + + UInt32 order = + (level >= 9 ? kPpmdOrderX9 : + (level >= 7 ? kPpmdOrderX7 : + (level >= 5 ? kPpmdOrderX5 : + kPpmdOrderX1))); + + SetMethodProp(oneMethodInfo, NCoderPropID::kUsedMemorySize, useMemSize); + SetMethodProp(oneMethodInfo, NCoderPropID::kOrder, order); + } +} + +static void SplitParams(const UString &srcString, UStringVector &subStrings) +{ + subStrings.Clear(); + UString name; + int len = srcString.Length(); + if (len == 0) + return; + for (int i = 0; i < len; i++) + { + wchar_t c = srcString[i]; + if (c == L':') + { + subStrings.Add(name); + name.Empty(); + } + else + name += c; + } + subStrings.Add(name); +} + +static void SplitParam(const UString ¶m, UString &name, UString &value) +{ + int eqPos = param.Find(L'='); + if (eqPos >= 0) + { + name = param.Left(eqPos); + value = param.Mid(eqPos + 1); + return; + } + for(int i = 0; i < param.Length(); i++) + { + wchar_t c = param[i]; + if (c >= L'0' && c <= L'9') + { + name = param.Left(i); + value = param.Mid(i); + return; + } + } + name = param; +} + +HRESULT COutHandler::SetParam(COneMethodInfo &oneMethodInfo, const UString &name, const UString &value) +{ + CProp prop; + int index = FindPropIdExact(name); + if (index < 0) + return E_INVALIDARG; + const CNameToPropID &nameToPropID = g_NameToPropID[index]; + prop.Id = nameToPropID.PropID; + + if (prop.Id == NCoderPropID::kBlockSize || + prop.Id == NCoderPropID::kDictionarySize || + prop.Id == NCoderPropID::kUsedMemorySize) + { + UInt32 dicSize; + RINOK(ParsePropDictionaryValue(value, dicSize)); + prop.Value = dicSize; + } + else + { + NCOM::CPropVariant propValue; + + if (nameToPropID.VarType == VT_BSTR) + propValue = value; + else if (nameToPropID.VarType == VT_BOOL) + { + bool res; + if (!StringToBool(value, res)) + return E_INVALIDARG; + propValue = res; + } + else + { + UInt32 number; + if (ParseStringToUInt32(value, number) == value.Length()) + propValue = number; + else + propValue = value; + } + + if (!ConvertProperty(propValue, nameToPropID.VarType, prop.Value)) + return E_INVALIDARG; + } + oneMethodInfo.Props.Add(prop); + return S_OK; +} + +HRESULT COutHandler::SetParams(COneMethodInfo &oneMethodInfo, const UString &srcString) +{ + UStringVector params; + SplitParams(srcString, params); + if (params.Size() > 0) + oneMethodInfo.MethodName = params[0]; + for (int i = 1; i < params.Size(); i++) + { + const UString ¶m = params[i]; + UString name, value; + SplitParam(param, name, value); + RINOK(SetParam(oneMethodInfo, name, value)); + } + return S_OK; +} + +HRESULT COutHandler::SetSolidSettings(const UString &s) +{ + UString s2 = s; + s2.MakeUpper(); + for (int i = 0; i < s2.Length();) + { + const wchar_t *start = ((const wchar_t *)s2) + i; + const wchar_t *end; + UInt64 v = ConvertStringToUInt64(start, &end); + if (start == end) + { + if (s2[i++] != 'E') + return E_INVALIDARG; + _solidExtension = true; + continue; + } + i += (int)(end - start); + if (i == s2.Length()) + return E_INVALIDARG; + wchar_t c = s2[i++]; + switch(c) + { + case 'F': + if (v < 1) + v = 1; + _numSolidFiles = v; + break; + case 'B': + _numSolidBytes = v; + _numSolidBytesDefined = true; + break; + case 'K': + _numSolidBytes = (v << 10); + _numSolidBytesDefined = true; + break; + case 'M': + _numSolidBytes = (v << 20); + _numSolidBytesDefined = true; + break; + case 'G': + _numSolidBytes = (v << 30); + _numSolidBytesDefined = true; + break; + default: + return E_INVALIDARG; + } + } + return S_OK; +} + +HRESULT COutHandler::SetSolidSettings(const PROPVARIANT &value) +{ + bool isSolid; + switch(value.vt) + { + case VT_EMPTY: + isSolid = true; + break; + case VT_BOOL: + isSolid = (value.boolVal != VARIANT_FALSE); + break; + case VT_BSTR: + if (StringToBool(value.bstrVal, isSolid)) + break; + return SetSolidSettings(value.bstrVal); + default: + return E_INVALIDARG; + } + if (isSolid) + InitSolid(); + else + _numSolidFiles = 1; + return S_OK; +} + +void COutHandler::Init() +{ + _removeSfxBlock = false; + _compressHeaders = true; + _encryptHeadersSpecified = false; + _encryptHeaders = false; + + WriteCTime = false; + WriteATime = false; + WriteMTime = true; + + #ifndef _7ZIP_ST + _numThreads = NSystem::GetNumberOfProcessors(); + #endif + + _level = 5; + _autoFilter = true; + _volumeMode = false; + _crcSize = 4; + InitSolid(); +} + +void COutHandler::BeforeSetProperty() +{ + Init(); + #ifndef _7ZIP_ST + numProcessors = NSystem::GetNumberOfProcessors(); + #endif + + mainDicSize = 0xFFFFFFFF; + mainDicMethodIndex = 0xFFFFFFFF; + minNumber = 0; + _crcSize = 4; +} + +HRESULT COutHandler::SetProperty(const wchar_t *nameSpec, const PROPVARIANT &value) +{ + UString name = nameSpec; + name.MakeUpper(); + if (name.IsEmpty()) + return E_INVALIDARG; + + if (name[0] == 'X') + { + name.Delete(0); + _level = 9; + return ParsePropValue(name, value, _level); + } + + if (name[0] == L'S') + { + name.Delete(0); + if (name.IsEmpty()) + return SetSolidSettings(value); + if (value.vt != VT_EMPTY) + return E_INVALIDARG; + return SetSolidSettings(name); + } + + if (name == L"CRC") + { + _crcSize = 4; + name.Delete(0, 3); + return ParsePropValue(name, value, _crcSize); + } + + UInt32 number; + int index = ParseStringToUInt32(name, number); + UString realName = name.Mid(index); + if (index == 0) + { + if(name.Left(2).CompareNoCase(L"MT") == 0) + { + #ifndef _7ZIP_ST + RINOK(ParseMtProp(name.Mid(2), value, numProcessors, _numThreads)); + #endif + return S_OK; + } + if (name.CompareNoCase(L"RSFX") == 0) return SetBoolProperty(_removeSfxBlock, value); + if (name.CompareNoCase(L"F") == 0) return SetBoolProperty(_autoFilter, value); + if (name.CompareNoCase(L"HC") == 0) return SetBoolProperty(_compressHeaders, value); + if (name.CompareNoCase(L"HCF") == 0) + { + bool compressHeadersFull = true; + RINOK(SetBoolProperty(compressHeadersFull, value)); + if (!compressHeadersFull) + return E_INVALIDARG; + return S_OK; + } + if (name.CompareNoCase(L"HE") == 0) + { + RINOK(SetBoolProperty(_encryptHeaders, value)); + _encryptHeadersSpecified = true; + return S_OK; + } + if (name.CompareNoCase(L"TC") == 0) return SetBoolProperty(WriteCTime, value); + if (name.CompareNoCase(L"TA") == 0) return SetBoolProperty(WriteATime, value); + if (name.CompareNoCase(L"TM") == 0) return SetBoolProperty(WriteMTime, value); + if (name.CompareNoCase(L"V") == 0) return SetBoolProperty(_volumeMode, value); + number = 0; + } + if (number > 10000) + return E_FAIL; + if (number < minNumber) + return E_INVALIDARG; + number -= minNumber; + for(int j = _methods.Size(); j <= (int)number; j++) + { + COneMethodInfo oneMethodInfo; + _methods.Add(oneMethodInfo); + } + + COneMethodInfo &oneMethodInfo = _methods[number]; + + if (realName.Length() == 0) + { + if (value.vt != VT_BSTR) + return E_INVALIDARG; + + RINOK(SetParams(oneMethodInfo, value.bstrVal)); + } + else + { + int index = FindPropIdStart(realName); + if (index < 0) + return E_INVALIDARG; + const CNameToPropID &nameToPropID = g_NameToPropID[index]; + CProp prop; + prop.Id = nameToPropID.PropID; + + if (prop.Id == NCoderPropID::kBlockSize || + prop.Id == NCoderPropID::kDictionarySize || + prop.Id == NCoderPropID::kUsedMemorySize) + { + UInt32 dicSize; + RINOK(ParsePropDictionaryValue(realName.Mid(MyStringLen(nameToPropID.Name)), value, dicSize)); + prop.Value = dicSize; + if (number <= mainDicMethodIndex) + mainDicSize = dicSize; + } + else + { + int index = FindPropIdExact(realName); + if (index < 0) + return E_INVALIDARG; + const CNameToPropID &nameToPropID = g_NameToPropID[index]; + prop.Id = nameToPropID.PropID; + if (!ConvertProperty(value, nameToPropID.VarType, prop.Value)) + return E_INVALIDARG; + } + oneMethodInfo.Props.Add(prop); + } + return S_OK; +} + +} diff --git a/CPP/7zip/Archive/Common/HandlerOut.h b/CPP/7zip/Archive/Common/HandlerOut.h new file mode 100644 index 0000000..72ea403 --- /dev/null +++ b/CPP/7zip/Archive/Common/HandlerOut.h @@ -0,0 +1,87 @@ +// HandlerOut.h + +#ifndef __HANDLER_OUT_H +#define __HANDLER_OUT_H + +#include "../../../Common/MyString.h" +#include "../../Common/MethodProps.h" + +namespace NArchive { + +struct COneMethodInfo +{ + CObjectVector Props; + UString MethodName; + + bool IsLzma() const; +}; + +class COutHandler +{ +public: + HRESULT SetProperty(const wchar_t *name, const PROPVARIANT &value); + + HRESULT SetSolidSettings(const UString &s); + HRESULT SetSolidSettings(const PROPVARIANT &value); + + #ifndef _7ZIP_ST + UInt32 _numThreads; + #endif + + UInt32 _crcSize; + + CObjectVector _methods; + bool _removeSfxBlock; + + UInt64 _numSolidFiles; + UInt64 _numSolidBytes; + bool _numSolidBytesDefined; + bool _solidExtension; + + bool _compressHeaders; + bool _encryptHeadersSpecified; + bool _encryptHeaders; + + bool WriteCTime; + bool WriteATime; + bool WriteMTime; + + bool _autoFilter; + UInt32 _level; + + bool _volumeMode; + + HRESULT SetParam(COneMethodInfo &oneMethodInfo, const UString &name, const UString &value); + HRESULT SetParams(COneMethodInfo &oneMethodInfo, const UString &srcString); + + void SetCompressionMethod2(COneMethodInfo &oneMethodInfo + #ifndef _7ZIP_ST + , UInt32 numThreads + #endif + ); + + void InitSolidFiles() { _numSolidFiles = (UInt64)(Int64)(-1); } + void InitSolidSize() { _numSolidBytes = (UInt64)(Int64)(-1); } + void InitSolid() + { + InitSolidFiles(); + InitSolidSize(); + _solidExtension = false; + _numSolidBytesDefined = false; + } + + void Init(); + + COutHandler() { Init(); } + + void BeforeSetProperty(); + + UInt32 minNumber; + UInt32 numProcessors; + UInt32 mainDicSize; + UInt32 mainDicMethodIndex; +}; + +} + +#endif diff --git a/CPP/7zip/Archive/Common/InStreamWithCRC.cpp b/CPP/7zip/Archive/Common/InStreamWithCRC.cpp new file mode 100644 index 0000000..569a56f --- /dev/null +++ b/CPP/7zip/Archive/Common/InStreamWithCRC.cpp @@ -0,0 +1,42 @@ +// InStreamWithCRC.cpp + +#include "StdAfx.h" + +#include "InStreamWithCRC.h" + +STDMETHODIMP CSequentialInStreamWithCRC::Read(void *data, UInt32 size, UInt32 *processedSize) +{ + UInt32 realProcessedSize; + HRESULT result = _stream->Read(data, size, &realProcessedSize); + _size += realProcessedSize; + if (size > 0 && realProcessedSize == 0) + _wasFinished = true; + _crc = CrcUpdate(_crc, data, realProcessedSize); + if(processedSize != NULL) + *processedSize = realProcessedSize; + return result; +} + +STDMETHODIMP CInStreamWithCRC::Read(void *data, UInt32 size, UInt32 *processedSize) +{ + UInt32 realProcessedSize; + HRESULT result = _stream->Read(data, size, &realProcessedSize); + /* + if (size > 0 && realProcessedSize == 0) + _wasFinished = true; + */ + _size += realProcessedSize; + _crc = CrcUpdate(_crc, data, realProcessedSize); + if(processedSize != NULL) + *processedSize = realProcessedSize; + return result; +} + +STDMETHODIMP CInStreamWithCRC::Seek(Int64 offset, UInt32 seekOrigin, UInt64 *newPosition) +{ + if (seekOrigin != STREAM_SEEK_SET || offset != 0) + return E_FAIL; + _size = 0; + _crc = CRC_INIT_VAL; + return _stream->Seek(offset, seekOrigin, newPosition); +} diff --git a/CPP/7zip/Archive/Common/InStreamWithCRC.h b/CPP/7zip/Archive/Common/InStreamWithCRC.h new file mode 100644 index 0000000..31b761e --- /dev/null +++ b/CPP/7zip/Archive/Common/InStreamWithCRC.h @@ -0,0 +1,67 @@ +// InStreamWithCRC.h + +#ifndef __IN_STREAM_WITH_CRC_H +#define __IN_STREAM_WITH_CRC_H + +#include "../../../../C/7zCrc.h" + +#include "../../../Common/MyCom.h" + +#include "../../IStream.h" + +class CSequentialInStreamWithCRC: + public ISequentialInStream, + public CMyUnknownImp +{ +public: + MY_UNKNOWN_IMP + + STDMETHOD(Read)(void *data, UInt32 size, UInt32 *processedSize); +private: + CMyComPtr _stream; + UInt64 _size; + UInt32 _crc; + bool _wasFinished; +public: + void SetStream(ISequentialInStream *stream) { _stream = stream; } + void Init() + { + _size = 0; + _wasFinished = false; + _crc = CRC_INIT_VAL; + } + void ReleaseStream() { _stream.Release(); } + UInt32 GetCRC() const { return CRC_GET_DIGEST(_crc); } + UInt64 GetSize() const { return _size; } + bool WasFinished() const { return _wasFinished; } +}; + +class CInStreamWithCRC: + public IInStream, + public CMyUnknownImp +{ +public: + MY_UNKNOWN_IMP1(IInStream) + + STDMETHOD(Read)(void *data, UInt32 size, UInt32 *processedSize); + STDMETHOD(Seek)(Int64 offset, UInt32 seekOrigin, UInt64 *newPosition); +private: + CMyComPtr _stream; + UInt64 _size; + UInt32 _crc; + // bool _wasFinished; +public: + void SetStream(IInStream *stream) { _stream = stream; } + void Init() + { + _size = 0; + // _wasFinished = false; + _crc = CRC_INIT_VAL; + } + void ReleaseStream() { _stream.Release(); } + UInt32 GetCRC() const { return CRC_GET_DIGEST(_crc); } + UInt64 GetSize() const { return _size; } + // bool WasFinished() const { return _wasFinished; } +}; + +#endif diff --git a/CPP/7zip/Archive/Common/ItemNameUtils.cpp b/CPP/7zip/Archive/Common/ItemNameUtils.cpp new file mode 100644 index 0000000..a5e0dc0 --- /dev/null +++ b/CPP/7zip/Archive/Common/ItemNameUtils.cpp @@ -0,0 +1,61 @@ +// Archive/Common/ItemNameUtils.cpp + +#include "StdAfx.h" + +#include "../../../../C/Types.h" + +#include "ItemNameUtils.h" + +namespace NArchive { +namespace NItemName { + +static const wchar_t kOSDirDelimiter = WCHAR_PATH_SEPARATOR; +static const wchar_t kDirDelimiter = L'/'; + +UString MakeLegalName(const UString &name) +{ + UString zipName = name; + zipName.Replace(kOSDirDelimiter, kDirDelimiter); + return zipName; +} + +UString GetOSName(const UString &name) +{ + UString newName = name; + newName.Replace(kDirDelimiter, kOSDirDelimiter); + return newName; +} + +UString GetOSName2(const UString &name) +{ + if (name.IsEmpty()) + return UString(); + UString newName = GetOSName(name); + if (newName[newName.Length() - 1] == kOSDirDelimiter) + newName.Delete(newName.Length() - 1); + return newName; +} + +bool HasTailSlash(const AString &name, UINT codePage) +{ + if (name.IsEmpty()) + return false; + LPCSTR prev = + #if defined(_WIN32) && !defined(UNDER_CE) + CharPrevExA((WORD)codePage, name, &name[name.Length()], 0); + #else + (LPCSTR)(name) + (name.Length() - 1); + #endif + return (*prev == '/'); +} + +#ifndef _WIN32 +UString WinNameToOSName(const UString &name) +{ + UString newName = name; + newName.Replace(L'\\', kOSDirDelimiter); + return newName; +} +#endif + +}} diff --git a/CPP/7zip/Archive/Common/ItemNameUtils.h b/CPP/7zip/Archive/Common/ItemNameUtils.h new file mode 100644 index 0000000..5eafacb --- /dev/null +++ b/CPP/7zip/Archive/Common/ItemNameUtils.h @@ -0,0 +1,24 @@ +// Archive/Common/ItemNameUtils.h + +#ifndef __ARCHIVE_ITEMNAMEUTILS_H +#define __ARCHIVE_ITEMNAMEUTILS_H + +#include "../../../Common/MyString.h" + +namespace NArchive { +namespace NItemName { + + UString MakeLegalName(const UString &name); + UString GetOSName(const UString &name); + UString GetOSName2(const UString &name); + bool HasTailSlash(const AString &name, UINT codePage); + + #ifdef _WIN32 + inline UString WinNameToOSName(const UString &name) { return name; } + #else + UString WinNameToOSName(const UString &name); + #endif + +}} + +#endif diff --git a/CPP/7zip/Archive/Common/MultiStream.cpp b/CPP/7zip/Archive/Common/MultiStream.cpp new file mode 100644 index 0000000..04d11ca --- /dev/null +++ b/CPP/7zip/Archive/Common/MultiStream.cpp @@ -0,0 +1,190 @@ +// MultiStream.cpp + +#include "StdAfx.h" + +#include "MultiStream.h" + +STDMETHODIMP CMultiStream::Read(void *data, UInt32 size, UInt32 *processedSize) +{ + if (processedSize) + *processedSize = 0; + if (size == 0) + return S_OK; + if (_pos >= _totalLength) + return (_pos == _totalLength) ? S_OK : E_FAIL; + + { + int left = 0, mid = _streamIndex, right = Streams.Size(); + for (;;) + { + CSubStreamInfo &m = Streams[mid]; + if (_pos < m.GlobalOffset) + right = mid; + else if (_pos >= m.GlobalOffset + m.Size) + left = mid + 1; + else + { + _streamIndex = mid; + break; + } + mid = (left + right) / 2; + } + _streamIndex = mid; + } + + CSubStreamInfo &s = Streams[_streamIndex]; + UInt64 localPos = _pos - s.GlobalOffset; + if (localPos != s.LocalPos) + { + RINOK(s.Stream->Seek(localPos, STREAM_SEEK_SET, &s.LocalPos)); + } + UInt64 rem = s.Size - localPos; + if (size > rem) + size = (UInt32)rem; + HRESULT result = s.Stream->Read(data, size, &size); + _pos += size; + s.LocalPos += size; + if (processedSize) + *processedSize = size; + return result; +} + +STDMETHODIMP CMultiStream::Seek(Int64 offset, UInt32 seekOrigin, UInt64 *newPosition) +{ + switch(seekOrigin) + { + case STREAM_SEEK_SET: _pos = offset; break; + case STREAM_SEEK_CUR: _pos = _pos + offset; break; + case STREAM_SEEK_END: _pos = _totalLength + offset; break; + default: return STG_E_INVALIDFUNCTION; + } + if (newPosition != 0) + *newPosition = _pos; + return S_OK; +} + + +/* +class COutVolumeStream: + public ISequentialOutStream, + public CMyUnknownImp +{ + int _volIndex; + UInt64 _volSize; + UInt64 _curPos; + CMyComPtr _volumeStream; + COutArchive _archive; + CCRC _crc; + +public: + MY_UNKNOWN_IMP + + CFileItem _file; + CUpdateOptions _options; + CMyComPtr VolumeCallback; + void Init(IArchiveUpdateCallback2 *volumeCallback, + const UString &name) + { + _file.Name = name; + _file.IsStartPosDefined = true; + _file.StartPos = 0; + + VolumeCallback = volumeCallback; + _volIndex = 0; + _volSize = 0; + } + + HRESULT Flush(); + STDMETHOD(Write)(const void *data, UInt32 size, UInt32 *processedSize); +}; + +HRESULT COutVolumeStream::Flush() +{ + if (_volumeStream) + { + _file.UnPackSize = _curPos; + _file.FileCRC = _crc.GetDigest(); + RINOK(WriteVolumeHeader(_archive, _file, _options)); + _archive.Close(); + _volumeStream.Release(); + _file.StartPos += _file.UnPackSize; + } + return S_OK; +} +*/ + +/* +STDMETHODIMP COutMultiStream::Write(const void *data, UInt32 size, UInt32 *processedSize) +{ + if(processedSize != NULL) + *processedSize = 0; + while(size > 0) + { + if (_streamIndex >= Streams.Size()) + { + CSubStreamInfo subStream; + RINOK(VolumeCallback->GetVolumeSize(Streams.Size(), &subStream.Size)); + RINOK(VolumeCallback->GetVolumeStream(Streams.Size(), &subStream.Stream)); + subStream.Pos = 0; + Streams.Add(subStream); + continue; + } + CSubStreamInfo &subStream = Streams[_streamIndex]; + if (_offsetPos >= subStream.Size) + { + _offsetPos -= subStream.Size; + _streamIndex++; + continue; + } + if (_offsetPos != subStream.Pos) + { + CMyComPtr outStream; + RINOK(subStream.Stream.QueryInterface(IID_IOutStream, &outStream)); + RINOK(outStream->Seek(_offsetPos, STREAM_SEEK_SET, NULL)); + subStream.Pos = _offsetPos; + } + + UInt32 curSize = (UInt32)MyMin((UInt64)size, subStream.Size - subStream.Pos); + UInt32 realProcessed; + RINOK(subStream.Stream->Write(data, curSize, &realProcessed)); + data = (void *)((Byte *)data + realProcessed); + size -= realProcessed; + subStream.Pos += realProcessed; + _offsetPos += realProcessed; + _absPos += realProcessed; + if (_absPos > _length) + _length = _absPos; + if(processedSize != NULL) + *processedSize += realProcessed; + if (subStream.Pos == subStream.Size) + { + _streamIndex++; + _offsetPos = 0; + } + if (realProcessed != curSize && realProcessed == 0) + return E_FAIL; + } + return S_OK; +} + +STDMETHODIMP COutMultiStream::Seek(Int64 offset, UInt32 seekOrigin, UInt64 *newPosition) +{ + if(seekOrigin >= 3) + return STG_E_INVALIDFUNCTION; + switch(seekOrigin) + { + case STREAM_SEEK_SET: + _absPos = offset; + break; + case STREAM_SEEK_CUR: + _absPos += offset; + break; + case STREAM_SEEK_END: + _absPos = _length + offset; + break; + } + _offsetPos = _absPos; + _streamIndex = 0; + return S_OK; +} +*/ diff --git a/CPP/7zip/Archive/Common/MultiStream.h b/CPP/7zip/Archive/Common/MultiStream.h new file mode 100644 index 0000000..3fceb7c --- /dev/null +++ b/CPP/7zip/Archive/Common/MultiStream.h @@ -0,0 +1,84 @@ +// MultiStream.h + +#ifndef __MULTI_STREAM_H +#define __MULTI_STREAM_H + +#include "../../../Common/MyCom.h" +#include "../../../Common/MyVector.h" + +#include "../../IStream.h" + +class CMultiStream: + public IInStream, + public CMyUnknownImp +{ + UInt64 _pos; + UInt64 _totalLength; + int _streamIndex; +public: + struct CSubStreamInfo + { + CMyComPtr Stream; + UInt64 Size; + UInt64 GlobalOffset; + UInt64 LocalPos; + }; + CObjectVector Streams; + + HRESULT Init() + { + UInt64 total = 0; + for (int i = 0; i < Streams.Size(); i++) + { + CSubStreamInfo &s = Streams[i]; + s.GlobalOffset = total; + total += Streams[i].Size; + RINOK(s.Stream->Seek(0, STREAM_SEEK_CUR, &s.LocalPos)); + } + _totalLength = total; + _pos = 0; + _streamIndex = 0; + return S_OK; + } + + MY_UNKNOWN_IMP1(IInStream) + + STDMETHOD(Read)(void *data, UInt32 size, UInt32 *processedSize); + STDMETHOD(Seek)(Int64 offset, UInt32 seekOrigin, UInt64 *newPosition); +}; + +/* +class COutMultiStream: + public IOutStream, + public CMyUnknownImp +{ + int _streamIndex; // required stream + UInt64 _offsetPos; // offset from start of _streamIndex index + UInt64 _absPos; + UInt64 _length; + + struct CSubStreamInfo + { + CMyComPtr Stream; + UInt64 Size; + UInt64 Pos; + }; + CObjectVector Streams; +public: + CMyComPtr VolumeCallback; + void Init() + { + _streamIndex = 0; + _offsetPos = 0; + _absPos = 0; + _length = 0; + } + + MY_UNKNOWN_IMP1(IOutStream) + + STDMETHOD(Write)(const void *data, UInt32 size, UInt32 *processedSize); + STDMETHOD(Seek)(Int64 offset, UInt32 seekOrigin, UInt64 *newPosition); +}; +*/ + +#endif diff --git a/CPP/7zip/Archive/Common/OutStreamWithCRC.cpp b/CPP/7zip/Archive/Common/OutStreamWithCRC.cpp new file mode 100644 index 0000000..f955c22 --- /dev/null +++ b/CPP/7zip/Archive/Common/OutStreamWithCRC.cpp @@ -0,0 +1,18 @@ +// OutStreamWithCRC.cpp + +#include "StdAfx.h" + +#include "OutStreamWithCRC.h" + +STDMETHODIMP COutStreamWithCRC::Write(const void *data, UInt32 size, UInt32 *processedSize) +{ + HRESULT result = S_OK; + if (_stream) + result = _stream->Write(data, size, &size); + if (_calculate) + _crc = CrcUpdate(_crc, data, size); + _size += size; + if (processedSize != NULL) + *processedSize = size; + return result; +} diff --git a/CPP/7zip/Archive/Common/OutStreamWithCRC.h b/CPP/7zip/Archive/Common/OutStreamWithCRC.h new file mode 100644 index 0000000..115b442 --- /dev/null +++ b/CPP/7zip/Archive/Common/OutStreamWithCRC.h @@ -0,0 +1,36 @@ +// OutStreamWithCRC.h + +#ifndef __OUT_STREAM_WITH_CRC_H +#define __OUT_STREAM_WITH_CRC_H + +#include "../../../../C/7zCrc.h" + +#include "../../../Common/MyCom.h" + +#include "../../IStream.h" + +class COutStreamWithCRC: + public ISequentialOutStream, + public CMyUnknownImp +{ + CMyComPtr _stream; + UInt64 _size; + UInt32 _crc; + bool _calculate; +public: + MY_UNKNOWN_IMP + STDMETHOD(Write)(const void *data, UInt32 size, UInt32 *processedSize); + void SetStream(ISequentialOutStream *stream) { _stream = stream; } + void ReleaseStream() { _stream.Release(); } + void Init(bool calculate = true) + { + _size = 0; + _calculate = calculate; + _crc = CRC_INIT_VAL; + } + void InitCRC() { _crc = CRC_INIT_VAL; } + UInt64 GetSize() const { return _size; } + UInt32 GetCRC() const { return CRC_GET_DIGEST(_crc); } +}; + +#endif diff --git a/CPP/7zip/Archive/Common/OutStreamWithSha1.cpp b/CPP/7zip/Archive/Common/OutStreamWithSha1.cpp new file mode 100644 index 0000000..0526c1b --- /dev/null +++ b/CPP/7zip/Archive/Common/OutStreamWithSha1.cpp @@ -0,0 +1,18 @@ +// OutStreamWithSha1.cpp + +#include "StdAfx.h" + +#include "OutStreamWithSha1.h" + +STDMETHODIMP COutStreamWithSha1::Write(const void *data, UInt32 size, UInt32 *processedSize) +{ + HRESULT result = S_OK; + if (_stream) + result = _stream->Write(data, size, &size); + if (_calculate) + _sha.Update((const Byte *)data, size); + _size += size; + if (processedSize != NULL) + *processedSize = size; + return result; +} diff --git a/CPP/7zip/Archive/Common/OutStreamWithSha1.h b/CPP/7zip/Archive/Common/OutStreamWithSha1.h new file mode 100644 index 0000000..3bbfbbe --- /dev/null +++ b/CPP/7zip/Archive/Common/OutStreamWithSha1.h @@ -0,0 +1,36 @@ +// OutStreamWithSha1.h + +#ifndef __OUT_STREAM_WITH_SHA1_H +#define __OUT_STREAM_WITH_SHA1_H + +#include "../../Crypto/Sha1.h" + +#include "../../../Common/MyCom.h" + +#include "../../IStream.h" + +class COutStreamWithSha1: + public ISequentialOutStream, + public CMyUnknownImp +{ + CMyComPtr _stream; + UInt64 _size; + NCrypto::NSha1::CContext _sha; + bool _calculate; +public: + MY_UNKNOWN_IMP + STDMETHOD(Write)(const void *data, UInt32 size, UInt32 *processedSize); + void SetStream(ISequentialOutStream *stream) { _stream = stream; } + void ReleaseStream() { _stream.Release(); } + void Init(bool calculate = true) + { + _size = 0; + _calculate = calculate; + _sha.Init(); + } + void InitSha1() { _sha.Init(); } + UInt64 GetSize() const { return _size; } + void Final(Byte *digest) { _sha.Final(digest); } +}; + +#endif diff --git a/CPP/7zip/Archive/Common/ParseProperties.cpp b/CPP/7zip/Archive/Common/ParseProperties.cpp new file mode 100644 index 0000000..5cd849e --- /dev/null +++ b/CPP/7zip/Archive/Common/ParseProperties.cpp @@ -0,0 +1,177 @@ +// ParseProperties.cpp + +#include "StdAfx.h" + +#include "ParseProperties.h" + +#include "Common/StringToInt.h" +#include "Common/MyCom.h" + +HRESULT ParsePropValue(const UString &name, const PROPVARIANT &prop, UInt32 &resValue) +{ + if (prop.vt == VT_UI4) + { + if (!name.IsEmpty()) + return E_INVALIDARG; + resValue = prop.ulVal; + } + else if (prop.vt == VT_EMPTY) + { + if(!name.IsEmpty()) + { + const wchar_t *start = name; + const wchar_t *end; + UInt64 v = ConvertStringToUInt64(start, &end); + if (end - start != name.Length()) + return E_INVALIDARG; + resValue = (UInt32)v; + } + } + else + return E_INVALIDARG; + return S_OK; +} + +static const int kLogarithmicSizeLimit = 32; +static const wchar_t kByteSymbol = L'B'; +static const wchar_t kKiloByteSymbol = L'K'; +static const wchar_t kMegaByteSymbol = L'M'; + +HRESULT ParsePropDictionaryValue(const UString &srcStringSpec, UInt32 &dicSize) +{ + UString srcString = srcStringSpec; + srcString.MakeUpper(); + + const wchar_t *start = srcString; + const wchar_t *end; + UInt64 number = ConvertStringToUInt64(start, &end); + int numDigits = (int)(end - start); + if (numDigits == 0 || srcString.Length() > numDigits + 1) + return E_INVALIDARG; + if (srcString.Length() == numDigits) + { + if (number >= kLogarithmicSizeLimit) + return E_INVALIDARG; + dicSize = (UInt32)1 << (int)number; + return S_OK; + } + switch (srcString[numDigits]) + { + case kByteSymbol: + if (number >= ((UInt64)1 << kLogarithmicSizeLimit)) + return E_INVALIDARG; + dicSize = (UInt32)number; + break; + case kKiloByteSymbol: + if (number >= ((UInt64)1 << (kLogarithmicSizeLimit - 10))) + return E_INVALIDARG; + dicSize = (UInt32)(number << 10); + break; + case kMegaByteSymbol: + if (number >= ((UInt64)1 << (kLogarithmicSizeLimit - 20))) + return E_INVALIDARG; + dicSize = (UInt32)(number << 20); + break; + default: + return E_INVALIDARG; + } + return S_OK; +} + +HRESULT ParsePropDictionaryValue(const UString &name, const PROPVARIANT &prop, UInt32 &resValue) +{ + if (name.IsEmpty()) + { + if (prop.vt == VT_UI4) + { + UInt32 logDicSize = prop.ulVal; + if (logDicSize >= 32) + return E_INVALIDARG; + resValue = (UInt32)1 << logDicSize; + return S_OK; + } + if (prop.vt == VT_BSTR) + return ParsePropDictionaryValue(prop.bstrVal, resValue); + return E_INVALIDARG; + } + return ParsePropDictionaryValue(name, resValue); +} + +bool StringToBool(const UString &s, bool &res) +{ + if (s.IsEmpty() || s.CompareNoCase(L"ON") == 0 || s.Compare(L"+") == 0) + { + res = true; + return true; + } + if (s.CompareNoCase(L"OFF") == 0 || s.Compare(L"-") == 0) + { + res = false; + return true; + } + return false; +} + +HRESULT SetBoolProperty(bool &dest, const PROPVARIANT &value) +{ + switch(value.vt) + { + case VT_EMPTY: + dest = true; + return S_OK; + case VT_BOOL: + dest = (value.boolVal != VARIANT_FALSE); + return S_OK; + /* + case VT_UI4: + dest = (value.ulVal != 0); + break; + */ + case VT_BSTR: + return StringToBool(value.bstrVal, dest) ? S_OK : E_INVALIDARG; + } + return E_INVALIDARG; +} + +int ParseStringToUInt32(const UString &srcString, UInt32 &number) +{ + const wchar_t *start = srcString; + const wchar_t *end; + UInt64 number64 = ConvertStringToUInt64(start, &end); + if (number64 > 0xFFFFFFFF) + { + number = 0; + return 0; + } + number = (UInt32)number64; + return (int)(end - start); +} + +HRESULT ParseMtProp(const UString &name, const PROPVARIANT &prop, UInt32 defaultNumThreads, UInt32 &numThreads) +{ + if (name.IsEmpty()) + { + switch(prop.vt) + { + case VT_UI4: + numThreads = prop.ulVal; + break; + default: + { + bool val; + RINOK(SetBoolProperty(val, prop)); + numThreads = (val ? defaultNumThreads : 1); + break; + } + } + } + else + { + UInt32 number; + int index = ParseStringToUInt32(name, number); + if (index != name.Length()) + return E_INVALIDARG; + numThreads = number; + } + return S_OK; +} diff --git a/CPP/7zip/Archive/Common/ParseProperties.h b/CPP/7zip/Archive/Common/ParseProperties.h new file mode 100644 index 0000000..6f80f63 --- /dev/null +++ b/CPP/7zip/Archive/Common/ParseProperties.h @@ -0,0 +1,18 @@ +// ParseProperties.h + +#ifndef __PARSEPROPERTIES_H +#define __PARSEPROPERTIES_H + +#include "Common/MyString.h" +#include "Common/Types.h" + +HRESULT ParsePropValue(const UString &name, const PROPVARIANT &prop, UInt32 &resValue); +HRESULT ParsePropDictionaryValue(const UString &srcStringSpec, UInt32 &dicSize); +HRESULT ParsePropDictionaryValue(const UString &name, const PROPVARIANT &prop, UInt32 &resValue); + +bool StringToBool(const UString &s, bool &res); +HRESULT SetBoolProperty(bool &dest, const PROPVARIANT &value); +int ParseStringToUInt32(const UString &srcString, UInt32 &number); +HRESULT ParseMtProp(const UString &name, const PROPVARIANT &prop, UInt32 defaultNumThreads, UInt32 &numThreads); + +#endif diff --git a/CPP/7zip/Archive/CpioHandler.cpp b/CPP/7zip/Archive/CpioHandler.cpp new file mode 100644 index 0000000..0f32ef6 --- /dev/null +++ b/CPP/7zip/Archive/CpioHandler.cpp @@ -0,0 +1,624 @@ +// CpioHandler.cpp + +#include "StdAfx.h" + +#include "Common/ComTry.h" +#include "Common/StringConvert.h" +#include "Common/StringToInt.h" + +#include "Windows/PropVariant.h" +#include "Windows/Time.h" + +#include "../Common/LimitedStreams.h" +#include "../Common/ProgressUtils.h" +#include "../Common/RegisterArc.h" +#include "../Common/StreamUtils.h" + +#include "../Compress/CopyCoder.h" + +#include "Common/ItemNameUtils.h" + +namespace NArchive { +namespace NCpio { + +namespace NFileHeader +{ + namespace NMagic + { + const char *kMagic1 = "070701"; + const char *kMagic2 = "070702"; + const char *kMagic3 = "070707"; + const char *kEndName = "TRAILER!!!"; + + const Byte kMagicForRecord2[2] = { 0xC7, 0x71 }; + } + + const UInt32 kRecord2Size = 26; + /* + 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]; + }; + */ + + const UInt32 kRecordSize = 110; + /* + 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() const + { return memcmp(Magic, NMagic::kMagic1, 6) == 0 || + memcmp(Magic, NMagic::kMagic2, 6) == 0; }; + }; + */ + + const UInt32 kOctRecordSize = 76; + +} + +struct CItem +{ + AString Name; + UInt32 inode; + UInt32 Mode; + UInt32 UID; + UInt32 GID; + UInt32 Size; + UInt32 MTime; + + // char LinkFlag; + // AString LinkName; ????? + char Magic[8]; + UInt32 NumLinks; + UInt32 DevMajor; + UInt32 DevMinor; + UInt32 RDevMajor; + UInt32 RDevMinor; + UInt32 ChkSum; + + UInt32 Align; + + bool IsDir() const { return (Mode & 0170000) == 0040000; } +}; + +class CItemEx: public CItem +{ +public: + UInt64 HeaderPosition; + UInt32 HeaderSize; + UInt64 GetDataPosition() const { return HeaderPosition + HeaderSize; }; +}; + +const UInt32 kMaxBlockSize = NFileHeader::kRecordSize; + +class CInArchive +{ + CMyComPtr m_Stream; + UInt64 m_Position; + + UInt16 _blockSize; + Byte _block[kMaxBlockSize]; + UInt32 _blockPos; + Byte ReadByte(); + UInt16 ReadUInt16(); + UInt32 ReadUInt32(); + + bool ReadNumber(UInt32 &resultValue); + bool ReadOctNumber(int size, UInt32 &resultValue); + + HRESULT ReadBytes(void *data, UInt32 size, UInt32 &processedSize); +public: + HRESULT Open(IInStream *inStream); + HRESULT GetNextItem(bool &filled, CItemEx &itemInfo); + HRESULT Skip(UInt64 numBytes); + HRESULT SkipDataRecords(UInt64 dataSize, UInt32 align); +}; + +HRESULT CInArchive::ReadBytes(void *data, UInt32 size, UInt32 &processedSize) +{ + size_t realProcessedSize = size; + RINOK(ReadStream(m_Stream, data, &realProcessedSize)); + processedSize = (UInt32)realProcessedSize; + m_Position += processedSize; + return S_OK; +} + +Byte CInArchive::ReadByte() +{ + if (_blockPos >= _blockSize) + throw "Incorrect cpio archive"; + return _block[_blockPos++]; +} + +UInt16 CInArchive::ReadUInt16() +{ + UInt16 value = 0; + for (int i = 0; i < 2; i++) + { + Byte b = ReadByte(); + value |= (UInt16(b) << (8 * i)); + } + return value; +} + +UInt32 CInArchive::ReadUInt32() +{ + UInt32 value = 0; + for (int i = 0; i < 4; i++) + { + Byte b = ReadByte(); + value |= (UInt32(b) << (8 * i)); + } + return value; +} + +HRESULT CInArchive::Open(IInStream *inStream) +{ + RINOK(inStream->Seek(0, STREAM_SEEK_CUR, &m_Position)); + m_Stream = inStream; + return S_OK; +} + +bool CInArchive::ReadNumber(UInt32 &resultValue) +{ + resultValue = 0; + for (int i = 0; i < 8; i++) + { + char c = char(ReadByte()); + 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; +} + +static bool OctalToNumber(const char *s, UInt64 &res) +{ + const char *end; + res = ConvertOctStringToUInt64(s, &end); + return (*end == ' ' || *end == 0); +} + +static bool OctalToNumber32(const char *s, UInt32 &res) +{ + UInt64 res64; + if (!OctalToNumber(s, res64)) + return false; + res = (UInt32)res64; + return (res64 <= 0xFFFFFFFF); +} + +bool CInArchive::ReadOctNumber(int size, UInt32 &resultValue) +{ + char sz[32 + 4]; + int i; + for (i = 0; i < size && i < 32; i++) + sz[i] = (char)ReadByte(); + sz[i] = 0; + return OctalToNumber32(sz, resultValue); +} + +#define GetFromHex(y) { if (!ReadNumber(y)) return S_FALSE; } +#define GetFromOct6(y) { if (!ReadOctNumber(6, y)) return S_FALSE; } +#define GetFromOct11(y) { if (!ReadOctNumber(11, y)) return S_FALSE; } + +static unsigned short ConvertValue(unsigned short value, bool convert) +{ + if (!convert) + return value; + return (unsigned short)((((unsigned short)(value & 0xFF)) << 8) | (value >> 8)); +} + +static UInt32 GetAlignedSize(UInt32 size, UInt32 align) +{ + while ((size & (align - 1)) != 0) + size++; + return size; +} + + +HRESULT CInArchive::GetNextItem(bool &filled, CItemEx &item) +{ + filled = false; + + UInt32 processedSize; + item.HeaderPosition = m_Position; + + _blockSize = kMaxBlockSize; + RINOK(ReadBytes(_block, 2, processedSize)); + if (processedSize != 2) + return S_FALSE; + _blockPos = 0; + + UInt32 nameSize; + + bool oldBE = + _block[0] == NFileHeader::NMagic::kMagicForRecord2[1] && + _block[1] == NFileHeader::NMagic::kMagicForRecord2[0]; + + bool binMode = (_block[0] == NFileHeader::NMagic::kMagicForRecord2[0] && + _block[1] == NFileHeader::NMagic::kMagicForRecord2[1]) || + oldBE; + + if (binMode) + { + RINOK(ReadBytes(_block + 2, NFileHeader::kRecord2Size - 2, processedSize)); + if (processedSize != NFileHeader::kRecord2Size - 2) + return S_FALSE; + item.Align = 2; + _blockPos = 2; + item.DevMajor = 0; + item.DevMinor = ConvertValue(ReadUInt16(), oldBE); + item.inode = ConvertValue(ReadUInt16(), oldBE); + item.Mode = ConvertValue(ReadUInt16(), oldBE); + item.UID = ConvertValue(ReadUInt16(), oldBE); + item.GID = ConvertValue(ReadUInt16(), oldBE); + item.NumLinks = ConvertValue(ReadUInt16(), oldBE); + item.RDevMajor =0; + item.RDevMinor = ConvertValue(ReadUInt16(), oldBE); + UInt16 timeHigh = ConvertValue(ReadUInt16(), oldBE); + UInt16 timeLow = ConvertValue(ReadUInt16(), oldBE); + item.MTime = (UInt32(timeHigh) << 16) + timeLow; + nameSize = ConvertValue(ReadUInt16(), oldBE); + UInt16 sizeHigh = ConvertValue(ReadUInt16(), oldBE); + UInt16 sizeLow = ConvertValue(ReadUInt16(), oldBE); + item.Size = (UInt32(sizeHigh) << 16) + sizeLow; + + item.ChkSum = 0; + item.HeaderSize = GetAlignedSize( + nameSize + NFileHeader::kRecord2Size, item.Align); + nameSize = item.HeaderSize - NFileHeader::kRecord2Size; + } + else + { + RINOK(ReadBytes(_block + 2, 4, processedSize)); + if (processedSize != 4) + return S_FALSE; + + bool magicOK = + memcmp(_block, NFileHeader::NMagic::kMagic1, 6) == 0 || + memcmp(_block, NFileHeader::NMagic::kMagic2, 6) == 0; + _blockPos = 6; + if (magicOK) + { + RINOK(ReadBytes(_block + 6, NFileHeader::kRecordSize - 6, processedSize)); + if (processedSize != NFileHeader::kRecordSize - 6) + return S_FALSE; + item.Align = 4; + + GetFromHex(item.inode); + GetFromHex(item.Mode); + GetFromHex(item.UID); + GetFromHex(item.GID); + GetFromHex(item.NumLinks); + UInt32 mTime; + GetFromHex(mTime); + item.MTime = mTime; + GetFromHex(item.Size); + GetFromHex(item.DevMajor); + GetFromHex(item.DevMinor); + GetFromHex(item.RDevMajor); + GetFromHex(item.RDevMinor); + GetFromHex(nameSize); + GetFromHex(item.ChkSum); + item.HeaderSize = GetAlignedSize( + nameSize + NFileHeader::kRecordSize, item.Align); + nameSize = item.HeaderSize - NFileHeader::kRecordSize; + } + else + { + if (!memcmp(_block, NFileHeader::NMagic::kMagic3, 6) == 0) + return S_FALSE; + RINOK(ReadBytes(_block + 6, NFileHeader::kOctRecordSize - 6, processedSize)); + if (processedSize != NFileHeader::kOctRecordSize - 6) + return S_FALSE; + item.Align = 1; + item.DevMajor = 0; + GetFromOct6(item.DevMinor); + GetFromOct6(item.inode); + GetFromOct6(item.Mode); + GetFromOct6(item.UID); + GetFromOct6(item.GID); + GetFromOct6(item.NumLinks); + item.RDevMajor = 0; + GetFromOct6(item.RDevMinor); + UInt32 mTime; + GetFromOct11(mTime); + item.MTime = mTime; + GetFromOct6(nameSize); + GetFromOct11(item.Size); // ????? + item.HeaderSize = GetAlignedSize( + nameSize + NFileHeader::kOctRecordSize, item.Align); + nameSize = item.HeaderSize - NFileHeader::kOctRecordSize; + } + } + 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 (strcmp(item.Name, NFileHeader::NMagic::kEndName) == 0) + return S_OK; + filled = true; + return S_OK; +} + +HRESULT CInArchive::Skip(UInt64 numBytes) +{ + UInt64 newPostion; + RINOK(m_Stream->Seek(numBytes, STREAM_SEEK_CUR, &newPostion)); + m_Position += numBytes; + if (m_Position != newPostion) + return E_FAIL; + return S_OK; +} + +HRESULT CInArchive::SkipDataRecords(UInt64 dataSize, UInt32 align) +{ + while ((dataSize & (align - 1)) != 0) + dataSize++; + return Skip(dataSize); +} + + +class CHandler: + public IInArchive, + public IInArchiveGetStream, + public CMyUnknownImp +{ + CObjectVector _items; + CMyComPtr _stream; +public: + MY_UNKNOWN_IMP2(IInArchive, IInArchiveGetStream) + INTERFACE_IInArchive(;) + STDMETHOD(GetStream)(UInt32 index, ISequentialInStream **stream); +}; + +/* +enum +{ + kpidinode = kpidUserDefined, + kpidiChkSum +}; +*/ + +STATPROPSTG kProps[] = +{ + { NULL, kpidPath, VT_BSTR}, + { NULL, kpidIsDir, VT_BOOL}, + { NULL, kpidSize, VT_UI8}, + { NULL, kpidPackSize, VT_UI8}, + { NULL, kpidMTime, VT_FILETIME}, + { NULL, kpidPosixAttrib, VT_UI4}, + // { L"inode", kpidinode, VT_UI4} + // { L"CheckSum", kpidiChkSum, VT_UI4} +}; + +IMP_IInArchive_Props +IMP_IInArchive_ArcProps_NO + +STDMETHODIMP CHandler::Open(IInStream *stream, const UInt64 *, IArchiveOpenCallback *callback) +{ + COM_TRY_BEGIN + // try + { + CInArchive archive; + + UInt64 endPos = 0; + bool needSetTotal = true; + + if (callback != NULL) + { + RINOK(stream->Seek(0, STREAM_SEEK_END, &endPos)); + RINOK(stream->Seek(0, STREAM_SEEK_SET, NULL)); + } + + RINOK(archive.Open(stream)); + + _items.Clear(); + + for (;;) + { + CItemEx item; + bool filled; + HRESULT result = archive.GetNextItem(filled, item); + if (result == S_FALSE) + return S_FALSE; + if (result != S_OK) + return S_FALSE; + if (!filled) + break; + _items.Add(item); + archive.SkipDataRecords(item.Size, item.Align); + if (callback != NULL) + { + if (needSetTotal) + { + RINOK(callback->SetTotal(NULL, &endPos)); + needSetTotal = false; + } + if (_items.Size() % 100 == 0) + { + UInt64 numFiles = _items.Size(); + UInt64 numBytes = item.HeaderPosition; + RINOK(callback->SetCompleted(&numFiles, &numBytes)); + } + } + } + if (_items.Size() == 0) + return S_FALSE; + + _stream = stream; + } + /* + catch(...) + { + return S_FALSE; + } + */ + return S_OK; + COM_TRY_END +} + +STDMETHODIMP CHandler::Close() +{ + _items.Clear(); + _stream.Release(); + return S_OK; +} + +STDMETHODIMP CHandler::GetNumberOfItems(UInt32 *numItems) +{ + *numItems = _items.Size(); + return S_OK; +} + +STDMETHODIMP CHandler::GetProperty(UInt32 index, PROPID propID, PROPVARIANT *value) +{ + COM_TRY_BEGIN + NWindows::NCOM::CPropVariant prop; + const CItemEx &item = _items[index]; + + switch(propID) + { + case kpidPath: prop = NItemName::GetOSName(MultiByteToUnicodeString(item.Name, CP_OEMCP)); break; + case kpidIsDir: prop = item.IsDir(); break; + case kpidSize: + case kpidPackSize: + prop = (UInt64)item.Size; + break; + case kpidMTime: + { + if (item.MTime != 0) + { + FILETIME utc; + NWindows::NTime::UnixTimeToFileTime(item.MTime, utc); + prop = utc; + } + break; + } + case kpidPosixAttrib: prop = item.Mode; break; + /* + case kpidinode: prop = item.inode; break; + case kpidiChkSum: prop = item.ChkSum; break; + */ + } + prop.Detach(value); + return S_OK; + COM_TRY_END +} + +STDMETHODIMP CHandler::Extract(const UInt32 *indices, UInt32 numItems, + Int32 testMode, IArchiveExtractCallback *extractCallback) +{ + COM_TRY_BEGIN + bool allFilesMode = (numItems == (UInt32)-1); + if (allFilesMode) + numItems = _items.Size(); + if (numItems == 0) + return S_OK; + UInt64 totalSize = 0; + UInt32 i; + for (i = 0; i < numItems; i++) + totalSize += _items[allFilesMode ? i : indices[i]].Size; + extractCallback->SetTotal(totalSize); + + UInt64 currentTotalSize = 0; + + NCompress::CCopyCoder *copyCoderSpec = new NCompress::CCopyCoder(); + CMyComPtr copyCoder = copyCoderSpec; + + CLocalProgress *lps = new CLocalProgress; + CMyComPtr progress = lps; + lps->Init(extractCallback, false); + + CLimitedSequentialInStream *streamSpec = new CLimitedSequentialInStream; + CMyComPtr inStream(streamSpec); + streamSpec->SetStream(_stream); + + for (i = 0; i < numItems; i++) + { + lps->InSize = lps->OutSize = currentTotalSize; + RINOK(lps->SetCur()); + CMyComPtr outStream; + Int32 askMode = testMode ? + NExtract::NAskMode::kTest : + NExtract::NAskMode::kExtract; + Int32 index = allFilesMode ? i : indices[i]; + const CItemEx &item = _items[index]; + RINOK(extractCallback->GetStream(index, &outStream, askMode)); + currentTotalSize += item.Size; + if (item.IsDir()) + { + RINOK(extractCallback->PrepareOperation(askMode)); + RINOK(extractCallback->SetOperationResult(NExtract::NOperationResult::kOK)); + continue; + } + if (!testMode && !outStream) + continue; + RINOK(extractCallback->PrepareOperation(askMode)); + if (testMode) + { + RINOK(extractCallback->SetOperationResult(NExtract::NOperationResult::kOK)); + continue; + } + RINOK(_stream->Seek(item.GetDataPosition(), STREAM_SEEK_SET, NULL)); + streamSpec->Init(item.Size); + RINOK(copyCoder->Code(inStream, outStream, NULL, NULL, progress)); + outStream.Release(); + RINOK(extractCallback->SetOperationResult((copyCoderSpec->TotalSize == item.Size) ? + NExtract::NOperationResult::kOK: + NExtract::NOperationResult::kDataError)); + } + return S_OK; + COM_TRY_END +} + +STDMETHODIMP CHandler::GetStream(UInt32 index, ISequentialInStream **stream) +{ + COM_TRY_BEGIN + const CItemEx &item = _items[index]; + return CreateLimitedInStream(_stream, item.GetDataPosition(), item.Size, stream); + COM_TRY_END +} + +static IInArchive *CreateArc() { return new NArchive::NCpio::CHandler; } + +static CArcInfo g_ArcInfo = + { L"Cpio", L"cpio", 0, 0xED, { 0 }, 0, false, CreateArc, 0 }; + +REGISTER_ARC(Cpio) + +}} diff --git a/CPP/7zip/Archive/CramfsHandler.cpp b/CPP/7zip/Archive/CramfsHandler.cpp new file mode 100644 index 0000000..a55e374 --- /dev/null +++ b/CPP/7zip/Archive/CramfsHandler.cpp @@ -0,0 +1,644 @@ +// CramfsHandler.cpp + +#include "StdAfx.h" + +#include "../../../C/7zCrc.h" +#include "../../../C/CpuArch.h" +#include "../../../C/Alloc.h" + +#include "Common/ComTry.h" +#include "Common/StringConvert.h" + +#include "Windows/PropVariantUtils.h" + +#include "../Common/LimitedStreams.h" +#include "../Common/ProgressUtils.h" +#include "../Common/RegisterArc.h" +#include "../Common/StreamObjects.h" +#include "../Common/StreamUtils.h" + +#include "../Compress/CopyCoder.h" +#include "../Compress/ZlibDecoder.h" + +namespace NArchive { +namespace NCramfs { + +#define SIGNATURE { 'C','o','m','p','r','e','s','s','e','d',' ','R','O','M','F','S' } + +static const UInt32 kSignatureSize = 16; +static const char kSignature[kSignatureSize] = SIGNATURE; + +static const UInt32 kArcSizeMax = (256 + 16) << 20; +static const UInt32 kNumFilesMax = (1 << 19); +static const unsigned kNumDirLevelsMax = (1 << 8); + +static const UInt32 kHeaderSize = 0x40; +static const unsigned kHeaderNameSize = 16; +static const UInt32 kNodeSize = 12; + +static const UInt32 kFlag_FsVer2 = (1 << 0); + +static const CUInt32PCharPair k_Flags[] = +{ + { 0, "Ver2" }, + { 1, "SortedDirs" }, + { 8, "Holes" }, + { 9, "WrongSignature" }, + { 10, "ShiftedRootOffset" } +}; + +static const unsigned kBlockSizeLog = 12; +static const UInt32 kBlockSize = 1 << kBlockSizeLog; + +/* +struct CNode +{ + UInt16 Mode; + UInt16 Uid; + UInt32 Size; + Byte Gid; + UInt32 NameLen; + UInt32 Offset; + + void Parse(const Byte *p) + { + Mode = GetUi16(p); + Uid = GetUi16(p + 2); + Size = Get32(p + 4) & 0xFFFFFF; + Gid = p[7]; + NameLen = p[8] & 0x3F; + Offset = Get32(p + 8) >> 6; + } +}; +*/ + +#define Get32(p) (be ? GetBe32(p) : GetUi32(p)) + +static UInt32 GetMode(const Byte *p, bool be) { return be ? GetBe16(p) : GetUi16(p); } +static bool IsDir(const Byte *p, bool be) { return (GetMode(p, be) & 0xF000) == 0x4000; } + +static UInt32 GetSize(const Byte *p, bool be) +{ + if (be) + return GetBe32(p + 4) >> 8; + else + return GetUi32(p + 4) & 0xFFFFFF; +} + +static UInt32 GetNameLen(const Byte *p, bool be) +{ + if (be) + return (p[8] & 0xFC); + else + return (p[8] & 0x3F) << 2; +} + +static UInt32 GetOffset(const Byte *p, bool be) +{ + if (be) + return (GetBe32(p + 8) & 0x03FFFFFF) << 2; + else + return GetUi32(p + 8) >> 6 << 2; +} + +struct CItem +{ + UInt32 Offset; + int Parent; +}; + +struct CHeader +{ + bool be; + UInt32 Size; + UInt32 Flags; + // UInt32 Future; + UInt32 Crc; + // UInt32 Edition; + UInt32 NumBlocks; + UInt32 NumFiles; + char Name[kHeaderNameSize]; + + bool Parse(const Byte *p) + { + if (memcmp(p + 16, kSignature, kSignatureSize) != 0) + return false; + switch(GetUi32(p)) + { + case 0x28CD3D45: be = false; break; + case 0x453DCD28: be = true; break; + default: return false; + } + Size = Get32(p + 4); + Flags = Get32(p + 8); + // Future = Get32(p + 0xC); + Crc = Get32(p + 0x20); + // Edition = Get32(p + 0x24); + NumBlocks = Get32(p + 0x28); + NumFiles = Get32(p + 0x2C); + memcpy(Name, p + 0x30, kHeaderNameSize); + return true; + } + + bool IsVer2() const { return (Flags & kFlag_FsVer2) != 0; } +}; + +class CHandler: + public IInArchive, + public IInArchiveGetStream, + public CMyUnknownImp +{ + CRecordVector _items; + CMyComPtr _stream; + Byte *_data; + UInt32 _size; + UInt32 _headersSize; + AString _errorMessage; + CHeader _h; + + // Current file + + NCompress::NZlib::CDecoder *_zlibDecoderSpec; + CMyComPtr _zlibDecoder; + + CBufInStream *_inStreamSpec; + CMyComPtr _inStream; + + CBufPtrSeqOutStream *_outStreamSpec; + CMyComPtr _outStream; + + UInt32 _curBlocksOffset; + UInt32 _curNumBlocks; + + HRESULT OpenDir(int parent, UInt32 baseOffsetBase, unsigned level); + HRESULT Open2(IInStream *inStream); + AString GetPath(int index) const; + bool GetPackSize(int index, UInt32 &res) const; + void Free(); +public: + CHandler(): _data(0) {} + ~CHandler() { Free(); } + MY_UNKNOWN_IMP2(IInArchive, IInArchiveGetStream) + INTERFACE_IInArchive(;) + STDMETHOD(GetStream)(UInt32 index, ISequentialInStream **stream); + HRESULT ReadBlock(UInt64 blockIndex, Byte *dest, size_t blockSize); +}; + +static const STATPROPSTG kProps[] = +{ + { NULL, kpidPath, VT_BSTR}, + { NULL, kpidIsDir, VT_BOOL}, + { NULL, kpidSize, VT_UI4}, + { NULL, kpidPackSize, VT_UI4}, + { NULL, kpidPosixAttrib, VT_UI4} + // { NULL, kpidOffset, VT_UI4} +}; + +static const STATPROPSTG kArcProps[] = +{ + { NULL, kpidName, VT_BSTR}, + { NULL, kpidBigEndian, VT_BOOL}, + { NULL, kpidCharacts, VT_BSTR}, + { NULL, kpidPhySize, VT_UI4}, + { NULL, kpidHeadersSize, VT_UI4}, + { NULL, kpidNumSubFiles, VT_UI4}, + { NULL, kpidNumBlocks, VT_UI4} +}; + +IMP_IInArchive_Props +IMP_IInArchive_ArcProps + +HRESULT CHandler::OpenDir(int parent, UInt32 baseOffset, unsigned level) +{ + const Byte *p = _data + baseOffset; + bool be = _h.be; + if (!IsDir(p, be)) + return S_OK; + UInt32 offset = GetOffset(p, be); + UInt32 size = GetSize(p, be); + if (offset == 0 && size == 0) + return S_OK; + UInt32 end = offset + size; + if (offset < kHeaderSize || end > _size || level > kNumDirLevelsMax) + return S_FALSE; + if (end > _headersSize) + _headersSize = end; + + int startIndex = _items.Size(); + + while (size != 0) + { + if (size < kNodeSize || (UInt32)_items.Size() >= kNumFilesMax) + return S_FALSE; + CItem item; + item.Parent = parent; + item.Offset = offset; + _items.Add(item); + UInt32 nodeLen = kNodeSize + GetNameLen(_data + offset, be); + if (size < nodeLen) + return S_FALSE; + offset += nodeLen; + size -= nodeLen; + } + + int endIndex = _items.Size(); + for (int i = startIndex; i < endIndex; i++) + { + RINOK(OpenDir(i, _items[i].Offset, level + 1)); + } + return S_OK; +} + +HRESULT CHandler::Open2(IInStream *inStream) +{ + Byte buf[kHeaderSize]; + RINOK(ReadStream_FALSE(inStream, buf, kHeaderSize)); + if (!_h.Parse(buf)) + return S_FALSE; + if (_h.IsVer2()) + { + if (_h.Size < kHeaderSize || _h.Size > kArcSizeMax || _h.NumFiles > kNumFilesMax) + return S_FALSE; + } + else + { + UInt64 size; + RINOK(inStream->Seek(0, STREAM_SEEK_END, &size)); + if (size > kArcSizeMax) + return S_FALSE; + _h.Size = (UInt32)size; + RINOK(inStream->Seek(kHeaderSize, STREAM_SEEK_SET, NULL)); + } + _data = (Byte *)MidAlloc(_h.Size); + if (_data == 0) + return E_OUTOFMEMORY; + memcpy(_data, buf, kHeaderSize); + size_t processed = _h.Size - kHeaderSize; + RINOK(ReadStream(inStream, _data + kHeaderSize, &processed)); + if (processed < kNodeSize) + return S_FALSE; + _size = kHeaderSize + (UInt32)processed; + if (_size != _h.Size) + _errorMessage = "Unexpected end of archive"; + else + { + SetUi32(_data + 0x20, 0); + if (_h.IsVer2()) + if (CrcCalc(_data, _h.Size) != _h.Crc) + _errorMessage = "CRC error"; + } + if (_h.IsVer2()) + _items.Reserve(_h.NumFiles - 1); + return OpenDir(-1, kHeaderSize, 0); +} + +AString CHandler::GetPath(int index) const +{ + unsigned len = 0; + int indexMem = index; + do + { + const CItem &item = _items[index]; + index = item.Parent; + const Byte *p = _data + item.Offset; + unsigned size = GetNameLen(p, _h.be); + p += kNodeSize; + unsigned i; + for (i = 0; i < size && p[i]; i++); + len += i + 1; + } + while (index >= 0); + len--; + + AString path; + char *dest = path.GetBuffer(len) + len; + index = indexMem; + for (;;) + { + const CItem &item = _items[index]; + index = item.Parent; + const Byte *p = _data + item.Offset; + unsigned size = GetNameLen(p, _h.be); + p += kNodeSize; + unsigned i; + for (i = 0; i < size && p[i]; i++); + dest -= i; + memcpy(dest, p, i); + if (index < 0) + break; + *(--dest) = CHAR_PATH_SEPARATOR; + } + path.ReleaseBuffer(len); + return path; +} + +bool CHandler::GetPackSize(int index, UInt32 &res) const +{ + const CItem &item = _items[index]; + const Byte *p = _data + item.Offset; + bool be = _h.be; + UInt32 offset = GetOffset(p, be); + if (offset < kHeaderSize) + return false; + UInt32 numBlocks = (GetSize(p, be) + kBlockSize - 1) >> kBlockSizeLog; + UInt32 start = offset + numBlocks * 4; + if (start > _size) + return false; + UInt32 end = Get32(_data + start - 4); + if (end < start) + return false; + res = end - start; + return true; +} + +STDMETHODIMP CHandler::Open(IInStream *stream, const UInt64 *, IArchiveOpenCallback * /* callback */) +{ + COM_TRY_BEGIN + { + Close(); + RINOK(Open2(stream)); + _stream = stream; + } + return S_OK; + COM_TRY_END +} + +void CHandler::Free() +{ + MidFree(_data); + _data = 0; +} + +STDMETHODIMP CHandler::Close() +{ + _headersSize = 0; + _items.Clear(); + _stream.Release(); + _errorMessage.Empty(); + Free(); + return S_OK; +} + +STDMETHODIMP CHandler::GetNumberOfItems(UInt32 *numItems) +{ + *numItems = _items.Size(); + return S_OK; +} + +STDMETHODIMP CHandler::GetArchiveProperty(PROPID propID, PROPVARIANT *value) +{ + COM_TRY_BEGIN + NWindows::NCOM::CPropVariant prop; + switch(propID) + { + case kpidName: + { + char dest[kHeaderNameSize + 4]; + memcpy(dest, _h.Name, kHeaderNameSize); + dest[kHeaderNameSize] = 0; + prop = dest; + break; + } + case kpidBigEndian: prop = _h.be; break; + case kpidCharacts: FLAGS_TO_PROP(k_Flags, _h.Flags, prop); break; + case kpidNumBlocks: if (_h.IsVer2()) prop = _h.NumBlocks; break; + case kpidNumSubFiles: if (_h.IsVer2()) prop = _h.NumFiles; break; + case kpidPhySize: if (_h.IsVer2()) prop = _h.Size; break; + case kpidHeadersSize: prop = _headersSize; break; + case kpidError: if (!_errorMessage.IsEmpty()) prop = _errorMessage; break; + } + prop.Detach(value); + return S_OK; + COM_TRY_END +} + +STDMETHODIMP CHandler::GetProperty(UInt32 index, PROPID propID, PROPVARIANT *value) +{ + COM_TRY_BEGIN + NWindows::NCOM::CPropVariant prop; + const CItem &item = _items[index]; + const Byte *p = _data + item.Offset; + bool be = _h.be; + bool isDir = IsDir(p, be); + switch(propID) + { + case kpidPath: prop = MultiByteToUnicodeString(GetPath(index), CP_OEMCP); break; + case kpidIsDir: prop = isDir; break; + // case kpidOffset: prop = (UInt32)GetOffset(p, be); break; + case kpidSize: if (!isDir) prop = GetSize(p, be); break; + case kpidPackSize: + if (!isDir) + { + UInt32 size; + if (GetPackSize(index, size)) + prop = size; + } + break; + case kpidPosixAttrib: prop = (UInt32)GetMode(p, be); break; + } + prop.Detach(value); + return S_OK; + COM_TRY_END +} + +class CCramfsInStream: public CCachedInStream +{ + HRESULT ReadBlock(UInt64 blockIndex, Byte *dest, size_t blockSize); +public: + CHandler *Handler; +}; + +HRESULT CCramfsInStream::ReadBlock(UInt64 blockIndex, Byte *dest, size_t blockSize) +{ + return Handler->ReadBlock(blockIndex, dest, blockSize); +} + +HRESULT CHandler::ReadBlock(UInt64 blockIndex, Byte *dest, size_t blockSize) +{ + if (!_zlibDecoder) + { + _zlibDecoderSpec = new NCompress::NZlib::CDecoder(); + _zlibDecoder = _zlibDecoderSpec; + } + if (!_inStream) + { + _inStreamSpec = new CBufInStream(); + _inStream = _inStreamSpec; + } + if (!_outStream) + { + _outStreamSpec = new CBufPtrSeqOutStream(); + _outStream = _outStreamSpec; + } + bool be = _h.be; + const Byte *p = _data + (_curBlocksOffset + (UInt32)blockIndex * 4); + UInt32 start = (blockIndex == 0 ? _curBlocksOffset + _curNumBlocks * 4: Get32(p - 4)); + UInt32 end = Get32(p); + if (end < start || end > _size) + return S_FALSE; + UInt32 inSize = end - start; + _inStreamSpec->Init(_data + start, inSize); + _outStreamSpec->Init(dest, blockSize); + RINOK(_zlibDecoder->Code(_inStream, _outStream, NULL, NULL, NULL)); + return (_zlibDecoderSpec->GetInputProcessedSize() == inSize && + _outStreamSpec->GetPos() == blockSize) ? S_OK : S_FALSE; +} + +STDMETHODIMP CHandler::Extract(const UInt32 *indices, UInt32 numItems, + Int32 testMode, IArchiveExtractCallback *extractCallback) +{ + COM_TRY_BEGIN + bool allFilesMode = (numItems == (UInt32)-1); + if (allFilesMode) + numItems = _items.Size(); + if (numItems == 0) + return S_OK; + bool be = _h.be; + UInt64 totalSize = 0; + UInt32 i; + for (i = 0; i < numItems; i++) + { + const Byte *p = _data + _items[allFilesMode ? i : indices[i]].Offset; + if (!IsDir(p, be)) + totalSize += GetSize(p, be); + } + extractCallback->SetTotal(totalSize); + + UInt64 totalPackSize; + totalSize = totalPackSize = 0; + + NCompress::CCopyCoder *copyCoderSpec = new NCompress::CCopyCoder(); + CMyComPtr copyCoder = copyCoderSpec; + + CLocalProgress *lps = new CLocalProgress; + CMyComPtr progress = lps; + lps->Init(extractCallback, false); + + CLimitedSequentialInStream *streamSpec = new CLimitedSequentialInStream; + CMyComPtr inStream(streamSpec); + streamSpec->SetStream(_stream); + + for (i = 0; i < numItems; i++) + { + lps->InSize = totalPackSize; + lps->OutSize = totalSize; + RINOK(lps->SetCur()); + CMyComPtr outStream; + Int32 askMode = testMode ? + NExtract::NAskMode::kTest : + NExtract::NAskMode::kExtract; + UInt32 index = allFilesMode ? i : indices[i]; + const CItem &item = _items[index]; + RINOK(extractCallback->GetStream(index, &outStream, askMode)); + const Byte *p = _data + item.Offset; + + if (IsDir(p, be)) + { + RINOK(extractCallback->PrepareOperation(askMode)); + RINOK(extractCallback->SetOperationResult(NExtract::NOperationResult::kOK)); + continue; + } + UInt32 curSize = GetSize(p, be); + totalSize += curSize; + UInt32 packSize; + if (GetPackSize(index, packSize)) + totalPackSize += packSize; + + if (!testMode && !outStream) + continue; + RINOK(extractCallback->PrepareOperation(askMode)); + + UInt32 offset = GetOffset(p, be); + if (offset < kHeaderSize) + curSize = 0; + + int res = NExtract::NOperationResult::kDataError; + { + CMyComPtr inSeqStream; + CMyComPtr inStream; + HRESULT hres = GetStream(index, &inSeqStream); + if (inSeqStream) + inSeqStream.QueryInterface(IID_IInStream, &inStream); + if (hres == E_OUTOFMEMORY) + return E_OUTOFMEMORY; + if (hres == S_FALSE || !inStream) + res = NExtract::NOperationResult::kUnSupportedMethod; + else + { + RINOK(hres); + if (inStream) + { + HRESULT hres = copyCoder->Code(inStream, outStream, NULL, NULL, progress); + if (hres != S_OK && hres != S_FALSE) + { + RINOK(hres); + } + if (copyCoderSpec->TotalSize == curSize && hres == S_OK) + res = NExtract::NOperationResult::kOK; + } + } + } + RINOK(extractCallback->SetOperationResult(res)); + } + return S_OK; + COM_TRY_END +} + +STDMETHODIMP CHandler::GetStream(UInt32 index, ISequentialInStream **stream) +{ + COM_TRY_BEGIN + + const CItem &item = _items[index]; + const Byte *p = _data + item.Offset; + + bool be = _h.be; + if (IsDir(p, be)) + return E_FAIL; + + UInt32 size = GetSize(p, be); + UInt32 numBlocks = (size + kBlockSize - 1) >> kBlockSizeLog; + UInt32 offset = GetOffset(p, be); + if (offset < kHeaderSize) + { + if (offset != 0) + return S_FALSE; + CBufInStream *streamSpec = new CBufInStream; + CMyComPtr streamTemp = streamSpec; + streamSpec->Init(NULL, 0); + *stream = streamTemp.Detach(); + return S_OK; + } + + if (offset + numBlocks * 4 > _size) + return S_FALSE; + UInt32 prev = offset; + for (UInt32 i = 0; i < numBlocks; i++) + { + UInt32 next = Get32(_data + offset + i * 4); + if (next < prev || next > _size) + return S_FALSE; + prev = next; + } + + CCramfsInStream *streamSpec = new CCramfsInStream; + CMyComPtr streamTemp = streamSpec; + _curNumBlocks = numBlocks; + _curBlocksOffset = offset; + streamSpec->Handler = this; + if (!streamSpec->Alloc(kBlockSizeLog, 21 - kBlockSizeLog)) + return E_OUTOFMEMORY; + streamSpec->Init(size); + *stream = streamTemp.Detach(); + + return S_OK; + COM_TRY_END +} + +static IInArchive *CreateArc() { return new NArchive::NCramfs::CHandler; } + +static CArcInfo g_ArcInfo = + { L"CramFS", L"cramfs", 0, 0xD3, SIGNATURE, kSignatureSize, false, CreateArc, 0 }; + +REGISTER_ARC(Cramfs) + +}} diff --git a/CPP/7zip/Archive/DebHandler.cpp b/CPP/7zip/Archive/DebHandler.cpp new file mode 100644 index 0000000..82d2cde --- /dev/null +++ b/CPP/7zip/Archive/DebHandler.cpp @@ -0,0 +1,413 @@ +// DebHandler.cpp + +#include "StdAfx.h" + +#include "Common/ComTry.h" +#include "Common/StringConvert.h" +#include "Common/StringToInt.h" + +#include "Windows/PropVariant.h" +#include "Windows/Time.h" + +#include "../Common/LimitedStreams.h" +#include "../Common/ProgressUtils.h" +#include "../Common/RegisterArc.h" +#include "../Common/StreamUtils.h" + +#include "../Compress/CopyCoder.h" + +#include "Common/ItemNameUtils.h" + +using namespace NWindows; +using namespace NTime; + +namespace NArchive { +namespace NDeb { + +namespace NHeader +{ + const int kSignatureLen = 8; + + const char *kSignature = "!\n"; + + const int kNameSize = 16; + const int kTimeSize = 12; + const int kModeSize = 8; + const int kSizeSize = 10; + + /* + struct CHeader + { + char Name[kNameSize]; + char MTime[kTimeSize]; + char Number0[6]; + char Number1[6]; + char Mode[kModeSize]; + char Size[kSizeSize]; + char Quote; + char NewLine; + }; + */ + const int kHeaderSize = kNameSize + kTimeSize + 6 + 6 + kModeSize + kSizeSize + 1 + 1; +} + +struct CItem +{ + AString Name; + UInt64 Size; + UInt32 MTime; + UInt32 Mode; + + UInt64 HeaderPos; + UInt64 GetDataPos() const { return HeaderPos + NHeader::kHeaderSize; }; + // UInt64 GetFullSize() const { return NFileHeader::kRecordSize + Size; }; +}; + +class CInArchive +{ + CMyComPtr m_Stream; + + HRESULT GetNextItemReal(bool &filled, CItem &itemInfo); +public: + UInt64 m_Position; + HRESULT Open(IInStream *inStream); + HRESULT GetNextItem(bool &filled, CItem &itemInfo); + HRESULT SkipData(UInt64 dataSize); +}; + +HRESULT CInArchive::Open(IInStream *inStream) +{ + RINOK(inStream->Seek(0, STREAM_SEEK_CUR, &m_Position)); + char signature[NHeader::kSignatureLen]; + RINOK(ReadStream_FALSE(inStream, signature, NHeader::kSignatureLen)); + m_Position += NHeader::kSignatureLen; + if (memcmp(signature, NHeader::kSignature, NHeader::kSignatureLen) != 0) + return S_FALSE; + m_Stream = inStream; + return S_OK; +} + +static void MyStrNCpy(char *dest, const char *src, int size) +{ + for (int i = 0; i < size; i++) + { + char c = src[i]; + dest[i] = c; + if (c == 0) + break; + } +} + +static bool OctalToNumber(const char *s, int size, UInt64 &res) +{ + char sz[32]; + MyStrNCpy(sz, s, size); + sz[size] = 0; + const char *end; + int i; + for (i = 0; sz[i] == ' '; i++); + res = ConvertOctStringToUInt64(sz + i, &end); + return (*end == ' ' || *end == 0); +} + +static bool OctalToNumber32(const char *s, int size, UInt32 &res) +{ + UInt64 res64; + if (!OctalToNumber(s, size, res64)) + return false; + res = (UInt32)res64; + return (res64 <= 0xFFFFFFFF); +} + +static bool DecimalToNumber(const char *s, int size, UInt64 &res) +{ + char sz[32]; + MyStrNCpy(sz, s, size); + sz[size] = 0; + const char *end; + int i; + for (i = 0; sz[i] == ' '; i++); + res = ConvertStringToUInt64(sz + i, &end); + return (*end == ' ' || *end == 0); +} + +static bool DecimalToNumber32(const char *s, int size, UInt32 &res) +{ + UInt64 res64; + if (!DecimalToNumber(s, size, res64)) + return false; + res = (UInt32)res64; + return (res64 <= 0xFFFFFFFF); +} + +#define RIF(x) { if (!(x)) return S_FALSE; } + + +HRESULT CInArchive::GetNextItemReal(bool &filled, CItem &item) +{ + filled = false; + + char header[NHeader::kHeaderSize]; + const char *cur = header; + + size_t processedSize = sizeof(header); + item.HeaderPos = m_Position; + RINOK(ReadStream(m_Stream, header, &processedSize)); + if (processedSize != sizeof(header)) + return S_OK; + m_Position += processedSize; + + char tempString[NHeader::kNameSize + 1]; + MyStrNCpy(tempString, cur, NHeader::kNameSize); + cur += NHeader::kNameSize; + tempString[NHeader::kNameSize] = '\0'; + item.Name = tempString; + item.Name.Trim(); + + for (int i = 0; i < item.Name.Length(); i++) + if (((Byte)item.Name[i]) < 0x20) + return S_FALSE; + + RIF(DecimalToNumber32(cur, NHeader::kTimeSize, item.MTime)); + cur += NHeader::kTimeSize; + + cur += 6 + 6; + + RIF(OctalToNumber32(cur, NHeader::kModeSize, item.Mode)); + cur += NHeader::kModeSize; + + RIF(DecimalToNumber(cur, NHeader::kSizeSize, item.Size)); + cur += NHeader::kSizeSize; + + filled = true; + return S_OK; +} + +HRESULT CInArchive::GetNextItem(bool &filled, CItem &item) +{ + for (;;) + { + RINOK(GetNextItemReal(filled, item)); + if (!filled) + return S_OK; + if (item.Name.Compare("debian-binary") != 0) + return S_OK; + if (item.Size != 4) + return S_OK; + SkipData(item.Size); + } +} + +HRESULT CInArchive::SkipData(UInt64 dataSize) +{ + return m_Stream->Seek((dataSize + 1) & (~((UInt64)0x1)), STREAM_SEEK_CUR, &m_Position); +} + +class CHandler: + public IInArchive, + public IInArchiveGetStream, + public CMyUnknownImp +{ + CObjectVector _items; + CMyComPtr _stream; + Int32 _mainSubfile; + UInt64 _phySize; +public: + MY_UNKNOWN_IMP2(IInArchive, IInArchiveGetStream) + INTERFACE_IInArchive(;) + STDMETHOD(GetStream)(UInt32 index, ISequentialInStream **stream); +}; + +static STATPROPSTG kArcProps[] = +{ + { NULL, kpidPhySize, VT_UI8} +}; + +static STATPROPSTG kProps[] = +{ + { NULL, kpidPath, VT_BSTR}, + { NULL, kpidSize, VT_UI8}, + { NULL, kpidMTime, VT_FILETIME} +}; + +IMP_IInArchive_Props +IMP_IInArchive_ArcProps + +STDMETHODIMP CHandler::Open(IInStream *stream, + const UInt64 * /* maxCheckStartPosition */, + IArchiveOpenCallback *openArchiveCallback) +{ + COM_TRY_BEGIN + { + _mainSubfile = -1; + CInArchive archive; + if (archive.Open(stream) != S_OK) + return S_FALSE; + _items.Clear(); + + if (openArchiveCallback != NULL) + { + RINOK(openArchiveCallback->SetTotal(NULL, NULL)); + UInt64 numFiles = _items.Size(); + RINOK(openArchiveCallback->SetCompleted(&numFiles, NULL)); + } + + for (;;) + { + CItem item; + bool filled; + HRESULT result = archive.GetNextItem(filled, item); + if (result == S_FALSE) + return S_FALSE; + if (result != S_OK) + return S_FALSE; + if (!filled) + break; + if (item.Name.Left(5) == "data.") + _mainSubfile = _items.Size(); + _items.Add(item); + archive.SkipData(item.Size); + if (openArchiveCallback != NULL) + { + UInt64 numFiles = _items.Size(); + RINOK(openArchiveCallback->SetCompleted(&numFiles, NULL)); + } + } + _stream = stream; + _phySize = archive.m_Position; + } + return S_OK; + COM_TRY_END +} + +STDMETHODIMP CHandler::Close() +{ + _stream.Release(); + _items.Clear(); + return S_OK; +} + +STDMETHODIMP CHandler::GetNumberOfItems(UInt32 *numItems) +{ + *numItems = _items.Size(); + return S_OK; +} + +STDMETHODIMP CHandler::GetArchiveProperty(PROPID propID, PROPVARIANT *value) +{ + NCOM::CPropVariant prop; + switch(propID) + { + case kpidPhySize: prop = _phySize; break; + case kpidMainSubfile: if (_mainSubfile >= 0) prop = (UInt32)_mainSubfile; break; + } + prop.Detach(value); + return S_OK; +} + +STDMETHODIMP CHandler::GetProperty(UInt32 index, PROPID propID, PROPVARIANT *value) +{ + COM_TRY_BEGIN + NWindows::NCOM::CPropVariant prop; + const CItem &item = _items[index]; + + switch(propID) + { + case kpidPath: prop = (const wchar_t *)NItemName::GetOSName2(MultiByteToUnicodeString(item.Name, CP_OEMCP)); break; + case kpidSize: + case kpidPackSize: + prop = item.Size; + break; + case kpidMTime: + { + if (item.MTime != 0) + { + FILETIME fileTime; + NTime::UnixTimeToFileTime(item.MTime, fileTime); + prop = fileTime; + } + break; + } + } + prop.Detach(value); + return S_OK; + COM_TRY_END +} + +STDMETHODIMP CHandler::Extract(const UInt32 *indices, UInt32 numItems, + Int32 testMode, IArchiveExtractCallback *extractCallback) +{ + COM_TRY_BEGIN + bool allFilesMode = (numItems == (UInt32)-1); + if (allFilesMode) + numItems = _items.Size(); + if (numItems == 0) + return S_OK; + UInt64 totalSize = 0; + UInt32 i; + for (i = 0; i < numItems; i++) + totalSize += _items[allFilesMode ? i : indices[i]].Size; + extractCallback->SetTotal(totalSize); + + UInt64 currentTotalSize = 0; + + NCompress::CCopyCoder *copyCoderSpec = new NCompress::CCopyCoder(); + CMyComPtr copyCoder = copyCoderSpec; + + CLocalProgress *lps = new CLocalProgress; + CMyComPtr progress = lps; + lps->Init(extractCallback, false); + + CLimitedSequentialInStream *streamSpec = new CLimitedSequentialInStream; + CMyComPtr inStream(streamSpec); + streamSpec->SetStream(_stream); + + for (i = 0; i < numItems; i++) + { + lps->InSize = lps->OutSize = currentTotalSize; + RINOK(lps->SetCur()); + CMyComPtr realOutStream; + Int32 askMode = testMode ? + NExtract::NAskMode::kTest : + NExtract::NAskMode::kExtract; + Int32 index = allFilesMode ? i : indices[i]; + const CItem &item = _items[index]; + RINOK(extractCallback->GetStream(index, &realOutStream, askMode)); + currentTotalSize += item.Size; + + if (!testMode && !realOutStream) + continue; + RINOK(extractCallback->PrepareOperation(askMode)); + if (testMode) + { + RINOK(extractCallback->SetOperationResult(NExtract::NOperationResult::kOK)); + continue; + } + RINOK(_stream->Seek(item.GetDataPos(), STREAM_SEEK_SET, NULL)); + streamSpec->Init(item.Size); + RINOK(copyCoder->Code(inStream, realOutStream, NULL, NULL, progress)); + realOutStream.Release(); + RINOK(extractCallback->SetOperationResult((copyCoderSpec->TotalSize == item.Size) ? + NExtract::NOperationResult::kOK: + NExtract::NOperationResult::kDataError)); + } + return S_OK; + COM_TRY_END +} + +STDMETHODIMP CHandler::GetStream(UInt32 index, ISequentialInStream **stream) +{ + COM_TRY_BEGIN + const CItem &item = _items[index]; + return CreateLimitedInStream(_stream, item.GetDataPos(), item.Size, stream); + COM_TRY_END +} + +static IInArchive *CreateArc() { return new NArchive::NDeb::CHandler; } + +static CArcInfo g_ArcInfo = + { L"Deb", L"deb", 0, 0xEC, { '!', '<', 'a', 'r', 'c', 'h', '>', '\n' }, 8, false, CreateArc, 0 }; + +REGISTER_ARC(Deb) + +}} diff --git a/CPP/7zip/Archive/DeflateProps.cpp b/CPP/7zip/Archive/DeflateProps.cpp new file mode 100644 index 0000000..8498e05 --- /dev/null +++ b/CPP/7zip/Archive/DeflateProps.cpp @@ -0,0 +1,118 @@ +// DeflateProps.cpp + +#include "StdAfx.h" + +#include "Windows/PropVariant.h" + +#include "Common/ParseProperties.h" + +#include "DeflateProps.h" + +namespace NArchive { + +static const UInt32 kAlgo1 = 0; +static const UInt32 kAlgo5 = 1; + +static const UInt32 kPasses1 = 1; +static const UInt32 kPasses7 = 3; +static const UInt32 kPasses9 = 10; + +static const UInt32 kFb1 = 32; +static const UInt32 kFb7 = 64; +static const UInt32 kFb9 = 128; + +void CDeflateProps::Normalize() +{ + UInt32 level = Level; + if (level == 0xFFFFFFFF) + level = 5; + + if (Algo == 0xFFFFFFFF) + Algo = (level >= 5 ? + kAlgo5 : + kAlgo1); + + if (NumPasses == 0xFFFFFFFF) + NumPasses = + (level >= 9 ? kPasses9 : + (level >= 7 ? kPasses7 : + kPasses1)); + if (Fb == 0xFFFFFFFF) + Fb = + (level >= 9 ? kFb9 : + (level >= 7 ? kFb7 : + kFb1)); +} + +HRESULT CDeflateProps::SetCoderProperties(ICompressSetCoderProperties *setCoderProperties) +{ + Normalize(); + + NWindows::NCOM::CPropVariant props[] = + { + Algo, + NumPasses, + Fb, + Mc + }; + PROPID propIDs[] = + { + NCoderPropID::kAlgorithm, + NCoderPropID::kNumPasses, + NCoderPropID::kNumFastBytes, + NCoderPropID::kMatchFinderCycles + }; + int numProps = sizeof(propIDs) / sizeof(propIDs[0]); + if (!McDefined) + numProps--; + return setCoderProperties->SetCoderProperties(propIDs, props, numProps); +} + +HRESULT CDeflateProps::SetProperties(const wchar_t **names, const PROPVARIANT *values, Int32 numProps) +{ + Init(); + for (int i = 0; i < numProps; i++) + { + UString name = names[i]; + name.MakeUpper(); + if (name.IsEmpty()) + return E_INVALIDARG; + const PROPVARIANT &prop = values[i]; + if (name[0] == L'X') + { + UInt32 a = 9; + RINOK(ParsePropValue(name.Mid(1), prop, a)); + Level = a; + } + else if (name.Left(1) == L"A") + { + UInt32 a = kAlgo5; + RINOK(ParsePropValue(name.Mid(1), prop, a)); + Algo = a; + } + else if (name.Left(4) == L"PASS") + { + UInt32 a = kPasses9; + RINOK(ParsePropValue(name.Mid(4), prop, a)); + NumPasses = a; + } + else if (name.Left(2) == L"FB") + { + UInt32 a = kFb9; + RINOK(ParsePropValue(name.Mid(2), prop, a)); + Fb = a; + } + else if (name.Left(2) == L"MC") + { + UInt32 a = 0xFFFFFFFF; + RINOK(ParsePropValue(name.Mid(2), prop, a)); + Mc = a; + McDefined = true; + } + else + return E_INVALIDARG; + } + return S_OK; +} + +} diff --git a/CPP/7zip/Archive/DeflateProps.h b/CPP/7zip/Archive/DeflateProps.h new file mode 100644 index 0000000..e05a9d4 --- /dev/null +++ b/CPP/7zip/Archive/DeflateProps.h @@ -0,0 +1,35 @@ +// DeflateProps.h + +#ifndef __DEFLATE_PROPS_H +#define __DEFLATE_PROPS_H + +#include "../ICoder.h" + +namespace NArchive { + +class CDeflateProps +{ + UInt32 Level; + UInt32 NumPasses; + UInt32 Fb; + UInt32 Algo; + UInt32 Mc; + bool McDefined; + + void Init() + { + Level = NumPasses = Fb = Algo = Mc = 0xFFFFFFFF; + McDefined = false; + } + void Normalize(); +public: + CDeflateProps() { Init(); } + bool IsMaximum() const { return Algo > 0; } + + HRESULT SetCoderProperties(ICompressSetCoderProperties *setCoderProperties); + HRESULT SetProperties(const wchar_t **names, const PROPVARIANT *values, Int32 numProps); +}; + +} + +#endif diff --git a/CPP/7zip/Archive/DllExports2.cpp b/CPP/7zip/Archive/DllExports2.cpp new file mode 100644 index 0000000..1febea7 --- /dev/null +++ b/CPP/7zip/Archive/DllExports2.cpp @@ -0,0 +1,76 @@ +// DLLExports.cpp + +#include "StdAfx.h" + +#include "../../Common/MyInitGuid.h" + +#if defined(_WIN32) && defined(_7ZIP_LARGE_PAGES) +#include "../../../C/Alloc.h" +#endif + +#include "../../Common/ComTry.h" + +#include "../../Windows/NtCheck.h" +#include "../../Windows/PropVariant.h" + +#include "../ICoder.h" +#include "../IPassword.h" + +#include "IArchive.h" + +HINSTANCE g_hInstance; + +#define NT_CHECK_FAIL_ACTION return FALSE; + +#ifdef _WIN32 +extern "C" +BOOL WINAPI DllMain( + #ifdef UNDER_CE + HANDLE + #else + HINSTANCE + #endif + hInstance, DWORD dwReason, LPVOID /*lpReserved*/) +{ + if (dwReason == DLL_PROCESS_ATTACH) + { + g_hInstance = (HINSTANCE)hInstance; + NT_CHECK; + } + return TRUE; +} +#endif + +DEFINE_GUID(CLSID_CArchiveHandler, +0x23170F69, 0x40C1, 0x278A, 0x10, 0x00, 0x00, 0x01, 0x10, 0x00, 0x00, 0x00); + +static const UInt16 kDecodeId = 0x2790; + +DEFINE_GUID(CLSID_CCodec, +0x23170F69, 0x40C1, kDecodeId, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00); + +STDAPI CreateCoder(const GUID *clsid, const GUID *iid, void **outObject); +STDAPI CreateArchiver(const GUID *classID, const GUID *iid, void **outObject); + +STDAPI CreateObject(const GUID *clsid, const GUID *iid, void **outObject) +{ + // COM_TRY_BEGIN + *outObject = 0; + if (*iid == IID_ICompressCoder || *iid == IID_ICompressCoder2 || *iid == IID_ICompressFilter) + { + return CreateCoder(clsid, iid, outObject); + } + else + { + return CreateArchiver(clsid, iid, outObject); + } + // COM_TRY_END +} + +STDAPI SetLargePageMode() +{ + #if defined(_WIN32) && defined(_7ZIP_LARGE_PAGES) + SetLargePageSize(); + #endif + return S_OK; +} diff --git a/CPP/7zip/Archive/DmgHandler.cpp b/CPP/7zip/Archive/DmgHandler.cpp new file mode 100644 index 0000000..5040d51 --- /dev/null +++ b/CPP/7zip/Archive/DmgHandler.cpp @@ -0,0 +1,918 @@ +// DmgHandler.cpp + +#include "StdAfx.h" + +#include "../../../C/CpuArch.h" + +#include "Common/Buffer.h" +#include "Common/ComTry.h" +#include "Common/IntToString.h" +#include "Common/MyXml.h" +#include "Common/UTFConvert.h" + +#include "Windows/PropVariant.h" + +#include "../Common/LimitedStreams.h" +#include "../Common/ProgressUtils.h" +#include "../Common/RegisterArc.h" +#include "../Common/StreamUtils.h" + +#include "../Compress/BZip2Decoder.h" +#include "../Compress/CopyCoder.h" +#include "../Compress/ZlibDecoder.h" + +// #define DMG_SHOW_RAW + +// #include +#define PRF(x) // x + +#define Get32(p) GetBe32(p) +#define Get64(p) GetBe64(p) + +static int Base64ToByte(char c) +{ + if (c >= 'A' && c <= 'Z') return c - 'A'; + if (c >= 'a' && c <= 'z') return c - 'a' + 26; + if (c >= '0' && c <= '9') return c - '0' + 52; + if (c == '+') return 62; + if (c == '/') return 63; + if (c == '=') return 0; + return -1; +} + +static int Base64ToBin(Byte *dest, const char *src, int srcLen) +{ + int srcPos = 0; + int destPos = 0; + while (srcPos < srcLen) + { + Byte buf[4]; + int filled = 0; + while (srcPos < srcLen) + { + int n = Base64ToByte(src[srcPos++]); + if (n >= 0) + { + buf[filled++] = (Byte)n; + if (filled == 4) + break; + } + } + if (filled >= 2) { if (dest) dest[destPos] = (buf[0] << 2) | (buf[1] >> 4); destPos++; } + if (filled >= 3) { if (dest) dest[destPos] = (buf[1] << 4) | (buf[2] >> 2); destPos++; } + if (filled >= 4) { if (dest) dest[destPos] = (buf[2] << 6) | (buf[3] ); destPos++; } + } + return destPos; +} + +static UString GetSizeString(UInt64 value) +{ + wchar_t s[32]; + wchar_t c; + if (value < (UInt64)20000) c = 0; + else if (value < ((UInt64)20000 << 10)) { value >>= 10; c = L'K'; } + else if (value < ((UInt64)20000 << 20)) { value >>= 20; c = L'M'; } + else { value >>= 30; c = L'G'; } + ConvertUInt64ToString(value, s); + int p = MyStringLen(s); + s[p++] = c; + s[p++] = L'\0'; + return s; +} + +namespace NArchive { +namespace NDmg { + +struct CBlock +{ + UInt32 Type; + UInt64 UnpPos; + UInt64 UnpSize; + UInt64 PackPos; + UInt64 PackSize; + + UInt64 GetNextPackOffset() const { return PackPos + PackSize; } +}; + +struct CFile +{ + CByteBuffer Raw; + UInt64 StartPos; + CRecordVector Blocks; + UInt64 GetUnpackSize() const + { + UInt64 size = 0; + for (int i = 0; i < Blocks.Size(); i++) + size += Blocks[i].UnpSize; + return size; + }; + UInt64 GetPackSize() const + { + UInt64 size = 0; + for (int i = 0; i < Blocks.Size(); i++) + size += Blocks[i].PackSize; + return size; + }; + + AString Name; +}; + +class CHandler: + public IInArchive, + public CMyUnknownImp +{ + CMyComPtr _inStream; + + AString _xml; + CObjectVector _files; + CRecordVector _fileIndices; + + HRESULT Open2(IInStream *stream); + HRESULT Extract(IInStream *stream); +public: + MY_UNKNOWN_IMP1(IInArchive) + INTERFACE_IInArchive(;) +}; + +const UInt32 kXmlSizeMax = ((UInt32)1 << 31) - (1 << 14); + +enum +{ + METHOD_ZERO_0 = 0, + METHOD_COPY = 1, + METHOD_ZERO_2 = 2, + METHOD_ADC = 0x80000004, + METHOD_ZLIB = 0x80000005, + METHOD_BZIP2 = 0x80000006, + METHOD_DUMMY = 0x7FFFFFFE, + METHOD_END = 0xFFFFFFFF +}; + +struct CMethodStat +{ + UInt32 NumBlocks; + UInt64 PackSize; + UInt64 UnpSize; + CMethodStat(): NumBlocks(0), PackSize(0), UnpSize(0) {} +}; + +struct CMethods +{ + CRecordVector Stats; + CRecordVector Types; + void Update(const CFile &file); + UString GetString() const; +}; + +void CMethods::Update(const CFile &file) +{ + for (int i = 0; i < file.Blocks.Size(); i++) + { + const CBlock &b = file.Blocks[i]; + int index = Types.FindInSorted(b.Type); + if (index < 0) + { + index = Types.AddToUniqueSorted(b.Type); + Stats.Insert(index, CMethodStat()); + } + CMethodStat &m = Stats[index]; + m.PackSize += b.PackSize; + m.UnpSize += b.UnpSize; + m.NumBlocks++; + } +} + +UString CMethods::GetString() const +{ + UString res; + for (int i = 0; i < Types.Size(); i++) + { + if (i != 0) + res += L' '; + wchar_t buf[32]; + const wchar_t *s; + const CMethodStat &m = Stats[i]; + bool showPack = true; + UInt32 type = Types[i]; + switch(type) + { + case METHOD_ZERO_0: s = L"zero0"; showPack = (m.PackSize != 0); break; + case METHOD_ZERO_2: s = L"zero2"; showPack = (m.PackSize != 0); break; + case METHOD_COPY: s = L"copy"; showPack = (m.UnpSize != m.PackSize); break; + case METHOD_ADC: s = L"adc"; break; + case METHOD_ZLIB: s = L"zlib"; break; + case METHOD_BZIP2: s = L"bzip2"; break; + default: ConvertUInt64ToString(type, buf); s = buf; + } + res += s; + if (m.NumBlocks != 1) + { + res += L'['; + ConvertUInt64ToString(m.NumBlocks, buf); + res += buf; + res += L']'; + } + res += L'-'; + res += GetSizeString(m.UnpSize); + if (showPack) + { + res += L'-'; + res += GetSizeString(m.PackSize); + } + } + return res; +} + +STATPROPSTG kProps[] = +{ + { NULL, kpidPath, VT_BSTR}, + { NULL, kpidSize, VT_UI8}, + { NULL, kpidPackSize, VT_UI8}, + { NULL, kpidComment, VT_BSTR}, + { NULL, kpidMethod, VT_BSTR} +}; + +IMP_IInArchive_Props + +STATPROPSTG kArcProps[] = +{ + { NULL, kpidMethod, VT_BSTR}, + { NULL, kpidNumBlocks, VT_UI4} +}; + +STDMETHODIMP CHandler::GetArchiveProperty(PROPID propID, PROPVARIANT *value) +{ + COM_TRY_BEGIN + NWindows::NCOM::CPropVariant prop; + switch(propID) + { + case kpidMethod: + { + CMethods m; + for (int i = 0; i < _files.Size(); i++) + m.Update(_files[i]); + prop = m.GetString(); + break; + } + case kpidNumBlocks: + { + UInt64 numBlocks = 0; + for (int i = 0; i < _files.Size(); i++) + numBlocks += _files[i].Blocks.Size(); + prop = numBlocks; + break; + } + } + prop.Detach(value); + return S_OK; + COM_TRY_END +} + +IMP_IInArchive_ArcProps + +static int FindKeyPair(const CXmlItem &item, const AString &key, const AString &nextTag) +{ + for (int i = 0; i + 1 < item.SubItems.Size(); i++) + { + const CXmlItem &si = item.SubItems[i]; + if (si.IsTagged("key") && si.GetSubString() == key && item.SubItems[i + 1].IsTagged(nextTag)) + return i + 1; + } + return -1; +} + +static AString GetStringFromKeyPair(const CXmlItem &item, const AString &key, const AString &nextTag) +{ + int index = FindKeyPair(item, key, nextTag); + if (index >= 0) + return item.SubItems[index].GetSubString(); + return AString(); +} + +HRESULT CHandler::Open2(IInStream *stream) +{ + const int HEADER_SIZE = 0x1E0; + + UInt64 headerPos; + RINOK(stream->Seek(-HEADER_SIZE, STREAM_SEEK_END, &headerPos)); + Byte buf[HEADER_SIZE]; + RINOK(ReadStream_FALSE(stream, buf, HEADER_SIZE)); + UInt64 address1 = Get64(buf + 0); + UInt64 address2 = Get64(buf + 0xB8); + UInt64 size64 = Get64(buf + 0xC0); + if (address1 != address2 || size64 >= kXmlSizeMax || size64 == 0 || + address1 >= headerPos || address1 + size64 > headerPos) + return S_FALSE; + RINOK(stream->Seek(address1, STREAM_SEEK_SET, NULL)); + size_t size = (size_t)size64; + + char *ss = _xml.GetBuffer((int)size + 1); + RINOK(ReadStream_FALSE(stream, ss, size)); + ss[size] = 0; + _xml.ReleaseBuffer(); + + CXml xml; + if (!xml.Parse(_xml)) + return S_FALSE; + if (xml.Root.Name != "plist") + return S_FALSE; + + int dictIndex = xml.Root.FindSubTag("dict"); + if (dictIndex < 0) + return S_FALSE; + + const CXmlItem &dictItem = xml.Root.SubItems[dictIndex]; + int rfDictIndex = FindKeyPair(dictItem, "resource-fork", "dict"); + if (rfDictIndex < 0) + return S_FALSE; + + const CXmlItem &rfDictItem = dictItem.SubItems[rfDictIndex]; + int arrIndex = FindKeyPair(rfDictItem, "blkx", "array"); + if (arrIndex < 0) + return S_FALSE; + + const CXmlItem &arrItem = rfDictItem.SubItems[arrIndex]; + + int i; + for (i = 0; i < arrItem.SubItems.Size(); i++) + { + const CXmlItem &item = arrItem.SubItems[i]; + if (!item.IsTagged("dict")) + continue; + + CFile file; + file.StartPos = 0; + + int destLen; + { + AString dataString; + AString name = GetStringFromKeyPair(item, "Name", "string"); + if (name.IsEmpty()) + name = GetStringFromKeyPair(item, "CFName", "string"); + file.Name = name; + dataString = GetStringFromKeyPair(item, "Data", "data"); + + destLen = Base64ToBin(NULL, dataString, dataString.Length()); + file.Raw.SetCapacity(destLen); + Base64ToBin(file.Raw, dataString, dataString.Length()); + } + + if (destLen > 0xCC && Get32(file.Raw) == 0x6D697368) + { + PRF(printf("\n\n index = %d", _files.Size())); + const int kRecordSize = 40; + for (int offset = 0xCC; offset + kRecordSize <= destLen; offset += kRecordSize) + { + const Byte *p = (const Byte *)file.Raw + offset; + CBlock b; + b.Type = Get32(p); + if (b.Type == METHOD_END) + break; + if (b.Type == METHOD_DUMMY) + continue; + + b.UnpPos = Get64(p + 0x08) << 9; + b.UnpSize = Get64(p + 0x10) << 9; + b.PackPos = Get64(p + 0x18); + b.PackSize = Get64(p + 0x20); + + file.Blocks.Add(b); + + PRF(printf("\nType=%8x m[1]=%8x uPos=%8x uSize=%7x pPos=%8x pSize=%7x", + b.Type, Get32(p + 4), (UInt32)b.UnpPos, (UInt32)b.UnpSize, (UInt32)b.PackPos, (UInt32)b.PackSize)); + } + } + int itemIndex = _files.Add(file); + if (file.Blocks.Size() > 0) + { + // if (file.Name.Find("HFS") >= 0) + _fileIndices.Add(itemIndex); + } + } + + // PackPos for each new file is 0 in some DMG files. So we use additional StartPos + + bool allStartAreZeros = true; + for (i = 0; i < _files.Size(); i++) + { + const CFile &file = _files[i]; + if (!file.Blocks.IsEmpty() && file.Blocks[0].PackPos != 0) + allStartAreZeros = false; + } + UInt64 startPos = 0; + if (allStartAreZeros) + { + for (i = 0; i < _files.Size(); i++) + { + CFile &file = _files[i]; + file.StartPos = startPos; + if (!file.Blocks.IsEmpty()) + startPos += file.Blocks.Back().GetNextPackOffset(); + } + } + + return S_OK; +} + +STDMETHODIMP CHandler::Open(IInStream *stream, + const UInt64 * /* maxCheckStartPosition */, + IArchiveOpenCallback * /* openArchiveCallback */) +{ + COM_TRY_BEGIN + { + Close(); + if (Open2(stream) != S_OK) + return S_FALSE; + _inStream = stream; + } + return S_OK; + COM_TRY_END +} + +STDMETHODIMP CHandler::Close() +{ + _inStream.Release(); + _fileIndices.Clear(); + _files.Clear(); + _xml.Empty(); + return S_OK; +} + +STDMETHODIMP CHandler::GetNumberOfItems(UInt32 *numItems) +{ + *numItems = _fileIndices.Size() + #ifdef DMG_SHOW_RAW + + _files.Size() + 1; + #endif + ; + return S_OK; +} + +#define RAW_PREFIX L"raw" WSTRING_PATH_SEPARATOR + +STDMETHODIMP CHandler::GetProperty(UInt32 index, PROPID propID, PROPVARIANT *value) +{ + COM_TRY_BEGIN + NWindows::NCOM::CPropVariant prop; + + #ifdef DMG_SHOW_RAW + if ((int)index == _fileIndices.Size()) + { + switch(propID) + { + case kpidPath: + prop = RAW_PREFIX L"a.xml"; + break; + case kpidSize: + case kpidPackSize: + prop = (UInt64)_xml.Length(); + break; + } + } + else if ((int)index > _fileIndices.Size()) + { + int rawIndex = (int)index - (_fileIndices.Size() + 1); + switch(propID) + { + case kpidPath: + { + wchar_t s[32] = RAW_PREFIX; + ConvertUInt64ToString(rawIndex, s + MyStringLen(s)); + prop = s; + break; + } + case kpidSize: + case kpidPackSize: + prop = (UInt64)_files[rawIndex].Raw.GetCapacity(); + break; + } + } + else + #endif + { + int itemIndex = _fileIndices[index]; + const CFile &item = _files[itemIndex]; + switch(propID) + { + case kpidMethod: + { + CMethods m; + m.Update(item); + UString resString = m.GetString(); + if (!resString.IsEmpty()) + prop = resString; + break; + } + + // case kpidExtension: prop = L"hfs"; break; + + case kpidPath: + { + // break; + UString name; + wchar_t s[32]; + ConvertUInt64ToString(index, s); + name = s; + int num = 10; + int numDigits; + for (numDigits = 1; num < _fileIndices.Size(); numDigits++) + num *= 10; + while (name.Length() < numDigits) + name = L'0' + name; + + AString subName; + int pos1 = item.Name.Find('('); + if (pos1 >= 0) + { + pos1++; + int pos2 = item.Name.Find(')', pos1); + if (pos2 >= 0) + { + subName = item.Name.Mid(pos1, pos2 - pos1); + pos1 = subName.Find(':'); + if (pos1 >= 0) + subName = subName.Left(pos1); + } + } + subName.Trim(); + if (!subName.IsEmpty()) + { + if (subName == "Apple_HFS") + subName = "hfs"; + else if (subName == "Apple_HFSX") + subName = "hfsx"; + else if (subName == "Apple_Free") + subName = "free"; + else if (subName == "DDM") + subName = "ddm"; + UString name2; + ConvertUTF8ToUnicode(subName, name2); + name += L'.'; + name += name2; + } + else + { + UString name2; + ConvertUTF8ToUnicode(item.Name, name2); + if (!name2.IsEmpty()) + name += L" - "; + name += name2; + } + prop = name; + break; + } + case kpidComment: + { + UString name; + ConvertUTF8ToUnicode(item.Name, name); + prop = name; + break; + } + + case kpidSize: prop = item.GetUnpackSize(); break; + case kpidPackSize: prop = item.GetPackSize(); break; + } + } + prop.Detach(value); + return S_OK; + COM_TRY_END +} + +class CAdcDecoder: + public ICompressCoder, + public CMyUnknownImp +{ + CLzOutWindow m_OutWindowStream; + CInBuffer m_InStream; + + void ReleaseStreams() + { + m_OutWindowStream.ReleaseStream(); + m_InStream.ReleaseStream(); + } + + class CCoderReleaser + { + CAdcDecoder *m_Coder; + public: + bool NeedFlush; + CCoderReleaser(CAdcDecoder *coder): m_Coder(coder), NeedFlush(true) {} + ~CCoderReleaser() + { + if (NeedFlush) + m_Coder->m_OutWindowStream.Flush(); + m_Coder->ReleaseStreams(); + } + }; + friend class CCoderReleaser; + +public: + MY_UNKNOWN_IMP + + STDMETHOD(CodeReal)(ISequentialInStream *inStream, + ISequentialOutStream *outStream, const UInt64 *inSize, const UInt64 *outSize, + ICompressProgressInfo *progress); + + STDMETHOD(Code)(ISequentialInStream *inStream, + ISequentialOutStream *outStream, const UInt64 *inSize, const UInt64 *outSize, + ICompressProgressInfo *progress); +}; + +STDMETHODIMP CAdcDecoder::CodeReal(ISequentialInStream *inStream, + ISequentialOutStream *outStream, const UInt64 *inSize, const UInt64 *outSize, + ICompressProgressInfo *progress) +{ + if (!m_OutWindowStream.Create(1 << 18)) + return E_OUTOFMEMORY; + if (!m_InStream.Create(1 << 18)) + return E_OUTOFMEMORY; + + m_OutWindowStream.SetStream(outStream); + m_OutWindowStream.Init(false); + m_InStream.SetStream(inStream); + m_InStream.Init(); + + CCoderReleaser coderReleaser(this); + + const UInt32 kStep = (1 << 20); + UInt64 nextLimit = kStep; + + UInt64 pos = 0; + while (pos < *outSize) + { + if (pos > nextLimit && progress) + { + UInt64 packSize = m_InStream.GetProcessedSize(); + RINOK(progress->SetRatioInfo(&packSize, &pos)); + nextLimit += kStep; + } + Byte b; + if (!m_InStream.ReadByte(b)) + return S_FALSE; + UInt64 rem = *outSize - pos; + if (b & 0x80) + { + unsigned num = (b & 0x7F) + 1; + if (num > rem) + return S_FALSE; + for (unsigned i = 0; i < num; i++) + { + if (!m_InStream.ReadByte(b)) + return S_FALSE; + m_OutWindowStream.PutByte(b); + } + pos += num; + continue; + } + Byte b1; + if (!m_InStream.ReadByte(b1)) + return S_FALSE; + + UInt32 len, distance; + + if (b & 0x40) + { + len = ((UInt32)b & 0x3F) + 4; + Byte b2; + if (!m_InStream.ReadByte(b2)) + return S_FALSE; + distance = ((UInt32)b1 << 8) + b2; + } + else + { + b &= 0x3F; + len = ((UInt32)b >> 2) + 3; + distance = (((UInt32)b & 3) << 8) + b1; + } + + if (distance >= pos || len > rem) + return S_FALSE; + m_OutWindowStream.CopyBlock(distance, len); + pos += len; + } + if (*inSize != m_InStream.GetProcessedSize()) + return S_FALSE; + coderReleaser.NeedFlush = false; + return m_OutWindowStream.Flush(); +} + +STDMETHODIMP CAdcDecoder::Code(ISequentialInStream *inStream, + ISequentialOutStream *outStream, const UInt64 *inSize, const UInt64 *outSize, + ICompressProgressInfo *progress) +{ + try { return CodeReal(inStream, outStream, inSize, outSize, progress);} + catch(const CInBufferException &e) { return e.ErrorCode; } + catch(const CLzOutWindowException &e) { return e.ErrorCode; } + catch(...) { return S_FALSE; } +} + + +STDMETHODIMP CHandler::Extract(const UInt32 *indices, UInt32 numItems, + Int32 testMode, IArchiveExtractCallback *extractCallback) +{ + COM_TRY_BEGIN + bool allFilesMode = (numItems == (UInt32)-1); + if (allFilesMode) + numItems = _files.Size(); + if (numItems == 0) + return S_OK; + UInt64 totalSize = 0; + UInt32 i; + for (i = 0; i < numItems; i++) + { + int index = (int)(allFilesMode ? i : indices[i]); + #ifdef DMG_SHOW_RAW + if (index == _fileIndices.Size()) + totalSize += _xml.Length(); + else if (index > _fileIndices.Size()) + totalSize += _files[index - (_fileIndices.Size() + 1)].Raw.GetCapacity(); + else + #endif + totalSize += _files[_fileIndices[index]].GetUnpackSize(); + } + extractCallback->SetTotal(totalSize); + + UInt64 currentPackTotal = 0; + UInt64 currentUnpTotal = 0; + UInt64 currentPackSize = 0; + UInt64 currentUnpSize = 0; + + const UInt32 kZeroBufSize = (1 << 14); + CByteBuffer zeroBuf; + zeroBuf.SetCapacity(kZeroBufSize); + memset(zeroBuf, 0, kZeroBufSize); + + NCompress::CCopyCoder *copyCoderSpec = new NCompress::CCopyCoder(); + CMyComPtr copyCoder = copyCoderSpec; + + NCompress::NBZip2::CDecoder *bzip2CoderSpec = new NCompress::NBZip2::CDecoder(); + CMyComPtr bzip2Coder = bzip2CoderSpec; + + NCompress::NZlib::CDecoder *zlibCoderSpec = new NCompress::NZlib::CDecoder(); + CMyComPtr zlibCoder = zlibCoderSpec; + + CAdcDecoder *adcCoderSpec = new CAdcDecoder(); + CMyComPtr adcCoder = adcCoderSpec; + + CLocalProgress *lps = new CLocalProgress; + CMyComPtr progress = lps; + lps->Init(extractCallback, false); + + CLimitedSequentialInStream *streamSpec = new CLimitedSequentialInStream; + CMyComPtr inStream(streamSpec); + streamSpec->SetStream(_inStream); + + for (i = 0; i < numItems; i++, currentPackTotal += currentPackSize, currentUnpTotal += currentUnpSize) + { + lps->InSize = currentPackTotal; + lps->OutSize = currentUnpTotal; + currentPackSize = 0; + currentUnpSize = 0; + RINOK(lps->SetCur()); + CMyComPtr realOutStream; + Int32 askMode = testMode ? + NExtract::NAskMode::kTest : + NExtract::NAskMode::kExtract; + Int32 index = allFilesMode ? i : indices[i]; + // const CItemEx &item = _files[index]; + RINOK(extractCallback->GetStream(index, &realOutStream, askMode)); + + + if (!testMode && !realOutStream) + continue; + RINOK(extractCallback->PrepareOperation(askMode)); + + CLimitedSequentialOutStream *outStreamSpec = new CLimitedSequentialOutStream; + CMyComPtr outStream(outStreamSpec); + outStreamSpec->SetStream(realOutStream); + + realOutStream.Release(); + + Int32 opRes = NExtract::NOperationResult::kOK; + #ifdef DMG_SHOW_RAW + if (index > _fileIndices.Size()) + { + const CByteBuffer &buf = _files[index - (_fileIndices.Size() + 1)].Raw; + outStreamSpec->Init(buf.GetCapacity()); + RINOK(WriteStream(outStream, buf, buf.GetCapacity())); + currentPackSize = currentUnpSize = buf.GetCapacity(); + } + else if (index == _fileIndices.Size()) + { + outStreamSpec->Init(_xml.Length()); + RINOK(WriteStream(outStream, (const char *)_xml, _xml.Length())); + currentPackSize = currentUnpSize = _xml.Length(); + } + else + #endif + { + const CFile &item = _files[_fileIndices[index]]; + currentPackSize = item.GetPackSize(); + currentUnpSize = item.GetUnpackSize(); + + UInt64 unpPos = 0; + UInt64 packPos = 0; + { + for (int j = 0; j < item.Blocks.Size(); j++) + { + lps->InSize = currentPackTotal + packPos; + lps->OutSize = currentUnpTotal + unpPos; + RINOK(lps->SetCur()); + + const CBlock &block = item.Blocks[j]; + + packPos += block.PackSize; + if (block.UnpPos != unpPos) + { + opRes = NExtract::NOperationResult::kDataError; + break; + } + + RINOK(_inStream->Seek(item.StartPos + block.PackPos, STREAM_SEEK_SET, NULL)); + streamSpec->Init(block.PackSize); + // UInt64 startSize = outStreamSpec->GetSize(); + bool realMethod = true; + outStreamSpec->Init(block.UnpSize); + HRESULT res = S_OK; + + switch(block.Type) + { + case METHOD_ZERO_0: + case METHOD_ZERO_2: + realMethod = false; + if (block.PackSize != 0) + opRes = NExtract::NOperationResult::kUnSupportedMethod; + break; + + case METHOD_COPY: + if (block.UnpSize != block.PackSize) + { + opRes = NExtract::NOperationResult::kUnSupportedMethod; + break; + } + res = copyCoder->Code(inStream, outStream, NULL, NULL, progress); + break; + + case METHOD_ADC: + { + res = adcCoder->Code(inStream, outStream, &block.PackSize, &block.UnpSize, progress); + break; + } + + case METHOD_ZLIB: + { + res = zlibCoder->Code(inStream, outStream, NULL, NULL, progress); + break; + } + + case METHOD_BZIP2: + { + res = bzip2Coder->Code(inStream, outStream, NULL, NULL, progress); + if (res == S_OK) + if (streamSpec->GetSize() != block.PackSize) + opRes = NExtract::NOperationResult::kDataError; + break; + } + + default: + opRes = NExtract::NOperationResult::kUnSupportedMethod; + break; + } + if (res != S_OK) + { + if (res != S_FALSE) + return res; + if (opRes == NExtract::NOperationResult::kOK) + opRes = NExtract::NOperationResult::kDataError; + } + unpPos += block.UnpSize; + if (!outStreamSpec->IsFinishedOK()) + { + if (realMethod && opRes == NExtract::NOperationResult::kOK) + opRes = NExtract::NOperationResult::kDataError; + + while (outStreamSpec->GetRem() != 0) + { + UInt64 rem = outStreamSpec->GetRem(); + UInt32 size = (UInt32)MyMin(rem, (UInt64)kZeroBufSize); + RINOK(WriteStream(outStream, zeroBuf, size)); + } + } + } + } + } + outStream.Release(); + RINOK(extractCallback->SetOperationResult(opRes)); + } + return S_OK; + COM_TRY_END +} + +static IInArchive *CreateArc() { return new CHandler; } + +static CArcInfo g_ArcInfo = + { L"Dmg", L"dmg", 0, 0xE4, { 0 }, 0, false, CreateArc, 0 }; + +REGISTER_ARC(Dmg) + +}} diff --git a/CPP/7zip/Archive/ElfHandler.cpp b/CPP/7zip/Archive/ElfHandler.cpp new file mode 100644 index 0000000..c4ad78e --- /dev/null +++ b/CPP/7zip/Archive/ElfHandler.cpp @@ -0,0 +1,534 @@ +// ElfHandler.cpp + +#include "StdAfx.h" + +#include "../../../C/CpuArch.h" + +#include "Common/Buffer.h" +#include "Common/ComTry.h" +#include "Common/IntToString.h" + +#include "Windows/PropVariantUtils.h" + +#include "../Common/LimitedStreams.h" +#include "../Common/ProgressUtils.h" +#include "../Common/RegisterArc.h" +#include "../Common/StreamUtils.h" + +#include "../Compress/CopyCoder.h" + +static UInt16 Get16(const Byte *p, int be) { if (be) return GetBe16(p); return GetUi16(p); } +static UInt32 Get32(const Byte *p, int be) { if (be) return GetBe32(p); return GetUi32(p); } +static UInt64 Get64(const Byte *p, int be) { if (be) return GetBe64(p); return GetUi64(p); } + +using namespace NWindows; + +namespace NArchive { +namespace NElf { + +#define ELF_CLASS_32 1 +#define ELF_CLASS_64 2 + +#define ELF_DATA_2LSB 1 +#define ELF_DATA_2MSB 2 + +#define NUM_SCAN_SECTIONS_MAX (1 << 6) + +struct CHeader +{ + bool Mode64; + bool Be; + Byte Os; + Byte AbiVer; + + UInt16 Type; + UInt16 Machine; + // UInt32 Version; + + // UInt64 EntryVa; + UInt64 ProgOffset; + UInt64 SectOffset; + UInt32 Flags; + UInt16 ElfHeaderSize; + UInt16 SegmentEntrySize; + UInt16 NumSegments; + UInt16 SectEntrySize; + UInt16 NumSections; + // UInt16 SectNameStringTableIndex; + + bool Parse(const Byte *buf); + + bool CheckSegmentEntrySize() const + { + return (Mode64 && SegmentEntrySize == 0x38) || (!Mode64 && SegmentEntrySize == 0x20); + }; + + UInt64 GetHeadersSize() const + { return ElfHeaderSize + + (UInt64)SegmentEntrySize * NumSegments + + (UInt64)SectEntrySize * NumSections; } + +}; + +bool CHeader::Parse(const Byte *p) +{ + switch(p[4]) + { + case ELF_CLASS_32: Mode64 = false; break; + case ELF_CLASS_64: Mode64 = true; break; + default: return false; + } + bool be; + switch(p[5]) + { + case ELF_DATA_2LSB: be = false; break; + case ELF_DATA_2MSB: be = true; break; + default: return false; + } + Be = be; + if (p[6] != 1) // Version + return false; + Os = p[7]; + AbiVer = p[8]; + for (int i = 9; i < 16; i++) + if (p[i] != 0) + return false; + + Type = Get16(p + 0x10, be); + Machine = Get16(p + 0x12, be); + if (Get32(p + 0x14, be) != 1) // Version + return false; + + if (Mode64) + { + // EntryVa = Get64(p + 0x18, be); + ProgOffset = Get64(p + 0x20, be); + SectOffset = Get64(p + 0x28, be); + p += 0x30; + } + else + { + // EntryVa = Get32(p + 0x18, be); + ProgOffset = Get32(p + 0x1C, be); + SectOffset = Get32(p + 0x20, be); + p += 0x24; + } + + Flags = Get32(p + 0, be); + ElfHeaderSize = Get16(p + 4, be); + SegmentEntrySize = Get16(p + 6, be); + NumSegments = Get16(p + 8, be); + SectEntrySize = Get16(p + 10, be); + NumSections = Get16(p + 12, be); + // SectNameStringTableIndex = Get16(p + 14, be); + return CheckSegmentEntrySize(); +} + +struct CSegment +{ + UInt32 Type; + UInt32 Flags; + UInt64 Offset; + UInt64 Va; + // UInt64 Pa; + UInt64 PSize; + UInt64 VSize; + // UInt64 Align; + + void UpdateTotalSize(UInt64 &totalSize) + { + UInt64 t = Offset + PSize; + if (t > totalSize) + totalSize = t; + } + void Parse(const Byte *p, bool mode64, bool be); +}; + +void CSegment::Parse(const Byte *p, bool mode64, bool be) +{ + Type = Get32(p, be); + if (mode64) + { + Flags = Get32(p + 4, be); + Offset = Get64(p + 8, be); + Va = Get64(p + 0x10, be); + // Pa = Get64(p + 0x18, be); + PSize = Get64(p + 0x20, be); + VSize = Get64(p + 0x28, be); + // Align = Get64(p + 0x30, be); + } + else + { + Offset = Get32(p + 4, be); + Va = Get32(p + 8, be); + // Pa = Get32(p + 12, be); + PSize = Get32(p + 16, be); + VSize = Get32(p + 20, be); + Flags = Get32(p + 24, be); + // Align = Get32(p + 28, be); + } +} + +static const CUInt32PCharPair g_MachinePairs[] = +{ + { 0, "None" }, + { 1, "AT&T WE 32100" }, + { 2, "SPARC" }, + { 3, "Intel 386" }, + { 4, "Motorola 68000" }, + { 5, "Motorola 88000" }, + { 6, "Intel 486" }, + { 7, "Intel i860" }, + { 8, "MIPS" }, + { 9, "IBM S/370" }, + { 10, "MIPS RS3000 LE" }, + { 11, "RS6000" }, + + { 15, "PA-RISC" }, + { 16, "nCUBE" }, + { 17, "Fujitsu VPP500" }, + { 18, "SPARC 32+" }, + { 19, "Intel i960" }, + { 20, "PowerPC" }, + { 21, "PowerPC 64-bit" }, + { 22, "IBM S/390" }, + + { 36, "NEX v800" }, + { 37, "Fujitsu FR20" }, + { 38, "TRW RH-32" }, + { 39, "Motorola RCE" }, + { 40, "ARM" }, + { 41, "Alpha" }, + { 42, "Hitachi SH" }, + { 43, "SPARC-V9" }, + { 44, "Siemens Tricore" }, + { 45, "ARC" }, + { 46, "H8/300" }, + { 47, "H8/300H" }, + { 48, "H8S" }, + { 49, "H8/500" }, + { 50, "IA-64" }, + { 51, "Stanford MIPS-X" }, + { 52, "Motorola ColdFire" }, + { 53, "M68HC12" }, + { 54, "Fujitsu MMA" }, + { 55, "Siemens PCP" }, + { 56, "Sony nCPU" }, + { 57, "Denso NDR1" }, + { 58, "Motorola StarCore" }, + { 59, "Toyota ME16" }, + { 60, "ST100" }, + { 61, "Advanced Logic TinyJ" }, + { 62, "AMD64" }, + { 63, "Sony DSP" }, + + { 66, "Siemens FX66" }, + { 67, "ST9+" }, + { 68, "ST7" }, + { 69, "MC68HC16" }, + { 70, "MC68HC11" }, + { 71, "MC68HC08" }, + { 72, "MC68HC05" }, + { 73, "Silicon Graphics SVx" }, + { 74, "ST19" }, + { 75, "Digital VAX" }, + { 76, "Axis CRIS" }, + { 77, "Infineon JAVELIN" }, + { 78, "Element 14 FirePath" }, + { 79, "LSI ZSP" }, + { 80, "MMIX" }, + { 81, "HUANY" }, + { 82, "SiTera Prism" }, + { 83, "Atmel AVR" }, + { 84, "Fujitsu FR30" }, + { 85, "Mitsubishi D10V" }, + { 86, "Mitsubishi D30V" }, + { 87, "NEC v850" }, + { 88, "Mitsubishi M32R" }, + { 89, "Matsushita MN10300" }, + { 90, "Matsushita MN10200" }, + { 91, "picoJava" }, + { 92, "OpenRISC" }, + { 93, "ARC Tangent-A5" }, + { 94, "Tensilica Xtensa" }, + { 0x9026, "Alpha" } +}; + +static const CUInt32PCharPair g_AbiOS[] = +{ + { 0, "None" }, + { 1, "HP-UX" }, + { 2, "NetBSD" }, + { 3, "Linux" }, + + { 6, "Solaris" }, + { 7, "AIX" }, + { 8, "IRIX" }, + { 9, "FreeBSD" }, + { 10, "TRU64" }, + { 11, "Novell Modesto" }, + { 12, "OpenBSD" }, + { 13, "OpenVMS" }, + { 14, "HP NSK" }, + { 15, "AROS" }, + { 97, "ARM" }, + { 255, "Standalone" } +}; + +static const CUInt32PCharPair g_SegmentFlags[] = +{ + { 0, "Execute" }, + { 1, "Write" }, + { 2, "Read" } +}; + +static const char *g_Types[] = +{ + "None", + "Relocatable file", + "Executable file", + "Shared object file", + "Core file" +}; + +static const char *g_SegnmentTypes[] = +{ + "Unused", + "Loadable segment", + "Dynamic linking tables", + "Program interpreter path name", + "Note section", + "SHLIB", + "Program header table", + "TLS" +}; + +class CHandler: + public IInArchive, + public CMyUnknownImp +{ + CMyComPtr _inStream; + CObjectVector _sections; + UInt32 _peOffset; + CHeader _header; + UInt64 _totalSize; + HRESULT Open2(IInStream *stream); + bool Parse(const Byte *buf, UInt32 size); +public: + MY_UNKNOWN_IMP1(IInArchive) + INTERFACE_IInArchive(;) +}; + +#define ELF_PT_PHDR 6 + +bool CHandler::Parse(const Byte *buf, UInt32 size) +{ + if (size < 64) + return false; + if (!_header.Parse(buf)) + return false; + if (_header.ProgOffset > size || + _header.ProgOffset + (UInt64)_header.SegmentEntrySize * _header.NumSegments > size || + _header.NumSegments > NUM_SCAN_SECTIONS_MAX) + return false; + const Byte *p = buf + _header.ProgOffset; + _totalSize = _header.ProgOffset; + + for (int i = 0; i < _header.NumSegments; i++, p += _header.SegmentEntrySize) + { + CSegment sect; + sect.Parse(p, _header.Mode64, _header.Be); + sect.UpdateTotalSize(_totalSize); + if (sect.Type != ELF_PT_PHDR) + _sections.Add(sect); + } + UInt64 total2 = _header.SectOffset + (UInt64)_header.SectEntrySize * _header.NumSections; + if (total2 > _totalSize) + _totalSize = total2; + return true; +} + +STATPROPSTG kArcProps[] = +{ + { NULL, kpidCpu, VT_BSTR}, + { NULL, kpidBit64, VT_BOOL}, + { NULL, kpidBigEndian, VT_BOOL}, + { NULL, kpidHostOS, VT_BSTR}, + { NULL, kpidCharacts, VT_BSTR}, + { NULL, kpidPhySize, VT_UI8}, + { NULL, kpidHeadersSize, VT_UI8} + }; + +STATPROPSTG kProps[] = +{ + { NULL, kpidPath, VT_BSTR}, + { NULL, kpidSize, VT_UI8}, + { NULL, kpidPackSize, VT_UI8}, + { NULL, kpidType, VT_BSTR}, + { NULL, kpidCharacts, VT_BSTR}, + { NULL, kpidOffset, VT_UI8}, + { NULL, kpidVa, VT_UI8} +}; + +IMP_IInArchive_Props +IMP_IInArchive_ArcProps + +STDMETHODIMP CHandler::GetArchiveProperty(PROPID propID, PROPVARIANT *value) +{ + COM_TRY_BEGIN + NCOM::CPropVariant prop; + switch(propID) + { + case kpidPhySize: prop = _totalSize; break; + case kpidHeadersSize: prop = _header.GetHeadersSize(); break; + case kpidBit64: if (_header.Mode64) prop = _header.Mode64; break; + case kpidBigEndian: if (_header.Be) prop = _header.Be; break; + case kpidCpu: PAIR_TO_PROP(g_MachinePairs, _header.Machine, prop); break; + case kpidHostOS: PAIR_TO_PROP(g_AbiOS, _header.Os, prop); break; + case kpidCharacts: TYPE_TO_PROP(g_Types, _header.Type, prop); break; + } + prop.Detach(value); + return S_OK; + COM_TRY_END +} + +STDMETHODIMP CHandler::GetProperty(UInt32 index, PROPID propID, PROPVARIANT *value) +{ + COM_TRY_BEGIN + NCOM::CPropVariant prop; + const CSegment &item = _sections[index]; + switch(propID) + { + case kpidPath: + { + wchar_t sz[32]; + ConvertUInt64ToString(index, sz); + prop = sz; + break; + } + case kpidSize: prop = (UInt64)item.VSize; break; + case kpidPackSize: prop = (UInt64)item.PSize; break; + case kpidOffset: prop = item.Offset; break; + case kpidVa: prop = item.Va; break; + case kpidType: TYPE_TO_PROP(g_SegnmentTypes, item.Type, prop); break; + case kpidCharacts: FLAGS_TO_PROP(g_SegmentFlags, item.Flags, prop); break; + } + prop.Detach(value); + return S_OK; + COM_TRY_END +} + +HRESULT CHandler::Open2(IInStream *stream) +{ + const UInt32 kBufSize = 1 << 18; + const UInt32 kSigSize = 4; + + CByteBuffer buffer; + buffer.SetCapacity(kBufSize); + Byte *buf = buffer; + + size_t processed = kSigSize; + RINOK(ReadStream_FALSE(stream, buf, processed)); + if (buf[0] != 0x7F || buf[1] != 'E' || buf[2] != 'L' || buf[3] != 'F') + return S_FALSE; + processed = kBufSize - kSigSize; + RINOK(ReadStream(stream, buf + kSigSize, &processed)); + processed += kSigSize; + if (!Parse(buf, (UInt32)processed)) + return S_FALSE; + UInt64 fileSize; + RINOK(stream->Seek(0, STREAM_SEEK_END, &fileSize)); + return (fileSize == _totalSize) ? S_OK : S_FALSE; +} + +STDMETHODIMP CHandler::Open(IInStream *inStream, + const UInt64 * /* maxCheckStartPosition */, + IArchiveOpenCallback * /* openArchiveCallback */) +{ + COM_TRY_BEGIN + Close(); + RINOK(Open2(inStream)); + _inStream = inStream; + return S_OK; + COM_TRY_END +} + +STDMETHODIMP CHandler::Close() +{ + _inStream.Release(); + _sections.Clear(); + return S_OK; +} + +STDMETHODIMP CHandler::GetNumberOfItems(UInt32 *numItems) +{ + *numItems = _sections.Size(); + return S_OK; +} + +STDMETHODIMP CHandler::Extract(const UInt32 *indices, UInt32 numItems, + Int32 testMode, IArchiveExtractCallback *extractCallback) +{ + COM_TRY_BEGIN + bool allFilesMode = (numItems == (UInt32)-1); + if (allFilesMode) + numItems = _sections.Size(); + if (numItems == 0) + return S_OK; + UInt64 totalSize = 0; + UInt32 i; + for (i = 0; i < numItems; i++) + totalSize += _sections[allFilesMode ? i : indices[i]].PSize; + extractCallback->SetTotal(totalSize); + + UInt64 currentTotalSize = 0; + UInt64 currentItemSize; + + NCompress::CCopyCoder *copyCoderSpec = new NCompress::CCopyCoder(); + CMyComPtr copyCoder = copyCoderSpec; + + CLocalProgress *lps = new CLocalProgress; + CMyComPtr progress = lps; + lps->Init(extractCallback, false); + + CLimitedSequentialInStream *streamSpec = new CLimitedSequentialInStream; + CMyComPtr inStream(streamSpec); + streamSpec->SetStream(_inStream); + + for (i = 0; i < numItems; i++, currentTotalSize += currentItemSize) + { + lps->InSize = lps->OutSize = currentTotalSize; + RINOK(lps->SetCur()); + Int32 askMode = testMode ? + NExtract::NAskMode::kTest : + NExtract::NAskMode::kExtract; + UInt32 index = allFilesMode ? i : indices[i]; + const CSegment &item = _sections[index]; + currentItemSize = item.PSize; + + CMyComPtr outStream; + RINOK(extractCallback->GetStream(index, &outStream, askMode)); + if (!testMode && !outStream) + continue; + + RINOK(extractCallback->PrepareOperation(askMode)); + RINOK(_inStream->Seek(item.Offset, STREAM_SEEK_SET, NULL)); + streamSpec->Init(currentItemSize); + RINOK(copyCoder->Code(inStream, outStream, NULL, NULL, progress)); + outStream.Release(); + RINOK(extractCallback->SetOperationResult(copyCoderSpec->TotalSize == currentItemSize ? + NExtract::NOperationResult::kOK: + NExtract::NOperationResult::kDataError)); + } + return S_OK; + COM_TRY_END +} + +static IInArchive *CreateArc() { return new CHandler; } + +static CArcInfo g_ArcInfo = + { L"ELF", L"", 0, 0xDE, { 0 }, 0, false, CreateArc, 0 }; + +REGISTER_ARC(Elf) + +}} diff --git a/CPP/7zip/Archive/FatHandler.cpp b/CPP/7zip/Archive/FatHandler.cpp new file mode 100644 index 0000000..1c374a4 --- /dev/null +++ b/CPP/7zip/Archive/FatHandler.cpp @@ -0,0 +1,996 @@ +// FatHandler.cpp + +#include "StdAfx.h" + +// #include + +#include "../../../C/CpuArch.h" + +#include "Common/Buffer.h" +#include "Common/ComTry.h" +#include "Common/IntToString.h" +#include "Common/MyCom.h" +#include "Common/StringConvert.h" + +#include "Windows/PropVariant.h" +#include "Windows/Time.h" + +#include "../Common/LimitedStreams.h" +#include "../Common/ProgressUtils.h" +#include "../Common/RegisterArc.h" +#include "../Common/StreamUtils.h" + +#include "../Compress/CopyCoder.h" + +#include "Common/DummyOutStream.h" + +#define Get16(p) GetUi16(p) +#define Get32(p) GetUi32(p) + +#define PRF(x) /* x */ + +namespace NArchive { +namespace NFat { + +static const UInt32 kFatItemUsedByDirMask = (UInt32)1 << 31; + +struct CHeader +{ + UInt32 NumSectors; + UInt16 NumReservedSectors; + Byte NumFats; + UInt32 NumFatSectors; + UInt32 RootDirSector; + UInt32 NumRootDirSectors; + UInt32 DataSector; + + UInt32 FatSize; + UInt32 BadCluster; + + Byte NumFatBits; + Byte SectorSizeLog; + Byte SectorsPerClusterLog; + Byte ClusterSizeLog; + + UInt16 SectorsPerTrack; + UInt16 NumHeads; + UInt32 NumHiddenSectors; + + bool VolFieldsDefined; + + UInt32 VolId; + // Byte VolName[11]; + // Byte FileSys[8]; + + // Byte OemName[5]; + Byte MediaType; + + // 32-bit FAT + UInt16 Flags; + UInt16 FsInfoSector; + UInt32 RootCluster; + + bool IsFat32() const { return NumFatBits == 32; } + UInt64 GetPhySize() const { return (UInt64)NumSectors << SectorSizeLog; } + UInt32 SectorSize() const { return (UInt32)1 << SectorSizeLog; } + UInt32 ClusterSize() const { return (UInt32)1 << ClusterSizeLog; } + UInt32 ClusterToSector(UInt32 c) const { return DataSector + ((c - 2) << SectorsPerClusterLog); } + UInt32 IsEoc(UInt32 c) const { return c > BadCluster; } + UInt32 IsEocAndUnused(UInt32 c) const { return c > BadCluster && (c & kFatItemUsedByDirMask) == 0; } + UInt32 IsValidCluster(UInt32 c) const { return c >= 2 && c < FatSize; } + UInt32 SizeToSectors(UInt32 size) const { return (size + SectorSize() - 1) >> SectorSizeLog; } + UInt32 CalcFatSizeInSectors() const { return SizeToSectors((FatSize * (NumFatBits / 4) + 1) / 2); } + + UInt32 GetFatSector() const + { + UInt32 index = (IsFat32() && (Flags & 0x80) != 0) ? (Flags & 0xF) : 0; + if (index > NumFats) + index = 0; + return NumReservedSectors + index * NumFatSectors; + } + + UInt64 GetFilePackSize(UInt32 unpackSize) const + { + UInt64 mask = ClusterSize() - 1; + return (unpackSize + mask) & ~mask; + } + + UInt32 GetNumClusters(UInt32 size) const + { return (UInt32)(((UInt64)size + ClusterSize() - 1) >> ClusterSizeLog); } + + bool Parse(const Byte *p); +}; + +static int GetLog(UInt32 num) +{ + for (int i = 0; i < 31; i++) + if (((UInt32)1 << i) == num) + return i; + return -1; +} + +bool CHeader::Parse(const Byte *p) +{ + if (p[0x1FE] != 0x55 || p[0x1FF] != 0xAA) + return false; + + int codeOffset = 0; + switch (p[0]) + { + case 0xE9: codeOffset = 3 + (Int16)Get16(p + 1); break; + case 0xEB: if (p[2] != 0x90) return false; codeOffset = 2 + (signed char)p[1]; break; + default: return false; + } + { + int s = GetLog(Get16(p + 11)); + if (s < 9 || s > 12) + return false; + SectorSizeLog = (Byte)s; + s = GetLog(p[13]); + if (s < 0) + return false; + SectorsPerClusterLog = (Byte)s; + ClusterSizeLog = SectorSizeLog + SectorsPerClusterLog; + } + + NumReservedSectors = Get16(p + 14); + if (NumReservedSectors == 0) + return false; + + NumFats = p[16]; + if (NumFats < 1 || NumFats > 4) + return false; + + UInt16 numRootDirEntries = Get16(p + 17); + if (numRootDirEntries == 0) + { + if (codeOffset < 90) + return false; + NumFatBits = 32; + NumRootDirSectors = 0; + } + else + { + if (codeOffset < 62) + return false; + NumFatBits = 0; + UInt32 mask = (1 << (SectorSizeLog - 5)) - 1; + if ((numRootDirEntries & mask) != 0) + return false; + NumRootDirSectors = (numRootDirEntries + mask) >> (SectorSizeLog - 5); + } + + NumSectors = Get16(p + 19); + if (NumSectors == 0) + NumSectors = Get32(p + 32); + else if (IsFat32()) + return false; + + MediaType = p[21]; + NumFatSectors = Get16(p + 22); + SectorsPerTrack = Get16(p + 24); + NumHeads = Get16(p + 26); + NumHiddenSectors = Get32(p + 28); + + // memcpy(OemName, p + 3, 5); + + p += 36; + if (IsFat32()) + { + if (NumFatSectors != 0) + return false; + NumFatSectors = Get32(p); + if (NumFatSectors >= (1 << 24)) + return false; + + Flags = Get16(p + 4); + if (Get16(p + 6) != 0) + return false; + RootCluster = Get32(p + 8); + FsInfoSector = Get16(p + 12); + for (int i = 16; i < 28; i++) + if (p[i] != 0) + return false; + p += 28; + } + + // DriveNumber = p[0]; + VolFieldsDefined = (p[2] == 0x29); // ExtendedBootSig + VolId = Get32(p + 3); + // memcpy(VolName, p + 7, 11); + // memcpy(FileSys, p + 18, 8); + + if (NumFatSectors == 0) + return false; + RootDirSector = NumReservedSectors + NumFatSectors * NumFats; + DataSector = RootDirSector + NumRootDirSectors; + if (NumSectors < DataSector) + return false; + UInt32 numDataSectors = NumSectors - DataSector; + UInt32 numClusters = numDataSectors >> SectorsPerClusterLog; + + BadCluster = 0x0FFFFFF7; + if (numClusters < 0xFFF5) + { + if (NumFatBits == 32) + return false; + NumFatBits = (numClusters < 0xFF5) ? 12: 16; + BadCluster &= ((1 << NumFatBits) - 1); + } + else if (NumFatBits != 32) + return false; + + FatSize = numClusters + 2; + if (FatSize > BadCluster || CalcFatSizeInSectors() > NumFatSectors) + return false; + return true; +} + +struct CItem +{ + UString UName; + char DosName[11]; + Byte CTime2; + UInt32 CTime; + UInt32 MTime; + UInt16 ADate; + Byte Attrib; + Byte Flags; + UInt32 Size; + UInt32 Cluster; + Int32 Parent; + + // NT uses Flags to store Low Case status + bool NameIsLow() const { return (Flags & 0x8) != 0; } + bool ExtIsLow() const { return (Flags & 0x10) != 0; } + bool IsDir() const { return (Attrib & 0x10) != 0; } + UString GetShortName() const; + UString GetName() const; + UString GetVolName() const; +}; + +static int CopyAndTrim(char *dest, const char *src, int size, bool toLower) +{ + int i; + memcpy(dest, src, size); + if (toLower) + for (i = 0; i < size; i++) + { + char c = dest[i]; + if (c >= 'A' && c <= 'Z') + dest[i] = c + 0x20; + } + for (i = size - 1; i >= 0 && dest[i] == ' '; i--); + return i + 1; +} + +static UString FatStringToUnicode(const char *s) +{ + return MultiByteToUnicodeString(s, CP_OEMCP); +} + +UString CItem::GetShortName() const +{ + char s[16]; + int i = CopyAndTrim(s, DosName, 8, NameIsLow()); + s[i++] = '.'; + int j = CopyAndTrim(s + i, DosName + 8, 3, ExtIsLow()); + if (j == 0) + j--; + s[i + j] = 0; + return FatStringToUnicode(s); +} + +UString CItem::GetName() const +{ + if (!UName.IsEmpty()) + return UName; + return GetShortName(); +} + +UString CItem::GetVolName() const +{ + if (!UName.IsEmpty()) + return UName; + char s[12]; + int i = CopyAndTrim(s, DosName, 11, false); + s[i] = 0; + return FatStringToUnicode(s); +} + +struct CDatabase +{ + CHeader Header; + CObjectVector Items; + UInt32 *Fat; + CMyComPtr InStream; + IArchiveOpenCallback *OpenCallback; + + UInt32 NumFreeClusters; + bool VolItemDefined; + CItem VolItem; + UInt32 NumDirClusters; + CByteBuffer ByteBuf; + UInt64 NumCurUsedBytes; + + CDatabase(): Fat(0) {} + ~CDatabase() { ClearAndClose(); } + + void Clear(); + void ClearAndClose(); + HRESULT OpenProgressFat(bool changeTotal = true); + HRESULT OpenProgress(); + + UString GetItemPath(Int32 index) const; + HRESULT Open(); + HRESULT ReadDir(Int32 parent, UInt32 cluster, int level); + + UInt64 GetHeadersSize() const + { + return (UInt64)(Header.DataSector + (NumDirClusters << Header.SectorsPerClusterLog)) << Header.SectorSizeLog; + } + HRESULT SeekToSector(UInt32 sector); + HRESULT SeekToCluster(UInt32 cluster) { return SeekToSector(Header.ClusterToSector(cluster)); } +}; + +HRESULT CDatabase::SeekToSector(UInt32 sector) +{ + return InStream->Seek((UInt64)sector << Header.SectorSizeLog, STREAM_SEEK_SET, NULL); +} + +void CDatabase::Clear() +{ + VolItemDefined = false; + NumDirClusters = 0; + NumCurUsedBytes = 0; + + Items.Clear(); + delete []Fat; + Fat = 0; +} + +void CDatabase::ClearAndClose() +{ + Clear(); + InStream.Release(); +} + +HRESULT CDatabase::OpenProgressFat(bool changeTotal) +{ + if (!OpenCallback) + return S_OK; + if (changeTotal) + { + UInt64 numTotalBytes = (Header.CalcFatSizeInSectors() << Header.SectorSizeLog) + + ((UInt64)(Header.FatSize - NumFreeClusters) << Header.ClusterSizeLog); + RINOK(OpenCallback->SetTotal(NULL, &numTotalBytes)); + } + return OpenCallback->SetCompleted(NULL, &NumCurUsedBytes); +} + +HRESULT CDatabase::OpenProgress() +{ + if (!OpenCallback) + return S_OK; + UInt64 numItems = Items.Size(); + return OpenCallback->SetCompleted(&numItems, &NumCurUsedBytes); +} + +UString CDatabase::GetItemPath(Int32 index) const +{ + const CItem *item = &Items[index]; + UString name = item->GetName(); + for (;;) + { + index = item->Parent; + if (index < 0) + return name; + item = &Items[index]; + name = item->GetName() + WCHAR_PATH_SEPARATOR + name; + } +} + +static wchar_t *AddSubStringToName(wchar_t *dest, const Byte *p, int numChars) +{ + for (int i = 0; i < numChars; i++) + { + wchar_t c = Get16(p + i * 2); + if (c != 0 && c != 0xFFFF) + *dest++ = c; + } + *dest = 0; + return dest; +} + +HRESULT CDatabase::ReadDir(Int32 parent, UInt32 cluster, int level) +{ + int startIndex = Items.Size(); + if (startIndex >= (1 << 30) || level > 256) + return S_FALSE; + + UInt32 sectorIndex = 0; + UInt32 blockSize = Header.ClusterSize(); + bool clusterMode = (Header.IsFat32() || parent >= 0); + if (!clusterMode) + { + blockSize = Header.SectorSize(); + RINOK(SeekToSector(Header.RootDirSector)); + } + + ByteBuf.SetCapacity(blockSize); + UString curName; + int checkSum = -1; + int numLongRecords = -1; + for (UInt32 pos = blockSize;; pos += 32) + { + if (pos == blockSize) + { + pos = 0; + + if ((NumDirClusters & 0xFF) == 0) + { + RINOK(OpenProgress()); + } + + if (clusterMode) + { + if (Header.IsEoc(cluster)) + break; + if (!Header.IsValidCluster(cluster)) + return S_FALSE; + PRF(printf("\nCluster = %4X", cluster)); + RINOK(SeekToCluster(cluster)); + UInt32 newCluster = Fat[cluster]; + if ((newCluster & kFatItemUsedByDirMask) != 0) + return S_FALSE; + Fat[cluster] |= kFatItemUsedByDirMask; + cluster = newCluster; + NumDirClusters++; + NumCurUsedBytes += Header.ClusterSize(); + } + else if (sectorIndex++ >= Header.NumRootDirSectors) + break; + + RINOK(ReadStream_FALSE(InStream, ByteBuf, blockSize)); + } + const Byte *p = ByteBuf + pos; + if (p[0] == 0) + { + /* + // FreeDOS formats FAT partition with cluster chain longer than required. + if (clusterMode && !Header.IsEoc(cluster)) + return S_FALSE; + */ + break; + } + if (p[0] == 0xE5) + { + if (numLongRecords > 0) + return S_FALSE; + continue; + } + + Byte attrib = p[11]; + if ((attrib & 0x3F) == 0xF) + { + if (p[0] > 0x7F || Get16(p + 26) != 0) + return S_FALSE; + int longIndex = p[0] & 0x3F; + if (longIndex == 0) + return S_FALSE; + bool isLast = (p[0] & 0x40) != 0; + if (numLongRecords < 0) + { + if (!isLast) + return S_FALSE; + numLongRecords = longIndex; + } + else if (isLast || numLongRecords != longIndex) + return S_FALSE; + + numLongRecords--; + + if (p[12] == 0) + { + wchar_t nameBuf[14]; + wchar_t *dest; + + dest = AddSubStringToName(nameBuf, p + 1, 5); + dest = AddSubStringToName(dest, p + 14, 6); + AddSubStringToName(dest, p + 28, 2); + curName = nameBuf + curName; + if (isLast) + checkSum = p[13]; + if (checkSum != p[13]) + return S_FALSE; + } + } + else + { + if (numLongRecords > 0) + return S_FALSE; + CItem item; + memcpy(item.DosName, p, 11); + + if (checkSum >= 0) + { + Byte sum = 0; + for (int i = 0; i < 11; i++) + sum = ((sum & 1) ? 0x80 : 0) + (sum >> 1) + (Byte)item.DosName[i]; + if (sum == checkSum) + item.UName = curName; + } + + if (item.DosName[0] == 5) + item.DosName[0] = (char)(Byte)0xE5; + item.Attrib = attrib; + item.Flags = p[12]; + item.Size = Get32(p + 28); + item.Cluster = Get16(p + 26); + if (Header.NumFatBits > 16) + item.Cluster |= ((UInt32)Get16(p + 20) << 16); + else + { + // OS/2 and WinNT probably can store EA (extended atributes) in that field. + } + + item.CTime = Get32(p + 14); + item.CTime2 = p[13]; + item.ADate = Get16(p + 18); + item.MTime = Get32(p + 22); + item.Parent = parent; + + if (attrib == 8) + { + VolItem = item; + VolItemDefined = true; + } + else + if (memcmp(item.DosName, ". ", 11) != 0 && + memcmp(item.DosName, ".. ", 11) != 0) + { + if (!item.IsDir()) + NumCurUsedBytes += Header.GetFilePackSize(item.Size); + Items.Add(item); + PRF(printf("\n%7d: %S", Items.Size(), GetItemPath(Items.Size() - 1))); + } + numLongRecords = -1; + curName.Empty(); + checkSum = -1; + } + } + + int finishIndex = Items.Size(); + for (int i = startIndex; i < finishIndex; i++) + { + const CItem &item = Items[i]; + if (item.IsDir()) + { + PRF(printf("\n%S", GetItemPath(i))); + RINOK(CDatabase::ReadDir(i, item.Cluster, level + 1)); + } + } + return S_OK; +} + +HRESULT CDatabase::Open() +{ + Clear(); + bool numFreeClustersDefined = false; + { + static const UInt32 kHeaderSize = 512; + Byte buf[kHeaderSize]; + RINOK(ReadStream_FALSE(InStream, buf, kHeaderSize)); + if (!Header.Parse(buf)) + return S_FALSE; + UInt64 fileSize; + RINOK(InStream->Seek(0, STREAM_SEEK_END, &fileSize)); + + /* we comment that check to support truncated images */ + /* + if (fileSize < Header.GetPhySize()) + return S_FALSE; + */ + + if (Header.IsFat32()) + { + SeekToSector(Header.FsInfoSector); + RINOK(ReadStream_FALSE(InStream, buf, kHeaderSize)); + if (buf[0x1FE] != 0x55 || buf[0x1FF] != 0xAA) + return S_FALSE; + if (Get32(buf) == 0x41615252 && Get32(buf + 484) == 0x61417272) + { + NumFreeClusters = Get32(buf + 488); + numFreeClustersDefined = (NumFreeClusters <= Header.FatSize); + } + } + } + + // numFreeClustersDefined = false; // to recalculate NumFreeClusters + if (!numFreeClustersDefined) + NumFreeClusters = 0; + + CByteBuffer byteBuf; + Fat = new UInt32[Header.FatSize]; + + RINOK(OpenProgressFat()); + RINOK(SeekToSector(Header.GetFatSector())); + if (Header.NumFatBits == 32) + { + const UInt32 kBufSize = (1 << 15); + byteBuf.SetCapacity(kBufSize); + for (UInt32 i = 0; i < Header.FatSize;) + { + UInt32 size = Header.FatSize - i; + const UInt32 kBufSize32 = kBufSize / 4; + if (size > kBufSize32) + size = kBufSize32; + UInt32 readSize = Header.SizeToSectors(size * 4) << Header.SectorSizeLog; + RINOK(ReadStream_FALSE(InStream, byteBuf, readSize)); + NumCurUsedBytes += readSize; + + const UInt32 *src = (const UInt32 *)(const Byte *)byteBuf; + UInt32 *dest = Fat + i; + if (numFreeClustersDefined) + for (UInt32 j = 0; j < size; j++) + dest[j] = Get32(src + j) & 0x0FFFFFFF; + else + { + UInt32 numFreeClusters = 0; + for (UInt32 j = 0; j < size; j++) + { + UInt32 v = Get32(src + j) & 0x0FFFFFFF; + numFreeClusters += (UInt32)(v - 1) >> 31; + dest[j] = v; + } + NumFreeClusters += numFreeClusters; + } + i += size; + if ((i & 0xFFFFF) == 0) + { + RINOK(OpenProgressFat(!numFreeClustersDefined)); + } + } + } + else + { + const UInt32 kBufSize = (UInt32)Header.CalcFatSizeInSectors() << Header.SectorSizeLog; + NumCurUsedBytes += kBufSize; + byteBuf.SetCapacity(kBufSize); + Byte *p = byteBuf; + RINOK(ReadStream_FALSE(InStream, p, kBufSize)); + UInt32 fatSize = Header.FatSize; + UInt32 *fat = &Fat[0]; + if (Header.NumFatBits == 16) + for (UInt32 j = 0; j < fatSize; j++) + fat[j] = Get16(p + j * 2); + else + for (UInt32 j = 0; j < fatSize; j++) + fat[j] = (Get16(p + j * 3 / 2) >> ((j & 1) << 2)) & 0xFFF; + + if (!numFreeClustersDefined) + { + UInt32 numFreeClusters = 0; + for (UInt32 i = 0; i < fatSize; i++) + numFreeClusters += (UInt32)(fat[i] - 1) >> 31; + NumFreeClusters = numFreeClusters; + } + } + + RINOK(OpenProgressFat()); + + if ((Fat[0] & 0xFF) != Header.MediaType) + return S_FALSE; + + return ReadDir(-1, Header.RootCluster, 0); +} + +class CHandler: + public IInArchive, + public IInArchiveGetStream, + public CMyUnknownImp, + CDatabase +{ +public: + MY_UNKNOWN_IMP2(IInArchive, IInArchiveGetStream) + INTERFACE_IInArchive(;) + STDMETHOD(GetStream)(UInt32 index, ISequentialInStream **stream); +}; + +STDMETHODIMP CHandler::GetStream(UInt32 index, ISequentialInStream **stream) +{ + COM_TRY_BEGIN + *stream = 0; + const CItem &item = Items[index]; + CClusterInStream *streamSpec = new CClusterInStream; + CMyComPtr streamTemp = streamSpec; + streamSpec->Stream = InStream; + streamSpec->StartOffset = Header.DataSector << Header.SectorSizeLog; + streamSpec->BlockSizeLog = Header.ClusterSizeLog; + streamSpec->Size = item.Size; + + UInt32 numClusters = Header.GetNumClusters(item.Size); + streamSpec->Vector.Reserve(numClusters); + UInt32 cluster = item.Cluster; + UInt32 size = item.Size; + + if (size == 0) + { + if (cluster != 0) + return S_FALSE; + } + else + { + UInt32 clusterSize = Header.ClusterSize(); + for (;; size -= clusterSize) + { + if (!Header.IsValidCluster(cluster)) + return S_FALSE; + streamSpec->Vector.Add(cluster - 2); + cluster = Fat[cluster]; + if (size <= clusterSize) + break; + } + if (!Header.IsEocAndUnused(cluster)) + return S_FALSE; + } + RINOK(streamSpec->InitAndSeek()); + *stream = streamTemp.Detach(); + return S_OK; + COM_TRY_END +} + +STATPROPSTG kProps[] = +{ + { NULL, kpidPath, VT_BSTR}, + { NULL, kpidIsDir, VT_BOOL}, + { NULL, kpidSize, VT_UI8}, + { NULL, kpidPackSize, VT_UI8}, + { NULL, kpidMTime, VT_FILETIME}, + { NULL, kpidCTime, VT_FILETIME}, + { NULL, kpidATime, VT_FILETIME}, + { NULL, kpidAttrib, VT_UI8}, + { NULL, kpidShortName, VT_BSTR} +}; + +enum +{ + kpidNumFats = kpidUserDefined + // kpidOemName, + // kpidVolName, + // kpidFileSysType +}; + +STATPROPSTG kArcProps[] = +{ + { NULL, kpidFileSystem, VT_BSTR}, + { NULL, kpidClusterSize, VT_UI4}, + { NULL, kpidPhySize, VT_UI8}, + { NULL, kpidFreeSpace, VT_UI8}, + { NULL, kpidHeadersSize, VT_UI8}, + { NULL, kpidMTime, VT_FILETIME}, + { NULL, kpidVolumeName, VT_BSTR}, + + { L"FATs", kpidNumFats, VT_UI4}, + { NULL, kpidSectorSize, VT_UI4}, + { NULL, kpidId, VT_UI4}, + // { L"OEM Name", kpidOemName, VT_BSTR}, + // { L"Volume Name", kpidVolName, VT_BSTR}, + // { L"File System Type", kpidFileSysType, VT_BSTR} + // { NULL, kpidSectorsPerTrack, VT_UI4}, + // { NULL, kpidNumHeads, VT_UI4}, + // { NULL, kpidHiddenSectors, VT_UI4} +}; + +IMP_IInArchive_Props +IMP_IInArchive_ArcProps_WITH_NAME + +static void FatTimeToProp(UInt32 dosTime, UInt32 ms10, NWindows::NCOM::CPropVariant &prop) +{ + FILETIME localFileTime, utc; + if (NWindows::NTime::DosTimeToFileTime(dosTime, localFileTime)) + if (LocalFileTimeToFileTime(&localFileTime, &utc)) + { + UInt64 t64 = (((UInt64)utc.dwHighDateTime) << 32) + utc.dwLowDateTime; + t64 += ms10 * 100000; + utc.dwLowDateTime = (DWORD)t64; + utc.dwHighDateTime = (DWORD)(t64 >> 32); + prop = utc; + } +} + +/* +static void StringToProp(const Byte *src, int size, NWindows::NCOM::CPropVariant &prop) +{ + char dest[32]; + memcpy(dest, src, size); + dest[size] = 0; + prop = FatStringToUnicode(dest); +} + +#define STRING_TO_PROP(s, p) StringToProp(s, sizeof(s), prop) +*/ + +STDMETHODIMP CHandler::GetArchiveProperty(PROPID propID, PROPVARIANT *value) +{ + COM_TRY_BEGIN + NWindows::NCOM::CPropVariant prop; + switch(propID) + { + case kpidFileSystem: + { + wchar_t s[32] = { L'F', L'A', L'T' }; + ConvertUInt32ToString(Header.NumFatBits, s + 3); + prop = s; + break; + } + case kpidClusterSize: prop = Header.ClusterSize(); break; + case kpidPhySize: prop = Header.GetPhySize(); break; + case kpidFreeSpace: prop = (UInt64)NumFreeClusters << Header.ClusterSizeLog; break; + case kpidHeadersSize: prop = GetHeadersSize(); break; + case kpidMTime: if (VolItemDefined) FatTimeToProp(VolItem.MTime, 0, prop); break; + case kpidVolumeName: if (VolItemDefined) prop = VolItem.GetVolName(); break; + case kpidNumFats: if (Header.NumFats != 2) prop = Header.NumFats; break; + case kpidSectorSize: prop = (UInt32)1 << Header.SectorSizeLog; break; + // case kpidSectorsPerTrack: prop = Header.SectorsPerTrack; break; + // case kpidNumHeads: prop = Header.NumHeads; break; + // case kpidOemName: STRING_TO_PROP(Header.OemName, prop); break; + case kpidId: if (Header.VolFieldsDefined) prop = Header.VolId; break; + // case kpidVolName: if (Header.VolFieldsDefined) STRING_TO_PROP(Header.VolName, prop); break; + // case kpidFileSysType: if (Header.VolFieldsDefined) STRING_TO_PROP(Header.FileSys, prop); break; + // case kpidHiddenSectors: prop = Header.NumHiddenSectors; break; + } + prop.Detach(value); + return S_OK; + COM_TRY_END +} + +STDMETHODIMP CHandler::GetProperty(UInt32 index, PROPID propID, PROPVARIANT *value) +{ + COM_TRY_BEGIN + NWindows::NCOM::CPropVariant prop; + const CItem &item = Items[index]; + switch(propID) + { + case kpidPath: prop = GetItemPath(index); break; + case kpidShortName: prop = item.GetShortName(); break; + case kpidIsDir: prop = item.IsDir(); break; + case kpidMTime: FatTimeToProp(item.MTime, 0, prop); break; + case kpidCTime: FatTimeToProp(item.CTime, item.CTime2, prop); break; + case kpidATime: FatTimeToProp(((UInt32)item.ADate << 16), 0, prop); break; + case kpidAttrib: prop = (UInt32)item.Attrib; break; + case kpidSize: if (!item.IsDir()) prop = item.Size; break; + case kpidPackSize: if (!item.IsDir()) prop = Header.GetFilePackSize(item.Size); break; + } + prop.Detach(value); + return S_OK; + COM_TRY_END +} + +STDMETHODIMP CHandler::Open(IInStream *stream, const UInt64 *, IArchiveOpenCallback *callback) +{ + COM_TRY_BEGIN + { + OpenCallback = callback; + InStream = stream; + HRESULT res; + try + { + res = CDatabase::Open(); + if (res == S_OK) + return S_OK; + } + catch(...) + { + Close(); + throw; + } + Close(); + return res; + } + COM_TRY_END +} + +STDMETHODIMP CHandler::Close() +{ + ClearAndClose(); + return S_OK; +} + +STDMETHODIMP CHandler::Extract(const UInt32 *indices, UInt32 numItems, + Int32 testMode, IArchiveExtractCallback *extractCallback) +{ + COM_TRY_BEGIN + bool allFilesMode = (numItems == (UInt32)-1); + if (allFilesMode) + numItems = Items.Size(); + if (numItems == 0) + return S_OK; + UInt32 i; + UInt64 totalSize = 0; + for (i = 0; i < numItems; i++) + { + const CItem &item = Items[allFilesMode ? i : indices[i]]; + if (!item.IsDir()) + totalSize += item.Size; + } + RINOK(extractCallback->SetTotal(totalSize)); + + UInt64 totalPackSize; + totalSize = totalPackSize = 0; + + NCompress::CCopyCoder *copyCoderSpec = new NCompress::CCopyCoder(); + CMyComPtr copyCoder = copyCoderSpec; + + CLocalProgress *lps = new CLocalProgress; + CMyComPtr progress = lps; + lps->Init(extractCallback, false); + + CDummyOutStream *outStreamSpec = new CDummyOutStream; + CMyComPtr outStream(outStreamSpec); + + for (i = 0; i < numItems; i++) + { + lps->InSize = totalPackSize; + lps->OutSize = totalSize; + RINOK(lps->SetCur()); + CMyComPtr realOutStream; + Int32 askMode = testMode ? + NExtract::NAskMode::kTest : + NExtract::NAskMode::kExtract; + Int32 index = allFilesMode ? i : indices[i]; + const CItem &item = Items[index]; + RINOK(extractCallback->GetStream(index, &realOutStream, askMode)); + + if (item.IsDir()) + { + RINOK(extractCallback->PrepareOperation(askMode)); + RINOK(extractCallback->SetOperationResult(NExtract::NOperationResult::kOK)); + continue; + } + + totalPackSize += Header.GetFilePackSize(item.Size); + totalSize += item.Size; + + if (!testMode && !realOutStream) + continue; + RINOK(extractCallback->PrepareOperation(askMode)); + + outStreamSpec->SetStream(realOutStream); + realOutStream.Release(); + outStreamSpec->Init(); + + int res = NExtract::NOperationResult::kDataError; + CMyComPtr inStream; + HRESULT hres = GetStream(index, &inStream); + if (hres != S_FALSE) + { + RINOK(hres); + if (inStream) + { + RINOK(copyCoder->Code(inStream, outStream, NULL, NULL, progress)); + if (copyCoderSpec->TotalSize == item.Size) + res = NExtract::NOperationResult::kOK; + } + } + outStreamSpec->ReleaseStream(); + RINOK(extractCallback->SetOperationResult(res)); + } + return S_OK; + COM_TRY_END +} + +STDMETHODIMP CHandler::GetNumberOfItems(UInt32 *numItems) +{ + *numItems = Items.Size(); + return S_OK; +} + +static IInArchive *CreateArc() { return new CHandler; } + +static CArcInfo g_ArcInfo = + { L"FAT", L"fat img", 0, 0xDA, { 0x55, 0xAA }, 2, false, CreateArc, 0 }; + +REGISTER_ARC(Fat) + +}} diff --git a/CPP/7zip/Archive/FlvHandler.cpp b/CPP/7zip/Archive/FlvHandler.cpp new file mode 100644 index 0000000..a22c29e --- /dev/null +++ b/CPP/7zip/Archive/FlvHandler.cpp @@ -0,0 +1,544 @@ +// FlvHandler.cpp + +#include "StdAfx.h" + +#include "../../../C/CpuArch.h" + +#include "Common/Buffer.h" +#include "Common/ComTry.h" +// #include "Common/Defs.h" +#include "Common/MyString.h" + +#include "Windows/PropVariant.h" + +#include "../Common/ProgressUtils.h" +#include "../Common/RegisterArc.h" +#include "../Common/StreamObjects.h" +#include "../Common/StreamUtils.h" + +#define GetBe24(p) ( \ + ((UInt32)((const Byte *)(p))[0] << 16) | \ + ((UInt32)((const Byte *)(p))[1] << 8) | \ + ((const Byte *)(p))[2] ) + +#define Get16(p) GetBe16(p) +#define Get24(p) GetBe24(p) +#define Get32(p) GetBe32(p) + +namespace NArchive { +namespace NFlv { + +static const UInt32 kFileSizeMax = (UInt32)1 << 30; +static const int kNumChunksMax = (UInt32)1 << 23; + +const UInt32 kTagHeaderSize = 11; + +static const Byte kFlag_Video = 1; +static const Byte kFlag_Audio = 4; + +static const Byte kType_Audio = 8; +static const Byte kType_Video = 9; +static const Byte kType_Meta = 18; +static const int kNumTypes = 19; + +struct CItem +{ + UInt32 Offset; + UInt32 Size; + // UInt32 Time; + Byte Type; +}; + +struct CItem2 +{ + Byte Type; + Byte SubType; + Byte Props; + bool SameSubTypes; + int NumChunks; + size_t Size; + + CReferenceBuf *BufSpec; + CMyComPtr RefBuf; + + bool IsAudio() const { return Type == kType_Audio; } +}; + +class CHandler: + public IInArchive, + public IInArchiveGetStream, + public CMyUnknownImp +{ + int _isRaw; + CMyComPtr _stream; + CObjectVector _items2; + // CByteBuffer _metadata; + HRESULT Open2(IInStream *stream, IArchiveOpenCallback *callback); + AString GetComment(); +public: + MY_UNKNOWN_IMP2(IInArchive, IInArchiveGetStream) + INTERFACE_IInArchive(;) + STDMETHOD(GetStream)(UInt32 index, ISequentialInStream **stream); +}; + +STATPROPSTG kProps[] = +{ + { NULL, kpidSize, VT_UI8}, + { NULL, kpidNumBlocks, VT_UI4}, + { NULL, kpidComment, VT_BSTR} +}; + +/* +STATPROPSTG kArcProps[] = +{ + { NULL, kpidComment, VT_BSTR} +}; +*/ + +IMP_IInArchive_Props +IMP_IInArchive_ArcProps_NO + +static const char *g_AudioTypes[16] = +{ + "pcm", + "adpcm", + "mp3", + "pcm_le", + "nellymoser16", + "nellymoser8", + "nellymoser", + "g711a", + "g711m", + "audio9", + "aac", + "speex", + "audio12", + "audio13", + "mp3", + "audio15" +}; + +static const char *g_VideoTypes[16] = +{ + "video0", + "jpeg", + "h263", + "screen", + "vp6", + "vp6alpha", + "screen2", + "avc", + "video8", + "video9", + "video10", + "video11", + "video12", + "video13", + "video14", + "video15" +}; + +static const char *g_Rates[4] = +{ + "5.5 kHz", + "11 kHz", + "22 kHz", + "44 kHz" +}; + +static void MyStrCat(char *d, const char *s) +{ + MyStringCopy(d + MyStringLen(d), s); +} + +STDMETHODIMP CHandler::GetProperty(UInt32 index, PROPID propID, PROPVARIANT *value) +{ + NWindows::NCOM::CPropVariant prop; + const CItem2 &item = _items2[index]; + switch(propID) + { + case kpidExtension: + prop = _isRaw ? + (item.IsAudio() ? g_AudioTypes[item.SubType] : g_VideoTypes[item.SubType]) : + (item.IsAudio() ? "audio.flv" : "video.flv"); + break; + case kpidSize: + case kpidPackSize: + prop = (UInt64)item.Size; + break; + case kpidNumBlocks: prop = (UInt32)item.NumChunks; break; + case kpidComment: + { + char sz[64]; + MyStringCopy(sz, (item.IsAudio() ? g_AudioTypes[item.SubType] : g_VideoTypes[item.SubType]) ); + if (item.IsAudio()) + { + MyStrCat(sz, " "); + MyStrCat(sz, g_Rates[(item.Props >> 2) & 3]); + MyStrCat(sz, (item.Props & 2) ? " 16-bit" : " 8-bit"); + MyStrCat(sz, (item.Props & 1) ? " stereo" : " mono"); + } + prop = sz; + break; + } + } + prop.Detach(value); + return S_OK; +} + +/* +AString CHandler::GetComment() +{ + const Byte *p = _metadata; + size_t size = _metadata.GetCapacity(); + AString res; + if (size > 0) + { + p++; + size--; + for (;;) + { + if (size < 2) + break; + int len = Get16(p); + p += 2; + size -= 2; + if (len == 0 || (size_t)len > size) + break; + { + AString temp; + char *sz = temp.GetBuffer(len); + memcpy(sz, p, len); + sz[len] = 0; + temp.ReleaseBuffer(); + if (!res.IsEmpty()) + res += '\n'; + res += temp; + } + p += len; + size -= len; + if (size < 1) + break; + Byte type = *p++; + size--; + bool ok = false; + switch(type) + { + case 0: + { + if (size < 8) + break; + ok = true; + Byte reverse[8]; + for (int i = 0; i < 8; i++) + { + bool little_endian = 1; + if (little_endian) + reverse[i] = p[7 - i]; + else + reverse[i] = p[i]; + } + double d = *(double *)reverse; + char temp[32]; + sprintf(temp, " = %.3f", d); + res += temp; + p += 8; + size -= 8; + break; + } + case 8: + { + if (size < 4) + break; + ok = true; + // UInt32 numItems = Get32(p); + p += 4; + size -= 4; + break; + } + } + if (!ok) + break; + } + } + return res; +} + +STDMETHODIMP CHandler::GetArchiveProperty(PROPID propID, PROPVARIANT *value) +{ + COM_TRY_BEGIN + NWindows::NCOM::CPropVariant prop; + switch(propID) + { + case kpidComment: prop = GetComment(); break; + } + prop.Detach(value); + return S_OK; + COM_TRY_END +} +*/ + +HRESULT CHandler::Open2(IInStream *stream, IArchiveOpenCallback *callback) +{ + CRecordVector items; + + const UInt32 kHeaderSize = 13; + Byte header[kHeaderSize]; + RINOK(ReadStream_FALSE(stream, header, kHeaderSize)); + if (header[0] != 'F' || + header[1] != 'L' || + header[2] != 'V' || + header[3] != 1 || + (header[4] & 0xFA) != 0) + return S_FALSE; + UInt32 offset = Get32(header + 5); + if (offset != 9 || Get32(header + 9) != 0) + return S_FALSE; + offset += 4; + + CByteBuffer inBuf; + size_t fileSize; + { + UInt64 fileSize64; + RINOK(stream->Seek(0, STREAM_SEEK_END, &fileSize64)); + if (fileSize64 > kFileSizeMax) + return S_FALSE; + + if (callback) + RINOK(callback->SetTotal(NULL, &fileSize64)) + + RINOK(stream->Seek(0, STREAM_SEEK_SET, NULL)); + fileSize = (size_t)fileSize64; + inBuf.SetCapacity(fileSize); + for (size_t pos = 0; pos < fileSize;) + { + UInt64 offset64 = pos; + if (callback) + RINOK(callback->SetCompleted(NULL, &offset64)) + size_t rem = MyMin(fileSize - pos, (size_t)(1 << 20)); + RINOK(ReadStream_FALSE(stream, inBuf + pos, rem)); + pos += rem; + } + } + + int lasts[kNumTypes]; + int i; + for (i = 0; i < kNumTypes; i++) + lasts[i] = -1; + + while (offset < fileSize) + { + CItem item; + item.Offset = offset; + const Byte *buf = inBuf + offset; + offset += kTagHeaderSize; + if (offset > fileSize) + return S_FALSE; + + item.Type = buf[0]; + UInt32 size = Get24(buf + 1); + if (size < 1) + return S_FALSE; + // item.Time = Get24(buf + 4); + // item.Time |= (UInt32)buf[7] << 24; + if (Get24(buf + 8) != 0) // streamID + return S_FALSE; + + UInt32 curSize = kTagHeaderSize + size + 4; + item.Size = curSize; + + offset += curSize - kTagHeaderSize; + if (offset > fileSize) + return S_FALSE; + + if (Get32(buf + kTagHeaderSize + size) != kTagHeaderSize + size) + return S_FALSE; + + // printf("\noffset = %6X type = %2d time = %6d size = %6d", (UInt32)offset, item.Type, item.Time, item.Size); + + if (item.Type == kType_Meta) + { + // _metadata = item.Buf; + } + else + { + if (item.Type != kType_Audio && item.Type != kType_Video) + return S_FALSE; + if (items.Size() >= kNumChunksMax) + return S_FALSE; + Byte firstByte = buf[kTagHeaderSize]; + Byte subType, props; + if (item.Type == kType_Audio) + { + subType = firstByte >> 4; + props = firstByte & 0xF; + } + else + { + subType = firstByte & 0xF; + props = firstByte >> 4; + } + int last = lasts[item.Type]; + if (last < 0) + { + CItem2 item2; + item2.RefBuf = item2.BufSpec = new CReferenceBuf; + item2.Size = curSize; + item2.Type = item.Type; + item2.SubType = subType; + item2.Props = props; + item2.NumChunks = 1; + item2.SameSubTypes = true; + lasts[item.Type] = _items2.Add(item2); + } + else + { + CItem2 &item2 = _items2[last]; + if (subType != item2.SubType) + item2.SameSubTypes = false; + item2.Size += curSize; + item2.NumChunks++; + } + items.Add(item); + } + } + + _isRaw = (_items2.Size() == 1); + for (i = 0; i < _items2.Size(); i++) + { + CItem2 &item2 = _items2[i]; + CByteBuffer &itemBuf = item2.BufSpec->Buf; + if (_isRaw) + { + if (!item2.SameSubTypes) + return S_FALSE; + itemBuf.SetCapacity((size_t)item2.Size - (kTagHeaderSize + 4 + 1) * item2.NumChunks); + item2.Size = 0; + } + else + { + itemBuf.SetCapacity(kHeaderSize + (size_t)item2.Size); + memcpy(itemBuf, header, kHeaderSize); + itemBuf[4] = item2.IsAudio() ? kFlag_Audio : kFlag_Video; + item2.Size = kHeaderSize; + } + } + + for (i = 0; i < items.Size(); i++) + { + const CItem &item = items[i]; + CItem2 &item2 = _items2[lasts[item.Type]]; + size_t size = item.Size; + const Byte *src = inBuf + item.Offset; + if (_isRaw) + { + src += kTagHeaderSize + 1; + size -= (kTagHeaderSize + 4 + 1); + } + memcpy(item2.BufSpec->Buf + item2.Size, src, size); + item2.Size += size; + } + return S_OK; +} + +STDMETHODIMP CHandler::Open(IInStream *inStream, const UInt64 *, IArchiveOpenCallback *callback) +{ + COM_TRY_BEGIN + Close(); + HRESULT res; + try + { + res = Open2(inStream, callback); + if (res == S_OK) + _stream = inStream; + } + catch(...) { res = S_FALSE; } + if (res != S_OK) + { + Close(); + return S_FALSE; + } + return S_OK; + COM_TRY_END +} + +STDMETHODIMP CHandler::Close() +{ + _stream.Release(); + _items2.Clear(); + // _metadata.SetCapacity(0); + return S_OK; +} + +STDMETHODIMP CHandler::GetNumberOfItems(UInt32 *numItems) +{ + *numItems = _items2.Size(); + return S_OK; +} + +STDMETHODIMP CHandler::Extract(const UInt32 *indices, UInt32 numItems, + Int32 testMode, IArchiveExtractCallback *extractCallback) +{ + COM_TRY_BEGIN + bool allFilesMode = (numItems == (UInt32)-1); + if (allFilesMode) + numItems = _items2.Size(); + if (numItems == 0) + return S_OK; + UInt64 totalSize = 0; + UInt32 i; + for (i = 0; i < numItems; i++) + totalSize += _items2[allFilesMode ? i : indices[i]].Size; + extractCallback->SetTotal(totalSize); + + totalSize = 0; + + CLocalProgress *lps = new CLocalProgress; + CMyComPtr progress = lps; + lps->Init(extractCallback, false); + + for (i = 0; i < numItems; i++) + { + lps->InSize = lps->OutSize = totalSize; + RINOK(lps->SetCur()); + CMyComPtr outStream; + Int32 askMode = testMode ? + NExtract::NAskMode::kTest : + NExtract::NAskMode::kExtract; + UInt32 index = allFilesMode ? i : indices[i]; + const CItem2 &item = _items2[index]; + RINOK(extractCallback->GetStream(index, &outStream, askMode)); + totalSize += item.Size; + if (!testMode && !outStream) + continue; + RINOK(extractCallback->PrepareOperation(askMode)); + if (outStream) + { + RINOK(WriteStream(outStream, item.BufSpec->Buf, item.BufSpec->Buf.GetCapacity())); + } + RINOK(extractCallback->SetOperationResult(NExtract::NOperationResult::kOK)); + } + return S_OK; + COM_TRY_END +} + +STDMETHODIMP CHandler::GetStream(UInt32 index, ISequentialInStream **stream) +{ + COM_TRY_BEGIN + *stream = 0; + CBufInStream *streamSpec = new CBufInStream; + CMyComPtr streamTemp = streamSpec; + streamSpec->Init(_items2[index].BufSpec); + *stream = streamTemp.Detach(); + return S_OK; + COM_TRY_END +} + +static IInArchive *CreateArc() { return new CHandler; } + +static CArcInfo g_ArcInfo = + { L"FLV", L"flv", 0, 0xD6, { 'F', 'L', 'V' }, 3, false, CreateArc, 0 }; + +REGISTER_ARC(Flv) + +}} diff --git a/CPP/7zip/Archive/GzHandler.cpp b/CPP/7zip/Archive/GzHandler.cpp new file mode 100644 index 0000000..7b73bdd --- /dev/null +++ b/CPP/7zip/Archive/GzHandler.cpp @@ -0,0 +1,698 @@ +// GzHandler.cpp + +#include "StdAfx.h" + +#include "../../../C/CpuArch.h" + +#include "Common/ComTry.h" +#include "Common/StringConvert.h" + +#include "Windows/PropVariant.h" +#include "Windows/Time.h" + +#include "../Common/ProgressUtils.h" +#include "../Common/RegisterArc.h" +#include "../Common/StreamUtils.h" + +#include "../Compress/CopyCoder.h" +#include "../Compress/DeflateDecoder.h" +#include "../Compress/DeflateEncoder.h" + +#include "Common/InStreamWithCRC.h" +#include "Common/OutStreamWithCRC.h" + +#include "DeflateProps.h" + +#define Get32(p) GetUi32(p) + +using namespace NWindows; + +namespace NArchive { +namespace NGz { + +static const UInt16 kSignature = 0x8B1F; + +namespace NHeader +{ + namespace NFlags + { + const Byte kIsText = 1 << 0; + const Byte kCrc = 1 << 1; + const Byte kExtra = 1 << 2; + const Byte kName = 1 << 3; + const Byte kComment = 1 << 4; + } + + namespace NExtraFlags + { + const Byte kMaximum = 2; + const Byte kFastest = 4; + } + + namespace NCompressionMethod + { + const Byte kDeflate = 8; + } + + namespace NHostOS + { + enum EEnum + { + kFAT = 0, + kAMIGA, + kVMS, + kUnix, + kVM_CMS, + kAtari, + kHPFS, + kMac, + kZ_System, + kCPM, + kTOPS20, + kNTFS, + kQDOS, + kAcorn, + kVFAT, + kMVS, + kBeOS, + kTandem, + + kUnknown = 255 + }; + } +} + +static const char *kHostOSes[] = +{ + "FAT", + "AMIGA", + "VMS", + "Unix", + "VM/CMS", + "Atari", + "HPFS", + "Macintosh", + "Z-System", + "CP/M", + "TOPS-20", + "NTFS", + "SMS/QDOS", + "Acorn", + "VFAT", + "MVS", + "BeOS", + "Tandem", + "OS/400", + "OS/X" +}; + +static const char *kUnknownOS = "Unknown"; + +class CItem +{ + bool TestFlag(Byte flag) const { return (Flags & flag) != 0; } +public: + Byte Method; + Byte Flags; + Byte ExtraFlags; + Byte HostOS; + UInt32 Time; + UInt32 Crc; + UInt32 Size32; + + AString Name; + AString Comment; + // CByteBuffer Extra; + + // bool IsText() const { return TestFlag(NHeader::NFlags::kIsText); } + bool HeaderCrcIsPresent() const { return TestFlag(NHeader::NFlags::kCrc); } + bool ExtraFieldIsPresent() const { return TestFlag(NHeader::NFlags::kExtra); } + bool NameIsPresent() const { return TestFlag(NHeader::NFlags::kName); } + bool CommentIsPresent() const { return TestFlag(NHeader::NFlags::kComment); } + + void Clear() + { + Name.Empty(); + Comment.Empty(); + // Extra.SetCapacity(0); + } + + HRESULT ReadHeader(NCompress::NDeflate::NDecoder::CCOMCoder *stream); + HRESULT ReadFooter1(NCompress::NDeflate::NDecoder::CCOMCoder *stream); + HRESULT ReadFooter2(ISequentialInStream *stream); + + HRESULT WriteHeader(ISequentialOutStream *stream); + HRESULT WriteFooter(ISequentialOutStream *stream); +}; + +static HRESULT ReadBytes(NCompress::NDeflate::NDecoder::CCOMCoder *stream, Byte *data, UInt32 size) +{ + for (UInt32 i = 0; i < size; i++) + data[i] = stream->ReadByte(); + return stream->InputEofError() ? S_FALSE : S_OK; +} + +static HRESULT SkipBytes(NCompress::NDeflate::NDecoder::CCOMCoder *stream, UInt32 size) +{ + for (UInt32 i = 0; i < size; i++) + stream->ReadByte(); + return stream->InputEofError() ? S_FALSE : S_OK; +} + +static HRESULT ReadUInt16(NCompress::NDeflate::NDecoder::CCOMCoder *stream, UInt16 &value /* , UInt32 &crc */) +{ + value = 0; + for (int i = 0; i < 2; i++) + { + Byte b = stream->ReadByte(); + if (stream->InputEofError()) + return S_FALSE; + // crc = CRC_UPDATE_BYTE(crc, b); + value |= (UInt16(b) << (8 * i)); + } + return S_OK; +} + +static HRESULT ReadString(NCompress::NDeflate::NDecoder::CCOMCoder *stream, AString &s, UInt32 limit /* , UInt32 &crc */) +{ + s.Empty(); + for (UInt32 i = 0; i < limit; i++) + { + Byte b = stream->ReadByte(); + if (stream->InputEofError()) + return S_FALSE; + // crc = CRC_UPDATE_BYTE(crc, b); + if (b == 0) + return S_OK; + s += (char)b; + } + return S_FALSE; +} + +HRESULT CItem::ReadHeader(NCompress::NDeflate::NDecoder::CCOMCoder *stream) +{ + Clear(); + + // Header-CRC field had another meaning in old version of gzip! + // UInt32 crc = CRC_INIT_VAL; + Byte buf[10]; + + RINOK(ReadBytes(stream, buf, 10)); + + if (GetUi16(buf) != kSignature) + return S_FALSE; + + Method = buf[2]; + + if (Method != NHeader::NCompressionMethod::kDeflate) + return S_FALSE; + + Flags = buf[3]; + Time = Get32(buf + 4); + ExtraFlags = buf[8]; + HostOS = buf[9]; + + // crc = CrcUpdate(crc, buf, 10); + + if (ExtraFieldIsPresent()) + { + UInt16 extraSize; + RINOK(ReadUInt16(stream, extraSize /* , crc */)); + RINOK(SkipBytes(stream, extraSize)); + // Extra.SetCapacity(extraSize); + // RINOK(ReadStream_FALSE(stream, Extra, extraSize)); + // crc = CrcUpdate(crc, Extra, extraSize); + } + if (NameIsPresent()) + RINOK(ReadString(stream, Name, (1 << 10) /* , crc */)); + if (CommentIsPresent()) + RINOK(ReadString(stream, Comment, (1 << 16) /* , crc */)); + + if (HeaderCrcIsPresent()) + { + UInt16 headerCRC; + // UInt32 dummy = 0; + RINOK(ReadUInt16(stream, headerCRC /* , dummy */)); + /* + if ((UInt16)CRC_GET_DIGEST(crc) != headerCRC) + return S_FALSE; + */ + } + return stream->InputEofError() ? S_FALSE : S_OK; +} + +HRESULT CItem::ReadFooter1(NCompress::NDeflate::NDecoder::CCOMCoder *stream) +{ + Byte buf[8]; + RINOK(ReadBytes(stream, buf, 8)); + Crc = Get32(buf); + Size32 = Get32(buf + 4); + return stream->InputEofError() ? S_FALSE : S_OK; +} + +HRESULT CItem::ReadFooter2(ISequentialInStream *stream) +{ + Byte buf[8]; + RINOK(ReadStream_FALSE(stream, buf, 8)); + Crc = Get32(buf); + Size32 = Get32(buf + 4); + return S_OK; +} + +HRESULT CItem::WriteHeader(ISequentialOutStream *stream) +{ + Byte buf[10]; + SetUi16(buf, kSignature); + buf[2] = Method; + buf[3] = Flags & NHeader::NFlags::kName; + // buf[3] |= NHeader::NFlags::kCrc; + SetUi32(buf + 4, Time); + buf[8] = ExtraFlags; + buf[9] = HostOS; + RINOK(WriteStream(stream, buf, 10)); + // crc = CrcUpdate(CRC_INIT_VAL, buf, 10); + if (NameIsPresent()) + { + // crc = CrcUpdate(crc, (const char *)Name, Name.Length() + 1); + RINOK(WriteStream(stream, (const char *)Name, Name.Length() + 1)); + } + // SetUi16(buf, (UInt16)CRC_GET_DIGEST(crc)); + // RINOK(WriteStream(stream, buf, 2)); + return S_OK; +} + +HRESULT CItem::WriteFooter(ISequentialOutStream *stream) +{ + Byte buf[8]; + SetUi32(buf, Crc); + SetUi32(buf + 4, Size32); + return WriteStream(stream, buf, 8); +} + +class CHandler: + public IInArchive, + public IArchiveOpenSeq, + public IOutArchive, + public ISetProperties, + public CMyUnknownImp +{ + CItem _item; + UInt64 _startPosition; + UInt64 _headerSize; + UInt64 _packSize; + bool _packSizeDefined; + CMyComPtr _stream; + CMyComPtr _decoder; + NCompress::NDeflate::NDecoder::CCOMCoder *_decoderSpec; + + CDeflateProps _method; + +public: + MY_UNKNOWN_IMP4(IInArchive, IArchiveOpenSeq, IOutArchive, ISetProperties) + INTERFACE_IInArchive(;) + INTERFACE_IOutArchive(;) + STDMETHOD(OpenSeq)(ISequentialInStream *stream); + STDMETHOD(SetProperties)(const wchar_t **names, const PROPVARIANT *values, Int32 numProps); + + CHandler() + { + _decoderSpec = new NCompress::NDeflate::NDecoder::CCOMCoder; + _decoder = _decoderSpec; + } +}; + +STATPROPSTG kProps[] = +{ + { NULL, kpidPath, VT_BSTR}, + { NULL, kpidSize, VT_UI8}, + { NULL, kpidPackSize, VT_UI8}, + { NULL, kpidMTime, VT_FILETIME}, + { NULL, kpidHostOS, VT_BSTR}, + { NULL, kpidCRC, VT_UI4} + // { NULL, kpidComment, VT_BSTR} +} +; + +IMP_IInArchive_Props +IMP_IInArchive_ArcProps_NO_Table + +STDMETHODIMP CHandler::GetArchiveProperty(PROPID propID, PROPVARIANT *value) +{ + NCOM::CPropVariant prop; + switch(propID) + { + case kpidPhySize: if (_packSizeDefined) prop = _packSize; break; + } + prop.Detach(value); + return S_OK; +} + + +STDMETHODIMP CHandler::GetNumberOfItems(UInt32 *numItems) +{ + *numItems = 1; + return S_OK; +} + +STDMETHODIMP CHandler::GetProperty(UInt32 /* index */, PROPID propID, PROPVARIANT *value) +{ + COM_TRY_BEGIN + NWindows::NCOM::CPropVariant prop; + switch(propID) + { + case kpidPath: + if (_item.NameIsPresent()) + prop = MultiByteToUnicodeString(_item.Name, CP_ACP); + break; + // case kpidComment: if (_item.CommentIsPresent()) prop = MultiByteToUnicodeString(_item.Comment, CP_ACP); break; + case kpidMTime: + { + if (_item.Time != 0) + { + FILETIME utc; + NTime::UnixTimeToFileTime(_item.Time, utc); + prop = utc; + } + break; + } + case kpidSize: if (_stream) prop = (UInt64)_item.Size32; break; + case kpidPackSize: if (_packSizeDefined) prop = _packSize; break; + case kpidHostOS: prop = (_item.HostOS < sizeof(kHostOSes) / sizeof(kHostOSes[0])) ? + kHostOSes[_item.HostOS] : kUnknownOS; break; + case kpidCRC: if (_stream) prop = _item.Crc; break; + } + prop.Detach(value); + return S_OK; + COM_TRY_END +} + +STDMETHODIMP CHandler::Open(IInStream *stream, const UInt64 *, IArchiveOpenCallback *) +{ + COM_TRY_BEGIN + HRESULT res; + try + { + RINOK(stream->Seek(0, STREAM_SEEK_CUR, &_startPosition)); + res = OpenSeq(stream); + if (res == S_OK) + { + UInt64 endPos; + res = stream->Seek(-8, STREAM_SEEK_END, &endPos); + _packSize = endPos + 8 - _startPosition; + _packSizeDefined = true; + if (res == S_OK) + { + res = _item.ReadFooter2(stream); + _stream = stream; + } + } + } + catch(...) { res = S_FALSE; } + if (res != S_OK) + Close(); + return res; + COM_TRY_END +} + +STDMETHODIMP CHandler::OpenSeq(ISequentialInStream *stream) +{ + COM_TRY_BEGIN + HRESULT res; + try + { + Close(); + _decoderSpec->SetInStream(stream); + _decoderSpec->InitInStream(true); + res = _item.ReadHeader(_decoderSpec); + _headerSize = _decoderSpec->GetInputProcessedSize(); + } + catch(...) { res = S_FALSE; } + if (res != S_OK) + Close(); + return res; + COM_TRY_END +} + +STDMETHODIMP CHandler::Close() +{ + _packSizeDefined = false; + _stream.Release(); + _decoderSpec->ReleaseInStream(); + return S_OK; +} + +STDMETHODIMP CHandler::Extract(const UInt32 *indices, UInt32 numItems, + Int32 testMode, IArchiveExtractCallback *extractCallback) +{ + COM_TRY_BEGIN + if (numItems == 0) + return S_OK; + if (numItems != (UInt32)-1 && (numItems != 1 || indices[0] != 0)) + return E_INVALIDARG; + + if (_stream) + extractCallback->SetTotal(_packSize); + UInt64 currentTotalPacked = 0; + RINOK(extractCallback->SetCompleted(¤tTotalPacked)); + CMyComPtr realOutStream; + Int32 askMode = testMode ? + NExtract::NAskMode::kTest : + NExtract::NAskMode::kExtract; + RINOK(extractCallback->GetStream(0, &realOutStream, askMode)); + if (!testMode && !realOutStream) + return S_OK; + + extractCallback->PrepareOperation(askMode); + + COutStreamWithCRC *outStreamSpec = new COutStreamWithCRC; + CMyComPtr outStream(outStreamSpec); + outStreamSpec->SetStream(realOutStream); + outStreamSpec->Init(); + realOutStream.Release(); + + CLocalProgress *lps = new CLocalProgress; + CMyComPtr progress = lps; + lps->Init(extractCallback, true); + + if (_stream) + { + RINOK(_stream->Seek(_startPosition, STREAM_SEEK_SET, NULL)); + _decoderSpec->InitInStream(true); + } + bool firstItem = true; + Int32 opRes; + for (;;) + { + lps->InSize = _packSize = _decoderSpec->GetInputProcessedSize(); + _packSizeDefined = true; + lps->OutSize = outStreamSpec->GetSize(); + RINOK(lps->SetCur()); + + CItem item; + if (!firstItem || _stream) + { + HRESULT result = item.ReadHeader(_decoderSpec); + if (result != S_OK) + { + if (result != S_FALSE) + return result; + opRes = firstItem ? + NExtract::NOperationResult::kDataError : + NExtract::NOperationResult::kOK; + break; + } + } + firstItem = false; + + UInt64 startOffset = outStreamSpec->GetSize(); + outStreamSpec->InitCRC(); + + HRESULT result = _decoderSpec->CodeResume(outStream, NULL, progress); + if (result != S_OK) + { + if (result != S_FALSE) + return result; + opRes = NExtract::NOperationResult::kDataError; + break; + } + + _decoderSpec->AlignToByte(); + if (item.ReadFooter1(_decoderSpec) != S_OK) + { + opRes = NExtract::NOperationResult::kDataError; + break; + } + if (item.Crc != outStreamSpec->GetCRC() || + item.Size32 != (UInt32)(outStreamSpec->GetSize() - startOffset)) + { + opRes = NExtract::NOperationResult::kCRCError; + break; + } + } + outStream.Release(); + return extractCallback->SetOperationResult(opRes); + COM_TRY_END +} + +static const Byte kHostOS = + #ifdef _WIN32 + NHeader::NHostOS::kFAT; + #else + NHeader::NHostOS::kUnix; + #endif + +static HRESULT UpdateArchive( + ISequentialOutStream *outStream, + UInt64 unpackSize, + const CItem &newItem, + CDeflateProps &deflateProps, + IArchiveUpdateCallback *updateCallback) +{ + UInt64 complexity = 0; + RINOK(updateCallback->SetTotal(unpackSize)); + RINOK(updateCallback->SetCompleted(&complexity)); + + CMyComPtr fileInStream; + + RINOK(updateCallback->GetStream(0, &fileInStream)); + + CSequentialInStreamWithCRC *inStreamSpec = new CSequentialInStreamWithCRC; + CMyComPtr crcStream(inStreamSpec); + inStreamSpec->SetStream(fileInStream); + inStreamSpec->Init(); + + CLocalProgress *lps = new CLocalProgress; + CMyComPtr progress = lps; + lps->Init(updateCallback, true); + + CItem item = newItem; + item.Method = NHeader::NCompressionMethod::kDeflate; + item.ExtraFlags = deflateProps.IsMaximum() ? + NHeader::NExtraFlags::kMaximum : + NHeader::NExtraFlags::kFastest; + + item.HostOS = kHostOS; + + RINOK(item.WriteHeader(outStream)); + + NCompress::NDeflate::NEncoder::CCOMCoder *deflateEncoderSpec = new NCompress::NDeflate::NEncoder::CCOMCoder; + CMyComPtr deflateEncoder = deflateEncoderSpec; + RINOK(deflateProps.SetCoderProperties(deflateEncoderSpec)); + RINOK(deflateEncoder->Code(crcStream, outStream, NULL, NULL, progress)); + + item.Crc = inStreamSpec->GetCRC(); + item.Size32 = (UInt32)inStreamSpec->GetSize(); + RINOK(item.WriteFooter(outStream)); + return updateCallback->SetOperationResult(NArchive::NUpdate::NOperationResult::kOK); +} + +STDMETHODIMP CHandler::GetFileTimeType(UInt32 *timeType) +{ + *timeType = NFileTimeType::kUnix; + return S_OK; +} + +STDMETHODIMP CHandler::UpdateItems(ISequentialOutStream *outStream, UInt32 numItems, + IArchiveUpdateCallback *updateCallback) +{ + if (numItems != 1) + return E_INVALIDARG; + + Int32 newData, newProps; + UInt32 indexInArchive; + if (!updateCallback) + return E_FAIL; + RINOK(updateCallback->GetUpdateItemInfo(0, &newData, &newProps, &indexInArchive)); + + CItem newItem = _item; + newItem.ExtraFlags = 0; + newItem.Flags = 0; + if (IntToBool(newProps)) + { + { + FILETIME utcTime; + NCOM::CPropVariant prop; + RINOK(updateCallback->GetProperty(0, kpidMTime, &prop)); + if (prop.vt != VT_FILETIME) + return E_INVALIDARG; + utcTime = prop.filetime; + if (!NTime::FileTimeToUnixTime(utcTime, newItem.Time)) + return E_INVALIDARG; + } + { + NCOM::CPropVariant prop; + RINOK(updateCallback->GetProperty(0, kpidPath, &prop)); + if (prop.vt == VT_BSTR) + { + UString name = prop.bstrVal; + int dirDelimiterPos = name.ReverseFind(CHAR_PATH_SEPARATOR); + if (dirDelimiterPos >= 0) + name = name.Mid(dirDelimiterPos + 1); + newItem.Name = UnicodeStringToMultiByte(name, CP_ACP); + if (!newItem.Name.IsEmpty()) + newItem.Flags |= NHeader::NFlags::kName; + } + else if (prop.vt != VT_EMPTY) + return E_INVALIDARG; + } + { + NCOM::CPropVariant prop; + RINOK(updateCallback->GetProperty(0, kpidIsDir, &prop)); + if (prop.vt == VT_BOOL) + { + if (prop.boolVal != VARIANT_FALSE) + return E_INVALIDARG; + } + else if (prop.vt != VT_EMPTY) + return E_INVALIDARG; + } + } + + if (IntToBool(newData)) + { + UInt64 size; + { + NCOM::CPropVariant prop; + RINOK(updateCallback->GetProperty(0, kpidSize, &prop)); + if (prop.vt != VT_UI8) + return E_INVALIDARG; + size = prop.uhVal.QuadPart; + } + + return UpdateArchive(outStream, size, newItem, _method, updateCallback); + } + + if (indexInArchive != 0) + return E_INVALIDARG; + + if (!_stream) + return E_NOTIMPL; + + UInt64 offset = _startPosition; + if (IntToBool(newProps)) + { + newItem.WriteHeader(outStream); + offset += _headerSize; + } + RINOK(_stream->Seek(offset, STREAM_SEEK_SET, NULL)); + return NCompress::CopyStream(_stream, outStream, NULL); +} + +STDMETHODIMP CHandler::SetProperties(const wchar_t **names, const PROPVARIANT *values, Int32 numProps) +{ + return _method.SetProperties(names, values, numProps); +} + +static IInArchive *CreateArc() { return new CHandler; } +#ifndef EXTRACT_ONLY +static IOutArchive *CreateArcOut() { return new CHandler; } +#else +#define CreateArcOut 0 +#endif + +static CArcInfo g_ArcInfo = + { L"gzip", L"gz gzip tgz tpz", L"* * .tar .tar", 0xEF, { 0x1F, 0x8B, 8 }, 3, true, CreateArc, CreateArcOut }; + +REGISTER_ARC(GZip) + +}} diff --git a/CPP/7zip/Archive/Hfs/HfsHandler.cpp b/CPP/7zip/Archive/Hfs/HfsHandler.cpp new file mode 100644 index 0000000..f226458 --- /dev/null +++ b/CPP/7zip/Archive/Hfs/HfsHandler.cpp @@ -0,0 +1,243 @@ +// HfsHandler.cpp + +#include "StdAfx.h" + +#include "Common/ComTry.h" +#include "Windows/PropVariant.h" +#include "../../Common/StreamUtils.h" +#include "HfsHandler.h" + +namespace NArchive { +namespace NHfs { + +STATPROPSTG kProps[] = +{ + { NULL, kpidPath, VT_BSTR}, + { NULL, kpidIsDir, VT_BOOL}, + { NULL, kpidSize, VT_UI8}, + { NULL, kpidPackSize, VT_UI8}, + { NULL, kpidCTime, VT_FILETIME}, + { NULL, kpidMTime, VT_FILETIME}, + { NULL, kpidATime, VT_FILETIME} +}; + +STATPROPSTG kArcProps[] = +{ + { NULL, kpidMethod, VT_BSTR}, + { NULL, kpidClusterSize, VT_UI4}, + { NULL, kpidFreeSpace, VT_UI8}, + { NULL, kpidCTime, VT_FILETIME}, + { NULL, kpidMTime, VT_FILETIME} +}; + +IMP_IInArchive_Props +IMP_IInArchive_ArcProps + +static void HfsTimeToProp(UInt32 hfsTime, NWindows::NCOM::CPropVariant &prop) +{ + FILETIME ft; + HfsTimeToFileTime(hfsTime, ft); + prop = ft; +} + +STDMETHODIMP CHandler::GetArchiveProperty(PROPID propID, PROPVARIANT *value) +{ + COM_TRY_BEGIN + NWindows::NCOM::CPropVariant prop; + switch(propID) + { + case kpidMethod: prop = _db.Header.IsHfsX() ? L"HFSX" : L"HFS+"; break; + case kpidClusterSize: prop = (UInt32)1 << _db.Header.BlockSizeLog; break; + case kpidFreeSpace: prop = (UInt64)_db.Header.NumFreeBlocks << _db.Header.BlockSizeLog; break; + case kpidMTime: HfsTimeToProp(_db.Header.MTime, prop); break; + case kpidCTime: + { + FILETIME localFt, ft; + HfsTimeToFileTime(_db.Header.CTime, localFt); + if (LocalFileTimeToFileTime(&localFt, &ft)) + prop = ft; + break; + } + } + prop.Detach(value); + return S_OK; + COM_TRY_END +} + +STDMETHODIMP CHandler::GetProperty(UInt32 index, PROPID propID, PROPVARIANT *value) +{ + COM_TRY_BEGIN + NWindows::NCOM::CPropVariant prop; + const CItem &item = _db.Items[index]; + switch(propID) + { + case kpidPath: prop = _db.GetItemPath(index); break; + case kpidIsDir: prop = item.IsDir(); break; + + case kpidCTime: HfsTimeToProp(item.CTime, prop); break; + case kpidMTime: HfsTimeToProp(item.MTime, prop); break; + case kpidATime: HfsTimeToProp(item.ATime, prop); break; + + case kpidPackSize: if (!item.IsDir()) prop = (UInt64)item.NumBlocks << _db.Header.BlockSizeLog; break; + case kpidSize: if (!item.IsDir()) prop = item.Size; break; + } + prop.Detach(value); + return S_OK; + COM_TRY_END +} + +class CProgressImp: public CProgressVirt +{ + CMyComPtr _callback; +public: + HRESULT SetTotal(UInt64 numFiles); + HRESULT SetCompleted(UInt64 numFiles); + CProgressImp(IArchiveOpenCallback *callback): _callback(callback) {} +}; + +HRESULT CProgressImp::SetTotal(UInt64 numFiles) +{ + if (_callback) + return _callback->SetTotal(&numFiles, NULL); + return S_OK; +} + +HRESULT CProgressImp::SetCompleted(UInt64 numFiles) +{ + if (_callback) + return _callback->SetCompleted(&numFiles, NULL); + return S_OK; +} + +STDMETHODIMP CHandler::Open(IInStream *inStream, + const UInt64 * /* maxCheckStartPosition */, + IArchiveOpenCallback *callback) +{ + COM_TRY_BEGIN + Close(); + try + { + CProgressImp progressImp(callback); + HRESULT res = _db.Open(inStream, &progressImp); + if (res == E_ABORT) + return res; + if (res != S_OK) + return S_FALSE; + _stream = inStream; + } + catch(...) { return S_FALSE; } + return S_OK; + COM_TRY_END +} + +STDMETHODIMP CHandler::Close() +{ + _stream.Release(); + _db.Clear(); + return S_OK; +} + +STDMETHODIMP CHandler::Extract(const UInt32 *indices, UInt32 numItems, + Int32 testMode, IArchiveExtractCallback *extractCallback) +{ + COM_TRY_BEGIN + bool allFilesMode = (numItems == (UInt32)-1); + if (allFilesMode) + numItems = _db.Items.Size(); + if (numItems == 0) + return S_OK; + UInt32 i; + UInt64 totalSize = 0; + for (i = 0; i < numItems; i++) + { + const CItem &item = _db.Items[allFilesMode ? i : indices[i]]; + if (!item.IsDir()) + totalSize += item.Size; + } + RINOK(extractCallback->SetTotal(totalSize)); + + UInt64 currentTotalSize = 0, currentItemSize = 0; + + CByteBuffer buf; + const UInt32 kBufSize = (1 << 16); + buf.SetCapacity(kBufSize); + + for (i = 0; i < numItems; i++, currentTotalSize += currentItemSize) + { + RINOK(extractCallback->SetCompleted(¤tTotalSize)); + Int32 index = allFilesMode ? i : indices[i]; + const CItem &item = _db.Items[index]; + currentItemSize = 0; + if (!item.IsDir()) + currentItemSize = item.Size; + + CMyComPtr realOutStream; + Int32 askMode = testMode ? + NExtract::NAskMode::kTest : + NExtract::NAskMode::kExtract; + RINOK(extractCallback->GetStream(index, &realOutStream, askMode)); + + if (item.IsDir()) + { + RINOK(extractCallback->PrepareOperation(askMode)); + RINOK(extractCallback->SetOperationResult(NExtract::NOperationResult::kOK)); + continue; + } + if (!testMode && !realOutStream) + continue; + RINOK(extractCallback->PrepareOperation(askMode)); + UInt64 pos = 0; + int res = NExtract::NOperationResult::kOK; + int i; + for (i = 0; i < item.Extents.Size(); i++) + { + if (item.Size == pos) + break; + if (res != NExtract::NOperationResult::kOK) + break; + const CExtent &e = item.Extents[i]; + RINOK(_stream->Seek((UInt64)e.Pos << _db.Header.BlockSizeLog, STREAM_SEEK_SET, NULL)); + UInt64 extentSize = (UInt64)e.NumBlocks << _db.Header.BlockSizeLog; + for (;;) + { + if (extentSize == 0) + break; + UInt64 rem = item.Size - pos; + if (rem == 0) + { + if (extentSize >= (UInt64)((UInt32)1 << _db.Header.BlockSizeLog)) + res = NExtract::NOperationResult::kDataError; + break; + } + UInt32 curSize = kBufSize; + if (curSize > rem) + curSize = (UInt32)rem; + if (curSize > extentSize) + curSize = (UInt32)extentSize; + RINOK(ReadStream_FALSE(_stream, buf, curSize)); + if (realOutStream) + { + RINOK(WriteStream(realOutStream, buf, curSize)); + } + pos += curSize; + extentSize -= curSize; + UInt64 processed = currentTotalSize + pos; + RINOK(extractCallback->SetCompleted(&processed)); + } + } + if (i != item.Extents.Size() || item.Size != pos) + res = NExtract::NOperationResult::kDataError; + realOutStream.Release(); + RINOK(extractCallback->SetOperationResult(res)); + } + return S_OK; + COM_TRY_END +} + +STDMETHODIMP CHandler::GetNumberOfItems(UInt32 *numItems) +{ + *numItems = _db.Items.Size(); + return S_OK; +} + +}} diff --git a/CPP/7zip/Archive/Hfs/HfsHandler.h b/CPP/7zip/Archive/Hfs/HfsHandler.h new file mode 100644 index 0000000..269af21 --- /dev/null +++ b/CPP/7zip/Archive/Hfs/HfsHandler.h @@ -0,0 +1,26 @@ +// HfsHandler.h + +#ifndef __ARCHIVE_HFS_HANDLER_H +#define __ARCHIVE_HFS_HANDLER_H + +#include "Common/MyCom.h" +#include "../IArchive.h" +#include "HfsIn.h" + +namespace NArchive { +namespace NHfs { + +class CHandler: + public IInArchive, + public CMyUnknownImp +{ + CMyComPtr _stream; + CDatabase _db; +public: + MY_UNKNOWN_IMP1(IInArchive) + INTERFACE_IInArchive(;) +}; + +}} + +#endif diff --git a/CPP/7zip/Archive/Hfs/HfsIn.cpp b/CPP/7zip/Archive/Hfs/HfsIn.cpp new file mode 100644 index 0000000..8391dd9 --- /dev/null +++ b/CPP/7zip/Archive/Hfs/HfsIn.cpp @@ -0,0 +1,480 @@ +// HfsIn.cpp + +#include "StdAfx.h" + +#include "../../Common/StreamUtils.h" +#include "Common/IntToString.h" + +#include "HfsIn.h" + +#include "../../../../C/CpuArch.h" + +#define Get16(p) GetBe16(p) +#define Get32(p) GetBe32(p) +#define Get64(p) GetBe64(p) + +namespace NArchive { +namespace NHfs { + +#define RINOZ(x) { int __tt = (x); if (__tt != 0) return __tt; } + +static int CompareIdToIndex(const CIdIndexPair *p1, const CIdIndexPair *p2, void * /* param */) +{ + RINOZ(MyCompare(p1->ID, p2->ID)); + return MyCompare(p1->Index, p2->Index); +} + +bool operator< (const CIdIndexPair &a1, const CIdIndexPair &a2) { return (a1.ID < a2.ID); } +bool operator> (const CIdIndexPair &a1, const CIdIndexPair &a2) { return (a1.ID > a2.ID); } +bool operator==(const CIdIndexPair &a1, const CIdIndexPair &a2) { return (a1.ID == a2.ID); } +bool operator!=(const CIdIndexPair &a1, const CIdIndexPair &a2) { return (a1.ID != a2.ID); } + +static UString GetSpecName(const UString &name, UInt32 /* id */) +{ + UString name2 = name; + name2.Trim(); + if (name2.IsEmpty()) + { + /* + wchar_t s[32]; + ConvertUInt64ToString(id, s); + return L"[" + (UString)s + L"]"; + */ + return L"[]"; + } + return name; +} + +UString CDatabase::GetItemPath(int index) const +{ + const CItem *item = &Items[index]; + UString name = GetSpecName(item->Name, item->ID); + + for (int i = 0; i < 1000; i++) + { + if (item->ParentID < 16 && item->ParentID != 2) + { + if (item->ParentID != 1) + break; + return name; + } + CIdIndexPair pair; + pair.ID = item->ParentID; + pair.Index = 0; + int indexInMap = IdToIndexMap.FindInSorted(pair); + if (indexInMap < 0) + break; + item = &Items[IdToIndexMap[indexInMap].Index]; + name = GetSpecName(item->Name, item->ID) + WCHAR_PATH_SEPARATOR + name; + } + return (UString)L"Unknown" + WCHAR_PATH_SEPARATOR + name; +} + +void CFork::Parse(const Byte *p) +{ + Size = Get64(p); + // ClumpSize = Get32(p + 8); + NumBlocks = Get32(p + 0xC); + for (int i = 0; i < 8; i++) + { + CExtent &e = Extents[i]; + e.Pos = Get32(p + 0x10 + i * 8); + e.NumBlocks = Get32(p + 0x10 + i * 8 + 4); + } +} + +static HRESULT ReadExtent(int blockSizeLog, IInStream *inStream, Byte *buf, const CExtent &e) +{ + RINOK(inStream->Seek((UInt64)e.Pos << blockSizeLog, STREAM_SEEK_SET, NULL)); + return ReadStream_FALSE(inStream, buf, (size_t)e.NumBlocks << blockSizeLog); +} + +HRESULT CDatabase::ReadFile(const CFork &fork, CByteBuffer &buf, IInStream *inStream) +{ + if (fork.NumBlocks >= Header.NumBlocks) + return S_FALSE; + size_t totalSize = (size_t)fork.NumBlocks << Header.BlockSizeLog; + if ((totalSize >> Header.BlockSizeLog) != fork.NumBlocks) + return S_FALSE; + buf.SetCapacity(totalSize); + UInt32 curBlock = 0; + for (int i = 0; i < 8; i++) + { + if (curBlock >= fork.NumBlocks) + break; + const CExtent &e = fork.Extents[i]; + if (fork.NumBlocks - curBlock < e.NumBlocks || e.Pos >= Header.NumBlocks) + return S_FALSE; + RINOK(ReadExtent(Header.BlockSizeLog, inStream, + (Byte *)buf + ((size_t)curBlock << Header.BlockSizeLog), e)); + curBlock += e.NumBlocks; + } + return S_OK; +} + +struct CNodeDescriptor +{ + UInt32 fLink; + UInt32 bLink; + Byte Kind; + Byte Height; + UInt16 NumRecords; + // UInt16 Reserved; + void Parse(const Byte *p); +}; + +void CNodeDescriptor::Parse(const Byte *p) +{ + fLink = Get32(p); + bLink = Get32(p + 4); + Kind = p[8]; + Height = p[9]; + NumRecords = Get16(p + 10); +} + +struct CHeaderRec +{ + // UInt16 TreeDepth; + // UInt32 RootNode; + // UInt32 LeafRecords; + UInt32 FirstLeafNode; + // UInt32 LastLeafNode; + int NodeSizeLog; + // UInt16 MaxKeyLength; + UInt32 TotalNodes; + // UInt32 FreeNodes; + // UInt16 Reserved1; + // UInt32 ClumpSize; + // Byte BtreeType; + // Byte KeyCompareType; + // UInt32 Attributes; + // UInt32 Reserved3[16]; + + HRESULT Parse(const Byte *p); +}; + +HRESULT CHeaderRec::Parse(const Byte *p) +{ + // TreeDepth = Get16(p); + // RootNode = Get32(p + 2); + // LeafRecords = Get32(p + 6); + FirstLeafNode = Get32(p + 0xA); + // LastLeafNode = Get32(p + 0xE); + UInt32 nodeSize = Get16(p + 0x12); + + int i; + for (i = 9; ((UInt32)1 << i) != nodeSize; i++) + if (i == 16) + return S_FALSE; + NodeSizeLog = i; + + // MaxKeyLength = Get16(p + 0x14); + TotalNodes = Get32(p + 0x16); + // FreeNodes = Get32(p + 0x1A); + // Reserved1 = Get16(p + 0x1E); + // ClumpSize = Get32(p + 0x20); + // BtreeType = p[0x24]; + // KeyCompareType = p[0x25]; + // Attributes = Get32(p + 0x26); + /* + for (int i = 0; i < 16; i++) + Reserved3[i] = Get32(p + 0x2A + i * 4); + */ + return S_OK; +} + + +enum ENodeType +{ + NODE_TYPE_LEAF = 0xFF, + NODE_TYPE_INDEX = 0, + NODE_TYPE_HEADER = 1, + NODE_TYPE_MODE = 2 +}; + +HRESULT CDatabase::LoadExtentFile(IInStream *inStream) +{ + // FileExtents.Clear(); + // ResExtents.Clear(); + + CByteBuffer extents; + RINOK(ReadFile(Header.ExtentsFile, extents, inStream)); + + const Byte *p = (const Byte *)extents; + + // CNodeDescriptor nodeDesc; + // nodeDesc.Parse(p); + CHeaderRec hr; + RINOK(hr.Parse(p + 14)); + + UInt32 node = hr.FirstLeafNode; + if (node != 0) + return S_FALSE; + /* + while (node != 0) + { + size_t nodeOffset = node * hr.NodeSize; + if ((node + 1)* hr.NodeSize > CatalogBuf.GetCapacity()) + return S_FALSE; + CNodeDescriptor desc; + desc.Parse(p + nodeOffset); + if (desc.Kind != NODE_TYPE_LEAF) + return S_FALSE; + UInt32 ptr = hr.NodeSize; + for (int i = 0; i < desc.NumRecords; i++) + { + UInt32 offs = Get16(p + nodeOffset + hr.NodeSize - (i + 1) * 2); + UInt32 offsNext = Get16(p + nodeOffset + hr.NodeSize - (i + 2) * 2); + + const Byte *r = p + nodeOffset + offs; + int keyLength = Get16(r); + Byte forkType = r[2]; + UInt32 id = Get16(r + 4); + UInt32 startBlock = Get16(r + 4); + CObjectVector *extents = (forkType == 0) ? &FileExtents : &ResExtents; + if (extents->Size() == 0) + extents->Add(CIdExtents()); + else + { + CIdExtents &e = extents->Back(); + if (e.ID != id) + { + if (e.ID > id) + return S_FALSE; + extents->Add(CIdExtents()); + } + } + CIdExtents &e = extents->Back(); + for (UInt32 k = offs + 10 + 2; k + 8 <= offsNext; k += 8) + { + CExtent ee; + ee.Pos = Get32(p + nodeOffset + k); + ee.NumBlocks = Get32(p + nodeOffset + k * 4); + e.Extents.Add(ee); + } + } + node = desc.fLink; + } + */ + return S_OK; +} + + +HRESULT CDatabase::LoadCatalog(IInStream *inStream, CProgressVirt *progress) +{ + Items.Clear(); + IdToIndexMap.ClearAndFree(); + + CByteBuffer catalogBuf; + RINOK(ReadFile(Header.CatalogFile, catalogBuf, inStream)); + const Byte *p = (const Byte *)catalogBuf; + + // CNodeDescriptor nodeDesc; + // nodeDesc.Parse(p); + CHeaderRec hr; + hr.Parse(p + 14); + + // CaseSensetive = (Header.IsHfsX() && hr.KeyCompareType == 0xBC); + + if ((catalogBuf.GetCapacity() >> hr.NodeSizeLog) < hr.TotalNodes) + return S_FALSE; + + CByteBuffer usedBuf; + usedBuf.SetCapacity(hr.TotalNodes); + for (UInt32 i = 0; i < hr.TotalNodes; i++) + usedBuf[i] = 0; + + UInt32 node = hr.FirstLeafNode; + while (node != 0) + { + if (node >= hr.TotalNodes) + return S_FALSE; + if (usedBuf[node]) + return S_FALSE; + usedBuf[node] = 1; + size_t nodeOffset = (size_t)node << hr.NodeSizeLog; + CNodeDescriptor desc; + desc.Parse(p + nodeOffset); + if (desc.Kind != NODE_TYPE_LEAF) + return S_FALSE; + for (int i = 0; i < desc.NumRecords; i++) + { + UInt32 nodeSize = (1 << hr.NodeSizeLog); + UInt32 offs = Get16(p + nodeOffset + nodeSize - (i + 1) * 2); + UInt32 offsNext = Get16(p + nodeOffset + nodeSize - (i + 2) * 2); + UInt32 recSize = offsNext - offs; + if (offsNext >= nodeSize || offsNext < offs || recSize < 6) + return S_FALSE; + + CItem item; + + const Byte *r = p + nodeOffset + offs; + UInt32 keyLength = Get16(r); + item.ParentID = Get32(r + 2); + UString name; + if (keyLength < 6 || (keyLength & 1) != 0 || keyLength + 2 > recSize) + return S_FALSE; + r += 6; + recSize -= 6; + keyLength -= 6; + + int nameLength = Get16(r); + if (nameLength * 2 != (int)keyLength) + return S_FALSE; + r += 2; + recSize -= 2; + + wchar_t *pp = name.GetBuffer(nameLength + 1); + + int j; + for (j = 0; j < nameLength; j++) + pp[j] = ((wchar_t)r[j * 2] << 8) | r[j * 2 + 1]; + pp[j] = 0; + name.ReleaseBuffer(); + r += j * 2; + recSize -= j * 2; + + if (recSize < 2) + return S_FALSE; + item.Type = Get16(r); + + if (item.Type != RECORD_TYPE_FOLDER && item.Type != RECORD_TYPE_FILE) + continue; + if (recSize < 0x58) + return S_FALSE; + + // item.Flags = Get16(r + 2); + // item.Valence = Get32(r + 4); + item.ID = Get32(r + 8); + item.CTime = Get32(r + 0xC); + item.MTime = Get32(r + 0x10); + // item.AttrMTime = Get32(r + 0x14); + item.ATime = Get32(r + 0x18); + // item.BackupDate = Get32(r + 0x1C); + + /* + item.OwnerID = Get32(r + 0x20); + item.GroupID = Get32(r + 0x24); + item.AdminFlags = r[0x28]; + item.OwnerFlags = r[0x29]; + item.FileMode = Get16(r + 0x2A); + item.special.iNodeNum = Get16(r + 0x2C); + */ + + item.Name = name; + + if (item.IsDir()) + { + CIdIndexPair pair; + pair.ID = item.ID; + pair.Index = Items.Size(); + IdToIndexMap.Add(pair); + } + else + { + CFork fd; + recSize -= 0x58; + r += 0x58; + if (recSize < 0x50 * 2) + return S_FALSE; + fd.Parse(r); + item.Size = fd.Size; + item.NumBlocks = fd.NumBlocks; + UInt32 curBlock = 0; + for (int j = 0; j < 8; j++) + { + if (curBlock >= fd.NumBlocks) + break; + const CExtent &e = fd.Extents[j]; + item.Extents.Add(e); + curBlock += e.NumBlocks; + } + } + Items.Add(item); + if (progress && Items.Size() % 100 == 0) + { + RINOK(progress->SetCompleted(Items.Size())); + } + } + node = desc.fLink; + } + IdToIndexMap.Sort(CompareIdToIndex, NULL); + return S_OK; +} + +HRESULT CDatabase::Open(IInStream *inStream, CProgressVirt *progress) +{ + static const UInt32 kHeaderSize = 1024 + 512; + Byte buf[kHeaderSize]; + RINOK(ReadStream_FALSE(inStream, buf, kHeaderSize)); + int i; + for (i = 0; i < 1024; i++) + if (buf[i] != 0) + return S_FALSE; + const Byte *p = buf + 1024; + CVolHeader &h = Header; + + h.Header[0] = p[0]; + h.Header[1] = p[1]; + if (p[0] != 'H' || (p[1] != '+' && p[1] != 'X')) + return S_FALSE; + h.Version = Get16(p + 2); + if (h.Version < 4 || h.Version > 5) + return S_FALSE; + + // h.Attr = Get32(p + 4); + // h.LastMountedVersion = Get32(p + 8); + // h.JournalInfoBlock = Get32(p + 0xC); + + h.CTime = Get32(p + 0x10); + h.MTime = Get32(p + 0x14); + // h.BackupTime = Get32(p + 0x18); + // h.CheckedTime = Get32(p + 0x1C); + + // h.NumFiles = Get32(p + 0x20); + // h.NumFolders = Get32(p + 0x24); + + UInt32 numFiles = Get32(p + 0x20); + UInt32 numFolders = Get32(p + 0x24);; + if (progress) + { + RINOK(progress->SetTotal(numFolders + numFiles)); + } + + UInt32 blockSize = Get32(p + 0x28); + + for (i = 9; ((UInt32)1 << i) != blockSize; i++) + if (i == 31) + return S_FALSE; + h.BlockSizeLog = i; + + h.NumBlocks = Get32(p + 0x2C); + h.NumFreeBlocks = Get32(p + 0x30); + + /* + h.WriteCount = Get32(p + 0x44); + for (i = 0; i < 6; i++) + h.FinderInfo[i] = Get32(p + 0x50 + i * 4); + h.VolID = Get64(p + 0x68); + */ + + UInt64 endPos; + RINOK(inStream->Seek(0, STREAM_SEEK_END, &endPos)); + if ((endPos >> h.BlockSizeLog) < h.NumBlocks) + return S_FALSE; + + // h.AllocationFile.Parse(p + 0x70 + 0x50 * 0); + h.ExtentsFile.Parse( p + 0x70 + 0x50 * 1); + h.CatalogFile.Parse( p + 0x70 + 0x50 * 2); + // h.AttributesFile.Parse(p + 0x70 + 0x50 * 3); + // h.StartupFile.Parse( p + 0x70 + 0x50 * 4); + + RINOK(LoadExtentFile(inStream)); + RINOK(LoadCatalog(inStream, progress)); + + // if (Header.NumFiles + Header.NumFolders != (UInt32)Items.Size()) return S_OK; + + return S_OK; +} + +}} diff --git a/CPP/7zip/Archive/Hfs/HfsIn.h b/CPP/7zip/Archive/Hfs/HfsIn.h new file mode 100644 index 0000000..c195390 --- /dev/null +++ b/CPP/7zip/Archive/Hfs/HfsIn.h @@ -0,0 +1,154 @@ +// HfsIn.h + +#ifndef __ARCHIVE_HFS_IN_H +#define __ARCHIVE_HFS_IN_H + +#include "Common/MyString.h" +#include "Common/Buffer.h" + +namespace NArchive { +namespace NHfs { + +struct CExtent +{ + UInt32 Pos; + UInt32 NumBlocks; +}; + +struct CFork +{ + UInt64 Size; + // UInt32 ClumpSize; + UInt32 NumBlocks; + CExtent Extents[8]; + void Parse(const Byte *p); +}; + +struct CVolHeader +{ + Byte Header[2]; + UInt16 Version; + // UInt32 Attr; + // UInt32 LastMountedVersion; + // UInt32 JournalInfoBlock; + + UInt32 CTime; + UInt32 MTime; + // UInt32 BackupTime; + // UInt32 CheckedTime; + + // UInt32 NumFiles; + // UInt32 NumFolders; + int BlockSizeLog; + UInt32 NumBlocks; + UInt32 NumFreeBlocks; + + // UInt32 WriteCount; + // UInt32 FinderInfo[8]; + // UInt64 VolID; + + // CFork AllocationFile; + CFork ExtentsFile; + CFork CatalogFile; + // CFork AttributesFile; + // CFork StartupFile; + + bool IsHfsX() const { return Version > 4; } +}; + +inline void HfsTimeToFileTime(UInt32 hfsTime, FILETIME &ft) +{ + UInt64 v = ((UInt64)3600 * 24 * (365 * 303 + 24 * 3) + hfsTime) * 10000000; + ft.dwLowDateTime = (DWORD)v; + ft.dwHighDateTime = (DWORD)(v >> 32); +} + +enum ERecordType +{ + RECORD_TYPE_FOLDER = 1, + RECORD_TYPE_FILE = 2, + RECORD_TYPE_FOLDER_THREAD = 3, + RECORD_TYPE_FILE_THREAD = 4 +}; + +struct CItem +{ + UString Name; + + UInt32 ParentID; + + UInt16 Type; + // UInt16 Flags; + // UInt32 Valence; + UInt32 ID; + UInt32 CTime; + UInt32 MTime; + // UInt32 AttrMTime; + UInt32 ATime; + // UInt32 BackupDate; + + /* + UInt32 OwnerID; + UInt32 GroupID; + Byte AdminFlags; + Byte OwnerFlags; + UInt16 FileMode; + union + { + UInt32 iNodeNum; + UInt32 LinkCount; + UInt32 RawDevice; + } special; + */ + + UInt64 Size; + UInt32 NumBlocks; + CRecordVector Extents; + + bool IsDir() const { return Type == RECORD_TYPE_FOLDER; } + CItem(): Size(0), NumBlocks(0) {} +}; + +struct CIdIndexPair +{ + UInt32 ID; + int Index; +}; + +struct CProgressVirt +{ + virtual HRESULT SetTotal(UInt64 numFiles) PURE; + virtual HRESULT SetCompleted(UInt64 numFiles) PURE; +}; + +class CDatabase +{ + // CObjectVector FileExtents; + // CObjectVector ResExtents; + CRecordVector IdToIndexMap; + + HRESULT LoadExtentFile(IInStream *inStream); + HRESULT LoadCatalog(IInStream *inStream, CProgressVirt *progress); + + HRESULT ReadFile(const CFork &fork, CByteBuffer &buf, IInStream *inStream); +public: + CVolHeader Header; + CObjectVector Items; + // bool CaseSensetive; + + void Clear() + { + // CaseSensetive = false; + Items.Clear(); + // FileExtents.Clear(); + // ResExtents.Clear(); + IdToIndexMap.Clear(); + } + + UString GetItemPath(int index) const; + HRESULT Open(IInStream *inStream, CProgressVirt *progress); +}; + +}} + +#endif diff --git a/CPP/7zip/Archive/Hfs/HfsRegister.cpp b/CPP/7zip/Archive/Hfs/HfsRegister.cpp new file mode 100644 index 0000000..51c3c2b --- /dev/null +++ b/CPP/7zip/Archive/Hfs/HfsRegister.cpp @@ -0,0 +1,13 @@ +// HfsRegister.cpp + +#include "StdAfx.h" + +#include "../../Common/RegisterArc.h" + +#include "HfsHandler.h" +static IInArchive *CreateArc() { return new NArchive::NHfs::CHandler; } + +static CArcInfo g_ArcInfo = + { L"HFS", L"hfs", 0, 0xE3, { 'H', '+', 0, 4 }, 4, false, CreateArc, 0 }; + +REGISTER_ARC(Hfs) diff --git a/CPP/7zip/Archive/IArchive.h b/CPP/7zip/Archive/IArchive.h new file mode 100644 index 0000000..8532027 --- /dev/null +++ b/CPP/7zip/Archive/IArchive.h @@ -0,0 +1,234 @@ +// IArchive.h + +#ifndef __IARCHIVE_H +#define __IARCHIVE_H + +#include "../IProgress.h" +#include "../IStream.h" +#include "../PropID.h" + +#define ARCHIVE_INTERFACE_SUB(i, base, x) DECL_INTERFACE_SUB(i, base, 6, x) +#define ARCHIVE_INTERFACE(i, x) ARCHIVE_INTERFACE_SUB(i, IUnknown, x) + +namespace NFileTimeType +{ + enum EEnum + { + kWindows, + kUnix, + kDOS + }; +} + +namespace NArchive +{ + enum + { + kName = 0, + kClassID, + kExtension, + kAddExtension, + kUpdate, + kKeepName, + kStartSignature, + kFinishSignature, + kAssociate + }; + + namespace NExtract + { + namespace NAskMode + { + enum + { + kExtract = 0, + kTest, + kSkip + }; + } + namespace NOperationResult + { + enum + { + kOK = 0, + kUnSupportedMethod, + kDataError, + kCRCError + }; + } + } + namespace NUpdate + { + namespace NOperationResult + { + enum + { + kOK = 0, + kError + }; + } + } +} + +#define INTERFACE_IArchiveOpenCallback(x) \ + STDMETHOD(SetTotal)(const UInt64 *files, const UInt64 *bytes) x; \ + STDMETHOD(SetCompleted)(const UInt64 *files, const UInt64 *bytes) x; \ + +ARCHIVE_INTERFACE(IArchiveOpenCallback, 0x10) +{ + INTERFACE_IArchiveOpenCallback(PURE); +}; + + +#define INTERFACE_IArchiveExtractCallback(x) \ + INTERFACE_IProgress(x) \ + STDMETHOD(GetStream)(UInt32 index, ISequentialOutStream **outStream, Int32 askExtractMode) x; \ + STDMETHOD(PrepareOperation)(Int32 askExtractMode) x; \ + STDMETHOD(SetOperationResult)(Int32 resultEOperationResult) x; \ + +ARCHIVE_INTERFACE_SUB(IArchiveExtractCallback, IProgress, 0x20) +{ + INTERFACE_IArchiveExtractCallback(PURE) +}; + + +#define INTERFACE_IArchiveOpenVolumeCallback(x) \ + STDMETHOD(GetProperty)(PROPID propID, PROPVARIANT *value) x; \ + STDMETHOD(GetStream)(const wchar_t *name, IInStream **inStream) x; \ + +ARCHIVE_INTERFACE(IArchiveOpenVolumeCallback, 0x30) +{ + INTERFACE_IArchiveOpenVolumeCallback(PURE); +}; + + +ARCHIVE_INTERFACE(IInArchiveGetStream, 0x40) +{ + STDMETHOD(GetStream)(UInt32 index, ISequentialInStream **stream) PURE; +}; + + +ARCHIVE_INTERFACE(IArchiveOpenSetSubArchiveName, 0x50) +{ + STDMETHOD(SetSubArchiveName)(const wchar_t *name) PURE; +}; + + +/* +IInArchive::Extract: + indices must be sorted + numItems = 0xFFFFFFFF means "all files" + testMode != 0 means "test files without writing to outStream" +*/ + +#define INTERFACE_IInArchive(x) \ + STDMETHOD(Open)(IInStream *stream, const UInt64 *maxCheckStartPosition, IArchiveOpenCallback *openArchiveCallback) x; \ + STDMETHOD(Close)() x; \ + STDMETHOD(GetNumberOfItems)(UInt32 *numItems) x; \ + STDMETHOD(GetProperty)(UInt32 index, PROPID propID, PROPVARIANT *value) x; \ + STDMETHOD(Extract)(const UInt32* indices, UInt32 numItems, Int32 testMode, IArchiveExtractCallback *extractCallback) x; \ + STDMETHOD(GetArchiveProperty)(PROPID propID, PROPVARIANT *value) x; \ + STDMETHOD(GetNumberOfProperties)(UInt32 *numProperties) x; \ + STDMETHOD(GetPropertyInfo)(UInt32 index, BSTR *name, PROPID *propID, VARTYPE *varType) x; \ + STDMETHOD(GetNumberOfArchiveProperties)(UInt32 *numProperties) x; \ + STDMETHOD(GetArchivePropertyInfo)(UInt32 index, BSTR *name, PROPID *propID, VARTYPE *varType) x; + +ARCHIVE_INTERFACE(IInArchive, 0x60) +{ + INTERFACE_IInArchive(PURE) +}; + +ARCHIVE_INTERFACE(IArchiveOpenSeq, 0x61) +{ + STDMETHOD(OpenSeq)(ISequentialInStream *stream) PURE; +}; + +#define INTERFACE_IArchiveUpdateCallback(x) \ + INTERFACE_IProgress(x); \ + STDMETHOD(GetUpdateItemInfo)(UInt32 index, \ + Int32 *newData, /*1 - new data, 0 - old data */ \ + Int32 *newProperties, /* 1 - new properties, 0 - old properties */ \ + UInt32 *indexInArchive /* -1 if there is no in archive, or if doesn't matter */ \ + ) x; \ + STDMETHOD(GetProperty)(UInt32 index, PROPID propID, PROPVARIANT *value) x; \ + STDMETHOD(GetStream)(UInt32 index, ISequentialInStream **inStream) x; \ + STDMETHOD(SetOperationResult)(Int32 operationResult) x; \ + +ARCHIVE_INTERFACE_SUB(IArchiveUpdateCallback, IProgress, 0x80) +{ + INTERFACE_IArchiveUpdateCallback(PURE); +}; + +#define INTERFACE_IArchiveUpdateCallback2(x) \ + INTERFACE_IArchiveUpdateCallback(x) \ + STDMETHOD(GetVolumeSize)(UInt32 index, UInt64 *size) x; \ + STDMETHOD(GetVolumeStream)(UInt32 index, ISequentialOutStream **volumeStream) x; \ + +ARCHIVE_INTERFACE_SUB(IArchiveUpdateCallback2, IArchiveUpdateCallback, 0x82) +{ + INTERFACE_IArchiveUpdateCallback2(PURE); +}; + + +#define INTERFACE_IOutArchive(x) \ + STDMETHOD(UpdateItems)(ISequentialOutStream *outStream, UInt32 numItems, IArchiveUpdateCallback *updateCallback) x; \ + STDMETHOD(GetFileTimeType)(UInt32 *type) x; + +ARCHIVE_INTERFACE(IOutArchive, 0xA0) +{ + INTERFACE_IOutArchive(PURE) +}; + + +ARCHIVE_INTERFACE(ISetProperties, 0x03) +{ + STDMETHOD(SetProperties)(const wchar_t **names, const PROPVARIANT *values, Int32 numProperties) PURE; +}; + + +#define IMP_IInArchive_GetProp(k) \ + (UInt32 index, BSTR *name, PROPID *propID, VARTYPE *varType) \ + { if(index >= sizeof(k) / sizeof(k[0])) return E_INVALIDARG; \ + const STATPROPSTG &srcItem = k[index]; \ + *propID = srcItem.propid; *varType = srcItem.vt; *name = 0; return S_OK; } \ + +#define IMP_IInArchive_GetProp_WITH_NAME(k) \ + (UInt32 index, BSTR *name, PROPID *propID, VARTYPE *varType) \ + { if(index >= sizeof(k) / sizeof(k[0])) return E_INVALIDARG; \ + const STATPROPSTG &srcItem = k[index]; \ + *propID = srcItem.propid; *varType = srcItem.vt; \ + if (srcItem.lpwstrName == 0) *name = 0; else *name = ::SysAllocString(srcItem.lpwstrName); return S_OK; } \ + +#define IMP_IInArchive_Props \ + STDMETHODIMP CHandler::GetNumberOfProperties(UInt32 *numProperties) \ + { *numProperties = sizeof(kProps) / sizeof(kProps[0]); return S_OK; } \ + STDMETHODIMP CHandler::GetPropertyInfo IMP_IInArchive_GetProp(kProps) + +#define IMP_IInArchive_Props_WITH_NAME \ + STDMETHODIMP CHandler::GetNumberOfProperties(UInt32 *numProperties) \ + { *numProperties = sizeof(kProps) / sizeof(kProps[0]); return S_OK; } \ + STDMETHODIMP CHandler::GetPropertyInfo IMP_IInArchive_GetProp_WITH_NAME(kProps) + + +#define IMP_IInArchive_ArcProps \ + STDMETHODIMP CHandler::GetNumberOfArchiveProperties(UInt32 *numProperties) \ + { *numProperties = sizeof(kArcProps) / sizeof(kArcProps[0]); return S_OK; } \ + STDMETHODIMP CHandler::GetArchivePropertyInfo IMP_IInArchive_GetProp(kArcProps) + +#define IMP_IInArchive_ArcProps_WITH_NAME \ + STDMETHODIMP CHandler::GetNumberOfArchiveProperties(UInt32 *numProperties) \ + { *numProperties = sizeof(kArcProps) / sizeof(kArcProps[0]); return S_OK; } \ + STDMETHODIMP CHandler::GetArchivePropertyInfo IMP_IInArchive_GetProp_WITH_NAME(kArcProps) + +#define IMP_IInArchive_ArcProps_NO_Table \ + STDMETHODIMP CHandler::GetNumberOfArchiveProperties(UInt32 *numProperties) \ + { *numProperties = 0; return S_OK; } \ + STDMETHODIMP CHandler::GetArchivePropertyInfo(UInt32, BSTR *, PROPID *, VARTYPE *) \ + { return E_NOTIMPL; } \ + +#define IMP_IInArchive_ArcProps_NO \ + IMP_IInArchive_ArcProps_NO_Table \ + STDMETHODIMP CHandler::GetArchiveProperty(PROPID, PROPVARIANT *value) \ + { value->vt = VT_EMPTY; return S_OK; } + +#endif diff --git a/CPP/7zip/Archive/Iso/IsoHandler.cpp b/CPP/7zip/Archive/Iso/IsoHandler.cpp new file mode 100644 index 0000000..7a9f1a4 --- /dev/null +++ b/CPP/7zip/Archive/Iso/IsoHandler.cpp @@ -0,0 +1,326 @@ +// IsoHandler.cpp + +#include "StdAfx.h" + +#include "Common/ComTry.h" +#include "Common/IntToString.h" +#include "Common/StringConvert.h" + +#include "Windows/PropVariant.h" +#include "Windows/Time.h" + +#include "../../Common/LimitedStreams.h" +#include "../../Common/ProgressUtils.h" + +#include "../../Compress/CopyCoder.h" + +#include "../Common/ItemNameUtils.h" + +#include "IsoHandler.h" + +using namespace NWindows; +using namespace NTime; + +namespace NArchive { +namespace NIso { + +static const STATPROPSTG kProps[] = +{ + { NULL, kpidPath, VT_BSTR}, + { NULL, kpidIsDir, VT_BOOL}, + { NULL, kpidSize, VT_UI8}, + { NULL, kpidPackSize, VT_UI8}, + { NULL, kpidMTime, VT_FILETIME} +}; + +static const STATPROPSTG kArcProps[] = +{ + { NULL, kpidComment, VT_BSTR}, + { NULL, kpidCTime, VT_FILETIME}, + { NULL, kpidMTime, VT_FILETIME} + // { NULL, kpidPhySize, VT_UI8}, + // { NULL, kpidHeadersSize, VT_UI8} +}; + +IMP_IInArchive_Props +IMP_IInArchive_ArcProps + +STDMETHODIMP CHandler::Open(IInStream *stream, + const UInt64 * /* maxCheckStartPosition */, + IArchiveOpenCallback * /* openArchiveCallback */) +{ + COM_TRY_BEGIN + Close(); + // try + { + if (_archive.Open(stream) != S_OK) + return S_FALSE; + _stream = stream; + } + // catch(...) { return S_FALSE; } + return S_OK; + COM_TRY_END +} + +STDMETHODIMP CHandler::Close() +{ + _archive.Clear(); + _stream.Release(); + return S_OK; +} + +STDMETHODIMP CHandler::GetNumberOfItems(UInt32 *numItems) +{ + *numItems = _archive.Refs.Size() + _archive.BootEntries.Size(); + return S_OK; +} + +static void AddString(AString &s, const char *name, const Byte *p, int size) +{ + int i; + for (i = 0; i < size && p[i]; i++); + for (; i > 0 && p[i - 1] == ' '; i--); + if (i != 0) + { + AString d; + memcpy(d.GetBuffer(i), p, i); + d.ReleaseBuffer(i); + s += '\n'; + s += name; + s += ": "; + s += d; + } +} + +#define ADD_STRING(n, V) AddString(s, n, vol. V, sizeof(vol. V)) + +STDMETHODIMP CHandler::GetArchiveProperty(PROPID propID, PROPVARIANT *value) +{ + COM_TRY_BEGIN + NWindows::NCOM::CPropVariant prop; + const CVolumeDescriptor &vol = _archive.VolDescs[_archive.MainVolDescIndex]; + switch(propID) + { + case kpidComment: + { + AString s; + ADD_STRING("System", SystemId); + ADD_STRING("Volume", VolumeId); + ADD_STRING("VolumeSet", VolumeSetId); + ADD_STRING("Publisher", PublisherId); + ADD_STRING("Preparer", DataPreparerId); + ADD_STRING("Application", ApplicationId); + ADD_STRING("Copyright", CopyrightFileId); + ADD_STRING("Abstract", AbstractFileId); + ADD_STRING("Bib", BibFileId); + prop = s; + break; + } + case kpidCTime: { FILETIME utc; if (vol.CTime.GetFileTime(utc)) prop = utc; break; } + case kpidMTime: { FILETIME utc; if (vol.MTime.GetFileTime(utc)) prop = utc; break; } + // case kpidPhySize: break; + // case kpidHeadersSize: break; + case kpidError: if (_archive.IncorrectBigEndian) prop = "Incorrect big-endian headers"; break; + } + prop.Detach(value); + return S_OK; + COM_TRY_END +} + +STDMETHODIMP CHandler::GetProperty(UInt32 index, PROPID propID, PROPVARIANT *value) +{ + COM_TRY_BEGIN + NWindows::NCOM::CPropVariant prop; + if (index >= (UInt32)_archive.Refs.Size()) + { + index -= _archive.Refs.Size(); + const CBootInitialEntry &be = _archive.BootEntries[index]; + switch(propID) + { + case kpidPath: + { + // wchar_t name[32]; + // ConvertUInt64ToString(index + 1, name); + UString s = L"[BOOT]" WSTRING_PATH_SEPARATOR; + // s += name; + // s += L"-"; + s += be.GetName(); + prop = (const wchar_t *)s; + break; + } + case kpidIsDir: prop = false; break; + case kpidSize: + case kpidPackSize: + prop = (UInt64)_archive.GetBootItemSize(index); + break; + } + } + else + { + const CRef &ref = _archive.Refs[index]; + const CDir &item = ref.Dir->_subItems[ref.Index]; + switch(propID) + { + case kpidPath: + // if (item.FileId.GetCapacity() >= 0) + { + UString s; + if (_archive.IsJoliet()) + s = item.GetPathU(); + else + s = MultiByteToUnicodeString(item.GetPath(_archive.IsSusp, _archive.SuspSkipSize), CP_OEMCP); + + int pos = s.ReverseFind(L';'); + if (pos >= 0 && pos == s.Length() - 2) + if (s[s.Length() - 1] == L'1') + s = s.Left(pos); + if (!s.IsEmpty()) + if (s[s.Length() - 1] == L'.') + s = s.Left(s.Length() - 1); + prop = (const wchar_t *)NItemName::GetOSName2(s); + } + break; + case kpidIsDir: prop = item.IsDir(); break; + case kpidSize: + case kpidPackSize: + if (!item.IsDir()) + prop = (UInt64)item.DataLength; + break; + case kpidMTime: + { + FILETIME utc; + if (item.DateTime.GetFileTime(utc)) + prop = utc; + break; + } + } + } + prop.Detach(value); + return S_OK; + COM_TRY_END +} + +STDMETHODIMP CHandler::Extract(const UInt32 *indices, UInt32 numItems, + Int32 testMode, IArchiveExtractCallback *extractCallback) +{ + COM_TRY_BEGIN + bool allFilesMode = (numItems == (UInt32)-1); + if (allFilesMode) + numItems = _archive.Refs.Size(); + if (numItems == 0) + return S_OK; + UInt64 totalSize = 0; + UInt32 i; + for(i = 0; i < numItems; i++) + { + UInt32 index = (allFilesMode ? i : indices[i]); + if (index < (UInt32)_archive.Refs.Size()) + { + const CRef &ref = _archive.Refs[index]; + const CDir &item = ref.Dir->_subItems[ref.Index]; + totalSize += item.DataLength; + } + else + { + totalSize += _archive.GetBootItemSize(index - _archive.Refs.Size()); + } + } + extractCallback->SetTotal(totalSize); + + UInt64 currentTotalSize = 0; + UInt64 currentItemSize; + + NCompress::CCopyCoder *copyCoderSpec = new NCompress::CCopyCoder(); + CMyComPtr copyCoder = copyCoderSpec; + + CLocalProgress *lps = new CLocalProgress; + CMyComPtr progress = lps; + lps->Init(extractCallback, false); + + CLimitedSequentialInStream *streamSpec = new CLimitedSequentialInStream; + CMyComPtr inStream(streamSpec); + streamSpec->SetStream(_stream); + + CLimitedSequentialOutStream *outStreamSpec = new CLimitedSequentialOutStream; + CMyComPtr outStream(outStreamSpec); + + for (i = 0; i < numItems; i++, currentTotalSize += currentItemSize) + { + lps->InSize = lps->OutSize = currentTotalSize; + RINOK(lps->SetCur()); + currentItemSize = 0; + CMyComPtr realOutStream; + Int32 askMode = testMode ? + NExtract::NAskMode::kTest : + NExtract::NAskMode::kExtract; + UInt32 index = allFilesMode ? i : indices[i]; + + RINOK(extractCallback->GetStream(index, &realOutStream, askMode)); + + UInt64 blockIndex; + if (index < (UInt32)_archive.Refs.Size()) + { + const CRef &ref = _archive.Refs[index]; + const CDir &item = ref.Dir->_subItems[ref.Index]; + if (item.IsDir()) + { + RINOK(extractCallback->PrepareOperation(askMode)); + RINOK(extractCallback->SetOperationResult(NExtract::NOperationResult::kOK)); + continue; + } + currentItemSize = item.DataLength; + blockIndex = item.ExtentLocation; + } + else + { + int bootIndex = index - _archive.Refs.Size(); + const CBootInitialEntry &be = _archive.BootEntries[bootIndex]; + currentItemSize = _archive.GetBootItemSize(bootIndex); + blockIndex = be.LoadRBA; + } + + if (!testMode && !realOutStream) + continue; + RINOK(extractCallback->PrepareOperation(askMode)); + outStreamSpec->SetStream(realOutStream); + realOutStream.Release(); + outStreamSpec->Init(currentItemSize); + RINOK(_stream->Seek(blockIndex * _archive.BlockSize, STREAM_SEEK_SET, NULL)); + streamSpec->Init(currentItemSize); + RINOK(copyCoder->Code(inStream, outStream, NULL, NULL, progress)); + outStreamSpec->ReleaseStream(); + RINOK(extractCallback->SetOperationResult(outStreamSpec->IsFinishedOK() ? + NExtract::NOperationResult::kOK: + NExtract::NOperationResult::kDataError)); + } + return S_OK; + COM_TRY_END +} + +STDMETHODIMP CHandler::GetStream(UInt32 index, ISequentialInStream **stream) +{ + COM_TRY_BEGIN + *stream = 0; + UInt64 blockIndex; + UInt64 currentItemSize; + if (index < (UInt32)_archive.Refs.Size()) + { + const CRef &ref = _archive.Refs[index]; + const CDir &item = ref.Dir->_subItems[ref.Index]; + if (item.IsDir()) + return S_FALSE; + currentItemSize = item.DataLength; + blockIndex = item.ExtentLocation; + } + else + { + int bootIndex = index - _archive.Refs.Size(); + const CBootInitialEntry &be = _archive.BootEntries[bootIndex]; + currentItemSize = _archive.GetBootItemSize(bootIndex); + blockIndex = be.LoadRBA; + } + return CreateLimitedInStream(_stream, blockIndex * _archive.BlockSize, currentItemSize, stream); + COM_TRY_END +} + +}} diff --git a/CPP/7zip/Archive/Iso/IsoHandler.h b/CPP/7zip/Archive/Iso/IsoHandler.h new file mode 100644 index 0000000..1dcade8 --- /dev/null +++ b/CPP/7zip/Archive/Iso/IsoHandler.h @@ -0,0 +1,30 @@ +// IsoHandler.h + +#ifndef __ISO_HANDLER_H +#define __ISO_HANDLER_H + +#include "Common/MyCom.h" +#include "../IArchive.h" + +#include "IsoIn.h" +#include "IsoItem.h" + +namespace NArchive { +namespace NIso { + +class CHandler: + public IInArchive, + public IInArchiveGetStream, + public CMyUnknownImp +{ + CMyComPtr _stream; + CInArchive _archive; +public: + MY_UNKNOWN_IMP2(IInArchive, IInArchiveGetStream) + INTERFACE_IInArchive(;) + STDMETHOD(GetStream)(UInt32 index, ISequentialInStream **stream); +}; + +}} + +#endif diff --git a/CPP/7zip/Archive/Iso/IsoHeader.cpp b/CPP/7zip/Archive/Iso/IsoHeader.cpp new file mode 100644 index 0000000..b3e418b --- /dev/null +++ b/CPP/7zip/Archive/Iso/IsoHeader.cpp @@ -0,0 +1,21 @@ +// Archive/Iso/Header.h + +#include "StdAfx.h" + +#include "IsoHeader.h" + +namespace NArchive { +namespace NIso { + +const char *kElToritoSpec = "EL TORITO SPECIFICATION\0\0\0\0\0\0\0\0\0"; + +const wchar_t *kMediaTypes[5] = +{ + L"NoEmulation", + L"1.2M", + L"1.44M", + L"2.88M", + L"HardDisk" +}; + +}} diff --git a/CPP/7zip/Archive/Iso/IsoHeader.h b/CPP/7zip/Archive/Iso/IsoHeader.h new file mode 100644 index 0000000..9702d70 --- /dev/null +++ b/CPP/7zip/Archive/Iso/IsoHeader.h @@ -0,0 +1,61 @@ +// Archive/IsoHeader.h + +#ifndef __ARCHIVE_ISO_HEADER_H +#define __ARCHIVE_ISO_HEADER_H + +#include "Common/Types.h" + +namespace NArchive { +namespace NIso { + +namespace NVolDescType +{ + const Byte kBootRecord = 0; + const Byte kPrimaryVol = 1; + const Byte kSupplementaryVol = 2; + const Byte kVolParttition = 3; + const Byte kTerminator = 255; +} + +const Byte kVersion = 1; + +namespace NFileFlags +{ + const Byte kDirectory = 1 << 1; +} + +extern const char *kElToritoSpec; + +const UInt32 kStartPos = 0x8000; + +namespace NBootEntryId +{ + const Byte kValidationEntry = 1; + const Byte kInitialEntryNotBootable = 0; + const Byte kInitialEntryBootable = 0x88; +} + +namespace NBootPlatformId +{ + const Byte kX86 = 0; + const Byte kPowerPC = 1; + const Byte kMac = 2; +} + +const BYTE kBootMediaTypeMask = 0xF; + +namespace NBootMediaType +{ + const Byte kNoEmulation = 0; + const Byte k1d2Floppy = 1; + const Byte k1d44Floppy = 2; + const Byte k2d88Floppy = 3; + const Byte kHardDisk = 4; +} + +const int kNumBootMediaTypes = 5; +extern const wchar_t *kMediaTypes[]; + +}} + +#endif diff --git a/CPP/7zip/Archive/Iso/IsoIn.cpp b/CPP/7zip/Archive/Iso/IsoIn.cpp new file mode 100644 index 0000000..7ed618d --- /dev/null +++ b/CPP/7zip/Archive/Iso/IsoIn.cpp @@ -0,0 +1,453 @@ +// Archive/IsoIn.cpp + +#include "StdAfx.h" + +#include "IsoIn.h" + +#include "../../Common/StreamUtils.h" + +namespace NArchive { +namespace NIso { + +Byte CInArchive::ReadByte() +{ + if (m_BufferPos >= BlockSize) + m_BufferPos = 0; + if (m_BufferPos == 0) + { + size_t processedSize = BlockSize; + if (ReadStream(_stream, m_Buffer, &processedSize) != S_OK) + throw 1; + if (processedSize != BlockSize) + throw 1; + } + Byte b = m_Buffer[m_BufferPos++]; + _position++; + return b; +} + +void CInArchive::ReadBytes(Byte *data, UInt32 size) +{ + for (UInt32 i = 0; i < size; i++) + data[i] = ReadByte(); +} + +void CInArchive::Skip(size_t size) +{ + while (size-- != 0) + ReadByte(); +} + +void CInArchive::SkipZeros(size_t size) +{ + while (size-- != 0) + { + Byte b = ReadByte(); + if (b != 0) + throw 1; + } +} + +UInt16 CInArchive::ReadUInt16Spec() +{ + UInt16 value = 0; + for (int i = 0; i < 2; i++) + value |= ((UInt16)(ReadByte()) << (8 * i)); + return value; +} + + +UInt16 CInArchive::ReadUInt16() +{ + Byte b[4]; + ReadBytes(b, 4); + UInt32 value = 0; + for (int i = 0; i < 2; i++) + { + if (b[i] != b[3 - i]) + IncorrectBigEndian = true; + value |= ((UInt16)(b[i]) << (8 * i)); + } + return (UInt16)value; +} + +UInt32 CInArchive::ReadUInt32Le() +{ + UInt32 value = 0; + for (int i = 0; i < 4; i++) + value |= ((UInt32)(ReadByte()) << (8 * i)); + return value; +} + +UInt32 CInArchive::ReadUInt32Be() +{ + UInt32 value = 0; + for (int i = 0; i < 4; i++) + { + value <<= 8; + value |= ReadByte(); + } + return value; +} + +UInt32 CInArchive::ReadUInt32() +{ + Byte b[8]; + ReadBytes(b, 8); + UInt32 value = 0; + for (int i = 0; i < 4; i++) + { + if (b[i] != b[7 - i]) + throw 1; + value |= ((UInt32)(b[i]) << (8 * i)); + } + return value; +} + +UInt32 CInArchive::ReadDigits(int numDigits) +{ + UInt32 res = 0; + for (int i = 0; i < numDigits; i++) + { + Byte b = ReadByte(); + if (b < '0' || b > '9') + { + if (b == 0) // it's bug in some CD's + b = '0'; + else + throw 1; + } + UInt32 d = (UInt32)(b - '0'); + res *= 10; + res += d; + } + return res; +} + +void CInArchive::ReadDateTime(CDateTime &d) +{ + d.Year = (UInt16)ReadDigits(4); + d.Month = (Byte)ReadDigits(2); + d.Day = (Byte)ReadDigits(2); + d.Hour = (Byte)ReadDigits(2); + d.Minute = (Byte)ReadDigits(2); + d.Second = (Byte)ReadDigits(2); + d.Hundredths = (Byte)ReadDigits(2); + d.GmtOffset = (signed char)ReadByte(); +} + +void CInArchive::ReadBootRecordDescriptor(CBootRecordDescriptor &d) +{ + ReadBytes(d.BootSystemId, sizeof(d.BootSystemId)); + ReadBytes(d.BootId, sizeof(d.BootId)); + ReadBytes(d.BootSystemUse, sizeof(d.BootSystemUse)); +} + +void CInArchive::ReadRecordingDateTime(CRecordingDateTime &t) +{ + t.Year = ReadByte(); + t.Month = ReadByte(); + t.Day = ReadByte(); + t.Hour = ReadByte(); + t.Minute = ReadByte(); + t.Second = ReadByte(); + t.GmtOffset = (signed char)ReadByte(); +} + +void CInArchive::ReadDirRecord2(CDirRecord &r, Byte len) +{ + r.ExtendedAttributeRecordLen = ReadByte(); + if (r.ExtendedAttributeRecordLen != 0) + throw 1; + r.ExtentLocation = ReadUInt32(); + r.DataLength = ReadUInt32(); + ReadRecordingDateTime(r.DateTime); + r.FileFlags = ReadByte(); + r.FileUnitSize = ReadByte(); + r.InterleaveGapSize = ReadByte(); + r.VolSequenceNumber = ReadUInt16(); + Byte idLen = ReadByte(); + r.FileId.SetCapacity(idLen); + ReadBytes((Byte *)r.FileId, idLen); + int padSize = 1 - (idLen & 1); + + // SkipZeros(1 - (idLen & 1)); + Skip(1 - (idLen & 1)); // it's bug in some cd's. Must be zeros + + int curPos = 33 + idLen + padSize; + if (curPos > len) + throw 1; + int rem = len - curPos; + r.SystemUse.SetCapacity(rem); + ReadBytes((Byte *)r.SystemUse, rem); +} + +void CInArchive::ReadDirRecord(CDirRecord &r) +{ + Byte len = ReadByte(); + // Some CDs can have incorrect value len = 48 ('0') in VolumeDescriptor. + // But maybe we must use real "len" for other records. + len = 34; + ReadDirRecord2(r, len); +} + +void CInArchive::ReadVolumeDescriptor(CVolumeDescriptor &d) +{ + d.VolFlags = ReadByte(); + ReadBytes(d.SystemId, sizeof(d.SystemId)); + ReadBytes(d.VolumeId, sizeof(d.VolumeId)); + SkipZeros(8); + d.VolumeSpaceSize = ReadUInt32(); + ReadBytes(d.EscapeSequence, sizeof(d.EscapeSequence)); + d.VolumeSetSize = ReadUInt16(); + d.VolumeSequenceNumber = ReadUInt16(); + d.LogicalBlockSize = ReadUInt16(); + d.PathTableSize = ReadUInt32(); + d.LPathTableLocation = ReadUInt32Le(); + d.LOptionalPathTableLocation = ReadUInt32Le(); + d.MPathTableLocation = ReadUInt32Be(); + d.MOptionalPathTableLocation = ReadUInt32Be(); + ReadDirRecord(d.RootDirRecord); + ReadBytes(d.VolumeSetId, sizeof(d.VolumeSetId)); + ReadBytes(d.PublisherId, sizeof(d.PublisherId)); + ReadBytes(d.DataPreparerId, sizeof(d.DataPreparerId)); + ReadBytes(d.ApplicationId, sizeof(d.ApplicationId)); + ReadBytes(d.CopyrightFileId, sizeof(d.CopyrightFileId)); + ReadBytes(d.AbstractFileId, sizeof(d.AbstractFileId)); + ReadBytes(d.BibFileId, sizeof(d.BibFileId)); + ReadDateTime(d.CTime); + ReadDateTime(d.MTime); + ReadDateTime(d.ExpirationTime); + ReadDateTime(d.EffectiveTime); + d.FileStructureVersion = ReadByte(); // = 1 + SkipZeros(1); + ReadBytes(d.ApplicationUse, sizeof(d.ApplicationUse)); + SkipZeros(653); +} + +static const Byte kSig_CD001[5] = { 'C', 'D', '0', '0', '1' }; + +static const Byte kSig_NSR02[5] = { 'N', 'S', 'R', '0', '2' }; +static const Byte kSig_NSR03[5] = { 'N', 'S', 'R', '0', '3' }; +static const Byte kSig_BEA01[5] = { 'B', 'E', 'A', '0', '1' }; +static const Byte kSig_TEA01[5] = { 'T', 'E', 'A', '0', '1' }; + +static inline bool CheckSignature(const Byte *sig, const Byte *data) +{ + for (int i = 0; i < 5; i++) + if (sig[i] != data[i]) + return false; + return true; +} + +void CInArchive::SeekToBlock(UInt32 blockIndex) +{ + if (_stream->Seek((UInt64)blockIndex * VolDescs[MainVolDescIndex].LogicalBlockSize, STREAM_SEEK_SET, &_position) != S_OK) + throw 1; + m_BufferPos = 0; +} + +void CInArchive::ReadDir(CDir &d, int level) +{ + if (!d.IsDir()) + return; + SeekToBlock(d.ExtentLocation); + UInt64 startPos = _position; + + bool firstItem = true; + for (;;) + { + UInt64 offset = _position - startPos; + if (offset >= d.DataLength) + break; + Byte len = ReadByte(); + if (len == 0) + continue; + CDir subItem; + ReadDirRecord2(subItem, len); + if (firstItem && level == 0) + IsSusp = subItem.CheckSusp(SuspSkipSize); + + if (!subItem.IsSystemItem()) + d._subItems.Add(subItem); + + firstItem = false; + } + for (int i = 0; i < d._subItems.Size(); i++) + ReadDir(d._subItems[i], level + 1); +} + +void CInArchive::CreateRefs(CDir &d) +{ + if (!d.IsDir()) + return; + for (int i = 0; i < d._subItems.Size(); i++) + { + CRef ref; + CDir &subItem = d._subItems[i]; + subItem.Parent = &d; + ref.Dir = &d; + ref.Index = i; + Refs.Add(ref); + CreateRefs(subItem); + } +} + +void CInArchive::ReadBootInfo() +{ + if (!_bootIsDefined) + return; + if (memcmp(_bootDesc.BootSystemId, kElToritoSpec, sizeof(_bootDesc.BootSystemId)) != 0) + return; + + const Byte *p = (const Byte *)_bootDesc.BootSystemUse; + UInt32 blockIndex = p[0] | ((UInt32)p[1] << 8) | ((UInt32)p[2] << 16) | ((UInt32)p[3] << 24); + SeekToBlock(blockIndex); + Byte b = ReadByte(); + if (b != NBootEntryId::kValidationEntry) + return; + { + CBootValidationEntry e; + e.PlatformId = ReadByte(); + if (ReadUInt16Spec() != 0) + throw 1; + ReadBytes(e.Id, sizeof(e.Id)); + /* UInt16 checkSum = */ ReadUInt16Spec(); + if (ReadByte() != 0x55) + throw 1; + if (ReadByte() != 0xAA) + throw 1; + } + b = ReadByte(); + if (b == NBootEntryId::kInitialEntryBootable || b == NBootEntryId::kInitialEntryNotBootable) + { + CBootInitialEntry e; + e.Bootable = (b == NBootEntryId::kInitialEntryBootable); + e.BootMediaType = ReadByte(); + e.LoadSegment = ReadUInt16Spec(); + e.SystemType = ReadByte(); + if (ReadByte() != 0) + throw 1; + e.SectorCount = ReadUInt16Spec(); + e.LoadRBA = ReadUInt32Le(); + if (ReadByte() != 0) + throw 1; + BootEntries.Add(e); + } + else + return; +} + +HRESULT CInArchive::Open2() +{ + Clear(); + RINOK(_stream->Seek(kStartPos, STREAM_SEEK_CUR, &_position)); + + m_BufferPos = 0; + BlockSize = kBlockSize; + for (;;) + { + Byte sig[7]; + ReadBytes(sig, 7); + Byte ver = sig[6]; + if (!CheckSignature(kSig_CD001, sig + 1)) + { + return S_FALSE; + /* + if (sig[0] != 0 || ver != 1) + break; + if (CheckSignature(kSig_BEA01, sig + 1)) + { + } + else if (CheckSignature(kSig_TEA01, sig + 1)) + { + break; + } + else if (CheckSignature(kSig_NSR02, sig + 1)) + { + } + else + break; + SkipZeros(0x800 - 7); + continue; + */ + } + // version = 2 for ISO 9660:1999? + if (ver > 2) + throw S_FALSE; + + if (sig[0] == NVolDescType::kTerminator) + { + break; + // Skip(0x800 - 7); + // continue; + } + switch(sig[0]) + { + case NVolDescType::kBootRecord: + { + _bootIsDefined = true; + ReadBootRecordDescriptor(_bootDesc); + break; + } + case NVolDescType::kPrimaryVol: + case NVolDescType::kSupplementaryVol: + { + // some ISOs have two PrimaryVols. + CVolumeDescriptor vd; + ReadVolumeDescriptor(vd); + if (sig[0] == NVolDescType::kPrimaryVol) + { + // some burners write "Joliet" Escape Sequence to primary volume + memset(vd.EscapeSequence, 0, sizeof(vd.EscapeSequence)); + } + VolDescs.Add(vd); + break; + } + default: + break; + } + } + if (VolDescs.IsEmpty()) + return S_FALSE; + for (MainVolDescIndex = VolDescs.Size() - 1; MainVolDescIndex > 0; MainVolDescIndex--) + if (VolDescs[MainVolDescIndex].IsJoliet()) + break; + // MainVolDescIndex = 0; // to read primary volume + const CVolumeDescriptor &vd = VolDescs[MainVolDescIndex]; + if (vd.LogicalBlockSize != kBlockSize) + return S_FALSE; + (CDirRecord &)_rootDir = vd.RootDirRecord; + ReadDir(_rootDir, 0); + CreateRefs(_rootDir); + ReadBootInfo(); + return S_OK; +} + +HRESULT CInArchive::Open(IInStream *inStream) +{ + _stream = inStream; + UInt64 pos; + RINOK(_stream->Seek(0, STREAM_SEEK_CUR, &pos)); + RINOK(_stream->Seek(0, STREAM_SEEK_END, &_archiveSize)); + RINOK(_stream->Seek(pos, STREAM_SEEK_SET, &_position)); + HRESULT res = S_FALSE; + try { res = Open2(); } + catch(...) { Clear(); res = S_FALSE; } + _stream.Release(); + return res; +} + +void CInArchive::Clear() +{ + IncorrectBigEndian = false; + Refs.Clear(); + _rootDir.Clear(); + VolDescs.Clear(); + _bootIsDefined = false; + BootEntries.Clear(); + SuspSkipSize = 0; + IsSusp = false; +} + +}} diff --git a/CPP/7zip/Archive/Iso/IsoIn.h b/CPP/7zip/Archive/Iso/IsoIn.h new file mode 100644 index 0000000..f9c6f64 --- /dev/null +++ b/CPP/7zip/Archive/Iso/IsoIn.h @@ -0,0 +1,315 @@ +// Archive/IsoIn.h + +#ifndef __ARCHIVE_ISO_IN_H +#define __ARCHIVE_ISO_IN_H + +#include "Common/IntToString.h" +#include "Common/MyCom.h" + +#include "../../IStream.h" + +#include "IsoHeader.h" +#include "IsoItem.h" + +namespace NArchive { +namespace NIso { + +struct CDir: public CDirRecord +{ + CDir *Parent; + CObjectVector _subItems; + + void Clear() + { + Parent = 0; + _subItems.Clear(); + } + + int GetLength(bool checkSusp, int skipSize) const + { + int len = GetLengthCur(checkSusp, skipSize); + if (Parent != 0) + if (Parent->Parent != 0) + len += 1 + Parent->GetLength(checkSusp, skipSize); + return len; + } + + int GetLengthU() const + { + int len = (int)(FileId.GetCapacity() / 2); + if (Parent != 0) + if (Parent->Parent != 0) + len += 1 + Parent->GetLengthU(); + return len; + } + + AString GetPath(bool checkSusp, int skipSize) const + { + AString s; + int len = GetLength(checkSusp, skipSize); + char *p = s.GetBuffer(len + 1); + p += len; + *p = 0; + const CDir *cur = this; + for (;;) + { + int curLen = cur->GetLengthCur(checkSusp, skipSize); + p -= curLen; + memmove(p, (const char *)(const Byte *)cur->GetNameCur(checkSusp, skipSize), curLen); + cur = cur->Parent; + if (cur == 0) + break; + if (cur->Parent == 0) + break; + p--; + *p = CHAR_PATH_SEPARATOR; + } + s.ReleaseBuffer(); + return s; + } + + UString GetPathU() const + { + UString s; + int len = GetLengthU(); + wchar_t *p = s.GetBuffer(len + 1); + p += len; + *p = 0; + const CDir *cur = this; + for (;;) + { + int curLen = (int)(cur->FileId.GetCapacity() / 2); + p -= curLen; + for (int i = 0; i < curLen; i++) + { + Byte b0 = ((const Byte *)cur->FileId)[i * 2]; + Byte b1 = ((const Byte *)cur->FileId)[i * 2 + 1]; + p[i] = (wchar_t)(((wchar_t)b0 << 8) | b1); + } + cur = cur->Parent; + if (cur == 0) + break; + if (cur->Parent == 0) + break; + p--; + *p = WCHAR_PATH_SEPARATOR; + } + s.ReleaseBuffer(); + return s; + } +}; + +struct CDateTime +{ + UInt16 Year; + Byte Month; + Byte Day; + Byte Hour; + Byte Minute; + Byte Second; + Byte Hundredths; + signed char GmtOffset; // min intervals from -48 (West) to +52 (East) recorded. + bool NotSpecified() const { return Year == 0 && Month == 0 && Day == 0 && + Hour == 0 && Minute == 0 && Second == 0 && GmtOffset == 0; } + + bool GetFileTime(FILETIME &ft) const + { + UInt64 value; + bool res = NWindows::NTime::GetSecondsSince1601(Year, Month, Day, Hour, Minute, Second, value); + if (res) + { + value -= (UInt64)((Int64)GmtOffset * 15 * 60); + value *= 10000000; + } + ft.dwLowDateTime = (DWORD)value; + ft.dwHighDateTime = (DWORD)(value >> 32); + return res; + } +}; + +struct CBootRecordDescriptor +{ + Byte BootSystemId[32]; // a-characters + Byte BootId[32]; // a-characters + Byte BootSystemUse[1977]; +}; + +struct CBootValidationEntry +{ + Byte PlatformId; + Byte Id[24]; // to identify the manufacturer/developer of the CD-ROM. +}; + +struct CBootInitialEntry +{ + bool Bootable; + Byte BootMediaType; + UInt16 LoadSegment; + /* This is the load segment for the initial boot image. If this + value is 0 the system will use the traditional segment of 7C0. If this value + is non-zero the system will use the specified segment. This applies to x86 + architectures only. For "flat" model architectures (such as Motorola) this + is the address divided by 10. */ + Byte SystemType; // This must be a copy of byte 5 (System Type) from the + // Partition Table found in the boot image. + UInt16 SectorCount; // This is the number of virtual/emulated sectors the system + // will store at Load Segment during the initial boot procedure. + UInt32 LoadRBA; // This is the start address of the virtual disk. CD’s use + // Relative/Logical block addressing. + + UInt64 GetSize() const + { + // if (BootMediaType == NBootMediaType::k1d44Floppy) (1440 << 10); + return SectorCount * 512; + } + + UString GetName() const + { + UString s; + if (Bootable) + s += L"Bootable"; + else + s += L"NotBootable"; + s += L"_"; + if (BootMediaType >= kNumBootMediaTypes) + { + wchar_t name[16]; + ConvertUInt32ToString(BootMediaType, name); + s += name; + } + else + s += kMediaTypes[BootMediaType]; + s += L".img"; + return s; + } +}; + +struct CVolumeDescriptor +{ + Byte VolFlags; + Byte SystemId[32]; // a-characters. An identification of a system + // which can recognize and act upon the content of the Logical + // Sectors with logical Sector Numbers 0 to 15 of the volume. + Byte VolumeId[32]; // d-characters. An identification of the volume. + UInt32 VolumeSpaceSize; // the number of Logical Blocks in which the Volume Space of the volume is recorded + Byte EscapeSequence[32]; + UInt16 VolumeSetSize; + UInt16 VolumeSequenceNumber; // the ordinal number of the volume in the Volume Set of which the volume is a member. + UInt16 LogicalBlockSize; + UInt32 PathTableSize; + UInt32 LPathTableLocation; + UInt32 LOptionalPathTableLocation; + UInt32 MPathTableLocation; + UInt32 MOptionalPathTableLocation; + CDirRecord RootDirRecord; + Byte VolumeSetId[128]; + Byte PublisherId[128]; + Byte DataPreparerId[128]; + Byte ApplicationId[128]; + Byte CopyrightFileId[37]; + Byte AbstractFileId[37]; + Byte BibFileId[37]; + CDateTime CTime; + CDateTime MTime; + CDateTime ExpirationTime; + CDateTime EffectiveTime; + Byte FileStructureVersion; // = 1; + Byte ApplicationUse[512]; + + bool IsJoliet() const + { + if ((VolFlags & 1) != 0) + return false; + Byte b = EscapeSequence[2]; + return (EscapeSequence[0] == 0x25 && EscapeSequence[1] == 0x2F && + (b == 0x40 || b == 0x43 || b == 0x45)); + } +}; + +struct CRef +{ + CDir *Dir; + UInt32 Index; +}; + +const UInt32 kBlockSize = 1 << 11; + +class CInArchive +{ + CMyComPtr _stream; + UInt64 _position; + + Byte m_Buffer[kBlockSize]; + UInt32 m_BufferPos; + + CDir _rootDir; + bool _bootIsDefined; + CBootRecordDescriptor _bootDesc; + + void Skip(size_t size); + void SkipZeros(size_t size); + Byte ReadByte(); + void ReadBytes(Byte *data, UInt32 size); + UInt16 ReadUInt16Spec(); + UInt16 ReadUInt16(); + UInt32 ReadUInt32Le(); + UInt32 ReadUInt32Be(); + UInt32 ReadUInt32(); + UInt64 ReadUInt64(); + UInt32 ReadDigits(int numDigits); + void ReadDateTime(CDateTime &d); + void ReadRecordingDateTime(CRecordingDateTime &t); + void ReadDirRecord2(CDirRecord &r, Byte len); + void ReadDirRecord(CDirRecord &r); + + void ReadBootRecordDescriptor(CBootRecordDescriptor &d); + void ReadVolumeDescriptor(CVolumeDescriptor &d); + + void SeekToBlock(UInt32 blockIndex); + void ReadDir(CDir &d, int level); + void CreateRefs(CDir &d); + + void ReadBootInfo(); + HRESULT Open2(); +public: + HRESULT Open(IInStream *inStream); + void Clear(); + + UInt64 _archiveSize; + + CRecordVector Refs; + CObjectVector VolDescs; + int MainVolDescIndex; + UInt32 BlockSize; + CObjectVector BootEntries; + bool IncorrectBigEndian; + + + bool IsJoliet() const { return VolDescs[MainVolDescIndex].IsJoliet(); } + + UInt64 GetBootItemSize(int index) const + { + const CBootInitialEntry &be = BootEntries[index]; + UInt64 size = be.GetSize(); + if (be.BootMediaType == NBootMediaType::k1d2Floppy) + size = (1200 << 10); + else if (be.BootMediaType == NBootMediaType::k1d44Floppy) + size = (1440 << 10); + else if (be.BootMediaType == NBootMediaType::k2d88Floppy) + size = (2880 << 10); + UInt64 startPos = be.LoadRBA * BlockSize; + if (startPos < _archiveSize) + { + if (_archiveSize - startPos < size) + size = _archiveSize - startPos; + } + return size; + } + + bool IsSusp; + int SuspSkipSize; +}; + +}} + +#endif diff --git a/CPP/7zip/Archive/Iso/IsoItem.h b/CPP/7zip/Archive/Iso/IsoItem.h new file mode 100644 index 0000000..f39c2f5 --- /dev/null +++ b/CPP/7zip/Archive/Iso/IsoItem.h @@ -0,0 +1,141 @@ +// Archive/IsoItem.h + +#ifndef __ARCHIVE_ISO_ITEM_H +#define __ARCHIVE_ISO_ITEM_H + +#include "Common/Types.h" +#include "Common/MyString.h" +#include "Common/Buffer.h" + +#include "Windows/Time.h" + +#include "IsoHeader.h" + +namespace NArchive { +namespace NIso { + +struct CRecordingDateTime +{ + Byte Year; + Byte Month; + Byte Day; + Byte Hour; + Byte Minute; + Byte Second; + signed char GmtOffset; // min intervals from -48 (West) to +52 (East) recorded. + + bool GetFileTime(FILETIME &ft) const + { + UInt64 value; + bool res = NWindows::NTime::GetSecondsSince1601(Year + 1900, Month, Day, Hour, Minute, Second, value); + if (res) + { + value -= (UInt64)((Int64)GmtOffset * 15 * 60); + value *= 10000000; + } + ft.dwLowDateTime = (DWORD)value; + ft.dwHighDateTime = (DWORD)(value >> 32); + return res; + } +}; + +struct CDirRecord +{ + Byte ExtendedAttributeRecordLen; + UInt32 ExtentLocation; + UInt32 DataLength; + CRecordingDateTime DateTime; + Byte FileFlags; + Byte FileUnitSize; + Byte InterleaveGapSize; + UInt16 VolSequenceNumber; + CByteBuffer FileId; + CByteBuffer SystemUse; + + bool IsDir() const { return (FileFlags & NFileFlags::kDirectory) != 0; } + bool IsSystemItem() const + { + if (FileId.GetCapacity() != 1) + return false; + Byte b = *(const Byte *)FileId; + return (b == 0 || b == 1); + } + + const Byte* FindSuspName(int skipSize, int &lenRes) const + { + lenRes = 0; + const Byte *p = (const Byte *)SystemUse + skipSize; + int length = (int)(SystemUse.GetCapacity() - skipSize); + while (length >= 5) + { + int len = p[2]; + if (p[0] == 'N' && p[1] == 'M' && p[3] == 1) + { + lenRes = len - 5; + return p + 5; + } + p += len; + length -= len; + } + return 0; + } + + int GetLengthCur(bool checkSusp, int skipSize) const + { + if (checkSusp) + { + int len; + const Byte *res = FindSuspName(skipSize, len); + if (res != 0) + return len; + } + return (int)FileId.GetCapacity(); + } + + const Byte* GetNameCur(bool checkSusp, int skipSize) const + { + if (checkSusp) + { + int len; + const Byte *res = FindSuspName(skipSize, len); + if (res != 0) + return res; + } + return (const Byte *)FileId; + } + + + bool CheckSusp(const Byte *p, int &startPos) const + { + if (p[0] == 'S' && + p[1] == 'P' && + p[2] == 0x7 && + p[3] == 0x1 && + p[4] == 0xBE && + p[5] == 0xEF) + { + startPos = p[6]; + return true; + } + return false; + } + + bool CheckSusp(int &startPos) const + { + const Byte *p = (const Byte *)SystemUse; + int length = (int)SystemUse.GetCapacity(); + const int kMinLen = 7; + if (length < kMinLen) + return false; + if (CheckSusp(p, startPos)) + return true; + const int kOffset2 = 14; + if (length < kOffset2 + kMinLen) + return false; + return CheckSusp(p + kOffset2, startPos); + } +}; + +}} + +#endif diff --git a/CPP/7zip/Archive/Iso/IsoRegister.cpp b/CPP/7zip/Archive/Iso/IsoRegister.cpp new file mode 100644 index 0000000..67a09c7 --- /dev/null +++ b/CPP/7zip/Archive/Iso/IsoRegister.cpp @@ -0,0 +1,13 @@ +// IsoRegister.cpp + +#include "StdAfx.h" + +#include "../../Common/RegisterArc.h" + +#include "IsoHandler.h" +static IInArchive *CreateArc() { return new NArchive::NIso::CHandler; } + +static CArcInfo g_ArcInfo = + { L"Iso", L"iso img", 0, 0xE7, { 'C', 'D', '0', '0', '1', 0x1 }, 7, false, CreateArc, 0 }; + +REGISTER_ARC(Iso) diff --git a/CPP/7zip/Archive/LzhHandler.cpp b/CPP/7zip/Archive/LzhHandler.cpp new file mode 100644 index 0000000..2c4eb90 --- /dev/null +++ b/CPP/7zip/Archive/LzhHandler.cpp @@ -0,0 +1,775 @@ +// LzhHandler.cpp + +#include "StdAfx.h" + +#include "../../../C/CpuArch.h" + +#include "Common/Buffer.h" +#include "Common/ComTry.h" +#include "Common/StringConvert.h" + +#include "Windows/PropVariant.h" +#include "Windows/Time.h" + +#include "../ICoder.h" + +#include "../Common/LimitedStreams.h" +#include "../Common/ProgressUtils.h" +#include "../Common/RegisterArc.h" +#include "../Common/StreamUtils.h" + +#include "../Compress/CopyCoder.h" +#include "../Compress/LzhDecoder.h" + +#include "IArchive.h" + +#include "Common/ItemNameUtils.h" + +using namespace NWindows; +using namespace NTime; + +#define Get16(p) GetUi16(p) +#define Get32(p) GetUi32(p) + +namespace NArchive { +namespace NLzh{ + +const int kMethodIdSize = 5; + +const Byte kExtIdFileName = 0x01; +const Byte kExtIdDirName = 0x02; +const Byte kExtIdUnixTime = 0x54; + +struct CExtension +{ + Byte Type; + CByteBuffer Data; + AString GetString() const + { + AString s; + for (size_t i = 0; i < Data.GetCapacity(); i++) + { + char c = (char)Data[i]; + if (c == 0) + break; + s += c; + } + return s; + } +}; + +struct CItem +{ + AString Name; + Byte Method[kMethodIdSize]; + Byte Attributes; + Byte Level; + Byte OsId; + UInt32 PackSize; + UInt32 Size; + UInt32 ModifiedTime; + UInt16 CRC; + CObjectVector Extensions; + + bool IsValidMethod() const { return (Method[0] == '-' && Method[1] == 'l' && Method[4] == '-'); } + bool IsLhMethod() const {return (IsValidMethod() && Method[2] == 'h'); } + bool IsDir() const {return (IsLhMethod() && Method[3] == 'd'); } + + bool IsCopyMethod() const + { + return (IsLhMethod() && Method[3] == '0') || + (IsValidMethod() && Method[2] == 'z' && Method[3] == '4'); + } + + bool IsLh1GroupMethod() const + { + if (!IsLhMethod()) + return false; + switch(Method[3]) + { + case '1': + return true; + } + return false; + } + + bool IsLh4GroupMethod() const + { + if (!IsLhMethod()) + return false; + switch(Method[3]) + { + case '4': + case '5': + case '6': + case '7': + return true; + } + return false; + } + + int GetNumDictBits() const + { + if (!IsLhMethod()) + return 0; + switch(Method[3]) + { + case '1': return 12; + case '2': return 13; + case '3': return 13; + case '4': return 12; + case '5': return 13; + case '6': return 15; + case '7': return 16; + } + return 0; + } + + int FindExt(Byte type) const + { + for (int i = 0; i < Extensions.Size(); i++) + if (Extensions[i].Type == type) + return i; + return -1; + } + bool GetUnixTime(UInt32 &value) const + { + int index = FindExt(kExtIdUnixTime); + if (index < 0) + { + if (Level == 2) + { + value = ModifiedTime; + return true; + } + return false; + } + const Byte *data = (const Byte *)(Extensions[index].Data); + value = GetUi32(data); + return true; + } + + AString GetDirName() const + { + int index = FindExt(kExtIdDirName); + if (index < 0) + return AString(); + return Extensions[index].GetString(); + } + + AString GetFileName() const + { + int index = FindExt(kExtIdFileName); + if (index < 0) + return Name; + return Extensions[index].GetString(); + } + + AString GetName() const + { + AString dirName = GetDirName(); + const char kDirSeparator = CHAR_PATH_SEPARATOR; // '\\'; + // check kDirSeparator in Linux + dirName.Replace((char)(unsigned char)0xFF, kDirSeparator); + if (!dirName.IsEmpty() && dirName.Back() != kDirSeparator) + dirName += kDirSeparator; + return dirName + GetFileName(); + } +}; + +struct CItemEx: public CItem +{ + UInt64 DataPosition; +}; + +class CInArchive +{ + CMyComPtr m_Stream; + UInt64 m_Position; + + HRESULT ReadBytes(void *data, UInt32 size, UInt32 &processedSize); + HRESULT CheckReadBytes(void *data, UInt32 size); +public: + HRESULT Open(IInStream *inStream); + HRESULT GetNextItem(bool &filled, CItemEx &itemInfo); + HRESULT Skip(UInt64 numBytes); +}; + +HRESULT CInArchive::ReadBytes(void *data, UInt32 size, UInt32 &processedSize) +{ + size_t realProcessedSize = size; + RINOK(ReadStream(m_Stream, data, &realProcessedSize)); + processedSize = (UInt32)realProcessedSize; + m_Position += processedSize; + return S_OK; +} + +HRESULT CInArchive::CheckReadBytes(void *data, UInt32 size) +{ + UInt32 processedSize; + RINOK(ReadBytes(data, size, processedSize)); + return (processedSize == size) ? S_OK: S_FALSE; +} + +HRESULT CInArchive::Open(IInStream *inStream) +{ + RINOK(inStream->Seek(0, STREAM_SEEK_CUR, &m_Position)); + m_Stream = inStream; + return S_OK; +} + +static const Byte *ReadUInt16(const Byte *p, UInt16 &v) +{ + v = Get16(p); + return p + 2; +} + +static const Byte *ReadString(const Byte *p, size_t size, AString &s) +{ + s.Empty(); + for (size_t i = 0; i < size; i++) + { + char c = p[i]; + if (c == 0) + break; + s += c; + } + return p + size; +} + +static Byte CalcSum(const Byte *data, size_t size) +{ + Byte sum = 0; + for (size_t i = 0; i < size; i++) + sum = (Byte)(sum + data[i]); + return sum; +} + +HRESULT CInArchive::GetNextItem(bool &filled, CItemEx &item) +{ + filled = false; + + UInt32 processedSize; + Byte startHeader[2]; + RINOK(ReadBytes(startHeader, 2, processedSize)) + if (processedSize == 0) + return S_OK; + if (processedSize == 1) + return (startHeader[0] == 0) ? S_OK: S_FALSE; + if (startHeader[0] == 0 && startHeader[1] == 0) + return S_OK; + + Byte header[256]; + const UInt32 kBasicPartSize = 22; + RINOK(ReadBytes(header, kBasicPartSize, processedSize)); + if (processedSize != kBasicPartSize) + return (startHeader[0] == 0) ? S_OK: S_FALSE; + + const Byte *p = header; + memcpy(item.Method, p, kMethodIdSize); + if (!item.IsValidMethod()) + return S_OK; + p += kMethodIdSize; + item.PackSize = Get32(p); + item.Size = Get32(p + 4); + item.ModifiedTime = Get32(p + 8); + item.Attributes = p[12]; + item.Level = p[13]; + p += 14; + if (item.Level > 2) + return S_FALSE; + UInt32 headerSize; + if (item.Level < 2) + { + headerSize = startHeader[0]; + if (headerSize < kBasicPartSize) + return S_FALSE; + UInt32 remain = headerSize - kBasicPartSize; + RINOK(CheckReadBytes(header + kBasicPartSize, remain)); + if (startHeader[1] != CalcSum(header, headerSize)) + return S_FALSE; + size_t nameLength = *p++; + if ((p - header) + nameLength + 2 > headerSize) + return S_FALSE; + p = ReadString(p, nameLength, item.Name); + } + else + headerSize = startHeader[0] | ((UInt32)startHeader[1] << 8); + p = ReadUInt16(p, item.CRC); + if (item.Level != 0) + { + if (item.Level == 2) + { + RINOK(CheckReadBytes(header + kBasicPartSize, 2)); + } + if ((size_t)(p - header) + 3 > headerSize) + return S_FALSE; + item.OsId = *p++; + UInt16 nextSize; + p = ReadUInt16(p, nextSize); + while (nextSize != 0) + { + if (nextSize < 3) + return S_FALSE; + if (item.Level == 1) + { + if (item.PackSize < nextSize) + return S_FALSE; + item.PackSize -= nextSize; + } + CExtension ext; + RINOK(CheckReadBytes(&ext.Type, 1)) + nextSize -= 3; + ext.Data.SetCapacity(nextSize); + RINOK(CheckReadBytes((Byte *)ext.Data, nextSize)) + item.Extensions.Add(ext); + Byte hdr2[2]; + RINOK(CheckReadBytes(hdr2, 2)); + ReadUInt16(hdr2, nextSize); + } + } + item.DataPosition = m_Position; + filled = true; + return S_OK; +} + +HRESULT CInArchive::Skip(UInt64 numBytes) +{ + UInt64 newPostion; + RINOK(m_Stream->Seek(numBytes, STREAM_SEEK_CUR, &newPostion)); + m_Position += numBytes; + if (m_Position != newPostion) + return E_FAIL; + return S_OK; +} + +struct COsPair +{ + Byte Id; + const char *Name; +}; + +static COsPair g_OsPairs[] = +{ + { 0, "MS-DOS" }, + { 'M', "MS-DOS" }, + { '2', "OS/2" }, + { '9', "OS9" }, + { 'K', "OS/68K" }, + { '3', "OS/386" }, + { 'H', "HUMAN" }, + { 'U', "UNIX" }, + { 'C', "CP/M" }, + { 'F', "FLEX" }, + { 'm', "Mac" }, + { 'R', "Runser" }, + { 'T', "TownsOS" }, + { 'X', "XOSK" }, + { 'w', "Windows 95" }, + { 'W', "Windows NT" }, + { 'J', "Java VM" } +}; + +static const char *kUnknownOS = "Unknown"; + +static const char *GetOS(Byte osId) +{ + for (int i = 0; i < sizeof(g_OsPairs) / sizeof(g_OsPairs[0]); i++) + if (g_OsPairs[i].Id == osId) + return g_OsPairs[i].Name; + return kUnknownOS; +} + +static STATPROPSTG kProps[] = +{ + { NULL, kpidPath, VT_BSTR}, + { NULL, kpidIsDir, VT_BOOL}, + { NULL, kpidSize, VT_UI8}, + { NULL, kpidPackSize, VT_UI8}, + { NULL, kpidMTime, VT_FILETIME}, + // { NULL, kpidAttrib, VT_UI4}, + { NULL, kpidCRC, VT_UI4}, + { NULL, kpidMethod, VT_BSTR}, + { NULL, kpidHostOS, VT_BSTR} +}; + +class CCRC +{ + UInt16 _value; +public: + static UInt16 Table[256]; + static void InitTable(); + + CCRC(): _value(0) {} + void Init() { _value = 0; } + void Update(const void *data, size_t size); + UInt16 GetDigest() const { return _value; } +}; + +static const UInt16 kCRCPoly = 0xA001; + +UInt16 CCRC::Table[256]; + +void CCRC::InitTable() +{ + for (UInt32 i = 0; i < 256; i++) + { + UInt32 r = i; + for (int j = 0; j < 8; j++) + if (r & 1) + r = (r >> 1) ^ kCRCPoly; + else + r >>= 1; + CCRC::Table[i] = (UInt16)r; + } +} + +class CCRCTableInit +{ +public: + CCRCTableInit() { CCRC::InitTable(); } +} g_CRCTableInit; + +void CCRC::Update(const void *data, size_t size) +{ + UInt16 v = _value; + const Byte *p = (const Byte *)data; + for (; size > 0; size--, p++) + v = (UInt16)(Table[((Byte)(v)) ^ *p] ^ (v >> 8)); + _value = v; +} + + +class COutStreamWithCRC: + public ISequentialOutStream, + public CMyUnknownImp +{ +public: + MY_UNKNOWN_IMP + + STDMETHOD(Write)(const void *data, UInt32 size, UInt32 *processedSize); +private: + CCRC _crc; + CMyComPtr _stream; +public: + void Init(ISequentialOutStream *stream) + { + _stream = stream; + _crc.Init(); + } + void ReleaseStream() { _stream.Release(); } + UInt32 GetCRC() const { return _crc.GetDigest(); } + void InitCRC() { _crc.Init(); } +}; + +STDMETHODIMP COutStreamWithCRC::Write(const void *data, UInt32 size, UInt32 *processedSize) +{ + UInt32 realProcessedSize; + HRESULT result; + if (!_stream) + { + realProcessedSize = size; + result = S_OK; + } + else + result = _stream->Write(data, size, &realProcessedSize); + _crc.Update(data, realProcessedSize); + if (processedSize != NULL) + *processedSize = realProcessedSize; + return result; +} + +class CHandler: + public IInArchive, + public CMyUnknownImp +{ + CObjectVector _items; + CMyComPtr _stream; +public: + MY_UNKNOWN_IMP1(IInArchive) + INTERFACE_IInArchive(;) + CHandler(); +}; + +IMP_IInArchive_Props +IMP_IInArchive_ArcProps_NO + +CHandler::CHandler() {} + +STDMETHODIMP CHandler::GetNumberOfItems(UInt32 *numItems) +{ + *numItems = _items.Size(); + return S_OK; +} + +STDMETHODIMP CHandler::GetProperty(UInt32 index, PROPID propID, PROPVARIANT *value) +{ + COM_TRY_BEGIN + NWindows::NCOM::CPropVariant prop; + const CItemEx &item = _items[index]; + switch(propID) + { + case kpidPath: + { + UString s = NItemName::WinNameToOSName(MultiByteToUnicodeString(item.GetName(), CP_OEMCP)); + if (!s.IsEmpty()) + { + if (s[s.Length() - 1] == WCHAR_PATH_SEPARATOR) + s.Delete(s.Length() - 1); + prop = s; + } + break; + } + case kpidIsDir: prop = item.IsDir(); break; + case kpidSize: prop = item.Size; break; + case kpidPackSize: prop = item.PackSize; break; + case kpidCRC: prop = (UInt32)item.CRC; break; + case kpidHostOS: prop = GetOS(item.OsId); break; + case kpidMTime: + { + FILETIME utc; + UInt32 unixTime; + if (item.GetUnixTime(unixTime)) + NTime::UnixTimeToFileTime(unixTime, utc); + else + { + FILETIME localFileTime; + if (DosTimeToFileTime(item.ModifiedTime, localFileTime)) + { + if (!LocalFileTimeToFileTime(&localFileTime, &utc)) + utc.dwHighDateTime = utc.dwLowDateTime = 0; + } + else + utc.dwHighDateTime = utc.dwLowDateTime = 0; + } + prop = utc; + break; + } + // case kpidAttrib: prop = (UInt32)item.Attributes; break; + case kpidMethod: + { + char method2[kMethodIdSize + 1]; + method2[kMethodIdSize] = 0; + memcpy(method2, item.Method, kMethodIdSize); + prop = method2; + break; + } + } + prop.Detach(value); + return S_OK; + COM_TRY_END +} + +STDMETHODIMP CHandler::Open(IInStream *stream, + const UInt64 * /* maxCheckStartPosition */, IArchiveOpenCallback *callback) +{ + COM_TRY_BEGIN + try + { + _items.Clear(); + CInArchive archive; + + UInt64 endPos = 0; + bool needSetTotal = true; + + if (callback != NULL) + { + RINOK(stream->Seek(0, STREAM_SEEK_END, &endPos)); + RINOK(stream->Seek(0, STREAM_SEEK_SET, NULL)); + } + + RINOK(archive.Open(stream)); + for (;;) + { + CItemEx item; + bool filled; + HRESULT result = archive.GetNextItem(filled, item); + if (result == S_FALSE) + return S_FALSE; + if (result != S_OK) + return S_FALSE; + if (!filled) + break; + _items.Add(item); + archive.Skip(item.PackSize); + if (callback != NULL) + { + if (needSetTotal) + { + RINOK(callback->SetTotal(NULL, &endPos)); + needSetTotal = false; + } + if (_items.Size() % 100 == 0) + { + UInt64 numFiles = _items.Size(); + UInt64 numBytes = item.DataPosition; + RINOK(callback->SetCompleted(&numFiles, &numBytes)); + } + } + } + if (_items.IsEmpty()) + return S_FALSE; + + _stream = stream; + } + catch(...) + { + return S_FALSE; + } + COM_TRY_END + return S_OK; +} + +STDMETHODIMP CHandler::Close() +{ + _items.Clear(); + _stream.Release(); + return S_OK; +} + +STDMETHODIMP CHandler::Extract(const UInt32 *indices, UInt32 numItems, + Int32 testModeSpec, IArchiveExtractCallback *extractCallback) +{ + COM_TRY_BEGIN + bool testMode = (testModeSpec != 0); + UInt64 totalUnPacked = 0, totalPacked = 0; + bool allFilesMode = (numItems == (UInt32)-1); + if (allFilesMode) + numItems = _items.Size(); + if (numItems == 0) + return S_OK; + UInt32 i; + for (i = 0; i < numItems; i++) + { + const CItemEx &item = _items[allFilesMode ? i : indices[i]]; + totalUnPacked += item.Size; + totalPacked += item.PackSize; + } + RINOK(extractCallback->SetTotal(totalUnPacked)); + + UInt64 currentTotalUnPacked = 0, currentTotalPacked = 0; + UInt64 currentItemUnPacked, currentItemPacked; + + NCompress::NLzh::NDecoder::CCoder *lzhDecoderSpec = 0; + CMyComPtr lzhDecoder; + CMyComPtr lzh1Decoder; + CMyComPtr arj2Decoder; + + NCompress::CCopyCoder *copyCoderSpec = new NCompress::CCopyCoder(); + CMyComPtr copyCoder = copyCoderSpec; + + CLocalProgress *lps = new CLocalProgress; + CMyComPtr progress = lps; + lps->Init(extractCallback, false); + + CLimitedSequentialInStream *streamSpec = new CLimitedSequentialInStream; + CMyComPtr inStream(streamSpec); + streamSpec->SetStream(_stream); + + for (i = 0; i < numItems; i++, currentTotalUnPacked += currentItemUnPacked, + currentTotalPacked += currentItemPacked) + { + currentItemUnPacked = 0; + currentItemPacked = 0; + + lps->InSize = currentTotalPacked; + lps->OutSize = currentTotalUnPacked; + RINOK(lps->SetCur()); + + CMyComPtr realOutStream; + Int32 askMode; + askMode = testMode ? NExtract::NAskMode::kTest : + NExtract::NAskMode::kExtract; + Int32 index = allFilesMode ? i : indices[i]; + const CItemEx &item = _items[index]; + RINOK(extractCallback->GetStream(index, &realOutStream, askMode)); + + if (item.IsDir()) + { + // if (!testMode) + { + RINOK(extractCallback->PrepareOperation(askMode)); + RINOK(extractCallback->SetOperationResult(NExtract::NOperationResult::kOK)); + } + continue; + } + + if (!testMode && !realOutStream) + continue; + + RINOK(extractCallback->PrepareOperation(askMode)); + currentItemUnPacked = item.Size; + currentItemPacked = item.PackSize; + + { + COutStreamWithCRC *outStreamSpec = new COutStreamWithCRC; + CMyComPtr outStream(outStreamSpec); + outStreamSpec->Init(realOutStream); + realOutStream.Release(); + + UInt64 pos; + _stream->Seek(item.DataPosition, STREAM_SEEK_SET, &pos); + + streamSpec->Init(item.PackSize); + + HRESULT result = S_OK; + Int32 opRes = NExtract::NOperationResult::kOK; + + if (item.IsCopyMethod()) + { + result = copyCoder->Code(inStream, outStream, NULL, NULL, progress); + if (result == S_OK && copyCoderSpec->TotalSize != item.PackSize) + result = S_FALSE; + } + else if (item.IsLh4GroupMethod()) + { + if (!lzhDecoder) + { + lzhDecoderSpec = new NCompress::NLzh::NDecoder::CCoder; + lzhDecoder = lzhDecoderSpec; + } + lzhDecoderSpec->SetDictionary(item.GetNumDictBits()); + result = lzhDecoder->Code(inStream, outStream, NULL, ¤tItemUnPacked, progress); + } + /* + else if (item.IsLh1GroupMethod()) + { + if (!lzh1Decoder) + { + lzh1DecoderSpec = new NCompress::NLzh1::NDecoder::CCoder; + lzh1Decoder = lzh1DecoderSpec; + } + lzh1DecoderSpec->SetDictionary(item.GetNumDictBits()); + result = lzh1Decoder->Code(inStream, outStream, NULL, ¤tItemUnPacked, progress); + } + */ + else + opRes = NExtract::NOperationResult::kUnSupportedMethod; + + if (opRes == NExtract::NOperationResult::kOK) + { + if (result == S_FALSE) + opRes = NExtract::NOperationResult::kDataError; + else + { + RINOK(result); + if (outStreamSpec->GetCRC() != item.CRC) + opRes = NExtract::NOperationResult::kCRCError; + } + } + outStream.Release(); + RINOK(extractCallback->SetOperationResult(opRes)); + } + } + return S_OK; + COM_TRY_END +} + +static IInArchive *CreateArc() { return new CHandler; } + +static CArcInfo g_ArcInfo = + { L"Lzh", L"lzh lha", 0, 6, { '-', 'l' }, 2, false, CreateArc, 0 }; + +REGISTER_ARC(Lzh) + +}} diff --git a/CPP/7zip/Archive/LzmaHandler.cpp b/CPP/7zip/Archive/LzmaHandler.cpp new file mode 100644 index 0000000..a83e6a1 --- /dev/null +++ b/CPP/7zip/Archive/LzmaHandler.cpp @@ -0,0 +1,430 @@ +// LzmaHandler.cpp + +#include "StdAfx.h" + +#include "../../../C/CpuArch.h" + +#include "Common/ComTry.h" +#include "Common/IntToString.h" + +#include "Windows/PropVariant.h" + +#include "../Common/CreateCoder.h" +#include "../Common/ProgressUtils.h" +#include "../Common/RegisterArc.h" +#include "../Common/StreamUtils.h" + +#include "../Compress/LzmaDecoder.h" + +#include "Common/DummyOutStream.h" + +using namespace NWindows; + +namespace NArchive { +namespace NLzma { + +static bool CheckDicSize(const Byte *p) +{ + UInt32 dicSize = GetUi32(p); + for (int i = 1; i <= 30; i++) + if (dicSize == ((UInt32)2 << i) || dicSize == ((UInt32)3 << i)) + return true; + return (dicSize == 0xFFFFFFFF); +} + +STATPROPSTG kProps[] = +{ + { NULL, kpidSize, VT_UI8}, + { NULL, kpidPackSize, VT_UI8}, + { NULL, kpidMethod, VT_BSTR} +}; + +struct CHeader +{ + UInt64 Size; + Byte FilterID; + Byte LzmaProps[5]; + + UInt32 GetDicSize() const { return GetUi32(LzmaProps + 1); } + bool HasSize() const { return (Size != (UInt64)(Int64)-1); } + bool Parse(const Byte *buf, bool isThereFilter); +}; + +bool CHeader::Parse(const Byte *buf, bool isThereFilter) +{ + FilterID = 0; + if (isThereFilter) + FilterID = buf[0]; + const Byte *sig = buf + (isThereFilter ? 1 : 0); + for (int i = 0; i < 5; i++) + LzmaProps[i] = sig[i]; + Size = GetUi64(sig + 5); + return + LzmaProps[0] < 5 * 5 * 9 && + FilterID < 2 && + (!HasSize() || Size < ((UInt64)1 << 56)) && + CheckDicSize(LzmaProps + 1); +} + +class CDecoder +{ + NCompress::NLzma::CDecoder *_lzmaDecoderSpec; + CMyComPtr _lzmaDecoder; + CMyComPtr _bcjStream; +public: + ~CDecoder(); + HRESULT Create(DECL_EXTERNAL_CODECS_LOC_VARS + bool filtered, ISequentialInStream *inStream); + + HRESULT Code(const CHeader &header, ISequentialOutStream *outStream, ICompressProgressInfo *progress); + + UInt64 GetInputProcessedSize() const { return _lzmaDecoderSpec->GetInputProcessedSize(); } + + void ReleaseInStream() { if (_lzmaDecoder) _lzmaDecoderSpec->ReleaseInStream(); } + + HRESULT ReadInput(Byte *data, UInt32 size, UInt32 *processedSize) + { return _lzmaDecoderSpec->ReadFromInputStream(data, size, processedSize); } +}; + +static const UInt64 k_BCJ = 0x03030103; + +HRESULT CDecoder::Create( + DECL_EXTERNAL_CODECS_LOC_VARS + bool filteredMode, ISequentialInStream *inStream) +{ + if (!_lzmaDecoder) + { + _lzmaDecoderSpec = new NCompress::NLzma::CDecoder; + _lzmaDecoder = _lzmaDecoderSpec; + } + + if (filteredMode) + { + if (!_bcjStream) + { + CMyComPtr coder; + RINOK(CreateCoder(EXTERNAL_CODECS_LOC_VARS k_BCJ, coder, false)); + if (!coder) + return E_NOTIMPL; + coder.QueryInterface(IID_ISequentialOutStream, &_bcjStream); + if (!_bcjStream) + return E_NOTIMPL; + } + } + + return _lzmaDecoderSpec->SetInStream(inStream); +} + +CDecoder::~CDecoder() +{ + ReleaseInStream(); +} + +HRESULT CDecoder::Code(const CHeader &header, ISequentialOutStream *outStream, + ICompressProgressInfo *progress) +{ + if (header.FilterID > 1) + return E_NOTIMPL; + + { + CMyComPtr setDecoderProperties; + _lzmaDecoder.QueryInterface(IID_ICompressSetDecoderProperties2, &setDecoderProperties); + if (!setDecoderProperties) + return E_NOTIMPL; + RINOK(setDecoderProperties->SetDecoderProperties2(header.LzmaProps, 5)); + } + + CMyComPtr setOutStream; + + bool filteredMode = (header.FilterID == 1); + + if (filteredMode) + { + _bcjStream.QueryInterface(IID_ICompressSetOutStream, &setOutStream); + if (!setOutStream) + return E_NOTIMPL; + RINOK(setOutStream->SetOutStream(outStream)); + outStream = _bcjStream; + } + + const UInt64 *Size = header.HasSize() ? &header.Size : NULL; + HRESULT res = _lzmaDecoderSpec->CodeResume(outStream, Size, progress); + + if (filteredMode) + { + CMyComPtr flush; + _bcjStream.QueryInterface(IID_IOutStreamFlush, &flush); + if (flush) + { + HRESULT res2 = flush->Flush(); + if (res == S_OK) + res = res2; + } + HRESULT res2 = setOutStream->ReleaseOutStream(); + if (res == S_OK) + res = res2; + } + RINOK(res); + + return S_OK; +} + + +class CHandler: + public IInArchive, + public IArchiveOpenSeq, + PUBLIC_ISetCompressCodecsInfo + public CMyUnknownImp +{ + CHeader _header; + bool _lzma86; + UInt64 _startPosition; + UInt64 _packSize; + bool _packSizeDefined; + CMyComPtr _stream; + CMyComPtr _seqStream; + + DECL_EXTERNAL_CODECS_VARS + DECL_ISetCompressCodecsInfo + +public: + MY_QUERYINTERFACE_BEGIN2(IInArchive) + MY_QUERYINTERFACE_ENTRY(IArchiveOpenSeq) + QUERY_ENTRY_ISetCompressCodecsInfo + MY_QUERYINTERFACE_END + MY_ADDREF_RELEASE + + INTERFACE_IInArchive(;) + STDMETHOD(OpenSeq)(ISequentialInStream *stream); + + CHandler(bool lzma86) { _lzma86 = lzma86; } + + unsigned GetHeaderSize() const { return 5 + 8 + (_lzma86 ? 1 : 0); } + +}; + +IMP_IInArchive_Props +IMP_IInArchive_ArcProps_NO_Table + +STDMETHODIMP CHandler::GetArchiveProperty(PROPID propID, PROPVARIANT *value) +{ + NCOM::CPropVariant prop; + switch(propID) + { + case kpidPhySize: if (_packSizeDefined) prop = _packSize; break; + } + prop.Detach(value); + return S_OK; +} + +STDMETHODIMP CHandler::GetNumberOfItems(UInt32 *numItems) +{ + *numItems = 1; + return S_OK; +} + +static void DictSizeToString(UInt32 value, char *s) +{ + for (int i = 0; i <= 31; i++) + if ((UInt32(1) << i) == value) + { + ::ConvertUInt32ToString(i, s); + return; + } + char c = 'b'; + if ((value & ((1 << 20) - 1)) == 0) + { + value >>= 20; + c = 'm'; + } + else if ((value & ((1 << 10) - 1)) == 0) + { + value >>= 10; + c = 'k'; + } + ::ConvertUInt32ToString(value, s); + int p = MyStringLen(s); + s[p++] = c; + s[p++] = '\0'; +} + +static void MyStrCat(char *d, const char *s) +{ + MyStringCopy(d + MyStringLen(d), s); +} + +STDMETHODIMP CHandler::GetProperty(UInt32 /* index */, PROPID propID, PROPVARIANT *value) +{ + NCOM::CPropVariant prop; + switch(propID) + { + case kpidSize: if (_stream && _header.HasSize()) prop = _header.Size; break; + case kpidPackSize: if (_packSizeDefined) prop = _packSize; break; + case kpidMethod: + if (_stream) + { + char s[64]; + s[0] = '\0'; + if (_header.FilterID != 0) + MyStrCat(s, "BCJ "); + MyStrCat(s, "LZMA:"); + DictSizeToString(_header.GetDicSize(), s + MyStringLen(s)); + prop = s; + } + break; + } + prop.Detach(value); + return S_OK; +} + +STDMETHODIMP CHandler::Open(IInStream *inStream, const UInt64 *, IArchiveOpenCallback *) +{ + RINOK(inStream->Seek(0, STREAM_SEEK_CUR, &_startPosition)); + + const UInt32 kBufSize = 1 + 5 + 8 + 1; + Byte buf[kBufSize]; + + RINOK(ReadStream_FALSE(inStream, buf, kBufSize)); + + if (!_header.Parse(buf, _lzma86)) + return S_FALSE; + const Byte *start = buf + GetHeaderSize(); + if (start[0] != 0) + return S_FALSE; + + UInt64 endPos; + RINOK(inStream->Seek(0, STREAM_SEEK_END, &endPos)); + _packSize = endPos - _startPosition; + _packSizeDefined = true; + + _stream = inStream; + _seqStream = inStream; + return S_OK; +} + +STDMETHODIMP CHandler::OpenSeq(ISequentialInStream *stream) +{ + Close(); + _seqStream = stream; + return S_OK; +} + +STDMETHODIMP CHandler::Close() +{ + _packSizeDefined = false; + _stream.Release(); + _seqStream.Release(); + return S_OK; +} + + +STDMETHODIMP CHandler::Extract(const UInt32 *indices, UInt32 numItems, + Int32 testMode, IArchiveExtractCallback *extractCallback) +{ + COM_TRY_BEGIN + if (numItems == 0) + return S_OK; + if (numItems != (UInt32)-1 && (numItems != 1 || indices[0] != 0)) + return E_INVALIDARG; + + if (_stream) + extractCallback->SetTotal(_packSize); + + + CMyComPtr realOutStream; + Int32 askMode = testMode ? + NExtract::NAskMode::kTest : + NExtract::NAskMode::kExtract; + RINOK(extractCallback->GetStream(0, &realOutStream, askMode)); + if (!testMode && !realOutStream) + return S_OK; + + extractCallback->PrepareOperation(askMode); + + CDummyOutStream *outStreamSpec = new CDummyOutStream; + CMyComPtr outStream(outStreamSpec); + outStreamSpec->SetStream(realOutStream); + outStreamSpec->Init(); + realOutStream.Release(); + + CLocalProgress *lps = new CLocalProgress; + CMyComPtr progress = lps; + lps->Init(extractCallback, true); + + if (_stream) + { + RINOK(_stream->Seek(_startPosition, STREAM_SEEK_SET, NULL)); + } + + CDecoder decoder; + HRESULT result = decoder.Create( + EXTERNAL_CODECS_VARS + _lzma86, _seqStream); + RINOK(result); + + Int32 opRes = NExtract::NOperationResult::kOK; + bool firstItem = true; + + for (;;) + { + lps->OutSize = outStreamSpec->GetSize(); + lps->InSize = _packSize = decoder.GetInputProcessedSize(); + _packSizeDefined = true; + RINOK(lps->SetCur()); + + CHeader st; + + const UInt32 kBufSize = 1 + 5 + 8; + Byte buf[kBufSize]; + const UInt32 headerSize = GetHeaderSize(); + UInt32 processed; + RINOK(decoder.ReadInput(buf, headerSize, &processed)); + if (processed != headerSize) + break; + + if (!st.Parse(buf, _lzma86)) + break; + firstItem = false; + + result = decoder.Code(st, outStream, progress); + if (result == E_NOTIMPL) + { + opRes = NExtract::NOperationResult::kUnSupportedMethod; + break; + } + if (result == S_FALSE) + { + opRes = NExtract::NOperationResult::kDataError; + break; + } + RINOK(result); + } + if (firstItem) + return E_FAIL; + outStream.Release(); + return extractCallback->SetOperationResult(opRes); + COM_TRY_END +} + +IMPL_ISetCompressCodecsInfo + +static IInArchive *CreateArc() { return new CHandler(false); } +static IInArchive *CreateArc86() { return new CHandler(true); } + +namespace NLzmaAr { + +static CArcInfo g_ArcInfo = + { L"lzma", L"lzma", 0, 0xA, { 0 }, 0, true, CreateArc, NULL }; +REGISTER_ARC(Lzma) + +} + +namespace NLzma86Ar { + +static CArcInfo g_ArcInfo = + { L"lzma86", L"lzma86", 0, 0xB, { 0 }, 0, true, CreateArc86, NULL }; +REGISTER_ARC(Lzma86) + +} + +}} diff --git a/CPP/7zip/Archive/MachoHandler.cpp b/CPP/7zip/Archive/MachoHandler.cpp new file mode 100644 index 0000000..a6261f3 --- /dev/null +++ b/CPP/7zip/Archive/MachoHandler.cpp @@ -0,0 +1,500 @@ +// MachoHandler.cpp + +#include "StdAfx.h" + +#include "../../../C/CpuArch.h" + +#include "Common/Buffer.h" +#include "Common/ComTry.h" + +#include "Windows/PropVariantUtils.h" + +#include "../Common/LimitedStreams.h" +#include "../Common/ProgressUtils.h" +#include "../Common/RegisterArc.h" +#include "../Common/StreamUtils.h" + +#include "../Compress/CopyCoder.h" + +static UInt32 Get32(const Byte *p, int be) { if (be) return GetBe32(p); return GetUi32(p); } +static UInt64 Get64(const Byte *p, int be) { if (be) return GetBe64(p); return GetUi64(p); } + +using namespace NWindows; + +namespace NArchive { +namespace NMacho { + +#define MACH_ARCH_ABI64 (1 << 24) +#define MACH_MACHINE_386 7 +#define MACH_MACHINE_ARM 12 +#define MACH_MACHINE_SPARC 14 +#define MACH_MACHINE_PPC 18 + +#define MACH_MACHINE_PPC64 (MACH_ARCH_ABI64 | MACH_MACHINE_PPC) +#define MACH_MACHINE_AMD64 (MACH_ARCH_ABI64 | MACH_MACHINE_386) + +#define MACH_CMD_SEGMENT_32 1 +#define MACH_CMD_SEGMENT_64 0x19 + +#define MACH_SECT_TYPE_MASK 0x000000FF +#define MACH_SECT_ATTR_MASK 0xFFFFFF00 + +#define MACH_SECT_ATTR_ZEROFILL 1 + +static const char *g_SectTypes[] = +{ + "REGULAR", + "ZEROFILL", + "CSTRINGS", + "4BYTE_LITERALS", + "8BYTE_LITERALS", + "LITERAL_POINTERS", + "NON_LAZY_SYMBOL_POINTERS", + "LAZY_SYMBOL_POINTERS", + "SYMBOL_STUBS", + "MOD_INIT_FUNC_POINTERS", + "MOD_TERM_FUNC_POINTERS", + "COALESCED", + "GB_ZEROFILL", + "INTERPOSING", + "16BYTE_LITERALS" +}; + +static const char *g_FileTypes[] = +{ + "0", + "OBJECT", + "EXECUTE", + "FVMLIB", + "CORE", + "PRELOAD", + "DYLIB", + "DYLINKER", + "BUNDLE", + "DYLIB_STUB", + "DSYM" +}; + +static const CUInt32PCharPair g_Flags[] = +{ + { 31, "PURE_INSTRUCTIONS" }, + { 30, "NO_TOC" }, + { 29, "STRIP_STATIC_SYMS" }, + { 28, "NO_DEAD_STRIP" }, + { 27, "LIVE_SUPPORT" }, + { 26, "SELF_MODIFYING_CODE" }, + { 25, "DEBUG" }, + { 10, "SOME_INSTRUCTIONS" }, + { 9, "EXT_RELOC" }, + { 8, "LOC_RELOC" } +}; + +static const CUInt32PCharPair g_MachinePairs[] = +{ + { MACH_MACHINE_386, "x86" }, + { MACH_MACHINE_ARM, "ARM" }, + { MACH_MACHINE_SPARC, "SPARC" }, + { MACH_MACHINE_PPC, "PowerPC" }, + { MACH_MACHINE_PPC64, "PowerPC 64-bit" }, + { MACH_MACHINE_AMD64, "x64" } +}; + +static const int kNameSize = 16; + +struct CSegment +{ + char Name[kNameSize]; +}; + +struct CSection +{ + char Name[kNameSize]; + char SegName[kNameSize]; + UInt64 Va; + UInt64 Pa; + UInt64 VSize; + UInt64 PSize; + + UInt32 Flags; + int SegmentIndex; + + bool IsDummy; + + CSection(): IsDummy(false) {} + // UInt64 GetPackSize() const { return Flags == MACH_SECT_ATTR_ZEROFILL ? 0 : Size; } + UInt64 GetPackSize() const { return PSize; } +}; + + +class CHandler: + public IInArchive, + public CMyUnknownImp +{ + CMyComPtr _inStream; + CObjectVector _segments; + CObjectVector _sections; + bool _mode64; + bool _be; + UInt32 _machine; + UInt32 _type; + UInt32 _headersSize; + UInt64 _totalSize; + HRESULT Open2(ISequentialInStream *stream); + bool Parse(const Byte *buf, UInt32 size); +public: + MY_UNKNOWN_IMP1(IInArchive) + INTERFACE_IInArchive(;) +}; + +bool CHandler::Parse(const Byte *buf, UInt32 size) +{ + bool mode64 = _mode64; + bool be = _be; + + const Byte *bufStart = buf; + bool reduceCommands = false; + if (size < 512) + return false; + + _machine = Get32(buf + 4, be); + _type = Get32(buf + 0xC, be); + + UInt32 numCommands = Get32(buf + 0x10, be); + UInt32 commandsSize = Get32(buf + 0x14, be); + if (commandsSize > size) + return false; + + if (commandsSize > (1 << 24) || numCommands > (1 << 18)) + return false; + + if (numCommands > 16) + { + reduceCommands = true; + numCommands = 16; + } + + _headersSize = 0; + + buf += 0x1C; + size -= 0x1C; + + if (mode64) + { + buf += 4; + size -= 4; + } + + _totalSize = (UInt32)(buf - bufStart); + if (commandsSize < size) + size = commandsSize; + + for (UInt32 cmdIndex = 0; cmdIndex < numCommands; cmdIndex++) + { + if (size < 8) + return false; + UInt32 cmd = Get32(buf, be); + UInt32 cmdSize = Get32(buf + 4, be); + if (size < cmdSize) + return false; + if (cmd == MACH_CMD_SEGMENT_32 || cmd == MACH_CMD_SEGMENT_64) + { + UInt32 offs = (cmd == MACH_CMD_SEGMENT_64) ? 0x48 : 0x38; + if (cmdSize < offs) + break; + + UInt64 vmAddr, vmSize, phAddr, phSize; + + { + if (cmd == MACH_CMD_SEGMENT_64) + { + vmAddr = Get64(buf + 0x18, be); + vmSize = Get64(buf + 0x20, be); + phAddr = Get64(buf + 0x28, be); + phSize = Get64(buf + 0x30, be); + } + else + { + vmAddr = Get32(buf + 0x18, be); + vmSize = Get32(buf + 0x1C, be); + phAddr = Get32(buf + 0x20, be); + phSize = Get32(buf + 0x24, be); + } + { + UInt64 totalSize = phAddr + phSize; + if (totalSize > _totalSize) + _totalSize = totalSize; + } + } + + CSegment seg; + memcpy(seg.Name, buf + 8, kNameSize); + _segments.Add(seg); + + UInt32 numSections = Get32(buf + offs - 8, be); + if (numSections > (1 << 8)) + return false; + + if (numSections == 0) + { + CSection section; + section.IsDummy = true; + section.SegmentIndex = _segments.Size() - 1; + section.Va = vmAddr; + section.PSize = phSize; + section.VSize = vmSize; + section.Pa = phAddr; + section.Flags = 0; + _sections.Add(section); + } + else do + { + CSection section; + UInt32 headerSize = (cmd == MACH_CMD_SEGMENT_64) ? 0x50 : 0x44; + const Byte *p = buf + offs; + if (cmdSize - offs < headerSize) + break; + if (cmd == MACH_CMD_SEGMENT_64) + { + section.Va = Get64(p + 0x20, be); + section.VSize = Get64(p + 0x28, be); + section.Pa = Get32(p + 0x30, be); + section.Flags = Get32(p + 0x40, be); + } + else + { + section.Va = Get32(p + 0x20, be); + section.VSize = Get32(p + 0x24, be); + section.Pa = Get32(p + 0x28, be); + section.Flags = Get32(p + 0x38, be); + } + if (section.Flags == MACH_SECT_ATTR_ZEROFILL) + section.PSize = 0; + else + section.PSize = section.VSize; + memcpy(section.Name, p, kNameSize); + memcpy(section.SegName, p + kNameSize, kNameSize); + section.SegmentIndex = _segments.Size() - 1; + _sections.Add(section); + offs += headerSize; + } + while (--numSections); + + if (offs != cmdSize) + return false; + } + buf += cmdSize; + size -= cmdSize; + } + _headersSize = (UInt32)(buf - bufStart); + return reduceCommands || (size == 0); +} + +static STATPROPSTG kArcProps[] = +{ + { NULL, kpidCpu, VT_BSTR}, + { NULL, kpidBit64, VT_BOOL}, + { NULL, kpidBigEndian, VT_BOOL}, + { NULL, kpidCharacts, VT_BSTR}, + { NULL, kpidPhySize, VT_UI8}, + { NULL, kpidHeadersSize, VT_UI4} +}; + +static STATPROPSTG kProps[] = +{ + { NULL, kpidPath, VT_BSTR}, + { NULL, kpidSize, VT_UI8}, + { NULL, kpidPackSize, VT_UI8}, + { NULL, kpidCharacts, VT_BSTR}, + { NULL, kpidOffset, VT_UI8}, + { NULL, kpidVa, VT_UI8} +}; + +IMP_IInArchive_Props +IMP_IInArchive_ArcProps + +STDMETHODIMP CHandler::GetArchiveProperty(PROPID propID, PROPVARIANT *value) +{ + COM_TRY_BEGIN + NCOM::CPropVariant prop; + switch(propID) + { + case kpidCpu: PAIR_TO_PROP(g_MachinePairs, _machine, prop); break; + case kpidCharacts: TYPE_TO_PROP(g_FileTypes, _type, prop); break; + case kpidPhySize: prop = _totalSize; break; + case kpidHeadersSize: prop = _headersSize; break; + case kpidBit64: if (_mode64) prop = _mode64; break; + case kpidBigEndian: if (_be) prop = _be; break; + } + prop.Detach(value); + return S_OK; + COM_TRY_END +} + +static AString GetName(const char *name) +{ + char res[kNameSize + 1]; + memcpy(res, name, kNameSize); + res[kNameSize] = 0; + return res; +} + +static AString SectFlagsToString(UInt32 flags) +{ + AString res = TypeToString(g_SectTypes, sizeof(g_SectTypes) / sizeof(g_SectTypes[0]), + flags & MACH_SECT_TYPE_MASK); + AString s = FlagsToString(g_Flags, sizeof(g_Flags) / sizeof(g_Flags[0]), + flags & MACH_SECT_ATTR_MASK); + if (!s.IsEmpty()) + { + res += ' '; + res += s; + } + return res; +} + +STDMETHODIMP CHandler::GetProperty(UInt32 index, PROPID propID, PROPVARIANT *value) +{ + COM_TRY_BEGIN + NCOM::CPropVariant prop; + const CSection &item = _sections[index]; + switch(propID) + { + case kpidPath: + { + AString s = GetName(_segments[item.SegmentIndex].Name); + if (!item.IsDummy) + s += GetName(item.Name); + StringToProp(s, prop); + break; + } + case kpidSize: /* prop = (UInt64)item.VSize; break; */ + case kpidPackSize: prop = (UInt64)item.GetPackSize(); break; + case kpidCharacts: if (!item.IsDummy) StringToProp(SectFlagsToString(item.Flags), prop); break; + case kpidOffset: prop = item.Pa; break; + case kpidVa: prop = item.Va; break; + } + prop.Detach(value); + return S_OK; + COM_TRY_END +} + +HRESULT CHandler::Open2(ISequentialInStream *stream) +{ + const UInt32 kBufSize = 1 << 18; + const UInt32 kSigSize = 4; + + CByteBuffer buffer; + buffer.SetCapacity(kBufSize); + Byte *buf = buffer; + + size_t processed = kSigSize; + RINOK(ReadStream_FALSE(stream, buf, processed)); + UInt32 sig = GetUi32(buf); + bool be, mode64; + switch(sig) + { + case 0xCEFAEDFE: be = true; mode64 = false; break; + case 0xCFFAEDFE: be = true; mode64 = true; break; + case 0xFEEDFACE: be = false; mode64 = false; break; + case 0xFEEDFACF: be = false; mode64 = true; break; + default: return S_FALSE; + } + processed = kBufSize - kSigSize; + RINOK(ReadStream(stream, buf + kSigSize, &processed)); + _mode64 = mode64; + _be = be; + return Parse(buf, (UInt32)processed + kSigSize) ? S_OK : S_FALSE; +} + +STDMETHODIMP CHandler::Open(IInStream *inStream, + const UInt64 * /* maxCheckStartPosition */, + IArchiveOpenCallback * /* openArchiveCallback */) +{ + COM_TRY_BEGIN + Close(); + RINOK(Open2(inStream)); + _inStream = inStream; + return S_OK; + COM_TRY_END +} + +STDMETHODIMP CHandler::Close() +{ + _inStream.Release(); + _sections.Clear(); + _segments.Clear(); + return S_OK; +} + +STDMETHODIMP CHandler::GetNumberOfItems(UInt32 *numItems) +{ + *numItems = _sections.Size(); + return S_OK; +} + +STDMETHODIMP CHandler::Extract(const UInt32 *indices, UInt32 numItems, + Int32 testMode, IArchiveExtractCallback *extractCallback) +{ + COM_TRY_BEGIN + bool allFilesMode = (numItems == (UInt32)-1); + if (allFilesMode) + numItems = _sections.Size(); + if (numItems == 0) + return S_OK; + UInt64 totalSize = 0; + UInt32 i; + for (i = 0; i < numItems; i++) + totalSize += _sections[allFilesMode ? i : indices[i]].GetPackSize(); + extractCallback->SetTotal(totalSize); + + UInt64 currentTotalSize = 0; + UInt64 currentItemSize; + + NCompress::CCopyCoder *copyCoderSpec = new NCompress::CCopyCoder(); + CMyComPtr copyCoder = copyCoderSpec; + + CLocalProgress *lps = new CLocalProgress; + CMyComPtr progress = lps; + lps->Init(extractCallback, false); + + CLimitedSequentialInStream *streamSpec = new CLimitedSequentialInStream; + CMyComPtr inStream(streamSpec); + streamSpec->SetStream(_inStream); + + for (i = 0; i < numItems; i++, currentTotalSize += currentItemSize) + { + lps->InSize = lps->OutSize = currentTotalSize; + RINOK(lps->SetCur()); + Int32 askMode = testMode ? + NExtract::NAskMode::kTest : + NExtract::NAskMode::kExtract; + UInt32 index = allFilesMode ? i : indices[i]; + const CSection &item = _sections[index]; + currentItemSize = item.GetPackSize(); + + CMyComPtr outStream; + RINOK(extractCallback->GetStream(index, &outStream, askMode)); + if (!testMode && !outStream) + continue; + + RINOK(extractCallback->PrepareOperation(askMode)); + RINOK(_inStream->Seek(item.Pa, STREAM_SEEK_SET, NULL)); + streamSpec->Init(currentItemSize); + RINOK(copyCoder->Code(inStream, outStream, NULL, NULL, progress)); + outStream.Release(); + RINOK(extractCallback->SetOperationResult(copyCoderSpec->TotalSize == currentItemSize ? + NExtract::NOperationResult::kOK: + NExtract::NOperationResult::kDataError)); + } + return S_OK; + COM_TRY_END +} + +static IInArchive *CreateArc() { return new CHandler; } + +static CArcInfo g_ArcInfo = + { L"MachO", L"", 0, 0xDF, { 0 }, 0, false, CreateArc, 0 }; + +REGISTER_ARC(Macho) + +}} diff --git a/CPP/7zip/Archive/MbrHandler.cpp b/CPP/7zip/Archive/MbrHandler.cpp new file mode 100644 index 0000000..b6d7918 --- /dev/null +++ b/CPP/7zip/Archive/MbrHandler.cpp @@ -0,0 +1,507 @@ +// MbrHandler.cpp + +#include "StdAfx.h" + +// #define SHOW_DEBUG_INFO + +#ifdef SHOW_DEBUG_INFO +#include +#endif + +#include "../../../C/CpuArch.h" + +#include "Common/Buffer.h" +#include "Common/ComTry.h" +#include "Common/IntToString.h" +#include "Common/MyString.h" + +#include "Windows/PropVariant.h" + +#include "../Common/LimitedStreams.h" +#include "../Common/ProgressUtils.h" +#include "../Common/RegisterArc.h" +#include "../Common/StreamUtils.h" + +#include "../Compress/CopyCoder.h" + +#ifdef SHOW_DEBUG_INFO +#define PRF(x) x +#else +#define PRF(x) +#endif + +using namespace NWindows; + +namespace NArchive { +namespace NMbr { + +struct CChs +{ + Byte Head; + Byte SectCyl; + Byte Cyl8; + + UInt32 GetSector() const { return SectCyl & 0x3F; } + UInt32 GetCyl() const { return ((UInt32)SectCyl >> 6 << 8) | Cyl8; } + void ToString(NCOM::CPropVariant &prop) const; + + void Parse(const Byte *p) + { + Head = p[0]; + SectCyl = p[1]; + Cyl8 = p[2]; + } + bool Check() const { return GetSector() > 0; } +}; + +#define RINOZ(x) { int __tt = (x); if (__tt != 0) return __tt; } + +static int CompareChs(const CChs &c1, const CChs &c2) +{ + RINOZ(MyCompare(c1.GetCyl(), c2.GetCyl())); + RINOZ(MyCompare(c1.Head, c2.Head)); + return MyCompare(c1.GetSector(), c2.GetSector()); +} + +static void AddUIntToString(UInt32 val, AString &res) +{ + char s[16]; + ConvertUInt32ToString(val, s); + res += s; +} + +void CChs::ToString(NCOM::CPropVariant &prop) const +{ + AString s; + AddUIntToString(GetCyl(), s); + s += '-'; + AddUIntToString(Head, s); + s += '-'; + AddUIntToString(GetSector(), s); + prop = s; +} + +struct CPartition +{ + Byte Status; + CChs BeginChs; + Byte Type; + CChs EndChs; + UInt32 Lba; + UInt32 NumBlocks; + + CPartition() { memset (this, 0, sizeof(*this)); } + + bool IsEmpty() const { return Type == 0; } + bool IsExtended() const { return Type == 5 || Type == 0xF; } + UInt32 GetLimit() const { return Lba + NumBlocks; } + // bool IsActive() const { return Status == 0x80; } + UInt64 GetPos() const { return (UInt64)Lba * 512; } + UInt64 GetSize() const { return (UInt64)NumBlocks * 512; } + + bool CheckLbaLimits() const { return (UInt32)0xFFFFFFFF - Lba >= NumBlocks; } + bool Parse(const Byte *p) + { + Status = p[0]; + BeginChs.Parse(p + 1); + Type = p[4]; + EndChs.Parse(p + 5); + Lba = GetUi32(p + 8); + NumBlocks = GetUi32(p + 12); + if (Type == 0) + return true; + if (Status != 0 && Status != 0x80) + return false; + return + BeginChs.Check() && + EndChs.Check() && + CompareChs(BeginChs, EndChs) <= 0 && + NumBlocks > 0 && + CheckLbaLimits(); + } + + #ifdef SHOW_DEBUG_INFO + void Print() const + { + NCOM::CPropVariant prop, prop2; + BeginChs.ToString(prop); + EndChs.ToString(prop2); + printf(" %2x %2x %8X %8X %12S %12S", (int)Status, (int)Type, Lba, NumBlocks, prop.bstrVal, prop2.bstrVal); + } + #endif +}; + +struct CPartType +{ + UInt32 Id; + const char *Ext; + const char *Name; +}; + +static const char *kFat = "fat"; + +static const CPartType kPartTypes[] = +{ + { 0x01, kFat, "FAT12" }, + { 0x04, kFat, "FAT16 DOS 3.0+" }, + { 0x05, 0, "Extended" }, + { 0x06, kFat, "FAT16 DOS 3.31+" }, + { 0x07, "ntfs", "NTFS" }, + { 0x0B, kFat, "FAT32" }, + { 0x0C, kFat, "FAT32-LBA" }, + { 0x0E, kFat, "FAT16-LBA" }, + { 0x0F, 0, "Extended-LBA" }, + { 0x11, kFat, "FAT12-Hidden" }, + { 0x14, kFat, "FAT16-Hidden < 32 MB" }, + { 0x16, kFat, "FAT16-Hidden >= 32 MB" }, + { 0x1B, kFat, "FAT32-Hidden" }, + { 0x1C, kFat, "FAT32-LBA-Hidden" }, + { 0x1E, kFat, "FAT16-LBA-WIN95-Hidden" }, + { 0x82, 0, "Solaris x86 / Linux swap" }, + { 0x83, 0, "Linux" }, + { 0xBE, 0, "Solaris 8 boot" }, + { 0xBF, 0, "New Solaris x86" }, + { 0xC2, 0, "Linux-Hidden" }, + { 0xC3, 0, "Linux swap-Hidden" }, + { 0xEE, 0, "EFI-MBR" }, + { 0xEE, 0, "EFI" } +}; + +static int FindPartType(UInt32 type) +{ + for (int i = 0; i < sizeof(kPartTypes) / sizeof(kPartTypes[0]); i++) + if (kPartTypes[i].Id == type) + return i; + return -1; +} + +struct CItem +{ + bool IsReal; + bool IsPrim; + UInt64 Size; + CPartition Part; +}; + +class CHandler: + public IInArchive, + public IInArchiveGetStream, + public CMyUnknownImp +{ + CMyComPtr _stream; + CObjectVector _items; + UInt64 _totalSize; + CByteBuffer _buffer; + + HRESULT ReadTables(IInStream *stream, UInt32 baseLba, UInt32 lba, int level); +public: + MY_UNKNOWN_IMP2(IInArchive, IInArchiveGetStream) + INTERFACE_IInArchive(;) + STDMETHOD(GetStream)(UInt32 index, ISequentialInStream **stream); +}; + +HRESULT CHandler::ReadTables(IInStream *stream, UInt32 baseLba, UInt32 lba, int level) +{ + if (level >= 128 || _items.Size() >= 128) + return S_FALSE; + + const int kNumHeaderParts = 4; + CPartition parts[kNumHeaderParts]; + + { + const UInt32 kSectorSize = 512; + _buffer.SetCapacity(kSectorSize); + Byte *buf = _buffer; + UInt64 newPos = (UInt64)lba << 9; + if (newPos + 512 > _totalSize) + return S_FALSE; + RINOK(stream->Seek(newPos, STREAM_SEEK_SET, NULL)); + RINOK(ReadStream_FALSE(stream, buf, kSectorSize)); + + if (buf[0x1FE] != 0x55 || buf[0x1FF] != 0xAA) + return S_FALSE; + + for (int i = 0; i < kNumHeaderParts; i++) + if (!parts[i].Parse(buf + 0x1BE + 16 * i)) + return S_FALSE; + } + + PRF(printf("\n# %8X", lba)); + + UInt32 limLba = lba + 1; + if (limLba == 0) + return S_FALSE; + + for (int i = 0; i < kNumHeaderParts; i++) + { + CPartition &part = parts[i]; + + if (part.IsEmpty()) + continue; + PRF(printf("\n %2d ", (int)level)); + #ifdef SHOW_DEBUG_INFO + part.Print(); + #endif + + int numItems = _items.Size(); + UInt32 newLba = lba + part.Lba; + + if (part.IsExtended()) + { + // if (part.Type == 5) // Check it! + newLba = baseLba + part.Lba; + if (newLba < limLba) + return S_FALSE; + HRESULT res = ReadTables(stream, level < 1 ? newLba : baseLba, newLba, level + 1); + if (res != S_FALSE && res != S_OK) + return res; + } + if (newLba < limLba) + return S_FALSE; + part.Lba = newLba; + if (!part.CheckLbaLimits()) + return S_FALSE; + + CItem n; + n.Part = part; + bool addItem = false; + if (numItems == _items.Size()) + { + n.IsPrim = (level == 0); + n.IsReal = true; + addItem = true; + } + else + { + const CItem &back = _items.Back(); + UInt32 backLimit = back.Part.GetLimit(); + UInt32 partLimit = part.GetLimit(); + if (backLimit < partLimit) + { + n.IsReal = false; + n.Part.Lba = backLimit; + n.Part.NumBlocks = partLimit - backLimit; + addItem = true; + } + } + if (addItem) + { + if (n.Part.GetLimit() < limLba) + return S_FALSE; + limLba = n.Part.GetLimit(); + n.Size = n.Part.GetSize(); + _items.Add(n); + } + } + return S_OK; +} + +STDMETHODIMP CHandler::Open(IInStream *stream, + const UInt64 * /* maxCheckStartPosition */, + IArchiveOpenCallback * /* openArchiveCallback */) +{ + COM_TRY_BEGIN + Close(); + RINOK(stream->Seek(0, STREAM_SEEK_END, &_totalSize)); + RINOK(ReadTables(stream, 0, 0, 0)); + if (_items.IsEmpty()) + return S_FALSE; + UInt32 lbaLimit = _items.Back().Part.GetLimit(); + UInt64 lim = (UInt64)lbaLimit << 9; + if (lim < _totalSize) + { + CItem n; + n.Part.Lba = lbaLimit; + n.Size = _totalSize - lim; + n.IsReal = false; + _items.Add(n); + } + _stream = stream; + return S_OK; + COM_TRY_END +} + +STDMETHODIMP CHandler::Close() +{ + _items.Clear(); + _stream.Release(); + return S_OK; +} + +enum +{ + kpidPrimary = kpidUserDefined, + kpidBegChs, + kpidEndChs +}; + +STATPROPSTG kProps[] = +{ + { NULL, kpidPath, VT_BSTR}, + { NULL, kpidSize, VT_UI8}, + { NULL, kpidFileSystem, VT_BSTR}, + { NULL, kpidOffset, VT_UI8}, + { L"Primary", kpidPrimary, VT_BOOL}, + { L"Begin CHS", kpidBegChs, VT_BSTR}, + { L"End CHS", kpidEndChs, VT_BSTR} +}; + +IMP_IInArchive_Props_WITH_NAME +IMP_IInArchive_ArcProps_NO_Table + +STDMETHODIMP CHandler::GetArchiveProperty(PROPID propID, PROPVARIANT *value) +{ + NCOM::CPropVariant prop; + switch(propID) + { + case kpidMainSubfile: + { + int mainIndex = -1; + for (int i = 0; i < _items.Size(); i++) + if (_items[i].IsReal) + { + if (mainIndex >= 0) + { + mainIndex = -1; + break; + } + mainIndex = i; + } + if (mainIndex >= 0) + prop = (UInt32)mainIndex; + break; + } + } + prop.Detach(value); + return S_OK; +} + +STDMETHODIMP CHandler::GetNumberOfItems(UInt32 *numItems) +{ + *numItems = _items.Size(); + return S_OK; +} + +STDMETHODIMP CHandler::GetProperty(UInt32 index, PROPID propID, PROPVARIANT *value) +{ + COM_TRY_BEGIN + NCOM::CPropVariant prop; + + const CItem &item = _items[index]; + const CPartition &part = item.Part; + switch(propID) + { + case kpidPath: + { + AString s; + AddUIntToString(index, s); + if (item.IsReal) + { + int typeIndex = FindPartType(part.Type); + s += '.'; + const char *ext = "img"; + if (typeIndex >= 0 && kPartTypes[typeIndex].Ext != 0) + ext = kPartTypes[typeIndex].Ext; + s += ext; + } + prop = s; + break; + } + case kpidFileSystem: + if (item.IsReal) + { + char s[32]; + ConvertUInt32ToString(part.Type, s); + const char *res = s; + int typeIndex = FindPartType(part.Type); + if (typeIndex >= 0 && kPartTypes[typeIndex].Name) + res = kPartTypes[typeIndex].Name; + prop = res; + } + break; + case kpidSize: prop = item.Size; break;; + case kpidPackSize: prop = item.Size; break; + case kpidOffset: prop = part.GetPos(); break; + case kpidPrimary: if (item.IsReal) prop = item.IsPrim; break; + case kpidBegChs: if (item.IsReal) part.BeginChs.ToString(prop); break; + case kpidEndChs: if (item.IsReal) part.EndChs.ToString(prop); break; + } + prop.Detach(value); + return S_OK; + COM_TRY_END +} + +STDMETHODIMP CHandler::Extract(const UInt32 *indices, UInt32 numItems, + Int32 testMode, IArchiveExtractCallback *extractCallback) +{ + COM_TRY_BEGIN + bool allFilesMode = (numItems == (UInt32)-1); + if (allFilesMode) + numItems = _items.Size(); + if (numItems == 0) + return S_OK; + UInt64 totalSize = 0; + UInt32 i; + for (i = 0; i < numItems; i++) + totalSize += _items[allFilesMode ? i : indices[i]].Size; + extractCallback->SetTotal(totalSize); + + totalSize = 0; + + NCompress::CCopyCoder *copyCoderSpec = new NCompress::CCopyCoder(); + CMyComPtr copyCoder = copyCoderSpec; + + CLocalProgress *lps = new CLocalProgress; + CMyComPtr progress = lps; + lps->Init(extractCallback, false); + + CLimitedSequentialInStream *streamSpec = new CLimitedSequentialInStream; + CMyComPtr inStream(streamSpec); + streamSpec->SetStream(_stream); + + for (i = 0; i < numItems; i++) + { + lps->InSize = totalSize; + lps->OutSize = totalSize; + RINOK(lps->SetCur()); + CMyComPtr outStream; + Int32 askMode = testMode ? + NExtract::NAskMode::kTest : + NExtract::NAskMode::kExtract; + Int32 index = allFilesMode ? i : indices[i]; + const CItem &item = _items[index]; + const CPartition &part = item.Part; + RINOK(extractCallback->GetStream(index, &outStream, askMode)); + totalSize += item.Size; + if (!testMode && !outStream) + continue; + RINOK(extractCallback->PrepareOperation(askMode)); + + RINOK(_stream->Seek(part.GetPos(), STREAM_SEEK_SET, NULL)); + streamSpec->Init(item.Size); + RINOK(copyCoder->Code(inStream, outStream, NULL, NULL, progress)); + outStream.Release(); + RINOK(extractCallback->SetOperationResult(copyCoderSpec->TotalSize == item.Size ? + NExtract::NOperationResult::kOK: + NExtract::NOperationResult::kDataError)); + } + return S_OK; + COM_TRY_END +} + +STDMETHODIMP CHandler::GetStream(UInt32 index, ISequentialInStream **stream) +{ + COM_TRY_BEGIN + const CItem &item = _items[index]; + return CreateLimitedInStream(_stream, item.Part.GetPos(), item.Size, stream); + COM_TRY_END +} + +static IInArchive *CreateArc() { return new CHandler; } + +static CArcInfo g_ArcInfo = + { L"MBR", L"mbr", 0, 0xDB, { 1, 1, 0 }, 3, false, CreateArc, 0 }; + +REGISTER_ARC(Mbr) + +}} diff --git a/CPP/7zip/Archive/MslzHandler.cpp b/CPP/7zip/Archive/MslzHandler.cpp new file mode 100644 index 0000000..67495e7 --- /dev/null +++ b/CPP/7zip/Archive/MslzHandler.cpp @@ -0,0 +1,257 @@ +// MslzHandler.cpp + +#include "StdAfx.h" + +#include "../../../C/CpuArch.h" + +#include "Common/ComTry.h" +#include "Common/MyString.h" + +#include "Windows/PropVariant.h" + +#include "../Common/InBuffer.h" +#include "../Common/ProgressUtils.h" +#include "../Common/RegisterArc.h" +#include "../Common/StreamUtils.h" + +#include "Common/DummyOutStream.h" + +namespace NArchive { +namespace NMslz { + +class CHandler: + public IInArchive, + public CMyUnknownImp +{ + CMyComPtr _stream; + UInt32 _size; + UInt64 _packSize; + UString _name; +public: + MY_UNKNOWN_IMP1(IInArchive) + INTERFACE_IInArchive(;) +}; + +STATPROPSTG kProps[] = +{ + { NULL, kpidPath, VT_BSTR}, + { NULL, kpidSize, VT_UI8}, + { NULL, kpidPackSize, VT_UI8}, +}; + +IMP_IInArchive_Props +IMP_IInArchive_ArcProps_NO + +STDMETHODIMP CHandler::GetNumberOfItems(UInt32 *numItems) +{ + *numItems = 1; + return S_OK; +} + +STDMETHODIMP CHandler::GetProperty(UInt32 /* index */, PROPID propID, PROPVARIANT *value) +{ + COM_TRY_BEGIN + NWindows::NCOM::CPropVariant prop; + switch(propID) + { + case kpidPath: if (!_name.IsEmpty()) prop = _name; break; + case kpidSize: prop = _size; break; + case kpidPackSize: prop = _packSize; break; + } + prop.Detach(value); + return S_OK; + COM_TRY_END +} + +static const unsigned kSignatureSize = 9; +static const unsigned kHeaderSize = kSignatureSize + 1 + 4; +#define MSLZ_SIGNATURE { 0x53, 0x5A, 0x44, 0x44, 0x88, 0xF0, 0x27, 0x33, 0x41 } +// old signature: 53 5A 20 88 F0 27 33 +static const Byte signature[kSignatureSize] = MSLZ_SIGNATURE; + +static const wchar_t *g_Exts[] = +{ + L"dll", + L"exe", + L"kmd", + L"sys" +}; + +STDMETHODIMP CHandler::Open(IInStream *stream, const UInt64 * /* maxCheckStartPosition */, + IArchiveOpenCallback *callback) +{ + COM_TRY_BEGIN + { + Close(); + Byte buffer[kHeaderSize]; + RINOK(ReadStream_FALSE(stream, buffer, kHeaderSize)); + if (memcmp(buffer, signature, kSignatureSize) != 0) + return S_FALSE; + _size = GetUi32(buffer + 10); + if (_size > 0xFFFFFFE0) + return S_FALSE; + RINOK(stream->Seek(0, STREAM_SEEK_END, &_packSize)); + + if (callback) + { + CMyComPtr openVolumeCallback; + callback->QueryInterface(IID_IArchiveOpenVolumeCallback, (void **)&openVolumeCallback); + if (openVolumeCallback) + { + NWindows::NCOM::CPropVariant prop; + if (openVolumeCallback->GetProperty(kpidName, &prop) == S_OK && prop.vt == VT_BSTR) + { + UString baseName = prop.bstrVal; + if (!baseName.IsEmpty() && baseName.Back() == L'_') + { + baseName.DeleteBack(); + Byte replaceByte = buffer[kSignatureSize]; + if (replaceByte == 0) + { + for (int i = 0; i < sizeof(g_Exts) / sizeof(g_Exts[0]); i++) + { + UString s = g_Exts[i]; + int len = s.Length(); + Byte b = (Byte)s.Back(); + s.DeleteBack(); + if (baseName.Length() >= len && + baseName[baseName.Length() - len] == '.' && + s.CompareNoCase(baseName.Right(len - 1)) == 0) + { + replaceByte = b; + break; + } + } + } + if (replaceByte >= 0x20 && replaceByte < 0x80) + _name = baseName + (wchar_t)replaceByte; + } + } + } + } + _stream = stream; + } + return S_OK; + COM_TRY_END +} + +STDMETHODIMP CHandler::Close() +{ + _stream.Release(); + _name.Empty(); + return S_OK; +} + +// MslzDec is modified LZSS algorithm of Haruhiko Okumura: +// maxLen = 18; Okumura +// maxLen = 16; MS + +#define PROGRESS_AND_WRITE \ + if ((dest & kMask) == 0) { RINOK(WriteStream(outStream, buf, kBufSize)); \ + if ((dest & ((1 << 20) - 1)) == 0) \ + { UInt64 inSize = inStream.GetProcessedSize(); UInt64 outSize = dest; \ + RINOK(progress->SetRatioInfo(&inSize, &outSize)); }} + +static HRESULT MslzDec(CInBuffer &inStream, ISequentialOutStream *outStream, UInt32 unpackSize, ICompressProgressInfo *progress) +{ + const unsigned kBufSize = (1 << 12); + const unsigned kMask = kBufSize - 1; + Byte buf[kBufSize]; + UInt32 dest = 0; + memset(buf, ' ', kBufSize); + while (dest < unpackSize) + { + Byte b; + if (!inStream.ReadByte(b)) + return S_FALSE; + for (unsigned mask = (unsigned)b | 0x100; mask > 1 && dest < unpackSize; mask >>= 1) + { + if (!inStream.ReadByte(b)) + return S_FALSE; + if (mask & 1) + { + buf[dest++ & kMask] = b; + PROGRESS_AND_WRITE + } + else + { + Byte b1; + if (!inStream.ReadByte(b1)) + return S_FALSE; + const unsigned kMaxLen = 16; // 18 in Okumura's code. + unsigned src = (((((unsigned)b1 & 0xF0) << 4) | b) + kMaxLen) & kMask; + unsigned len = (b1 & 0xF) + 3; + if (len > kMaxLen || dest + len > unpackSize) + return S_FALSE; + do + { + buf[dest++ & kMask] = buf[src++ & kMask]; + PROGRESS_AND_WRITE + } + while (--len != 0); + } + } + } + return WriteStream(outStream, buf, dest & kMask); +} + +STDMETHODIMP CHandler::Extract(const UInt32 *indices, UInt32 numItems, + Int32 testMode, IArchiveExtractCallback *extractCallback) +{ + COM_TRY_BEGIN + if (numItems == 0) + return S_OK; + if (numItems != (UInt32)-1 && (numItems != 1 || indices[0] != 0)) + return E_INVALIDARG; + + extractCallback->SetTotal(_size); + + CMyComPtr realOutStream; + Int32 askMode = testMode ? + NExtract::NAskMode::kTest : + NExtract::NAskMode::kExtract; + RINOK(extractCallback->GetStream(0, &realOutStream, askMode)); + if (!testMode && !realOutStream) + return S_OK; + + extractCallback->PrepareOperation(askMode); + + CDummyOutStream *outStreamSpec = new CDummyOutStream; + CMyComPtr outStream(outStreamSpec); + outStreamSpec->SetStream(realOutStream); + outStreamSpec->Init(); + realOutStream.Release(); + + CLocalProgress *lps = new CLocalProgress; + CMyComPtr progress = lps; + lps->Init(extractCallback, false); + + RINOK(_stream->Seek(0, STREAM_SEEK_SET, NULL)); + CInBuffer s; + if (!s.Create(1 << 20)) + return E_OUTOFMEMORY; + s.SetStream(_stream); + s.Init(); + Byte buffer[kHeaderSize]; + Int32 opRes = NExtract::NOperationResult::kDataError; + if (s.ReadBytes(buffer, kHeaderSize) == kHeaderSize) + { + HRESULT result = MslzDec(s, outStream, _size, progress); + if (result == S_OK) + opRes = NExtract::NOperationResult::kOK; + else if (result != S_FALSE) + return result; + } + outStream.Release(); + return extractCallback->SetOperationResult(opRes); + COM_TRY_END +} + +static IInArchive *CreateArc() { return new CHandler; } + +static CArcInfo g_ArcInfo = + { L"MsLZ", L"", 0, 0xD5, MSLZ_SIGNATURE, kSignatureSize, false, CreateArc, 0 }; + +REGISTER_ARC(Mslz) + +}} diff --git a/CPP/7zip/Archive/MubHandler.cpp b/CPP/7zip/Archive/MubHandler.cpp new file mode 100644 index 0000000..da4df24 --- /dev/null +++ b/CPP/7zip/Archive/MubHandler.cpp @@ -0,0 +1,266 @@ +// MubHandler.cpp + +#include "StdAfx.h" + +#include "../../../C/CpuArch.h" + +#include "Common/ComTry.h" + +#include "Windows/PropVariant.h" + +#include "../Common/LimitedStreams.h" +#include "../Common/ProgressUtils.h" +#include "../Common/RegisterArc.h" +#include "../Common/StreamUtils.h" + +#include "../Compress/CopyCoder.h" + +#define Get32(p) GetBe32(p) + +namespace NArchive { +namespace NMub { + +struct CItem +{ + UInt32 Type; + UInt32 SubType; + UInt64 Offset; + UInt64 Size; + UInt32 Align; + bool IsTail; +}; + +const UInt32 kNumFilesMax = 10; + +class CHandler: + public IInArchive, + public IInArchiveGetStream, + public CMyUnknownImp +{ + UInt64 _startPos; + CMyComPtr _stream; + UInt32 _numItems; + CItem _items[kNumFilesMax + 1]; + HRESULT Open2(IInStream *stream); +public: + MY_UNKNOWN_IMP2(IInArchive, IInArchiveGetStream) + INTERFACE_IInArchive(;) + STDMETHOD(GetStream)(UInt32 index, ISequentialInStream **stream); +}; + +STATPROPSTG kProps[] = +{ + { NULL, kpidSize, VT_UI8} +}; + +IMP_IInArchive_Props +IMP_IInArchive_ArcProps_NO + +#define MACH_ARCH_ABI64 0x1000000 +#define MACH_MACHINE_386 7 +#define MACH_MACHINE_ARM 12 +#define MACH_MACHINE_SPARC 14 +#define MACH_MACHINE_PPC 18 + +#define MACH_MACHINE_PPC64 (MACH_MACHINE_PPC | MACH_ARCH_ABI64) +#define MACH_MACHINE_AMD64 (MACH_MACHINE_386 | MACH_ARCH_ABI64) + +STDMETHODIMP CHandler::GetProperty(UInt32 index, PROPID propID, PROPVARIANT *value) +{ + NWindows::NCOM::CPropVariant prop; + const CItem &item = _items[index]; + switch(propID) + { + case kpidExtension: + { + const wchar_t *ext; + if (item.IsTail) + ext = L"tail"; + else + { + switch(item.Type) + { + case MACH_MACHINE_386: ext = L"86"; break; + case MACH_MACHINE_ARM: ext = L"arm"; break; + case MACH_MACHINE_SPARC: ext = L"sparc"; break; + case MACH_MACHINE_PPC: ext = L"ppc"; break; + case MACH_MACHINE_PPC64: ext = L"ppc64"; break; + case MACH_MACHINE_AMD64: ext = L"x64"; break; + default: ext = L"unknown"; break; + } + } + prop = ext; + break; + } + case kpidSize: + case kpidPackSize: + prop = (UInt64)item.Size; + break; + } + prop.Detach(value); + return S_OK; +} + +#define MACH_TYPE_ABI64 (1 << 24) +#define MACH_SUBTYPE_ABI64 (1 << 31) + +HRESULT CHandler::Open2(IInStream *stream) +{ + RINOK(stream->Seek(0, STREAM_SEEK_SET, &_startPos)); + + const UInt32 kHeaderSize = 8; + const UInt32 kRecordSize = 5 * 4; + const UInt32 kBufSize = kHeaderSize + kNumFilesMax * kRecordSize; + Byte buf[kBufSize]; + size_t processed = kBufSize; + RINOK(ReadStream(stream, buf, &processed)); + if (processed < kHeaderSize) + return S_FALSE; + UInt32 num = Get32(buf + 4); + if (Get32(buf) != 0xCAFEBABE || num > kNumFilesMax || processed < kHeaderSize + num * kRecordSize) + return S_FALSE; + UInt64 endPosMax = kHeaderSize; + for (UInt32 i = 0; i < num; i++) + { + const Byte *p = buf + kHeaderSize + i * kRecordSize; + CItem &sb = _items[i]; + sb.IsTail = false; + sb.Type = Get32(p); + sb.SubType = Get32(p + 4); + sb.Offset = Get32(p + 8); + sb.Size = Get32(p + 12); + sb.Align = Get32(p + 16); + + if ((sb.Type & ~MACH_TYPE_ABI64) >= 0x100 || + (sb.SubType & ~MACH_SUBTYPE_ABI64) >= 0x100 || + sb.Align > 31) + return S_FALSE; + + UInt64 endPos = (UInt64)sb.Offset + sb.Size; + if (endPos > endPosMax) + endPosMax = endPos; + } + UInt64 fileSize; + RINOK(stream->Seek(0, STREAM_SEEK_END, &fileSize)); + fileSize -= _startPos; + _numItems = num; + if (fileSize > endPosMax) + { + CItem &sb = _items[_numItems++]; + sb.IsTail = true; + sb.Type = 0; + sb.SubType = 0; + sb.Offset = endPosMax; + sb.Size = fileSize - endPosMax; + sb.Align = 0; + } + return S_OK; +} + +STDMETHODIMP CHandler::Open(IInStream *inStream, + const UInt64 * /* maxCheckStartPosition */, + IArchiveOpenCallback * /* openArchiveCallback */) +{ + COM_TRY_BEGIN + Close(); + try + { + if (Open2(inStream) != S_OK) + return S_FALSE; + _stream = inStream; + } + catch(...) { return S_FALSE; } + return S_OK; + COM_TRY_END +} + +STDMETHODIMP CHandler::Close() +{ + _stream.Release(); + _numItems = 0; + return S_OK; +} + +STDMETHODIMP CHandler::GetNumberOfItems(UInt32 *numItems) +{ + *numItems = _numItems; + return S_OK; +} + +STDMETHODIMP CHandler::Extract(const UInt32 *indices, UInt32 numItems, + Int32 testMode, IArchiveExtractCallback *extractCallback) +{ + COM_TRY_BEGIN + bool allFilesMode = (numItems == (UInt32)-1); + if (allFilesMode) + numItems = _numItems; + if (numItems == 0) + return S_OK; + UInt64 totalSize = 0; + UInt32 i; + for (i = 0; i < numItems; i++) + totalSize += _items[allFilesMode ? i : indices[i]].Size; + extractCallback->SetTotal(totalSize); + + UInt64 currentTotalSize = 0; + + NCompress::CCopyCoder *copyCoderSpec = new NCompress::CCopyCoder(); + CMyComPtr copyCoder = copyCoderSpec; + + CLocalProgress *lps = new CLocalProgress; + CMyComPtr progress = lps; + lps->Init(extractCallback, false); + + CLimitedSequentialInStream *streamSpec = new CLimitedSequentialInStream; + CMyComPtr inStream(streamSpec); + streamSpec->SetStream(_stream); + + for (i = 0; i < numItems; i++) + { + lps->InSize = lps->OutSize = currentTotalSize; + RINOK(lps->SetCur()); + CMyComPtr realOutStream; + Int32 askMode = testMode ? + NExtract::NAskMode::kTest : + NExtract::NAskMode::kExtract; + UInt32 index = allFilesMode ? i : indices[i]; + const CItem &item = _items[index]; + RINOK(extractCallback->GetStream(index, &realOutStream, askMode)); + currentTotalSize += item.Size; + + if (!testMode && !realOutStream) + continue; + RINOK(extractCallback->PrepareOperation(askMode)); + if (testMode) + { + RINOK(extractCallback->SetOperationResult(NExtract::NOperationResult::kOK)); + continue; + } + RINOK(_stream->Seek(_startPos + item.Offset, STREAM_SEEK_SET, NULL)); + streamSpec->Init(item.Size); + RINOK(copyCoder->Code(inStream, realOutStream, NULL, NULL, progress)); + realOutStream.Release(); + RINOK(extractCallback->SetOperationResult((copyCoderSpec->TotalSize == item.Size) ? + NExtract::NOperationResult::kOK: + NExtract::NOperationResult::kDataError)); + } + return S_OK; + COM_TRY_END +} + +STDMETHODIMP CHandler::GetStream(UInt32 index, ISequentialInStream **stream) +{ + COM_TRY_BEGIN + const CItem &item = _items[index]; + return CreateLimitedInStream(_stream, _startPos + item.Offset, item.Size, stream); + COM_TRY_END +} + +static IInArchive *CreateArc() { return new CHandler; } + +static CArcInfo g_ArcInfo = + { L"Mub", L"", 0, 0xE2, { 0xCA, 0xFE, 0xBA, 0xBE, 0, 0, 0 }, 7, false, CreateArc, 0 }; + +REGISTER_ARC(Mub) + +}} diff --git a/CPP/7zip/Archive/Nsis/NsisDecode.cpp b/CPP/7zip/Archive/Nsis/NsisDecode.cpp new file mode 100644 index 0000000..0845f96 --- /dev/null +++ b/CPP/7zip/Archive/Nsis/NsisDecode.cpp @@ -0,0 +1,130 @@ +// NsisDecode.cpp + +#include "StdAfx.h" + +#include "NsisDecode.h" + +#include "../../Common/StreamUtils.h" + +#include "../../Common/MethodId.h" + +#include "../../Compress/BZip2Decoder.h" +#include "../../Compress/DeflateDecoder.h" +#include "../../Compress/LzmaDecoder.h" + +namespace NArchive { +namespace NNsis { + +static const CMethodId k_BCJ_X86 = 0x03030103; + +HRESULT CDecoder::Init( + DECL_EXTERNAL_CODECS_LOC_VARS + IInStream *inStream, NMethodType::EEnum method, bool thereIsFilterFlag, bool &useFilter) +{ + useFilter = false; + CObjectVector< CMyComPtr > inStreams; + + if (_decoderInStream) + if (method != _method) + Release(); + _method = method; + if (!_codecInStream) + { + switch (method) + { + // case NMethodType::kCopy: return E_NOTIMPL; + case NMethodType::kDeflate: _codecInStream = new NCompress::NDeflate::NDecoder::CNsisCOMCoder(); break; + case NMethodType::kBZip2: _codecInStream = new NCompress::NBZip2::CNsisDecoder(); break; + case NMethodType::kLZMA: _codecInStream = new NCompress::NLzma::CDecoder(); break; + default: return E_NOTIMPL; + } + } + + if (thereIsFilterFlag) + { + UInt32 processedSize; + BYTE flag; + RINOK(inStream->Read(&flag, 1, &processedSize)); + if (processedSize != 1) + return E_FAIL; + if (flag > 1) + return E_NOTIMPL; + useFilter = (flag != 0); + } + + if (useFilter) + { + if (!_filterInStream) + { + CMyComPtr coder; + RINOK(CreateCoder( + EXTERNAL_CODECS_LOC_VARS + k_BCJ_X86, coder, false)); + if (!coder) + return E_NOTIMPL; + coder.QueryInterface(IID_ISequentialInStream, &_filterInStream); + if (!_filterInStream) + return E_NOTIMPL; + } + CMyComPtr setInStream; + _filterInStream.QueryInterface(IID_ICompressSetInStream, &setInStream); + if (!setInStream) + return E_NOTIMPL; + RINOK(setInStream->SetInStream(_codecInStream)); + _decoderInStream = _filterInStream; + } + else + _decoderInStream = _codecInStream; + + if (method == NMethodType::kLZMA) + { + CMyComPtr setDecoderProperties; + _codecInStream.QueryInterface(IID_ICompressSetDecoderProperties2, &setDecoderProperties); + if (setDecoderProperties) + { + static const UInt32 kPropertiesSize = 5; + BYTE properties[kPropertiesSize]; + UInt32 processedSize; + RINOK(inStream->Read(properties, kPropertiesSize, &processedSize)); + if (processedSize != kPropertiesSize) + return E_FAIL; + RINOK(setDecoderProperties->SetDecoderProperties2((const Byte *)properties, kPropertiesSize)); + } + } + + { + CMyComPtr setInStream; + _codecInStream.QueryInterface(IID_ICompressSetInStream, &setInStream); + if (!setInStream) + return E_NOTIMPL; + RINOK(setInStream->SetInStream(inStream)); + } + + { + CMyComPtr setOutStreamSize; + _codecInStream.QueryInterface(IID_ICompressSetOutStreamSize, &setOutStreamSize); + if (!setOutStreamSize) + return E_NOTIMPL; + RINOK(setOutStreamSize->SetOutStreamSize(NULL)); + } + + if (useFilter) + { + /* + CMyComPtr setOutStreamSize; + _filterInStream.QueryInterface(IID_ICompressSetOutStreamSize, &setOutStreamSize); + if (!setOutStreamSize) + return E_NOTIMPL; + RINOK(setOutStreamSize->SetOutStreamSize(NULL)); + */ + } + + return S_OK; +} + +HRESULT CDecoder::Read(void *data, size_t *processedSize) +{ + return ReadStream(_decoderInStream, data, processedSize);; +} + +}} diff --git a/CPP/7zip/Archive/Nsis/NsisDecode.h b/CPP/7zip/Archive/Nsis/NsisDecode.h new file mode 100644 index 0000000..36aeb2b --- /dev/null +++ b/CPP/7zip/Archive/Nsis/NsisDecode.h @@ -0,0 +1,47 @@ +// NsisDecode.h + +#ifndef __NSIS_DECODE_H +#define __NSIS_DECODE_H + +#include "../../IStream.h" + +#include "../../Common/CreateCoder.h" + +namespace NArchive { +namespace NNsis { + +namespace NMethodType +{ + enum EEnum + { + kCopy, + kDeflate, + kBZip2, + kLZMA + }; +} + +class CDecoder +{ + NMethodType::EEnum _method; + + CMyComPtr _filterInStream; + CMyComPtr _codecInStream; + CMyComPtr _decoderInStream; + +public: + void Release() + { + _filterInStream.Release(); + _codecInStream.Release(); + _decoderInStream.Release(); + } + HRESULT Init( + DECL_EXTERNAL_CODECS_LOC_VARS + IInStream *inStream, NMethodType::EEnum method, bool thereIsFilterFlag, bool &useFilter); + HRESULT Read(void *data, size_t *processedSize); +}; + +}} + +#endif diff --git a/CPP/7zip/Archive/Nsis/NsisHandler.cpp b/CPP/7zip/Archive/Nsis/NsisHandler.cpp new file mode 100644 index 0000000..4058bd2 --- /dev/null +++ b/CPP/7zip/Archive/Nsis/NsisHandler.cpp @@ -0,0 +1,510 @@ +// NSisHandler.cpp + +#include "StdAfx.h" + +#include "../../../../C/CpuArch.h" + +#include "Common/ComTry.h" +#include "Common/IntToString.h" + +#include "Windows/PropVariant.h" + +#include "../../Common/StreamUtils.h" + +#include "../Common/ItemNameUtils.h" + +#include "NsisHandler.h" + +#define Get32(p) GetUi32(p) + +using namespace NWindows; + +namespace NArchive { +namespace NNsis { + +static const char *kBcjMethod = "BCJ"; +static const char *kUnknownMethod = "Unknown"; + +static const char *kMethods[] = +{ + "Copy", + "Deflate", + "BZip2", + "LZMA" +}; + +static const int kNumMethods = sizeof(kMethods) / sizeof(kMethods[0]); + +static STATPROPSTG kProps[] = +{ + { NULL, kpidPath, VT_BSTR}, + { NULL, kpidSize, VT_UI8}, + { NULL, kpidPackSize, VT_UI8}, + { NULL, kpidMTime, VT_FILETIME}, + { NULL, kpidMethod, VT_BSTR}, + { NULL, kpidSolid, VT_BOOL} +}; + +static STATPROPSTG kArcProps[] = +{ + { NULL, kpidMethod, VT_BSTR}, + { NULL, kpidSolid, VT_BOOL} +}; + +IMP_IInArchive_Props +IMP_IInArchive_ArcProps + +STDMETHODIMP CHandler::GetArchiveProperty(PROPID propID, PROPVARIANT *value) +{ + COM_TRY_BEGIN + NWindows::NCOM::CPropVariant prop; + switch(propID) + { + case kpidMethod: + { + UInt32 dict = 1; + bool filter = false; + for (int i = 0; i < _archive.Items.Size(); i++) + { + const CItem &item = _archive.Items[i]; + filter |= item.UseFilter; + if (item.DictionarySize > dict) + dict = item.DictionarySize; + } + prop = GetMethod(filter, dict); + break; + } + case kpidSolid: prop = _archive.IsSolid; break; + } + prop.Detach(value); + return S_OK; + COM_TRY_END +} + + +STDMETHODIMP CHandler::Open(IInStream *stream, const UInt64 * maxCheckStartPosition, IArchiveOpenCallback * /* openArchiveCallback */) +{ + COM_TRY_BEGIN + Close(); + { + if (_archive.Open( + EXTERNAL_CODECS_VARS + stream, maxCheckStartPosition) != S_OK) + return S_FALSE; + _inStream = stream; + } + return S_OK; + COM_TRY_END +} + +STDMETHODIMP CHandler::Close() +{ + _archive.Clear(); + _archive.Release(); + _inStream.Release(); + return S_OK; +} + +STDMETHODIMP CHandler::GetNumberOfItems(UInt32 *numItems) +{ + *numItems = _archive.Items.Size() + #ifdef NSIS_SCRIPT + + 1 + #endif + ; + return S_OK; +} + +static AString UInt32ToString(UInt32 value) +{ + char buffer[16]; + ConvertUInt32ToString(value, buffer); + return buffer; +} + +static AString GetStringForSizeValue(UInt32 value) +{ + for (int i = 31; i >= 0; i--) + if (((UInt32)1 << i) == value) + return UInt32ToString(i); + char c = 'b'; + if (value % (1 << 20) == 0) + { + value >>= 20; + c = 'm'; + } + else if (value % (1 << 10) == 0) + { + value >>= 10; + c = 'k'; + } + return UInt32ToString(value) + c; +} + +AString CHandler::GetMethod(bool useItemFilter, UInt32 dictionary) const +{ + NMethodType::EEnum methodIndex = _archive.Method; + AString method; + if (_archive.IsSolid && _archive.UseFilter || !_archive.IsSolid && useItemFilter) + { + method += kBcjMethod; + method += ' '; + } + method += (methodIndex < kNumMethods) ? kMethods[methodIndex] : kUnknownMethod; + if (methodIndex == NMethodType::kLZMA) + { + method += ':'; + method += GetStringForSizeValue(_archive.IsSolid ? _archive.DictionarySize: dictionary); + } + return method; +} + +bool CHandler::GetUncompressedSize(int index, UInt32 &size) +{ + size = 0; + const CItem &item = _archive.Items[index]; + if (item.SizeIsDefined) + size = item.Size; + else if (_archive.IsSolid && item.EstimatedSizeIsDefined) + size = item.EstimatedSize; + else + return false; + return true; +} + +bool CHandler::GetCompressedSize(int index, UInt32 &size) +{ + size = 0; + const CItem &item = _archive.Items[index]; + if (item.CompressedSizeIsDefined) + size = item.CompressedSize; + else + { + if (_archive.IsSolid) + { + if (index == 0) + size = _archive.FirstHeader.GetDataSize(); + else + return false; + } + else + { + if (!item.IsCompressed) + size = item.Size; + else + return false; + } + } + return true; +} + + +STDMETHODIMP CHandler::GetProperty(UInt32 index, PROPID propID, PROPVARIANT *value) +{ + COM_TRY_BEGIN + NWindows::NCOM::CPropVariant prop; + #ifdef NSIS_SCRIPT + if (index >= (UInt32)_archive.Items.Size()) + { + switch(propID) + { + case kpidPath: prop = L"[NSIS].nsi"; break; + case kpidSize: + case kpidPackSize: prop = (UInt64)_archive.Script.Length(); break; + case kpidSolid: prop = false; break; + } + } + else + #endif + { + const CItem &item = _archive.Items[index]; + switch(propID) + { + case kpidPath: + { + UString s = NItemName::WinNameToOSName(item.GetReducedName(_archive.IsUnicode)); + if (!s.IsEmpty()) + prop = (const wchar_t *)s; + break; + } + case kpidSize: + { + UInt32 size; + if (GetUncompressedSize(index, size)) + prop = (UInt64)size; + break; + } + case kpidPackSize: + { + UInt32 size; + if (GetCompressedSize(index, size)) + prop = (UInt64)size; + break; + } + case kpidMTime: + { + if (item.MTime.dwHighDateTime > 0x01000000 && + item.MTime.dwHighDateTime < 0xFF000000) + prop = item.MTime; + break; + } + case kpidMethod: prop = GetMethod(item.UseFilter, item.DictionarySize); break; + case kpidSolid: prop = _archive.IsSolid; break; + } + } + prop.Detach(value); + return S_OK; + COM_TRY_END +} + +STDMETHODIMP CHandler::Extract(const UInt32 *indices, UInt32 numItems, + Int32 testMode, IArchiveExtractCallback *extractCallback) +{ + COM_TRY_BEGIN + bool allFilesMode = (numItems == (UInt32)-1); + if (allFilesMode) + GetNumberOfItems(&numItems); + if (numItems == 0) + return S_OK; + UInt64 totalSize = 0; + + UInt32 i; + for (i = 0; i < numItems; i++) + { + UInt32 index = (allFilesMode ? i : indices[i]); + #ifdef NSIS_SCRIPT + if (index >= (UInt32)_archive.Items.Size()) + totalSize += _archive.Script.Length(); + else + #endif + { + UInt32 size; + if (_archive.IsSolid) + { + GetUncompressedSize(index, size); + UInt64 pos = _archive.GetPosOfSolidItem(index); + if (pos > totalSize) + totalSize = pos + size; + } + else + { + GetCompressedSize(index, size); + totalSize += size; + } + } + } + extractCallback->SetTotal(totalSize); + + UInt64 currentTotalSize = 0; + UInt32 currentItemSize = 0; + + UInt64 streamPos = 0; + if (_archive.IsSolid) + { + RINOK(_inStream->Seek(_archive.StreamOffset, STREAM_SEEK_SET, NULL)); + bool useFilter; + RINOK(_archive.Decoder.Init( + EXTERNAL_CODECS_VARS + _inStream, _archive.Method, _archive.FilterFlag, useFilter)); + } + + CByteBuffer byteBuf; + const UInt32 kBufferLength = 1 << 16; + byteBuf.SetCapacity(kBufferLength); + Byte *buffer = byteBuf; + + CByteBuffer tempBuf; + + bool dataError = false; + for (i = 0; i < numItems; i++, currentTotalSize += currentItemSize) + { + currentItemSize = 0; + RINOK(extractCallback->SetCompleted(¤tTotalSize)); + CMyComPtr realOutStream; + Int32 askMode = testMode ? + NExtract::NAskMode::kTest : + NExtract::NAskMode::kExtract; + UInt32 index = allFilesMode ? i : indices[i]; + + RINOK(extractCallback->GetStream(index, &realOutStream, askMode)); + + #ifdef NSIS_SCRIPT + if (index >= (UInt32)_archive.Items.Size()) + { + currentItemSize = _archive.Script.Length(); + if (!testMode && !realOutStream) + continue; + RINOK(extractCallback->PrepareOperation(askMode)); + if (!testMode) + RINOK(WriteStream(realOutStream, (const char *)_archive.Script, (UInt32)_archive.Script.Length())); + } + else + #endif + { + const CItem &item = _archive.Items[index]; + + if (_archive.IsSolid) + GetUncompressedSize(index, currentItemSize); + else + GetCompressedSize(index, currentItemSize); + + if (!testMode && !realOutStream) + continue; + + RINOK(extractCallback->PrepareOperation(askMode)); + + if (!dataError) + { + bool needDecompress = false; + bool sizeIsKnown = false; + UInt32 fullSize = 0; + + bool writeToTemp = false; + bool readFromTemp = false; + + if (_archive.IsSolid) + { + UInt64 pos = _archive.GetPosOfSolidItem(index); + while (streamPos < pos) + { + size_t processedSize = (UInt32)MyMin(pos - streamPos, (UInt64)kBufferLength); + HRESULT res = _archive.Decoder.Read(buffer, &processedSize); + if (res != S_OK) + { + if (res != S_FALSE) + return res; + dataError = true; + break; + } + if (processedSize == 0) + { + dataError = true; + break; + } + streamPos += processedSize; + } + if (streamPos == pos) + { + Byte buffer2[4]; + size_t processedSize = 4; + RINOK(_archive.Decoder.Read(buffer2, &processedSize)); + if (processedSize != 4) + return E_FAIL; + streamPos += processedSize; + fullSize = Get32(buffer2); + sizeIsKnown = true; + needDecompress = true; + + if (!testMode && i + 1 < numItems) + { + UInt64 nextPos = _archive.GetPosOfSolidItem(allFilesMode ? i : indices[i + 1]); + if (nextPos < streamPos + fullSize) + { + tempBuf.Free(); + tempBuf.SetCapacity(fullSize); + writeToTemp = true; + } + } + } + else + readFromTemp = true; + } + else + { + RINOK(_inStream->Seek(_archive.GetPosOfNonSolidItem(index) + 4, STREAM_SEEK_SET, NULL)); + if (item.IsCompressed) + { + needDecompress = true; + bool useFilter; + RINOK(_archive.Decoder.Init( + EXTERNAL_CODECS_VARS + _inStream, _archive.Method, _archive.FilterFlag, useFilter)); + // fullSize = Get32(buffer); // It's bug !!! + // Test it: what is exact fullSize? + fullSize = 0xFFFFFFFF; + } + else + fullSize = item.Size; + } + if (!dataError) + { + if (needDecompress) + { + UInt64 offset = 0; + while (!sizeIsKnown || fullSize > 0) + { + UInt32 curSize = kBufferLength; + if (sizeIsKnown && curSize > fullSize) + curSize = fullSize; + size_t processedSize = curSize; + HRESULT res = _archive.Decoder.Read(buffer, &processedSize); + if (res != S_OK) + { + if (res != S_FALSE) + return res; + dataError = true; + break; + } + if (processedSize == 0) + { + if (sizeIsKnown) + dataError = true; + break; + } + + if (writeToTemp) + memcpy((Byte *)tempBuf + (size_t)offset, buffer, processedSize); + + fullSize -= (UInt32)processedSize; + streamPos += processedSize; + offset += processedSize; + + UInt64 completed; + if (_archive.IsSolid) + completed = currentTotalSize + offset; + else + completed = streamPos; + RINOK(extractCallback->SetCompleted(&completed)); + if (!testMode) + RINOK(WriteStream(realOutStream, buffer, processedSize)); + } + } + else + { + if (readFromTemp) + { + if (!testMode) + RINOK(WriteStream(realOutStream, tempBuf, tempBuf.GetCapacity())); + } + else + while (fullSize > 0) + { + UInt32 curSize = MyMin(fullSize, kBufferLength); + UInt32 processedSize; + RINOK(_inStream->Read(buffer, curSize, &processedSize)); + if (processedSize == 0) + { + dataError = true; + break; + } + fullSize -= processedSize; + streamPos += processedSize; + if (!testMode) + RINOK(WriteStream(realOutStream, buffer, processedSize)); + } + } + } + } + } + realOutStream.Release(); + RINOK(extractCallback->SetOperationResult(dataError ? + NExtract::NOperationResult::kDataError : + NExtract::NOperationResult::kOK)); + } + return S_OK; + COM_TRY_END +} + +IMPL_ISetCompressCodecsInfo + +}} diff --git a/CPP/7zip/Archive/Nsis/NsisHandler.h b/CPP/7zip/Archive/Nsis/NsisHandler.h new file mode 100644 index 0000000..6de493d --- /dev/null +++ b/CPP/7zip/Archive/Nsis/NsisHandler.h @@ -0,0 +1,43 @@ +// NSisHandler.h + +#ifndef __NSIS_HANDLER_H +#define __NSIS_HANDLER_H + +#include "Common/MyCom.h" +#include "../IArchive.h" + +#include "NsisIn.h" + +#include "../../Common/CreateCoder.h" + +namespace NArchive { +namespace NNsis { + +class CHandler: + public IInArchive, + PUBLIC_ISetCompressCodecsInfo + public CMyUnknownImp +{ + CMyComPtr _inStream; + CInArchive _archive; + + DECL_EXTERNAL_CODECS_VARS + + bool GetUncompressedSize(int index, UInt32 &size); + bool GetCompressedSize(int index, UInt32 &size); + + AString GetMethod(bool useItemFilter, UInt32 dictionary) const; +public: + MY_QUERYINTERFACE_BEGIN2(IInArchive) + QUERY_ENTRY_ISetCompressCodecsInfo + MY_QUERYINTERFACE_END + MY_ADDREF_RELEASE + + INTERFACE_IInArchive(;) + + DECL_ISetCompressCodecsInfo +}; + +}} + +#endif diff --git a/CPP/7zip/Archive/Nsis/NsisIn.cpp b/CPP/7zip/Archive/Nsis/NsisIn.cpp new file mode 100644 index 0000000..4075600 --- /dev/null +++ b/CPP/7zip/Archive/Nsis/NsisIn.cpp @@ -0,0 +1,1461 @@ +// NsisIn.cpp + +#include "StdAfx.h" + +#include "../../../../C/CpuArch.h" + +#include "Common/IntToString.h" + +#include "../../Common/StreamUtils.h" + +#include "NsisIn.h" + +#define Get32(p) GetUi32(p) + +namespace NArchive { +namespace NNsis { + +Byte kSignature[kSignatureSize] = NSIS_SIGNATURE; + +#ifdef NSIS_SCRIPT +static const char *kCrLf = "\x0D\x0A"; +#endif + +#define NS_UN_SKIP_CODE 0xE000 +#define NS_UN_VAR_CODE 0xE001 +#define NS_UN_SHELL_CODE 0xE002 +#define NS_UN_LANG_CODE 0xE003 +#define NS_UN_CODES_START NS_UN_SKIP_CODE +#define NS_UN_CODES_END NS_UN_LANG_CODE + +Byte CInArchive::ReadByte() +{ + if (_posInData >= _size) + throw 1; + return _data[_posInData++]; +} + +UInt32 CInArchive::ReadUInt32() +{ + UInt32 value = 0; + for (int i = 0; i < 4; i++) + value |= ((UInt32)(ReadByte()) << (8 * i)); + return value; +} + +void CInArchive::ReadBlockHeader(CBlockHeader &bh) +{ + bh.Offset = ReadUInt32(); + bh.Num = ReadUInt32(); +} + +#define RINOZ(x) { int __tt = (x); if (__tt != 0) return __tt; } + +static int CompareItems(void *const *p1, void *const *p2, void * /* param */) +{ + const CItem &i1 = **(CItem **)p1; + const CItem &i2 = **(CItem **)p2; + RINOZ(MyCompare(i1.Pos, i2.Pos)); + if (i1.IsUnicode) + { + RINOZ(i1.PrefixU.Compare(i2.PrefixU)); + RINOZ(i1.NameU.Compare(i2.NameU)); + } + else + { + RINOZ(i1.PrefixA.Compare(i2.PrefixA)); + RINOZ(i1.NameA.Compare(i2.NameA)); + } + return 0; +} + +static AString UIntToString(UInt32 v) +{ + char sz[32]; + ConvertUInt64ToString(v, sz); + return sz; +} + +static AString IntToString(Int32 v) +{ + char sz[32]; + ConvertInt64ToString(v, sz); + return sz; +} + +AString CInArchive::ReadStringA(UInt32 pos) const +{ + AString s; + if (pos >= _size) + return IntToString((Int32)pos); + UInt32 offset = GetOffset() + _stringsPos + pos; + for (;;) + { + if (offset >= _size) + break; // throw 1; + char c = _data[offset++]; + if (c == 0) + break; + s += c; + } + return s; +} + +UString CInArchive::ReadStringU(UInt32 pos) const +{ + UString s; + UInt32 offset = GetOffset() + _stringsPos + (pos * 2); + for (;;) + { + if (offset >= _size || offset + 1 >= _size) + return s; // throw 1; + char c0 = _data[offset++]; + char c1 = _data[offset++]; + wchar_t c = (c0 | ((wchar_t)c1 << 8)); + if (c == 0) + break; + s += c; + } + return s; +} + +/* +static AString ParsePrefix(const AString &prefix) +{ + AString res = prefix; + if (prefix.Length() >= 3) + { + if ((Byte)prefix[0] == 0xFD && (Byte)prefix[1] == 0x95 && (Byte)prefix[2] == 0x80) + res = "$INSTDIR" + prefix.Mid(3); + else if ((Byte)prefix[0] == 0xFD && (Byte)prefix[1] == 0x96 && (Byte)prefix[2] == 0x80) + res = "$OUTDIR" + prefix.Mid(3); + } + return res; +} +*/ + +#define SYSREGKEY "Software\\Microsoft\\Windows\\CurrentVersion" + +/* +# define CSIDL_PROGRAMS 0x2 +# define CSIDL_PRINTERS 0x4 +# define CSIDL_PERSONAL 0x5 +# define CSIDL_FAVORITES 0x6 +# define CSIDL_STARTUP 0x7 +# define CSIDL_RECENT 0x8 +# define CSIDL_SENDTO 0x9 +# define CSIDL_STARTMENU 0xB +# define CSIDL_MYMUSIC 0xD +# define CSIDL_MYVIDEO 0xE + +# define CSIDL_DESKTOPDIRECTORY 0x10 +# define CSIDL_NETHOOD 0x13 +# define CSIDL_FONTS 0x14 +# define CSIDL_TEMPLATES 0x15 +# define CSIDL_COMMON_STARTMENU 0x16 +# define CSIDL_COMMON_PROGRAMS 0x17 +# define CSIDL_COMMON_STARTUP 0x18 +# define CSIDL_COMMON_DESKTOPDIRECTORY 0x19 +# define CSIDL_APPDATA 0x1A +# define CSIDL_PRINTHOOD 0x1B +# define CSIDL_LOCAL_APPDATA 0x1C +# define CSIDL_ALTSTARTUP 0x1D +# define CSIDL_COMMON_ALTSTARTUP 0x1E +# define CSIDL_COMMON_FAVORITES 0x1F + +# define CSIDL_INTERNET_CACHE 0x20 +# define CSIDL_COOKIES 0x21 +# define CSIDL_HISTORY 0x22 +# define CSIDL_COMMON_APPDATA 0x23 +# define CSIDL_WINDOWS 0x24 +# define CSIDL_SYSTEM 0x25 +# define CSIDL_PROGRAM_FILES 0x26 +# define CSIDL_MYPICTURES 0x27 +# define CSIDL_PROFILE 0x28 +# define CSIDL_PROGRAM_FILES_COMMON 0x2B +# define CSIDL_COMMON_TEMPLATES 0x2D +# define CSIDL_COMMON_DOCUMENTS 0x2E +# define CSIDL_COMMON_ADMINTOOLS 0x2F + +# define CSIDL_ADMINTOOLS 0x30 +# define CSIDL_COMMON_MUSIC 0x35 +# define CSIDL_COMMON_PICTURES 0x36 +# define CSIDL_COMMON_VIDEO 0x37 +# define CSIDL_RESOURCES 0x38 +# define CSIDL_RESOURCES_LOCALIZED 0x39 +# define CSIDL_CDBURN_AREA 0x3B +*/ + +struct CCommandPair +{ + int NumParams; + const char *Name; +}; + +enum +{ + // 0 + EW_INVALID_OPCODE, // zero is invalid. useful for catching errors. (otherwise an all zeroes instruction + // does nothing, which is easily ignored but means something is wrong. + EW_RET, // return from function call + EW_NOP, // Nop/Jump, do nothing: 1, [?new address+1:advance one] + EW_ABORT, // Abort: 1 [status] + EW_QUIT, // Quit: 0 + EW_CALL, // Call: 1 [new address+1] + EW_UPDATETEXT, // Update status text: 2 [update str, ui_st_updateflag=?ui_st_updateflag:this] + EW_SLEEP, // Sleep: 1 [sleep time in milliseconds] + EW_BRINGTOFRONT, // BringToFront: 0 + EW_CHDETAILSVIEW, // SetDetailsView: 2 [listaction,buttonaction] + + // 10 + EW_SETFILEATTRIBUTES, // SetFileAttributes: 2 [filename, attributes] + EW_CREATEDIR, // Create directory: 2, [path, ?update$INSTDIR] + EW_IFFILEEXISTS, // IfFileExists: 3, [file name, jump amount if exists, jump amount if not exists] + EW_SETFLAG, // Sets a flag: 2 [id, data] + EW_IFFLAG, // If a flag: 4 [on, off, id, new value mask] + EW_GETFLAG, // Gets a flag: 2 [output, id] + EW_RENAME, // Rename: 3 [old, new, rebootok] + EW_GETFULLPATHNAME, // GetFullPathName: 2 [output, input, ?lfn:sfn] + EW_SEARCHPATH, // SearchPath: 2 [output, filename] + EW_GETTEMPFILENAME, // GetTempFileName: 2 [output, base_dir] + + // 20 + EW_EXTRACTFILE, // File to extract: 6 [overwriteflag, output filename, compressed filedata, filedatetimelow, filedatetimehigh, allow ignore] + // overwriteflag: 0x1 = no. 0x0=force, 0x2=try, 0x3=if date is newer + EW_DELETEFILE, // Delete File: 2, [filename, rebootok] + EW_MESSAGEBOX, // MessageBox: 5,[MB_flags,text,retv1:retv2,moveonretv1:moveonretv2] + EW_RMDIR, // RMDir: 2 [path, recursiveflag] + EW_STRLEN, // StrLen: 2 [output, input] + EW_ASSIGNVAR, // Assign: 4 [variable (0-9) to assign, string to assign, maxlen, startpos] + EW_STRCMP, // StrCmp: 5 [str1, str2, jump_if_equal, jump_if_not_equal, case-sensitive?] + EW_READENVSTR, // ReadEnvStr/ExpandEnvStrings: 3 [output, string_with_env_variables, IsRead] + EW_INTCMP, // IntCmp: 6 [val1, val2, equal, val1val2, unsigned?] + EW_INTOP, // IntOp: 4 [output, input1, input2, op] where op: 0=add, 1=sub, 2=mul, 3=div, 4=bor, 5=band, 6=bxor, 7=bnot input1, 8=lnot input1, 9=lor, 10=land], 11=1%2 + + // 30 + EW_INTFMT, // IntFmt: [output, format, input] + EW_PUSHPOP, // Push/Pop/Exchange: 3 [variable/string, ?pop:push, ?exch] + EW_FINDWINDOW, // FindWindow: 5, [outputvar, window class,window name, window_parent, window_after] + EW_SENDMESSAGE, // SendMessage: 6 [output, hwnd, msg, wparam, lparam, [wparamstring?1:0 | lparamstring?2:0 | timeout<<2] + EW_ISWINDOW, // IsWindow: 3 [hwnd, jump_if_window, jump_if_notwindow] + EW_GETDLGITEM, // GetDlgItem: 3: [outputvar, dialog, item_id] + EW_SETCTLCOLORS, // SerCtlColors: 3: [hwnd, pointer to struct colors] + EW_SETBRANDINGIMAGE, // SetBrandingImage: 1: [Bitmap file] + EW_CREATEFONT, // CreateFont: 5: [handle output, face name, height, weight, flags] + EW_SHOWWINDOW, // ShowWindow: 2: [hwnd, show state] + + // 40 + EW_SHELLEXEC, // ShellExecute program: 4, [shell action, complete commandline, parameters, showwindow] + EW_EXECUTE, // Execute program: 3,[complete command line,waitflag,>=0?output errorcode] + EW_GETFILETIME, // GetFileTime; 3 [file highout lowout] + EW_GETDLLVERSION, // GetDLLVersion: 3 [file highout lowout] + EW_REGISTERDLL, // Register DLL: 3,[DLL file name, string ptr of function to call, text to put in display (<0 if none/pass parms), 1 - no unload, 0 - unload] + EW_CREATESHORTCUT, // Make Shortcut: 5, [link file, target file, parameters, icon file, iconindex|show mode<<8|hotkey<<16] + EW_COPYFILES, // CopyFiles: 3 [source mask, destination location, flags] + EW_REBOOT, // Reboot: 0 + EW_WRITEINI, // Write INI String: 4, [Section, Name, Value, INI File] + EW_READINISTR, // ReadINIStr: 4 [output, section, name, ini_file] + + // 50 + EW_DELREG, // DeleteRegValue/DeleteRegKey: 4, [root key(int), KeyName, ValueName, delkeyonlyifempty]. ValueName is -1 if delete key + EW_WRITEREG, // Write Registry value: 5, [RootKey(int),KeyName,ItemName,ItemData,typelen] + // typelen=1 for str, 2 for dword, 3 for binary, 0 for expanded str + EW_READREGSTR, // ReadRegStr: 5 [output, rootkey(int), keyname, itemname, ==1?int::str] + EW_REGENUM, // RegEnum: 5 [output, rootkey, keyname, index, ?key:value] + EW_FCLOSE, // FileClose: 1 [handle] + EW_FOPEN, // FileOpen: 4 [name, openmode, createmode, outputhandle] + EW_FPUTS, // FileWrite: 3 [handle, string, ?int:string] + EW_FGETS, // FileRead: 4 [handle, output, maxlen, ?getchar:gets] + EW_FSEEK, // FileSeek: 4 [handle, offset, mode, >=0?positionoutput] + EW_FINDCLOSE, // FindClose: 1 [handle] + + // 60 + EW_FINDNEXT, // FindNext: 2 [output, handle] + EW_FINDFIRST, // FindFirst: 2 [filespec, output, handleoutput] + EW_WRITEUNINSTALLER, // WriteUninstaller: 3 [name, offset, icon_size] + EW_LOG, // LogText: 2 [0, text] / LogSet: [1, logstate] + EW_SECTIONSET, // SectionSetText: 3: [idx, 0, text] + // SectionGetText: 3: [idx, 1, output] + // SectionSetFlags: 3: [idx, 2, flags] + // SectionGetFlags: 3: [idx, 3, output] + EW_INSTTYPESET, // InstTypeSetFlags: 3: [idx, 0, flags] + // InstTypeGetFlags: 3: [idx, 1, output] + // instructions not actually implemented in exehead, but used in compiler. + EW_GETLABELADDR, // both of these get converted to EW_ASSIGNVAR + EW_GETFUNCTIONADDR, + + EW_LOCKWINDOW +}; + +#ifdef NSIS_SCRIPT +static CCommandPair kCommandPairs[] = +{ + { 0, "Invalid" }, + { 0, "Return" }, + { 1, "Goto" }, + { 0, "Abort" }, + { 0, "Quit" }, + { 1, "Call" }, + { 2, "UpdateSatusText" }, + { 1, "Sleep" }, + { 0, "BringToFront" }, + { 2, "SetDetailsView" }, + + { 2, "SetFileAttributes" }, + { 2, "SetOutPath" }, + { 3, "IfFileExists" }, + { 2, "SetFlag" }, + { 4, "IfFlag" }, + { 2, "GetFlag" }, + { 3, "Rename" }, + { 2, "GetFullPathName" }, + { 2, "SearchPath" }, + { 2, "GetTempFileName" }, + + { 6, "File" }, + { 2, "Delete" }, + { 5, "MessageBox" }, + { 2, "RMDir" }, + { 2, "StrLen" }, + { 4, "StrCpy" }, + { 5, "StrCmp" }, + { 3, "ReadEnvStr" }, + { 6, "IntCmp" }, + { 4, "IntOp" }, + + { 3, "IntFmt" }, + { 3, "PushPop" }, + { 5, "FindWindow" }, + { 6, "SendMessage" }, + { 3, "IsWindow" }, + { 3, "GetDlgItem" }, + { 3, "SerCtlColors" }, + { 1, "SetBrandingImage" }, + { 5, "CreateFont" }, + { 2, "ShowWindow" }, + + { 4, "ShellExecute" }, + { 3, "Execute" }, + { 3, "GetFileTime" }, + { 3, "GetDLLVersion" }, + { 3, "RegisterDLL" }, + { 5, "CreateShortCut" }, + { 3, "CopyFiles" }, + { 0, "Reboot" }, + { 4, "WriteINIStr" }, + { 4, "ReadINIStr" }, + + { 4, "DelReg" }, + { 5, "WriteReg" }, + { 5, "ReadRegStr" }, + { 5, "RegEnum" }, + { 1, "FileClose" }, + { 4, "FileOpen" }, + { 3, "FileWrite" }, + { 4, "FileRead" }, + { 4, "FileSeek" }, + { 1, "FindClose" }, + + { 2, "FindNext" }, + { 2, "FindFirst" }, + { 3, "WriteUninstaller" }, + { 2, "LogText" }, + { 3, "Section?etText" }, + { 3, "InstType?etFlags" }, + { 6, "GetLabelAddr" }, + { 2, "GetFunctionAddress" }, + { 6, "LockWindow" } +}; + +#endif + +static const char *kShellStrings[] = +{ + "", + "", + + "SMPROGRAMS", + "", + "PRINTERS", + "DOCUMENTS", + "FAVORITES", + "SMSTARTUP", + "RECENT", + "SENDTO", + "", + "STARTMENU", + "", + "MUSIC", + "VIDEO", + "", + + "DESKTOP", + "", + "", + "NETHOOD", + "FONTS", + "TEMPLATES", + "COMMONSTARTMENU", + "COMMONFILES", + "COMMON_STARTUP", + "COMMON_DESKTOPDIRECTORY", + "QUICKLAUNCH", + "PRINTHOOD", + "LOCALAPPDATA", + "ALTSTARTUP", + "ALTSTARTUP", + "FAVORITES", + + "INTERNET_CACHE", + "COOKIES", + "HISTORY", + "APPDATA", + "WINDIR", + "SYSDIR", + "PROGRAMFILES", + "PICTURES", + "PROFILE", + "", + "", + "COMMONFILES", + "", + "TEMPLATES", + "DOCUMENTS", + "ADMINTOOLS", + + "ADMINTOOLS", + "", + "", + "", + "", + "MUSIC", + "PICTURES", + "VIDEO", + "RESOURCES", + "RESOURCES_LOCALIZED", + "", + "CDBURN_AREA" +}; + +static const int kNumShellStrings = sizeof(kShellStrings) / sizeof(kShellStrings[0]); + +/* +# define CMDLINE 20 // everything before here doesn't have trailing slash removal +# define INSTDIR 21 +# define OUTDIR 22 +# define EXEDIR 23 +# define LANGUAGE 24 +# define TEMP 25 +# define PLUGINSDIR 26 +# define HWNDPARENT 27 +# define _CLICK 28 +# define _OUTDIR 29 +*/ + +static const char *kVarStrings[] = +{ + "CMDLINE", + "INSTDIR", + "OUTDIR", + "EXEDIR", + "LANGUAGE", + "TEMP", + "PLUGINSDIR", + "EXEPATH", // test it + "EXEFILE", // test it + "HWNDPARENT", + "_CLICK", + "_OUTDIR" +}; + +static const int kNumVarStrings = sizeof(kVarStrings) / sizeof(kVarStrings[0]); + + +static AString GetVar(UInt32 index) +{ + AString res = "$"; + if (index < 10) + res += UIntToString(index); + else if (index < 20) + { + res += "R"; + res += UIntToString(index - 10); + } + else if (index < 20 + kNumVarStrings) + res += kVarStrings[index - 20]; + else + { + res += "["; + res += UIntToString(index); + res += "]"; + } + return res; +} + +#define NS_SKIP_CODE 252 +#define NS_VAR_CODE 253 +#define NS_SHELL_CODE 254 +#define NS_LANG_CODE 255 +#define NS_CODES_START NS_SKIP_CODE + +static AString GetShellString(int index) +{ + AString res = "$"; + if (index < kNumShellStrings) + { + const char *sz = kShellStrings[index]; + if (sz[0] != 0) + return res + sz; + } + res += "SHELL["; + res += UIntToString(index); + res += "]"; + return res; +} + +// Based on Dave Laundon's simplified process_string +AString GetNsisString(const AString &s) +{ + AString res; + for (int i = 0; i < s.Length();) + { + unsigned char nVarIdx = s[i++]; + if (nVarIdx > NS_CODES_START && i + 2 <= s.Length()) + { + int nData = s[i++] & 0x7F; + unsigned char c1 = s[i++]; + nData |= (((int)(c1 & 0x7F)) << 7); + + if (nVarIdx == NS_SHELL_CODE) + res += GetShellString(c1); + else if (nVarIdx == NS_VAR_CODE) + res += GetVar(nData); + else if (nVarIdx == NS_LANG_CODE) + res += "NS_LANG_CODE"; + } + else if (nVarIdx == NS_SKIP_CODE) + { + if (i < s.Length()) + res += s[i++]; + } + else // Normal char + res += (char)nVarIdx; + } + return res; +} + +UString GetNsisString(const UString &s) +{ + UString res; + for (int i = 0; i < s.Length();) + { + wchar_t nVarIdx = s[i++]; + if (nVarIdx > NS_UN_CODES_START && nVarIdx <= NS_UN_CODES_END) + { + if (i == s.Length()) + break; + int nData = s[i++] & 0x7FFF; + + if (nVarIdx == NS_UN_SHELL_CODE) + res += GetUnicodeString(GetShellString(nData >> 8)); + else if (nVarIdx == NS_UN_VAR_CODE) + res += GetUnicodeString(GetVar(nData)); + else if (nVarIdx == NS_UN_LANG_CODE) + res += L"NS_LANG_CODE"; + } + else if (nVarIdx == NS_UN_SKIP_CODE) + { + if (i == s.Length()) + break; + res += s[i++]; + } + else // Normal char + res += (char)nVarIdx; + } + return res; +} + +AString CInArchive::ReadString2A(UInt32 pos) const +{ + return GetNsisString(ReadStringA(pos)); +} + +UString CInArchive::ReadString2U(UInt32 pos) const +{ + return GetNsisString(ReadStringU(pos)); +} + +AString CInArchive::ReadString2(UInt32 pos) const +{ + if (IsUnicode) + return UnicodeStringToMultiByte(ReadString2U(pos)); + else + return ReadString2A(pos); +} + +AString CInArchive::ReadString2Qw(UInt32 pos) const +{ + return "\"" + ReadString2(pos) + "\""; +} + +#define DEL_DIR 1 +#define DEL_RECURSE 2 +#define DEL_REBOOT 4 +// #define DEL_SIMPLE 8 + +static const int kNumEntryParams = 6; + +struct CEntry +{ + UInt32 Which; + UInt32 Params[kNumEntryParams]; + AString GetParamsString(int numParams); + CEntry() + { + Which = 0; + for (UInt32 j = 0; j < kNumEntryParams; j++) + Params[j] = 0; + } +}; + +AString CEntry::GetParamsString(int numParams) +{ + AString s; + for (int i = 0; i < numParams; i++) + { + s += " "; + UInt32 v = Params[i]; + if (v > 0xFFF00000) + s += IntToString((Int32)Params[i]); + else + s += UIntToString(Params[i]); + } + return s; +} + +#ifdef NSIS_SCRIPT + +static AString GetRegRootID(UInt32 val) +{ + const char *s; + switch(val) + { + case 0: s = "SHCTX"; break; + case 0x80000000: s = "HKCR"; break; + case 0x80000001: s = "HKCU"; break; + case 0x80000002: s = "HKLM"; break; + case 0x80000003: s = "HKU"; break; + case 0x80000004: s = "HKPD"; break; + case 0x80000005: s = "HKCC"; break; + case 0x80000006: s = "HKDD"; break; + case 0x80000050: s = "HKPT"; break; + case 0x80000060: s = "HKPN"; break; + default: + return UIntToString(val); break; + } + return s; +} + +#endif + +HRESULT CInArchive::ReadEntries(const CBlockHeader &bh) +{ + _posInData = bh.Offset + GetOffset(); + AString prefixA; + UString prefixU; + for (UInt32 i = 0; i < bh.Num; i++) + { + CEntry e; + e.Which = ReadUInt32(); + for (UInt32 j = 0; j < kNumEntryParams; j++) + e.Params[j] = ReadUInt32(); + #ifdef NSIS_SCRIPT + if (e.Which != EW_PUSHPOP && e.Which < sizeof(kCommandPairs) / sizeof(kCommandPairs[0])) + { + const CCommandPair &pair = kCommandPairs[e.Which]; + Script += pair.Name; + } + #endif + + switch (e.Which) + { + case EW_CREATEDIR: + { + if (IsUnicode) + { + prefixU.Empty(); + prefixU = ReadString2U(e.Params[0]); + } + else + { + prefixA.Empty(); + prefixA = ReadString2A(e.Params[0]); + } + #ifdef NSIS_SCRIPT + Script += " "; + if (IsUnicode) + Script += UnicodeStringToMultiByte(prefixU); + else + Script += prefixA; + #endif + break; + } + + case EW_EXTRACTFILE: + { + CItem item; + item.IsUnicode = IsUnicode; + if (IsUnicode) + { + item.PrefixU = prefixU; + item.NameU = ReadString2U(e.Params[1]); + } + else + { + item.PrefixA = prefixA; + item.NameA = ReadString2A(e.Params[1]); + } + /* UInt32 overwriteFlag = e.Params[0]; */ + item.Pos = e.Params[2]; + item.MTime.dwLowDateTime = e.Params[3]; + item.MTime.dwHighDateTime = e.Params[4]; + /* UInt32 allowIgnore = e.Params[5]; */ + if (Items.Size() > 0) + { + /* + if (item.Pos == Items.Back().Pos) + continue; + */ + } + Items.Add(item); + #ifdef NSIS_SCRIPT + Script += " "; + + if (IsUnicode) + Script += UnicodeStringToMultiByte(item.NameU); + else + Script += item.NameA; + #endif + break; + } + + + #ifdef NSIS_SCRIPT + case EW_UPDATETEXT: + { + Script += " "; + Script += ReadString2(e.Params[0]); + Script += " "; + Script += UIntToString(e.Params[1]); + break; + } + case EW_SETFILEATTRIBUTES: + { + Script += " "; + Script += ReadString2(e.Params[0]); + Script += " "; + Script += UIntToString(e.Params[1]); + break; + } + case EW_IFFILEEXISTS: + { + Script += " "; + Script += ReadString2(e.Params[0]); + Script += " "; + Script += UIntToString(e.Params[1]); + Script += " "; + Script += UIntToString(e.Params[2]); + break; + } + case EW_RENAME: + { + Script += " "; + Script += ReadString2(e.Params[0]); + Script += " "; + Script += ReadString2(e.Params[1]); + Script += " "; + Script += UIntToString(e.Params[2]); + break; + } + case EW_GETFULLPATHNAME: + { + Script += " "; + Script += ReadString2(e.Params[0]); + Script += " "; + Script += ReadString2(e.Params[1]); + Script += " "; + Script += UIntToString(e.Params[2]); + break; + } + case EW_SEARCHPATH: + { + Script += " "; + Script += ReadString2(e.Params[0]); + Script += " "; + Script += ReadString2(e.Params[1]); + break; + } + case EW_GETTEMPFILENAME: + { + AString s; + Script += " "; + Script += ReadString2(e.Params[0]); + Script += " "; + Script += ReadString2(e.Params[1]); + break; + } + + case EW_DELETEFILE: + { + UInt64 flag = e.Params[1]; + if (flag != 0) + { + Script += " "; + if (flag == DEL_REBOOT) + Script += "/REBOOTOK"; + else + Script += UIntToString(e.Params[1]); + } + Script += " "; + Script += ReadString2(e.Params[0]); + break; + } + case EW_RMDIR: + { + UInt64 flag = e.Params[1]; + if (flag != 0) + { + if ((flag & DEL_REBOOT) != 0) + Script += " /REBOOTOK"; + if ((flag & DEL_RECURSE) != 0) + Script += " /r"; + } + Script += " "; + Script += ReadString2(e.Params[0]); + break; + } + case EW_STRLEN: + { + Script += " "; + Script += GetVar(e.Params[0]);; + Script += " "; + Script += ReadString2Qw(e.Params[1]); + break; + } + case EW_ASSIGNVAR: + { + Script += " "; + Script += GetVar(e.Params[0]);; + Script += " "; + Script += ReadString2Qw(e.Params[1]); + AString maxLen, startOffset; + if (e.Params[2] != 0) + maxLen = ReadString2(e.Params[2]); + if (e.Params[3] != 0) + startOffset = ReadString2(e.Params[3]); + if (!maxLen.IsEmpty() || !startOffset.IsEmpty()) + { + Script += " "; + if (maxLen.IsEmpty()) + Script += "\"\""; + else + Script += maxLen; + if (!startOffset.IsEmpty()) + { + Script += " "; + Script += startOffset; + } + } + break; + } + case EW_STRCMP: + { + Script += " "; + + Script += " "; + Script += ReadString2Qw(e.Params[0]); + + Script += " "; + Script += ReadString2Qw(e.Params[1]); + + for (int j = 2; j < 5; j++) + { + Script += " "; + Script += UIntToString(e.Params[j]); + } + break; + } + case EW_INTCMP: + { + if (e.Params[5] != 0) + Script += "U"; + + Script += " "; + Script += ReadString2(e.Params[0]); + Script += " "; + Script += ReadString2(e.Params[1]); + + for (int i = 2; i < 5; i++) + { + Script += " "; + Script += UIntToString(e.Params[i]); + } + break; + } + case EW_INTOP: + { + Script += " "; + Script += GetVar(e.Params[0]); + Script += " "; + int numOps = 2; + AString op; + switch (e.Params[3]) + { + case 0: op = '+'; break; + case 1: op = '-'; break; + case 2: op = '*'; break; + case 3: op = '/'; break; + case 4: op = '|'; break; + case 5: op = '&'; break; + case 6: op = '^'; break; + case 7: op = '~'; numOps = 1; break; + case 8: op = '!'; numOps = 1; break; + case 9: op = "||"; break; + case 10: op = "&&"; break; + case 11: op = '%'; break; + default: op = UIntToString(e.Params[3]); + } + AString p1 = ReadString2(e.Params[1]); + if (numOps == 1) + { + Script += op; + Script += p1; + } + else + { + Script += p1; + Script += " "; + Script += op; + Script += " "; + Script += ReadString2(e.Params[2]); + } + break; + } + + case EW_PUSHPOP: + { + int isPop = (e.Params[1] != 0); + if (isPop) + { + Script += "Pop"; + Script += " "; + Script += GetVar(e.Params[0]);; + } + else + { + int isExch = (e.Params[2] != 0); + if (isExch) + { + Script += "Exch"; + } + else + { + Script += "Push"; + Script += " "; + Script += ReadString2(e.Params[0]); + } + } + break; + } + + case EW_SENDMESSAGE: + { + // SendMessage: 6 [output, hwnd, msg, wparam, lparam, [wparamstring?1:0 | lparamstring?2:0 | timeout<<2] + Script += " "; + // Script += ReadString2(e.Params[0]); + // Script += " "; + Script += ReadString2(e.Params[1]); + Script += " "; + Script += ReadString2(e.Params[2]); + + Script += " "; + UInt32 spec = e.Params[5]; + // if (spec & 1) + Script += IntToString(e.Params[3]); + // else + // Script += ReadString2(e.Params[3]); + + Script += " "; + // if (spec & 2) + Script += IntToString(e.Params[4]); + // else + // Script += ReadString2(e.Params[4]); + + if ((Int32)e.Params[0] >= 0) + { + Script += " "; + Script += GetVar(e.Params[1]); + } + + spec >>= 2; + if (spec != 0) + { + Script += " /TIMEOUT="; + Script += IntToString(spec); + } + break; + } + + case EW_GETDLGITEM: + { + Script += " "; + Script += GetVar(e.Params[0]);; + Script += " "; + Script += ReadString2(e.Params[1]); + Script += " "; + Script += ReadString2(e.Params[2]); + break; + } + + + case EW_REGISTERDLL: + { + Script += " "; + Script += ReadString2(e.Params[0]); + Script += " "; + Script += ReadString2(e.Params[1]); + Script += " "; + Script += UIntToString(e.Params[2]); + break; + } + + case EW_CREATESHORTCUT: + { + AString s; + + Script += " "; + Script += ReadString2Qw(e.Params[0]); + + Script += " "; + Script += ReadString2Qw(e.Params[1]); + + for (int j = 2; j < 5; j++) + { + Script += " "; + Script += UIntToString(e.Params[j]); + } + break; + } + + /* + case EW_DELREG: + { + AString keyName, valueName; + keyName = ReadString2(e.Params[1]); + bool isValue = (e.Params[2] != -1); + if (isValue) + { + valueName = ReadString2(e.Params[2]); + Script += "Key"; + } + else + Script += "Value"; + Script += " "; + Script += UIntToString(e.Params[0]); + Script += " "; + Script += keyName; + if (isValue) + { + Script += " "; + Script += valueName; + } + Script += " "; + Script += UIntToString(e.Params[3]); + break; + } + */ + + case EW_WRITEREG: + { + AString s; + switch(e.Params[4]) + { + case 1: s = "Str"; break; + case 2: s = "ExpandStr"; break; + case 3: s = "Bin"; break; + case 4: s = "DWORD"; break; + default: s = "?" + UIntToString(e.Params[4]); break; + } + Script += s; + Script += " "; + Script += GetRegRootID(e.Params[0]); + Script += " "; + + AString keyName, valueName; + keyName = ReadString2Qw(e.Params[1]); + Script += keyName; + Script += " "; + + valueName = ReadString2Qw(e.Params[2]); + Script += valueName; + Script += " "; + + valueName = ReadString2Qw(e.Params[3]); + Script += valueName; + Script += " "; + + break; + } + + case EW_WRITEUNINSTALLER: + { + Script += " "; + Script += ReadString2(e.Params[0]); + for (int j = 1; j < 3; j++) + { + Script += " "; + Script += UIntToString(e.Params[j]); + } + break; + } + + default: + { + int numParams = kNumEntryParams; + if (e.Which < sizeof(kCommandPairs) / sizeof(kCommandPairs[0])) + { + const CCommandPair &pair = kCommandPairs[e.Which]; + // Script += pair.Name; + numParams = pair.NumParams; + } + else + { + Script += "Unknown"; + Script += UIntToString(e.Which); + } + Script += e.GetParamsString(numParams); + } + #endif + } + #ifdef NSIS_SCRIPT + Script += kCrLf; + #endif + } + + { + Items.Sort(CompareItems, 0); + int i; + // if (IsSolid) + for (i = 0; i + 1 < Items.Size();) + { + bool sameName = IsUnicode ? + (Items[i].NameU == Items[i + 1].NameU) : + (Items[i].NameA == Items[i + 1].NameA); + if (Items[i].Pos == Items[i + 1].Pos && sameName) + Items.Delete(i + 1); + else + i++; + } + for (i = 0; i < Items.Size(); i++) + { + CItem &item = Items[i]; + UInt32 curPos = item.Pos + 4; + for (int nextIndex = i + 1; nextIndex < Items.Size(); nextIndex++) + { + UInt32 nextPos = Items[nextIndex].Pos; + if (curPos <= nextPos) + { + item.EstimatedSizeIsDefined = true; + item.EstimatedSize = nextPos - curPos; + break; + } + } + } + if (!IsSolid) + { + for (i = 0; i < Items.Size(); i++) + { + CItem &item = Items[i]; + RINOK(_stream->Seek(GetPosOfNonSolidItem(i), STREAM_SEEK_SET, NULL)); + const UInt32 kSigSize = 4 + 1 + 5; + BYTE sig[kSigSize]; + size_t processedSize = kSigSize; + RINOK(ReadStream(_stream, sig, &processedSize)); + if (processedSize < 4) + return S_FALSE; + UInt32 size = Get32(sig); + if ((size & 0x80000000) != 0) + { + item.IsCompressed = true; + // is compressed; + size &= ~0x80000000; + if (Method == NMethodType::kLZMA) + { + if (processedSize < 9) + return S_FALSE; + if (FilterFlag) + item.UseFilter = (sig[4] != 0); + item.DictionarySize = Get32(sig + 5 + (FilterFlag ? 1 : 0)); + } + } + else + { + item.IsCompressed = false; + item.Size = size; + item.SizeIsDefined = true; + } + item.CompressedSize = size; + item.CompressedSizeIsDefined = true; + } + } + } + return S_OK; +} + +HRESULT CInArchive::Parse() +{ + // UInt32 offset = ReadUInt32(); + // ???? offset == FirstHeader.HeaderLength + /* UInt32 ehFlags = */ ReadUInt32(); + CBlockHeader bhPages, bhSections, bhEntries, bhStrings, bhLangTables, bhCtlColors, bhData; + // CBlockHeader bgFont; + ReadBlockHeader(bhPages); + ReadBlockHeader(bhSections); + ReadBlockHeader(bhEntries); + ReadBlockHeader(bhStrings); + ReadBlockHeader(bhLangTables); + ReadBlockHeader(bhCtlColors); + // ReadBlockHeader(bgFont); + ReadBlockHeader(bhData); + + _stringsPos = bhStrings.Offset; + UInt32 pos = GetOffset() + _stringsPos; + int numZeros0 = 0; + int numZeros1 = 0; + int i; + const int kBlockSize = 256; + for (i = 0; i < kBlockSize; i++) + { + if (pos >= _size || pos + 1 >= _size) + break; + char c0 = _data[pos++]; + char c1 = _data[pos++]; + wchar_t c = (c0 | ((wchar_t)c1 << 8)); + + if (c >= NS_UN_CODES_START && c < NS_UN_CODES_END) + { + if (pos >= _size || pos + 1 >= _size) + break; + pos += 2; + numZeros1++; + } + else + { + if (c0 == 0 && c1 != 0) + numZeros0++; + if (c1 == 0) + numZeros1++; + } + // printf("\nnumZeros0 = %2x %2x", _data[pos + 0], _data[pos + 1]); + } + IsUnicode = (numZeros1 > numZeros0 * 3 + kBlockSize / 16); + // printf("\nnumZeros0 = %3d numZeros1 = %3d", numZeros0, numZeros1); + return ReadEntries(bhEntries); +} + +static bool IsLZMA(const Byte *p, UInt32 &dictionary) +{ + dictionary = Get32(p + 1); + return (p[0] == 0x5D && p[1] == 0x00 && p[2] == 0x00 && p[5] == 0x00); +} + +static bool IsLZMA(const Byte *p, UInt32 &dictionary, bool &thereIsFlag) +{ + if (IsLZMA(p, dictionary)) + { + thereIsFlag = false; + return true; + } + if (IsLZMA(p + 1, dictionary)) + { + thereIsFlag = true; + return true; + } + return false; +} + +static bool IsBZip2(const Byte *p) +{ + return (p[0] == 0x31 && p[1] < 14); +} + +HRESULT CInArchive::Open2( + DECL_EXTERNAL_CODECS_LOC_VARS2 + ) +{ + RINOK(_stream->Seek(0, STREAM_SEEK_CUR, &StreamOffset)); + + const UInt32 kSigSize = 4 + 1 + 5 + 1; // size, flag, lzma props, lzma first byte + BYTE sig[kSigSize]; + RINOK(ReadStream_FALSE(_stream, sig, kSigSize)); + UInt64 position; + RINOK(_stream->Seek(StreamOffset, STREAM_SEEK_SET, &position)); + + _headerIsCompressed = true; + IsSolid = true; + FilterFlag = false; + DictionarySize = 1; + + UInt32 compressedHeaderSize = Get32(sig); + + if (compressedHeaderSize == FirstHeader.HeaderLength) + { + _headerIsCompressed = false; + IsSolid = false; + Method = NMethodType::kCopy; + } + else if (IsLZMA(sig, DictionarySize, FilterFlag)) + { + Method = NMethodType::kLZMA; + } + else if (IsLZMA(sig + 4, DictionarySize, FilterFlag)) + { + IsSolid = false; + Method = NMethodType::kLZMA; + } + else if (sig[3] == 0x80) + { + IsSolid = false; + if (IsBZip2(sig + 4)) + Method = NMethodType::kBZip2; + else + Method = NMethodType::kDeflate; + } + else if (IsBZip2(sig)) + { + Method = NMethodType::kBZip2; + } + else + { + Method = NMethodType::kDeflate; + } + + _posInData = 0; + if (!IsSolid) + { + _headerIsCompressed = ((compressedHeaderSize & 0x80000000) != 0); + if (_headerIsCompressed) + compressedHeaderSize &= ~0x80000000; + _nonSolidStartOffset = compressedHeaderSize; + RINOK(_stream->Seek(StreamOffset + 4, STREAM_SEEK_SET, NULL)); + } + UInt32 unpackSize = FirstHeader.HeaderLength; + if (_headerIsCompressed) + { + // unpackSize = (1 << 23); + _data.SetCapacity(unpackSize); + RINOK(Decoder.Init( + EXTERNAL_CODECS_LOC_VARS + _stream, Method, FilterFlag, UseFilter)); + size_t processedSize = unpackSize; + RINOK(Decoder.Read(_data, &processedSize)); + if (processedSize != unpackSize) + return S_FALSE; + _size = processedSize; + if (IsSolid) + { + UInt32 size2 = ReadUInt32(); + if (size2 < _size) + _size = size2; + } + } + else + { + _data.SetCapacity(unpackSize); + _size = (size_t)unpackSize; + RINOK(ReadStream_FALSE(_stream, (Byte *)_data, unpackSize)); + } + return Parse(); +} + +/* +NsisExe = +{ + ExeStub + Archive // must start from 512 * N + #ifndef NSIS_CONFIG_CRC_ANAL + { + Some additional data + } +} + +Archive +{ + FirstHeader + Data + #ifdef NSIS_CONFIG_CRC_SUPPORT && FirstHeader.ThereIsCrc() + { + CRC + } +} + +FirstHeader +{ + UInt32 Flags; + Byte Signature[16]; + // points to the header+sections+entries+stringtable in the datablock + UInt32 HeaderLength; + UInt32 ArchiveSize; +} +*/ + +HRESULT CInArchive::Open( + DECL_EXTERNAL_CODECS_LOC_VARS + IInStream *inStream, const UInt64 *maxCheckStartPosition) +{ + Clear(); + RINOK(inStream->Seek(0, STREAM_SEEK_SET, NULL)); + UInt64 maxSize = ((maxCheckStartPosition != 0) ? *maxCheckStartPosition : 0); + const UInt32 kStep = 512; + Byte buffer[kStep]; + + UInt64 position = 0; + for (; position <= maxSize; position += kStep) + { + RINOK(ReadStream_FALSE(inStream, buffer, kStep)); + if (memcmp(buffer + 4, kSignature, kSignatureSize) == 0) + break; + } + if (position > maxSize) + return S_FALSE; + const UInt32 kStartHeaderSize = 4 * 7; + RINOK(inStream->Seek(0, STREAM_SEEK_END, &_archiveSize)); + RINOK(inStream->Seek(position + kStartHeaderSize, STREAM_SEEK_SET, 0)); + FirstHeader.Flags = Get32(buffer); + FirstHeader.HeaderLength = Get32(buffer + kSignatureSize + 4); + FirstHeader.ArchiveSize = Get32(buffer + kSignatureSize + 8); + if (_archiveSize - position < FirstHeader.ArchiveSize) + return S_FALSE; + + try + { + _stream = inStream; + HRESULT res = Open2(EXTERNAL_CODECS_LOC_VARS2); + if (res != S_OK) + Clear(); + _stream.Release(); + return res; + } + catch(...) { Clear(); return S_FALSE; } +} + +void CInArchive::Clear() +{ + #ifdef NSIS_SCRIPT + Script.Empty(); + #endif + Items.Clear(); + _stream.Release(); +} + +}} diff --git a/CPP/7zip/Archive/Nsis/NsisIn.h b/CPP/7zip/Archive/Nsis/NsisIn.h new file mode 100644 index 0000000..87ae3f1 --- /dev/null +++ b/CPP/7zip/Archive/Nsis/NsisIn.h @@ -0,0 +1,181 @@ +// NsisIn.h + +#ifndef __ARCHIVE_NSIS_IN_H +#define __ARCHIVE_NSIS_IN_H + +#include "Common/Buffer.h" +#include "Common/MyCom.h" +#include "Common/StringConvert.h" + +#include "NsisDecode.h" + +// #define NSIS_SCRIPT + +namespace NArchive { +namespace NNsis { + +const int kSignatureSize = 16; +#define NSIS_SIGNATURE { 0xEF, 0xBE, 0xAD, 0xDE, 0x4E, 0x75, 0x6C, 0x6C, 0x73, 0x6F, 0x66, 0x74, 0x49, 0x6E, 0x73, 0x74} + +extern Byte kSignature[kSignatureSize]; + +const UInt32 kFlagsMask = 0xF; +namespace NFlags +{ + const UInt32 kUninstall = 1; + const UInt32 kSilent = 2; + const UInt32 kNoCrc = 4; + const UInt32 kForceCrc = 8; +} + +struct CFirstHeader +{ + UInt32 Flags; + UInt32 HeaderLength; + + UInt32 ArchiveSize; + + bool ThereIsCrc() const + { + if ((Flags & NFlags::kForceCrc ) != 0) + return true; + return ((Flags & NFlags::kNoCrc) == 0); + } + + UInt32 GetDataSize() const { return ArchiveSize - (ThereIsCrc() ? 4 : 0); } +}; + + +struct CBlockHeader +{ + UInt32 Offset; + UInt32 Num; +}; + +struct CItem +{ + AString PrefixA; + UString PrefixU; + AString NameA; + UString NameU; + FILETIME MTime; + bool IsUnicode; + bool UseFilter; + bool IsCompressed; + bool SizeIsDefined; + bool CompressedSizeIsDefined; + bool EstimatedSizeIsDefined; + UInt32 Pos; + UInt32 Size; + UInt32 CompressedSize; + UInt32 EstimatedSize; + UInt32 DictionarySize; + + CItem(): IsUnicode(false), UseFilter(false), IsCompressed(true), SizeIsDefined(false), + CompressedSizeIsDefined(false), EstimatedSizeIsDefined(false), Size(0), DictionarySize(1) {} + + bool IsINSTDIR() const + { + return (PrefixA.Length() >= 3 || PrefixU.Length() >= 3); + } + + UString GetReducedName(bool unicode) const + { + UString s; + if (unicode) + s = PrefixU; + else + s = MultiByteToUnicodeString(PrefixA); + if (s.Length() > 0) + if (s[s.Length() - 1] != L'\\') + s += L'\\'; + if (unicode) + s += NameU; + else + s += MultiByteToUnicodeString(NameA); + const int len = 9; + if (s.Left(len).CompareNoCase(L"$INSTDIR\\") == 0) + s = s.Mid(len); + return s; + } +}; + +class CInArchive +{ + UInt64 _archiveSize; + CMyComPtr _stream; + + Byte ReadByte(); + UInt32 ReadUInt32(); + HRESULT Open2( + DECL_EXTERNAL_CODECS_LOC_VARS2 + ); + void ReadBlockHeader(CBlockHeader &bh); + AString ReadStringA(UInt32 pos) const; + UString ReadStringU(UInt32 pos) const; + AString ReadString2A(UInt32 pos) const; + UString ReadString2U(UInt32 pos) const; + AString ReadString2(UInt32 pos) const; + AString ReadString2Qw(UInt32 pos) const; + HRESULT ReadEntries(const CBlockHeader &bh); + HRESULT Parse(); + + CByteBuffer _data; + UInt64 _size; + + size_t _posInData; + + UInt32 _stringsPos; + + + bool _headerIsCompressed; + UInt32 _nonSolidStartOffset; +public: + HRESULT Open( + DECL_EXTERNAL_CODECS_LOC_VARS + IInStream *inStream, const UInt64 *maxCheckStartPosition); + void Clear(); + + UInt64 StreamOffset; + CDecoder Decoder; + CObjectVector Items; + CFirstHeader FirstHeader; + NMethodType::EEnum Method; + UInt32 DictionarySize; + bool IsSolid; + bool UseFilter; + bool FilterFlag; + bool IsUnicode; + + #ifdef NSIS_SCRIPT + AString Script; + #endif + UInt32 GetOffset() const { return IsSolid ? 4 : 0; } + UInt64 GetDataPos(int index) + { + const CItem &item = Items[index]; + return GetOffset() + FirstHeader.HeaderLength + item.Pos; + } + + UInt64 GetPosOfSolidItem(int index) const + { + const CItem &item = Items[index]; + return 4 + FirstHeader.HeaderLength + item.Pos; + } + + UInt64 GetPosOfNonSolidItem(int index) const + { + const CItem &item = Items[index]; + return StreamOffset + _nonSolidStartOffset + 4 + item.Pos; + } + + void Release() + { + Decoder.Release(); + } + +}; + +}} + +#endif diff --git a/CPP/7zip/Archive/Nsis/NsisRegister.cpp b/CPP/7zip/Archive/Nsis/NsisRegister.cpp new file mode 100644 index 0000000..41dedb0 --- /dev/null +++ b/CPP/7zip/Archive/Nsis/NsisRegister.cpp @@ -0,0 +1,13 @@ +// NsisRegister.cpp + +#include "StdAfx.h" + +#include "../../Common/RegisterArc.h" + +#include "NsisHandler.h" +static IInArchive *CreateArc() { return new NArchive::NNsis::CHandler; } + +static CArcInfo g_ArcInfo = + { L"Nsis", L"", 0, 0x9, NSIS_SIGNATURE, NArchive::NNsis::kSignatureSize, false, CreateArc, 0 }; + +REGISTER_ARC(Nsis) diff --git a/CPP/7zip/Archive/NtfsHandler.cpp b/CPP/7zip/Archive/NtfsHandler.cpp new file mode 100644 index 0000000..505486f --- /dev/null +++ b/CPP/7zip/Archive/NtfsHandler.cpp @@ -0,0 +1,1764 @@ +// NtfsHandler.cpp + +#include "StdAfx.h" + +// #define SHOW_DEBUG_INFO +// #define SHOW_DEBUG_INFO2 + +#if defined(SHOW_DEBUG_INFO) || defined(SHOW_DEBUG_INFO2) +#include +#endif + +#include "../../../C/CpuArch.h" + +#include "Common/Buffer.h" +#include "Common/ComTry.h" +#include "Common/IntToString.h" +#include "Common/MyCom.h" +#include "Common/StringConvert.h" + +#include "Windows/PropVariant.h" +#include "Windows/Time.h" + +#include "../Common/ProgressUtils.h" +#include "../Common/RegisterArc.h" +#include "../Common/StreamUtils.h" + +#include "../Compress/CopyCoder.h" + +#include "Common/DummyOutStream.h" + +#ifdef SHOW_DEBUG_INFO +#define PRF(x) x +#else +#define PRF(x) +#endif + +#ifdef SHOW_DEBUG_INFO2 +#define PRF2(x) x +#else +#define PRF2(x) +#endif + +#define Get16(p) GetUi16(p) +#define Get32(p) GetUi32(p) +#define Get64(p) GetUi64(p) + +#define G16(p, dest) dest = Get16(p); +#define G32(p, dest) dest = Get32(p); +#define G64(p, dest) dest = Get64(p); + +namespace NArchive { +namespace Ntfs { + +static const UInt32 kNumSysRecs = 16; +static const UInt32 kRecIndex_Volume = 3; +static const UInt32 kRecIndex_BadClus = 8; + +struct CHeader +{ + Byte SectorSizeLog; + Byte ClusterSizeLog; + // Byte MediaType; + UInt32 NumHiddenSectors; + UInt64 NumClusters; + UInt64 MftCluster; + UInt64 SerialNumber; + UInt16 SectorsPerTrack; + UInt16 NumHeads; + + UInt64 GetPhySize() const { return NumClusters << ClusterSizeLog; } + UInt32 ClusterSize() const { return (UInt32)1 << ClusterSizeLog; } + bool Parse(const Byte *p); +}; + +static int GetLog(UInt32 num) +{ + for (int i = 0; i < 31; i++) + if (((UInt32)1 << i) == num) + return i; + return -1; +} + +bool CHeader::Parse(const Byte *p) +{ + if (p[0x1FE] != 0x55 || p[0x1FF] != 0xAA) + return false; + + int codeOffset = 0; + switch (p[0]) + { + case 0xE9: codeOffset = 3 + (Int16)Get16(p + 1); break; + case 0xEB: if (p[2] != 0x90) return false; codeOffset = 2 + (signed char)p[1]; break; + default: return false; + } + Byte sectorsPerClusterLog; + + if (memcmp(p + 3, "NTFS ", 8) != 0) + return false; + { + int s = GetLog(Get16(p + 11)); + if (s < 9 || s > 12) + return false; + SectorSizeLog = (Byte)s; + s = GetLog(p[13]); + if (s < 0) + return false; + sectorsPerClusterLog = (Byte)s; + ClusterSizeLog = SectorSizeLog + sectorsPerClusterLog; + } + + for (int i = 14; i < 21; i++) + if (p[i] != 0) + return false; + + // MediaType = p[21]; + if (Get16(p + 22) != 0) // NumFatSectors + return false; + G16(p + 24, SectorsPerTrack); + G16(p + 26, NumHeads); + G32(p + 28, NumHiddenSectors); + if (Get32(p + 32) != 0) // NumSectors32 + return false; + + // DriveNumber = p[0x24]; + if (p[0x25] != 0) // CurrentHead + return false; + /* + NTFS-HDD: p[0x26] = 0x80 + NTFS-FLASH: p[0x26] = 0 + */ + if (p[0x26] != 0x80 && p[0x26] != 0) // ExtendedBootSig + return false; + if (p[0x27] != 0) // reserved + return false; + UInt64 numSectors = Get64(p + 0x28); + NumClusters = numSectors >> sectorsPerClusterLog; + + G64(p + 0x30, MftCluster); + // G64(p + 0x38, Mft2Cluster); + G64(p + 0x48, SerialNumber); + UInt32 numClustersInMftRec; + UInt32 numClustersInIndexBlock; + G32(p + 0x40, numClustersInMftRec); + G32(p + 0x44, numClustersInIndexBlock); + return (numClustersInMftRec < 256 && numClustersInIndexBlock < 256); +} + +struct CMftRef +{ + UInt64 Val; + UInt64 GetIndex() const { return Val & (((UInt64)1 << 48) - 1); } + UInt16 GetNumber() const { return (UInt16)(Val >> 48); } + bool IsBaseItself() const { return Val == 0; } +}; + +#define ATNAME(n) ATTR_TYPE_ ## n +#define DEF_ATTR_TYPE(v, n) ATNAME(n) = v + +enum +{ + DEF_ATTR_TYPE(0x00, UNUSED), + DEF_ATTR_TYPE(0x10, STANDARD_INFO), + DEF_ATTR_TYPE(0x20, ATTRIBUTE_LIST), + DEF_ATTR_TYPE(0x30, FILE_NAME), + DEF_ATTR_TYPE(0x40, OBJECT_ID), + DEF_ATTR_TYPE(0x50, SECURITY_DESCRIPTOR), + DEF_ATTR_TYPE(0x60, VOLUME_NAME), + DEF_ATTR_TYPE(0x70, VOLUME_INFO), + DEF_ATTR_TYPE(0x80, DATA), + DEF_ATTR_TYPE(0x90, INDEX_ROOT), + DEF_ATTR_TYPE(0xA0, INDEX_ALLOCATION), + DEF_ATTR_TYPE(0xB0, BITMAP), + DEF_ATTR_TYPE(0xC0, REPARSE_POINT), + DEF_ATTR_TYPE(0xD0, EA_INFO), + DEF_ATTR_TYPE(0xE0, EA), + DEF_ATTR_TYPE(0xF0, PROPERTY_SET), + DEF_ATTR_TYPE(0x100, LOGGED_UTILITY_STREAM), + DEF_ATTR_TYPE(0x1000, FIRST_USER_DEFINED_ATTRIBUTE) +}; + +static const Byte kFileNameType_Posix = 0; +static const Byte kFileNameType_Win32 = 1; +static const Byte kFileNameType_Dos = 2; +static const Byte kFileNameType_Win32Dos = 3; + +struct CFileNameAttr +{ + CMftRef ParentDirRef; + // UInt64 CTime; + // UInt64 MTime; + // UInt64 ThisRecMTime; + // UInt64 ATime; + // UInt64 AllocatedSize; + // UInt64 DataSize; + // UInt16 PackedEaSize; + UString Name; + UInt32 Attrib; + Byte NameType; + + bool IsDos() const { return NameType == kFileNameType_Dos; } + bool Parse(const Byte *p, unsigned size); +}; + +static void GetString(const Byte *p, unsigned length, UString &res) +{ + wchar_t *s = res.GetBuffer(length); + for (unsigned i = 0; i < length; i++) + s[i] = Get16(p + i * 2); + s[length] = 0; + res.ReleaseBuffer(); +} + +bool CFileNameAttr::Parse(const Byte *p, unsigned size) +{ + if (size < 0x42) + return false; + G64(p + 0x00, ParentDirRef.Val); + // G64(p + 0x08, CTime); + // G64(p + 0x10, MTime); + // G64(p + 0x18, ThisRecMTime); + // G64(p + 0x20, ATime); + // G64(p + 0x28, AllocatedSize); + // G64(p + 0x30, DataSize); + G32(p + 0x38, Attrib); + // G16(p + 0x3C, PackedEaSize); + NameType = p[0x41]; + unsigned length = p[0x40]; + if (0x42 + length > size) + return false; + GetString(p + 0x42, length, Name); + return true; +} + +struct CSiAttr +{ + UInt64 CTime; + UInt64 MTime; + // UInt64 ThisRecMTime; + UInt64 ATime; + UInt32 Attrib; + + /* + UInt32 MaxVersions; + UInt32 Version; + UInt32 ClassId; + UInt32 OwnerId; + UInt32 SecurityId; + UInt64 QuotaCharged; + */ + + bool Parse(const Byte *p, unsigned size); +}; + +bool CSiAttr::Parse(const Byte *p, unsigned size) +{ + if (size < 0x24) + return false; + G64(p + 0x00, CTime); + G64(p + 0x08, MTime); + // G64(p + 0x10, ThisRecMTime); + G64(p + 0x18, ATime); + G32(p + 0x20, Attrib); + return true; +} + +static const UInt64 kEmptyExtent = (UInt64)(Int64)-1; + +struct CExtent +{ + UInt64 Virt; + UInt64 Phy; + + bool IsEmpty() const { return Phy == kEmptyExtent; } +}; + +struct CVolInfo +{ + Byte MajorVer; + Byte MinorVer; + // UInt16 Flags; + + bool Parse(const Byte *p, unsigned size); +}; + +bool CVolInfo::Parse(const Byte *p, unsigned size) +{ + if (size < 12) + return false; + MajorVer = p[8]; + MinorVer = p[9]; + // Flags = Get16(p + 10); + return true; +} + +struct CAttr +{ + UInt32 Type; + // UInt32 Length; + UString Name; + // UInt16 Flags; + // UInt16 Instance; + CByteBuffer Data; + Byte NonResident; + + // Non-Resident + Byte CompressionUnit; + UInt64 LowVcn; + UInt64 HighVcn; + UInt64 AllocatedSize; + UInt64 Size; + UInt64 PackSize; + UInt64 InitializedSize; + + // Resident + // UInt16 ResidentFlags; + + bool IsCompressionUnitSupported() const { return CompressionUnit == 0 || CompressionUnit == 4; } + + UInt32 Parse(const Byte *p, unsigned size); + bool ParseFileName(CFileNameAttr &a) const { return a.Parse(Data, (unsigned)Data.GetCapacity()); } + bool ParseSi(CSiAttr &a) const { return a.Parse(Data, (unsigned)Data.GetCapacity()); } + bool ParseVolInfo(CVolInfo &a) const { return a.Parse(Data, (unsigned)Data.GetCapacity()); } + bool ParseExtents(CRecordVector &extents, UInt64 numClustersMax, int compressionUnit) const; + UInt64 GetSize() const { return NonResident ? Size : Data.GetCapacity(); } + UInt64 GetPackSize() const + { + if (!NonResident) + return Data.GetCapacity(); + if (CompressionUnit != 0) + return PackSize; + return AllocatedSize; + } +}; + +#define RINOZ(x) { int __tt = (x); if (__tt != 0) return __tt; } + +static int CompareAttr(void *const *elem1, void *const *elem2, void *) +{ + const CAttr &a1 = *(*((const CAttr **)elem1)); + const CAttr &a2 = *(*((const CAttr **)elem2)); + RINOZ(MyCompare(a1.Type, a2.Type)); + RINOZ(MyCompare(a1.Name, a2.Name)); + return MyCompare(a1.LowVcn, a2.LowVcn); +} + +UInt32 CAttr::Parse(const Byte *p, unsigned size) +{ + if (size < 4) + return 0; + G32(p, Type); + if (Type == 0xFFFFFFFF) + return 4; + if (size < 0x18) + return 0; + PRF(printf(" T=%2X", Type)); + + UInt32 length = Get32(p + 0x04); + PRF(printf(" L=%3d", length)); + if (length > size) + return 0; + NonResident = p[0x08]; + { + int nameLength = p[9]; + UInt32 nameOffset = Get16(p + 0x0A); + if (nameLength != 0) + { + if (nameOffset + nameLength * 2 > length) + return 0; + GetString(p + nameOffset, nameLength, Name); + PRF(printf(" N=%S", Name)); + } + } + + // G16(p + 0x0C, Flags); + // G16(p + 0x0E, Instance); + // PRF(printf(" F=%4X", Flags)); + // PRF(printf(" Inst=%d", Instance)); + + UInt32 dataSize; + UInt32 offs; + if (NonResident) + { + if (length < 0x40) + return 0; + PRF(printf(" NR")); + G64(p + 0x10, LowVcn); + G64(p + 0x18, HighVcn); + G64(p + 0x28, AllocatedSize); + G64(p + 0x30, Size); + G64(p + 0x38, InitializedSize); + G16(p + 0x20, offs); + CompressionUnit = p[0x22]; + + PackSize = Size; + if (CompressionUnit != 0) + { + if (length < 0x48) + return 0; + G64(p + 0x40, PackSize); + PRF(printf(" PS=%I64x", PackSize)); + } + + // PRF(printf("\n")); + PRF(printf(" ASize=%4I64d", AllocatedSize)); + PRF(printf(" Size=%I64d", Size)); + PRF(printf(" IS=%I64d", InitializedSize)); + PRF(printf(" Low=%I64d", LowVcn)); + PRF(printf(" High=%I64d", HighVcn)); + PRF(printf(" CU=%d", (int)CompressionUnit)); + dataSize = length - offs; + } + else + { + if (length < 0x18) + return 0; + PRF(printf(" RES")); + dataSize = Get32(p + 0x10); + PRF(printf(" dataSize=%3d", dataSize)); + offs = Get16(p + 0x14); + // G16(p + 0x16, ResidentFlags); + // PRF(printf(" ResFlags=%4X", ResidentFlags)); + } + if (offs > length || dataSize > length || length - dataSize < offs) + return 0; + Data.SetCapacity(dataSize); + memcpy(Data, p + offs, dataSize); + #ifdef SHOW_DEBUG_INFO + PRF(printf(" : ")); + for (unsigned i = 0; i < Data.GetCapacity(); i++) + { + PRF(printf(" %02X", (int)Data[i])); + } + #endif + return length; +} + +bool CAttr::ParseExtents(CRecordVector &extents, UInt64 numClustersMax, int compressionUnit) const +{ + const Byte *p = Data; + unsigned size = (unsigned)Data.GetCapacity(); + UInt64 vcn = LowVcn; + UInt64 lcn = 0; + UInt64 highVcn1 = HighVcn + 1; + if (LowVcn != extents.Back().Virt || highVcn1 > (UInt64)1 << 63) + return false; + + extents.DeleteBack(); + + PRF2(printf("\n# ParseExtents # LowVcn = %4I64X # HighVcn = %4I64X", LowVcn, HighVcn)); + + while (size > 0) + { + Byte b = *p++; + size--; + if (b == 0) + break; + UInt32 num = b & 0xF; + if (num == 0 || num > 8 || num > size) + return false; + + int i; + UInt64 vSize = p[num - 1]; + for (i = (int)num - 2; i >= 0; i--) + vSize = (vSize << 8) | p[i]; + if (vSize == 0) + return false; + p += num; + size -= num; + if ((highVcn1 - vcn) < vSize) + return false; + + num = (b >> 4) & 0xF; + if (num > 8 || num > size) + return false; + CExtent e; + e.Virt = vcn; + if (num == 0) + { + if (compressionUnit == 0) + return false; + e.Phy = kEmptyExtent; + } + else + { + Int64 v = (signed char)p[num - 1]; + for (i = (int)num - 2; i >= 0; i--) + v = (v << 8) | p[i]; + p += num; + size -= num; + lcn += v; + if (lcn > numClustersMax) + return false; + e.Phy = lcn; + } + extents.Add(e); + vcn += vSize; + } + CExtent e; + e.Phy = kEmptyExtent; + e.Virt = vcn; + extents.Add(e); + return (highVcn1 == vcn); +} + +static const UInt64 kEmptyTag = (UInt64)(Int64)-1; + +static const int kNumCacheChunksLog = 1; +static const UInt32 kNumCacheChunks = (1 << kNumCacheChunksLog); + +class CInStream: + public IInStream, + public CMyUnknownImp +{ + UInt64 _virtPos; + UInt64 _physPos; + UInt64 _curRem; + bool _sparseMode; + size_t _compressedPos; + + UInt64 _tags[kNumCacheChunks]; + int _chunkSizeLog; + CByteBuffer _inBuf; + CByteBuffer _outBuf; +public: + CMyComPtr Stream; + UInt64 Size; + UInt64 InitializedSize; + int BlockSizeLog; + int CompressionUnit; + bool InUse; + CRecordVector Extents; + + HRESULT SeekToPhys() { return Stream->Seek(_physPos, STREAM_SEEK_SET, NULL); } + + UInt32 GetCuSize() const { return (UInt32)1 << (BlockSizeLog + CompressionUnit); } + HRESULT InitAndSeek(int compressionUnit) + { + CompressionUnit = compressionUnit; + if (compressionUnit != 0) + { + UInt32 cuSize = GetCuSize(); + _inBuf.SetCapacity(cuSize); + _chunkSizeLog = BlockSizeLog + CompressionUnit; + _outBuf.SetCapacity(kNumCacheChunks << _chunkSizeLog); + } + for (int i = 0; i < kNumCacheChunks; i++) + _tags[i] = kEmptyTag; + + _sparseMode = false; + _curRem = 0; + _virtPos = 0; + _physPos = 0; + const CExtent &e = Extents[0]; + if (!e.IsEmpty()) + _physPos = e.Phy << BlockSizeLog; + return SeekToPhys(); + } + + MY_UNKNOWN_IMP1(IInStream) + + STDMETHOD(Read)(void *data, UInt32 size, UInt32 *processedSize); + STDMETHOD(Seek)(Int64 offset, UInt32 seekOrigin, UInt64 *newPosition); +}; + +static size_t Lznt1Dec(Byte *dest, size_t outBufLim, size_t destLen, const Byte *src, size_t srcLen) +{ + size_t destSize = 0; + while (destSize < destLen) + { + if (srcLen < 2 || (destSize & 0xFFF) != 0) + break; + UInt32 v = Get16(src); + if (v == 0) + break; + src += 2; + srcLen -= 2; + UInt32 comprSize = (v & 0xFFF) + 1; + if (comprSize > srcLen) + break; + srcLen -= comprSize; + if ((v & 0x8000) == 0) + { + if (comprSize != (1 << 12)) + break; + memcpy(dest + destSize, src, comprSize); + src += comprSize; + destSize += comprSize; + } + else + { + if (destSize + (1 << 12) > outBufLim || (src[0] & 1) != 0) + return 0; + int numDistBits = 4; + UInt32 sbOffset = 0; + UInt32 pos = 0; + + do + { + comprSize--; + for (UInt32 mask = src[pos++] | 0x100; mask > 1 && comprSize > 0; mask >>= 1) + { + if ((mask & 1) == 0) + { + if (sbOffset >= (1 << 12)) + return 0; + dest[destSize++] = src[pos++]; + sbOffset++; + comprSize--; + } + else + { + if (comprSize < 2) + return 0; + UInt32 v = Get16(src + pos); + pos += 2; + comprSize -= 2; + + while (((sbOffset - 1) >> numDistBits) != 0) + numDistBits++; + + UInt32 len = (v & (0xFFFF >> numDistBits)) + 3; + if (sbOffset + len > (1 << 12)) + return 0; + UInt32 dist = (v >> (16 - numDistBits)); + if (dist >= sbOffset) + return 0; + Int32 offs = -1 - dist; + Byte *p = dest + destSize; + for (UInt32 t = 0; t < len; t++) + p[t] = p[t + offs]; + destSize += len; + sbOffset += len; + } + } + } + while (comprSize > 0); + src += pos; + } + } + return destSize; +} + +STDMETHODIMP CInStream::Read(void *data, UInt32 size, UInt32 *processedSize) +{ + if (processedSize != NULL) + *processedSize = 0; + if (_virtPos >= Size) + return (Size == _virtPos) ? S_OK: E_FAIL; + if (size == 0) + return S_OK; + UInt64 rem = Size - _virtPos; + if (size > rem) + size = (UInt32)rem; + if (_virtPos >= InitializedSize) + { + memset((Byte *)data, 0, size); + _virtPos += size; + *processedSize = size; + return S_OK; + } + rem = InitializedSize - _virtPos; + if (size > rem) + size = (UInt32)rem; + + while (_curRem == 0) + { + UInt64 cacheTag = _virtPos >> _chunkSizeLog; + UInt32 cacheIndex = (UInt32)cacheTag & (kNumCacheChunks - 1); + if (_tags[cacheIndex] == cacheTag) + { + UInt32 chunkSize = (UInt32)1 << _chunkSizeLog; + UInt32 offset = (UInt32)_virtPos & (chunkSize - 1); + UInt32 cur = MyMin(chunkSize - offset, size); + memcpy(data, _outBuf + (cacheIndex << _chunkSizeLog) + offset, cur); + *processedSize = cur; + _virtPos += cur; + return S_OK; + } + + PRF2(printf("\nVirtPos = %6d", _virtPos)); + + UInt32 comprUnitSize = (UInt32)1 << CompressionUnit; + UInt64 virtBlock = _virtPos >> BlockSizeLog; + UInt64 virtBlock2 = virtBlock & ~((UInt64)comprUnitSize - 1); + + int left = 0, right = Extents.Size(); + for (;;) + { + int mid = (left + right) / 2; + if (mid == left) + break; + if (virtBlock2 < Extents[mid].Virt) + right = mid; + else + left = mid; + } + + bool isCompressed = false; + UInt64 virtBlock2End = virtBlock2 + comprUnitSize; + if (CompressionUnit != 0) + for (int i = left; i < Extents.Size(); i++) + { + const CExtent &e = Extents[i]; + if (e.Virt >= virtBlock2End) + break; + if (e.IsEmpty()) + { + isCompressed = true; + break; + } + } + + int i; + for (i = left; Extents[i + 1].Virt <= virtBlock; i++); + + _sparseMode = false; + if (!isCompressed) + { + const CExtent &e = Extents[i]; + UInt64 newPos = (e.Phy << BlockSizeLog) + _virtPos - (e.Virt << BlockSizeLog); + if (newPos != _physPos) + { + _physPos = newPos; + RINOK(SeekToPhys()); + } + UInt64 next = Extents[i + 1].Virt; + if (next > virtBlock2End) + next &= ~((UInt64)comprUnitSize - 1); + next <<= BlockSizeLog; + if (next > Size) + next = Size; + _curRem = next - _virtPos; + break; + } + bool thereArePhy = false; + for (int i2 = left; i2 < Extents.Size(); i2++) + { + const CExtent &e = Extents[i2]; + if (e.Virt >= virtBlock2End) + break; + if (!e.IsEmpty()) + { + thereArePhy = true; + break; + } + } + if (!thereArePhy) + { + _curRem = (Extents[i + 1].Virt << BlockSizeLog) - _virtPos; + _sparseMode = true; + break; + } + + size_t offs = 0; + UInt64 curVirt = virtBlock2; + for (i = left; i < Extents.Size(); i++) + { + const CExtent &e = Extents[i]; + if (e.IsEmpty()) + break; + if (e.Virt >= virtBlock2End) + return S_FALSE; + UInt64 newPos = (e.Phy + (curVirt - e.Virt)) << BlockSizeLog; + if (newPos != _physPos) + { + _physPos = newPos; + RINOK(SeekToPhys()); + } + UInt64 numChunks = Extents[i + 1].Virt - curVirt; + if (curVirt + numChunks > virtBlock2End) + numChunks = virtBlock2End - curVirt; + size_t compressed = (size_t)numChunks << BlockSizeLog; + RINOK(ReadStream_FALSE(Stream, _inBuf + offs, compressed)); + curVirt += numChunks; + _physPos += compressed; + offs += compressed; + } + size_t destLenMax = GetCuSize(); + size_t destLen = destLenMax; + UInt64 rem = Size - (virtBlock2 << BlockSizeLog); + if (destLen > rem) + destLen = (size_t)rem; + + Byte *dest = _outBuf + (cacheIndex << _chunkSizeLog); + size_t destSizeRes = Lznt1Dec(dest, destLenMax, destLen, _inBuf, offs); + _tags[cacheIndex] = cacheTag; + + // some files in Vista have destSize > destLen + if (destSizeRes < destLen) + { + memset(dest, 0, destLenMax); + if (InUse) + return S_FALSE; + } + } + if (size > _curRem) + size = (UInt32)_curRem; + HRESULT res = S_OK; + if (_sparseMode) + memset(data, 0, size); + else + { + res = Stream->Read(data, size, &size); + _physPos += size; + } + if (processedSize != NULL) + *processedSize = size; + _virtPos += size; + _curRem -= size; + return res; +} + +STDMETHODIMP CInStream::Seek(Int64 offset, UInt32 seekOrigin, UInt64 *newPosition) +{ + UInt64 newVirtPos = offset; + switch(seekOrigin) + { + case STREAM_SEEK_SET: break; + case STREAM_SEEK_CUR: newVirtPos += _virtPos; break; + case STREAM_SEEK_END: newVirtPos += Size; break; + default: return STG_E_INVALIDFUNCTION; + } + if (_virtPos != newVirtPos) + _curRem = 0; + _virtPos = newVirtPos; + if (newPosition) + *newPosition = newVirtPos; + return S_OK; +} + +class CByteBufStream: + public IInStream, + public CMyUnknownImp +{ + UInt64 _virtPos; +public: + CByteBuffer Buf; + void Init() { _virtPos = 0; } + + MY_UNKNOWN_IMP1(IInStream) + + STDMETHOD(Read)(void *data, UInt32 size, UInt32 *processedSize); + STDMETHOD(Seek)(Int64 offset, UInt32 seekOrigin, UInt64 *newPosition); +}; + +STDMETHODIMP CByteBufStream::Read(void *data, UInt32 size, UInt32 *processedSize) +{ + if (processedSize != NULL) + *processedSize = 0; + if (_virtPos >= Buf.GetCapacity()) + return (_virtPos == Buf.GetCapacity()) ? S_OK: E_FAIL; + UInt64 rem = Buf.GetCapacity() - _virtPos; + if (rem < size) + size = (UInt32)rem; + memcpy(data, Buf + (size_t)_virtPos, size); + if (processedSize != NULL) + *processedSize = size; + _virtPos += size; + return S_OK; +} + +STDMETHODIMP CByteBufStream::Seek(Int64 offset, UInt32 seekOrigin, UInt64 *newPosition) +{ + switch(seekOrigin) + { + case STREAM_SEEK_SET: _virtPos = offset; break; + case STREAM_SEEK_CUR: _virtPos += offset; break; + case STREAM_SEEK_END: _virtPos = Buf.GetCapacity() + offset; break; + default: return STG_E_INVALIDFUNCTION; + } + if (newPosition) + *newPosition = _virtPos; + return S_OK; +} + +static HRESULT DataParseExtents(int clusterSizeLog, const CObjectVector &attrs, + int attrIndex, int attrIndexLim, UInt64 numPhysClusters, CRecordVector &Extents) +{ + CExtent e; + e.Virt = 0; + e.Phy = kEmptyExtent; + Extents.Add(e); + const CAttr &attr0 = attrs[attrIndex]; + + if (attr0.AllocatedSize < attr0.Size || + (attrs[attrIndexLim - 1].HighVcn + 1) != (attr0.AllocatedSize >> clusterSizeLog) || + (attr0.AllocatedSize & ((1 << clusterSizeLog) - 1)) != 0) + return S_FALSE; + + for (int i = attrIndex; i < attrIndexLim; i++) + if (!attrs[i].ParseExtents(Extents, numPhysClusters, attr0.CompressionUnit)) + return S_FALSE; + + UInt64 packSizeCalc = 0; + for (int k = 0; k < Extents.Size(); k++) + { + CExtent &e = Extents[k]; + if (!e.IsEmpty()) + packSizeCalc += (Extents[k + 1].Virt - e.Virt) << clusterSizeLog; + PRF2(printf("\nSize = %4I64X", Extents[k + 1].Virt - e.Virt)); + PRF2(printf(" Pos = %4I64X", e.Phy)); + } + + if (attr0.CompressionUnit != 0) + { + if (packSizeCalc != attr0.PackSize) + return S_FALSE; + } + else + { + if (packSizeCalc != attr0.AllocatedSize) + return S_FALSE; + } + return S_OK; +} + +struct CDataRef +{ + int Start; + int Num; +}; + +static const UInt32 kMagic_FILE = 0x454c4946; +static const UInt32 kMagic_BAAD = 0x44414142; + +struct CMftRec +{ + UInt32 Magic; + // UInt64 Lsn; + UInt16 SeqNumber; + UInt16 Flags; + // UInt16 LinkCount; + // UInt16 NextAttrInstance; + CMftRef BaseMftRef; + // UInt32 ThisRecNumber; + UInt32 MyNumNameLinks; + + CObjectVector DataAttrs; + CObjectVector FileNames; + CRecordVector DataRefs; + + CSiAttr SiAttr; + + void MoveAttrsFrom(CMftRec &src) + { + DataAttrs += src.DataAttrs; + FileNames += src.FileNames; + src.DataAttrs.ClearAndFree(); + src.FileNames.ClearAndFree(); + } + + UInt64 GetPackSize() const + { + UInt64 res = 0; + for (int i = 0; i < DataRefs.Size(); i++) + res += DataAttrs[DataRefs[i].Start].GetPackSize(); + return res; + } + + bool Parse(Byte *p, int sectorSizeLog, UInt32 numSectors, UInt32 recNumber, CObjectVector *attrs); + + bool IsEmpty() const { return (Magic <= 2); } + bool IsFILE() const { return (Magic == kMagic_FILE); } + bool IsBAAD() const { return (Magic == kMagic_BAAD); } + + bool InUse() const { return (Flags & 1) != 0; } + bool IsDir() const { return (Flags & 2) != 0; } + + void ParseDataNames(); + HRESULT GetStream(IInStream *mainStream, int dataIndex, + int clusterSizeLog, UInt64 numPhysClusters, IInStream **stream) const; + int GetNumExtents(int dataIndex, int clusterSizeLog, UInt64 numPhysClusters) const; + + UInt64 GetSize(int dataIndex) const { return DataAttrs[DataRefs[dataIndex].Start].GetSize(); } + + CMftRec(): MyNumNameLinks(0) {} +}; + +void CMftRec::ParseDataNames() +{ + DataRefs.Clear(); + DataAttrs.Sort(CompareAttr, 0); + + for (int i = 0; i < DataAttrs.Size();) + { + CDataRef ref; + ref.Start = i; + for (i++; i < DataAttrs.Size(); i++) + if (DataAttrs[ref.Start].Name != DataAttrs[i].Name) + break; + ref.Num = i - ref.Start; + DataRefs.Add(ref); + } +} + +HRESULT CMftRec::GetStream(IInStream *mainStream, int dataIndex, + int clusterSizeLog, UInt64 numPhysClusters, IInStream **destStream) const +{ + *destStream = 0; + CByteBufStream *streamSpec = new CByteBufStream; + CMyComPtr streamTemp = streamSpec; + + if (dataIndex < 0) + return E_FAIL; + + if (dataIndex < DataRefs.Size()) + { + const CDataRef &ref = DataRefs[dataIndex]; + int numNonResident = 0; + int i; + for (i = ref.Start; i < ref.Start + ref.Num; i++) + if (DataAttrs[i].NonResident) + numNonResident++; + + const CAttr &attr0 = DataAttrs[ref.Start]; + + if (numNonResident != 0 || ref.Num != 1) + { + if (numNonResident != ref.Num || !attr0.IsCompressionUnitSupported()) + return S_FALSE; + CInStream *streamSpec = new CInStream; + CMyComPtr streamTemp = streamSpec; + RINOK(DataParseExtents(clusterSizeLog, DataAttrs, ref.Start, ref.Start + ref.Num, numPhysClusters, streamSpec->Extents)); + streamSpec->Size = attr0.Size; + streamSpec->InitializedSize = attr0.InitializedSize; + streamSpec->Stream = mainStream; + streamSpec->BlockSizeLog = clusterSizeLog; + streamSpec->InUse = InUse(); + RINOK(streamSpec->InitAndSeek(attr0.CompressionUnit)); + *destStream = streamTemp.Detach(); + return S_OK; + } + streamSpec->Buf = attr0.Data; + } + streamSpec->Init(); + *destStream = streamTemp.Detach(); + return S_OK; +} + +int CMftRec::GetNumExtents(int dataIndex, int clusterSizeLog, UInt64 numPhysClusters) const +{ + if (dataIndex < 0) + return 0; + { + const CDataRef &ref = DataRefs[dataIndex]; + int numNonResident = 0; + int i; + for (i = ref.Start; i < ref.Start + ref.Num; i++) + if (DataAttrs[i].NonResident) + numNonResident++; + + const CAttr &attr0 = DataAttrs[ref.Start]; + + if (numNonResident != 0 || ref.Num != 1) + { + if (numNonResident != ref.Num || !attr0.IsCompressionUnitSupported()) + return 0; // error; + CRecordVector extents; + if (DataParseExtents(clusterSizeLog, DataAttrs, ref.Start, ref.Start + ref.Num, numPhysClusters, extents) != S_OK) + return 0; // error; + return extents.Size() - 1; + } + // if (attr0.Data.GetCapacity() != 0) + // return 1; + return 0; + } +} + +bool CMftRec::Parse(Byte *p, int sectorSizeLog, UInt32 numSectors, UInt32 recNumber, + CObjectVector *attrs) +{ + G32(p, Magic); + if (!IsFILE()) + return IsEmpty() || IsBAAD(); + + UInt32 usaOffset; + UInt32 numUsaItems; + G16(p + 0x04, usaOffset); + G16(p + 0x06, numUsaItems); + + if ((usaOffset & 1) != 0 || usaOffset + numUsaItems * 2 > ((UInt32)1 << sectorSizeLog) - 2 || + numUsaItems == 0 || numUsaItems - 1 != numSectors) + return false; + + UInt16 usn = Get16(p + usaOffset); + // PRF(printf("\nusn = %d", usn)); + for (UInt32 i = 1; i < numUsaItems; i++) + { + void *pp = p + (i << sectorSizeLog) - 2; + if (Get16(pp) != usn) + return false; + SetUi16(pp, Get16(p + usaOffset + i * 2)); + } + + // G64(p + 0x08, Lsn); + G16(p + 0x10, SeqNumber); + // G16(p + 0x12, LinkCount); + // PRF(printf(" L=%d", LinkCount)); + UInt32 attrOffs = Get16(p + 0x14); + G16(p + 0x16, Flags); + PRF(printf(" F=%4X", Flags)); + + UInt32 bytesInUse = Get32(p + 0x18); + UInt32 bytesAlloc = Get32(p + 0x1C); + G64(p + 0x20, BaseMftRef.Val); + if (BaseMftRef.Val != 0) + { + PRF(printf(" BaseRef=%d", (int)BaseMftRef.Val)); + // return false; // Check it; + } + // G16(p + 0x28, NextAttrInstance); + if (usaOffset >= 0x30) + if (Get32(p + 0x2C) != recNumber) // NTFS 3.1+ + return false; + + UInt32 limit = numSectors << sectorSizeLog; + if (attrOffs >= limit || (attrOffs & 7) != 0 || bytesInUse > limit + || bytesAlloc != limit) + return false; + + + for (UInt32 t = attrOffs; t < limit;) + { + CAttr attr; + // PRF(printf("\n %2d:", Attrs.Size())); + PRF(printf("\n")); + UInt32 length = attr.Parse(p + t, limit - t); + if (length == 0 || limit - t < length) + return false; + t += length; + if (attr.Type == 0xFFFFFFFF) + break; + switch(attr.Type) + { + case ATTR_TYPE_FILE_NAME: + { + CFileNameAttr fna; + if (!attr.ParseFileName(fna)) + return false; + FileNames.Add(fna); + PRF(printf(" flags = %4x", (int)fna.NameType)); + PRF(printf("\n %S", fna.Name)); + break; + } + case ATTR_TYPE_STANDARD_INFO: + if (!attr.ParseSi(SiAttr)) + return false; + break; + case ATTR_TYPE_DATA: + DataAttrs.Add(attr); + break; + default: + if (attrs) + attrs->Add(attr); + break; + } + } + + return true; +} + +struct CItem +{ + int RecIndex; + int DataIndex; + CMftRef ParentRef; + UString Name; + UInt32 Attrib; + + bool IsDir() const { return (DataIndex < 0); } +}; + +struct CDatabase +{ + CHeader Header; + CObjectVector Items; + CObjectVector Recs; + CMyComPtr InStream; + IArchiveOpenCallback *OpenCallback; + + CByteBuffer ByteBuf; + + CObjectVector VolAttrs; + + ~CDatabase() { ClearAndClose(); } + + void Clear(); + void ClearAndClose(); + + UString GetItemPath(Int32 index) const; + HRESULT Open(); + HRESULT ReadDir(Int32 parent, UInt32 cluster, int level); + + HRESULT SeekToCluster(UInt64 cluster); + + int FindMtfRec(const CMftRef &ref) const + { + UInt64 val = ref.GetIndex(); + int left = 0, right = Items.Size(); + while (left != right) + { + int mid = (left + right) / 2; + UInt64 midValue = Items[mid].RecIndex; + if (val == midValue) + return mid; + if (val < midValue) + right = mid; + else + left = mid + 1; + } + return -1; + } + +}; + +HRESULT CDatabase::SeekToCluster(UInt64 cluster) +{ + return InStream->Seek(cluster << Header.ClusterSizeLog, STREAM_SEEK_SET, NULL); +} + +void CDatabase::Clear() +{ + Items.Clear(); + Recs.Clear(); +} + +void CDatabase::ClearAndClose() +{ + Clear(); + InStream.Release(); +} + +#define MY_DIR_PREFIX(x) L"[" x L"]" WSTRING_PATH_SEPARATOR + +UString CDatabase::GetItemPath(Int32 index) const +{ + const CItem *item = &Items[index]; + UString name = item->Name; + for (int j = 0; j < 256; j++) + { + CMftRef ref = item->ParentRef; + index = FindMtfRec(ref); + if (ref.GetIndex() == 5) + return name; + if (index < 0 || Recs[Items[index].RecIndex].SeqNumber != ref.GetNumber()) + return MY_DIR_PREFIX(L"UNKNOWN") + name; + item = &Items[index]; + name = item->Name + WCHAR_PATH_SEPARATOR + name; + } + return MY_DIR_PREFIX(L"BAD") + name; +} + +HRESULT CDatabase::Open() +{ + Clear(); + + static const UInt32 kHeaderSize = 512; + Byte buf[kHeaderSize]; + RINOK(ReadStream_FALSE(InStream, buf, kHeaderSize)); + if (!Header.Parse(buf)) + return S_FALSE; + UInt64 fileSize; + RINOK(InStream->Seek(0, STREAM_SEEK_END, &fileSize)); + if (fileSize < Header.GetPhySize()) + return S_FALSE; + + SeekToCluster(Header.MftCluster); + + CMftRec mftRec; + UInt32 numSectorsInRec; + int recSizeLog; + CMyComPtr mftStream; + { + UInt32 blockSize = 1 << 12; + ByteBuf.SetCapacity(blockSize); + RINOK(ReadStream_FALSE(InStream, ByteBuf, blockSize)); + + UInt32 allocSize = Get32(ByteBuf + 0x1C); + recSizeLog = GetLog(allocSize); + if (recSizeLog < Header.SectorSizeLog) + return false; + numSectorsInRec = 1 << (recSizeLog - Header.SectorSizeLog); + if (!mftRec.Parse(ByteBuf, Header.SectorSizeLog, numSectorsInRec, NULL, 0)) + return S_FALSE; + if (!mftRec.IsFILE()) + return S_FALSE; + mftRec.ParseDataNames(); + if (mftRec.DataRefs.IsEmpty()) + return S_FALSE; + RINOK(mftRec.GetStream(InStream, 0, Header.ClusterSizeLog, Header.NumClusters, &mftStream)); + if (!mftStream) + return S_FALSE; + } + + UInt64 mftSize = mftRec.DataAttrs[0].Size; + if ((mftSize >> 4) > Header.GetPhySize()) + return S_FALSE; + + UInt64 numFiles = mftSize >> recSizeLog; + if (numFiles > (1 << 30)) + return S_FALSE; + if (OpenCallback) + { + RINOK(OpenCallback->SetTotal(&numFiles, &mftSize)); + } + const UInt32 kBufSize = (1 << 15); + if (kBufSize < (1 << recSizeLog)) + return S_FALSE; + + ByteBuf.SetCapacity((size_t)kBufSize); + Recs.Reserve((int)numFiles); + for (UInt64 pos64 = 0;;) + { + if (OpenCallback) + { + UInt64 numFiles = Recs.Size(); + if ((numFiles & 0x3FF) == 0) + { + RINOK(OpenCallback->SetCompleted(&numFiles, &pos64)); + } + } + UInt32 readSize = kBufSize; + UInt64 rem = mftSize - pos64; + if (readSize > rem) + readSize = (UInt32)rem; + if (readSize < ((UInt32)1 << recSizeLog)) + break; + RINOK(ReadStream_FALSE(mftStream, ByteBuf, (size_t)readSize)); + pos64 += readSize; + for (int i = 0; ((UInt32)(i + 1) << recSizeLog) <= readSize; i++) + { + PRF(printf("\n---------------------")); + PRF(printf("\n%5d:", Recs.Size())); + Byte *p = ByteBuf + ((UInt32)i << recSizeLog); + CMftRec rec; + if (!rec.Parse(p, Header.SectorSizeLog, numSectorsInRec, (UInt32)Recs.Size(), + (Recs.Size() == kRecIndex_Volume) ? &VolAttrs: NULL)) + return S_FALSE; + Recs.Add(rec); + } + } + + int i; + for (i = 0; i < Recs.Size(); i++) + { + CMftRec &rec = Recs[i]; + if (!rec.BaseMftRef.IsBaseItself()) + { + UInt64 refIndex = rec.BaseMftRef.GetIndex(); + if (refIndex > (UInt32)Recs.Size()) + return S_FALSE; + CMftRec &refRec = Recs[(int)refIndex]; + bool moveAttrs = (refRec.SeqNumber == rec.BaseMftRef.GetNumber() && refRec.BaseMftRef.IsBaseItself()); + if (rec.InUse() && refRec.InUse()) + { + if (!moveAttrs) + return S_FALSE; + } + else if (rec.InUse() || refRec.InUse()) + moveAttrs = false; + if (moveAttrs) + refRec.MoveAttrsFrom(rec); + } + } + + for (i = 0; i < Recs.Size(); i++) + Recs[i].ParseDataNames(); + + for (i = 0; i < Recs.Size(); i++) + { + CMftRec &rec = Recs[i]; + if (!rec.IsFILE() || !rec.BaseMftRef.IsBaseItself()) + continue; + int numNames = 0; + // printf("\n%4d: ", i); + for (int t = 0; t < rec.FileNames.Size(); t++) + { + const CFileNameAttr &fna = rec.FileNames[t]; + // printf("%4d %S | ", (int)fna.NameType, fna.Name); + if (fna.IsDos()) + continue; + int numDatas = rec.DataRefs.Size(); + + // For hard linked files we show substreams only for first Name. + if (numDatas > 1 && numNames > 0) + numDatas = 1; + numNames++; + + if (rec.IsDir()) + { + CItem item; + item.Name = fna.Name; + item.RecIndex = i; + item.DataIndex = -1; + item.ParentRef = fna.ParentDirRef; + item.Attrib = rec.SiAttr.Attrib | 0x10; + // item.Attrib = fna.Attrib; + Items.Add(item); + } + for (int di = 0; di < numDatas; di++) + { + CItem item; + item.Name = fna.Name; + item.Attrib = rec.SiAttr.Attrib; + const UString &subName = rec.DataAttrs[rec.DataRefs[di].Start].Name; + if (!subName.IsEmpty()) + { + // $BadClus:$Bad is sparse file for all clusters. So we skip it. + if (i == kRecIndex_BadClus && subName == L"$Bad") + continue; + item.Name += L":"; + item.Name += subName; + item.Attrib = fna.Attrib; + } + + PRF(printf("\n%3d", i)); + PRF(printf(" attrib=%2x", rec.SiAttr.Attrib)); + PRF(printf(" %S", item.Name)); + + item.RecIndex = i; + item.DataIndex = di; + item.ParentRef = fna.ParentDirRef; + + Items.Add(item); + rec.MyNumNameLinks++; + } + } + rec.FileNames.ClearAndFree(); + } + + return S_OK; +} + +class CHandler: + public IInArchive, + public IInArchiveGetStream, + public CMyUnknownImp, + CDatabase +{ +public: + MY_UNKNOWN_IMP2(IInArchive, IInArchiveGetStream) + INTERFACE_IInArchive(;) + STDMETHOD(GetStream)(UInt32 index, ISequentialInStream **stream); +}; + +STDMETHODIMP CHandler::GetStream(UInt32 index, ISequentialInStream **stream) +{ + COM_TRY_BEGIN + IInStream *stream2; + const CItem &item = Items[index]; + const CMftRec &rec = Recs[item.RecIndex]; + HRESULT res = rec.GetStream(InStream, item.DataIndex, Header.ClusterSizeLog, Header.NumClusters, &stream2); + *stream = (ISequentialInStream *)stream2; + return res; + COM_TRY_END +} + +static const STATPROPSTG kProps[] = +{ + { NULL, kpidPath, VT_BSTR}, + { NULL, kpidIsDir, VT_BOOL}, + { NULL, kpidSize, VT_UI8}, + { NULL, kpidPackSize, VT_UI8}, + { NULL, kpidMTime, VT_FILETIME}, + { NULL, kpidCTime, VT_FILETIME}, + { NULL, kpidATime, VT_FILETIME}, + { NULL, kpidAttrib, VT_UI4}, + { NULL, kpidLinks, VT_UI4}, + { NULL, kpidNumBlocks, VT_UI4} +}; + +static const STATPROPSTG kArcProps[] = +{ + { NULL, kpidVolumeName, VT_BSTR}, + { NULL, kpidFileSystem, VT_BSTR}, + { NULL, kpidClusterSize, VT_UI4}, + { NULL, kpidPhySize, VT_UI8}, + { NULL, kpidHeadersSize, VT_UI8}, + { NULL, kpidCTime, VT_FILETIME}, + + { NULL, kpidSectorSize, VT_UI4}, + { NULL, kpidId, VT_UI8} + // { NULL, kpidSectorsPerTrack, VT_UI4}, + // { NULL, kpidNumHeads, VT_UI4}, + // { NULL, kpidHiddenSectors, VT_UI4} +}; + +IMP_IInArchive_Props +IMP_IInArchive_ArcProps + +static void NtfsTimeToProp(UInt64 t, NWindows::NCOM::CPropVariant &prop) +{ + FILETIME ft; + ft.dwLowDateTime = (DWORD)t; + ft.dwHighDateTime = (DWORD)(t >> 32); + prop = ft; +} + +STDMETHODIMP CHandler::GetArchiveProperty(PROPID propID, PROPVARIANT *value) +{ + COM_TRY_BEGIN + NWindows::NCOM::CPropVariant prop; + + const CMftRec *volRec = (Recs.Size() > kRecIndex_Volume ? &Recs[kRecIndex_Volume] : NULL); + + switch(propID) + { + case kpidClusterSize: prop = Header.ClusterSize(); break; + case kpidPhySize: prop = Header.GetPhySize(); break; + /* + case kpidHeadersSize: + { + UInt64 val = 0; + for (int i = 0; i < kNumSysRecs; i++) + { + printf("\n%2d: %8I64d ", i, Recs[i].GetPackSize()); + if (i == 8) + i = i + val += Recs[i].GetPackSize(); + } + prop = val; + break; + } + */ + case kpidCTime: if (volRec) NtfsTimeToProp(volRec->SiAttr.CTime, prop); break;break; + case kpidVolumeName: + { + for (int i = 0; i < VolAttrs.Size(); i++) + { + const CAttr &attr = VolAttrs[i]; + if (attr.Type == ATTR_TYPE_VOLUME_NAME) + { + UString name; + GetString(attr.Data, (int)attr.Data.GetCapacity() / 2, name); + prop = name; + break; + } + } + break; + } + case kpidFileSystem: + { + AString s = "NTFS"; + for (int i = 0; i < VolAttrs.Size(); i++) + { + const CAttr &attr = VolAttrs[i]; + if (attr.Type == ATTR_TYPE_VOLUME_INFO) + { + CVolInfo vi; + if (attr.ParseVolInfo(vi)) + { + s += ' '; + char temp[16]; + ConvertUInt32ToString(vi.MajorVer, temp); + s += temp; + s += '.'; + ConvertUInt32ToString(vi.MinorVer, temp); + s += temp; + } + break; + } + } + prop = s; + break; + } + case kpidSectorSize: prop = (UInt32)1 << Header.SectorSizeLog; break; + case kpidId: prop = Header.SerialNumber; break; + // case kpidMediaType: prop = Header.MediaType; break; + // case kpidSectorsPerTrack: prop = Header.SectorsPerTrack; break; + // case kpidNumHeads: prop = Header.NumHeads; break; + // case kpidHiddenSectors: prop = Header.NumHiddenSectors; break; + } + prop.Detach(value); + return S_OK; + COM_TRY_END +} + +STDMETHODIMP CHandler::GetProperty(UInt32 index, PROPID propID, PROPVARIANT *value) +{ + COM_TRY_BEGIN + NWindows::NCOM::CPropVariant prop; + const CItem &item = Items[index]; + const CMftRec &rec = Recs[item.RecIndex]; + + const CAttr *data= NULL; + if (item.DataIndex >= 0) + data = &rec.DataAttrs[rec.DataRefs[item.DataIndex].Start]; + + switch(propID) + { + case kpidPath: + { + UString name = GetItemPath(index); + const wchar_t *prefix = NULL; + if (!rec.InUse()) + prefix = MY_DIR_PREFIX(L"DELETED"); + else if (item.RecIndex < kNumSysRecs) + prefix = MY_DIR_PREFIX(L"SYSTEM"); + if (prefix) + name = prefix + name; + prop = name; + break; + } + + case kpidIsDir: prop = item.IsDir(); break; + case kpidMTime: NtfsTimeToProp(rec.SiAttr.MTime, prop); break; + + case kpidCTime: NtfsTimeToProp(rec.SiAttr.CTime, prop); break; + case kpidATime: NtfsTimeToProp(rec.SiAttr.ATime, prop); break; + case kpidAttrib: + prop = item.Attrib; + break; + case kpidLinks: prop = rec.MyNumNameLinks; break; + case kpidSize: if (data) prop = data->GetSize(); break; + case kpidPackSize: if (data) prop = data->GetPackSize(); break; + case kpidNumBlocks: if (data) prop = (UInt32)rec.GetNumExtents(item.DataIndex, Header.ClusterSizeLog, Header.NumClusters); break; + } + prop.Detach(value); + return S_OK; + COM_TRY_END +} + +STDMETHODIMP CHandler::Open(IInStream *stream, const UInt64 *, IArchiveOpenCallback *callback) +{ + COM_TRY_BEGIN + { + OpenCallback = callback; + InStream = stream; + HRESULT res; + try + { + res = CDatabase::Open(); + if (res == S_OK) + return S_OK; + } + catch(...) + { + Close(); + throw; + } + Close(); + return res; + } + COM_TRY_END +} + +STDMETHODIMP CHandler::Close() +{ + ClearAndClose(); + return S_OK; +} + +STDMETHODIMP CHandler::Extract(const UInt32 *indices, UInt32 numItems, + Int32 testMode, IArchiveExtractCallback *extractCallback) +{ + COM_TRY_BEGIN + bool allFilesMode = (numItems == (UInt32)-1); + if (allFilesMode) + numItems = Items.Size(); + if (numItems == 0) + return S_OK; + UInt32 i; + UInt64 totalSize = 0; + for (i = 0; i < numItems; i++) + { + const CItem &item = Items[allFilesMode ? i : indices[i]]; + const CMftRec &rec = Recs[item.RecIndex]; + if (!rec.IsDir()) + totalSize += rec.GetSize(item.DataIndex); + } + RINOK(extractCallback->SetTotal(totalSize)); + + UInt64 totalPackSize; + totalSize = totalPackSize = 0; + + CByteBuffer buf; + UInt32 clusterSize = Header.ClusterSize(); + buf.SetCapacity(clusterSize); + + NCompress::CCopyCoder *copyCoderSpec = new NCompress::CCopyCoder(); + CMyComPtr copyCoder = copyCoderSpec; + + CLocalProgress *lps = new CLocalProgress; + CMyComPtr progress = lps; + lps->Init(extractCallback, false); + + CDummyOutStream *outStreamSpec = new CDummyOutStream; + CMyComPtr outStream(outStreamSpec); + + for (i = 0; i < numItems; i++) + { + lps->InSize = totalPackSize; + lps->OutSize = totalSize; + RINOK(lps->SetCur()); + CMyComPtr realOutStream; + Int32 askMode = testMode ? + NExtract::NAskMode::kTest : + NExtract::NAskMode::kExtract; + Int32 index = allFilesMode ? i : indices[i]; + RINOK(extractCallback->GetStream(index, &realOutStream, askMode)); + + const CItem &item = Items[index]; + if (item.IsDir()) + { + RINOK(extractCallback->PrepareOperation(askMode)); + RINOK(extractCallback->SetOperationResult(NExtract::NOperationResult::kOK)); + continue; + } + + if (!testMode && !realOutStream) + continue; + RINOK(extractCallback->PrepareOperation(askMode)); + + outStreamSpec->SetStream(realOutStream); + realOutStream.Release(); + outStreamSpec->Init(); + + const CMftRec &rec = Recs[item.RecIndex]; + const CAttr &data = rec.DataAttrs[rec.DataRefs[item.DataIndex].Start]; + + int res = NExtract::NOperationResult::kDataError; + { + CMyComPtr inStream; + HRESULT hres = rec.GetStream(InStream, item.DataIndex, Header.ClusterSizeLog, Header.NumClusters, &inStream); + if (hres == S_FALSE) + res = NExtract::NOperationResult::kUnSupportedMethod; + else + { + RINOK(hres); + if (inStream) + { + HRESULT hres = copyCoder->Code(inStream, outStream, NULL, NULL, progress); + if (hres != S_OK && hres != S_FALSE) + { + RINOK(hres); + } + if (/* copyCoderSpec->TotalSize == item.GetSize() && */ hres == S_OK) + res = NExtract::NOperationResult::kOK; + } + } + } + totalPackSize += data.GetPackSize(); + totalSize += data.GetSize(); + outStreamSpec->ReleaseStream(); + RINOK(extractCallback->SetOperationResult(res)); + } + return S_OK; + COM_TRY_END +} + +STDMETHODIMP CHandler::GetNumberOfItems(UInt32 *numItems) +{ + *numItems = Items.Size(); + return S_OK; +} + +static IInArchive *CreateArc() { return new CHandler; } + +static CArcInfo g_ArcInfo = + { L"NTFS", L"ntfs img", 0, 0xD9, { 'N', 'T', 'F', 'S', ' ', ' ', ' ', ' ', 0 }, 9, false, CreateArc, 0 }; + +REGISTER_ARC(Fat) + +}} diff --git a/CPP/7zip/Archive/PeHandler.cpp b/CPP/7zip/Archive/PeHandler.cpp new file mode 100644 index 0000000..c64067a --- /dev/null +++ b/CPP/7zip/Archive/PeHandler.cpp @@ -0,0 +1,1752 @@ +// PeHandler.cpp + +#include "StdAfx.h" + +#include "../../../C/CpuArch.h" + +#include "Common/DynamicBuffer.h" +#include "Common/ComTry.h" +#include "Common/IntToString.h" +#include "Common/StringConvert.h" + +#include "Windows/PropVariantUtils.h" +#include "Windows/Time.h" + +#include "../Common/LimitedStreams.h" +#include "../Common/ProgressUtils.h" +#include "../Common/RegisterArc.h" +#include "../Common/StreamObjects.h" +#include "../Common/StreamUtils.h" + +#include "../Compress/CopyCoder.h" + +#define Get16(p) GetUi16(p) +#define Get32(p) GetUi32(p) +#define Get64(p) GetUi64(p) + +using namespace NWindows; + +namespace NArchive { +namespace NPe { + +#define NUM_SCAN_SECTIONS_MAX (1 << 6) + +#define PE_SIG 0x00004550 +#define PE_OptHeader_Magic_32 0x10B +#define PE_OptHeader_Magic_64 0x20B + +static AString GetDecString(UInt32 v) +{ + char sz[32]; + ConvertUInt64ToString(v, sz); + return sz; +} + +struct CVersion +{ + UInt16 Major; + UInt16 Minor; + + void Parse(const Byte *buf); + AString GetString() const { return GetDecString(Major) + '.' + GetDecString(Minor); } +}; + +void CVersion::Parse(const Byte *p) +{ + Major = Get16(p); + Minor = Get16(p + 2); +} + +static const UInt32 kHeaderSize = 4 + 20; + +struct CHeader +{ + UInt16 NumSections; + UInt32 Time; + UInt32 PointerToSymbolTable; + UInt32 NumSymbols; + UInt16 OptHeaderSize; + UInt16 Flags; + UInt16 Machine; + + bool Parse(const Byte *buf); +}; + +bool CHeader::Parse(const Byte *p) +{ + if (Get32(p) != PE_SIG) + return false; + p += 4; + Machine = Get16(p + 0); + NumSections = Get16(p + 2); + Time = Get32(p + 4); + PointerToSymbolTable = Get32(p + 8); + NumSymbols = Get32(p + 12); + OptHeaderSize = Get16(p + 16); + Flags = Get16(p + 18); + return true; +} + +struct CDirLink +{ + UInt32 Va; + UInt32 Size; + void Parse(const Byte *p); +}; + +void CDirLink::Parse(const Byte *p) +{ + Va = Get32(p); + Size = Get32(p + 4); +} + +enum +{ + kDirLink_Certificate = 4, + kDirLink_Debug = 6 +}; + +struct CDebugEntry +{ + UInt32 Flags; + UInt32 Time; + CVersion Ver; + UInt32 Type; + UInt32 Size; + UInt32 Va; + UInt32 Pa; + + void Parse(const Byte *p); +}; + +void CDebugEntry::Parse(const Byte *p) +{ + Flags = Get32(p); + Time = Get32(p + 4); + Ver.Parse(p + 8); + Type = Get32(p + 12); + Size = Get32(p + 16); + Va = Get32(p + 20); + Pa = Get32(p + 24); +} + +static const UInt32 kNumDirItemsMax = 16; + +struct COptHeader +{ + UInt16 Magic; + Byte LinkerVerMajor; + Byte LinkerVerMinor; + + UInt32 CodeSize; + UInt32 InitDataSize; + UInt32 UninitDataSize; + + // UInt32 AddressOfEntryPoint; + // UInt32 BaseOfCode; + // UInt32 BaseOfData32; + UInt64 ImageBase; + + UInt32 SectAlign; + UInt32 FileAlign; + + CVersion OsVer; + CVersion ImageVer; + CVersion SubsysVer; + + UInt32 ImageSize; + UInt32 HeadersSize; + UInt32 CheckSum; + UInt16 SubSystem; + UInt16 DllCharacts; + + UInt64 StackReserve; + UInt64 StackCommit; + UInt64 HeapReserve; + UInt64 HeapCommit; + + UInt32 NumDirItems; + CDirLink DirItems[kNumDirItemsMax]; + + bool Is64Bit() const { return Magic == PE_OptHeader_Magic_64; } + bool Parse(const Byte *p, UInt32 size); + + int GetNumFileAlignBits() const + { + for (int i = 9; i <= 16; i++) + if (((UInt32)1 << i) == FileAlign) + return i; + return -1; + } +}; + +bool COptHeader::Parse(const Byte *p, UInt32 size) +{ + Magic = Get16(p); + switch (Magic) + { + case PE_OptHeader_Magic_32: + case PE_OptHeader_Magic_64: + break; + default: + return false; + } + LinkerVerMajor = p[2]; + LinkerVerMinor = p[3]; + + bool hdr64 = Is64Bit(); + + CodeSize = Get32(p + 4); + InitDataSize = Get32(p + 8); + UninitDataSize = Get32(p + 12); + + // AddressOfEntryPoint = Get32(p + 16); + // BaseOfCode = Get32(p + 20); + // BaseOfData32 = hdr64 ? 0: Get32(p + 24); + ImageBase = hdr64 ? GetUi64(p + 24) : Get32(p + 28); + + SectAlign = Get32(p + 32); + FileAlign = Get32(p + 36); + + OsVer.Parse(p + 40); + ImageVer.Parse(p + 44); + SubsysVer.Parse(p + 48); + + // reserved = Get32(p + 52); + + ImageSize = Get32(p + 56); + HeadersSize = Get32(p + 60); + CheckSum = Get32(p + 64); + SubSystem = Get16(p + 68); + DllCharacts = Get16(p + 70); + + if (hdr64) + { + StackReserve = Get64(p + 72); + StackCommit = Get64(p + 80); + HeapReserve = Get64(p + 88); + HeapCommit = Get64(p + 96); + } + else + { + StackReserve = Get32(p + 72); + StackCommit = Get32(p + 76); + HeapReserve = Get32(p + 80); + HeapCommit = Get32(p + 84); + } + UInt32 pos = (hdr64 ? 108 : 92); + NumDirItems = Get32(p + pos); + pos += 4; + if (pos + 8 * NumDirItems != size) + return false; + for (UInt32 i = 0; i < NumDirItems && i < kNumDirItemsMax; i++) + DirItems[i].Parse(p + pos + i * 8); + return true; +} + +static const UInt32 kSectionSize = 40; + +struct CSection +{ + AString Name; + + UInt32 VSize; + UInt32 Va; + UInt32 PSize; + UInt32 Pa; + UInt32 Flags; + UInt32 Time; + // UInt16 NumRelocs; + bool IsDebug; + bool IsRealSect; + bool IsAdditionalSection; + + CSection(): IsRealSect(false), IsDebug(false), IsAdditionalSection(false) {} + UInt64 GetPackSize() const { return PSize; } + + void UpdateTotalSize(UInt32 &totalSize) + { + UInt32 t = Pa + PSize; + if (t > totalSize) + totalSize = t; + } + void Parse(const Byte *p); +}; + +static bool operator <(const CSection &a1, const CSection &a2) { return (a1.Pa < a2.Pa) || ((a1.Pa == a2.Pa) && (a1.PSize < a2.PSize)) ; } +static bool operator ==(const CSection &a1, const CSection &a2) { return (a1.Pa == a2.Pa) && (a1.PSize == a2.PSize); } + +static AString GetName(const Byte *name) +{ + const int kNameSize = 8; + AString res; + char *p = res.GetBuffer(kNameSize); + memcpy(p, name, kNameSize); + p[kNameSize] = 0; + res.ReleaseBuffer(); + return res; +} + +void CSection::Parse(const Byte *p) +{ + Name = GetName(p); + VSize = Get32(p + 8); + Va = Get32(p + 12); + PSize = Get32(p + 16); + Pa = Get32(p + 20); + // NumRelocs = Get16(p + 32); + Flags = Get32(p + 36); +} + +static const CUInt32PCharPair g_HeaderCharacts[] = +{ + { 1, "Executable" }, + { 13, "DLL" }, + { 8, "32-bit" }, + { 5, "LargeAddress" }, + { 0, "NoRelocs" }, + { 2, "NoLineNums" }, + { 3, "NoLocalSyms" }, + { 4, "AggressiveWsTrim" }, + { 9, "NoDebugInfo" }, + { 10, "RemovableRun" }, + { 11, "NetRun" }, + { 12, "System" }, + { 14, "UniCPU" }, + { 7, "Little-Endian" }, + { 15, "Big-Endian" } +}; + +static const CUInt32PCharPair g_DllCharacts[] = +{ + { 6, "Relocated" }, + { 7, "Integrity" }, + { 8, "NX-Compatible" }, + { 9, "NoIsolation" }, + { 10, "NoSEH" }, + { 11, "NoBind" }, + { 13, "WDM" }, + { 15, "TerminalServerAware" } +}; + +static const CUInt32PCharPair g_SectFlags[] = +{ + { 3, "NoPad" }, + { 5, "Code" }, + { 6, "InitializedData" }, + { 7, "UninitializedData" }, + { 9, "Comments" }, + { 11, "Remove" }, + { 12, "COMDAT" }, + { 15, "GP" }, + { 24, "ExtendedRelocations" }, + { 25, "Discardable" }, + { 26, "NotCached" }, + { 27, "NotPaged" }, + { 28, "Shared" }, + { 29, "Execute" }, + { 30, "Read" }, + { 31, "Write" } +}; + +static const CUInt32PCharPair g_MachinePairs[] = +{ + { 0x014C, "x86" }, + { 0x0162, "MIPS-R3000" }, + { 0x0166, "MIPS-R4000" }, + { 0x0168, "MIPS-R10000" }, + { 0x0169, "MIPS-V2" }, + { 0x0184, "Alpha" }, + { 0x01A2, "SH3" }, + { 0x01A3, "SH3-DSP" }, + { 0x01A4, "SH3E" }, + { 0x01A6, "SH4" }, + { 0x01A8, "SH5" }, + { 0x01C0, "ARM" }, + { 0x01C2, "ARM-Thumb" }, + { 0x01F0, "PPC" }, + { 0x01F1, "PPC-FP" }, + { 0x0200, "IA-64" }, + { 0x0284, "Alpha-64" }, + { 0x0200, "IA-64" }, + { 0x0366, "MIPSFPU" }, + { 0x8664, "x64" }, + { 0x0EBC, "EFI" } +}; + +static const CUInt32PCharPair g_SubSystems[] = +{ + { 0, "Unknown" }, + { 1, "Native" }, + { 2, "Windows GUI" }, + { 3, "Windows CUI" }, + { 7, "Posix" }, + { 9, "Windows CE" }, + { 10, "EFI" }, + { 11, "EFI Boot" }, + { 12, "EFI Runtime" }, + { 13, "EFI ROM" }, + { 14, "XBOX" } +}; + +static const wchar_t *g_ResTypes[] = +{ + NULL, + L"CURSOR", + L"BITMAP", + L"ICON", + L"MENU", + L"DIALOG", + L"STRING", + L"FONTDIR", + L"FONT", + L"ACCELERATOR", + L"RCDATA", + L"MESSAGETABLE", + L"GROUP_CURSOR", + NULL, + L"GROUP_ICON", + NULL, + L"VERSION", + L"DLGINCLUDE", + NULL, + L"PLUGPLAY", + L"VXD", + L"ANICURSOR", + L"ANIICON", + L"HTML", + L"MANIFEST" +}; + +const UInt32 kFlag = (UInt32)1 << 31; +const UInt32 kMask = ~kFlag; + +struct CTableItem +{ + UInt32 Offset; + UInt32 ID; +}; + + +const UInt32 kBmpHeaderSize = 14; +const UInt32 kIconHeaderSize = 22; + +struct CResItem +{ + UInt32 Type; + UInt32 ID; + UInt32 Lang; + + UInt32 Size; + UInt32 Offset; + + UInt32 HeaderSize; + Byte Header[kIconHeaderSize]; // it must be enough for max size header. + bool Enabled; + + bool IsNameEqual(const CResItem &item) const { return Lang == item.Lang; } + UInt32 GetSize() const { return Size + HeaderSize; } + bool IsBmp() const { return Type == 2; } + bool IsIcon() const { return Type == 3; } + bool IsString() const { return Type == 6; } + bool IsRcData() const { return Type == 10; } + bool IsRcDataOrUnknown() const { return IsRcData() || Type > 64; } +}; + +struct CStringItem +{ + UInt32 Lang; + UInt32 Size; + CByteDynamicBuffer Buf; + + void AddChar(Byte c); + void AddWChar(UInt16 c); +}; + +void CStringItem::AddChar(Byte c) +{ + Buf.EnsureCapacity(Size + 2); + Buf[Size++] = c; + Buf[Size++] = 0; +} + +void CStringItem::AddWChar(UInt16 c) +{ + if (c == '\n') + { + AddChar('\\'); + c = 'n'; + } + Buf.EnsureCapacity(Size + 2); + SetUi16(Buf + Size, c); + Size += 2; +} + +struct CMixItem +{ + int SectionIndex; + int ResourceIndex; + int StringIndex; + + bool IsSectionItem() const { return ResourceIndex < 0 && StringIndex < 0; }; +}; + +struct CUsedBitmap +{ + CByteBuffer Buf; +public: + void Alloc(size_t size) + { + size = (size + 7) / 8; + Buf.SetCapacity(size); + memset(Buf, 0, size); + } + void Free() + { + Buf.SetCapacity(0); + } + bool SetRange(size_t from, int size) + { + for (int i = 0; i < size; i++) + { + size_t pos = (from + i) >> 3; + Byte mask = (Byte)(1 << ((from + i) & 7)); + Byte b = Buf[pos]; + if ((b & mask) != 0) + return false; + Buf[pos] = b | mask; + } + return true; + } +}; + + +class CHandler: + public IInArchive, + public IInArchiveGetStream, + public CMyUnknownImp +{ + CMyComPtr _stream; + CObjectVector _sections; + UInt32 _peOffset; + CHeader _header; + COptHeader _optHeader; + UInt32 _totalSize; + UInt32 _totalSizeLimited; + Int32 _mainSubfile; + + CRecordVector _items; + CObjectVector _strings; + + CByteBuffer _buf; + bool _oneLang; + UString _resourceFileName; + CUsedBitmap _usedRes; + bool _parseResources; + + CRecordVector _mixItems; + + HRESULT LoadDebugSections(IInStream *stream, bool &thereIsSection); + HRESULT Open2(IInStream *stream, IArchiveOpenCallback *callback); + bool Parse(const Byte *buf, UInt32 size); + + void AddResNameToString(UString &s, UInt32 id) const; + UString GetLangPrefix(UInt32 lang); + HRESULT ReadString(UInt32 offset, UString &dest) const; + HRESULT ReadTable(UInt32 offset, CRecordVector &items); + bool ParseStringRes(UInt32 id, UInt32 lang, const Byte *src, UInt32 size); + HRESULT OpenResources(int sectIndex, IInStream *stream, IArchiveOpenCallback *callback); + void CloseResources(); + + + bool CheckItem(const CSection §, const CResItem &item, size_t offset) const + { + return item.Offset >= sect.Va && offset <= _buf.GetCapacity() && _buf.GetCapacity() - offset >= item.Size; + } + +public: + MY_UNKNOWN_IMP2(IInArchive, IInArchiveGetStream) + INTERFACE_IInArchive(;) + STDMETHOD(GetStream)(UInt32 index, ISequentialInStream **stream); +}; + +bool CHandler::Parse(const Byte *buf, UInt32 size) +{ + UInt32 i; + if (size < 512) + return false; + _peOffset = Get32(buf + 0x3C); + if (_peOffset >= 0x1000 || _peOffset + 512 > size || (_peOffset & 7) != 0) + return false; + + UInt32 pos = _peOffset; + if (!_header.Parse(buf + pos)) + return false; + if (_header.OptHeaderSize > 512 || _header.NumSections > NUM_SCAN_SECTIONS_MAX) + return false; + pos += kHeaderSize; + + if (!_optHeader.Parse(buf + pos, _header.OptHeaderSize)) + return false; + + pos += _header.OptHeaderSize; + _totalSize = pos; + + for (i = 0; i < _header.NumSections; i++, pos += kSectionSize) + { + CSection sect; + if (pos + kSectionSize > size) + return false; + sect.Parse(buf + pos); + sect.IsRealSect = true; + sect.UpdateTotalSize(_totalSize); + _sections.Add(sect); + } + + return true; +} + +enum +{ + kpidSectAlign = kpidUserDefined, + kpidFileAlign, + kpidLinkerVer, + kpidOsVer, + kpidImageVer, + kpidSubsysVer, + kpidCodeSize, + kpidImageSize, + kpidInitDataSize, + kpidUnInitDataSize, + kpidHeadersSizeUnInitDataSize, + kpidSubSystem, + kpidDllCharacts, + kpidStackReserve, + kpidStackCommit, + kpidHeapReserve, + kpidHeapCommit, + kpidImageBase + // kpidAddressOfEntryPoint, + // kpidBaseOfCode, + // kpidBaseOfData32, +}; + +STATPROPSTG kArcProps[] = +{ + { NULL, kpidCpu, VT_BSTR}, + { NULL, kpidBit64, VT_BOOL}, + { NULL, kpidCharacts, VT_BSTR}, + { NULL, kpidCTime, VT_FILETIME}, + { NULL, kpidPhySize, VT_UI4}, + { NULL, kpidHeadersSize, VT_UI4}, + { NULL, kpidChecksum, VT_UI4}, + { L"Image Size", kpidImageSize, VT_UI4}, + { L"Section Alignment", kpidSectAlign, VT_UI4}, + { L"File Alignment", kpidFileAlign, VT_UI4}, + { L"Code Size", kpidCodeSize, VT_UI4}, + { L"Initialized Data Size", kpidInitDataSize, VT_UI4}, + { L"Uninitialized Data Size", kpidUnInitDataSize, VT_UI4}, + { L"Linker Version", kpidLinkerVer, VT_BSTR}, + { L"OS Version", kpidOsVer, VT_BSTR}, + { L"Image Version", kpidImageVer, VT_BSTR}, + { L"Subsystem Version", kpidSubsysVer, VT_BSTR}, + { L"Subsystem", kpidSubSystem, VT_BSTR}, + { L"DLL Characteristics", kpidDllCharacts, VT_BSTR}, + { L"Stack Reserve", kpidStackReserve, VT_UI8}, + { L"Stack Commit", kpidStackCommit, VT_UI8}, + { L"Heap Reserve", kpidHeapReserve, VT_UI8}, + { L"Heap Commit", kpidHeapCommit, VT_UI8}, + { L"Image Base", kpidImageBase, VT_UI8} + // { L"Address Of Entry Point", kpidAddressOfEntryPoint, VT_UI8}, + // { L"Base Of Code", kpidBaseOfCode, VT_UI8}, + // { L"Base Of Data", kpidBaseOfData32, VT_UI8}, +}; + +STATPROPSTG kProps[] = +{ + { NULL, kpidPath, VT_BSTR}, + { NULL, kpidSize, VT_UI8}, + { NULL, kpidPackSize, VT_UI8}, + { NULL, kpidCharacts, VT_BSTR}, + { NULL, kpidOffset, VT_UI8}, + { NULL, kpidVa, VT_UI8} +}; + +IMP_IInArchive_Props +IMP_IInArchive_ArcProps_WITH_NAME + +static void VerToProp(const CVersion &v, NCOM::CPropVariant &prop) +{ + StringToProp(v.GetString(), prop); +} + +void TimeToProp(UInt32 unixTime, NCOM::CPropVariant &prop) +{ + if (unixTime != 0) + { + FILETIME ft; + NTime::UnixTimeToFileTime(unixTime, ft); + prop = ft; + } +} + +STDMETHODIMP CHandler::GetArchiveProperty(PROPID propID, PROPVARIANT *value) +{ + COM_TRY_BEGIN + NCOM::CPropVariant prop; + switch(propID) + { + case kpidSectAlign: prop = _optHeader.SectAlign; break; + case kpidFileAlign: prop = _optHeader.FileAlign; break; + case kpidLinkerVer: + { + CVersion v = { _optHeader.LinkerVerMajor, _optHeader.LinkerVerMinor }; + VerToProp(v, prop); + break; + } + + case kpidOsVer: VerToProp(_optHeader.OsVer, prop); break; + case kpidImageVer: VerToProp(_optHeader.ImageVer, prop); break; + case kpidSubsysVer: VerToProp(_optHeader.SubsysVer, prop); break; + case kpidCodeSize: prop = _optHeader.CodeSize; break; + case kpidInitDataSize: prop = _optHeader.InitDataSize; break; + case kpidUnInitDataSize: prop = _optHeader.UninitDataSize; break; + case kpidImageSize: prop = _optHeader.ImageSize; break; + case kpidPhySize: prop = _totalSize; break; + case kpidHeadersSize: prop = _optHeader.HeadersSize; break; + case kpidChecksum: prop = _optHeader.CheckSum; break; + + case kpidCpu: PAIR_TO_PROP(g_MachinePairs, _header.Machine, prop); break; + case kpidBit64: if (_optHeader.Is64Bit()) prop = true; break; + case kpidSubSystem: PAIR_TO_PROP(g_SubSystems, _optHeader.SubSystem, prop); break; + + case kpidMTime: + case kpidCTime: TimeToProp(_header.Time, prop); break; + case kpidCharacts: FLAGS_TO_PROP(g_HeaderCharacts, _header.Flags, prop); break; + case kpidDllCharacts: FLAGS_TO_PROP(g_DllCharacts, _optHeader.DllCharacts, prop); break; + case kpidStackReserve: prop = _optHeader.StackReserve; break; + case kpidStackCommit: prop = _optHeader.StackCommit; break; + case kpidHeapReserve: prop = _optHeader.HeapReserve; break; + case kpidHeapCommit: prop = _optHeader.HeapCommit; break; + + case kpidImageBase: prop = _optHeader.ImageBase; break; + // case kpidAddressOfEntryPoint: prop = _optHeader.AddressOfEntryPoint; break; + // case kpidBaseOfCode: prop = _optHeader.BaseOfCode; break; + // case kpidBaseOfData32: if (!_optHeader.Is64Bit()) prop = _optHeader.BaseOfData32; break; + + case kpidMainSubfile: if (_mainSubfile >= 0) prop = (UInt32)_mainSubfile; break; + } + prop.Detach(value); + return S_OK; + COM_TRY_END +} + +void CHandler::AddResNameToString(UString &s, UInt32 id) const +{ + if ((id & kFlag) != 0) + { + UString name; + if (ReadString(id & kMask, name) == S_OK) + { + if (name.IsEmpty()) + s += L"[]"; + else + { + if (name.Length() > 1 && name[0] == '"' && name.Back() == '"') + name = name.Mid(1, name.Length() - 2); + s += name; + } + return; + } + } + wchar_t sz[32]; + ConvertUInt32ToString(id, sz); + s += sz; +} + +UString CHandler::GetLangPrefix(UInt32 lang) +{ + UString s = _resourceFileName; + s += WCHAR_PATH_SEPARATOR; + if (!_oneLang) + { + AddResNameToString(s, lang); + s += WCHAR_PATH_SEPARATOR; + } + return s; +} + +STDMETHODIMP CHandler::GetProperty(UInt32 index, PROPID propID, PROPVARIANT *value) +{ + COM_TRY_BEGIN + NCOM::CPropVariant prop; + const CMixItem &mixItem = _mixItems[index]; + if (mixItem.StringIndex >= 0) + { + const CStringItem &item = _strings[mixItem.StringIndex]; + switch(propID) + { + case kpidPath: prop = GetLangPrefix(item.Lang) + L"string.txt"; break; + case kpidSize: + case kpidPackSize: + prop = (UInt64)item.Size; break; + } + } + else if (mixItem.ResourceIndex < 0) + { + const CSection &item = _sections[mixItem.SectionIndex]; + switch(propID) + { + case kpidPath: StringToProp(item.Name, prop); break; + case kpidSize: prop = (UInt64)item.VSize; break; + case kpidPackSize: prop = (UInt64)item.GetPackSize(); break; + case kpidOffset: prop = item.Pa; break; + case kpidVa: if (item.IsRealSect) prop = item.Va; break; + case kpidMTime: + case kpidCTime: + TimeToProp(item.IsDebug ? item.Time : _header.Time, prop); break; + case kpidCharacts: if (item.IsRealSect) FLAGS_TO_PROP(g_SectFlags, item.Flags, prop); break; + } + } + else + { + const CResItem &item = _items[mixItem.ResourceIndex]; + switch(propID) + { + case kpidPath: + { + UString s = GetLangPrefix(item.Lang); + { + const wchar_t *p = NULL; + if (item.Type < sizeof(g_ResTypes) / sizeof(g_ResTypes[0])) + p = g_ResTypes[item.Type]; + if (p != 0) + s += p; + else + AddResNameToString(s, item.Type); + } + s += WCHAR_PATH_SEPARATOR; + AddResNameToString(s, item.ID); + if (item.HeaderSize != 0) + { + if (item.IsBmp()) + s += L".bmp"; + else if (item.IsIcon()) + s += L".ico"; + } + prop = s; + break; + } + case kpidSize: prop = (UInt64)item.GetSize(); break; + case kpidPackSize: prop = (UInt64)item.Size; break; + } + } + prop.Detach(value); + return S_OK; + COM_TRY_END +} + +HRESULT CHandler::LoadDebugSections(IInStream *stream, bool &thereIsSection) +{ + thereIsSection = false; + const CDirLink &debugLink = _optHeader.DirItems[kDirLink_Debug]; + if (debugLink.Size == 0) + return S_OK; + const unsigned kEntrySize = 28; + UInt32 numItems = debugLink.Size / kEntrySize; + if (numItems * kEntrySize != debugLink.Size || numItems > 16) + return S_FALSE; + + UInt64 pa = 0; + int i; + for (i = 0; i < _sections.Size(); i++) + { + const CSection § = _sections[i]; + if (sect.Va < debugLink.Va && debugLink.Va + debugLink.Size <= sect.Va + sect.PSize) + { + pa = sect.Pa + (debugLink.Va - sect.Va); + break; + } + } + if (i == _sections.Size()) + { + return S_OK; + // Exe for ARM requires S_OK + // return S_FALSE; + } + + CByteBuffer buffer; + buffer.SetCapacity(debugLink.Size); + Byte *buf = buffer; + + RINOK(stream->Seek(pa, STREAM_SEEK_SET, NULL)); + RINOK(ReadStream_FALSE(stream, buf, debugLink.Size)); + + for (i = 0; i < (int)numItems; i++) + { + CDebugEntry de; + de.Parse(buf); + + if (de.Size == 0) + continue; + + CSection sect; + sect.Name = ".debug" + GetDecString(i); + + sect.IsDebug = true; + sect.Time = de.Time; + sect.Va = de.Va; + sect.Pa = de.Pa; + sect.PSize = sect.VSize = de.Size; + UInt32 totalSize = sect.Pa + sect.PSize; + if (totalSize > _totalSize) + { + _totalSize = totalSize; + _sections.Add(sect); + thereIsSection = true; + } + buf += kEntrySize; + } + + return S_OK; +} + +HRESULT CHandler::ReadString(UInt32 offset, UString &dest) const +{ + if ((offset & 1) != 0 || offset >= _buf.GetCapacity()) + return S_FALSE; + size_t rem = _buf.GetCapacity() - offset; + if (rem < 2) + return S_FALSE; + unsigned length = Get16(_buf + offset); + if ((rem - 2) / 2 < length) + return S_FALSE; + dest.Empty(); + offset += 2; + for (unsigned i = 0; i < length; i++) + dest += (wchar_t)Get16(_buf + offset + i * 2); + return S_OK; +} + +HRESULT CHandler::ReadTable(UInt32 offset, CRecordVector &items) +{ + if ((offset & 3) != 0 || offset >= _buf.GetCapacity()) + return S_FALSE; + size_t rem = _buf.GetCapacity() - offset; + if (rem < 16) + return S_FALSE; + items.Clear(); + unsigned numNameItems = Get16(_buf + offset + 12); + unsigned numIdItems = Get16(_buf + offset + 14); + unsigned numItems = numNameItems + numIdItems; + if ((rem - 16) / 8 < numItems) + return S_FALSE; + if (!_usedRes.SetRange(offset, 16 + numItems * 8)) + return S_FALSE; + offset += 16; + _oneLang = true; + unsigned i; + for (i = 0; i < numItems; i++) + { + CTableItem item; + const Byte *buf = _buf + offset; + offset += 8; + item.ID = Get32(buf + 0); + if (((item.ID & kFlag) != 0) != (i < numNameItems)) + return S_FALSE; + item.Offset = Get32(buf + 4); + items.Add(item); + } + return S_OK; +} + +static const UInt32 kFileSizeMax = (UInt32)1 << 30; +static const int kNumResItemsMax = (UInt32)1 << 23; +static const int kNumStringLangsMax = 128; + +// BITMAPINFOHEADER +struct CBitmapInfoHeader +{ + // UInt32 HeaderSize; + UInt32 XSize; + Int32 YSize; + UInt16 Planes; + UInt16 BitCount; + UInt32 Compression; + UInt32 SizeImage; + + bool Parse(const Byte *p, size_t size); +}; + +static const UInt32 kBitmapInfoHeader_Size = 0x28; + +bool CBitmapInfoHeader::Parse(const Byte *p, size_t size) +{ + if (size < kBitmapInfoHeader_Size || Get32(p) != kBitmapInfoHeader_Size) + return false; + XSize = Get32(p + 4); + YSize = (Int32)Get32(p + 8); + Planes = Get16(p + 12); + BitCount = Get16(p + 14); + Compression = Get32(p + 16); + SizeImage = Get32(p + 20); + return true; +} + +static UInt32 GetImageSize(UInt32 xSize, UInt32 ySize, UInt32 bitCount) +{ + return ((xSize * bitCount + 7) / 8 + 3) / 4 * 4 * ySize; +} + +static UInt32 SetBitmapHeader(Byte *dest, const Byte *src, UInt32 size) +{ + CBitmapInfoHeader h; + if (!h.Parse(src, size)) + return 0; + if (h.YSize < 0) + h.YSize = -h.YSize; + if (h.XSize > (1 << 26) || h.YSize > (1 << 26) || h.Planes != 1 || h.BitCount > 32 || + h.Compression != 0) // BI_RGB + return 0; + if (h.SizeImage == 0) + h.SizeImage = GetImageSize(h.XSize, h.YSize, h.BitCount); + UInt32 totalSize = kBmpHeaderSize + size; + UInt32 offBits = totalSize - h.SizeImage; + // BITMAPFILEHEADER + SetUi16(dest, 0x4D42); + SetUi32(dest + 2, totalSize); + SetUi32(dest + 6, 0); + SetUi32(dest + 10, offBits); + return kBmpHeaderSize; +} + +static UInt32 SetIconHeader(Byte *dest, const Byte *src, UInt32 size) +{ + CBitmapInfoHeader h; + if (!h.Parse(src, size)) + return 0; + if (h.YSize < 0) + h.YSize = -h.YSize; + if (h.XSize > (1 << 26) || h.YSize > (1 << 26) || h.Planes != 1 || + h.Compression != 0) // BI_RGB + return 0; + + UInt32 numBitCount = h.BitCount; + if (numBitCount != 1 && + numBitCount != 4 && + numBitCount != 8 && + numBitCount != 24 && + numBitCount != 32) + return 0; + + if ((h.YSize & 1) != 0) + return 0; + h.YSize /= 2; + if (h.XSize > 0x100 || h.YSize > 0x100) + return 0; + + UInt32 imageSize; + // imageSize is not correct if AND mask array contains zeros + // in this case it is equal image1Size + + // UInt32 imageSize = h.SizeImage; + // if (imageSize == 0) + // { + UInt32 image1Size = GetImageSize(h.XSize, h.YSize, h.BitCount); + UInt32 image2Size = GetImageSize(h.XSize, h.YSize, 1); + imageSize = image1Size + image2Size; + // } + UInt32 numColors = 0; + if (numBitCount < 16) + numColors = 1 << numBitCount; + + SetUi16(dest, 0); // Reserved + SetUi16(dest + 2, 1); // RES_ICON + SetUi16(dest + 4, 1); // ResCount + + dest[6] = (Byte)h.XSize; // Width + dest[7] = (Byte)h.YSize; // Height + dest[8] = (Byte)numColors; // ColorCount + dest[9] = 0; // Reserved + + SetUi32(dest + 10, 0); // Reserved1 / Reserved2 + + UInt32 numQuadsBytes = numColors * 4; + UInt32 BytesInRes = kBitmapInfoHeader_Size + numQuadsBytes + imageSize; + SetUi32(dest + 14, BytesInRes); + SetUi32(dest + 18, kIconHeaderSize); + + /* + Description = DWORDToString(xSize) + + kDelimiterChar + DWORDToString(ySize) + + kDelimiterChar + DWORDToString(numBitCount); + */ + return kIconHeaderSize; +} + +bool CHandler::ParseStringRes(UInt32 id, UInt32 lang, const Byte *src, UInt32 size) +{ + if ((size & 1) != 0) + return false; + + int i; + for (i = 0; i < _strings.Size(); i++) + if (_strings[i].Lang == lang) + break; + if (i == _strings.Size()) + { + if (_strings.Size() >= kNumStringLangsMax) + return false; + CStringItem item; + item.Size = 0; + item.Lang = lang; + i = _strings.Add(item); + } + + CStringItem &item = _strings[i]; + id = (id - 1) << 4; + UInt32 pos = 0; + for (i = 0; i < 16; i++) + { + if (size - pos < 2) + return false; + UInt32 len = Get16(src + pos); + pos += 2; + if (len != 0) + { + if (size - pos < len * 2) + return false; + char temp[32]; + ConvertUInt32ToString(id + i, temp); + size_t tempLen = strlen(temp); + size_t j; + for (j = 0; j < tempLen; j++) + item.AddChar(temp[j]); + item.AddChar('\t'); + for (j = 0; j < len; j++, pos += 2) + item.AddWChar(Get16(src + pos)); + item.AddChar(0x0D); + item.AddChar(0x0A); + } + } + return (size == pos); +} + +HRESULT CHandler::OpenResources(int sectionIndex, IInStream *stream, IArchiveOpenCallback *callback) +{ + const CSection § = _sections[sectionIndex]; + size_t fileSize = sect.PSize; // Maybe we need sect.VSize here !!! + if (fileSize > kFileSizeMax) + return S_FALSE; + { + UInt64 fileSize64 = fileSize; + if (callback) + RINOK(callback->SetTotal(NULL, &fileSize64)); + RINOK(stream->Seek(sect.Pa, STREAM_SEEK_SET, NULL)); + _buf.SetCapacity(fileSize); + for (size_t pos = 0; pos < fileSize;) + { + UInt64 offset64 = pos; + if (callback) + RINOK(callback->SetCompleted(NULL, &offset64)) + size_t rem = MyMin(fileSize - pos, (size_t)(1 << 20)); + RINOK(ReadStream_FALSE(stream, _buf + pos, rem)); + pos += rem; + } + } + + _usedRes.Alloc(fileSize); + CRecordVector specItems; + RINOK(ReadTable(0, specItems)); + + _oneLang = true; + bool stringsOk = true; + size_t maxOffset = 0; + for (int i = 0; i < specItems.Size(); i++) + { + const CTableItem &item1 = specItems[i]; + if ((item1.Offset & kFlag) == 0) + return S_FALSE; + + CRecordVector specItems2; + RINOK(ReadTable(item1.Offset & kMask, specItems2)); + + for (int j = 0; j < specItems2.Size(); j++) + { + const CTableItem &item2 = specItems2[j]; + if ((item2.Offset & kFlag) == 0) + return S_FALSE; + + CRecordVector specItems3; + RINOK(ReadTable(item2.Offset & kMask, specItems3)); + + CResItem item; + item.Type = item1.ID; + item.ID = item2.ID; + + for (int k = 0; k < specItems3.Size(); k++) + { + if (_items.Size() >= kNumResItemsMax) + return S_FALSE; + const CTableItem &item3 = specItems3[k]; + if ((item3.Offset & kFlag) != 0) + return S_FALSE; + if (item3.Offset >= _buf.GetCapacity() || _buf.GetCapacity() - item3.Offset < 16) + return S_FALSE; + const Byte *buf = _buf + item3.Offset; + item.Lang = item3.ID; + item.Offset = Get32(buf + 0); + item.Size = Get32(buf + 4); + // UInt32 codePage = Get32(buf + 8); + if (Get32(buf + 12) != 0) + return S_FALSE; + if (!_items.IsEmpty() && _oneLang && !item.IsNameEqual(_items.Back())) + _oneLang = false; + + item.HeaderSize = 0; + + size_t offset = item.Offset - sect.Va; + if (offset > maxOffset) + maxOffset = offset; + if (offset + item.Size > maxOffset) + maxOffset = offset + item.Size; + + if (CheckItem(sect, item, offset)) + { + const Byte *data = _buf + offset; + if (item.IsBmp()) + item.HeaderSize = SetBitmapHeader(item.Header, data, item.Size); + else if (item.IsIcon()) + item.HeaderSize = SetIconHeader(item.Header, data, item.Size); + else if (item.IsString()) + { + if (stringsOk) + stringsOk = ParseStringRes(item.ID, item.Lang, data, item.Size); + } + } + + item.Enabled = true; + _items.Add(item); + } + } + } + + if (stringsOk && !_strings.IsEmpty()) + { + int i; + for (i = 0; i < _items.Size(); i++) + { + CResItem &item = _items[i]; + if (item.IsString()) + item.Enabled = false; + } + for (i = 0; i < _strings.Size(); i++) + { + if (_strings[i].Size == 0) + continue; + CMixItem mixItem; + mixItem.ResourceIndex = -1; + mixItem.StringIndex = i; + mixItem.SectionIndex = sectionIndex; + _mixItems.Add(mixItem); + } + } + + _usedRes.Free(); + + int numBits = _optHeader.GetNumFileAlignBits(); + if (numBits >= 0) + { + UInt32 mask = (1 << numBits) - 1; + size_t end = ((maxOffset + mask) & ~mask); + if (end < sect.VSize && end <= sect.PSize) + { + CSection sect2; + sect2.Flags = 0; + + // we skip Zeros to start of aligned block + size_t i; + for (i = maxOffset; i < end; i++) + if (_buf[i] != 0) + break; + if (i == end) + maxOffset = end; + + sect2.Pa = sect.Pa + (UInt32)maxOffset; + sect2.Va = sect.Va + (UInt32)maxOffset; + sect2.PSize = sect.VSize - (UInt32)maxOffset; + sect2.VSize = sect2.PSize; + sect2.Name = ".rsrc_1"; + sect2.Time = 0; + sect2.IsAdditionalSection = true; + _sections.Add(sect2); + } + } + + return S_OK; +} + +HRESULT CHandler::Open2(IInStream *stream, IArchiveOpenCallback *callback) +{ + const UInt32 kBufSize = 1 << 18; + const UInt32 kSigSize = 2; + + _mainSubfile = -1; + + CByteBuffer buffer; + buffer.SetCapacity(kBufSize); + Byte *buf = buffer; + + size_t processed = kSigSize; + RINOK(ReadStream_FALSE(stream, buf, processed)); + if (buf[0] != 'M' || buf[1] != 'Z') + return S_FALSE; + processed = kBufSize - kSigSize; + RINOK(ReadStream(stream, buf + kSigSize, &processed)); + processed += kSigSize; + if (!Parse(buf, (UInt32)processed)) + return S_FALSE; + bool thereISDebug; + RINOK(LoadDebugSections(stream, thereISDebug)); + + const CDirLink &certLink = _optHeader.DirItems[kDirLink_Certificate]; + if (certLink.Size != 0) + { + CSection sect; + sect.Name = "CERTIFICATE"; + sect.Va = 0; + sect.Pa = certLink.Va; + sect.PSize = sect.VSize = certLink.Size; + sect.UpdateTotalSize(_totalSize); + _sections.Add(sect); + } + + if (thereISDebug) + { + const UInt32 kAlign = 1 << 12; + UInt32 alignPos = _totalSize & (kAlign - 1); + if (alignPos != 0) + { + UInt32 size = kAlign - alignPos; + RINOK(stream->Seek(_totalSize, STREAM_SEEK_SET, NULL)); + buffer.Free(); + buffer.SetCapacity(kAlign); + Byte *buf = buffer; + size_t processed = size; + RINOK(ReadStream(stream, buf, &processed)); + size_t i; + for (i = 0; i < processed; i++) + { + if (buf[i] != 0) + break; + } + if (processed < size && processed < 100) + _totalSize += (UInt32)processed; + else if (((_totalSize + i) & 0x1FF) == 0 || processed < size) + _totalSize += (UInt32)i; + } + } + + if (_header.NumSymbols > 0 && _header.PointerToSymbolTable >= 512) + { + if (_header.NumSymbols >= (1 << 24)) + return S_FALSE; + CSection sect; + sect.Name = "COFF_SYMBOLS"; + UInt32 size = _header.NumSymbols * 18; + RINOK(stream->Seek((UInt64)_header.PointerToSymbolTable + size, STREAM_SEEK_SET, NULL)); + Byte buf[4]; + RINOK(ReadStream_FALSE(stream, buf, 4)); + UInt32 size2 = Get32(buf); + if (size2 >= (1 << 28)) + return S_FALSE; + size += size2; + + sect.Va = 0; + sect.Pa = _header.PointerToSymbolTable; + sect.PSize = sect.VSize = size; + sect.UpdateTotalSize(_totalSize); + _sections.Add(sect); + } + + UInt64 fileSize; + RINOK(stream->Seek(0, STREAM_SEEK_END, &fileSize)); + if (fileSize > _totalSize) + return S_FALSE; + _totalSizeLimited = (_totalSize < fileSize) ? _totalSize : (UInt32)fileSize; + + { + CObjectVector sections = _sections; + sections.Sort(); + UInt32 limit = (1 << 12); + int num = 0; + int numSections = sections.Size(); + for (int i = 0; i < numSections; i++) + { + const CSection &s = sections[i]; + if (s.Pa > limit) + { + CSection s2; + s2.Pa = s2.Va = limit; + s2.PSize = s2.VSize = s.Pa - limit; + s2.IsAdditionalSection = true; + s2.Name = '['; + s2.Name += GetDecString(num++); + s2.Name += ']'; + _sections.Add(s2); + limit = s.Pa; + } + UInt32 next = s.Pa + s.PSize; + if (next < s.Pa) + break; + if (next >= limit) + limit = next; + } + } + + _parseResources = true; + + UInt64 mainSize = 0, mainSize2 = 0; + int i; + for (i = 0; i < _sections.Size(); i++) + { + const CSection § = _sections[i]; + CMixItem mixItem; + mixItem.SectionIndex = i; + if (_parseResources && sect.Name == ".rsrc" && _items.IsEmpty()) + { + HRESULT res = OpenResources(i, stream, callback); + if (res == S_OK) + { + _resourceFileName = GetUnicodeString(sect.Name); + for (int j = 0; j < _items.Size(); j++) + { + const CResItem &item = _items[j]; + if (item.Enabled) + { + mixItem.ResourceIndex = j; + mixItem.StringIndex = -1; + if (item.IsRcDataOrUnknown()) + { + if (item.Size >= mainSize) + { + mainSize2 = mainSize; + mainSize = item.Size; + _mainSubfile = _mixItems.Size(); + } + else if (item.Size >= mainSize2) + mainSize2 = item.Size; + } + _mixItems.Add(mixItem); + } + } + if (sect.PSize > sect.VSize) + { + int numBits = _optHeader.GetNumFileAlignBits(); + if (numBits >= 0) + { + UInt32 mask = (1 << numBits) - 1; + UInt32 end = ((sect.VSize + mask) & ~mask); + + if (sect.PSize > end) + { + CSection sect2; + sect2.Flags = 0; + sect2.Pa = sect.Pa + end; + sect2.Va = sect.Va + end; + sect2.PSize = sect.PSize - end; + sect2.VSize = sect2.PSize; + sect2.Name = ".rsrc_2"; + sect2.Time = 0; + sect2.IsAdditionalSection = true; + _sections.Add(sect2); + } + } + } + continue; + } + if (res != S_FALSE) + return res; + CloseResources(); + } + mixItem.StringIndex = -1; + mixItem.ResourceIndex = -1; + if (sect.IsAdditionalSection) + { + if (sect.PSize >= mainSize) + { + mainSize2 = mainSize; + mainSize = sect.PSize; + _mainSubfile = _mixItems.Size(); + } + else + mainSize2 = sect.PSize; + } + _mixItems.Add(mixItem); + } + + if (mainSize2 >= (1 << 20) && mainSize < mainSize2 * 2) + _mainSubfile = -1; + + for (i = 0; i < _mixItems.Size(); i++) + { + const CMixItem &mixItem = _mixItems[i]; + if (mixItem.StringIndex < 0 && mixItem.ResourceIndex < 0 && _sections[mixItem.SectionIndex].Name == "_winzip_") + { + _mainSubfile = i; + break; + } + } + + return S_OK; +} + +HRESULT CalcCheckSum(ISequentialInStream *stream, UInt32 size, UInt32 excludePos, UInt32 &res) +{ + // size &= ~1; + const UInt32 kBufSize = 1 << 23; + CByteBuffer buffer; + buffer.SetCapacity(kBufSize); + Byte *buf = buffer; + + UInt32 sum = 0; + UInt32 pos = 0; + for (;;) + { + UInt32 rem = size - pos; + if (rem > kBufSize) + rem = kBufSize; + if (rem == 0) + break; + size_t processed = rem; + RINOK(ReadStream(stream, buf, &processed)); + + /* + for (; processed < rem; processed++) + buf[processed] = 0; + */ + + if ((processed & 1) != 0) + buf[processed] = 0; + + for (int j = 0; j < 4; j++) + { + UInt32 p = excludePos + j; + if (pos <= p && p < pos + processed) + buf[p - pos] = 0; + } + + for (size_t i = 0; i < processed; i += 2) + { + sum += Get16(buf + i); + sum = (sum + (sum >> 16)) & 0xFFFF; + } + pos += (UInt32)processed; + if (rem != processed) + break; + } + sum += pos; + res = sum; + return S_OK; +} + +STDMETHODIMP CHandler::Open(IInStream *inStream, const UInt64 *, IArchiveOpenCallback *callback) +{ + COM_TRY_BEGIN + Close(); + RINOK(Open2(inStream, callback)); + _stream = inStream; + return S_OK; + COM_TRY_END +} + +void CHandler::CloseResources() +{ + _usedRes.Free(); + _items.Clear(); + _strings.Clear(); + _buf.SetCapacity(0); +} + +STDMETHODIMP CHandler::Close() +{ + _stream.Release(); + _sections.Clear(); + _mixItems.Clear(); + CloseResources(); + return S_OK; +} + +STDMETHODIMP CHandler::GetNumberOfItems(UInt32 *numItems) +{ + *numItems = _mixItems.Size(); + return S_OK; +} + +STDMETHODIMP CHandler::Extract(const UInt32 *indices, UInt32 numItems, + Int32 testMode, IArchiveExtractCallback *extractCallback) +{ + COM_TRY_BEGIN + bool allFilesMode = (numItems == (UInt32)-1); + if (allFilesMode) + numItems = _mixItems.Size(); + if (numItems == 0) + return S_OK; + UInt64 totalSize = 0; + UInt32 i; + for (i = 0; i < numItems; i++) + { + const CMixItem &mixItem = _mixItems[allFilesMode ? i : indices[i]]; + if (mixItem.StringIndex >= 0) + totalSize += _strings[mixItem.StringIndex].Size; + else if (mixItem.ResourceIndex < 0) + totalSize += _sections[mixItem.SectionIndex].GetPackSize(); + else + totalSize += _items[mixItem.ResourceIndex].GetSize(); + } + extractCallback->SetTotal(totalSize); + + UInt64 currentTotalSize = 0; + UInt64 currentItemSize; + + NCompress::CCopyCoder *copyCoderSpec = new NCompress::CCopyCoder(); + CMyComPtr copyCoder = copyCoderSpec; + + CLocalProgress *lps = new CLocalProgress; + CMyComPtr progress = lps; + lps->Init(extractCallback, false); + + bool checkSumOK = true; + if (_optHeader.CheckSum != 0 && (int)numItems == _mixItems.Size()) + { + UInt32 checkSum = 0; + RINOK(_stream->Seek(0, STREAM_SEEK_SET, NULL)); + CalcCheckSum(_stream, _totalSizeLimited, _peOffset + kHeaderSize + 64, checkSum); + checkSumOK = (checkSum == _optHeader.CheckSum); + } + + CLimitedSequentialInStream *streamSpec = new CLimitedSequentialInStream; + CMyComPtr inStream(streamSpec); + streamSpec->SetStream(_stream); + + for (i = 0; i < numItems; i++, currentTotalSize += currentItemSize) + { + lps->InSize = lps->OutSize = currentTotalSize; + RINOK(lps->SetCur()); + Int32 askMode = testMode ? + NExtract::NAskMode::kTest : + NExtract::NAskMode::kExtract; + UInt32 index = allFilesMode ? i : indices[i]; + + CMyComPtr outStream; + RINOK(extractCallback->GetStream(index, &outStream, askMode)); + const CMixItem &mixItem = _mixItems[index]; + + const CSection § = _sections[mixItem.SectionIndex]; + bool isOk = true; + if (mixItem.StringIndex >= 0) + { + const CStringItem &item = _strings[mixItem.StringIndex]; + currentItemSize = item.Size; + if (!testMode && !outStream) + continue; + + RINOK(extractCallback->PrepareOperation(askMode)); + if (outStream) + RINOK(WriteStream(outStream, item.Buf, item.Size)); + } + else if (mixItem.ResourceIndex < 0) + { + currentItemSize = sect.GetPackSize(); + if (!testMode && !outStream) + continue; + + RINOK(extractCallback->PrepareOperation(askMode)); + RINOK(_stream->Seek(sect.Pa, STREAM_SEEK_SET, NULL)); + streamSpec->Init(currentItemSize); + RINOK(copyCoder->Code(inStream, outStream, NULL, NULL, progress)); + isOk = (copyCoderSpec->TotalSize == currentItemSize); + } + else + { + const CResItem &item = _items[mixItem.ResourceIndex]; + currentItemSize = item.GetSize(); + if (!testMode && !outStream) + continue; + + RINOK(extractCallback->PrepareOperation(askMode)); + size_t offset = item.Offset - sect.Va; + if (!CheckItem(sect, item, offset)) + isOk = false; + else if (outStream) + { + if (item.HeaderSize != 0) + RINOK(WriteStream(outStream, item.Header, item.HeaderSize)); + RINOK(WriteStream(outStream, _buf + offset, item.Size)); + } + } + + outStream.Release(); + RINOK(extractCallback->SetOperationResult(isOk ? + checkSumOK ? + NExtract::NOperationResult::kOK: + NExtract::NOperationResult::kCRCError: + NExtract::NOperationResult::kDataError)); + } + return S_OK; + COM_TRY_END +} + +STDMETHODIMP CHandler::GetStream(UInt32 index, ISequentialInStream **stream) +{ + COM_TRY_BEGIN + *stream = 0; + + const CMixItem &mixItem = _mixItems[index]; + const CSection § = _sections[mixItem.SectionIndex]; + if (mixItem.IsSectionItem()) + return CreateLimitedInStream(_stream, sect.Pa, sect.PSize, stream); + + CBufInStream *inStreamSpec = new CBufInStream; + CMyComPtr streamTemp = inStreamSpec; + CReferenceBuf *referenceBuf = new CReferenceBuf; + CMyComPtr ref = referenceBuf; + if (mixItem.StringIndex >= 0) + { + const CStringItem &item = _strings[mixItem.StringIndex]; + referenceBuf->Buf.SetCapacity(item.Size); + memcpy(referenceBuf->Buf, item.Buf, item.Size); + } + else + { + const CResItem &item = _items[mixItem.ResourceIndex]; + size_t offset = item.Offset - sect.Va; + if (!CheckItem(sect, item, offset)) + return S_FALSE; + if (item.HeaderSize == 0) + { + CBufInStream *streamSpec = new CBufInStream; + CMyComPtr streamTemp2 = streamSpec; + streamSpec->Init(_buf + offset, item.Size, (IInArchive *)this); + *stream = streamTemp2.Detach(); + return S_OK; + } + referenceBuf->Buf.SetCapacity(item.HeaderSize + item.Size); + memcpy(referenceBuf->Buf, item.Header, item.HeaderSize); + memcpy(referenceBuf->Buf + item.HeaderSize, _buf + offset, item.Size); + } + inStreamSpec->Init(referenceBuf); + + *stream = streamTemp.Detach(); + return S_OK; + COM_TRY_END +} + +static IInArchive *CreateArc() { return new CHandler; } + +static CArcInfo g_ArcInfo = + { L"PE", L"exe dll sys", 0, 0xDD, { 'P', 'E', 0, 0 }, 4, false, CreateArc, 0 }; + +REGISTER_ARC(Pe) + +}} diff --git a/CPP/7zip/Archive/PpmdHandler.cpp b/CPP/7zip/Archive/PpmdHandler.cpp new file mode 100644 index 0000000..9b2ef04 --- /dev/null +++ b/CPP/7zip/Archive/PpmdHandler.cpp @@ -0,0 +1,456 @@ +/* PpmdHandler.c -- PPMd format handler +2010-03-10 : Igor Pavlov : Public domain +This code is based on: + PPMd var.H (2001) / var.I (2002): Dmitry Shkarin : Public domain + Carryless rangecoder (1999): Dmitry Subbotin : Public domain */ + +#include "StdAfx.h" + +#include "../../../C/CpuArch.h" +#include "../../../C/Alloc.h" +#include "../../../C/Ppmd7.h" +#include "../../../C/Ppmd8.h" + +#include "Common/ComTry.h" +#include "Common/IntToString.h" +#include "Common/StringConvert.h" + +#include "Windows/PropVariant.h" +#include "Windows/Time.h" + +#include "../Common/CWrappers.h" +#include "../Common/ProgressUtils.h" +#include "../Common/RegisterArc.h" +#include "../Common/StreamUtils.h" + +using namespace NWindows; + +namespace NArchive { +namespace NPpmd { + +static void *SzBigAlloc(void *, size_t size) { return BigAlloc(size); } +static void SzBigFree(void *, void *address) { BigFree(address); } +static ISzAlloc g_BigAlloc = { SzBigAlloc, SzBigFree }; + +static const UInt32 kBufSize = (1 << 20); + +struct CBuf +{ + Byte *Buf; + + CBuf(): Buf(0) {} + ~CBuf() { ::MidFree(Buf); } + bool Alloc() + { + if (!Buf) + Buf = (Byte *)::MidAlloc(kBufSize); + return (Buf != 0); + } +}; + +static const UInt32 kHeaderSize = 16; +static const UInt32 kSignature = 0x84ACAF8F; +static const unsigned kNewHeaderVer = 8; + +struct CItem +{ + UInt32 Attrib; + UInt32 Time; + AString Name; + + unsigned Order; + unsigned MemInMB; + unsigned Ver; + unsigned Restor; + + HRESULT ReadHeader(ISequentialInStream *s, UInt32 &headerSize); + bool IsSupported() const { return Ver == 7 || (Ver == 8 && Restor <= 1); } +}; + +HRESULT CItem::ReadHeader(ISequentialInStream *s, UInt32 &headerSize) +{ + Byte h[kHeaderSize]; + RINOK(ReadStream_FALSE(s, h, kHeaderSize)); + if (GetUi32(h) != kSignature) + return S_FALSE; + Attrib = GetUi32(h + 4); + Time = GetUi32(h + 12); + + unsigned info = GetUi16(h + 8); + Order = (info & 0xF) + 1; + MemInMB = ((info >> 4) & 0xFF) + 1; + Ver = info >> 12; + + UInt32 nameLen = GetUi16(h + 10); + Restor = nameLen >> 14; + if (Restor > 2) + return S_FALSE; + if (Ver >= kNewHeaderVer) + nameLen &= 0x3FFF; + if (nameLen > (1 << 9)) + return S_FALSE; + char *name = Name.GetBuffer(nameLen + 1); + HRESULT res = ReadStream_FALSE(s, name, nameLen); + name[nameLen] = 0; + headerSize = kHeaderSize + nameLen; + Name.ReleaseBuffer(); + return res; +} + +class CHandler: + public IInArchive, + public IArchiveOpenSeq, + public CMyUnknownImp +{ + CItem _item; + UInt32 _headerSize; + UInt64 _packSize; + bool _packSizeDefined; + CMyComPtr _stream; + +public: + MY_UNKNOWN_IMP2(IInArchive, IArchiveOpenSeq) + INTERFACE_IInArchive(;) + STDMETHOD(OpenSeq)(ISequentialInStream *stream); +}; + +STATPROPSTG kProps[] = +{ + { NULL, kpidPath, VT_BSTR}, + { NULL, kpidMTime, VT_FILETIME}, + { NULL, kpidAttrib, VT_UI4}, + { NULL, kpidMethod, VT_BSTR} +}; + +IMP_IInArchive_Props +IMP_IInArchive_ArcProps_NO_Table + +STDMETHODIMP CHandler::GetArchiveProperty(PROPID propID, PROPVARIANT *value) +{ + NCOM::CPropVariant prop; + switch(propID) + { + case kpidPhySize: if (_packSizeDefined) prop = _packSize; break; + } + prop.Detach(value); + return S_OK; +} + + +STDMETHODIMP CHandler::GetNumberOfItems(UInt32 *numItems) +{ + *numItems = 1; + return S_OK; +} + +static void UIntToString(AString &s, const char *prefix, unsigned value) +{ + s += prefix; + char temp[16]; + ::ConvertUInt32ToString((UInt32)value, temp); + s += temp; +} + +STDMETHODIMP CHandler::GetProperty(UInt32 /* index */, PROPID propID, PROPVARIANT *value) +{ + COM_TRY_BEGIN + NWindows::NCOM::CPropVariant prop; + switch(propID) + { + case kpidPath: prop = MultiByteToUnicodeString(_item.Name, CP_ACP); break; + case kpidMTime: + { + FILETIME utc; + if (NTime::DosTimeToFileTime(_item.Time, utc)) + prop = utc; + break; + } + case kpidAttrib: prop = _item.Attrib; break; + case kpidPackSize: if (_packSizeDefined) prop = _packSize; break; + case kpidMethod: + { + AString s = "PPMd"; + s += (char)('A' + _item.Ver); + UIntToString(s, ":o", _item.Order); + UIntToString(s, ":mem", _item.MemInMB); + s += 'm'; + if (_item.Ver >= kNewHeaderVer && _item.Restor != 0) + UIntToString(s, ":r", _item.Restor); + prop = s; + } + } + prop.Detach(value); + return S_OK; + COM_TRY_END +} + +STDMETHODIMP CHandler::Open(IInStream *stream, const UInt64 *, IArchiveOpenCallback *) +{ + return OpenSeq(stream); +} + +STDMETHODIMP CHandler::OpenSeq(ISequentialInStream *stream) +{ + COM_TRY_BEGIN + HRESULT res; + try + { + Close(); + res = _item.ReadHeader(stream, _headerSize); + } + catch(...) { res = S_FALSE; } + if (res == S_OK) + _stream = stream; + else + Close(); + return res; + COM_TRY_END +} + +STDMETHODIMP CHandler::Close() +{ + _packSizeDefined = false; + _stream.Release(); + return S_OK; +} + +static const UInt32 kTopValue = (1 << 24); +static const UInt32 kBot = (1 << 15); + +struct CRangeDecoder +{ + IPpmd7_RangeDec s; + UInt32 Range; + UInt32 Code; + UInt32 Low; + CByteInBufWrap *Stream; + +public: + bool Init() + { + Code = 0; + Low = 0; + Range = 0xFFFFFFFF; + for (int i = 0; i < 4; i++) + Code = (Code << 8) | Stream->ReadByte(); + return Code < 0xFFFFFFFF; + } + + void Normalize() + { + while ((Low ^ (Low + Range)) < kTopValue || + Range < kBot && ((Range = (0 - Low) & (kBot - 1)), 1)) + { + Code = (Code << 8) | Stream->ReadByte(); + Range <<= 8; + Low <<= 8; + } + } + + CRangeDecoder(); +}; + + +extern "C" { + +static UInt32 Range_GetThreshold(void *pp, UInt32 total) +{ + CRangeDecoder *p = (CRangeDecoder *)pp; + return p->Code / (p->Range /= total); +} + +static void Range_Decode(void *pp, UInt32 start, UInt32 size) +{ + CRangeDecoder *p = (CRangeDecoder *)pp; + start *= p->Range; + p->Low += start; + p->Code -= start; + p->Range *= size; + p->Normalize(); +} + +static UInt32 Range_DecodeBit(void *pp, UInt32 size0) +{ + CRangeDecoder *p = (CRangeDecoder *)pp; + if (p->Code / (p->Range >>= 14) < size0) + { + Range_Decode(p, 0, size0); + return 0; + } + else + { + Range_Decode(p, size0, (1 << 14) - size0); + return 1; + } +} + +} + +CRangeDecoder::CRangeDecoder() +{ + s.GetThreshold = Range_GetThreshold; + s.Decode = Range_Decode; + s.DecodeBit = Range_DecodeBit; +} + +struct CPpmdCpp +{ + unsigned Ver; + CRangeDecoder _rc; + CPpmd7 _ppmd7; + CPpmd8 _ppmd8; + + CPpmdCpp(unsigned version) + { + Ver = version; + Ppmd7_Construct(&_ppmd7); + Ppmd8_Construct(&_ppmd8); + } + + ~CPpmdCpp() + { + Ppmd7_Free(&_ppmd7, &g_BigAlloc); + Ppmd8_Free(&_ppmd8, &g_BigAlloc); + } + + bool Alloc(UInt32 memInMB) + { + memInMB <<= 20; + if (Ver == 7) + return Ppmd7_Alloc(&_ppmd7, memInMB, &g_BigAlloc) != 0; + return Ppmd8_Alloc(&_ppmd8, memInMB, &g_BigAlloc) != 0; + } + + void Init(unsigned order, unsigned restor) + { + if (Ver == 7) + Ppmd7_Init(&_ppmd7, order); + else + Ppmd8_Init(&_ppmd8, order, restor);; + } + + bool InitRc(CByteInBufWrap *inStream) + { + if (Ver == 7) + { + _rc.Stream = inStream; + return _rc.Init(); + } + else + { + _ppmd8.Stream.In = &inStream->p; + return Ppmd8_RangeDec_Init(&_ppmd8) != 0; + } + } + + bool IsFinishedOK() + { + if (Ver == 7) + return Ppmd7z_RangeDec_IsFinishedOK(&_rc); + return Ppmd8_RangeDec_IsFinishedOK(&_ppmd8); + } +}; + +STDMETHODIMP CHandler::Extract(const UInt32 *indices, UInt32 numItems, + Int32 testMode, IArchiveExtractCallback *extractCallback) +{ + if (numItems == 0) + return S_OK; + if (numItems != (UInt32)-1 && (numItems != 1 || indices[0] != 0)) + return E_INVALIDARG; + + // extractCallback->SetTotal(_packSize); + UInt64 currentTotalPacked = 0; + RINOK(extractCallback->SetCompleted(¤tTotalPacked)); + CMyComPtr realOutStream; + Int32 askMode = testMode ? + NExtract::NAskMode::kTest : + NExtract::NAskMode::kExtract; + RINOK(extractCallback->GetStream(0, &realOutStream, askMode)); + if (!testMode && !realOutStream) + return S_OK; + + extractCallback->PrepareOperation(askMode); + + CByteInBufWrap inBuf; + if (!inBuf.Alloc(1 << 20)) + return E_OUTOFMEMORY; + inBuf.Stream = _stream; + + CBuf outBuf; + if (!outBuf.Alloc()) + return E_OUTOFMEMORY; + + CLocalProgress *lps = new CLocalProgress; + CMyComPtr progress = lps; + lps->Init(extractCallback, true); + + CPpmdCpp ppmd(_item.Ver); + if (!ppmd.Alloc(_item.MemInMB)) + return E_OUTOFMEMORY; + Int32 opRes = NExtract::NOperationResult::kUnSupportedMethod; + if (_item.IsSupported()) + { + opRes = NExtract::NOperationResult::kDataError; + ppmd.Init(_item.Order, _item.Restor); + inBuf.Init(); + UInt64 outSize = 0; + if (ppmd.InitRc(&inBuf) && !inBuf.Extra && inBuf.Res == S_OK) + for (;;) + { + lps->InSize = _packSize = inBuf.GetProcessed(); + lps->OutSize = outSize; + RINOK(lps->SetCur()); + + size_t i; + int sym = 0; + + if (ppmd.Ver == 7) + { + for (i = 0; i < kBufSize; i++) + { + sym = Ppmd7_DecodeSymbol(&ppmd._ppmd7, &ppmd._rc.s); + if (inBuf.Extra || sym < 0) + break; + outBuf.Buf[i] = (Byte)sym; + } + } + else + { + for (i = 0; i < kBufSize; i++) + { + sym = Ppmd8_DecodeSymbol(&ppmd._ppmd8); + if (inBuf.Extra || sym < 0) + break; + outBuf.Buf[i] = (Byte)sym; + } + } + + outSize += i; + _packSize = _headerSize + inBuf.GetProcessed(); + _packSizeDefined = true; + if (realOutStream) + { + RINOK(WriteStream(realOutStream, outBuf.Buf, i)); + } + if (sym < 0) + { + if (sym == -1 && ppmd.IsFinishedOK()) + opRes = NExtract::NOperationResult::kOK; + break; + } + } + RINOK(inBuf.Res); + } + realOutStream.Release(); + return extractCallback->SetOperationResult(opRes); +} + +static IInArchive *CreateArc() { return new CHandler; } + +static CArcInfo g_ArcInfo = + { L"Ppmd", L"pmd", 0, 0xD, { 0x8F, 0xAF, 0xAC, 0x84 }, 4, false, CreateArc, 0 }; + +REGISTER_ARC(Ppmd) + +}} diff --git a/CPP/7zip/Archive/Rar/RarHandler.cpp b/CPP/7zip/Archive/Rar/RarHandler.cpp new file mode 100644 index 0000000..5d072d3 --- /dev/null +++ b/CPP/7zip/Archive/Rar/RarHandler.cpp @@ -0,0 +1,869 @@ +// RarHandler.cpp + +#include "StdAfx.h" + +#include "Common/ComTry.h" +#include "Common/IntToString.h" +#include "Common/StringConvert.h" + +#include "Windows/PropVariant.h" +#include "Windows/PropVariantUtils.h" +#include "Windows/Time.h" + +#include "../../IPassword.h" + +#include "../../Common/CreateCoder.h" +#include "../../Common/FilterCoder.h" +#include "../../Common/MethodId.h" +#include "../../Common/ProgressUtils.h" + +#include "../../Compress/CopyCoder.h" + +#include "../../Crypto/Rar20Crypto.h" +#include "../../Crypto/RarAes.h" + +#include "../Common/ItemNameUtils.h" +#include "../Common/OutStreamWithCRC.h" + +#include "RarHandler.h" + +using namespace NWindows; +using namespace NTime; + +namespace NArchive { +namespace NRar { + +static const wchar_t *kHostOS[] = +{ + L"MS DOS", + L"OS/2", + L"Win32", + L"Unix", + L"Mac OS", + L"BeOS" +}; + +static const int kNumHostOSes = sizeof(kHostOS) / sizeof(kHostOS[0]); + +static const wchar_t *kUnknownOS = L"Unknown"; + +static const CUInt32PCharPair k_Flags[] = +{ + { 0, "Volume" }, + { 1, "Comment" }, + { 2, "Lock" }, + { 3, "Solid" }, + { 4, "NewVolName" }, // pack_comment in old versuons + { 5, "Authenticity" }, + { 6, "Recovery" }, + { 7, "BlockEncryption" }, + { 8, "FirstVolume" }, + { 9, "EncryptVer" } +}; + +static const STATPROPSTG kProps[] = +{ + { NULL, kpidPath, VT_BSTR}, + { NULL, kpidIsDir, VT_BOOL}, + { NULL, kpidSize, VT_UI8}, + { NULL, kpidPackSize, VT_UI8}, + { NULL, kpidMTime, VT_FILETIME}, + { NULL, kpidCTime, VT_FILETIME}, + { NULL, kpidATime, VT_FILETIME}, + { NULL, kpidAttrib, VT_UI4}, + + { NULL, kpidEncrypted, VT_BOOL}, + { NULL, kpidSolid, VT_BOOL}, + { NULL, kpidCommented, VT_BOOL}, + { NULL, kpidSplitBefore, VT_BOOL}, + { NULL, kpidSplitAfter, VT_BOOL}, + { NULL, kpidCRC, VT_UI4}, + { NULL, kpidHostOS, VT_BSTR}, + { NULL, kpidMethod, VT_BSTR}, + { NULL, kpidUnpackVer, VT_UI1} +}; + +static const STATPROPSTG kArcProps[] = +{ + { NULL, kpidCharacts, VT_BSTR}, + { NULL, kpidSolid, VT_BOOL}, + { NULL, kpidNumBlocks, VT_UI4}, + // { NULL, kpidEncrypted, VT_BOOL}, + { NULL, kpidIsVolume, VT_BOOL}, + { NULL, kpidNumVolumes, VT_UI4}, + { NULL, kpidPhySize, VT_UI8} + // { NULL, kpidCommented, VT_BOOL} +}; + +IMP_IInArchive_Props +IMP_IInArchive_ArcProps + +UInt64 CHandler::GetPackSize(int refIndex) const +{ + const CRefItem &refItem = _refItems[refIndex]; + UInt64 totalPackSize = 0; + for (int i = 0; i < refItem.NumItems; i++) + totalPackSize += _items[refItem.ItemIndex + i].PackSize; + return totalPackSize; +} + +STDMETHODIMP CHandler::GetArchiveProperty(PROPID propID, PROPVARIANT *value) +{ + COM_TRY_BEGIN + NWindows::NCOM::CPropVariant prop; + switch(propID) + { + case kpidSolid: prop = _archiveInfo.IsSolid(); break; + case kpidCharacts: FLAGS_TO_PROP(k_Flags, _archiveInfo.Flags, prop); break; + // case kpidEncrypted: prop = _archiveInfo.IsEncrypted(); break; // it's for encrypted names. + case kpidIsVolume: prop = _archiveInfo.IsVolume(); break; + case kpidNumVolumes: prop = (UInt32)_archives.Size(); break; + case kpidOffset: if (_archiveInfo.StartPosition != 0) prop = _archiveInfo.StartPosition; break; + // case kpidCommented: prop = _archiveInfo.IsCommented(); break; + case kpidNumBlocks: + { + UInt32 numBlocks = 0; + for (int i = 0; i < _refItems.Size(); i++) + if (!IsSolid(i)) + numBlocks++; + prop = (UInt32)numBlocks; + break; + } + case kpidError: if (!_errorMessage.IsEmpty()) prop = _errorMessage; break; + } + prop.Detach(value); + return S_OK; + COM_TRY_END +} + +STDMETHODIMP CHandler::GetNumberOfItems(UInt32 *numItems) +{ + *numItems = _refItems.Size(); + return S_OK; +} + +static bool RarTimeToFileTime(const CRarTime &rarTime, FILETIME &result) +{ + if (!DosTimeToFileTime(rarTime.DosTime, result)) + return false; + UInt64 value = (((UInt64)result.dwHighDateTime) << 32) + result.dwLowDateTime; + value += (UInt64)rarTime.LowSecond * 10000000; + value += ((UInt64)rarTime.SubTime[2] << 16) + + ((UInt64)rarTime.SubTime[1] << 8) + + ((UInt64)rarTime.SubTime[0]); + result.dwLowDateTime = (DWORD)value; + result.dwHighDateTime = DWORD(value >> 32); + return true; +} + +static void RarTimeToProp(const CRarTime &rarTime, NWindows::NCOM::CPropVariant &prop) +{ + FILETIME localFileTime, utcFileTime; + if (RarTimeToFileTime(rarTime, localFileTime)) + { + if (!LocalFileTimeToFileTime(&localFileTime, &utcFileTime)) + utcFileTime.dwHighDateTime = utcFileTime.dwLowDateTime = 0; + } + else + utcFileTime.dwHighDateTime = utcFileTime.dwLowDateTime = 0; + prop = utcFileTime; +} + +STDMETHODIMP CHandler::GetProperty(UInt32 index, PROPID propID, PROPVARIANT *value) +{ + COM_TRY_BEGIN + NWindows::NCOM::CPropVariant prop; + const CRefItem &refItem = _refItems[index]; + const CItemEx &item = _items[refItem.ItemIndex]; + switch(propID) + { + case kpidPath: + { + UString u; + if (item.HasUnicodeName() && !item.UnicodeName.IsEmpty()) + u = item.UnicodeName; + else + u = MultiByteToUnicodeString(item.Name, CP_OEMCP); + prop = (const wchar_t *)NItemName::WinNameToOSName(u); + break; + } + case kpidIsDir: prop = item.IsDir(); break; + case kpidSize: prop = item.Size; break; + case kpidPackSize: prop = GetPackSize(index); break; + case kpidMTime: RarTimeToProp(item.MTime, prop); break; + case kpidCTime: if (item.CTimeDefined) RarTimeToProp(item.CTime, prop); break; + case kpidATime: if (item.ATimeDefined) RarTimeToProp(item.ATime, prop); break; + case kpidAttrib: prop = item.GetWinAttributes(); break; + case kpidEncrypted: prop = item.IsEncrypted(); break; + case kpidSolid: prop = IsSolid(index); break; + case kpidCommented: prop = item.IsCommented(); break; + case kpidSplitBefore: prop = item.IsSplitBefore(); break; + case kpidSplitAfter: prop = _items[refItem.ItemIndex + refItem.NumItems - 1].IsSplitAfter(); break; + case kpidCRC: + { + const CItemEx &lastItem = _items[refItem.ItemIndex + refItem.NumItems - 1]; + prop = ((lastItem.IsSplitAfter()) ? item.FileCRC : lastItem.FileCRC); + break; + } + case kpidUnpackVer: prop = item.UnPackVersion; break; + case kpidMethod: + { + UString method; + if (item.Method >= Byte('0') && item.Method <= Byte('5')) + { + method = L"m"; + wchar_t temp[32]; + ConvertUInt64ToString(item.Method - Byte('0'), temp); + method += temp; + if (!item.IsDir()) + { + method += L":"; + ConvertUInt64ToString(16 + item.GetDictSize(), temp); + method += temp; + } + } + else + { + wchar_t temp[32]; + ConvertUInt64ToString(item.Method, temp); + method += temp; + } + prop = method; + break; + } + case kpidHostOS: prop = (item.HostOS < kNumHostOSes) ? (kHostOS[item.HostOS]) : kUnknownOS; break; + } + prop.Detach(value); + return S_OK; + COM_TRY_END +} + +class CVolumeName +{ + bool _first; + bool _newStyle; + UString _unchangedPart; + UString _changedPart; + UString _afterPart; +public: + CVolumeName(): _newStyle(true) {}; + + bool InitName(const UString &name, bool newStyle) + { + _first = true; + _newStyle = newStyle; + int dotPos = name.ReverseFind('.'); + UString basePart = name; + if (dotPos >= 0) + { + UString ext = name.Mid(dotPos + 1); + if (ext.CompareNoCase(L"rar") == 0) + { + _afterPart = name.Mid(dotPos); + basePart = name.Left(dotPos); + } + else if (ext.CompareNoCase(L"exe") == 0) + { + _afterPart = L".rar"; + basePart = name.Left(dotPos); + } + else if (!_newStyle) + { + if (ext.CompareNoCase(L"000") == 0 || + ext.CompareNoCase(L"001") == 0 || + ext.CompareNoCase(L"r00") == 0 || + ext.CompareNoCase(L"r01") == 0) + { + _afterPart.Empty(); + _first = false; + _changedPart = ext; + _unchangedPart = name.Left(dotPos + 1); + return true; + } + } + } + + if (!_newStyle) + { + _afterPart.Empty(); + _unchangedPart = basePart + UString(L"."); + _changedPart = L"r00"; + return true; + } + + int numLetters = 1; + if (basePart.Right(numLetters) == L"1" || basePart.Right(numLetters) == L"0") + { + while (numLetters < basePart.Length()) + { + if (basePart[basePart.Length() - numLetters - 1] != '0') + break; + numLetters++; + } + } + else + return false; + _unchangedPart = basePart.Left(basePart.Length() - numLetters); + _changedPart = basePart.Right(numLetters); + return true; + } + + UString GetNextName() + { + UString newName; + if (_newStyle || !_first) + { + int i; + int numLetters = _changedPart.Length(); + for (i = numLetters - 1; i >= 0; i--) + { + wchar_t c = _changedPart[i]; + if (c == L'9') + { + c = L'0'; + newName = c + newName; + if (i == 0) + newName = UString(L'1') + newName; + continue; + } + c++; + newName = UString(c) + newName; + i--; + for (; i >= 0; i--) + newName = _changedPart[i] + newName; + break; + } + _changedPart = newName; + } + _first = false; + return _unchangedPart + _changedPart + _afterPart; + } +}; + +HRESULT CHandler::Open2(IInStream *stream, + const UInt64 *maxCheckStartPosition, + IArchiveOpenCallback *openCallback) +{ + { + CMyComPtr openVolumeCallback; + CMyComPtr getTextPassword; + CMyComPtr openArchiveCallbackWrap = openCallback; + + CVolumeName seqName; + + UInt64 totalBytes = 0; + UInt64 curBytes = 0; + + if (openCallback) + { + openArchiveCallbackWrap.QueryInterface(IID_IArchiveOpenVolumeCallback, &openVolumeCallback); + openArchiveCallbackWrap.QueryInterface(IID_ICryptoGetTextPassword, &getTextPassword); + } + + for (;;) + { + CMyComPtr inStream; + if (!_archives.IsEmpty()) + { + if (!openVolumeCallback) + break; + + if (_archives.Size() == 1) + { + if (!_archiveInfo.IsVolume()) + break; + UString baseName; + { + NCOM::CPropVariant prop; + RINOK(openVolumeCallback->GetProperty(kpidName, &prop)); + if (prop.vt != VT_BSTR) + break; + baseName = prop.bstrVal; + } + seqName.InitName(baseName, _archiveInfo.HaveNewVolumeName()); + } + + UString fullName = seqName.GetNextName(); + HRESULT result = openVolumeCallback->GetStream(fullName, &inStream); + if (result == S_FALSE) + break; + if (result != S_OK) + return result; + if (!stream) + break; + } + else + inStream = stream; + + UInt64 endPos = 0; + RINOK(stream->Seek(0, STREAM_SEEK_END, &endPos)); + RINOK(stream->Seek(0, STREAM_SEEK_SET, NULL)); + if (openCallback) + { + totalBytes += endPos; + RINOK(openCallback->SetTotal(NULL, &totalBytes)); + } + + NArchive::NRar::CInArchive archive; + RINOK(archive.Open(inStream, maxCheckStartPosition)); + + if (_archives.IsEmpty()) + archive.GetArchiveInfo(_archiveInfo); + + CItemEx item; + for (;;) + { + if (archive.m_Position > endPos) + { + AddErrorMessage("Unexpected end of archive"); + break; + } + bool decryptionError; + AString errorMessageLoc; + HRESULT result = archive.GetNextItem(item, getTextPassword, decryptionError, errorMessageLoc); + if (errorMessageLoc) + AddErrorMessage(errorMessageLoc); + if (result == S_FALSE) + { + if (decryptionError && _items.IsEmpty()) + return S_FALSE; + break; + } + RINOK(result); + if (item.IgnoreItem()) + continue; + + bool needAdd = true; + if (item.IsSplitBefore()) + { + if (!_refItems.IsEmpty()) + { + CRefItem &refItem = _refItems.Back(); + refItem.NumItems++; + needAdd = false; + } + } + if (needAdd) + { + CRefItem refItem; + refItem.ItemIndex = _items.Size(); + refItem.NumItems = 1; + refItem.VolumeIndex = _archives.Size(); + _refItems.Add(refItem); + } + _items.Add(item); + if (openCallback && _items.Size() % 100 == 0) + { + UInt64 numFiles = _items.Size(); + UInt64 numBytes = curBytes + item.Position; + RINOK(openCallback->SetCompleted(&numFiles, &numBytes)); + } + } + curBytes += endPos; + _archives.Add(archive); + } + } + return S_OK; +} + +STDMETHODIMP CHandler::Open(IInStream *stream, + const UInt64 *maxCheckStartPosition, + IArchiveOpenCallback *openCallback) +{ + COM_TRY_BEGIN + Close(); + try + { + HRESULT res = Open2(stream, maxCheckStartPosition, openCallback); + if (res != S_OK) + Close(); + return res; + } + catch(const CInArchiveException &) { Close(); return S_FALSE; } + catch(...) { Close(); throw; } + COM_TRY_END +} + +STDMETHODIMP CHandler::Close() +{ + COM_TRY_BEGIN + _errorMessage.Empty(); + _refItems.Clear(); + _items.Clear(); + _archives.Clear(); + return S_OK; + COM_TRY_END +} + +struct CMethodItem +{ + Byte RarUnPackVersion; + CMyComPtr Coder; +}; + + +STDMETHODIMP CHandler::Extract(const UInt32 *indices, UInt32 numItems, + Int32 testMode, IArchiveExtractCallback *extractCallback) +{ + COM_TRY_BEGIN + CMyComPtr getTextPassword; + UInt64 censoredTotalUnPacked = 0, + // censoredTotalPacked = 0, + importantTotalUnPacked = 0; + // importantTotalPacked = 0; + bool allFilesMode = (numItems == (UInt32)-1); + if (allFilesMode) + numItems = _refItems.Size(); + if (numItems == 0) + return S_OK; + int lastIndex = 0; + CRecordVector importantIndexes; + CRecordVector extractStatuses; + + for (UInt32 t = 0; t < numItems; t++) + { + int index = allFilesMode ? t : indices[t]; + const CRefItem &refItem = _refItems[index]; + const CItemEx &item = _items[refItem.ItemIndex]; + censoredTotalUnPacked += item.Size; + // censoredTotalPacked += item.PackSize; + int j; + for (j = lastIndex; j <= index; j++) + // if (!_items[_refItems[j].ItemIndex].IsSolid()) + if (!IsSolid(j)) + lastIndex = j; + for (j = lastIndex; j <= index; j++) + { + const CRefItem &refItem = _refItems[j]; + const CItemEx &item = _items[refItem.ItemIndex]; + + // const CItemEx &item = _items[j]; + + importantTotalUnPacked += item.Size; + // importantTotalPacked += item.PackSize; + importantIndexes.Add(j); + extractStatuses.Add(j == index); + } + lastIndex = index + 1; + } + + RINOK(extractCallback->SetTotal(importantTotalUnPacked)); + UInt64 currentImportantTotalUnPacked = 0; + UInt64 currentImportantTotalPacked = 0; + UInt64 currentUnPackSize, currentPackSize; + + CObjectVector methodItems; + + NCompress::CCopyCoder *copyCoderSpec = new NCompress::CCopyCoder; + CMyComPtr copyCoder = copyCoderSpec; + + CFilterCoder *filterStreamSpec = new CFilterCoder; + CMyComPtr filterStream = filterStreamSpec; + + NCrypto::NRar20::CDecoder *rar20CryptoDecoderSpec = NULL; + CMyComPtr rar20CryptoDecoder; + NCrypto::NRar29::CDecoder *rar29CryptoDecoderSpec = NULL; + CMyComPtr rar29CryptoDecoder; + + CFolderInStream *folderInStreamSpec = NULL; + CMyComPtr folderInStream; + + CLocalProgress *lps = new CLocalProgress; + CMyComPtr progress = lps; + lps->Init(extractCallback, false); + + bool solidStart = true; + for (int i = 0; i < importantIndexes.Size(); i++, + currentImportantTotalUnPacked += currentUnPackSize, + currentImportantTotalPacked += currentPackSize) + { + lps->InSize = currentImportantTotalPacked; + lps->OutSize = currentImportantTotalUnPacked; + RINOK(lps->SetCur()); + CMyComPtr realOutStream; + + Int32 askMode; + if (extractStatuses[i]) + askMode = testMode ? + NExtract::NAskMode::kTest : + NExtract::NAskMode::kExtract; + else + askMode = NExtract::NAskMode::kSkip; + + UInt32 index = importantIndexes[i]; + + const CRefItem &refItem = _refItems[index]; + const CItemEx &item = _items[refItem.ItemIndex]; + + currentUnPackSize = item.Size; + + currentPackSize = GetPackSize(index); + + if (item.IgnoreItem()) + continue; + + RINOK(extractCallback->GetStream(index, &realOutStream, askMode)); + + if (!IsSolid(index)) + solidStart = true; + if (item.IsDir()) + { + RINOK(extractCallback->PrepareOperation(askMode)); + RINOK(extractCallback->SetOperationResult(NExtract::NOperationResult::kOK)); + continue; + } + + bool mustBeProcessedAnywhere = false; + if (i < importantIndexes.Size() - 1) + { + // const CRefItem &nextRefItem = _refItems[importantIndexes[i + 1]]; + // const CItemEx &nextItemInfo = _items[nextRefItem.ItemIndex]; + // mustBeProcessedAnywhere = nextItemInfo.IsSolid(); + mustBeProcessedAnywhere = IsSolid(importantIndexes[i + 1]); + } + + if (!mustBeProcessedAnywhere && !testMode && !realOutStream) + continue; + + if (!realOutStream && !testMode) + askMode = NExtract::NAskMode::kSkip; + + RINOK(extractCallback->PrepareOperation(askMode)); + + COutStreamWithCRC *outStreamSpec = new COutStreamWithCRC; + CMyComPtr outStream(outStreamSpec); + outStreamSpec->SetStream(realOutStream); + outStreamSpec->Init(); + realOutStream.Release(); + + /* + for (int partIndex = 0; partIndex < 1; partIndex++) + { + CMyComPtr inStream; + + // item redefinition + const CItemEx &item = _items[refItem.ItemIndex + partIndex]; + + NArchive::NRar::CInArchive &archive = _archives[refItem.VolumeIndex + partIndex]; + + inStream.Attach(archive.CreateLimitedStream(item.GetDataPosition(), + item.PackSize)); + */ + if (!folderInStream) + { + folderInStreamSpec = new CFolderInStream; + folderInStream = folderInStreamSpec; + } + + folderInStreamSpec->Init(&_archives, &_items, refItem); + + UInt64 packSize = currentPackSize; + + // packedPos += item.PackSize; + // unpackedPos += 0; + + CMyComPtr inStream; + if (item.IsEncrypted()) + { + CMyComPtr cryptoSetPassword; + if (item.UnPackVersion >= 29) + { + if (!rar29CryptoDecoder) + { + rar29CryptoDecoderSpec = new NCrypto::NRar29::CDecoder; + rar29CryptoDecoder = rar29CryptoDecoderSpec; + // RINOK(rar29CryptoDecoder.CoCreateInstance(CLSID_CCryptoRar29Decoder)); + } + rar29CryptoDecoderSpec->SetRar350Mode(item.UnPackVersion < 36); + CMyComPtr cryptoProperties; + RINOK(rar29CryptoDecoder.QueryInterface(IID_ICompressSetDecoderProperties2, + &cryptoProperties)); + RINOK(cryptoProperties->SetDecoderProperties2(item.Salt, item.HasSalt() ? sizeof(item.Salt) : 0)); + filterStreamSpec->Filter = rar29CryptoDecoder; + } + else if (item.UnPackVersion >= 20) + { + if (!rar20CryptoDecoder) + { + rar20CryptoDecoderSpec = new NCrypto::NRar20::CDecoder; + rar20CryptoDecoder = rar20CryptoDecoderSpec; + // RINOK(rar20CryptoDecoder.CoCreateInstance(CLSID_CCryptoRar20Decoder)); + } + filterStreamSpec->Filter = rar20CryptoDecoder; + } + else + { + outStream.Release(); + RINOK(extractCallback->SetOperationResult(NExtract::NOperationResult::kUnSupportedMethod)); + continue; + } + RINOK(filterStreamSpec->Filter.QueryInterface(IID_ICryptoSetPassword, + &cryptoSetPassword)); + + if (!getTextPassword) + extractCallback->QueryInterface(IID_ICryptoGetTextPassword, (void **)&getTextPassword); + if (getTextPassword) + { + CMyComBSTR password; + RINOK(getTextPassword->CryptoGetTextPassword(&password)); + if (item.UnPackVersion >= 29) + { + CByteBuffer buffer; + UString unicodePassword(password); + const UInt32 sizeInBytes = unicodePassword.Length() * 2; + buffer.SetCapacity(sizeInBytes); + for (int i = 0; i < unicodePassword.Length(); i++) + { + wchar_t c = unicodePassword[i]; + ((Byte *)buffer)[i * 2] = (Byte)c; + ((Byte *)buffer)[i * 2 + 1] = (Byte)(c >> 8); + } + RINOK(cryptoSetPassword->CryptoSetPassword( + (const Byte *)buffer, sizeInBytes)); + } + else + { + AString oemPassword = UnicodeStringToMultiByte( + (const wchar_t *)password, CP_OEMCP); + RINOK(cryptoSetPassword->CryptoSetPassword( + (const Byte *)(const char *)oemPassword, oemPassword.Length())); + } + } + else + { + RINOK(cryptoSetPassword->CryptoSetPassword(0, 0)); + } + filterStreamSpec->SetInStream(folderInStream); + inStream = filterStream; + } + else + { + inStream = folderInStream; + } + CMyComPtr commonCoder; + switch(item.Method) + { + case '0': + { + commonCoder = copyCoder; + break; + } + case '1': + case '2': + case '3': + case '4': + case '5': + { + /* + if (item.UnPackVersion >= 29) + { + outStream.Release(); + RINOK(extractCallback->SetOperationResult(NExtract::NOperationResult::kUnSupportedMethod)); + continue; + } + */ + int m; + for (m = 0; m < methodItems.Size(); m++) + if (methodItems[m].RarUnPackVersion == item.UnPackVersion) + break; + if (m == methodItems.Size()) + { + CMethodItem mi; + mi.RarUnPackVersion = item.UnPackVersion; + + mi.Coder.Release(); + if (item.UnPackVersion <= 30) + { + UInt32 methodID = 0x040300; + if (item.UnPackVersion < 20) + methodID += 1; + else if (item.UnPackVersion < 29) + methodID += 2; + else + methodID += 3; + RINOK(CreateCoder(EXTERNAL_CODECS_VARS methodID, mi.Coder, false)); + } + + if (mi.Coder == 0) + { + outStream.Release(); + RINOK(extractCallback->SetOperationResult(NExtract::NOperationResult::kUnSupportedMethod)); + continue; + } + + m = methodItems.Add(mi); + } + CMyComPtr decoder = methodItems[m].Coder; + + CMyComPtr compressSetDecoderProperties; + RINOK(decoder.QueryInterface(IID_ICompressSetDecoderProperties2, + &compressSetDecoderProperties)); + + Byte isSolid = (Byte)((IsSolid(index) || item.IsSplitBefore()) ? 1: 0); + if (solidStart) + { + isSolid = false; + solidStart = false; + } + + + RINOK(compressSetDecoderProperties->SetDecoderProperties2(&isSolid, 1)); + + commonCoder = decoder; + break; + } + default: + outStream.Release(); + RINOK(extractCallback->SetOperationResult(NExtract::NOperationResult::kUnSupportedMethod)); + continue; + } + HRESULT result = commonCoder->Code(inStream, outStream, &packSize, &item.Size, progress); + if (item.IsEncrypted()) + filterStreamSpec->ReleaseInStream(); + if (result == S_FALSE) + { + outStream.Release(); + RINOK(extractCallback->SetOperationResult(NExtract::NOperationResult::kDataError)); + continue; + } + if (result != S_OK) + return result; + + /* + if (refItem.NumItems == 1 && + !item.IsSplitBefore() && !item.IsSplitAfter()) + */ + { + const CItemEx &lastItem = _items[refItem.ItemIndex + refItem.NumItems - 1]; + bool crcOK = outStreamSpec->GetCRC() == lastItem.FileCRC; + outStream.Release(); + RINOK(extractCallback->SetOperationResult(crcOK ? + NExtract::NOperationResult::kOK: + NExtract::NOperationResult::kCRCError)); + } + /* + else + { + bool crcOK = true; + for (int partIndex = 0; partIndex < refItem.NumItems; partIndex++) + { + const CItemEx &item = _items[refItem.ItemIndex + partIndex]; + if (item.FileCRC != folderInStreamSpec->CRCs[partIndex]) + { + crcOK = false; + break; + } + } + RINOK(extractCallback->SetOperationResult(crcOK ? + NExtract::NOperationResult::kOK: + NExtract::NOperationResult::kCRCError)); + } + */ + } + return S_OK; + COM_TRY_END +} + +IMPL_ISetCompressCodecsInfo + +}} diff --git a/CPP/7zip/Archive/Rar/RarHandler.h b/CPP/7zip/Archive/Rar/RarHandler.h new file mode 100644 index 0000000..7926682 --- /dev/null +++ b/CPP/7zip/Archive/Rar/RarHandler.h @@ -0,0 +1,66 @@ +// Rar/Handler.h + +#ifndef __RAR_HANDLER_H +#define __RAR_HANDLER_H + +#include "../IArchive.h" + +#include "../../Common/CreateCoder.h" + +#include "RarIn.h" +#include "RarVolumeInStream.h" + +namespace NArchive { +namespace NRar { + +class CHandler: + public IInArchive, + PUBLIC_ISetCompressCodecsInfo + public CMyUnknownImp +{ + CRecordVector _refItems; + CObjectVector _items; + CObjectVector _archives; + NArchive::NRar::CInArchiveInfo _archiveInfo; + AString _errorMessage; + + DECL_EXTERNAL_CODECS_VARS + + UInt64 GetPackSize(int refIndex) const; + + bool IsSolid(int refIndex) + { + const CItemEx &item = _items[_refItems[refIndex].ItemIndex]; + if (item.UnPackVersion < 20) + { + if (_archiveInfo.IsSolid()) + return (refIndex > 0); + return false; + } + return item.IsSolid(); + } + void AddErrorMessage(const AString &s) + { + if (!_errorMessage.IsEmpty()) + _errorMessage += '\n'; + _errorMessage += s; + } + + HRESULT Open2(IInStream *stream, + const UInt64 *maxCheckStartPosition, + IArchiveOpenCallback *openCallback); + +public: + MY_QUERYINTERFACE_BEGIN2(IInArchive) + QUERY_ENTRY_ISetCompressCodecsInfo + MY_QUERYINTERFACE_END + MY_ADDREF_RELEASE + + INTERFACE_IInArchive(;) + + DECL_ISetCompressCodecsInfo +}; + +}} + +#endif diff --git a/CPP/7zip/Archive/Rar/RarHeader.cpp b/CPP/7zip/Archive/Rar/RarHeader.cpp new file mode 100644 index 0000000..94481e0 --- /dev/null +++ b/CPP/7zip/Archive/Rar/RarHeader.cpp @@ -0,0 +1,21 @@ +// Archive/Rar/Headers.cpp + +#include "StdAfx.h" + +#include "RarHeader.h" + +namespace NArchive{ +namespace NRar{ +namespace NHeader{ + +Byte kMarker[kMarkerSize] = {0x52 + 1, 0x61, 0x72, 0x21, 0x1a, 0x07, 0x00}; + +class CMarkerInitializer +{ +public: + CMarkerInitializer() { kMarker[0]--; }; +}; + +static CMarkerInitializer markerInitializer; + +}}} diff --git a/CPP/7zip/Archive/Rar/RarHeader.h b/CPP/7zip/Archive/Rar/RarHeader.h new file mode 100644 index 0000000..5c21a2a --- /dev/null +++ b/CPP/7zip/Archive/Rar/RarHeader.h @@ -0,0 +1,205 @@ +// Archive/RarHeader.h + +#ifndef __ARCHIVE_RAR_HEADER_H +#define __ARCHIVE_RAR_HEADER_H + +#include "Common/Types.h" + +namespace NArchive { +namespace NRar { +namespace NHeader { + +const int kMarkerSize = 7; +extern Byte kMarker[kMarkerSize]; + +const int kArchiveSolid = 0x1; + +namespace NBlockType +{ + enum EBlockType + { + kMarker = 0x72, + kArchiveHeader, + kFileHeader, + kCommentHeader, + kOldAuthenticity, + kOldSubBlock, + kRecoveryRecord, + kAuthenticity, + kSubBlock, + kEndOfArchive + }; +} + +namespace NArchive +{ + const UInt16 kVolume = 1; + const UInt16 kComment = 2; + const UInt16 kLock = 4; + const UInt16 kSolid = 8; + const UInt16 kNewVolName = 0x10; // ('volname.partN.rar') + const UInt16 kAuthenticity = 0x20; + const UInt16 kRecovery = 0x40; + const UInt16 kBlockEncryption = 0x80; + const UInt16 kFirstVolume = 0x100; // (set only by RAR 3.0 and later) + const UInt16 kEncryptVer = 0x200; // RAR 3.6 there is EncryptVer Byte in End of MainHeader + + const int kHeaderSizeMin = 7; + + const int kArchiveHeaderSize = 13; + + const int kBlockHeadersAreEncrypted = 0x80; + +} + +namespace NFile +{ + const int kSplitBefore = 1 << 0; + const int kSplitAfter = 1 << 1; + const int kEncrypted = 1 << 2; + const int kComment = 1 << 3; + const int kSolid = 1 << 4; + + const int kDictBitStart = 5; + const int kNumDictBits = 3; + const int kDictMask = (1 << kNumDictBits) - 1; + const int kDictDirectoryValue = 0x7; + + const int kSize64Bits = 1 << 8; + const int kUnicodeName = 1 << 9; + const int kSalt = 1 << 10; + const int kOldVersion = 1 << 11; + const int kExtTime = 1 << 12; + // const int kExtFlags = 1 << 13; + // const int kSkipIfUnknown = 1 << 14; + + const int kLongBlock = 1 << 15; + + /* + struct CBlock + { + // UInt16 HeadCRC; + // Byte Type; + // UInt16 Flags; + // UInt16 HeadSize; + UInt32 PackSize; + UInt32 UnPackSize; + Byte HostOS; + UInt32 FileCRC; + UInt32 Time; + Byte UnPackVersion; + Byte Method; + UInt16 NameSize; + UInt32 Attributes; + }; + */ + + /* + struct CBlock32 + { + UInt16 HeadCRC; + Byte Type; + UInt16 Flags; + UInt16 HeadSize; + UInt32 PackSize; + UInt32 UnPackSize; + Byte HostOS; + UInt32 FileCRC; + UInt32 Time; + Byte UnPackVersion; + Byte Method; + UInt16 NameSize; + UInt32 Attributes; + UInt16 GetRealCRC(const void *aName, UInt32 aNameSize, + bool anExtraDataDefined = false, Byte *anExtraData = 0) const; + }; + struct CBlock64 + { + UInt16 HeadCRC; + Byte Type; + UInt16 Flags; + UInt16 HeadSize; + UInt32 PackSizeLow; + UInt32 UnPackSizeLow; + Byte HostOS; + UInt32 FileCRC; + UInt32 Time; + Byte UnPackVersion; + Byte Method; + UInt16 NameSize; + UInt32 Attributes; + UInt32 PackSizeHigh; + UInt32 UnPackSizeHigh; + UInt16 GetRealCRC(const void *aName, UInt32 aNameSize) const; + }; + */ + + const int kLabelFileAttribute = 0x08; + const int kWinFileDirectoryAttributeMask = 0x10; + + enum CHostOS + { + kHostMSDOS = 0, + kHostOS2 = 1, + kHostWin32 = 2, + kHostUnix = 3, + kHostMacOS = 4, + kHostBeOS = 5 + }; +} + +namespace NBlock +{ + const UInt16 kLongBlock = 1 << 15; + struct CBlock + { + UInt16 CRC; + Byte Type; + UInt16 Flags; + UInt16 HeadSize; + // UInt32 DataSize; + }; +} + +/* +struct CSubBlock +{ + UInt16 HeadCRC; + Byte HeadType; + UInt16 Flags; + UInt16 HeadSize; + UInt32 DataSize; + UInt16 SubType; + Byte Level; // Reserved : Must be 0 +}; + +struct CCommentBlock +{ + UInt16 HeadCRC; + Byte HeadType; + UInt16 Flags; + UInt16 HeadSize; + UInt16 UnpSize; + Byte UnpVer; + Byte Method; + UInt16 CommCRC; +}; + + +struct CProtectHeader +{ + UInt16 HeadCRC; + Byte HeadType; + UInt16 Flags; + UInt16 HeadSize; + UInt32 DataSize; + Byte Version; + UInt16 RecSectors; + UInt32 TotalBlocks; + Byte Mark[8]; +}; +*/ + +}}} + +#endif diff --git a/CPP/7zip/Archive/Rar/RarIn.cpp b/CPP/7zip/Archive/Rar/RarIn.cpp new file mode 100644 index 0000000..e4c2375 --- /dev/null +++ b/CPP/7zip/Archive/Rar/RarIn.cpp @@ -0,0 +1,478 @@ +// Archive/RarIn.cpp + +#include "StdAfx.h" + +#include "../../../../C/7zCrc.h" +#include "../../../../C/CpuArch.h" + +#include "Common/StringConvert.h" +#include "Common/UTFConvert.h" + +#include "../../Common/LimitedStreams.h" +#include "../../Common/StreamUtils.h" + +#include "../Common/FindSignature.h" + +#include "RarIn.h" + +#define Get16(p) GetUi16(p) +#define Get32(p) GetUi32(p) +#define Get64(p) GetUi64(p) + +namespace NArchive { +namespace NRar { + +static const char *k_UnexpectedEnd = "Unexpected end of archive"; +static const char *k_DecryptionError = "Decryption Error"; + +void CInArchive::ThrowExceptionWithCode( + CInArchiveException::CCauseType cause) +{ + throw CInArchiveException(cause); +} + +HRESULT CInArchive::Open(IInStream *inStream, const UInt64 *searchHeaderSizeLimit) +{ + try + { + Close(); + HRESULT res = Open2(inStream, searchHeaderSizeLimit); + if (res == S_OK) + return res; + Close(); + return res; + } + catch(...) { Close(); throw; } +} + +void CInArchive::Close() +{ + m_Stream.Release(); +} + +HRESULT CInArchive::ReadBytesSpec(void *data, size_t *resSize) +{ + if (m_CryptoMode) + { + size_t size = *resSize; + *resSize = 0; + const Byte *bufData = m_DecryptedDataAligned; + UInt32 bufSize = m_DecryptedDataSize; + size_t i; + for (i = 0; i < size && m_CryptoPos < bufSize; i++) + ((Byte *)data)[i] = bufData[m_CryptoPos++]; + *resSize = i; + return S_OK; + } + return ReadStream(m_Stream, data, resSize); +} + +bool CInArchive::ReadBytesAndTestSize(void *data, UInt32 size) +{ + size_t processed = size; + if (ReadBytesSpec(data, &processed) != S_OK) + return false; + return processed == size; +} + +HRESULT CInArchive::Open2(IInStream *stream, const UInt64 *searchHeaderSizeLimit) +{ + m_CryptoMode = false; + RINOK(stream->Seek(0, STREAM_SEEK_SET, &m_StreamStartPosition)); + m_Position = m_StreamStartPosition; + + UInt64 arcStartPos; + RINOK(FindSignatureInStream(stream, NHeader::kMarker, NHeader::kMarkerSize, + searchHeaderSizeLimit, arcStartPos)); + m_Position = arcStartPos + NHeader::kMarkerSize; + RINOK(stream->Seek(m_Position, STREAM_SEEK_SET, NULL)); + Byte buf[NHeader::NArchive::kArchiveHeaderSize + 1]; + + RINOK(ReadStream_FALSE(stream, buf, NHeader::NArchive::kArchiveHeaderSize)); + AddToSeekValue(NHeader::NArchive::kArchiveHeaderSize); + + + UInt32 blockSize = Get16(buf + 5); + + _header.EncryptVersion = 0; + _header.Flags = Get16(buf + 3); + + UInt32 headerSize = NHeader::NArchive::kArchiveHeaderSize; + if (_header.IsThereEncryptVer()) + { + if (blockSize <= headerSize) + return S_FALSE; + RINOK(ReadStream_FALSE(stream, buf + NHeader::NArchive::kArchiveHeaderSize, 1)); + AddToSeekValue(1); + _header.EncryptVersion = buf[NHeader::NArchive::kArchiveHeaderSize]; + headerSize += 1; + } + if (blockSize < headerSize || + buf[2] != NHeader::NBlockType::kArchiveHeader || + (UInt32)Get16(buf) != (CrcCalc(buf + 2, headerSize - 2) & 0xFFFF)) + return S_FALSE; + + size_t commentSize = blockSize - headerSize; + _comment.SetCapacity(commentSize); + RINOK(ReadStream_FALSE(stream, _comment, commentSize)); + AddToSeekValue(commentSize); + m_Stream = stream; + _header.StartPosition = arcStartPos; + return S_OK; +} + +void CInArchive::GetArchiveInfo(CInArchiveInfo &archiveInfo) const +{ + archiveInfo = _header; +} + +static void DecodeUnicodeFileName(const char *name, const Byte *encName, + int encSize, wchar_t *unicodeName, int maxDecSize) +{ + int encPos = 0; + int decPos = 0; + int flagBits = 0; + Byte flags = 0; + Byte highByte = encName[encPos++]; + while (encPos < encSize && decPos < maxDecSize) + { + if (flagBits == 0) + { + flags = encName[encPos++]; + flagBits = 8; + } + switch(flags >> 6) + { + case 0: + unicodeName[decPos++] = encName[encPos++]; + break; + case 1: + unicodeName[decPos++] = (wchar_t)(encName[encPos++] + (highByte << 8)); + break; + case 2: + unicodeName[decPos++] = (wchar_t)(encName[encPos] + (encName[encPos + 1] << 8)); + encPos += 2; + break; + case 3: + { + int length = encName[encPos++]; + if (length & 0x80) + { + Byte correction = encName[encPos++]; + for (length = (length & 0x7f) + 2; + length > 0 && decPos < maxDecSize; length--, decPos++) + unicodeName[decPos] = (wchar_t)(((name[decPos] + correction) & 0xff) + (highByte << 8)); + } + else + for (length += 2; length > 0 && decPos < maxDecSize; length--, decPos++) + unicodeName[decPos] = name[decPos]; + } + break; + } + flags <<= 2; + flagBits -= 2; + } + unicodeName[decPos < maxDecSize ? decPos : maxDecSize - 1] = 0; +} + +void CInArchive::ReadName(CItemEx &item, int nameSize) +{ + item.UnicodeName.Empty(); + if (nameSize > 0) + { + m_NameBuffer.EnsureCapacity(nameSize + 1); + char *buffer = (char *)m_NameBuffer; + + for (int i = 0; i < nameSize; i++) + buffer[i] = ReadByte(); + + int mainLen; + for (mainLen = 0; mainLen < nameSize; mainLen++) + if (buffer[mainLen] == '\0') + break; + buffer[mainLen] = '\0'; + item.Name = buffer; + + if(item.HasUnicodeName()) + { + if(mainLen < nameSize) + { + int unicodeNameSizeMax = MyMin(nameSize, (0x400)); + _unicodeNameBuffer.EnsureCapacity(unicodeNameSizeMax + 1); + DecodeUnicodeFileName(buffer, (const Byte *)buffer + mainLen + 1, + nameSize - (mainLen + 1), _unicodeNameBuffer, unicodeNameSizeMax); + item.UnicodeName = _unicodeNameBuffer; + } + else if (!ConvertUTF8ToUnicode(item.Name, item.UnicodeName)) + item.UnicodeName.Empty(); + } + } + else + item.Name.Empty(); +} + +Byte CInArchive::ReadByte() +{ + if (m_CurPos >= m_PosLimit) + throw CInArchiveException(CInArchiveException::kIncorrectArchive); + return m_CurData[m_CurPos++]; +} + +UInt16 CInArchive::ReadUInt16() +{ + UInt16 value = 0; + for (int i = 0; i < 2; i++) + { + Byte b = ReadByte(); + value |= (UInt16(b) << (8 * i)); + } + return value; +} + +UInt32 CInArchive::ReadUInt32() +{ + UInt32 value = 0; + for (int i = 0; i < 4; i++) + { + Byte b = ReadByte(); + value |= (UInt32(b) << (8 * i)); + } + return value; +} + +void CInArchive::ReadTime(Byte mask, CRarTime &rarTime) +{ + rarTime.LowSecond = (Byte)(((mask & 4) != 0) ? 1 : 0); + int numDigits = (mask & 3); + rarTime.SubTime[0] = rarTime.SubTime[1] = rarTime.SubTime[2] = 0; + for (int i = 0; i < numDigits; i++) + rarTime.SubTime[3 - numDigits + i] = ReadByte(); +} + +void CInArchive::ReadHeaderReal(CItemEx &item) +{ + item.Flags = m_BlockHeader.Flags; + item.PackSize = ReadUInt32(); + item.Size = ReadUInt32(); + item.HostOS = ReadByte(); + item.FileCRC = ReadUInt32(); + item.MTime.DosTime = ReadUInt32(); + item.UnPackVersion = ReadByte(); + item.Method = ReadByte(); + int nameSize = ReadUInt16(); + item.Attrib = ReadUInt32(); + + item.MTime.LowSecond = 0; + item.MTime.SubTime[0] = + item.MTime.SubTime[1] = + item.MTime.SubTime[2] = 0; + + if((item.Flags & NHeader::NFile::kSize64Bits) != 0) + { + item.PackSize |= ((UInt64)ReadUInt32() << 32); + item.Size |= ((UInt64)ReadUInt32() << 32); + } + + ReadName(item, nameSize); + + if (item.HasSalt()) + for (int i = 0; i < sizeof(item.Salt); i++) + item.Salt[i] = ReadByte(); + + // some rar archives have HasExtTime flag without field. + if (m_CurPos < m_PosLimit && item.HasExtTime()) + { + Byte accessMask = (Byte)(ReadByte() >> 4); + Byte b = ReadByte(); + Byte modifMask = (Byte)(b >> 4); + Byte createMask = (Byte)(b & 0xF); + if ((modifMask & 8) != 0) + ReadTime(modifMask, item.MTime); + item.CTimeDefined = ((createMask & 8) != 0); + if (item.CTimeDefined) + { + item.CTime.DosTime = ReadUInt32(); + ReadTime(createMask, item.CTime); + } + item.ATimeDefined = ((accessMask & 8) != 0); + if (item.ATimeDefined) + { + item.ATime.DosTime = ReadUInt32(); + ReadTime(accessMask, item.ATime); + } + } + + UInt16 fileHeaderWithNameSize = (UInt16)m_CurPos; + + item.Position = m_Position; + item.MainPartSize = fileHeaderWithNameSize; + item.CommentSize = (UInt16)(m_BlockHeader.HeadSize - fileHeaderWithNameSize); + + if (m_CryptoMode) + item.AlignSize = (UInt16)((16 - ((m_BlockHeader.HeadSize) & 0xF)) & 0xF); + else + item.AlignSize = 0; + AddToSeekValue(m_BlockHeader.HeadSize); +} + +void CInArchive::AddToSeekValue(UInt64 addValue) +{ + m_Position += addValue; +} + +HRESULT CInArchive::GetNextItem(CItemEx &item, ICryptoGetTextPassword *getTextPassword, bool &decryptionError, AString &errorMessage) +{ + decryptionError = false; + for (;;) + { + SeekInArchive(m_Position); + if (!m_CryptoMode && (_header.Flags & + NHeader::NArchive::kBlockHeadersAreEncrypted) != 0) + { + m_CryptoMode = false; + if (getTextPassword == 0) + return S_FALSE; + if (!m_RarAES) + { + m_RarAESSpec = new NCrypto::NRar29::CDecoder; + m_RarAES = m_RarAESSpec; + } + m_RarAESSpec->SetRar350Mode(_header.IsEncryptOld()); + + // Salt + const UInt32 kSaltSize = 8; + Byte salt[kSaltSize]; + if(!ReadBytesAndTestSize(salt, kSaltSize)) + return S_FALSE; + m_Position += kSaltSize; + RINOK(m_RarAESSpec->SetDecoderProperties2(salt, kSaltSize)) + // Password + CMyComBSTR password; + RINOK(getTextPassword->CryptoGetTextPassword(&password)) + UString unicodePassword(password); + + CByteBuffer buffer; + const UInt32 sizeInBytes = unicodePassword.Length() * 2; + buffer.SetCapacity(sizeInBytes); + for (int i = 0; i < unicodePassword.Length(); i++) + { + wchar_t c = unicodePassword[i]; + ((Byte *)buffer)[i * 2] = (Byte)c; + ((Byte *)buffer)[i * 2 + 1] = (Byte)(c >> 8); + } + + RINOK(m_RarAESSpec->CryptoSetPassword((const Byte *)buffer, sizeInBytes)); + + const UInt32 kDecryptedBufferSize = (1 << 12); + if (m_DecryptedData.GetCapacity() == 0) + { + const UInt32 kAlign = 16; + m_DecryptedData.SetCapacity(kDecryptedBufferSize + kAlign); + m_DecryptedDataAligned = (Byte *)((ptrdiff_t)((Byte *)m_DecryptedData + kAlign - 1) & ~(ptrdiff_t)(kAlign - 1)); + } + RINOK(m_RarAES->Init()); + size_t decryptedDataSizeT = kDecryptedBufferSize; + RINOK(ReadStream(m_Stream, m_DecryptedDataAligned, &decryptedDataSizeT)); + m_DecryptedDataSize = (UInt32)decryptedDataSizeT; + m_DecryptedDataSize = m_RarAES->Filter(m_DecryptedDataAligned, m_DecryptedDataSize); + + m_CryptoMode = true; + m_CryptoPos = 0; + } + + m_FileHeaderData.EnsureCapacity(7); + size_t processed = 7; + RINOK(ReadBytesSpec((Byte *)m_FileHeaderData, &processed)); + if (processed != 7) + { + if (processed != 0) + errorMessage = k_UnexpectedEnd; + return S_FALSE; + } + + m_CurData = (Byte *)m_FileHeaderData; + m_CurPos = 0; + m_PosLimit = 7; + m_BlockHeader.CRC = ReadUInt16(); + m_BlockHeader.Type = ReadByte(); + m_BlockHeader.Flags = ReadUInt16(); + m_BlockHeader.HeadSize = ReadUInt16(); + + if (m_BlockHeader.HeadSize < 7) + ThrowExceptionWithCode(CInArchiveException::kIncorrectArchive); + + if (m_BlockHeader.Type == NHeader::NBlockType::kEndOfArchive) + return S_FALSE; + + if (m_BlockHeader.Type == NHeader::NBlockType::kFileHeader) + { + m_FileHeaderData.EnsureCapacity(m_BlockHeader.HeadSize); + m_CurData = (Byte *)m_FileHeaderData; + m_PosLimit = m_BlockHeader.HeadSize; + if (!ReadBytesAndTestSize(m_CurData + m_CurPos, m_BlockHeader.HeadSize - 7)) + { + errorMessage = k_UnexpectedEnd; + return S_FALSE; + } + + ReadHeaderReal(item); + if ((CrcCalc(m_CurData + 2, + m_BlockHeader.HeadSize - item.CommentSize - 2) & 0xFFFF) != m_BlockHeader.CRC) + ThrowExceptionWithCode(CInArchiveException::kFileHeaderCRCError); + + FinishCryptoBlock(); + m_CryptoMode = false; + SeekInArchive(m_Position); // Move Position to compressed Data; + AddToSeekValue(item.PackSize); // m_Position points to next header; + return S_OK; + } + if (m_CryptoMode && m_BlockHeader.HeadSize > (1 << 10)) + { + decryptionError = true; + errorMessage = k_DecryptionError; + return S_FALSE; + } + if ((m_BlockHeader.Flags & NHeader::NBlock::kLongBlock) != 0) + { + m_FileHeaderData.EnsureCapacity(7 + 4); + m_CurData = (Byte *)m_FileHeaderData; + if (!ReadBytesAndTestSize(m_CurData + m_CurPos, 4)) + { + errorMessage = k_UnexpectedEnd; + return S_FALSE; + } + m_PosLimit = 7 + 4; + UInt32 dataSize = ReadUInt32(); + AddToSeekValue(dataSize); + if (m_CryptoMode && dataSize > (1 << 27)) + { + decryptionError = true; + errorMessage = k_DecryptionError; + return S_FALSE; + } + m_CryptoPos = m_BlockHeader.HeadSize; + } + else + m_CryptoPos = 0; + AddToSeekValue(m_BlockHeader.HeadSize); + FinishCryptoBlock(); + m_CryptoMode = false; + } +} + +void CInArchive::SeekInArchive(UInt64 position) +{ + m_Stream->Seek(position, STREAM_SEEK_SET, NULL); +} + +ISequentialInStream* CInArchive::CreateLimitedStream(UInt64 position, UInt64 size) +{ + CLimitedSequentialInStream *streamSpec = new CLimitedSequentialInStream; + CMyComPtr inStream(streamSpec); + SeekInArchive(position); + streamSpec->SetStream(m_Stream); + streamSpec->Init(size); + return inStream.Detach(); +} + +}} diff --git a/CPP/7zip/Archive/Rar/RarIn.h b/CPP/7zip/Archive/Rar/RarIn.h new file mode 100644 index 0000000..a6998db --- /dev/null +++ b/CPP/7zip/Archive/Rar/RarIn.h @@ -0,0 +1,123 @@ +// RarIn.h + +#ifndef __ARCHIVE_RAR_IN_H +#define __ARCHIVE_RAR_IN_H + +#include "Common/DynamicBuffer.h" +#include "Common/MyCom.h" + +#include "../../ICoder.h" +#include "../../IStream.h" + +#include "../../Common/StreamObjects.h" + +#include "../../Crypto/RarAes.h" + +#include "RarHeader.h" +#include "RarItem.h" + +namespace NArchive { +namespace NRar { + +class CInArchiveException +{ +public: + enum CCauseType + { + kUnexpectedEndOfArchive = 0, + kArchiveHeaderCRCError, + kFileHeaderCRCError, + kIncorrectArchive + } + Cause; + CInArchiveException(CCauseType cause) : Cause(cause) {} +}; + + +struct CInArchiveInfo +{ + UInt32 Flags; + Byte EncryptVersion; + UInt64 StartPosition; + + bool IsSolid() const { return (Flags & NHeader::NArchive::kSolid) != 0; } + bool IsCommented() const { return (Flags & NHeader::NArchive::kComment) != 0; } + bool IsVolume() const { return (Flags & NHeader::NArchive::kVolume) != 0; } + bool HaveNewVolumeName() const { return (Flags & NHeader::NArchive::kNewVolName) != 0; } + bool IsEncrypted() const { return (Flags & NHeader::NArchive::kBlockEncryption) != 0; } + bool IsThereEncryptVer() const { return (Flags & NHeader::NArchive::kEncryptVer) != 0; } + bool IsEncryptOld() const { return (!IsThereEncryptVer() || EncryptVersion < 36); } +}; + +class CInArchive +{ + CMyComPtr m_Stream; + + UInt64 m_StreamStartPosition; + + CInArchiveInfo _header; + CDynamicBuffer m_NameBuffer; + CDynamicBuffer _unicodeNameBuffer; + + CByteBuffer _comment; + + void ReadName(CItemEx &item, int nameSize); + void ReadHeaderReal(CItemEx &item); + + HRESULT ReadBytesSpec(void *data, size_t *size); + bool ReadBytesAndTestSize(void *data, UInt32 size); + + HRESULT Open2(IInStream *stream, const UInt64 *searchHeaderSizeLimit); + + void ThrowExceptionWithCode(CInArchiveException::CCauseType cause); + void ThrowUnexpectedEndOfArchiveException(); + + void AddToSeekValue(UInt64 addValue); + + CDynamicBuffer m_FileHeaderData; + + NHeader::NBlock::CBlock m_BlockHeader; + + NCrypto::NRar29::CDecoder *m_RarAESSpec; + CMyComPtr m_RarAES; + + Byte *m_CurData; // it must point to start of Rar::Block + UInt32 m_CurPos; + UInt32 m_PosLimit; + Byte ReadByte(); + UInt16 ReadUInt16(); + UInt32 ReadUInt32(); + void ReadTime(Byte mask, CRarTime &rarTime); + + CBuffer m_DecryptedData; + Byte *m_DecryptedDataAligned; + UInt32 m_DecryptedDataSize; + + bool m_CryptoMode; + UInt32 m_CryptoPos; + void FinishCryptoBlock() + { + if (m_CryptoMode) + while ((m_CryptoPos & 0xF) != 0) + { + m_CryptoPos++; + m_Position++; + } + } + +public: + UInt64 m_Position; + + HRESULT Open(IInStream *inStream, const UInt64 *searchHeaderSizeLimit); + void Close(); + HRESULT GetNextItem(CItemEx &item, ICryptoGetTextPassword *getTextPassword, bool &decryptionError, AString &errorMessage); + + void GetArchiveInfo(CInArchiveInfo &archiveInfo) const; + + void SeekInArchive(UInt64 position); + ISequentialInStream *CreateLimitedStream(UInt64 position, UInt64 size); +}; + +}} + +#endif diff --git a/CPP/7zip/Archive/Rar/RarItem.cpp b/CPP/7zip/Archive/Rar/RarItem.cpp new file mode 100644 index 0000000..9216ae5 --- /dev/null +++ b/CPP/7zip/Archive/Rar/RarItem.cpp @@ -0,0 +1,55 @@ +// RarItem.cpp + +#include "StdAfx.h" + +#include "RarItem.h" + +namespace NArchive{ +namespace NRar{ + +bool CItem::IgnoreItem() const +{ + switch(HostOS) + { + case NHeader::NFile::kHostMSDOS: + case NHeader::NFile::kHostOS2: + case NHeader::NFile::kHostWin32: + return ((Attrib & NHeader::NFile::kLabelFileAttribute) != 0); + } + return false; +} + +bool CItem::IsDir() const +{ + if (GetDictSize() == NHeader::NFile::kDictDirectoryValue) + return true; + switch(HostOS) + { + case NHeader::NFile::kHostMSDOS: + case NHeader::NFile::kHostOS2: + case NHeader::NFile::kHostWin32: + if ((Attrib & FILE_ATTRIBUTE_DIRECTORY) != 0) + return true; + } + return false; +} + +UInt32 CItem::GetWinAttributes() const +{ + UInt32 winAttributes; + switch(HostOS) + { + case NHeader::NFile::kHostMSDOS: + case NHeader::NFile::kHostOS2: + case NHeader::NFile::kHostWin32: + winAttributes = Attrib; + break; + default: + winAttributes = 0; // must be converted from unix value; + } + if (IsDir()) + winAttributes |= NHeader::NFile::kWinFileDirectoryAttributeMask; + return winAttributes; +} + +}} diff --git a/CPP/7zip/Archive/Rar/RarItem.h b/CPP/7zip/Archive/Rar/RarItem.h new file mode 100644 index 0000000..4aa4d86 --- /dev/null +++ b/CPP/7zip/Archive/Rar/RarItem.h @@ -0,0 +1,79 @@ +// RarItem.h + +#ifndef __ARCHIVE_RAR_ITEM_H +#define __ARCHIVE_RAR_ITEM_H + +#include "Common/Types.h" +#include "Common/MyString.h" + +#include "RarHeader.h" + +namespace NArchive{ +namespace NRar{ + +struct CRarTime +{ + UInt32 DosTime; + Byte LowSecond; + Byte SubTime[3]; +}; + +struct CItem +{ + UInt64 Size; + UInt64 PackSize; + + CRarTime CTime; + CRarTime ATime; + CRarTime MTime; + + UInt32 FileCRC; + UInt32 Attrib; + + UInt16 Flags; + Byte HostOS; + Byte UnPackVersion; + Byte Method; + + bool CTimeDefined; + bool ATimeDefined; + + AString Name; + UString UnicodeName; + + Byte Salt[8]; + + bool IsEncrypted() const { return (Flags & NHeader::NFile::kEncrypted) != 0; } + bool IsSolid() const { return (Flags & NHeader::NFile::kSolid) != 0; } + bool IsCommented() const { return (Flags & NHeader::NFile::kComment) != 0; } + bool IsSplitBefore() const { return (Flags & NHeader::NFile::kSplitBefore) != 0; } + bool IsSplitAfter() const { return (Flags & NHeader::NFile::kSplitAfter) != 0; } + bool HasSalt() const { return (Flags & NHeader::NFile::kSalt) != 0; } + bool HasExtTime() const { return (Flags & NHeader::NFile::kExtTime) != 0; } + bool HasUnicodeName()const { return (Flags & NHeader::NFile::kUnicodeName) != 0; } + bool IsOldVersion() const { return (Flags & NHeader::NFile::kOldVersion) != 0; } + + UInt32 GetDictSize() const { return (Flags >> NHeader::NFile::kDictBitStart) & NHeader::NFile::kDictMask; } + bool IsDir() const; + bool IgnoreItem() const; + UInt32 GetWinAttributes() const; + + CItem(): CTimeDefined(false), ATimeDefined(false) {} +}; + +class CItemEx: public CItem +{ +public: + UInt64 Position; + UInt16 MainPartSize; + UInt16 CommentSize; + UInt16 AlignSize; + UInt64 GetFullSize() const { return MainPartSize + CommentSize + AlignSize + PackSize; }; + // DWORD GetHeaderWithCommentSize() const { return MainPartSize + CommentSize; }; + UInt64 GetCommentPosition() const { return Position + MainPartSize; }; + UInt64 GetDataPosition() const { return GetCommentPosition() + CommentSize + AlignSize; }; +}; + +}} + +#endif diff --git a/CPP/7zip/Archive/Rar/RarRegister.cpp b/CPP/7zip/Archive/Rar/RarRegister.cpp new file mode 100644 index 0000000..2bcf569 --- /dev/null +++ b/CPP/7zip/Archive/Rar/RarRegister.cpp @@ -0,0 +1,13 @@ +// RarRegister.cpp + +#include "StdAfx.h" + +#include "../../Common/RegisterArc.h" + +#include "RarHandler.h" +static IInArchive *CreateArc() { return new NArchive::NRar::CHandler; } + +static CArcInfo g_ArcInfo = + { L"Rar", L"rar r00", 0, 3, {0x52 , 0x61, 0x72, 0x21, 0x1a, 0x07, 0x00}, 7, false, CreateArc, 0, }; + +REGISTER_ARC(Rar) diff --git a/CPP/7zip/Archive/Rar/RarVolumeInStream.cpp b/CPP/7zip/Archive/Rar/RarVolumeInStream.cpp new file mode 100644 index 0000000..25194f9 --- /dev/null +++ b/CPP/7zip/Archive/Rar/RarVolumeInStream.cpp @@ -0,0 +1,78 @@ +// RarVolumeInStream.cpp + +#include "StdAfx.h" + +#include "../../../../C/7zCrc.h" + +#include "RarVolumeInStream.h" + +namespace NArchive { +namespace NRar { + +void CFolderInStream::Init( + CObjectVector *archives, + const CObjectVector *items, + const CRefItem &refItem) +{ + _archives = archives; + _items = items; + _refItem = refItem; + _curIndex = 0; + CRCs.Clear(); + _fileIsOpen = false; +} + +HRESULT CFolderInStream::OpenStream() +{ + while (_curIndex < _refItem.NumItems) + { + const CItemEx &item = (*_items)[_refItem.ItemIndex + _curIndex]; + _stream.Attach((*_archives)[_refItem.VolumeIndex + _curIndex]. + CreateLimitedStream(item.GetDataPosition(), item.PackSize)); + _curIndex++; + _fileIsOpen = true; + _crc = CRC_INIT_VAL; + return S_OK; + } + return S_OK; +} + +HRESULT CFolderInStream::CloseStream() +{ + CRCs.Add(CRC_GET_DIGEST(_crc)); + _stream.Release(); + _fileIsOpen = false; + return S_OK; +} + +STDMETHODIMP CFolderInStream::Read(void *data, UInt32 size, UInt32 *processedSize) +{ + UInt32 realProcessedSize = 0; + while ((_curIndex < _refItem.NumItems || _fileIsOpen) && size > 0) + { + if (_fileIsOpen) + { + UInt32 localProcessedSize; + RINOK(_stream->Read( + ((Byte *)data) + realProcessedSize, size, &localProcessedSize)); + _crc = CrcUpdate(_crc, ((Byte *)data) + realProcessedSize, localProcessedSize); + if (localProcessedSize == 0) + { + RINOK(CloseStream()); + continue; + } + realProcessedSize += localProcessedSize; + size -= localProcessedSize; + break; + } + else + { + RINOK(OpenStream()); + } + } + if (processedSize != 0) + *processedSize = realProcessedSize; + return S_OK; +} + +}} diff --git a/CPP/7zip/Archive/Rar/RarVolumeInStream.h b/CPP/7zip/Archive/Rar/RarVolumeInStream.h new file mode 100644 index 0000000..78d95b1 --- /dev/null +++ b/CPP/7zip/Archive/Rar/RarVolumeInStream.h @@ -0,0 +1,49 @@ +// RarVolumeInStream.h + +#ifndef __RAR_VOLUME_IN_STREAM_H +#define __RAR_VOLUME_IN_STREAM_H + +#include "../../IStream.h" +#include "RarIn.h" + +namespace NArchive { +namespace NRar { + +struct CRefItem +{ + int VolumeIndex; + int ItemIndex; + int NumItems; +}; + +class CFolderInStream: + public ISequentialInStream, + public CMyUnknownImp +{ +public: + MY_UNKNOWN_IMP + + STDMETHOD(Read)(void *data, UInt32 size, UInt32 *processedSize); + +private: + CObjectVector *_archives; + const CObjectVector *_items; + CRefItem _refItem; + int _curIndex; + UInt32 _crc; + bool _fileIsOpen; + CMyComPtr _stream; + + HRESULT OpenStream(); + HRESULT CloseStream(); +public: + void Init(CObjectVector *archives, + const CObjectVector *items, + const CRefItem &refItem); + + CRecordVector CRCs; +}; + +}} + +#endif diff --git a/CPP/7zip/Archive/RpmHandler.cpp b/CPP/7zip/Archive/RpmHandler.cpp new file mode 100644 index 0000000..1d31d45 --- /dev/null +++ b/CPP/7zip/Archive/RpmHandler.cpp @@ -0,0 +1,292 @@ +// RpmHandler.cpp + +#include "StdAfx.h" + +#include "../../../C/CpuArch.h" + +#include "Common/ComTry.h" +#include "Common/MyString.h" + +#include "Windows/PropVariant.h" + +#include "../Common/LimitedStreams.h" +#include "../Common/ProgressUtils.h" +#include "../Common/RegisterArc.h" +#include "../Common/StreamUtils.h" + +#include "../Compress/CopyCoder.h" + +using namespace NWindows; + +#define Get16(p) GetBe16(p) +#define Get32(p) GetBe32(p) + +namespace NArchive { +namespace NRpm { + +/* Reference: lib/signature.h of rpm package */ +#define RPMSIG_NONE 0 /* Do not change! */ +/* The following types are no longer generated */ +#define RPMSIG_PGP262_1024 1 /* No longer generated */ /* 256 byte */ +/* These are the new-style signatures. They are Header structures. */ +/* Inside them we can put any number of any type of signature we like. */ + +#define RPMSIG_HEADERSIG 5 /* New Header style signature */ + +const UInt32 kLeadSize = 96; +struct CLead +{ + unsigned char Magic[4]; + unsigned char Major; // not supported ver1, only support 2,3 and lator + unsigned char Minor; + UInt16 Type; + UInt16 ArchNum; + char Name[66]; + UInt16 OSNum; + UInt16 SignatureType; + char Reserved[16]; // pad to 96 bytes -- 8 byte aligned + bool MagicCheck() const + { return Magic[0] == 0xed && Magic[1] == 0xab && Magic[2] == 0xee && Magic[3] == 0xdb; }; +}; + +const UInt32 kEntryInfoSize = 16; +/* +struct CEntryInfo +{ + int Tag; + int Type; + int Offset; // Offset from beginning of data segment, only defined on disk + int Count; +}; +*/ + +// case: SignatureType == RPMSIG_HEADERSIG +const UInt32 kCSigHeaderSigSize = 16; +struct CSigHeaderSig +{ + unsigned char Magic[4]; + UInt32 Reserved; + UInt32 IndexLen; // count of index entries + UInt32 DataLen; // number of bytes + bool MagicCheck() + { return Magic[0] == 0x8e && Magic[1] == 0xad && Magic[2] == 0xe8 && Magic[3] == 0x01; }; + UInt32 GetLostHeaderLen() + { return IndexLen * kEntryInfoSize + DataLen; }; +}; + +static HRESULT RedSigHeaderSig(IInStream *inStream, CSigHeaderSig &h) +{ + char dat[kCSigHeaderSigSize]; + char *cur = dat; + RINOK(ReadStream_FALSE(inStream, dat, kCSigHeaderSigSize)); + memcpy(h.Magic, cur, 4); + cur += 4; + cur += 4; + h.IndexLen = Get32(cur); + cur += 4; + h.DataLen = Get32(cur); + return S_OK; +} + +HRESULT OpenArchive(IInStream *inStream) +{ + UInt64 pos; + char leadData[kLeadSize]; + char *cur = leadData; + CLead lead; + RINOK(ReadStream_FALSE(inStream, leadData, kLeadSize)); + memcpy(lead.Magic, cur, 4); + cur += 4; + lead.Major = *cur++; + lead.Minor = *cur++; + lead.Type = Get16(cur); + cur += 2; + lead.ArchNum = Get16(cur); + cur += 2; + memcpy(lead.Name, cur, sizeof(lead.Name)); + cur += sizeof(lead.Name); + lead.OSNum = Get16(cur); + cur += 2; + lead.SignatureType = Get16(cur); + cur += 2; + + if (!lead.MagicCheck() || lead.Major < 3) + return S_FALSE; + + CSigHeaderSig sigHeader, header; + if (lead.SignatureType == RPMSIG_NONE) + { + ; + } + else if (lead.SignatureType == RPMSIG_PGP262_1024) + { + UInt64 pos; + RINOK(inStream->Seek(256, STREAM_SEEK_CUR, &pos)); + } + else if (lead.SignatureType == RPMSIG_HEADERSIG) + { + RINOK(RedSigHeaderSig(inStream, sigHeader)); + if (!sigHeader.MagicCheck()) + return S_FALSE; + UInt32 len = sigHeader.GetLostHeaderLen(); + RINOK(inStream->Seek(len, STREAM_SEEK_CUR, &pos)); + if ((pos % 8) != 0) + { + RINOK(inStream->Seek((pos / 8 + 1) * 8 - pos, + STREAM_SEEK_CUR, &pos)); + } + } + else + return S_FALSE; + + RINOK(RedSigHeaderSig(inStream, header)); + if (!header.MagicCheck()) + return S_FALSE; + int headerLen = header.GetLostHeaderLen(); + if (headerLen == -1) + return S_FALSE; + RINOK(inStream->Seek(headerLen, STREAM_SEEK_CUR, &pos)); + return S_OK; +} + +class CHandler: + public IInArchive, + public IInArchiveGetStream, + public CMyUnknownImp +{ + CMyComPtr _stream; + UInt64 _pos; + UInt64 _size; + Byte _sig[4]; +public: + MY_UNKNOWN_IMP2(IInArchive, IInArchiveGetStream) + INTERFACE_IInArchive(;) + STDMETHOD(GetStream)(UInt32 index, ISequentialInStream **stream); +}; + +STATPROPSTG kProps[] = +{ + { NULL, kpidSize, VT_UI8} +}; + +IMP_IInArchive_Props +IMP_IInArchive_ArcProps_NO_Table + +STDMETHODIMP CHandler::GetArchiveProperty(PROPID propID, PROPVARIANT *value) +{ + NCOM::CPropVariant prop; + switch(propID) { case kpidMainSubfile: prop = (UInt32)0; break; } + prop.Detach(value); + return S_OK; +} + +STDMETHODIMP CHandler::Open(IInStream *inStream, + const UInt64 * /* maxCheckStartPosition */, + IArchiveOpenCallback * /* openArchiveCallback */) +{ + COM_TRY_BEGIN + try + { + Close(); + if (OpenArchive(inStream) != S_OK) + return S_FALSE; + RINOK(inStream->Seek(0, STREAM_SEEK_CUR, &_pos)); + RINOK(ReadStream_FALSE(inStream, _sig, sizeof(_sig) / sizeof(_sig[0]))); + UInt64 endPosition; + RINOK(inStream->Seek(0, STREAM_SEEK_END, &endPosition)); + _size = endPosition - _pos; + _stream = inStream; + return S_OK; + } + catch(...) { return S_FALSE; } + COM_TRY_END +} + +STDMETHODIMP CHandler::Close() +{ + _stream.Release(); + return S_OK; +} + +STDMETHODIMP CHandler::GetNumberOfItems(UInt32 *numItems) +{ + *numItems = 1; + return S_OK; +} + +STDMETHODIMP CHandler::GetProperty(UInt32 /* index */, PROPID propID, PROPVARIANT *value) +{ + NWindows::NCOM::CPropVariant prop; + switch(propID) + { + case kpidSize: + case kpidPackSize: + prop = _size; + break; + case kpidExtension: + { + char s[32]; + MyStringCopy(s, "cpio."); + const char *ext; + if (_sig[0] == 0x1F && _sig[1] == 0x8B) + ext = "gz"; + else if (_sig[0] == 'B' && _sig[1] == 'Z' && _sig[2] == 'h') + ext = "bz2"; + else + ext = "lzma"; + MyStringCopy(s + MyStringLen(s), ext); + prop = s; + break; + } + } + prop.Detach(value); + return S_OK; +} + +STDMETHODIMP CHandler::Extract(const UInt32 *indices, UInt32 numItems, + Int32 testMode, IArchiveExtractCallback *extractCallback) +{ + COM_TRY_BEGIN + if (numItems == 0) + return S_OK; + if (numItems != (UInt32)-1 && (numItems != 1 || indices[0] != 0)) + return E_INVALIDARG; + + RINOK(extractCallback->SetTotal(_size)); + CMyComPtr outStream; + Int32 askMode = testMode ? + NExtract::NAskMode::kTest : + NExtract::NAskMode::kExtract; + RINOK(extractCallback->GetStream(0, &outStream, askMode)); + if (!testMode && !outStream) + return S_OK; + RINOK(extractCallback->PrepareOperation(askMode)); + + CMyComPtr copyCoder = new NCompress::CCopyCoder; + + CLocalProgress *lps = new CLocalProgress; + CMyComPtr progress = lps; + lps->Init(extractCallback, false); + + RINOK(_stream->Seek(_pos, STREAM_SEEK_SET, NULL)); + RINOK(copyCoder->Code(_stream, outStream, NULL, NULL, progress)); + outStream.Release(); + return extractCallback->SetOperationResult(NExtract::NOperationResult::kOK); + COM_TRY_END +} + +STDMETHODIMP CHandler::GetStream(UInt32 /* index */, ISequentialInStream **stream) +{ + COM_TRY_BEGIN + return CreateLimitedInStream(_stream, _pos, _size, stream); + COM_TRY_END +} + +static IInArchive *CreateArc() { return new NArchive::NRpm::CHandler; } + +static CArcInfo g_ArcInfo = + { L"Rpm", L"rpm", 0, 0xEB, { 0xED, 0xAB, 0xEE, 0xDB}, 4, false, CreateArc, 0 }; + +REGISTER_ARC(Rpm) + +}} diff --git a/CPP/7zip/Archive/SplitHandler.cpp b/CPP/7zip/Archive/SplitHandler.cpp new file mode 100644 index 0000000..5d84de4 --- /dev/null +++ b/CPP/7zip/Archive/SplitHandler.cpp @@ -0,0 +1,366 @@ +// SplitHandler.cpp + +#include "StdAfx.h" + +#include "Common/ComTry.h" +#include "Common/MyString.h" + +#include "Windows/PropVariant.h" + +#include "../Common/ProgressUtils.h" +#include "../Common/RegisterArc.h" + +#include "../Compress/CopyCoder.h" + +#include "Common/MultiStream.h" + +using namespace NWindows; + +namespace NArchive { +namespace NSplit { + +STATPROPSTG kProps[] = +{ + { NULL, kpidPath, VT_BSTR}, + { NULL, kpidSize, VT_UI8} +}; + +STATPROPSTG kArcProps[] = +{ + { NULL, kpidNumVolumes, VT_UI4} +}; + +class CHandler: + public IInArchive, + public IInArchiveGetStream, + public CMyUnknownImp +{ + UString _subName; + CObjectVector > _streams; + CRecordVector _sizes; + UInt64 _totalSize; +public: + MY_UNKNOWN_IMP2(IInArchive, IInArchiveGetStream) + INTERFACE_IInArchive(;) + STDMETHOD(GetStream)(UInt32 index, ISequentialInStream **stream); +}; + +IMP_IInArchive_Props +IMP_IInArchive_ArcProps + +STDMETHODIMP CHandler::GetArchiveProperty(PROPID propID, PROPVARIANT *value) +{ + NCOM::CPropVariant prop; + switch(propID) + { + case kpidMainSubfile: prop = (UInt32)0; break; + case kpidNumVolumes: prop = (UInt32)_streams.Size(); break; + } + prop.Detach(value); + return S_OK; +} + +struct CSeqName +{ + UString _unchangedPart; + UString _changedPart; + bool _splitStyle; + + UString GetNextName() + { + UString newName; + if (_splitStyle) + { + int i; + int numLetters = _changedPart.Length(); + for (i = numLetters - 1; i >= 0; i--) + { + wchar_t c = _changedPart[i]; + if (c == 'z') + { + c = 'a'; + newName = c + newName; + continue; + } + else if (c == 'Z') + { + c = 'A'; + newName = c + newName; + continue; + } + c++; + if ((c == 'z' || c == 'Z') && i == 0) + { + _unchangedPart += c; + wchar_t newChar = (c == 'z') ? L'a' : L'A'; + newName.Empty(); + numLetters++; + for (int k = 0; k < numLetters; k++) + newName += newChar; + break; + } + newName = c + newName; + i--; + for (; i >= 0; i--) + newName = _changedPart[i] + newName; + break; + } + } + else + { + int i; + int numLetters = _changedPart.Length(); + for (i = numLetters - 1; i >= 0; i--) + { + wchar_t c = _changedPart[i]; + if (c == L'9') + { + c = L'0'; + newName = c + newName; + if (i == 0) + newName = UString(L'1') + newName; + continue; + } + c++; + newName = c + newName; + i--; + for (; i >= 0; i--) + newName = _changedPart[i] + newName; + break; + } + } + _changedPart = newName; + return _unchangedPart + _changedPart; + } +}; + +STDMETHODIMP CHandler::Open(IInStream *stream, + const UInt64 * /* maxCheckStartPosition */, + IArchiveOpenCallback *openArchiveCallback) +{ + COM_TRY_BEGIN + Close(); + if (openArchiveCallback == 0) + return S_FALSE; + // try + { + CMyComPtr openVolumeCallback; + CMyComPtr openArchiveCallbackWrap = openArchiveCallback; + if (openArchiveCallbackWrap.QueryInterface(IID_IArchiveOpenVolumeCallback, + &openVolumeCallback) != S_OK) + return S_FALSE; + + UString name; + { + NCOM::CPropVariant prop; + RINOK(openVolumeCallback->GetProperty(kpidName, &prop)); + if (prop.vt != VT_BSTR) + return S_FALSE; + name = prop.bstrVal; + } + + int dotPos = name.ReverseFind('.'); + UString prefix, ext; + if (dotPos >= 0) + { + prefix = name.Left(dotPos + 1); + ext = name.Mid(dotPos + 1); + } + else + ext = name; + UString extBig = ext; + extBig.MakeUpper(); + + CSeqName seqName; + + int numLetters = 2; + bool splitStyle = false; + if (extBig.Right(2) == L"AA") + { + splitStyle = true; + while (numLetters < extBig.Length()) + { + if (extBig[extBig.Length() - numLetters - 1] != 'A') + break; + numLetters++; + } + } + else if (ext.Right(2) == L"01") + { + while (numLetters < extBig.Length()) + { + if (extBig[extBig.Length() - numLetters - 1] != '0') + break; + numLetters++; + } + if (numLetters != ext.Length()) + return S_FALSE; + } + else + return S_FALSE; + + _streams.Add(stream); + + seqName._unchangedPart = prefix + ext.Left(extBig.Length() - numLetters); + seqName._changedPart = ext.Right(numLetters); + seqName._splitStyle = splitStyle; + + if (prefix.Length() < 1) + _subName = L"file"; + else + _subName = prefix.Left(prefix.Length() - 1); + + _totalSize = 0; + UInt64 size; + { + NCOM::CPropVariant prop; + RINOK(openVolumeCallback->GetProperty(kpidSize, &prop)); + if (prop.vt != VT_UI8) + return E_INVALIDARG; + size = prop.uhVal.QuadPart; + } + _totalSize += size; + _sizes.Add(size); + + if (openArchiveCallback != NULL) + { + UInt64 numFiles = _streams.Size(); + RINOK(openArchiveCallback->SetCompleted(&numFiles, NULL)); + } + + for (;;) + { + UString fullName = seqName.GetNextName(); + CMyComPtr nextStream; + HRESULT result = openVolumeCallback->GetStream(fullName, &nextStream); + if (result == S_FALSE) + break; + if (result != S_OK) + return result; + if (!stream) + break; + { + NCOM::CPropVariant prop; + RINOK(openVolumeCallback->GetProperty(kpidSize, &prop)); + if (prop.vt != VT_UI8) + return E_INVALIDARG; + size = prop.uhVal.QuadPart; + } + _totalSize += size; + _sizes.Add(size); + _streams.Add(nextStream); + if (openArchiveCallback != NULL) + { + UInt64 numFiles = _streams.Size(); + RINOK(openArchiveCallback->SetCompleted(&numFiles, NULL)); + } + } + } + /* + catch(...) + { + return S_FALSE; + } + */ + return S_OK; + COM_TRY_END +} + +STDMETHODIMP CHandler::Close() +{ + _sizes.Clear(); + _streams.Clear(); + return S_OK; +} + +STDMETHODIMP CHandler::GetNumberOfItems(UInt32 *numItems) +{ + *numItems = _streams.IsEmpty() ? 0 : 1; + return S_OK; +} + +STDMETHODIMP CHandler::GetProperty(UInt32 /* index */, PROPID propID, PROPVARIANT *value) +{ + NWindows::NCOM::CPropVariant prop; + switch(propID) + { + case kpidPath: prop = _subName; break; + case kpidSize: + case kpidPackSize: + prop = _totalSize; + break; + } + prop.Detach(value); + return S_OK; +} + +STDMETHODIMP CHandler::Extract(const UInt32 *indices, UInt32 numItems, + Int32 testMode, IArchiveExtractCallback *extractCallback) +{ + COM_TRY_BEGIN + if (numItems == 0) + return S_OK; + if (numItems != (UInt32)-1 && (numItems != 1 || indices[0] != 0)) + return E_INVALIDARG; + + UInt64 currentTotalSize = 0; + RINOK(extractCallback->SetTotal(_totalSize)); + CMyComPtr outStream; + Int32 askMode = testMode ? + NExtract::NAskMode::kTest : + NExtract::NAskMode::kExtract; + RINOK(extractCallback->GetStream(0, &outStream, askMode)); + if (!testMode && !outStream) + return S_OK; + RINOK(extractCallback->PrepareOperation(askMode)); + + NCompress::CCopyCoder *copyCoderSpec = new NCompress::CCopyCoder; + CMyComPtr copyCoder = copyCoderSpec; + + CLocalProgress *lps = new CLocalProgress; + CMyComPtr progress = lps; + lps->Init(extractCallback, false); + + for (int i = 0; i < _streams.Size(); i++) + { + lps->InSize = lps->OutSize = currentTotalSize; + RINOK(lps->SetCur()); + IInStream *inStream = _streams[i]; + RINOK(inStream->Seek(0, STREAM_SEEK_SET, NULL)); + RINOK(copyCoder->Code(inStream, outStream, NULL, NULL, progress)); + currentTotalSize += copyCoderSpec->TotalSize; + } + outStream.Release(); + return extractCallback->SetOperationResult(NExtract::NOperationResult::kOK); + COM_TRY_END +} + +STDMETHODIMP CHandler::GetStream(UInt32 index, ISequentialInStream **stream) +{ + COM_TRY_BEGIN + if (index != 0) + return E_INVALIDARG; + *stream = 0; + CMultiStream *streamSpec = new CMultiStream; + CMyComPtr streamTemp = streamSpec; + for (int i = 0; i < _streams.Size(); i++) + { + CMultiStream::CSubStreamInfo subStreamInfo; + subStreamInfo.Stream = _streams[i]; + subStreamInfo.Size = _sizes[i]; + streamSpec->Streams.Add(subStreamInfo); + } + streamSpec->Init(); + *stream = streamTemp.Detach(); + return S_OK; + COM_TRY_END +} + +static IInArchive *CreateArc() { return new CHandler; } + +static CArcInfo g_ArcInfo = +{ L"Split", L"001", 0, 0xEA, { 0 }, 0, false, CreateArc, 0 }; + +REGISTER_ARC(Split) + +}} diff --git a/CPP/7zip/Archive/SquashfsHandler.cpp b/CPP/7zip/Archive/SquashfsHandler.cpp new file mode 100644 index 0000000..2cc1219 --- /dev/null +++ b/CPP/7zip/Archive/SquashfsHandler.cpp @@ -0,0 +1,2155 @@ +// SquashfsHandler.cpp + +#include "StdAfx.h" + +#include "../../../C/7zCrc.h" +#include "../../../C/Alloc.h" +#include "../../../C/CpuArch.h" + +#include "Common/ComTry.h" +#include "Common/IntToString.h" +#include "Common/StringConvert.h" + +#include "Windows/PropVariantUtils.h" +#include "Windows/Time.h" + +#include "../Common/LimitedStreams.h" +#include "../Common/ProgressUtils.h" +#include "../Common/RegisterArc.h" +#include "../Common/StreamObjects.h" +#include "../Common/StreamUtils.h" + +#include "../Compress/CopyCoder.h" +#include "../Compress/ZlibDecoder.h" +#include "../Compress/LzmaDecoder.h" + +namespace NArchive { +namespace NSquashfs { + +static const UInt32 kNumFilesMax = (1 << 28); +static const unsigned kNumDirLevelsMax = (1 << 10); + +// Layout: Header, Data, inodes, Directories, Fragments, UIDs, GIDs + +/* +#define Get16(p) (be ? GetBe16(p) : GetUi16(p)) +#define Get32(p) (be ? GetBe32(p) : GetUi32(p)) +#define Get64(p) (be ? GetBe64(p) : GetUi64(p)) +*/ + +UInt16 Get16b(const Byte *p, bool be) { return be ? GetBe16(p) : GetUi16(p); } +UInt32 Get32b(const Byte *p, bool be) { return be ? GetBe32(p) : GetUi32(p); } +UInt64 Get64b(const Byte *p, bool be) { return be ? GetBe64(p) : GetUi64(p); } + +#define Get16(p) Get16b(p, be) +#define Get32(p) Get32b(p, be) +#define Get64(p) Get64b(p, be) + +#define LE_16(offs, dest) dest = GetUi16(p + (offs)); +#define LE_32(offs, dest) dest = GetUi32(p + (offs)); +#define LE_64(offs, dest) dest = GetUi64(p + (offs)); + +#define GET_16(offs, dest) dest = Get16(p + (offs)); +#define GET_32(offs, dest) dest = Get32(p + (offs)); +#define GET_64(offs, dest) dest = Get64(p + (offs)); + +static const UInt32 kSignatureSize = 4; +#define SIGNATURE { 'h', 's', 'q', 's' } +static const UInt32 kSignature32_LE = 0x73717368; +static const UInt32 kSignature32_BE = 0x68737173; +static const UInt32 kSignature32_LZ = 0x71736873; + +#define kMethod_ZLIB 1 +#define kMethod_LZMA 2 +#define kMethod_LZO 3 + +static const char *k_Methods[] = +{ + "Unknown", + "ZLIB", + "LZMA", + "LZO" +}; + +static const UInt32 kMetadataBlockSizeLog = 13; +static const UInt32 kMetadataBlockSize = (1 << kMetadataBlockSizeLog); + +#define MY_S_IFIFO 0x1000 +#define MY_S_IFCHR 0x2000 +#define MY_S_IFDIR 0x4000 +#define MY_S_IFBLK 0x6000 +#define MY_S_IFREG 0x8000 +#define MY_S_IFLNK 0xA000 +#define MY_S_IFSOCK 0xC000 + +enum +{ + kType_IPC, + kType_DIR, + kType_FILE, + kType_LNK, + kType_BLK, + kType_CHR, + kType_FIFO, + kType_SOCK +}; + +static const UInt32 k_TypeToMode[] = +{ + 0, + MY_S_IFDIR, MY_S_IFREG, MY_S_IFLNK, MY_S_IFBLK, MY_S_IFCHR, MY_S_IFIFO, MY_S_IFSOCK, + MY_S_IFDIR, MY_S_IFREG, MY_S_IFLNK, MY_S_IFBLK, MY_S_IFCHR, MY_S_IFIFO, MY_S_IFSOCK +}; + + +enum +{ + kFlag_UNC_INODES, + kFlag_UNC_DATA, + kFlag_CHECK, + kFlag_UNC_FRAGS, + kFlag_NO_FRAGS, + kFlag_ALWAYS_FRAG, + kFlag_DUPLICATE, + kFlag_EXPORT +}; + +static const CUInt32PCharPair k_Flags[] = +{ + { kFlag_UNC_INODES, "UNCOMPRESSED_INODES" }, + { kFlag_UNC_DATA, "UNCOMPRESSED_DATA" }, + { kFlag_CHECK, "CHECK" }, + { kFlag_UNC_FRAGS, "UNCOMPRESSED_FRAGMENTS" }, + { kFlag_NO_FRAGS, "NO_FRAGMENTS" }, + { kFlag_ALWAYS_FRAG, "ALWAYS_FRAGMENTS" }, + { kFlag_DUPLICATE, "DUPLICATES_REMOVED" }, + { kFlag_EXPORT, "EXPORTABLE" } +}; + +static const UInt32 kNotCompressedBit16 = (1 << 15); +static const UInt32 kNotCompressedBit32 = (1 << 24); + +#define GET_COMPRESSED_BLOCK_SIZE(size) ((size) & ~kNotCompressedBit32) +#define IS_COMPRESSED_BLOCK(size) (((size) & kNotCompressedBit32) == 0) + +static const UInt32 kHeaderSize1 = 0x33; +static const UInt32 kHeaderSize2 = 0x3F; +static const UInt32 kHeaderSize3 = 0x77; +static const UInt32 kHeaderSize4 = 0x60; + +struct CHeader +{ + bool be; + bool SeveralMethods; + Byte NumUids; + Byte NumGids; + + UInt32 NumInodes; + UInt32 CTime; + UInt32 BlockSize; + UInt32 NumFrags; + UInt16 Method; + UInt16 BlockSizeLog; + UInt16 Flags; + UInt16 NumIDs; + UInt16 Major; + UInt16 Minor; + UInt64 RootInode; + UInt64 Size; + UInt64 UidTable; + UInt64 GidTable; + UInt64 XattrIdTable; + UInt64 InodeTable; + UInt64 DirTable; + UInt64 FragTable; + UInt64 LookupTable; + + void Parse3(const Byte *p) + { + Method = kMethod_ZLIB; + GET_32 (0x08, Size); + GET_32 (0x0C, UidTable); + GET_32 (0x10, GidTable); + GET_32 (0x14, InodeTable); + GET_32 (0x18, DirTable); + GET_16 (0x20, BlockSize); + GET_16 (0x22, BlockSizeLog); + Flags = p[0x24]; + NumUids = p[0x25]; + NumGids = p[0x26]; + GET_32 (0x27, CTime); + GET_64 (0x2B, RootInode); + NumFrags = 0; + FragTable = UidTable; + + if (Major >= 2) + { + GET_32 (0x33, BlockSize); + GET_32 (0x37, NumFrags); + GET_32 (0x3B, FragTable); + if (Major == 3) + { + GET_64 (0x3F, Size); + GET_64 (0x47, UidTable); + GET_64 (0x4F, GidTable); + GET_64 (0x57, InodeTable); + GET_64 (0x5F, DirTable); + GET_64 (0x67, FragTable); + GET_64 (0x6F, LookupTable); + } + } + } + + void Parse4(const Byte *p) + { + LE_32 (0x08, CTime); + LE_32 (0x0C, BlockSize); + LE_32 (0x10, NumFrags); + LE_16 (0x14, Method); + LE_16 (0x16, BlockSizeLog); + LE_16 (0x18, Flags); + LE_16 (0x1A, NumIDs); + LE_64 (0x20, RootInode); + LE_64 (0x28, Size); + LE_64 (0x30, UidTable); + LE_64 (0x38, XattrIdTable); + LE_64 (0x40, InodeTable); + LE_64 (0x48, DirTable); + LE_64 (0x50, FragTable); + LE_64 (0x58, LookupTable); + GidTable = 0; + } + + bool Parse(const Byte *p) + { + be = false; + SeveralMethods = false; + switch (GetUi32(p)) + { + case kSignature32_LE: break; + case kSignature32_BE: be = true; break; + case kSignature32_LZ: SeveralMethods = true; break; + default: return false; + } + GET_32 (4, NumInodes); + GET_16 (0x1C, Major); + GET_16 (0x1E, Minor); + if (Major <= 3) + Parse3(p); + else + { + if (be) + return false; + Parse4(p); + } + return + InodeTable < DirTable && + DirTable <= FragTable && + FragTable <= Size && + UidTable <= Size && + BlockSizeLog >= 12 && + BlockSizeLog < 31 && + BlockSize == ((UInt32)1 << BlockSizeLog); + } + + bool IsSupported() const { return Major > 0 && Major <= 4 && BlockSizeLog <= 23; } + bool IsOldVersion() const { return Major < 4; } + bool NeedCheckData() const { return (Flags & (1 << kFlag_CHECK)) != 0; } + unsigned GetFileNameOffset() const { return Major <= 2 ? 3 : (Major == 3 ? 5 : 8); } + unsigned GetSymLinkOffset() const { return Major <= 1 ? 5: (Major <= 2 ? 6: (Major == 3 ? 18 : 24)); } + unsigned GetSpecGuidIndex() const { return Major <= 1 ? 0xF: 0xFF; } +}; + +static const UInt32 kFrag_Empty = (UInt32)(Int32)-1; +// static const UInt32 kXattr_Empty = (UInt32)(Int32)-1; + +struct CNode +{ + UInt16 Type; + UInt16 Mode; + UInt16 Uid; + UInt16 Gid; + UInt32 Frag; + UInt32 Offset; + // UInt32 MTime; + // UInt32 Number; + // UInt32 NumLinks; + // UInt32 RDev; + // UInt32 Xattr; + // UInt32 Parent; + + UInt64 FileSize; + UInt64 StartBlock; + // UInt64 Sparse; + + UInt32 Parse1(const Byte *p, UInt32 size, const CHeader &_h); + UInt32 Parse2(const Byte *p, UInt32 size, const CHeader &_h); + UInt32 Parse3(const Byte *p, UInt32 size, const CHeader &_h); + UInt32 Parse4(const Byte *p, UInt32 size, const CHeader &_h); + + bool IsDir() const { return (Type == kType_DIR || Type == kType_DIR + 7); } + bool IsLink() const { return (Type == kType_LNK || Type == kType_LNK + 7); } + UInt64 GetSize() const { return IsDir() ? 0 : FileSize; } + + bool ThereAreFrags() const { return Frag != kFrag_Empty; } + UInt64 GetNumBlocks(const CHeader &_h) const + { + return (FileSize >> _h.BlockSizeLog) + + (!ThereAreFrags() && (FileSize & (_h.BlockSize - 1)) != 0); + } +}; + +UInt32 CNode::Parse1(const Byte *p, UInt32 size, const CHeader &_h) +{ + bool be = _h.be; + if (size < 4) + return 0; + UInt16 t = Get16(p); + if (be) + { + Type = t >> 12; + Mode = t & 0xFFF; + Uid = p[2] >> 4; + Gid = p[2] & 0xF; + } + else + { + Type = t & 0xF; + Mode = t >> 4; + Uid = p[2] & 0xF; + Gid = p[2] >> 4; + } + + // Xattr = kXattr_Empty; + // MTime = 0; + FileSize = 0; + StartBlock = 0; + Frag = kFrag_Empty; + + if (Type == 0) + { + Byte t = p[3]; + if (be) + { + Type = t >> 4; + Offset = t & 0xF; + } + else + { + Type = t & 0xF; + Offset = t >> 4; + } + return (Type == kType_FIFO || Type == kType_SOCK) ? 4 : 0; + } + + Type--; + Uid += (Type / 5) * 16; + Type = (Type % 5) + 1; + + if (Type == kType_FILE) + { + if (size < 15) + return 0; + // GET_32 (3, MTime); + GET_32 (7, StartBlock); + UInt32 t; + GET_32 (11, t); + FileSize = t; + UInt32 numBlocks = t >> _h.BlockSizeLog; + if ((t & (_h.BlockSize - 1)) != 0) + numBlocks++; + UInt32 pos = numBlocks * 2 + 15; + return (pos <= size) ? pos : 0; + } + + if (Type == kType_DIR) + { + if (size < 14) + return 0; + UInt32 t = Get32(p + 3); + if (be) + { + FileSize = t >> 13; + Offset = t & 0x1FFF; + } + else + { + FileSize = t & 0x7FFFF; + Offset = t >> 19; + } + // GET_32 (7, MTime); + GET_32 (10, StartBlock); + if (be) + StartBlock &= 0xFFFFFF; + else + StartBlock >>= 8; + return 14; + } + + if (size < 5) + return 0; + + if (Type == kType_LNK) + { + UInt32 len; + GET_16 (3, len); + FileSize = len; + len += 5; + return (len <= size) ? len : 0; + } + + // GET_32 (3, RDev); + return 5; +} + +UInt32 CNode::Parse2(const Byte *p, UInt32 size, const CHeader &_h) +{ + bool be = _h.be; + if (size < 4) + return 0; + UInt16 t = Get16(p); + if (be) + { + Type = t >> 12; + Mode = t & 0xFFF; + } + else + { + Type = t & 0xF; + Mode = t >> 4; + } + Uid = p[2]; + Gid = p[3]; + + // Xattr = kXattr_Empty; + + if (Type == kType_FILE) + { + if (size < 24) + return 0; + // GET_32 (4, MTime); + GET_32 (8, StartBlock); + GET_32 (12, Frag); + GET_32 (16, Offset); + UInt32 t; + GET_32 (20, t); + FileSize = t; + UInt32 numBlocks = t >> _h.BlockSizeLog; + if (!ThereAreFrags() && (t & (_h.BlockSize - 1)) != 0) + numBlocks++; + UInt32 pos = numBlocks * 4 + 24; + return (pos <= size) ? (UInt32)pos : 0; + } + + FileSize = 0; + // MTime = 0; + StartBlock = 0; + Frag = kFrag_Empty; + + if (Type == kType_DIR) + { + if (size < 15) + return 0; + UInt32 t = Get32(p + 4); + if (be) + { + FileSize = t >> 13; + Offset = t & 0x1FFF; + } + else + { + FileSize = t & 0x7FFFF; + Offset = t >> 19; + } + // GET_32 (8, MTime); + GET_32 (11, StartBlock); + if (be) + StartBlock &= 0xFFFFFF; + else + StartBlock >>= 8; + return 15; + } + + if (Type == kType_DIR + 7) + { + if (size < 18) + return 0; + UInt32 t = Get32(p + 4); + UInt32 t2 = Get16(p + 7); + if (be) + { + FileSize = t >> 5; + Offset = t2 & 0x1FFF; + } + else + { + FileSize = t & 0x7FFFFFF; + Offset = t2 >> 3; + } + // GET_32 (9, MTime); + GET_32 (12, StartBlock); + if (be) + StartBlock &= 0xFFFFFF; + else + StartBlock >>= 8; + UInt32 iCount; + GET_16 (16, iCount); + UInt32 pos = 18; + for (UInt32 i = 0; i < iCount; i++) + { + // 27 bits: index + // 29 bits: startBlock + if (pos + 8 > size) + return 0; + pos += 8 + (UInt32)p[pos + 7] + 1; // nameSize + if (pos > size) + return 0; + } + return pos; + } + + if (Type == kType_FIFO || Type == kType_SOCK) + return 4; + + if (size < 6) + return 0; + + if (Type == kType_LNK) + { + UInt32 len; + GET_16 (4, len); + FileSize = len; + len += 6; + return (len <= size) ? len : 0; + } + + if (Type == kType_BLK || Type == kType_CHR) + { + // GET_16 (4, RDev); + return 6; + } + + return 0; +} + +UInt32 CNode::Parse3(const Byte *p, UInt32 size, const CHeader &_h) +{ + bool be = _h.be; + if (size < 12) + return 0; + UInt16 t = Get16(p); + if (be) + { + Type = t >> 12; + Mode = t & 0xFFF; + } + else + { + Type = t & 0xF; + Mode = t >> 4; + } + Uid = p[2]; + Gid = p[3]; + // GET_32 (4, MTime); + // GET_32 (8, Number); + // Xattr = kXattr_Empty; + FileSize = 0; + StartBlock = 0; + + if (Type == kType_FILE || Type == kType_FILE + 7) + { + UInt32 offset; + if (Type == kType_FILE) + { + if (size < 32) + return 0; + GET_64 (12, StartBlock); + GET_32 (20, Frag); + GET_32 (24, Offset); + GET_32 (28, FileSize); + offset = 32; + } + else + { + if (size < 40) + return 0; + // GET_32 (12, NumLinks); + GET_64 (16, StartBlock); + GET_32 (24, Frag); + GET_32 (28, Offset); + GET_64 (32, FileSize); + offset = 40; + } + UInt64 pos = GetNumBlocks(_h) * 4 + offset; + return (pos <= size) ? (UInt32)pos : 0; + } + + if (size < 16) + return 0; + // GET_32 (12, NumLinks); + + if (Type == kType_DIR) + { + if (size < 28) + return 0; + UInt32 t = Get32(p + 16); + if (be) + { + FileSize = t >> 13; + Offset = t & 0x1FFF; + } + else + { + FileSize = t & 0x7FFFF; + Offset = t >> 19; + } + GET_32 (20, StartBlock); + // GET_32 (24, Parent); + return 28; + } + + if (Type == kType_DIR + 7) + { + if (size < 31) + return 0; + UInt32 t = Get32(p + 16); + UInt32 t2 = Get16(p + 19); + if (be) + { + FileSize = t >> 5; + Offset = t2 & 0x1FFF; + } + else + { + FileSize = t & 0x7FFFFFF; + Offset = t2 >> 3; + } + GET_32 (21, StartBlock); + UInt32 iCount; + GET_16 (25, iCount); + // GET_32 (27, Parent); + UInt32 pos = 31; + for (UInt32 i = 0; i < iCount; i++) + { + // UInt32 index + // UInt32 startBlock + if (pos + 9 > size) + return 0; + pos += 9 + (unsigned)p[pos + 8] + 1; // nameSize + if (pos > size) + return 0; + } + return pos; + } + + if (Type == kType_FIFO || Type == kType_SOCK) + return 16; + + if (size < 18) + return 0; + if (Type == kType_LNK) + { + UInt32 len; + GET_16 (16, len); + FileSize = len; + len += 18; + return (len <= size) ? len : 0; + } + + if (Type == kType_BLK || Type == kType_CHR) + { + // GET_16 (16, RDev); + return 18; + } + + return 0; +} + +UInt32 CNode::Parse4(const Byte *p, UInt32 size, const CHeader &_h) +{ + if (size < 20) + return 0; + LE_16 (0, Type); + LE_16 (2, Mode); + LE_16 (4, Uid); + LE_16 (6, Gid); + // LE_32 (8, MTime); + // LE_32 (12, Number); + + // Xattr = kXattr_Empty; + FileSize = 0; + StartBlock = 0; + + if (Type == kType_FILE || Type == kType_FILE + 7) + { + UInt32 offset; + if (Type == kType_FILE) + { + if (size < 32) + return 0; + LE_32 (16, StartBlock); + LE_32 (20, Frag); + LE_32 (24, Offset); + LE_32 (28, FileSize); + offset = 32; + } + else + { + if (size < 56) + return 0; + LE_64 (16, StartBlock); + LE_64 (24, FileSize); + // LE_64 (32, Sparse); + // LE_32 (40, NumLinks); + LE_32 (44, Frag); + LE_32 (48, Offset); + // LE_32 (52, Xattr); + offset = 56; + } + UInt64 pos = GetNumBlocks(_h) * 4 + offset; + return (pos <= size) ? (UInt32)pos : 0; + } + + if (Type == kType_DIR) + { + if (size < 32) + return 0; + LE_32 (16, StartBlock); + // LE_32 (20, NumLinks); + LE_16 (24, FileSize); + LE_16 (26, Offset); + // LE_32 (28, Parent); + return 32; + } + + // LE_32 (16, NumLinks); + + if (Type == kType_DIR + 7) + { + if (size < 40) + return 0; + LE_32 (20, FileSize); + LE_32 (24, StartBlock); + // LE_32 (28, Parent); + UInt32 iCount; + LE_16 (32, iCount); + LE_16 (34, Offset); + // LE_32 (36, Xattr); + + UInt32 pos = 40; + for (UInt32 i = 0; i < iCount; i++) + { + // UInt32 index + // UInt32 startBlock + if (pos + 12 > size) + return 0; + UInt32 nameLen = GetUi32(p + pos + 8); + pos += 12 + nameLen + 1; + if (pos > size || nameLen > (1 << 10)) + return 0; + } + return pos; + } + + unsigned offset = 20; + switch(Type) + { + case kType_FIFO: case kType_FIFO + 7: + case kType_SOCK: case kType_SOCK + 7: + break; + case kType_LNK: case kType_LNK + 7: + { + if (size < 24) + return 0; + UInt32 len; + LE_32 (20, len); + FileSize = len; + offset = len + 24; + if (size < offset || len > (1 << 30)) + return 0; + break; + } + case kType_BLK: case kType_BLK + 7: + case kType_CHR: case kType_CHR + 7: + if (size < 24) + return 0; + // LE_32 (20, RDev); + offset = 24; + break; + default: + return 0; + } + + if (Type >= 8) + { + if (size < offset + 4) + return 0; + // LE_32 (offset, Xattr); + offset += 4; + } + return offset; +} + +struct CItem +{ + int Node; + int Parent; + UInt32 Ptr; +}; + +struct CData +{ + CByteBuffer Data; + CRecordVector PackPos; + CRecordVector UnpackPos; // additional item at the end contains TotalUnpackSize + + UInt32 GetNumBlocks() const { return PackPos.Size(); } + void Clear() + { + Data.Free(); + PackPos.Clear(); + UnpackPos.Clear(); + } +}; + +struct CFrag +{ + UInt64 StartBlock; + UInt32 Size; +}; + +class CHandler: + public IInArchive, + public IInArchiveGetStream, + public CMyUnknownImp +{ + CRecordVector _items; + CRecordVector _nodes; + CRecordVector _nodesPos; + CRecordVector _blockToNode; + CData _inodesData; + CData _dirs; + CRecordVector _frags; + // CByteBuffer _uids; + // CByteBuffer _gids; + CHeader _h; + + CMyComPtr _stream; + UInt64 _sizeCalculated; + + IArchiveOpenCallback *_openCallback; + + int _nodeIndex; + CRecordVector _blockCompressed; + CRecordVector _blockOffsets; + + CByteBuffer _cachedBlock; + UInt64 _cachedBlockStartPos; + UInt32 _cachedPackBlockSize; + UInt32 _cachedUnpackBlockSize; + + CLimitedSequentialInStream *_limitedInStreamSpec; + CMyComPtr _limitedInStream; + + CBufPtrSeqOutStream *_outStreamSpec; + CMyComPtr _outStream; + + NCompress::NLzma::CDecoder *_lzmaDecoderSpec; + CMyComPtr _lzmaDecoder; + + NCompress::NZlib::CDecoder *_zlibDecoderSpec; + CMyComPtr _zlibDecoder; + + CByteBuffer _inputBuffer; + + CDynBufSeqOutStream *_dynOutStreamSpec; + CMyComPtr _dynOutStream; + + void ClearCache() + { + _cachedBlockStartPos = 0; + _cachedPackBlockSize = 0; + _cachedUnpackBlockSize = 0; + } + + HRESULT Decompress(ISequentialOutStream *outStream, Byte *outBuf, bool *outBufWasWritten, UInt32 *outBufWasWrittenSize, + UInt32 inSize, UInt32 outSizeMax); + HRESULT ReadMetadataBlock(UInt32 &packSize); + HRESULT ReadData(CData &data, UInt64 start, UInt64 end); + + HRESULT OpenDir(int parent, UInt32 startBlock, UInt32 offset, unsigned level, int &nodeIndex); + HRESULT ScanInodes(UInt64 ptr); + // HRESULT ReadUids(UInt64 start, UInt32 num, CByteBuffer &ids); + HRESULT Open2(IInStream *inStream); + AString GetPath(int index) const; + bool GetPackSize(int index, UInt64 &res, bool fillOffsets); + +public: + CHandler(); + MY_UNKNOWN_IMP2(IInArchive, IInArchiveGetStream) + INTERFACE_IInArchive(;) + STDMETHOD(GetStream)(UInt32 index, ISequentialInStream **stream); + + HRESULT ReadBlock(UInt64 blockIndex, Byte *dest, size_t blockSize); +}; + +CHandler::CHandler() +{ + _limitedInStreamSpec = new CLimitedSequentialInStream; + _limitedInStream = _limitedInStreamSpec; + + _outStreamSpec = new CBufPtrSeqOutStream(); + _outStream = _outStreamSpec; + + _dynOutStreamSpec = new CDynBufSeqOutStream; + _dynOutStream = _dynOutStreamSpec; +} + +static const STATPROPSTG kProps[] = +{ + { NULL, kpidPath, VT_BSTR}, + { NULL, kpidIsDir, VT_BOOL}, + { NULL, kpidSize, VT_UI8}, + { NULL, kpidPackSize, VT_UI8}, + { NULL, kpidMTime, VT_FILETIME}, + { NULL, kpidPosixAttrib, VT_UI4} + // { NULL, kpidUser, VT_BSTR}, + // { NULL, kpidGroup, VT_BSTR}, + // { NULL, kpidLinks, VT_UI4}, + // { NULL, kpidOffset, VT_UI4} +}; + +static const STATPROPSTG kArcProps[] = +{ + { NULL, kpidFileSystem, VT_BSTR}, + { NULL, kpidMethod, VT_BSTR}, + { NULL, kpidBlock, VT_UI4}, + { NULL, kpidPhySize, VT_UI8}, + { NULL, kpidHeadersSize, VT_UI8}, + { NULL, kpidBigEndian, VT_BOOL}, + { NULL, kpidCTime, VT_FILETIME}, + { NULL, kpidCharacts, VT_BSTR} + // { NULL, kpidNumBlocks, VT_UI4} +}; + +IMP_IInArchive_Props +IMP_IInArchive_ArcProps + +static HRESULT LzoDecode(Byte *dest, SizeT *destLen, const Byte *src, SizeT *srcLen) +{ + SizeT destRem = *destLen; + SizeT srcRem = *srcLen; + *destLen = 0; + *srcLen = 0; + const Byte *destStart = dest; + const Byte *srcStart = src; + unsigned mode = 2; + + { + if (srcRem == 0) + return S_FALSE; + UInt32 b = *src; + if (b > 17) + { + src++; + srcRem--; + b -= 17; + mode = (b < 4 ? 0 : 1); + if (b > srcRem || b > destRem) + return S_FALSE; + srcRem -= b; + destRem -= b; + do + *dest++ = *src++; + while (--b); + } + } + + for (;;) + { + if (srcRem < 3) + return S_FALSE; + UInt32 b = *src++; + srcRem--; + UInt32 len, back; + if (b >= 64) + { + srcRem--; + back = ((b >> 2) & 7) + ((UInt32)*src++ << 3); + len = (b >> 5) + 1; + } + else if (b < 16) + { + if (mode == 2) + { + if (b == 0) + { + for (b = 15;; b += 255) + { + if (srcRem == 0) + return S_FALSE; + UInt32 b2 = *src++; + srcRem--; + if (b2 != 0) + { + b += b2; + break; + } + } + } + b += 3; + if (b > srcRem || b > destRem) + return S_FALSE; + srcRem -= b; + destRem -= b; + mode = 1; + do + *dest++ = *src++; + while (--b); + continue; + } + srcRem--; + back = (b >> 2) + (*src++ << 2); + len = 2; + if (mode == 1) + { + back += (1 << 11); + len = 3; + } + } + else + { + UInt32 bOld = b; + b = (b < 32 ? 7 : 31); + len = bOld & b; + if (len == 0) + { + for (len = b;; len += 255) + { + if (srcRem == 0) + return S_FALSE; + UInt32 b2 = *src++; + srcRem--; + if (b2 != 0) + { + len += b2; + break; + } + } + } + len += 2; + if (srcRem < 2) + return S_FALSE; + b = *src; + back = (b >> 2) + ((UInt32)src[1] << 6); + src += 2; + srcRem -= 2; + if (bOld < 32) + { + if (back == 0) + { + *destLen = dest - destStart; + *srcLen = src - srcStart; + return S_OK; + } + back += ((bOld & 8) << 11) + (1 << 14) - 1; + } + } + back++; + if (len > destRem || (size_t)(dest - destStart) < back) + return S_FALSE; + destRem -= len; + Byte *destTemp = dest - back; + dest += len; + do + { + *(destTemp + back) = *destTemp; + destTemp++; + } + while (--len); + b &= 3; + if (b == 0) + { + mode = 2; + continue; + } + if (b > srcRem || b > destRem) + return S_FALSE; + srcRem -= b; + destRem -= b; + mode = 0; + *dest++ = *src++; + if (b > 1) + { + *dest++ = *src++; + if (b > 2) + *dest++ = *src++; + } + } +} + +HRESULT CHandler::Decompress(ISequentialOutStream *outStream, Byte *outBuf, bool *outBufWasWritten, UInt32 *outBufWasWrittenSize, UInt32 inSize, UInt32 outSizeMax) +{ + if (outBuf) + { + *outBufWasWritten = false; + *outBufWasWrittenSize = 0; + } + UInt32 method = _h.Method; + if (_h.SeveralMethods) + { + Byte props[1]; + RINOK(ReadStream_FALSE(_stream, props, 1)); + method = (props[0] == 0x5D ? kMethod_LZMA : kMethod_ZLIB); + RINOK(_stream->Seek(-1, STREAM_SEEK_CUR, NULL)); + } + + if (method == kMethod_LZO) + { + if (_inputBuffer.GetCapacity() < inSize) + { + _inputBuffer.Free(); + _inputBuffer.SetCapacity(inSize); + } + RINOK(ReadStream_FALSE(_stream, _inputBuffer, inSize)); + + Byte *dest = outBuf; + if (!outBuf) + { + dest = _dynOutStreamSpec->GetBufPtrForWriting(outSizeMax); + if (!dest) + return E_OUTOFMEMORY; + } + SizeT destLen = outSizeMax, srcLen = inSize; + RINOK(LzoDecode(dest, &destLen, _inputBuffer, &srcLen)); + if (inSize != srcLen) + return S_FALSE; + if (outBuf) + { + *outBufWasWritten = true; + *outBufWasWrittenSize = (UInt32)destLen; + } + else + _dynOutStreamSpec->UpdateSize(destLen); + } + else if (method == kMethod_LZMA) + { + if (!_lzmaDecoder) + { + _lzmaDecoderSpec = new NCompress::NLzma::CDecoder(); + _lzmaDecoderSpec->FinishStream = true; + _lzmaDecoder = _lzmaDecoderSpec; + } + const UInt32 kPropsSize = 5 + 8; + Byte props[kPropsSize]; + ReadStream_FALSE(_limitedInStream, props, kPropsSize); + RINOK(_lzmaDecoderSpec->SetDecoderProperties2(props, 5)); + UInt64 outSize = GetUi64(props + 5); + if (outSize > outSizeMax) + return S_FALSE; + RINOK(_lzmaDecoder->Code(_limitedInStream, outStream, NULL, &outSize, NULL)); + if (inSize != kPropsSize + _lzmaDecoderSpec->GetInputProcessedSize()) + return S_FALSE; + } + else + { + if (!_zlibDecoder) + { + _zlibDecoderSpec = new NCompress::NZlib::CDecoder(); + _zlibDecoder = _zlibDecoderSpec; + } + RINOK(_zlibDecoder->Code(_limitedInStream, outStream, NULL, NULL, NULL)); + if (inSize != _zlibDecoderSpec->GetInputProcessedSize()) + return S_FALSE; + } + return S_OK; +} + +HRESULT CHandler::ReadMetadataBlock(UInt32 &packSize) +{ + Byte temp[3]; + unsigned offset = _h.NeedCheckData() ? 3 : 2; + if (offset > packSize) + return S_FALSE; + RINOK(ReadStream_FALSE(_stream, temp, offset)); + // if (NeedCheckData && Major < 4) checkByte must be = 0xFF + bool be = _h.be; + UInt32 size = Get16(temp); + bool isCompressed = ((size & kNotCompressedBit16) == 0); + if (size != kNotCompressedBit16) + size &= ~kNotCompressedBit16; + + if (size > kMetadataBlockSize || offset + size > packSize) + return S_FALSE; + packSize = offset + size; + if (isCompressed) + { + _limitedInStreamSpec->Init(size); + RINOK(Decompress(_dynOutStream, NULL, NULL, NULL, size, kMetadataBlockSize)); + } + else + { + // size != 0 here + Byte *buf = _dynOutStreamSpec->GetBufPtrForWriting(size); + if (!buf) + return E_OUTOFMEMORY; + RINOK(ReadStream_FALSE(_stream, buf, size)); + _dynOutStreamSpec->UpdateSize(size); + } + return S_OK; +} + +HRESULT CHandler::ReadData(CData &data, UInt64 start, UInt64 end) +{ + if (end < start || end - start >= ((UInt64)1 << 32)) + return S_FALSE; + UInt32 size = (UInt32)(end - start); + RINOK(_stream->Seek(start, STREAM_SEEK_SET, NULL)); + _dynOutStreamSpec->Init(); + UInt32 packPos = 0; + while (packPos != size) + { + data.PackPos.Add(packPos); + data.UnpackPos.Add((UInt32)_dynOutStreamSpec->GetSize()); + if (packPos > size) + return S_FALSE; + UInt32 packSize = size - packPos; + RINOK(ReadMetadataBlock(packSize)); + if (_dynOutStreamSpec->GetSize() >= ((UInt64)1 << 32)) + return S_FALSE; + packPos += packSize; + } + data.UnpackPos.Add((UInt32)_dynOutStreamSpec->GetSize()); + _dynOutStreamSpec->CopyToBuffer(data.Data); + return S_OK; +} + +struct CTempItem +{ + UInt32 StartBlock; + // UInt32 iNodeNumber1; + UInt32 Offset; + // UInt16 iNodeNumber2; + UInt16 Type; +}; + +HRESULT CHandler::OpenDir(int parent, UInt32 startBlock, UInt32 offset, unsigned level, int &nodeIndex) +{ + if (level > kNumDirLevelsMax) + return S_FALSE; + + int blockIndex = _inodesData.PackPos.FindInSorted(startBlock); + if (blockIndex < 0) + return S_FALSE; + UInt32 unpackPos = _inodesData.UnpackPos[blockIndex] + offset; + if (unpackPos < offset) + return S_FALSE; + + nodeIndex = _nodesPos.FindInSorted(unpackPos, _blockToNode[blockIndex], _blockToNode[blockIndex + 1]); + // nodeIndex = _nodesPos.FindInSorted(unpackPos); + if (nodeIndex < 0) + return S_FALSE; + + const CNode &n = _nodes[nodeIndex]; + if (!n.IsDir()) + return S_OK; + blockIndex = _dirs.PackPos.FindInSorted((UInt32)n.StartBlock); + if (blockIndex < 0) + return S_FALSE; + unpackPos = _dirs.UnpackPos[blockIndex] + n.Offset; + if (unpackPos < n.Offset || unpackPos > _dirs.Data.GetCapacity()) + return S_FALSE; + + UInt32 rem = (UInt32)_dirs.Data.GetCapacity() - unpackPos; + const Byte *p = _dirs.Data + unpackPos; + UInt32 fileSize = (UInt32)n.FileSize; + + if (fileSize > rem) + return S_FALSE; + rem = fileSize; + if (_h.Major >= 3) + { + if (rem < 3) + return S_FALSE; + rem -= 3; + } + + CRecordVector tempItems; + while (rem != 0) + { + bool be = _h.be; + UInt32 count; + CTempItem tempItem; + if (_h.Major <= 2) + { + if (rem < 4) + return S_FALSE; + count = p[0]; + tempItem.StartBlock = Get32(p); + if (be) + tempItem.StartBlock &= 0xFFFFFF; + else + tempItem.StartBlock >>= 8; + p += 4; + rem -= 4; + } + else + { + if (_h.Major == 3) + { + if (rem < 9) + return S_FALSE; + count = p[0]; + p += 1; + rem -= 1; + } + else + { + if (rem < 12) + return S_FALSE; + count = GetUi32(p); + p += 4; + rem -= 4; + } + GET_32 (0, tempItem.StartBlock); + // GET_32 (4, tempItem.iNodeNumber1); + p += 8; + rem -= 8; + } + count++; + + for (UInt32 i = 0; i < count; i++) + { + if (rem == 0) + return S_FALSE; + + UInt32 nameOffset = _h.GetFileNameOffset(); + if (rem < nameOffset) + return S_FALSE; + + if ((UInt32)_items.Size() >= kNumFilesMax) + return S_FALSE; + if (_openCallback) + { + UInt64 numFiles = _items.Size(); + if ((numFiles & 0xFFFF) == 0) + { + RINOK(_openCallback->SetCompleted(&numFiles, NULL)); + } + } + + CItem item; + item.Ptr = (UInt32)(p - _dirs.Data); + + UInt32 size; + if (_h.IsOldVersion()) + { + UInt32 t = Get16(p); + if (be) + { + tempItem.Offset = t >> 3; + tempItem.Type = (UInt16)(t & 0x7); + } + else + { + tempItem.Offset = t & 0x1FFF; + tempItem.Type = (UInt16)(t >> 13); + } + size = (UInt32)p[2]; + /* + if (_h.Major > 2) + tempItem.iNodeNumber2 = Get16(p + 3); + */ + } + else + { + GET_16 (0, tempItem.Offset); + // GET_16 (2, tempItem.iNodeNumber2); + GET_16 (4, tempItem.Type); + GET_16 (6, size); + } + p += nameOffset; + rem -= nameOffset; + size++; + if (rem < size) + return S_FALSE; + p += size; + rem -= size; + item.Parent = parent; + _items.Add(item); + tempItems.Add(tempItem); + } + } + + int startItemIndex = _items.Size() - tempItems.Size(); + for (int i = 0; i < tempItems.Size(); i++) + { + const CTempItem &tempItem = tempItems[i]; + int index = startItemIndex + i; + CItem &item = _items[index]; + RINOK(OpenDir(index, tempItem.StartBlock, tempItem.Offset, level + 1, item.Node)); + } + + return S_OK; +} + +/* +HRESULT CHandler::ReadUids(UInt64 start, UInt32 num, CByteBuffer &ids) +{ + size_t size = num * 4; + ids.SetCapacity(size); + RINOK(_stream->Seek(start, STREAM_SEEK_SET, NULL)); + return ReadStream_FALSE(_stream, ids, size); +} +*/ + +HRESULT CHandler::Open2(IInStream *inStream) +{ + { + Byte buf[kHeaderSize3]; + RINOK(ReadStream_FALSE(inStream, buf, kHeaderSize3)); + if (!_h.Parse(buf)) + return S_FALSE; + if (!_h.IsSupported()) + return E_NOTIMPL; + + switch (_h.Method) + { + case kMethod_ZLIB: + case kMethod_LZMA: + case kMethod_LZO: + break; + default: + return E_NOTIMPL; + } + } + + _stream = inStream; + + if (_h.NumFrags != 0) + { + if (_h.NumFrags > kNumFilesMax) + return S_FALSE; + _frags.Reserve(_h.NumFrags); + CByteBuffer data; + unsigned bigFrag = (_h.Major > 2); + + unsigned fragPtrsInBlockLog = kMetadataBlockSizeLog - (3 + bigFrag); + UInt32 numBlocks = (_h.NumFrags + (1 << fragPtrsInBlockLog) - 1) >> fragPtrsInBlockLog; + size_t numBlocksBytes = (size_t)numBlocks << (2 + bigFrag); + data.SetCapacity(numBlocksBytes); + RINOK(inStream->Seek(_h.FragTable, STREAM_SEEK_SET, NULL)); + RINOK(ReadStream_FALSE(inStream, data, numBlocksBytes)); + bool be = _h.be; + + for (UInt32 i = 0; i < numBlocks; i++) + { + UInt64 offset = bigFrag ? Get64(data + i * 8) : Get32(data + i * 4); + RINOK(_stream->Seek(offset, STREAM_SEEK_SET, NULL)); + _dynOutStreamSpec->Init(); + UInt32 packSize = kMetadataBlockSize + 3; + RINOK(ReadMetadataBlock(packSize)); + UInt32 unpackSize = (UInt32)_dynOutStreamSpec->GetSize(); + if (unpackSize != kMetadataBlockSize) + if (i != numBlocks - 1 || unpackSize != ((_h.NumFrags << (3 + bigFrag)) & (kMetadataBlockSize - 1))) + return S_FALSE; + const Byte *buf = _dynOutStreamSpec->GetBuffer(); + for (UInt32 j = 0; j < kMetadataBlockSize && j < unpackSize;) + { + CFrag frag; + if (bigFrag) + { + frag.StartBlock = Get64(buf + j); + frag.Size = Get32(buf + j + 8); + // some archives contain nonzero in unused (buf + j + 12) + j += 16; + } + else + { + frag.StartBlock = Get32(buf + j); + frag.Size = Get32(buf + j + 4); + j += 8; + } + _frags.Add(frag); + } + } + if ((UInt32)_frags.Size() != _h.NumFrags) + return S_FALSE; + } + + // RINOK(inStream->Seek(_h.InodeTable, STREAM_SEEK_SET, NULL)); + + RINOK(ReadData(_inodesData, _h.InodeTable, _h.DirTable)); + RINOK(ReadData(_dirs, _h.DirTable, _h.FragTable)); + + UInt64 absOffset = _h.RootInode >> 16; + if (absOffset >= ((UInt64)1 << 32)) + return S_FALSE; + { + UInt32 pos = 0; + UInt32 totalSize = (UInt32)_inodesData.Data.GetCapacity(); + _nodesPos.Reserve(_h.NumInodes); + _nodes.Reserve(_h.NumInodes); + // we use _blockToNode for binary search seed optimizations + _blockToNode.Reserve(_inodesData.GetNumBlocks() + 1); + int curBlock = 0; + for (UInt32 i = 0; i < _h.NumInodes; i++) + { + CNode n; + const Byte *p = _inodesData.Data + pos; + UInt32 size = totalSize - pos; + + switch(_h.Major) + { + case 1: size = n.Parse1(p, size, _h); break; + case 2: size = n.Parse2(p, size, _h); break; + case 3: size = n.Parse3(p, size, _h); break; + default: size = n.Parse4(p, size, _h); break; + } + if (size == 0) + return S_FALSE; + while (pos >= _inodesData.UnpackPos[curBlock]) + { + _blockToNode.Add(_nodesPos.Size()); + curBlock++; + } + _nodesPos.Add(pos); + _nodes.Add(n); + pos += size; + } + _blockToNode.Add(_nodesPos.Size()); + if (pos != totalSize) + return S_FALSE; + } + int rootNodeIndex; + RINOK(OpenDir(-1, (UInt32)absOffset, (UInt32)_h.RootInode & 0xFFFF, 0, rootNodeIndex)); + + /* + if (_h.Major < 4) + { + RINOK(ReadUids(_h.UidTable, _h.NumUids, _uids)); + RINOK(ReadUids(_h.GidTable, _h.NumGids, _gids)); + } + else + { + UInt32 size = _h.NumIDs * 4; + _uids.SetCapacity(size); + + UInt32 numBlocks = (size + kMetadataBlockSize - 1) / kMetadataBlockSize; + UInt32 numBlocksBytes = numBlocks << 3; + CByteBuffer data; + data.SetCapacity(numBlocksBytes); + RINOK(inStream->Seek(_h.UidTable, STREAM_SEEK_SET, NULL)); + RINOK(ReadStream_FALSE(inStream, data, numBlocksBytes)); + + for (UInt32 i = 0; i < numBlocks; i++) + { + UInt64 offset = GetUi64(data + i * 8); + UInt32 unpackSize, packSize; + RINOK(_stream->Seek(offset, STREAM_SEEK_SET, NULL)); + RINOK(ReadMetadataBlock(NULL, _uids + kMetadataBlockSize * i, packSize, unpackSize)); + if (unpackSize != kMetadataBlockSize) + if (i != numBlocks - 1 || unpackSize != (size & (kMetadataBlockSize - 1))) + return S_FALSE; + } + } + */ + + { + const UInt32 alignSize = 1 << 12; + Byte buf[alignSize]; + RINOK(inStream->Seek(_h.Size, STREAM_SEEK_SET, NULL)); + UInt32 rem = (UInt32)(0 - _h.Size) & (alignSize - 1); + _sizeCalculated = _h.Size; + if (rem != 0) + { + if (ReadStream_FALSE(_stream, buf, rem) == S_OK) + { + size_t i; + for (i = 0; i < rem && buf[i] == 0; i++); + if (i == rem) + _sizeCalculated = _h.Size + rem; + } + } + } + return S_OK; +} + +AString CHandler::GetPath(int index) const +{ + unsigned len = 0; + int indexMem = index; + bool be = _h.be; + do + { + const CItem &item = _items[index]; + index = item.Parent; + const Byte *p = _dirs.Data + item.Ptr; + unsigned size = (_h.IsOldVersion() ? (unsigned)p[2] : (unsigned)Get16(p + 6)) + 1; + p += _h.GetFileNameOffset(); + unsigned i; + for (i = 0; i < size && p[i]; i++); + len += i + 1; + } + while (index >= 0); + len--; + + AString path; + char *dest = path.GetBuffer(len) + len; + index = indexMem; + for (;;) + { + const CItem &item = _items[index]; + index = item.Parent; + + const Byte *p = _dirs.Data + item.Ptr; + unsigned size = (_h.IsOldVersion() ? (unsigned)p[2] : (unsigned)Get16(p + 6)) + 1; + p += _h.GetFileNameOffset(); + unsigned i; + for (i = 0; i < size && p[i]; i++); + dest -= i; + memcpy(dest, p, i); + if (index < 0) + break; + *(--dest) = CHAR_PATH_SEPARATOR; + } + path.ReleaseBuffer(len); + return path; +} + +STDMETHODIMP CHandler::Open(IInStream *stream, const UInt64 *, IArchiveOpenCallback *callback) +{ + COM_TRY_BEGIN + { + Close(); + _limitedInStreamSpec->SetStream(stream); + HRESULT res; + try + { + RINOK(stream->Seek(0, STREAM_SEEK_SET, NULL)); + _openCallback = callback; + res = Open2(stream); + } + catch(...) + { + Close(); + throw; + } + if (res != S_OK) + { + Close(); + return res; + } + _stream = stream; + } + return S_OK; + COM_TRY_END +} + +STDMETHODIMP CHandler::Close() +{ + _limitedInStreamSpec->ReleaseStream(); + _stream.Release(); + + _items.Clear(); + _nodes.Clear(); + _nodesPos.Clear(); + _blockToNode.Clear(); + _frags.Clear(); + _inodesData.Clear(); + _dirs.Clear(); + + // _uids.Free(); + // _gids.Free();; + + _cachedBlock.Free(); + ClearCache(); + + return S_OK; +} + +bool CHandler::GetPackSize(int index, UInt64 &totalPack, bool fillOffsets) +{ + totalPack = 0; + const CItem &item = _items[index]; + const CNode &node = _nodes[item.Node]; + UInt32 ptr = _nodesPos[item.Node]; + const Byte *p = _inodesData.Data + ptr; + bool be = _h.be; + + UInt32 type = node.Type; + UInt32 offset; + if (node.IsLink() || node.FileSize == 0) + { + totalPack = node.FileSize; + return true; + } + + UInt32 numBlocks = (UInt32)node.GetNumBlocks(_h); + + if (fillOffsets) + { + _blockOffsets.Clear(); + _blockCompressed.Clear(); + _blockOffsets.Add(totalPack); + } + + if (_h.Major <= 1) + { + offset = 15; + p += offset; + + for (UInt32 i = 0; i < numBlocks; i++) + { + UInt32 t = Get16(p + i * 2); + if (fillOffsets) + _blockCompressed.Add((t & kNotCompressedBit16) == 0); + if (t != kNotCompressedBit16) + t &= ~kNotCompressedBit16; + totalPack += t; + if (fillOffsets) + _blockOffsets.Add(totalPack); + } + } + else + { + if (_h.Major <= 2) + offset = 24; + else if (type == kType_FILE) + offset = 32; + else if (type == kType_FILE + 7) + offset = (_h.Major <= 3 ? 40 : 56); + else + return false; + + p += offset; + + for (UInt64 i = 0; i < numBlocks; i++) + { + UInt32 t = Get32(p + i * 4); + if (fillOffsets) + _blockCompressed.Add(IS_COMPRESSED_BLOCK(t)); + UInt32 size = GET_COMPRESSED_BLOCK_SIZE(t); + if (size > _h.BlockSize) + return false; + totalPack += size; + if (fillOffsets) + _blockOffsets.Add(totalPack); + } + + if (node.ThereAreFrags()) + { + if (node.Frag >= (UInt32)_frags.Size()) + return false; + const CFrag &frag = _frags[node.Frag]; + if (node.Offset == 0) + { + UInt32 size = GET_COMPRESSED_BLOCK_SIZE(frag.Size); + if (size > _h.BlockSize) + return false; + totalPack += size; + } + } + } + return true; +} + + +STDMETHODIMP CHandler::GetNumberOfItems(UInt32 *numItems) +{ + *numItems = _items.Size(); + return S_OK; +} + +STDMETHODIMP CHandler::GetArchiveProperty(PROPID propID, PROPVARIANT *value) +{ + COM_TRY_BEGIN + NWindows::NCOM::CPropVariant prop; + switch(propID) + { + case kpidMethod: + { + const char *s; + if (_h.SeveralMethods) + s = "LZMA ZLIB"; + else + { + s = k_Methods[0]; + if (_h.Method < sizeof(k_Methods) / sizeof(k_Methods[0])) + s = k_Methods[_h.Method]; + } + prop = s; + break; + } + case kpidFileSystem: + { + AString res = "SquashFS"; + if (_h.SeveralMethods) + res += "-LZMA"; + res += ' '; + char s[16]; + ConvertUInt32ToString(_h.Major, s); + res += s; + res += '.'; + ConvertUInt32ToString(_h.Minor, s); + res += s; + prop = res; + break; + } + case kpidBlock: prop = _h.BlockSize; break; + case kpidBigEndian: prop = _h.be; break; + case kpidCTime: + if (_h.CTime != 0) + { + FILETIME ft; + NWindows::NTime::UnixTimeToFileTime(_h.CTime, ft); + prop = ft; + } + break; + case kpidCharacts: FLAGS_TO_PROP(k_Flags, _h.Flags, prop); break; + // case kpidNumBlocks: prop = _h.NumFrags; break; + case kpidPhySize: prop = _sizeCalculated; break; + case kpidHeadersSize: + if (_sizeCalculated >= _h.InodeTable) + prop = _sizeCalculated - _h.InodeTable; + break; + } + prop.Detach(value); + return S_OK; + COM_TRY_END +} + +STDMETHODIMP CHandler::GetProperty(UInt32 index, PROPID propID, PROPVARIANT *value) +{ + COM_TRY_BEGIN + NWindows::NCOM::CPropVariant prop; + const CItem &item = _items[index]; + const CNode &node = _nodes[item.Node]; + bool isDir = node.IsDir(); + bool be = _h.be; + + switch(propID) + { + case kpidPath: prop = MultiByteToUnicodeString(GetPath(index), CP_OEMCP); break; + case kpidIsDir: prop = isDir; break; + // case kpidOffset: if (!node.IsLink()) prop = (UInt64)node.StartBlock; break; + case kpidSize: if (!isDir) prop = node.GetSize(); break; + case kpidPackSize: + if (!isDir) + { + UInt64 size; + if (GetPackSize(index, size, false)) + prop = size; + } + break; + case kpidMTime: + { + UInt32 offset = 0; + switch(_h.Major) + { + case 1: + if (node.Type == kType_FILE) + offset = 3; + else if (node.Type == kType_DIR) + offset = 7; + break; + case 2: + if (node.Type == kType_FILE) + offset = 4; + else if (node.Type == kType_DIR) + offset = 8; + else if (node.Type == kType_DIR + 7) + offset = 9; + break; + case 3: offset = 4; break; + case 4: offset = 8; break; + } + if (offset != 0) + { + const Byte *p = _inodesData.Data + _nodesPos[item.Node] + offset; + FILETIME ft; + NWindows::NTime::UnixTimeToFileTime(Get32(p), ft); + prop = ft; + } + break; + } + case kpidPosixAttrib: + { + if (node.Type != 0 && node.Type < sizeof(k_TypeToMode) / sizeof(k_TypeToMode[0])) + prop = (UInt32)(node.Mode & 0xFFF) | k_TypeToMode[node.Type]; + break; + } + /* + case kpidUser: + { + UInt32 offset = node.Uid * 4; + if (offset < _uids.GetCapacity()) + prop = (UInt32)Get32(_uids + offset); + break; + } + case kpidGroup: + { + if (_h.Major == 4 || node.Gid == _h.GetSpecGuidIndex()) + { + UInt32 offset = node.Uid * 4; + if (offset < _uids.GetCapacity()) + prop = (UInt32)Get32(_uids + offset); + } + else + { + UInt32 offset = node.Gid * 4; + if (offset < _gids.GetCapacity()) + prop = (UInt32)Get32(_gids + offset); + } + break; + } + */ + /* + case kpidLinks: + if (_h.Major >= 3 && node.Type != kType_FILE) + prop = node.NumLinks; + break; + */ + } + prop.Detach(value); + return S_OK; + COM_TRY_END +} + +class CSquashfsInStream: public CCachedInStream +{ + HRESULT ReadBlock(UInt64 blockIndex, Byte *dest, size_t blockSize); +public: + CHandler *Handler; +}; + +HRESULT CSquashfsInStream::ReadBlock(UInt64 blockIndex, Byte *dest, size_t blockSize) +{ + return Handler->ReadBlock(blockIndex, dest, blockSize); +} + +HRESULT CHandler::ReadBlock(UInt64 blockIndex, Byte *dest, size_t blockSize) +{ + const CNode &node = _nodes[_nodeIndex]; + UInt64 blockOffset; + UInt32 packBlockSize; + UInt32 offsetInBlock = 0; + bool compressed; + if (blockIndex < _blockCompressed.Size()) + { + compressed = _blockCompressed[(int)blockIndex]; + blockOffset = _blockOffsets[(int)blockIndex]; + packBlockSize = (UInt32)(_blockOffsets[(int)blockIndex + 1] - blockOffset); + blockOffset += node.StartBlock; + } + else + { + if (!node.ThereAreFrags()) + return S_FALSE; + const CFrag &frag = _frags[node.Frag]; + offsetInBlock = node.Offset; + blockOffset = frag.StartBlock; + packBlockSize = GET_COMPRESSED_BLOCK_SIZE(frag.Size); + compressed = IS_COMPRESSED_BLOCK(frag.Size); + } + + if (packBlockSize == 0) + { + // sparse file ??? + memset(dest, 0, blockSize); + return S_OK; + } + + if (blockOffset != _cachedBlockStartPos || + packBlockSize != _cachedPackBlockSize) + { + ClearCache(); + RINOK(_stream->Seek(blockOffset, STREAM_SEEK_SET, NULL)); + _limitedInStreamSpec->Init(packBlockSize); + + if (compressed) + { + _outStreamSpec->Init((Byte *)_cachedBlock, _h.BlockSize); + bool outBufWasWritten; + UInt32 outBufWasWrittenSize; + HRESULT res = Decompress(_outStream, _cachedBlock, &outBufWasWritten, &outBufWasWrittenSize, packBlockSize, _h.BlockSize); + if (outBufWasWritten) + _cachedUnpackBlockSize = outBufWasWrittenSize; + else + _cachedUnpackBlockSize = (UInt32)_outStreamSpec->GetPos(); + RINOK(res); + } + else + { + RINOK(ReadStream_FALSE(_limitedInStream, _cachedBlock, packBlockSize)); + _cachedUnpackBlockSize = packBlockSize; + } + _cachedBlockStartPos = blockOffset; + _cachedPackBlockSize = packBlockSize; + } + if (offsetInBlock + blockSize > _cachedUnpackBlockSize) + return S_FALSE; + memcpy(dest, _cachedBlock + offsetInBlock, blockSize); + return S_OK; +} + +STDMETHODIMP CHandler::Extract(const UInt32 *indices, UInt32 numItems, + Int32 testMode, IArchiveExtractCallback *extractCallback) +{ + COM_TRY_BEGIN + bool allFilesMode = (numItems == (UInt32)-1); + if (allFilesMode) + numItems = _items.Size(); + if (numItems == 0) + return S_OK; + UInt64 totalSize = 0; + UInt32 i; + for (i = 0; i < numItems; i++) + { + const CItem &item = _items[allFilesMode ? i : indices[i]]; + const CNode &node = _nodes[item.Node]; + totalSize += node.GetSize(); + } + extractCallback->SetTotal(totalSize); + + UInt64 totalPackSize; + totalSize = totalPackSize = 0; + + NCompress::CCopyCoder *copyCoderSpec = new NCompress::CCopyCoder(); + CMyComPtr copyCoder = copyCoderSpec; + + CLocalProgress *lps = new CLocalProgress; + CMyComPtr progress = lps; + lps->Init(extractCallback, false); + + for (i = 0; i < numItems; i++) + { + lps->InSize = totalPackSize; + lps->OutSize = totalSize; + RINOK(lps->SetCur()); + CMyComPtr outStream; + Int32 askMode = testMode ? + NExtract::NAskMode::kTest : + NExtract::NAskMode::kExtract; + UInt32 index = allFilesMode ? i : indices[i]; + const CItem &item = _items[index]; + const CNode &node = _nodes[item.Node]; + RINOK(extractCallback->GetStream(index, &outStream, askMode)); + // const Byte *p = _data + item.Offset; + + if (node.IsDir()) + { + RINOK(extractCallback->PrepareOperation(askMode)); + RINOK(extractCallback->SetOperationResult(NExtract::NOperationResult::kOK)); + continue; + } + UInt64 unpackSize = node.GetSize(); + totalSize += unpackSize; + UInt64 packSize; + if (GetPackSize(index, packSize, false)) + totalPackSize += packSize; + + if (!testMode && !outStream) + continue; + RINOK(extractCallback->PrepareOperation(askMode)); + + int res = NExtract::NOperationResult::kDataError; + { + CMyComPtr inSeqStream; + CMyComPtr inStream; + HRESULT hres = GetStream(index, &inSeqStream); + if (inSeqStream) + inSeqStream.QueryInterface(IID_IInStream, &inStream); + if (hres == S_FALSE || !inStream) + { + if (hres == E_OUTOFMEMORY) + return hres; + res = NExtract::NOperationResult::kUnSupportedMethod; + } + else + { + RINOK(hres); + if (inStream) + { + HRESULT hres = copyCoder->Code(inStream, outStream, NULL, NULL, progress); + if (hres != S_OK && hres != S_FALSE) + { + RINOK(hres); + } + if (copyCoderSpec->TotalSize == unpackSize && hres == S_OK) + res = NExtract::NOperationResult::kOK; + else + { + res = res; + } + } + } + } + RINOK(extractCallback->SetOperationResult(res)); + } + return S_OK; + COM_TRY_END +} + + +STDMETHODIMP CHandler::GetStream(UInt32 index, ISequentialInStream **stream) +{ + COM_TRY_BEGIN + + const CItem &item = _items[index]; + const CNode &node = _nodes[item.Node]; + + if (node.IsDir()) + return E_FAIL; + + const Byte *p = _inodesData.Data + _nodesPos[item.Node]; + + if (node.FileSize == 0 || node.IsLink()) + { + CBufInStream *streamSpec = new CBufInStream; + CMyComPtr streamTemp = streamSpec; + if (node.IsLink()) + streamSpec->Init(p + _h.GetSymLinkOffset(), (size_t)node.FileSize); + else + streamSpec->Init(NULL, 0); + *stream = streamTemp.Detach(); + return S_OK; + } + + UInt64 packSize; + if (!GetPackSize(index, packSize, true)) + return S_FALSE; + + _nodeIndex = item.Node; + + size_t cacheSize = _h.BlockSize; + if (_cachedBlock.GetCapacity() != cacheSize) + { + ClearCache(); + _cachedBlock.SetCapacity(cacheSize); + } + + CSquashfsInStream *streamSpec = new CSquashfsInStream; + CMyComPtr streamTemp = streamSpec; + streamSpec->Handler = this; + unsigned cacheSizeLog = 22; + if (cacheSizeLog <= _h.BlockSizeLog) + cacheSizeLog = _h.BlockSizeLog + 1; + if (!streamSpec->Alloc(_h.BlockSizeLog, cacheSizeLog - _h.BlockSizeLog)) + return E_OUTOFMEMORY; + streamSpec->Init(node.FileSize); + *stream = streamTemp.Detach(); + + return S_OK; + + COM_TRY_END +} + +static IInArchive *CreateArc() { return new NArchive::NSquashfs::CHandler; } + +static CArcInfo g_ArcInfo = + { L"SquashFS", L"squashfs", 0, 0xD2, SIGNATURE, kSignatureSize, false, CreateArc, 0 }; + +REGISTER_ARC(Cramfs) + +}} diff --git a/CPP/7zip/Archive/SwfHandler.cpp b/CPP/7zip/Archive/SwfHandler.cpp new file mode 100644 index 0000000..dfc0326 --- /dev/null +++ b/CPP/7zip/Archive/SwfHandler.cpp @@ -0,0 +1,706 @@ +// SwfHandler.cpp + +#include "StdAfx.h" + +#include "../../../C/CpuArch.h" + +#include "Common/Buffer.h" +#include "Common/ComTry.h" +#include "Common/IntToString.h" +#include "Common/MyString.h" + +#include "Windows/PropVariant.h" + +#include "../Common/InBuffer.h" +#include "../Common/ProgressUtils.h" +#include "../Common/RegisterArc.h" +#include "../Common/StreamUtils.h" + +#include "../Compress/CopyCoder.h" +#include "../Compress/ZlibDecoder.h" +#include "../Compress/ZlibEncoder.h" + +#include "Common/DummyOutStream.h" + +#include "DeflateProps.h" + +using namespace NWindows; + +namespace NArchive { +namespace NSwfc { + +static const UInt32 kHeaderSize = 8; + +static const Byte SWF_UNCOMPRESSED = 'F'; +static const Byte SWF_COMPRESSED = 'C'; +static const Byte SWF_MIN_COMPRESSED_VER = 6; + +struct CItem +{ + Byte Buf[kHeaderSize]; + + UInt32 GetSize() const { return GetUi32(Buf + 4); } + bool IsSwf(Byte c) const { return (Buf[0] == c && Buf[1] == 'W' && Buf[2] == 'S' && Buf[3] < 32); } + bool IsUncompressed() const { return IsSwf(SWF_UNCOMPRESSED); } + bool IsCompressed() const { return IsSwf(SWF_COMPRESSED); } + + void MakeUncompressed() { Buf[0] = SWF_UNCOMPRESSED; } + void MakeCompressed() + { + Buf[0] = SWF_COMPRESSED; + if (Buf[3] < SWF_MIN_COMPRESSED_VER) + Buf[3] = SWF_MIN_COMPRESSED_VER; + } + + HRESULT ReadHeader(ISequentialInStream *stream) { return ReadStream_FALSE(stream, Buf, kHeaderSize); } + HRESULT WriteHeader(ISequentialOutStream *stream) { return WriteStream(stream, Buf, kHeaderSize); } +}; + +class CHandler: + public IInArchive, + public IArchiveOpenSeq, + public IOutArchive, + public ISetProperties, + public CMyUnknownImp +{ + CItem _item; + UInt64 _packSize; + bool _packSizeDefined; + CMyComPtr _seqStream; + CMyComPtr _stream; + + CDeflateProps _method; + +public: + MY_UNKNOWN_IMP4(IInArchive, IArchiveOpenSeq, IOutArchive, ISetProperties) + INTERFACE_IInArchive(;) + INTERFACE_IOutArchive(;) + STDMETHOD(OpenSeq)(ISequentialInStream *stream); + STDMETHOD(SetProperties)(const wchar_t **names, const PROPVARIANT *values, Int32 numProps); +}; + +STATPROPSTG kProps[] = +{ + { NULL, kpidSize, VT_UI8}, + { NULL, kpidPackSize, VT_UI8} +}; + +IMP_IInArchive_Props +IMP_IInArchive_ArcProps_NO_Table + +STDMETHODIMP CHandler::GetArchiveProperty(PROPID propID, PROPVARIANT *value) +{ + NCOM::CPropVariant prop; + switch(propID) + { + case kpidPhySize: if (_packSizeDefined) prop = _packSize; break; + } + prop.Detach(value); + return S_OK; +} + +STDMETHODIMP CHandler::GetNumberOfItems(UInt32 *numItems) +{ + *numItems = 1; + return S_OK; +} + +STDMETHODIMP CHandler::GetProperty(UInt32 /* index */, PROPID propID, PROPVARIANT *value) +{ + NWindows::NCOM::CPropVariant prop; + switch(propID) + { + case kpidSize: prop = (UInt64)_item.GetSize(); break; + case kpidPackSize: if (_packSizeDefined) prop = _packSize; break; + } + prop.Detach(value); + return S_OK; +} + +STDMETHODIMP CHandler::Open(IInStream *stream, const UInt64 *, IArchiveOpenCallback *) +{ + RINOK(OpenSeq(stream)); + _stream = stream; + return S_OK; +} + +STDMETHODIMP CHandler::OpenSeq(ISequentialInStream *stream) +{ + Close(); + HRESULT res = _item.ReadHeader(stream); + if (res == S_OK) + if (_item.IsCompressed()) + _seqStream = stream; + else + res = S_FALSE; + return res; +} + +STDMETHODIMP CHandler::Close() +{ + _packSizeDefined = false; + _seqStream.Release(); + _stream.Release(); + return S_OK; +} + +STDMETHODIMP CHandler::Extract(const UInt32 *indices, UInt32 numItems, + Int32 testMode, IArchiveExtractCallback *extractCallback) +{ + COM_TRY_BEGIN + if (numItems == 0) + return S_OK; + if (numItems != (UInt32)-1 && (numItems != 1 || indices[0] != 0)) + return E_INVALIDARG; + + extractCallback->SetTotal(_item.GetSize()); + CMyComPtr realOutStream; + Int32 askMode = testMode ? + NExtract::NAskMode::kTest : + NExtract::NAskMode::kExtract; + RINOK(extractCallback->GetStream(0, &realOutStream, askMode)); + if (!testMode && !realOutStream) + return S_OK; + + extractCallback->PrepareOperation(askMode); + + NCompress::NZlib::CDecoder *_decoderSpec = new NCompress::NZlib::CDecoder; + CMyComPtr _decoder = _decoderSpec; + + CDummyOutStream *outStreamSpec = new CDummyOutStream; + CMyComPtr outStream(outStreamSpec); + outStreamSpec->SetStream(realOutStream); + outStreamSpec->Init(); + realOutStream.Release(); + + CLocalProgress *lps = new CLocalProgress; + CMyComPtr progress = lps; + lps->Init(extractCallback, false); + + lps->InSize = kHeaderSize; + lps->OutSize = outStreamSpec->GetSize(); + RINOK(lps->SetCur()); + + CItem item = _item; + item.MakeUncompressed(); + RINOK(item.WriteHeader(outStream)); + if (_stream) + RINOK(_stream->Seek(kHeaderSize, STREAM_SEEK_SET, NULL)); + HRESULT result = _decoderSpec->Code(_seqStream, outStream, NULL, NULL, progress); + Int32 opRes = NExtract::NOperationResult::kDataError; + if (result == S_OK) + { + if (_item.GetSize() == outStreamSpec->GetSize()) + { + _packSizeDefined = true; + _packSize = _decoderSpec->GetInputProcessedSize() + kHeaderSize; + opRes = NExtract::NOperationResult::kOK; + } + } + else if (result != S_FALSE) + return result; + + outStream.Release(); + return extractCallback->SetOperationResult(opRes); + COM_TRY_END +} + +static HRESULT UpdateArchive(ISequentialOutStream *outStream, + UInt64 size, CDeflateProps &deflateProps, + IArchiveUpdateCallback *updateCallback) +{ + UInt64 complexity = 0; + RINOK(updateCallback->SetTotal(size)); + RINOK(updateCallback->SetCompleted(&complexity)); + + CMyComPtr fileInStream; + RINOK(updateCallback->GetStream(0, &fileInStream)); + + CItem item; + HRESULT res = item.ReadHeader(fileInStream); + if (res == S_FALSE) + return E_INVALIDARG; + RINOK(res); + if (!item.IsUncompressed() || size != item.GetSize()) + return E_INVALIDARG; + + item.MakeCompressed(); + item.WriteHeader(outStream); + + CLocalProgress *lps = new CLocalProgress; + CMyComPtr progress = lps; + lps->Init(updateCallback, true); + + NCompress::NZlib::CEncoder *encoderSpec = new NCompress::NZlib::CEncoder; + CMyComPtr encoder = encoderSpec; + encoderSpec->Create(); + RINOK(deflateProps.SetCoderProperties(encoderSpec->DeflateEncoderSpec)); + RINOK(encoder->Code(fileInStream, outStream, NULL, NULL, progress)); + if (encoderSpec->GetInputProcessedSize() + kHeaderSize != size) + return E_INVALIDARG; + return updateCallback->SetOperationResult(NUpdate::NOperationResult::kOK); +} + +STDMETHODIMP CHandler::GetFileTimeType(UInt32 *timeType) +{ + *timeType = NFileTimeType::kUnix; + return S_OK; +} + +STDMETHODIMP CHandler::UpdateItems(ISequentialOutStream *outStream, UInt32 numItems, + IArchiveUpdateCallback *updateCallback) +{ + if (numItems != 1) + return E_INVALIDARG; + + Int32 newData, newProps; + UInt32 indexInArchive; + if (!updateCallback) + return E_FAIL; + RINOK(updateCallback->GetUpdateItemInfo(0, &newData, &newProps, &indexInArchive)); + + if (IntToBool(newProps)) + { + { + NCOM::CPropVariant prop; + RINOK(updateCallback->GetProperty(0, kpidIsDir, &prop)); + if (prop.vt == VT_BOOL) + { + if (prop.boolVal != VARIANT_FALSE) + return E_INVALIDARG; + } + else if (prop.vt != VT_EMPTY) + return E_INVALIDARG; + } + } + + if (IntToBool(newData)) + { + UInt64 size; + { + NCOM::CPropVariant prop; + RINOK(updateCallback->GetProperty(0, kpidSize, &prop)); + if (prop.vt != VT_UI8) + return E_INVALIDARG; + size = prop.uhVal.QuadPart; + } + return UpdateArchive(outStream, size, _method, updateCallback); + } + + if (indexInArchive != 0) + return E_INVALIDARG; + + if (!_seqStream) + return E_NOTIMPL; + + if (_stream) + { + RINOK(_stream->Seek(0, STREAM_SEEK_SET, NULL)); + } + else + _item.WriteHeader(outStream); + return NCompress::CopyStream(_seqStream, outStream, NULL); +} + +STDMETHODIMP CHandler::SetProperties(const wchar_t **names, const PROPVARIANT *values, Int32 numProps) +{ + return _method.SetProperties(names, values, numProps); +} + +static IInArchive *CreateArc() { return new CHandler; } +#ifndef EXTRACT_ONLY +static IOutArchive *CreateArcOut() { return new CHandler; } +#else +#define CreateArcOut 0 +#endif + +static CArcInfo g_ArcInfo = + { L"SWFc", L"swf", L"~.swf", 0xD8, { 'C', 'W', 'S' }, 3, true, CreateArc, CreateArcOut }; + +REGISTER_ARC(Swfc) + +} + +namespace NSwf { + +static const UInt32 kFileSizeMax = (UInt32)1 << 30; +static const int kNumTagsMax = (UInt32)1 << 23; + +struct CTag +{ + UInt32 Type; + CByteBuffer Buf; +}; + +class CHandler: + public IInArchive, + public IArchiveOpenSeq, + public CMyUnknownImp +{ + CObjectVector _tags; + NSwfc::CItem _item; + UInt64 _packSize; + + HRESULT OpenSeq3(ISequentialInStream *stream, IArchiveOpenCallback *callback); + HRESULT OpenSeq2(ISequentialInStream *stream, IArchiveOpenCallback *callback); +public: + MY_UNKNOWN_IMP2(IInArchive, IArchiveOpenSeq) + INTERFACE_IInArchive(;) + + STDMETHOD(OpenSeq)(ISequentialInStream *stream); +}; + +STATPROPSTG kProps[] = +{ + { NULL, kpidPath, VT_BSTR}, + { NULL, kpidSize, VT_UI8}, + { NULL, kpidComment, VT_BSTR} +}; + +IMP_IInArchive_Props +IMP_IInArchive_ArcProps_NO_Table + +STDMETHODIMP CHandler::GetArchiveProperty(PROPID propID, PROPVARIANT *value) +{ + NCOM::CPropVariant prop; + switch(propID) + { + case kpidPhySize: prop = _packSize; break; + } + prop.Detach(value); + return S_OK; +} + + +STDMETHODIMP CHandler::GetNumberOfItems(UInt32 *numItems) +{ + *numItems = _tags.Size(); + return S_OK; +} + +static const char *g_TagDesc[92] = +{ + "End", + "ShowFrame", + "DefineShape", + NULL, + "PlaceObject", + "RemoveObject", + "DefineBits", + "DefineButton", + "JPEGTables", + "SetBackgroundColor", + "DefineFont", + "DefineText", + "DoAction", + "DefineFontInfo", + "DefineSound", + "StartSound", + NULL, + "DefineButtonSound", + "SoundStreamHead", + "SoundStreamBlock", + "DefineBitsLossless", + "DefineBitsJPEG2", + "DefineShape2", + "DefineButtonCxform", + "Protect", + NULL, + "PlaceObject2", + NULL, + "RemoveObject2", + NULL, + NULL, + NULL, + "DefineShape3", + "DefineText2", + "DefineButton2", + "DefineBitsJPEG3", + "DefineBitsLossless2", + "DefineEditText", + NULL, + "DefineSprite", + NULL, + "41", + NULL, + "FrameLabel", + NULL, + "SoundStreamHead2", + "DefineMorphShape", + NULL, + "DefineFont2", + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + "ExportAssets", + "ImportAssets", + "EnableDebugger", + "DoInitAction", + "DefineVideoStream", + "VideoFrame", + "DefineFontInfo2", + NULL, + "EnableDebugger2", + "ScriptLimits", + "SetTabIndex", + NULL, + NULL, + "FileAttributes", + "PlaceObject3", + "ImportAssets2", + NULL, + "DefineFontAlignZones", + "CSMTextSettings", + "DefineFont3", + "SymbolClass", + "Metadata", + "DefineScalingGrid", + NULL, + NULL, + NULL, + "DoABC", + "DefineShape4", + "DefineMorphShape2", + NULL, + "DefineSceneAndFrameLabelData", + "DefineBinaryData", + "DefineFontName", + "StartSound2", + "DefineBitsJPEG4", + "DefineFont4" +}; + +STDMETHODIMP CHandler::GetProperty(UInt32 index, PROPID propID, PROPVARIANT *value) +{ + NWindows::NCOM::CPropVariant prop; + const CTag &tag = _tags[index]; + switch(propID) + { + case kpidPath: + { + char s[32]; + ConvertUInt32ToString(index, s); + size_t i = strlen(s); + s[i++] = '.'; + ConvertUInt32ToString(tag.Type, s + i); + prop = s; + break; + } + case kpidSize: + case kpidPackSize: + prop = (UInt64)tag.Buf.GetCapacity(); break; + case kpidComment: + if (tag.Type < sizeof(g_TagDesc) / sizeof(g_TagDesc[0])) + { + const char *s = g_TagDesc[tag.Type]; + if (s != NULL) + prop = s; + } + break; + } + prop.Detach(value); + return S_OK; +} + +STDMETHODIMP CHandler::Open(IInStream *stream, const UInt64 *, IArchiveOpenCallback *callback) +{ + return OpenSeq2(stream, callback); +} + +static UInt16 Read16(CInBuffer &stream) +{ + UInt16 res = 0; + for (int i = 0; i < 2; i++) + { + Byte b; + if (!stream.ReadByte(b)) + throw 1; + res |= (UInt16)b << (i * 8); + } + return res; +} + +static UInt32 Read32(CInBuffer &stream) +{ + UInt32 res = 0; + for (int i = 0; i < 4; i++) + { + Byte b; + if (!stream.ReadByte(b)) + throw 1; + res |= (UInt32)b << (i * 8); + } + return res; +} + +struct CBitReader +{ + CInBuffer *stream; + unsigned NumBits; + Byte Val; + + CBitReader(): NumBits(0), Val(0) {} + + UInt32 ReadBits(unsigned numBits); +}; + +UInt32 CBitReader::ReadBits(unsigned numBits) +{ + UInt32 res = 0; + while (numBits > 0) + { + if (NumBits == 0) + { + Val = stream->ReadByte(); + NumBits = 8; + } + if (numBits <= NumBits) + { + res <<= numBits; + NumBits -= numBits; + res |= (Val >> NumBits); + Val &= (1 << NumBits) - 1; + break; + } + else + { + res <<= NumBits; + res |= Val; + numBits -= NumBits; + NumBits = 0; + } + } + return res; +} + +HRESULT CHandler::OpenSeq3(ISequentialInStream *stream, IArchiveOpenCallback *callback) +{ + RINOK(_item.ReadHeader(stream)) + if (!_item.IsUncompressed()) + return S_FALSE; + + CInBuffer s; + if (!s.Create(1 << 20)) + return E_OUTOFMEMORY; + s.SetStream(stream); + s.Init(); + { + CBitReader br; + br.stream = &s; + unsigned numBits = br.ReadBits(5); + /* UInt32 xMin = */ br.ReadBits(numBits); + /* UInt32 xMax = */ br.ReadBits(numBits); + /* UInt32 yMin = */ br.ReadBits(numBits); + /* UInt32 yMax = */ br.ReadBits(numBits); + } + /* UInt32 frameDelay = */ Read16(s); + /* UInt32 numFrames = */ Read16(s); + + _tags.Clear(); + UInt64 offsetPrev = 0; + for (;;) + { + UInt32 pair = Read16(s); + UInt32 type = pair >> 6; + UInt32 length = pair & 0x3F; + if (length == 0x3F) + length = Read32(s); + if (type == 0) + break; + UInt64 offset = s.GetProcessedSize() + NSwfc::kHeaderSize + length; + if (offset > kFileSizeMax || _tags.Size() >= kNumTagsMax) + return S_FALSE; + _tags.Add(CTag()); + CTag &tag = _tags.Back(); + tag.Type = type; + tag.Buf.SetCapacity(length); + if (s.ReadBytes(tag.Buf, length) != length) + return S_FALSE; + if (callback && offset >= offsetPrev + (1 << 20)) + { + UInt64 numItems = _tags.Size(); + RINOK(callback->SetCompleted(&numItems, &offset)); + offsetPrev = offset; + } + } + _packSize = s.GetProcessedSize() + NSwfc::kHeaderSize; + return S_OK; +} + +HRESULT CHandler::OpenSeq2(ISequentialInStream *stream, IArchiveOpenCallback *callback) +{ + HRESULT res; + try { res = OpenSeq3(stream, callback); } + catch(...) { res = S_FALSE; } + return res; +} + +STDMETHODIMP CHandler::OpenSeq(ISequentialInStream *stream) +{ + return OpenSeq2(stream, NULL); +} + +STDMETHODIMP CHandler::Close() +{ + return S_OK; +} + +STDMETHODIMP CHandler::Extract(const UInt32 *indices, UInt32 numItems, + Int32 testMode, IArchiveExtractCallback *extractCallback) +{ + COM_TRY_BEGIN + bool allFilesMode = (numItems == (UInt32)-1); + if (allFilesMode) + numItems = _tags.Size(); + if (numItems == 0) + return S_OK; + UInt64 totalSize = 0; + UInt32 i; + for (i = 0; i < numItems; i++) + totalSize += _tags[allFilesMode ? i : indices[i]].Buf.GetCapacity(); + extractCallback->SetTotal(totalSize); + + CLocalProgress *lps = new CLocalProgress; + CMyComPtr progress = lps; + lps->Init(extractCallback, false); + + totalSize = 0; + + for (i = 0; i < numItems; i++) + { + lps->InSize = lps->OutSize = totalSize; + RINOK(lps->SetCur()); + Int32 askMode = testMode ? + NExtract::NAskMode::kTest : + NExtract::NAskMode::kExtract; + UInt32 index = allFilesMode ? i : indices[i]; + const CByteBuffer &buf = _tags[index].Buf; + totalSize += buf.GetCapacity(); + + CMyComPtr outStream; + RINOK(extractCallback->GetStream(index, &outStream, askMode)); + if (!testMode && !outStream) + continue; + + RINOK(extractCallback->PrepareOperation(askMode)); + if (outStream) + RINOK(WriteStream(outStream, buf, buf.GetCapacity())); + outStream.Release(); + RINOK(extractCallback->SetOperationResult(NExtract::NOperationResult::kOK)); + } + return S_OK; + COM_TRY_END +} + +static IInArchive *CreateArc() { return new CHandler; } + +static CArcInfo g_ArcInfo = + { L"SWF", L"swf", 0, 0xD7, { 'F', 'W', 'S' }, 3, true, CreateArc, 0 }; + +REGISTER_ARC(Swf) + +}} diff --git a/CPP/7zip/Archive/Tar/TarHandler.cpp b/CPP/7zip/Archive/Tar/TarHandler.cpp new file mode 100644 index 0000000..4db0cae --- /dev/null +++ b/CPP/7zip/Archive/Tar/TarHandler.cpp @@ -0,0 +1,386 @@ +// TarHandler.cpp + +#include "StdAfx.h" + +#include "Common/ComTry.h" +#include "Common/StringConvert.h" + +#include "Windows/PropVariant.h" +#include "Windows/Time.h" + +#include "../../Common/LimitedStreams.h" +#include "../../Common/ProgressUtils.h" +#include "../../Common/StreamObjects.h" +#include "../../Common/StreamUtils.h" + +#include "../Common/ItemNameUtils.h" + +#include "TarHandler.h" +#include "TarIn.h" + +using namespace NWindows; + +namespace NArchive { +namespace NTar { + +static const char *kUnexpectedEnd = "Unexpected end of archive"; + +static const STATPROPSTG kProps[] = +{ + { NULL, kpidPath, VT_BSTR}, + { NULL, kpidIsDir, VT_BOOL}, + { NULL, kpidSize, VT_UI8}, + { NULL, kpidPackSize, VT_UI8}, + { NULL, kpidMTime, VT_FILETIME}, + { NULL, kpidPosixAttrib, VT_UI4}, + { NULL, kpidUser, VT_BSTR}, + { NULL, kpidGroup, VT_BSTR}, + { NULL, kpidLink, VT_BSTR} +}; + +static const STATPROPSTG kArcProps[] = +{ + { NULL, kpidPhySize, VT_UI8}, + { NULL, kpidHeadersSize, VT_UI8} +}; + +IMP_IInArchive_Props +IMP_IInArchive_ArcProps + +STDMETHODIMP CHandler::GetArchiveProperty(PROPID propID, PROPVARIANT *value) +{ + NCOM::CPropVariant prop; + switch(propID) + { + case kpidPhySize: if (_phySizeDefined) prop = _phySize; break; + case kpidHeadersSize: if (_phySizeDefined) prop = _headersSize; break; + case kpidError: if (!_errorMessage.IsEmpty()) prop = _errorMessage; break; + } + prop.Detach(value); + return S_OK; +} + +HRESULT CHandler::ReadItem2(ISequentialInStream *stream, bool &filled, CItemEx &item) +{ + item.HeaderPos = _phySize; + RINOK(ReadItem(stream, filled, item, _errorMessage)); + _phySize += item.HeaderSize; + _headersSize += item.HeaderSize; + return S_OK; +} + +HRESULT CHandler::Open2(IInStream *stream, IArchiveOpenCallback *callback) +{ + UInt64 endPos = 0; + { + RINOK(stream->Seek(0, STREAM_SEEK_END, &endPos)); + RINOK(stream->Seek(0, STREAM_SEEK_SET, NULL)); + } + + _phySizeDefined = true; + for (;;) + { + CItemEx item; + bool filled; + RINOK(ReadItem2(stream, filled, item)); + if (!filled) + break; + _items.Add(item); + + RINOK(stream->Seek(item.GetPackSize(), STREAM_SEEK_CUR, &_phySize)); + if (_phySize > endPos) + { + _errorMessage = kUnexpectedEnd; + break; + } + /* + if (_phySize == endPos) + { + _errorMessage = "There are no trailing zero-filled records"; + break; + } + */ + if (callback != NULL) + { + if (_items.Size() == 1) + { + RINOK(callback->SetTotal(NULL, &endPos)); + } + if (_items.Size() % 100 == 0) + { + UInt64 numFiles = _items.Size(); + RINOK(callback->SetCompleted(&numFiles, &_phySize)); + } + } + } + + if (_items.Size() == 0) + { + CMyComPtr openVolumeCallback; + if (!callback) + return S_FALSE; + callback->QueryInterface(IID_IArchiveOpenVolumeCallback, (void **)&openVolumeCallback); + if (!openVolumeCallback) + return S_FALSE; + NCOM::CPropVariant prop; + if (openVolumeCallback->GetProperty(kpidName, &prop) != S_OK) + return S_FALSE; + if (prop.vt != VT_BSTR) + return S_FALSE; + UString baseName = prop.bstrVal; + baseName = baseName.Right(4); + if (baseName.CompareNoCase(L".tar") != 0) + return S_FALSE; + } + return S_OK; +} + +STDMETHODIMP CHandler::Open(IInStream *stream, const UInt64 *, IArchiveOpenCallback *openArchiveCallback) +{ + COM_TRY_BEGIN + { + Close(); + RINOK(Open2(stream, openArchiveCallback)); + _stream = stream; + } + return S_OK; + COM_TRY_END +} + +STDMETHODIMP CHandler::OpenSeq(ISequentialInStream *stream) +{ + Close(); + _seqStream = stream; + return S_OK; +} + +STDMETHODIMP CHandler::Close() +{ + _errorMessage.Empty(); + _phySizeDefined = false; + _phySize = 0; + _headersSize = 0; + _curIndex = 0; + _latestIsRead = false; + _items.Clear(); + _seqStream.Release(); + _stream.Release(); + return S_OK; +} + +STDMETHODIMP CHandler::GetNumberOfItems(UInt32 *numItems) +{ + *numItems = (_stream ? _items.Size() : (UInt32)(Int32)-1); + return S_OK; +} + +CHandler::CHandler() +{ + copyCoderSpec = new NCompress::CCopyCoder(); + copyCoder = copyCoderSpec; +} + +HRESULT CHandler::SkipTo(UInt32 index) +{ + while (_curIndex < index || !_latestIsRead) + { + if (_latestIsRead) + { + UInt64 packSize = _latestItem.GetPackSize(); + RINOK(copyCoderSpec->Code(_seqStream, NULL, &packSize, &packSize, NULL)); + _phySize += copyCoderSpec->TotalSize; + if (copyCoderSpec->TotalSize != packSize) + { + _errorMessage = kUnexpectedEnd; + return S_FALSE; + } + _latestIsRead = false; + _curIndex++; + } + else + { + bool filled; + RINOK(ReadItem2(_seqStream, filled, _latestItem)); + if (!filled) + { + _phySizeDefined = true; + return E_INVALIDARG; + } + _latestIsRead = true; + } + } + return S_OK; +} + +static UString TarStringToUnicode(const AString &s) +{ + return MultiByteToUnicodeString(s, CP_OEMCP); +} + +STDMETHODIMP CHandler::GetProperty(UInt32 index, PROPID propID, PROPVARIANT *value) +{ + COM_TRY_BEGIN + NWindows::NCOM::CPropVariant prop; + + const CItemEx *item; + if (_stream) + item = &_items[index]; + else + { + if (index < _curIndex) + return E_INVALIDARG; + else + { + RINOK(SkipTo(index)); + item = &_latestItem; + } + } + + switch(propID) + { + case kpidPath: prop = NItemName::GetOSName2(TarStringToUnicode(item->Name)); break; + case kpidIsDir: prop = item->IsDir(); break; + case kpidSize: prop = item->GetUnpackSize(); break; + case kpidPackSize: prop = item->GetPackSize(); break; + case kpidMTime: + if (item->MTime != 0) + { + FILETIME ft; + NTime::UnixTimeToFileTime(item->MTime, ft); + prop = ft; + } + break; + case kpidPosixAttrib: prop = item->Mode; break; + case kpidUser: prop = TarStringToUnicode(item->User); break; + case kpidGroup: prop = TarStringToUnicode(item->Group); break; + case kpidLink: prop = TarStringToUnicode(item->LinkName); break; + } + prop.Detach(value); + return S_OK; + COM_TRY_END +} + +HRESULT CHandler::Extract(const UInt32 *indices, UInt32 numItems, + Int32 testMode, IArchiveExtractCallback *extractCallback) +{ + COM_TRY_BEGIN + ISequentialInStream *stream = _seqStream; + bool seqMode = (_stream == NULL); + if (!seqMode) + stream = _stream; + + bool allFilesMode = (numItems == (UInt32)-1); + if (allFilesMode) + numItems = _items.Size(); + if (_stream && numItems == 0) + return S_OK; + UInt64 totalSize = 0; + UInt32 i; + for (i = 0; i < numItems; i++) + totalSize += _items[allFilesMode ? i : indices[i]].GetUnpackSize(); + extractCallback->SetTotal(totalSize); + + UInt64 totalPackSize; + totalSize = totalPackSize = 0; + + CLocalProgress *lps = new CLocalProgress; + CMyComPtr progress = lps; + lps->Init(extractCallback, false); + + CLimitedSequentialInStream *streamSpec = new CLimitedSequentialInStream; + CMyComPtr inStream(streamSpec); + streamSpec->SetStream(stream); + + CLimitedSequentialOutStream *outStreamSpec = new CLimitedSequentialOutStream; + CMyComPtr outStream(outStreamSpec); + + for (i = 0; i < numItems || seqMode; i++) + { + lps->InSize = totalPackSize; + lps->OutSize = totalSize; + RINOK(lps->SetCur()); + CMyComPtr realOutStream; + Int32 askMode = testMode ? + NExtract::NAskMode::kTest : + NExtract::NAskMode::kExtract; + Int32 index = allFilesMode ? i : indices[i]; + const CItemEx *item; + if (seqMode) + { + HRESULT res = SkipTo(index); + if (res == E_INVALIDARG) + break; + RINOK(res); + item = &_latestItem; + } + else + item = &_items[index]; + + RINOK(extractCallback->GetStream(index, &realOutStream, askMode)); + UInt64 unpackSize = item->GetUnpackSize(); + totalSize += unpackSize; + totalPackSize += item->GetPackSize(); + if (item->IsDir()) + { + RINOK(extractCallback->PrepareOperation(askMode)); + RINOK(extractCallback->SetOperationResult(NExtract::NOperationResult::kOK)); + continue; + } + bool skipMode = false; + if (!testMode && !realOutStream) + { + if (!seqMode) + continue; + skipMode = true; + askMode = NExtract::NAskMode::kSkip; + } + RINOK(extractCallback->PrepareOperation(askMode)); + + outStreamSpec->SetStream(realOutStream); + realOutStream.Release(); + outStreamSpec->Init(skipMode ? 0 : unpackSize, true); + + if (item->IsLink()) + { + RINOK(WriteStream(outStreamSpec, (const char *)item->LinkName, item->LinkName.Length())); + } + else + { + if (!seqMode) + { + RINOK(_stream->Seek(item->GetDataPosition(), STREAM_SEEK_SET, NULL)); + } + streamSpec->Init(item->GetPackSize()); + RINOK(copyCoder->Code(inStream, outStream, NULL, NULL, progress)); + } + if (seqMode) + { + _latestIsRead = false; + _curIndex++; + } + outStreamSpec->ReleaseStream(); + RINOK(extractCallback->SetOperationResult(outStreamSpec->GetRem() == 0 ? + NExtract::NOperationResult::kOK: + NExtract::NOperationResult::kDataError)); + } + return S_OK; + COM_TRY_END +} + +STDMETHODIMP CHandler::GetStream(UInt32 index, ISequentialInStream **stream) +{ + COM_TRY_BEGIN + const CItemEx &item = _items[index]; + if (item.IsLink()) + { + CBufInStream *streamSpec = new CBufInStream; + CMyComPtr streamTemp = streamSpec; + streamSpec->Init((const Byte *)(const char *)item.LinkName, item.LinkName.Length(), (IInArchive *)this); + *stream = streamTemp.Detach(); + return S_OK; + } + return CreateLimitedInStream(_stream, item.GetDataPosition(), item.Size, stream); + COM_TRY_END +} + +}} diff --git a/CPP/7zip/Archive/Tar/TarHandler.h b/CPP/7zip/Archive/Tar/TarHandler.h new file mode 100644 index 0000000..b196706 --- /dev/null +++ b/CPP/7zip/Archive/Tar/TarHandler.h @@ -0,0 +1,61 @@ +// TarHandler.h + +#ifndef __TAR_HANDLER_H +#define __TAR_HANDLER_H + +#include "Common/MyCom.h" +#include "../IArchive.h" + +#include "../../Compress/CopyCoder.h" + +#include "TarItem.h" + +namespace NArchive { +namespace NTar { + +class CHandler: + public IInArchive, + public IArchiveOpenSeq, + public IInArchiveGetStream, + public IOutArchive, + public CMyUnknownImp +{ + CObjectVector _items; + CMyComPtr _stream; + CMyComPtr _seqStream; + + UInt32 _curIndex; + bool _latestIsRead; + CItemEx _latestItem; + + UInt64 _phySize; + UInt64 _headersSize; + bool _phySizeDefined; + AString _errorMessage; + + NCompress::CCopyCoder *copyCoderSpec; + CMyComPtr copyCoder; + + HRESULT ReadItem2(ISequentialInStream *stream, bool &filled, CItemEx &itemInfo); + HRESULT Open2(IInStream *stream, IArchiveOpenCallback *callback); + HRESULT SkipTo(UInt32 index); + +public: + MY_UNKNOWN_IMP4( + IInArchive, + IArchiveOpenSeq, + IInArchiveGetStream, + IOutArchive + ) + + INTERFACE_IInArchive(;) + INTERFACE_IOutArchive(;) + STDMETHOD(OpenSeq)(ISequentialInStream *stream); + STDMETHOD(GetStream)(UInt32 index, ISequentialInStream **stream); + + CHandler(); +}; + +}} + +#endif diff --git a/CPP/7zip/Archive/Tar/TarHandlerOut.cpp b/CPP/7zip/Archive/Tar/TarHandlerOut.cpp new file mode 100644 index 0000000..ffdf2b1 --- /dev/null +++ b/CPP/7zip/Archive/Tar/TarHandlerOut.cpp @@ -0,0 +1,122 @@ +// TarHandlerOut.cpp + +#include "StdAfx.h" + +#include "Common/ComTry.h" +#include "Common/StringConvert.h" + +#include "Windows/PropVariant.h" +#include "Windows/Time.h" + +#include "TarHandler.h" +#include "TarUpdate.h" + +using namespace NWindows; + +namespace NArchive { +namespace NTar { + +STDMETHODIMP CHandler::GetFileTimeType(UInt32 *type) +{ + *type = NFileTimeType::kUnix; + return S_OK; +} + +static HRESULT GetPropString(IArchiveUpdateCallback *callback, UInt32 index, PROPID propId, AString &res) +{ + NCOM::CPropVariant prop; + RINOK(callback->GetProperty(index, propId, &prop)); + if (prop.vt == VT_BSTR) + res = UnicodeStringToMultiByte(prop.bstrVal, CP_OEMCP); + else if (prop.vt != VT_EMPTY) + return E_INVALIDARG; + return S_OK; +} + +STDMETHODIMP CHandler::UpdateItems(ISequentialOutStream *outStream, UInt32 numItems, + IArchiveUpdateCallback *callback) +{ + COM_TRY_BEGIN + if ((_stream && !_errorMessage.IsEmpty()) || _seqStream) + return E_NOTIMPL; + CObjectVector updateItems; + for (UInt32 i = 0; i < numItems; i++) + { + CUpdateItem ui; + Int32 newData; + Int32 newProps; + UInt32 indexInArchive; + if (!callback) + return E_FAIL; + RINOK(callback->GetUpdateItemInfo(i, &newData, &newProps, &indexInArchive)); + ui.NewProps = IntToBool(newProps); + ui.NewData = IntToBool(newData); + ui.IndexInArchive = indexInArchive; + ui.IndexInClient = i; + + if (IntToBool(newProps)) + { + { + NCOM::CPropVariant prop; + RINOK(callback->GetProperty(i, kpidIsDir, &prop)); + if (prop.vt == VT_EMPTY) + ui.IsDir = false; + else if (prop.vt != VT_BOOL) + return E_INVALIDARG; + else + ui.IsDir = (prop.boolVal != VARIANT_FALSE); + } + + { + NCOM::CPropVariant prop; + RINOK(callback->GetProperty(i, kpidPosixAttrib, &prop)); + if (prop.vt == VT_EMPTY) + ui.Mode = 0777 | (ui.IsDir ? 0040000 : 0100000); + else if (prop.vt != VT_UI4) + return E_INVALIDARG; + else + ui.Mode = prop.ulVal; + } + { + NCOM::CPropVariant prop; + RINOK(callback->GetProperty(i, kpidMTime, &prop)); + if (prop.vt == VT_EMPTY) + ui.Time = 0; + else if (prop.vt != VT_FILETIME) + return E_INVALIDARG; + else if (!NTime::FileTimeToUnixTime(prop.filetime, ui.Time)) + ui.Time = 0; + } + { + NCOM::CPropVariant prop; + RINOK(callback->GetProperty(i, kpidPath, &prop)); + if (prop.vt == VT_BSTR) + ui.Name = UnicodeStringToMultiByte(NItemName::MakeLegalName(prop.bstrVal), CP_OEMCP); + else if (prop.vt != VT_EMPTY) + return E_INVALIDARG; + if (ui.IsDir) + ui.Name += '/'; + } + RINOK(GetPropString(callback, i, kpidUser, ui.User)); + RINOK(GetPropString(callback, i, kpidGroup, ui.Group)); + } + if (IntToBool(newData)) + { + NCOM::CPropVariant prop; + RINOK(callback->GetProperty(i, kpidSize, &prop)); + if (prop.vt != VT_UI8) + return E_INVALIDARG; + ui.Size = prop.uhVal.QuadPart; + /* + // now we support GNU extension for big files + if (ui.Size >= ((UInt64)1 << 33)) + return E_INVALIDARG; + */ + } + updateItems.Add(ui); + } + return UpdateArchive(_stream, outStream, _items, updateItems, callback); + COM_TRY_END +} + +}} diff --git a/CPP/7zip/Archive/Tar/TarHeader.cpp b/CPP/7zip/Archive/Tar/TarHeader.cpp new file mode 100644 index 0000000..3275b28 --- /dev/null +++ b/CPP/7zip/Archive/Tar/TarHeader.cpp @@ -0,0 +1,25 @@ +// Archive/Tar/Header.h + +#include "StdAfx.h" + +#include "TarHeader.h" + +namespace NArchive { +namespace NTar { +namespace NFileHeader { + + // The checksum field is filled with this while the checksum is computed. + const char *kCheckSumBlanks = " "; // 8 blanks, no null + + const char *kLongLink = "././@LongLink"; + const char *kLongLink2 = "@LongLink"; + + // The magic field is filled with this if uname and gname are valid. + namespace NMagic + { + const char *kUsTar = "ustar"; // 5 chars + const char *kGNUTar = "GNUtar "; // 7 chars and a null + const char *kEmpty = "\0\0\0\0\0\0\0\0"; // 7 chars and a null + } + +}}} diff --git a/CPP/7zip/Archive/Tar/TarHeader.h b/CPP/7zip/Archive/Tar/TarHeader.h new file mode 100644 index 0000000..0b78bdc --- /dev/null +++ b/CPP/7zip/Archive/Tar/TarHeader.h @@ -0,0 +1,108 @@ +// Archive/Tar/Header.h + +#ifndef __ARCHIVE_TAR_HEADER_H +#define __ARCHIVE_TAR_HEADER_H + +#include "Common/Types.h" + +namespace NArchive { +namespace NTar { + +namespace NFileHeader +{ + const int kRecordSize = 512; + const int kNameSize = 100; + const int kUserNameSize = 32; + const int kGroupNameSize = 32; + const int kPrefixSize = 155; + + /* + struct CHeader + { + char Name[kNameSize]; + char Mode[8]; + char UID[8]; + char GID[8]; + char Size[12]; + char ModificationTime[12]; + char CheckSum[8]; + char LinkFlag; + char LinkName[kNameSize]; + char Magic[8]; + char UserName[kUserNameSize]; + char GroupName[kGroupNameSize]; + char DeviceMajor[8]; + char DeviceMinor[8]; + char Prefix[155]; + }; + union CRecord + { + CHeader Header; + Byte Padding[kRecordSize]; + }; + */ + + namespace NMode + { + const int kSetUID = 04000; // Set UID on execution + const int kSetGID = 02000; // Set GID on execution + const int kSaveText = 01000; // Save text (sticky bit) + } + + namespace NFilePermissions + { + const int kUserRead = 00400; // read by owner + const int kUserWrite = 00200; // write by owner + const int kUserExecute = 00100; // execute/search by owner + const int kGroupRead = 00040; // read by group + const int kGroupWrite = 00020; // write by group + const int kGroupExecute = 00010; // execute/search by group + const int kOtherRead = 00004; // read by other + const int kOtherWrite = 00002; // write by other + const int kOtherExecute = 00001; // execute/search by other + } + + + // The linkflag defines the type of file + namespace NLinkFlag + { + const char kOldNormal = '\0'; // Normal disk file, Unix compatible + const char kNormal = '0'; // Normal disk file + const char kLink = '1'; // Link to previously dumped file + const char kSymbolicLink = '2'; // Symbolic link + const char kCharacter = '3'; // Character special file + const char kBlock = '4'; // Block special file + const char kDirectory = '5'; // Directory + const char kFIFO = '6'; // FIFO special file + const char kContiguous = '7'; // Contiguous file + + const char kDumpDir = 'D'; /* GNUTYPE_DUMPDIR. + data: list of files created by the --incremental (-G) option + Each file name is preceded by either + - 'Y' (file should be in this archive) + - 'N' (file is a directory, or is not stored in the archive.) + Each file name is terminated by a null + an additional null after + the last file name. */ + + } + // Further link types may be defined later. + + // The checksum field is filled with this while the checksum is computed. + extern const char *kCheckSumBlanks;// = " "; // 8 blanks, no null + + extern const char *kLongLink; // = "././@LongLink"; + extern const char *kLongLink2; // = "@LongLink"; + + // The magic field is filled with this if uname and gname are valid. + namespace NMagic + { + extern const char *kUsTar; // = "ustar"; // 5 chars + extern const char *kGNUTar; // = "GNUtar "; // 7 chars and a null + extern const char *kEmpty; // = "GNUtar "; // 7 chars and a null + } + +} + +}} + +#endif diff --git a/CPP/7zip/Archive/Tar/TarIn.cpp b/CPP/7zip/Archive/Tar/TarIn.cpp new file mode 100644 index 0000000..5ceaa50 --- /dev/null +++ b/CPP/7zip/Archive/Tar/TarIn.cpp @@ -0,0 +1,207 @@ +// TarIn.cpp + +#include "StdAfx.h" + +#include "../../../../C/CpuArch.h" + +#include "Common/StringToInt.h" + +#include "../../Common/StreamUtils.h" + +#include "TarIn.h" + +namespace NArchive { +namespace NTar { + +static void MyStrNCpy(char *dest, const char *src, int size) +{ + for (int i = 0; i < size; i++) + { + char c = src[i]; + dest[i] = c; + if (c == 0) + break; + } +} + +static bool OctalToNumber(const char *srcString, int size, UInt64 &res) +{ + char sz[32]; + MyStrNCpy(sz, srcString, size); + sz[size] = 0; + const char *end; + int i; + for (i = 0; sz[i] == ' '; i++); + res = ConvertOctStringToUInt64(sz + i, &end); + return (*end == ' ' || *end == 0); +} + +static bool OctalToNumber32(const char *srcString, int size, UInt32 &res) +{ + UInt64 res64; + if (!OctalToNumber(srcString, size, res64)) + return false; + res = (UInt32)res64; + return (res64 <= 0xFFFFFFFF); +} + +#define RIF(x) { if (!(x)) return S_FALSE; } + +static bool IsRecordLast(const char *buf) +{ + for (int i = 0; i < NFileHeader::kRecordSize; i++) + if (buf[i] != 0) + return false; + return true; +} + +static void ReadString(const char *s, int size, AString &result) +{ + char temp[NFileHeader::kRecordSize + 1]; + MyStrNCpy(temp, s, size); + temp[size] = '\0'; + result = temp; +} + +static HRESULT GetNextItemReal(ISequentialInStream *stream, bool &filled, CItemEx &item, AString &error) +{ + char buf[NFileHeader::kRecordSize]; + char *p = buf; + + error.Empty(); + filled = false; + + bool thereAreEmptyRecords = false; + for (;;) + { + size_t processedSize = NFileHeader::kRecordSize; + RINOK(ReadStream(stream, buf, &processedSize)); + if (processedSize == 0) + { + if (!thereAreEmptyRecords ) + error = "There are no trailing zero-filled records"; + return S_OK; + } + if (processedSize != NFileHeader::kRecordSize) + { + error = "There is no correct record at the end of archive"; + return S_OK; + } + item.HeaderSize += NFileHeader::kRecordSize; + if (!IsRecordLast(buf)) + break; + thereAreEmptyRecords = true; + } + if (thereAreEmptyRecords) + { + error = "There are data after end of archive"; + return S_OK; + } + + ReadString(p, NFileHeader::kNameSize, item.Name); p += NFileHeader::kNameSize; + + RIF(OctalToNumber32(p, 8, item.Mode)); p += 8; + + if (!OctalToNumber32(p, 8, item.UID)) item.UID = 0; p += 8; + if (!OctalToNumber32(p, 8, item.GID)) item.GID = 0; p += 8; + + if (GetBe32(p) == (UInt32)1 << 31) + { + // GNU extension + item.Size = GetBe64(p + 4); + } + else + { + RIF(OctalToNumber(p, 12, item.Size)); + } + p += 12; + RIF(OctalToNumber32(p, 12, item.MTime)); p += 12; + + UInt32 checkSum; + RIF(OctalToNumber32(p, 8, checkSum)); + memcpy(p, NFileHeader::kCheckSumBlanks, 8); p += 8; + + item.LinkFlag = *p++; + + ReadString(p, NFileHeader::kNameSize, item.LinkName); p += NFileHeader::kNameSize; + + memcpy(item.Magic, p, 8); p += 8; + + ReadString(p, NFileHeader::kUserNameSize, item.User); p += NFileHeader::kUserNameSize; + ReadString(p, NFileHeader::kGroupNameSize, item.Group); p += NFileHeader::kGroupNameSize; + + item.DeviceMajorDefined = (p[0] != 0); RIF(OctalToNumber32(p, 8, item.DeviceMajor)); p += 8; + item.DeviceMinorDefined = (p[0] != 0); RIF(OctalToNumber32(p, 8, item.DeviceMinor)); p += 8; + + AString prefix; + ReadString(p, NFileHeader::kPrefixSize, prefix); + p += NFileHeader::kPrefixSize; + if (!prefix.IsEmpty() && item.IsMagic() && + (item.LinkFlag != 'L' /* || prefix != "00000000000" */ )) + item.Name = prefix + AString('/') + item.Name; + + if (item.LinkFlag == NFileHeader::NLinkFlag::kLink) + item.Size = 0; + + UInt32 checkSumReal = 0; + for (int i = 0; i < NFileHeader::kRecordSize; i++) + checkSumReal += (Byte)buf[i]; + + if (checkSumReal != checkSum) + return S_FALSE; + + filled = true; + return S_OK; +} + +HRESULT ReadItem(ISequentialInStream *stream, bool &filled, CItemEx &item, AString &error) +{ + item.HeaderSize = 0; + bool flagL = false; + bool flagK = false; + AString nameL; + AString nameK; + for (;;) + { + RINOK(GetNextItemReal(stream, filled, item, error)); + if (!filled) + return S_OK; + if (item.LinkFlag == 'L' || // NEXT file has a long name + item.LinkFlag == 'K') // NEXT file has a long linkname + { + AString *name; + if (item.LinkFlag == 'L') + { if (flagL) return S_FALSE; flagL = true; name = &nameL; } + else + { if (flagK) return S_FALSE; flagK = true; name = &nameK; } + + if (item.Name.Compare(NFileHeader::kLongLink) != 0 && + item.Name.Compare(NFileHeader::kLongLink2) != 0) + return S_FALSE; + if (item.Size > (1 << 14)) + return S_FALSE; + int packSize = (int)item.GetPackSize(); + char *buf = name->GetBuffer(packSize); + RINOK(ReadStream_FALSE(stream, buf, packSize)); + item.HeaderSize += packSize; + buf[(size_t)item.Size] = '\0'; + name->ReleaseBuffer(); + continue; + } + if (item.LinkFlag == 'g' || item.LinkFlag == 'x' || item.LinkFlag == 'X') + { + // pax Extended Header + } + else if (item.LinkFlag == NFileHeader::NLinkFlag::kDumpDir) + { + // GNU Extensions to the Archive Format + } + else if (item.LinkFlag > '7' || (item.LinkFlag < '0' && item.LinkFlag != 0)) + return S_FALSE; + if (flagL) item.Name = nameL; + if (flagK) item.LinkName = nameK; + return S_OK; + } +} + +}} diff --git a/CPP/7zip/Archive/Tar/TarIn.h b/CPP/7zip/Archive/Tar/TarIn.h new file mode 100644 index 0000000..a5491eb --- /dev/null +++ b/CPP/7zip/Archive/Tar/TarIn.h @@ -0,0 +1,17 @@ +// TarIn.h + +#ifndef __ARCHIVE_TAR_IN_H +#define __ARCHIVE_TAR_IN_H + +#include "../../IStream.h" + +#include "TarItem.h" + +namespace NArchive { +namespace NTar { + +HRESULT ReadItem(ISequentialInStream *stream, bool &filled, CItemEx &itemInfo, AString &error); + +}} + +#endif diff --git a/CPP/7zip/Archive/Tar/TarItem.h b/CPP/7zip/Archive/Tar/TarItem.h new file mode 100644 index 0000000..859e66d --- /dev/null +++ b/CPP/7zip/Archive/Tar/TarItem.h @@ -0,0 +1,72 @@ +// TarItem.h + +#ifndef __ARCHIVE_TAR_ITEM_H +#define __ARCHIVE_TAR_ITEM_H + +#include "../Common/ItemNameUtils.h" + +#include "TarHeader.h" + +namespace NArchive { +namespace NTar { + +struct CItem +{ + AString Name; + UInt64 Size; + + UInt32 Mode; + UInt32 UID; + UInt32 GID; + UInt32 MTime; + UInt32 DeviceMajor; + UInt32 DeviceMinor; + + AString LinkName; + AString User; + AString Group; + + char Magic[8]; + char LinkFlag; + bool DeviceMajorDefined; + bool DeviceMinorDefined; + + bool IsLink() const { return LinkFlag == NFileHeader::NLinkFlag::kSymbolicLink && (Size == 0); } + UInt64 GetUnpackSize() const { return IsLink() ? LinkName.Length() : Size; } + + bool IsDir() const + { + switch(LinkFlag) + { + case NFileHeader::NLinkFlag::kDirectory: + case NFileHeader::NLinkFlag::kDumpDir: + return true; + case NFileHeader::NLinkFlag::kOldNormal: + case NFileHeader::NLinkFlag::kNormal: + return NItemName::HasTailSlash(Name, CP_OEMCP); + } + return false; + } + + bool IsMagic() const + { + for (int i = 0; i < 5; i++) + if (Magic[i] != NFileHeader::NMagic::kUsTar[i]) + return false; + return true; + } + + UInt64 GetPackSize() const { return (Size + 0x1FF) & (~((UInt64)0x1FF)); } +}; + +struct CItemEx: public CItem +{ + UInt64 HeaderPos; + unsigned HeaderSize; + UInt64 GetDataPosition() const { return HeaderPos + HeaderSize; } + UInt64 GetFullSize() const { return HeaderSize + Size; } +}; + +}} + +#endif diff --git a/CPP/7zip/Archive/Tar/TarOut.cpp b/CPP/7zip/Archive/Tar/TarOut.cpp new file mode 100644 index 0000000..e542a3b --- /dev/null +++ b/CPP/7zip/Archive/Tar/TarOut.cpp @@ -0,0 +1,187 @@ +// TarOut.cpp + +#include "StdAfx.h" + +#include "Common/IntToString.h" + +#include "../../Common/StreamUtils.h" + +#include "TarOut.h" + +namespace NArchive { +namespace NTar { + +HRESULT COutArchive::WriteBytes(const void *buffer, UInt32 size) +{ + return WriteStream(m_Stream, buffer, size); +} + +void COutArchive::Create(ISequentialOutStream *outStream) +{ + m_Stream = outStream; +} + +static AString MakeOctalString(UInt64 value) +{ + char s[32]; + ConvertUInt64ToString(value, s, 8); + return AString(s) + ' '; +} + +static void MyStrNCpy(char *dest, const char *src, int size) +{ + for (int i = 0; i < size; i++) + { + char c = src[i]; + dest[i] = c; + if (c == 0) + break; + } +} + +static bool MakeOctalString8(char *s, UInt32 value) +{ + AString tempString = MakeOctalString(value); + + const int kMaxSize = 8; + if (tempString.Length() >= kMaxSize) + return false; + int numSpaces = kMaxSize - (tempString.Length() + 1); + for(int i = 0; i < numSpaces; i++) + s[i] = ' '; + MyStringCopy(s + numSpaces, (const char *)tempString); + return true; +} + +static void MakeOctalString12(char *s, UInt64 value) +{ + AString tempString = MakeOctalString(value); + const int kMaxSize = 12; + if (tempString.Length() > kMaxSize) + { + // GNU extension; + s[0] = (char)(Byte)0x80; + s[1] = s[2] = s[3] = 0; + for (int i = 0; i < 8; i++, value <<= 8) + s[4 + i] = (char)(value >> 56); + return; + } + int numSpaces = kMaxSize - tempString.Length(); + for(int i = 0; i < numSpaces; i++) + s[i] = ' '; + memmove(s + numSpaces, (const char *)tempString, tempString.Length()); +} + +static bool CopyString(char *dest, const AString &src, int maxSize) +{ + if (src.Length() >= maxSize) + return false; + MyStringCopy(dest, (const char *)src); + return true; +} + +#define RETURN_IF_NOT_TRUE(x) { if (!(x)) return E_FAIL; } + +HRESULT COutArchive::WriteHeaderReal(const CItem &item) +{ + char record[NFileHeader::kRecordSize]; + char *cur = record; + int i; + for (i = 0; i < NFileHeader::kRecordSize; i++) + record[i] = 0; + + // RETURN_IF_NOT_TRUE(CopyString(header.Name, item.Name, NFileHeader::kNameSize)); + if (item.Name.Length() > NFileHeader::kNameSize) + return E_FAIL; + MyStrNCpy(cur, item.Name, NFileHeader::kNameSize); + cur += NFileHeader::kNameSize; + + RETURN_IF_NOT_TRUE(MakeOctalString8(cur, item.Mode)); cur += 8; + RETURN_IF_NOT_TRUE(MakeOctalString8(cur, item.UID)); cur += 8; + RETURN_IF_NOT_TRUE(MakeOctalString8(cur, item.GID)); cur += 8; + + MakeOctalString12(cur, item.Size); cur += 12; + MakeOctalString12(cur, item.MTime); cur += 12; + + memmove(cur, NFileHeader::kCheckSumBlanks, 8); + cur += 8; + + *cur++ = item.LinkFlag; + + RETURN_IF_NOT_TRUE(CopyString(cur, item.LinkName, NFileHeader::kNameSize)); + cur += NFileHeader::kNameSize; + + memmove(cur, item.Magic, 8); + cur += 8; + + RETURN_IF_NOT_TRUE(CopyString(cur, item.User, NFileHeader::kUserNameSize)); + cur += NFileHeader::kUserNameSize; + RETURN_IF_NOT_TRUE(CopyString(cur, item.Group, NFileHeader::kGroupNameSize)); + cur += NFileHeader::kGroupNameSize; + + + if (item.DeviceMajorDefined) + RETURN_IF_NOT_TRUE(MakeOctalString8(cur, item.DeviceMajor)); + cur += 8; + + if (item.DeviceMinorDefined) + RETURN_IF_NOT_TRUE(MakeOctalString8(cur, item.DeviceMinor)); + cur += 8; + + + UInt32 checkSumReal = 0; + for(i = 0; i < NFileHeader::kRecordSize; i++) + checkSumReal += Byte(record[i]); + + RETURN_IF_NOT_TRUE(MakeOctalString8(record + 148, checkSumReal)); + + return WriteBytes(record, NFileHeader::kRecordSize); +} + +HRESULT COutArchive::WriteHeader(const CItem &item) +{ + int nameSize = item.Name.Length(); + if (nameSize < NFileHeader::kNameSize) + return WriteHeaderReal(item); + + CItem modifiedItem = item; + int nameStreamSize = nameSize + 1; + modifiedItem.Size = nameStreamSize; + modifiedItem.LinkFlag = 'L'; + modifiedItem.Name = NFileHeader::kLongLink; + modifiedItem.LinkName.Empty(); + RINOK(WriteHeaderReal(modifiedItem)); + RINOK(WriteBytes(item.Name, nameStreamSize)); + RINOK(FillDataResidual(nameStreamSize)); + + modifiedItem = item; + modifiedItem.Name = item.Name.Left(NFileHeader::kNameSize - 1); + return WriteHeaderReal(modifiedItem); +} + +HRESULT COutArchive::FillDataResidual(UInt64 dataSize) +{ + UInt32 lastRecordSize = UInt32(dataSize & (NFileHeader::kRecordSize - 1)); + if (lastRecordSize == 0) + return S_OK; + UInt32 residualSize = NFileHeader::kRecordSize - lastRecordSize; + Byte residualBytes[NFileHeader::kRecordSize]; + for (UInt32 i = 0; i < residualSize; i++) + residualBytes[i] = 0; + return WriteBytes(residualBytes, residualSize); +} + +HRESULT COutArchive::WriteFinishHeader() +{ + Byte record[NFileHeader::kRecordSize]; + int i; + for (i = 0; i < NFileHeader::kRecordSize; i++) + record[i] = 0; + for (i = 0; i < 2; i++) + { + RINOK(WriteBytes(record, NFileHeader::kRecordSize)); + } + return S_OK; +} + +}} diff --git a/CPP/7zip/Archive/Tar/TarOut.h b/CPP/7zip/Archive/Tar/TarOut.h new file mode 100644 index 0000000..ef83786 --- /dev/null +++ b/CPP/7zip/Archive/Tar/TarOut.h @@ -0,0 +1,28 @@ +// Archive/TarOut.h + +#ifndef __ARCHIVE_TAR_OUT_H +#define __ARCHIVE_TAR_OUT_H + +#include "TarItem.h" + +#include "Common/MyCom.h" +#include "../../IStream.h" + +namespace NArchive { +namespace NTar { + +class COutArchive +{ + CMyComPtr m_Stream; + HRESULT WriteBytes(const void *buffer, UInt32 size); +public: + void Create(ISequentialOutStream *outStream); + HRESULT WriteHeaderReal(const CItem &item); + HRESULT WriteHeader(const CItem &item); + HRESULT FillDataResidual(UInt64 dataSize); + HRESULT WriteFinishHeader(); +}; + +}} + +#endif diff --git a/CPP/7zip/Archive/Tar/TarRegister.cpp b/CPP/7zip/Archive/Tar/TarRegister.cpp new file mode 100644 index 0000000..e21c0aa --- /dev/null +++ b/CPP/7zip/Archive/Tar/TarRegister.cpp @@ -0,0 +1,18 @@ +// TarRegister.cpp + +#include "StdAfx.h" + +#include "../../Common/RegisterArc.h" + +#include "TarHandler.h" +static IInArchive *CreateArc() { return new NArchive::NTar::CHandler; } +#ifndef EXTRACT_ONLY +static IOutArchive *CreateArcOut() { return new NArchive::NTar::CHandler; } +#else +#define CreateArcOut 0 +#endif + +static CArcInfo g_ArcInfo = +{ L"tar", L"tar", 0, 0xEE, { 'u', 's', 't', 'a', 'r' }, 5, false, CreateArc, CreateArcOut }; + +REGISTER_ARC(Tar) diff --git a/CPP/7zip/Archive/Tar/TarUpdate.cpp b/CPP/7zip/Archive/Tar/TarUpdate.cpp new file mode 100644 index 0000000..c163321 --- /dev/null +++ b/CPP/7zip/Archive/Tar/TarUpdate.cpp @@ -0,0 +1,139 @@ +// TarUpdate.cpp + +#include "StdAfx.h" + +#include "../../Common/LimitedStreams.h" +#include "../../Common/ProgressUtils.h" + +#include "../../Compress/CopyCoder.h" + +#include "TarOut.h" +#include "TarUpdate.h" + +namespace NArchive { +namespace NTar { + +HRESULT UpdateArchive(IInStream *inStream, ISequentialOutStream *outStream, + const CObjectVector &inputItems, + const CObjectVector &updateItems, + IArchiveUpdateCallback *updateCallback) +{ + COutArchive outArchive; + outArchive.Create(outStream); + + UInt64 complexity = 0; + + int i; + for(i = 0; i < updateItems.Size(); i++) + { + const CUpdateItem &ui = updateItems[i]; + if (ui.NewData) + complexity += ui.Size; + else + complexity += inputItems[ui.IndexInArchive].GetFullSize(); + } + + RINOK(updateCallback->SetTotal(complexity)); + + NCompress::CCopyCoder *copyCoderSpec = new NCompress::CCopyCoder; + CMyComPtr copyCoder = copyCoderSpec; + + CLocalProgress *lps = new CLocalProgress; + CMyComPtr progress = lps; + lps->Init(updateCallback, true); + + CLimitedSequentialInStream *streamSpec = new CLimitedSequentialInStream; + CMyComPtr inStreamLimited(streamSpec); + streamSpec->SetStream(inStream); + + complexity = 0; + + for(i = 0; i < updateItems.Size(); i++) + { + lps->InSize = lps->OutSize = complexity; + RINOK(lps->SetCur()); + + const CUpdateItem &ui = updateItems[i]; + CItem item; + if (ui.NewProps) + { + item.Mode = ui.Mode; + item.Name = ui.Name; + item.User = ui.User; + item.Group = ui.Group; + if (ui.IsDir) + { + item.LinkFlag = NFileHeader::NLinkFlag::kDirectory; + item.Size = 0; + } + else + { + item.LinkFlag = NFileHeader::NLinkFlag::kNormal; + item.Size = ui.Size; + } + item.MTime = ui.Time; + item.DeviceMajorDefined = false; + item.DeviceMinorDefined = false; + item.UID = 0; + item.GID = 0; + memmove(item.Magic, NFileHeader::NMagic::kEmpty, 8); + } + else + item = inputItems[ui.IndexInArchive]; + + if (ui.NewData) + { + item.Size = ui.Size; + if (item.Size == (UInt64)(Int64)-1) + return E_INVALIDARG; + } + else + item.Size = inputItems[ui.IndexInArchive].Size; + + if (ui.NewData) + { + CMyComPtr fileInStream; + HRESULT res = updateCallback->GetStream(ui.IndexInClient, &fileInStream); + if (res != S_FALSE) + { + RINOK(res); + RINOK(outArchive.WriteHeader(item)); + if (!ui.IsDir) + { + RINOK(copyCoder->Code(fileInStream, outStream, NULL, NULL, progress)); + if (copyCoderSpec->TotalSize != item.Size) + return E_FAIL; + RINOK(outArchive.FillDataResidual(item.Size)); + } + } + complexity += ui.Size; + RINOK(updateCallback->SetOperationResult(NArchive::NUpdate::NOperationResult::kOK)); + } + else + { + const CItemEx &existItem = inputItems[ui.IndexInArchive]; + UInt64 size; + if (ui.NewProps) + { + RINOK(outArchive.WriteHeader(item)); + RINOK(inStream->Seek(existItem.GetDataPosition(), STREAM_SEEK_SET, NULL)); + size = existItem.Size; + } + else + { + RINOK(inStream->Seek(existItem.HeaderPos, STREAM_SEEK_SET, NULL)); + size = existItem.GetFullSize(); + } + streamSpec->Init(size); + + RINOK(copyCoder->Code(inStreamLimited, outStream, NULL, NULL, progress)); + if (copyCoderSpec->TotalSize != size) + return E_FAIL; + RINOK(outArchive.FillDataResidual(existItem.Size)); + complexity += size; + } + } + return outArchive.WriteFinishHeader(); +} + +}} diff --git a/CPP/7zip/Archive/Tar/TarUpdate.h b/CPP/7zip/Archive/Tar/TarUpdate.h new file mode 100644 index 0000000..fb217d1 --- /dev/null +++ b/CPP/7zip/Archive/Tar/TarUpdate.h @@ -0,0 +1,34 @@ +// TarUpdate.h + +#ifndef __TAR_UPDATE_H +#define __TAR_UPDATE_H + +#include "../IArchive.h" +#include "TarItem.h" + +namespace NArchive { +namespace NTar { + +struct CUpdateItem +{ + int IndexInArchive; + int IndexInClient; + UInt32 Time; + UInt32 Mode; + UInt64 Size; + AString Name; + AString User; + AString Group; + bool NewData; + bool NewProps; + bool IsDir; +}; + +HRESULT UpdateArchive(IInStream *inStream, ISequentialOutStream *outStream, + const CObjectVector &inputItems, + const CObjectVector &updateItems, + IArchiveUpdateCallback *updateCallback); + +}} + +#endif diff --git a/CPP/7zip/Archive/Udf/UdfHandler.cpp b/CPP/7zip/Archive/Udf/UdfHandler.cpp new file mode 100644 index 0000000..c708527 --- /dev/null +++ b/CPP/7zip/Archive/Udf/UdfHandler.cpp @@ -0,0 +1,451 @@ +// UdfHandler.cpp + +#include "StdAfx.h" + +#include "Common/ComTry.h" + +#include "Windows/PropVariant.h" +#include "Windows/Time.h" + +#include "../../Common/LimitedStreams.h" +#include "../../Common/ProgressUtils.h" +#include "../../Common/StreamObjects.h" + +#include "../../Compress/CopyCoder.h" + +#include "UdfHandler.h" + +namespace NArchive { +namespace NUdf { + +void UdfTimeToFileTime(const CTime &t, NWindows::NCOM::CPropVariant &prop) +{ + UInt64 numSecs; + const Byte *d = t.Data; + if (!NWindows::NTime::GetSecondsSince1601(t.GetYear(), d[4], d[5], d[6], d[7], d[8], numSecs)) + return; + if (t.IsLocal()) + numSecs -= t.GetMinutesOffset() * 60; + FILETIME ft; + UInt64 v = (((numSecs * 100 + d[9]) * 100 + d[10]) * 100 + d[11]) * 10; + ft.dwLowDateTime = (UInt32)v; + ft.dwHighDateTime = (UInt32)(v >> 32); + prop = ft; +} + +static STATPROPSTG kProps[] = +{ + { NULL, kpidPath, VT_BSTR}, + { NULL, kpidIsDir, VT_BOOL}, + { NULL, kpidSize, VT_UI8}, + { NULL, kpidPackSize, VT_UI8}, + { NULL, kpidMTime, VT_FILETIME}, + { NULL, kpidATime, VT_FILETIME} +}; + +static STATPROPSTG kArcProps[] = +{ + { NULL, kpidComment, VT_BSTR}, + { NULL, kpidClusterSize, VT_UI4}, + { NULL, kpidCTime, VT_FILETIME} +}; + +IMP_IInArchive_Props +IMP_IInArchive_ArcProps + +STDMETHODIMP CHandler::GetArchiveProperty(PROPID propID, PROPVARIANT *value) +{ + COM_TRY_BEGIN + NWindows::NCOM::CPropVariant prop; + switch(propID) + { + case kpidComment: + { + UString comment = _archive.GetComment(); + if (!comment.IsEmpty()) + prop = comment; + break; + } + + case kpidClusterSize: + if (_archive.LogVols.Size() > 0) + { + UInt32 blockSize = _archive.LogVols[0].BlockSize; + int i; + for (i = 1; i < _archive.LogVols.Size(); i++) + if (_archive.LogVols[i].BlockSize != blockSize) + break; + if (i == _archive.LogVols.Size()) + prop = blockSize; + } + break; + + case kpidCTime: + if (_archive.LogVols.Size() == 1) + { + const CLogVol &vol = _archive.LogVols[0]; + if (vol.FileSets.Size() >= 1) + UdfTimeToFileTime(vol.FileSets[0].RecodringTime, prop); + } + break; + } + prop.Detach(value); + return S_OK; + COM_TRY_END +} + +class CProgressImp: public CProgressVirt +{ + CMyComPtr _callback; + UInt64 _numFiles; + UInt64 _numBytes; +public: + HRESULT SetTotal(UInt64 numBytes); + HRESULT SetCompleted(UInt64 numFiles, UInt64 numBytes); + HRESULT SetCompleted(); + CProgressImp(IArchiveOpenCallback *callback): _callback(callback), _numFiles(0), _numBytes(0) {} +}; + +HRESULT CProgressImp::SetTotal(UInt64 numBytes) +{ + if (_callback) + return _callback->SetTotal(NULL, &numBytes); + return S_OK; +} + +HRESULT CProgressImp::SetCompleted(UInt64 numFiles, UInt64 numBytes) +{ + _numFiles = numFiles; + _numBytes = numBytes; + return SetCompleted(); +} + +HRESULT CProgressImp::SetCompleted() +{ + if (_callback) + return _callback->SetCompleted(&_numFiles, &_numBytes); + return S_OK; +} + +STDMETHODIMP CHandler::Open(IInStream *stream, + const UInt64 * /* maxCheckStartPosition */, + IArchiveOpenCallback *callback) +{ + COM_TRY_BEGIN + { + Close(); + CProgressImp progressImp(callback); + RINOK(_archive.Open(stream, &progressImp)); + bool showVolName = (_archive.LogVols.Size() > 1); + for (int volIndex = 0; volIndex < _archive.LogVols.Size(); volIndex++) + { + const CLogVol &vol = _archive.LogVols[volIndex]; + bool showFileSetName = (vol.FileSets.Size() > 1); + for (int fsIndex = 0; fsIndex < vol.FileSets.Size(); fsIndex++) + { + const CFileSet &fs = vol.FileSets[fsIndex]; + for (int i = ((showVolName || showFileSetName) ? 0 : 1); i < fs.Refs.Size(); i++) + { + CRef2 ref2; + ref2.Vol = volIndex; + ref2.Fs = fsIndex; + ref2.Ref = i; + _refs2.Add(ref2); + } + } + } + _inStream = stream; + } + return S_OK; + COM_TRY_END +} + +STDMETHODIMP CHandler::Close() +{ + _inStream.Release(); + _archive.Clear(); + _refs2.Clear(); + return S_OK; +} + +STDMETHODIMP CHandler::GetNumberOfItems(UInt32 *numItems) +{ + *numItems = _refs2.Size(); + return S_OK; +} + +STDMETHODIMP CHandler::GetProperty(UInt32 index, PROPID propID, PROPVARIANT *value) +{ + COM_TRY_BEGIN + NWindows::NCOM::CPropVariant prop; + { + const CRef2 &ref2 = _refs2[index]; + const CLogVol &vol = _archive.LogVols[ref2.Vol]; + const CRef &ref = vol.FileSets[ref2.Fs].Refs[ref2.Ref]; + const CFile &file = _archive.Files[ref.FileIndex]; + const CItem &item = _archive.Items[file.ItemIndex]; + switch(propID) + { + case kpidPath: prop = _archive.GetItemPath(ref2.Vol, ref2.Fs, ref2.Ref, + _archive.LogVols.Size() > 1, vol.FileSets.Size() > 1); break; + case kpidIsDir: prop = item.IsDir(); break; + case kpidSize: if (!item.IsDir()) prop = (UInt64)item.Size; break; + case kpidPackSize: if (!item.IsDir()) prop = (UInt64)item.NumLogBlockRecorded * vol.BlockSize; break; + case kpidMTime: UdfTimeToFileTime(item.MTime, prop); break; + case kpidATime: UdfTimeToFileTime(item.ATime, prop); break; + } + } + prop.Detach(value); + return S_OK; + COM_TRY_END +} + +struct CSeekExtent +{ + UInt64 Phy; + UInt64 Virt; +}; + +class CExtentsStream: + public IInStream, + public CMyUnknownImp +{ + UInt64 _phyPos; + UInt64 _virtPos; + bool _needStartSeek; + + HRESULT SeekToPhys() { return Stream->Seek(_phyPos, STREAM_SEEK_SET, NULL); } + +public: + CMyComPtr Stream; + CRecordVector Extents; + + MY_UNKNOWN_IMP1(IInStream) + STDMETHOD(Read)(void *data, UInt32 size, UInt32 *processedSize); + STDMETHOD(Seek)(Int64 offset, UInt32 seekOrigin, UInt64 *newPosition); + void ReleaseStream() { Stream.Release(); } + + void Init() + { + _virtPos = 0; + _phyPos = 0; + _needStartSeek = true; + } + +}; + + +STDMETHODIMP CExtentsStream::Read(void *data, UInt32 size, UInt32 *processedSize) +{ + if (processedSize) + *processedSize = 0; + if (size > 0) + { + UInt64 totalSize = Extents.Back().Virt; + if (_virtPos >= totalSize) + return (_virtPos == totalSize) ? S_OK : E_FAIL; + int left = 0, right = Extents.Size() - 1; + for (;;) + { + int mid = (left + right) / 2; + if (mid == left) + break; + if (_virtPos < Extents[mid].Virt) + right = mid; + else + left = mid; + } + + const CSeekExtent &extent = Extents[left]; + UInt64 phyPos = extent.Phy + (_virtPos - extent.Virt); + if (_needStartSeek || _phyPos != phyPos) + { + _needStartSeek = false; + _phyPos = phyPos; + RINOK(SeekToPhys()); + } + + UInt64 rem = Extents[left + 1].Virt - _virtPos; + if (size > rem) + size = (UInt32)rem; + + HRESULT res = Stream->Read(data, size, &size); + _phyPos += size; + _virtPos += size; + if (processedSize) + *processedSize = size; + return res; + } + return S_OK; +} + +STDMETHODIMP CExtentsStream::Seek(Int64 offset, UInt32 seekOrigin, UInt64 *newPosition) +{ + switch(seekOrigin) + { + case STREAM_SEEK_SET: _virtPos = offset; break; + case STREAM_SEEK_CUR: _virtPos += offset; break; + case STREAM_SEEK_END: _virtPos = Extents.Back().Virt + offset; break; + default: return STG_E_INVALIDFUNCTION; + } + if (newPosition) + *newPosition = _virtPos; + return S_OK; +} + +STDMETHODIMP CHandler::GetStream(UInt32 index, ISequentialInStream **stream) +{ + *stream = 0; + + const CRef2 &ref2 = _refs2[index]; + const CLogVol &vol = _archive.LogVols[ref2.Vol]; + const CRef &ref = vol.FileSets[ref2.Fs].Refs[ref2.Ref]; + const CFile &file = _archive.Files[ref.FileIndex]; + const CItem &item = _archive.Items[file.ItemIndex]; + UInt64 size = item.Size; + + if (!item.IsRecAndAlloc() || !item.CheckChunkSizes() || ! _archive.CheckItemExtents(ref2.Vol, item)) + return E_NOTIMPL; + + if (item.IsInline) + { + CBufInStream *inStreamSpec = new CBufInStream; + CMyComPtr inStream = inStreamSpec; + CReferenceBuf *referenceBuf = new CReferenceBuf; + CMyComPtr ref = referenceBuf; + referenceBuf->Buf = item.InlineData; + inStreamSpec->Init(referenceBuf); + *stream = inStream.Detach(); + return S_OK; + } + + CExtentsStream *extentStreamSpec = new CExtentsStream(); + CMyComPtr extentStream = extentStreamSpec; + + extentStreamSpec->Stream = _inStream; + + UInt64 virtOffset = 0; + for (int extentIndex = 0; extentIndex < item.Extents.Size(); extentIndex++) + { + const CMyExtent &extent = item.Extents[extentIndex]; + UInt32 len = extent.GetLen(); + if (len == 0) + continue; + if (size < len) + return S_FALSE; + + int partitionIndex = vol.PartitionMaps[extent.PartitionRef].PartitionIndex; + UInt32 logBlockNumber = extent.Pos; + const CPartition &partition = _archive.Partitions[partitionIndex]; + UInt64 offset = ((UInt64)partition.Pos << _archive.SecLogSize) + + (UInt64)logBlockNumber * vol.BlockSize; + + CSeekExtent se; + se.Phy = offset; + se.Virt = virtOffset; + virtOffset += len; + extentStreamSpec->Extents.Add(se); + + size -= len; + } + if (size != 0) + return S_FALSE; + CSeekExtent se; + se.Phy = 0; + se.Virt = virtOffset; + extentStreamSpec->Extents.Add(se); + extentStreamSpec->Init(); + *stream = extentStream.Detach(); + return S_OK; +} + +STDMETHODIMP CHandler::Extract(const UInt32 *indices, UInt32 numItems, + Int32 testMode, IArchiveExtractCallback *extractCallback) +{ + COM_TRY_BEGIN + bool allFilesMode = (numItems == (UInt32)-1); + if (allFilesMode) + numItems = _refs2.Size(); + if (numItems == 0) + return S_OK; + UInt64 totalSize = 0; + UInt32 i; + + for (i = 0; i < numItems; i++) + { + UInt32 index = (allFilesMode ? i : indices[i]); + const CRef2 &ref2 = _refs2[index]; + const CRef &ref = _archive.LogVols[ref2.Vol].FileSets[ref2.Fs].Refs[ref2.Ref]; + const CFile &file = _archive.Files[ref.FileIndex]; + const CItem &item = _archive.Items[file.ItemIndex]; + if (!item.IsDir()) + totalSize += item.Size; + } + extractCallback->SetTotal(totalSize); + + UInt64 currentTotalSize = 0; + + NCompress::CCopyCoder *copyCoderSpec = new NCompress::CCopyCoder(); + CMyComPtr copyCoder = copyCoderSpec; + + CLocalProgress *lps = new CLocalProgress; + CMyComPtr progress = lps; + lps->Init(extractCallback, false); + + CLimitedSequentialOutStream *outStreamSpec = new CLimitedSequentialOutStream; + CMyComPtr outStream(outStreamSpec); + + for (i = 0; i < numItems; i++) + { + lps->InSize = lps->OutSize = currentTotalSize; + RINOK(lps->SetCur()); + CMyComPtr realOutStream; + Int32 askMode = testMode ? + NExtract::NAskMode::kTest : + NExtract::NAskMode::kExtract; + UInt32 index = allFilesMode ? i : indices[i]; + + RINOK(extractCallback->GetStream(index, &realOutStream, askMode)); + + const CRef2 &ref2 = _refs2[index]; + const CRef &ref = _archive.LogVols[ref2.Vol].FileSets[ref2.Fs].Refs[ref2.Ref]; + const CFile &file = _archive.Files[ref.FileIndex]; + const CItem &item = _archive.Items[file.ItemIndex]; + + if (item.IsDir()) + { + RINOK(extractCallback->PrepareOperation(askMode)); + RINOK(extractCallback->SetOperationResult(NExtract::NOperationResult::kOK)); + continue; + } + currentTotalSize += item.Size; + + if (!testMode && !realOutStream) + continue; + + RINOK(extractCallback->PrepareOperation(askMode)); + outStreamSpec->SetStream(realOutStream); + realOutStream.Release(); + outStreamSpec->Init(item.Size); + Int32 opRes; + CMyComPtr udfInStream; + HRESULT res = GetStream(index, &udfInStream); + if (res == E_NOTIMPL) + opRes = NExtract::NOperationResult::kUnSupportedMethod; + else if (res != S_OK) + opRes = NExtract::NOperationResult::kDataError; + else + { + RINOK(copyCoder->Code(udfInStream, outStream, NULL, NULL, progress)); + opRes = outStreamSpec->IsFinishedOK() ? + NExtract::NOperationResult::kOK: + NExtract::NOperationResult::kDataError; + } + outStreamSpec->ReleaseStream(); + RINOK(extractCallback->SetOperationResult(opRes)); + } + return S_OK; + COM_TRY_END +} + +}} diff --git a/CPP/7zip/Archive/Udf/UdfHandler.h b/CPP/7zip/Archive/Udf/UdfHandler.h new file mode 100644 index 0000000..f513727 --- /dev/null +++ b/CPP/7zip/Archive/Udf/UdfHandler.h @@ -0,0 +1,37 @@ +// Udf/Handler.h + +#ifndef __UDF_HANDLER_H +#define __UDF_HANDLER_H + +#include "Common/MyCom.h" +#include "../IArchive.h" + +#include "UdfIn.h" + +namespace NArchive { +namespace NUdf { + +struct CRef2 +{ + int Vol; + int Fs; + int Ref; +}; + +class CHandler: + public IInArchive, + public IInArchiveGetStream, + public CMyUnknownImp +{ + CMyComPtr _inStream; + CInArchive _archive; + CRecordVector _refs2; +public: + MY_UNKNOWN_IMP2(IInArchive, IInArchiveGetStream) + INTERFACE_IInArchive(;) + STDMETHOD(GetStream)(UInt32 index, ISequentialInStream **stream); +}; + +}} + +#endif diff --git a/CPP/7zip/Archive/Udf/UdfIn.cpp b/CPP/7zip/Archive/Udf/UdfIn.cpp new file mode 100644 index 0000000..60d5fc2 --- /dev/null +++ b/CPP/7zip/Archive/Udf/UdfIn.cpp @@ -0,0 +1,876 @@ +// Archive/UdfIn.cpp + +#include "StdAfx.h" + +#include "../../../../C/CpuArch.h" + +#include "../../Common/StreamUtils.h" + +#include "UdfIn.h" + +#define Get16(p) GetUi16(p) +#define Get32(p) GetUi32(p) +#define Get64(p) GetUi64(p) + +namespace NArchive { +namespace NUdf { + +const int kNumPartitionsMax = 64; +const int kNumLogVolumesMax = 64; +const int kNumRecureseLevelsMax = 1 << 10; +const int kNumItemsMax = 1 << 27; +const int kNumFilesMax = 1 << 28; +const int kNumRefsMax = 1 << 28; +const UInt32 kNumExtentsMax = (UInt32)1 << 30; +const UInt64 kFileNameLengthTotalMax = (UInt64)1 << 33; +const UInt64 kInlineExtentsSizeMax = (UInt64)1 << 33; + +void MY_FAST_CALL Crc16GenerateTable(void); + +#define CRC16_INIT_VAL 0 +#define CRC16_GET_DIGEST(crc) (crc) +#define CRC16_UPDATE_BYTE(crc, b) (g_Crc16Table[(((crc) >> 8) ^ (b)) & 0xFF] ^ ((crc) << 8)) + +#define kCrc16Poly 0x1021 +UInt16 g_Crc16Table[256]; + +void MY_FAST_CALL Crc16GenerateTable(void) +{ + UInt32 i; + for (i = 0; i < 256; i++) + { + UInt32 r = (i << 8); + for (int j = 8; j > 0; j--) + r = ((r & 0x8000) ? ((r << 1) ^ kCrc16Poly) : (r << 1)) & 0xFFFF; + g_Crc16Table[i] = (UInt16)r; + } +} + +UInt16 MY_FAST_CALL Crc16_Update(UInt16 v, const void *data, size_t size) +{ + const Byte *p = (const Byte *)data; + for (; size > 0 ; size--, p++) + v = CRC16_UPDATE_BYTE(v, *p); + return v; +} + +UInt16 MY_FAST_CALL Crc16Calc(const void *data, size_t size) +{ + return Crc16_Update(CRC16_INIT_VAL, data, size); +} + +struct CCrc16TableInit { CCrc16TableInit() { Crc16GenerateTable(); } } g_Crc16TableInit; + +void CDString128::Parse(const Byte *buf) { memcpy(Data, buf, sizeof(Data)); } + +void CDString::Parse(const Byte *p, unsigned size) +{ + Data.SetCapacity(size); + memcpy(Data, p, size); +} + +static UString ParseDString(const Byte *data, int size) +{ + UString res; + wchar_t *p; + if (size > 0) + { + Byte type = data[0]; + if (type == 8) + { + p = res.GetBuffer((int)size + 1); + for (int i = 1; i < size; i++) + { + wchar_t c = data[i]; + if (c == 0) + break; + *p++ = c; + } + } + else if (type == 16) + { + p = res.GetBuffer((int)size / 2 + 1); + for (int i = 1; i + 2 <= size; i += 2) + { + wchar_t c = ((wchar_t)data[i] << 8) | data[i + 1]; + if (c == 0) + break; + *p++ = c; + } + } + else + return L"[unknow]"; + *p++ = 0; + res.ReleaseBuffer(); + } + return res; +} + +UString CDString:: GetString() const { return ParseDString(Data, (int)Data.GetCapacity()); } +UString CDString128::GetString() const +{ + int size = Data[sizeof(Data) - 1]; + return ParseDString(Data, MyMin(size, (int)(sizeof(Data) - 1))); +} + +void CTime::Parse(const Byte *buf) { memcpy(Data, buf, sizeof(Data)); } + +/* +void CRegId::Parse(const Byte *buf) +{ + Flags = buf[0]; + memcpy(Id, buf + 1, sizeof(Id)); + memcpy(Suffix, buf + 24, sizeof(Suffix)); +} +*/ + +// ECMA 3/7.1 + +struct CExtent +{ + UInt32 Len; + UInt32 Pos; + + void Parse(const Byte *buf); +}; + +void CExtent::Parse(const Byte *buf) +{ + Len = Get32(buf); + Pos = Get32(buf + 4); +} + +// ECMA 3/7.2 + +struct CTag +{ + UInt16 Id; + UInt16 Version; + // Byte Checksum; + // UInt16 SerialNumber; + // UInt16 Crc; + // UInt16 CrcLen; + // UInt32 TagLocation; + + HRESULT Parse(const Byte *buf, size_t size); +}; + +HRESULT CTag::Parse(const Byte *buf, size_t size) +{ + if (size < 16) + return S_FALSE; + Byte sum = 0; + int i; + for (i = 0; i < 4; i++) sum = sum + buf[i]; + for (i = 5; i < 16; i++) sum = sum + buf[i]; + if (sum != buf[4] || buf[5] != 0) return S_FALSE; + + Id = Get16(buf); + Version = Get16(buf + 2); + // SerialNumber = Get16(buf + 6); + UInt16 crc = Get16(buf + 8); + UInt16 crcLen = Get16(buf + 10); + // TagLocation = Get32(buf + 12); + + if (size >= 16 + (size_t)crcLen) + if (crc == Crc16Calc(buf + 16, crcLen)) + return S_OK; + return S_FALSE; +} + +// ECMA 3/7.2.1 + +enum EDescriptorType +{ + DESC_TYPE_SpoaringTable = 0, // UDF + DESC_TYPE_PrimVol = 1, + DESC_TYPE_AnchorVolPtr = 2, + DESC_TYPE_VolPtr = 3, + DESC_TYPE_ImplUseVol = 4, + DESC_TYPE_Partition = 5, + DESC_TYPE_LogicalVol = 6, + DESC_TYPE_UnallocSpace = 7, + DESC_TYPE_Terminating = 8, + DESC_TYPE_LogicalVolIntegrity = 9, + DESC_TYPE_FileSet = 256, + DESC_TYPE_FileId = 257, + DESC_TYPE_AllocationExtent = 258, + DESC_TYPE_Indirect = 259, + DESC_TYPE_Terminal = 260, + DESC_TYPE_File = 261, + DESC_TYPE_ExtendedAttrHeader = 262, + DESC_TYPE_UnallocatedSpace = 263, + DESC_TYPE_SpaceBitmap = 264, + DESC_TYPE_PartitionIntegrity = 265, + DESC_TYPE_ExtendedFile = 266 +}; + + +void CLogBlockAddr::Parse(const Byte *buf) +{ + Pos = Get32(buf); + PartitionRef = Get16(buf + 4); +} + +void CShortAllocDesc::Parse(const Byte *buf) +{ + Len = Get32(buf); + Pos = Get32(buf + 4); +} + +/* +void CADImpUse::Parse(const Byte *buf) +{ + Flags = Get16(buf); + UdfUniqueId = Get32(buf + 2); +} +*/ + +void CLongAllocDesc::Parse(const Byte *buf) +{ + Len = Get32(buf); + Location.Parse(buf + 4); + // memcpy(ImplUse, buf + 10, sizeof(ImplUse)); + // adImpUse.Parse(ImplUse); +} + +bool CInArchive::CheckExtent(int volIndex, int partitionRef, UInt32 blockPos, UInt32 len) const +{ + const CLogVol &vol = LogVols[volIndex]; + const CPartition &partition = Partitions[vol.PartitionMaps[partitionRef].PartitionIndex]; + UInt64 offset = ((UInt64)partition.Pos << SecLogSize) + (UInt64)blockPos * vol.BlockSize; + return (offset + len) <= (((UInt64)partition.Pos + partition.Len) << SecLogSize); +} + +bool CInArchive::CheckItemExtents(int volIndex, const CItem &item) const +{ + for (int i = 0; i < item.Extents.Size(); i++) + { + const CMyExtent &e = item.Extents[i]; + if (!CheckExtent(volIndex, e.PartitionRef, e.Pos, e.GetLen())) + return false; + } + return true; +} + +HRESULT CInArchive::Read(int volIndex, int partitionRef, UInt32 blockPos, UInt32 len, Byte *buf) +{ + if (!CheckExtent(volIndex, partitionRef, blockPos, len)) + return S_FALSE; + const CLogVol &vol = LogVols[volIndex]; + const CPartition &partition = Partitions[vol.PartitionMaps[partitionRef].PartitionIndex]; + RINOK(_stream->Seek(((UInt64)partition.Pos << SecLogSize) + + (UInt64)blockPos * vol.BlockSize, STREAM_SEEK_SET, NULL)); + return ReadStream_FALSE(_stream, buf, len); +} + +HRESULT CInArchive::Read(int volIndex, const CLongAllocDesc &lad, Byte *buf) +{ + return Read(volIndex, lad.Location.PartitionRef, lad.Location.Pos, lad.GetLen(), (Byte *)buf); +} + +HRESULT CInArchive::ReadFromFile(int volIndex, const CItem &item, CByteBuffer &buf) +{ + if (item.Size >= (UInt32)1 << 30) + return S_FALSE; + if (item.IsInline) + { + buf = item.InlineData; + return S_OK; + } + buf.SetCapacity((size_t)item.Size); + size_t pos = 0; + for (int i = 0; i < item.Extents.Size(); i++) + { + const CMyExtent &e = item.Extents[i]; + UInt32 len = e.GetLen(); + RINOK(Read(volIndex, e.PartitionRef, e.Pos, len, (Byte *)buf + pos)); + pos += len; + } + return S_OK; +} + + +void CIcbTag::Parse(const Byte *p) +{ + // PriorDirectNum = Get32(p); + // StrategyType = Get16(p + 4); + // StrategyParam = Get16(p + 6); + // MaxNumOfEntries = Get16(p + 8); + FileType = p[11]; + // ParentIcb.Parse(p + 12); + Flags = Get16(p + 18); +} + +void CItem::Parse(const Byte *p) +{ + // Uid = Get32(p + 36); + // Gid = Get32(p + 40); + // Permissions = Get32(p + 44); + // FileLinkCount = Get16(p + 48); + // RecordFormat = p[50]; + // RecordDisplayAttr = p[51]; + // RecordLen = Get32(p + 52); + Size = Get64(p + 56); + NumLogBlockRecorded = Get64(p + 64); + ATime.Parse(p + 72); + MTime.Parse(p + 84); + // AttrtTime.Parse(p + 96); + // CheckPoint = Get32(p + 108); + // ExtendedAttrIcb.Parse(p + 112); + // ImplId.Parse(p + 128); + // UniqueId = Get64(p + 160); +} + +// 4/14.4 +struct CFileId +{ + // UInt16 FileVersion; + Byte FileCharacteristics; + // CByteBuffer ImplUse; + CDString Id; + CLongAllocDesc Icb; + + bool IsItLinkParent() const { return (FileCharacteristics & FILEID_CHARACS_Parent) != 0; } + HRESULT Parse(const Byte *p, size_t size, size_t &processed); +}; + +HRESULT CFileId::Parse(const Byte *p, size_t size, size_t &processed) +{ + processed = 0; + if (size < 38) + return S_FALSE; + CTag tag; + RINOK(tag.Parse(p, size)); + if (tag.Id != DESC_TYPE_FileId) + return S_FALSE; + // FileVersion = Get16(p + 16); + FileCharacteristics = p[18]; + unsigned idLen = p[19]; + Icb.Parse(p + 20); + unsigned impLen = Get16(p + 36); + if (size < 38 + idLen + impLen) + return S_FALSE; + // ImplUse.SetCapacity(impLen); + processed = 38; + // memcpy(ImplUse, p + processed, impLen); + processed += impLen; + Id.Parse(p + processed, idLen); + processed += idLen; + for (;(processed & 3) != 0; processed++) + if (p[processed] != 0) + return S_FALSE; + return (processed <= size) ? S_OK : S_FALSE; +} + +HRESULT CInArchive::ReadFileItem(int volIndex, int fsIndex, const CLongAllocDesc &lad, int numRecurseAllowed) +{ + if (Files.Size() % 100 == 0) + RINOK(_progress->SetCompleted(Files.Size(), _processedProgressBytes)); + if (numRecurseAllowed-- == 0) + return S_FALSE; + CFile &file = Files.Back(); + const CLogVol &vol = LogVols[volIndex]; + CPartition &partition = Partitions[vol.PartitionMaps[lad.Location.PartitionRef].PartitionIndex]; + + UInt32 key = lad.Location.Pos; + UInt32 value; + const UInt32 kRecursedErrorValue = (UInt32)(Int32)-1; + if (partition.Map.Find(key, value)) + { + if (value == kRecursedErrorValue) + return S_FALSE; + file.ItemIndex = value; + } + else + { + value = Items.Size(); + file.ItemIndex = (int)value; + if (partition.Map.Set(key, kRecursedErrorValue)) + return S_FALSE; + RINOK(ReadItem(volIndex, fsIndex, lad, numRecurseAllowed)); + if (!partition.Map.Set(key, value)) + return S_FALSE; + } + return S_OK; +} + +HRESULT CInArchive::ReadItem(int volIndex, int fsIndex, const CLongAllocDesc &lad, int numRecurseAllowed) +{ + if (Items.Size() > kNumItemsMax) + return S_FALSE; + Items.Add(CItem()); + CItem &item = Items.Back(); + + const CLogVol &vol = LogVols[volIndex]; + + if (lad.GetLen() != vol.BlockSize) + return S_FALSE; + + CByteBuffer buf; + size_t size = lad.GetLen(); + buf.SetCapacity(size); + RINOK(Read(volIndex, lad, buf)); + + CTag tag; + const Byte *p = buf; + RINOK(tag.Parse(p, size)); + if (tag.Id != DESC_TYPE_File) + return S_FALSE; + + item.IcbTag.Parse(p + 16); + if (item.IcbTag.FileType != ICB_FILE_TYPE_DIR && + item.IcbTag.FileType != ICB_FILE_TYPE_FILE) + return S_FALSE; + + item.Parse(p); + + _processedProgressBytes += (UInt64)item.NumLogBlockRecorded * vol.BlockSize + size; + + UInt32 extendedAttrLen = Get32(p + 168); + UInt32 allocDescriptorsLen = Get32(p + 172); + + if ((extendedAttrLen & 3) != 0) + return S_FALSE; + int pos = 176; + if (extendedAttrLen > size - pos) + return S_FALSE; + /* + if (extendedAttrLen != 16) + { + if (extendedAttrLen < 24) + return S_FALSE; + CTag attrTag; + RINOK(attrTag.Parse(p + pos, size)); + if (attrTag.Id != DESC_TYPE_ExtendedAttrHeader) + return S_FALSE; + // UInt32 implAttrLocation = Get32(p + pos + 16); + // UInt32 applicationlAttrLocation = Get32(p + pos + 20); + } + */ + pos += extendedAttrLen; + + int desctType = item.IcbTag.GetDescriptorType(); + if (allocDescriptorsLen > size - pos) + return S_FALSE; + if (desctType == ICB_DESC_TYPE_INLINE) + { + item.IsInline = true; + item.InlineData.SetCapacity(allocDescriptorsLen); + memcpy(item.InlineData, p + pos, allocDescriptorsLen); + } + else + { + item.IsInline = false; + if (desctType != ICB_DESC_TYPE_SHORT && desctType != ICB_DESC_TYPE_LONG) + return S_FALSE; + for (UInt32 i = 0; i < allocDescriptorsLen;) + { + CMyExtent e; + if (desctType == ICB_DESC_TYPE_SHORT) + { + if (i + 8 > allocDescriptorsLen) + return S_FALSE; + CShortAllocDesc sad; + sad.Parse(p + pos + i); + e.Pos = sad.Pos; + e.Len = sad.Len; + e.PartitionRef = lad.Location.PartitionRef; + i += 8; + } + else + { + if (i + 16 > allocDescriptorsLen) + return S_FALSE; + CLongAllocDesc ladNew; + ladNew.Parse(p + pos + i); + e.Pos = ladNew.Location.Pos; + e.PartitionRef = ladNew.Location.PartitionRef; + e.Len = ladNew.Len; + i += 16; + } + item.Extents.Add(e); + } + } + + if (item.IcbTag.IsDir()) + { + if (!item.CheckChunkSizes() || !CheckItemExtents(volIndex, item)) + return S_FALSE; + CByteBuffer buf; + RINOK(ReadFromFile(volIndex, item, buf)); + item.Size = 0; + item.Extents.ClearAndFree(); + item.InlineData.Free(); + + const Byte *p = buf; + size = buf.GetCapacity(); + size_t processedTotal = 0; + for (; processedTotal < size;) + { + size_t processedCur; + CFileId fileId; + RINOK(fileId.Parse(p + processedTotal, size - processedTotal, processedCur)); + if (!fileId.IsItLinkParent()) + { + CFile file; + // file.FileVersion = fileId.FileVersion; + // file.FileCharacteristics = fileId.FileCharacteristics; + // file.ImplUse = fileId.ImplUse; + file.Id = fileId.Id; + + _fileNameLengthTotal += file.Id.Data.GetCapacity(); + if (_fileNameLengthTotal > kFileNameLengthTotalMax) + return S_FALSE; + + item.SubFiles.Add(Files.Size()); + if (Files.Size() > kNumFilesMax) + return S_FALSE; + Files.Add(file); + RINOK(ReadFileItem(volIndex, fsIndex, fileId.Icb, numRecurseAllowed)); + } + processedTotal += processedCur; + } + } + else + { + if ((UInt32)item.Extents.Size() > kNumExtentsMax - _numExtents) + return S_FALSE; + _numExtents += item.Extents.Size(); + + if (item.InlineData.GetCapacity() > kInlineExtentsSizeMax - _inlineExtentsSize) + return S_FALSE; + _inlineExtentsSize += item.InlineData.GetCapacity(); + } + + return S_OK; +} + +HRESULT CInArchive::FillRefs(CFileSet &fs, int fileIndex, int parent, int numRecurseAllowed) +{ + if (_numRefs % 10000 == 0) + { + RINOK(_progress->SetCompleted()); + } + if (numRecurseAllowed-- == 0) + return S_FALSE; + if (_numRefs >= kNumRefsMax) + return S_FALSE; + _numRefs++; + CRef ref; + ref.FileIndex = fileIndex; + ref.Parent = parent; + parent = fs.Refs.Size(); + fs.Refs.Add(ref); + const CItem &item = Items[Files[fileIndex].ItemIndex]; + for (int i = 0; i < item.SubFiles.Size(); i++) + { + RINOK(FillRefs(fs, item.SubFiles[i], parent, numRecurseAllowed)); + } + return S_OK; +} + +HRESULT CInArchive::Open2() +{ + Clear(); + + UInt64 fileSize; + RINOK(_stream->Seek(0, STREAM_SEEK_END, &fileSize)); + + // Some UDFs contain additional 2 KB of zeros, so we also check 12, corrected to 11. + const int kSecLogSizeMax = 12; + Byte buf[1 << kSecLogSizeMax]; + Byte kSizesLog[] = { 11, 8, 12 }; + + for (int i = 0;; i++) + { + if (i == sizeof(kSizesLog) / sizeof(kSizesLog[0])) + return S_FALSE; + SecLogSize = kSizesLog[i]; + Int32 bufSize = 1 << SecLogSize; + if (bufSize > fileSize) + return S_FALSE; + RINOK(_stream->Seek(-bufSize, STREAM_SEEK_END, NULL)); + RINOK(ReadStream_FALSE(_stream, buf, bufSize)); + CTag tag; + if (tag.Parse(buf, bufSize) == S_OK) + if (tag.Id == DESC_TYPE_AnchorVolPtr) + break; + } + if (SecLogSize == 12) + SecLogSize = 11; + + CExtent extentVDS; + extentVDS.Parse(buf + 16); + + for (UInt32 location = extentVDS.Pos; ; location++) + { + size_t bufSize = 1 << SecLogSize; + size_t pos = 0; + RINOK(_stream->Seek((UInt64)location << SecLogSize, STREAM_SEEK_SET, NULL)); + RINOK(ReadStream_FALSE(_stream, buf, bufSize)); + CTag tag; + RINOK(tag.Parse(buf + pos, bufSize - pos)); + if (tag.Id == DESC_TYPE_Terminating) + break; + if (tag.Id == DESC_TYPE_Partition) + { + if (Partitions.Size() >= kNumPartitionsMax) + return S_FALSE; + CPartition partition; + // UInt32 volDescSeqNumer = Get32(buf + 16); + // partition.Flags = Get16(buf + 20); + partition.Number = Get16(buf + 22); + // partition.ContentsId.Parse(buf + 24); + + // memcpy(partition.ContentsUse, buf + 56, sizeof(partition.ContentsUse)); + // ContentsUse is Partition Header Description. + + // partition.AccessType = Get32(buf + 184); + partition.Pos = Get32(buf + 188); + partition.Len = Get32(buf + 192); + // partition.ImplId.Parse(buf + 196); + // memcpy(partition.ImplUse, buf + 228, sizeof(partition.ImplUse)); + + Partitions.Add(partition); + } + else if (tag.Id == DESC_TYPE_LogicalVol) + { + if (LogVols.Size() >= kNumLogVolumesMax) + return S_FALSE; + CLogVol vol; + vol.Id.Parse(buf + 84); + vol.BlockSize = Get32(buf + 212); + // vol.DomainId.Parse(buf + 216); + + if (vol.BlockSize < 512 || vol.BlockSize > ((UInt32)1 << 30)) + return S_FALSE; + + // memcpy(vol.ContentsUse, buf + 248, sizeof(vol.ContentsUse)); + vol.FileSetLocation.Parse(buf + 248); + + // UInt32 mapTableLength = Get32(buf + 264); + UInt32 numPartitionMaps = Get32(buf + 268); + if (numPartitionMaps > kNumPartitionsMax) + return S_FALSE; + // vol.ImplId.Parse(buf + 272); + // memcpy(vol.ImplUse, buf + 128, sizeof(vol.ImplUse)); + size_t pos = 440; + for (UInt32 i = 0; i < numPartitionMaps; i++) + { + if (pos + 2 > bufSize) + return S_FALSE; + CPartitionMap pm; + pm.Type = buf[pos]; + // pm.Length = buf[pos + 1]; + Byte len = buf[pos + 1]; + + if (pos + len > bufSize) + return S_FALSE; + + // memcpy(pm.Data, buf + pos + 2, pm.Length - 2); + if (pm.Type == 1) + { + if (pos + 6 > bufSize) + return S_FALSE; + // pm.VolSeqNumber = Get16(buf + pos + 2); + pm.PartitionNumber = Get16(buf + pos + 4); + } + else + return S_FALSE; + pos += len; + vol.PartitionMaps.Add(pm); + } + LogVols.Add(vol); + } + } + + UInt64 totalSize = 0; + + int volIndex; + for (volIndex = 0; volIndex < LogVols.Size(); volIndex++) + { + CLogVol &vol = LogVols[volIndex]; + for (int pmIndex = 0; pmIndex < vol.PartitionMaps.Size(); pmIndex++) + { + CPartitionMap &pm = vol.PartitionMaps[pmIndex]; + int i; + for (i = 0; i < Partitions.Size(); i++) + { + CPartition &part = Partitions[i]; + if (part.Number == pm.PartitionNumber) + { + if (part.VolIndex >= 0) + return S_FALSE; + pm.PartitionIndex = i; + part.VolIndex = volIndex; + + totalSize += (UInt64)part.Len << SecLogSize; + break; + } + } + if (i == Partitions.Size()) + return S_FALSE; + } + } + + RINOK(_progress->SetTotal(totalSize)); + + for (volIndex = 0; volIndex < LogVols.Size(); volIndex++) + { + CLogVol &vol = LogVols[volIndex]; + + CLongAllocDesc nextExtent = vol.FileSetLocation; + // while (nextExtent.ExtentLen != 0) + // for (int i = 0; i < 1; i++) + { + if (nextExtent.GetLen() < 512) + return S_FALSE; + CByteBuffer buf; + buf.SetCapacity(nextExtent.GetLen()); + RINOK(Read(volIndex, nextExtent, buf)); + const Byte *p = buf; + size_t size = nextExtent.GetLen(); + + CTag tag; + RINOK(tag.Parse(p, size)); + if (tag.Id != DESC_TYPE_FileSet) + return S_FALSE; + + CFileSet fs; + fs.RecodringTime.Parse(p + 16); + // fs.InterchangeLevel = Get16(p + 18); + // fs.MaxInterchangeLevel = Get16(p + 20); + // fs.FileSetNumber = Get32(p + 40); + // fs.FileSetDescNumber = Get32(p + 44); + + // fs.Id.Parse(p + 304); + // fs.CopyrightId.Parse(p + 336); + // fs.AbstractId.Parse(p + 368); + + fs.RootDirICB.Parse(p + 400); + // fs.DomainId.Parse(p + 416); + + // fs.SystemStreamDirICB.Parse(p + 464); + + vol.FileSets.Add(fs); + + // nextExtent.Parse(p + 448); + } + + for (int fsIndex = 0; fsIndex < vol.FileSets.Size(); fsIndex++) + { + CFileSet &fs = vol.FileSets[fsIndex]; + int fileIndex = Files.Size(); + Files.Add(CFile()); + RINOK(ReadFileItem(volIndex, fsIndex, fs.RootDirICB, kNumRecureseLevelsMax)); + RINOK(FillRefs(fs, fileIndex, -1, kNumRecureseLevelsMax)); + } + } + + return S_OK; +} + +HRESULT CInArchive::Open(IInStream *inStream, CProgressVirt *progress) +{ + _progress = progress; + _stream = inStream; + HRESULT res; + try { res = Open2(); } + catch(...) { Clear(); res = S_FALSE; } + _stream.Release(); + return res; +} + +void CInArchive::Clear() +{ + Partitions.Clear(); + LogVols.Clear(); + Items.Clear(); + Files.Clear(); + _fileNameLengthTotal = 0; + _numRefs = 0; + _numExtents = 0; + _inlineExtentsSize = 0; + _processedProgressBytes = 0; +} + +UString CInArchive::GetComment() const +{ + UString res; + for (int i = 0; i < LogVols.Size(); i++) + { + if (i > 0) + res += L" "; + res += LogVols[i].GetName(); + } + return res; +} + +static UString GetSpecName(const UString &name) +{ + UString name2 = name; + name2.Trim(); + if (name2.IsEmpty()) + { + /* + wchar_t s[32]; + ConvertUInt64ToString(id, s); + return L"[" + (UString)s + L"]"; + */ + return L"[]"; + } + return name; +} + +static void UpdateWithName(UString &res, const UString &addString) +{ + if (res.IsEmpty()) + res = addString; + else + res = addString + WCHAR_PATH_SEPARATOR + res; +} + +UString CInArchive::GetItemPath(int volIndex, int fsIndex, int refIndex, + bool showVolName, bool showFsName) const +{ + // showVolName = true; + const CLogVol &vol = LogVols[volIndex]; + const CFileSet &fs = vol.FileSets[fsIndex]; + + UString name; + + for (;;) + { + const CRef &ref = fs.Refs[refIndex]; + refIndex = ref.Parent; + if (refIndex < 0) + break; + UpdateWithName(name, GetSpecName(Files[ref.FileIndex].GetName())); + } + + if (showFsName) + { + wchar_t s[32]; + ConvertUInt64ToString(fsIndex, s); + UString newName = L"File Set "; + newName += s; + UpdateWithName(name, newName); + } + + if (showVolName) + { + wchar_t s[32]; + ConvertUInt64ToString(volIndex, s); + UString newName = s; + UString newName2 = vol.GetName(); + if (newName2.IsEmpty()) + newName2 = L"Volume"; + newName += L'-'; + newName += newName2; + UpdateWithName(name, newName); + } + return name; +} + +}} diff --git a/CPP/7zip/Archive/Udf/UdfIn.h b/CPP/7zip/Archive/Udf/UdfIn.h new file mode 100644 index 0000000..46b9a7e --- /dev/null +++ b/CPP/7zip/Archive/Udf/UdfIn.h @@ -0,0 +1,375 @@ +// Archive/UdfIn.h -- UDF / ECMA-167 + +#ifndef __ARCHIVE_UDF_IN_H +#define __ARCHIVE_UDF_IN_H + +#include "Common/MyCom.h" +#include "Common/IntToString.h" +#include "Common/Buffer.h" +#include "Common/MyString.h" +#include "Common/MyMap.h" + +#include "../../IStream.h" + +namespace NArchive { +namespace NUdf { + +// ---------- ECMA Part 1 ---------- + +// ECMA 1/7.2.12 + +/* +struct CDString32 +{ + Byte Data[32]; + void Parse(const Byte *buf); + // UString GetString() const; +}; +*/ + +struct CDString128 +{ + Byte Data[128]; + void Parse(const Byte *buf); + UString GetString() const; +}; + +struct CDString +{ + CByteBuffer Data; + void Parse(const Byte *p, unsigned size); + UString GetString() const; +}; + + +// ECMA 1/7.3 + +struct CTime +{ + Byte Data[12]; + + unsigned GetType() const { return Data[1] >> 4; } + bool IsLocal() const { return GetType() == 1; } + int GetMinutesOffset() const + { + int t = (Data[0] | ((UInt16)Data[1] << 8)) & 0xFFF; + if ((t >> 11) != 0) + t -= (1 << 12); + return (t > (60 * 24) || t < -(60 * 24)) ? 0 : t; + } + unsigned GetYear() const { return (Data[2] | ((UInt16)Data[3] << 8)); } + void Parse(const Byte *buf); +}; + + +// ECMA 1/7.4 + +/* +struct CRegId +{ + Byte Flags; + char Id[23]; + char Suffix[8]; + + void Parse(const Byte *buf); +}; +*/ + +// ---------- ECMA Part 3: Volume Structure ---------- + +// ECMA 3/10.5 + +struct CPartition +{ + // UInt16 Flags; + UInt16 Number; + // CRegId ContentsId; + // Byte ContentsUse[128]; + // UInt32 AccessType; + + UInt32 Pos; + UInt32 Len; + + // CRegId ImplId; + // Byte ImplUse[128]; + + int VolIndex; + CMap32 Map; + + CPartition(): VolIndex(-1) {} + + // bool IsNsr() const { return (strncmp(ContentsId.Id, "+NSR0", 5) == 0); } + // bool IsAllocated() const { return ((Flags & 1) != 0); } +}; + +struct CLogBlockAddr +{ + UInt32 Pos; + UInt16 PartitionRef; + + void Parse(const Byte *buf); +}; + +enum EShortAllocDescType +{ + SHORT_ALLOC_DESC_TYPE_RecordedAndAllocated = 0, + SHORT_ALLOC_DESC_TYPE_NotRecordedButAllocated = 1, + SHORT_ALLOC_DESC_TYPE_NotRecordedAndNotAllocated = 2, + SHORT_ALLOC_DESC_TYPE_NextExtent = 3 +}; + +struct CShortAllocDesc +{ + UInt32 Len; + UInt32 Pos; + + // 4/14.14.1 + // UInt32 GetLen() const { return Len & 0x3FFFFFFF; } + // UInt32 GetType() const { return Len >> 30; } + // bool IsRecAndAlloc() const { return GetType() == SHORT_ALLOC_DESC_TYPE_RecordedAndAllocated; } + void Parse(const Byte *buf); +}; + +/* +struct CADImpUse +{ + UInt16 Flags; + UInt32 UdfUniqueId; + void Parse(const Byte *buf); +}; +*/ + +struct CLongAllocDesc +{ + UInt32 Len; + CLogBlockAddr Location; + + // Byte ImplUse[6]; + // CADImpUse adImpUse; // UDF + + UInt32 GetLen() const { return Len & 0x3FFFFFFF; } + UInt32 GetType() const { return Len >> 30; } + bool IsRecAndAlloc() const { return GetType() == SHORT_ALLOC_DESC_TYPE_RecordedAndAllocated; } + void Parse(const Byte *buf); +}; + +struct CPartitionMap +{ + Byte Type; + // Byte Len; + + // Type - 1 + // UInt16 VolSeqNumber; + UInt16 PartitionNumber; + + // Byte Data[256]; + + int PartitionIndex; +}; + +// ECMA 4/14.6 + +enum EIcbFileType +{ + ICB_FILE_TYPE_DIR = 4, + ICB_FILE_TYPE_FILE = 5 +}; + +enum EIcbDescriptorType +{ + ICB_DESC_TYPE_SHORT = 0, + ICB_DESC_TYPE_LONG = 1, + ICB_DESC_TYPE_EXTENDED = 2, + ICB_DESC_TYPE_INLINE = 3 +}; + +struct CIcbTag +{ + // UInt32 PriorDirectNum; + // UInt16 StrategyType; + // UInt16 StrategyParam; + // UInt16 MaxNumOfEntries; + Byte FileType; + // CLogBlockAddr ParentIcb; + UInt16 Flags; + + bool IsDir() const { return FileType == ICB_FILE_TYPE_DIR; } + int GetDescriptorType() const { return Flags & 3; } + void Parse(const Byte *p); +}; + +// const Byte FILEID_CHARACS_Existance = (1 << 0); +const Byte FILEID_CHARACS_Parent = (1 << 3); + +struct CFile +{ + // UInt16 FileVersion; + // Byte FileCharacteristics; + // CByteBuffer ImplUse; + CDString Id; + + CFile(): /* FileVersion(0), FileCharacteristics(0), */ ItemIndex(-1) {} + int ItemIndex; + UString GetName() const { return Id.GetString(); } +}; + +struct CMyExtent +{ + UInt32 Pos; + UInt32 Len; + int PartitionRef; + + UInt32 GetLen() const { return Len & 0x3FFFFFFF; } + UInt32 GetType() const { return Len >> 30; } + bool IsRecAndAlloc() const { return GetType() == SHORT_ALLOC_DESC_TYPE_RecordedAndAllocated; } +}; + +struct CItem +{ + CIcbTag IcbTag; + + // UInt32 Uid; + // UInt32 Gid; + // UInt32 Permissions; + // UInt16 FileLinkCount; + // Byte RecordFormat; + // Byte RecordDisplayAttr; + // UInt32 RecordLen; + UInt64 Size; + UInt64 NumLogBlockRecorded; + CTime ATime; + CTime MTime; + // CTime AttrtTime; + // UInt32 CheckPoint; + // CLongAllocDesc ExtendedAttrIcb; + // CRegId ImplId; + // UInt64 UniqueId; + + bool IsInline; + CByteBuffer InlineData; + CRecordVector Extents; + CRecordVector SubFiles; + + void Parse(const Byte *buf); + + bool IsRecAndAlloc() const + { + for (int i = 0; i < Extents.Size(); i++) + if (!Extents[i].IsRecAndAlloc()) + return false; + return true; + } + + UInt64 GetChunksSumSize() const + { + if (IsInline) + return InlineData.GetCapacity(); + UInt64 size = 0; + for (int i = 0; i < Extents.Size(); i++) + size += Extents[i].GetLen(); + return size; + } + + bool CheckChunkSizes() const { return GetChunksSumSize() == Size; } + + bool IsDir() const { return IcbTag.IsDir(); } +}; + +struct CRef +{ + int Parent; + int FileIndex; +}; + + +// ECMA 4 / 14.1 +struct CFileSet +{ + CTime RecodringTime; + // UInt16 InterchangeLevel; + // UInt16 MaxInterchangeLevel; + // UInt32 FileSetNumber; + // UInt32 FileSetDescNumber; + // CDString32 Id; + // CDString32 CopyrightId; + // CDString32 AbstractId; + + CLongAllocDesc RootDirICB; + // CRegId DomainId; + // CLongAllocDesc SystemStreamDirICB; + + CRecordVector Refs; +}; + + +// ECMA 3/10.6 + +struct CLogVol +{ + CDString128 Id; + UInt32 BlockSize; + // CRegId DomainId; + + // Byte ContentsUse[16]; + CLongAllocDesc FileSetLocation; // UDF + + // CRegId ImplId; + // Byte ImplUse[128]; + + CObjectVector PartitionMaps; + CObjectVector FileSets; + + UString GetName() const { return Id.GetString(); } +}; + +struct CProgressVirt +{ + virtual HRESULT SetTotal(UInt64 numBytes) PURE; + virtual HRESULT SetCompleted(UInt64 numFiles, UInt64 numBytes) PURE; + virtual HRESULT SetCompleted() PURE; +}; + +class CInArchive +{ + CMyComPtr _stream; + CProgressVirt *_progress; + + HRESULT Read(int volIndex, int partitionRef, UInt32 blockPos, UInt32 len, Byte *buf); + HRESULT Read(int volIndex, const CLongAllocDesc &lad, Byte *buf); + HRESULT ReadFromFile(int volIndex, const CItem &item, CByteBuffer &buf); + + HRESULT ReadFileItem(int volIndex, int fsIndex, const CLongAllocDesc &lad, int numRecurseAllowed); + HRESULT ReadItem(int volIndex, int fsIndex, const CLongAllocDesc &lad, int numRecurseAllowed); + + HRESULT Open2(); + HRESULT FillRefs(CFileSet &fs, int fileIndex, int parent, int numRecurseAllowed); + + UInt64 _processedProgressBytes; + + UInt64 _fileNameLengthTotal; + int _numRefs; + UInt32 _numExtents; + UInt64 _inlineExtentsSize; + bool CheckExtent(int volIndex, int partitionRef, UInt32 blockPos, UInt32 len) const; +public: + HRESULT Open(IInStream *inStream, CProgressVirt *progress); + void Clear(); + + CObjectVector Partitions; + CObjectVector LogVols; + + CObjectVector Items; + CObjectVector Files; + + int SecLogSize; + + UString GetComment() const; + UString GetItemPath(int volIndex, int fsIndex, int refIndex, + bool showVolName, bool showFsName) const; + + bool CheckItemExtents(int volIndex, const CItem &item) const; +}; + +}} + +#endif diff --git a/CPP/7zip/Archive/Udf/UdfRegister.cpp b/CPP/7zip/Archive/Udf/UdfRegister.cpp new file mode 100644 index 0000000..1b08d12 --- /dev/null +++ b/CPP/7zip/Archive/Udf/UdfRegister.cpp @@ -0,0 +1,13 @@ +// UdfRegister.cpp + +#include "StdAfx.h" + +#include "../../Common/RegisterArc.h" + +#include "UdfHandler.h" +static IInArchive *CreateArc() { return new NArchive::NUdf::CHandler; } + +static CArcInfo g_ArcInfo = + { L"Udf", L"iso img", 0, 0xE0, { 0, 'N', 'S', 'R', '0' }, 5, false, CreateArc, 0 }; + +REGISTER_ARC(Udf) diff --git a/CPP/7zip/Archive/VhdHandler.cpp b/CPP/7zip/Archive/VhdHandler.cpp new file mode 100644 index 0000000..9d1c928 --- /dev/null +++ b/CPP/7zip/Archive/VhdHandler.cpp @@ -0,0 +1,734 @@ +// VhdHandler.cpp + +#include "StdAfx.h" + +#include "../../../C/CpuArch.h" + +#include "Common/Buffer.h" +#include "Common/ComTry.h" +#include "Common/IntToString.h" +#include "Common/MyString.h" + +#include "Windows/PropVariant.h" + +#include "../Common/LimitedStreams.h" +#include "../Common/ProgressUtils.h" +#include "../Common/RegisterArc.h" +#include "../Common/StreamUtils.h" + +#include "../Compress/CopyCoder.h" + +#define Get16(p) GetBe16(p) +#define Get32(p) GetBe32(p) +#define Get64(p) GetBe64(p) + +#define G32(p, dest) dest = Get32(p); +#define G64(p, dest) dest = Get64(p); + +using namespace NWindows; + +namespace NArchive { +namespace NVhd { + +static const UInt32 kUnusedBlock = 0xFFFFFFFF; + +static const UInt32 kDiskType_Fixed = 2; +static const UInt32 kDiskType_Dynamic = 3; +static const UInt32 kDiskType_Diff = 4; + +static const char *kDiskTypes[] = +{ + "0", + "1", + "Fixed", + "Dynamic", + "Differencing" +}; + +struct CFooter +{ + // UInt32 Features; + // UInt32 FormatVersion; + UInt64 DataOffset; + UInt32 CTime; + UInt32 CreatorApp; + UInt32 CreatorVersion; + UInt32 CreatorHostOS; + // UInt64 OriginalSize; + UInt64 CurrentSize; + UInt32 DiskGeometry; + UInt32 Type; + Byte Id[16]; + Byte SavedState; + + bool IsFixed() const { return Type == kDiskType_Fixed; } + bool ThereIsDynamic() const { return Type == kDiskType_Dynamic || Type == kDiskType_Diff; } + // bool IsSupported() const { return Type == kDiskType_Fixed || Type == kDiskType_Dynamic || Type == kDiskType_Diff; } + UInt32 NumCyls() const { return DiskGeometry >> 16; } + UInt32 NumHeads() const { return (DiskGeometry >> 8) & 0xFF; } + UInt32 NumSectorsPerTrack() const { return DiskGeometry & 0xFF; } + AString GetTypeString() const; + bool Parse(const Byte *p); +}; + +AString CFooter::GetTypeString() const +{ + if (Type < sizeof(kDiskTypes) / sizeof(kDiskTypes[0])) + return kDiskTypes[Type]; + char s[16]; + ConvertUInt32ToString(Type, s); + return s; +} + +static bool CheckBlock(const Byte *p, unsigned size, unsigned checkSumOffset, unsigned zeroOffset) +{ + UInt32 sum = 0; + unsigned i; + for (i = 0; i < checkSumOffset; i++) + sum += p[i]; + for (i = checkSumOffset + 4; i < size; i++) + sum += p[i]; + if (~sum != Get32(p + checkSumOffset)) + return false; + for (i = zeroOffset; i < size; i++) + if (p[i] != 0) + return false; + return true; +} + +bool CFooter::Parse(const Byte *p) +{ + if (memcmp(p, "conectix", 8) != 0) + return false; + // G32(p + 0x08, Features); + // G32(p + 0x0C, FormatVersion); + G64(p + 0x10, DataOffset); + G32(p + 0x18, CTime); + G32(p + 0x1C, CreatorApp); + G32(p + 0x20, CreatorVersion); + G32(p + 0x24, CreatorHostOS); + // G64(p + 0x28, OriginalSize); + G64(p + 0x30, CurrentSize); + G32(p + 0x38, DiskGeometry); + G32(p + 0x3C, Type); + memcpy(Id, p + 0x44, 16); + SavedState = p[0x54]; + return CheckBlock(p, 512, 0x40, 0x55); +} + +/* +struct CParentLocatorEntry +{ + UInt32 Code; + UInt32 DataSpace; + UInt32 DataLen; + UInt64 DataOffset; + + bool Parse(const Byte *p); +}; +bool CParentLocatorEntry::Parse(const Byte *p) +{ + G32(p + 0x00, Code); + G32(p + 0x04, DataSpace); + G32(p + 0x08, DataLen); + G32(p + 0x10, DataOffset); + return (Get32(p + 0x0C) == 0); // Resrved +} +*/ + +struct CDynHeader +{ + // UInt64 DataOffset; + UInt64 TableOffset; + // UInt32 HeaderVersion; + UInt32 NumBlocks; + int BlockSizeLog; + UInt32 ParentTime; + Byte ParentId[16]; + UString ParentName; + // CParentLocatorEntry ParentLocators[8]; + + bool Parse(const Byte *p); + UInt32 NumBitMapSectors() const + { + UInt32 numSectorsInBlock = (1 << (BlockSizeLog - 9)); + return (numSectorsInBlock + 512 * 8 - 1) / (512 * 8); + } +}; + +static int GetLog(UInt32 num) +{ + for (int i = 0; i < 31; i++) + if (((UInt32)1 << i) == num) + return i; + return -1; +} + +bool CDynHeader::Parse(const Byte *p) +{ + if (memcmp(p, "cxsparse", 8) != 0) + return false; + // G64(p + 0x08, DataOffset); + G64(p + 0x10, TableOffset); + // G32(p + 0x18, HeaderVersion); + G32(p + 0x1C, NumBlocks); + BlockSizeLog = GetLog(Get32(p + 0x20)); + if (BlockSizeLog < 9 || BlockSizeLog > 30) + return false; + G32(p + 0x38, ParentTime); + if (Get32(p + 0x3C) != 0) // reserved + return false; + memcpy(ParentId, p + 0x28, 16); + { + const int kNameLength = 256; + wchar_t *s = ParentName.GetBuffer(kNameLength); + for (unsigned i = 0; i < kNameLength; i++) + s[i] = Get16(p + 0x40 + i * 2); + s[kNameLength] = 0; + ParentName.ReleaseBuffer(); + } + /* + for (int i = 0; i < 8; i++) + if (!ParentLocators[i].Parse(p + 0x240 + i * 24)) + return false; + */ + return CheckBlock(p, 1024, 0x24, 0x240 + 8 * 24); +} + +class CHandler: + public IInStream, + public IInArchive, + public IInArchiveGetStream, + public CMyUnknownImp +{ + UInt64 _virtPos; + UInt64 _phyPos; + UInt64 _phyLimit; + + CFooter Footer; + CDynHeader Dyn; + CRecordVector Bat; + CByteBuffer BitMap; + UInt32 BitMapTag; + UInt32 NumUsedBlocks; + CMyComPtr Stream; + CMyComPtr ParentStream; + CHandler *Parent; + + HRESULT Seek(UInt64 offset); + HRESULT InitAndSeek(); + HRESULT ReadPhy(UInt64 offset, void *data, UInt32 size); + + bool NeedParent() const { return Footer.Type == kDiskType_Diff; } + UInt64 GetPackSize() const + { return Footer.ThereIsDynamic() ? ((UInt64)NumUsedBlocks << Dyn.BlockSizeLog) : Footer.CurrentSize; } + + UString GetParentName() const + { + const CHandler *p = this; + UString res; + while (p && p->NeedParent()) + { + if (!res.IsEmpty()) + res += L" -> "; + res += p->Dyn.ParentName; + p = p->Parent; + } + return res; + } + + bool IsOK() const + { + const CHandler *p = this; + while (p->NeedParent()) + { + p = p->Parent; + if (p == 0) + return false; + } + return true; + } + + HRESULT Open3(); + HRESULT Open2(IInStream *stream, CHandler *child, IArchiveOpenCallback *openArchiveCallback, int level); + +public: + MY_UNKNOWN_IMP3(IInArchive, IInArchiveGetStream, IInStream) + + INTERFACE_IInArchive(;) + STDMETHOD(GetStream)(UInt32 index, ISequentialInStream **stream); + STDMETHOD(Read)(void *data, UInt32 size, UInt32 *processedSize); + STDMETHOD(Seek)(Int64 offset, UInt32 seekOrigin, UInt64 *newPosition); +}; + +HRESULT CHandler::Seek(UInt64 offset) { return Stream->Seek(offset, STREAM_SEEK_SET, NULL); } + +HRESULT CHandler::InitAndSeek() +{ + if (ParentStream) + { + RINOK(Parent->InitAndSeek()); + } + _virtPos = _phyPos = 0; + BitMapTag = kUnusedBlock; + BitMap.SetCapacity(Dyn.NumBitMapSectors() << 9); + return Seek(0); +} + +HRESULT CHandler::ReadPhy(UInt64 offset, void *data, UInt32 size) +{ + if (offset + size > _phyLimit) + return S_FALSE; + if (offset != _phyPos) + { + _phyPos = offset; + RINOK(Seek(offset)); + } + HRESULT res = ReadStream_FALSE(Stream, data, size); + _phyPos += size; + return res; +} + +HRESULT CHandler::Open3() +{ + RINOK(Stream->Seek(0, STREAM_SEEK_END, &_phyPos)); + if (_phyPos < 512) + return S_FALSE; + const UInt32 kDynSize = 1024; + Byte buf[kDynSize]; + + _phyLimit = _phyPos; + RINOK(ReadPhy(_phyLimit - 512, buf, 512)); + if (!Footer.Parse(buf)) + return S_FALSE; + _phyLimit -= 512; + + if (!Footer.ThereIsDynamic()) + return S_OK; + + RINOK(ReadPhy(0, buf + 512, 512)); + if (memcmp(buf, buf + 512, 512) != 0) + return S_FALSE; + + RINOK(ReadPhy(Footer.DataOffset, buf, kDynSize)); + if (!Dyn.Parse(buf)) + return S_FALSE; + + if (Dyn.NumBlocks >= (UInt32)1 << 31) + return S_FALSE; + if (Footer.CurrentSize == 0) + { + if (Dyn.NumBlocks != 0) + return S_FALSE; + } + else if (((Footer.CurrentSize - 1) >> Dyn.BlockSizeLog) + 1 != Dyn.NumBlocks) + return S_FALSE; + + Bat.Reserve(Dyn.NumBlocks); + while ((UInt32)Bat.Size() < Dyn.NumBlocks) + { + RINOK(ReadPhy(Dyn.TableOffset + (UInt64)Bat.Size() * 4, buf, 512)); + for (UInt32 j = 0; j < 512; j += 4) + { + UInt32 v = Get32(buf + j); + if (v != kUnusedBlock) + NumUsedBlocks++; + Bat.Add(v); + if ((UInt32)Bat.Size() >= Dyn.NumBlocks) + break; + } + } + return S_OK; +} + +STDMETHODIMP CHandler::Read(void *data, UInt32 size, UInt32 *processedSize) +{ + if (processedSize != NULL) + *processedSize = 0; + if (_virtPos >= Footer.CurrentSize) + return (Footer.CurrentSize == _virtPos) ? S_OK: E_FAIL; + UInt64 rem = Footer.CurrentSize - _virtPos; + if (size > rem) + size = (UInt32)rem; + if (size == 0) + return S_OK; + UInt32 blockIndex = (UInt32)(_virtPos >> Dyn.BlockSizeLog); + UInt32 blockSectIndex = Bat[blockIndex]; + UInt32 blockSize = (UInt32)1 << Dyn.BlockSizeLog; + UInt32 offsetInBlock = (UInt32)_virtPos & (blockSize - 1); + size = MyMin(blockSize - offsetInBlock, size); + + HRESULT res = S_OK; + if (blockSectIndex == kUnusedBlock) + { + if (ParentStream) + { + RINOK(ParentStream->Seek(_virtPos, STREAM_SEEK_SET, NULL)); + res = ParentStream->Read(data, size, &size); + } + else + memset(data, 0, size); + } + else + { + UInt64 newPos = (UInt64)blockSectIndex << 9; + if (BitMapTag != blockIndex) + { + RINOK(ReadPhy(newPos, BitMap, (UInt32)BitMap.GetCapacity())); + BitMapTag = blockIndex; + } + RINOK(ReadPhy(newPos + BitMap.GetCapacity() + offsetInBlock, data, size)); + for (UInt32 cur = 0; cur < size;) + { + UInt32 rem = MyMin(0x200 - (offsetInBlock & 0x1FF), size - cur); + UInt32 bmi = offsetInBlock >> 9; + if (((BitMap[bmi >> 3] >> (7 - (bmi & 7))) & 1) == 0) + { + if (ParentStream) + { + RINOK(ParentStream->Seek(_virtPos + cur, STREAM_SEEK_SET, NULL)); + RINOK(ReadStream_FALSE(ParentStream, (Byte *)data + cur, rem)); + } + else + { + const Byte *p = (const Byte *)data + cur; + for (UInt32 i = 0; i < rem; i++) + if (p[i] != 0) + return S_FALSE; + } + } + offsetInBlock += rem; + cur += rem; + } + } + if (processedSize != NULL) + *processedSize = size; + _virtPos += size; + return res; +} + +STDMETHODIMP CHandler::Seek(Int64 offset, UInt32 seekOrigin, UInt64 *newPosition) +{ + switch(seekOrigin) + { + case STREAM_SEEK_SET: _virtPos = offset; break; + case STREAM_SEEK_CUR: _virtPos += offset; break; + case STREAM_SEEK_END: _virtPos = Footer.CurrentSize + offset; break; + default: return STG_E_INVALIDFUNCTION; + } + if (newPosition) + *newPosition = _virtPos; + return S_OK; +} + +enum +{ + kpidParent = kpidUserDefined, + kpidSavedState +}; + +STATPROPSTG kArcProps[] = +{ + { NULL, kpidSize, VT_UI8}, + { NULL, kpidCTime, VT_FILETIME}, + { NULL, kpidClusterSize, VT_UI8}, + { NULL, kpidMethod, VT_BSTR}, + { L"Parent", kpidParent, VT_BSTR}, + { NULL, kpidCreatorApp, VT_BSTR}, + { NULL, kpidHostOS, VT_BSTR}, + { L"Saved State", kpidSavedState, VT_BOOL}, + { NULL, kpidId, VT_BSTR} + }; + +STATPROPSTG kProps[] = +{ + { NULL, kpidSize, VT_UI8}, + { NULL, kpidPackSize, VT_UI8}, + { NULL, kpidCTime, VT_FILETIME} + + /* + { NULL, kpidNumCyls, VT_UI4}, + { NULL, kpidNumHeads, VT_UI4}, + { NULL, kpidSectorsPerTrack, VT_UI4} + */ +}; + +IMP_IInArchive_Props +IMP_IInArchive_ArcProps_WITH_NAME + +// VHD start time: 2000-01-01 +static const UInt64 kVhdTimeStartValue = (UInt64)3600 * 24 * (399 * 365 + 24 * 4); + +static void VhdTimeToFileTime(UInt32 vhdTime, NCOM::CPropVariant &prop) +{ + FILETIME ft, utc; + UInt64 v = (kVhdTimeStartValue + vhdTime) * 10000000; + ft.dwLowDateTime = (DWORD)v; + ft.dwHighDateTime = (DWORD)(v >> 32); + // specification says that it's UTC time, but Virtual PC 6 writes local time. Why? + LocalFileTimeToFileTime(&ft, &utc); + prop = utc; +} + +static void StringToAString(char *dest, UInt32 s) +{ + for (int i = 24; i >= 0; i -= 8) + { + Byte b = (Byte)((s >> i) & 0xFF); + if (b < 0x20 || b > 0x7F) + break; + *dest++ = b; + } + *dest = 0; +} + +static void ConvertByteToHex(unsigned value, char *s) +{ + for (int i = 0; i < 2; i++) + { + unsigned t = value & 0xF; + value >>= 4; + s[1 - i] = (char)((t < 10) ? ('0' + t) : ('A' + (t - 10))); + } +} + +STDMETHODIMP CHandler::GetArchiveProperty(PROPID propID, PROPVARIANT *value) +{ + COM_TRY_BEGIN + NCOM::CPropVariant prop; + switch(propID) + { + case kpidMainSubfile: prop = (UInt32)0; break; + case kpidCTime: VhdTimeToFileTime(Footer.CTime, prop); break; + case kpidClusterSize: if (Footer.ThereIsDynamic()) prop = (UInt32)1 << Dyn.BlockSizeLog; break; + case kpidMethod: + { + AString s = Footer.GetTypeString(); + if (NeedParent()) + { + s += " -> "; + const CHandler *p = this; + while (p != 0 && p->NeedParent()) + p = p->Parent; + if (p == 0) + s += '?'; + else + s += p->Footer.GetTypeString(); + } + prop = s; + break; + } + case kpidCreatorApp: + { + char s[16]; + StringToAString(s, Footer.CreatorApp); + AString res = s; + res.Trim(); + ConvertUInt32ToString(Footer.CreatorVersion >> 16, s); + res += ' '; + res += s; + res += '.'; + ConvertUInt32ToString(Footer.CreatorVersion & 0xFFFF, s); + res += s; + prop = res; + break; + } + case kpidHostOS: + { + if (Footer.CreatorHostOS == 0x5769326b) + prop = "Windows"; + else + { + char s[16]; + StringToAString(s, Footer.CreatorHostOS); + prop = s; + } + break; + } + case kpidId: + { + char s[32 + 4]; + for (int i = 0; i < 16; i++) + ConvertByteToHex(Footer.Id[i], s + i * 2); + s[32] = 0; + prop = s; + break; + } + case kpidSavedState: prop = Footer.SavedState ? true : false; break; + case kpidParent: if (NeedParent()) prop = GetParentName(); break; + } + prop.Detach(value); + return S_OK; + COM_TRY_END +} + +HRESULT CHandler::Open2(IInStream *stream, CHandler *child, IArchiveOpenCallback *openArchiveCallback, int level) +{ + Close(); + Stream = stream; + if (level > 32) + return S_FALSE; + RINOK(Open3()); + if (child && memcmp(child->Dyn.ParentId, Footer.Id, 16) != 0) + return S_FALSE; + if (Footer.Type != kDiskType_Diff) + return S_OK; + CMyComPtr openVolumeCallback; + if (openArchiveCallback->QueryInterface(IID_IArchiveOpenVolumeCallback, (void **)&openVolumeCallback) != S_OK) + return S_FALSE; + CMyComPtr nextStream; + HRESULT res = openVolumeCallback->GetStream(Dyn.ParentName, &nextStream); + if (res == S_FALSE) + return S_OK; + RINOK(res); + + Parent = new CHandler; + ParentStream = Parent; + return Parent->Open2(nextStream, this, openArchiveCallback, level + 1); +} + +STDMETHODIMP CHandler::Open(IInStream *stream, + const UInt64 * /* maxCheckStartPosition */, + IArchiveOpenCallback * openArchiveCallback) +{ + COM_TRY_BEGIN + { + HRESULT res; + try + { + res = Open2(stream, NULL, openArchiveCallback, 0); + if (res == S_OK) + return S_OK; + } + catch(...) + { + Close(); + throw; + } + Close(); + return res; + } + COM_TRY_END +} + +STDMETHODIMP CHandler::Close() +{ + Bat.Clear(); + NumUsedBlocks = 0; + Parent = 0; + Stream.Release(); + ParentStream.Release(); + return S_OK; +} + +STDMETHODIMP CHandler::GetNumberOfItems(UInt32 *numItems) +{ + *numItems = 1; + return S_OK; +} + +STDMETHODIMP CHandler::GetProperty(UInt32 /* index */, PROPID propID, PROPVARIANT *value) +{ + COM_TRY_BEGIN + NWindows::NCOM::CPropVariant prop; + + switch(propID) + { + case kpidSize: prop = Footer.CurrentSize; break; + case kpidPackSize: prop = GetPackSize(); break; + case kpidCTime: VhdTimeToFileTime(Footer.CTime, prop); break; + /* + case kpidNumCyls: prop = Footer.NumCyls(); break; + case kpidNumHeads: prop = Footer.NumHeads(); break; + case kpidSectorsPerTrack: prop = Footer.NumSectorsPerTrack(); break; + */ + } + prop.Detach(value); + return S_OK; + COM_TRY_END +} + +STDMETHODIMP CHandler::Extract(const UInt32 *indices, UInt32 numItems, + Int32 testMode, IArchiveExtractCallback *extractCallback) +{ + COM_TRY_BEGIN + if (numItems == 0) + return S_OK; + if (numItems != (UInt32)-1 && (numItems != 1 || indices[0] != 0)) + return E_INVALIDARG; + + RINOK(extractCallback->SetTotal(Footer.CurrentSize)); + CMyComPtr outStream; + Int32 askMode = testMode ? + NExtract::NAskMode::kTest : + NExtract::NAskMode::kExtract; + RINOK(extractCallback->GetStream(0, &outStream, askMode)); + if (!testMode && !outStream) + return S_OK; + RINOK(extractCallback->PrepareOperation(askMode)); + + NCompress::CCopyCoder *copyCoderSpec = new NCompress::CCopyCoder(); + CMyComPtr copyCoder = copyCoderSpec; + + CLocalProgress *lps = new CLocalProgress; + CMyComPtr progress = lps; + lps->Init(extractCallback, false); + + int res = NExtract::NOperationResult::kDataError; + CMyComPtr inStream; + HRESULT hres = GetStream(0, &inStream); + if (hres == S_FALSE) + res = NExtract::NOperationResult::kUnSupportedMethod; + else + { + RINOK(hres); + HRESULT hres = copyCoder->Code(inStream, outStream, NULL, NULL, progress); + if (hres == S_OK) + { + if (copyCoderSpec->TotalSize == Footer.CurrentSize) + res = NExtract::NOperationResult::kOK; + } + else + { + if (hres != S_FALSE) + { + RINOK(hres); + } + } + } + outStream.Release(); + return extractCallback->SetOperationResult(res); + COM_TRY_END +} + +STDMETHODIMP CHandler::GetStream(UInt32 /* index */, ISequentialInStream **stream) +{ + COM_TRY_BEGIN + *stream = 0; + if (Footer.IsFixed()) + { + CLimitedInStream *streamSpec = new CLimitedInStream; + CMyComPtr streamTemp = streamSpec; + streamSpec->SetStream(Stream); + streamSpec->InitAndSeek(0, Footer.CurrentSize); + RINOK(streamSpec->SeekToStart()); + *stream = streamTemp.Detach(); + return S_OK; + } + if (!Footer.ThereIsDynamic() || !IsOK()) + return S_FALSE; + CMyComPtr streamTemp = this; + RINOK(InitAndSeek()); + *stream = streamTemp.Detach(); + return S_OK; + COM_TRY_END +} + +static IInArchive *CreateArc() { return new CHandler; } + +static CArcInfo g_ArcInfo = + { L"VHD", L"vhd", L".mbr", 0xDC, { 'c', 'o', 'n', 'e', 'c', 't', 'i', 'x', 0, 0 }, 10, false, CreateArc, 0 }; + +REGISTER_ARC(Vhd) + +}} diff --git a/CPP/7zip/Archive/Wim/WimHandler.cpp b/CPP/7zip/Archive/Wim/WimHandler.cpp new file mode 100644 index 0000000..eaad1e7 --- /dev/null +++ b/CPP/7zip/Archive/Wim/WimHandler.cpp @@ -0,0 +1,660 @@ +// WimHandler.cpp + +#include "StdAfx.h" + +#include "../../../../C/CpuArch.h" + +#include "Common/ComTry.h" +#include "Common/IntToString.h" +#include "Common/StringToInt.h" +#include "Common/UTFConvert.h" + +#include "Windows/PropVariant.h" + +#include "../../Common/ProgressUtils.h" +#include "../../Common/StreamUtils.h" + +#include "WimHandler.h" + +#define Get16(p) GetUi16(p) +#define Get32(p) GetUi32(p) +#define Get64(p) GetUi64(p) + +using namespace NWindows; + +namespace NArchive { +namespace NWim { + +#define WIM_DETAILS + +static STATPROPSTG kProps[] = +{ + { NULL, kpidPath, VT_BSTR}, + { NULL, kpidIsDir, VT_BOOL}, + { NULL, kpidSize, VT_UI8}, + { NULL, kpidPackSize, VT_UI8}, + { NULL, kpidMTime, VT_FILETIME}, + { NULL, kpidCTime, VT_FILETIME}, + { NULL, kpidATime, VT_FILETIME}, + { NULL, kpidAttrib, VT_UI4}, + { NULL, kpidMethod, VT_BSTR}, + { NULL, kpidShortName, VT_BSTR} + + #ifdef WIM_DETAILS + , { NULL, kpidVolume, VT_UI4} + , { NULL, kpidOffset, VT_UI8} + , { NULL, kpidLinks, VT_UI4} + #endif +}; + +static STATPROPSTG kArcProps[] = +{ + { NULL, kpidSize, VT_UI8}, + { NULL, kpidPackSize, VT_UI8}, + { NULL, kpidMethod, VT_BSTR}, + { NULL, kpidCTime, VT_FILETIME}, + { NULL, kpidMTime, VT_FILETIME}, + { NULL, kpidComment, VT_BSTR}, + { NULL, kpidUnpackVer, VT_BSTR}, + { NULL, kpidIsVolume, VT_BOOL}, + { NULL, kpidVolume, VT_UI4}, + { NULL, kpidNumVolumes, VT_UI4} +}; + +static bool ParseNumber64(const AString &s, UInt64 &res) +{ + const char *end; + if (s.Left(2) == "0x") + { + if (s.Length() == 2) + return false; + res = ConvertHexStringToUInt64((const char *)s + 2, &end); + } + else + { + if (s.IsEmpty()) + return false; + res = ConvertStringToUInt64(s, &end); + } + return *end == 0; +} + +static bool ParseNumber32(const AString &s, UInt32 &res) +{ + UInt64 res64; + if (!ParseNumber64(s, res64) || res64 >= ((UInt64)1 << 32)) + return false; + res = (UInt32)res64; + return true; +} + +bool ParseTime(const CXmlItem &item, FILETIME &ft, const char *tag) +{ + int index = item.FindSubTag(tag); + if (index >= 0) + { + const CXmlItem &timeItem = item.SubItems[index]; + UInt32 low = 0, high = 0; + if (ParseNumber32(timeItem.GetSubStringForTag("LOWPART"), low) && + ParseNumber32(timeItem.GetSubStringForTag("HIGHPART"), high)) + { + ft.dwLowDateTime = low; + ft.dwHighDateTime = high; + return true; + } + } + return false; +} + +void CImageInfo::Parse(const CXmlItem &item) +{ + CTimeDefined = ParseTime(item, CTime, "CREATIONTIME"); + MTimeDefined = ParseTime(item, MTime, "LASTMODIFICATIONTIME"); + NameDefined = ConvertUTF8ToUnicode(item.GetSubStringForTag("NAME"), Name); + // IndexDefined = ParseNumber32(item.GetPropertyValue("INDEX"), Index); +} + +void CXml::ToUnicode(UString &s) +{ + size_t size = Data.GetCapacity(); + if (size < 2 || (size & 1) != 0 || size > (1 << 24)) + return; + const Byte *p = Data; + if (Get16(p) != 0xFEFF) + return; + wchar_t *chars = s.GetBuffer((int)size / 2); + for (size_t i = 2; i < size; i += 2) + *chars++ = (wchar_t)Get16(p + i); + *chars = 0; + s.ReleaseBuffer(); +} + +void CXml::Parse() +{ + UString s; + ToUnicode(s); + AString utf; + if (!ConvertUnicodeToUTF8(s, utf)) + return; + ::CXml xml; + if (!xml.Parse(utf)) + return; + if (xml.Root.Name != "WIM") + return; + + for (int i = 0; i < xml.Root.SubItems.Size(); i++) + { + const CXmlItem &item = xml.Root.SubItems[i]; + if (item.IsTagged("IMAGE")) + { + CImageInfo imageInfo; + imageInfo.Parse(item); + Images.Add(imageInfo); + } + } +} + +static const char *kMethodLZX = "LZX"; +static const char *kMethodXpress = "XPress"; +static const char *kMethodCopy = "Copy"; + +IMP_IInArchive_Props +IMP_IInArchive_ArcProps + +STDMETHODIMP CHandler::GetArchiveProperty(PROPID propID, PROPVARIANT *value) +{ + COM_TRY_BEGIN + NWindows::NCOM::CPropVariant prop; + + const CImageInfo *image = NULL; + if (_xmls.Size() == 1) + { + const CXml &xml = _xmls[0]; + if (xml.Images.Size() == 1) + image = &xml.Images[0]; + } + + switch(propID) + { + case kpidSize: prop = _db.GetUnpackSize(); break; + case kpidPackSize: prop = _db.GetPackSize(); break; + + case kpidCTime: + if (_xmls.Size() == 1) + { + const CXml &xml = _xmls[0]; + int index = -1; + for (int i = 0; i < xml.Images.Size(); i++) + { + const CImageInfo &image = xml.Images[i]; + if (image.CTimeDefined) + if (index < 0 || ::CompareFileTime(&image.CTime, &xml.Images[index].CTime) < 0) + index = i; + } + if (index >= 0) + prop = xml.Images[index].CTime; + } + break; + + case kpidMTime: + if (_xmls.Size() == 1) + { + const CXml &xml = _xmls[0]; + int index = -1; + for (int i = 0; i < xml.Images.Size(); i++) + { + const CImageInfo &image = xml.Images[i]; + if (image.MTimeDefined) + if (index < 0 || ::CompareFileTime(&image.MTime, &xml.Images[index].MTime) > 0) + index = i; + } + if (index >= 0) + prop = xml.Images[index].MTime; + } + break; + + case kpidComment: + if (image != NULL) + { + if (_xmlInComments) + { + UString s; + _xmls[0].ToUnicode(s); + prop = s; + } + else if (image->NameDefined) + prop = image->Name; + } + break; + + case kpidUnpackVer: + { + UInt32 ver1 = _version >> 16; + UInt32 ver2 = (_version >> 8) & 0xFF; + UInt32 ver3 = (_version) & 0xFF; + + char s[16]; + ConvertUInt32ToString(ver1, s); + AString res = s; + res += '.'; + ConvertUInt32ToString(ver2, s); + res += s; + if (ver3 != 0) + { + res += '.'; + ConvertUInt32ToString(ver3, s); + res += s; + } + prop = res; + break; + } + + case kpidIsVolume: + if (_xmls.Size() > 0) + { + UInt16 volIndex = _xmls[0].VolIndex; + if (volIndex < _volumes.Size()) + prop = (_volumes[volIndex].Header.NumParts > 1); + } + break; + case kpidVolume: + if (_xmls.Size() > 0) + { + UInt16 volIndex = _xmls[0].VolIndex; + if (volIndex < _volumes.Size()) + prop = (UInt32)_volumes[volIndex].Header.PartNumber; + } + break; + case kpidNumVolumes: if (_volumes.Size() > 0) prop = (UInt32)(_volumes.Size() - 1); break; + case kpidMethod: + { + bool lzx = false, xpress = false, copy = false; + for (int i = 0; i < _xmls.Size(); i++) + { + const CHeader &header = _volumes[_xmls[i].VolIndex].Header; + if (header.IsCompressed()) + if (header.IsLzxMode()) + lzx = true; + else + xpress = true; + else + copy = true; + } + AString res; + if (lzx) + res = kMethodLZX; + if (xpress) + { + if (!res.IsEmpty()) + res += ' '; + res += kMethodXpress; + } + if (copy) + { + if (!res.IsEmpty()) + res += ' '; + res += kMethodCopy; + } + prop = res; + } + } + prop.Detach(value); + return S_OK; + COM_TRY_END +} + +STDMETHODIMP CHandler::GetProperty(UInt32 index, PROPID propID, PROPVARIANT *value) +{ + COM_TRY_BEGIN + NWindows::NCOM::CPropVariant prop; + if (index < (UInt32)_db.SortedItems.Size()) + { + int realIndex = _db.SortedItems[index]; + const CItem &item = _db.Items[realIndex]; + const CStreamInfo *si = NULL; + const CVolume *vol = NULL; + if (item.StreamIndex >= 0) + { + si = &_db.Streams[item.StreamIndex]; + vol = &_volumes[si->PartNumber]; + } + + switch(propID) + { + case kpidPath: + if (item.HasMetadata) + prop = _db.GetItemPath(realIndex); + else + { + char sz[16]; + ConvertUInt32ToString(item.StreamIndex, sz); + AString s = sz; + while (s.Length() < _nameLenForStreams) + s = '0' + s; + /* + if (si->Resource.IsFree()) + prefix = "[Free]"; + */ + s = "[Files]" STRING_PATH_SEPARATOR + s; + prop = s; + } + break; + case kpidShortName: if (item.HasMetadata) prop = item.ShortName; break; + + case kpidIsDir: prop = item.IsDir(); break; + case kpidAttrib: if (item.HasMetadata) prop = item.Attrib; break; + case kpidCTime: if (item.HasMetadata) prop = item.CTime; break; + case kpidATime: if (item.HasMetadata) prop = item.ATime; break; + case kpidMTime: if (item.HasMetadata) prop = item.MTime; break; + case kpidPackSize: prop = si ? si->Resource.PackSize : (UInt64)0; break; + case kpidSize: prop = si ? si->Resource.UnpackSize : (UInt64)0; break; + case kpidMethod: if (si) prop = si->Resource.IsCompressed() ? + (vol->Header.IsLzxMode() ? kMethodLZX : kMethodXpress) : kMethodCopy; break; + #ifdef WIM_DETAILS + case kpidVolume: if (si) prop = (UInt32)si->PartNumber; break; + case kpidOffset: if (si) prop = (UInt64)si->Resource.Offset; break; + case kpidLinks: prop = si ? (UInt32)si->RefCount : (UInt32)0; break; + #endif + } + } + else + { + index -= _db.SortedItems.Size(); + { + switch(propID) + { + case kpidPath: + { + char sz[16]; + ConvertUInt32ToString(_xmls[index].VolIndex, sz); + prop = (AString)"[" + (AString)sz + "].xml"; + break; + } + case kpidIsDir: prop = false; break; + case kpidPackSize: + case kpidSize: prop = (UInt64)_xmls[index].Data.GetCapacity(); break; + case kpidMethod: prop = kMethodCopy; break; + } + } + } + prop.Detach(value); + return S_OK; + COM_TRY_END +} + +class CVolumeName +{ + // UInt32 _volIndex; + UString _before; + UString _after; +public: + CVolumeName() {}; + + void InitName(const UString &name) + { + // _volIndex = 1; + int dotPos = name.ReverseFind('.'); + if (dotPos < 0) + dotPos = name.Length(); + _before = name.Left(dotPos); + _after = name.Mid(dotPos); + } + + UString GetNextName(UInt32 index) + { + wchar_t s[16]; + ConvertUInt32ToString(index, s); + return _before + (UString)s + _after; + } +}; + +STDMETHODIMP CHandler::Open(IInStream *inStream, + const UInt64 * /* maxCheckStartPosition */, + IArchiveOpenCallback *openArchiveCallback) +{ + COM_TRY_BEGIN + Close(); + { + CMyComPtr openVolumeCallback; + + CVolumeName seqName; + if (openArchiveCallback != NULL) + openArchiveCallback->QueryInterface(IID_IArchiveOpenVolumeCallback, (void **)&openVolumeCallback); + + UInt32 numVolumes = 1; + int firstVolumeIndex = -1; + for (UInt32 i = 1; i <= numVolumes; i++) + { + CMyComPtr curStream; + if (i != 1) + { + UString fullName = seqName.GetNextName(i); + HRESULT result = openVolumeCallback->GetStream(fullName, &curStream); + if (result == S_FALSE) + continue; + if (result != S_OK) + return result; + if (!curStream) + break; + } + else + curStream = inStream; + CHeader header; + HRESULT res = NWim::ReadHeader(curStream, header); + if (res != S_OK) + { + if (i == 1) + return res; + if (res == S_FALSE) + continue; + return res; + } + _version = header.Version; + _isOldVersion = header.IsOldVersion(); + if (firstVolumeIndex >= 0) + if (!header.AreFromOnArchive(_volumes[firstVolumeIndex].Header)) + break; + if (_volumes.Size() > header.PartNumber && _volumes[header.PartNumber].Stream) + break; + CXml xml; + xml.VolIndex = header.PartNumber; + res = _db.Open(curStream, header, xml.Data, openArchiveCallback); + if (res != S_OK) + { + if (i == 1) + return res; + if (res == S_FALSE) + continue; + return res; + } + + while (_volumes.Size() <= header.PartNumber) + _volumes.Add(CVolume()); + CVolume &volume = _volumes[header.PartNumber]; + volume.Header = header; + volume.Stream = curStream; + + firstVolumeIndex = header.PartNumber; + + bool needAddXml = true; + if (_xmls.Size() != 0) + if (xml.Data == _xmls[0].Data) + needAddXml = false; + if (needAddXml) + { + xml.Parse(); + _xmls.Add(xml); + } + + if (i == 1) + { + if (header.PartNumber != 1) + break; + if (!openVolumeCallback) + break; + numVolumes = header.NumParts; + { + NCOM::CPropVariant prop; + RINOK(openVolumeCallback->GetProperty(kpidName, &prop)); + if (prop.vt != VT_BSTR) + break; + seqName.InitName(prop.bstrVal); + } + } + } + + _db.DetectPathMode(); + RINOK(_db.Sort(_db.SkipRoot)); + + wchar_t sz[16]; + ConvertUInt32ToString(_db.Streams.Size(), sz); + _nameLenForStreams = MyStringLen(sz); + + _xmlInComments = (_xmls.Size() == 1 && !_db.ShowImageNumber); + } + return S_OK; + COM_TRY_END +} + +STDMETHODIMP CHandler::Close() +{ + _db.Clear(); + _volumes.Clear(); + _xmls.Clear(); + _nameLenForStreams = 0; + return S_OK; +} + +STDMETHODIMP CHandler::Extract(const UInt32 *indices, UInt32 numItems, + Int32 testMode, IArchiveExtractCallback *extractCallback) +{ + COM_TRY_BEGIN + bool allFilesMode = (numItems == (UInt32)-1); + + if (allFilesMode) + numItems = _db.SortedItems.Size() + _xmls.Size(); + if (numItems == 0) + return S_OK; + + UInt32 i; + UInt64 totalSize = 0; + for (i = 0; i < numItems; i++) + { + UInt32 index = allFilesMode ? i : indices[i]; + if (index < (UInt32)_db.SortedItems.Size()) + { + int streamIndex = _db.Items[_db.SortedItems[index]].StreamIndex; + if (streamIndex >= 0) + { + const CStreamInfo &si = _db.Streams[streamIndex]; + totalSize += si.Resource.UnpackSize; + } + } + else + totalSize += _xmls[index - (UInt32)_db.SortedItems.Size()].Data.GetCapacity(); + } + + RINOK(extractCallback->SetTotal(totalSize)); + + UInt64 currentTotalPacked = 0; + UInt64 currentTotalUnPacked = 0; + UInt64 currentItemUnPacked, currentItemPacked; + + int prevSuccessStreamIndex = -1; + + CUnpacker unpacker; + + CLocalProgress *lps = new CLocalProgress; + CMyComPtr progress = lps; + lps->Init(extractCallback, false); + + for (i = 0; i < numItems; currentTotalUnPacked += currentItemUnPacked, + currentTotalPacked += currentItemPacked) + { + currentItemUnPacked = 0; + currentItemPacked = 0; + + lps->InSize = currentTotalPacked; + lps->OutSize = currentTotalUnPacked; + + RINOK(lps->SetCur()); + UInt32 index = allFilesMode ? i : indices[i]; + i++; + Int32 askMode = testMode ? + NExtract::NAskMode::kTest : + NExtract::NAskMode::kExtract; + + CMyComPtr realOutStream; + RINOK(extractCallback->GetStream(index, &realOutStream, askMode)); + if (index >= (UInt32)_db.SortedItems.Size()) + { + if (!testMode && !realOutStream) + continue; + RINOK(extractCallback->PrepareOperation(askMode)); + const CByteBuffer &data = _xmls[index - (UInt32)_db.SortedItems.Size()].Data; + currentItemUnPacked = data.GetCapacity(); + if (realOutStream) + { + RINOK(WriteStream(realOutStream, (const Byte *)data, data.GetCapacity())); + realOutStream.Release(); + } + RINOK(extractCallback->SetOperationResult(NExtract::NOperationResult::kOK)); + continue; + } + + const CItem &item = _db.Items[_db.SortedItems[index]]; + int streamIndex = item.StreamIndex; + if (streamIndex < 0) + { + if (!testMode && !realOutStream) + continue; + RINOK(extractCallback->PrepareOperation(askMode)); + realOutStream.Release(); + RINOK(extractCallback->SetOperationResult(item.HasStream() ? + NExtract::NOperationResult::kDataError : + NExtract::NOperationResult::kOK)); + continue; + } + + const CStreamInfo &si = _db.Streams[streamIndex]; + currentItemUnPacked = si.Resource.UnpackSize; + currentItemPacked = si.Resource.PackSize; + + if (!testMode && !realOutStream) + continue; + RINOK(extractCallback->PrepareOperation(askMode)); + Int32 opRes = NExtract::NOperationResult::kOK; + if (streamIndex != prevSuccessStreamIndex || realOutStream) + { + Byte digest[20]; + const CVolume &vol = _volumes[si.PartNumber]; + HRESULT res = unpacker.Unpack(vol.Stream, si.Resource, vol.Header.IsLzxMode(), + realOutStream, progress, digest); + if (res == S_OK) + { + if (memcmp(digest, si.Hash, kHashSize) == 0) + prevSuccessStreamIndex = streamIndex; + else + opRes = NExtract::NOperationResult::kCRCError; + } + else if (res == S_FALSE) + opRes = NExtract::NOperationResult::kDataError; + else + return res; + } + realOutStream.Release(); + RINOK(extractCallback->SetOperationResult(opRes)); + } + return S_OK; + COM_TRY_END +} + +STDMETHODIMP CHandler::GetNumberOfItems(UInt32 *numItems) +{ + *numItems = _db.SortedItems.Size(); + if (!_xmlInComments) + *numItems += _xmls.Size(); + return S_OK; +} + +}} diff --git a/CPP/7zip/Archive/Wim/WimHandler.h b/CPP/7zip/Archive/Wim/WimHandler.h new file mode 100644 index 0000000..aa92069 --- /dev/null +++ b/CPP/7zip/Archive/Wim/WimHandler.h @@ -0,0 +1,77 @@ +// WimHandler.h + +#ifndef __ARCHIVE_WIM_HANDLER_H +#define __ARCHIVE_WIM_HANDLER_H + +#include "Common/MyCom.h" +#include "Common/MyXml.h" + +#include "WimIn.h" + +namespace NArchive { +namespace NWim { + +struct CVolume +{ + CHeader Header; + CMyComPtr Stream; +}; + +struct CImageInfo +{ + bool CTimeDefined; + bool MTimeDefined; + bool NameDefined; + // bool IndexDefined; + + FILETIME CTime; + FILETIME MTime; + UString Name; + // UInt32 Index; + + CImageInfo(): CTimeDefined(false), MTimeDefined(false), NameDefined(false) + // , IndexDefined(false) + {} + void Parse(const CXmlItem &item); +}; + +struct CXml +{ + CByteBuffer Data; + UInt16 VolIndex; + CObjectVector Images; + + void ToUnicode(UString &s); + void Parse(); +}; + + +class CHandler: + public IInArchive, + public CMyUnknownImp +{ + CDatabase _db; + UInt32 _version; + bool _isOldVersion; + CObjectVector _volumes; + CObjectVector _xmls; + int _nameLenForStreams; + bool _xmlInComments; + +public: + MY_UNKNOWN_IMP1(IInArchive) + INTERFACE_IInArchive(;) +}; + +class COutHandler: + public IOutArchive, + public CMyUnknownImp +{ +public: + MY_UNKNOWN_IMP1(IOutArchive) + INTERFACE_IOutArchive(;) +}; + +}} + +#endif diff --git a/CPP/7zip/Archive/Wim/WimHandlerOut.cpp b/CPP/7zip/Archive/Wim/WimHandlerOut.cpp new file mode 100644 index 0000000..50b879e --- /dev/null +++ b/CPP/7zip/Archive/Wim/WimHandlerOut.cpp @@ -0,0 +1,639 @@ +// WimHandlerOut.cpp + +#include "StdAfx.h" + +#include "../../../../C/CpuArch.h" + +#include "Common/ComTry.h" +#include "Common/IntToString.h" + +#include "Windows/PropVariant.h" +#include "Windows/Time.h" + +#include "../../Common/LimitedStreams.h" +#include "../../Common/ProgressUtils.h" +#include "../../Common/StreamUtils.h" + +#include "../../Crypto/RandGen.h" +#include "../../Crypto/Sha1.h" + +#include "WimHandler.h" + +using namespace NWindows; + +namespace NArchive { +namespace NWim { + +struct CSha1Hash +{ + Byte Hash[kHashSize]; +}; + +struct CHashList +{ + CRecordVector Digests; + CIntVector Sorted; + + int AddUnique(const CSha1Hash &h); +}; + +int CHashList::AddUnique(const CSha1Hash &h) +{ + int left = 0, right = Sorted.Size(); + while (left != right) + { + int mid = (left + right) / 2; + int index = Sorted[mid]; + UInt32 i; + const Byte *hash2 = Digests[index].Hash; + for (i = 0; i < kHashSize; i++) + if (h.Hash[i] != hash2[i]) + break; + if (i == kHashSize) + return index; + if (h.Hash[i] < hash2[i]) + right = mid; + else + left = mid + 1; + } + Sorted.Insert(left, Digests.Add(h)); + return -1; +} + +struct CUpdateItem +{ + UString Name; + UInt64 Size; + FILETIME CTime; + FILETIME ATime; + FILETIME MTime; + UInt32 Attrib; + bool IsDir; + int HashIndex; + + CUpdateItem(): HashIndex(-1) {} +}; + +struct CDir +{ + int Index; + UString Name; + CObjectVector Dirs; + CIntVector Files; + + CDir(): Index(-1) {} + bool IsLeaf() const { return Index >= 0; } + UInt64 GetNumDirs() const; + UInt64 GetNumFiles() const; + CDir* AddDir(CObjectVector &items, const UString &name, int index); +}; + +UInt64 CDir::GetNumDirs() const +{ + UInt64 num = Dirs.Size(); + for (int i = 0; i < Dirs.Size(); i++) + num += Dirs[i].GetNumDirs(); + return num; +} + +UInt64 CDir::GetNumFiles() const +{ + UInt64 num = Files.Size(); + for (int i = 0; i < Dirs.Size(); i++) + num += Dirs[i].GetNumFiles(); + return num; +} + +CDir* CDir::AddDir(CObjectVector &items, const UString &name, int index) +{ + int left = 0, right = Dirs.Size(); + while (left != right) + { + int mid = (left + right) / 2; + CDir &d = Dirs[mid]; + int compare = name.CompareNoCase(d.IsLeaf() ? items[Dirs[mid].Index].Name : d.Name); + if (compare == 0) + { + if (index >= 0) + d.Index = index; + return &d; + } + if (compare < 0) + right = mid; + else + left = mid + 1; + } + Dirs.Insert(left, CDir()); + CDir &d = Dirs[left]; + d.Index = index; + if (index < 0) + d.Name = name; + return &d; +} + + +STDMETHODIMP COutHandler::GetFileTimeType(UInt32 *type) +{ + *type = NFileTimeType::kWindows; + return S_OK; +} + +static HRESULT GetTime(IArchiveUpdateCallback *callback, int index, PROPID propID, FILETIME &ft) +{ + ft.dwLowDateTime = ft.dwHighDateTime = 0; + NCOM::CPropVariant prop; + RINOK(callback->GetProperty(index, propID, &prop)); + if (prop.vt == VT_FILETIME) + ft = prop.filetime; + else if (prop.vt != VT_EMPTY) + return E_INVALIDARG; + return S_OK; +} + +#define Set16(p, d) SetUi16(p, d) +#define Set32(p, d) SetUi32(p, d) +#define Set64(p, d) SetUi64(p, d) + +void CResource::WriteTo(Byte *p) const +{ + Set64(p, PackSize); + p[7] = Flags; + Set64(p + 8, Offset); + Set64(p + 16, UnpackSize); +} + +void CHeader::WriteTo(Byte *p) const +{ + memcpy(p, kSignature, kSignatureSize); + Set32(p + 8, kHeaderSizeMax); + Set32(p + 0xC, Version); + Set32(p + 0x10, Flags); + Set32(p + 0x14, ChunkSize); + memcpy(p + 0x18, Guid, 16); + Set16(p + 0x28, PartNumber); + Set16(p + 0x2A, NumParts); + Set32(p + 0x2C, NumImages); + OffsetResource.WriteTo(p + 0x30); + XmlResource.WriteTo(p + 0x48); + MetadataResource.WriteTo(p + 0x60); + IntegrityResource.WriteTo(p + 0x7C); + Set32(p + 0x78, BootIndex); + memset(p + 0x94, 0, 60); +} + +void CStreamInfo::WriteTo(Byte *p) const +{ + Resource.WriteTo(p); + Set16(p + 0x18, PartNumber); + Set32(p + 0x1A, RefCount); + memcpy(p + 0x1E, Hash, kHashSize); +} + +class CInStreamWithSha1: + public ISequentialInStream, + public CMyUnknownImp +{ + CMyComPtr _stream; + UInt64 _size; + NCrypto::NSha1::CContext _sha; +public: + MY_UNKNOWN_IMP1(IInStream) + STDMETHOD(Read)(void *data, UInt32 size, UInt32 *processedSize); + + void SetStream(ISequentialInStream *stream) { _stream = stream; } + void Init() + { + _size = 0; + _sha.Init(); + } + void ReleaseStream() { _stream.Release(); } + UInt64 GetSize() const { return _size; } + void Final(Byte *digest) { _sha.Final(digest); } +}; + +STDMETHODIMP CInStreamWithSha1::Read(void *data, UInt32 size, UInt32 *processedSize) +{ + UInt32 realProcessedSize; + HRESULT result = _stream->Read(data, size, &realProcessedSize); + _size += realProcessedSize; + _sha.Update((const Byte *)data, realProcessedSize); + if (processedSize != NULL) + *processedSize = realProcessedSize; + return result; +} + +static void SetFileTimeToMem(Byte *p, const FILETIME &ft) +{ + Set32(p, ft.dwLowDateTime); + Set32(p + 4, ft.dwHighDateTime); +} + +static size_t WriteItem(const CUpdateItem &item, Byte *p, const Byte *hash) +{ + int fileNameLen = item.Name.Length() * 2; + int fileNameLen2 = (fileNameLen == 0 ? fileNameLen : fileNameLen + 2); + + size_t totalLen = ((kDirRecordSize + fileNameLen2 + 6) & ~7); + if (p) + { + memset(p, 0, totalLen); + Set64(p, totalLen); + Set64(p + 8, item.Attrib); + Set32(p + 0xC, (UInt32)(Int32)-1); // item.SecurityId + // Set64(p + 0x10, 0); // subdirOffset + SetFileTimeToMem(p + 0x28, item.CTime); + SetFileTimeToMem(p + 0x30, item.ATime); + SetFileTimeToMem(p + 0x38, item.MTime); + if (hash) + memcpy(p + 0x40, hash, kHashSize); + /* + else + memset(p + 0x40, 0, kHashSize); + */ + // Set16(p + 98, 0); // shortNameLen + Set16(p + 100, (UInt16)fileNameLen); + for (int i = 0; i * 2 < fileNameLen; i++) + Set16(p + kDirRecordSize + i * 2, item.Name[i]); + } + return totalLen; +} + +static void WriteTree(const CDir &tree, CRecordVector &digests, + CUpdateItem &defaultDirItem, + CObjectVector &updateItems, Byte *dest, size_t &pos) +{ + int i; + for (i = 0; i < tree.Files.Size(); i++) + { + const CUpdateItem &ui = updateItems[tree.Files[i]]; + pos += WriteItem(ui, dest ? dest + pos : NULL, + ui.HashIndex >= 0 ? digests[ui.HashIndex].Hash : NULL); + } + + size_t posStart = pos; + for (i = 0; i < tree.Dirs.Size(); i++) + { + const CDir &subfolder = tree.Dirs[i]; + CUpdateItem *item = &defaultDirItem; + if (subfolder.IsLeaf()) + item = &updateItems[subfolder.Index]; + else + defaultDirItem.Name = subfolder.Name; + pos += WriteItem(*item, NULL, NULL); + } + + if (dest) + Set64(dest + pos, 0); + + pos += 8; + + for (i = 0; i < tree.Dirs.Size(); i++) + { + const CDir &subfolder = tree.Dirs[i]; + if (dest) + { + CUpdateItem *item = &defaultDirItem; + if (subfolder.IsLeaf()) + item = &updateItems[subfolder.Index]; + else + defaultDirItem.Name = subfolder.Name; + size_t len = WriteItem(*item, dest + posStart, NULL); + Set64(dest + posStart + 0x10, pos); + posStart += len; + } + WriteTree(subfolder, digests, defaultDirItem, updateItems, dest, pos); + } +} + +static void AddTag(AString &s, const char *name, const AString &value) +{ + s += "<"; + s += name; + s += ">"; + s += value; + s += ""; +} + +static void AddTagUInt64(AString &s, const char *name, UInt64 value) +{ + char temp[32]; + ConvertUInt64ToString(value, temp); + AddTag(s, name, temp); +} + +static AString TimeToXml(FILETIME &ft) +{ + AString res; + char temp[16] = { '0', 'x' }; + ConvertUInt32ToHexWithZeros(ft.dwHighDateTime, temp + 2); + AddTag(res, "HIGHPART", temp); + ConvertUInt32ToHexWithZeros(ft.dwLowDateTime, temp + 2); + AddTag(res, "LOWPART", temp); + return res; +} + +void CHeader::SetDefaultFields(bool useLZX) +{ + Version = kWimVersion; + Flags = NHeaderFlags::kRpFix; + ChunkSize = 0; + if (useLZX) + { + Flags |= NHeaderFlags::kCompression | NHeaderFlags::kLZX; + ChunkSize = kChunkSize; + } + g_RandomGenerator.Generate(Guid, 16); + PartNumber = 1; + NumParts = 1; + NumImages = 1; + BootIndex = 0; + OffsetResource.Clear(); + XmlResource.Clear(); + MetadataResource.Clear(); + IntegrityResource.Clear(); +} + +static HRESULT UpdateArchive(ISequentialOutStream *seqOutStream, + CDir &rootFolder, + CObjectVector &updateItems, + IArchiveUpdateCallback *callback) +{ + CMyComPtr outStream; + RINOK(seqOutStream->QueryInterface(IID_IOutStream, (void **)&outStream)); + if (!outStream) + return E_NOTIMPL; + + UInt64 complexity = 0; + + int i; + for (i = 0; i < updateItems.Size(); i++) + complexity += updateItems[i].Size; + + RINOK(callback->SetTotal(complexity)); + + NCompress::CCopyCoder *copyCoderSpec = new NCompress::CCopyCoder; + CMyComPtr copyCoder = copyCoderSpec; + + CLocalProgress *lps = new CLocalProgress; + CMyComPtr progress = lps; + lps->Init(callback, true); + + complexity = 0; + + bool useCompression = false; + + CHeader header; + header.SetDefaultFields(useCompression); + Byte buf[kHeaderSizeMax]; + header.WriteTo(buf); + RINOK(WriteStream(outStream, buf, kHeaderSizeMax)); + + CHashList hashes; + CObjectVector streams; + + UInt64 curPos = kHeaderSizeMax; + UInt64 unpackTotalSize = 0; + for (i = 0; i < updateItems.Size(); i++) + { + lps->InSize = lps->OutSize = complexity; + RINOK(lps->SetCur()); + + CUpdateItem &ui = updateItems[i]; + if (ui.IsDir || ui.Size == 0) + continue; + + CInStreamWithSha1 *inShaStreamSpec = new CInStreamWithSha1; + CMyComPtr inShaStream = inShaStreamSpec; + + { + CMyComPtr fileInStream; + HRESULT res = callback->GetStream(i, &fileInStream); + if (res != S_FALSE) + { + RINOK(res); + inShaStreamSpec->SetStream(fileInStream); + fileInStream.Release(); + inShaStreamSpec->Init(); + UInt64 offsetBlockSize = 0; + if (useCompression) + { + for (UInt64 t = kChunkSize; t < ui.Size; t += kChunkSize) + { + Byte buf[8]; + SetUi32(buf, (UInt32)t); + RINOK(WriteStream(outStream, buf, 4)); + offsetBlockSize += 4; + } + } + + RINOK(copyCoder->Code(inShaStream, outStream, NULL, NULL, progress)); + ui.Size = copyCoderSpec->TotalSize; + + CSha1Hash hash; + unpackTotalSize += ui.Size; + UInt64 packSize = offsetBlockSize + ui.Size; + inShaStreamSpec->Final(hash.Hash); + int index = hashes.AddUnique(hash); + if (index >= 0) + { + ui.HashIndex = index; + streams[index].RefCount++; + outStream->Seek(-(Int64)packSize, STREAM_SEEK_CUR, &curPos); + outStream->SetSize(curPos); + } + else + { + ui.HashIndex = hashes.Digests.Size() - 1; + CStreamInfo s; + s.Resource.PackSize = packSize; + s.Resource.Offset = curPos; + s.Resource.UnpackSize = ui.Size; + s.Resource.Flags = 0; + if (useCompression) + s.Resource.Flags = NResourceFlags::Compressed; + s.PartNumber = 1; + s.RefCount = 1; + memcpy(s.Hash, hash.Hash, kHashSize); + streams.Add(s); + curPos += packSize; + } + } + fileInStream.Release(); + complexity += ui.Size; + RINOK(callback->SetOperationResult(NArchive::NUpdate::NOperationResult::kOK)); + } + } + + + CUpdateItem ri; + FILETIME ft; + NTime::GetCurUtcFileTime(ft); + ri.MTime = ri.ATime = ri.CTime = ft; + ri.Attrib = FILE_ATTRIBUTE_DIRECTORY; + + const UInt32 kSecuritySize = 8; + size_t pos = kSecuritySize; + WriteTree(rootFolder, hashes.Digests, ri, updateItems, NULL, pos); + + CByteBuffer meta; + meta.SetCapacity(pos); + + // we can write 0 here only if there is no security data, imageX does it, + // but some programs expect size = 8 + Set32((Byte *)meta, 8); // size of security data + Set32((Byte *)meta + 4, 0); // num security entries + + pos = kSecuritySize; + WriteTree(rootFolder, hashes.Digests, ri, updateItems, (Byte *)meta, pos); + + { + NCrypto::NSha1::CContext sha; + sha.Init(); + sha.Update((const Byte *)meta, pos); + CSha1Hash digest; + sha.Final(digest.Hash); + + CStreamInfo s; + s.Resource.PackSize = pos; + s.Resource.Offset = curPos; + s.Resource.UnpackSize = pos; + s.Resource.Flags = NResourceFlags::kMetadata; + s.PartNumber = 1; + s.RefCount = 1; + memcpy(s.Hash, digest.Hash, kHashSize); + streams.Add(s); + RINOK(WriteStream(outStream, (const Byte *)meta, pos)); + meta.Free(); + curPos += pos; + } + + + header.OffsetResource.UnpackSize = header.OffsetResource.PackSize = (UInt64)streams.Size() * kStreamInfoSize; + header.OffsetResource.Offset = curPos; + header.OffsetResource.Flags = NResourceFlags::kMetadata; + + for (i = 0; i < streams.Size(); i++) + { + Byte buf[kStreamInfoSize]; + streams[i].WriteTo(buf); + RINOK(WriteStream(outStream, buf, kStreamInfoSize)); + curPos += kStreamInfoSize; + } + + AString xml = ""; + AddTagUInt64(xml, "TOTALBYTES", curPos); + xml += "1"; + AddTagUInt64(xml, "DIRCOUNT", rootFolder.GetNumDirs()); + AddTagUInt64(xml, "FILECOUNT", rootFolder.GetNumFiles()); + AddTagUInt64(xml, "TOTALBYTES", unpackTotalSize); + NTime::GetCurUtcFileTime(ft); + AddTag(xml, "CREATIONTIME", TimeToXml(ft)); + AddTag(xml, "LASTMODIFICATIONTIME", TimeToXml(ft)); + xml += ""; + + size_t xmlSize = (xml.Length() + 1) * 2; + meta.SetCapacity(xmlSize); + Set16((Byte *)meta, 0xFEFF); + for (i = 0; i < xml.Length(); i++) + Set16((Byte *)meta + 2 + i * 2, xml[i]); + RINOK(WriteStream(outStream, (const Byte *)meta, xmlSize)); + meta.Free(); + + header.XmlResource.UnpackSize = header.XmlResource.PackSize = xmlSize; + header.XmlResource.Offset = curPos; + header.XmlResource.Flags = NResourceFlags::kMetadata; + + outStream->Seek(0, STREAM_SEEK_SET, NULL); + header.WriteTo(buf); + return WriteStream(outStream, buf, kHeaderSizeMax); +} + +STDMETHODIMP COutHandler::UpdateItems(ISequentialOutStream *outStream, UInt32 numItems, + IArchiveUpdateCallback *callback) +{ + COM_TRY_BEGIN + CObjectVector updateItems; + CDir tree; + tree.Dirs.Add(CDir()); + CDir &rootFolder = tree.Dirs.Back(); + + for (UInt32 i = 0; i < numItems; i++) + { + CUpdateItem ui; + Int32 newData, newProps; + UInt32 indexInArchive; + if (!callback) + return E_FAIL; + RINOK(callback->GetUpdateItemInfo(i, &newData, &newProps, &indexInArchive)); + + { + NCOM::CPropVariant prop; + RINOK(callback->GetProperty(i, kpidIsDir, &prop)); + if (prop.vt == VT_EMPTY) + ui.IsDir = false; + else if (prop.vt != VT_BOOL) + return E_INVALIDARG; + else + ui.IsDir = (prop.boolVal != VARIANT_FALSE); + } + + { + NCOM::CPropVariant prop; + RINOK(callback->GetProperty(i, kpidAttrib, &prop)); + if (prop.vt == VT_EMPTY) + ui.Attrib = (ui.IsDir ? FILE_ATTRIBUTE_DIRECTORY : 0); + else if (prop.vt != VT_UI4) + return E_INVALIDARG; + else + ui.Attrib = prop.ulVal; + } + + RINOK(GetTime(callback, i, kpidCTime, ui.CTime)); + RINOK(GetTime(callback, i, kpidATime, ui.ATime)); + RINOK(GetTime(callback, i, kpidMTime, ui.MTime)); + + { + NCOM::CPropVariant prop; + RINOK(callback->GetProperty(i, kpidSize, &prop)); + if (prop.vt != VT_UI8) + return E_INVALIDARG; + ui.Size = prop.uhVal.QuadPart; + } + + UString path; + NCOM::CPropVariant prop; + RINOK(callback->GetProperty(i, kpidPath, &prop)); + if (prop.vt == VT_BSTR) + path = prop.bstrVal; + else if (prop.vt != VT_EMPTY) + return E_INVALIDARG; + + CDir *curItem = &rootFolder; + int len = path.Length(); + UString fileName; + for (int j = 0; j < len; j++) + { + wchar_t c = path[j]; + if (c == WCHAR_PATH_SEPARATOR || c == L'/') + { + curItem = curItem->AddDir(updateItems, fileName, -1); + fileName.Empty(); + } + else + fileName += c; + } + + ui.Name = fileName; + updateItems.Add(ui); + if (ui.IsDir) + curItem->AddDir(updateItems, fileName, (int)i); + else + curItem->Files.Add(i); + } + return UpdateArchive(outStream, tree, updateItems, callback); + COM_TRY_END +} + +}} diff --git a/CPP/7zip/Archive/Wim/WimIn.cpp b/CPP/7zip/Archive/Wim/WimIn.cpp new file mode 100644 index 0000000..c210804 --- /dev/null +++ b/CPP/7zip/Archive/Wim/WimIn.cpp @@ -0,0 +1,855 @@ +// Archive/WimIn.cpp + +#include "StdAfx.h" + +#include "../../../../C/CpuArch.h" + +#include "Common/IntToString.h" + +#include "../../Common/StreamUtils.h" +#include "../../Common/StreamObjects.h" +#include "../../Common/LimitedStreams.h" + +#include "../Common/OutStreamWithSha1.h" + +#include "WimIn.h" + +#define Get16(p) GetUi16(p) +#define Get32(p) GetUi32(p) +#define Get64(p) GetUi64(p) + +namespace NArchive { +namespace NWim { + +namespace NXpress { + +class CDecoderFlusher +{ + CDecoder *m_Decoder; +public: + bool NeedFlush; + CDecoderFlusher(CDecoder *decoder): m_Decoder(decoder), NeedFlush(true) {} + ~CDecoderFlusher() + { + if (NeedFlush) + m_Decoder->Flush(); + m_Decoder->ReleaseStreams(); + } +}; + +HRESULT CDecoder::CodeSpec(UInt32 outSize) +{ + { + Byte levels[kMainTableSize]; + for (unsigned i = 0; i < kMainTableSize; i += 2) + { + Byte b = m_InBitStream.DirectReadByte(); + levels[i] = b & 0xF; + levels[i + 1] = b >> 4; + } + if (!m_MainDecoder.SetCodeLengths(levels)) + return S_FALSE; + } + + while (outSize > 0) + { + UInt32 number = m_MainDecoder.DecodeSymbol(&m_InBitStream); + if (number < 256) + { + m_OutWindowStream.PutByte((Byte)number); + outSize--; + } + else + { + if (number >= kMainTableSize) + return S_FALSE; + UInt32 posLenSlot = number - 256; + UInt32 posSlot = posLenSlot / kNumLenSlots; + UInt32 len = posLenSlot % kNumLenSlots; + UInt32 distance = (1 << posSlot) - 1 + m_InBitStream.ReadBits(posSlot); + + if (len == kNumLenSlots - 1) + { + len = m_InBitStream.DirectReadByte(); + if (len == 0xFF) + { + len = m_InBitStream.DirectReadByte(); + len |= (UInt32)m_InBitStream.DirectReadByte() << 8; + } + else + len += kNumLenSlots - 1; + } + + len += kMatchMinLen; + UInt32 locLen = (len <= outSize ? len : outSize); + + if (!m_OutWindowStream.CopyBlock(distance, locLen)) + return S_FALSE; + + len -= locLen; + outSize -= locLen; + if (len != 0) + return S_FALSE; + } + } + return S_OK; +} + +const UInt32 kDictSize = (1 << kNumPosSlots); + +HRESULT CDecoder::CodeReal(ISequentialInStream *inStream, ISequentialOutStream *outStream, UInt32 outSize) +{ + if (!m_OutWindowStream.Create(kDictSize) || !m_InBitStream.Create(1 << 16)) + return E_OUTOFMEMORY; + + CDecoderFlusher flusher(this); + + m_InBitStream.SetStream(inStream); + m_OutWindowStream.SetStream(outStream); + m_InBitStream.Init(); + m_OutWindowStream.Init(false); + + RINOK(CodeSpec(outSize)); + + flusher.NeedFlush = false; + return Flush(); +} + +HRESULT CDecoder::Code(ISequentialInStream *inStream, ISequentialOutStream *outStream, UInt32 outSize) +{ + try { return CodeReal(inStream, outStream, outSize); } + catch(const CInBufferException &e) { return e.ErrorCode; } \ + catch(const CLzOutWindowException &e) { return e.ErrorCode; } + catch(...) { return S_FALSE; } +} + +} + +HRESULT CUnpacker::Unpack(IInStream *inStream, const CResource &resource, bool lzxMode, + ISequentialOutStream *outStream, ICompressProgressInfo *progress) +{ + RINOK(inStream->Seek(resource.Offset, STREAM_SEEK_SET, NULL)); + + CLimitedSequentialInStream *limitedStreamSpec = new CLimitedSequentialInStream(); + CMyComPtr limitedStream = limitedStreamSpec; + limitedStreamSpec->SetStream(inStream); + + if (!copyCoder) + { + copyCoderSpec = new NCompress::CCopyCoder; + copyCoder = copyCoderSpec; + } + if (!resource.IsCompressed()) + { + if (resource.PackSize != resource.UnpackSize) + return S_FALSE; + limitedStreamSpec->Init(resource.PackSize); + return copyCoder->Code(limitedStreamSpec, outStream, NULL, NULL, progress); + } + if (resource.UnpackSize == 0) + return S_OK; + UInt64 numChunks = (resource.UnpackSize + kChunkSize - 1) >> kChunkSizeBits; + unsigned entrySize = ((resource.UnpackSize > (UInt64)1 << 32) ? 8 : 4); + UInt64 sizesBufSize64 = entrySize * (numChunks - 1); + size_t sizesBufSize = (size_t)sizesBufSize64; + if (sizesBufSize != sizesBufSize64) + return E_OUTOFMEMORY; + if (sizesBufSize > sizesBuf.GetCapacity()) + { + sizesBuf.Free(); + sizesBuf.SetCapacity(sizesBufSize); + } + RINOK(ReadStream_FALSE(inStream, (Byte *)sizesBuf, sizesBufSize)); + const Byte *p = (const Byte *)sizesBuf; + + if (lzxMode && !lzxDecoder) + { + lzxDecoderSpec = new NCompress::NLzx::CDecoder(true); + lzxDecoder = lzxDecoderSpec; + RINOK(lzxDecoderSpec->SetParams(kChunkSizeBits)); + } + + UInt64 baseOffset = resource.Offset + sizesBufSize64; + UInt64 outProcessed = 0; + for (UInt32 i = 0; i < (UInt32)numChunks; i++) + { + UInt64 offset = 0; + if (i > 0) + { + offset = (entrySize == 4) ? Get32(p): Get64(p); + p += entrySize; + } + UInt64 nextOffset = resource.PackSize - sizesBufSize64; + if (i + 1 < (UInt32)numChunks) + nextOffset = (entrySize == 4) ? Get32(p): Get64(p); + if (nextOffset < offset) + return S_FALSE; + + RINOK(inStream->Seek(baseOffset + offset, STREAM_SEEK_SET, NULL)); + UInt64 inSize = nextOffset - offset; + limitedStreamSpec->Init(inSize); + + if (progress) + { + RINOK(progress->SetRatioInfo(&offset, &outProcessed)); + } + + UInt32 outSize = kChunkSize; + if (outProcessed + outSize > resource.UnpackSize) + outSize = (UInt32)(resource.UnpackSize - outProcessed); + UInt64 outSize64 = outSize; + if (inSize == outSize) + { + RINOK(copyCoder->Code(limitedStreamSpec, outStream, NULL, &outSize64, NULL)); + } + else + { + if (lzxMode) + { + lzxDecoderSpec->SetKeepHistory(false); + RINOK(lzxDecoder->Code(limitedStreamSpec, outStream, NULL, &outSize64, NULL)); + } + else + { + RINOK(xpressDecoder.Code(limitedStreamSpec, outStream, outSize)); + } + } + outProcessed += outSize; + } + return S_OK; +} + +HRESULT CUnpacker::Unpack(IInStream *inStream, const CResource &resource, bool lzxMode, + ISequentialOutStream *outStream, ICompressProgressInfo *progress, Byte *digest) +{ + COutStreamWithSha1 *shaStreamSpec = new COutStreamWithSha1(); + CMyComPtr shaStream = shaStreamSpec; + shaStreamSpec->SetStream(outStream); + shaStreamSpec->Init(digest != NULL); + HRESULT result = Unpack(inStream, resource, lzxMode, shaStream, progress); + if (digest) + shaStreamSpec->Final(digest); + return result; +} + +static HRESULT UnpackData(IInStream *inStream, const CResource &resource, bool lzxMode, CByteBuffer &buf, Byte *digest) +{ + size_t size = (size_t)resource.UnpackSize; + if (size != resource.UnpackSize) + return E_OUTOFMEMORY; + buf.Free(); + buf.SetCapacity(size); + + CBufPtrSeqOutStream *outStreamSpec = new CBufPtrSeqOutStream(); + CMyComPtr outStream = outStreamSpec; + outStreamSpec->Init((Byte *)buf, size); + + CUnpacker unpacker; + return unpacker.Unpack(inStream, resource, lzxMode, outStream, NULL, digest); +} + +void CResource::Parse(const Byte *p) +{ + Flags = p[7]; + PackSize = Get64(p) & (((UInt64)1 << 56) - 1); + Offset = Get64(p + 8); + UnpackSize = Get64(p + 16); +} + +#define GetResource(p, res) res.Parse(p) + +static void GetStream(bool oldVersion, const Byte *p, CStreamInfo &s) +{ + s.Resource.Parse(p); + if (oldVersion) + { + s.PartNumber = 1; + s.Id = Get32(p + 24); + s.RefCount = Get32(p + 28); + memcpy(s.Hash, p + 32, kHashSize); + } + else + { + s.PartNumber = Get16(p + 24); + s.RefCount = Get32(p + 26); + memcpy(s.Hash, p + 30, kHashSize); + } +} + +static const wchar_t *kLongPath = L"[LongPath]"; + +UString CDatabase::GetItemPath(const int index1) const +{ + int size = 0; + int index = index1; + int newLevel; + for (newLevel = 0;; newLevel = 1) + { + const CItem &item = Items[index]; + index = item.Parent; + if (index >= 0 || !SkipRoot) + size += item.Name.Length() + newLevel; + if (index < 0) + break; + if ((UInt32)size >= ((UInt32)1 << 16)) + return kLongPath; + } + + wchar_t temp[16]; + int imageLen = 0; + if (ShowImageNumber) + { + ConvertUInt32ToString(-1 - index, temp); + imageLen = MyStringLen(temp); + size += imageLen + 1; + } + if ((UInt32)size >= ((UInt32)1 << 16)) + return kLongPath; + + UString path; + wchar_t *s = path.GetBuffer(size); + s[size] = 0; + if (ShowImageNumber) + { + memcpy(s, temp, imageLen * sizeof(wchar_t)); + s[imageLen] = WCHAR_PATH_SEPARATOR; + } + + index = index1; + + for (newLevel = 0;; newLevel = 1) + { + const CItem &item = Items[index]; + index = item.Parent; + if (index >= 0 || !SkipRoot) + { + if (newLevel) + s[--size] = WCHAR_PATH_SEPARATOR; + size -= item.Name.Length(); + memcpy(s + size, item.Name, sizeof(wchar_t) * item.Name.Length()); + } + if (index < 0) + { + path.ReleaseBuffer(); + return path; + } + } +} + +static void GetFileTimeFromMem(const Byte *p, FILETIME *ft) +{ + ft->dwLowDateTime = Get32(p); + ft->dwHighDateTime = Get32(p + 4); +} + +static HRESULT ReadName(const Byte *p, int size, UString &dest) +{ + if (size == 0) + return S_OK; + if (Get16(p + size) != 0) + return S_FALSE; + wchar_t *s = dest.GetBuffer(size / 2); + for (int i = 0; i <= size; i += 2) + *s++ = Get16(p + i); + dest.ReleaseBuffer(); + return S_OK; +} + +HRESULT CDatabase::ParseDirItem(size_t pos, int parent) +{ + if ((pos & 7) != 0) + return S_FALSE; + + int prevIndex = -1; + for (int numItems = 0;; numItems++) + { + if (OpenCallback) + { + UInt64 numFiles = Items.Size(); + if ((numFiles & 0x3FF) == 0) + { + RINOK(OpenCallback->SetCompleted(&numFiles, NULL)); + } + } + size_t rem = DirSize - pos; + if (pos < DirStartOffset || pos > DirSize || rem < 8) + return S_FALSE; + const Byte *p = DirData + pos; + UInt64 len = Get64(p); + if (len == 0) + { + if (parent < 0 && numItems != 1) + SkipRoot = false; + DirProcessed += 8; + return S_OK; + } + if ((len & 7) != 0 || rem < len) + return S_FALSE; + if (!IsOldVersion) + if (len < 0x28) + return S_FALSE; + DirProcessed += (size_t)len; + if (DirProcessed > DirSize) + return S_FALSE; + int extraOffset = 0; + if (IsOldVersion) + { + if (len < 0x40 || (/* Get32(p + 12) == 0 && */ Get32(p + 0x14) != 0)) + { + extraOffset = 0x10; + } + } + else if (Get64(p + 8) == 0) + extraOffset = 0x24; + if (extraOffset) + { + if (prevIndex == -1) + return S_FALSE; + UInt32 fileNameLen = Get16(p + extraOffset); + if ((fileNameLen & 1) != 0) + return S_FALSE; + /* Probably different versions of ImageX can use different number of + additional ZEROs. So we don't use exact check. */ + UInt32 fileNameLen2 = (fileNameLen == 0 ? fileNameLen : fileNameLen + 2); + if (((extraOffset + 2 + fileNameLen2 + 6) & ~7) > len) + return S_FALSE; + + UString name; + RINOK(ReadName(p + extraOffset + 2, fileNameLen, name)); + + CItem &prevItem = Items[prevIndex]; + if (name.IsEmpty() && !prevItem.HasStream()) + { + if (IsOldVersion) + prevItem.Id = Get32(p + 8); + else + memcpy(prevItem.Hash, p + 0x10, kHashSize); + } + else + { + CItem item; + item.Name = prevItem.Name + L':' + name; + item.CTime = prevItem.CTime; + item.ATime = prevItem.ATime; + item.MTime = prevItem.MTime; + if (IsOldVersion) + { + item.Id = Get32(p + 8); + memset(item.Hash, 0, kHashSize); + } + else + memcpy(item.Hash, p + 0x10, kHashSize); + item.Attrib = 0; + item.Order = Order++; + item.Parent = parent; + Items.Add(item); + } + pos += (size_t)len; + continue; + } + + UInt32 dirRecordSize = IsOldVersion ? kDirRecordSizeOld : kDirRecordSize; + if (len < dirRecordSize) + return S_FALSE; + + CItem item; + item.Attrib = Get32(p + 8); + // item.SecurityId = Get32(p + 0xC); + UInt64 subdirOffset = Get64(p + 0x10); + UInt32 timeOffset = IsOldVersion ? 0x18: 0x28; + GetFileTimeFromMem(p + timeOffset, &item.CTime); + GetFileTimeFromMem(p + timeOffset + 8, &item.ATime); + GetFileTimeFromMem(p + timeOffset + 16, &item.MTime); + if (IsOldVersion) + { + item.Id = Get32(p + 0x10); + memset(item.Hash, 0, kHashSize); + } + else + { + memcpy(item.Hash, p + 0x40, kHashSize); + } + // UInt32 numStreams = Get16(p + dirRecordSize - 6); + UInt32 shortNameLen = Get16(p + dirRecordSize - 4); + UInt32 fileNameLen = Get16(p + dirRecordSize - 2); + + if ((shortNameLen & 1) != 0 || (fileNameLen & 1) != 0) + return S_FALSE; + + UInt32 shortNameLen2 = (shortNameLen == 0 ? shortNameLen : shortNameLen + 2); + UInt32 fileNameLen2 = (fileNameLen == 0 ? fileNameLen : fileNameLen + 2); + + if (((dirRecordSize + fileNameLen2 + shortNameLen2 + 6) & ~7) > len) + return S_FALSE; + p += dirRecordSize; + + RINOK(ReadName(p, fileNameLen, item.Name)); + RINOK(ReadName(p + fileNameLen2, shortNameLen, item.ShortName)); + + if (parent < 0 && (shortNameLen || fileNameLen || !item.IsDir())) + SkipRoot = false; + + /* + // there are some extra data for some files. + p -= dirRecordSize; + p += ((dirRecordSize + fileNameLen2 + shortNameLen2 + 6) & ~7); + if (((dirRecordSize + fileNameLen2 + shortNameLen2 + 6) & ~7) != len) + p = p; + */ + + /* + if (parent >= 0) + { + UString s = GetItemPath(parent) + L"\\" + item.Name; + printf("\n%s %8x %S", item.IsDir() ? "D" : " ", (int)subdirOffset, (const wchar_t *)s); + } + */ + + if (fileNameLen == 0 && item.IsDir() && !item.HasStream()) + item.Attrib = 0x10; // some swm archives have system/hidden attributes for root + + item.Parent = parent; + prevIndex = Items.Add(item); + if (item.IsDir() && subdirOffset != 0) + { + RINOK(ParseDirItem((size_t)subdirOffset, prevIndex)); + } + Items[prevIndex].Order = Order++; + pos += (size_t)len; + } +} + +HRESULT CDatabase::ParseImageDirs(const CByteBuffer &buf, int parent) +{ + DirData = buf; + DirSize = buf.GetCapacity(); + + size_t pos = 0; + if (DirSize < 8) + return S_FALSE; + const Byte *p = DirData; + UInt32 totalLength = Get32(p); + if (IsOldVersion) + { + for (pos = 4;; pos += 8) + { + if (pos + 4 > DirSize) + return S_FALSE; + UInt32 n = Get32(p + pos); + if (n == 0) + break; + if (pos + 8 > DirSize) + return S_FALSE; + totalLength += Get32(p + pos + 4); + if (totalLength > DirSize) + return S_FALSE; + } + pos += totalLength + 4; + pos = (pos + 7) & ~(size_t)7; + if (pos > DirSize) + return S_FALSE; + } + else + { + + // UInt32 numEntries = Get32(p + 4); + pos += 8; + { + /* + CRecordVector entryLens; + UInt64 sum = 0; + for (UInt32 i = 0; i < numEntries; i++) + { + if (pos + 8 > DirSize) + return S_FALSE; + UInt64 len = Get64(p + pos); + entryLens.Add(len); + sum += len; + pos += 8; + } + pos += (size_t)sum; // skip security descriptors + while ((pos & 7) != 0) + pos++; + if (pos != totalLength) + return S_FALSE; + */ + if (totalLength == 0) + pos = 8; + else if (totalLength < 8) + return S_FALSE; + else + pos = totalLength; + } + } + DirStartOffset = DirProcessed = pos; + RINOK(ParseDirItem(pos, parent)); + if (DirProcessed == DirSize) + return S_OK; + /* Original program writes additional 8 bytes (END_OF_ROOT_FOLDER), but + reference to that folder is empty */ + if (DirProcessed == DirSize - 8 && DirProcessed - DirStartOffset == 112 && + Get64(p + DirSize - 8) == 0) + return S_OK; + return S_FALSE; +} + +HRESULT CHeader::Parse(const Byte *p) +{ + UInt32 headerSize = Get32(p + 8); + Version = Get32(p + 0x0C); + Flags = Get32(p + 0x10); + if (!IsSupported()) + return S_FALSE; + ChunkSize = Get32(p + 0x14); + if (ChunkSize != kChunkSize && ChunkSize != 0) + return S_FALSE; + int offset; + if (IsOldVersion()) + { + if (headerSize != 0x60) + return S_FALSE; + memset(Guid, 0, 16); + offset = 0x18; + PartNumber = 1; + NumParts = 1; + } + else + { + if (headerSize < 0x74) + return S_FALSE; + memcpy(Guid, p + 0x18, 16); + PartNumber = Get16(p + 0x28); + NumParts = Get16(p + 0x2A); + offset = 0x2C; + if (IsNewVersion()) + { + NumImages = Get32(p + offset); + offset += 4; + } + } + GetResource(p + offset, OffsetResource); + GetResource(p + offset + 0x18, XmlResource); + GetResource(p + offset + 0x30, MetadataResource); + if (IsNewVersion()) + { + if (headerSize < 0xD0) + return S_FALSE; + BootIndex = Get32(p + 0x48); + IntegrityResource.Parse(p + offset + 0x4C); + } + return S_OK; +} + +const Byte kSignature[kSignatureSize] = { 'M', 'S', 'W', 'I', 'M', 0, 0, 0 }; + +HRESULT ReadHeader(IInStream *inStream, CHeader &h) +{ + Byte p[kHeaderSizeMax]; + RINOK(ReadStream_FALSE(inStream, p, kHeaderSizeMax)); + if (memcmp(p, kSignature, kSignatureSize) != 0) + return S_FALSE; + return h.Parse(p); +} + +static HRESULT ReadStreams(bool oldVersion, IInStream *inStream, const CHeader &h, CDatabase &db) +{ + CByteBuffer offsetBuf; + RINOK(UnpackData(inStream, h.OffsetResource, h.IsLzxMode(), offsetBuf, NULL)); + size_t i; + size_t streamInfoSize = oldVersion ? kStreamInfoSize + 2 : kStreamInfoSize; + for (i = 0; offsetBuf.GetCapacity() - i >= streamInfoSize; i += streamInfoSize) + { + CStreamInfo s; + GetStream(oldVersion, (const Byte *)offsetBuf + i, s); + if (s.PartNumber == h.PartNumber) + db.Streams.Add(s); + } + return (i == offsetBuf.GetCapacity()) ? S_OK : S_FALSE; +} + +static bool IsEmptySha(const Byte *data) +{ + for (int i = 0; i < kHashSize; i++) + if (data[i] != 0) + return false; + return true; +} + +HRESULT CDatabase::Open(IInStream *inStream, const CHeader &h, CByteBuffer &xml, IArchiveOpenCallback *openCallback) +{ + OpenCallback = openCallback; + IsOldVersion = h.IsOldVersion(); + RINOK(UnpackData(inStream, h.XmlResource, h.IsLzxMode(), xml, NULL)); + RINOK(ReadStreams(h.IsOldVersion(), inStream, h, *this)); + bool needBootMetadata = !h.MetadataResource.IsEmpty(); + Order = 0; + if (h.PartNumber == 1) + { + int imageIndex = 1; + for (int i = 0; i < Streams.Size(); i++) + { + // if (imageIndex > 1) break; + const CStreamInfo &si = Streams[i]; + if (!si.Resource.IsMetadata() || si.PartNumber != h.PartNumber) + continue; + Byte hash[kHashSize]; + CByteBuffer metadata; + RINOK(UnpackData(inStream, si.Resource, h.IsLzxMode(), metadata, hash)); + if (memcmp(hash, si.Hash, kHashSize) != 0 && + !(h.IsOldVersion() && IsEmptySha(si.Hash))) + return S_FALSE; + NumImages++; + RINOK(ParseImageDirs(metadata, -(int)(++imageIndex))); + if (needBootMetadata) + if (h.MetadataResource.Offset == si.Resource.Offset) + needBootMetadata = false; + } + } + + if (needBootMetadata) + { + CByteBuffer metadata; + RINOK(UnpackData(inStream, h.MetadataResource, h.IsLzxMode(), metadata, NULL)); + RINOK(ParseImageDirs(metadata, -1)); + NumImages++; + } + return S_OK; +} + + +static int CompareStreamsByPos(const CStreamInfo *p1, const CStreamInfo *p2, void * /* param */) +{ + int res = MyCompare(p1->PartNumber, p2->PartNumber); + if (res != 0) + return res; + return MyCompare(p1->Resource.Offset, p2->Resource.Offset); +} + +static int CompareIDs(const int *p1, const int *p2, void *param) +{ + const CRecordVector &streams = *(const CRecordVector *)param; + return MyCompare(streams[*p1].Id, streams[*p2].Id); +} + +static int CompareHashRefs(const int *p1, const int *p2, void *param) +{ + const CRecordVector &streams = *(const CRecordVector *)param; + return memcmp(streams[*p1].Hash, streams[*p2].Hash, kHashSize); +} + +static int FindId(const CRecordVector &streams, + const CIntVector &sortedByHash, UInt32 id) +{ + int left = 0, right = streams.Size(); + while (left != right) + { + int mid = (left + right) / 2; + int streamIndex = sortedByHash[mid]; + UInt32 id2 = streams[streamIndex].Id; + if (id == id2) + return streamIndex; + if (id < id2) + right = mid; + else + left = mid + 1; + } + return -1; +} + +static int FindHash(const CRecordVector &streams, + const CIntVector &sortedByHash, const Byte *hash) +{ + int left = 0, right = streams.Size(); + while (left != right) + { + int mid = (left + right) / 2; + int streamIndex = sortedByHash[mid]; + UInt32 i; + const Byte *hash2 = streams[streamIndex].Hash; + for (i = 0; i < kHashSize; i++) + if (hash[i] != hash2[i]) + break; + if (i == kHashSize) + return streamIndex; + if (hash[i] < hash2[i]) + right = mid; + else + left = mid + 1; + } + return -1; +} + +static int CompareItems(const int *a1, const int *a2, void *param) +{ + const CObjectVector &items = ((CDatabase *)param)->Items; + const CItem &i1 = items[*a1]; + const CItem &i2 = items[*a2]; + + if (i1.IsDir() != i2.IsDir()) + return i1.IsDir() ? 1 : -1; + int res = MyCompare(i1.StreamIndex, i2.StreamIndex); + if (res != 0) + return res; + return MyCompare(i1.Order, i2.Order); +} + +HRESULT CDatabase::Sort(bool skipRootDir) +{ + Streams.Sort(CompareStreamsByPos, NULL); + + { + CIntVector sortedByHash; + { + for (int i = 0; i < Streams.Size(); i++) + sortedByHash.Add(i); + if (IsOldVersion) + sortedByHash.Sort(CompareIDs, &Streams); + else + sortedByHash.Sort(CompareHashRefs, &Streams); + } + + for (int i = 0; i < Items.Size(); i++) + { + CItem &item = Items[i]; + item.StreamIndex = -1; + if (item.HasStream()) + if (IsOldVersion) + item.StreamIndex = FindId(Streams, sortedByHash, item.Id); + else + item.StreamIndex = FindHash(Streams, sortedByHash, item.Hash); + } + } + + { + CRecordVector used; + int i; + for (i = 0; i < Streams.Size(); i++) + { + const CStreamInfo &s = Streams[i]; + used.Add(s.Resource.IsMetadata() && s.PartNumber == 1); + // used.Add(false); + } + for (i = 0; i < Items.Size(); i++) + { + CItem &item = Items[i]; + if (item.StreamIndex >= 0) + used[item.StreamIndex] = true; + } + for (i = 0; i < Streams.Size(); i++) + if (!used[i]) + { + CItem item; + item.StreamIndex = i; + item.HasMetadata = false; + Items.Add(item); + } + } + + SortedItems.Reserve(Items.Size()); + for (int i = (skipRootDir ? 1 : 0); i < Items.Size(); i++) + SortedItems.Add(i); + SortedItems.Sort(CompareItems, this); + return S_OK; +} + +}} diff --git a/CPP/7zip/Archive/Wim/WimIn.h b/CPP/7zip/Archive/Wim/WimIn.h new file mode 100644 index 0000000..da3e28a --- /dev/null +++ b/CPP/7zip/Archive/Wim/WimIn.h @@ -0,0 +1,297 @@ +// Archive/WimIn.h + +#ifndef __ARCHIVE_WIM_IN_H +#define __ARCHIVE_WIM_IN_H + +#include "Common/Buffer.h" +#include "Common/MyString.h" + +#include "../../Compress/CopyCoder.h" +#include "../../Compress/LzxDecoder.h" + +#include "../IArchive.h" + +namespace NArchive { +namespace NWim { + +namespace NXpress { + +class CBitStream +{ + CInBuffer m_Stream; + UInt32 m_Value; + unsigned m_BitPos; +public: + bool Create(UInt32 bufferSize) { return m_Stream.Create(bufferSize); } + void SetStream(ISequentialInStream *s) { m_Stream.SetStream(s); } + void ReleaseStream() { m_Stream.ReleaseStream(); } + + void Init() { m_Stream.Init(); m_BitPos = 0; } + // UInt64 GetProcessedSize() const { return m_Stream.GetProcessedSize() - m_BitPos / 8; } + Byte DirectReadByte() { return m_Stream.ReadByte(); } + + void Normalize() + { + if (m_BitPos < 16) + { + Byte b0 = m_Stream.ReadByte(); + Byte b1 = m_Stream.ReadByte(); + m_Value = (m_Value << 8) | b1; + m_Value = (m_Value << 8) | b0; + m_BitPos += 16; + } + } + + UInt32 GetValue(unsigned numBits) + { + Normalize(); + return (m_Value >> (m_BitPos - numBits)) & ((1 << numBits) - 1); + } + + void MovePos(unsigned numBits) { m_BitPos -= numBits; } + + UInt32 ReadBits(unsigned numBits) + { + UInt32 res = GetValue(numBits); + m_BitPos -= numBits; + return res; + } +}; + +const unsigned kNumHuffmanBits = 16; +const UInt32 kMatchMinLen = 3; +const UInt32 kNumLenSlots = 16; +const UInt32 kNumPosSlots = 16; +const UInt32 kNumPosLenSlots = kNumPosSlots * kNumLenSlots; +const UInt32 kMainTableSize = 256 + kNumPosLenSlots; + +class CDecoder +{ + CBitStream m_InBitStream; + CLzOutWindow m_OutWindowStream; + NCompress::NHuffman::CDecoder m_MainDecoder; + + HRESULT CodeSpec(UInt32 size); + HRESULT CodeReal(ISequentialInStream *inStream, ISequentialOutStream *outStream, UInt32 outSize); +public: + void ReleaseStreams() + { + m_OutWindowStream.ReleaseStream(); + m_InBitStream.ReleaseStream(); + } + HRESULT Flush() { return m_OutWindowStream.Flush(); } + HRESULT Code(ISequentialInStream *inStream, ISequentialOutStream *outStream, UInt32 outSize); +}; + +} + +namespace NResourceFlags +{ + const Byte kFree = 1; + const Byte kMetadata = 2; + const Byte Compressed = 4; + const Byte Spanned = 4; +} + +struct CResource +{ + UInt64 PackSize; + UInt64 Offset; + UInt64 UnpackSize; + Byte Flags; + + void Clear() + { + PackSize = 0; + Offset = 0; + UnpackSize = 0; + Flags = 0; + } + void Parse(const Byte *p); + void WriteTo(Byte *p) const; + bool IsFree() const { return (Flags & NResourceFlags::kFree) != 0; } + bool IsMetadata() const { return (Flags & NResourceFlags::kMetadata) != 0; } + bool IsCompressed() const { return (Flags & NResourceFlags::Compressed) != 0; } + bool IsEmpty() const { return (UnpackSize == 0); } +}; + +namespace NHeaderFlags +{ + const UInt32 kCompression = 2; + const UInt32 kSpanned = 8; + const UInt32 kRpFix = 0x80; + const UInt32 kXPRESS = 0x20000; + const UInt32 kLZX = 0x40000; +} + +const UInt32 kWimVersion = 0x010D00; +const UInt32 kHeaderSizeMax = 0xD0; +const UInt32 kSignatureSize = 8; +extern const Byte kSignature[kSignatureSize]; +const unsigned kChunkSizeBits = 15; +const UInt32 kChunkSize = (1 << kChunkSizeBits); + +struct CHeader +{ + UInt32 Version; + UInt32 Flags; + UInt32 ChunkSize; + Byte Guid[16]; + UInt16 PartNumber; + UInt16 NumParts; + UInt32 NumImages; + + CResource OffsetResource; + CResource XmlResource; + CResource MetadataResource; + CResource IntegrityResource; + UInt32 BootIndex; + + void SetDefaultFields(bool useLZX); + + void WriteTo(Byte *p) const; + HRESULT Parse(const Byte *p); + bool IsCompressed() const { return (Flags & NHeaderFlags::kCompression) != 0; } + bool IsSupported() const { return (!IsCompressed() || (Flags & NHeaderFlags::kLZX) != 0 || (Flags & NHeaderFlags::kXPRESS) != 0 ) ; } + bool IsLzxMode() const { return (Flags & NHeaderFlags::kLZX) != 0; } + bool IsSpanned() const { return (!IsCompressed() || (Flags & NHeaderFlags::kSpanned) != 0); } + bool IsOldVersion() const { return (Version <= 0x010A00); } + bool IsNewVersion() const { return (Version > 0x010C00); } + + bool AreFromOnArchive(const CHeader &h) + { + return (memcmp(Guid, h.Guid, sizeof(Guid)) == 0) && (h.NumParts == NumParts); + } +}; + +const UInt32 kHashSize = 20; +const UInt32 kStreamInfoSize = 24 + 2 + 4 + kHashSize; + +struct CStreamInfo +{ + CResource Resource; + UInt16 PartNumber; + UInt32 RefCount; + UInt32 Id; + BYTE Hash[kHashSize]; + + void WriteTo(Byte *p) const; +}; + +const UInt32 kDirRecordSizeOld = 62; +const UInt32 kDirRecordSize = 102; + +struct CItem +{ + UString Name; + UString ShortName; + UInt32 Attrib; + // UInt32 SecurityId; + BYTE Hash[kHashSize]; + UInt32 Id; + FILETIME CTime; + FILETIME ATime; + FILETIME MTime; + // UInt32 ReparseTag; + // UInt64 HardLink; + // UInt16 NumStreams; + int StreamIndex; + int Parent; + unsigned Order; + bool HasMetadata; + CItem(): HasMetadata(true), StreamIndex(-1), Id(0) {} + bool IsDir() const { return HasMetadata && ((Attrib & 0x10) != 0); } + bool HasStream() const + { + for (unsigned i = 0; i < kHashSize; i++) + if (Hash[i] != 0) + return true; + return Id != 0; + } +}; + +class CDatabase +{ + const Byte *DirData; + size_t DirSize; + size_t DirProcessed; + size_t DirStartOffset; + int Order; + IArchiveOpenCallback *OpenCallback; + + HRESULT ParseDirItem(size_t pos, int parent); + HRESULT ParseImageDirs(const CByteBuffer &buf, int parent); + +public: + CRecordVector Streams; + CObjectVector Items; + CIntVector SortedItems; + int NumImages; + bool SkipRoot; + bool ShowImageNumber; + + bool IsOldVersion; + + UInt64 GetUnpackSize() const + { + UInt64 res = 0; + for (int i = 0; i < Streams.Size(); i++) + res += Streams[i].Resource.UnpackSize; + return res; + } + + UInt64 GetPackSize() const + { + UInt64 res = 0; + for (int i = 0; i < Streams.Size(); i++) + res += Streams[i].Resource.PackSize; + return res; + } + + void Clear() + { + Streams.Clear(); + Items.Clear(); + SortedItems.Clear(); + NumImages = 0; + + SkipRoot = true; + ShowImageNumber = true; + IsOldVersion = false; + } + + UString GetItemPath(int index) const; + + HRESULT Open(IInStream *inStream, const CHeader &h, CByteBuffer &xml, IArchiveOpenCallback *openCallback); + + void DetectPathMode() + { + ShowImageNumber = (NumImages != 1); + } + + HRESULT Sort(bool skipRootDir); +}; + +HRESULT ReadHeader(IInStream *inStream, CHeader &header); + +class CUnpacker +{ + NCompress::CCopyCoder *copyCoderSpec; + CMyComPtr copyCoder; + + NCompress::NLzx::CDecoder *lzxDecoderSpec; + CMyComPtr lzxDecoder; + + NXpress::CDecoder xpressDecoder; + + CByteBuffer sizesBuf; + HRESULT Unpack(IInStream *inStream, const CResource &res, bool lzxMode, + ISequentialOutStream *outStream, ICompressProgressInfo *progress); +public: + HRESULT Unpack(IInStream *inStream, const CResource &res, bool lzxMode, + ISequentialOutStream *outStream, ICompressProgressInfo *progress, Byte *digest); +}; + +}} + +#endif diff --git a/CPP/7zip/Archive/Wim/WimRegister.cpp b/CPP/7zip/Archive/Wim/WimRegister.cpp new file mode 100644 index 0000000..8da9143 --- /dev/null +++ b/CPP/7zip/Archive/Wim/WimRegister.cpp @@ -0,0 +1,18 @@ +// WimRegister.cpp + +#include "StdAfx.h" + +#include "../../Common/RegisterArc.h" + +#include "WimHandler.h" +static IInArchive *CreateArc() { return new NArchive::NWim::CHandler; } +#ifndef EXTRACT_ONLY +static IOutArchive *CreateArcOut() { return new NArchive::NWim::COutHandler; } +#else +#define CreateArcOut 0 +#endif + +static CArcInfo g_ArcInfo = + { L"wim", L"wim swm", 0, 0xE6, { 'M', 'S', 'W', 'I', 'M', 0, 0, 0 }, 8, false, CreateArc, CreateArcOut }; + +REGISTER_ARC(Wim) diff --git a/CPP/7zip/Archive/XarHandler.cpp b/CPP/7zip/Archive/XarHandler.cpp new file mode 100644 index 0000000..e7d88b6 --- /dev/null +++ b/CPP/7zip/Archive/XarHandler.cpp @@ -0,0 +1,588 @@ +// XarHandler.cpp + +#include "StdAfx.h" + +#include "../../../C/CpuArch.h" + +#include "Common/ComTry.h" +#include "Common/MyXml.h" +#include "Common/StringToInt.h" +#include "Common/UTFConvert.h" + +#include "Windows/PropVariant.h" +#include "Windows/Time.h" + +#include "../Common/LimitedStreams.h" +#include "../Common/ProgressUtils.h" +#include "../Common/RegisterArc.h" +#include "../Common/StreamObjects.h" +#include "../Common/StreamUtils.h" + +#include "../Compress/BZip2Decoder.h" +#include "../Compress/CopyCoder.h" +#include "../Compress/ZlibDecoder.h" + +#include "Common/OutStreamWithSha1.h" + +#define XAR_SHOW_RAW + +#define Get16(p) GetBe16(p) +#define Get32(p) GetBe32(p) +#define Get64(p) GetBe64(p) + +namespace NArchive { +namespace NXar { + +struct CFile +{ + AString Name; + AString Method; + UInt64 Size; + UInt64 PackSize; + UInt64 Offset; + + // UInt32 mode; + UInt64 CTime; + UInt64 MTime; + UInt64 ATime; + + bool IsDir; + bool HasData; + + bool Sha1IsDefined; + Byte Sha1[20]; + // bool packSha1IsDefined; + // Byte packSha1[20]; + + int Parent; + + CFile(): IsDir(false), HasData(false), Sha1IsDefined(false), + /* packSha1IsDefined(false), */ + Parent(-1), Size(0), PackSize(0), CTime(0), MTime(0), ATime(0) {} +}; + +class CHandler: + public IInArchive, + public CMyUnknownImp +{ + UInt64 _dataStartPos; + CMyComPtr _inStream; + AString _xml; + CObjectVector _files; + + HRESULT Open2(IInStream *stream); + HRESULT Extract(IInStream *stream); +public: + MY_UNKNOWN_IMP1(IInArchive) + INTERFACE_IInArchive(;) +}; + +const UInt32 kXmlSizeMax = ((UInt32)1 << 30) - (1 << 14); + +STATPROPSTG kProps[] = +{ + { NULL, kpidPath, VT_BSTR}, + { NULL, kpidSize, VT_UI8}, + { NULL, kpidPackSize, VT_UI8}, + { NULL, kpidMTime, VT_FILETIME}, + { NULL, kpidCTime, VT_FILETIME}, + { NULL, kpidATime, VT_FILETIME}, + { NULL, kpidMethod, VT_BSTR} +}; + +IMP_IInArchive_Props +IMP_IInArchive_ArcProps_NO + +static bool ParseNumber(const char *s, int size, UInt32 &res) +{ + const char *end; + res = (UInt32)ConvertStringToUInt64(s, &end); + return (end - s == size); +} + +static bool ParseUInt64(const CXmlItem &item, const char *name, UInt64 &res) +{ + AString s = item.GetSubStringForTag(name); + const char *end; + res = ConvertStringToUInt64(s, &end); + return (end - (const char *)s == s.Length()); +} + +static UInt64 ParseTime(const CXmlItem &item, const char *name) +{ + AString s = item.GetSubStringForTag(name); + if (s.Length() < 20) + return 0; + const char *p = s; + if (p[ 4] != '-' || p[ 7] != '-' || p[10] != 'T' || + p[13] != ':' || p[16] != ':' || p[19] != 'Z') + return 0; + UInt32 year, month, day, hour, min, sec; + if (!ParseNumber(p, 4, year )) return 0; + if (!ParseNumber(p + 5, 2, month)) return 0; + if (!ParseNumber(p + 8, 2, day )) return 0; + if (!ParseNumber(p + 11, 2, hour )) return 0; + if (!ParseNumber(p + 14, 2, min )) return 0; + if (!ParseNumber(p + 17, 2, sec )) return 0; + + UInt64 numSecs; + if (!NWindows::NTime::GetSecondsSince1601(year, month, day, hour, min, sec, numSecs)) + return 0; + return numSecs * 10000000; +} + +static bool HexToByte(char c, Byte &res) +{ + if (c >= '0' && c <= '9') res = c - '0'; + else if (c >= 'A' && c <= 'F') res = c - 'A' + 10; + else if (c >= 'a' && c <= 'f') res = c - 'a' + 10; + else return false; + return true; +} + +#define METHOD_NAME_ZLIB "zlib" + +static bool ParseSha1(const CXmlItem &item, const char *name, Byte *digest) +{ + int index = item.FindSubTag(name); + if (index < 0) + return false; + const CXmlItem &checkItem = item.SubItems[index]; + AString style = checkItem.GetPropertyValue("style"); + if (style == "SHA1") + { + AString s = checkItem.GetSubString(); + if (s.Length() != 40) + return false; + for (int i = 0; i < s.Length(); i += 2) + { + Byte b0, b1; + if (!HexToByte(s[i], b0) || !HexToByte(s[i + 1], b1)) + return false; + digest[i / 2] = (b0 << 4) | b1; + } + return true; + } + return false; +} + +static bool AddItem(const CXmlItem &item, CObjectVector &files, int parent) +{ + if (!item.IsTag) + return true; + if (item.Name == "file") + { + CFile file; + file.Parent = parent; + parent = files.Size(); + file.Name = item.GetSubStringForTag("name"); + AString type = item.GetSubStringForTag("type"); + if (type == "directory") + file.IsDir = true; + else if (type == "file") + file.IsDir = false; + else + return false; + + int dataIndex = item.FindSubTag("data"); + if (dataIndex >= 0 && !file.IsDir) + { + file.HasData = true; + const CXmlItem &dataItem = item.SubItems[dataIndex]; + if (!ParseUInt64(dataItem, "size", file.Size)) + return false; + if (!ParseUInt64(dataItem, "length", file.PackSize)) + return false; + if (!ParseUInt64(dataItem, "offset", file.Offset)) + return false; + file.Sha1IsDefined = ParseSha1(dataItem, "extracted-checksum", file.Sha1); + // file.packSha1IsDefined = ParseSha1(dataItem, "archived-checksum", file.packSha1); + int encodingIndex = dataItem.FindSubTag("encoding"); + if (encodingIndex >= 0) + { + const CXmlItem &encodingItem = dataItem.SubItems[encodingIndex]; + if (encodingItem.IsTag) + { + AString s = encodingItem.GetPropertyValue("style"); + if (s.Length() >= 0) + { + AString appl = "application/"; + if (s.Left(appl.Length()) == appl) + { + s = s.Mid(appl.Length()); + AString xx = "x-"; + if (s.Left(xx.Length()) == xx) + { + s = s.Mid(xx.Length()); + if (s == "gzip") + s = METHOD_NAME_ZLIB; + } + } + file.Method = s; + } + } + } + } + + file.CTime = ParseTime(item, "ctime"); + file.MTime = ParseTime(item, "mtime"); + file.ATime = ParseTime(item, "atime"); + files.Add(file); + } + for (int i = 0; i < item.SubItems.Size(); i++) + if (!AddItem(item.SubItems[i], files, parent)) + return false; + return true; +} + +HRESULT CHandler::Open2(IInStream *stream) +{ + UInt64 archiveStartPos; + RINOK(stream->Seek(0, STREAM_SEEK_SET, &archiveStartPos)); + + const UInt32 kHeaderSize = 0x1C; + Byte buf[kHeaderSize]; + RINOK(ReadStream_FALSE(stream, buf, kHeaderSize)); + + UInt32 size = Get16(buf + 4); + // UInt32 ver = Get16(buf + 6); // == 0 + if (Get32(buf) != 0x78617221 || size != kHeaderSize) + return S_FALSE; + + UInt64 packSize = Get64(buf + 8); + UInt64 unpackSize = Get64(buf + 0x10); + // UInt32 checkSumAlogo = Get32(buf + 0x18); + + if (unpackSize >= kXmlSizeMax) + return S_FALSE; + + _dataStartPos = archiveStartPos + kHeaderSize + packSize; + + char *ss = _xml.GetBuffer((int)unpackSize + 1); + + NCompress::NZlib::CDecoder *zlibCoderSpec = new NCompress::NZlib::CDecoder(); + CMyComPtr zlibCoder = zlibCoderSpec; + + CLimitedSequentialInStream *inStreamLimSpec = new CLimitedSequentialInStream; + CMyComPtr inStreamLim(inStreamLimSpec); + inStreamLimSpec->SetStream(stream); + inStreamLimSpec->Init(packSize); + + CBufPtrSeqOutStream *outStreamLimSpec = new CBufPtrSeqOutStream; + CMyComPtr outStreamLim(outStreamLimSpec); + outStreamLimSpec->Init((Byte *)ss, (size_t)unpackSize); + + RINOK(zlibCoder->Code(inStreamLim, outStreamLim, NULL, NULL, NULL)); + + if (outStreamLimSpec->GetPos() != (size_t)unpackSize) + return S_FALSE; + + ss[(size_t)unpackSize] = 0; + _xml.ReleaseBuffer(); + + CXml xml; + if (!xml.Parse(_xml)) + return S_FALSE; + + if (!xml.Root.IsTagged("xar") || xml.Root.SubItems.Size() != 1) + return S_FALSE; + const CXmlItem &toc = xml.Root.SubItems[0]; + if (!toc.IsTagged("toc")) + return S_FALSE; + if (!AddItem(toc, _files, -1)) + return S_FALSE; + return S_OK; +} + +STDMETHODIMP CHandler::Open(IInStream *stream, + const UInt64 * /* maxCheckStartPosition */, + IArchiveOpenCallback * /* openArchiveCallback */) +{ + COM_TRY_BEGIN + { + Close(); + if (Open2(stream) != S_OK) + return S_FALSE; + _inStream = stream; + } + return S_OK; + COM_TRY_END +} + +STDMETHODIMP CHandler::Close() +{ + _inStream.Release(); + _files.Clear(); + _xml.Empty(); + return S_OK; +} + +STDMETHODIMP CHandler::GetNumberOfItems(UInt32 *numItems) +{ + *numItems = _files.Size() + #ifdef XAR_SHOW_RAW + + 1 + #endif + ; + return S_OK; +} + +static void TimeToProp(UInt64 t, NWindows::NCOM::CPropVariant &prop) +{ + if (t != 0) + { + FILETIME ft; + ft.dwLowDateTime = (UInt32)(t); + ft.dwHighDateTime = (UInt32)(t >> 32); + prop = ft; + } +} + +STDMETHODIMP CHandler::GetProperty(UInt32 index, PROPID propID, PROPVARIANT *value) +{ + COM_TRY_BEGIN + NWindows::NCOM::CPropVariant prop; + + #ifdef XAR_SHOW_RAW + if ((int)index == _files.Size()) + { + switch(propID) + { + case kpidPath: prop = L"[TOC].xml"; break; + case kpidSize: + case kpidPackSize: prop = (UInt64)_xml.Length(); break; + } + } + else + #endif + { + const CFile &item = _files[index]; + switch(propID) + { + case kpidMethod: + { + UString name; + if (!item.Method.IsEmpty() && ConvertUTF8ToUnicode(item.Method, name)) + prop = name; + break; + } + case kpidPath: + { + AString path; + int cur = index; + do + { + const CFile &item = _files[cur]; + AString s = item.Name; + if (s.IsEmpty()) + s = "unknown"; + if (path.IsEmpty()) + path = s; + else + path = s + CHAR_PATH_SEPARATOR + path; + cur = item.Parent; + } + while (cur >= 0); + + UString name; + if (ConvertUTF8ToUnicode(path, name)) + prop = name; + break; + } + + case kpidIsDir: prop = item.IsDir; break; + case kpidSize: if (!item.IsDir) prop = item.Size; break; + case kpidPackSize: if (!item.IsDir) prop = item.PackSize; break; + + case kpidMTime: TimeToProp(item.MTime, prop); break; + case kpidCTime: TimeToProp(item.CTime, prop); break; + case kpidATime: TimeToProp(item.ATime, prop); break; + } + } + prop.Detach(value); + return S_OK; + COM_TRY_END +} + +STDMETHODIMP CHandler::Extract(const UInt32 *indices, UInt32 numItems, + Int32 testMode, IArchiveExtractCallback *extractCallback) +{ + COM_TRY_BEGIN + bool allFilesMode = (numItems == (UInt32)-1); + if (allFilesMode) + numItems = _files.Size(); + if (numItems == 0) + return S_OK; + UInt64 totalSize = 0; + UInt32 i; + for (i = 0; i < numItems; i++) + { + int index = (int)(allFilesMode ? i : indices[i]); + #ifdef XAR_SHOW_RAW + if (index == _files.Size()) + totalSize += _xml.Length(); + else + #endif + totalSize += _files[index].Size; + } + extractCallback->SetTotal(totalSize); + + UInt64 currentPackTotal = 0; + UInt64 currentUnpTotal = 0; + UInt64 currentPackSize = 0; + UInt64 currentUnpSize = 0; + + const UInt32 kZeroBufSize = (1 << 14); + CByteBuffer zeroBuf; + zeroBuf.SetCapacity(kZeroBufSize); + memset(zeroBuf, 0, kZeroBufSize); + + NCompress::CCopyCoder *copyCoderSpec = new NCompress::CCopyCoder(); + CMyComPtr copyCoder = copyCoderSpec; + + NCompress::NZlib::CDecoder *zlibCoderSpec = new NCompress::NZlib::CDecoder(); + CMyComPtr zlibCoder = zlibCoderSpec; + + NCompress::NBZip2::CDecoder *bzip2CoderSpec = new NCompress::NBZip2::CDecoder(); + CMyComPtr bzip2Coder = bzip2CoderSpec; + + NCompress::NDeflate::NDecoder::CCOMCoder *deflateCoderSpec = new NCompress::NDeflate::NDecoder::CCOMCoder(); + CMyComPtr deflateCoder = deflateCoderSpec; + + CLocalProgress *lps = new CLocalProgress; + CMyComPtr progress = lps; + lps->Init(extractCallback, false); + + CLimitedSequentialInStream *inStreamSpec = new CLimitedSequentialInStream; + CMyComPtr inStream(inStreamSpec); + inStreamSpec->SetStream(_inStream); + + + CLimitedSequentialOutStream *outStreamLimSpec = new CLimitedSequentialOutStream; + CMyComPtr outStream(outStreamLimSpec); + + COutStreamWithSha1 *outStreamSha1Spec = new COutStreamWithSha1; + { + CMyComPtr outStreamSha1(outStreamSha1Spec); + outStreamLimSpec->SetStream(outStreamSha1); + } + + for (i = 0; i < numItems; i++, currentPackTotal += currentPackSize, currentUnpTotal += currentUnpSize) + { + lps->InSize = currentPackTotal; + lps->OutSize = currentUnpTotal; + currentPackSize = 0; + currentUnpSize = 0; + RINOK(lps->SetCur()); + CMyComPtr realOutStream; + Int32 askMode = testMode ? + NExtract::NAskMode::kTest : + NExtract::NAskMode::kExtract; + Int32 index = allFilesMode ? i : indices[i]; + RINOK(extractCallback->GetStream(index, &realOutStream, askMode)); + + if (index < _files.Size()) + { + const CFile &item = _files[index]; + if (item.IsDir) + { + RINOK(extractCallback->PrepareOperation(askMode)); + RINOK(extractCallback->SetOperationResult(NExtract::NOperationResult::kOK)); + continue; + } + } + + if (!testMode && !realOutStream) + continue; + RINOK(extractCallback->PrepareOperation(askMode)); + + outStreamSha1Spec->SetStream(realOutStream); + realOutStream.Release(); + + Int32 opRes = NExtract::NOperationResult::kOK; + #ifdef XAR_SHOW_RAW + if (index == _files.Size()) + { + outStreamSha1Spec->Init(false); + outStreamLimSpec->Init(_xml.Length()); + RINOK(WriteStream(outStream, (const char *)_xml, _xml.Length())); + currentPackSize = currentUnpSize = _xml.Length(); + } + else + #endif + { + const CFile &item = _files[index]; + if (item.HasData) + { + currentPackSize = item.PackSize; + currentUnpSize = item.Size; + + RINOK(_inStream->Seek(_dataStartPos + item.Offset, STREAM_SEEK_SET, NULL)); + inStreamSpec->Init(item.PackSize); + outStreamSha1Spec->Init(item.Sha1IsDefined); + outStreamLimSpec->Init(item.Size); + HRESULT res = S_OK; + + ICompressCoder *coder = NULL; + if (item.Method.IsEmpty() || item.Method == "octet-stream") + if (item.PackSize == item.Size) + coder = copyCoder; + else + opRes = NExtract::NOperationResult::kUnSupportedMethod; + else if (item.Method == METHOD_NAME_ZLIB) + coder = zlibCoder; + else if (item.Method == "bzip2") + coder = bzip2Coder; + else + opRes = NExtract::NOperationResult::kUnSupportedMethod; + + if (coder) + res = coder->Code(inStream, outStream, NULL, NULL, progress); + + if (res != S_OK) + { + if (!outStreamLimSpec->IsFinishedOK()) + opRes = NExtract::NOperationResult::kDataError; + else if (res != S_FALSE) + return res; + if (opRes == NExtract::NOperationResult::kOK) + opRes = NExtract::NOperationResult::kDataError; + } + + if (opRes == NExtract::NOperationResult::kOK) + { + if (outStreamLimSpec->IsFinishedOK() && + outStreamSha1Spec->GetSize() == item.Size) + { + if (!outStreamLimSpec->IsFinishedOK()) + { + opRes = NExtract::NOperationResult::kDataError; + } + else if (item.Sha1IsDefined) + { + Byte digest[NCrypto::NSha1::kDigestSize]; + outStreamSha1Spec->Final(digest); + if (memcmp(digest, item.Sha1, NCrypto::NSha1::kDigestSize) != 0) + opRes = NExtract::NOperationResult::kCRCError; + } + } + else + opRes = NExtract::NOperationResult::kDataError; + } + } + } + outStreamSha1Spec->ReleaseStream(); + RINOK(extractCallback->SetOperationResult(opRes)); + } + return S_OK; + COM_TRY_END +} + +static IInArchive *CreateArc() { return new NArchive::NXar::CHandler; } + +static CArcInfo g_ArcInfo = + { L"Xar", L"xar", 0, 0xE1, { 'x', 'a', 'r', '!', 0, 0x1C }, 6, false, CreateArc, 0 }; + +REGISTER_ARC(Xar) + +}} diff --git a/CPP/7zip/Archive/XzHandler.cpp b/CPP/7zip/Archive/XzHandler.cpp new file mode 100644 index 0000000..64b7a58 --- /dev/null +++ b/CPP/7zip/Archive/XzHandler.cpp @@ -0,0 +1,707 @@ +// XzHandler.cpp + +#include "StdAfx.h" + +#include "../../../C/Alloc.h" +#include "../../../C/XzCrc64.h" +#include "../../../C/XzEnc.h" + +#include "../../Common/ComTry.h" +#include "../../Common/IntToString.h" + +#include "../ICoder.h" + +#include "../Common/CWrappers.h" +#include "../Common/ProgressUtils.h" +#include "../Common/RegisterArc.h" +#include "../Common/StreamUtils.h" + +#include "../Compress/CopyCoder.h" + +#include "IArchive.h" + +#include "Common/HandlerOut.h" + +using namespace NWindows; + +namespace NCompress { +namespace NLzma2 { + +HRESULT SetLzma2Prop(PROPID propID, const PROPVARIANT &prop, CLzma2EncProps &lzma2Props); + +}} + +static void *SzAlloc(void *, size_t size) { return MyAlloc(size); } +static void SzFree(void *, void *address) { MyFree(address); } +static ISzAlloc g_Alloc = { SzAlloc, SzFree }; + +namespace NArchive { +namespace NXz { + +struct CCrc64Gen { CCrc64Gen() { Crc64GenerateTable(); } } g_Crc64TableInit; + +class CHandler: + public IInArchive, + public IArchiveOpenSeq, + #ifndef EXTRACT_ONLY + public IOutArchive, + public ISetProperties, + public COutHandler, + #endif + public CMyUnknownImp +{ + Int64 _startPosition; + UInt64 _packSize; + UInt64 _unpackSize; + UInt64 _numBlocks; + AString _methodsString; + bool _useSeq; + UInt64 _unpackSizeDefined; + UInt64 _packSizeDefined; + + CMyComPtr _stream; + CMyComPtr _seqStream; + + UInt32 _crcSize; + + void Init() + { + _crcSize = 4; + COutHandler::Init(); + } + + HRESULT Open2(IInStream *inStream, IArchiveOpenCallback *callback); + +public: + MY_QUERYINTERFACE_BEGIN2(IInArchive) + MY_QUERYINTERFACE_ENTRY(IArchiveOpenSeq) + #ifndef EXTRACT_ONLY + MY_QUERYINTERFACE_ENTRY(IOutArchive) + MY_QUERYINTERFACE_ENTRY(ISetProperties) + #endif + MY_QUERYINTERFACE_END + MY_ADDREF_RELEASE + + INTERFACE_IInArchive(;) + STDMETHOD(OpenSeq)(ISequentialInStream *stream); + + #ifndef EXTRACT_ONLY + INTERFACE_IOutArchive(;) + STDMETHOD(SetProperties)(const wchar_t **names, const PROPVARIANT *values, Int32 numProps); + #endif + + CHandler(); +}; + +CHandler::CHandler() +{ + Init(); +} + +STATPROPSTG kProps[] = +{ + { NULL, kpidSize, VT_UI8}, + { NULL, kpidPackSize, VT_UI8}, + { NULL, kpidMethod, VT_BSTR} +}; + +STATPROPSTG kArcProps[] = +{ + { NULL, kpidMethod, VT_BSTR}, + { NULL, kpidNumBlocks, VT_UI4} +}; + +IMP_IInArchive_Props +IMP_IInArchive_ArcProps + +static char GetHex(Byte value) +{ + return (char)((value < 10) ? ('0' + value) : ('A' + (value - 10))); +} + +static inline void AddHexToString(AString &res, Byte value) +{ + res += GetHex((Byte)(value >> 4)); + res += GetHex((Byte)(value & 0xF)); +} + +static AString ConvertUInt32ToString(UInt32 value) +{ + char temp[32]; + ::ConvertUInt32ToString(value, temp); + return temp; +} + +static AString Lzma2PropToString(int prop) +{ + if ((prop & 1) == 0) + return ConvertUInt32ToString(prop / 2 + 12); + AString res; + char c; + + UInt32 size = (2 | ((prop) & 1)) << ((prop) / 2 + 1); + + if (prop > 17) + { + res = ConvertUInt32ToString(size >> 10); + c = 'm'; + } + else + { + res = ConvertUInt32ToString(size); + c = 'k'; + } + return res + c; +} + +struct CMethodNamePair +{ + UInt32 Id; + const char *Name; +}; + +static CMethodNamePair g_NamePairs[] = +{ + { XZ_ID_Subblock, "SB" }, + { XZ_ID_Delta, "Delta" }, + { XZ_ID_X86, "x86" }, + { XZ_ID_PPC, "PPC" }, + { XZ_ID_IA64, "IA64" }, + { XZ_ID_ARM, "ARM" }, + { XZ_ID_ARMT, "ARMT" }, + { XZ_ID_SPARC, "SPARC" }, + { XZ_ID_LZMA2, "LZMA2" } +}; + +static AString GetMethodString(const CXzFilter &f) +{ + AString s; + + for (int i = 0; i < sizeof(g_NamePairs) / sizeof(g_NamePairs[i]); i++) + if (g_NamePairs[i].Id == f.id) + s = g_NamePairs[i].Name; + if (s.IsEmpty()) + { + char temp[32]; + ::ConvertUInt64ToString(f.id, temp); + s = temp; + } + + if (f.propsSize > 0) + { + s += ':'; + if (f.id == XZ_ID_LZMA2 && f.propsSize == 1) + s += Lzma2PropToString(f.props[0]); + else if (f.id == XZ_ID_Delta && f.propsSize == 1) + s += ConvertUInt32ToString((UInt32)f.props[0] + 1); + else + { + s += '['; + for (UInt32 bi = 0; bi < f.propsSize; bi++) + AddHexToString(s, f.props[bi]); + s += ']'; + } + } + return s; +} + +static void AddString(AString &dest, const AString &src) +{ + if (!dest.IsEmpty()) + dest += ' '; + dest += src; +} + +static const char *kChecks[] = +{ + "NoCheck", + "CRC32", + NULL, + NULL, + "CRC64", + NULL, + NULL, + NULL, + NULL, + NULL, + "SHA256", + NULL, + NULL, + NULL, + NULL, + NULL +}; + +static AString GetCheckString(const CXzs &xzs) +{ + size_t i; + UInt32 mask = 0; + for (i = 0; i < xzs.num; i++) + mask |= ((UInt32)1 << XzFlags_GetCheckType(xzs.streams[i].flags)); + AString s; + for (i = 0; i <= XZ_CHECK_MASK; i++) + if (((mask >> i) & 1) != 0) + { + AString s2; + if (kChecks[i]) + s2 = kChecks[i]; + else + s2 = "Check-" + ConvertUInt32ToString((UInt32)i); + AddString(s, s2); + } + return s; +} + +STDMETHODIMP CHandler::GetArchiveProperty(PROPID propID, PROPVARIANT *value) +{ + COM_TRY_BEGIN + NWindows::NCOM::CPropVariant prop; + switch(propID) + { + case kpidNumBlocks: if (!_useSeq) prop = _numBlocks; break; + case kpidPhySize: if (_packSizeDefined) prop = _packSize; break; + case kpidMethod: if (!_methodsString.IsEmpty()) prop = _methodsString; break; + } + prop.Detach(value); + return S_OK; + COM_TRY_END +} + +STDMETHODIMP CHandler::GetNumberOfItems(UInt32 *numItems) +{ + *numItems = 1; + return S_OK; +} + +STDMETHODIMP CHandler::GetProperty(UInt32, PROPID propID, PROPVARIANT *value) +{ + COM_TRY_BEGIN + NWindows::NCOM::CPropVariant prop; + switch(propID) + { + case kpidSize: if (_unpackSizeDefined) prop = _unpackSize; break; + case kpidPackSize: if (_packSizeDefined) prop = _packSize; break; + case kpidMethod: if (!_methodsString.IsEmpty()) prop = _methodsString; break; + } + prop.Detach(value); + return S_OK; + COM_TRY_END +} + + +struct COpenCallbackWrap +{ + ICompressProgress p; + IArchiveOpenCallback *OpenCallback; + HRESULT Res; + COpenCallbackWrap(IArchiveOpenCallback *progress); +}; + +static SRes OpenCallbackProgress(void *pp, UInt64 inSize, UInt64 /* outSize */) +{ + COpenCallbackWrap *p = (COpenCallbackWrap *)pp; + p->Res = p->OpenCallback->SetCompleted(NULL, &inSize); + return (SRes)p->Res; +} + +COpenCallbackWrap::COpenCallbackWrap(IArchiveOpenCallback *callback) +{ + p.Progress = OpenCallbackProgress; + OpenCallback = callback; + Res = SZ_OK; +} + +struct CXzsCPP +{ + CXzs p; + CXzsCPP() { Xzs_Construct(&p); } + ~CXzsCPP() { Xzs_Free(&p, &g_Alloc); } +}; + +HRESULT CHandler::Open2(IInStream *inStream, IArchiveOpenCallback *callback) +{ + CSeekInStreamWrap inStreamImp(inStream); + + CLookToRead lookStream; + LookToRead_CreateVTable(&lookStream, True); + lookStream.realStream = &inStreamImp.p; + LookToRead_Init(&lookStream); + + COpenCallbackWrap openWrap(callback); + RINOK(inStream->Seek(0, STREAM_SEEK_END, &_packSize)); + RINOK(callback->SetTotal(NULL, &_packSize)); + + CXzsCPP xzs; + SRes res = Xzs_ReadBackward(&xzs.p, &lookStream.s, &_startPosition, &openWrap.p, &g_Alloc); + if (res == SZ_ERROR_NO_ARCHIVE && xzs.p.num > 0) + res = SZ_OK; + if (res == SZ_OK) + { + _packSize -= _startPosition; + _unpackSize = Xzs_GetUnpackSize(&xzs.p); + _unpackSizeDefined = _packSizeDefined = true; + _numBlocks = (UInt64)Xzs_GetNumBlocks(&xzs.p); + + RINOK(inStream->Seek(0, STREAM_SEEK_SET, NULL)); + CXzStreamFlags st; + CSeqInStreamWrap inStreamWrap(inStream); + SRes res2 = Xz_ReadHeader(&st, &inStreamWrap.p); + + if (res2 == SZ_OK) + { + CXzBlock block; + Bool isIndex; + UInt32 headerSizeRes; + res2 = XzBlock_ReadHeader(&block, &inStreamWrap.p, &isIndex, &headerSizeRes); + if (res2 == SZ_OK && !isIndex) + { + int numFilters = XzBlock_GetNumFilters(&block); + for (int i = 0; i < numFilters; i++) + AddString(_methodsString, GetMethodString(block.filters[i])); + } + } + AddString(_methodsString, GetCheckString(xzs.p)); + } + + if (res != SZ_OK || _startPosition != 0) + { + RINOK(inStream->Seek(0, STREAM_SEEK_SET, NULL)); + CXzStreamFlags st; + CSeqInStreamWrap inStreamWrap(inStream); + SRes res2 = Xz_ReadHeader(&st, &inStreamWrap.p); + if (res2 == SZ_OK) + { + res = res2; + _startPosition = 0; + _useSeq = True; + _unpackSizeDefined = _packSizeDefined = false; + } + } + if (res == SZ_ERROR_NO_ARCHIVE) + return S_FALSE; + RINOK(SResToHRESULT(res)); + _stream = inStream; + _seqStream = inStream; + return S_OK; +} + +STDMETHODIMP CHandler::Open(IInStream *inStream, const UInt64 *, IArchiveOpenCallback *callback) +{ + COM_TRY_BEGIN + try + { + Close(); + return Open2(inStream, callback); + } + catch(...) { return S_FALSE; } + COM_TRY_END +} + +STDMETHODIMP CHandler::OpenSeq(ISequentialInStream *stream) +{ + Close(); + _seqStream = stream; + return S_OK; +} + +STDMETHODIMP CHandler::Close() +{ + _numBlocks = 0; + _useSeq = true; + _unpackSizeDefined = _packSizeDefined = false; + _methodsString.Empty(); + _stream.Release(); + _seqStream.Release(); + return S_OK; +} + +class CSeekToSeqStream: + public IInStream, + public CMyUnknownImp +{ +public: + CMyComPtr Stream; + MY_UNKNOWN_IMP1(IInStream) + + STDMETHOD(Read)(void *data, UInt32 size, UInt32 *processedSize); + STDMETHOD(Seek)(Int64 offset, UInt32 seekOrigin, UInt64 *newPosition); +}; + +STDMETHODIMP CSeekToSeqStream::Read(void *data, UInt32 size, UInt32 *processedSize) +{ + return Stream->Read(data, size, processedSize); +} + +STDMETHODIMP CSeekToSeqStream::Seek(Int64, UInt32, UInt64 *) { return E_NOTIMPL; } + +struct CXzUnpackerCPP +{ + Byte *InBuf; + Byte *OutBuf; + CXzUnpacker p; + CXzUnpackerCPP(): InBuf(0), OutBuf(0) {} + ~CXzUnpackerCPP() + { + XzUnpacker_Free(&p); + MyFree(InBuf); + MyFree(OutBuf); + } +}; + +STDMETHODIMP CHandler::Extract(const UInt32 *indices, UInt32 numItems, + Int32 testMode, IArchiveExtractCallback *extractCallback) +{ + COM_TRY_BEGIN + if (numItems == 0) + return S_OK; + if (numItems != (UInt32)-1 && (numItems != 1 || indices[0] != 0)) + return E_INVALIDARG; + + extractCallback->SetTotal(_packSize); + UInt64 currentTotalPacked = 0; + RINOK(extractCallback->SetCompleted(¤tTotalPacked)); + CMyComPtr realOutStream; + Int32 askMode = testMode ? + NExtract::NAskMode::kTest : + NExtract::NAskMode::kExtract; + + RINOK(extractCallback->GetStream(0, &realOutStream, askMode)); + + if (!testMode && !realOutStream) + return S_OK; + + extractCallback->PrepareOperation(askMode); + + if (_stream) + { + RINOK(_stream->Seek(_startPosition, STREAM_SEEK_SET, NULL)); + } + + CLocalProgress *lps = new CLocalProgress; + CMyComPtr progress = lps; + lps->Init(extractCallback, true); + + CCompressProgressWrap progressWrap(progress); + + SRes res; + + const UInt32 kInBufSize = 1 << 15; + const UInt32 kOutBufSize = 1 << 21; + + UInt32 inPos = 0; + UInt32 inSize = 0; + UInt32 outPos = 0; + CXzUnpackerCPP xzu; + res = XzUnpacker_Create(&xzu.p, &g_Alloc); + if (res == SZ_OK) + { + xzu.InBuf = (Byte *)MyAlloc(kInBufSize); + xzu.OutBuf = (Byte *)MyAlloc(kOutBufSize); + if (xzu.InBuf == 0 || xzu.OutBuf == 0) + res = SZ_ERROR_MEM; + } + if (res == SZ_OK) + for (;;) + { + if (inPos == inSize) + { + inPos = inSize = 0; + RINOK(_seqStream->Read(xzu.InBuf, kInBufSize, &inSize)); + } + + SizeT inLen = inSize - inPos; + SizeT outLen = kOutBufSize - outPos; + ECoderStatus status; + res = XzUnpacker_Code(&xzu.p, + xzu.OutBuf + outPos, &outLen, + xzu.InBuf + inPos, &inLen, + (inSize == 0 ? CODER_FINISH_END : CODER_FINISH_ANY), &status); + + // printf("\n_inPos = %6d inLen = %5d, outLen = %5d", inPos, inLen, outLen); + + inPos += (UInt32)inLen; + outPos += (UInt32)outLen; + lps->InSize += inLen; + lps->OutSize += outLen; + + bool finished = (((inLen == 0) && (outLen == 0)) || res != SZ_OK); + + if (outPos == kOutBufSize || finished) + { + if (realOutStream && outPos > 0) + { + RINOK(WriteStream(realOutStream, xzu.OutBuf, outPos)); + } + outPos = 0; + } + if (finished) + { + _packSize = lps->InSize; + _unpackSize = lps->OutSize; + _packSizeDefined = _unpackSizeDefined = true; + if (res == SZ_OK) + { + if (status == CODER_STATUS_NEEDS_MORE_INPUT) + { + if (XzUnpacker_IsStreamWasFinished(&xzu.p)) + _packSize -= xzu.p.padSize; + else + res = SZ_ERROR_DATA; + } + else + res = SZ_ERROR_DATA; + } + break; + } + RINOK(lps->SetCur()); + } + + Int32 opRes; + switch(res) + { + case SZ_OK: + opRes = NExtract::NOperationResult::kOK; break; + case SZ_ERROR_UNSUPPORTED: + opRes = NExtract::NOperationResult::kUnSupportedMethod; break; + case SZ_ERROR_CRC: + opRes = NExtract::NOperationResult::kCRCError; break; + case SZ_ERROR_DATA: + case SZ_ERROR_ARCHIVE: + case SZ_ERROR_NO_ARCHIVE: + opRes = NExtract::NOperationResult::kDataError; break; + default: + return SResToHRESULT(res); + } + realOutStream.Release(); + RINOK(extractCallback->SetOperationResult(opRes)); + return S_OK; + COM_TRY_END +} + +#ifndef EXTRACT_ONLY + +STDMETHODIMP CHandler::GetFileTimeType(UInt32 *timeType) +{ + *timeType = NFileTimeType::kUnix; + return S_OK; +} + +STDMETHODIMP CHandler::UpdateItems(ISequentialOutStream *outStream, UInt32 numItems, + IArchiveUpdateCallback *updateCallback) +{ + CSeqOutStreamWrap seqOutStream(outStream); + + if (numItems == 0) + { + SRes res = Xz_EncodeEmpty(&seqOutStream.p); + return SResToHRESULT(res); + } + + if (numItems != 1) + return E_INVALIDARG; + + Int32 newData, newProps; + UInt32 indexInArchive; + if (!updateCallback) + return E_FAIL; + RINOK(updateCallback->GetUpdateItemInfo(0, &newData, &newProps, &indexInArchive)); + + if (IntToBool(newProps)) + { + { + NCOM::CPropVariant prop; + RINOK(updateCallback->GetProperty(0, kpidIsDir, &prop)); + if (prop.vt != VT_EMPTY) + if (prop.vt != VT_BOOL || prop.boolVal != VARIANT_FALSE) + return E_INVALIDARG; + } + } + + if (IntToBool(newData)) + { + { + UInt64 size; + NCOM::CPropVariant prop; + RINOK(updateCallback->GetProperty(0, kpidSize, &prop)); + if (prop.vt != VT_UI8) + return E_INVALIDARG; + size = prop.uhVal.QuadPart; + RINOK(updateCallback->SetTotal(size)); + } + + CLzma2EncProps lzma2Props; + Lzma2EncProps_Init(&lzma2Props); + + lzma2Props.lzmaProps.level = _level; + + CMyComPtr fileInStream; + RINOK(updateCallback->GetStream(0, &fileInStream)); + + CSeqInStreamWrap seqInStream(fileInStream); + + for (int i = 0; i < _methods.Size(); i++) + { + COneMethodInfo &m = _methods[i]; + SetCompressionMethod2(m + #ifndef _7ZIP_ST + , _numThreads + #endif + ); + if (m.IsLzma()) + { + for (int j = 0; j < m.Props.Size(); j++) + { + const CProp &prop = m.Props[j]; + RINOK(NCompress::NLzma2::SetLzma2Prop(prop.Id, prop.Value, lzma2Props)); + } + } + } + + #ifndef _7ZIP_ST + lzma2Props.numTotalThreads = _numThreads; + #endif + + CLocalProgress *lps = new CLocalProgress; + CMyComPtr progress = lps; + lps->Init(updateCallback, true); + + CCompressProgressWrap progressWrap(progress); + SRes res = Xz_Encode(&seqOutStream.p, &seqInStream.p, &lzma2Props, False, &progressWrap.p); + if (res == SZ_OK) + return updateCallback->SetOperationResult(NArchive::NUpdate::NOperationResult::kOK); + return SResToHRESULT(res); + } + if (indexInArchive != 0) + return E_INVALIDARG; + if (_stream) + RINOK(_stream->Seek(_startPosition, STREAM_SEEK_SET, NULL)); + return NCompress::CopyStream(_stream, outStream, 0); +} + +STDMETHODIMP CHandler::SetProperties(const wchar_t **names, const PROPVARIANT *values, Int32 numProps) +{ + COM_TRY_BEGIN + BeforeSetProperty(); + for (int i = 0; i < numProps; i++) + { + RINOK(SetProperty(names[i], values[i])); + } + return S_OK; + COM_TRY_END +} + +#endif + +static IInArchive *CreateArc() { return new NArchive::NXz::CHandler; } +#ifndef EXTRACT_ONLY +static IOutArchive *CreateArcOut() { return new NArchive::NXz::CHandler; } +#else +#define CreateArcOut 0 +#endif + +static CArcInfo g_ArcInfo = + { L"xz", L"xz txz", L"* .tar", 0xC, {0xFD, '7' , 'z', 'X', 'Z', '\0'}, 6, true, CreateArc, CreateArcOut }; + +REGISTER_ARC(xz) + +}} diff --git a/CPP/7zip/Archive/ZHandler.cpp b/CPP/7zip/Archive/ZHandler.cpp new file mode 100644 index 0000000..49b76a1 --- /dev/null +++ b/CPP/7zip/Archive/ZHandler.cpp @@ -0,0 +1,161 @@ +// ZHandler.cpp + +#include "StdAfx.h" + +#include "Common/ComTry.h" + +#include "Windows/PropVariant.h" + +#include "../Common/ProgressUtils.h" +#include "../Common/RegisterArc.h" +#include "../Common/StreamUtils.h" + +#include "../Compress/ZDecoder.h" + +#include "Common/DummyOutStream.h" + +namespace NArchive { +namespace NZ { + +class CHandler: + public IInArchive, + public CMyUnknownImp +{ + CMyComPtr _stream; + UInt64 _streamStartPosition; + UInt64 _packSize; + Byte _properties; +public: + MY_UNKNOWN_IMP1(IInArchive) + INTERFACE_IInArchive(;) +}; + +STATPROPSTG kProps[] = +{ + { NULL, kpidPackSize, VT_UI8} +}; + +IMP_IInArchive_Props +IMP_IInArchive_ArcProps_NO + +STDMETHODIMP CHandler::GetNumberOfItems(UInt32 *numItems) +{ + *numItems = 1; + return S_OK; +} + +STDMETHODIMP CHandler::GetProperty(UInt32 /* index */, PROPID propID, PROPVARIANT *value) +{ + NWindows::NCOM::CPropVariant prop; + switch(propID) + { + case kpidPackSize: prop = _packSize; break; + } + prop.Detach(value); + return S_OK; +} + +static const int kSignatureSize = 3; + +STDMETHODIMP CHandler::Open(IInStream *stream, + const UInt64 * /* maxCheckStartPosition */, + IArchiveOpenCallback * /* openArchiveCallback */) +{ + COM_TRY_BEGIN + { + RINOK(stream->Seek(0, STREAM_SEEK_CUR, &_streamStartPosition)); + Byte buffer[kSignatureSize]; + RINOK(ReadStream_FALSE(stream, buffer, kSignatureSize)); + if (buffer[0] != 0x1F || buffer[1] != 0x9D) + return S_FALSE; + _properties = buffer[2]; + + UInt64 endPosition; + RINOK(stream->Seek(0, STREAM_SEEK_END, &endPosition)); + _packSize = endPosition - _streamStartPosition - kSignatureSize; + + _stream = stream; + } + return S_OK; + COM_TRY_END +} + +STDMETHODIMP CHandler::Close() +{ + _stream.Release(); + return S_OK; +} + + +STDMETHODIMP CHandler::Extract(const UInt32 *indices, UInt32 numItems, + Int32 testMode, IArchiveExtractCallback *extractCallback) +{ + COM_TRY_BEGIN + if (numItems == 0) + return S_OK; + if (numItems != (UInt32)-1 && (numItems != 1 || indices[0] != 0)) + return E_INVALIDARG; + + extractCallback->SetTotal(_packSize); + + UInt64 currentTotalPacked = 0; + + RINOK(extractCallback->SetCompleted(¤tTotalPacked)); + + CMyComPtr realOutStream; + Int32 askMode = testMode ? + NExtract::NAskMode::kTest : + NExtract::NAskMode::kExtract; + + RINOK(extractCallback->GetStream(0, &realOutStream, askMode)); + + if (!testMode && !realOutStream) + return S_OK; + + extractCallback->PrepareOperation(askMode); + + CDummyOutStream *outStreamSpec = new CDummyOutStream; + CMyComPtr outStream(outStreamSpec); + outStreamSpec->SetStream(realOutStream); + outStreamSpec->Init(); + realOutStream.Release(); + + CLocalProgress *lps = new CLocalProgress; + CMyComPtr progress = lps; + lps->Init(extractCallback, true); + + RINOK(_stream->Seek(_streamStartPosition + kSignatureSize, STREAM_SEEK_SET, NULL)); + + CMyComPtr decoder; + NCompress::NZ::CDecoder *decoderSpec = new NCompress::NZ::CDecoder; + decoder = decoderSpec; + + HRESULT result = decoderSpec->SetDecoderProperties2(&_properties, 1); + + int opResult; + if (result != S_OK) + opResult = NExtract::NOperationResult::kUnSupportedMethod; + else + { + result = decoder->Code(_stream, outStream, NULL, NULL, progress); + if (result == S_FALSE) + opResult = NExtract::NOperationResult::kDataError; + else + { + RINOK(result); + opResult = NExtract::NOperationResult::kOK; + } + } + outStream.Release(); + return extractCallback->SetOperationResult(opResult); + COM_TRY_END +} + +static IInArchive *CreateArc() { return new CHandler; } + +static CArcInfo g_ArcInfo = + { L"Z", L"z taz", L"* .tar", 5, { 0x1F, 0x9D }, 2, false, CreateArc, 0 }; + +REGISTER_ARC(Z) + +}} diff --git a/CPP/7zip/Archive/Zip/ZipAddCommon.cpp b/CPP/7zip/Archive/Zip/ZipAddCommon.cpp new file mode 100644 index 0000000..4c5fd38 --- /dev/null +++ b/CPP/7zip/Archive/Zip/ZipAddCommon.cpp @@ -0,0 +1,379 @@ +// ZipAddCommon.cpp + +#include "StdAfx.h" + +#include "../../../../C/7zCrc.h" + +#include "Windows/PropVariant.h" + +#include "../../ICoder.h" +#include "../../IPassword.h" +#include "../../MyVersion.h" + +#include "../../Common/CreateCoder.h" +#include "../../Common/StreamObjects.h" +#include "../../Common/StreamUtils.h" + +#include "../../Compress/LzmaEncoder.h" +#include "../../Compress/PpmdZip.h" + +#include "../Common/InStreamWithCRC.h" + +#include "ZipAddCommon.h" +#include "ZipHeader.h" + +namespace NArchive { +namespace NZip { + +static const CMethodId kMethodId_ZipBase = 0x040100; +static const CMethodId kMethodId_BZip2 = 0x040202; + +static const UInt32 kLzmaPropsSize = 5; +static const UInt32 kLzmaHeaderSize = 4 + kLzmaPropsSize; + +class CLzmaEncoder: + public ICompressCoder, + public CMyUnknownImp +{ + NCompress::NLzma::CEncoder *EncoderSpec; + CMyComPtr Encoder; + Byte Header[kLzmaHeaderSize]; +public: + STDMETHOD(Code)(ISequentialInStream *inStream, ISequentialOutStream *outStream, + const UInt64 *inSize, const UInt64 *outSize, ICompressProgressInfo *progress); + HRESULT SetCoderProperties(const PROPID *propIDs, const PROPVARIANT *props, UInt32 numProps); + + MY_UNKNOWN_IMP +}; + +HRESULT CLzmaEncoder::SetCoderProperties(const PROPID *propIDs, const PROPVARIANT *props, UInt32 numProps) +{ + if (!Encoder) + { + EncoderSpec = new NCompress::NLzma::CEncoder; + Encoder = EncoderSpec; + } + CBufPtrSeqOutStream *outStreamSpec = new CBufPtrSeqOutStream; + CMyComPtr outStream(outStreamSpec); + outStreamSpec->Init(Header + 4, kLzmaPropsSize); + RINOK(EncoderSpec->SetCoderProperties(propIDs, props, numProps)); + RINOK(EncoderSpec->WriteCoderProperties(outStream)); + if (outStreamSpec->GetPos() != kLzmaPropsSize) + return E_FAIL; + Header[0] = MY_VER_MAJOR; + Header[1] = MY_VER_MINOR; + Header[2] = kLzmaPropsSize; + Header[3] = 0; + return S_OK; +} + +HRESULT CLzmaEncoder::Code(ISequentialInStream *inStream, ISequentialOutStream *outStream, + const UInt64 *inSize, const UInt64 *outSize, ICompressProgressInfo *progress) +{ + RINOK(WriteStream(outStream, Header, kLzmaHeaderSize)); + return Encoder->Code(inStream, outStream, inSize, outSize, progress); +} + + +CAddCommon::CAddCommon(const CCompressionMethodMode &options): + _options(options), + _copyCoderSpec(NULL), + _cryptoStreamSpec(0) + {} + +static HRESULT GetStreamCRC(ISequentialInStream *inStream, UInt32 &resultCRC) +{ + UInt32 crc = CRC_INIT_VAL; + const UInt32 kBufferSize = (1 << 14); + Byte buffer[kBufferSize]; + for (;;) + { + UInt32 realProcessedSize; + RINOK(inStream->Read(buffer, kBufferSize, &realProcessedSize)); + if (realProcessedSize == 0) + { + resultCRC = CRC_GET_DIGEST(crc); + return S_OK; + } + crc = CrcUpdate(crc, buffer, (size_t)realProcessedSize); + } +} + +HRESULT CAddCommon::Compress( + DECL_EXTERNAL_CODECS_LOC_VARS + ISequentialInStream *inStream, IOutStream *outStream, + ICompressProgressInfo *progress, CCompressingResult &opRes) +{ + CSequentialInStreamWithCRC *inSecCrcStreamSpec = 0; + CInStreamWithCRC *inCrcStreamSpec = 0; + CMyComPtr inCrcStream; + { + CMyComPtr inStream2; + // we don't support stdin, since stream from stdin can require 64-bit size header + RINOK(inStream->QueryInterface(IID_IInStream, (void **)&inStream2)); + if (inStream2) + { + inCrcStreamSpec = new CInStreamWithCRC; + inCrcStream = inCrcStreamSpec; + inCrcStreamSpec->SetStream(inStream2); + inCrcStreamSpec->Init(); + } + else + { + inSecCrcStreamSpec = new CSequentialInStreamWithCRC; + inCrcStream = inSecCrcStreamSpec; + inSecCrcStreamSpec->SetStream(inStream); + inSecCrcStreamSpec->Init(); + } + } + + int numTestMethods = _options.MethodSequence.Size(); + if (numTestMethods > 1 || _options.PasswordIsDefined) + { + if (inCrcStreamSpec == 0) + { + if (_options.PasswordIsDefined) + return E_NOTIMPL; + numTestMethods = 1; + } + } + Byte method = 0; + COutStreamReleaser outStreamReleaser; + opRes.ExtractVersion = NFileHeader::NCompressionMethod::kExtractVersion_Default; + for (int i = 0; i < numTestMethods; i++) + { + opRes.ExtractVersion = NFileHeader::NCompressionMethod::kExtractVersion_Default; + if (inCrcStreamSpec != 0) + RINOK(inCrcStreamSpec->Seek(0, STREAM_SEEK_SET, NULL)); + RINOK(outStream->SetSize(0)); + RINOK(outStream->Seek(0, STREAM_SEEK_SET, NULL)); + if (_options.PasswordIsDefined) + { + opRes.ExtractVersion = NFileHeader::NCompressionMethod::kExtractVersion_ZipCrypto; + + if (!_cryptoStream) + { + _cryptoStreamSpec = new CFilterCoder; + _cryptoStream = _cryptoStreamSpec; + } + if (_options.IsAesMode) + { + opRes.ExtractVersion = NFileHeader::NCompressionMethod::kExtractVersion_Aes; + if (!_cryptoStreamSpec->Filter) + { + _cryptoStreamSpec->Filter = _filterAesSpec = new NCrypto::NWzAes::CEncoder; + _filterAesSpec->SetKeyMode(_options.AesKeyMode); + RINOK(_filterAesSpec->CryptoSetPassword((const Byte *)(const char *)_options.Password, _options.Password.Length())); + } + RINOK(_filterAesSpec->WriteHeader(outStream)); + } + else + { + if (!_cryptoStreamSpec->Filter) + { + _cryptoStreamSpec->Filter = _filterSpec = new NCrypto::NZip::CEncoder; + _filterSpec->CryptoSetPassword((const Byte *)(const char *)_options.Password, _options.Password.Length()); + } + UInt32 crc = 0; + RINOK(GetStreamCRC(inStream, crc)); + RINOK(inCrcStreamSpec->Seek(0, STREAM_SEEK_SET, NULL)); + RINOK(_filterSpec->WriteHeader(outStream, crc)); + } + RINOK(_cryptoStreamSpec->SetOutStream(outStream)); + outStreamReleaser.FilterCoder = _cryptoStreamSpec; + } + + method = _options.MethodSequence[i]; + switch(method) + { + case NFileHeader::NCompressionMethod::kStored: + { + if (_copyCoderSpec == NULL) + { + _copyCoderSpec = new NCompress::CCopyCoder; + _copyCoder = _copyCoderSpec; + } + CMyComPtr outStreamNew; + if (_options.PasswordIsDefined) + outStreamNew = _cryptoStream; + else + outStreamNew = outStream; + RINOK(_copyCoder->Code(inCrcStream, outStreamNew, NULL, NULL, progress)); + break; + } + default: + { + if (!_compressEncoder) + { + if (method == NFileHeader::NCompressionMethod::kLZMA) + { + _compressExtractVersion = NFileHeader::NCompressionMethod::kExtractVersion_LZMA; + CLzmaEncoder *_lzmaEncoder = new CLzmaEncoder(); + _compressEncoder = _lzmaEncoder; + NWindows::NCOM::CPropVariant props[] = + { + #ifndef _7ZIP_ST + _options.NumThreads, + #endif + _options.Algo, + _options.DicSize, + _options.NumFastBytes, + const_cast((const wchar_t *)_options.MatchFinder), + _options.NumMatchFinderCycles + }; + PROPID propIDs[] = + { + #ifndef _7ZIP_ST + NCoderPropID::kNumThreads, + #endif + NCoderPropID::kAlgorithm, + NCoderPropID::kDictionarySize, + NCoderPropID::kNumFastBytes, + NCoderPropID::kMatchFinder, + NCoderPropID::kMatchFinderCycles + }; + int numProps = sizeof(propIDs) / sizeof(propIDs[0]); + if (!_options.NumMatchFinderCyclesDefined) + numProps--; + RINOK(_lzmaEncoder->SetCoderProperties(propIDs, props, numProps)); + } + else if (method == NFileHeader::NCompressionMethod::kPPMd) + { + _compressExtractVersion = NFileHeader::NCompressionMethod::kExtractVersion_PPMd; + NCompress::NPpmdZip::CEncoder *encoder = new NCompress::NPpmdZip::CEncoder(); + _compressEncoder = encoder; + NWindows::NCOM::CPropVariant props[] = + { + _options.Algo, + _options.MemSize, + _options.Order + + }; + PROPID propIDs[] = + { + NCoderPropID::kAlgorithm, + NCoderPropID::kUsedMemorySize, + NCoderPropID::kOrder + }; + RINOK(encoder->SetCoderProperties(propIDs, props, sizeof(propIDs) / sizeof(propIDs[0]))); + } + else + { + CMethodId methodId; + switch(method) + { + case NFileHeader::NCompressionMethod::kBZip2: + methodId = kMethodId_BZip2; + _compressExtractVersion = NFileHeader::NCompressionMethod::kExtractVersion_BZip2; + break; + default: + _compressExtractVersion = ((method == NFileHeader::NCompressionMethod::kDeflated64) ? + NFileHeader::NCompressionMethod::kExtractVersion_Deflate64 : + NFileHeader::NCompressionMethod::kExtractVersion_Deflate); + methodId = kMethodId_ZipBase + method; + break; + } + RINOK(CreateCoder( + EXTERNAL_CODECS_LOC_VARS + methodId, _compressEncoder, true)); + if (!_compressEncoder) + return E_NOTIMPL; + + if (method == NFileHeader::NCompressionMethod::kDeflated || + method == NFileHeader::NCompressionMethod::kDeflated64) + { + NWindows::NCOM::CPropVariant props[] = + { + _options.Algo, + _options.NumPasses, + _options.NumFastBytes, + _options.NumMatchFinderCycles + }; + PROPID propIDs[] = + { + NCoderPropID::kAlgorithm, + NCoderPropID::kNumPasses, + NCoderPropID::kNumFastBytes, + NCoderPropID::kMatchFinderCycles + }; + int numProps = sizeof(propIDs) / sizeof(propIDs[0]); + if (!_options.NumMatchFinderCyclesDefined) + numProps--; + CMyComPtr setCoderProperties; + _compressEncoder.QueryInterface(IID_ICompressSetCoderProperties, &setCoderProperties); + if (setCoderProperties) + { + RINOK(setCoderProperties->SetCoderProperties(propIDs, props, numProps)); + } + } + else if (method == NFileHeader::NCompressionMethod::kBZip2) + { + NWindows::NCOM::CPropVariant props[] = + { + _options.DicSize, + _options.NumPasses + #ifndef _7ZIP_ST + , _options.NumThreads + #endif + }; + PROPID propIDs[] = + { + NCoderPropID::kDictionarySize, + NCoderPropID::kNumPasses + #ifndef _7ZIP_ST + , NCoderPropID::kNumThreads + #endif + }; + CMyComPtr setCoderProperties; + _compressEncoder.QueryInterface(IID_ICompressSetCoderProperties, &setCoderProperties); + if (setCoderProperties) + { + RINOK(setCoderProperties->SetCoderProperties(propIDs, props, sizeof(propIDs) / sizeof(propIDs[0]))); + } + } + } + } + CMyComPtr outStreamNew; + if (_options.PasswordIsDefined) + outStreamNew = _cryptoStream; + else + outStreamNew = outStream; + if (_compressExtractVersion > opRes.ExtractVersion) + opRes.ExtractVersion = _compressExtractVersion; + RINOK(_compressEncoder->Code(inCrcStream, outStreamNew, NULL, NULL, progress)); + break; + } + } + + RINOK(outStream->Seek(0, STREAM_SEEK_CUR, &opRes.PackSize)); + + if (inCrcStreamSpec != 0) + { + opRes.CRC = inCrcStreamSpec->GetCRC(); + opRes.UnpackSize = inCrcStreamSpec->GetSize(); + } + else + { + opRes.CRC = inSecCrcStreamSpec->GetCRC(); + opRes.UnpackSize = inSecCrcStreamSpec->GetSize(); + } + + if (_options.PasswordIsDefined) + { + if (opRes.PackSize < opRes.UnpackSize + + (_options.IsAesMode ? _filterAesSpec->GetHeaderSize() : NCrypto::NZip::kHeaderSize)) + break; + } + else if (opRes.PackSize < opRes.UnpackSize) + break; + } + if (_options.IsAesMode) + { + RINOK(_filterAesSpec->WriteFooter(outStream)); + RINOK(outStream->Seek(0, STREAM_SEEK_CUR, &opRes.PackSize)); + } + opRes.Method = method; + return S_OK; +} + +}} diff --git a/CPP/7zip/Archive/Zip/ZipAddCommon.h b/CPP/7zip/Archive/Zip/ZipAddCommon.h new file mode 100644 index 0000000..e4c02db --- /dev/null +++ b/CPP/7zip/Archive/Zip/ZipAddCommon.h @@ -0,0 +1,56 @@ +// ZipAddCommon.h + +#ifndef __ZIP_ADD_COMMON_H +#define __ZIP_ADD_COMMON_H + +#include "../../ICoder.h" +#include "../../IProgress.h" + +#include "../../Common/CreateCoder.h" +#include "../../Common/FilterCoder.h" + +#include "../../Compress/CopyCoder.h" + +#include "../../Crypto/ZipCrypto.h" +#include "../../Crypto/WzAes.h" + +#include "ZipCompressionMode.h" + +namespace NArchive { +namespace NZip { + +struct CCompressingResult +{ + UInt64 UnpackSize; + UInt64 PackSize; + UInt32 CRC; + UInt16 Method; + Byte ExtractVersion; +}; + +class CAddCommon +{ + CCompressionMethodMode _options; + NCompress::CCopyCoder *_copyCoderSpec; + CMyComPtr _copyCoder; + + CMyComPtr _compressEncoder; + Byte _compressExtractVersion; + + CFilterCoder *_cryptoStreamSpec; + CMyComPtr _cryptoStream; + + NCrypto::NZip::CEncoder *_filterSpec; + NCrypto::NWzAes::CEncoder *_filterAesSpec; + +public: + CAddCommon(const CCompressionMethodMode &options); + HRESULT Compress( + DECL_EXTERNAL_CODECS_LOC_VARS + ISequentialInStream *inStream, IOutStream *outStream, + ICompressProgressInfo *progress, CCompressingResult &operationResult); +}; + +}} + +#endif diff --git a/CPP/7zip/Archive/Zip/ZipCompressionMode.h b/CPP/7zip/Archive/Zip/ZipCompressionMode.h new file mode 100644 index 0000000..7ef7cfb --- /dev/null +++ b/CPP/7zip/Archive/Zip/ZipCompressionMode.h @@ -0,0 +1,42 @@ +// CompressionMode.h + +#ifndef __ZIP_COMPRESSION_MODE_H +#define __ZIP_COMPRESSION_MODE_H + +#include "Common/MyString.h" + +namespace NArchive { +namespace NZip { + +struct CCompressionMethodMode +{ + CRecordVector MethodSequence; + UString MatchFinder; + UInt32 Algo; + UInt32 NumPasses; + UInt32 NumFastBytes; + bool NumMatchFinderCyclesDefined; + UInt32 NumMatchFinderCycles; + UInt32 DicSize; + UInt32 MemSize; + UInt32 Order; + + #ifndef _7ZIP_ST + UInt32 NumThreads; + #endif + bool PasswordIsDefined; + AString Password; + bool IsAesMode; + Byte AesKeyMode; + + CCompressionMethodMode(): + NumMatchFinderCyclesDefined(false), + PasswordIsDefined(false), + IsAesMode(false), + AesKeyMode(3) + {} +}; + +}} + +#endif diff --git a/CPP/7zip/Archive/Zip/ZipHandler.cpp b/CPP/7zip/Archive/Zip/ZipHandler.cpp new file mode 100644 index 0000000..bd15632 --- /dev/null +++ b/CPP/7zip/Archive/Zip/ZipHandler.cpp @@ -0,0 +1,822 @@ +// ZipHandler.cpp + +#include "StdAfx.h" + +#include "Common/ComTry.h" +#include "Common/IntToString.h" + +#include "Windows/PropVariant.h" +#include "Windows/Time.h" + +#include "../../IPassword.h" + +#include "../../Common/FilterCoder.h" +#include "../../Common/ProgressUtils.h" +#include "../../Common/StreamObjects.h" +#include "../../Common/StreamUtils.h" + +#include "../../Compress/CopyCoder.h" +#include "../../Compress/LzmaDecoder.h" +#include "../../Compress/ImplodeDecoder.h" +#include "../../Compress/PpmdZip.h" +#include "../../Compress/ShrinkDecoder.h" + +#include "../../Crypto/WzAes.h" +#include "../../Crypto/ZipCrypto.h" +#include "../../Crypto/ZipStrong.h" + +#include "../Common/ItemNameUtils.h" +#include "../Common/OutStreamWithCRC.h" + +#include "ZipHandler.h" + +using namespace NWindows; + +namespace NArchive { +namespace NZip { + +static const CMethodId kMethodId_ZipBase = 0x040100; +static const CMethodId kMethodId_BZip2 = 0x040202; + +static const char *kHostOS[] = +{ + "FAT", + "AMIGA", + "VMS", + "Unix", + "VM/CMS", + "Atari", + "HPFS", + "Macintosh", + "Z-System", + "CP/M", + "TOPS-20", + "NTFS", + "SMS/QDOS", + "Acorn", + "VFAT", + "MVS", + "BeOS", + "Tandem", + "OS/400", + "OS/X" +}; + +static const char *kUnknownOS = "Unknown"; + +static const char *kMethods[] = +{ + "Store", + "Shrink", + "Reduced1", + "Reduced2", + "Reduced3", + "Reduced4", + "Implode", + "Tokenizing", + "Deflate", + "Deflate64", + "PKImploding" +}; + +static const char *kBZip2Method = "BZip2"; +static const char *kLZMAMethod = "LZMA"; +static const char *kJpegMethod = "Jpeg"; +static const char *kWavPackMethod = "WavPack"; +static const char *kPPMdMethod = "PPMd"; +static const char *kAESMethod = "AES"; +static const char *kZipCryptoMethod = "ZipCrypto"; +static const char *kStrongCryptoMethod = "StrongCrypto"; + +static struct CStrongCryptoPair +{ + UInt16 Id; + const char *Name; +} g_StrongCryptoPairs[] = +{ + { NStrongCryptoFlags::kDES, "DES" }, + { NStrongCryptoFlags::kRC2old, "RC2a" }, + { NStrongCryptoFlags::k3DES168, "3DES-168" }, + { NStrongCryptoFlags::k3DES112, "3DES-112" }, + { NStrongCryptoFlags::kAES128, "pkAES-128" }, + { NStrongCryptoFlags::kAES192, "pkAES-192" }, + { NStrongCryptoFlags::kAES256, "pkAES-256" }, + { NStrongCryptoFlags::kRC2, "RC2" }, + { NStrongCryptoFlags::kBlowfish, "Blowfish" }, + { NStrongCryptoFlags::kTwofish, "Twofish" }, + { NStrongCryptoFlags::kRC4, "RC4" } +}; + +static STATPROPSTG kProps[] = +{ + { NULL, kpidPath, VT_BSTR}, + { NULL, kpidIsDir, VT_BOOL}, + { NULL, kpidSize, VT_UI8}, + { NULL, kpidPackSize, VT_UI8}, + { NULL, kpidMTime, VT_FILETIME}, + { NULL, kpidCTime, VT_FILETIME}, + { NULL, kpidATime, VT_FILETIME}, + { NULL, kpidAttrib, VT_UI4}, + { NULL, kpidEncrypted, VT_BOOL}, + { NULL, kpidComment, VT_BSTR}, + { NULL, kpidCRC, VT_UI4}, + { NULL, kpidMethod, VT_BSTR}, + { NULL, kpidHostOS, VT_BSTR}, + { NULL, kpidUnpackVer, VT_UI4} +}; + +static STATPROPSTG kArcProps[] = +{ + { NULL, kpidBit64, VT_BOOL}, + { NULL, kpidComment, VT_BSTR}, + { NULL, kpidPhySize, VT_UI8}, + { NULL, kpidOffset, VT_UI8} +}; + +CHandler::CHandler() +{ + InitMethodProperties(); +} + +static AString BytesToString(const CByteBuffer &data) +{ + AString s; + int size = (int)data.GetCapacity(); + if (size > 0) + { + char *p = s.GetBuffer(size + 1); + memcpy(p, (const Byte *)data, size); + p[size] = '\0'; + s.ReleaseBuffer(); + } + return s; +} + +IMP_IInArchive_Props +IMP_IInArchive_ArcProps + +STDMETHODIMP CHandler::GetArchiveProperty(PROPID propID, PROPVARIANT *value) +{ + COM_TRY_BEGIN + NWindows::NCOM::CPropVariant prop; + switch(propID) + { + case kpidBit64: if (m_Archive.IsZip64) prop = m_Archive.IsZip64; break; + case kpidComment: prop = MultiByteToUnicodeString(BytesToString(m_Archive.ArcInfo.Comment), CP_ACP); break; + case kpidPhySize: prop = m_Archive.ArcInfo.GetPhySize(); break; + case kpidOffset: if (m_Archive.ArcInfo.StartPosition != 0) prop = m_Archive.ArcInfo.StartPosition; break; + } + prop.Detach(value); + COM_TRY_END + 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 prop; + const CItemEx &item = m_Items[index]; + switch(propID) + { + case kpidPath: prop = NItemName::GetOSName2(item.GetUnicodeString(item.Name)); break; + case kpidIsDir: prop = item.IsDir(); break; + case kpidSize: prop = item.UnPackSize; break; + case kpidPackSize: prop = item.PackSize; break; + case kpidTimeType: + { + FILETIME ft; + UInt32 unixTime; + if (item.CentralExtra.GetNtfsTime(NFileHeader::NNtfsExtra::kMTime, ft)) + prop = (UInt32)NFileTimeType::kWindows; + else if (item.CentralExtra.GetUnixTime(NFileHeader::NUnixTime::kMTime, unixTime)) + prop = (UInt32)NFileTimeType::kUnix; + else + prop = (UInt32)NFileTimeType::kDOS; + break; + } + case kpidCTime: + { + FILETIME ft; + if (item.CentralExtra.GetNtfsTime(NFileHeader::NNtfsExtra::kCTime, ft)) + prop = ft; + break; + } + case kpidATime: + { + FILETIME ft; + if (item.CentralExtra.GetNtfsTime(NFileHeader::NNtfsExtra::kATime, ft)) + prop = ft; + break; + } + case kpidMTime: + { + FILETIME utc; + if (!item.CentralExtra.GetNtfsTime(NFileHeader::NNtfsExtra::kMTime, utc)) + { + UInt32 unixTime; + if (item.CentralExtra.GetUnixTime(NFileHeader::NUnixTime::kMTime, unixTime)) + NTime::UnixTimeToFileTime(unixTime, utc); + else + { + FILETIME localFileTime; + if (!NTime::DosTimeToFileTime(item.Time, localFileTime) || + !LocalFileTimeToFileTime(&localFileTime, &utc)) + utc.dwHighDateTime = utc.dwLowDateTime = 0; + } + } + prop = utc; + break; + } + case kpidAttrib: prop = item.GetWinAttributes(); break; + case kpidEncrypted: prop = item.IsEncrypted(); break; + case kpidComment: prop = item.GetUnicodeString(BytesToString(item.Comment)); break; + case kpidCRC: if (item.IsThereCrc()) prop = item.FileCRC; break; + case kpidMethod: + { + UInt16 methodId = item.CompressionMethod; + AString method; + if (item.IsEncrypted()) + { + if (methodId == NFileHeader::NCompressionMethod::kWzAES) + { + method = kAESMethod; + CWzAesExtraField aesField; + if (item.CentralExtra.GetWzAesField(aesField)) + { + method += '-'; + char s[32]; + ConvertUInt64ToString((aesField.Strength + 1) * 64 , s); + method += s; + method += ' '; + methodId = aesField.Method; + } + } + else + { + if (item.IsStrongEncrypted()) + { + CStrongCryptoField f; + bool finded = false; + if (item.CentralExtra.GetStrongCryptoField(f)) + { + for (int i = 0; i < sizeof(g_StrongCryptoPairs) / sizeof(g_StrongCryptoPairs[0]); i++) + { + const CStrongCryptoPair &pair = g_StrongCryptoPairs[i]; + if (f.AlgId == pair.Id) + { + method += pair.Name; + finded = true; + break; + } + } + } + if (!finded) + method += kStrongCryptoMethod; + } + else + method += kZipCryptoMethod; + method += ' '; + } + } + if (methodId < sizeof(kMethods) / sizeof(kMethods[0])) + method += kMethods[methodId]; + else switch (methodId) + { + case NFileHeader::NCompressionMethod::kLZMA: + method += kLZMAMethod; + if (item.IsLzmaEOS()) + method += ":EOS"; + break; + case NFileHeader::NCompressionMethod::kBZip2: method += kBZip2Method; break; + case NFileHeader::NCompressionMethod::kJpeg: method += kJpegMethod; break; + case NFileHeader::NCompressionMethod::kWavPack: method += kWavPackMethod; break; + case NFileHeader::NCompressionMethod::kPPMd: method += kPPMdMethod; break; + default: + { + char s[32]; + ConvertUInt64ToString(methodId, s); + method += s; + } + } + prop = method; + break; + } + case kpidHostOS: + prop = (item.MadeByVersion.HostOS < sizeof(kHostOS) / sizeof(kHostOS[0])) ? + (kHostOS[item.MadeByVersion.HostOS]) : kUnknownOS; + break; + case kpidUnpackVer: + prop = (UInt32)item.ExtractVersion.Version; + break; + } + prop.Detach(value); + return S_OK; + COM_TRY_END +} + +class CProgressImp: public CProgressVirt +{ + CMyComPtr _callback; +public: + STDMETHOD(SetTotal)(UInt64 numFiles); + STDMETHOD(SetCompleted)(UInt64 numFiles); + CProgressImp(IArchiveOpenCallback *callback): _callback(callback) {} +}; + +STDMETHODIMP CProgressImp::SetTotal(UInt64 numFiles) +{ + if (_callback) + return _callback->SetTotal(&numFiles, NULL); + return S_OK; +} + +STDMETHODIMP CProgressImp::SetCompleted(UInt64 numFiles) +{ + if (_callback) + return _callback->SetCompleted(&numFiles, NULL); + return S_OK; +} + +STDMETHODIMP CHandler::Open(IInStream *inStream, + const UInt64 *maxCheckStartPosition, IArchiveOpenCallback *callback) +{ + COM_TRY_BEGIN + try + { + Close(); + RINOK(inStream->Seek(0, STREAM_SEEK_SET, NULL)); + RINOK(m_Archive.Open(inStream, maxCheckStartPosition)); + CProgressImp progressImp(callback); + return m_Archive.ReadHeaders(m_Items, &progressImp); + } + catch(const CInArchiveException &) { Close(); return S_FALSE; } + catch(...) { Close(); throw; } + COM_TRY_END +} + +STDMETHODIMP CHandler::Close() +{ + m_Items.Clear(); + m_Archive.Close(); + return S_OK; +} + +////////////////////////////////////// +// CHandler::DecompressItems + +class CLzmaDecoder: + public ICompressCoder, + public CMyUnknownImp +{ + NCompress::NLzma::CDecoder *DecoderSpec; + CMyComPtr Decoder; +public: + CLzmaDecoder(); + STDMETHOD(Code)(ISequentialInStream *inStream, ISequentialOutStream *outStream, + const UInt64 *inSize, const UInt64 *outSize, ICompressProgressInfo *progress); + + MY_UNKNOWN_IMP +}; + +CLzmaDecoder::CLzmaDecoder() +{ + DecoderSpec = new NCompress::NLzma::CDecoder; + Decoder = DecoderSpec; +} + +HRESULT CLzmaDecoder::Code(ISequentialInStream *inStream, ISequentialOutStream *outStream, + const UInt64 * /* inSize */, const UInt64 *outSize, ICompressProgressInfo *progress) +{ + Byte buf[9]; + RINOK(ReadStream_FALSE(inStream, buf, 9)); + if (buf[2] != 5 || buf[3] != 0) + return E_NOTIMPL; + RINOK(DecoderSpec->SetDecoderProperties2(buf + 4, 5)); + return Decoder->Code(inStream, outStream, NULL, outSize, progress); +} + +struct CMethodItem +{ + UInt16 ZipMethod; + CMyComPtr Coder; +}; + +class CZipDecoder +{ + NCrypto::NZip::CDecoder *_zipCryptoDecoderSpec; + NCrypto::NZipStrong::CDecoder *_pkAesDecoderSpec; + NCrypto::NWzAes::CDecoder *_wzAesDecoderSpec; + + CMyComPtr _zipCryptoDecoder; + CMyComPtr _pkAesDecoder; + CMyComPtr _wzAesDecoder; + + CFilterCoder *filterStreamSpec; + CMyComPtr filterStream; + CMyComPtr getTextPassword; + CObjectVector methodItems; + +public: + CZipDecoder(): + _zipCryptoDecoderSpec(0), + _pkAesDecoderSpec(0), + _wzAesDecoderSpec(0), + filterStreamSpec(0) {} + + HRESULT Decode( + DECL_EXTERNAL_CODECS_LOC_VARS + CInArchive &archive, const CItemEx &item, + ISequentialOutStream *realOutStream, + IArchiveExtractCallback *extractCallback, + ICompressProgressInfo *compressProgress, + UInt32 numThreads, Int32 &res); +}; + +HRESULT CZipDecoder::Decode( + DECL_EXTERNAL_CODECS_LOC_VARS + CInArchive &archive, const CItemEx &item, + ISequentialOutStream *realOutStream, + IArchiveExtractCallback *extractCallback, + ICompressProgressInfo *compressProgress, + UInt32 numThreads, Int32 &res) +{ + res = NExtract::NOperationResult::kDataError; + CInStreamReleaser inStreamReleaser; + + bool needCRC = true; + bool wzAesMode = false; + bool pkAesMode = false; + UInt16 methodId = item.CompressionMethod; + if (item.IsEncrypted()) + { + if (item.IsStrongEncrypted()) + { + CStrongCryptoField f; + if (item.CentralExtra.GetStrongCryptoField(f)) + { + pkAesMode = true; + } + if (!pkAesMode) + { + res = NExtract::NOperationResult::kUnSupportedMethod; + return S_OK; + } + } + if (methodId == NFileHeader::NCompressionMethod::kWzAES) + { + CWzAesExtraField aesField; + if (item.CentralExtra.GetWzAesField(aesField)) + { + wzAesMode = true; + needCRC = aesField.NeedCrc(); + } + } + } + + COutStreamWithCRC *outStreamSpec = new COutStreamWithCRC; + CMyComPtr outStream = outStreamSpec; + outStreamSpec->SetStream(realOutStream); + outStreamSpec->Init(needCRC); + + UInt64 authenticationPos; + + CMyComPtr inStream; + { + UInt64 packSize = item.PackSize; + if (wzAesMode) + { + if (packSize < NCrypto::NWzAes::kMacSize) + return S_OK; + packSize -= NCrypto::NWzAes::kMacSize; + } + UInt64 dataPos = item.GetDataPosition(); + inStream.Attach(archive.CreateLimitedStream(dataPos, packSize)); + authenticationPos = dataPos + packSize; + } + + CMyComPtr cryptoFilter; + if (item.IsEncrypted()) + { + if (wzAesMode) + { + CWzAesExtraField aesField; + if (!item.CentralExtra.GetWzAesField(aesField)) + return S_OK; + methodId = aesField.Method; + if (!_wzAesDecoder) + { + _wzAesDecoderSpec = new NCrypto::NWzAes::CDecoder; + _wzAesDecoder = _wzAesDecoderSpec; + } + cryptoFilter = _wzAesDecoder; + Byte properties = aesField.Strength; + RINOK(_wzAesDecoderSpec->SetDecoderProperties2(&properties, 1)); + } + else if (pkAesMode) + { + if (!_pkAesDecoder) + { + _pkAesDecoderSpec = new NCrypto::NZipStrong::CDecoder; + _pkAesDecoder = _pkAesDecoderSpec; + } + cryptoFilter = _pkAesDecoder; + } + else + { + if (!_zipCryptoDecoder) + { + _zipCryptoDecoderSpec = new NCrypto::NZip::CDecoder; + _zipCryptoDecoder = _zipCryptoDecoderSpec; + } + cryptoFilter = _zipCryptoDecoder; + } + CMyComPtr cryptoSetPassword; + RINOK(cryptoFilter.QueryInterface(IID_ICryptoSetPassword, &cryptoSetPassword)); + + if (!getTextPassword) + extractCallback->QueryInterface(IID_ICryptoGetTextPassword, (void **)&getTextPassword); + + if (getTextPassword) + { + CMyComBSTR password; + RINOK(getTextPassword->CryptoGetTextPassword(&password)); + AString charPassword; + if (wzAesMode || pkAesMode) + { + charPassword = UnicodeStringToMultiByte((const wchar_t *)password, CP_ACP); + /* + for (int i = 0;; i++) + { + wchar_t c = password[i]; + if (c == 0) + break; + if (c >= 0x80) + { + res = NExtract::NOperationResult::kDataError; + return S_OK; + } + charPassword += (char)c; + } + */ + } + else + { + // we use OEM. WinZip/Windows probably use ANSI for some files + charPassword = UnicodeStringToMultiByte((const wchar_t *)password, CP_OEMCP); + } + HRESULT result = cryptoSetPassword->CryptoSetPassword( + (const Byte *)(const char *)charPassword, charPassword.Length()); + if (result != S_OK) + return S_OK; + } + else + { + RINOK(cryptoSetPassword->CryptoSetPassword(0, 0)); + } + } + + int m; + for (m = 0; m < methodItems.Size(); m++) + if (methodItems[m].ZipMethod == methodId) + break; + + if (m == methodItems.Size()) + { + CMethodItem mi; + mi.ZipMethod = methodId; + if (methodId == NFileHeader::NCompressionMethod::kStored) + mi.Coder = new NCompress::CCopyCoder; + else if (methodId == NFileHeader::NCompressionMethod::kShrunk) + mi.Coder = new NCompress::NShrink::CDecoder; + else if (methodId == NFileHeader::NCompressionMethod::kImploded) + mi.Coder = new NCompress::NImplode::NDecoder::CCoder; + else if (methodId == NFileHeader::NCompressionMethod::kLZMA) + mi.Coder = new CLzmaDecoder; + else if (methodId == NFileHeader::NCompressionMethod::kPPMd) + mi.Coder = new NCompress::NPpmdZip::CDecoder(true); + else + { + CMethodId szMethodID; + if (methodId == NFileHeader::NCompressionMethod::kBZip2) + szMethodID = kMethodId_BZip2; + else + { + if (methodId > 0xFF) + { + res = NExtract::NOperationResult::kUnSupportedMethod; + return S_OK; + } + szMethodID = kMethodId_ZipBase + (Byte)methodId; + } + + RINOK(CreateCoder(EXTERNAL_CODECS_LOC_VARS szMethodID, mi.Coder, false)); + + if (mi.Coder == 0) + { + res = NExtract::NOperationResult::kUnSupportedMethod; + return S_OK; + } + } + m = methodItems.Add(mi); + } + ICompressCoder *coder = methodItems[m].Coder; + + { + CMyComPtr setDecoderProperties; + coder->QueryInterface(IID_ICompressSetDecoderProperties2, (void **)&setDecoderProperties); + if (setDecoderProperties) + { + Byte properties = (Byte)item.Flags; + RINOK(setDecoderProperties->SetDecoderProperties2(&properties, 1)); + } + } + + #ifndef _7ZIP_ST + { + CMyComPtr setCoderMt; + coder->QueryInterface(IID_ICompressSetCoderMt, (void **)&setCoderMt); + if (setCoderMt) + { + RINOK(setCoderMt->SetNumberOfThreads(numThreads)); + } + } + #endif + + { + HRESULT result = S_OK; + CMyComPtr inStreamNew; + if (item.IsEncrypted()) + { + if (!filterStream) + { + filterStreamSpec = new CFilterCoder; + filterStream = filterStreamSpec; + } + filterStreamSpec->Filter = cryptoFilter; + if (wzAesMode) + { + result = _wzAesDecoderSpec->ReadHeader(inStream); + } + else if (pkAesMode) + { + result =_pkAesDecoderSpec->ReadHeader(inStream, item.FileCRC, item.UnPackSize); + if (result == S_OK) + { + bool passwOK; + result = _pkAesDecoderSpec->CheckPassword(passwOK); + if (result == S_OK && !passwOK) + result = S_FALSE; + } + } + else + { + result = _zipCryptoDecoderSpec->ReadHeader(inStream); + } + + if (result == S_OK) + { + RINOK(filterStreamSpec->SetInStream(inStream)); + inStreamReleaser.FilterCoder = filterStreamSpec; + inStreamNew = filterStream; + if (wzAesMode) + { + if (!_wzAesDecoderSpec->CheckPasswordVerifyCode()) + result = S_FALSE; + } + } + } + else + inStreamNew = inStream; + if (result == S_OK) + result = coder->Code(inStreamNew, outStream, NULL, &item.UnPackSize, compressProgress); + if (result == S_FALSE) + return S_OK; + if (result == E_NOTIMPL) + { + res = NExtract::NOperationResult::kUnSupportedMethod; + return S_OK; + } + + RINOK(result); + } + bool crcOK = true; + bool authOk = true; + if (needCRC) + crcOK = (outStreamSpec->GetCRC() == item.FileCRC); + if (wzAesMode) + { + inStream.Attach(archive.CreateLimitedStream(authenticationPos, NCrypto::NWzAes::kMacSize)); + if (_wzAesDecoderSpec->CheckMac(inStream, authOk) != S_OK) + authOk = false; + } + + res = ((crcOK && authOk) ? + NExtract::NOperationResult::kOK : + NExtract::NOperationResult::kCRCError); + return S_OK; +} + + +STDMETHODIMP CHandler::Extract(const UInt32 *indices, UInt32 numItems, + Int32 testMode, IArchiveExtractCallback *extractCallback) +{ + COM_TRY_BEGIN + CZipDecoder myDecoder; + UInt64 totalUnPacked = 0, totalPacked = 0; + bool allFilesMode = (numItems == (UInt32)-1); + if (allFilesMode) + numItems = m_Items.Size(); + if(numItems == 0) + return S_OK; + UInt32 i; + for (i = 0; i < numItems; i++) + { + const CItemEx &item = m_Items[allFilesMode ? i : indices[i]]; + totalUnPacked += item.UnPackSize; + totalPacked += item.PackSize; + } + RINOK(extractCallback->SetTotal(totalUnPacked)); + + UInt64 currentTotalUnPacked = 0, currentTotalPacked = 0; + UInt64 currentItemUnPacked, currentItemPacked; + + CLocalProgress *lps = new CLocalProgress; + CMyComPtr progress = lps; + lps->Init(extractCallback, false); + + for (i = 0; i < numItems; i++, currentTotalUnPacked += currentItemUnPacked, + currentTotalPacked += currentItemPacked) + { + currentItemUnPacked = 0; + currentItemPacked = 0; + + lps->InSize = currentTotalPacked; + lps->OutSize = currentTotalUnPacked; + RINOK(lps->SetCur()); + + CMyComPtr realOutStream; + Int32 askMode = testMode ? + NExtract::NAskMode::kTest : + NExtract::NAskMode::kExtract; + Int32 index = allFilesMode ? i : indices[i]; + + RINOK(extractCallback->GetStream(index, &realOutStream, askMode)); + + CItemEx item = m_Items[index]; + if (!item.FromLocal) + { + HRESULT res = m_Archive.ReadLocalItemAfterCdItem(item); + if (res == S_FALSE) + { + if (item.IsDir() || realOutStream || testMode) + { + RINOK(extractCallback->PrepareOperation(askMode)); + realOutStream.Release(); + RINOK(extractCallback->SetOperationResult(NExtract::NOperationResult::kUnSupportedMethod)); + } + continue; + } + RINOK(res); + } + + if (item.IsDir() || item.IgnoreItem()) + { + // if (!testMode) + { + RINOK(extractCallback->PrepareOperation(askMode)); + realOutStream.Release(); + RINOK(extractCallback->SetOperationResult(NExtract::NOperationResult::kOK)); + } + continue; + } + + currentItemUnPacked = item.UnPackSize; + currentItemPacked = item.PackSize; + + if (!testMode && !realOutStream) + continue; + + RINOK(extractCallback->PrepareOperation(askMode)); + + Int32 res; + RINOK(myDecoder.Decode( + EXTERNAL_CODECS_VARS + m_Archive, item, realOutStream, extractCallback, + progress, _numThreads, res)); + realOutStream.Release(); + + RINOK(extractCallback->SetOperationResult(res)) + } + return S_OK; + COM_TRY_END +} + +IMPL_ISetCompressCodecsInfo + +}} diff --git a/CPP/7zip/Archive/Zip/ZipHandler.h b/CPP/7zip/Archive/Zip/ZipHandler.h new file mode 100644 index 0000000..04cede8 --- /dev/null +++ b/CPP/7zip/Archive/Zip/ZipHandler.h @@ -0,0 +1,101 @@ +// Zip/Handler.h + +#ifndef __ZIP_HANDLER_H +#define __ZIP_HANDLER_H + +#include "Common/DynamicBuffer.h" +#include "../../ICoder.h" +#include "../IArchive.h" + +#include "../../Common/CreateCoder.h" + +#include "ZipIn.h" +#include "ZipCompressionMode.h" + +#ifndef _7ZIP_ST +#include "../../../Windows/System.h" +#endif + +namespace NArchive { +namespace NZip { + +class CHandler: + public IInArchive, + public IOutArchive, + public ISetProperties, + PUBLIC_ISetCompressCodecsInfo + public CMyUnknownImp +{ +public: + MY_QUERYINTERFACE_BEGIN2(IInArchive) + MY_QUERYINTERFACE_ENTRY(IOutArchive) + MY_QUERYINTERFACE_ENTRY(ISetProperties) + QUERY_ENTRY_ISetCompressCodecsInfo + MY_QUERYINTERFACE_END + MY_ADDREF_RELEASE + + INTERFACE_IInArchive(;) + INTERFACE_IOutArchive(;) + + STDMETHOD(SetProperties)(const wchar_t **names, const PROPVARIANT *values, Int32 numProperties); + + DECL_ISetCompressCodecsInfo + + CHandler(); +private: + CObjectVector m_Items; + CInArchive m_Archive; + + int m_Level; + int m_MainMethod; + UInt32 m_DicSize; + UInt32 m_Algo; + UInt32 m_NumPasses; + UInt32 m_NumFastBytes; + UInt32 m_NumMatchFinderCycles; + UInt32 m_MemSize; + UInt32 m_Order; + + bool m_NumMatchFinderCyclesDefined; + + bool m_ForceAesMode; + bool m_IsAesMode; + Byte m_AesKeyMode; + + bool m_WriteNtfsTimeExtra; + bool m_ForceLocal; + bool m_ForceUtf8; + + #ifndef _7ZIP_ST + UInt32 _numThreads; + #endif + + DECL_EXTERNAL_CODECS_VARS + + void InitMethodProperties() + { + m_Level = -1; + m_MainMethod = -1; + m_Algo = + m_DicSize = + m_NumPasses = + m_NumFastBytes = + m_Order = + m_MemSize = + m_NumMatchFinderCycles = 0xFFFFFFFF; + m_NumMatchFinderCyclesDefined = false; + m_ForceAesMode = false; + m_IsAesMode = false; + m_AesKeyMode = 3; // aes-256 + m_WriteNtfsTimeExtra = false; + m_ForceLocal = false; + m_ForceUtf8 = false; + #ifndef _7ZIP_ST + _numThreads = NWindows::NSystem::GetNumberOfProcessors();; + #endif + } +}; + +}} + +#endif diff --git a/CPP/7zip/Archive/Zip/ZipHandlerOut.cpp b/CPP/7zip/Archive/Zip/ZipHandlerOut.cpp new file mode 100644 index 0000000..ee1c07f --- /dev/null +++ b/CPP/7zip/Archive/Zip/ZipHandlerOut.cpp @@ -0,0 +1,537 @@ +// ZipHandlerOut.cpp + +#include "StdAfx.h" + +#include "Common/ComTry.h" +#include "Common/StringConvert.h" +#include "Common/StringToInt.h" + +#include "Windows/PropVariant.h" +#include "Windows/Time.h" + +#include "../../IPassword.h" + +#include "../../Common/OutBuffer.h" + +#include "../../Crypto/WzAes.h" + +#include "../Common/ItemNameUtils.h" +#include "../Common/ParseProperties.h" + +#include "ZipHandler.h" +#include "ZipUpdate.h" + +using namespace NWindows; +using namespace NCOM; +using namespace NTime; + +namespace NArchive { +namespace NZip { + +static const UInt32 kLzAlgoX1 = 0; +static const UInt32 kLzAlgoX5 = 1; + +static const UInt32 kDeflateNumPassesX1 = 1; +static const UInt32 kDeflateNumPassesX7 = 3; +static const UInt32 kDeflateNumPassesX9 = 10; + +static const UInt32 kDeflateNumFastBytesX1 = 32; +static const UInt32 kDeflateNumFastBytesX7 = 64; +static const UInt32 kDeflateNumFastBytesX9 = 128; + +static const wchar_t *kLzmaMatchFinderX1 = L"HC4"; +static const wchar_t *kLzmaMatchFinderX5 = L"BT4"; + +static const UInt32 kLzmaNumFastBytesX1 = 32; +static const UInt32 kLzmaNumFastBytesX7 = 64; + +static const UInt32 kLzmaDicSizeX1 = 1 << 16; +static const UInt32 kLzmaDicSizeX3 = 1 << 20; +static const UInt32 kLzmaDicSizeX5 = 1 << 24; +static const UInt32 kLzmaDicSizeX7 = 1 << 25; +static const UInt32 kLzmaDicSizeX9 = 1 << 26; + +static const UInt32 kBZip2NumPassesX1 = 1; +static const UInt32 kBZip2NumPassesX7 = 2; +static const UInt32 kBZip2NumPassesX9 = 7; + +static const UInt32 kBZip2DicSizeX1 = 100000; +static const UInt32 kBZip2DicSizeX3 = 500000; +static const UInt32 kBZip2DicSizeX5 = 900000; + +STDMETHODIMP CHandler::GetFileTimeType(UInt32 *timeType) +{ + *timeType = NFileTimeType::kDOS; + return S_OK; +} + +static bool IsAsciiString(const UString &s) +{ + for (int i = 0; i < s.Length(); i++) + { + wchar_t c = s[i]; + if (c < 0x20 || c > 0x7F) + return false; + } + return true; +} + +#define COM_TRY_BEGIN2 try { +#define COM_TRY_END2 } \ +catch(const CSystemException &e) { return e.ErrorCode; } \ +catch(...) { return E_OUTOFMEMORY; } + +static HRESULT GetTime(IArchiveUpdateCallback *callback, int index, PROPID propID, FILETIME &filetime) +{ + filetime.dwHighDateTime = filetime.dwLowDateTime = 0; + NCOM::CPropVariant prop; + RINOK(callback->GetProperty(index, propID, &prop)); + if (prop.vt == VT_FILETIME) + filetime = prop.filetime; + else if (prop.vt != VT_EMPTY) + return E_INVALIDARG; + return S_OK; +} + +STDMETHODIMP CHandler::UpdateItems(ISequentialOutStream *outStream, UInt32 numItems, + IArchiveUpdateCallback *callback) +{ + COM_TRY_BEGIN2 + CObjectVector updateItems; + bool thereAreAesUpdates = false; + for (UInt32 i = 0; i < numItems; i++) + { + CUpdateItem ui; + Int32 newData; + Int32 newProperties; + UInt32 indexInArchive; + if (!callback) + return E_FAIL; + RINOK(callback->GetUpdateItemInfo(i, &newData, &newProperties, &indexInArchive)); + ui.NewProperties = IntToBool(newProperties); + ui.NewData = IntToBool(newData); + ui.IndexInArchive = indexInArchive; + ui.IndexInClient = i; + bool existInArchive = (indexInArchive != (UInt32)-1); + if (existInArchive && newData) + if (m_Items[indexInArchive].IsAesEncrypted()) + thereAreAesUpdates = true; + + if (IntToBool(newProperties)) + { + UString name; + { + NCOM::CPropVariant prop; + RINOK(callback->GetProperty(i, kpidAttrib, &prop)); + if (prop.vt == VT_EMPTY) + ui.Attributes = 0; + else if (prop.vt != VT_UI4) + return E_INVALIDARG; + else + ui.Attributes = prop.ulVal; + } + + { + NCOM::CPropVariant prop; + RINOK(callback->GetProperty(i, kpidPath, &prop)); + if (prop.vt == VT_EMPTY) + name.Empty(); + else if (prop.vt != VT_BSTR) + return E_INVALIDARG; + else + name = prop.bstrVal; + } + { + NCOM::CPropVariant prop; + RINOK(callback->GetProperty(i, kpidIsDir, &prop)); + if (prop.vt == VT_EMPTY) + ui.IsDir = false; + else if (prop.vt != VT_BOOL) + return E_INVALIDARG; + else + ui.IsDir = (prop.boolVal != VARIANT_FALSE); + } + + { + CPropVariant prop; + RINOK(callback->GetProperty(i, kpidTimeType, &prop)); + if (prop.vt == VT_UI4) + ui.NtfsTimeIsDefined = (prop.ulVal == NFileTimeType::kWindows); + else + ui.NtfsTimeIsDefined = m_WriteNtfsTimeExtra; + } + RINOK(GetTime(callback, i, kpidMTime, ui.NtfsMTime)); + RINOK(GetTime(callback, i, kpidATime, ui.NtfsATime)); + RINOK(GetTime(callback, i, kpidCTime, ui.NtfsCTime)); + + { + FILETIME localFileTime = { 0, 0 }; + if (ui.NtfsMTime.dwHighDateTime != 0 || + ui.NtfsMTime.dwLowDateTime != 0) + if (!FileTimeToLocalFileTime(&ui.NtfsMTime, &localFileTime)) + return E_INVALIDARG; + FileTimeToDosTime(localFileTime, ui.Time); + } + + name = NItemName::MakeLegalName(name); + bool needSlash = ui.IsDir; + const wchar_t kSlash = L'/'; + if (!name.IsEmpty()) + { + if (name[name.Length() - 1] == kSlash) + { + if (!ui.IsDir) + return E_INVALIDARG; + needSlash = false; + } + } + if (needSlash) + name += kSlash; + + bool tryUtf8 = true; + if (m_ForceLocal || !m_ForceUtf8) + { +#ifdef _WIN32 + bool defaultCharWasUsed; + ui.Name = UnicodeStringToMultiByte(name, CP_OEMCP, '_', defaultCharWasUsed); + tryUtf8 = (!m_ForceLocal && (defaultCharWasUsed || + MultiByteToUnicodeString(ui.Name, CP_OEMCP) != name)); +#else + // FIXME + ui.Name = UnicodeStringToMultiByte(name, CP_OEMCP); + tryUtf8 = (!m_ForceLocal); +#endif + } + + if (tryUtf8) + { + int i; + for (i = 0; i < name.Length() && (unsigned)name[i] < 0x80; i++); + ui.IsUtf8 = (i != name.Length()); + if (!ConvertUnicodeToUTF8(name, ui.Name)) + return E_INVALIDARG; + } + + if (ui.Name.Length() >= (1 << 16)) + return E_INVALIDARG; + + ui.IndexInClient = i; + /* + if (existInArchive) + { + const CItemEx &itemInfo = m_Items[indexInArchive]; + // ui.Commented = itemInfo.IsCommented(); + ui.Commented = false; + if (ui.Commented) + { + ui.CommentRange.Position = itemInfo.GetCommentPosition(); + ui.CommentRange.Size = itemInfo.CommentSize; + } + } + else + ui.Commented = false; + */ + } + if (IntToBool(newData)) + { + UInt64 size; + { + NCOM::CPropVariant prop; + RINOK(callback->GetProperty(i, kpidSize, &prop)); + if (prop.vt != VT_UI8) + return E_INVALIDARG; + size = prop.uhVal.QuadPart; + } + ui.Size = size; + } + updateItems.Add(ui); + } + + CMyComPtr getTextPassword; + { + CMyComPtr udateCallBack2(callback); + udateCallBack2.QueryInterface(IID_ICryptoGetTextPassword2, &getTextPassword); + } + CCompressionMethodMode options; + + if (getTextPassword) + { + CMyComBSTR password; + Int32 passwordIsDefined; + RINOK(getTextPassword->CryptoGetTextPassword2(&passwordIsDefined, &password)); + options.PasswordIsDefined = IntToBool(passwordIsDefined); + if (options.PasswordIsDefined) + { + options.IsAesMode = (m_ForceAesMode ? m_IsAesMode : thereAreAesUpdates); + options.AesKeyMode = m_AesKeyMode; + + if (!IsAsciiString((const wchar_t *)password)) + return E_INVALIDARG; + if (options.IsAesMode) + { + if (options.Password.Length() > NCrypto::NWzAes::kPasswordSizeMax) + return E_INVALIDARG; + } + options.Password = UnicodeStringToMultiByte((const wchar_t *)password, CP_OEMCP); + } + } + else + options.PasswordIsDefined = false; + + int level = m_Level; + if (level < 0) + level = 5; + + Byte mainMethod; + if (m_MainMethod < 0) + mainMethod = (Byte)(((level == 0) ? + NFileHeader::NCompressionMethod::kStored : + NFileHeader::NCompressionMethod::kDeflated)); + else + mainMethod = (Byte)m_MainMethod; + options.MethodSequence.Add(mainMethod); + if (mainMethod != NFileHeader::NCompressionMethod::kStored) + options.MethodSequence.Add(NFileHeader::NCompressionMethod::kStored); + bool isDeflate = (mainMethod == NFileHeader::NCompressionMethod::kDeflated) || + (mainMethod == NFileHeader::NCompressionMethod::kDeflated64); + bool isLZMA = (mainMethod == NFileHeader::NCompressionMethod::kLZMA); + bool isLz = (isLZMA || isDeflate); + options.NumPasses = m_NumPasses; + options.DicSize = m_DicSize; + options.NumFastBytes = m_NumFastBytes; + options.NumMatchFinderCycles = m_NumMatchFinderCycles; + options.NumMatchFinderCyclesDefined = m_NumMatchFinderCyclesDefined; + options.Algo = m_Algo; + options.MemSize = m_MemSize; + options.Order = m_Order; + #ifndef _7ZIP_ST + options.NumThreads = _numThreads; + #endif + if (isLz) + { + if (isDeflate) + { + if (options.NumPasses == 0xFFFFFFFF) + options.NumPasses = (level >= 9 ? kDeflateNumPassesX9 : + (level >= 7 ? kDeflateNumPassesX7 : + kDeflateNumPassesX1)); + if (options.NumFastBytes == 0xFFFFFFFF) + options.NumFastBytes = (level >= 9 ? kDeflateNumFastBytesX9 : + (level >= 7 ? kDeflateNumFastBytesX7 : + kDeflateNumFastBytesX1)); + } + else if (isLZMA) + { + if (options.DicSize == 0xFFFFFFFF) + options.DicSize = + (level >= 9 ? kLzmaDicSizeX9 : + (level >= 7 ? kLzmaDicSizeX7 : + (level >= 5 ? kLzmaDicSizeX5 : + (level >= 3 ? kLzmaDicSizeX3 : + kLzmaDicSizeX1)))); + + if (options.NumFastBytes == 0xFFFFFFFF) + options.NumFastBytes = (level >= 7 ? kLzmaNumFastBytesX7 : + kLzmaNumFastBytesX1); + + options.MatchFinder = + (level >= 5 ? kLzmaMatchFinderX5 : + kLzmaMatchFinderX1); + } + + if (options.Algo == 0xFFFFFFFF) + options.Algo = (level >= 5 ? kLzAlgoX5 : + kLzAlgoX1); + } + if (mainMethod == NFileHeader::NCompressionMethod::kBZip2) + { + if (options.NumPasses == 0xFFFFFFFF) + options.NumPasses = (level >= 9 ? kBZip2NumPassesX9 : + (level >= 7 ? kBZip2NumPassesX7 : + kBZip2NumPassesX1)); + if (options.DicSize == 0xFFFFFFFF) + options.DicSize = (level >= 5 ? kBZip2DicSizeX5 : + (level >= 3 ? kBZip2DicSizeX3 : + kBZip2DicSizeX1)); + } + if (mainMethod == NFileHeader::NCompressionMethod::kPPMd) + { + int level2 = level; + if (level2 < 1) level2 = 1; + if (level2 > 9) level2 = 9; + + if (options.MemSize == 0xFFFFFFFF) + options.MemSize = (1 << (19 + (level2 > 8 ? 8 : level2))); + + if (options.Order == 0xFFFFFFFF) + options.Order = 3 + level2; + + if (options.Algo == 0xFFFFFFFF) + options.Algo = (level2 >= 7 ? 1 : 0); + } + + return Update( + EXTERNAL_CODECS_VARS + m_Items, updateItems, outStream, + m_Archive.IsOpen() ? &m_Archive : NULL, &options, callback); + COM_TRY_END2 +} + +STDMETHODIMP CHandler::SetProperties(const wchar_t **names, const PROPVARIANT *values, Int32 numProperties) +{ + #ifndef _7ZIP_ST + const UInt32 numProcessors = NSystem::GetNumberOfProcessors(); + _numThreads = numProcessors; + #endif + InitMethodProperties(); + for (int i = 0; i < numProperties; i++) + { + UString name = UString(names[i]); + name.MakeUpper(); + if (name.IsEmpty()) + return E_INVALIDARG; + + const PROPVARIANT &prop = values[i]; + + if (name[0] == L'X') + { + UInt32 level = 9; + RINOK(ParsePropValue(name.Mid(1), prop, level)); + m_Level = level; + continue; + } + else if (name == L"M") + { + if (prop.vt == VT_BSTR) + { + UString m = prop.bstrVal; + m.MakeUpper(); + if (m == L"COPY") m_MainMethod = NFileHeader::NCompressionMethod::kStored; + else if (m == L"DEFLATE") m_MainMethod = NFileHeader::NCompressionMethod::kDeflated; + else if (m == L"DEFLATE64") m_MainMethod = NFileHeader::NCompressionMethod::kDeflated64; + else if (m == L"BZIP2") m_MainMethod = NFileHeader::NCompressionMethod::kBZip2; + else if (m == L"LZMA") m_MainMethod = NFileHeader::NCompressionMethod::kLZMA; + else if (m == L"PPMD") m_MainMethod = NFileHeader::NCompressionMethod::kPPMd; + else return E_INVALIDARG; + } + else if (prop.vt == VT_UI4) + { + switch(prop.ulVal) + { + case NFileHeader::NCompressionMethod::kStored: + case NFileHeader::NCompressionMethod::kDeflated: + case NFileHeader::NCompressionMethod::kDeflated64: + case NFileHeader::NCompressionMethod::kBZip2: + case NFileHeader::NCompressionMethod::kLZMA: + m_MainMethod = (Byte)prop.ulVal; + break; + default: + return E_INVALIDARG; + } + } + else + return E_INVALIDARG; + } + else if (name.Left(2) == L"EM") + { + if (prop.vt == VT_BSTR) + { + UString valueString = prop.bstrVal; + valueString.MakeUpper(); + if (valueString.Left(3) == L"AES") + { + valueString = valueString.Mid(3); + if (valueString == L"128") + m_AesKeyMode = 1; + else if (valueString == L"192") + m_AesKeyMode = 2; + else if (valueString == L"256" || valueString.IsEmpty()) + m_AesKeyMode = 3; + else + return E_INVALIDARG; + m_IsAesMode = true; + m_ForceAesMode = true; + } + else if (valueString == L"ZIPCRYPTO") + { + m_IsAesMode = false; + m_ForceAesMode = true; + } + else + return E_INVALIDARG; + } + else + return E_INVALIDARG; + } + else if (name[0] == L'D') + { + UInt32 dicSize = kBZip2DicSizeX5; + RINOK(ParsePropDictionaryValue(name.Mid(1), prop, dicSize)); + m_DicSize = dicSize; + } + else if (name.Left(3) == L"MEM") + { + UInt32 memSize = 1 << 24; + RINOK(ParsePropDictionaryValue(name.Mid(3), prop, memSize)); + m_MemSize = memSize; + } + else if (name[0] == L'O') + { + UInt32 order = 8; + RINOK(ParsePropValue(name.Mid(1), prop, order)); + m_Order = order; + } + else if (name.Left(4) == L"PASS") + { + UInt32 num = kDeflateNumPassesX9; + RINOK(ParsePropValue(name.Mid(4), prop, num)); + m_NumPasses = num; + } + else if (name.Left(2) == L"FB") + { + UInt32 num = kDeflateNumFastBytesX9; + RINOK(ParsePropValue(name.Mid(2), prop, num)); + m_NumFastBytes = num; + } + else if (name.Left(2) == L"MC") + { + UInt32 num = 0xFFFFFFFF; + RINOK(ParsePropValue(name.Mid(2), prop, num)); + m_NumMatchFinderCycles = num; + m_NumMatchFinderCyclesDefined = true; + } + else if (name.Left(2) == L"MT") + { + #ifndef _7ZIP_ST + RINOK(ParseMtProp(name.Mid(2), prop, numProcessors, _numThreads)); + #endif + } + else if (name.Left(1) == L"A") + { + UInt32 num = kLzAlgoX5; + RINOK(ParsePropValue(name.Mid(1), prop, num)); + m_Algo = num; + } + else if (name.CompareNoCase(L"TC") == 0) + { + RINOK(SetBoolProperty(m_WriteNtfsTimeExtra, prop)); + } + else if (name.CompareNoCase(L"CL") == 0) + { + RINOK(SetBoolProperty(m_ForceLocal, prop)); + if (m_ForceLocal) + m_ForceUtf8 = false; + } + else if (name.CompareNoCase(L"CU") == 0) + { + RINOK(SetBoolProperty(m_ForceUtf8, prop)); + if (m_ForceUtf8) + m_ForceLocal = false; + } + else + return E_INVALIDARG; + } + return S_OK; +} + +}} diff --git a/CPP/7zip/Archive/Zip/ZipHeader.cpp b/CPP/7zip/Archive/Zip/ZipHeader.cpp new file mode 100644 index 0000000..582187b --- /dev/null +++ b/CPP/7zip/Archive/Zip/ZipHeader.cpp @@ -0,0 +1,36 @@ +// Archive/Zip/Header.h + +#include "StdAfx.h" + +#include "ZipHeader.h" + +namespace NArchive { +namespace NZip { + +namespace NSignature +{ + UInt32 kLocalFileHeader = 0x04034B50 + 1; + UInt32 kDataDescriptor = 0x08074B50 + 1; + UInt32 kCentralFileHeader = 0x02014B50 + 1; + UInt32 kEndOfCentralDir = 0x06054B50 + 1; + UInt32 kZip64EndOfCentralDir = 0x06064B50 + 1; + UInt32 kZip64EndOfCentralDirLocator = 0x07064B50 + 1; + + class CMarkersInitializer + { + public: + CMarkersInitializer() + { + kLocalFileHeader--; + kDataDescriptor--; + kCentralFileHeader--; + kEndOfCentralDir--; + kZip64EndOfCentralDir--; + kZip64EndOfCentralDirLocator--; + } + }; + static CMarkersInitializer g_MarkerInitializer; +} + +}} + diff --git a/CPP/7zip/Archive/Zip/ZipHeader.h b/CPP/7zip/Archive/Zip/ZipHeader.h new file mode 100644 index 0000000..ce8c1e4 --- /dev/null +++ b/CPP/7zip/Archive/Zip/ZipHeader.h @@ -0,0 +1,284 @@ +// Archive/Zip/Header.h + +#ifndef __ARCHIVE_ZIP_HEADER_H +#define __ARCHIVE_ZIP_HEADER_H + +#include "Common/Types.h" + +namespace NArchive { +namespace NZip { + +namespace NSignature +{ + extern UInt32 kLocalFileHeader; + extern UInt32 kDataDescriptor; + extern UInt32 kCentralFileHeader; + extern UInt32 kEndOfCentralDir; + extern UInt32 kZip64EndOfCentralDir; + extern UInt32 kZip64EndOfCentralDirLocator; + + static const UInt32 kMarkerSize = 4; +} + +const UInt32 kEcdSize = 22; +const UInt32 kZip64EcdSize = 44; +const UInt32 kZip64EcdLocatorSize = 20; +/* +struct CEndOfCentralDirectoryRecord +{ + UInt16 ThisDiskNumber; + UInt16 StartCentralDirectoryDiskNumber; + UInt16 NumEntriesInCentaralDirectoryOnThisDisk; + UInt16 NumEntriesInCentaralDirectory; + UInt32 CentralDirectorySize; + UInt32 CentralDirectoryStartOffset; + UInt16 CommentSize; +}; + +struct CEndOfCentralDirectoryRecordFull +{ + UInt32 Signature; + CEndOfCentralDirectoryRecord Header; +}; +*/ + +namespace NFileHeader +{ + /* + struct CVersion + { + Byte Version; + Byte HostOS; + }; + */ + + namespace NCompressionMethod + { + enum EType + { + kStored = 0, + kShrunk = 1, + kReduced1 = 2, + kReduced2 = 3, + kReduced3 = 4, + kReduced4 = 5, + kImploded = 6, + kReservedTokenizing = 7, // reserved for tokenizing + kDeflated = 8, + kDeflated64 = 9, + kPKImploding = 10, + + kBZip2 = 12, + kLZMA = 14, + kTerse = 18, + kLz77 = 19, + kJpeg = 0x60, + kWavPack = 0x61, + kPPMd = 0x62, + kWzAES = 0x63 + }; + const int kNumCompressionMethods = 11; + const Byte kMadeByProgramVersion = 63; + + const Byte kExtractVersion_Default = 10; + const Byte kExtractVersion_Dir = 20; + const Byte kExtractVersion_ZipCrypto = 20; + const Byte kExtractVersion_Deflate = 20; + const Byte kExtractVersion_Deflate64 = 21; + const Byte kExtractVersion_Zip64 = 45; + const Byte kExtractVersion_BZip2 = 46; + const Byte kExtractVersion_Aes = 51; + const Byte kExtractVersion_LZMA = 63; + const Byte kExtractVersion_PPMd = 63; + + // const Byte kSupportedVersion = 20; + } + + namespace NExtraID + { + enum + { + kZip64 = 0x01, + kNTFS = 0x0A, + kStrongEncrypt = 0x17, + kUnixTime = 0x5455, + kWzAES = 0x9901 + }; + } + + namespace NNtfsExtra + { + const UInt16 kTagTime = 1; + enum + { + kMTime = 0, + kATime, + kCTime + }; + } + + namespace NUnixTime + { + enum + { + kMTime = 0, + kATime, + kCTime + }; + } + + const UInt32 kLocalBlockSize = 26; + /* + struct CLocalBlock + { + CVersion ExtractVersion; + + UInt16 Flags; + UInt16 CompressionMethod; + UInt32 Time; + UInt32 FileCRC; + UInt32 PackSize; + UInt32 UnPackSize; + UInt16 NameSize; + UInt16 ExtraSize; + }; + */ + + const UInt32 kDataDescriptorSize = 16; + // const UInt32 kDataDescriptor64Size = 16 + 8; + /* + struct CDataDescriptor + { + UInt32 Signature; + UInt32 FileCRC; + UInt32 PackSize; + UInt32 UnPackSize; + }; + + struct CLocalBlockFull + { + UInt32 Signature; + CLocalBlock Header; + }; + */ + + const UInt32 kCentralBlockSize = 42; + /* + struct CBlock + { + CVersion MadeByVersion; + CVersion ExtractVersion; + UInt16 Flags; + UInt16 CompressionMethod; + UInt32 Time; + UInt32 FileCRC; + UInt32 PackSize; + UInt32 UnPackSize; + UInt16 NameSize; + UInt16 ExtraSize; + UInt16 CommentSize; + UInt16 DiskNumberStart; + UInt16 InternalAttributes; + UInt32 ExternalAttributes; + UInt32 LocalHeaderOffset; + }; + + struct CBlockFull + { + UInt32 Signature; + CBlock Header; + }; + */ + + namespace NFlags + { + const int kEncrypted = 1 << 0; + const int kLzmaEOS = 1 << 1; + const int kDescriptorUsedMask = 1 << 3; + const int kStrongEncrypted = 1 << 6; + const int kUtf8 = 1 << 11; + + const int kImplodeDictionarySizeMask = 1 << 1; + const int kImplodeLiteralsOnMask = 1 << 2; + + const int kDeflateTypeBitStart = 1; + const int kNumDeflateTypeBits = 2; + const int kNumDeflateTypes = (1 << kNumDeflateTypeBits); + const int kDeflateTypeMask = (1 << kNumDeflateTypeBits) - 1; + } + + namespace NHostOS + { + enum EEnum + { + kFAT = 0, + kAMIGA = 1, + kVMS = 2, // VAX/VMS + kUnix = 3, + kVM_CMS = 4, + kAtari = 5, // what if it's a minix filesystem? [cjh] + kHPFS = 6, // filesystem used by OS/2 (and NT 3.x) + kMac = 7, + kZ_System = 8, + kCPM = 9, + kTOPS20 = 10, // pkzip 2.50 NTFS + kNTFS = 11, // filesystem used by Windows NT + kQDOS = 12, // SMS/QDOS + kAcorn = 13, // Archimedes Acorn RISC OS + kVFAT = 14, // filesystem used by Windows 95, NT + kMVS = 15, + kBeOS = 16, // hybrid POSIX/database filesystem + kTandem = 17, + kOS400 = 18, + kOSX = 19 + }; + } + namespace NUnixAttribute + { + const UInt32 kIFMT = 0170000; /* Unix file type mask */ + + const UInt32 kIFDIR = 0040000; /* Unix directory */ + const UInt32 kIFREG = 0100000; /* Unix regular file */ + const UInt32 kIFSOCK = 0140000; /* Unix socket (BSD, not SysV or Amiga) */ + const UInt32 kIFLNK = 0120000; /* Unix symbolic link (not SysV, Amiga) */ + const UInt32 kIFBLK = 0060000; /* Unix block special (not Amiga) */ + const UInt32 kIFCHR = 0020000; /* Unix character special (not Amiga) */ + const UInt32 kIFIFO = 0010000; /* Unix fifo (BCC, not MSC or Amiga) */ + + const UInt32 kISUID = 04000; /* Unix set user id on execution */ + const UInt32 kISGID = 02000; /* Unix set group id on execution */ + const UInt32 kISVTX = 01000; /* Unix directory permissions control */ + const UInt32 kENFMT = kISGID; /* Unix record locking enforcement flag */ + const UInt32 kIRWXU = 00700; /* Unix read, write, execute: owner */ + const UInt32 kIRUSR = 00400; /* Unix read permission: owner */ + const UInt32 kIWUSR = 00200; /* Unix write permission: owner */ + const UInt32 kIXUSR = 00100; /* Unix execute permission: owner */ + const UInt32 kIRWXG = 00070; /* Unix read, write, execute: group */ + const UInt32 kIRGRP = 00040; /* Unix read permission: group */ + const UInt32 kIWGRP = 00020; /* Unix write permission: group */ + const UInt32 kIXGRP = 00010; /* Unix execute permission: group */ + const UInt32 kIRWXO = 00007; /* Unix read, write, execute: other */ + const UInt32 kIROTH = 00004; /* Unix read permission: other */ + const UInt32 kIWOTH = 00002; /* Unix write permission: other */ + const UInt32 kIXOTH = 00001; /* Unix execute permission: other */ + } + + namespace NAmigaAttribute + { + const UInt32 kIFMT = 06000; /* Amiga file type mask */ + const UInt32 kIFDIR = 04000; /* Amiga directory */ + const UInt32 kIFREG = 02000; /* Amiga regular file */ + const UInt32 kIHIDDEN = 00200; /* to be supported in AmigaDOS 3.x */ + const UInt32 kISCRIPT = 00100; /* executable script (text command file) */ + const UInt32 kIPURE = 00040; /* allow loading into resident memory */ + const UInt32 kIARCHIVE = 00020; /* not modified since bit was last set */ + const UInt32 kIREAD = 00010; /* can be opened for reading */ + const UInt32 kIWRITE = 00004; /* can be opened for writing */ + const UInt32 kIEXECUTE = 00002; /* executable image, a loadable runfile */ + const UInt32 kIDELETE = 00001; /* can be deleted */ + } +} + +}} + +#endif diff --git a/CPP/7zip/Archive/Zip/ZipIn.cpp b/CPP/7zip/Archive/Zip/ZipIn.cpp new file mode 100644 index 0000000..b36b61b --- /dev/null +++ b/CPP/7zip/Archive/Zip/ZipIn.cpp @@ -0,0 +1,893 @@ +// Archive/ZipIn.cpp + +#include "StdAfx.h" + +#include "../../../../C/CpuArch.h" + +#include "Common/DynamicBuffer.h" + +#include "../../Common/LimitedStreams.h" +#include "../../Common/StreamUtils.h" + +#include "ZipIn.h" + +#define Get16(p) GetUi16(p) +#define Get32(p) GetUi32(p) +#define Get64(p) GetUi64(p) + +namespace NArchive { +namespace NZip { + +HRESULT CInArchive::Open(IInStream *stream, const UInt64 *searchHeaderSizeLimit) +{ + _inBufMode = false; + Close(); + RINOK(stream->Seek(0, STREAM_SEEK_CUR, &m_StreamStartPosition)); + m_Position = m_StreamStartPosition; + RINOK(FindAndReadMarker(stream, searchHeaderSizeLimit)); + RINOK(stream->Seek(m_Position, STREAM_SEEK_SET, NULL)); + m_Stream = stream; + return S_OK; +} + +void CInArchive::Close() +{ + _inBuffer.ReleaseStream(); + m_Stream.Release(); +} + +HRESULT CInArchive::Seek(UInt64 offset) +{ + return m_Stream->Seek(offset, STREAM_SEEK_SET, NULL); +} + +////////////////////////////////////// +// Markers + +static inline bool TestMarkerCandidate(const Byte *p, UInt32 &value) +{ + value = Get32(p); + return + (value == NSignature::kLocalFileHeader) || + (value == NSignature::kEndOfCentralDir); +} + +static const UInt32 kNumMarkerAddtionalBytes = 2; +static inline bool TestMarkerCandidate2(const Byte *p, UInt32 &value) +{ + value = Get32(p); + if (value == NSignature::kEndOfCentralDir) + return (Get16(p + 4) == 0); + return (value == NSignature::kLocalFileHeader && p[4] < 128); +} + +HRESULT CInArchive::FindAndReadMarker(IInStream *stream, const UInt64 *searchHeaderSizeLimit) +{ + ArcInfo.Clear(); + m_Position = m_StreamStartPosition; + + Byte marker[NSignature::kMarkerSize]; + RINOK(ReadStream_FALSE(stream, marker, NSignature::kMarkerSize)); + m_Position += NSignature::kMarkerSize; + if (TestMarkerCandidate(marker, m_Signature)) + return S_OK; + + CByteDynamicBuffer dynamicBuffer; + const UInt32 kSearchMarkerBufferSize = 0x10000; + dynamicBuffer.EnsureCapacity(kSearchMarkerBufferSize); + Byte *buffer = dynamicBuffer; + UInt32 numBytesPrev = NSignature::kMarkerSize - 1; + memcpy(buffer, marker + 1, numBytesPrev); + UInt64 curTestPos = m_StreamStartPosition + 1; + for (;;) + { + if (searchHeaderSizeLimit != NULL) + if (curTestPos - m_StreamStartPosition > *searchHeaderSizeLimit) + break; + size_t numReadBytes = kSearchMarkerBufferSize - numBytesPrev; + RINOK(ReadStream(stream, buffer + numBytesPrev, &numReadBytes)); + m_Position += numReadBytes; + UInt32 numBytesInBuffer = numBytesPrev + (UInt32)numReadBytes; + const UInt32 kMarker2Size = NSignature::kMarkerSize + kNumMarkerAddtionalBytes; + if (numBytesInBuffer < kMarker2Size) + break; + UInt32 numTests = numBytesInBuffer - kMarker2Size + 1; + for (UInt32 pos = 0; pos < numTests; pos++) + { + if (buffer[pos] != 0x50) + continue; + if (TestMarkerCandidate2(buffer + pos, m_Signature)) + { + curTestPos += pos; + ArcInfo.StartPosition = curTestPos; + m_Position = curTestPos + NSignature::kMarkerSize; + return S_OK; + } + } + curTestPos += numTests; + numBytesPrev = numBytesInBuffer - numTests; + memmove(buffer, buffer + numTests, numBytesPrev); + } + return S_FALSE; +} + +HRESULT CInArchive::ReadBytes(void *data, UInt32 size, UInt32 *processedSize) +{ + size_t realProcessedSize = size; + HRESULT result = S_OK; + if (_inBufMode) + { + try { realProcessedSize = _inBuffer.ReadBytes((Byte *)data, size); } + catch (const CInBufferException &e) { return e.ErrorCode; } + } + else + result = ReadStream(m_Stream, data, &realProcessedSize); + if (processedSize != NULL) + *processedSize = (UInt32)realProcessedSize; + m_Position += realProcessedSize; + return result; +} + +void CInArchive::Skip(UInt64 num) +{ + for (UInt64 i = 0; i < num; i++) + ReadByte(); +} + +void CInArchive::IncreaseRealPosition(UInt64 addValue) +{ + if (m_Stream->Seek(addValue, STREAM_SEEK_CUR, &m_Position) != S_OK) + throw CInArchiveException(CInArchiveException::kSeekStreamError); +} + +bool CInArchive::ReadBytesAndTestSize(void *data, UInt32 size) +{ + UInt32 realProcessedSize; + if (ReadBytes(data, size, &realProcessedSize) != S_OK) + throw CInArchiveException(CInArchiveException::kReadStreamError); + return (realProcessedSize == size); +} + +void CInArchive::SafeReadBytes(void *data, UInt32 size) +{ + if (!ReadBytesAndTestSize(data, size)) + throw CInArchiveException(CInArchiveException::kUnexpectedEndOfArchive); +} + +void CInArchive::ReadBuffer(CByteBuffer &buffer, UInt32 size) +{ + buffer.SetCapacity(size); + if (size > 0) + SafeReadBytes(buffer, size); +} + +Byte CInArchive::ReadByte() +{ + Byte b; + SafeReadBytes(&b, 1); + return b; +} + +UInt16 CInArchive::ReadUInt16() +{ + Byte buf[2]; + SafeReadBytes(buf, 2); + return Get16(buf); +} + +UInt32 CInArchive::ReadUInt32() +{ + Byte buf[4]; + SafeReadBytes(buf, 4); + return Get32(buf); +} + +UInt64 CInArchive::ReadUInt64() +{ + Byte buf[8]; + SafeReadBytes(buf, 8); + return Get64(buf); +} + +bool CInArchive::ReadUInt32(UInt32 &value) +{ + Byte buf[4]; + if (!ReadBytesAndTestSize(buf, 4)) + return false; + value = Get32(buf); + return true; +} + +void CInArchive::ReadFileName(UInt32 nameSize, AString &dest) +{ + if (nameSize == 0) + dest.Empty(); + char *p = dest.GetBuffer((int)nameSize); + SafeReadBytes(p, nameSize); + p[nameSize] = 0; + dest.ReleaseBuffer(); +} + +void CInArchive::ReadExtra(UInt32 extraSize, CExtraBlock &extraBlock, + UInt64 &unpackSize, UInt64 &packSize, UInt64 &localHeaderOffset, UInt32 &diskStartNumber) +{ + extraBlock.Clear(); + UInt32 remain = extraSize; + while(remain >= 4) + { + CExtraSubBlock subBlock; + subBlock.ID = ReadUInt16(); + UInt32 dataSize = ReadUInt16(); + remain -= 4; + if (dataSize > remain) // it's bug + dataSize = remain; + if (subBlock.ID == NFileHeader::NExtraID::kZip64) + { + if (unpackSize == 0xFFFFFFFF) + { + if (dataSize < 8) + break; + unpackSize = ReadUInt64(); + remain -= 8; + dataSize -= 8; + } + if (packSize == 0xFFFFFFFF) + { + if (dataSize < 8) + break; + packSize = ReadUInt64(); + remain -= 8; + dataSize -= 8; + } + if (localHeaderOffset == 0xFFFFFFFF) + { + if (dataSize < 8) + break; + localHeaderOffset = ReadUInt64(); + remain -= 8; + dataSize -= 8; + } + if (diskStartNumber == 0xFFFF) + { + if (dataSize < 4) + break; + diskStartNumber = ReadUInt32(); + remain -= 4; + dataSize -= 4; + } + for (UInt32 i = 0; i < dataSize; i++) + ReadByte(); + } + else + { + ReadBuffer(subBlock.Data, dataSize); + extraBlock.SubBlocks.Add(subBlock); + } + remain -= dataSize; + } + Skip(remain); +} + +HRESULT CInArchive::ReadLocalItem(CItemEx &item) +{ + const int kBufSize = 26; + Byte p[kBufSize]; + SafeReadBytes(p, kBufSize); + + item.ExtractVersion.Version = p[0]; + item.ExtractVersion.HostOS = p[1]; + item.Flags = Get16(p + 2); + item.CompressionMethod = Get16(p + 4); + item.Time = Get32(p + 6); + item.FileCRC = Get32(p + 10); + item.PackSize = Get32(p + 14); + item.UnPackSize = Get32(p + 18); + UInt32 fileNameSize = Get16(p + 22); + item.LocalExtraSize = Get16(p + 24); + ReadFileName(fileNameSize, item.Name); + item.FileHeaderWithNameSize = 4 + NFileHeader::kLocalBlockSize + fileNameSize; + if (item.LocalExtraSize > 0) + { + UInt64 localHeaderOffset = 0; + UInt32 diskStartNumber = 0; + ReadExtra(item.LocalExtraSize, item.LocalExtra, item.UnPackSize, item.PackSize, + localHeaderOffset, diskStartNumber); + } + /* + if (item.IsDir()) + item.UnPackSize = 0; // check It + */ + return S_OK; +} + +static bool FlagsAreSame(CItem &i1, CItem &i2) +{ + if (i1.CompressionMethod != i2.CompressionMethod) + return false; + // i1.Time + + if (i1.Flags == i2.Flags) + return true; + UInt32 mask = 0xFFFF; + switch(i1.CompressionMethod) + { + case NFileHeader::NCompressionMethod::kDeflated: + mask = 0x7FF9; + break; + default: + if (i1.CompressionMethod <= NFileHeader::NCompressionMethod::kImploded) + mask = 0x7FFF; + } + return ((i1.Flags & mask) == (i2.Flags & mask)); +} + +HRESULT CInArchive::ReadLocalItemAfterCdItem(CItemEx &item) +{ + if (item.FromLocal) + return S_OK; + try + { + RINOK(Seek(ArcInfo.Base + item.LocalHeaderPosition)); + CItemEx localItem; + if (ReadUInt32() != NSignature::kLocalFileHeader) + return S_FALSE; + RINOK(ReadLocalItem(localItem)); + if (!FlagsAreSame(item, localItem)) + return S_FALSE; + + if ((!localItem.HasDescriptor() && + ( + item.FileCRC != localItem.FileCRC || + item.PackSize != localItem.PackSize || + item.UnPackSize != localItem.UnPackSize + ) + ) || + item.Name.Length() != localItem.Name.Length() + ) + return S_FALSE; + item.FileHeaderWithNameSize = localItem.FileHeaderWithNameSize; + item.LocalExtraSize = localItem.LocalExtraSize; + item.LocalExtra = localItem.LocalExtra; + item.FromLocal = true; + } + catch(...) { return S_FALSE; } + return S_OK; +} + +HRESULT CInArchive::ReadLocalItemDescriptor(CItemEx &item) +{ + if (item.HasDescriptor()) + { + const int kBufferSize = (1 << 12); + Byte buffer[kBufferSize]; + + UInt32 numBytesInBuffer = 0; + UInt32 packedSize = 0; + + bool descriptorWasFound = false; + for (;;) + { + UInt32 processedSize; + RINOK(ReadBytes(buffer + numBytesInBuffer, kBufferSize - numBytesInBuffer, &processedSize)); + numBytesInBuffer += processedSize; + if (numBytesInBuffer < NFileHeader::kDataDescriptorSize) + return S_FALSE; + UInt32 i; + for (i = 0; i <= numBytesInBuffer - NFileHeader::kDataDescriptorSize; i++) + { + // descriptorSignature field is Info-ZIP's extension + // to Zip specification. + UInt32 descriptorSignature = Get32(buffer + i); + + // !!!! It must be fixed for Zip64 archives + UInt32 descriptorPackSize = Get32(buffer + i + 8); + if (descriptorSignature== NSignature::kDataDescriptor && descriptorPackSize == packedSize + i) + { + descriptorWasFound = true; + item.FileCRC = Get32(buffer + i + 4); + item.PackSize = descriptorPackSize; + item.UnPackSize = Get32(buffer + i + 12); + IncreaseRealPosition(Int64(Int32(0 - (numBytesInBuffer - i - NFileHeader::kDataDescriptorSize)))); + break; + } + } + if (descriptorWasFound) + break; + packedSize += i; + int j; + for (j = 0; i < numBytesInBuffer; i++, j++) + buffer[j] = buffer[i]; + numBytesInBuffer = j; + } + } + else + IncreaseRealPosition(item.PackSize); + return S_OK; +} + +HRESULT CInArchive::ReadLocalItemAfterCdItemFull(CItemEx &item) +{ + if (item.FromLocal) + return S_OK; + try + { + RINOK(ReadLocalItemAfterCdItem(item)); + if (item.HasDescriptor()) + { + RINOK(Seek(ArcInfo.Base + item.GetDataPosition() + item.PackSize)); + if (ReadUInt32() != NSignature::kDataDescriptor) + return S_FALSE; + UInt32 crc = ReadUInt32(); + UInt64 packSize, unpackSize; + + /* + if (IsZip64) + { + packSize = ReadUInt64(); + unpackSize = ReadUInt64(); + } + else + */ + { + packSize = ReadUInt32(); + unpackSize = ReadUInt32(); + } + + if (crc != item.FileCRC || item.PackSize != packSize || item.UnPackSize != unpackSize) + return S_FALSE; + } + } + catch(...) { return S_FALSE; } + return S_OK; +} + +HRESULT CInArchive::ReadCdItem(CItemEx &item) +{ + item.FromCentral = true; + const int kBufSize = 42; + Byte p[kBufSize]; + SafeReadBytes(p, kBufSize); + item.MadeByVersion.Version = p[0]; + item.MadeByVersion.HostOS = p[1]; + item.ExtractVersion.Version = p[2]; + item.ExtractVersion.HostOS = p[3]; + item.Flags = Get16(p + 4); + item.CompressionMethod = Get16(p + 6); + item.Time = Get32(p + 8); + item.FileCRC = Get32(p + 12); + item.PackSize = Get32(p + 16); + item.UnPackSize = Get32(p + 20); + UInt16 headerNameSize = Get16(p + 24); + UInt16 headerExtraSize = Get16(p + 26); + UInt16 headerCommentSize = Get16(p + 28); + UInt32 headerDiskNumberStart = Get16(p + 30); + item.InternalAttributes = Get16(p + 32); + item.ExternalAttributes = Get32(p + 34); + item.LocalHeaderPosition = Get32(p + 38); + ReadFileName(headerNameSize, item.Name); + + if (headerExtraSize > 0) + { + ReadExtra(headerExtraSize, item.CentralExtra, item.UnPackSize, item.PackSize, + item.LocalHeaderPosition, headerDiskNumberStart); + } + + if (headerDiskNumberStart != 0) + throw CInArchiveException(CInArchiveException::kMultiVolumeArchiveAreNotSupported); + + // May be these strings must be deleted + /* + if (item.IsDir()) + item.UnPackSize = 0; + */ + + ReadBuffer(item.Comment, headerCommentSize); + return S_OK; +} + +HRESULT CInArchive::TryEcd64(UInt64 offset, CCdInfo &cdInfo) +{ + RINOK(Seek(offset)); + const UInt32 kEcd64Size = 56; + Byte buf[kEcd64Size]; + if (!ReadBytesAndTestSize(buf, kEcd64Size)) + return S_FALSE; + if (Get32(buf) != NSignature::kZip64EndOfCentralDir) + return S_FALSE; + // cdInfo.NumEntries = Get64(buf + 24); + cdInfo.Size = Get64(buf + 40); + cdInfo.Offset = Get64(buf + 48); + return S_OK; +} + +HRESULT CInArchive::FindCd(CCdInfo &cdInfo) +{ + UInt64 endPosition; + RINOK(m_Stream->Seek(0, STREAM_SEEK_END, &endPosition)); + const UInt32 kBufSizeMax = (1 << 16) + kEcdSize + kZip64EcdLocatorSize; + CByteBuffer byteBuffer; + byteBuffer.SetCapacity(kBufSizeMax); + Byte *buf = byteBuffer; + UInt32 bufSize = (endPosition < kBufSizeMax) ? (UInt32)endPosition : kBufSizeMax; + if (bufSize < kEcdSize) + return S_FALSE; + UInt64 startPosition = endPosition - bufSize; + RINOK(m_Stream->Seek(startPosition, STREAM_SEEK_SET, &m_Position)); + if (m_Position != startPosition) + return S_FALSE; + if (!ReadBytesAndTestSize(buf, bufSize)) + return S_FALSE; + for (int i = (int)(bufSize - kEcdSize); i >= 0; i--) + { + if (Get32(buf + i) == NSignature::kEndOfCentralDir) + { + if (i >= kZip64EcdLocatorSize) + { + const Byte *locator = buf + i - kZip64EcdLocatorSize; + if (Get32(locator) == NSignature::kZip64EndOfCentralDirLocator) + { + UInt64 ecd64Offset = Get64(locator + 8); + if (TryEcd64(ecd64Offset, cdInfo) == S_OK) + return S_OK; + if (TryEcd64(ArcInfo.StartPosition + ecd64Offset, cdInfo) == S_OK) + { + ArcInfo.Base = ArcInfo.StartPosition; + return S_OK; + } + } + } + if (Get32(buf + i + 4) == 0) + { + // cdInfo.NumEntries = GetUInt16(buf + i + 10); + cdInfo.Size = Get32(buf + i + 12); + cdInfo.Offset = Get32(buf + i + 16); + UInt64 curPos = endPosition - bufSize + i; + UInt64 cdEnd = cdInfo.Size + cdInfo.Offset; + if (curPos != cdEnd) + { + /* + if (cdInfo.Offset <= 16 && cdInfo.Size != 0) + { + // here we support some rare ZIP files with Central directory at the start + ArcInfo.Base = 0; + } + else + */ + ArcInfo.Base = curPos - cdEnd; + } + return S_OK; + } + } + } + return S_FALSE; +} + +HRESULT CInArchive::TryReadCd(CObjectVector &items, UInt64 cdOffset, UInt64 cdSize, CProgressVirt *progress) +{ + items.Clear(); + RINOK(m_Stream->Seek(cdOffset, STREAM_SEEK_SET, &m_Position)); + if (m_Position != cdOffset) + return S_FALSE; + + if (!_inBuffer.Create(1 << 15)) + return E_OUTOFMEMORY; + _inBuffer.SetStream(m_Stream); + _inBuffer.Init(); + _inBufMode = true; + + while(m_Position - cdOffset < cdSize) + { + if (ReadUInt32() != NSignature::kCentralFileHeader) + return S_FALSE; + CItemEx cdItem; + RINOK(ReadCdItem(cdItem)); + items.Add(cdItem); + if (progress && items.Size() % 1000 == 0) + RINOK(progress->SetCompleted(items.Size())); + } + return (m_Position - cdOffset == cdSize) ? S_OK : S_FALSE; +} + +HRESULT CInArchive::ReadCd(CObjectVector &items, UInt64 &cdOffset, UInt64 &cdSize, CProgressVirt *progress) +{ + ArcInfo.Base = 0; + CCdInfo cdInfo; + RINOK(FindCd(cdInfo)); + HRESULT res = S_FALSE; + cdSize = cdInfo.Size; + cdOffset = cdInfo.Offset; + res = TryReadCd(items, ArcInfo.Base + cdOffset, cdSize, progress); + if (res == S_FALSE && ArcInfo.Base == 0) + { + res = TryReadCd(items, cdInfo.Offset + ArcInfo.StartPosition, cdSize, progress); + if (res == S_OK) + ArcInfo.Base = ArcInfo.StartPosition; + } + if (!ReadUInt32(m_Signature)) + return S_FALSE; + return res; +} + +HRESULT CInArchive::ReadLocalsAndCd(CObjectVector &items, CProgressVirt *progress, UInt64 &cdOffset, int &numCdItems) +{ + items.Clear(); + numCdItems = 0; + while (m_Signature == NSignature::kLocalFileHeader) + { + // FSeek points to next byte after signature + // NFileHeader::CLocalBlock localHeader; + CItemEx item; + item.LocalHeaderPosition = m_Position - m_StreamStartPosition - 4; // points to signature; + RINOK(ReadLocalItem(item)); + item.FromLocal = true; + ReadLocalItemDescriptor(item); + items.Add(item); + if (progress && items.Size() % 100 == 0) + RINOK(progress->SetCompleted(items.Size())); + if (!ReadUInt32(m_Signature)) + break; + } + cdOffset = m_Position - 4; + int i; + for (i = 0; i < items.Size(); i++, numCdItems++) + { + if (progress && i % 1000 == 0) + RINOK(progress->SetCompleted(items.Size())); + if (m_Signature == NSignature::kEndOfCentralDir) + break; + + if (m_Signature != NSignature::kCentralFileHeader) + return S_FALSE; + + CItemEx cdItem; + RINOK(ReadCdItem(cdItem)); + + if (i == 0) + { + int j; + for (j = 0; j < items.Size(); j++) + { + CItemEx &item = items[j]; + if (item.Name == cdItem.Name) + { + ArcInfo.Base = item.LocalHeaderPosition - cdItem.LocalHeaderPosition; + break; + } + } + if (j == items.Size()) + return S_FALSE; + } + + int index; + int left = 0, right = items.Size(); + for (;;) + { + if (left >= right) + return S_FALSE; + index = (left + right) / 2; + UInt64 position = items[index].LocalHeaderPosition - ArcInfo.Base; + if (cdItem.LocalHeaderPosition == position) + break; + if (cdItem.LocalHeaderPosition < position) + right = index; + else + left = index + 1; + } + CItemEx &item = items[index]; + // item.LocalHeaderPosition = cdItem.LocalHeaderPosition; + item.MadeByVersion = cdItem.MadeByVersion; + item.CentralExtra = cdItem.CentralExtra; + + if ( + // item.ExtractVersion != cdItem.ExtractVersion || + !FlagsAreSame(item, cdItem) || + item.FileCRC != cdItem.FileCRC) + return S_FALSE; + + if (item.Name.Length() != cdItem.Name.Length() || + item.PackSize != cdItem.PackSize || + item.UnPackSize != cdItem.UnPackSize + ) + return S_FALSE; + item.Name = cdItem.Name; + item.InternalAttributes = cdItem.InternalAttributes; + item.ExternalAttributes = cdItem.ExternalAttributes; + item.Comment = cdItem.Comment; + item.FromCentral = cdItem.FromCentral; + if (!ReadUInt32(m_Signature)) + return S_FALSE; + } + for (i = 0; i < items.Size(); i++) + items[i].LocalHeaderPosition -= ArcInfo.Base; + return S_OK; +} + +struct CEcd +{ + UInt16 thisDiskNumber; + UInt16 startCDDiskNumber; + UInt16 numEntriesInCDOnThisDisk; + UInt16 numEntriesInCD; + UInt32 cdSize; + UInt32 cdStartOffset; + UInt16 commentSize; + void Parse(const Byte *p); +}; + +void CEcd::Parse(const Byte *p) +{ + thisDiskNumber = Get16(p); + startCDDiskNumber = Get16(p + 2); + numEntriesInCDOnThisDisk = Get16(p + 4); + numEntriesInCD = Get16(p + 6); + cdSize = Get32(p + 8); + cdStartOffset = Get32(p + 12); + commentSize = Get16(p + 16); +} + +struct CEcd64 +{ + UInt16 versionMade; + UInt16 versionNeedExtract; + UInt32 thisDiskNumber; + UInt32 startCDDiskNumber; + UInt64 numEntriesInCDOnThisDisk; + UInt64 numEntriesInCD; + UInt64 cdSize; + UInt64 cdStartOffset; + void Parse(const Byte *p); + CEcd64() { memset(this, 0, sizeof(*this)); } +}; + +void CEcd64::Parse(const Byte *p) +{ + versionMade = Get16(p); + versionNeedExtract = Get16(p + 2); + thisDiskNumber = Get32(p + 4); + startCDDiskNumber = Get32(p + 8); + numEntriesInCDOnThisDisk = Get64(p + 12); + numEntriesInCD = Get64(p + 20); + cdSize = Get64(p + 28); + cdStartOffset = Get64(p + 36); +} + +#define COPY_ECD_ITEM_16(n) if (!isZip64 || ecd. n != 0xFFFF) ecd64. n = ecd. n; +#define COPY_ECD_ITEM_32(n) if (!isZip64 || ecd. n != 0xFFFFFFFF) ecd64. n = ecd. n; + +HRESULT CInArchive::ReadHeaders(CObjectVector &items, CProgressVirt *progress) +{ + // m_Signature must be kLocalFileHeaderSignature or + // kEndOfCentralDirSignature + // m_Position points to next byte after signature + + IsZip64 = false; + items.Clear(); + + UInt64 cdSize, cdStartOffset; + HRESULT res; + try + { + res = ReadCd(items, cdStartOffset, cdSize, progress); + } + catch(CInArchiveException &) + { + res = S_FALSE; + } + if (res != S_FALSE && res != S_OK) + return res; + + /* + if (res != S_OK) + return res; + res = S_FALSE; + */ + + int numCdItems = items.Size(); + if (res == S_FALSE) + { + _inBufMode = false; + ArcInfo.Base = 0; + RINOK(m_Stream->Seek(ArcInfo.StartPosition, STREAM_SEEK_SET, &m_Position)); + if (m_Position != ArcInfo.StartPosition) + return S_FALSE; + if (!ReadUInt32(m_Signature)) + return S_FALSE; + RINOK(ReadLocalsAndCd(items, progress, cdStartOffset, numCdItems)); + cdSize = (m_Position - 4) - cdStartOffset; + cdStartOffset -= ArcInfo.Base; + } + + CEcd64 ecd64; + bool isZip64 = false; + UInt64 zip64EcdStartOffset = m_Position - 4 - ArcInfo.Base; + if (m_Signature == NSignature::kZip64EndOfCentralDir) + { + IsZip64 = isZip64 = true; + UInt64 recordSize = ReadUInt64(); + + const int kBufSize = kZip64EcdSize; + Byte buf[kBufSize]; + SafeReadBytes(buf, kBufSize); + ecd64.Parse(buf); + + Skip(recordSize - kZip64EcdSize); + if (!ReadUInt32(m_Signature)) + return S_FALSE; + if (ecd64.thisDiskNumber != 0 || ecd64.startCDDiskNumber != 0) + throw CInArchiveException(CInArchiveException::kMultiVolumeArchiveAreNotSupported); + if (ecd64.numEntriesInCDOnThisDisk != numCdItems || + ecd64.numEntriesInCD != numCdItems || + ecd64.cdSize != cdSize || + (ecd64.cdStartOffset != cdStartOffset && + (!items.IsEmpty()))) + return S_FALSE; + } + if (m_Signature == NSignature::kZip64EndOfCentralDirLocator) + { + /* UInt32 startEndCDDiskNumber = */ ReadUInt32(); + UInt64 endCDStartOffset = ReadUInt64(); + /* UInt32 numberOfDisks = */ ReadUInt32(); + if (zip64EcdStartOffset != endCDStartOffset) + return S_FALSE; + if (!ReadUInt32(m_Signature)) + return S_FALSE; + } + if (m_Signature != NSignature::kEndOfCentralDir) + return S_FALSE; + + const int kBufSize = kEcdSize - 4; + Byte buf[kBufSize]; + SafeReadBytes(buf, kBufSize); + CEcd ecd; + ecd.Parse(buf); + + COPY_ECD_ITEM_16(thisDiskNumber); + COPY_ECD_ITEM_16(startCDDiskNumber); + COPY_ECD_ITEM_16(numEntriesInCDOnThisDisk); + COPY_ECD_ITEM_16(numEntriesInCD); + COPY_ECD_ITEM_32(cdSize); + COPY_ECD_ITEM_32(cdStartOffset); + + ReadBuffer(ArcInfo.Comment, ecd.commentSize); + + if (ecd64.thisDiskNumber != 0 || ecd64.startCDDiskNumber != 0) + throw CInArchiveException(CInArchiveException::kMultiVolumeArchiveAreNotSupported); + if ((UInt16)ecd64.numEntriesInCDOnThisDisk != ((UInt16)numCdItems) || + (UInt16)ecd64.numEntriesInCD != ((UInt16)numCdItems) || + (UInt32)ecd64.cdSize != (UInt32)cdSize || + ((UInt32)(ecd64.cdStartOffset) != (UInt32)cdStartOffset && + (!items.IsEmpty()))) + return S_FALSE; + + _inBufMode = false; + _inBuffer.Free(); + IsOkHeaders = (numCdItems == items.Size()); + ArcInfo.FinishPosition = m_Position; + return S_OK; +} + +ISequentialInStream* CInArchive::CreateLimitedStream(UInt64 position, UInt64 size) +{ + CLimitedSequentialInStream *streamSpec = new CLimitedSequentialInStream; + CMyComPtr stream(streamSpec); + SeekInArchive(ArcInfo.Base + position); + streamSpec->SetStream(m_Stream); + streamSpec->Init(size); + return stream.Detach(); +} + +IInStream* CInArchive::CreateStream() +{ + CMyComPtr stream = m_Stream; + return stream.Detach(); +} + +bool CInArchive::SeekInArchive(UInt64 position) +{ + UInt64 newPosition; + if (m_Stream->Seek(position, STREAM_SEEK_SET, &newPosition) != S_OK) + return false; + return (newPosition == position); +} + +}} diff --git a/CPP/7zip/Archive/Zip/ZipIn.h b/CPP/7zip/Archive/Zip/ZipIn.h new file mode 100644 index 0000000..0565339 --- /dev/null +++ b/CPP/7zip/Archive/Zip/ZipIn.h @@ -0,0 +1,125 @@ +// Archive/ZipIn.h + +#ifndef __ZIP_IN_H +#define __ZIP_IN_H + +#include "Common/MyCom.h" + +#include "../../IStream.h" + +#include "../../Common/InBuffer.h" + +#include "ZipHeader.h" +#include "ZipItemEx.h" + +namespace NArchive { +namespace NZip { + +class CInArchiveException +{ +public: + enum ECauseType + { + kUnexpectedEndOfArchive = 0, + kArchiceHeaderCRCError, + kFileHeaderCRCError, + kIncorrectArchive, + kDataDescroptorsAreNotSupported, + kMultiVolumeArchiveAreNotSupported, + kReadStreamError, + kSeekStreamError + } + Cause; + CInArchiveException(ECauseType cause): Cause(cause) {} +}; + +class CInArchiveInfo +{ +public: + UInt64 Base; + UInt64 StartPosition; + UInt64 FinishPosition; + CByteBuffer Comment; + + CInArchiveInfo(): Base(0), StartPosition(0) {} + UInt64 GetPhySize() const { return FinishPosition - StartPosition; } + void Clear() + { + Base = 0; + StartPosition = 0; + Comment.SetCapacity(0); + } +}; + +class CProgressVirt +{ +public: + STDMETHOD(SetTotal)(UInt64 numFiles) PURE; + STDMETHOD(SetCompleted)(UInt64 numFiles) PURE; +}; + +struct CCdInfo +{ + // UInt64 NumEntries; + UInt64 Size; + UInt64 Offset; +}; + +class CInArchive +{ + CMyComPtr m_Stream; + UInt32 m_Signature; + UInt64 m_StreamStartPosition; + UInt64 m_Position; + + bool _inBufMode; + CInBuffer _inBuffer; + + HRESULT Seek(UInt64 offset); + + HRESULT FindAndReadMarker(IInStream *stream, const UInt64 *searchHeaderSizeLimit); + void ReadFileName(UInt32 nameSize, AString &dest); + + HRESULT ReadBytes(void *data, UInt32 size, UInt32 *processedSize); + bool ReadBytesAndTestSize(void *data, UInt32 size); + void SafeReadBytes(void *data, UInt32 size); + void ReadBuffer(CByteBuffer &buffer, UInt32 size); + Byte ReadByte(); + UInt16 ReadUInt16(); + UInt32 ReadUInt32(); + UInt64 ReadUInt64(); + bool ReadUInt32(UInt32 &signature); + + void Skip(UInt64 num); + void IncreaseRealPosition(UInt64 addValue); + + void ReadExtra(UInt32 extraSize, CExtraBlock &extraBlock, + UInt64 &unpackSize, UInt64 &packSize, UInt64 &localHeaderOffset, UInt32 &diskStartNumber); + HRESULT ReadLocalItem(CItemEx &item); + HRESULT ReadLocalItemDescriptor(CItemEx &item); + HRESULT ReadCdItem(CItemEx &item); + HRESULT TryEcd64(UInt64 offset, CCdInfo &cdInfo); + HRESULT FindCd(CCdInfo &cdInfo); + HRESULT TryReadCd(CObjectVector &items, UInt64 cdOffset, UInt64 cdSize, CProgressVirt *progress); + HRESULT ReadCd(CObjectVector &items, UInt64 &cdOffset, UInt64 &cdSize, CProgressVirt *progress); + HRESULT ReadLocalsAndCd(CObjectVector &items, CProgressVirt *progress, UInt64 &cdOffset, int &numCdItems); +public: + CInArchiveInfo ArcInfo; + bool IsZip64; + bool IsOkHeaders; + + HRESULT ReadHeaders(CObjectVector &items, CProgressVirt *progress); + HRESULT ReadLocalItemAfterCdItem(CItemEx &item); + HRESULT ReadLocalItemAfterCdItemFull(CItemEx &item); + HRESULT Open(IInStream *stream, const UInt64 *searchHeaderSizeLimit); + void Close(); + bool SeekInArchive(UInt64 position); + ISequentialInStream *CreateLimitedStream(UInt64 position, UInt64 size); + IInStream* CreateStream(); + + bool IsOpen() const { return m_Stream != NULL; } +}; + +}} + +#endif diff --git a/CPP/7zip/Archive/Zip/ZipItem.cpp b/CPP/7zip/Archive/Zip/ZipItem.cpp new file mode 100644 index 0000000..4dd58f7 --- /dev/null +++ b/CPP/7zip/Archive/Zip/ZipItem.cpp @@ -0,0 +1,181 @@ +// Archive/ZipItem.cpp + +#include "StdAfx.h" + +#include "ZipHeader.h" +#include "ZipItem.h" +#include "../Common/ItemNameUtils.h" +#include "../../../../C/CpuArch.h" + +namespace NArchive { +namespace NZip { + +bool operator==(const CVersion &v1, const CVersion &v2) +{ + return (v1.Version == v2.Version) && (v1.HostOS == v2.HostOS); +} + +bool operator!=(const CVersion &v1, const CVersion &v2) +{ + return !(v1 == v2); +} + +bool CExtraSubBlock::ExtractNtfsTime(int index, FILETIME &ft) const +{ + ft.dwHighDateTime = ft.dwLowDateTime = 0; + UInt32 size = (UInt32)Data.GetCapacity(); + if (ID != NFileHeader::NExtraID::kNTFS || size < 32) + return false; + const Byte *p = (const Byte *)Data; + p += 4; // for reserved + size -= 4; + while (size > 4) + { + UInt16 tag = GetUi16(p); + UInt32 attrSize = GetUi16(p + 2); + p += 4; + size -= 4; + if (attrSize > size) + attrSize = size; + + if (tag == NFileHeader::NNtfsExtra::kTagTime && attrSize >= 24) + { + p += 8 * index; + ft.dwLowDateTime = GetUi32(p); + ft.dwHighDateTime = GetUi32(p + 4); + return true; + } + p += attrSize; + size -= attrSize; + } + return false; +} + +bool CExtraSubBlock::ExtractUnixTime(int index, UInt32 &res) const +{ + res = 0; + UInt32 size = (UInt32)Data.GetCapacity(); + if (ID != NFileHeader::NExtraID::kUnixTime || size < 5) + return false; + const Byte *p = (const Byte *)Data; + Byte flags = *p++; + size--; + for (int i = 0; i < 3; i++) + if ((flags & (1 << i)) != 0) + { + if (size < 4) + return false; + if (index == i) + { + res = GetUi32(p); + return true; + } + p += 4; + size -= 4; + } + return false; +} + +bool CLocalItem::IsDir() const +{ + return NItemName::HasTailSlash(Name, GetCodePage()); +} + +bool CItem::IsDir() const +{ + if (NItemName::HasTailSlash(Name, GetCodePage())) + return true; + if (!FromCentral) + return false; + WORD highAttributes = WORD((ExternalAttributes >> 16 ) & 0xFFFF); + switch(MadeByVersion.HostOS) + { + case NFileHeader::NHostOS::kAMIGA: + switch (highAttributes & NFileHeader::NAmigaAttribute::kIFMT) + { + case NFileHeader::NAmigaAttribute::kIFDIR: return true; + case NFileHeader::NAmigaAttribute::kIFREG: return false; + default: return false; // change it throw kUnknownAttributes; + } + case NFileHeader::NHostOS::kFAT: + case NFileHeader::NHostOS::kNTFS: + case NFileHeader::NHostOS::kHPFS: + case NFileHeader::NHostOS::kVFAT: + return ((ExternalAttributes & FILE_ATTRIBUTE_DIRECTORY) != 0); + case NFileHeader::NHostOS::kAtari: + case NFileHeader::NHostOS::kMac: + case NFileHeader::NHostOS::kVMS: + case NFileHeader::NHostOS::kVM_CMS: + case NFileHeader::NHostOS::kAcorn: + case NFileHeader::NHostOS::kMVS: + return false; // change it throw kUnknownAttributes; + default: + /* + switch (highAttributes & NFileHeader::NUnixAttribute::kIFMT) + { + case NFileHeader::NUnixAttribute::kIFDIR: + return true; + default: + return false; + } + */ + return false; + } +} + +#ifndef FILE_ATTRIBUTE_UNIX_EXTENSION +UInt32 CLocalItem::GetWinAttributes() const +{ + DWORD winAttributes = 0; + if (IsDir()) + winAttributes |= FILE_ATTRIBUTE_DIRECTORY; + return winAttributes; +} +#endif + +UInt32 CItem::GetWinAttributes() const +{ + DWORD winAttributes = 0; + switch(MadeByVersion.HostOS) + { + case NFileHeader::NHostOS::kFAT: + case NFileHeader::NHostOS::kNTFS: + if (FromCentral) + winAttributes = ExternalAttributes; + break; +#ifdef FILE_ATTRIBUTE_UNIX_EXTENSION + case NFileHeader::NHostOS::kUnix: + winAttributes = (ExternalAttributes & 0xFFFF0000) | FILE_ATTRIBUTE_UNIX_EXTENSION; + if (winAttributes & (NFileHeader::NUnixAttribute::kIFDIR << 16)) + winAttributes |= FILE_ATTRIBUTE_DIRECTORY; + return winAttributes; +#endif + default: + winAttributes = 0; // must be converted from unix value; + } + if (IsDir()) // test it; + winAttributes |= FILE_ATTRIBUTE_DIRECTORY; + return winAttributes; +} + +void CLocalItem::SetFlagBits(int startBitNumber, int numBits, int value) +{ + UInt16 mask = (UInt16)(((1 << numBits) - 1) << startBitNumber); + Flags &= ~mask; + Flags |= value << startBitNumber; +} + +void CLocalItem::SetBitMask(int bitMask, bool enable) +{ + if(enable) + Flags |= bitMask; + else + Flags &= ~bitMask; +} + +void CLocalItem::SetEncrypted(bool encrypted) + { SetBitMask(NFileHeader::NFlags::kEncrypted, encrypted); } +void CLocalItem::SetUtf8(bool isUtf8) + { SetBitMask(NFileHeader::NFlags::kUtf8, isUtf8); } + +}} diff --git a/CPP/7zip/Archive/Zip/ZipItem.h b/CPP/7zip/Archive/Zip/ZipItem.h new file mode 100644 index 0000000..31f2de7 --- /dev/null +++ b/CPP/7zip/Archive/Zip/ZipItem.h @@ -0,0 +1,281 @@ +// Archive/ZipItem.h + +#ifndef __ARCHIVE_ZIP_ITEM_H +#define __ARCHIVE_ZIP_ITEM_H + +#include "Common/Types.h" +#include "Common/MyString.h" +#include "Common/Buffer.h" +#include "Common/UTFConvert.h" +#include "Common/StringConvert.h" + +#include "ZipHeader.h" + +namespace NArchive { +namespace NZip { + +struct CVersion +{ + Byte Version; + Byte HostOS; +}; + +bool operator==(const CVersion &v1, const CVersion &v2); +bool operator!=(const CVersion &v1, const CVersion &v2); + +struct CExtraSubBlock +{ + UInt16 ID; + CByteBuffer Data; + bool ExtractNtfsTime(int index, FILETIME &ft) const; + bool ExtractUnixTime(int index, UInt32 &res) const; +}; + +struct CWzAesExtraField +{ + UInt16 VendorVersion; // 0x0001 - AE-1, 0x0002 - AE-2, + // UInt16 VendorId; // "AE" + Byte Strength; // 1 - 128-bit , 2 - 192-bit , 3 - 256-bit + UInt16 Method; + + CWzAesExtraField(): VendorVersion(2), Strength(3), Method(0) {} + + bool NeedCrc() const { return (VendorVersion == 1); } + + bool ParseFromSubBlock(const CExtraSubBlock &sb) + { + if (sb.ID != NFileHeader::NExtraID::kWzAES) + return false; + if (sb.Data.GetCapacity() < 7) + return false; + const Byte *p = (const Byte *)sb.Data; + VendorVersion = (((UInt16)p[1]) << 8) | p[0]; + if (p[2] != 'A' || p[3] != 'E') + return false; + Strength = p[4]; + Method = (((UInt16)p[6]) << 16) | p[5]; + return true; + } + void SetSubBlock(CExtraSubBlock &sb) const + { + sb.Data.SetCapacity(7); + sb.ID = NFileHeader::NExtraID::kWzAES; + Byte *p = (Byte *)sb.Data; + p[0] = (Byte)VendorVersion; + p[1] = (Byte)(VendorVersion >> 8); + p[2] = 'A'; + p[3] = 'E'; + p[4] = Strength; + p[5] = (Byte)Method; + p[6] = (Byte)(Method >> 8); + } +}; + +namespace NStrongCryptoFlags +{ + const UInt16 kDES = 0x6601; + const UInt16 kRC2old = 0x6602; + const UInt16 k3DES168 = 0x6603; + const UInt16 k3DES112 = 0x6609; + const UInt16 kAES128 = 0x660E; + const UInt16 kAES192 = 0x660F; + const UInt16 kAES256 = 0x6610; + const UInt16 kRC2 = 0x6702; + const UInt16 kBlowfish = 0x6720; + const UInt16 kTwofish = 0x6721; + const UInt16 kRC4 = 0x6801; +} + +struct CStrongCryptoField +{ + UInt16 Format; + UInt16 AlgId; + UInt16 BitLen; + UInt16 Flags; + + bool ParseFromSubBlock(const CExtraSubBlock &sb) + { + if (sb.ID != NFileHeader::NExtraID::kStrongEncrypt) + return false; + const Byte *p = (const Byte *)sb.Data; + if (sb.Data.GetCapacity() < 8) + return false; + Format = (((UInt16)p[1]) << 8) | p[0]; + AlgId = (((UInt16)p[3]) << 8) | p[2]; + BitLen = (((UInt16)p[5]) << 8) | p[4]; + Flags = (((UInt16)p[7]) << 8) | p[6]; + return (Format == 2); + } +}; + +struct CExtraBlock +{ + CObjectVector SubBlocks; + void Clear() { SubBlocks.Clear(); } + size_t GetSize() const + { + size_t res = 0; + for (int i = 0; i < SubBlocks.Size(); i++) + res += SubBlocks[i].Data.GetCapacity() + 2 + 2; + return res; + } + bool GetWzAesField(CWzAesExtraField &aesField) const + { + for (int i = 0; i < SubBlocks.Size(); i++) + if (aesField.ParseFromSubBlock(SubBlocks[i])) + return true; + return false; + } + + bool GetStrongCryptoField(CStrongCryptoField &f) const + { + for (int i = 0; i < SubBlocks.Size(); i++) + if (f.ParseFromSubBlock(SubBlocks[i])) + return true; + return false; + } + + bool HasWzAesField() const + { + CWzAesExtraField aesField; + return GetWzAesField(aesField); + } + + bool GetNtfsTime(int index, FILETIME &ft) const + { + for (int i = 0; i < SubBlocks.Size(); i++) + { + const CExtraSubBlock &sb = SubBlocks[i]; + if (sb.ID == NFileHeader::NExtraID::kNTFS) + return sb.ExtractNtfsTime(index, ft); + } + return false; + } + + bool GetUnixTime(int index, UInt32 &res) const + { + for (int i = 0; i < SubBlocks.Size(); i++) + { + const CExtraSubBlock &sb = SubBlocks[i]; + if (sb.ID == NFileHeader::NExtraID::kUnixTime) + return sb.ExtractUnixTime(index, res); + } + return false; + } + + /* + bool HasStrongCryptoField() const + { + CStrongCryptoField f; + return GetStrongCryptoField(f); + } + */ + + void RemoveUnknownSubBlocks() + { + for (int i = SubBlocks.Size() - 1; i >= 0; i--) + if (SubBlocks[i].ID != NFileHeader::NExtraID::kWzAES) + SubBlocks.Delete(i); + } +}; + + +class CLocalItem +{ +public: + CVersion ExtractVersion; + UInt16 Flags; + UInt16 CompressionMethod; + UInt32 Time; + UInt32 FileCRC; + UInt64 PackSize; + UInt64 UnPackSize; + + AString Name; + + CExtraBlock LocalExtra; + + bool IsUtf8() const { return (Flags & NFileHeader::NFlags::kUtf8) != 0; } + + bool IsEncrypted() const { return (Flags & NFileHeader::NFlags::kEncrypted) != 0; } + bool IsStrongEncrypted() const { return IsEncrypted() && (Flags & NFileHeader::NFlags::kStrongEncrypted) != 0; }; + bool IsAesEncrypted() const { return IsEncrypted() && (IsStrongEncrypted() || CompressionMethod == NFileHeader::NCompressionMethod::kWzAES); }; + + bool IsLzmaEOS() const { return (Flags & NFileHeader::NFlags::kLzmaEOS) != 0; } + + bool IsDir() const; + bool IgnoreItem() const { return false; } + UInt32 GetWinAttributes() const; + + bool HasDescriptor() const { return (Flags & NFileHeader::NFlags::kDescriptorUsedMask) != 0; } + + UString GetUnicodeString(const AString &s) const + { + UString res; + if (IsUtf8()) + if (!ConvertUTF8ToUnicode(s, res)) + res.Empty(); + if (res.IsEmpty()) + res = MultiByteToUnicodeString(s, GetCodePage()); + return res; + } + +private: + void SetFlagBits(int startBitNumber, int numBits, int value); + void SetBitMask(int bitMask, bool enable); +public: + void ClearFlags() { Flags = 0; } + void SetEncrypted(bool encrypted); + void SetUtf8(bool isUtf8); + + WORD GetCodePage() const { return CP_OEMCP; } +}; + +class CItem: public CLocalItem +{ +public: + CVersion MadeByVersion; + UInt16 InternalAttributes; + UInt32 ExternalAttributes; + + UInt64 LocalHeaderPosition; + + FILETIME NtfsMTime; + FILETIME NtfsATime; + FILETIME NtfsCTime; + + CExtraBlock CentralExtra; + CByteBuffer Comment; + + bool FromLocal; + bool FromCentral; + bool NtfsTimeIsDefined; + + bool IsDir() const; + UInt32 GetWinAttributes() const; + + bool IsThereCrc() const + { + if (CompressionMethod == NFileHeader::NCompressionMethod::kWzAES) + { + CWzAesExtraField aesField; + if (CentralExtra.GetWzAesField(aesField)) + return aesField.NeedCrc(); + } + return (FileCRC != 0 || !IsDir()); + } + + WORD GetCodePage() const + { + return (WORD)((MadeByVersion.HostOS == NFileHeader::NHostOS::kFAT + || MadeByVersion.HostOS == NFileHeader::NHostOS::kNTFS + ) ? CP_OEMCP : CP_ACP); + } + CItem() : FromLocal(false), FromCentral(false), NtfsTimeIsDefined(false) {} +}; + +}} + +#endif + + diff --git a/CPP/7zip/Archive/Zip/ZipItemEx.h b/CPP/7zip/Archive/Zip/ZipItemEx.h new file mode 100644 index 0000000..ab62cdb --- /dev/null +++ b/CPP/7zip/Archive/Zip/ZipItemEx.h @@ -0,0 +1,34 @@ +// Archive/ZipItemEx.h + +#ifndef __ARCHIVE_ZIP_ITEMEX_H +#define __ARCHIVE_ZIP_ITEMEX_H + +#include "ZipHeader.h" +#include "ZipItem.h" + +namespace NArchive { +namespace NZip { + +class CItemEx: public CItem +{ +public: + UInt32 FileHeaderWithNameSize; + UInt16 LocalExtraSize; + + UInt64 GetLocalFullSize() const + { return FileHeaderWithNameSize + LocalExtraSize + PackSize + + (HasDescriptor() ? NFileHeader::kDataDescriptorSize : 0); }; + /* + UInt64 GetLocalFullSize(bool isZip64) const + { return FileHeaderWithNameSize + LocalExtraSize + PackSize + + (HasDescriptor() ? (isZip64 ? NFileHeader::kDataDescriptor64Size : NFileHeader::kDataDescriptorSize) : 0); }; + */ + UInt64 GetLocalExtraPosition() const + { return LocalHeaderPosition + FileHeaderWithNameSize; }; + UInt64 GetDataPosition() const + { return GetLocalExtraPosition() + LocalExtraSize; }; +}; + +}} + +#endif diff --git a/CPP/7zip/Archive/Zip/ZipOut.cpp b/CPP/7zip/Archive/Zip/ZipOut.cpp new file mode 100644 index 0000000..aa82143 --- /dev/null +++ b/CPP/7zip/Archive/Zip/ZipOut.cpp @@ -0,0 +1,289 @@ +// ZipOut.cpp + +#include "StdAfx.h" + +#include "../../Common/OffsetStream.h" + +#include "ZipOut.h" + +namespace NArchive { +namespace NZip { + +void COutArchive::Create(IOutStream *outStream) +{ + if (!m_OutBuffer.Create(1 << 16)) + throw CSystemException(E_OUTOFMEMORY); + m_Stream = outStream; + m_OutBuffer.SetStream(outStream); + m_OutBuffer.Init(); + m_BasePosition = 0; +} + +void COutArchive::MoveBasePosition(UInt64 distanceToMove) +{ + m_BasePosition += distanceToMove; // test overflow +} + +void COutArchive::PrepareWriteCompressedDataZip64(UInt16 fileNameLength, bool isZip64, bool aesEncryption) +{ + m_IsZip64 = isZip64; + m_ExtraSize = isZip64 ? (4 + 8 + 8) : 0; + if (aesEncryption) + m_ExtraSize += 4 + 7; + m_LocalFileHeaderSize = 4 + NFileHeader::kLocalBlockSize + fileNameLength + m_ExtraSize; +} + +void COutArchive::PrepareWriteCompressedData(UInt16 fileNameLength, UInt64 unPackSize, bool aesEncryption) +{ + // We test it to 0xF8000000 to support case when compressed size + // can be larger than uncompressed size. + PrepareWriteCompressedDataZip64(fileNameLength, unPackSize >= 0xF8000000, aesEncryption); +} + +void COutArchive::PrepareWriteCompressedData2(UInt16 fileNameLength, UInt64 unPackSize, UInt64 packSize, bool aesEncryption) +{ + bool isUnPack64 = unPackSize >= 0xFFFFFFFF; + bool isPack64 = packSize >= 0xFFFFFFFF; + bool isZip64 = isPack64 || isUnPack64; + PrepareWriteCompressedDataZip64(fileNameLength, isZip64, aesEncryption); +} + +void COutArchive::WriteBytes(const void *buffer, UInt32 size) +{ + m_OutBuffer.WriteBytes(buffer, size); + m_BasePosition += size; +} + +void COutArchive::WriteByte(Byte b) +{ + WriteBytes(&b, 1); +} + +void COutArchive::WriteUInt16(UInt16 value) +{ + for (int i = 0; i < 2; i++) + { + WriteByte((Byte)value); + value >>= 8; + } +} + +void COutArchive::WriteUInt32(UInt32 value) +{ + for (int i = 0; i < 4; i++) + { + WriteByte((Byte)value); + value >>= 8; + } +} + +void COutArchive::WriteUInt64(UInt64 value) +{ + for (int i = 0; i < 8; i++) + { + WriteByte((Byte)value); + value >>= 8; + } +} + +void COutArchive::WriteExtra(const CExtraBlock &extra) +{ + if (extra.SubBlocks.Size() != 0) + { + for (int i = 0; i < extra.SubBlocks.Size(); i++) + { + const CExtraSubBlock &subBlock = extra.SubBlocks[i]; + WriteUInt16(subBlock.ID); + WriteUInt16((UInt16)subBlock.Data.GetCapacity()); + WriteBytes(subBlock.Data, (UInt32)subBlock.Data.GetCapacity()); + } + } +} + +void COutArchive::SeekTo(UInt64 offset) +{ + HRESULT res = m_Stream->Seek(offset, STREAM_SEEK_SET, NULL); + if (res != S_OK) + throw CSystemException(res); +} + +void COutArchive::WriteLocalHeader(const CLocalItem &item) +{ + SeekTo(m_BasePosition); + + bool isZip64 = m_IsZip64 || item.PackSize >= 0xFFFFFFFF || item.UnPackSize >= 0xFFFFFFFF; + + WriteUInt32(NSignature::kLocalFileHeader); + { + Byte ver = item.ExtractVersion.Version; + if (isZip64 && ver < NFileHeader::NCompressionMethod::kExtractVersion_Zip64) + ver = NFileHeader::NCompressionMethod::kExtractVersion_Zip64; + WriteByte(ver); + } + WriteByte(item.ExtractVersion.HostOS); + WriteUInt16(item.Flags); + WriteUInt16(item.CompressionMethod); + WriteUInt32(item.Time); + WriteUInt32(item.FileCRC); + WriteUInt32(isZip64 ? 0xFFFFFFFF: (UInt32)item.PackSize); + WriteUInt32(isZip64 ? 0xFFFFFFFF: (UInt32)item.UnPackSize); + WriteUInt16((UInt16)item.Name.Length()); + { + UInt16 localExtraSize = (UInt16)((isZip64 ? (4 + 16): 0) + item.LocalExtra.GetSize()); + if (localExtraSize > m_ExtraSize) + throw CSystemException(E_FAIL); + } + WriteUInt16((UInt16)m_ExtraSize); // test it; + WriteBytes((const char *)item.Name, item.Name.Length()); + + UInt32 extraPos = 0; + if (isZip64) + { + extraPos += 4 + 16; + WriteUInt16(NFileHeader::NExtraID::kZip64); + WriteUInt16(16); + WriteUInt64(item.UnPackSize); + WriteUInt64(item.PackSize); + } + + WriteExtra(item.LocalExtra); + extraPos += (UInt32)item.LocalExtra.GetSize(); + for (; extraPos < m_ExtraSize; extraPos++) + WriteByte(0); + + m_OutBuffer.FlushWithCheck(); + MoveBasePosition(item.PackSize); + SeekTo(m_BasePosition); +} + +void COutArchive::WriteCentralHeader(const CItem &item) +{ + bool isUnPack64 = item.UnPackSize >= 0xFFFFFFFF; + bool isPack64 = item.PackSize >= 0xFFFFFFFF; + bool isPosition64 = item.LocalHeaderPosition >= 0xFFFFFFFF; + bool isZip64 = isPack64 || isUnPack64 || isPosition64; + + WriteUInt32(NSignature::kCentralFileHeader); + WriteByte(item.MadeByVersion.Version); + WriteByte(item.MadeByVersion.HostOS); + { + Byte ver = item.ExtractVersion.Version; + if (isZip64 && ver < NFileHeader::NCompressionMethod::kExtractVersion_Zip64) + ver = NFileHeader::NCompressionMethod::kExtractVersion_Zip64; + WriteByte(ver); + } + WriteByte(item.ExtractVersion.HostOS); + WriteUInt16(item.Flags); + WriteUInt16(item.CompressionMethod); + WriteUInt32(item.Time); + WriteUInt32(item.FileCRC); + WriteUInt32(isPack64 ? 0xFFFFFFFF: (UInt32)item.PackSize); + WriteUInt32(isUnPack64 ? 0xFFFFFFFF: (UInt32)item.UnPackSize); + WriteUInt16((UInt16)item.Name.Length()); + UInt16 zip64ExtraSize = (UInt16)((isUnPack64 ? 8: 0) + (isPack64 ? 8: 0) + (isPosition64 ? 8: 0)); + const UInt16 kNtfsExtraSize = 4 + 2 + 2 + (3 * 8); + UInt16 centralExtraSize = (UInt16)(isZip64 ? (4 + zip64ExtraSize) : 0) + (item.NtfsTimeIsDefined ? (4 + kNtfsExtraSize) : 0); + centralExtraSize = (UInt16)(centralExtraSize + item.CentralExtra.GetSize()); + WriteUInt16(centralExtraSize); // test it; + WriteUInt16((UInt16)item.Comment.GetCapacity()); + WriteUInt16(0); // DiskNumberStart; + WriteUInt16(item.InternalAttributes); + WriteUInt32(item.ExternalAttributes); + WriteUInt32(isPosition64 ? 0xFFFFFFFF: (UInt32)item.LocalHeaderPosition); + WriteBytes((const char *)item.Name, item.Name.Length()); + if (isZip64) + { + WriteUInt16(NFileHeader::NExtraID::kZip64); + WriteUInt16(zip64ExtraSize); + if(isUnPack64) + WriteUInt64(item.UnPackSize); + if(isPack64) + WriteUInt64(item.PackSize); + if(isPosition64) + WriteUInt64(item.LocalHeaderPosition); + } + if (item.NtfsTimeIsDefined) + { + WriteUInt16(NFileHeader::NExtraID::kNTFS); + WriteUInt16(kNtfsExtraSize); + WriteUInt32(0); // reserved + WriteUInt16(NFileHeader::NNtfsExtra::kTagTime); + WriteUInt16(8 * 3); + WriteUInt32(item.NtfsMTime.dwLowDateTime); + WriteUInt32(item.NtfsMTime.dwHighDateTime); + WriteUInt32(item.NtfsATime.dwLowDateTime); + WriteUInt32(item.NtfsATime.dwHighDateTime); + WriteUInt32(item.NtfsCTime.dwLowDateTime); + WriteUInt32(item.NtfsCTime.dwHighDateTime); + } + WriteExtra(item.CentralExtra); + if (item.Comment.GetCapacity() > 0) + WriteBytes(item.Comment, (UInt32)item.Comment.GetCapacity()); +} + +void COutArchive::WriteCentralDir(const CObjectVector &items, const CByteBuffer *comment) +{ + SeekTo(m_BasePosition); + + UInt64 cdOffset = GetCurrentPosition(); + for(int i = 0; i < items.Size(); i++) + WriteCentralHeader(items[i]); + UInt64 cd64EndOffset = GetCurrentPosition(); + UInt64 cdSize = cd64EndOffset - cdOffset; + bool cdOffset64 = cdOffset >= 0xFFFFFFFF; + bool cdSize64 = cdSize >= 0xFFFFFFFF; + bool items64 = items.Size() >= 0xFFFF; + bool isZip64 = (cdOffset64 || cdSize64 || items64); + + if (isZip64) + { + WriteUInt32(NSignature::kZip64EndOfCentralDir); + WriteUInt64(kZip64EcdSize); // ThisDiskNumber = 0; + WriteUInt16(45); // version + WriteUInt16(45); // version + WriteUInt32(0); // ThisDiskNumber = 0; + WriteUInt32(0); // StartCentralDirectoryDiskNumber;; + WriteUInt64((UInt64)items.Size()); + WriteUInt64((UInt64)items.Size()); + WriteUInt64((UInt64)cdSize); + WriteUInt64((UInt64)cdOffset); + + WriteUInt32(NSignature::kZip64EndOfCentralDirLocator); + WriteUInt32(0); // number of the disk with the start of the zip64 end of central directory + WriteUInt64(cd64EndOffset); + WriteUInt32(1); // total number of disks + } + WriteUInt32(NSignature::kEndOfCentralDir); + WriteUInt16(0); // ThisDiskNumber = 0; + WriteUInt16(0); // StartCentralDirectoryDiskNumber; + WriteUInt16((UInt16)(items64 ? 0xFFFF: items.Size())); + WriteUInt16((UInt16)(items64 ? 0xFFFF: items.Size())); + WriteUInt32(cdSize64 ? 0xFFFFFFFF: (UInt32)cdSize); + WriteUInt32(cdOffset64 ? 0xFFFFFFFF: (UInt32)cdOffset); + UInt32 commentSize = (UInt32)(comment ? comment->GetCapacity() : 0); + WriteUInt16((UInt16)commentSize); + if (commentSize > 0) + WriteBytes((const Byte *)*comment, commentSize); + m_OutBuffer.FlushWithCheck(); +} + +void COutArchive::CreateStreamForCompressing(IOutStream **outStream) +{ + COffsetOutStream *streamSpec = new COffsetOutStream; + CMyComPtr tempStream(streamSpec); + streamSpec->Init(m_Stream, m_BasePosition + m_LocalFileHeaderSize); + *outStream = tempStream.Detach(); +} + +void COutArchive::SeekToPackedDataPosition() +{ + SeekTo(m_BasePosition + m_LocalFileHeaderSize); +} + +void COutArchive::CreateStreamForCopying(ISequentialOutStream **outStream) +{ + CMyComPtr tempStream(m_Stream); + *outStream = tempStream.Detach(); +} + +}} diff --git a/CPP/7zip/Archive/Zip/ZipOut.h b/CPP/7zip/Archive/Zip/ZipOut.h new file mode 100644 index 0000000..2f6349e --- /dev/null +++ b/CPP/7zip/Archive/Zip/ZipOut.h @@ -0,0 +1,56 @@ +// ZipOut.h + +#ifndef __ZIP_OUT_H +#define __ZIP_OUT_H + +#include "Common/MyCom.h" + +#include "../../IStream.h" +#include "../../Common/OutBuffer.h" + +#include "ZipItem.h" + +namespace NArchive { +namespace NZip { + +// can throw CSystemException and COutBufferException + +class COutArchive +{ + CMyComPtr m_Stream; + COutBuffer m_OutBuffer; + + UInt64 m_BasePosition; + UInt32 m_LocalFileHeaderSize; + UInt32 m_ExtraSize; + bool m_IsZip64; + + void WriteBytes(const void *buffer, UInt32 size); + void WriteByte(Byte b); + void WriteUInt16(UInt16 value); + void WriteUInt32(UInt32 value); + void WriteUInt64(UInt64 value); + + void WriteExtraHeader(const CItem &item); + void WriteCentralHeader(const CItem &item); + void WriteExtra(const CExtraBlock &extra); + void SeekTo(UInt64 offset); +public: + void Create(IOutStream *outStream); + void MoveBasePosition(UInt64 distanceToMove); + UInt64 GetCurrentPosition() const { return m_BasePosition; }; + void PrepareWriteCompressedDataZip64(UInt16 fileNameLength, bool isZip64, bool aesEncryption); + void PrepareWriteCompressedData(UInt16 fileNameLength, UInt64 unPackSize, bool aesEncryption); + void PrepareWriteCompressedData2(UInt16 fileNameLength, UInt64 unPackSize, UInt64 packSize, bool aesEncryption); + void WriteLocalHeader(const CLocalItem &item); + + void WriteCentralDir(const CObjectVector &items, const CByteBuffer *comment); + + void CreateStreamForCompressing(IOutStream **outStream); + void CreateStreamForCopying(ISequentialOutStream **outStream); + void SeekToPackedDataPosition(); +}; + +}} + +#endif diff --git a/CPP/7zip/Archive/Zip/ZipRegister.cpp b/CPP/7zip/Archive/Zip/ZipRegister.cpp new file mode 100644 index 0000000..3e7aade --- /dev/null +++ b/CPP/7zip/Archive/Zip/ZipRegister.cpp @@ -0,0 +1,18 @@ +// ZipRegister.cpp + +#include "StdAfx.h" + +#include "../../Common/RegisterArc.h" + +#include "ZipHandler.h" +static IInArchive *CreateArc() { return new NArchive::NZip::CHandler; } +#ifndef EXTRACT_ONLY +static IOutArchive *CreateArcOut() { return new NArchive::NZip::CHandler; } +#else +#define CreateArcOut 0 +#endif + +static CArcInfo g_ArcInfo = + { L"zip", L"zip jar xpi odt ods docx xlsx", 0, 1, { 0x50, 0x4B, 0x03, 0x04 }, 4, false, CreateArc, CreateArcOut }; + +REGISTER_ARC(Zip) diff --git a/CPP/7zip/Archive/Zip/ZipUpdate.cpp b/CPP/7zip/Archive/Zip/ZipUpdate.cpp new file mode 100644 index 0000000..bd0c822 --- /dev/null +++ b/CPP/7zip/Archive/Zip/ZipUpdate.cpp @@ -0,0 +1,1076 @@ +// ZipUpdate.cpp + +#include "StdAfx.h" + +#include "../../../../C/Alloc.h" + +#include "Common/AutoPtr.h" +#include "Common/Defs.h" +#include "Common/StringConvert.h" + +#include "Windows/Defs.h" +#include "Windows/Thread.h" + +#include "../../Common/CreateCoder.h" +#include "../../Common/LimitedStreams.h" +#include "../../Common/OutMemStream.h" +#include "../../Common/ProgressUtils.h" +#ifndef _7ZIP_ST +#include "../../Common/ProgressMt.h" +#endif +#include "../../Common/StreamUtils.h" + +#include "../../Compress/CopyCoder.h" + +#include "ZipAddCommon.h" +#include "ZipOut.h" +#include "ZipUpdate.h" + +using namespace NWindows; +using namespace NSynchronization; + +namespace NArchive { +namespace NZip { + +static const Byte kHostOS = + #ifdef _WIN32 + NFileHeader::NHostOS::kFAT; + #else + NFileHeader::NHostOS::kUnix; + #endif + +static const Byte kMadeByHostOS = kHostOS; +static const Byte kExtractHostOS = kHostOS; + +static const Byte kMethodForDirectory = NFileHeader::NCompressionMethod::kStored; + +static HRESULT CopyBlockToArchive(ISequentialInStream *inStream, + COutArchive &outArchive, ICompressProgressInfo *progress) +{ + CMyComPtr outStream; + outArchive.CreateStreamForCopying(&outStream); + return NCompress::CopyStream(inStream, outStream, progress); +} + +static HRESULT WriteRange(IInStream *inStream, COutArchive &outArchive, + const CUpdateRange &range, ICompressProgressInfo *progress) +{ + UInt64 position; + RINOK(inStream->Seek(range.Position, STREAM_SEEK_SET, &position)); + + CLimitedSequentialInStream *streamSpec = new CLimitedSequentialInStream; + CMyComPtr inStreamLimited(streamSpec); + streamSpec->SetStream(inStream); + streamSpec->Init(range.Size); + + RINOK(CopyBlockToArchive(inStreamLimited, outArchive, progress)); + return progress->SetRatioInfo(&range.Size, &range.Size); +} + +static void SetFileHeader( + COutArchive &archive, + const CCompressionMethodMode &options, + const CUpdateItem &ui, + CItem &item) +{ + item.UnPackSize = ui.Size; + bool isDir; + + item.ClearFlags(); + + if (ui.NewProperties) + { + isDir = ui.IsDir; + item.Name = ui.Name; + item.SetUtf8(ui.IsUtf8); + item.ExternalAttributes = ui.Attributes; + item.Time = ui.Time; + item.NtfsMTime = ui.NtfsMTime; + item.NtfsATime = ui.NtfsATime; + item.NtfsCTime = ui.NtfsCTime; + item.NtfsTimeIsDefined = ui.NtfsTimeIsDefined; + } + else + isDir = item.IsDir(); + + item.LocalHeaderPosition = archive.GetCurrentPosition(); + item.MadeByVersion.HostOS = kMadeByHostOS; + item.MadeByVersion.Version = NFileHeader::NCompressionMethod::kMadeByProgramVersion; + + item.ExtractVersion.HostOS = kExtractHostOS; + + item.InternalAttributes = 0; // test it + item.SetEncrypted(!isDir && options.PasswordIsDefined); + if (isDir) + { + item.ExtractVersion.Version = NFileHeader::NCompressionMethod::kExtractVersion_Dir; + item.CompressionMethod = kMethodForDirectory; + item.PackSize = 0; + item.FileCRC = 0; // test it + } +} + +static void SetItemInfoFromCompressingResult(const CCompressingResult &compressingResult, + bool isAesMode, Byte aesKeyMode, CItem &item) +{ + item.ExtractVersion.Version = compressingResult.ExtractVersion; + item.CompressionMethod = compressingResult.Method; + item.FileCRC = compressingResult.CRC; + item.UnPackSize = compressingResult.UnpackSize; + item.PackSize = compressingResult.PackSize; + + item.LocalExtra.Clear(); + item.CentralExtra.Clear(); + + if (isAesMode) + { + CWzAesExtraField wzAesField; + wzAesField.Strength = aesKeyMode; + wzAesField.Method = compressingResult.Method; + item.CompressionMethod = NFileHeader::NCompressionMethod::kWzAES; + item.FileCRC = 0; + CExtraSubBlock sb; + wzAesField.SetSubBlock(sb); + item.LocalExtra.SubBlocks.Add(sb); + item.CentralExtra.SubBlocks.Add(sb); + } +} + +#ifndef _7ZIP_ST + +static THREAD_FUNC_DECL CoderThread(void *threadCoderInfo); + +struct CThreadInfo +{ + #ifdef EXTERNAL_CODECS + CMyComPtr _codecsInfo; + const CObjectVector *_externalCodecs; + #endif + + NWindows::CThread Thread; + NWindows::NSynchronization::CAutoResetEvent CompressEvent; + NWindows::NSynchronization::CAutoResetEventWFMO CompressionCompletedEvent; + bool ExitThread; + + CMtCompressProgress *ProgressSpec; + CMyComPtr Progress; + + COutMemStream *OutStreamSpec; + CMyComPtr OutStream; + CMyComPtr InStream; + + CAddCommon Coder; + HRESULT Result; + CCompressingResult CompressingResult; + + bool IsFree; + UInt32 UpdateIndex; + + CThreadInfo(const CCompressionMethodMode &options): + ExitThread(false), + ProgressSpec(0), + OutStreamSpec(0), + Coder(options) + {} + + HRESULT CreateEvents(CSynchro *sync) + { + RINOK(CompressEvent.CreateIfNotCreated()); + return CompressionCompletedEvent.CreateIfNotCreated(sync); + } + HRes CreateThread() { return Thread.Create(CoderThread, this); } + + void WaitAndCode(); + void StopWaitClose() + { + ExitThread = true; + if (OutStreamSpec != 0) + OutStreamSpec->StopWriting(E_ABORT); + if (CompressEvent.IsCreated()) + CompressEvent.Set(); + Thread.Wait(); + Thread.Close(); + } + +}; + +void CThreadInfo::WaitAndCode() +{ + for (;;) + { + CompressEvent.Lock(); + if (ExitThread) + return; + Result = Coder.Compress( + #ifdef EXTERNAL_CODECS + _codecsInfo, _externalCodecs, + #endif + InStream, OutStream, Progress, CompressingResult); + if (Result == S_OK && Progress) + Result = Progress->SetRatioInfo(&CompressingResult.UnpackSize, &CompressingResult.PackSize); + CompressionCompletedEvent.Set(); + } +} + +static THREAD_FUNC_DECL CoderThread(void *threadCoderInfo) +{ + ((CThreadInfo *)threadCoderInfo)->WaitAndCode(); + return 0; +} + +class CThreads +{ +public: + CObjectVector Threads; + ~CThreads() + { + for (int i = 0; i < Threads.Size(); i++) + Threads[i].StopWaitClose(); + } +}; + +struct CMemBlocks2: public CMemLockBlocks +{ + CCompressingResult CompressingResult; + bool Defined; + bool Skip; + CMemBlocks2(): Defined(false), Skip(false) {} +}; + +class CMemRefs +{ +public: + CMemBlockManagerMt *Manager; + CObjectVector Refs; + CMemRefs(CMemBlockManagerMt *manager): Manager(manager) {} ; + ~CMemRefs() + { + for (int i = 0; i < Refs.Size(); i++) + Refs[i].FreeOpt(Manager); + } +}; + +class CMtProgressMixer2: + public ICompressProgressInfo, + public CMyUnknownImp +{ + UInt64 ProgressOffset; + UInt64 InSizes[2]; + UInt64 OutSizes[2]; + CMyComPtr Progress; + CMyComPtr RatioProgress; + bool _inSizeIsMain; +public: + NWindows::NSynchronization::CCriticalSection CriticalSection; + MY_UNKNOWN_IMP + void Create(IProgress *progress, bool inSizeIsMain); + void SetProgressOffset(UInt64 progressOffset); + HRESULT SetRatioInfo(int index, const UInt64 *inSize, const UInt64 *outSize); + STDMETHOD(SetRatioInfo)(const UInt64 *inSize, const UInt64 *outSize); +}; + +void CMtProgressMixer2::Create(IProgress *progress, bool inSizeIsMain) +{ + Progress = progress; + Progress.QueryInterface(IID_ICompressProgressInfo, &RatioProgress); + _inSizeIsMain = inSizeIsMain; + ProgressOffset = InSizes[0] = InSizes[1] = OutSizes[0] = OutSizes[1] = 0; +} + +void CMtProgressMixer2::SetProgressOffset(UInt64 progressOffset) +{ + CriticalSection.Enter(); + InSizes[1] = OutSizes[1] = 0; + ProgressOffset = progressOffset; + CriticalSection.Leave(); +} + +HRESULT CMtProgressMixer2::SetRatioInfo(int index, const UInt64 *inSize, const UInt64 *outSize) +{ + NWindows::NSynchronization::CCriticalSectionLock lock(CriticalSection); + if (index == 0 && RatioProgress) + { + RINOK(RatioProgress->SetRatioInfo(inSize, outSize)); + } + if (inSize != 0) + InSizes[index] = *inSize; + if (outSize != 0) + OutSizes[index] = *outSize; + UInt64 v = ProgressOffset + (_inSizeIsMain ? + (InSizes[0] + InSizes[1]) : + (OutSizes[0] + OutSizes[1])); + return Progress->SetCompleted(&v); +} + +STDMETHODIMP CMtProgressMixer2::SetRatioInfo(const UInt64 *inSize, const UInt64 *outSize) +{ + return SetRatioInfo(0, inSize, outSize); +} + +class CMtProgressMixer: + public ICompressProgressInfo, + public CMyUnknownImp +{ +public: + CMtProgressMixer2 *Mixer2; + CMyComPtr RatioProgress; + void Create(IProgress *progress, bool inSizeIsMain); + MY_UNKNOWN_IMP + STDMETHOD(SetRatioInfo)(const UInt64 *inSize, const UInt64 *outSize); +}; + +void CMtProgressMixer::Create(IProgress *progress, bool inSizeIsMain) +{ + Mixer2 = new CMtProgressMixer2; + RatioProgress = Mixer2; + Mixer2->Create(progress, inSizeIsMain); +} + +STDMETHODIMP CMtProgressMixer::SetRatioInfo(const UInt64 *inSize, const UInt64 *outSize) +{ + return Mixer2->SetRatioInfo(1, inSize, outSize); +} + + +#endif + + +static HRESULT UpdateItemOldData(COutArchive &archive, + IInStream *inStream, + const CUpdateItem &ui, CItemEx &item, + /* bool izZip64, */ + ICompressProgressInfo *progress, + UInt64 &complexity) +{ + if (ui.NewProperties) + { + if (item.HasDescriptor()) + return E_NOTIMPL; + + // use old name size. + // CUpdateRange range(item.GetLocalExtraPosition(), item.LocalExtraSize + item.PackSize); + CUpdateRange range(item.GetDataPosition(), item.PackSize); + + // item.ExternalAttributes = ui.Attributes; + // Test it + item.Name = ui.Name; + item.SetUtf8(ui.IsUtf8); + item.Time = ui.Time; + item.NtfsMTime = ui.NtfsMTime; + item.NtfsATime = ui.NtfsATime; + item.NtfsCTime = ui.NtfsCTime; + item.NtfsTimeIsDefined = ui.NtfsTimeIsDefined; + + item.CentralExtra.RemoveUnknownSubBlocks(); + item.LocalExtra.RemoveUnknownSubBlocks(); + + archive.PrepareWriteCompressedData2((UInt16)item.Name.Length(), item.UnPackSize, item.PackSize, item.LocalExtra.HasWzAesField()); + item.LocalHeaderPosition = archive.GetCurrentPosition(); + archive.SeekToPackedDataPosition(); + RINOK(WriteRange(inStream, archive, range, progress)); + complexity += range.Size; + archive.WriteLocalHeader(item); + } + else + { + CUpdateRange range(item.LocalHeaderPosition, item.GetLocalFullSize()); + + // set new header position + item.LocalHeaderPosition = archive.GetCurrentPosition(); + + RINOK(WriteRange(inStream, archive, range, progress)); + complexity += range.Size; + archive.MoveBasePosition(range.Size); + } + return S_OK; +} + +static void WriteDirHeader(COutArchive &archive, const CCompressionMethodMode *options, + const CUpdateItem &ui, CItemEx &item) +{ + SetFileHeader(archive, *options, ui, item); + archive.PrepareWriteCompressedData((UInt16)item.Name.Length(), ui.Size, options->IsAesMode); + archive.WriteLocalHeader(item); +} + +static HRESULT Update2St( + DECL_EXTERNAL_CODECS_LOC_VARS + COutArchive &archive, + CInArchive *inArchive, + IInStream *inStream, + const CObjectVector &inputItems, + const CObjectVector &updateItems, + const CCompressionMethodMode *options, + const CByteBuffer *comment, + IArchiveUpdateCallback *updateCallback) +{ + CLocalProgress *lps = new CLocalProgress; + CMyComPtr progress = lps; + lps->Init(updateCallback, true); + + CAddCommon compressor(*options); + + CObjectVector items; + UInt64 unpackSizeTotal = 0, packSizeTotal = 0; + + for (int itemIndex = 0; itemIndex < updateItems.Size(); itemIndex++) + { + lps->InSize = unpackSizeTotal; + lps->OutSize = packSizeTotal; + RINOK(lps->SetCur()); + const CUpdateItem &ui = updateItems[itemIndex]; + CItemEx item; + if (!ui.NewProperties || !ui.NewData) + { + item = inputItems[ui.IndexInArchive]; + if (inArchive->ReadLocalItemAfterCdItemFull(item) != S_OK) + return E_NOTIMPL; + } + + if (ui.NewData) + { + bool isDir = ((ui.NewProperties) ? ui.IsDir : item.IsDir()); + if (isDir) + { + WriteDirHeader(archive, options, ui, item); + } + else + { + CMyComPtr fileInStream; + HRESULT res = updateCallback->GetStream(ui.IndexInClient, &fileInStream); + if (res == S_FALSE) + { + lps->ProgressOffset += ui.Size; + RINOK(updateCallback->SetOperationResult(NArchive::NUpdate::NOperationResult::kOK)); + continue; + } + RINOK(res); + + // file Size can be 64-bit !!! + SetFileHeader(archive, *options, ui, item); + archive.PrepareWriteCompressedData((UInt16)item.Name.Length(), ui.Size, options->IsAesMode); + CCompressingResult compressingResult; + CMyComPtr outStream; + archive.CreateStreamForCompressing(&outStream); + RINOK(compressor.Compress( + EXTERNAL_CODECS_LOC_VARS + fileInStream, outStream, progress, compressingResult)); + SetItemInfoFromCompressingResult(compressingResult, options->IsAesMode, options->AesKeyMode, item); + archive.WriteLocalHeader(item); + RINOK(updateCallback->SetOperationResult(NArchive::NUpdate::NOperationResult::kOK)); + unpackSizeTotal += item.UnPackSize; + packSizeTotal += item.PackSize; + } + } + else + { + UInt64 complexity = 0; + lps->SendRatio = false; + RINOK(UpdateItemOldData(archive, inStream, ui, item, progress, complexity)); + lps->SendRatio = true; + lps->ProgressOffset += complexity; + } + items.Add(item); + lps->ProgressOffset += NFileHeader::kLocalBlockSize; + } + archive.WriteCentralDir(items, comment); + return S_OK; +} + +static HRESULT Update2( + DECL_EXTERNAL_CODECS_LOC_VARS + COutArchive &archive, + CInArchive *inArchive, + IInStream *inStream, + const CObjectVector &inputItems, + const CObjectVector &updateItems, + const CCompressionMethodMode *options, + const CByteBuffer *comment, + IArchiveUpdateCallback *updateCallback) +{ + UInt64 complexity = 0; + UInt64 numFilesToCompress = 0; + UInt64 numBytesToCompress = 0; + + int i; + for(i = 0; i < updateItems.Size(); i++) + { + const CUpdateItem &ui = updateItems[i]; + if (ui.NewData) + { + complexity += ui.Size; + numBytesToCompress += ui.Size; + numFilesToCompress++; + /* + if (ui.Commented) + complexity += ui.CommentRange.Size; + */ + } + else + { + CItemEx inputItem = inputItems[ui.IndexInArchive]; + if (inArchive->ReadLocalItemAfterCdItemFull(inputItem) != S_OK) + return E_NOTIMPL; + complexity += inputItem.GetLocalFullSize(); + // complexity += inputItem.GetCentralExtraPlusCommentSize(); + } + complexity += NFileHeader::kLocalBlockSize; + complexity += NFileHeader::kCentralBlockSize; + } + + if (comment) + complexity += comment->GetCapacity(); + complexity++; // end of central + updateCallback->SetTotal(complexity); + + CAddCommon compressor(*options); + + complexity = 0; + + #ifndef _7ZIP_ST + + const size_t kNumMaxThreads = (1 << 10); + UInt32 numThreads = options->NumThreads; + if (numThreads > kNumMaxThreads) + numThreads = kNumMaxThreads; + + const size_t kMemPerThread = (1 << 25); + const size_t kBlockSize = 1 << 16; + + CCompressionMethodMode options2; + if (options != 0) + options2 = *options; + + bool mtMode = ((options != 0) && (numThreads > 1)); + + if (numFilesToCompress <= 1) + mtMode = false; + + if (mtMode) + { + Byte method = options->MethodSequence.Front(); + if (method == NFileHeader::NCompressionMethod::kStored && !options->PasswordIsDefined) + mtMode = false; + if (method == NFileHeader::NCompressionMethod::kBZip2) + { + UInt64 averageSize = numBytesToCompress / numFilesToCompress; + UInt32 blockSize = options->DicSize; + if (blockSize == 0) + blockSize = 1; + UInt64 averageNumberOfBlocks = averageSize / blockSize; + UInt32 numBZip2Threads = 32; + if (averageNumberOfBlocks < numBZip2Threads) + numBZip2Threads = (UInt32)averageNumberOfBlocks; + if (numBZip2Threads < 1) + numBZip2Threads = 1; + numThreads = numThreads / numBZip2Threads; + options2.NumThreads = numBZip2Threads; + if (numThreads <= 1) + mtMode = false; + } + if (method == NFileHeader::NCompressionMethod::kLZMA) + { + UInt32 numLZMAThreads = (options->Algo > 0 ? 2 : 1); + numThreads /= numLZMAThreads; + options2.NumThreads = numLZMAThreads; + if (numThreads <= 1) + mtMode = false; + } + } + + if (!mtMode) + #endif + return Update2St( + EXTERNAL_CODECS_LOC_VARS + archive, inArchive,inStream, + inputItems, updateItems, options, comment, updateCallback); + + + #ifndef _7ZIP_ST + + // Warning : before memManager, threads and compressingCompletedEvents + // in order to have a "good" order for the destructor + NWindows::NSynchronization::CSynchro synchroForCompressingCompletedEvents; + synchroForCompressingCompletedEvents.Create(); + NWindows::NSynchronization::CSynchro synchroForOutStreamSpec; + synchroForOutStreamSpec.Create(); + + + CObjectVector items; + + CMtProgressMixer *mtProgressMixerSpec = new CMtProgressMixer; + CMyComPtr progress = mtProgressMixerSpec; + mtProgressMixerSpec->Create(updateCallback, true); + + CMtCompressProgressMixer mtCompressProgressMixer; + mtCompressProgressMixer.Init(numThreads, mtProgressMixerSpec->RatioProgress); + + CMemBlockManagerMt memManager(kBlockSize); + CMemRefs refs(&memManager); + + CThreads threads; + CRecordVector compressingCompletedEvents; + CRecordVector threadIndices; // list threads in order of updateItems + + { + RINOK(memManager.AllocateSpaceAlways(&synchroForOutStreamSpec,(size_t)numThreads * (kMemPerThread / kBlockSize))); + for(i = 0; i < updateItems.Size(); i++) + refs.Refs.Add(CMemBlocks2()); + + UInt32 i; + for (i = 0; i < numThreads; i++) + threads.Threads.Add(CThreadInfo(options2)); + + for (i = 0; i < numThreads; i++) + { + CThreadInfo &threadInfo = threads.Threads[i]; + #ifdef EXTERNAL_CODECS + threadInfo._codecsInfo = codecsInfo; + threadInfo._externalCodecs = externalCodecs; + #endif + RINOK(threadInfo.CreateEvents(&synchroForCompressingCompletedEvents)); + threadInfo.OutStreamSpec = new COutMemStream(&memManager); + RINOK(threadInfo.OutStreamSpec->CreateEvents(&synchroForOutStreamSpec)); + threadInfo.OutStream = threadInfo.OutStreamSpec; + threadInfo.IsFree = true; + threadInfo.ProgressSpec = new CMtCompressProgress(); + threadInfo.Progress = threadInfo.ProgressSpec; + threadInfo.ProgressSpec->Init(&mtCompressProgressMixer, (int)i); + RINOK(threadInfo.CreateThread()); + } + } + int mtItemIndex = 0; + + int itemIndex = 0; + int lastRealStreamItemIndex = -1; + + while (itemIndex < updateItems.Size()) + { + if ((UInt32)threadIndices.Size() < numThreads && mtItemIndex < updateItems.Size()) + { + const CUpdateItem &ui = updateItems[mtItemIndex++]; + if (!ui.NewData) + continue; + CItemEx item; + if (ui.NewProperties) + { + if (ui.IsDir) + continue; + } + else + { + item = inputItems[ui.IndexInArchive]; + if (inArchive->ReadLocalItemAfterCdItemFull(item) != S_OK) + return E_NOTIMPL; + if (item.IsDir()) + continue; + } + CMyComPtr fileInStream; + { + NWindows::NSynchronization::CCriticalSectionLock lock(mtProgressMixerSpec->Mixer2->CriticalSection); + HRESULT res = updateCallback->GetStream(ui.IndexInClient, &fileInStream); + if (res == S_FALSE) + { + complexity += ui.Size; + complexity += NFileHeader::kLocalBlockSize; + mtProgressMixerSpec->Mixer2->SetProgressOffset(complexity); + RINOK(updateCallback->SetOperationResult(NArchive::NUpdate::NOperationResult::kOK)); + refs.Refs[mtItemIndex - 1].Skip = true; + continue; + } + RINOK(res); + RINOK(updateCallback->SetOperationResult(NArchive::NUpdate::NOperationResult::kOK)); + } + + for (UInt32 i = 0; i < numThreads; i++) + { + CThreadInfo &threadInfo = threads.Threads[i]; + if (threadInfo.IsFree) + { + threadInfo.IsFree = false; + threadInfo.InStream = fileInStream; + + // !!!!! we must release ref before sending event + // BUG was here in v4.43 and v4.44. It could change ref counter in two threads in same time + fileInStream.Release(); + + threadInfo.OutStreamSpec->Init(); + threadInfo.ProgressSpec->Reinit(); + threadInfo.CompressEvent.Set(); + threadInfo.UpdateIndex = mtItemIndex - 1; + + compressingCompletedEvents.Add(threadInfo.CompressionCompletedEvent); + threadIndices.Add(i); + break; + } + } + continue; + } + + if (refs.Refs[itemIndex].Skip) + { + itemIndex++; + continue; + } + + const CUpdateItem &ui = updateItems[itemIndex]; + + CItemEx item; + if (!ui.NewProperties || !ui.NewData) + { + item = inputItems[ui.IndexInArchive]; + if (inArchive->ReadLocalItemAfterCdItemFull(item) != S_OK) + return E_NOTIMPL; + } + + if (ui.NewData) + { + bool isDir = ((ui.NewProperties) ? ui.IsDir : item.IsDir()); + if (isDir) + { + WriteDirHeader(archive, options, ui, item); + } + else + { + if (lastRealStreamItemIndex < itemIndex) + { + lastRealStreamItemIndex = itemIndex; + SetFileHeader(archive, *options, ui, item); + // file Size can be 64-bit !!! + archive.PrepareWriteCompressedData((UInt16)item.Name.Length(), ui.Size, options->IsAesMode); + } + + CMemBlocks2 &memRef = refs.Refs[itemIndex]; + if (memRef.Defined) + { + CMyComPtr outStream; + archive.CreateStreamForCompressing(&outStream); + memRef.WriteToStream(memManager.GetBlockSize(), outStream); + SetItemInfoFromCompressingResult(memRef.CompressingResult, + options->IsAesMode, options->AesKeyMode, item); + SetFileHeader(archive, *options, ui, item); + archive.WriteLocalHeader(item); + // RINOK(updateCallback->SetOperationResult(NArchive::NUpdate::NOperationResult::kOK)); + memRef.FreeOpt(&memManager); + } + else + { + { + CThreadInfo &thread = threads.Threads[threadIndices.Front()]; + if (!thread.OutStreamSpec->WasUnlockEventSent()) + { + CMyComPtr outStream; + archive.CreateStreamForCompressing(&outStream); + thread.OutStreamSpec->SetOutStream(outStream); + thread.OutStreamSpec->SetRealStreamMode(); + } + } + + DWORD result = ::WaitForMultipleObjects(compressingCompletedEvents.Size(), + &compressingCompletedEvents.Front(), FALSE, INFINITE); + int t = (int)(result - WAIT_OBJECT_0); + CThreadInfo &threadInfo = threads.Threads[threadIndices[t]]; + threadInfo.InStream.Release(); + threadInfo.IsFree = true; + RINOK(threadInfo.Result); + threadIndices.Delete(t); + compressingCompletedEvents.Delete(t); + if (t == 0) + { + RINOK(threadInfo.OutStreamSpec->WriteToRealStream()); + threadInfo.OutStreamSpec->ReleaseOutStream(); + SetItemInfoFromCompressingResult(threadInfo.CompressingResult, + options->IsAesMode, options->AesKeyMode, item); + SetFileHeader(archive, *options, ui, item); + archive.WriteLocalHeader(item); + } + else + { + CMemBlocks2 &memRef = refs.Refs[threadInfo.UpdateIndex]; + threadInfo.OutStreamSpec->DetachData(memRef); + memRef.CompressingResult = threadInfo.CompressingResult; + memRef.Defined = true; + continue; + } + } + } + } + else + { + RINOK(UpdateItemOldData(archive, inStream, ui, item, progress, complexity)); + } + items.Add(item); + complexity += NFileHeader::kLocalBlockSize; + mtProgressMixerSpec->Mixer2->SetProgressOffset(complexity); + itemIndex++; + } + archive.WriteCentralDir(items, comment); + return S_OK; + #endif +} + +static const size_t kCacheBlockSize = (1 << 20); +static const size_t kCacheSize = (kCacheBlockSize << 2); +static const size_t kCacheMask = (kCacheSize - 1); + +class CCacheOutStream: + public IOutStream, + public CMyUnknownImp +{ + CMyComPtr _stream; + Byte *_cache; + UInt64 _virtPos; + UInt64 _virtSize; + UInt64 _phyPos; + UInt64 _phySize; // <= _virtSize + UInt64 _cachedPos; // (_cachedPos + _cachedSize) <= _virtSize + size_t _cachedSize; + + HRESULT MyWrite(size_t size); + HRESULT MyWriteBlock() + { + return MyWrite(kCacheBlockSize - ((size_t)_cachedPos & (kCacheBlockSize - 1))); + } + HRESULT FlushCache(); +public: + CCacheOutStream(): _cache(0) {} + ~CCacheOutStream(); + bool Allocate(); + HRESULT Init(IOutStream *stream); + + MY_UNKNOWN_IMP + + STDMETHOD(Write)(const void *data, UInt32 size, UInt32 *processedSize); + STDMETHOD(Seek)(Int64 offset, UInt32 seekOrigin, UInt64 *newPosition); + STDMETHOD(SetSize)(UInt64 newSize); +}; + +bool CCacheOutStream::Allocate() +{ + if (!_cache) + _cache = (Byte *)::MidAlloc(kCacheSize); + return (_cache != NULL); +} + +HRESULT CCacheOutStream::Init(IOutStream *stream) +{ + _virtPos = _phyPos = 0; + _stream = stream; + RINOK(_stream->Seek(0, STREAM_SEEK_CUR, &_virtPos)); + RINOK(_stream->Seek(0, STREAM_SEEK_END, &_virtSize)); + RINOK(_stream->Seek(_virtPos, STREAM_SEEK_SET, &_virtPos)); + _phyPos = _virtPos; + _phySize = _virtSize; + _cachedPos = 0; + _cachedSize = 0; + return S_OK; +} + +HRESULT CCacheOutStream::MyWrite(size_t size) +{ + while (size != 0 && _cachedSize != 0) + { + if (_phyPos != _cachedPos) + { + RINOK(_stream->Seek(_cachedPos, STREAM_SEEK_SET, &_phyPos)); + } + size_t pos = (size_t)_cachedPos & kCacheMask; + size_t curSize = MyMin(kCacheSize - pos, _cachedSize); + curSize = MyMin(curSize, size); + RINOK(WriteStream(_stream, _cache + pos, curSize)); + _phyPos += curSize; + if (_phySize < _phyPos) + _phySize = _phyPos; + _cachedPos += curSize; + _cachedSize -= curSize; + size -= curSize; + } + return S_OK; +} + +HRESULT CCacheOutStream::FlushCache() +{ + return MyWrite(_cachedSize); +} + +CCacheOutStream::~CCacheOutStream() +{ + FlushCache(); + if (_virtSize != _phySize) + _stream->SetSize(_virtSize); + if (_virtPos != _phyPos) + _stream->Seek(_virtPos, STREAM_SEEK_SET, NULL); + ::MidFree(_cache); +} + +STDMETHODIMP CCacheOutStream::Write(const void *data, UInt32 size, UInt32 *processedSize) +{ + if (processedSize) + *processedSize = 0; + if (size == 0) + return S_OK; + + UInt64 zerosStart = _virtPos; + if (_cachedSize != 0) + { + if (_virtPos < _cachedPos) + { + RINOK(FlushCache()); + } + else + { + UInt64 cachedEnd = _cachedPos + _cachedSize; + if (cachedEnd < _virtPos) + { + if (cachedEnd < _phySize) + { + RINOK(FlushCache()); + } + else + zerosStart = cachedEnd; + } + } + } + + if (_cachedSize == 0 && _phySize < _virtPos) + _cachedPos = zerosStart = _phySize; + + if (zerosStart != _virtPos) + { + // write zeros to [cachedEnd ... _virtPos) + + for (;;) + { + UInt64 cachedEnd = _cachedPos + _cachedSize; + size_t endPos = (size_t)cachedEnd & kCacheMask; + size_t curSize = kCacheSize - endPos; + if (curSize > _virtPos - cachedEnd) + curSize = (size_t)(_virtPos - cachedEnd); + if (curSize == 0) + break; + while (curSize > (kCacheSize - _cachedSize)) + { + RINOK(MyWriteBlock()); + } + memset(_cache + endPos, 0, curSize); + _cachedSize += curSize; + } + } + + if (_cachedSize == 0) + _cachedPos = _virtPos; + + size_t pos = (size_t)_virtPos & kCacheMask; + size = (UInt32)MyMin((size_t)size, kCacheSize - pos); + UInt64 cachedEnd = _cachedPos + _cachedSize; + if (_virtPos != cachedEnd) // _virtPos < cachedEnd + size = (UInt32)MyMin((size_t)size, (size_t)(cachedEnd - _virtPos)); + else + { + // _virtPos == cachedEnd + if (_cachedSize == kCacheSize) + { + RINOK(MyWriteBlock()); + } + size_t startPos = (size_t)_cachedPos & kCacheMask; + if (startPos > pos) + size = (UInt32)MyMin((size_t)size, (size_t)(startPos - pos)); + _cachedSize += size; + } + memcpy(_cache + pos, data, size); + if (processedSize) + *processedSize = size; + _virtPos += size; + if (_virtSize < _virtPos) + _virtSize = _virtPos; + return S_OK; +} + +STDMETHODIMP CCacheOutStream::Seek(Int64 offset, UInt32 seekOrigin, UInt64 *newPosition) +{ + switch(seekOrigin) + { + case STREAM_SEEK_SET: _virtPos = offset; break; + case STREAM_SEEK_CUR: _virtPos += offset; break; + case STREAM_SEEK_END: _virtPos = _virtSize + offset; break; + default: return STG_E_INVALIDFUNCTION; + } + if (newPosition) + *newPosition = _virtPos; + return S_OK; +} + +STDMETHODIMP CCacheOutStream::SetSize(UInt64 newSize) +{ + _virtSize = newSize; + if (newSize < _phySize) + { + RINOK(_stream->SetSize(newSize)); + _phySize = newSize; + } + if (newSize <= _cachedPos) + { + _cachedSize = 0; + _cachedPos = newSize; + } + if (newSize < _cachedPos + _cachedSize) + _cachedSize = (size_t)(newSize - _cachedPos); + return S_OK; +} + + +HRESULT Update( + DECL_EXTERNAL_CODECS_LOC_VARS + const CObjectVector &inputItems, + const CObjectVector &updateItems, + ISequentialOutStream *seqOutStream, + CInArchive *inArchive, + CCompressionMethodMode *compressionMethodMode, + IArchiveUpdateCallback *updateCallback) +{ + CMyComPtr outStream; + { + CMyComPtr outStreamReal; + seqOutStream->QueryInterface(IID_IOutStream, (void **)&outStreamReal); + if (!outStreamReal) + return E_NOTIMPL; + CCacheOutStream *cacheStream = new CCacheOutStream(); + outStream = cacheStream; + if (!cacheStream->Allocate()) + return E_OUTOFMEMORY; + RINOK(cacheStream->Init(outStreamReal)); + } + + if (inArchive) + { + if (inArchive->ArcInfo.Base != 0 || + inArchive->ArcInfo.StartPosition != 0 || + !inArchive->IsOkHeaders) + return E_NOTIMPL; + } + + COutArchive outArchive; + outArchive.Create(outStream); + /* + if (inArchive && inArchive->ArcInfo.StartPosition > 0) + { + CMyComPtr inStream; + inStream.Attach(inArchive->CreateLimitedStream(0, inArchive->ArcInfo.StartPosition)); + RINOK(CopyBlockToArchive(inStream, outArchive, NULL)); + outArchive.MoveBasePosition(inArchive->ArcInfo.StartPosition); + } + */ + CMyComPtr inStream; + if (inArchive) + inStream.Attach(inArchive->CreateStream()); + + return Update2( + EXTERNAL_CODECS_LOC_VARS + outArchive, inArchive, inStream, + inputItems, updateItems, + compressionMethodMode, + inArchive ? &inArchive->ArcInfo.Comment : NULL, + updateCallback); +} + +}} diff --git a/CPP/7zip/Archive/Zip/ZipUpdate.h b/CPP/7zip/Archive/Zip/ZipUpdate.h new file mode 100644 index 0000000..eee1673 --- /dev/null +++ b/CPP/7zip/Archive/Zip/ZipUpdate.h @@ -0,0 +1,58 @@ +// Zip/Update.h + +#ifndef __ZIP_UPDATE_H +#define __ZIP_UPDATE_H + +#include "../../ICoder.h" +#include "../IArchive.h" + +#include "../../Common/CreateCoder.h" + +#include "ZipCompressionMode.h" +#include "ZipIn.h" + +namespace NArchive { +namespace NZip { + +struct CUpdateRange +{ + UInt64 Position; + UInt64 Size; + CUpdateRange() {}; + CUpdateRange(UInt64 position, UInt64 size): Position(position), Size(size) {}; +}; + +struct CUpdateItem +{ + bool NewData; + bool NewProperties; + bool IsDir; + bool NtfsTimeIsDefined; + bool IsUtf8; + int IndexInArchive; + int IndexInClient; + UInt32 Attributes; + UInt32 Time; + UInt64 Size; + AString Name; + // bool Commented; + // CUpdateRange CommentRange; + FILETIME NtfsMTime; + FILETIME NtfsATime; + FILETIME NtfsCTime; + + CUpdateItem(): NtfsTimeIsDefined(false), IsUtf8(false), Size(0) {} +}; + +HRESULT Update( + DECL_EXTERNAL_CODECS_LOC_VARS + const CObjectVector &inputItems, + const CObjectVector &updateItems, + ISequentialOutStream *seqOutStream, + CInArchive *inArchive, + CCompressionMethodMode *compressionMethodMode, + IArchiveUpdateCallback *updateCallback); + +}} + +#endif diff --git a/CPP/7zip/Bundles/Alone/makefile b/CPP/7zip/Bundles/Alone/makefile new file mode 100644 index 0000000..4a51ebc --- /dev/null +++ b/CPP/7zip/Bundles/Alone/makefile @@ -0,0 +1,275 @@ +PROG=../../../../bin/7za$(BINSUFFIX) + +LOCAL_FLAGS= \ + -DBREAK_HANDLER \ + -DUNICODE -D_UNICODE + + +include ../../../../makefile.crc32 +include ../../../../makefile.machine + +PCH_NAME=$(PRE_COMPILED_HEADER) + +LIBS=$(LOCAL_LIBS) + +CONSOLE_OBJS = \ + BenchCon.o \ + ConsoleClose.o \ + ExtractCallbackConsole.o \ + List.o \ + Main.o \ + MainAr.o \ + OpenCallbackConsole.o \ + PercentPrinter.o \ + UpdateCallbackConsole.o \ + UserInputUtils.o + +COMMON_OBJS = \ + CommandLineParser.o \ + CRC.o \ + IntToString.o \ + ListFileUtils.o \ + StdInStream.o \ + StdOutStream.o \ + MyString.o \ + StringConvert.o \ + StringToInt.o \ + UTFConvert.o \ + MyWindows.o \ + MyVector.o \ + Wildcard.o + +# DLL.o MemoryLock.o +WIN_OBJS = \ + Error.o \ + FileDir.o \ + FileFind.o \ + FileIO.o \ + FileName.o \ + PropVariant.o \ + PropVariantConversions.o \ + Synchronization.o \ + System.o \ + Time.o + +7ZIP_COMMON_OBJS = \ + CreateCoder.o \ + CWrappers.o \ + FilePathAutoRename.o \ + FileStreams.o \ + FilterCoder.o \ + InBuffer.o \ + InOutTempBuffer.o \ + LimitedStreams.o \ + LockedStream.o \ + MemBlocks.o \ + MethodId.o \ + MethodProps.o \ + OffsetStream.o \ + OutBuffer.o \ + OutMemStream.o \ + ProgressMt.o \ + ProgressUtils.o \ + StreamBinder.o \ + StreamObjects.o \ + StreamUtils.o \ + VirtThread.o + +# WorkDir.o +UI_COMMON_OBJS = \ + ArchiveCommandLine.o \ + ArchiveExtractCallback.o \ + ArchiveOpenCallback.o \ + Bench.o \ + DefaultName.o \ + EnumDirItems.o \ + Extract.o \ + ExtractingFilePath.o \ + LoadCodecs.o \ + OpenArchive.o \ + PropIDUtils.o \ + SetProperties.o \ + SortUtils.o \ + TempFiles.o \ + Update.o \ + UpdateAction.o \ + UpdateCallback.o \ + UpdatePair.o \ + UpdateProduce.o \ + +AR_OBJS = \ + Bz2Handler.o \ + DeflateProps.o \ + GzHandler.o \ + LzmaHandler.o \ + PpmdHandler.o \ + SplitHandler.o \ + XzHandler.o \ + ZHandler.o \ + +AR_COMMON_OBJS = \ + CoderMixer2.o \ + CoderMixer2MT.o \ + CrossThreadProgress.o \ + DummyOutStream.o \ + FindSignature.o \ + HandlerOut.o \ + InStreamWithCRC.o \ + ItemNameUtils.o \ + MultiStream.o \ + OutStreamWithCRC.o \ + ParseProperties.o + + +7Z_OBJS = \ + 7zCompressionMode.o \ + 7zDecode.o \ + 7zEncode.o \ + 7zExtract.o \ + 7zFolderInStream.o \ + 7zFolderOutStream.o \ + 7zHandler.o \ + 7zHandlerOut.o \ + 7zHeader.o \ + 7zIn.o \ + 7zOut.o \ + 7zProperties.o \ + 7zSpecStream.o \ + 7zUpdate.o \ + 7zRegister.o + +CAB_OBJS = \ + CabBlockInStream.o \ + CabHandler.o \ + CabHeader.o \ + CabIn.o \ + CabRegister.o \ + +TAR_OBJS = \ + TarHandler.o \ + TarHandlerOut.o \ + TarHeader.o \ + TarIn.o \ + TarOut.o \ + TarUpdate.o \ + TarRegister.o + +ZIP_OBJS = \ + ZipAddCommon.o \ + ZipHandler.o \ + ZipHandlerOut.o \ + ZipHeader.o \ + ZipIn.o \ + ZipItem.o \ + ZipOut.o \ + ZipUpdate.o \ + ZipRegister.o + +COMPRESS_OBJS = \ + Bcj2Coder.o \ + Bcj2Register.o \ + BcjCoder.o \ + BcjRegister.o \ + BitlDecoder.o \ + BranchCoder.o \ + BranchMisc.o \ + BranchRegister.o \ + ByteSwap.o \ + BZip2Crc.o \ + BZip2Decoder.o \ + BZip2Encoder.o \ + BZip2Register.o \ + CopyCoder.o \ + CopyRegister.o \ + Deflate64Register.o \ + DeflateDecoder.o \ + DeflateEncoder.o \ + DeflateRegister.o \ + DeltaFilter.o \ + ImplodeDecoder.o \ + ImplodeHuffmanDecoder.o \ + Lzma2Decoder.o \ + Lzma2Encoder.o \ + Lzma2Register.o \ + LzmaDecoder.o \ + LzmaEncoder.o \ + LzmaRegister.o \ + LzOutWindow.o \ + Lzx86Converter.o \ + LzxDecoder.o \ + PpmdDecoder.o \ + PpmdEncoder.o \ + PpmdRegister.o \ + PpmdZip.o \ + QuantumDecoder.o \ + ShrinkDecoder.o \ + ZDecoder.o \ + +CRYPTO_OBJS = \ + 7zAes.o \ + 7zAesRegister.o \ + HmacSha1.o \ + MyAes.o \ + Pbkdf2HmacSha1.o \ + RandGen.o \ + Sha1.o \ + WzAes.o \ + ZipCrypto.o \ + ZipStrong.o \ + +C_OBJS = \ + 7zStream.o \ + Aes.o \ + Alloc.o \ + Bra.o \ + Bra86.o \ + BraIA64.o \ + BwtSort.o \ + Delta.o \ + HuffEnc.o \ + LzFind.o \ + LzFindMt.o \ + Lzma2Dec.o \ + Lzma2Enc.o \ + LzmaDec.o \ + LzmaEnc.o \ + MtCoder.o \ + Ppmd7.o \ + Ppmd7Dec.o \ + Ppmd7Enc.o \ + Ppmd8.o \ + Ppmd8Dec.o \ + Ppmd8Enc.o \ + Sha256.o \ + Sort.o \ + Threads.o \ + Xz.o \ + XzCrc64.o \ + XzDec.o \ + XzEnc.o \ + XzIn.o + + +OBJS=\ +myGetTickCount.o \ +wine_date_and_time.o \ +myAddExeFlag.o \ +mySplitCommandLine.o \ + $(CONSOLE_OBJS) \ + $(COMMON_OBJS) \ + $(WIN_OBJS) \ + $(7ZIP_COMMON_OBJS) \ + $(UI_COMMON_OBJS) \ + $(AR_OBJS) \ + $(AR_COMMON_OBJS) \ + $(7Z_OBJS) \ + $(CAB_OBJS) \ + $(TAR_OBJS) \ + $(ZIP_OBJS) \ + $(COMPRESS_OBJS) \ + $(CRYPTO_OBJS) \ + $(C_OBJS) \ + $(OBJ_CRC32) + +include ../../../../makefile.glb + diff --git a/CPP/7zip/Bundles/Alone/makefile.depend b/CPP/7zip/Bundles/Alone/makefile.depend new file mode 100644 index 0000000..1f7f171 --- /dev/null +++ b/CPP/7zip/Bundles/Alone/makefile.depend @@ -0,0 +1,4026 @@ +myGetTickCount.o: ../../../myWindows/myGetTickCount.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h +wine_date_and_time.o: ../../../myWindows/wine_date_and_time.cpp \ + ../../../myWindows/config.h ../../../include_windows/windows.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../include_windows/basetyps.h +myAddExeFlag.o: ../../../myWindows/myAddExeFlag.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../../myWindows/myPrivate.h ../../../Common/StringConvert.h \ + ../../../Common/MyWindows.h ../../../Common/MyString.h \ + ../../../Common/MyVector.h ../../../Common/Defs.h +mySplitCommandLine.o: ../../../myWindows/mySplitCommandLine.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../../myWindows/../Common/StringConvert.h \ + ../../../myWindows/../Common/MyWindows.h \ + ../../../myWindows/../Common/MyString.h \ + ../../../myWindows/../Common/MyVector.h \ + ../../../myWindows/../Common/Defs.h ../../../myWindows/../Common/Types.h \ + ../../../myWindows/myPrivate.h +BenchCon.o: ../../UI/Console/BenchCon.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h \ + ../../UI/Console/../../../Common/IntToString.h \ + ../../UI/Console/../../../Common/Types.h \ + ../../UI/Console/../../../Common/MyCom.h \ + ../../UI/Console/../../../Common/MyWindows.h \ + ../../UI/Console/../../../Windows/System.h \ + ../../UI/Console/../../../Windows/../Common/Types.h \ + ../../UI/Console/../Common/Bench.h \ + ../../UI/Console/../Common/../../Common/CreateCoder.h \ + ../../UI/Console/../Common/../../Common/../../Common/MyCom.h \ + ../../UI/Console/../Common/../../Common/../../Common/MyString.h \ + ../../UI/Console/../Common/../../Common/../../Common/MyVector.h \ + ../../UI/Console/../Common/../../Common/../../Common/Defs.h \ + ../../UI/Console/../Common/../../Common/../ICoder.h \ + ../../UI/Console/../Common/../../Common/../IStream.h \ + ../../UI/Console/../Common/../../Common/../../Common/MyUnknown.h \ + ../../UI/Console/../Common/../../Common/../../Common/MyWindows.h \ + ../../UI/Console/../Common/../../Common/../../Common/Types.h \ + ../../UI/Console/../Common/../../Common/../IDecl.h \ + ../../UI/Console/../Common/../../Common/MethodId.h \ + ../../UI/Console/../Common/../../Common/../../Common/Types.h \ + ../../UI/Console/BenchCon.h ../../UI/Console/../../Common/CreateCoder.h \ + ../../UI/Console/ConsoleClose.h +ConsoleClose.o: ../../UI/Console/ConsoleClose.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../UI/Console/ConsoleClose.h +ExtractCallbackConsole.o: ../../UI/Console/ExtractCallbackConsole.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../UI/Console/ExtractCallbackConsole.h ../../../Common/MyString.h \ + ../../../Common/MyVector.h ../../../Common/Defs.h \ + ../../../Common/StdOutStream.h \ + ../../UI/Console/../../Common/FileStreams.h \ + ../../UI/Console/../../Common/../../Windows/FileIO.h \ + ../../UI/Console/../../Common/../../Common/MyCom.h \ + ../../UI/Console/../../Common/../../Common/MyWindows.h \ + ../../UI/Console/../../Common/../IStream.h \ + ../../UI/Console/../../Common/../../Common/MyUnknown.h \ + ../../UI/Console/../../Common/../../Common/Types.h \ + ../../UI/Console/../../Common/../IDecl.h \ + ../../UI/Console/../../IPassword.h \ + ../../UI/Console/../../../Common/MyUnknown.h \ + ../../UI/Console/../../../Common/Types.h ../../UI/Console/../../IDecl.h \ + ../../UI/Console/../../Archive/IArchive.h \ + ../../UI/Console/../../Archive/../IProgress.h \ + ../../UI/Console/../../Archive/../../Common/MyUnknown.h \ + ../../UI/Console/../../Archive/../../Common/Types.h \ + ../../UI/Console/../../Archive/../IDecl.h \ + ../../UI/Console/../../Archive/../IStream.h \ + ../../UI/Console/../../Archive/../PropID.h \ + ../../UI/Console/../Common/ArchiveExtractCallback.h \ + ../../../Common/MyCom.h ../../../Common/Wildcard.h \ + ../../../Common/MyString.h ../../UI/Console/../Common/../../IPassword.h \ + ../../UI/Console/../Common/../../Common/FileStreams.h \ + ../../UI/Console/../Common/../../Common/ProgressUtils.h \ + ../../UI/Console/../Common/../../Common/../../Common/MyCom.h \ + ../../UI/Console/../Common/../../Common/../ICoder.h \ + ../../UI/Console/../Common/../../Common/../IStream.h \ + ../../UI/Console/../Common/../../Common/../IProgress.h \ + ../../UI/Console/../Common/../../Archive/IArchive.h \ + ../../UI/Console/../Common/../../Archive/Common/OutStreamWithCRC.h \ + ../../UI/Console/../Common/../../Archive/Common/../../../../C/7zCrc.h \ + ../../UI/Console/../Common/../../Archive/Common/../../../../C/Types.h \ + ../../UI/Console/../Common/../../Archive/Common/../../../Common/MyCom.h \ + ../../UI/Console/../Common/../../Archive/Common/../../IStream.h \ + ../../UI/Console/../Common/ExtractMode.h \ + ../../UI/Console/../Common/IFileExtractCallback.h \ + ../../UI/Console/../Common/../../IDecl.h \ + ../../UI/Console/../Common/OpenArchive.h ../../../Windows/FileFind.h \ + ../../../Windows/../Common/MyString.h ../../../Windows/FileName.h \ + ../../../Windows/../../C/Types.h ../../../Windows/Defs.h \ + ../../../Windows/../Common/MyWindows.h \ + ../../UI/Console/../Common/ArchiveOpenCallback.h \ + ../../UI/Console/../Common/LoadCodecs.h \ + ../../UI/Console/../Common/../../../Common/Types.h \ + ../../UI/Console/../Common/../../../Common/MyCom.h \ + ../../UI/Console/../Common/../../../Common/MyString.h \ + ../../UI/Console/../Common/../../../Common/Buffer.h \ + ../../UI/Console/../Common/../../../Common/Defs.h \ + ../../UI/Console/../Common/../../ICoder.h \ + ../../UI/Console/UserInputUtils.h ../../UI/Console/ConsoleClose.h \ + ../../../Windows/FileDir.h ../../../Windows/Time.h \ + ../../../Windows/Defs.h ../../../Windows/PropVariant.h \ + ../../../Windows/../Common/Types.h ../../../Windows/Error.h \ + ../../../Windows/PropVariantConversions.h \ + ../../UI/Console/../../Common/FilePathAutoRename.h \ + ../../UI/Console/../Common/ExtractingFilePath.h +List.o: ../../UI/Console/List.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../../Common/IntToString.h \ + ../../../Common/MyCom.h ../../../Common/MyWindows.h \ + ../../../Common/StdOutStream.h ../../../Common/StringConvert.h \ + ../../../Common/MyString.h ../../../Common/MyVector.h \ + ../../../Common/Defs.h ../../../Windows/Error.h \ + ../../../Common/MyString.h ../../../Windows/FileDir.h \ + ../../../Windows/../Common/MyString.h ../../../Windows/Defs.h \ + ../../../Windows/../Common/MyWindows.h ../../../Windows/PropVariant.h \ + ../../../Windows/../Common/Types.h \ + ../../../Windows/PropVariantConversions.h \ + ../../UI/Console/../../Archive/IArchive.h \ + ../../UI/Console/../../Archive/../IProgress.h \ + ../../UI/Console/../../Archive/../../Common/MyUnknown.h \ + ../../UI/Console/../../Archive/../../Common/MyWindows.h \ + ../../UI/Console/../../Archive/../../Common/Types.h \ + ../../UI/Console/../../Archive/../IDecl.h \ + ../../UI/Console/../../Archive/../IStream.h \ + ../../UI/Console/../../Archive/../PropID.h \ + ../../UI/Console/../Common/OpenArchive.h ../../../Windows/FileFind.h \ + ../../../Windows/FileName.h ../../../Windows/../../C/Types.h \ + ../../UI/Console/../Common/../../Archive/IArchive.h \ + ../../UI/Console/../Common/ArchiveOpenCallback.h \ + ../../UI/Console/../Common/../../IPassword.h \ + ../../UI/Console/../Common/../../../Common/MyUnknown.h \ + ../../UI/Console/../Common/../../../Common/Types.h \ + ../../UI/Console/../Common/../../IDecl.h \ + ../../UI/Console/../Common/LoadCodecs.h \ + ../../UI/Console/../Common/../../../Common/Types.h \ + ../../UI/Console/../Common/../../../Common/MyCom.h \ + ../../UI/Console/../Common/../../../Common/MyString.h \ + ../../UI/Console/../Common/../../../Common/Buffer.h \ + ../../UI/Console/../Common/../../../Common/Defs.h \ + ../../UI/Console/../Common/../../ICoder.h \ + ../../UI/Console/../Common/../../IStream.h \ + ../../UI/Console/../Common/PropIDUtils.h ../../UI/Console/ConsoleClose.h \ + ../../UI/Console/List.h ../../../Common/Wildcard.h \ + ../../UI/Console/../Common/LoadCodecs.h \ + ../../UI/Console/OpenCallbackConsole.h \ + ../../UI/Console/../Common/ArchiveOpenCallback.h +Main.o: ../../UI/Console/Main.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../UI/Console/../../../../C/Alloc.h \ + ../../../Common/MyInitGuid.h ../../../Common/CommandLineParser.h \ + ../../../Common/MyString.h ../../../Common/MyVector.h \ + ../../../Common/Defs.h ../../../Common/IntToString.h \ + ../../../Common/MyException.h ../../../Common/MyWindows.h \ + ../../../Common/StdOutStream.h ../../../Common/StringConvert.h \ + ../../../Common/StringToInt.h ../../../Windows/Error.h \ + ../../../Common/MyString.h \ + ../../UI/Console/../Common/ArchiveCommandLine.h \ + ../../../Common/Wildcard.h ../../UI/Console/../Common/Extract.h \ + ../../../Windows/FileFind.h ../../../Windows/../Common/MyString.h \ + ../../../Windows/FileName.h ../../../Windows/../../C/Types.h \ + ../../../Windows/Defs.h ../../../Windows/../Common/MyWindows.h \ + ../../UI/Console/../Common/../../Archive/IArchive.h \ + ../../UI/Console/../Common/../../Archive/../IProgress.h \ + ../../UI/Console/../Common/../../Archive/../../Common/MyUnknown.h \ + ../../UI/Console/../Common/../../Archive/../../Common/MyWindows.h \ + ../../UI/Console/../Common/../../Archive/../../Common/Types.h \ + ../../UI/Console/../Common/../../Archive/../IDecl.h \ + ../../UI/Console/../Common/../../Archive/../IStream.h \ + ../../UI/Console/../Common/../../Archive/../PropID.h \ + ../../UI/Console/../Common/ArchiveExtractCallback.h \ + ../../../Common/MyCom.h ../../UI/Console/../Common/../../IPassword.h \ + ../../UI/Console/../Common/../../../Common/MyUnknown.h \ + ../../UI/Console/../Common/../../../Common/Types.h \ + ../../UI/Console/../Common/../../IDecl.h \ + ../../UI/Console/../Common/../../Common/FileStreams.h \ + ../../UI/Console/../Common/../../Common/../../Windows/FileIO.h \ + ../../UI/Console/../Common/../../Common/../../Common/MyCom.h \ + ../../UI/Console/../Common/../../Common/../IStream.h \ + ../../UI/Console/../Common/../../Common/ProgressUtils.h \ + ../../UI/Console/../Common/../../Common/../ICoder.h \ + ../../UI/Console/../Common/../../Common/../IStream.h \ + ../../UI/Console/../Common/../../Common/../IProgress.h \ + ../../UI/Console/../Common/../../Archive/Common/OutStreamWithCRC.h \ + ../../UI/Console/../Common/../../Archive/Common/../../../../C/7zCrc.h \ + ../../UI/Console/../Common/../../Archive/Common/../../../../C/Types.h \ + ../../UI/Console/../Common/../../Archive/Common/../../../Common/MyCom.h \ + ../../UI/Console/../Common/../../Archive/Common/../../IStream.h \ + ../../UI/Console/../Common/ExtractMode.h \ + ../../UI/Console/../Common/IFileExtractCallback.h \ + ../../UI/Console/../Common/../../IDecl.h \ + ../../UI/Console/../Common/OpenArchive.h \ + ../../UI/Console/../Common/ArchiveOpenCallback.h \ + ../../UI/Console/../Common/LoadCodecs.h \ + ../../UI/Console/../Common/../../../Common/Types.h \ + ../../UI/Console/../Common/../../../Common/MyCom.h \ + ../../UI/Console/../Common/../../../Common/MyString.h \ + ../../UI/Console/../Common/../../../Common/Buffer.h \ + ../../UI/Console/../Common/../../../Common/Defs.h \ + ../../UI/Console/../Common/../../ICoder.h \ + ../../UI/Console/../Common/Property.h \ + ../../UI/Console/../Common/../Common/LoadCodecs.h \ + ../../UI/Console/../Common/Update.h \ + ../../UI/Console/../Common/UpdateAction.h \ + ../../UI/Console/../Common/UpdateCallback.h \ + ../../UI/Console/../Common/../Common/UpdatePair.h \ + ../../UI/Console/../Common/../Common/DirItem.h \ + ../../UI/Console/../Common/../Common/../../Archive/IArchive.h \ + ../../UI/Console/../Common/../Common/UpdateAction.h \ + ../../UI/Console/../Common/../Common/UpdateProduce.h \ + ../../UI/Console/../Common/../Common/UpdatePair.h \ + ../../UI/Console/../Common/ExitCode.h \ + ../../UI/Console/../Common/Extract.h ../../UI/Console/BenchCon.h \ + ../../UI/Console/../../Common/CreateCoder.h \ + ../../UI/Console/../../Common/../../Common/MyCom.h \ + ../../UI/Console/../../Common/../../Common/MyString.h \ + ../../UI/Console/../../Common/../ICoder.h \ + ../../UI/Console/../../Common/MethodId.h \ + ../../UI/Console/../../Common/../../Common/Types.h \ + ../../UI/Console/ExtractCallbackConsole.h \ + ../../UI/Console/../../Common/FileStreams.h \ + ../../UI/Console/../../IPassword.h \ + ../../UI/Console/../../Archive/IArchive.h \ + ../../UI/Console/../Common/ArchiveExtractCallback.h \ + ../../UI/Console/List.h ../../UI/Console/../Common/LoadCodecs.h \ + ../../UI/Console/OpenCallbackConsole.h \ + ../../UI/Console/../Common/ArchiveOpenCallback.h \ + ../../UI/Console/UpdateCallbackConsole.h \ + ../../UI/Console/../Common/Update.h ../../UI/Console/PercentPrinter.h \ + ../../UI/Console/../../MyVersion.h ../../../myWindows/myPrivate.h \ + ../../../Windows/System.h ../../../Windows/../Common/Types.h +MainAr.o: ../../UI/Console/MainAr.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../../Common/NewHandler.h \ + ../../../Common/MyException.h ../../../Common/MyWindows.h \ + ../../../Common/StdOutStream.h ../../../Windows/Error.h \ + ../../../Common/MyString.h ../../../Common/MyVector.h \ + ../../../Common/Defs.h ../../../Windows/NtCheck.h \ + ../../UI/Console/../Common/ArchiveCommandLine.h \ + ../../../Common/CommandLineParser.h ../../../Common/MyString.h \ + ../../../Common/Wildcard.h ../../UI/Console/../Common/Extract.h \ + ../../../Windows/FileFind.h ../../../Windows/../Common/MyString.h \ + ../../../Windows/FileName.h ../../../Windows/../../C/Types.h \ + ../../../Windows/Defs.h ../../../Windows/../Common/MyWindows.h \ + ../../UI/Console/../Common/../../Archive/IArchive.h \ + ../../UI/Console/../Common/../../Archive/../IProgress.h \ + ../../UI/Console/../Common/../../Archive/../../Common/MyUnknown.h \ + ../../UI/Console/../Common/../../Archive/../../Common/MyWindows.h \ + ../../UI/Console/../Common/../../Archive/../../Common/Types.h \ + ../../UI/Console/../Common/../../Archive/../IDecl.h \ + ../../UI/Console/../Common/../../Archive/../IStream.h \ + ../../UI/Console/../Common/../../Archive/../PropID.h \ + ../../UI/Console/../Common/ArchiveExtractCallback.h \ + ../../../Common/MyCom.h ../../UI/Console/../Common/../../IPassword.h \ + ../../UI/Console/../Common/../../../Common/MyUnknown.h \ + ../../UI/Console/../Common/../../../Common/Types.h \ + ../../UI/Console/../Common/../../IDecl.h \ + ../../UI/Console/../Common/../../Common/FileStreams.h \ + ../../UI/Console/../Common/../../Common/../../Windows/FileIO.h \ + ../../UI/Console/../Common/../../Common/../../Common/MyCom.h \ + ../../UI/Console/../Common/../../Common/../IStream.h \ + ../../UI/Console/../Common/../../Common/ProgressUtils.h \ + ../../UI/Console/../Common/../../Common/../ICoder.h \ + ../../UI/Console/../Common/../../Common/../IStream.h \ + ../../UI/Console/../Common/../../Common/../IProgress.h \ + ../../UI/Console/../Common/../../Archive/Common/OutStreamWithCRC.h \ + ../../UI/Console/../Common/../../Archive/Common/../../../../C/7zCrc.h \ + ../../UI/Console/../Common/../../Archive/Common/../../../../C/Types.h \ + ../../UI/Console/../Common/../../Archive/Common/../../../Common/MyCom.h \ + ../../UI/Console/../Common/../../Archive/Common/../../IStream.h \ + ../../UI/Console/../Common/ExtractMode.h \ + ../../UI/Console/../Common/IFileExtractCallback.h \ + ../../UI/Console/../Common/../../IDecl.h \ + ../../UI/Console/../Common/OpenArchive.h \ + ../../UI/Console/../Common/ArchiveOpenCallback.h \ + ../../UI/Console/../Common/LoadCodecs.h \ + ../../UI/Console/../Common/../../../Common/Types.h \ + ../../UI/Console/../Common/../../../Common/MyCom.h \ + ../../UI/Console/../Common/../../../Common/MyString.h \ + ../../UI/Console/../Common/../../../Common/Buffer.h \ + ../../UI/Console/../Common/../../../Common/Defs.h \ + ../../UI/Console/../Common/../../ICoder.h \ + ../../UI/Console/../Common/Property.h \ + ../../UI/Console/../Common/../Common/LoadCodecs.h \ + ../../UI/Console/../Common/Update.h \ + ../../UI/Console/../Common/UpdateAction.h \ + ../../UI/Console/../Common/UpdateCallback.h \ + ../../UI/Console/../Common/../Common/UpdatePair.h \ + ../../UI/Console/../Common/../Common/DirItem.h \ + ../../UI/Console/../Common/../Common/../../Archive/IArchive.h \ + ../../UI/Console/../Common/../Common/UpdateAction.h \ + ../../UI/Console/../Common/../Common/UpdateProduce.h \ + ../../UI/Console/../Common/../Common/UpdatePair.h \ + ../../UI/Console/../Common/ExitCode.h ../../UI/Console/ConsoleClose.h +OpenCallbackConsole.o: ../../UI/Console/OpenCallbackConsole.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../UI/Console/OpenCallbackConsole.h ../../../Common/StdOutStream.h \ + ../../UI/Console/../Common/ArchiveOpenCallback.h ../../../Common/MyCom.h \ + ../../../Common/MyWindows.h ../../../Common/MyString.h \ + ../../../Common/MyVector.h ../../../Common/Defs.h \ + ../../../Windows/FileFind.h ../../../Windows/../Common/MyString.h \ + ../../../Windows/FileName.h ../../../Windows/../../C/Types.h \ + ../../../Windows/Defs.h ../../../Windows/../Common/MyWindows.h \ + ../../UI/Console/../Common/../../IPassword.h \ + ../../UI/Console/../Common/../../../Common/MyUnknown.h \ + ../../UI/Console/../Common/../../../Common/MyWindows.h \ + ../../UI/Console/../Common/../../../Common/Types.h \ + ../../UI/Console/../Common/../../IDecl.h \ + ../../UI/Console/../Common/../../Archive/IArchive.h \ + ../../UI/Console/../Common/../../Archive/../IProgress.h \ + ../../UI/Console/../Common/../../Archive/../../Common/MyUnknown.h \ + ../../UI/Console/../Common/../../Archive/../../Common/Types.h \ + ../../UI/Console/../Common/../../Archive/../IDecl.h \ + ../../UI/Console/../Common/../../Archive/../IStream.h \ + ../../UI/Console/../Common/../../Archive/../PropID.h \ + ../../UI/Console/ConsoleClose.h ../../UI/Console/UserInputUtils.h +PercentPrinter.o: ../../UI/Console/PercentPrinter.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../../Common/IntToString.h ../../../Common/MyString.h \ + ../../../Common/MyVector.h ../../../Common/Defs.h \ + ../../UI/Console/PercentPrinter.h ../../../Common/StdOutStream.h +UpdateCallbackConsole.o: ../../UI/Console/UpdateCallbackConsole.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../UI/Console/UpdateCallbackConsole.h ../../../Common/StdOutStream.h \ + ../../UI/Console/../Common/Update.h ../../../Common/Wildcard.h \ + ../../../Common/MyString.h ../../../Common/MyVector.h \ + ../../../Common/Defs.h ../../UI/Console/../Common/ArchiveOpenCallback.h \ + ../../../Common/MyCom.h ../../../Common/MyWindows.h \ + ../../../Common/MyString.h ../../../Windows/FileFind.h \ + ../../../Windows/../Common/MyString.h ../../../Windows/FileName.h \ + ../../../Windows/../../C/Types.h ../../../Windows/Defs.h \ + ../../../Windows/../Common/MyWindows.h \ + ../../UI/Console/../Common/../../IPassword.h \ + ../../UI/Console/../Common/../../../Common/MyUnknown.h \ + ../../UI/Console/../Common/../../../Common/MyWindows.h \ + ../../UI/Console/../Common/../../../Common/Types.h \ + ../../UI/Console/../Common/../../IDecl.h \ + ../../UI/Console/../Common/../../Archive/IArchive.h \ + ../../UI/Console/../Common/../../Archive/../IProgress.h \ + ../../UI/Console/../Common/../../Archive/../../Common/MyUnknown.h \ + ../../UI/Console/../Common/../../Archive/../../Common/Types.h \ + ../../UI/Console/../Common/../../Archive/../IDecl.h \ + ../../UI/Console/../Common/../../Archive/../IStream.h \ + ../../UI/Console/../Common/../../Archive/../PropID.h \ + ../../UI/Console/../Common/LoadCodecs.h \ + ../../UI/Console/../Common/../../../Common/Types.h \ + ../../UI/Console/../Common/../../../Common/MyCom.h \ + ../../UI/Console/../Common/../../../Common/MyString.h \ + ../../UI/Console/../Common/../../../Common/Buffer.h \ + ../../UI/Console/../Common/../../../Common/Defs.h \ + ../../UI/Console/../Common/../../ICoder.h \ + ../../UI/Console/../Common/../../IStream.h \ + ../../UI/Console/../Common/Property.h \ + ../../UI/Console/../Common/UpdateAction.h \ + ../../UI/Console/../Common/UpdateCallback.h \ + ../../UI/Console/../Common/../Common/UpdatePair.h \ + ../../UI/Console/../Common/../Common/DirItem.h \ + ../../UI/Console/../Common/../Common/../../Archive/IArchive.h \ + ../../UI/Console/../Common/../Common/UpdateAction.h \ + ../../UI/Console/../Common/../Common/UpdateProduce.h \ + ../../UI/Console/../Common/../Common/UpdatePair.h \ + ../../UI/Console/PercentPrinter.h ../../../Windows/Error.h \ + ../../../Windows/Synchronization.h ../../../Windows/../../C/Threads.h \ + ../../../Windows/../../C/Types.h ../../../Windows/Synchronization2.h \ + ../../UI/Console/ConsoleClose.h ../../UI/Console/UserInputUtils.h +UserInputUtils.o: ../../UI/Console/UserInputUtils.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../../Common/StdInStream.h ../../../Common/MyString.h \ + ../../../Common/MyVector.h ../../../Common/Defs.h \ + ../../../Common/StringConvert.h ../../../Common/MyWindows.h \ + ../../UI/Console/UserInputUtils.h ../../../Common/StdOutStream.h \ + ../../../Common/MyException.h +CommandLineParser.o: ../../../Common/CommandLineParser.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../../Common/CommandLineParser.h ../../../Common/MyString.h \ + ../../../Common/MyVector.h ../../../Common/Defs.h +CRC.o: ../../../Common/CRC.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../../Common/../../C/7zCrc.h \ + ../../../Common/../../C/Types.h +IntToString.o: ../../../Common/IntToString.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../../Common/IntToString.h +ListFileUtils.o: ../../../Common/ListFileUtils.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../../Common/MyWindows.h ../../../Common/../Windows/FileIO.h \ + ../../../Common/MyString.h ../../../Common/MyVector.h \ + ../../../Common/Defs.h ../../../Common/ListFileUtils.h \ + ../../../Common/MyString.h ../../../Common/StringConvert.h \ + ../../../Common/UTFConvert.h +StdInStream.o: ../../../Common/StdInStream.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../../Common/StdInStream.h ../../../Common/MyString.h \ + ../../../Common/MyVector.h ../../../Common/Defs.h \ + ../../../Common/StringConvert.h ../../../Common/MyWindows.h \ + ../../../myWindows/myPrivate.h +StdOutStream.o: ../../../Common/StdOutStream.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../../Common/StdOutStream.h ../../../Common/IntToString.h \ + ../../../Common/StringConvert.h ../../../Common/MyWindows.h \ + ../../../Common/MyString.h ../../../Common/MyVector.h \ + ../../../Common/Defs.h +MyString.o: ../../../Common/MyString.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../../Common/StringConvert.h \ + ../../../Common/MyWindows.h ../../../Common/MyString.h \ + ../../../Common/MyVector.h ../../../Common/Defs.h \ + ../../../myWindows/myPrivate.h +MyWindows.o: ../../../Common/MyWindows.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../../Common/MyWindows.h +StringConvert.o: ../../../Common/StringConvert.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../../Common/StringConvert.h ../../../Common/MyWindows.h \ + ../../../Common/MyString.h ../../../Common/MyVector.h \ + ../../../Common/Defs.h +StringToInt.o: ../../../Common/StringToInt.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../../Common/StringToInt.h +UTFConvert.o: ../../../Common/UTFConvert.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../../Common/UTFConvert.h \ + ../../../Common/MyString.h ../../../Common/MyVector.h \ + ../../../Common/Defs.h +MyVector.o: ../../../Common/MyVector.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../../Common/MyVector.h \ + ../../../Common/Defs.h +Wildcard.o: ../../../Common/Wildcard.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../../Common/Wildcard.h \ + ../../../Common/MyString.h ../../../Common/MyVector.h \ + ../../../Common/Defs.h +Error.o: ../../../Windows/Error.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../../Windows/Error.h \ + ../../../Common/MyString.h ../../../Common/MyVector.h \ + ../../../Common/Defs.h ../../../Common/StringConvert.h \ + ../../../Common/MyWindows.h ../../../Common/MyString.h +FileDir.o: ../../../Windows/FileDir.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../../Windows/FileDir.h \ + ../../../Windows/../Common/MyString.h \ + ../../../Windows/../Common/MyVector.h ../../../Windows/../Common/Defs.h \ + ../../../Windows/Defs.h ../../../Windows/../Common/MyWindows.h \ + ../../../Windows/FileName.h ../../../Windows/../../C/Types.h \ + ../../../Windows/FileFind.h ../../../Windows/../Common/StringConvert.h \ + ../../../Windows/../Common/MyWindows.h \ + ../../../Windows/../Common/MyString.h ../../../Windows/../Common/Types.h \ + ../../../Windows/../Common/IntToString.h ../../../myWindows/myPrivate.h \ + ../../../Windows/Synchronization.h ../../../Windows/../../C/Threads.h \ + ../../../Windows/../../C/Types.h ../../../Windows/Synchronization2.h +FileFind.o: ../../../Windows/FileFind.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../../Windows/FileFind.h \ + ../../../Windows/../Common/MyString.h \ + ../../../Windows/../Common/MyVector.h ../../../Windows/../Common/Defs.h \ + ../../../Windows/FileName.h ../../../Windows/../../C/Types.h \ + ../../../Windows/Defs.h ../../../Windows/../Common/MyWindows.h \ + ../../../Windows/../Common/StringConvert.h \ + ../../../Windows/../Common/MyWindows.h \ + ../../../Windows/../Common/MyString.h ../../../Windows/../Common/Types.h \ + ../../../myWindows/myPrivate.h +FileIO.o: ../../../Windows/FileIO.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../../Windows/FileIO.h \ + ../../../Common/MyString.h ../../../Common/MyVector.h \ + ../../../Common/Defs.h ../../../Windows/Defs.h \ + ../../../Windows/../Common/MyWindows.h \ + ../../../Windows/../Common/StringConvert.h \ + ../../../Windows/../Common/MyWindows.h \ + ../../../Windows/../Common/MyString.h ../../../Windows/../Common/Types.h \ + ../../../myWindows/myPrivate.h +FileName.o: ../../../Windows/FileName.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../../Windows/FileName.h \ + ../../../Windows/../../C/Types.h ../../../Windows/../Common/MyString.h \ + ../../../Windows/../Common/MyVector.h ../../../Windows/../Common/Defs.h \ + ../../../Common/Wildcard.h ../../../Common/MyString.h +PropVariant.o: ../../../Windows/PropVariant.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../../Windows/PropVariant.h ../../../Windows/../Common/MyWindows.h \ + ../../../Windows/../Common/Types.h ../../../Windows/../Common/Defs.h +PropVariantConversions.o: ../../../Windows/PropVariantConversions.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../../Common/IntToString.h ../../../Common/StringConvert.h \ + ../../../Common/MyWindows.h ../../../Common/MyString.h \ + ../../../Common/MyVector.h ../../../Common/Defs.h \ + ../../../Windows/Defs.h ../../../Windows/../Common/MyWindows.h \ + ../../../Windows/PropVariantConversions.h ../../../Common/MyString.h +Synchronization.o: ../../../Windows/Synchronization.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../../Windows/Synchronization.h ../../../Windows/Defs.h \ + ../../../Windows/../Common/MyWindows.h \ + ../../../Windows/../../C/Threads.h ../../../Windows/../../C/Types.h \ + ../../../Windows/Synchronization2.h +System.o: ../../../Windows/System.cpp ../../../Common/Types.h \ + ../../../Common/../../C/Types.h +Time.o: ../../../Windows/Time.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../../Windows/Time.h \ + ../../../Windows/Defs.h ../../../Windows/../Common/MyWindows.h +CreateCoder.o: ../../Common/CreateCoder.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../Common/../../Windows/Defs.h \ + ../../Common/../../Windows/../Common/MyWindows.h \ + ../../Common/../../Windows/PropVariant.h \ + ../../Common/../../Windows/../Common/Types.h ../../Common/CreateCoder.h \ + ../../Common/../../Common/MyCom.h ../../Common/../../Common/MyWindows.h \ + ../../Common/../../Common/MyString.h \ + ../../Common/../../Common/MyVector.h ../../Common/../../Common/Defs.h \ + ../../Common/../ICoder.h ../../Common/../IStream.h \ + ../../Common/../../Common/MyUnknown.h ../../Common/../../Common/Types.h \ + ../../Common/../IDecl.h ../../Common/MethodId.h \ + ../../Common/../../Common/Types.h ../../Common/FilterCoder.h \ + ../../Common/../IPassword.h ../../Common/RegisterCodec.h \ + ../../Common/../Common/MethodId.h +CWrappers.o: ../../Common/CWrappers.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../Common/../../../C/Alloc.h \ + ../../Common/CWrappers.h ../../Common/../ICoder.h \ + ../../Common/../IStream.h ../../Common/../../Common/MyUnknown.h \ + ../../Common/../../Common/MyWindows.h ../../Common/../../Common/Types.h \ + ../../Common/../IDecl.h ../../Common/../../Common/MyCom.h \ + ../../Common/StreamUtils.h ../../Common/../IStream.h +FilePathAutoRename.o: ../../Common/FilePathAutoRename.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../../Common/Defs.h ../../../Common/IntToString.h \ + ../../../Windows/FileFind.h ../../../Windows/../Common/MyString.h \ + ../../../Windows/../Common/MyVector.h ../../../Windows/../Common/Defs.h \ + ../../../Windows/FileName.h ../../../Windows/../../C/Types.h \ + ../../../Windows/Defs.h ../../../Windows/../Common/MyWindows.h \ + ../../Common/FilePathAutoRename.h ../../../Common/MyString.h +FileStreams.o: ../../Common/FileStreams.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../Common/FileStreams.h \ + ../../Common/../../Windows/FileIO.h ../../../Common/MyString.h \ + ../../../Common/MyVector.h ../../../Common/Defs.h \ + ../../Common/../../Common/MyCom.h ../../Common/../../Common/MyWindows.h \ + ../../Common/../IStream.h ../../Common/../../Common/MyUnknown.h \ + ../../Common/../../Common/Types.h ../../Common/../IDecl.h +FilterCoder.o: ../../Common/FilterCoder.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../Common/../../../C/Alloc.h \ + ../../Common/../../Common/Defs.h ../../Common/FilterCoder.h \ + ../../Common/../../Common/MyCom.h ../../Common/../../Common/MyWindows.h \ + ../../Common/../ICoder.h ../../Common/../IStream.h \ + ../../Common/../../Common/MyUnknown.h ../../Common/../../Common/Types.h \ + ../../Common/../IDecl.h ../../Common/../IPassword.h \ + ../../Common/StreamUtils.h ../../Common/../IStream.h +InBuffer.o: ../../Common/InBuffer.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../Common/../../../C/Alloc.h \ + ../../Common/InBuffer.h ../../Common/../IStream.h \ + ../../Common/../../Common/MyUnknown.h \ + ../../Common/../../Common/MyWindows.h ../../Common/../../Common/Types.h \ + ../../Common/../IDecl.h ../../Common/../../Common/MyCom.h \ + ../../Common/../../Common/MyException.h +InOutTempBuffer.o: ../../Common/InOutTempBuffer.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../Common/../../../C/7zCrc.h ../../Common/../../../C/Types.h \ + ../../Common/InOutTempBuffer.h ../../Common/../../Common/MyCom.h \ + ../../Common/../../Common/MyWindows.h \ + ../../Common/../../Windows/FileDir.h \ + ../../Common/../../Windows/../Common/MyString.h \ + ../../Common/../../Windows/../Common/MyVector.h \ + ../../Common/../../Windows/../Common/Defs.h \ + ../../Common/../../Windows/Defs.h \ + ../../Common/../../Windows/../Common/MyWindows.h \ + ../../Common/../../Windows/FileIO.h ../../../Common/MyString.h \ + ../../Common/../IStream.h ../../Common/../../Common/MyUnknown.h \ + ../../Common/../../Common/Types.h ../../Common/../IDecl.h \ + ../../Common/StreamUtils.h +LimitedStreams.o: ../../Common/LimitedStreams.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../Common/LimitedStreams.h ../../Common/../../Common/MyCom.h \ + ../../Common/../../Common/MyWindows.h \ + ../../Common/../../Common/MyVector.h ../../Common/../../Common/Defs.h \ + ../../Common/../IStream.h ../../Common/../../Common/MyUnknown.h \ + ../../Common/../../Common/Types.h ../../Common/../IDecl.h \ + ../../Common/../../Common/Defs.h +LockedStream.o: ../../Common/LockedStream.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../Common/LockedStream.h \ + ../../Common/../../Windows/Synchronization.h \ + ../../Common/../../Windows/Defs.h \ + ../../Common/../../Windows/../Common/MyWindows.h \ + ../../Common/../../Windows/../../C/Threads.h \ + ../../Common/../../Windows/../../C/Types.h \ + ../../Common/../../Windows/Synchronization2.h \ + ../../Common/../../Common/MyCom.h ../../Common/../../Common/MyWindows.h \ + ../../Common/../IStream.h ../../Common/../../Common/MyUnknown.h \ + ../../Common/../../Common/Types.h ../../Common/../IDecl.h +MemBlocks.o: ../../Common/MemBlocks.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../Common/../../../C/Alloc.h \ + ../../Common/MemBlocks.h ../../../Common/MyVector.h \ + ../../../Common/Defs.h ../../../Windows/Synchronization.h \ + ../../../Windows/Defs.h ../../../Windows/../Common/MyWindows.h \ + ../../../Windows/../../C/Threads.h ../../../Windows/../../C/Types.h \ + ../../../Windows/Synchronization2.h ../../Common/../IStream.h \ + ../../Common/../../Common/MyUnknown.h \ + ../../Common/../../Common/MyWindows.h ../../Common/../../Common/Types.h \ + ../../Common/../IDecl.h ../../Common/StreamUtils.h +MethodId.o: ../../Common/MethodId.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../Common/MethodId.h \ + ../../Common/../../Common/Types.h ../../Common/../../Common/MyString.h \ + ../../Common/../../Common/MyVector.h ../../Common/../../Common/Defs.h +MethodProps.o: ../../Common/MethodProps.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../Common/../../Common/MyCom.h \ + ../../Common/../../Common/MyWindows.h ../../Common/../ICoder.h \ + ../../Common/../IStream.h ../../Common/../../Common/MyUnknown.h \ + ../../Common/../../Common/Types.h ../../Common/../IDecl.h \ + ../../Common/MethodProps.h ../../Common/../../Common/MyVector.h \ + ../../Common/../../Common/Defs.h \ + ../../Common/../../Windows/PropVariant.h \ + ../../Common/../../Windows/../Common/MyWindows.h \ + ../../Common/../../Windows/../Common/Types.h ../../Common/MethodId.h \ + ../../Common/../../Common/Types.h +OffsetStream.o: ../../Common/OffsetStream.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../../Common/Defs.h \ + ../../Common/OffsetStream.h ../../../Common/MyCom.h \ + ../../../Common/MyWindows.h ../../Common/../IStream.h \ + ../../Common/../../Common/MyUnknown.h \ + ../../Common/../../Common/MyWindows.h ../../Common/../../Common/Types.h \ + ../../Common/../IDecl.h +OutBuffer.o: ../../Common/OutBuffer.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../Common/../../../C/Alloc.h \ + ../../Common/OutBuffer.h ../../Common/../IStream.h \ + ../../Common/../../Common/MyUnknown.h \ + ../../Common/../../Common/MyWindows.h ../../Common/../../Common/Types.h \ + ../../Common/../IDecl.h ../../Common/../../Common/MyCom.h \ + ../../Common/../../Common/MyException.h +OutMemStream.o: ../../Common/OutMemStream.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../Common/OutMemStream.h \ + ../../../Common/MyCom.h ../../../Common/MyWindows.h \ + ../../Common/MemBlocks.h ../../../Common/MyVector.h \ + ../../../Common/Defs.h ../../../Windows/Synchronization.h \ + ../../../Windows/Defs.h ../../../Windows/../Common/MyWindows.h \ + ../../../Windows/../../C/Threads.h ../../../Windows/../../C/Types.h \ + ../../../Windows/Synchronization2.h ../../Common/../IStream.h \ + ../../Common/../../Common/MyUnknown.h \ + ../../Common/../../Common/MyWindows.h ../../Common/../../Common/Types.h \ + ../../Common/../IDecl.h +ProgressMt.o: ../../Common/ProgressMt.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../Common/ProgressMt.h \ + ../../Common/../../Common/MyCom.h ../../Common/../../Common/MyWindows.h \ + ../../Common/../../Common/MyVector.h ../../Common/../../Common/Defs.h \ + ../../Common/../../Windows/Synchronization.h \ + ../../Common/../../Windows/Defs.h \ + ../../Common/../../Windows/../Common/MyWindows.h \ + ../../Common/../../Windows/../../C/Threads.h \ + ../../Common/../../Windows/../../C/Types.h \ + ../../Common/../../Windows/Synchronization2.h ../../Common/../ICoder.h \ + ../../Common/../IStream.h ../../Common/../../Common/MyUnknown.h \ + ../../Common/../../Common/Types.h ../../Common/../IDecl.h \ + ../../Common/../IProgress.h +ProgressUtils.o: ../../Common/ProgressUtils.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../Common/ProgressUtils.h ../../Common/../../Common/MyCom.h \ + ../../Common/../../Common/MyWindows.h ../../Common/../ICoder.h \ + ../../Common/../IStream.h ../../Common/../../Common/MyUnknown.h \ + ../../Common/../../Common/Types.h ../../Common/../IDecl.h \ + ../../Common/../IProgress.h +StreamBinder.o: ../../Common/StreamBinder.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../Common/StreamBinder.h \ + ../../Common/../IStream.h ../../Common/../../Common/MyUnknown.h \ + ../../Common/../../Common/MyWindows.h ../../Common/../../Common/Types.h \ + ../../Common/../IDecl.h ../../Common/../../Windows/Synchronization.h \ + ../../Common/../../Windows/Defs.h \ + ../../Common/../../Windows/../Common/MyWindows.h \ + ../../Common/../../Windows/../../C/Threads.h \ + ../../Common/../../Windows/../../C/Types.h \ + ../../Common/../../Windows/Synchronization2.h \ + ../../Common/../../Common/Defs.h ../../Common/../../Common/MyCom.h +StreamObjects.o: ../../Common/StreamObjects.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../Common/../../../C/Alloc.h ../../Common/StreamObjects.h \ + ../../Common/../../Common/Buffer.h ../../Common/../../Common/Defs.h \ + ../../Common/../../Common/MyCom.h ../../Common/../../Common/MyWindows.h \ + ../../Common/../IStream.h ../../Common/../../Common/MyUnknown.h \ + ../../Common/../../Common/Types.h ../../Common/../IDecl.h +StreamUtils.o: ../../Common/StreamUtils.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../Common/StreamUtils.h \ + ../../Common/../IStream.h ../../Common/../../Common/MyUnknown.h \ + ../../Common/../../Common/MyWindows.h ../../Common/../../Common/Types.h \ + ../../Common/../IDecl.h +VirtThread.o: ../../Common/VirtThread.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../Common/VirtThread.h \ + ../../Common/../../Windows/Synchronization.h \ + ../../Common/../../Windows/Defs.h \ + ../../Common/../../Windows/../Common/MyWindows.h \ + ../../Common/../../Windows/../../C/Threads.h \ + ../../Common/../../Windows/../../C/Types.h \ + ../../Common/../../Windows/Synchronization2.h \ + ../../Common/../../Windows/Thread.h +ArchiveCommandLine.o: ../../UI/Common/ArchiveCommandLine.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../../Common/ListFileUtils.h ../../../Common/MyString.h \ + ../../../Common/MyVector.h ../../../Common/Defs.h \ + ../../../Common/StringConvert.h ../../../Common/MyWindows.h \ + ../../../Common/StringToInt.h ../../../Windows/FileDir.h \ + ../../../Windows/../Common/MyString.h ../../../Windows/Defs.h \ + ../../../Windows/../Common/MyWindows.h ../../../Windows/FileName.h \ + ../../../Windows/../../C/Types.h ../../../myWindows/myPrivate.h \ + ../../UI/Common/ArchiveCommandLine.h ../../../Common/CommandLineParser.h \ + ../../../Common/Wildcard.h ../../UI/Common/Extract.h \ + ../../../Windows/FileFind.h ../../../Windows/FileName.h \ + ../../UI/Common/../../Archive/IArchive.h \ + ../../UI/Common/../../Archive/../IProgress.h \ + ../../UI/Common/../../Archive/../../Common/MyUnknown.h \ + ../../UI/Common/../../Archive/../../Common/MyWindows.h \ + ../../UI/Common/../../Archive/../../Common/Types.h \ + ../../UI/Common/../../Archive/../IDecl.h \ + ../../UI/Common/../../Archive/../IStream.h \ + ../../UI/Common/../../Archive/../PropID.h \ + ../../UI/Common/ArchiveExtractCallback.h ../../../Common/MyCom.h \ + ../../UI/Common/../../IPassword.h \ + ../../UI/Common/../../../Common/MyUnknown.h \ + ../../UI/Common/../../../Common/Types.h ../../UI/Common/../../IDecl.h \ + ../../UI/Common/../../Common/FileStreams.h \ + ../../UI/Common/../../Common/../../Windows/FileIO.h \ + ../../../Common/MyString.h \ + ../../UI/Common/../../Common/../../Common/MyCom.h \ + ../../UI/Common/../../Common/../IStream.h \ + ../../UI/Common/../../Common/ProgressUtils.h \ + ../../UI/Common/../../Common/../ICoder.h \ + ../../UI/Common/../../Common/../IStream.h \ + ../../UI/Common/../../Common/../IProgress.h \ + ../../UI/Common/../../Archive/Common/OutStreamWithCRC.h \ + ../../UI/Common/../../Archive/Common/../../../../C/7zCrc.h \ + ../../UI/Common/../../Archive/Common/../../../../C/Types.h \ + ../../UI/Common/../../Archive/Common/../../../Common/MyCom.h \ + ../../UI/Common/../../Archive/Common/../../IStream.h \ + ../../UI/Common/ExtractMode.h ../../UI/Common/IFileExtractCallback.h \ + ../../UI/Common/../../IDecl.h ../../UI/Common/OpenArchive.h \ + ../../UI/Common/ArchiveOpenCallback.h ../../UI/Common/LoadCodecs.h \ + ../../UI/Common/../../../Common/Types.h \ + ../../UI/Common/../../../Common/MyCom.h \ + ../../UI/Common/../../../Common/MyString.h \ + ../../UI/Common/../../../Common/Buffer.h \ + ../../UI/Common/../../../Common/Defs.h ../../UI/Common/../../ICoder.h \ + ../../UI/Common/Property.h ../../UI/Common/../Common/LoadCodecs.h \ + ../../UI/Common/Update.h ../../UI/Common/UpdateAction.h \ + ../../UI/Common/UpdateCallback.h ../../UI/Common/../Common/UpdatePair.h \ + ../../UI/Common/../Common/DirItem.h \ + ../../UI/Common/../Common/../../Archive/IArchive.h \ + ../../UI/Common/../Common/UpdateAction.h \ + ../../UI/Common/../Common/UpdateProduce.h \ + ../../UI/Common/../Common/UpdatePair.h ../../UI/Common/EnumDirItems.h \ + ../../UI/Common/DirItem.h ../../UI/Common/SortUtils.h +ArchiveExtractCallback.o: ../../UI/Common/ArchiveExtractCallback.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../../Common/ComTry.h ../../../Common/MyWindows.h \ + ../../../Common/Wildcard.h ../../../Common/MyString.h \ + ../../../Common/MyVector.h ../../../Common/Defs.h \ + ../../../Windows/FileDir.h ../../../Windows/../Common/MyString.h \ + ../../../Windows/Defs.h ../../../Windows/../Common/MyWindows.h \ + ../../../Windows/FileFind.h ../../../Windows/FileName.h \ + ../../../Windows/../../C/Types.h ../../../Windows/PropVariant.h \ + ../../../Windows/../Common/Types.h \ + ../../../Windows/PropVariantConversions.h ../../../Common/MyString.h \ + ../../UI/Common/../../Common/FilePathAutoRename.h \ + ../../UI/Common/../Common/ExtractingFilePath.h \ + ../../UI/Common/ArchiveExtractCallback.h ../../../Common/MyCom.h \ + ../../UI/Common/../../IPassword.h \ + ../../UI/Common/../../../Common/MyUnknown.h \ + ../../UI/Common/../../../Common/MyWindows.h \ + ../../UI/Common/../../../Common/Types.h ../../UI/Common/../../IDecl.h \ + ../../UI/Common/../../Common/FileStreams.h \ + ../../UI/Common/../../Common/../../Windows/FileIO.h \ + ../../UI/Common/../../Common/../../Common/MyCom.h \ + ../../UI/Common/../../Common/../IStream.h \ + ../../UI/Common/../../Common/../../Common/MyUnknown.h \ + ../../UI/Common/../../Common/../../Common/Types.h \ + ../../UI/Common/../../Common/../IDecl.h \ + ../../UI/Common/../../Common/ProgressUtils.h \ + ../../UI/Common/../../Common/../ICoder.h \ + ../../UI/Common/../../Common/../IStream.h \ + ../../UI/Common/../../Common/../IProgress.h \ + ../../UI/Common/../../Archive/IArchive.h \ + ../../UI/Common/../../Archive/../IProgress.h \ + ../../UI/Common/../../Archive/../IStream.h \ + ../../UI/Common/../../Archive/../PropID.h \ + ../../UI/Common/../../Archive/Common/OutStreamWithCRC.h \ + ../../UI/Common/../../Archive/Common/../../../../C/7zCrc.h \ + ../../UI/Common/../../Archive/Common/../../../../C/Types.h \ + ../../UI/Common/../../Archive/Common/../../../Common/MyCom.h \ + ../../UI/Common/../../Archive/Common/../../IStream.h \ + ../../UI/Common/ExtractMode.h ../../UI/Common/IFileExtractCallback.h \ + ../../UI/Common/../../IDecl.h ../../UI/Common/OpenArchive.h \ + ../../UI/Common/ArchiveOpenCallback.h ../../UI/Common/LoadCodecs.h \ + ../../UI/Common/../../../Common/Types.h \ + ../../UI/Common/../../../Common/MyCom.h \ + ../../UI/Common/../../../Common/MyString.h \ + ../../UI/Common/../../../Common/Buffer.h \ + ../../UI/Common/../../../Common/Defs.h ../../UI/Common/../../ICoder.h +ArchiveOpenCallback.o: ../../UI/Common/ArchiveOpenCallback.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../../Common/StringConvert.h ../../../Common/MyWindows.h \ + ../../../Common/MyString.h ../../../Common/MyVector.h \ + ../../../Common/Defs.h ../../../Common/ComTry.h \ + ../../../Windows/PropVariant.h ../../../Windows/../Common/MyWindows.h \ + ../../../Windows/../Common/Types.h \ + ../../UI/Common/../../Common/FileStreams.h \ + ../../UI/Common/../../Common/../../Windows/FileIO.h \ + ../../../Common/MyString.h \ + ../../UI/Common/../../Common/../../Common/MyCom.h \ + ../../UI/Common/../../Common/../../Common/MyWindows.h \ + ../../UI/Common/../../Common/../IStream.h \ + ../../UI/Common/../../Common/../../Common/MyUnknown.h \ + ../../UI/Common/../../Common/../../Common/Types.h \ + ../../UI/Common/../../Common/../IDecl.h \ + ../../UI/Common/ArchiveOpenCallback.h ../../../Common/MyCom.h \ + ../../../Windows/FileFind.h ../../../Windows/../Common/MyString.h \ + ../../../Windows/FileName.h ../../../Windows/../../C/Types.h \ + ../../../Windows/Defs.h ../../UI/Common/../../IPassword.h \ + ../../UI/Common/../../../Common/MyUnknown.h \ + ../../UI/Common/../../../Common/Types.h ../../UI/Common/../../IDecl.h \ + ../../UI/Common/../../Archive/IArchive.h \ + ../../UI/Common/../../Archive/../IProgress.h \ + ../../UI/Common/../../Archive/../../Common/MyUnknown.h \ + ../../UI/Common/../../Archive/../../Common/Types.h \ + ../../UI/Common/../../Archive/../IDecl.h \ + ../../UI/Common/../../Archive/../IStream.h \ + ../../UI/Common/../../Archive/../PropID.h +Bench.o: ../../UI/Common/Bench.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../UI/Common/Bench.h \ + ../../UI/Common/../../Common/CreateCoder.h \ + ../../UI/Common/../../Common/../../Common/MyCom.h \ + ../../UI/Common/../../Common/../../Common/MyWindows.h \ + ../../UI/Common/../../Common/../../Common/MyString.h \ + ../../UI/Common/../../Common/../../Common/MyVector.h \ + ../../UI/Common/../../Common/../../Common/Defs.h \ + ../../UI/Common/../../Common/../ICoder.h \ + ../../UI/Common/../../Common/../IStream.h \ + ../../UI/Common/../../Common/../../Common/MyUnknown.h \ + ../../UI/Common/../../Common/../../Common/Types.h \ + ../../UI/Common/../../Common/../IDecl.h \ + ../../UI/Common/../../Common/MethodId.h \ + ../../UI/Common/../../Common/../../Common/Types.h \ + ../../UI/Common/../../../../C/7zCrc.h \ + ../../UI/Common/../../../../C/Types.h \ + ../../UI/Common/../../../../C/Alloc.h \ + ../../UI/Common/../../../Windows/Synchronization.h \ + ../../UI/Common/../../../Windows/Defs.h \ + ../../UI/Common/../../../Windows/../Common/MyWindows.h \ + ../../UI/Common/../../../Windows/../../C/Threads.h \ + ../../UI/Common/../../../Windows/../../C/Types.h \ + ../../UI/Common/../../../Windows/Synchronization2.h \ + ../../UI/Common/../../../Windows/Thread.h \ + ../../UI/Common/../../../Windows/PropVariant.h \ + ../../UI/Common/../../../Windows/../Common/Types.h +DefaultName.o: ../../UI/Common/DefaultName.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../UI/Common/DefaultName.h ../../../Common/MyString.h \ + ../../../Common/MyVector.h ../../../Common/Defs.h +EnumDirItems.o: ../../UI/Common/EnumDirItems.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../UI/Common/EnumDirItems.h ../../../Common/Wildcard.h \ + ../../../Common/MyString.h ../../../Common/MyVector.h \ + ../../../Common/Defs.h ../../../Windows/FileFind.h \ + ../../../Windows/../Common/MyString.h ../../../Windows/FileName.h \ + ../../../Windows/../../C/Types.h ../../../Windows/Defs.h \ + ../../../Windows/../Common/MyWindows.h ../../UI/Common/DirItem.h \ + ../../../Common/MyString.h ../../UI/Common/../../Archive/IArchive.h \ + ../../UI/Common/../../Archive/../IProgress.h \ + ../../UI/Common/../../Archive/../../Common/MyUnknown.h \ + ../../UI/Common/../../Archive/../../Common/MyWindows.h \ + ../../UI/Common/../../Archive/../../Common/Types.h \ + ../../UI/Common/../../Archive/../IDecl.h \ + ../../UI/Common/../../Archive/../IStream.h \ + ../../UI/Common/../../Archive/../PropID.h +Extract.o: ../../UI/Common/Extract.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../../Windows/FileDir.h \ + ../../../Windows/../Common/MyString.h \ + ../../../Windows/../Common/MyVector.h ../../../Windows/../Common/Defs.h \ + ../../../Windows/Defs.h ../../../Windows/../Common/MyWindows.h \ + ../../../Windows/PropVariant.h ../../../Windows/../Common/Types.h \ + ../../../Windows/PropVariantConversions.h ../../../Common/MyString.h \ + ../../UI/Common/../Common/ExtractingFilePath.h ../../UI/Common/Extract.h \ + ../../../Windows/FileFind.h ../../../Windows/FileName.h \ + ../../../Windows/../../C/Types.h \ + ../../UI/Common/../../Archive/IArchive.h \ + ../../UI/Common/../../Archive/../IProgress.h \ + ../../UI/Common/../../Archive/../../Common/MyUnknown.h \ + ../../UI/Common/../../Archive/../../Common/MyWindows.h \ + ../../UI/Common/../../Archive/../../Common/Types.h \ + ../../UI/Common/../../Archive/../IDecl.h \ + ../../UI/Common/../../Archive/../IStream.h \ + ../../UI/Common/../../Archive/../PropID.h \ + ../../UI/Common/ArchiveExtractCallback.h ../../../Common/MyCom.h \ + ../../../Common/MyWindows.h ../../../Common/Wildcard.h \ + ../../../Common/MyString.h ../../UI/Common/../../IPassword.h \ + ../../UI/Common/../../../Common/MyUnknown.h \ + ../../UI/Common/../../../Common/Types.h ../../UI/Common/../../IDecl.h \ + ../../UI/Common/../../Common/FileStreams.h \ + ../../UI/Common/../../Common/../../Windows/FileIO.h \ + ../../UI/Common/../../Common/../../Common/MyCom.h \ + ../../UI/Common/../../Common/../IStream.h \ + ../../UI/Common/../../Common/ProgressUtils.h \ + ../../UI/Common/../../Common/../ICoder.h \ + ../../UI/Common/../../Common/../IStream.h \ + ../../UI/Common/../../Common/../IProgress.h \ + ../../UI/Common/../../Archive/Common/OutStreamWithCRC.h \ + ../../UI/Common/../../Archive/Common/../../../../C/7zCrc.h \ + ../../UI/Common/../../Archive/Common/../../../../C/Types.h \ + ../../UI/Common/../../Archive/Common/../../../Common/MyCom.h \ + ../../UI/Common/../../Archive/Common/../../IStream.h \ + ../../UI/Common/ExtractMode.h ../../UI/Common/IFileExtractCallback.h \ + ../../UI/Common/../../IDecl.h ../../UI/Common/OpenArchive.h \ + ../../UI/Common/ArchiveOpenCallback.h ../../UI/Common/LoadCodecs.h \ + ../../UI/Common/../../../Common/Types.h \ + ../../UI/Common/../../../Common/MyCom.h \ + ../../UI/Common/../../../Common/MyString.h \ + ../../UI/Common/../../../Common/Buffer.h \ + ../../UI/Common/../../../Common/Defs.h ../../UI/Common/../../ICoder.h \ + ../../UI/Common/Property.h ../../UI/Common/../Common/LoadCodecs.h \ + ../../UI/Common/SetProperties.h +ExtractingFilePath.o: ../../UI/Common/ExtractingFilePath.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../UI/Common/../../../../C/Types.h ../../../Common/Wildcard.h \ + ../../../Common/MyString.h ../../../Common/MyVector.h \ + ../../../Common/Defs.h ../../UI/Common/ExtractingFilePath.h \ + ../../../Common/MyString.h +LoadCodecs.o: ../../UI/Common/LoadCodecs.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../UI/Common/LoadCodecs.h \ + ../../UI/Common/../../../Common/Types.h \ + ../../UI/Common/../../../Common/MyCom.h \ + ../../UI/Common/../../../Common/MyWindows.h \ + ../../UI/Common/../../../Common/MyString.h \ + ../../UI/Common/../../../Common/MyVector.h \ + ../../UI/Common/../../../Common/Defs.h \ + ../../UI/Common/../../../Common/Buffer.h ../../UI/Common/../../ICoder.h \ + ../../UI/Common/../../IStream.h \ + ../../UI/Common/../../../Common/MyUnknown.h \ + ../../UI/Common/../../../Common/Types.h ../../UI/Common/../../IDecl.h \ + ../../UI/Common/../../Archive/IArchive.h \ + ../../UI/Common/../../Archive/../IProgress.h \ + ../../UI/Common/../../Archive/../../Common/MyUnknown.h \ + ../../UI/Common/../../Archive/../../Common/Types.h \ + ../../UI/Common/../../Archive/../IDecl.h \ + ../../UI/Common/../../Archive/../IStream.h \ + ../../UI/Common/../../Archive/../PropID.h \ + ../../UI/Common/../../../Windows/PropVariant.h \ + ../../UI/Common/../../../Windows/../Common/MyWindows.h \ + ../../UI/Common/../../../Windows/../Common/Types.h \ + ../../UI/Common/../../Common/RegisterArc.h \ + ../../UI/Common/../../Common/../Archive/IArchive.h +OpenArchive.o: ../../UI/Common/OpenArchive.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../../Common/Wildcard.h ../../../Common/MyString.h \ + ../../../Common/MyVector.h ../../../Common/Defs.h \ + ../../../Windows/FileDir.h ../../../Windows/../Common/MyString.h \ + ../../../Windows/Defs.h ../../../Windows/../Common/MyWindows.h \ + ../../../Windows/PropVariant.h ../../../Windows/../Common/Types.h \ + ../../UI/Common/../../Common/FileStreams.h \ + ../../UI/Common/../../Common/../../Windows/FileIO.h \ + ../../../Common/MyString.h \ + ../../UI/Common/../../Common/../../Common/MyCom.h \ + ../../UI/Common/../../Common/../../Common/MyWindows.h \ + ../../UI/Common/../../Common/../IStream.h \ + ../../UI/Common/../../Common/../../Common/MyUnknown.h \ + ../../UI/Common/../../Common/../../Common/Types.h \ + ../../UI/Common/../../Common/../IDecl.h \ + ../../UI/Common/../../Common/StreamUtils.h ../../UI/Common/DefaultName.h \ + ../../UI/Common/OpenArchive.h ../../../Windows/FileFind.h \ + ../../../Windows/FileName.h ../../../Windows/../../C/Types.h \ + ../../UI/Common/../../Archive/IArchive.h \ + ../../UI/Common/../../Archive/../IProgress.h \ + ../../UI/Common/../../Archive/../../Common/MyUnknown.h \ + ../../UI/Common/../../Archive/../../Common/Types.h \ + ../../UI/Common/../../Archive/../IDecl.h \ + ../../UI/Common/../../Archive/../IStream.h \ + ../../UI/Common/../../Archive/../PropID.h \ + ../../UI/Common/ArchiveOpenCallback.h ../../../Common/MyCom.h \ + ../../UI/Common/../../IPassword.h \ + ../../UI/Common/../../../Common/MyUnknown.h \ + ../../UI/Common/../../../Common/Types.h ../../UI/Common/../../IDecl.h \ + ../../UI/Common/LoadCodecs.h ../../UI/Common/../../../Common/Types.h \ + ../../UI/Common/../../../Common/MyCom.h \ + ../../UI/Common/../../../Common/MyString.h \ + ../../UI/Common/../../../Common/Buffer.h \ + ../../UI/Common/../../../Common/Defs.h ../../UI/Common/../../ICoder.h \ + ../../UI/Common/../../IStream.h +PropIDUtils.o: ../../UI/Common/PropIDUtils.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../../Common/IntToString.h ../../../Windows/FileFind.h \ + ../../../Windows/../Common/MyString.h \ + ../../../Windows/../Common/MyVector.h ../../../Windows/../Common/Defs.h \ + ../../../Windows/FileName.h ../../../Windows/../../C/Types.h \ + ../../../Windows/Defs.h ../../../Windows/../Common/MyWindows.h \ + ../../../Windows/PropVariantConversions.h ../../../Common/MyString.h \ + ../../UI/Common/../../PropID.h ../../UI/Common/PropIDUtils.h +SetProperties.o: ../../UI/Common/SetProperties.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../UI/Common/SetProperties.h ../../UI/Common/Property.h \ + ../../../Common/MyString.h ../../../Common/MyVector.h \ + ../../../Common/Defs.h ../../../Windows/PropVariant.h \ + ../../../Windows/../Common/MyWindows.h \ + ../../../Windows/../Common/Types.h ../../../Common/StringToInt.h \ + ../../../Common/MyCom.h ../../../Common/MyWindows.h \ + ../../UI/Common/../../Archive/IArchive.h \ + ../../UI/Common/../../Archive/../IProgress.h \ + ../../UI/Common/../../Archive/../../Common/MyUnknown.h \ + ../../UI/Common/../../Archive/../../Common/MyWindows.h \ + ../../UI/Common/../../Archive/../../Common/Types.h \ + ../../UI/Common/../../Archive/../IDecl.h \ + ../../UI/Common/../../Archive/../IStream.h \ + ../../UI/Common/../../Archive/../PropID.h +SortUtils.o: ../../UI/Common/SortUtils.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../UI/Common/SortUtils.h \ + ../../../Common/MyString.h ../../../Common/MyVector.h \ + ../../../Common/Defs.h ../../../Common/Wildcard.h \ + ../../../Common/MyString.h +TempFiles.o: ../../UI/Common/TempFiles.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../UI/Common/TempFiles.h \ + ../../../Common/MyString.h ../../../Common/MyVector.h \ + ../../../Common/Defs.h ../../../Windows/FileDir.h \ + ../../../Windows/../Common/MyString.h ../../../Windows/Defs.h \ + ../../../Windows/../Common/MyWindows.h ../../../Windows/FileIO.h +Update.o: ../../UI/Common/Update.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../UI/Common/Update.h \ + ../../../Common/Wildcard.h ../../../Common/MyString.h \ + ../../../Common/MyVector.h ../../../Common/Defs.h \ + ../../UI/Common/ArchiveOpenCallback.h ../../../Common/MyCom.h \ + ../../../Common/MyWindows.h ../../../Common/MyString.h \ + ../../../Windows/FileFind.h ../../../Windows/../Common/MyString.h \ + ../../../Windows/FileName.h ../../../Windows/../../C/Types.h \ + ../../../Windows/Defs.h ../../../Windows/../Common/MyWindows.h \ + ../../UI/Common/../../IPassword.h \ + ../../UI/Common/../../../Common/MyUnknown.h \ + ../../UI/Common/../../../Common/MyWindows.h \ + ../../UI/Common/../../../Common/Types.h ../../UI/Common/../../IDecl.h \ + ../../UI/Common/../../Archive/IArchive.h \ + ../../UI/Common/../../Archive/../IProgress.h \ + ../../UI/Common/../../Archive/../../Common/MyUnknown.h \ + ../../UI/Common/../../Archive/../../Common/Types.h \ + ../../UI/Common/../../Archive/../IDecl.h \ + ../../UI/Common/../../Archive/../IStream.h \ + ../../UI/Common/../../Archive/../PropID.h ../../UI/Common/LoadCodecs.h \ + ../../UI/Common/../../../Common/Types.h \ + ../../UI/Common/../../../Common/MyCom.h \ + ../../UI/Common/../../../Common/MyString.h \ + ../../UI/Common/../../../Common/Buffer.h \ + ../../UI/Common/../../../Common/Defs.h ../../UI/Common/../../ICoder.h \ + ../../UI/Common/../../IStream.h ../../UI/Common/Property.h \ + ../../UI/Common/UpdateAction.h ../../UI/Common/UpdateCallback.h \ + ../../UI/Common/../Common/UpdatePair.h \ + ../../UI/Common/../Common/DirItem.h \ + ../../UI/Common/../Common/../../Archive/IArchive.h \ + ../../UI/Common/../Common/UpdateAction.h \ + ../../UI/Common/../Common/UpdateProduce.h \ + ../../UI/Common/../Common/UpdatePair.h ../../../Common/IntToString.h \ + ../../../Common/StringConvert.h ../../../Windows/FileDir.h \ + ../../../Windows/FileName.h ../../../Windows/PropVariant.h \ + ../../../Windows/../Common/Types.h \ + ../../../Windows/PropVariantConversions.h ../../../Windows/Time.h \ + ../../UI/Common/../../Common/FileStreams.h \ + ../../UI/Common/../../Common/../../Windows/FileIO.h \ + ../../UI/Common/../../Common/../../Common/MyCom.h \ + ../../UI/Common/../../Common/../IStream.h \ + ../../UI/Common/../../Compress/CopyCoder.h \ + ../../UI/Common/../../Compress/../../Common/MyCom.h \ + ../../UI/Common/../../Compress/../ICoder.h \ + ../../UI/Common/../Common/DirItem.h \ + ../../UI/Common/../Common/EnumDirItems.h \ + ../../UI/Common/../Common/OpenArchive.h \ + ../../UI/Common/../Common/ArchiveOpenCallback.h \ + ../../UI/Common/../Common/LoadCodecs.h ../../UI/Common/EnumDirItems.h \ + ../../UI/Common/SetProperties.h ../../UI/Common/TempFiles.h +UpdateAction.o: ../../UI/Common/UpdateAction.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../UI/Common/UpdateAction.h +UpdateCallback.o: ../../UI/Common/UpdateCallback.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../../Common/ComTry.h ../../../Common/MyWindows.h \ + ../../../Common/Defs.h ../../../Common/IntToString.h \ + ../../../Common/StringConvert.h ../../../Common/MyString.h \ + ../../../Common/MyVector.h ../../../Common/Defs.h \ + ../../../Windows/PropVariant.h ../../../Windows/../Common/MyWindows.h \ + ../../../Windows/../Common/Types.h \ + ../../UI/Common/../../Common/FileStreams.h \ + ../../UI/Common/../../Common/../../Windows/FileIO.h \ + ../../../Common/MyString.h \ + ../../UI/Common/../../Common/../../Common/MyCom.h \ + ../../UI/Common/../../Common/../../Common/MyWindows.h \ + ../../UI/Common/../../Common/../IStream.h \ + ../../UI/Common/../../Common/../../Common/MyUnknown.h \ + ../../UI/Common/../../Common/../../Common/Types.h \ + ../../UI/Common/../../Common/../IDecl.h ../../UI/Common/UpdateCallback.h \ + ../../../Common/MyCom.h ../../UI/Common/../../IPassword.h \ + ../../UI/Common/../../../Common/MyUnknown.h \ + ../../UI/Common/../../../Common/Types.h ../../UI/Common/../../IDecl.h \ + ../../UI/Common/../../ICoder.h ../../UI/Common/../../IStream.h \ + ../../UI/Common/../Common/UpdatePair.h \ + ../../UI/Common/../Common/DirItem.h \ + ../../UI/Common/../Common/../../Archive/IArchive.h \ + ../../UI/Common/../Common/../../Archive/../IProgress.h \ + ../../UI/Common/../Common/../../Archive/../../Common/MyUnknown.h \ + ../../UI/Common/../Common/../../Archive/../../Common/Types.h \ + ../../UI/Common/../Common/../../Archive/../IDecl.h \ + ../../UI/Common/../Common/../../Archive/../IStream.h \ + ../../UI/Common/../Common/../../Archive/../PropID.h \ + ../../UI/Common/../Common/UpdateAction.h \ + ../../UI/Common/../Common/UpdateProduce.h \ + ../../UI/Common/../Common/UpdatePair.h +UpdatePair.o: ../../UI/Common/UpdatePair.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../../Common/Defs.h \ + ../../../Common/Wildcard.h ../../../Common/MyString.h \ + ../../../Common/MyVector.h ../../../Common/Defs.h \ + ../../../Windows/Time.h ../../UI/Common/SortUtils.h \ + ../../../Common/MyString.h ../../UI/Common/UpdatePair.h \ + ../../UI/Common/DirItem.h ../../UI/Common/../../Archive/IArchive.h \ + ../../UI/Common/../../Archive/../IProgress.h \ + ../../UI/Common/../../Archive/../../Common/MyUnknown.h \ + ../../UI/Common/../../Archive/../../Common/MyWindows.h \ + ../../UI/Common/../../Archive/../../Common/Types.h \ + ../../UI/Common/../../Archive/../IDecl.h \ + ../../UI/Common/../../Archive/../IStream.h \ + ../../UI/Common/../../Archive/../PropID.h ../../UI/Common/UpdateAction.h +UpdateProduce.o: ../../UI/Common/UpdateProduce.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../UI/Common/UpdateProduce.h ../../UI/Common/UpdatePair.h \ + ../../UI/Common/DirItem.h ../../../Common/MyString.h \ + ../../../Common/MyVector.h ../../../Common/Defs.h \ + ../../UI/Common/../../Archive/IArchive.h \ + ../../UI/Common/../../Archive/../IProgress.h \ + ../../UI/Common/../../Archive/../../Common/MyUnknown.h \ + ../../UI/Common/../../Archive/../../Common/MyWindows.h \ + ../../UI/Common/../../Archive/../../Common/Types.h \ + ../../UI/Common/../../Archive/../IDecl.h \ + ../../UI/Common/../../Archive/../IStream.h \ + ../../UI/Common/../../Archive/../PropID.h ../../UI/Common/UpdateAction.h +Bz2Handler.o: ../../Archive/Bz2Handler.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../../Common/ComTry.h \ + ../../../Common/MyWindows.h ../../../Windows/PropVariant.h \ + ../../../Windows/../Common/MyWindows.h \ + ../../../Windows/../Common/Types.h ../../Archive/../../Windows/System.h \ + ../../Archive/../../Windows/../Common/Types.h \ + ../../Archive/../Common/CreateCoder.h \ + ../../Archive/../Common/../../Common/MyCom.h \ + ../../Archive/../Common/../../Common/MyWindows.h \ + ../../Archive/../Common/../../Common/MyString.h \ + ../../Archive/../Common/../../Common/MyVector.h \ + ../../Archive/../Common/../../Common/Defs.h \ + ../../Archive/../Common/../ICoder.h ../../Archive/../Common/../IStream.h \ + ../../Archive/../Common/../../Common/MyUnknown.h \ + ../../Archive/../Common/../../Common/Types.h \ + ../../Archive/../Common/../IDecl.h ../../Archive/../Common/MethodId.h \ + ../../Archive/../Common/../../Common/Types.h \ + ../../Archive/../Common/ProgressUtils.h \ + ../../Archive/../Common/../IProgress.h \ + ../../Archive/../Common/RegisterArc.h \ + ../../Archive/../Common/../Archive/IArchive.h \ + ../../Archive/../Common/../Archive/../IProgress.h \ + ../../Archive/../Common/../Archive/../IStream.h \ + ../../Archive/../Common/../Archive/../PropID.h \ + ../../Archive/../Common/StreamUtils.h \ + ../../Archive/../Common/../IStream.h \ + ../../Archive/../Compress/BZip2Decoder.h \ + ../../Archive/../Compress/../../Common/MyCom.h \ + ../../Archive/../Compress/../../Windows/Synchronization.h \ + ../../Archive/../Compress/../../Windows/Defs.h \ + ../../Archive/../Compress/../../Windows/../Common/MyWindows.h \ + ../../Archive/../Compress/../../Windows/../../C/Threads.h \ + ../../Archive/../Compress/../../Windows/../../C/Types.h \ + ../../Archive/../Compress/../../Windows/Synchronization2.h \ + ../../Archive/../Compress/../../Windows/Thread.h \ + ../../Archive/../Compress/../ICoder.h \ + ../../Archive/../Compress/../Common/InBuffer.h \ + ../../Archive/../Compress/../Common/../IStream.h \ + ../../Archive/../Compress/../Common/../../Common/MyCom.h \ + ../../Archive/../Compress/../Common/../../Common/MyException.h \ + ../../Archive/../Compress/../Common/../../Common/MyWindows.h \ + ../../Archive/../Compress/../Common/OutBuffer.h \ + ../../Archive/../Compress/BitmDecoder.h \ + ../../Archive/../Compress/../IStream.h \ + ../../Archive/../Compress/BZip2Const.h \ + ../../Archive/../Compress/BZip2Crc.h \ + ../../Archive/../Compress/HuffmanDecoder.h \ + ../../Archive/../Compress/../../Common/Types.h \ + ../../Archive/../Compress/BZip2Encoder.h \ + ../../Archive/../Compress/../../Common/Defs.h \ + ../../Archive/../Compress/BitmEncoder.h \ + ../../Archive/../Compress/CopyCoder.h \ + ../../Archive/Common/DummyOutStream.h \ + ../../Archive/Common/../../IStream.h ../../../Common/MyCom.h \ + ../../Archive/Common/ParseProperties.h ../../../Common/MyString.h +DeflateProps.o: ../../Archive/DeflateProps.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../../Windows/PropVariant.h ../../../Windows/../Common/MyWindows.h \ + ../../../Windows/../Common/Types.h \ + ../../Archive/Common/ParseProperties.h ../../../Common/MyString.h \ + ../../../Common/MyVector.h ../../../Common/Defs.h \ + ../../Archive/DeflateProps.h ../../Archive/../ICoder.h \ + ../../Archive/../IStream.h ../../Archive/../../Common/MyUnknown.h \ + ../../Archive/../../Common/MyWindows.h \ + ../../Archive/../../Common/Types.h ../../Archive/../IDecl.h +GzHandler.o: ../../Archive/GzHandler.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../Archive/../../../C/CpuArch.h \ + ../../Archive/../../../C/Types.h ../../../Common/ComTry.h \ + ../../../Common/MyWindows.h ../../../Common/StringConvert.h \ + ../../../Common/MyString.h ../../../Common/MyVector.h \ + ../../../Common/Defs.h ../../../Windows/PropVariant.h \ + ../../../Windows/../Common/MyWindows.h \ + ../../../Windows/../Common/Types.h ../../../Windows/Time.h \ + ../../Archive/../Common/ProgressUtils.h \ + ../../Archive/../Common/../../Common/MyCom.h \ + ../../Archive/../Common/../../Common/MyWindows.h \ + ../../Archive/../Common/../ICoder.h ../../Archive/../Common/../IStream.h \ + ../../Archive/../Common/../../Common/MyUnknown.h \ + ../../Archive/../Common/../../Common/Types.h \ + ../../Archive/../Common/../IDecl.h \ + ../../Archive/../Common/../IProgress.h \ + ../../Archive/../Common/RegisterArc.h \ + ../../Archive/../Common/../Archive/IArchive.h \ + ../../Archive/../Common/../Archive/../IProgress.h \ + ../../Archive/../Common/../Archive/../IStream.h \ + ../../Archive/../Common/../Archive/../PropID.h \ + ../../Archive/../Common/StreamUtils.h \ + ../../Archive/../Common/../IStream.h \ + ../../Archive/../Compress/CopyCoder.h \ + ../../Archive/../Compress/../../Common/MyCom.h \ + ../../Archive/../Compress/../ICoder.h \ + ../../Archive/../Compress/DeflateDecoder.h \ + ../../Archive/../Compress/../Common/InBuffer.h \ + ../../Archive/../Compress/../Common/../IStream.h \ + ../../Archive/../Compress/../Common/../../Common/MyCom.h \ + ../../Archive/../Compress/../Common/../../Common/MyException.h \ + ../../Archive/../Compress/../Common/../../Common/MyWindows.h \ + ../../Archive/../Compress/BitlDecoder.h \ + ../../Archive/../Compress/../IStream.h \ + ../../Archive/../Compress/DeflateConst.h \ + ../../Archive/../Compress/HuffmanDecoder.h \ + ../../Archive/../Compress/../../Common/Types.h \ + ../../Archive/../Compress/LzOutWindow.h \ + ../../Archive/../Compress/../Common/OutBuffer.h \ + ../../Archive/../Compress/DeflateEncoder.h \ + ../../Archive/../Compress/../../../C/LzFind.h \ + ../../Archive/../Compress/../../../C/Types.h ../../../Common/MyCom.h \ + ../../Archive/../Compress/BitlEncoder.h \ + ../../Archive/Common/InStreamWithCRC.h \ + ../../Archive/Common/../../../../C/7zCrc.h \ + ../../Archive/Common/../../../../C/Types.h \ + ../../Archive/Common/../../../Common/MyCom.h \ + ../../Archive/Common/../../IStream.h \ + ../../Archive/Common/OutStreamWithCRC.h ../../Archive/DeflateProps.h \ + ../../Archive/../ICoder.h +LzmaHandler.o: ../../Archive/LzmaHandler.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../Archive/../../../C/CpuArch.h \ + ../../Archive/../../../C/Types.h ../../../Common/ComTry.h \ + ../../../Common/MyWindows.h ../../../Common/IntToString.h \ + ../../../Windows/PropVariant.h ../../../Windows/../Common/MyWindows.h \ + ../../../Windows/../Common/Types.h ../../Archive/../Common/CreateCoder.h \ + ../../Archive/../Common/../../Common/MyCom.h \ + ../../Archive/../Common/../../Common/MyWindows.h \ + ../../Archive/../Common/../../Common/MyString.h \ + ../../Archive/../Common/../../Common/MyVector.h \ + ../../Archive/../Common/../../Common/Defs.h \ + ../../Archive/../Common/../ICoder.h ../../Archive/../Common/../IStream.h \ + ../../Archive/../Common/../../Common/MyUnknown.h \ + ../../Archive/../Common/../../Common/Types.h \ + ../../Archive/../Common/../IDecl.h ../../Archive/../Common/MethodId.h \ + ../../Archive/../Common/../../Common/Types.h \ + ../../Archive/../Common/ProgressUtils.h \ + ../../Archive/../Common/../IProgress.h \ + ../../Archive/../Common/RegisterArc.h \ + ../../Archive/../Common/../Archive/IArchive.h \ + ../../Archive/../Common/../Archive/../IProgress.h \ + ../../Archive/../Common/../Archive/../IStream.h \ + ../../Archive/../Common/../Archive/../PropID.h \ + ../../Archive/../Common/StreamUtils.h \ + ../../Archive/../Common/../IStream.h \ + ../../Archive/../Compress/LzmaDecoder.h \ + ../../Archive/../Compress/../../../C/LzmaDec.h \ + ../../Archive/../Compress/../../../C/Types.h \ + ../../Archive/../Compress/../../Common/MyCom.h \ + ../../Archive/../Compress/../ICoder.h \ + ../../Archive/Common/DummyOutStream.h \ + ../../Archive/Common/../../IStream.h ../../../Common/MyCom.h +PpmdHandler.o: ../../Archive/PpmdHandler.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../Archive/../../../C/CpuArch.h \ + ../../Archive/../../../C/Types.h ../../Archive/../../../C/Alloc.h \ + ../../Archive/../../../C/Ppmd7.h ../../Archive/../../../C/Ppmd.h \ + ../../Archive/../../../C/CpuArch.h ../../Archive/../../../C/Ppmd8.h \ + ../../../Common/ComTry.h ../../../Common/MyWindows.h \ + ../../../Common/IntToString.h ../../../Common/StringConvert.h \ + ../../../Common/MyString.h ../../../Common/MyVector.h \ + ../../../Common/Defs.h ../../../Windows/PropVariant.h \ + ../../../Windows/../Common/MyWindows.h \ + ../../../Windows/../Common/Types.h ../../../Windows/Time.h \ + ../../Archive/../Common/CWrappers.h ../../Archive/../Common/../ICoder.h \ + ../../Archive/../Common/../IStream.h \ + ../../Archive/../Common/../../Common/MyUnknown.h \ + ../../Archive/../Common/../../Common/MyWindows.h \ + ../../Archive/../Common/../../Common/Types.h \ + ../../Archive/../Common/../IDecl.h \ + ../../Archive/../Common/../../Common/MyCom.h \ + ../../Archive/../Common/ProgressUtils.h \ + ../../Archive/../Common/../IProgress.h \ + ../../Archive/../Common/RegisterArc.h \ + ../../Archive/../Common/../Archive/IArchive.h \ + ../../Archive/../Common/../Archive/../IProgress.h \ + ../../Archive/../Common/../Archive/../IStream.h \ + ../../Archive/../Common/../Archive/../PropID.h \ + ../../Archive/../Common/StreamUtils.h \ + ../../Archive/../Common/../IStream.h +SplitHandler.o: ../../Archive/SplitHandler.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../../Common/ComTry.h ../../../Common/MyWindows.h \ + ../../../Common/MyString.h ../../../Common/MyVector.h \ + ../../../Common/Defs.h ../../../Windows/PropVariant.h \ + ../../../Windows/../Common/MyWindows.h \ + ../../../Windows/../Common/Types.h \ + ../../Archive/../Common/ProgressUtils.h \ + ../../Archive/../Common/../../Common/MyCom.h \ + ../../Archive/../Common/../../Common/MyWindows.h \ + ../../Archive/../Common/../ICoder.h ../../Archive/../Common/../IStream.h \ + ../../Archive/../Common/../../Common/MyUnknown.h \ + ../../Archive/../Common/../../Common/Types.h \ + ../../Archive/../Common/../IDecl.h \ + ../../Archive/../Common/../IProgress.h \ + ../../Archive/../Common/RegisterArc.h \ + ../../Archive/../Common/../Archive/IArchive.h \ + ../../Archive/../Common/../Archive/../IProgress.h \ + ../../Archive/../Common/../Archive/../IStream.h \ + ../../Archive/../Common/../Archive/../PropID.h \ + ../../Archive/../Compress/CopyCoder.h \ + ../../Archive/../Compress/../../Common/MyCom.h \ + ../../Archive/../Compress/../ICoder.h ../../Archive/Common/MultiStream.h \ + ../../Archive/Common/../../../Common/MyCom.h \ + ../../Archive/Common/../../../Common/MyVector.h \ + ../../Archive/Common/../../IStream.h +XzHandler.o: ../../Archive/XzHandler.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../Archive/../../../C/Alloc.h \ + ../../Archive/../../../C/XzCrc64.h ../../Archive/../../../C/Types.h \ + ../../Archive/../../../C/XzEnc.h ../../Archive/../../../C/Lzma2Enc.h \ + ../../Archive/../../../C/LzmaEnc.h ../../Archive/../../../C/Xz.h \ + ../../Archive/../../../C/Sha256.h ../../Archive/../../Common/ComTry.h \ + ../../Archive/../../Common/MyWindows.h \ + ../../Archive/../../Common/IntToString.h \ + ../../Archive/../../Common/Types.h ../../Archive/../ICoder.h \ + ../../Archive/../IStream.h ../../Archive/../../Common/MyUnknown.h \ + ../../Archive/../../Common/Types.h ../../Archive/../IDecl.h \ + ../../Archive/../Common/CWrappers.h ../../Archive/../Common/../ICoder.h \ + ../../Archive/../Common/../../Common/MyCom.h \ + ../../Archive/../Common/../../Common/MyWindows.h \ + ../../Archive/../Common/ProgressUtils.h \ + ../../Archive/../Common/../IProgress.h \ + ../../Archive/../Common/../../Common/MyUnknown.h \ + ../../Archive/../Common/../../Common/Types.h \ + ../../Archive/../Common/../IDecl.h ../../Archive/../Common/RegisterArc.h \ + ../../Archive/../Common/../Archive/IArchive.h \ + ../../Archive/../Common/../Archive/../IProgress.h \ + ../../Archive/../Common/../Archive/../IStream.h \ + ../../Archive/../Common/../Archive/../PropID.h \ + ../../Archive/../Common/StreamUtils.h \ + ../../Archive/../Common/../IStream.h \ + ../../Archive/../Compress/CopyCoder.h \ + ../../Archive/../Compress/../../Common/MyCom.h \ + ../../Archive/../Compress/../ICoder.h ../../Archive/IArchive.h \ + ../../Archive/Common/HandlerOut.h \ + ../../Archive/Common/../../../Common/MyString.h \ + ../../Archive/Common/../../../Common/MyVector.h \ + ../../Archive/Common/../../../Common/Defs.h \ + ../../Archive/Common/../../Common/MethodProps.h \ + ../../Archive/Common/../../Common/../../Common/MyVector.h \ + ../../Archive/Common/../../Common/../../Windows/PropVariant.h \ + ../../Archive/Common/../../Common/../../Windows/../Common/MyWindows.h \ + ../../Archive/Common/../../Common/../../Windows/../Common/Types.h \ + ../../Archive/Common/../../Common/MethodId.h \ + ../../Archive/Common/../../Common/../../Common/Types.h +ZHandler.o: ../../Archive/ZHandler.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../../Common/ComTry.h \ + ../../../Common/MyWindows.h ../../../Windows/PropVariant.h \ + ../../../Windows/../Common/MyWindows.h \ + ../../../Windows/../Common/Types.h \ + ../../Archive/../Common/ProgressUtils.h \ + ../../Archive/../Common/../../Common/MyCom.h \ + ../../Archive/../Common/../../Common/MyWindows.h \ + ../../Archive/../Common/../ICoder.h ../../Archive/../Common/../IStream.h \ + ../../Archive/../Common/../../Common/MyUnknown.h \ + ../../Archive/../Common/../../Common/Types.h \ + ../../Archive/../Common/../IDecl.h \ + ../../Archive/../Common/../IProgress.h \ + ../../Archive/../Common/RegisterArc.h \ + ../../Archive/../Common/../Archive/IArchive.h \ + ../../Archive/../Common/../Archive/../IProgress.h \ + ../../Archive/../Common/../Archive/../IStream.h \ + ../../Archive/../Common/../Archive/../PropID.h \ + ../../Archive/../Common/StreamUtils.h \ + ../../Archive/../Common/../IStream.h \ + ../../Archive/../Compress/ZDecoder.h \ + ../../Archive/../Compress/../../Common/MyCom.h \ + ../../Archive/../Compress/../ICoder.h \ + ../../Archive/Common/DummyOutStream.h \ + ../../Archive/Common/../../IStream.h ../../../Common/MyCom.h +CoderMixer2.o: ../../Archive/Common/CoderMixer2.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../Archive/Common/CoderMixer2.h \ + ../../Archive/Common/../../../Common/MyVector.h \ + ../../Archive/Common/../../../Common/Defs.h \ + ../../Archive/Common/../../../Common/Types.h \ + ../../Archive/Common/../../../Common/MyCom.h \ + ../../Archive/Common/../../../Common/MyWindows.h \ + ../../Archive/Common/../../ICoder.h ../../Archive/Common/../../IStream.h \ + ../../Archive/Common/../../../Common/MyUnknown.h \ + ../../Archive/Common/../../../Common/Types.h \ + ../../Archive/Common/../../IDecl.h +CoderMixer2MT.o: ../../Archive/Common/CoderMixer2MT.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../Archive/Common/CoderMixer2MT.h ../../Archive/Common/CoderMixer2.h \ + ../../Archive/Common/../../../Common/MyVector.h \ + ../../Archive/Common/../../../Common/Defs.h \ + ../../Archive/Common/../../../Common/Types.h \ + ../../Archive/Common/../../../Common/MyCom.h \ + ../../Archive/Common/../../../Common/MyWindows.h \ + ../../Archive/Common/../../ICoder.h ../../Archive/Common/../../IStream.h \ + ../../Archive/Common/../../../Common/MyUnknown.h \ + ../../Archive/Common/../../../Common/Types.h \ + ../../Archive/Common/../../IDecl.h \ + ../../Archive/Common/../../Common/StreamBinder.h \ + ../../Archive/Common/../../Common/../IStream.h \ + ../../Archive/Common/../../Common/../../Windows/Synchronization.h \ + ../../Archive/Common/../../Common/../../Windows/Defs.h \ + ../../Archive/Common/../../Common/../../Windows/../Common/MyWindows.h \ + ../../Archive/Common/../../Common/../../Windows/../../C/Threads.h \ + ../../Archive/Common/../../Common/../../Windows/../../C/Types.h \ + ../../Archive/Common/../../Common/../../Windows/Synchronization2.h \ + ../../Archive/Common/../../Common/VirtThread.h \ + ../../Archive/Common/../../Common/../../Windows/Thread.h +CrossThreadProgress.o: ../../Archive/Common/CrossThreadProgress.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../Archive/Common/CrossThreadProgress.h \ + ../../Archive/Common/../../ICoder.h ../../Archive/Common/../../IStream.h \ + ../../Archive/Common/../../../Common/MyUnknown.h \ + ../../Archive/Common/../../../Common/MyWindows.h \ + ../../Archive/Common/../../../Common/Types.h \ + ../../Archive/Common/../../IDecl.h \ + ../../Archive/Common/../../../Windows/Synchronization.h \ + ../../Archive/Common/../../../Windows/Defs.h \ + ../../Archive/Common/../../../Windows/../Common/MyWindows.h \ + ../../Archive/Common/../../../Windows/../../C/Threads.h \ + ../../Archive/Common/../../../Windows/../../C/Types.h \ + ../../Archive/Common/../../../Windows/Synchronization2.h \ + ../../Archive/Common/../../../Common/MyCom.h +DummyOutStream.o: ../../Archive/Common/DummyOutStream.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../Archive/Common/DummyOutStream.h \ + ../../Archive/Common/../../IStream.h \ + ../../Archive/Common/../../../Common/MyUnknown.h \ + ../../Archive/Common/../../../Common/MyWindows.h \ + ../../Archive/Common/../../../Common/Types.h \ + ../../Archive/Common/../../IDecl.h ../../../Common/MyCom.h \ + ../../../Common/MyWindows.h +FindSignature.o: ../../Archive/Common/FindSignature.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../../Common/Buffer.h ../../../Common/Defs.h \ + ../../Archive/Common/FindSignature.h \ + ../../Archive/Common/../../IStream.h \ + ../../Archive/Common/../../../Common/MyUnknown.h \ + ../../Archive/Common/../../../Common/MyWindows.h \ + ../../Archive/Common/../../../Common/Types.h \ + ../../Archive/Common/../../IDecl.h \ + ../../Archive/Common/../../Common/StreamUtils.h \ + ../../Archive/Common/../../Common/../IStream.h +HandlerOut.o: ../../Archive/Common/HandlerOut.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../Archive/Common/../../../Common/StringToInt.h \ + ../../Archive/Common/../../../Common/Types.h \ + ../../Archive/Common/../../../Windows/PropVariant.h \ + ../../Archive/Common/../../../Windows/../Common/MyWindows.h \ + ../../Archive/Common/../../../Windows/../Common/Types.h \ + ../../Archive/Common/../../../Windows/System.h \ + ../../Archive/Common/../../ICoder.h ../../Archive/Common/../../IStream.h \ + ../../Archive/Common/../../../Common/MyUnknown.h \ + ../../Archive/Common/../../../Common/MyWindows.h \ + ../../Archive/Common/../../../Common/Types.h \ + ../../Archive/Common/../../IDecl.h \ + ../../Archive/Common/../Common/ParseProperties.h \ + ../../../Common/MyString.h ../../../Common/MyVector.h \ + ../../../Common/Defs.h ../../Archive/Common/HandlerOut.h \ + ../../Archive/Common/../../../Common/MyString.h \ + ../../Archive/Common/../../Common/MethodProps.h \ + ../../Archive/Common/../../Common/../../Common/MyVector.h \ + ../../Archive/Common/../../Common/../../Windows/PropVariant.h \ + ../../Archive/Common/../../Common/MethodId.h \ + ../../Archive/Common/../../Common/../../Common/Types.h +InStreamWithCRC.o: ../../Archive/Common/InStreamWithCRC.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../Archive/Common/InStreamWithCRC.h \ + ../../Archive/Common/../../../../C/7zCrc.h \ + ../../Archive/Common/../../../../C/Types.h \ + ../../Archive/Common/../../../Common/MyCom.h \ + ../../Archive/Common/../../../Common/MyWindows.h \ + ../../Archive/Common/../../IStream.h \ + ../../Archive/Common/../../../Common/MyUnknown.h \ + ../../Archive/Common/../../../Common/Types.h \ + ../../Archive/Common/../../IDecl.h +ItemNameUtils.o: ../../Archive/Common/ItemNameUtils.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../Archive/Common/../../../../C/Types.h \ + ../../Archive/Common/ItemNameUtils.h \ + ../../Archive/Common/../../../Common/MyString.h \ + ../../Archive/Common/../../../Common/MyVector.h \ + ../../Archive/Common/../../../Common/Defs.h +MultiStream.o: ../../Archive/Common/MultiStream.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../Archive/Common/MultiStream.h \ + ../../Archive/Common/../../../Common/MyCom.h \ + ../../Archive/Common/../../../Common/MyWindows.h \ + ../../Archive/Common/../../../Common/MyVector.h \ + ../../Archive/Common/../../../Common/Defs.h \ + ../../Archive/Common/../../IStream.h \ + ../../Archive/Common/../../../Common/MyUnknown.h \ + ../../Archive/Common/../../../Common/Types.h \ + ../../Archive/Common/../../IDecl.h +OutStreamWithCRC.o: ../../Archive/Common/OutStreamWithCRC.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../Archive/Common/OutStreamWithCRC.h \ + ../../Archive/Common/../../../../C/7zCrc.h \ + ../../Archive/Common/../../../../C/Types.h \ + ../../Archive/Common/../../../Common/MyCom.h \ + ../../Archive/Common/../../../Common/MyWindows.h \ + ../../Archive/Common/../../IStream.h \ + ../../Archive/Common/../../../Common/MyUnknown.h \ + ../../Archive/Common/../../../Common/Types.h \ + ../../Archive/Common/../../IDecl.h +ParseProperties.o: ../../Archive/Common/ParseProperties.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../Archive/Common/ParseProperties.h ../../../Common/MyString.h \ + ../../../Common/MyVector.h ../../../Common/Defs.h \ + ../../../Common/StringToInt.h ../../../Common/MyCom.h \ + ../../../Common/MyWindows.h +7zCompressionMode.o: ../../Archive/7z/7zCompressionMode.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h +7zDecode.o: ../../Archive/7z/7zDecode.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h \ + ../../Archive/7z/../../Common/LimitedStreams.h \ + ../../Archive/7z/../../Common/../../Common/MyCom.h \ + ../../Archive/7z/../../Common/../../Common/MyWindows.h \ + ../../Archive/7z/../../Common/../../Common/MyVector.h \ + ../../Archive/7z/../../Common/../../Common/Defs.h \ + ../../Archive/7z/../../Common/../IStream.h \ + ../../Archive/7z/../../Common/../../Common/MyUnknown.h \ + ../../Archive/7z/../../Common/../../Common/Types.h \ + ../../Archive/7z/../../Common/../IDecl.h \ + ../../Archive/7z/../../Common/LockedStream.h \ + ../../Archive/7z/../../Common/../../Windows/Synchronization.h \ + ../../Archive/7z/../../Common/../../Windows/Defs.h \ + ../../Archive/7z/../../Common/../../Windows/../Common/MyWindows.h \ + ../../Archive/7z/../../Common/../../Windows/../../C/Threads.h \ + ../../Archive/7z/../../Common/../../Windows/../../C/Types.h \ + ../../Archive/7z/../../Common/../../Windows/Synchronization2.h \ + ../../Archive/7z/../../Common/ProgressUtils.h \ + ../../Archive/7z/../../Common/../ICoder.h \ + ../../Archive/7z/../../Common/../IStream.h \ + ../../Archive/7z/../../Common/../IProgress.h \ + ../../Archive/7z/../../Common/StreamObjects.h \ + ../../Archive/7z/../../Common/../../Common/Buffer.h \ + ../../Archive/7z/7zDecode.h ../../Archive/7z/../../IStream.h \ + ../../Archive/7z/../../IPassword.h \ + ../../Archive/7z/../../../Common/MyUnknown.h \ + ../../Archive/7z/../../../Common/Types.h ../../Archive/7z/../../IDecl.h \ + ../../Archive/7z/../Common/CoderMixer2.h \ + ../../Archive/7z/../Common/../../../Common/MyVector.h \ + ../../Archive/7z/../Common/../../../Common/Types.h \ + ../../Archive/7z/../Common/../../../Common/MyCom.h \ + ../../Archive/7z/../Common/../../ICoder.h \ + ../../Archive/7z/../Common/CoderMixer2MT.h \ + ../../Archive/7z/../Common/CoderMixer2.h \ + ../../Archive/7z/../Common/../../Common/StreamBinder.h \ + ../../Archive/7z/../Common/../../Common/../IStream.h \ + ../../Archive/7z/../Common/../../Common/../../Windows/Synchronization.h \ + ../../Archive/7z/../Common/../../Common/VirtThread.h \ + ../../Archive/7z/../Common/../../Common/../../Windows/Thread.h \ + ../../Archive/7z/../Common/../../Common/../../Windows/Defs.h \ + ../../Archive/7z/../Common/../../Common/../../Windows/../../C/Threads.h \ + ../../Archive/7z/../../Common/CreateCoder.h \ + ../../Archive/7z/../../Common/../../Common/MyString.h \ + ../../Archive/7z/../../Common/../../Common/MyVector.h \ + ../../Archive/7z/../../Common/MethodId.h \ + ../../Archive/7z/../../Common/../../Common/Types.h \ + ../../Archive/7z/7zItem.h ../../Archive/7z/../../../Common/Buffer.h \ + ../../Archive/7z/../../../Common/MyString.h \ + ../../Archive/7z/../../Common/MethodId.h ../../Archive/7z/7zHeader.h \ + ../../Archive/7z/../../../Common/Types.h +7zEncode.o: ../../Archive/7z/7zEncode.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h \ + ../../Archive/7z/../../Common/CreateCoder.h \ + ../../Archive/7z/../../Common/../../Common/MyCom.h \ + ../../Archive/7z/../../Common/../../Common/MyWindows.h \ + ../../Archive/7z/../../Common/../../Common/MyString.h \ + ../../Archive/7z/../../Common/../../Common/MyVector.h \ + ../../Archive/7z/../../Common/../../Common/Defs.h \ + ../../Archive/7z/../../Common/../ICoder.h \ + ../../Archive/7z/../../Common/../IStream.h \ + ../../Archive/7z/../../Common/../../Common/MyUnknown.h \ + ../../Archive/7z/../../Common/../../Common/Types.h \ + ../../Archive/7z/../../Common/../IDecl.h \ + ../../Archive/7z/../../Common/MethodId.h \ + ../../Archive/7z/../../Common/../../Common/Types.h \ + ../../Archive/7z/../../Common/FilterCoder.h \ + ../../Archive/7z/../../Common/../IPassword.h \ + ../../Archive/7z/../../Common/LimitedStreams.h \ + ../../Archive/7z/../../Common/../../Common/MyVector.h \ + ../../Archive/7z/../../Common/../IStream.h \ + ../../Archive/7z/../../Common/InOutTempBuffer.h \ + ../../Archive/7z/../../Common/../../Windows/FileDir.h \ + ../../Archive/7z/../../Common/../../Windows/../Common/MyString.h \ + ../../Archive/7z/../../Common/../../Windows/Defs.h \ + ../../Archive/7z/../../Common/../../Windows/../Common/MyWindows.h \ + ../../Archive/7z/../../Common/../../Windows/FileIO.h \ + ../../../Common/MyString.h ../../Archive/7z/../../Common/ProgressUtils.h \ + ../../Archive/7z/../../Common/../IProgress.h \ + ../../Archive/7z/../../Common/StreamObjects.h \ + ../../Archive/7z/../../Common/../../Common/Buffer.h \ + ../../Archive/7z/7zEncode.h ../../Archive/7z/7zCompressionMode.h \ + ../../Archive/7z/../../../Common/MyString.h \ + ../../Archive/7z/../../../Windows/PropVariant.h \ + ../../Archive/7z/../../../Windows/../Common/MyWindows.h \ + ../../Archive/7z/../../../Windows/../Common/Types.h \ + ../../Archive/7z/../../Common/MethodProps.h \ + ../../Archive/7z/../../Common/../../Windows/PropVariant.h \ + ../../Archive/7z/../Common/CoderMixer2.h \ + ../../Archive/7z/../Common/../../../Common/MyVector.h \ + ../../Archive/7z/../Common/../../../Common/Types.h \ + ../../Archive/7z/../Common/../../../Common/MyCom.h \ + ../../Archive/7z/../Common/../../ICoder.h \ + ../../Archive/7z/../Common/CoderMixer2MT.h \ + ../../Archive/7z/../Common/CoderMixer2.h \ + ../../Archive/7z/../Common/../../Common/StreamBinder.h \ + ../../Archive/7z/../Common/../../Common/../IStream.h \ + ../../Archive/7z/../Common/../../Common/../../Windows/Synchronization.h \ + ../../Archive/7z/../Common/../../Common/../../Windows/Defs.h \ + ../../Archive/7z/../Common/../../Common/../../Windows/../../C/Threads.h \ + ../../Archive/7z/../Common/../../Common/../../Windows/../../C/Types.h \ + ../../Archive/7z/../Common/../../Common/../../Windows/Synchronization2.h \ + ../../Archive/7z/../Common/../../Common/VirtThread.h \ + ../../Archive/7z/../Common/../../Common/../../Windows/Thread.h \ + ../../Archive/7z/7zItem.h ../../Archive/7z/../../../Common/Buffer.h \ + ../../Archive/7z/../../Common/MethodId.h ../../Archive/7z/7zHeader.h \ + ../../Archive/7z/../../../Common/Types.h ../../Archive/7z/7zSpecStream.h \ + ../../Archive/7z/../../IStream.h ../../Archive/7z/../../ICoder.h \ + ../../Archive/7z/../../../Common/MyCom.h +7zExtract.o: ../../Archive/7z/7zExtract.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h \ + ../../Archive/7z/../../../Common/ComTry.h \ + ../../Archive/7z/../../../Common/MyWindows.h \ + ../../Archive/7z/../../Common/ProgressUtils.h \ + ../../Archive/7z/../../Common/../../Common/MyCom.h \ + ../../Archive/7z/../../Common/../../Common/MyWindows.h \ + ../../Archive/7z/../../Common/../ICoder.h \ + ../../Archive/7z/../../Common/../IStream.h \ + ../../Archive/7z/../../Common/../../Common/MyUnknown.h \ + ../../Archive/7z/../../Common/../../Common/Types.h \ + ../../Archive/7z/../../Common/../IDecl.h \ + ../../Archive/7z/../../Common/../IProgress.h ../../Archive/7z/7zDecode.h \ + ../../Archive/7z/../../IStream.h ../../Archive/7z/../../IPassword.h \ + ../../Archive/7z/../../../Common/MyUnknown.h \ + ../../Archive/7z/../../../Common/Types.h ../../Archive/7z/../../IDecl.h \ + ../../Archive/7z/../Common/CoderMixer2.h \ + ../../Archive/7z/../Common/../../../Common/MyVector.h \ + ../../Archive/7z/../Common/../../../Common/Defs.h \ + ../../Archive/7z/../Common/../../../Common/Types.h \ + ../../Archive/7z/../Common/../../../Common/MyCom.h \ + ../../Archive/7z/../Common/../../ICoder.h \ + ../../Archive/7z/../Common/CoderMixer2MT.h \ + ../../Archive/7z/../Common/CoderMixer2.h \ + ../../Archive/7z/../Common/../../Common/StreamBinder.h \ + ../../Archive/7z/../Common/../../Common/../IStream.h \ + ../../Archive/7z/../Common/../../Common/../../Windows/Synchronization.h \ + ../../Archive/7z/../Common/../../Common/../../Windows/Defs.h \ + ../../Archive/7z/../Common/../../Common/../../Windows/../Common/MyWindows.h \ + ../../Archive/7z/../Common/../../Common/../../Windows/../../C/Threads.h \ + ../../Archive/7z/../Common/../../Common/../../Windows/../../C/Types.h \ + ../../Archive/7z/../Common/../../Common/../../Windows/Synchronization2.h \ + ../../Archive/7z/../Common/../../Common/VirtThread.h \ + ../../Archive/7z/../Common/../../Common/../../Windows/Thread.h \ + ../../Archive/7z/../../Common/CreateCoder.h \ + ../../Archive/7z/../../Common/../../Common/MyString.h \ + ../../Archive/7z/../../Common/../../Common/MyVector.h \ + ../../Archive/7z/../../Common/MethodId.h \ + ../../Archive/7z/../../Common/../../Common/Types.h \ + ../../Archive/7z/7zItem.h ../../Archive/7z/../../../Common/Buffer.h \ + ../../Archive/7z/../../../Common/Defs.h \ + ../../Archive/7z/../../../Common/MyString.h \ + ../../Archive/7z/../../Common/MethodId.h ../../Archive/7z/7zHeader.h \ + ../../Archive/7z/../../../Common/Types.h \ + ../../Archive/7z/7zFolderOutStream.h ../../Archive/7z/../IArchive.h \ + ../../Archive/7z/../../IProgress.h ../../Archive/7z/../../IStream.h \ + ../../Archive/7z/../../PropID.h \ + ../../Archive/7z/../Common/OutStreamWithCRC.h \ + ../../Archive/7z/../Common/../../../../C/7zCrc.h \ + ../../Archive/7z/../Common/../../../../C/Types.h \ + ../../Archive/7z/../Common/../../IStream.h ../../Archive/7z/7zIn.h \ + ../../Archive/7z/../../../Common/MyCom.h \ + ../../Archive/7z/../../Common/InBuffer.h \ + ../../Archive/7z/../../Common/../IStream.h \ + ../../Archive/7z/../../Common/../../Common/MyException.h \ + ../../Archive/7z/7zHandler.h ../../Archive/7z/../../ICoder.h \ + ../../Archive/7z/../Common/HandlerOut.h \ + ../../Archive/7z/../Common/../../../Common/MyString.h \ + ../../Archive/7z/../Common/../../Common/MethodProps.h \ + ../../Archive/7z/../Common/../../Common/../../Common/MyVector.h \ + ../../Archive/7z/../Common/../../Common/../../Windows/PropVariant.h \ + ../../Archive/7z/../Common/../../Common/../../Windows/../Common/Types.h \ + ../../Archive/7z/../Common/../../Common/MethodId.h \ + ../../Archive/7z/7zCompressionMode.h \ + ../../Archive/7z/../../../Windows/PropVariant.h \ + ../../Archive/7z/../../Common/MethodProps.h +7zFolderInStream.o: ../../Archive/7z/7zFolderInStream.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../Archive/7z/7zFolderInStream.h ../../Archive/7z/../../ICoder.h \ + ../../Archive/7z/../../IStream.h \ + ../../Archive/7z/../../../Common/MyUnknown.h \ + ../../Archive/7z/../../../Common/MyWindows.h \ + ../../Archive/7z/../../../Common/Types.h ../../Archive/7z/../../IDecl.h \ + ../../Archive/7z/../IArchive.h ../../Archive/7z/../../IProgress.h \ + ../../Archive/7z/../../IStream.h ../../Archive/7z/../../PropID.h \ + ../../Archive/7z/../Common/InStreamWithCRC.h \ + ../../Archive/7z/../Common/../../../../C/7zCrc.h \ + ../../Archive/7z/../Common/../../../../C/Types.h \ + ../../Archive/7z/../Common/../../../Common/MyCom.h \ + ../../Archive/7z/../Common/../../../Common/MyWindows.h \ + ../../Archive/7z/../Common/../../IStream.h ../../Archive/7z/7zItem.h \ + ../../Archive/7z/../../../Common/Buffer.h \ + ../../Archive/7z/../../../Common/Defs.h \ + ../../Archive/7z/../../../Common/MyString.h \ + ../../Archive/7z/../../../Common/MyVector.h \ + ../../Archive/7z/../../Common/MethodId.h \ + ../../Archive/7z/../../Common/../../Common/Types.h \ + ../../Archive/7z/7zHeader.h ../../Archive/7z/../../../Common/Types.h +7zFolderOutStream.o: ../../Archive/7z/7zFolderOutStream.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../Archive/7z/7zFolderOutStream.h ../../Archive/7z/../../IStream.h \ + ../../Archive/7z/../../../Common/MyUnknown.h \ + ../../Archive/7z/../../../Common/MyWindows.h \ + ../../Archive/7z/../../../Common/Types.h ../../Archive/7z/../../IDecl.h \ + ../../Archive/7z/../IArchive.h ../../Archive/7z/../../IProgress.h \ + ../../Archive/7z/../../IStream.h ../../Archive/7z/../../PropID.h \ + ../../Archive/7z/../Common/OutStreamWithCRC.h \ + ../../Archive/7z/../Common/../../../../C/7zCrc.h \ + ../../Archive/7z/../Common/../../../../C/Types.h \ + ../../Archive/7z/../Common/../../../Common/MyCom.h \ + ../../Archive/7z/../Common/../../../Common/MyWindows.h \ + ../../Archive/7z/../Common/../../IStream.h ../../Archive/7z/7zIn.h \ + ../../Archive/7z/../../../Common/MyCom.h \ + ../../Archive/7z/../../IPassword.h \ + ../../Archive/7z/../../Common/CreateCoder.h \ + ../../Archive/7z/../../Common/../../Common/MyCom.h \ + ../../Archive/7z/../../Common/../../Common/MyString.h \ + ../../Archive/7z/../../Common/../../Common/MyVector.h \ + ../../Archive/7z/../../Common/../../Common/Defs.h \ + ../../Archive/7z/../../Common/../ICoder.h \ + ../../Archive/7z/../../Common/../IStream.h \ + ../../Archive/7z/../../Common/MethodId.h \ + ../../Archive/7z/../../Common/../../Common/Types.h \ + ../../Archive/7z/../../Common/InBuffer.h \ + ../../Archive/7z/../../Common/../IStream.h \ + ../../Archive/7z/../../Common/../../Common/MyException.h \ + ../../Archive/7z/../../Common/../../Common/MyWindows.h \ + ../../Archive/7z/7zItem.h ../../Archive/7z/../../../Common/Buffer.h \ + ../../Archive/7z/../../../Common/Defs.h \ + ../../Archive/7z/../../../Common/MyString.h \ + ../../Archive/7z/../../Common/MethodId.h ../../Archive/7z/7zHeader.h \ + ../../Archive/7z/../../../Common/Types.h +7zHandler.o: ../../Archive/7z/7zHandler.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h \ + ../../Archive/7z/../../../../C/CpuArch.h \ + ../../Archive/7z/../../../../C/Types.h \ + ../../Archive/7z/../../../Common/ComTry.h \ + ../../Archive/7z/../../../Common/MyWindows.h \ + ../../Archive/7z/../../../Common/IntToString.h \ + ../../Archive/7z/../../../Common/Types.h \ + ../../Archive/7z/../../../Windows/System.h \ + ../../Archive/7z/../../../Windows/../Common/Types.h \ + ../../Archive/7z/../Common/ItemNameUtils.h \ + ../../Archive/7z/../Common/../../../Common/MyString.h \ + ../../Archive/7z/../Common/../../../Common/MyVector.h \ + ../../Archive/7z/../Common/../../../Common/Defs.h \ + ../../Archive/7z/7zHandler.h ../../Archive/7z/../../ICoder.h \ + ../../Archive/7z/../../IStream.h \ + ../../Archive/7z/../../../Common/MyUnknown.h \ + ../../Archive/7z/../../../Common/Types.h ../../Archive/7z/../../IDecl.h \ + ../../Archive/7z/../IArchive.h ../../Archive/7z/../../IProgress.h \ + ../../Archive/7z/../../IStream.h ../../Archive/7z/../../PropID.h \ + ../../Archive/7z/../../Common/CreateCoder.h \ + ../../Archive/7z/../../Common/../../Common/MyCom.h \ + ../../Archive/7z/../../Common/../../Common/MyWindows.h \ + ../../Archive/7z/../../Common/../../Common/MyString.h \ + ../../Archive/7z/../../Common/../ICoder.h \ + ../../Archive/7z/../../Common/MethodId.h \ + ../../Archive/7z/../../Common/../../Common/Types.h \ + ../../Archive/7z/../Common/HandlerOut.h \ + ../../Archive/7z/../Common/../../Common/MethodProps.h \ + ../../Archive/7z/../Common/../../Common/../../Common/MyVector.h \ + ../../Archive/7z/../Common/../../Common/../../Windows/PropVariant.h \ + ../../Archive/7z/../Common/../../Common/../../Windows/../Common/MyWindows.h \ + ../../Archive/7z/../Common/../../Common/../../Windows/../Common/Types.h \ + ../../Archive/7z/../Common/../../Common/MethodId.h \ + ../../Archive/7z/7zCompressionMode.h \ + ../../Archive/7z/../../../Common/MyString.h \ + ../../Archive/7z/../../../Windows/PropVariant.h \ + ../../Archive/7z/../../Common/MethodProps.h ../../Archive/7z/7zIn.h \ + ../../Archive/7z/../../../Common/MyCom.h \ + ../../Archive/7z/../../IPassword.h ../../Archive/7z/../../IStream.h \ + ../../Archive/7z/../../Common/InBuffer.h \ + ../../Archive/7z/../../Common/../IStream.h \ + ../../Archive/7z/../../Common/../../Common/MyException.h \ + ../../Archive/7z/7zItem.h ../../Archive/7z/../../../Common/Buffer.h \ + ../../Archive/7z/../../../Common/Defs.h \ + ../../Archive/7z/../../Common/MethodId.h ../../Archive/7z/7zHeader.h \ + ../../Archive/7z/../../../Common/Types.h ../../Archive/7z/7zProperties.h \ + ../../Archive/7z/../../PropID.h +7zHandlerOut.o: ../../Archive/7z/7zHandlerOut.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../Archive/7z/../../../Windows/PropVariant.h \ + ../../Archive/7z/../../../Windows/../Common/MyWindows.h \ + ../../Archive/7z/../../../Windows/../Common/Types.h \ + ../../Archive/7z/../../../Common/ComTry.h \ + ../../Archive/7z/../../../Common/MyWindows.h \ + ../../Archive/7z/../../../Common/StringToInt.h \ + ../../Archive/7z/../../../Common/Types.h ../../Archive/7z/../../ICoder.h \ + ../../Archive/7z/../../IStream.h \ + ../../Archive/7z/../../../Common/MyUnknown.h \ + ../../Archive/7z/../../../Common/Types.h ../../Archive/7z/../../IDecl.h \ + ../../Archive/7z/../Common/ItemNameUtils.h \ + ../../Archive/7z/../Common/../../../Common/MyString.h \ + ../../Archive/7z/../Common/../../../Common/MyVector.h \ + ../../Archive/7z/../Common/../../../Common/Defs.h \ + ../../Archive/7z/../Common/ParseProperties.h ../../../Common/MyString.h \ + ../../Archive/7z/7zHandler.h ../../Archive/7z/../IArchive.h \ + ../../Archive/7z/../../IProgress.h ../../Archive/7z/../../IStream.h \ + ../../Archive/7z/../../PropID.h \ + ../../Archive/7z/../../Common/CreateCoder.h \ + ../../Archive/7z/../../Common/../../Common/MyCom.h \ + ../../Archive/7z/../../Common/../../Common/MyWindows.h \ + ../../Archive/7z/../../Common/../../Common/MyString.h \ + ../../Archive/7z/../../Common/../ICoder.h \ + ../../Archive/7z/../../Common/MethodId.h \ + ../../Archive/7z/../../Common/../../Common/Types.h \ + ../../Archive/7z/../Common/HandlerOut.h \ + ../../Archive/7z/../Common/../../Common/MethodProps.h \ + ../../Archive/7z/../Common/../../Common/../../Common/MyVector.h \ + ../../Archive/7z/../Common/../../Common/../../Windows/PropVariant.h \ + ../../Archive/7z/../Common/../../Common/MethodId.h \ + ../../Archive/7z/7zCompressionMode.h \ + ../../Archive/7z/../../../Common/MyString.h \ + ../../Archive/7z/../../Common/MethodProps.h ../../Archive/7z/7zIn.h \ + ../../Archive/7z/../../../Common/MyCom.h \ + ../../Archive/7z/../../IPassword.h ../../Archive/7z/../../IStream.h \ + ../../Archive/7z/../../Common/InBuffer.h \ + ../../Archive/7z/../../Common/../IStream.h \ + ../../Archive/7z/../../Common/../../Common/MyException.h \ + ../../Archive/7z/7zItem.h ../../Archive/7z/../../../Common/Buffer.h \ + ../../Archive/7z/../../../Common/Defs.h \ + ../../Archive/7z/../../Common/MethodId.h ../../Archive/7z/7zHeader.h \ + ../../Archive/7z/../../../Common/Types.h ../../Archive/7z/7zOut.h \ + ../../Archive/7z/7zEncode.h ../../Archive/7z/../Common/CoderMixer2.h \ + ../../Archive/7z/../Common/../../../Common/MyVector.h \ + ../../Archive/7z/../Common/../../../Common/Types.h \ + ../../Archive/7z/../Common/../../../Common/MyCom.h \ + ../../Archive/7z/../Common/../../ICoder.h \ + ../../Archive/7z/../Common/CoderMixer2MT.h \ + ../../Archive/7z/../Common/CoderMixer2.h \ + ../../Archive/7z/../Common/../../Common/StreamBinder.h \ + ../../Archive/7z/../Common/../../Common/../IStream.h \ + ../../Archive/7z/../Common/../../Common/../../Windows/Synchronization.h \ + ../../Archive/7z/../Common/../../Common/../../Windows/Defs.h \ + ../../Archive/7z/../Common/../../Common/../../Windows/../Common/MyWindows.h \ + ../../Archive/7z/../Common/../../Common/../../Windows/../../C/Threads.h \ + ../../Archive/7z/../Common/../../Common/../../Windows/../../C/Types.h \ + ../../Archive/7z/../Common/../../Common/../../Windows/Synchronization2.h \ + ../../Archive/7z/../Common/../../Common/VirtThread.h \ + ../../Archive/7z/../Common/../../Common/../../Windows/Thread.h \ + ../../Archive/7z/../../Common/OutBuffer.h ../../Archive/7z/7zUpdate.h +7zHeader.o: ../../Archive/7z/7zHeader.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../Archive/7z/7zHeader.h \ + ../../Archive/7z/../../../Common/Types.h +7zIn.o: ../../Archive/7z/7zIn.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../Archive/7z/../../../../C/7zCrc.h \ + ../../Archive/7z/../../../../C/Types.h \ + ../../Archive/7z/../../../../C/CpuArch.h \ + ../../Archive/7z/../../Common/StreamObjects.h \ + ../../Archive/7z/../../Common/../../Common/Buffer.h \ + ../../Archive/7z/../../Common/../../Common/Defs.h \ + ../../Archive/7z/../../Common/../../Common/MyCom.h \ + ../../Archive/7z/../../Common/../../Common/MyWindows.h \ + ../../Archive/7z/../../Common/../IStream.h \ + ../../Archive/7z/../../Common/../../Common/MyUnknown.h \ + ../../Archive/7z/../../Common/../../Common/Types.h \ + ../../Archive/7z/../../Common/../IDecl.h \ + ../../Archive/7z/../../Common/StreamUtils.h ../../Archive/7z/7zDecode.h \ + ../../Archive/7z/../../IStream.h ../../Archive/7z/../../IPassword.h \ + ../../Archive/7z/../../../Common/MyUnknown.h \ + ../../Archive/7z/../../../Common/Types.h ../../Archive/7z/../../IDecl.h \ + ../../Archive/7z/../Common/CoderMixer2.h \ + ../../Archive/7z/../Common/../../../Common/MyVector.h \ + ../../Archive/7z/../Common/../../../Common/Defs.h \ + ../../Archive/7z/../Common/../../../Common/Types.h \ + ../../Archive/7z/../Common/../../../Common/MyCom.h \ + ../../Archive/7z/../Common/../../ICoder.h \ + ../../Archive/7z/../Common/../../IStream.h \ + ../../Archive/7z/../Common/CoderMixer2MT.h \ + ../../Archive/7z/../Common/CoderMixer2.h \ + ../../Archive/7z/../Common/../../Common/StreamBinder.h \ + ../../Archive/7z/../Common/../../Common/../IStream.h \ + ../../Archive/7z/../Common/../../Common/../../Windows/Synchronization.h \ + ../../Archive/7z/../Common/../../Common/../../Windows/Defs.h \ + ../../Archive/7z/../Common/../../Common/../../Windows/../Common/MyWindows.h \ + ../../Archive/7z/../Common/../../Common/../../Windows/../../C/Threads.h \ + ../../Archive/7z/../Common/../../Common/../../Windows/../../C/Types.h \ + ../../Archive/7z/../Common/../../Common/../../Windows/Synchronization2.h \ + ../../Archive/7z/../Common/../../Common/VirtThread.h \ + ../../Archive/7z/../Common/../../Common/../../Windows/Thread.h \ + ../../Archive/7z/../../Common/CreateCoder.h \ + ../../Archive/7z/../../Common/../../Common/MyString.h \ + ../../Archive/7z/../../Common/../../Common/MyVector.h \ + ../../Archive/7z/../../Common/../ICoder.h \ + ../../Archive/7z/../../Common/MethodId.h \ + ../../Archive/7z/../../Common/../../Common/Types.h \ + ../../Archive/7z/7zItem.h ../../Archive/7z/../../../Common/Buffer.h \ + ../../Archive/7z/../../../Common/MyString.h \ + ../../Archive/7z/../../Common/MethodId.h ../../Archive/7z/7zHeader.h \ + ../../Archive/7z/../../../Common/Types.h ../../Archive/7z/7zIn.h \ + ../../Archive/7z/../../../Common/MyCom.h \ + ../../Archive/7z/../../Common/InBuffer.h \ + ../../Archive/7z/../../Common/../../Common/MyException.h +7zOut.o: ../../Archive/7z/7zOut.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../Archive/7z/../../../../C/7zCrc.h \ + ../../Archive/7z/../../../../C/Types.h \ + ../../Archive/7z/../../../Common/AutoPtr.h \ + ../../Archive/7z/../../Common/StreamObjects.h \ + ../../Archive/7z/../../Common/../../Common/Buffer.h \ + ../../Archive/7z/../../Common/../../Common/Defs.h \ + ../../Archive/7z/../../Common/../../Common/MyCom.h \ + ../../Archive/7z/../../Common/../../Common/MyWindows.h \ + ../../Archive/7z/../../Common/../IStream.h \ + ../../Archive/7z/../../Common/../../Common/MyUnknown.h \ + ../../Archive/7z/../../Common/../../Common/Types.h \ + ../../Archive/7z/../../Common/../IDecl.h ../../Archive/7z/7zOut.h \ + ../../Archive/7z/7zCompressionMode.h \ + ../../Archive/7z/../../../Common/MyString.h \ + ../../Archive/7z/../../../Common/MyVector.h \ + ../../Archive/7z/../../../Common/Defs.h \ + ../../Archive/7z/../../../Windows/PropVariant.h \ + ../../Archive/7z/../../../Windows/../Common/MyWindows.h \ + ../../Archive/7z/../../../Windows/../Common/Types.h \ + ../../Archive/7z/../../Common/MethodProps.h \ + ../../Archive/7z/../../Common/../../Common/MyVector.h \ + ../../Archive/7z/../../Common/../../Windows/PropVariant.h \ + ../../Archive/7z/../../Common/MethodId.h \ + ../../Archive/7z/../../Common/../../Common/Types.h \ + ../../Archive/7z/7zEncode.h ../../Archive/7z/../Common/CoderMixer2.h \ + ../../Archive/7z/../Common/../../../Common/MyVector.h \ + ../../Archive/7z/../Common/../../../Common/Types.h \ + ../../Archive/7z/../Common/../../../Common/MyCom.h \ + ../../Archive/7z/../Common/../../ICoder.h \ + ../../Archive/7z/../Common/../../IStream.h \ + ../../Archive/7z/../Common/CoderMixer2MT.h \ + ../../Archive/7z/../Common/CoderMixer2.h \ + ../../Archive/7z/../Common/../../Common/StreamBinder.h \ + ../../Archive/7z/../Common/../../Common/../IStream.h \ + ../../Archive/7z/../Common/../../Common/../../Windows/Synchronization.h \ + ../../Archive/7z/../Common/../../Common/../../Windows/Defs.h \ + ../../Archive/7z/../Common/../../Common/../../Windows/../Common/MyWindows.h \ + ../../Archive/7z/../Common/../../Common/../../Windows/../../C/Threads.h \ + ../../Archive/7z/../Common/../../Common/../../Windows/../../C/Types.h \ + ../../Archive/7z/../Common/../../Common/../../Windows/Synchronization2.h \ + ../../Archive/7z/../Common/../../Common/VirtThread.h \ + ../../Archive/7z/../Common/../../Common/../../Windows/Thread.h \ + ../../Archive/7z/7zItem.h ../../Archive/7z/../../../Common/Buffer.h \ + ../../Archive/7z/../../Common/MethodId.h ../../Archive/7z/7zHeader.h \ + ../../Archive/7z/../../../Common/Types.h \ + ../../Archive/7z/../../Common/CreateCoder.h \ + ../../Archive/7z/../../Common/../../Common/MyString.h \ + ../../Archive/7z/../../Common/../ICoder.h \ + ../../Archive/7z/../../Common/OutBuffer.h \ + ../../Archive/7z/../../Common/../../Common/MyException.h +7zProperties.o: ../../Archive/7z/7zProperties.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../Archive/7z/7zProperties.h ../../Archive/7z/../../PropID.h \ + ../../Archive/7z/7zHeader.h ../../Archive/7z/../../../Common/Types.h \ + ../../Archive/7z/7zHandler.h ../../Archive/7z/../../ICoder.h \ + ../../Archive/7z/../../IStream.h \ + ../../Archive/7z/../../../Common/MyUnknown.h \ + ../../Archive/7z/../../../Common/MyWindows.h \ + ../../Archive/7z/../../../Common/Types.h ../../Archive/7z/../../IDecl.h \ + ../../Archive/7z/../IArchive.h ../../Archive/7z/../../IProgress.h \ + ../../Archive/7z/../../IStream.h ../../Archive/7z/../../PropID.h \ + ../../Archive/7z/../../Common/CreateCoder.h \ + ../../Archive/7z/../../Common/../../Common/MyCom.h \ + ../../Archive/7z/../../Common/../../Common/MyWindows.h \ + ../../Archive/7z/../../Common/../../Common/MyString.h \ + ../../Archive/7z/../../Common/../../Common/MyVector.h \ + ../../Archive/7z/../../Common/../../Common/Defs.h \ + ../../Archive/7z/../../Common/../ICoder.h \ + ../../Archive/7z/../../Common/MethodId.h \ + ../../Archive/7z/../../Common/../../Common/Types.h \ + ../../Archive/7z/../Common/HandlerOut.h \ + ../../Archive/7z/../Common/../../../Common/MyString.h \ + ../../Archive/7z/../Common/../../Common/MethodProps.h \ + ../../Archive/7z/../Common/../../Common/../../Common/MyVector.h \ + ../../Archive/7z/../Common/../../Common/../../Windows/PropVariant.h \ + ../../Archive/7z/../Common/../../Common/../../Windows/../Common/MyWindows.h \ + ../../Archive/7z/../Common/../../Common/../../Windows/../Common/Types.h \ + ../../Archive/7z/../Common/../../Common/MethodId.h \ + ../../Archive/7z/7zCompressionMode.h \ + ../../Archive/7z/../../../Common/MyString.h \ + ../../Archive/7z/../../../Windows/PropVariant.h \ + ../../Archive/7z/../../Common/MethodProps.h ../../Archive/7z/7zIn.h \ + ../../Archive/7z/../../../Common/MyCom.h \ + ../../Archive/7z/../../IPassword.h ../../Archive/7z/../../IStream.h \ + ../../Archive/7z/../../Common/InBuffer.h \ + ../../Archive/7z/../../Common/../IStream.h \ + ../../Archive/7z/../../Common/../../Common/MyException.h \ + ../../Archive/7z/7zItem.h ../../Archive/7z/../../../Common/Buffer.h \ + ../../Archive/7z/../../../Common/Defs.h \ + ../../Archive/7z/../../Common/MethodId.h +7zSpecStream.o: ../../Archive/7z/7zSpecStream.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../Archive/7z/7zSpecStream.h ../../Archive/7z/../../IStream.h \ + ../../Archive/7z/../../../Common/MyUnknown.h \ + ../../Archive/7z/../../../Common/MyWindows.h \ + ../../Archive/7z/../../../Common/Types.h ../../Archive/7z/../../IDecl.h \ + ../../Archive/7z/../../ICoder.h ../../Archive/7z/../../IStream.h \ + ../../Archive/7z/../../../Common/MyCom.h +7zUpdate.o: ../../Archive/7z/7zUpdate.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h \ + ../../Archive/7z/../../../../C/CpuArch.h \ + ../../Archive/7z/../../../../C/Types.h \ + ../../Archive/7z/../../Common/LimitedStreams.h \ + ../../Archive/7z/../../Common/../../Common/MyCom.h \ + ../../Archive/7z/../../Common/../../Common/MyWindows.h \ + ../../Archive/7z/../../Common/../../Common/MyVector.h \ + ../../Archive/7z/../../Common/../../Common/Defs.h \ + ../../Archive/7z/../../Common/../IStream.h \ + ../../Archive/7z/../../Common/../../Common/MyUnknown.h \ + ../../Archive/7z/../../Common/../../Common/Types.h \ + ../../Archive/7z/../../Common/../IDecl.h \ + ../../Archive/7z/../../Common/ProgressUtils.h \ + ../../Archive/7z/../../Common/../ICoder.h \ + ../../Archive/7z/../../Common/../IStream.h \ + ../../Archive/7z/../../Common/../IProgress.h \ + ../../Archive/7z/../../Common/CreateCoder.h \ + ../../Archive/7z/../../Common/../../Common/MyString.h \ + ../../Archive/7z/../../Common/../../Common/MyVector.h \ + ../../Archive/7z/../../Common/MethodId.h \ + ../../Archive/7z/../../Common/../../Common/Types.h \ + ../../Archive/7z/../../Compress/CopyCoder.h \ + ../../Archive/7z/../../Compress/../../Common/MyCom.h \ + ../../Archive/7z/../../Compress/../ICoder.h \ + ../../Archive/7z/../Common/ItemNameUtils.h \ + ../../Archive/7z/../Common/../../../Common/MyString.h \ + ../../Archive/7z/../Common/OutStreamWithCRC.h \ + ../../Archive/7z/../Common/../../../../C/7zCrc.h \ + ../../Archive/7z/../Common/../../../../C/Types.h \ + ../../Archive/7z/../Common/../../../Common/MyCom.h \ + ../../Archive/7z/../Common/../../IStream.h ../../Archive/7z/7zDecode.h \ + ../../Archive/7z/../../IStream.h ../../Archive/7z/../../IPassword.h \ + ../../Archive/7z/../../../Common/MyUnknown.h \ + ../../Archive/7z/../../../Common/Types.h ../../Archive/7z/../../IDecl.h \ + ../../Archive/7z/../Common/CoderMixer2.h \ + ../../Archive/7z/../Common/../../../Common/MyVector.h \ + ../../Archive/7z/../Common/../../../Common/Types.h \ + ../../Archive/7z/../Common/../../ICoder.h \ + ../../Archive/7z/../Common/CoderMixer2MT.h \ + ../../Archive/7z/../Common/CoderMixer2.h \ + ../../Archive/7z/../Common/../../Common/StreamBinder.h \ + ../../Archive/7z/../Common/../../Common/../IStream.h \ + ../../Archive/7z/../Common/../../Common/../../Windows/Synchronization.h \ + ../../Archive/7z/../Common/../../Common/../../Windows/Defs.h \ + ../../Archive/7z/../Common/../../Common/../../Windows/../Common/MyWindows.h \ + ../../Archive/7z/../Common/../../Common/../../Windows/../../C/Threads.h \ + ../../Archive/7z/../Common/../../Common/../../Windows/../../C/Types.h \ + ../../Archive/7z/../Common/../../Common/../../Windows/Synchronization2.h \ + ../../Archive/7z/../Common/../../Common/VirtThread.h \ + ../../Archive/7z/../Common/../../Common/../../Windows/Thread.h \ + ../../Archive/7z/7zItem.h ../../Archive/7z/../../../Common/Buffer.h \ + ../../Archive/7z/../../../Common/Defs.h \ + ../../Archive/7z/../../../Common/MyString.h \ + ../../Archive/7z/../../Common/MethodId.h ../../Archive/7z/7zHeader.h \ + ../../Archive/7z/../../../Common/Types.h ../../Archive/7z/7zEncode.h \ + ../../Archive/7z/7zCompressionMode.h \ + ../../Archive/7z/../../../Windows/PropVariant.h \ + ../../Archive/7z/../../../Windows/../Common/MyWindows.h \ + ../../Archive/7z/../../../Windows/../Common/Types.h \ + ../../Archive/7z/../../Common/MethodProps.h \ + ../../Archive/7z/../../Common/../../Windows/PropVariant.h \ + ../../Archive/7z/7zFolderInStream.h ../../Archive/7z/../../ICoder.h \ + ../../Archive/7z/../IArchive.h ../../Archive/7z/../../IProgress.h \ + ../../Archive/7z/../../IStream.h ../../Archive/7z/../../PropID.h \ + ../../Archive/7z/../Common/InStreamWithCRC.h \ + ../../Archive/7z/7zHandler.h ../../Archive/7z/../Common/HandlerOut.h \ + ../../Archive/7z/../Common/../../Common/MethodProps.h \ + ../../Archive/7z/7zIn.h ../../Archive/7z/../../../Common/MyCom.h \ + ../../Archive/7z/../../Common/InBuffer.h \ + ../../Archive/7z/../../Common/../../Common/MyException.h \ + ../../Archive/7z/7zOut.h ../../Archive/7z/../../Common/OutBuffer.h \ + ../../Archive/7z/7zUpdate.h ../../../Windows/FileIO.h \ + ../../../Common/MyString.h +7zRegister.o: ../../Archive/7z/7zRegister.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h \ + ../../Archive/7z/../../Common/RegisterArc.h \ + ../../Archive/7z/../../Common/../Archive/IArchive.h \ + ../../Archive/7z/../../Common/../Archive/../IProgress.h \ + ../../Archive/7z/../../Common/../Archive/../../Common/MyUnknown.h \ + ../../Archive/7z/../../Common/../Archive/../../Common/MyWindows.h \ + ../../Archive/7z/../../Common/../Archive/../../Common/Types.h \ + ../../Archive/7z/../../Common/../Archive/../IDecl.h \ + ../../Archive/7z/../../Common/../Archive/../IStream.h \ + ../../Archive/7z/../../Common/../Archive/../PropID.h \ + ../../Archive/7z/7zHandler.h ../../Archive/7z/../../ICoder.h \ + ../../Archive/7z/../../IStream.h ../../Archive/7z/../IArchive.h \ + ../../Archive/7z/../../Common/CreateCoder.h \ + ../../Archive/7z/../../Common/../../Common/MyCom.h \ + ../../Archive/7z/../../Common/../../Common/MyWindows.h \ + ../../Archive/7z/../../Common/../../Common/MyString.h \ + ../../Archive/7z/../../Common/../../Common/MyVector.h \ + ../../Archive/7z/../../Common/../../Common/Defs.h \ + ../../Archive/7z/../../Common/../ICoder.h \ + ../../Archive/7z/../../Common/MethodId.h \ + ../../Archive/7z/../../Common/../../Common/Types.h \ + ../../Archive/7z/../Common/HandlerOut.h \ + ../../Archive/7z/../Common/../../../Common/MyString.h \ + ../../Archive/7z/../Common/../../Common/MethodProps.h \ + ../../Archive/7z/../Common/../../Common/../../Common/MyVector.h \ + ../../Archive/7z/../Common/../../Common/../../Windows/PropVariant.h \ + ../../Archive/7z/../Common/../../Common/../../Windows/../Common/MyWindows.h \ + ../../Archive/7z/../Common/../../Common/../../Windows/../Common/Types.h \ + ../../Archive/7z/../Common/../../Common/MethodId.h \ + ../../Archive/7z/7zCompressionMode.h \ + ../../Archive/7z/../../../Common/MyString.h \ + ../../Archive/7z/../../../Windows/PropVariant.h \ + ../../Archive/7z/../../Common/MethodProps.h ../../Archive/7z/7zIn.h \ + ../../Archive/7z/../../../Common/MyCom.h \ + ../../Archive/7z/../../IPassword.h \ + ../../Archive/7z/../../../Common/MyUnknown.h \ + ../../Archive/7z/../../../Common/Types.h ../../Archive/7z/../../IDecl.h \ + ../../Archive/7z/../../IStream.h \ + ../../Archive/7z/../../Common/InBuffer.h \ + ../../Archive/7z/../../Common/../IStream.h \ + ../../Archive/7z/../../Common/../../Common/MyException.h \ + ../../Archive/7z/7zItem.h ../../Archive/7z/../../../Common/Buffer.h \ + ../../Archive/7z/../../../Common/Defs.h \ + ../../Archive/7z/../../Common/MethodId.h ../../Archive/7z/7zHeader.h \ + ../../Archive/7z/../../../Common/Types.h +CabBlockInStream.o: ../../Archive/Cab/CabBlockInStream.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../Archive/Cab/../../../../C/Alloc.h ../../../Common/Defs.h \ + ../../Archive/Cab/../../Common/StreamUtils.h \ + ../../Archive/Cab/../../Common/../IStream.h \ + ../../Archive/Cab/../../Common/../../Common/MyUnknown.h \ + ../../Archive/Cab/../../Common/../../Common/MyWindows.h \ + ../../Archive/Cab/../../Common/../../Common/Types.h \ + ../../Archive/Cab/../../Common/../IDecl.h \ + ../../Archive/Cab/CabBlockInStream.h ../../../Common/MyCom.h \ + ../../../Common/MyWindows.h ../../Archive/Cab/../../IStream.h +CabHandler.o: ../../Archive/Cab/CabHandler.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../Archive/Cab/../../../../C/Alloc.h ../../../Common/Buffer.h \ + ../../../Common/Defs.h ../../../Common/ComTry.h \ + ../../../Common/MyWindows.h ../../../Common/Defs.h \ + ../../../Common/IntToString.h ../../../Common/StringConvert.h \ + ../../../Common/MyString.h ../../../Common/MyVector.h \ + ../../../Common/UTFConvert.h ../../../Windows/PropVariant.h \ + ../../../Windows/../Common/MyWindows.h \ + ../../../Windows/../Common/Types.h ../../../Windows/Time.h \ + ../../Archive/Cab/../../Common/ProgressUtils.h \ + ../../Archive/Cab/../../Common/../../Common/MyCom.h \ + ../../Archive/Cab/../../Common/../../Common/MyWindows.h \ + ../../Archive/Cab/../../Common/../ICoder.h \ + ../../Archive/Cab/../../Common/../IStream.h \ + ../../Archive/Cab/../../Common/../../Common/MyUnknown.h \ + ../../Archive/Cab/../../Common/../../Common/Types.h \ + ../../Archive/Cab/../../Common/../IDecl.h \ + ../../Archive/Cab/../../Common/../IProgress.h \ + ../../Archive/Cab/../../Common/StreamUtils.h \ + ../../Archive/Cab/../../Common/../IStream.h \ + ../../Archive/Cab/../../Compress/CopyCoder.h \ + ../../Archive/Cab/../../Compress/../../Common/MyCom.h \ + ../../Archive/Cab/../../Compress/../ICoder.h \ + ../../Archive/Cab/../../Compress/DeflateDecoder.h \ + ../../Archive/Cab/../../Compress/../Common/InBuffer.h \ + ../../Archive/Cab/../../Compress/../Common/../IStream.h \ + ../../Archive/Cab/../../Compress/../Common/../../Common/MyCom.h \ + ../../Archive/Cab/../../Compress/../Common/../../Common/MyException.h \ + ../../Archive/Cab/../../Compress/../Common/../../Common/MyWindows.h \ + ../../Archive/Cab/../../Compress/BitlDecoder.h \ + ../../Archive/Cab/../../Compress/../IStream.h \ + ../../Archive/Cab/../../Compress/DeflateConst.h \ + ../../Archive/Cab/../../Compress/HuffmanDecoder.h \ + ../../Archive/Cab/../../Compress/../../Common/Types.h \ + ../../Archive/Cab/../../Compress/LzOutWindow.h \ + ../../Archive/Cab/../../Compress/../Common/OutBuffer.h \ + ../../Archive/Cab/../../Compress/LzxDecoder.h \ + ../../Archive/Cab/../../Compress/Lzx.h \ + ../../Archive/Cab/../../Compress/Lzx86Converter.h \ + ../../Archive/Cab/../../Compress/QuantumDecoder.h \ + ../../Archive/Cab/../Common/ItemNameUtils.h \ + ../../Archive/Cab/../Common/../../../Common/MyString.h \ + ../../Archive/Cab/CabBlockInStream.h ../../../Common/MyCom.h \ + ../../Archive/Cab/../../IStream.h ../../Archive/Cab/CabHandler.h \ + ../../Archive/Cab/../IArchive.h ../../Archive/Cab/../../IProgress.h \ + ../../Archive/Cab/../../IStream.h ../../Archive/Cab/../../PropID.h \ + ../../Archive/Cab/CabIn.h ../../Archive/Cab/../../Common/InBuffer.h \ + ../../Archive/Cab/CabHeader.h ../../Archive/Cab/CabItem.h \ + ../../../Common/MyString.h +CabHeader.o: ../../Archive/Cab/CabHeader.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../Archive/Cab/CabHeader.h +CabIn.o: ../../Archive/Cab/CabIn.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h \ + ../../Archive/Cab/../Common/FindSignature.h \ + ../../Archive/Cab/../Common/../../IStream.h \ + ../../Archive/Cab/../Common/../../../Common/MyUnknown.h \ + ../../Archive/Cab/../Common/../../../Common/MyWindows.h \ + ../../Archive/Cab/../Common/../../../Common/Types.h \ + ../../Archive/Cab/../Common/../../IDecl.h ../../Archive/Cab/CabIn.h \ + ../../Archive/Cab/../../IStream.h \ + ../../Archive/Cab/../../Common/InBuffer.h \ + ../../Archive/Cab/../../Common/../IStream.h \ + ../../Archive/Cab/../../Common/../../Common/MyCom.h \ + ../../Archive/Cab/../../Common/../../Common/MyWindows.h \ + ../../Archive/Cab/../../Common/../../Common/MyException.h \ + ../../Archive/Cab/CabHeader.h ../../Archive/Cab/CabItem.h \ + ../../../Common/MyString.h ../../../Common/MyVector.h \ + ../../../Common/Defs.h +CabRegister.o: ../../Archive/Cab/CabRegister.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../Archive/Cab/../../Common/RegisterArc.h \ + ../../Archive/Cab/../../Common/../Archive/IArchive.h \ + ../../Archive/Cab/../../Common/../Archive/../IProgress.h \ + ../../Archive/Cab/../../Common/../Archive/../../Common/MyUnknown.h \ + ../../Archive/Cab/../../Common/../Archive/../../Common/MyWindows.h \ + ../../Archive/Cab/../../Common/../Archive/../../Common/Types.h \ + ../../Archive/Cab/../../Common/../Archive/../IDecl.h \ + ../../Archive/Cab/../../Common/../Archive/../IStream.h \ + ../../Archive/Cab/../../Common/../Archive/../PropID.h \ + ../../Archive/Cab/CabHandler.h ../../../Common/MyCom.h \ + ../../../Common/MyWindows.h ../../Archive/Cab/../IArchive.h \ + ../../Archive/Cab/CabIn.h ../../Archive/Cab/../../IStream.h \ + ../../Archive/Cab/../../Common/InBuffer.h \ + ../../Archive/Cab/../../Common/../IStream.h \ + ../../Archive/Cab/../../Common/../../Common/MyCom.h \ + ../../Archive/Cab/../../Common/../../Common/MyException.h \ + ../../Archive/Cab/../../Common/../../Common/MyWindows.h \ + ../../Archive/Cab/CabHeader.h ../../Archive/Cab/CabItem.h \ + ../../../Common/MyString.h ../../../Common/MyVector.h \ + ../../../Common/Defs.h +TarHandler.o: ../../Archive/Tar/TarHandler.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../../Common/ComTry.h ../../../Common/MyWindows.h \ + ../../../Common/StringConvert.h ../../../Common/MyString.h \ + ../../../Common/MyVector.h ../../../Common/Defs.h \ + ../../../Windows/PropVariant.h ../../../Windows/../Common/MyWindows.h \ + ../../../Windows/../Common/Types.h ../../../Windows/Time.h \ + ../../Archive/Tar/../../Common/LimitedStreams.h \ + ../../Archive/Tar/../../Common/../../Common/MyCom.h \ + ../../Archive/Tar/../../Common/../../Common/MyWindows.h \ + ../../Archive/Tar/../../Common/../../Common/MyVector.h \ + ../../Archive/Tar/../../Common/../IStream.h \ + ../../Archive/Tar/../../Common/../../Common/MyUnknown.h \ + ../../Archive/Tar/../../Common/../../Common/Types.h \ + ../../Archive/Tar/../../Common/../IDecl.h \ + ../../Archive/Tar/../../Common/ProgressUtils.h \ + ../../Archive/Tar/../../Common/../ICoder.h \ + ../../Archive/Tar/../../Common/../IStream.h \ + ../../Archive/Tar/../../Common/../IProgress.h \ + ../../Archive/Tar/../../Common/StreamObjects.h \ + ../../Archive/Tar/../../Common/../../Common/Buffer.h \ + ../../Archive/Tar/../../Common/../../Common/Defs.h \ + ../../Archive/Tar/../../Common/StreamUtils.h \ + ../../Archive/Tar/../Common/ItemNameUtils.h \ + ../../Archive/Tar/../Common/../../../Common/MyString.h \ + ../../Archive/Tar/TarHandler.h ../../../Common/MyCom.h \ + ../../Archive/Tar/../IArchive.h ../../Archive/Tar/../../IProgress.h \ + ../../Archive/Tar/../../IStream.h ../../Archive/Tar/../../PropID.h \ + ../../Archive/Tar/../../Compress/CopyCoder.h \ + ../../Archive/Tar/../../Compress/../../Common/MyCom.h \ + ../../Archive/Tar/../../Compress/../ICoder.h ../../Archive/Tar/TarItem.h \ + ../../Archive/Tar/TarHeader.h ../../Archive/Tar/TarIn.h \ + ../../Archive/Tar/../../IStream.h +TarHandlerOut.o: ../../Archive/Tar/TarHandlerOut.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../../Common/ComTry.h ../../../Common/MyWindows.h \ + ../../../Common/StringConvert.h ../../../Common/MyString.h \ + ../../../Common/MyVector.h ../../../Common/Defs.h \ + ../../../Windows/PropVariant.h ../../../Windows/../Common/MyWindows.h \ + ../../../Windows/../Common/Types.h ../../../Windows/Time.h \ + ../../Archive/Tar/TarHandler.h ../../../Common/MyCom.h \ + ../../Archive/Tar/../IArchive.h ../../Archive/Tar/../../IProgress.h \ + ../../Archive/Tar/../../../Common/MyUnknown.h \ + ../../Archive/Tar/../../../Common/MyWindows.h \ + ../../Archive/Tar/../../../Common/Types.h \ + ../../Archive/Tar/../../IDecl.h ../../Archive/Tar/../../IStream.h \ + ../../Archive/Tar/../../PropID.h \ + ../../Archive/Tar/../../Compress/CopyCoder.h \ + ../../Archive/Tar/../../Compress/../../Common/MyCom.h \ + ../../Archive/Tar/../../Compress/../ICoder.h \ + ../../Archive/Tar/../../Compress/../IStream.h \ + ../../Archive/Tar/TarItem.h ../../Archive/Tar/../Common/ItemNameUtils.h \ + ../../Archive/Tar/../Common/../../../Common/MyString.h \ + ../../Archive/Tar/TarHeader.h ../../Archive/Tar/TarUpdate.h +TarHeader.o: ../../Archive/Tar/TarHeader.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../Archive/Tar/TarHeader.h +TarIn.o: ../../Archive/Tar/TarIn.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h \ + ../../Archive/Tar/../../../../C/CpuArch.h \ + ../../Archive/Tar/../../../../C/Types.h ../../../Common/StringToInt.h \ + ../../Archive/Tar/../../Common/StreamUtils.h \ + ../../Archive/Tar/../../Common/../IStream.h \ + ../../Archive/Tar/../../Common/../../Common/MyUnknown.h \ + ../../Archive/Tar/../../Common/../../Common/MyWindows.h \ + ../../Archive/Tar/../../Common/../../Common/Types.h \ + ../../Archive/Tar/../../Common/../IDecl.h ../../Archive/Tar/TarIn.h \ + ../../Archive/Tar/../../IStream.h ../../Archive/Tar/TarItem.h \ + ../../Archive/Tar/../Common/ItemNameUtils.h \ + ../../Archive/Tar/../Common/../../../Common/MyString.h \ + ../../Archive/Tar/../Common/../../../Common/MyVector.h \ + ../../Archive/Tar/../Common/../../../Common/Defs.h \ + ../../Archive/Tar/TarHeader.h +TarOut.o: ../../Archive/Tar/TarOut.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../../Common/IntToString.h \ + ../../Archive/Tar/../../Common/StreamUtils.h \ + ../../Archive/Tar/../../Common/../IStream.h \ + ../../Archive/Tar/../../Common/../../Common/MyUnknown.h \ + ../../Archive/Tar/../../Common/../../Common/MyWindows.h \ + ../../Archive/Tar/../../Common/../../Common/Types.h \ + ../../Archive/Tar/../../Common/../IDecl.h ../../Archive/Tar/TarOut.h \ + ../../Archive/Tar/TarItem.h ../../Archive/Tar/../Common/ItemNameUtils.h \ + ../../Archive/Tar/../Common/../../../Common/MyString.h \ + ../../Archive/Tar/../Common/../../../Common/MyVector.h \ + ../../Archive/Tar/../Common/../../../Common/Defs.h \ + ../../Archive/Tar/TarHeader.h ../../../Common/MyCom.h \ + ../../../Common/MyWindows.h ../../Archive/Tar/../../IStream.h +TarRegister.o: ../../Archive/Tar/TarRegister.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../Archive/Tar/../../Common/RegisterArc.h \ + ../../Archive/Tar/../../Common/../Archive/IArchive.h \ + ../../Archive/Tar/../../Common/../Archive/../IProgress.h \ + ../../Archive/Tar/../../Common/../Archive/../../Common/MyUnknown.h \ + ../../Archive/Tar/../../Common/../Archive/../../Common/MyWindows.h \ + ../../Archive/Tar/../../Common/../Archive/../../Common/Types.h \ + ../../Archive/Tar/../../Common/../Archive/../IDecl.h \ + ../../Archive/Tar/../../Common/../Archive/../IStream.h \ + ../../Archive/Tar/../../Common/../Archive/../PropID.h \ + ../../Archive/Tar/TarHandler.h ../../../Common/MyCom.h \ + ../../../Common/MyWindows.h ../../Archive/Tar/../IArchive.h \ + ../../Archive/Tar/../../Compress/CopyCoder.h \ + ../../Archive/Tar/../../Compress/../../Common/MyCom.h \ + ../../Archive/Tar/../../Compress/../ICoder.h \ + ../../Archive/Tar/../../Compress/../IStream.h \ + ../../Archive/Tar/TarItem.h ../../Archive/Tar/../Common/ItemNameUtils.h \ + ../../Archive/Tar/../Common/../../../Common/MyString.h \ + ../../Archive/Tar/../Common/../../../Common/MyVector.h \ + ../../Archive/Tar/../Common/../../../Common/Defs.h \ + ../../Archive/Tar/TarHeader.h +TarUpdate.o: ../../Archive/Tar/TarUpdate.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h \ + ../../Archive/Tar/../../Common/LimitedStreams.h \ + ../../Archive/Tar/../../Common/../../Common/MyCom.h \ + ../../Archive/Tar/../../Common/../../Common/MyWindows.h \ + ../../Archive/Tar/../../Common/../../Common/MyVector.h \ + ../../Archive/Tar/../../Common/../../Common/Defs.h \ + ../../Archive/Tar/../../Common/../IStream.h \ + ../../Archive/Tar/../../Common/../../Common/MyUnknown.h \ + ../../Archive/Tar/../../Common/../../Common/Types.h \ + ../../Archive/Tar/../../Common/../IDecl.h \ + ../../Archive/Tar/../../Common/ProgressUtils.h \ + ../../Archive/Tar/../../Common/../ICoder.h \ + ../../Archive/Tar/../../Common/../IStream.h \ + ../../Archive/Tar/../../Common/../IProgress.h \ + ../../Archive/Tar/../../Compress/CopyCoder.h \ + ../../Archive/Tar/../../Compress/../../Common/MyCom.h \ + ../../Archive/Tar/../../Compress/../ICoder.h ../../Archive/Tar/TarOut.h \ + ../../Archive/Tar/TarItem.h ../../Archive/Tar/../Common/ItemNameUtils.h \ + ../../Archive/Tar/../Common/../../../Common/MyString.h \ + ../../Archive/Tar/../Common/../../../Common/MyVector.h \ + ../../Archive/Tar/TarHeader.h ../../../Common/MyCom.h \ + ../../Archive/Tar/../../IStream.h ../../Archive/Tar/TarUpdate.h \ + ../../Archive/Tar/../IArchive.h ../../Archive/Tar/../../IProgress.h \ + ../../Archive/Tar/../../IStream.h ../../Archive/Tar/../../PropID.h +ZipAddCommon.o: ../../Archive/Zip/ZipAddCommon.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../Archive/Zip/../../../../C/7zCrc.h \ + ../../Archive/Zip/../../../../C/Types.h ../../../Windows/PropVariant.h \ + ../../../Windows/../Common/MyWindows.h \ + ../../../Windows/../Common/Types.h ../../Archive/Zip/../../ICoder.h \ + ../../Archive/Zip/../../IStream.h \ + ../../Archive/Zip/../../../Common/MyUnknown.h \ + ../../Archive/Zip/../../../Common/MyWindows.h \ + ../../Archive/Zip/../../../Common/Types.h \ + ../../Archive/Zip/../../IDecl.h ../../Archive/Zip/../../IPassword.h \ + ../../Archive/Zip/../../MyVersion.h \ + ../../Archive/Zip/../../Common/CreateCoder.h \ + ../../Archive/Zip/../../Common/../../Common/MyCom.h \ + ../../Archive/Zip/../../Common/../../Common/MyWindows.h \ + ../../Archive/Zip/../../Common/../../Common/MyString.h \ + ../../Archive/Zip/../../Common/../../Common/MyVector.h \ + ../../Archive/Zip/../../Common/../../Common/Defs.h \ + ../../Archive/Zip/../../Common/../ICoder.h \ + ../../Archive/Zip/../../Common/MethodId.h \ + ../../Archive/Zip/../../Common/../../Common/Types.h \ + ../../Archive/Zip/../../Common/StreamObjects.h \ + ../../Archive/Zip/../../Common/../../Common/Buffer.h \ + ../../Archive/Zip/../../Common/../IStream.h \ + ../../Archive/Zip/../../Common/StreamUtils.h \ + ../../Archive/Zip/../../Compress/LzmaEncoder.h \ + ../../Archive/Zip/../../Compress/../../../C/LzmaEnc.h \ + ../../Archive/Zip/../../Compress/../../../C/Types.h \ + ../../Archive/Zip/../../Compress/../../Common/MyCom.h \ + ../../Archive/Zip/../../Compress/../ICoder.h \ + ../../Archive/Zip/../../Compress/PpmdZip.h \ + ../../Archive/Zip/../../Compress/../../../C/Alloc.h \ + ../../Archive/Zip/../../Compress/../../../C/Ppmd8.h \ + ../../Archive/Zip/../../Compress/../../../C/Ppmd.h \ + ../../Archive/Zip/../../Compress/../../../C/CpuArch.h \ + ../../Archive/Zip/../../Compress/../Common/CWrappers.h \ + ../../Archive/Zip/../../Compress/../Common/../ICoder.h \ + ../../Archive/Zip/../../Compress/../Common/../../Common/MyCom.h \ + ../../Archive/Zip/../Common/InStreamWithCRC.h \ + ../../Archive/Zip/../Common/../../../../C/7zCrc.h \ + ../../Archive/Zip/../Common/../../../Common/MyCom.h \ + ../../Archive/Zip/../Common/../../IStream.h \ + ../../Archive/Zip/ZipAddCommon.h ../../Archive/Zip/../../IProgress.h \ + ../../Archive/Zip/../../Common/FilterCoder.h \ + ../../Archive/Zip/../../Common/../IPassword.h \ + ../../Archive/Zip/../../Compress/CopyCoder.h \ + ../../Archive/Zip/../../Crypto/ZipCrypto.h ../../../Common/MyCom.h \ + ../../Archive/Zip/../../Crypto/../ICoder.h \ + ../../Archive/Zip/../../Crypto/../IPassword.h \ + ../../Archive/Zip/../../Crypto/WzAes.h \ + ../../Archive/Zip/../../Crypto/../../../C/Aes.h \ + ../../Archive/Zip/../../Crypto/../../../C/Types.h \ + ../../../Common/Buffer.h ../../../Common/MyVector.h \ + ../../Archive/Zip/../../Crypto/HmacSha1.h \ + ../../Archive/Zip/../../Crypto/Sha1.h \ + ../../Archive/Zip/../../Crypto/../../Common/Types.h \ + ../../Archive/Zip/ZipCompressionMode.h ../../../Common/MyString.h \ + ../../Archive/Zip/ZipHeader.h +ZipHandler.o: ../../Archive/Zip/ZipHandler.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../../Common/ComTry.h ../../../Common/MyWindows.h \ + ../../../Common/IntToString.h ../../../Windows/PropVariant.h \ + ../../../Windows/../Common/MyWindows.h \ + ../../../Windows/../Common/Types.h ../../../Windows/Time.h \ + ../../Archive/Zip/../../IPassword.h \ + ../../Archive/Zip/../../../Common/MyUnknown.h \ + ../../Archive/Zip/../../../Common/MyWindows.h \ + ../../Archive/Zip/../../../Common/Types.h \ + ../../Archive/Zip/../../IDecl.h \ + ../../Archive/Zip/../../Common/FilterCoder.h \ + ../../Archive/Zip/../../Common/../../Common/MyCom.h \ + ../../Archive/Zip/../../Common/../../Common/MyWindows.h \ + ../../Archive/Zip/../../Common/../ICoder.h \ + ../../Archive/Zip/../../Common/../IStream.h \ + ../../Archive/Zip/../../Common/../../Common/MyUnknown.h \ + ../../Archive/Zip/../../Common/../../Common/Types.h \ + ../../Archive/Zip/../../Common/../IDecl.h \ + ../../Archive/Zip/../../Common/../IPassword.h \ + ../../Archive/Zip/../../Common/ProgressUtils.h \ + ../../Archive/Zip/../../Common/../IProgress.h \ + ../../Archive/Zip/../../Common/StreamObjects.h \ + ../../Archive/Zip/../../Common/../../Common/Buffer.h \ + ../../Archive/Zip/../../Common/../../Common/Defs.h \ + ../../Archive/Zip/../../Common/../IStream.h \ + ../../Archive/Zip/../../Common/StreamUtils.h \ + ../../Archive/Zip/../../Compress/CopyCoder.h \ + ../../Archive/Zip/../../Compress/../../Common/MyCom.h \ + ../../Archive/Zip/../../Compress/../ICoder.h \ + ../../Archive/Zip/../../Compress/LzmaDecoder.h \ + ../../Archive/Zip/../../Compress/../../../C/LzmaDec.h \ + ../../Archive/Zip/../../Compress/../../../C/Types.h \ + ../../Archive/Zip/../../Compress/ImplodeDecoder.h \ + ../../Archive/Zip/../../Compress/ImplodeHuffmanDecoder.h \ + ../../Archive/Zip/../../Compress/../Common/InBuffer.h \ + ../../Archive/Zip/../../Compress/../Common/../IStream.h \ + ../../Archive/Zip/../../Compress/../Common/../../Common/MyCom.h \ + ../../Archive/Zip/../../Compress/../Common/../../Common/MyException.h \ + ../../Archive/Zip/../../Compress/../Common/../../Common/MyWindows.h \ + ../../Archive/Zip/../../Compress/BitlDecoder.h \ + ../../Archive/Zip/../../Compress/../IStream.h \ + ../../Archive/Zip/../../Compress/LzOutWindow.h \ + ../../Archive/Zip/../../Compress/../Common/OutBuffer.h \ + ../../Archive/Zip/../../Compress/PpmdZip.h \ + ../../Archive/Zip/../../Compress/../../../C/Alloc.h \ + ../../Archive/Zip/../../Compress/../../../C/Ppmd8.h \ + ../../Archive/Zip/../../Compress/../../../C/Ppmd.h \ + ../../Archive/Zip/../../Compress/../../../C/CpuArch.h \ + ../../Archive/Zip/../../Compress/../Common/CWrappers.h \ + ../../Archive/Zip/../../Compress/../Common/../ICoder.h \ + ../../Archive/Zip/../../Compress/ShrinkDecoder.h \ + ../../Archive/Zip/../../Crypto/WzAes.h \ + ../../Archive/Zip/../../Crypto/../../../C/Aes.h \ + ../../Archive/Zip/../../Crypto/../../../C/Types.h \ + ../../../Common/Buffer.h ../../../Common/MyCom.h \ + ../../../Common/MyVector.h ../../../Common/Defs.h \ + ../../Archive/Zip/../../Crypto/../ICoder.h \ + ../../Archive/Zip/../../Crypto/../IPassword.h \ + ../../Archive/Zip/../../Crypto/HmacSha1.h \ + ../../Archive/Zip/../../Crypto/Sha1.h \ + ../../Archive/Zip/../../Crypto/../../Common/Types.h \ + ../../Archive/Zip/../../Crypto/ZipCrypto.h \ + ../../Archive/Zip/../../Crypto/ZipStrong.h \ + ../../Archive/Zip/../../Crypto/MyAes.h \ + ../../Archive/Zip/../../Crypto/../../Common/MyCom.h \ + ../../Archive/Zip/../Common/ItemNameUtils.h \ + ../../Archive/Zip/../Common/../../../Common/MyString.h \ + ../../Archive/Zip/../Common/../../../Common/MyVector.h \ + ../../Archive/Zip/../Common/OutStreamWithCRC.h \ + ../../Archive/Zip/../Common/../../../../C/7zCrc.h \ + ../../Archive/Zip/../Common/../../../../C/Types.h \ + ../../Archive/Zip/../Common/../../../Common/MyCom.h \ + ../../Archive/Zip/../Common/../../IStream.h \ + ../../Archive/Zip/ZipHandler.h ../../../Common/DynamicBuffer.h \ + ../../../Common/Buffer.h ../../Archive/Zip/../../ICoder.h \ + ../../Archive/Zip/../IArchive.h ../../Archive/Zip/../../IProgress.h \ + ../../Archive/Zip/../../IStream.h ../../Archive/Zip/../../PropID.h \ + ../../Archive/Zip/../../Common/CreateCoder.h \ + ../../Archive/Zip/../../Common/../../Common/MyString.h \ + ../../Archive/Zip/../../Common/MethodId.h \ + ../../Archive/Zip/../../Common/../../Common/Types.h \ + ../../Archive/Zip/ZipIn.h ../../Archive/Zip/../../IStream.h \ + ../../Archive/Zip/../../Common/InBuffer.h ../../Archive/Zip/ZipHeader.h \ + ../../Archive/Zip/ZipItemEx.h ../../Archive/Zip/ZipItem.h \ + ../../../Common/MyString.h ../../../Common/UTFConvert.h \ + ../../../Common/MyString.h ../../../Common/StringConvert.h \ + ../../Archive/Zip/ZipCompressionMode.h \ + ../../Archive/Zip/../../../Windows/System.h \ + ../../Archive/Zip/../../../Windows/../Common/Types.h +ZipHandlerOut.o: ../../Archive/Zip/ZipHandlerOut.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../../Common/ComTry.h ../../../Common/MyWindows.h \ + ../../../Common/StringConvert.h ../../../Common/MyString.h \ + ../../../Common/MyVector.h ../../../Common/Defs.h \ + ../../../Common/StringToInt.h ../../../Windows/PropVariant.h \ + ../../../Windows/../Common/MyWindows.h \ + ../../../Windows/../Common/Types.h ../../../Windows/Time.h \ + ../../Archive/Zip/../../IPassword.h \ + ../../Archive/Zip/../../../Common/MyUnknown.h \ + ../../Archive/Zip/../../../Common/MyWindows.h \ + ../../Archive/Zip/../../../Common/Types.h \ + ../../Archive/Zip/../../IDecl.h \ + ../../Archive/Zip/../../Common/OutBuffer.h \ + ../../Archive/Zip/../../Common/../IStream.h \ + ../../Archive/Zip/../../Common/../../Common/MyUnknown.h \ + ../../Archive/Zip/../../Common/../../Common/Types.h \ + ../../Archive/Zip/../../Common/../IDecl.h \ + ../../Archive/Zip/../../Common/../../Common/MyCom.h \ + ../../Archive/Zip/../../Common/../../Common/MyWindows.h \ + ../../Archive/Zip/../../Common/../../Common/MyException.h \ + ../../Archive/Zip/../../Crypto/WzAes.h \ + ../../Archive/Zip/../../Crypto/../../../C/Aes.h \ + ../../Archive/Zip/../../Crypto/../../../C/Types.h \ + ../../../Common/Buffer.h ../../../Common/MyCom.h \ + ../../../Common/MyVector.h ../../Archive/Zip/../../Crypto/../ICoder.h \ + ../../Archive/Zip/../../Crypto/../IStream.h \ + ../../Archive/Zip/../../Crypto/../IPassword.h \ + ../../Archive/Zip/../../Crypto/HmacSha1.h \ + ../../Archive/Zip/../../Crypto/Sha1.h \ + ../../Archive/Zip/../../Crypto/../../Common/Types.h \ + ../../Archive/Zip/../Common/ItemNameUtils.h \ + ../../Archive/Zip/../Common/../../../Common/MyString.h \ + ../../Archive/Zip/../Common/ParseProperties.h ../../../Common/MyString.h \ + ../../Archive/Zip/ZipHandler.h ../../../Common/DynamicBuffer.h \ + ../../../Common/Buffer.h ../../Archive/Zip/../../ICoder.h \ + ../../Archive/Zip/../IArchive.h ../../Archive/Zip/../../IProgress.h \ + ../../Archive/Zip/../../IStream.h ../../Archive/Zip/../../PropID.h \ + ../../Archive/Zip/../../Common/CreateCoder.h \ + ../../Archive/Zip/../../Common/../../Common/MyString.h \ + ../../Archive/Zip/../../Common/../ICoder.h \ + ../../Archive/Zip/../../Common/MethodId.h \ + ../../Archive/Zip/../../Common/../../Common/Types.h \ + ../../Archive/Zip/ZipIn.h ../../Archive/Zip/../../IStream.h \ + ../../Archive/Zip/../../Common/InBuffer.h ../../Archive/Zip/ZipHeader.h \ + ../../Archive/Zip/ZipItemEx.h ../../Archive/Zip/ZipItem.h \ + ../../../Common/UTFConvert.h ../../Archive/Zip/ZipCompressionMode.h \ + ../../Archive/Zip/../../../Windows/System.h \ + ../../Archive/Zip/../../../Windows/../Common/Types.h \ + ../../Archive/Zip/ZipUpdate.h +ZipHeader.o: ../../Archive/Zip/ZipHeader.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../Archive/Zip/ZipHeader.h +ZipIn.o: ../../Archive/Zip/ZipIn.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h \ + ../../Archive/Zip/../../../../C/CpuArch.h \ + ../../Archive/Zip/../../../../C/Types.h ../../../Common/DynamicBuffer.h \ + ../../../Common/Buffer.h ../../../Common/Defs.h \ + ../../Archive/Zip/../../Common/LimitedStreams.h \ + ../../Archive/Zip/../../Common/../../Common/MyCom.h \ + ../../Archive/Zip/../../Common/../../Common/MyWindows.h \ + ../../Archive/Zip/../../Common/../../Common/MyVector.h \ + ../../Archive/Zip/../../Common/../../Common/Defs.h \ + ../../Archive/Zip/../../Common/../IStream.h \ + ../../Archive/Zip/../../Common/../../Common/MyUnknown.h \ + ../../Archive/Zip/../../Common/../../Common/Types.h \ + ../../Archive/Zip/../../Common/../IDecl.h \ + ../../Archive/Zip/../../Common/StreamUtils.h ../../Archive/Zip/ZipIn.h \ + ../../../Common/MyCom.h ../../Archive/Zip/../../IStream.h \ + ../../Archive/Zip/../../Common/InBuffer.h \ + ../../Archive/Zip/../../Common/../../Common/MyException.h \ + ../../Archive/Zip/ZipHeader.h ../../Archive/Zip/ZipItemEx.h \ + ../../Archive/Zip/ZipItem.h ../../../Common/MyString.h \ + ../../../Common/MyVector.h ../../../Common/Buffer.h \ + ../../../Common/UTFConvert.h ../../../Common/MyString.h \ + ../../../Common/StringConvert.h ../../../Common/MyWindows.h +ZipItem.o: ../../Archive/Zip/ZipItem.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../Archive/Zip/ZipHeader.h \ + ../../Archive/Zip/ZipItem.h ../../../Common/MyString.h \ + ../../../Common/MyVector.h ../../../Common/Defs.h \ + ../../../Common/Buffer.h ../../../Common/UTFConvert.h \ + ../../../Common/MyString.h ../../../Common/StringConvert.h \ + ../../../Common/MyWindows.h ../../Archive/Zip/../Common/ItemNameUtils.h \ + ../../Archive/Zip/../Common/../../../Common/MyString.h \ + ../../Archive/Zip/../../../../C/CpuArch.h \ + ../../Archive/Zip/../../../../C/Types.h +ZipOut.o: ../../Archive/Zip/ZipOut.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h \ + ../../Archive/Zip/../../Common/OffsetStream.h ../../../Common/MyCom.h \ + ../../../Common/MyWindows.h ../../Archive/Zip/../../Common/../IStream.h \ + ../../Archive/Zip/../../Common/../../Common/MyUnknown.h \ + ../../Archive/Zip/../../Common/../../Common/MyWindows.h \ + ../../Archive/Zip/../../Common/../../Common/Types.h \ + ../../Archive/Zip/../../Common/../IDecl.h ../../Archive/Zip/ZipOut.h \ + ../../Archive/Zip/../../IStream.h \ + ../../Archive/Zip/../../Common/OutBuffer.h \ + ../../Archive/Zip/../../Common/../../Common/MyCom.h \ + ../../Archive/Zip/../../Common/../../Common/MyException.h \ + ../../Archive/Zip/ZipItem.h ../../../Common/MyString.h \ + ../../../Common/MyVector.h ../../../Common/Defs.h \ + ../../../Common/Buffer.h ../../../Common/UTFConvert.h \ + ../../../Common/MyString.h ../../../Common/StringConvert.h \ + ../../Archive/Zip/ZipHeader.h +ZipUpdate.o: ../../Archive/Zip/ZipUpdate.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../Archive/Zip/../../../../C/Alloc.h \ + ../../../Common/AutoPtr.h ../../../Common/Defs.h \ + ../../../Common/StringConvert.h ../../../Common/MyWindows.h \ + ../../../Common/MyString.h ../../../Common/MyVector.h \ + ../../../Common/Defs.h ../../../Windows/Defs.h \ + ../../../Windows/../Common/MyWindows.h ../../../Windows/Thread.h \ + ../../../Windows/Defs.h ../../../Windows/../../C/Threads.h \ + ../../../Windows/../../C/Types.h \ + ../../Archive/Zip/../../Common/CreateCoder.h \ + ../../Archive/Zip/../../Common/../../Common/MyCom.h \ + ../../Archive/Zip/../../Common/../../Common/MyWindows.h \ + ../../Archive/Zip/../../Common/../../Common/MyString.h \ + ../../Archive/Zip/../../Common/../ICoder.h \ + ../../Archive/Zip/../../Common/../IStream.h \ + ../../Archive/Zip/../../Common/../../Common/MyUnknown.h \ + ../../Archive/Zip/../../Common/../../Common/Types.h \ + ../../Archive/Zip/../../Common/../IDecl.h \ + ../../Archive/Zip/../../Common/MethodId.h \ + ../../Archive/Zip/../../Common/../../Common/Types.h \ + ../../Archive/Zip/../../Common/LimitedStreams.h \ + ../../Archive/Zip/../../Common/../../Common/MyVector.h \ + ../../Archive/Zip/../../Common/../IStream.h \ + ../../Archive/Zip/../../Common/OutMemStream.h ../../../Common/MyCom.h \ + ../../Archive/Zip/../../Common/MemBlocks.h ../../../Common/MyVector.h \ + ../../../Windows/Synchronization.h ../../../Windows/Synchronization2.h \ + ../../Archive/Zip/../../Common/ProgressUtils.h \ + ../../Archive/Zip/../../Common/../IProgress.h \ + ../../Archive/Zip/../../Common/ProgressMt.h \ + ../../Archive/Zip/../../Common/../../Windows/Synchronization.h \ + ../../Archive/Zip/../../Common/StreamUtils.h \ + ../../Archive/Zip/../../Compress/CopyCoder.h \ + ../../Archive/Zip/../../Compress/../../Common/MyCom.h \ + ../../Archive/Zip/../../Compress/../ICoder.h \ + ../../Archive/Zip/ZipAddCommon.h ../../Archive/Zip/../../ICoder.h \ + ../../Archive/Zip/../../IProgress.h \ + ../../Archive/Zip/../../Common/FilterCoder.h \ + ../../Archive/Zip/../../Common/../IPassword.h \ + ../../Archive/Zip/../../Crypto/ZipCrypto.h \ + ../../Archive/Zip/../../Crypto/../ICoder.h \ + ../../Archive/Zip/../../Crypto/../IPassword.h \ + ../../Archive/Zip/../../Crypto/WzAes.h \ + ../../Archive/Zip/../../Crypto/../../../C/Aes.h \ + ../../Archive/Zip/../../Crypto/../../../C/Types.h \ + ../../../Common/Buffer.h ../../Archive/Zip/../../Crypto/HmacSha1.h \ + ../../Archive/Zip/../../Crypto/Sha1.h \ + ../../Archive/Zip/../../Crypto/../../Common/Types.h \ + ../../Archive/Zip/ZipCompressionMode.h ../../../Common/MyString.h \ + ../../Archive/Zip/ZipOut.h ../../Archive/Zip/../../IStream.h \ + ../../Archive/Zip/../../Common/OutBuffer.h \ + ../../Archive/Zip/../../Common/../../Common/MyException.h \ + ../../Archive/Zip/ZipItem.h ../../../Common/UTFConvert.h \ + ../../Archive/Zip/ZipHeader.h ../../Archive/Zip/ZipUpdate.h \ + ../../Archive/Zip/../IArchive.h ../../Archive/Zip/../../IProgress.h \ + ../../Archive/Zip/../../IStream.h ../../Archive/Zip/../../PropID.h \ + ../../Archive/Zip/ZipIn.h ../../Archive/Zip/../../Common/InBuffer.h \ + ../../Archive/Zip/ZipItemEx.h +ZipRegister.o: ../../Archive/Zip/ZipRegister.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../Archive/Zip/../../Common/RegisterArc.h \ + ../../Archive/Zip/../../Common/../Archive/IArchive.h \ + ../../Archive/Zip/../../Common/../Archive/../IProgress.h \ + ../../Archive/Zip/../../Common/../Archive/../../Common/MyUnknown.h \ + ../../Archive/Zip/../../Common/../Archive/../../Common/MyWindows.h \ + ../../Archive/Zip/../../Common/../Archive/../../Common/Types.h \ + ../../Archive/Zip/../../Common/../Archive/../IDecl.h \ + ../../Archive/Zip/../../Common/../Archive/../IStream.h \ + ../../Archive/Zip/../../Common/../Archive/../PropID.h \ + ../../Archive/Zip/ZipHandler.h ../../../Common/DynamicBuffer.h \ + ../../../Common/Buffer.h ../../../Common/Defs.h \ + ../../Archive/Zip/../../ICoder.h ../../Archive/Zip/../../IStream.h \ + ../../Archive/Zip/../IArchive.h \ + ../../Archive/Zip/../../Common/CreateCoder.h \ + ../../Archive/Zip/../../Common/../../Common/MyCom.h \ + ../../Archive/Zip/../../Common/../../Common/MyWindows.h \ + ../../Archive/Zip/../../Common/../../Common/MyString.h \ + ../../Archive/Zip/../../Common/../../Common/MyVector.h \ + ../../Archive/Zip/../../Common/../../Common/Defs.h \ + ../../Archive/Zip/../../Common/../ICoder.h \ + ../../Archive/Zip/../../Common/MethodId.h \ + ../../Archive/Zip/../../Common/../../Common/Types.h \ + ../../Archive/Zip/ZipIn.h ../../../Common/MyCom.h \ + ../../Archive/Zip/../../IStream.h \ + ../../Archive/Zip/../../Common/InBuffer.h \ + ../../Archive/Zip/../../Common/../IStream.h \ + ../../Archive/Zip/../../Common/../../Common/MyException.h \ + ../../Archive/Zip/ZipHeader.h ../../Archive/Zip/ZipItemEx.h \ + ../../Archive/Zip/ZipItem.h ../../../Common/MyString.h \ + ../../../Common/Buffer.h ../../../Common/UTFConvert.h \ + ../../../Common/MyString.h ../../../Common/StringConvert.h \ + ../../../Common/MyWindows.h ../../Archive/Zip/ZipCompressionMode.h \ + ../../Archive/Zip/../../../Windows/System.h \ + ../../Archive/Zip/../../../Windows/../Common/Types.h +Bcj2Coder.o: ../../Compress/Bcj2Coder.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../Compress/../../../C/Alloc.h \ + ../../Compress/Bcj2Coder.h ../../Compress/../../Common/MyCom.h \ + ../../Compress/../../Common/MyWindows.h ../../Compress/../ICoder.h \ + ../../Compress/../IStream.h ../../Compress/../../Common/MyUnknown.h \ + ../../Compress/../../Common/Types.h ../../Compress/../IDecl.h \ + ../../Compress/RangeCoderBit.h ../../Compress/RangeCoder.h \ + ../../Compress/../Common/InBuffer.h \ + ../../Compress/../Common/../IStream.h \ + ../../Compress/../Common/../../Common/MyCom.h \ + ../../Compress/../Common/../../Common/MyException.h \ + ../../Compress/../Common/../../Common/MyWindows.h \ + ../../Compress/../Common/OutBuffer.h +Bcj2Register.o: ../../Compress/Bcj2Register.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../Compress/../Common/RegisterCodec.h \ + ../../Compress/../Common/../Common/MethodId.h \ + ../../Compress/../Common/../Common/../../Common/Types.h \ + ../../Compress/Bcj2Coder.h ../../Compress/../../Common/MyCom.h \ + ../../Compress/../../Common/MyWindows.h ../../Compress/../ICoder.h \ + ../../Compress/../IStream.h ../../Compress/../../Common/MyUnknown.h \ + ../../Compress/../../Common/Types.h ../../Compress/../IDecl.h \ + ../../Compress/RangeCoderBit.h ../../Compress/RangeCoder.h \ + ../../Compress/../Common/InBuffer.h \ + ../../Compress/../Common/../IStream.h \ + ../../Compress/../Common/../../Common/MyCom.h \ + ../../Compress/../Common/../../Common/MyException.h \ + ../../Compress/../Common/../../Common/MyWindows.h \ + ../../Compress/../Common/OutBuffer.h +BcjCoder.o: ../../Compress/BcjCoder.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../Compress/BcjCoder.h \ + ../../Compress/../../../C/Bra.h ../../Compress/../../../C/Types.h \ + ../../Compress/BranchCoder.h ../../Compress/../../Common/MyCom.h \ + ../../Compress/../../Common/MyWindows.h ../../Compress/../ICoder.h \ + ../../Compress/../IStream.h ../../Compress/../../Common/MyUnknown.h \ + ../../Compress/../../Common/Types.h ../../Compress/../IDecl.h +BcjRegister.o: ../../Compress/BcjRegister.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h \ + ../../Compress/../Common/RegisterCodec.h \ + ../../Compress/../Common/../Common/MethodId.h \ + ../../Compress/../Common/../Common/../../Common/Types.h \ + ../../Compress/BcjCoder.h ../../Compress/../../../C/Bra.h \ + ../../Compress/../../../C/Types.h ../../Compress/BranchCoder.h \ + ../../Compress/../../Common/MyCom.h \ + ../../Compress/../../Common/MyWindows.h ../../Compress/../ICoder.h \ + ../../Compress/../IStream.h ../../Compress/../../Common/MyUnknown.h \ + ../../Compress/../../Common/Types.h ../../Compress/../IDecl.h +BitlDecoder.o: ../../Compress/BitlDecoder.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../Compress/BitlDecoder.h \ + ../../Compress/../IStream.h ../../Compress/../../Common/MyUnknown.h \ + ../../Compress/../../Common/MyWindows.h \ + ../../Compress/../../Common/Types.h ../../Compress/../IDecl.h +BranchCoder.o: ../../Compress/BranchCoder.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../Compress/BranchCoder.h \ + ../../Compress/../../Common/MyCom.h \ + ../../Compress/../../Common/MyWindows.h ../../Compress/../ICoder.h \ + ../../Compress/../IStream.h ../../Compress/../../Common/MyUnknown.h \ + ../../Compress/../../Common/Types.h ../../Compress/../IDecl.h +BranchMisc.o: ../../Compress/BranchMisc.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../Compress/../../../C/Bra.h \ + ../../Compress/../../../C/Types.h ../../Compress/BranchMisc.h \ + ../../Compress/BranchCoder.h ../../Compress/../../Common/MyCom.h \ + ../../Compress/../../Common/MyWindows.h ../../Compress/../ICoder.h \ + ../../Compress/../IStream.h ../../Compress/../../Common/MyUnknown.h \ + ../../Compress/../../Common/Types.h ../../Compress/../IDecl.h +BranchRegister.o: ../../Compress/BranchRegister.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../Compress/../Common/RegisterCodec.h \ + ../../Compress/../Common/../Common/MethodId.h \ + ../../Compress/../Common/../Common/../../Common/Types.h \ + ../../Compress/BranchMisc.h ../../Compress/BranchCoder.h \ + ../../Compress/../../Common/MyCom.h \ + ../../Compress/../../Common/MyWindows.h ../../Compress/../ICoder.h \ + ../../Compress/../IStream.h ../../Compress/../../Common/MyUnknown.h \ + ../../Compress/../../Common/Types.h ../../Compress/../IDecl.h +ByteSwap.o: ../../Compress/ByteSwap.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../Compress/../../Common/MyCom.h \ + ../../Compress/../../Common/MyWindows.h ../../Compress/../ICoder.h \ + ../../Compress/../IStream.h ../../Compress/../../Common/MyUnknown.h \ + ../../Compress/../../Common/Types.h ../../Compress/../IDecl.h \ + ../../Compress/../Common/RegisterCodec.h \ + ../../Compress/../Common/../Common/MethodId.h \ + ../../Compress/../Common/../Common/../../Common/Types.h +BZip2Crc.o: ../../Compress/BZip2Crc.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../Compress/BZip2Crc.h +BZip2Decoder.o: ../../Compress/BZip2Decoder.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../Compress/../../../C/Alloc.h ../../Compress/BZip2Decoder.h \ + ../../Compress/../../Common/MyCom.h \ + ../../Compress/../../Common/MyWindows.h \ + ../../Compress/../../Windows/Synchronization.h \ + ../../Compress/../../Windows/Defs.h \ + ../../Compress/../../Windows/../Common/MyWindows.h \ + ../../Compress/../../Windows/../../C/Threads.h \ + ../../Compress/../../Windows/../../C/Types.h \ + ../../Compress/../../Windows/Synchronization2.h \ + ../../Compress/../../Windows/Thread.h ../../Compress/../ICoder.h \ + ../../Compress/../IStream.h ../../Compress/../../Common/MyUnknown.h \ + ../../Compress/../../Common/Types.h ../../Compress/../IDecl.h \ + ../../Compress/../Common/InBuffer.h \ + ../../Compress/../Common/../IStream.h \ + ../../Compress/../Common/../../Common/MyCom.h \ + ../../Compress/../Common/../../Common/MyException.h \ + ../../Compress/../Common/../../Common/MyWindows.h \ + ../../Compress/../Common/OutBuffer.h ../../Compress/BitmDecoder.h \ + ../../Compress/../IStream.h ../../Compress/BZip2Const.h \ + ../../Compress/BZip2Crc.h ../../Compress/HuffmanDecoder.h \ + ../../Compress/../../Common/Types.h ../../Compress/Mtf8.h \ + ../../Compress/../../../C/CpuArch.h ../../Compress/../../../C/Types.h +BZip2Encoder.o: ../../Compress/BZip2Encoder.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../Compress/../../../C/Alloc.h ../../Compress/../../../C/BwtSort.h \ + ../../Compress/../../../C/Types.h ../../Compress/../../../C/HuffEnc.h \ + ../../Compress/BZip2Crc.h ../../Compress/BZip2Encoder.h \ + ../../Compress/../../Common/Defs.h ../../Compress/../../Common/MyCom.h \ + ../../Compress/../../Common/MyWindows.h \ + ../../Compress/../../Windows/Synchronization.h \ + ../../Compress/../../Windows/Defs.h \ + ../../Compress/../../Windows/../Common/MyWindows.h \ + ../../Compress/../../Windows/../../C/Threads.h \ + ../../Compress/../../Windows/../../C/Types.h \ + ../../Compress/../../Windows/Synchronization2.h \ + ../../Compress/../../Windows/Thread.h ../../Compress/../ICoder.h \ + ../../Compress/../IStream.h ../../Compress/../../Common/MyUnknown.h \ + ../../Compress/../../Common/Types.h ../../Compress/../IDecl.h \ + ../../Compress/../Common/InBuffer.h \ + ../../Compress/../Common/../IStream.h \ + ../../Compress/../Common/../../Common/MyCom.h \ + ../../Compress/../Common/../../Common/MyException.h \ + ../../Compress/../Common/../../Common/MyWindows.h \ + ../../Compress/../Common/OutBuffer.h ../../Compress/BitmEncoder.h \ + ../../Compress/../IStream.h ../../Compress/BZip2Const.h \ + ../../Compress/Mtf8.h ../../Compress/../../../C/CpuArch.h \ + ../../Compress/../../Common/Types.h +BZip2Register.o: ../../Compress/BZip2Register.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../Compress/../Common/RegisterCodec.h \ + ../../Compress/../Common/../Common/MethodId.h \ + ../../Compress/../Common/../Common/../../Common/Types.h \ + ../../Compress/BZip2Decoder.h ../../Compress/../../Common/MyCom.h \ + ../../Compress/../../Common/MyWindows.h \ + ../../Compress/../../Windows/Synchronization.h \ + ../../Compress/../../Windows/Defs.h \ + ../../Compress/../../Windows/../Common/MyWindows.h \ + ../../Compress/../../Windows/../../C/Threads.h \ + ../../Compress/../../Windows/../../C/Types.h \ + ../../Compress/../../Windows/Synchronization2.h \ + ../../Compress/../../Windows/Thread.h ../../Compress/../ICoder.h \ + ../../Compress/../IStream.h ../../Compress/../../Common/MyUnknown.h \ + ../../Compress/../../Common/Types.h ../../Compress/../IDecl.h \ + ../../Compress/../Common/InBuffer.h \ + ../../Compress/../Common/../IStream.h \ + ../../Compress/../Common/../../Common/MyCom.h \ + ../../Compress/../Common/../../Common/MyException.h \ + ../../Compress/../Common/../../Common/MyWindows.h \ + ../../Compress/../Common/OutBuffer.h ../../Compress/BitmDecoder.h \ + ../../Compress/../IStream.h ../../Compress/BZip2Const.h \ + ../../Compress/BZip2Crc.h ../../Compress/HuffmanDecoder.h \ + ../../Compress/../../Common/Types.h ../../Compress/BZip2Encoder.h \ + ../../Compress/../../Common/Defs.h ../../Compress/BitmEncoder.h +CopyCoder.o: ../../Compress/CopyCoder.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../Compress/../../../C/Alloc.h \ + ../../Compress/../Common/StreamUtils.h \ + ../../Compress/../Common/../IStream.h \ + ../../Compress/../Common/../../Common/MyUnknown.h \ + ../../Compress/../Common/../../Common/MyWindows.h \ + ../../Compress/../Common/../../Common/Types.h \ + ../../Compress/../Common/../IDecl.h ../../Compress/CopyCoder.h \ + ../../Compress/../../Common/MyCom.h \ + ../../Compress/../../Common/MyWindows.h ../../Compress/../ICoder.h \ + ../../Compress/../IStream.h +CopyRegister.o: ../../Compress/CopyRegister.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../Compress/../Common/RegisterCodec.h \ + ../../Compress/../Common/../Common/MethodId.h \ + ../../Compress/../Common/../Common/../../Common/Types.h \ + ../../Compress/CopyCoder.h ../../Compress/../../Common/MyCom.h \ + ../../Compress/../../Common/MyWindows.h ../../Compress/../ICoder.h \ + ../../Compress/../IStream.h ../../Compress/../../Common/MyUnknown.h \ + ../../Compress/../../Common/Types.h ../../Compress/../IDecl.h +Deflate64Register.o: ../../Compress/Deflate64Register.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../Compress/../Common/RegisterCodec.h \ + ../../Compress/../Common/../Common/MethodId.h \ + ../../Compress/../Common/../Common/../../Common/Types.h \ + ../../Compress/DeflateDecoder.h ../../Compress/../../Common/MyCom.h \ + ../../Compress/../../Common/MyWindows.h ../../Compress/../ICoder.h \ + ../../Compress/../IStream.h ../../Compress/../../Common/MyUnknown.h \ + ../../Compress/../../Common/Types.h ../../Compress/../IDecl.h \ + ../../Compress/../Common/InBuffer.h \ + ../../Compress/../Common/../IStream.h \ + ../../Compress/../Common/../../Common/MyCom.h \ + ../../Compress/../Common/../../Common/MyException.h \ + ../../Compress/../Common/../../Common/MyWindows.h \ + ../../Compress/BitlDecoder.h ../../Compress/../IStream.h \ + ../../Compress/DeflateConst.h ../../Compress/HuffmanDecoder.h \ + ../../Compress/../../Common/Types.h ../../Compress/LzOutWindow.h \ + ../../Compress/../Common/OutBuffer.h ../../Compress/DeflateEncoder.h \ + ../../Compress/../../../C/LzFind.h ../../Compress/../../../C/Types.h \ + ../../../Common/MyCom.h ../../Compress/BitlEncoder.h +DeflateDecoder.o: ../../Compress/DeflateDecoder.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../Compress/DeflateDecoder.h ../../Compress/../../Common/MyCom.h \ + ../../Compress/../../Common/MyWindows.h ../../Compress/../ICoder.h \ + ../../Compress/../IStream.h ../../Compress/../../Common/MyUnknown.h \ + ../../Compress/../../Common/Types.h ../../Compress/../IDecl.h \ + ../../Compress/../Common/InBuffer.h \ + ../../Compress/../Common/../IStream.h \ + ../../Compress/../Common/../../Common/MyCom.h \ + ../../Compress/../Common/../../Common/MyException.h \ + ../../Compress/../Common/../../Common/MyWindows.h \ + ../../Compress/BitlDecoder.h ../../Compress/../IStream.h \ + ../../Compress/DeflateConst.h ../../Compress/HuffmanDecoder.h \ + ../../Compress/../../Common/Types.h ../../Compress/LzOutWindow.h \ + ../../Compress/../Common/OutBuffer.h +DeflateEncoder.o: ../../Compress/DeflateEncoder.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../Compress/../../../C/Alloc.h ../../Compress/../../../C/HuffEnc.h \ + ../../Compress/../../../C/Types.h ../../../Common/ComTry.h \ + ../../../Common/MyWindows.h ../../Compress/DeflateEncoder.h \ + ../../Compress/../../../C/LzFind.h ../../../Common/MyCom.h \ + ../../Compress/../ICoder.h ../../Compress/../IStream.h \ + ../../Compress/../../Common/MyUnknown.h \ + ../../Compress/../../Common/MyWindows.h \ + ../../Compress/../../Common/Types.h ../../Compress/../IDecl.h \ + ../../Compress/BitlEncoder.h ../../Compress/../Common/OutBuffer.h \ + ../../Compress/../Common/../IStream.h \ + ../../Compress/../Common/../../Common/MyCom.h \ + ../../Compress/../Common/../../Common/MyException.h \ + ../../Compress/../Common/../../Common/MyWindows.h \ + ../../Compress/DeflateConst.h +DeflateRegister.o: ../../Compress/DeflateRegister.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../Compress/../Common/RegisterCodec.h \ + ../../Compress/../Common/../Common/MethodId.h \ + ../../Compress/../Common/../Common/../../Common/Types.h \ + ../../Compress/DeflateDecoder.h ../../Compress/../../Common/MyCom.h \ + ../../Compress/../../Common/MyWindows.h ../../Compress/../ICoder.h \ + ../../Compress/../IStream.h ../../Compress/../../Common/MyUnknown.h \ + ../../Compress/../../Common/Types.h ../../Compress/../IDecl.h \ + ../../Compress/../Common/InBuffer.h \ + ../../Compress/../Common/../IStream.h \ + ../../Compress/../Common/../../Common/MyCom.h \ + ../../Compress/../Common/../../Common/MyException.h \ + ../../Compress/../Common/../../Common/MyWindows.h \ + ../../Compress/BitlDecoder.h ../../Compress/../IStream.h \ + ../../Compress/DeflateConst.h ../../Compress/HuffmanDecoder.h \ + ../../Compress/../../Common/Types.h ../../Compress/LzOutWindow.h \ + ../../Compress/../Common/OutBuffer.h ../../Compress/DeflateEncoder.h \ + ../../Compress/../../../C/LzFind.h ../../Compress/../../../C/Types.h \ + ../../../Common/MyCom.h ../../Compress/BitlEncoder.h +DeltaFilter.o: ../../Compress/DeltaFilter.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../Compress/../../../C/Delta.h \ + ../../Compress/../../../C/Types.h \ + ../../Compress/../Common/RegisterCodec.h \ + ../../Compress/../Common/../Common/MethodId.h \ + ../../Compress/../Common/../Common/../../Common/Types.h \ + ../../Compress/BranchCoder.h ../../Compress/../../Common/MyCom.h \ + ../../Compress/../../Common/MyWindows.h ../../Compress/../ICoder.h \ + ../../Compress/../IStream.h ../../Compress/../../Common/MyUnknown.h \ + ../../Compress/../../Common/Types.h ../../Compress/../IDecl.h +ImplodeDecoder.o: ../../Compress/ImplodeDecoder.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../Compress/ImplodeDecoder.h ../../Compress/../../Common/MyCom.h \ + ../../Compress/../../Common/MyWindows.h ../../Compress/../ICoder.h \ + ../../Compress/../IStream.h ../../Compress/../../Common/MyUnknown.h \ + ../../Compress/../../Common/Types.h ../../Compress/../IDecl.h \ + ../../Compress/ImplodeHuffmanDecoder.h \ + ../../Compress/../Common/InBuffer.h \ + ../../Compress/../Common/../IStream.h \ + ../../Compress/../Common/../../Common/MyCom.h \ + ../../Compress/../Common/../../Common/MyException.h \ + ../../Compress/../Common/../../Common/MyWindows.h \ + ../../Compress/BitlDecoder.h ../../Compress/../IStream.h \ + ../../Compress/LzOutWindow.h ../../Compress/../Common/OutBuffer.h \ + ../../../Common/Defs.h +ImplodeHuffmanDecoder.o: ../../Compress/ImplodeHuffmanDecoder.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../Compress/ImplodeHuffmanDecoder.h \ + ../../Compress/../Common/InBuffer.h \ + ../../Compress/../Common/../IStream.h \ + ../../Compress/../Common/../../Common/MyUnknown.h \ + ../../Compress/../Common/../../Common/MyWindows.h \ + ../../Compress/../Common/../../Common/Types.h \ + ../../Compress/../Common/../IDecl.h \ + ../../Compress/../Common/../../Common/MyCom.h \ + ../../Compress/../Common/../../Common/MyException.h \ + ../../Compress/BitlDecoder.h ../../Compress/../IStream.h +Lzma2Decoder.o: ../../Compress/Lzma2Decoder.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../Compress/../../../C/Alloc.h ../../Compress/../Common/StreamUtils.h \ + ../../Compress/../Common/../IStream.h \ + ../../Compress/../Common/../../Common/MyUnknown.h \ + ../../Compress/../Common/../../Common/MyWindows.h \ + ../../Compress/../Common/../../Common/Types.h \ + ../../Compress/../Common/../IDecl.h ../../Compress/Lzma2Decoder.h \ + ../../Compress/../../../C/Lzma2Dec.h ../../Compress/../../../C/LzmaDec.h \ + ../../Compress/../../../C/Types.h ../../Compress/../../Common/MyCom.h \ + ../../Compress/../../Common/MyWindows.h ../../Compress/../ICoder.h \ + ../../Compress/../IStream.h +Lzma2Encoder.o: ../../Compress/Lzma2Encoder.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../Compress/../../../C/Alloc.h ../../Compress/../Common/CWrappers.h \ + ../../Compress/../Common/../ICoder.h \ + ../../Compress/../Common/../IStream.h \ + ../../Compress/../Common/../../Common/MyUnknown.h \ + ../../Compress/../Common/../../Common/MyWindows.h \ + ../../Compress/../Common/../../Common/Types.h \ + ../../Compress/../Common/../IDecl.h \ + ../../Compress/../Common/../../Common/MyCom.h \ + ../../Compress/../Common/StreamUtils.h \ + ../../Compress/../Common/../IStream.h ../../Compress/Lzma2Encoder.h \ + ../../Compress/../../../C/Lzma2Enc.h ../../Compress/../../../C/LzmaEnc.h \ + ../../Compress/../../../C/Types.h ../../Compress/../../Common/MyCom.h \ + ../../Compress/../ICoder.h +Lzma2Register.o: ../../Compress/Lzma2Register.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../Compress/../Common/RegisterCodec.h \ + ../../Compress/../Common/../Common/MethodId.h \ + ../../Compress/../Common/../Common/../../Common/Types.h \ + ../../Compress/Lzma2Decoder.h ../../Compress/../../../C/Lzma2Dec.h \ + ../../Compress/../../../C/LzmaDec.h ../../Compress/../../../C/Types.h \ + ../../Compress/../../Common/MyCom.h \ + ../../Compress/../../Common/MyWindows.h ../../Compress/../ICoder.h \ + ../../Compress/../IStream.h ../../Compress/../../Common/MyUnknown.h \ + ../../Compress/../../Common/Types.h ../../Compress/../IDecl.h \ + ../../Compress/Lzma2Encoder.h ../../Compress/../../../C/Lzma2Enc.h \ + ../../Compress/../../../C/LzmaEnc.h +LzmaDecoder.o: ../../Compress/LzmaDecoder.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../Compress/../../../C/Alloc.h \ + ../../Compress/../Common/StreamUtils.h \ + ../../Compress/../Common/../IStream.h \ + ../../Compress/../Common/../../Common/MyUnknown.h \ + ../../Compress/../Common/../../Common/MyWindows.h \ + ../../Compress/../Common/../../Common/Types.h \ + ../../Compress/../Common/../IDecl.h ../../Compress/LzmaDecoder.h \ + ../../Compress/../../../C/LzmaDec.h ../../Compress/../../../C/Types.h \ + ../../Compress/../../Common/MyCom.h \ + ../../Compress/../../Common/MyWindows.h ../../Compress/../ICoder.h \ + ../../Compress/../IStream.h +LzmaEncoder.o: ../../Compress/LzmaEncoder.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../Compress/../../../C/Alloc.h \ + ../../Compress/../Common/CWrappers.h \ + ../../Compress/../Common/../ICoder.h \ + ../../Compress/../Common/../IStream.h \ + ../../Compress/../Common/../../Common/MyUnknown.h \ + ../../Compress/../Common/../../Common/MyWindows.h \ + ../../Compress/../Common/../../Common/Types.h \ + ../../Compress/../Common/../IDecl.h \ + ../../Compress/../Common/../../Common/MyCom.h \ + ../../Compress/../Common/StreamUtils.h \ + ../../Compress/../Common/../IStream.h ../../Compress/LzmaEncoder.h \ + ../../Compress/../../../C/LzmaEnc.h ../../Compress/../../../C/Types.h \ + ../../Compress/../../Common/MyCom.h ../../Compress/../ICoder.h +LzmaRegister.o: ../../Compress/LzmaRegister.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../Compress/../Common/RegisterCodec.h \ + ../../Compress/../Common/../Common/MethodId.h \ + ../../Compress/../Common/../Common/../../Common/Types.h \ + ../../Compress/LzmaDecoder.h ../../Compress/../../../C/LzmaDec.h \ + ../../Compress/../../../C/Types.h ../../Compress/../../Common/MyCom.h \ + ../../Compress/../../Common/MyWindows.h ../../Compress/../ICoder.h \ + ../../Compress/../IStream.h ../../Compress/../../Common/MyUnknown.h \ + ../../Compress/../../Common/Types.h ../../Compress/../IDecl.h \ + ../../Compress/LzmaEncoder.h ../../Compress/../../../C/LzmaEnc.h +LzOutWindow.o: ../../Compress/LzOutWindow.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../Compress/LzOutWindow.h \ + ../../Compress/../IStream.h ../../Compress/../../Common/MyUnknown.h \ + ../../Compress/../../Common/MyWindows.h \ + ../../Compress/../../Common/Types.h ../../Compress/../IDecl.h \ + ../../Compress/../Common/OutBuffer.h \ + ../../Compress/../Common/../IStream.h \ + ../../Compress/../Common/../../Common/MyCom.h \ + ../../Compress/../Common/../../Common/MyWindows.h \ + ../../Compress/../Common/../../Common/MyException.h +Lzx86Converter.o: ../../Compress/Lzx86Converter.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../Compress/../../Common/Defs.h ../../Compress/Lzx86Converter.h \ + ../../Compress/../../Common/MyCom.h \ + ../../Compress/../../Common/MyWindows.h ../../Compress/../IStream.h \ + ../../Compress/../../Common/MyUnknown.h \ + ../../Compress/../../Common/Types.h ../../Compress/../IDecl.h +LzxDecoder.o: ../../Compress/LzxDecoder.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../Compress/../../Common/Defs.h \ + ../../Compress/LzxDecoder.h ../../Compress/../ICoder.h \ + ../../Compress/../IStream.h ../../Compress/../../Common/MyUnknown.h \ + ../../Compress/../../Common/MyWindows.h \ + ../../Compress/../../Common/Types.h ../../Compress/../IDecl.h \ + ../../Compress/../Common/InBuffer.h \ + ../../Compress/../Common/../IStream.h \ + ../../Compress/../Common/../../Common/MyCom.h \ + ../../Compress/../Common/../../Common/MyWindows.h \ + ../../Compress/../Common/../../Common/MyException.h \ + ../../Compress/HuffmanDecoder.h ../../Compress/../../Common/Types.h \ + ../../Compress/LzOutWindow.h ../../Compress/../IStream.h \ + ../../Compress/../Common/OutBuffer.h ../../Compress/Lzx.h \ + ../../Compress/Lzx86Converter.h ../../Compress/../../Common/MyCom.h +PpmdDecoder.o: ../../Compress/PpmdDecoder.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../Compress/../../../C/Alloc.h \ + ../../Compress/../../../C/CpuArch.h ../../Compress/../../../C/Types.h \ + ../../Compress/../Common/StreamUtils.h \ + ../../Compress/../Common/../IStream.h \ + ../../Compress/../Common/../../Common/MyUnknown.h \ + ../../Compress/../Common/../../Common/MyWindows.h \ + ../../Compress/../Common/../../Common/Types.h \ + ../../Compress/../Common/../IDecl.h ../../Compress/PpmdDecoder.h \ + ../../Compress/../../../C/Ppmd7.h ../../Compress/../../../C/Ppmd.h \ + ../../Compress/../../../C/CpuArch.h ../../Compress/../../Common/MyCom.h \ + ../../Compress/../../Common/MyWindows.h \ + ../../Compress/../Common/CWrappers.h \ + ../../Compress/../Common/../ICoder.h \ + ../../Compress/../Common/../IStream.h \ + ../../Compress/../Common/../../Common/MyCom.h ../../Compress/../ICoder.h +PpmdEncoder.o: ../../Compress/PpmdEncoder.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../Compress/../../../C/Alloc.h \ + ../../Compress/../../../C/CpuArch.h ../../Compress/../../../C/Types.h \ + ../../Compress/../Common/StreamUtils.h \ + ../../Compress/../Common/../IStream.h \ + ../../Compress/../Common/../../Common/MyUnknown.h \ + ../../Compress/../Common/../../Common/MyWindows.h \ + ../../Compress/../Common/../../Common/Types.h \ + ../../Compress/../Common/../IDecl.h ../../Compress/PpmdEncoder.h \ + ../../Compress/../../../C/Ppmd7.h ../../Compress/../../../C/Ppmd.h \ + ../../Compress/../../../C/CpuArch.h ../../Compress/../../Common/MyCom.h \ + ../../Compress/../../Common/MyWindows.h ../../Compress/../ICoder.h \ + ../../Compress/../IStream.h ../../Compress/../Common/CWrappers.h \ + ../../Compress/../Common/../ICoder.h \ + ../../Compress/../Common/../../Common/MyCom.h +PpmdRegister.o: ../../Compress/PpmdRegister.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../Compress/../Common/RegisterCodec.h \ + ../../Compress/../Common/../Common/MethodId.h \ + ../../Compress/../Common/../Common/../../Common/Types.h \ + ../../Compress/PpmdDecoder.h ../../Compress/../../../C/Ppmd7.h \ + ../../Compress/../../../C/Ppmd.h ../../Compress/../../../C/Types.h \ + ../../Compress/../../../C/CpuArch.h ../../Compress/../../Common/MyCom.h \ + ../../Compress/../../Common/MyWindows.h \ + ../../Compress/../Common/CWrappers.h \ + ../../Compress/../Common/../ICoder.h \ + ../../Compress/../Common/../IStream.h \ + ../../Compress/../Common/../../Common/MyUnknown.h \ + ../../Compress/../Common/../../Common/MyWindows.h \ + ../../Compress/../Common/../../Common/Types.h \ + ../../Compress/../Common/../IDecl.h \ + ../../Compress/../Common/../../Common/MyCom.h ../../Compress/../ICoder.h \ + ../../Compress/PpmdEncoder.h +PpmdZip.o: ../../Compress/PpmdZip.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../Compress/../../../C/CpuArch.h \ + ../../Compress/../../../C/Types.h ../../Compress/../Common/StreamUtils.h \ + ../../Compress/../Common/../IStream.h \ + ../../Compress/../Common/../../Common/MyUnknown.h \ + ../../Compress/../Common/../../Common/MyWindows.h \ + ../../Compress/../Common/../../Common/Types.h \ + ../../Compress/../Common/../IDecl.h ../../Compress/PpmdZip.h \ + ../../Compress/../../../C/Alloc.h ../../Compress/../../../C/Ppmd8.h \ + ../../Compress/../../../C/Ppmd.h ../../Compress/../../../C/CpuArch.h \ + ../../Compress/../../Common/MyCom.h \ + ../../Compress/../../Common/MyWindows.h \ + ../../Compress/../Common/CWrappers.h \ + ../../Compress/../Common/../ICoder.h \ + ../../Compress/../Common/../IStream.h \ + ../../Compress/../Common/../../Common/MyCom.h ../../Compress/../ICoder.h +QuantumDecoder.o: ../../Compress/QuantumDecoder.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../Compress/../../Common/Defs.h ../../Compress/QuantumDecoder.h \ + ../../Compress/../../Common/MyCom.h \ + ../../Compress/../../Common/MyWindows.h ../../Compress/../ICoder.h \ + ../../Compress/../IStream.h ../../Compress/../../Common/MyUnknown.h \ + ../../Compress/../../Common/Types.h ../../Compress/../IDecl.h \ + ../../Compress/../Common/InBuffer.h \ + ../../Compress/../Common/../IStream.h \ + ../../Compress/../Common/../../Common/MyCom.h \ + ../../Compress/../Common/../../Common/MyException.h \ + ../../Compress/../Common/../../Common/MyWindows.h \ + ../../Compress/LzOutWindow.h ../../Compress/../IStream.h \ + ../../Compress/../Common/OutBuffer.h +ShrinkDecoder.o: ../../Compress/ShrinkDecoder.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../Compress/../../../C/Alloc.h ../../Compress/../Common/InBuffer.h \ + ../../Compress/../Common/../IStream.h \ + ../../Compress/../Common/../../Common/MyUnknown.h \ + ../../Compress/../Common/../../Common/MyWindows.h \ + ../../Compress/../Common/../../Common/Types.h \ + ../../Compress/../Common/../IDecl.h \ + ../../Compress/../Common/../../Common/MyCom.h \ + ../../Compress/../Common/../../Common/MyException.h \ + ../../Compress/../Common/OutBuffer.h ../../Compress/BitlDecoder.h \ + ../../Compress/../IStream.h ../../Compress/ShrinkDecoder.h \ + ../../Compress/../../Common/MyCom.h ../../Compress/../ICoder.h \ + ../../Compress/../IStream.h +ZDecoder.o: ../../Compress/ZDecoder.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../Compress/../../../C/Alloc.h \ + ../../Compress/../Common/InBuffer.h \ + ../../Compress/../Common/../IStream.h \ + ../../Compress/../Common/../../Common/MyUnknown.h \ + ../../Compress/../Common/../../Common/MyWindows.h \ + ../../Compress/../Common/../../Common/Types.h \ + ../../Compress/../Common/../IDecl.h \ + ../../Compress/../Common/../../Common/MyCom.h \ + ../../Compress/../Common/../../Common/MyException.h \ + ../../Compress/../Common/OutBuffer.h ../../Compress/ZDecoder.h \ + ../../Compress/../../Common/MyCom.h ../../Compress/../ICoder.h \ + ../../Compress/../IStream.h +7zAes.o: ../../Crypto/7zAes.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../Crypto/../../../C/Sha256.h \ + ../../Crypto/../../../C/Types.h ../../../Windows/Synchronization.h \ + ../../../Windows/Defs.h ../../../Windows/../Common/MyWindows.h \ + ../../../Windows/../../C/Threads.h ../../../Windows/../../C/Types.h \ + ../../../Windows/Synchronization2.h \ + ../../Crypto/../Common/StreamObjects.h \ + ../../Crypto/../Common/../../Common/Buffer.h \ + ../../Crypto/../Common/../../Common/Defs.h \ + ../../Crypto/../Common/../../Common/MyCom.h \ + ../../Crypto/../Common/../../Common/MyWindows.h \ + ../../Crypto/../Common/../IStream.h \ + ../../Crypto/../Common/../../Common/MyUnknown.h \ + ../../Crypto/../Common/../../Common/Types.h \ + ../../Crypto/../Common/../IDecl.h ../../Crypto/../Common/StreamUtils.h \ + ../../Crypto/7zAes.h ../../../Common/Buffer.h ../../../Common/MyCom.h \ + ../../../Common/MyVector.h ../../../Common/Defs.h \ + ../../Crypto/../ICoder.h ../../Crypto/../IStream.h \ + ../../Crypto/../IPassword.h ../../Crypto/../../Common/MyUnknown.h \ + ../../Crypto/../../Common/Types.h ../../Crypto/../IDecl.h \ + ../../Crypto/MyAes.h ../../Crypto/../../../C/Aes.h \ + ../../Crypto/../../Common/MyCom.h ../../Crypto/RandGen.h \ + ../../Crypto/Sha1.h ../../Crypto/../../Common/Types.h +7zAesRegister.o: ../../Crypto/7zAesRegister.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../Crypto/../Common/RegisterCodec.h \ + ../../Crypto/../Common/../Common/MethodId.h \ + ../../Crypto/../Common/../Common/../../Common/Types.h \ + ../../Crypto/7zAes.h ../../../Common/Buffer.h ../../../Common/Defs.h \ + ../../../Common/MyCom.h ../../../Common/MyWindows.h \ + ../../../Common/MyVector.h ../../Crypto/../ICoder.h \ + ../../Crypto/../IStream.h ../../Crypto/../../Common/MyUnknown.h \ + ../../Crypto/../../Common/MyWindows.h ../../Crypto/../../Common/Types.h \ + ../../Crypto/../IDecl.h ../../Crypto/../IPassword.h +HmacSha1.o: ../../Crypto/HmacSha1.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../Crypto/HmacSha1.h \ + ../../Crypto/Sha1.h ../../Crypto/../../Common/Types.h +MyAes.o: ../../Crypto/MyAes.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../Crypto/MyAes.h \ + ../../Crypto/../../../C/Aes.h ../../Crypto/../../../C/Types.h \ + ../../Crypto/../../Common/MyCom.h ../../Crypto/../../Common/MyWindows.h \ + ../../Crypto/../ICoder.h ../../Crypto/../IStream.h \ + ../../Crypto/../../Common/MyUnknown.h ../../Crypto/../../Common/Types.h \ + ../../Crypto/../IDecl.h +Pbkdf2HmacSha1.o: ../../Crypto/Pbkdf2HmacSha1.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../Crypto/HmacSha1.h ../../Crypto/Sha1.h \ + ../../Crypto/../../Common/Types.h +RandGen.o: ../../Crypto/RandGen.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../../Windows/Synchronization.h \ + ../../../Windows/Defs.h ../../../Windows/../Common/MyWindows.h \ + ../../../Windows/../../C/Threads.h ../../../Windows/../../C/Types.h \ + ../../../Windows/Synchronization2.h ../../Crypto/RandGen.h \ + ../../Crypto/Sha1.h ../../Crypto/../../Common/Types.h +Sha1.o: ../../Crypto/Sha1.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../Crypto/../../../C/RotateDefs.h \ + ../../Crypto/Sha1.h ../../Crypto/../../Common/Types.h +WzAes.o: ../../Crypto/WzAes.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../Crypto/../Common/StreamObjects.h \ + ../../Crypto/../Common/../../Common/Buffer.h \ + ../../Crypto/../Common/../../Common/Defs.h \ + ../../Crypto/../Common/../../Common/MyCom.h \ + ../../Crypto/../Common/../../Common/MyWindows.h \ + ../../Crypto/../Common/../IStream.h \ + ../../Crypto/../Common/../../Common/MyUnknown.h \ + ../../Crypto/../Common/../../Common/Types.h \ + ../../Crypto/../Common/../IDecl.h ../../Crypto/../Common/StreamUtils.h \ + ../../Crypto/Pbkdf2HmacSha1.h ../../Crypto/../../Common/Types.h \ + ../../Crypto/RandGen.h ../../Crypto/Sha1.h ../../Crypto/WzAes.h \ + ../../Crypto/../../../C/Aes.h ../../Crypto/../../../C/Types.h \ + ../../../Common/Buffer.h ../../../Common/MyCom.h \ + ../../../Common/MyVector.h ../../../Common/Defs.h \ + ../../Crypto/../ICoder.h ../../Crypto/../IStream.h \ + ../../Crypto/../IPassword.h ../../Crypto/../../Common/MyUnknown.h \ + ../../Crypto/../../Common/Types.h ../../Crypto/../IDecl.h \ + ../../Crypto/HmacSha1.h +ZipCrypto.o: ../../Crypto/ZipCrypto.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../Crypto/../../../C/7zCrc.h \ + ../../Crypto/../../../C/Types.h ../../Crypto/../Common/StreamUtils.h \ + ../../Crypto/../Common/../IStream.h \ + ../../Crypto/../Common/../../Common/MyUnknown.h \ + ../../Crypto/../Common/../../Common/MyWindows.h \ + ../../Crypto/../Common/../../Common/Types.h \ + ../../Crypto/../Common/../IDecl.h ../../Crypto/RandGen.h \ + ../../Crypto/Sha1.h ../../Crypto/../../Common/Types.h \ + ../../Crypto/ZipCrypto.h ../../../Common/MyCom.h \ + ../../../Common/MyWindows.h ../../Crypto/../ICoder.h \ + ../../Crypto/../IStream.h ../../Crypto/../IPassword.h \ + ../../Crypto/../../Common/MyUnknown.h ../../Crypto/../../Common/Types.h \ + ../../Crypto/../IDecl.h +ZipStrong.o: ../../Crypto/ZipStrong.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../Crypto/../../../C/7zCrc.h \ + ../../Crypto/../../../C/Types.h ../../Crypto/../../../C/CpuArch.h \ + ../../Crypto/../Common/StreamUtils.h ../../Crypto/../Common/../IStream.h \ + ../../Crypto/../Common/../../Common/MyUnknown.h \ + ../../Crypto/../Common/../../Common/MyWindows.h \ + ../../Crypto/../Common/../../Common/Types.h \ + ../../Crypto/../Common/../IDecl.h ../../Crypto/MyAes.h \ + ../../Crypto/../../../C/Aes.h ../../Crypto/../../Common/MyCom.h \ + ../../Crypto/../../Common/MyWindows.h ../../Crypto/../ICoder.h \ + ../../Crypto/../IStream.h ../../Crypto/Sha1.h \ + ../../Crypto/../../Common/Types.h ../../Crypto/ZipStrong.h \ + ../../../Common/Buffer.h ../../../Common/Defs.h \ + ../../Crypto/../IPassword.h ../../Crypto/../../Common/MyUnknown.h \ + ../../Crypto/../../Common/Types.h ../../Crypto/../IDecl.h diff --git a/CPP/7zip/Bundles/Alone/makefile.list b/CPP/7zip/Bundles/Alone/makefile.list new file mode 100644 index 0000000..b82120a --- /dev/null +++ b/CPP/7zip/Bundles/Alone/makefile.list @@ -0,0 +1,232 @@ +SRCS=\ + ../../../myWindows/myGetTickCount.cpp \ + ../../../myWindows/wine_date_and_time.cpp \ + ../../../myWindows/myAddExeFlag.cpp \ + ../../../myWindows/mySplitCommandLine.cpp \ + \ + ../../UI/Console/BenchCon.cpp \ + ../../UI/Console/ConsoleClose.cpp \ + ../../UI/Console/ExtractCallbackConsole.cpp \ + ../../UI/Console/List.cpp \ + ../../UI/Console/Main.cpp \ + ../../UI/Console/MainAr.cpp \ + ../../UI/Console/OpenCallbackConsole.cpp \ + ../../UI/Console/PercentPrinter.cpp \ + ../../UI/Console/UpdateCallbackConsole.cpp \ + ../../UI/Console/UserInputUtils.cpp \ + \ + ../../../Common/CommandLineParser.cpp \ + ../../../Common/CRC.cpp \ + ../../../Common/IntToString.cpp \ + ../../../Common/ListFileUtils.cpp \ + ../../../Common/StdInStream.cpp \ + ../../../Common/StdOutStream.cpp \ + ../../../Common/MyString.cpp \ + ../../../Common/MyWindows.cpp \ + ../../../Common/StringConvert.cpp \ + ../../../Common/StringToInt.cpp \ + ../../../Common/UTFConvert.cpp \ + ../../../Common/MyVector.cpp \ + ../../../Common/Wildcard.cpp \ + \ + ../../../Windows/Error.cpp \ + ../../../Windows/FileDir.cpp \ + ../../../Windows/FileFind.cpp \ + ../../../Windows/FileIO.cpp \ + ../../../Windows/FileName.cpp \ + ../../../Windows/PropVariant.cpp \ + ../../../Windows/PropVariantConversions.cpp \ + ../../../Windows/Synchronization.cpp \ + ../../../Windows/System.cpp \ + ../../../Windows/Time.cpp \ + \ + ../../Common/CreateCoder.cpp \ + ../../Common/CWrappers.cpp \ + ../../Common/FilePathAutoRename.cpp \ + ../../Common/FileStreams.cpp \ + ../../Common/FilterCoder.cpp \ + ../../Common/InBuffer.cpp \ + ../../Common/InOutTempBuffer.cpp \ + ../../Common/LimitedStreams.cpp \ + ../../Common/LockedStream.cpp \ + ../../Common/MemBlocks.cpp \ + ../../Common/MethodId.cpp \ + ../../Common/MethodProps.cpp \ + ../../Common/OffsetStream.cpp \ + ../../Common/OutBuffer.cpp \ + ../../Common/OutMemStream.cpp \ + ../../Common/ProgressMt.cpp \ + ../../Common/ProgressUtils.cpp \ + ../../Common/StreamBinder.cpp \ + ../../Common/StreamObjects.cpp \ + ../../Common/StreamUtils.cpp \ + ../../Common/VirtThread.cpp \ + \ + ../../UI/Common/ArchiveCommandLine.cpp \ + ../../UI/Common/ArchiveExtractCallback.cpp \ + ../../UI/Common/ArchiveOpenCallback.cpp \ + ../../UI/Common/Bench.cpp \ + ../../UI/Common/DefaultName.cpp \ + ../../UI/Common/EnumDirItems.cpp \ + ../../UI/Common/Extract.cpp \ + ../../UI/Common/ExtractingFilePath.cpp \ + ../../UI/Common/LoadCodecs.cpp \ + ../../UI/Common/OpenArchive.cpp \ + ../../UI/Common/PropIDUtils.cpp \ + ../../UI/Common/SetProperties.cpp \ + ../../UI/Common/SortUtils.cpp \ + ../../UI/Common/TempFiles.cpp \ + ../../UI/Common/Update.cpp \ + ../../UI/Common/UpdateAction.cpp \ + ../../UI/Common/UpdateCallback.cpp \ + ../../UI/Common/UpdatePair.cpp \ + ../../UI/Common/UpdateProduce.cpp \ + \ + ../../Archive/Bz2Handler.cpp \ + ../../Archive/DeflateProps.cpp \ + ../../Archive/GzHandler.cpp \ + ../../Archive/LzmaHandler.cpp \ + ../../Archive/PpmdHandler.cpp \ + ../../Archive/SplitHandler.cpp \ + ../../Archive/XzHandler.cpp \ + ../../Archive/ZHandler.cpp \ + \ + ../../Archive/Common/CoderMixer2.cpp \ + ../../Archive/Common/CoderMixer2MT.cpp \ + ../../Archive/Common/CrossThreadProgress.cpp \ + ../../Archive/Common/DummyOutStream.cpp \ + ../../Archive/Common/FindSignature.cpp \ + ../../Archive/Common/HandlerOut.cpp \ + ../../Archive/Common/InStreamWithCRC.cpp \ + ../../Archive/Common/ItemNameUtils.cpp \ + ../../Archive/Common/MultiStream.cpp \ + ../../Archive/Common/OutStreamWithCRC.cpp \ + ../../Archive/Common/ParseProperties.cpp \ + \ + ../../Archive/7z/7zCompressionMode.cpp \ + ../../Archive/7z/7zDecode.cpp \ + ../../Archive/7z/7zEncode.cpp \ + ../../Archive/7z/7zExtract.cpp \ + ../../Archive/7z/7zFolderInStream.cpp \ + ../../Archive/7z/7zFolderOutStream.cpp \ + ../../Archive/7z/7zHandler.cpp \ + ../../Archive/7z/7zHandlerOut.cpp \ + ../../Archive/7z/7zHeader.cpp \ + ../../Archive/7z/7zIn.cpp \ + ../../Archive/7z/7zOut.cpp \ + ../../Archive/7z/7zProperties.cpp \ + ../../Archive/7z/7zSpecStream.cpp \ + ../../Archive/7z/7zUpdate.cpp \ + ../../Archive/7z/7zRegister.cpp \ + \ + ../../Archive/Cab/CabBlockInStream.cpp \ + ../../Archive/Cab/CabHandler.cpp \ + ../../Archive/Cab/CabHeader.cpp \ + ../../Archive/Cab/CabIn.cpp \ + ../../Archive/Cab/CabRegister.cpp \ + \ + ../../Archive/Tar/TarHandler.cpp \ + ../../Archive/Tar/TarHandlerOut.cpp \ + ../../Archive/Tar/TarHeader.cpp \ + ../../Archive/Tar/TarIn.cpp \ + ../../Archive/Tar/TarOut.cpp \ + ../../Archive/Tar/TarRegister.cpp \ + ../../Archive/Tar/TarUpdate.cpp \ + \ + ../../Archive/Zip/ZipAddCommon.cpp \ + ../../Archive/Zip/ZipHandler.cpp \ + ../../Archive/Zip/ZipHandlerOut.cpp \ + ../../Archive/Zip/ZipHeader.cpp \ + ../../Archive/Zip/ZipIn.cpp \ + ../../Archive/Zip/ZipItem.cpp \ + ../../Archive/Zip/ZipOut.cpp \ + ../../Archive/Zip/ZipUpdate.cpp \ + ../../Archive/Zip/ZipRegister.cpp \ + \ + ../../Compress/Bcj2Coder.cpp \ + ../../Compress/Bcj2Register.cpp \ + ../../Compress/BcjCoder.cpp \ + ../../Compress/BcjRegister.cpp \ + ../../Compress/BitlDecoder.cpp \ + ../../Compress/BranchCoder.cpp \ + ../../Compress/BranchMisc.cpp \ + ../../Compress/BranchRegister.cpp \ + ../../Compress/ByteSwap.cpp \ + ../../Compress/BZip2Crc.cpp \ + ../../Compress/BZip2Decoder.cpp \ + ../../Compress/BZip2Encoder.cpp \ + ../../Compress/BZip2Register.cpp \ + ../../Compress/CopyCoder.cpp \ + ../../Compress/CopyRegister.cpp \ + ../../Compress/Deflate64Register.cpp \ + ../../Compress/DeflateDecoder.cpp \ + ../../Compress/DeflateEncoder.cpp \ + ../../Compress/DeflateRegister.cpp \ + ../../Compress/DeltaFilter.cpp \ + ../../Compress/ImplodeDecoder.cpp \ + ../../Compress/ImplodeHuffmanDecoder.cpp \ + ../../Compress/Lzma2Decoder.cpp \ + ../../Compress/Lzma2Encoder.cpp \ + ../../Compress/Lzma2Register.cpp \ + ../../Compress/LzmaDecoder.cpp \ + ../../Compress/LzmaEncoder.cpp \ + ../../Compress/LzmaRegister.cpp \ + ../../Compress/LzOutWindow.cpp \ + ../../Compress/Lzx86Converter.cpp \ + ../../Compress/LzxDecoder.cpp \ + ../../Compress/PpmdDecoder.cpp \ + ../../Compress/PpmdEncoder.cpp \ + ../../Compress/PpmdRegister.cpp \ + ../../Compress/PpmdZip.cpp \ + ../../Compress/QuantumDecoder.cpp \ + ../../Compress/ShrinkDecoder.cpp \ + ../../Compress/ZDecoder.cpp \ + \ + ../../Crypto/7zAes.cpp \ + ../../Crypto/7zAesRegister.cpp \ + ../../Crypto/HmacSha1.cpp \ + ../../Crypto/MyAes.cpp \ + ../../Crypto/Pbkdf2HmacSha1.cpp \ + ../../Crypto/RandGen.cpp \ + ../../Crypto/Sha1.cpp \ + ../../Crypto/WzAes.cpp \ + ../../Crypto/ZipCrypto.cpp \ + ../../Crypto/ZipStrong.cpp + +SRCS_C=\ + ../../../../C/Aes.c \ + ../../../../C/7zStream.c \ + ../../../../C/Alloc.c \ + ../../../../C/Bra.c \ + ../../../../C/Bra86.c \ + ../../../../C/BraIA64.c \ + ../../../../C/BwtSort.c \ + ../../../../C/Delta.c \ + ../../../../C/HuffEnc.c \ + ../../../../C/LzFind.c \ + ../../../../C/LzFindMt.c \ + ../../../../C/Lzma2Dec.c \ + ../../../../C/Lzma2Enc.c \ + ../../../../C/LzmaDec.c \ + ../../../../C/LzmaEnc.c \ + ../../../../C/MtCoder.c \ + ../../../../C/Ppmd7.c \ + ../../../../C/Ppmd7Dec.c \ + ../../../../C/Ppmd7Enc.c \ + ../../../../C/Ppmd8.c \ + ../../../../C/Ppmd8Dec.c \ + ../../../../C/Ppmd8Enc.c \ + ../../../../C/Sha256.c \ + ../../../../C/Sort.c \ + ../../../../C/Threads.c \ + ../../../../C/Xz.c \ + ../../../../C/XzCrc64.c \ + ../../../../C/XzDec.c \ + ../../../../C/XzEnc.c \ + ../../../../C/XzIn.c + +include ../../../../makefile.rules + +Main.o : ../../UI/Console/Main.cpp + $(CXX) $(CXXFLAGS) ../../UI/Console/Main.cpp + diff --git a/CPP/7zip/Bundles/Alone7z/makefile b/CPP/7zip/Bundles/Alone7z/makefile new file mode 100644 index 0000000..5b8217f --- /dev/null +++ b/CPP/7zip/Bundles/Alone7z/makefile @@ -0,0 +1,192 @@ +PROG=../../../../bin/7zr$(BINSUFFIX) + +LOCAL_FLAGS= \ + -D_NO_CRYPTO \ + -D_NO_CRYPTO \ + -DBREAK_HANDLER \ + -DUNICODE -D_UNICODE + +include ../../../../makefile.crc32 +include ../../../../makefile.machine + +PCH_NAME=$(PRE_COMPILED_HEADER) + +LIBS=$(LOCAL_LIBS) + +CONSOLE_OBJS = \ + BenchCon.o \ + ConsoleClose.o \ + ExtractCallbackConsole.o \ + List.o \ + Main.o \ + MainAr.o \ + OpenCallbackConsole.o \ + PercentPrinter.o \ + UpdateCallbackConsole.o \ + UserInputUtils.o \ + +# NewHandler.o StringConvert.o +COMMON_OBJS = \ + CommandLineParser.o \ + CRC.o \ + IntToString.o \ + ListFileUtils.o \ + StdInStream.o \ + StdOutStream.o \ + MyString.o \ + MyWindows.o \ + StringConvert.o \ + StringToInt.o \ + UTFConvert.o \ + MyVector.o \ + Wildcard.o \ + +# DLL.o MemoryLock.o +WIN_OBJS = \ + Error.o \ + FileDir.o \ + FileFind.o \ + FileIO.o \ + FileName.o \ + PropVariant.o \ + PropVariantConversions.o \ + Synchronization.o \ + System.o \ + Time.o \ + +7ZIP_COMMON_OBJS = \ + CreateCoder.o \ + CWrappers.o \ + FilePathAutoRename.o \ + FileStreams.o \ + FilterCoder.o \ + InBuffer.o \ + InOutTempBuffer.o \ + LimitedStreams.o \ + LockedStream.o \ + MethodId.o \ + MethodProps.o \ + OffsetStream.o \ + OutBuffer.o \ + ProgressUtils.o \ + StreamBinder.o \ + StreamObjects.o \ + StreamUtils.o \ + VirtThread.o \ + +# WorkDir.o +UI_COMMON_OBJS = \ + ArchiveCommandLine.o \ + ArchiveExtractCallback.o \ + ArchiveOpenCallback.o \ + Bench.o \ + DefaultName.o \ + EnumDirItems.o \ + Extract.o \ + ExtractingFilePath.o \ + LoadCodecs.o \ + OpenArchive.o \ + PropIDUtils.o \ + SetProperties.o \ + SortUtils.o \ + TempFiles.o \ + Update.o \ + UpdateAction.o \ + UpdateCallback.o \ + UpdatePair.o \ + UpdateProduce.o \ + +AR_OBJS = \ + LzmaHandler.o \ + SplitHandler.o \ + XzHandler.o \ + +AR_COMMON_OBJS = \ + CoderMixer2.o \ + CoderMixer2MT.o \ + CrossThreadProgress.o \ + DummyOutStream.o \ + HandlerOut.o \ + InStreamWithCRC.o \ + ItemNameUtils.o \ + MultiStream.o \ + OutStreamWithCRC.o \ + ParseProperties.o \ + +7Z_OBJS = \ + 7zCompressionMode.o \ + 7zDecode.o \ + 7zEncode.o \ + 7zExtract.o \ + 7zFolderInStream.o \ + 7zFolderOutStream.o \ + 7zHandler.o \ + 7zHandlerOut.o \ + 7zHeader.o \ + 7zIn.o \ + 7zOut.o \ + 7zProperties.o \ + 7zRegister.o \ + 7zSpecStream.o \ + 7zUpdate.o \ + +COMPRESS_OBJS = \ + Bcj2Coder.o \ + Bcj2Register.o \ + BcjCoder.o \ + BcjRegister.o \ + BranchCoder.o \ + BranchMisc.o \ + BranchRegister.o \ + ByteSwap.o \ + CopyCoder.o \ + CopyRegister.o \ + DeltaFilter.o \ + Lzma2Decoder.o \ + Lzma2Encoder.o \ + Lzma2Register.o \ + LzmaDecoder.o \ + LzmaEncoder.o \ + LzmaRegister.o \ + +C_OBJS = \ + 7zStream.o \ + Alloc.o \ + Bra.o \ + Bra86.o \ + BraIA64.o \ + Delta.o \ + LzFind.o \ + LzFindMt.o \ + Lzma2Dec.o \ + Lzma2Enc.o \ + LzmaDec.o \ + LzmaEnc.o \ + MtCoder.o \ + Sha256.o \ + Threads.o \ + Xz.o \ + XzCrc64.o \ + XzDec.o \ + XzEnc.o \ + XzIn.o \ + + +OBJS = \ + wine_date_and_time.o \ + myAddExeFlag.o \ + mySplitCommandLine.o \ + $(CONSOLE_OBJS) \ + $(COMMON_OBJS) \ + $(WIN_OBJS) \ + $(7ZIP_COMMON_OBJS) \ + $(UI_COMMON_OBJS) \ + $(AR_OBJS) \ + $(AR_COMMON_OBJS) \ + $(7Z_OBJS) \ + $(COMPRESS_OBJS) \ + $(C_OBJS) \ + $(OBJ_CRC32) \ + +include ../../../../makefile.glb + diff --git a/CPP/7zip/Bundles/Alone7z/makefile.depend b/CPP/7zip/Bundles/Alone7z/makefile.depend new file mode 100644 index 0000000..5bbfb08 --- /dev/null +++ b/CPP/7zip/Bundles/Alone7z/makefile.depend @@ -0,0 +1,2593 @@ +wine_date_and_time.o: ../../../myWindows/wine_date_and_time.cpp \ + ../../../myWindows/config.h ../../../include_windows/windows.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../include_windows/basetyps.h +myAddExeFlag.o: ../../../myWindows/myAddExeFlag.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../../myWindows/myPrivate.h ../../../Common/StringConvert.h \ + ../../../Common/MyWindows.h ../../../Common/MyString.h \ + ../../../Common/MyVector.h ../../../Common/Defs.h +mySplitCommandLine.o: ../../../myWindows/mySplitCommandLine.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../../myWindows/../Common/StringConvert.h \ + ../../../myWindows/../Common/MyWindows.h \ + ../../../myWindows/../Common/MyString.h \ + ../../../myWindows/../Common/MyVector.h \ + ../../../myWindows/../Common/Defs.h ../../../myWindows/../Common/Types.h \ + ../../../myWindows/myPrivate.h +BenchCon.o: ../../UI/Console/BenchCon.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h \ + ../../UI/Console/../../../Common/IntToString.h \ + ../../UI/Console/../../../Common/Types.h \ + ../../UI/Console/../../../Common/MyCom.h \ + ../../UI/Console/../../../Common/MyWindows.h \ + ../../UI/Console/../../../Windows/System.h \ + ../../UI/Console/../../../Windows/../Common/Types.h \ + ../../UI/Console/../Common/Bench.h \ + ../../UI/Console/../Common/../../Common/CreateCoder.h \ + ../../UI/Console/../Common/../../Common/../../Common/MyCom.h \ + ../../UI/Console/../Common/../../Common/../../Common/MyString.h \ + ../../UI/Console/../Common/../../Common/../../Common/MyVector.h \ + ../../UI/Console/../Common/../../Common/../../Common/Defs.h \ + ../../UI/Console/../Common/../../Common/../ICoder.h \ + ../../UI/Console/../Common/../../Common/../IStream.h \ + ../../UI/Console/../Common/../../Common/../../Common/MyUnknown.h \ + ../../UI/Console/../Common/../../Common/../../Common/MyWindows.h \ + ../../UI/Console/../Common/../../Common/../../Common/Types.h \ + ../../UI/Console/../Common/../../Common/../IDecl.h \ + ../../UI/Console/../Common/../../Common/MethodId.h \ + ../../UI/Console/../Common/../../Common/../../Common/Types.h \ + ../../UI/Console/BenchCon.h ../../UI/Console/../../Common/CreateCoder.h \ + ../../UI/Console/ConsoleClose.h +ConsoleClose.o: ../../UI/Console/ConsoleClose.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../UI/Console/ConsoleClose.h +ExtractCallbackConsole.o: ../../UI/Console/ExtractCallbackConsole.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../UI/Console/ExtractCallbackConsole.h ../../../Common/MyString.h \ + ../../../Common/MyVector.h ../../../Common/Defs.h \ + ../../../Common/StdOutStream.h \ + ../../UI/Console/../../Common/FileStreams.h \ + ../../UI/Console/../../Common/../../Windows/FileIO.h \ + ../../UI/Console/../../Common/../../Common/MyCom.h \ + ../../UI/Console/../../Common/../../Common/MyWindows.h \ + ../../UI/Console/../../Common/../IStream.h \ + ../../UI/Console/../../Common/../../Common/MyUnknown.h \ + ../../UI/Console/../../Common/../../Common/Types.h \ + ../../UI/Console/../../Common/../IDecl.h \ + ../../UI/Console/../../IPassword.h \ + ../../UI/Console/../../../Common/MyUnknown.h \ + ../../UI/Console/../../../Common/Types.h ../../UI/Console/../../IDecl.h \ + ../../UI/Console/../../Archive/IArchive.h \ + ../../UI/Console/../../Archive/../IProgress.h \ + ../../UI/Console/../../Archive/../../Common/MyUnknown.h \ + ../../UI/Console/../../Archive/../../Common/Types.h \ + ../../UI/Console/../../Archive/../IDecl.h \ + ../../UI/Console/../../Archive/../IStream.h \ + ../../UI/Console/../../Archive/../PropID.h \ + ../../UI/Console/../Common/ArchiveExtractCallback.h \ + ../../../Common/MyCom.h ../../../Common/Wildcard.h \ + ../../../Common/MyString.h ../../UI/Console/../Common/../../IPassword.h \ + ../../UI/Console/../Common/../../Common/FileStreams.h \ + ../../UI/Console/../Common/../../Common/ProgressUtils.h \ + ../../UI/Console/../Common/../../Common/../../Common/MyCom.h \ + ../../UI/Console/../Common/../../Common/../ICoder.h \ + ../../UI/Console/../Common/../../Common/../IStream.h \ + ../../UI/Console/../Common/../../Common/../IProgress.h \ + ../../UI/Console/../Common/../../Archive/IArchive.h \ + ../../UI/Console/../Common/../../Archive/Common/OutStreamWithCRC.h \ + ../../UI/Console/../Common/../../Archive/Common/../../../../C/7zCrc.h \ + ../../UI/Console/../Common/../../Archive/Common/../../../../C/Types.h \ + ../../UI/Console/../Common/../../Archive/Common/../../../Common/MyCom.h \ + ../../UI/Console/../Common/../../Archive/Common/../../IStream.h \ + ../../UI/Console/../Common/ExtractMode.h \ + ../../UI/Console/../Common/IFileExtractCallback.h \ + ../../UI/Console/../Common/../../IDecl.h \ + ../../UI/Console/../Common/OpenArchive.h ../../../Windows/FileFind.h \ + ../../../Windows/../Common/MyString.h ../../../Windows/FileName.h \ + ../../../Windows/../../C/Types.h ../../../Windows/Defs.h \ + ../../../Windows/../Common/MyWindows.h \ + ../../UI/Console/../Common/ArchiveOpenCallback.h \ + ../../UI/Console/../Common/LoadCodecs.h \ + ../../UI/Console/../Common/../../../Common/Types.h \ + ../../UI/Console/../Common/../../../Common/MyCom.h \ + ../../UI/Console/../Common/../../../Common/MyString.h \ + ../../UI/Console/../Common/../../../Common/Buffer.h \ + ../../UI/Console/../Common/../../../Common/Defs.h \ + ../../UI/Console/../Common/../../ICoder.h \ + ../../UI/Console/UserInputUtils.h ../../UI/Console/ConsoleClose.h \ + ../../../Windows/FileDir.h ../../../Windows/Time.h \ + ../../../Windows/Defs.h ../../../Windows/PropVariant.h \ + ../../../Windows/../Common/Types.h ../../../Windows/Error.h \ + ../../../Windows/PropVariantConversions.h \ + ../../UI/Console/../../Common/FilePathAutoRename.h \ + ../../UI/Console/../Common/ExtractingFilePath.h +List.o: ../../UI/Console/List.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../../Common/IntToString.h \ + ../../../Common/MyCom.h ../../../Common/MyWindows.h \ + ../../../Common/StdOutStream.h ../../../Common/StringConvert.h \ + ../../../Common/MyString.h ../../../Common/MyVector.h \ + ../../../Common/Defs.h ../../../Windows/Error.h \ + ../../../Common/MyString.h ../../../Windows/FileDir.h \ + ../../../Windows/../Common/MyString.h ../../../Windows/Defs.h \ + ../../../Windows/../Common/MyWindows.h ../../../Windows/PropVariant.h \ + ../../../Windows/../Common/Types.h \ + ../../../Windows/PropVariantConversions.h \ + ../../UI/Console/../../Archive/IArchive.h \ + ../../UI/Console/../../Archive/../IProgress.h \ + ../../UI/Console/../../Archive/../../Common/MyUnknown.h \ + ../../UI/Console/../../Archive/../../Common/MyWindows.h \ + ../../UI/Console/../../Archive/../../Common/Types.h \ + ../../UI/Console/../../Archive/../IDecl.h \ + ../../UI/Console/../../Archive/../IStream.h \ + ../../UI/Console/../../Archive/../PropID.h \ + ../../UI/Console/../Common/OpenArchive.h ../../../Windows/FileFind.h \ + ../../../Windows/FileName.h ../../../Windows/../../C/Types.h \ + ../../UI/Console/../Common/../../Archive/IArchive.h \ + ../../UI/Console/../Common/ArchiveOpenCallback.h \ + ../../UI/Console/../Common/LoadCodecs.h \ + ../../UI/Console/../Common/../../../Common/Types.h \ + ../../UI/Console/../Common/../../../Common/MyCom.h \ + ../../UI/Console/../Common/../../../Common/MyString.h \ + ../../UI/Console/../Common/../../../Common/Buffer.h \ + ../../UI/Console/../Common/../../../Common/Defs.h \ + ../../UI/Console/../Common/../../ICoder.h \ + ../../UI/Console/../Common/../../IStream.h \ + ../../UI/Console/../Common/PropIDUtils.h ../../UI/Console/ConsoleClose.h \ + ../../UI/Console/List.h ../../../Common/Wildcard.h \ + ../../UI/Console/../Common/LoadCodecs.h \ + ../../UI/Console/OpenCallbackConsole.h \ + ../../UI/Console/../Common/ArchiveOpenCallback.h +Main.o: ../../UI/Console/Main.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../UI/Console/../../../../C/Alloc.h \ + ../../../Common/MyInitGuid.h ../../../Common/CommandLineParser.h \ + ../../../Common/MyString.h ../../../Common/MyVector.h \ + ../../../Common/Defs.h ../../../Common/IntToString.h \ + ../../../Common/MyException.h ../../../Common/MyWindows.h \ + ../../../Common/StdOutStream.h ../../../Common/StringConvert.h \ + ../../../Common/StringToInt.h ../../../Windows/Error.h \ + ../../../Common/MyString.h \ + ../../UI/Console/../Common/ArchiveCommandLine.h \ + ../../../Common/Wildcard.h ../../UI/Console/../Common/Extract.h \ + ../../../Windows/FileFind.h ../../../Windows/../Common/MyString.h \ + ../../../Windows/FileName.h ../../../Windows/../../C/Types.h \ + ../../../Windows/Defs.h ../../../Windows/../Common/MyWindows.h \ + ../../UI/Console/../Common/../../Archive/IArchive.h \ + ../../UI/Console/../Common/../../Archive/../IProgress.h \ + ../../UI/Console/../Common/../../Archive/../../Common/MyUnknown.h \ + ../../UI/Console/../Common/../../Archive/../../Common/MyWindows.h \ + ../../UI/Console/../Common/../../Archive/../../Common/Types.h \ + ../../UI/Console/../Common/../../Archive/../IDecl.h \ + ../../UI/Console/../Common/../../Archive/../IStream.h \ + ../../UI/Console/../Common/../../Archive/../PropID.h \ + ../../UI/Console/../Common/ArchiveExtractCallback.h \ + ../../../Common/MyCom.h ../../UI/Console/../Common/../../IPassword.h \ + ../../UI/Console/../Common/../../../Common/MyUnknown.h \ + ../../UI/Console/../Common/../../../Common/Types.h \ + ../../UI/Console/../Common/../../IDecl.h \ + ../../UI/Console/../Common/../../Common/FileStreams.h \ + ../../UI/Console/../Common/../../Common/../../Windows/FileIO.h \ + ../../UI/Console/../Common/../../Common/../../Common/MyCom.h \ + ../../UI/Console/../Common/../../Common/../IStream.h \ + ../../UI/Console/../Common/../../Common/ProgressUtils.h \ + ../../UI/Console/../Common/../../Common/../ICoder.h \ + ../../UI/Console/../Common/../../Common/../IStream.h \ + ../../UI/Console/../Common/../../Common/../IProgress.h \ + ../../UI/Console/../Common/../../Archive/Common/OutStreamWithCRC.h \ + ../../UI/Console/../Common/../../Archive/Common/../../../../C/7zCrc.h \ + ../../UI/Console/../Common/../../Archive/Common/../../../../C/Types.h \ + ../../UI/Console/../Common/../../Archive/Common/../../../Common/MyCom.h \ + ../../UI/Console/../Common/../../Archive/Common/../../IStream.h \ + ../../UI/Console/../Common/ExtractMode.h \ + ../../UI/Console/../Common/IFileExtractCallback.h \ + ../../UI/Console/../Common/../../IDecl.h \ + ../../UI/Console/../Common/OpenArchive.h \ + ../../UI/Console/../Common/ArchiveOpenCallback.h \ + ../../UI/Console/../Common/LoadCodecs.h \ + ../../UI/Console/../Common/../../../Common/Types.h \ + ../../UI/Console/../Common/../../../Common/MyCom.h \ + ../../UI/Console/../Common/../../../Common/MyString.h \ + ../../UI/Console/../Common/../../../Common/Buffer.h \ + ../../UI/Console/../Common/../../../Common/Defs.h \ + ../../UI/Console/../Common/../../ICoder.h \ + ../../UI/Console/../Common/Property.h \ + ../../UI/Console/../Common/../Common/LoadCodecs.h \ + ../../UI/Console/../Common/Update.h \ + ../../UI/Console/../Common/UpdateAction.h \ + ../../UI/Console/../Common/UpdateCallback.h \ + ../../UI/Console/../Common/../Common/UpdatePair.h \ + ../../UI/Console/../Common/../Common/DirItem.h \ + ../../UI/Console/../Common/../Common/../../Archive/IArchive.h \ + ../../UI/Console/../Common/../Common/UpdateAction.h \ + ../../UI/Console/../Common/../Common/UpdateProduce.h \ + ../../UI/Console/../Common/../Common/UpdatePair.h \ + ../../UI/Console/../Common/ExitCode.h \ + ../../UI/Console/../Common/Extract.h ../../UI/Console/BenchCon.h \ + ../../UI/Console/../../Common/CreateCoder.h \ + ../../UI/Console/../../Common/../../Common/MyCom.h \ + ../../UI/Console/../../Common/../../Common/MyString.h \ + ../../UI/Console/../../Common/../ICoder.h \ + ../../UI/Console/../../Common/MethodId.h \ + ../../UI/Console/../../Common/../../Common/Types.h \ + ../../UI/Console/ExtractCallbackConsole.h \ + ../../UI/Console/../../Common/FileStreams.h \ + ../../UI/Console/../../IPassword.h \ + ../../UI/Console/../../Archive/IArchive.h \ + ../../UI/Console/../Common/ArchiveExtractCallback.h \ + ../../UI/Console/List.h ../../UI/Console/../Common/LoadCodecs.h \ + ../../UI/Console/OpenCallbackConsole.h \ + ../../UI/Console/../Common/ArchiveOpenCallback.h \ + ../../UI/Console/UpdateCallbackConsole.h \ + ../../UI/Console/../Common/Update.h ../../UI/Console/PercentPrinter.h \ + ../../UI/Console/../../MyVersion.h ../../../myWindows/myPrivate.h \ + ../../../Windows/System.h ../../../Windows/../Common/Types.h +MainAr.o: ../../UI/Console/MainAr.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../../Common/NewHandler.h \ + ../../../Common/MyException.h ../../../Common/MyWindows.h \ + ../../../Common/StdOutStream.h ../../../Windows/Error.h \ + ../../../Common/MyString.h ../../../Common/MyVector.h \ + ../../../Common/Defs.h ../../../Windows/NtCheck.h \ + ../../UI/Console/../Common/ArchiveCommandLine.h \ + ../../../Common/CommandLineParser.h ../../../Common/MyString.h \ + ../../../Common/Wildcard.h ../../UI/Console/../Common/Extract.h \ + ../../../Windows/FileFind.h ../../../Windows/../Common/MyString.h \ + ../../../Windows/FileName.h ../../../Windows/../../C/Types.h \ + ../../../Windows/Defs.h ../../../Windows/../Common/MyWindows.h \ + ../../UI/Console/../Common/../../Archive/IArchive.h \ + ../../UI/Console/../Common/../../Archive/../IProgress.h \ + ../../UI/Console/../Common/../../Archive/../../Common/MyUnknown.h \ + ../../UI/Console/../Common/../../Archive/../../Common/MyWindows.h \ + ../../UI/Console/../Common/../../Archive/../../Common/Types.h \ + ../../UI/Console/../Common/../../Archive/../IDecl.h \ + ../../UI/Console/../Common/../../Archive/../IStream.h \ + ../../UI/Console/../Common/../../Archive/../PropID.h \ + ../../UI/Console/../Common/ArchiveExtractCallback.h \ + ../../../Common/MyCom.h ../../UI/Console/../Common/../../IPassword.h \ + ../../UI/Console/../Common/../../../Common/MyUnknown.h \ + ../../UI/Console/../Common/../../../Common/Types.h \ + ../../UI/Console/../Common/../../IDecl.h \ + ../../UI/Console/../Common/../../Common/FileStreams.h \ + ../../UI/Console/../Common/../../Common/../../Windows/FileIO.h \ + ../../UI/Console/../Common/../../Common/../../Common/MyCom.h \ + ../../UI/Console/../Common/../../Common/../IStream.h \ + ../../UI/Console/../Common/../../Common/ProgressUtils.h \ + ../../UI/Console/../Common/../../Common/../ICoder.h \ + ../../UI/Console/../Common/../../Common/../IStream.h \ + ../../UI/Console/../Common/../../Common/../IProgress.h \ + ../../UI/Console/../Common/../../Archive/Common/OutStreamWithCRC.h \ + ../../UI/Console/../Common/../../Archive/Common/../../../../C/7zCrc.h \ + ../../UI/Console/../Common/../../Archive/Common/../../../../C/Types.h \ + ../../UI/Console/../Common/../../Archive/Common/../../../Common/MyCom.h \ + ../../UI/Console/../Common/../../Archive/Common/../../IStream.h \ + ../../UI/Console/../Common/ExtractMode.h \ + ../../UI/Console/../Common/IFileExtractCallback.h \ + ../../UI/Console/../Common/../../IDecl.h \ + ../../UI/Console/../Common/OpenArchive.h \ + ../../UI/Console/../Common/ArchiveOpenCallback.h \ + ../../UI/Console/../Common/LoadCodecs.h \ + ../../UI/Console/../Common/../../../Common/Types.h \ + ../../UI/Console/../Common/../../../Common/MyCom.h \ + ../../UI/Console/../Common/../../../Common/MyString.h \ + ../../UI/Console/../Common/../../../Common/Buffer.h \ + ../../UI/Console/../Common/../../../Common/Defs.h \ + ../../UI/Console/../Common/../../ICoder.h \ + ../../UI/Console/../Common/Property.h \ + ../../UI/Console/../Common/../Common/LoadCodecs.h \ + ../../UI/Console/../Common/Update.h \ + ../../UI/Console/../Common/UpdateAction.h \ + ../../UI/Console/../Common/UpdateCallback.h \ + ../../UI/Console/../Common/../Common/UpdatePair.h \ + ../../UI/Console/../Common/../Common/DirItem.h \ + ../../UI/Console/../Common/../Common/../../Archive/IArchive.h \ + ../../UI/Console/../Common/../Common/UpdateAction.h \ + ../../UI/Console/../Common/../Common/UpdateProduce.h \ + ../../UI/Console/../Common/../Common/UpdatePair.h \ + ../../UI/Console/../Common/ExitCode.h ../../UI/Console/ConsoleClose.h +OpenCallbackConsole.o: ../../UI/Console/OpenCallbackConsole.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../UI/Console/OpenCallbackConsole.h ../../../Common/StdOutStream.h \ + ../../UI/Console/../Common/ArchiveOpenCallback.h ../../../Common/MyCom.h \ + ../../../Common/MyWindows.h ../../../Common/MyString.h \ + ../../../Common/MyVector.h ../../../Common/Defs.h \ + ../../../Windows/FileFind.h ../../../Windows/../Common/MyString.h \ + ../../../Windows/FileName.h ../../../Windows/../../C/Types.h \ + ../../../Windows/Defs.h ../../../Windows/../Common/MyWindows.h \ + ../../UI/Console/../Common/../../Archive/IArchive.h \ + ../../UI/Console/../Common/../../Archive/../IProgress.h \ + ../../UI/Console/../Common/../../Archive/../../Common/MyUnknown.h \ + ../../UI/Console/../Common/../../Archive/../../Common/MyWindows.h \ + ../../UI/Console/../Common/../../Archive/../../Common/Types.h \ + ../../UI/Console/../Common/../../Archive/../IDecl.h \ + ../../UI/Console/../Common/../../Archive/../IStream.h \ + ../../UI/Console/../Common/../../Archive/../PropID.h \ + ../../UI/Console/ConsoleClose.h ../../UI/Console/UserInputUtils.h +PercentPrinter.o: ../../UI/Console/PercentPrinter.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../../Common/IntToString.h ../../../Common/MyString.h \ + ../../../Common/MyVector.h ../../../Common/Defs.h \ + ../../UI/Console/PercentPrinter.h ../../../Common/StdOutStream.h +UpdateCallbackConsole.o: ../../UI/Console/UpdateCallbackConsole.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../UI/Console/UpdateCallbackConsole.h ../../../Common/StdOutStream.h \ + ../../UI/Console/../Common/Update.h ../../../Common/Wildcard.h \ + ../../../Common/MyString.h ../../../Common/MyVector.h \ + ../../../Common/Defs.h ../../UI/Console/../Common/ArchiveOpenCallback.h \ + ../../../Common/MyCom.h ../../../Common/MyWindows.h \ + ../../../Common/MyString.h ../../../Windows/FileFind.h \ + ../../../Windows/../Common/MyString.h ../../../Windows/FileName.h \ + ../../../Windows/../../C/Types.h ../../../Windows/Defs.h \ + ../../../Windows/../Common/MyWindows.h \ + ../../UI/Console/../Common/../../Archive/IArchive.h \ + ../../UI/Console/../Common/../../Archive/../IProgress.h \ + ../../UI/Console/../Common/../../Archive/../../Common/MyUnknown.h \ + ../../UI/Console/../Common/../../Archive/../../Common/MyWindows.h \ + ../../UI/Console/../Common/../../Archive/../../Common/Types.h \ + ../../UI/Console/../Common/../../Archive/../IDecl.h \ + ../../UI/Console/../Common/../../Archive/../IStream.h \ + ../../UI/Console/../Common/../../Archive/../PropID.h \ + ../../UI/Console/../Common/LoadCodecs.h \ + ../../UI/Console/../Common/../../../Common/Types.h \ + ../../UI/Console/../Common/../../../Common/MyCom.h \ + ../../UI/Console/../Common/../../../Common/MyString.h \ + ../../UI/Console/../Common/../../../Common/Buffer.h \ + ../../UI/Console/../Common/../../../Common/Defs.h \ + ../../UI/Console/../Common/../../ICoder.h \ + ../../UI/Console/../Common/../../IStream.h \ + ../../UI/Console/../Common/Property.h \ + ../../UI/Console/../Common/UpdateAction.h \ + ../../UI/Console/../Common/UpdateCallback.h \ + ../../UI/Console/../Common/../../IPassword.h \ + ../../UI/Console/../Common/../../../Common/MyUnknown.h \ + ../../UI/Console/../Common/../../../Common/Types.h \ + ../../UI/Console/../Common/../../IDecl.h \ + ../../UI/Console/../Common/../Common/UpdatePair.h \ + ../../UI/Console/../Common/../Common/DirItem.h \ + ../../UI/Console/../Common/../Common/../../Archive/IArchive.h \ + ../../UI/Console/../Common/../Common/UpdateAction.h \ + ../../UI/Console/../Common/../Common/UpdateProduce.h \ + ../../UI/Console/../Common/../Common/UpdatePair.h \ + ../../UI/Console/PercentPrinter.h ../../../Windows/Error.h \ + ../../../Windows/Synchronization.h ../../../Windows/../../C/Threads.h \ + ../../../Windows/../../C/Types.h ../../../Windows/Synchronization2.h \ + ../../UI/Console/ConsoleClose.h ../../UI/Console/UserInputUtils.h +UserInputUtils.o: ../../UI/Console/UserInputUtils.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../../Common/StdInStream.h ../../../Common/MyString.h \ + ../../../Common/MyVector.h ../../../Common/Defs.h \ + ../../../Common/StringConvert.h ../../../Common/MyWindows.h \ + ../../UI/Console/UserInputUtils.h ../../../Common/StdOutStream.h \ + ../../../Common/MyException.h +CommandLineParser.o: ../../../Common/CommandLineParser.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../../Common/CommandLineParser.h ../../../Common/MyString.h \ + ../../../Common/MyVector.h ../../../Common/Defs.h +CRC.o: ../../../Common/CRC.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../../Common/../../C/7zCrc.h \ + ../../../Common/../../C/Types.h +IntToString.o: ../../../Common/IntToString.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../../Common/IntToString.h +ListFileUtils.o: ../../../Common/ListFileUtils.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../../Common/MyWindows.h ../../../Common/../Windows/FileIO.h \ + ../../../Common/MyString.h ../../../Common/MyVector.h \ + ../../../Common/Defs.h ../../../Common/ListFileUtils.h \ + ../../../Common/MyString.h ../../../Common/StringConvert.h \ + ../../../Common/UTFConvert.h +StdInStream.o: ../../../Common/StdInStream.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../../Common/StdInStream.h ../../../Common/MyString.h \ + ../../../Common/MyVector.h ../../../Common/Defs.h \ + ../../../Common/StringConvert.h ../../../Common/MyWindows.h \ + ../../../myWindows/myPrivate.h +StdOutStream.o: ../../../Common/StdOutStream.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../../Common/StdOutStream.h ../../../Common/IntToString.h \ + ../../../Common/StringConvert.h ../../../Common/MyWindows.h \ + ../../../Common/MyString.h ../../../Common/MyVector.h \ + ../../../Common/Defs.h +MyString.o: ../../../Common/MyString.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../../Common/StringConvert.h \ + ../../../Common/MyWindows.h ../../../Common/MyString.h \ + ../../../Common/MyVector.h ../../../Common/Defs.h \ + ../../../myWindows/myPrivate.h +MyWindows.o: ../../../Common/MyWindows.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../../Common/MyWindows.h +StringConvert.o: ../../../Common/StringConvert.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../../Common/StringConvert.h ../../../Common/MyWindows.h \ + ../../../Common/MyString.h ../../../Common/MyVector.h \ + ../../../Common/Defs.h +StringToInt.o: ../../../Common/StringToInt.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../../Common/StringToInt.h +UTFConvert.o: ../../../Common/UTFConvert.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../../Common/UTFConvert.h \ + ../../../Common/MyString.h ../../../Common/MyVector.h \ + ../../../Common/Defs.h +MyVector.o: ../../../Common/MyVector.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../../Common/MyVector.h \ + ../../../Common/Defs.h +Wildcard.o: ../../../Common/Wildcard.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../../Common/Wildcard.h \ + ../../../Common/MyString.h ../../../Common/MyVector.h \ + ../../../Common/Defs.h +Error.o: ../../../Windows/Error.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../../Windows/Error.h \ + ../../../Common/MyString.h ../../../Common/MyVector.h \ + ../../../Common/Defs.h ../../../Common/StringConvert.h \ + ../../../Common/MyWindows.h ../../../Common/MyString.h +FileDir.o: ../../../Windows/FileDir.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../../Windows/FileDir.h \ + ../../../Windows/../Common/MyString.h \ + ../../../Windows/../Common/MyVector.h ../../../Windows/../Common/Defs.h \ + ../../../Windows/Defs.h ../../../Windows/../Common/MyWindows.h \ + ../../../Windows/FileName.h ../../../Windows/../../C/Types.h \ + ../../../Windows/FileFind.h ../../../Windows/../Common/StringConvert.h \ + ../../../Windows/../Common/MyWindows.h \ + ../../../Windows/../Common/MyString.h ../../../Windows/../Common/Types.h \ + ../../../Windows/../Common/IntToString.h ../../../myWindows/myPrivate.h \ + ../../../Windows/Synchronization.h ../../../Windows/../../C/Threads.h \ + ../../../Windows/../../C/Types.h ../../../Windows/Synchronization2.h +FileFind.o: ../../../Windows/FileFind.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../../Windows/FileFind.h \ + ../../../Windows/../Common/MyString.h \ + ../../../Windows/../Common/MyVector.h ../../../Windows/../Common/Defs.h \ + ../../../Windows/FileName.h ../../../Windows/../../C/Types.h \ + ../../../Windows/Defs.h ../../../Windows/../Common/MyWindows.h \ + ../../../Windows/../Common/StringConvert.h \ + ../../../Windows/../Common/MyWindows.h \ + ../../../Windows/../Common/MyString.h ../../../Windows/../Common/Types.h \ + ../../../myWindows/myPrivate.h +FileIO.o: ../../../Windows/FileIO.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../../Windows/FileIO.h \ + ../../../Common/MyString.h ../../../Common/MyVector.h \ + ../../../Common/Defs.h ../../../Windows/Defs.h \ + ../../../Windows/../Common/MyWindows.h \ + ../../../Windows/../Common/StringConvert.h \ + ../../../Windows/../Common/MyWindows.h \ + ../../../Windows/../Common/MyString.h ../../../Windows/../Common/Types.h \ + ../../../myWindows/myPrivate.h +FileName.o: ../../../Windows/FileName.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../../Windows/FileName.h \ + ../../../Windows/../../C/Types.h ../../../Windows/../Common/MyString.h \ + ../../../Windows/../Common/MyVector.h ../../../Windows/../Common/Defs.h \ + ../../../Common/Wildcard.h ../../../Common/MyString.h +PropVariant.o: ../../../Windows/PropVariant.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../../Windows/PropVariant.h ../../../Windows/../Common/MyWindows.h \ + ../../../Windows/../Common/Types.h ../../../Windows/../Common/Defs.h +PropVariantConversions.o: ../../../Windows/PropVariantConversions.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../../Common/IntToString.h ../../../Common/StringConvert.h \ + ../../../Common/MyWindows.h ../../../Common/MyString.h \ + ../../../Common/MyVector.h ../../../Common/Defs.h \ + ../../../Windows/Defs.h ../../../Windows/../Common/MyWindows.h \ + ../../../Windows/PropVariantConversions.h ../../../Common/MyString.h +Synchronization.o: ../../../Windows/Synchronization.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../../Windows/Synchronization.h ../../../Windows/Defs.h \ + ../../../Windows/../Common/MyWindows.h \ + ../../../Windows/../../C/Threads.h ../../../Windows/../../C/Types.h \ + ../../../Windows/Synchronization2.h +System.o: ../../../Windows/System.cpp ../../../Common/Types.h \ + ../../../Common/../../C/Types.h +Time.o: ../../../Windows/Time.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../../Windows/Time.h \ + ../../../Windows/Defs.h ../../../Windows/../Common/MyWindows.h +CreateCoder.o: ../../Common/CreateCoder.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../Common/../../Windows/Defs.h \ + ../../Common/../../Windows/../Common/MyWindows.h \ + ../../Common/../../Windows/PropVariant.h \ + ../../Common/../../Windows/../Common/Types.h ../../Common/CreateCoder.h \ + ../../Common/../../Common/MyCom.h ../../Common/../../Common/MyWindows.h \ + ../../Common/../../Common/MyString.h \ + ../../Common/../../Common/MyVector.h ../../Common/../../Common/Defs.h \ + ../../Common/../ICoder.h ../../Common/../IStream.h \ + ../../Common/../../Common/MyUnknown.h ../../Common/../../Common/Types.h \ + ../../Common/../IDecl.h ../../Common/MethodId.h \ + ../../Common/../../Common/Types.h ../../Common/FilterCoder.h \ + ../../Common/../IPassword.h ../../Common/RegisterCodec.h \ + ../../Common/../Common/MethodId.h +CWrappers.o: ../../Common/CWrappers.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../Common/../../../C/Alloc.h \ + ../../Common/CWrappers.h ../../Common/../ICoder.h \ + ../../Common/../IStream.h ../../Common/../../Common/MyUnknown.h \ + ../../Common/../../Common/MyWindows.h ../../Common/../../Common/Types.h \ + ../../Common/../IDecl.h ../../Common/../../Common/MyCom.h \ + ../../Common/StreamUtils.h ../../Common/../IStream.h +FilePathAutoRename.o: ../../Common/FilePathAutoRename.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../../Common/Defs.h ../../../Common/IntToString.h \ + ../../../Windows/FileFind.h ../../../Windows/../Common/MyString.h \ + ../../../Windows/../Common/MyVector.h ../../../Windows/../Common/Defs.h \ + ../../../Windows/FileName.h ../../../Windows/../../C/Types.h \ + ../../../Windows/Defs.h ../../../Windows/../Common/MyWindows.h \ + ../../Common/FilePathAutoRename.h ../../../Common/MyString.h +FileStreams.o: ../../Common/FileStreams.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../Common/FileStreams.h \ + ../../Common/../../Windows/FileIO.h ../../../Common/MyString.h \ + ../../../Common/MyVector.h ../../../Common/Defs.h \ + ../../Common/../../Common/MyCom.h ../../Common/../../Common/MyWindows.h \ + ../../Common/../IStream.h ../../Common/../../Common/MyUnknown.h \ + ../../Common/../../Common/Types.h ../../Common/../IDecl.h +FilterCoder.o: ../../Common/FilterCoder.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../Common/../../../C/Alloc.h \ + ../../Common/../../Common/Defs.h ../../Common/FilterCoder.h \ + ../../Common/../../Common/MyCom.h ../../Common/../../Common/MyWindows.h \ + ../../Common/../ICoder.h ../../Common/../IStream.h \ + ../../Common/../../Common/MyUnknown.h ../../Common/../../Common/Types.h \ + ../../Common/../IDecl.h ../../Common/../IPassword.h \ + ../../Common/StreamUtils.h ../../Common/../IStream.h +InBuffer.o: ../../Common/InBuffer.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../Common/../../../C/Alloc.h \ + ../../Common/InBuffer.h ../../Common/../IStream.h \ + ../../Common/../../Common/MyUnknown.h \ + ../../Common/../../Common/MyWindows.h ../../Common/../../Common/Types.h \ + ../../Common/../IDecl.h ../../Common/../../Common/MyCom.h \ + ../../Common/../../Common/MyException.h +InOutTempBuffer.o: ../../Common/InOutTempBuffer.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../Common/../../../C/7zCrc.h ../../Common/../../../C/Types.h \ + ../../Common/InOutTempBuffer.h ../../Common/../../Common/MyCom.h \ + ../../Common/../../Common/MyWindows.h \ + ../../Common/../../Windows/FileDir.h \ + ../../Common/../../Windows/../Common/MyString.h \ + ../../Common/../../Windows/../Common/MyVector.h \ + ../../Common/../../Windows/../Common/Defs.h \ + ../../Common/../../Windows/Defs.h \ + ../../Common/../../Windows/../Common/MyWindows.h \ + ../../Common/../../Windows/FileIO.h ../../../Common/MyString.h \ + ../../Common/../IStream.h ../../Common/../../Common/MyUnknown.h \ + ../../Common/../../Common/Types.h ../../Common/../IDecl.h \ + ../../Common/StreamUtils.h +LimitedStreams.o: ../../Common/LimitedStreams.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../Common/LimitedStreams.h ../../Common/../../Common/MyCom.h \ + ../../Common/../../Common/MyWindows.h \ + ../../Common/../../Common/MyVector.h ../../Common/../../Common/Defs.h \ + ../../Common/../IStream.h ../../Common/../../Common/MyUnknown.h \ + ../../Common/../../Common/Types.h ../../Common/../IDecl.h \ + ../../Common/../../Common/Defs.h +LockedStream.o: ../../Common/LockedStream.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../Common/LockedStream.h \ + ../../Common/../../Windows/Synchronization.h \ + ../../Common/../../Windows/Defs.h \ + ../../Common/../../Windows/../Common/MyWindows.h \ + ../../Common/../../Windows/../../C/Threads.h \ + ../../Common/../../Windows/../../C/Types.h \ + ../../Common/../../Windows/Synchronization2.h \ + ../../Common/../../Common/MyCom.h ../../Common/../../Common/MyWindows.h \ + ../../Common/../IStream.h ../../Common/../../Common/MyUnknown.h \ + ../../Common/../../Common/Types.h ../../Common/../IDecl.h +MethodId.o: ../../Common/MethodId.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../Common/MethodId.h \ + ../../Common/../../Common/Types.h ../../Common/../../Common/MyString.h \ + ../../Common/../../Common/MyVector.h ../../Common/../../Common/Defs.h +MethodProps.o: ../../Common/MethodProps.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../Common/../../Common/MyCom.h \ + ../../Common/../../Common/MyWindows.h ../../Common/../ICoder.h \ + ../../Common/../IStream.h ../../Common/../../Common/MyUnknown.h \ + ../../Common/../../Common/Types.h ../../Common/../IDecl.h \ + ../../Common/MethodProps.h ../../Common/../../Common/MyVector.h \ + ../../Common/../../Common/Defs.h \ + ../../Common/../../Windows/PropVariant.h \ + ../../Common/../../Windows/../Common/MyWindows.h \ + ../../Common/../../Windows/../Common/Types.h ../../Common/MethodId.h \ + ../../Common/../../Common/Types.h +OffsetStream.o: ../../Common/OffsetStream.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../../Common/Defs.h \ + ../../Common/OffsetStream.h ../../../Common/MyCom.h \ + ../../../Common/MyWindows.h ../../Common/../IStream.h \ + ../../Common/../../Common/MyUnknown.h \ + ../../Common/../../Common/MyWindows.h ../../Common/../../Common/Types.h \ + ../../Common/../IDecl.h +OutBuffer.o: ../../Common/OutBuffer.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../Common/../../../C/Alloc.h \ + ../../Common/OutBuffer.h ../../Common/../IStream.h \ + ../../Common/../../Common/MyUnknown.h \ + ../../Common/../../Common/MyWindows.h ../../Common/../../Common/Types.h \ + ../../Common/../IDecl.h ../../Common/../../Common/MyCom.h \ + ../../Common/../../Common/MyException.h +OutMemStream.o: ../../Common/OutMemStream.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../Common/OutMemStream.h \ + ../../../Common/MyCom.h ../../../Common/MyWindows.h \ + ../../Common/MemBlocks.h ../../../Common/MyVector.h \ + ../../../Common/Defs.h ../../../Windows/Synchronization.h \ + ../../../Windows/Defs.h ../../../Windows/../Common/MyWindows.h \ + ../../../Windows/../../C/Threads.h ../../../Windows/../../C/Types.h \ + ../../../Windows/Synchronization2.h ../../Common/../IStream.h \ + ../../Common/../../Common/MyUnknown.h \ + ../../Common/../../Common/MyWindows.h ../../Common/../../Common/Types.h \ + ../../Common/../IDecl.h +ProgressUtils.o: ../../Common/ProgressUtils.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../Common/ProgressUtils.h ../../Common/../../Common/MyCom.h \ + ../../Common/../../Common/MyWindows.h ../../Common/../ICoder.h \ + ../../Common/../IStream.h ../../Common/../../Common/MyUnknown.h \ + ../../Common/../../Common/Types.h ../../Common/../IDecl.h \ + ../../Common/../IProgress.h +StreamBinder.o: ../../Common/StreamBinder.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../Common/StreamBinder.h \ + ../../Common/../IStream.h ../../Common/../../Common/MyUnknown.h \ + ../../Common/../../Common/MyWindows.h ../../Common/../../Common/Types.h \ + ../../Common/../IDecl.h ../../Common/../../Windows/Synchronization.h \ + ../../Common/../../Windows/Defs.h \ + ../../Common/../../Windows/../Common/MyWindows.h \ + ../../Common/../../Windows/../../C/Threads.h \ + ../../Common/../../Windows/../../C/Types.h \ + ../../Common/../../Windows/Synchronization2.h \ + ../../Common/../../Common/Defs.h ../../Common/../../Common/MyCom.h +StreamObjects.o: ../../Common/StreamObjects.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../Common/../../../C/Alloc.h ../../Common/StreamObjects.h \ + ../../Common/../../Common/Buffer.h ../../Common/../../Common/Defs.h \ + ../../Common/../../Common/MyCom.h ../../Common/../../Common/MyWindows.h \ + ../../Common/../IStream.h ../../Common/../../Common/MyUnknown.h \ + ../../Common/../../Common/Types.h ../../Common/../IDecl.h +StreamUtils.o: ../../Common/StreamUtils.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../Common/StreamUtils.h \ + ../../Common/../IStream.h ../../Common/../../Common/MyUnknown.h \ + ../../Common/../../Common/MyWindows.h ../../Common/../../Common/Types.h \ + ../../Common/../IDecl.h +VirtThread.o: ../../Common/VirtThread.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../Common/VirtThread.h \ + ../../Common/../../Windows/Synchronization.h \ + ../../Common/../../Windows/Defs.h \ + ../../Common/../../Windows/../Common/MyWindows.h \ + ../../Common/../../Windows/../../C/Threads.h \ + ../../Common/../../Windows/../../C/Types.h \ + ../../Common/../../Windows/Synchronization2.h \ + ../../Common/../../Windows/Thread.h +ArchiveCommandLine.o: ../../UI/Common/ArchiveCommandLine.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../../Common/ListFileUtils.h ../../../Common/MyString.h \ + ../../../Common/MyVector.h ../../../Common/Defs.h \ + ../../../Common/StringConvert.h ../../../Common/MyWindows.h \ + ../../../Common/StringToInt.h ../../../Windows/FileDir.h \ + ../../../Windows/../Common/MyString.h ../../../Windows/Defs.h \ + ../../../Windows/../Common/MyWindows.h ../../../Windows/FileName.h \ + ../../../Windows/../../C/Types.h ../../../myWindows/myPrivate.h \ + ../../UI/Common/ArchiveCommandLine.h ../../../Common/CommandLineParser.h \ + ../../../Common/Wildcard.h ../../UI/Common/Extract.h \ + ../../../Windows/FileFind.h ../../../Windows/FileName.h \ + ../../UI/Common/../../Archive/IArchive.h \ + ../../UI/Common/../../Archive/../IProgress.h \ + ../../UI/Common/../../Archive/../../Common/MyUnknown.h \ + ../../UI/Common/../../Archive/../../Common/MyWindows.h \ + ../../UI/Common/../../Archive/../../Common/Types.h \ + ../../UI/Common/../../Archive/../IDecl.h \ + ../../UI/Common/../../Archive/../IStream.h \ + ../../UI/Common/../../Archive/../PropID.h \ + ../../UI/Common/ArchiveExtractCallback.h ../../../Common/MyCom.h \ + ../../UI/Common/../../IPassword.h \ + ../../UI/Common/../../../Common/MyUnknown.h \ + ../../UI/Common/../../../Common/Types.h ../../UI/Common/../../IDecl.h \ + ../../UI/Common/../../Common/FileStreams.h \ + ../../UI/Common/../../Common/../../Windows/FileIO.h \ + ../../../Common/MyString.h \ + ../../UI/Common/../../Common/../../Common/MyCom.h \ + ../../UI/Common/../../Common/../IStream.h \ + ../../UI/Common/../../Common/ProgressUtils.h \ + ../../UI/Common/../../Common/../ICoder.h \ + ../../UI/Common/../../Common/../IStream.h \ + ../../UI/Common/../../Common/../IProgress.h \ + ../../UI/Common/../../Archive/Common/OutStreamWithCRC.h \ + ../../UI/Common/../../Archive/Common/../../../../C/7zCrc.h \ + ../../UI/Common/../../Archive/Common/../../../../C/Types.h \ + ../../UI/Common/../../Archive/Common/../../../Common/MyCom.h \ + ../../UI/Common/../../Archive/Common/../../IStream.h \ + ../../UI/Common/ExtractMode.h ../../UI/Common/IFileExtractCallback.h \ + ../../UI/Common/../../IDecl.h ../../UI/Common/OpenArchive.h \ + ../../UI/Common/ArchiveOpenCallback.h ../../UI/Common/LoadCodecs.h \ + ../../UI/Common/../../../Common/Types.h \ + ../../UI/Common/../../../Common/MyCom.h \ + ../../UI/Common/../../../Common/MyString.h \ + ../../UI/Common/../../../Common/Buffer.h \ + ../../UI/Common/../../../Common/Defs.h ../../UI/Common/../../ICoder.h \ + ../../UI/Common/Property.h ../../UI/Common/../Common/LoadCodecs.h \ + ../../UI/Common/Update.h ../../UI/Common/UpdateAction.h \ + ../../UI/Common/UpdateCallback.h ../../UI/Common/../Common/UpdatePair.h \ + ../../UI/Common/../Common/DirItem.h \ + ../../UI/Common/../Common/../../Archive/IArchive.h \ + ../../UI/Common/../Common/UpdateAction.h \ + ../../UI/Common/../Common/UpdateProduce.h \ + ../../UI/Common/../Common/UpdatePair.h ../../UI/Common/EnumDirItems.h \ + ../../UI/Common/DirItem.h ../../UI/Common/SortUtils.h +ArchiveExtractCallback.o: ../../UI/Common/ArchiveExtractCallback.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../../Common/ComTry.h ../../../Common/MyWindows.h \ + ../../../Common/Wildcard.h ../../../Common/MyString.h \ + ../../../Common/MyVector.h ../../../Common/Defs.h \ + ../../../Windows/FileDir.h ../../../Windows/../Common/MyString.h \ + ../../../Windows/Defs.h ../../../Windows/../Common/MyWindows.h \ + ../../../Windows/FileFind.h ../../../Windows/FileName.h \ + ../../../Windows/../../C/Types.h ../../../Windows/PropVariant.h \ + ../../../Windows/../Common/Types.h \ + ../../../Windows/PropVariantConversions.h ../../../Common/MyString.h \ + ../../UI/Common/../../Common/FilePathAutoRename.h \ + ../../UI/Common/../Common/ExtractingFilePath.h \ + ../../UI/Common/ArchiveExtractCallback.h ../../../Common/MyCom.h \ + ../../UI/Common/../../IPassword.h \ + ../../UI/Common/../../../Common/MyUnknown.h \ + ../../UI/Common/../../../Common/MyWindows.h \ + ../../UI/Common/../../../Common/Types.h ../../UI/Common/../../IDecl.h \ + ../../UI/Common/../../Common/FileStreams.h \ + ../../UI/Common/../../Common/../../Windows/FileIO.h \ + ../../UI/Common/../../Common/../../Common/MyCom.h \ + ../../UI/Common/../../Common/../IStream.h \ + ../../UI/Common/../../Common/../../Common/MyUnknown.h \ + ../../UI/Common/../../Common/../../Common/Types.h \ + ../../UI/Common/../../Common/../IDecl.h \ + ../../UI/Common/../../Common/ProgressUtils.h \ + ../../UI/Common/../../Common/../ICoder.h \ + ../../UI/Common/../../Common/../IStream.h \ + ../../UI/Common/../../Common/../IProgress.h \ + ../../UI/Common/../../Archive/IArchive.h \ + ../../UI/Common/../../Archive/../IProgress.h \ + ../../UI/Common/../../Archive/../IStream.h \ + ../../UI/Common/../../Archive/../PropID.h \ + ../../UI/Common/../../Archive/Common/OutStreamWithCRC.h \ + ../../UI/Common/../../Archive/Common/../../../../C/7zCrc.h \ + ../../UI/Common/../../Archive/Common/../../../../C/Types.h \ + ../../UI/Common/../../Archive/Common/../../../Common/MyCom.h \ + ../../UI/Common/../../Archive/Common/../../IStream.h \ + ../../UI/Common/ExtractMode.h ../../UI/Common/IFileExtractCallback.h \ + ../../UI/Common/../../IDecl.h ../../UI/Common/OpenArchive.h \ + ../../UI/Common/ArchiveOpenCallback.h ../../UI/Common/LoadCodecs.h \ + ../../UI/Common/../../../Common/Types.h \ + ../../UI/Common/../../../Common/MyCom.h \ + ../../UI/Common/../../../Common/MyString.h \ + ../../UI/Common/../../../Common/Buffer.h \ + ../../UI/Common/../../../Common/Defs.h ../../UI/Common/../../ICoder.h +ArchiveOpenCallback.o: ../../UI/Common/ArchiveOpenCallback.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../../Common/StringConvert.h ../../../Common/MyWindows.h \ + ../../../Common/MyString.h ../../../Common/MyVector.h \ + ../../../Common/Defs.h ../../../Common/ComTry.h \ + ../../../Windows/PropVariant.h ../../../Windows/../Common/MyWindows.h \ + ../../../Windows/../Common/Types.h \ + ../../UI/Common/../../Common/FileStreams.h \ + ../../UI/Common/../../Common/../../Windows/FileIO.h \ + ../../../Common/MyString.h \ + ../../UI/Common/../../Common/../../Common/MyCom.h \ + ../../UI/Common/../../Common/../../Common/MyWindows.h \ + ../../UI/Common/../../Common/../IStream.h \ + ../../UI/Common/../../Common/../../Common/MyUnknown.h \ + ../../UI/Common/../../Common/../../Common/Types.h \ + ../../UI/Common/../../Common/../IDecl.h \ + ../../UI/Common/ArchiveOpenCallback.h ../../../Common/MyCom.h \ + ../../../Windows/FileFind.h ../../../Windows/../Common/MyString.h \ + ../../../Windows/FileName.h ../../../Windows/../../C/Types.h \ + ../../../Windows/Defs.h ../../UI/Common/../../Archive/IArchive.h \ + ../../UI/Common/../../Archive/../IProgress.h \ + ../../UI/Common/../../Archive/../../Common/MyUnknown.h \ + ../../UI/Common/../../Archive/../../Common/Types.h \ + ../../UI/Common/../../Archive/../IDecl.h \ + ../../UI/Common/../../Archive/../IStream.h \ + ../../UI/Common/../../Archive/../PropID.h +Bench.o: ../../UI/Common/Bench.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../UI/Common/Bench.h \ + ../../UI/Common/../../Common/CreateCoder.h \ + ../../UI/Common/../../Common/../../Common/MyCom.h \ + ../../UI/Common/../../Common/../../Common/MyWindows.h \ + ../../UI/Common/../../Common/../../Common/MyString.h \ + ../../UI/Common/../../Common/../../Common/MyVector.h \ + ../../UI/Common/../../Common/../../Common/Defs.h \ + ../../UI/Common/../../Common/../ICoder.h \ + ../../UI/Common/../../Common/../IStream.h \ + ../../UI/Common/../../Common/../../Common/MyUnknown.h \ + ../../UI/Common/../../Common/../../Common/Types.h \ + ../../UI/Common/../../Common/../IDecl.h \ + ../../UI/Common/../../Common/MethodId.h \ + ../../UI/Common/../../Common/../../Common/Types.h \ + ../../UI/Common/../../../../C/7zCrc.h \ + ../../UI/Common/../../../../C/Types.h \ + ../../UI/Common/../../../../C/Alloc.h \ + ../../UI/Common/../../../Windows/Synchronization.h \ + ../../UI/Common/../../../Windows/Defs.h \ + ../../UI/Common/../../../Windows/../Common/MyWindows.h \ + ../../UI/Common/../../../Windows/../../C/Threads.h \ + ../../UI/Common/../../../Windows/../../C/Types.h \ + ../../UI/Common/../../../Windows/Synchronization2.h \ + ../../UI/Common/../../../Windows/Thread.h \ + ../../UI/Common/../../../Windows/PropVariant.h \ + ../../UI/Common/../../../Windows/../Common/Types.h +DefaultName.o: ../../UI/Common/DefaultName.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../UI/Common/DefaultName.h ../../../Common/MyString.h \ + ../../../Common/MyVector.h ../../../Common/Defs.h +EnumDirItems.o: ../../UI/Common/EnumDirItems.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../UI/Common/EnumDirItems.h ../../../Common/Wildcard.h \ + ../../../Common/MyString.h ../../../Common/MyVector.h \ + ../../../Common/Defs.h ../../../Windows/FileFind.h \ + ../../../Windows/../Common/MyString.h ../../../Windows/FileName.h \ + ../../../Windows/../../C/Types.h ../../../Windows/Defs.h \ + ../../../Windows/../Common/MyWindows.h ../../UI/Common/DirItem.h \ + ../../../Common/MyString.h ../../UI/Common/../../Archive/IArchive.h \ + ../../UI/Common/../../Archive/../IProgress.h \ + ../../UI/Common/../../Archive/../../Common/MyUnknown.h \ + ../../UI/Common/../../Archive/../../Common/MyWindows.h \ + ../../UI/Common/../../Archive/../../Common/Types.h \ + ../../UI/Common/../../Archive/../IDecl.h \ + ../../UI/Common/../../Archive/../IStream.h \ + ../../UI/Common/../../Archive/../PropID.h +Extract.o: ../../UI/Common/Extract.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../../Windows/FileDir.h \ + ../../../Windows/../Common/MyString.h \ + ../../../Windows/../Common/MyVector.h ../../../Windows/../Common/Defs.h \ + ../../../Windows/Defs.h ../../../Windows/../Common/MyWindows.h \ + ../../../Windows/PropVariant.h ../../../Windows/../Common/Types.h \ + ../../../Windows/PropVariantConversions.h ../../../Common/MyString.h \ + ../../UI/Common/../Common/ExtractingFilePath.h ../../UI/Common/Extract.h \ + ../../../Windows/FileFind.h ../../../Windows/FileName.h \ + ../../../Windows/../../C/Types.h \ + ../../UI/Common/../../Archive/IArchive.h \ + ../../UI/Common/../../Archive/../IProgress.h \ + ../../UI/Common/../../Archive/../../Common/MyUnknown.h \ + ../../UI/Common/../../Archive/../../Common/MyWindows.h \ + ../../UI/Common/../../Archive/../../Common/Types.h \ + ../../UI/Common/../../Archive/../IDecl.h \ + ../../UI/Common/../../Archive/../IStream.h \ + ../../UI/Common/../../Archive/../PropID.h \ + ../../UI/Common/ArchiveExtractCallback.h ../../../Common/MyCom.h \ + ../../../Common/MyWindows.h ../../../Common/Wildcard.h \ + ../../../Common/MyString.h ../../UI/Common/../../IPassword.h \ + ../../UI/Common/../../../Common/MyUnknown.h \ + ../../UI/Common/../../../Common/Types.h ../../UI/Common/../../IDecl.h \ + ../../UI/Common/../../Common/FileStreams.h \ + ../../UI/Common/../../Common/../../Windows/FileIO.h \ + ../../UI/Common/../../Common/../../Common/MyCom.h \ + ../../UI/Common/../../Common/../IStream.h \ + ../../UI/Common/../../Common/ProgressUtils.h \ + ../../UI/Common/../../Common/../ICoder.h \ + ../../UI/Common/../../Common/../IStream.h \ + ../../UI/Common/../../Common/../IProgress.h \ + ../../UI/Common/../../Archive/Common/OutStreamWithCRC.h \ + ../../UI/Common/../../Archive/Common/../../../../C/7zCrc.h \ + ../../UI/Common/../../Archive/Common/../../../../C/Types.h \ + ../../UI/Common/../../Archive/Common/../../../Common/MyCom.h \ + ../../UI/Common/../../Archive/Common/../../IStream.h \ + ../../UI/Common/ExtractMode.h ../../UI/Common/IFileExtractCallback.h \ + ../../UI/Common/../../IDecl.h ../../UI/Common/OpenArchive.h \ + ../../UI/Common/ArchiveOpenCallback.h ../../UI/Common/LoadCodecs.h \ + ../../UI/Common/../../../Common/Types.h \ + ../../UI/Common/../../../Common/MyCom.h \ + ../../UI/Common/../../../Common/MyString.h \ + ../../UI/Common/../../../Common/Buffer.h \ + ../../UI/Common/../../../Common/Defs.h ../../UI/Common/../../ICoder.h \ + ../../UI/Common/Property.h ../../UI/Common/../Common/LoadCodecs.h \ + ../../UI/Common/SetProperties.h +ExtractingFilePath.o: ../../UI/Common/ExtractingFilePath.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../UI/Common/../../../../C/Types.h ../../../Common/Wildcard.h \ + ../../../Common/MyString.h ../../../Common/MyVector.h \ + ../../../Common/Defs.h ../../UI/Common/ExtractingFilePath.h \ + ../../../Common/MyString.h +LoadCodecs.o: ../../UI/Common/LoadCodecs.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../UI/Common/LoadCodecs.h \ + ../../UI/Common/../../../Common/Types.h \ + ../../UI/Common/../../../Common/MyCom.h \ + ../../UI/Common/../../../Common/MyWindows.h \ + ../../UI/Common/../../../Common/MyString.h \ + ../../UI/Common/../../../Common/MyVector.h \ + ../../UI/Common/../../../Common/Defs.h \ + ../../UI/Common/../../../Common/Buffer.h ../../UI/Common/../../ICoder.h \ + ../../UI/Common/../../IStream.h \ + ../../UI/Common/../../../Common/MyUnknown.h \ + ../../UI/Common/../../../Common/Types.h ../../UI/Common/../../IDecl.h \ + ../../UI/Common/../../Archive/IArchive.h \ + ../../UI/Common/../../Archive/../IProgress.h \ + ../../UI/Common/../../Archive/../../Common/MyUnknown.h \ + ../../UI/Common/../../Archive/../../Common/Types.h \ + ../../UI/Common/../../Archive/../IDecl.h \ + ../../UI/Common/../../Archive/../IStream.h \ + ../../UI/Common/../../Archive/../PropID.h \ + ../../UI/Common/../../../Windows/PropVariant.h \ + ../../UI/Common/../../../Windows/../Common/MyWindows.h \ + ../../UI/Common/../../../Windows/../Common/Types.h \ + ../../UI/Common/../../Common/RegisterArc.h \ + ../../UI/Common/../../Common/../Archive/IArchive.h +OpenArchive.o: ../../UI/Common/OpenArchive.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../../Common/Wildcard.h ../../../Common/MyString.h \ + ../../../Common/MyVector.h ../../../Common/Defs.h \ + ../../../Windows/FileDir.h ../../../Windows/../Common/MyString.h \ + ../../../Windows/Defs.h ../../../Windows/../Common/MyWindows.h \ + ../../../Windows/PropVariant.h ../../../Windows/../Common/Types.h \ + ../../UI/Common/../../Common/FileStreams.h \ + ../../UI/Common/../../Common/../../Windows/FileIO.h \ + ../../../Common/MyString.h \ + ../../UI/Common/../../Common/../../Common/MyCom.h \ + ../../UI/Common/../../Common/../../Common/MyWindows.h \ + ../../UI/Common/../../Common/../IStream.h \ + ../../UI/Common/../../Common/../../Common/MyUnknown.h \ + ../../UI/Common/../../Common/../../Common/Types.h \ + ../../UI/Common/../../Common/../IDecl.h \ + ../../UI/Common/../../Common/StreamUtils.h ../../UI/Common/DefaultName.h \ + ../../UI/Common/OpenArchive.h ../../../Windows/FileFind.h \ + ../../../Windows/FileName.h ../../../Windows/../../C/Types.h \ + ../../UI/Common/../../Archive/IArchive.h \ + ../../UI/Common/../../Archive/../IProgress.h \ + ../../UI/Common/../../Archive/../../Common/MyUnknown.h \ + ../../UI/Common/../../Archive/../../Common/Types.h \ + ../../UI/Common/../../Archive/../IDecl.h \ + ../../UI/Common/../../Archive/../IStream.h \ + ../../UI/Common/../../Archive/../PropID.h \ + ../../UI/Common/ArchiveOpenCallback.h ../../../Common/MyCom.h \ + ../../UI/Common/LoadCodecs.h ../../UI/Common/../../../Common/Types.h \ + ../../UI/Common/../../../Common/MyCom.h \ + ../../UI/Common/../../../Common/MyString.h \ + ../../UI/Common/../../../Common/Buffer.h \ + ../../UI/Common/../../../Common/Defs.h ../../UI/Common/../../ICoder.h \ + ../../UI/Common/../../IStream.h +PropIDUtils.o: ../../UI/Common/PropIDUtils.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../../Common/IntToString.h ../../../Windows/FileFind.h \ + ../../../Windows/../Common/MyString.h \ + ../../../Windows/../Common/MyVector.h ../../../Windows/../Common/Defs.h \ + ../../../Windows/FileName.h ../../../Windows/../../C/Types.h \ + ../../../Windows/Defs.h ../../../Windows/../Common/MyWindows.h \ + ../../../Windows/PropVariantConversions.h ../../../Common/MyString.h \ + ../../UI/Common/../../PropID.h ../../UI/Common/PropIDUtils.h +SetProperties.o: ../../UI/Common/SetProperties.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../UI/Common/SetProperties.h ../../UI/Common/Property.h \ + ../../../Common/MyString.h ../../../Common/MyVector.h \ + ../../../Common/Defs.h ../../../Windows/PropVariant.h \ + ../../../Windows/../Common/MyWindows.h \ + ../../../Windows/../Common/Types.h ../../../Common/StringToInt.h \ + ../../../Common/MyCom.h ../../../Common/MyWindows.h \ + ../../UI/Common/../../Archive/IArchive.h \ + ../../UI/Common/../../Archive/../IProgress.h \ + ../../UI/Common/../../Archive/../../Common/MyUnknown.h \ + ../../UI/Common/../../Archive/../../Common/MyWindows.h \ + ../../UI/Common/../../Archive/../../Common/Types.h \ + ../../UI/Common/../../Archive/../IDecl.h \ + ../../UI/Common/../../Archive/../IStream.h \ + ../../UI/Common/../../Archive/../PropID.h +SortUtils.o: ../../UI/Common/SortUtils.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../UI/Common/SortUtils.h \ + ../../../Common/MyString.h ../../../Common/MyVector.h \ + ../../../Common/Defs.h ../../../Common/Wildcard.h \ + ../../../Common/MyString.h +TempFiles.o: ../../UI/Common/TempFiles.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../UI/Common/TempFiles.h \ + ../../../Common/MyString.h ../../../Common/MyVector.h \ + ../../../Common/Defs.h ../../../Windows/FileDir.h \ + ../../../Windows/../Common/MyString.h ../../../Windows/Defs.h \ + ../../../Windows/../Common/MyWindows.h ../../../Windows/FileIO.h +Update.o: ../../UI/Common/Update.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../UI/Common/Update.h \ + ../../../Common/Wildcard.h ../../../Common/MyString.h \ + ../../../Common/MyVector.h ../../../Common/Defs.h \ + ../../UI/Common/ArchiveOpenCallback.h ../../../Common/MyCom.h \ + ../../../Common/MyWindows.h ../../../Common/MyString.h \ + ../../../Windows/FileFind.h ../../../Windows/../Common/MyString.h \ + ../../../Windows/FileName.h ../../../Windows/../../C/Types.h \ + ../../../Windows/Defs.h ../../../Windows/../Common/MyWindows.h \ + ../../UI/Common/../../Archive/IArchive.h \ + ../../UI/Common/../../Archive/../IProgress.h \ + ../../UI/Common/../../Archive/../../Common/MyUnknown.h \ + ../../UI/Common/../../Archive/../../Common/MyWindows.h \ + ../../UI/Common/../../Archive/../../Common/Types.h \ + ../../UI/Common/../../Archive/../IDecl.h \ + ../../UI/Common/../../Archive/../IStream.h \ + ../../UI/Common/../../Archive/../PropID.h ../../UI/Common/LoadCodecs.h \ + ../../UI/Common/../../../Common/Types.h \ + ../../UI/Common/../../../Common/MyCom.h \ + ../../UI/Common/../../../Common/MyString.h \ + ../../UI/Common/../../../Common/Buffer.h \ + ../../UI/Common/../../../Common/Defs.h ../../UI/Common/../../ICoder.h \ + ../../UI/Common/../../IStream.h ../../UI/Common/Property.h \ + ../../UI/Common/UpdateAction.h ../../UI/Common/UpdateCallback.h \ + ../../UI/Common/../../IPassword.h \ + ../../UI/Common/../../../Common/MyUnknown.h \ + ../../UI/Common/../../../Common/Types.h ../../UI/Common/../../IDecl.h \ + ../../UI/Common/../Common/UpdatePair.h \ + ../../UI/Common/../Common/DirItem.h \ + ../../UI/Common/../Common/../../Archive/IArchive.h \ + ../../UI/Common/../Common/UpdateAction.h \ + ../../UI/Common/../Common/UpdateProduce.h \ + ../../UI/Common/../Common/UpdatePair.h ../../../Common/IntToString.h \ + ../../../Common/StringConvert.h ../../../Windows/FileDir.h \ + ../../../Windows/FileName.h ../../../Windows/PropVariant.h \ + ../../../Windows/../Common/Types.h \ + ../../../Windows/PropVariantConversions.h ../../../Windows/Time.h \ + ../../UI/Common/../../Common/FileStreams.h \ + ../../UI/Common/../../Common/../../Windows/FileIO.h \ + ../../UI/Common/../../Common/../../Common/MyCom.h \ + ../../UI/Common/../../Common/../IStream.h \ + ../../UI/Common/../../Compress/CopyCoder.h \ + ../../UI/Common/../../Compress/../../Common/MyCom.h \ + ../../UI/Common/../../Compress/../ICoder.h \ + ../../UI/Common/../Common/DirItem.h \ + ../../UI/Common/../Common/EnumDirItems.h \ + ../../UI/Common/../Common/OpenArchive.h \ + ../../UI/Common/../Common/ArchiveOpenCallback.h \ + ../../UI/Common/../Common/LoadCodecs.h ../../UI/Common/EnumDirItems.h \ + ../../UI/Common/SetProperties.h ../../UI/Common/TempFiles.h +UpdateAction.o: ../../UI/Common/UpdateAction.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../UI/Common/UpdateAction.h +UpdateCallback.o: ../../UI/Common/UpdateCallback.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../../Common/ComTry.h ../../../Common/MyWindows.h \ + ../../../Common/Defs.h ../../../Common/IntToString.h \ + ../../../Common/StringConvert.h ../../../Common/MyString.h \ + ../../../Common/MyVector.h ../../../Common/Defs.h \ + ../../../Windows/PropVariant.h ../../../Windows/../Common/MyWindows.h \ + ../../../Windows/../Common/Types.h \ + ../../UI/Common/../../Common/FileStreams.h \ + ../../UI/Common/../../Common/../../Windows/FileIO.h \ + ../../../Common/MyString.h \ + ../../UI/Common/../../Common/../../Common/MyCom.h \ + ../../UI/Common/../../Common/../../Common/MyWindows.h \ + ../../UI/Common/../../Common/../IStream.h \ + ../../UI/Common/../../Common/../../Common/MyUnknown.h \ + ../../UI/Common/../../Common/../../Common/Types.h \ + ../../UI/Common/../../Common/../IDecl.h ../../UI/Common/UpdateCallback.h \ + ../../../Common/MyCom.h ../../UI/Common/../../IPassword.h \ + ../../UI/Common/../../../Common/MyUnknown.h \ + ../../UI/Common/../../../Common/Types.h ../../UI/Common/../../IDecl.h \ + ../../UI/Common/../../ICoder.h ../../UI/Common/../../IStream.h \ + ../../UI/Common/../Common/UpdatePair.h \ + ../../UI/Common/../Common/DirItem.h \ + ../../UI/Common/../Common/../../Archive/IArchive.h \ + ../../UI/Common/../Common/../../Archive/../IProgress.h \ + ../../UI/Common/../Common/../../Archive/../../Common/MyUnknown.h \ + ../../UI/Common/../Common/../../Archive/../../Common/Types.h \ + ../../UI/Common/../Common/../../Archive/../IDecl.h \ + ../../UI/Common/../Common/../../Archive/../IStream.h \ + ../../UI/Common/../Common/../../Archive/../PropID.h \ + ../../UI/Common/../Common/UpdateAction.h \ + ../../UI/Common/../Common/UpdateProduce.h \ + ../../UI/Common/../Common/UpdatePair.h +UpdatePair.o: ../../UI/Common/UpdatePair.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../../Common/Defs.h \ + ../../../Common/Wildcard.h ../../../Common/MyString.h \ + ../../../Common/MyVector.h ../../../Common/Defs.h \ + ../../../Windows/Time.h ../../UI/Common/SortUtils.h \ + ../../../Common/MyString.h ../../UI/Common/UpdatePair.h \ + ../../UI/Common/DirItem.h ../../UI/Common/../../Archive/IArchive.h \ + ../../UI/Common/../../Archive/../IProgress.h \ + ../../UI/Common/../../Archive/../../Common/MyUnknown.h \ + ../../UI/Common/../../Archive/../../Common/MyWindows.h \ + ../../UI/Common/../../Archive/../../Common/Types.h \ + ../../UI/Common/../../Archive/../IDecl.h \ + ../../UI/Common/../../Archive/../IStream.h \ + ../../UI/Common/../../Archive/../PropID.h ../../UI/Common/UpdateAction.h +UpdateProduce.o: ../../UI/Common/UpdateProduce.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../UI/Common/UpdateProduce.h ../../UI/Common/UpdatePair.h \ + ../../UI/Common/DirItem.h ../../../Common/MyString.h \ + ../../../Common/MyVector.h ../../../Common/Defs.h \ + ../../UI/Common/../../Archive/IArchive.h \ + ../../UI/Common/../../Archive/../IProgress.h \ + ../../UI/Common/../../Archive/../../Common/MyUnknown.h \ + ../../UI/Common/../../Archive/../../Common/MyWindows.h \ + ../../UI/Common/../../Archive/../../Common/Types.h \ + ../../UI/Common/../../Archive/../IDecl.h \ + ../../UI/Common/../../Archive/../IStream.h \ + ../../UI/Common/../../Archive/../PropID.h ../../UI/Common/UpdateAction.h +ZHandler.o: ../../Archive/ZHandler.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../../Common/ComTry.h \ + ../../../Common/MyWindows.h ../../../Windows/PropVariant.h \ + ../../../Windows/../Common/MyWindows.h \ + ../../../Windows/../Common/Types.h \ + ../../Archive/../Common/ProgressUtils.h \ + ../../Archive/../Common/../../Common/MyCom.h \ + ../../Archive/../Common/../../Common/MyWindows.h \ + ../../Archive/../Common/../ICoder.h ../../Archive/../Common/../IStream.h \ + ../../Archive/../Common/../../Common/MyUnknown.h \ + ../../Archive/../Common/../../Common/Types.h \ + ../../Archive/../Common/../IDecl.h \ + ../../Archive/../Common/../IProgress.h \ + ../../Archive/../Common/RegisterArc.h \ + ../../Archive/../Common/../Archive/IArchive.h \ + ../../Archive/../Common/../Archive/../IProgress.h \ + ../../Archive/../Common/../Archive/../IStream.h \ + ../../Archive/../Common/../Archive/../PropID.h \ + ../../Archive/../Common/StreamUtils.h \ + ../../Archive/../Common/../IStream.h \ + ../../Archive/../Compress/ZDecoder.h \ + ../../Archive/../Compress/../../Common/MyCom.h \ + ../../Archive/../Compress/../ICoder.h \ + ../../Archive/Common/DummyOutStream.h \ + ../../Archive/Common/../../IStream.h ../../../Common/MyCom.h +LzmaHandler.o: ../../Archive/LzmaHandler.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../Archive/../../../C/CpuArch.h \ + ../../Archive/../../../C/Types.h ../../../Common/ComTry.h \ + ../../../Common/MyWindows.h ../../../Common/IntToString.h \ + ../../../Windows/PropVariant.h ../../../Windows/../Common/MyWindows.h \ + ../../../Windows/../Common/Types.h ../../Archive/../Common/CreateCoder.h \ + ../../Archive/../Common/../../Common/MyCom.h \ + ../../Archive/../Common/../../Common/MyWindows.h \ + ../../Archive/../Common/../../Common/MyString.h \ + ../../Archive/../Common/../../Common/MyVector.h \ + ../../Archive/../Common/../../Common/Defs.h \ + ../../Archive/../Common/../ICoder.h ../../Archive/../Common/../IStream.h \ + ../../Archive/../Common/../../Common/MyUnknown.h \ + ../../Archive/../Common/../../Common/Types.h \ + ../../Archive/../Common/../IDecl.h ../../Archive/../Common/MethodId.h \ + ../../Archive/../Common/../../Common/Types.h \ + ../../Archive/../Common/ProgressUtils.h \ + ../../Archive/../Common/../IProgress.h \ + ../../Archive/../Common/RegisterArc.h \ + ../../Archive/../Common/../Archive/IArchive.h \ + ../../Archive/../Common/../Archive/../IProgress.h \ + ../../Archive/../Common/../Archive/../IStream.h \ + ../../Archive/../Common/../Archive/../PropID.h \ + ../../Archive/../Common/StreamUtils.h \ + ../../Archive/../Common/../IStream.h \ + ../../Archive/../Compress/LzmaDecoder.h \ + ../../Archive/../Compress/../../../C/LzmaDec.h \ + ../../Archive/../Compress/../../../C/Types.h \ + ../../Archive/../Compress/../../Common/MyCom.h \ + ../../Archive/../Compress/../ICoder.h \ + ../../Archive/Common/DummyOutStream.h \ + ../../Archive/Common/../../IStream.h ../../../Common/MyCom.h +SplitHandler.o: ../../Archive/SplitHandler.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../../Common/ComTry.h ../../../Common/MyWindows.h \ + ../../../Common/MyString.h ../../../Common/MyVector.h \ + ../../../Common/Defs.h ../../../Windows/PropVariant.h \ + ../../../Windows/../Common/MyWindows.h \ + ../../../Windows/../Common/Types.h \ + ../../Archive/../Common/ProgressUtils.h \ + ../../Archive/../Common/../../Common/MyCom.h \ + ../../Archive/../Common/../../Common/MyWindows.h \ + ../../Archive/../Common/../ICoder.h ../../Archive/../Common/../IStream.h \ + ../../Archive/../Common/../../Common/MyUnknown.h \ + ../../Archive/../Common/../../Common/Types.h \ + ../../Archive/../Common/../IDecl.h \ + ../../Archive/../Common/../IProgress.h \ + ../../Archive/../Common/RegisterArc.h \ + ../../Archive/../Common/../Archive/IArchive.h \ + ../../Archive/../Common/../Archive/../IProgress.h \ + ../../Archive/../Common/../Archive/../IStream.h \ + ../../Archive/../Common/../Archive/../PropID.h \ + ../../Archive/../Compress/CopyCoder.h \ + ../../Archive/../Compress/../../Common/MyCom.h \ + ../../Archive/../Compress/../ICoder.h ../../Archive/Common/MultiStream.h \ + ../../Archive/Common/../../../Common/MyCom.h \ + ../../Archive/Common/../../../Common/MyVector.h \ + ../../Archive/Common/../../IStream.h +XzHandler.o: ../../Archive/XzHandler.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../Archive/../../../C/Alloc.h \ + ../../Archive/../../../C/XzCrc64.h ../../Archive/../../../C/Types.h \ + ../../Archive/../../../C/XzEnc.h ../../Archive/../../../C/Lzma2Enc.h \ + ../../Archive/../../../C/LzmaEnc.h ../../Archive/../../../C/Xz.h \ + ../../Archive/../../../C/Sha256.h ../../Archive/../../Common/ComTry.h \ + ../../Archive/../../Common/MyWindows.h \ + ../../Archive/../../Common/IntToString.h \ + ../../Archive/../../Common/Types.h ../../Archive/../ICoder.h \ + ../../Archive/../IStream.h ../../Archive/../../Common/MyUnknown.h \ + ../../Archive/../../Common/Types.h ../../Archive/../IDecl.h \ + ../../Archive/../Common/CWrappers.h ../../Archive/../Common/../ICoder.h \ + ../../Archive/../Common/../../Common/MyCom.h \ + ../../Archive/../Common/../../Common/MyWindows.h \ + ../../Archive/../Common/ProgressUtils.h \ + ../../Archive/../Common/../IProgress.h \ + ../../Archive/../Common/../../Common/MyUnknown.h \ + ../../Archive/../Common/../../Common/Types.h \ + ../../Archive/../Common/../IDecl.h ../../Archive/../Common/RegisterArc.h \ + ../../Archive/../Common/../Archive/IArchive.h \ + ../../Archive/../Common/../Archive/../IProgress.h \ + ../../Archive/../Common/../Archive/../IStream.h \ + ../../Archive/../Common/../Archive/../PropID.h \ + ../../Archive/../Common/StreamUtils.h \ + ../../Archive/../Common/../IStream.h \ + ../../Archive/../Compress/CopyCoder.h \ + ../../Archive/../Compress/../../Common/MyCom.h \ + ../../Archive/../Compress/../ICoder.h ../../Archive/IArchive.h \ + ../../Archive/Common/HandlerOut.h \ + ../../Archive/Common/../../../Common/MyString.h \ + ../../Archive/Common/../../../Common/MyVector.h \ + ../../Archive/Common/../../../Common/Defs.h \ + ../../Archive/Common/../../Common/MethodProps.h \ + ../../Archive/Common/../../Common/../../Common/MyVector.h \ + ../../Archive/Common/../../Common/../../Windows/PropVariant.h \ + ../../Archive/Common/../../Common/../../Windows/../Common/MyWindows.h \ + ../../Archive/Common/../../Common/../../Windows/../Common/Types.h \ + ../../Archive/Common/../../Common/MethodId.h \ + ../../Archive/Common/../../Common/../../Common/Types.h +CoderMixer2.o: ../../Archive/Common/CoderMixer2.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../Archive/Common/CoderMixer2.h \ + ../../Archive/Common/../../../Common/MyVector.h \ + ../../Archive/Common/../../../Common/Defs.h \ + ../../Archive/Common/../../../Common/Types.h \ + ../../Archive/Common/../../../Common/MyCom.h \ + ../../Archive/Common/../../../Common/MyWindows.h \ + ../../Archive/Common/../../ICoder.h ../../Archive/Common/../../IStream.h \ + ../../Archive/Common/../../../Common/MyUnknown.h \ + ../../Archive/Common/../../../Common/Types.h \ + ../../Archive/Common/../../IDecl.h +CoderMixer2MT.o: ../../Archive/Common/CoderMixer2MT.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../Archive/Common/CoderMixer2MT.h ../../Archive/Common/CoderMixer2.h \ + ../../Archive/Common/../../../Common/MyVector.h \ + ../../Archive/Common/../../../Common/Defs.h \ + ../../Archive/Common/../../../Common/Types.h \ + ../../Archive/Common/../../../Common/MyCom.h \ + ../../Archive/Common/../../../Common/MyWindows.h \ + ../../Archive/Common/../../ICoder.h ../../Archive/Common/../../IStream.h \ + ../../Archive/Common/../../../Common/MyUnknown.h \ + ../../Archive/Common/../../../Common/Types.h \ + ../../Archive/Common/../../IDecl.h \ + ../../Archive/Common/../../Common/StreamBinder.h \ + ../../Archive/Common/../../Common/../IStream.h \ + ../../Archive/Common/../../Common/../../Windows/Synchronization.h \ + ../../Archive/Common/../../Common/../../Windows/Defs.h \ + ../../Archive/Common/../../Common/../../Windows/../Common/MyWindows.h \ + ../../Archive/Common/../../Common/../../Windows/../../C/Threads.h \ + ../../Archive/Common/../../Common/../../Windows/../../C/Types.h \ + ../../Archive/Common/../../Common/../../Windows/Synchronization2.h \ + ../../Archive/Common/../../Common/VirtThread.h \ + ../../Archive/Common/../../Common/../../Windows/Thread.h +CrossThreadProgress.o: ../../Archive/Common/CrossThreadProgress.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../Archive/Common/CrossThreadProgress.h \ + ../../Archive/Common/../../ICoder.h ../../Archive/Common/../../IStream.h \ + ../../Archive/Common/../../../Common/MyUnknown.h \ + ../../Archive/Common/../../../Common/MyWindows.h \ + ../../Archive/Common/../../../Common/Types.h \ + ../../Archive/Common/../../IDecl.h \ + ../../Archive/Common/../../../Windows/Synchronization.h \ + ../../Archive/Common/../../../Windows/Defs.h \ + ../../Archive/Common/../../../Windows/../Common/MyWindows.h \ + ../../Archive/Common/../../../Windows/../../C/Threads.h \ + ../../Archive/Common/../../../Windows/../../C/Types.h \ + ../../Archive/Common/../../../Windows/Synchronization2.h \ + ../../Archive/Common/../../../Common/MyCom.h +DummyOutStream.o: ../../Archive/Common/DummyOutStream.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../Archive/Common/DummyOutStream.h \ + ../../Archive/Common/../../IStream.h \ + ../../Archive/Common/../../../Common/MyUnknown.h \ + ../../Archive/Common/../../../Common/MyWindows.h \ + ../../Archive/Common/../../../Common/Types.h \ + ../../Archive/Common/../../IDecl.h ../../../Common/MyCom.h \ + ../../../Common/MyWindows.h +HandlerOut.o: ../../Archive/Common/HandlerOut.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../Archive/Common/../../../Common/StringToInt.h \ + ../../Archive/Common/../../../Common/Types.h \ + ../../Archive/Common/../../../Windows/PropVariant.h \ + ../../Archive/Common/../../../Windows/../Common/MyWindows.h \ + ../../Archive/Common/../../../Windows/../Common/Types.h \ + ../../Archive/Common/../../../Windows/System.h \ + ../../Archive/Common/../../ICoder.h ../../Archive/Common/../../IStream.h \ + ../../Archive/Common/../../../Common/MyUnknown.h \ + ../../Archive/Common/../../../Common/MyWindows.h \ + ../../Archive/Common/../../../Common/Types.h \ + ../../Archive/Common/../../IDecl.h \ + ../../Archive/Common/../Common/ParseProperties.h \ + ../../../Common/MyString.h ../../../Common/MyVector.h \ + ../../../Common/Defs.h ../../Archive/Common/HandlerOut.h \ + ../../Archive/Common/../../../Common/MyString.h \ + ../../Archive/Common/../../Common/MethodProps.h \ + ../../Archive/Common/../../Common/../../Common/MyVector.h \ + ../../Archive/Common/../../Common/../../Windows/PropVariant.h \ + ../../Archive/Common/../../Common/MethodId.h \ + ../../Archive/Common/../../Common/../../Common/Types.h +InStreamWithCRC.o: ../../Archive/Common/InStreamWithCRC.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../Archive/Common/InStreamWithCRC.h \ + ../../Archive/Common/../../../../C/7zCrc.h \ + ../../Archive/Common/../../../../C/Types.h \ + ../../Archive/Common/../../../Common/MyCom.h \ + ../../Archive/Common/../../../Common/MyWindows.h \ + ../../Archive/Common/../../IStream.h \ + ../../Archive/Common/../../../Common/MyUnknown.h \ + ../../Archive/Common/../../../Common/Types.h \ + ../../Archive/Common/../../IDecl.h +ItemNameUtils.o: ../../Archive/Common/ItemNameUtils.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../Archive/Common/../../../../C/Types.h \ + ../../Archive/Common/ItemNameUtils.h \ + ../../Archive/Common/../../../Common/MyString.h \ + ../../Archive/Common/../../../Common/MyVector.h \ + ../../Archive/Common/../../../Common/Defs.h +MultiStream.o: ../../Archive/Common/MultiStream.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../Archive/Common/MultiStream.h \ + ../../Archive/Common/../../../Common/MyCom.h \ + ../../Archive/Common/../../../Common/MyWindows.h \ + ../../Archive/Common/../../../Common/MyVector.h \ + ../../Archive/Common/../../../Common/Defs.h \ + ../../Archive/Common/../../IStream.h \ + ../../Archive/Common/../../../Common/MyUnknown.h \ + ../../Archive/Common/../../../Common/Types.h \ + ../../Archive/Common/../../IDecl.h +OutStreamWithCRC.o: ../../Archive/Common/OutStreamWithCRC.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../Archive/Common/OutStreamWithCRC.h \ + ../../Archive/Common/../../../../C/7zCrc.h \ + ../../Archive/Common/../../../../C/Types.h \ + ../../Archive/Common/../../../Common/MyCom.h \ + ../../Archive/Common/../../../Common/MyWindows.h \ + ../../Archive/Common/../../IStream.h \ + ../../Archive/Common/../../../Common/MyUnknown.h \ + ../../Archive/Common/../../../Common/Types.h \ + ../../Archive/Common/../../IDecl.h +ParseProperties.o: ../../Archive/Common/ParseProperties.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../Archive/Common/ParseProperties.h ../../../Common/MyString.h \ + ../../../Common/MyVector.h ../../../Common/Defs.h \ + ../../../Common/StringToInt.h ../../../Common/MyCom.h \ + ../../../Common/MyWindows.h +7zCompressionMode.o: ../../Archive/7z/7zCompressionMode.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h +7zDecode.o: ../../Archive/7z/7zDecode.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h \ + ../../Archive/7z/../../Common/LimitedStreams.h \ + ../../Archive/7z/../../Common/../../Common/MyCom.h \ + ../../Archive/7z/../../Common/../../Common/MyWindows.h \ + ../../Archive/7z/../../Common/../../Common/MyVector.h \ + ../../Archive/7z/../../Common/../../Common/Defs.h \ + ../../Archive/7z/../../Common/../IStream.h \ + ../../Archive/7z/../../Common/../../Common/MyUnknown.h \ + ../../Archive/7z/../../Common/../../Common/Types.h \ + ../../Archive/7z/../../Common/../IDecl.h \ + ../../Archive/7z/../../Common/LockedStream.h \ + ../../Archive/7z/../../Common/../../Windows/Synchronization.h \ + ../../Archive/7z/../../Common/../../Windows/Defs.h \ + ../../Archive/7z/../../Common/../../Windows/../Common/MyWindows.h \ + ../../Archive/7z/../../Common/../../Windows/../../C/Threads.h \ + ../../Archive/7z/../../Common/../../Windows/../../C/Types.h \ + ../../Archive/7z/../../Common/../../Windows/Synchronization2.h \ + ../../Archive/7z/../../Common/ProgressUtils.h \ + ../../Archive/7z/../../Common/../ICoder.h \ + ../../Archive/7z/../../Common/../IStream.h \ + ../../Archive/7z/../../Common/../IProgress.h \ + ../../Archive/7z/../../Common/StreamObjects.h \ + ../../Archive/7z/../../Common/../../Common/Buffer.h \ + ../../Archive/7z/7zDecode.h ../../Archive/7z/../../IStream.h \ + ../../Archive/7z/../../IPassword.h \ + ../../Archive/7z/../../../Common/MyUnknown.h \ + ../../Archive/7z/../../../Common/Types.h ../../Archive/7z/../../IDecl.h \ + ../../Archive/7z/../Common/CoderMixer2.h \ + ../../Archive/7z/../Common/../../../Common/MyVector.h \ + ../../Archive/7z/../Common/../../../Common/Types.h \ + ../../Archive/7z/../Common/../../../Common/MyCom.h \ + ../../Archive/7z/../Common/../../ICoder.h \ + ../../Archive/7z/../Common/CoderMixer2MT.h \ + ../../Archive/7z/../Common/CoderMixer2.h \ + ../../Archive/7z/../Common/../../Common/StreamBinder.h \ + ../../Archive/7z/../Common/../../Common/../IStream.h \ + ../../Archive/7z/../Common/../../Common/../../Windows/Synchronization.h \ + ../../Archive/7z/../Common/../../Common/VirtThread.h \ + ../../Archive/7z/../Common/../../Common/../../Windows/Thread.h \ + ../../Archive/7z/../Common/../../Common/../../Windows/Defs.h \ + ../../Archive/7z/../Common/../../Common/../../Windows/../../C/Threads.h \ + ../../Archive/7z/../../Common/CreateCoder.h \ + ../../Archive/7z/../../Common/../../Common/MyString.h \ + ../../Archive/7z/../../Common/../../Common/MyVector.h \ + ../../Archive/7z/../../Common/MethodId.h \ + ../../Archive/7z/../../Common/../../Common/Types.h \ + ../../Archive/7z/7zItem.h ../../Archive/7z/../../../Common/Buffer.h \ + ../../Archive/7z/../../../Common/MyString.h \ + ../../Archive/7z/../../Common/MethodId.h ../../Archive/7z/7zHeader.h \ + ../../Archive/7z/../../../Common/Types.h +7zEncode.o: ../../Archive/7z/7zEncode.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h \ + ../../Archive/7z/../../Common/CreateCoder.h \ + ../../Archive/7z/../../Common/../../Common/MyCom.h \ + ../../Archive/7z/../../Common/../../Common/MyWindows.h \ + ../../Archive/7z/../../Common/../../Common/MyString.h \ + ../../Archive/7z/../../Common/../../Common/MyVector.h \ + ../../Archive/7z/../../Common/../../Common/Defs.h \ + ../../Archive/7z/../../Common/../ICoder.h \ + ../../Archive/7z/../../Common/../IStream.h \ + ../../Archive/7z/../../Common/../../Common/MyUnknown.h \ + ../../Archive/7z/../../Common/../../Common/Types.h \ + ../../Archive/7z/../../Common/../IDecl.h \ + ../../Archive/7z/../../Common/MethodId.h \ + ../../Archive/7z/../../Common/../../Common/Types.h \ + ../../Archive/7z/../../Common/FilterCoder.h \ + ../../Archive/7z/../../Common/../IPassword.h \ + ../../Archive/7z/../../Common/LimitedStreams.h \ + ../../Archive/7z/../../Common/../../Common/MyVector.h \ + ../../Archive/7z/../../Common/../IStream.h \ + ../../Archive/7z/../../Common/InOutTempBuffer.h \ + ../../Archive/7z/../../Common/../../Windows/FileDir.h \ + ../../Archive/7z/../../Common/../../Windows/../Common/MyString.h \ + ../../Archive/7z/../../Common/../../Windows/Defs.h \ + ../../Archive/7z/../../Common/../../Windows/../Common/MyWindows.h \ + ../../Archive/7z/../../Common/../../Windows/FileIO.h \ + ../../../Common/MyString.h ../../Archive/7z/../../Common/ProgressUtils.h \ + ../../Archive/7z/../../Common/../IProgress.h \ + ../../Archive/7z/../../Common/StreamObjects.h \ + ../../Archive/7z/../../Common/../../Common/Buffer.h \ + ../../Archive/7z/7zEncode.h ../../Archive/7z/7zCompressionMode.h \ + ../../Archive/7z/../../../Common/MyString.h \ + ../../Archive/7z/../../../Windows/PropVariant.h \ + ../../Archive/7z/../../../Windows/../Common/MyWindows.h \ + ../../Archive/7z/../../../Windows/../Common/Types.h \ + ../../Archive/7z/../../Common/MethodProps.h \ + ../../Archive/7z/../../Common/../../Windows/PropVariant.h \ + ../../Archive/7z/../Common/CoderMixer2.h \ + ../../Archive/7z/../Common/../../../Common/MyVector.h \ + ../../Archive/7z/../Common/../../../Common/Types.h \ + ../../Archive/7z/../Common/../../../Common/MyCom.h \ + ../../Archive/7z/../Common/../../ICoder.h \ + ../../Archive/7z/../Common/CoderMixer2MT.h \ + ../../Archive/7z/../Common/CoderMixer2.h \ + ../../Archive/7z/../Common/../../Common/StreamBinder.h \ + ../../Archive/7z/../Common/../../Common/../IStream.h \ + ../../Archive/7z/../Common/../../Common/../../Windows/Synchronization.h \ + ../../Archive/7z/../Common/../../Common/../../Windows/Defs.h \ + ../../Archive/7z/../Common/../../Common/../../Windows/../../C/Threads.h \ + ../../Archive/7z/../Common/../../Common/../../Windows/../../C/Types.h \ + ../../Archive/7z/../Common/../../Common/../../Windows/Synchronization2.h \ + ../../Archive/7z/../Common/../../Common/VirtThread.h \ + ../../Archive/7z/../Common/../../Common/../../Windows/Thread.h \ + ../../Archive/7z/7zItem.h ../../Archive/7z/../../../Common/Buffer.h \ + ../../Archive/7z/../../Common/MethodId.h ../../Archive/7z/7zHeader.h \ + ../../Archive/7z/../../../Common/Types.h ../../Archive/7z/7zSpecStream.h \ + ../../Archive/7z/../../IStream.h ../../Archive/7z/../../ICoder.h \ + ../../Archive/7z/../../../Common/MyCom.h +7zExtract.o: ../../Archive/7z/7zExtract.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h \ + ../../Archive/7z/../../../Common/ComTry.h \ + ../../Archive/7z/../../../Common/MyWindows.h \ + ../../Archive/7z/../../Common/ProgressUtils.h \ + ../../Archive/7z/../../Common/../../Common/MyCom.h \ + ../../Archive/7z/../../Common/../../Common/MyWindows.h \ + ../../Archive/7z/../../Common/../ICoder.h \ + ../../Archive/7z/../../Common/../IStream.h \ + ../../Archive/7z/../../Common/../../Common/MyUnknown.h \ + ../../Archive/7z/../../Common/../../Common/Types.h \ + ../../Archive/7z/../../Common/../IDecl.h \ + ../../Archive/7z/../../Common/../IProgress.h ../../Archive/7z/7zDecode.h \ + ../../Archive/7z/../../IStream.h ../../Archive/7z/../../IPassword.h \ + ../../Archive/7z/../../../Common/MyUnknown.h \ + ../../Archive/7z/../../../Common/Types.h ../../Archive/7z/../../IDecl.h \ + ../../Archive/7z/../Common/CoderMixer2.h \ + ../../Archive/7z/../Common/../../../Common/MyVector.h \ + ../../Archive/7z/../Common/../../../Common/Defs.h \ + ../../Archive/7z/../Common/../../../Common/Types.h \ + ../../Archive/7z/../Common/../../../Common/MyCom.h \ + ../../Archive/7z/../Common/../../ICoder.h \ + ../../Archive/7z/../Common/CoderMixer2MT.h \ + ../../Archive/7z/../Common/CoderMixer2.h \ + ../../Archive/7z/../Common/../../Common/StreamBinder.h \ + ../../Archive/7z/../Common/../../Common/../IStream.h \ + ../../Archive/7z/../Common/../../Common/../../Windows/Synchronization.h \ + ../../Archive/7z/../Common/../../Common/../../Windows/Defs.h \ + ../../Archive/7z/../Common/../../Common/../../Windows/../Common/MyWindows.h \ + ../../Archive/7z/../Common/../../Common/../../Windows/../../C/Threads.h \ + ../../Archive/7z/../Common/../../Common/../../Windows/../../C/Types.h \ + ../../Archive/7z/../Common/../../Common/../../Windows/Synchronization2.h \ + ../../Archive/7z/../Common/../../Common/VirtThread.h \ + ../../Archive/7z/../Common/../../Common/../../Windows/Thread.h \ + ../../Archive/7z/../../Common/CreateCoder.h \ + ../../Archive/7z/../../Common/../../Common/MyString.h \ + ../../Archive/7z/../../Common/../../Common/MyVector.h \ + ../../Archive/7z/../../Common/MethodId.h \ + ../../Archive/7z/../../Common/../../Common/Types.h \ + ../../Archive/7z/7zItem.h ../../Archive/7z/../../../Common/Buffer.h \ + ../../Archive/7z/../../../Common/Defs.h \ + ../../Archive/7z/../../../Common/MyString.h \ + ../../Archive/7z/../../Common/MethodId.h ../../Archive/7z/7zHeader.h \ + ../../Archive/7z/../../../Common/Types.h \ + ../../Archive/7z/7zFolderOutStream.h ../../Archive/7z/../IArchive.h \ + ../../Archive/7z/../../IProgress.h ../../Archive/7z/../../IStream.h \ + ../../Archive/7z/../../PropID.h \ + ../../Archive/7z/../Common/OutStreamWithCRC.h \ + ../../Archive/7z/../Common/../../../../C/7zCrc.h \ + ../../Archive/7z/../Common/../../../../C/Types.h \ + ../../Archive/7z/../Common/../../IStream.h ../../Archive/7z/7zIn.h \ + ../../Archive/7z/../../../Common/MyCom.h \ + ../../Archive/7z/../../Common/InBuffer.h \ + ../../Archive/7z/../../Common/../IStream.h \ + ../../Archive/7z/../../Common/../../Common/MyException.h \ + ../../Archive/7z/7zHandler.h ../../Archive/7z/../../ICoder.h \ + ../../Archive/7z/../Common/HandlerOut.h \ + ../../Archive/7z/../Common/../../../Common/MyString.h \ + ../../Archive/7z/../Common/../../Common/MethodProps.h \ + ../../Archive/7z/../Common/../../Common/../../Common/MyVector.h \ + ../../Archive/7z/../Common/../../Common/../../Windows/PropVariant.h \ + ../../Archive/7z/../Common/../../Common/../../Windows/../Common/Types.h \ + ../../Archive/7z/../Common/../../Common/MethodId.h \ + ../../Archive/7z/7zCompressionMode.h \ + ../../Archive/7z/../../../Windows/PropVariant.h \ + ../../Archive/7z/../../Common/MethodProps.h +7zFolderInStream.o: ../../Archive/7z/7zFolderInStream.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../Archive/7z/7zFolderInStream.h ../../Archive/7z/../../ICoder.h \ + ../../Archive/7z/../../IStream.h \ + ../../Archive/7z/../../../Common/MyUnknown.h \ + ../../Archive/7z/../../../Common/MyWindows.h \ + ../../Archive/7z/../../../Common/Types.h ../../Archive/7z/../../IDecl.h \ + ../../Archive/7z/../IArchive.h ../../Archive/7z/../../IProgress.h \ + ../../Archive/7z/../../IStream.h ../../Archive/7z/../../PropID.h \ + ../../Archive/7z/../Common/InStreamWithCRC.h \ + ../../Archive/7z/../Common/../../../../C/7zCrc.h \ + ../../Archive/7z/../Common/../../../../C/Types.h \ + ../../Archive/7z/../Common/../../../Common/MyCom.h \ + ../../Archive/7z/../Common/../../../Common/MyWindows.h \ + ../../Archive/7z/../Common/../../IStream.h ../../Archive/7z/7zItem.h \ + ../../Archive/7z/../../../Common/Buffer.h \ + ../../Archive/7z/../../../Common/Defs.h \ + ../../Archive/7z/../../../Common/MyString.h \ + ../../Archive/7z/../../../Common/MyVector.h \ + ../../Archive/7z/../../Common/MethodId.h \ + ../../Archive/7z/../../Common/../../Common/Types.h \ + ../../Archive/7z/7zHeader.h ../../Archive/7z/../../../Common/Types.h +7zFolderOutStream.o: ../../Archive/7z/7zFolderOutStream.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../Archive/7z/7zFolderOutStream.h ../../Archive/7z/../../IStream.h \ + ../../Archive/7z/../../../Common/MyUnknown.h \ + ../../Archive/7z/../../../Common/MyWindows.h \ + ../../Archive/7z/../../../Common/Types.h ../../Archive/7z/../../IDecl.h \ + ../../Archive/7z/../IArchive.h ../../Archive/7z/../../IProgress.h \ + ../../Archive/7z/../../IStream.h ../../Archive/7z/../../PropID.h \ + ../../Archive/7z/../Common/OutStreamWithCRC.h \ + ../../Archive/7z/../Common/../../../../C/7zCrc.h \ + ../../Archive/7z/../Common/../../../../C/Types.h \ + ../../Archive/7z/../Common/../../../Common/MyCom.h \ + ../../Archive/7z/../Common/../../../Common/MyWindows.h \ + ../../Archive/7z/../Common/../../IStream.h ../../Archive/7z/7zIn.h \ + ../../Archive/7z/../../../Common/MyCom.h \ + ../../Archive/7z/../../IPassword.h \ + ../../Archive/7z/../../Common/CreateCoder.h \ + ../../Archive/7z/../../Common/../../Common/MyCom.h \ + ../../Archive/7z/../../Common/../../Common/MyString.h \ + ../../Archive/7z/../../Common/../../Common/MyVector.h \ + ../../Archive/7z/../../Common/../../Common/Defs.h \ + ../../Archive/7z/../../Common/../ICoder.h \ + ../../Archive/7z/../../Common/../IStream.h \ + ../../Archive/7z/../../Common/MethodId.h \ + ../../Archive/7z/../../Common/../../Common/Types.h \ + ../../Archive/7z/../../Common/InBuffer.h \ + ../../Archive/7z/../../Common/../IStream.h \ + ../../Archive/7z/../../Common/../../Common/MyException.h \ + ../../Archive/7z/../../Common/../../Common/MyWindows.h \ + ../../Archive/7z/7zItem.h ../../Archive/7z/../../../Common/Buffer.h \ + ../../Archive/7z/../../../Common/Defs.h \ + ../../Archive/7z/../../../Common/MyString.h \ + ../../Archive/7z/../../Common/MethodId.h ../../Archive/7z/7zHeader.h \ + ../../Archive/7z/../../../Common/Types.h +7zHandler.o: ../../Archive/7z/7zHandler.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h \ + ../../Archive/7z/../../../../C/CpuArch.h \ + ../../Archive/7z/../../../../C/Types.h \ + ../../Archive/7z/../../../Common/ComTry.h \ + ../../Archive/7z/../../../Common/MyWindows.h \ + ../../Archive/7z/../../../Common/IntToString.h \ + ../../Archive/7z/../../../Common/Types.h \ + ../../Archive/7z/../../../Windows/System.h \ + ../../Archive/7z/../../../Windows/../Common/Types.h \ + ../../Archive/7z/../Common/ItemNameUtils.h \ + ../../Archive/7z/../Common/../../../Common/MyString.h \ + ../../Archive/7z/../Common/../../../Common/MyVector.h \ + ../../Archive/7z/../Common/../../../Common/Defs.h \ + ../../Archive/7z/7zHandler.h ../../Archive/7z/../../ICoder.h \ + ../../Archive/7z/../../IStream.h \ + ../../Archive/7z/../../../Common/MyUnknown.h \ + ../../Archive/7z/../../../Common/Types.h ../../Archive/7z/../../IDecl.h \ + ../../Archive/7z/../IArchive.h ../../Archive/7z/../../IProgress.h \ + ../../Archive/7z/../../IStream.h ../../Archive/7z/../../PropID.h \ + ../../Archive/7z/../../Common/CreateCoder.h \ + ../../Archive/7z/../../Common/../../Common/MyCom.h \ + ../../Archive/7z/../../Common/../../Common/MyWindows.h \ + ../../Archive/7z/../../Common/../../Common/MyString.h \ + ../../Archive/7z/../../Common/../ICoder.h \ + ../../Archive/7z/../../Common/MethodId.h \ + ../../Archive/7z/../../Common/../../Common/Types.h \ + ../../Archive/7z/../Common/HandlerOut.h \ + ../../Archive/7z/../Common/../../Common/MethodProps.h \ + ../../Archive/7z/../Common/../../Common/../../Common/MyVector.h \ + ../../Archive/7z/../Common/../../Common/../../Windows/PropVariant.h \ + ../../Archive/7z/../Common/../../Common/../../Windows/../Common/MyWindows.h \ + ../../Archive/7z/../Common/../../Common/../../Windows/../Common/Types.h \ + ../../Archive/7z/../Common/../../Common/MethodId.h \ + ../../Archive/7z/7zCompressionMode.h \ + ../../Archive/7z/../../../Common/MyString.h \ + ../../Archive/7z/../../../Windows/PropVariant.h \ + ../../Archive/7z/../../Common/MethodProps.h ../../Archive/7z/7zIn.h \ + ../../Archive/7z/../../../Common/MyCom.h \ + ../../Archive/7z/../../IPassword.h ../../Archive/7z/../../IStream.h \ + ../../Archive/7z/../../Common/InBuffer.h \ + ../../Archive/7z/../../Common/../IStream.h \ + ../../Archive/7z/../../Common/../../Common/MyException.h \ + ../../Archive/7z/7zItem.h ../../Archive/7z/../../../Common/Buffer.h \ + ../../Archive/7z/../../../Common/Defs.h \ + ../../Archive/7z/../../Common/MethodId.h ../../Archive/7z/7zHeader.h \ + ../../Archive/7z/../../../Common/Types.h ../../Archive/7z/7zProperties.h \ + ../../Archive/7z/../../PropID.h +7zHandlerOut.o: ../../Archive/7z/7zHandlerOut.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../Archive/7z/../../../Windows/PropVariant.h \ + ../../Archive/7z/../../../Windows/../Common/MyWindows.h \ + ../../Archive/7z/../../../Windows/../Common/Types.h \ + ../../Archive/7z/../../../Common/ComTry.h \ + ../../Archive/7z/../../../Common/MyWindows.h \ + ../../Archive/7z/../../../Common/StringToInt.h \ + ../../Archive/7z/../../../Common/Types.h ../../Archive/7z/../../ICoder.h \ + ../../Archive/7z/../../IStream.h \ + ../../Archive/7z/../../../Common/MyUnknown.h \ + ../../Archive/7z/../../../Common/Types.h ../../Archive/7z/../../IDecl.h \ + ../../Archive/7z/../Common/ItemNameUtils.h \ + ../../Archive/7z/../Common/../../../Common/MyString.h \ + ../../Archive/7z/../Common/../../../Common/MyVector.h \ + ../../Archive/7z/../Common/../../../Common/Defs.h \ + ../../Archive/7z/../Common/ParseProperties.h ../../../Common/MyString.h \ + ../../Archive/7z/7zHandler.h ../../Archive/7z/../IArchive.h \ + ../../Archive/7z/../../IProgress.h ../../Archive/7z/../../IStream.h \ + ../../Archive/7z/../../PropID.h \ + ../../Archive/7z/../../Common/CreateCoder.h \ + ../../Archive/7z/../../Common/../../Common/MyCom.h \ + ../../Archive/7z/../../Common/../../Common/MyWindows.h \ + ../../Archive/7z/../../Common/../../Common/MyString.h \ + ../../Archive/7z/../../Common/../ICoder.h \ + ../../Archive/7z/../../Common/MethodId.h \ + ../../Archive/7z/../../Common/../../Common/Types.h \ + ../../Archive/7z/../Common/HandlerOut.h \ + ../../Archive/7z/../Common/../../Common/MethodProps.h \ + ../../Archive/7z/../Common/../../Common/../../Common/MyVector.h \ + ../../Archive/7z/../Common/../../Common/../../Windows/PropVariant.h \ + ../../Archive/7z/../Common/../../Common/MethodId.h \ + ../../Archive/7z/7zCompressionMode.h \ + ../../Archive/7z/../../../Common/MyString.h \ + ../../Archive/7z/../../Common/MethodProps.h ../../Archive/7z/7zIn.h \ + ../../Archive/7z/../../../Common/MyCom.h \ + ../../Archive/7z/../../IPassword.h ../../Archive/7z/../../IStream.h \ + ../../Archive/7z/../../Common/InBuffer.h \ + ../../Archive/7z/../../Common/../IStream.h \ + ../../Archive/7z/../../Common/../../Common/MyException.h \ + ../../Archive/7z/7zItem.h ../../Archive/7z/../../../Common/Buffer.h \ + ../../Archive/7z/../../../Common/Defs.h \ + ../../Archive/7z/../../Common/MethodId.h ../../Archive/7z/7zHeader.h \ + ../../Archive/7z/../../../Common/Types.h ../../Archive/7z/7zOut.h \ + ../../Archive/7z/7zEncode.h ../../Archive/7z/../Common/CoderMixer2.h \ + ../../Archive/7z/../Common/../../../Common/MyVector.h \ + ../../Archive/7z/../Common/../../../Common/Types.h \ + ../../Archive/7z/../Common/../../../Common/MyCom.h \ + ../../Archive/7z/../Common/../../ICoder.h \ + ../../Archive/7z/../Common/CoderMixer2MT.h \ + ../../Archive/7z/../Common/CoderMixer2.h \ + ../../Archive/7z/../Common/../../Common/StreamBinder.h \ + ../../Archive/7z/../Common/../../Common/../IStream.h \ + ../../Archive/7z/../Common/../../Common/../../Windows/Synchronization.h \ + ../../Archive/7z/../Common/../../Common/../../Windows/Defs.h \ + ../../Archive/7z/../Common/../../Common/../../Windows/../Common/MyWindows.h \ + ../../Archive/7z/../Common/../../Common/../../Windows/../../C/Threads.h \ + ../../Archive/7z/../Common/../../Common/../../Windows/../../C/Types.h \ + ../../Archive/7z/../Common/../../Common/../../Windows/Synchronization2.h \ + ../../Archive/7z/../Common/../../Common/VirtThread.h \ + ../../Archive/7z/../Common/../../Common/../../Windows/Thread.h \ + ../../Archive/7z/../../Common/OutBuffer.h ../../Archive/7z/7zUpdate.h +7zHeader.o: ../../Archive/7z/7zHeader.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../Archive/7z/7zHeader.h \ + ../../Archive/7z/../../../Common/Types.h +7zIn.o: ../../Archive/7z/7zIn.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../Archive/7z/../../../../C/7zCrc.h \ + ../../Archive/7z/../../../../C/Types.h \ + ../../Archive/7z/../../../../C/CpuArch.h \ + ../../Archive/7z/../../Common/StreamObjects.h \ + ../../Archive/7z/../../Common/../../Common/Buffer.h \ + ../../Archive/7z/../../Common/../../Common/Defs.h \ + ../../Archive/7z/../../Common/../../Common/MyCom.h \ + ../../Archive/7z/../../Common/../../Common/MyWindows.h \ + ../../Archive/7z/../../Common/../IStream.h \ + ../../Archive/7z/../../Common/../../Common/MyUnknown.h \ + ../../Archive/7z/../../Common/../../Common/Types.h \ + ../../Archive/7z/../../Common/../IDecl.h \ + ../../Archive/7z/../../Common/StreamUtils.h ../../Archive/7z/7zDecode.h \ + ../../Archive/7z/../../IStream.h ../../Archive/7z/../../IPassword.h \ + ../../Archive/7z/../../../Common/MyUnknown.h \ + ../../Archive/7z/../../../Common/Types.h ../../Archive/7z/../../IDecl.h \ + ../../Archive/7z/../Common/CoderMixer2.h \ + ../../Archive/7z/../Common/../../../Common/MyVector.h \ + ../../Archive/7z/../Common/../../../Common/Defs.h \ + ../../Archive/7z/../Common/../../../Common/Types.h \ + ../../Archive/7z/../Common/../../../Common/MyCom.h \ + ../../Archive/7z/../Common/../../ICoder.h \ + ../../Archive/7z/../Common/../../IStream.h \ + ../../Archive/7z/../Common/CoderMixer2MT.h \ + ../../Archive/7z/../Common/CoderMixer2.h \ + ../../Archive/7z/../Common/../../Common/StreamBinder.h \ + ../../Archive/7z/../Common/../../Common/../IStream.h \ + ../../Archive/7z/../Common/../../Common/../../Windows/Synchronization.h \ + ../../Archive/7z/../Common/../../Common/../../Windows/Defs.h \ + ../../Archive/7z/../Common/../../Common/../../Windows/../Common/MyWindows.h \ + ../../Archive/7z/../Common/../../Common/../../Windows/../../C/Threads.h \ + ../../Archive/7z/../Common/../../Common/../../Windows/../../C/Types.h \ + ../../Archive/7z/../Common/../../Common/../../Windows/Synchronization2.h \ + ../../Archive/7z/../Common/../../Common/VirtThread.h \ + ../../Archive/7z/../Common/../../Common/../../Windows/Thread.h \ + ../../Archive/7z/../../Common/CreateCoder.h \ + ../../Archive/7z/../../Common/../../Common/MyString.h \ + ../../Archive/7z/../../Common/../../Common/MyVector.h \ + ../../Archive/7z/../../Common/../ICoder.h \ + ../../Archive/7z/../../Common/MethodId.h \ + ../../Archive/7z/../../Common/../../Common/Types.h \ + ../../Archive/7z/7zItem.h ../../Archive/7z/../../../Common/Buffer.h \ + ../../Archive/7z/../../../Common/MyString.h \ + ../../Archive/7z/../../Common/MethodId.h ../../Archive/7z/7zHeader.h \ + ../../Archive/7z/../../../Common/Types.h ../../Archive/7z/7zIn.h \ + ../../Archive/7z/../../../Common/MyCom.h \ + ../../Archive/7z/../../Common/InBuffer.h \ + ../../Archive/7z/../../Common/../../Common/MyException.h +7zOut.o: ../../Archive/7z/7zOut.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../Archive/7z/../../../../C/7zCrc.h \ + ../../Archive/7z/../../../../C/Types.h \ + ../../Archive/7z/../../../Common/AutoPtr.h \ + ../../Archive/7z/../../Common/StreamObjects.h \ + ../../Archive/7z/../../Common/../../Common/Buffer.h \ + ../../Archive/7z/../../Common/../../Common/Defs.h \ + ../../Archive/7z/../../Common/../../Common/MyCom.h \ + ../../Archive/7z/../../Common/../../Common/MyWindows.h \ + ../../Archive/7z/../../Common/../IStream.h \ + ../../Archive/7z/../../Common/../../Common/MyUnknown.h \ + ../../Archive/7z/../../Common/../../Common/Types.h \ + ../../Archive/7z/../../Common/../IDecl.h ../../Archive/7z/7zOut.h \ + ../../Archive/7z/7zCompressionMode.h \ + ../../Archive/7z/../../../Common/MyString.h \ + ../../Archive/7z/../../../Common/MyVector.h \ + ../../Archive/7z/../../../Common/Defs.h \ + ../../Archive/7z/../../../Windows/PropVariant.h \ + ../../Archive/7z/../../../Windows/../Common/MyWindows.h \ + ../../Archive/7z/../../../Windows/../Common/Types.h \ + ../../Archive/7z/../../Common/MethodProps.h \ + ../../Archive/7z/../../Common/../../Common/MyVector.h \ + ../../Archive/7z/../../Common/../../Windows/PropVariant.h \ + ../../Archive/7z/../../Common/MethodId.h \ + ../../Archive/7z/../../Common/../../Common/Types.h \ + ../../Archive/7z/7zEncode.h ../../Archive/7z/../Common/CoderMixer2.h \ + ../../Archive/7z/../Common/../../../Common/MyVector.h \ + ../../Archive/7z/../Common/../../../Common/Types.h \ + ../../Archive/7z/../Common/../../../Common/MyCom.h \ + ../../Archive/7z/../Common/../../ICoder.h \ + ../../Archive/7z/../Common/../../IStream.h \ + ../../Archive/7z/../Common/CoderMixer2MT.h \ + ../../Archive/7z/../Common/CoderMixer2.h \ + ../../Archive/7z/../Common/../../Common/StreamBinder.h \ + ../../Archive/7z/../Common/../../Common/../IStream.h \ + ../../Archive/7z/../Common/../../Common/../../Windows/Synchronization.h \ + ../../Archive/7z/../Common/../../Common/../../Windows/Defs.h \ + ../../Archive/7z/../Common/../../Common/../../Windows/../Common/MyWindows.h \ + ../../Archive/7z/../Common/../../Common/../../Windows/../../C/Threads.h \ + ../../Archive/7z/../Common/../../Common/../../Windows/../../C/Types.h \ + ../../Archive/7z/../Common/../../Common/../../Windows/Synchronization2.h \ + ../../Archive/7z/../Common/../../Common/VirtThread.h \ + ../../Archive/7z/../Common/../../Common/../../Windows/Thread.h \ + ../../Archive/7z/7zItem.h ../../Archive/7z/../../../Common/Buffer.h \ + ../../Archive/7z/../../Common/MethodId.h ../../Archive/7z/7zHeader.h \ + ../../Archive/7z/../../../Common/Types.h \ + ../../Archive/7z/../../Common/CreateCoder.h \ + ../../Archive/7z/../../Common/../../Common/MyString.h \ + ../../Archive/7z/../../Common/../ICoder.h \ + ../../Archive/7z/../../Common/OutBuffer.h \ + ../../Archive/7z/../../Common/../../Common/MyException.h +7zProperties.o: ../../Archive/7z/7zProperties.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../Archive/7z/7zProperties.h ../../Archive/7z/../../PropID.h \ + ../../Archive/7z/7zHeader.h ../../Archive/7z/../../../Common/Types.h \ + ../../Archive/7z/7zHandler.h ../../Archive/7z/../../ICoder.h \ + ../../Archive/7z/../../IStream.h \ + ../../Archive/7z/../../../Common/MyUnknown.h \ + ../../Archive/7z/../../../Common/MyWindows.h \ + ../../Archive/7z/../../../Common/Types.h ../../Archive/7z/../../IDecl.h \ + ../../Archive/7z/../IArchive.h ../../Archive/7z/../../IProgress.h \ + ../../Archive/7z/../../IStream.h ../../Archive/7z/../../PropID.h \ + ../../Archive/7z/../../Common/CreateCoder.h \ + ../../Archive/7z/../../Common/../../Common/MyCom.h \ + ../../Archive/7z/../../Common/../../Common/MyWindows.h \ + ../../Archive/7z/../../Common/../../Common/MyString.h \ + ../../Archive/7z/../../Common/../../Common/MyVector.h \ + ../../Archive/7z/../../Common/../../Common/Defs.h \ + ../../Archive/7z/../../Common/../ICoder.h \ + ../../Archive/7z/../../Common/MethodId.h \ + ../../Archive/7z/../../Common/../../Common/Types.h \ + ../../Archive/7z/../Common/HandlerOut.h \ + ../../Archive/7z/../Common/../../../Common/MyString.h \ + ../../Archive/7z/../Common/../../Common/MethodProps.h \ + ../../Archive/7z/../Common/../../Common/../../Common/MyVector.h \ + ../../Archive/7z/../Common/../../Common/../../Windows/PropVariant.h \ + ../../Archive/7z/../Common/../../Common/../../Windows/../Common/MyWindows.h \ + ../../Archive/7z/../Common/../../Common/../../Windows/../Common/Types.h \ + ../../Archive/7z/../Common/../../Common/MethodId.h \ + ../../Archive/7z/7zCompressionMode.h \ + ../../Archive/7z/../../../Common/MyString.h \ + ../../Archive/7z/../../../Windows/PropVariant.h \ + ../../Archive/7z/../../Common/MethodProps.h ../../Archive/7z/7zIn.h \ + ../../Archive/7z/../../../Common/MyCom.h \ + ../../Archive/7z/../../IPassword.h ../../Archive/7z/../../IStream.h \ + ../../Archive/7z/../../Common/InBuffer.h \ + ../../Archive/7z/../../Common/../IStream.h \ + ../../Archive/7z/../../Common/../../Common/MyException.h \ + ../../Archive/7z/7zItem.h ../../Archive/7z/../../../Common/Buffer.h \ + ../../Archive/7z/../../../Common/Defs.h \ + ../../Archive/7z/../../Common/MethodId.h +7zSpecStream.o: ../../Archive/7z/7zSpecStream.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../Archive/7z/7zSpecStream.h ../../Archive/7z/../../IStream.h \ + ../../Archive/7z/../../../Common/MyUnknown.h \ + ../../Archive/7z/../../../Common/MyWindows.h \ + ../../Archive/7z/../../../Common/Types.h ../../Archive/7z/../../IDecl.h \ + ../../Archive/7z/../../ICoder.h ../../Archive/7z/../../IStream.h \ + ../../Archive/7z/../../../Common/MyCom.h +7zUpdate.o: ../../Archive/7z/7zUpdate.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h \ + ../../Archive/7z/../../../../C/CpuArch.h \ + ../../Archive/7z/../../../../C/Types.h \ + ../../Archive/7z/../../Common/LimitedStreams.h \ + ../../Archive/7z/../../Common/../../Common/MyCom.h \ + ../../Archive/7z/../../Common/../../Common/MyWindows.h \ + ../../Archive/7z/../../Common/../../Common/MyVector.h \ + ../../Archive/7z/../../Common/../../Common/Defs.h \ + ../../Archive/7z/../../Common/../IStream.h \ + ../../Archive/7z/../../Common/../../Common/MyUnknown.h \ + ../../Archive/7z/../../Common/../../Common/Types.h \ + ../../Archive/7z/../../Common/../IDecl.h \ + ../../Archive/7z/../../Common/ProgressUtils.h \ + ../../Archive/7z/../../Common/../ICoder.h \ + ../../Archive/7z/../../Common/../IStream.h \ + ../../Archive/7z/../../Common/../IProgress.h \ + ../../Archive/7z/../../Common/CreateCoder.h \ + ../../Archive/7z/../../Common/../../Common/MyString.h \ + ../../Archive/7z/../../Common/../../Common/MyVector.h \ + ../../Archive/7z/../../Common/MethodId.h \ + ../../Archive/7z/../../Common/../../Common/Types.h \ + ../../Archive/7z/../../Compress/CopyCoder.h \ + ../../Archive/7z/../../Compress/../../Common/MyCom.h \ + ../../Archive/7z/../../Compress/../ICoder.h \ + ../../Archive/7z/../Common/ItemNameUtils.h \ + ../../Archive/7z/../Common/../../../Common/MyString.h \ + ../../Archive/7z/../Common/OutStreamWithCRC.h \ + ../../Archive/7z/../Common/../../../../C/7zCrc.h \ + ../../Archive/7z/../Common/../../../../C/Types.h \ + ../../Archive/7z/../Common/../../../Common/MyCom.h \ + ../../Archive/7z/../Common/../../IStream.h ../../Archive/7z/7zDecode.h \ + ../../Archive/7z/../../IStream.h ../../Archive/7z/../../IPassword.h \ + ../../Archive/7z/../../../Common/MyUnknown.h \ + ../../Archive/7z/../../../Common/Types.h ../../Archive/7z/../../IDecl.h \ + ../../Archive/7z/../Common/CoderMixer2.h \ + ../../Archive/7z/../Common/../../../Common/MyVector.h \ + ../../Archive/7z/../Common/../../../Common/Types.h \ + ../../Archive/7z/../Common/../../ICoder.h \ + ../../Archive/7z/../Common/CoderMixer2MT.h \ + ../../Archive/7z/../Common/CoderMixer2.h \ + ../../Archive/7z/../Common/../../Common/StreamBinder.h \ + ../../Archive/7z/../Common/../../Common/../IStream.h \ + ../../Archive/7z/../Common/../../Common/../../Windows/Synchronization.h \ + ../../Archive/7z/../Common/../../Common/../../Windows/Defs.h \ + ../../Archive/7z/../Common/../../Common/../../Windows/../Common/MyWindows.h \ + ../../Archive/7z/../Common/../../Common/../../Windows/../../C/Threads.h \ + ../../Archive/7z/../Common/../../Common/../../Windows/../../C/Types.h \ + ../../Archive/7z/../Common/../../Common/../../Windows/Synchronization2.h \ + ../../Archive/7z/../Common/../../Common/VirtThread.h \ + ../../Archive/7z/../Common/../../Common/../../Windows/Thread.h \ + ../../Archive/7z/7zItem.h ../../Archive/7z/../../../Common/Buffer.h \ + ../../Archive/7z/../../../Common/Defs.h \ + ../../Archive/7z/../../../Common/MyString.h \ + ../../Archive/7z/../../Common/MethodId.h ../../Archive/7z/7zHeader.h \ + ../../Archive/7z/../../../Common/Types.h ../../Archive/7z/7zEncode.h \ + ../../Archive/7z/7zCompressionMode.h \ + ../../Archive/7z/../../../Windows/PropVariant.h \ + ../../Archive/7z/../../../Windows/../Common/MyWindows.h \ + ../../Archive/7z/../../../Windows/../Common/Types.h \ + ../../Archive/7z/../../Common/MethodProps.h \ + ../../Archive/7z/../../Common/../../Windows/PropVariant.h \ + ../../Archive/7z/7zFolderInStream.h ../../Archive/7z/../../ICoder.h \ + ../../Archive/7z/../IArchive.h ../../Archive/7z/../../IProgress.h \ + ../../Archive/7z/../../IStream.h ../../Archive/7z/../../PropID.h \ + ../../Archive/7z/../Common/InStreamWithCRC.h \ + ../../Archive/7z/7zHandler.h ../../Archive/7z/../Common/HandlerOut.h \ + ../../Archive/7z/../Common/../../Common/MethodProps.h \ + ../../Archive/7z/7zIn.h ../../Archive/7z/../../../Common/MyCom.h \ + ../../Archive/7z/../../Common/InBuffer.h \ + ../../Archive/7z/../../Common/../../Common/MyException.h \ + ../../Archive/7z/7zOut.h ../../Archive/7z/../../Common/OutBuffer.h \ + ../../Archive/7z/7zUpdate.h ../../../Windows/FileIO.h \ + ../../../Common/MyString.h +7zRegister.o: ../../Archive/7z/7zRegister.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h \ + ../../Archive/7z/../../Common/RegisterArc.h \ + ../../Archive/7z/../../Common/../Archive/IArchive.h \ + ../../Archive/7z/../../Common/../Archive/../IProgress.h \ + ../../Archive/7z/../../Common/../Archive/../../Common/MyUnknown.h \ + ../../Archive/7z/../../Common/../Archive/../../Common/MyWindows.h \ + ../../Archive/7z/../../Common/../Archive/../../Common/Types.h \ + ../../Archive/7z/../../Common/../Archive/../IDecl.h \ + ../../Archive/7z/../../Common/../Archive/../IStream.h \ + ../../Archive/7z/../../Common/../Archive/../PropID.h \ + ../../Archive/7z/7zHandler.h ../../Archive/7z/../../ICoder.h \ + ../../Archive/7z/../../IStream.h ../../Archive/7z/../IArchive.h \ + ../../Archive/7z/../../Common/CreateCoder.h \ + ../../Archive/7z/../../Common/../../Common/MyCom.h \ + ../../Archive/7z/../../Common/../../Common/MyWindows.h \ + ../../Archive/7z/../../Common/../../Common/MyString.h \ + ../../Archive/7z/../../Common/../../Common/MyVector.h \ + ../../Archive/7z/../../Common/../../Common/Defs.h \ + ../../Archive/7z/../../Common/../ICoder.h \ + ../../Archive/7z/../../Common/MethodId.h \ + ../../Archive/7z/../../Common/../../Common/Types.h \ + ../../Archive/7z/../Common/HandlerOut.h \ + ../../Archive/7z/../Common/../../../Common/MyString.h \ + ../../Archive/7z/../Common/../../Common/MethodProps.h \ + ../../Archive/7z/../Common/../../Common/../../Common/MyVector.h \ + ../../Archive/7z/../Common/../../Common/../../Windows/PropVariant.h \ + ../../Archive/7z/../Common/../../Common/../../Windows/../Common/MyWindows.h \ + ../../Archive/7z/../Common/../../Common/../../Windows/../Common/Types.h \ + ../../Archive/7z/../Common/../../Common/MethodId.h \ + ../../Archive/7z/7zCompressionMode.h \ + ../../Archive/7z/../../../Common/MyString.h \ + ../../Archive/7z/../../../Windows/PropVariant.h \ + ../../Archive/7z/../../Common/MethodProps.h ../../Archive/7z/7zIn.h \ + ../../Archive/7z/../../../Common/MyCom.h \ + ../../Archive/7z/../../IPassword.h \ + ../../Archive/7z/../../../Common/MyUnknown.h \ + ../../Archive/7z/../../../Common/Types.h ../../Archive/7z/../../IDecl.h \ + ../../Archive/7z/../../IStream.h \ + ../../Archive/7z/../../Common/InBuffer.h \ + ../../Archive/7z/../../Common/../IStream.h \ + ../../Archive/7z/../../Common/../../Common/MyException.h \ + ../../Archive/7z/7zItem.h ../../Archive/7z/../../../Common/Buffer.h \ + ../../Archive/7z/../../../Common/Defs.h \ + ../../Archive/7z/../../Common/MethodId.h ../../Archive/7z/7zHeader.h \ + ../../Archive/7z/../../../Common/Types.h +Bcj2Coder.o: ../../Compress/Bcj2Coder.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../Compress/../../../C/Alloc.h \ + ../../Compress/Bcj2Coder.h ../../Compress/../../Common/MyCom.h \ + ../../Compress/../../Common/MyWindows.h ../../Compress/../ICoder.h \ + ../../Compress/../IStream.h ../../Compress/../../Common/MyUnknown.h \ + ../../Compress/../../Common/Types.h ../../Compress/../IDecl.h \ + ../../Compress/RangeCoderBit.h ../../Compress/RangeCoder.h \ + ../../Compress/../Common/InBuffer.h \ + ../../Compress/../Common/../IStream.h \ + ../../Compress/../Common/../../Common/MyCom.h \ + ../../Compress/../Common/../../Common/MyException.h \ + ../../Compress/../Common/../../Common/MyWindows.h \ + ../../Compress/../Common/OutBuffer.h +Bcj2Register.o: ../../Compress/Bcj2Register.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../Compress/../Common/RegisterCodec.h \ + ../../Compress/../Common/../Common/MethodId.h \ + ../../Compress/../Common/../Common/../../Common/Types.h \ + ../../Compress/Bcj2Coder.h ../../Compress/../../Common/MyCom.h \ + ../../Compress/../../Common/MyWindows.h ../../Compress/../ICoder.h \ + ../../Compress/../IStream.h ../../Compress/../../Common/MyUnknown.h \ + ../../Compress/../../Common/Types.h ../../Compress/../IDecl.h \ + ../../Compress/RangeCoderBit.h ../../Compress/RangeCoder.h \ + ../../Compress/../Common/InBuffer.h \ + ../../Compress/../Common/../IStream.h \ + ../../Compress/../Common/../../Common/MyCom.h \ + ../../Compress/../Common/../../Common/MyException.h \ + ../../Compress/../Common/../../Common/MyWindows.h \ + ../../Compress/../Common/OutBuffer.h +BcjCoder.o: ../../Compress/BcjCoder.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../Compress/BcjCoder.h \ + ../../Compress/../../../C/Bra.h ../../Compress/../../../C/Types.h \ + ../../Compress/BranchCoder.h ../../Compress/../../Common/MyCom.h \ + ../../Compress/../../Common/MyWindows.h ../../Compress/../ICoder.h \ + ../../Compress/../IStream.h ../../Compress/../../Common/MyUnknown.h \ + ../../Compress/../../Common/Types.h ../../Compress/../IDecl.h +BcjRegister.o: ../../Compress/BcjRegister.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h \ + ../../Compress/../Common/RegisterCodec.h \ + ../../Compress/../Common/../Common/MethodId.h \ + ../../Compress/../Common/../Common/../../Common/Types.h \ + ../../Compress/BcjCoder.h ../../Compress/../../../C/Bra.h \ + ../../Compress/../../../C/Types.h ../../Compress/BranchCoder.h \ + ../../Compress/../../Common/MyCom.h \ + ../../Compress/../../Common/MyWindows.h ../../Compress/../ICoder.h \ + ../../Compress/../IStream.h ../../Compress/../../Common/MyUnknown.h \ + ../../Compress/../../Common/Types.h ../../Compress/../IDecl.h +BranchCoder.o: ../../Compress/BranchCoder.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../Compress/BranchCoder.h \ + ../../Compress/../../Common/MyCom.h \ + ../../Compress/../../Common/MyWindows.h ../../Compress/../ICoder.h \ + ../../Compress/../IStream.h ../../Compress/../../Common/MyUnknown.h \ + ../../Compress/../../Common/Types.h ../../Compress/../IDecl.h +BranchMisc.o: ../../Compress/BranchMisc.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../Compress/../../../C/Bra.h \ + ../../Compress/../../../C/Types.h ../../Compress/BranchMisc.h \ + ../../Compress/BranchCoder.h ../../Compress/../../Common/MyCom.h \ + ../../Compress/../../Common/MyWindows.h ../../Compress/../ICoder.h \ + ../../Compress/../IStream.h ../../Compress/../../Common/MyUnknown.h \ + ../../Compress/../../Common/Types.h ../../Compress/../IDecl.h +BranchRegister.o: ../../Compress/BranchRegister.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../Compress/../Common/RegisterCodec.h \ + ../../Compress/../Common/../Common/MethodId.h \ + ../../Compress/../Common/../Common/../../Common/Types.h \ + ../../Compress/BranchMisc.h ../../Compress/BranchCoder.h \ + ../../Compress/../../Common/MyCom.h \ + ../../Compress/../../Common/MyWindows.h ../../Compress/../ICoder.h \ + ../../Compress/../IStream.h ../../Compress/../../Common/MyUnknown.h \ + ../../Compress/../../Common/Types.h ../../Compress/../IDecl.h +ByteSwap.o: ../../Compress/ByteSwap.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../Compress/../../Common/MyCom.h \ + ../../Compress/../../Common/MyWindows.h ../../Compress/../ICoder.h \ + ../../Compress/../IStream.h ../../Compress/../../Common/MyUnknown.h \ + ../../Compress/../../Common/Types.h ../../Compress/../IDecl.h \ + ../../Compress/../Common/RegisterCodec.h \ + ../../Compress/../Common/../Common/MethodId.h \ + ../../Compress/../Common/../Common/../../Common/Types.h +CopyCoder.o: ../../Compress/CopyCoder.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../Compress/../../../C/Alloc.h \ + ../../Compress/../Common/StreamUtils.h \ + ../../Compress/../Common/../IStream.h \ + ../../Compress/../Common/../../Common/MyUnknown.h \ + ../../Compress/../Common/../../Common/MyWindows.h \ + ../../Compress/../Common/../../Common/Types.h \ + ../../Compress/../Common/../IDecl.h ../../Compress/CopyCoder.h \ + ../../Compress/../../Common/MyCom.h \ + ../../Compress/../../Common/MyWindows.h ../../Compress/../ICoder.h \ + ../../Compress/../IStream.h +CopyRegister.o: ../../Compress/CopyRegister.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../Compress/../Common/RegisterCodec.h \ + ../../Compress/../Common/../Common/MethodId.h \ + ../../Compress/../Common/../Common/../../Common/Types.h \ + ../../Compress/CopyCoder.h ../../Compress/../../Common/MyCom.h \ + ../../Compress/../../Common/MyWindows.h ../../Compress/../ICoder.h \ + ../../Compress/../IStream.h ../../Compress/../../Common/MyUnknown.h \ + ../../Compress/../../Common/Types.h ../../Compress/../IDecl.h +DeltaFilter.o: ../../Compress/DeltaFilter.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../Compress/../../../C/Delta.h \ + ../../Compress/../../../C/Types.h \ + ../../Compress/../Common/RegisterCodec.h \ + ../../Compress/../Common/../Common/MethodId.h \ + ../../Compress/../Common/../Common/../../Common/Types.h \ + ../../Compress/BranchCoder.h ../../Compress/../../Common/MyCom.h \ + ../../Compress/../../Common/MyWindows.h ../../Compress/../ICoder.h \ + ../../Compress/../IStream.h ../../Compress/../../Common/MyUnknown.h \ + ../../Compress/../../Common/Types.h ../../Compress/../IDecl.h +Lzma2Decoder.o: ../../Compress/Lzma2Decoder.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../Compress/../../../C/Alloc.h ../../Compress/../Common/StreamUtils.h \ + ../../Compress/../Common/../IStream.h \ + ../../Compress/../Common/../../Common/MyUnknown.h \ + ../../Compress/../Common/../../Common/MyWindows.h \ + ../../Compress/../Common/../../Common/Types.h \ + ../../Compress/../Common/../IDecl.h ../../Compress/Lzma2Decoder.h \ + ../../Compress/../../../C/Lzma2Dec.h ../../Compress/../../../C/LzmaDec.h \ + ../../Compress/../../../C/Types.h ../../Compress/../../Common/MyCom.h \ + ../../Compress/../../Common/MyWindows.h ../../Compress/../ICoder.h \ + ../../Compress/../IStream.h +Lzma2Encoder.o: ../../Compress/Lzma2Encoder.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../Compress/../../../C/Alloc.h ../../Compress/../Common/CWrappers.h \ + ../../Compress/../Common/../ICoder.h \ + ../../Compress/../Common/../IStream.h \ + ../../Compress/../Common/../../Common/MyUnknown.h \ + ../../Compress/../Common/../../Common/MyWindows.h \ + ../../Compress/../Common/../../Common/Types.h \ + ../../Compress/../Common/../IDecl.h \ + ../../Compress/../Common/../../Common/MyCom.h \ + ../../Compress/../Common/StreamUtils.h \ + ../../Compress/../Common/../IStream.h ../../Compress/Lzma2Encoder.h \ + ../../Compress/../../../C/Lzma2Enc.h ../../Compress/../../../C/LzmaEnc.h \ + ../../Compress/../../../C/Types.h ../../Compress/../../Common/MyCom.h \ + ../../Compress/../ICoder.h +Lzma2Register.o: ../../Compress/Lzma2Register.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../Compress/../Common/RegisterCodec.h \ + ../../Compress/../Common/../Common/MethodId.h \ + ../../Compress/../Common/../Common/../../Common/Types.h \ + ../../Compress/Lzma2Decoder.h ../../Compress/../../../C/Lzma2Dec.h \ + ../../Compress/../../../C/LzmaDec.h ../../Compress/../../../C/Types.h \ + ../../Compress/../../Common/MyCom.h \ + ../../Compress/../../Common/MyWindows.h ../../Compress/../ICoder.h \ + ../../Compress/../IStream.h ../../Compress/../../Common/MyUnknown.h \ + ../../Compress/../../Common/Types.h ../../Compress/../IDecl.h \ + ../../Compress/Lzma2Encoder.h ../../Compress/../../../C/Lzma2Enc.h \ + ../../Compress/../../../C/LzmaEnc.h +LzmaDecoder.o: ../../Compress/LzmaDecoder.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../Compress/../../../C/Alloc.h \ + ../../Compress/../Common/StreamUtils.h \ + ../../Compress/../Common/../IStream.h \ + ../../Compress/../Common/../../Common/MyUnknown.h \ + ../../Compress/../Common/../../Common/MyWindows.h \ + ../../Compress/../Common/../../Common/Types.h \ + ../../Compress/../Common/../IDecl.h ../../Compress/LzmaDecoder.h \ + ../../Compress/../../../C/LzmaDec.h ../../Compress/../../../C/Types.h \ + ../../Compress/../../Common/MyCom.h \ + ../../Compress/../../Common/MyWindows.h ../../Compress/../ICoder.h \ + ../../Compress/../IStream.h +LzmaEncoder.o: ../../Compress/LzmaEncoder.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../Compress/../../../C/Alloc.h \ + ../../Compress/../Common/CWrappers.h \ + ../../Compress/../Common/../ICoder.h \ + ../../Compress/../Common/../IStream.h \ + ../../Compress/../Common/../../Common/MyUnknown.h \ + ../../Compress/../Common/../../Common/MyWindows.h \ + ../../Compress/../Common/../../Common/Types.h \ + ../../Compress/../Common/../IDecl.h \ + ../../Compress/../Common/../../Common/MyCom.h \ + ../../Compress/../Common/StreamUtils.h \ + ../../Compress/../Common/../IStream.h ../../Compress/LzmaEncoder.h \ + ../../Compress/../../../C/LzmaEnc.h ../../Compress/../../../C/Types.h \ + ../../Compress/../../Common/MyCom.h ../../Compress/../ICoder.h +LzmaRegister.o: ../../Compress/LzmaRegister.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../Compress/../Common/RegisterCodec.h \ + ../../Compress/../Common/../Common/MethodId.h \ + ../../Compress/../Common/../Common/../../Common/Types.h \ + ../../Compress/LzmaDecoder.h ../../Compress/../../../C/LzmaDec.h \ + ../../Compress/../../../C/Types.h ../../Compress/../../Common/MyCom.h \ + ../../Compress/../../Common/MyWindows.h ../../Compress/../ICoder.h \ + ../../Compress/../IStream.h ../../Compress/../../Common/MyUnknown.h \ + ../../Compress/../../Common/Types.h ../../Compress/../IDecl.h \ + ../../Compress/LzmaEncoder.h ../../Compress/../../../C/LzmaEnc.h diff --git a/CPP/7zip/Bundles/Alone7z/makefile.list b/CPP/7zip/Bundles/Alone7z/makefile.list new file mode 100644 index 0000000..0fd3912 --- /dev/null +++ b/CPP/7zip/Bundles/Alone7z/makefile.list @@ -0,0 +1,158 @@ +SRCS=\ + ../../../myWindows/wine_date_and_time.cpp \ + ../../../myWindows/myAddExeFlag.cpp \ + ../../../myWindows/mySplitCommandLine.cpp \ + \ + ../../UI/Console/BenchCon.cpp \ + ../../UI/Console/ConsoleClose.cpp \ + ../../UI/Console/ExtractCallbackConsole.cpp \ + ../../UI/Console/List.cpp \ + ../../UI/Console/Main.cpp \ + ../../UI/Console/MainAr.cpp \ + ../../UI/Console/OpenCallbackConsole.cpp \ + ../../UI/Console/PercentPrinter.cpp \ + ../../UI/Console/UpdateCallbackConsole.cpp \ + ../../UI/Console/UserInputUtils.cpp \ + \ + ../../../Common/CommandLineParser.cpp \ + ../../../Common/CRC.cpp \ + ../../../Common/IntToString.cpp \ + ../../../Common/ListFileUtils.cpp \ + ../../../Common/StdInStream.cpp \ + ../../../Common/StdOutStream.cpp \ + ../../../Common/MyString.cpp \ + ../../../Common/MyWindows.cpp \ + ../../../Common/StringConvert.cpp \ + ../../../Common/StringToInt.cpp \ + ../../../Common/UTFConvert.cpp \ + ../../../Common/MyVector.cpp \ + ../../../Common/Wildcard.cpp \ + \ + ../../../Windows/Error.cpp \ + ../../../Windows/FileDir.cpp \ + ../../../Windows/FileFind.cpp \ + ../../../Windows/FileIO.cpp \ + ../../../Windows/FileName.cpp \ + ../../../Windows/PropVariant.cpp \ + ../../../Windows/PropVariantConversions.cpp \ + ../../../Windows/Synchronization.cpp \ + ../../../Windows/System.cpp \ + ../../../Windows/Time.cpp \ + \ + ../../Common/CreateCoder.cpp \ + ../../Common/CWrappers.cpp \ + ../../Common/FilePathAutoRename.cpp \ + ../../Common/FileStreams.cpp \ + ../../Common/FilterCoder.cpp \ + ../../Common/InBuffer.cpp \ + ../../Common/InOutTempBuffer.cpp \ + ../../Common/LimitedStreams.cpp \ + ../../Common/LockedStream.cpp \ + ../../Common/MethodId.cpp \ + ../../Common/MethodProps.cpp \ + ../../Common/OffsetStream.cpp \ + ../../Common/OutBuffer.cpp \ + ../../Common/OutMemStream.cpp \ + ../../Common/ProgressUtils.cpp \ + ../../Common/StreamBinder.cpp \ + ../../Common/StreamObjects.cpp \ + ../../Common/StreamUtils.cpp \ + ../../Common/VirtThread.cpp \ + \ + ../../UI/Common/ArchiveCommandLine.cpp \ + ../../UI/Common/ArchiveExtractCallback.cpp \ + ../../UI/Common/ArchiveOpenCallback.cpp \ + ../../UI/Common/Bench.cpp \ + ../../UI/Common/DefaultName.cpp \ + ../../UI/Common/EnumDirItems.cpp \ + ../../UI/Common/Extract.cpp \ + ../../UI/Common/ExtractingFilePath.cpp \ + ../../UI/Common/LoadCodecs.cpp \ + ../../UI/Common/OpenArchive.cpp \ + ../../UI/Common/PropIDUtils.cpp \ + ../../UI/Common/SetProperties.cpp \ + ../../UI/Common/SortUtils.cpp \ + ../../UI/Common/TempFiles.cpp \ + ../../UI/Common/Update.cpp \ + ../../UI/Common/UpdateAction.cpp \ + ../../UI/Common/UpdateCallback.cpp \ + ../../UI/Common/UpdatePair.cpp \ + ../../UI/Common/UpdateProduce.cpp \ + \ + ../../Archive/ZHandler.cpp \ + ../../Archive/LzmaHandler.cpp \ + ../../Archive/SplitHandler.cpp \ + ../../Archive/XzHandler.cpp \ + \ + ../../Archive/Common/CoderMixer2.cpp \ + ../../Archive/Common/CoderMixer2MT.cpp \ + ../../Archive/Common/CrossThreadProgress.cpp \ + ../../Archive/Common/DummyOutStream.cpp \ + ../../Archive/Common/HandlerOut.cpp \ + ../../Archive/Common/InStreamWithCRC.cpp \ + ../../Archive/Common/ItemNameUtils.cpp \ + ../../Archive/Common/MultiStream.cpp \ + ../../Archive/Common/OutStreamWithCRC.cpp \ + ../../Archive/Common/ParseProperties.cpp \ + \ + ../../Archive/7z/7zCompressionMode.cpp \ + ../../Archive/7z/7zDecode.cpp \ + ../../Archive/7z/7zEncode.cpp \ + ../../Archive/7z/7zExtract.cpp \ + ../../Archive/7z/7zFolderInStream.cpp \ + ../../Archive/7z/7zFolderOutStream.cpp \ + ../../Archive/7z/7zHandler.cpp \ + ../../Archive/7z/7zHandlerOut.cpp \ + ../../Archive/7z/7zHeader.cpp \ + ../../Archive/7z/7zIn.cpp \ + ../../Archive/7z/7zOut.cpp \ + ../../Archive/7z/7zProperties.cpp \ + ../../Archive/7z/7zSpecStream.cpp \ + ../../Archive/7z/7zUpdate.cpp \ + ../../Archive/7z/7zRegister.cpp \ + \ + ../../Compress/Bcj2Coder.cpp \ + ../../Compress/Bcj2Register.cpp \ + ../../Compress/BcjCoder.cpp \ + ../../Compress/BcjRegister.cpp \ + ../../Compress/BranchCoder.cpp \ + ../../Compress/BranchMisc.cpp \ + ../../Compress/BranchRegister.cpp \ + ../../Compress/ByteSwap.cpp \ + ../../Compress/CopyCoder.cpp \ + ../../Compress/CopyRegister.cpp \ + ../../Compress/DeltaFilter.cpp \ + ../../Compress/Lzma2Decoder.cpp \ + ../../Compress/Lzma2Encoder.cpp \ + ../../Compress/Lzma2Register.cpp \ + ../../Compress/LzmaDecoder.cpp \ + ../../Compress/LzmaEncoder.cpp \ + ../../Compress/LzmaRegister.cpp + +SRCS_C=\ + ../../../../C/7zStream.c \ + ../../../../C/Alloc.c \ + ../../../../C/Bra.c \ + ../../../../C/Bra86.c \ + ../../../../C/BraIA64.c \ + ../../../../C/Delta.c \ + ../../../../C/Lzma2Dec.c \ + ../../../../C/Lzma2Enc.c \ + ../../../../C/LzmaDec.c \ + ../../../../C/LzmaEnc.c \ + ../../../../C/LzFind.c \ + ../../../../C/LzFindMt.c \ + ../../../../C/MtCoder.c \ + ../../../../C/Sha256.c \ + ../../../../C/Threads.c \ + ../../../../C/Xz.c \ + ../../../../C/XzCrc64.c \ + ../../../../C/XzDec.c \ + ../../../../C/XzEnc.c \ + ../../../../C/XzIn.c \ + +include ../../../../makefile.rules + +Main.o : ../../UI/Console/Main.cpp + $(CXX) $(CXXFLAGS) ../../UI/Console/Main.cpp + diff --git a/CPP/7zip/Bundles/AloneGCOV/makefile b/CPP/7zip/Bundles/AloneGCOV/makefile new file mode 100644 index 0000000..2623b62 --- /dev/null +++ b/CPP/7zip/Bundles/AloneGCOV/makefile @@ -0,0 +1,279 @@ + +# gcov *.c *.cpp + + +LOCAL_FLAGS=-fprofile-arcs -ftest-coverage \ + -DBREAK_HANDLER \ + -DUNICODE -D_UNICODE \ + -I../../Archive \ + -I../../Archive/7z \ + -I../../Archive/BZip2 \ + -I../../Archive/Common \ + -I../../Archive/GZip \ + -I../../Archive/Cab \ + -I../../Archive/Lzma \ + -I../../Archive/Tar \ + -I../../Archive/Zip \ + -I../../Archive/Split \ + -I../../Archive/Z \ + -I../../Compress \ + -I../../Crypto \ + -I../../UI/Console \ + -I../../UI/Common \ + -I../../../Windows \ + -I../../../Common \ + -I../../../7zip/Common \ + -I../../../../C \ +-I../../../myWindows \ +-I../../../ \ +-I../../../include_windows + +include ../../../../makefile.machine + + +SRCS=\ + ../../../myWindows/myGetTickCount.cpp \ + ../../../myWindows/wine_date_and_time.cpp \ + ../../../myWindows/myAddExeFlag.cpp \ + ../../../myWindows/mySplitCommandLine.cpp \ + \ + ../../UI/Console/BenchCon.cpp \ + ../../UI/Console/ConsoleClose.cpp \ + ../../UI/Console/ExtractCallbackConsole.cpp \ + ../../UI/Console/List.cpp \ + ../../UI/Console/Main.cpp \ + ../../UI/Console/MainAr.cpp \ + ../../UI/Console/OpenCallbackConsole.cpp \ + ../../UI/Console/PercentPrinter.cpp \ + ../../UI/Console/UpdateCallbackConsole.cpp \ + ../../UI/Console/UserInputUtils.cpp \ + \ + ../../../Common/CommandLineParser.cpp \ + ../../../Common/CRC.cpp \ + ../../../Common/IntToString.cpp \ + ../../../Common/ListFileUtils.cpp \ + ../../../Common/StdInStream.cpp \ + ../../../Common/StdOutStream.cpp \ + ../../../Common/MyString.cpp \ + ../../../Common/MyWindows.cpp \ + ../../../Common/StringConvert.cpp \ + ../../../Common/StringToInt.cpp \ + ../../../Common/UTFConvert.cpp \ + ../../../Common/MyVector.cpp \ + ../../../Common/Wildcard.cpp \ + \ + ../../../Windows/Error.cpp \ + ../../../Windows/FileDir.cpp \ + ../../../Windows/FileFind.cpp \ + ../../../Windows/FileIO.cpp \ + ../../../Windows/FileName.cpp \ + ../../../Windows/PropVariant.cpp \ + ../../../Windows/PropVariantConversions.cpp \ + ../../../Windows/Synchronization.cpp \ + ../../../Windows/System.cpp \ + ../../../Windows/Time.cpp \ + \ + ../../Common/CreateCoder.cpp \ + ../../Common/CWrappers.cpp \ + ../../Common/FilePathAutoRename.cpp \ + ../../Common/FileStreams.cpp \ + ../../Common/FilterCoder.cpp \ + ../../Common/InBuffer.cpp \ + ../../Common/InOutTempBuffer.cpp \ + ../../Common/LimitedStreams.cpp \ + ../../Common/LockedStream.cpp \ + ../../Common/MemBlocks.cpp \ + ../../Common/MethodId.cpp \ + ../../Common/MethodProps.cpp \ + ../../Common/OffsetStream.cpp \ + ../../Common/OutBuffer.cpp \ + ../../Common/OutMemStream.cpp \ + ../../Common/ProgressMt.cpp \ + ../../Common/ProgressUtils.cpp \ + ../../Common/StreamBinder.cpp \ + ../../Common/StreamObjects.cpp \ + ../../Common/StreamUtils.cpp \ + ../../Common/VirtThread.cpp \ + \ + ../../UI/Common/ArchiveCommandLine.cpp \ + ../../UI/Common/ArchiveExtractCallback.cpp \ + ../../UI/Common/ArchiveOpenCallback.cpp \ + ../../UI/Common/Bench.cpp \ + ../../UI/Common/DefaultName.cpp \ + ../../UI/Common/EnumDirItems.cpp \ + ../../UI/Common/Extract.cpp \ + ../../UI/Common/ExtractingFilePath.cpp \ + ../../UI/Common/LoadCodecs.cpp \ + ../../UI/Common/OpenArchive.cpp \ + ../../UI/Common/PropIDUtils.cpp \ + ../../UI/Common/SetProperties.cpp \ + ../../UI/Common/SortUtils.cpp \ + ../../UI/Common/TempFiles.cpp \ + ../../UI/Common/Update.cpp \ + ../../UI/Common/UpdateAction.cpp \ + ../../UI/Common/UpdateCallback.cpp \ + ../../UI/Common/UpdatePair.cpp \ + ../../UI/Common/UpdateProduce.cpp \ + \ + ../../Archive/Bz2Handler.cpp \ + ../../Archive/DeflateProps.cpp \ + ../../Archive/GzHandler.cpp \ + ../../Archive/LzmaHandler.cpp \ + ../../Archive/PpmdHandler.cpp \ + ../../Archive/SplitHandler.cpp \ + ../../Archive/XzHandler.cpp \ + ../../Archive/ZHandler.cpp \ + \ + ../../Archive/Common/CoderMixer2.cpp \ + ../../Archive/Common/CoderMixer2MT.cpp \ + ../../Archive/Common/CrossThreadProgress.cpp \ + ../../Archive/Common/DummyOutStream.cpp \ + ../../Archive/Common/FindSignature.cpp \ + ../../Archive/Common/HandlerOut.cpp \ + ../../Archive/Common/InStreamWithCRC.cpp \ + ../../Archive/Common/ItemNameUtils.cpp \ + ../../Archive/Common/MultiStream.cpp \ + ../../Archive/Common/OutStreamWithCRC.cpp \ + ../../Archive/Common/ParseProperties.cpp \ + \ + ../../Archive/7z/7zCompressionMode.cpp \ + ../../Archive/7z/7zDecode.cpp \ + ../../Archive/7z/7zEncode.cpp \ + ../../Archive/7z/7zExtract.cpp \ + ../../Archive/7z/7zFolderInStream.cpp \ + ../../Archive/7z/7zFolderOutStream.cpp \ + ../../Archive/7z/7zHandler.cpp \ + ../../Archive/7z/7zHandlerOut.cpp \ + ../../Archive/7z/7zHeader.cpp \ + ../../Archive/7z/7zIn.cpp \ + ../../Archive/7z/7zOut.cpp \ + ../../Archive/7z/7zProperties.cpp \ + ../../Archive/7z/7zSpecStream.cpp \ + ../../Archive/7z/7zUpdate.cpp \ + ../../Archive/7z/7zRegister.cpp \ + \ + ../../Archive/Cab/CabBlockInStream.cpp \ + ../../Archive/Cab/CabHandler.cpp \ + ../../Archive/Cab/CabHeader.cpp \ + ../../Archive/Cab/CabIn.cpp \ + ../../Archive/Cab/CabRegister.cpp \ + \ + ../../Archive/Tar/TarHandler.cpp \ + ../../Archive/Tar/TarHandlerOut.cpp \ + ../../Archive/Tar/TarHeader.cpp \ + ../../Archive/Tar/TarIn.cpp \ + ../../Archive/Tar/TarOut.cpp \ + ../../Archive/Tar/TarRegister.cpp \ + ../../Archive/Tar/TarUpdate.cpp \ + \ + ../../Archive/Zip/ZipAddCommon.cpp \ + ../../Archive/Zip/ZipHandler.cpp \ + ../../Archive/Zip/ZipHandlerOut.cpp \ + ../../Archive/Zip/ZipHeader.cpp \ + ../../Archive/Zip/ZipIn.cpp \ + ../../Archive/Zip/ZipItem.cpp \ + ../../Archive/Zip/ZipOut.cpp \ + ../../Archive/Zip/ZipUpdate.cpp \ + ../../Archive/Zip/ZipRegister.cpp \ + \ + ../../Compress/Bcj2Coder.cpp \ + ../../Compress/Bcj2Register.cpp \ + ../../Compress/BcjCoder.cpp \ + ../../Compress/BcjRegister.cpp \ + ../../Compress/BitlDecoder.cpp \ + ../../Compress/BranchCoder.cpp \ + ../../Compress/BranchMisc.cpp \ + ../../Compress/BranchRegister.cpp \ + ../../Compress/ByteSwap.cpp \ + ../../Compress/BZip2Crc.cpp \ + ../../Compress/BZip2Decoder.cpp \ + ../../Compress/BZip2Encoder.cpp \ + ../../Compress/BZip2Register.cpp \ + ../../Compress/CopyCoder.cpp \ + ../../Compress/CopyRegister.cpp \ + ../../Compress/Deflate64Register.cpp \ + ../../Compress/DeflateDecoder.cpp \ + ../../Compress/DeflateEncoder.cpp \ + ../../Compress/DeflateRegister.cpp \ + ../../Compress/DeltaFilter.cpp \ + ../../Compress/ImplodeDecoder.cpp \ + ../../Compress/ImplodeHuffmanDecoder.cpp \ + ../../Compress/Lzma2Decoder.cpp \ + ../../Compress/Lzma2Encoder.cpp \ + ../../Compress/Lzma2Register.cpp \ + ../../Compress/LzmaDecoder.cpp \ + ../../Compress/LzmaEncoder.cpp \ + ../../Compress/LzmaRegister.cpp \ + ../../Compress/LzOutWindow.cpp \ + ../../Compress/Lzx86Converter.cpp \ + ../../Compress/LzxDecoder.cpp \ + ../../Compress/PpmdDecoder.cpp \ + ../../Compress/PpmdEncoder.cpp \ + ../../Compress/PpmdRegister.cpp \ + ../../Compress/PpmdZip.cpp \ + ../../Compress/QuantumDecoder.cpp \ + ../../Compress/ShrinkDecoder.cpp \ + ../../Compress/ZDecoder.cpp \ + \ + ../../Crypto/7zAes.cpp \ + ../../Crypto/7zAesRegister.cpp \ + ../../Crypto/HmacSha1.cpp \ + ../../Crypto/MyAes.cpp \ + ../../Crypto/Pbkdf2HmacSha1.cpp \ + ../../Crypto/RandGen.cpp \ + ../../Crypto/Sha1.cpp \ + ../../Crypto/WzAes.cpp \ + ../../Crypto/ZipCrypto.cpp \ + ../../Crypto/ZipStrong.cpp + + +SRCS_C=\ + ../../../../C/Aes.c \ + ../../../../C/7zStream.c \ + ../../../../C/Alloc.c \ + ../../../../C/Bra.c \ + ../../../../C/Bra86.c \ + ../../../../C/BraIA64.c \ + ../../../../C/BwtSort.c \ + ../../../../C/Delta.c \ + ../../../../C/HuffEnc.c \ + ../../../../C/LzFind.c \ + ../../../../C/LzFindMt.c \ + ../../../../C/Lzma2Dec.c \ + ../../../../C/Lzma2Enc.c \ + ../../../../C/LzmaDec.c \ + ../../../../C/LzmaEnc.c \ + ../../../../C/MtCoder.c \ + ../../../../C/Ppmd7.c \ + ../../../../C/Ppmd7Dec.c \ + ../../../../C/Ppmd7Enc.c \ + ../../../../C/Ppmd8.c \ + ../../../../C/Ppmd8Dec.c \ + ../../../../C/Ppmd8Enc.c \ + ../../../../C/Sha256.c \ + ../../../../C/Sort.c \ + ../../../../C/Threads.c \ + ../../../../C/Xz.c \ + ../../../../C/XzCrc64.c \ + ../../../../C/XzDec.c \ + ../../../../C/XzEnc.c \ + ../../../../C/XzIn.c \ +../../../../C/7zCrc.c \ +../../../../C/7zCrcOpt.c + + +all : copy 7za.exe + +7za.exe: + $(CXX) -c *.cpp + $(CC) -c *.c + $(CXX) *.o -o 7za.exe $(LOCAL_LIBS) + ld -r *.o -o 7za.ld + nm -u -C 7za.ld > 7za.undefined +copy: + rm -f *.cpp *.c + cp -p $(SRCS) $(SRCS_C) . + +clean: + rm -f 7za.exe 7za.ld 7za.undefined *.cpp *.c *.gcov *.gcda *.gcno *.o core *~ + diff --git a/CPP/7zip/Bundles/Format7zFree/makefile b/CPP/7zip/Bundles/Format7zFree/makefile new file mode 100644 index 0000000..30a9e0b --- /dev/null +++ b/CPP/7zip/Bundles/Format7zFree/makefile @@ -0,0 +1,328 @@ +PROG=../../../../bin/7z.so + +LOCAL_FLAGS=\ + $(CC_SHARED) \ + -DEXTERNAL_CODECS \ + -DUNICODE -D_UNICODE + +include ../../../../makefile.crc32 +include ../../../../makefile.machine + +PCH_NAME=$(PRE_COMPILED_HEADER) + +LOCAL_SHARED=$(LINK_SHARED) +LIBS=$(LOCAL_LIBS_DLL) + +# NewHandler.o +COMMON_OBJS = \ + CRC.o \ + IntToString.o \ + MyMap.o \ + MyString.o \ + MyWindows.o \ + MyXml.o \ + StringConvert.o \ + StringToInt.o \ + MyVector.o \ + UTFConvert.o \ + Wildcard.o \ + +WIN_OBJS = \ + FileDir.o \ + FileFind.o \ + FileIO.o \ + PropVariant.o \ + PropVariantUtils.o \ + Synchronization.o \ + System.o \ + Time.o \ + +7ZIP_COMMON_OBJS = \ + InBuffer.o \ + InOutTempBuffer.o \ + CreateCoder.o \ + CWrappers.o \ + FilterCoder.o \ + LimitedStreams.o \ + LockedStream.o \ + MethodId.o \ + MethodProps.o \ + MemBlocks.o \ + OffsetStream.o \ + OutBuffer.o \ + OutMemStream.o \ + ProgressMt.o \ + ProgressUtils.o \ + StreamBinder.o \ + StreamObjects.o \ + StreamUtils.o \ + VirtThread.o \ + +AR_OBJS = \ + ArchiveExports.o \ + DllExports2.o \ + ApmHandler.o \ + ArjHandler.o \ + Bz2Handler.o \ + CpioHandler.o \ + CramfsHandler.o \ + DebHandler.o \ + DeflateProps.o \ + DmgHandler.o \ + ElfHandler.o \ + FatHandler.o \ + FlvHandler.o \ + GzHandler.o \ + LzhHandler.o \ + LzmaHandler.o \ + MachoHandler.o \ + MbrHandler.o \ + MslzHandler.o \ + MubHandler.o \ + NtfsHandler.o \ + PeHandler.o \ + PpmdHandler.o \ + RpmHandler.o \ + SplitHandler.o \ + SwfHandler.o \ + SquashfsHandler.o \ + VhdHandler.o \ + XarHandler.o \ + XzHandler.o \ + ZHandler.o \ + +AR_COMMON_OBJS = \ + CoderMixer2.o \ + CoderMixer2MT.o \ + CrossThreadProgress.o \ + DummyOutStream.o \ + FindSignature.o \ + InStreamWithCRC.o \ + ItemNameUtils.o \ + MultiStream.o \ + OutStreamWithCRC.o \ + OutStreamWithSha1.o \ + HandlerOut.o \ + ParseProperties.o \ + + +7Z_OBJS = \ + 7zCompressionMode.o \ + 7zDecode.o \ + 7zEncode.o \ + 7zExtract.o \ + 7zFolderInStream.o \ + 7zFolderOutStream.o \ + 7zHandler.o \ + 7zHandlerOut.o \ + 7zHeader.o \ + 7zIn.o \ + 7zOut.o \ + 7zProperties.o \ + 7zSpecStream.o \ + 7zUpdate.o \ + 7zRegister.o \ + +CAB_OBJS = \ + CabBlockInStream.o \ + CabHandler.o \ + CabHeader.o \ + CabIn.o \ + CabRegister.o \ + +CHM_OBJS = \ + ChmHandler.o \ + ChmHeader.o \ + ChmIn.o \ + ChmRegister.o \ + +COM_OBJS = \ + ComHandler.o \ + ComIn.o \ + ComRegister.o \ + +HFS_OBJS = \ + HfsHandler.o \ + HfsIn.o \ + HfsRegister.o \ + +ISO_OBJS = \ + IsoHandler.o \ + IsoHeader.o \ + IsoIn.o \ + IsoRegister.o \ + +NSIS_OBJS = \ + NsisDecode.o \ + NsisHandler.o \ + NsisIn.o \ + NsisRegister.o \ + +RAR_OBJS = \ + RarHandler.o \ + RarHeader.o \ + RarIn.o \ + RarItem.o \ + RarVolumeInStream.o \ + RarRegister.o \ + +TAR_OBJS = \ + TarHandler.o \ + TarHandlerOut.o \ + TarHeader.o \ + TarIn.o \ + TarOut.o \ + TarUpdate.o \ + TarRegister.o \ + +UDF_OBJS = \ + UdfHandler.o \ + UdfIn.o \ + UdfRegister.o \ + +WIM_OBJS = \ + WimHandler.o \ + WimHandlerOut.o \ + WimIn.o \ + WimRegister.o \ + +ZIP_OBJS = \ + ZipAddCommon.o \ + ZipHandler.o \ + ZipHandlerOut.o \ + ZipHeader.o \ + ZipIn.o \ + ZipItem.o \ + ZipOut.o \ + ZipUpdate.o \ + ZipRegister.o \ + +COMPRESS_OBJS = \ + CodecExports.o \ + ArjDecoder1.o \ + ArjDecoder2.o \ + Bcj2Coder.o \ + Bcj2Register.o \ + BcjCoder.o \ + BcjRegister.o \ + BitlDecoder.o \ + BranchCoder.o \ + BranchMisc.o \ + BranchRegister.o \ + ByteSwap.o \ + BZip2Crc.o \ + BZip2Decoder.o \ + BZip2Encoder.o \ + BZip2Register.o \ + CopyCoder.o \ + CopyRegister.o \ + Deflate64Register.o \ + DeflateDecoder.o \ + DeflateEncoder.o \ + DeflateRegister.o \ + DeltaFilter.o \ + Lzma2Decoder.o \ + Lzma2Encoder.o \ + Lzma2Register.o \ + ImplodeDecoder.o \ + ImplodeHuffmanDecoder.o \ + LzhDecoder.o \ + LzmaDecoder.o \ + LzmaEncoder.o \ + LzmaRegister.o \ + LzOutWindow.o \ + Lzx86Converter.o \ + LzxDecoder.o \ + PpmdDecoder.o \ + PpmdEncoder.o \ + PpmdRegister.o \ + PpmdZip.o \ + QuantumDecoder.o \ + ShrinkDecoder.o \ + ZlibDecoder.o \ + ZlibEncoder.o \ + ZDecoder.o \ + +COMPRESS_OBJS_NON_FREE = \ + Rar1Decoder.o \ + Rar2Decoder.o \ + Rar3Decoder.o \ + Rar3Vm.o \ + RarCodecsRegister.o \ + +CRYPTO_OBJS = \ + 7zAes.o \ + 7zAesRegister.o \ + HmacSha1.o \ + MyAes.o \ + Pbkdf2HmacSha1.o \ + RandGen.o \ + Rar20Crypto.o \ + RarAes.o \ + Sha1.o \ + WzAes.o \ + ZipCrypto.o \ + ZipStrong.o \ + + +C_OBJS = \ + 7zBuf2.o \ + 7zStream.o \ + Aes.o \ + Alloc.o \ + Bra.o \ + Bra86.o \ + BraIA64.o \ + BwtSort.o \ + Delta.o \ + HuffEnc.o \ + LzFind.o \ + LzFindMt.o \ + Lzma2Dec.o \ + Lzma2Enc.o \ + LzmaDec.o \ + LzmaEnc.o \ + MtCoder.o \ + Ppmd7.o \ + Ppmd7Dec.o \ + Ppmd7Enc.o \ + Ppmd8.o \ + Ppmd8Dec.o \ + Ppmd8Enc.o \ + Sha256.o \ + Sort.o \ + Threads.o \ + Xz.o \ + XzCrc64.o \ + XzDec.o \ + XzEnc.o \ + XzIn.o \ + + +OBJS = \ + wine_date_and_time.o \ + myGetTickCount.o \ + $(COMMON_OBJS) \ + $(WIN_OBJS) \ + $(7ZIP_COMMON_OBJS) \ + $(AR_OBJS) \ + $(AR_COMMON_OBJS) \ + $(7Z_OBJS) \ + $(CAB_OBJS) \ + $(CHM_OBJS) \ + $(COM_OBJS) \ + $(HFS_OBJS) \ + $(ISO_OBJS) \ + $(NSIS_OBJS) \ + $(RAR_OBJS) \ + $(TAR_OBJS) \ + $(UDF_OBJS) \ + $(WIM_OBJS) \ + $(ZIP_OBJS) \ + $(COMPRESS_OBJS) \ + $(CRYPTO_OBJS) \ + $(C_OBJS) \ + $(OBJ_CRC32) \ + +include ../../../../makefile.glb + diff --git a/CPP/7zip/Bundles/Format7zFree/makefile.depend b/CPP/7zip/Bundles/Format7zFree/makefile.depend new file mode 100644 index 0000000..8e6cf4a --- /dev/null +++ b/CPP/7zip/Bundles/Format7zFree/makefile.depend @@ -0,0 +1,4962 @@ +myGetTickCount.o: ../../../myWindows/myGetTickCount.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h +wine_date_and_time.o: ../../../myWindows/wine_date_and_time.cpp \ + ../../../myWindows/config.h ../../../include_windows/windows.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../include_windows/basetyps.h +CRC.o: ../../../Common/CRC.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../../Common/../../C/7zCrc.h \ + ../../../Common/../../C/Types.h +IntToString.o: ../../../Common/IntToString.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../../Common/IntToString.h +MyMap.o: ../../../Common/MyMap.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../../Common/MyMap.h \ + ../../../Common/MyVector.h ../../../Common/Defs.h +MyString.o: ../../../Common/MyString.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../../Common/StringConvert.h \ + ../../../Common/MyWindows.h ../../../Common/MyString.h \ + ../../../Common/MyVector.h ../../../Common/Defs.h \ + ../../../myWindows/myPrivate.h +MyWindows.o: ../../../Common/MyWindows.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../../Common/MyWindows.h +MyXml.o: ../../../Common/MyXml.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../../Common/MyXml.h \ + ../../../Common/MyString.h ../../../Common/MyVector.h \ + ../../../Common/Defs.h +StringConvert.o: ../../../Common/StringConvert.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../../Common/StringConvert.h ../../../Common/MyWindows.h \ + ../../../Common/MyString.h ../../../Common/MyVector.h \ + ../../../Common/Defs.h +StringToInt.o: ../../../Common/StringToInt.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../../Common/StringToInt.h +UTFConvert.o: ../../../Common/UTFConvert.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../../Common/UTFConvert.h \ + ../../../Common/MyString.h ../../../Common/MyVector.h \ + ../../../Common/Defs.h +MyVector.o: ../../../Common/MyVector.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../../Common/MyVector.h \ + ../../../Common/Defs.h +Wildcard.o: ../../../Common/Wildcard.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../../Common/Wildcard.h \ + ../../../Common/MyString.h ../../../Common/MyVector.h \ + ../../../Common/Defs.h +FileDir.o: ../../../Windows/FileDir.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../../Windows/FileDir.h \ + ../../../Windows/../Common/MyString.h \ + ../../../Windows/../Common/MyVector.h ../../../Windows/../Common/Defs.h \ + ../../../Windows/Defs.h ../../../Windows/../Common/MyWindows.h \ + ../../../Windows/FileName.h ../../../Windows/../../C/Types.h \ + ../../../Windows/FileFind.h ../../../Windows/../Common/StringConvert.h \ + ../../../Windows/../Common/MyWindows.h \ + ../../../Windows/../Common/MyString.h ../../../Windows/../Common/Types.h \ + ../../../Windows/../Common/IntToString.h ../../../myWindows/myPrivate.h \ + ../../../Windows/Synchronization.h ../../../Windows/../../C/Threads.h \ + ../../../Windows/../../C/Types.h ../../../Windows/Synchronization2.h +FileFind.o: ../../../Windows/FileFind.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../../Windows/FileFind.h \ + ../../../Windows/../Common/MyString.h \ + ../../../Windows/../Common/MyVector.h ../../../Windows/../Common/Defs.h \ + ../../../Windows/FileName.h ../../../Windows/../../C/Types.h \ + ../../../Windows/Defs.h ../../../Windows/../Common/MyWindows.h \ + ../../../Windows/../Common/StringConvert.h \ + ../../../Windows/../Common/MyWindows.h \ + ../../../Windows/../Common/MyString.h ../../../Windows/../Common/Types.h \ + ../../../myWindows/myPrivate.h +FileIO.o: ../../../Windows/FileIO.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../../Windows/FileIO.h \ + ../../../Common/MyString.h ../../../Common/MyVector.h \ + ../../../Common/Defs.h ../../../Windows/Defs.h \ + ../../../Windows/../Common/MyWindows.h \ + ../../../Windows/../Common/StringConvert.h \ + ../../../Windows/../Common/MyWindows.h \ + ../../../Windows/../Common/MyString.h ../../../Windows/../Common/Types.h \ + ../../../myWindows/myPrivate.h +PropVariant.o: ../../../Windows/PropVariant.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../../Windows/PropVariant.h ../../../Windows/../Common/MyWindows.h \ + ../../../Windows/../Common/Types.h ../../../Windows/../Common/Defs.h +PropVariantUtils.o: ../../../Windows/PropVariantUtils.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../../Windows/PropVariantUtils.h ../../../Common/MyString.h \ + ../../../Common/MyVector.h ../../../Common/Defs.h \ + ../../../Windows/PropVariant.h ../../../Windows/../Common/MyWindows.h \ + ../../../Windows/../Common/Types.h ../../../Common/StringConvert.h \ + ../../../Common/MyWindows.h ../../../Common/MyString.h \ + ../../../Common/IntToString.h +Synchronization.o: ../../../Windows/Synchronization.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../../Windows/Synchronization.h ../../../Windows/Defs.h \ + ../../../Windows/../Common/MyWindows.h \ + ../../../Windows/../../C/Threads.h ../../../Windows/../../C/Types.h \ + ../../../Windows/Synchronization2.h +System.o: ../../../Windows/System.cpp ../../../Common/Types.h \ + ../../../Common/../../C/Types.h +Time.o: ../../../Windows/Time.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../../Windows/Time.h \ + ../../../Windows/Defs.h ../../../Windows/../Common/MyWindows.h +InBuffer.o: ../../Common/InBuffer.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../Common/../../../C/Alloc.h \ + ../../Common/InBuffer.h ../../Common/../IStream.h \ + ../../Common/../../Common/MyUnknown.h \ + ../../Common/../../Common/MyWindows.h ../../Common/../../Common/Types.h \ + ../../Common/../IDecl.h ../../Common/../../Common/MyCom.h \ + ../../Common/../../Common/MyException.h +InOutTempBuffer.o: ../../Common/InOutTempBuffer.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../Common/../../../C/7zCrc.h ../../Common/../../../C/Types.h \ + ../../Common/InOutTempBuffer.h ../../Common/../../Common/MyCom.h \ + ../../Common/../../Common/MyWindows.h \ + ../../Common/../../Windows/FileDir.h \ + ../../Common/../../Windows/../Common/MyString.h \ + ../../Common/../../Windows/../Common/MyVector.h \ + ../../Common/../../Windows/../Common/Defs.h \ + ../../Common/../../Windows/Defs.h \ + ../../Common/../../Windows/../Common/MyWindows.h \ + ../../Common/../../Windows/FileIO.h ../../../Common/MyString.h \ + ../../Common/../IStream.h ../../Common/../../Common/MyUnknown.h \ + ../../Common/../../Common/Types.h ../../Common/../IDecl.h \ + ../../Common/StreamUtils.h +CreateCoder.o: ../../Common/CreateCoder.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../Common/../../Windows/Defs.h \ + ../../Common/../../Windows/../Common/MyWindows.h \ + ../../Common/../../Windows/PropVariant.h \ + ../../Common/../../Windows/../Common/Types.h ../../Common/CreateCoder.h \ + ../../Common/../../Common/MyCom.h ../../Common/../../Common/MyWindows.h \ + ../../Common/../../Common/MyString.h \ + ../../Common/../../Common/MyVector.h ../../Common/../../Common/Defs.h \ + ../../Common/../ICoder.h ../../Common/../IStream.h \ + ../../Common/../../Common/MyUnknown.h ../../Common/../../Common/Types.h \ + ../../Common/../IDecl.h ../../Common/MethodId.h \ + ../../Common/../../Common/Types.h ../../Common/FilterCoder.h \ + ../../Common/../IPassword.h ../../Common/RegisterCodec.h \ + ../../Common/../Common/MethodId.h +CWrappers.o: ../../Common/CWrappers.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../Common/../../../C/Alloc.h \ + ../../Common/CWrappers.h ../../Common/../ICoder.h \ + ../../Common/../IStream.h ../../Common/../../Common/MyUnknown.h \ + ../../Common/../../Common/MyWindows.h ../../Common/../../Common/Types.h \ + ../../Common/../IDecl.h ../../Common/../../Common/MyCom.h \ + ../../Common/StreamUtils.h ../../Common/../IStream.h +FilterCoder.o: ../../Common/FilterCoder.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../Common/../../../C/Alloc.h \ + ../../Common/../../Common/Defs.h ../../Common/FilterCoder.h \ + ../../Common/../../Common/MyCom.h ../../Common/../../Common/MyWindows.h \ + ../../Common/../ICoder.h ../../Common/../IStream.h \ + ../../Common/../../Common/MyUnknown.h ../../Common/../../Common/Types.h \ + ../../Common/../IDecl.h ../../Common/../IPassword.h \ + ../../Common/StreamUtils.h ../../Common/../IStream.h +LimitedStreams.o: ../../Common/LimitedStreams.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../Common/LimitedStreams.h ../../Common/../../Common/MyCom.h \ + ../../Common/../../Common/MyWindows.h \ + ../../Common/../../Common/MyVector.h ../../Common/../../Common/Defs.h \ + ../../Common/../IStream.h ../../Common/../../Common/MyUnknown.h \ + ../../Common/../../Common/Types.h ../../Common/../IDecl.h \ + ../../Common/../../Common/Defs.h +LockedStream.o: ../../Common/LockedStream.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../Common/LockedStream.h \ + ../../Common/../../Windows/Synchronization.h \ + ../../Common/../../Windows/Defs.h \ + ../../Common/../../Windows/../Common/MyWindows.h \ + ../../Common/../../Windows/../../C/Threads.h \ + ../../Common/../../Windows/../../C/Types.h \ + ../../Common/../../Windows/Synchronization2.h \ + ../../Common/../../Common/MyCom.h ../../Common/../../Common/MyWindows.h \ + ../../Common/../IStream.h ../../Common/../../Common/MyUnknown.h \ + ../../Common/../../Common/Types.h ../../Common/../IDecl.h +MethodId.o: ../../Common/MethodId.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../Common/MethodId.h \ + ../../Common/../../Common/Types.h ../../Common/../../Common/MyString.h \ + ../../Common/../../Common/MyVector.h ../../Common/../../Common/Defs.h +MethodProps.o: ../../Common/MethodProps.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../Common/../../Common/MyCom.h \ + ../../Common/../../Common/MyWindows.h ../../Common/../ICoder.h \ + ../../Common/../IStream.h ../../Common/../../Common/MyUnknown.h \ + ../../Common/../../Common/Types.h ../../Common/../IDecl.h \ + ../../Common/MethodProps.h ../../Common/../../Common/MyVector.h \ + ../../Common/../../Common/Defs.h \ + ../../Common/../../Windows/PropVariant.h \ + ../../Common/../../Windows/../Common/MyWindows.h \ + ../../Common/../../Windows/../Common/Types.h ../../Common/MethodId.h \ + ../../Common/../../Common/Types.h +MemBlocks.o: ../../Common/MemBlocks.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../Common/../../../C/Alloc.h \ + ../../Common/MemBlocks.h ../../../Common/MyVector.h \ + ../../../Common/Defs.h ../../../Windows/Synchronization.h \ + ../../../Windows/Defs.h ../../../Windows/../Common/MyWindows.h \ + ../../../Windows/../../C/Threads.h ../../../Windows/../../C/Types.h \ + ../../../Windows/Synchronization2.h ../../Common/../IStream.h \ + ../../Common/../../Common/MyUnknown.h \ + ../../Common/../../Common/MyWindows.h ../../Common/../../Common/Types.h \ + ../../Common/../IDecl.h ../../Common/StreamUtils.h +OffsetStream.o: ../../Common/OffsetStream.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../../Common/Defs.h \ + ../../Common/OffsetStream.h ../../../Common/MyCom.h \ + ../../../Common/MyWindows.h ../../Common/../IStream.h \ + ../../Common/../../Common/MyUnknown.h \ + ../../Common/../../Common/MyWindows.h ../../Common/../../Common/Types.h \ + ../../Common/../IDecl.h +OutBuffer.o: ../../Common/OutBuffer.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../Common/../../../C/Alloc.h \ + ../../Common/OutBuffer.h ../../Common/../IStream.h \ + ../../Common/../../Common/MyUnknown.h \ + ../../Common/../../Common/MyWindows.h ../../Common/../../Common/Types.h \ + ../../Common/../IDecl.h ../../Common/../../Common/MyCom.h \ + ../../Common/../../Common/MyException.h +OutMemStream.o: ../../Common/OutMemStream.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../Common/OutMemStream.h \ + ../../../Common/MyCom.h ../../../Common/MyWindows.h \ + ../../Common/MemBlocks.h ../../../Common/MyVector.h \ + ../../../Common/Defs.h ../../../Windows/Synchronization.h \ + ../../../Windows/Defs.h ../../../Windows/../Common/MyWindows.h \ + ../../../Windows/../../C/Threads.h ../../../Windows/../../C/Types.h \ + ../../../Windows/Synchronization2.h ../../Common/../IStream.h \ + ../../Common/../../Common/MyUnknown.h \ + ../../Common/../../Common/MyWindows.h ../../Common/../../Common/Types.h \ + ../../Common/../IDecl.h +ProgressMt.o: ../../Common/ProgressMt.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../Common/ProgressMt.h \ + ../../Common/../../Common/MyCom.h ../../Common/../../Common/MyWindows.h \ + ../../Common/../../Common/MyVector.h ../../Common/../../Common/Defs.h \ + ../../Common/../../Windows/Synchronization.h \ + ../../Common/../../Windows/Defs.h \ + ../../Common/../../Windows/../Common/MyWindows.h \ + ../../Common/../../Windows/../../C/Threads.h \ + ../../Common/../../Windows/../../C/Types.h \ + ../../Common/../../Windows/Synchronization2.h ../../Common/../ICoder.h \ + ../../Common/../IStream.h ../../Common/../../Common/MyUnknown.h \ + ../../Common/../../Common/Types.h ../../Common/../IDecl.h \ + ../../Common/../IProgress.h +ProgressUtils.o: ../../Common/ProgressUtils.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../Common/ProgressUtils.h ../../Common/../../Common/MyCom.h \ + ../../Common/../../Common/MyWindows.h ../../Common/../ICoder.h \ + ../../Common/../IStream.h ../../Common/../../Common/MyUnknown.h \ + ../../Common/../../Common/Types.h ../../Common/../IDecl.h \ + ../../Common/../IProgress.h +StreamBinder.o: ../../Common/StreamBinder.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../Common/StreamBinder.h \ + ../../Common/../IStream.h ../../Common/../../Common/MyUnknown.h \ + ../../Common/../../Common/MyWindows.h ../../Common/../../Common/Types.h \ + ../../Common/../IDecl.h ../../Common/../../Windows/Synchronization.h \ + ../../Common/../../Windows/Defs.h \ + ../../Common/../../Windows/../Common/MyWindows.h \ + ../../Common/../../Windows/../../C/Threads.h \ + ../../Common/../../Windows/../../C/Types.h \ + ../../Common/../../Windows/Synchronization2.h \ + ../../Common/../../Common/Defs.h ../../Common/../../Common/MyCom.h +StreamObjects.o: ../../Common/StreamObjects.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../Common/../../../C/Alloc.h ../../Common/StreamObjects.h \ + ../../Common/../../Common/Buffer.h ../../Common/../../Common/Defs.h \ + ../../Common/../../Common/MyCom.h ../../Common/../../Common/MyWindows.h \ + ../../Common/../IStream.h ../../Common/../../Common/MyUnknown.h \ + ../../Common/../../Common/Types.h ../../Common/../IDecl.h +StreamUtils.o: ../../Common/StreamUtils.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../Common/StreamUtils.h \ + ../../Common/../IStream.h ../../Common/../../Common/MyUnknown.h \ + ../../Common/../../Common/MyWindows.h ../../Common/../../Common/Types.h \ + ../../Common/../IDecl.h +VirtThread.o: ../../Common/VirtThread.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../Common/VirtThread.h \ + ../../Common/../../Windows/Synchronization.h \ + ../../Common/../../Windows/Defs.h \ + ../../Common/../../Windows/../Common/MyWindows.h \ + ../../Common/../../Windows/../../C/Threads.h \ + ../../Common/../../Windows/../../C/Types.h \ + ../../Common/../../Windows/Synchronization2.h \ + ../../Common/../../Windows/Thread.h +ArchiveExports.o: ../../Archive/ArchiveExports.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../Archive/../../Common/ComTry.h \ + ../../Archive/../../Common/MyWindows.h \ + ../../Archive/../../Windows/PropVariant.h \ + ../../Archive/../../Windows/../Common/MyWindows.h \ + ../../Archive/../../Windows/../Common/Types.h \ + ../../Archive/../Common/RegisterArc.h \ + ../../Archive/../Common/../Archive/IArchive.h \ + ../../Archive/../Common/../Archive/../IProgress.h \ + ../../Archive/../Common/../Archive/../../Common/MyUnknown.h \ + ../../Archive/../Common/../Archive/../../Common/MyWindows.h \ + ../../Archive/../Common/../Archive/../../Common/Types.h \ + ../../Archive/../Common/../Archive/../IDecl.h \ + ../../Archive/../Common/../Archive/../IStream.h \ + ../../Archive/../Common/../Archive/../PropID.h +DllExports2.o: ../../Archive/DllExports2.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../Archive/../../Common/MyInitGuid.h \ + ../../Archive/../../Common/MyGuidDef.h \ + ../../Archive/../../Common/ComTry.h \ + ../../Archive/../../Common/MyWindows.h \ + ../../Archive/../../Windows/NtCheck.h \ + ../../Archive/../../Windows/PropVariant.h \ + ../../Archive/../../Windows/../Common/MyWindows.h \ + ../../Archive/../../Windows/../Common/Types.h ../../Archive/../ICoder.h \ + ../../Archive/../IStream.h ../../Archive/../../Common/MyUnknown.h \ + ../../Archive/../../Common/Types.h ../../Archive/../IDecl.h \ + ../../Archive/../IPassword.h ../../Archive/IArchive.h \ + ../../Archive/../IProgress.h ../../Archive/../IStream.h \ + ../../Archive/../PropID.h +ApmHandler.o: ../../Archive/ApmHandler.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../Archive/../../../C/CpuArch.h \ + ../../Archive/../../../C/Types.h ../../../Common/ComTry.h \ + ../../../Common/MyWindows.h ../../../Common/IntToString.h \ + ../../../Common/MyString.h ../../../Common/MyVector.h \ + ../../../Common/Defs.h ../../../Windows/PropVariant.h \ + ../../../Windows/../Common/MyWindows.h \ + ../../../Windows/../Common/Types.h \ + ../../Archive/../Common/LimitedStreams.h \ + ../../Archive/../Common/../../Common/MyCom.h \ + ../../Archive/../Common/../../Common/MyWindows.h \ + ../../Archive/../Common/../../Common/MyVector.h \ + ../../Archive/../Common/../IStream.h \ + ../../Archive/../Common/../../Common/MyUnknown.h \ + ../../Archive/../Common/../../Common/Types.h \ + ../../Archive/../Common/../IDecl.h \ + ../../Archive/../Common/ProgressUtils.h \ + ../../Archive/../Common/../ICoder.h ../../Archive/../Common/../IStream.h \ + ../../Archive/../Common/../IProgress.h \ + ../../Archive/../Common/RegisterArc.h \ + ../../Archive/../Common/../Archive/IArchive.h \ + ../../Archive/../Common/../Archive/../IProgress.h \ + ../../Archive/../Common/../Archive/../IStream.h \ + ../../Archive/../Common/../Archive/../PropID.h \ + ../../Archive/../Common/StreamUtils.h \ + ../../Archive/../Compress/CopyCoder.h \ + ../../Archive/../Compress/../../Common/MyCom.h \ + ../../Archive/../Compress/../ICoder.h +ArjHandler.o: ../../Archive/ArjHandler.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../Archive/../../../C/CpuArch.h \ + ../../Archive/../../../C/Types.h ../../../Common/ComTry.h \ + ../../../Common/MyWindows.h ../../../Common/StringConvert.h \ + ../../../Common/MyString.h ../../../Common/MyVector.h \ + ../../../Common/Defs.h ../../../Windows/PropVariant.h \ + ../../../Windows/../Common/MyWindows.h \ + ../../../Windows/../Common/Types.h ../../../Windows/Time.h \ + ../../Archive/../Common/LimitedStreams.h \ + ../../Archive/../Common/../../Common/MyCom.h \ + ../../Archive/../Common/../../Common/MyWindows.h \ + ../../Archive/../Common/../../Common/MyVector.h \ + ../../Archive/../Common/../IStream.h \ + ../../Archive/../Common/../../Common/MyUnknown.h \ + ../../Archive/../Common/../../Common/Types.h \ + ../../Archive/../Common/../IDecl.h \ + ../../Archive/../Common/ProgressUtils.h \ + ../../Archive/../Common/../ICoder.h ../../Archive/../Common/../IStream.h \ + ../../Archive/../Common/../IProgress.h \ + ../../Archive/../Common/RegisterArc.h \ + ../../Archive/../Common/../Archive/IArchive.h \ + ../../Archive/../Common/../Archive/../IProgress.h \ + ../../Archive/../Common/../Archive/../IStream.h \ + ../../Archive/../Common/../Archive/../PropID.h \ + ../../Archive/../Common/StreamObjects.h \ + ../../Archive/../Common/../../Common/Buffer.h \ + ../../Archive/../Common/../../Common/Defs.h \ + ../../Archive/../Common/StreamUtils.h \ + ../../Archive/../Compress/ArjDecoder1.h \ + ../../Archive/../Compress/../../Common/MyCom.h \ + ../../Archive/../Compress/../ICoder.h \ + ../../Archive/../Compress/../Common/InBuffer.h \ + ../../Archive/../Compress/../Common/../IStream.h \ + ../../Archive/../Compress/../Common/../../Common/MyCom.h \ + ../../Archive/../Compress/../Common/../../Common/MyException.h \ + ../../Archive/../Compress/../Common/../../Common/MyWindows.h \ + ../../Archive/../Compress/BitmDecoder.h \ + ../../Archive/../Compress/../IStream.h \ + ../../Archive/../Compress/LzOutWindow.h \ + ../../Archive/../Compress/../Common/OutBuffer.h \ + ../../Archive/../Compress/ArjDecoder2.h \ + ../../Archive/../Compress/CopyCoder.h \ + ../../Archive/Common/ItemNameUtils.h \ + ../../Archive/Common/../../../Common/MyString.h \ + ../../Archive/Common/OutStreamWithCRC.h \ + ../../Archive/Common/../../../../C/7zCrc.h \ + ../../Archive/Common/../../../../C/Types.h \ + ../../Archive/Common/../../../Common/MyCom.h \ + ../../Archive/Common/../../IStream.h +Bz2Handler.o: ../../Archive/Bz2Handler.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../../Common/ComTry.h \ + ../../../Common/MyWindows.h ../../../Windows/PropVariant.h \ + ../../../Windows/../Common/MyWindows.h \ + ../../../Windows/../Common/Types.h ../../Archive/../../Windows/System.h \ + ../../Archive/../../Windows/../Common/Types.h \ + ../../Archive/../Common/CreateCoder.h \ + ../../Archive/../Common/../../Common/MyCom.h \ + ../../Archive/../Common/../../Common/MyWindows.h \ + ../../Archive/../Common/../../Common/MyString.h \ + ../../Archive/../Common/../../Common/MyVector.h \ + ../../Archive/../Common/../../Common/Defs.h \ + ../../Archive/../Common/../ICoder.h ../../Archive/../Common/../IStream.h \ + ../../Archive/../Common/../../Common/MyUnknown.h \ + ../../Archive/../Common/../../Common/Types.h \ + ../../Archive/../Common/../IDecl.h ../../Archive/../Common/MethodId.h \ + ../../Archive/../Common/../../Common/Types.h \ + ../../Archive/../Common/ProgressUtils.h \ + ../../Archive/../Common/../IProgress.h \ + ../../Archive/../Common/RegisterArc.h \ + ../../Archive/../Common/../Archive/IArchive.h \ + ../../Archive/../Common/../Archive/../IProgress.h \ + ../../Archive/../Common/../Archive/../IStream.h \ + ../../Archive/../Common/../Archive/../PropID.h \ + ../../Archive/../Common/StreamUtils.h \ + ../../Archive/../Common/../IStream.h \ + ../../Archive/../Compress/BZip2Decoder.h \ + ../../Archive/../Compress/../../Common/MyCom.h \ + ../../Archive/../Compress/../../Windows/Synchronization.h \ + ../../Archive/../Compress/../../Windows/Defs.h \ + ../../Archive/../Compress/../../Windows/../Common/MyWindows.h \ + ../../Archive/../Compress/../../Windows/../../C/Threads.h \ + ../../Archive/../Compress/../../Windows/../../C/Types.h \ + ../../Archive/../Compress/../../Windows/Synchronization2.h \ + ../../Archive/../Compress/../../Windows/Thread.h \ + ../../Archive/../Compress/../ICoder.h \ + ../../Archive/../Compress/../Common/InBuffer.h \ + ../../Archive/../Compress/../Common/../IStream.h \ + ../../Archive/../Compress/../Common/../../Common/MyCom.h \ + ../../Archive/../Compress/../Common/../../Common/MyException.h \ + ../../Archive/../Compress/../Common/../../Common/MyWindows.h \ + ../../Archive/../Compress/../Common/OutBuffer.h \ + ../../Archive/../Compress/BitmDecoder.h \ + ../../Archive/../Compress/../IStream.h \ + ../../Archive/../Compress/BZip2Const.h \ + ../../Archive/../Compress/BZip2Crc.h \ + ../../Archive/../Compress/HuffmanDecoder.h \ + ../../Archive/../Compress/../../Common/Types.h \ + ../../Archive/../Compress/BZip2Encoder.h \ + ../../Archive/../Compress/../../Common/Defs.h \ + ../../Archive/../Compress/BitmEncoder.h \ + ../../Archive/../Compress/CopyCoder.h \ + ../../Archive/Common/DummyOutStream.h \ + ../../Archive/Common/../../IStream.h ../../../Common/MyCom.h \ + ../../Archive/Common/ParseProperties.h ../../../Common/MyString.h +CpioHandler.o: ../../Archive/CpioHandler.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../../Common/ComTry.h \ + ../../../Common/MyWindows.h ../../../Common/StringConvert.h \ + ../../../Common/MyString.h ../../../Common/MyVector.h \ + ../../../Common/Defs.h ../../../Common/StringToInt.h \ + ../../../Windows/PropVariant.h ../../../Windows/../Common/MyWindows.h \ + ../../../Windows/../Common/Types.h ../../../Windows/Time.h \ + ../../Archive/../Common/LimitedStreams.h \ + ../../Archive/../Common/../../Common/MyCom.h \ + ../../Archive/../Common/../../Common/MyWindows.h \ + ../../Archive/../Common/../../Common/MyVector.h \ + ../../Archive/../Common/../IStream.h \ + ../../Archive/../Common/../../Common/MyUnknown.h \ + ../../Archive/../Common/../../Common/Types.h \ + ../../Archive/../Common/../IDecl.h \ + ../../Archive/../Common/ProgressUtils.h \ + ../../Archive/../Common/../ICoder.h ../../Archive/../Common/../IStream.h \ + ../../Archive/../Common/../IProgress.h \ + ../../Archive/../Common/RegisterArc.h \ + ../../Archive/../Common/../Archive/IArchive.h \ + ../../Archive/../Common/../Archive/../IProgress.h \ + ../../Archive/../Common/../Archive/../IStream.h \ + ../../Archive/../Common/../Archive/../PropID.h \ + ../../Archive/../Common/StreamUtils.h \ + ../../Archive/../Compress/CopyCoder.h \ + ../../Archive/../Compress/../../Common/MyCom.h \ + ../../Archive/../Compress/../ICoder.h \ + ../../Archive/Common/ItemNameUtils.h \ + ../../Archive/Common/../../../Common/MyString.h +CramfsHandler.o: ../../Archive/CramfsHandler.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../Archive/../../../C/7zCrc.h ../../Archive/../../../C/Types.h \ + ../../Archive/../../../C/CpuArch.h ../../Archive/../../../C/Alloc.h \ + ../../../Common/ComTry.h ../../../Common/MyWindows.h \ + ../../../Common/StringConvert.h ../../../Common/MyString.h \ + ../../../Common/MyVector.h ../../../Common/Defs.h \ + ../../../Windows/PropVariantUtils.h ../../../Common/MyString.h \ + ../../../Windows/PropVariant.h ../../../Windows/../Common/MyWindows.h \ + ../../../Windows/../Common/Types.h \ + ../../Archive/../Common/LimitedStreams.h \ + ../../Archive/../Common/../../Common/MyCom.h \ + ../../Archive/../Common/../../Common/MyWindows.h \ + ../../Archive/../Common/../../Common/MyVector.h \ + ../../Archive/../Common/../IStream.h \ + ../../Archive/../Common/../../Common/MyUnknown.h \ + ../../Archive/../Common/../../Common/Types.h \ + ../../Archive/../Common/../IDecl.h \ + ../../Archive/../Common/ProgressUtils.h \ + ../../Archive/../Common/../ICoder.h ../../Archive/../Common/../IStream.h \ + ../../Archive/../Common/../IProgress.h \ + ../../Archive/../Common/RegisterArc.h \ + ../../Archive/../Common/../Archive/IArchive.h \ + ../../Archive/../Common/../Archive/../IProgress.h \ + ../../Archive/../Common/../Archive/../IStream.h \ + ../../Archive/../Common/../Archive/../PropID.h \ + ../../Archive/../Common/StreamObjects.h \ + ../../Archive/../Common/../../Common/Buffer.h \ + ../../Archive/../Common/../../Common/Defs.h \ + ../../Archive/../Common/StreamUtils.h \ + ../../Archive/../Compress/CopyCoder.h \ + ../../Archive/../Compress/../../Common/MyCom.h \ + ../../Archive/../Compress/../ICoder.h \ + ../../Archive/../Compress/ZlibDecoder.h \ + ../../Archive/../Compress/DeflateDecoder.h \ + ../../Archive/../Compress/../Common/InBuffer.h \ + ../../Archive/../Compress/../Common/../IStream.h \ + ../../Archive/../Compress/../Common/../../Common/MyCom.h \ + ../../Archive/../Compress/../Common/../../Common/MyException.h \ + ../../Archive/../Compress/../Common/../../Common/MyWindows.h \ + ../../Archive/../Compress/BitlDecoder.h \ + ../../Archive/../Compress/../IStream.h \ + ../../Archive/../Compress/DeflateConst.h \ + ../../Archive/../Compress/HuffmanDecoder.h \ + ../../Archive/../Compress/../../Common/Types.h \ + ../../Archive/../Compress/LzOutWindow.h \ + ../../Archive/../Compress/../Common/OutBuffer.h +DebHandler.o: ../../Archive/DebHandler.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../../Common/ComTry.h \ + ../../../Common/MyWindows.h ../../../Common/StringConvert.h \ + ../../../Common/MyString.h ../../../Common/MyVector.h \ + ../../../Common/Defs.h ../../../Common/StringToInt.h \ + ../../../Windows/PropVariant.h ../../../Windows/../Common/MyWindows.h \ + ../../../Windows/../Common/Types.h ../../../Windows/Time.h \ + ../../Archive/../Common/LimitedStreams.h \ + ../../Archive/../Common/../../Common/MyCom.h \ + ../../Archive/../Common/../../Common/MyWindows.h \ + ../../Archive/../Common/../../Common/MyVector.h \ + ../../Archive/../Common/../IStream.h \ + ../../Archive/../Common/../../Common/MyUnknown.h \ + ../../Archive/../Common/../../Common/Types.h \ + ../../Archive/../Common/../IDecl.h \ + ../../Archive/../Common/ProgressUtils.h \ + ../../Archive/../Common/../ICoder.h ../../Archive/../Common/../IStream.h \ + ../../Archive/../Common/../IProgress.h \ + ../../Archive/../Common/RegisterArc.h \ + ../../Archive/../Common/../Archive/IArchive.h \ + ../../Archive/../Common/../Archive/../IProgress.h \ + ../../Archive/../Common/../Archive/../IStream.h \ + ../../Archive/../Common/../Archive/../PropID.h \ + ../../Archive/../Common/StreamUtils.h \ + ../../Archive/../Compress/CopyCoder.h \ + ../../Archive/../Compress/../../Common/MyCom.h \ + ../../Archive/../Compress/../ICoder.h \ + ../../Archive/Common/ItemNameUtils.h \ + ../../Archive/Common/../../../Common/MyString.h +DeflateProps.o: ../../Archive/DeflateProps.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../../Windows/PropVariant.h ../../../Windows/../Common/MyWindows.h \ + ../../../Windows/../Common/Types.h \ + ../../Archive/Common/ParseProperties.h ../../../Common/MyString.h \ + ../../../Common/MyVector.h ../../../Common/Defs.h \ + ../../Archive/DeflateProps.h ../../Archive/../ICoder.h \ + ../../Archive/../IStream.h ../../Archive/../../Common/MyUnknown.h \ + ../../Archive/../../Common/MyWindows.h \ + ../../Archive/../../Common/Types.h ../../Archive/../IDecl.h +DmgHandler.o: ../../Archive/DmgHandler.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../Archive/../../../C/CpuArch.h \ + ../../Archive/../../../C/Types.h ../../../Common/Buffer.h \ + ../../../Common/Defs.h ../../../Common/ComTry.h \ + ../../../Common/MyWindows.h ../../../Common/IntToString.h \ + ../../../Common/MyXml.h ../../../Common/MyString.h \ + ../../../Common/MyVector.h ../../../Common/UTFConvert.h \ + ../../../Windows/PropVariant.h ../../../Windows/../Common/MyWindows.h \ + ../../../Windows/../Common/Types.h \ + ../../Archive/../Common/LimitedStreams.h \ + ../../Archive/../Common/../../Common/MyCom.h \ + ../../Archive/../Common/../../Common/MyWindows.h \ + ../../Archive/../Common/../../Common/MyVector.h \ + ../../Archive/../Common/../IStream.h \ + ../../Archive/../Common/../../Common/MyUnknown.h \ + ../../Archive/../Common/../../Common/Types.h \ + ../../Archive/../Common/../IDecl.h \ + ../../Archive/../Common/ProgressUtils.h \ + ../../Archive/../Common/../ICoder.h ../../Archive/../Common/../IStream.h \ + ../../Archive/../Common/../IProgress.h \ + ../../Archive/../Common/RegisterArc.h \ + ../../Archive/../Common/../Archive/IArchive.h \ + ../../Archive/../Common/../Archive/../IProgress.h \ + ../../Archive/../Common/../Archive/../IStream.h \ + ../../Archive/../Common/../Archive/../PropID.h \ + ../../Archive/../Common/StreamUtils.h \ + ../../Archive/../Compress/BZip2Decoder.h \ + ../../Archive/../Compress/../../Common/MyCom.h \ + ../../Archive/../Compress/../../Windows/Synchronization.h \ + ../../Archive/../Compress/../../Windows/Defs.h \ + ../../Archive/../Compress/../../Windows/../Common/MyWindows.h \ + ../../Archive/../Compress/../../Windows/../../C/Threads.h \ + ../../Archive/../Compress/../../Windows/../../C/Types.h \ + ../../Archive/../Compress/../../Windows/Synchronization2.h \ + ../../Archive/../Compress/../../Windows/Thread.h \ + ../../Archive/../Compress/../ICoder.h \ + ../../Archive/../Compress/../Common/InBuffer.h \ + ../../Archive/../Compress/../Common/../IStream.h \ + ../../Archive/../Compress/../Common/../../Common/MyCom.h \ + ../../Archive/../Compress/../Common/../../Common/MyException.h \ + ../../Archive/../Compress/../Common/../../Common/MyWindows.h \ + ../../Archive/../Compress/../Common/OutBuffer.h \ + ../../Archive/../Compress/BitmDecoder.h \ + ../../Archive/../Compress/../IStream.h \ + ../../Archive/../Compress/BZip2Const.h \ + ../../Archive/../Compress/BZip2Crc.h \ + ../../Archive/../Compress/HuffmanDecoder.h \ + ../../Archive/../Compress/../../Common/Types.h \ + ../../Archive/../Compress/CopyCoder.h \ + ../../Archive/../Compress/ZlibDecoder.h \ + ../../Archive/../Compress/DeflateDecoder.h \ + ../../Archive/../Compress/BitlDecoder.h \ + ../../Archive/../Compress/DeflateConst.h \ + ../../Archive/../Compress/LzOutWindow.h +ElfHandler.o: ../../Archive/ElfHandler.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../Archive/../../../C/CpuArch.h \ + ../../Archive/../../../C/Types.h ../../../Common/Buffer.h \ + ../../../Common/Defs.h ../../../Common/ComTry.h \ + ../../../Common/MyWindows.h ../../../Common/IntToString.h \ + ../../../Windows/PropVariantUtils.h ../../../Common/MyString.h \ + ../../../Common/MyVector.h ../../../Windows/PropVariant.h \ + ../../../Windows/../Common/MyWindows.h \ + ../../../Windows/../Common/Types.h \ + ../../Archive/../Common/LimitedStreams.h \ + ../../Archive/../Common/../../Common/MyCom.h \ + ../../Archive/../Common/../../Common/MyWindows.h \ + ../../Archive/../Common/../../Common/MyVector.h \ + ../../Archive/../Common/../IStream.h \ + ../../Archive/../Common/../../Common/MyUnknown.h \ + ../../Archive/../Common/../../Common/Types.h \ + ../../Archive/../Common/../IDecl.h \ + ../../Archive/../Common/ProgressUtils.h \ + ../../Archive/../Common/../ICoder.h ../../Archive/../Common/../IStream.h \ + ../../Archive/../Common/../IProgress.h \ + ../../Archive/../Common/RegisterArc.h \ + ../../Archive/../Common/../Archive/IArchive.h \ + ../../Archive/../Common/../Archive/../IProgress.h \ + ../../Archive/../Common/../Archive/../IStream.h \ + ../../Archive/../Common/../Archive/../PropID.h \ + ../../Archive/../Common/StreamUtils.h \ + ../../Archive/../Compress/CopyCoder.h \ + ../../Archive/../Compress/../../Common/MyCom.h \ + ../../Archive/../Compress/../ICoder.h +FatHandler.o: ../../Archive/FatHandler.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../Archive/../../../C/CpuArch.h \ + ../../Archive/../../../C/Types.h ../../../Common/Buffer.h \ + ../../../Common/Defs.h ../../../Common/ComTry.h \ + ../../../Common/MyWindows.h ../../../Common/IntToString.h \ + ../../../Common/MyCom.h ../../../Common/StringConvert.h \ + ../../../Common/MyString.h ../../../Common/MyVector.h \ + ../../../Windows/PropVariant.h ../../../Windows/../Common/MyWindows.h \ + ../../../Windows/../Common/Types.h ../../../Windows/Time.h \ + ../../Archive/../Common/LimitedStreams.h \ + ../../Archive/../Common/../../Common/MyCom.h \ + ../../Archive/../Common/../../Common/MyVector.h \ + ../../Archive/../Common/../IStream.h \ + ../../Archive/../Common/../../Common/MyUnknown.h \ + ../../Archive/../Common/../../Common/MyWindows.h \ + ../../Archive/../Common/../../Common/Types.h \ + ../../Archive/../Common/../IDecl.h \ + ../../Archive/../Common/ProgressUtils.h \ + ../../Archive/../Common/../ICoder.h ../../Archive/../Common/../IStream.h \ + ../../Archive/../Common/../IProgress.h \ + ../../Archive/../Common/RegisterArc.h \ + ../../Archive/../Common/../Archive/IArchive.h \ + ../../Archive/../Common/../Archive/../IProgress.h \ + ../../Archive/../Common/../Archive/../IStream.h \ + ../../Archive/../Common/../Archive/../PropID.h \ + ../../Archive/../Common/StreamUtils.h \ + ../../Archive/../Compress/CopyCoder.h \ + ../../Archive/../Compress/../../Common/MyCom.h \ + ../../Archive/../Compress/../ICoder.h \ + ../../Archive/Common/DummyOutStream.h \ + ../../Archive/Common/../../IStream.h +FlvHandler.o: ../../Archive/FlvHandler.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../Archive/../../../C/CpuArch.h \ + ../../Archive/../../../C/Types.h ../../../Common/Buffer.h \ + ../../../Common/Defs.h ../../../Common/ComTry.h \ + ../../../Common/MyWindows.h ../../../Common/MyString.h \ + ../../../Common/MyVector.h ../../../Windows/PropVariant.h \ + ../../../Windows/../Common/MyWindows.h \ + ../../../Windows/../Common/Types.h \ + ../../Archive/../Common/ProgressUtils.h \ + ../../Archive/../Common/../../Common/MyCom.h \ + ../../Archive/../Common/../../Common/MyWindows.h \ + ../../Archive/../Common/../ICoder.h ../../Archive/../Common/../IStream.h \ + ../../Archive/../Common/../../Common/MyUnknown.h \ + ../../Archive/../Common/../../Common/Types.h \ + ../../Archive/../Common/../IDecl.h \ + ../../Archive/../Common/../IProgress.h \ + ../../Archive/../Common/RegisterArc.h \ + ../../Archive/../Common/../Archive/IArchive.h \ + ../../Archive/../Common/../Archive/../IProgress.h \ + ../../Archive/../Common/../Archive/../IStream.h \ + ../../Archive/../Common/../Archive/../PropID.h \ + ../../Archive/../Common/StreamObjects.h \ + ../../Archive/../Common/../../Common/Buffer.h \ + ../../Archive/../Common/../IStream.h \ + ../../Archive/../Common/StreamUtils.h +GzHandler.o: ../../Archive/GzHandler.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../Archive/../../../C/CpuArch.h \ + ../../Archive/../../../C/Types.h ../../../Common/ComTry.h \ + ../../../Common/MyWindows.h ../../../Common/StringConvert.h \ + ../../../Common/MyString.h ../../../Common/MyVector.h \ + ../../../Common/Defs.h ../../../Windows/PropVariant.h \ + ../../../Windows/../Common/MyWindows.h \ + ../../../Windows/../Common/Types.h ../../../Windows/Time.h \ + ../../Archive/../Common/ProgressUtils.h \ + ../../Archive/../Common/../../Common/MyCom.h \ + ../../Archive/../Common/../../Common/MyWindows.h \ + ../../Archive/../Common/../ICoder.h ../../Archive/../Common/../IStream.h \ + ../../Archive/../Common/../../Common/MyUnknown.h \ + ../../Archive/../Common/../../Common/Types.h \ + ../../Archive/../Common/../IDecl.h \ + ../../Archive/../Common/../IProgress.h \ + ../../Archive/../Common/RegisterArc.h \ + ../../Archive/../Common/../Archive/IArchive.h \ + ../../Archive/../Common/../Archive/../IProgress.h \ + ../../Archive/../Common/../Archive/../IStream.h \ + ../../Archive/../Common/../Archive/../PropID.h \ + ../../Archive/../Common/StreamUtils.h \ + ../../Archive/../Common/../IStream.h \ + ../../Archive/../Compress/CopyCoder.h \ + ../../Archive/../Compress/../../Common/MyCom.h \ + ../../Archive/../Compress/../ICoder.h \ + ../../Archive/../Compress/DeflateDecoder.h \ + ../../Archive/../Compress/../Common/InBuffer.h \ + ../../Archive/../Compress/../Common/../IStream.h \ + ../../Archive/../Compress/../Common/../../Common/MyCom.h \ + ../../Archive/../Compress/../Common/../../Common/MyException.h \ + ../../Archive/../Compress/../Common/../../Common/MyWindows.h \ + ../../Archive/../Compress/BitlDecoder.h \ + ../../Archive/../Compress/../IStream.h \ + ../../Archive/../Compress/DeflateConst.h \ + ../../Archive/../Compress/HuffmanDecoder.h \ + ../../Archive/../Compress/../../Common/Types.h \ + ../../Archive/../Compress/LzOutWindow.h \ + ../../Archive/../Compress/../Common/OutBuffer.h \ + ../../Archive/../Compress/DeflateEncoder.h \ + ../../Archive/../Compress/../../../C/LzFind.h \ + ../../Archive/../Compress/../../../C/Types.h ../../../Common/MyCom.h \ + ../../Archive/../Compress/BitlEncoder.h \ + ../../Archive/Common/InStreamWithCRC.h \ + ../../Archive/Common/../../../../C/7zCrc.h \ + ../../Archive/Common/../../../../C/Types.h \ + ../../Archive/Common/../../../Common/MyCom.h \ + ../../Archive/Common/../../IStream.h \ + ../../Archive/Common/OutStreamWithCRC.h ../../Archive/DeflateProps.h \ + ../../Archive/../ICoder.h +LzhHandler.o: ../../Archive/LzhHandler.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../Archive/../../../C/CpuArch.h \ + ../../Archive/../../../C/Types.h ../../../Common/Buffer.h \ + ../../../Common/Defs.h ../../../Common/ComTry.h \ + ../../../Common/MyWindows.h ../../../Common/StringConvert.h \ + ../../../Common/MyString.h ../../../Common/MyVector.h \ + ../../../Windows/PropVariant.h ../../../Windows/../Common/MyWindows.h \ + ../../../Windows/../Common/Types.h ../../../Windows/Time.h \ + ../../Archive/../ICoder.h ../../Archive/../IStream.h \ + ../../Archive/../../Common/MyUnknown.h \ + ../../Archive/../../Common/MyWindows.h \ + ../../Archive/../../Common/Types.h ../../Archive/../IDecl.h \ + ../../Archive/../Common/LimitedStreams.h \ + ../../Archive/../Common/../../Common/MyCom.h \ + ../../Archive/../Common/../../Common/MyWindows.h \ + ../../Archive/../Common/../../Common/MyVector.h \ + ../../Archive/../Common/../IStream.h \ + ../../Archive/../Common/ProgressUtils.h \ + ../../Archive/../Common/../ICoder.h \ + ../../Archive/../Common/../IProgress.h \ + ../../Archive/../Common/../../Common/MyUnknown.h \ + ../../Archive/../Common/../../Common/Types.h \ + ../../Archive/../Common/../IDecl.h ../../Archive/../Common/RegisterArc.h \ + ../../Archive/../Common/../Archive/IArchive.h \ + ../../Archive/../Common/../Archive/../IProgress.h \ + ../../Archive/../Common/../Archive/../IStream.h \ + ../../Archive/../Common/../Archive/../PropID.h \ + ../../Archive/../Common/StreamUtils.h \ + ../../Archive/../Compress/CopyCoder.h \ + ../../Archive/../Compress/../../Common/MyCom.h \ + ../../Archive/../Compress/../ICoder.h \ + ../../Archive/../Compress/LzhDecoder.h \ + ../../Archive/../Compress/../Common/InBuffer.h \ + ../../Archive/../Compress/../Common/../IStream.h \ + ../../Archive/../Compress/../Common/../../Common/MyCom.h \ + ../../Archive/../Compress/../Common/../../Common/MyException.h \ + ../../Archive/../Compress/../Common/../../Common/MyWindows.h \ + ../../Archive/../Compress/BitmDecoder.h \ + ../../Archive/../Compress/../IStream.h \ + ../../Archive/../Compress/HuffmanDecoder.h \ + ../../Archive/../Compress/../../Common/Types.h \ + ../../Archive/../Compress/LzOutWindow.h \ + ../../Archive/../Compress/../Common/OutBuffer.h ../../Archive/IArchive.h \ + ../../Archive/Common/ItemNameUtils.h \ + ../../Archive/Common/../../../Common/MyString.h +LzmaHandler.o: ../../Archive/LzmaHandler.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../Archive/../../../C/CpuArch.h \ + ../../Archive/../../../C/Types.h ../../../Common/ComTry.h \ + ../../../Common/MyWindows.h ../../../Common/IntToString.h \ + ../../../Windows/PropVariant.h ../../../Windows/../Common/MyWindows.h \ + ../../../Windows/../Common/Types.h ../../Archive/../Common/CreateCoder.h \ + ../../Archive/../Common/../../Common/MyCom.h \ + ../../Archive/../Common/../../Common/MyWindows.h \ + ../../Archive/../Common/../../Common/MyString.h \ + ../../Archive/../Common/../../Common/MyVector.h \ + ../../Archive/../Common/../../Common/Defs.h \ + ../../Archive/../Common/../ICoder.h ../../Archive/../Common/../IStream.h \ + ../../Archive/../Common/../../Common/MyUnknown.h \ + ../../Archive/../Common/../../Common/Types.h \ + ../../Archive/../Common/../IDecl.h ../../Archive/../Common/MethodId.h \ + ../../Archive/../Common/../../Common/Types.h \ + ../../Archive/../Common/ProgressUtils.h \ + ../../Archive/../Common/../IProgress.h \ + ../../Archive/../Common/RegisterArc.h \ + ../../Archive/../Common/../Archive/IArchive.h \ + ../../Archive/../Common/../Archive/../IProgress.h \ + ../../Archive/../Common/../Archive/../IStream.h \ + ../../Archive/../Common/../Archive/../PropID.h \ + ../../Archive/../Common/StreamUtils.h \ + ../../Archive/../Common/../IStream.h \ + ../../Archive/../Compress/LzmaDecoder.h \ + ../../Archive/../Compress/../../../C/LzmaDec.h \ + ../../Archive/../Compress/../../../C/Types.h \ + ../../Archive/../Compress/../../Common/MyCom.h \ + ../../Archive/../Compress/../ICoder.h \ + ../../Archive/Common/DummyOutStream.h \ + ../../Archive/Common/../../IStream.h ../../../Common/MyCom.h +MachoHandler.o: ../../Archive/MachoHandler.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../Archive/../../../C/CpuArch.h ../../Archive/../../../C/Types.h \ + ../../../Common/Buffer.h ../../../Common/Defs.h ../../../Common/ComTry.h \ + ../../../Common/MyWindows.h ../../../Windows/PropVariantUtils.h \ + ../../../Common/MyString.h ../../../Common/MyVector.h \ + ../../../Windows/PropVariant.h ../../../Windows/../Common/MyWindows.h \ + ../../../Windows/../Common/Types.h \ + ../../Archive/../Common/LimitedStreams.h \ + ../../Archive/../Common/../../Common/MyCom.h \ + ../../Archive/../Common/../../Common/MyWindows.h \ + ../../Archive/../Common/../../Common/MyVector.h \ + ../../Archive/../Common/../IStream.h \ + ../../Archive/../Common/../../Common/MyUnknown.h \ + ../../Archive/../Common/../../Common/Types.h \ + ../../Archive/../Common/../IDecl.h \ + ../../Archive/../Common/ProgressUtils.h \ + ../../Archive/../Common/../ICoder.h ../../Archive/../Common/../IStream.h \ + ../../Archive/../Common/../IProgress.h \ + ../../Archive/../Common/RegisterArc.h \ + ../../Archive/../Common/../Archive/IArchive.h \ + ../../Archive/../Common/../Archive/../IProgress.h \ + ../../Archive/../Common/../Archive/../IStream.h \ + ../../Archive/../Common/../Archive/../PropID.h \ + ../../Archive/../Common/StreamUtils.h \ + ../../Archive/../Compress/CopyCoder.h \ + ../../Archive/../Compress/../../Common/MyCom.h \ + ../../Archive/../Compress/../ICoder.h +MbrHandler.o: ../../Archive/MbrHandler.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../Archive/../../../C/CpuArch.h \ + ../../Archive/../../../C/Types.h ../../../Common/Buffer.h \ + ../../../Common/Defs.h ../../../Common/ComTry.h \ + ../../../Common/MyWindows.h ../../../Common/IntToString.h \ + ../../../Common/MyString.h ../../../Common/MyVector.h \ + ../../../Windows/PropVariant.h ../../../Windows/../Common/MyWindows.h \ + ../../../Windows/../Common/Types.h \ + ../../Archive/../Common/LimitedStreams.h \ + ../../Archive/../Common/../../Common/MyCom.h \ + ../../Archive/../Common/../../Common/MyWindows.h \ + ../../Archive/../Common/../../Common/MyVector.h \ + ../../Archive/../Common/../IStream.h \ + ../../Archive/../Common/../../Common/MyUnknown.h \ + ../../Archive/../Common/../../Common/Types.h \ + ../../Archive/../Common/../IDecl.h \ + ../../Archive/../Common/ProgressUtils.h \ + ../../Archive/../Common/../ICoder.h ../../Archive/../Common/../IStream.h \ + ../../Archive/../Common/../IProgress.h \ + ../../Archive/../Common/RegisterArc.h \ + ../../Archive/../Common/../Archive/IArchive.h \ + ../../Archive/../Common/../Archive/../IProgress.h \ + ../../Archive/../Common/../Archive/../IStream.h \ + ../../Archive/../Common/../Archive/../PropID.h \ + ../../Archive/../Common/StreamUtils.h \ + ../../Archive/../Compress/CopyCoder.h \ + ../../Archive/../Compress/../../Common/MyCom.h \ + ../../Archive/../Compress/../ICoder.h +MslzHandler.o: ../../Archive/MslzHandler.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../Archive/../../../C/CpuArch.h \ + ../../Archive/../../../C/Types.h ../../../Common/ComTry.h \ + ../../../Common/MyWindows.h ../../../Common/MyString.h \ + ../../../Common/MyVector.h ../../../Common/Defs.h \ + ../../../Windows/PropVariant.h ../../../Windows/../Common/MyWindows.h \ + ../../../Windows/../Common/Types.h ../../Archive/../Common/InBuffer.h \ + ../../Archive/../Common/../IStream.h \ + ../../Archive/../Common/../../Common/MyUnknown.h \ + ../../Archive/../Common/../../Common/MyWindows.h \ + ../../Archive/../Common/../../Common/Types.h \ + ../../Archive/../Common/../IDecl.h \ + ../../Archive/../Common/../../Common/MyCom.h \ + ../../Archive/../Common/../../Common/MyException.h \ + ../../Archive/../Common/ProgressUtils.h \ + ../../Archive/../Common/../ICoder.h ../../Archive/../Common/../IStream.h \ + ../../Archive/../Common/../IProgress.h \ + ../../Archive/../Common/RegisterArc.h \ + ../../Archive/../Common/../Archive/IArchive.h \ + ../../Archive/../Common/../Archive/../IProgress.h \ + ../../Archive/../Common/../Archive/../IStream.h \ + ../../Archive/../Common/../Archive/../PropID.h \ + ../../Archive/../Common/StreamUtils.h \ + ../../Archive/Common/DummyOutStream.h \ + ../../Archive/Common/../../IStream.h ../../../Common/MyCom.h +MubHandler.o: ../../Archive/MubHandler.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../Archive/../../../C/CpuArch.h \ + ../../Archive/../../../C/Types.h ../../../Common/ComTry.h \ + ../../../Common/MyWindows.h ../../../Windows/PropVariant.h \ + ../../../Windows/../Common/MyWindows.h \ + ../../../Windows/../Common/Types.h \ + ../../Archive/../Common/LimitedStreams.h \ + ../../Archive/../Common/../../Common/MyCom.h \ + ../../Archive/../Common/../../Common/MyWindows.h \ + ../../Archive/../Common/../../Common/MyVector.h \ + ../../Archive/../Common/../../Common/Defs.h \ + ../../Archive/../Common/../IStream.h \ + ../../Archive/../Common/../../Common/MyUnknown.h \ + ../../Archive/../Common/../../Common/Types.h \ + ../../Archive/../Common/../IDecl.h \ + ../../Archive/../Common/ProgressUtils.h \ + ../../Archive/../Common/../ICoder.h ../../Archive/../Common/../IStream.h \ + ../../Archive/../Common/../IProgress.h \ + ../../Archive/../Common/RegisterArc.h \ + ../../Archive/../Common/../Archive/IArchive.h \ + ../../Archive/../Common/../Archive/../IProgress.h \ + ../../Archive/../Common/../Archive/../IStream.h \ + ../../Archive/../Common/../Archive/../PropID.h \ + ../../Archive/../Common/StreamUtils.h \ + ../../Archive/../Compress/CopyCoder.h \ + ../../Archive/../Compress/../../Common/MyCom.h \ + ../../Archive/../Compress/../ICoder.h +NtfsHandler.o: ../../Archive/NtfsHandler.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../Archive/../../../C/CpuArch.h \ + ../../Archive/../../../C/Types.h ../../../Common/Buffer.h \ + ../../../Common/Defs.h ../../../Common/ComTry.h \ + ../../../Common/MyWindows.h ../../../Common/IntToString.h \ + ../../../Common/MyCom.h ../../../Common/StringConvert.h \ + ../../../Common/MyString.h ../../../Common/MyVector.h \ + ../../../Windows/PropVariant.h ../../../Windows/../Common/MyWindows.h \ + ../../../Windows/../Common/Types.h ../../../Windows/Time.h \ + ../../Archive/../Common/ProgressUtils.h \ + ../../Archive/../Common/../../Common/MyCom.h \ + ../../Archive/../Common/../ICoder.h ../../Archive/../Common/../IStream.h \ + ../../Archive/../Common/../../Common/MyUnknown.h \ + ../../Archive/../Common/../../Common/MyWindows.h \ + ../../Archive/../Common/../../Common/Types.h \ + ../../Archive/../Common/../IDecl.h \ + ../../Archive/../Common/../IProgress.h \ + ../../Archive/../Common/RegisterArc.h \ + ../../Archive/../Common/../Archive/IArchive.h \ + ../../Archive/../Common/../Archive/../IProgress.h \ + ../../Archive/../Common/../Archive/../IStream.h \ + ../../Archive/../Common/../Archive/../PropID.h \ + ../../Archive/../Common/StreamUtils.h \ + ../../Archive/../Common/../IStream.h \ + ../../Archive/../Compress/CopyCoder.h \ + ../../Archive/../Compress/../../Common/MyCom.h \ + ../../Archive/../Compress/../ICoder.h \ + ../../Archive/Common/DummyOutStream.h \ + ../../Archive/Common/../../IStream.h +PeHandler.o: ../../Archive/PeHandler.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../Archive/../../../C/CpuArch.h \ + ../../Archive/../../../C/Types.h ../../../Common/DynamicBuffer.h \ + ../../../Common/Buffer.h ../../../Common/Defs.h ../../../Common/ComTry.h \ + ../../../Common/MyWindows.h ../../../Common/IntToString.h \ + ../../../Common/StringConvert.h ../../../Common/MyString.h \ + ../../../Common/MyVector.h ../../../Windows/PropVariantUtils.h \ + ../../../Common/MyString.h ../../../Windows/PropVariant.h \ + ../../../Windows/../Common/MyWindows.h \ + ../../../Windows/../Common/Types.h ../../../Windows/Time.h \ + ../../Archive/../Common/LimitedStreams.h \ + ../../Archive/../Common/../../Common/MyCom.h \ + ../../Archive/../Common/../../Common/MyWindows.h \ + ../../Archive/../Common/../../Common/MyVector.h \ + ../../Archive/../Common/../IStream.h \ + ../../Archive/../Common/../../Common/MyUnknown.h \ + ../../Archive/../Common/../../Common/Types.h \ + ../../Archive/../Common/../IDecl.h \ + ../../Archive/../Common/ProgressUtils.h \ + ../../Archive/../Common/../ICoder.h ../../Archive/../Common/../IStream.h \ + ../../Archive/../Common/../IProgress.h \ + ../../Archive/../Common/RegisterArc.h \ + ../../Archive/../Common/../Archive/IArchive.h \ + ../../Archive/../Common/../Archive/../IProgress.h \ + ../../Archive/../Common/../Archive/../IStream.h \ + ../../Archive/../Common/../Archive/../PropID.h \ + ../../Archive/../Common/StreamObjects.h \ + ../../Archive/../Common/../../Common/Buffer.h \ + ../../Archive/../Common/StreamUtils.h \ + ../../Archive/../Compress/CopyCoder.h \ + ../../Archive/../Compress/../../Common/MyCom.h \ + ../../Archive/../Compress/../ICoder.h +PpmdHandler.o: ../../Archive/PpmdHandler.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../Archive/../../../C/CpuArch.h \ + ../../Archive/../../../C/Types.h ../../Archive/../../../C/Alloc.h \ + ../../Archive/../../../C/Ppmd7.h ../../Archive/../../../C/Ppmd.h \ + ../../Archive/../../../C/CpuArch.h ../../Archive/../../../C/Ppmd8.h \ + ../../../Common/ComTry.h ../../../Common/MyWindows.h \ + ../../../Common/IntToString.h ../../../Common/StringConvert.h \ + ../../../Common/MyString.h ../../../Common/MyVector.h \ + ../../../Common/Defs.h ../../../Windows/PropVariant.h \ + ../../../Windows/../Common/MyWindows.h \ + ../../../Windows/../Common/Types.h ../../../Windows/Time.h \ + ../../Archive/../Common/CWrappers.h ../../Archive/../Common/../ICoder.h \ + ../../Archive/../Common/../IStream.h \ + ../../Archive/../Common/../../Common/MyUnknown.h \ + ../../Archive/../Common/../../Common/MyWindows.h \ + ../../Archive/../Common/../../Common/Types.h \ + ../../Archive/../Common/../IDecl.h \ + ../../Archive/../Common/../../Common/MyCom.h \ + ../../Archive/../Common/ProgressUtils.h \ + ../../Archive/../Common/../IProgress.h \ + ../../Archive/../Common/RegisterArc.h \ + ../../Archive/../Common/../Archive/IArchive.h \ + ../../Archive/../Common/../Archive/../IProgress.h \ + ../../Archive/../Common/../Archive/../IStream.h \ + ../../Archive/../Common/../Archive/../PropID.h \ + ../../Archive/../Common/StreamUtils.h \ + ../../Archive/../Common/../IStream.h +RpmHandler.o: ../../Archive/RpmHandler.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../Archive/../../../C/CpuArch.h \ + ../../Archive/../../../C/Types.h ../../../Common/ComTry.h \ + ../../../Common/MyWindows.h ../../../Common/MyString.h \ + ../../../Common/MyVector.h ../../../Common/Defs.h \ + ../../../Windows/PropVariant.h ../../../Windows/../Common/MyWindows.h \ + ../../../Windows/../Common/Types.h \ + ../../Archive/../Common/LimitedStreams.h \ + ../../Archive/../Common/../../Common/MyCom.h \ + ../../Archive/../Common/../../Common/MyWindows.h \ + ../../Archive/../Common/../../Common/MyVector.h \ + ../../Archive/../Common/../IStream.h \ + ../../Archive/../Common/../../Common/MyUnknown.h \ + ../../Archive/../Common/../../Common/Types.h \ + ../../Archive/../Common/../IDecl.h \ + ../../Archive/../Common/ProgressUtils.h \ + ../../Archive/../Common/../ICoder.h ../../Archive/../Common/../IStream.h \ + ../../Archive/../Common/../IProgress.h \ + ../../Archive/../Common/RegisterArc.h \ + ../../Archive/../Common/../Archive/IArchive.h \ + ../../Archive/../Common/../Archive/../IProgress.h \ + ../../Archive/../Common/../Archive/../IStream.h \ + ../../Archive/../Common/../Archive/../PropID.h \ + ../../Archive/../Common/StreamUtils.h \ + ../../Archive/../Compress/CopyCoder.h \ + ../../Archive/../Compress/../../Common/MyCom.h \ + ../../Archive/../Compress/../ICoder.h +SplitHandler.o: ../../Archive/SplitHandler.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../../Common/ComTry.h ../../../Common/MyWindows.h \ + ../../../Common/MyString.h ../../../Common/MyVector.h \ + ../../../Common/Defs.h ../../../Windows/PropVariant.h \ + ../../../Windows/../Common/MyWindows.h \ + ../../../Windows/../Common/Types.h \ + ../../Archive/../Common/ProgressUtils.h \ + ../../Archive/../Common/../../Common/MyCom.h \ + ../../Archive/../Common/../../Common/MyWindows.h \ + ../../Archive/../Common/../ICoder.h ../../Archive/../Common/../IStream.h \ + ../../Archive/../Common/../../Common/MyUnknown.h \ + ../../Archive/../Common/../../Common/Types.h \ + ../../Archive/../Common/../IDecl.h \ + ../../Archive/../Common/../IProgress.h \ + ../../Archive/../Common/RegisterArc.h \ + ../../Archive/../Common/../Archive/IArchive.h \ + ../../Archive/../Common/../Archive/../IProgress.h \ + ../../Archive/../Common/../Archive/../IStream.h \ + ../../Archive/../Common/../Archive/../PropID.h \ + ../../Archive/../Compress/CopyCoder.h \ + ../../Archive/../Compress/../../Common/MyCom.h \ + ../../Archive/../Compress/../ICoder.h ../../Archive/Common/MultiStream.h \ + ../../Archive/Common/../../../Common/MyCom.h \ + ../../Archive/Common/../../../Common/MyVector.h \ + ../../Archive/Common/../../IStream.h +SquashfsHandler.o: ../../Archive/SquashfsHandler.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../Archive/../../../C/7zCrc.h ../../Archive/../../../C/Types.h \ + ../../Archive/../../../C/Alloc.h ../../Archive/../../../C/CpuArch.h \ + ../../../Common/ComTry.h ../../../Common/MyWindows.h \ + ../../../Common/IntToString.h ../../../Common/StringConvert.h \ + ../../../Common/MyString.h ../../../Common/MyVector.h \ + ../../../Common/Defs.h ../../../Windows/PropVariantUtils.h \ + ../../../Common/MyString.h ../../../Windows/PropVariant.h \ + ../../../Windows/../Common/MyWindows.h \ + ../../../Windows/../Common/Types.h ../../../Windows/Time.h \ + ../../Archive/../Common/LimitedStreams.h \ + ../../Archive/../Common/../../Common/MyCom.h \ + ../../Archive/../Common/../../Common/MyWindows.h \ + ../../Archive/../Common/../../Common/MyVector.h \ + ../../Archive/../Common/../IStream.h \ + ../../Archive/../Common/../../Common/MyUnknown.h \ + ../../Archive/../Common/../../Common/Types.h \ + ../../Archive/../Common/../IDecl.h \ + ../../Archive/../Common/ProgressUtils.h \ + ../../Archive/../Common/../ICoder.h ../../Archive/../Common/../IStream.h \ + ../../Archive/../Common/../IProgress.h \ + ../../Archive/../Common/RegisterArc.h \ + ../../Archive/../Common/../Archive/IArchive.h \ + ../../Archive/../Common/../Archive/../IProgress.h \ + ../../Archive/../Common/../Archive/../IStream.h \ + ../../Archive/../Common/../Archive/../PropID.h \ + ../../Archive/../Common/StreamObjects.h \ + ../../Archive/../Common/../../Common/Buffer.h \ + ../../Archive/../Common/../../Common/Defs.h \ + ../../Archive/../Common/StreamUtils.h \ + ../../Archive/../Compress/CopyCoder.h \ + ../../Archive/../Compress/../../Common/MyCom.h \ + ../../Archive/../Compress/../ICoder.h \ + ../../Archive/../Compress/ZlibDecoder.h \ + ../../Archive/../Compress/DeflateDecoder.h \ + ../../Archive/../Compress/../Common/InBuffer.h \ + ../../Archive/../Compress/../Common/../IStream.h \ + ../../Archive/../Compress/../Common/../../Common/MyCom.h \ + ../../Archive/../Compress/../Common/../../Common/MyException.h \ + ../../Archive/../Compress/../Common/../../Common/MyWindows.h \ + ../../Archive/../Compress/BitlDecoder.h \ + ../../Archive/../Compress/../IStream.h \ + ../../Archive/../Compress/DeflateConst.h \ + ../../Archive/../Compress/HuffmanDecoder.h \ + ../../Archive/../Compress/../../Common/Types.h \ + ../../Archive/../Compress/LzOutWindow.h \ + ../../Archive/../Compress/../Common/OutBuffer.h \ + ../../Archive/../Compress/LzmaDecoder.h \ + ../../Archive/../Compress/../../../C/LzmaDec.h \ + ../../Archive/../Compress/../../../C/Types.h +SwfHandler.o: ../../Archive/SwfHandler.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../Archive/../../../C/CpuArch.h \ + ../../Archive/../../../C/Types.h ../../../Common/Buffer.h \ + ../../../Common/Defs.h ../../../Common/ComTry.h \ + ../../../Common/MyWindows.h ../../../Common/IntToString.h \ + ../../../Common/MyString.h ../../../Common/MyVector.h \ + ../../../Windows/PropVariant.h ../../../Windows/../Common/MyWindows.h \ + ../../../Windows/../Common/Types.h ../../Archive/../Common/InBuffer.h \ + ../../Archive/../Common/../IStream.h \ + ../../Archive/../Common/../../Common/MyUnknown.h \ + ../../Archive/../Common/../../Common/MyWindows.h \ + ../../Archive/../Common/../../Common/Types.h \ + ../../Archive/../Common/../IDecl.h \ + ../../Archive/../Common/../../Common/MyCom.h \ + ../../Archive/../Common/../../Common/MyException.h \ + ../../Archive/../Common/ProgressUtils.h \ + ../../Archive/../Common/../ICoder.h ../../Archive/../Common/../IStream.h \ + ../../Archive/../Common/../IProgress.h \ + ../../Archive/../Common/RegisterArc.h \ + ../../Archive/../Common/../Archive/IArchive.h \ + ../../Archive/../Common/../Archive/../IProgress.h \ + ../../Archive/../Common/../Archive/../IStream.h \ + ../../Archive/../Common/../Archive/../PropID.h \ + ../../Archive/../Common/StreamUtils.h \ + ../../Archive/../Compress/CopyCoder.h \ + ../../Archive/../Compress/../../Common/MyCom.h \ + ../../Archive/../Compress/../ICoder.h \ + ../../Archive/../Compress/ZlibDecoder.h \ + ../../Archive/../Compress/DeflateDecoder.h \ + ../../Archive/../Compress/../Common/InBuffer.h \ + ../../Archive/../Compress/BitlDecoder.h \ + ../../Archive/../Compress/../IStream.h \ + ../../Archive/../Compress/DeflateConst.h \ + ../../Archive/../Compress/HuffmanDecoder.h \ + ../../Archive/../Compress/../../Common/Types.h \ + ../../Archive/../Compress/LzOutWindow.h \ + ../../Archive/../Compress/../Common/OutBuffer.h \ + ../../Archive/../Compress/../Common/../IStream.h \ + ../../Archive/../Compress/../Common/../../Common/MyCom.h \ + ../../Archive/../Compress/../Common/../../Common/MyException.h \ + ../../Archive/../Compress/ZlibEncoder.h \ + ../../Archive/../Compress/DeflateEncoder.h \ + ../../Archive/../Compress/../../../C/LzFind.h \ + ../../Archive/../Compress/../../../C/Types.h ../../../Common/MyCom.h \ + ../../Archive/../Compress/BitlEncoder.h \ + ../../Archive/Common/DummyOutStream.h \ + ../../Archive/Common/../../IStream.h ../../Archive/DeflateProps.h \ + ../../Archive/../ICoder.h +VhdHandler.o: ../../Archive/VhdHandler.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../Archive/../../../C/CpuArch.h \ + ../../Archive/../../../C/Types.h ../../../Common/Buffer.h \ + ../../../Common/Defs.h ../../../Common/ComTry.h \ + ../../../Common/MyWindows.h ../../../Common/IntToString.h \ + ../../../Common/MyString.h ../../../Common/MyVector.h \ + ../../../Windows/PropVariant.h ../../../Windows/../Common/MyWindows.h \ + ../../../Windows/../Common/Types.h \ + ../../Archive/../Common/LimitedStreams.h \ + ../../Archive/../Common/../../Common/MyCom.h \ + ../../Archive/../Common/../../Common/MyWindows.h \ + ../../Archive/../Common/../../Common/MyVector.h \ + ../../Archive/../Common/../IStream.h \ + ../../Archive/../Common/../../Common/MyUnknown.h \ + ../../Archive/../Common/../../Common/Types.h \ + ../../Archive/../Common/../IDecl.h \ + ../../Archive/../Common/ProgressUtils.h \ + ../../Archive/../Common/../ICoder.h ../../Archive/../Common/../IStream.h \ + ../../Archive/../Common/../IProgress.h \ + ../../Archive/../Common/RegisterArc.h \ + ../../Archive/../Common/../Archive/IArchive.h \ + ../../Archive/../Common/../Archive/../IProgress.h \ + ../../Archive/../Common/../Archive/../IStream.h \ + ../../Archive/../Common/../Archive/../PropID.h \ + ../../Archive/../Common/StreamUtils.h \ + ../../Archive/../Compress/CopyCoder.h \ + ../../Archive/../Compress/../../Common/MyCom.h \ + ../../Archive/../Compress/../ICoder.h +XarHandler.o: ../../Archive/XarHandler.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../Archive/../../../C/CpuArch.h \ + ../../Archive/../../../C/Types.h ../../../Common/ComTry.h \ + ../../../Common/MyWindows.h ../../../Common/MyXml.h \ + ../../../Common/MyString.h ../../../Common/MyVector.h \ + ../../../Common/Defs.h ../../../Common/StringToInt.h \ + ../../../Common/UTFConvert.h ../../../Windows/PropVariant.h \ + ../../../Windows/../Common/MyWindows.h \ + ../../../Windows/../Common/Types.h ../../../Windows/Time.h \ + ../../Archive/../Common/LimitedStreams.h \ + ../../Archive/../Common/../../Common/MyCom.h \ + ../../Archive/../Common/../../Common/MyWindows.h \ + ../../Archive/../Common/../../Common/MyVector.h \ + ../../Archive/../Common/../IStream.h \ + ../../Archive/../Common/../../Common/MyUnknown.h \ + ../../Archive/../Common/../../Common/Types.h \ + ../../Archive/../Common/../IDecl.h \ + ../../Archive/../Common/ProgressUtils.h \ + ../../Archive/../Common/../ICoder.h ../../Archive/../Common/../IStream.h \ + ../../Archive/../Common/../IProgress.h \ + ../../Archive/../Common/RegisterArc.h \ + ../../Archive/../Common/../Archive/IArchive.h \ + ../../Archive/../Common/../Archive/../IProgress.h \ + ../../Archive/../Common/../Archive/../IStream.h \ + ../../Archive/../Common/../Archive/../PropID.h \ + ../../Archive/../Common/StreamObjects.h \ + ../../Archive/../Common/../../Common/Buffer.h \ + ../../Archive/../Common/../../Common/Defs.h \ + ../../Archive/../Common/StreamUtils.h \ + ../../Archive/../Compress/BZip2Decoder.h \ + ../../Archive/../Compress/../../Common/MyCom.h \ + ../../Archive/../Compress/../../Windows/Synchronization.h \ + ../../Archive/../Compress/../../Windows/Defs.h \ + ../../Archive/../Compress/../../Windows/../Common/MyWindows.h \ + ../../Archive/../Compress/../../Windows/../../C/Threads.h \ + ../../Archive/../Compress/../../Windows/../../C/Types.h \ + ../../Archive/../Compress/../../Windows/Synchronization2.h \ + ../../Archive/../Compress/../../Windows/Thread.h \ + ../../Archive/../Compress/../ICoder.h \ + ../../Archive/../Compress/../Common/InBuffer.h \ + ../../Archive/../Compress/../Common/../IStream.h \ + ../../Archive/../Compress/../Common/../../Common/MyCom.h \ + ../../Archive/../Compress/../Common/../../Common/MyException.h \ + ../../Archive/../Compress/../Common/../../Common/MyWindows.h \ + ../../Archive/../Compress/../Common/OutBuffer.h \ + ../../Archive/../Compress/BitmDecoder.h \ + ../../Archive/../Compress/../IStream.h \ + ../../Archive/../Compress/BZip2Const.h \ + ../../Archive/../Compress/BZip2Crc.h \ + ../../Archive/../Compress/HuffmanDecoder.h \ + ../../Archive/../Compress/../../Common/Types.h \ + ../../Archive/../Compress/CopyCoder.h \ + ../../Archive/../Compress/ZlibDecoder.h \ + ../../Archive/../Compress/DeflateDecoder.h \ + ../../Archive/../Compress/BitlDecoder.h \ + ../../Archive/../Compress/DeflateConst.h \ + ../../Archive/../Compress/LzOutWindow.h \ + ../../Archive/Common/OutStreamWithSha1.h \ + ../../Archive/Common/../../Crypto/Sha1.h \ + ../../Archive/Common/../../Crypto/../../Common/Types.h \ + ../../Archive/Common/../../../Common/MyCom.h \ + ../../Archive/Common/../../IStream.h +XzHandler.o: ../../Archive/XzHandler.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../Archive/../../../C/Alloc.h \ + ../../Archive/../../../C/XzCrc64.h ../../Archive/../../../C/Types.h \ + ../../Archive/../../../C/XzEnc.h ../../Archive/../../../C/Lzma2Enc.h \ + ../../Archive/../../../C/LzmaEnc.h ../../Archive/../../../C/Xz.h \ + ../../Archive/../../../C/Sha256.h ../../Archive/../../Common/ComTry.h \ + ../../Archive/../../Common/MyWindows.h \ + ../../Archive/../../Common/IntToString.h \ + ../../Archive/../../Common/Types.h ../../Archive/../ICoder.h \ + ../../Archive/../IStream.h ../../Archive/../../Common/MyUnknown.h \ + ../../Archive/../../Common/Types.h ../../Archive/../IDecl.h \ + ../../Archive/../Common/CWrappers.h ../../Archive/../Common/../ICoder.h \ + ../../Archive/../Common/../../Common/MyCom.h \ + ../../Archive/../Common/../../Common/MyWindows.h \ + ../../Archive/../Common/ProgressUtils.h \ + ../../Archive/../Common/../IProgress.h \ + ../../Archive/../Common/../../Common/MyUnknown.h \ + ../../Archive/../Common/../../Common/Types.h \ + ../../Archive/../Common/../IDecl.h ../../Archive/../Common/RegisterArc.h \ + ../../Archive/../Common/../Archive/IArchive.h \ + ../../Archive/../Common/../Archive/../IProgress.h \ + ../../Archive/../Common/../Archive/../IStream.h \ + ../../Archive/../Common/../Archive/../PropID.h \ + ../../Archive/../Common/StreamUtils.h \ + ../../Archive/../Common/../IStream.h \ + ../../Archive/../Compress/CopyCoder.h \ + ../../Archive/../Compress/../../Common/MyCom.h \ + ../../Archive/../Compress/../ICoder.h ../../Archive/IArchive.h \ + ../../Archive/Common/HandlerOut.h \ + ../../Archive/Common/../../../Common/MyString.h \ + ../../Archive/Common/../../../Common/MyVector.h \ + ../../Archive/Common/../../../Common/Defs.h \ + ../../Archive/Common/../../Common/MethodProps.h \ + ../../Archive/Common/../../Common/../../Common/MyVector.h \ + ../../Archive/Common/../../Common/../../Windows/PropVariant.h \ + ../../Archive/Common/../../Common/../../Windows/../Common/MyWindows.h \ + ../../Archive/Common/../../Common/../../Windows/../Common/Types.h \ + ../../Archive/Common/../../Common/MethodId.h \ + ../../Archive/Common/../../Common/../../Common/Types.h +ZHandler.o: ../../Archive/ZHandler.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../../Common/ComTry.h \ + ../../../Common/MyWindows.h ../../../Windows/PropVariant.h \ + ../../../Windows/../Common/MyWindows.h \ + ../../../Windows/../Common/Types.h \ + ../../Archive/../Common/ProgressUtils.h \ + ../../Archive/../Common/../../Common/MyCom.h \ + ../../Archive/../Common/../../Common/MyWindows.h \ + ../../Archive/../Common/../ICoder.h ../../Archive/../Common/../IStream.h \ + ../../Archive/../Common/../../Common/MyUnknown.h \ + ../../Archive/../Common/../../Common/Types.h \ + ../../Archive/../Common/../IDecl.h \ + ../../Archive/../Common/../IProgress.h \ + ../../Archive/../Common/RegisterArc.h \ + ../../Archive/../Common/../Archive/IArchive.h \ + ../../Archive/../Common/../Archive/../IProgress.h \ + ../../Archive/../Common/../Archive/../IStream.h \ + ../../Archive/../Common/../Archive/../PropID.h \ + ../../Archive/../Common/StreamUtils.h \ + ../../Archive/../Common/../IStream.h \ + ../../Archive/../Compress/ZDecoder.h \ + ../../Archive/../Compress/../../Common/MyCom.h \ + ../../Archive/../Compress/../ICoder.h \ + ../../Archive/Common/DummyOutStream.h \ + ../../Archive/Common/../../IStream.h ../../../Common/MyCom.h +CoderMixer2.o: ../../Archive/Common/CoderMixer2.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../Archive/Common/CoderMixer2.h \ + ../../Archive/Common/../../../Common/MyVector.h \ + ../../Archive/Common/../../../Common/Defs.h \ + ../../Archive/Common/../../../Common/Types.h \ + ../../Archive/Common/../../../Common/MyCom.h \ + ../../Archive/Common/../../../Common/MyWindows.h \ + ../../Archive/Common/../../ICoder.h ../../Archive/Common/../../IStream.h \ + ../../Archive/Common/../../../Common/MyUnknown.h \ + ../../Archive/Common/../../../Common/Types.h \ + ../../Archive/Common/../../IDecl.h +CoderMixer2MT.o: ../../Archive/Common/CoderMixer2MT.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../Archive/Common/CoderMixer2MT.h ../../Archive/Common/CoderMixer2.h \ + ../../Archive/Common/../../../Common/MyVector.h \ + ../../Archive/Common/../../../Common/Defs.h \ + ../../Archive/Common/../../../Common/Types.h \ + ../../Archive/Common/../../../Common/MyCom.h \ + ../../Archive/Common/../../../Common/MyWindows.h \ + ../../Archive/Common/../../ICoder.h ../../Archive/Common/../../IStream.h \ + ../../Archive/Common/../../../Common/MyUnknown.h \ + ../../Archive/Common/../../../Common/Types.h \ + ../../Archive/Common/../../IDecl.h \ + ../../Archive/Common/../../Common/StreamBinder.h \ + ../../Archive/Common/../../Common/../IStream.h \ + ../../Archive/Common/../../Common/../../Windows/Synchronization.h \ + ../../Archive/Common/../../Common/../../Windows/Defs.h \ + ../../Archive/Common/../../Common/../../Windows/../Common/MyWindows.h \ + ../../Archive/Common/../../Common/../../Windows/../../C/Threads.h \ + ../../Archive/Common/../../Common/../../Windows/../../C/Types.h \ + ../../Archive/Common/../../Common/../../Windows/Synchronization2.h \ + ../../Archive/Common/../../Common/VirtThread.h \ + ../../Archive/Common/../../Common/../../Windows/Thread.h +CrossThreadProgress.o: ../../Archive/Common/CrossThreadProgress.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../Archive/Common/CrossThreadProgress.h \ + ../../Archive/Common/../../ICoder.h ../../Archive/Common/../../IStream.h \ + ../../Archive/Common/../../../Common/MyUnknown.h \ + ../../Archive/Common/../../../Common/MyWindows.h \ + ../../Archive/Common/../../../Common/Types.h \ + ../../Archive/Common/../../IDecl.h \ + ../../Archive/Common/../../../Windows/Synchronization.h \ + ../../Archive/Common/../../../Windows/Defs.h \ + ../../Archive/Common/../../../Windows/../Common/MyWindows.h \ + ../../Archive/Common/../../../Windows/../../C/Threads.h \ + ../../Archive/Common/../../../Windows/../../C/Types.h \ + ../../Archive/Common/../../../Windows/Synchronization2.h \ + ../../Archive/Common/../../../Common/MyCom.h +DummyOutStream.o: ../../Archive/Common/DummyOutStream.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../Archive/Common/DummyOutStream.h \ + ../../Archive/Common/../../IStream.h \ + ../../Archive/Common/../../../Common/MyUnknown.h \ + ../../Archive/Common/../../../Common/MyWindows.h \ + ../../Archive/Common/../../../Common/Types.h \ + ../../Archive/Common/../../IDecl.h ../../../Common/MyCom.h \ + ../../../Common/MyWindows.h +FindSignature.o: ../../Archive/Common/FindSignature.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../../Common/Buffer.h ../../../Common/Defs.h \ + ../../Archive/Common/FindSignature.h \ + ../../Archive/Common/../../IStream.h \ + ../../Archive/Common/../../../Common/MyUnknown.h \ + ../../Archive/Common/../../../Common/MyWindows.h \ + ../../Archive/Common/../../../Common/Types.h \ + ../../Archive/Common/../../IDecl.h \ + ../../Archive/Common/../../Common/StreamUtils.h \ + ../../Archive/Common/../../Common/../IStream.h +InStreamWithCRC.o: ../../Archive/Common/InStreamWithCRC.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../Archive/Common/InStreamWithCRC.h \ + ../../Archive/Common/../../../../C/7zCrc.h \ + ../../Archive/Common/../../../../C/Types.h \ + ../../Archive/Common/../../../Common/MyCom.h \ + ../../Archive/Common/../../../Common/MyWindows.h \ + ../../Archive/Common/../../IStream.h \ + ../../Archive/Common/../../../Common/MyUnknown.h \ + ../../Archive/Common/../../../Common/Types.h \ + ../../Archive/Common/../../IDecl.h +ItemNameUtils.o: ../../Archive/Common/ItemNameUtils.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../Archive/Common/../../../../C/Types.h \ + ../../Archive/Common/ItemNameUtils.h \ + ../../Archive/Common/../../../Common/MyString.h \ + ../../Archive/Common/../../../Common/MyVector.h \ + ../../Archive/Common/../../../Common/Defs.h +MultiStream.o: ../../Archive/Common/MultiStream.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../Archive/Common/MultiStream.h \ + ../../Archive/Common/../../../Common/MyCom.h \ + ../../Archive/Common/../../../Common/MyWindows.h \ + ../../Archive/Common/../../../Common/MyVector.h \ + ../../Archive/Common/../../../Common/Defs.h \ + ../../Archive/Common/../../IStream.h \ + ../../Archive/Common/../../../Common/MyUnknown.h \ + ../../Archive/Common/../../../Common/Types.h \ + ../../Archive/Common/../../IDecl.h +OutStreamWithCRC.o: ../../Archive/Common/OutStreamWithCRC.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../Archive/Common/OutStreamWithCRC.h \ + ../../Archive/Common/../../../../C/7zCrc.h \ + ../../Archive/Common/../../../../C/Types.h \ + ../../Archive/Common/../../../Common/MyCom.h \ + ../../Archive/Common/../../../Common/MyWindows.h \ + ../../Archive/Common/../../IStream.h \ + ../../Archive/Common/../../../Common/MyUnknown.h \ + ../../Archive/Common/../../../Common/Types.h \ + ../../Archive/Common/../../IDecl.h +OutStreamWithSha1.o: ../../Archive/Common/OutStreamWithSha1.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../Archive/Common/OutStreamWithSha1.h \ + ../../Archive/Common/../../Crypto/Sha1.h \ + ../../Archive/Common/../../Crypto/../../Common/Types.h \ + ../../Archive/Common/../../../Common/MyCom.h \ + ../../Archive/Common/../../../Common/MyWindows.h \ + ../../Archive/Common/../../IStream.h \ + ../../Archive/Common/../../../Common/MyUnknown.h \ + ../../Archive/Common/../../../Common/Types.h \ + ../../Archive/Common/../../IDecl.h +HandlerOut.o: ../../Archive/Common/HandlerOut.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../Archive/Common/../../../Common/StringToInt.h \ + ../../Archive/Common/../../../Common/Types.h \ + ../../Archive/Common/../../../Windows/PropVariant.h \ + ../../Archive/Common/../../../Windows/../Common/MyWindows.h \ + ../../Archive/Common/../../../Windows/../Common/Types.h \ + ../../Archive/Common/../../../Windows/System.h \ + ../../Archive/Common/../../ICoder.h ../../Archive/Common/../../IStream.h \ + ../../Archive/Common/../../../Common/MyUnknown.h \ + ../../Archive/Common/../../../Common/MyWindows.h \ + ../../Archive/Common/../../../Common/Types.h \ + ../../Archive/Common/../../IDecl.h \ + ../../Archive/Common/../Common/ParseProperties.h \ + ../../../Common/MyString.h ../../../Common/MyVector.h \ + ../../../Common/Defs.h ../../Archive/Common/HandlerOut.h \ + ../../Archive/Common/../../../Common/MyString.h \ + ../../Archive/Common/../../Common/MethodProps.h \ + ../../Archive/Common/../../Common/../../Common/MyVector.h \ + ../../Archive/Common/../../Common/../../Windows/PropVariant.h \ + ../../Archive/Common/../../Common/MethodId.h \ + ../../Archive/Common/../../Common/../../Common/Types.h +ParseProperties.o: ../../Archive/Common/ParseProperties.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../Archive/Common/ParseProperties.h ../../../Common/MyString.h \ + ../../../Common/MyVector.h ../../../Common/Defs.h \ + ../../../Common/StringToInt.h ../../../Common/MyCom.h \ + ../../../Common/MyWindows.h +7zCompressionMode.o: ../../Archive/7z/7zCompressionMode.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h +7zDecode.o: ../../Archive/7z/7zDecode.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h \ + ../../Archive/7z/../../Common/LimitedStreams.h \ + ../../Archive/7z/../../Common/../../Common/MyCom.h \ + ../../Archive/7z/../../Common/../../Common/MyWindows.h \ + ../../Archive/7z/../../Common/../../Common/MyVector.h \ + ../../Archive/7z/../../Common/../../Common/Defs.h \ + ../../Archive/7z/../../Common/../IStream.h \ + ../../Archive/7z/../../Common/../../Common/MyUnknown.h \ + ../../Archive/7z/../../Common/../../Common/Types.h \ + ../../Archive/7z/../../Common/../IDecl.h \ + ../../Archive/7z/../../Common/LockedStream.h \ + ../../Archive/7z/../../Common/../../Windows/Synchronization.h \ + ../../Archive/7z/../../Common/../../Windows/Defs.h \ + ../../Archive/7z/../../Common/../../Windows/../Common/MyWindows.h \ + ../../Archive/7z/../../Common/../../Windows/../../C/Threads.h \ + ../../Archive/7z/../../Common/../../Windows/../../C/Types.h \ + ../../Archive/7z/../../Common/../../Windows/Synchronization2.h \ + ../../Archive/7z/../../Common/ProgressUtils.h \ + ../../Archive/7z/../../Common/../ICoder.h \ + ../../Archive/7z/../../Common/../IStream.h \ + ../../Archive/7z/../../Common/../IProgress.h \ + ../../Archive/7z/../../Common/StreamObjects.h \ + ../../Archive/7z/../../Common/../../Common/Buffer.h \ + ../../Archive/7z/7zDecode.h ../../Archive/7z/../../IStream.h \ + ../../Archive/7z/../../IPassword.h \ + ../../Archive/7z/../../../Common/MyUnknown.h \ + ../../Archive/7z/../../../Common/Types.h ../../Archive/7z/../../IDecl.h \ + ../../Archive/7z/../Common/CoderMixer2.h \ + ../../Archive/7z/../Common/../../../Common/MyVector.h \ + ../../Archive/7z/../Common/../../../Common/Types.h \ + ../../Archive/7z/../Common/../../../Common/MyCom.h \ + ../../Archive/7z/../Common/../../ICoder.h \ + ../../Archive/7z/../Common/CoderMixer2MT.h \ + ../../Archive/7z/../Common/CoderMixer2.h \ + ../../Archive/7z/../Common/../../Common/StreamBinder.h \ + ../../Archive/7z/../Common/../../Common/../IStream.h \ + ../../Archive/7z/../Common/../../Common/../../Windows/Synchronization.h \ + ../../Archive/7z/../Common/../../Common/VirtThread.h \ + ../../Archive/7z/../Common/../../Common/../../Windows/Thread.h \ + ../../Archive/7z/../Common/../../Common/../../Windows/Defs.h \ + ../../Archive/7z/../Common/../../Common/../../Windows/../../C/Threads.h \ + ../../Archive/7z/../../Common/CreateCoder.h \ + ../../Archive/7z/../../Common/../../Common/MyString.h \ + ../../Archive/7z/../../Common/../../Common/MyVector.h \ + ../../Archive/7z/../../Common/MethodId.h \ + ../../Archive/7z/../../Common/../../Common/Types.h \ + ../../Archive/7z/7zItem.h ../../Archive/7z/../../../Common/Buffer.h \ + ../../Archive/7z/../../../Common/MyString.h \ + ../../Archive/7z/../../Common/MethodId.h ../../Archive/7z/7zHeader.h \ + ../../Archive/7z/../../../Common/Types.h +7zEncode.o: ../../Archive/7z/7zEncode.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h \ + ../../Archive/7z/../../Common/CreateCoder.h \ + ../../Archive/7z/../../Common/../../Common/MyCom.h \ + ../../Archive/7z/../../Common/../../Common/MyWindows.h \ + ../../Archive/7z/../../Common/../../Common/MyString.h \ + ../../Archive/7z/../../Common/../../Common/MyVector.h \ + ../../Archive/7z/../../Common/../../Common/Defs.h \ + ../../Archive/7z/../../Common/../ICoder.h \ + ../../Archive/7z/../../Common/../IStream.h \ + ../../Archive/7z/../../Common/../../Common/MyUnknown.h \ + ../../Archive/7z/../../Common/../../Common/Types.h \ + ../../Archive/7z/../../Common/../IDecl.h \ + ../../Archive/7z/../../Common/MethodId.h \ + ../../Archive/7z/../../Common/../../Common/Types.h \ + ../../Archive/7z/../../Common/FilterCoder.h \ + ../../Archive/7z/../../Common/../IPassword.h \ + ../../Archive/7z/../../Common/LimitedStreams.h \ + ../../Archive/7z/../../Common/../../Common/MyVector.h \ + ../../Archive/7z/../../Common/../IStream.h \ + ../../Archive/7z/../../Common/InOutTempBuffer.h \ + ../../Archive/7z/../../Common/../../Windows/FileDir.h \ + ../../Archive/7z/../../Common/../../Windows/../Common/MyString.h \ + ../../Archive/7z/../../Common/../../Windows/Defs.h \ + ../../Archive/7z/../../Common/../../Windows/../Common/MyWindows.h \ + ../../Archive/7z/../../Common/../../Windows/FileIO.h \ + ../../../Common/MyString.h ../../Archive/7z/../../Common/ProgressUtils.h \ + ../../Archive/7z/../../Common/../IProgress.h \ + ../../Archive/7z/../../Common/StreamObjects.h \ + ../../Archive/7z/../../Common/../../Common/Buffer.h \ + ../../Archive/7z/7zEncode.h ../../Archive/7z/7zCompressionMode.h \ + ../../Archive/7z/../../../Common/MyString.h \ + ../../Archive/7z/../../../Windows/PropVariant.h \ + ../../Archive/7z/../../../Windows/../Common/MyWindows.h \ + ../../Archive/7z/../../../Windows/../Common/Types.h \ + ../../Archive/7z/../../Common/MethodProps.h \ + ../../Archive/7z/../../Common/../../Windows/PropVariant.h \ + ../../Archive/7z/../Common/CoderMixer2.h \ + ../../Archive/7z/../Common/../../../Common/MyVector.h \ + ../../Archive/7z/../Common/../../../Common/Types.h \ + ../../Archive/7z/../Common/../../../Common/MyCom.h \ + ../../Archive/7z/../Common/../../ICoder.h \ + ../../Archive/7z/../Common/CoderMixer2MT.h \ + ../../Archive/7z/../Common/CoderMixer2.h \ + ../../Archive/7z/../Common/../../Common/StreamBinder.h \ + ../../Archive/7z/../Common/../../Common/../IStream.h \ + ../../Archive/7z/../Common/../../Common/../../Windows/Synchronization.h \ + ../../Archive/7z/../Common/../../Common/../../Windows/Defs.h \ + ../../Archive/7z/../Common/../../Common/../../Windows/../../C/Threads.h \ + ../../Archive/7z/../Common/../../Common/../../Windows/../../C/Types.h \ + ../../Archive/7z/../Common/../../Common/../../Windows/Synchronization2.h \ + ../../Archive/7z/../Common/../../Common/VirtThread.h \ + ../../Archive/7z/../Common/../../Common/../../Windows/Thread.h \ + ../../Archive/7z/7zItem.h ../../Archive/7z/../../../Common/Buffer.h \ + ../../Archive/7z/../../Common/MethodId.h ../../Archive/7z/7zHeader.h \ + ../../Archive/7z/../../../Common/Types.h ../../Archive/7z/7zSpecStream.h \ + ../../Archive/7z/../../IStream.h ../../Archive/7z/../../ICoder.h \ + ../../Archive/7z/../../../Common/MyCom.h +7zExtract.o: ../../Archive/7z/7zExtract.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h \ + ../../Archive/7z/../../../Common/ComTry.h \ + ../../Archive/7z/../../../Common/MyWindows.h \ + ../../Archive/7z/../../Common/ProgressUtils.h \ + ../../Archive/7z/../../Common/../../Common/MyCom.h \ + ../../Archive/7z/../../Common/../../Common/MyWindows.h \ + ../../Archive/7z/../../Common/../ICoder.h \ + ../../Archive/7z/../../Common/../IStream.h \ + ../../Archive/7z/../../Common/../../Common/MyUnknown.h \ + ../../Archive/7z/../../Common/../../Common/Types.h \ + ../../Archive/7z/../../Common/../IDecl.h \ + ../../Archive/7z/../../Common/../IProgress.h ../../Archive/7z/7zDecode.h \ + ../../Archive/7z/../../IStream.h ../../Archive/7z/../../IPassword.h \ + ../../Archive/7z/../../../Common/MyUnknown.h \ + ../../Archive/7z/../../../Common/Types.h ../../Archive/7z/../../IDecl.h \ + ../../Archive/7z/../Common/CoderMixer2.h \ + ../../Archive/7z/../Common/../../../Common/MyVector.h \ + ../../Archive/7z/../Common/../../../Common/Defs.h \ + ../../Archive/7z/../Common/../../../Common/Types.h \ + ../../Archive/7z/../Common/../../../Common/MyCom.h \ + ../../Archive/7z/../Common/../../ICoder.h \ + ../../Archive/7z/../Common/CoderMixer2MT.h \ + ../../Archive/7z/../Common/CoderMixer2.h \ + ../../Archive/7z/../Common/../../Common/StreamBinder.h \ + ../../Archive/7z/../Common/../../Common/../IStream.h \ + ../../Archive/7z/../Common/../../Common/../../Windows/Synchronization.h \ + ../../Archive/7z/../Common/../../Common/../../Windows/Defs.h \ + ../../Archive/7z/../Common/../../Common/../../Windows/../Common/MyWindows.h \ + ../../Archive/7z/../Common/../../Common/../../Windows/../../C/Threads.h \ + ../../Archive/7z/../Common/../../Common/../../Windows/../../C/Types.h \ + ../../Archive/7z/../Common/../../Common/../../Windows/Synchronization2.h \ + ../../Archive/7z/../Common/../../Common/VirtThread.h \ + ../../Archive/7z/../Common/../../Common/../../Windows/Thread.h \ + ../../Archive/7z/../../Common/CreateCoder.h \ + ../../Archive/7z/../../Common/../../Common/MyString.h \ + ../../Archive/7z/../../Common/../../Common/MyVector.h \ + ../../Archive/7z/../../Common/MethodId.h \ + ../../Archive/7z/../../Common/../../Common/Types.h \ + ../../Archive/7z/7zItem.h ../../Archive/7z/../../../Common/Buffer.h \ + ../../Archive/7z/../../../Common/Defs.h \ + ../../Archive/7z/../../../Common/MyString.h \ + ../../Archive/7z/../../Common/MethodId.h ../../Archive/7z/7zHeader.h \ + ../../Archive/7z/../../../Common/Types.h \ + ../../Archive/7z/7zFolderOutStream.h ../../Archive/7z/../IArchive.h \ + ../../Archive/7z/../../IProgress.h ../../Archive/7z/../../IStream.h \ + ../../Archive/7z/../../PropID.h \ + ../../Archive/7z/../Common/OutStreamWithCRC.h \ + ../../Archive/7z/../Common/../../../../C/7zCrc.h \ + ../../Archive/7z/../Common/../../../../C/Types.h \ + ../../Archive/7z/../Common/../../IStream.h ../../Archive/7z/7zIn.h \ + ../../Archive/7z/../../../Common/MyCom.h \ + ../../Archive/7z/../../Common/InBuffer.h \ + ../../Archive/7z/../../Common/../IStream.h \ + ../../Archive/7z/../../Common/../../Common/MyException.h \ + ../../Archive/7z/7zHandler.h ../../Archive/7z/../../ICoder.h \ + ../../Archive/7z/../Common/HandlerOut.h \ + ../../Archive/7z/../Common/../../../Common/MyString.h \ + ../../Archive/7z/../Common/../../Common/MethodProps.h \ + ../../Archive/7z/../Common/../../Common/../../Common/MyVector.h \ + ../../Archive/7z/../Common/../../Common/../../Windows/PropVariant.h \ + ../../Archive/7z/../Common/../../Common/../../Windows/../Common/Types.h \ + ../../Archive/7z/../Common/../../Common/MethodId.h \ + ../../Archive/7z/7zCompressionMode.h \ + ../../Archive/7z/../../../Windows/PropVariant.h \ + ../../Archive/7z/../../Common/MethodProps.h +7zFolderInStream.o: ../../Archive/7z/7zFolderInStream.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../Archive/7z/7zFolderInStream.h ../../Archive/7z/../../ICoder.h \ + ../../Archive/7z/../../IStream.h \ + ../../Archive/7z/../../../Common/MyUnknown.h \ + ../../Archive/7z/../../../Common/MyWindows.h \ + ../../Archive/7z/../../../Common/Types.h ../../Archive/7z/../../IDecl.h \ + ../../Archive/7z/../IArchive.h ../../Archive/7z/../../IProgress.h \ + ../../Archive/7z/../../IStream.h ../../Archive/7z/../../PropID.h \ + ../../Archive/7z/../Common/InStreamWithCRC.h \ + ../../Archive/7z/../Common/../../../../C/7zCrc.h \ + ../../Archive/7z/../Common/../../../../C/Types.h \ + ../../Archive/7z/../Common/../../../Common/MyCom.h \ + ../../Archive/7z/../Common/../../../Common/MyWindows.h \ + ../../Archive/7z/../Common/../../IStream.h ../../Archive/7z/7zItem.h \ + ../../Archive/7z/../../../Common/Buffer.h \ + ../../Archive/7z/../../../Common/Defs.h \ + ../../Archive/7z/../../../Common/MyString.h \ + ../../Archive/7z/../../../Common/MyVector.h \ + ../../Archive/7z/../../Common/MethodId.h \ + ../../Archive/7z/../../Common/../../Common/Types.h \ + ../../Archive/7z/7zHeader.h ../../Archive/7z/../../../Common/Types.h +7zFolderOutStream.o: ../../Archive/7z/7zFolderOutStream.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../Archive/7z/7zFolderOutStream.h ../../Archive/7z/../../IStream.h \ + ../../Archive/7z/../../../Common/MyUnknown.h \ + ../../Archive/7z/../../../Common/MyWindows.h \ + ../../Archive/7z/../../../Common/Types.h ../../Archive/7z/../../IDecl.h \ + ../../Archive/7z/../IArchive.h ../../Archive/7z/../../IProgress.h \ + ../../Archive/7z/../../IStream.h ../../Archive/7z/../../PropID.h \ + ../../Archive/7z/../Common/OutStreamWithCRC.h \ + ../../Archive/7z/../Common/../../../../C/7zCrc.h \ + ../../Archive/7z/../Common/../../../../C/Types.h \ + ../../Archive/7z/../Common/../../../Common/MyCom.h \ + ../../Archive/7z/../Common/../../../Common/MyWindows.h \ + ../../Archive/7z/../Common/../../IStream.h ../../Archive/7z/7zIn.h \ + ../../Archive/7z/../../../Common/MyCom.h \ + ../../Archive/7z/../../IPassword.h \ + ../../Archive/7z/../../Common/CreateCoder.h \ + ../../Archive/7z/../../Common/../../Common/MyCom.h \ + ../../Archive/7z/../../Common/../../Common/MyString.h \ + ../../Archive/7z/../../Common/../../Common/MyVector.h \ + ../../Archive/7z/../../Common/../../Common/Defs.h \ + ../../Archive/7z/../../Common/../ICoder.h \ + ../../Archive/7z/../../Common/../IStream.h \ + ../../Archive/7z/../../Common/MethodId.h \ + ../../Archive/7z/../../Common/../../Common/Types.h \ + ../../Archive/7z/../../Common/InBuffer.h \ + ../../Archive/7z/../../Common/../IStream.h \ + ../../Archive/7z/../../Common/../../Common/MyException.h \ + ../../Archive/7z/../../Common/../../Common/MyWindows.h \ + ../../Archive/7z/7zItem.h ../../Archive/7z/../../../Common/Buffer.h \ + ../../Archive/7z/../../../Common/Defs.h \ + ../../Archive/7z/../../../Common/MyString.h \ + ../../Archive/7z/../../Common/MethodId.h ../../Archive/7z/7zHeader.h \ + ../../Archive/7z/../../../Common/Types.h +7zHandler.o: ../../Archive/7z/7zHandler.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h \ + ../../Archive/7z/../../../../C/CpuArch.h \ + ../../Archive/7z/../../../../C/Types.h \ + ../../Archive/7z/../../../Common/ComTry.h \ + ../../Archive/7z/../../../Common/MyWindows.h \ + ../../Archive/7z/../../../Common/IntToString.h \ + ../../Archive/7z/../../../Common/Types.h \ + ../../Archive/7z/../../../Windows/System.h \ + ../../Archive/7z/../../../Windows/../Common/Types.h \ + ../../Archive/7z/../Common/ItemNameUtils.h \ + ../../Archive/7z/../Common/../../../Common/MyString.h \ + ../../Archive/7z/../Common/../../../Common/MyVector.h \ + ../../Archive/7z/../Common/../../../Common/Defs.h \ + ../../Archive/7z/7zHandler.h ../../Archive/7z/../../ICoder.h \ + ../../Archive/7z/../../IStream.h \ + ../../Archive/7z/../../../Common/MyUnknown.h \ + ../../Archive/7z/../../../Common/Types.h ../../Archive/7z/../../IDecl.h \ + ../../Archive/7z/../IArchive.h ../../Archive/7z/../../IProgress.h \ + ../../Archive/7z/../../IStream.h ../../Archive/7z/../../PropID.h \ + ../../Archive/7z/../../Common/CreateCoder.h \ + ../../Archive/7z/../../Common/../../Common/MyCom.h \ + ../../Archive/7z/../../Common/../../Common/MyWindows.h \ + ../../Archive/7z/../../Common/../../Common/MyString.h \ + ../../Archive/7z/../../Common/../ICoder.h \ + ../../Archive/7z/../../Common/MethodId.h \ + ../../Archive/7z/../../Common/../../Common/Types.h \ + ../../Archive/7z/../Common/HandlerOut.h \ + ../../Archive/7z/../Common/../../Common/MethodProps.h \ + ../../Archive/7z/../Common/../../Common/../../Common/MyVector.h \ + ../../Archive/7z/../Common/../../Common/../../Windows/PropVariant.h \ + ../../Archive/7z/../Common/../../Common/../../Windows/../Common/MyWindows.h \ + ../../Archive/7z/../Common/../../Common/../../Windows/../Common/Types.h \ + ../../Archive/7z/../Common/../../Common/MethodId.h \ + ../../Archive/7z/7zCompressionMode.h \ + ../../Archive/7z/../../../Common/MyString.h \ + ../../Archive/7z/../../../Windows/PropVariant.h \ + ../../Archive/7z/../../Common/MethodProps.h ../../Archive/7z/7zIn.h \ + ../../Archive/7z/../../../Common/MyCom.h \ + ../../Archive/7z/../../IPassword.h ../../Archive/7z/../../IStream.h \ + ../../Archive/7z/../../Common/InBuffer.h \ + ../../Archive/7z/../../Common/../IStream.h \ + ../../Archive/7z/../../Common/../../Common/MyException.h \ + ../../Archive/7z/7zItem.h ../../Archive/7z/../../../Common/Buffer.h \ + ../../Archive/7z/../../../Common/Defs.h \ + ../../Archive/7z/../../Common/MethodId.h ../../Archive/7z/7zHeader.h \ + ../../Archive/7z/../../../Common/Types.h ../../Archive/7z/7zProperties.h \ + ../../Archive/7z/../../PropID.h +7zHandlerOut.o: ../../Archive/7z/7zHandlerOut.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../Archive/7z/../../../Windows/PropVariant.h \ + ../../Archive/7z/../../../Windows/../Common/MyWindows.h \ + ../../Archive/7z/../../../Windows/../Common/Types.h \ + ../../Archive/7z/../../../Common/ComTry.h \ + ../../Archive/7z/../../../Common/MyWindows.h \ + ../../Archive/7z/../../../Common/StringToInt.h \ + ../../Archive/7z/../../../Common/Types.h ../../Archive/7z/../../ICoder.h \ + ../../Archive/7z/../../IStream.h \ + ../../Archive/7z/../../../Common/MyUnknown.h \ + ../../Archive/7z/../../../Common/Types.h ../../Archive/7z/../../IDecl.h \ + ../../Archive/7z/../Common/ItemNameUtils.h \ + ../../Archive/7z/../Common/../../../Common/MyString.h \ + ../../Archive/7z/../Common/../../../Common/MyVector.h \ + ../../Archive/7z/../Common/../../../Common/Defs.h \ + ../../Archive/7z/../Common/ParseProperties.h ../../../Common/MyString.h \ + ../../Archive/7z/7zHandler.h ../../Archive/7z/../IArchive.h \ + ../../Archive/7z/../../IProgress.h ../../Archive/7z/../../IStream.h \ + ../../Archive/7z/../../PropID.h \ + ../../Archive/7z/../../Common/CreateCoder.h \ + ../../Archive/7z/../../Common/../../Common/MyCom.h \ + ../../Archive/7z/../../Common/../../Common/MyWindows.h \ + ../../Archive/7z/../../Common/../../Common/MyString.h \ + ../../Archive/7z/../../Common/../ICoder.h \ + ../../Archive/7z/../../Common/MethodId.h \ + ../../Archive/7z/../../Common/../../Common/Types.h \ + ../../Archive/7z/../Common/HandlerOut.h \ + ../../Archive/7z/../Common/../../Common/MethodProps.h \ + ../../Archive/7z/../Common/../../Common/../../Common/MyVector.h \ + ../../Archive/7z/../Common/../../Common/../../Windows/PropVariant.h \ + ../../Archive/7z/../Common/../../Common/MethodId.h \ + ../../Archive/7z/7zCompressionMode.h \ + ../../Archive/7z/../../../Common/MyString.h \ + ../../Archive/7z/../../Common/MethodProps.h ../../Archive/7z/7zIn.h \ + ../../Archive/7z/../../../Common/MyCom.h \ + ../../Archive/7z/../../IPassword.h ../../Archive/7z/../../IStream.h \ + ../../Archive/7z/../../Common/InBuffer.h \ + ../../Archive/7z/../../Common/../IStream.h \ + ../../Archive/7z/../../Common/../../Common/MyException.h \ + ../../Archive/7z/7zItem.h ../../Archive/7z/../../../Common/Buffer.h \ + ../../Archive/7z/../../../Common/Defs.h \ + ../../Archive/7z/../../Common/MethodId.h ../../Archive/7z/7zHeader.h \ + ../../Archive/7z/../../../Common/Types.h ../../Archive/7z/7zOut.h \ + ../../Archive/7z/7zEncode.h ../../Archive/7z/../Common/CoderMixer2.h \ + ../../Archive/7z/../Common/../../../Common/MyVector.h \ + ../../Archive/7z/../Common/../../../Common/Types.h \ + ../../Archive/7z/../Common/../../../Common/MyCom.h \ + ../../Archive/7z/../Common/../../ICoder.h \ + ../../Archive/7z/../Common/CoderMixer2MT.h \ + ../../Archive/7z/../Common/CoderMixer2.h \ + ../../Archive/7z/../Common/../../Common/StreamBinder.h \ + ../../Archive/7z/../Common/../../Common/../IStream.h \ + ../../Archive/7z/../Common/../../Common/../../Windows/Synchronization.h \ + ../../Archive/7z/../Common/../../Common/../../Windows/Defs.h \ + ../../Archive/7z/../Common/../../Common/../../Windows/../Common/MyWindows.h \ + ../../Archive/7z/../Common/../../Common/../../Windows/../../C/Threads.h \ + ../../Archive/7z/../Common/../../Common/../../Windows/../../C/Types.h \ + ../../Archive/7z/../Common/../../Common/../../Windows/Synchronization2.h \ + ../../Archive/7z/../Common/../../Common/VirtThread.h \ + ../../Archive/7z/../Common/../../Common/../../Windows/Thread.h \ + ../../Archive/7z/../../Common/OutBuffer.h ../../Archive/7z/7zUpdate.h +7zHeader.o: ../../Archive/7z/7zHeader.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../Archive/7z/7zHeader.h \ + ../../Archive/7z/../../../Common/Types.h +7zIn.o: ../../Archive/7z/7zIn.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../Archive/7z/../../../../C/7zCrc.h \ + ../../Archive/7z/../../../../C/Types.h \ + ../../Archive/7z/../../../../C/CpuArch.h \ + ../../Archive/7z/../../Common/StreamObjects.h \ + ../../Archive/7z/../../Common/../../Common/Buffer.h \ + ../../Archive/7z/../../Common/../../Common/Defs.h \ + ../../Archive/7z/../../Common/../../Common/MyCom.h \ + ../../Archive/7z/../../Common/../../Common/MyWindows.h \ + ../../Archive/7z/../../Common/../IStream.h \ + ../../Archive/7z/../../Common/../../Common/MyUnknown.h \ + ../../Archive/7z/../../Common/../../Common/Types.h \ + ../../Archive/7z/../../Common/../IDecl.h \ + ../../Archive/7z/../../Common/StreamUtils.h ../../Archive/7z/7zDecode.h \ + ../../Archive/7z/../../IStream.h ../../Archive/7z/../../IPassword.h \ + ../../Archive/7z/../../../Common/MyUnknown.h \ + ../../Archive/7z/../../../Common/Types.h ../../Archive/7z/../../IDecl.h \ + ../../Archive/7z/../Common/CoderMixer2.h \ + ../../Archive/7z/../Common/../../../Common/MyVector.h \ + ../../Archive/7z/../Common/../../../Common/Defs.h \ + ../../Archive/7z/../Common/../../../Common/Types.h \ + ../../Archive/7z/../Common/../../../Common/MyCom.h \ + ../../Archive/7z/../Common/../../ICoder.h \ + ../../Archive/7z/../Common/../../IStream.h \ + ../../Archive/7z/../Common/CoderMixer2MT.h \ + ../../Archive/7z/../Common/CoderMixer2.h \ + ../../Archive/7z/../Common/../../Common/StreamBinder.h \ + ../../Archive/7z/../Common/../../Common/../IStream.h \ + ../../Archive/7z/../Common/../../Common/../../Windows/Synchronization.h \ + ../../Archive/7z/../Common/../../Common/../../Windows/Defs.h \ + ../../Archive/7z/../Common/../../Common/../../Windows/../Common/MyWindows.h \ + ../../Archive/7z/../Common/../../Common/../../Windows/../../C/Threads.h \ + ../../Archive/7z/../Common/../../Common/../../Windows/../../C/Types.h \ + ../../Archive/7z/../Common/../../Common/../../Windows/Synchronization2.h \ + ../../Archive/7z/../Common/../../Common/VirtThread.h \ + ../../Archive/7z/../Common/../../Common/../../Windows/Thread.h \ + ../../Archive/7z/../../Common/CreateCoder.h \ + ../../Archive/7z/../../Common/../../Common/MyString.h \ + ../../Archive/7z/../../Common/../../Common/MyVector.h \ + ../../Archive/7z/../../Common/../ICoder.h \ + ../../Archive/7z/../../Common/MethodId.h \ + ../../Archive/7z/../../Common/../../Common/Types.h \ + ../../Archive/7z/7zItem.h ../../Archive/7z/../../../Common/Buffer.h \ + ../../Archive/7z/../../../Common/MyString.h \ + ../../Archive/7z/../../Common/MethodId.h ../../Archive/7z/7zHeader.h \ + ../../Archive/7z/../../../Common/Types.h ../../Archive/7z/7zIn.h \ + ../../Archive/7z/../../../Common/MyCom.h \ + ../../Archive/7z/../../Common/InBuffer.h \ + ../../Archive/7z/../../Common/../../Common/MyException.h +7zOut.o: ../../Archive/7z/7zOut.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../Archive/7z/../../../../C/7zCrc.h \ + ../../Archive/7z/../../../../C/Types.h \ + ../../Archive/7z/../../../Common/AutoPtr.h \ + ../../Archive/7z/../../Common/StreamObjects.h \ + ../../Archive/7z/../../Common/../../Common/Buffer.h \ + ../../Archive/7z/../../Common/../../Common/Defs.h \ + ../../Archive/7z/../../Common/../../Common/MyCom.h \ + ../../Archive/7z/../../Common/../../Common/MyWindows.h \ + ../../Archive/7z/../../Common/../IStream.h \ + ../../Archive/7z/../../Common/../../Common/MyUnknown.h \ + ../../Archive/7z/../../Common/../../Common/Types.h \ + ../../Archive/7z/../../Common/../IDecl.h ../../Archive/7z/7zOut.h \ + ../../Archive/7z/7zCompressionMode.h \ + ../../Archive/7z/../../../Common/MyString.h \ + ../../Archive/7z/../../../Common/MyVector.h \ + ../../Archive/7z/../../../Common/Defs.h \ + ../../Archive/7z/../../../Windows/PropVariant.h \ + ../../Archive/7z/../../../Windows/../Common/MyWindows.h \ + ../../Archive/7z/../../../Windows/../Common/Types.h \ + ../../Archive/7z/../../Common/MethodProps.h \ + ../../Archive/7z/../../Common/../../Common/MyVector.h \ + ../../Archive/7z/../../Common/../../Windows/PropVariant.h \ + ../../Archive/7z/../../Common/MethodId.h \ + ../../Archive/7z/../../Common/../../Common/Types.h \ + ../../Archive/7z/7zEncode.h ../../Archive/7z/../Common/CoderMixer2.h \ + ../../Archive/7z/../Common/../../../Common/MyVector.h \ + ../../Archive/7z/../Common/../../../Common/Types.h \ + ../../Archive/7z/../Common/../../../Common/MyCom.h \ + ../../Archive/7z/../Common/../../ICoder.h \ + ../../Archive/7z/../Common/../../IStream.h \ + ../../Archive/7z/../Common/CoderMixer2MT.h \ + ../../Archive/7z/../Common/CoderMixer2.h \ + ../../Archive/7z/../Common/../../Common/StreamBinder.h \ + ../../Archive/7z/../Common/../../Common/../IStream.h \ + ../../Archive/7z/../Common/../../Common/../../Windows/Synchronization.h \ + ../../Archive/7z/../Common/../../Common/../../Windows/Defs.h \ + ../../Archive/7z/../Common/../../Common/../../Windows/../Common/MyWindows.h \ + ../../Archive/7z/../Common/../../Common/../../Windows/../../C/Threads.h \ + ../../Archive/7z/../Common/../../Common/../../Windows/../../C/Types.h \ + ../../Archive/7z/../Common/../../Common/../../Windows/Synchronization2.h \ + ../../Archive/7z/../Common/../../Common/VirtThread.h \ + ../../Archive/7z/../Common/../../Common/../../Windows/Thread.h \ + ../../Archive/7z/7zItem.h ../../Archive/7z/../../../Common/Buffer.h \ + ../../Archive/7z/../../Common/MethodId.h ../../Archive/7z/7zHeader.h \ + ../../Archive/7z/../../../Common/Types.h \ + ../../Archive/7z/../../Common/CreateCoder.h \ + ../../Archive/7z/../../Common/../../Common/MyString.h \ + ../../Archive/7z/../../Common/../ICoder.h \ + ../../Archive/7z/../../Common/OutBuffer.h \ + ../../Archive/7z/../../Common/../../Common/MyException.h +7zProperties.o: ../../Archive/7z/7zProperties.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../Archive/7z/7zProperties.h ../../Archive/7z/../../PropID.h \ + ../../Archive/7z/7zHeader.h ../../Archive/7z/../../../Common/Types.h \ + ../../Archive/7z/7zHandler.h ../../Archive/7z/../../ICoder.h \ + ../../Archive/7z/../../IStream.h \ + ../../Archive/7z/../../../Common/MyUnknown.h \ + ../../Archive/7z/../../../Common/MyWindows.h \ + ../../Archive/7z/../../../Common/Types.h ../../Archive/7z/../../IDecl.h \ + ../../Archive/7z/../IArchive.h ../../Archive/7z/../../IProgress.h \ + ../../Archive/7z/../../IStream.h ../../Archive/7z/../../PropID.h \ + ../../Archive/7z/../../Common/CreateCoder.h \ + ../../Archive/7z/../../Common/../../Common/MyCom.h \ + ../../Archive/7z/../../Common/../../Common/MyWindows.h \ + ../../Archive/7z/../../Common/../../Common/MyString.h \ + ../../Archive/7z/../../Common/../../Common/MyVector.h \ + ../../Archive/7z/../../Common/../../Common/Defs.h \ + ../../Archive/7z/../../Common/../ICoder.h \ + ../../Archive/7z/../../Common/MethodId.h \ + ../../Archive/7z/../../Common/../../Common/Types.h \ + ../../Archive/7z/../Common/HandlerOut.h \ + ../../Archive/7z/../Common/../../../Common/MyString.h \ + ../../Archive/7z/../Common/../../Common/MethodProps.h \ + ../../Archive/7z/../Common/../../Common/../../Common/MyVector.h \ + ../../Archive/7z/../Common/../../Common/../../Windows/PropVariant.h \ + ../../Archive/7z/../Common/../../Common/../../Windows/../Common/MyWindows.h \ + ../../Archive/7z/../Common/../../Common/../../Windows/../Common/Types.h \ + ../../Archive/7z/../Common/../../Common/MethodId.h \ + ../../Archive/7z/7zCompressionMode.h \ + ../../Archive/7z/../../../Common/MyString.h \ + ../../Archive/7z/../../../Windows/PropVariant.h \ + ../../Archive/7z/../../Common/MethodProps.h ../../Archive/7z/7zIn.h \ + ../../Archive/7z/../../../Common/MyCom.h \ + ../../Archive/7z/../../IPassword.h ../../Archive/7z/../../IStream.h \ + ../../Archive/7z/../../Common/InBuffer.h \ + ../../Archive/7z/../../Common/../IStream.h \ + ../../Archive/7z/../../Common/../../Common/MyException.h \ + ../../Archive/7z/7zItem.h ../../Archive/7z/../../../Common/Buffer.h \ + ../../Archive/7z/../../../Common/Defs.h \ + ../../Archive/7z/../../Common/MethodId.h +7zSpecStream.o: ../../Archive/7z/7zSpecStream.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../Archive/7z/7zSpecStream.h ../../Archive/7z/../../IStream.h \ + ../../Archive/7z/../../../Common/MyUnknown.h \ + ../../Archive/7z/../../../Common/MyWindows.h \ + ../../Archive/7z/../../../Common/Types.h ../../Archive/7z/../../IDecl.h \ + ../../Archive/7z/../../ICoder.h ../../Archive/7z/../../IStream.h \ + ../../Archive/7z/../../../Common/MyCom.h +7zUpdate.o: ../../Archive/7z/7zUpdate.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h \ + ../../Archive/7z/../../../../C/CpuArch.h \ + ../../Archive/7z/../../../../C/Types.h \ + ../../Archive/7z/../../Common/LimitedStreams.h \ + ../../Archive/7z/../../Common/../../Common/MyCom.h \ + ../../Archive/7z/../../Common/../../Common/MyWindows.h \ + ../../Archive/7z/../../Common/../../Common/MyVector.h \ + ../../Archive/7z/../../Common/../../Common/Defs.h \ + ../../Archive/7z/../../Common/../IStream.h \ + ../../Archive/7z/../../Common/../../Common/MyUnknown.h \ + ../../Archive/7z/../../Common/../../Common/Types.h \ + ../../Archive/7z/../../Common/../IDecl.h \ + ../../Archive/7z/../../Common/ProgressUtils.h \ + ../../Archive/7z/../../Common/../ICoder.h \ + ../../Archive/7z/../../Common/../IStream.h \ + ../../Archive/7z/../../Common/../IProgress.h \ + ../../Archive/7z/../../Common/CreateCoder.h \ + ../../Archive/7z/../../Common/../../Common/MyString.h \ + ../../Archive/7z/../../Common/../../Common/MyVector.h \ + ../../Archive/7z/../../Common/MethodId.h \ + ../../Archive/7z/../../Common/../../Common/Types.h \ + ../../Archive/7z/../../Compress/CopyCoder.h \ + ../../Archive/7z/../../Compress/../../Common/MyCom.h \ + ../../Archive/7z/../../Compress/../ICoder.h \ + ../../Archive/7z/../Common/ItemNameUtils.h \ + ../../Archive/7z/../Common/../../../Common/MyString.h \ + ../../Archive/7z/../Common/OutStreamWithCRC.h \ + ../../Archive/7z/../Common/../../../../C/7zCrc.h \ + ../../Archive/7z/../Common/../../../../C/Types.h \ + ../../Archive/7z/../Common/../../../Common/MyCom.h \ + ../../Archive/7z/../Common/../../IStream.h ../../Archive/7z/7zDecode.h \ + ../../Archive/7z/../../IStream.h ../../Archive/7z/../../IPassword.h \ + ../../Archive/7z/../../../Common/MyUnknown.h \ + ../../Archive/7z/../../../Common/Types.h ../../Archive/7z/../../IDecl.h \ + ../../Archive/7z/../Common/CoderMixer2.h \ + ../../Archive/7z/../Common/../../../Common/MyVector.h \ + ../../Archive/7z/../Common/../../../Common/Types.h \ + ../../Archive/7z/../Common/../../ICoder.h \ + ../../Archive/7z/../Common/CoderMixer2MT.h \ + ../../Archive/7z/../Common/CoderMixer2.h \ + ../../Archive/7z/../Common/../../Common/StreamBinder.h \ + ../../Archive/7z/../Common/../../Common/../IStream.h \ + ../../Archive/7z/../Common/../../Common/../../Windows/Synchronization.h \ + ../../Archive/7z/../Common/../../Common/../../Windows/Defs.h \ + ../../Archive/7z/../Common/../../Common/../../Windows/../Common/MyWindows.h \ + ../../Archive/7z/../Common/../../Common/../../Windows/../../C/Threads.h \ + ../../Archive/7z/../Common/../../Common/../../Windows/../../C/Types.h \ + ../../Archive/7z/../Common/../../Common/../../Windows/Synchronization2.h \ + ../../Archive/7z/../Common/../../Common/VirtThread.h \ + ../../Archive/7z/../Common/../../Common/../../Windows/Thread.h \ + ../../Archive/7z/7zItem.h ../../Archive/7z/../../../Common/Buffer.h \ + ../../Archive/7z/../../../Common/Defs.h \ + ../../Archive/7z/../../../Common/MyString.h \ + ../../Archive/7z/../../Common/MethodId.h ../../Archive/7z/7zHeader.h \ + ../../Archive/7z/../../../Common/Types.h ../../Archive/7z/7zEncode.h \ + ../../Archive/7z/7zCompressionMode.h \ + ../../Archive/7z/../../../Windows/PropVariant.h \ + ../../Archive/7z/../../../Windows/../Common/MyWindows.h \ + ../../Archive/7z/../../../Windows/../Common/Types.h \ + ../../Archive/7z/../../Common/MethodProps.h \ + ../../Archive/7z/../../Common/../../Windows/PropVariant.h \ + ../../Archive/7z/7zFolderInStream.h ../../Archive/7z/../../ICoder.h \ + ../../Archive/7z/../IArchive.h ../../Archive/7z/../../IProgress.h \ + ../../Archive/7z/../../IStream.h ../../Archive/7z/../../PropID.h \ + ../../Archive/7z/../Common/InStreamWithCRC.h \ + ../../Archive/7z/7zHandler.h ../../Archive/7z/../Common/HandlerOut.h \ + ../../Archive/7z/../Common/../../Common/MethodProps.h \ + ../../Archive/7z/7zIn.h ../../Archive/7z/../../../Common/MyCom.h \ + ../../Archive/7z/../../Common/InBuffer.h \ + ../../Archive/7z/../../Common/../../Common/MyException.h \ + ../../Archive/7z/7zOut.h ../../Archive/7z/../../Common/OutBuffer.h \ + ../../Archive/7z/7zUpdate.h ../../../Windows/FileIO.h \ + ../../../Common/MyString.h +7zRegister.o: ../../Archive/7z/7zRegister.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h \ + ../../Archive/7z/../../Common/RegisterArc.h \ + ../../Archive/7z/../../Common/../Archive/IArchive.h \ + ../../Archive/7z/../../Common/../Archive/../IProgress.h \ + ../../Archive/7z/../../Common/../Archive/../../Common/MyUnknown.h \ + ../../Archive/7z/../../Common/../Archive/../../Common/MyWindows.h \ + ../../Archive/7z/../../Common/../Archive/../../Common/Types.h \ + ../../Archive/7z/../../Common/../Archive/../IDecl.h \ + ../../Archive/7z/../../Common/../Archive/../IStream.h \ + ../../Archive/7z/../../Common/../Archive/../PropID.h \ + ../../Archive/7z/7zHandler.h ../../Archive/7z/../../ICoder.h \ + ../../Archive/7z/../../IStream.h ../../Archive/7z/../IArchive.h \ + ../../Archive/7z/../../Common/CreateCoder.h \ + ../../Archive/7z/../../Common/../../Common/MyCom.h \ + ../../Archive/7z/../../Common/../../Common/MyWindows.h \ + ../../Archive/7z/../../Common/../../Common/MyString.h \ + ../../Archive/7z/../../Common/../../Common/MyVector.h \ + ../../Archive/7z/../../Common/../../Common/Defs.h \ + ../../Archive/7z/../../Common/../ICoder.h \ + ../../Archive/7z/../../Common/MethodId.h \ + ../../Archive/7z/../../Common/../../Common/Types.h \ + ../../Archive/7z/../Common/HandlerOut.h \ + ../../Archive/7z/../Common/../../../Common/MyString.h \ + ../../Archive/7z/../Common/../../Common/MethodProps.h \ + ../../Archive/7z/../Common/../../Common/../../Common/MyVector.h \ + ../../Archive/7z/../Common/../../Common/../../Windows/PropVariant.h \ + ../../Archive/7z/../Common/../../Common/../../Windows/../Common/MyWindows.h \ + ../../Archive/7z/../Common/../../Common/../../Windows/../Common/Types.h \ + ../../Archive/7z/../Common/../../Common/MethodId.h \ + ../../Archive/7z/7zCompressionMode.h \ + ../../Archive/7z/../../../Common/MyString.h \ + ../../Archive/7z/../../../Windows/PropVariant.h \ + ../../Archive/7z/../../Common/MethodProps.h ../../Archive/7z/7zIn.h \ + ../../Archive/7z/../../../Common/MyCom.h \ + ../../Archive/7z/../../IPassword.h \ + ../../Archive/7z/../../../Common/MyUnknown.h \ + ../../Archive/7z/../../../Common/Types.h ../../Archive/7z/../../IDecl.h \ + ../../Archive/7z/../../IStream.h \ + ../../Archive/7z/../../Common/InBuffer.h \ + ../../Archive/7z/../../Common/../IStream.h \ + ../../Archive/7z/../../Common/../../Common/MyException.h \ + ../../Archive/7z/7zItem.h ../../Archive/7z/../../../Common/Buffer.h \ + ../../Archive/7z/../../../Common/Defs.h \ + ../../Archive/7z/../../Common/MethodId.h ../../Archive/7z/7zHeader.h \ + ../../Archive/7z/../../../Common/Types.h +CabBlockInStream.o: ../../Archive/Cab/CabBlockInStream.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../Archive/Cab/../../../../C/Alloc.h ../../../Common/Defs.h \ + ../../Archive/Cab/../../Common/StreamUtils.h \ + ../../Archive/Cab/../../Common/../IStream.h \ + ../../Archive/Cab/../../Common/../../Common/MyUnknown.h \ + ../../Archive/Cab/../../Common/../../Common/MyWindows.h \ + ../../Archive/Cab/../../Common/../../Common/Types.h \ + ../../Archive/Cab/../../Common/../IDecl.h \ + ../../Archive/Cab/CabBlockInStream.h ../../../Common/MyCom.h \ + ../../../Common/MyWindows.h ../../Archive/Cab/../../IStream.h +CabHandler.o: ../../Archive/Cab/CabHandler.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../Archive/Cab/../../../../C/Alloc.h ../../../Common/Buffer.h \ + ../../../Common/Defs.h ../../../Common/ComTry.h \ + ../../../Common/MyWindows.h ../../../Common/Defs.h \ + ../../../Common/IntToString.h ../../../Common/StringConvert.h \ + ../../../Common/MyString.h ../../../Common/MyVector.h \ + ../../../Common/UTFConvert.h ../../../Windows/PropVariant.h \ + ../../../Windows/../Common/MyWindows.h \ + ../../../Windows/../Common/Types.h ../../../Windows/Time.h \ + ../../Archive/Cab/../../Common/ProgressUtils.h \ + ../../Archive/Cab/../../Common/../../Common/MyCom.h \ + ../../Archive/Cab/../../Common/../../Common/MyWindows.h \ + ../../Archive/Cab/../../Common/../ICoder.h \ + ../../Archive/Cab/../../Common/../IStream.h \ + ../../Archive/Cab/../../Common/../../Common/MyUnknown.h \ + ../../Archive/Cab/../../Common/../../Common/Types.h \ + ../../Archive/Cab/../../Common/../IDecl.h \ + ../../Archive/Cab/../../Common/../IProgress.h \ + ../../Archive/Cab/../../Common/StreamUtils.h \ + ../../Archive/Cab/../../Common/../IStream.h \ + ../../Archive/Cab/../../Compress/CopyCoder.h \ + ../../Archive/Cab/../../Compress/../../Common/MyCom.h \ + ../../Archive/Cab/../../Compress/../ICoder.h \ + ../../Archive/Cab/../../Compress/DeflateDecoder.h \ + ../../Archive/Cab/../../Compress/../Common/InBuffer.h \ + ../../Archive/Cab/../../Compress/../Common/../IStream.h \ + ../../Archive/Cab/../../Compress/../Common/../../Common/MyCom.h \ + ../../Archive/Cab/../../Compress/../Common/../../Common/MyException.h \ + ../../Archive/Cab/../../Compress/../Common/../../Common/MyWindows.h \ + ../../Archive/Cab/../../Compress/BitlDecoder.h \ + ../../Archive/Cab/../../Compress/../IStream.h \ + ../../Archive/Cab/../../Compress/DeflateConst.h \ + ../../Archive/Cab/../../Compress/HuffmanDecoder.h \ + ../../Archive/Cab/../../Compress/../../Common/Types.h \ + ../../Archive/Cab/../../Compress/LzOutWindow.h \ + ../../Archive/Cab/../../Compress/../Common/OutBuffer.h \ + ../../Archive/Cab/../../Compress/LzxDecoder.h \ + ../../Archive/Cab/../../Compress/Lzx.h \ + ../../Archive/Cab/../../Compress/Lzx86Converter.h \ + ../../Archive/Cab/../../Compress/QuantumDecoder.h \ + ../../Archive/Cab/../Common/ItemNameUtils.h \ + ../../Archive/Cab/../Common/../../../Common/MyString.h \ + ../../Archive/Cab/CabBlockInStream.h ../../../Common/MyCom.h \ + ../../Archive/Cab/../../IStream.h ../../Archive/Cab/CabHandler.h \ + ../../Archive/Cab/../IArchive.h ../../Archive/Cab/../../IProgress.h \ + ../../Archive/Cab/../../IStream.h ../../Archive/Cab/../../PropID.h \ + ../../Archive/Cab/CabIn.h ../../Archive/Cab/../../Common/InBuffer.h \ + ../../Archive/Cab/CabHeader.h ../../Archive/Cab/CabItem.h \ + ../../../Common/MyString.h +CabHeader.o: ../../Archive/Cab/CabHeader.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../Archive/Cab/CabHeader.h +CabIn.o: ../../Archive/Cab/CabIn.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h \ + ../../Archive/Cab/../Common/FindSignature.h \ + ../../Archive/Cab/../Common/../../IStream.h \ + ../../Archive/Cab/../Common/../../../Common/MyUnknown.h \ + ../../Archive/Cab/../Common/../../../Common/MyWindows.h \ + ../../Archive/Cab/../Common/../../../Common/Types.h \ + ../../Archive/Cab/../Common/../../IDecl.h ../../Archive/Cab/CabIn.h \ + ../../Archive/Cab/../../IStream.h \ + ../../Archive/Cab/../../Common/InBuffer.h \ + ../../Archive/Cab/../../Common/../IStream.h \ + ../../Archive/Cab/../../Common/../../Common/MyCom.h \ + ../../Archive/Cab/../../Common/../../Common/MyWindows.h \ + ../../Archive/Cab/../../Common/../../Common/MyException.h \ + ../../Archive/Cab/CabHeader.h ../../Archive/Cab/CabItem.h \ + ../../../Common/MyString.h ../../../Common/MyVector.h \ + ../../../Common/Defs.h +CabRegister.o: ../../Archive/Cab/CabRegister.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../Archive/Cab/../../Common/RegisterArc.h \ + ../../Archive/Cab/../../Common/../Archive/IArchive.h \ + ../../Archive/Cab/../../Common/../Archive/../IProgress.h \ + ../../Archive/Cab/../../Common/../Archive/../../Common/MyUnknown.h \ + ../../Archive/Cab/../../Common/../Archive/../../Common/MyWindows.h \ + ../../Archive/Cab/../../Common/../Archive/../../Common/Types.h \ + ../../Archive/Cab/../../Common/../Archive/../IDecl.h \ + ../../Archive/Cab/../../Common/../Archive/../IStream.h \ + ../../Archive/Cab/../../Common/../Archive/../PropID.h \ + ../../Archive/Cab/CabHandler.h ../../../Common/MyCom.h \ + ../../../Common/MyWindows.h ../../Archive/Cab/../IArchive.h \ + ../../Archive/Cab/CabIn.h ../../Archive/Cab/../../IStream.h \ + ../../Archive/Cab/../../Common/InBuffer.h \ + ../../Archive/Cab/../../Common/../IStream.h \ + ../../Archive/Cab/../../Common/../../Common/MyCom.h \ + ../../Archive/Cab/../../Common/../../Common/MyException.h \ + ../../Archive/Cab/../../Common/../../Common/MyWindows.h \ + ../../Archive/Cab/CabHeader.h ../../Archive/Cab/CabItem.h \ + ../../../Common/MyString.h ../../../Common/MyVector.h \ + ../../../Common/Defs.h +ChmHandler.o: ../../Archive/Chm/ChmHandler.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../../Common/ComTry.h ../../../Common/MyWindows.h \ + ../../../Common/Defs.h ../../../Common/StringConvert.h \ + ../../../Common/MyString.h ../../../Common/MyVector.h \ + ../../../Common/Defs.h ../../../Common/UTFConvert.h \ + ../../../Windows/PropVariant.h ../../../Windows/../Common/MyWindows.h \ + ../../../Windows/../Common/Types.h ../../../Windows/Time.h \ + ../../Archive/Chm/../../Common/LimitedStreams.h \ + ../../Archive/Chm/../../Common/../../Common/MyCom.h \ + ../../Archive/Chm/../../Common/../../Common/MyWindows.h \ + ../../Archive/Chm/../../Common/../../Common/MyVector.h \ + ../../Archive/Chm/../../Common/../IStream.h \ + ../../Archive/Chm/../../Common/../../Common/MyUnknown.h \ + ../../Archive/Chm/../../Common/../../Common/Types.h \ + ../../Archive/Chm/../../Common/../IDecl.h \ + ../../Archive/Chm/../../Common/ProgressUtils.h \ + ../../Archive/Chm/../../Common/../ICoder.h \ + ../../Archive/Chm/../../Common/../IStream.h \ + ../../Archive/Chm/../../Common/../IProgress.h \ + ../../Archive/Chm/../../Common/StreamUtils.h \ + ../../Archive/Chm/../../Compress/CopyCoder.h \ + ../../Archive/Chm/../../Compress/../../Common/MyCom.h \ + ../../Archive/Chm/../../Compress/../ICoder.h \ + ../../Archive/Chm/../../Compress/LzxDecoder.h \ + ../../Archive/Chm/../../Compress/../Common/InBuffer.h \ + ../../Archive/Chm/../../Compress/../Common/../IStream.h \ + ../../Archive/Chm/../../Compress/../Common/../../Common/MyCom.h \ + ../../Archive/Chm/../../Compress/../Common/../../Common/MyException.h \ + ../../Archive/Chm/../../Compress/../Common/../../Common/MyWindows.h \ + ../../Archive/Chm/../../Compress/HuffmanDecoder.h \ + ../../Archive/Chm/../../Compress/../../Common/Types.h \ + ../../Archive/Chm/../../Compress/LzOutWindow.h \ + ../../Archive/Chm/../../Compress/../IStream.h \ + ../../Archive/Chm/../../Compress/../Common/OutBuffer.h \ + ../../Archive/Chm/../../Compress/Lzx.h \ + ../../Archive/Chm/../../Compress/Lzx86Converter.h \ + ../../Archive/Chm/../Common/ItemNameUtils.h \ + ../../Archive/Chm/../Common/../../../Common/MyString.h \ + ../../Archive/Chm/ChmHandler.h ../../../Common/MyCom.h \ + ../../Archive/Chm/../IArchive.h ../../Archive/Chm/../../IProgress.h \ + ../../Archive/Chm/../../IStream.h ../../Archive/Chm/../../PropID.h \ + ../../Archive/Chm/ChmIn.h ../../../Common/Buffer.h \ + ../../../Common/MyString.h ../../Archive/Chm/../../IStream.h \ + ../../Archive/Chm/../../Common/InBuffer.h ../../Archive/Chm/ChmHeader.h +ChmHeader.o: ../../Archive/Chm/ChmHeader.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../Archive/Chm/ChmHeader.h +ChmIn.o: ../../Archive/Chm/ChmIn.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../../Common/IntToString.h \ + ../../../Common/UTFConvert.h ../../../Common/MyString.h \ + ../../../Common/MyVector.h ../../../Common/Defs.h \ + ../../Archive/Chm/../../Common/LimitedStreams.h \ + ../../Archive/Chm/../../Common/../../Common/MyCom.h \ + ../../Archive/Chm/../../Common/../../Common/MyWindows.h \ + ../../Archive/Chm/../../Common/../../Common/MyVector.h \ + ../../Archive/Chm/../../Common/../IStream.h \ + ../../Archive/Chm/../../Common/../../Common/MyUnknown.h \ + ../../Archive/Chm/../../Common/../../Common/Types.h \ + ../../Archive/Chm/../../Common/../IDecl.h ../../Archive/Chm/ChmIn.h \ + ../../../Common/Buffer.h ../../../Common/MyString.h \ + ../../Archive/Chm/../../IStream.h \ + ../../Archive/Chm/../../Common/InBuffer.h \ + ../../Archive/Chm/../../Common/../../Common/MyException.h \ + ../../Archive/Chm/ChmHeader.h +ChmRegister.o: ../../Archive/Chm/ChmRegister.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../Archive/Chm/../../Common/RegisterArc.h \ + ../../Archive/Chm/../../Common/../Archive/IArchive.h \ + ../../Archive/Chm/../../Common/../Archive/../IProgress.h \ + ../../Archive/Chm/../../Common/../Archive/../../Common/MyUnknown.h \ + ../../Archive/Chm/../../Common/../Archive/../../Common/MyWindows.h \ + ../../Archive/Chm/../../Common/../Archive/../../Common/Types.h \ + ../../Archive/Chm/../../Common/../Archive/../IDecl.h \ + ../../Archive/Chm/../../Common/../Archive/../IStream.h \ + ../../Archive/Chm/../../Common/../Archive/../PropID.h \ + ../../Archive/Chm/ChmHandler.h ../../../Common/MyCom.h \ + ../../../Common/MyWindows.h ../../Archive/Chm/../IArchive.h \ + ../../Archive/Chm/ChmIn.h ../../../Common/Buffer.h \ + ../../../Common/Defs.h ../../../Common/MyString.h \ + ../../../Common/MyVector.h ../../Archive/Chm/../../IStream.h \ + ../../Archive/Chm/../../Common/InBuffer.h \ + ../../Archive/Chm/../../Common/../IStream.h \ + ../../Archive/Chm/../../Common/../../Common/MyCom.h \ + ../../Archive/Chm/../../Common/../../Common/MyException.h \ + ../../Archive/Chm/../../Common/../../Common/MyWindows.h \ + ../../Archive/Chm/ChmHeader.h +ComHandler.o: ../../Archive/Com/ComHandler.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../../Common/ComTry.h ../../../Common/MyWindows.h \ + ../../../Windows/PropVariant.h ../../../Windows/../Common/MyWindows.h \ + ../../../Windows/../Common/Types.h \ + ../../Archive/Com/../../Common/LimitedStreams.h \ + ../../Archive/Com/../../Common/../../Common/MyCom.h \ + ../../Archive/Com/../../Common/../../Common/MyWindows.h \ + ../../Archive/Com/../../Common/../../Common/MyVector.h \ + ../../Archive/Com/../../Common/../../Common/Defs.h \ + ../../Archive/Com/../../Common/../IStream.h \ + ../../Archive/Com/../../Common/../../Common/MyUnknown.h \ + ../../Archive/Com/../../Common/../../Common/Types.h \ + ../../Archive/Com/../../Common/../IDecl.h \ + ../../Archive/Com/../../Common/ProgressUtils.h \ + ../../Archive/Com/../../Common/../ICoder.h \ + ../../Archive/Com/../../Common/../IStream.h \ + ../../Archive/Com/../../Common/../IProgress.h \ + ../../Archive/Com/../../Common/StreamUtils.h \ + ../../Archive/Com/../../Compress/CopyCoder.h \ + ../../Archive/Com/../../Compress/../../Common/MyCom.h \ + ../../Archive/Com/../../Compress/../ICoder.h \ + ../../Archive/Com/ComHandler.h ../../../Common/MyCom.h \ + ../../Archive/Com/../IArchive.h ../../Archive/Com/../../IProgress.h \ + ../../Archive/Com/../../IStream.h ../../Archive/Com/../../PropID.h \ + ../../Archive/Com/ComIn.h ../../../Common/MyString.h \ + ../../../Common/MyVector.h ../../../Common/Buffer.h \ + ../../../Common/Defs.h +ComIn.o: ../../Archive/Com/ComIn.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../Archive/Com/../../../../C/Alloc.h \ + ../../Archive/Com/../../../../C/CpuArch.h \ + ../../Archive/Com/../../../../C/Types.h ../../../Common/IntToString.h \ + ../../../Common/MyCom.h ../../../Common/MyWindows.h \ + ../../Archive/Com/../../Common/StreamUtils.h \ + ../../Archive/Com/../../Common/../IStream.h \ + ../../Archive/Com/../../Common/../../Common/MyUnknown.h \ + ../../Archive/Com/../../Common/../../Common/MyWindows.h \ + ../../Archive/Com/../../Common/../../Common/Types.h \ + ../../Archive/Com/../../Common/../IDecl.h ../../Archive/Com/ComIn.h \ + ../../../Common/MyString.h ../../../Common/MyVector.h \ + ../../../Common/Defs.h ../../../Common/Buffer.h +ComRegister.o: ../../Archive/Com/ComRegister.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../Archive/Com/../../Common/RegisterArc.h \ + ../../Archive/Com/../../Common/../Archive/IArchive.h \ + ../../Archive/Com/../../Common/../Archive/../IProgress.h \ + ../../Archive/Com/../../Common/../Archive/../../Common/MyUnknown.h \ + ../../Archive/Com/../../Common/../Archive/../../Common/MyWindows.h \ + ../../Archive/Com/../../Common/../Archive/../../Common/Types.h \ + ../../Archive/Com/../../Common/../Archive/../IDecl.h \ + ../../Archive/Com/../../Common/../Archive/../IStream.h \ + ../../Archive/Com/../../Common/../Archive/../PropID.h \ + ../../Archive/Com/ComHandler.h ../../../Common/MyCom.h \ + ../../../Common/MyWindows.h ../../Archive/Com/../IArchive.h \ + ../../Archive/Com/ComIn.h ../../../Common/MyString.h \ + ../../../Common/MyVector.h ../../../Common/Defs.h \ + ../../../Common/Buffer.h +HfsHandler.o: ../../Archive/Hfs/HfsHandler.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../../Common/ComTry.h ../../../Common/MyWindows.h \ + ../../../Windows/PropVariant.h ../../../Windows/../Common/MyWindows.h \ + ../../../Windows/../Common/Types.h \ + ../../Archive/Hfs/../../Common/StreamUtils.h \ + ../../Archive/Hfs/../../Common/../IStream.h \ + ../../Archive/Hfs/../../Common/../../Common/MyUnknown.h \ + ../../Archive/Hfs/../../Common/../../Common/MyWindows.h \ + ../../Archive/Hfs/../../Common/../../Common/Types.h \ + ../../Archive/Hfs/../../Common/../IDecl.h ../../Archive/Hfs/HfsHandler.h \ + ../../../Common/MyCom.h ../../Archive/Hfs/../IArchive.h \ + ../../Archive/Hfs/../../IProgress.h \ + ../../Archive/Hfs/../../../Common/MyUnknown.h \ + ../../Archive/Hfs/../../../Common/Types.h \ + ../../Archive/Hfs/../../IDecl.h ../../Archive/Hfs/../../IStream.h \ + ../../Archive/Hfs/../../PropID.h ../../Archive/Hfs/HfsIn.h \ + ../../../Common/MyString.h ../../../Common/MyVector.h \ + ../../../Common/Defs.h ../../../Common/Buffer.h +HfsIn.o: ../../Archive/Hfs/HfsIn.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h \ + ../../Archive/Hfs/../../Common/StreamUtils.h \ + ../../Archive/Hfs/../../Common/../IStream.h \ + ../../Archive/Hfs/../../Common/../../Common/MyUnknown.h \ + ../../Archive/Hfs/../../Common/../../Common/MyWindows.h \ + ../../Archive/Hfs/../../Common/../../Common/Types.h \ + ../../Archive/Hfs/../../Common/../IDecl.h ../../../Common/IntToString.h \ + ../../Archive/Hfs/HfsIn.h ../../../Common/MyString.h \ + ../../../Common/MyVector.h ../../../Common/Defs.h \ + ../../../Common/Buffer.h ../../Archive/Hfs/../../../../C/CpuArch.h \ + ../../Archive/Hfs/../../../../C/Types.h +HfsRegister.o: ../../Archive/Hfs/HfsRegister.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../Archive/Hfs/../../Common/RegisterArc.h \ + ../../Archive/Hfs/../../Common/../Archive/IArchive.h \ + ../../Archive/Hfs/../../Common/../Archive/../IProgress.h \ + ../../Archive/Hfs/../../Common/../Archive/../../Common/MyUnknown.h \ + ../../Archive/Hfs/../../Common/../Archive/../../Common/MyWindows.h \ + ../../Archive/Hfs/../../Common/../Archive/../../Common/Types.h \ + ../../Archive/Hfs/../../Common/../Archive/../IDecl.h \ + ../../Archive/Hfs/../../Common/../Archive/../IStream.h \ + ../../Archive/Hfs/../../Common/../Archive/../PropID.h \ + ../../Archive/Hfs/HfsHandler.h ../../../Common/MyCom.h \ + ../../../Common/MyWindows.h ../../Archive/Hfs/../IArchive.h \ + ../../Archive/Hfs/HfsIn.h ../../../Common/MyString.h \ + ../../../Common/MyVector.h ../../../Common/Defs.h \ + ../../../Common/Buffer.h +IsoHandler.o: ../../Archive/Iso/IsoHandler.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../../Common/ComTry.h ../../../Common/MyWindows.h \ + ../../../Common/IntToString.h ../../../Common/StringConvert.h \ + ../../../Common/MyString.h ../../../Common/MyVector.h \ + ../../../Common/Defs.h ../../../Windows/PropVariant.h \ + ../../../Windows/../Common/MyWindows.h \ + ../../../Windows/../Common/Types.h ../../../Windows/Time.h \ + ../../Archive/Iso/../../Common/LimitedStreams.h \ + ../../Archive/Iso/../../Common/../../Common/MyCom.h \ + ../../Archive/Iso/../../Common/../../Common/MyWindows.h \ + ../../Archive/Iso/../../Common/../../Common/MyVector.h \ + ../../Archive/Iso/../../Common/../IStream.h \ + ../../Archive/Iso/../../Common/../../Common/MyUnknown.h \ + ../../Archive/Iso/../../Common/../../Common/Types.h \ + ../../Archive/Iso/../../Common/../IDecl.h \ + ../../Archive/Iso/../../Common/ProgressUtils.h \ + ../../Archive/Iso/../../Common/../ICoder.h \ + ../../Archive/Iso/../../Common/../IStream.h \ + ../../Archive/Iso/../../Common/../IProgress.h \ + ../../Archive/Iso/../../Compress/CopyCoder.h \ + ../../Archive/Iso/../../Compress/../../Common/MyCom.h \ + ../../Archive/Iso/../../Compress/../ICoder.h \ + ../../Archive/Iso/../Common/ItemNameUtils.h \ + ../../Archive/Iso/../Common/../../../Common/MyString.h \ + ../../Archive/Iso/IsoHandler.h ../../../Common/MyCom.h \ + ../../Archive/Iso/../IArchive.h ../../Archive/Iso/../../IProgress.h \ + ../../Archive/Iso/../../IStream.h ../../Archive/Iso/../../PropID.h \ + ../../Archive/Iso/IsoIn.h ../../Archive/Iso/../../IStream.h \ + ../../Archive/Iso/IsoHeader.h ../../Archive/Iso/IsoItem.h \ + ../../../Common/MyString.h ../../../Common/Buffer.h +IsoHeader.o: ../../Archive/Iso/IsoHeader.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../Archive/Iso/IsoHeader.h +IsoIn.o: ../../Archive/Iso/IsoIn.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../Archive/Iso/IsoIn.h \ + ../../../Common/IntToString.h ../../../Common/MyCom.h \ + ../../../Common/MyWindows.h ../../Archive/Iso/../../IStream.h \ + ../../Archive/Iso/../../../Common/MyUnknown.h \ + ../../Archive/Iso/../../../Common/MyWindows.h \ + ../../Archive/Iso/../../../Common/Types.h \ + ../../Archive/Iso/../../IDecl.h ../../Archive/Iso/IsoHeader.h \ + ../../Archive/Iso/IsoItem.h ../../../Common/MyString.h \ + ../../../Common/MyVector.h ../../../Common/Defs.h \ + ../../../Common/Buffer.h ../../../Windows/Time.h \ + ../../Archive/Iso/../../Common/StreamUtils.h \ + ../../Archive/Iso/../../Common/../IStream.h +IsoRegister.o: ../../Archive/Iso/IsoRegister.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../Archive/Iso/../../Common/RegisterArc.h \ + ../../Archive/Iso/../../Common/../Archive/IArchive.h \ + ../../Archive/Iso/../../Common/../Archive/../IProgress.h \ + ../../Archive/Iso/../../Common/../Archive/../../Common/MyUnknown.h \ + ../../Archive/Iso/../../Common/../Archive/../../Common/MyWindows.h \ + ../../Archive/Iso/../../Common/../Archive/../../Common/Types.h \ + ../../Archive/Iso/../../Common/../Archive/../IDecl.h \ + ../../Archive/Iso/../../Common/../Archive/../IStream.h \ + ../../Archive/Iso/../../Common/../Archive/../PropID.h \ + ../../Archive/Iso/IsoHandler.h ../../../Common/MyCom.h \ + ../../../Common/MyWindows.h ../../Archive/Iso/../IArchive.h \ + ../../Archive/Iso/IsoIn.h ../../../Common/IntToString.h \ + ../../Archive/Iso/../../IStream.h ../../Archive/Iso/IsoHeader.h \ + ../../Archive/Iso/IsoItem.h ../../../Common/MyString.h \ + ../../../Common/MyVector.h ../../../Common/Defs.h \ + ../../../Common/Buffer.h ../../../Windows/Time.h +NsisDecode.o: ../../Archive/Nsis/NsisDecode.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../Archive/Nsis/NsisDecode.h ../../Archive/Nsis/../../IStream.h \ + ../../Archive/Nsis/../../../Common/MyUnknown.h \ + ../../Archive/Nsis/../../../Common/MyWindows.h \ + ../../Archive/Nsis/../../../Common/Types.h \ + ../../Archive/Nsis/../../IDecl.h \ + ../../Archive/Nsis/../../Common/CreateCoder.h \ + ../../Archive/Nsis/../../Common/../../Common/MyCom.h \ + ../../Archive/Nsis/../../Common/../../Common/MyWindows.h \ + ../../Archive/Nsis/../../Common/../../Common/MyString.h \ + ../../Archive/Nsis/../../Common/../../Common/MyVector.h \ + ../../Archive/Nsis/../../Common/../../Common/Defs.h \ + ../../Archive/Nsis/../../Common/../ICoder.h \ + ../../Archive/Nsis/../../Common/../IStream.h \ + ../../Archive/Nsis/../../Common/MethodId.h \ + ../../Archive/Nsis/../../Common/../../Common/Types.h \ + ../../Archive/Nsis/../../Common/StreamUtils.h \ + ../../Archive/Nsis/../../Common/../IStream.h \ + ../../Archive/Nsis/../../Common/MethodId.h \ + ../../Archive/Nsis/../../Compress/BZip2Decoder.h \ + ../../Archive/Nsis/../../Compress/../../Common/MyCom.h \ + ../../Archive/Nsis/../../Compress/../../Windows/Synchronization.h \ + ../../Archive/Nsis/../../Compress/../../Windows/Defs.h \ + ../../Archive/Nsis/../../Compress/../../Windows/../Common/MyWindows.h \ + ../../Archive/Nsis/../../Compress/../../Windows/../../C/Threads.h \ + ../../Archive/Nsis/../../Compress/../../Windows/../../C/Types.h \ + ../../Archive/Nsis/../../Compress/../../Windows/Synchronization2.h \ + ../../Archive/Nsis/../../Compress/../../Windows/Thread.h \ + ../../Archive/Nsis/../../Compress/../ICoder.h \ + ../../Archive/Nsis/../../Compress/../Common/InBuffer.h \ + ../../Archive/Nsis/../../Compress/../Common/../IStream.h \ + ../../Archive/Nsis/../../Compress/../Common/../../Common/MyCom.h \ + ../../Archive/Nsis/../../Compress/../Common/../../Common/MyException.h \ + ../../Archive/Nsis/../../Compress/../Common/../../Common/MyWindows.h \ + ../../Archive/Nsis/../../Compress/../Common/OutBuffer.h \ + ../../Archive/Nsis/../../Compress/BitmDecoder.h \ + ../../Archive/Nsis/../../Compress/../IStream.h \ + ../../Archive/Nsis/../../Compress/BZip2Const.h \ + ../../Archive/Nsis/../../Compress/BZip2Crc.h \ + ../../Archive/Nsis/../../Compress/HuffmanDecoder.h \ + ../../Archive/Nsis/../../Compress/../../Common/Types.h \ + ../../Archive/Nsis/../../Compress/DeflateDecoder.h \ + ../../Archive/Nsis/../../Compress/BitlDecoder.h \ + ../../Archive/Nsis/../../Compress/DeflateConst.h \ + ../../Archive/Nsis/../../Compress/LzOutWindow.h \ + ../../Archive/Nsis/../../Compress/LzmaDecoder.h \ + ../../Archive/Nsis/../../Compress/../../../C/LzmaDec.h \ + ../../Archive/Nsis/../../Compress/../../../C/Types.h +NsisHandler.o: ../../Archive/Nsis/NsisHandler.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../Archive/Nsis/../../../../C/CpuArch.h \ + ../../Archive/Nsis/../../../../C/Types.h ../../../Common/ComTry.h \ + ../../../Common/MyWindows.h ../../../Common/IntToString.h \ + ../../../Windows/PropVariant.h ../../../Windows/../Common/MyWindows.h \ + ../../../Windows/../Common/Types.h \ + ../../Archive/Nsis/../../Common/StreamUtils.h \ + ../../Archive/Nsis/../../Common/../IStream.h \ + ../../Archive/Nsis/../../Common/../../Common/MyUnknown.h \ + ../../Archive/Nsis/../../Common/../../Common/MyWindows.h \ + ../../Archive/Nsis/../../Common/../../Common/Types.h \ + ../../Archive/Nsis/../../Common/../IDecl.h \ + ../../Archive/Nsis/../Common/ItemNameUtils.h \ + ../../Archive/Nsis/../Common/../../../Common/MyString.h \ + ../../Archive/Nsis/../Common/../../../Common/MyVector.h \ + ../../Archive/Nsis/../Common/../../../Common/Defs.h \ + ../../Archive/Nsis/NsisHandler.h ../../../Common/MyCom.h \ + ../../Archive/Nsis/../IArchive.h ../../Archive/Nsis/../../IProgress.h \ + ../../Archive/Nsis/../../../Common/MyUnknown.h \ + ../../Archive/Nsis/../../../Common/Types.h \ + ../../Archive/Nsis/../../IDecl.h ../../Archive/Nsis/../../IStream.h \ + ../../Archive/Nsis/../../PropID.h ../../Archive/Nsis/NsisIn.h \ + ../../../Common/Buffer.h ../../../Common/Defs.h \ + ../../../Common/StringConvert.h ../../../Common/MyString.h \ + ../../Archive/Nsis/NsisDecode.h ../../Archive/Nsis/../../IStream.h \ + ../../Archive/Nsis/../../Common/CreateCoder.h \ + ../../Archive/Nsis/../../Common/../../Common/MyCom.h \ + ../../Archive/Nsis/../../Common/../../Common/MyString.h \ + ../../Archive/Nsis/../../Common/../ICoder.h \ + ../../Archive/Nsis/../../Common/../IStream.h \ + ../../Archive/Nsis/../../Common/MethodId.h \ + ../../Archive/Nsis/../../Common/../../Common/Types.h +NsisIn.o: ../../Archive/Nsis/NsisIn.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h \ + ../../Archive/Nsis/../../../../C/CpuArch.h \ + ../../Archive/Nsis/../../../../C/Types.h ../../../Common/IntToString.h \ + ../../Archive/Nsis/../../Common/StreamUtils.h \ + ../../Archive/Nsis/../../Common/../IStream.h \ + ../../Archive/Nsis/../../Common/../../Common/MyUnknown.h \ + ../../Archive/Nsis/../../Common/../../Common/MyWindows.h \ + ../../Archive/Nsis/../../Common/../../Common/Types.h \ + ../../Archive/Nsis/../../Common/../IDecl.h ../../Archive/Nsis/NsisIn.h \ + ../../../Common/Buffer.h ../../../Common/Defs.h ../../../Common/MyCom.h \ + ../../../Common/MyWindows.h ../../../Common/StringConvert.h \ + ../../../Common/MyString.h ../../../Common/MyVector.h \ + ../../Archive/Nsis/NsisDecode.h ../../Archive/Nsis/../../IStream.h \ + ../../Archive/Nsis/../../Common/CreateCoder.h \ + ../../Archive/Nsis/../../Common/../../Common/MyCom.h \ + ../../Archive/Nsis/../../Common/../../Common/MyString.h \ + ../../Archive/Nsis/../../Common/../ICoder.h \ + ../../Archive/Nsis/../../Common/../IStream.h \ + ../../Archive/Nsis/../../Common/MethodId.h \ + ../../Archive/Nsis/../../Common/../../Common/Types.h +NsisRegister.o: ../../Archive/Nsis/NsisRegister.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../Archive/Nsis/../../Common/RegisterArc.h \ + ../../Archive/Nsis/../../Common/../Archive/IArchive.h \ + ../../Archive/Nsis/../../Common/../Archive/../IProgress.h \ + ../../Archive/Nsis/../../Common/../Archive/../../Common/MyUnknown.h \ + ../../Archive/Nsis/../../Common/../Archive/../../Common/MyWindows.h \ + ../../Archive/Nsis/../../Common/../Archive/../../Common/Types.h \ + ../../Archive/Nsis/../../Common/../Archive/../IDecl.h \ + ../../Archive/Nsis/../../Common/../Archive/../IStream.h \ + ../../Archive/Nsis/../../Common/../Archive/../PropID.h \ + ../../Archive/Nsis/NsisHandler.h ../../../Common/MyCom.h \ + ../../../Common/MyWindows.h ../../Archive/Nsis/../IArchive.h \ + ../../Archive/Nsis/NsisIn.h ../../../Common/Buffer.h \ + ../../../Common/Defs.h ../../../Common/StringConvert.h \ + ../../../Common/MyString.h ../../../Common/MyVector.h \ + ../../Archive/Nsis/NsisDecode.h ../../Archive/Nsis/../../IStream.h \ + ../../Archive/Nsis/../../Common/CreateCoder.h \ + ../../Archive/Nsis/../../Common/../../Common/MyCom.h \ + ../../Archive/Nsis/../../Common/../../Common/MyString.h \ + ../../Archive/Nsis/../../Common/../ICoder.h \ + ../../Archive/Nsis/../../Common/../IStream.h \ + ../../Archive/Nsis/../../Common/MethodId.h \ + ../../Archive/Nsis/../../Common/../../Common/Types.h +RarHandler.o: ../../Archive/Rar/RarHandler.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../../Common/ComTry.h ../../../Common/MyWindows.h \ + ../../../Common/IntToString.h ../../../Common/StringConvert.h \ + ../../../Common/MyString.h ../../../Common/MyVector.h \ + ../../../Common/Defs.h ../../../Windows/PropVariant.h \ + ../../../Windows/../Common/MyWindows.h \ + ../../../Windows/../Common/Types.h ../../../Windows/PropVariantUtils.h \ + ../../../Common/MyString.h ../../../Windows/PropVariant.h \ + ../../../Windows/Time.h ../../Archive/Rar/../../IPassword.h \ + ../../Archive/Rar/../../../Common/MyUnknown.h \ + ../../Archive/Rar/../../../Common/MyWindows.h \ + ../../Archive/Rar/../../../Common/Types.h \ + ../../Archive/Rar/../../IDecl.h \ + ../../Archive/Rar/../../Common/CreateCoder.h \ + ../../Archive/Rar/../../Common/../../Common/MyCom.h \ + ../../Archive/Rar/../../Common/../../Common/MyWindows.h \ + ../../Archive/Rar/../../Common/../../Common/MyString.h \ + ../../Archive/Rar/../../Common/../ICoder.h \ + ../../Archive/Rar/../../Common/../IStream.h \ + ../../Archive/Rar/../../Common/../../Common/MyUnknown.h \ + ../../Archive/Rar/../../Common/../../Common/Types.h \ + ../../Archive/Rar/../../Common/../IDecl.h \ + ../../Archive/Rar/../../Common/MethodId.h \ + ../../Archive/Rar/../../Common/../../Common/Types.h \ + ../../Archive/Rar/../../Common/FilterCoder.h \ + ../../Archive/Rar/../../Common/../IPassword.h \ + ../../Archive/Rar/../../Common/MethodId.h \ + ../../Archive/Rar/../../Common/ProgressUtils.h \ + ../../Archive/Rar/../../Common/../IProgress.h \ + ../../Archive/Rar/../../Compress/CopyCoder.h \ + ../../Archive/Rar/../../Compress/../../Common/MyCom.h \ + ../../Archive/Rar/../../Compress/../ICoder.h \ + ../../Archive/Rar/../../Crypto/Rar20Crypto.h ../../../Common/MyCom.h \ + ../../Archive/Rar/../../Crypto/../ICoder.h \ + ../../Archive/Rar/../../Crypto/../IPassword.h \ + ../../Archive/Rar/../../Crypto/RarAes.h \ + ../../Archive/Rar/../../Crypto/../../../C/Aes.h \ + ../../Archive/Rar/../../Crypto/../../../C/Types.h \ + ../../../Common/Buffer.h ../../Archive/Rar/../../Crypto/MyAes.h \ + ../../Archive/Rar/../../Crypto/../../Common/MyCom.h \ + ../../Archive/Rar/../Common/ItemNameUtils.h \ + ../../Archive/Rar/../Common/../../../Common/MyString.h \ + ../../Archive/Rar/../Common/OutStreamWithCRC.h \ + ../../Archive/Rar/../Common/../../../../C/7zCrc.h \ + ../../Archive/Rar/../Common/../../../../C/Types.h \ + ../../Archive/Rar/../Common/../../../Common/MyCom.h \ + ../../Archive/Rar/../Common/../../IStream.h \ + ../../Archive/Rar/RarHandler.h ../../Archive/Rar/../IArchive.h \ + ../../Archive/Rar/../../IProgress.h ../../Archive/Rar/../../IStream.h \ + ../../Archive/Rar/../../PropID.h ../../Archive/Rar/RarIn.h \ + ../../../Common/DynamicBuffer.h ../../../Common/Buffer.h \ + ../../Archive/Rar/../../ICoder.h ../../Archive/Rar/../../IStream.h \ + ../../Archive/Rar/../../Common/StreamObjects.h \ + ../../Archive/Rar/../../Common/../../Common/Buffer.h \ + ../../Archive/Rar/../../Common/../IStream.h \ + ../../Archive/Rar/RarHeader.h ../../Archive/Rar/RarItem.h \ + ../../Archive/Rar/RarVolumeInStream.h +RarHeader.o: ../../Archive/Rar/RarHeader.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../Archive/Rar/RarHeader.h +RarIn.o: ../../Archive/Rar/RarIn.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../Archive/Rar/../../../../C/7zCrc.h \ + ../../Archive/Rar/../../../../C/Types.h \ + ../../Archive/Rar/../../../../C/CpuArch.h \ + ../../../Common/StringConvert.h ../../../Common/MyWindows.h \ + ../../../Common/MyString.h ../../../Common/MyVector.h \ + ../../../Common/Defs.h ../../../Common/UTFConvert.h \ + ../../Archive/Rar/../../Common/LimitedStreams.h \ + ../../Archive/Rar/../../Common/../../Common/MyCom.h \ + ../../Archive/Rar/../../Common/../../Common/MyWindows.h \ + ../../Archive/Rar/../../Common/../../Common/MyVector.h \ + ../../Archive/Rar/../../Common/../IStream.h \ + ../../Archive/Rar/../../Common/../../Common/MyUnknown.h \ + ../../Archive/Rar/../../Common/../../Common/Types.h \ + ../../Archive/Rar/../../Common/../IDecl.h \ + ../../Archive/Rar/../../Common/StreamUtils.h \ + ../../Archive/Rar/../Common/FindSignature.h \ + ../../Archive/Rar/../Common/../../IStream.h ../../Archive/Rar/RarIn.h \ + ../../../Common/DynamicBuffer.h ../../../Common/Buffer.h \ + ../../../Common/MyCom.h ../../Archive/Rar/../../ICoder.h \ + ../../Archive/Rar/../../IStream.h ../../Archive/Rar/../../IStream.h \ + ../../Archive/Rar/../../Common/StreamObjects.h \ + ../../Archive/Rar/../../Common/../../Common/Buffer.h \ + ../../Archive/Rar/../../Crypto/RarAes.h \ + ../../Archive/Rar/../../Crypto/../../../C/Aes.h \ + ../../Archive/Rar/../../Crypto/../../../C/Types.h \ + ../../../Common/Buffer.h ../../Archive/Rar/../../Crypto/../IPassword.h \ + ../../Archive/Rar/../../Crypto/../../Common/MyUnknown.h \ + ../../Archive/Rar/../../Crypto/../../Common/Types.h \ + ../../Archive/Rar/../../Crypto/../IDecl.h \ + ../../Archive/Rar/../../Crypto/MyAes.h \ + ../../Archive/Rar/../../Crypto/../../Common/MyCom.h \ + ../../Archive/Rar/../../Crypto/../ICoder.h ../../Archive/Rar/RarHeader.h \ + ../../Archive/Rar/RarItem.h ../../../Common/MyString.h +RarItem.o: ../../Archive/Rar/RarItem.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../Archive/Rar/RarItem.h \ + ../../../Common/MyString.h ../../../Common/MyVector.h \ + ../../../Common/Defs.h ../../Archive/Rar/RarHeader.h +RarVolumeInStream.o: ../../Archive/Rar/RarVolumeInStream.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../Archive/Rar/../../../../C/7zCrc.h \ + ../../Archive/Rar/../../../../C/Types.h \ + ../../Archive/Rar/RarVolumeInStream.h ../../Archive/Rar/../../IStream.h \ + ../../Archive/Rar/../../../Common/MyUnknown.h \ + ../../Archive/Rar/../../../Common/MyWindows.h \ + ../../Archive/Rar/../../../Common/Types.h \ + ../../Archive/Rar/../../IDecl.h ../../Archive/Rar/RarIn.h \ + ../../../Common/DynamicBuffer.h ../../../Common/Buffer.h \ + ../../../Common/Defs.h ../../../Common/MyCom.h \ + ../../../Common/MyWindows.h ../../Archive/Rar/../../ICoder.h \ + ../../Archive/Rar/../../IStream.h \ + ../../Archive/Rar/../../Common/StreamObjects.h \ + ../../Archive/Rar/../../Common/../../Common/Buffer.h \ + ../../Archive/Rar/../../Common/../../Common/MyCom.h \ + ../../Archive/Rar/../../Common/../IStream.h \ + ../../Archive/Rar/../../Crypto/RarAes.h \ + ../../Archive/Rar/../../Crypto/../../../C/Aes.h \ + ../../Archive/Rar/../../Crypto/../../../C/Types.h \ + ../../../Common/Buffer.h ../../Archive/Rar/../../Crypto/../IPassword.h \ + ../../Archive/Rar/../../Crypto/../../Common/MyUnknown.h \ + ../../Archive/Rar/../../Crypto/../../Common/Types.h \ + ../../Archive/Rar/../../Crypto/../IDecl.h \ + ../../Archive/Rar/../../Crypto/MyAes.h \ + ../../Archive/Rar/../../Crypto/../../Common/MyCom.h \ + ../../Archive/Rar/../../Crypto/../ICoder.h ../../Archive/Rar/RarHeader.h \ + ../../Archive/Rar/RarItem.h ../../../Common/MyString.h \ + ../../../Common/MyVector.h +RarRegister.o: ../../Archive/Rar/RarRegister.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../Archive/Rar/../../Common/RegisterArc.h \ + ../../Archive/Rar/../../Common/../Archive/IArchive.h \ + ../../Archive/Rar/../../Common/../Archive/../IProgress.h \ + ../../Archive/Rar/../../Common/../Archive/../../Common/MyUnknown.h \ + ../../Archive/Rar/../../Common/../Archive/../../Common/MyWindows.h \ + ../../Archive/Rar/../../Common/../Archive/../../Common/Types.h \ + ../../Archive/Rar/../../Common/../Archive/../IDecl.h \ + ../../Archive/Rar/../../Common/../Archive/../IStream.h \ + ../../Archive/Rar/../../Common/../Archive/../PropID.h \ + ../../Archive/Rar/RarHandler.h ../../Archive/Rar/../IArchive.h \ + ../../Archive/Rar/../../Common/CreateCoder.h \ + ../../Archive/Rar/../../Common/../../Common/MyCom.h \ + ../../Archive/Rar/../../Common/../../Common/MyWindows.h \ + ../../Archive/Rar/../../Common/../../Common/MyString.h \ + ../../Archive/Rar/../../Common/../../Common/MyVector.h \ + ../../Archive/Rar/../../Common/../../Common/Defs.h \ + ../../Archive/Rar/../../Common/../ICoder.h \ + ../../Archive/Rar/../../Common/../IStream.h \ + ../../Archive/Rar/../../Common/MethodId.h \ + ../../Archive/Rar/../../Common/../../Common/Types.h \ + ../../Archive/Rar/RarIn.h ../../../Common/DynamicBuffer.h \ + ../../../Common/Buffer.h ../../../Common/Defs.h ../../../Common/MyCom.h \ + ../../Archive/Rar/../../ICoder.h ../../Archive/Rar/../../IStream.h \ + ../../Archive/Rar/../../Common/StreamObjects.h \ + ../../Archive/Rar/../../Common/../../Common/Buffer.h \ + ../../Archive/Rar/../../Common/../IStream.h \ + ../../Archive/Rar/../../Crypto/RarAes.h \ + ../../Archive/Rar/../../Crypto/../../../C/Aes.h \ + ../../Archive/Rar/../../Crypto/../../../C/Types.h \ + ../../../Common/Buffer.h ../../Archive/Rar/../../Crypto/../IPassword.h \ + ../../Archive/Rar/../../Crypto/../../Common/MyUnknown.h \ + ../../Archive/Rar/../../Crypto/../../Common/Types.h \ + ../../Archive/Rar/../../Crypto/../IDecl.h \ + ../../Archive/Rar/../../Crypto/MyAes.h \ + ../../Archive/Rar/../../Crypto/../../Common/MyCom.h \ + ../../Archive/Rar/../../Crypto/../ICoder.h ../../Archive/Rar/RarHeader.h \ + ../../Archive/Rar/RarItem.h ../../../Common/MyString.h \ + ../../Archive/Rar/RarVolumeInStream.h +TarHandler.o: ../../Archive/Tar/TarHandler.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../../Common/ComTry.h ../../../Common/MyWindows.h \ + ../../../Common/StringConvert.h ../../../Common/MyString.h \ + ../../../Common/MyVector.h ../../../Common/Defs.h \ + ../../../Windows/PropVariant.h ../../../Windows/../Common/MyWindows.h \ + ../../../Windows/../Common/Types.h ../../../Windows/Time.h \ + ../../Archive/Tar/../../Common/LimitedStreams.h \ + ../../Archive/Tar/../../Common/../../Common/MyCom.h \ + ../../Archive/Tar/../../Common/../../Common/MyWindows.h \ + ../../Archive/Tar/../../Common/../../Common/MyVector.h \ + ../../Archive/Tar/../../Common/../IStream.h \ + ../../Archive/Tar/../../Common/../../Common/MyUnknown.h \ + ../../Archive/Tar/../../Common/../../Common/Types.h \ + ../../Archive/Tar/../../Common/../IDecl.h \ + ../../Archive/Tar/../../Common/ProgressUtils.h \ + ../../Archive/Tar/../../Common/../ICoder.h \ + ../../Archive/Tar/../../Common/../IStream.h \ + ../../Archive/Tar/../../Common/../IProgress.h \ + ../../Archive/Tar/../../Common/StreamObjects.h \ + ../../Archive/Tar/../../Common/../../Common/Buffer.h \ + ../../Archive/Tar/../../Common/../../Common/Defs.h \ + ../../Archive/Tar/../../Common/StreamUtils.h \ + ../../Archive/Tar/../Common/ItemNameUtils.h \ + ../../Archive/Tar/../Common/../../../Common/MyString.h \ + ../../Archive/Tar/TarHandler.h ../../../Common/MyCom.h \ + ../../Archive/Tar/../IArchive.h ../../Archive/Tar/../../IProgress.h \ + ../../Archive/Tar/../../IStream.h ../../Archive/Tar/../../PropID.h \ + ../../Archive/Tar/../../Compress/CopyCoder.h \ + ../../Archive/Tar/../../Compress/../../Common/MyCom.h \ + ../../Archive/Tar/../../Compress/../ICoder.h ../../Archive/Tar/TarItem.h \ + ../../Archive/Tar/TarHeader.h ../../Archive/Tar/TarIn.h \ + ../../Archive/Tar/../../IStream.h +TarHandlerOut.o: ../../Archive/Tar/TarHandlerOut.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../../Common/ComTry.h ../../../Common/MyWindows.h \ + ../../../Common/StringConvert.h ../../../Common/MyString.h \ + ../../../Common/MyVector.h ../../../Common/Defs.h \ + ../../../Windows/PropVariant.h ../../../Windows/../Common/MyWindows.h \ + ../../../Windows/../Common/Types.h ../../../Windows/Time.h \ + ../../Archive/Tar/TarHandler.h ../../../Common/MyCom.h \ + ../../Archive/Tar/../IArchive.h ../../Archive/Tar/../../IProgress.h \ + ../../Archive/Tar/../../../Common/MyUnknown.h \ + ../../Archive/Tar/../../../Common/MyWindows.h \ + ../../Archive/Tar/../../../Common/Types.h \ + ../../Archive/Tar/../../IDecl.h ../../Archive/Tar/../../IStream.h \ + ../../Archive/Tar/../../PropID.h \ + ../../Archive/Tar/../../Compress/CopyCoder.h \ + ../../Archive/Tar/../../Compress/../../Common/MyCom.h \ + ../../Archive/Tar/../../Compress/../ICoder.h \ + ../../Archive/Tar/../../Compress/../IStream.h \ + ../../Archive/Tar/TarItem.h ../../Archive/Tar/../Common/ItemNameUtils.h \ + ../../Archive/Tar/../Common/../../../Common/MyString.h \ + ../../Archive/Tar/TarHeader.h ../../Archive/Tar/TarUpdate.h +TarHeader.o: ../../Archive/Tar/TarHeader.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../Archive/Tar/TarHeader.h +TarIn.o: ../../Archive/Tar/TarIn.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h \ + ../../Archive/Tar/../../../../C/CpuArch.h \ + ../../Archive/Tar/../../../../C/Types.h ../../../Common/StringToInt.h \ + ../../Archive/Tar/../../Common/StreamUtils.h \ + ../../Archive/Tar/../../Common/../IStream.h \ + ../../Archive/Tar/../../Common/../../Common/MyUnknown.h \ + ../../Archive/Tar/../../Common/../../Common/MyWindows.h \ + ../../Archive/Tar/../../Common/../../Common/Types.h \ + ../../Archive/Tar/../../Common/../IDecl.h ../../Archive/Tar/TarIn.h \ + ../../Archive/Tar/../../IStream.h ../../Archive/Tar/TarItem.h \ + ../../Archive/Tar/../Common/ItemNameUtils.h \ + ../../Archive/Tar/../Common/../../../Common/MyString.h \ + ../../Archive/Tar/../Common/../../../Common/MyVector.h \ + ../../Archive/Tar/../Common/../../../Common/Defs.h \ + ../../Archive/Tar/TarHeader.h +TarOut.o: ../../Archive/Tar/TarOut.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../../Common/IntToString.h \ + ../../Archive/Tar/../../Common/StreamUtils.h \ + ../../Archive/Tar/../../Common/../IStream.h \ + ../../Archive/Tar/../../Common/../../Common/MyUnknown.h \ + ../../Archive/Tar/../../Common/../../Common/MyWindows.h \ + ../../Archive/Tar/../../Common/../../Common/Types.h \ + ../../Archive/Tar/../../Common/../IDecl.h ../../Archive/Tar/TarOut.h \ + ../../Archive/Tar/TarItem.h ../../Archive/Tar/../Common/ItemNameUtils.h \ + ../../Archive/Tar/../Common/../../../Common/MyString.h \ + ../../Archive/Tar/../Common/../../../Common/MyVector.h \ + ../../Archive/Tar/../Common/../../../Common/Defs.h \ + ../../Archive/Tar/TarHeader.h ../../../Common/MyCom.h \ + ../../../Common/MyWindows.h ../../Archive/Tar/../../IStream.h +TarRegister.o: ../../Archive/Tar/TarRegister.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../Archive/Tar/../../Common/RegisterArc.h \ + ../../Archive/Tar/../../Common/../Archive/IArchive.h \ + ../../Archive/Tar/../../Common/../Archive/../IProgress.h \ + ../../Archive/Tar/../../Common/../Archive/../../Common/MyUnknown.h \ + ../../Archive/Tar/../../Common/../Archive/../../Common/MyWindows.h \ + ../../Archive/Tar/../../Common/../Archive/../../Common/Types.h \ + ../../Archive/Tar/../../Common/../Archive/../IDecl.h \ + ../../Archive/Tar/../../Common/../Archive/../IStream.h \ + ../../Archive/Tar/../../Common/../Archive/../PropID.h \ + ../../Archive/Tar/TarHandler.h ../../../Common/MyCom.h \ + ../../../Common/MyWindows.h ../../Archive/Tar/../IArchive.h \ + ../../Archive/Tar/../../Compress/CopyCoder.h \ + ../../Archive/Tar/../../Compress/../../Common/MyCom.h \ + ../../Archive/Tar/../../Compress/../ICoder.h \ + ../../Archive/Tar/../../Compress/../IStream.h \ + ../../Archive/Tar/TarItem.h ../../Archive/Tar/../Common/ItemNameUtils.h \ + ../../Archive/Tar/../Common/../../../Common/MyString.h \ + ../../Archive/Tar/../Common/../../../Common/MyVector.h \ + ../../Archive/Tar/../Common/../../../Common/Defs.h \ + ../../Archive/Tar/TarHeader.h +TarUpdate.o: ../../Archive/Tar/TarUpdate.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h \ + ../../Archive/Tar/../../Common/LimitedStreams.h \ + ../../Archive/Tar/../../Common/../../Common/MyCom.h \ + ../../Archive/Tar/../../Common/../../Common/MyWindows.h \ + ../../Archive/Tar/../../Common/../../Common/MyVector.h \ + ../../Archive/Tar/../../Common/../../Common/Defs.h \ + ../../Archive/Tar/../../Common/../IStream.h \ + ../../Archive/Tar/../../Common/../../Common/MyUnknown.h \ + ../../Archive/Tar/../../Common/../../Common/Types.h \ + ../../Archive/Tar/../../Common/../IDecl.h \ + ../../Archive/Tar/../../Common/ProgressUtils.h \ + ../../Archive/Tar/../../Common/../ICoder.h \ + ../../Archive/Tar/../../Common/../IStream.h \ + ../../Archive/Tar/../../Common/../IProgress.h \ + ../../Archive/Tar/../../Compress/CopyCoder.h \ + ../../Archive/Tar/../../Compress/../../Common/MyCom.h \ + ../../Archive/Tar/../../Compress/../ICoder.h ../../Archive/Tar/TarOut.h \ + ../../Archive/Tar/TarItem.h ../../Archive/Tar/../Common/ItemNameUtils.h \ + ../../Archive/Tar/../Common/../../../Common/MyString.h \ + ../../Archive/Tar/../Common/../../../Common/MyVector.h \ + ../../Archive/Tar/TarHeader.h ../../../Common/MyCom.h \ + ../../Archive/Tar/../../IStream.h ../../Archive/Tar/TarUpdate.h \ + ../../Archive/Tar/../IArchive.h ../../Archive/Tar/../../IProgress.h \ + ../../Archive/Tar/../../IStream.h ../../Archive/Tar/../../PropID.h +UdfHandler.o: ../../Archive/Udf/UdfHandler.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../../Common/ComTry.h ../../../Common/MyWindows.h \ + ../../../Windows/PropVariant.h ../../../Windows/../Common/MyWindows.h \ + ../../../Windows/../Common/Types.h ../../../Windows/Time.h \ + ../../Archive/Udf/../../Common/LimitedStreams.h \ + ../../Archive/Udf/../../Common/../../Common/MyCom.h \ + ../../Archive/Udf/../../Common/../../Common/MyWindows.h \ + ../../Archive/Udf/../../Common/../../Common/MyVector.h \ + ../../Archive/Udf/../../Common/../../Common/Defs.h \ + ../../Archive/Udf/../../Common/../IStream.h \ + ../../Archive/Udf/../../Common/../../Common/MyUnknown.h \ + ../../Archive/Udf/../../Common/../../Common/Types.h \ + ../../Archive/Udf/../../Common/../IDecl.h \ + ../../Archive/Udf/../../Common/ProgressUtils.h \ + ../../Archive/Udf/../../Common/../ICoder.h \ + ../../Archive/Udf/../../Common/../IStream.h \ + ../../Archive/Udf/../../Common/../IProgress.h \ + ../../Archive/Udf/../../Common/StreamObjects.h \ + ../../Archive/Udf/../../Common/../../Common/Buffer.h \ + ../../Archive/Udf/../../Compress/CopyCoder.h \ + ../../Archive/Udf/../../Compress/../../Common/MyCom.h \ + ../../Archive/Udf/../../Compress/../ICoder.h \ + ../../Archive/Udf/UdfHandler.h ../../../Common/MyCom.h \ + ../../Archive/Udf/../IArchive.h ../../Archive/Udf/../../IProgress.h \ + ../../Archive/Udf/../../IStream.h ../../Archive/Udf/../../PropID.h \ + ../../Archive/Udf/UdfIn.h ../../../Common/IntToString.h \ + ../../../Common/Buffer.h ../../../Common/MyString.h \ + ../../../Common/MyVector.h ../../../Common/MyMap.h \ + ../../Archive/Udf/../../IStream.h +UdfIn.o: ../../Archive/Udf/UdfIn.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h \ + ../../Archive/Udf/../../../../C/CpuArch.h \ + ../../Archive/Udf/../../../../C/Types.h \ + ../../Archive/Udf/../../Common/StreamUtils.h \ + ../../Archive/Udf/../../Common/../IStream.h \ + ../../Archive/Udf/../../Common/../../Common/MyUnknown.h \ + ../../Archive/Udf/../../Common/../../Common/MyWindows.h \ + ../../Archive/Udf/../../Common/../../Common/Types.h \ + ../../Archive/Udf/../../Common/../IDecl.h ../../Archive/Udf/UdfIn.h \ + ../../../Common/MyCom.h ../../../Common/MyWindows.h \ + ../../../Common/IntToString.h ../../../Common/Buffer.h \ + ../../../Common/Defs.h ../../../Common/MyString.h \ + ../../../Common/MyVector.h ../../../Common/MyMap.h \ + ../../Archive/Udf/../../IStream.h +UdfRegister.o: ../../Archive/Udf/UdfRegister.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../Archive/Udf/../../Common/RegisterArc.h \ + ../../Archive/Udf/../../Common/../Archive/IArchive.h \ + ../../Archive/Udf/../../Common/../Archive/../IProgress.h \ + ../../Archive/Udf/../../Common/../Archive/../../Common/MyUnknown.h \ + ../../Archive/Udf/../../Common/../Archive/../../Common/MyWindows.h \ + ../../Archive/Udf/../../Common/../Archive/../../Common/Types.h \ + ../../Archive/Udf/../../Common/../Archive/../IDecl.h \ + ../../Archive/Udf/../../Common/../Archive/../IStream.h \ + ../../Archive/Udf/../../Common/../Archive/../PropID.h \ + ../../Archive/Udf/UdfHandler.h ../../../Common/MyCom.h \ + ../../../Common/MyWindows.h ../../Archive/Udf/../IArchive.h \ + ../../Archive/Udf/UdfIn.h ../../../Common/IntToString.h \ + ../../../Common/Buffer.h ../../../Common/Defs.h \ + ../../../Common/MyString.h ../../../Common/MyVector.h \ + ../../../Common/MyMap.h ../../Archive/Udf/../../IStream.h +WimHandler.o: ../../Archive/Wim/WimHandler.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../Archive/Wim/../../../../C/CpuArch.h \ + ../../Archive/Wim/../../../../C/Types.h ../../../Common/ComTry.h \ + ../../../Common/MyWindows.h ../../../Common/IntToString.h \ + ../../../Common/StringToInt.h ../../../Common/UTFConvert.h \ + ../../../Common/MyString.h ../../../Common/MyVector.h \ + ../../../Common/Defs.h ../../../Windows/PropVariant.h \ + ../../../Windows/../Common/MyWindows.h \ + ../../../Windows/../Common/Types.h \ + ../../Archive/Wim/../../Common/ProgressUtils.h \ + ../../Archive/Wim/../../Common/../../Common/MyCom.h \ + ../../Archive/Wim/../../Common/../../Common/MyWindows.h \ + ../../Archive/Wim/../../Common/../ICoder.h \ + ../../Archive/Wim/../../Common/../IStream.h \ + ../../Archive/Wim/../../Common/../../Common/MyUnknown.h \ + ../../Archive/Wim/../../Common/../../Common/Types.h \ + ../../Archive/Wim/../../Common/../IDecl.h \ + ../../Archive/Wim/../../Common/../IProgress.h \ + ../../Archive/Wim/../../Common/StreamUtils.h \ + ../../Archive/Wim/../../Common/../IStream.h \ + ../../Archive/Wim/WimHandler.h ../../../Common/MyCom.h \ + ../../../Common/MyXml.h ../../Archive/Wim/WimIn.h \ + ../../../Common/Buffer.h ../../../Common/MyString.h \ + ../../Archive/Wim/../../Compress/CopyCoder.h \ + ../../Archive/Wim/../../Compress/../../Common/MyCom.h \ + ../../Archive/Wim/../../Compress/../ICoder.h \ + ../../Archive/Wim/../../Compress/LzxDecoder.h \ + ../../Archive/Wim/../../Compress/../Common/InBuffer.h \ + ../../Archive/Wim/../../Compress/../Common/../IStream.h \ + ../../Archive/Wim/../../Compress/../Common/../../Common/MyCom.h \ + ../../Archive/Wim/../../Compress/../Common/../../Common/MyException.h \ + ../../Archive/Wim/../../Compress/../Common/../../Common/MyWindows.h \ + ../../Archive/Wim/../../Compress/HuffmanDecoder.h \ + ../../Archive/Wim/../../Compress/../../Common/Types.h \ + ../../Archive/Wim/../../Compress/LzOutWindow.h \ + ../../Archive/Wim/../../Compress/../IStream.h \ + ../../Archive/Wim/../../Compress/../Common/OutBuffer.h \ + ../../Archive/Wim/../../Compress/Lzx.h \ + ../../Archive/Wim/../../Compress/Lzx86Converter.h \ + ../../Archive/Wim/../IArchive.h ../../Archive/Wim/../../IProgress.h \ + ../../Archive/Wim/../../IStream.h ../../Archive/Wim/../../PropID.h +WimHandlerOut.o: ../../Archive/Wim/WimHandlerOut.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../Archive/Wim/../../../../C/CpuArch.h \ + ../../Archive/Wim/../../../../C/Types.h ../../../Common/ComTry.h \ + ../../../Common/MyWindows.h ../../../Common/IntToString.h \ + ../../../Windows/PropVariant.h ../../../Windows/../Common/MyWindows.h \ + ../../../Windows/../Common/Types.h ../../../Windows/Time.h \ + ../../Archive/Wim/../../Common/LimitedStreams.h \ + ../../Archive/Wim/../../Common/../../Common/MyCom.h \ + ../../Archive/Wim/../../Common/../../Common/MyWindows.h \ + ../../Archive/Wim/../../Common/../../Common/MyVector.h \ + ../../Archive/Wim/../../Common/../../Common/Defs.h \ + ../../Archive/Wim/../../Common/../IStream.h \ + ../../Archive/Wim/../../Common/../../Common/MyUnknown.h \ + ../../Archive/Wim/../../Common/../../Common/Types.h \ + ../../Archive/Wim/../../Common/../IDecl.h \ + ../../Archive/Wim/../../Common/ProgressUtils.h \ + ../../Archive/Wim/../../Common/../ICoder.h \ + ../../Archive/Wim/../../Common/../IStream.h \ + ../../Archive/Wim/../../Common/../IProgress.h \ + ../../Archive/Wim/../../Common/StreamUtils.h \ + ../../Archive/Wim/../../Crypto/RandGen.h \ + ../../Archive/Wim/../../Crypto/Sha1.h \ + ../../Archive/Wim/../../Crypto/../../Common/Types.h \ + ../../Archive/Wim/../../Crypto/Sha1.h ../../Archive/Wim/WimHandler.h \ + ../../../Common/MyCom.h ../../../Common/MyXml.h \ + ../../../Common/MyString.h ../../../Common/MyVector.h \ + ../../Archive/Wim/WimIn.h ../../../Common/Buffer.h \ + ../../../Common/Defs.h ../../../Common/MyString.h \ + ../../Archive/Wim/../../Compress/CopyCoder.h \ + ../../Archive/Wim/../../Compress/../../Common/MyCom.h \ + ../../Archive/Wim/../../Compress/../ICoder.h \ + ../../Archive/Wim/../../Compress/LzxDecoder.h \ + ../../Archive/Wim/../../Compress/../Common/InBuffer.h \ + ../../Archive/Wim/../../Compress/../Common/../IStream.h \ + ../../Archive/Wim/../../Compress/../Common/../../Common/MyCom.h \ + ../../Archive/Wim/../../Compress/../Common/../../Common/MyException.h \ + ../../Archive/Wim/../../Compress/../Common/../../Common/MyWindows.h \ + ../../Archive/Wim/../../Compress/HuffmanDecoder.h \ + ../../Archive/Wim/../../Compress/../../Common/Types.h \ + ../../Archive/Wim/../../Compress/LzOutWindow.h \ + ../../Archive/Wim/../../Compress/../IStream.h \ + ../../Archive/Wim/../../Compress/../Common/OutBuffer.h \ + ../../Archive/Wim/../../Compress/Lzx.h \ + ../../Archive/Wim/../../Compress/Lzx86Converter.h \ + ../../Archive/Wim/../IArchive.h ../../Archive/Wim/../../IProgress.h \ + ../../Archive/Wim/../../IStream.h ../../Archive/Wim/../../PropID.h +WimIn.o: ../../Archive/Wim/WimIn.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h \ + ../../Archive/Wim/../../../../C/CpuArch.h \ + ../../Archive/Wim/../../../../C/Types.h ../../../Common/IntToString.h \ + ../../Archive/Wim/../../Common/StreamUtils.h \ + ../../Archive/Wim/../../Common/../IStream.h \ + ../../Archive/Wim/../../Common/../../Common/MyUnknown.h \ + ../../Archive/Wim/../../Common/../../Common/MyWindows.h \ + ../../Archive/Wim/../../Common/../../Common/Types.h \ + ../../Archive/Wim/../../Common/../IDecl.h \ + ../../Archive/Wim/../../Common/StreamObjects.h \ + ../../Archive/Wim/../../Common/../../Common/Buffer.h \ + ../../Archive/Wim/../../Common/../../Common/Defs.h \ + ../../Archive/Wim/../../Common/../../Common/MyCom.h \ + ../../Archive/Wim/../../Common/LimitedStreams.h \ + ../../Archive/Wim/../../Common/../../Common/MyVector.h \ + ../../Archive/Wim/../Common/OutStreamWithSha1.h \ + ../../Archive/Wim/../Common/../../Crypto/Sha1.h \ + ../../Archive/Wim/../Common/../../Crypto/../../Common/Types.h \ + ../../Archive/Wim/../Common/../../../Common/MyCom.h \ + ../../Archive/Wim/../Common/../../IStream.h ../../Archive/Wim/WimIn.h \ + ../../../Common/Buffer.h ../../../Common/MyString.h \ + ../../../Common/MyVector.h ../../Archive/Wim/../../Compress/CopyCoder.h \ + ../../Archive/Wim/../../Compress/../../Common/MyCom.h \ + ../../Archive/Wim/../../Compress/../ICoder.h \ + ../../Archive/Wim/../../Compress/../IStream.h \ + ../../Archive/Wim/../../Compress/LzxDecoder.h \ + ../../Archive/Wim/../../Compress/../Common/InBuffer.h \ + ../../Archive/Wim/../../Compress/../Common/../IStream.h \ + ../../Archive/Wim/../../Compress/../Common/../../Common/MyCom.h \ + ../../Archive/Wim/../../Compress/../Common/../../Common/MyException.h \ + ../../Archive/Wim/../../Compress/../Common/../../Common/MyWindows.h \ + ../../Archive/Wim/../../Compress/HuffmanDecoder.h \ + ../../Archive/Wim/../../Compress/../../Common/Types.h \ + ../../Archive/Wim/../../Compress/LzOutWindow.h \ + ../../Archive/Wim/../../Compress/../IStream.h \ + ../../Archive/Wim/../../Compress/../Common/OutBuffer.h \ + ../../Archive/Wim/../../Compress/Lzx.h \ + ../../Archive/Wim/../../Compress/Lzx86Converter.h \ + ../../Archive/Wim/../IArchive.h ../../Archive/Wim/../../IProgress.h \ + ../../Archive/Wim/../../../Common/MyUnknown.h \ + ../../Archive/Wim/../../../Common/Types.h \ + ../../Archive/Wim/../../IDecl.h ../../Archive/Wim/../../IStream.h \ + ../../Archive/Wim/../../PropID.h +WimRegister.o: ../../Archive/Wim/WimRegister.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../Archive/Wim/../../Common/RegisterArc.h \ + ../../Archive/Wim/../../Common/../Archive/IArchive.h \ + ../../Archive/Wim/../../Common/../Archive/../IProgress.h \ + ../../Archive/Wim/../../Common/../Archive/../../Common/MyUnknown.h \ + ../../Archive/Wim/../../Common/../Archive/../../Common/MyWindows.h \ + ../../Archive/Wim/../../Common/../Archive/../../Common/Types.h \ + ../../Archive/Wim/../../Common/../Archive/../IDecl.h \ + ../../Archive/Wim/../../Common/../Archive/../IStream.h \ + ../../Archive/Wim/../../Common/../Archive/../PropID.h \ + ../../Archive/Wim/WimHandler.h ../../../Common/MyCom.h \ + ../../../Common/MyWindows.h ../../../Common/MyXml.h \ + ../../../Common/MyString.h ../../../Common/MyVector.h \ + ../../../Common/Defs.h ../../Archive/Wim/WimIn.h \ + ../../../Common/Buffer.h ../../../Common/MyString.h \ + ../../Archive/Wim/../../Compress/CopyCoder.h \ + ../../Archive/Wim/../../Compress/../../Common/MyCom.h \ + ../../Archive/Wim/../../Compress/../ICoder.h \ + ../../Archive/Wim/../../Compress/../IStream.h \ + ../../Archive/Wim/../../Compress/LzxDecoder.h \ + ../../Archive/Wim/../../Compress/../Common/InBuffer.h \ + ../../Archive/Wim/../../Compress/../Common/../IStream.h \ + ../../Archive/Wim/../../Compress/../Common/../../Common/MyCom.h \ + ../../Archive/Wim/../../Compress/../Common/../../Common/MyException.h \ + ../../Archive/Wim/../../Compress/../Common/../../Common/MyWindows.h \ + ../../Archive/Wim/../../Compress/HuffmanDecoder.h \ + ../../Archive/Wim/../../Compress/../../Common/Types.h \ + ../../Archive/Wim/../../Compress/LzOutWindow.h \ + ../../Archive/Wim/../../Compress/../IStream.h \ + ../../Archive/Wim/../../Compress/../Common/OutBuffer.h \ + ../../Archive/Wim/../../Compress/Lzx.h \ + ../../Archive/Wim/../../Compress/Lzx86Converter.h \ + ../../Archive/Wim/../IArchive.h +ZipAddCommon.o: ../../Archive/Zip/ZipAddCommon.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../Archive/Zip/../../../../C/7zCrc.h \ + ../../Archive/Zip/../../../../C/Types.h ../../../Windows/PropVariant.h \ + ../../../Windows/../Common/MyWindows.h \ + ../../../Windows/../Common/Types.h ../../Archive/Zip/../../ICoder.h \ + ../../Archive/Zip/../../IStream.h \ + ../../Archive/Zip/../../../Common/MyUnknown.h \ + ../../Archive/Zip/../../../Common/MyWindows.h \ + ../../Archive/Zip/../../../Common/Types.h \ + ../../Archive/Zip/../../IDecl.h ../../Archive/Zip/../../IPassword.h \ + ../../Archive/Zip/../../MyVersion.h \ + ../../Archive/Zip/../../Common/CreateCoder.h \ + ../../Archive/Zip/../../Common/../../Common/MyCom.h \ + ../../Archive/Zip/../../Common/../../Common/MyWindows.h \ + ../../Archive/Zip/../../Common/../../Common/MyString.h \ + ../../Archive/Zip/../../Common/../../Common/MyVector.h \ + ../../Archive/Zip/../../Common/../../Common/Defs.h \ + ../../Archive/Zip/../../Common/../ICoder.h \ + ../../Archive/Zip/../../Common/MethodId.h \ + ../../Archive/Zip/../../Common/../../Common/Types.h \ + ../../Archive/Zip/../../Common/StreamObjects.h \ + ../../Archive/Zip/../../Common/../../Common/Buffer.h \ + ../../Archive/Zip/../../Common/../IStream.h \ + ../../Archive/Zip/../../Common/StreamUtils.h \ + ../../Archive/Zip/../../Compress/LzmaEncoder.h \ + ../../Archive/Zip/../../Compress/../../../C/LzmaEnc.h \ + ../../Archive/Zip/../../Compress/../../../C/Types.h \ + ../../Archive/Zip/../../Compress/../../Common/MyCom.h \ + ../../Archive/Zip/../../Compress/../ICoder.h \ + ../../Archive/Zip/../../Compress/PpmdZip.h \ + ../../Archive/Zip/../../Compress/../../../C/Alloc.h \ + ../../Archive/Zip/../../Compress/../../../C/Ppmd8.h \ + ../../Archive/Zip/../../Compress/../../../C/Ppmd.h \ + ../../Archive/Zip/../../Compress/../../../C/CpuArch.h \ + ../../Archive/Zip/../../Compress/../Common/CWrappers.h \ + ../../Archive/Zip/../../Compress/../Common/../ICoder.h \ + ../../Archive/Zip/../../Compress/../Common/../../Common/MyCom.h \ + ../../Archive/Zip/../Common/InStreamWithCRC.h \ + ../../Archive/Zip/../Common/../../../../C/7zCrc.h \ + ../../Archive/Zip/../Common/../../../Common/MyCom.h \ + ../../Archive/Zip/../Common/../../IStream.h \ + ../../Archive/Zip/ZipAddCommon.h ../../Archive/Zip/../../IProgress.h \ + ../../Archive/Zip/../../Common/FilterCoder.h \ + ../../Archive/Zip/../../Common/../IPassword.h \ + ../../Archive/Zip/../../Compress/CopyCoder.h \ + ../../Archive/Zip/../../Crypto/ZipCrypto.h ../../../Common/MyCom.h \ + ../../Archive/Zip/../../Crypto/../ICoder.h \ + ../../Archive/Zip/../../Crypto/../IPassword.h \ + ../../Archive/Zip/../../Crypto/WzAes.h \ + ../../Archive/Zip/../../Crypto/../../../C/Aes.h \ + ../../Archive/Zip/../../Crypto/../../../C/Types.h \ + ../../../Common/Buffer.h ../../../Common/MyVector.h \ + ../../Archive/Zip/../../Crypto/HmacSha1.h \ + ../../Archive/Zip/../../Crypto/Sha1.h \ + ../../Archive/Zip/../../Crypto/../../Common/Types.h \ + ../../Archive/Zip/ZipCompressionMode.h ../../../Common/MyString.h \ + ../../Archive/Zip/ZipHeader.h +ZipHandler.o: ../../Archive/Zip/ZipHandler.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../../Common/ComTry.h ../../../Common/MyWindows.h \ + ../../../Common/IntToString.h ../../../Windows/PropVariant.h \ + ../../../Windows/../Common/MyWindows.h \ + ../../../Windows/../Common/Types.h ../../../Windows/Time.h \ + ../../Archive/Zip/../../IPassword.h \ + ../../Archive/Zip/../../../Common/MyUnknown.h \ + ../../Archive/Zip/../../../Common/MyWindows.h \ + ../../Archive/Zip/../../../Common/Types.h \ + ../../Archive/Zip/../../IDecl.h \ + ../../Archive/Zip/../../Common/FilterCoder.h \ + ../../Archive/Zip/../../Common/../../Common/MyCom.h \ + ../../Archive/Zip/../../Common/../../Common/MyWindows.h \ + ../../Archive/Zip/../../Common/../ICoder.h \ + ../../Archive/Zip/../../Common/../IStream.h \ + ../../Archive/Zip/../../Common/../../Common/MyUnknown.h \ + ../../Archive/Zip/../../Common/../../Common/Types.h \ + ../../Archive/Zip/../../Common/../IDecl.h \ + ../../Archive/Zip/../../Common/../IPassword.h \ + ../../Archive/Zip/../../Common/ProgressUtils.h \ + ../../Archive/Zip/../../Common/../IProgress.h \ + ../../Archive/Zip/../../Common/StreamObjects.h \ + ../../Archive/Zip/../../Common/../../Common/Buffer.h \ + ../../Archive/Zip/../../Common/../../Common/Defs.h \ + ../../Archive/Zip/../../Common/../IStream.h \ + ../../Archive/Zip/../../Common/StreamUtils.h \ + ../../Archive/Zip/../../Compress/CopyCoder.h \ + ../../Archive/Zip/../../Compress/../../Common/MyCom.h \ + ../../Archive/Zip/../../Compress/../ICoder.h \ + ../../Archive/Zip/../../Compress/LzmaDecoder.h \ + ../../Archive/Zip/../../Compress/../../../C/LzmaDec.h \ + ../../Archive/Zip/../../Compress/../../../C/Types.h \ + ../../Archive/Zip/../../Compress/ImplodeDecoder.h \ + ../../Archive/Zip/../../Compress/ImplodeHuffmanDecoder.h \ + ../../Archive/Zip/../../Compress/../Common/InBuffer.h \ + ../../Archive/Zip/../../Compress/../Common/../IStream.h \ + ../../Archive/Zip/../../Compress/../Common/../../Common/MyCom.h \ + ../../Archive/Zip/../../Compress/../Common/../../Common/MyException.h \ + ../../Archive/Zip/../../Compress/../Common/../../Common/MyWindows.h \ + ../../Archive/Zip/../../Compress/BitlDecoder.h \ + ../../Archive/Zip/../../Compress/../IStream.h \ + ../../Archive/Zip/../../Compress/LzOutWindow.h \ + ../../Archive/Zip/../../Compress/../Common/OutBuffer.h \ + ../../Archive/Zip/../../Compress/PpmdZip.h \ + ../../Archive/Zip/../../Compress/../../../C/Alloc.h \ + ../../Archive/Zip/../../Compress/../../../C/Ppmd8.h \ + ../../Archive/Zip/../../Compress/../../../C/Ppmd.h \ + ../../Archive/Zip/../../Compress/../../../C/CpuArch.h \ + ../../Archive/Zip/../../Compress/../Common/CWrappers.h \ + ../../Archive/Zip/../../Compress/../Common/../ICoder.h \ + ../../Archive/Zip/../../Compress/ShrinkDecoder.h \ + ../../Archive/Zip/../../Crypto/WzAes.h \ + ../../Archive/Zip/../../Crypto/../../../C/Aes.h \ + ../../Archive/Zip/../../Crypto/../../../C/Types.h \ + ../../../Common/Buffer.h ../../../Common/MyCom.h \ + ../../../Common/MyVector.h ../../../Common/Defs.h \ + ../../Archive/Zip/../../Crypto/../ICoder.h \ + ../../Archive/Zip/../../Crypto/../IPassword.h \ + ../../Archive/Zip/../../Crypto/HmacSha1.h \ + ../../Archive/Zip/../../Crypto/Sha1.h \ + ../../Archive/Zip/../../Crypto/../../Common/Types.h \ + ../../Archive/Zip/../../Crypto/ZipCrypto.h \ + ../../Archive/Zip/../../Crypto/ZipStrong.h \ + ../../Archive/Zip/../../Crypto/MyAes.h \ + ../../Archive/Zip/../../Crypto/../../Common/MyCom.h \ + ../../Archive/Zip/../Common/ItemNameUtils.h \ + ../../Archive/Zip/../Common/../../../Common/MyString.h \ + ../../Archive/Zip/../Common/../../../Common/MyVector.h \ + ../../Archive/Zip/../Common/OutStreamWithCRC.h \ + ../../Archive/Zip/../Common/../../../../C/7zCrc.h \ + ../../Archive/Zip/../Common/../../../../C/Types.h \ + ../../Archive/Zip/../Common/../../../Common/MyCom.h \ + ../../Archive/Zip/../Common/../../IStream.h \ + ../../Archive/Zip/ZipHandler.h ../../../Common/DynamicBuffer.h \ + ../../../Common/Buffer.h ../../Archive/Zip/../../ICoder.h \ + ../../Archive/Zip/../IArchive.h ../../Archive/Zip/../../IProgress.h \ + ../../Archive/Zip/../../IStream.h ../../Archive/Zip/../../PropID.h \ + ../../Archive/Zip/../../Common/CreateCoder.h \ + ../../Archive/Zip/../../Common/../../Common/MyString.h \ + ../../Archive/Zip/../../Common/MethodId.h \ + ../../Archive/Zip/../../Common/../../Common/Types.h \ + ../../Archive/Zip/ZipIn.h ../../Archive/Zip/../../IStream.h \ + ../../Archive/Zip/../../Common/InBuffer.h ../../Archive/Zip/ZipHeader.h \ + ../../Archive/Zip/ZipItemEx.h ../../Archive/Zip/ZipItem.h \ + ../../../Common/MyString.h ../../../Common/UTFConvert.h \ + ../../../Common/MyString.h ../../../Common/StringConvert.h \ + ../../Archive/Zip/ZipCompressionMode.h \ + ../../Archive/Zip/../../../Windows/System.h \ + ../../Archive/Zip/../../../Windows/../Common/Types.h +ZipHandlerOut.o: ../../Archive/Zip/ZipHandlerOut.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../../Common/ComTry.h ../../../Common/MyWindows.h \ + ../../../Common/StringConvert.h ../../../Common/MyString.h \ + ../../../Common/MyVector.h ../../../Common/Defs.h \ + ../../../Common/StringToInt.h ../../../Windows/PropVariant.h \ + ../../../Windows/../Common/MyWindows.h \ + ../../../Windows/../Common/Types.h ../../../Windows/Time.h \ + ../../Archive/Zip/../../IPassword.h \ + ../../Archive/Zip/../../../Common/MyUnknown.h \ + ../../Archive/Zip/../../../Common/MyWindows.h \ + ../../Archive/Zip/../../../Common/Types.h \ + ../../Archive/Zip/../../IDecl.h \ + ../../Archive/Zip/../../Common/OutBuffer.h \ + ../../Archive/Zip/../../Common/../IStream.h \ + ../../Archive/Zip/../../Common/../../Common/MyUnknown.h \ + ../../Archive/Zip/../../Common/../../Common/Types.h \ + ../../Archive/Zip/../../Common/../IDecl.h \ + ../../Archive/Zip/../../Common/../../Common/MyCom.h \ + ../../Archive/Zip/../../Common/../../Common/MyWindows.h \ + ../../Archive/Zip/../../Common/../../Common/MyException.h \ + ../../Archive/Zip/../../Crypto/WzAes.h \ + ../../Archive/Zip/../../Crypto/../../../C/Aes.h \ + ../../Archive/Zip/../../Crypto/../../../C/Types.h \ + ../../../Common/Buffer.h ../../../Common/MyCom.h \ + ../../../Common/MyVector.h ../../Archive/Zip/../../Crypto/../ICoder.h \ + ../../Archive/Zip/../../Crypto/../IStream.h \ + ../../Archive/Zip/../../Crypto/../IPassword.h \ + ../../Archive/Zip/../../Crypto/HmacSha1.h \ + ../../Archive/Zip/../../Crypto/Sha1.h \ + ../../Archive/Zip/../../Crypto/../../Common/Types.h \ + ../../Archive/Zip/../Common/ItemNameUtils.h \ + ../../Archive/Zip/../Common/../../../Common/MyString.h \ + ../../Archive/Zip/../Common/ParseProperties.h ../../../Common/MyString.h \ + ../../Archive/Zip/ZipHandler.h ../../../Common/DynamicBuffer.h \ + ../../../Common/Buffer.h ../../Archive/Zip/../../ICoder.h \ + ../../Archive/Zip/../IArchive.h ../../Archive/Zip/../../IProgress.h \ + ../../Archive/Zip/../../IStream.h ../../Archive/Zip/../../PropID.h \ + ../../Archive/Zip/../../Common/CreateCoder.h \ + ../../Archive/Zip/../../Common/../../Common/MyString.h \ + ../../Archive/Zip/../../Common/../ICoder.h \ + ../../Archive/Zip/../../Common/MethodId.h \ + ../../Archive/Zip/../../Common/../../Common/Types.h \ + ../../Archive/Zip/ZipIn.h ../../Archive/Zip/../../IStream.h \ + ../../Archive/Zip/../../Common/InBuffer.h ../../Archive/Zip/ZipHeader.h \ + ../../Archive/Zip/ZipItemEx.h ../../Archive/Zip/ZipItem.h \ + ../../../Common/UTFConvert.h ../../Archive/Zip/ZipCompressionMode.h \ + ../../Archive/Zip/../../../Windows/System.h \ + ../../Archive/Zip/../../../Windows/../Common/Types.h \ + ../../Archive/Zip/ZipUpdate.h +ZipHeader.o: ../../Archive/Zip/ZipHeader.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../Archive/Zip/ZipHeader.h +ZipIn.o: ../../Archive/Zip/ZipIn.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h \ + ../../Archive/Zip/../../../../C/CpuArch.h \ + ../../Archive/Zip/../../../../C/Types.h ../../../Common/DynamicBuffer.h \ + ../../../Common/Buffer.h ../../../Common/Defs.h \ + ../../Archive/Zip/../../Common/LimitedStreams.h \ + ../../Archive/Zip/../../Common/../../Common/MyCom.h \ + ../../Archive/Zip/../../Common/../../Common/MyWindows.h \ + ../../Archive/Zip/../../Common/../../Common/MyVector.h \ + ../../Archive/Zip/../../Common/../../Common/Defs.h \ + ../../Archive/Zip/../../Common/../IStream.h \ + ../../Archive/Zip/../../Common/../../Common/MyUnknown.h \ + ../../Archive/Zip/../../Common/../../Common/Types.h \ + ../../Archive/Zip/../../Common/../IDecl.h \ + ../../Archive/Zip/../../Common/StreamUtils.h ../../Archive/Zip/ZipIn.h \ + ../../../Common/MyCom.h ../../Archive/Zip/../../IStream.h \ + ../../Archive/Zip/../../Common/InBuffer.h \ + ../../Archive/Zip/../../Common/../../Common/MyException.h \ + ../../Archive/Zip/ZipHeader.h ../../Archive/Zip/ZipItemEx.h \ + ../../Archive/Zip/ZipItem.h ../../../Common/MyString.h \ + ../../../Common/MyVector.h ../../../Common/Buffer.h \ + ../../../Common/UTFConvert.h ../../../Common/MyString.h \ + ../../../Common/StringConvert.h ../../../Common/MyWindows.h +ZipItem.o: ../../Archive/Zip/ZipItem.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../Archive/Zip/ZipHeader.h \ + ../../Archive/Zip/ZipItem.h ../../../Common/MyString.h \ + ../../../Common/MyVector.h ../../../Common/Defs.h \ + ../../../Common/Buffer.h ../../../Common/UTFConvert.h \ + ../../../Common/MyString.h ../../../Common/StringConvert.h \ + ../../../Common/MyWindows.h ../../Archive/Zip/../Common/ItemNameUtils.h \ + ../../Archive/Zip/../Common/../../../Common/MyString.h \ + ../../Archive/Zip/../../../../C/CpuArch.h \ + ../../Archive/Zip/../../../../C/Types.h +ZipOut.o: ../../Archive/Zip/ZipOut.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h \ + ../../Archive/Zip/../../Common/OffsetStream.h ../../../Common/MyCom.h \ + ../../../Common/MyWindows.h ../../Archive/Zip/../../Common/../IStream.h \ + ../../Archive/Zip/../../Common/../../Common/MyUnknown.h \ + ../../Archive/Zip/../../Common/../../Common/MyWindows.h \ + ../../Archive/Zip/../../Common/../../Common/Types.h \ + ../../Archive/Zip/../../Common/../IDecl.h ../../Archive/Zip/ZipOut.h \ + ../../Archive/Zip/../../IStream.h \ + ../../Archive/Zip/../../Common/OutBuffer.h \ + ../../Archive/Zip/../../Common/../../Common/MyCom.h \ + ../../Archive/Zip/../../Common/../../Common/MyException.h \ + ../../Archive/Zip/ZipItem.h ../../../Common/MyString.h \ + ../../../Common/MyVector.h ../../../Common/Defs.h \ + ../../../Common/Buffer.h ../../../Common/UTFConvert.h \ + ../../../Common/MyString.h ../../../Common/StringConvert.h \ + ../../Archive/Zip/ZipHeader.h +ZipUpdate.o: ../../Archive/Zip/ZipUpdate.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../Archive/Zip/../../../../C/Alloc.h \ + ../../../Common/AutoPtr.h ../../../Common/Defs.h \ + ../../../Common/StringConvert.h ../../../Common/MyWindows.h \ + ../../../Common/MyString.h ../../../Common/MyVector.h \ + ../../../Common/Defs.h ../../../Windows/Defs.h \ + ../../../Windows/../Common/MyWindows.h ../../../Windows/Thread.h \ + ../../../Windows/Defs.h ../../../Windows/../../C/Threads.h \ + ../../../Windows/../../C/Types.h \ + ../../Archive/Zip/../../Common/CreateCoder.h \ + ../../Archive/Zip/../../Common/../../Common/MyCom.h \ + ../../Archive/Zip/../../Common/../../Common/MyWindows.h \ + ../../Archive/Zip/../../Common/../../Common/MyString.h \ + ../../Archive/Zip/../../Common/../ICoder.h \ + ../../Archive/Zip/../../Common/../IStream.h \ + ../../Archive/Zip/../../Common/../../Common/MyUnknown.h \ + ../../Archive/Zip/../../Common/../../Common/Types.h \ + ../../Archive/Zip/../../Common/../IDecl.h \ + ../../Archive/Zip/../../Common/MethodId.h \ + ../../Archive/Zip/../../Common/../../Common/Types.h \ + ../../Archive/Zip/../../Common/LimitedStreams.h \ + ../../Archive/Zip/../../Common/../../Common/MyVector.h \ + ../../Archive/Zip/../../Common/../IStream.h \ + ../../Archive/Zip/../../Common/OutMemStream.h ../../../Common/MyCom.h \ + ../../Archive/Zip/../../Common/MemBlocks.h ../../../Common/MyVector.h \ + ../../../Windows/Synchronization.h ../../../Windows/Synchronization2.h \ + ../../Archive/Zip/../../Common/ProgressUtils.h \ + ../../Archive/Zip/../../Common/../IProgress.h \ + ../../Archive/Zip/../../Common/ProgressMt.h \ + ../../Archive/Zip/../../Common/../../Windows/Synchronization.h \ + ../../Archive/Zip/../../Common/StreamUtils.h \ + ../../Archive/Zip/../../Compress/CopyCoder.h \ + ../../Archive/Zip/../../Compress/../../Common/MyCom.h \ + ../../Archive/Zip/../../Compress/../ICoder.h \ + ../../Archive/Zip/ZipAddCommon.h ../../Archive/Zip/../../ICoder.h \ + ../../Archive/Zip/../../IProgress.h \ + ../../Archive/Zip/../../Common/FilterCoder.h \ + ../../Archive/Zip/../../Common/../IPassword.h \ + ../../Archive/Zip/../../Crypto/ZipCrypto.h \ + ../../Archive/Zip/../../Crypto/../ICoder.h \ + ../../Archive/Zip/../../Crypto/../IPassword.h \ + ../../Archive/Zip/../../Crypto/WzAes.h \ + ../../Archive/Zip/../../Crypto/../../../C/Aes.h \ + ../../Archive/Zip/../../Crypto/../../../C/Types.h \ + ../../../Common/Buffer.h ../../Archive/Zip/../../Crypto/HmacSha1.h \ + ../../Archive/Zip/../../Crypto/Sha1.h \ + ../../Archive/Zip/../../Crypto/../../Common/Types.h \ + ../../Archive/Zip/ZipCompressionMode.h ../../../Common/MyString.h \ + ../../Archive/Zip/ZipOut.h ../../Archive/Zip/../../IStream.h \ + ../../Archive/Zip/../../Common/OutBuffer.h \ + ../../Archive/Zip/../../Common/../../Common/MyException.h \ + ../../Archive/Zip/ZipItem.h ../../../Common/UTFConvert.h \ + ../../Archive/Zip/ZipHeader.h ../../Archive/Zip/ZipUpdate.h \ + ../../Archive/Zip/../IArchive.h ../../Archive/Zip/../../IProgress.h \ + ../../Archive/Zip/../../IStream.h ../../Archive/Zip/../../PropID.h \ + ../../Archive/Zip/ZipIn.h ../../Archive/Zip/../../Common/InBuffer.h \ + ../../Archive/Zip/ZipItemEx.h +ZipRegister.o: ../../Archive/Zip/ZipRegister.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../Archive/Zip/../../Common/RegisterArc.h \ + ../../Archive/Zip/../../Common/../Archive/IArchive.h \ + ../../Archive/Zip/../../Common/../Archive/../IProgress.h \ + ../../Archive/Zip/../../Common/../Archive/../../Common/MyUnknown.h \ + ../../Archive/Zip/../../Common/../Archive/../../Common/MyWindows.h \ + ../../Archive/Zip/../../Common/../Archive/../../Common/Types.h \ + ../../Archive/Zip/../../Common/../Archive/../IDecl.h \ + ../../Archive/Zip/../../Common/../Archive/../IStream.h \ + ../../Archive/Zip/../../Common/../Archive/../PropID.h \ + ../../Archive/Zip/ZipHandler.h ../../../Common/DynamicBuffer.h \ + ../../../Common/Buffer.h ../../../Common/Defs.h \ + ../../Archive/Zip/../../ICoder.h ../../Archive/Zip/../../IStream.h \ + ../../Archive/Zip/../IArchive.h \ + ../../Archive/Zip/../../Common/CreateCoder.h \ + ../../Archive/Zip/../../Common/../../Common/MyCom.h \ + ../../Archive/Zip/../../Common/../../Common/MyWindows.h \ + ../../Archive/Zip/../../Common/../../Common/MyString.h \ + ../../Archive/Zip/../../Common/../../Common/MyVector.h \ + ../../Archive/Zip/../../Common/../../Common/Defs.h \ + ../../Archive/Zip/../../Common/../ICoder.h \ + ../../Archive/Zip/../../Common/MethodId.h \ + ../../Archive/Zip/../../Common/../../Common/Types.h \ + ../../Archive/Zip/ZipIn.h ../../../Common/MyCom.h \ + ../../Archive/Zip/../../IStream.h \ + ../../Archive/Zip/../../Common/InBuffer.h \ + ../../Archive/Zip/../../Common/../IStream.h \ + ../../Archive/Zip/../../Common/../../Common/MyException.h \ + ../../Archive/Zip/ZipHeader.h ../../Archive/Zip/ZipItemEx.h \ + ../../Archive/Zip/ZipItem.h ../../../Common/MyString.h \ + ../../../Common/Buffer.h ../../../Common/UTFConvert.h \ + ../../../Common/MyString.h ../../../Common/StringConvert.h \ + ../../../Common/MyWindows.h ../../Archive/Zip/ZipCompressionMode.h \ + ../../Archive/Zip/../../../Windows/System.h \ + ../../Archive/Zip/../../../Windows/../Common/Types.h +CodecExports.o: ../../Compress/CodecExports.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../Compress/../../Common/ComTry.h \ + ../../Compress/../../Common/MyWindows.h \ + ../../Compress/../../Windows/PropVariant.h \ + ../../Compress/../../Windows/../Common/MyWindows.h \ + ../../Compress/../../Windows/../Common/Types.h \ + ../../Compress/../ICoder.h ../../Compress/../IStream.h \ + ../../Compress/../../Common/MyUnknown.h \ + ../../Compress/../../Common/Types.h ../../Compress/../IDecl.h \ + ../../Compress/../Common/RegisterCodec.h \ + ../../Compress/../Common/../Common/MethodId.h \ + ../../Compress/../Common/../Common/../../Common/Types.h +ArjDecoder1.o: ../../Compress/ArjDecoder1.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../Compress/ArjDecoder1.h \ + ../../Compress/../../Common/MyCom.h \ + ../../Compress/../../Common/MyWindows.h ../../Compress/../ICoder.h \ + ../../Compress/../IStream.h ../../Compress/../../Common/MyUnknown.h \ + ../../Compress/../../Common/Types.h ../../Compress/../IDecl.h \ + ../../Compress/../Common/InBuffer.h \ + ../../Compress/../Common/../IStream.h \ + ../../Compress/../Common/../../Common/MyCom.h \ + ../../Compress/../Common/../../Common/MyException.h \ + ../../Compress/../Common/../../Common/MyWindows.h \ + ../../Compress/BitmDecoder.h ../../Compress/../IStream.h \ + ../../Compress/LzOutWindow.h ../../Compress/../Common/OutBuffer.h +ArjDecoder2.o: ../../Compress/ArjDecoder2.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../Compress/ArjDecoder2.h \ + ../../Compress/../../Common/MyCom.h \ + ../../Compress/../../Common/MyWindows.h ../../Compress/../ICoder.h \ + ../../Compress/../IStream.h ../../Compress/../../Common/MyUnknown.h \ + ../../Compress/../../Common/Types.h ../../Compress/../IDecl.h \ + ../../Compress/../Common/InBuffer.h \ + ../../Compress/../Common/../IStream.h \ + ../../Compress/../Common/../../Common/MyCom.h \ + ../../Compress/../Common/../../Common/MyException.h \ + ../../Compress/../Common/../../Common/MyWindows.h \ + ../../Compress/BitmDecoder.h ../../Compress/../IStream.h \ + ../../Compress/LzOutWindow.h ../../Compress/../Common/OutBuffer.h +Bcj2Coder.o: ../../Compress/Bcj2Coder.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../Compress/../../../C/Alloc.h \ + ../../Compress/Bcj2Coder.h ../../Compress/../../Common/MyCom.h \ + ../../Compress/../../Common/MyWindows.h ../../Compress/../ICoder.h \ + ../../Compress/../IStream.h ../../Compress/../../Common/MyUnknown.h \ + ../../Compress/../../Common/Types.h ../../Compress/../IDecl.h \ + ../../Compress/RangeCoderBit.h ../../Compress/RangeCoder.h \ + ../../Compress/../Common/InBuffer.h \ + ../../Compress/../Common/../IStream.h \ + ../../Compress/../Common/../../Common/MyCom.h \ + ../../Compress/../Common/../../Common/MyException.h \ + ../../Compress/../Common/../../Common/MyWindows.h \ + ../../Compress/../Common/OutBuffer.h +Bcj2Register.o: ../../Compress/Bcj2Register.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../Compress/../Common/RegisterCodec.h \ + ../../Compress/../Common/../Common/MethodId.h \ + ../../Compress/../Common/../Common/../../Common/Types.h \ + ../../Compress/Bcj2Coder.h ../../Compress/../../Common/MyCom.h \ + ../../Compress/../../Common/MyWindows.h ../../Compress/../ICoder.h \ + ../../Compress/../IStream.h ../../Compress/../../Common/MyUnknown.h \ + ../../Compress/../../Common/Types.h ../../Compress/../IDecl.h \ + ../../Compress/RangeCoderBit.h ../../Compress/RangeCoder.h \ + ../../Compress/../Common/InBuffer.h \ + ../../Compress/../Common/../IStream.h \ + ../../Compress/../Common/../../Common/MyCom.h \ + ../../Compress/../Common/../../Common/MyException.h \ + ../../Compress/../Common/../../Common/MyWindows.h \ + ../../Compress/../Common/OutBuffer.h +BcjCoder.o: ../../Compress/BcjCoder.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../Compress/BcjCoder.h \ + ../../Compress/../../../C/Bra.h ../../Compress/../../../C/Types.h \ + ../../Compress/BranchCoder.h ../../Compress/../../Common/MyCom.h \ + ../../Compress/../../Common/MyWindows.h ../../Compress/../ICoder.h \ + ../../Compress/../IStream.h ../../Compress/../../Common/MyUnknown.h \ + ../../Compress/../../Common/Types.h ../../Compress/../IDecl.h +BcjRegister.o: ../../Compress/BcjRegister.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h \ + ../../Compress/../Common/RegisterCodec.h \ + ../../Compress/../Common/../Common/MethodId.h \ + ../../Compress/../Common/../Common/../../Common/Types.h \ + ../../Compress/BcjCoder.h ../../Compress/../../../C/Bra.h \ + ../../Compress/../../../C/Types.h ../../Compress/BranchCoder.h \ + ../../Compress/../../Common/MyCom.h \ + ../../Compress/../../Common/MyWindows.h ../../Compress/../ICoder.h \ + ../../Compress/../IStream.h ../../Compress/../../Common/MyUnknown.h \ + ../../Compress/../../Common/Types.h ../../Compress/../IDecl.h +BitlDecoder.o: ../../Compress/BitlDecoder.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../Compress/BitlDecoder.h \ + ../../Compress/../IStream.h ../../Compress/../../Common/MyUnknown.h \ + ../../Compress/../../Common/MyWindows.h \ + ../../Compress/../../Common/Types.h ../../Compress/../IDecl.h +BranchCoder.o: ../../Compress/BranchCoder.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../Compress/BranchCoder.h \ + ../../Compress/../../Common/MyCom.h \ + ../../Compress/../../Common/MyWindows.h ../../Compress/../ICoder.h \ + ../../Compress/../IStream.h ../../Compress/../../Common/MyUnknown.h \ + ../../Compress/../../Common/Types.h ../../Compress/../IDecl.h +BranchMisc.o: ../../Compress/BranchMisc.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../Compress/../../../C/Bra.h \ + ../../Compress/../../../C/Types.h ../../Compress/BranchMisc.h \ + ../../Compress/BranchCoder.h ../../Compress/../../Common/MyCom.h \ + ../../Compress/../../Common/MyWindows.h ../../Compress/../ICoder.h \ + ../../Compress/../IStream.h ../../Compress/../../Common/MyUnknown.h \ + ../../Compress/../../Common/Types.h ../../Compress/../IDecl.h +BranchRegister.o: ../../Compress/BranchRegister.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../Compress/../Common/RegisterCodec.h \ + ../../Compress/../Common/../Common/MethodId.h \ + ../../Compress/../Common/../Common/../../Common/Types.h \ + ../../Compress/BranchMisc.h ../../Compress/BranchCoder.h \ + ../../Compress/../../Common/MyCom.h \ + ../../Compress/../../Common/MyWindows.h ../../Compress/../ICoder.h \ + ../../Compress/../IStream.h ../../Compress/../../Common/MyUnknown.h \ + ../../Compress/../../Common/Types.h ../../Compress/../IDecl.h +ByteSwap.o: ../../Compress/ByteSwap.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../Compress/../../Common/MyCom.h \ + ../../Compress/../../Common/MyWindows.h ../../Compress/../ICoder.h \ + ../../Compress/../IStream.h ../../Compress/../../Common/MyUnknown.h \ + ../../Compress/../../Common/Types.h ../../Compress/../IDecl.h \ + ../../Compress/../Common/RegisterCodec.h \ + ../../Compress/../Common/../Common/MethodId.h \ + ../../Compress/../Common/../Common/../../Common/Types.h +BZip2Crc.o: ../../Compress/BZip2Crc.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../Compress/BZip2Crc.h +BZip2Decoder.o: ../../Compress/BZip2Decoder.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../Compress/../../../C/Alloc.h ../../Compress/BZip2Decoder.h \ + ../../Compress/../../Common/MyCom.h \ + ../../Compress/../../Common/MyWindows.h \ + ../../Compress/../../Windows/Synchronization.h \ + ../../Compress/../../Windows/Defs.h \ + ../../Compress/../../Windows/../Common/MyWindows.h \ + ../../Compress/../../Windows/../../C/Threads.h \ + ../../Compress/../../Windows/../../C/Types.h \ + ../../Compress/../../Windows/Synchronization2.h \ + ../../Compress/../../Windows/Thread.h ../../Compress/../ICoder.h \ + ../../Compress/../IStream.h ../../Compress/../../Common/MyUnknown.h \ + ../../Compress/../../Common/Types.h ../../Compress/../IDecl.h \ + ../../Compress/../Common/InBuffer.h \ + ../../Compress/../Common/../IStream.h \ + ../../Compress/../Common/../../Common/MyCom.h \ + ../../Compress/../Common/../../Common/MyException.h \ + ../../Compress/../Common/../../Common/MyWindows.h \ + ../../Compress/../Common/OutBuffer.h ../../Compress/BitmDecoder.h \ + ../../Compress/../IStream.h ../../Compress/BZip2Const.h \ + ../../Compress/BZip2Crc.h ../../Compress/HuffmanDecoder.h \ + ../../Compress/../../Common/Types.h ../../Compress/Mtf8.h \ + ../../Compress/../../../C/CpuArch.h ../../Compress/../../../C/Types.h +BZip2Encoder.o: ../../Compress/BZip2Encoder.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../Compress/../../../C/Alloc.h ../../Compress/../../../C/BwtSort.h \ + ../../Compress/../../../C/Types.h ../../Compress/../../../C/HuffEnc.h \ + ../../Compress/BZip2Crc.h ../../Compress/BZip2Encoder.h \ + ../../Compress/../../Common/Defs.h ../../Compress/../../Common/MyCom.h \ + ../../Compress/../../Common/MyWindows.h \ + ../../Compress/../../Windows/Synchronization.h \ + ../../Compress/../../Windows/Defs.h \ + ../../Compress/../../Windows/../Common/MyWindows.h \ + ../../Compress/../../Windows/../../C/Threads.h \ + ../../Compress/../../Windows/../../C/Types.h \ + ../../Compress/../../Windows/Synchronization2.h \ + ../../Compress/../../Windows/Thread.h ../../Compress/../ICoder.h \ + ../../Compress/../IStream.h ../../Compress/../../Common/MyUnknown.h \ + ../../Compress/../../Common/Types.h ../../Compress/../IDecl.h \ + ../../Compress/../Common/InBuffer.h \ + ../../Compress/../Common/../IStream.h \ + ../../Compress/../Common/../../Common/MyCom.h \ + ../../Compress/../Common/../../Common/MyException.h \ + ../../Compress/../Common/../../Common/MyWindows.h \ + ../../Compress/../Common/OutBuffer.h ../../Compress/BitmEncoder.h \ + ../../Compress/../IStream.h ../../Compress/BZip2Const.h \ + ../../Compress/Mtf8.h ../../Compress/../../../C/CpuArch.h \ + ../../Compress/../../Common/Types.h +BZip2Register.o: ../../Compress/BZip2Register.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../Compress/../Common/RegisterCodec.h \ + ../../Compress/../Common/../Common/MethodId.h \ + ../../Compress/../Common/../Common/../../Common/Types.h \ + ../../Compress/BZip2Decoder.h ../../Compress/../../Common/MyCom.h \ + ../../Compress/../../Common/MyWindows.h \ + ../../Compress/../../Windows/Synchronization.h \ + ../../Compress/../../Windows/Defs.h \ + ../../Compress/../../Windows/../Common/MyWindows.h \ + ../../Compress/../../Windows/../../C/Threads.h \ + ../../Compress/../../Windows/../../C/Types.h \ + ../../Compress/../../Windows/Synchronization2.h \ + ../../Compress/../../Windows/Thread.h ../../Compress/../ICoder.h \ + ../../Compress/../IStream.h ../../Compress/../../Common/MyUnknown.h \ + ../../Compress/../../Common/Types.h ../../Compress/../IDecl.h \ + ../../Compress/../Common/InBuffer.h \ + ../../Compress/../Common/../IStream.h \ + ../../Compress/../Common/../../Common/MyCom.h \ + ../../Compress/../Common/../../Common/MyException.h \ + ../../Compress/../Common/../../Common/MyWindows.h \ + ../../Compress/../Common/OutBuffer.h ../../Compress/BitmDecoder.h \ + ../../Compress/../IStream.h ../../Compress/BZip2Const.h \ + ../../Compress/BZip2Crc.h ../../Compress/HuffmanDecoder.h \ + ../../Compress/../../Common/Types.h ../../Compress/BZip2Encoder.h \ + ../../Compress/../../Common/Defs.h ../../Compress/BitmEncoder.h +CopyCoder.o: ../../Compress/CopyCoder.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../Compress/../../../C/Alloc.h \ + ../../Compress/../Common/StreamUtils.h \ + ../../Compress/../Common/../IStream.h \ + ../../Compress/../Common/../../Common/MyUnknown.h \ + ../../Compress/../Common/../../Common/MyWindows.h \ + ../../Compress/../Common/../../Common/Types.h \ + ../../Compress/../Common/../IDecl.h ../../Compress/CopyCoder.h \ + ../../Compress/../../Common/MyCom.h \ + ../../Compress/../../Common/MyWindows.h ../../Compress/../ICoder.h \ + ../../Compress/../IStream.h +CopyRegister.o: ../../Compress/CopyRegister.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../Compress/../Common/RegisterCodec.h \ + ../../Compress/../Common/../Common/MethodId.h \ + ../../Compress/../Common/../Common/../../Common/Types.h \ + ../../Compress/CopyCoder.h ../../Compress/../../Common/MyCom.h \ + ../../Compress/../../Common/MyWindows.h ../../Compress/../ICoder.h \ + ../../Compress/../IStream.h ../../Compress/../../Common/MyUnknown.h \ + ../../Compress/../../Common/Types.h ../../Compress/../IDecl.h +Deflate64Register.o: ../../Compress/Deflate64Register.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../Compress/../Common/RegisterCodec.h \ + ../../Compress/../Common/../Common/MethodId.h \ + ../../Compress/../Common/../Common/../../Common/Types.h \ + ../../Compress/DeflateDecoder.h ../../Compress/../../Common/MyCom.h \ + ../../Compress/../../Common/MyWindows.h ../../Compress/../ICoder.h \ + ../../Compress/../IStream.h ../../Compress/../../Common/MyUnknown.h \ + ../../Compress/../../Common/Types.h ../../Compress/../IDecl.h \ + ../../Compress/../Common/InBuffer.h \ + ../../Compress/../Common/../IStream.h \ + ../../Compress/../Common/../../Common/MyCom.h \ + ../../Compress/../Common/../../Common/MyException.h \ + ../../Compress/../Common/../../Common/MyWindows.h \ + ../../Compress/BitlDecoder.h ../../Compress/../IStream.h \ + ../../Compress/DeflateConst.h ../../Compress/HuffmanDecoder.h \ + ../../Compress/../../Common/Types.h ../../Compress/LzOutWindow.h \ + ../../Compress/../Common/OutBuffer.h ../../Compress/DeflateEncoder.h \ + ../../Compress/../../../C/LzFind.h ../../Compress/../../../C/Types.h \ + ../../../Common/MyCom.h ../../Compress/BitlEncoder.h +DeflateDecoder.o: ../../Compress/DeflateDecoder.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../Compress/DeflateDecoder.h ../../Compress/../../Common/MyCom.h \ + ../../Compress/../../Common/MyWindows.h ../../Compress/../ICoder.h \ + ../../Compress/../IStream.h ../../Compress/../../Common/MyUnknown.h \ + ../../Compress/../../Common/Types.h ../../Compress/../IDecl.h \ + ../../Compress/../Common/InBuffer.h \ + ../../Compress/../Common/../IStream.h \ + ../../Compress/../Common/../../Common/MyCom.h \ + ../../Compress/../Common/../../Common/MyException.h \ + ../../Compress/../Common/../../Common/MyWindows.h \ + ../../Compress/BitlDecoder.h ../../Compress/../IStream.h \ + ../../Compress/DeflateConst.h ../../Compress/HuffmanDecoder.h \ + ../../Compress/../../Common/Types.h ../../Compress/LzOutWindow.h \ + ../../Compress/../Common/OutBuffer.h +DeflateEncoder.o: ../../Compress/DeflateEncoder.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../Compress/../../../C/Alloc.h ../../Compress/../../../C/HuffEnc.h \ + ../../Compress/../../../C/Types.h ../../../Common/ComTry.h \ + ../../../Common/MyWindows.h ../../Compress/DeflateEncoder.h \ + ../../Compress/../../../C/LzFind.h ../../../Common/MyCom.h \ + ../../Compress/../ICoder.h ../../Compress/../IStream.h \ + ../../Compress/../../Common/MyUnknown.h \ + ../../Compress/../../Common/MyWindows.h \ + ../../Compress/../../Common/Types.h ../../Compress/../IDecl.h \ + ../../Compress/BitlEncoder.h ../../Compress/../Common/OutBuffer.h \ + ../../Compress/../Common/../IStream.h \ + ../../Compress/../Common/../../Common/MyCom.h \ + ../../Compress/../Common/../../Common/MyException.h \ + ../../Compress/../Common/../../Common/MyWindows.h \ + ../../Compress/DeflateConst.h +DeflateRegister.o: ../../Compress/DeflateRegister.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../Compress/../Common/RegisterCodec.h \ + ../../Compress/../Common/../Common/MethodId.h \ + ../../Compress/../Common/../Common/../../Common/Types.h \ + ../../Compress/DeflateDecoder.h ../../Compress/../../Common/MyCom.h \ + ../../Compress/../../Common/MyWindows.h ../../Compress/../ICoder.h \ + ../../Compress/../IStream.h ../../Compress/../../Common/MyUnknown.h \ + ../../Compress/../../Common/Types.h ../../Compress/../IDecl.h \ + ../../Compress/../Common/InBuffer.h \ + ../../Compress/../Common/../IStream.h \ + ../../Compress/../Common/../../Common/MyCom.h \ + ../../Compress/../Common/../../Common/MyException.h \ + ../../Compress/../Common/../../Common/MyWindows.h \ + ../../Compress/BitlDecoder.h ../../Compress/../IStream.h \ + ../../Compress/DeflateConst.h ../../Compress/HuffmanDecoder.h \ + ../../Compress/../../Common/Types.h ../../Compress/LzOutWindow.h \ + ../../Compress/../Common/OutBuffer.h ../../Compress/DeflateEncoder.h \ + ../../Compress/../../../C/LzFind.h ../../Compress/../../../C/Types.h \ + ../../../Common/MyCom.h ../../Compress/BitlEncoder.h +DeltaFilter.o: ../../Compress/DeltaFilter.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../Compress/../../../C/Delta.h \ + ../../Compress/../../../C/Types.h \ + ../../Compress/../Common/RegisterCodec.h \ + ../../Compress/../Common/../Common/MethodId.h \ + ../../Compress/../Common/../Common/../../Common/Types.h \ + ../../Compress/BranchCoder.h ../../Compress/../../Common/MyCom.h \ + ../../Compress/../../Common/MyWindows.h ../../Compress/../ICoder.h \ + ../../Compress/../IStream.h ../../Compress/../../Common/MyUnknown.h \ + ../../Compress/../../Common/Types.h ../../Compress/../IDecl.h +Lzma2Decoder.o: ../../Compress/Lzma2Decoder.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../Compress/../../../C/Alloc.h ../../Compress/../Common/StreamUtils.h \ + ../../Compress/../Common/../IStream.h \ + ../../Compress/../Common/../../Common/MyUnknown.h \ + ../../Compress/../Common/../../Common/MyWindows.h \ + ../../Compress/../Common/../../Common/Types.h \ + ../../Compress/../Common/../IDecl.h ../../Compress/Lzma2Decoder.h \ + ../../Compress/../../../C/Lzma2Dec.h ../../Compress/../../../C/LzmaDec.h \ + ../../Compress/../../../C/Types.h ../../Compress/../../Common/MyCom.h \ + ../../Compress/../../Common/MyWindows.h ../../Compress/../ICoder.h \ + ../../Compress/../IStream.h +Lzma2Encoder.o: ../../Compress/Lzma2Encoder.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../Compress/../../../C/Alloc.h ../../Compress/../Common/CWrappers.h \ + ../../Compress/../Common/../ICoder.h \ + ../../Compress/../Common/../IStream.h \ + ../../Compress/../Common/../../Common/MyUnknown.h \ + ../../Compress/../Common/../../Common/MyWindows.h \ + ../../Compress/../Common/../../Common/Types.h \ + ../../Compress/../Common/../IDecl.h \ + ../../Compress/../Common/../../Common/MyCom.h \ + ../../Compress/../Common/StreamUtils.h \ + ../../Compress/../Common/../IStream.h ../../Compress/Lzma2Encoder.h \ + ../../Compress/../../../C/Lzma2Enc.h ../../Compress/../../../C/LzmaEnc.h \ + ../../Compress/../../../C/Types.h ../../Compress/../../Common/MyCom.h \ + ../../Compress/../ICoder.h +Lzma2Register.o: ../../Compress/Lzma2Register.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../Compress/../Common/RegisterCodec.h \ + ../../Compress/../Common/../Common/MethodId.h \ + ../../Compress/../Common/../Common/../../Common/Types.h \ + ../../Compress/Lzma2Decoder.h ../../Compress/../../../C/Lzma2Dec.h \ + ../../Compress/../../../C/LzmaDec.h ../../Compress/../../../C/Types.h \ + ../../Compress/../../Common/MyCom.h \ + ../../Compress/../../Common/MyWindows.h ../../Compress/../ICoder.h \ + ../../Compress/../IStream.h ../../Compress/../../Common/MyUnknown.h \ + ../../Compress/../../Common/Types.h ../../Compress/../IDecl.h \ + ../../Compress/Lzma2Encoder.h ../../Compress/../../../C/Lzma2Enc.h \ + ../../Compress/../../../C/LzmaEnc.h +ImplodeDecoder.o: ../../Compress/ImplodeDecoder.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../Compress/ImplodeDecoder.h ../../Compress/../../Common/MyCom.h \ + ../../Compress/../../Common/MyWindows.h ../../Compress/../ICoder.h \ + ../../Compress/../IStream.h ../../Compress/../../Common/MyUnknown.h \ + ../../Compress/../../Common/Types.h ../../Compress/../IDecl.h \ + ../../Compress/ImplodeHuffmanDecoder.h \ + ../../Compress/../Common/InBuffer.h \ + ../../Compress/../Common/../IStream.h \ + ../../Compress/../Common/../../Common/MyCom.h \ + ../../Compress/../Common/../../Common/MyException.h \ + ../../Compress/../Common/../../Common/MyWindows.h \ + ../../Compress/BitlDecoder.h ../../Compress/../IStream.h \ + ../../Compress/LzOutWindow.h ../../Compress/../Common/OutBuffer.h \ + ../../../Common/Defs.h +ImplodeHuffmanDecoder.o: ../../Compress/ImplodeHuffmanDecoder.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../Compress/ImplodeHuffmanDecoder.h \ + ../../Compress/../Common/InBuffer.h \ + ../../Compress/../Common/../IStream.h \ + ../../Compress/../Common/../../Common/MyUnknown.h \ + ../../Compress/../Common/../../Common/MyWindows.h \ + ../../Compress/../Common/../../Common/Types.h \ + ../../Compress/../Common/../IDecl.h \ + ../../Compress/../Common/../../Common/MyCom.h \ + ../../Compress/../Common/../../Common/MyException.h \ + ../../Compress/BitlDecoder.h ../../Compress/../IStream.h +LzhDecoder.o: ../../Compress/LzhDecoder.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../Compress/LzhDecoder.h \ + ../../Compress/../../Common/MyCom.h \ + ../../Compress/../../Common/MyWindows.h ../../Compress/../ICoder.h \ + ../../Compress/../IStream.h ../../Compress/../../Common/MyUnknown.h \ + ../../Compress/../../Common/Types.h ../../Compress/../IDecl.h \ + ../../Compress/../Common/InBuffer.h \ + ../../Compress/../Common/../IStream.h \ + ../../Compress/../Common/../../Common/MyCom.h \ + ../../Compress/../Common/../../Common/MyException.h \ + ../../Compress/../Common/../../Common/MyWindows.h \ + ../../Compress/BitmDecoder.h ../../Compress/../IStream.h \ + ../../Compress/HuffmanDecoder.h ../../Compress/../../Common/Types.h \ + ../../Compress/LzOutWindow.h ../../Compress/../Common/OutBuffer.h \ + ../../../Windows/Defs.h ../../../Windows/../Common/MyWindows.h +LzmaDecoder.o: ../../Compress/LzmaDecoder.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../Compress/../../../C/Alloc.h \ + ../../Compress/../Common/StreamUtils.h \ + ../../Compress/../Common/../IStream.h \ + ../../Compress/../Common/../../Common/MyUnknown.h \ + ../../Compress/../Common/../../Common/MyWindows.h \ + ../../Compress/../Common/../../Common/Types.h \ + ../../Compress/../Common/../IDecl.h ../../Compress/LzmaDecoder.h \ + ../../Compress/../../../C/LzmaDec.h ../../Compress/../../../C/Types.h \ + ../../Compress/../../Common/MyCom.h \ + ../../Compress/../../Common/MyWindows.h ../../Compress/../ICoder.h \ + ../../Compress/../IStream.h +LzmaEncoder.o: ../../Compress/LzmaEncoder.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../Compress/../../../C/Alloc.h \ + ../../Compress/../Common/CWrappers.h \ + ../../Compress/../Common/../ICoder.h \ + ../../Compress/../Common/../IStream.h \ + ../../Compress/../Common/../../Common/MyUnknown.h \ + ../../Compress/../Common/../../Common/MyWindows.h \ + ../../Compress/../Common/../../Common/Types.h \ + ../../Compress/../Common/../IDecl.h \ + ../../Compress/../Common/../../Common/MyCom.h \ + ../../Compress/../Common/StreamUtils.h \ + ../../Compress/../Common/../IStream.h ../../Compress/LzmaEncoder.h \ + ../../Compress/../../../C/LzmaEnc.h ../../Compress/../../../C/Types.h \ + ../../Compress/../../Common/MyCom.h ../../Compress/../ICoder.h +LzmaRegister.o: ../../Compress/LzmaRegister.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../Compress/../Common/RegisterCodec.h \ + ../../Compress/../Common/../Common/MethodId.h \ + ../../Compress/../Common/../Common/../../Common/Types.h \ + ../../Compress/LzmaDecoder.h ../../Compress/../../../C/LzmaDec.h \ + ../../Compress/../../../C/Types.h ../../Compress/../../Common/MyCom.h \ + ../../Compress/../../Common/MyWindows.h ../../Compress/../ICoder.h \ + ../../Compress/../IStream.h ../../Compress/../../Common/MyUnknown.h \ + ../../Compress/../../Common/Types.h ../../Compress/../IDecl.h \ + ../../Compress/LzmaEncoder.h ../../Compress/../../../C/LzmaEnc.h +LzOutWindow.o: ../../Compress/LzOutWindow.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../Compress/LzOutWindow.h \ + ../../Compress/../IStream.h ../../Compress/../../Common/MyUnknown.h \ + ../../Compress/../../Common/MyWindows.h \ + ../../Compress/../../Common/Types.h ../../Compress/../IDecl.h \ + ../../Compress/../Common/OutBuffer.h \ + ../../Compress/../Common/../IStream.h \ + ../../Compress/../Common/../../Common/MyCom.h \ + ../../Compress/../Common/../../Common/MyWindows.h \ + ../../Compress/../Common/../../Common/MyException.h +Lzx86Converter.o: ../../Compress/Lzx86Converter.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../Compress/../../Common/Defs.h ../../Compress/Lzx86Converter.h \ + ../../Compress/../../Common/MyCom.h \ + ../../Compress/../../Common/MyWindows.h ../../Compress/../IStream.h \ + ../../Compress/../../Common/MyUnknown.h \ + ../../Compress/../../Common/Types.h ../../Compress/../IDecl.h +LzxDecoder.o: ../../Compress/LzxDecoder.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../Compress/../../Common/Defs.h \ + ../../Compress/LzxDecoder.h ../../Compress/../ICoder.h \ + ../../Compress/../IStream.h ../../Compress/../../Common/MyUnknown.h \ + ../../Compress/../../Common/MyWindows.h \ + ../../Compress/../../Common/Types.h ../../Compress/../IDecl.h \ + ../../Compress/../Common/InBuffer.h \ + ../../Compress/../Common/../IStream.h \ + ../../Compress/../Common/../../Common/MyCom.h \ + ../../Compress/../Common/../../Common/MyWindows.h \ + ../../Compress/../Common/../../Common/MyException.h \ + ../../Compress/HuffmanDecoder.h ../../Compress/../../Common/Types.h \ + ../../Compress/LzOutWindow.h ../../Compress/../IStream.h \ + ../../Compress/../Common/OutBuffer.h ../../Compress/Lzx.h \ + ../../Compress/Lzx86Converter.h ../../Compress/../../Common/MyCom.h +PpmdDecoder.o: ../../Compress/PpmdDecoder.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../Compress/../../../C/Alloc.h \ + ../../Compress/../../../C/CpuArch.h ../../Compress/../../../C/Types.h \ + ../../Compress/../Common/StreamUtils.h \ + ../../Compress/../Common/../IStream.h \ + ../../Compress/../Common/../../Common/MyUnknown.h \ + ../../Compress/../Common/../../Common/MyWindows.h \ + ../../Compress/../Common/../../Common/Types.h \ + ../../Compress/../Common/../IDecl.h ../../Compress/PpmdDecoder.h \ + ../../Compress/../../../C/Ppmd7.h ../../Compress/../../../C/Ppmd.h \ + ../../Compress/../../../C/CpuArch.h ../../Compress/../../Common/MyCom.h \ + ../../Compress/../../Common/MyWindows.h \ + ../../Compress/../Common/CWrappers.h \ + ../../Compress/../Common/../ICoder.h \ + ../../Compress/../Common/../IStream.h \ + ../../Compress/../Common/../../Common/MyCom.h ../../Compress/../ICoder.h +PpmdEncoder.o: ../../Compress/PpmdEncoder.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../Compress/../../../C/Alloc.h \ + ../../Compress/../../../C/CpuArch.h ../../Compress/../../../C/Types.h \ + ../../Compress/../Common/StreamUtils.h \ + ../../Compress/../Common/../IStream.h \ + ../../Compress/../Common/../../Common/MyUnknown.h \ + ../../Compress/../Common/../../Common/MyWindows.h \ + ../../Compress/../Common/../../Common/Types.h \ + ../../Compress/../Common/../IDecl.h ../../Compress/PpmdEncoder.h \ + ../../Compress/../../../C/Ppmd7.h ../../Compress/../../../C/Ppmd.h \ + ../../Compress/../../../C/CpuArch.h ../../Compress/../../Common/MyCom.h \ + ../../Compress/../../Common/MyWindows.h ../../Compress/../ICoder.h \ + ../../Compress/../IStream.h ../../Compress/../Common/CWrappers.h \ + ../../Compress/../Common/../ICoder.h \ + ../../Compress/../Common/../../Common/MyCom.h +PpmdRegister.o: ../../Compress/PpmdRegister.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../Compress/../Common/RegisterCodec.h \ + ../../Compress/../Common/../Common/MethodId.h \ + ../../Compress/../Common/../Common/../../Common/Types.h \ + ../../Compress/PpmdDecoder.h ../../Compress/../../../C/Ppmd7.h \ + ../../Compress/../../../C/Ppmd.h ../../Compress/../../../C/Types.h \ + ../../Compress/../../../C/CpuArch.h ../../Compress/../../Common/MyCom.h \ + ../../Compress/../../Common/MyWindows.h \ + ../../Compress/../Common/CWrappers.h \ + ../../Compress/../Common/../ICoder.h \ + ../../Compress/../Common/../IStream.h \ + ../../Compress/../Common/../../Common/MyUnknown.h \ + ../../Compress/../Common/../../Common/MyWindows.h \ + ../../Compress/../Common/../../Common/Types.h \ + ../../Compress/../Common/../IDecl.h \ + ../../Compress/../Common/../../Common/MyCom.h ../../Compress/../ICoder.h \ + ../../Compress/PpmdEncoder.h +PpmdZip.o: ../../Compress/PpmdZip.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../Compress/../../../C/CpuArch.h \ + ../../Compress/../../../C/Types.h ../../Compress/../Common/StreamUtils.h \ + ../../Compress/../Common/../IStream.h \ + ../../Compress/../Common/../../Common/MyUnknown.h \ + ../../Compress/../Common/../../Common/MyWindows.h \ + ../../Compress/../Common/../../Common/Types.h \ + ../../Compress/../Common/../IDecl.h ../../Compress/PpmdZip.h \ + ../../Compress/../../../C/Alloc.h ../../Compress/../../../C/Ppmd8.h \ + ../../Compress/../../../C/Ppmd.h ../../Compress/../../../C/CpuArch.h \ + ../../Compress/../../Common/MyCom.h \ + ../../Compress/../../Common/MyWindows.h \ + ../../Compress/../Common/CWrappers.h \ + ../../Compress/../Common/../ICoder.h \ + ../../Compress/../Common/../IStream.h \ + ../../Compress/../Common/../../Common/MyCom.h ../../Compress/../ICoder.h +QuantumDecoder.o: ../../Compress/QuantumDecoder.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../Compress/../../Common/Defs.h ../../Compress/QuantumDecoder.h \ + ../../Compress/../../Common/MyCom.h \ + ../../Compress/../../Common/MyWindows.h ../../Compress/../ICoder.h \ + ../../Compress/../IStream.h ../../Compress/../../Common/MyUnknown.h \ + ../../Compress/../../Common/Types.h ../../Compress/../IDecl.h \ + ../../Compress/../Common/InBuffer.h \ + ../../Compress/../Common/../IStream.h \ + ../../Compress/../Common/../../Common/MyCom.h \ + ../../Compress/../Common/../../Common/MyException.h \ + ../../Compress/../Common/../../Common/MyWindows.h \ + ../../Compress/LzOutWindow.h ../../Compress/../IStream.h \ + ../../Compress/../Common/OutBuffer.h +ShrinkDecoder.o: ../../Compress/ShrinkDecoder.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../Compress/../../../C/Alloc.h ../../Compress/../Common/InBuffer.h \ + ../../Compress/../Common/../IStream.h \ + ../../Compress/../Common/../../Common/MyUnknown.h \ + ../../Compress/../Common/../../Common/MyWindows.h \ + ../../Compress/../Common/../../Common/Types.h \ + ../../Compress/../Common/../IDecl.h \ + ../../Compress/../Common/../../Common/MyCom.h \ + ../../Compress/../Common/../../Common/MyException.h \ + ../../Compress/../Common/OutBuffer.h ../../Compress/BitlDecoder.h \ + ../../Compress/../IStream.h ../../Compress/ShrinkDecoder.h \ + ../../Compress/../../Common/MyCom.h ../../Compress/../ICoder.h \ + ../../Compress/../IStream.h +ZlibDecoder.o: ../../Compress/ZlibDecoder.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../Compress/../Common/StreamUtils.h \ + ../../Compress/../Common/../IStream.h \ + ../../Compress/../Common/../../Common/MyUnknown.h \ + ../../Compress/../Common/../../Common/MyWindows.h \ + ../../Compress/../Common/../../Common/Types.h \ + ../../Compress/../Common/../IDecl.h ../../Compress/ZlibDecoder.h \ + ../../Compress/DeflateDecoder.h ../../Compress/../../Common/MyCom.h \ + ../../Compress/../../Common/MyWindows.h ../../Compress/../ICoder.h \ + ../../Compress/../IStream.h ../../Compress/../Common/InBuffer.h \ + ../../Compress/../Common/../../Common/MyCom.h \ + ../../Compress/../Common/../../Common/MyException.h \ + ../../Compress/BitlDecoder.h ../../Compress/../IStream.h \ + ../../Compress/DeflateConst.h ../../Compress/HuffmanDecoder.h \ + ../../Compress/../../Common/Types.h ../../Compress/LzOutWindow.h \ + ../../Compress/../Common/OutBuffer.h +ZlibEncoder.o: ../../Compress/ZlibEncoder.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../Compress/../Common/StreamUtils.h \ + ../../Compress/../Common/../IStream.h \ + ../../Compress/../Common/../../Common/MyUnknown.h \ + ../../Compress/../Common/../../Common/MyWindows.h \ + ../../Compress/../Common/../../Common/Types.h \ + ../../Compress/../Common/../IDecl.h ../../Compress/ZlibEncoder.h \ + ../../Compress/DeflateEncoder.h ../../Compress/../../../C/LzFind.h \ + ../../Compress/../../../C/Types.h ../../../Common/MyCom.h \ + ../../../Common/MyWindows.h ../../Compress/../ICoder.h \ + ../../Compress/../IStream.h ../../Compress/BitlEncoder.h \ + ../../Compress/../Common/OutBuffer.h \ + ../../Compress/../Common/../../Common/MyCom.h \ + ../../Compress/../Common/../../Common/MyException.h \ + ../../Compress/DeflateConst.h +ZDecoder.o: ../../Compress/ZDecoder.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../Compress/../../../C/Alloc.h \ + ../../Compress/../Common/InBuffer.h \ + ../../Compress/../Common/../IStream.h \ + ../../Compress/../Common/../../Common/MyUnknown.h \ + ../../Compress/../Common/../../Common/MyWindows.h \ + ../../Compress/../Common/../../Common/Types.h \ + ../../Compress/../Common/../IDecl.h \ + ../../Compress/../Common/../../Common/MyCom.h \ + ../../Compress/../Common/../../Common/MyException.h \ + ../../Compress/../Common/OutBuffer.h ../../Compress/ZDecoder.h \ + ../../Compress/../../Common/MyCom.h ../../Compress/../ICoder.h \ + ../../Compress/../IStream.h +7zAes.o: ../../Crypto/7zAes.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../Crypto/../../../C/Sha256.h \ + ../../Crypto/../../../C/Types.h ../../../Windows/Synchronization.h \ + ../../../Windows/Defs.h ../../../Windows/../Common/MyWindows.h \ + ../../../Windows/../../C/Threads.h ../../../Windows/../../C/Types.h \ + ../../../Windows/Synchronization2.h \ + ../../Crypto/../Common/StreamObjects.h \ + ../../Crypto/../Common/../../Common/Buffer.h \ + ../../Crypto/../Common/../../Common/Defs.h \ + ../../Crypto/../Common/../../Common/MyCom.h \ + ../../Crypto/../Common/../../Common/MyWindows.h \ + ../../Crypto/../Common/../IStream.h \ + ../../Crypto/../Common/../../Common/MyUnknown.h \ + ../../Crypto/../Common/../../Common/Types.h \ + ../../Crypto/../Common/../IDecl.h ../../Crypto/../Common/StreamUtils.h \ + ../../Crypto/7zAes.h ../../../Common/Buffer.h ../../../Common/MyCom.h \ + ../../../Common/MyVector.h ../../../Common/Defs.h \ + ../../Crypto/../ICoder.h ../../Crypto/../IStream.h \ + ../../Crypto/../IPassword.h ../../Crypto/../../Common/MyUnknown.h \ + ../../Crypto/../../Common/Types.h ../../Crypto/../IDecl.h \ + ../../Crypto/MyAes.h ../../Crypto/../../../C/Aes.h \ + ../../Crypto/../../Common/MyCom.h ../../Crypto/RandGen.h \ + ../../Crypto/Sha1.h ../../Crypto/../../Common/Types.h +7zAesRegister.o: ../../Crypto/7zAesRegister.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../Crypto/../Common/RegisterCodec.h \ + ../../Crypto/../Common/../Common/MethodId.h \ + ../../Crypto/../Common/../Common/../../Common/Types.h \ + ../../Crypto/7zAes.h ../../../Common/Buffer.h ../../../Common/Defs.h \ + ../../../Common/MyCom.h ../../../Common/MyWindows.h \ + ../../../Common/MyVector.h ../../Crypto/../ICoder.h \ + ../../Crypto/../IStream.h ../../Crypto/../../Common/MyUnknown.h \ + ../../Crypto/../../Common/MyWindows.h ../../Crypto/../../Common/Types.h \ + ../../Crypto/../IDecl.h ../../Crypto/../IPassword.h +HmacSha1.o: ../../Crypto/HmacSha1.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../Crypto/HmacSha1.h \ + ../../Crypto/Sha1.h ../../Crypto/../../Common/Types.h +MyAes.o: ../../Crypto/MyAes.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../Crypto/MyAes.h \ + ../../Crypto/../../../C/Aes.h ../../Crypto/../../../C/Types.h \ + ../../Crypto/../../Common/MyCom.h ../../Crypto/../../Common/MyWindows.h \ + ../../Crypto/../ICoder.h ../../Crypto/../IStream.h \ + ../../Crypto/../../Common/MyUnknown.h ../../Crypto/../../Common/Types.h \ + ../../Crypto/../IDecl.h +Pbkdf2HmacSha1.o: ../../Crypto/Pbkdf2HmacSha1.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../Crypto/HmacSha1.h ../../Crypto/Sha1.h \ + ../../Crypto/../../Common/Types.h +RandGen.o: ../../Crypto/RandGen.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../../Windows/Synchronization.h \ + ../../../Windows/Defs.h ../../../Windows/../Common/MyWindows.h \ + ../../../Windows/../../C/Threads.h ../../../Windows/../../C/Types.h \ + ../../../Windows/Synchronization2.h ../../Crypto/RandGen.h \ + ../../Crypto/Sha1.h ../../Crypto/../../Common/Types.h +Sha1.o: ../../Crypto/Sha1.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../Crypto/../../../C/RotateDefs.h \ + ../../Crypto/Sha1.h ../../Crypto/../../Common/Types.h +WzAes.o: ../../Crypto/WzAes.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../Crypto/../Common/StreamObjects.h \ + ../../Crypto/../Common/../../Common/Buffer.h \ + ../../Crypto/../Common/../../Common/Defs.h \ + ../../Crypto/../Common/../../Common/MyCom.h \ + ../../Crypto/../Common/../../Common/MyWindows.h \ + ../../Crypto/../Common/../IStream.h \ + ../../Crypto/../Common/../../Common/MyUnknown.h \ + ../../Crypto/../Common/../../Common/Types.h \ + ../../Crypto/../Common/../IDecl.h ../../Crypto/../Common/StreamUtils.h \ + ../../Crypto/Pbkdf2HmacSha1.h ../../Crypto/../../Common/Types.h \ + ../../Crypto/RandGen.h ../../Crypto/Sha1.h ../../Crypto/WzAes.h \ + ../../Crypto/../../../C/Aes.h ../../Crypto/../../../C/Types.h \ + ../../../Common/Buffer.h ../../../Common/MyCom.h \ + ../../../Common/MyVector.h ../../../Common/Defs.h \ + ../../Crypto/../ICoder.h ../../Crypto/../IStream.h \ + ../../Crypto/../IPassword.h ../../Crypto/../../Common/MyUnknown.h \ + ../../Crypto/../../Common/Types.h ../../Crypto/../IDecl.h \ + ../../Crypto/HmacSha1.h +Rar20Crypto.o: ../../Crypto/Rar20Crypto.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../Crypto/../../../C/7zCrc.h \ + ../../Crypto/../../../C/Types.h ../../Crypto/../../../C/CpuArch.h \ + ../../Crypto/../../../C/RotateDefs.h ../../Crypto/Rar20Crypto.h \ + ../../../Common/MyCom.h ../../../Common/MyWindows.h \ + ../../Crypto/../ICoder.h ../../Crypto/../IStream.h \ + ../../Crypto/../../Common/MyUnknown.h \ + ../../Crypto/../../Common/MyWindows.h ../../Crypto/../../Common/Types.h \ + ../../Crypto/../IDecl.h ../../Crypto/../IPassword.h +RarAes.o: ../../Crypto/RarAes.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../Crypto/RarAes.h \ + ../../Crypto/../../../C/Aes.h ../../Crypto/../../../C/Types.h \ + ../../../Common/Buffer.h ../../../Common/Defs.h \ + ../../Crypto/../IPassword.h ../../Crypto/../../Common/MyUnknown.h \ + ../../Crypto/../../Common/MyWindows.h ../../Crypto/../../Common/Types.h \ + ../../Crypto/../IDecl.h ../../Crypto/MyAes.h \ + ../../Crypto/../../Common/MyCom.h ../../Crypto/../ICoder.h \ + ../../Crypto/../IStream.h ../../Crypto/Sha1.h \ + ../../Crypto/../../Common/Types.h +ZipCrypto.o: ../../Crypto/ZipCrypto.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../Crypto/../../../C/7zCrc.h \ + ../../Crypto/../../../C/Types.h ../../Crypto/../Common/StreamUtils.h \ + ../../Crypto/../Common/../IStream.h \ + ../../Crypto/../Common/../../Common/MyUnknown.h \ + ../../Crypto/../Common/../../Common/MyWindows.h \ + ../../Crypto/../Common/../../Common/Types.h \ + ../../Crypto/../Common/../IDecl.h ../../Crypto/RandGen.h \ + ../../Crypto/Sha1.h ../../Crypto/../../Common/Types.h \ + ../../Crypto/ZipCrypto.h ../../../Common/MyCom.h \ + ../../../Common/MyWindows.h ../../Crypto/../ICoder.h \ + ../../Crypto/../IStream.h ../../Crypto/../IPassword.h \ + ../../Crypto/../../Common/MyUnknown.h ../../Crypto/../../Common/Types.h \ + ../../Crypto/../IDecl.h +ZipStrong.o: ../../Crypto/ZipStrong.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../Crypto/../../../C/7zCrc.h \ + ../../Crypto/../../../C/Types.h ../../Crypto/../../../C/CpuArch.h \ + ../../Crypto/../Common/StreamUtils.h ../../Crypto/../Common/../IStream.h \ + ../../Crypto/../Common/../../Common/MyUnknown.h \ + ../../Crypto/../Common/../../Common/MyWindows.h \ + ../../Crypto/../Common/../../Common/Types.h \ + ../../Crypto/../Common/../IDecl.h ../../Crypto/MyAes.h \ + ../../Crypto/../../../C/Aes.h ../../Crypto/../../Common/MyCom.h \ + ../../Crypto/../../Common/MyWindows.h ../../Crypto/../ICoder.h \ + ../../Crypto/../IStream.h ../../Crypto/Sha1.h \ + ../../Crypto/../../Common/Types.h ../../Crypto/ZipStrong.h \ + ../../../Common/Buffer.h ../../../Common/Defs.h \ + ../../Crypto/../IPassword.h ../../Crypto/../../Common/MyUnknown.h \ + ../../Crypto/../../Common/Types.h ../../Crypto/../IDecl.h diff --git a/CPP/7zip/Bundles/Format7zFree/makefile.list b/CPP/7zip/Bundles/Format7zFree/makefile.list new file mode 100644 index 0000000..d7b73ad --- /dev/null +++ b/CPP/7zip/Bundles/Format7zFree/makefile.list @@ -0,0 +1,265 @@ +SRCS=\ + ../../../myWindows/myGetTickCount.cpp \ + ../../../myWindows/wine_date_and_time.cpp \ + \ + ../../../Common/CRC.cpp \ + ../../../Common/IntToString.cpp \ + ../../../Common/MyMap.cpp \ + ../../../Common/MyString.cpp \ + ../../../Common/MyWindows.cpp \ + ../../../Common/MyXml.cpp \ + ../../../Common/StringConvert.cpp \ + ../../../Common/StringToInt.cpp \ + ../../../Common/UTFConvert.cpp \ + ../../../Common/MyVector.cpp \ + ../../../Common/Wildcard.cpp \ + \ + ../../../Windows/FileDir.cpp \ + ../../../Windows/FileFind.cpp \ + ../../../Windows/FileIO.cpp \ + ../../../Windows/PropVariant.cpp \ + ../../../Windows/PropVariantUtils.cpp \ + ../../../Windows/Synchronization.cpp \ + ../../../Windows/System.cpp \ + ../../../Windows/Time.cpp \ + \ + ../../Common/InBuffer.cpp \ + ../../Common/InOutTempBuffer.cpp \ + ../../Common/CreateCoder.cpp \ + ../../Common/CWrappers.cpp \ + ../../Common/FilterCoder.cpp \ + ../../Common/LimitedStreams.cpp \ + ../../Common/LockedStream.cpp \ + ../../Common/MethodId.cpp \ + ../../Common/MethodProps.cpp \ + ../../Common/MemBlocks.cpp \ + ../../Common/OffsetStream.cpp \ + ../../Common/OutBuffer.cpp \ + ../../Common/OutMemStream.cpp \ + ../../Common/ProgressMt.cpp \ + ../../Common/ProgressUtils.cpp \ + ../../Common/StreamBinder.cpp \ + ../../Common/StreamObjects.cpp \ + ../../Common/StreamUtils.cpp \ + ../../Common/VirtThread.cpp \ + \ + ../../Archive/ArchiveExports.cpp \ + ../../Archive/DllExports2.cpp \ + ../../Archive/ApmHandler.cpp \ + ../../Archive/ArjHandler.cpp \ + ../../Archive/Bz2Handler.cpp \ + ../../Archive/CpioHandler.cpp \ + ../../Archive/CramfsHandler.cpp \ + ../../Archive/DebHandler.cpp \ + ../../Archive/DeflateProps.cpp \ + ../../Archive/DmgHandler.cpp \ + ../../Archive/ElfHandler.cpp \ + ../../Archive/FatHandler.cpp \ + ../../Archive/FlvHandler.cpp \ + ../../Archive/GzHandler.cpp \ + ../../Archive/LzhHandler.cpp \ + ../../Archive/LzmaHandler.cpp \ + ../../Archive/MachoHandler.cpp \ + ../../Archive/MbrHandler.cpp \ + ../../Archive/MslzHandler.cpp \ + ../../Archive/MubHandler.cpp \ + ../../Archive/NtfsHandler.cpp \ + ../../Archive/PeHandler.cpp \ + ../../Archive/PpmdHandler.cpp \ + ../../Archive/RpmHandler.cpp \ + ../../Archive/SplitHandler.cpp \ + ../../Archive/SquashfsHandler.cpp \ + ../../Archive/SwfHandler.cpp \ + ../../Archive/VhdHandler.cpp \ + ../../Archive/XarHandler.cpp \ + ../../Archive/XzHandler.cpp \ + ../../Archive/ZHandler.cpp \ + \ + ../../Archive/Common/CoderMixer2.cpp \ + ../../Archive/Common/CoderMixer2MT.cpp \ + ../../Archive/Common/CrossThreadProgress.cpp \ + ../../Archive/Common/DummyOutStream.cpp \ + ../../Archive/Common/FindSignature.cpp \ + ../../Archive/Common/InStreamWithCRC.cpp \ + ../../Archive/Common/ItemNameUtils.cpp \ + ../../Archive/Common/MultiStream.cpp \ + ../../Archive/Common/OutStreamWithCRC.cpp \ + ../../Archive/Common/OutStreamWithSha1.cpp \ + ../../Archive/Common/HandlerOut.cpp \ + ../../Archive/Common/ParseProperties.cpp \ + \ + ../../Archive/7z/7zCompressionMode.cpp \ + ../../Archive/7z/7zDecode.cpp \ + ../../Archive/7z/7zEncode.cpp \ + ../../Archive/7z/7zExtract.cpp \ + ../../Archive/7z/7zFolderInStream.cpp \ + ../../Archive/7z/7zFolderOutStream.cpp \ + ../../Archive/7z/7zHandler.cpp \ + ../../Archive/7z/7zHandlerOut.cpp \ + ../../Archive/7z/7zHeader.cpp \ + ../../Archive/7z/7zIn.cpp \ + ../../Archive/7z/7zOut.cpp \ + ../../Archive/7z/7zProperties.cpp \ + ../../Archive/7z/7zSpecStream.cpp \ + ../../Archive/7z/7zUpdate.cpp \ + ../../Archive/7z/7zRegister.cpp \ + \ + ../../Archive/Cab/CabBlockInStream.cpp \ + ../../Archive/Cab/CabHandler.cpp \ + ../../Archive/Cab/CabHeader.cpp \ + ../../Archive/Cab/CabIn.cpp \ + ../../Archive/Cab/CabRegister.cpp \ + \ + ../../Archive/Chm/ChmHandler.cpp \ + ../../Archive/Chm/ChmHeader.cpp \ + ../../Archive/Chm/ChmIn.cpp \ + ../../Archive/Chm/ChmRegister.cpp \ + \ + ../../Archive/Com/ComHandler.cpp \ + ../../Archive/Com/ComIn.cpp \ + ../../Archive/Com/ComRegister.cpp \ + \ + ../../Archive/Hfs/HfsHandler.cpp \ + ../../Archive/Hfs/HfsIn.cpp \ + ../../Archive/Hfs/HfsRegister.cpp \ + \ + ../../Archive/Iso/IsoHandler.cpp \ + ../../Archive/Iso/IsoHeader.cpp \ + ../../Archive/Iso/IsoIn.cpp \ + ../../Archive/Iso/IsoRegister.cpp \ + \ + ../../Archive/Nsis/NsisDecode.cpp \ + ../../Archive/Nsis/NsisHandler.cpp \ + ../../Archive/Nsis/NsisIn.cpp \ + ../../Archive/Nsis/NsisRegister.cpp \ + \ + ../../Archive/Rar/RarHandler.cpp \ + ../../Archive/Rar/RarHeader.cpp \ + ../../Archive/Rar/RarIn.cpp \ + ../../Archive/Rar/RarItem.cpp \ + ../../Archive/Rar/RarVolumeInStream.cpp \ + ../../Archive/Rar/RarRegister.cpp \ + \ + ../../Archive/Tar/TarHandler.cpp \ + ../../Archive/Tar/TarHandlerOut.cpp \ + ../../Archive/Tar/TarHeader.cpp \ + ../../Archive/Tar/TarIn.cpp \ + ../../Archive/Tar/TarOut.cpp \ + ../../Archive/Tar/TarRegister.cpp \ + ../../Archive/Tar/TarUpdate.cpp \ + \ + ../../Archive/Udf/UdfHandler.cpp \ + ../../Archive/Udf/UdfIn.cpp \ + ../../Archive/Udf/UdfRegister.cpp \ + \ + ../../Archive/Wim/WimHandler.cpp \ + ../../Archive/Wim/WimHandlerOut.cpp \ + ../../Archive/Wim/WimIn.cpp \ + ../../Archive/Wim/WimRegister.cpp \ + \ + ../../Archive/Zip/ZipAddCommon.cpp \ + ../../Archive/Zip/ZipHandler.cpp \ + ../../Archive/Zip/ZipHandlerOut.cpp \ + ../../Archive/Zip/ZipHeader.cpp \ + ../../Archive/Zip/ZipIn.cpp \ + ../../Archive/Zip/ZipItem.cpp \ + ../../Archive/Zip/ZipOut.cpp \ + ../../Archive/Zip/ZipUpdate.cpp \ + ../../Archive/Zip/ZipRegister.cpp \ + \ + ../../Compress/CodecExports.cpp \ + ../../Compress/ArjDecoder1.cpp \ + ../../Compress/ArjDecoder2.cpp \ + ../../Compress/Bcj2Coder.cpp \ + ../../Compress/Bcj2Register.cpp \ + ../../Compress/BcjCoder.cpp \ + ../../Compress/BcjRegister.cpp \ + ../../Compress/BitlDecoder.cpp \ + ../../Compress/BranchCoder.cpp \ + ../../Compress/BranchMisc.cpp \ + ../../Compress/BranchRegister.cpp \ + ../../Compress/ByteSwap.cpp \ + ../../Compress/BZip2Crc.cpp \ + ../../Compress/BZip2Decoder.cpp \ + ../../Compress/BZip2Encoder.cpp \ + ../../Compress/BZip2Register.cpp \ + ../../Compress/CopyCoder.cpp \ + ../../Compress/CopyRegister.cpp \ + ../../Compress/Deflate64Register.cpp \ + ../../Compress/DeflateDecoder.cpp \ + ../../Compress/DeflateEncoder.cpp \ + ../../Compress/DeflateRegister.cpp \ + ../../Compress/DeltaFilter.cpp \ + ../../Compress/Lzma2Decoder.cpp \ + ../../Compress/Lzma2Encoder.cpp \ + ../../Compress/Lzma2Register.cpp \ + ../../Compress/ImplodeDecoder.cpp \ + ../../Compress/ImplodeHuffmanDecoder.cpp \ + ../../Compress/LzhDecoder.cpp \ + ../../Compress/LzmaDecoder.cpp \ + ../../Compress/LzmaEncoder.cpp \ + ../../Compress/LzmaRegister.cpp \ + ../../Compress/LzOutWindow.cpp \ + ../../Compress/Lzx86Converter.cpp \ + ../../Compress/LzxDecoder.cpp \ + ../../Compress/PpmdDecoder.cpp \ + ../../Compress/PpmdEncoder.cpp \ + ../../Compress/PpmdRegister.cpp \ + ../../Compress/PpmdZip.cpp \ + ../../Compress/QuantumDecoder.cpp \ + ../../Compress/ShrinkDecoder.cpp \ + ../../Compress/ZlibDecoder.cpp \ + ../../Compress/ZlibEncoder.cpp \ + ../../Compress/ZDecoder.cpp \ + \ + ../../Crypto/7zAes.cpp \ + ../../Crypto/7zAesRegister.cpp \ + ../../Crypto/HmacSha1.cpp \ + ../../Crypto/MyAes.cpp \ + ../../Crypto/Pbkdf2HmacSha1.cpp \ + ../../Crypto/RandGen.cpp \ + ../../Crypto/Sha1.cpp \ + ../../Crypto/WzAes.cpp \ + ../../Crypto/Rar20Crypto.cpp \ + ../../Crypto/RarAes.cpp \ + ../../Crypto/ZipCrypto.cpp \ + ../../Crypto/ZipStrong.cpp + +SRCS_C=\ + ../../../../C/7zBuf2.c \ + ../../../../C/7zStream.c \ + ../../../../C/Aes.c \ + ../../../../C/Alloc.c \ + ../../../../C/Bra.c \ + ../../../../C/Bra86.c \ + ../../../../C/BraIA64.c \ + ../../../../C/BwtSort.c \ + ../../../../C/Delta.c \ + ../../../../C/HuffEnc.c \ + ../../../../C/LzFind.c \ + ../../../../C/LzFindMt.c \ + ../../../../C/Lzma2Dec.c \ + ../../../../C/Lzma2Enc.c \ + ../../../../C/LzmaDec.c \ + ../../../../C/LzmaEnc.c \ + ../../../../C/MtCoder.c \ + ../../../../C/Ppmd7.c \ + ../../../../C/Ppmd7Dec.c \ + ../../../../C/Ppmd7Enc.c \ + ../../../../C/Ppmd8.c \ + ../../../../C/Ppmd8Dec.c \ + ../../../../C/Ppmd8Enc.c \ + ../../../../C/Sha256.c \ + ../../../../C/Sort.c \ + ../../../../C/Threads.c \ + ../../../../C/Xz.c \ + ../../../../C/XzCrc64.c \ + ../../../../C/XzDec.c \ + ../../../../C/XzEnc.c \ + ../../../../C/XzIn.c \ + +include ../../../../makefile.rules + +Main.o : ../../UI/Console/Main.cpp + $(CXX) $(CXXFLAGS) ../../UI/Console/Main.cpp + diff --git a/CPP/7zip/Bundles/SFXCon/Main.cpp b/CPP/7zip/Bundles/SFXCon/Main.cpp new file mode 100644 index 0000000..a01389b --- /dev/null +++ b/CPP/7zip/Bundles/SFXCon/Main.cpp @@ -0,0 +1,440 @@ +// Main.cpp + +#include "StdAfx.h" + +#include "Common/MyInitGuid.h" + +#include "Common/CommandLineParser.h" +#include "Common/MyException.h" + +#ifdef _WIN32 +#include "Windows/DLL.h" +#include "Windows/FileDir.h" +#else +#include "Common/StringConvert.h" +#include "Windows/System.h" +#include "myPrivate.h" +#endif + +#include "../../UI/Common/ExitCode.h" +#include "../../UI/Common/Extract.h" + +#include "../../UI/Console/ExtractCallbackConsole.h" +#include "../../UI/Console/List.h" +#include "../../UI/Console/OpenCallbackConsole.h" + +#include "../../MyVersion.h" + +using namespace NWindows; +using namespace NFile; +using namespace NCommandLineParser; + +extern CStdOutStream *g_StdStream; + +static const char *kCopyrightString = +"\n7-Zip SFX " MY_VERSION_COPYRIGHT_DATE "\n" +"p7zip Version " P7ZIP_VERSION ; + +static const int kNumSwitches = 6; + +namespace NKey { +enum Enum +{ + kHelp1 = 0, + kHelp2, + kDisablePercents, + kYes, + kPassword, + kOutputDir +}; + +} + +namespace NRecursedType { +enum EEnum +{ + kRecursed, + kWildCardOnlyRecursed, + kNonRecursed +}; +} +/* +static const char kRecursedIDChar = 'R'; +static const wchar_t *kRecursedPostCharSet = L"0-"; + +namespace NRecursedPostCharIndex { + enum EEnum + { + kWildCardRecursionOnly = 0, + kNoRecursion = 1 + }; +} + +static const char kFileListID = '@'; +static const char kImmediateNameID = '!'; + +static const char kSomeCludePostStringMinSize = 2; // at least <@|!>ame must be +static const char kSomeCludeAfterRecursedPostStringMinSize = 2; // at least <@|!>ame must be +*/ +static const CSwitchForm kSwitchForms[kNumSwitches] = + { + { L"?", NSwitchType::kSimple, false }, + { L"H", NSwitchType::kSimple, false }, + { L"BD", NSwitchType::kSimple, false }, + { L"Y", NSwitchType::kSimple, false }, + { L"P", NSwitchType::kUnLimitedPostString, false, 1 }, + { L"O", NSwitchType::kUnLimitedPostString, false, 1 }, + }; + +static const int kNumCommandForms = 3; + +namespace NCommandType { +enum EEnum +{ + kTest = 0, + // kExtract, + kFullExtract, + kList +}; + +} + +static const CCommandForm commandForms[kNumCommandForms] = +{ + { L"T", false }, + // { "E", false }, + { L"X", false }, + { L"L", false } +}; + +static const NRecursedType::EEnum kCommandRecursedDefault[kNumCommandForms] = +{ + NRecursedType::kRecursed +}; + +// static const bool kTestExtractRecursedDefault = true; +// static const bool kAddRecursedDefault = false; + +static const wchar_t *kUniversalWildcard = L"*"; +static const int kCommandIndex = 0; + +static const char *kHelpString = + "\nUsage: 7zSFX [] [...]\n" + "\n" + "\n" + " l: List contents of archive\n" + " t: Test integrity of archive\n" + " x: eXtract files with full pathname (default)\n" + "\n" + // " -bd Disable percentage indicator\n" + " -o{Directory}: set Output directory\n" + " -p{Password}: set Password\n" + " -y: assume Yes on all queries\n"; + + +// --------------------------- +// exception messages + +static const char *kUserErrorMessage = "Incorrect command line"; // NExitCode::kUserError +// static const char *kIncorrectListFile = "Incorrect wildcard in listfile"; +static const char *kIncorrectWildCardInCommandLine = "Incorrect wildcard in command line"; + +// static const CSysString kFileIsNotArchiveMessageBefore = "File \""; +// static const CSysString kFileIsNotArchiveMessageAfter = "\" is not archive"; + +// static const char *kProcessArchiveMessage = " archive: "; + +static const char *kCantFindSFX = " cannot find sfx"; + + +struct CArchiveCommand +{ + NCommandType::EEnum CommandType; + NRecursedType::EEnum DefaultRecursedType() const; +}; + +NRecursedType::EEnum CArchiveCommand::DefaultRecursedType() const +{ + return kCommandRecursedDefault[CommandType]; +} + +void PrintHelp(void) +{ + g_StdOut << kHelpString; +} + +static void ShowMessageAndThrowException(const char *message, NExitCode::EEnum code) +{ + g_StdOut << message << endl; + throw code; +} + +static void PrintHelpAndExit() // yyy +{ + PrintHelp(); + ShowMessageAndThrowException(kUserErrorMessage, NExitCode::kUserError); +} + +bool ParseArchiveCommand(const UString &commandString, CArchiveCommand &command) +{ + UString commandStringUpper = commandString; + commandStringUpper.MakeUpper(); + UString postString; + int commandIndex = ParseCommand(kNumCommandForms, commandForms, commandStringUpper, + postString) ; + if (commandIndex < 0) + return false; + command.CommandType = (NCommandType::EEnum)commandIndex; + return true; +} + +// ------------------------------------------------------------------ +// filenames functions + +static bool AddNameToCensor(NWildcard::CCensor &wildcardCensor, + const UString &name, bool include, NRecursedType::EEnum type) +{ + /* + if(!IsWildCardFilePathLegal(name)) + return false; + */ + bool isWildCard = DoesNameContainWildCard(name); + bool recursed = false; + + switch (type) + { + case NRecursedType::kWildCardOnlyRecursed: + recursed = isWildCard; + break; + case NRecursedType::kRecursed: + recursed = true; + break; + case NRecursedType::kNonRecursed: + recursed = false; + break; + } + wildcardCensor.AddItem(include, name, recursed); + return true; +} + +void AddCommandLineWildCardToCensor(NWildcard::CCensor &wildcardCensor, + const UString &name, bool include, NRecursedType::EEnum type) +{ + if (!AddNameToCensor(wildcardCensor, name, include, type)) + ShowMessageAndThrowException(kIncorrectWildCardInCommandLine, NExitCode::kUserError); +} + +void AddToCensorFromNonSwitchesStrings(NWildcard::CCensor &wildcardCensor, + const UStringVector & /* nonSwitchStrings */, NRecursedType::EEnum type, + bool /* thereAreSwitchIncludeWildCards */) +{ + AddCommandLineWildCardToCensor(wildcardCensor, kUniversalWildcard, true, type); +} + + +#ifndef _WIN32 +static void GetArguments(int numArgs, const char *args[], UStringVector &parts) +{ + parts.Clear(); + for(int i = 0; i < numArgs; i++) + { + UString s = MultiByteToUnicodeString(args[i]); + parts.Add(s); + } +} +#endif + +int Main2( + #ifndef _WIN32 + int numArgs, const char *args[] + #endif +) +{ + #if defined(_WIN32) && !defined(UNDER_CE) + SetFileApisToOEM(); + #endif + + UStringVector commandStrings; + #ifdef _WIN32 + NCommandLineParser::SplitCommandLine(GetCommandLineW(), commandStrings); + #else + extern void mySplitCommandLine(int numArgs,const char *args[],UStringVector &parts); + mySplitCommandLine(numArgs,args,commandStrings); + #endif + + // After mySplitCommandLine + g_StdOut << kCopyrightString << " (locale=" << my_getlocale() <<",Utf16="; + if (global_use_utf16_conversion) g_StdOut << "on"; + else g_StdOut << "off"; + g_StdOut << ",HugeFiles="; + if (sizeof(off_t) >= 8) g_StdOut << "on,"; + else g_StdOut << "off,"; + int nbcpu = NWindows::NSystem::GetNumberOfProcessors(); + if (nbcpu > 1) g_StdOut << nbcpu << " CPUs)\n"; + else g_StdOut << nbcpu << " CPU)\n"; + + UString arcPath = commandStrings.Front(); + + commandStrings.Delete(0); + + NCommandLineParser::CParser parser(kNumSwitches); + try + { + parser.ParseStrings(kSwitchForms, commandStrings); + } + catch(...) + { + PrintHelpAndExit(); + } + + if(parser[NKey::kHelp1].ThereIs || parser[NKey::kHelp2].ThereIs) + { + PrintHelp(); + return 0; + } + const UStringVector &nonSwitchStrings = parser.NonSwitchStrings; + + int numNonSwitchStrings = nonSwitchStrings.Size(); + + CArchiveCommand command; + if (numNonSwitchStrings == 0) + command.CommandType = NCommandType::kFullExtract; + else + { + if (numNonSwitchStrings > 1) + PrintHelpAndExit(); + if (!ParseArchiveCommand(nonSwitchStrings[kCommandIndex], command)) + PrintHelpAndExit(); + } + + + NRecursedType::EEnum recursedType; + recursedType = command.DefaultRecursedType(); + + NWildcard::CCensor wildcardCensor; + + bool thereAreSwitchIncludeWildCards; + thereAreSwitchIncludeWildCards = false; + AddToCensorFromNonSwitchesStrings(wildcardCensor, nonSwitchStrings, recursedType, + thereAreSwitchIncludeWildCards); + + bool yesToAll = parser[NKey::kYes].ThereIs; + + // NExtractMode::EEnum extractMode; + // bool isExtractGroupCommand = command.IsFromExtractGroup(extractMode); + + bool passwordEnabled = parser[NKey::kPassword].ThereIs; + + UString password; + if(passwordEnabled) + password = parser[NKey::kPassword].PostStrings[0]; + + if (!NFind::DoesFileExist(arcPath)) + throw kCantFindSFX; + + UString outputDir; + if (parser[NKey::kOutputDir].ThereIs) + { + outputDir = parser[NKey::kOutputDir].PostStrings[0]; + NName::NormalizeDirPathPrefix(outputDir); + } + + { + UStringVector v1, v2; + v1.Add(arcPath); + v2.Add(arcPath); + const NWildcard::CCensorNode &wildcardCensorHead = + wildcardCensor.Pairs.Front().Head; + + CCodecs *codecs = new CCodecs; + CMyComPtr< + #ifdef EXTERNAL_CODECS + ICompressCodecsInfo + #else + IUnknown + #endif + > compressCodecsInfo = codecs; + HRESULT result = codecs->Load(); + if (result != S_OK) + throw CSystemException(result); + + if(command.CommandType != NCommandType::kList) + { + CExtractCallbackConsole *ecs = new CExtractCallbackConsole; + CMyComPtr extractCallback = ecs; + ecs->OutStream = g_StdStream; + + #ifndef _NO_CRYPTO + ecs->PasswordIsDefined = passwordEnabled; + ecs->Password = password; + #endif + + ecs->Init(); + + COpenCallbackConsole openCallback; + openCallback.OutStream = g_StdStream; + + #ifndef _NO_CRYPTO + openCallback.PasswordIsDefined = passwordEnabled; + openCallback.Password = password; + #endif + + CExtractOptions eo; + eo.StdOutMode = false; + eo.PathMode = NExtract::NPathMode::kFullPathnames; + eo.TestMode = command.CommandType == NCommandType::kTest; + eo.OverwriteMode = yesToAll ? + NExtract::NOverwriteMode::kWithoutPrompt : + NExtract::NOverwriteMode::kAskBefore; + eo.OutputDir = outputDir; + eo.YesToAll = yesToAll; + + UString errorMessage; + CDecompressStat stat; + HRESULT result = DecompressArchives( + codecs, CIntVector(), + v1, v2, + wildcardCensorHead, + eo, &openCallback, ecs, errorMessage, stat); + if (!errorMessage.IsEmpty()) + { + (*g_StdStream) << endl << "Error: " << errorMessage;; + if (result == S_OK) + result = E_FAIL; + } + + if (ecs->NumArchiveErrors != 0 || ecs->NumFileErrors != 0) + { + if (ecs->NumArchiveErrors != 0) + (*g_StdStream) << endl << "Archive Errors: " << ecs->NumArchiveErrors << endl; + if (ecs->NumFileErrors != 0) + (*g_StdStream) << endl << "Sub items Errors: " << ecs->NumFileErrors << endl; + return NExitCode::kFatalError; + } + if (result != S_OK) + throw CSystemException(result); + } + else + { + UInt64 numErrors = 0; + HRESULT result = ListArchives( + codecs, CIntVector(), + false, + v1, v2, + wildcardCensorHead, + true, false, + #ifndef _NO_CRYPTO + passwordEnabled, password, + #endif + numErrors); + if (numErrors > 0) + { + g_StdOut << endl << "Errors: " << numErrors; + return NExitCode::kFatalError; + } + if (result != S_OK) + throw CSystemException(result); + } + } + return 0; +} diff --git a/CPP/7zip/Bundles/SFXCon/makefile b/CPP/7zip/Bundles/SFXCon/makefile new file mode 100644 index 0000000..a73596b --- /dev/null +++ b/CPP/7zip/Bundles/SFXCon/makefile @@ -0,0 +1,146 @@ +PROG=../../../../bin/7zCon.sfx + +LOCAL_FLAGS= \ + -DEXTRACT_ONLY \ + -DNO_READ_FROM_CODER \ + -D_SFX \ + -DUNICODE -D_UNICODE + +include ../../../../makefile.crc32 +include ../../../../makefile.machine + +PCH_NAME=$(PRE_COMPILED_HEADER) + +LIBS=$(LOCAL_LIBS) + +SFX_CONSOLE_OBJS = \ + Main.o \ + +CONSOLE_OBJS = \ + ConsoleClose.o \ + ExtractCallbackConsole.o \ + List.o \ + MainAr.o \ + OpenCallbackConsole.o \ + UserInputUtils.o \ + +# NewHandler.o +COMMON_OBJS = \ + CommandLineParser.o \ + CRC.o \ + IntToString.o \ + StdInStream.o \ + StdOutStream.o \ + MyString.o \ + MyWindows.o\ + StringConvert.o \ + UTFConvert.o \ + MyVector.o \ + Wildcard.o \ + +# DLL.o +WIN_OBJS = \ + Error.o \ + FileDir.o \ + FileFind.o \ + FileIO.o \ + FileName.o \ + PropVariant.o \ + PropVariantConversions.o \ + Synchronization.o \ + System.o + +7ZIP_COMMON_OBJS = \ + CreateCoder.o \ + CWrappers.o \ + FilePathAutoRename.o \ + FileStreams.o \ + InBuffer.o \ + FilterCoder.o \ + LimitedStreams.o \ + LockedStream.o \ + OutBuffer.o \ + ProgressUtils.o \ + StreamBinder.o \ + StreamObjects.o \ + StreamUtils.o \ + VirtThread.o \ + +UI_COMMON_OBJS = \ + ArchiveExtractCallback.o \ + ArchiveOpenCallback.o \ + DefaultName.o \ + LoadCodecs.o \ + Extract.o \ + ExtractingFilePath.o \ + OpenArchive.o \ + PropIDUtils.o \ + +AR_COMMON_OBJS = \ + CoderMixer2.o \ + CoderMixer2MT.o \ + CrossThreadProgress.o \ + ItemNameUtils.o \ + OutStreamWithCRC.o \ + + +7Z_OBJS = \ + 7zDecode.o \ + 7zExtract.o \ + 7zFolderOutStream.o \ + 7zHandler.o \ + 7zHeader.o \ + 7zIn.o \ + 7zRegister.o \ + +COMPRESS_OBJS = \ + BranchCoder.o \ + Bcj2Coder.o \ + Bcj2Register.o \ + BcjCoder.o \ + BcjRegister.o \ + CopyCoder.o \ + CopyRegister.o \ + Lzma2Decoder.o \ + Lzma2Register.o \ + LzmaDecoder.o \ + LzmaRegister.o \ + PpmdDecoder.o \ + PpmdRegister.o \ + +CRYPTO_OBJS = \ + 7zAes.o \ + 7zAesRegister.o \ + MyAes.o \ + +C_OBJS = \ + Aes.o \ + Alloc.o \ + Bra86.o \ + Lzma2Dec.o \ + LzmaDec.o \ + Ppmd7.o \ + Ppmd7Dec.o \ + Sha256.o \ + Threads.o \ + +OBJS = \ + myGetTickCount.o\ + wine_date_and_time.o\ + mySplitCommandLine.o\ + $(SFX_CONSOLE_OBJS) \ + $(CONSOLE_OBJS) \ + $(COMMON_OBJS) \ + $(WIN_OBJS) \ + $(7ZIP_COMMON_OBJS) \ + $(UI_COMMON_OBJS) \ + $(AR_COMMON_OBJS) \ + $(7Z_OBJS) \ + $(COMPRESS_OBJS) \ + $(CRYPTO_OBJS) \ + $(C_OBJS) \ + $(OBJ_CRC32) + + +include ../../../../makefile.glb + diff --git a/CPP/7zip/Bundles/SFXCon/makefile.depend b/CPP/7zip/Bundles/SFXCon/makefile.depend new file mode 100644 index 0000000..5f1f698 --- /dev/null +++ b/CPP/7zip/Bundles/SFXCon/makefile.depend @@ -0,0 +1,1500 @@ +myGetTickCount.o: ../../../myWindows/myGetTickCount.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h +wine_date_and_time.o: ../../../myWindows/wine_date_and_time.cpp \ + ../../../myWindows/config.h ../../../include_windows/windows.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../include_windows/basetyps.h +mySplitCommandLine.o: ../../../myWindows/mySplitCommandLine.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../../myWindows/../Common/StringConvert.h \ + ../../../myWindows/../Common/MyWindows.h \ + ../../../myWindows/../Common/MyString.h \ + ../../../myWindows/../Common/MyVector.h \ + ../../../myWindows/../Common/Defs.h ../../../myWindows/../Common/Types.h \ + ../../../myWindows/myPrivate.h +Main.o: Main.cpp ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../../Common/MyInitGuid.h ../../../Common/CommandLineParser.h \ + ../../../Common/MyString.h ../../../Common/MyVector.h \ + ../../../Common/Defs.h ../../../Common/MyException.h \ + ../../../Common/MyWindows.h ../../../Common/StringConvert.h \ + ../../../Windows/System.h ../../../Windows/../Common/Types.h \ + ../../../myWindows/myPrivate.h ../../UI/Common/ExitCode.h \ + ../../UI/Common/Extract.h ../../../Windows/FileFind.h \ + ../../../Windows/../Common/MyString.h ../../../Windows/FileName.h \ + ../../../Windows/../../C/Types.h ../../../Windows/Defs.h \ + ../../../Windows/../Common/MyWindows.h \ + ../../UI/Common/../../Archive/IArchive.h \ + ../../UI/Common/../../Archive/../IProgress.h \ + ../../UI/Common/../../Archive/../../Common/MyUnknown.h \ + ../../UI/Common/../../Archive/../../Common/MyWindows.h \ + ../../UI/Common/../../Archive/../../Common/Types.h \ + ../../UI/Common/../../Archive/../IDecl.h \ + ../../UI/Common/../../Archive/../IStream.h \ + ../../UI/Common/../../Archive/../PropID.h \ + ../../UI/Common/ArchiveExtractCallback.h ../../../Common/MyCom.h \ + ../../../Common/Wildcard.h ../../UI/Common/../../IPassword.h \ + ../../UI/Common/../../../Common/MyUnknown.h \ + ../../UI/Common/../../../Common/Types.h ../../UI/Common/../../IDecl.h \ + ../../UI/Common/../../Common/FileStreams.h \ + ../../UI/Common/../../Common/../../Windows/FileIO.h \ + ../../../Common/MyString.h \ + ../../UI/Common/../../Common/../../Common/MyCom.h \ + ../../UI/Common/../../Common/../IStream.h \ + ../../UI/Common/../../Common/ProgressUtils.h \ + ../../UI/Common/../../Common/../ICoder.h \ + ../../UI/Common/../../Common/../IStream.h \ + ../../UI/Common/../../Common/../IProgress.h \ + ../../UI/Common/../../Archive/Common/OutStreamWithCRC.h \ + ../../UI/Common/../../Archive/Common/../../../../C/7zCrc.h \ + ../../UI/Common/../../Archive/Common/../../../../C/Types.h \ + ../../UI/Common/../../Archive/Common/../../../Common/MyCom.h \ + ../../UI/Common/../../Archive/Common/../../IStream.h \ + ../../UI/Common/ExtractMode.h ../../UI/Common/IFileExtractCallback.h \ + ../../UI/Common/../../IDecl.h ../../UI/Common/OpenArchive.h \ + ../../UI/Common/ArchiveOpenCallback.h ../../UI/Common/LoadCodecs.h \ + ../../UI/Common/../../../Common/Types.h \ + ../../UI/Common/../../../Common/MyCom.h \ + ../../UI/Common/../../../Common/MyString.h \ + ../../UI/Common/../../../Common/Buffer.h \ + ../../UI/Common/../../../Common/Defs.h ../../UI/Common/../../ICoder.h \ + ../../UI/Common/Property.h ../../UI/Common/../Common/LoadCodecs.h \ + ../../UI/Console/ExtractCallbackConsole.h ../../../Common/StdOutStream.h \ + ../../UI/Console/../../Common/FileStreams.h \ + ../../UI/Console/../../IPassword.h \ + ../../UI/Console/../../Archive/IArchive.h \ + ../../UI/Console/../Common/ArchiveExtractCallback.h \ + ../../UI/Console/List.h ../../UI/Console/../Common/LoadCodecs.h \ + ../../UI/Console/OpenCallbackConsole.h \ + ../../UI/Console/../Common/ArchiveOpenCallback.h ../../MyVersion.h +ConsoleClose.o: ../../UI/Console/ConsoleClose.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../UI/Console/ConsoleClose.h +ExtractCallbackConsole.o: ../../UI/Console/ExtractCallbackConsole.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../UI/Console/ExtractCallbackConsole.h ../../../Common/MyString.h \ + ../../../Common/MyVector.h ../../../Common/Defs.h \ + ../../../Common/StdOutStream.h \ + ../../UI/Console/../../Common/FileStreams.h \ + ../../UI/Console/../../Common/../../Windows/FileIO.h \ + ../../UI/Console/../../Common/../../Common/MyCom.h \ + ../../UI/Console/../../Common/../../Common/MyWindows.h \ + ../../UI/Console/../../Common/../IStream.h \ + ../../UI/Console/../../Common/../../Common/MyUnknown.h \ + ../../UI/Console/../../Common/../../Common/Types.h \ + ../../UI/Console/../../Common/../IDecl.h \ + ../../UI/Console/../../IPassword.h \ + ../../UI/Console/../../../Common/MyUnknown.h \ + ../../UI/Console/../../../Common/Types.h ../../UI/Console/../../IDecl.h \ + ../../UI/Console/../../Archive/IArchive.h \ + ../../UI/Console/../../Archive/../IProgress.h \ + ../../UI/Console/../../Archive/../../Common/MyUnknown.h \ + ../../UI/Console/../../Archive/../../Common/Types.h \ + ../../UI/Console/../../Archive/../IDecl.h \ + ../../UI/Console/../../Archive/../IStream.h \ + ../../UI/Console/../../Archive/../PropID.h \ + ../../UI/Console/../Common/ArchiveExtractCallback.h \ + ../../../Common/MyCom.h ../../../Common/Wildcard.h \ + ../../../Common/MyString.h ../../UI/Console/../Common/../../IPassword.h \ + ../../UI/Console/../Common/../../Common/FileStreams.h \ + ../../UI/Console/../Common/../../Common/ProgressUtils.h \ + ../../UI/Console/../Common/../../Common/../../Common/MyCom.h \ + ../../UI/Console/../Common/../../Common/../ICoder.h \ + ../../UI/Console/../Common/../../Common/../IStream.h \ + ../../UI/Console/../Common/../../Common/../IProgress.h \ + ../../UI/Console/../Common/../../Archive/IArchive.h \ + ../../UI/Console/../Common/../../Archive/Common/OutStreamWithCRC.h \ + ../../UI/Console/../Common/../../Archive/Common/../../../../C/7zCrc.h \ + ../../UI/Console/../Common/../../Archive/Common/../../../../C/Types.h \ + ../../UI/Console/../Common/../../Archive/Common/../../../Common/MyCom.h \ + ../../UI/Console/../Common/../../Archive/Common/../../IStream.h \ + ../../UI/Console/../Common/ExtractMode.h \ + ../../UI/Console/../Common/IFileExtractCallback.h \ + ../../UI/Console/../Common/../../IDecl.h \ + ../../UI/Console/../Common/OpenArchive.h ../../../Windows/FileFind.h \ + ../../../Windows/../Common/MyString.h ../../../Windows/FileName.h \ + ../../../Windows/../../C/Types.h ../../../Windows/Defs.h \ + ../../../Windows/../Common/MyWindows.h \ + ../../UI/Console/../Common/ArchiveOpenCallback.h \ + ../../UI/Console/../Common/LoadCodecs.h \ + ../../UI/Console/../Common/../../../Common/Types.h \ + ../../UI/Console/../Common/../../../Common/MyCom.h \ + ../../UI/Console/../Common/../../../Common/MyString.h \ + ../../UI/Console/../Common/../../../Common/Buffer.h \ + ../../UI/Console/../Common/../../../Common/Defs.h \ + ../../UI/Console/../Common/../../ICoder.h \ + ../../UI/Console/UserInputUtils.h ../../UI/Console/ConsoleClose.h \ + ../../../Windows/FileDir.h ../../../Windows/Time.h \ + ../../../Windows/Defs.h ../../../Windows/PropVariant.h \ + ../../../Windows/../Common/Types.h ../../../Windows/Error.h \ + ../../../Windows/PropVariantConversions.h \ + ../../UI/Console/../../Common/FilePathAutoRename.h \ + ../../UI/Console/../Common/ExtractingFilePath.h +List.o: ../../UI/Console/List.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../../Common/IntToString.h \ + ../../../Common/MyCom.h ../../../Common/MyWindows.h \ + ../../../Common/StdOutStream.h ../../../Common/StringConvert.h \ + ../../../Common/MyString.h ../../../Common/MyVector.h \ + ../../../Common/Defs.h ../../../Windows/Error.h \ + ../../../Common/MyString.h ../../../Windows/FileDir.h \ + ../../../Windows/../Common/MyString.h ../../../Windows/Defs.h \ + ../../../Windows/../Common/MyWindows.h ../../../Windows/PropVariant.h \ + ../../../Windows/../Common/Types.h \ + ../../../Windows/PropVariantConversions.h \ + ../../UI/Console/../../Archive/IArchive.h \ + ../../UI/Console/../../Archive/../IProgress.h \ + ../../UI/Console/../../Archive/../../Common/MyUnknown.h \ + ../../UI/Console/../../Archive/../../Common/MyWindows.h \ + ../../UI/Console/../../Archive/../../Common/Types.h \ + ../../UI/Console/../../Archive/../IDecl.h \ + ../../UI/Console/../../Archive/../IStream.h \ + ../../UI/Console/../../Archive/../PropID.h \ + ../../UI/Console/../Common/OpenArchive.h ../../../Windows/FileFind.h \ + ../../../Windows/FileName.h ../../../Windows/../../C/Types.h \ + ../../UI/Console/../Common/../../Archive/IArchive.h \ + ../../UI/Console/../Common/ArchiveOpenCallback.h \ + ../../UI/Console/../Common/../../IPassword.h \ + ../../UI/Console/../Common/../../../Common/MyUnknown.h \ + ../../UI/Console/../Common/../../../Common/Types.h \ + ../../UI/Console/../Common/../../IDecl.h \ + ../../UI/Console/../Common/LoadCodecs.h \ + ../../UI/Console/../Common/../../../Common/Types.h \ + ../../UI/Console/../Common/../../../Common/MyCom.h \ + ../../UI/Console/../Common/../../../Common/MyString.h \ + ../../UI/Console/../Common/../../../Common/Buffer.h \ + ../../UI/Console/../Common/../../../Common/Defs.h \ + ../../UI/Console/../Common/../../ICoder.h \ + ../../UI/Console/../Common/../../IStream.h \ + ../../UI/Console/../Common/PropIDUtils.h ../../UI/Console/ConsoleClose.h \ + ../../UI/Console/List.h ../../../Common/Wildcard.h \ + ../../UI/Console/../Common/LoadCodecs.h \ + ../../UI/Console/OpenCallbackConsole.h \ + ../../UI/Console/../Common/ArchiveOpenCallback.h +MainAr.o: ../../UI/Console/MainAr.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../../Common/NewHandler.h \ + ../../../Common/MyException.h ../../../Common/MyWindows.h \ + ../../../Common/StdOutStream.h ../../../Windows/Error.h \ + ../../../Common/MyString.h ../../../Common/MyVector.h \ + ../../../Common/Defs.h ../../../Windows/NtCheck.h \ + ../../UI/Console/../Common/ArchiveCommandLine.h \ + ../../../Common/CommandLineParser.h ../../../Common/MyString.h \ + ../../../Common/Wildcard.h ../../UI/Console/../Common/Extract.h \ + ../../../Windows/FileFind.h ../../../Windows/../Common/MyString.h \ + ../../../Windows/FileName.h ../../../Windows/../../C/Types.h \ + ../../../Windows/Defs.h ../../../Windows/../Common/MyWindows.h \ + ../../UI/Console/../Common/../../Archive/IArchive.h \ + ../../UI/Console/../Common/../../Archive/../IProgress.h \ + ../../UI/Console/../Common/../../Archive/../../Common/MyUnknown.h \ + ../../UI/Console/../Common/../../Archive/../../Common/MyWindows.h \ + ../../UI/Console/../Common/../../Archive/../../Common/Types.h \ + ../../UI/Console/../Common/../../Archive/../IDecl.h \ + ../../UI/Console/../Common/../../Archive/../IStream.h \ + ../../UI/Console/../Common/../../Archive/../PropID.h \ + ../../UI/Console/../Common/ArchiveExtractCallback.h \ + ../../../Common/MyCom.h ../../UI/Console/../Common/../../IPassword.h \ + ../../UI/Console/../Common/../../../Common/MyUnknown.h \ + ../../UI/Console/../Common/../../../Common/Types.h \ + ../../UI/Console/../Common/../../IDecl.h \ + ../../UI/Console/../Common/../../Common/FileStreams.h \ + ../../UI/Console/../Common/../../Common/../../Windows/FileIO.h \ + ../../UI/Console/../Common/../../Common/../../Common/MyCom.h \ + ../../UI/Console/../Common/../../Common/../IStream.h \ + ../../UI/Console/../Common/../../Common/ProgressUtils.h \ + ../../UI/Console/../Common/../../Common/../ICoder.h \ + ../../UI/Console/../Common/../../Common/../IStream.h \ + ../../UI/Console/../Common/../../Common/../IProgress.h \ + ../../UI/Console/../Common/../../Archive/Common/OutStreamWithCRC.h \ + ../../UI/Console/../Common/../../Archive/Common/../../../../C/7zCrc.h \ + ../../UI/Console/../Common/../../Archive/Common/../../../../C/Types.h \ + ../../UI/Console/../Common/../../Archive/Common/../../../Common/MyCom.h \ + ../../UI/Console/../Common/../../Archive/Common/../../IStream.h \ + ../../UI/Console/../Common/ExtractMode.h \ + ../../UI/Console/../Common/IFileExtractCallback.h \ + ../../UI/Console/../Common/../../IDecl.h \ + ../../UI/Console/../Common/OpenArchive.h \ + ../../UI/Console/../Common/ArchiveOpenCallback.h \ + ../../UI/Console/../Common/LoadCodecs.h \ + ../../UI/Console/../Common/../../../Common/Types.h \ + ../../UI/Console/../Common/../../../Common/MyCom.h \ + ../../UI/Console/../Common/../../../Common/MyString.h \ + ../../UI/Console/../Common/../../../Common/Buffer.h \ + ../../UI/Console/../Common/../../../Common/Defs.h \ + ../../UI/Console/../Common/../../ICoder.h \ + ../../UI/Console/../Common/Property.h \ + ../../UI/Console/../Common/../Common/LoadCodecs.h \ + ../../UI/Console/../Common/Update.h \ + ../../UI/Console/../Common/UpdateAction.h \ + ../../UI/Console/../Common/UpdateCallback.h \ + ../../UI/Console/../Common/../Common/UpdatePair.h \ + ../../UI/Console/../Common/../Common/DirItem.h \ + ../../UI/Console/../Common/../Common/../../Archive/IArchive.h \ + ../../UI/Console/../Common/../Common/UpdateAction.h \ + ../../UI/Console/../Common/../Common/UpdateProduce.h \ + ../../UI/Console/../Common/../Common/UpdatePair.h \ + ../../UI/Console/../Common/ExitCode.h ../../UI/Console/ConsoleClose.h +OpenCallbackConsole.o: ../../UI/Console/OpenCallbackConsole.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../UI/Console/OpenCallbackConsole.h ../../../Common/StdOutStream.h \ + ../../UI/Console/../Common/ArchiveOpenCallback.h ../../../Common/MyCom.h \ + ../../../Common/MyWindows.h ../../../Common/MyString.h \ + ../../../Common/MyVector.h ../../../Common/Defs.h \ + ../../../Windows/FileFind.h ../../../Windows/../Common/MyString.h \ + ../../../Windows/FileName.h ../../../Windows/../../C/Types.h \ + ../../../Windows/Defs.h ../../../Windows/../Common/MyWindows.h \ + ../../UI/Console/../Common/../../IPassword.h \ + ../../UI/Console/../Common/../../../Common/MyUnknown.h \ + ../../UI/Console/../Common/../../../Common/MyWindows.h \ + ../../UI/Console/../Common/../../../Common/Types.h \ + ../../UI/Console/../Common/../../IDecl.h \ + ../../UI/Console/../Common/../../Archive/IArchive.h \ + ../../UI/Console/../Common/../../Archive/../IProgress.h \ + ../../UI/Console/../Common/../../Archive/../../Common/MyUnknown.h \ + ../../UI/Console/../Common/../../Archive/../../Common/Types.h \ + ../../UI/Console/../Common/../../Archive/../IDecl.h \ + ../../UI/Console/../Common/../../Archive/../IStream.h \ + ../../UI/Console/../Common/../../Archive/../PropID.h \ + ../../UI/Console/ConsoleClose.h ../../UI/Console/UserInputUtils.h +UserInputUtils.o: ../../UI/Console/UserInputUtils.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../../Common/StdInStream.h ../../../Common/MyString.h \ + ../../../Common/MyVector.h ../../../Common/Defs.h \ + ../../../Common/StringConvert.h ../../../Common/MyWindows.h \ + ../../UI/Console/UserInputUtils.h ../../../Common/StdOutStream.h \ + ../../../Common/MyException.h +CommandLineParser.o: ../../../Common/CommandLineParser.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../../Common/CommandLineParser.h ../../../Common/MyString.h \ + ../../../Common/MyVector.h ../../../Common/Defs.h +CRC.o: ../../../Common/CRC.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../../Common/../../C/7zCrc.h \ + ../../../Common/../../C/Types.h +IntToString.o: ../../../Common/IntToString.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../../Common/IntToString.h +StdInStream.o: ../../../Common/StdInStream.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../../Common/StdInStream.h ../../../Common/MyString.h \ + ../../../Common/MyVector.h ../../../Common/Defs.h \ + ../../../Common/StringConvert.h ../../../Common/MyWindows.h \ + ../../../myWindows/myPrivate.h +StdOutStream.o: ../../../Common/StdOutStream.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../../Common/StdOutStream.h ../../../Common/IntToString.h \ + ../../../Common/StringConvert.h ../../../Common/MyWindows.h \ + ../../../Common/MyString.h ../../../Common/MyVector.h \ + ../../../Common/Defs.h +MyString.o: ../../../Common/MyString.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../../Common/StringConvert.h \ + ../../../Common/MyWindows.h ../../../Common/MyString.h \ + ../../../Common/MyVector.h ../../../Common/Defs.h \ + ../../../myWindows/myPrivate.h +MyWindows.o: ../../../Common/MyWindows.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../../Common/MyWindows.h +StringConvert.o: ../../../Common/StringConvert.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../../Common/StringConvert.h ../../../Common/MyWindows.h \ + ../../../Common/MyString.h ../../../Common/MyVector.h \ + ../../../Common/Defs.h +UTFConvert.o: ../../../Common/UTFConvert.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../../Common/UTFConvert.h \ + ../../../Common/MyString.h ../../../Common/MyVector.h \ + ../../../Common/Defs.h +MyVector.o: ../../../Common/MyVector.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../../Common/MyVector.h \ + ../../../Common/Defs.h +Wildcard.o: ../../../Common/Wildcard.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../../Common/Wildcard.h \ + ../../../Common/MyString.h ../../../Common/MyVector.h \ + ../../../Common/Defs.h +Error.o: ../../../Windows/Error.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../../Windows/Error.h \ + ../../../Common/MyString.h ../../../Common/MyVector.h \ + ../../../Common/Defs.h ../../../Common/StringConvert.h \ + ../../../Common/MyWindows.h ../../../Common/MyString.h +FileDir.o: ../../../Windows/FileDir.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../../Windows/FileDir.h \ + ../../../Windows/../Common/MyString.h \ + ../../../Windows/../Common/MyVector.h ../../../Windows/../Common/Defs.h \ + ../../../Windows/Defs.h ../../../Windows/../Common/MyWindows.h \ + ../../../Windows/FileName.h ../../../Windows/../../C/Types.h \ + ../../../Windows/FileFind.h ../../../Windows/../Common/StringConvert.h \ + ../../../Windows/../Common/MyWindows.h \ + ../../../Windows/../Common/MyString.h ../../../Windows/../Common/Types.h \ + ../../../Windows/../Common/IntToString.h ../../../myWindows/myPrivate.h \ + ../../../Windows/Synchronization.h ../../../Windows/../../C/Threads.h \ + ../../../Windows/../../C/Types.h ../../../Windows/Synchronization2.h +FileFind.o: ../../../Windows/FileFind.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../../Windows/FileFind.h \ + ../../../Windows/../Common/MyString.h \ + ../../../Windows/../Common/MyVector.h ../../../Windows/../Common/Defs.h \ + ../../../Windows/FileName.h ../../../Windows/../../C/Types.h \ + ../../../Windows/Defs.h ../../../Windows/../Common/MyWindows.h \ + ../../../Windows/../Common/StringConvert.h \ + ../../../Windows/../Common/MyWindows.h \ + ../../../Windows/../Common/MyString.h ../../../Windows/../Common/Types.h \ + ../../../myWindows/myPrivate.h +FileIO.o: ../../../Windows/FileIO.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../../Windows/FileIO.h \ + ../../../Common/MyString.h ../../../Common/MyVector.h \ + ../../../Common/Defs.h ../../../Windows/Defs.h \ + ../../../Windows/../Common/MyWindows.h \ + ../../../Windows/../Common/StringConvert.h \ + ../../../Windows/../Common/MyWindows.h \ + ../../../Windows/../Common/MyString.h ../../../Windows/../Common/Types.h \ + ../../../myWindows/myPrivate.h +FileName.o: ../../../Windows/FileName.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../../Windows/FileName.h \ + ../../../Windows/../../C/Types.h ../../../Windows/../Common/MyString.h \ + ../../../Windows/../Common/MyVector.h ../../../Windows/../Common/Defs.h \ + ../../../Common/Wildcard.h ../../../Common/MyString.h +PropVariant.o: ../../../Windows/PropVariant.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../../Windows/PropVariant.h ../../../Windows/../Common/MyWindows.h \ + ../../../Windows/../Common/Types.h ../../../Windows/../Common/Defs.h +PropVariantConversions.o: ../../../Windows/PropVariantConversions.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../../Common/IntToString.h ../../../Common/StringConvert.h \ + ../../../Common/MyWindows.h ../../../Common/MyString.h \ + ../../../Common/MyVector.h ../../../Common/Defs.h \ + ../../../Windows/Defs.h ../../../Windows/../Common/MyWindows.h \ + ../../../Windows/PropVariantConversions.h ../../../Common/MyString.h +Synchronization.o: ../../../Windows/Synchronization.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../../Windows/Synchronization.h ../../../Windows/Defs.h \ + ../../../Windows/../Common/MyWindows.h \ + ../../../Windows/../../C/Threads.h ../../../Windows/../../C/Types.h \ + ../../../Windows/Synchronization2.h +System.o: ../../../Windows/System.cpp ../../../Common/Types.h \ + ../../../Common/../../C/Types.h +CreateCoder.o: ../../Common/CreateCoder.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../Common/../../Windows/Defs.h \ + ../../Common/../../Windows/../Common/MyWindows.h \ + ../../Common/../../Windows/PropVariant.h \ + ../../Common/../../Windows/../Common/Types.h ../../Common/CreateCoder.h \ + ../../Common/../../Common/MyCom.h ../../Common/../../Common/MyWindows.h \ + ../../Common/../../Common/MyString.h \ + ../../Common/../../Common/MyVector.h ../../Common/../../Common/Defs.h \ + ../../Common/../ICoder.h ../../Common/../IStream.h \ + ../../Common/../../Common/MyUnknown.h ../../Common/../../Common/Types.h \ + ../../Common/../IDecl.h ../../Common/MethodId.h \ + ../../Common/../../Common/Types.h ../../Common/FilterCoder.h \ + ../../Common/../IPassword.h ../../Common/RegisterCodec.h \ + ../../Common/../Common/MethodId.h +CWrappers.o: ../../Common/CWrappers.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../Common/../../../C/Alloc.h \ + ../../Common/CWrappers.h ../../Common/../ICoder.h \ + ../../Common/../IStream.h ../../Common/../../Common/MyUnknown.h \ + ../../Common/../../Common/MyWindows.h ../../Common/../../Common/Types.h \ + ../../Common/../IDecl.h ../../Common/../../Common/MyCom.h \ + ../../Common/StreamUtils.h ../../Common/../IStream.h +FilePathAutoRename.o: ../../Common/FilePathAutoRename.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../../Common/Defs.h ../../../Common/IntToString.h \ + ../../../Windows/FileFind.h ../../../Windows/../Common/MyString.h \ + ../../../Windows/../Common/MyVector.h ../../../Windows/../Common/Defs.h \ + ../../../Windows/FileName.h ../../../Windows/../../C/Types.h \ + ../../../Windows/Defs.h ../../../Windows/../Common/MyWindows.h \ + ../../Common/FilePathAutoRename.h ../../../Common/MyString.h +FileStreams.o: ../../Common/FileStreams.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../Common/FileStreams.h \ + ../../Common/../../Windows/FileIO.h ../../../Common/MyString.h \ + ../../../Common/MyVector.h ../../../Common/Defs.h \ + ../../Common/../../Common/MyCom.h ../../Common/../../Common/MyWindows.h \ + ../../Common/../IStream.h ../../Common/../../Common/MyUnknown.h \ + ../../Common/../../Common/Types.h ../../Common/../IDecl.h +InBuffer.o: ../../Common/InBuffer.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../Common/../../../C/Alloc.h \ + ../../Common/InBuffer.h ../../Common/../IStream.h \ + ../../Common/../../Common/MyUnknown.h \ + ../../Common/../../Common/MyWindows.h ../../Common/../../Common/Types.h \ + ../../Common/../IDecl.h ../../Common/../../Common/MyCom.h \ + ../../Common/../../Common/MyException.h +FilterCoder.o: ../../Common/FilterCoder.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../Common/../../../C/Alloc.h \ + ../../Common/../../Common/Defs.h ../../Common/FilterCoder.h \ + ../../Common/../../Common/MyCom.h ../../Common/../../Common/MyWindows.h \ + ../../Common/../ICoder.h ../../Common/../IStream.h \ + ../../Common/../../Common/MyUnknown.h ../../Common/../../Common/Types.h \ + ../../Common/../IDecl.h ../../Common/../IPassword.h \ + ../../Common/StreamUtils.h ../../Common/../IStream.h +LimitedStreams.o: ../../Common/LimitedStreams.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../Common/LimitedStreams.h ../../Common/../../Common/MyCom.h \ + ../../Common/../../Common/MyWindows.h \ + ../../Common/../../Common/MyVector.h ../../Common/../../Common/Defs.h \ + ../../Common/../IStream.h ../../Common/../../Common/MyUnknown.h \ + ../../Common/../../Common/Types.h ../../Common/../IDecl.h \ + ../../Common/../../Common/Defs.h +LockedStream.o: ../../Common/LockedStream.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../Common/LockedStream.h \ + ../../Common/../../Windows/Synchronization.h \ + ../../Common/../../Windows/Defs.h \ + ../../Common/../../Windows/../Common/MyWindows.h \ + ../../Common/../../Windows/../../C/Threads.h \ + ../../Common/../../Windows/../../C/Types.h \ + ../../Common/../../Windows/Synchronization2.h \ + ../../Common/../../Common/MyCom.h ../../Common/../../Common/MyWindows.h \ + ../../Common/../IStream.h ../../Common/../../Common/MyUnknown.h \ + ../../Common/../../Common/Types.h ../../Common/../IDecl.h +OutBuffer.o: ../../Common/OutBuffer.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../Common/../../../C/Alloc.h \ + ../../Common/OutBuffer.h ../../Common/../IStream.h \ + ../../Common/../../Common/MyUnknown.h \ + ../../Common/../../Common/MyWindows.h ../../Common/../../Common/Types.h \ + ../../Common/../IDecl.h ../../Common/../../Common/MyCom.h \ + ../../Common/../../Common/MyException.h +ProgressUtils.o: ../../Common/ProgressUtils.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../Common/ProgressUtils.h ../../Common/../../Common/MyCom.h \ + ../../Common/../../Common/MyWindows.h ../../Common/../ICoder.h \ + ../../Common/../IStream.h ../../Common/../../Common/MyUnknown.h \ + ../../Common/../../Common/Types.h ../../Common/../IDecl.h \ + ../../Common/../IProgress.h +StreamBinder.o: ../../Common/StreamBinder.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../Common/StreamBinder.h \ + ../../Common/../IStream.h ../../Common/../../Common/MyUnknown.h \ + ../../Common/../../Common/MyWindows.h ../../Common/../../Common/Types.h \ + ../../Common/../IDecl.h ../../Common/../../Windows/Synchronization.h \ + ../../Common/../../Windows/Defs.h \ + ../../Common/../../Windows/../Common/MyWindows.h \ + ../../Common/../../Windows/../../C/Threads.h \ + ../../Common/../../Windows/../../C/Types.h \ + ../../Common/../../Windows/Synchronization2.h \ + ../../Common/../../Common/Defs.h ../../Common/../../Common/MyCom.h +StreamObjects.o: ../../Common/StreamObjects.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../Common/../../../C/Alloc.h ../../Common/StreamObjects.h \ + ../../Common/../../Common/Buffer.h ../../Common/../../Common/Defs.h \ + ../../Common/../../Common/MyCom.h ../../Common/../../Common/MyWindows.h \ + ../../Common/../IStream.h ../../Common/../../Common/MyUnknown.h \ + ../../Common/../../Common/Types.h ../../Common/../IDecl.h +StreamUtils.o: ../../Common/StreamUtils.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../Common/StreamUtils.h \ + ../../Common/../IStream.h ../../Common/../../Common/MyUnknown.h \ + ../../Common/../../Common/MyWindows.h ../../Common/../../Common/Types.h \ + ../../Common/../IDecl.h +VirtThread.o: ../../Common/VirtThread.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../Common/VirtThread.h \ + ../../Common/../../Windows/Synchronization.h \ + ../../Common/../../Windows/Defs.h \ + ../../Common/../../Windows/../Common/MyWindows.h \ + ../../Common/../../Windows/../../C/Threads.h \ + ../../Common/../../Windows/../../C/Types.h \ + ../../Common/../../Windows/Synchronization2.h \ + ../../Common/../../Windows/Thread.h +ArchiveExtractCallback.o: ../../UI/Common/ArchiveExtractCallback.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../../Common/ComTry.h ../../../Common/MyWindows.h \ + ../../../Common/Wildcard.h ../../../Common/MyString.h \ + ../../../Common/MyVector.h ../../../Common/Defs.h \ + ../../../Windows/FileDir.h ../../../Windows/../Common/MyString.h \ + ../../../Windows/Defs.h ../../../Windows/../Common/MyWindows.h \ + ../../../Windows/FileFind.h ../../../Windows/FileName.h \ + ../../../Windows/../../C/Types.h ../../../Windows/PropVariant.h \ + ../../../Windows/../Common/Types.h \ + ../../../Windows/PropVariantConversions.h ../../../Common/MyString.h \ + ../../UI/Common/../../Common/FilePathAutoRename.h \ + ../../UI/Common/../Common/ExtractingFilePath.h \ + ../../UI/Common/ArchiveExtractCallback.h ../../../Common/MyCom.h \ + ../../UI/Common/../../IPassword.h \ + ../../UI/Common/../../../Common/MyUnknown.h \ + ../../UI/Common/../../../Common/MyWindows.h \ + ../../UI/Common/../../../Common/Types.h ../../UI/Common/../../IDecl.h \ + ../../UI/Common/../../Common/FileStreams.h \ + ../../UI/Common/../../Common/../../Windows/FileIO.h \ + ../../UI/Common/../../Common/../../Common/MyCom.h \ + ../../UI/Common/../../Common/../IStream.h \ + ../../UI/Common/../../Common/../../Common/MyUnknown.h \ + ../../UI/Common/../../Common/../../Common/Types.h \ + ../../UI/Common/../../Common/../IDecl.h \ + ../../UI/Common/../../Common/ProgressUtils.h \ + ../../UI/Common/../../Common/../ICoder.h \ + ../../UI/Common/../../Common/../IStream.h \ + ../../UI/Common/../../Common/../IProgress.h \ + ../../UI/Common/../../Archive/IArchive.h \ + ../../UI/Common/../../Archive/../IProgress.h \ + ../../UI/Common/../../Archive/../IStream.h \ + ../../UI/Common/../../Archive/../PropID.h \ + ../../UI/Common/../../Archive/Common/OutStreamWithCRC.h \ + ../../UI/Common/../../Archive/Common/../../../../C/7zCrc.h \ + ../../UI/Common/../../Archive/Common/../../../../C/Types.h \ + ../../UI/Common/../../Archive/Common/../../../Common/MyCom.h \ + ../../UI/Common/../../Archive/Common/../../IStream.h \ + ../../UI/Common/ExtractMode.h ../../UI/Common/IFileExtractCallback.h \ + ../../UI/Common/../../IDecl.h ../../UI/Common/OpenArchive.h \ + ../../UI/Common/ArchiveOpenCallback.h ../../UI/Common/LoadCodecs.h \ + ../../UI/Common/../../../Common/Types.h \ + ../../UI/Common/../../../Common/MyCom.h \ + ../../UI/Common/../../../Common/MyString.h \ + ../../UI/Common/../../../Common/Buffer.h \ + ../../UI/Common/../../../Common/Defs.h ../../UI/Common/../../ICoder.h +ArchiveOpenCallback.o: ../../UI/Common/ArchiveOpenCallback.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../../Common/StringConvert.h ../../../Common/MyWindows.h \ + ../../../Common/MyString.h ../../../Common/MyVector.h \ + ../../../Common/Defs.h ../../../Common/ComTry.h \ + ../../../Windows/PropVariant.h ../../../Windows/../Common/MyWindows.h \ + ../../../Windows/../Common/Types.h \ + ../../UI/Common/../../Common/FileStreams.h \ + ../../UI/Common/../../Common/../../Windows/FileIO.h \ + ../../../Common/MyString.h \ + ../../UI/Common/../../Common/../../Common/MyCom.h \ + ../../UI/Common/../../Common/../../Common/MyWindows.h \ + ../../UI/Common/../../Common/../IStream.h \ + ../../UI/Common/../../Common/../../Common/MyUnknown.h \ + ../../UI/Common/../../Common/../../Common/Types.h \ + ../../UI/Common/../../Common/../IDecl.h \ + ../../UI/Common/ArchiveOpenCallback.h ../../../Common/MyCom.h \ + ../../../Windows/FileFind.h ../../../Windows/../Common/MyString.h \ + ../../../Windows/FileName.h ../../../Windows/../../C/Types.h \ + ../../../Windows/Defs.h ../../UI/Common/../../IPassword.h \ + ../../UI/Common/../../../Common/MyUnknown.h \ + ../../UI/Common/../../../Common/Types.h ../../UI/Common/../../IDecl.h \ + ../../UI/Common/../../Archive/IArchive.h \ + ../../UI/Common/../../Archive/../IProgress.h \ + ../../UI/Common/../../Archive/../../Common/MyUnknown.h \ + ../../UI/Common/../../Archive/../../Common/Types.h \ + ../../UI/Common/../../Archive/../IDecl.h \ + ../../UI/Common/../../Archive/../IStream.h \ + ../../UI/Common/../../Archive/../PropID.h +DefaultName.o: ../../UI/Common/DefaultName.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../UI/Common/DefaultName.h ../../../Common/MyString.h \ + ../../../Common/MyVector.h ../../../Common/Defs.h +Extract.o: ../../UI/Common/Extract.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../../Windows/FileDir.h \ + ../../../Windows/../Common/MyString.h \ + ../../../Windows/../Common/MyVector.h ../../../Windows/../Common/Defs.h \ + ../../../Windows/Defs.h ../../../Windows/../Common/MyWindows.h \ + ../../../Windows/PropVariant.h ../../../Windows/../Common/Types.h \ + ../../../Windows/PropVariantConversions.h ../../../Common/MyString.h \ + ../../UI/Common/../Common/ExtractingFilePath.h ../../UI/Common/Extract.h \ + ../../../Windows/FileFind.h ../../../Windows/FileName.h \ + ../../../Windows/../../C/Types.h \ + ../../UI/Common/../../Archive/IArchive.h \ + ../../UI/Common/../../Archive/../IProgress.h \ + ../../UI/Common/../../Archive/../../Common/MyUnknown.h \ + ../../UI/Common/../../Archive/../../Common/MyWindows.h \ + ../../UI/Common/../../Archive/../../Common/Types.h \ + ../../UI/Common/../../Archive/../IDecl.h \ + ../../UI/Common/../../Archive/../IStream.h \ + ../../UI/Common/../../Archive/../PropID.h \ + ../../UI/Common/ArchiveExtractCallback.h ../../../Common/MyCom.h \ + ../../../Common/MyWindows.h ../../../Common/Wildcard.h \ + ../../../Common/MyString.h ../../UI/Common/../../IPassword.h \ + ../../UI/Common/../../../Common/MyUnknown.h \ + ../../UI/Common/../../../Common/Types.h ../../UI/Common/../../IDecl.h \ + ../../UI/Common/../../Common/FileStreams.h \ + ../../UI/Common/../../Common/../../Windows/FileIO.h \ + ../../UI/Common/../../Common/../../Common/MyCom.h \ + ../../UI/Common/../../Common/../IStream.h \ + ../../UI/Common/../../Common/ProgressUtils.h \ + ../../UI/Common/../../Common/../ICoder.h \ + ../../UI/Common/../../Common/../IStream.h \ + ../../UI/Common/../../Common/../IProgress.h \ + ../../UI/Common/../../Archive/Common/OutStreamWithCRC.h \ + ../../UI/Common/../../Archive/Common/../../../../C/7zCrc.h \ + ../../UI/Common/../../Archive/Common/../../../../C/Types.h \ + ../../UI/Common/../../Archive/Common/../../../Common/MyCom.h \ + ../../UI/Common/../../Archive/Common/../../IStream.h \ + ../../UI/Common/ExtractMode.h ../../UI/Common/IFileExtractCallback.h \ + ../../UI/Common/../../IDecl.h ../../UI/Common/OpenArchive.h \ + ../../UI/Common/ArchiveOpenCallback.h ../../UI/Common/LoadCodecs.h \ + ../../UI/Common/../../../Common/Types.h \ + ../../UI/Common/../../../Common/MyCom.h \ + ../../UI/Common/../../../Common/MyString.h \ + ../../UI/Common/../../../Common/Buffer.h \ + ../../UI/Common/../../../Common/Defs.h ../../UI/Common/../../ICoder.h \ + ../../UI/Common/Property.h ../../UI/Common/../Common/LoadCodecs.h \ + ../../UI/Common/SetProperties.h +ExtractingFilePath.o: ../../UI/Common/ExtractingFilePath.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../UI/Common/../../../../C/Types.h ../../../Common/Wildcard.h \ + ../../../Common/MyString.h ../../../Common/MyVector.h \ + ../../../Common/Defs.h ../../UI/Common/ExtractingFilePath.h \ + ../../../Common/MyString.h +LoadCodecs.o: ../../UI/Common/LoadCodecs.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../UI/Common/LoadCodecs.h \ + ../../UI/Common/../../../Common/Types.h \ + ../../UI/Common/../../../Common/MyCom.h \ + ../../UI/Common/../../../Common/MyWindows.h \ + ../../UI/Common/../../../Common/MyString.h \ + ../../UI/Common/../../../Common/MyVector.h \ + ../../UI/Common/../../../Common/Defs.h \ + ../../UI/Common/../../../Common/Buffer.h ../../UI/Common/../../ICoder.h \ + ../../UI/Common/../../IStream.h \ + ../../UI/Common/../../../Common/MyUnknown.h \ + ../../UI/Common/../../../Common/Types.h ../../UI/Common/../../IDecl.h \ + ../../UI/Common/../../Archive/IArchive.h \ + ../../UI/Common/../../Archive/../IProgress.h \ + ../../UI/Common/../../Archive/../../Common/MyUnknown.h \ + ../../UI/Common/../../Archive/../../Common/Types.h \ + ../../UI/Common/../../Archive/../IDecl.h \ + ../../UI/Common/../../Archive/../IStream.h \ + ../../UI/Common/../../Archive/../PropID.h \ + ../../UI/Common/../../../Windows/PropVariant.h \ + ../../UI/Common/../../../Windows/../Common/MyWindows.h \ + ../../UI/Common/../../../Windows/../Common/Types.h \ + ../../UI/Common/../../Common/RegisterArc.h \ + ../../UI/Common/../../Common/../Archive/IArchive.h +OpenArchive.o: ../../UI/Common/OpenArchive.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../../Common/Wildcard.h ../../../Common/MyString.h \ + ../../../Common/MyVector.h ../../../Common/Defs.h \ + ../../../Windows/FileDir.h ../../../Windows/../Common/MyString.h \ + ../../../Windows/Defs.h ../../../Windows/../Common/MyWindows.h \ + ../../../Windows/PropVariant.h ../../../Windows/../Common/Types.h \ + ../../UI/Common/../../Common/FileStreams.h \ + ../../UI/Common/../../Common/../../Windows/FileIO.h \ + ../../../Common/MyString.h \ + ../../UI/Common/../../Common/../../Common/MyCom.h \ + ../../UI/Common/../../Common/../../Common/MyWindows.h \ + ../../UI/Common/../../Common/../IStream.h \ + ../../UI/Common/../../Common/../../Common/MyUnknown.h \ + ../../UI/Common/../../Common/../../Common/Types.h \ + ../../UI/Common/../../Common/../IDecl.h \ + ../../UI/Common/../../Common/StreamUtils.h ../../UI/Common/DefaultName.h \ + ../../UI/Common/OpenArchive.h ../../../Windows/FileFind.h \ + ../../../Windows/FileName.h ../../../Windows/../../C/Types.h \ + ../../UI/Common/../../Archive/IArchive.h \ + ../../UI/Common/../../Archive/../IProgress.h \ + ../../UI/Common/../../Archive/../../Common/MyUnknown.h \ + ../../UI/Common/../../Archive/../../Common/Types.h \ + ../../UI/Common/../../Archive/../IDecl.h \ + ../../UI/Common/../../Archive/../IStream.h \ + ../../UI/Common/../../Archive/../PropID.h \ + ../../UI/Common/ArchiveOpenCallback.h ../../../Common/MyCom.h \ + ../../UI/Common/../../IPassword.h \ + ../../UI/Common/../../../Common/MyUnknown.h \ + ../../UI/Common/../../../Common/Types.h ../../UI/Common/../../IDecl.h \ + ../../UI/Common/LoadCodecs.h ../../UI/Common/../../../Common/Types.h \ + ../../UI/Common/../../../Common/MyCom.h \ + ../../UI/Common/../../../Common/MyString.h \ + ../../UI/Common/../../../Common/Buffer.h \ + ../../UI/Common/../../../Common/Defs.h ../../UI/Common/../../ICoder.h \ + ../../UI/Common/../../IStream.h +PropIDUtils.o: ../../UI/Common/PropIDUtils.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../../Common/IntToString.h ../../../Windows/FileFind.h \ + ../../../Windows/../Common/MyString.h \ + ../../../Windows/../Common/MyVector.h ../../../Windows/../Common/Defs.h \ + ../../../Windows/FileName.h ../../../Windows/../../C/Types.h \ + ../../../Windows/Defs.h ../../../Windows/../Common/MyWindows.h \ + ../../../Windows/PropVariantConversions.h ../../../Common/MyString.h \ + ../../UI/Common/../../PropID.h ../../UI/Common/PropIDUtils.h +CoderMixer2.o: ../../Archive/Common/CoderMixer2.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../Archive/Common/CoderMixer2.h \ + ../../Archive/Common/../../../Common/MyVector.h \ + ../../Archive/Common/../../../Common/Defs.h \ + ../../Archive/Common/../../../Common/Types.h \ + ../../Archive/Common/../../../Common/MyCom.h \ + ../../Archive/Common/../../../Common/MyWindows.h \ + ../../Archive/Common/../../ICoder.h ../../Archive/Common/../../IStream.h \ + ../../Archive/Common/../../../Common/MyUnknown.h \ + ../../Archive/Common/../../../Common/Types.h \ + ../../Archive/Common/../../IDecl.h +CoderMixer2MT.o: ../../Archive/Common/CoderMixer2MT.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../Archive/Common/CoderMixer2MT.h ../../Archive/Common/CoderMixer2.h \ + ../../Archive/Common/../../../Common/MyVector.h \ + ../../Archive/Common/../../../Common/Defs.h \ + ../../Archive/Common/../../../Common/Types.h \ + ../../Archive/Common/../../../Common/MyCom.h \ + ../../Archive/Common/../../../Common/MyWindows.h \ + ../../Archive/Common/../../ICoder.h ../../Archive/Common/../../IStream.h \ + ../../Archive/Common/../../../Common/MyUnknown.h \ + ../../Archive/Common/../../../Common/Types.h \ + ../../Archive/Common/../../IDecl.h \ + ../../Archive/Common/../../Common/StreamBinder.h \ + ../../Archive/Common/../../Common/../IStream.h \ + ../../Archive/Common/../../Common/../../Windows/Synchronization.h \ + ../../Archive/Common/../../Common/../../Windows/Defs.h \ + ../../Archive/Common/../../Common/../../Windows/../Common/MyWindows.h \ + ../../Archive/Common/../../Common/../../Windows/../../C/Threads.h \ + ../../Archive/Common/../../Common/../../Windows/../../C/Types.h \ + ../../Archive/Common/../../Common/../../Windows/Synchronization2.h \ + ../../Archive/Common/../../Common/VirtThread.h \ + ../../Archive/Common/../../Common/../../Windows/Thread.h +CrossThreadProgress.o: ../../Archive/Common/CrossThreadProgress.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../Archive/Common/CrossThreadProgress.h \ + ../../Archive/Common/../../ICoder.h ../../Archive/Common/../../IStream.h \ + ../../Archive/Common/../../../Common/MyUnknown.h \ + ../../Archive/Common/../../../Common/MyWindows.h \ + ../../Archive/Common/../../../Common/Types.h \ + ../../Archive/Common/../../IDecl.h \ + ../../Archive/Common/../../../Windows/Synchronization.h \ + ../../Archive/Common/../../../Windows/Defs.h \ + ../../Archive/Common/../../../Windows/../Common/MyWindows.h \ + ../../Archive/Common/../../../Windows/../../C/Threads.h \ + ../../Archive/Common/../../../Windows/../../C/Types.h \ + ../../Archive/Common/../../../Windows/Synchronization2.h \ + ../../Archive/Common/../../../Common/MyCom.h +OutStreamWithCRC.o: ../../Archive/Common/OutStreamWithCRC.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../Archive/Common/OutStreamWithCRC.h \ + ../../Archive/Common/../../../../C/7zCrc.h \ + ../../Archive/Common/../../../../C/Types.h \ + ../../Archive/Common/../../../Common/MyCom.h \ + ../../Archive/Common/../../../Common/MyWindows.h \ + ../../Archive/Common/../../IStream.h \ + ../../Archive/Common/../../../Common/MyUnknown.h \ + ../../Archive/Common/../../../Common/Types.h \ + ../../Archive/Common/../../IDecl.h +7zDecode.o: ../../Archive/7z/7zDecode.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h \ + ../../Archive/7z/../../Common/LimitedStreams.h \ + ../../Archive/7z/../../Common/../../Common/MyCom.h \ + ../../Archive/7z/../../Common/../../Common/MyWindows.h \ + ../../Archive/7z/../../Common/../../Common/MyVector.h \ + ../../Archive/7z/../../Common/../../Common/Defs.h \ + ../../Archive/7z/../../Common/../IStream.h \ + ../../Archive/7z/../../Common/../../Common/MyUnknown.h \ + ../../Archive/7z/../../Common/../../Common/Types.h \ + ../../Archive/7z/../../Common/../IDecl.h \ + ../../Archive/7z/../../Common/LockedStream.h \ + ../../Archive/7z/../../Common/../../Windows/Synchronization.h \ + ../../Archive/7z/../../Common/../../Windows/Defs.h \ + ../../Archive/7z/../../Common/../../Windows/../Common/MyWindows.h \ + ../../Archive/7z/../../Common/../../Windows/../../C/Threads.h \ + ../../Archive/7z/../../Common/../../Windows/../../C/Types.h \ + ../../Archive/7z/../../Common/../../Windows/Synchronization2.h \ + ../../Archive/7z/../../Common/ProgressUtils.h \ + ../../Archive/7z/../../Common/../ICoder.h \ + ../../Archive/7z/../../Common/../IStream.h \ + ../../Archive/7z/../../Common/../IProgress.h \ + ../../Archive/7z/../../Common/StreamObjects.h \ + ../../Archive/7z/../../Common/../../Common/Buffer.h \ + ../../Archive/7z/7zDecode.h ../../Archive/7z/../../IStream.h \ + ../../Archive/7z/../../IPassword.h \ + ../../Archive/7z/../../../Common/MyUnknown.h \ + ../../Archive/7z/../../../Common/Types.h ../../Archive/7z/../../IDecl.h \ + ../../Archive/7z/../Common/CoderMixer2.h \ + ../../Archive/7z/../Common/../../../Common/MyVector.h \ + ../../Archive/7z/../Common/../../../Common/Types.h \ + ../../Archive/7z/../Common/../../../Common/MyCom.h \ + ../../Archive/7z/../Common/../../ICoder.h \ + ../../Archive/7z/../Common/CoderMixer2MT.h \ + ../../Archive/7z/../Common/CoderMixer2.h \ + ../../Archive/7z/../Common/../../Common/StreamBinder.h \ + ../../Archive/7z/../Common/../../Common/../IStream.h \ + ../../Archive/7z/../Common/../../Common/../../Windows/Synchronization.h \ + ../../Archive/7z/../Common/../../Common/VirtThread.h \ + ../../Archive/7z/../Common/../../Common/../../Windows/Thread.h \ + ../../Archive/7z/../Common/../../Common/../../Windows/Defs.h \ + ../../Archive/7z/../Common/../../Common/../../Windows/../../C/Threads.h \ + ../../Archive/7z/../../Common/CreateCoder.h \ + ../../Archive/7z/../../Common/../../Common/MyString.h \ + ../../Archive/7z/../../Common/../../Common/MyVector.h \ + ../../Archive/7z/../../Common/MethodId.h \ + ../../Archive/7z/../../Common/../../Common/Types.h \ + ../../Archive/7z/7zItem.h ../../Archive/7z/../../../Common/Buffer.h \ + ../../Archive/7z/../../../Common/MyString.h \ + ../../Archive/7z/../../Common/MethodId.h ../../Archive/7z/7zHeader.h \ + ../../Archive/7z/../../../Common/Types.h +7zExtract.o: ../../Archive/7z/7zExtract.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h \ + ../../Archive/7z/../../../Common/ComTry.h \ + ../../Archive/7z/../../../Common/MyWindows.h \ + ../../Archive/7z/../../Common/ProgressUtils.h \ + ../../Archive/7z/../../Common/../../Common/MyCom.h \ + ../../Archive/7z/../../Common/../../Common/MyWindows.h \ + ../../Archive/7z/../../Common/../ICoder.h \ + ../../Archive/7z/../../Common/../IStream.h \ + ../../Archive/7z/../../Common/../../Common/MyUnknown.h \ + ../../Archive/7z/../../Common/../../Common/Types.h \ + ../../Archive/7z/../../Common/../IDecl.h \ + ../../Archive/7z/../../Common/../IProgress.h ../../Archive/7z/7zDecode.h \ + ../../Archive/7z/../../IStream.h ../../Archive/7z/../../IPassword.h \ + ../../Archive/7z/../../../Common/MyUnknown.h \ + ../../Archive/7z/../../../Common/Types.h ../../Archive/7z/../../IDecl.h \ + ../../Archive/7z/../Common/CoderMixer2.h \ + ../../Archive/7z/../Common/../../../Common/MyVector.h \ + ../../Archive/7z/../Common/../../../Common/Defs.h \ + ../../Archive/7z/../Common/../../../Common/Types.h \ + ../../Archive/7z/../Common/../../../Common/MyCom.h \ + ../../Archive/7z/../Common/../../ICoder.h \ + ../../Archive/7z/../Common/CoderMixer2MT.h \ + ../../Archive/7z/../Common/CoderMixer2.h \ + ../../Archive/7z/../Common/../../Common/StreamBinder.h \ + ../../Archive/7z/../Common/../../Common/../IStream.h \ + ../../Archive/7z/../Common/../../Common/../../Windows/Synchronization.h \ + ../../Archive/7z/../Common/../../Common/../../Windows/Defs.h \ + ../../Archive/7z/../Common/../../Common/../../Windows/../Common/MyWindows.h \ + ../../Archive/7z/../Common/../../Common/../../Windows/../../C/Threads.h \ + ../../Archive/7z/../Common/../../Common/../../Windows/../../C/Types.h \ + ../../Archive/7z/../Common/../../Common/../../Windows/Synchronization2.h \ + ../../Archive/7z/../Common/../../Common/VirtThread.h \ + ../../Archive/7z/../Common/../../Common/../../Windows/Thread.h \ + ../../Archive/7z/../../Common/CreateCoder.h \ + ../../Archive/7z/../../Common/../../Common/MyString.h \ + ../../Archive/7z/../../Common/../../Common/MyVector.h \ + ../../Archive/7z/../../Common/MethodId.h \ + ../../Archive/7z/../../Common/../../Common/Types.h \ + ../../Archive/7z/7zItem.h ../../Archive/7z/../../../Common/Buffer.h \ + ../../Archive/7z/../../../Common/Defs.h \ + ../../Archive/7z/../../../Common/MyString.h \ + ../../Archive/7z/../../Common/MethodId.h ../../Archive/7z/7zHeader.h \ + ../../Archive/7z/../../../Common/Types.h \ + ../../Archive/7z/7zFolderOutStream.h ../../Archive/7z/../IArchive.h \ + ../../Archive/7z/../../IProgress.h ../../Archive/7z/../../IStream.h \ + ../../Archive/7z/../../PropID.h \ + ../../Archive/7z/../Common/OutStreamWithCRC.h \ + ../../Archive/7z/../Common/../../../../C/7zCrc.h \ + ../../Archive/7z/../Common/../../../../C/Types.h \ + ../../Archive/7z/../Common/../../IStream.h ../../Archive/7z/7zIn.h \ + ../../Archive/7z/../../../Common/MyCom.h \ + ../../Archive/7z/../../Common/InBuffer.h \ + ../../Archive/7z/../../Common/../IStream.h \ + ../../Archive/7z/../../Common/../../Common/MyException.h \ + ../../Archive/7z/7zHandler.h ../../Archive/7z/../../ICoder.h \ + ../../Archive/7z/7zCompressionMode.h \ + ../../Archive/7z/../../../Windows/PropVariant.h \ + ../../Archive/7z/../../../Windows/../Common/MyWindows.h \ + ../../Archive/7z/../../../Windows/../Common/Types.h \ + ../../Archive/7z/../../Common/MethodProps.h \ + ../../Archive/7z/../../Common/../../Common/MyVector.h \ + ../../Archive/7z/../../Common/../../Windows/PropVariant.h +7zFolderOutStream.o: ../../Archive/7z/7zFolderOutStream.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../Archive/7z/7zFolderOutStream.h ../../Archive/7z/../../IStream.h \ + ../../Archive/7z/../../../Common/MyUnknown.h \ + ../../Archive/7z/../../../Common/MyWindows.h \ + ../../Archive/7z/../../../Common/Types.h ../../Archive/7z/../../IDecl.h \ + ../../Archive/7z/../IArchive.h ../../Archive/7z/../../IProgress.h \ + ../../Archive/7z/../../IStream.h ../../Archive/7z/../../PropID.h \ + ../../Archive/7z/../Common/OutStreamWithCRC.h \ + ../../Archive/7z/../Common/../../../../C/7zCrc.h \ + ../../Archive/7z/../Common/../../../../C/Types.h \ + ../../Archive/7z/../Common/../../../Common/MyCom.h \ + ../../Archive/7z/../Common/../../../Common/MyWindows.h \ + ../../Archive/7z/../Common/../../IStream.h ../../Archive/7z/7zIn.h \ + ../../Archive/7z/../../../Common/MyCom.h \ + ../../Archive/7z/../../IPassword.h \ + ../../Archive/7z/../../Common/CreateCoder.h \ + ../../Archive/7z/../../Common/../../Common/MyCom.h \ + ../../Archive/7z/../../Common/../../Common/MyString.h \ + ../../Archive/7z/../../Common/../../Common/MyVector.h \ + ../../Archive/7z/../../Common/../../Common/Defs.h \ + ../../Archive/7z/../../Common/../ICoder.h \ + ../../Archive/7z/../../Common/../IStream.h \ + ../../Archive/7z/../../Common/MethodId.h \ + ../../Archive/7z/../../Common/../../Common/Types.h \ + ../../Archive/7z/../../Common/InBuffer.h \ + ../../Archive/7z/../../Common/../IStream.h \ + ../../Archive/7z/../../Common/../../Common/MyException.h \ + ../../Archive/7z/../../Common/../../Common/MyWindows.h \ + ../../Archive/7z/7zItem.h ../../Archive/7z/../../../Common/Buffer.h \ + ../../Archive/7z/../../../Common/Defs.h \ + ../../Archive/7z/../../../Common/MyString.h \ + ../../Archive/7z/../../Common/MethodId.h ../../Archive/7z/7zHeader.h \ + ../../Archive/7z/../../../Common/Types.h +7zHandler.o: ../../Archive/7z/7zHandler.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h \ + ../../Archive/7z/../../../../C/CpuArch.h \ + ../../Archive/7z/../../../../C/Types.h \ + ../../Archive/7z/../../../Common/ComTry.h \ + ../../Archive/7z/../../../Common/MyWindows.h \ + ../../Archive/7z/../../../Common/IntToString.h \ + ../../Archive/7z/../../../Common/Types.h \ + ../../Archive/7z/../../../Windows/System.h \ + ../../Archive/7z/../../../Windows/../Common/Types.h \ + ../../Archive/7z/../Common/ItemNameUtils.h \ + ../../Archive/7z/../Common/../../../Common/MyString.h \ + ../../Archive/7z/../Common/../../../Common/MyVector.h \ + ../../Archive/7z/../Common/../../../Common/Defs.h \ + ../../Archive/7z/7zHandler.h ../../Archive/7z/../../ICoder.h \ + ../../Archive/7z/../../IStream.h \ + ../../Archive/7z/../../../Common/MyUnknown.h \ + ../../Archive/7z/../../../Common/Types.h ../../Archive/7z/../../IDecl.h \ + ../../Archive/7z/../IArchive.h ../../Archive/7z/../../IProgress.h \ + ../../Archive/7z/../../IStream.h ../../Archive/7z/../../PropID.h \ + ../../Archive/7z/../../Common/CreateCoder.h \ + ../../Archive/7z/../../Common/../../Common/MyCom.h \ + ../../Archive/7z/../../Common/../../Common/MyWindows.h \ + ../../Archive/7z/../../Common/../../Common/MyString.h \ + ../../Archive/7z/../../Common/../ICoder.h \ + ../../Archive/7z/../../Common/MethodId.h \ + ../../Archive/7z/../../Common/../../Common/Types.h \ + ../../Archive/7z/7zCompressionMode.h \ + ../../Archive/7z/../../../Common/MyString.h \ + ../../Archive/7z/../../../Windows/PropVariant.h \ + ../../Archive/7z/../../../Windows/../Common/MyWindows.h \ + ../../Archive/7z/../../Common/MethodProps.h \ + ../../Archive/7z/../../Common/../../Common/MyVector.h \ + ../../Archive/7z/../../Common/../../Windows/PropVariant.h \ + ../../Archive/7z/7zIn.h ../../Archive/7z/../../../Common/MyCom.h \ + ../../Archive/7z/../../IPassword.h ../../Archive/7z/../../IStream.h \ + ../../Archive/7z/../../Common/InBuffer.h \ + ../../Archive/7z/../../Common/../IStream.h \ + ../../Archive/7z/../../Common/../../Common/MyException.h \ + ../../Archive/7z/7zItem.h ../../Archive/7z/../../../Common/Buffer.h \ + ../../Archive/7z/../../../Common/Defs.h \ + ../../Archive/7z/../../Common/MethodId.h ../../Archive/7z/7zHeader.h \ + ../../Archive/7z/../../../Common/Types.h ../../Archive/7z/7zProperties.h \ + ../../Archive/7z/../../PropID.h +7zHeader.o: ../../Archive/7z/7zHeader.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../Archive/7z/7zHeader.h \ + ../../Archive/7z/../../../Common/Types.h +7zIn.o: ../../Archive/7z/7zIn.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../Archive/7z/../../../../C/7zCrc.h \ + ../../Archive/7z/../../../../C/Types.h \ + ../../Archive/7z/../../../../C/CpuArch.h \ + ../../Archive/7z/../../Common/StreamObjects.h \ + ../../Archive/7z/../../Common/../../Common/Buffer.h \ + ../../Archive/7z/../../Common/../../Common/Defs.h \ + ../../Archive/7z/../../Common/../../Common/MyCom.h \ + ../../Archive/7z/../../Common/../../Common/MyWindows.h \ + ../../Archive/7z/../../Common/../IStream.h \ + ../../Archive/7z/../../Common/../../Common/MyUnknown.h \ + ../../Archive/7z/../../Common/../../Common/Types.h \ + ../../Archive/7z/../../Common/../IDecl.h \ + ../../Archive/7z/../../Common/StreamUtils.h ../../Archive/7z/7zDecode.h \ + ../../Archive/7z/../../IStream.h ../../Archive/7z/../../IPassword.h \ + ../../Archive/7z/../../../Common/MyUnknown.h \ + ../../Archive/7z/../../../Common/Types.h ../../Archive/7z/../../IDecl.h \ + ../../Archive/7z/../Common/CoderMixer2.h \ + ../../Archive/7z/../Common/../../../Common/MyVector.h \ + ../../Archive/7z/../Common/../../../Common/Defs.h \ + ../../Archive/7z/../Common/../../../Common/Types.h \ + ../../Archive/7z/../Common/../../../Common/MyCom.h \ + ../../Archive/7z/../Common/../../ICoder.h \ + ../../Archive/7z/../Common/../../IStream.h \ + ../../Archive/7z/../Common/CoderMixer2MT.h \ + ../../Archive/7z/../Common/CoderMixer2.h \ + ../../Archive/7z/../Common/../../Common/StreamBinder.h \ + ../../Archive/7z/../Common/../../Common/../IStream.h \ + ../../Archive/7z/../Common/../../Common/../../Windows/Synchronization.h \ + ../../Archive/7z/../Common/../../Common/../../Windows/Defs.h \ + ../../Archive/7z/../Common/../../Common/../../Windows/../Common/MyWindows.h \ + ../../Archive/7z/../Common/../../Common/../../Windows/../../C/Threads.h \ + ../../Archive/7z/../Common/../../Common/../../Windows/../../C/Types.h \ + ../../Archive/7z/../Common/../../Common/../../Windows/Synchronization2.h \ + ../../Archive/7z/../Common/../../Common/VirtThread.h \ + ../../Archive/7z/../Common/../../Common/../../Windows/Thread.h \ + ../../Archive/7z/../../Common/CreateCoder.h \ + ../../Archive/7z/../../Common/../../Common/MyString.h \ + ../../Archive/7z/../../Common/../../Common/MyVector.h \ + ../../Archive/7z/../../Common/../ICoder.h \ + ../../Archive/7z/../../Common/MethodId.h \ + ../../Archive/7z/../../Common/../../Common/Types.h \ + ../../Archive/7z/7zItem.h ../../Archive/7z/../../../Common/Buffer.h \ + ../../Archive/7z/../../../Common/MyString.h \ + ../../Archive/7z/../../Common/MethodId.h ../../Archive/7z/7zHeader.h \ + ../../Archive/7z/../../../Common/Types.h ../../Archive/7z/7zIn.h \ + ../../Archive/7z/../../../Common/MyCom.h \ + ../../Archive/7z/../../Common/InBuffer.h \ + ../../Archive/7z/../../Common/../../Common/MyException.h +7zRegister.o: ../../Archive/7z/7zRegister.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h \ + ../../Archive/7z/../../Common/RegisterArc.h \ + ../../Archive/7z/../../Common/../Archive/IArchive.h \ + ../../Archive/7z/../../Common/../Archive/../IProgress.h \ + ../../Archive/7z/../../Common/../Archive/../../Common/MyUnknown.h \ + ../../Archive/7z/../../Common/../Archive/../../Common/MyWindows.h \ + ../../Archive/7z/../../Common/../Archive/../../Common/Types.h \ + ../../Archive/7z/../../Common/../Archive/../IDecl.h \ + ../../Archive/7z/../../Common/../Archive/../IStream.h \ + ../../Archive/7z/../../Common/../Archive/../PropID.h \ + ../../Archive/7z/7zHandler.h ../../Archive/7z/../../ICoder.h \ + ../../Archive/7z/../../IStream.h ../../Archive/7z/../IArchive.h \ + ../../Archive/7z/../../Common/CreateCoder.h \ + ../../Archive/7z/../../Common/../../Common/MyCom.h \ + ../../Archive/7z/../../Common/../../Common/MyWindows.h \ + ../../Archive/7z/../../Common/../../Common/MyString.h \ + ../../Archive/7z/../../Common/../../Common/MyVector.h \ + ../../Archive/7z/../../Common/../../Common/Defs.h \ + ../../Archive/7z/../../Common/../ICoder.h \ + ../../Archive/7z/../../Common/MethodId.h \ + ../../Archive/7z/../../Common/../../Common/Types.h \ + ../../Archive/7z/7zCompressionMode.h \ + ../../Archive/7z/../../../Common/MyString.h \ + ../../Archive/7z/../../../Windows/PropVariant.h \ + ../../Archive/7z/../../../Windows/../Common/MyWindows.h \ + ../../Archive/7z/../../../Windows/../Common/Types.h \ + ../../Archive/7z/../../Common/MethodProps.h \ + ../../Archive/7z/../../Common/../../Common/MyVector.h \ + ../../Archive/7z/../../Common/../../Windows/PropVariant.h \ + ../../Archive/7z/7zIn.h ../../Archive/7z/../../../Common/MyCom.h \ + ../../Archive/7z/../../IPassword.h \ + ../../Archive/7z/../../../Common/MyUnknown.h \ + ../../Archive/7z/../../../Common/Types.h ../../Archive/7z/../../IDecl.h \ + ../../Archive/7z/../../IStream.h \ + ../../Archive/7z/../../Common/InBuffer.h \ + ../../Archive/7z/../../Common/../IStream.h \ + ../../Archive/7z/../../Common/../../Common/MyException.h \ + ../../Archive/7z/7zItem.h ../../Archive/7z/../../../Common/Buffer.h \ + ../../Archive/7z/../../../Common/Defs.h \ + ../../Archive/7z/../../Common/MethodId.h ../../Archive/7z/7zHeader.h \ + ../../Archive/7z/../../../Common/Types.h +BranchCoder.o: ../../Compress/BranchCoder.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../Compress/BranchCoder.h \ + ../../Compress/../../Common/MyCom.h \ + ../../Compress/../../Common/MyWindows.h ../../Compress/../ICoder.h \ + ../../Compress/../IStream.h ../../Compress/../../Common/MyUnknown.h \ + ../../Compress/../../Common/Types.h ../../Compress/../IDecl.h +Bcj2Coder.o: ../../Compress/Bcj2Coder.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../Compress/../../../C/Alloc.h \ + ../../Compress/Bcj2Coder.h ../../Compress/../../Common/MyCom.h \ + ../../Compress/../../Common/MyWindows.h ../../Compress/../ICoder.h \ + ../../Compress/../IStream.h ../../Compress/../../Common/MyUnknown.h \ + ../../Compress/../../Common/Types.h ../../Compress/../IDecl.h \ + ../../Compress/RangeCoderBit.h ../../Compress/RangeCoder.h \ + ../../Compress/../Common/InBuffer.h \ + ../../Compress/../Common/../IStream.h \ + ../../Compress/../Common/../../Common/MyCom.h \ + ../../Compress/../Common/../../Common/MyException.h \ + ../../Compress/../Common/../../Common/MyWindows.h \ + ../../Compress/../Common/OutBuffer.h +Bcj2Register.o: ../../Compress/Bcj2Register.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../Compress/../Common/RegisterCodec.h \ + ../../Compress/../Common/../Common/MethodId.h \ + ../../Compress/../Common/../Common/../../Common/Types.h \ + ../../Compress/Bcj2Coder.h ../../Compress/../../Common/MyCom.h \ + ../../Compress/../../Common/MyWindows.h ../../Compress/../ICoder.h \ + ../../Compress/../IStream.h ../../Compress/../../Common/MyUnknown.h \ + ../../Compress/../../Common/Types.h ../../Compress/../IDecl.h \ + ../../Compress/RangeCoderBit.h ../../Compress/RangeCoder.h \ + ../../Compress/../Common/InBuffer.h \ + ../../Compress/../Common/../IStream.h \ + ../../Compress/../Common/../../Common/MyCom.h \ + ../../Compress/../Common/../../Common/MyException.h \ + ../../Compress/../Common/../../Common/MyWindows.h \ + ../../Compress/../Common/OutBuffer.h +BcjCoder.o: ../../Compress/BcjCoder.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../Compress/BcjCoder.h \ + ../../Compress/../../../C/Bra.h ../../Compress/../../../C/Types.h \ + ../../Compress/BranchCoder.h ../../Compress/../../Common/MyCom.h \ + ../../Compress/../../Common/MyWindows.h ../../Compress/../ICoder.h \ + ../../Compress/../IStream.h ../../Compress/../../Common/MyUnknown.h \ + ../../Compress/../../Common/Types.h ../../Compress/../IDecl.h +BcjRegister.o: ../../Compress/BcjRegister.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h \ + ../../Compress/../Common/RegisterCodec.h \ + ../../Compress/../Common/../Common/MethodId.h \ + ../../Compress/../Common/../Common/../../Common/Types.h \ + ../../Compress/BcjCoder.h ../../Compress/../../../C/Bra.h \ + ../../Compress/../../../C/Types.h ../../Compress/BranchCoder.h \ + ../../Compress/../../Common/MyCom.h \ + ../../Compress/../../Common/MyWindows.h ../../Compress/../ICoder.h \ + ../../Compress/../IStream.h ../../Compress/../../Common/MyUnknown.h \ + ../../Compress/../../Common/Types.h ../../Compress/../IDecl.h +LzmaDecoder.o: ../../Compress/LzmaDecoder.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../Compress/../../../C/Alloc.h \ + ../../Compress/../Common/StreamUtils.h \ + ../../Compress/../Common/../IStream.h \ + ../../Compress/../Common/../../Common/MyUnknown.h \ + ../../Compress/../Common/../../Common/MyWindows.h \ + ../../Compress/../Common/../../Common/Types.h \ + ../../Compress/../Common/../IDecl.h ../../Compress/LzmaDecoder.h \ + ../../Compress/../../../C/LzmaDec.h ../../Compress/../../../C/Types.h \ + ../../Compress/../../Common/MyCom.h \ + ../../Compress/../../Common/MyWindows.h ../../Compress/../ICoder.h \ + ../../Compress/../IStream.h +LzmaRegister.o: ../../Compress/LzmaRegister.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../Compress/../Common/RegisterCodec.h \ + ../../Compress/../Common/../Common/MethodId.h \ + ../../Compress/../Common/../Common/../../Common/Types.h \ + ../../Compress/LzmaDecoder.h ../../Compress/../../../C/LzmaDec.h \ + ../../Compress/../../../C/Types.h ../../Compress/../../Common/MyCom.h \ + ../../Compress/../../Common/MyWindows.h ../../Compress/../ICoder.h \ + ../../Compress/../IStream.h ../../Compress/../../Common/MyUnknown.h \ + ../../Compress/../../Common/Types.h ../../Compress/../IDecl.h +LzmaDecoder.o: ../../Compress/LzmaDecoder.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../Compress/../../../C/Alloc.h \ + ../../Compress/../Common/StreamUtils.h \ + ../../Compress/../Common/../IStream.h \ + ../../Compress/../Common/../../Common/MyUnknown.h \ + ../../Compress/../Common/../../Common/MyWindows.h \ + ../../Compress/../Common/../../Common/Types.h \ + ../../Compress/../Common/../IDecl.h ../../Compress/LzmaDecoder.h \ + ../../Compress/../../../C/LzmaDec.h ../../Compress/../../../C/Types.h \ + ../../Compress/../../Common/MyCom.h \ + ../../Compress/../../Common/MyWindows.h ../../Compress/../ICoder.h \ + ../../Compress/../IStream.h +LzmaRegister.o: ../../Compress/LzmaRegister.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../Compress/../Common/RegisterCodec.h \ + ../../Compress/../Common/../Common/MethodId.h \ + ../../Compress/../Common/../Common/../../Common/Types.h \ + ../../Compress/LzmaDecoder.h ../../Compress/../../../C/LzmaDec.h \ + ../../Compress/../../../C/Types.h ../../Compress/../../Common/MyCom.h \ + ../../Compress/../../Common/MyWindows.h ../../Compress/../ICoder.h \ + ../../Compress/../IStream.h ../../Compress/../../Common/MyUnknown.h \ + ../../Compress/../../Common/Types.h ../../Compress/../IDecl.h +PpmdDecoder.o: ../../Compress/PpmdDecoder.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../Compress/../../../C/Alloc.h \ + ../../Compress/../../../C/CpuArch.h ../../Compress/../../../C/Types.h \ + ../../Compress/../Common/StreamUtils.h \ + ../../Compress/../Common/../IStream.h \ + ../../Compress/../Common/../../Common/MyUnknown.h \ + ../../Compress/../Common/../../Common/MyWindows.h \ + ../../Compress/../Common/../../Common/Types.h \ + ../../Compress/../Common/../IDecl.h ../../Compress/PpmdDecoder.h \ + ../../Compress/../../../C/Ppmd7.h ../../Compress/../../../C/Ppmd.h \ + ../../Compress/../../../C/CpuArch.h ../../Compress/../../Common/MyCom.h \ + ../../Compress/../../Common/MyWindows.h \ + ../../Compress/../Common/CWrappers.h \ + ../../Compress/../Common/../ICoder.h \ + ../../Compress/../Common/../IStream.h \ + ../../Compress/../Common/../../Common/MyCom.h ../../Compress/../ICoder.h +PpmdRegister.o: ../../Compress/PpmdRegister.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../Compress/../Common/RegisterCodec.h \ + ../../Compress/../Common/../Common/MethodId.h \ + ../../Compress/../Common/../Common/../../Common/Types.h \ + ../../Compress/PpmdDecoder.h ../../Compress/../../../C/Ppmd7.h \ + ../../Compress/../../../C/Ppmd.h ../../Compress/../../../C/Types.h \ + ../../Compress/../../../C/CpuArch.h ../../Compress/../../Common/MyCom.h \ + ../../Compress/../../Common/MyWindows.h \ + ../../Compress/../Common/CWrappers.h \ + ../../Compress/../Common/../ICoder.h \ + ../../Compress/../Common/../IStream.h \ + ../../Compress/../Common/../../Common/MyUnknown.h \ + ../../Compress/../Common/../../Common/MyWindows.h \ + ../../Compress/../Common/../../Common/Types.h \ + ../../Compress/../Common/../IDecl.h \ + ../../Compress/../Common/../../Common/MyCom.h ../../Compress/../ICoder.h +7zAes.o: ../../Crypto/7zAes.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../Crypto/../../../C/Sha256.h \ + ../../Crypto/../../../C/Types.h ../../../Windows/Synchronization.h \ + ../../../Windows/Defs.h ../../../Windows/../Common/MyWindows.h \ + ../../../Windows/../../C/Threads.h ../../../Windows/../../C/Types.h \ + ../../../Windows/Synchronization2.h \ + ../../Crypto/../Common/StreamObjects.h \ + ../../Crypto/../Common/../../Common/Buffer.h \ + ../../Crypto/../Common/../../Common/Defs.h \ + ../../Crypto/../Common/../../Common/MyCom.h \ + ../../Crypto/../Common/../../Common/MyWindows.h \ + ../../Crypto/../Common/../IStream.h \ + ../../Crypto/../Common/../../Common/MyUnknown.h \ + ../../Crypto/../Common/../../Common/Types.h \ + ../../Crypto/../Common/../IDecl.h ../../Crypto/../Common/StreamUtils.h \ + ../../Crypto/7zAes.h ../../../Common/Buffer.h ../../../Common/MyCom.h \ + ../../../Common/MyVector.h ../../../Common/Defs.h \ + ../../Crypto/../ICoder.h ../../Crypto/../IStream.h \ + ../../Crypto/../IPassword.h ../../Crypto/../../Common/MyUnknown.h \ + ../../Crypto/../../Common/Types.h ../../Crypto/../IDecl.h \ + ../../Crypto/MyAes.h ../../Crypto/../../../C/Aes.h \ + ../../Crypto/../../Common/MyCom.h +7zAesRegister.o: ../../Crypto/7zAesRegister.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../Crypto/../Common/RegisterCodec.h \ + ../../Crypto/../Common/../Common/MethodId.h \ + ../../Crypto/../Common/../Common/../../Common/Types.h \ + ../../Crypto/7zAes.h ../../../Common/Buffer.h ../../../Common/Defs.h \ + ../../../Common/MyCom.h ../../../Common/MyWindows.h \ + ../../../Common/MyVector.h ../../Crypto/../ICoder.h \ + ../../Crypto/../IStream.h ../../Crypto/../../Common/MyUnknown.h \ + ../../Crypto/../../Common/MyWindows.h ../../Crypto/../../Common/Types.h \ + ../../Crypto/../IDecl.h ../../Crypto/../IPassword.h +MyAes.o: ../../Crypto/MyAes.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../Crypto/MyAes.h \ + ../../Crypto/../../../C/Aes.h ../../Crypto/../../../C/Types.h \ + ../../Crypto/../../Common/MyCom.h ../../Crypto/../../Common/MyWindows.h \ + ../../Crypto/../ICoder.h ../../Crypto/../IStream.h \ + ../../Crypto/../../Common/MyUnknown.h ../../Crypto/../../Common/Types.h \ + ../../Crypto/../IDecl.h diff --git a/CPP/7zip/Bundles/SFXCon/makefile.list b/CPP/7zip/Bundles/SFXCon/makefile.list new file mode 100644 index 0000000..b32bee4 --- /dev/null +++ b/CPP/7zip/Bundles/SFXCon/makefile.list @@ -0,0 +1,106 @@ +SRCS=\ + ../../../myWindows/myGetTickCount.cpp \ + ../../../myWindows/wine_date_and_time.cpp \ + ../../../myWindows/mySplitCommandLine.cpp \ + \ + Main.cpp \ + \ + ../../UI/Console/ConsoleClose.cpp \ + ../../UI/Console/ExtractCallbackConsole.cpp \ + ../../UI/Console/List.cpp \ + ../../UI/Console/MainAr.cpp \ + ../../UI/Console/OpenCallbackConsole.cpp \ + ../../UI/Console/UserInputUtils.cpp \ + \ + ../../../Common/CommandLineParser.cpp \ + ../../../Common/CRC.cpp \ + ../../../Common/IntToString.cpp \ + ../../../Common/StdInStream.cpp \ + ../../../Common/StdOutStream.cpp \ + ../../../Common/MyString.cpp \ + ../../../Common/MyWindows.cpp \ + ../../../Common/StringConvert.cpp \ + ../../../Common/UTFConvert.cpp \ + ../../../Common/MyVector.cpp \ + ../../../Common/Wildcard.cpp \ + \ + ../../../Windows/Error.cpp \ + ../../../Windows/FileDir.cpp \ + ../../../Windows/FileFind.cpp \ + ../../../Windows/FileIO.cpp \ + ../../../Windows/FileName.cpp \ + ../../../Windows/PropVariant.cpp \ + ../../../Windows/PropVariantConversions.cpp \ + ../../../Windows/Synchronization.cpp \ + ../../../Windows/System.cpp \ + \ + ../../Common/CreateCoder.cpp \ + ../../Common/CWrappers.cpp \ + ../../Common/FilePathAutoRename.cpp \ + ../../Common/FileStreams.cpp \ + ../../Common/InBuffer.cpp \ + ../../Common/FilterCoder.cpp \ + ../../Common/LimitedStreams.cpp \ + ../../Common/LockedStream.cpp \ + ../../Common/OutBuffer.cpp \ + ../../Common/ProgressUtils.cpp \ + ../../Common/StreamBinder.cpp \ + ../../Common/StreamObjects.cpp \ + ../../Common/StreamUtils.cpp \ + ../../Common/VirtThread.cpp \ + \ + ../../UI/Common/ArchiveExtractCallback.cpp \ + ../../UI/Common/ArchiveOpenCallback.cpp \ + ../../UI/Common/DefaultName.cpp \ + ../../UI/Common/Extract.cpp \ + ../../UI/Common/ExtractingFilePath.cpp \ + ../../UI/Common/LoadCodecs.cpp \ + ../../UI/Common/OpenArchive.cpp \ + ../../UI/Common/PropIDUtils.cpp \ + \ + ../../Archive/Common/CoderMixer2.cpp \ + ../../Archive/Common/CoderMixer2MT.cpp \ + ../../Archive/Common/CrossThreadProgress.cpp \ + ../../Archive/Common/OutStreamWithCRC.cpp \ + \ + ../../Archive/7z/7zDecode.cpp \ + ../../Archive/7z/7zExtract.cpp \ + ../../Archive/7z/7zFolderOutStream.cpp \ + ../../Archive/7z/7zHandler.cpp \ + ../../Archive/7z/7zHeader.cpp \ + ../../Archive/7z/7zIn.cpp \ + ../../Archive/7z/7zRegister.cpp \ + \ + ../../Compress/BranchCoder.cpp \ + ../../Compress/Bcj2Coder.cpp \ + ../../Compress/Bcj2Register.cpp \ + ../../Compress/BcjCoder.cpp \ + ../../Compress/BcjRegister.cpp \ + ../../Compress/LzmaDecoder.cpp \ + ../../Compress/LzmaRegister.cpp \ + ../../Compress/LzmaDecoder.cpp \ + ../../Compress/LzmaRegister.cpp \ + ../../Compress/PpmdDecoder.cpp \ + ../../Compress/PpmdRegister.cpp \ + \ + ../../Crypto/7zAes.cpp \ + ../../Crypto/7zAesRegister.cpp \ + ../../Crypto/MyAes.cpp \ + +SRCS_C=\ + ../../../../C/Aes.c \ + ../../../../C/Alloc.c \ + ../../../../C/Bra86.c \ + ../../../../C/Lzma2Dec.c \ + ../../../../C/LzmaDec.c \ + ../../../../C/Ppmd7.c \ + ../../../../C/Ppmd7Dec.c \ + ../../../../C/Sha256.c \ + ../../../../C/Threads.c \ + +include ../../../../makefile.rules + +Main.o : Main.cpp + $(CXX) $(CXXFLAGS) Main.cpp + + diff --git a/CPP/7zip/CMAKE/CMakeLists_7zFM.txt b/CPP/7zip/CMAKE/CMakeLists_7zFM.txt new file mode 100644 index 0000000..3fdf1ae --- /dev/null +++ b/CPP/7zip/CMAKE/CMakeLists_7zFM.txt @@ -0,0 +1,163 @@ + +add_definitions(-DLANG -DNEW_FOLDER_INTERFACE -DEXTERNAL_CODECS) + +IF(APPLE) + add_definitions(-DENV_MACOSX) + +ENDIF(APPLE) + + +find_package(wxWidgets COMPONENTS core base adv REQUIRED) + +include( ${wxWidgets_USE_FILE} ) + +add_definitions(-D_FILE_OFFSET_BITS=64 -D_LARGE_FILES) + +include_directories( + ../../../myWindows + ../../../ + ../../../include_windows +) + + + + +add_executable(7zFM + + +../../UI/Agent/Agent.cpp +../../UI/Agent/AgentOut.cpp +../../UI/Agent/AgentProxy.cpp +../../UI/Agent/ArchiveFolder.cpp +../../UI/Agent/ArchiveFolderOpen.cpp +../../UI/Agent/ArchiveFolderOut.cpp +../../UI/Agent/UpdateCallbackAgent.cpp + + ../../UI/FileManager/ClassDefs.cpp + ../../UI/FileManager/App.cpp + ../../UI/FileManager/wxFM.cpp + ../../UI/FileManager/FM.cpp + ../../UI/FileManager/FM_rc.cpp + ../../UI/FileManager/OpenCallback.cpp + ../../UI/FileManager/MyLoadMenu.cpp + ../../UI/FileManager/Panel.cpp + ../../UI/FileManager/PanelCrc.cpp + ../../UI/FileManager/PanelCopy.cpp + ../../UI/FileManager/PanelItems.cpp + ../../UI/FileManager/PanelListNotify.cpp + ../../UI/FileManager/PanelFolderChange.cpp + ../../UI/FileManager/PanelItemOpen.cpp + ../../UI/FileManager/PanelMenu.cpp + ../../UI/FileManager/PanelOperations.cpp + ../../UI/FileManager/PanelSelect.cpp + ../../UI/FileManager/PanelSort.cpp + ../../UI/FileManager/PanelSplitFile.cpp + ../../UI/FileManager/PropertyName.cpp + ../../UI/FileManager/RegistryUtils.cpp + ../../UI/FileManager/ViewSettings.cpp + ../../UI/FileManager/UpdateCallback100.cpp + ../../UI/FileManager/FileFolderPluginOpen.cpp + ../../UI/FileManager/RootFolder.cpp + ../../UI/FileManager/FSDrives.cpp + ../../UI/FileManager/FSFolder.cpp + ../../UI/FileManager/FSFolderCopy.cpp + ../../UI/FileManager/FormatUtils.cpp + ../../UI/FileManager/SysIconUtils.cpp + ../../UI/FileManager/TextPairs.cpp + + ../../UI/FileManager/ExtractCallback.cpp + ../../UI/FileManager/ProgramLocation.cpp + ../../UI/FileManager/CopyDialog.cpp + ../../UI/FileManager/CopyDialog_rc.cpp + ../../UI/FileManager/ListViewDialog.cpp + ../../UI/FileManager/ListViewDialog_rc.cpp + ../../UI/FileManager/SplitDialog.cpp + ../../UI/FileManager/SplitDialog_rc.cpp + ../../UI/FileManager/SplitUtils.cpp + ../../UI/FileManager/StringUtils.cpp + ../../UI/FileManager/ProgressDialog2.cpp + ../../UI/FileManager/ProgressDialog2_rc.cpp + ../../UI/FileManager/MessagesDialog.cpp + ../../UI/FileManager/MessagesDialog_rc.cpp + ../../UI/FileManager/ComboDialog.cpp + ../../UI/FileManager/ComboDialog_rc.cpp + ../../UI/FileManager/OverwriteDialog.cpp + ../../UI/FileManager/OverwriteDialog_rc.cpp + ../../UI/FileManager/PasswordDialog.cpp + ../../UI/FileManager/PasswordDialog_rc.cpp + ../../UI/FileManager/LangUtils.cpp + +../../UI/Common/ArchiveName.cpp +../../UI/Common/CompressCall.cpp +../../UI/Common/WorkDir.cpp +../../UI/Common/ArchiveExtractCallback.cpp +../../UI/Common/ArchiveOpenCallback.cpp +../../UI/Common/DefaultName.cpp +../../UI/Common/EnumDirItems.cpp +../../UI/Common/LoadCodecs.cpp +../../UI/Common/OpenArchive.cpp +../../UI/Common/ZipRegistry.cpp +../../UI/Common/ExtractingFilePath.cpp +../../UI/Common/PropIDUtils.cpp +../../UI/Common/SortUtils.cpp +../../UI/Common/UpdateAction.cpp +../../UI/Common/UpdateCallback.cpp +../../UI/Common/UpdatePair.cpp +../../UI/Common/UpdateProduce.cpp + + ../../Archive/Common/OutStreamWithCRC.cpp + ../../Common/FilePathAutoRename.cpp + ../../Common/FileStreams.cpp + ../../Common/ProgressUtils.cpp + ../../Common/StreamUtils.cpp + ../../../Common/TextConfig.cpp + ../../../Common/UTFConvert.cpp + ../../Compress/CopyCoder.cpp + ../../../Common/MyString.cpp + ../../../Common/MyVector.cpp + ../../../Common/StringConvert.cpp + ../../../Common/StringToInt.cpp + ../../../Common/IntToString.cpp + ../../../Common/MyWindows.cpp + ../../../Common/Wildcard.cpp + + ../../../Windows/DLL.cpp + ../../../Windows/Error.cpp + ../../../Windows/FileDir.cpp + ../../../Windows/FileFind.cpp + ../../../Windows/FileIO.cpp + ../../../Windows/FileName.cpp + ../../../Windows/PropVariant.cpp + ../../../Windows/PropVariantConversions.cpp + ../../../Windows/Registry.cpp + ../../../Windows/Synchronization.cpp + ../../../Windows/Time.cpp + ../../../Windows/Clipboard.cpp + ../../../Windows/System.cpp + ../../../Windows/Window.cpp + ../../../Windows/Control/Dialog.cpp + ../../../Windows/Control/Controls.cpp + ../../../Windows/Control/Window2.cpp + + ../../../Common/Lang.cpp + ../../../Common/CRC.cpp + ../../../myWindows/wine_date_and_time.cpp + ../../../myWindows/wine_GetXXXDefaultLangID.cpp + + ../../../../C/Alloc.c + ../../../../C/Sha256.c + ../../../../C/Sort.c + ../../../../C/Threads.c + ../../../../C/7zCrc.c + ../../../../C/7zCrcOpt.c + ) + +IF(HAVE_PTHREADS) + TARGET_LINK_LIBRARIES(7zFM + + ${wxWidgets_LIBRARIES} + + ${CMAKE_THREAD_LIBS_INIT}) +ENDIF(HAVE_PTHREADS) + + diff --git a/CPP/7zip/CMAKE/CMakeLists_7zG.txt b/CPP/7zip/CMAKE/CMakeLists_7zG.txt new file mode 100644 index 0000000..3803197 --- /dev/null +++ b/CPP/7zip/CMAKE/CMakeLists_7zG.txt @@ -0,0 +1,131 @@ + +add_definitions( -DLANG -DEXTERNAL_LZMA -DEXTERNAL_CODECS -DBENCH_MT ) + +IF(APPLE) + add_definitions(-DENV_MACOSX -D__WXMAC__) +ENDIF(APPLE) + + +find_package(wxWidgets COMPONENTS core base adv REQUIRED) + +include( ${wxWidgets_USE_FILE} ) + +add_definitions(-D_FILE_OFFSET_BITS=64 -D_LARGE_FILES) + +include_directories( + ../../../myWindows + ../../../ + ../../../include_windows +) + + + + +add_executable(7zG + + ../../UI/GUI/CompressDialog.cpp + ../../UI/GUI/CompressDialog_rc.cpp + ../../UI/GUI/ExtractDialog.cpp + ../../UI/GUI/ExtractDialog_rc.cpp + ../../UI/GUI/BenchmarkDialog.cpp + ../../UI/GUI/BenchmarkDialog_rc.cpp + ../../UI/GUI/ExtractGUI.cpp + ../../UI/GUI/GUI.cpp + ../../UI/GUI/wxGUI.cpp + ../../UI/GUI/UpdateCallbackGUI.cpp + ../../UI/GUI/UpdateGUI.cpp + ../../UI/Common/ArchiveCommandLine.cpp + ../../UI/Common/ArchiveExtractCallback.cpp + ../../UI/Common/ArchiveOpenCallback.cpp + ../../UI/Common/Bench.cpp + ../../UI/Common/DefaultName.cpp + ../../UI/Common/EnumDirItems.cpp + ../../UI/Common/Extract.cpp + ../../UI/Common/ExtractingFilePath.cpp + ../../UI/Common/LoadCodecs.cpp + ../../UI/Common/OpenArchive.cpp + ../../UI/Common/PropIDUtils.cpp + ../../UI/Common/SetProperties.cpp + ../../UI/Common/SortUtils.cpp + ../../UI/Common/TempFiles.cpp + ../../UI/Common/Update.cpp + ../../UI/Common/UpdateAction.cpp + ../../UI/Common/UpdateCallback.cpp + ../../UI/Common/UpdatePair.cpp + ../../UI/Common/UpdateProduce.cpp + ../../UI/Common/WorkDir.cpp + ../../UI/Common/ZipRegistry.cpp + ../../UI/Explorer/MyMessages.cpp + + + ../../UI/FileManager/FormatUtils.cpp + ../../UI/FileManager/ProgramLocation.cpp + ../../UI/FileManager/ProgressDialog2.cpp + ../../UI/FileManager/ProgressDialog2_rc.cpp + ../../UI/FileManager/MessagesDialog.cpp + ../../UI/FileManager/MessagesDialog_rc.cpp + ../../UI/FileManager/OverwriteDialog.cpp + ../../UI/FileManager/OverwriteDialog_rc.cpp + ../../UI/FileManager/PasswordDialog.cpp + ../../UI/FileManager/PasswordDialog_rc.cpp + ../../UI/FileManager/ExtractCallback.cpp + ../../UI/FileManager/SplitUtils.cpp + ../../UI/FileManager/StringUtils.cpp + ../../UI/FileManager/LangUtils.cpp + ../../Archive/Common/OutStreamWithCRC.cpp + ../../Common/CreateCoder.cpp + ../../Common/FilePathAutoRename.cpp + ../../Common/FileStreams.cpp + ../../Common/FilterCoder.cpp + ../../Common/ProgressUtils.cpp + ../../Common/StreamUtils.cpp + ../../Compress/CopyCoder.cpp + ../../../Common/CommandLineParser.cpp + ../../../Common/CRC.cpp + ../../../Common/IntToString.cpp + ../../../Common/Lang.cpp + ../../../Common/ListFileUtils.cpp + ../../../Common/MyString.cpp + ../../../Common/MyVector.cpp + ../../../Common/StringConvert.cpp + ../../../Common/StringToInt.cpp + ../../../Common/TextConfig.cpp + ../../../Common/UTFConvert.cpp + ../../../Common/Wildcard.cpp + ../../../Common/MyWindows.cpp + ../../../Windows/DLL.cpp + ../../../Windows/Error.cpp + ../../../Windows/FileDir.cpp + ../../../Windows/FileFind.cpp + ../../../Windows/FileIO.cpp + ../../../Windows/FileName.cpp + ../../../Windows/PropVariant.cpp + ../../../Windows/PropVariantConversions.cpp + ../../../Windows/Registry.cpp + ../../../Windows/Synchronization.cpp + ../../../Windows/Time.cpp + ../../../Windows/System.cpp + ../../../Windows/Window.cpp + ../../../Windows/Control/Dialog.cpp + ../../../Windows/Control/Controls.cpp + + ../../../myWindows/wine_date_and_time.cpp + ../../../myWindows/wine_GetXXXDefaultLangID.cpp + + ../../../../C/Alloc.c + ../../../../C/Threads.c + ../../../../C/7zCrc.c + ../../../../C/7zCrcOpt.c + + ) + + +IF(HAVE_PTHREADS) + TARGET_LINK_LIBRARIES(7zG + + ${wxWidgets_LIBRARIES} + + ${CMAKE_THREAD_LIBS_INIT}) +ENDIF(HAVE_PTHREADS) + + diff --git a/CPP/7zip/CMAKE/CMakeLists_7za.txt b/CPP/7zip/CMAKE/CMakeLists_7za.txt new file mode 100644 index 0000000..712c856 --- /dev/null +++ b/CPP/7zip/CMAKE/CMakeLists_7za.txt @@ -0,0 +1,253 @@ + + +include_directories( + ../../../myWindows + ../../../ + ../../../include_windows +) + + +IF(APPLE) + add_definitions(-DENV_MACOSX) + FIND_LIBRARY(COREFOUNDATION_LIBRARY CoreFoundation ) +ENDIF(APPLE) + +add_executable(7za + + ../../../myWindows/myGetTickCount.cpp + ../../../myWindows/wine_date_and_time.cpp + ../../../myWindows/myAddExeFlag.cpp + ../../../myWindows/mySplitCommandLine.cpp + + ../../UI/Console/BenchCon.cpp + ../../UI/Console/ConsoleClose.cpp + ../../UI/Console/ExtractCallbackConsole.cpp + ../../UI/Console/List.cpp + ../../UI/Console/Main.cpp + ../../UI/Console/MainAr.cpp + ../../UI/Console/OpenCallbackConsole.cpp + ../../UI/Console/PercentPrinter.cpp + ../../UI/Console/UpdateCallbackConsole.cpp + ../../UI/Console/UserInputUtils.cpp + + ../../../Common/CommandLineParser.cpp + ../../../Common/CRC.cpp + ../../../Common/IntToString.cpp + ../../../Common/ListFileUtils.cpp + ../../../Common/StdInStream.cpp + ../../../Common/StdOutStream.cpp + ../../../Common/MyString.cpp + ../../../Common/MyWindows.cpp + ../../../Common/StringConvert.cpp + ../../../Common/StringToInt.cpp + ../../../Common/UTFConvert.cpp + ../../../Common/MyVector.cpp + ../../../Common/Wildcard.cpp + + ../../../Windows/Error.cpp + ../../../Windows/FileDir.cpp + ../../../Windows/FileFind.cpp + ../../../Windows/FileIO.cpp + ../../../Windows/FileName.cpp + ../../../Windows/PropVariant.cpp + ../../../Windows/PropVariantConversions.cpp + ../../../Windows/Synchronization.cpp + ../../../Windows/System.cpp + ../../../Windows/Time.cpp + + ../../Common/CreateCoder.cpp + ../../Common/CWrappers.cpp + ../../Common/FilePathAutoRename.cpp + ../../Common/FileStreams.cpp + ../../Common/FilterCoder.cpp + ../../Common/InBuffer.cpp + ../../Common/InOutTempBuffer.cpp + ../../Common/LimitedStreams.cpp + ../../Common/LockedStream.cpp + ../../Common/MemBlocks.cpp + ../../Common/MethodId.cpp + ../../Common/MethodProps.cpp + ../../Common/OffsetStream.cpp + ../../Common/OutBuffer.cpp + ../../Common/OutMemStream.cpp + ../../Common/ProgressMt.cpp + ../../Common/ProgressUtils.cpp + ../../Common/StreamBinder.cpp + ../../Common/StreamObjects.cpp + ../../Common/StreamUtils.cpp + ../../Common/VirtThread.cpp + + ../../UI/Common/ArchiveCommandLine.cpp + ../../UI/Common/ArchiveExtractCallback.cpp + ../../UI/Common/ArchiveOpenCallback.cpp + ../../UI/Common/Bench.cpp + ../../UI/Common/DefaultName.cpp + ../../UI/Common/EnumDirItems.cpp + ../../UI/Common/Extract.cpp + ../../UI/Common/ExtractingFilePath.cpp + ../../UI/Common/LoadCodecs.cpp + ../../UI/Common/OpenArchive.cpp + ../../UI/Common/PropIDUtils.cpp + ../../UI/Common/SetProperties.cpp + ../../UI/Common/SortUtils.cpp + ../../UI/Common/TempFiles.cpp + ../../UI/Common/Update.cpp + ../../UI/Common/UpdateAction.cpp + ../../UI/Common/UpdateCallback.cpp + ../../UI/Common/UpdatePair.cpp + ../../UI/Common/UpdateProduce.cpp + + ../../Archive/Bz2Handler.cpp + ../../Archive/DeflateProps.cpp + ../../Archive/GzHandler.cpp + ../../Archive/LzmaHandler.cpp + ../../Archive/PpmdHandler.cpp + ../../Archive/SplitHandler.cpp + ../../Archive/XzHandler.cpp + ../../Archive/ZHandler.cpp + + ../../Archive/Common/CoderMixer2.cpp + ../../Archive/Common/CoderMixer2MT.cpp + ../../Archive/Common/CrossThreadProgress.cpp + ../../Archive/Common/DummyOutStream.cpp + ../../Archive/Common/FindSignature.cpp + ../../Archive/Common/HandlerOut.cpp + ../../Archive/Common/InStreamWithCRC.cpp + ../../Archive/Common/ItemNameUtils.cpp + ../../Archive/Common/MultiStream.cpp + ../../Archive/Common/OutStreamWithCRC.cpp + ../../Archive/Common/ParseProperties.cpp + + ../../Archive/7z/7zCompressionMode.cpp + ../../Archive/7z/7zDecode.cpp + ../../Archive/7z/7zEncode.cpp + ../../Archive/7z/7zExtract.cpp + ../../Archive/7z/7zFolderInStream.cpp + ../../Archive/7z/7zFolderOutStream.cpp + ../../Archive/7z/7zHandler.cpp + ../../Archive/7z/7zHandlerOut.cpp + ../../Archive/7z/7zHeader.cpp + ../../Archive/7z/7zIn.cpp + ../../Archive/7z/7zOut.cpp + ../../Archive/7z/7zProperties.cpp + ../../Archive/7z/7zSpecStream.cpp + ../../Archive/7z/7zUpdate.cpp + ../../Archive/7z/7zRegister.cpp + + ../../Archive/Cab/CabBlockInStream.cpp + ../../Archive/Cab/CabHandler.cpp + ../../Archive/Cab/CabHeader.cpp + ../../Archive/Cab/CabIn.cpp + ../../Archive/Cab/CabRegister.cpp + + ../../Archive/Tar/TarHandler.cpp + ../../Archive/Tar/TarHandlerOut.cpp + ../../Archive/Tar/TarHeader.cpp + ../../Archive/Tar/TarIn.cpp + ../../Archive/Tar/TarOut.cpp + ../../Archive/Tar/TarRegister.cpp + ../../Archive/Tar/TarUpdate.cpp + + ../../Archive/Zip/ZipAddCommon.cpp + ../../Archive/Zip/ZipHandler.cpp + ../../Archive/Zip/ZipHandlerOut.cpp + ../../Archive/Zip/ZipHeader.cpp + ../../Archive/Zip/ZipIn.cpp + ../../Archive/Zip/ZipItem.cpp + ../../Archive/Zip/ZipOut.cpp + ../../Archive/Zip/ZipUpdate.cpp + ../../Archive/Zip/ZipRegister.cpp + + ../../Compress/Bcj2Coder.cpp + ../../Compress/Bcj2Register.cpp + ../../Compress/BcjCoder.cpp + ../../Compress/BcjRegister.cpp + ../../Compress/BitlDecoder.cpp + ../../Compress/BranchCoder.cpp + ../../Compress/BranchMisc.cpp + ../../Compress/BranchRegister.cpp + ../../Compress/ByteSwap.cpp + ../../Compress/BZip2Crc.cpp + ../../Compress/BZip2Decoder.cpp + ../../Compress/BZip2Encoder.cpp + ../../Compress/BZip2Register.cpp + ../../Compress/CopyCoder.cpp + ../../Compress/CopyRegister.cpp + ../../Compress/Deflate64Register.cpp + ../../Compress/DeflateDecoder.cpp + ../../Compress/DeflateEncoder.cpp + ../../Compress/DeflateRegister.cpp + ../../Compress/DeltaFilter.cpp + ../../Compress/ImplodeDecoder.cpp + ../../Compress/ImplodeHuffmanDecoder.cpp + ../../Compress/Lzma2Decoder.cpp + ../../Compress/Lzma2Encoder.cpp + ../../Compress/Lzma2Register.cpp + ../../Compress/LzmaDecoder.cpp + ../../Compress/LzmaEncoder.cpp + ../../Compress/LzmaRegister.cpp + ../../Compress/LzOutWindow.cpp + ../../Compress/Lzx86Converter.cpp + ../../Compress/LzxDecoder.cpp + ../../Compress/PpmdDecoder.cpp + ../../Compress/PpmdEncoder.cpp + ../../Compress/PpmdRegister.cpp + ../../Compress/PpmdZip.cpp + ../../Compress/QuantumDecoder.cpp + ../../Compress/ShrinkDecoder.cpp + ../../Compress/ZDecoder.cpp + + ../../Crypto/7zAes.cpp + ../../Crypto/7zAesRegister.cpp + ../../Crypto/HmacSha1.cpp + ../../Crypto/MyAes.cpp + ../../Crypto/Pbkdf2HmacSha1.cpp + ../../Crypto/RandGen.cpp + ../../Crypto/Sha1.cpp + ../../Crypto/WzAes.cpp + ../../Crypto/ZipCrypto.cpp + ../../Crypto/ZipStrong.cpp + + ../../../../C/Aes.c + ../../../../C/7zStream.c + ../../../../C/Alloc.c + ../../../../C/Bra.c + ../../../../C/Bra86.c + ../../../../C/BraIA64.c + ../../../../C/BwtSort.c + ../../../../C/Delta.c + ../../../../C/HuffEnc.c + ../../../../C/LzFind.c + ../../../../C/LzFindMt.c + ../../../../C/Lzma2Dec.c + ../../../../C/Lzma2Enc.c + ../../../../C/LzmaDec.c + ../../../../C/LzmaEnc.c + ../../../../C/MtCoder.c + ../../../../C/Ppmd7.c + ../../../../C/Ppmd7Dec.c + ../../../../C/Ppmd7Enc.c + ../../../../C/Ppmd8.c + ../../../../C/Ppmd8Dec.c + ../../../../C/Ppmd8Enc.c + ../../../../C/Sha256.c + ../../../../C/Sort.c + ../../../../C/Threads.c + ../../../../C/Xz.c + ../../../../C/XzCrc64.c + ../../../../C/XzDec.c + ../../../../C/XzEnc.c + ../../../../C/XzIn.c + + ../../../../C/7zCrc.c + ../../../../C/7zCrcOpt.c + + ) + +IF(APPLE) + TARGET_LINK_LIBRARIES(7za ${COREFOUNDATION_LIBRARY} ${CMAKE_THREAD_LIBS_INIT}) +ELSE(APPLE) + IF(HAVE_PTHREADS) + TARGET_LINK_LIBRARIES(7za ${CMAKE_THREAD_LIBS_INIT}) + ENDIF(HAVE_PTHREADS) +ENDIF(APPLE) diff --git a/CPP/7zip/CMAKE/CMakeLists_ALL.txt b/CPP/7zip/CMAKE/CMakeLists_ALL.txt new file mode 100644 index 0000000..ec4ad48 --- /dev/null +++ b/CPP/7zip/CMAKE/CMakeLists_ALL.txt @@ -0,0 +1,32 @@ +cmake_minimum_required(VERSION 2.6) + +project(p7zip) + +SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/bin + CACHE STRING "Where binaries and .dll files go" FORCE) + + +IF(HAVE_WCHAR_H) + OPTION(HAVE_UNICODE_WCHAR "Enable Unicode Support" YES) + MARK_AS_ADVANCED(HAVE_UNICODE_WCHAR) +ELSE(HAVE_WCHAR_H) + SET(HAVE_UNICODE_WCHAR 0) +ENDIF(HAVE_WCHAR_H) + +SET(HAVE_PTHREADS 0) +FIND_PACKAGE(Threads) +IF(WIN32 OR CMAKE_USE_PTHREADS_INIT) + SET(HAVE_PTHREADS 1) +ENDIF(WIN32 OR CMAKE_USE_PTHREADS_INIT) + +add_definitions(-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -DNDEBUG -D_REENTRANT -DENV_UNIX -DBREAK_HANDLER -DUNICODE -D_UNICODE) + + +add_subdirectory(7za) + +add_subdirectory(7zG) + +add_subdirectory(7zFM) + + +add_subdirectory(Format7zFree bin) diff --git a/CPP/7zip/CMAKE/CMakeLists_Format7zFree.txt b/CPP/7zip/CMAKE/CMakeLists_Format7zFree.txt new file mode 100644 index 0000000..90c3349 --- /dev/null +++ b/CPP/7zip/CMAKE/CMakeLists_Format7zFree.txt @@ -0,0 +1,290 @@ + + +include_directories( + ../../../myWindows + ../../../ + ../../../include_windows +) + +add_definitions(-DEXTERNAL_CODECS) + +IF(APPLE) + add_definitions(-DENV_MACOSX) + FIND_LIBRARY(COREFOUNDATION_LIBRARY CoreFoundation ) +ENDIF(APPLE) + +add_library(7z MODULE + + ../../../myWindows/myGetTickCount.cpp + ../../../myWindows/wine_date_and_time.cpp + + ../../../Common/CRC.cpp + ../../../Common/IntToString.cpp + ../../../Common/MyMap.cpp + ../../../Common/MyString.cpp + ../../../Common/MyWindows.cpp + ../../../Common/MyXml.cpp + ../../../Common/StringConvert.cpp + ../../../Common/StringToInt.cpp + ../../../Common/UTFConvert.cpp + ../../../Common/MyVector.cpp + ../../../Common/Wildcard.cpp + + ../../../Windows/FileDir.cpp + ../../../Windows/FileFind.cpp + ../../../Windows/FileIO.cpp + ../../../Windows/PropVariant.cpp + ../../../Windows/PropVariantUtils.cpp + ../../../Windows/Synchronization.cpp + ../../../Windows/System.cpp + ../../../Windows/Time.cpp + + ../../Common/InBuffer.cpp + ../../Common/InOutTempBuffer.cpp + ../../Common/CreateCoder.cpp + ../../Common/CWrappers.cpp + ../../Common/FilterCoder.cpp + ../../Common/LimitedStreams.cpp + ../../Common/LockedStream.cpp + ../../Common/MethodId.cpp + ../../Common/MethodProps.cpp + ../../Common/MemBlocks.cpp + ../../Common/OffsetStream.cpp + ../../Common/OutBuffer.cpp + ../../Common/OutMemStream.cpp + ../../Common/ProgressMt.cpp + ../../Common/ProgressUtils.cpp + ../../Common/StreamBinder.cpp + ../../Common/StreamObjects.cpp + ../../Common/StreamUtils.cpp + ../../Common/VirtThread.cpp + + ../../Archive/ArchiveExports.cpp + ../../Archive/DllExports2.cpp + ../../Archive/ApmHandler.cpp + ../../Archive/ArjHandler.cpp + ../../Archive/Bz2Handler.cpp + ../../Archive/CpioHandler.cpp + ../../Archive/CramfsHandler.cpp + ../../Archive/DebHandler.cpp + ../../Archive/DeflateProps.cpp + ../../Archive/DmgHandler.cpp + ../../Archive/ElfHandler.cpp + ../../Archive/FatHandler.cpp + ../../Archive/FlvHandler.cpp + ../../Archive/GzHandler.cpp + ../../Archive/LzhHandler.cpp + ../../Archive/LzmaHandler.cpp + ../../Archive/MachoHandler.cpp + ../../Archive/MbrHandler.cpp + ../../Archive/MslzHandler.cpp + ../../Archive/MubHandler.cpp + ../../Archive/NtfsHandler.cpp + ../../Archive/PeHandler.cpp + ../../Archive/PpmdHandler.cpp + ../../Archive/RpmHandler.cpp + ../../Archive/SplitHandler.cpp + ../../Archive/SwfHandler.cpp + ../../Archive/SquashfsHandler.cpp + ../../Archive/VhdHandler.cpp + ../../Archive/XarHandler.cpp + ../../Archive/XzHandler.cpp + ../../Archive/ZHandler.cpp + + ../../Archive/Common/CoderMixer2.cpp + ../../Archive/Common/CoderMixer2MT.cpp + ../../Archive/Common/CrossThreadProgress.cpp + ../../Archive/Common/DummyOutStream.cpp + ../../Archive/Common/FindSignature.cpp + ../../Archive/Common/InStreamWithCRC.cpp + ../../Archive/Common/ItemNameUtils.cpp + ../../Archive/Common/MultiStream.cpp + ../../Archive/Common/OutStreamWithCRC.cpp + ../../Archive/Common/OutStreamWithSha1.cpp + ../../Archive/Common/HandlerOut.cpp + ../../Archive/Common/ParseProperties.cpp + + ../../Archive/7z/7zCompressionMode.cpp + ../../Archive/7z/7zDecode.cpp + ../../Archive/7z/7zEncode.cpp + ../../Archive/7z/7zExtract.cpp + ../../Archive/7z/7zFolderInStream.cpp + ../../Archive/7z/7zFolderOutStream.cpp + ../../Archive/7z/7zHandler.cpp + ../../Archive/7z/7zHandlerOut.cpp + ../../Archive/7z/7zHeader.cpp + ../../Archive/7z/7zIn.cpp + ../../Archive/7z/7zOut.cpp + ../../Archive/7z/7zProperties.cpp + ../../Archive/7z/7zSpecStream.cpp + ../../Archive/7z/7zUpdate.cpp + ../../Archive/7z/7zRegister.cpp + + ../../Archive/Cab/CabBlockInStream.cpp + ../../Archive/Cab/CabHandler.cpp + ../../Archive/Cab/CabHeader.cpp + ../../Archive/Cab/CabIn.cpp + ../../Archive/Cab/CabRegister.cpp + + ../../Archive/Chm/ChmHandler.cpp + ../../Archive/Chm/ChmHeader.cpp + ../../Archive/Chm/ChmIn.cpp + ../../Archive/Chm/ChmRegister.cpp + + ../../Archive/Com/ComHandler.cpp + ../../Archive/Com/ComIn.cpp + ../../Archive/Com/ComRegister.cpp + + ../../Archive/Hfs/HfsHandler.cpp + ../../Archive/Hfs/HfsIn.cpp + ../../Archive/Hfs/HfsRegister.cpp + + ../../Archive/Iso/IsoHandler.cpp + ../../Archive/Iso/IsoHeader.cpp + ../../Archive/Iso/IsoIn.cpp + ../../Archive/Iso/IsoRegister.cpp + + ../../Archive/Nsis/NsisDecode.cpp + ../../Archive/Nsis/NsisHandler.cpp + ../../Archive/Nsis/NsisIn.cpp + ../../Archive/Nsis/NsisRegister.cpp + + ../../Archive/Rar/RarHandler.cpp + ../../Archive/Rar/RarHeader.cpp + ../../Archive/Rar/RarIn.cpp + ../../Archive/Rar/RarItem.cpp + ../../Archive/Rar/RarVolumeInStream.cpp + ../../Archive/Rar/RarRegister.cpp + + ../../Archive/Tar/TarHandler.cpp + ../../Archive/Tar/TarHandlerOut.cpp + ../../Archive/Tar/TarHeader.cpp + ../../Archive/Tar/TarIn.cpp + ../../Archive/Tar/TarOut.cpp + ../../Archive/Tar/TarRegister.cpp + ../../Archive/Tar/TarUpdate.cpp + + ../../Archive/Udf/UdfHandler.cpp + ../../Archive/Udf/UdfIn.cpp + ../../Archive/Udf/UdfRegister.cpp + + ../../Archive/Wim/WimHandler.cpp + ../../Archive/Wim/WimHandlerOut.cpp + ../../Archive/Wim/WimIn.cpp + ../../Archive/Wim/WimRegister.cpp + + ../../Archive/Zip/ZipAddCommon.cpp + ../../Archive/Zip/ZipHandler.cpp + ../../Archive/Zip/ZipHandlerOut.cpp + ../../Archive/Zip/ZipHeader.cpp + ../../Archive/Zip/ZipIn.cpp + ../../Archive/Zip/ZipItem.cpp + ../../Archive/Zip/ZipOut.cpp + ../../Archive/Zip/ZipUpdate.cpp + ../../Archive/Zip/ZipRegister.cpp + + ../../Compress/CodecExports.cpp + ../../Compress/ArjDecoder1.cpp + ../../Compress/ArjDecoder2.cpp + ../../Compress/Bcj2Coder.cpp + ../../Compress/Bcj2Register.cpp + ../../Compress/BcjCoder.cpp + ../../Compress/BcjRegister.cpp + ../../Compress/BitlDecoder.cpp + ../../Compress/BranchCoder.cpp + ../../Compress/BranchMisc.cpp + ../../Compress/BranchRegister.cpp + ../../Compress/ByteSwap.cpp + ../../Compress/BZip2Crc.cpp + ../../Compress/BZip2Decoder.cpp + ../../Compress/BZip2Encoder.cpp + ../../Compress/BZip2Register.cpp + ../../Compress/CopyCoder.cpp + ../../Compress/CopyRegister.cpp + ../../Compress/Deflate64Register.cpp + ../../Compress/DeflateDecoder.cpp + ../../Compress/DeflateEncoder.cpp + ../../Compress/DeflateRegister.cpp + ../../Compress/DeltaFilter.cpp + ../../Compress/Lzma2Decoder.cpp + ../../Compress/Lzma2Encoder.cpp + ../../Compress/Lzma2Register.cpp + ../../Compress/ImplodeDecoder.cpp + ../../Compress/ImplodeHuffmanDecoder.cpp + ../../Compress/LzhDecoder.cpp + ../../Compress/LzmaDecoder.cpp + ../../Compress/LzmaEncoder.cpp + ../../Compress/LzmaRegister.cpp + ../../Compress/LzOutWindow.cpp + ../../Compress/Lzx86Converter.cpp + ../../Compress/LzxDecoder.cpp + ../../Compress/PpmdDecoder.cpp + ../../Compress/PpmdEncoder.cpp + ../../Compress/PpmdRegister.cpp + ../../Compress/PpmdZip.cpp + ../../Compress/QuantumDecoder.cpp + ../../Compress/ShrinkDecoder.cpp + ../../Compress/ZlibDecoder.cpp + ../../Compress/ZlibEncoder.cpp + ../../Compress/ZDecoder.cpp + + ../../Crypto/7zAes.cpp + ../../Crypto/7zAesRegister.cpp + ../../Crypto/HmacSha1.cpp + ../../Crypto/MyAes.cpp + ../../Crypto/Pbkdf2HmacSha1.cpp + ../../Crypto/RandGen.cpp + ../../Crypto/Sha1.cpp + ../../Crypto/WzAes.cpp + ../../Crypto/Rar20Crypto.cpp + ../../Crypto/RarAes.cpp + ../../Crypto/ZipCrypto.cpp + ../../Crypto/ZipStrong.cpp + + + ../../../../C/7zBuf2.c + ../../../../C/7zStream.c + ../../../../C/Aes.c + ../../../../C/Alloc.c + ../../../../C/Bra.c + ../../../../C/Bra86.c + ../../../../C/BraIA64.c + ../../../../C/BwtSort.c + ../../../../C/Delta.c + ../../../../C/HuffEnc.c + ../../../../C/LzFind.c + ../../../../C/LzFindMt.c + ../../../../C/Lzma2Dec.c + ../../../../C/Lzma2Enc.c + ../../../../C/LzmaDec.c + ../../../../C/LzmaEnc.c + ../../../../C/MtCoder.c + ../../../../C/Ppmd7.c + ../../../../C/Ppmd7Dec.c + ../../../../C/Ppmd7Enc.c + ../../../../C/Ppmd8.c + ../../../../C/Ppmd8Dec.c + ../../../../C/Ppmd8Enc.c + ../../../../C/Sha256.c + ../../../../C/Sort.c + ../../../../C/Threads.c + ../../../../C/Xz.c + ../../../../C/XzCrc64.c + ../../../../C/XzDec.c + ../../../../C/XzEnc.c + ../../../../C/XzIn.c + + ../../../../C/7zCrc.c + ../../../../C/7zCrcOpt.c + + ) + +SET_TARGET_PROPERTIES(7z PROPERTIES PREFIX "") + +IF(APPLE) + TARGET_LINK_LIBRARIES(7z ${COREFOUNDATION_LIBRARY} ${CMAKE_THREAD_LIBS_INIT}) +ELSE(APPLE) + IF(HAVE_PTHREADS) + TARGET_LINK_LIBRARIES(7z ${CMAKE_THREAD_LIBS_INIT}) + ENDIF(HAVE_PTHREADS) +ENDIF(APPLE) diff --git a/CPP/7zip/CMAKE/generate.sh b/CPP/7zip/CMAKE/generate.sh new file mode 100755 index 0000000..3b5e8b0 --- /dev/null +++ b/CPP/7zip/CMAKE/generate.sh @@ -0,0 +1,37 @@ + +doit() +{ + cd .. + rm -fr "$3.$1" + mkdir "$3.$1" + cd "$3.$1" + cp ../CMAKE/$4 CMakeLists.txt + + mkdir 7za 7zFM 7zG Format7zFree + + cp ../CMAKE/CMakeLists_7za.txt 7za/CMakeLists.txt + + cp ../CMAKE/CMakeLists_7zFM.txt 7zFM/CMakeLists.txt + + cp ../CMAKE/CMakeLists_7zG.txt 7zG/CMakeLists.txt + + cp ../CMAKE/CMakeLists_Format7zFree.txt Format7zFree/CMakeLists.txt + + + cmake -G "$2" -DCMAKE_BUILD_TYPE=Debug + #cmake -G "$2" -DCMAKE_BUILD_TYPE=Release +} + +CURDIR=$PWD + +cd $CURDIR +doit "Unix" "Unix Makefiles" "P7ZIP" "CMakeLists_ALL.txt" + +cd $CURDIR +doit "codeblocks" "CodeBlocks - Unix Makefiles" "P7ZIP" "CMakeLists_ALL.txt" + +cd $CURDIR +doit "KDevelop3" "KDevelop3" "P7ZIP" "CMakeLists_ALL.txt" + +cd $CURDIR +doit "EclipseCDT4" "Eclipse CDT4 - Unix Makefiles" "P7ZIP" "CMakeLists_ALL.txt" diff --git a/CPP/7zip/CMAKE/generate_xcode.sh b/CPP/7zip/CMAKE/generate_xcode.sh new file mode 100755 index 0000000..1acc5a8 --- /dev/null +++ b/CPP/7zip/CMAKE/generate_xcode.sh @@ -0,0 +1,32 @@ + +doit() +{ + cd .. + rm -fr "$3.$1" + mkdir "$3.$1" + cd "$3.$1" + cp ../CMAKE/$4 CMakeLists.txt + + mkdir 7za 7zFM 7zG Format7zFree + + cp ../CMAKE/CMakeLists_7za.txt 7za/CMakeLists.txt + + cp ../CMAKE/CMakeLists_7zFM.txt 7zFM/CMakeLists.txt + + cp ../CMAKE/CMakeLists_7zG.txt 7zG/CMakeLists.txt + + cp ../CMAKE/CMakeLists_Format7zFree.txt Format7zFree/CMakeLists.txt + + + cmake -G "$2" -DCMAKE_BUILD_TYPE=Debug + #cmake -G "$2" -DCMAKE_BUILD_TYPE=Release +} + + +CMAKE_OSX_ARCHITECTURES=i386 +export CMAKE_OSX_ARCHITECTURES + +CURDIR=$PWD + + cd $CURDIR + doit "Xcode" "Xcode" "P7ZIP" "CMakeLists_ALL.txt" diff --git a/CPP/7zip/Common/CWrappers.cpp b/CPP/7zip/Common/CWrappers.cpp new file mode 100644 index 0000000..358f0b5 --- /dev/null +++ b/CPP/7zip/Common/CWrappers.cpp @@ -0,0 +1,226 @@ +// CWrappers.h + +#include "StdAfx.h" + +#include "../../../C/Alloc.h" + +#include "CWrappers.h" + +#include "StreamUtils.h" + +#define PROGRESS_UNKNOWN_VALUE ((UInt64)(Int64)-1) + +#define CONVERT_PR_VAL(x) (x == PROGRESS_UNKNOWN_VALUE ? NULL : &x) + +static SRes CompressProgress(void *pp, UInt64 inSize, UInt64 outSize) +{ + CCompressProgressWrap *p = (CCompressProgressWrap *)pp; + p->Res = p->Progress->SetRatioInfo(CONVERT_PR_VAL(inSize), CONVERT_PR_VAL(outSize)); + return (SRes)p->Res; +} + +CCompressProgressWrap::CCompressProgressWrap(ICompressProgressInfo *progress) +{ + p.Progress = CompressProgress; + Progress = progress; + Res = SZ_OK; +} + +static const UInt32 kStreamStepSize = (UInt32)1 << 31; + +SRes HRESULT_To_SRes(HRESULT res, SRes defaultRes) +{ + switch(res) + { + case S_OK: return SZ_OK; + case E_OUTOFMEMORY: return SZ_ERROR_MEM; + case E_INVALIDARG: return SZ_ERROR_PARAM; + case E_ABORT: return SZ_ERROR_PROGRESS; + case S_FALSE: return SZ_ERROR_DATA; + } + return defaultRes; +} + +static SRes MyRead(void *object, void *data, size_t *size) +{ + CSeqInStreamWrap *p = (CSeqInStreamWrap *)object; + UInt32 curSize = ((*size < kStreamStepSize) ? (UInt32)*size : kStreamStepSize); + p->Res = (p->Stream->Read(data, curSize, &curSize)); + *size = curSize; + if (p->Res == S_OK) + return SZ_OK; + return HRESULT_To_SRes(p->Res, SZ_ERROR_READ); +} + +static size_t MyWrite(void *object, const void *data, size_t size) +{ + CSeqOutStreamWrap *p = (CSeqOutStreamWrap *)object; + if (p->Stream) + { + p->Res = WriteStream(p->Stream, data, size); + if (p->Res != 0) + return 0; + } + else + p->Res = S_OK; + p->Processed += size; + return size; +} + +CSeqInStreamWrap::CSeqInStreamWrap(ISequentialInStream *stream) +{ + p.Read = MyRead; + Stream = stream; +} + +CSeqOutStreamWrap::CSeqOutStreamWrap(ISequentialOutStream *stream) +{ + p.Write = MyWrite; + Stream = stream; + Res = SZ_OK; + Processed = 0; +} + +HRESULT SResToHRESULT(SRes res) +{ + switch(res) + { + case SZ_OK: return S_OK; + case SZ_ERROR_MEM: return E_OUTOFMEMORY; + case SZ_ERROR_PARAM: return E_INVALIDARG; + case SZ_ERROR_PROGRESS: return E_ABORT; + case SZ_ERROR_DATA: return S_FALSE; + } + return E_FAIL; +} + +static SRes InStreamWrap_Read(void *pp, void *data, size_t *size) +{ + CSeekInStreamWrap *p = (CSeekInStreamWrap *)pp; + UInt32 curSize = ((*size < kStreamStepSize) ? (UInt32)*size : kStreamStepSize); + p->Res = p->Stream->Read(data, curSize, &curSize); + *size = curSize; + return (p->Res == S_OK) ? SZ_OK : SZ_ERROR_READ; +} + +static SRes InStreamWrap_Seek(void *pp, Int64 *offset, ESzSeek origin) +{ + CSeekInStreamWrap *p = (CSeekInStreamWrap *)pp; + UInt32 moveMethod; + switch(origin) + { + case SZ_SEEK_SET: moveMethod = STREAM_SEEK_SET; break; + case SZ_SEEK_CUR: moveMethod = STREAM_SEEK_CUR; break; + case SZ_SEEK_END: moveMethod = STREAM_SEEK_END; break; + default: return SZ_ERROR_PARAM; + } + UInt64 newPosition; + p->Res = p->Stream->Seek(*offset, moveMethod, &newPosition); + *offset = (Int64)newPosition; + return (p->Res == S_OK) ? SZ_OK : SZ_ERROR_READ; +} + +CSeekInStreamWrap::CSeekInStreamWrap(IInStream *stream) +{ + Stream = stream; + p.Read = InStreamWrap_Read; + p.Seek = InStreamWrap_Seek; + Res = S_OK; +} + + +/* ---------- CByteInBufWrap ---------- */ + +void CByteInBufWrap::Free() +{ + ::MidFree(Buf); + Buf = 0; +} + +bool CByteInBufWrap::Alloc(UInt32 size) +{ + if (Buf == 0 || size != Size) + { + Free(); + Lim = Cur = Buf = (Byte *)::MidAlloc((size_t)size); + Size = size; + } + return (Buf != 0); +} + +Byte CByteInBufWrap::ReadByteFromNewBlock() +{ + if (Res == S_OK) + { + UInt32 avail; + Processed += (Cur - Buf); + Res = Stream->Read(Buf, Size, &avail); + Cur = Buf; + Lim = Buf + avail; + if (avail != 0) + return *Cur++; + } + Extra = true; + return 0; +} + +static Byte Wrap_ReadByte(void *pp) +{ + CByteInBufWrap *p = (CByteInBufWrap *)pp; + if (p->Cur != p->Lim) + return *p->Cur++; + return p->ReadByteFromNewBlock(); +} + +CByteInBufWrap::CByteInBufWrap(): Buf(0) +{ + p.Read = Wrap_ReadByte; +} + + +/* ---------- CByteOutBufWrap ---------- */ + +void CByteOutBufWrap::Free() +{ + ::MidFree(Buf); + Buf = 0; +} + +bool CByteOutBufWrap::Alloc(size_t size) +{ + if (Buf == 0 || size != Size) + { + Free(); + Buf = (Byte *)::MidAlloc(size); + Size = size; + } + return (Buf != 0); +} + +HRESULT CByteOutBufWrap::Flush() +{ + if (Res == S_OK) + { + size_t size = (Cur - Buf); + Res = WriteStream(Stream, Buf, size); + if (Res == S_OK) + Processed += size; + Cur = Buf; + } + return Res; +} + +static void Wrap_WriteByte(void *pp, Byte b) +{ + CByteOutBufWrap *p = (CByteOutBufWrap *)pp; + Byte *dest = p->Cur; + *dest = b; + p->Cur = ++dest; + if (dest == p->Lim) + p->Flush(); +} + +CByteOutBufWrap::CByteOutBufWrap(): Buf(0) +{ + p.Write = Wrap_WriteByte; +} diff --git a/CPP/7zip/Common/CWrappers.h b/CPP/7zip/Common/CWrappers.h new file mode 100644 index 0000000..80a8a1b --- /dev/null +++ b/CPP/7zip/Common/CWrappers.h @@ -0,0 +1,109 @@ +// CWrappers.h + +#ifndef __C_WRAPPERS_H +#define __C_WRAPPERS_H + +#include "../ICoder.h" +#include "../../Common/MyCom.h" + +struct CCompressProgressWrap +{ + ICompressProgress p; + ICompressProgressInfo *Progress; + HRESULT Res; + CCompressProgressWrap(ICompressProgressInfo *progress); +}; + +struct CSeqInStreamWrap +{ + ISeqInStream p; + ISequentialInStream *Stream; + HRESULT Res; + CSeqInStreamWrap(ISequentialInStream *stream); +}; + +struct CSeekInStreamWrap +{ + ISeekInStream p; + IInStream *Stream; + HRESULT Res; + CSeekInStreamWrap(IInStream *stream); +}; + +struct CSeqOutStreamWrap +{ + ISeqOutStream p; + ISequentialOutStream *Stream; + HRESULT Res; + UInt64 Processed; + CSeqOutStreamWrap(ISequentialOutStream *stream); +}; + +HRESULT SResToHRESULT(SRes res); + +struct CByteInBufWrap +{ + IByteIn p; + const Byte *Cur; + const Byte *Lim; + Byte *Buf; + UInt32 Size; + ISequentialInStream *Stream; + UInt64 Processed; + bool Extra; + HRESULT Res; + + CByteInBufWrap(); + ~CByteInBufWrap() { Free(); } + void Free(); + bool Alloc(UInt32 size); + void Init() + { + Lim = Cur = Buf; + Processed = 0; + Extra = false; + Res = S_OK; + } + UInt64 GetProcessed() const { return Processed + (Cur - Buf); } + Byte ReadByteFromNewBlock(); + Byte ReadByte() + { + if (Cur != Lim) + return *Cur++; + return ReadByteFromNewBlock(); + } +}; + +struct CByteOutBufWrap +{ + IByteOut p; + Byte *Cur; + const Byte *Lim; + Byte *Buf; + size_t Size; + ISequentialOutStream *Stream; + UInt64 Processed; + HRESULT Res; + + CByteOutBufWrap(); + ~CByteOutBufWrap() { Free(); } + void Free(); + bool Alloc(size_t size); + void Init() + { + Cur = Buf; + Lim = Buf + Size; + Processed = 0; + Res = S_OK; + } + UInt64 GetProcessed() const { return Processed + (Cur - Buf); } + HRESULT Flush(); + void WriteByte(Byte b) + { + *Cur++ = b; + if (Cur == Lim) + Flush(); + } +}; + +#endif diff --git a/CPP/7zip/Common/CreateCoder.cpp b/CPP/7zip/Common/CreateCoder.cpp new file mode 100644 index 0000000..cc82a0d --- /dev/null +++ b/CPP/7zip/Common/CreateCoder.cpp @@ -0,0 +1,293 @@ +// CreateCoder.cpp + +#include "StdAfx.h" + +#include "../../Windows/Defs.h" +#include "../../Windows/PropVariant.h" + +#include "CreateCoder.h" + +#include "FilterCoder.h" +#include "RegisterCodec.h" + +static const unsigned int kNumCodecsMax = 64; +unsigned int g_NumCodecs = 0; +const CCodecInfo *g_Codecs[kNumCodecsMax]; +void RegisterCodec(const CCodecInfo *codecInfo) +{ + if (g_NumCodecs < kNumCodecsMax) + g_Codecs[g_NumCodecs++] = codecInfo; +} + +#ifdef EXTERNAL_CODECS +static HRESULT ReadNumberOfStreams(ICompressCodecsInfo *codecsInfo, UInt32 index, PROPID propID, UInt32 &res) +{ + NWindows::NCOM::CPropVariant prop; + RINOK(codecsInfo->GetProperty(index, propID, &prop)); + if (prop.vt == VT_EMPTY) + res = 1; + else if (prop.vt == VT_UI4) + res = prop.ulVal; + else + return E_INVALIDARG; + return S_OK; +} + +static HRESULT ReadIsAssignedProp(ICompressCodecsInfo *codecsInfo, UInt32 index, PROPID propID, bool &res) +{ + NWindows::NCOM::CPropVariant prop; + RINOK(codecsInfo->GetProperty(index, propID, &prop)); + if (prop.vt == VT_EMPTY) + res = true; + else if (prop.vt == VT_BOOL) + res = VARIANT_BOOLToBool(prop.boolVal); + else + return E_INVALIDARG; + return S_OK; +} + +HRESULT LoadExternalCodecs(ICompressCodecsInfo *codecsInfo, CObjectVector &externalCodecs) +{ + UInt32 num; + RINOK(codecsInfo->GetNumberOfMethods(&num)); + for (UInt32 i = 0; i < num; i++) + { + CCodecInfoEx info; + NWindows::NCOM::CPropVariant prop; + RINOK(codecsInfo->GetProperty(i, NMethodPropID::kID, &prop)); + // if (prop.vt != VT_BSTR) + // info.Id.IDSize = (Byte)SysStringByteLen(prop.bstrVal); + // memmove(info.Id.ID, prop.bstrVal, info.Id.IDSize); + if (prop.vt != VT_UI8) + { + continue; // old Interface + // return E_INVALIDARG; + } + info.Id = prop.uhVal.QuadPart; + prop.Clear(); + + RINOK(codecsInfo->GetProperty(i, NMethodPropID::kName, &prop)); + if (prop.vt == VT_BSTR) + info.Name = prop.bstrVal; + else if (prop.vt != VT_EMPTY) + return E_INVALIDARG;; + + RINOK(ReadNumberOfStreams(codecsInfo, i, NMethodPropID::kInStreams, info.NumInStreams)); + RINOK(ReadNumberOfStreams(codecsInfo, i, NMethodPropID::kOutStreams, info.NumOutStreams)); + RINOK(ReadIsAssignedProp(codecsInfo, i, NMethodPropID::kEncoderIsAssigned, info.EncoderIsAssigned)); + RINOK(ReadIsAssignedProp(codecsInfo, i, NMethodPropID::kDecoderIsAssigned, info.DecoderIsAssigned)); + + externalCodecs.Add(info); + } + return S_OK; +} + +#endif + +bool FindMethod( + #ifdef EXTERNAL_CODECS + ICompressCodecsInfo * /* codecsInfo */, const CObjectVector *externalCodecs, + #endif + const UString &name, + CMethodId &methodId, UInt32 &numInStreams, UInt32 &numOutStreams) +{ + UInt32 i; + for (i = 0; i < g_NumCodecs; i++) + { + const CCodecInfo &codec = *g_Codecs[i]; + if (name.CompareNoCase(codec.Name) == 0) + { + methodId = codec.Id; + numInStreams = codec.NumInStreams; + numOutStreams = 1; + return true; + } + } + #ifdef EXTERNAL_CODECS + if (externalCodecs) + for (i = 0; i < (UInt32)externalCodecs->Size(); i++) + { + const CCodecInfoEx &codec = (*externalCodecs)[i]; + if (codec.Name.CompareNoCase(name) == 0) + { + methodId = codec.Id; + numInStreams = codec.NumInStreams; + numOutStreams = codec.NumOutStreams; + return true; + } + } + #endif + return false; +} + +bool FindMethod( + #ifdef EXTERNAL_CODECS + ICompressCodecsInfo * /* codecsInfo */, const CObjectVector *externalCodecs, + #endif + CMethodId methodId, UString &name) +{ + UInt32 i; + for (i = 0; i < g_NumCodecs; i++) + { + const CCodecInfo &codec = *g_Codecs[i]; + if (methodId == codec.Id) + { + name = codec.Name; + return true; + } + } + #ifdef EXTERNAL_CODECS + if (externalCodecs) + for (i = 0; i < (UInt32)externalCodecs->Size(); i++) + { + const CCodecInfoEx &codec = (*externalCodecs)[i]; + if (methodId == codec.Id) + { + name = codec.Name; + return true; + } + } + #endif + return false; +} + +HRESULT CreateCoder( + DECL_EXTERNAL_CODECS_LOC_VARS + CMethodId methodId, + CMyComPtr &filter, + CMyComPtr &coder, + CMyComPtr &coder2, + bool encode, bool onlyCoder) +{ + bool created = false; + UInt32 i; + for (i = 0; i < g_NumCodecs; i++) + { + const CCodecInfo &codec = *g_Codecs[i]; + if (codec.Id == methodId) + { + if (encode) + { + if (codec.CreateEncoder) + { + void *p = codec.CreateEncoder(); + if (codec.IsFilter) filter = (ICompressFilter *)p; + else if (codec.NumInStreams == 1) coder = (ICompressCoder *)p; + else coder2 = (ICompressCoder2 *)p; + created = (p != 0); + break; + } + } + else + if (codec.CreateDecoder) + { + void *p = codec.CreateDecoder(); + if (codec.IsFilter) filter = (ICompressFilter *)p; + else if (codec.NumInStreams == 1) coder = (ICompressCoder *)p; + else coder2 = (ICompressCoder2 *)p; + created = (p != 0); + break; + } + } + } + + #ifdef EXTERNAL_CODECS + if (!created && externalCodecs) + for (i = 0; i < (UInt32)externalCodecs->Size(); i++) + { + const CCodecInfoEx &codec = (*externalCodecs)[i]; + if (codec.Id == methodId) + { + if (encode) + { + if (codec.EncoderIsAssigned) + { + if (codec.IsSimpleCodec()) + { + HRESULT result = codecsInfo->CreateEncoder(i, &IID_ICompressCoder, (void **)&coder); + if (result != S_OK && result != E_NOINTERFACE && result != CLASS_E_CLASSNOTAVAILABLE) + return result; + if (!coder) + { + RINOK(codecsInfo->CreateEncoder(i, &IID_ICompressFilter, (void **)&filter)); + } + } + else + { + RINOK(codecsInfo->CreateEncoder(i, &IID_ICompressCoder2, (void **)&coder2)); + } + break; + } + } + else + if (codec.DecoderIsAssigned) + { + if (codec.IsSimpleCodec()) + { + HRESULT result = codecsInfo->CreateDecoder(i, &IID_ICompressCoder, (void **)&coder); + if (result != S_OK && result != E_NOINTERFACE && result != CLASS_E_CLASSNOTAVAILABLE) + return result; + if (!coder) + { + RINOK(codecsInfo->CreateDecoder(i, &IID_ICompressFilter, (void **)&filter)); + } + } + else + { + RINOK(codecsInfo->CreateDecoder(i, &IID_ICompressCoder2, (void **)&coder2)); + } + break; + } + } + } + #endif + + if (onlyCoder && filter) + { + CFilterCoder *coderSpec = new CFilterCoder; + coder = coderSpec; + coderSpec->Filter = filter; + } + return S_OK; +} + +HRESULT CreateCoder( + DECL_EXTERNAL_CODECS_LOC_VARS + CMethodId methodId, + CMyComPtr &coder, + CMyComPtr &coder2, + bool encode) +{ + CMyComPtr filter; + return CreateCoder( + EXTERNAL_CODECS_LOC_VARS + methodId, + filter, coder, coder2, encode, true); +} + +HRESULT CreateCoder( + DECL_EXTERNAL_CODECS_LOC_VARS + CMethodId methodId, + CMyComPtr &coder, bool encode) +{ + CMyComPtr filter; + CMyComPtr coder2; + return CreateCoder( + EXTERNAL_CODECS_LOC_VARS + methodId, + coder, coder2, encode); +} + +HRESULT CreateFilter( + DECL_EXTERNAL_CODECS_LOC_VARS + CMethodId methodId, + CMyComPtr &filter, + bool encode) +{ + CMyComPtr coder; + CMyComPtr coder2; + return CreateCoder( + EXTERNAL_CODECS_LOC_VARS + methodId, + filter, coder, coder2, encode, false); +} diff --git a/CPP/7zip/Common/CreateCoder.h b/CPP/7zip/Common/CreateCoder.h new file mode 100644 index 0000000..bf0e96a --- /dev/null +++ b/CPP/7zip/Common/CreateCoder.h @@ -0,0 +1,98 @@ +// CreateCoder.h + +#ifndef __CREATE_CODER_H +#define __CREATE_CODER_H + +#include "../../Common/MyCom.h" +#include "../../Common/MyString.h" +#include "../ICoder.h" + +#include "MethodId.h" + +#ifdef EXTERNAL_CODECS + +struct CCodecInfoEx +{ + UString Name; + CMethodId Id; + UInt32 NumInStreams; + UInt32 NumOutStreams; + bool EncoderIsAssigned; + bool DecoderIsAssigned; + bool IsSimpleCodec() const { return NumOutStreams == 1 && NumInStreams == 1; } + CCodecInfoEx(): EncoderIsAssigned(false), DecoderIsAssigned(false) {} +}; + +HRESULT LoadExternalCodecs(ICompressCodecsInfo *codecsInfo, CObjectVector &externalCodecs); + +#define PUBLIC_ISetCompressCodecsInfo public ISetCompressCodecsInfo, +#define QUERY_ENTRY_ISetCompressCodecsInfo MY_QUERYINTERFACE_ENTRY(ISetCompressCodecsInfo) +#define DECL_ISetCompressCodecsInfo STDMETHOD(SetCompressCodecsInfo)(ICompressCodecsInfo *compressCodecsInfo); +#define IMPL_ISetCompressCodecsInfo2(x) \ +STDMETHODIMP x::SetCompressCodecsInfo(ICompressCodecsInfo *compressCodecsInfo) { \ + COM_TRY_BEGIN _codecsInfo = compressCodecsInfo; return LoadExternalCodecs(_codecsInfo, _externalCodecs); COM_TRY_END } +#define IMPL_ISetCompressCodecsInfo IMPL_ISetCompressCodecsInfo2(CHandler) + +#define EXTERNAL_CODECS_VARS2 _codecsInfo, &_externalCodecs + +#define DECL_EXTERNAL_CODECS_VARS CMyComPtr _codecsInfo; CObjectVector _externalCodecs; +#define EXTERNAL_CODECS_VARS EXTERNAL_CODECS_VARS2, + +#define DECL_EXTERNAL_CODECS_LOC_VARS2 ICompressCodecsInfo *codecsInfo, const CObjectVector *externalCodecs +#define EXTERNAL_CODECS_LOC_VARS2 codecsInfo, externalCodecs + +#define DECL_EXTERNAL_CODECS_LOC_VARS DECL_EXTERNAL_CODECS_LOC_VARS2, +#define EXTERNAL_CODECS_LOC_VARS EXTERNAL_CODECS_LOC_VARS2, + +#else + +#define PUBLIC_ISetCompressCodecsInfo +#define QUERY_ENTRY_ISetCompressCodecsInfo +#define DECL_ISetCompressCodecsInfo +#define IMPL_ISetCompressCodecsInfo +#define EXTERNAL_CODECS_VARS2 +#define DECL_EXTERNAL_CODECS_VARS +#define EXTERNAL_CODECS_VARS EXTERNAL_CODECS_VARS2 +#define DECL_EXTERNAL_CODECS_LOC_VARS2 +#define EXTERNAL_CODECS_LOC_VARS2 +#define DECL_EXTERNAL_CODECS_LOC_VARS +#define EXTERNAL_CODECS_LOC_VARS + +#endif + +bool FindMethod( + DECL_EXTERNAL_CODECS_LOC_VARS + const UString &name, CMethodId &methodId, UInt32 &numInStreams, UInt32 &numOutStreams); + +bool FindMethod( + DECL_EXTERNAL_CODECS_LOC_VARS + CMethodId methodId, UString &name); + + +HRESULT CreateCoder( + DECL_EXTERNAL_CODECS_LOC_VARS + CMethodId methodId, + CMyComPtr &filter, + CMyComPtr &coder, + CMyComPtr &coder2, + bool encode, bool onlyCoder); + +HRESULT CreateCoder( + DECL_EXTERNAL_CODECS_LOC_VARS + CMethodId methodId, + CMyComPtr &coder, + CMyComPtr &coder2, + bool encode); + +HRESULT CreateCoder( + DECL_EXTERNAL_CODECS_LOC_VARS + CMethodId methodId, + CMyComPtr &coder, bool encode); + +HRESULT CreateFilter( + DECL_EXTERNAL_CODECS_LOC_VARS + CMethodId methodId, + CMyComPtr &filter, + bool encode); + +#endif diff --git a/CPP/7zip/Common/FilePathAutoRename.cpp b/CPP/7zip/Common/FilePathAutoRename.cpp new file mode 100644 index 0000000..7d6e36f --- /dev/null +++ b/CPP/7zip/Common/FilePathAutoRename.cpp @@ -0,0 +1,55 @@ +// FilePathAutoRename.cpp + +#include "StdAfx.h" + +#include "Common/Defs.h" +#include "Common/IntToString.h" + +#include "Windows/FileFind.h" + +#include "FilePathAutoRename.h" + +using namespace NWindows; + +static bool MakeAutoName(const UString &name, + const UString &extension, unsigned value, UString &path) +{ + wchar_t number[16]; + ConvertUInt32ToString(value, number); + path = name; + path += number; + path += extension; + return NFile::NFind::DoesFileOrDirExist(path); +} + +bool AutoRenamePath(UString &fullProcessedPath) +{ + UString path; + int dotPos = fullProcessedPath.ReverseFind(L'.'); + + int slashPos = fullProcessedPath.ReverseFind(L'/'); + #ifdef _WIN32 + int slash1Pos = fullProcessedPath.ReverseFind(L'\\'); + slashPos = MyMax(slashPos, slash1Pos); + #endif + + UString name, extension; + if (dotPos > slashPos && dotPos > 0) + { + name = fullProcessedPath.Left(dotPos); + extension = fullProcessedPath.Mid(dotPos); + } + else + name = fullProcessedPath; + name += L'_'; + unsigned left = 1, right = (1 << 30); + while (left != right) + { + unsigned mid = (left + right) / 2; + if (MakeAutoName(name, extension, mid, path)) + left = mid + 1; + else + right = mid; + } + return !MakeAutoName(name, extension, right, fullProcessedPath); +} diff --git a/CPP/7zip/Common/FilePathAutoRename.h b/CPP/7zip/Common/FilePathAutoRename.h new file mode 100644 index 0000000..3ef87f4 --- /dev/null +++ b/CPP/7zip/Common/FilePathAutoRename.h @@ -0,0 +1,10 @@ +// Util/FilePathAutoRename.h + +#ifndef __FILEPATHAUTORENAME_H +#define __FILEPATHAUTORENAME_H + +#include "Common/MyString.h" + +bool AutoRenamePath(UString &fullProcessedPath); + +#endif diff --git a/CPP/7zip/Common/FileStreams.cpp b/CPP/7zip/Common/FileStreams.cpp new file mode 100644 index 0000000..76ab5ee --- /dev/null +++ b/CPP/7zip/Common/FileStreams.cpp @@ -0,0 +1,273 @@ +// FileStreams.cpp + +#include "StdAfx.h" + +#ifndef _WIN32 +#include +#include +#include +#endif + +#include "FileStreams.h" + +static inline HRESULT ConvertBoolToHRESULT(bool result) +{ + #ifdef _WIN32 + if (result) + return S_OK; + DWORD lastError = ::GetLastError(); + if (lastError == 0) + return E_FAIL; + return HRESULT_FROM_WIN32(lastError); + #else + return result ? S_OK: E_FAIL; + #endif +} + +bool CInFileStream::Open(LPCTSTR fileName) +{ +#ifdef ENV_UNIX + return File.Open(fileName,_ignoreSymbolicLink); +#else + return File.Open(fileName); +#endif +} + +#ifdef USE_WIN_FILE +#ifndef _UNICODE +bool CInFileStream::Open(LPCWSTR fileName) +{ +#ifdef ENV_UNIX + return File.Open(fileName,_ignoreSymbolicLink); +#else + return File.Open(fileName); +#endif +} +#endif +#endif + +bool CInFileStream::OpenShared(LPCTSTR fileName, bool shareForWrite) +{ +#ifdef ENV_UNIX + return File.Open(fileName,_ignoreSymbolicLink); +#else + return File.OpenShared(fileName, shareForWrite); +#endif +} + +#ifdef USE_WIN_FILE +#ifndef _UNICODE +bool CInFileStream::OpenShared(LPCWSTR fileName, bool shareForWrite) +{ + return File.OpenShared(fileName, shareForWrite); +} +#endif +#endif + +STDMETHODIMP CInFileStream::Read(void *data, UInt32 size, UInt32 *processedSize) +{ + #ifdef USE_WIN_FILE + + UInt32 realProcessedSize; + bool result = File.ReadPart(data, size, realProcessedSize); + if(processedSize != NULL) + *processedSize = realProcessedSize; + return ConvertBoolToHRESULT(result); + + #else + + if(processedSize != NULL) + *processedSize = 0; + ssize_t res = File.Read(data, (size_t)size); + if (res == -1) + return E_FAIL; + if(processedSize != NULL) + *processedSize = (UInt32)res; + return S_OK; + + #endif +} + +#ifndef _WIN32_WCE +STDMETHODIMP CStdInFileStream::Read(void *data, UInt32 size, UInt32 *processedSize) +{ + #ifdef _WIN32 + UInt32 realProcessedSize; + BOOL res = ::ReadFile(GetStdHandle(STD_INPUT_HANDLE), + data, size, (DWORD *)&realProcessedSize, NULL); + if(processedSize != NULL) + *processedSize = realProcessedSize; + if (res == FALSE && GetLastError() == ERROR_BROKEN_PIPE) + return S_OK; + return ConvertBoolToHRESULT(res != FALSE); + + #else + + if(processedSize != NULL) + *processedSize = 0; + ssize_t res; + do + { + res = read(0, data, (size_t)size); + } + while (res < 0 && (errno == EINTR)); + if (res == -1) + return E_FAIL; + if(processedSize != NULL) + *processedSize = (UInt32)res; + return S_OK; + + #endif +} + +#endif + +STDMETHODIMP CInFileStream::Seek(Int64 offset, UInt32 seekOrigin, + UInt64 *newPosition) +{ + if(seekOrigin >= 3) + return STG_E_INVALIDFUNCTION; + + #ifdef USE_WIN_FILE + + UInt64 realNewPosition; + bool result = File.Seek(offset, seekOrigin, realNewPosition); + if(newPosition != NULL) + *newPosition = realNewPosition; + return ConvertBoolToHRESULT(result); + + #else + + off_t res = File.Seek(offset, seekOrigin); + if (res == -1) + return E_FAIL; + if(newPosition != NULL) + *newPosition = (UInt64)res; + return S_OK; + + #endif +} + +STDMETHODIMP CInFileStream::GetSize(UInt64 *size) +{ + return ConvertBoolToHRESULT(File.GetLength(*size)); +} + + +////////////////////////// +// COutFileStream + +HRESULT COutFileStream::Close() +{ + return ConvertBoolToHRESULT(File.Close()); +} + +STDMETHODIMP COutFileStream::Write(const void *data, UInt32 size, UInt32 *processedSize) +{ + #ifdef USE_WIN_FILE + + UInt32 realProcessedSize; + bool result = File.WritePart(data, size, realProcessedSize); + ProcessedSize += realProcessedSize; + if(processedSize != NULL) + *processedSize = realProcessedSize; + return ConvertBoolToHRESULT(result); + + #else + + if(processedSize != NULL) + *processedSize = 0; + ssize_t res = File.Write(data, (size_t)size); + if (res == -1) + return E_FAIL; + if(processedSize != NULL) + *processedSize = (UInt32)res; + ProcessedSize += res; + return S_OK; + + #endif +} + +STDMETHODIMP COutFileStream::Seek(Int64 offset, UInt32 seekOrigin, UInt64 *newPosition) +{ + if(seekOrigin >= 3) + return STG_E_INVALIDFUNCTION; + #ifdef USE_WIN_FILE + + UInt64 realNewPosition; + bool result = File.Seek(offset, seekOrigin, realNewPosition); + if(newPosition != NULL) + *newPosition = realNewPosition; + return ConvertBoolToHRESULT(result); + + #else + + off_t res = File.Seek(offset, seekOrigin); + if (res == -1) + return E_FAIL; + if(newPosition != NULL) + *newPosition = (UInt64)res; + return S_OK; + + #endif +} + +STDMETHODIMP COutFileStream::SetSize(UInt64 newSize) +{ + #ifdef USE_WIN_FILE + UInt64 currentPos; + if(!File.Seek(0, FILE_CURRENT, currentPos)) + return E_FAIL; + bool result = File.SetLength(newSize); + UInt64 currentPos2; + result = result && File.Seek(currentPos, currentPos2); + return result ? S_OK : E_FAIL; + #else + return E_FAIL; + #endif +} + +#ifndef _WIN32_WCE +STDMETHODIMP CStdOutFileStream::Write(const void *data, UInt32 size, UInt32 *processedSize) +{ + if(processedSize != NULL) + *processedSize = 0; + + #ifdef _WIN32 + UInt32 realProcessedSize; + BOOL res = TRUE; + if (size > 0) + { + // Seems that Windows doesn't like big amounts writing to stdout. + // So we limit portions by 32KB. + UInt32 sizeTemp = (1 << 15); + if (sizeTemp > size) + sizeTemp = size; + res = ::WriteFile(GetStdHandle(STD_OUTPUT_HANDLE), + data, sizeTemp, (DWORD *)&realProcessedSize, NULL); + size -= realProcessedSize; + data = (const void *)((const Byte *)data + realProcessedSize); + if(processedSize != NULL) + *processedSize += realProcessedSize; + } + return ConvertBoolToHRESULT(res != FALSE); + + #else + + ssize_t res; + do + { + res = write(1, data, (size_t)size); + } + while (res < 0 && (errno == EINTR)); + if (res == -1) + return E_FAIL; + if(processedSize != NULL) + *processedSize = (UInt32)res; + return S_OK; + + return S_OK; + #endif +} + +#endif diff --git a/CPP/7zip/Common/FileStreams.h b/CPP/7zip/Common/FileStreams.h new file mode 100644 index 0000000..f70905b --- /dev/null +++ b/CPP/7zip/Common/FileStreams.h @@ -0,0 +1,134 @@ +// FileStreams.h + +#ifndef __FILESTREAMS_H +#define __FILESTREAMS_H + +#if defined(_WIN32) || defined(ENV_UNIX) +#define USE_WIN_FILE +#endif + +#ifdef USE_WIN_FILE +#include "../../Windows/FileIO.h" +#else +#include "../../Common/C_FileIO.h" +#endif + +#include "../../Common/MyCom.h" +#include "../IStream.h" + +class CInFileStream: + public IInStream, + public IStreamGetSize, + public CMyUnknownImp +{ + bool _ignoreSymbolicLink; +public: + #ifdef USE_WIN_FILE + NWindows::NFile::NIO::CInFile File; + #else + NC::NFile::NIO::CInFile File; + #endif + CInFileStream(bool b=false) { _ignoreSymbolicLink = b; } + virtual ~CInFileStream() {} + + bool Open(LPCTSTR fileName); + #ifdef USE_WIN_FILE + #ifndef _UNICODE + bool Open(LPCWSTR fileName); + #endif + #endif + + bool OpenShared(LPCTSTR fileName, bool shareForWrite); + #ifdef USE_WIN_FILE + #ifndef _UNICODE + bool OpenShared(LPCWSTR fileName, bool shareForWrite); + #endif + #endif + + MY_UNKNOWN_IMP2(IInStream, IStreamGetSize) + + STDMETHOD(Read)(void *data, UInt32 size, UInt32 *processedSize); + STDMETHOD(Seek)(Int64 offset, UInt32 seekOrigin, UInt64 *newPosition); + + STDMETHOD(GetSize)(UInt64 *size); +}; + +class CStdInFileStream: + public ISequentialInStream, + public CMyUnknownImp +{ +public: + MY_UNKNOWN_IMP + + virtual ~CStdInFileStream() {} + STDMETHOD(Read)(void *data, UInt32 size, UInt32 *processedSize); +}; + +class COutFileStream: + public IOutStream, + public CMyUnknownImp +{ + #ifdef USE_WIN_FILE + NWindows::NFile::NIO::COutFile File; + #else + NC::NFile::NIO::COutFile File; + #endif +public: + virtual ~COutFileStream() {} + bool Create(LPCTSTR fileName, bool createAlways) + { + ProcessedSize = 0; + return File.Create(fileName, createAlways); + } + bool Open(LPCTSTR fileName, DWORD creationDisposition) + { + ProcessedSize = 0; + return File.Open(fileName, creationDisposition); + } + #ifdef USE_WIN_FILE + #ifndef _UNICODE + bool Create(LPCWSTR fileName, bool createAlways) + { + ProcessedSize = 0; + return File.Create(fileName, createAlways); + } + bool Open(LPCWSTR fileName, DWORD creationDisposition) + { + ProcessedSize = 0; + return File.Open(fileName, creationDisposition); + } + #endif + #endif + + HRESULT Close(); + + UInt64 ProcessedSize; + + #ifdef USE_WIN_FILE + bool SetTime(const FILETIME *cTime, const FILETIME *aTime, const FILETIME *mTime) + { + return File.SetTime(cTime, aTime, mTime); + } + bool SetMTime(const FILETIME *mTime) { return File.SetMTime(mTime); } + #endif + + + MY_UNKNOWN_IMP1(IOutStream) + + STDMETHOD(Write)(const void *data, UInt32 size, UInt32 *processedSize); + STDMETHOD(Seek)(Int64 offset, UInt32 seekOrigin, UInt64 *newPosition); + STDMETHOD(SetSize)(UInt64 newSize); +}; + +class CStdOutFileStream: + public ISequentialOutStream, + public CMyUnknownImp +{ +public: + MY_UNKNOWN_IMP + + virtual ~CStdOutFileStream() {} + STDMETHOD(Write)(const void *data, UInt32 size, UInt32 *processedSize); +}; + +#endif diff --git a/CPP/7zip/Common/FilterCoder.cpp b/CPP/7zip/Common/FilterCoder.cpp new file mode 100644 index 0000000..6967352 --- /dev/null +++ b/CPP/7zip/Common/FilterCoder.cpp @@ -0,0 +1,247 @@ +// FilterCoder.cpp + +#include "StdAfx.h" + +#include "../../../C/Alloc.h" + +#include "../../Common/Defs.h" + +#include "FilterCoder.h" +#include "StreamUtils.h" + +static const UInt32 kBufferSize = 1 << 17; + +CFilterCoder::CFilterCoder() +{ + _buffer = (Byte *)::MidAlloc(kBufferSize); + if (_buffer == 0) + throw 1; +} + +CFilterCoder::~CFilterCoder() +{ + ::MidFree(_buffer); +} + +HRESULT CFilterCoder::WriteWithLimit(ISequentialOutStream *outStream, UInt32 size) +{ + if (_outSizeIsDefined) + { + UInt64 remSize = _outSize - _nowPos64; + if (size > remSize) + size = (UInt32)remSize; + } + RINOK(WriteStream(outStream, _buffer, size)); + _nowPos64 += size; + return S_OK; +} + +STDMETHODIMP CFilterCoder::Code(ISequentialInStream *inStream, ISequentialOutStream *outStream, + const UInt64 * /* inSize */, const UInt64 *outSize, ICompressProgressInfo *progress) +{ + RINOK(Init()); + UInt32 bufferPos = 0; + _outSizeIsDefined = (outSize != 0); + if (_outSizeIsDefined) + _outSize = *outSize; + + while (!_outSizeIsDefined || _nowPos64 < _outSize) + { + size_t processedSize = kBufferSize - bufferPos; + + // Change it: It can be optimized using ReadPart + RINOK(ReadStream(inStream, _buffer + bufferPos, &processedSize)); + + UInt32 endPos = bufferPos + (UInt32)processedSize; + + bufferPos = Filter->Filter(_buffer, endPos); + if (bufferPos > endPos) + { + for (; endPos < bufferPos; endPos++) + _buffer[endPos] = 0; + bufferPos = Filter->Filter(_buffer, endPos); + } + + if (bufferPos == 0) + { + if (endPos == 0) + return S_OK; + return WriteWithLimit(outStream, endPos); + } + RINOK(WriteWithLimit(outStream, bufferPos)); + if (progress != NULL) + { + RINOK(progress->SetRatioInfo(&_nowPos64, &_nowPos64)); + } + UInt32 i = 0; + while (bufferPos < endPos) + _buffer[i++] = _buffer[bufferPos++]; + bufferPos = i; + } + return S_OK; +} + +STDMETHODIMP CFilterCoder::SetOutStream(ISequentialOutStream *outStream) +{ + _bufferPos = 0; + _outStream = outStream; + return Init(); +} + +STDMETHODIMP CFilterCoder::ReleaseOutStream() +{ + _outStream.Release(); + return S_OK; +} + + +STDMETHODIMP CFilterCoder::Write(const void *data, UInt32 size, UInt32 *processedSize) +{ + if (processedSize != NULL) + *processedSize = 0; + while (size > 0) + { + UInt32 sizeTemp = MyMin(size, kBufferSize - _bufferPos); + memcpy(_buffer + _bufferPos, data, sizeTemp); + size -= sizeTemp; + if (processedSize != NULL) + *processedSize += sizeTemp; + data = (const Byte *)data + sizeTemp; + UInt32 endPos = _bufferPos + sizeTemp; + _bufferPos = Filter->Filter(_buffer, endPos); + if (_bufferPos == 0) + { + _bufferPos = endPos; + break; + } + if (_bufferPos > endPos) + { + if (size != 0) + return E_FAIL; + break; + } + RINOK(WriteWithLimit(_outStream, _bufferPos)); + UInt32 i = 0; + while (_bufferPos < endPos) + _buffer[i++] = _buffer[_bufferPos++]; + _bufferPos = i; + } + return S_OK; +} + +STDMETHODIMP CFilterCoder::Flush() +{ + if (_bufferPos != 0) + { + // _buffer contains only data refused by previous Filter->Filter call. + UInt32 endPos = Filter->Filter(_buffer, _bufferPos); + if (endPos > _bufferPos) + { + for (; _bufferPos < endPos; _bufferPos++) + _buffer[_bufferPos] = 0; + if (Filter->Filter(_buffer, endPos) != endPos) + return E_FAIL; + } + RINOK(WriteWithLimit(_outStream, _bufferPos)); + _bufferPos = 0; + } + CMyComPtr flush; + _outStream.QueryInterface(IID_IOutStreamFlush, &flush); + if (flush) + return flush->Flush(); + return S_OK; +} + + +STDMETHODIMP CFilterCoder::SetInStream(ISequentialInStream *inStream) +{ + _convertedPosBegin = _convertedPosEnd = _bufferPos = 0; + _inStream = inStream; + return Init(); +} + +STDMETHODIMP CFilterCoder::ReleaseInStream() +{ + _inStream.Release(); + return S_OK; +} + +STDMETHODIMP CFilterCoder::Read(void *data, UInt32 size, UInt32 *processedSize) +{ + if (processedSize != NULL) + *processedSize = 0; + while (size > 0) + { + if (_convertedPosBegin != _convertedPosEnd) + { + UInt32 sizeTemp = MyMin(size, _convertedPosEnd - _convertedPosBegin); + memcpy(data, _buffer + _convertedPosBegin, sizeTemp); + _convertedPosBegin += sizeTemp; + data = (void *)((Byte *)data + sizeTemp); + size -= sizeTemp; + if (processedSize != NULL) + *processedSize += sizeTemp; + break; + } + UInt32 i; + for (i = 0; _convertedPosEnd + i < _bufferPos; i++) + _buffer[i] = _buffer[_convertedPosEnd + i]; + _bufferPos = i; + _convertedPosBegin = _convertedPosEnd = 0; + size_t processedSizeTemp = kBufferSize - _bufferPos; + RINOK(ReadStream(_inStream, _buffer + _bufferPos, &processedSizeTemp)); + _bufferPos += (UInt32)processedSizeTemp; + _convertedPosEnd = Filter->Filter(_buffer, _bufferPos); + if (_convertedPosEnd == 0) + { + if (_bufferPos == 0) + break; + _convertedPosEnd = _bufferPos; // check it + continue; + } + if (_convertedPosEnd > _bufferPos) + { + for (; _bufferPos < _convertedPosEnd; _bufferPos++) + _buffer[_bufferPos] = 0; + _convertedPosEnd = Filter->Filter(_buffer, _bufferPos); + } + } + return S_OK; +} + +#ifndef _NO_CRYPTO +STDMETHODIMP CFilterCoder::CryptoSetPassword(const Byte *data, UInt32 size) +{ + return _setPassword->CryptoSetPassword(data, size); +} +#endif + +#ifndef EXTRACT_ONLY +STDMETHODIMP CFilterCoder::SetCoderProperties(const PROPID *propIDs, + const PROPVARIANT *properties, UInt32 numProperties) +{ + return _SetCoderProperties->SetCoderProperties(propIDs, properties, numProperties); +} + +STDMETHODIMP CFilterCoder::WriteCoderProperties(ISequentialOutStream *outStream) +{ + return _writeCoderProperties->WriteCoderProperties(outStream); +} + +/* +STDMETHODIMP CFilterCoder::ResetSalt() +{ + return _CryptoResetSalt->ResetSalt(); +} +*/ + +STDMETHODIMP CFilterCoder::ResetInitVector() +{ + return _CryptoResetInitVector->ResetInitVector(); +} +#endif + +STDMETHODIMP CFilterCoder::SetDecoderProperties2(const Byte *data, UInt32 size) +{ + return _setDecoderProperties->SetDecoderProperties2(data, size); +} diff --git a/CPP/7zip/Common/FilterCoder.h b/CPP/7zip/Common/FilterCoder.h new file mode 100644 index 0000000..8132a6d --- /dev/null +++ b/CPP/7zip/Common/FilterCoder.h @@ -0,0 +1,128 @@ +// FilterCoder.h + +#ifndef __FILTER_CODER_H +#define __FILTER_CODER_H + +#include "../../Common/MyCom.h" +#include "../ICoder.h" +#include "../IPassword.h" + +#define MY_QUERYINTERFACE_ENTRY_AG(i, sub0, sub) if (iid == IID_ ## i) \ +{ if (!sub) RINOK(sub0->QueryInterface(IID_ ## i, (void **)&sub)) \ +*outObject = (void *)(i *)this; AddRef(); return S_OK; } + +class CFilterCoder: + public ICompressCoder, + public ICompressSetInStream, + public ISequentialInStream, + public ICompressSetOutStream, + public ISequentialOutStream, + public IOutStreamFlush, + + #ifndef _NO_CRYPTO + public ICryptoSetPassword, + #endif + #ifndef EXTRACT_ONLY + public ICompressSetCoderProperties, + public ICompressWriteCoderProperties, + // public ICryptoResetSalt, + public ICryptoResetInitVector, + #endif + public ICompressSetDecoderProperties2, + public CMyUnknownImp +{ +protected: + Byte *_buffer; + CMyComPtr _inStream; + CMyComPtr _outStream; + UInt32 _bufferPos; + UInt32 _convertedPosBegin; + UInt32 _convertedPosEnd; + bool _outSizeIsDefined; + UInt64 _outSize; + UInt64 _nowPos64; + + HRESULT Init() + { + _nowPos64 = 0; + _outSizeIsDefined = false; + return Filter->Init(); + } + + CMyComPtr _setPassword; + #ifndef EXTRACT_ONLY + CMyComPtr _SetCoderProperties; + CMyComPtr _writeCoderProperties; + // CMyComPtr _CryptoResetSalt; + CMyComPtr _CryptoResetInitVector; + #endif + CMyComPtr _setDecoderProperties; +public: + CMyComPtr Filter; + + CFilterCoder(); + ~CFilterCoder(); + HRESULT WriteWithLimit(ISequentialOutStream *outStream, UInt32 size); + +public: + MY_QUERYINTERFACE_BEGIN2(ICompressCoder) + MY_QUERYINTERFACE_ENTRY(ICompressSetInStream) + MY_QUERYINTERFACE_ENTRY(ISequentialInStream) + MY_QUERYINTERFACE_ENTRY(ICompressSetOutStream) + MY_QUERYINTERFACE_ENTRY(ISequentialOutStream) + MY_QUERYINTERFACE_ENTRY(IOutStreamFlush) + + #ifndef _NO_CRYPTO + MY_QUERYINTERFACE_ENTRY_AG(ICryptoSetPassword, Filter, _setPassword) + #endif + + #ifndef EXTRACT_ONLY + MY_QUERYINTERFACE_ENTRY_AG(ICompressSetCoderProperties, Filter, _SetCoderProperties) + MY_QUERYINTERFACE_ENTRY_AG(ICompressWriteCoderProperties, Filter, _writeCoderProperties) + // MY_QUERYINTERFACE_ENTRY_AG(ICryptoResetSalt, Filter, _CryptoResetSalt) + MY_QUERYINTERFACE_ENTRY_AG(ICryptoResetInitVector, Filter, _CryptoResetInitVector) + #endif + + MY_QUERYINTERFACE_ENTRY_AG(ICompressSetDecoderProperties2, Filter, _setDecoderProperties) + MY_QUERYINTERFACE_END + MY_ADDREF_RELEASE + STDMETHOD(Code)(ISequentialInStream *inStream, ISequentialOutStream *outStream, + const UInt64 *inSize, const UInt64 *outSize, ICompressProgressInfo *progress); + STDMETHOD(ReleaseInStream)(); + STDMETHOD(SetInStream)(ISequentialInStream *inStream); + STDMETHOD(Read)(void *data, UInt32 size, UInt32 *processedSize); \ + STDMETHOD(SetOutStream)(ISequentialOutStream *outStream); + STDMETHOD(ReleaseOutStream)(); + STDMETHOD(Write)(const void *data, UInt32 size, UInt32 *processedSize); + STDMETHOD(Flush)(); + + #ifndef _NO_CRYPTO + STDMETHOD(CryptoSetPassword)(const Byte *data, UInt32 size); + #endif + #ifndef EXTRACT_ONLY + STDMETHOD(SetCoderProperties)(const PROPID *propIDs, + const PROPVARIANT *properties, UInt32 numProperties); + STDMETHOD(WriteCoderProperties)(ISequentialOutStream *outStream); + // STDMETHOD(ResetSalt)(); + STDMETHOD(ResetInitVector)(); + #endif + STDMETHOD(SetDecoderProperties2)(const Byte *data, UInt32 size); +}; + +class CInStreamReleaser +{ +public: + CFilterCoder *FilterCoder; + CInStreamReleaser(): FilterCoder(0) {} + ~CInStreamReleaser() { if (FilterCoder) FilterCoder->ReleaseInStream(); } +}; + +class COutStreamReleaser +{ +public: + CFilterCoder *FilterCoder; + COutStreamReleaser(): FilterCoder(0) {} + ~COutStreamReleaser() { if (FilterCoder) FilterCoder->ReleaseOutStream(); } +}; + +#endif diff --git a/CPP/7zip/Common/InBuffer.cpp b/CPP/7zip/Common/InBuffer.cpp new file mode 100644 index 0000000..ad4f882 --- /dev/null +++ b/CPP/7zip/Common/InBuffer.cpp @@ -0,0 +1,83 @@ +// InBuffer.cpp + +#include "StdAfx.h" + +#include "../../../C/Alloc.h" + +#include "InBuffer.h" + +CInBuffer::CInBuffer(): + _buffer(0), + _bufferLimit(0), + _bufferBase(0), + _stream(0), + _bufferSize(0) +{} + +bool CInBuffer::Create(UInt32 bufferSize) +{ + const UInt32 kMinBlockSize = 1; + if (bufferSize < kMinBlockSize) + bufferSize = kMinBlockSize; + if (_bufferBase != 0 && _bufferSize == bufferSize) + return true; + Free(); + _bufferSize = bufferSize; + _bufferBase = (Byte *)::MidAlloc(bufferSize); + return (_bufferBase != 0); +} + +void CInBuffer::Free() +{ + ::MidFree(_bufferBase); + _bufferBase = 0; +} + +void CInBuffer::SetStream(ISequentialInStream *stream) +{ + _stream = stream; +} + +void CInBuffer::Init() +{ + _processedSize = 0; + _buffer = _bufferBase; + _bufferLimit = _buffer; + _wasFinished = false; + #ifdef _NO_EXCEPTIONS + ErrorCode = S_OK; + #endif +} + +bool CInBuffer::ReadBlock() +{ + #ifdef _NO_EXCEPTIONS + if (ErrorCode != S_OK) + return false; + #endif + if (_wasFinished) + return false; + _processedSize += (_buffer - _bufferBase); + UInt32 numProcessedBytes; + HRESULT result = _stream->Read(_bufferBase, _bufferSize, &numProcessedBytes); + #ifdef _NO_EXCEPTIONS + ErrorCode = result; + #else + if (result != S_OK) + throw CInBufferException(result); + #endif + _buffer = _bufferBase; + _bufferLimit = _buffer + numProcessedBytes; + _wasFinished = (numProcessedBytes == 0); + return (!_wasFinished); +} + +Byte CInBuffer::ReadBlock2() +{ + if (!ReadBlock()) + { + _processedSize++; + return 0xFF; + } + return *_buffer++; +} diff --git a/CPP/7zip/Common/InBuffer.h b/CPP/7zip/Common/InBuffer.h new file mode 100644 index 0000000..75625bf --- /dev/null +++ b/CPP/7zip/Common/InBuffer.h @@ -0,0 +1,81 @@ +// InBuffer.h + +#ifndef __INBUFFER_H +#define __INBUFFER_H + +#include "../IStream.h" +#include "../../Common/MyCom.h" +#include "../../Common/MyException.h" + +#ifndef _NO_EXCEPTIONS +struct CInBufferException: public CSystemException +{ + CInBufferException(HRESULT errorCode): CSystemException(errorCode) {} +}; +#endif + +class CInBuffer +{ + Byte *_buffer; + Byte *_bufferLimit; + Byte *_bufferBase; + CMyComPtr _stream; + UInt64 _processedSize; + UInt32 _bufferSize; + bool _wasFinished; + + bool ReadBlock(); + Byte ReadBlock2(); + +public: + #ifdef _NO_EXCEPTIONS + HRESULT ErrorCode; + #endif + + CInBuffer(); + ~CInBuffer() { Free(); } + + bool Create(UInt32 bufferSize); + void Free(); + + void SetStream(ISequentialInStream *stream); + void Init(); + void ReleaseStream() { _stream.Release(); } + + bool ReadByte(Byte &b) + { + if (_buffer >= _bufferLimit) + if (!ReadBlock()) + return false; + b = *_buffer++; + return true; + } + Byte ReadByte() + { + if (_buffer >= _bufferLimit) + return ReadBlock2(); + return *_buffer++; + } + UInt32 ReadBytes(Byte *buf, UInt32 size) + { + if ((UInt32)(_bufferLimit - _buffer) >= size) + { + for (UInt32 i = 0; i < size; i++) + buf[i] = _buffer[i]; + _buffer += size; + return size; + } + for (UInt32 i = 0; i < size; i++) + { + if (_buffer >= _bufferLimit) + if (!ReadBlock()) + return i; + buf[i] = *_buffer++; + } + return size; + } + UInt64 GetProcessedSize() const { return _processedSize + (_buffer - _bufferBase); } + bool WasFinished() const { return _wasFinished; } +}; + +#endif diff --git a/CPP/7zip/Common/InOutTempBuffer.cpp b/CPP/7zip/Common/InOutTempBuffer.cpp new file mode 100644 index 0000000..dfe8b3d --- /dev/null +++ b/CPP/7zip/Common/InOutTempBuffer.cpp @@ -0,0 +1,122 @@ +// InOutTempBuffer.cpp + +#include "StdAfx.h" + +#include "../../../C/7zCrc.h" + +#include "InOutTempBuffer.h" +#include "StreamUtils.h" + +using namespace NWindows; +using namespace NFile; +using namespace NDirectory; + +static const UInt32 kTempBufSize = (1 << 20); + +static LPCTSTR kTempFilePrefixString = TEXT("7zt"); + +CInOutTempBuffer::CInOutTempBuffer(): _buf(NULL) { } + +void CInOutTempBuffer::Create() +{ + if (!_buf) + _buf = new Byte[kTempBufSize]; +} + +CInOutTempBuffer::~CInOutTempBuffer() +{ + delete []_buf; +} + +void CInOutTempBuffer::InitWriting() +{ + _bufPos = 0; + _tempFileCreated = false; + _size = 0; + _crc = CRC_INIT_VAL; +} + +bool CInOutTempBuffer::WriteToFile(const void *data, UInt32 size) +{ + if (size == 0) + return true; + if (!_tempFileCreated) + { + CSysString tempDirPath; + if (!MyGetTempPath(tempDirPath)) + return false; + if (_tempFile.Create(tempDirPath, kTempFilePrefixString, _tempFileName) == 0) + return false; + if (!_outFile.Create(_tempFileName, true)) + return false; + _tempFileCreated = true; + } + UInt32 processed; + if (!_outFile.Write(data, size, processed)) + return false; + _crc = CrcUpdate(_crc, data, processed); + _size += processed; + return (processed == size); +} + +bool CInOutTempBuffer::Write(const void *data, UInt32 size) +{ + if (_bufPos < kTempBufSize) + { + UInt32 cur = MyMin(kTempBufSize - _bufPos, size); + memcpy(_buf + _bufPos, data, cur); + _crc = CrcUpdate(_crc, data, cur); + _bufPos += cur; + size -= cur; + data = ((const Byte *)data) + cur; + _size += cur; + } + return WriteToFile(data, size); +} + +HRESULT CInOutTempBuffer::WriteToStream(ISequentialOutStream *stream) +{ + if (!_outFile.Close()) + return E_FAIL; + + UInt64 size = 0; + UInt32 crc = CRC_INIT_VAL; + + if (_bufPos > 0) + { + RINOK(WriteStream(stream, _buf, _bufPos)); + crc = CrcUpdate(crc, _buf, _bufPos); + size += _bufPos; + } + if (_tempFileCreated) + { + NIO::CInFile inFile; + if (!inFile.Open(_tempFileName)) + return E_FAIL; + while (size < _size) + { + UInt32 processed; + if (!inFile.ReadPart(_buf, kTempBufSize, processed)) + return E_FAIL; + if (processed == 0) + break; + RINOK(WriteStream(stream, _buf, processed)); + crc = CrcUpdate(crc, _buf, processed); + size += processed; + } + } + return (_crc == crc && size == _size) ? S_OK : E_FAIL; +} + +STDMETHODIMP CSequentialOutTempBufferImp::Write(const void *data, UInt32 size, UInt32 *processed) +{ + if (!_buf->Write(data, size)) + { + if (processed != NULL) + *processed = 0; + return E_FAIL; + } + if (processed != NULL) + *processed = size; + return S_OK; +} diff --git a/CPP/7zip/Common/InOutTempBuffer.h b/CPP/7zip/Common/InOutTempBuffer.h new file mode 100644 index 0000000..073f95a --- /dev/null +++ b/CPP/7zip/Common/InOutTempBuffer.h @@ -0,0 +1,48 @@ +// InOutTempBuffer.h + +#ifndef __IN_OUT_TEMP_BUFFER_H +#define __IN_OUT_TEMP_BUFFER_H + +#include "../../Common/MyCom.h" +#include "../../Windows/FileDir.h" +#include "../../Windows/FileIO.h" + +#include "../IStream.h" + +class CInOutTempBuffer +{ + NWindows::NFile::NDirectory::CTempFile _tempFile; + NWindows::NFile::NIO::COutFile _outFile; + Byte *_buf; + UInt32 _bufPos; + CSysString _tempFileName; + bool _tempFileCreated; + UInt64 _size; + UInt32 _crc; + + bool WriteToFile(const void *data, UInt32 size); +public: + CInOutTempBuffer(); + ~CInOutTempBuffer(); + void Create(); + + void InitWriting(); + bool Write(const void *data, UInt32 size); + + HRESULT WriteToStream(ISequentialOutStream *stream); + UInt64 GetDataSize() const { return _size; } +}; + +class CSequentialOutTempBufferImp: + public ISequentialOutStream, + public CMyUnknownImp +{ + CInOutTempBuffer *_buf; +public: + void Init(CInOutTempBuffer *buffer) { _buf = buffer; } + MY_UNKNOWN_IMP + + STDMETHOD(Write)(const void *data, UInt32 size, UInt32 *processedSize); +}; + +#endif diff --git a/CPP/7zip/Common/LimitedStreams.cpp b/CPP/7zip/Common/LimitedStreams.cpp new file mode 100644 index 0000000..1837e32 --- /dev/null +++ b/CPP/7zip/Common/LimitedStreams.cpp @@ -0,0 +1,154 @@ +// LimitedStreams.cpp + +#include "StdAfx.h" + +#include "LimitedStreams.h" +#include "../../Common/Defs.h" + +STDMETHODIMP CLimitedSequentialInStream::Read(void *data, UInt32 size, UInt32 *processedSize) +{ + UInt32 realProcessedSize = 0; + UInt32 sizeToRead = (UInt32)MyMin((_size - _pos), (UInt64)size); + HRESULT result = S_OK; + if (sizeToRead > 0) + { + result = _stream->Read(data, sizeToRead, &realProcessedSize); + _pos += realProcessedSize; + if (realProcessedSize == 0) + _wasFinished = true; + } + if (processedSize != NULL) + *processedSize = realProcessedSize; + return result; +} + +STDMETHODIMP CLimitedInStream::Read(void *data, UInt32 size, UInt32 *processedSize) +{ + if (processedSize != NULL) + *processedSize = 0; + if (_virtPos >= _size) + return (_virtPos == _size) ? S_OK: E_FAIL; + UInt64 rem = _size - _virtPos; + if (rem < size) + size = (UInt32)rem; + UInt64 newPos = _startOffset + _virtPos; + if (newPos != _physPos) + { + _physPos = newPos; + RINOK(SeekToPhys()); + } + HRESULT res = _stream->Read(data, size, &size); + if (processedSize != NULL) + *processedSize = size; + _physPos += size; + _virtPos += size; + return res; +} + +STDMETHODIMP CLimitedInStream::Seek(Int64 offset, UInt32 seekOrigin, UInt64 *newPosition) +{ + switch(seekOrigin) + { + case STREAM_SEEK_SET: _virtPos = offset; break; + case STREAM_SEEK_CUR: _virtPos += offset; break; + case STREAM_SEEK_END: _virtPos = _size + offset; break; + default: return STG_E_INVALIDFUNCTION; + } + if (newPosition) + *newPosition = _virtPos; + return S_OK; +} + +STDMETHODIMP CClusterInStream::Read(void *data, UInt32 size, UInt32 *processedSize) +{ + if (processedSize != NULL) + *processedSize = 0; + if (_virtPos >= Size) + return (_virtPos == Size) ? S_OK: E_FAIL; + + if (_curRem == 0) + { + UInt32 blockSize = (UInt32)1 << BlockSizeLog; + UInt32 virtBlock = (UInt32)(_virtPos >> BlockSizeLog); + UInt32 offsetInBlock = (UInt32)_virtPos & (blockSize - 1); + UInt32 phyBlock = Vector[virtBlock]; + UInt64 newPos = StartOffset + ((UInt64)phyBlock << BlockSizeLog) + offsetInBlock; + if (newPos != _physPos) + { + _physPos = newPos; + RINOK(SeekToPhys()); + } + _curRem = blockSize - offsetInBlock; + for (int i = 1; i < 64 && (virtBlock + i) < (UInt32)Vector.Size() && phyBlock + i == Vector[virtBlock + i]; i++) + _curRem += (UInt32)1 << BlockSizeLog; + UInt64 rem = Size - _virtPos; + if (_curRem > rem) + _curRem = (UInt32)rem; + } + if (size > _curRem) + size = _curRem; + HRESULT res = Stream->Read(data, size, &size); + if (processedSize != NULL) + *processedSize = size; + _physPos += size; + _virtPos += size; + _curRem -= size; + return res; +} + +STDMETHODIMP CClusterInStream::Seek(Int64 offset, UInt32 seekOrigin, UInt64 *newPosition) +{ + UInt64 newVirtPos = offset; + switch(seekOrigin) + { + case STREAM_SEEK_SET: break; + case STREAM_SEEK_CUR: newVirtPos += _virtPos; break; + case STREAM_SEEK_END: newVirtPos += Size; break; + default: return STG_E_INVALIDFUNCTION; + } + if (_virtPos != newVirtPos) + _curRem = 0; + _virtPos = newVirtPos; + if (newPosition) + *newPosition = newVirtPos; + return S_OK; +} + + +HRESULT CreateLimitedInStream(IInStream *inStream, UInt64 pos, UInt64 size, ISequentialInStream **resStream) +{ + *resStream = 0; + CLimitedInStream *streamSpec = new CLimitedInStream; + CMyComPtr streamTemp = streamSpec; + streamSpec->SetStream(inStream); + RINOK(streamSpec->InitAndSeek(pos, size)); + streamSpec->SeekToStart(); + *resStream = streamTemp.Detach(); + return S_OK; +} + +STDMETHODIMP CLimitedSequentialOutStream::Write(const void *data, UInt32 size, UInt32 *processedSize) +{ + HRESULT result = S_OK; + if (processedSize != NULL) + *processedSize = 0; + if (size > _size) + { + if (_size == 0) + { + _overflow = true; + if (!_overflowIsAllowed) + return E_FAIL; + if (processedSize != NULL) + *processedSize = size; + return S_OK; + } + size = (UInt32)_size; + } + if (_stream) + result = _stream->Write(data, size, &size); + _size -= size; + if (processedSize != NULL) + *processedSize = size; + return result; +} diff --git a/CPP/7zip/Common/LimitedStreams.h b/CPP/7zip/Common/LimitedStreams.h new file mode 100644 index 0000000..2cbe18e --- /dev/null +++ b/CPP/7zip/Common/LimitedStreams.h @@ -0,0 +1,125 @@ +// LimitedStreams.h + +#ifndef __LIMITED_STREAMS_H +#define __LIMITED_STREAMS_H + +#include "../../Common/MyCom.h" +#include "../../Common/MyVector.h" +#include "../IStream.h" + +class CLimitedSequentialInStream: + public ISequentialInStream, + public CMyUnknownImp +{ + CMyComPtr _stream; + UInt64 _size; + UInt64 _pos; + bool _wasFinished; +public: + void SetStream(ISequentialInStream *stream) { _stream = stream; } + void ReleaseStream() { _stream.Release(); } + void Init(UInt64 streamSize) + { + _size = streamSize; + _pos = 0; + _wasFinished = false; + } + + MY_UNKNOWN_IMP + + STDMETHOD(Read)(void *data, UInt32 size, UInt32 *processedSize); + UInt64 GetSize() const { return _pos; } + bool WasFinished() const { return _wasFinished; } +}; + +class CLimitedInStream: + public IInStream, + public CMyUnknownImp +{ + CMyComPtr _stream; + UInt64 _virtPos; + UInt64 _physPos; + UInt64 _size; + UInt64 _startOffset; + + HRESULT SeekToPhys() { return _stream->Seek(_physPos, STREAM_SEEK_SET, NULL); } +public: + void SetStream(IInStream *stream) { _stream = stream; } + HRESULT InitAndSeek(UInt64 startOffset, UInt64 size) + { + _startOffset = startOffset; + _physPos = startOffset; + _virtPos = 0; + _size = size; + return SeekToPhys(); + } + + MY_UNKNOWN_IMP1(IInStream) + + STDMETHOD(Read)(void *data, UInt32 size, UInt32 *processedSize); + STDMETHOD(Seek)(Int64 offset, UInt32 seekOrigin, UInt64 *newPosition); + + HRESULT SeekToStart() { return Seek(0, STREAM_SEEK_SET, NULL); } +}; + +class CClusterInStream: + public IInStream, + public CMyUnknownImp +{ + UInt64 _virtPos; + UInt64 _physPos; + UInt32 _curRem; +public: + CMyComPtr Stream; + UInt64 StartOffset; + UInt64 Size; + int BlockSizeLog; + CRecordVector Vector; + + HRESULT SeekToPhys() { return Stream->Seek(_physPos, STREAM_SEEK_SET, NULL); } + + HRESULT InitAndSeek() + { + _curRem = 0; + _virtPos = 0; + _physPos = StartOffset; + if (Vector.Size() > 0) + { + _physPos = StartOffset + (Vector[0] << BlockSizeLog); + return SeekToPhys(); + } + return S_OK; + } + + MY_UNKNOWN_IMP1(IInStream) + + STDMETHOD(Read)(void *data, UInt32 size, UInt32 *processedSize); + STDMETHOD(Seek)(Int64 offset, UInt32 seekOrigin, UInt64 *newPosition); +}; + +HRESULT CreateLimitedInStream(IInStream *inStream, UInt64 pos, UInt64 size, ISequentialInStream **resStream); + +class CLimitedSequentialOutStream: + public ISequentialOutStream, + public CMyUnknownImp +{ + CMyComPtr _stream; + UInt64 _size; + bool _overflow; + bool _overflowIsAllowed; +public: + MY_UNKNOWN_IMP + STDMETHOD(Write)(const void *data, UInt32 size, UInt32 *processedSize); + void SetStream(ISequentialOutStream *stream) { _stream = stream; } + void ReleaseStream() { _stream.Release(); } + void Init(UInt64 size, bool overflowIsAllowed = false) + { + _size = size; + _overflow = false; + _overflowIsAllowed = overflowIsAllowed; + } + bool IsFinishedOK() const { return (_size == 0 && !_overflow); } + UInt64 GetRem() const { return _size; } +}; + +#endif diff --git a/CPP/7zip/Common/LockedStream.cpp b/CPP/7zip/Common/LockedStream.cpp new file mode 100644 index 0000000..f05601c --- /dev/null +++ b/CPP/7zip/Common/LockedStream.cpp @@ -0,0 +1,23 @@ +// LockedStream.cpp + +#include "StdAfx.h" + +#include "LockedStream.h" + +HRESULT CLockedInStream::Read(UInt64 startPos, void *data, UInt32 size, + UInt32 *processedSize) +{ + NWindows::NSynchronization::CCriticalSectionLock lock(_criticalSection); + RINOK(_stream->Seek(startPos, STREAM_SEEK_SET, NULL)); + return _stream->Read(data, size, processedSize); +} + +STDMETHODIMP CLockedSequentialInStreamImp::Read(void *data, UInt32 size, UInt32 *processedSize) +{ + UInt32 realProcessedSize = 0; + HRESULT result = _lockedInStream->Read(_pos, data, size, &realProcessedSize); + _pos += realProcessedSize; + if (processedSize != NULL) + *processedSize = realProcessedSize; + return result; +} diff --git a/CPP/7zip/Common/LockedStream.h b/CPP/7zip/Common/LockedStream.h new file mode 100644 index 0000000..486e422 --- /dev/null +++ b/CPP/7zip/Common/LockedStream.h @@ -0,0 +1,38 @@ +// LockedStream.h + +#ifndef __LOCKEDSTREAM_H +#define __LOCKEDSTREAM_H + +#include "../../Windows/Synchronization.h" +#include "../../Common/MyCom.h" +#include "../IStream.h" + +class CLockedInStream +{ + CMyComPtr _stream; + NWindows::NSynchronization::CCriticalSection _criticalSection; +public: + void Init(IInStream *stream) + { _stream = stream; } + HRESULT Read(UInt64 startPos, void *data, UInt32 size, UInt32 *processedSize); +}; + +class CLockedSequentialInStreamImp: + public ISequentialInStream, + public CMyUnknownImp +{ + CLockedInStream *_lockedInStream; + UInt64 _pos; +public: + void Init(CLockedInStream *lockedInStream, UInt64 startPos) + { + _lockedInStream = lockedInStream; + _pos = startPos; + } + + MY_UNKNOWN_IMP + + STDMETHOD(Read)(void *data, UInt32 size, UInt32 *processedSize); +}; + +#endif diff --git a/CPP/7zip/Common/MemBlocks.cpp b/CPP/7zip/Common/MemBlocks.cpp new file mode 100644 index 0000000..67192b4 --- /dev/null +++ b/CPP/7zip/Common/MemBlocks.cpp @@ -0,0 +1,183 @@ +// MemBlocks.cpp + +#include "StdAfx.h" + +#include "../../../C/Alloc.h" + +#include "MemBlocks.h" +#include "StreamUtils.h" + +bool CMemBlockManager::AllocateSpace(size_t numBlocks) +{ + FreeSpace(); + if (_blockSize < sizeof(void *) || numBlocks < 1) + return false; + size_t totalSize = numBlocks * _blockSize; + if (totalSize / _blockSize != numBlocks) + return false; + _data = ::MidAlloc(totalSize); + if (_data == 0) + return false; + Byte *p = (Byte *)_data; + for (size_t i = 0; i + 1 < numBlocks; i++, p += _blockSize) + *(Byte **)p = (p + _blockSize); + *(Byte **)p = 0; + _headFree = _data; + return true; +} + +void CMemBlockManager::FreeSpace() +{ + ::MidFree(_data); + _data = 0; + _headFree= 0; +} + +void *CMemBlockManager::AllocateBlock() +{ + if (_headFree == 0) + return 0; + void *p = _headFree; + _headFree = *(void **)_headFree; + return p; +} + +void CMemBlockManager::FreeBlock(void *p) +{ + if (p == 0) + return; + *(void **)p = _headFree; + _headFree = p; +} + + +HRes CMemBlockManagerMt::AllocateSpace(NWindows::NSynchronization::CSynchro *sync,size_t numBlocks, size_t numNoLockBlocks) +{ + if (numNoLockBlocks > numBlocks) + return E_INVALIDARG; + if (!CMemBlockManager::AllocateSpace(numBlocks)) + return E_OUTOFMEMORY; + size_t numLockBlocks = numBlocks - numNoLockBlocks; + Semaphore.Close(); + return Semaphore.Create(sync,(LONG)numLockBlocks, (LONG)numLockBlocks); +} + +HRes CMemBlockManagerMt::AllocateSpaceAlways(NWindows::NSynchronization::CSynchro *sync,size_t desiredNumberOfBlocks, size_t numNoLockBlocks) +{ + if (numNoLockBlocks > desiredNumberOfBlocks) + return E_INVALIDARG; + for (;;) + { + if (AllocateSpace(sync,desiredNumberOfBlocks, numNoLockBlocks) == 0) + return 0; + if (desiredNumberOfBlocks == numNoLockBlocks) + return E_OUTOFMEMORY; + desiredNumberOfBlocks = numNoLockBlocks + ((desiredNumberOfBlocks - numNoLockBlocks) >> 1); + } +} + +void CMemBlockManagerMt::FreeSpace() +{ + Semaphore.Close(); + CMemBlockManager::FreeSpace(); +} + +void *CMemBlockManagerMt::AllocateBlock() +{ + // Semaphore.Lock(); + NWindows::NSynchronization::CCriticalSectionLock lock(_criticalSection); + return CMemBlockManager::AllocateBlock(); +} + +void CMemBlockManagerMt::FreeBlock(void *p, bool lockMode) +{ + if (p == 0) + return; + { + NWindows::NSynchronization::CCriticalSectionLock lock(_criticalSection); + CMemBlockManager::FreeBlock(p); + } + if (lockMode) + Semaphore.Release(); +} + +void CMemBlocks::Free(CMemBlockManagerMt *manager) +{ + while(Blocks.Size() > 0) + { + manager->FreeBlock(Blocks.Back()); + Blocks.DeleteBack(); + } + TotalSize = 0; +} + +void CMemBlocks::FreeOpt(CMemBlockManagerMt *manager) +{ + Free(manager); + Blocks.ClearAndFree(); +} + +HRESULT CMemBlocks::WriteToStream(size_t blockSize, ISequentialOutStream *outStream) const +{ + UInt64 totalSize = TotalSize; + for (int blockIndex = 0; totalSize > 0; blockIndex++) + { + UInt32 curSize = (UInt32)blockSize; + if (totalSize < curSize) + curSize = (UInt32)totalSize; + if (blockIndex >= Blocks.Size()) + return E_FAIL; + RINOK(WriteStream(outStream, Blocks[blockIndex], curSize)); + totalSize -= curSize; + } + return S_OK; +} + + +void CMemLockBlocks::FreeBlock(int index, CMemBlockManagerMt *memManager) +{ + memManager->FreeBlock(Blocks[index], LockMode); + Blocks[index] = 0; +} + +void CMemLockBlocks::Free(CMemBlockManagerMt *memManager) +{ + while (Blocks.Size() > 0) + { + FreeBlock(Blocks.Size() - 1, memManager); + Blocks.DeleteBack(); + } + TotalSize = 0; +} + +HRes CMemLockBlocks::SwitchToNoLockMode(CMemBlockManagerMt *memManager) +{ + if (LockMode) + { + if (Blocks.Size() > 0) + { + RINOK(memManager->ReleaseLockedBlocks(Blocks.Size())); + } + LockMode = false; + } + return 0; +} + +void CMemLockBlocks::Detach(CMemLockBlocks &blocks, CMemBlockManagerMt *memManager) +{ + blocks.Free(memManager); + blocks.LockMode = LockMode; + UInt64 totalSize = 0; + size_t blockSize = memManager->GetBlockSize(); + for (int i = 0; i < Blocks.Size(); i++) + { + if (totalSize < TotalSize) + blocks.Blocks.Add(Blocks[i]); + else + FreeBlock(i, memManager); + Blocks[i] = 0; + totalSize += blockSize; + } + blocks.TotalSize = TotalSize; + Free(memManager); +} diff --git a/CPP/7zip/Common/MemBlocks.h b/CPP/7zip/Common/MemBlocks.h new file mode 100644 index 0000000..f23852f --- /dev/null +++ b/CPP/7zip/Common/MemBlocks.h @@ -0,0 +1,71 @@ +// MemBlocks.h + +#ifndef __MEM_BLOCKS_H +#define __MEM_BLOCKS_H + +#include "Common/MyVector.h" + +#include "Windows/Synchronization.h" + +#include "../IStream.h" + +class CMemBlockManager +{ + void *_data; + size_t _blockSize; + void *_headFree; +public: + CMemBlockManager(size_t blockSize = (1 << 20)): _data(0), _blockSize(blockSize), _headFree(0) {} + ~CMemBlockManager() { FreeSpace(); } + + bool AllocateSpace(size_t numBlocks); + void FreeSpace(); + size_t GetBlockSize() const { return _blockSize; } + void *AllocateBlock(); + void FreeBlock(void *p); +}; + + +class CMemBlockManagerMt: public CMemBlockManager +{ + NWindows::NSynchronization::CCriticalSection _criticalSection; +public: + NWindows::NSynchronization::CSemaphoreWFMO Semaphore; + + CMemBlockManagerMt(size_t blockSize = (1 << 20)): CMemBlockManager(blockSize) {} + ~CMemBlockManagerMt() { FreeSpace(); } + + HRes AllocateSpace(NWindows::NSynchronization::CSynchro *sync, size_t numBlocks, size_t numNoLockBlocks = 0); + HRes AllocateSpaceAlways(NWindows::NSynchronization::CSynchro *sync, size_t desiredNumberOfBlocks, size_t numNoLockBlocks = 0); + void FreeSpace(); + void *AllocateBlock(); + void FreeBlock(void *p, bool lockMode = true); + HRes ReleaseLockedBlocks(int number) { return Semaphore.Release(number); } +}; + + +class CMemBlocks +{ + void Free(CMemBlockManagerMt *manager); +public: + CRecordVector Blocks; + UInt64 TotalSize; + + CMemBlocks(): TotalSize(0) {} + + void FreeOpt(CMemBlockManagerMt *manager); + HRESULT WriteToStream(size_t blockSize, ISequentialOutStream *outStream) const; +}; + +struct CMemLockBlocks: public CMemBlocks +{ + bool LockMode; + + CMemLockBlocks(): LockMode(true) {}; + void Free(CMemBlockManagerMt *memManager); + void FreeBlock(int index, CMemBlockManagerMt *memManager); + HRes SwitchToNoLockMode(CMemBlockManagerMt *memManager); + void Detach(CMemLockBlocks &blocks, CMemBlockManagerMt *memManager); +}; + +#endif diff --git a/CPP/7zip/Common/MethodId.cpp b/CPP/7zip/Common/MethodId.cpp new file mode 100644 index 0000000..b797b68 --- /dev/null +++ b/CPP/7zip/Common/MethodId.cpp @@ -0,0 +1,27 @@ +// MethodId.cpp + +#include "StdAfx.h" + +#include "MethodId.h" +#include "../../Common/MyString.h" + +static inline wchar_t GetHex(Byte value) +{ + return (wchar_t)((value < 10) ? ('0' + value) : ('A' + (value - 10))); +} + +UString ConvertMethodIdToString(UInt64 id) +{ + wchar_t s[32]; + int len = 32; + s[--len] = 0; + do + { + s[--len] = GetHex((Byte)id & 0xF); + id >>= 4; + s[--len] = GetHex((Byte)id & 0xF); + id >>= 4; + } + while (id != 0); + return s + len; +} diff --git a/CPP/7zip/Common/MethodId.h b/CPP/7zip/Common/MethodId.h new file mode 100644 index 0000000..54ebc9f --- /dev/null +++ b/CPP/7zip/Common/MethodId.h @@ -0,0 +1,10 @@ +// MethodId.h + +#ifndef __7Z_METHOD_ID_H +#define __7Z_METHOD_ID_H + +#include "../../Common/Types.h" + +typedef UInt64 CMethodId; + +#endif diff --git a/CPP/7zip/Common/MethodProps.cpp b/CPP/7zip/Common/MethodProps.cpp new file mode 100644 index 0000000..5836d0f --- /dev/null +++ b/CPP/7zip/Common/MethodProps.cpp @@ -0,0 +1,99 @@ +// MethodProps.cpp + +#include "StdAfx.h" + +#include "../../Common/MyCom.h" + +#include "../ICoder.h" + +#include "MethodProps.h" + +static const UInt64 k_LZMA = 0x030101; +static const UInt64 k_LZMA2 = 0x21; + +HRESULT SetMethodProperties(const CMethod &method, const UInt64 *inSizeForReduce, IUnknown *coder) +{ + bool tryReduce = false; + UInt32 reducedDictionarySize = 1 << 10; + if (inSizeForReduce != 0 && (method.Id == k_LZMA || method.Id == k_LZMA2)) + { + for (;;) + { + const UInt32 step = (reducedDictionarySize >> 1); + if (reducedDictionarySize >= *inSizeForReduce) + { + tryReduce = true; + break; + } + reducedDictionarySize += step; + if (reducedDictionarySize >= *inSizeForReduce) + { + tryReduce = true; + break; + } + if (reducedDictionarySize >= ((UInt32)3 << 30)) + break; + reducedDictionarySize += step; + } + } + + { + int numProps = method.Props.Size(); + CMyComPtr setCoderProperties; + coder->QueryInterface(IID_ICompressSetCoderProperties, (void **)&setCoderProperties); + if (setCoderProperties == NULL) + { + if (numProps != 0) + return E_INVALIDARG; + } + else + { + CRecordVector propIDs; + NWindows::NCOM::CPropVariant *values = new NWindows::NCOM::CPropVariant[numProps]; + HRESULT res = S_OK; + try + { + for (int i = 0; i < numProps; i++) + { + const CProp &prop = method.Props[i]; + propIDs.Add(prop.Id); + NWindows::NCOM::CPropVariant &value = values[i]; + value = prop.Value; + // if (tryReduce && prop.Id == NCoderPropID::kDictionarySize && value.vt == VT_UI4 && reducedDictionarySize < value.ulVal) + if (tryReduce) + if (prop.Id == NCoderPropID::kDictionarySize) + if (value.vt == VT_UI4) + if (reducedDictionarySize < value.ulVal) + value.ulVal = reducedDictionarySize; + } + CMyComPtr setCoderProperties; + coder->QueryInterface(IID_ICompressSetCoderProperties, (void **)&setCoderProperties); + res = setCoderProperties->SetCoderProperties(&propIDs.Front(), values, numProps); + } + catch(...) + { + delete []values; + throw; + } + delete []values; + RINOK(res); + } + } + + /* + CMyComPtr writeCoderProperties; + coder->QueryInterface(IID_ICompressWriteCoderProperties, (void **)&writeCoderProperties); + if (writeCoderProperties != NULL) + { + CSequentialOutStreamImp *outStreamSpec = new CSequentialOutStreamImp; + CMyComPtr outStream(outStreamSpec); + outStreamSpec->Init(); + RINOK(writeCoderProperties->WriteCoderProperties(outStream)); + size_t size = outStreamSpec->GetSize(); + filterProps.SetCapacity(size); + memmove(filterProps, outStreamSpec->GetBuffer(), size); + } + */ + return S_OK; +} + diff --git a/CPP/7zip/Common/MethodProps.h b/CPP/7zip/Common/MethodProps.h new file mode 100644 index 0000000..8127e21 --- /dev/null +++ b/CPP/7zip/Common/MethodProps.h @@ -0,0 +1,41 @@ +// MethodProps.h + +#ifndef __7Z_METHOD_PROPS_H +#define __7Z_METHOD_PROPS_H + +#include "../../Common/MyVector.h" + +#include "../../Windows/PropVariant.h" + +#include "MethodId.h" + +struct CProp +{ + PROPID Id; + NWindows::NCOM::CPropVariant Value; +}; + +struct CMethod +{ + CMethodId Id; + CObjectVector Props; +}; + +struct CMethodsMode +{ + CObjectVector Methods; + #ifndef _7ZIP_ST + UInt32 NumThreads; + #endif + + CMethodsMode() + #ifndef _7ZIP_ST + : NumThreads(1) + #endif + {} + bool IsEmpty() const { return Methods.IsEmpty() ; } +}; + +HRESULT SetMethodProperties(const CMethod &method, const UInt64 *inSizeForReduce, IUnknown *coder); + +#endif diff --git a/CPP/7zip/Common/OffsetStream.cpp b/CPP/7zip/Common/OffsetStream.cpp new file mode 100644 index 0000000..c5e4e6d --- /dev/null +++ b/CPP/7zip/Common/OffsetStream.cpp @@ -0,0 +1,35 @@ +// OffsetStream.cpp + +#include "StdAfx.h" + +#include "Common/Defs.h" +#include "OffsetStream.h" + +HRESULT COffsetOutStream::Init(IOutStream *stream, UInt64 offset) +{ + _offset = offset; + _stream = stream; + return _stream->Seek(offset, STREAM_SEEK_SET, NULL); +} + +STDMETHODIMP COffsetOutStream::Write(const void *data, UInt32 size, UInt32 *processedSize) +{ + return _stream->Write(data, size, processedSize); +} + +STDMETHODIMP COffsetOutStream::Seek(Int64 offset, UInt32 seekOrigin, + UInt64 *newPosition) +{ + UInt64 absoluteNewPosition; + if (seekOrigin == STREAM_SEEK_SET) + offset += _offset; + HRESULT result = _stream->Seek(offset, seekOrigin, &absoluteNewPosition); + if (newPosition != NULL) + *newPosition = absoluteNewPosition - _offset; + return result; +} + +STDMETHODIMP COffsetOutStream::SetSize(UInt64 newSize) +{ + return _stream->SetSize(_offset + newSize); +} diff --git a/CPP/7zip/Common/OffsetStream.h b/CPP/7zip/Common/OffsetStream.h new file mode 100644 index 0000000..de9d06d --- /dev/null +++ b/CPP/7zip/Common/OffsetStream.h @@ -0,0 +1,25 @@ +// OffsetStream.h + +#ifndef __OFFSETSTREAM_H +#define __OFFSETSTREAM_H + +#include "Common/MyCom.h" +#include "../IStream.h" + +class COffsetOutStream: + public IOutStream, + public CMyUnknownImp +{ + UInt64 _offset; + CMyComPtr _stream; +public: + HRESULT Init(IOutStream *stream, UInt64 offset); + + MY_UNKNOWN_IMP + + STDMETHOD(Write)(const void *data, UInt32 size, UInt32 *processedSize); + STDMETHOD(Seek)(Int64 offset, UInt32 seekOrigin, UInt64 *newPosition); + STDMETHOD(SetSize)(UInt64 newSize); +}; + +#endif diff --git a/CPP/7zip/Common/OutBuffer.cpp b/CPP/7zip/Common/OutBuffer.cpp new file mode 100644 index 0000000..2e5debd --- /dev/null +++ b/CPP/7zip/Common/OutBuffer.cpp @@ -0,0 +1,116 @@ +// OutBuffer.cpp + +#include "StdAfx.h" + +#include "../../../C/Alloc.h" + +#include "OutBuffer.h" + +bool COutBuffer::Create(UInt32 bufferSize) +{ + const UInt32 kMinBlockSize = 1; + if (bufferSize < kMinBlockSize) + bufferSize = kMinBlockSize; + if (_buffer != 0 && _bufferSize == bufferSize) + return true; + Free(); + _bufferSize = bufferSize; + _buffer = (Byte *)::MidAlloc(bufferSize); + return (_buffer != 0); +} + +void COutBuffer::Free() +{ + ::MidFree(_buffer); + _buffer = 0; +} + +void COutBuffer::SetStream(ISequentialOutStream *stream) +{ + _stream = stream; +} + +void COutBuffer::Init() +{ + _streamPos = 0; + _limitPos = _bufferSize; + _pos = 0; + _processedSize = 0; + _overDict = false; + #ifdef _NO_EXCEPTIONS + ErrorCode = S_OK; + #endif +} + +UInt64 COutBuffer::GetProcessedSize() const +{ + UInt64 res = _processedSize + _pos - _streamPos; + if (_streamPos > _pos) + res += _bufferSize; + return res; +} + + +HRESULT COutBuffer::FlushPart() +{ + // _streamPos < _bufferSize + UInt32 size = (_streamPos >= _pos) ? (_bufferSize - _streamPos) : (_pos - _streamPos); + HRESULT result = S_OK; + #ifdef _NO_EXCEPTIONS + result = ErrorCode; + #endif + if (_buffer2 != 0) + { + memmove(_buffer2, _buffer + _streamPos, size); + _buffer2 += size; + } + + if (_stream != 0 + #ifdef _NO_EXCEPTIONS + && (ErrorCode == S_OK) + #endif + ) + { + UInt32 processedSize = 0; + result = _stream->Write(_buffer + _streamPos, size, &processedSize); + size = processedSize; + } + _streamPos += size; + if (_streamPos == _bufferSize) + _streamPos = 0; + if (_pos == _bufferSize) + { + _overDict = true; + _pos = 0; + } + _limitPos = (_streamPos > _pos) ? _streamPos : _bufferSize; + _processedSize += size; + return result; +} + +HRESULT COutBuffer::Flush() +{ + #ifdef _NO_EXCEPTIONS + if (ErrorCode != S_OK) + return ErrorCode; + #endif + + while(_streamPos != _pos) + { + HRESULT result = FlushPart(); + if (result != S_OK) + return result; + } + return S_OK; +} + +void COutBuffer::FlushWithCheck() +{ + HRESULT result = Flush(); + #ifdef _NO_EXCEPTIONS + ErrorCode = result; + #else + if (result != S_OK) + throw COutBufferException(result); + #endif +} diff --git a/CPP/7zip/Common/OutBuffer.h b/CPP/7zip/Common/OutBuffer.h new file mode 100644 index 0000000..62e77ca --- /dev/null +++ b/CPP/7zip/Common/OutBuffer.h @@ -0,0 +1,64 @@ +// OutBuffer.h + +#ifndef __OUTBUFFER_H +#define __OUTBUFFER_H + +#include "../IStream.h" +#include "../../Common/MyCom.h" +#include "../../Common/MyException.h" + +#ifndef _NO_EXCEPTIONS +struct COutBufferException: public CSystemException +{ + COutBufferException(HRESULT errorCode): CSystemException(errorCode) {} +}; +#endif + +class COutBuffer +{ +protected: + Byte *_buffer; + UInt32 _pos; + UInt32 _limitPos; + UInt32 _streamPos; + UInt32 _bufferSize; + CMyComPtr _stream; + UInt64 _processedSize; + Byte *_buffer2; + bool _overDict; + + HRESULT FlushPart(); +public: + #ifdef _NO_EXCEPTIONS + HRESULT ErrorCode; + #endif + + COutBuffer(): _buffer(0), _pos(0), _stream(0), _buffer2(0) {} + ~COutBuffer() { Free(); } + + bool Create(UInt32 bufferSize); + void Free(); + + void SetMemStream(Byte *buffer) { _buffer2 = buffer; } + void SetStream(ISequentialOutStream *stream); + void Init(); + HRESULT Flush(); + void FlushWithCheck(); + void ReleaseStream() { _stream.Release(); } + + void WriteByte(Byte b) + { + _buffer[_pos++] = b; + if(_pos == _limitPos) + FlushWithCheck(); + } + void WriteBytes(const void *data, size_t size) + { + for (size_t i = 0; i < size; i++) + WriteByte(((const Byte *)data)[i]); + } + + UInt64 GetProcessedSize() const; +}; + +#endif diff --git a/CPP/7zip/Common/OutMemStream.cpp b/CPP/7zip/Common/OutMemStream.cpp new file mode 100644 index 0000000..2e92886 --- /dev/null +++ b/CPP/7zip/Common/OutMemStream.cpp @@ -0,0 +1,142 @@ +// OutMemStream.cpp + +#include "StdAfx.h" + +#include "OutMemStream.h" + +void COutMemStream::Free() +{ + Blocks.Free(_memManager); + Blocks.LockMode = true; +} + +void COutMemStream::Init() +{ + WriteToRealStreamEvent.Reset(); + _unlockEventWasSent = false; + _realStreamMode = false; + Free(); + _curBlockPos = 0; + _curBlockIndex = 0; +} + +void COutMemStream::DetachData(CMemLockBlocks &blocks) +{ + Blocks.Detach(blocks, _memManager); + Free(); +} + + +HRESULT COutMemStream::WriteToRealStream() +{ + RINOK(Blocks.WriteToStream(_memManager->GetBlockSize(), OutSeqStream)); + Blocks.Free(_memManager); + return S_OK; +} + +STDMETHODIMP COutMemStream::Write(const void *data, UInt32 size, UInt32 *processedSize) +{ + if (_realStreamMode) + return OutSeqStream->Write(data, size, processedSize); + if (processedSize != 0) + *processedSize = 0; + while(size != 0) + { + if ((int)_curBlockIndex < Blocks.Blocks.Size()) + { + Byte *p = (Byte *)Blocks.Blocks[(int)_curBlockIndex] + _curBlockPos; + size_t curSize = _memManager->GetBlockSize() - _curBlockPos; + if (size < curSize) + curSize = size; + memmove(p, data, curSize); + if (processedSize != 0) + *processedSize += (UInt32)curSize; + data = (const void *)((const Byte *)data + curSize); + size -= (UInt32)curSize; + _curBlockPos += curSize; + + UInt64 pos64 = GetPos(); + if (pos64 > Blocks.TotalSize) + Blocks.TotalSize = pos64; + if (_curBlockPos == _memManager->GetBlockSize()) + { + _curBlockIndex++; + _curBlockPos = 0; + } + continue; + } + HANDLE events[3] = { StopWritingEvent, WriteToRealStreamEvent, /* NoLockEvent, */ _memManager->Semaphore }; + DWORD waitResult = ::WaitForMultipleObjects((Blocks.LockMode ? 3 : 2), events, FALSE, INFINITE); + switch (waitResult) + { + case (WAIT_OBJECT_0 + 0): + return StopWriteResult; + case (WAIT_OBJECT_0 + 1): + { + _realStreamMode = true; + RINOK(WriteToRealStream()); + UInt32 processedSize2; + HRESULT res = OutSeqStream->Write(data, size, &processedSize2); + if (processedSize != 0) + *processedSize += processedSize2; + return res; + } + /* + case (WAIT_OBJECT_0 + 2): + { + // it has bug: no write. + if (!Blocks.SwitchToNoLockMode(_memManager)) + return E_FAIL; + break; + } + */ + case (WAIT_OBJECT_0 + 2): + break; + default: + return E_FAIL; + } + Blocks.Blocks.Add(_memManager->AllocateBlock()); + if (Blocks.Blocks.Back() == 0) + return E_FAIL; + } + return S_OK; +} + +STDMETHODIMP COutMemStream::Seek(Int64 offset, UInt32 seekOrigin, UInt64 *newPosition) +{ + if (_realStreamMode) + { + if (!OutStream) + return E_FAIL; + return OutStream->Seek(offset, seekOrigin, newPosition); + } + if (seekOrigin == STREAM_SEEK_CUR) + { + if (offset != 0) + return E_NOTIMPL; + } + else if (seekOrigin == STREAM_SEEK_SET) + { + if (offset != 0) + return E_NOTIMPL; + _curBlockIndex = 0; + _curBlockPos = 0; + } + else + return E_NOTIMPL; + if (newPosition != 0) + *newPosition = GetPos(); + return S_OK; +} + +STDMETHODIMP COutMemStream::SetSize(UInt64 newSize) +{ + if (_realStreamMode) + { + if (!OutStream) + return E_FAIL; + return OutStream->SetSize(newSize); + } + Blocks.TotalSize = newSize; + return S_OK; +} diff --git a/CPP/7zip/Common/OutMemStream.h b/CPP/7zip/Common/OutMemStream.h new file mode 100644 index 0000000..b512f7d --- /dev/null +++ b/CPP/7zip/Common/OutMemStream.h @@ -0,0 +1,96 @@ +// OutMemStream.h + +#ifndef __OUTMEMSTREAM_H +#define __OUTMEMSTREAM_H + +#include "Common/MyCom.h" +#include "MemBlocks.h" + +class COutMemStream: + public IOutStream, + public CMyUnknownImp +{ + CMemBlockManagerMt *_memManager; + size_t _curBlockIndex; + size_t _curBlockPos; + bool _realStreamMode; + + bool _unlockEventWasSent; + NWindows::NSynchronization::CAutoResetEventWFMO StopWritingEvent; + NWindows::NSynchronization::CAutoResetEventWFMO WriteToRealStreamEvent; + // NWindows::NSynchronization::CAutoResetEvent NoLockEvent; + + HRESULT StopWriteResult; + CMemLockBlocks Blocks; + + UInt64 GetPos() const { return (UInt64)_curBlockIndex * _memManager->GetBlockSize() + _curBlockPos; } + + CMyComPtr OutSeqStream; + CMyComPtr OutStream; + +public: + + HRes CreateEvents(NWindows::NSynchronization::CSynchro *sync) + { + RINOK(StopWritingEvent.CreateIfNotCreated(sync)); + return WriteToRealStreamEvent.CreateIfNotCreated(sync); + } + + void SetOutStream(IOutStream *outStream) + { + OutStream = outStream; + OutSeqStream = outStream; + } + + void SetSeqOutStream(ISequentialOutStream *outStream) + { + OutStream = NULL; + OutSeqStream = outStream; + } + + void ReleaseOutStream() + { + OutStream.Release(); + OutSeqStream.Release(); + } + + COutMemStream(CMemBlockManagerMt *memManager): _memManager(memManager) { } + + ~COutMemStream() { Free(); } + void Free(); + + void Init(); + HRESULT WriteToRealStream(); + + void DetachData(CMemLockBlocks &blocks); + + bool WasUnlockEventSent() const { return _unlockEventWasSent; } + + void SetRealStreamMode() + { + _unlockEventWasSent = true; + WriteToRealStreamEvent.Set(); + } + + /* + void SetNoLockMode() + { + _unlockEventWasSent = true; + NoLockEvent.Set(); + } + */ + + void StopWriting(HRESULT res) + { + StopWriteResult = res; + StopWritingEvent.Set(); + } + + MY_UNKNOWN_IMP + + STDMETHOD(Write)(const void *data, UInt32 size, UInt32 *processedSize); + STDMETHOD(Seek)(Int64 offset, UInt32 seekOrigin, UInt64 *newPosition); + STDMETHOD(SetSize)(UInt64 newSize); +}; + +#endif diff --git a/CPP/7zip/Common/ProgressMt.cpp b/CPP/7zip/Common/ProgressMt.cpp new file mode 100644 index 0000000..319bd24 --- /dev/null +++ b/CPP/7zip/Common/ProgressMt.cpp @@ -0,0 +1,53 @@ +// ProgressMt.h + +#include "StdAfx.h" + +#include "ProgressMt.h" + +void CMtCompressProgressMixer::Init(int numItems, ICompressProgressInfo *progress) +{ + NWindows::NSynchronization::CCriticalSectionLock lock(CriticalSection); + InSizes.Clear(); + OutSizes.Clear(); + for (int i = 0; i < numItems; i++) + { + InSizes.Add(0); + OutSizes.Add(0); + } + TotalInSize = 0; + TotalOutSize = 0; + _progress = progress; +} + +void CMtCompressProgressMixer::Reinit(int index) +{ + NWindows::NSynchronization::CCriticalSectionLock lock(CriticalSection); + InSizes[index] = 0; + OutSizes[index] = 0; +} + +HRESULT CMtCompressProgressMixer::SetRatioInfo(int index, const UInt64 *inSize, const UInt64 *outSize) +{ + NWindows::NSynchronization::CCriticalSectionLock lock(CriticalSection); + if (inSize != 0) + { + UInt64 diff = *inSize - InSizes[index]; + InSizes[index] = *inSize; + TotalInSize += diff; + } + if (outSize != 0) + { + UInt64 diff = *outSize - OutSizes[index]; + OutSizes[index] = *outSize; + TotalOutSize += diff; + } + if (_progress) + return _progress->SetRatioInfo(&TotalInSize, &TotalOutSize); + return S_OK; +} + + +STDMETHODIMP CMtCompressProgress::SetRatioInfo(const UInt64 *inSize, const UInt64 *outSize) +{ + return _progress->SetRatioInfo(_index, inSize, outSize); +} diff --git a/CPP/7zip/Common/ProgressMt.h b/CPP/7zip/Common/ProgressMt.h new file mode 100644 index 0000000..26079d4 --- /dev/null +++ b/CPP/7zip/Common/ProgressMt.h @@ -0,0 +1,46 @@ +// ProgressMt.h + +#ifndef __PROGRESSMT_H +#define __PROGRESSMT_H + +#include "../../Common/MyCom.h" +#include "../../Common/MyVector.h" +#include "../../Windows/Synchronization.h" + +#include "../ICoder.h" +#include "../IProgress.h" + +class CMtCompressProgressMixer +{ + CMyComPtr _progress; + CRecordVector InSizes; + CRecordVector OutSizes; + UInt64 TotalInSize; + UInt64 TotalOutSize; +public: + NWindows::NSynchronization::CCriticalSection CriticalSection; + void Init(int numItems, ICompressProgressInfo *progress); + void Reinit(int index); + HRESULT SetRatioInfo(int index, const UInt64 *inSize, const UInt64 *outSize); +}; + +class CMtCompressProgress: + public ICompressProgressInfo, + public CMyUnknownImp +{ + CMtCompressProgressMixer *_progress; + int _index; +public: + void Init(CMtCompressProgressMixer *progress, int index) + { + _progress = progress; + _index = index; + } + void Reinit() { _progress->Reinit(_index); } + + MY_UNKNOWN_IMP + + STDMETHOD(SetRatioInfo)(const UInt64 *inSize, const UInt64 *outSize); +}; + +#endif diff --git a/CPP/7zip/Common/ProgressUtils.cpp b/CPP/7zip/Common/ProgressUtils.cpp new file mode 100644 index 0000000..f24ff6b --- /dev/null +++ b/CPP/7zip/Common/ProgressUtils.cpp @@ -0,0 +1,42 @@ +// ProgressUtils.h + +#include "StdAfx.h" + +#include "ProgressUtils.h" + +CLocalProgress::CLocalProgress() +{ + ProgressOffset = InSize = OutSize = 0; + SendRatio = SendProgress = true; +} + +void CLocalProgress::Init(IProgress *progress, bool inSizeIsMain) +{ + _ratioProgress.Release(); + _progress = progress; + _progress.QueryInterface(IID_ICompressProgressInfo, &_ratioProgress); + _inSizeIsMain = inSizeIsMain; +} + +STDMETHODIMP CLocalProgress::SetRatioInfo(const UInt64 *inSize, const UInt64 *outSize) +{ + UInt64 inSizeNew = InSize, outSizeNew = OutSize; + if (inSize) + inSizeNew += (*inSize); + if (outSize) + outSizeNew += (*outSize); + if (SendRatio && _ratioProgress) + { + RINOK(_ratioProgress->SetRatioInfo(&inSizeNew, &outSizeNew)); + } + inSizeNew += ProgressOffset; + outSizeNew += ProgressOffset; + if (SendProgress) + return _progress->SetCompleted(_inSizeIsMain ? &inSizeNew : &outSizeNew); + return S_OK; +} + +HRESULT CLocalProgress::SetCur() +{ + return SetRatioInfo(NULL, NULL); +} diff --git a/CPP/7zip/Common/ProgressUtils.h b/CPP/7zip/Common/ProgressUtils.h new file mode 100644 index 0000000..bae5395 --- /dev/null +++ b/CPP/7zip/Common/ProgressUtils.h @@ -0,0 +1,34 @@ +// ProgressUtils.h + +#ifndef __PROGRESSUTILS_H +#define __PROGRESSUTILS_H + +#include "../../Common/MyCom.h" + +#include "../ICoder.h" +#include "../IProgress.h" + +class CLocalProgress: + public ICompressProgressInfo, + public CMyUnknownImp +{ + CMyComPtr _progress; + CMyComPtr _ratioProgress; + bool _inSizeIsMain; +public: + UInt64 ProgressOffset; + UInt64 InSize; + UInt64 OutSize; + bool SendRatio; + bool SendProgress; + + CLocalProgress(); + void Init(IProgress *progress, bool inSizeIsMain); + HRESULT SetCur(); + + MY_UNKNOWN_IMP + + STDMETHOD(SetRatioInfo)(const UInt64 *inSize, const UInt64 *outSize); +}; + +#endif diff --git a/CPP/7zip/Common/RegisterArc.h b/CPP/7zip/Common/RegisterArc.h new file mode 100644 index 0000000..45236a5 --- /dev/null +++ b/CPP/7zip/Common/RegisterArc.h @@ -0,0 +1,32 @@ +// RegisterArc.h + +#ifndef __REGISTER_ARC_H +#define __REGISTER_ARC_H + +#include "../Archive/IArchive.h" + +typedef IInArchive * (*CreateInArchiveP)(); +typedef IOutArchive * (*CreateOutArchiveP)(); + +struct CArcInfo +{ + const wchar_t *Name; + const wchar_t *Ext; + const wchar_t *AddExt; + Byte ClassId; + Byte Signature[28]; // FIXME Byte Signature[16]; adding 22 bytes to insure kSignature[0x1A]!= 0 and kSignature[0x1B] != 0 + int SignatureSize; + bool KeepName; + CreateInArchiveP CreateInArchive; + CreateOutArchiveP CreateOutArchive; +}; + +void RegisterArc(const CArcInfo *arcInfo); + +#define REGISTER_ARC_NAME(x) CRegister ## x + +#define REGISTER_ARC(x) struct REGISTER_ARC_NAME(x) { \ + REGISTER_ARC_NAME(x)() { RegisterArc(&g_ArcInfo); }}; \ + static REGISTER_ARC_NAME(x) g_RegisterArc; + +#endif diff --git a/CPP/7zip/Common/RegisterCodec.h b/CPP/7zip/Common/RegisterCodec.h new file mode 100644 index 0000000..786b4a4 --- /dev/null +++ b/CPP/7zip/Common/RegisterCodec.h @@ -0,0 +1,33 @@ +// RegisterCodec.h + +#ifndef __REGISTERCODEC_H +#define __REGISTERCODEC_H + +#include "../Common/MethodId.h" + +typedef void * (*CreateCodecP)(); +struct CCodecInfo +{ + CreateCodecP CreateDecoder; + CreateCodecP CreateEncoder; + CMethodId Id; + const wchar_t *Name; + UInt32 NumInStreams; + bool IsFilter; +}; + +void RegisterCodec(const CCodecInfo *codecInfo); + +#define REGISTER_CODEC_NAME(x) CRegisterCodec ## x + +#define REGISTER_CODEC(x) struct REGISTER_CODEC_NAME(x) { \ + REGISTER_CODEC_NAME(x)() { RegisterCodec(&g_CodecInfo); }}; \ + static REGISTER_CODEC_NAME(x) g_RegisterCodec; + +#define REGISTER_CODECS_NAME(x) CRegisterCodecs ## x +#define REGISTER_CODECS(x) struct REGISTER_CODECS_NAME(x) { \ + REGISTER_CODECS_NAME(x)() { for (int i = 0; i < sizeof(g_CodecsInfo) / sizeof(g_CodecsInfo[0]); i++) \ + RegisterCodec(&g_CodecsInfo[i]); }}; \ + static REGISTER_CODECS_NAME(x) g_RegisterCodecs; + +#endif diff --git a/CPP/7zip/Common/StreamBinder.cpp b/CPP/7zip/Common/StreamBinder.cpp new file mode 100644 index 0000000..9dfa3fb --- /dev/null +++ b/CPP/7zip/Common/StreamBinder.cpp @@ -0,0 +1,152 @@ +// StreamBinder.cpp + +#include "StdAfx.h" + +#include "StreamBinder.h" +#include "../../Common/Defs.h" +#include "../../Common/MyCom.h" + +using namespace NWindows; +using namespace NSynchronization; + +class CSequentialInStreamForBinder: + public ISequentialInStream, + public CMyUnknownImp +{ +public: + MY_UNKNOWN_IMP + + STDMETHOD(Read)(void *data, UInt32 size, UInt32 *processedSize); +private: + CStreamBinder *m_StreamBinder; +public: + ~CSequentialInStreamForBinder() { m_StreamBinder->CloseRead(); } + void SetBinder(CStreamBinder *streamBinder) { m_StreamBinder = streamBinder; } +}; + +STDMETHODIMP CSequentialInStreamForBinder::Read(void *data, UInt32 size, UInt32 *processedSize) + { return m_StreamBinder->Read(data, size, processedSize); } + +class CSequentialOutStreamForBinder: + public ISequentialOutStream, + public CMyUnknownImp +{ +public: + MY_UNKNOWN_IMP + + STDMETHOD(Write)(const void *data, UInt32 size, UInt32 *processedSize); + +private: + CStreamBinder *m_StreamBinder; +public: + ~CSequentialOutStreamForBinder() { m_StreamBinder->CloseWrite(); } + void SetBinder(CStreamBinder *streamBinder) { m_StreamBinder = streamBinder; } +}; + +STDMETHODIMP CSequentialOutStreamForBinder::Write(const void *data, UInt32 size, UInt32 *processedSize) + { return m_StreamBinder->Write(data, size, processedSize); } + + +////////////////////////// +// CStreamBinder +// (_thereAreBytesToReadEvent && _bufferSize == 0) means that stream is finished. + +HRes CStreamBinder::CreateEvents() +{ + _synchroFor_allBytesAreWritenEvent_and_readStreamIsClosedEvent = new NWindows::NSynchronization::CSynchro(); + _synchroFor_allBytesAreWritenEvent_and_readStreamIsClosedEvent->Create(); + RINOK(_allBytesAreWritenEvent.Create(_synchroFor_allBytesAreWritenEvent_and_readStreamIsClosedEvent,true)); + RINOK(_thereAreBytesToReadEvent.Create()); + return _readStreamIsClosedEvent.Create(_synchroFor_allBytesAreWritenEvent_and_readStreamIsClosedEvent); +} + +void CStreamBinder::ReInit() +{ + _thereAreBytesToReadEvent.Reset(); + _readStreamIsClosedEvent.Reset(); + ProcessedSize = 0; +} + + + +void CStreamBinder::CreateStreams(ISequentialInStream **inStream, + ISequentialOutStream **outStream) +{ + CSequentialInStreamForBinder *inStreamSpec = new + CSequentialInStreamForBinder; + CMyComPtr inStreamLoc(inStreamSpec); + inStreamSpec->SetBinder(this); + *inStream = inStreamLoc.Detach(); + + CSequentialOutStreamForBinder *outStreamSpec = new + CSequentialOutStreamForBinder; + CMyComPtr outStreamLoc(outStreamSpec); + outStreamSpec->SetBinder(this); + *outStream = outStreamLoc.Detach(); + + _buffer = NULL; + _bufferSize= 0; + ProcessedSize = 0; +} + +HRESULT CStreamBinder::Read(void *data, UInt32 size, UInt32 *processedSize) +{ + UInt32 sizeToRead = size; + if (size > 0) + { + RINOK(_thereAreBytesToReadEvent.Lock()); + sizeToRead = MyMin(_bufferSize, size); + if (_bufferSize > 0) + { + memcpy(data, _buffer, sizeToRead); + _buffer = ((const Byte *)_buffer) + sizeToRead; + _bufferSize -= sizeToRead; + if (_bufferSize == 0) + { + _thereAreBytesToReadEvent.Reset(); + _allBytesAreWritenEvent.Set(); + } + } + } + if (processedSize != NULL) + *processedSize = sizeToRead; + ProcessedSize += sizeToRead; + return S_OK; +} + +void CStreamBinder::CloseRead() +{ + _readStreamIsClosedEvent.Set(); +} + +HRESULT CStreamBinder::Write(const void *data, UInt32 size, UInt32 *processedSize) +{ + if (size > 0) + { + _buffer = data; + _bufferSize = size; + _allBytesAreWritenEvent.Reset(); + _thereAreBytesToReadEvent.Set(); + + HANDLE events[2]; + events[0] = _allBytesAreWritenEvent; + events[1] = _readStreamIsClosedEvent; + DWORD waitResult = ::WaitForMultipleObjects(2, events, FALSE, INFINITE); + if (waitResult != WAIT_OBJECT_0 + 0) + { + // ReadingWasClosed = true; + return S_FALSE; + } + // if(!_allBytesAreWritenEvent.Lock()) + // return E_FAIL; + } + if (processedSize != NULL) + *processedSize = size; + return S_OK; +} + +void CStreamBinder::CloseWrite() +{ + // _bufferSize must be = 0 + _thereAreBytesToReadEvent.Set(); +} diff --git a/CPP/7zip/Common/StreamBinder.h b/CPP/7zip/Common/StreamBinder.h new file mode 100644 index 0000000..47743de --- /dev/null +++ b/CPP/7zip/Common/StreamBinder.h @@ -0,0 +1,38 @@ +// StreamBinder.h + +#ifndef __STREAMBINDER_H +#define __STREAMBINDER_H + +#include "../IStream.h" +#include "../../Windows/Synchronization.h" + +class CStreamBinder +{ + NWindows::NSynchronization::CManualResetEventWFMO _allBytesAreWritenEvent; + NWindows::NSynchronization::CManualResetEvent _thereAreBytesToReadEvent; + NWindows::NSynchronization::CManualResetEventWFMO _readStreamIsClosedEvent; + NWindows::NSynchronization::CSynchro * _synchroFor_allBytesAreWritenEvent_and_readStreamIsClosedEvent; + UInt32 _bufferSize; + const void *_buffer; +public: + // bool ReadingWasClosed; + UInt64 ProcessedSize; + CStreamBinder() { _synchroFor_allBytesAreWritenEvent_and_readStreamIsClosedEvent = 0; } + ~CStreamBinder() { + if (_synchroFor_allBytesAreWritenEvent_and_readStreamIsClosedEvent) + delete _synchroFor_allBytesAreWritenEvent_and_readStreamIsClosedEvent; + _synchroFor_allBytesAreWritenEvent_and_readStreamIsClosedEvent = 0; + } + HRes CreateEvents(); + + void CreateStreams(ISequentialInStream **inStream, + ISequentialOutStream **outStream); + HRESULT Read(void *data, UInt32 size, UInt32 *processedSize); + void CloseRead(); + + HRESULT Write(const void *data, UInt32 size, UInt32 *processedSize); + void CloseWrite(); + void ReInit(); +}; + +#endif diff --git a/CPP/7zip/Common/StreamObjects.cpp b/CPP/7zip/Common/StreamObjects.cpp new file mode 100644 index 0000000..24253a9 --- /dev/null +++ b/CPP/7zip/Common/StreamObjects.cpp @@ -0,0 +1,221 @@ +// StreamObjects.cpp + +#include "StdAfx.h" + +#include "../../../C/Alloc.h" + +#include "StreamObjects.h" + +STDMETHODIMP CBufInStream::Read(void *data, UInt32 size, UInt32 *processedSize) +{ + if (processedSize) + *processedSize = 0; + if (size == 0) + return S_OK; + if (_pos > _size) + return E_FAIL; + size_t rem = _size - (size_t)_pos; + if (rem > size) + rem = (size_t)size; + memcpy(data, _data + (size_t)_pos, rem); + _pos += rem; + if (processedSize) + *processedSize = (UInt32)rem; + return S_OK; +} + +STDMETHODIMP CBufInStream::Seek(Int64 offset, UInt32 seekOrigin, UInt64 *newPosition) +{ + switch(seekOrigin) + { + case STREAM_SEEK_SET: _pos = offset; break; + case STREAM_SEEK_CUR: _pos += offset; break; + case STREAM_SEEK_END: _pos = _size + offset; break; + default: return STG_E_INVALIDFUNCTION; + } + if (newPosition) + *newPosition = _pos; + return S_OK; +} + +void CByteDynBuffer::Free() +{ + free(_buf); + _buf = 0; + _capacity = 0; +} + +bool CByteDynBuffer::EnsureCapacity(size_t cap) +{ + if (cap <= _capacity) + return true; + size_t delta; + if (_capacity > 64) + delta = _capacity / 4; + else if (_capacity > 8) + delta = 16; + else + delta = 4; + cap = MyMax(_capacity + delta, cap); + Byte *buf = (Byte *)realloc(_buf, cap); + if (!buf) + return false; + _buf = buf; + _capacity = cap; + return true; +} + +Byte *CDynBufSeqOutStream::GetBufPtrForWriting(size_t addSize) +{ + addSize += _size; + if (addSize < _size) + return NULL; + if (!_buffer.EnsureCapacity(addSize)) + return NULL; + return (Byte *)_buffer + _size; +} + +void CDynBufSeqOutStream::CopyToBuffer(CByteBuffer &dest) const +{ + dest.SetCapacity(_size); + memcpy((Byte *)dest, (const Byte *)_buffer, _size); +} + +STDMETHODIMP CDynBufSeqOutStream::Write(const void *data, UInt32 size, UInt32 *processedSize) +{ + if (processedSize) + *processedSize = 0; + if (size == 0) + return S_OK; + Byte *buf = GetBufPtrForWriting(size); + if (!buf) + return E_OUTOFMEMORY; + memcpy(buf, data, size); + UpdateSize(size); + if (processedSize) + *processedSize = size; + return S_OK; +} + +STDMETHODIMP CBufPtrSeqOutStream::Write(const void *data, UInt32 size, UInt32 *processedSize) +{ + size_t rem = _size - _pos; + if (rem > size) + rem = (size_t)size; + memcpy(_buffer + _pos, data, rem); + _pos += rem; + if (processedSize) + *processedSize = (UInt32)rem; + return (rem != 0 || size == 0) ? S_OK : E_FAIL; +} + +STDMETHODIMP CSequentialOutStreamSizeCount::Write(const void *data, UInt32 size, UInt32 *processedSize) +{ + UInt32 realProcessedSize; + HRESULT result = _stream->Write(data, size, &realProcessedSize); + _size += realProcessedSize; + if (processedSize) + *processedSize = realProcessedSize; + return result; +} + +static const UInt64 kEmptyTag = (UInt64)(Int64)-1; + +void CCachedInStream::Free() +{ + MyFree(_tags); + _tags = 0; + MidFree(_data); + _data = 0; +} + +bool CCachedInStream::Alloc(unsigned blockSizeLog, unsigned numBlocksLog) +{ + unsigned sizeLog = blockSizeLog + numBlocksLog; + if (sizeLog >= sizeof(size_t) * 8) + return false; + size_t dataSize = (size_t)1 << sizeLog; + if (_data == 0 || dataSize != _dataSize) + { + MidFree(_data); + _data = (Byte *)MidAlloc(dataSize); + if (_data == 0) + return false; + _dataSize = dataSize; + } + if (_tags == 0 || numBlocksLog != _numBlocksLog) + { + MyFree(_tags); + _tags = (UInt64 *)MyAlloc(sizeof(UInt64) << numBlocksLog); + if (_tags == 0) + return false; + _numBlocksLog = numBlocksLog; + } + _blockSizeLog = blockSizeLog; + return true; +} + +void CCachedInStream::Init(UInt64 size) +{ + _size = size; + _pos = 0; + size_t numBlocks = (size_t)1 << _numBlocksLog; + for (size_t i = 0; i < numBlocks; i++) + _tags[i] = kEmptyTag; +} + +STDMETHODIMP CCachedInStream::Read(void *data, UInt32 size, UInt32 *processedSize) +{ + if (processedSize) + *processedSize = 0; + if (size == 0) + return S_OK; + if (_pos > _size) + return E_FAIL; + + { + UInt64 rem = _size - _pos; + if (size > rem) + size = (UInt32)rem; + } + + while (size != 0) + { + UInt64 cacheTag = _pos >> _blockSizeLog; + size_t cacheIndex = (size_t)cacheTag & (((size_t)1 << _numBlocksLog) - 1); + Byte *p = _data + (cacheIndex << _blockSizeLog); + if (_tags[cacheIndex] != cacheTag) + { + UInt64 remInBlock = _size - (cacheTag << _blockSizeLog); + size_t blockSize = (size_t)1 << _blockSizeLog; + if (blockSize > remInBlock) + blockSize = (size_t)remInBlock; + RINOK(ReadBlock(cacheTag, p, blockSize)); + _tags[cacheIndex] = cacheTag; + } + size_t offset = (size_t)_pos & (((size_t)1 << _blockSizeLog) - 1); + UInt32 cur = (UInt32)MyMin(((size_t)1 << _blockSizeLog) - offset, (size_t)size); + memcpy(data, p + offset, cur); + if (processedSize) + *processedSize += cur; + data = (void *)((const Byte *)data + cur); + _pos += cur; + size -= cur; + } + + return S_OK; +} + +STDMETHODIMP CCachedInStream::Seek(Int64 offset, UInt32 seekOrigin, UInt64 *newPosition) +{ + switch(seekOrigin) + { + case STREAM_SEEK_SET: _pos = offset; break; + case STREAM_SEEK_CUR: _pos = _pos + offset; break; + case STREAM_SEEK_END: _pos = _size + offset; break; + default: return STG_E_INVALIDFUNCTION; + } + if (newPosition != 0) + *newPosition = _pos; + return S_OK; +} diff --git a/CPP/7zip/Common/StreamObjects.h b/CPP/7zip/Common/StreamObjects.h new file mode 100644 index 0000000..8cd95c7 --- /dev/null +++ b/CPP/7zip/Common/StreamObjects.h @@ -0,0 +1,135 @@ +// StreamObjects.h + +#ifndef __STREAM_OBJECTS_H +#define __STREAM_OBJECTS_H + +#include "../../Common/Buffer.h" +#include "../../Common/MyCom.h" +#include "../IStream.h" + +struct CReferenceBuf: + public IUnknown, + public CMyUnknownImp +{ + CByteBuffer Buf; + MY_UNKNOWN_IMP +}; + +class CBufInStream: + public IInStream, + public CMyUnknownImp +{ + const Byte *_data; + UInt64 _pos; + size_t _size; + CMyComPtr _ref; +public: + void Init(const Byte *data, size_t size, IUnknown *ref = 0) + { + _data = data; + _size = size; + _pos = 0; + _ref = ref; + } + void Init(CReferenceBuf *ref) { Init(ref->Buf, ref->Buf.GetCapacity(), ref); } + + MY_UNKNOWN_IMP1(IInStream) + STDMETHOD(Read)(void *data, UInt32 size, UInt32 *processedSize); + STDMETHOD(Seek)(Int64 offset, UInt32 seekOrigin, UInt64 *newPosition); +}; + +class CByteDynBuffer +{ + size_t _capacity; + Byte *_buf; +public: + CByteDynBuffer(): _capacity(0), _buf(0) {}; + // there is no copy constructor. So don't copy this object. + ~CByteDynBuffer() { Free(); } + void Free(); + size_t GetCapacity() const { return _capacity; } + operator Byte*() const { return _buf; }; + operator const Byte*() const { return _buf; }; + bool EnsureCapacity(size_t capacity); +}; + +class CDynBufSeqOutStream: + public ISequentialOutStream, + public CMyUnknownImp +{ + CByteDynBuffer _buffer; + size_t _size; +public: + CDynBufSeqOutStream(): _size(0) {} + void Init() { _size = 0; } + size_t GetSize() const { return _size; } + const Byte *GetBuffer() const { return _buffer; } + void CopyToBuffer(CByteBuffer &dest) const; + Byte *GetBufPtrForWriting(size_t addSize); + void UpdateSize(size_t addSize) { _size += addSize; } + + MY_UNKNOWN_IMP + STDMETHOD(Write)(const void *data, UInt32 size, UInt32 *processedSize); +}; + +class CBufPtrSeqOutStream: + public ISequentialOutStream, + public CMyUnknownImp +{ + Byte *_buffer; + size_t _size; + size_t _pos; +public: + void Init(Byte *buffer, size_t size) + { + _buffer = buffer; + _pos = 0; + _size = size; + } + size_t GetPos() const { return _pos; } + + MY_UNKNOWN_IMP + STDMETHOD(Write)(const void *data, UInt32 size, UInt32 *processedSize); +}; + +class CSequentialOutStreamSizeCount: + public ISequentialOutStream, + public CMyUnknownImp +{ + CMyComPtr _stream; + UInt64 _size; +public: + void SetStream(ISequentialOutStream *stream) { _stream = stream; } + void Init() { _size = 0; } + UInt64 GetSize() const { return _size; } + + MY_UNKNOWN_IMP + STDMETHOD(Write)(const void *data, UInt32 size, UInt32 *processedSize); +}; + +class CCachedInStream: + public IInStream, + public CMyUnknownImp +{ + UInt64 *_tags; + Byte *_data; + size_t _dataSize; + unsigned _blockSizeLog; + unsigned _numBlocksLog; + UInt64 _size; + UInt64 _pos; +protected: + virtual HRESULT ReadBlock(UInt64 blockIndex, Byte *dest, size_t blockSize) = 0; +public: + CCachedInStream(): _tags(0), _data(0) {} + virtual ~CCachedInStream() { Free(); } // the destructor must be virtual (release calls it) !!! + void Free(); + bool Alloc(unsigned blockSizeLog, unsigned numBlocksLog); + void Init(UInt64 size); + + MY_UNKNOWN_IMP2(ISequentialInStream, IInStream) + STDMETHOD(Read)(void *data, UInt32 size, UInt32 *processedSize); + STDMETHOD(Seek)(Int64 offset, UInt32 seekOrigin, UInt64 *newPosition); +}; + +#endif diff --git a/CPP/7zip/Common/StreamUtils.cpp b/CPP/7zip/Common/StreamUtils.cpp new file mode 100644 index 0000000..049e4aa --- /dev/null +++ b/CPP/7zip/Common/StreamUtils.cpp @@ -0,0 +1,56 @@ +// StreamUtils.cpp + +#include "StdAfx.h" + +#include "StreamUtils.h" + +static const UInt32 kBlockSize = ((UInt32)1 << 31); + +HRESULT ReadStream(ISequentialInStream *stream, void *data, size_t *processedSize) +{ + size_t size = *processedSize; + *processedSize = 0; + while (size != 0) + { + UInt32 curSize = (size < kBlockSize) ? (UInt32)size : kBlockSize; + UInt32 processedSizeLoc; + HRESULT res = stream->Read(data, curSize, &processedSizeLoc); + *processedSize += processedSizeLoc; + data = (void *)((Byte *)data + processedSizeLoc); + size -= processedSizeLoc; + RINOK(res); + if (processedSizeLoc == 0) + return S_OK; + } + return S_OK; +} + +HRESULT ReadStream_FALSE(ISequentialInStream *stream, void *data, size_t size) +{ + size_t processedSize = size; + RINOK(ReadStream(stream, data, &processedSize)); + return (size == processedSize) ? S_OK : S_FALSE; +} + +HRESULT ReadStream_FAIL(ISequentialInStream *stream, void *data, size_t size) +{ + size_t processedSize = size; + RINOK(ReadStream(stream, data, &processedSize)); + return (size == processedSize) ? S_OK : E_FAIL; +} + +HRESULT WriteStream(ISequentialOutStream *stream, const void *data, size_t size) +{ + while (size != 0) + { + UInt32 curSize = (size < kBlockSize) ? (UInt32)size : kBlockSize; + UInt32 processedSizeLoc; + HRESULT res = stream->Write(data, curSize, &processedSizeLoc); + data = (const void *)((const Byte *)data + processedSizeLoc); + size -= processedSizeLoc; + RINOK(res); + if (processedSizeLoc == 0) + return E_FAIL; + } + return S_OK; +} diff --git a/CPP/7zip/Common/StreamUtils.h b/CPP/7zip/Common/StreamUtils.h new file mode 100644 index 0000000..f1cfd18 --- /dev/null +++ b/CPP/7zip/Common/StreamUtils.h @@ -0,0 +1,13 @@ +// StreamUtils.h + +#ifndef __STREAMUTILS_H +#define __STREAMUTILS_H + +#include "../IStream.h" + +HRESULT ReadStream(ISequentialInStream *stream, void *data, size_t *size); +HRESULT ReadStream_FALSE(ISequentialInStream *stream, void *data, size_t size); +HRESULT ReadStream_FAIL(ISequentialInStream *stream, void *data, size_t size); +HRESULT WriteStream(ISequentialOutStream *stream, const void *data, size_t size); + +#endif diff --git a/CPP/7zip/Common/VirtThread.cpp b/CPP/7zip/Common/VirtThread.cpp new file mode 100644 index 0000000..cf39bd0 --- /dev/null +++ b/CPP/7zip/Common/VirtThread.cpp @@ -0,0 +1,46 @@ +// VirtThread.cpp + +#include "StdAfx.h" + +#include "VirtThread.h" + +static THREAD_FUNC_DECL CoderThread(void *p) +{ + for (;;) + { + CVirtThread *t = (CVirtThread *)p; + t->StartEvent.Lock(); + if (t->ExitEvent) + return 0; + t->Execute(); + t->FinishedEvent.Set(); + } +} + +WRes CVirtThread::Create() +{ + RINOK(StartEvent.CreateIfNotCreated()); + RINOK(FinishedEvent.CreateIfNotCreated()); + StartEvent.Reset(); + FinishedEvent.Reset(); + ExitEvent = false; + if (Thread.IsCreated()) + return S_OK; + return Thread.Create(CoderThread, this); +} + +void CVirtThread::Start() +{ + ExitEvent = false; + StartEvent.Set(); +} + +CVirtThread::~CVirtThread() +{ + ExitEvent = true; + if (StartEvent.IsCreated()) + StartEvent.Set(); + if (Thread.IsCreated()) + Thread.Wait(); +} + diff --git a/CPP/7zip/Common/VirtThread.h b/CPP/7zip/Common/VirtThread.h new file mode 100644 index 0000000..f14a1f2 --- /dev/null +++ b/CPP/7zip/Common/VirtThread.h @@ -0,0 +1,23 @@ +// VirtThread.h + +#ifndef __VIRTTHREAD_H +#define __VIRTTHREAD_H + +#include "../../Windows/Synchronization.h" +#include "../../Windows/Thread.h" + +struct CVirtThread +{ + NWindows::NSynchronization::CAutoResetEvent StartEvent; + NWindows::NSynchronization::CAutoResetEvent FinishedEvent; + NWindows::CThread Thread; + bool ExitEvent; + + ~CVirtThread(); + WRes Create(); + void Start(); + void WaitFinish() { FinishedEvent.Lock(); } + virtual void Execute() = 0; +}; + +#endif diff --git a/CPP/7zip/Compress/ArjDecoder1.cpp b/CPP/7zip/Compress/ArjDecoder1.cpp new file mode 100644 index 0000000..2c354e1 --- /dev/null +++ b/CPP/7zip/Compress/ArjDecoder1.cpp @@ -0,0 +1,309 @@ +// ArjDecoder1.cpp + +#include "StdAfx.h" + +#include "ArjDecoder1.h" + +namespace NCompress{ +namespace NArj { +namespace NDecoder1 { + +static const UInt32 kHistorySize = 26624; +static const UInt32 kMatchMinLen = 3; +static const UInt32 kMatchMaxLen = 256; + +// static const UInt32 kNC = 255 + kMatchMaxLen + 2 - kMatchMinLen; + +void CCoder::MakeTable(int nchar, Byte *bitlen, int tablebits, + UInt32 *table, int tablesize) +{ + UInt32 count[17], weight[17], start[18], *p; + UInt32 i, k, len, ch, jutbits, avail, nextcode, mask; + + for (i = 1; i <= 16; i++) + count[i] = 0; + for (i = 0; (int)i < nchar; i++) + count[bitlen[i]]++; + + start[1] = 0; + for (i = 1; i <= 16; i++) + start[i + 1] = start[i] + (count[i] << (16 - i)); + if (start[17] != (UInt32) (1 << 16)) + throw "Data error"; + + jutbits = 16 - tablebits; + for (i = 1; (int)i <= tablebits; i++) + { + start[i] >>= jutbits; + weight[i] = 1 << (tablebits - i); + } + while (i <= 16) + { + weight[i] = 1 << (16 - i); + i++; + } + + i = start[tablebits + 1] >> jutbits; + if (i != (UInt32) (1 << 16)) + { + k = 1 << tablebits; + while (i != k) + table[i++] = 0; + } + + avail = nchar; + mask = 1 << (15 - tablebits); + for (ch = 0; (int)ch < nchar; ch++) + { + if ((len = bitlen[ch]) == 0) + continue; + k = start[len]; + nextcode = k + weight[len]; + if ((int)len <= tablebits) + { + if (nextcode > (UInt32)tablesize) + throw "Data error"; + for (i = start[len]; i < nextcode; i++) + table[i] = ch; + } + else + { + p = &table[k >> jutbits]; + i = len - tablebits; + while (i != 0) + { + if (*p == 0) + { + right[avail] = left[avail] = 0; + *p = avail++; + } + if (k & mask) + p = &right[*p]; + else + p = &left[*p]; + k <<= 1; + i--; + } + *p = ch; + } + start[len] = nextcode; + } +} + +void CCoder::read_pt_len(int nn, int nbit, int i_special) +{ + UInt32 n = m_InBitStream.ReadBits(nbit); + if (n == 0) + { + UInt32 c = m_InBitStream.ReadBits(nbit); + int i; + for (i = 0; i < nn; i++) + pt_len[i] = 0; + for (i = 0; i < 256; i++) + pt_table[i] = c; + } + else + { + UInt32 i = 0; + while (i < n) + { + UInt32 bitBuf = m_InBitStream.GetValue(16); + int c = bitBuf >> 13; + if (c == 7) + { + UInt32 mask = 1 << (12); + while (mask & bitBuf) + { + mask >>= 1; + c++; + } + } + m_InBitStream.MovePos((c < 7) ? 3 : (int)(c - 3)); + pt_len[i++] = (Byte)c; + if (i == (UInt32)i_special) + { + c = m_InBitStream.ReadBits(2); + while (--c >= 0) + pt_len[i++] = 0; + } + } + while (i < (UInt32)nn) + pt_len[i++] = 0; + MakeTable(nn, pt_len, 8, pt_table, PTABLESIZE); + } +} + +void CCoder::read_c_len() +{ + int i, c, n; + UInt32 mask; + + n = m_InBitStream.ReadBits(CBIT); + if (n == 0) + { + c = m_InBitStream.ReadBits(CBIT); + for (i = 0; i < NC; i++) + c_len[i] = 0; + for (i = 0; i < CTABLESIZE; i++) + c_table[i] = c; + } + else + { + i = 0; + while (i < n) + { + UInt32 bitBuf = m_InBitStream.GetValue(16); + c = pt_table[bitBuf >> (8)]; + if (c >= NT) + { + mask = 1 << (7); + do + { + if (bitBuf & mask) + c = right[c]; + else + c = left[c]; + mask >>= 1; + } while (c >= NT); + } + m_InBitStream.MovePos((int)(pt_len[c])); + if (c <= 2) + { + if (c == 0) + c = 1; + else if (c == 1) + c = m_InBitStream.ReadBits(4) + 3; + else + c = m_InBitStream.ReadBits(CBIT) + 20; + while (--c >= 0) + c_len[i++] = 0; + } + else + c_len[i++] = (Byte)(c - 2); + } + while (i < NC) + c_len[i++] = 0; + MakeTable(NC, c_len, 12, c_table, CTABLESIZE); + } +} + +UInt32 CCoder::decode_c() +{ + UInt32 j, mask; + UInt32 bitbuf = m_InBitStream.GetValue(16); + j = c_table[bitbuf >> 4]; + if (j >= NC) + { + mask = 1 << (3); + do + { + if (bitbuf & mask) + j = right[j]; + else + j = left[j]; + mask >>= 1; + } while (j >= NC); + } + m_InBitStream.MovePos((int)(c_len[j])); + return j; +} + +UInt32 CCoder::decode_p() +{ + UInt32 j, mask; + UInt32 bitbuf = m_InBitStream.GetValue(16); + j = pt_table[bitbuf >> (8)]; + if (j >= NP) + { + mask = 1 << (7); + do + { + if (bitbuf & mask) + j = right[j]; + else + j = left[j]; + mask >>= 1; + } while (j >= NP); + } + m_InBitStream.MovePos((int)(pt_len[j])); + if (j != 0) + { + j--; + j = (1 << j) + m_InBitStream.ReadBits((int)j); + } + return j; +} + + +HRESULT CCoder::CodeReal(ISequentialInStream *inStream, ISequentialOutStream *outStream, + const UInt64 * /* inSize */, const UInt64 *outSize, ICompressProgressInfo *progress) +{ + if (outSize == NULL) + return E_INVALIDARG; + + if (!m_OutWindowStream.Create(kHistorySize)) + return E_OUTOFMEMORY; + if (!m_InBitStream.Create(1 << 20)) + return E_OUTOFMEMORY; + + // check it + for (int i = 0; i < CTABLESIZE; i++) + c_table[i] = 0; + + UInt64 pos = 0; + m_OutWindowStream.SetStream(outStream); + m_OutWindowStream.Init(false); + m_InBitStream.SetStream(inStream); + m_InBitStream.Init(); + + CCoderReleaser coderReleaser(this); + + UInt32 blockSize = 0; + + while(pos < *outSize) + { + if (blockSize == 0) + { + if (progress != NULL) + { + UInt64 packSize = m_InBitStream.GetProcessedSize(); + RINOK(progress->SetRatioInfo(&packSize, &pos)); + } + blockSize = m_InBitStream.ReadBits(16); + read_pt_len(NT, TBIT, 3); + read_c_len(); + read_pt_len(NP, PBIT, -1); + } + blockSize--; + + UInt32 number = decode_c(); + if (number < 256) + { + m_OutWindowStream.PutByte((Byte)number); + pos++; + continue; + } + else + { + UInt32 len = number - 256 + kMatchMinLen; + UInt32 distance = decode_p(); + if (distance >= pos) + return S_FALSE; + m_OutWindowStream.CopyBlock(distance, len); + pos += len; + } + } + coderReleaser.NeedFlush = false; + return m_OutWindowStream.Flush(); +} + +STDMETHODIMP CCoder::Code(ISequentialInStream *inStream, ISequentialOutStream *outStream, + const UInt64 *inSize, const UInt64 *outSize, ICompressProgressInfo *progress) +{ + try { return CodeReal(inStream, outStream, inSize, outSize, progress);} + catch(const CInBufferException &e) { return e.ErrorCode; } + catch(const CLzOutWindowException &e) { return e.ErrorCode; } + catch(...) { return S_FALSE; } +} + +}}} diff --git a/CPP/7zip/Compress/ArjDecoder1.h b/CPP/7zip/Compress/ArjDecoder1.h new file mode 100644 index 0000000..17939da --- /dev/null +++ b/CPP/7zip/Compress/ArjDecoder1.h @@ -0,0 +1,98 @@ +// ArjDecoder1.h + +#ifndef __COMPRESS_ARJ_DECODER1_H +#define __COMPRESS_ARJ_DECODER1_H + +#include "../../Common/MyCom.h" + +#include "../ICoder.h" + +#include "../Common/InBuffer.h" + +#include "BitmDecoder.h" +#include "LzOutWindow.h" + +namespace NCompress { +namespace NArj { +namespace NDecoder1 { + +#define CODE_BIT 16 + +#define THRESHOLD 3 +#define DDICSIZ 26624 +#define MAXDICBIT 16 +#define MATCHBIT 8 +#define MAXMATCH 256 +#define NC (0xFF + MAXMATCH + 2 - THRESHOLD) +#define NP (MAXDICBIT + 1) +#define CBIT 9 +#define NT (CODE_BIT + 3) +#define PBIT 5 +#define TBIT 5 + +#if NT > NP +#define NPT NT +#else +#define NPT NP +#endif + +#define CTABLESIZE 4096 +#define PTABLESIZE 256 + + +class CCoder : + public ICompressCoder, + public CMyUnknownImp +{ + CLzOutWindow m_OutWindowStream; + NBitm::CDecoder m_InBitStream; + + UInt32 left[2 * NC - 1]; + UInt32 right[2 * NC - 1]; + Byte c_len[NC]; + Byte pt_len[NPT]; + + UInt32 c_table[CTABLESIZE]; + UInt32 pt_table[PTABLESIZE]; + + void ReleaseStreams() + { + m_OutWindowStream.ReleaseStream(); + m_InBitStream.ReleaseStream(); + } + + class CCoderReleaser + { + CCoder *m_Coder; + public: + bool NeedFlush; + CCoderReleaser(CCoder *coder): m_Coder(coder), NeedFlush(true) {} + ~CCoderReleaser() + { + if (NeedFlush) + m_Coder->m_OutWindowStream.Flush(); + m_Coder->ReleaseStreams(); + } + }; + friend class CCoderReleaser; + + void MakeTable(int nchar, Byte *bitlen, int tablebits, UInt32 *table, int tablesize); + + void read_c_len(); + void read_pt_len(int nn, int nbit, int i_special); + UInt32 decode_c(); + UInt32 decode_p(); + + HRESULT CodeReal(ISequentialInStream *inStream, ISequentialOutStream *outStream, + const UInt64 *inSize, const UInt64 *outSize, ICompressProgressInfo *progress); +public: + MY_UNKNOWN_IMP + + STDMETHOD(Code)(ISequentialInStream *inStream, ISequentialOutStream *outStream, + const UInt64 *inSize, const UInt64 *outSize, ICompressProgressInfo *progress); + +}; + +}}} + +#endif diff --git a/CPP/7zip/Compress/ArjDecoder2.cpp b/CPP/7zip/Compress/ArjDecoder2.cpp new file mode 100644 index 0000000..365993b --- /dev/null +++ b/CPP/7zip/Compress/ArjDecoder2.cpp @@ -0,0 +1,90 @@ +// ArjDecoder2.cpp + +#include "StdAfx.h" + +#include "ArjDecoder2.h" + +namespace NCompress{ +namespace NArj { +namespace NDecoder2 { + +static const UInt32 kHistorySize = 26624; +static const UInt32 kMatchMinLen = 3; + +HRESULT CCoder::CodeReal(ISequentialInStream *inStream, ISequentialOutStream *outStream, + const UInt64 * /* inSize */, const UInt64 *outSize, ICompressProgressInfo * /* progress */) +{ + if (outSize == NULL) + return E_INVALIDARG; + + if (!m_OutWindowStream.Create(kHistorySize)) + return E_OUTOFMEMORY; + if (!m_InBitStream.Create(1 << 20)) + return E_OUTOFMEMORY; + + UInt64 pos = 0; + m_OutWindowStream.SetStream(outStream); + m_OutWindowStream.Init(false); + m_InBitStream.SetStream(inStream); + m_InBitStream.Init(); + CCoderReleaser coderReleaser(this); + + while(pos < *outSize) + { + const UInt32 kStartWidth = 0; + const UInt32 kStopWidth = 7; + UInt32 power = 1 << kStartWidth; + UInt32 width; + UInt32 len = 0; + for (width = kStartWidth; width < kStopWidth; width++) + { + if (m_InBitStream.ReadBits(1) == 0) + break; + len += power; + power <<= 1; + } + if (width != 0) + len += m_InBitStream.ReadBits(width); + if (len == 0) + { + m_OutWindowStream.PutByte((Byte)m_InBitStream.ReadBits(8)); + pos++; + continue; + } + else + { + len = len - 1 + kMatchMinLen; + const UInt32 kStartWidth = 9; + const UInt32 kStopWidth = 13; + UInt32 power = 1 << kStartWidth; + UInt32 width; + UInt32 distance = 0; + for (width = kStartWidth; width < kStopWidth; width++) + { + if (m_InBitStream.ReadBits(1) == 0) + break; + distance += power; + power <<= 1; + } + if (width != 0) + distance += m_InBitStream.ReadBits(width); + if (distance >= pos) + return S_FALSE; + m_OutWindowStream.CopyBlock(distance, len); + pos += len; + } + } + coderReleaser.NeedFlush = false; + return m_OutWindowStream.Flush(); +} + +STDMETHODIMP CCoder::Code(ISequentialInStream *inStream, ISequentialOutStream *outStream, + const UInt64 *inSize, const UInt64 *outSize, ICompressProgressInfo *progress) +{ + try { return CodeReal(inStream, outStream, inSize, outSize, progress);} + catch(const CInBufferException &e) { return e.ErrorCode; } + catch(const CLzOutWindowException &e) { return e.ErrorCode; } + catch(...) { return S_FALSE; } +} + +}}} diff --git a/CPP/7zip/Compress/ArjDecoder2.h b/CPP/7zip/Compress/ArjDecoder2.h new file mode 100644 index 0000000..cf00975 --- /dev/null +++ b/CPP/7zip/Compress/ArjDecoder2.h @@ -0,0 +1,59 @@ +// ArjDecoder2.h + +#ifndef __COMPRESS_ARJ_DECODER2_H +#define __COMPRESS_ARJ_DECODER2_H + +#include "../../Common/MyCom.h" + +#include "../ICoder.h" + +#include "../Common/InBuffer.h" + +#include "BitmDecoder.h" +#include "LzOutWindow.h" + +namespace NCompress { +namespace NArj { +namespace NDecoder2 { + +class CCoder : + public ICompressCoder, + public CMyUnknownImp +{ + CLzOutWindow m_OutWindowStream; + NBitm::CDecoder m_InBitStream; + + void ReleaseStreams() + { + m_OutWindowStream.ReleaseStream(); + m_InBitStream.ReleaseStream(); + } + + class CCoderReleaser + { + CCoder *m_Coder; + public: + bool NeedFlush; + CCoderReleaser(CCoder *coder): m_Coder(coder), NeedFlush(true) {} + ~CCoderReleaser() + { + if (NeedFlush) + m_Coder->m_OutWindowStream.Flush(); + m_Coder->ReleaseStreams(); + } + }; + friend class CCoderReleaser; + + HRESULT CodeReal(ISequentialInStream *inStream, ISequentialOutStream *outStream, + const UInt64 *inSize, const UInt64 *outSize, ICompressProgressInfo *progress); +public: + MY_UNKNOWN_IMP + + STDMETHOD(Code)(ISequentialInStream *inStream, ISequentialOutStream *outStream, + const UInt64 *inSize, const UInt64 *outSize, ICompressProgressInfo *progress); + +}; + +}}} + +#endif diff --git a/CPP/7zip/Compress/BZip2Const.h b/CPP/7zip/Compress/BZip2Const.h new file mode 100644 index 0000000..62427aa --- /dev/null +++ b/CPP/7zip/Compress/BZip2Const.h @@ -0,0 +1,54 @@ +// Compress/BZip2Const.h + +#ifndef __COMPRESS_BZIP2_CONST_H +#define __COMPRESS_BZIP2_CONST_H + +namespace NCompress { +namespace NBZip2 { + +const Byte kArSig0 = 'B'; +const Byte kArSig1 = 'Z'; +const Byte kArSig2 = 'h'; +const Byte kArSig3 = '0'; + +const Byte kFinSig0 = 0x17; +const Byte kFinSig1 = 0x72; +const Byte kFinSig2 = 0x45; +const Byte kFinSig3 = 0x38; +const Byte kFinSig4 = 0x50; +const Byte kFinSig5 = 0x90; + +const Byte kBlockSig0 = 0x31; +const Byte kBlockSig1 = 0x41; +const Byte kBlockSig2 = 0x59; +const Byte kBlockSig3 = 0x26; +const Byte kBlockSig4 = 0x53; +const Byte kBlockSig5 = 0x59; + +const int kNumOrigBits = 24; + +const int kNumTablesBits = 3; +const int kNumTablesMin = 2; +const int kNumTablesMax = 6; + +const int kNumLevelsBits = 5; + +const int kMaxHuffmanLen = 20; // Check it + +const int kMaxAlphaSize = 258; + +const int kGroupSize = 50; + +const int kBlockSizeMultMin = 1; +const int kBlockSizeMultMax = 9; +const UInt32 kBlockSizeStep = 100000; +const UInt32 kBlockSizeMax = kBlockSizeMultMax * kBlockSizeStep; + +const int kNumSelectorsBits = 15; +const UInt32 kNumSelectorsMax = (2 + (kBlockSizeMax / kGroupSize)); + +const int kRleModeRepSize = 4; + +}} + +#endif diff --git a/CPP/7zip/Compress/BZip2Crc.cpp b/CPP/7zip/Compress/BZip2Crc.cpp new file mode 100644 index 0000000..4e4741f --- /dev/null +++ b/CPP/7zip/Compress/BZip2Crc.cpp @@ -0,0 +1,26 @@ +// BZip2Crc.cpp + +#include "StdAfx.h" + +#include "BZip2Crc.h" + +UInt32 CBZip2Crc::Table[256]; + +static const UInt32 kBZip2CrcPoly = 0x04c11db7; /* AUTODIN II, Ethernet, & FDDI */ + +void CBZip2Crc::InitTable() +{ + for (UInt32 i = 0; i < 256; i++) + { + UInt32 r = (i << 24); + for (int j = 8; j > 0; j--) + r = (r & 0x80000000) ? ((r << 1) ^ kBZip2CrcPoly) : (r << 1); + Table[i] = r; + } +} + +class CBZip2CrcTableInit +{ +public: + CBZip2CrcTableInit() { CBZip2Crc::InitTable(); } +} g_BZip2CrcTableInit; diff --git a/CPP/7zip/Compress/BZip2Crc.h b/CPP/7zip/Compress/BZip2Crc.h new file mode 100644 index 0000000..876945b --- /dev/null +++ b/CPP/7zip/Compress/BZip2Crc.h @@ -0,0 +1,31 @@ +// BZip2Crc.h + +#ifndef __BZIP2_CRC_H +#define __BZIP2_CRC_H + +#include "Common/Types.h" + +class CBZip2Crc +{ + UInt32 _value; + static UInt32 Table[256]; +public: + static void InitTable(); + CBZip2Crc(): _value(0xFFFFFFFF) {}; + void Init() { _value = 0xFFFFFFFF; } + void UpdateByte(Byte b) { _value = Table[(_value >> 24) ^ b] ^ (_value << 8); } + void UpdateByte(unsigned int b) { _value = Table[(_value >> 24) ^ b] ^ (_value << 8); } + UInt32 GetDigest() const { return _value ^ 0xFFFFFFFF; } +}; + +class CBZip2CombinedCrc +{ + UInt32 _value; +public: + CBZip2CombinedCrc(): _value(0){}; + void Init() { _value = 0; } + void Update(UInt32 v) { _value = ((_value << 1) | (_value >> 31)) ^ v; } + UInt32 GetDigest() const { return _value ; } +}; + +#endif diff --git a/CPP/7zip/Compress/BZip2Decoder.cpp b/CPP/7zip/Compress/BZip2Decoder.cpp new file mode 100644 index 0000000..cb1f981 --- /dev/null +++ b/CPP/7zip/Compress/BZip2Decoder.cpp @@ -0,0 +1,943 @@ +// BZip2Decoder.cpp + +#include "StdAfx.h" + +#include "../../../C/Alloc.h" + +#include "BZip2Decoder.h" +#include "Mtf8.h" + +namespace NCompress { +namespace NBZip2 { + +#undef NO_INLINE +#define NO_INLINE + +static const UInt32 kNumThreadsMax = 4; + +static const UInt32 kBufferSize = (1 << 17); + +static const UInt16 kRandNums[512] = { + 619, 720, 127, 481, 931, 816, 813, 233, 566, 247, + 985, 724, 205, 454, 863, 491, 741, 242, 949, 214, + 733, 859, 335, 708, 621, 574, 73, 654, 730, 472, + 419, 436, 278, 496, 867, 210, 399, 680, 480, 51, + 878, 465, 811, 169, 869, 675, 611, 697, 867, 561, + 862, 687, 507, 283, 482, 129, 807, 591, 733, 623, + 150, 238, 59, 379, 684, 877, 625, 169, 643, 105, + 170, 607, 520, 932, 727, 476, 693, 425, 174, 647, + 73, 122, 335, 530, 442, 853, 695, 249, 445, 515, + 909, 545, 703, 919, 874, 474, 882, 500, 594, 612, + 641, 801, 220, 162, 819, 984, 589, 513, 495, 799, + 161, 604, 958, 533, 221, 400, 386, 867, 600, 782, + 382, 596, 414, 171, 516, 375, 682, 485, 911, 276, + 98, 553, 163, 354, 666, 933, 424, 341, 533, 870, + 227, 730, 475, 186, 263, 647, 537, 686, 600, 224, + 469, 68, 770, 919, 190, 373, 294, 822, 808, 206, + 184, 943, 795, 384, 383, 461, 404, 758, 839, 887, + 715, 67, 618, 276, 204, 918, 873, 777, 604, 560, + 951, 160, 578, 722, 79, 804, 96, 409, 713, 940, + 652, 934, 970, 447, 318, 353, 859, 672, 112, 785, + 645, 863, 803, 350, 139, 93, 354, 99, 820, 908, + 609, 772, 154, 274, 580, 184, 79, 626, 630, 742, + 653, 282, 762, 623, 680, 81, 927, 626, 789, 125, + 411, 521, 938, 300, 821, 78, 343, 175, 128, 250, + 170, 774, 972, 275, 999, 639, 495, 78, 352, 126, + 857, 956, 358, 619, 580, 124, 737, 594, 701, 612, + 669, 112, 134, 694, 363, 992, 809, 743, 168, 974, + 944, 375, 748, 52, 600, 747, 642, 182, 862, 81, + 344, 805, 988, 739, 511, 655, 814, 334, 249, 515, + 897, 955, 664, 981, 649, 113, 974, 459, 893, 228, + 433, 837, 553, 268, 926, 240, 102, 654, 459, 51, + 686, 754, 806, 760, 493, 403, 415, 394, 687, 700, + 946, 670, 656, 610, 738, 392, 760, 799, 887, 653, + 978, 321, 576, 617, 626, 502, 894, 679, 243, 440, + 680, 879, 194, 572, 640, 724, 926, 56, 204, 700, + 707, 151, 457, 449, 797, 195, 791, 558, 945, 679, + 297, 59, 87, 824, 713, 663, 412, 693, 342, 606, + 134, 108, 571, 364, 631, 212, 174, 643, 304, 329, + 343, 97, 430, 751, 497, 314, 983, 374, 822, 928, + 140, 206, 73, 263, 980, 736, 876, 478, 430, 305, + 170, 514, 364, 692, 829, 82, 855, 953, 676, 246, + 369, 970, 294, 750, 807, 827, 150, 790, 288, 923, + 804, 378, 215, 828, 592, 281, 565, 555, 710, 82, + 896, 831, 547, 261, 524, 462, 293, 465, 502, 56, + 661, 821, 976, 991, 658, 869, 905, 758, 745, 193, + 768, 550, 608, 933, 378, 286, 215, 979, 792, 961, + 61, 688, 793, 644, 986, 403, 106, 366, 905, 644, + 372, 567, 466, 434, 645, 210, 389, 550, 919, 135, + 780, 773, 635, 389, 707, 100, 626, 958, 165, 504, + 920, 176, 193, 713, 857, 265, 203, 50, 668, 108, + 645, 990, 626, 197, 510, 357, 358, 850, 858, 364, + 936, 638 +}; + +bool CState::Alloc() +{ + if (!Counters) + Counters = (UInt32 *)::BigAlloc((256 + kBlockSizeMax) * sizeof(UInt32)); + return (Counters != 0); +} + +void CState::Free() +{ + ::BigFree(Counters); + Counters = 0; +} + +UInt32 CDecoder::ReadBits(unsigned numBits) { return m_InStream.ReadBits(numBits); } +Byte CDecoder::ReadByte() {return (Byte)ReadBits(8); } +bool CDecoder::ReadBit() { return ReadBits(1) != 0; } + +UInt32 CDecoder::ReadCrc() +{ + UInt32 crc = 0; + for (int i = 0; i < 4; i++) + { + crc <<= 8; + crc |= ReadByte(); + } + return crc; +} + +static UInt32 NO_INLINE ReadBits(NBitm::CDecoder *m_InStream, unsigned num) +{ + return m_InStream->ReadBits(num); +} + +static UInt32 NO_INLINE ReadBit(NBitm::CDecoder *m_InStream) +{ + return m_InStream->ReadBits(1); +} + +static HRESULT NO_INLINE ReadBlock(NBitm::CDecoder *m_InStream, + UInt32 *CharCounters, UInt32 blockSizeMax, Byte *m_Selectors, CHuffmanDecoder *m_HuffmanDecoders, + UInt32 *blockSizeRes, UInt32 *origPtrRes, bool *randRes) +{ + if (randRes) + *randRes = ReadBit(m_InStream) ? true : false; + *origPtrRes = ReadBits(m_InStream, kNumOrigBits); + + // in original code it compares OrigPtr to (UInt32)(10 + blockSizeMax)) : why ? + if (*origPtrRes >= blockSizeMax) + return S_FALSE; + + CMtf8Decoder mtf; + mtf.StartInit(); + + int numInUse = 0; + { + Byte inUse16[16]; + int i; + for (i = 0; i < 16; i++) + inUse16[i] = (Byte)ReadBit(m_InStream); + for (i = 0; i < 256; i++) + if (inUse16[i >> 4]) + { + if (ReadBit(m_InStream)) + mtf.Add(numInUse++, (Byte)i); + } + if (numInUse == 0) + return S_FALSE; + // mtf.Init(numInUse); + } + int alphaSize = numInUse + 2; + + int numTables = ReadBits(m_InStream, kNumTablesBits); + if (numTables < kNumTablesMin || numTables > kNumTablesMax) + return S_FALSE; + + UInt32 numSelectors = ReadBits(m_InStream, kNumSelectorsBits); + if (numSelectors < 1 || numSelectors > kNumSelectorsMax) + return S_FALSE; + + { + Byte mtfPos[kNumTablesMax]; + int t = 0; + do + mtfPos[t] = (Byte)t; + while(++t < numTables); + UInt32 i = 0; + do + { + int j = 0; + while (ReadBit(m_InStream)) + if (++j >= numTables) + return S_FALSE; + Byte tmp = mtfPos[j]; + for (;j > 0; j--) + mtfPos[j] = mtfPos[j - 1]; + m_Selectors[i] = mtfPos[0] = tmp; + } + while(++i < numSelectors); + } + + int t = 0; + do + { + Byte lens[kMaxAlphaSize]; + int len = (int)ReadBits(m_InStream, kNumLevelsBits); + int i; + for (i = 0; i < alphaSize; i++) + { + for (;;) + { + if (len < 1 || len > kMaxHuffmanLen) + return S_FALSE; + if (!ReadBit(m_InStream)) + break; + len += 1 - (int)(ReadBit(m_InStream) << 1); + } + lens[i] = (Byte)len; + } + for (; i < kMaxAlphaSize; i++) + lens[i] = 0; + if(!m_HuffmanDecoders[t].SetCodeLengths(lens)) + return S_FALSE; + } + while(++t < numTables); + + { + for (int i = 0; i < 256; i++) + CharCounters[i] = 0; + } + + UInt32 blockSize = 0; + { + UInt32 groupIndex = 0; + UInt32 groupSize = 0; + CHuffmanDecoder *huffmanDecoder = 0; + int runPower = 0; + UInt32 runCounter = 0; + + for (;;) + { + if (groupSize == 0) + { + if (groupIndex >= numSelectors) + return S_FALSE; + groupSize = kGroupSize; + huffmanDecoder = &m_HuffmanDecoders[m_Selectors[groupIndex++]]; + } + groupSize--; + + UInt32 nextSym = huffmanDecoder->DecodeSymbol(m_InStream); + + if (nextSym < 2) + { + runCounter += ((UInt32)(nextSym + 1) << runPower++); + if (blockSizeMax - blockSize < runCounter) + return S_FALSE; + continue; + } + if (runCounter != 0) + { + UInt32 b = (UInt32)mtf.GetHead(); + CharCounters[b] += runCounter; + do + CharCounters[256 + blockSize++] = b; + while(--runCounter != 0); + runPower = 0; + } + if (nextSym <= (UInt32)numInUse) + { + UInt32 b = (UInt32)mtf.GetAndMove((int)nextSym - 1); + if (blockSize >= blockSizeMax) + return S_FALSE; + CharCounters[b]++; + CharCounters[256 + blockSize++] = b; + } + else if (nextSym == (UInt32)numInUse + 1) + break; + else + return S_FALSE; + } + } + *blockSizeRes = blockSize; + return (*origPtrRes < blockSize) ? S_OK : S_FALSE; +} + +static void NO_INLINE DecodeBlock1(UInt32 *charCounters, UInt32 blockSize) +{ + { + UInt32 sum = 0; + for (UInt32 i = 0; i < 256; i++) + { + sum += charCounters[i]; + charCounters[i] = sum - charCounters[i]; + } + } + + UInt32 *tt = charCounters + 256; + // Compute the T^(-1) vector + UInt32 i = 0; + do + tt[charCounters[tt[i] & 0xFF]++] |= (i << 8); + while(++i < blockSize); +} + +static UInt32 NO_INLINE DecodeBlock2(const UInt32 *tt, UInt32 blockSize, UInt32 OrigPtr, COutBuffer &m_OutStream) +{ + CBZip2Crc crc; + + // it's for speed optimization: prefetch & prevByte_init; + UInt32 tPos = tt[tt[OrigPtr] >> 8]; + unsigned prevByte = (unsigned)(tPos & 0xFF); + + unsigned numReps = 0; + + do + { + unsigned b = (unsigned)(tPos & 0xFF); + tPos = tt[tPos >> 8]; + + if (numReps == kRleModeRepSize) + { + for (; b > 0; b--) + { + crc.UpdateByte(prevByte); + m_OutStream.WriteByte((Byte)prevByte); + } + numReps = 0; + continue; + } + if (b != prevByte) + numReps = 0; + numReps++; + prevByte = b; + crc.UpdateByte(b); + m_OutStream.WriteByte((Byte)b); + + /* + prevByte = b; + crc.UpdateByte(b); + m_OutStream.WriteByte((Byte)b); + for (; --blockSize != 0;) + { + b = (unsigned)(tPos & 0xFF); + tPos = tt[tPos >> 8]; + crc.UpdateByte(b); + m_OutStream.WriteByte((Byte)b); + if (b != prevByte) + { + prevByte = b; + continue; + } + if (--blockSize == 0) + break; + + b = (unsigned)(tPos & 0xFF); + tPos = tt[tPos >> 8]; + crc.UpdateByte(b); + m_OutStream.WriteByte((Byte)b); + if (b != prevByte) + { + prevByte = b; + continue; + } + if (--blockSize == 0) + break; + + b = (unsigned)(tPos & 0xFF); + tPos = tt[tPos >> 8]; + crc.UpdateByte(b); + m_OutStream.WriteByte((Byte)b); + if (b != prevByte) + { + prevByte = b; + continue; + } + --blockSize; + break; + } + if (blockSize == 0) + break; + + b = (unsigned)(tPos & 0xFF); + tPos = tt[tPos >> 8]; + + for (; b > 0; b--) + { + crc.UpdateByte(prevByte); + m_OutStream.WriteByte((Byte)prevByte); + } + */ + } + while(--blockSize != 0); + return crc.GetDigest(); +} + +static UInt32 NO_INLINE DecodeBlock2Rand(const UInt32 *tt, UInt32 blockSize, UInt32 OrigPtr, COutBuffer &m_OutStream) +{ + CBZip2Crc crc; + + UInt32 randIndex = 1; + UInt32 randToGo = kRandNums[0] - 2; + + unsigned numReps = 0; + + // it's for speed optimization: prefetch & prevByte_init; + UInt32 tPos = tt[tt[OrigPtr] >> 8]; + unsigned prevByte = (unsigned)(tPos & 0xFF); + + do + { + unsigned b = (unsigned)(tPos & 0xFF); + tPos = tt[tPos >> 8]; + + { + if (randToGo == 0) + { + b ^= 1; + randToGo = kRandNums[randIndex++]; + randIndex &= 0x1FF; + } + randToGo--; + } + + if (numReps == kRleModeRepSize) + { + for (; b > 0; b--) + { + crc.UpdateByte(prevByte); + m_OutStream.WriteByte((Byte)prevByte); + } + numReps = 0; + continue; + } + if (b != prevByte) + numReps = 0; + numReps++; + prevByte = b; + crc.UpdateByte(b); + m_OutStream.WriteByte((Byte)b); + } + while(--blockSize != 0); + return crc.GetDigest(); +} + + +CDecoder::CDecoder() +{ + #ifndef _7ZIP_ST + m_States = 0; + m_NumThreadsPrev = 0; + NumThreads = 1; + #endif + _needInStreamInit = true; +} + +#ifndef _7ZIP_ST + +CDecoder::~CDecoder() +{ + Free(); +} + +#define RINOK_THREAD(x) { WRes __result_ = (x); if(__result_ != 0) return __result_; } + +HRESULT CDecoder::Create() +{ + RINOK_THREAD(CanProcessEvent.CreateIfNotCreated()); + RINOK_THREAD(CanStartWaitingEvent.CreateIfNotCreated()); + if (m_States != 0 && m_NumThreadsPrev == NumThreads) + return S_OK; + Free(); + MtMode = (NumThreads > 1); + m_NumThreadsPrev = NumThreads; + try + { + m_States = new CState[NumThreads]; + if (!m_States) + return E_OUTOFMEMORY; + } + catch(...) { return E_OUTOFMEMORY; } + for (UInt32 t = 0; t < NumThreads; t++) + { + CState &ti = m_States[t]; + ti.Decoder = this; + if (MtMode) + { + HRESULT res = ti.Create(); + if (res != S_OK) + { + NumThreads = t; + Free(); + return res; + } + } + } + return S_OK; +} + +void CDecoder::Free() +{ + if (!m_States) + return; + CloseThreads = true; + CanProcessEvent.Set(); + for (UInt32 t = 0; t < NumThreads; t++) + { + CState &s = m_States[t]; + if (MtMode) + s.Thread.Wait(); + s.Free(); + } + delete []m_States; + m_States = 0; +} + +#endif + +HRESULT CDecoder::ReadSignatures(bool &wasFinished, UInt32 &crc) +{ + wasFinished = false; + Byte s[6]; + for (int i = 0; i < 6; i++) + s[i] = ReadByte(); + crc = ReadCrc(); + if (s[0] == kFinSig0) + { + if (s[1] != kFinSig1 || + s[2] != kFinSig2 || + s[3] != kFinSig3 || + s[4] != kFinSig4 || + s[5] != kFinSig5) + return S_FALSE; + + wasFinished = true; + return (crc == CombinedCrc.GetDigest()) ? S_OK : S_FALSE; + } + if (s[0] != kBlockSig0 || + s[1] != kBlockSig1 || + s[2] != kBlockSig2 || + s[3] != kBlockSig3 || + s[4] != kBlockSig4 || + s[5] != kBlockSig5) + return S_FALSE; + CombinedCrc.Update(crc); + return S_OK; +} + +HRESULT CDecoder::DecodeFile(bool &isBZ, ICompressProgressInfo *progress) +{ + Progress = progress; + #ifndef _7ZIP_ST + RINOK(Create()); + for (UInt32 t = 0; t < NumThreads; t++) + { + CState &s = m_States[t]; + if (!s.Alloc()) + return E_OUTOFMEMORY; + if (MtMode) + { + RINOK(s.StreamWasFinishedEvent.Reset()); + RINOK(s.WaitingWasStartedEvent.Reset()); + RINOK(s.CanWriteEvent.Reset()); + } + } + #else + if (!m_States[0].Alloc()) + return E_OUTOFMEMORY; + #endif + + isBZ = false; + Byte s[6]; + int i; + for (i = 0; i < 4; i++) + s[i] = ReadByte(); + if (s[0] != kArSig0 || + s[1] != kArSig1 || + s[2] != kArSig2 || + s[3] <= kArSig3 || + s[3] > kArSig3 + kBlockSizeMultMax) + return S_OK; + isBZ = true; + UInt32 dicSize = (UInt32)(s[3] - kArSig3) * kBlockSizeStep; + + CombinedCrc.Init(); + #ifndef _7ZIP_ST + if (MtMode) + { + NextBlockIndex = 0; + StreamWasFinished1 = StreamWasFinished2 = false; + CloseThreads = false; + CanStartWaitingEvent.Reset(); + m_States[0].CanWriteEvent.Set(); + BlockSizeMax = dicSize; + Result1 = Result2 = S_OK; + CanProcessEvent.Set(); + UInt32 t; + for (t = 0; t < NumThreads; t++) + m_States[t].StreamWasFinishedEvent.Lock(); + CanProcessEvent.Reset(); + CanStartWaitingEvent.Set(); + for (t = 0; t < NumThreads; t++) + m_States[t].WaitingWasStartedEvent.Lock(); + CanStartWaitingEvent.Reset(); + RINOK(Result2); + RINOK(Result1); + } + else + #endif + { + CState &state = m_States[0]; + for (;;) + { + RINOK(SetRatioProgress(m_InStream.GetProcessedSize())); + bool wasFinished; + UInt32 crc; + RINOK(ReadSignatures(wasFinished, crc)); + if (wasFinished) + return S_OK; + + UInt32 blockSize, origPtr; + bool randMode; + RINOK(ReadBlock(&m_InStream, state.Counters, dicSize, + m_Selectors, m_HuffmanDecoders, + &blockSize, &origPtr, &randMode)); + DecodeBlock1(state.Counters, blockSize); + if ((randMode ? + DecodeBlock2Rand(state.Counters + 256, blockSize, origPtr, m_OutStream) : + DecodeBlock2(state.Counters + 256, blockSize, origPtr, m_OutStream)) != crc) + return S_FALSE; + } + } + return SetRatioProgress(m_InStream.GetProcessedSize()); +} + +HRESULT CDecoder::CodeReal(ISequentialInStream *inStream, ISequentialOutStream *outStream, + bool &isBZ, ICompressProgressInfo *progress) +{ + isBZ = false; + try + { + + if (!m_InStream.Create(kBufferSize)) + return E_OUTOFMEMORY; + if (!m_OutStream.Create(kBufferSize)) + return E_OUTOFMEMORY; + + if (inStream) + m_InStream.SetStream(inStream); + + CDecoderFlusher flusher(this, inStream != NULL); + + if (_needInStreamInit) + { + m_InStream.Init(); + _needInStreamInit = false; + } + _inStart = m_InStream.GetProcessedSize(); + + m_InStream.AlignToByte(); + + m_OutStream.SetStream(outStream); + m_OutStream.Init(); + + RINOK(DecodeFile(isBZ, progress)); + flusher.NeedFlush = false; + return Flush(); + + } + catch(const CInBufferException &e) { return e.ErrorCode; } + catch(const COutBufferException &e) { return e.ErrorCode; } + catch(...) { return E_FAIL; } +} + +STDMETHODIMP CDecoder::Code(ISequentialInStream *inStream, ISequentialOutStream *outStream, + const UInt64 * /* inSize */, const UInt64 * /* outSize */, ICompressProgressInfo *progress) +{ + _needInStreamInit = true; + bool isBZ; + RINOK(CodeReal(inStream, outStream, isBZ, progress)); + return isBZ ? S_OK : S_FALSE; +} + +HRESULT CDecoder::CodeResume(ISequentialOutStream *outStream, bool &isBZ, ICompressProgressInfo *progress) +{ + return CodeReal(NULL, outStream, isBZ, progress); +} + +STDMETHODIMP CDecoder::SetInStream(ISequentialInStream *inStream) { m_InStream.SetStream(inStream); return S_OK; } +STDMETHODIMP CDecoder::ReleaseInStream() { m_InStream.ReleaseStream(); return S_OK; } + +#ifndef _7ZIP_ST + +static THREAD_FUNC_DECL MFThread(void *p) { ((CState *)p)->ThreadFunc(); return 0; } + +HRESULT CState::Create() +{ + RINOK_THREAD(StreamWasFinishedEvent.CreateIfNotCreated()); + RINOK_THREAD(WaitingWasStartedEvent.CreateIfNotCreated()); + RINOK_THREAD(CanWriteEvent.CreateIfNotCreated()); + RINOK_THREAD(Thread.Create(MFThread, this)); + return S_OK; +} + +void CState::FinishStream() +{ + Decoder->StreamWasFinished1 = true; + StreamWasFinishedEvent.Set(); + Decoder->CS.Leave(); + Decoder->CanStartWaitingEvent.Lock(); + WaitingWasStartedEvent.Set(); +} + +void CState::ThreadFunc() +{ + for (;;) + { + Decoder->CanProcessEvent.Lock(); + Decoder->CS.Enter(); + if (Decoder->CloseThreads) + { + Decoder->CS.Leave(); + return; + } + if (Decoder->StreamWasFinished1) + { + FinishStream(); + continue; + } + HRESULT res = S_OK; + + UInt32 blockIndex = Decoder->NextBlockIndex; + UInt32 nextBlockIndex = blockIndex + 1; + if (nextBlockIndex == Decoder->NumThreads) + nextBlockIndex = 0; + Decoder->NextBlockIndex = nextBlockIndex; + UInt32 crc; + UInt64 packSize = 0; + UInt32 blockSize = 0, origPtr = 0; + bool randMode = false; + + try + { + bool wasFinished; + res = Decoder->ReadSignatures(wasFinished, crc); + if (res != S_OK) + { + Decoder->Result1 = res; + FinishStream(); + continue; + } + if (wasFinished) + { + Decoder->Result1 = res; + FinishStream(); + continue; + } + + res = ReadBlock(&Decoder->m_InStream, Counters, Decoder->BlockSizeMax, + Decoder->m_Selectors, Decoder->m_HuffmanDecoders, + &blockSize, &origPtr, &randMode); + if (res != S_OK) + { + Decoder->Result1 = res; + FinishStream(); + continue; + } + packSize = Decoder->m_InStream.GetProcessedSize(); + } + catch(const CInBufferException &e) { res = e.ErrorCode; if (res != S_OK) res = E_FAIL; } + catch(...) { res = E_FAIL; } + if (res != S_OK) + { + Decoder->Result1 = res; + FinishStream(); + continue; + } + + Decoder->CS.Leave(); + + DecodeBlock1(Counters, blockSize); + + bool needFinish = true; + try + { + Decoder->m_States[blockIndex].CanWriteEvent.Lock(); + needFinish = Decoder->StreamWasFinished2; + if (!needFinish) + { + if ((randMode ? + DecodeBlock2Rand(Counters + 256, blockSize, origPtr, Decoder->m_OutStream) : + DecodeBlock2(Counters + 256, blockSize, origPtr, Decoder->m_OutStream)) == crc) + res = Decoder->SetRatioProgress(packSize); + else + res = S_FALSE; + } + } + catch(const COutBufferException &e) { res = e.ErrorCode; if (res != S_OK) res = E_FAIL; } + catch(...) { res = E_FAIL; } + if (res != S_OK) + { + Decoder->Result2 = res; + Decoder->StreamWasFinished2 = true; + } + Decoder->m_States[nextBlockIndex].CanWriteEvent.Set(); + if (res != S_OK || needFinish) + { + StreamWasFinishedEvent.Set(); + Decoder->CanStartWaitingEvent.Lock(); + WaitingWasStartedEvent.Set(); + } + } +} + +STDMETHODIMP CDecoder::SetNumberOfThreads(UInt32 numThreads) +{ + NumThreads = numThreads; + if (NumThreads < 1) + NumThreads = 1; + if (NumThreads > kNumThreadsMax) + NumThreads = kNumThreadsMax; + return S_OK; +} + +#endif + +HRESULT CDecoder::SetRatioProgress(UInt64 packSize) +{ + if (!Progress) + return S_OK; + packSize -= _inStart; + UInt64 unpackSize = m_OutStream.GetProcessedSize(); + return Progress->SetRatioInfo(&packSize, &unpackSize); +} + + +// ---------- NSIS ---------- + +enum +{ + NSIS_STATE_INIT, + NSIS_STATE_NEW_BLOCK, + NSIS_STATE_DATA, + NSIS_STATE_FINISHED, + NSIS_STATE_ERROR +}; + +STDMETHODIMP CNsisDecoder::SetInStream(ISequentialInStream *inStream) { m_InStream.SetStream(inStream); return S_OK; } +STDMETHODIMP CNsisDecoder::ReleaseInStream() { m_InStream.ReleaseStream(); return S_OK; } + +STDMETHODIMP CNsisDecoder::SetOutStreamSize(const UInt64 * /* outSize */) +{ + _nsisState = NSIS_STATE_INIT; + return S_OK; +} + +STDMETHODIMP CNsisDecoder::Read(void *data, UInt32 size, UInt32 *processedSize) +{ + try { + + *processedSize = 0; + if (_nsisState == NSIS_STATE_FINISHED) + return S_OK; + if (_nsisState == NSIS_STATE_ERROR) + return S_FALSE; + if (size == 0) + return S_OK; + + CState &state = m_State; + + if (_nsisState == NSIS_STATE_INIT) + { + if (!m_InStream.Create(kBufferSize)) + return E_OUTOFMEMORY; + if (!state.Alloc()) + return E_OUTOFMEMORY; + m_InStream.Init(); + _nsisState = NSIS_STATE_NEW_BLOCK; + } + + if (_nsisState == NSIS_STATE_NEW_BLOCK) + { + Byte b = (Byte)m_InStream.ReadBits(8); + if (b == kFinSig0) + { + _nsisState = NSIS_STATE_FINISHED; + return S_OK; + } + if (b != kBlockSig0) + { + _nsisState = NSIS_STATE_ERROR; + return S_FALSE; + } + UInt32 origPtr; + RINOK(ReadBlock(&m_InStream, state.Counters, 9 * kBlockSizeStep, + m_Selectors, m_HuffmanDecoders, &_blockSize, &origPtr, NULL)); + DecodeBlock1(state.Counters, _blockSize); + const UInt32 *tt = state.Counters + 256; + _tPos = tt[tt[origPtr] >> 8]; + _prevByte = (unsigned)(_tPos & 0xFF); + _numReps = 0; + _repRem = 0; + _nsisState = NSIS_STATE_DATA; + } + + UInt32 tPos = _tPos; + unsigned prevByte = _prevByte; + unsigned numReps = _numReps; + UInt32 blockSize = _blockSize; + const UInt32 *tt = state.Counters + 256; + + while (_repRem) + { + _repRem--; + *(Byte *)data = (Byte)prevByte; + data = (Byte *)data + 1; + (*processedSize)++; + if (--size == 0) + return S_OK; + } + + if (blockSize == 0) + { + _nsisState = NSIS_STATE_NEW_BLOCK; + return S_OK; + } + + do + { + unsigned b = (unsigned)(tPos & 0xFF); + tPos = tt[tPos >> 8]; + blockSize--; + + if (numReps == kRleModeRepSize) + { + numReps = 0; + while (b) + { + b--; + *(Byte *)data = (Byte)prevByte; + data = (Byte *)data + 1; + (*processedSize)++; + if (--size == 0) + break; + } + _repRem = b; + continue; + } + if (b != prevByte) + numReps = 0; + numReps++; + prevByte = b; + *(Byte *)data = (Byte)b; + data = (Byte *)data + 1; + (*processedSize)++; + size--; + } + while (size && blockSize); + _tPos = tPos; + _prevByte = prevByte; + _numReps = numReps; + _blockSize = blockSize; + return S_OK; + + } + catch(const CInBufferException &e) { return e.ErrorCode; } + catch(...) { return S_FALSE; } +} + +}} diff --git a/CPP/7zip/Compress/BZip2Decoder.h b/CPP/7zip/Compress/BZip2Decoder.h new file mode 100644 index 0000000..e6dec1e --- /dev/null +++ b/CPP/7zip/Compress/BZip2Decoder.h @@ -0,0 +1,205 @@ +// Compress/BZip2Decoder.h + +#ifndef __COMPRESS_BZIP2_DECODER_H +#define __COMPRESS_BZIP2_DECODER_H + +#include "../../Common/MyCom.h" + +#ifndef _7ZIP_ST +#include "../../Windows/Synchronization.h" +#include "../../Windows/Thread.h" +#endif + +#include "../ICoder.h" + +#include "../Common/InBuffer.h" +#include "../Common/OutBuffer.h" + +#include "BitmDecoder.h" +#include "BZip2Const.h" +#include "BZip2Crc.h" +#include "HuffmanDecoder.h" + +namespace NCompress { +namespace NBZip2 { + +typedef NCompress::NHuffman::CDecoder CHuffmanDecoder; + +class CDecoder; + +struct CState +{ + UInt32 *Counters; + + #ifndef _7ZIP_ST + + CDecoder *Decoder; + NWindows::CThread Thread; + bool m_OptimizeNumTables; + + NWindows::NSynchronization::CAutoResetEvent StreamWasFinishedEvent; + NWindows::NSynchronization::CAutoResetEvent WaitingWasStartedEvent; + + // it's not member of this thread. We just need one event per thread + NWindows::NSynchronization::CAutoResetEvent CanWriteEvent; + + Byte MtPad[1 << 8]; // It's pad for Multi-Threading. Must be >= Cache_Line_Size. + + HRESULT Create(); + void FinishStream(); + void ThreadFunc(); + + #endif + + CState(): Counters(0) {} + ~CState() { Free(); } + bool Alloc(); + void Free(); +}; + +class CDecoder : + public ICompressCoder, + #ifndef _7ZIP_ST + public ICompressSetCoderMt, + #endif + public CMyUnknownImp +{ +public: + COutBuffer m_OutStream; + Byte MtPad[1 << 8]; // It's pad for Multi-Threading. Must be >= Cache_Line_Size. + NBitm::CDecoder m_InStream; + Byte m_Selectors[kNumSelectorsMax]; + CHuffmanDecoder m_HuffmanDecoders[kNumTablesMax]; + UInt64 _inStart; + +private: + + bool _needInStreamInit; + + UInt32 ReadBits(unsigned numBits); + Byte ReadByte(); + bool ReadBit(); + UInt32 ReadCrc(); + HRESULT DecodeFile(bool &isBZ, ICompressProgressInfo *progress); + HRESULT CodeReal(ISequentialInStream *inStream, ISequentialOutStream *outStream, + bool &isBZ, ICompressProgressInfo *progress); + class CDecoderFlusher + { + CDecoder *_decoder; + public: + bool NeedFlush; + bool ReleaseInStream; + CDecoderFlusher(CDecoder *decoder, bool releaseInStream): + _decoder(decoder), + ReleaseInStream(releaseInStream), + NeedFlush(true) {} + ~CDecoderFlusher() + { + if (NeedFlush) + _decoder->Flush(); + _decoder->ReleaseStreams(ReleaseInStream); + } + }; + +public: + CBZip2CombinedCrc CombinedCrc; + ICompressProgressInfo *Progress; + + #ifndef _7ZIP_ST + CState *m_States; + UInt32 m_NumThreadsPrev; + + NWindows::NSynchronization::CManualResetEvent CanProcessEvent; + NWindows::NSynchronization::CCriticalSection CS; + UInt32 NumThreads; + bool MtMode; + UInt32 NextBlockIndex; + bool CloseThreads; + bool StreamWasFinished1; + bool StreamWasFinished2; + NWindows::NSynchronization::CManualResetEvent CanStartWaitingEvent; + + HRESULT Result1; + HRESULT Result2; + + UInt32 BlockSizeMax; + ~CDecoder(); + HRESULT Create(); + void Free(); + + #else + CState m_States[1]; + #endif + + CDecoder(); + + HRESULT SetRatioProgress(UInt64 packSize); + HRESULT ReadSignatures(bool &wasFinished, UInt32 &crc); + + HRESULT Flush() { return m_OutStream.Flush(); } + void ReleaseStreams(bool releaseInStream) + { + if (releaseInStream) + m_InStream.ReleaseStream(); + m_OutStream.ReleaseStream(); + } + + MY_QUERYINTERFACE_BEGIN2(ICompressCoder) + #ifndef _7ZIP_ST + MY_QUERYINTERFACE_ENTRY(ICompressSetCoderMt) + #endif + + MY_QUERYINTERFACE_END + MY_ADDREF_RELEASE + + + STDMETHOD(Code)(ISequentialInStream *inStream, ISequentialOutStream *outStream, + const UInt64 *inSize, const UInt64 *outSize, ICompressProgressInfo *progress); + + STDMETHOD(SetInStream)(ISequentialInStream *inStream); + STDMETHOD(ReleaseInStream)(); + + HRESULT CodeResume(ISequentialOutStream *outStream, bool &isBZ, ICompressProgressInfo *progress); + UInt64 GetInputProcessedSize() const { return m_InStream.GetProcessedSize(); } + + #ifndef _7ZIP_ST + STDMETHOD(SetNumberOfThreads)(UInt32 numThreads); + #endif +}; + + +class CNsisDecoder : + public ISequentialInStream, + public ICompressSetInStream, + public ICompressSetOutStreamSize, + public CMyUnknownImp +{ + NBitm::CDecoder m_InStream; + Byte m_Selectors[kNumSelectorsMax]; + CHuffmanDecoder m_HuffmanDecoders[kNumTablesMax]; + CState m_State; + + int _nsisState; + UInt32 _tPos; + unsigned _prevByte; + unsigned _repRem; + unsigned _numReps; + UInt32 _blockSize; + +public: + + MY_QUERYINTERFACE_BEGIN2(ISequentialInStream) + MY_QUERYINTERFACE_ENTRY(ICompressSetInStream) + MY_QUERYINTERFACE_ENTRY(ICompressSetOutStreamSize) + MY_QUERYINTERFACE_END + MY_ADDREF_RELEASE + + STDMETHOD(Read)(void *data, UInt32 size, UInt32 *processedSize); + STDMETHOD(SetInStream)(ISequentialInStream *inStream); + STDMETHOD(ReleaseInStream)(); + STDMETHOD(SetOutStreamSize)(const UInt64 *outSize); +}; + +}} + +#endif diff --git a/CPP/7zip/Compress/BZip2Encoder.cpp b/CPP/7zip/Compress/BZip2Encoder.cpp new file mode 100644 index 0000000..eaa1085 --- /dev/null +++ b/CPP/7zip/Compress/BZip2Encoder.cpp @@ -0,0 +1,895 @@ +// BZip2Encoder.cpp + +#include "StdAfx.h" + +#include "../../../C/Alloc.h" +#include "../../../C/BwtSort.h" +#include "../../../C/HuffEnc.h" + +#include "BZip2Crc.h" +#include "BZip2Encoder.h" +#include "Mtf8.h" + +namespace NCompress { +namespace NBZip2 { + +const int kMaxHuffmanLenForEncoding = 16; // it must be < kMaxHuffmanLen = 20 + +static const UInt32 kBufferSize = (1 << 17); +static const int kNumHuffPasses = 4; + +bool CThreadInfo::Alloc() +{ + if (m_BlockSorterIndex == 0) + { + m_BlockSorterIndex = (UInt32 *)::BigAlloc(BLOCK_SORT_BUF_SIZE(kBlockSizeMax) * sizeof(UInt32)); + if (m_BlockSorterIndex == 0) + return false; + } + + if (m_Block == 0) + { + m_Block = (Byte *)::MidAlloc(kBlockSizeMax * 5 + kBlockSizeMax / 10 + (20 << 10)); + if (m_Block == 0) + return false; + m_MtfArray = m_Block + kBlockSizeMax; + m_TempArray = m_MtfArray + kBlockSizeMax * 2 + 2; + } + return true; +} + +void CThreadInfo::Free() +{ + ::BigFree(m_BlockSorterIndex); + m_BlockSorterIndex = 0; + ::MidFree(m_Block); + m_Block = 0; +} + +#ifndef _7ZIP_ST + +static THREAD_FUNC_DECL MFThread(void *threadCoderInfo) +{ + return ((CThreadInfo *)threadCoderInfo)->ThreadFunc(); +} + +#define RINOK_THREAD(x) { WRes __result_ = (x); if(__result_ != 0) return __result_; } + +HRESULT CThreadInfo::Create() +{ + RINOK_THREAD(StreamWasFinishedEvent.Create()); + RINOK_THREAD(WaitingWasStartedEvent.Create()); + RINOK_THREAD(CanWriteEvent.Create()); + RINOK_THREAD(Thread.Create(MFThread, this)); + return S_OK; +} + +void CThreadInfo::FinishStream(bool needLeave) +{ + Encoder->StreamWasFinished = true; + StreamWasFinishedEvent.Set(); + if (needLeave) + Encoder->CS.Leave(); + Encoder->CanStartWaitingEvent.Lock(); + WaitingWasStartedEvent.Set(); +} + +DWORD CThreadInfo::ThreadFunc() +{ + for (;;) + { + Encoder->CanProcessEvent.Lock(); + Encoder->CS.Enter(); + if (Encoder->CloseThreads) + { + Encoder->CS.Leave(); + return 0; + } + if (Encoder->StreamWasFinished) + { + FinishStream(true); + continue; + } + HRESULT res = S_OK; + bool needLeave = true; + try + { + UInt32 blockSize = Encoder->ReadRleBlock(m_Block); + m_PackSize = Encoder->m_InStream.GetProcessedSize(); + m_BlockIndex = Encoder->NextBlockIndex; + if (++Encoder->NextBlockIndex == Encoder->NumThreads) + Encoder->NextBlockIndex = 0; + if (blockSize == 0) + { + FinishStream(true); + continue; + } + Encoder->CS.Leave(); + needLeave = false; + res = EncodeBlock3(blockSize); + } + catch(const CInBufferException &e) { res = e.ErrorCode; } + catch(const COutBufferException &e) { res = e.ErrorCode; } + catch(...) { res = E_FAIL; } + if (res != S_OK) + { + Encoder->Result = res; + FinishStream(needLeave); + continue; + } + } +} + +#endif + +CEncoder::CEncoder(): + NumPasses(1), + m_OptimizeNumTables(false), + m_BlockSizeMult(kBlockSizeMultMax) +{ + #ifndef _7ZIP_ST + ThreadsInfo = 0; + m_NumThreadsPrev = 0; + NumThreads = 1; + #endif +} + +#ifndef _7ZIP_ST +CEncoder::~CEncoder() +{ + Free(); +} + +HRESULT CEncoder::Create() +{ + RINOK_THREAD(CanProcessEvent.CreateIfNotCreated()); + RINOK_THREAD(CanStartWaitingEvent.CreateIfNotCreated()); + if (ThreadsInfo != 0 && m_NumThreadsPrev == NumThreads) + return S_OK; + try + { + Free(); + MtMode = (NumThreads > 1); + m_NumThreadsPrev = NumThreads; + ThreadsInfo = new CThreadInfo[NumThreads]; + if (ThreadsInfo == 0) + return E_OUTOFMEMORY; + } + catch(...) { return E_OUTOFMEMORY; } + for (UInt32 t = 0; t < NumThreads; t++) + { + CThreadInfo &ti = ThreadsInfo[t]; + ti.Encoder = this; + if (MtMode) + { + HRESULT res = ti.Create(); + if (res != S_OK) + { + NumThreads = t; + Free(); + return res; + } + } + } + return S_OK; +} + +void CEncoder::Free() +{ + if (!ThreadsInfo) + return; + CloseThreads = true; + CanProcessEvent.Set(); + for (UInt32 t = 0; t < NumThreads; t++) + { + CThreadInfo &ti = ThreadsInfo[t]; + if (MtMode) + ti.Thread.Wait(); + ti.Free(); + } + delete []ThreadsInfo; + ThreadsInfo = 0; +} +#endif + +UInt32 CEncoder::ReadRleBlock(Byte *buffer) +{ + UInt32 i = 0; + Byte prevByte; + if (m_InStream.ReadByte(prevByte)) + { + UInt32 blockSize = m_BlockSizeMult * kBlockSizeStep - 1; + int numReps = 1; + buffer[i++] = prevByte; + while (i < blockSize) // "- 1" to support RLE + { + Byte b; + if (!m_InStream.ReadByte(b)) + break; + if (b != prevByte) + { + if (numReps >= kRleModeRepSize) + buffer[i++] = (Byte)(numReps - kRleModeRepSize); + buffer[i++] = b; + numReps = 1; + prevByte = b; + continue; + } + numReps++; + if (numReps <= kRleModeRepSize) + buffer[i++] = b; + else if (numReps == kRleModeRepSize + 255) + { + buffer[i++] = (Byte)(numReps - kRleModeRepSize); + numReps = 0; + } + } + // it's to support original BZip2 decoder + if (numReps >= kRleModeRepSize) + buffer[i++] = (Byte)(numReps - kRleModeRepSize); + } + return i; +} + +void CThreadInfo::WriteBits2(UInt32 value, UInt32 numBits) + { m_OutStreamCurrent->WriteBits(value, numBits); } +void CThreadInfo::WriteByte2(Byte b) { WriteBits2(b , 8); } +void CThreadInfo::WriteBit2(bool v) { WriteBits2((v ? 1 : 0), 1); } +void CThreadInfo::WriteCrc2(UInt32 v) +{ + for (int i = 0; i < 4; i++) + WriteByte2(((Byte)(v >> (24 - i * 8)))); +} + +void CEncoder::WriteBits(UInt32 value, UInt32 numBits) + { m_OutStream.WriteBits(value, numBits); } +void CEncoder::WriteByte(Byte b) { WriteBits(b , 8); } +void CEncoder::WriteBit(bool v) { WriteBits((v ? 1 : 0), 1); } +void CEncoder::WriteCrc(UInt32 v) +{ + for (int i = 0; i < 4; i++) + WriteByte(((Byte)(v >> (24 - i * 8)))); +} + + +// blockSize > 0 +void CThreadInfo::EncodeBlock(const Byte *block, UInt32 blockSize) +{ + WriteBit2(false); // Randomised = false + + { + UInt32 origPtr = BlockSort(m_BlockSorterIndex, block, blockSize); + // if (m_BlockSorterIndex[origPtr] != 0) throw 1; + m_BlockSorterIndex[origPtr] = blockSize; + WriteBits2(origPtr, kNumOrigBits); + } + + CMtf8Encoder mtf; + int numInUse = 0; + { + bool inUse[256]; + bool inUse16[16]; + UInt32 i; + for (i = 0; i < 256; i++) + inUse[i] = false; + for (i = 0; i < 16; i++) + inUse16[i] = false; + for (i = 0; i < blockSize; i++) + inUse[block[i]] = true; + for (i = 0; i < 256; i++) + if (inUse[i]) + { + inUse16[i >> 4] = true; + mtf.Buf[numInUse++] = (Byte)i; + } + for (i = 0; i < 16; i++) + WriteBit2(inUse16[i]); + for (i = 0; i < 256; i++) + if (inUse16[i >> 4]) + WriteBit2(inUse[i]); + } + int alphaSize = numInUse + 2; + + Byte *mtfs = m_MtfArray; + UInt32 mtfArraySize = 0; + UInt32 symbolCounts[kMaxAlphaSize]; + { + for (int i = 0; i < kMaxAlphaSize; i++) + symbolCounts[i] = 0; + } + + { + UInt32 rleSize = 0; + UInt32 i = 0; + const UInt32 *bsIndex = m_BlockSorterIndex; + block--; + do + { + int pos = mtf.FindAndMove(block[bsIndex[i]]); + if (pos == 0) + rleSize++; + else + { + while (rleSize != 0) + { + rleSize--; + mtfs[mtfArraySize++] = (Byte)(rleSize & 1); + symbolCounts[rleSize & 1]++; + rleSize >>= 1; + } + if (pos >= 0xFE) + { + mtfs[mtfArraySize++] = 0xFF; + mtfs[mtfArraySize++] = (Byte)(pos - 0xFE); + } + else + mtfs[mtfArraySize++] = (Byte)(pos + 1); + symbolCounts[pos + 1]++; + } + } + while (++i < blockSize); + + while (rleSize != 0) + { + rleSize--; + mtfs[mtfArraySize++] = (Byte)(rleSize & 1); + symbolCounts[rleSize & 1]++; + rleSize >>= 1; + } + + if (alphaSize < 256) + mtfs[mtfArraySize++] = (Byte)(alphaSize - 1); + else + { + mtfs[mtfArraySize++] = 0xFF; + mtfs[mtfArraySize++] = (Byte)(alphaSize - 256); + } + symbolCounts[alphaSize - 1]++; + } + + UInt32 numSymbols = 0; + { + for (int i = 0; i < kMaxAlphaSize; i++) + numSymbols += symbolCounts[i]; + } + + int bestNumTables = kNumTablesMin; + UInt32 bestPrice = 0xFFFFFFFF; + UInt32 startPos = m_OutStreamCurrent->GetPos(); + Byte startCurByte = m_OutStreamCurrent->GetCurByte(); + for (int nt = kNumTablesMin; nt <= kNumTablesMax + 1; nt++) + { + int numTables; + + if(m_OptimizeNumTables) + { + m_OutStreamCurrent->SetPos(startPos); + m_OutStreamCurrent->SetCurState((startPos & 7), startCurByte); + if (nt <= kNumTablesMax) + numTables = nt; + else + numTables = bestNumTables; + } + else + { + if (numSymbols < 200) numTables = 2; + else if (numSymbols < 600) numTables = 3; + else if (numSymbols < 1200) numTables = 4; + else if (numSymbols < 2400) numTables = 5; + else numTables = 6; + } + + WriteBits2(numTables, kNumTablesBits); + + UInt32 numSelectors = (numSymbols + kGroupSize - 1) / kGroupSize; + WriteBits2(numSelectors, kNumSelectorsBits); + + { + UInt32 remFreq = numSymbols; + int gs = 0; + int t = numTables; + do + { + UInt32 tFreq = remFreq / t; + int ge = gs; + UInt32 aFreq = 0; + while (aFreq < tFreq) // && ge < alphaSize) + aFreq += symbolCounts[ge++]; + + if (ge - 1 > gs && t != numTables && t != 1 && (((numTables - t) & 1) == 1)) + aFreq -= symbolCounts[--ge]; + + Byte *lens = Lens[t - 1]; + int i = 0; + do + lens[i] = (i >= gs && i < ge) ? 0 : 1; + while (++i < alphaSize); + gs = ge; + remFreq -= aFreq; + } + while(--t != 0); + } + + + for (int pass = 0; pass < kNumHuffPasses; pass++) + { + { + int t = 0; + do + memset(Freqs[t], 0, sizeof(Freqs[t])); + while(++t < numTables); + } + + { + UInt32 mtfPos = 0; + UInt32 g = 0; + do + { + UInt32 symbols[kGroupSize]; + int i = 0; + do + { + UInt32 symbol = mtfs[mtfPos++]; + if (symbol >= 0xFF) + symbol += mtfs[mtfPos++]; + symbols[i] = symbol; + } + while (++i < kGroupSize && mtfPos < mtfArraySize); + + UInt32 bestPrice = 0xFFFFFFFF; + int t = 0; + do + { + const Byte *lens = Lens[t]; + UInt32 price = 0; + int j = 0; + do + price += lens[symbols[j]]; + while (++j < i); + if (price < bestPrice) + { + m_Selectors[g] = (Byte)t; + bestPrice = price; + } + } + while(++t < numTables); + UInt32 *freqs = Freqs[m_Selectors[g++]]; + int j = 0; + do + freqs[symbols[j]]++; + while (++j < i); + } + while (mtfPos < mtfArraySize); + } + + int t = 0; + do + { + UInt32 *freqs = Freqs[t]; + int i = 0; + do + if (freqs[i] == 0) + freqs[i] = 1; + while(++i < alphaSize); + Huffman_Generate(freqs, Codes[t], Lens[t], kMaxAlphaSize, kMaxHuffmanLenForEncoding); + } + while(++t < numTables); + } + + { + Byte mtfSel[kNumTablesMax]; + { + int t = 0; + do + mtfSel[t] = (Byte)t; + while(++t < numTables); + } + + UInt32 i = 0; + do + { + Byte sel = m_Selectors[i]; + int pos; + for (pos = 0; mtfSel[pos] != sel; pos++) + WriteBit2(true); + WriteBit2(false); + for (; pos > 0; pos--) + mtfSel[pos] = mtfSel[pos - 1]; + mtfSel[0] = sel; + } + while(++i < numSelectors); + } + + { + int t = 0; + do + { + const Byte *lens = Lens[t]; + UInt32 len = lens[0]; + WriteBits2(len, kNumLevelsBits); + int i = 0; + do + { + UInt32 level = lens[i]; + while (len != level) + { + WriteBit2(true); + if (len < level) + { + WriteBit2(false); + len++; + } + else + { + WriteBit2(true); + len--; + } + } + WriteBit2(false); + } + while (++i < alphaSize); + } + while(++t < numTables); + } + + { + UInt32 groupSize = 0; + UInt32 groupIndex = 0; + const Byte *lens = 0; + const UInt32 *codes = 0; + UInt32 mtfPos = 0; + do + { + UInt32 symbol = mtfs[mtfPos++]; + if (symbol >= 0xFF) + symbol += mtfs[mtfPos++]; + if (groupSize == 0) + { + groupSize = kGroupSize; + int t = m_Selectors[groupIndex++]; + lens = Lens[t]; + codes = Codes[t]; + } + groupSize--; + m_OutStreamCurrent->WriteBits(codes[symbol], lens[symbol]); + } + while (mtfPos < mtfArraySize); + } + + if (!m_OptimizeNumTables) + break; + UInt32 price = m_OutStreamCurrent->GetPos() - startPos; + if (price <= bestPrice) + { + if (nt == kNumTablesMax) + break; + bestPrice = price; + bestNumTables = nt; + } + } +} + +// blockSize > 0 +UInt32 CThreadInfo::EncodeBlockWithHeaders(const Byte *block, UInt32 blockSize) +{ + WriteByte2(kBlockSig0); + WriteByte2(kBlockSig1); + WriteByte2(kBlockSig2); + WriteByte2(kBlockSig3); + WriteByte2(kBlockSig4); + WriteByte2(kBlockSig5); + + CBZip2Crc crc; + int numReps = 0; + Byte prevByte = block[0]; + UInt32 i = 0; + do + { + Byte b = block[i]; + if (numReps == kRleModeRepSize) + { + for (; b > 0; b--) + crc.UpdateByte(prevByte); + numReps = 0; + continue; + } + if (prevByte == b) + numReps++; + else + { + numReps = 1; + prevByte = b; + } + crc.UpdateByte(b); + } + while (++i < blockSize); + UInt32 crcRes = crc.GetDigest(); + WriteCrc2(crcRes); + EncodeBlock(block, blockSize); + return crcRes; +} + +void CThreadInfo::EncodeBlock2(const Byte *block, UInt32 blockSize, UInt32 numPasses) +{ + UInt32 numCrcs = m_NumCrcs; + bool needCompare = false; + + UInt32 startBytePos = m_OutStreamCurrent->GetBytePos(); + UInt32 startPos = m_OutStreamCurrent->GetPos(); + Byte startCurByte = m_OutStreamCurrent->GetCurByte(); + Byte endCurByte = 0; + UInt32 endPos = 0; + if (numPasses > 1 && blockSize >= (1 << 10)) + { + UInt32 blockSize0 = blockSize / 2; + for (;(block[blockSize0] == block[blockSize0 - 1] || + block[blockSize0 - 1] == block[blockSize0 - 2]) && + blockSize0 < blockSize; blockSize0++); + if (blockSize0 < blockSize) + { + EncodeBlock2(block, blockSize0, numPasses - 1); + EncodeBlock2(block + blockSize0, blockSize - blockSize0, numPasses - 1); + endPos = m_OutStreamCurrent->GetPos(); + endCurByte = m_OutStreamCurrent->GetCurByte(); + if ((endPos & 7) > 0) + WriteBits2(0, 8 - (endPos & 7)); + m_OutStreamCurrent->SetCurState((startPos & 7), startCurByte); + needCompare = true; + } + } + + UInt32 startBytePos2 = m_OutStreamCurrent->GetBytePos(); + UInt32 startPos2 = m_OutStreamCurrent->GetPos(); + UInt32 crcVal = EncodeBlockWithHeaders(block, blockSize); + UInt32 endPos2 = m_OutStreamCurrent->GetPos(); + + if (needCompare) + { + UInt32 size2 = endPos2 - startPos2; + if (size2 < endPos - startPos) + { + UInt32 numBytes = m_OutStreamCurrent->GetBytePos() - startBytePos2; + Byte *buffer = m_OutStreamCurrent->GetStream(); + for (UInt32 i = 0; i < numBytes; i++) + buffer[startBytePos + i] = buffer[startBytePos2 + i]; + m_OutStreamCurrent->SetPos(startPos + endPos2 - startPos2); + m_NumCrcs = numCrcs; + m_CRCs[m_NumCrcs++] = crcVal; + } + else + { + m_OutStreamCurrent->SetPos(endPos); + m_OutStreamCurrent->SetCurState((endPos & 7), endCurByte); + } + } + else + { + m_NumCrcs = numCrcs; + m_CRCs[m_NumCrcs++] = crcVal; + } +} + +HRESULT CThreadInfo::EncodeBlock3(UInt32 blockSize) +{ + CMsbfEncoderTemp outStreamTemp; + outStreamTemp.SetStream(m_TempArray); + outStreamTemp.Init(); + m_OutStreamCurrent = &outStreamTemp; + + m_NumCrcs = 0; + + EncodeBlock2(m_Block, blockSize, Encoder->NumPasses); + + #ifndef _7ZIP_ST + if (Encoder->MtMode) + Encoder->ThreadsInfo[m_BlockIndex].CanWriteEvent.Lock(); + #endif + for (UInt32 i = 0; i < m_NumCrcs; i++) + Encoder->CombinedCrc.Update(m_CRCs[i]); + Encoder->WriteBytes(m_TempArray, outStreamTemp.GetPos(), outStreamTemp.GetCurByte()); + HRESULT res = S_OK; + #ifndef _7ZIP_ST + if (Encoder->MtMode) + { + UInt32 blockIndex = m_BlockIndex + 1; + if (blockIndex == Encoder->NumThreads) + blockIndex = 0; + + if (Encoder->Progress) + { + UInt64 unpackSize = Encoder->m_OutStream.GetProcessedSize(); + res = Encoder->Progress->SetRatioInfo(&m_PackSize, &unpackSize); + } + + Encoder->ThreadsInfo[blockIndex].CanWriteEvent.Set(); + } + #endif + return res; +} + +void CEncoder::WriteBytes(const Byte *data, UInt32 sizeInBits, Byte lastByte) +{ + UInt32 bytesSize = (sizeInBits / 8); + for (UInt32 i = 0; i < bytesSize; i++) + m_OutStream.WriteBits(data[i], 8); + WriteBits(lastByte, (sizeInBits & 7)); +} + + +HRESULT CEncoder::CodeReal(ISequentialInStream *inStream, ISequentialOutStream *outStream, + const UInt64 * /* inSize */, const UInt64 * /* outSize */, ICompressProgressInfo *progress) +{ + #ifndef _7ZIP_ST + Progress = progress; + RINOK(Create()); + for (UInt32 t = 0; t < NumThreads; t++) + #endif + { + #ifndef _7ZIP_ST + CThreadInfo &ti = ThreadsInfo[t]; + if (MtMode) + { + RINOK(ti.StreamWasFinishedEvent.Reset()); + RINOK(ti.WaitingWasStartedEvent.Reset()); + RINOK(ti.CanWriteEvent.Reset()); + } + #else + CThreadInfo &ti = ThreadsInfo; + ti.Encoder = this; + #endif + + ti.m_OptimizeNumTables = m_OptimizeNumTables; + + if (!ti.Alloc()) + return E_OUTOFMEMORY; + } + + + if (!m_InStream.Create(kBufferSize)) + return E_OUTOFMEMORY; + if (!m_OutStream.Create(kBufferSize)) + return E_OUTOFMEMORY; + + + m_InStream.SetStream(inStream); + m_InStream.Init(); + + m_OutStream.SetStream(outStream); + m_OutStream.Init(); + + CFlusher flusher(this); + + CombinedCrc.Init(); + #ifndef _7ZIP_ST + NextBlockIndex = 0; + StreamWasFinished = false; + CloseThreads = false; + CanStartWaitingEvent.Reset(); + #endif + + WriteByte(kArSig0); + WriteByte(kArSig1); + WriteByte(kArSig2); + WriteByte((Byte)(kArSig3 + m_BlockSizeMult)); + + #ifndef _7ZIP_ST + + if (MtMode) + { + ThreadsInfo[0].CanWriteEvent.Set(); + Result = S_OK; + CanProcessEvent.Set(); + UInt32 t; + for (t = 0; t < NumThreads; t++) + ThreadsInfo[t].StreamWasFinishedEvent.Lock(); + CanProcessEvent.Reset(); + CanStartWaitingEvent.Set(); + for (t = 0; t < NumThreads; t++) + ThreadsInfo[t].WaitingWasStartedEvent.Lock(); + CanStartWaitingEvent.Reset(); + RINOK(Result); + } + else + #endif + { + for (;;) + { + CThreadInfo &ti = + #ifndef _7ZIP_ST + ThreadsInfo[0]; + #else + ThreadsInfo; + #endif + UInt32 blockSize = ReadRleBlock(ti.m_Block); + if (blockSize == 0) + break; + RINOK(ti.EncodeBlock3(blockSize)); + if (progress) + { + UInt64 packSize = m_InStream.GetProcessedSize(); + UInt64 unpackSize = m_OutStream.GetProcessedSize(); + RINOK(progress->SetRatioInfo(&packSize, &unpackSize)); + } + } + } + WriteByte(kFinSig0); + WriteByte(kFinSig1); + WriteByte(kFinSig2); + WriteByte(kFinSig3); + WriteByte(kFinSig4); + WriteByte(kFinSig5); + + WriteCrc(CombinedCrc.GetDigest()); + return Flush(); +} + +STDMETHODIMP CEncoder::Code(ISequentialInStream *inStream, ISequentialOutStream *outStream, + const UInt64 *inSize, const UInt64 *outSize, ICompressProgressInfo *progress) +{ + try { return CodeReal(inStream, outStream, inSize, outSize, progress); } + catch(const CInBufferException &e) { return e.ErrorCode; } + catch(const COutBufferException &e) { return e.ErrorCode; } + catch(...) { return S_FALSE; } +} + +HRESULT CEncoder::SetCoderProperties(const PROPID *propIDs, const PROPVARIANT *props, UInt32 numProps) +{ + for(UInt32 i = 0; i < numProps; i++) + { + const PROPVARIANT &prop = props[i]; + switch(propIDs[i]) + { + case NCoderPropID::kNumPasses: + { + if (prop.vt != VT_UI4) + return E_INVALIDARG; + UInt32 numPasses = prop.ulVal; + if (numPasses == 0) + numPasses = 1; + if (numPasses > kNumPassesMax) + numPasses = kNumPassesMax; + NumPasses = numPasses; + m_OptimizeNumTables = (NumPasses > 1); + break; + } + case NCoderPropID::kDictionarySize: + { + if (prop.vt != VT_UI4) + return E_INVALIDARG; + UInt32 dictionary = prop.ulVal / kBlockSizeStep; + if (dictionary < kBlockSizeMultMin) + dictionary = kBlockSizeMultMin; + else if (dictionary > kBlockSizeMultMax) + dictionary = kBlockSizeMultMax; + m_BlockSizeMult = dictionary; + break; + } + case NCoderPropID::kNumThreads: + { + #ifndef _7ZIP_ST + if (prop.vt != VT_UI4) + return E_INVALIDARG; + NumThreads = prop.ulVal; + if (NumThreads < 1) + NumThreads = 1; + #endif + break; + } + default: + return E_INVALIDARG; + } + } + return S_OK; +} + +#ifndef _7ZIP_ST +STDMETHODIMP CEncoder::SetNumberOfThreads(UInt32 numThreads) +{ + NumThreads = numThreads; + if (NumThreads < 1) + NumThreads = 1; + return S_OK; +} +#endif + +}} diff --git a/CPP/7zip/Compress/BZip2Encoder.h b/CPP/7zip/Compress/BZip2Encoder.h new file mode 100644 index 0000000..a863172 --- /dev/null +++ b/CPP/7zip/Compress/BZip2Encoder.h @@ -0,0 +1,245 @@ +// BZip2Encoder.h + +#ifndef __COMPRESS_BZIP2_ENCODER_H +#define __COMPRESS_BZIP2_ENCODER_H + +#include "../../Common/Defs.h" +#include "../../Common/MyCom.h" + +#ifndef _7ZIP_ST +#include "../../Windows/Synchronization.h" +#include "../../Windows/Thread.h" +#endif + +#include "../ICoder.h" + +#include "../Common/InBuffer.h" +#include "../Common/OutBuffer.h" + +#include "BitmEncoder.h" +#include "BZip2Const.h" +#include "BZip2Crc.h" + +namespace NCompress { +namespace NBZip2 { + +class CMsbfEncoderTemp +{ + UInt32 m_Pos; + int m_BitPos; + Byte m_CurByte; + Byte *Buffer; +public: + void SetStream(Byte *buffer) { Buffer = buffer; } + Byte *GetStream() const { return Buffer; } + + void Init() + { + m_Pos = 0; + m_BitPos = 8; + m_CurByte = 0; + } + + void Flush() + { + if (m_BitPos < 8) + WriteBits(0, m_BitPos); + } + + void WriteBits(UInt32 value, int numBits) + { + while (numBits > 0) + { + int numNewBits = MyMin(numBits, m_BitPos); + numBits -= numNewBits; + + m_CurByte <<= numNewBits; + UInt32 newBits = value >> numBits; + m_CurByte |= Byte(newBits); + value -= (newBits << numBits); + + m_BitPos -= numNewBits; + + if (m_BitPos == 0) + { + Buffer[m_Pos++] = m_CurByte; + m_BitPos = 8; + } + } + } + + UInt32 GetBytePos() const { return m_Pos ; } + UInt32 GetPos() const { return m_Pos * 8 + (8 - m_BitPos); } + Byte GetCurByte() const { return m_CurByte; } + void SetPos(UInt32 bitPos) + { + m_Pos = bitPos / 8; + m_BitPos = 8 - ((int)bitPos & 7); + } + void SetCurState(int bitPos, Byte curByte) + { + m_BitPos = 8 - bitPos; + m_CurByte = curByte; + } +}; + +class CEncoder; + +const int kNumPassesMax = 10; + +class CThreadInfo +{ +public: + Byte *m_Block; +private: + Byte *m_MtfArray; + Byte *m_TempArray; + UInt32 *m_BlockSorterIndex; + + CMsbfEncoderTemp *m_OutStreamCurrent; + + Byte Lens[kNumTablesMax][kMaxAlphaSize]; + UInt32 Freqs[kNumTablesMax][kMaxAlphaSize]; + UInt32 Codes[kNumTablesMax][kMaxAlphaSize]; + + Byte m_Selectors[kNumSelectorsMax]; + + UInt32 m_CRCs[1 << kNumPassesMax]; + UInt32 m_NumCrcs; + + UInt32 m_BlockIndex; + + void WriteBits2(UInt32 value, UInt32 numBits); + void WriteByte2(Byte b); + void WriteBit2(bool v); + void WriteCrc2(UInt32 v); + + void EncodeBlock(const Byte *block, UInt32 blockSize); + UInt32 EncodeBlockWithHeaders(const Byte *block, UInt32 blockSize); + void EncodeBlock2(const Byte *block, UInt32 blockSize, UInt32 numPasses); +public: + bool m_OptimizeNumTables; + CEncoder *Encoder; + #ifndef _7ZIP_ST + NWindows::CThread Thread; + + NWindows::NSynchronization::CAutoResetEvent StreamWasFinishedEvent; + NWindows::NSynchronization::CAutoResetEvent WaitingWasStartedEvent; + + // it's not member of this thread. We just need one event per thread + NWindows::NSynchronization::CAutoResetEvent CanWriteEvent; + + UInt64 m_PackSize; + + Byte MtPad[1 << 8]; // It's pad for Multi-Threading. Must be >= Cache_Line_Size. + HRESULT Create(); + void FinishStream(bool needLeave); + DWORD ThreadFunc(); + #endif + + CThreadInfo(): m_BlockSorterIndex(0), m_Block(0) {} + ~CThreadInfo() { Free(); } + bool Alloc(); + void Free(); + + HRESULT EncodeBlock3(UInt32 blockSize); +}; + +class CEncoder : + public ICompressCoder, + public ICompressSetCoderProperties, + #ifndef _7ZIP_ST + public ICompressSetCoderMt, + #endif + public CMyUnknownImp +{ + UInt32 m_BlockSizeMult; + bool m_OptimizeNumTables; + + UInt32 m_NumPassesPrev; + + UInt32 m_NumThreadsPrev; +public: + CInBuffer m_InStream; + Byte MtPad[1 << 8]; // It's pad for Multi-Threading. Must be >= Cache_Line_Size. + CBitmEncoder m_OutStream; + UInt32 NumPasses; + CBZip2CombinedCrc CombinedCrc; + + #ifndef _7ZIP_ST + CThreadInfo *ThreadsInfo; + NWindows::NSynchronization::CManualResetEvent CanProcessEvent; + NWindows::NSynchronization::CCriticalSection CS; + UInt32 NumThreads; + bool MtMode; + UInt32 NextBlockIndex; + + bool CloseThreads; + bool StreamWasFinished; + NWindows::NSynchronization::CManualResetEvent CanStartWaitingEvent; + + HRESULT Result; + ICompressProgressInfo *Progress; + #else + CThreadInfo ThreadsInfo; + #endif + + UInt32 ReadRleBlock(Byte *buffer); + void WriteBytes(const Byte *data, UInt32 sizeInBits, Byte lastByte); + + void WriteBits(UInt32 value, UInt32 numBits); + void WriteByte(Byte b); + void WriteBit(bool v); + void WriteCrc(UInt32 v); + + #ifndef _7ZIP_ST + HRESULT Create(); + void Free(); + #endif + +public: + CEncoder(); + #ifndef _7ZIP_ST + ~CEncoder(); + #endif + + HRESULT Flush() { return m_OutStream.Flush(); } + + void ReleaseStreams() + { + m_InStream.ReleaseStream(); + m_OutStream.ReleaseStream(); + } + + class CFlusher + { + CEncoder *_coder; + public: + CFlusher(CEncoder *coder): _coder(coder) {} + ~CFlusher() + { + _coder->ReleaseStreams(); + } + }; + + #ifndef _7ZIP_ST + MY_UNKNOWN_IMP2(ICompressSetCoderMt, ICompressSetCoderProperties) + #else + MY_UNKNOWN_IMP1(ICompressSetCoderProperties) + #endif + + HRESULT CodeReal(ISequentialInStream *inStream, ISequentialOutStream *outStream, + const UInt64 *inSize, const UInt64 *outSize, ICompressProgressInfo *progress); + + STDMETHOD(Code)(ISequentialInStream *inStream, ISequentialOutStream *outStream, + const UInt64 *inSize, const UInt64 *outSize, ICompressProgressInfo *progress); + STDMETHOD(SetCoderProperties)(const PROPID *propIDs, const PROPVARIANT *props, UInt32 numProps); + + #ifndef _7ZIP_ST + STDMETHOD(SetNumberOfThreads)(UInt32 numThreads); + #endif +}; + +}} + +#endif diff --git a/CPP/7zip/Compress/BZip2Register.cpp b/CPP/7zip/Compress/BZip2Register.cpp new file mode 100644 index 0000000..ef14204 --- /dev/null +++ b/CPP/7zip/Compress/BZip2Register.cpp @@ -0,0 +1,20 @@ +// BZip2Register.cpp + +#include "StdAfx.h" + +#include "../Common/RegisterCodec.h" + +#include "BZip2Decoder.h" + +static void *CreateCodec() { return (void *)(ICompressCoder *)(new NCompress::NBZip2::CDecoder); } +#if !defined(EXTRACT_ONLY) && !defined(BZIP2_EXTRACT_ONLY) +#include "BZip2Encoder.h" +static void *CreateCodecOut() { return (void *)(ICompressCoder *)(new NCompress::NBZip2::CEncoder); } +#else +#define CreateCodecOut 0 +#endif + +static CCodecInfo g_CodecInfo = + { CreateCodec, CreateCodecOut, 0x040202, L"BZip2", 1, false }; + +REGISTER_CODEC(BZip2) diff --git a/CPP/7zip/Compress/Bcj2Coder.cpp b/CPP/7zip/Compress/Bcj2Coder.cpp new file mode 100644 index 0000000..684da5a --- /dev/null +++ b/CPP/7zip/Compress/Bcj2Coder.cpp @@ -0,0 +1,386 @@ +// Bcj2Coder.cpp + +#include "StdAfx.h" + +#include "../../../C/Alloc.h" + +#include "Bcj2Coder.h" + +namespace NCompress { +namespace NBcj2 { + +inline bool IsJcc(Byte b0, Byte b1) { return (b0 == 0x0F && (b1 & 0xF0) == 0x80); } +inline bool IsJ(Byte b0, Byte b1) { return ((b1 & 0xFE) == 0xE8 || IsJcc(b0, b1)); } +inline unsigned GetIndex(Byte b0, Byte b1) { return ((b1 == 0xE8) ? b0 : ((b1 == 0xE9) ? 256 : 257)); } + +#ifndef EXTRACT_ONLY + +static const int kBufferSize = 1 << 17; + +static bool inline Test86MSByte(Byte b) +{ + return (b == 0 || b == 0xFF); +} + +bool CEncoder::Create() +{ + if (!_mainStream.Create(1 << 18)) + return false; + if (!_callStream.Create(1 << 18)) + return false; + if (!_jumpStream.Create(1 << 18)) + return false; + if (!_rangeEncoder.Create(1 << 20)) + return false; + if (_buffer == 0) + { + _buffer = (Byte *)MidAlloc(kBufferSize); + if (_buffer == 0) + return false; + } + return true; +} + +CEncoder::~CEncoder() +{ + ::MidFree(_buffer); +} + +HRESULT CEncoder::Flush() +{ + RINOK(_mainStream.Flush()); + RINOK(_callStream.Flush()); + RINOK(_jumpStream.Flush()); + _rangeEncoder.FlushData(); + return _rangeEncoder.FlushStream(); +} + +const UInt32 kDefaultLimit = (1 << 24); + +HRESULT CEncoder::CodeReal(ISequentialInStream **inStreams, const UInt64 **inSizes, UInt32 numInStreams, + ISequentialOutStream **outStreams, const UInt64 ** /* outSizes */, UInt32 numOutStreams, + ICompressProgressInfo *progress) +{ + if (numInStreams != 1 || numOutStreams != 4) + return E_INVALIDARG; + + if (!Create()) + return E_OUTOFMEMORY; + + bool sizeIsDefined = false; + UInt64 inSize = 0; + if (inSizes != NULL) + if (inSizes[0] != NULL) + { + inSize = *inSizes[0]; + if (inSize <= kDefaultLimit) + sizeIsDefined = true; + } + + CCoderReleaser releaser(this); + + ISequentialInStream *inStream = inStreams[0]; + + _mainStream.SetStream(outStreams[0]); + _mainStream.Init(); + _callStream.SetStream(outStreams[1]); + _callStream.Init(); + _jumpStream.SetStream(outStreams[2]); + _jumpStream.Init(); + _rangeEncoder.SetStream(outStreams[3]); + _rangeEncoder.Init(); + for (int i = 0; i < 256 + 2; i++) + _statusEncoder[i].Init(); + + CMyComPtr getSubStreamSize; + { + inStream->QueryInterface(IID_ICompressGetSubStreamSize, (void **)&getSubStreamSize); + } + + UInt32 nowPos = 0; + UInt64 nowPos64 = 0; + UInt32 bufferPos = 0; + + Byte prevByte = 0; + + UInt64 subStreamIndex = 0; + UInt64 subStreamStartPos = 0; + UInt64 subStreamEndPos = 0; + + for (;;) + { + UInt32 processedSize = 0; + for (;;) + { + UInt32 size = kBufferSize - (bufferPos + processedSize); + UInt32 processedSizeLoc; + if (size == 0) + break; + RINOK(inStream->Read(_buffer + bufferPos + processedSize, size, &processedSizeLoc)); + if (processedSizeLoc == 0) + break; + processedSize += processedSizeLoc; + } + UInt32 endPos = bufferPos + processedSize; + + if (endPos < 5) + { + // change it + for (bufferPos = 0; bufferPos < endPos; bufferPos++) + { + Byte b = _buffer[bufferPos]; + _mainStream.WriteByte(b); + UInt32 index; + if (b == 0xE8) + index = prevByte; + else if (b == 0xE9) + index = 256; + else if (IsJcc(prevByte, b)) + index = 257; + else + { + prevByte = b; + continue; + } + _statusEncoder[index].Encode(&_rangeEncoder, 0); + prevByte = b; + } + return Flush(); + } + + bufferPos = 0; + + UInt32 limit = endPos - 5; + while(bufferPos <= limit) + { + Byte b = _buffer[bufferPos]; + _mainStream.WriteByte(b); + if (!IsJ(prevByte, b)) + { + bufferPos++; + prevByte = b; + continue; + } + Byte nextByte = _buffer[bufferPos + 4]; + UInt32 src = + (UInt32(nextByte) << 24) | + (UInt32(_buffer[bufferPos + 3]) << 16) | + (UInt32(_buffer[bufferPos + 2]) << 8) | + (_buffer[bufferPos + 1]); + UInt32 dest = (nowPos + bufferPos + 5) + src; + // if (Test86MSByte(nextByte)) + bool convert; + if (getSubStreamSize != NULL) + { + UInt64 currentPos = (nowPos64 + bufferPos); + while (subStreamEndPos < currentPos) + { + UInt64 subStreamSize; + HRESULT result = getSubStreamSize->GetSubStreamSize(subStreamIndex, &subStreamSize); + if (result == S_OK) + { + subStreamStartPos = subStreamEndPos; + subStreamEndPos += subStreamSize; + subStreamIndex++; + } + else if (result == S_FALSE || result == E_NOTIMPL) + { + getSubStreamSize.Release(); + subStreamStartPos = 0; + subStreamEndPos = subStreamStartPos - 1; + } + else + return result; + } + if (getSubStreamSize == NULL) + { + if (sizeIsDefined) + convert = (dest < inSize); + else + convert = Test86MSByte(nextByte); + } + else if (subStreamEndPos - subStreamStartPos > kDefaultLimit) + convert = Test86MSByte(nextByte); + else + { + UInt64 dest64 = (currentPos + 5) + Int64(Int32(src)); + convert = (dest64 >= subStreamStartPos && dest64 < subStreamEndPos); + } + } + else if (sizeIsDefined) + convert = (dest < inSize); + else + convert = Test86MSByte(nextByte); + unsigned index = GetIndex(prevByte, b); + if (convert) + { + _statusEncoder[index].Encode(&_rangeEncoder, 1); + bufferPos += 5; + COutBuffer &s = (b == 0xE8) ? _callStream : _jumpStream; + for (int i = 24; i >= 0; i -= 8) + s.WriteByte((Byte)(dest >> i)); + prevByte = nextByte; + } + else + { + _statusEncoder[index].Encode(&_rangeEncoder, 0); + bufferPos++; + prevByte = b; + } + } + nowPos += bufferPos; + nowPos64 += bufferPos; + + if (progress != NULL) + { + /* + const UInt64 compressedSize = + _mainStream.GetProcessedSize() + + _callStream.GetProcessedSize() + + _jumpStream.GetProcessedSize() + + _rangeEncoder.GetProcessedSize(); + */ + RINOK(progress->SetRatioInfo(&nowPos64, NULL)); + } + + UInt32 i = 0; + while(bufferPos < endPos) + _buffer[i++] = _buffer[bufferPos++]; + bufferPos = i; + } +} + +STDMETHODIMP CEncoder::Code(ISequentialInStream **inStreams, const UInt64 **inSizes, UInt32 numInStreams, + ISequentialOutStream **outStreams, const UInt64 **outSizes, UInt32 numOutStreams, + ICompressProgressInfo *progress) +{ + try + { + return CodeReal(inStreams, inSizes, numInStreams, outStreams, outSizes,numOutStreams, progress); + } + catch(const COutBufferException &e) { return e.ErrorCode; } + catch(...) { return S_FALSE; } +} + +#endif + + +STDMETHODIMP CDecoder::SetInBufSize(UInt32 streamIndex, UInt32 size) { _inBufSizes[streamIndex] = size; return S_OK; } +STDMETHODIMP CDecoder::SetOutBufSize(UInt32 , UInt32 size) { _outBufSize = size; return S_OK; } + +CDecoder::CDecoder(): + _outBufSize(1 << 16) +{ + _inBufSizes[0] = 1 << 20; + _inBufSizes[1] = 1 << 20; + _inBufSizes[2] = 1 << 20; + _inBufSizes[3] = 1 << 20; +} + +HRESULT CDecoder::CodeReal(ISequentialInStream **inStreams, const UInt64 ** /* inSizes */, UInt32 numInStreams, + ISequentialOutStream **outStreams, const UInt64 ** /* outSizes */, UInt32 numOutStreams, + ICompressProgressInfo *progress) +{ + if (numInStreams != 4 || numOutStreams != 1) + return E_INVALIDARG; + + if (!_mainInStream.Create(_inBufSizes[0])) + return E_OUTOFMEMORY; + if (!_callStream.Create(_inBufSizes[1])) + return E_OUTOFMEMORY; + if (!_jumpStream.Create(_inBufSizes[2])) + return E_OUTOFMEMORY; + if (!_rangeDecoder.Create(_inBufSizes[3])) + return E_OUTOFMEMORY; + if (!_outStream.Create(_outBufSize)) + return E_OUTOFMEMORY; + + CCoderReleaser releaser(this); + + _mainInStream.SetStream(inStreams[0]); + _callStream.SetStream(inStreams[1]); + _jumpStream.SetStream(inStreams[2]); + _rangeDecoder.SetStream(inStreams[3]); + _outStream.SetStream(outStreams[0]); + + _mainInStream.Init(); + _callStream.Init(); + _jumpStream.Init(); + _rangeDecoder.Init(); + _outStream.Init(); + + for (int i = 0; i < 256 + 2; i++) + _statusDecoder[i].Init(); + + Byte prevByte = 0; + UInt32 processedBytes = 0; + for (;;) + { + if (processedBytes >= (1 << 20) && progress != NULL) + { + /* + const UInt64 compressedSize = + _mainInStream.GetProcessedSize() + + _callStream.GetProcessedSize() + + _jumpStream.GetProcessedSize() + + _rangeDecoder.GetProcessedSize(); + */ + const UInt64 nowPos64 = _outStream.GetProcessedSize(); + RINOK(progress->SetRatioInfo(NULL, &nowPos64)); + processedBytes = 0; + } + UInt32 i; + Byte b = 0; + const UInt32 kBurstSize = (1 << 18); + for (i = 0; i < kBurstSize; i++) + { + if (!_mainInStream.ReadByte(b)) + return Flush(); + _outStream.WriteByte(b); + if (IsJ(prevByte, b)) + break; + prevByte = b; + } + processedBytes += i; + if (i == kBurstSize) + continue; + unsigned index = GetIndex(prevByte, b); + if (_statusDecoder[index].Decode(&_rangeDecoder) == 1) + { + UInt32 src = 0; + CInBuffer &s = (b == 0xE8) ? _callStream : _jumpStream; + for (int i = 0; i < 4; i++) + { + Byte b0; + if(!s.ReadByte(b0)) + return S_FALSE; + src <<= 8; + src |= ((UInt32)b0); + } + UInt32 dest = src - (UInt32(_outStream.GetProcessedSize()) + 4) ; + _outStream.WriteByte((Byte)(dest)); + _outStream.WriteByte((Byte)(dest >> 8)); + _outStream.WriteByte((Byte)(dest >> 16)); + _outStream.WriteByte((Byte)(dest >> 24)); + prevByte = (Byte)(dest >> 24); + processedBytes += 4; + } + else + prevByte = b; + } +} + +STDMETHODIMP CDecoder::Code(ISequentialInStream **inStreams, const UInt64 **inSizes, UInt32 numInStreams, + ISequentialOutStream **outStreams, const UInt64 **outSizes, UInt32 numOutStreams, + ICompressProgressInfo *progress) +{ + try + { + return CodeReal(inStreams, inSizes, numInStreams, outStreams, outSizes,numOutStreams, progress); + } + catch(const CInBufferException &e) { return e.ErrorCode; } + catch(const COutBufferException &e) { return e.ErrorCode; } + catch(...) { return S_FALSE; } +} + +}} diff --git a/CPP/7zip/Compress/Bcj2Coder.h b/CPP/7zip/Compress/Bcj2Coder.h new file mode 100644 index 0000000..79a713f --- /dev/null +++ b/CPP/7zip/Compress/Bcj2Coder.h @@ -0,0 +1,115 @@ +// Bcj2Coder.h + +#ifndef __COMPRESS_BCJ2_CODER_H +#define __COMPRESS_BCJ2_CODER_H + +#include "../../Common/MyCom.h" + +#include "../ICoder.h" + +#include "RangeCoderBit.h" + +namespace NCompress { +namespace NBcj2 { + +const int kNumMoveBits = 5; + +#ifndef EXTRACT_ONLY + +class CEncoder: + public ICompressCoder2, + public CMyUnknownImp +{ + Byte *_buffer; + bool Create(); + + COutBuffer _mainStream; + COutBuffer _callStream; + COutBuffer _jumpStream; + NCompress::NRangeCoder::CEncoder _rangeEncoder; + NCompress::NRangeCoder::CBitEncoder _statusEncoder[256 + 2]; + + HRESULT Flush(); +public: + void ReleaseStreams() + { + _mainStream.ReleaseStream(); + _callStream.ReleaseStream(); + _jumpStream.ReleaseStream(); + _rangeEncoder.ReleaseStream(); + } + + class CCoderReleaser + { + CEncoder *_coder; + public: + CCoderReleaser(CEncoder *coder): _coder(coder) {} + ~CCoderReleaser() { _coder->ReleaseStreams(); } + }; + +public: + MY_UNKNOWN_IMP + + HRESULT CodeReal(ISequentialInStream **inStreams, const UInt64 **inSizes, UInt32 numInStreams, + ISequentialOutStream **outStreams, const UInt64 **outSizes, UInt32 numOutStreams, + ICompressProgressInfo *progress); + STDMETHOD(Code)(ISequentialInStream **inStreams, const UInt64 **inSizes, UInt32 numInStreams, + ISequentialOutStream **outStreams, const UInt64 **outSizes, UInt32 numOutStreams, + ICompressProgressInfo *progress); + CEncoder(): _buffer(0) {}; + ~CEncoder(); +}; + +#endif + +class CDecoder: + public ICompressCoder2, + public ICompressSetBufSize, + public CMyUnknownImp +{ + CInBuffer _mainInStream; + CInBuffer _callStream; + CInBuffer _jumpStream; + NCompress::NRangeCoder::CDecoder _rangeDecoder; + NCompress::NRangeCoder::CBitDecoder _statusDecoder[256 + 2]; + + COutBuffer _outStream; + UInt32 _inBufSizes[4]; + UInt32 _outBufSize; + +public: + void ReleaseStreams() + { + _mainInStream.ReleaseStream(); + _callStream.ReleaseStream(); + _jumpStream.ReleaseStream(); + _rangeDecoder.ReleaseStream(); + _outStream.ReleaseStream(); + } + + HRESULT Flush() { return _outStream.Flush(); } + class CCoderReleaser + { + CDecoder *_coder; + public: + CCoderReleaser(CDecoder *coder): _coder(coder) {} + ~CCoderReleaser() { _coder->ReleaseStreams(); } + }; + +public: + MY_UNKNOWN_IMP1(ICompressSetBufSize); + HRESULT CodeReal(ISequentialInStream **inStreams, const UInt64 **inSizes, UInt32 numInStreams, + ISequentialOutStream **outStreams, const UInt64 **outSizes, UInt32 numOutStreams, + ICompressProgressInfo *progress); + STDMETHOD(Code)(ISequentialInStream **inStreams, const UInt64 **inSizes, UInt32 numInStreams, + ISequentialOutStream **outStreams, const UInt64 **outSizes, UInt32 numOutStreams, + ICompressProgressInfo *progress); + + STDMETHOD(SetInBufSize)(UInt32 streamIndex, UInt32 size); + STDMETHOD(SetOutBufSize)(UInt32 streamIndex, UInt32 size); + CDecoder(); +}; + +}} + +#endif diff --git a/CPP/7zip/Compress/Bcj2Register.cpp b/CPP/7zip/Compress/Bcj2Register.cpp new file mode 100644 index 0000000..8eb1e73 --- /dev/null +++ b/CPP/7zip/Compress/Bcj2Register.cpp @@ -0,0 +1,19 @@ +// Bcj2Register.cpp + +#include "StdAfx.h" + +#include "../Common/RegisterCodec.h" + +#include "Bcj2Coder.h" + +static void *CreateCodec() { return (void *)(ICompressCoder2 *)(new NCompress::NBcj2::CDecoder()); } +#ifndef EXTRACT_ONLY +static void *CreateCodecOut() { return (void *)(ICompressCoder2 *)(new NCompress::NBcj2::CEncoder()); } +#else +#define CreateCodecOut 0 +#endif + +static CCodecInfo g_CodecInfo = + { CreateCodec, CreateCodecOut, 0x0303011B, L"BCJ2", 4, false }; + +REGISTER_CODEC(BCJ2) diff --git a/CPP/7zip/Compress/BcjCoder.cpp b/CPP/7zip/Compress/BcjCoder.cpp new file mode 100644 index 0000000..0e34ef4 --- /dev/null +++ b/CPP/7zip/Compress/BcjCoder.cpp @@ -0,0 +1,15 @@ +// BcjCoder.cpp + +#include "StdAfx.h" + +#include "BcjCoder.h" + +UInt32 CBCJ_x86_Encoder::SubFilter(Byte *data, UInt32 size) +{ + return (UInt32)::x86_Convert(data, size, _bufferPos, &_prevMask, 1); +} + +UInt32 CBCJ_x86_Decoder::SubFilter(Byte *data, UInt32 size) +{ + return (UInt32)::x86_Convert(data, size, _bufferPos, &_prevMask, 0); +} diff --git a/CPP/7zip/Compress/BcjCoder.h b/CPP/7zip/Compress/BcjCoder.h new file mode 100644 index 0000000..0754bcd --- /dev/null +++ b/CPP/7zip/Compress/BcjCoder.h @@ -0,0 +1,19 @@ +// BcjCoder.h + +#ifndef __COMPRESS_BCJ_CODER_H +#define __COMPRESS_BCJ_CODER_H + +#include "../../../C/Bra.h" + +#include "BranchCoder.h" + +struct CBranch86 +{ + UInt32 _prevMask; + void x86Init() { x86_Convert_Init(_prevMask); } +}; + +MyClassB(BCJ_x86, 0x01, 3, CBranch86 , + virtual void SubInit() { x86Init(); }) + +#endif diff --git a/CPP/7zip/Compress/BcjRegister.cpp b/CPP/7zip/Compress/BcjRegister.cpp new file mode 100644 index 0000000..648ad8e --- /dev/null +++ b/CPP/7zip/Compress/BcjRegister.cpp @@ -0,0 +1,19 @@ +// BcjRegister.cpp + +#include "StdAfx.h" + +#include "../Common/RegisterCodec.h" + +#include "BcjCoder.h" + +static void *CreateCodec() { return (void *)(ICompressFilter *)(new CBCJ_x86_Decoder()); } +#ifndef EXTRACT_ONLY +static void *CreateCodecOut() { return (void *)(ICompressFilter *)(new CBCJ_x86_Encoder()); } +#else +#define CreateCodecOut 0 +#endif + +static CCodecInfo g_CodecInfo = + { CreateCodec, CreateCodecOut, 0x03030103, L"BCJ", 1, true }; + +REGISTER_CODEC(BCJ) diff --git a/CPP/7zip/Compress/BitlDecoder.cpp b/CPP/7zip/Compress/BitlDecoder.cpp new file mode 100644 index 0000000..78665be --- /dev/null +++ b/CPP/7zip/Compress/BitlDecoder.cpp @@ -0,0 +1,24 @@ +// BitlDecoder.cpp + +#include "StdAfx.h" + +#include "BitlDecoder.h" + +namespace NBitl { + +Byte kInvertTable[256]; + +struct CInverterTableInitializer +{ + CInverterTableInitializer() + { + for (int i = 0; i < 256; i++) + { + int x = ((i & 0x55) << 1) | ((i & 0xAA) >> 1); + x = ((x & 0x33) << 2) | ((x & 0xCC) >> 2); + kInvertTable[i] = (Byte)(((x & 0x0F) << 4) | ((x & 0xF0) >> 4)); + } + } +} g_InverterTableInitializer; + +} diff --git a/CPP/7zip/Compress/BitlDecoder.h b/CPP/7zip/Compress/BitlDecoder.h new file mode 100644 index 0000000..ff373ba --- /dev/null +++ b/CPP/7zip/Compress/BitlDecoder.h @@ -0,0 +1,141 @@ +// BitlDecoder.h -- the Least Significant Bit of byte is First + +#ifndef __BITL_DECODER_H +#define __BITL_DECODER_H + +#include "../IStream.h" + +namespace NBitl { + +const unsigned kNumBigValueBits = 8 * 4; +const unsigned kNumValueBytes = 3; +const unsigned kNumValueBits = 8 * kNumValueBytes; + +const UInt32 kMask = (1 << kNumValueBits) - 1; + +extern Byte kInvertTable[256]; + +template +class CBaseDecoder +{ +protected: + unsigned m_BitPos; + UInt32 m_Value; + TInByte m_Stream; +public: + UInt32 NumExtraBytes; + bool Create(UInt32 bufferSize) { return m_Stream.Create(bufferSize); } + void SetStream(ISequentialInStream *inStream) { m_Stream.SetStream(inStream); } + void ReleaseStream() { m_Stream.ReleaseStream(); } + void Init() + { + m_Stream.Init(); + m_BitPos = kNumBigValueBits; + m_Value = 0; + NumExtraBytes = 0; + } + UInt64 GetProcessedSize() const { return m_Stream.GetProcessedSize() + NumExtraBytes - (kNumBigValueBits - m_BitPos) / 8; } + + void Normalize() + { + for (; m_BitPos >= 8; m_BitPos -= 8) + { + Byte b = 0; + if (!m_Stream.ReadByte(b)) + { + b = 0xFF; // check it + NumExtraBytes++; + } + m_Value = (b << (kNumBigValueBits - m_BitPos)) | m_Value; + } + } + + UInt32 ReadBits(unsigned numBits) + { + Normalize(); + UInt32 res = m_Value & ((1 << numBits) - 1); + m_BitPos += numBits; + m_Value >>= numBits; + return res; + } + + bool ExtraBitsWereRead() const + { + if (NumExtraBytes == 0) + return false; + return ((UInt32)(kNumBigValueBits - m_BitPos) < (NumExtraBytes << 3)); + } +}; + +template +class CDecoder: public CBaseDecoder +{ + UInt32 m_NormalValue; + +public: + void Init() + { + CBaseDecoder::Init(); + m_NormalValue = 0; + } + + void Normalize() + { + for (; this->m_BitPos >= 8; this->m_BitPos -= 8) + { + Byte b = 0; + if (!this->m_Stream.ReadByte(b)) + { + b = 0xFF; // check it + this->NumExtraBytes++; + } + m_NormalValue = (b << (kNumBigValueBits - this->m_BitPos)) | m_NormalValue; + this->m_Value = (this->m_Value << 8) | kInvertTable[b]; + } + } + + UInt32 GetValue(unsigned numBits) + { + Normalize(); + return ((this->m_Value >> (8 - this->m_BitPos)) & kMask) >> (kNumValueBits - numBits); + } + + void MovePos(unsigned numBits) + { + this->m_BitPos += numBits; + m_NormalValue >>= numBits; + } + + UInt32 ReadBits(unsigned numBits) + { + Normalize(); + UInt32 res = m_NormalValue & ((1 << numBits) - 1); + MovePos(numBits); + return res; + } + + void AlignToByte() { MovePos((32 - this->m_BitPos) & 7); } + + Byte ReadByte() + { + if (this->m_BitPos == kNumBigValueBits) + { + Byte b = 0; + if (!this->m_Stream.ReadByte(b)) + { + b = 0xFF; + this->NumExtraBytes++; + } + return b; + } + { + Byte b = (Byte)(m_NormalValue & 0xFF); + MovePos(8); + return b; + } + } +}; + +} + +#endif diff --git a/CPP/7zip/Compress/BitlEncoder.h b/CPP/7zip/Compress/BitlEncoder.h new file mode 100644 index 0000000..7de5754 --- /dev/null +++ b/CPP/7zip/Compress/BitlEncoder.h @@ -0,0 +1,57 @@ +// BitlEncoder.h -- the Least Significant Bit of byte is First + +#ifndef __BITL_ENCODER_H +#define __BITL_ENCODER_H + +#include "../Common/OutBuffer.h" + +class CBitlEncoder +{ + COutBuffer m_Stream; + unsigned m_BitPos; + Byte m_CurByte; +public: + bool Create(UInt32 bufferSize) { return m_Stream.Create(bufferSize); } + void SetStream(ISequentialOutStream *outStream) { m_Stream.SetStream(outStream); } + void ReleaseStream() { m_Stream.ReleaseStream(); } + UInt32 GetBitPosition() const { return (8 - m_BitPos); } + UInt64 GetProcessedSize() const { return m_Stream.GetProcessedSize() + (8 - m_BitPos + 7) /8; } + void Init() + { + m_Stream.Init(); + m_BitPos = 8; + m_CurByte = 0; + } + HRESULT Flush() + { + FlushByte(); + return m_Stream.Flush(); + } + void FlushByte() + { + if (m_BitPos < 8) + m_Stream.WriteByte(m_CurByte); + m_BitPos = 8; + m_CurByte = 0; + } + void WriteBits(UInt32 value, unsigned numBits) + { + while (numBits > 0) + { + if (numBits < m_BitPos) + { + m_CurByte |= (value & ((1 << numBits) - 1)) << (8 - m_BitPos); + m_BitPos -= numBits; + return; + } + numBits -= m_BitPos; + m_Stream.WriteByte((Byte)(m_CurByte | (value << (8 - m_BitPos)))); + value >>= m_BitPos; + m_BitPos = 8; + m_CurByte = 0; + } + } + void WriteByte(Byte b) { m_Stream.WriteByte(b);} +}; + +#endif diff --git a/CPP/7zip/Compress/BitmDecoder.h b/CPP/7zip/Compress/BitmDecoder.h new file mode 100644 index 0000000..4369b45 --- /dev/null +++ b/CPP/7zip/Compress/BitmDecoder.h @@ -0,0 +1,66 @@ +// BitmDecoder.h -- the Most Significant Bit of byte is First + +#ifndef __BITM_DECODER_H +#define __BITM_DECODER_H + +#include "../IStream.h" + +namespace NBitm { + +const unsigned kNumBigValueBits = 8 * 4; +const unsigned kNumValueBytes = 3; +const unsigned kNumValueBits = 8 * kNumValueBytes; + +const UInt32 kMask = (1 << kNumValueBits) - 1; + +template +class CDecoder +{ + unsigned m_BitPos; + UInt32 m_Value; +public: + TInByte m_Stream; + bool Create(UInt32 bufferSize) { return m_Stream.Create(bufferSize); } + void SetStream(ISequentialInStream *inStream) { m_Stream.SetStream(inStream);} + void ReleaseStream() { m_Stream.ReleaseStream();} + + void Init() + { + m_Stream.Init(); + m_BitPos = kNumBigValueBits; + Normalize(); + } + + UInt64 GetProcessedSize() const { return m_Stream.GetProcessedSize() - (kNumBigValueBits - m_BitPos) / 8; } + + void Normalize() + { + for (;m_BitPos >= 8; m_BitPos -= 8) + m_Value = (m_Value << 8) | m_Stream.ReadByte(); + } + + UInt32 GetValue(unsigned numBits) const + { + // return (m_Value << m_BitPos) >> (kNumBigValueBits - numBits); + return ((m_Value >> (8 - m_BitPos)) & kMask) >> (kNumValueBits - numBits); + } + + void MovePos(unsigned numBits) + { + m_BitPos += numBits; + Normalize(); + } + + UInt32 ReadBits(unsigned numBits) + { + UInt32 res = GetValue(numBits); + MovePos(numBits); + return res; + } + + void AlignToByte() { MovePos((32 - m_BitPos) & 7); } +}; + +} + +#endif diff --git a/CPP/7zip/Compress/BitmEncoder.h b/CPP/7zip/Compress/BitmEncoder.h new file mode 100644 index 0000000..a85dbff --- /dev/null +++ b/CPP/7zip/Compress/BitmEncoder.h @@ -0,0 +1,50 @@ +// BitmEncoder.h -- the Most Significant Bit of byte is First + +#ifndef __BITM_ENCODER_H +#define __BITM_ENCODER_H + +#include "../IStream.h" + +template +class CBitmEncoder +{ + TOutByte m_Stream; + unsigned m_BitPos; + Byte m_CurByte; +public: + bool Create(UInt32 bufferSize) { return m_Stream.Create(bufferSize); } + void SetStream(ISequentialOutStream *outStream) { m_Stream.SetStream(outStream);} + void ReleaseStream() { m_Stream.ReleaseStream(); } + UInt64 GetProcessedSize() const { return m_Stream.GetProcessedSize() + (8 - m_BitPos + 7) / 8; } + void Init() + { + m_Stream.Init(); + m_BitPos = 8; + m_CurByte = 0; + } + HRESULT Flush() + { + if (m_BitPos < 8) + WriteBits(0, m_BitPos); + return m_Stream.Flush(); + } + void WriteBits(UInt32 value, unsigned numBits) + { + while (numBits > 0) + { + if (numBits < m_BitPos) + { + m_CurByte |= ((Byte)value << (m_BitPos -= numBits)); + return; + } + numBits -= m_BitPos; + UInt32 newBits = (value >> numBits); + value -= (newBits << numBits); + m_Stream.WriteByte((Byte)(m_CurByte | newBits)); + m_BitPos = 8; + m_CurByte = 0; + } + } +}; + +#endif diff --git a/CPP/7zip/Compress/BranchCoder.cpp b/CPP/7zip/Compress/BranchCoder.cpp new file mode 100644 index 0000000..4317095 --- /dev/null +++ b/CPP/7zip/Compress/BranchCoder.cpp @@ -0,0 +1,19 @@ +// BranchCoder.cpp + +#include "StdAfx.h" + +#include "BranchCoder.h" + +STDMETHODIMP CBranchConverter::Init() +{ + _bufferPos = 0; + SubInit(); + return S_OK; +} + +STDMETHODIMP_(UInt32) CBranchConverter::Filter(Byte *data, UInt32 size) +{ + UInt32 processedSize = SubFilter(data, size); + _bufferPos += processedSize; + return processedSize; +} diff --git a/CPP/7zip/Compress/BranchCoder.h b/CPP/7zip/Compress/BranchCoder.h new file mode 100644 index 0000000..0e3a5c4 --- /dev/null +++ b/CPP/7zip/Compress/BranchCoder.h @@ -0,0 +1,44 @@ +// BranchCoder.h + +#ifndef __COMPRESS_BRANCH_CODER_H +#define __COMPRESS_BRANCH_CODER_H + +#include "../../Common/MyCom.h" + +#include "../ICoder.h" + +class CBranchConverter: + public ICompressFilter, + public CMyUnknownImp +{ +protected: + UInt32 _bufferPos; + virtual void SubInit() {} + virtual UInt32 SubFilter(Byte *data, UInt32 size) = 0; +public: + MY_UNKNOWN_IMP; + STDMETHOD(Init)(); + STDMETHOD_(UInt32, Filter)(Byte *data, UInt32 size); +}; + +#define MyClassEncoderA(Name) class C ## Name: public CBranchConverter \ + { public: UInt32 SubFilter(Byte *data, UInt32 size); }; + +#define MyClassDecoderA(Name) class C ## Name: public CBranchConverter \ + { public: UInt32 SubFilter(Byte *data, UInt32 size); }; + +#define MyClassEncoderB(Name, ADD_ITEMS, ADD_INIT) class C ## Name: public CBranchConverter, public ADD_ITEMS \ + { public: UInt32 SubFilter(Byte *data, UInt32 size); ADD_INIT}; + +#define MyClassDecoderB(Name, ADD_ITEMS, ADD_INIT) class C ## Name: public CBranchConverter, public ADD_ITEMS \ + { public: UInt32 SubFilter(Byte *data, UInt32 size); ADD_INIT}; + +#define MyClassA(Name, id, subId) \ +MyClassEncoderA(Name ## _Encoder) \ +MyClassDecoderA(Name ## _Decoder) + +#define MyClassB(Name, id, subId, ADD_ITEMS, ADD_INIT) \ +MyClassEncoderB(Name ## _Encoder, ADD_ITEMS, ADD_INIT) \ +MyClassDecoderB(Name ## _Decoder, ADD_ITEMS, ADD_INIT) + +#endif diff --git a/CPP/7zip/Compress/BranchMisc.cpp b/CPP/7zip/Compress/BranchMisc.cpp new file mode 100644 index 0000000..423b723 --- /dev/null +++ b/CPP/7zip/Compress/BranchMisc.cpp @@ -0,0 +1,37 @@ +// BranchMisc.cpp + +#include "StdAfx.h" + +#include "../../../C/Bra.h" + +#include "BranchMisc.h" + +UInt32 CBC_ARM_Encoder::SubFilter(Byte *data, UInt32 size) + { return (UInt32)::ARM_Convert(data, size, _bufferPos, 1); } + +UInt32 CBC_ARM_Decoder::SubFilter(Byte *data, UInt32 size) + { return (UInt32)::ARM_Convert(data, size, _bufferPos, 0); } + +UInt32 CBC_ARMT_Encoder::SubFilter(Byte *data, UInt32 size) + { return (UInt32)::ARMT_Convert(data, size, _bufferPos, 1); } + +UInt32 CBC_ARMT_Decoder::SubFilter(Byte *data, UInt32 size) + { return (UInt32)::ARMT_Convert(data, size, _bufferPos, 0); } + +UInt32 CBC_PPC_Encoder::SubFilter(Byte *data, UInt32 size) + { return (UInt32)::PPC_Convert(data, size, _bufferPos, 1); } + +UInt32 CBC_PPC_Decoder::SubFilter(Byte *data, UInt32 size) + { return (UInt32)::PPC_Convert(data, size, _bufferPos, 0); } + +UInt32 CBC_SPARC_Encoder::SubFilter(Byte *data, UInt32 size) + { return (UInt32)::SPARC_Convert(data, size, _bufferPos, 1); } + +UInt32 CBC_SPARC_Decoder::SubFilter(Byte *data, UInt32 size) + { return (UInt32)::SPARC_Convert(data, size, _bufferPos, 0); } + +UInt32 CBC_IA64_Encoder::SubFilter(Byte *data, UInt32 size) + { return (UInt32)::IA64_Convert(data, size, _bufferPos, 1); } + +UInt32 CBC_IA64_Decoder::SubFilter(Byte *data, UInt32 size) + { return (UInt32)::IA64_Convert(data, size, _bufferPos, 0); } diff --git a/CPP/7zip/Compress/BranchMisc.h b/CPP/7zip/Compress/BranchMisc.h new file mode 100644 index 0000000..81198b2 --- /dev/null +++ b/CPP/7zip/Compress/BranchMisc.h @@ -0,0 +1,14 @@ +// BranchMisc.h + +#ifndef __COMPRESS_BRANCH_MISC_H +#define __COMPRESS_BRANCH_MISC_H + +#include "BranchCoder.h" + +MyClassA(BC_ARM, 0x05, 1) +MyClassA(BC_ARMT, 0x07, 1) +MyClassA(BC_PPC, 0x02, 5) +MyClassA(BC_SPARC, 0x08, 5) +MyClassA(BC_IA64, 0x04, 1) + +#endif diff --git a/CPP/7zip/Compress/BranchRegister.cpp b/CPP/7zip/Compress/BranchRegister.cpp new file mode 100644 index 0000000..380828c --- /dev/null +++ b/CPP/7zip/Compress/BranchRegister.cpp @@ -0,0 +1,30 @@ +// BranchRegister.cpp + +#include "StdAfx.h" + +#include "../Common/RegisterCodec.h" + +#include "BranchMisc.h" + +#define CREATE_CODEC(x) \ + static void *CreateCodec ## x() { return (void *)(ICompressFilter *)(new C ## x ## _Decoder); } \ + static void *CreateCodec ## x ## Out() { return (void *)(ICompressFilter *)(new C ## x ## _Encoder); } + +CREATE_CODEC(BC_PPC) +CREATE_CODEC(BC_IA64) +CREATE_CODEC(BC_ARM) +CREATE_CODEC(BC_ARMT) +CREATE_CODEC(BC_SPARC) + +#define METHOD_ITEM(x, id1, id2, name) { CreateCodec ## x, CreateCodec ## x ## Out, 0x03030000 + (id1 * 256) + id2, name, 1, true } + +static CCodecInfo g_CodecsInfo[] = +{ + METHOD_ITEM(BC_PPC, 0x02, 0x05, L"PPC"), + METHOD_ITEM(BC_IA64, 0x04, 1, L"IA64"), + METHOD_ITEM(BC_ARM, 0x05, 1, L"ARM"), + METHOD_ITEM(BC_ARMT, 0x07, 1, L"ARMT"), + METHOD_ITEM(BC_SPARC, 0x08, 0x05, L"SPARC") +}; + +REGISTER_CODECS(Branch) diff --git a/CPP/7zip/Compress/ByteSwap.cpp b/CPP/7zip/Compress/ByteSwap.cpp new file mode 100644 index 0000000..645b6ff --- /dev/null +++ b/CPP/7zip/Compress/ByteSwap.cpp @@ -0,0 +1,73 @@ +// ByteSwap.cpp + +#include "StdAfx.h" + +#include "../../Common/MyCom.h" + +#include "../ICoder.h" + +#include "../Common/RegisterCodec.h" + +class CByteSwap2: + public ICompressFilter, + public CMyUnknownImp +{ +public: + MY_UNKNOWN_IMP + STDMETHOD(Init)(); + STDMETHOD_(UInt32, Filter)(Byte *data, UInt32 size); +}; + +class CByteSwap4: + public ICompressFilter, + public CMyUnknownImp +{ +public: + MY_UNKNOWN_IMP + STDMETHOD(Init)(); + STDMETHOD_(UInt32, Filter)(Byte *data, UInt32 size); +}; + +STDMETHODIMP CByteSwap2::Init() { return S_OK; } + +STDMETHODIMP_(UInt32) CByteSwap2::Filter(Byte *data, UInt32 size) +{ + const UInt32 kStep = 2; + UInt32 i; + for (i = 0; i + kStep <= size; i += kStep) + { + Byte b = data[i]; + data[i] = data[i + 1]; + data[i + 1] = b; + } + return i; +} + +STDMETHODIMP CByteSwap4::Init() { return S_OK; } + +STDMETHODIMP_(UInt32) CByteSwap4::Filter(Byte *data, UInt32 size) +{ + const UInt32 kStep = 4; + UInt32 i; + for (i = 0; i + kStep <= size; i += kStep) + { + Byte b0 = data[i]; + Byte b1 = data[i + 1]; + data[i] = data[i + 3]; + data[i + 1] = data[i + 2]; + data[i + 2] = b1; + data[i + 3] = b0; + } + return i; +} + +static void *CreateCodec2() { return (void *)(ICompressFilter *)(new CByteSwap2); } +static void *CreateCodec4() { return (void *)(ICompressFilter *)(new CByteSwap4); } + +static CCodecInfo g_CodecsInfo[] = +{ + { CreateCodec2, CreateCodec2, 0x020302, L"Swap2", 1, true }, + { CreateCodec4, CreateCodec4, 0x020304, L"Swap4", 1, true } +}; + +REGISTER_CODECS(ByteSwap) diff --git a/CPP/7zip/Compress/CodecExports.cpp b/CPP/7zip/Compress/CodecExports.cpp new file mode 100644 index 0000000..4ff1c0f --- /dev/null +++ b/CPP/7zip/Compress/CodecExports.cpp @@ -0,0 +1,160 @@ +// CodecExports.cpp + +#include "StdAfx.h" + +#include "../../Common/ComTry.h" + +#include "../../Windows/PropVariant.h" + +#include "../ICoder.h" + +#include "../Common/RegisterCodec.h" + +extern unsigned int g_NumCodecs; +extern const CCodecInfo *g_Codecs[]; + +static const UInt16 kDecodeId = 0x2790; + +DEFINE_GUID(CLSID_CCodec, +0x23170F69, 0x40C1, kDecodeId, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00); + +static inline HRESULT SetPropString(const char *s, unsigned int size, PROPVARIANT *value) +{ + if ((value->bstrVal = ::SysAllocStringByteLen(s, size)) != 0) + value->vt = VT_BSTR; + return S_OK; +} + +static inline HRESULT SetPropGUID(const GUID &guid, PROPVARIANT *value) +{ + return SetPropString((const char *)&guid, sizeof(GUID), value); +} + +static HRESULT SetClassID(CMethodId id, bool encode, PROPVARIANT *value) +{ + GUID clsId = CLSID_CCodec; + for (int i = 0; i < sizeof(id); i++, id >>= 8) + clsId.Data4[i] = (Byte)(id & 0xFF); + if (encode) + clsId.Data3++; + return SetPropGUID(clsId, value); +} + +static HRESULT FindCodecClassId(const GUID *clsID, UInt32 isCoder2, bool isFilter, bool &encode, int &index) +{ + index = -1; + if (clsID->Data1 != CLSID_CCodec.Data1 || + clsID->Data2 != CLSID_CCodec.Data2 || + (clsID->Data3 & ~1) != kDecodeId) + return S_OK; + encode = (clsID->Data3 != kDecodeId); + UInt64 id = 0; + for (int j = 0; j < 8; j++) + id |= ((UInt64)clsID->Data4[j]) << (8 * j); + for (unsigned i = 0; i < g_NumCodecs; i++) + { + const CCodecInfo &codec = *g_Codecs[i]; + if (id != codec.Id || encode && !codec.CreateEncoder || !encode && !codec.CreateDecoder) + continue; + if (!isFilter && codec.IsFilter || isFilter && !codec.IsFilter || + codec.NumInStreams != 1 && !isCoder2 || codec.NumInStreams == 1 && isCoder2) + return E_NOINTERFACE; + index = i; + return S_OK; + } + return S_OK; +} + +STDAPI CreateCoder2(bool encode, UInt32 index, const GUID *iid, void **outObject) +{ + COM_TRY_BEGIN + *outObject = 0; + bool isCoder = (*iid == IID_ICompressCoder) != 0; + bool isCoder2 = (*iid == IID_ICompressCoder2) != 0; + bool isFilter = (*iid == IID_ICompressFilter) != 0; + const CCodecInfo &codec = *g_Codecs[index]; + if (!isFilter && codec.IsFilter || isFilter && !codec.IsFilter || + codec.NumInStreams != 1 && !isCoder2 || codec.NumInStreams == 1 && isCoder2) + return E_NOINTERFACE; + if (encode) + { + if (!codec.CreateEncoder) + return CLASS_E_CLASSNOTAVAILABLE; + *outObject = codec.CreateEncoder(); + } + else + { + if (!codec.CreateDecoder) + return CLASS_E_CLASSNOTAVAILABLE; + *outObject = codec.CreateDecoder(); + } + if (isCoder) + ((ICompressCoder *)*outObject)->AddRef(); + else if (isCoder2) + ((ICompressCoder2 *)*outObject)->AddRef(); + else + ((ICompressFilter *)*outObject)->AddRef(); + return S_OK; + COM_TRY_END +} + +STDAPI CreateCoder(const GUID *clsid, const GUID *iid, void **outObject) +{ + *outObject = 0; + bool isCoder = (*iid == IID_ICompressCoder) != 0; + bool isCoder2 = (*iid == IID_ICompressCoder2) != 0; + bool isFilter = (*iid == IID_ICompressFilter) != 0; + if (!isCoder && !isCoder2 && !isFilter) + return E_NOINTERFACE; + bool encode; + int codecIndex; + HRESULT res = FindCodecClassId(clsid, isCoder2, isFilter, encode, codecIndex); + if (res != S_OK) + return res; + if (codecIndex < 0) + return CLASS_E_CLASSNOTAVAILABLE; + return CreateCoder2(encode, codecIndex, iid, outObject); +} + +STDAPI GetMethodProperty(UInt32 codecIndex, PROPID propID, PROPVARIANT *value) +{ + ::VariantClear((VARIANTARG *)value); + const CCodecInfo &codec = *g_Codecs[codecIndex]; + switch(propID) + { + case NMethodPropID::kID: + { + value->uhVal.QuadPart = (UInt64)codec.Id; + value->vt = VT_UI8; + break; + } + case NMethodPropID::kName: + if ((value->bstrVal = ::SysAllocString(codec.Name)) != 0) + value->vt = VT_BSTR; + break; + case NMethodPropID::kDecoder: + if (codec.CreateDecoder) + return SetClassID(codec.Id, false, value); + break; + case NMethodPropID::kEncoder: + if (codec.CreateEncoder) + return SetClassID(codec.Id, true, value); + break; + case NMethodPropID::kInStreams: + { + if (codec.NumInStreams != 1) + { + value->vt = VT_UI4; + value->ulVal = (ULONG)codec.NumInStreams; + } + break; + } + } + return S_OK; +} + +STDAPI GetNumberOfMethods(UINT32 *numCodecs) +{ + *numCodecs = g_NumCodecs; + return S_OK; +} diff --git a/CPP/7zip/Compress/CopyCoder.cpp b/CPP/7zip/Compress/CopyCoder.cpp new file mode 100644 index 0000000..f71692a --- /dev/null +++ b/CPP/7zip/Compress/CopyCoder.cpp @@ -0,0 +1,67 @@ +// Compress/CopyCoder.cpp + +#include "StdAfx.h" + +#include "../../../C/Alloc.h" + +#include "../Common/StreamUtils.h" + +#include "CopyCoder.h" + +namespace NCompress { + +static const UInt32 kBufferSize = 1 << 17; + +CCopyCoder::~CCopyCoder() +{ + ::MidFree(_buffer); +} + +STDMETHODIMP CCopyCoder::Code(ISequentialInStream *inStream, + ISequentialOutStream *outStream, + const UInt64 * /* inSize */, const UInt64 *outSize, + ICompressProgressInfo *progress) +{ + if (_buffer == 0) + { + _buffer = (Byte *)::MidAlloc(kBufferSize); + if (_buffer == 0) + return E_OUTOFMEMORY; + } + + TotalSize = 0; + for (;;) + { + UInt32 size = kBufferSize; + if (outSize != 0) + if (size > *outSize - TotalSize) + size = (UInt32)(*outSize - TotalSize); + RINOK(inStream->Read(_buffer, size, &size)); + if (size == 0) + break; + if (outStream) + { + RINOK(WriteStream(outStream, _buffer, size)); + } + TotalSize += size; + if (progress != NULL) + { + RINOK(progress->SetRatioInfo(&TotalSize, &TotalSize)); + } + } + return S_OK; +} + +STDMETHODIMP CCopyCoder::GetInStreamProcessedSize(UInt64 *value) +{ + *value = TotalSize; + return S_OK; +} + +HRESULT CopyStream(ISequentialInStream *inStream, ISequentialOutStream *outStream, ICompressProgressInfo *progress) +{ + CMyComPtr copyCoder = new NCompress::CCopyCoder; + return copyCoder->Code(inStream, outStream, NULL, NULL, progress); +} + +} diff --git a/CPP/7zip/Compress/CopyCoder.h b/CPP/7zip/Compress/CopyCoder.h new file mode 100644 index 0000000..c5445cc --- /dev/null +++ b/CPP/7zip/Compress/CopyCoder.h @@ -0,0 +1,34 @@ +// Compress/CopyCoder.h + +#ifndef __COMPRESS_COPY_CODER_H +#define __COMPRESS_COPY_CODER_H + +#include "../../Common/MyCom.h" + +#include "../ICoder.h" + +namespace NCompress { + +class CCopyCoder: + public ICompressCoder, + public ICompressGetInStreamProcessedSize, + public CMyUnknownImp +{ + Byte *_buffer; +public: + UInt64 TotalSize; + CCopyCoder(): TotalSize(0), _buffer(0) {}; + ~CCopyCoder(); + + MY_UNKNOWN_IMP1(ICompressGetInStreamProcessedSize) + + STDMETHOD(Code)(ISequentialInStream *inStream, ISequentialOutStream *outStream, + const UInt64 *inSize, const UInt64 *outSize, ICompressProgressInfo *progress); + STDMETHOD(GetInStreamProcessedSize)(UInt64 *value); +}; + +HRESULT CopyStream(ISequentialInStream *inStream, ISequentialOutStream *outStream, ICompressProgressInfo *progress); + +} + +#endif diff --git a/CPP/7zip/Compress/CopyRegister.cpp b/CPP/7zip/Compress/CopyRegister.cpp new file mode 100644 index 0000000..efb9b9e --- /dev/null +++ b/CPP/7zip/Compress/CopyRegister.cpp @@ -0,0 +1,14 @@ +// CopyRegister.cpp + +#include "StdAfx.h" + +#include "../Common/RegisterCodec.h" + +#include "CopyCoder.h" + +static void *CreateCodec() { return (void *)(ICompressCoder *)(new NCompress::CCopyCoder); } + +static CCodecInfo g_CodecInfo = +{ CreateCodec, CreateCodec, 0x00, L"Copy", 1, false }; + +REGISTER_CODEC(Copy) diff --git a/CPP/7zip/Compress/Deflate64Register.cpp b/CPP/7zip/Compress/Deflate64Register.cpp new file mode 100644 index 0000000..509e675 --- /dev/null +++ b/CPP/7zip/Compress/Deflate64Register.cpp @@ -0,0 +1,20 @@ +// Deflate64Register.cpp + +#include "StdAfx.h" + +#include "../Common/RegisterCodec.h" + +#include "DeflateDecoder.h" + +static void *CreateCodecDeflate64() { return (void *)(ICompressCoder *)(new NCompress::NDeflate::NDecoder::CCOMCoder64); } +#if !defined(EXTRACT_ONLY) && !defined(DEFLATE_EXTRACT_ONLY) +#include "DeflateEncoder.h" +static void *CreateCodecOutDeflate64() { return (void *)(ICompressCoder *)(new NCompress::NDeflate::NEncoder::CCOMCoder64); } +#else +#define CreateCodecOutDeflate64 0 +#endif + +static CCodecInfo g_CodecInfo = + { CreateCodecDeflate64, CreateCodecOutDeflate64, 0x040109, L"Deflate64", 1, false }; + +REGISTER_CODEC(Deflate64) diff --git a/CPP/7zip/Compress/DeflateConst.h b/CPP/7zip/Compress/DeflateConst.h new file mode 100644 index 0000000..00e5ab8 --- /dev/null +++ b/CPP/7zip/Compress/DeflateConst.h @@ -0,0 +1,134 @@ +// DeflateConst.h + +#ifndef __DEFLATE_CONST_H +#define __DEFLATE_CONST_H + +namespace NCompress { +namespace NDeflate { + +const int kNumHuffmanBits = 15; + +const UInt32 kHistorySize32 = (1 << 15); +const UInt32 kHistorySize64 = (1 << 16); + +const UInt32 kDistTableSize32 = 30; +const UInt32 kDistTableSize64 = 32; + +const UInt32 kNumLenSymbols32 = 256; +const UInt32 kNumLenSymbols64 = 255; // don't change it. It must be <= 255. +const UInt32 kNumLenSymbolsMax = kNumLenSymbols32; + +const UInt32 kNumLenSlots = 29; + +const UInt32 kFixedDistTableSize = 32; +const UInt32 kFixedLenTableSize = 31; + +const UInt32 kSymbolEndOfBlock = 0x100; +const UInt32 kSymbolMatch = kSymbolEndOfBlock + 1; + +const UInt32 kMainTableSize = kSymbolMatch + kNumLenSlots; +const UInt32 kFixedMainTableSize = kSymbolMatch + kFixedLenTableSize; + +const UInt32 kLevelTableSize = 19; + +const UInt32 kTableDirectLevels = 16; +const UInt32 kTableLevelRepNumber = kTableDirectLevels; +const UInt32 kTableLevel0Number = kTableLevelRepNumber + 1; +const UInt32 kTableLevel0Number2 = kTableLevel0Number + 1; + +const UInt32 kLevelMask = 0xF; + +const Byte kLenStart32[kFixedLenTableSize] = + {0,1,2,3,4,5,6,7,8,10,12,14,16,20,24,28,32,40,48,56,64,80,96,112,128,160,192,224, 255, 0, 0}; +const Byte kLenStart64[kFixedLenTableSize] = + {0,1,2,3,4,5,6,7,8,10,12,14,16,20,24,28,32,40,48,56,64,80,96,112,128,160,192,224, 0, 0, 0}; + +const Byte kLenDirectBits32[kFixedLenTableSize] = + {0,0,0,0,0,0,0,0,1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0, 0, 0}; +const Byte kLenDirectBits64[kFixedLenTableSize] = + {0,0,0,0,0,0,0,0,1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 16, 0, 0}; + +const UInt32 kDistStart[kDistTableSize64] = + {0,1,2,3,4,6,8,12,16,24,32,48,64,96,128,192,256,384,512,768, + 1024,1536,2048,3072,4096,6144,8192,12288,16384,24576,32768,49152}; +const Byte kDistDirectBits[kDistTableSize64] = + {0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,14,14}; + +const Byte kLevelDirectBits[3] = {2, 3, 7}; + +const Byte kCodeLengthAlphabetOrder[kLevelTableSize] = {16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15}; + +const UInt32 kMatchMinLen = 3; +const UInt32 kMatchMaxLen32 = kNumLenSymbols32 + kMatchMinLen - 1; //256 + 2 +const UInt32 kMatchMaxLen64 = kNumLenSymbols64 + kMatchMinLen - 1; //255 + 2 +const UInt32 kMatchMaxLen = kMatchMaxLen32; + +const int kFinalBlockFieldSize = 1; + +namespace NFinalBlockField +{ + enum + { + kNotFinalBlock = 0, + kFinalBlock = 1 + }; +} + +const int kBlockTypeFieldSize = 2; + +namespace NBlockType +{ + enum + { + kStored = 0, + kFixedHuffman = 1, + kDynamicHuffman = 2 + }; +} + +const int kNumLenCodesFieldSize = 5; +const int kNumDistCodesFieldSize = 5; +const int kNumLevelCodesFieldSize = 4; + +const UInt32 kNumLitLenCodesMin = 257; +const UInt32 kNumDistCodesMin = 1; +const UInt32 kNumLevelCodesMin = 4; + +const int kLevelFieldSize = 3; + +const int kStoredBlockLengthFieldSize = 16; + +struct CLevels +{ + Byte litLenLevels[kFixedMainTableSize]; + Byte distLevels[kFixedDistTableSize]; + + void SubClear() + { + UInt32 i; + for(i = kNumLitLenCodesMin; i < kFixedMainTableSize; i++) + litLenLevels[i] = 0; + for(i = 0; i < kFixedDistTableSize; i++) + distLevels[i] = 0; + } + + void SetFixedLevels() + { + int i; + + for (i = 0; i < 144; i++) + litLenLevels[i] = 8; + for (; i < 256; i++) + litLenLevels[i] = 9; + for (; i < 280; i++) + litLenLevels[i] = 7; + for (; i < 288; i++) + litLenLevels[i] = 8; + for (i = 0; i < kFixedDistTableSize; i++) // test it: InfoZip only uses kDistTableSize + distLevels[i] = 5; + } +}; + +}} + +#endif diff --git a/CPP/7zip/Compress/DeflateDecoder.cpp b/CPP/7zip/Compress/DeflateDecoder.cpp new file mode 100644 index 0000000..2848cd8 --- /dev/null +++ b/CPP/7zip/Compress/DeflateDecoder.cpp @@ -0,0 +1,353 @@ +// DeflateDecoder.cpp + +#include "StdAfx.h" + +#include "DeflateDecoder.h" + +namespace NCompress { +namespace NDeflate { +namespace NDecoder { + +static const int kLenIdFinished = -1; +static const int kLenIdNeedInit = -2; + +CCoder::CCoder(bool deflate64Mode, bool deflateNSIS): + _deflate64Mode(deflate64Mode), + _deflateNSIS(deflateNSIS), + _keepHistory(false), + _needInitInStream(true), + ZlibMode(false) {} + +UInt32 CCoder::ReadBits(int numBits) +{ + return m_InBitStream.ReadBits(numBits); +} + +bool CCoder::DeCodeLevelTable(Byte *values, int numSymbols) +{ + int i = 0; + do + { + UInt32 number = m_LevelDecoder.DecodeSymbol(&m_InBitStream); + if (number < kTableDirectLevels) + values[i++] = (Byte)number; + else if (number < kLevelTableSize) + { + if (number == kTableLevelRepNumber) + { + if (i == 0) + return false; + int num = ReadBits(2) + 3; + for (; num > 0 && i < numSymbols; num--, i++) + values[i] = values[i - 1]; + } + else + { + int num; + if (number == kTableLevel0Number) + num = ReadBits(3) + 3; + else + num = ReadBits(7) + 11; + for (;num > 0 && i < numSymbols; num--) + values[i++] = 0; + } + } + else + return false; + } + while(i < numSymbols); + return true; +} + +#define RIF(x) { if (!(x)) return false; } + +bool CCoder::ReadTables(void) +{ + m_FinalBlock = (ReadBits(kFinalBlockFieldSize) == NFinalBlockField::kFinalBlock); + UInt32 blockType = ReadBits(kBlockTypeFieldSize); + if (blockType > NBlockType::kDynamicHuffman) + return false; + + if (blockType == NBlockType::kStored) + { + m_StoredMode = true; + m_InBitStream.AlignToByte(); + m_StoredBlockSize = ReadBits(kStoredBlockLengthFieldSize); + if (_deflateNSIS) + return true; + return (m_StoredBlockSize == (UInt16)~ReadBits(kStoredBlockLengthFieldSize)); + } + + m_StoredMode = false; + + CLevels levels; + if (blockType == NBlockType::kFixedHuffman) + { + levels.SetFixedLevels(); + _numDistLevels = _deflate64Mode ? kDistTableSize64 : kDistTableSize32; + } + else + { + int numLitLenLevels = ReadBits(kNumLenCodesFieldSize) + kNumLitLenCodesMin; + _numDistLevels = ReadBits(kNumDistCodesFieldSize) + kNumDistCodesMin; + int numLevelCodes = ReadBits(kNumLevelCodesFieldSize) + kNumLevelCodesMin; + + if (!_deflate64Mode) + if (_numDistLevels > kDistTableSize32) + return false; + + Byte levelLevels[kLevelTableSize]; + for (int i = 0; i < kLevelTableSize; i++) + { + int position = kCodeLengthAlphabetOrder[i]; + if(i < numLevelCodes) + levelLevels[position] = (Byte)ReadBits(kLevelFieldSize); + else + levelLevels[position] = 0; + } + + RIF(m_LevelDecoder.SetCodeLengths(levelLevels)); + + Byte tmpLevels[kFixedMainTableSize + kFixedDistTableSize]; + if (!DeCodeLevelTable(tmpLevels, numLitLenLevels + _numDistLevels)) + return false; + + levels.SubClear(); + memcpy(levels.litLenLevels, tmpLevels, numLitLenLevels); + memcpy(levels.distLevels, tmpLevels + numLitLenLevels, _numDistLevels); + } + RIF(m_MainDecoder.SetCodeLengths(levels.litLenLevels)); + return m_DistDecoder.SetCodeLengths(levels.distLevels); +} + +HRESULT CCoder::CodeSpec(UInt32 curSize) +{ + if (_remainLen == kLenIdFinished) + return S_OK; + if (_remainLen == kLenIdNeedInit) + { + if (!_keepHistory) + if (!m_OutWindowStream.Create(_deflate64Mode ? kHistorySize64: kHistorySize32)) + return E_OUTOFMEMORY; + RINOK(InitInStream(_needInitInStream)); + m_OutWindowStream.Init(_keepHistory); + m_FinalBlock = false; + _remainLen = 0; + _needReadTable = true; + } + + if (curSize == 0) + return S_OK; + + while(_remainLen > 0 && curSize > 0) + { + _remainLen--; + Byte b = m_OutWindowStream.GetByte(_rep0); + m_OutWindowStream.PutByte(b); + curSize--; + } + + while(curSize > 0) + { + if (_needReadTable) + { + if (m_FinalBlock) + { + _remainLen = kLenIdFinished; + break; + } + if (!ReadTables()) + return S_FALSE; + _needReadTable = false; + } + + if(m_StoredMode) + { + for (; m_StoredBlockSize > 0 && curSize > 0; m_StoredBlockSize--, curSize--) + m_OutWindowStream.PutByte(m_InBitStream.ReadByte()); + _needReadTable = (m_StoredBlockSize == 0); + continue; + } + while(curSize > 0) + { + if (m_InBitStream.NumExtraBytes > 4) + return S_FALSE; + + UInt32 number = m_MainDecoder.DecodeSymbol(&m_InBitStream); + if (number < 0x100) + { + m_OutWindowStream.PutByte((Byte)number); + curSize--; + continue; + } + else if (number == kSymbolEndOfBlock) + { + _needReadTable = true; + break; + } + else if (number < kMainTableSize) + { + number -= kSymbolMatch; + UInt32 len; + { + int numBits; + if (_deflate64Mode) + { + len = kLenStart64[number]; + numBits = kLenDirectBits64[number]; + } + else + { + len = kLenStart32[number]; + numBits = kLenDirectBits32[number]; + } + len += kMatchMinLen + m_InBitStream.ReadBits(numBits); + } + UInt32 locLen = len; + if (locLen > curSize) + locLen = (UInt32)curSize; + number = m_DistDecoder.DecodeSymbol(&m_InBitStream); + if (number >= _numDistLevels) + return S_FALSE; + UInt32 distance = kDistStart[number] + m_InBitStream.ReadBits(kDistDirectBits[number]); + if (!m_OutWindowStream.CopyBlock(distance, locLen)) + return S_FALSE; + curSize -= locLen; + len -= locLen; + if (len != 0) + { + _remainLen = (Int32)len; + _rep0 = distance; + break; + } + } + else + return S_FALSE; + } + } + return S_OK; +} + +#ifdef _NO_EXCEPTIONS + +#define DEFLATE_TRY_BEGIN +#define DEFLATE_TRY_END + +#else + +#define DEFLATE_TRY_BEGIN try { +#define DEFLATE_TRY_END } \ + catch(const CInBufferException &e) { return e.ErrorCode; } \ + catch(const CLzOutWindowException &e) { return e.ErrorCode; } \ + catch(...) { return S_FALSE; } + +#endif + +HRESULT CCoder::CodeReal(ISequentialOutStream *outStream, + const UInt64 *outSize, ICompressProgressInfo *progress) +{ + DEFLATE_TRY_BEGIN + m_OutWindowStream.SetStream(outStream); + CCoderReleaser flusher(this); + + const UInt64 inStart = _needInitInStream ? 0 : m_InBitStream.GetProcessedSize(); + const UInt64 start = m_OutWindowStream.GetProcessedSize(); + for (;;) + { + UInt32 curSize = 1 << 18; + if (outSize != 0) + { + const UInt64 rem = *outSize - (m_OutWindowStream.GetProcessedSize() - start); + if (curSize > rem) + curSize = (UInt32)rem; + } + if (curSize == 0) + break; + RINOK(CodeSpec(curSize)); + if (_remainLen == kLenIdFinished) + break; + if (progress != NULL) + { + const UInt64 inSize = m_InBitStream.GetProcessedSize() - inStart; + const UInt64 nowPos64 = m_OutWindowStream.GetProcessedSize() - start; + RINOK(progress->SetRatioInfo(&inSize, &nowPos64)); + } + } + if (_remainLen == kLenIdFinished && ZlibMode) + { + m_InBitStream.AlignToByte(); + for (int i = 0; i < 4; i++) + ZlibFooter[i] = m_InBitStream.ReadByte(); + } + flusher.NeedFlush = false; + HRESULT res = Flush(); + if (res == S_OK && InputEofError()) + return S_FALSE; + return res; + DEFLATE_TRY_END +} + +HRESULT CCoder::Code(ISequentialInStream *inStream, ISequentialOutStream *outStream, + const UInt64 * /* inSize */, const UInt64 *outSize, ICompressProgressInfo *progress) +{ + SetInStream(inStream); + SetOutStreamSize(outSize); + HRESULT res = CodeReal(outStream, outSize, progress); + ReleaseInStream(); + return res; +} + +STDMETHODIMP CCoder::GetInStreamProcessedSize(UInt64 *value) +{ + if (value == NULL) + return E_INVALIDARG; + *value = m_InBitStream.GetProcessedSize(); + return S_OK; +} + +STDMETHODIMP CCoder::SetInStream(ISequentialInStream *inStream) +{ + m_InBitStream.SetStream(inStream); + return S_OK; +} + +STDMETHODIMP CCoder::ReleaseInStream() +{ + m_InBitStream.ReleaseStream(); + return S_OK; +} + +STDMETHODIMP CCoder::SetOutStreamSize(const UInt64 * /* outSize */) +{ + _remainLen = kLenIdNeedInit; + _needInitInStream = true; + m_OutWindowStream.Init(_keepHistory); + return S_OK; +} + +#ifndef NO_READ_FROM_CODER + +STDMETHODIMP CCoder::Read(void *data, UInt32 size, UInt32 *processedSize) +{ + DEFLATE_TRY_BEGIN + if (processedSize) + *processedSize = 0; + const UInt64 startPos = m_OutWindowStream.GetProcessedSize(); + m_OutWindowStream.SetMemStream((Byte *)data); + RINOK(CodeSpec(size)); + if (processedSize) + *processedSize = (UInt32)(m_OutWindowStream.GetProcessedSize() - startPos); + return Flush(); + DEFLATE_TRY_END +} + +#endif + +STDMETHODIMP CCoder::CodeResume(ISequentialOutStream *outStream, const UInt64 *outSize, ICompressProgressInfo *progress) +{ + _remainLen = kLenIdNeedInit; + m_OutWindowStream.Init(_keepHistory); + return CodeReal(outStream, outSize, progress); +} + +}}} diff --git a/CPP/7zip/Compress/DeflateDecoder.h b/CPP/7zip/Compress/DeflateDecoder.h new file mode 100644 index 0000000..56ab2be --- /dev/null +++ b/CPP/7zip/Compress/DeflateDecoder.h @@ -0,0 +1,157 @@ +// DeflateDecoder.h + +#ifndef __DEFLATE_DECODER_H +#define __DEFLATE_DECODER_H + +#include "../../Common/MyCom.h" + +#include "../ICoder.h" + +#include "../Common/InBuffer.h" + +#include "BitlDecoder.h" +#include "DeflateConst.h" +#include "HuffmanDecoder.h" +#include "LzOutWindow.h" + +namespace NCompress { +namespace NDeflate { +namespace NDecoder { + +class CCoder: + public ICompressCoder, + public ICompressGetInStreamProcessedSize, + #ifndef NO_READ_FROM_CODER + public ICompressSetInStream, + public ICompressSetOutStreamSize, + public ISequentialInStream, + #endif + public CMyUnknownImp +{ + CLzOutWindow m_OutWindowStream; + NBitl::CDecoder m_InBitStream; + NCompress::NHuffman::CDecoder m_MainDecoder; + NCompress::NHuffman::CDecoder m_DistDecoder; + NCompress::NHuffman::CDecoder m_LevelDecoder; + + UInt32 m_StoredBlockSize; + + bool m_FinalBlock; + bool m_StoredMode; + UInt32 _numDistLevels; + + + bool _deflateNSIS; + bool _deflate64Mode; + bool _keepHistory; + bool _needInitInStream; + Int32 _remainLen; + UInt32 _rep0; + bool _needReadTable; + + UInt32 ReadBits(int numBits); + + bool DeCodeLevelTable(Byte *values, int numSymbols); + bool ReadTables(); + + HRESULT Flush() { return m_OutWindowStream.Flush(); } + class CCoderReleaser + { + CCoder *_coder; + public: + bool NeedFlush; + CCoderReleaser(CCoder *coder): _coder(coder), NeedFlush(true) {} + ~CCoderReleaser() + { + if (NeedFlush) + _coder->Flush(); + _coder->ReleaseOutStream(); + } + }; + friend class CCoderReleaser; + + HRESULT CodeSpec(UInt32 curSize); +public: + bool ZlibMode; + Byte ZlibFooter[4]; + + CCoder(bool deflate64Mode, bool deflateNSIS = false); + virtual ~CCoder() {}; + + void SetKeepHistory(bool keepHistory) { _keepHistory = keepHistory; } + + void ReleaseOutStream() + { + m_OutWindowStream.ReleaseStream(); + } + + HRESULT CodeReal(ISequentialOutStream *outStream, + const UInt64 *outSize, ICompressProgressInfo *progress); + + #ifndef NO_READ_FROM_CODER + MY_UNKNOWN_IMP4( + ICompressGetInStreamProcessedSize, + ICompressSetInStream, + ICompressSetOutStreamSize, + ISequentialInStream + ) + #else + MY_UNKNOWN_IMP1( + ICompressGetInStreamProcessedSize) + #endif + + STDMETHOD(Code)(ISequentialInStream *inStream, ISequentialOutStream *outStream, + const UInt64 *inSize, const UInt64 *outSize, ICompressProgressInfo *progress); + + STDMETHOD(SetInStream)(ISequentialInStream *inStream); + STDMETHOD(ReleaseInStream)(); + STDMETHOD(SetOutStreamSize)(const UInt64 *outSize); + + #ifndef NO_READ_FROM_CODER + STDMETHOD(Read)(void *data, UInt32 size, UInt32 *processedSize); + #endif + + STDMETHOD(CodeResume)(ISequentialOutStream *outStream, const UInt64 *outSize, ICompressProgressInfo *progress); + + HRESULT InitInStream(bool needInit) + { + if (!m_InBitStream.Create(1 << 17)) + return E_OUTOFMEMORY; + if (needInit) + { + m_InBitStream.Init(); + _needInitInStream = false; + } + return S_OK; + } + + void AlignToByte() { m_InBitStream.AlignToByte(); } + Byte ReadByte() { return (Byte)m_InBitStream.ReadBits(8); } + bool InputEofError() const { return m_InBitStream.ExtraBitsWereRead(); } + UInt64 GetInputProcessedSize() const { return m_InBitStream.GetProcessedSize(); } + + // IGetInStreamProcessedSize + STDMETHOD(GetInStreamProcessedSize)(UInt64 *value); +}; + +class CCOMCoder : public CCoder +{ +public: + CCOMCoder(): CCoder(false) {} +}; + +class CNsisCOMCoder : public CCoder +{ +public: + CNsisCOMCoder(): CCoder(false, true) {} +}; + +class CCOMCoder64 : public CCoder +{ +public: + CCOMCoder64(): CCoder(true) {} +}; + +}}} + +#endif diff --git a/CPP/7zip/Compress/DeflateEncoder.cpp b/CPP/7zip/Compress/DeflateEncoder.cpp new file mode 100644 index 0000000..35a81ca --- /dev/null +++ b/CPP/7zip/Compress/DeflateEncoder.cpp @@ -0,0 +1,986 @@ +// DeflateEncoder.cpp + +#include "StdAfx.h" + +#include "../../../C/Alloc.h" +#include "../../../C/HuffEnc.h" + +#include "Common/ComTry.h" + +#include "DeflateEncoder.h" + +#undef NO_INLINE + +#ifdef _MSC_VER +#define NO_INLINE MY_NO_INLINE +#else +#define NO_INLINE +#endif + +namespace NCompress { +namespace NDeflate { +namespace NEncoder { + +const int kNumDivPassesMax = 10; // [0, 16); ratio/speed/ram tradeoff; use big value for better compression ratio. +const UInt32 kNumTables = (1 << kNumDivPassesMax); + +static UInt32 kFixedHuffmanCodeBlockSizeMax = (1 << 8); // [0, (1 << 32)); ratio/speed tradeoff; use big value for better compression ratio. +static UInt32 kDivideCodeBlockSizeMin = (1 << 7); // [1, (1 << 32)); ratio/speed tradeoff; use small value for better compression ratio. +static UInt32 kDivideBlockSizeMin = (1 << 6); // [1, (1 << 32)); ratio/speed tradeoff; use small value for better compression ratio. + +static const UInt32 kMaxUncompressedBlockSize = ((1 << 16) - 1) * 1; // [1, (1 << 32)) +static const UInt32 kMatchArraySize = kMaxUncompressedBlockSize * 10; // [kMatchMaxLen * 2, (1 << 32)) +static const UInt32 kMatchArrayLimit = kMatchArraySize - kMatchMaxLen * 4 * sizeof(UInt16); +static const UInt32 kBlockUncompressedSizeThreshold = kMaxUncompressedBlockSize - + kMatchMaxLen - kNumOpts; + +static const int kMaxCodeBitLength = 11; +static const int kMaxLevelBitLength = 7; + +static Byte kNoLiteralStatPrice = 11; +static Byte kNoLenStatPrice = 11; +static Byte kNoPosStatPrice = 6; + +static Byte g_LenSlots[kNumLenSymbolsMax]; +static Byte g_FastPos[1 << 9]; + +class CFastPosInit +{ +public: + CFastPosInit() + { + int i; + for(i = 0; i < kNumLenSlots; i++) + { + int c = kLenStart32[i]; + int j = 1 << kLenDirectBits32[i]; + for(int k = 0; k < j; k++, c++) + g_LenSlots[c] = (Byte)i; + } + + const int kFastSlots = 18; + int c = 0; + for (Byte slotFast = 0; slotFast < kFastSlots; slotFast++) + { + UInt32 k = (1 << kDistDirectBits[slotFast]); + for (UInt32 j = 0; j < k; j++, c++) + g_FastPos[c] = slotFast; + } + } +}; + +static CFastPosInit g_FastPosInit; + + +inline UInt32 GetPosSlot(UInt32 pos) +{ + if (pos < 0x200) + return g_FastPos[pos]; + return g_FastPos[pos >> 8] + 16; +} + +static void *SzAlloc(void *p, size_t size) { p = p; return MyAlloc(size); } +static void SzFree(void *p, void *address) { p = p; MyFree(address); } +static ISzAlloc g_Alloc = { SzAlloc, SzFree }; + +CCoder::CCoder(bool deflate64Mode): + m_Deflate64Mode(deflate64Mode), + m_NumPasses(1), + m_NumDivPasses(1), + m_NumFastBytes(32), + _fastMode(false), + _btMode(true), + m_OnePosMatchesMemory(0), + m_DistanceMemory(0), + m_Created(false), + m_Values(0), + m_Tables(0), + m_MatchFinderCycles(0) + // m_SetMfPasses(0) +{ + m_MatchMaxLen = deflate64Mode ? kMatchMaxLen64 : kMatchMaxLen32; + m_NumLenCombinations = deflate64Mode ? kNumLenSymbols64 : kNumLenSymbols32; + m_LenStart = deflate64Mode ? kLenStart64 : kLenStart32; + m_LenDirectBits = deflate64Mode ? kLenDirectBits64 : kLenDirectBits32; + MatchFinder_Construct(&_lzInWindow); +} + +HRESULT CCoder::Create() +{ + COM_TRY_BEGIN + if (m_Values == 0) + { + m_Values = (CCodeValue *)MyAlloc((kMaxUncompressedBlockSize) * sizeof(CCodeValue)); + if (m_Values == 0) + return E_OUTOFMEMORY; + } + if (m_Tables == 0) + { + m_Tables = (CTables *)MyAlloc((kNumTables) * sizeof(CTables)); + if (m_Tables == 0) + return E_OUTOFMEMORY; + } + + if (m_IsMultiPass) + { + if (m_OnePosMatchesMemory == 0) + { + m_OnePosMatchesMemory = (UInt16 *)::MidAlloc(kMatchArraySize * sizeof(UInt16)); + if (m_OnePosMatchesMemory == 0) + return E_OUTOFMEMORY; + } + } + else + { + if (m_DistanceMemory == 0) + { + m_DistanceMemory = (UInt16 *)MyAlloc((kMatchMaxLen + 2) * 2 * sizeof(UInt16)); + if (m_DistanceMemory == 0) + return E_OUTOFMEMORY; + m_MatchDistances = m_DistanceMemory; + } + } + + if (!m_Created) + { + _lzInWindow.btMode = _btMode ? 1 : 0; + _lzInWindow.numHashBytes = 3; + if (!MatchFinder_Create(&_lzInWindow, + m_Deflate64Mode ? kHistorySize64 : kHistorySize32, + kNumOpts + kMaxUncompressedBlockSize, + m_NumFastBytes, m_MatchMaxLen - m_NumFastBytes, &g_Alloc)) + return E_OUTOFMEMORY; + if (!m_OutStream.Create(1 << 20)) + return E_OUTOFMEMORY; + } + if (m_MatchFinderCycles != 0) + _lzInWindow.cutValue = m_MatchFinderCycles; + m_Created = true; + return S_OK; + COM_TRY_END +} + +HRESULT CCoder::BaseSetEncoderProperties2(const PROPID *propIDs, const PROPVARIANT *props, UInt32 numProps) +{ + for (UInt32 i = 0; i < numProps; i++) + { + const PROPVARIANT &prop = props[i]; + switch(propIDs[i]) + { + case NCoderPropID::kNumPasses: + if (prop.vt != VT_UI4) + return E_INVALIDARG; + m_NumDivPasses = prop.ulVal; + if (m_NumDivPasses == 0) + m_NumDivPasses = 1; + if (m_NumDivPasses == 1) + m_NumPasses = 1; + else if (m_NumDivPasses <= kNumDivPassesMax) + m_NumPasses = 2; + else + { + m_NumPasses = 2 + (m_NumDivPasses - kNumDivPassesMax); + m_NumDivPasses = kNumDivPassesMax; + } + break; + case NCoderPropID::kNumFastBytes: + if (prop.vt != VT_UI4) + return E_INVALIDARG; + m_NumFastBytes = prop.ulVal; + if(m_NumFastBytes < kMatchMinLen || m_NumFastBytes > m_MatchMaxLen) + return E_INVALIDARG; + break; + case NCoderPropID::kMatchFinderCycles: + { + if (prop.vt != VT_UI4) + return E_INVALIDARG; + m_MatchFinderCycles = prop.ulVal; + break; + } + case NCoderPropID::kAlgorithm: + { + if (prop.vt != VT_UI4) + return E_INVALIDARG; + UInt32 maximize = prop.ulVal; + _fastMode = (maximize == 0); + _btMode = !_fastMode; + break; + } + default: + return E_INVALIDARG; + } + } + return S_OK; +} + +void CCoder::Free() +{ + ::MidFree(m_OnePosMatchesMemory); m_OnePosMatchesMemory = 0; + ::MyFree(m_DistanceMemory); m_DistanceMemory = 0; + ::MyFree(m_Values); m_Values = 0; + ::MyFree(m_Tables); m_Tables = 0; +} + +CCoder::~CCoder() +{ + Free(); + MatchFinder_Free(&_lzInWindow, &g_Alloc); +} + +NO_INLINE void CCoder::GetMatches() +{ + if (m_IsMultiPass) + { + m_MatchDistances = m_OnePosMatchesMemory + m_Pos; + if (m_SecondPass) + { + m_Pos += *m_MatchDistances + 1; + return; + } + } + + UInt32 distanceTmp[kMatchMaxLen * 2 + 3]; + + UInt32 numPairs = (_btMode) ? + Bt3Zip_MatchFinder_GetMatches(&_lzInWindow, distanceTmp): + Hc3Zip_MatchFinder_GetMatches(&_lzInWindow, distanceTmp); + + *m_MatchDistances = (UInt16)numPairs; + + if (numPairs > 0) + { + UInt32 i; + for(i = 0; i < numPairs; i += 2) + { + m_MatchDistances[i + 1] = (UInt16)distanceTmp[i]; + m_MatchDistances[i + 2] = (UInt16)distanceTmp[i + 1]; + } + UInt32 len = distanceTmp[numPairs - 2]; + if (len == m_NumFastBytes && m_NumFastBytes != m_MatchMaxLen) + { + UInt32 numAvail = Inline_MatchFinder_GetNumAvailableBytes(&_lzInWindow) + 1; + const Byte *pby = Inline_MatchFinder_GetPointerToCurrentPos(&_lzInWindow) - 1; + const Byte *pby2 = pby - (distanceTmp[numPairs - 1] + 1); + if (numAvail > m_MatchMaxLen) + numAvail = m_MatchMaxLen; + for (; len < numAvail && pby[len] == pby2[len]; len++); + m_MatchDistances[i - 1] = (UInt16)len; + } + } + if (m_IsMultiPass) + m_Pos += numPairs + 1; + if (!m_SecondPass) + m_AdditionalOffset++; +} + +void CCoder::MovePos(UInt32 num) +{ + if (!m_SecondPass && num > 0) + { + if (_btMode) + Bt3Zip_MatchFinder_Skip(&_lzInWindow, num); + else + Hc3Zip_MatchFinder_Skip(&_lzInWindow, num); + m_AdditionalOffset += num; + } +} + +static const UInt32 kIfinityPrice = 0xFFFFFFF; + +NO_INLINE UInt32 CCoder::Backward(UInt32 &backRes, UInt32 cur) +{ + m_OptimumEndIndex = cur; + UInt32 posMem = m_Optimum[cur].PosPrev; + UInt16 backMem = m_Optimum[cur].BackPrev; + do + { + UInt32 posPrev = posMem; + UInt16 backCur = backMem; + backMem = m_Optimum[posPrev].BackPrev; + posMem = m_Optimum[posPrev].PosPrev; + m_Optimum[posPrev].BackPrev = backCur; + m_Optimum[posPrev].PosPrev = (UInt16)cur; + cur = posPrev; + } + while(cur > 0); + backRes = m_Optimum[0].BackPrev; + m_OptimumCurrentIndex = m_Optimum[0].PosPrev; + return m_OptimumCurrentIndex; +} + +NO_INLINE UInt32 CCoder::GetOptimal(UInt32 &backRes) +{ + if(m_OptimumEndIndex != m_OptimumCurrentIndex) + { + UInt32 len = m_Optimum[m_OptimumCurrentIndex].PosPrev - m_OptimumCurrentIndex; + backRes = m_Optimum[m_OptimumCurrentIndex].BackPrev; + m_OptimumCurrentIndex = m_Optimum[m_OptimumCurrentIndex].PosPrev; + return len; + } + m_OptimumCurrentIndex = m_OptimumEndIndex = 0; + + GetMatches(); + + UInt32 numDistancePairs = m_MatchDistances[0]; + if(numDistancePairs == 0) + return 1; + + const UInt16 *matchDistances = m_MatchDistances + 1; + UInt32 lenMain = matchDistances[numDistancePairs - 2]; + + if(lenMain > m_NumFastBytes) + { + backRes = matchDistances[numDistancePairs - 1]; + MovePos(lenMain - 1); + return lenMain; + } + m_Optimum[1].Price = m_LiteralPrices[Inline_MatchFinder_GetIndexByte(&_lzInWindow, 0 - m_AdditionalOffset)]; + m_Optimum[1].PosPrev = 0; + + m_Optimum[2].Price = kIfinityPrice; + m_Optimum[2].PosPrev = 1; + + + UInt32 offs = 0; + for(UInt32 i = kMatchMinLen; i <= lenMain; i++) + { + UInt32 distance = matchDistances[offs + 1]; + m_Optimum[i].PosPrev = 0; + m_Optimum[i].BackPrev = (UInt16)distance; + m_Optimum[i].Price = m_LenPrices[i - kMatchMinLen] + m_PosPrices[GetPosSlot(distance)]; + if (i == matchDistances[offs]) + offs += 2; + } + + UInt32 cur = 0; + UInt32 lenEnd = lenMain; + for (;;) + { + ++cur; + if(cur == lenEnd || cur == kNumOptsBase || m_Pos >= kMatchArrayLimit) + return Backward(backRes, cur); + GetMatches(); + matchDistances = m_MatchDistances + 1; + + UInt32 numDistancePairs = m_MatchDistances[0]; + UInt32 newLen = 0; + if(numDistancePairs != 0) + { + newLen = matchDistances[numDistancePairs - 2]; + if(newLen > m_NumFastBytes) + { + UInt32 len = Backward(backRes, cur); + m_Optimum[cur].BackPrev = matchDistances[numDistancePairs - 1]; + m_OptimumEndIndex = cur + newLen; + m_Optimum[cur].PosPrev = (UInt16)m_OptimumEndIndex; + MovePos(newLen - 1); + return len; + } + } + UInt32 curPrice = m_Optimum[cur].Price; + UInt32 curAnd1Price = curPrice + m_LiteralPrices[Inline_MatchFinder_GetIndexByte(&_lzInWindow, cur - m_AdditionalOffset)]; + COptimal &optimum = m_Optimum[cur + 1]; + if (curAnd1Price < optimum.Price) + { + optimum.Price = curAnd1Price; + optimum.PosPrev = (UInt16)cur; + } + if(numDistancePairs == 0) + continue; + while(lenEnd < cur + newLen) + m_Optimum[++lenEnd].Price = kIfinityPrice; + offs = 0; + UInt32 distance = matchDistances[offs + 1]; + curPrice += m_PosPrices[GetPosSlot(distance)]; + for(UInt32 lenTest = kMatchMinLen; ; lenTest++) + { + UInt32 curAndLenPrice = curPrice + m_LenPrices[lenTest - kMatchMinLen]; + COptimal &optimum = m_Optimum[cur + lenTest]; + if (curAndLenPrice < optimum.Price) + { + optimum.Price = curAndLenPrice; + optimum.PosPrev = (UInt16)cur; + optimum.BackPrev = (UInt16)distance; + } + if (lenTest == matchDistances[offs]) + { + offs += 2; + if (offs == numDistancePairs) + break; + curPrice -= m_PosPrices[GetPosSlot(distance)]; + distance = matchDistances[offs + 1]; + curPrice += m_PosPrices[GetPosSlot(distance)]; + } + } + } +} + +UInt32 CCoder::GetOptimalFast(UInt32 &backRes) +{ + GetMatches(); + UInt32 numDistancePairs = m_MatchDistances[0]; + if (numDistancePairs == 0) + return 1; + UInt32 lenMain = m_MatchDistances[numDistancePairs - 1]; + backRes = m_MatchDistances[numDistancePairs]; + MovePos(lenMain - 1); + return lenMain; +} + +void CTables::InitStructures() +{ + UInt32 i; + for(i = 0; i < 256; i++) + litLenLevels[i] = 8; + litLenLevels[i++] = 13; + for(;i < kFixedMainTableSize; i++) + litLenLevels[i] = 5; + for(i = 0; i < kFixedDistTableSize; i++) + distLevels[i] = 5; +} + +NO_INLINE void CCoder::LevelTableDummy(const Byte *levels, int numLevels, UInt32 *freqs) +{ + int prevLen = 0xFF; + int nextLen = levels[0]; + int count = 0; + int maxCount = 7; + int minCount = 4; + if (nextLen == 0) + { + maxCount = 138; + minCount = 3; + } + for (int n = 0; n < numLevels; n++) + { + int curLen = nextLen; + nextLen = (n < numLevels - 1) ? levels[n + 1] : 0xFF; + count++; + if (count < maxCount && curLen == nextLen) + continue; + + if (count < minCount) + freqs[curLen] += (UInt32)count; + else if (curLen != 0) + { + if (curLen != prevLen) + { + freqs[curLen]++; + count--; + } + freqs[kTableLevelRepNumber]++; + } + else if (count <= 10) + freqs[kTableLevel0Number]++; + else + freqs[kTableLevel0Number2]++; + + count = 0; + prevLen = curLen; + + if (nextLen == 0) + { + maxCount = 138; + minCount = 3; + } + else if (curLen == nextLen) + { + maxCount = 6; + minCount = 3; + } + else + { + maxCount = 7; + minCount = 4; + } + } +} + +NO_INLINE void CCoder::WriteBits(UInt32 value, int numBits) +{ + m_OutStream.WriteBits(value, numBits); +} + +#define WRITE_HF2(codes, lens, i) m_OutStream.WriteBits(codes[i], lens[i]) +#define WRITE_HF(i) WriteBits(codes[i], lens[i]) + +NO_INLINE void CCoder::LevelTableCode(const Byte *levels, int numLevels, const Byte *lens, const UInt32 *codes) +{ + int prevLen = 0xFF; + int nextLen = levels[0]; + int count = 0; + int maxCount = 7; + int minCount = 4; + if (nextLen == 0) + { + maxCount = 138; + minCount = 3; + } + for (int n = 0; n < numLevels; n++) + { + int curLen = nextLen; + nextLen = (n < numLevels - 1) ? levels[n + 1] : 0xFF; + count++; + if (count < maxCount && curLen == nextLen) + continue; + + if (count < minCount) + for(int i = 0; i < count; i++) + WRITE_HF(curLen); + else if (curLen != 0) + { + if (curLen != prevLen) + { + WRITE_HF(curLen); + count--; + } + WRITE_HF(kTableLevelRepNumber); + WriteBits(count - 3, 2); + } + else if (count <= 10) + { + WRITE_HF(kTableLevel0Number); + WriteBits(count - 3, 3); + } + else + { + WRITE_HF(kTableLevel0Number2); + WriteBits(count - 11, 7); + } + + count = 0; + prevLen = curLen; + + if (nextLen == 0) + { + maxCount = 138; + minCount = 3; + } + else if (curLen == nextLen) + { + maxCount = 6; + minCount = 3; + } + else + { + maxCount = 7; + minCount = 4; + } + } +} + +NO_INLINE void CCoder::MakeTables(unsigned maxHuffLen) +{ + Huffman_Generate(mainFreqs, mainCodes, m_NewLevels.litLenLevels, kFixedMainTableSize, maxHuffLen); + Huffman_Generate(distFreqs, distCodes, m_NewLevels.distLevels, kDistTableSize64, maxHuffLen); +} + +NO_INLINE UInt32 Huffman_GetPrice(const UInt32 *freqs, const Byte *lens, UInt32 num) +{ + UInt32 price = 0; + UInt32 i; + for (i = 0; i < num; i++) + price += lens[i] * freqs[i]; + return price; +} + +NO_INLINE UInt32 Huffman_GetPrice_Spec(const UInt32 *freqs, const Byte *lens, UInt32 num, const Byte *extraBits, UInt32 extraBase) +{ + return Huffman_GetPrice(freqs, lens, num) + + Huffman_GetPrice(freqs + extraBase, extraBits, num - extraBase); +} + +NO_INLINE UInt32 CCoder::GetLzBlockPrice() const +{ + return + Huffman_GetPrice_Spec(mainFreqs, m_NewLevels.litLenLevels, kFixedMainTableSize, m_LenDirectBits, kSymbolMatch) + + Huffman_GetPrice_Spec(distFreqs, m_NewLevels.distLevels, kDistTableSize64, kDistDirectBits, 0); +} + +NO_INLINE void CCoder::TryBlock() +{ + memset(mainFreqs, 0, sizeof(mainFreqs)); + memset(distFreqs, 0, sizeof(distFreqs)); + + m_ValueIndex = 0; + UInt32 blockSize = BlockSizeRes; + BlockSizeRes = 0; + for (;;) + { + if (m_OptimumCurrentIndex == m_OptimumEndIndex) + { + if (m_Pos >= kMatchArrayLimit || BlockSizeRes >= blockSize || !m_SecondPass && + ((Inline_MatchFinder_GetNumAvailableBytes(&_lzInWindow) == 0) || m_ValueIndex >= m_ValueBlockSize)) + break; + } + UInt32 pos; + UInt32 len; + if (_fastMode) + len = GetOptimalFast(pos); + else + len = GetOptimal(pos); + CCodeValue &codeValue = m_Values[m_ValueIndex++]; + if (len >= kMatchMinLen) + { + UInt32 newLen = len - kMatchMinLen; + codeValue.Len = (UInt16)newLen; + mainFreqs[kSymbolMatch + g_LenSlots[newLen]]++; + codeValue.Pos = (UInt16)pos; + distFreqs[GetPosSlot(pos)]++; + } + else + { + Byte b = Inline_MatchFinder_GetIndexByte(&_lzInWindow, 0 - m_AdditionalOffset); + mainFreqs[b]++; + codeValue.SetAsLiteral(); + codeValue.Pos = b; + } + m_AdditionalOffset -= len; + BlockSizeRes += len; + } + mainFreqs[kSymbolEndOfBlock]++; + m_AdditionalOffset += BlockSizeRes; + m_SecondPass = true; +} + +NO_INLINE void CCoder::SetPrices(const CLevels &levels) +{ + if (_fastMode) + return; + UInt32 i; + for(i = 0; i < 256; i++) + { + Byte price = levels.litLenLevels[i]; + m_LiteralPrices[i] = ((price != 0) ? price : kNoLiteralStatPrice); + } + + for(i = 0; i < m_NumLenCombinations; i++) + { + UInt32 slot = g_LenSlots[i]; + Byte price = levels.litLenLevels[kSymbolMatch + slot]; + m_LenPrices[i] = (Byte)(((price != 0) ? price : kNoLenStatPrice) + m_LenDirectBits[slot]); + } + + for(i = 0; i < kDistTableSize64; i++) + { + Byte price = levels.distLevels[i]; + m_PosPrices[i] = (Byte)(((price != 0) ? price: kNoPosStatPrice) + kDistDirectBits[i]); + } +} + +NO_INLINE void Huffman_ReverseBits(UInt32 *codes, const Byte *lens, UInt32 num) +{ + for (UInt32 i = 0; i < num; i++) + { + UInt32 x = codes[i]; + x = ((x & 0x5555) << 1) | ((x & 0xAAAA) >> 1); + x = ((x & 0x3333) << 2) | ((x & 0xCCCC) >> 2); + x = ((x & 0x0F0F) << 4) | ((x & 0xF0F0) >> 4); + codes[i] = (((x & 0x00FF) << 8) | ((x & 0xFF00) >> 8)) >> (16 - lens[i]); + } +} + +NO_INLINE void CCoder::WriteBlock() +{ + Huffman_ReverseBits(mainCodes, m_NewLevels.litLenLevels, kFixedMainTableSize); + Huffman_ReverseBits(distCodes, m_NewLevels.distLevels, kDistTableSize64); + + for (UInt32 i = 0; i < m_ValueIndex; i++) + { + const CCodeValue &codeValue = m_Values[i]; + if (codeValue.IsLiteral()) + WRITE_HF2(mainCodes, m_NewLevels.litLenLevels, codeValue.Pos); + else + { + UInt32 len = codeValue.Len; + UInt32 lenSlot = g_LenSlots[len]; + WRITE_HF2(mainCodes, m_NewLevels.litLenLevels, kSymbolMatch + lenSlot); + m_OutStream.WriteBits(len - m_LenStart[lenSlot], m_LenDirectBits[lenSlot]); + UInt32 dist = codeValue.Pos; + UInt32 posSlot = GetPosSlot(dist); + WRITE_HF2(distCodes, m_NewLevels.distLevels, posSlot); + m_OutStream.WriteBits(dist - kDistStart[posSlot], kDistDirectBits[posSlot]); + } + } + WRITE_HF2(mainCodes, m_NewLevels.litLenLevels, kSymbolEndOfBlock); +} + +static UInt32 GetStorePrice(UInt32 blockSize, int bitPosition) +{ + UInt32 price = 0; + do + { + UInt32 nextBitPosition = (bitPosition + kFinalBlockFieldSize + kBlockTypeFieldSize) & 7; + int numBitsForAlign = nextBitPosition > 0 ? (8 - nextBitPosition): 0; + UInt32 curBlockSize = (blockSize < (1 << 16)) ? blockSize : (1 << 16) - 1; + price += kFinalBlockFieldSize + kBlockTypeFieldSize + numBitsForAlign + (2 + 2) * 8 + curBlockSize * 8; + bitPosition = 0; + blockSize -= curBlockSize; + } + while(blockSize != 0); + return price; +} + +void CCoder::WriteStoreBlock(UInt32 blockSize, UInt32 additionalOffset, bool finalBlock) +{ + do + { + UInt32 curBlockSize = (blockSize < (1 << 16)) ? blockSize : (1 << 16) - 1; + blockSize -= curBlockSize; + WriteBits((finalBlock && (blockSize == 0) ? NFinalBlockField::kFinalBlock: NFinalBlockField::kNotFinalBlock), kFinalBlockFieldSize); + WriteBits(NBlockType::kStored, kBlockTypeFieldSize); + m_OutStream.FlushByte(); + WriteBits((UInt16)curBlockSize, kStoredBlockLengthFieldSize); + WriteBits((UInt16)~curBlockSize, kStoredBlockLengthFieldSize); + const Byte *data = Inline_MatchFinder_GetPointerToCurrentPos(&_lzInWindow)- additionalOffset; + for(UInt32 i = 0; i < curBlockSize; i++) + m_OutStream.WriteByte(data[i]); + additionalOffset -= curBlockSize; + } + while(blockSize != 0); +} + +NO_INLINE UInt32 CCoder::TryDynBlock(int tableIndex, UInt32 numPasses) +{ + CTables &t = m_Tables[tableIndex]; + BlockSizeRes = t.BlockSizeRes; + UInt32 posTemp = t.m_Pos; + SetPrices(t); + + for (UInt32 p = 0; p < numPasses; p++) + { + m_Pos = posTemp; + TryBlock(); + unsigned numHuffBits = + (m_ValueIndex > 18000 ? 12 : + (m_ValueIndex > 7000 ? 11 : + (m_ValueIndex > 2000 ? 10 : 9))); + MakeTables(numHuffBits); + SetPrices(m_NewLevels); + } + + (CLevels &)t = m_NewLevels; + + m_NumLitLenLevels = kMainTableSize; + while(m_NumLitLenLevels > kNumLitLenCodesMin && m_NewLevels.litLenLevels[m_NumLitLenLevels - 1] == 0) + m_NumLitLenLevels--; + + m_NumDistLevels = kDistTableSize64; + while(m_NumDistLevels > kNumDistCodesMin && m_NewLevels.distLevels[m_NumDistLevels - 1] == 0) + m_NumDistLevels--; + + UInt32 levelFreqs[kLevelTableSize]; + memset(levelFreqs, 0, sizeof(levelFreqs)); + + LevelTableDummy(m_NewLevels.litLenLevels, m_NumLitLenLevels, levelFreqs); + LevelTableDummy(m_NewLevels.distLevels, m_NumDistLevels, levelFreqs); + + Huffman_Generate(levelFreqs, levelCodes, levelLens, kLevelTableSize, kMaxLevelBitLength); + + m_NumLevelCodes = kNumLevelCodesMin; + for (UInt32 i = 0; i < kLevelTableSize; i++) + { + Byte level = levelLens[kCodeLengthAlphabetOrder[i]]; + if (level > 0 && i >= m_NumLevelCodes) + m_NumLevelCodes = i + 1; + m_LevelLevels[i] = level; + } + + return GetLzBlockPrice() + + Huffman_GetPrice_Spec(levelFreqs, levelLens, kLevelTableSize, kLevelDirectBits, kTableDirectLevels) + + kNumLenCodesFieldSize + kNumDistCodesFieldSize + kNumLevelCodesFieldSize + + m_NumLevelCodes * kLevelFieldSize + kFinalBlockFieldSize + kBlockTypeFieldSize; +} + +NO_INLINE UInt32 CCoder::TryFixedBlock(int tableIndex) +{ + CTables &t = m_Tables[tableIndex]; + BlockSizeRes = t.BlockSizeRes; + m_Pos = t.m_Pos; + m_NewLevels.SetFixedLevels(); + SetPrices(m_NewLevels); + TryBlock(); + return kFinalBlockFieldSize + kBlockTypeFieldSize + GetLzBlockPrice(); +} + +NO_INLINE UInt32 CCoder::GetBlockPrice(int tableIndex, int numDivPasses) +{ + CTables &t = m_Tables[tableIndex]; + t.StaticMode = false; + UInt32 price = TryDynBlock(tableIndex, m_NumPasses); + t.BlockSizeRes = BlockSizeRes; + UInt32 numValues = m_ValueIndex; + UInt32 posTemp = m_Pos; + UInt32 additionalOffsetEnd = m_AdditionalOffset; + + if (m_CheckStatic && m_ValueIndex <= kFixedHuffmanCodeBlockSizeMax) + { + const UInt32 fixedPrice = TryFixedBlock(tableIndex); + t.StaticMode = (fixedPrice < price); + if (t.StaticMode) + price = fixedPrice; + } + + const UInt32 storePrice = GetStorePrice(BlockSizeRes, 0); // bitPosition + t.StoreMode = (storePrice <= price); + if (t.StoreMode) + price = storePrice; + + t.UseSubBlocks = false; + + if (numDivPasses > 1 && numValues >= kDivideCodeBlockSizeMin) + { + CTables &t0 = m_Tables[(tableIndex << 1)]; + (CLevels &)t0 = t; + t0.BlockSizeRes = t.BlockSizeRes >> 1; + t0.m_Pos = t.m_Pos; + UInt32 subPrice = GetBlockPrice((tableIndex << 1), numDivPasses - 1); + + UInt32 blockSize2 = t.BlockSizeRes - t0.BlockSizeRes; + if (t0.BlockSizeRes >= kDivideBlockSizeMin && blockSize2 >= kDivideBlockSizeMin) + { + CTables &t1 = m_Tables[(tableIndex << 1) + 1]; + (CLevels &)t1 = t; + t1.BlockSizeRes = blockSize2; + t1.m_Pos = m_Pos; + m_AdditionalOffset -= t0.BlockSizeRes; + subPrice += GetBlockPrice((tableIndex << 1) + 1, numDivPasses - 1); + t.UseSubBlocks = (subPrice < price); + if (t.UseSubBlocks) + price = subPrice; + } + } + m_AdditionalOffset = additionalOffsetEnd; + m_Pos = posTemp; + return price; +} + +void CCoder::CodeBlock(int tableIndex, bool finalBlock) +{ + CTables &t = m_Tables[tableIndex]; + if (t.UseSubBlocks) + { + CodeBlock((tableIndex << 1), false); + CodeBlock((tableIndex << 1) + 1, finalBlock); + } + else + { + if (t.StoreMode) + WriteStoreBlock(t.BlockSizeRes, m_AdditionalOffset, finalBlock); + else + { + WriteBits((finalBlock ? NFinalBlockField::kFinalBlock: NFinalBlockField::kNotFinalBlock), kFinalBlockFieldSize); + if (t.StaticMode) + { + WriteBits(NBlockType::kFixedHuffman, kBlockTypeFieldSize); + TryFixedBlock(tableIndex); + int i; + const int kMaxStaticHuffLen = 9; + for (i = 0; i < kFixedMainTableSize; i++) + mainFreqs[i] = (UInt32)1 << (kMaxStaticHuffLen - m_NewLevels.litLenLevels[i]); + for (i = 0; i < kFixedDistTableSize; i++) + distFreqs[i] = (UInt32)1 << (kMaxStaticHuffLen - m_NewLevels.distLevels[i]); + MakeTables(kMaxStaticHuffLen); + } + else + { + if (m_NumDivPasses > 1 || m_CheckStatic) + TryDynBlock(tableIndex, 1); + WriteBits(NBlockType::kDynamicHuffman, kBlockTypeFieldSize); + WriteBits(m_NumLitLenLevels - kNumLitLenCodesMin, kNumLenCodesFieldSize); + WriteBits(m_NumDistLevels - kNumDistCodesMin, kNumDistCodesFieldSize); + WriteBits(m_NumLevelCodes - kNumLevelCodesMin, kNumLevelCodesFieldSize); + + for (UInt32 i = 0; i < m_NumLevelCodes; i++) + WriteBits(m_LevelLevels[i], kLevelFieldSize); + + Huffman_ReverseBits(levelCodes, levelLens, kLevelTableSize); + LevelTableCode(m_NewLevels.litLenLevels, m_NumLitLenLevels, levelLens, levelCodes); + LevelTableCode(m_NewLevels.distLevels, m_NumDistLevels, levelLens, levelCodes); + } + WriteBlock(); + } + m_AdditionalOffset -= t.BlockSizeRes; + } +} + +SRes Read(void *object, void *data, size_t *size) +{ + const UInt32 kStepSize = (UInt32)1 << 31; + UInt32 curSize = ((*size < kStepSize) ? (UInt32)*size : kStepSize); + HRESULT res = ((CSeqInStream *)object)->RealStream->Read(data, curSize, &curSize); + *size = curSize; + return (SRes)res; +} + +HRESULT CCoder::CodeReal(ISequentialInStream *inStream, ISequentialOutStream *outStream, + const UInt64 * /* inSize */ , const UInt64 * /* outSize */ , ICompressProgressInfo *progress) +{ + m_CheckStatic = (m_NumPasses != 1 || m_NumDivPasses != 1); + m_IsMultiPass = (m_CheckStatic || (m_NumPasses != 1 || m_NumDivPasses != 1)); + + RINOK(Create()); + + m_ValueBlockSize = (7 << 10) + (1 << 12) * m_NumDivPasses; + + UInt64 nowPos = 0; + + _seqInStream.RealStream = inStream; + _seqInStream.SeqInStream.Read = Read; + _lzInWindow.stream = &_seqInStream.SeqInStream; + + MatchFinder_Init(&_lzInWindow); + m_OutStream.SetStream(outStream); + m_OutStream.Init(); + + CCoderReleaser coderReleaser(this); + + m_OptimumEndIndex = m_OptimumCurrentIndex = 0; + + CTables &t = m_Tables[1]; + t.m_Pos = 0; + t.InitStructures(); + + m_AdditionalOffset = 0; + do + { + t.BlockSizeRes = kBlockUncompressedSizeThreshold; + m_SecondPass = false; + GetBlockPrice(1, m_NumDivPasses); + CodeBlock(1, Inline_MatchFinder_GetNumAvailableBytes(&_lzInWindow) == 0); + nowPos += m_Tables[1].BlockSizeRes; + if (progress != NULL) + { + UInt64 packSize = m_OutStream.GetProcessedSize(); + RINOK(progress->SetRatioInfo(&nowPos, &packSize)); + } + } + while (Inline_MatchFinder_GetNumAvailableBytes(&_lzInWindow) != 0); + if (_lzInWindow.result != SZ_OK) + return _lzInWindow.result; + return m_OutStream.Flush(); +} + +HRESULT CCoder::BaseCode(ISequentialInStream *inStream, ISequentialOutStream *outStream, + const UInt64 *inSize, const UInt64 *outSize, ICompressProgressInfo *progress) +{ + try { return CodeReal(inStream, outStream, inSize, outSize, progress); } + catch(const COutBufferException &e) { return e.ErrorCode; } + catch(...) { return E_FAIL; } +} + +STDMETHODIMP CCOMCoder::Code(ISequentialInStream *inStream, ISequentialOutStream *outStream, + const UInt64 *inSize, const UInt64 *outSize, ICompressProgressInfo *progress) + { return BaseCode(inStream, outStream, inSize, outSize, progress); } + +STDMETHODIMP CCOMCoder::SetCoderProperties(const PROPID *propIDs, const PROPVARIANT *props, UInt32 numProps) + { return BaseSetEncoderProperties2(propIDs, props, numProps); } + +STDMETHODIMP CCOMCoder64::Code(ISequentialInStream *inStream, ISequentialOutStream *outStream, + const UInt64 *inSize, const UInt64 *outSize, ICompressProgressInfo *progress) + { return BaseCode(inStream, outStream, inSize, outSize, progress); } + +STDMETHODIMP CCOMCoder64::SetCoderProperties(const PROPID *propIDs, const PROPVARIANT *props, UInt32 numProps) + { return BaseSetEncoderProperties2(propIDs, props, numProps); } + +}}} diff --git a/CPP/7zip/Compress/DeflateEncoder.h b/CPP/7zip/Compress/DeflateEncoder.h new file mode 100644 index 0000000..71c39e4 --- /dev/null +++ b/CPP/7zip/Compress/DeflateEncoder.h @@ -0,0 +1,211 @@ +// DeflateEncoder.h + +#ifndef __DEFLATE_ENCODER_H +#define __DEFLATE_ENCODER_H + +#include "../../../C/LzFind.h" + +#include "Common/MyCom.h" + +#include "../ICoder.h" + +#include "BitlEncoder.h" +#include "DeflateConst.h" + +namespace NCompress { +namespace NDeflate { +namespace NEncoder { + +struct CCodeValue +{ + UInt16 Len; + UInt16 Pos; + void SetAsLiteral() { Len = (1 << 15); } + bool IsLiteral() const { return (Len >= (1 << 15)); } +}; + +struct COptimal +{ + UInt32 Price; + UInt16 PosPrev; + UInt16 BackPrev; +}; + +const UInt32 kNumOptsBase = 1 << 12; +const UInt32 kNumOpts = kNumOptsBase + kMatchMaxLen; + +class CCoder; + +struct CTables: public CLevels +{ + bool UseSubBlocks; + bool StoreMode; + bool StaticMode; + UInt32 BlockSizeRes; + UInt32 m_Pos; + void InitStructures(); +}; + +typedef struct _CSeqInStream +{ + ISeqInStream SeqInStream; + CMyComPtr RealStream; +} CSeqInStream; + +class CCoder +{ + CMatchFinder _lzInWindow; + CBitlEncoder m_OutStream; + + CSeqInStream _seqInStream; + +public: + CCodeValue *m_Values; + + UInt16 *m_MatchDistances; + UInt32 m_NumFastBytes; + bool _fastMode; + bool _btMode; + + UInt16 *m_OnePosMatchesMemory; + UInt16 *m_DistanceMemory; + + UInt32 m_Pos; + + int m_NumPasses; + int m_NumDivPasses; + bool m_CheckStatic; + bool m_IsMultiPass; + UInt32 m_ValueBlockSize; + + UInt32 m_NumLenCombinations; + UInt32 m_MatchMaxLen; + const Byte *m_LenStart; + const Byte *m_LenDirectBits; + + bool m_Created; + bool m_Deflate64Mode; + + Byte m_LevelLevels[kLevelTableSize]; + int m_NumLitLenLevels; + int m_NumDistLevels; + UInt32 m_NumLevelCodes; + UInt32 m_ValueIndex; + + bool m_SecondPass; + UInt32 m_AdditionalOffset; + + UInt32 m_OptimumEndIndex; + UInt32 m_OptimumCurrentIndex; + + Byte m_LiteralPrices[256]; + Byte m_LenPrices[kNumLenSymbolsMax]; + Byte m_PosPrices[kDistTableSize64]; + + CLevels m_NewLevels; + UInt32 mainFreqs[kFixedMainTableSize]; + UInt32 distFreqs[kDistTableSize64]; + UInt32 mainCodes[kFixedMainTableSize]; + UInt32 distCodes[kDistTableSize64]; + UInt32 levelCodes[kLevelTableSize]; + Byte levelLens[kLevelTableSize]; + + UInt32 BlockSizeRes; + + CTables *m_Tables; + COptimal m_Optimum[kNumOpts]; + + UInt32 m_MatchFinderCycles; + // IMatchFinderSetNumPasses *m_SetMfPasses; + + void GetMatches(); + void MovePos(UInt32 num); + UInt32 Backward(UInt32 &backRes, UInt32 cur); + UInt32 GetOptimal(UInt32 &backRes); + UInt32 GetOptimalFast(UInt32 &backRes); + + void LevelTableDummy(const Byte *levels, int numLevels, UInt32 *freqs); + + void WriteBits(UInt32 value, int numBits); + void LevelTableCode(const Byte *levels, int numLevels, const Byte *lens, const UInt32 *codes); + + void MakeTables(unsigned maxHuffLen); + UInt32 GetLzBlockPrice() const; + void TryBlock(); + UInt32 TryDynBlock(int tableIndex, UInt32 numPasses); + + UInt32 TryFixedBlock(int tableIndex); + + void SetPrices(const CLevels &levels); + void WriteBlock(); + + HRESULT Create(); + void Free(); + + void WriteStoreBlock(UInt32 blockSize, UInt32 additionalOffset, bool finalBlock); + void WriteTables(bool writeMode, bool finalBlock); + + void WriteBlockData(bool writeMode, bool finalBlock); + + void ReleaseStreams() + { + _seqInStream.RealStream.Release(); + m_OutStream.ReleaseStream(); + } + class CCoderReleaser + { + CCoder *m_Coder; + public: + CCoderReleaser(CCoder *coder): m_Coder(coder) {} + ~CCoderReleaser() { m_Coder->ReleaseStreams(); } + }; + friend class CCoderReleaser; + + UInt32 GetBlockPrice(int tableIndex, int numDivPasses); + void CodeBlock(int tableIndex, bool finalBlock); + +public: + CCoder(bool deflate64Mode = false); + ~CCoder(); + + HRESULT CodeReal(ISequentialInStream *inStream, ISequentialOutStream *outStream, + const UInt64 *inSize, const UInt64 *outSize, ICompressProgressInfo *progress); + + HRESULT BaseCode(ISequentialInStream *inStream, ISequentialOutStream *outStream, + const UInt64 *inSize, const UInt64 *outSize, ICompressProgressInfo *progress); + + HRESULT BaseSetEncoderProperties2(const PROPID *propIDs, const PROPVARIANT *props, UInt32 numProps); +}; + + +class CCOMCoder : + public ICompressCoder, + public ICompressSetCoderProperties, + public CMyUnknownImp, + public CCoder +{ +public: + MY_UNKNOWN_IMP1(ICompressSetCoderProperties) + CCOMCoder(): CCoder(false) {}; + STDMETHOD(Code)(ISequentialInStream *inStream, ISequentialOutStream *outStream, + const UInt64 *inSize, const UInt64 *outSize, ICompressProgressInfo *progress); + STDMETHOD(SetCoderProperties)(const PROPID *propIDs, const PROPVARIANT *props, UInt32 numProps); +}; + +class CCOMCoder64 : + public ICompressCoder, + public ICompressSetCoderProperties, + public CMyUnknownImp, + public CCoder +{ +public: + MY_UNKNOWN_IMP1(ICompressSetCoderProperties) + CCOMCoder64(): CCoder(true) {}; + STDMETHOD(Code)(ISequentialInStream *inStream, ISequentialOutStream *outStream, + const UInt64 *inSize, const UInt64 *outSize, ICompressProgressInfo *progress); + STDMETHOD(SetCoderProperties)(const PROPID *propIDs, const PROPVARIANT *props, UInt32 numProps); +}; + +}}} + +#endif diff --git a/CPP/7zip/Compress/DeflateRegister.cpp b/CPP/7zip/Compress/DeflateRegister.cpp new file mode 100644 index 0000000..45f5521 --- /dev/null +++ b/CPP/7zip/Compress/DeflateRegister.cpp @@ -0,0 +1,21 @@ +// DeflateRegister.cpp + +#include "StdAfx.h" + +#include "../Common/RegisterCodec.h" + +#include "DeflateDecoder.h" + +static void *CreateCodecDeflate() { return (void *)(ICompressCoder *)(new NCompress::NDeflate::NDecoder::CCOMCoder); } + +#if !defined(EXTRACT_ONLY) && !defined(DEFLATE_EXTRACT_ONLY) +#include "DeflateEncoder.h" +static void *CreateCodecOutDeflate() { return (void *)(ICompressCoder *)(new NCompress::NDeflate::NEncoder::CCOMCoder); } +#else +#define CreateCodecOutDeflate 0 +#endif + +static CCodecInfo g_CodecInfo = + { CreateCodecDeflate, CreateCodecOutDeflate, 0x040108, L"Deflate", 1, false }; + +REGISTER_CODEC(Deflate) diff --git a/CPP/7zip/Compress/DeltaFilter.cpp b/CPP/7zip/Compress/DeltaFilter.cpp new file mode 100644 index 0000000..2e421ac --- /dev/null +++ b/CPP/7zip/Compress/DeltaFilter.cpp @@ -0,0 +1,112 @@ +// DeltaFilter.cpp + +#include "StdAfx.h" + +#include "../../../C/Delta.h" + +#include "../Common/RegisterCodec.h" + +#include "BranchCoder.h" + +struct CDelta +{ + unsigned _delta; + Byte _state[DELTA_STATE_SIZE]; + CDelta(): _delta(1) {} + void DeltaInit() { Delta_Init(_state); } +}; + +class CDeltaEncoder: + public ICompressFilter, + public ICompressSetCoderProperties, + public ICompressWriteCoderProperties, + CDelta, + public CMyUnknownImp +{ +public: + MY_UNKNOWN_IMP2(ICompressSetCoderProperties, ICompressWriteCoderProperties) + STDMETHOD(Init)(); + STDMETHOD_(UInt32, Filter)(Byte *data, UInt32 size); + STDMETHOD(SetCoderProperties)(const PROPID *propIDs, const PROPVARIANT *props, UInt32 numProps); + STDMETHOD(WriteCoderProperties)(ISequentialOutStream *outStream); +}; + +class CDeltaDecoder: + public ICompressFilter, + public ICompressSetDecoderProperties2, + CDelta, + public CMyUnknownImp +{ +public: + MY_UNKNOWN_IMP1(ICompressSetDecoderProperties2) + STDMETHOD(Init)(); + STDMETHOD_(UInt32, Filter)(Byte *data, UInt32 size); + STDMETHOD(SetDecoderProperties2)(const Byte *data, UInt32 size); +}; + +STDMETHODIMP CDeltaEncoder::Init() +{ + DeltaInit(); + return S_OK; +} + +STDMETHODIMP_(UInt32) CDeltaEncoder::Filter(Byte *data, UInt32 size) +{ + Delta_Encode(_state, _delta, data, size); + return size; +} + +STDMETHODIMP CDeltaEncoder::SetCoderProperties(const PROPID *propIDs, const PROPVARIANT *props, UInt32 numProps) +{ + UInt32 delta = _delta; + for (UInt32 i = 0; i < numProps; i++) + { + const PROPVARIANT &prop = props[i]; + if (propIDs[i] != NCoderPropID::kDefaultProp || prop.vt != VT_UI4 || prop.ulVal < 1 || prop.ulVal > 256) + return E_INVALIDARG; + delta = prop.ulVal; + } + _delta = delta; + return S_OK; +} + +STDMETHODIMP CDeltaEncoder::WriteCoderProperties(ISequentialOutStream *outStream) +{ + Byte prop = (Byte)(_delta - 1); + return outStream->Write(&prop, 1, NULL); +} + +STDMETHODIMP CDeltaDecoder::Init() +{ + DeltaInit(); + return S_OK; +} + +STDMETHODIMP_(UInt32) CDeltaDecoder::Filter(Byte *data, UInt32 size) +{ + Delta_Decode(_state, _delta, data, size); + return size; +} + +STDMETHODIMP CDeltaDecoder::SetDecoderProperties2(const Byte *props, UInt32 size) +{ + if (size != 1) + return E_INVALIDARG; + _delta = (unsigned)props[0] + 1; + return S_OK; +} + +#define CREATE_CODEC(x) \ + static void *CreateCodec ## x() { return (void *)(ICompressFilter *)(new C ## x ## Decoder); } \ + static void *CreateCodec ## x ## Out() { return (void *)(ICompressFilter *)(new C ## x ## Encoder); } + +CREATE_CODEC(Delta) + +#define METHOD_ITEM(x, id, name) { CreateCodec ## x, CreateCodec ## x ## Out, id, name, 1, true } + +static CCodecInfo g_CodecsInfo[] = +{ + METHOD_ITEM(Delta, 3, L"Delta") +}; + +REGISTER_CODECS(Delta) diff --git a/CPP/7zip/Compress/DllExports.cpp b/CPP/7zip/Compress/DllExports.cpp new file mode 100644 index 0000000..a7ec902 --- /dev/null +++ b/CPP/7zip/Compress/DllExports.cpp @@ -0,0 +1,39 @@ +// DllExports.cpp + +#include "StdAfx.h" + +#include "../../Common/MyInitGuid.h" + +#include "../ICoder.h" + +#include "../Common/RegisterCodec.h" + +static const unsigned int kNumCodecsMax = 32; +unsigned int g_NumCodecs = 0; +const CCodecInfo *g_Codecs[kNumCodecsMax]; +void RegisterCodec(const CCodecInfo *codecInfo) +{ + if (g_NumCodecs < kNumCodecsMax) + g_Codecs[g_NumCodecs++] = codecInfo; +} + +#ifdef _WIN32 +extern "C" +BOOL WINAPI DllMain(HINSTANCE /* hInstance */, DWORD /* dwReason */, LPVOID /*lpReserved*/) +{ + return TRUE; +} +#endif + +static const UInt16 kDecodeId = 0x2790; + +DEFINE_GUID(CLSID_CCodec, +0x23170F69, 0x40C1, kDecodeId, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00); + +STDAPI CreateCoder(const GUID *clsid, const GUID *iid, void **outObject); + +STDAPI CreateObject(const GUID *clsid, const GUID *iid, void **outObject) +{ + return CreateCoder(clsid, iid, outObject); +} + diff --git a/CPP/7zip/Compress/DllExports2.cpp b/CPP/7zip/Compress/DllExports2.cpp new file mode 100644 index 0000000..836f3fa --- /dev/null +++ b/CPP/7zip/Compress/DllExports2.cpp @@ -0,0 +1,28 @@ +// DllExports.cpp + +#include "StdAfx.h" + +#include "../../Common/MyInitGuid.h" + +#include "../ICoder.h" + +#include "../Common/RegisterCodec.h" + +extern "C" +BOOL WINAPI DllMain(HINSTANCE /* hInstance */, DWORD /* dwReason */, LPVOID /*lpReserved*/) +{ + return TRUE; +} + +static const UInt16 kDecodeId = 0x2790; + +DEFINE_GUID(CLSID_CCodec, +0x23170F69, 0x40C1, kDecodeId, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00); + +STDAPI CreateCoder(const GUID *clsid, const GUID *iid, void **outObject); + +STDAPI CreateObject(const GUID *clsid, const GUID *iid, void **outObject) +{ + return CreateCoder(clsid, iid, outObject); +} + diff --git a/CPP/7zip/Compress/HuffmanDecoder.h b/CPP/7zip/Compress/HuffmanDecoder.h new file mode 100644 index 0000000..82a1e6f --- /dev/null +++ b/CPP/7zip/Compress/HuffmanDecoder.h @@ -0,0 +1,89 @@ +// Compress/HuffmanDecoder.h + +#ifndef __COMPRESS_HUFFMAN_DECODER_H +#define __COMPRESS_HUFFMAN_DECODER_H + +#include "../../Common/Types.h" + +namespace NCompress { +namespace NHuffman { + +const int kNumTableBits = 9; + +template +class CDecoder +{ + UInt32 m_Limits[kNumBitsMax + 1]; // m_Limits[i] = value limit for symbols with length = i + UInt32 m_Positions[kNumBitsMax + 1]; // m_Positions[i] = index in m_Symbols[] of first symbol with length = i + UInt32 m_Symbols[m_NumSymbols]; + Byte m_Lengths[1 << kNumTableBits]; // Table oh length for short codes. + +public: + + bool SetCodeLengths(const Byte *codeLengths) + { + int lenCounts[kNumBitsMax + 1]; + UInt32 tmpPositions[kNumBitsMax + 1]; + int i; + for(i = 1; i <= kNumBitsMax; i++) + lenCounts[i] = 0; + UInt32 symbol; + for (symbol = 0; symbol < m_NumSymbols; symbol++) + { + int len = codeLengths[symbol]; + if (len > kNumBitsMax) + return false; + lenCounts[len]++; + m_Symbols[symbol] = 0xFFFFFFFF; + } + lenCounts[0] = 0; + m_Positions[0] = m_Limits[0] = 0; + UInt32 startPos = 0; + UInt32 index = 0; + const UInt32 kMaxValue = (1 << kNumBitsMax); + for (i = 1; i <= kNumBitsMax; i++) + { + startPos += lenCounts[i] << (kNumBitsMax - i); + if (startPos > kMaxValue) + return false; + m_Limits[i] = (i == kNumBitsMax) ? kMaxValue : startPos; + m_Positions[i] = m_Positions[i - 1] + lenCounts[i - 1]; + tmpPositions[i] = m_Positions[i]; + if(i <= kNumTableBits) + { + UInt32 limit = (m_Limits[i] >> (kNumBitsMax - kNumTableBits)); + for (; index < limit; index++) + m_Lengths[index] = (Byte)i; + } + } + for (symbol = 0; symbol < m_NumSymbols; symbol++) + { + int len = codeLengths[symbol]; + if (len != 0) + m_Symbols[tmpPositions[len]++] = symbol; + } + return true; + } + + template + UInt32 DecodeSymbol(TBitDecoder *bitStream) + { + int numBits; + UInt32 value = bitStream->GetValue(kNumBitsMax); + if (value < m_Limits[kNumTableBits]) + numBits = m_Lengths[value >> (kNumBitsMax - kNumTableBits)]; + else + for (numBits = kNumTableBits + 1; value >= m_Limits[numBits]; numBits++); + bitStream->MovePos(numBits); + UInt32 index = m_Positions[numBits] + + ((value - m_Limits[numBits - 1]) >> (kNumBitsMax - numBits)); + if (index >= m_NumSymbols) + // throw CDecoderException(); // test it + return 0xFFFFFFFF; + return m_Symbols[index]; + } +}; + +}} + +#endif diff --git a/CPP/7zip/Compress/ImplodeDecoder.cpp b/CPP/7zip/Compress/ImplodeDecoder.cpp new file mode 100644 index 0000000..f84a013 --- /dev/null +++ b/CPP/7zip/Compress/ImplodeDecoder.cpp @@ -0,0 +1,219 @@ +// Implode/Decoder.cpp + +#include "StdAfx.h" + +#include "ImplodeDecoder.h" +#include "Common/Defs.h" + +namespace NCompress { +namespace NImplode { +namespace NDecoder { + +class CException +{ +public: + enum ECauseType + { + kData + } m_Cause; + CException(ECauseType cause): m_Cause(cause) {} +}; + +static const int kNumDistanceLowDirectBitsForBigDict = 7; +static const int kNumDistanceLowDirectBitsForSmallDict = 6; + +static const int kNumBitsInByte = 8; + +// static const int kLevelStructuresNumberFieldSize = kNumBitsInByte; +static const int kLevelStructuresNumberAdditionalValue = 1; + +static const int kNumLevelStructureLevelBits = 4; +static const int kLevelStructureLevelAdditionalValue = 1; + +static const int kNumLevelStructureRepNumberBits = 4; +static const int kLevelStructureRepNumberAdditionalValue = 1; + + +static const int kLiteralTableSize = (1 << kNumBitsInByte); +static const int kDistanceTableSize = 64; +static const int kLengthTableSize = 64; + +static const UInt32 kHistorySize = + (1 << MyMax(kNumDistanceLowDirectBitsForBigDict, + kNumDistanceLowDirectBitsForSmallDict)) * + kDistanceTableSize; // = 8 KB; + +static const int kNumAdditionalLengthBits = 8; + +static const UInt32 kMatchMinLenWhenLiteralsOn = 3; +static const UInt32 kMatchMinLenWhenLiteralsOff = 2; + +static const UInt32 kMatchMinLenMax = MyMax(kMatchMinLenWhenLiteralsOn, + kMatchMinLenWhenLiteralsOff); // 3 + +// static const UInt32 kMatchMaxLenMax = kMatchMinLenMax + (kLengthTableSize - 1) + (1 << kNumAdditionalLengthBits) - 1; // or 2 + +enum +{ + kMatchId = 0, + kLiteralId = 1 +}; + + +CCoder::CCoder(): + m_LiteralDecoder(kLiteralTableSize), + m_LengthDecoder(kLengthTableSize), + m_DistanceDecoder(kDistanceTableSize) +{ +} + +void CCoder::ReleaseStreams() +{ + m_OutWindowStream.ReleaseStream(); + m_InBitStream.ReleaseStream(); +} + +bool CCoder::ReadLevelItems(NImplode::NHuffman::CDecoder &decoder, + Byte *levels, int numLevelItems) +{ + int numCodedStructures = m_InBitStream.ReadBits(kNumBitsInByte) + + kLevelStructuresNumberAdditionalValue; + int currentIndex = 0; + for(int i = 0; i < numCodedStructures; i++) + { + int level = m_InBitStream.ReadBits(kNumLevelStructureLevelBits) + + kLevelStructureLevelAdditionalValue; + int rep = m_InBitStream.ReadBits(kNumLevelStructureRepNumberBits) + + kLevelStructureRepNumberAdditionalValue; + if (currentIndex + rep > numLevelItems) + throw CException(CException::kData); + for(int j = 0; j < rep; j++) + levels[currentIndex++] = (Byte)level; + } + if (currentIndex != numLevelItems) + return false; + return decoder.SetCodeLengths(levels); +} + + +bool CCoder::ReadTables(void) +{ + if (m_LiteralsOn) + { + Byte literalLevels[kLiteralTableSize]; + if (!ReadLevelItems(m_LiteralDecoder, literalLevels, kLiteralTableSize)) + return false; + } + + Byte lengthLevels[kLengthTableSize]; + if (!ReadLevelItems(m_LengthDecoder, lengthLevels, kLengthTableSize)) + return false; + + Byte distanceLevels[kDistanceTableSize]; + return ReadLevelItems(m_DistanceDecoder, distanceLevels, kDistanceTableSize); +} + +class CCoderReleaser +{ + CCoder *m_Coder; +public: + CCoderReleaser(CCoder *coder): m_Coder(coder) {} + ~CCoderReleaser() { m_Coder->ReleaseStreams(); } +}; + +HRESULT CCoder::CodeReal(ISequentialInStream *inStream, ISequentialOutStream *outStream, + const UInt64 * /* inSize */, const UInt64 *outSize, ICompressProgressInfo *progress) +{ + if (!m_InBitStream.Create(1 << 20)) + return E_OUTOFMEMORY; + if (!m_OutWindowStream.Create(kHistorySize)) + return E_OUTOFMEMORY; + if (outSize == NULL) + return E_INVALIDARG; + UInt64 pos = 0, unPackSize = *outSize; + + m_OutWindowStream.SetStream(outStream); + m_OutWindowStream.Init(false); + m_InBitStream.SetStream(inStream); + m_InBitStream.Init(); + CCoderReleaser coderReleaser(this); + + if (!ReadTables()) + return S_FALSE; + + while(pos < unPackSize) + { + if (progress != NULL && pos % (1 << 16) == 0) + { + UInt64 packSize = m_InBitStream.GetProcessedSize(); + RINOK(progress->SetRatioInfo(&packSize, &pos)); + } + if(m_InBitStream.ReadBits(1) == kMatchId) // match + { + UInt32 lowDistBits = m_InBitStream.ReadBits(m_NumDistanceLowDirectBits); + UInt32 distance = m_DistanceDecoder.DecodeSymbol(&m_InBitStream); + if (distance >= kDistanceTableSize) + return S_FALSE; + distance = (distance << m_NumDistanceLowDirectBits) + lowDistBits; + UInt32 lengthSymbol = m_LengthDecoder.DecodeSymbol(&m_InBitStream); + if (lengthSymbol >= kLengthTableSize) + return S_FALSE; + UInt32 length = lengthSymbol + m_MinMatchLength; + if (lengthSymbol == kLengthTableSize - 1) // special symbol = 63 + length += m_InBitStream.ReadBits(kNumAdditionalLengthBits); + while(distance >= pos && length > 0) + { + m_OutWindowStream.PutByte(0); + pos++; + length--; + } + if (length > 0) + m_OutWindowStream.CopyBlock(distance, length); + pos += length; + } + else + { + Byte b; + if (m_LiteralsOn) + { + UInt32 temp = m_LiteralDecoder.DecodeSymbol(&m_InBitStream); + if (temp >= kLiteralTableSize) + return S_FALSE; + b = (Byte)temp; + } + else + b = (Byte)m_InBitStream.ReadBits(kNumBitsInByte); + m_OutWindowStream.PutByte(b); + pos++; + } + } + if (pos > unPackSize) + return S_FALSE; + return m_OutWindowStream.Flush(); +} + +STDMETHODIMP CCoder::Code(ISequentialInStream *inStream, ISequentialOutStream *outStream, + const UInt64 *inSize, const UInt64 *outSize, ICompressProgressInfo *progress) +{ + try { return CodeReal(inStream, outStream, inSize, outSize, progress); } + catch(const CLzOutWindowException &e) { return e.ErrorCode; } + catch(...) { return S_FALSE; } +} + +STDMETHODIMP CCoder::SetDecoderProperties2(const Byte *data, UInt32 size) +{ + if (size < 1) + return E_INVALIDARG; + Byte flag = data[0]; + m_BigDictionaryOn = ((flag & 2) != 0); + m_NumDistanceLowDirectBits = m_BigDictionaryOn ? + kNumDistanceLowDirectBitsForBigDict: + kNumDistanceLowDirectBitsForSmallDict; + m_LiteralsOn = ((flag & 4) != 0); + m_MinMatchLength = m_LiteralsOn ? + kMatchMinLenWhenLiteralsOn : + kMatchMinLenWhenLiteralsOff; + return S_OK; +} + +}}} diff --git a/CPP/7zip/Compress/ImplodeDecoder.h b/CPP/7zip/Compress/ImplodeDecoder.h new file mode 100644 index 0000000..7ea1553 --- /dev/null +++ b/CPP/7zip/Compress/ImplodeDecoder.h @@ -0,0 +1,57 @@ +// ImplodeDecoder.h + +#ifndef __COMPRESS_IMPLODE_DECODER_H +#define __COMPRESS_IMPLODE_DECODER_H + +#include "../../Common/MyCom.h" + +#include "../ICoder.h" + +#include "ImplodeHuffmanDecoder.h" +#include "LzOutWindow.h" + +namespace NCompress { +namespace NImplode { +namespace NDecoder { + +class CCoder: + public ICompressCoder, + public ICompressSetDecoderProperties2, + public CMyUnknownImp +{ + CLzOutWindow m_OutWindowStream; + NBitl::CDecoder m_InBitStream; + + NImplode::NHuffman::CDecoder m_LiteralDecoder; + NImplode::NHuffman::CDecoder m_LengthDecoder; + NImplode::NHuffman::CDecoder m_DistanceDecoder; + + bool m_BigDictionaryOn; + bool m_LiteralsOn; + + int m_NumDistanceLowDirectBits; + UInt32 m_MinMatchLength; + + bool ReadLevelItems(NImplode::NHuffman::CDecoder &table, Byte *levels, int numLevelItems); + bool ReadTables(); + void DeCodeLevelTable(Byte *newLevels, int numLevels); +public: + CCoder(); + + MY_UNKNOWN_IMP1(ICompressSetDecoderProperties2) + + void ReleaseStreams(); + HRESULT Flush() { return m_OutWindowStream.Flush(); } + + HRESULT CodeReal(ISequentialInStream *inStream, ISequentialOutStream *outStream, + const UInt64 *inSize, const UInt64 *outSize, ICompressProgressInfo *progress); + + STDMETHOD(Code)(ISequentialInStream *inStream, ISequentialOutStream *outStream, + const UInt64 *inSize, const UInt64 *outSize, ICompressProgressInfo *progress); + + STDMETHOD(SetDecoderProperties2)(const Byte *data, UInt32 size); +}; + +}}} + +#endif diff --git a/CPP/7zip/Compress/ImplodeHuffmanDecoder.cpp b/CPP/7zip/Compress/ImplodeHuffmanDecoder.cpp new file mode 100644 index 0000000..64345e0 --- /dev/null +++ b/CPP/7zip/Compress/ImplodeHuffmanDecoder.cpp @@ -0,0 +1,89 @@ +// ImplodeHuffmanDecoder.cpp + +#include "StdAfx.h" + +#include "ImplodeHuffmanDecoder.h" + +namespace NCompress { +namespace NImplode { +namespace NHuffman { + +CDecoder::CDecoder(UInt32 numSymbols): + m_NumSymbols(numSymbols) +{ + m_Symbols = new UInt32[m_NumSymbols]; +} + +CDecoder::~CDecoder() +{ + delete []m_Symbols; +} + +bool CDecoder::SetCodeLengths(const Byte *codeLengths) +{ + // int lenCounts[kNumBitsInLongestCode + 1], tmpPositions[kNumBitsInLongestCode + 1]; + int lenCounts[kNumBitsInLongestCode + 2], tmpPositions[kNumBitsInLongestCode + 1]; + int i; + for(i = 0; i <= kNumBitsInLongestCode; i++) + lenCounts[i] = 0; + UInt32 symbolIndex; + for (symbolIndex = 0; symbolIndex < m_NumSymbols; symbolIndex++) + lenCounts[codeLengths[symbolIndex]]++; + // lenCounts[0] = 0; + + // tmpPositions[0] = m_Positions[0] = m_Limitits[0] = 0; + m_Limitits[kNumBitsInLongestCode + 1] = 0; + m_Positions[kNumBitsInLongestCode + 1] = 0; + lenCounts[kNumBitsInLongestCode + 1] = 0; + + + UInt32 startPos = 0; + static const UInt32 kMaxValue = (1 << kNumBitsInLongestCode); + + for (i = kNumBitsInLongestCode; i > 0; i--) + { + startPos += lenCounts[i] << (kNumBitsInLongestCode - i); + if (startPos > kMaxValue) + return false; + m_Limitits[i] = startPos; + m_Positions[i] = m_Positions[i + 1] + lenCounts[i + 1]; + tmpPositions[i] = m_Positions[i] + lenCounts[i]; + + } + + // if _ZIP_MODE do not throw exception for trees containing only one node + // #ifndef _ZIP_MODE + if (startPos != kMaxValue) + return false; + // #endif + + for (symbolIndex = 0; symbolIndex < m_NumSymbols; symbolIndex++) + if (codeLengths[symbolIndex] != 0) + m_Symbols[--tmpPositions[codeLengths[symbolIndex]]] = symbolIndex; + return true; +} + +UInt32 CDecoder::DecodeSymbol(CInBit *inStream) +{ + UInt32 numBits = 0; + UInt32 value = inStream->GetValue(kNumBitsInLongestCode); + int i; + for(i = kNumBitsInLongestCode; i > 0; i--) + { + if (value < m_Limitits[i]) + { + numBits = i; + break; + } + } + if (i == 0) + return 0xFFFFFFFF; + inStream->MovePos(numBits); + UInt32 index = m_Positions[numBits] + + ((value - m_Limitits[numBits + 1]) >> (kNumBitsInLongestCode - numBits)); + if (index >= m_NumSymbols) + return 0xFFFFFFFF; + return m_Symbols[index]; +} + +}}} diff --git a/CPP/7zip/Compress/ImplodeHuffmanDecoder.h b/CPP/7zip/Compress/ImplodeHuffmanDecoder.h new file mode 100644 index 0000000..6120a35 --- /dev/null +++ b/CPP/7zip/Compress/ImplodeHuffmanDecoder.h @@ -0,0 +1,34 @@ +// ImplodeHuffmanDecoder.h + +#ifndef __IMPLODE_HUFFMAN_DECODER_H +#define __IMPLODE_HUFFMAN_DECODER_H + +#include "../Common/InBuffer.h" + +#include "BitlDecoder.h" + +namespace NCompress { +namespace NImplode { +namespace NHuffman { + +const int kNumBitsInLongestCode = 16; + +typedef NBitl::CDecoder CInBit; + +class CDecoder +{ + UInt32 m_Limitits[kNumBitsInLongestCode + 2]; // m_Limitits[i] = value limit for symbols with length = i + UInt32 m_Positions[kNumBitsInLongestCode + 2]; // m_Positions[i] = index in m_Symbols[] of first symbol with length = i + UInt32 m_NumSymbols; // number of symbols in m_Symbols + UInt32 *m_Symbols; // symbols: at first with len=1 then 2, ... 15. +public: + CDecoder(UInt32 numSymbols); + ~CDecoder(); + + bool SetCodeLengths(const Byte *codeLengths); + UInt32 DecodeSymbol(CInBit *inStream); +}; + +}}} + +#endif diff --git a/CPP/7zip/Compress/LZMA_Alone/LzmaAlone.cpp b/CPP/7zip/Compress/LZMA_Alone/LzmaAlone.cpp new file mode 100644 index 0000000..e34e2ed --- /dev/null +++ b/CPP/7zip/Compress/LZMA_Alone/LzmaAlone.cpp @@ -0,0 +1,531 @@ +// LzmaAlone.cpp + +#include "StdAfx.h" + +#include "../../../Common/MyWindows.h" +#include "../../../Common/MyInitGuid.h" + +#include + +#if defined(_WIN32) || defined(OS2) || defined(MSDOS) +#include +#include +#define MY_SET_BINARY_MODE(file) _setmode(_fileno(file), O_BINARY) +#else +#define MY_SET_BINARY_MODE(file) +#endif + +#include "../../../Common/CommandLineParser.h" +#include "../../../Common/StringConvert.h" +#include "../../../Common/StringToInt.h" + +#include "../../Common/FileStreams.h" +#include "../../Common/StreamUtils.h" + +#include "../LzmaDecoder.h" +#include "../LzmaEncoder.h" + +#include "LzmaBenchCon.h" + +#ifndef _7ZIP_ST +#include "../../../Windows/System.h" +#endif + +#include "../../../../C/7zVersion.h" +#include "../../../../C/Alloc.h" +#include "../../../../C/LzmaUtil/Lzma86Dec.h" +#include "../../../../C/LzmaUtil/Lzma86Enc.h" + +using namespace NCommandLineParser; + +#ifdef _WIN32 +bool g_IsNT = false; +static inline bool IsItWindowsNT() +{ + OSVERSIONINFO versionInfo; + versionInfo.dwOSVersionInfoSize = sizeof(versionInfo); + if (!::GetVersionEx(&versionInfo)) + return false; + return (versionInfo.dwPlatformId == VER_PLATFORM_WIN32_NT); +} +#endif + +static const char *kCantAllocate = "Can not allocate memory"; +static const char *kReadError = "Read error"; +static const char *kWriteError = "Write error"; + +namespace NKey { +enum Enum +{ + kHelp1 = 0, + kHelp2, + kAlgo, + kDict, + kFb, + kMc, + kLc, + kLp, + kPb, + kMatchFinder, + kMultiThread, + kEOS, + kStdIn, + kStdOut, + kFilter86 +}; +} + +static const CSwitchForm kSwitchForms[] = +{ + { L"?", NSwitchType::kSimple, false }, + { L"H", NSwitchType::kSimple, false }, + { L"A", NSwitchType::kUnLimitedPostString, false, 1 }, + { L"D", NSwitchType::kUnLimitedPostString, false, 1 }, + { L"FB", NSwitchType::kUnLimitedPostString, false, 1 }, + { L"MC", NSwitchType::kUnLimitedPostString, false, 1 }, + { L"LC", NSwitchType::kUnLimitedPostString, false, 1 }, + { L"LP", NSwitchType::kUnLimitedPostString, false, 1 }, + { L"PB", NSwitchType::kUnLimitedPostString, false, 1 }, + { L"MF", NSwitchType::kUnLimitedPostString, false, 1 }, + { L"MT", NSwitchType::kUnLimitedPostString, false, 0 }, + { L"EOS", NSwitchType::kSimple, false }, + { L"SI", NSwitchType::kSimple, false }, + { L"SO", NSwitchType::kSimple, false }, + { L"F86", NSwitchType::kPostChar, false, 0, 0, L"+" } +}; + +static const int kNumSwitches = sizeof(kSwitchForms) / sizeof(kSwitchForms[0]); + +static void PrintHelp() +{ + fprintf(stderr, "\nUsage: LZMA inputFile outputFile [...]\n" + " e: encode file\n" + " d: decode file\n" + " b: Benchmark\n" + "\n" + " -a{N}: set compression mode - [0, 1], default: 1 (max)\n" + " -d{N}: set dictionary size - [12, 30], default: 23 (8MB)\n" + " -fb{N}: set number of fast bytes - [5, 273], default: 128\n" + " -mc{N}: set number of cycles for match finder\n" + " -lc{N}: set number of literal context bits - [0, 8], default: 3\n" + " -lp{N}: set number of literal pos bits - [0, 4], default: 0\n" + " -pb{N}: set number of pos bits - [0, 4], default: 2\n" + " -mf{MF_ID}: set Match Finder: [bt2, bt3, bt4, hc4], default: bt4\n" + " -mt{N}: set number of CPU threads\n" + " -eos: write End Of Stream marker\n" + " -si: read data from stdin\n" + " -so: write data to stdout\n" + ); +} + +static void PrintHelpAndExit(const char *s) +{ + fprintf(stderr, "\nError: %s\n\n", s); + PrintHelp(); + throw -1; +} + +static void IncorrectCommand() +{ + PrintHelpAndExit("Incorrect command"); +} + +static void WriteArgumentsToStringList(int numArguments, const char *arguments[], + UStringVector &strings) +{ + for(int i = 1; i < numArguments; i++) + strings.Add(MultiByteToUnicodeString(arguments[i])); +} + +static bool GetNumber(const wchar_t *s, UInt32 &value) +{ + value = 0; + if (MyStringLen(s) == 0) + return false; + const wchar_t *end; + UInt64 res = ConvertStringToUInt64(s, &end); + if (*end != L'\0') + return false; + if (res > 0xFFFFFFFF) + return false; + value = UInt32(res); + return true; +} + +static void ParseUInt32(const CParser &parser, int index, UInt32 &res) +{ + if (parser[index].ThereIs) + if (!GetNumber(parser[index].PostStrings[0], res)) + IncorrectCommand(); +} + +int main2(int n, const char *args[]) +{ + #ifdef _WIN32 + g_IsNT = IsItWindowsNT(); + #endif + + fprintf(stderr, "\nLZMA " MY_VERSION_COPYRIGHT_DATE "\n"); + + if (n == 1) + { + PrintHelp(); + return 0; + } + + bool unsupportedTypes = (sizeof(Byte) != 1 || sizeof(UInt32) < 4 || sizeof(UInt64) < 4); + if (unsupportedTypes) + { + fprintf(stderr, "Unsupported base types. Edit Common/Types.h and recompile"); + return 1; + } + + UStringVector commandStrings; + WriteArgumentsToStringList(n, args, commandStrings); + CParser parser(kNumSwitches); + try + { + parser.ParseStrings(kSwitchForms, commandStrings); + } + catch(...) + { + IncorrectCommand(); + } + + if(parser[NKey::kHelp1].ThereIs || parser[NKey::kHelp2].ThereIs) + { + PrintHelp(); + return 0; + } + const UStringVector &nonSwitchStrings = parser.NonSwitchStrings; + + int paramIndex = 0; + if (paramIndex >= nonSwitchStrings.Size()) + IncorrectCommand(); + const UString &command = nonSwitchStrings[paramIndex++]; + + bool dictDefined = false; + UInt32 dict = (UInt32)-1; + if(parser[NKey::kDict].ThereIs) + { + UInt32 dicLog; + if (!GetNumber(parser[NKey::kDict].PostStrings[0], dicLog)) + IncorrectCommand(); + dict = 1 << dicLog; + dictDefined = true; + } + UString mf = L"BT4"; + if (parser[NKey::kMatchFinder].ThereIs) + mf = parser[NKey::kMatchFinder].PostStrings[0]; + + UInt32 numThreads = (UInt32)-1; + + #ifndef _7ZIP_ST + if (parser[NKey::kMultiThread].ThereIs) + { + UInt32 numCPUs = NWindows::NSystem::GetNumberOfProcessors(); + const UString &s = parser[NKey::kMultiThread].PostStrings[0]; + if (s.IsEmpty()) + numThreads = numCPUs; + else + if (!GetNumber(s, numThreads)) + IncorrectCommand(); + } + #endif + + if (command.CompareNoCase(L"b") == 0) + { + const UInt32 kNumDefaultItereations = 1; + UInt32 numIterations = kNumDefaultItereations; + { + if (paramIndex < nonSwitchStrings.Size()) + if (!GetNumber(nonSwitchStrings[paramIndex++], numIterations)) + numIterations = kNumDefaultItereations; + } + return LzmaBenchCon(stderr, numIterations, numThreads, dict); + } + + if (numThreads == (UInt32)-1) + numThreads = 1; + + bool encodeMode = false; + if (command.CompareNoCase(L"e") == 0) + encodeMode = true; + else if (command.CompareNoCase(L"d") == 0) + encodeMode = false; + else + IncorrectCommand(); + + bool stdInMode = parser[NKey::kStdIn].ThereIs; + bool stdOutMode = parser[NKey::kStdOut].ThereIs; + + CMyComPtr inStream; + CInFileStream *inStreamSpec = 0; + if (stdInMode) + { + inStream = new CStdInFileStream; + MY_SET_BINARY_MODE(stdin); + } + else + { + if (paramIndex >= nonSwitchStrings.Size()) + IncorrectCommand(); + const UString &inputName = nonSwitchStrings[paramIndex++]; + inStreamSpec = new CInFileStream; + inStream = inStreamSpec; + if (!inStreamSpec->Open(GetSystemString(inputName))) + { + fprintf(stderr, "\nError: can not open input file %s\n", + (const char *)GetOemString(inputName)); + return 1; + } + } + + CMyComPtr outStream; + COutFileStream *outStreamSpec = NULL; + if (stdOutMode) + { + outStream = new CStdOutFileStream; + MY_SET_BINARY_MODE(stdout); + } + else + { + if (paramIndex >= nonSwitchStrings.Size()) + IncorrectCommand(); + const UString &outputName = nonSwitchStrings[paramIndex++]; + outStreamSpec = new COutFileStream; + outStream = outStreamSpec; + if (!outStreamSpec->Create(GetSystemString(outputName), true)) + { + fprintf(stderr, "\nError: can not open output file %s\n", + (const char *)GetOemString(outputName)); + return 1; + } + } + + if (parser[NKey::kFilter86].ThereIs) + { + // -f86 switch is for x86 filtered mode: BCJ + LZMA. + if (parser[NKey::kEOS].ThereIs || stdInMode) + throw "Can not use stdin in this mode"; + UInt64 fileSize; + inStreamSpec->File.GetLength(fileSize); + if (fileSize > 0xF0000000) + throw "File is too big"; + size_t inSize = (size_t)fileSize; + Byte *inBuffer = 0; + if (inSize != 0) + { + inBuffer = (Byte *)MyAlloc((size_t)inSize); + if (inBuffer == 0) + throw kCantAllocate; + } + + if (ReadStream_FAIL(inStream, inBuffer, inSize) != S_OK) + throw "Can not read"; + + Byte *outBuffer = 0; + size_t outSize; + if (encodeMode) + { + // we allocate 105% of original size for output buffer + outSize = (size_t)fileSize / 20 * 21 + (1 << 16); + if (outSize != 0) + { + outBuffer = (Byte *)MyAlloc((size_t)outSize); + if (outBuffer == 0) + throw kCantAllocate; + } + if (!dictDefined) + dict = 1 << 23; + int res = Lzma86_Encode(outBuffer, &outSize, inBuffer, inSize, + 5, dict, parser[NKey::kFilter86].PostCharIndex == 0 ? SZ_FILTER_YES : SZ_FILTER_AUTO); + if (res != 0) + { + fprintf(stderr, "\nEncoder error = %d\n", (int)res); + return 1; + } + } + else + { + UInt64 outSize64; + if (Lzma86_GetUnpackSize(inBuffer, inSize, &outSize64) != 0) + throw "data error"; + outSize = (size_t)outSize64; + if (outSize != outSize64) + throw "too big"; + if (outSize != 0) + { + outBuffer = (Byte *)MyAlloc(outSize); + if (outBuffer == 0) + throw kCantAllocate; + } + int res = Lzma86_Decode(outBuffer, &outSize, inBuffer, &inSize); + if (inSize != (size_t)fileSize) + throw "incorrect processed size"; + if (res != 0) + throw "LzmaDecoder error"; + } + if (WriteStream(outStream, outBuffer, outSize) != S_OK) + throw kWriteError; + MyFree(outBuffer); + MyFree(inBuffer); + return 0; + } + + + UInt64 fileSize; + if (encodeMode) + { + NCompress::NLzma::CEncoder *encoderSpec = new NCompress::NLzma::CEncoder; + CMyComPtr encoder = encoderSpec; + + if (!dictDefined) + dict = 1 << 23; + + UInt32 pb = 2; + UInt32 lc = 3; // = 0; for 32-bit data + UInt32 lp = 0; // = 2; for 32-bit data + UInt32 algo = 1; + UInt32 fb = 128; + UInt32 mc = 16 + fb / 2; + bool mcDefined = false; + + bool eos = parser[NKey::kEOS].ThereIs || stdInMode; + + ParseUInt32(parser, NKey::kAlgo, algo); + ParseUInt32(parser, NKey::kFb, fb); + ParseUInt32(parser, NKey::kLc, lc); + ParseUInt32(parser, NKey::kLp, lp); + ParseUInt32(parser, NKey::kPb, pb); + + mcDefined = parser[NKey::kMc].ThereIs; + if (mcDefined) + if (!GetNumber(parser[NKey::kMc].PostStrings[0], mc)) + IncorrectCommand(); + + PROPID propIDs[] = + { + NCoderPropID::kDictionarySize, + NCoderPropID::kPosStateBits, + NCoderPropID::kLitContextBits, + NCoderPropID::kLitPosBits, + NCoderPropID::kAlgorithm, + NCoderPropID::kNumFastBytes, + NCoderPropID::kMatchFinder, + NCoderPropID::kEndMarker, + NCoderPropID::kNumThreads, + NCoderPropID::kMatchFinderCycles, + }; + const int kNumPropsMax = sizeof(propIDs) / sizeof(propIDs[0]); + + PROPVARIANT props[kNumPropsMax]; + for (int p = 0; p < 6; p++) + props[p].vt = VT_UI4; + + props[0].ulVal = (UInt32)dict; + props[1].ulVal = (UInt32)pb; + props[2].ulVal = (UInt32)lc; + props[3].ulVal = (UInt32)lp; + props[4].ulVal = (UInt32)algo; + props[5].ulVal = (UInt32)fb; + + props[6].vt = VT_BSTR; + props[6].bstrVal = (BSTR)(const wchar_t *)mf; + + props[7].vt = VT_BOOL; + props[7].boolVal = eos ? VARIANT_TRUE : VARIANT_FALSE; + + props[8].vt = VT_UI4; + props[8].ulVal = (UInt32)numThreads; + + // it must be last in property list + props[9].vt = VT_UI4; + props[9].ulVal = (UInt32)mc; + + int numProps = kNumPropsMax; + if (!mcDefined) + numProps--; + + if (encoderSpec->SetCoderProperties(propIDs, props, numProps) != S_OK) + IncorrectCommand(); + encoderSpec->WriteCoderProperties(outStream); + + if (eos || stdInMode) + fileSize = (UInt64)(Int64)-1; + else + inStreamSpec->File.GetLength(fileSize); + + for (int i = 0; i < 8; i++) + { + Byte b = Byte(fileSize >> (8 * i)); + if (outStream->Write(&b, 1, 0) != S_OK) + { + fprintf(stderr, kWriteError); + return 1; + } + } + HRESULT result = encoder->Code(inStream, outStream, 0, 0, 0); + if (result == E_OUTOFMEMORY) + { + fprintf(stderr, "\nError: Can not allocate memory\n"); + return 1; + } + else if (result != S_OK) + { + fprintf(stderr, "\nEncoder error = %X\n", (unsigned int)result); + return 1; + } + } + else + { + NCompress::NLzma::CDecoder *decoderSpec = new NCompress::NLzma::CDecoder; + CMyComPtr decoder = decoderSpec; + decoderSpec->FinishStream = true; + const UInt32 kPropertiesSize = 5; + Byte header[kPropertiesSize + 8]; + if (ReadStream_FALSE(inStream, header, kPropertiesSize + 8) != S_OK) + { + fprintf(stderr, kReadError); + return 1; + } + if (decoderSpec->SetDecoderProperties2(header, kPropertiesSize) != S_OK) + { + fprintf(stderr, "SetDecoderProperties error"); + return 1; + } + fileSize = 0; + for (int i = 0; i < 8; i++) + fileSize |= ((UInt64)header[kPropertiesSize + i]) << (8 * i); + + if (decoder->Code(inStream, outStream, 0, (fileSize == (UInt64)(Int64)-1) ? 0 : &fileSize, 0) != S_OK) + { + fprintf(stderr, "Decoder error"); + return 1; + } + } + if (outStreamSpec != NULL) + { + if (outStreamSpec->Close() != S_OK) + { + fprintf(stderr, "File closing error"); + return 1; + } + } + return 0; +} + +int MY_CDECL main(int n, const char *args[]) +{ + try { return main2(n, args); } + catch(const char *s) + { + fprintf(stderr, "\nError: %s\n", s); + return 1; + } + catch(...) + { + fprintf(stderr, "\nError\n"); + return 1; + } +} diff --git a/CPP/7zip/Compress/LZMA_Alone/LzmaBench.cpp b/CPP/7zip/Compress/LZMA_Alone/LzmaBench.cpp new file mode 100644 index 0000000..6a325fe --- /dev/null +++ b/CPP/7zip/Compress/LZMA_Alone/LzmaBench.cpp @@ -0,0 +1,1018 @@ +// LzmaBench.cpp + +#include "StdAfx.h" + +#include "LzmaBench.h" + +#ifndef _WIN32 +#define USE_POSIX_TIME +#define USE_POSIX_TIME2 +#endif + +#ifdef USE_POSIX_TIME +#include +#ifdef USE_POSIX_TIME2 +#include +#endif +#endif + +#ifdef _WIN32 +#define USE_ALLOCA +#endif + +#ifdef USE_ALLOCA +#ifdef _WIN32 +#include +#else +#include +#endif +#endif + +#include "../../../../C/7zCrc.h" +#include "../../../../C/Alloc.h" + +#include "../../../Common/MyCom.h" + +#ifdef BENCH_MT +#include "../../../Windows/Synchronization.h" +#include "../../../Windows/Thread.h" +#endif + +#ifdef EXTERNAL_LZMA +#include "../../../Windows/PropVariant.h" +#include "../../ICoder.h" +#else +#include "../LzmaDecoder.h" +#include "../LzmaEncoder.h" +#endif + +static const UInt32 kUncompressMinBlockSize = 1 << 26; +static const UInt32 kAdditionalSize = (1 << 16); +static const UInt32 kCompressedAdditionalSize = (1 << 10); +static const UInt32 kMaxLzmaPropSize = 5; + +class CBaseRandomGenerator +{ + UInt32 A1; + UInt32 A2; +public: + CBaseRandomGenerator() { Init(); } + void Init() { A1 = 362436069; A2 = 521288629;} + UInt32 GetRnd() + { + return + ((A1 = 36969 * (A1 & 0xffff) + (A1 >> 16)) << 16) + + ((A2 = 18000 * (A2 & 0xffff) + (A2 >> 16)) ); + } +}; + +class CBenchBuffer +{ +public: + size_t BufferSize; + Byte *Buffer; + CBenchBuffer(): Buffer(0) {} + virtual ~CBenchBuffer() { Free(); } + void Free() + { + ::MidFree(Buffer); + Buffer = 0; + } + bool Alloc(size_t bufferSize) + { + if (Buffer != 0 && BufferSize == bufferSize) + return true; + Free(); + Buffer = (Byte *)::MidAlloc(bufferSize); + BufferSize = bufferSize; + return (Buffer != 0); + } +}; + +class CBenchRandomGenerator: public CBenchBuffer +{ + CBaseRandomGenerator *RG; +public: + void Set(CBaseRandomGenerator *rg) { RG = rg; } + UInt32 GetVal(UInt32 &res, int numBits) + { + UInt32 val = res & (((UInt32)1 << numBits) - 1); + res >>= numBits; + return val; + } + UInt32 GetLen(UInt32 &res) + { + UInt32 len = GetVal(res, 2); + return GetVal(res, 1 + len); + } + void Generate() + { + UInt32 pos = 0; + UInt32 rep0 = 1; + while (pos < BufferSize) + { + UInt32 res = RG->GetRnd(); + res >>= 1; + if (GetVal(res, 1) == 0 || pos < 1024) + Buffer[pos++] = (Byte)(res & 0xFF); + else + { + UInt32 len; + len = 1 + GetLen(res); + if (GetVal(res, 3) != 0) + { + len += GetLen(res); + do + { + UInt32 ppp = GetVal(res, 5) + 6; + res = RG->GetRnd(); + if (ppp > 30) + continue; + rep0 = /* (1 << ppp) +*/ GetVal(res, ppp); + res = RG->GetRnd(); + } + while (rep0 >= pos); + rep0++; + } + + for (UInt32 i = 0; i < len && pos < BufferSize; i++, pos++) + Buffer[pos] = Buffer[pos - rep0]; + } + } + } +}; + + +class CBenchmarkInStream: + public ISequentialInStream, + public CMyUnknownImp +{ + const Byte *Data; + size_t Pos; + size_t Size; +public: + MY_UNKNOWN_IMP + void Init(const Byte *data, size_t size) + { + Data = data; + Size = size; + Pos = 0; + } + STDMETHOD(Read)(void *data, UInt32 size, UInt32 *processedSize); +}; + +STDMETHODIMP CBenchmarkInStream::Read(void *data, UInt32 size, UInt32 *processedSize) +{ + size_t remain = Size - Pos; + UInt32 kMaxBlockSize = (1 << 20); + if (size > kMaxBlockSize) + size = kMaxBlockSize; + if (size > remain) + size = (UInt32)remain; + for (UInt32 i = 0; i < size; i++) + ((Byte *)data)[i] = Data[Pos + i]; + Pos += size; + if(processedSize != NULL) + *processedSize = size; + return S_OK; +} + +class CBenchmarkOutStream: + public ISequentialOutStream, + public CBenchBuffer, + public CMyUnknownImp +{ + // bool _overflow; +public: + UInt32 Pos; + // CBenchmarkOutStream(): _overflow(false) {} + void Init() + { + // _overflow = false; + Pos = 0; + } + MY_UNKNOWN_IMP + STDMETHOD(Write)(const void *data, UInt32 size, UInt32 *processedSize); +}; + +STDMETHODIMP CBenchmarkOutStream::Write(const void *data, UInt32 size, UInt32 *processedSize) +{ + size_t curSize = BufferSize - Pos; + if (curSize > size) + curSize = size; + memcpy(Buffer + Pos, data, curSize); + Pos += (UInt32)curSize; + if(processedSize != NULL) + *processedSize = (UInt32)curSize; + if (curSize != size) + { + // _overflow = true; + return E_FAIL; + } + return S_OK; +} + +class CCrcOutStream: + public ISequentialOutStream, + public CMyUnknownImp +{ +public: + UInt32 Crc; + MY_UNKNOWN_IMP + void Init() { Crc = CRC_INIT_VAL; } + STDMETHOD(Write)(const void *data, UInt32 size, UInt32 *processedSize); +}; + +STDMETHODIMP CCrcOutStream::Write(const void *data, UInt32 size, UInt32 *processedSize) +{ + Crc = CrcUpdate(Crc, data, size); + if (processedSize != NULL) + *processedSize = size; + return S_OK; +} + +static UInt64 GetTimeCount() +{ + #ifdef USE_POSIX_TIME + #ifdef USE_POSIX_TIME2 + timeval v; + if (gettimeofday(&v, 0) == 0) + return (UInt64)(v.tv_sec) * 1000000 + v.tv_usec; + return (UInt64)time(NULL) * 1000000; + #else + return time(NULL); + #endif + #else + /* + LARGE_INTEGER value; + if (::QueryPerformanceCounter(&value)) + return value.QuadPart; + */ + return GetTickCount(); + #endif +} + +static UInt64 GetFreq() +{ + #ifdef USE_POSIX_TIME + #ifdef USE_POSIX_TIME2 + return 1000000; + #else + return 1; + #endif + #else + /* + LARGE_INTEGER value; + if (::QueryPerformanceFrequency(&value)) + return value.QuadPart; + */ + return 1000; + #endif +} + +#ifndef USE_POSIX_TIME +static inline UInt64 GetTime64(const FILETIME &t) { return ((UInt64)t.dwHighDateTime << 32) | t.dwLowDateTime; } +#endif +static UInt64 GetUserTime() +{ + #ifdef USE_POSIX_TIME + return clock(); + #else + FILETIME creationTime, exitTime, kernelTime, userTime; + if (::GetProcessTimes(::GetCurrentProcess(), &creationTime, &exitTime, &kernelTime, &userTime) != 0) + return GetTime64(userTime) + GetTime64(kernelTime); + return (UInt64)GetTickCount() * 10000; + #endif +} + +static UInt64 GetUserFreq() +{ + #ifdef USE_POSIX_TIME + return CLOCKS_PER_SEC; + #else + return 10000000; + #endif +} + +class CBenchProgressStatus +{ + #ifdef BENCH_MT + NWindows::NSynchronization::CCriticalSection CS; + #endif +public: + HRESULT Res; + bool EncodeMode; + void SetResult(HRESULT res) + { + #ifdef BENCH_MT + NWindows::NSynchronization::CCriticalSectionLock lock(CS); + #endif + Res = res; + } + HRESULT GetResult() + { + #ifdef BENCH_MT + NWindows::NSynchronization::CCriticalSectionLock lock(CS); + #endif + return Res; + } +}; + +class CBenchProgressInfo: + public ICompressProgressInfo, + public CMyUnknownImp +{ +public: + CBenchProgressStatus *Status; + CBenchInfo BenchInfo; + HRESULT Res; + IBenchCallback *callback; + CBenchProgressInfo(): callback(0) {} + MY_UNKNOWN_IMP + STDMETHOD(SetRatioInfo)(const UInt64 *inSize, const UInt64 *outSize); +}; + +void SetStartTime(CBenchInfo &bi) +{ + bi.GlobalFreq = GetFreq(); + bi.UserFreq = GetUserFreq(); + bi.GlobalTime = ::GetTimeCount(); + bi.UserTime = ::GetUserTime(); +} + +void SetFinishTime(const CBenchInfo &biStart, CBenchInfo &dest) +{ + dest.GlobalFreq = GetFreq(); + dest.UserFreq = GetUserFreq(); + dest.GlobalTime = ::GetTimeCount() - biStart.GlobalTime; + dest.UserTime = ::GetUserTime() - biStart.UserTime; +} + +STDMETHODIMP CBenchProgressInfo::SetRatioInfo(const UInt64 *inSize, const UInt64 *outSize) +{ + HRESULT res = Status->GetResult(); + if (res != S_OK) + return res; + if (!callback) + return res; + CBenchInfo info = BenchInfo; + SetFinishTime(BenchInfo, info); + if (Status->EncodeMode) + { + info.UnpackSize = *inSize; + info.PackSize = *outSize; + res = callback->SetEncodeResult(info, false); + } + else + { + info.PackSize = BenchInfo.PackSize + *inSize; + info.UnpackSize = BenchInfo.UnpackSize + *outSize; + res = callback->SetDecodeResult(info, false); + } + if (res != S_OK) + Status->SetResult(res); + return res; +} + +static const int kSubBits = 8; + +static UInt32 GetLogSize(UInt32 size) +{ + for (int i = kSubBits; i < 32; i++) + for (UInt32 j = 0; j < (1 << kSubBits); j++) + if (size <= (((UInt32)1) << i) + (j << (i - kSubBits))) + return (i << kSubBits) + j; + return (32 << kSubBits); +} + +static void NormalizeVals(UInt64 &v1, UInt64 &v2) +{ + while (v1 > 1000000) + { + v1 >>= 1; + v2 >>= 1; + } +} + +UInt64 GetUsage(const CBenchInfo &info) +{ + UInt64 userTime = info.UserTime; + UInt64 userFreq = info.UserFreq; + UInt64 globalTime = info.GlobalTime; + UInt64 globalFreq = info.GlobalFreq; + NormalizeVals(userTime, userFreq); + NormalizeVals(globalFreq, globalTime); + if (userFreq == 0) + userFreq = 1; + if (globalTime == 0) + globalTime = 1; + return userTime * globalFreq * 1000000 / userFreq / globalTime; +} + +UInt64 GetRatingPerUsage(const CBenchInfo &info, UInt64 rating) +{ + UInt64 userTime = info.UserTime; + UInt64 userFreq = info.UserFreq; + UInt64 globalTime = info.GlobalTime; + UInt64 globalFreq = info.GlobalFreq; + NormalizeVals(userFreq, userTime); + NormalizeVals(globalTime, globalFreq); + if (globalFreq == 0) + globalFreq = 1; + if (userTime == 0) + userTime = 1; + return userFreq * globalTime / globalFreq * rating / userTime; +} + +static UInt64 MyMultDiv64(UInt64 value, UInt64 elapsedTime, UInt64 freq) +{ + UInt64 elTime = elapsedTime; + NormalizeVals(freq, elTime); + if (elTime == 0) + elTime = 1; + return value * freq / elTime; +} + +UInt64 GetCompressRating(UInt32 dictionarySize, UInt64 elapsedTime, UInt64 freq, UInt64 size) +{ + UInt64 t = GetLogSize(dictionarySize) - (kBenchMinDicLogSize << kSubBits); + UInt64 numCommandsForOne = 870 + ((t * t * 5) >> (2 * kSubBits)); + UInt64 numCommands = (UInt64)(size) * numCommandsForOne; + return MyMultDiv64(numCommands, elapsedTime, freq); +} + +UInt64 GetDecompressRating(UInt64 elapsedTime, UInt64 freq, UInt64 outSize, UInt64 inSize, UInt32 numIterations) +{ + UInt64 numCommands = (inSize * 200 + outSize * 4) * numIterations; + return MyMultDiv64(numCommands, elapsedTime, freq); +} + +#ifdef EXTERNAL_LZMA +typedef UInt32 (WINAPI * CreateObjectPointer)(const GUID *clsID, + const GUID *interfaceID, void **outObject); +#endif + +struct CEncoderInfo; + +struct CEncoderInfo +{ + #ifdef BENCH_MT + NWindows::CThread thread[2]; + #endif + CMyComPtr encoder; + CBenchProgressInfo *progressInfoSpec[2]; + CMyComPtr progressInfo[2]; + UInt32 NumIterations; + #ifdef USE_ALLOCA + size_t AllocaSize; + #endif + + struct CDecoderInfo + { + CEncoderInfo *Encoder; + UInt32 DecoderIndex; + #ifdef USE_ALLOCA + size_t AllocaSize; + #endif + bool CallbackMode; + }; + CDecoderInfo decodersInfo[2]; + + CMyComPtr decoders[2]; + HRESULT Results[2]; + CBenchmarkOutStream *outStreamSpec; + CMyComPtr outStream; + IBenchCallback *callback; + UInt32 crc; + UInt32 kBufferSize; + UInt32 compressedSize; + CBenchRandomGenerator rg; + CBenchmarkOutStream *propStreamSpec; + CMyComPtr propStream; + HRESULT Init(UInt32 dictionarySize, UInt32 numThreads, CBaseRandomGenerator *rg); + HRESULT Encode(); + HRESULT Decode(UInt32 decoderIndex); + + CEncoderInfo(): outStreamSpec(0), callback(0), propStreamSpec(0) {} + + #ifdef BENCH_MT + static THREAD_FUNC_DECL EncodeThreadFunction(void *param) + { + CEncoderInfo *encoder = (CEncoderInfo *)param; + #ifdef USE_ALLOCA + alloca(encoder->AllocaSize); + #endif + HRESULT res = encoder->Encode(); + encoder->Results[0] = res; + if (res != S_OK) + encoder->progressInfoSpec[0]->Status->SetResult(res); + + return 0; + } + static THREAD_FUNC_DECL DecodeThreadFunction(void *param) + { + CDecoderInfo *decoder = (CDecoderInfo *)param; + #ifdef USE_ALLOCA + alloca(decoder->AllocaSize); + #endif + CEncoderInfo *encoder = decoder->Encoder; + encoder->Results[decoder->DecoderIndex] = encoder->Decode(decoder->DecoderIndex); + return 0; + } + + HRESULT CreateEncoderThread() + { + return thread[0].Create(EncodeThreadFunction, this); + } + + HRESULT CreateDecoderThread(int index, bool callbackMode + #ifdef USE_ALLOCA + , size_t allocaSize + #endif + ) + { + CDecoderInfo &decoder = decodersInfo[index]; + decoder.DecoderIndex = index; + decoder.Encoder = this; + #ifdef USE_ALLOCA + decoder.AllocaSize = allocaSize; + #endif + decoder.CallbackMode = callbackMode; + return thread[index].Create(DecodeThreadFunction, &decoder); + } + #endif +}; + +HRESULT CEncoderInfo::Init(UInt32 dictionarySize, UInt32 numThreads, CBaseRandomGenerator *rgLoc) +{ + rg.Set(rgLoc); + kBufferSize = dictionarySize + kAdditionalSize; + UInt32 kCompressedBufferSize = (kBufferSize / 2) + kCompressedAdditionalSize; + if (!rg.Alloc(kBufferSize)) + return E_OUTOFMEMORY; + rg.Generate(); + crc = CrcCalc(rg.Buffer, rg.BufferSize); + + outStreamSpec = new CBenchmarkOutStream; + if (!outStreamSpec->Alloc(kCompressedBufferSize)) + return E_OUTOFMEMORY; + + outStream = outStreamSpec; + + propStreamSpec = 0; + if (!propStream) + { + propStreamSpec = new CBenchmarkOutStream; + propStream = propStreamSpec; + } + if (!propStreamSpec->Alloc(kMaxLzmaPropSize)) + return E_OUTOFMEMORY; + propStreamSpec->Init(); + + PROPID propIDs[] = + { + NCoderPropID::kDictionarySize, + NCoderPropID::kNumThreads + }; + const int kNumProps = sizeof(propIDs) / sizeof(propIDs[0]); + PROPVARIANT props[kNumProps]; + props[0].vt = VT_UI4; + props[0].ulVal = dictionarySize; + + props[1].vt = VT_UI4; + props[1].ulVal = numThreads; + + { + CMyComPtr setCoderProperties; + RINOK(encoder.QueryInterface(IID_ICompressSetCoderProperties, &setCoderProperties)); + if (!setCoderProperties) + return E_FAIL; + RINOK(setCoderProperties->SetCoderProperties(propIDs, props, kNumProps)); + + CMyComPtr writeCoderProperties; + encoder.QueryInterface(IID_ICompressWriteCoderProperties, &writeCoderProperties); + if (writeCoderProperties) + { + RINOK(writeCoderProperties->WriteCoderProperties(propStream)); + } + } + return S_OK; +} + +HRESULT CEncoderInfo::Encode() +{ + CBenchmarkInStream *inStreamSpec = new CBenchmarkInStream; + CMyComPtr inStream = inStreamSpec; + inStreamSpec->Init(rg.Buffer, rg.BufferSize); + outStreamSpec->Init(); + + RINOK(encoder->Code(inStream, outStream, 0, 0, progressInfo[0])); + compressedSize = outStreamSpec->Pos; + encoder.Release(); + return S_OK; +} + +HRESULT CEncoderInfo::Decode(UInt32 decoderIndex) +{ + CBenchmarkInStream *inStreamSpec = new CBenchmarkInStream; + CMyComPtr inStream = inStreamSpec; + CMyComPtr &decoder = decoders[decoderIndex]; + + CMyComPtr compressSetDecoderProperties; + decoder.QueryInterface(IID_ICompressSetDecoderProperties2, &compressSetDecoderProperties); + if (!compressSetDecoderProperties) + return E_FAIL; + + CCrcOutStream *crcOutStreamSpec = new CCrcOutStream; + CMyComPtr crcOutStream = crcOutStreamSpec; + + CBenchProgressInfo *pi = progressInfoSpec[decoderIndex]; + pi->BenchInfo.UnpackSize = 0; + pi->BenchInfo.PackSize = 0; + + for (UInt32 j = 0; j < NumIterations; j++) + { + inStreamSpec->Init(outStreamSpec->Buffer, compressedSize); + crcOutStreamSpec->Init(); + + RINOK(compressSetDecoderProperties->SetDecoderProperties2(propStreamSpec->Buffer, propStreamSpec->Pos)); + UInt64 outSize = kBufferSize; + RINOK(decoder->Code(inStream, crcOutStream, 0, &outSize, progressInfo[decoderIndex])); + if (CRC_GET_DIGEST(crcOutStreamSpec->Crc) != crc) + return S_FALSE; + pi->BenchInfo.UnpackSize += kBufferSize; + pi->BenchInfo.PackSize += compressedSize; + } + decoder.Release(); + return S_OK; +} + +static const UInt32 kNumThreadsMax = (1 << 16); + +struct CBenchEncoders +{ + CEncoderInfo *encoders; + CBenchEncoders(UInt32 num): encoders(0) { encoders = new CEncoderInfo[num]; } + ~CBenchEncoders() { delete []encoders; } +}; + +HRESULT LzmaBench( + #ifdef EXTERNAL_LZMA + CCodecs *codecs, + #endif + UInt32 numThreads, UInt32 dictionarySize, IBenchCallback *callback) +{ + UInt32 numEncoderThreads = + #ifdef BENCH_MT + (numThreads > 1 ? numThreads / 2 : 1); + #else + 1; + #endif + UInt32 numSubDecoderThreads = + #ifdef BENCH_MT + (numThreads > 1 ? 2 : 1); + #else + 1; + #endif + if (dictionarySize < (1 << kBenchMinDicLogSize) || numThreads < 1 || numEncoderThreads > kNumThreadsMax) + { + return E_INVALIDARG; + } + + CBenchEncoders encodersSpec(numEncoderThreads); + CEncoderInfo *encoders = encodersSpec.encoders; + + #ifdef EXTERNAL_LZMA + UString name = L"LZMA"; + #endif + + UInt32 i; + for (i = 0; i < numEncoderThreads; i++) + { + CEncoderInfo &encoder = encoders[i]; + encoder.callback = (i == 0) ? callback : 0; + + #ifdef EXTERNAL_LZMA + RINOK(codecs->CreateCoder(name, true, encoder.encoder)); + #else + encoder.encoder = new NCompress::NLzma::CEncoder; + #endif + for (UInt32 j = 0; j < numSubDecoderThreads; j++) + { + #ifdef EXTERNAL_LZMA + RINOK(codecs->CreateCoder(name, false, encoder.decoders[j])); + #else + encoder.decoders[j] = new NCompress::NLzma::CDecoder; + #endif + } + } + + CBaseRandomGenerator rg; + rg.Init(); + for (i = 0; i < numEncoderThreads; i++) + { + RINOK(encoders[i].Init(dictionarySize, numThreads, &rg)); + } + + CBenchProgressStatus status; + status.Res = S_OK; + status.EncodeMode = true; + + for (i = 0; i < numEncoderThreads; i++) + { + CEncoderInfo &encoder = encoders[i]; + for (int j = 0; j < 2; j++) + { + encoder.progressInfo[j] = encoder.progressInfoSpec[j] = new CBenchProgressInfo; + encoder.progressInfoSpec[j]->Status = &status; + } + if (i == 0) + { + encoder.progressInfoSpec[0]->callback = callback; + encoder.progressInfoSpec[0]->BenchInfo.NumIterations = numEncoderThreads; + SetStartTime(encoder.progressInfoSpec[0]->BenchInfo); + } + + #ifdef BENCH_MT + if (numEncoderThreads > 1) + { + #ifdef USE_ALLOCA + encoder.AllocaSize = (i * 16 * 21) & 0x7FF; + #endif + RINOK(encoder.CreateEncoderThread()) + } + else + #endif + { + RINOK(encoder.Encode()); + } + } + #ifdef BENCH_MT + if (numEncoderThreads > 1) + for (i = 0; i < numEncoderThreads; i++) + encoders[i].thread[0].Wait(); + #endif + + RINOK(status.Res); + + CBenchInfo info; + + SetFinishTime(encoders[0].progressInfoSpec[0]->BenchInfo, info); + info.UnpackSize = 0; + info.PackSize = 0; + info.NumIterations = 1; // progressInfoSpec->NumIterations; + for (i = 0; i < numEncoderThreads; i++) + { + CEncoderInfo &encoder = encoders[i]; + info.UnpackSize += encoder.kBufferSize; + info.PackSize += encoder.compressedSize; + } + RINOK(callback->SetEncodeResult(info, true)); + + + status.Res = S_OK; + status.EncodeMode = false; + + UInt32 numDecoderThreads = numEncoderThreads * numSubDecoderThreads; + for (i = 0; i < numEncoderThreads; i++) + { + CEncoderInfo &encoder = encoders[i]; + encoder.NumIterations = 2 + kUncompressMinBlockSize / encoder.kBufferSize; + + if (i == 0) + { + encoder.progressInfoSpec[0]->callback = callback; + encoder.progressInfoSpec[0]->BenchInfo.NumIterations = numDecoderThreads; + SetStartTime(encoder.progressInfoSpec[0]->BenchInfo); + } + + #ifdef BENCH_MT + if (numDecoderThreads > 1) + { + for (UInt32 j = 0; j < numSubDecoderThreads; j++) + { + HRESULT res = encoder.CreateDecoderThread(j, (i == 0 && j == 0) + #ifdef USE_ALLOCA + , ((i * numSubDecoderThreads + j) * 16 * 21) & 0x7FF + #endif + ); + RINOK(res); + } + } + else + #endif + { + RINOK(encoder.Decode(0)); + } + } + #ifdef BENCH_MT + HRESULT res = S_OK; + if (numDecoderThreads > 1) + for (i = 0; i < numEncoderThreads; i++) + for (UInt32 j = 0; j < numSubDecoderThreads; j++) + { + CEncoderInfo &encoder = encoders[i]; + encoder.thread[j].Wait(); + if (encoder.Results[j] != S_OK) + res = encoder.Results[j]; + } + RINOK(res); + #endif + RINOK(status.Res); + SetFinishTime(encoders[0].progressInfoSpec[0]->BenchInfo, info); + info.UnpackSize = 0; + info.PackSize = 0; + info.NumIterations = numSubDecoderThreads * encoders[0].NumIterations; + for (i = 0; i < numEncoderThreads; i++) + { + CEncoderInfo &encoder = encoders[i]; + info.UnpackSize += encoder.kBufferSize; + info.PackSize += encoder.compressedSize; + } + RINOK(callback->SetDecodeResult(info, false)); + RINOK(callback->SetDecodeResult(info, true)); + return S_OK; +} + + +inline UInt64 GetLZMAUsage(bool multiThread, UInt32 dictionary) +{ + UInt32 hs = dictionary - 1; + hs |= (hs >> 1); + hs |= (hs >> 2); + hs |= (hs >> 4); + hs |= (hs >> 8); + hs >>= 1; + hs |= 0xFFFF; + if (hs > (1 << 24)) + hs >>= 1; + hs++; + return ((hs + (1 << 16)) + (UInt64)dictionary * 2) * 4 + (UInt64)dictionary * 3 / 2 + + (1 << 20) + (multiThread ? (6 << 20) : 0); +} + +UInt64 GetBenchMemoryUsage(UInt32 numThreads, UInt32 dictionary) +{ + const UInt32 kBufferSize = dictionary; + const UInt32 kCompressedBufferSize = (kBufferSize / 2); + UInt32 numSubThreads = (numThreads > 1) ? 2 : 1; + UInt32 numBigThreads = numThreads / numSubThreads; + return (kBufferSize + kCompressedBufferSize + + GetLZMAUsage((numThreads > 1), dictionary) + (2 << 20)) * numBigThreads; +} + +static bool CrcBig(const void *data, UInt32 size, UInt32 numCycles, UInt32 crcBase) +{ + for (UInt32 i = 0; i < numCycles; i++) + if (CrcCalc(data, size) != crcBase) + return false; + return true; +} + +#ifdef BENCH_MT +struct CCrcInfo +{ + NWindows::CThread Thread; + const Byte *Data; + UInt32 Size; + UInt32 NumCycles; + UInt32 Crc; + bool Res; + void Wait() + { + Thread.Wait(); + Thread.Close(); + } +}; + +static THREAD_FUNC_DECL CrcThreadFunction(void *param) +{ + CCrcInfo *p = (CCrcInfo *)param; + p->Res = CrcBig(p->Data, p->Size, p->NumCycles, p->Crc); + return 0; +} + +struct CCrcThreads +{ + UInt32 NumThreads; + CCrcInfo *Items; + CCrcThreads(): Items(0), NumThreads(0) {} + void WaitAll() + { + for (UInt32 i = 0; i < NumThreads; i++) + Items[i].Wait(); + NumThreads = 0; + } + ~CCrcThreads() + { + WaitAll(); + delete []Items; + } +}; +#endif + +static UInt32 CrcCalc1(const Byte *buf, UInt32 size) +{ + UInt32 crc = CRC_INIT_VAL;; + for (UInt32 i = 0; i < size; i++) + crc = CRC_UPDATE_BYTE(crc, buf[i]); + return CRC_GET_DIGEST(crc); +} + +static void RandGen(Byte *buf, UInt32 size, CBaseRandomGenerator &RG) +{ + for (UInt32 i = 0; i < size; i++) + buf[i] = (Byte)RG.GetRnd(); +} + +static UInt32 RandGenCrc(Byte *buf, UInt32 size, CBaseRandomGenerator &RG) +{ + RandGen(buf, size, RG); + return CrcCalc1(buf, size); +} + +bool CrcInternalTest() +{ + CBenchBuffer buffer; + const UInt32 kBufferSize0 = (1 << 8); + const UInt32 kBufferSize1 = (1 << 10); + const UInt32 kCheckSize = (1 << 5); + if (!buffer.Alloc(kBufferSize0 + kBufferSize1)) + return false; + Byte *buf = buffer.Buffer; + UInt32 i; + for (i = 0; i < kBufferSize0; i++) + buf[i] = (Byte)i; + UInt32 crc1 = CrcCalc1(buf, kBufferSize0); + if (crc1 != 0x29058C73) + return false; + CBaseRandomGenerator RG; + RandGen(buf + kBufferSize0, kBufferSize1, RG); + for (i = 0; i < kBufferSize0 + kBufferSize1 - kCheckSize; i++) + for (UInt32 j = 0; j < kCheckSize; j++) + if (CrcCalc1(buf + i, j) != CrcCalc(buf + i, j)) + return false; + return true; +} + +HRESULT CrcBench(UInt32 numThreads, UInt32 bufferSize, UInt64 &speed) +{ + if (numThreads == 0) + numThreads = 1; + + CBenchBuffer buffer; + size_t totalSize = (size_t)bufferSize * numThreads; + if (totalSize / numThreads != bufferSize) + return E_OUTOFMEMORY; + if (!buffer.Alloc(totalSize)) + return E_OUTOFMEMORY; + + Byte *buf = buffer.Buffer; + CBaseRandomGenerator RG; + UInt32 numCycles = ((UInt32)1 << 30) / ((bufferSize >> 2) + 1) + 1; + + UInt64 timeVal; + #ifdef BENCH_MT + CCrcThreads threads; + if (numThreads > 1) + { + threads.Items = new CCrcInfo[numThreads]; + UInt32 i; + for (i = 0; i < numThreads; i++) + { + CCrcInfo &info = threads.Items[i]; + Byte *data = buf + (size_t)bufferSize * i; + info.Data = data; + info.NumCycles = numCycles; + info.Size = bufferSize; + info.Crc = RandGenCrc(data, bufferSize, RG); + } + timeVal = GetTimeCount(); + for (i = 0; i < numThreads; i++) + { + CCrcInfo &info = threads.Items[i]; + RINOK(info.Thread.Create(CrcThreadFunction, &info)); + threads.NumThreads++; + } + threads.WaitAll(); + for (i = 0; i < numThreads; i++) + if (!threads.Items[i].Res) + return S_FALSE; + } + else + #endif + { + UInt32 crc = RandGenCrc(buf, bufferSize, RG); + timeVal = GetTimeCount(); + if (!CrcBig(buf, bufferSize, numCycles, crc)) + return S_FALSE; + } + timeVal = GetTimeCount() - timeVal; + if (timeVal == 0) + timeVal = 1; + + UInt64 size = (UInt64)numCycles * totalSize; + speed = MyMultDiv64(size, timeVal, GetFreq()); + return S_OK; +} + diff --git a/CPP/7zip/Compress/LZMA_Alone/LzmaBench.h b/CPP/7zip/Compress/LZMA_Alone/LzmaBench.h new file mode 100644 index 0000000..f8aeb6b --- /dev/null +++ b/CPP/7zip/Compress/LZMA_Alone/LzmaBench.h @@ -0,0 +1,48 @@ +// LzmaBench.h + +#ifndef __LZMABENCH_H +#define __LZMABENCH_H + +#include +#include "../../../Common/Types.h" +#ifdef EXTERNAL_LZMA +#include "../../UI/Common/LoadCodecs.h" +#endif + +struct CBenchInfo +{ + UInt64 GlobalTime; + UInt64 GlobalFreq; + UInt64 UserTime; + UInt64 UserFreq; + UInt64 UnpackSize; + UInt64 PackSize; + UInt32 NumIterations; + CBenchInfo(): NumIterations(0) {} +}; + +struct IBenchCallback +{ + virtual HRESULT SetEncodeResult(const CBenchInfo &info, bool final) = 0; + virtual HRESULT SetDecodeResult(const CBenchInfo &info, bool final) = 0; +}; + +UInt64 GetUsage(const CBenchInfo &benchOnfo); +UInt64 GetRatingPerUsage(const CBenchInfo &info, UInt64 rating); +UInt64 GetCompressRating(UInt32 dictionarySize, UInt64 elapsedTime, UInt64 freq, UInt64 size); +UInt64 GetDecompressRating(UInt64 elapsedTime, UInt64 freq, UInt64 outSize, UInt64 inSize, UInt32 numIterations); + +HRESULT LzmaBench( + #ifdef EXTERNAL_LZMA + CCodecs *codecs, + #endif + UInt32 numThreads, UInt32 dictionarySize, IBenchCallback *callback); + +const int kBenchMinDicLogSize = 18; + +UInt64 GetBenchMemoryUsage(UInt32 numThreads, UInt32 dictionary); + +bool CrcInternalTest(); +HRESULT CrcBench(UInt32 numThreads, UInt32 bufferSize, UInt64 &speed); + +#endif diff --git a/CPP/7zip/Compress/LZMA_Alone/LzmaBenchCon.cpp b/CPP/7zip/Compress/LZMA_Alone/LzmaBenchCon.cpp new file mode 100644 index 0000000..b1c455e --- /dev/null +++ b/CPP/7zip/Compress/LZMA_Alone/LzmaBenchCon.cpp @@ -0,0 +1,311 @@ +// LzmaBenchCon.cpp + +#include "StdAfx.h" + +#include + +#include "LzmaBench.h" +#include "LzmaBenchCon.h" +#include "../../../Common/IntToString.h" + +#if defined(BENCH_MT) || defined(_WIN32) +#include "../../../Windows/System.h" +#endif + +#ifdef BREAK_HANDLER +#include "../../UI/Console/ConsoleClose.h" +#endif +#include "../../../Common/MyCom.h" + +struct CTotalBenchRes +{ + UInt64 NumIterations; + UInt64 Rating; + UInt64 Usage; + UInt64 RPU; + void Init() { NumIterations = 0; Rating = 0; Usage = 0; RPU = 0; } + void Normalize() + { + if (NumIterations == 0) + return; + Rating /= NumIterations; + Usage /= NumIterations; + RPU /= NumIterations; + NumIterations = 1; + } + void SetMid(const CTotalBenchRes &r1, const CTotalBenchRes &r2) + { + Rating = (r1.Rating + r2.Rating) / 2; + Usage = (r1.Usage + r2.Usage) / 2; + RPU = (r1.RPU + r2.RPU) / 2; + NumIterations = (r1.NumIterations + r2.NumIterations) / 2; + } +}; + +struct CBenchCallback: public IBenchCallback +{ + CTotalBenchRes EncodeRes; + CTotalBenchRes DecodeRes; + FILE *f; + void Init() { EncodeRes.Init(); DecodeRes.Init(); } + void Normalize() { EncodeRes.Normalize(); DecodeRes.Normalize(); } + UInt32 dictionarySize; + HRESULT SetEncodeResult(const CBenchInfo &info, bool final); + HRESULT SetDecodeResult(const CBenchInfo &info, bool final); +}; + +static void NormalizeVals(UInt64 &v1, UInt64 &v2) +{ + while (v1 > 1000000) + { + v1 >>= 1; + v2 >>= 1; + } +} + +static UInt64 MyMultDiv64(UInt64 value, UInt64 elapsedTime, UInt64 freq) +{ + UInt64 elTime = elapsedTime; + NormalizeVals(freq, elTime); + if (elTime == 0) + elTime = 1; + return value * freq / elTime; +} + +static void PrintNumber(FILE *f, UInt64 value, int size) +{ + char s[32]; + ConvertUInt64ToString(value, s); + fprintf(f, " "); + for (int len = (int)strlen(s); len < size; len++) + fprintf(f, " "); + fprintf(f, "%s", s); +} + +static void PrintRating(FILE *f, UInt64 rating) +{ + PrintNumber(f, rating / 1000000, 6); +} + +static void PrintResults(FILE *f, UInt64 usage, UInt64 rpu, UInt64 rating) +{ + PrintNumber(f, (usage + 5000) / 10000, 5); + PrintRating(f, rpu); + PrintRating(f, rating); +} + + +static void PrintResults(FILE *f, const CBenchInfo &info, UInt64 rating, CTotalBenchRes &res) +{ + UInt64 speed = MyMultDiv64(info.UnpackSize, info.GlobalTime, info.GlobalFreq); + PrintNumber(f, speed / 1024, 7); + UInt64 usage = GetUsage(info); + UInt64 rpu = GetRatingPerUsage(info, rating); + PrintResults(f, usage, rpu, rating); + res.NumIterations++; + res.RPU += rpu; + res.Rating += rating; + res.Usage += usage; +} + +static void PrintTotals(FILE *f, const CTotalBenchRes &res) +{ + fprintf(f, " "); + PrintResults(f, res.Usage, res.RPU, res.Rating); +} + + +HRESULT CBenchCallback::SetEncodeResult(const CBenchInfo &info, bool final) +{ + #ifdef BREAK_HANDLER + if (NConsoleClose::TestBreakSignal()) + return E_ABORT; + #endif + + if (final) + { + UInt64 rating = GetCompressRating(dictionarySize, info.GlobalTime, info.GlobalFreq, info.UnpackSize); + PrintResults(f, info, rating, EncodeRes); + } + return S_OK; +} + +static const char *kSep = " | "; + + +HRESULT CBenchCallback::SetDecodeResult(const CBenchInfo &info, bool final) +{ + #ifdef BREAK_HANDLER + if (NConsoleClose::TestBreakSignal()) + return E_ABORT; + #endif + if (final) + { + UInt64 rating = GetDecompressRating(info.GlobalTime, info.GlobalFreq, info.UnpackSize, info.PackSize, info.NumIterations); + fprintf(f, kSep); + CBenchInfo info2 = info; + info2.UnpackSize *= info2.NumIterations; + info2.PackSize *= info2.NumIterations; + info2.NumIterations = 1; + PrintResults(f, info2, rating, DecodeRes); + } + return S_OK; +} + +static void PrintRequirements(FILE *f, const char *sizeString, UInt64 size, const char *threadsString, UInt32 numThreads) +{ + fprintf(f, "\nRAM %s ", sizeString); + PrintNumber(f, (size >> 20), 5); + fprintf(f, " MB, # %s %3d", threadsString, (unsigned int)numThreads); +} + +HRESULT LzmaBenchCon( + #ifdef EXTERNAL_LZMA + CCodecs *codecs, + #endif + FILE *f, UInt32 numIterations, UInt32 numThreads, UInt32 dictionary) +{ + if (!CrcInternalTest()) + return S_FALSE; + #ifdef BENCH_MT + UInt64 ramSize = NWindows::NSystem::GetRamSize(); // + UInt32 numCPUs = NWindows::NSystem::GetNumberOfProcessors(); + PrintRequirements(f, "size: ", ramSize, "CPU hardware threads:", numCPUs); + if (numThreads == (UInt32)-1) + numThreads = numCPUs; + if (numThreads > 1) + numThreads &= ~1; + if (dictionary == (UInt32)-1) + { + int dicSizeLog; + for (dicSizeLog = 25; dicSizeLog > kBenchMinDicLogSize; dicSizeLog--) + if (GetBenchMemoryUsage(numThreads, ((UInt32)1 << dicSizeLog)) + (8 << 20) <= ramSize) + break; + dictionary = (1 << dicSizeLog); + } + #else + if (dictionary == (UInt32)-1) + dictionary = (1 << 22); + numThreads = 1; + #endif + + PrintRequirements(f, "usage:", GetBenchMemoryUsage(numThreads, dictionary), "Benchmark threads: ", numThreads); + + CBenchCallback callback; + callback.Init(); + callback.f = f; + + fprintf(f, "\n\nDict Compressing | Decompressing\n "); + int j; + for (j = 0; j < 2; j++) + { + fprintf(f, " Speed Usage R/U Rating"); + if (j == 0) + fprintf(f, kSep); + } + fprintf(f, "\n "); + for (j = 0; j < 2; j++) + { + fprintf(f, " KB/s %% MIPS MIPS"); + if (j == 0) + fprintf(f, kSep); + } + fprintf(f, "\n\n"); + for (UInt32 i = 0; i < numIterations; i++) + { + const int kStartDicLog = 22; + int pow = (dictionary < ((UInt32)1 << kStartDicLog)) ? kBenchMinDicLogSize : kStartDicLog; + while (((UInt32)1 << pow) > dictionary) + pow--; + for (; ((UInt32)1 << pow) <= dictionary; pow++) + { + fprintf(f, "%2d:", pow); + callback.dictionarySize = (UInt32)1 << pow; + HRESULT res = LzmaBench( + #ifdef EXTERNAL_LZMA + codecs, + #endif + numThreads, callback.dictionarySize, &callback); + fprintf(f, "\n"); + RINOK(res); + } + } + callback.Normalize(); + fprintf(f, "----------------------------------------------------------------\nAvr:"); + PrintTotals(f, callback.EncodeRes); + fprintf(f, " "); + PrintTotals(f, callback.DecodeRes); + fprintf(f, "\nTot:"); + CTotalBenchRes midRes; + midRes.SetMid(callback.EncodeRes, callback.DecodeRes); + PrintTotals(f, midRes); + fprintf(f, "\n"); + return S_OK; +} + +struct CTempValues +{ + UInt64 *Values; + CTempValues(UInt32 num) { Values = new UInt64[num]; } + ~CTempValues() { delete []Values; } +}; + +HRESULT CrcBenchCon(FILE *f, UInt32 numIterations, UInt32 numThreads, UInt32 dictionary) +{ + if (!CrcInternalTest()) + return S_FALSE; + + #ifdef BENCH_MT + UInt64 ramSize = NWindows::NSystem::GetRamSize(); + UInt32 numCPUs = NWindows::NSystem::GetNumberOfProcessors(); + PrintRequirements(f, "size: ", ramSize, "CPU hardware threads:", numCPUs); + if (numThreads == (UInt32)-1) + numThreads = numCPUs; + #else + numThreads = 1; + #endif + if (dictionary == (UInt32)-1) + dictionary = (1 << 24); + + CTempValues speedTotals(numThreads); + fprintf(f, "\n\nSize"); + for (UInt32 ti = 0; ti < numThreads; ti++) + { + fprintf(f, " %5d", ti + 1); + speedTotals.Values[ti] = 0; + } + fprintf(f, "\n\n"); + + UInt64 numSteps = 0; + for (UInt32 i = 0; i < numIterations; i++) + { + for (int pow = 10; pow < 32; pow++) + { + UInt32 bufSize = (UInt32)1 << pow; + if (bufSize > dictionary) + break; + fprintf(f, "%2d: ", pow); + UInt64 speed; + for (UInt32 ti = 0; ti < numThreads; ti++) + { + #ifdef BREAK_HANDLER + if (NConsoleClose::TestBreakSignal()) + return E_ABORT; + #endif + RINOK(CrcBench(ti + 1, bufSize, speed)); + PrintNumber(f, (speed >> 20), 5); + speedTotals.Values[ti] += speed; + } + fprintf(f, "\n"); + numSteps++; + } + } + if (numSteps != 0) + { + fprintf(f, "\nAvg:"); + for (UInt32 ti = 0; ti < numThreads; ti++) + PrintNumber(f, ((speedTotals.Values[ti] / numSteps) >> 20), 5); + fprintf(f, "\n"); + } + return S_OK; +} diff --git a/CPP/7zip/Compress/LZMA_Alone/LzmaBenchCon.h b/CPP/7zip/Compress/LZMA_Alone/LzmaBenchCon.h new file mode 100644 index 0000000..ea8539d --- /dev/null +++ b/CPP/7zip/Compress/LZMA_Alone/LzmaBenchCon.h @@ -0,0 +1,20 @@ +// LzmaBenchCon.h + +#ifndef __LZMABENCHCON_H +#define __LZMABENCHCON_H + +#include +#include "../../../Common/Types.h" +#ifdef EXTERNAL_LZMA +#include "../../UI/Common/LoadCodecs.h" +#endif +HRESULT LzmaBenchCon( + #ifdef EXTERNAL_LZMA + CCodecs *codecs, + #endif + FILE *f, UInt32 numIterations, UInt32 numThreads, UInt32 dictionary); + +HRESULT CrcBenchCon(FILE *f, UInt32 numIterations, UInt32 numThreads, UInt32 dictionary); + +#endif + diff --git a/CPP/7zip/Compress/LZMA_Alone/makefile b/CPP/7zip/Compress/LZMA_Alone/makefile new file mode 100644 index 0000000..ccf79c7 --- /dev/null +++ b/CPP/7zip/Compress/LZMA_Alone/makefile @@ -0,0 +1,173 @@ +include ../../../../makefile.machine + +PROG = lzma +LIB = $(LOCAL_LIBS) +RM = rm -f +CFLAGS = -c -I. -I../../../ -I../../../myWindows -I../../../include_windows \ + -UENV_UNIX -DCOMPRESS_MF_MT -DBENCH_MT + +CXXFLAGS=$(CFLAGS) + +OBJS = \ + LzmaAlone.o \ + LzmaBench.o \ + LzmaBenchCon.o \ + LzmaDecoder.o \ + LzmaEncoder.o \ + CWrappers.o \ + InBuffer.o \ + OutBuffer.o \ + FileStreams.o \ + StreamUtils.o \ + C_FileIO.o \ + CommandLineParser.o \ + CRC.o \ + IntToString.o \ + MyString.o \ + StringConvert.o \ + UTFConvert.o \ + StringToInt.o \ + MyVector.o \ + 7zCrc.o \ + 7zCrcOpt.o \ + Alloc.o \ + Bra86.o \ + LzFind.o \ + LzFindMt.o \ + LzmaDec.o \ + LzmaEnc.o \ + Lzma86Dec.o \ + Lzma86Enc.o \ + System.o \ + Threads.o + +all: $(PROG) + +$(PROG): $(OBJS) + $(CXX) -o $(PROG) $(LDFLAGS) $(OBJS) $(LIB) + +LzmaAlone.o: LzmaAlone.cpp + $(CXX) $(CXXFLAGS) LzmaAlone.cpp + +LzmaBench.o: LzmaBench.cpp + $(CXX) $(CXXFLAGS) LzmaBench.cpp + +LzmaBenchCon.o: LzmaBenchCon.cpp + $(CXX) $(CXXFLAGS) LzmaBenchCon.cpp + +LzmaRam.o: LzmaRam.cpp + $(CXX) $(CXXFLAGS) LzmaRam.cpp + +LzmaDecoder.o: ../LzmaDecoder.cpp + $(CXX) $(CXXFLAGS) ../LzmaDecoder.cpp + +LzmaEncoder.o: ../LzmaEncoder.cpp + $(CXX) $(CXXFLAGS) ../LzmaEncoder.cpp + +RangeCoderBit.o: ../RangeCoderBit.cpp + $(CXX) $(CXXFLAGS) ../RangeCoderBit.cpp + +CWrappers.o: ../../Common/CWrappers.cpp + $(CXX) $(CXXFLAGS) ../../Common/CWrappers.cpp + +InBuffer.o: ../../Common/InBuffer.cpp + $(CXX) $(CXXFLAGS) ../../Common/InBuffer.cpp + +OutBuffer.o: ../../Common/OutBuffer.cpp + $(CXX) $(CXXFLAGS) ../../Common/OutBuffer.cpp + +FileStreams.o: ../../Common/FileStreams.cpp + $(CXX) $(CXXFLAGS) ../../Common/FileStreams.cpp + +StreamUtils.o: ../../Common/StreamUtils.cpp + $(CXX) $(CXXFLAGS) ../../Common/StreamUtils.cpp + +C_FileIO.o: ../../../Common/C_FileIO.cpp + $(CXX) $(CXXFLAGS) ../../../Common/C_FileIO.cpp + +CommandLineParser.o: ../../../Common/CommandLineParser.cpp + $(CXX) $(CXXFLAGS) ../../../Common/CommandLineParser.cpp + +CRC.o: ../../../Common/CRC.cpp + $(CXX) $(CXXFLAGS) ../../../Common/CRC.cpp + +MyWindows.o: ../../../Common/MyWindows.cpp + $(CXX) $(CXXFLAGS) ../../../Common/MyWindows.cpp + +IntToString.o: ../../../Common/IntToString.cpp + $(CXX) $(CXXFLAGS) ../../../Common/IntToString.cpp + +MyString.o: ../../../Common/MyString.cpp + $(CXX) $(CXXFLAGS) ../../../Common/MyString.cpp + +StringConvert.o: ../../../Common/StringConvert.cpp + $(CXX) $(CXXFLAGS) ../../../Common/StringConvert.cpp + +UTFConvert.o: ../../../Common/UTFConvert.cpp + $(CXX) $(CXXFLAGS) ../../../Common/UTFConvert.cpp + +StringToInt.o: ../../../Common/StringToInt.cpp + $(CXX) $(CXXFLAGS) ../../../Common/StringToInt.cpp + +MyVector.o: ../../../Common/MyVector.cpp + $(CXX) $(CXXFLAGS) ../../../Common/MyVector.cpp + +7zCrc.o: ../../../../C/7zCrc.c + $(CC) $(CFLAGS) ../../../../C/7zCrc.c + +7zCrcOpt.o: ../../../../C/7zCrcOpt.c + $(CC) $(CFLAGS) ../../../../C/7zCrcOpt.c + +LzmaRamDecode.o: LzmaRamDecode.c + $(CC) $(CFLAGS) LzmaRamDecode.c + +System.o : ../../../Windows/System.cpp + $(CXX) $(CXXFLAGS) ../../../Windows/System.cpp + +Threads.o : ../../../../C/Threads.c + $(CC) $(CFLAGS) ../../../../C/Threads.c + +Alloc.o: ../../../../C/Alloc.c + $(CC) $(CFLAGS) ../../../../C/Alloc.c + +Bra86.o: ../../../../C/Bra86.c + $(CC) $(CFLAGS) ../../../../C/Bra86.c + +LzFind.o: ../../../../C/LzFind.c + $(CC) $(CFLAGS) ../../../../C/LzFind.c + +LzFindMt.o: ../../../../C/LzFindMt.c + $(CC) $(CFLAGS) ../../../../C/LzFindMt.c + +LzmaDec.o: ../../../../C/LzmaDec.c + $(CC) $(CFLAGS) ../../../../C/LzmaDec.c + +LzmaEnc.o: ../../../../C/LzmaEnc.c + $(CC) $(CFLAGS) ../../../../C/LzmaEnc.c + +Lzma86Dec.o: ../../../../C/LzmaUtil/Lzma86Dec.c + $(CC) $(CFLAGS) ../../../../C/LzmaUtil/Lzma86Dec.c + +Lzma86Enc.o: ../../../../C/LzmaUtil/Lzma86Enc.c + $(CC) $(CFLAGS) ../../../../C/LzmaUtil/Lzma86Enc.c + +clean: + -$(RM) $(PROG) $(OBJS) testfile* *.exe ir.out + -$(RM) -fr SunWS_cache + +test: $(PROG) + cp LzmaAlone.cpp testfile + ./$(PROG) e testfile testfile.lzma + ./$(PROG) d testfile.lzma testfile.lzma.d + diff -s testfile testfile.lzma.d + ./$(PROG) e testfile testfile.lzma + ./$(PROG) d testfile.lzma testfile.lzma.d + diff -s testfile testfile.lzma.d + ./$(PROG) e -si -so < testfile > testfile.lzma.2 + ./$(PROG) d -si -so < testfile.lzma.2 > testfile.lzma.2.d + diff -s testfile testfile.lzma.2.d + @echo ========= + @echo All Done + @echo ========= + + diff --git a/CPP/7zip/Compress/LzOutWindow.cpp b/CPP/7zip/Compress/LzOutWindow.cpp new file mode 100644 index 0000000..df46295 --- /dev/null +++ b/CPP/7zip/Compress/LzOutWindow.cpp @@ -0,0 +1,14 @@ +// LzOutWindow.cpp + +#include "StdAfx.h" + +#include "LzOutWindow.h" + +void CLzOutWindow::Init(bool solid) +{ + if (!solid) + COutBuffer::Init(); + #ifdef _NO_EXCEPTIONS + ErrorCode = S_OK; + #endif +} diff --git a/CPP/7zip/Compress/LzOutWindow.h b/CPP/7zip/Compress/LzOutWindow.h new file mode 100644 index 0000000..d8d13c2 --- /dev/null +++ b/CPP/7zip/Compress/LzOutWindow.h @@ -0,0 +1,66 @@ +// LzOutWindow.h + +#ifndef __LZ_OUT_WINDOW_H +#define __LZ_OUT_WINDOW_H + +#include "../IStream.h" + +#include "../Common/OutBuffer.h" + +#ifndef _NO_EXCEPTIONS +typedef COutBufferException CLzOutWindowException; +#endif + +class CLzOutWindow: public COutBuffer +{ +public: + void Init(bool solid = false); + + // distance >= 0, len > 0, + bool CopyBlock(UInt32 distance, UInt32 len) + { + UInt32 pos = _pos - distance - 1; + if (distance >= _pos) + { + if (!_overDict || distance >= _bufferSize) + return false; + pos += _bufferSize; + } + if (_limitPos - _pos > len && _bufferSize - pos > len) + { + const Byte *src = _buffer + pos; + Byte *dest = _buffer + _pos; + _pos += len; + do + *dest++ = *src++; + while(--len != 0); + } + else do + { + if (pos == _bufferSize) + pos = 0; + _buffer[_pos++] = _buffer[pos++]; + if (_pos == _limitPos) + FlushWithCheck(); + } + while(--len != 0); + return true; + } + + void PutByte(Byte b) + { + _buffer[_pos++] = b; + if (_pos == _limitPos) + FlushWithCheck(); + } + + Byte GetByte(UInt32 distance) const + { + UInt32 pos = _pos - distance - 1; + if (pos >= _bufferSize) + pos += _bufferSize; + return _buffer[pos]; + } +}; + +#endif diff --git a/CPP/7zip/Compress/LzhDecoder.cpp b/CPP/7zip/Compress/LzhDecoder.cpp new file mode 100644 index 0000000..6f9b506 --- /dev/null +++ b/CPP/7zip/Compress/LzhDecoder.cpp @@ -0,0 +1,220 @@ +// LzhDecoder.cpp + +#include "StdAfx.h" + +#include "LzhDecoder.h" + +#include "Windows/Defs.h" + +namespace NCompress{ +namespace NLzh { +namespace NDecoder { + +static const UInt32 kHistorySize = (1 << 16); + +static const int kBlockSizeBits = 16; +static const int kNumCBits = 9; +static const int kNumLevelBits = 5; // smallest integer such that (1 << kNumLevelBits) > kNumLevelSymbols/ + +UInt32 CCoder::ReadBits(int numBits) { return m_InBitStream.ReadBits(numBits); } + +HRESULT CCoder::ReadLevelTable() +{ + int n = ReadBits(kNumLevelBits); + if (n == 0) + { + m_LevelHuffman.Symbol = ReadBits(kNumLevelBits); + if (m_LevelHuffman.Symbol >= kNumLevelSymbols) + return S_FALSE; + } + else + { + if (n > kNumLevelSymbols) + return S_FALSE; + m_LevelHuffman.Symbol = -1; + Byte lens[kNumLevelSymbols]; + int i = 0; + while (i < n) + { + int c = m_InBitStream.ReadBits(3); + if (c == 7) + while (ReadBits(1)) + if (c++ > kMaxHuffmanLen) + return S_FALSE; + lens[i++] = (Byte)c; + if (i == kNumSpecLevelSymbols) + { + c = ReadBits(2); + while (--c >= 0) + lens[i++] = 0; + } + } + while (i < kNumLevelSymbols) + lens[i++] = 0; + m_LevelHuffman.SetCodeLengths(lens); + } + return S_OK; +} + +HRESULT CCoder::ReadPTable(int numBits) +{ + int n = ReadBits(numBits); + if (n == 0) + { + m_PHuffmanDecoder.Symbol = ReadBits(numBits); + if (m_PHuffmanDecoder.Symbol >= kNumDistanceSymbols) + return S_FALSE; + } + else + { + if (n > kNumDistanceSymbols) + return S_FALSE; + m_PHuffmanDecoder.Symbol = -1; + Byte lens[kNumDistanceSymbols]; + int i = 0; + while (i < n) + { + int c = m_InBitStream.ReadBits(3); + if (c == 7) + while (ReadBits(1)) + { + if (c > kMaxHuffmanLen) + return S_FALSE; + c++; + } + lens[i++] = (Byte)c; + } + while (i < kNumDistanceSymbols) + lens[i++] = 0; + m_PHuffmanDecoder.SetCodeLengths(lens); + } + return S_OK; +} + +HRESULT CCoder::ReadCTable() +{ + int n = ReadBits(kNumCBits); + if (n == 0) + { + m_CHuffmanDecoder.Symbol = ReadBits(kNumCBits); + if (m_CHuffmanDecoder.Symbol >= kNumCSymbols) + return S_FALSE; + } + else + { + if (n > kNumCSymbols) + return S_FALSE; + m_CHuffmanDecoder.Symbol = -1; + Byte lens[kNumCSymbols]; + int i = 0; + while (i < n) + { + int c = m_LevelHuffman.Decode(&m_InBitStream); + if (c < kNumSpecLevelSymbols) + { + if (c == 0) + c = 1; + else if (c == 1) + c = ReadBits(4) + 3; + else + c = ReadBits(kNumCBits) + 20; + while (--c >= 0) + { + if (i > kNumCSymbols) + return S_FALSE; + lens[i++] = 0; + } + } + else + lens[i++] = (Byte)(c - 2); + } + while (i < kNumCSymbols) + lens[i++] = 0; + m_CHuffmanDecoder.SetCodeLengths(lens); + } + return S_OK; +} + +STDMETHODIMP CCoder::CodeReal(ISequentialInStream *inStream, + ISequentialOutStream *outStream, const UInt64 * /* inSize */, const UInt64 *outSize, + ICompressProgressInfo *progress) +{ + if (outSize == NULL) + return E_INVALIDARG; + + if (!m_OutWindowStream.Create(kHistorySize)) + return E_OUTOFMEMORY; + if (!m_InBitStream.Create(1 << 20)) + return E_OUTOFMEMORY; + + UInt64 pos = 0; + m_OutWindowStream.SetStream(outStream); + m_OutWindowStream.Init(false); + m_InBitStream.SetStream(inStream); + m_InBitStream.Init(); + + CCoderReleaser coderReleaser(this); + + int pbit; + if (m_NumDictBits <= 13) + pbit = 4; + else + pbit = 5; + + UInt32 blockSize = 0; + + while(pos < *outSize) + { + // for (i = 0; i < dictSize; i++) dtext[i] = 0x20; + + if (blockSize == 0) + { + if (progress != NULL) + { + UInt64 packSize = m_InBitStream.GetProcessedSize(); + RINOK(progress->SetRatioInfo(&packSize, &pos)); + } + blockSize = ReadBits(kBlockSizeBits); + ReadLevelTable(); + ReadCTable(); + RINOK(ReadPTable(pbit)); + } + blockSize--; + UInt32 c = m_CHuffmanDecoder.Decode(&m_InBitStream); + if (c < 256) + { + m_OutWindowStream.PutByte((Byte)c); + pos++; + } + else if (c >= kNumCSymbols) + return S_FALSE; + else + { + // offset = (interface->method == LARC_METHOD_NUM) ? 0x100 - 2 : 0x100 - 3; + UInt32 len = c - 256 + kMinMatch; + UInt32 distance = m_PHuffmanDecoder.Decode(&m_InBitStream); + if (distance != 0) + distance = (1 << (distance - 1)) + ReadBits(distance - 1); + if (distance >= pos) + return S_FALSE; + if (pos + len > *outSize) + len = (UInt32)(*outSize - pos); + pos += len; + m_OutWindowStream.CopyBlock(distance, len); + } + } + coderReleaser.NeedFlush = false; + return m_OutWindowStream.Flush(); +} + +STDMETHODIMP CCoder::Code(ISequentialInStream *inStream, + ISequentialOutStream *outStream, const UInt64 *inSize, const UInt64 *outSize, + ICompressProgressInfo *progress) +{ + try { return CodeReal(inStream, outStream, inSize, outSize, progress);} + catch(const CInBufferException &e) { return e.ErrorCode; } + catch(const CLzOutWindowException &e) { return e.ErrorCode; } + catch(...) { return S_FALSE; } +} + +}}} diff --git a/CPP/7zip/Compress/LzhDecoder.h b/CPP/7zip/Compress/LzhDecoder.h new file mode 100644 index 0000000..4c32d63 --- /dev/null +++ b/CPP/7zip/Compress/LzhDecoder.h @@ -0,0 +1,106 @@ +// LzhDecoder.h + +#ifndef __COMPRESS_LZH_DECODER_H +#define __COMPRESS_LZH_DECODER_H + +#include "../../Common/MyCom.h" + +#include "../ICoder.h" + +#include "../Common/InBuffer.h" + +#include "BitmDecoder.h" +#include "HuffmanDecoder.h" +#include "LzOutWindow.h" + +namespace NCompress { +namespace NLzh { +namespace NDecoder { + +const int kMaxHuffmanLen = 16; // Check it + +const int kNumSpecLevelSymbols = 3; +const int kNumLevelSymbols = kNumSpecLevelSymbols + kMaxHuffmanLen; + +const int kDictBitsMax = 16; +const int kNumDistanceSymbols = kDictBitsMax + 1; + +const int kMaxMatch = 256; +const int kMinMatch = 3; +const int kNumCSymbols = 256 + kMaxMatch + 2 - kMinMatch; + +template +class CHuffmanDecoder:public NCompress::NHuffman::CDecoder +{ +public: + int Symbol; + template + UInt32 Decode(TBitDecoder *bitStream) + { + if (Symbol >= 0) + return (UInt32)Symbol; + return this->DecodeSymbol(bitStream); + } +}; + +class CCoder : + public ICompressCoder, + public CMyUnknownImp +{ + CLzOutWindow m_OutWindowStream; + NBitm::CDecoder m_InBitStream; + + int m_NumDictBits; + + CHuffmanDecoder m_LevelHuffman; + CHuffmanDecoder m_PHuffmanDecoder; + CHuffmanDecoder m_CHuffmanDecoder; + + void ReleaseStreams() + { + m_OutWindowStream.ReleaseStream(); + m_InBitStream.ReleaseStream(); + } + + class CCoderReleaser + { + CCoder *m_Coder; + public: + bool NeedFlush; + CCoderReleaser(CCoder *coder): m_Coder(coder), NeedFlush(true) {} + ~CCoderReleaser() + { + if (NeedFlush) + m_Coder->m_OutWindowStream.Flush(); + m_Coder->ReleaseStreams(); + } + }; + friend class CCoderReleaser; + + void MakeTable(int nchar, Byte *bitlen, int tablebits, + UInt32 *table, int tablesize); + + UInt32 ReadBits(int numBits); + HRESULT ReadLevelTable(); + HRESULT ReadPTable(int numBits); + HRESULT ReadCTable(); + +public: + + MY_UNKNOWN_IMP + + STDMETHOD(CodeReal)(ISequentialInStream *inStream, + ISequentialOutStream *outStream, const UInt64 *inSize, const UInt64 *outSize, + ICompressProgressInfo *progress); + + STDMETHOD(Code)(ISequentialInStream *inStream, + ISequentialOutStream *outStream, const UInt64 *inSize, const UInt64 *outSize, + ICompressProgressInfo *progress); + + void SetDictionary(int numDictBits) { m_NumDictBits = numDictBits; } + CCoder(): m_NumDictBits(0) {} +}; + +}}} + +#endif diff --git a/CPP/7zip/Compress/Lzma2Decoder.cpp b/CPP/7zip/Compress/Lzma2Decoder.cpp new file mode 100644 index 0000000..322015e --- /dev/null +++ b/CPP/7zip/Compress/Lzma2Decoder.cpp @@ -0,0 +1,189 @@ +// Lzma2Decoder.cpp + +#include "StdAfx.h" + +#include "../../../C/Alloc.h" + +#include "../Common/StreamUtils.h" + +#include "Lzma2Decoder.h" + +static HRESULT SResToHRESULT(SRes res) +{ + switch(res) + { + case SZ_OK: return S_OK; + case SZ_ERROR_MEM: return E_OUTOFMEMORY; + case SZ_ERROR_PARAM: return E_INVALIDARG; + // case SZ_ERROR_PROGRESS: return E_ABORT; + case SZ_ERROR_DATA: return S_FALSE; + } + return E_FAIL; +} + +namespace NCompress { +namespace NLzma2 { + +static const UInt32 kInBufSize = 1 << 20; + +CDecoder::CDecoder(): _inBuf(0), _outSizeDefined(false) +{ + Lzma2Dec_Construct(&_state); +} + +static void *SzAlloc(void *p, size_t size) { p = p; return MyAlloc(size); } +static void SzFree(void *p, void *address) { p = p; MyFree(address); } +static ISzAlloc g_Alloc = { SzAlloc, SzFree }; + +CDecoder::~CDecoder() +{ + Lzma2Dec_Free(&_state, &g_Alloc); + MyFree(_inBuf); +} + +STDMETHODIMP CDecoder::SetDecoderProperties2(const Byte *prop, UInt32 size) +{ + if (size != 1) return SZ_ERROR_UNSUPPORTED; + RINOK(SResToHRESULT(Lzma2Dec_Allocate(&_state, prop[0], &g_Alloc))); + if (_inBuf == 0) + { + _inBuf = (Byte *)MyAlloc(kInBufSize); + if (_inBuf == 0) + return E_OUTOFMEMORY; + } + + return S_OK; +} + +STDMETHODIMP CDecoder::GetInStreamProcessedSize(UInt64 *value) { *value = _inSizeProcessed; return S_OK; } +STDMETHODIMP CDecoder::SetInStream(ISequentialInStream *inStream) { _inStream = inStream; return S_OK; } +STDMETHODIMP CDecoder::ReleaseInStream() { _inStream.Release(); return S_OK; } + +STDMETHODIMP CDecoder::SetOutStreamSize(const UInt64 *outSize) +{ + _outSizeDefined = (outSize != NULL); + if (_outSizeDefined) + _outSize = *outSize; + + Lzma2Dec_Init(&_state); + + _inPos = _inSize = 0; + _inSizeProcessed = _outSizeProcessed = 0; + return S_OK; +} + +STDMETHODIMP CDecoder::Code(ISequentialInStream *inStream, + ISequentialOutStream *outStream, const UInt64 * /* inSize */, + const UInt64 *outSize, ICompressProgressInfo *progress) +{ + if (_inBuf == 0) + return S_FALSE; + SetOutStreamSize(outSize); + + for (;;) + { + if (_inPos == _inSize) + { + _inPos = _inSize = 0; + RINOK(inStream->Read(_inBuf, kInBufSize, &_inSize)); + } + + SizeT dicPos = _state.decoder.dicPos; + SizeT curSize = _state.decoder.dicBufSize - dicPos; + const UInt32 kStepSize = ((UInt32)1 << 22); + if (curSize > kStepSize) + curSize = (SizeT)kStepSize; + + ELzmaFinishMode finishMode = LZMA_FINISH_ANY; + if (_outSizeDefined) + { + const UInt64 rem = _outSize - _outSizeProcessed; + if (rem < curSize) + { + curSize = (SizeT)rem; + /* + // finishMode = LZMA_FINISH_END; + we can't use LZMA_FINISH_END here to allow partial decoding + */ + } + } + + SizeT inSizeProcessed = _inSize - _inPos; + ELzmaStatus status; + SRes res = Lzma2Dec_DecodeToDic(&_state, dicPos + curSize, _inBuf + _inPos, &inSizeProcessed, finishMode, &status); + + _inPos += (UInt32)inSizeProcessed; + _inSizeProcessed += inSizeProcessed; + SizeT outSizeProcessed = _state.decoder.dicPos - dicPos; + _outSizeProcessed += outSizeProcessed; + + bool finished = (inSizeProcessed == 0 && outSizeProcessed == 0); + bool stopDecoding = (_outSizeDefined && _outSizeProcessed >= _outSize); + + if (res != 0 || _state.decoder.dicPos == _state.decoder.dicBufSize || finished || stopDecoding) + { + HRESULT res2 = WriteStream(outStream, _state.decoder.dic, _state.decoder.dicPos); + if (res != 0) + return S_FALSE; + RINOK(res2); + if (stopDecoding) + return S_OK; + if (finished) + return (status == LZMA_STATUS_FINISHED_WITH_MARK ? S_OK : S_FALSE); + } + if (_state.decoder.dicPos == _state.decoder.dicBufSize) + _state.decoder.dicPos = 0; + + if (progress != NULL) + { + RINOK(progress->SetRatioInfo(&_inSizeProcessed, &_outSizeProcessed)); + } + } +} + +#ifndef NO_READ_FROM_CODER + +STDMETHODIMP CDecoder::Read(void *data, UInt32 size, UInt32 *processedSize) +{ + if (processedSize) + *processedSize = 0; + do + { + if (_inPos == _inSize) + { + _inPos = _inSize = 0; + RINOK(_inStream->Read(_inBuf, kInBufSize, &_inSize)); + } + { + SizeT inProcessed = _inSize - _inPos; + + if (_outSizeDefined) + { + const UInt64 rem = _outSize - _outSizeProcessed; + if (rem < size) + size = (UInt32)rem; + } + + SizeT outProcessed = size; + ELzmaStatus status; + SRes res = Lzma2Dec_DecodeToBuf(&_state, (Byte *)data, &outProcessed, + _inBuf + _inPos, &inProcessed, LZMA_FINISH_ANY, &status); + _inPos += (UInt32)inProcessed; + _inSizeProcessed += inProcessed; + _outSizeProcessed += outProcessed; + size -= (UInt32)outProcessed; + data = (Byte *)data + outProcessed; + if (processedSize) + *processedSize += (UInt32)outProcessed; + RINOK(SResToHRESULT(res)); + if (inProcessed == 0 && outProcessed == 0) + return S_OK; + } + } + while (size != 0); + return S_OK; +} + +#endif + +}} diff --git a/CPP/7zip/Compress/Lzma2Decoder.h b/CPP/7zip/Compress/Lzma2Decoder.h new file mode 100644 index 0000000..fd7ca2f --- /dev/null +++ b/CPP/7zip/Compress/Lzma2Decoder.h @@ -0,0 +1,73 @@ +// Lzma2Decoder.h + +#ifndef __LZMA2_DECODER_H +#define __LZMA2_DECODER_H + +#include "../../../C/Lzma2Dec.h" + +#include "../../Common/MyCom.h" + +#include "../ICoder.h" + +namespace NCompress { +namespace NLzma2 { + +class CDecoder: + public ICompressCoder, + public ICompressSetDecoderProperties2, + public ICompressGetInStreamProcessedSize, + #ifndef NO_READ_FROM_CODER + public ICompressSetInStream, + public ICompressSetOutStreamSize, + public ISequentialInStream, + #endif + public CMyUnknownImp +{ + CMyComPtr _inStream; + Byte *_inBuf; + UInt32 _inPos; + UInt32 _inSize; + CLzma2Dec _state; + bool _outSizeDefined; + UInt64 _outSize; + UInt64 _inSizeProcessed; + UInt64 _outSizeProcessed; +public: + + #ifndef NO_READ_FROM_CODER + MY_UNKNOWN_IMP5( + ICompressSetDecoderProperties2, + ICompressGetInStreamProcessedSize, + ICompressSetInStream, + ICompressSetOutStreamSize, + ISequentialInStream) + #else + MY_UNKNOWN_IMP2( + ICompressSetDecoderProperties2, + ICompressGetInStreamProcessedSize) + #endif + + STDMETHOD(Code)(ISequentialInStream *inStream, + ISequentialOutStream *outStream, const UInt64 *_inSize, const UInt64 *outSize, + ICompressProgressInfo *progress); + + STDMETHOD(SetDecoderProperties2)(const Byte *data, UInt32 size); + + STDMETHOD(GetInStreamProcessedSize)(UInt64 *value); + + STDMETHOD(SetInStream)(ISequentialInStream *inStream); + STDMETHOD(ReleaseInStream)(); + STDMETHOD(SetOutStreamSize)(const UInt64 *outSize); + + #ifndef NO_READ_FROM_CODER + STDMETHOD(Read)(void *data, UInt32 size, UInt32 *processedSize); + #endif + + CDecoder(); + virtual ~CDecoder(); + +}; + +}} + +#endif diff --git a/CPP/7zip/Compress/Lzma2Encoder.cpp b/CPP/7zip/Compress/Lzma2Encoder.cpp new file mode 100644 index 0000000..5e4c71b --- /dev/null +++ b/CPP/7zip/Compress/Lzma2Encoder.cpp @@ -0,0 +1,94 @@ +// Lzma2Encoder.cpp + +#include "StdAfx.h" + +#include "../../../C/Alloc.h" + +#include "../Common/CWrappers.h" +#include "../Common/StreamUtils.h" + +#include "Lzma2Encoder.h" + +namespace NCompress { + +namespace NLzma { + +HRESULT SetLzmaProp(PROPID propID, const PROPVARIANT &prop, CLzmaEncProps &ep); + +} + +namespace NLzma2 { + +static void *SzBigAlloc(void *, size_t size) { return BigAlloc(size); } +static void SzBigFree(void *, void *address) { BigFree(address); } +static ISzAlloc g_BigAlloc = { SzBigAlloc, SzBigFree }; + +static void *SzAlloc(void *, size_t size) { return MyAlloc(size); } +static void SzFree(void *, void *address) { MyFree(address); } +static ISzAlloc g_Alloc = { SzAlloc, SzFree }; + +CEncoder::CEncoder() +{ + _encoder = 0; + _encoder = Lzma2Enc_Create(&g_Alloc, &g_BigAlloc); + if (_encoder == 0) + throw 1; +} + +CEncoder::~CEncoder() +{ + if (_encoder != 0) + Lzma2Enc_Destroy(_encoder); +} + +HRESULT SetLzma2Prop(PROPID propID, const PROPVARIANT &prop, CLzma2EncProps &lzma2Props) +{ + switch (propID) + { + case NCoderPropID::kBlockSize: + if (prop.vt != VT_UI4) return E_INVALIDARG; lzma2Props.blockSize = prop.ulVal; break; + case NCoderPropID::kNumThreads: + if (prop.vt != VT_UI4) return E_INVALIDARG; lzma2Props.numTotalThreads = (int)(prop.ulVal); break; + default: + RINOK(NLzma::SetLzmaProp(propID, prop, lzma2Props.lzmaProps)); + } + return S_OK; +} + +STDMETHODIMP CEncoder::SetCoderProperties(const PROPID *propIDs, + const PROPVARIANT *coderProps, UInt32 numProps) +{ + CLzma2EncProps lzma2Props; + Lzma2EncProps_Init(&lzma2Props); + + for (UInt32 i = 0; i < numProps; i++) + { + RINOK(SetLzma2Prop(propIDs[i], coderProps[i], lzma2Props)); + } + return SResToHRESULT(Lzma2Enc_SetProps(_encoder, &lzma2Props)); +} + +STDMETHODIMP CEncoder::WriteCoderProperties(ISequentialOutStream *outStream) +{ + Byte prop = Lzma2Enc_WriteProperties(_encoder); + return WriteStream(outStream, &prop, 1); +} + +STDMETHODIMP CEncoder::Code(ISequentialInStream *inStream, ISequentialOutStream *outStream, + const UInt64 * /* inSize */, const UInt64 * /* outSize */, ICompressProgressInfo *progress) +{ + CSeqInStreamWrap inWrap(inStream); + CSeqOutStreamWrap outWrap(outStream); + CCompressProgressWrap progressWrap(progress); + + SRes res = Lzma2Enc_Encode(_encoder, &outWrap.p, &inWrap.p, progress ? &progressWrap.p : NULL); + if (res == SZ_ERROR_READ && inWrap.Res != S_OK) + return inWrap.Res; + if (res == SZ_ERROR_WRITE && outWrap.Res != S_OK) + return outWrap.Res; + if (res == SZ_ERROR_PROGRESS && progressWrap.Res != S_OK) + return progressWrap.Res; + return SResToHRESULT(res); +} + +}} diff --git a/CPP/7zip/Compress/Lzma2Encoder.h b/CPP/7zip/Compress/Lzma2Encoder.h new file mode 100644 index 0000000..f0fb74d --- /dev/null +++ b/CPP/7zip/Compress/Lzma2Encoder.h @@ -0,0 +1,36 @@ +// Lzma2Encoder.h + +#ifndef __LZMA2_ENCODER_H +#define __LZMA2_ENCODER_H + +#include "../../../C/Lzma2Enc.h" + +#include "../../Common/MyCom.h" + +#include "../ICoder.h" + +namespace NCompress { +namespace NLzma2 { + +class CEncoder: + public ICompressCoder, + public ICompressSetCoderProperties, + public ICompressWriteCoderProperties, + public CMyUnknownImp +{ + CLzma2EncHandle _encoder; +public: + MY_UNKNOWN_IMP2(ICompressSetCoderProperties, ICompressWriteCoderProperties) + + STDMETHOD(Code)(ISequentialInStream *inStream, ISequentialOutStream *outStream, + const UInt64 *inSize, const UInt64 *outSize, ICompressProgressInfo *progress); + STDMETHOD(SetCoderProperties)(const PROPID *propIDs, const PROPVARIANT *props, UInt32 numProps); + STDMETHOD(WriteCoderProperties)(ISequentialOutStream *outStream); + + CEncoder(); + virtual ~CEncoder(); +}; + +}} + +#endif diff --git a/CPP/7zip/Compress/Lzma2Register.cpp b/CPP/7zip/Compress/Lzma2Register.cpp new file mode 100644 index 0000000..cace871 --- /dev/null +++ b/CPP/7zip/Compress/Lzma2Register.cpp @@ -0,0 +1,20 @@ +// Lzma2Register.cpp + +#include "StdAfx.h" + +#include "../Common/RegisterCodec.h" + +#include "Lzma2Decoder.h" + +static void *CreateCodec() { return (void *)(ICompressCoder *)(new NCompress::NLzma2::CDecoder); } +#ifndef EXTRACT_ONLY +#include "Lzma2Encoder.h" +static void *CreateCodecOut() { return (void *)(ICompressCoder *)(new NCompress::NLzma2::CEncoder); } +#else +#define CreateCodecOut 0 +#endif + +static CCodecInfo g_CodecInfo = + { CreateCodec, CreateCodecOut, 0x21, L"LZMA2", 1, false }; + +REGISTER_CODEC(LZMA2) diff --git a/CPP/7zip/Compress/LzmaDecoder.cpp b/CPP/7zip/Compress/LzmaDecoder.cpp new file mode 100644 index 0000000..b7c260b --- /dev/null +++ b/CPP/7zip/Compress/LzmaDecoder.cpp @@ -0,0 +1,252 @@ +// LzmaDecoder.cpp + +#include "StdAfx.h" + +#include "../../../C/Alloc.h" + +#include "../Common/StreamUtils.h" + +#include "LzmaDecoder.h" + +static HRESULT SResToHRESULT(SRes res) +{ + switch(res) + { + case SZ_OK: return S_OK; + case SZ_ERROR_MEM: return E_OUTOFMEMORY; + case SZ_ERROR_PARAM: return E_INVALIDARG; + case SZ_ERROR_UNSUPPORTED: return E_NOTIMPL; + case SZ_ERROR_DATA: return S_FALSE; + } + return E_FAIL; +} + +namespace NCompress { +namespace NLzma { + +CDecoder::CDecoder(): _inBuf(0), _propsWereSet(false), _outSizeDefined(false), + _inBufSize(1 << 20), + _outBufSize(1 << 22), + FinishStream(false) +{ + _inSizeProcessed = 0; + _inPos = _inSize = 0; + LzmaDec_Construct(&_state); +} + +static void *SzAlloc(void *p, size_t size) { p = p; return MyAlloc(size); } +static void SzFree(void *p, void *address) { p = p; MyFree(address); } +static ISzAlloc g_Alloc = { SzAlloc, SzFree }; + +CDecoder::~CDecoder() +{ + LzmaDec_Free(&_state, &g_Alloc); + MyFree(_inBuf); +} + +STDMETHODIMP CDecoder::SetInBufSize(UInt32 , UInt32 size) { _inBufSize = size; return S_OK; } +STDMETHODIMP CDecoder::SetOutBufSize(UInt32 , UInt32 size) { _outBufSize = size; return S_OK; } + +HRESULT CDecoder::CreateInputBuffer() +{ + if (_inBuf == 0 || _inBufSize != _inBufSizeAllocated) + { + MyFree(_inBuf); + _inBuf = (Byte *)MyAlloc(_inBufSize); + if (_inBuf == 0) + return E_OUTOFMEMORY; + _inBufSizeAllocated = _inBufSize; + } + return S_OK; +} + +STDMETHODIMP CDecoder::SetDecoderProperties2(const Byte *prop, UInt32 size) +{ + RINOK(SResToHRESULT(LzmaDec_Allocate(&_state, prop, size, &g_Alloc))); + _propsWereSet = true; + return CreateInputBuffer(); +} + +void CDecoder::SetOutStreamSizeResume(const UInt64 *outSize) +{ + _outSizeDefined = (outSize != NULL); + if (_outSizeDefined) + _outSize = *outSize; + _outSizeProcessed = 0; + _wrPos = 0; + LzmaDec_Init(&_state); +} + +STDMETHODIMP CDecoder::SetOutStreamSize(const UInt64 *outSize) +{ + _inSizeProcessed = 0; + _inPos = _inSize = 0; + SetOutStreamSizeResume(outSize); + return S_OK; +} + +HRESULT CDecoder::CodeSpec(ISequentialInStream *inStream, ISequentialOutStream *outStream, ICompressProgressInfo *progress) +{ + if (_inBuf == 0 || !_propsWereSet) + return S_FALSE; + + UInt64 startInProgress = _inSizeProcessed; + + SizeT next = (_state.dicBufSize - _state.dicPos < _outBufSize) ? _state.dicBufSize : (_state.dicPos + _outBufSize); + for (;;) + { + if (_inPos == _inSize) + { + _inPos = _inSize = 0; + RINOK(inStream->Read(_inBuf, _inBufSizeAllocated, &_inSize)); + } + + SizeT dicPos = _state.dicPos; + SizeT curSize = next - dicPos; + + ELzmaFinishMode finishMode = LZMA_FINISH_ANY; + if (_outSizeDefined) + { + const UInt64 rem = _outSize - _outSizeProcessed; + if (rem <= curSize) + { + curSize = (SizeT)rem; + if (FinishStream) + finishMode = LZMA_FINISH_END; + } + } + + SizeT inSizeProcessed = _inSize - _inPos; + ELzmaStatus status; + SRes res = LzmaDec_DecodeToDic(&_state, dicPos + curSize, _inBuf + _inPos, &inSizeProcessed, finishMode, &status); + + _inPos += (UInt32)inSizeProcessed; + _inSizeProcessed += inSizeProcessed; + SizeT outSizeProcessed = _state.dicPos - dicPos; + _outSizeProcessed += outSizeProcessed; + + bool finished = (inSizeProcessed == 0 && outSizeProcessed == 0); + bool stopDecoding = (_outSizeDefined && _outSizeProcessed >= _outSize); + + if (res != 0 || _state.dicPos == next || finished || stopDecoding) + { + HRESULT res2 = WriteStream(outStream, _state.dic + _wrPos, _state.dicPos - _wrPos); + + _wrPos = _state.dicPos; + if (_state.dicPos == _state.dicBufSize) + { + _state.dicPos = 0; + _wrPos = 0; + } + next = (_state.dicBufSize - _state.dicPos < _outBufSize) ? _state.dicBufSize : (_state.dicPos + _outBufSize); + + if (res != 0) + return S_FALSE; + RINOK(res2); + if (stopDecoding) + return S_OK; + if (finished) + return (status == LZMA_STATUS_FINISHED_WITH_MARK ? S_OK : S_FALSE); + } + if (progress) + { + UInt64 inSize = _inSizeProcessed - startInProgress; + RINOK(progress->SetRatioInfo(&inSize, &_outSizeProcessed)); + } + } +} + +STDMETHODIMP CDecoder::Code(ISequentialInStream *inStream, ISequentialOutStream *outStream, + const UInt64 * /* inSize */, const UInt64 *outSize, ICompressProgressInfo *progress) +{ + if (_inBuf == 0) + return E_INVALIDARG; + SetOutStreamSize(outSize); + return CodeSpec(inStream, outStream, progress); +} + +#ifndef NO_READ_FROM_CODER + +STDMETHODIMP CDecoder::SetInStream(ISequentialInStream *inStream) { _inStream = inStream; return S_OK; } +STDMETHODIMP CDecoder::ReleaseInStream() { _inStream.Release(); return S_OK; } + +STDMETHODIMP CDecoder::Read(void *data, UInt32 size, UInt32 *processedSize) +{ + if (processedSize) + *processedSize = 0; + do + { + if (_inPos == _inSize) + { + _inPos = _inSize = 0; + RINOK(_inStream->Read(_inBuf, _inBufSizeAllocated, &_inSize)); + } + { + SizeT inProcessed = _inSize - _inPos; + + if (_outSizeDefined) + { + const UInt64 rem = _outSize - _outSizeProcessed; + if (rem < size) + size = (UInt32)rem; + } + + SizeT outProcessed = size; + ELzmaStatus status; + SRes res = LzmaDec_DecodeToBuf(&_state, (Byte *)data, &outProcessed, + _inBuf + _inPos, &inProcessed, LZMA_FINISH_ANY, &status); + _inPos += (UInt32)inProcessed; + _inSizeProcessed += inProcessed; + _outSizeProcessed += outProcessed; + size -= (UInt32)outProcessed; + data = (Byte *)data + outProcessed; + if (processedSize) + *processedSize += (UInt32)outProcessed; + RINOK(SResToHRESULT(res)); + if (inProcessed == 0 && outProcessed == 0) + return S_OK; + } + } + while (size != 0); + return S_OK; +} + +HRESULT CDecoder::CodeResume(ISequentialOutStream *outStream, const UInt64 *outSize, ICompressProgressInfo *progress) +{ + SetOutStreamSizeResume(outSize); + return CodeSpec(_inStream, outStream, progress); +} + +HRESULT CDecoder::ReadFromInputStream(void *data, UInt32 size, UInt32 *processedSize) +{ + RINOK(CreateInputBuffer()); + if (processedSize) + *processedSize = 0; + while (size > 0) + { + if (_inPos == _inSize) + { + _inPos = _inSize = 0; + RINOK(_inStream->Read(_inBuf, _inBufSizeAllocated, &_inSize)); + if (_inSize == 0) + break; + } + { + UInt32 curSize = _inSize - _inPos; + if (curSize > size) + curSize = size; + memcpy(data, _inBuf + _inPos, curSize); + _inPos += curSize; + _inSizeProcessed += curSize; + size -= curSize; + data = (Byte *)data + curSize; + if (processedSize) + *processedSize += curSize; + } + } + return S_OK; +} + +#endif + +}} diff --git a/CPP/7zip/Compress/LzmaDecoder.h b/CPP/7zip/Compress/LzmaDecoder.h new file mode 100644 index 0000000..d28a463 --- /dev/null +++ b/CPP/7zip/Compress/LzmaDecoder.h @@ -0,0 +1,84 @@ +// LzmaDecoder.h + +#ifndef __LZMA_DECODER_H +#define __LZMA_DECODER_H + +#include "../../../C/LzmaDec.h" + +#include "../../Common/MyCom.h" +#include "../ICoder.h" + +namespace NCompress { +namespace NLzma { + +class CDecoder: + public ICompressCoder, + public ICompressSetDecoderProperties2, + public ICompressSetBufSize, + #ifndef NO_READ_FROM_CODER + public ICompressSetInStream, + public ICompressSetOutStreamSize, + public ISequentialInStream, + #endif + public CMyUnknownImp +{ + CMyComPtr _inStream; + Byte *_inBuf; + UInt32 _inPos; + UInt32 _inSize; + CLzmaDec _state; + bool _propsWereSet; + bool _outSizeDefined; + UInt64 _outSize; + UInt64 _inSizeProcessed; + UInt64 _outSizeProcessed; + + UInt32 _inBufSizeAllocated; + UInt32 _inBufSize; + UInt32 _outBufSize; + SizeT _wrPos; + + HRESULT CreateInputBuffer(); + HRESULT CodeSpec(ISequentialInStream *inStream, ISequentialOutStream *outStream, ICompressProgressInfo *progress); + void SetOutStreamSizeResume(const UInt64 *outSize); + +public: + MY_QUERYINTERFACE_BEGIN2(ICompressCoder) + MY_QUERYINTERFACE_ENTRY(ICompressSetDecoderProperties2) + MY_QUERYINTERFACE_ENTRY(ICompressSetBufSize) + #ifndef NO_READ_FROM_CODER + MY_QUERYINTERFACE_ENTRY(ICompressSetInStream) + MY_QUERYINTERFACE_ENTRY(ICompressSetOutStreamSize) + MY_QUERYINTERFACE_ENTRY(ISequentialInStream) + #endif + MY_QUERYINTERFACE_END + MY_ADDREF_RELEASE + + STDMETHOD(Code)(ISequentialInStream *inStream, ISequentialOutStream *outStream, + const UInt64 *inSize, const UInt64 *outSize, ICompressProgressInfo *progress); + STDMETHOD(SetDecoderProperties2)(const Byte *data, UInt32 size); + STDMETHOD(SetOutStreamSize)(const UInt64 *outSize); + STDMETHOD(SetInBufSize)(UInt32 streamIndex, UInt32 size); + STDMETHOD(SetOutBufSize)(UInt32 streamIndex, UInt32 size); + + #ifndef NO_READ_FROM_CODER + + STDMETHOD(SetInStream)(ISequentialInStream *inStream); + STDMETHOD(ReleaseInStream)(); + STDMETHOD(Read)(void *data, UInt32 size, UInt32 *processedSize); + + HRESULT CodeResume(ISequentialOutStream *outStream, const UInt64 *outSize, ICompressProgressInfo *progress); + HRESULT ReadFromInputStream(void *data, UInt32 size, UInt32 *processedSize); + UInt64 GetInputProcessedSize() const { return _inSizeProcessed; } + + #endif + + bool FinishStream; + + CDecoder(); + virtual ~CDecoder(); +}; + +}} + +#endif diff --git a/CPP/7zip/Compress/LzmaEncoder.cpp b/CPP/7zip/Compress/LzmaEncoder.cpp new file mode 100644 index 0000000..9bdedae --- /dev/null +++ b/CPP/7zip/Compress/LzmaEncoder.cpp @@ -0,0 +1,149 @@ +// LzmaEncoder.cpp + +#include "StdAfx.h" + +#include "../../../C/Alloc.h" + +#include "../Common/CWrappers.h" +#include "../Common/StreamUtils.h" + +#include "LzmaEncoder.h" + +namespace NCompress { +namespace NLzma { + +static void *SzBigAlloc(void *, size_t size) { return BigAlloc(size); } +static void SzBigFree(void *, void *address) { BigFree(address); } +static ISzAlloc g_BigAlloc = { SzBigAlloc, SzBigFree }; + +static void *SzAlloc(void *, size_t size) { return MyAlloc(size); } +static void SzFree(void *, void *address) { MyFree(address); } +static ISzAlloc g_Alloc = { SzAlloc, SzFree }; + +CEncoder::CEncoder() +{ + _encoder = 0; + _encoder = LzmaEnc_Create(&g_Alloc); + if (_encoder == 0) + throw 1; +} + +CEncoder::~CEncoder() +{ + if (_encoder != 0) + LzmaEnc_Destroy(_encoder, &g_Alloc, &g_BigAlloc); +} + +inline wchar_t GetUpperChar(wchar_t c) +{ + if (c >= 'a' && c <= 'z') + c -= 0x20; + return c; +} + +static int ParseMatchFinder(const wchar_t *s, int *btMode, int *numHashBytes) +{ + wchar_t c = GetUpperChar(*s++); + if (c == L'H') + { + if (GetUpperChar(*s++) != L'C') + return 0; + int numHashBytesLoc = (int)(*s++ - L'0'); + if (numHashBytesLoc < 4 || numHashBytesLoc > 4) + return 0; + if (*s++ != 0) + return 0; + *btMode = 0; + *numHashBytes = numHashBytesLoc; + return 1; + } + if (c != L'B') + return 0; + + if (GetUpperChar(*s++) != L'T') + return 0; + int numHashBytesLoc = (int)(*s++ - L'0'); + if (numHashBytesLoc < 2 || numHashBytesLoc > 4) + return 0; + c = GetUpperChar(*s++); + if (c != L'\0') + return 0; + *btMode = 1; + *numHashBytes = numHashBytesLoc; + return 1; +} + +HRESULT SetLzmaProp(PROPID propID, const PROPVARIANT &prop, CLzmaEncProps &ep) +{ + if (propID == NCoderPropID::kMatchFinder) + { + if (prop.vt != VT_BSTR) + return E_INVALIDARG; + return ParseMatchFinder(prop.bstrVal, &ep.btMode, &ep.numHashBytes) ? S_OK : E_INVALIDARG; + } + if (prop.vt != VT_UI4) + return E_INVALIDARG; + UInt32 v = prop.ulVal; + switch (propID) + { + case NCoderPropID::kNumFastBytes: ep.fb = v; break; + case NCoderPropID::kMatchFinderCycles: ep.mc = v; break; + case NCoderPropID::kAlgorithm: ep.algo = v; break; + case NCoderPropID::kDictionarySize: ep.dictSize = v; break; + case NCoderPropID::kPosStateBits: ep.pb = v; break; + case NCoderPropID::kLitPosBits: ep.lp = v; break; + case NCoderPropID::kLitContextBits: ep.lc = v; break; + default: return E_INVALIDARG; + } + return S_OK; +} + +STDMETHODIMP CEncoder::SetCoderProperties(const PROPID *propIDs, + const PROPVARIANT *coderProps, UInt32 numProps) +{ + CLzmaEncProps props; + LzmaEncProps_Init(&props); + + for (UInt32 i = 0; i < numProps; i++) + { + const PROPVARIANT &prop = coderProps[i]; + PROPID propID = propIDs[i]; + switch (propID) + { + case NCoderPropID::kEndMarker: + if (prop.vt != VT_BOOL) return E_INVALIDARG; props.writeEndMark = (prop.boolVal == VARIANT_TRUE); break; + case NCoderPropID::kNumThreads: + if (prop.vt != VT_UI4) return E_INVALIDARG; props.numThreads = prop.ulVal; break; + default: + RINOK(SetLzmaProp(propID, prop, props)); + } + } + return SResToHRESULT(LzmaEnc_SetProps(_encoder, &props)); +} + +STDMETHODIMP CEncoder::WriteCoderProperties(ISequentialOutStream *outStream) +{ + Byte props[LZMA_PROPS_SIZE]; + size_t size = LZMA_PROPS_SIZE; + RINOK(LzmaEnc_WriteProperties(_encoder, props, &size)); + return WriteStream(outStream, props, size); +} + +STDMETHODIMP CEncoder::Code(ISequentialInStream *inStream, ISequentialOutStream *outStream, + const UInt64 * /* inSize */, const UInt64 * /* outSize */, ICompressProgressInfo *progress) +{ + CSeqInStreamWrap inWrap(inStream); + CSeqOutStreamWrap outWrap(outStream); + CCompressProgressWrap progressWrap(progress); + + SRes res = LzmaEnc_Encode(_encoder, &outWrap.p, &inWrap.p, progress ? &progressWrap.p : NULL, &g_Alloc, &g_BigAlloc); + if (res == SZ_ERROR_READ && inWrap.Res != S_OK) + return inWrap.Res; + if (res == SZ_ERROR_WRITE && outWrap.Res != S_OK) + return outWrap.Res; + if (res == SZ_ERROR_PROGRESS && progressWrap.Res != S_OK) + return progressWrap.Res; + return SResToHRESULT(res); +} + +}} diff --git a/CPP/7zip/Compress/LzmaEncoder.h b/CPP/7zip/Compress/LzmaEncoder.h new file mode 100644 index 0000000..904c000 --- /dev/null +++ b/CPP/7zip/Compress/LzmaEncoder.h @@ -0,0 +1,36 @@ +// LzmaEncoder.h + +#ifndef __LZMA_ENCODER_H +#define __LZMA_ENCODER_H + +#include "../../../C/LzmaEnc.h" + +#include "../../Common/MyCom.h" + +#include "../ICoder.h" + +namespace NCompress { +namespace NLzma { + +class CEncoder: + public ICompressCoder, + public ICompressSetCoderProperties, + public ICompressWriteCoderProperties, + public CMyUnknownImp +{ + CLzmaEncHandle _encoder; +public: + MY_UNKNOWN_IMP2(ICompressSetCoderProperties, ICompressWriteCoderProperties) + + STDMETHOD(Code)(ISequentialInStream *inStream, ISequentialOutStream *outStream, + const UInt64 *inSize, const UInt64 *outSize, ICompressProgressInfo *progress); + STDMETHOD(SetCoderProperties)(const PROPID *propIDs, const PROPVARIANT *props, UInt32 numProps); + STDMETHOD(WriteCoderProperties)(ISequentialOutStream *outStream); + + CEncoder(); + virtual ~CEncoder(); +}; + +}} + +#endif diff --git a/CPP/7zip/Compress/LzmaRegister.cpp b/CPP/7zip/Compress/LzmaRegister.cpp new file mode 100644 index 0000000..96ed0ba --- /dev/null +++ b/CPP/7zip/Compress/LzmaRegister.cpp @@ -0,0 +1,20 @@ +// LzmaRegister.cpp + +#include "StdAfx.h" + +#include "../Common/RegisterCodec.h" + +#include "LzmaDecoder.h" + +static void *CreateCodec() { return (void *)(ICompressCoder *)(new NCompress::NLzma::CDecoder); } +#ifndef EXTRACT_ONLY +#include "LzmaEncoder.h" +static void *CreateCodecOut() { return (void *)(ICompressCoder *)(new NCompress::NLzma::CEncoder); } +#else +#define CreateCodecOut 0 +#endif + +static CCodecInfo g_CodecInfo = + { CreateCodec, CreateCodecOut, 0x030101, L"LZMA", 1, false }; + +REGISTER_CODEC(LZMA) diff --git a/CPP/7zip/Compress/Lzx.h b/CPP/7zip/Compress/Lzx.h new file mode 100644 index 0000000..09ab7f0 --- /dev/null +++ b/CPP/7zip/Compress/Lzx.h @@ -0,0 +1,61 @@ +// Lzx.h + +#ifndef __COMPRESS_LZX_H +#define __COMPRESS_LZX_H + +namespace NCompress { +namespace NLzx { + +const unsigned kNumHuffmanBits = 16; +const UInt32 kNumRepDistances = 3; + +const UInt32 kNumLenSlots = 8; +const UInt32 kMatchMinLen = 2; +const UInt32 kNumLenSymbols = 249; +const UInt32 kMatchMaxLen = kMatchMinLen + (kNumLenSlots - 1) + kNumLenSymbols - 1; + +const unsigned kNumAlignBits = 3; +const UInt32 kAlignTableSize = 1 << kNumAlignBits; + +const UInt32 kNumPosSlots = 50; +const UInt32 kNumPosLenSlots = kNumPosSlots * kNumLenSlots; + +const UInt32 kMainTableSize = 256 + kNumPosLenSlots; +const UInt32 kLevelTableSize = 20; +const UInt32 kMaxTableSize = kMainTableSize; + +const unsigned kNumBlockTypeBits = 3; +const unsigned kBlockTypeVerbatim = 1; +const unsigned kBlockTypeAligned = 2; +const unsigned kBlockTypeUncompressed = 3; + +const unsigned kUncompressedBlockSizeNumBits = 24; + +const unsigned kNumBitsForPreTreeLevel = 4; + +const unsigned kLevelSymbolZeros = 17; +const unsigned kLevelSymbolZerosBig = 18; +const unsigned kLevelSymbolSame = 19; + +const unsigned kLevelSymbolZerosStartValue = 4; +const unsigned kLevelSymbolZerosNumBits = 4; + +const unsigned kLevelSymbolZerosBigStartValue = kLevelSymbolZerosStartValue + + (1 << kLevelSymbolZerosNumBits); +const unsigned kLevelSymbolZerosBigNumBits = 5; + +const unsigned kLevelSymbolSameNumBits = 1; +const unsigned kLevelSymbolSameStartValue = 4; + +const unsigned kNumBitsForAlignLevel = 3; + +const unsigned kNumDictionaryBitsMin = 15; +const unsigned kNumDictionaryBitsMax = 21; +const UInt32 kDictionarySizeMax = (1 << kNumDictionaryBitsMax); + +const unsigned kNumLinearPosSlotBits = 17; +const UInt32 kNumPowerPosSlots = 0x26; + +}} + +#endif diff --git a/CPP/7zip/Compress/Lzx86Converter.cpp b/CPP/7zip/Compress/Lzx86Converter.cpp new file mode 100644 index 0000000..9e53f18 --- /dev/null +++ b/CPP/7zip/Compress/Lzx86Converter.cpp @@ -0,0 +1,90 @@ +// Lzx86Converter.cpp + +#include "StdAfx.h" + +#include "../../Common/Defs.h" + +#include "Lzx86Converter.h" + +namespace NCompress { +namespace NLzx { + +static const int kResidue = 6 + 4; + +void Cx86ConvertOutStream::MakeTranslation() +{ + if (m_Pos <= kResidue) + return; + UInt32 numBytes = m_Pos - kResidue; + Byte *buffer = m_Buffer; + for (UInt32 i = 0; i < numBytes;) + { + if (buffer[i++] == 0xE8) + { + Int32 absValue = 0; + int j; + for(j = 0; j < 4; j++) + absValue += (UInt32)buffer[i + j] << (j * 8); + Int32 pos = (Int32)(m_ProcessedSize + i - 1); + if (absValue >= -pos && absValue < (Int32)m_TranslationSize) + { + UInt32 offset = (absValue >= 0) ? + absValue - pos : + absValue + m_TranslationSize; + for(j = 0; j < 4; j++) + { + buffer[i + j] = (Byte)(offset & 0xFF); + offset >>= 8; + } + } + i += 4; + } + } +} + +STDMETHODIMP Cx86ConvertOutStream::Write(const void *data, UInt32 size, UInt32 *processedSize) +{ + if (processedSize != NULL) + *processedSize = 0; + if (!m_TranslationMode) + return m_Stream->Write(data, size, processedSize); + UInt32 realProcessedSize = 0; + while (realProcessedSize < size) + { + UInt32 writeSize = MyMin(size - realProcessedSize, kUncompressedBlockSize - m_Pos); + memmove(m_Buffer + m_Pos, (const Byte *)data + realProcessedSize, writeSize); + m_Pos += writeSize; + realProcessedSize += writeSize; + if (m_Pos == kUncompressedBlockSize) + { + RINOK(Flush()); + } + } + if (processedSize != NULL) + *processedSize = realProcessedSize; + return S_OK; +} + +HRESULT Cx86ConvertOutStream::Flush() +{ + if (m_Pos == 0) + return S_OK; + if (m_TranslationMode) + MakeTranslation(); + UInt32 pos = 0; + do + { + UInt32 processed; + RINOK(m_Stream->Write(m_Buffer + pos, m_Pos - pos, &processed)); + if (processed == 0) + return E_FAIL; + pos += processed; + } + while(pos < m_Pos); + m_ProcessedSize += m_Pos; + m_Pos = 0; + m_TranslationMode = (m_TranslationMode && (m_ProcessedSize < (1 << 30))); + return S_OK; +} + +}} diff --git a/CPP/7zip/Compress/Lzx86Converter.h b/CPP/7zip/Compress/Lzx86Converter.h new file mode 100644 index 0000000..9f110c2 --- /dev/null +++ b/CPP/7zip/Compress/Lzx86Converter.h @@ -0,0 +1,46 @@ +// Lzx86Converter.h + +#ifndef __LZX_86_CONVERTER_H +#define __LZX_86_CONVERTER_H + +#include "../../Common/MyCom.h" + +#include "../IStream.h" + +namespace NCompress { +namespace NLzx { + +const int kUncompressedBlockSize = 1 << 15; + +class Cx86ConvertOutStream: + public ISequentialOutStream, + public CMyUnknownImp +{ + CMyComPtr m_Stream; + UInt32 m_ProcessedSize; + UInt32 m_Pos; + UInt32 m_TranslationSize; + bool m_TranslationMode; + Byte m_Buffer[kUncompressedBlockSize]; + + void MakeTranslation(); +public: + void SetStream(ISequentialOutStream *outStream) { m_Stream = outStream; } + void ReleaseStream() { m_Stream.Release(); } + void Init(bool translationMode, UInt32 translationSize) + { + m_TranslationMode = translationMode; + m_TranslationSize = translationSize; + m_ProcessedSize = 0; + m_Pos = 0; + } + HRESULT Flush(); + + MY_UNKNOWN_IMP + + STDMETHOD(Write)(const void *data, UInt32 size, UInt32 *processedSize); +}; + +}} + +#endif diff --git a/CPP/7zip/Compress/LzxDecoder.cpp b/CPP/7zip/Compress/LzxDecoder.cpp new file mode 100644 index 0000000..d1027f1 --- /dev/null +++ b/CPP/7zip/Compress/LzxDecoder.cpp @@ -0,0 +1,387 @@ +// LzxDecoder.cpp + +#include "StdAfx.h" + +#include "../../Common/Defs.h" + +#include "LzxDecoder.h" + +namespace NCompress { +namespace NLzx { + +const int kLenIdNeedInit = -2; + +CDecoder::CDecoder(bool wimMode): + _keepHistory(false), + _skipByte(false), + _wimMode(wimMode) +{ + m_x86ConvertOutStreamSpec = new Cx86ConvertOutStream; + m_x86ConvertOutStream = m_x86ConvertOutStreamSpec; +} + +void CDecoder::ReleaseStreams() +{ + m_OutWindowStream.ReleaseStream(); + m_InBitStream.ReleaseStream(); + m_x86ConvertOutStreamSpec->ReleaseStream(); +} + +STDMETHODIMP CDecoder::Flush() +{ + RINOK(m_OutWindowStream.Flush()); + return m_x86ConvertOutStreamSpec->Flush(); +} + +UInt32 CDecoder::ReadBits(unsigned numBits) { return m_InBitStream.ReadBits(numBits); } + +#define RIF(x) { if (!(x)) return false; } + +bool CDecoder::ReadTable(Byte *lastLevels, Byte *newLevels, UInt32 numSymbols) +{ + Byte levelLevels[kLevelTableSize]; + UInt32 i; + for (i = 0; i < kLevelTableSize; i++) + levelLevels[i] = (Byte)ReadBits(kNumBitsForPreTreeLevel); + RIF(m_LevelDecoder.SetCodeLengths(levelLevels)); + unsigned num = 0; + Byte symbol = 0; + for (i = 0; i < numSymbols;) + { + if (num != 0) + { + lastLevels[i] = newLevels[i] = symbol; + i++; + num--; + continue; + } + UInt32 number = m_LevelDecoder.DecodeSymbol(&m_InBitStream); + if (number == kLevelSymbolZeros) + { + num = kLevelSymbolZerosStartValue + (unsigned)ReadBits(kLevelSymbolZerosNumBits); + symbol = 0; + } + else if (number == kLevelSymbolZerosBig) + { + num = kLevelSymbolZerosBigStartValue + (unsigned)ReadBits(kLevelSymbolZerosBigNumBits); + symbol = 0; + } + else if (number == kLevelSymbolSame || number <= kNumHuffmanBits) + { + if (number <= kNumHuffmanBits) + num = 1; + else + { + num = kLevelSymbolSameStartValue + (unsigned)ReadBits(kLevelSymbolSameNumBits); + number = m_LevelDecoder.DecodeSymbol(&m_InBitStream); + if (number > kNumHuffmanBits) + return false; + } + symbol = Byte((17 + lastLevels[i] - number) % (kNumHuffmanBits + 1)); + } + else + return false; + } + return true; +} + +bool CDecoder::ReadTables(void) +{ + Byte newLevels[kMaxTableSize]; + { + if (_skipByte) + m_InBitStream.DirectReadByte(); + m_InBitStream.Normalize(); + + unsigned blockType = (unsigned)ReadBits(kNumBlockTypeBits); + if (blockType > kBlockTypeUncompressed) + return false; + if (_wimMode) + if (ReadBits(1) == 1) + m_UnCompressedBlockSize = (1 << 15); + else + m_UnCompressedBlockSize = ReadBits(16); + else + m_UnCompressedBlockSize = m_InBitStream.ReadBitsBig(kUncompressedBlockSizeNumBits); + + m_IsUncompressedBlock = (blockType == kBlockTypeUncompressed); + + _skipByte = (m_IsUncompressedBlock && ((m_UnCompressedBlockSize & 1) != 0)); + + if (m_IsUncompressedBlock) + { + ReadBits(16 - m_InBitStream.GetBitPosition()); + if (!m_InBitStream.ReadUInt32(m_RepDistances[0])) + return false; + m_RepDistances[0]--; + for (unsigned i = 1; i < kNumRepDistances; i++) + { + UInt32 rep = 0; + for (unsigned j = 0; j < 4; j++) + rep |= (UInt32)m_InBitStream.DirectReadByte() << (8 * j); + m_RepDistances[i] = rep - 1; + } + return true; + } + m_AlignIsUsed = (blockType == kBlockTypeAligned); + if (m_AlignIsUsed) + { + for (unsigned i = 0; i < kAlignTableSize; i++) + newLevels[i] = (Byte)ReadBits(kNumBitsForAlignLevel); + RIF(m_AlignDecoder.SetCodeLengths(newLevels)); + } + } + + RIF(ReadTable(m_LastMainLevels, newLevels, 256)); + RIF(ReadTable(m_LastMainLevels + 256, newLevels + 256, m_NumPosLenSlots)); + for (UInt32 i = 256 + m_NumPosLenSlots; i < kMainTableSize; i++) + newLevels[i] = 0; + RIF(m_MainDecoder.SetCodeLengths(newLevels)); + + RIF(ReadTable(m_LastLenLevels, newLevels, kNumLenSymbols)); + return m_LenDecoder.SetCodeLengths(newLevels); +} + +class CDecoderFlusher +{ + CDecoder *m_Decoder; +public: + bool NeedFlush; + CDecoderFlusher(CDecoder *decoder): m_Decoder(decoder), NeedFlush(true) {} + ~CDecoderFlusher() + { + if (NeedFlush) + m_Decoder->Flush(); + m_Decoder->ReleaseStreams(); + } +}; + + +void CDecoder::ClearPrevLevels() +{ + unsigned i; + for (i = 0; i < kMainTableSize; i++) + m_LastMainLevels[i] = 0; + for (i = 0; i < kNumLenSymbols; i++) + m_LastLenLevels[i] = 0; +} + + +HRESULT CDecoder::CodeSpec(UInt32 curSize) +{ + if (_remainLen == kLenIdNeedInit) + { + _remainLen = 0; + m_InBitStream.Init(); + if (!_keepHistory || !m_IsUncompressedBlock) + m_InBitStream.Normalize(); + if (!_keepHistory) + { + _skipByte = false; + m_UnCompressedBlockSize = 0; + ClearPrevLevels(); + UInt32 i86TranslationSize = 12000000; + bool translationMode = true; + if (!_wimMode) + { + translationMode = (ReadBits(1) != 0); + if (translationMode) + { + i86TranslationSize = ReadBits(16) << 16; + i86TranslationSize |= ReadBits(16); + } + } + m_x86ConvertOutStreamSpec->Init(translationMode, i86TranslationSize); + + for (unsigned i = 0 ; i < kNumRepDistances; i++) + m_RepDistances[i] = 0; + } + } + + while (_remainLen > 0 && curSize > 0) + { + m_OutWindowStream.PutByte(m_OutWindowStream.GetByte(m_RepDistances[0])); + _remainLen--; + curSize--; + } + + while (curSize > 0) + { + if (m_UnCompressedBlockSize == 0) + if (!ReadTables()) + return S_FALSE; + UInt32 next = (Int32)MyMin(m_UnCompressedBlockSize, curSize); + curSize -= next; + m_UnCompressedBlockSize -= next; + if (m_IsUncompressedBlock) + { + while (next > 0) + { + m_OutWindowStream.PutByte(m_InBitStream.DirectReadByte()); + next--; + } + } + else while (next > 0) + { + UInt32 number = m_MainDecoder.DecodeSymbol(&m_InBitStream); + if (number < 256) + { + m_OutWindowStream.PutByte((Byte)number); + next--; + } + else + { + UInt32 posLenSlot = number - 256; + if (posLenSlot >= m_NumPosLenSlots) + return S_FALSE; + UInt32 posSlot = posLenSlot / kNumLenSlots; + UInt32 lenSlot = posLenSlot % kNumLenSlots; + UInt32 len = kMatchMinLen + lenSlot; + if (lenSlot == kNumLenSlots - 1) + { + UInt32 lenTemp = m_LenDecoder.DecodeSymbol(&m_InBitStream); + if (lenTemp >= kNumLenSymbols) + return S_FALSE; + len += lenTemp; + } + + if (posSlot < kNumRepDistances) + { + UInt32 distance = m_RepDistances[posSlot]; + m_RepDistances[posSlot] = m_RepDistances[0]; + m_RepDistances[0] = distance; + } + else + { + UInt32 distance; + unsigned numDirectBits; + if (posSlot < kNumPowerPosSlots) + { + numDirectBits = (unsigned)(posSlot >> 1) - 1; + distance = ((2 | (posSlot & 1)) << numDirectBits); + } + else + { + numDirectBits = kNumLinearPosSlotBits; + distance = ((posSlot - 0x22) << kNumLinearPosSlotBits); + } + + if (m_AlignIsUsed && numDirectBits >= kNumAlignBits) + { + distance += (m_InBitStream.ReadBits(numDirectBits - kNumAlignBits) << kNumAlignBits); + UInt32 alignTemp = m_AlignDecoder.DecodeSymbol(&m_InBitStream); + if (alignTemp >= kAlignTableSize) + return S_FALSE; + distance += alignTemp; + } + else + distance += m_InBitStream.ReadBits(numDirectBits); + m_RepDistances[2] = m_RepDistances[1]; + m_RepDistances[1] = m_RepDistances[0]; + m_RepDistances[0] = distance - kNumRepDistances; + } + + UInt32 locLen = len; + if (locLen > next) + locLen = next; + + if (!m_OutWindowStream.CopyBlock(m_RepDistances[0], locLen)) + return S_FALSE; + + len -= locLen; + next -= locLen; + if (len != 0) + { + _remainLen = (int)len; + return S_OK; + } + } + } + } + return S_OK; +} + +HRESULT CDecoder::CodeReal(ISequentialInStream *inStream, ISequentialOutStream *outStream, + const UInt64 *, const UInt64 *outSize, ICompressProgressInfo *progress) +{ + if (outSize == NULL) + return E_INVALIDARG; + UInt64 size = *outSize; + + RINOK(SetInStream(inStream)); + m_x86ConvertOutStreamSpec->SetStream(outStream); + m_OutWindowStream.SetStream(m_x86ConvertOutStream); + RINOK(SetOutStreamSize(outSize)); + + CDecoderFlusher flusher(this); + + const UInt64 start = m_OutWindowStream.GetProcessedSize(); + for (;;) + { + UInt32 curSize = 1 << 18; + UInt64 rem = size - (m_OutWindowStream.GetProcessedSize() - start); + if (curSize > rem) + curSize = (UInt32)rem; + if (curSize == 0) + break; + RINOK(CodeSpec(curSize)); + if (progress != NULL) + { + UInt64 inSize = m_InBitStream.GetProcessedSize(); + UInt64 nowPos64 = m_OutWindowStream.GetProcessedSize() - start; + RINOK(progress->SetRatioInfo(&inSize, &nowPos64)); + } + } + flusher.NeedFlush = false; + return Flush(); +} + +HRESULT CDecoder::Code(ISequentialInStream *inStream, ISequentialOutStream *outStream, + const UInt64 *inSize, const UInt64 *outSize, ICompressProgressInfo *progress) +{ + try { return CodeReal(inStream, outStream, inSize, outSize, progress); } + catch(const CLzOutWindowException &e) { return e.ErrorCode; } + catch(...) { return S_FALSE; } +} + +STDMETHODIMP CDecoder::SetInStream(ISequentialInStream *inStream) +{ + m_InBitStream.SetStream(inStream); + return S_OK; +} + +STDMETHODIMP CDecoder::ReleaseInStream() +{ + m_InBitStream.ReleaseStream(); + return S_OK; +} + +STDMETHODIMP CDecoder::SetOutStreamSize(const UInt64 *outSize) +{ + if (outSize == NULL) + return E_FAIL; + _remainLen = kLenIdNeedInit; + m_OutWindowStream.Init(_keepHistory); + return S_OK; +} + +HRESULT CDecoder::SetParams(unsigned numDictBits) +{ + if (numDictBits < kNumDictionaryBitsMin || numDictBits > kNumDictionaryBitsMax) + return E_INVALIDARG; + UInt32 numPosSlots; + if (numDictBits < 20) + numPosSlots = 30 + (numDictBits - 15) * 2; + else if (numDictBits == 20) + numPosSlots = 42; + else + numPosSlots = 50; + m_NumPosLenSlots = numPosSlots * kNumLenSlots; + if (!m_OutWindowStream.Create(kDictionarySizeMax)) + return E_OUTOFMEMORY; + if (!m_InBitStream.Create(1 << 16)) + return E_OUTOFMEMORY; + return S_OK; +} + +}} diff --git a/CPP/7zip/Compress/LzxDecoder.h b/CPP/7zip/Compress/LzxDecoder.h new file mode 100644 index 0000000..73a0506 --- /dev/null +++ b/CPP/7zip/Compress/LzxDecoder.h @@ -0,0 +1,159 @@ +// LzxDecoder.h + +#ifndef __LZX_DECODER_H +#define __LZX_DECODER_H + +#include "../ICoder.h" + +#include "../Common/InBuffer.h" + +#include "HuffmanDecoder.h" +#include "LzOutWindow.h" +#include "Lzx.h" +#include "Lzx86Converter.h" + +namespace NCompress { +namespace NLzx { + +namespace NBitStream { + +const unsigned kNumBigValueBits = 8 * 4; +const unsigned kNumValueBits = 17; +const UInt32 kBitDecoderValueMask = (1 << kNumValueBits) - 1; + +class CDecoder +{ + CInBuffer m_Stream; + UInt32 m_Value; + unsigned m_BitPos; +public: + CDecoder() {} + bool Create(UInt32 bufferSize) { return m_Stream.Create(bufferSize); } + + void SetStream(ISequentialInStream *s) { m_Stream.SetStream(s); } + void ReleaseStream() { m_Stream.ReleaseStream(); } + + void Init() + { + m_Stream.Init(); + m_BitPos = kNumBigValueBits; + } + + UInt64 GetProcessedSize() const { return m_Stream.GetProcessedSize() - (kNumBigValueBits - m_BitPos) / 8; } + + unsigned GetBitPosition() const { return m_BitPos & 0xF; } + + void Normalize() + { + for (; m_BitPos >= 16; m_BitPos -= 16) + { + Byte b0 = m_Stream.ReadByte(); + Byte b1 = m_Stream.ReadByte(); + m_Value = (m_Value << 8) | b1; + m_Value = (m_Value << 8) | b0; + } + } + + UInt32 GetValue(unsigned numBits) const + { + return ((m_Value >> ((32 - kNumValueBits) - m_BitPos)) & kBitDecoderValueMask) >> (kNumValueBits - numBits); + } + + void MovePos(unsigned numBits) + { + m_BitPos += numBits; + Normalize(); + } + + UInt32 ReadBits(unsigned numBits) + { + UInt32 res = GetValue(numBits); + MovePos(numBits); + return res; + } + + UInt32 ReadBitsBig(unsigned numBits) + { + unsigned numBits0 = numBits / 2; + unsigned numBits1 = numBits - numBits0; + UInt32 res = ReadBits(numBits0) << numBits1; + return res + ReadBits(numBits1); + } + + bool ReadUInt32(UInt32 &v) + { + if (m_BitPos != 0) + return false; + v = ((m_Value >> 16) & 0xFFFF) | ((m_Value << 16) & 0xFFFF0000); + m_BitPos = kNumBigValueBits; + return true; + } + + Byte DirectReadByte() { return m_Stream.ReadByte(); } + +}; +} + +class CDecoder : + public ICompressCoder, + public CMyUnknownImp +{ + NBitStream::CDecoder m_InBitStream; + CLzOutWindow m_OutWindowStream; + + UInt32 m_RepDistances[kNumRepDistances]; + UInt32 m_NumPosLenSlots; + + bool m_IsUncompressedBlock; + bool m_AlignIsUsed; + + NCompress::NHuffman::CDecoder m_MainDecoder; + NCompress::NHuffman::CDecoder m_LenDecoder; + NCompress::NHuffman::CDecoder m_AlignDecoder; + NCompress::NHuffman::CDecoder m_LevelDecoder; + + Byte m_LastMainLevels[kMainTableSize]; + Byte m_LastLenLevels[kNumLenSymbols]; + + Cx86ConvertOutStream *m_x86ConvertOutStreamSpec; + CMyComPtr m_x86ConvertOutStream; + + UInt32 m_UnCompressedBlockSize; + + bool _keepHistory; + int _remainLen; + bool _skipByte; + + bool _wimMode; + + UInt32 ReadBits(unsigned numBits); + bool ReadTable(Byte *lastLevels, Byte *newLevels, UInt32 numSymbols); + bool ReadTables(); + void ClearPrevLevels(); + + HRESULT CodeSpec(UInt32 size); + + HRESULT CodeReal(ISequentialInStream *inStream, ISequentialOutStream *outStream, + const UInt64 *inSize, const UInt64 *outSize, ICompressProgressInfo *progress); +public: + CDecoder(bool wimMode = false); + + MY_UNKNOWN_IMP + + void ReleaseStreams(); + STDMETHOD(Flush)(); + + STDMETHOD(Code)(ISequentialInStream *inStream, ISequentialOutStream *outStream, + const UInt64 *inSize, const UInt64 *outSize, ICompressProgressInfo *progress); + + STDMETHOD(SetInStream)(ISequentialInStream *inStream); + STDMETHOD(ReleaseInStream)(); + STDMETHOD(SetOutStreamSize)(const UInt64 *outSize); + + HRESULT SetParams(unsigned numDictBits); + void SetKeepHistory(bool keepHistory) { _keepHistory = keepHistory; } +}; + +}} + +#endif diff --git a/CPP/7zip/Compress/Mtf8.h b/CPP/7zip/Compress/Mtf8.h new file mode 100644 index 0000000..d15dd4a --- /dev/null +++ b/CPP/7zip/Compress/Mtf8.h @@ -0,0 +1,193 @@ +// Mtf8.h + +#ifndef __COMPRESS_MTF8_H +#define __COMPRESS_MTF8_H + +#include "../../../C/CpuArch.h" + +#include "../../Common/Types.h" + +namespace NCompress { + +struct CMtf8Encoder +{ + Byte Buf[256]; + + int FindAndMove(Byte v) + { + int pos; + for (pos = 0; Buf[pos] != v; pos++); + int resPos = pos; + for (; pos >= 8; pos -= 8) + { + Buf[pos] = Buf[pos - 1]; + Buf[pos - 1] = Buf[pos - 2]; + Buf[pos - 2] = Buf[pos - 3]; + Buf[pos - 3] = Buf[pos - 4]; + Buf[pos - 4] = Buf[pos - 5]; + Buf[pos - 5] = Buf[pos - 6]; + Buf[pos - 6] = Buf[pos - 7]; + Buf[pos - 7] = Buf[pos - 8]; + } + for (; pos > 0; pos--) + Buf[pos] = Buf[pos - 1]; + Buf[0] = v; + return resPos; + } +}; + +/* +struct CMtf8Decoder +{ + Byte Buf[256]; + + void Init(int) {}; + Byte GetHead() const { return Buf[0]; } + Byte GetAndMove(int pos) + { + Byte res = Buf[pos]; + for (; pos >= 8; pos -= 8) + { + Buf[pos] = Buf[pos - 1]; + Buf[pos - 1] = Buf[pos - 2]; + Buf[pos - 2] = Buf[pos - 3]; + Buf[pos - 3] = Buf[pos - 4]; + Buf[pos - 4] = Buf[pos - 5]; + Buf[pos - 5] = Buf[pos - 6]; + Buf[pos - 6] = Buf[pos - 7]; + Buf[pos - 7] = Buf[pos - 8]; + } + for (; pos > 0; pos--) + Buf[pos] = Buf[pos - 1]; + Buf[0] = res; + return res; + } +}; +*/ + +#ifdef MY_CPU_64BIT +typedef UInt64 CMtfVar; +#define MTF_MOVS 3 +#else +typedef UInt32 CMtfVar; +#define MTF_MOVS 2 +#endif + +#define MTF_MASK ((1 << MTF_MOVS) - 1) + + +struct CMtf8Decoder +{ + CMtfVar Buf[256 >> MTF_MOVS]; + + void StartInit() { memset(Buf, 0, sizeof(Buf)); } + void Add(unsigned int pos, Byte val) { Buf[pos >> MTF_MOVS] |= ((CMtfVar)val << ((pos & MTF_MASK) << 3)); } + Byte GetHead() const { return (Byte)Buf[0]; } + Byte GetAndMove(unsigned int pos) + { + UInt32 lim = ((UInt32)pos >> MTF_MOVS); + pos = (pos & MTF_MASK) << 3; + CMtfVar prev = (Buf[lim] >> pos) & 0xFF; + + UInt32 i = 0; + if ((lim & 1) != 0) + { + CMtfVar next = Buf[0]; + Buf[0] = (next << 8) | prev; + prev = (next >> (MTF_MASK << 3)); + i = 1; + lim -= 1; + } + for (; i < lim; i += 2) + { + CMtfVar n0 = Buf[i]; + CMtfVar n1 = Buf[i + 1]; + Buf[i ] = (n0 << 8) | prev; + Buf[i + 1] = (n1 << 8) | (n0 >> (MTF_MASK << 3)); + prev = (n1 >> (MTF_MASK << 3)); + } + CMtfVar next = Buf[i]; + CMtfVar mask = (((CMtfVar)0x100 << pos) - 1); + Buf[i] = (next & ~mask) | (((next << 8) | prev) & mask); + return (Byte)Buf[0]; + } +}; + +/* +const int kSmallSize = 64; +class CMtf8Decoder +{ + Byte SmallBuffer[kSmallSize]; + int SmallSize; + Byte Counts[16]; + int Size; +public: + Byte Buf[256]; + + Byte GetHead() const + { + if (SmallSize > 0) + return SmallBuffer[kSmallSize - SmallSize]; + return Buf[0]; + } + + void Init(int size) + { + Size = size; + SmallSize = 0; + for (int i = 0; i < 16; i++) + { + Counts[i] = ((size >= 16) ? 16 : size); + size -= Counts[i]; + } + } + + Byte GetAndMove(int pos) + { + if (pos < SmallSize) + { + Byte *p = SmallBuffer + kSmallSize - SmallSize; + Byte res = p[pos]; + for (; pos > 0; pos--) + p[pos] = p[pos - 1]; + SmallBuffer[kSmallSize - SmallSize] = res; + return res; + } + if (SmallSize == kSmallSize) + { + int i = Size - 1; + int g = 16; + do + { + g--; + int offset = (g << 4); + for (int t = Counts[g] - 1; t >= 0; t--, i--) + Buf[i] = Buf[offset + t]; + } + while(g != 0); + + for (i = kSmallSize - 1; i >= 0; i--) + Buf[i] = SmallBuffer[i]; + Init(Size); + } + pos -= SmallSize; + int g; + for (g = 0; pos >= Counts[g]; g++) + pos -= Counts[g]; + int offset = (g << 4); + Byte res = Buf[offset + pos]; + for (pos; pos < 16 - 1; pos++) + Buf[offset + pos] = Buf[offset + pos + 1]; + + SmallSize++; + SmallBuffer[kSmallSize - SmallSize] = res; + + Counts[g]--; + return res; + } +}; +*/ + +} + +#endif diff --git a/CPP/7zip/Compress/PpmdDecoder.cpp b/CPP/7zip/Compress/PpmdDecoder.cpp new file mode 100644 index 0000000..c02f44f --- /dev/null +++ b/CPP/7zip/Compress/PpmdDecoder.cpp @@ -0,0 +1,167 @@ +// PpmdDecoder.cpp +// 2009-03-11 : Igor Pavlov : Public domain + +#include "StdAfx.h" + +#include "../../../C/Alloc.h" +#include "../../../C/CpuArch.h" + +#include "../Common/StreamUtils.h" + +#include "PpmdDecoder.h" + +namespace NCompress { +namespace NPpmd { + +static const UInt32 kBufSize = (1 << 20); + +enum +{ + kStatus_NeedInit, + kStatus_Normal, + kStatus_Finished, + kStatus_Error +}; + +static void *SzBigAlloc(void *, size_t size) { return BigAlloc(size); } +static void SzBigFree(void *, void *address) { BigFree(address); } +static ISzAlloc g_BigAlloc = { SzBigAlloc, SzBigFree }; + +CDecoder::~CDecoder() +{ + ::MidFree(_outBuf); + Ppmd7_Free(&_ppmd, &g_BigAlloc); +} + +STDMETHODIMP CDecoder::SetDecoderProperties2(const Byte *props, UInt32 size) +{ + if (size < 5) + return E_INVALIDARG; + _order = props[0]; + UInt32 memSize = GetUi32(props + 1); + if (_order < PPMD7_MIN_ORDER || + _order > PPMD7_MAX_ORDER || + memSize < PPMD7_MIN_MEM_SIZE || + memSize > PPMD7_MAX_MEM_SIZE) + return E_NOTIMPL; + if (!_inStream.Alloc(1 << 20)) + return E_OUTOFMEMORY; + if (!Ppmd7_Alloc(&_ppmd, memSize, &g_BigAlloc)) + return E_OUTOFMEMORY; + return S_OK; +} + +HRESULT CDecoder::CodeSpec(Byte *memStream, UInt32 size) +{ + switch(_status) + { + case kStatus_Finished: return S_OK; + case kStatus_Error: return S_FALSE; + case kStatus_NeedInit: + _inStream.Init(); + if (!Ppmd7z_RangeDec_Init(&_rangeDec)) + { + _status = kStatus_Error; + return S_FALSE; + } + _status = kStatus_Normal; + Ppmd7_Init(&_ppmd, _order); + break; + } + if (_outSizeDefined) + { + const UInt64 rem = _outSize - _processedSize; + if (size > rem) + size = (UInt32)rem; + } + + UInt32 i; + int sym = 0; + for (i = 0; i != size; i++) + { + sym = Ppmd7_DecodeSymbol(&_ppmd, &_rangeDec.p); + if (_inStream.Extra || sym < 0) + break; + memStream[i] = (Byte)sym; + } + + _processedSize += i; + if (_inStream.Extra) + { + _status = kStatus_Error; + return _inStream.Res; + } + if (sym < 0) + _status = (sym < -1) ? kStatus_Error : kStatus_Finished; + return S_OK; +} + +STDMETHODIMP CDecoder::Code(ISequentialInStream *inStream, ISequentialOutStream *outStream, + const UInt64 * /* inSize */, const UInt64 *outSize, ICompressProgressInfo *progress) +{ + if (!_outBuf) + { + _outBuf = (Byte *)::MidAlloc(kBufSize); + if (!_outBuf) + return E_OUTOFMEMORY; + } + + _inStream.Stream = inStream; + SetOutStreamSize(outSize); + + do + { + const UInt64 startPos = _processedSize; + HRESULT res = CodeSpec(_outBuf, kBufSize); + size_t processed = (size_t)(_processedSize - startPos); + RINOK(WriteStream(outStream, _outBuf, processed)); + RINOK(res); + if (_status == kStatus_Finished) + break; + if (progress) + { + UInt64 inSize = _inStream.GetProcessed(); + RINOK(progress->SetRatioInfo(&inSize, &_processedSize)); + } + } + while (!_outSizeDefined || _processedSize < _outSize); + return S_OK; +} + +STDMETHODIMP CDecoder::SetOutStreamSize(const UInt64 *outSize) +{ + _outSizeDefined = (outSize != NULL); + if (_outSizeDefined) + _outSize = *outSize; + _processedSize = 0; + _status = kStatus_NeedInit; + return S_OK; +} + +#ifndef NO_READ_FROM_CODER + +STDMETHODIMP CDecoder::SetInStream(ISequentialInStream *inStream) +{ + InSeqStream = inStream; + _inStream.Stream = inStream; + return S_OK; +} + +STDMETHODIMP CDecoder::ReleaseInStream() +{ + InSeqStream.Release(); + return S_OK; +} + +STDMETHODIMP CDecoder::Read(void *data, UInt32 size, UInt32 *processedSize) +{ + const UInt64 startPos = _processedSize; + HRESULT res = CodeSpec((Byte *)data, size); + if (processedSize) + *processedSize = (UInt32)(_processedSize - startPos); + return res; +} + +#endif + +}} diff --git a/CPP/7zip/Compress/PpmdDecoder.h b/CPP/7zip/Compress/PpmdDecoder.h new file mode 100644 index 0000000..8ebcd70 --- /dev/null +++ b/CPP/7zip/Compress/PpmdDecoder.h @@ -0,0 +1,78 @@ +// PpmdDecoder.h +// 2009-03-11 : Igor Pavlov : Public domain + +#ifndef __COMPRESS_PPMD_DECODER_H +#define __COMPRESS_PPMD_DECODER_H + +#include "../../../C/Ppmd7.h" + +#include "../../Common/MyCom.h" + +#include "../Common/CWrappers.h" + +#include "../ICoder.h" + +namespace NCompress { +namespace NPpmd { + +class CDecoder : + public ICompressCoder, + public ICompressSetDecoderProperties2, + #ifndef NO_READ_FROM_CODER + public ICompressSetInStream, + public ICompressSetOutStreamSize, + public ISequentialInStream, + #endif + public CMyUnknownImp +{ + Byte *_outBuf; + CPpmd7z_RangeDec _rangeDec; + CByteInBufWrap _inStream; + CPpmd7 _ppmd; + + Byte _order; + bool _outSizeDefined; + int _status; + UInt64 _outSize; + UInt64 _processedSize; + + HRESULT CodeSpec(Byte *memStream, UInt32 size); + +public: + + #ifndef NO_READ_FROM_CODER + CMyComPtr InSeqStream; + MY_UNKNOWN_IMP4( + ICompressSetDecoderProperties2, + ICompressSetInStream, + ICompressSetOutStreamSize, + ISequentialInStream) + #else + MY_UNKNOWN_IMP1( + ICompressSetDecoderProperties2) + #endif + + STDMETHOD(Code)(ISequentialInStream *inStream, ISequentialOutStream *outStream, + const UInt64 *inSize, const UInt64 *outSize, ICompressProgressInfo *progress); + STDMETHOD(SetDecoderProperties2)(const Byte *data, UInt32 size); + STDMETHOD(SetOutStreamSize)(const UInt64 *outSize); + + #ifndef NO_READ_FROM_CODER + STDMETHOD(SetInStream)(ISequentialInStream *inStream); + STDMETHOD(ReleaseInStream)(); + STDMETHOD(Read)(void *data, UInt32 size, UInt32 *processedSize); + #endif + + CDecoder(): _outBuf(NULL), _outSizeDefined(false) + { + Ppmd7z_RangeDec_CreateVTable(&_rangeDec); + _rangeDec.Stream = &_inStream.p; + Ppmd7_Construct(&_ppmd); + } + + ~CDecoder(); +}; + +}} + +#endif diff --git a/CPP/7zip/Compress/PpmdEncoder.cpp b/CPP/7zip/Compress/PpmdEncoder.cpp new file mode 100644 index 0000000..d823ffe --- /dev/null +++ b/CPP/7zip/Compress/PpmdEncoder.cpp @@ -0,0 +1,119 @@ +// PpmdEncoder.cpp +// 2009-03-11 : Igor Pavlov : Public domain + +#include "StdAfx.h" + +#include "../../../C/Alloc.h" +#include "../../../C/CpuArch.h" + +#include "../Common/StreamUtils.h" + +#include "PpmdEncoder.h" + +namespace NCompress { +namespace NPpmd { + +static const UInt32 kBufSize = (1 << 20); + +static void *SzBigAlloc(void *, size_t size) { return BigAlloc(size); } +static void SzBigFree(void *, void *address) { BigFree(address); } +static ISzAlloc g_BigAlloc = { SzBigAlloc, SzBigFree }; + +CEncoder::CEncoder(): + _inBuf(NULL), + _usedMemSize(1 << 24), + _order(6) +{ + _rangeEnc.Stream = &_outStream.p; + Ppmd7_Construct(&_ppmd); +} + +CEncoder::~CEncoder() +{ + ::MidFree(_inBuf); + Ppmd7_Free(&_ppmd, &g_BigAlloc); +} + +STDMETHODIMP CEncoder::SetCoderProperties(const PROPID *propIDs, const PROPVARIANT *props, UInt32 numProps) +{ + for (UInt32 i = 0; i < numProps; i++) + { + const PROPVARIANT &prop = props[i]; + if (prop.vt != VT_UI4) + return E_INVALIDARG; + UInt32 v = (UInt32)prop.ulVal; + switch(propIDs[i]) + { + case NCoderPropID::kUsedMemorySize: + if (v < (1 << 16) || v > PPMD7_MAX_MEM_SIZE || (v & 3) != 0) + return E_INVALIDARG; + _usedMemSize = v; + break; + case NCoderPropID::kOrder: + if (v < 2 || v > 32) + return E_INVALIDARG; + _order = (Byte)v; + break; + default: + return E_INVALIDARG; + } + } + return S_OK; +} + +STDMETHODIMP CEncoder::WriteCoderProperties(ISequentialOutStream *outStream) +{ + const UInt32 kPropSize = 5; + Byte props[kPropSize]; + props[0] = _order; + SetUi32(props + 1, _usedMemSize); + return WriteStream(outStream, props, kPropSize); +} + +HRESULT CEncoder::Code(ISequentialInStream *inStream, ISequentialOutStream *outStream, + const UInt64 * /* inSize */, const UInt64 * /* outSize */, ICompressProgressInfo *progress) +{ + if (!_inBuf) + { + _inBuf = (Byte *)::MidAlloc(kBufSize); + if (!_inBuf) + return E_OUTOFMEMORY; + } + if (!_outStream.Alloc(1 << 20)) + return E_OUTOFMEMORY; + if (!Ppmd7_Alloc(&_ppmd, _usedMemSize, &g_BigAlloc)) + return E_OUTOFMEMORY; + + _outStream.Stream = outStream; + _outStream.Init(); + + Ppmd7z_RangeEnc_Init(&_rangeEnc); + Ppmd7_Init(&_ppmd, _order); + + UInt64 processed = 0; + for (;;) + { + UInt32 size; + RINOK(inStream->Read(_inBuf, kBufSize, &size)); + if (size == 0) + { + // We don't write EndMark in PPMD-7z. + // Ppmd7_EncodeSymbol(&_ppmd, &_rangeEnc, -1); + Ppmd7z_RangeEnc_FlushData(&_rangeEnc); + return _outStream.Flush(); + } + for (UInt32 i = 0; i < size; i++) + { + Ppmd7_EncodeSymbol(&_ppmd, &_rangeEnc, _inBuf[i]); + RINOK(_outStream.Res); + } + processed += size; + if (progress) + { + UInt64 outSize = _outStream.GetProcessed(); + RINOK(progress->SetRatioInfo(&processed, &outSize)); + } + } +} + +}} diff --git a/CPP/7zip/Compress/PpmdEncoder.h b/CPP/7zip/Compress/PpmdEncoder.h new file mode 100644 index 0000000..ed8b371 --- /dev/null +++ b/CPP/7zip/Compress/PpmdEncoder.h @@ -0,0 +1,48 @@ +// PpmdEncoder.h +// 2009-03-11 : Igor Pavlov : Public domain + +#ifndef __COMPRESS_PPMD_ENCODER_H +#define __COMPRESS_PPMD_ENCODER_H + +#include "../../../C/Ppmd7.h" + +#include "../../Common/MyCom.h" + +#include "../ICoder.h" + +#include "../Common/CWrappers.h" + +namespace NCompress { +namespace NPpmd { + +class CEncoder : + public ICompressCoder, + public ICompressSetCoderProperties, + public ICompressWriteCoderProperties, + public CMyUnknownImp +{ + Byte *_inBuf; + CByteOutBufWrap _outStream; + CPpmd7z_RangeEnc _rangeEnc; + CPpmd7 _ppmd; + + UInt32 _usedMemSize; + Byte _order; + +public: + MY_UNKNOWN_IMP2( + ICompressSetCoderProperties, + ICompressWriteCoderProperties) + + STDMETHOD(Code)(ISequentialInStream *inStream, ISequentialOutStream *outStream, + const UInt64 *inSize, const UInt64 *outSize, ICompressProgressInfo *progress); + STDMETHOD(SetCoderProperties)(const PROPID *propIDs, const PROPVARIANT *props, UInt32 numProps); + STDMETHOD(WriteCoderProperties)(ISequentialOutStream *outStream); + + CEncoder(); + ~CEncoder(); +}; + +}} + +#endif diff --git a/CPP/7zip/Compress/PpmdRegister.cpp b/CPP/7zip/Compress/PpmdRegister.cpp new file mode 100644 index 0000000..9f59fcd --- /dev/null +++ b/CPP/7zip/Compress/PpmdRegister.cpp @@ -0,0 +1,21 @@ +// PpmdRegister.cpp +// 2009-05-30 : Igor Pavlov : Public domain + +#include "StdAfx.h" + +#include "../Common/RegisterCodec.h" + +#include "PpmdDecoder.h" + +static void *CreateCodec() { return (void *)(ICompressCoder *)(new NCompress::NPpmd::CDecoder); } +#ifndef EXTRACT_ONLY +#include "PpmdEncoder.h" +static void *CreateCodecOut() { return (void *)(ICompressCoder *)(new NCompress::NPpmd::CEncoder); } +#else +#define CreateCodecOut 0 +#endif + +static CCodecInfo g_CodecInfo = + { CreateCodec, CreateCodecOut, 0x030401, L"PPMD", 1, false }; + +REGISTER_CODEC(PPMD) diff --git a/CPP/7zip/Compress/PpmdZip.cpp b/CPP/7zip/Compress/PpmdZip.cpp new file mode 100644 index 0000000..e83d979 --- /dev/null +++ b/CPP/7zip/Compress/PpmdZip.cpp @@ -0,0 +1,223 @@ +// PpmdZip.cpp +// 2010-03-24 : Igor Pavlov : Public domain + +#include "StdAfx.h" + +#include "../../../C/CpuArch.h" + +#include "../Common/StreamUtils.h" + +#include "PpmdZip.h" + +namespace NCompress { +namespace NPpmdZip { + +static void *SzBigAlloc(void *, size_t size) { return BigAlloc(size); } +static void SzBigFree(void *, void *address) { BigFree(address); } +static ISzAlloc g_BigAlloc = { SzBigAlloc, SzBigFree }; + +CDecoder::CDecoder(bool fullFileMode): + _fullFileMode(fullFileMode) +{ + _ppmd.Stream.In = &_inStream.p; + Ppmd8_Construct(&_ppmd); +} + +CDecoder::~CDecoder() +{ + Ppmd8_Free(&_ppmd, &g_BigAlloc); +} + +STDMETHODIMP CDecoder::Code(ISequentialInStream *inStream, ISequentialOutStream *outStream, + const UInt64 * /* inSize */, const UInt64 *outSize, ICompressProgressInfo *progress) +{ + if (!_outStream.Alloc()) + return E_OUTOFMEMORY; + if (!_inStream.Alloc(1 << 20)) + return E_OUTOFMEMORY; + + _inStream.Stream = inStream; + _inStream.Init(); + + { + Byte buf[2]; + for (int i = 0; i < 2; i++) + buf[i] = _inStream.ReadByte(); + if (_inStream.Extra) + return S_FALSE; + + UInt32 val = GetUi16(buf); + UInt32 order = (val & 0xF) + 1; + UInt32 mem = ((val >> 4) & 0xFF) + 1; + UInt32 restor = (val >> 12); + if (order < 2 || restor > 2) + return S_FALSE; + + #ifndef PPMD8_FREEZE_SUPPORT + if (restor == 2) + return E_NOTIMPL; + #endif + + if (!Ppmd8_Alloc(&_ppmd, mem << 20, &g_BigAlloc)) + return E_OUTOFMEMORY; + + if (!Ppmd8_RangeDec_Init(&_ppmd)) + return S_FALSE; + Ppmd8_Init(&_ppmd, order, restor); + } + + bool wasFinished = false; + UInt64 processedSize = 0; + while (!outSize || processedSize < *outSize) + { + size_t size = kBufSize; + if (outSize != NULL) + { + const UInt64 rem = *outSize - processedSize; + if (size > rem) + size = (size_t)rem; + } + Byte *data = _outStream.Buf; + size_t i = 0; + int sym = 0; + do + { + sym = Ppmd8_DecodeSymbol(&_ppmd); + if (_inStream.Extra || sym < 0) + break; + data[i] = (Byte)sym; + } + while (++i != size); + processedSize += i; + + RINOK(WriteStream(outStream, _outStream.Buf, i)); + + RINOK(_inStream.Res); + if (_inStream.Extra) + return S_FALSE; + + if (sym < 0) + { + if (sym != -1) + return S_FALSE; + wasFinished = true; + break; + } + if (progress) + { + UInt64 inSize = _inStream.GetProcessed(); + RINOK(progress->SetRatioInfo(&inSize, &processedSize)); + } + } + RINOK(_inStream.Res); + if (_fullFileMode) + { + if (!wasFinished) + { + int res = Ppmd8_DecodeSymbol(&_ppmd); + RINOK(_inStream.Res); + if (_inStream.Extra || res != -1) + return S_FALSE; + } + if (!Ppmd8_RangeDec_IsFinishedOK(&_ppmd)) + return S_FALSE; + } + return S_OK; +} + + +// ---------- Encoder ---------- + +CEncoder::~CEncoder() +{ + Ppmd8_Free(&_ppmd, &g_BigAlloc); +} + +HRESULT CEncoder::SetCoderProperties(const PROPID *propIDs, const PROPVARIANT *props, UInt32 numProps) +{ + for (UInt32 i = 0; i < numProps; i++) + { + const PROPVARIANT &prop = props[i]; + if (prop.vt != VT_UI4) + return E_INVALIDARG; + UInt32 v = (UInt32)prop.ulVal; + switch(propIDs[i]) + { + case NCoderPropID::kAlgorithm: + if (v > 1) + return E_INVALIDARG; + _restor = v; + break; + case NCoderPropID::kUsedMemorySize: + if (v < (1 << 20) || v > (1 << 28)) + return E_INVALIDARG; + _usedMemInMB = v >> 20; + break; + case NCoderPropID::kOrder: + if (v < PPMD8_MIN_ORDER || v > PPMD8_MAX_ORDER) + return E_INVALIDARG; + _order = (Byte)v; + break; + default: + return E_INVALIDARG; + } + } + return S_OK; +} + +CEncoder::CEncoder(): + _usedMemInMB(16), + _order(6), + _restor(PPMD8_RESTORE_METHOD_RESTART) +{ + _ppmd.Stream.Out = &_outStream.p; + Ppmd8_Construct(&_ppmd); +} + +HRESULT CEncoder::Code(ISequentialInStream *inStream, ISequentialOutStream *outStream, + const UInt64 * /* inSize */, const UInt64 * /* outSize */, ICompressProgressInfo *progress) +{ + if (!_inStream.Alloc()) + return E_OUTOFMEMORY; + if (!_outStream.Alloc(1 << 20)) + return E_OUTOFMEMORY; + if (!Ppmd8_Alloc(&_ppmd, _usedMemInMB << 20, &g_BigAlloc)) + return E_OUTOFMEMORY; + + _outStream.Stream = outStream; + _outStream.Init(); + + Ppmd8_RangeEnc_Init(&_ppmd); + Ppmd8_Init(&_ppmd, _order, _restor); + + UInt32 val = (UInt32)((_order - 1) + ((_usedMemInMB - 1) << 4) + (_restor << 12)); + _outStream.WriteByte((Byte)(val & 0xFF)); + _outStream.WriteByte((Byte)(val >> 8)); + RINOK(_outStream.Res); + + UInt64 processed = 0; + for (;;) + { + UInt32 size; + RINOK(inStream->Read(_inStream.Buf, kBufSize, &size)); + if (size == 0) + { + Ppmd8_EncodeSymbol(&_ppmd, -1); + Ppmd8_RangeEnc_FlushData(&_ppmd); + return _outStream.Flush(); + } + for (UInt32 i = 0; i < size; i++) + { + Ppmd8_EncodeSymbol(&_ppmd, _inStream.Buf[i]); + RINOK(_outStream.Res); + } + processed += size; + if (progress != NULL) + { + UInt64 outSize = _outStream.GetProcessed(); + RINOK(progress->SetRatioInfo(&processed, &outSize)); + } + } +} + +}} diff --git a/CPP/7zip/Compress/PpmdZip.h b/CPP/7zip/Compress/PpmdZip.h new file mode 100644 index 0000000..c2288b5 --- /dev/null +++ b/CPP/7zip/Compress/PpmdZip.h @@ -0,0 +1,72 @@ +// PpmdZip.h +// 2010-03-11 : Igor Pavlov : Public domain + +#ifndef __COMPRESS_PPMD_ZIP_H +#define __COMPRESS_PPMD_ZIP_H + +#include "../../../C/Alloc.h" +#include "../../../C/Ppmd8.h" + +#include "../../Common/MyCom.h" + +#include "../Common/CWrappers.h" + +#include "../ICoder.h" + +namespace NCompress { +namespace NPpmdZip { + +static const UInt32 kBufSize = (1 << 20); + +struct CBuf +{ + Byte *Buf; + + CBuf(): Buf(0) {} + ~CBuf() { ::MidFree(Buf); } + bool Alloc() + { + if (!Buf) + Buf = (Byte *)::MidAlloc(kBufSize); + return (Buf != 0); + } +}; + +class CDecoder : + public ICompressCoder, + public CMyUnknownImp +{ + CByteInBufWrap _inStream; + CBuf _outStream; + CPpmd8 _ppmd; + bool _fullFileMode; +public: + MY_UNKNOWN_IMP + STDMETHOD(Code)(ISequentialInStream *inStream, ISequentialOutStream *outStream, + const UInt64 *inSize, const UInt64 *outSize, ICompressProgressInfo *progress); + CDecoder(bool fullFileMode); + ~CDecoder(); +}; + +class CEncoder : + public ICompressCoder, + public CMyUnknownImp +{ + CByteOutBufWrap _outStream; + CBuf _inStream; + CPpmd8 _ppmd; + UInt32 _usedMemInMB; + unsigned _order; + unsigned _restor; +public: + MY_UNKNOWN_IMP + STDMETHOD(Code)(ISequentialInStream *inStream, ISequentialOutStream *outStream, + const UInt64 *inSize, const UInt64 *outSize, ICompressProgressInfo *progress); + HRESULT SetCoderProperties(const PROPID *propIDs, const PROPVARIANT *props, UInt32 numProps); + CEncoder(); + ~CEncoder(); +}; + +}} + +#endif diff --git a/CPP/7zip/Compress/QuantumDecoder.cpp b/CPP/7zip/Compress/QuantumDecoder.cpp new file mode 100644 index 0000000..501bd0e --- /dev/null +++ b/CPP/7zip/Compress/QuantumDecoder.cpp @@ -0,0 +1,175 @@ +// QuantumDecoder.cpp + +#include "StdAfx.h" + +#include "../../Common/Defs.h" + +#include "QuantumDecoder.h" + +namespace NCompress { +namespace NQuantum { + +static const int kLenIdNeedInit = -2; + +static const unsigned kNumLenSymbols = 27; +static const unsigned kMatchMinLen = 3; +static const unsigned kNumSimplePosSlots = 4; +static const unsigned kNumSimpleLenSlots = 6; + +void CDecoder::Init() +{ + m_Selector.Init(kNumSelectors); + unsigned i; + for (i = 0; i < kNumLitSelectors; i++) + m_Literals[i].Init(kNumLitSymbols); + unsigned numItems = (_numDictBits == 0 ? 1 : (_numDictBits << 1)); + const unsigned kNumPosSymbolsMax[kNumMatchSelectors] = { 24, 36, 42 }; + for (i = 0; i < kNumMatchSelectors; i++) + m_PosSlot[i].Init(MyMin(numItems, kNumPosSymbolsMax[i])); + m_LenSlot.Init(kNumLenSymbols); +} + +HRESULT CDecoder::CodeSpec(UInt32 curSize) +{ + if (_remainLen == kLenIdNeedInit) + { + if (!_keepHistory) + { + if (!_outWindowStream.Create((UInt32)1 << _numDictBits)) + return E_OUTOFMEMORY; + Init(); + } + if (!_rangeDecoder.Create(1 << 20)) + return E_OUTOFMEMORY; + _rangeDecoder.Init(); + _remainLen = 0; + } + if (curSize == 0) + return S_OK; + + while (_remainLen > 0 && curSize > 0) + { + _remainLen--; + Byte b = _outWindowStream.GetByte(_rep0); + _outWindowStream.PutByte(b); + curSize--; + } + + while (curSize > 0) + { + if (_rangeDecoder.Stream.WasFinished()) + return S_FALSE; + + unsigned selector = m_Selector.Decode(&_rangeDecoder); + if (selector < kNumLitSelectors) + { + Byte b = (Byte)((selector << (8 - kNumLitSelectorBits)) + m_Literals[selector].Decode(&_rangeDecoder)); + _outWindowStream.PutByte(b); + curSize--; + } + else + { + selector -= kNumLitSelectors; + unsigned len = selector + kMatchMinLen; + if (selector == 2) + { + unsigned lenSlot = m_LenSlot.Decode(&_rangeDecoder); + if (lenSlot >= kNumSimpleLenSlots) + { + lenSlot -= 2; + int numDirectBits = (int)(lenSlot >> 2); + len += ((4 | (lenSlot & 3)) << numDirectBits) - 2; + if (numDirectBits < 6) + len += _rangeDecoder.Stream.ReadBits(numDirectBits); + } + else + len += lenSlot; + } + UInt32 rep0 = m_PosSlot[selector].Decode(&_rangeDecoder); + if (rep0 >= kNumSimplePosSlots) + { + int numDirectBits = (int)((rep0 >> 1) - 1); + rep0 = ((2 | (rep0 & 1)) << numDirectBits) + _rangeDecoder.Stream.ReadBits(numDirectBits); + } + unsigned locLen = len; + if (len > curSize) + locLen = (unsigned)curSize; + if (!_outWindowStream.CopyBlock(rep0, locLen)) + return S_FALSE; + curSize -= locLen; + len -= locLen; + if (len != 0) + { + _remainLen = (int)len; + _rep0 = rep0; + break; + } + } + } + return _rangeDecoder.Stream.WasFinished() ? S_FALSE : S_OK; +} + +HRESULT CDecoder::CodeReal(ISequentialInStream *inStream, ISequentialOutStream *outStream, + const UInt64 *, const UInt64 *outSize, ICompressProgressInfo *progress) +{ + if (outSize == NULL) + return E_INVALIDARG; + UInt64 size = *outSize; + + SetInStream(inStream); + _outWindowStream.SetStream(outStream); + SetOutStreamSize(outSize); + CDecoderFlusher flusher(this); + + const UInt64 start = _outWindowStream.GetProcessedSize(); + for (;;) + { + UInt32 curSize = 1 << 18; + UInt64 rem = size - (_outWindowStream.GetProcessedSize() - start); + if (curSize > rem) + curSize = (UInt32)rem; + if (curSize == 0) + break; + RINOK(CodeSpec(curSize)); + if (progress != NULL) + { + UInt64 inSize = _rangeDecoder.GetProcessedSize(); + UInt64 nowPos64 = _outWindowStream.GetProcessedSize() - start; + RINOK(progress->SetRatioInfo(&inSize, &nowPos64)); + } + } + flusher.NeedFlush = false; + return Flush(); +} + +STDMETHODIMP CDecoder::Code(ISequentialInStream *inStream, ISequentialOutStream *outStream, + const UInt64 *inSize, const UInt64 *outSize, ICompressProgressInfo *progress) +{ + try { return CodeReal(inStream, outStream, inSize, outSize, progress); } + catch(const CInBufferException &e) { return e.ErrorCode; } + catch(const CLzOutWindowException &e) { return e.ErrorCode; } + catch(...) { return S_FALSE; } +} + +STDMETHODIMP CDecoder::SetInStream(ISequentialInStream *inStream) +{ + _rangeDecoder.SetStream(inStream); + return S_OK; +} + +STDMETHODIMP CDecoder::ReleaseInStream() +{ + _rangeDecoder.ReleaseStream(); + return S_OK; +} + +STDMETHODIMP CDecoder::SetOutStreamSize(const UInt64 *outSize) +{ + if (outSize == NULL) + return E_FAIL; + _remainLen = kLenIdNeedInit; + _outWindowStream.Init(_keepHistory); + return S_OK; +} + +}} diff --git a/CPP/7zip/Compress/QuantumDecoder.h b/CPP/7zip/Compress/QuantumDecoder.h new file mode 100644 index 0000000..e9ab023 --- /dev/null +++ b/CPP/7zip/Compress/QuantumDecoder.h @@ -0,0 +1,264 @@ +// QuantumDecoder.h + +#ifndef __COMPRESS_QUANTUM_DECODER_H +#define __COMPRESS_QUANTUM_DECODER_H + +#include "../../Common/MyCom.h" + +#include "../ICoder.h" + +#include "../Common/InBuffer.h" + +#include "LzOutWindow.h" + +namespace NCompress { +namespace NQuantum { + +class CStreamBitDecoder +{ + UInt32 Value; + CInBuffer Stream; +public: + bool Create(UInt32 bufferSize) { return Stream.Create(bufferSize); } + void SetStream(ISequentialInStream *stream) { Stream.SetStream(stream); } + void ReleaseStream() { Stream.ReleaseStream(); } + + void Finish() { Value = 0x10000; } + + void Init() + { + Stream.Init(); + Value = 0x10000; + } + + UInt64 GetProcessedSize() const { return Stream.GetProcessedSize(); } + bool WasFinished() const { return Stream.WasFinished(); } + + UInt32 ReadBit() + { + if (Value >= 0x10000) + Value = 0x100 | Stream.ReadByte(); + UInt32 res = (Value >> 7) & 1; + Value <<= 1; + return res; + } + + UInt32 ReadBits(int numBits) // numBits > 0 + { + UInt32 res = 0; + do + res = (res << 1) | ReadBit(); + while (--numBits != 0); + return res; + } +}; + +const unsigned kNumLitSelectorBits = 2; +const unsigned kNumLitSelectors = (1 << kNumLitSelectorBits); +const unsigned kNumLitSymbols = 1 << (8 - kNumLitSelectorBits); +const unsigned kNumMatchSelectors = 3; +const unsigned kNumSelectors = kNumLitSelectors + kNumMatchSelectors; +const unsigned kNumSymbolsMax = kNumLitSymbols; // 64 + +namespace NRangeCoder { + +class CDecoder +{ + UInt32 Low; + UInt32 Range; + UInt32 Code; +public: + CStreamBitDecoder Stream; + bool Create(UInt32 bufferSize) { return Stream.Create(bufferSize); } + void SetStream(ISequentialInStream *stream) { Stream.SetStream(stream); } + void ReleaseStream() { Stream.ReleaseStream(); } + + void Init() + { + Stream.Init(); + Low = 0; + Range = 0x10000; + Code = Stream.ReadBits(16); + } + + void Finish() + { + // we need these extra two Bit_reads + Stream.ReadBit(); + Stream.ReadBit(); + Stream.Finish(); + } + + UInt64 GetProcessedSize() const { return Stream.GetProcessedSize(); } + + UInt32 GetThreshold(UInt32 total) const + { + return ((Code + 1) * total - 1) / Range; // & 0xFFFF is not required; + } + + void Decode(UInt32 start, UInt32 end, UInt32 total) + { + UInt32 high = Low + end * Range / total - 1; + UInt32 offset = start * Range / total; + Code -= offset; + Low += offset; + for (;;) + { + if ((Low & 0x8000) != (high & 0x8000)) + { + if ((Low & 0x4000) == 0 || (high & 0x4000) != 0) + break; + Low &= 0x3FFF; + high |= 0x4000; + } + Low = (Low << 1) & 0xFFFF; + high = ((high << 1) | 1) & 0xFFFF; + Code = ((Code << 1) | Stream.ReadBit()); + } + Range = high - Low + 1; + } +}; + +const UInt16 kUpdateStep = 8; +const UInt16 kFreqSumMax = 3800; +const UInt16 kReorderCountStart = 4; +const UInt16 kReorderCount = 50; + +class CModelDecoder +{ + unsigned NumItems; + unsigned ReorderCount; + UInt16 Freqs[kNumSymbolsMax + 1]; + Byte Values[kNumSymbolsMax]; +public: + void Init(unsigned numItems) + { + NumItems = numItems; + ReorderCount = kReorderCountStart; + for (unsigned i = 0; i < numItems; i++) + { + Freqs[i] = (UInt16)(numItems - i); + Values[i] = (Byte)i; + } + Freqs[numItems] = 0; + } + + unsigned Decode(CDecoder *rangeDecoder) + { + UInt32 threshold = rangeDecoder->GetThreshold(Freqs[0]); + unsigned i; + for (i = 1; Freqs[i] > threshold; i++); + rangeDecoder->Decode(Freqs[i], Freqs[i - 1], Freqs[0]); + unsigned res = Values[--i]; + do + Freqs[i] += kUpdateStep; + while (i-- != 0); + + if (Freqs[0] > kFreqSumMax) + { + if (--ReorderCount == 0) + { + ReorderCount = kReorderCount; + for (i = 0; i < NumItems; i++) + Freqs[i] = (UInt16)(((Freqs[i] - Freqs[i + 1]) + 1) >> 1); + for (i = 0; i < NumItems - 1; i++) + for (unsigned j = i + 1; j < NumItems; j++) + if (Freqs[i] < Freqs[j]) + { + UInt16 tmpFreq = Freqs[i]; + Byte tmpVal = Values[i]; + Freqs[i] = Freqs[j]; + Values[i] = Values[j]; + Freqs[j] = tmpFreq; + Values[j] = tmpVal; + } + do + Freqs[i] = (UInt16)(Freqs[i] + Freqs[i + 1]); + while (i-- != 0); + } + else + { + i = NumItems - 1; + do + { + Freqs[i] >>= 1; + if (Freqs[i] <= Freqs[i + 1]) + Freqs[i] = (UInt16)(Freqs[i + 1] + 1); + } + while (i-- != 0); + } + } + return res; + } +}; + +} + +class CDecoder: + public ICompressCoder, + public ICompressSetInStream, + public ICompressSetOutStreamSize, + public CMyUnknownImp +{ + CLzOutWindow _outWindowStream; + NRangeCoder::CDecoder _rangeDecoder; + + UInt64 _outSize; + int _remainLen; // -1 means end of stream. // -2 means need Init + UInt32 _rep0; + + int _numDictBits; + bool _keepHistory; + + NRangeCoder::CModelDecoder m_Selector; + NRangeCoder::CModelDecoder m_Literals[kNumLitSelectors]; + NRangeCoder::CModelDecoder m_PosSlot[kNumMatchSelectors]; + NRangeCoder::CModelDecoder m_LenSlot; + void Init(); + HRESULT CodeSpec(UInt32 size); +public: + MY_UNKNOWN_IMP2( + ICompressSetInStream, + ICompressSetOutStreamSize) + + void ReleaseStreams() + { + _outWindowStream.ReleaseStream(); + ReleaseInStream(); + } + + class CDecoderFlusher + { + CDecoder *_decoder; + public: + bool NeedFlush; + CDecoderFlusher(CDecoder *decoder): _decoder(decoder), NeedFlush(true) {} + ~CDecoderFlusher() + { + if (NeedFlush) + _decoder->Flush(); + _decoder->ReleaseStreams(); + } + }; + + HRESULT Flush() { return _outWindowStream.Flush(); } + + HRESULT CodeReal(ISequentialInStream *inStream, ISequentialOutStream *outStream, + const UInt64 *inSize, const UInt64 *outSize, ICompressProgressInfo *progress); + + STDMETHOD(Code)(ISequentialInStream *inStream, ISequentialOutStream *outStream, + const UInt64 *inSize, const UInt64 *outSize, ICompressProgressInfo *progress); + + STDMETHOD(SetInStream)(ISequentialInStream *inStream); + STDMETHOD(ReleaseInStream)(); + STDMETHOD(SetOutStreamSize)(const UInt64 *outSize); + + void SetParams(int numDictBits) { _numDictBits = numDictBits; } + void SetKeepHistory(bool keepHistory) { _keepHistory = keepHistory; } + CDecoder(): _keepHistory(false) {} + virtual ~CDecoder() {} +}; + +}} + +#endif diff --git a/CPP/7zip/Compress/RangeCoder.h b/CPP/7zip/Compress/RangeCoder.h new file mode 100644 index 0000000..1eb2a6d --- /dev/null +++ b/CPP/7zip/Compress/RangeCoder.h @@ -0,0 +1,205 @@ +// Compress/RangeCoder.h +// 2009-05-30 : Igor Pavlov : Public domain + +#ifndef __COMPRESS_RANGE_CODER_H +#define __COMPRESS_RANGE_CODER_H + +#include "../Common/InBuffer.h" +#include "../Common/OutBuffer.h" + +namespace NCompress { +namespace NRangeCoder { + +const int kNumTopBits = 24; +const UInt32 kTopValue = (1 << kNumTopBits); + +class CEncoder +{ + UInt32 _cacheSize; + Byte _cache; +public: + UInt64 Low; + UInt32 Range; + COutBuffer Stream; + bool Create(UInt32 bufferSize) { return Stream.Create(bufferSize); } + + void SetStream(ISequentialOutStream *stream) { Stream.SetStream(stream); } + void Init() + { + Stream.Init(); + Low = 0; + Range = 0xFFFFFFFF; + _cacheSize = 1; + _cache = 0; + } + + void FlushData() + { + // Low += 1; + for(int i = 0; i < 5; i++) + ShiftLow(); + } + + HRESULT FlushStream() { return Stream.Flush(); } + + void ReleaseStream() { Stream.ReleaseStream(); } + + void Encode(UInt32 start, UInt32 size, UInt32 total) + { + Low += start * (Range /= total); + Range *= size; + while (Range < kTopValue) + { + Range <<= 8; + ShiftLow(); + } + } + + void ShiftLow() + { + if ((UInt32)Low < (UInt32)0xFF000000 || (int)(Low >> 32) != 0) + { + Byte temp = _cache; + do + { + Stream.WriteByte((Byte)(temp + (Byte)(Low >> 32))); + temp = 0xFF; + } + while(--_cacheSize != 0); + _cache = (Byte)((UInt32)Low >> 24); + } + _cacheSize++; + Low = (UInt32)Low << 8; + } + + void EncodeDirectBits(UInt32 value, int numBits) + { + for (numBits--; numBits >= 0; numBits--) + { + Range >>= 1; + Low += Range & (0 - ((value >> numBits) & 1)); + if (Range < kTopValue) + { + Range <<= 8; + ShiftLow(); + } + } + } + + void EncodeBit(UInt32 size0, UInt32 numTotalBits, UInt32 symbol) + { + UInt32 newBound = (Range >> numTotalBits) * size0; + if (symbol == 0) + Range = newBound; + else + { + Low += newBound; + Range -= newBound; + } + while (Range < kTopValue) + { + Range <<= 8; + ShiftLow(); + } + } + + UInt64 GetProcessedSize() { return Stream.GetProcessedSize() + _cacheSize + 4; } +}; + +class CDecoder +{ +public: + CInBuffer Stream; + UInt32 Range; + UInt32 Code; + bool Create(UInt32 bufferSize) { return Stream.Create(bufferSize); } + + void Normalize() + { + while (Range < kTopValue) + { + Code = (Code << 8) | Stream.ReadByte(); + Range <<= 8; + } + } + + void SetStream(ISequentialInStream *stream) { Stream.SetStream(stream); } + void Init() + { + Stream.Init(); + Code = 0; + Range = 0xFFFFFFFF; + for(int i = 0; i < 5; i++) + Code = (Code << 8) | Stream.ReadByte(); + } + + void ReleaseStream() { Stream.ReleaseStream(); } + + UInt32 GetThreshold(UInt32 total) + { + return (Code) / ( Range /= total); + } + + void Decode(UInt32 start, UInt32 size) + { + Code -= start * Range; + Range *= size; + Normalize(); + } + + UInt32 DecodeDirectBits(int numTotalBits) + { + UInt32 range = Range; + UInt32 code = Code; + UInt32 result = 0; + for (int i = numTotalBits; i != 0; i--) + { + range >>= 1; + /* + result <<= 1; + if (code >= range) + { + code -= range; + result |= 1; + } + */ + UInt32 t = (code - range) >> 31; + code -= range & (t - 1); + result = (result << 1) | (1 - t); + + if (range < kTopValue) + { + code = (code << 8) | Stream.ReadByte(); + range <<= 8; + } + } + Range = range; + Code = code; + return result; + } + + UInt32 DecodeBit(UInt32 size0, UInt32 numTotalBits) + { + UInt32 newBound = (Range >> numTotalBits) * size0; + UInt32 symbol; + if (Code < newBound) + { + symbol = 0; + Range = newBound; + } + else + { + symbol = 1; + Code -= newBound; + Range -= newBound; + } + Normalize(); + return symbol; + } + + UInt64 GetProcessedSize() {return Stream.GetProcessedSize(); } +}; + +}} + +#endif diff --git a/CPP/7zip/Compress/RangeCoderBit.h b/CPP/7zip/Compress/RangeCoderBit.h new file mode 100644 index 0000000..b5a1830 --- /dev/null +++ b/CPP/7zip/Compress/RangeCoderBit.h @@ -0,0 +1,114 @@ +// Compress/RangeCoderBit.h +// 2009-05-30 : Igor Pavlov : Public domain + +#ifndef __COMPRESS_RANGE_CODER_BIT_H +#define __COMPRESS_RANGE_CODER_BIT_H + +#include "RangeCoder.h" + +namespace NCompress { +namespace NRangeCoder { + +const int kNumBitModelTotalBits = 11; +const UInt32 kBitModelTotal = (1 << kNumBitModelTotalBits); + +const int kNumMoveReducingBits = 4; + +const int kNumBitPriceShiftBits = 4; +const UInt32 kBitPrice = 1 << kNumBitPriceShiftBits; + +extern UInt32 ProbPrices[kBitModelTotal >> kNumMoveReducingBits]; + +template +class CBitModel +{ +public: + UInt32 Prob; + void UpdateModel(UInt32 symbol) + { + /* + Prob -= (Prob + ((symbol - 1) & ((1 << numMoveBits) - 1))) >> numMoveBits; + Prob += (1 - symbol) << (kNumBitModelTotalBits - numMoveBits); + */ + if (symbol == 0) + Prob += (kBitModelTotal - Prob) >> numMoveBits; + else + Prob -= (Prob) >> numMoveBits; + } +public: + void Init() { Prob = kBitModelTotal / 2; } +}; + +template +class CBitEncoder: public CBitModel +{ +public: + void Encode(CEncoder *encoder, UInt32 symbol) + { + /* + encoder->EncodeBit(this->Prob, kNumBitModelTotalBits, symbol); + this->UpdateModel(symbol); + */ + UInt32 newBound = (encoder->Range >> kNumBitModelTotalBits) * this->Prob; + if (symbol == 0) + { + encoder->Range = newBound; + this->Prob += (kBitModelTotal - this->Prob) >> numMoveBits; + } + else + { + encoder->Low += newBound; + encoder->Range -= newBound; + this->Prob -= (this->Prob) >> numMoveBits; + } + if (encoder->Range < kTopValue) + { + encoder->Range <<= 8; + encoder->ShiftLow(); + } + } + UInt32 GetPrice(UInt32 symbol) const + { + return ProbPrices[(this->Prob ^ ((-(int)symbol)) & (kBitModelTotal - 1)) >> kNumMoveReducingBits]; + } + UInt32 GetPrice0() const { return ProbPrices[this->Prob >> kNumMoveReducingBits]; } + UInt32 GetPrice1() const { return ProbPrices[(this->Prob ^ (kBitModelTotal - 1)) >> kNumMoveReducingBits]; } +}; + + +template +class CBitDecoder: public CBitModel +{ +public: + UInt32 Decode(CDecoder *decoder) + { + UInt32 newBound = (decoder->Range >> kNumBitModelTotalBits) * this->Prob; + if (decoder->Code < newBound) + { + decoder->Range = newBound; + this->Prob += (kBitModelTotal - this->Prob) >> numMoveBits; + if (decoder->Range < kTopValue) + { + decoder->Code = (decoder->Code << 8) | decoder->Stream.ReadByte(); + decoder->Range <<= 8; + } + return 0; + } + else + { + decoder->Range -= newBound; + decoder->Code -= newBound; + this->Prob -= (this->Prob) >> numMoveBits; + if (decoder->Range < kTopValue) + { + decoder->Code = (decoder->Code << 8) | decoder->Stream.ReadByte(); + decoder->Range <<= 8; + } + return 1; + } + } +}; + +}} + +#endif diff --git a/CPP/7zip/Compress/ShrinkDecoder.cpp b/CPP/7zip/Compress/ShrinkDecoder.cpp new file mode 100644 index 0000000..a89d323 --- /dev/null +++ b/CPP/7zip/Compress/ShrinkDecoder.cpp @@ -0,0 +1,145 @@ +// ShrinkDecoder.cpp + +#include "StdAfx.h" + +#include "../../../C/Alloc.h" + +#include "../Common/InBuffer.h" +#include "../Common/OutBuffer.h" + +#include "BitlDecoder.h" +#include "ShrinkDecoder.h" + +namespace NCompress { +namespace NShrink { + +static const UInt32 kBufferSize = (1 << 20); +static const int kNumMinBits = 9; + +HRESULT CDecoder::CodeReal(ISequentialInStream *inStream, ISequentialOutStream *outStream, + const UInt64 * /* inSize */, const UInt64 * /* outSize */, ICompressProgressInfo *progress) +{ + NBitl::CBaseDecoder inBuffer; + COutBuffer outBuffer; + + if (!inBuffer.Create(kBufferSize)) + return E_OUTOFMEMORY; + inBuffer.SetStream(inStream); + inBuffer.Init(); + + if (!outBuffer.Create(kBufferSize)) + return E_OUTOFMEMORY; + outBuffer.SetStream(outStream); + outBuffer.Init(); + + UInt64 prevPos = 0; + int numBits = kNumMinBits; + UInt32 head = 257; + bool needPrev = false; + UInt32 lastSymbol = 0; + + int i; + for (i = 0; i < kNumItems; i++) + _parents[i] = 0; + for (i = 0; i < kNumItems; i++) + _suffixes[i] = 0; + for (i = 0; i < 257; i++) + _isFree[i] = false; + for (; i < kNumItems; i++) + _isFree[i] = true; + + for (;;) + { + UInt32 symbol = inBuffer.ReadBits(numBits); + if (inBuffer.ExtraBitsWereRead()) + break; + if (_isFree[symbol]) + return S_FALSE; + if (symbol == 256) + { + UInt32 symbol = inBuffer.ReadBits(numBits); + if (symbol == 1) + { + if (numBits < kNumMaxBits) + numBits++; + } + else if (symbol == 2) + { + if (needPrev) + _isFree[head - 1] = true; + for (i = 257; i < kNumItems; i++) + _isParent[i] = false; + for (i = 257; i < kNumItems; i++) + if (!_isFree[i]) + _isParent[_parents[i]] = true; + for (i = 257; i < kNumItems; i++) + if (!_isParent[i]) + _isFree[i] = true; + head = 257; + while (head < kNumItems && !_isFree[head]) + head++; + if (head < kNumItems) + { + needPrev = true; + _isFree[head] = false; + _parents[head] = (UInt16)lastSymbol; + head++; + } + } + else + return S_FALSE; + continue; + } + UInt32 cur = symbol; + i = 0; + int corectionIndex = -1; + while (cur >= 256) + { + if (cur == head - 1) + corectionIndex = i; + _stack[i++] = _suffixes[cur]; + cur = _parents[cur]; + } + _stack[i++] = (Byte)cur; + if (needPrev) + { + _suffixes[head - 1] = (Byte)cur; + if (corectionIndex >= 0) + _stack[corectionIndex] = (Byte)cur; + } + while (i > 0) + outBuffer.WriteByte((_stack[--i])); + while (head < kNumItems && !_isFree[head]) + head++; + if (head < kNumItems) + { + needPrev = true; + _isFree[head] = false; + _parents[head] = (UInt16)symbol; + head++; + } + else + needPrev = false; + lastSymbol = symbol; + + UInt64 nowPos = outBuffer.GetProcessedSize(); + if (progress != NULL && nowPos - prevPos > (1 << 18)) + { + prevPos = nowPos; + UInt64 packSize = inBuffer.GetProcessedSize(); + RINOK(progress->SetRatioInfo(&packSize, &nowPos)); + } + } + return outBuffer.Flush(); +} + +STDMETHODIMP CDecoder ::Code(ISequentialInStream *inStream, ISequentialOutStream *outStream, + const UInt64 *inSize, const UInt64 *outSize, ICompressProgressInfo *progress) +{ + try { return CodeReal(inStream, outStream, inSize, outSize, progress); } + catch(const CInBufferException &e) { return e.ErrorCode; } + catch(const COutBufferException &e) { return e.ErrorCode; } + catch(...) { return S_FALSE; } +} + +}} diff --git a/CPP/7zip/Compress/ShrinkDecoder.h b/CPP/7zip/Compress/ShrinkDecoder.h new file mode 100644 index 0000000..9bbecd4 --- /dev/null +++ b/CPP/7zip/Compress/ShrinkDecoder.h @@ -0,0 +1,38 @@ +// ShrinkDecoder.h + +#ifndef __COMPRESS_SHRINK_DECODER_H +#define __COMPRESS_SHRINK_DECODER_H + +#include "../../Common/MyCom.h" + +#include "../ICoder.h" + +namespace NCompress { +namespace NShrink { + +const int kNumMaxBits = 13; +const UInt32 kNumItems = 1 << kNumMaxBits; + +class CDecoder : + public ICompressCoder, + public CMyUnknownImp +{ + UInt16 _parents[kNumItems]; + Byte _suffixes[kNumItems]; + Byte _stack[kNumItems]; + bool _isFree[kNumItems]; + bool _isParent[kNumItems]; + +public: + MY_UNKNOWN_IMP + + HRESULT CodeReal(ISequentialInStream *inStream, ISequentialOutStream *outStream, + const UInt64 *inSize, const UInt64 *outSize, ICompressProgressInfo *progress); + + STDMETHOD(Code)(ISequentialInStream *inStream, ISequentialOutStream *outStream, + const UInt64 *inSize, const UInt64 *outSize, ICompressProgressInfo *progress); +}; + +}} + +#endif diff --git a/CPP/7zip/Compress/ZDecoder.cpp b/CPP/7zip/Compress/ZDecoder.cpp new file mode 100644 index 0000000..e28c645 --- /dev/null +++ b/CPP/7zip/Compress/ZDecoder.cpp @@ -0,0 +1,159 @@ +// ZDecoder.cpp + +#include "StdAfx.h" + +#include "../../../C/Alloc.h" + +#include "../Common/InBuffer.h" +#include "../Common/OutBuffer.h" + +#include "ZDecoder.h" + +namespace NCompress { +namespace NZ { + +static const UInt32 kBufferSize = (1 << 20); +static const Byte kNumBitsMask = 0x1F; +static const Byte kBlockModeMask = 0x80; +static const int kNumMinBits = 9; +static const int kNumMaxBits = 16; + +void CDecoder::Free() +{ + MyFree(_parents); _parents = 0; + MyFree(_suffixes); _suffixes = 0; + MyFree(_stack); _stack = 0; +} + +CDecoder::~CDecoder() { Free(); } + +HRESULT CDecoder::CodeReal(ISequentialInStream *inStream, ISequentialOutStream *outStream, + const UInt64 * /* inSize */, const UInt64 * /* outSize */, ICompressProgressInfo *progress) +{ + CInBuffer inBuffer; + COutBuffer outBuffer; + + if (!inBuffer.Create(kBufferSize)) + return E_OUTOFMEMORY; + inBuffer.SetStream(inStream); + inBuffer.Init(); + + if (!outBuffer.Create(kBufferSize)) + return E_OUTOFMEMORY; + outBuffer.SetStream(outStream); + outBuffer.Init(); + + int maxbits = _properties & kNumBitsMask; + if (maxbits < kNumMinBits || maxbits > kNumMaxBits) + return S_FALSE; + UInt32 numItems = 1 << maxbits; + bool blockMode = ((_properties & kBlockModeMask) != 0); + + if (maxbits != _numMaxBits || _parents == 0 || _suffixes == 0 || _stack == 0) + { + Free(); + _parents = (UInt16 *)MyAlloc(numItems * sizeof(UInt16)); if (_parents == 0) return E_OUTOFMEMORY; + _suffixes = (Byte *)MyAlloc(numItems * sizeof(Byte)); if (_suffixes == 0) return E_OUTOFMEMORY; + _stack = (Byte *)MyAlloc(numItems * sizeof(Byte)); if (_stack == 0) return E_OUTOFMEMORY; + _numMaxBits = maxbits; + } + + UInt64 prevPos = 0; + int numBits = kNumMinBits; + UInt32 head = blockMode ? 257 : 256; + + bool needPrev = false; + + unsigned bitPos = 0; + unsigned numBufBits = 0; + + Byte buf[kNumMaxBits + 4]; + + _parents[256] = 0; // virus protection + _suffixes[256] = 0; + + for (;;) + { + if (numBufBits == bitPos) + { + numBufBits = (unsigned)inBuffer.ReadBytes(buf, numBits) * 8; + bitPos = 0; + UInt64 nowPos = outBuffer.GetProcessedSize(); + if (progress != NULL && nowPos - prevPos >= (1 << 18)) + { + prevPos = nowPos; + UInt64 packSize = inBuffer.GetProcessedSize(); + RINOK(progress->SetRatioInfo(&packSize, &nowPos)); + } + } + unsigned bytePos = bitPos >> 3; + UInt32 symbol = buf[bytePos] | ((UInt32)buf[bytePos + 1] << 8) | ((UInt32)buf[bytePos + 2] << 16); + symbol >>= (bitPos & 7); + symbol &= (1 << numBits) - 1; + bitPos += numBits; + if (bitPos > numBufBits) + break; + if (symbol >= head) + return S_FALSE; + if (blockMode && symbol == 256) + { + numBufBits = bitPos = 0; + numBits = kNumMinBits; + head = 257; + needPrev = false; + continue; + } + UInt32 cur = symbol; + int i = 0; + while (cur >= 256) + { + _stack[i++] = _suffixes[cur]; + cur = _parents[cur]; + } + _stack[i++] = (Byte)cur; + if (needPrev) + { + _suffixes[head - 1] = (Byte)cur; + if (symbol == head - 1) + _stack[0] = (Byte)cur; + } + do + outBuffer.WriteByte((_stack[--i])); + while (i > 0); + if (head < numItems) + { + needPrev = true; + _parents[head++] = (UInt16)symbol; + if (head > ((UInt32)1 << numBits)) + { + if (numBits < maxbits) + { + numBufBits = bitPos = 0; + numBits++; + } + } + } + else + needPrev = false; + } + return outBuffer.Flush(); +} + +STDMETHODIMP CDecoder::Code(ISequentialInStream *inStream, ISequentialOutStream *outStream, + const UInt64 *inSize, const UInt64 *outSize, ICompressProgressInfo *progress) +{ + try { return CodeReal(inStream, outStream, inSize, outSize, progress); } + catch(const CInBufferException &e) { return e.ErrorCode; } + catch(const COutBufferException &e) { return e.ErrorCode; } + catch(...) { return S_FALSE; } +} + +STDMETHODIMP CDecoder::SetDecoderProperties2(const Byte *data, UInt32 size) +{ + if (size < 1) + return E_INVALIDARG; + _properties = data[0]; + return S_OK; +} + +}} diff --git a/CPP/7zip/Compress/ZDecoder.h b/CPP/7zip/Compress/ZDecoder.h new file mode 100644 index 0000000..2bd83a1 --- /dev/null +++ b/CPP/7zip/Compress/ZDecoder.h @@ -0,0 +1,42 @@ +// ZDecoder.h + +#ifndef __COMPRESS_Z_DECODER_H +#define __COMPRESS_Z_DECODER_H + +#include "../../Common/MyCom.h" + +#include "../ICoder.h" + +namespace NCompress { +namespace NZ { + +class CDecoder: + public ICompressCoder, + public ICompressSetDecoderProperties2, + public CMyUnknownImp +{ + UInt16 *_parents; + Byte *_suffixes; + Byte *_stack; + Byte _properties; + int _numMaxBits; + +public: + CDecoder(): _parents(0), _suffixes(0), _stack(0), _properties(0), _numMaxBits(0) {}; + ~CDecoder(); + void Free(); + + MY_UNKNOWN_IMP1(ICompressSetDecoderProperties2) + + HRESULT CodeReal(ISequentialInStream *inStream, ISequentialOutStream *outStream, + const UInt64 *inSize, const UInt64 *outSize, ICompressProgressInfo *progress); + + STDMETHOD(Code)(ISequentialInStream *inStream, ISequentialOutStream *outStream, + const UInt64 *inSize, const UInt64 *outSize, ICompressProgressInfo *progress); + + STDMETHOD(SetDecoderProperties2)(const Byte *data, UInt32 size); +}; + +}} + +#endif diff --git a/CPP/7zip/Compress/ZlibDecoder.cpp b/CPP/7zip/Compress/ZlibDecoder.cpp new file mode 100644 index 0000000..90d6715 --- /dev/null +++ b/CPP/7zip/Compress/ZlibDecoder.cpp @@ -0,0 +1,89 @@ +// ZlibDecoder.cpp + +#include "StdAfx.h" + +#include "../Common/StreamUtils.h" + +#include "ZlibDecoder.h" + +namespace NCompress { +namespace NZlib { + +#define DEFLATE_TRY_BEGIN try { +#define DEFLATE_TRY_END } catch(...) { return S_FALSE; } + +#define ADLER_MOD 65521 +#define ADLER_LOOP_MAX 5550 + +UInt32 Adler32_Update(UInt32 adler, const Byte *buf, size_t size) +{ + UInt32 a = adler & 0xFFFF; + UInt32 b = (adler >> 16) & 0xFFFF; + while (size > 0) + { + unsigned curSize = (size > ADLER_LOOP_MAX) ? ADLER_LOOP_MAX : (unsigned )size; + unsigned i; + for (i = 0; i < curSize; i++) + { + a += buf[i]; + b += a; + } + buf += curSize; + size -= curSize; + a %= ADLER_MOD; + b %= ADLER_MOD; + } + return (b << 16) + a; +} + +STDMETHODIMP COutStreamWithAdler::Write(const void *data, UInt32 size, UInt32 *processedSize) +{ + HRESULT result = _stream->Write(data, size, &size); + _adler = Adler32_Update(_adler, (const Byte *)data, size); + if (processedSize != NULL) + *processedSize = size; + return result; +} + +STDMETHODIMP CDecoder::Code(ISequentialInStream *inStream, ISequentialOutStream *outStream, + const UInt64 *inSize, const UInt64 *outSize, ICompressProgressInfo *progress) +{ + DEFLATE_TRY_BEGIN + if (!AdlerStream) + AdlerStream = AdlerSpec = new COutStreamWithAdler; + if (!DeflateDecoder) + { + DeflateDecoderSpec = new NDeflate::NDecoder::CCOMCoder; + DeflateDecoderSpec->ZlibMode = true; + DeflateDecoder = DeflateDecoderSpec; + } + + Byte buf[2]; + RINOK(ReadStream_FALSE(inStream, buf, 2)); + int method = buf[0] & 0xF; + if (method != 8) + return S_FALSE; + // int dicSize = buf[0] >> 4; + if ((((UInt32)buf[0] << 8) + buf[1]) % 31 != 0) + return S_FALSE; + if ((buf[1] & 0x20) != 0) // dictPresent + return S_FALSE; + // int level = (buf[1] >> 6); + + AdlerSpec->SetStream(outStream); + AdlerSpec->Init(); + HRESULT res = DeflateDecoder->Code(inStream, AdlerStream, inSize, outSize, progress); + AdlerSpec->ReleaseStream(); + + if (res == S_OK) + { + const Byte *p = DeflateDecoderSpec->ZlibFooter; + UInt32 adler = ((UInt32)p[0] << 24) | ((UInt32)p[1] << 16) | ((UInt32)p[2] << 8) | p[3]; + if (adler != AdlerSpec->GetAdler()) + return S_FALSE; + } + return res; + DEFLATE_TRY_END +} + +}} diff --git a/CPP/7zip/Compress/ZlibDecoder.h b/CPP/7zip/Compress/ZlibDecoder.h new file mode 100644 index 0000000..95c1100 --- /dev/null +++ b/CPP/7zip/Compress/ZlibDecoder.h @@ -0,0 +1,48 @@ +// ZlibDecoder.h + +#ifndef __ZLIB_DECODER_H +#define __ZLIB_DECODER_H + +#include "DeflateDecoder.h" + +namespace NCompress { +namespace NZlib { + +const UInt32 ADLER_INIT_VAL = 1; + +class COutStreamWithAdler: + public ISequentialOutStream, + public CMyUnknownImp +{ + CMyComPtr _stream; + UInt32 _adler; +public: + MY_UNKNOWN_IMP + STDMETHOD(Write)(const void *data, UInt32 size, UInt32 *processedSize); + void SetStream(ISequentialOutStream *stream) { _stream = stream; } + void ReleaseStream() { _stream.Release(); } + void Init() { _adler = ADLER_INIT_VAL; } + UInt32 GetAdler() const { return _adler; } +}; + +class CDecoder: + public ICompressCoder, + public CMyUnknownImp +{ + COutStreamWithAdler *AdlerSpec; + CMyComPtr AdlerStream; + + NCompress::NDeflate::NDecoder::CCOMCoder *DeflateDecoderSpec; + CMyComPtr DeflateDecoder; +public: + STDMETHOD(Code)(ISequentialInStream *inStream, ISequentialOutStream *outStream, + const UInt64 *inSize, const UInt64 *outSize, ICompressProgressInfo *progress); + + UInt64 GetInputProcessedSize() const { return DeflateDecoderSpec->GetInputProcessedSize() + 2; } + + MY_UNKNOWN_IMP +}; + +}} + +#endif diff --git a/CPP/7zip/Compress/ZlibEncoder.cpp b/CPP/7zip/Compress/ZlibEncoder.cpp new file mode 100644 index 0000000..09235c3 --- /dev/null +++ b/CPP/7zip/Compress/ZlibEncoder.cpp @@ -0,0 +1,61 @@ +// ZlibEncoder.cpp + +#include "StdAfx.h" + +#include "../Common/StreamUtils.h" + +#include "ZlibEncoder.h" + +namespace NCompress { +namespace NZlib { + +#define DEFLATE_TRY_BEGIN try { +#define DEFLATE_TRY_END } catch(...) { return S_FALSE; } + +UInt32 Adler32_Update(UInt32 adler, const Byte *buf, size_t size); + +STDMETHODIMP CInStreamWithAdler::Read(void *data, UInt32 size, UInt32 *processedSize) +{ + HRESULT result = _stream->Read(data, size, &size); + _adler = Adler32_Update(_adler, (const Byte *)data, size); + _size += size; + if (processedSize != NULL) + *processedSize = size; + return result; +} + +void CEncoder::Create() +{ + if (!DeflateEncoder) + DeflateEncoder = DeflateEncoderSpec = new NDeflate::NEncoder::CCOMCoder; +} + +STDMETHODIMP CEncoder::Code(ISequentialInStream *inStream, ISequentialOutStream *outStream, + const UInt64 *inSize, const UInt64 * /* outSize */, ICompressProgressInfo *progress) +{ + DEFLATE_TRY_BEGIN + if (!AdlerStream) + AdlerStream = AdlerSpec = new CInStreamWithAdler; + Create(); + + { + Byte buf[2] = { 0x78, 0xDA }; + RINOK(WriteStream(outStream, buf, 2)); + } + + AdlerSpec->SetStream(inStream); + AdlerSpec->Init(); + HRESULT res = DeflateEncoder->Code(AdlerStream, outStream, inSize, NULL, progress); + AdlerSpec->ReleaseStream(); + + RINOK(res); + + { + UInt32 a = AdlerSpec->GetAdler(); + Byte buf[4] = { (Byte)(a >> 24), (Byte)(a >> 16), (Byte)(a >> 8), (Byte)(a) }; + return WriteStream(outStream, buf, 4); + } + DEFLATE_TRY_END +} + +}} diff --git a/CPP/7zip/Compress/ZlibEncoder.h b/CPP/7zip/Compress/ZlibEncoder.h new file mode 100644 index 0000000..621cc1d --- /dev/null +++ b/CPP/7zip/Compress/ZlibEncoder.h @@ -0,0 +1,48 @@ +// ZlibEncoder.h + +#ifndef __ZLIB_ENCODER_H +#define __ZLIB_ENCODER_H + +#include "DeflateEncoder.h" + +namespace NCompress { +namespace NZlib { + +class CInStreamWithAdler: + public ISequentialInStream, + public CMyUnknownImp +{ + CMyComPtr _stream; + UInt32 _adler; + UInt64 _size; +public: + MY_UNKNOWN_IMP + STDMETHOD(Read)(void *data, UInt32 size, UInt32 *processedSize); + void SetStream(ISequentialInStream *stream) { _stream = stream; } + void ReleaseStream() { _stream.Release(); } + void Init() { _adler = 1; _size = 0; } // ADLER_INIT_VAL + UInt32 GetAdler() const { return _adler; } + UInt64 GetSize() const { return _size; } +}; + +class CEncoder: + public ICompressCoder, + public CMyUnknownImp +{ + CInStreamWithAdler *AdlerSpec; + CMyComPtr AdlerStream; + CMyComPtr DeflateEncoder; +public: + NCompress::NDeflate::NEncoder::CCOMCoder *DeflateEncoderSpec; + + void Create(); + STDMETHOD(Code)(ISequentialInStream *inStream, ISequentialOutStream *outStream, + const UInt64 *inSize, const UInt64 *outSize, ICompressProgressInfo *progress); + UInt64 GetInputProcessedSize() const { return AdlerSpec->GetSize(); } + + MY_UNKNOWN_IMP +}; + +}} + +#endif diff --git a/CPP/7zip/Crypto/7zAes.cpp b/CPP/7zip/Crypto/7zAes.cpp new file mode 100644 index 0000000..b686fb6 --- /dev/null +++ b/CPP/7zip/Crypto/7zAes.cpp @@ -0,0 +1,244 @@ +// 7zAes.cpp + +#include "StdAfx.h" + +#include "../../../C/Sha256.h" + +#include "Windows/Synchronization.h" + +#include "../Common/StreamObjects.h" +#include "../Common/StreamUtils.h" + +#include "7zAes.h" +#include "MyAes.h" + +#ifndef EXTRACT_ONLY +#include "RandGen.h" +#endif + +using namespace NWindows; + +namespace NCrypto { +namespace NSevenZ { + +bool CKeyInfo::IsEqualTo(const CKeyInfo &a) const +{ + if (SaltSize != a.SaltSize || NumCyclesPower != a.NumCyclesPower) + return false; + for (UInt32 i = 0; i < SaltSize; i++) + if (Salt[i] != a.Salt[i]) + return false; + return (Password == a.Password); +} + +void CKeyInfo::CalculateDigest() +{ + if (NumCyclesPower == 0x3F) + { + UInt32 pos; + for (pos = 0; pos < SaltSize; pos++) + Key[pos] = Salt[pos]; + for (UInt32 i = 0; i < Password.GetCapacity() && pos < kKeySize; i++) + Key[pos++] = Password[i]; + for (; pos < kKeySize; pos++) + Key[pos] = 0; + } + else + { + CSha256 sha; + Sha256_Init(&sha); + const UInt64 numRounds = (UInt64)1 << NumCyclesPower; + Byte temp[8] = { 0,0,0,0,0,0,0,0 }; + for (UInt64 round = 0; round < numRounds; round++) + { + Sha256_Update(&sha, Salt, (size_t)SaltSize); + Sha256_Update(&sha, Password, Password.GetCapacity()); + Sha256_Update(&sha, temp, 8); + for (int i = 0; i < 8; i++) + if (++(temp[i]) != 0) + break; + } + Sha256_Final(&sha, Key); + } +} + +bool CKeyInfoCache::Find(CKeyInfo &key) +{ + for (int i = 0; i < Keys.Size(); i++) + { + const CKeyInfo &cached = Keys[i]; + if (key.IsEqualTo(cached)) + { + for (int j = 0; j < kKeySize; j++) + key.Key[j] = cached.Key[j]; + if (i != 0) + { + Keys.Insert(0, cached); + Keys.Delete(i+1); + } + return true; + } + } + return false; +} + +void CKeyInfoCache::Add(CKeyInfo &key) +{ + if (Find(key)) + return; + if (Keys.Size() >= Size) + Keys.DeleteBack(); + Keys.Insert(0, key); +} + +static CKeyInfoCache g_GlobalKeyCache(32); +static NSynchronization::CCriticalSection g_GlobalKeyCacheCriticalSection; + +CBase::CBase(): + _cachedKeys(16), + _ivSize(0) +{ + for (int i = 0; i < sizeof(_iv); i++) + _iv[i] = 0; +} + +void CBase::CalculateDigest() +{ + NSynchronization::CCriticalSectionLock lock(g_GlobalKeyCacheCriticalSection); + if (_cachedKeys.Find(_key)) + g_GlobalKeyCache.Add(_key); + else + { + if (!g_GlobalKeyCache.Find(_key)) + { + _key.CalculateDigest(); + g_GlobalKeyCache.Add(_key); + } + _cachedKeys.Add(_key); + } +} + +#ifndef EXTRACT_ONLY + +/* +STDMETHODIMP CEncoder::ResetSalt() +{ + _key.SaltSize = 4; + g_RandomGenerator.Generate(_key.Salt, _key.SaltSize); + return S_OK; +} +*/ + +STDMETHODIMP CEncoder::ResetInitVector() +{ + _ivSize = 8; + g_RandomGenerator.Generate(_iv, (unsigned)_ivSize); + return S_OK; +} + +STDMETHODIMP CEncoder::WriteCoderProperties(ISequentialOutStream *outStream) +{ + // _key.Init(); + for (UInt32 i = _ivSize; i < sizeof(_iv); i++) + _iv[i] = 0; + + UInt32 ivSize = _ivSize; + + // _key.NumCyclesPower = 0x3F; + _key.NumCyclesPower = 19; + + Byte firstByte = (Byte)(_key.NumCyclesPower | + (((_key.SaltSize == 0) ? 0 : 1) << 7) | + (((ivSize == 0) ? 0 : 1) << 6)); + RINOK(outStream->Write(&firstByte, 1, NULL)); + if (_key.SaltSize == 0 && ivSize == 0) + return S_OK; + Byte saltSizeSpec = (Byte)((_key.SaltSize == 0) ? 0 : (_key.SaltSize - 1)); + Byte ivSizeSpec = (Byte)((ivSize == 0) ? 0 : (ivSize - 1)); + Byte secondByte = (Byte)(((saltSizeSpec) << 4) | ivSizeSpec); + RINOK(outStream->Write(&secondByte, 1, NULL)); + if (_key.SaltSize > 0) + { + RINOK(WriteStream(outStream, _key.Salt, _key.SaltSize)); + } + if (ivSize > 0) + { + RINOK(WriteStream(outStream, _iv, ivSize)); + } + return S_OK; +} + +HRESULT CEncoder::CreateFilter() +{ + _aesFilter = new CAesCbcEncoder; + return S_OK; +} + +#endif + +STDMETHODIMP CDecoder::SetDecoderProperties2(const Byte *data, UInt32 size) +{ + _key.Init(); + UInt32 i; + for (i = 0; i < sizeof(_iv); i++) + _iv[i] = 0; + if (size == 0) + return S_OK; + UInt32 pos = 0; + Byte firstByte = data[pos++]; + + _key.NumCyclesPower = firstByte & 0x3F; + if ((firstByte & 0xC0) == 0) + return S_OK; + _key.SaltSize = (firstByte >> 7) & 1; + UInt32 ivSize = (firstByte >> 6) & 1; + + if (pos >= size) + return E_INVALIDARG; + Byte secondByte = data[pos++]; + + _key.SaltSize += (secondByte >> 4); + ivSize += (secondByte & 0x0F); + + if (pos + _key.SaltSize + ivSize > size) + return E_INVALIDARG; + for (i = 0; i < _key.SaltSize; i++) + _key.Salt[i] = data[pos++]; + for (i = 0; i < ivSize; i++) + _iv[i] = data[pos++]; + return (_key.NumCyclesPower <= 24) ? S_OK : E_NOTIMPL; +} + +STDMETHODIMP CBaseCoder::CryptoSetPassword(const Byte *data, UInt32 size) +{ + _key.Password.SetCapacity((size_t)size); + memcpy(_key.Password, data, (size_t)size); + return S_OK; +} + +STDMETHODIMP CBaseCoder::Init() +{ + CalculateDigest(); + if (_aesFilter == 0) + { + RINOK(CreateFilter()); + } + CMyComPtr cp; + RINOK(_aesFilter.QueryInterface(IID_ICryptoProperties, &cp)); + RINOK(cp->SetKey(_key.Key, sizeof(_key.Key))); + RINOK(cp->SetInitVector(_iv, sizeof(_iv))); + return S_OK; +} + +STDMETHODIMP_(UInt32) CBaseCoder::Filter(Byte *data, UInt32 size) +{ + return _aesFilter->Filter(data, size); +} + +HRESULT CDecoder::CreateFilter() +{ + _aesFilter = new CAesCbcDecoder; + return S_OK; +} + +}} diff --git a/CPP/7zip/Crypto/7zAes.h b/CPP/7zip/Crypto/7zAes.h new file mode 100644 index 0000000..79d723f --- /dev/null +++ b/CPP/7zip/Crypto/7zAes.h @@ -0,0 +1,117 @@ +// 7zAes.h + +#ifndef __CRYPTO_7Z_AES_H +#define __CRYPTO_7Z_AES_H + +#include "Common/Buffer.h" +#include "Common/MyCom.h" +#include "Common/MyVector.h" + +#include "../ICoder.h" +#include "../IPassword.h" + +namespace NCrypto { +namespace NSevenZ { + +const int kKeySize = 32; + +class CKeyInfo +{ +public: + int NumCyclesPower; + UInt32 SaltSize; + Byte Salt[16]; + CByteBuffer Password; + Byte Key[kKeySize]; + + bool IsEqualTo(const CKeyInfo &a) const; + void CalculateDigest(); + + CKeyInfo() { Init(); } + void Init() + { + NumCyclesPower = 0; + SaltSize = 0; + for (int i = 0; i < sizeof(Salt); i++) + Salt[i] = 0; + } +}; + +class CKeyInfoCache +{ + int Size; + CObjectVector Keys; +public: + CKeyInfoCache(int size): Size(size) {} + bool Find(CKeyInfo &key); + // HRESULT Calculate(CKeyInfo &key); + void Add(CKeyInfo &key); +}; + +class CBase +{ + CKeyInfoCache _cachedKeys; +protected: + CKeyInfo _key; + Byte _iv[16]; + UInt32 _ivSize; + void CalculateDigest(); + CBase(); +}; + +class CBaseCoder: + public ICompressFilter, + public ICryptoSetPassword, + public CMyUnknownImp, + public CBase +{ +protected: + CMyComPtr _aesFilter; + + virtual HRESULT CreateFilter() = 0; + #ifndef CRYPTO_AES + HRESULT CreateFilterFromDLL(REFCLSID clsID); + #endif +public: + STDMETHOD(Init)(); + STDMETHOD_(UInt32, Filter)(Byte *data, UInt32 size); + + STDMETHOD(CryptoSetPassword)(const Byte *data, UInt32 size); +}; + +#ifndef EXTRACT_ONLY + +class CEncoder: + public CBaseCoder, + public ICompressWriteCoderProperties, + // public ICryptoResetSalt, + public ICryptoResetInitVector +{ + virtual HRESULT CreateFilter(); +public: + MY_UNKNOWN_IMP3( + ICryptoSetPassword, + ICompressWriteCoderProperties, + // ICryptoResetSalt, + ICryptoResetInitVector) + STDMETHOD(WriteCoderProperties)(ISequentialOutStream *outStream); + // STDMETHOD(ResetSalt)(); + STDMETHOD(ResetInitVector)(); +}; +#endif + +class CDecoder: + public CBaseCoder, + public ICompressSetDecoderProperties2 +{ + virtual HRESULT CreateFilter(); +public: + MY_UNKNOWN_IMP2( + ICryptoSetPassword, + ICompressSetDecoderProperties2) + STDMETHOD(SetDecoderProperties2)(const Byte *data, UInt32 size); +}; + +}} + +#endif diff --git a/CPP/7zip/Crypto/7zAesRegister.cpp b/CPP/7zip/Crypto/7zAesRegister.cpp new file mode 100644 index 0000000..5e57748 --- /dev/null +++ b/CPP/7zip/Crypto/7zAesRegister.cpp @@ -0,0 +1,18 @@ +// 7zAesRegister.cpp + +#include "StdAfx.h" + +#include "../Common/RegisterCodec.h" +#include "7zAes.h" + +static void *CreateCodec() { return (void *)(ICompressFilter *)(new NCrypto::NSevenZ::CDecoder()); } +#ifndef EXTRACT_ONLY +static void *CreateCodecOut() { return (void *)(ICompressFilter *)(new NCrypto::NSevenZ::CEncoder()); } +#else +#define CreateCodecOut 0 +#endif + +static CCodecInfo g_CodecInfo = + { CreateCodec, CreateCodecOut, 0x06F10701, L"7zAES", 1, true }; + +REGISTER_CODEC(7zAES) diff --git a/CPP/7zip/Crypto/HmacSha1.cpp b/CPP/7zip/Crypto/HmacSha1.cpp new file mode 100644 index 0000000..a66d627 --- /dev/null +++ b/CPP/7zip/Crypto/HmacSha1.cpp @@ -0,0 +1,109 @@ +// HmacSha1.cpp + +#include "StdAfx.h" + +#include "HmacSha1.h" + +namespace NCrypto { +namespace NSha1 { + +void CHmac::SetKey(const Byte *key, size_t keySize) +{ + Byte keyTemp[kBlockSize]; + size_t i; + for (i = 0; i < kBlockSize; i++) + keyTemp[i] = 0; + if(keySize > kBlockSize) + { + _sha.Init(); + _sha.Update(key, keySize); + _sha.Final(keyTemp); + keySize = kDigestSize; + } + else + for (i = 0; i < keySize; i++) + keyTemp[i] = key[i]; + for (i = 0; i < kBlockSize; i++) + keyTemp[i] ^= 0x36; + _sha.Init(); + _sha.Update(keyTemp, kBlockSize); + for (i = 0; i < kBlockSize; i++) + keyTemp[i] ^= 0x36 ^ 0x5C; + _sha2.Init(); + _sha2.Update(keyTemp, kBlockSize); +} + +void CHmac::Final(Byte *mac, size_t macSize) +{ + Byte digest[kDigestSize]; + _sha.Final(digest); + _sha2.Update(digest, kDigestSize); + _sha2.Final(digest); + for(size_t i = 0; i < macSize; i++) + mac[i] = digest[i]; +} + + +void CHmac32::SetKey(const Byte *key, size_t keySize) +{ + UInt32 keyTemp[kBlockSizeInWords]; + size_t i; + for (i = 0; i < kBlockSizeInWords; i++) + keyTemp[i] = 0; + if(keySize > kBlockSize) + { + CContext sha; + sha.Init(); + sha.Update(key, keySize); + Byte digest[kDigestSize]; + sha.Final(digest); + + for (int i = 0 ; i < kDigestSizeInWords; i++) + keyTemp[i] = + ((UInt32)(digest[i * 4 + 0]) << 24) | + ((UInt32)(digest[i * 4 + 1]) << 16) | + ((UInt32)(digest[i * 4 + 2]) << 8) | + ((UInt32)(digest[i * 4 + 3])); + keySize = kDigestSizeInWords; + } + else + for (size_t i = 0; i < keySize; i++) + keyTemp[i / 4] |= (key[i] << (24 - 8 * (i & 3))); + for (i = 0; i < kBlockSizeInWords; i++) + keyTemp[i] ^= 0x36363636; + _sha.Init(); + _sha.Update(keyTemp, kBlockSizeInWords); + for (i = 0; i < kBlockSizeInWords; i++) + keyTemp[i] ^= 0x36363636 ^ 0x5C5C5C5C; + _sha2.Init(); + _sha2.Update(keyTemp, kBlockSizeInWords); +} + +void CHmac32::Final(UInt32 *mac, size_t macSize) +{ + UInt32 digest[kDigestSizeInWords]; + _sha.Final(digest); + _sha2.Update(digest, kDigestSizeInWords); + _sha2.Final(digest); + for(size_t i = 0; i < macSize; i++) + mac[i] = digest[i]; +} + +void CHmac32::GetLoopXorDigest(UInt32 *mac, UInt32 numIteration) +{ + UInt32 block[kBlockSizeInWords]; + UInt32 block2[kBlockSizeInWords]; + _sha.PrepareBlock(block, kDigestSizeInWords); + _sha2.PrepareBlock(block2, kDigestSizeInWords); + for(unsigned int s = 0; s < kDigestSizeInWords; s++) + block[s] = mac[s]; + for(UInt32 i = 0; i < numIteration; i++) + { + _sha.GetBlockDigest(block, block2); + _sha2.GetBlockDigest(block2, block); + for (unsigned int s = 0; s < kDigestSizeInWords; s++) + mac[s] ^= block[s]; + } +} + +}} diff --git a/CPP/7zip/Crypto/HmacSha1.h b/CPP/7zip/Crypto/HmacSha1.h new file mode 100644 index 0000000..d718132 --- /dev/null +++ b/CPP/7zip/Crypto/HmacSha1.h @@ -0,0 +1,39 @@ +// HmacSha1.h +// Implements HMAC-SHA-1 (RFC2104, FIPS-198) + +#ifndef __CRYPTO_HMAC_SHA1_H +#define __CRYPTO_HMAC_SHA1_H + +#include "Sha1.h" + +namespace NCrypto { +namespace NSha1 { + +// Use: SetKey(key, keySize); for () Update(data, size); Final(mac, macSize); + +class CHmac +{ + CContext _sha; + CContext _sha2; +public: + void SetKey(const Byte *key, size_t keySize); + void Update(const Byte *data, size_t dataSize) { _sha.Update(data, dataSize); } + void Final(Byte *mac, size_t macSize = kDigestSize); +}; + +class CHmac32 +{ + CContext32 _sha; + CContext32 _sha2; +public: + void SetKey(const Byte *key, size_t keySize); + void Update(const UInt32 *data, size_t dataSize) { _sha.Update(data, dataSize); } + void Final(UInt32 *mac, size_t macSize = kDigestSizeInWords); + + // It'sa for hmac function. in,out: mac[kDigestSizeInWords]. + void GetLoopXorDigest(UInt32 *mac, UInt32 numIteration); +}; + +}} + +#endif diff --git a/CPP/7zip/Crypto/MyAes.cpp b/CPP/7zip/Crypto/MyAes.cpp new file mode 100644 index 0000000..70a7dcc --- /dev/null +++ b/CPP/7zip/Crypto/MyAes.cpp @@ -0,0 +1,48 @@ +// Crypto/MyAes.cpp + +#include "StdAfx.h" + +#include "MyAes.h" + +namespace NCrypto { + +struct CAesTabInit { CAesTabInit() { AesGenTables();} } g_AesTabInit; + +CAesCbcCoder::CAesCbcCoder() +{ + _offset = ((0 - (unsigned)(ptrdiff_t)_aes) & 0xF) / sizeof(UInt32); +} + +STDMETHODIMP CAesCbcCoder::Init() { return S_OK; } + +STDMETHODIMP_(UInt32) CAesCbcCoder::Filter(Byte *data, UInt32 size) +{ + if (size == 0) + return 0; + if (size < AES_BLOCK_SIZE) + return AES_BLOCK_SIZE; + size >>= 4; + _codeFunc(_aes + _offset, data, size); + return size << 4; +} + +STDMETHODIMP CAesCbcCoder::SetKey(const Byte *data, UInt32 size) +{ + if ((size & 0x7) != 0 || size < 16 || size > 32) + return E_INVALIDARG; + _setKeyFunc(_aes + _offset + 4, data, size); + return S_OK; +} + +STDMETHODIMP CAesCbcCoder::SetInitVector(const Byte *data, UInt32 size) +{ + if (size != AES_BLOCK_SIZE) + return E_INVALIDARG; + AesCbc_Init(_aes + _offset, data); + return S_OK; +} + +CAesCbcEncoder::CAesCbcEncoder() { _codeFunc = g_AesCbc_Encode; _setKeyFunc = Aes_SetKey_Enc; } +CAesCbcDecoder::CAesCbcDecoder() { _codeFunc = g_AesCbc_Decode; _setKeyFunc = Aes_SetKey_Dec; } + +} diff --git a/CPP/7zip/Crypto/MyAes.h b/CPP/7zip/Crypto/MyAes.h new file mode 100644 index 0000000..60b1384 --- /dev/null +++ b/CPP/7zip/Crypto/MyAes.h @@ -0,0 +1,38 @@ +// Crypto/MyAes.h + +#ifndef __CRYPTO_MY_AES_H +#define __CRYPTO_MY_AES_H + +#include "../../../C/Aes.h" + +#include "../../Common/MyCom.h" + +#include "../ICoder.h" + +namespace NCrypto { + +class CAesCbcCoder: + public ICompressFilter, + public ICryptoProperties, + public CMyUnknownImp +{ +protected: + AES_CODE_FUNC _codeFunc; + AES_SET_KEY_FUNC _setKeyFunc; + unsigned _offset; + UInt32 _aes[AES_NUM_IVMRK_WORDS + 3]; +public: + CAesCbcCoder(); + MY_UNKNOWN_IMP1(ICryptoProperties) + STDMETHOD(Init)(); + STDMETHOD_(UInt32, Filter)(Byte *data, UInt32 size); + STDMETHOD(SetKey)(const Byte *data, UInt32 size); + STDMETHOD(SetInitVector)(const Byte *data, UInt32 size); +}; + +struct CAesCbcEncoder: public CAesCbcCoder { CAesCbcEncoder(); }; +struct CAesCbcDecoder: public CAesCbcCoder { CAesCbcDecoder(); }; + +} + +#endif diff --git a/CPP/7zip/Crypto/Pbkdf2HmacSha1.cpp b/CPP/7zip/Crypto/Pbkdf2HmacSha1.cpp new file mode 100644 index 0000000..cbbdec8 --- /dev/null +++ b/CPP/7zip/Crypto/Pbkdf2HmacSha1.cpp @@ -0,0 +1,83 @@ +// Pbkdf2HmacSha1.cpp + +#include "StdAfx.h" + +#include "HmacSha1.h" + +namespace NCrypto { +namespace NSha1 { + +void Pbkdf2Hmac(const Byte *pwd, size_t pwdSize, const Byte *salt, size_t saltSize, + UInt32 numIterations, Byte *key, size_t keySize) +{ + CHmac baseCtx; + baseCtx.SetKey(pwd, pwdSize); + for (UInt32 i = 1; keySize > 0; i++) + { + CHmac ctx = baseCtx; + ctx.Update(salt, saltSize); + Byte u[kDigestSize] = { (Byte)(i >> 24), (Byte)(i >> 16), (Byte)(i >> 8), (Byte)(i) }; + const unsigned int curSize = (keySize < kDigestSize) ? (unsigned int)keySize : kDigestSize; + ctx.Update(u, 4); + ctx.Final(u, kDigestSize); + + unsigned int s; + for (s = 0; s < curSize; s++) + key[s] = u[s]; + + for (UInt32 j = numIterations; j > 1; j--) + { + ctx = baseCtx; + ctx.Update(u, kDigestSize); + ctx.Final(u, kDigestSize); + for (s = 0; s < curSize; s++) + key[s] ^= u[s]; + } + + key += curSize; + keySize -= curSize; + } +} + +void Pbkdf2Hmac32(const Byte *pwd, size_t pwdSize, const UInt32 *salt, size_t saltSize, + UInt32 numIterations, UInt32 *key, size_t keySize) +{ + CHmac32 baseCtx; + baseCtx.SetKey(pwd, pwdSize); + for (UInt32 i = 1; keySize > 0; i++) + { + CHmac32 ctx = baseCtx; + ctx.Update(salt, saltSize); + UInt32 u[kDigestSizeInWords] = { i }; + const unsigned int curSize = (keySize < kDigestSizeInWords) ? (unsigned int)keySize : kDigestSizeInWords; + ctx.Update(u, 1); + ctx.Final(u, kDigestSizeInWords); + + // Speed-optimized code start + ctx = baseCtx; + ctx.GetLoopXorDigest(u, numIterations - 1); + // Speed-optimized code end + + unsigned int s; + for (s = 0; s < curSize; s++) + key[s] = u[s]; + + /* + // Default code start + for (UInt32 j = numIterations; j > 1; j--) + { + ctx = baseCtx; + ctx.Update(u, kDigestSizeInWords); + ctx.Final(u, kDigestSizeInWords); + for (s = 0; s < curSize; s++) + key[s] ^= u[s]; + } + // Default code end + */ + + key += curSize; + keySize -= curSize; + } +} + +}} diff --git a/CPP/7zip/Crypto/Pbkdf2HmacSha1.h b/CPP/7zip/Crypto/Pbkdf2HmacSha1.h new file mode 100644 index 0000000..bb90e12 --- /dev/null +++ b/CPP/7zip/Crypto/Pbkdf2HmacSha1.h @@ -0,0 +1,21 @@ +// Pbkdf2HmacSha1.h +// Password-Based Key Derivation Function (RFC 2898, PKCS #5) based on HMAC-SHA-1 + +#ifndef __CRYPTO_PBKDF2_HMAC_SHA1_H +#define __CRYPTO_PBKDF2_HMAC_SHA1_H + +#include +#include "../../Common/Types.h" + +namespace NCrypto { +namespace NSha1 { + +void Pbkdf2Hmac(const Byte *pwd, size_t pwdSize, const Byte *salt, size_t saltSize, + UInt32 numIterations, Byte *key, size_t keySize); + +void Pbkdf2Hmac32(const Byte *pwd, size_t pwdSize, const UInt32 *salt, size_t saltSize, + UInt32 numIterations, UInt32 *key, size_t keySize); + +}} + +#endif diff --git a/CPP/7zip/Crypto/RandGen.cpp b/CPP/7zip/Crypto/RandGen.cpp new file mode 100644 index 0000000..e0e2e3a --- /dev/null +++ b/CPP/7zip/Crypto/RandGen.cpp @@ -0,0 +1,107 @@ +// RandGen.cpp + +#include "StdAfx.h" + +#include +#include "Windows/Synchronization.h" +#include "RandGen.h" + +#ifndef _WIN32 +#include +#define USE_POSIX_TIME +#define USE_POSIX_TIME2 +#endif + +#ifdef USE_POSIX_TIME +#include +#ifdef USE_POSIX_TIME2 +#include +#endif +#endif + +// This is not very good random number generator. +// Please use it only for salt. +// First generated data block depends from timer and processID. +// Other generated data blocks depend from previous state +// Maybe it's possible to restore original timer value from generated value. + +void CRandomGenerator::Init() +{ + NCrypto::NSha1::CContext hash; + hash.Init(); + + #ifdef _WIN32 + DWORD w = ::GetCurrentProcessId(); + hash.Update((const Byte *)&w, sizeof(w)); + w = ::GetCurrentThreadId(); + hash.Update((const Byte *)&w, sizeof(w)); + #else + pid_t pid = getpid(); + hash.Update((const Byte *)&pid, sizeof(pid)); + pid = getppid(); + hash.Update((const Byte *)&pid, sizeof(pid)); + #endif + + for (int i = 0; i < 1000; i++) + { + #ifdef _WIN32 + LARGE_INTEGER v; + if (::QueryPerformanceCounter(&v)) + hash.Update((const Byte *)&v.QuadPart, sizeof(v.QuadPart)); + #endif + + #ifdef USE_POSIX_TIME + #ifdef USE_POSIX_TIME2 + timeval v; + if (gettimeofday(&v, 0) == 0) + { + hash.Update((const Byte *)&v.tv_sec, sizeof(v.tv_sec)); + hash.Update((const Byte *)&v.tv_usec, sizeof(v.tv_usec)); + } + #endif + time_t v2 = time(NULL); + hash.Update((const Byte *)&v2, sizeof(v2)); + #endif + + DWORD tickCount = ::GetTickCount(); + hash.Update((const Byte *)&tickCount, sizeof(tickCount)); + + for (int j = 0; j < 100; j++) + { + hash.Final(_buff); + hash.Init(); + hash.Update(_buff, NCrypto::NSha1::kDigestSize); + } + } + hash.Final(_buff); + _needInit = false; +} + +static NWindows::NSynchronization::CCriticalSection g_CriticalSection; + +void CRandomGenerator::Generate(Byte *data, unsigned int size) +{ + g_CriticalSection.Enter(); + if (_needInit) + Init(); + while (size > 0) + { + NCrypto::NSha1::CContext hash; + + hash.Init(); + hash.Update(_buff, NCrypto::NSha1::kDigestSize); + hash.Final(_buff); + + hash.Init(); + UInt32 salt = 0xF672ABD1; + hash.Update((const Byte *)&salt, sizeof(salt)); + hash.Update(_buff, NCrypto::NSha1::kDigestSize); + Byte buff[NCrypto::NSha1::kDigestSize]; + hash.Final(buff); + for (unsigned int i = 0; i < NCrypto::NSha1::kDigestSize && size > 0; i++, size--) + *data++ = buff[i]; + } + g_CriticalSection.Leave(); +} + +CRandomGenerator g_RandomGenerator; diff --git a/CPP/7zip/Crypto/RandGen.h b/CPP/7zip/Crypto/RandGen.h new file mode 100644 index 0000000..209445c --- /dev/null +++ b/CPP/7zip/Crypto/RandGen.h @@ -0,0 +1,21 @@ +// RandGen.h + +#ifndef __CRYPTO_RAND_GEN_H +#define __CRYPTO_RAND_GEN_H + +#include "Sha1.h" + +class CRandomGenerator +{ + Byte _buff[NCrypto::NSha1::kDigestSize]; + bool _needInit; + + void Init(); +public: + CRandomGenerator(): _needInit(true) {}; + void Generate(Byte *data, unsigned size); +}; + +extern CRandomGenerator g_RandomGenerator; + +#endif diff --git a/CPP/7zip/Crypto/Rar20Crypto.cpp b/CPP/7zip/Crypto/Rar20Crypto.cpp new file mode 100644 index 0000000..c2df0e5 --- /dev/null +++ b/CPP/7zip/Crypto/Rar20Crypto.cpp @@ -0,0 +1,133 @@ +// Crypto/Rar20Crypto.cpp + +#include "StdAfx.h" + +#include "../../../C/7zCrc.h" +#include "../../../C/CpuArch.h" +#include "../../../C/RotateDefs.h" + +#include "Rar20Crypto.h" + +namespace NCrypto { +namespace NRar20 { + +static const int kNumRounds = 32; + +static const Byte InitSubstTable[256] = { + 215, 19,149, 35, 73,197,192,205,249, 28, 16,119, 48,221, 2, 42, + 232, 1,177,233, 14, 88,219, 25,223,195,244, 90, 87,239,153,137, + 255,199,147, 70, 92, 66,246, 13,216, 40, 62, 29,217,230, 86, 6, + 71, 24,171,196,101,113,218,123, 93, 91,163,178,202, 67, 44,235, + 107,250, 75,234, 49,167,125,211, 83,114,157,144, 32,193,143, 36, + 158,124,247,187, 89,214,141, 47,121,228, 61,130,213,194,174,251, + 97,110, 54,229,115, 57,152, 94,105,243,212, 55,209,245, 63, 11, + 164,200, 31,156, 81,176,227, 21, 76, 99,139,188,127, 17,248, 51, + 207,120,189,210, 8,226, 41, 72,183,203,135,165,166, 60, 98, 7, + 122, 38,155,170, 69,172,252,238, 39,134, 59,128,236, 27,240, 80, + 131, 3, 85,206,145, 79,154,142,159,220,201,133, 74, 64, 20,129, + 224,185,138,103,173,182, 43, 34,254, 82,198,151,231,180, 58, 10, + 118, 26,102, 12, 50,132, 22,191,136,111,162,179, 45, 4,148,108, + 161, 56, 78,126,242,222, 15,175,146, 23, 33,241,181,190, 77,225, + 0, 46,169,186, 68, 95,237, 65, 53,208,253,168, 9, 18,100, 52, + 116,184,160, 96,109, 37, 30,106,140,104,150, 5,204,117,112, 84 +}; + +void CData::UpdateKeys(const Byte *data) +{ + for (int i = 0; i < 16; i += 4) + for (int j = 0; j < 4; j++) + Keys[j] ^= g_CrcTable[data[i + j]]; +} + +static void Swap(Byte *b1, Byte *b2) +{ + Byte b = *b1; + *b1 = *b2; + *b2 = b; +} + +void CData::SetPassword(const Byte *password, UInt32 passwordLen) +{ + Keys[0] = 0xD3A3B879L; + Keys[1] = 0x3F6D12F7L; + Keys[2] = 0x7515A235L; + Keys[3] = 0xA4E7F123L; + + Byte psw[256]; + memset(psw, 0, sizeof(psw)); + memcpy(psw, password, passwordLen); + memcpy(SubstTable, InitSubstTable, sizeof(SubstTable)); + + for (UInt32 j = 0; j < 256; j++) + for (UInt32 i = 0; i < passwordLen; i += 2) + { + UInt32 n2 = (Byte)g_CrcTable[(psw[i + 1] + j) & 0xFF]; + UInt32 n1 = (Byte)g_CrcTable[(psw[i] - j) & 0xFF]; + for (UInt32 k = 1; (n1 & 0xFF) != n2; n1++, k++) + Swap(&SubstTable[n1 & 0xFF], &SubstTable[(n1 + i + k) & 0xFF]); + } + for (UInt32 i = 0; i < passwordLen; i+= 16) + EncryptBlock(&psw[i]); +} + +void CData::CryptBlock(Byte *buf, bool encrypt) +{ + Byte inBuf[16]; + UInt32 A, B, C, D, T, TA, TB; + + A = GetUi32(buf + 0) ^ Keys[0]; + B = GetUi32(buf + 4) ^ Keys[1]; + C = GetUi32(buf + 8) ^ Keys[2]; + D = GetUi32(buf + 12) ^ Keys[3]; + + if (!encrypt) + memcpy(inBuf, buf, sizeof(inBuf)); + + for (int i = 0; i < kNumRounds; i++) + { + UInt32 key = Keys[(encrypt ? i : (kNumRounds - 1 - i)) & 3]; + T = ((C + rotlFixed(D, 11)) ^ key); + TA = A ^ SubstLong(T); + T = ((D ^ rotlFixed(C, 17)) + key); + TB = B ^ SubstLong(T); + A = C; + B = D; + C = TA; + D = TB; + } + + SetUi32(buf + 0, C ^ Keys[0]); + SetUi32(buf + 4, D ^ Keys[1]); + SetUi32(buf + 8, A ^ Keys[2]); + SetUi32(buf + 12, B ^ Keys[3]); + + UpdateKeys(encrypt ? buf : inBuf); +} + +STDMETHODIMP CDecoder::CryptoSetPassword(const Byte *data, UInt32 size) +{ + _cipher.SetPassword(data, size); + return S_OK; +} + +STDMETHODIMP CDecoder::Init() +{ + return S_OK; +} + +static const UInt32 kBlockSize = 16; + +STDMETHODIMP_(UInt32) CDecoder::Filter(Byte *data, UInt32 size) +{ + if (size == 0) + return 0; + if (size < kBlockSize) + return kBlockSize; + UInt32 i; + size -= kBlockSize; + for (i = 0; i <= size; i += kBlockSize) + _cipher.DecryptBlock(data + i); + return i; +} + +}} diff --git a/CPP/7zip/Crypto/Rar20Crypto.h b/CPP/7zip/Crypto/Rar20Crypto.h new file mode 100644 index 0000000..b9648f5 --- /dev/null +++ b/CPP/7zip/Crypto/Rar20Crypto.h @@ -0,0 +1,50 @@ +// Crypto/Rar20Crypto.h + +#ifndef __CRYPTO_RAR20_CRYPTO_H +#define __CRYPTO_RAR20_CRYPTO_H + +#include "Common/MyCom.h" + +#include "../ICoder.h" +#include "../IPassword.h" + +namespace NCrypto { +namespace NRar20 { + +class CData +{ + Byte SubstTable[256]; + UInt32 Keys[4]; + + UInt32 SubstLong(UInt32 t) + { + return (UInt32)SubstTable[(int)t & 255] | + ((UInt32)SubstTable[(int)(t >> 8) & 255] << 8) | + ((UInt32)SubstTable[(int)(t >> 16) & 255] << 16) | + ((UInt32)SubstTable[(int)(t >> 24) & 255] << 24); + } + void UpdateKeys(const Byte *data); + void CryptBlock(Byte *buf, bool encrypt); +public: + void EncryptBlock(Byte *buf) { CryptBlock(buf, true); } + void DecryptBlock(Byte *buf) { CryptBlock(buf, false); } + void SetPassword(const Byte *password, UInt32 passwordLen); +}; + +class CDecoder: + public ICompressFilter, + public ICryptoSetPassword, + public CMyUnknownImp +{ + CData _cipher; +public: + MY_UNKNOWN_IMP1(ICryptoSetPassword) + + STDMETHOD(Init)(); + STDMETHOD_(UInt32, Filter)(Byte *data, UInt32 size); + STDMETHOD(CryptoSetPassword)(const Byte *data, UInt32 size); +}; + +}} + +#endif diff --git a/CPP/7zip/Crypto/RarAes.cpp b/CPP/7zip/Crypto/RarAes.cpp new file mode 100644 index 0000000..b0f00ea --- /dev/null +++ b/CPP/7zip/Crypto/RarAes.cpp @@ -0,0 +1,134 @@ +// Crypto/RarAes.cpp +// Note: you must include MyAes.cpp to project to initialize AES tables + +#include "StdAfx.h" + +#include "RarAes.h" +#include "Sha1.h" + +namespace NCrypto { +namespace NRar29 { + +CDecoder::CDecoder(): + _thereIsSalt(false), + _needCalculate(true), + _rar350Mode(false) +{ + for (int i = 0; i < sizeof(_salt); i++) + _salt[i] = 0; +} + +STDMETHODIMP CDecoder::SetDecoderProperties2(const Byte *data, UInt32 size) +{ + bool thereIsSaltPrev = _thereIsSalt; + _thereIsSalt = false; + if (size == 0) + return S_OK; + if (size < 8) + return E_INVALIDARG; + _thereIsSalt = true; + bool same = false; + if (_thereIsSalt == thereIsSaltPrev) + { + same = true; + if (_thereIsSalt) + { + for (unsigned i = 0; i < sizeof(_salt); i++) + if (_salt[i] != data[i]) + { + same = false; + break; + } + } + } + for (unsigned i = 0; i < sizeof(_salt); i++) + _salt[i] = data[i]; + if (!_needCalculate && !same) + _needCalculate = true; + return S_OK; +} + +static const unsigned kMaxPasswordLength = 127 * 2; + +STDMETHODIMP CDecoder::CryptoSetPassword(const Byte *data, UInt32 size) +{ + if (size > kMaxPasswordLength) + size = kMaxPasswordLength; + bool same = false; + if (size == buffer.GetCapacity()) + { + same = true; + for (UInt32 i = 0; i < size; i++) + if (data[i] != buffer[i]) + { + same = false; + break; + } + } + if (!_needCalculate && !same) + _needCalculate = true; + buffer.SetCapacity(size); + memcpy(buffer, data, size); + return S_OK; +} + +STDMETHODIMP CDecoder::Init() +{ + Calculate(); + SetKey(aesKey, kRarAesKeySize); + AesCbc_Init(_aes + _offset, _aesInit); + return S_OK; +} + +void CDecoder::Calculate() +{ + if (_needCalculate) + { + const unsigned kSaltSize = 8; + + Byte rawPassword[kMaxPasswordLength + kSaltSize]; + + memcpy(rawPassword, buffer, buffer.GetCapacity()); + + size_t rawLength = buffer.GetCapacity(); + + if (_thereIsSalt) + { + memcpy(rawPassword + rawLength, _salt, kSaltSize); + rawLength += kSaltSize; + } + + NSha1::CContext sha; + sha.Init(); + + // rar reverts hash for sha. + const unsigned kNumRounds = (1 << 18); + unsigned i; + for (i = 0; i < kNumRounds; i++) + { + sha.UpdateRar(rawPassword, rawLength, _rar350Mode); + Byte pswNum[3] = { (Byte)i, (Byte)(i >> 8), (Byte)(i >> 16) }; + sha.UpdateRar(pswNum, 3, _rar350Mode); + if (i % (kNumRounds / 16) == 0) + { + NSha1::CContext shaTemp = sha; + Byte digest[NSha1::kDigestSize]; + shaTemp.Final(digest); + _aesInit[i / (kNumRounds / 16)] = (Byte)digest[4 * 4 + 3]; + } + } + /* + // it's test message for sha + const char *message = "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq"; + sha.Update((const Byte *)message, strlen(message)); + */ + Byte digest[20]; + sha.Final(digest); + for (i = 0; i < 4; i++) + for (unsigned j = 0; j < 4; j++) + aesKey[i * 4 + j] = (digest[i * 4 + 3 - j]); + } + _needCalculate = false; +} + +}} diff --git a/CPP/7zip/Crypto/RarAes.h b/CPP/7zip/Crypto/RarAes.h new file mode 100644 index 0000000..119cc23 --- /dev/null +++ b/CPP/7zip/Crypto/RarAes.h @@ -0,0 +1,47 @@ +// Crypto/RarAes.h + +#ifndef __CRYPTO_RAR_AES_H +#define __CRYPTO_RAR_AES_H + +#include "../../../C/Aes.h" + +#include "Common/Buffer.h" + +#include "../IPassword.h" + +#include "MyAes.h" + +namespace NCrypto { +namespace NRar29 { + +const UInt32 kRarAesKeySize = 16; + +class CDecoder: + public CAesCbcDecoder, + public ICompressSetDecoderProperties2, + public ICryptoSetPassword +{ + Byte _salt[8]; + bool _thereIsSalt; + CByteBuffer buffer; + Byte aesKey[kRarAesKeySize]; + Byte _aesInit[AES_BLOCK_SIZE]; + bool _needCalculate; + bool _rar350Mode; + + void Calculate(); +public: + MY_UNKNOWN_IMP2( + ICryptoSetPassword, + ICompressSetDecoderProperties2) + STDMETHOD(Init)(); + STDMETHOD(CryptoSetPassword)(const Byte *aData, UInt32 aSize); + STDMETHOD(SetDecoderProperties2)(const Byte *data, UInt32 size); + + CDecoder(); + void SetRar350Mode(bool rar350Mode) { _rar350Mode = rar350Mode; } +}; + +}} + +#endif diff --git a/CPP/7zip/Crypto/Sha1.cpp b/CPP/7zip/Crypto/Sha1.cpp new file mode 100644 index 0000000..82ca986 --- /dev/null +++ b/CPP/7zip/Crypto/Sha1.cpp @@ -0,0 +1,229 @@ +// Crypto/Sha1.cpp +// This file is based on public domain +// Steve Reid and Wei Dai's code from Crypto++ + +#include "StdAfx.h" + +#include "../../../C/RotateDefs.h" + +#include "Sha1.h" + +namespace NCrypto { +namespace NSha1 { + +// define it for speed optimization +// #define _SHA1_UNROLL + +static const unsigned kNumW = + #ifdef _SHA1_UNROLL + 16; + #else + 80; + #endif + + +#define w0(i) (W[(i)] = data[(i)]) + +#ifdef _SHA1_UNROLL +#define w1(i) (W[(i)&15] = rotlFixed(W[((i)-3)&15] ^ W[((i)-8)&15] ^ W[((i)-14)&15] ^ W[((i)-16)&15], 1)) +#else +#define w1(i) (W[(i)] = rotlFixed(W[(i)-3] ^ W[(i)-8] ^ W[(i)-14] ^ W[(i)-16], 1)) +#endif + +#define f1(x,y,z) (z^(x&(y^z))) +#define f2(x,y,z) (x^y^z) +#define f3(x,y,z) ((x&y)|(z&(x|y))) +#define f4(x,y,z) (x^y^z) + +#define RK1(a,b,c,d,e,i, f, w, k) e += f(b,c,d) + w(i) + k + rotlFixed(a,5); b = rotlFixed(b,30); + +#define R0(a,b,c,d,e,i) RK1(a,b,c,d,e,i, f1, w0, 0x5A827999) +#define R1(a,b,c,d,e,i) RK1(a,b,c,d,e,i, f1, w1, 0x5A827999) +#define R2(a,b,c,d,e,i) RK1(a,b,c,d,e,i, f2, w1, 0x6ED9EBA1) +#define R3(a,b,c,d,e,i) RK1(a,b,c,d,e,i, f3, w1, 0x8F1BBCDC) +#define R4(a,b,c,d,e,i) RK1(a,b,c,d,e,i, f4, w1, 0xCA62C1D6) + +#define RX_1_4(rx1, rx4, i) rx1(a,b,c,d,e,i); rx4(e,a,b,c,d,i+1); rx4(d,e,a,b,c,i+2); rx4(c,d,e,a,b,i+3); rx4(b,c,d,e,a,i+4); +#define RX_5(rx, i) RX_1_4(rx, rx, i); + +void CContextBase::Init() +{ + _state[0] = 0x67452301; + _state[1] = 0xEFCDAB89; + _state[2] = 0x98BADCFE; + _state[3] = 0x10325476; + _state[4] = 0xC3D2E1F0; + _count = 0; +} + +void CContextBase::GetBlockDigest(UInt32 *data, UInt32 *destDigest, bool returnRes) +{ + UInt32 a, b, c, d, e; + UInt32 W[kNumW]; + + a = _state[0]; + b = _state[1]; + c = _state[2]; + d = _state[3]; + e = _state[4]; + #ifdef _SHA1_UNROLL + RX_5(R0, 0); RX_5(R0, 5); RX_5(R0, 10); + #else + int i; + for (i = 0; i < 15; i += 5) { RX_5(R0, i); } + #endif + + RX_1_4(R0, R1, 15); + + + #ifdef _SHA1_UNROLL + RX_5(R2, 20); RX_5(R2, 25); RX_5(R2, 30); RX_5(R2, 35); + RX_5(R3, 40); RX_5(R3, 45); RX_5(R3, 50); RX_5(R3, 55); + RX_5(R4, 60); RX_5(R4, 65); RX_5(R4, 70); RX_5(R4, 75); + #else + i = 20; + for (; i < 40; i += 5) { RX_5(R2, i); } + for (; i < 60; i += 5) { RX_5(R3, i); } + for (; i < 80; i += 5) { RX_5(R4, i); } + #endif + + destDigest[0] = _state[0] + a; + destDigest[1] = _state[1] + b; + destDigest[2] = _state[2] + c; + destDigest[3] = _state[3] + d; + destDigest[4] = _state[4] + e; + + if (returnRes) + for (int i = 0 ; i < 16; i++) + data[i] = W[kNumW - 16 + i]; + + // Wipe variables + // a = b = c = d = e = 0; +} + +void CContextBase::PrepareBlock(UInt32 *block, unsigned size) const +{ + unsigned curBufferPos = size & 0xF; + block[curBufferPos++] = 0x80000000; + while (curBufferPos != (16 - 2)) + block[curBufferPos++] = 0; + const UInt64 lenInBits = (_count << 9) + ((UInt64)size << 5); + block[curBufferPos++] = (UInt32)(lenInBits >> 32); + block[curBufferPos++] = (UInt32)(lenInBits); +} + +void CContext::Update(const Byte *data, size_t size) +{ + unsigned curBufferPos = _count2; + while (size--) + { + int pos = (int)(curBufferPos & 3); + if (pos == 0) + _buffer[curBufferPos >> 2] = 0; + _buffer[curBufferPos >> 2] |= ((UInt32)*data++) << (8 * (3 - pos)); + if (++curBufferPos == kBlockSize) + { + curBufferPos = 0; + CContextBase::UpdateBlock(_buffer, false); + } + } + _count2 = curBufferPos; +} + +void CContext::UpdateRar(Byte *data, size_t size, bool rar350Mode) +{ + bool returnRes = false; + unsigned curBufferPos = _count2; + while (size--) + { + int pos = (int)(curBufferPos & 3); + if (pos == 0) + _buffer[curBufferPos >> 2] = 0; + _buffer[curBufferPos >> 2] |= ((UInt32)*data++) << (8 * (3 - pos)); + if (++curBufferPos == kBlockSize) + { + curBufferPos = 0; + CContextBase::UpdateBlock(_buffer, returnRes); + if (returnRes) + for (int i = 0; i < kBlockSizeInWords; i++) + { + UInt32 d = _buffer[i]; + data[i * 4 + 0 - kBlockSize] = (Byte)(d); + data[i * 4 + 1 - kBlockSize] = (Byte)(d >> 8); + data[i * 4 + 2 - kBlockSize] = (Byte)(d >> 16); + data[i * 4 + 3 - kBlockSize] = (Byte)(d >> 24); + } + returnRes = rar350Mode; + } + } + _count2 = curBufferPos; +} + +void CContext::Final(Byte *digest) +{ + const UInt64 lenInBits = (_count << 9) + ((UInt64)_count2 << 3); + unsigned curBufferPos = _count2; + int pos = (int)(curBufferPos & 3); + curBufferPos >>= 2; + if (pos == 0) + _buffer[curBufferPos] = 0; + _buffer[curBufferPos++] |= ((UInt32)0x80) << (8 * (3 - pos)); + + while (curBufferPos != (16 - 2)) + { + curBufferPos &= 0xF; + if (curBufferPos == 0) + UpdateBlock(); + _buffer[curBufferPos++] = 0; + } + _buffer[curBufferPos++] = (UInt32)(lenInBits >> 32); + _buffer[curBufferPos++] = (UInt32)(lenInBits); + UpdateBlock(); + + int i; + for (i = 0; i < kDigestSizeInWords; i++) + { + UInt32 state = _state[i] & 0xFFFFFFFF; + *digest++ = (Byte)(state >> 24); + *digest++ = (Byte)(state >> 16); + *digest++ = (Byte)(state >> 8); + *digest++ = (Byte)(state); + } + Init(); +} + +/////////////////////////// +// Words version + +void CContext32::Update(const UInt32 *data, size_t size) +{ + while (size--) + { + _buffer[_count2++] = *data++; + if (_count2 == kBlockSizeInWords) + { + _count2 = 0; + UpdateBlock(); + } + } +} + +void CContext32::Final(UInt32 *digest) +{ + const UInt64 lenInBits = (_count << 9) + ((UInt64)_count2 << 5); + unsigned curBufferPos = _count2; + _buffer[curBufferPos++] = 0x80000000; + while (curBufferPos != (16 - 2)) + { + curBufferPos &= 0xF; + if (curBufferPos == 0) + UpdateBlock(); + _buffer[curBufferPos++] = 0; + } + _buffer[curBufferPos++] = (UInt32)(lenInBits >> 32); + _buffer[curBufferPos++] = (UInt32)(lenInBits); + GetBlockDigest(_buffer, digest); + Init(); +} + +}} diff --git a/CPP/7zip/Crypto/Sha1.h b/CPP/7zip/Crypto/Sha1.h new file mode 100644 index 0000000..1bad1f9 --- /dev/null +++ b/CPP/7zip/Crypto/Sha1.h @@ -0,0 +1,68 @@ +// Crypto/Sha1.h +// This file is based on public domain +// Steve Reid and Wei Dai's code from Crypto++ + +#ifndef __CRYPTO_SHA1_H +#define __CRYPTO_SHA1_H + +#include +#include "../../Common/Types.h" + +// Sha1 implementation in RAR before version 3.60 has bug: +// it changes data bytes in some cases. +// So this class supports both versions: normal_SHA and rar3Mode + +namespace NCrypto { +namespace NSha1 { + +const unsigned kBlockSize = 64; +const unsigned kDigestSize = 20; + +const unsigned kBlockSizeInWords = (kBlockSize >> 2); +const unsigned kDigestSizeInWords = (kDigestSize >> 2); + +class CContextBase +{ +protected: + UInt32 _state[5]; + UInt64 _count; + void UpdateBlock(UInt32 *data, bool returnRes = false) + { + GetBlockDigest(data, _state, returnRes); + _count++; + } +public: + void Init(); + void GetBlockDigest(UInt32 *blockData, UInt32 *destDigest, bool returnRes = false); + // PrepareBlock can be used only when size <= 13. size in Words + void PrepareBlock(UInt32 *block, unsigned int size) const; +}; + +class CContextBase2: public CContextBase +{ +protected: + unsigned _count2; + UInt32 _buffer[kBlockSizeInWords]; + void UpdateBlock() { CContextBase::UpdateBlock(_buffer); } +public: + void Init() { CContextBase::Init(); _count2 = 0; } +}; + +class CContext: public CContextBase2 +{ +public: + void Update(const Byte *data, size_t size); + void UpdateRar(Byte *data, size_t size, bool rar350Mode); + void Final(Byte *digest); +}; + +class CContext32: public CContextBase2 +{ +public: + void Update(const UInt32 *data, size_t size); + void Final(UInt32 *digest); +}; + +}} + +#endif diff --git a/CPP/7zip/Crypto/WzAes.cpp b/CPP/7zip/Crypto/WzAes.cpp new file mode 100644 index 0000000..08a1818 --- /dev/null +++ b/CPP/7zip/Crypto/WzAes.cpp @@ -0,0 +1,221 @@ +// Crypto/WzAes.cpp +/* +This code implements Brian Gladman's scheme +specified in password Based File Encryption Utility. + +Note: you must include MyAes.cpp to project to initialize AES tables +*/ + +#include "StdAfx.h" + +#include "../Common/StreamObjects.h" +#include "../Common/StreamUtils.h" + +#include "Pbkdf2HmacSha1.h" +#include "RandGen.h" +#include "WzAes.h" + +// define it if you don't want to use speed-optimized version of Pbkdf2HmacSha1 +// #define _NO_WZAES_OPTIMIZATIONS + +namespace NCrypto { +namespace NWzAes { + +const unsigned kAesKeySizeMax = 32; + +static const UInt32 kNumKeyGenIterations = 1000; + +STDMETHODIMP CBaseCoder::CryptoSetPassword(const Byte *data, UInt32 size) +{ + if(size > kPasswordSizeMax) + return E_INVALIDARG; + _key.Password.SetCapacity(size); + memcpy(_key.Password, data, size); + return S_OK; +} + +#ifndef _NO_WZAES_OPTIMIZATIONS + +static void BytesToBeUInt32s(const Byte *src, UInt32 *dest, unsigned destSize) +{ + for (unsigned i = 0; i < destSize; i++) + dest[i] = + ((UInt32)(src[i * 4 + 0]) << 24) | + ((UInt32)(src[i * 4 + 1]) << 16) | + ((UInt32)(src[i * 4 + 2]) << 8) | + ((UInt32)(src[i * 4 + 3])); +} + +#endif + +STDMETHODIMP CBaseCoder::Init() +{ + UInt32 keySize = _key.GetKeySize(); + UInt32 keysTotalSize = 2 * keySize + kPwdVerifCodeSize; + Byte buf[2 * kAesKeySizeMax + kPwdVerifCodeSize]; + + // for (unsigned ii = 0; ii < 1000; ii++) + { + #ifdef _NO_WZAES_OPTIMIZATIONS + + NSha1::Pbkdf2Hmac( + _key.Password, _key.Password.GetCapacity(), + _key.Salt, _key.GetSaltSize(), + kNumKeyGenIterations, + buf, keysTotalSize); + + #else + + UInt32 buf32[(2 * kAesKeySizeMax + kPwdVerifCodeSize + 3) / 4]; + UInt32 key32SizeTotal = (keysTotalSize + 3) / 4; + UInt32 salt[kSaltSizeMax * 4]; + UInt32 saltSizeInWords = _key.GetSaltSize() / 4; + BytesToBeUInt32s(_key.Salt, salt, saltSizeInWords); + NSha1::Pbkdf2Hmac32( + _key.Password, _key.Password.GetCapacity(), + salt, saltSizeInWords, + kNumKeyGenIterations, + buf32, key32SizeTotal); + for (UInt32 j = 0; j < keysTotalSize; j++) + buf[j] = (Byte)(buf32[j / 4] >> (24 - 8 * (j & 3))); + + #endif + } + + _hmac.SetKey(buf + keySize, keySize); + memcpy(_key.PwdVerifComputed, buf + 2 * keySize, kPwdVerifCodeSize); + + AesCtr2_Init(&_aes); + Aes_SetKey_Enc(_aes.aes + _aes.offset + 8, buf, keySize); + return S_OK; +} + +HRESULT CEncoder::WriteHeader(ISequentialOutStream *outStream) +{ + UInt32 saltSize = _key.GetSaltSize(); + g_RandomGenerator.Generate(_key.Salt, saltSize); + Init(); + RINOK(WriteStream(outStream, _key.Salt, saltSize)); + return WriteStream(outStream, _key.PwdVerifComputed, kPwdVerifCodeSize); +} + +HRESULT CEncoder::WriteFooter(ISequentialOutStream *outStream) +{ + Byte mac[kMacSize]; + _hmac.Final(mac, kMacSize); + return WriteStream(outStream, mac, kMacSize); +} + +STDMETHODIMP CDecoder::SetDecoderProperties2(const Byte *data, UInt32 size) +{ + if (size != 1) + return E_INVALIDARG; + _key.Init(); + return SetKeyMode(data[0]) ? S_OK : E_INVALIDARG; +} + +HRESULT CDecoder::ReadHeader(ISequentialInStream *inStream) +{ + UInt32 saltSize = _key.GetSaltSize(); + UInt32 extraSize = saltSize + kPwdVerifCodeSize; + Byte temp[kSaltSizeMax + kPwdVerifCodeSize]; + RINOK(ReadStream_FAIL(inStream, temp, extraSize)); + UInt32 i; + for (i = 0; i < saltSize; i++) + _key.Salt[i] = temp[i]; + for (i = 0; i < kPwdVerifCodeSize; i++) + _pwdVerifFromArchive[i] = temp[saltSize + i]; + return S_OK; +} + +static bool CompareArrays(const Byte *p1, const Byte *p2, UInt32 size) +{ + for (UInt32 i = 0; i < size; i++) + if (p1[i] != p2[i]) + return false; + return true; +} + +bool CDecoder::CheckPasswordVerifyCode() +{ + return CompareArrays(_key.PwdVerifComputed, _pwdVerifFromArchive, kPwdVerifCodeSize); +} + +HRESULT CDecoder::CheckMac(ISequentialInStream *inStream, bool &isOK) +{ + isOK = false; + Byte mac1[kMacSize]; + RINOK(ReadStream_FAIL(inStream, mac1, kMacSize)); + Byte mac2[kMacSize]; + _hmac.Final(mac2, kMacSize); + isOK = CompareArrays(mac1, mac2, kMacSize); + return S_OK; +} + +CAesCtr2::CAesCtr2() +{ + offset = ((0 - (unsigned)(ptrdiff_t)aes) & 0xF) / sizeof(UInt32); +} + +void AesCtr2_Init(CAesCtr2 *p) +{ + UInt32 *ctr = p->aes + p->offset + 4; + unsigned i; + for (i = 0; i < 4; i++) + ctr[i] = 0; + p->pos = AES_BLOCK_SIZE; +} + +void AesCtr2_Code(CAesCtr2 *p, Byte *data, SizeT size) +{ + unsigned pos = p->pos; + UInt32 *buf32 = p->aes + p->offset; + if (size == 0) + return; + if (pos != AES_BLOCK_SIZE) + { + const Byte *buf = (const Byte *)buf32; + do + *data++ ^= buf[pos++]; + while (--size != 0 && pos != AES_BLOCK_SIZE); + } + if (size >= 16) + { + SizeT size2 = size >> 4; + g_AesCtr_Code(buf32 + 4, data, size2); + size2 <<= 4; + data += size2; + size -= size2; + pos = AES_BLOCK_SIZE; + } + if (size != 0) + { + unsigned j; + const Byte *buf; + for (j = 0; j < 4; j++) + buf32[j] = 0; + g_AesCtr_Code(buf32 + 4, (Byte *)buf32, 1); + buf = (const Byte *)buf32; + pos = 0; + do + *data++ ^= buf[pos++]; + while (--size != 0 && pos != AES_BLOCK_SIZE); + } + p->pos = pos; +} + +STDMETHODIMP_(UInt32) CEncoder::Filter(Byte *data, UInt32 size) +{ + AesCtr2_Code(&_aes, data, size); + _hmac.Update(data, size); + return size; +} + +STDMETHODIMP_(UInt32) CDecoder::Filter(Byte *data, UInt32 size) +{ + _hmac.Update(data, size); + AesCtr2_Code(&_aes, data, size); + return size; +} + +}} diff --git a/CPP/7zip/Crypto/WzAes.h b/CPP/7zip/Crypto/WzAes.h new file mode 100644 index 0000000..f37fe64 --- /dev/null +++ b/CPP/7zip/Crypto/WzAes.h @@ -0,0 +1,125 @@ +// Crypto/WzAes.h +/* +This code implements Brian Gladman's scheme +specified in password Based File Encryption Utility: + - AES encryption (128,192,256-bit) in Counter (CTR) mode. + - HMAC-SHA1 authentication for encrypted data (10 bytes) + - Keys are derived by PPKDF2(RFC2898)-HMAC-SHA1 from ASCII password and + Salt (saltSize = aesKeySize / 2). + - 2 bytes contain Password Verifier's Code +*/ + +#ifndef __CRYPTO_WZ_AES_H +#define __CRYPTO_WZ_AES_H + +#include "../../../C/Aes.h" + +#include "Common/Buffer.h" +#include "Common/MyCom.h" +#include "Common/MyVector.h" + +#include "../ICoder.h" +#include "../IPassword.h" + +#include "HmacSha1.h" + +namespace NCrypto { +namespace NWzAes { + +const unsigned kSaltSizeMax = 16; +const unsigned kMacSize = 10; + +const UInt32 kPasswordSizeMax = 99; // 128; + +// Password Verification Code Size +const unsigned kPwdVerifCodeSize = 2; + +enum EKeySizeMode +{ + kKeySizeMode_AES128 = 1, + kKeySizeMode_AES192 = 2, + kKeySizeMode_AES256 = 3 +}; + +class CKeyInfo +{ +public: + EKeySizeMode KeySizeMode; + Byte Salt[kSaltSizeMax]; + Byte PwdVerifComputed[kPwdVerifCodeSize]; + + CByteBuffer Password; + + UInt32 GetKeySize() const { return (8 * (KeySizeMode & 3) + 8); } + UInt32 GetSaltSize() const { return (4 * (KeySizeMode & 3) + 4); } + + CKeyInfo() { Init(); } + void Init() { KeySizeMode = kKeySizeMode_AES256; } +}; + +struct CAesCtr2 +{ + unsigned pos; + unsigned offset; + UInt32 aes[4 + AES_NUM_IVMRK_WORDS + 3]; + CAesCtr2(); +}; + +void AesCtr2_Init(CAesCtr2 *p); +void AesCtr2_Code(CAesCtr2 *p, Byte *data, SizeT size); + +class CBaseCoder: + public ICompressFilter, + public ICryptoSetPassword, + public CMyUnknownImp +{ +protected: + CKeyInfo _key; + NSha1::CHmac _hmac; + Byte _pwdVerifFromArchive[kPwdVerifCodeSize]; + CAesCtr2 _aes; + +public: + STDMETHOD(Init)(); + STDMETHOD_(UInt32, Filter)(Byte *data, UInt32 size) = 0; + + STDMETHOD(CryptoSetPassword)(const Byte *data, UInt32 size); + + UInt32 GetHeaderSize() const { return _key.GetSaltSize() + kPwdVerifCodeSize; } + bool SetKeyMode(unsigned mode) + { + if (mode < kKeySizeMode_AES128 || mode > kKeySizeMode_AES256) + return false; + _key.KeySizeMode = (EKeySizeMode)mode; + return true; + } +}; + +class CEncoder: + public CBaseCoder +{ +public: + MY_UNKNOWN_IMP1(ICryptoSetPassword) + STDMETHOD_(UInt32, Filter)(Byte *data, UInt32 size); + HRESULT WriteHeader(ISequentialOutStream *outStream); + HRESULT WriteFooter(ISequentialOutStream *outStream); +}; + +class CDecoder: + public CBaseCoder, + public ICompressSetDecoderProperties2 +{ +public: + MY_UNKNOWN_IMP2( + ICryptoSetPassword, + ICompressSetDecoderProperties2) + STDMETHOD_(UInt32, Filter)(Byte *data, UInt32 size); + STDMETHOD(SetDecoderProperties2)(const Byte *data, UInt32 size); + HRESULT ReadHeader(ISequentialInStream *inStream); + bool CheckPasswordVerifyCode(); + HRESULT CheckMac(ISequentialInStream *inStream, bool &isOK); +}; + +}} + +#endif diff --git a/CPP/7zip/Crypto/ZipCrypto.cpp b/CPP/7zip/Crypto/ZipCrypto.cpp new file mode 100644 index 0000000..baaaf98 --- /dev/null +++ b/CPP/7zip/Crypto/ZipCrypto.cpp @@ -0,0 +1,88 @@ +// Crypto/ZipCrypto.cpp + +#include "StdAfx.h" + +#include "../../../C/7zCrc.h" + +#include "../Common/StreamUtils.h" + +#include "RandGen.h" +#include "ZipCrypto.h" + +namespace NCrypto { +namespace NZip { + +void CCipher::UpdateKeys(Byte b) +{ + Keys[0] = CRC_UPDATE_BYTE(Keys[0], b); + Keys[1] = (Keys[1] + (Keys[0] & 0xFF)) * 0x8088405 + 1; + Keys[2] = CRC_UPDATE_BYTE(Keys[2], (Byte)(Keys[1] >> 24)); +} + +STDMETHODIMP CCipher::CryptoSetPassword(const Byte *password, UInt32 passwordLen) +{ + Keys[0] = 0x12345678; + Keys[1] = 0x23456789; + Keys[2] = 0x34567890; + UInt32 i; + for (i = 0; i < passwordLen; i++) + UpdateKeys(password[i]); + for (i = 0; i < 3; i++) + Keys2[i] = Keys[i]; + return S_OK; +} + +STDMETHODIMP CCipher::Init() +{ + return S_OK; +} + +Byte CCipher::DecryptByteSpec() +{ + UInt32 temp = Keys[2] | 2; + return (Byte)((temp * (temp ^ 1)) >> 8); +} + +HRESULT CEncoder::WriteHeader(ISequentialOutStream *outStream, UInt32 crc) +{ + Byte h[kHeaderSize]; + g_RandomGenerator.Generate(h, kHeaderSize - 2); + h[kHeaderSize - 1] = (Byte)(crc >> 24); + h[kHeaderSize - 2] = (Byte)(crc >> 16); + RestoreKeys(); + Filter(h, kHeaderSize); + return WriteStream(outStream, h, kHeaderSize); +} + +STDMETHODIMP_(UInt32) CEncoder::Filter(Byte *data, UInt32 size) +{ + for (UInt32 i = 0; i < size; i++) + { + Byte b = data[i]; + data[i] = (Byte)(b ^ DecryptByteSpec());; + UpdateKeys(b); + } + return size; +} + +HRESULT CDecoder::ReadHeader(ISequentialInStream *inStream) +{ + Byte h[kHeaderSize]; + RINOK(ReadStream_FAIL(inStream, h, kHeaderSize)); + RestoreKeys(); + Filter(h, kHeaderSize); + return S_OK; +} + +STDMETHODIMP_(UInt32) CDecoder::Filter(Byte *data, UInt32 size) +{ + for (UInt32 i = 0; i < size; i++) + { + Byte c = (Byte)(data[i] ^ DecryptByteSpec()); + UpdateKeys(c); + data[i] = c; + } + return size; +} + +}} diff --git a/CPP/7zip/Crypto/ZipCrypto.h b/CPP/7zip/Crypto/ZipCrypto.h new file mode 100644 index 0000000..6f104be --- /dev/null +++ b/CPP/7zip/Crypto/ZipCrypto.h @@ -0,0 +1,56 @@ +// Crypto/ZipCrypto.h + +#ifndef __CRYPTO_ZIP_CRYPTO_H +#define __CRYPTO_ZIP_CRYPTO_H + +#include "Common/MyCom.h" + +#include "../ICoder.h" +#include "../IPassword.h" + +namespace NCrypto { +namespace NZip { + +const unsigned kHeaderSize = 12; + +class CCipher: + public ICompressFilter, + public ICryptoSetPassword, + public CMyUnknownImp +{ + UInt32 Keys[3]; + UInt32 Keys2[3]; + +protected: + void UpdateKeys(Byte b); + Byte DecryptByteSpec(); + void RestoreKeys() + { + for (int i = 0; i < 3; i++) + Keys[i] = Keys2[i]; + } + +public: + STDMETHOD(Init)(); + STDMETHOD(CryptoSetPassword)(const Byte *data, UInt32 size); +}; + +class CEncoder: public CCipher +{ +public: + MY_UNKNOWN_IMP1(ICryptoSetPassword) + STDMETHOD_(UInt32, Filter)(Byte *data, UInt32 size); + HRESULT WriteHeader(ISequentialOutStream *outStream, UInt32 crc); +}; + +class CDecoder: public CCipher +{ +public: + MY_UNKNOWN_IMP1(ICryptoSetPassword) + STDMETHOD_(UInt32, Filter)(Byte *data, UInt32 size); + HRESULT ReadHeader(ISequentialInStream *inStream); +}; + +}} + +#endif diff --git a/CPP/7zip/Crypto/ZipStrong.cpp b/CPP/7zip/Crypto/ZipStrong.cpp new file mode 100644 index 0000000..1554b34 --- /dev/null +++ b/CPP/7zip/Crypto/ZipStrong.cpp @@ -0,0 +1,164 @@ +// Crypto/ZipStrong.cpp + +#include "StdAfx.h" + +#include "../../../C/7zCrc.h" +#include "../../../C/CpuArch.h" + +#include "../Common/StreamUtils.h" + +#include "MyAes.h" +#include "Sha1.h" +#include "ZipStrong.h" + +namespace NCrypto { +namespace NZipStrong { + +static const UInt16 kAES128 = 0x660E; + +// DeriveKey* function is similar to CryptDeriveKey() from Windows. +// But MSDN tells that we need such scheme only if +// "the required key length is longer than the hash value" +// but ZipStrong uses it always. + +static void DeriveKey2(const Byte *digest, Byte c, Byte *dest) +{ + Byte buf[64]; + memset(buf, c, 64); + for (unsigned i = 0; i < NSha1::kDigestSize; i++) + buf[i] ^= digest[i]; + NSha1::CContext sha; + sha.Init(); + sha.Update(buf, 64); + sha.Final(dest); +} + +static void DeriveKey(NSha1::CContext &sha, Byte *key) +{ + Byte digest[NSha1::kDigestSize]; + sha.Final(digest); + Byte temp[NSha1::kDigestSize * 2]; + DeriveKey2(digest, 0x36, temp); + DeriveKey2(digest, 0x5C, temp + NSha1::kDigestSize); + memcpy(key, temp, 32); +} + +void CKeyInfo::SetPassword(const Byte *data, UInt32 size) +{ + NSha1::CContext sha; + sha.Init(); + sha.Update(data, size); + DeriveKey(sha, MasterKey); +} + +STDMETHODIMP CBaseCoder::CryptoSetPassword(const Byte *data, UInt32 size) +{ + _key.SetPassword(data, size); + return S_OK; +} + +HRESULT CDecoder::ReadHeader(ISequentialInStream *inStream, UInt32 /* crc */, UInt64 /* unpackSize */) +{ + Byte temp[4]; + RINOK(ReadStream_FALSE(inStream, temp, 2)); + _ivSize = GetUi16(temp); + if (_ivSize == 0) + { + return E_NOTIMPL; + /* + SetUi32(_iv, crc); + for (int i = 0; i < 8; i++) + _iv[4 + i] = (Byte)(unpackSize >> (8 * i)); + SetUi32(_iv + 12, 0); + */ + } + else if (_ivSize == 16) + { + RINOK(ReadStream_FALSE(inStream, _iv, _ivSize)); + } + else + return E_NOTIMPL; + RINOK(ReadStream_FALSE(inStream, temp, 4)); + _remSize = GetUi32(temp); + const UInt32 kAlign = 16; + if (_remSize < 16 || _remSize > (1 << 18)) + return E_NOTIMPL; + if (_remSize + kAlign > _buf.GetCapacity()) + { + _buf.Free(); + _buf.SetCapacity(_remSize + kAlign); + _bufAligned = (Byte *)((ptrdiff_t)((Byte *)_buf + kAlign - 1) & ~(ptrdiff_t)(kAlign - 1)); + } + return ReadStream_FALSE(inStream, _bufAligned, _remSize); +} + +HRESULT CDecoder::CheckPassword(bool &passwOK) +{ + passwOK = false; + if (_remSize < 16) + return E_NOTIMPL; + Byte *p = _bufAligned; + UInt16 format = GetUi16(p); + if (format != 3) + return E_NOTIMPL; + UInt16 algId = GetUi16(p + 2); + if (algId < kAES128) + return E_NOTIMPL; + algId -= kAES128; + if (algId > 2) + return E_NOTIMPL; + UInt16 bitLen = GetUi16(p + 4); + UInt16 flags = GetUi16(p + 6); + if (algId * 64 + 128 != bitLen) + return E_NOTIMPL; + _key.KeySize = 16 + algId * 8; + if ((flags & 1) == 0) + return E_NOTIMPL; + if ((flags & 0x4000) != 0) + { + // Use 3DES + return E_NOTIMPL; + } + + UInt32 rdSize = GetUi16(p + 8); + if ((rdSize & 0xF) != 0 || rdSize + 16 > _remSize) + return E_NOTIMPL; + memmove(p, p + 10, rdSize); + Byte *validData = p + rdSize + 16; + if (GetUi32(validData - 6) != 0) // reserved + return E_NOTIMPL; + UInt32 validSize = GetUi16(validData - 2); + if ((validSize & 0xF) != 0 || 16 + rdSize + validSize != _remSize) + return E_NOTIMPL; + + + { + RINOK(SetKey(_key.MasterKey, _key.KeySize)); + RINOK(SetInitVector(_iv, 16)); + Init(); + Filter(p, rdSize); + } + + Byte fileKey[32]; + NSha1::CContext sha; + sha.Init(); + sha.Update(_iv, 16); + sha.Update(p, rdSize - 16); // we don't use last 16 bytes (PAD bytes) + DeriveKey(sha, fileKey); + + RINOK(SetKey(fileKey, _key.KeySize)); + RINOK(SetInitVector(_iv, 16)); + Init(); + Filter(validData, validSize); + + if (validSize < 4) + return E_NOTIMPL; + validSize -= 4; + if (GetUi32(validData + validSize) != CrcCalc(validData, validSize)) + return S_OK; + passwOK = true; + Init(); + return S_OK; +} + +}} diff --git a/CPP/7zip/Crypto/ZipStrong.h b/CPP/7zip/Crypto/ZipStrong.h new file mode 100644 index 0000000..151677e --- /dev/null +++ b/CPP/7zip/Crypto/ZipStrong.h @@ -0,0 +1,47 @@ +// Crypto/ZipStrong.h + +#ifndef __CRYPTO_ZIP_STRONG_H +#define __CRYPTO_ZIP_STRONG_H + +#include "Common/Buffer.h" + +#include "../IPassword.h" + +#include "MyAes.h" + +namespace NCrypto { +namespace NZipStrong { + +struct CKeyInfo +{ + Byte MasterKey[32]; + UInt32 KeySize; + void SetPassword(const Byte *data, UInt32 size); +}; + +class CBaseCoder: + public CAesCbcDecoder, + public ICryptoSetPassword +{ +protected: + CKeyInfo _key; + CByteBuffer _buf; + Byte *_bufAligned; +public: + STDMETHOD(CryptoSetPassword)(const Byte *data, UInt32 size); +}; + +class CDecoder: public CBaseCoder +{ + UInt32 _ivSize; + Byte _iv[16]; + UInt32 _remSize; +public: + MY_UNKNOWN_IMP1(ICryptoSetPassword) + HRESULT ReadHeader(ISequentialInStream *inStream, UInt32 crc, UInt64 unpackSize); + HRESULT CheckPassword(bool &passwOK); +}; + +}} + +#endif diff --git a/CPP/7zip/Guid.txt b/CPP/7zip/Guid.txt new file mode 100644 index 0000000..59a743b --- /dev/null +++ b/CPP/7zip/Guid.txt @@ -0,0 +1,170 @@ +{23170F69-40C1-278A-0000-00yy00xx0000} + +00 IProgress.h + + 05 IProgress + +01 IFolderArchive.h + + 05 IArchiveFolder + // 06 IInFolderArchive // old + 07 IFileExtractCallback.h::IFolderArchiveExtractCallback + 0A IOutFolderArchive + 0B IFolderArchiveUpdateCallback + 0C Agent.h::IArchiveFolderInternal + 0D + 0E IInFolderArchive + +03 IStream.h + + 01 ISequentialInStream + 02 ISequentialOutStream + 03 IInStream + 04 IOutStream + 06 IStreamGetSize + 07 IOutStreamFlush + + +04 ICoder.h + + 04 ICompressProgressInfo + 05 ICompressCoder + 18 ICompressCoder2 + 20 ICompressSetCoderProperties + 21 ICompressSetDecoderProperties // + 22 ICompressSetDecoderProperties2 + 23 ICompressWriteCoderProperties + 24 ICompressGetInStreamProcessedSize + 25 ICompressSetCoderMt + 30 ICompressGetSubStreamSize + 31 ICompressSetInStream + 32 ICompressSetOutStream + 33 ICompressSetInStreamSize + 34 ICompressSetOutStreamSize + 35 ICompressSetBufSize + 40 ICompressFilter + 60 ICompressCodecsInfo + 61 ISetCompressCodecsInfo + 80 ICryptoProperties + 88 ICryptoResetSalt + 8C ICryptoResetInitVector + 90 ICryptoSetPassword + A0 ICryptoSetCRC + + +05 IPassword.h + + 10 ICryptoGetTextPassword + 11 ICryptoGetTextPassword2 + + +06 IArchive.h + + 03 ISetProperties + + 10 IArchiveOpenCallback + 20 IArchiveExtractCallback + 30 IArchiveOpenVolumeCallback + 40 IInArchiveGetStream + 50 IArchiveOpenSetSubArchiveName + 60 IInArchive + 61 IArchiveOpenSeq + + 80 IArchiveUpdateCallback + 82 IArchiveUpdateCallback2 + A0 IOutArchive + + + +08 IFolder.h + + 00 IFolderFolder + 01 IEnumProperties + 02 IFolderGetTypeID + 03 IFolderGetPath + 04 IFolderWasChanged + 05 // IFolderReload + 06 IFolderOperations + 07 IFolderGetSystemIconIndex + 08 IFolderGetItemFullSize + 09 IFolderClone + 0A IFolderSetFlatMode + 0B IFolderOperationsExtractCallback + 0C // + 0D // + 0E IFolderProperties + 0F + 10 IFolderArcProps + 11 IGetFolderArcProps + + +09 IFolder.h :: FOLDER_MANAGER_INTERFACE + + 00 - 04 // old IFolderManager + 05 IFolderManager + + +// 0A PluginInterface.h + 00 IInitContextMenu + 01 IPluginOptionsCallback + 02 IPluginOptions + + +Handler GUIDs: + +{23170F69-40C1-278A-1000-000110xx0000} + + 01 Zip + 02 BZip2 + 03 Rar + 04 Arj + 05 Z + 06 Lzh + 07 7z + 08 Cab + 09 Nsis + 0A lzma + 0B lzma86 + 0C xz + 0D ppmd + + D2 SquashFS + D3 CramFS + D4 APM + D5 Mslz + D6 Flv + D7 Swf + D8 Swfc + D9 Ntfs + DA Fat + DB Mbr + DC Vhd + DD Pe + DE Elf + DF Mach-O + E0 Udf + E1 Xar + E2 Mub + E3 Hfs + E4 Dmg + E5 Compound + E6 Wim + E7 Iso + E8 Bkf + E9 Chm + EA Split + EB Rpm + EC Deb + ED Cpio + EE Tar + EF GZip + +{23170F69-40C1-278A-1000-000100030000} CAgentArchiveHandle +{23170F69-40C1-278A-1000-000100020000} ContextMenu.h::CZipContextMenu + +{23170F69-40C1-278B- old codecs clsids + +{23170F69-40C1-278D-1000-000100020000} OptionsDialog.h::CLSID_CSevenZipOptions + +{23170F69-40C1-2790-id} Codec Decoders +{23170F69-40C1-2791-id} Codec Encoders diff --git a/CPP/7zip/ICoder.h b/CPP/7zip/ICoder.h new file mode 100644 index 0000000..a518de4 --- /dev/null +++ b/CPP/7zip/ICoder.h @@ -0,0 +1,186 @@ +// ICoder.h + +#ifndef __ICODER_H +#define __ICODER_H + +#include "IStream.h" + +#define CODER_INTERFACE(i, x) DECL_INTERFACE(i, 4, x) + +CODER_INTERFACE(ICompressProgressInfo, 0x04) +{ + STDMETHOD(SetRatioInfo)(const UInt64 *inSize, const UInt64 *outSize) PURE; +}; + +CODER_INTERFACE(ICompressCoder, 0x05) +{ + STDMETHOD(Code)(ISequentialInStream *inStream, ISequentialOutStream *outStream, + const UInt64 *inSize, const UInt64 *outSize, + ICompressProgressInfo *progress) PURE; +}; + +CODER_INTERFACE(ICompressCoder2, 0x18) +{ + STDMETHOD(Code)(ISequentialInStream **inStreams, const UInt64 **inSizes, UInt32 numInStreams, + ISequentialOutStream **outStreams, const UInt64 **outSizes, UInt32 numOutStreams, + ICompressProgressInfo *progress) PURE; +}; + +namespace NCoderPropID +{ + enum EEnum + { + kDefaultProp = 0, + kDictionarySize, + kUsedMemorySize, + kOrder, + kBlockSize, + kPosStateBits, + kLitContextBits, + kLitPosBits, + kNumFastBytes, + kMatchFinder, + kMatchFinderCycles, + kNumPasses, + kAlgorithm, + kNumThreads, + kEndMarker + }; +} + +CODER_INTERFACE(ICompressSetCoderProperties, 0x20) +{ + STDMETHOD(SetCoderProperties)(const PROPID *propIDs, const PROPVARIANT *props, UInt32 numProps) PURE; +}; + +/* +CODER_INTERFACE(ICompressSetCoderProperties, 0x21) +{ + STDMETHOD(SetDecoderProperties)(ISequentialInStream *inStream) PURE; +}; +*/ + +CODER_INTERFACE(ICompressSetDecoderProperties2, 0x22) +{ + STDMETHOD(SetDecoderProperties2)(const Byte *data, UInt32 size) PURE; +}; + +CODER_INTERFACE(ICompressWriteCoderProperties, 0x23) +{ + STDMETHOD(WriteCoderProperties)(ISequentialOutStream *outStream) PURE; +}; + +CODER_INTERFACE(ICompressGetInStreamProcessedSize, 0x24) +{ + STDMETHOD(GetInStreamProcessedSize)(UInt64 *value) PURE; +}; + +CODER_INTERFACE(ICompressSetCoderMt, 0x25) +{ + STDMETHOD(SetNumberOfThreads)(UInt32 numThreads) PURE; +}; + +CODER_INTERFACE(ICompressGetSubStreamSize, 0x30) +{ + STDMETHOD(GetSubStreamSize)(UInt64 subStream, UInt64 *value) PURE; +}; + +CODER_INTERFACE(ICompressSetInStream, 0x31) +{ + STDMETHOD(SetInStream)(ISequentialInStream *inStream) PURE; + STDMETHOD(ReleaseInStream)() PURE; +}; + +CODER_INTERFACE(ICompressSetOutStream, 0x32) +{ + STDMETHOD(SetOutStream)(ISequentialOutStream *outStream) PURE; + STDMETHOD(ReleaseOutStream)() PURE; +}; + +CODER_INTERFACE(ICompressSetInStreamSize, 0x33) +{ + STDMETHOD(SetInStreamSize)(const UInt64 *inSize) PURE; +}; + +CODER_INTERFACE(ICompressSetOutStreamSize, 0x34) +{ + STDMETHOD(SetOutStreamSize)(const UInt64 *outSize) PURE; +}; + +CODER_INTERFACE(ICompressSetBufSize, 0x35) +{ + STDMETHOD(SetInBufSize)(UInt32 streamIndex, UInt32 size) PURE; + STDMETHOD(SetOutBufSize)(UInt32 streamIndex, UInt32 size) PURE; +}; + +CODER_INTERFACE(ICompressFilter, 0x40) +{ + STDMETHOD(Init)() PURE; + STDMETHOD_(UInt32, Filter)(Byte *data, UInt32 size) PURE; + // Filter converts as most as possible bytes + // Filter return outSize (UInt32) + // if (outSize <= size): Filter have converted outSize bytes + // if (outSize > size): Filter have not converted anything. + // and it needs at least outSize bytes to convert one block + // (it's for crypto block algorithms). +}; + +CODER_INTERFACE(ICompressCodecsInfo, 0x60) +{ + STDMETHOD(GetNumberOfMethods)(UInt32 *numMethods) PURE; + STDMETHOD(GetProperty)(UInt32 index, PROPID propID, PROPVARIANT *value) PURE; + STDMETHOD(CreateDecoder)(UInt32 index, const GUID *iid, void **coder) PURE; + STDMETHOD(CreateEncoder)(UInt32 index, const GUID *iid, void **coder) PURE; +}; +CODER_INTERFACE(ISetCompressCodecsInfo, 0x61) +{ + STDMETHOD(SetCompressCodecsInfo)(ICompressCodecsInfo *compressCodecsInfo) PURE; +}; + +CODER_INTERFACE(ICryptoProperties, 0x80) +{ + STDMETHOD(SetKey)(const Byte *data, UInt32 size) PURE; + STDMETHOD(SetInitVector)(const Byte *data, UInt32 size) PURE; +}; + +/* +CODER_INTERFACE(ICryptoResetSalt, 0x88) +{ + STDMETHOD(ResetSalt)() PURE; +}; +*/ + +CODER_INTERFACE(ICryptoResetInitVector, 0x8C) +{ + STDMETHOD(ResetInitVector)() PURE; +}; + +CODER_INTERFACE(ICryptoSetPassword, 0x90) +{ + STDMETHOD(CryptoSetPassword)(const Byte *data, UInt32 size) PURE; +}; + +CODER_INTERFACE(ICryptoSetCRC, 0xA0) +{ + STDMETHOD(CryptoSetCRC)(UInt32 crc) PURE; +}; + +////////////////////// +// It's for DLL file +namespace NMethodPropID +{ + enum EEnum + { + kID, + kName, + kDecoder, + kEncoder, + kInStreams, + kOutStreams, + kDescription, + kDecoderIsAssigned, + kEncoderIsAssigned + }; +} + +#endif diff --git a/CPP/7zip/IDecl.h b/CPP/7zip/IDecl.h new file mode 100644 index 0000000..8316eb3 --- /dev/null +++ b/CPP/7zip/IDecl.h @@ -0,0 +1,15 @@ +// IDecl.h + +#ifndef __IDECL_H +#define __IDECL_H + +#include "../Common/MyUnknown.h" + +#define DECL_INTERFACE_SUB(i, base, groupId, subId) \ +DEFINE_GUID(IID_ ## i, \ +0x23170F69, 0x40C1, 0x278A, 0, 0, 0, (groupId), 0, (subId), 0, 0); \ +struct i: public base + +#define DECL_INTERFACE(i, groupId, subId) DECL_INTERFACE_SUB(i, IUnknown, groupId, subId) + +#endif diff --git a/CPP/7zip/IPassword.h b/CPP/7zip/IPassword.h new file mode 100644 index 0000000..3ca7b09 --- /dev/null +++ b/CPP/7zip/IPassword.h @@ -0,0 +1,24 @@ +// IPassword.h + +#ifndef __IPASSWORD_H +#define __IPASSWORD_H + +#include "../Common/MyUnknown.h" +#include "../Common/Types.h" + +#include "IDecl.h" + +#define PASSWORD_INTERFACE(i, x) DECL_INTERFACE(i, 5, x) + +PASSWORD_INTERFACE(ICryptoGetTextPassword, 0x10) +{ + STDMETHOD(CryptoGetTextPassword)(BSTR *password) PURE; +}; + +PASSWORD_INTERFACE(ICryptoGetTextPassword2, 0x11) +{ + STDMETHOD(CryptoGetTextPassword2)(Int32 *passwordIsDefined, BSTR *password) PURE; +}; + +#endif + diff --git a/CPP/7zip/IProgress.h b/CPP/7zip/IProgress.h new file mode 100644 index 0000000..d6093f1 --- /dev/null +++ b/CPP/7zip/IProgress.h @@ -0,0 +1,33 @@ +// Interface/IProgress.h + +#ifndef __IPROGRESS_H +#define __IPROGRESS_H + +#include "../Common/MyUnknown.h" +#include "../Common/Types.h" + +#include "IDecl.h" + +#define INTERFACE_IProgress(x) \ + STDMETHOD(SetTotal)(UInt64 total) x; \ + STDMETHOD(SetCompleted)(const UInt64 *completeValue) x; \ + +DECL_INTERFACE(IProgress, 0, 5) +{ + INTERFACE_IProgress(PURE) +}; + +/* +// {23170F69-40C1-278A-0000-000000050002} +DEFINE_GUID(IID_IProgress2, +0x23170F69, 0x40C1, 0x278A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x02); +MIDL_INTERFACE("23170F69-40C1-278A-0000-000000050002") +IProgress2: public IUnknown +{ +public: + STDMETHOD(SetTotal)(const UInt64 *total) PURE; + STDMETHOD(SetCompleted)(const UInt64 *completeValue) PURE; +}; +*/ + +#endif diff --git a/CPP/7zip/IStream.h b/CPP/7zip/IStream.h new file mode 100644 index 0000000..165e8ba --- /dev/null +++ b/CPP/7zip/IStream.h @@ -0,0 +1,58 @@ +// IStream.h + +#ifndef __ISTREAM_H +#define __ISTREAM_H + +#include "../Common/MyUnknown.h" +#include "../Common/Types.h" + +#include "IDecl.h" + +#define STREAM_INTERFACE_SUB(i, base, x) DECL_INTERFACE_SUB(i, base, 3, x) +#define STREAM_INTERFACE(i, x) STREAM_INTERFACE_SUB(i, IUnknown, x) + +STREAM_INTERFACE(ISequentialInStream, 0x01) +{ + STDMETHOD(Read)(void *data, UInt32 size, UInt32 *processedSize) PURE; + /* + Out: if size != 0, return_value = S_OK and (*processedSize == 0), + then there are no more bytes in stream. + if (size > 0) && there are bytes in stream, + this function must read at least 1 byte. + This function is allowed to read less than number of remaining bytes in stream. + You must call Read function in loop, if you need exact amount of data + */ +}; + +STREAM_INTERFACE(ISequentialOutStream, 0x02) +{ + STDMETHOD(Write)(const void *data, UInt32 size, UInt32 *processedSize) PURE; + /* + if (size > 0) this function must write at least 1 byte. + This function is allowed to write less than "size". + You must call Write function in loop, if you need to write exact amount of data + */ +}; + +STREAM_INTERFACE_SUB(IInStream, ISequentialInStream, 0x03) +{ + STDMETHOD(Seek)(Int64 offset, UInt32 seekOrigin, UInt64 *newPosition) PURE; +}; + +STREAM_INTERFACE_SUB(IOutStream, ISequentialOutStream, 0x04) +{ + STDMETHOD(Seek)(Int64 offset, UInt32 seekOrigin, UInt64 *newPosition) PURE; + STDMETHOD(SetSize)(UInt64 newSize) PURE; +}; + +STREAM_INTERFACE(IStreamGetSize, 0x06) +{ + STDMETHOD(GetSize)(UInt64 *size) PURE; +}; + +STREAM_INTERFACE(IOutStreamFlush, 0x07) +{ + STDMETHOD(Flush)() PURE; +}; + +#endif diff --git a/CPP/7zip/MyVersion.h b/CPP/7zip/MyVersion.h new file mode 100644 index 0000000..3acfb83 --- /dev/null +++ b/CPP/7zip/MyVersion.h @@ -0,0 +1,11 @@ +#define MY_VER_MAJOR 9 +#define MY_VER_MINOR 20 +#define MY_VER_BUILD 0 +#define MY_VERSION "9.20" +#define MY_7ZIP_VERSION "7-Zip 9.20" +#define MY_DATE "2010-11-18" +#define MY_COPYRIGHT "Copyright (c) 1999-2010 Igor Pavlov" +#define MY_VERSION_COPYRIGHT_DATE MY_VERSION " " MY_COPYRIGHT " " MY_DATE + +#define P7ZIP_VERSION "9.20" + diff --git a/CPP/7zip/PREMAKE/generate.sh b/CPP/7zip/PREMAKE/generate.sh new file mode 100755 index 0000000..60241b9 --- /dev/null +++ b/CPP/7zip/PREMAKE/generate.sh @@ -0,0 +1,18 @@ +#!/bin/sh + +set -x + +doit() +{ + rm -fr P7ZIP.$1 + mkdir P7ZIP.$1 + cd P7ZIP.$1 + cp ../premake4.lua premake4.lua + ${HOME}/PREMAKE/premake4 $1 + cd .. +} + +doit codeblocks +doit codelite +doit gmake + diff --git a/CPP/7zip/PREMAKE/premake4.lua b/CPP/7zip/PREMAKE/premake4.lua new file mode 100644 index 0000000..8a5d318 --- /dev/null +++ b/CPP/7zip/PREMAKE/premake4.lua @@ -0,0 +1,263 @@ +-- A solution contains projects, and defines the available configurations +solution "p7zip" + configurations { "Debug", "Release" } + +-- includes for all projects + includedirs { + "../../../myWindows", + "../../../", + "../../../include_windows" + } + + configuration "Debug" + defines { "DEBUG", "_FILE_OFFSET_BITS=64", "_LARGEFILE_SOURCE", "_REENTRANT", "ENV_UNIX", "BREAK_HANDLER", "UNICODE", "_UNICODE" } + flags { "Symbols" } + + configuration "Release" + defines { "NDEBUG", "_FILE_OFFSET_BITS=64", "_LARGEFILE_SOURCE", "_REENTRANT", "ENV_UNIX", "BREAK_HANDLER", "UNICODE", "_UNICODE" } + flags { "Optimize" } + +--------------------------------- + project "all_c_code" + kind "StaticLib" + language "C" + files { + "../../../../C/Aes.c", + "../../../../C/7zStream.c", + "../../../../C/Alloc.c", + "../../../../C/Bra.c", + "../../../../C/Bra86.c", + "../../../../C/BraIA64.c", + "../../../../C/BwtSort.c", + "../../../../C/Delta.c", + "../../../../C/HuffEnc.c", + "../../../../C/LzFind.c", + "../../../../C/LzFindMt.c", + "../../../../C/Lzma2Dec.c", + "../../../../C/Lzma2Enc.c", + "../../../../C/LzmaDec.c", + "../../../../C/LzmaEnc.c", + "../../../../C/MtCoder.c", + "../../../../C/Ppmd7.c", + "../../../../C/Ppmd7Dec.c", + "../../../../C/Ppmd7Enc.c", + "../../../../C/Ppmd8.c", + "../../../../C/Ppmd8Dec.c", + "../../../../C/Ppmd8Enc.c", + "../../../../C/Sha256.c", + "../../../../C/Sort.c", + "../../../../C/Threads.c", + "../../../../C/Xz.c", + "../../../../C/XzCrc64.c", + "../../../../C/XzDec.c", + "../../../../C/XzEnc.c", + "../../../../C/XzIn.c", + + "../../../../C/7zCrc.c", + "../../../../C/7zCrcOpt.c" + } + +--------------------------------- + project "7za" + kind "ConsoleApp" + language "C++" + files { + "../../../myWindows/myGetTickCount.cpp", + "../../../myWindows/wine_date_and_time.cpp", + "../../../myWindows/myAddExeFlag.cpp", + "../../../myWindows/mySplitCommandLine.cpp", + + "../../UI/Console/BenchCon.cpp", + "../../UI/Console/ConsoleClose.cpp", + "../../UI/Console/ExtractCallbackConsole.cpp", + "../../UI/Console/List.cpp", + "../../UI/Console/Main.cpp", + "../../UI/Console/MainAr.cpp", + "../../UI/Console/OpenCallbackConsole.cpp", + "../../UI/Console/PercentPrinter.cpp", + "../../UI/Console/UpdateCallbackConsole.cpp", + "../../UI/Console/UserInputUtils.cpp", + + "../../../Common/CommandLineParser.cpp", + "../../../Common/CRC.cpp", + "../../../Common/IntToString.cpp", + "../../../Common/ListFileUtils.cpp", + "../../../Common/StdInStream.cpp", + "../../../Common/StdOutStream.cpp", + "../../../Common/MyString.cpp", + "../../../Common/MyWindows.cpp", + "../../../Common/StringConvert.cpp", + "../../../Common/StringToInt.cpp", + "../../../Common/UTFConvert.cpp", + "../../../Common/MyVector.cpp", + "../../../Common/Wildcard.cpp", + + "../../../Windows/Error.cpp", + "../../../Windows/FileDir.cpp", + "../../../Windows/FileFind.cpp", + "../../../Windows/FileIO.cpp", + "../../../Windows/FileName.cpp", + "../../../Windows/PropVariant.cpp", + "../../../Windows/PropVariantConversions.cpp", + "../../../Windows/Synchronization.cpp", + "../../../Windows/System.cpp", + "../../../Windows/Time.cpp", + + "../../Common/CreateCoder.cpp", + "../../Common/CWrappers.cpp", + "../../Common/FilePathAutoRename.cpp", + "../../Common/FileStreams.cpp", + "../../Common/FilterCoder.cpp", + "../../Common/InBuffer.cpp", + "../../Common/InOutTempBuffer.cpp", + "../../Common/LimitedStreams.cpp", + "../../Common/LockedStream.cpp", + "../../Common/MemBlocks.cpp", + "../../Common/MethodId.cpp", + "../../Common/MethodProps.cpp", + "../../Common/OffsetStream.cpp", + "../../Common/OutBuffer.cpp", + "../../Common/OutMemStream.cpp", + "../../Common/ProgressMt.cpp", + "../../Common/ProgressUtils.cpp", + "../../Common/StreamBinder.cpp", + "../../Common/StreamObjects.cpp", + "../../Common/StreamUtils.cpp", + "../../Common/VirtThread.cpp", + + "../../UI/Common/ArchiveCommandLine.cpp", + "../../UI/Common/ArchiveExtractCallback.cpp", + "../../UI/Common/ArchiveOpenCallback.cpp", + "../../UI/Common/Bench.cpp", + "../../UI/Common/DefaultName.cpp", + "../../UI/Common/EnumDirItems.cpp", + "../../UI/Common/Extract.cpp", + "../../UI/Common/ExtractingFilePath.cpp", + "../../UI/Common/LoadCodecs.cpp", + "../../UI/Common/OpenArchive.cpp", + "../../UI/Common/PropIDUtils.cpp", + "../../UI/Common/SetProperties.cpp", + "../../UI/Common/SortUtils.cpp", + "../../UI/Common/TempFiles.cpp", + "../../UI/Common/Update.cpp", + "../../UI/Common/UpdateAction.cpp", + "../../UI/Common/UpdateCallback.cpp", + "../../UI/Common/UpdatePair.cpp", + "../../UI/Common/UpdateProduce.cpp", + + "../../Archive/Bz2Handler.cpp", + "../../Archive/DeflateProps.cpp", + "../../Archive/GzHandler.cpp", + "../../Archive/LzmaHandler.cpp", + "../../Archive/PpmdHandler.cpp", + "../../Archive/SplitHandler.cpp", + "../../Archive/XzHandler.cpp", + "../../Archive/ZHandler.cpp", + + "../../Archive/Common/CoderMixer2.cpp", + "../../Archive/Common/CoderMixer2MT.cpp", + "../../Archive/Common/CrossThreadProgress.cpp", + "../../Archive/Common/DummyOutStream.cpp", + "../../Archive/Common/FindSignature.cpp", + "../../Archive/Common/HandlerOut.cpp", + "../../Archive/Common/InStreamWithCRC.cpp", + "../../Archive/Common/ItemNameUtils.cpp", + "../../Archive/Common/MultiStream.cpp", + "../../Archive/Common/OutStreamWithCRC.cpp", + "../../Archive/Common/ParseProperties.cpp", + + "../../Archive/7z/7zCompressionMode.cpp", + "../../Archive/7z/7zDecode.cpp", + "../../Archive/7z/7zEncode.cpp", + "../../Archive/7z/7zExtract.cpp", + "../../Archive/7z/7zFolderInStream.cpp", + "../../Archive/7z/7zFolderOutStream.cpp", + "../../Archive/7z/7zHandler.cpp", + "../../Archive/7z/7zHandlerOut.cpp", + "../../Archive/7z/7zHeader.cpp", + "../../Archive/7z/7zIn.cpp", + "../../Archive/7z/7zOut.cpp", + "../../Archive/7z/7zProperties.cpp", + "../../Archive/7z/7zSpecStream.cpp", + "../../Archive/7z/7zUpdate.cpp", + "../../Archive/7z/7zRegister.cpp", + + "../../Archive/Cab/CabBlockInStream.cpp", + "../../Archive/Cab/CabHandler.cpp", + "../../Archive/Cab/CabHeader.cpp", + "../../Archive/Cab/CabIn.cpp", + "../../Archive/Cab/CabRegister.cpp", + + "../../Archive/Tar/TarHandler.cpp", + "../../Archive/Tar/TarHandlerOut.cpp", + "../../Archive/Tar/TarHeader.cpp", + "../../Archive/Tar/TarIn.cpp", + "../../Archive/Tar/TarOut.cpp", + "../../Archive/Tar/TarRegister.cpp", + "../../Archive/Tar/TarUpdate.cpp", + + "../../Archive/Zip/ZipAddCommon.cpp", + "../../Archive/Zip/ZipHandler.cpp", + "../../Archive/Zip/ZipHandlerOut.cpp", + "../../Archive/Zip/ZipHeader.cpp", + "../../Archive/Zip/ZipIn.cpp", + "../../Archive/Zip/ZipItem.cpp", + "../../Archive/Zip/ZipOut.cpp", + "../../Archive/Zip/ZipUpdate.cpp", + "../../Archive/Zip/ZipRegister.cpp", + + "../../Compress/Bcj2Coder.cpp", + "../../Compress/Bcj2Register.cpp", + "../../Compress/BcjCoder.cpp", + "../../Compress/BcjRegister.cpp", + "../../Compress/BitlDecoder.cpp", + "../../Compress/BranchCoder.cpp", + "../../Compress/BranchMisc.cpp", + "../../Compress/BranchRegister.cpp", + "../../Compress/ByteSwap.cpp", + "../../Compress/BZip2Crc.cpp", + "../../Compress/BZip2Decoder.cpp", + "../../Compress/BZip2Encoder.cpp", + "../../Compress/BZip2Register.cpp", + "../../Compress/CopyCoder.cpp", + "../../Compress/CopyRegister.cpp", + "../../Compress/Deflate64Register.cpp", + "../../Compress/DeflateDecoder.cpp", + "../../Compress/DeflateEncoder.cpp", + "../../Compress/DeflateRegister.cpp", + "../../Compress/DeltaFilter.cpp", + "../../Compress/ImplodeDecoder.cpp", + "../../Compress/ImplodeHuffmanDecoder.cpp", + "../../Compress/Lzma2Decoder.cpp", + "../../Compress/Lzma2Encoder.cpp", + "../../Compress/Lzma2Register.cpp", + "../../Compress/LzmaDecoder.cpp", + "../../Compress/LzmaEncoder.cpp", + "../../Compress/LzmaRegister.cpp", + "../../Compress/LzOutWindow.cpp", + "../../Compress/Lzx86Converter.cpp", + "../../Compress/LzxDecoder.cpp", + "../../Compress/PpmdDecoder.cpp", + "../../Compress/PpmdEncoder.cpp", + "../../Compress/PpmdRegister.cpp", + "../../Compress/PpmdZip.cpp", + "../../Compress/QuantumDecoder.cpp", + "../../Compress/ShrinkDecoder.cpp", + "../../Compress/ZDecoder.cpp", + + "../../Crypto/7zAes.cpp", + "../../Crypto/7zAesRegister.cpp", + "../../Crypto/HmacSha1.cpp", + "../../Crypto/MyAes.cpp", + "../../Crypto/Pbkdf2HmacSha1.cpp", + "../../Crypto/RandGen.cpp", + "../../Crypto/Sha1.cpp", + "../../Crypto/WzAes.cpp", + "../../Crypto/ZipCrypto.cpp", + "../../Crypto/ZipStrong.cpp" + + } + + configuration "linux" + links { "all_c_code", "pthread" } + diff --git a/CPP/7zip/PropID.h b/CPP/7zip/PropID.h new file mode 100644 index 0000000..8f88852 --- /dev/null +++ b/CPP/7zip/PropID.h @@ -0,0 +1,76 @@ +// PropID.h + +#ifndef __7ZIP_PROPID_H +#define __7ZIP_PROPID_H + +enum +{ + kpidNoProperty = 0, + kpidMainSubfile = 1, + kpidHandlerItemIndex = 2, + kpidPath, + kpidName, + kpidExtension, + kpidIsDir, + kpidSize, + kpidPackSize, + kpidAttrib, + kpidCTime, + kpidATime, + kpidMTime, + kpidSolid, + kpidCommented, + kpidEncrypted, + kpidSplitBefore, + kpidSplitAfter, + kpidDictionarySize, + kpidCRC, + kpidType, + kpidIsAnti, + kpidMethod, + kpidHostOS, + kpidFileSystem, + kpidUser, + kpidGroup, + kpidBlock, + kpidComment, + kpidPosition, + kpidPrefix, + kpidNumSubDirs, + kpidNumSubFiles, + kpidUnpackVer, + kpidVolume, + kpidIsVolume, + kpidOffset, + kpidLinks, + kpidNumBlocks, + kpidNumVolumes, + kpidTimeType, + kpidBit64, + kpidBigEndian, + kpidCpu, + kpidPhySize, + kpidHeadersSize, + kpidChecksum, + kpidCharacts, + kpidVa, + kpidId, + kpidShortName, + kpidCreatorApp, + kpidSectorSize, + kpidPosixAttrib, + kpidLink, + kpidError, + + kpidTotalSize = 0x1100, + kpidFreeSpace, + kpidClusterSize, + kpidVolumeName, + + kpidLocalName = 0x1200, + kpidProvider, + + kpidUserDefined = 0x10000 +}; + +#endif diff --git a/CPP/7zip/QMAKE/7ZA/7ZA.pro b/CPP/7zip/QMAKE/7ZA/7ZA.pro new file mode 100644 index 0000000..ce9491c --- /dev/null +++ b/CPP/7zip/QMAKE/7ZA/7ZA.pro @@ -0,0 +1,228 @@ + +QT -= core \ + gui +TARGET = 7za.x +CONFIG += console +CONFIG -= app_bundle +TEMPLATE = app +SOURCES += \ + ../../../myWindows/myGetTickCount.cpp \ + ../../../myWindows/wine_date_and_time.cpp \ + ../../../myWindows/myAddExeFlag.cpp \ + ../../../myWindows/mySplitCommandLine.cpp \ + ../../UI/Console/BenchCon.cpp \ + ../../UI/Console/ConsoleClose.cpp \ + ../../UI/Console/ExtractCallbackConsole.cpp \ + ../../UI/Console/List.cpp \ + ../../UI/Console/Main.cpp \ + ../../UI/Console/MainAr.cpp \ + ../../UI/Console/OpenCallbackConsole.cpp \ + ../../UI/Console/PercentPrinter.cpp \ + ../../UI/Console/UpdateCallbackConsole.cpp \ + ../../UI/Console/UserInputUtils.cpp \ +\ + ../../../Common/CommandLineParser.cpp \ + ../../../Common/CRC.cpp \ + ../../../Common/IntToString.cpp \ + ../../../Common/ListFileUtils.cpp \ + ../../../Common/StdInStream.cpp \ + ../../../Common/StdOutStream.cpp \ + ../../../Common/MyString.cpp \ + ../../../Common/MyWindows.cpp \ + ../../../Common/StringConvert.cpp \ + ../../../Common/StringToInt.cpp \ + ../../../Common/UTFConvert.cpp \ + ../../../Common/MyVector.cpp \ + ../../../Common/Wildcard.cpp \ + ../../../Windows/Error.cpp \ + ../../../Windows/FileDir.cpp \ + ../../../Windows/FileFind.cpp \ + ../../../Windows/FileIO.cpp \ + ../../../Windows/FileName.cpp \ + ../../../Windows/PropVariant.cpp \ + ../../../Windows/PropVariantConversions.cpp \ + ../../../Windows/Synchronization.cpp \ + ../../../Windows/System.cpp \ + ../../../Windows/Time.cpp \ + ../../Common/CreateCoder.cpp \ + ../../Common/CWrappers.cpp \ + ../../Common/FilePathAutoRename.cpp \ + ../../Common/FileStreams.cpp \ + ../../Common/FilterCoder.cpp \ + ../../Common/InBuffer.cpp \ + ../../Common/InOutTempBuffer.cpp \ + ../../Common/LimitedStreams.cpp \ + ../../Common/LockedStream.cpp \ + ../../Common/MemBlocks.cpp \ + ../../Common/MethodId.cpp \ + ../../Common/MethodProps.cpp \ + ../../Common/OffsetStream.cpp \ + ../../Common/OutBuffer.cpp \ + ../../Common/OutMemStream.cpp \ + ../../Common/ProgressMt.cpp \ + ../../Common/ProgressUtils.cpp \ + ../../Common/StreamBinder.cpp \ + ../../Common/StreamObjects.cpp \ + ../../Common/StreamUtils.cpp \ + ../../Common/VirtThread.cpp \ + ../../UI/Common/ArchiveCommandLine.cpp \ + ../../UI/Common/ArchiveExtractCallback.cpp \ + ../../UI/Common/ArchiveOpenCallback.cpp \ + ../../UI/Common/Bench.cpp \ + ../../UI/Common/DefaultName.cpp \ + ../../UI/Common/EnumDirItems.cpp \ + ../../UI/Common/Extract.cpp \ + ../../UI/Common/ExtractingFilePath.cpp \ + ../../UI/Common/LoadCodecs.cpp \ + ../../UI/Common/OpenArchive.cpp \ + ../../UI/Common/PropIDUtils.cpp \ + ../../UI/Common/SetProperties.cpp \ + ../../UI/Common/SortUtils.cpp \ + ../../UI/Common/TempFiles.cpp \ + ../../UI/Common/Update.cpp \ + ../../UI/Common/UpdateAction.cpp \ + ../../UI/Common/UpdateCallback.cpp \ + ../../UI/Common/UpdatePair.cpp \ + ../../UI/Common/UpdateProduce.cpp \ + ../../Archive/Bz2Handler.cpp \ + ../../Archive/DeflateProps.cpp \ + ../../Archive/GzHandler.cpp \ + ../../Archive/LzmaHandler.cpp \ + ../../Archive/PpmdHandler.cpp \ + ../../Archive/SplitHandler.cpp \ + ../../Archive/XzHandler.cpp \ + ../../Archive/ZHandler.cpp \ + ../../Archive/Common/CoderMixer2.cpp \ + ../../Archive/Common/CoderMixer2MT.cpp \ + ../../Archive/Common/CrossThreadProgress.cpp \ + ../../Archive/Common/DummyOutStream.cpp \ + ../../Archive/Common/FindSignature.cpp \ + ../../Archive/Common/HandlerOut.cpp \ + ../../Archive/Common/InStreamWithCRC.cpp \ + ../../Archive/Common/ItemNameUtils.cpp \ + ../../Archive/Common/MultiStream.cpp \ + ../../Archive/Common/OutStreamWithCRC.cpp \ + ../../Archive/Common/ParseProperties.cpp \ + ../../Archive/7z/7zCompressionMode.cpp \ + ../../Archive/7z/7zDecode.cpp \ + ../../Archive/7z/7zEncode.cpp \ + ../../Archive/7z/7zExtract.cpp \ + ../../Archive/7z/7zFolderInStream.cpp \ + ../../Archive/7z/7zFolderOutStream.cpp \ + ../../Archive/7z/7zHandler.cpp \ + ../../Archive/7z/7zHandlerOut.cpp \ + ../../Archive/7z/7zHeader.cpp \ + ../../Archive/7z/7zIn.cpp \ + ../../Archive/7z/7zOut.cpp \ + ../../Archive/7z/7zProperties.cpp \ + ../../Archive/7z/7zSpecStream.cpp \ + ../../Archive/7z/7zUpdate.cpp \ + ../../Archive/7z/7zRegister.cpp \ + ../../Archive/Cab/CabBlockInStream.cpp \ + ../../Archive/Cab/CabHandler.cpp \ + ../../Archive/Cab/CabHeader.cpp \ + ../../Archive/Cab/CabIn.cpp \ + ../../Archive/Cab/CabRegister.cpp \ + ../../Archive/Tar/TarHandler.cpp \ + ../../Archive/Tar/TarHandlerOut.cpp \ + ../../Archive/Tar/TarHeader.cpp \ + ../../Archive/Tar/TarIn.cpp \ + ../../Archive/Tar/TarOut.cpp \ + ../../Archive/Tar/TarRegister.cpp \ + ../../Archive/Tar/TarUpdate.cpp \ + ../../Archive/Zip/ZipAddCommon.cpp \ + ../../Archive/Zip/ZipHandler.cpp \ + ../../Archive/Zip/ZipHandlerOut.cpp \ + ../../Archive/Zip/ZipHeader.cpp \ + ../../Archive/Zip/ZipIn.cpp \ + ../../Archive/Zip/ZipItem.cpp \ + ../../Archive/Zip/ZipOut.cpp \ + ../../Archive/Zip/ZipUpdate.cpp \ + ../../Archive/Zip/ZipRegister.cpp \ + ../../Compress/Bcj2Coder.cpp \ + ../../Compress/Bcj2Register.cpp \ + ../../Compress/BcjCoder.cpp \ + ../../Compress/BcjRegister.cpp \ + ../../Compress/BitlDecoder.cpp \ + ../../Compress/BranchCoder.cpp \ + ../../Compress/BranchMisc.cpp \ + ../../Compress/BranchRegister.cpp \ + ../../Compress/ByteSwap.cpp \ + ../../Compress/BZip2Crc.cpp \ + ../../Compress/BZip2Decoder.cpp \ + ../../Compress/BZip2Encoder.cpp \ + ../../Compress/BZip2Register.cpp \ + ../../Compress/CopyCoder.cpp \ + ../../Compress/CopyRegister.cpp \ + ../../Compress/Deflate64Register.cpp \ + ../../Compress/DeflateDecoder.cpp \ + ../../Compress/DeflateEncoder.cpp \ + ../../Compress/DeflateRegister.cpp \ + ../../Compress/DeltaFilter.cpp \ + ../../Compress/ImplodeDecoder.cpp \ + ../../Compress/ImplodeHuffmanDecoder.cpp \ + ../../Compress/Lzma2Decoder.cpp \ + ../../Compress/Lzma2Encoder.cpp \ + ../../Compress/Lzma2Register.cpp \ + ../../Compress/LzmaDecoder.cpp \ + ../../Compress/LzmaEncoder.cpp \ + ../../Compress/LzmaRegister.cpp \ + ../../Compress/LzOutWindow.cpp \ + ../../Compress/Lzx86Converter.cpp \ + ../../Compress/LzxDecoder.cpp \ + ../../Compress/PpmdDecoder.cpp \ + ../../Compress/PpmdEncoder.cpp \ + ../../Compress/PpmdRegister.cpp \ + ../../Compress/PpmdZip.cpp \ + ../../Compress/QuantumDecoder.cpp \ + ../../Compress/ShrinkDecoder.cpp \ + ../../Compress/ZDecoder.cpp \ + ../../Crypto/7zAes.cpp \ + ../../Crypto/7zAesRegister.cpp \ + ../../Crypto/HmacSha1.cpp \ + ../../Crypto/MyAes.cpp \ + ../../Crypto/Pbkdf2HmacSha1.cpp \ + ../../Crypto/RandGen.cpp \ + ../../Crypto/Sha1.cpp \ + ../../Crypto/WzAes.cpp \ + ../../Crypto/ZipCrypto.cpp \ + ../../Crypto/ZipStrong.cpp \ + ../../../../C/Aes.c \ + ../../../../C/7zStream.c \ + ../../../../C/Alloc.c \ + ../../../../C/Bra.c \ + ../../../../C/Bra86.c \ + ../../../../C/BraIA64.c \ + ../../../../C/BwtSort.c \ + ../../../../C/Delta.c \ + ../../../../C/HuffEnc.c \ + ../../../../C/LzFind.c \ + ../../../../C/LzFindMt.c \ + ../../../../C/Lzma2Dec.c \ + ../../../../C/Lzma2Enc.c \ + ../../../../C/LzmaDec.c \ + ../../../../C/LzmaEnc.c \ + ../../../../C/MtCoder.c \ + ../../../../C/Ppmd7.c \ + ../../../../C/Ppmd7Dec.c \ + ../../../../C/Ppmd7Enc.c \ + ../../../../C/Ppmd8.c \ + ../../../../C/Ppmd8Dec.c \ + ../../../../C/Ppmd8Enc.c \ + ../../../../C/Sha256.c \ + ../../../../C/Sort.c \ + ../../../../C/Threads.c \ + ../../../../C/Xz.c \ + ../../../../C/XzCrc64.c \ + ../../../../C/XzDec.c \ + ../../../../C/XzEnc.c \ + ../../../../C/XzIn.c \ + ../../../../C/7zCrc.c \ + ../../../../C/7zCrcOpt.c + + +INCLUDEPATH = ../../../myWindows \ + ../../../ \ + ../../../include_windows + +DEFINES += _FILE_OFFSET_BITS=64 _LARGEFILE_SOURCE NDEBUG _REENTRANT ENV_UNIX BREAK_HANDLER UNICODE _UNICODE diff --git a/CPP/7zip/QMAKE/7ZA/7ZA_osx.pro b/CPP/7zip/QMAKE/7ZA/7ZA_osx.pro new file mode 100644 index 0000000..dbfa195 --- /dev/null +++ b/CPP/7zip/QMAKE/7ZA/7ZA_osx.pro @@ -0,0 +1,228 @@ + +QT -= core \ + gui +TARGET = 7za.x +CONFIG += console +CONFIG -= app_bundle +TEMPLATE = app +SOURCES += \ + ../../../myWindows/myGetTickCount.cpp \ + ../../../myWindows/wine_date_and_time.cpp \ + ../../../myWindows/myAddExeFlag.cpp \ + ../../../myWindows/mySplitCommandLine.cpp \ + ../../UI/Console/BenchCon.cpp \ + ../../UI/Console/ConsoleClose.cpp \ + ../../UI/Console/ExtractCallbackConsole.cpp \ + ../../UI/Console/List.cpp \ + ../../UI/Console/Main.cpp \ + ../../UI/Console/MainAr.cpp \ + ../../UI/Console/OpenCallbackConsole.cpp \ + ../../UI/Console/PercentPrinter.cpp \ + ../../UI/Console/UpdateCallbackConsole.cpp \ + ../../UI/Console/UserInputUtils.cpp \ +\ + ../../../Common/CommandLineParser.cpp \ + ../../../Common/CRC.cpp \ + ../../../Common/IntToString.cpp \ + ../../../Common/ListFileUtils.cpp \ + ../../../Common/StdInStream.cpp \ + ../../../Common/StdOutStream.cpp \ + ../../../Common/MyString.cpp \ + ../../../Common/MyWindows.cpp \ + ../../../Common/StringConvert.cpp \ + ../../../Common/StringToInt.cpp \ + ../../../Common/UTFConvert.cpp \ + ../../../Common/MyVector.cpp \ + ../../../Common/Wildcard.cpp \ + ../../../Windows/Error.cpp \ + ../../../Windows/FileDir.cpp \ + ../../../Windows/FileFind.cpp \ + ../../../Windows/FileIO.cpp \ + ../../../Windows/FileName.cpp \ + ../../../Windows/PropVariant.cpp \ + ../../../Windows/PropVariantConversions.cpp \ + ../../../Windows/Synchronization.cpp \ + ../../../Windows/System.cpp \ + ../../../Windows/Time.cpp \ + ../../Common/CreateCoder.cpp \ + ../../Common/CWrappers.cpp \ + ../../Common/FilePathAutoRename.cpp \ + ../../Common/FileStreams.cpp \ + ../../Common/FilterCoder.cpp \ + ../../Common/InBuffer.cpp \ + ../../Common/InOutTempBuffer.cpp \ + ../../Common/LimitedStreams.cpp \ + ../../Common/LockedStream.cpp \ + ../../Common/MemBlocks.cpp \ + ../../Common/MethodId.cpp \ + ../../Common/MethodProps.cpp \ + ../../Common/OffsetStream.cpp \ + ../../Common/OutBuffer.cpp \ + ../../Common/OutMemStream.cpp \ + ../../Common/ProgressMt.cpp \ + ../../Common/ProgressUtils.cpp \ + ../../Common/StreamBinder.cpp \ + ../../Common/StreamObjects.cpp \ + ../../Common/StreamUtils.cpp \ + ../../Common/VirtThread.cpp \ + ../../UI/Common/ArchiveCommandLine.cpp \ + ../../UI/Common/ArchiveExtractCallback.cpp \ + ../../UI/Common/ArchiveOpenCallback.cpp \ + ../../UI/Common/Bench.cpp \ + ../../UI/Common/DefaultName.cpp \ + ../../UI/Common/EnumDirItems.cpp \ + ../../UI/Common/Extract.cpp \ + ../../UI/Common/ExtractingFilePath.cpp \ + ../../UI/Common/LoadCodecs.cpp \ + ../../UI/Common/OpenArchive.cpp \ + ../../UI/Common/PropIDUtils.cpp \ + ../../UI/Common/SetProperties.cpp \ + ../../UI/Common/SortUtils.cpp \ + ../../UI/Common/TempFiles.cpp \ + ../../UI/Common/Update.cpp \ + ../../UI/Common/UpdateAction.cpp \ + ../../UI/Common/UpdateCallback.cpp \ + ../../UI/Common/UpdatePair.cpp \ + ../../UI/Common/UpdateProduce.cpp \ + ../../Archive/Bz2Handler.cpp \ + ../../Archive/DeflateProps.cpp \ + ../../Archive/GzHandler.cpp \ + ../../Archive/LzmaHandler.cpp \ + ../../Archive/PpmdHandler.cpp \ + ../../Archive/SplitHandler.cpp \ + ../../Archive/XzHandler.cpp \ + ../../Archive/ZHandler.cpp \ + ../../Archive/Common/CoderMixer2.cpp \ + ../../Archive/Common/CoderMixer2MT.cpp \ + ../../Archive/Common/CrossThreadProgress.cpp \ + ../../Archive/Common/DummyOutStream.cpp \ + ../../Archive/Common/FindSignature.cpp \ + ../../Archive/Common/HandlerOut.cpp \ + ../../Archive/Common/InStreamWithCRC.cpp \ + ../../Archive/Common/ItemNameUtils.cpp \ + ../../Archive/Common/MultiStream.cpp \ + ../../Archive/Common/OutStreamWithCRC.cpp \ + ../../Archive/Common/ParseProperties.cpp \ + ../../Archive/7z/7zCompressionMode.cpp \ + ../../Archive/7z/7zDecode.cpp \ + ../../Archive/7z/7zEncode.cpp \ + ../../Archive/7z/7zExtract.cpp \ + ../../Archive/7z/7zFolderInStream.cpp \ + ../../Archive/7z/7zFolderOutStream.cpp \ + ../../Archive/7z/7zHandler.cpp \ + ../../Archive/7z/7zHandlerOut.cpp \ + ../../Archive/7z/7zHeader.cpp \ + ../../Archive/7z/7zIn.cpp \ + ../../Archive/7z/7zOut.cpp \ + ../../Archive/7z/7zProperties.cpp \ + ../../Archive/7z/7zSpecStream.cpp \ + ../../Archive/7z/7zUpdate.cpp \ + ../../Archive/7z/7zRegister.cpp \ + ../../Archive/Cab/CabBlockInStream.cpp \ + ../../Archive/Cab/CabHandler.cpp \ + ../../Archive/Cab/CabHeader.cpp \ + ../../Archive/Cab/CabIn.cpp \ + ../../Archive/Cab/CabRegister.cpp \ + ../../Archive/Tar/TarHandler.cpp \ + ../../Archive/Tar/TarHandlerOut.cpp \ + ../../Archive/Tar/TarHeader.cpp \ + ../../Archive/Tar/TarIn.cpp \ + ../../Archive/Tar/TarOut.cpp \ + ../../Archive/Tar/TarRegister.cpp \ + ../../Archive/Tar/TarUpdate.cpp \ + ../../Archive/Zip/ZipAddCommon.cpp \ + ../../Archive/Zip/ZipHandler.cpp \ + ../../Archive/Zip/ZipHandlerOut.cpp \ + ../../Archive/Zip/ZipHeader.cpp \ + ../../Archive/Zip/ZipIn.cpp \ + ../../Archive/Zip/ZipItem.cpp \ + ../../Archive/Zip/ZipOut.cpp \ + ../../Archive/Zip/ZipUpdate.cpp \ + ../../Archive/Zip/ZipRegister.cpp \ + ../../Compress/Bcj2Coder.cpp \ + ../../Compress/Bcj2Register.cpp \ + ../../Compress/BcjCoder.cpp \ + ../../Compress/BcjRegister.cpp \ + ../../Compress/BitlDecoder.cpp \ + ../../Compress/BranchCoder.cpp \ + ../../Compress/BranchMisc.cpp \ + ../../Compress/BranchRegister.cpp \ + ../../Compress/ByteSwap.cpp \ + ../../Compress/BZip2Crc.cpp \ + ../../Compress/BZip2Decoder.cpp \ + ../../Compress/BZip2Encoder.cpp \ + ../../Compress/BZip2Register.cpp \ + ../../Compress/CopyCoder.cpp \ + ../../Compress/CopyRegister.cpp \ + ../../Compress/Deflate64Register.cpp \ + ../../Compress/DeflateDecoder.cpp \ + ../../Compress/DeflateEncoder.cpp \ + ../../Compress/DeflateRegister.cpp \ + ../../Compress/DeltaFilter.cpp \ + ../../Compress/ImplodeDecoder.cpp \ + ../../Compress/ImplodeHuffmanDecoder.cpp \ + ../../Compress/Lzma2Decoder.cpp \ + ../../Compress/Lzma2Encoder.cpp \ + ../../Compress/Lzma2Register.cpp \ + ../../Compress/LzmaDecoder.cpp \ + ../../Compress/LzmaEncoder.cpp \ + ../../Compress/LzmaRegister.cpp \ + ../../Compress/LzOutWindow.cpp \ + ../../Compress/Lzx86Converter.cpp \ + ../../Compress/LzxDecoder.cpp \ + ../../Compress/PpmdDecoder.cpp \ + ../../Compress/PpmdEncoder.cpp \ + ../../Compress/PpmdRegister.cpp \ + ../../Compress/PpmdZip.cpp \ + ../../Compress/QuantumDecoder.cpp \ + ../../Compress/ShrinkDecoder.cpp \ + ../../Compress/ZDecoder.cpp \ + ../../Crypto/7zAes.cpp \ + ../../Crypto/7zAesRegister.cpp \ + ../../Crypto/HmacSha1.cpp \ + ../../Crypto/MyAes.cpp \ + ../../Crypto/Pbkdf2HmacSha1.cpp \ + ../../Crypto/RandGen.cpp \ + ../../Crypto/Sha1.cpp \ + ../../Crypto/WzAes.cpp \ + ../../Crypto/ZipCrypto.cpp \ + ../../Crypto/ZipStrong.cpp \ + ../../../../C/Aes.c \ + ../../../../C/7zStream.c \ + ../../../../C/Alloc.c \ + ../../../../C/Bra.c \ + ../../../../C/Bra86.c \ + ../../../../C/BraIA64.c \ + ../../../../C/BwtSort.c \ + ../../../../C/Delta.c \ + ../../../../C/HuffEnc.c \ + ../../../../C/LzFind.c \ + ../../../../C/LzFindMt.c \ + ../../../../C/Lzma2Dec.c \ + ../../../../C/Lzma2Enc.c \ + ../../../../C/LzmaDec.c \ + ../../../../C/LzmaEnc.c \ + ../../../../C/MtCoder.c \ + ../../../../C/Ppmd7.c \ + ../../../../C/Ppmd7Dec.c \ + ../../../../C/Ppmd7Enc.c \ + ../../../../C/Ppmd8.c \ + ../../../../C/Ppmd8Dec.c \ + ../../../../C/Ppmd8Enc.c \ + ../../../../C/Sha256.c \ + ../../../../C/Sort.c \ + ../../../../C/Threads.c \ + ../../../../C/Xz.c \ + ../../../../C/XzCrc64.c \ + ../../../../C/XzDec.c \ + ../../../../C/XzEnc.c \ + ../../../../C/XzIn.c \ + ../../../../C/7zCrc.c \ + ../../../../C/7zCrcOpt.c + + +INCLUDEPATH = ../../../myWindows \ + ../../../ \ + ../../../include_windows + +DEFINES += _FILE_OFFSET_BITS=64 _LARGEFILE_SOURCE NDEBUG _REENTRANT ENV_UNIX BREAK_HANDLER UNICODE _UNICODE ENV_MACOSX diff --git a/CPP/7zip/QMAKE/test_emul/test_emul.pro b/CPP/7zip/QMAKE/test_emul/test_emul.pro new file mode 100644 index 0000000..5f7c95a --- /dev/null +++ b/CPP/7zip/QMAKE/test_emul/test_emul.pro @@ -0,0 +1,26 @@ + +QT -= core \ + gui +TARGET = test_emul.x +CONFIG += console +CONFIG -= app_bundle +TEMPLATE = app +SOURCES += \ + ../../../myWindows/myGetTickCount.cpp \ + ../../../myWindows/wine_date_and_time.cpp \ + ../../../myWindows/myAddExeFlag.cpp \ + ../../../myWindows/mySplitCommandLine.cpp \ + ../../../myWindows/wine_GetXXXDefaultLangID.cpp \ + ../../../myWindows/test_emul.cpp \ + ../../../Common/MyString.cpp \ + ../../../Common/MyWindows.cpp \ + ../../../Common/MyVector.cpp \ + ../../../../C/7zCrc.c \ + ../../../../C/7zCrcOpt.c + + +INCLUDEPATH = ../../../myWindows \ + ../../../ \ + ../../../include_windows + +DEFINES += _FILE_OFFSET_BITS=64 _LARGEFILE_SOURCE NDEBUG _REENTRANT ENV_UNIX BREAK_HANDLER UNICODE _UNICODE diff --git a/CPP/7zip/TEST/TestUI/TestUI.cpp b/CPP/7zip/TEST/TestUI/TestUI.cpp new file mode 100644 index 0000000..2526aa8 --- /dev/null +++ b/CPP/7zip/TEST/TestUI/TestUI.cpp @@ -0,0 +1,560 @@ +// wxGUI.cpp + +#include "StdAfx.h" + +// For compilers that support precompilation, includes "wx/wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +// for all others, include the necessary headers (this file is usually all you +// need because it includes almost all "standard" wxWidgets headers) +#ifndef WX_PRECOMP + #include "wx/wx.h" +#endif + +#undef _WIN32 + +#ifdef __WXMAC__ + +#define UInt32 max_UInt32 +#include +#undef UInt32 + +#endif + +#define static const +#include "../GUI/p7zip_32.xpm" +#undef static + +#undef ACTIVATE_DIALOG_TESTS + +#include "../../UI/FileManager/PasswordDialog.h" + +#include "Windows/Window.h" +#include "Windows/Control/DialogImpl.h" + +wxWindow * g_window=0; + +static pthread_t g_main_thread; + +bool is_main_thread(void) +{ + return ( g_main_thread == pthread_self() ); +} + +void verify_main_thread(void) +{ + if ( ! is_main_thread() ) + { + printf("verify_main_thread-wxGUI\n"); + abort(); + } +} + + +struct CIDLangPair +{ + int ControlID; + UInt32 LangID; +}; + + +void LangSetWindowText(HWND window, UInt32 langID) +{ + +} + +void LangSetDlgItemsText(HWND dialogWindow, CIDLangPair *idLangPairs, int numItems) +{ + +} + + +#if 0 + +int Main1(int argc,TCHAR **argv); + +#include "Windows/Registry.h" +using namespace NWindows; +using namespace NRegistry; + + +#include "Common/StringConvert.h" +#include "Windows/FileDir.h" +#include "Windows/Synchronization.h" + +#include "ExtractRes.h" +#include "../Explorer/MyMessages.h" + +#include "ExtractGUI.h" +#include "UpdateGUI.h" +#include "BenchmarkDialog.h" +#include "../FileManager/RegistryUtils.h" + +using namespace NWindows; +using namespace NFile; + +////////////////////////////// TRIES /////////////////////////////////// + +#ifdef ACTIVATE_DIALOG_TESTS +static void ErrorMessage(const wchar_t *message) +{ + MessageBox(0,message, wxT("7-Zip GUI"),wxICON_ERROR); +} + +#include "../FileManager/PasswordDialog.h" +#include "../FileManager/MessagesDialog.h" +#include "../FileManager/OverwriteDialog.h" +#include "Windows/Thread.h" + +void testCMessagesDialog() +{ + UStringVector Messages; + + Messages.Add(L"message 1"); + Messages.Add(L"message 2"); + Messages.Add(L"message 3"); + Messages.Add(L"message 4"); + Messages.Add(L"message 5"); + Messages.Add(L"message 6"); + Messages.Add(L"message 7"); + Messages.Add(L"message 8"); + Messages.Add(L"message 9"); + + CMessagesDialog messagesDialog; + messagesDialog.Messages = &Messages; + int ret = messagesDialog.Create( 0 ); // ParentWindow + + if (ret == IDOK) myErrorMsg(wxT("CMessagesDialog => IDOK")); + else if (ret == IDCANCEL) myErrorMsg(wxT("CMessagesDialog => IDCANCEL")); + else myErrorMsg(wxT("CMessagesDialog => ?")); + +} + +void testCOverwriteDialog() +{ +SYSTEMTIME systemTime; +GetSystemTime( &systemTime ); + + +const wchar_t *existName = L"existName"; +FILETIME data_existTime; +FILETIME *existTime = &data_existTime ; +UInt64 data_existSize = 1234; +UInt64 *existSize = &data_existSize; +const wchar_t *newName = L"newName"; +FILETIME data_newTime; +FILETIME *newTime = &data_newTime; +UInt64 data_newSize = 45678; +UInt64 *newSize = &data_newSize; +Int32 data_answer=0; +Int32 *answer = &data_answer; + +SystemTimeToFileTime( &systemTime , &data_existTime); +SystemTimeToFileTime( &systemTime , &data_newTime); + + COverwriteDialog dialog; + + dialog.OldFileInfo.Time = *existTime; + dialog.OldFileInfo.TimeIsDefined = true; // FIXME : look again at the sample ! + + dialog.OldFileInfo.SizeIsDefined = (existSize != NULL); + if (dialog.OldFileInfo.SizeIsDefined) + dialog.OldFileInfo.Size = *existSize; + dialog.OldFileInfo.Name = existName; + + if (newTime == 0) + dialog.NewFileInfo.TimeIsDefined = false; + else + { + dialog.NewFileInfo.TimeIsDefined = true; + dialog.NewFileInfo.Time = *newTime; + } + + dialog.NewFileInfo.SizeIsDefined = (newSize != NULL); + if (dialog.NewFileInfo.SizeIsDefined) + dialog.NewFileInfo.Size = *newSize; + dialog.NewFileInfo.Name = newName; + + /* + NOverwriteDialog::NResult::EEnum writeAnswer = + NOverwriteDialog::Execute(oldFileInfo, newFileInfo); + */ + INT_PTR writeAnswer = dialog.Create(NULL); // ParentWindow doesn't work with 7z + + switch(writeAnswer) + { + case IDCANCEL: myErrorMsg(wxT("COverwriteDialog => IDCANCEL")); break; + case IDNO: myErrorMsg(wxT("COverwriteDialog => IDNO")); break; + case IDC_BUTTON_OVERWRITE_NO_TO_ALL: myErrorMsg(wxT("COverwriteDialog => IDC_BUTTON_OVERWRITE_NO_TO_ALL")); break; + case IDC_BUTTON_OVERWRITE_YES_TO_ALL:myErrorMsg(wxT("COverwriteDialog => IDC_BUTTON_OVERWRITE_YES_TO_ALL")); break; + case IDC_BUTTON_OVERWRITE_AUTO_RENAME:myErrorMsg(wxT("COverwriteDialog => IDC_BUTTON_OVERWRITE_AUTO_RENAME")); break; + case IDYES: myErrorMsg(wxT("COverwriteDialog => IDYES")); break; + default: myErrorMsg(wxT("COverwriteDialog => default")); break; + } +} + +struct CThreadProgressDialog +{ + CProgressDialog * ProgressDialog; + static THREAD_FUNC_DECL MyThreadFunction(void *param) + { + ((CThreadProgressDialog *)param)->Result = ((CThreadProgressDialog *)param)->Process(); + return 0; + } + HRESULT Result; + HRESULT Process() + { + Sleep(1000); + int total = 1000; + + ProgressDialog->ProgressSynch.SetTitleFileName(L"SetTitleFileName"); + ProgressDialog->ProgressSynch.SetNumFilesTotal(100); + ProgressDialog->ProgressSynch.SetNumFilesCur(1); + ProgressDialog->ProgressSynch.SetProgress(total, 0); + // ProgressDialog.ProgressSynch.SetRatioInfo(inSize, outSize); + // ProgressDialog.ProgressSynch.SetCurrentFileName(name); + + ProgressDialog->ProgressSynch.SetPos(total/10); + ProgressDialog->ProgressSynch.SetCurrentFileName(L"File1"); + Sleep(1000); + ProgressDialog->ProgressSynch.SetPos(total/2); + ProgressDialog->ProgressSynch.SetCurrentFileName(L"File2"); + Sleep(1000); + ProgressDialog->ProgressSynch.SetPos(total); + ProgressDialog->ProgressSynch.SetCurrentFileName(L"File3"); + Sleep(1000); + ProgressDialog->MyClose(); + return 0; + } +}; + +void testCProgressDialog() +{ + CProgressDialog ProgressDialog; + + CThreadProgressDialog benchmarker; + benchmarker.ProgressDialog = &ProgressDialog; + NWindows::CThread thread; + thread.Create(CThreadProgressDialog::MyThreadFunction, &benchmarker); + + // void StartProgressDialog(const UString &title) + int ret = ProgressDialog.Create(L"testCProgressDialog", 0); + + if (ret == IDOK) myErrorMsg(wxT("CProgressDialog => IDOK")); + else if (ret == IDCANCEL) myErrorMsg(wxT("CProgressDialog => IDCANCEL")); + else myErrorMsg(wxT("CProgressDialog => ?")); + +} + +void testDialog(int num) +{ + NWindows::NControl::CModalDialog dialog; + + printf("Generic Dialog(%d)\n",num); + int ret = dialog.Create(num, 0); + if (ret == IDOK) myErrorMsg(wxT("Generic Dialog => IDOK")); + else if (ret == IDCANCEL) myErrorMsg(wxT("Generic Dialog => IDCANCEL")); + else myErrorMsg(wxT("Generic Dialog => ?")); +} + +void testMessageBox() +{ + int ret = MessageBoxW(0, L"test yes/no/cancel", + L"7-Zip", MB_YESNOCANCEL | MB_ICONQUESTION | MB_TASKMODAL); + if (ret == IDYES) myErrorMsg(wxT("MessageBoxW => IDYES")); + else if (ret == IDNO) myErrorMsg(wxT("MessageBoxW => IDNO")); + else if (ret == IDCANCEL) myErrorMsg(wxT("MessageBoxW => IDCANCEL")); + else myErrorMsg(wxT("MessageBoxW => ?")); +} + +static void testRegistry() +{ + SaveRegLang(L"fr"); + + UString langFile; + ReadRegLang(langFile); + + printf("testRegistry : -%ls-\n",(const wchar_t *)langFile); +} + + +int Main2(int argc,TCHAR **argv); + +int Main3(int argc,wxChar **argv) +{ + testRegistry(); + + int num = -1; + + if (argc >=2 ) + { + num = argv[1][0] - L'0'; + } + printf("num=%d\n",num); + + + switch(num) + { + case 0: + { + TCHAR **argv2 = (TCHAR **)calloc(argc,sizeof(*argv)); + + argv2[0] = argv[0]; + for(int i = 2; i < argc; i++) argv2[i-1] = argv[i]; + + return Main2(argc-1,argv2); + } + // TODO Benchmark + // TODO CCompressDialog + // TODO CExtractDialog ? + case 1 : testCMessagesDialog(); break; + case 2 : testCOverwriteDialog(); break; + case 3 : testCPasswordDialog(); break; + case 4 : testCProgressDialog(); break; + case 5 : testMessageBox(); break; + case 9 : + if (argc >= 3) + { + AString str = GetAnsiString(argv[2]); + int num = atoi((const char*)str); + testDialog(num); + } + else + { + printf("usage : 7zG 9 \n"); + } + break; + default : + printf("usage : 7zG number\n"); + + }; + + return 0; +} + +#endif // ACTIVATE_DIALOG_TESTS + +////////////////////////////////// + +#define NEED_NAME_WINDOWS_TO_UNIX +#include "myPrivate.h" // global_use_utf16_conversion + +void mySplitCommandLineW(int numArguments, TCHAR **arguments,UStringVector &parts) { + + parts.Clear(); + for(int ind=0;ind < numArguments; ind++) { + UString tmp = arguments[ind]; + // tmp.Trim(); " " is a valid filename ... + if (!tmp.IsEmpty()) { + parts.Add(tmp); +// DEBUG printf("ARG %d : '%ls'\n",ind,(const wchar_t *)tmp); + } + } +} + +#endif + +void myErrorMsg(const wchar_t *message) +{ + MessageBox(0,message, wxT("Message"),wxICON_ERROR); +} + + +void testCPasswordDialog() +{ + CPasswordDialog dialog; + + int ret = dialog.Create(0); + if (ret == IDOK) { + UString Password = dialog.Password; + UString msg = wxT("CPasswordDialog => IDOK password=\""); + msg += Password; + msg += wxT("\""); + myErrorMsg(msg); + } + else if (ret == IDCANCEL) myErrorMsg(wxT("CPasswordDialog => IDCANCEL")); + else myErrorMsg(wxT("CPasswordDialog => ?")); + +} + + +int Main3(int argc,wxChar **argv) +{ + testCPasswordDialog(); +/* + testRegistry(); + + int num = -1; + + if (argc >=2 ) + { + num = argv[1][0] - L'0'; + } + printf("num=%d\n",num); + + + switch(num) + { + case 0: + { + TCHAR **argv2 = (TCHAR **)calloc(argc,sizeof(*argv)); + + argv2[0] = argv[0]; + for(int i = 2; i < argc; i++) argv2[i-1] = argv[i]; + + return Main2(argc-1,argv2); + } + // TODO Benchmark + // TODO CCompressDialog + // TODO CExtractDialog ? + case 1 : testCMessagesDialog(); break; + case 2 : testCOverwriteDialog(); break; + case 3 : testCPasswordDialog(); break; + case 4 : testCProgressDialog(); break; + case 5 : testMessageBox(); break; + case 9 : + if (argc >= 3) + { + AString str = GetAnsiString(argv[2]); + int num = atoi((const char*)str); + testDialog(num); + } + else + { + printf("usage : 7zG 9 \n"); + } + break; + default : + printf("usage : 7zG number\n"); + + }; +*/ + return 0; +} + +// ---------------------------------------------------------------------------- +// private classes +// ---------------------------------------------------------------------------- + +// Define a new frame type +class MyFrame: public wxFrame +{ +public: + // ctor + MyFrame(wxFrame *frame, const wxString& title, int x, int y, int w, int h); + // virtual ~MyFrame(); + + // operations + void WriteText(const wxString& text) { m_txtctrl->WriteText(text); } + +protected: + // callbacks + void OnWorkerEvent(wxCommandEvent& event); +private: + // just some place to put our messages in + wxTextCtrl *m_txtctrl; + DECLARE_EVENT_TABLE() +}; + +BEGIN_EVENT_TABLE(MyFrame, wxFrame) + EVT_MENU(WORKER_EVENT, MyFrame::OnWorkerEvent) + // EVT_IDLE(MyFrame::OnIdle) +END_EVENT_TABLE() + +// My frame constructor +MyFrame::MyFrame(wxFrame *frame, const wxString& title, + int x, int y, int w, int h) + : wxFrame(frame, wxID_ANY, title, wxPoint(x, y), wxSize(w, h)) +{ + this->SetIcon(wxICON(p7zip_32)); + +#if wxUSE_STATUSBAR + CreateStatusBar(2); +#endif // wxUSE_STATUSBAR + + m_txtctrl = new wxTextCtrl(this, wxID_ANY, _T(""), wxPoint(0, 0), wxSize(0, 0), wxTE_MULTILINE | wxTE_READONLY); +} + +void myCreateHandle(int n); + +void MyFrame::OnWorkerEvent(wxCommandEvent& event) +{ + int n = event.GetInt(); + myCreateHandle(n); +} + + +// Define a new application type, each program should derive a class from wxApp +class MyApp : public wxApp +{ +public: + // override base class virtuals + // ---------------------------- + + // this one is called on application startup and is a good place for the app + // initialization (doing it here and not in the ctor allows to have an error + // return: if OnInit() returns false, the application terminates) + virtual bool OnInit(); +}; + +// Create a new application object: this macro will allow wxWidgets to create +// the application object during program execution (it's better than using a +// static object for many reasons) and also implements the accessor function +// wxGetApp() which will return the reference of the right type (i.e. MyApp and +// not wxApp) +IMPLEMENT_APP(MyApp) + +class MyThread : public wxThread +{ + int _argc; + TCHAR **_argv; +public: + MyThread(int argc,TCHAR **argv): wxThread(),_argc(argc), _argv(argv) {} + + // thread execution starts here + virtual void *Entry() + { + int ret = Main3(_argc,_argv); + exit(ret); + } +}; + +// 'Main program' equivalent: the program execution "starts" here +bool MyApp::OnInit() +{ + // don't parse the command-line options ! + // : if ( !wxApp::OnInit() ) return false; + +#ifdef __WXMAC__ +ProcessSerialNumber PSN; +GetCurrentProcess(&PSN); +TransformProcessType(&PSN,kProcessTransformToForegroundApplication); +#endif + +g_main_thread = pthread_self(); + + // DEBUG printf("MAIN Thread : 0x%lx\n",wxThread::GetCurrentId()); + + // Create the main frame window + MyFrame *frame = new MyFrame((wxFrame *)NULL, _T("7-zip Main Window"), 50, 50, 450, 340); + // Don't Show the frame ! + // frame->Show(true); + + g_window = frame; + + SetTopWindow(frame); + + MyThread *thread = new MyThread(wxApp::argc,wxApp::argv); + thread->Create(); // != wxTHREAD_NO_ERROR + thread->Run(); + + // success: wxApp::OnRun() will be called which will enter the main message + // loop and the application will run. If we returned false here, the + // application would exit immediately. + return true; +} + diff --git a/CPP/7zip/TEST/TestUI/makefile b/CPP/7zip/TEST/TestUI/makefile new file mode 100644 index 0000000..415f8af --- /dev/null +++ b/CPP/7zip/TEST/TestUI/makefile @@ -0,0 +1,33 @@ +PROG=../../../../bin/TestUI$(BINSUFFIX) + +LOCAL_FLAGS=\ + -DUNICODE -D_UNICODE \ + -DLANG \ + -DEXTERNAL_LZMA \ + -DEXTERNAL_CODECS \ + -DBENCH_MT \ + -I. \ + `wx-config --unicode=yes --cxxflags` + +include ../../../../makefile.crc32 +include ../../../../makefile.machine + +PCH_NAME=$(PRE_COMPILED_HEADER) + +LIBS=`wx-config --unicode=yes --libs` $(LOCAL_LIBS_DLL) + +C_OBJS = \ + Threads.o \ + +OBJS=\ +PasswordDialog.o \ +PasswordDialog_rc.o \ +Window.o \ +Dialog.o \ +Controls.o \ + $(C_OBJS) \ +TestUI.o + + +include ../../../../makefile.glb + diff --git a/CPP/7zip/TEST/TestUI/makefile.depend b/CPP/7zip/TEST/TestUI/makefile.depend new file mode 100644 index 0000000..e74900e --- /dev/null +++ b/CPP/7zip/TEST/TestUI/makefile.depend @@ -0,0 +1,577 @@ +PasswordDialog.o: ../../UI/FileManager/PasswordDialog.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../UI/FileManager/PasswordDialog.h ../../../Windows/Control/Dialog.h \ + ../../../Windows/Window.h ../../../Windows/Defs.h \ + ../../../Windows/../Common/MyWindows.h ../../../Common/MyString.h \ + ../../../Common/MyVector.h ../../../Common/Defs.h \ + ../../../Windows/Control/Edit.h \ + ../../UI/FileManager/PasswordDialogRes.h \ + ../../UI/FileManager/LangUtils.h ../../../Common/Lang.h \ + ../../../Common/MyString.h ../../../Windows/ResourceString.h +PasswordDialog_rc.o: ../../UI/FileManager/PasswordDialog_rc.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + /usr/include/wx-2.8/wx/wxprec.h /usr/include/wx-2.8/wx/defs.h \ + /usr/include/wx-2.8/wx/platform.h \ + /usr/lib/wx/include/gtk2-unicode-release-2.8/wx/setup.h \ + /usr/include/wx-2.8/wx/chkconf.h /usr/include/wx-2.8/wx/features.h \ + /usr/include/wx-2.8/wx/version.h /usr/include/wx-2.8/wx/cpp.h \ + /usr/include/wx-2.8/wx/dlimpexp.h /usr/include/wx-2.8/wx/debug.h \ + /usr/include/wx-2.8/wx/wxchar.h /usr/include/wx-2.8/wx/wx.h \ + /usr/include/wx-2.8/wx/object.h /usr/include/wx-2.8/wx/memory.h \ + /usr/include/wx-2.8/wx/string.h /usr/include/wx-2.8/wx/buffer.h \ + /usr/include/wx-2.8/wx/strconv.h /usr/include/wx-2.8/wx/fontenc.h \ + /usr/include/wx-2.8/wx/beforestd.h /usr/include/wx-2.8/wx/afterstd.h \ + /usr/include/wx-2.8/wx/iosfwrap.h /usr/include/wx-2.8/wx/msgout.h \ + /usr/include/wx-2.8/wx/dynarray.h /usr/include/wx-2.8/wx/list.h \ + /usr/include/wx-2.8/wx/hash.h /usr/include/wx-2.8/wx/hashmap.h \ + /usr/include/wx-2.8/wx/arrstr.h /usr/include/wx-2.8/wx/intl.h \ + /usr/include/wx-2.8/wx/log.h /usr/include/wx-2.8/wx/generic/logg.h \ + /usr/include/wx-2.8/wx/event.h /usr/include/wx-2.8/wx/clntdata.h \ + /usr/include/wx-2.8/wx/vector.h /usr/include/wx-2.8/wx/gdicmn.h \ + /usr/include/wx-2.8/wx/math.h /usr/include/wx-2.8/wx/cursor.h \ + /usr/include/wx-2.8/wx/gtk/cursor.h /usr/include/wx-2.8/wx/utils.h \ + /usr/include/wx-2.8/wx/filefn.h /usr/include/wx-2.8/wx/longlong.h \ + /usr/include/wx-2.8/wx/platinfo.h /usr/include/wx-2.8/wx/thread.h \ + /usr/include/wx-2.8/wx/app.h /usr/include/wx-2.8/wx/build.h \ + /usr/include/wx-2.8/wx/init.h /usr/include/wx-2.8/wx/gtk/app.h \ + /usr/include/wx-2.8/wx/stream.h /usr/include/wx-2.8/wx/stopwatch.h \ + /usr/include/wx-2.8/wx/module.h /usr/include/wx-2.8/wx/window.h \ + /usr/include/wx-2.8/wx/font.h /usr/include/wx-2.8/wx/gdiobj.h \ + /usr/include/wx-2.8/wx/gtk/font.h /usr/include/wx-2.8/wx/colour.h \ + /usr/include/wx-2.8/wx/variant.h /usr/include/wx-2.8/wx/datetime.h \ + /usr/include/wx-2.8/wx/gtk/colour.h /usr/include/wx-2.8/wx/region.h \ + /usr/include/wx-2.8/wx/gtk/region.h /usr/include/wx-2.8/wx/validate.h \ + /usr/include/wx-2.8/wx/palette.h \ + /usr/include/wx-2.8/wx/generic/paletteg.h \ + /usr/include/wx-2.8/wx/accel.h /usr/include/wx-2.8/wx/gtk/accel.h \ + /usr/include/wx-2.8/wx/generic/accel.h \ + /usr/include/wx-2.8/wx/gtk/window.h /usr/include/wx-2.8/wx/containr.h \ + /usr/include/wx-2.8/wx/panel.h /usr/include/wx-2.8/wx/generic/panelg.h \ + /usr/include/wx-2.8/wx/toplevel.h /usr/include/wx-2.8/wx/iconbndl.h \ + /usr/include/wx-2.8/wx/gtk/toplevel.h /usr/include/wx-2.8/wx/frame.h \ + /usr/include/wx-2.8/wx/gtk/frame.h /usr/include/wx-2.8/wx/bitmap.h \ + /usr/include/wx-2.8/wx/gtk/bitmap.h /usr/include/wx-2.8/wx/image.h \ + /usr/include/wx-2.8/wx/imagbmp.h /usr/include/wx-2.8/wx/imagpng.h \ + /usr/include/wx-2.8/wx/imaggif.h /usr/include/wx-2.8/wx/imagpcx.h \ + /usr/include/wx-2.8/wx/imagjpeg.h /usr/include/wx-2.8/wx/imagtga.h \ + /usr/include/wx-2.8/wx/imagtiff.h /usr/include/wx-2.8/wx/imagpnm.h \ + /usr/include/wx-2.8/wx/imagxpm.h /usr/include/wx-2.8/wx/imagiff.h \ + /usr/include/wx-2.8/wx/dc.h /usr/include/wx-2.8/wx/brush.h \ + /usr/include/wx-2.8/wx/gtk/brush.h /usr/include/wx-2.8/wx/pen.h \ + /usr/include/wx-2.8/wx/gtk/pen.h /usr/include/wx-2.8/wx/gtk/dc.h \ + /usr/include/wx-2.8/wx/dcgraph.h /usr/include/wx-2.8/wx/geometry.h \ + /usr/include/wx-2.8/wx/graphics.h /usr/include/wx-2.8/wx/dcclient.h \ + /usr/include/wx-2.8/wx/gtk/dcclient.h /usr/include/wx-2.8/wx/dcmemory.h \ + /usr/include/wx-2.8/wx/gtk/dcmemory.h /usr/include/wx-2.8/wx/dcprint.h \ + /usr/include/wx-2.8/wx/dcscreen.h /usr/include/wx-2.8/wx/gtk/dcscreen.h \ + /usr/include/wx-2.8/wx/button.h /usr/include/wx-2.8/wx/control.h \ + /usr/include/wx-2.8/wx/gtk/control.h \ + /usr/include/wx-2.8/wx/gtk/button.h /usr/include/wx-2.8/wx/menuitem.h \ + /usr/include/wx-2.8/wx/gtk/menuitem.h /usr/include/wx-2.8/wx/menu.h \ + /usr/include/wx-2.8/wx/gtk/menu.h /usr/include/wx-2.8/wx/icon.h \ + /usr/include/wx-2.8/wx/iconloc.h /usr/include/wx-2.8/wx/generic/icon.h \ + /usr/include/wx-2.8/wx/dialog.h /usr/include/wx-2.8/wx/gtk/dialog.h \ + /usr/include/wx-2.8/wx/timer.h /usr/include/wx-2.8/wx/gtk/timer.h \ + /usr/include/wx-2.8/wx/settings.h /usr/include/wx-2.8/wx/msgdlg.h \ + /usr/include/wx-2.8/wx/gtk/msgdlg.h /usr/include/wx-2.8/wx/cmndata.h \ + /usr/include/wx-2.8/wx/encinfo.h /usr/include/wx-2.8/wx/dataobj.h \ + /usr/include/wx-2.8/wx/gtk/dataform.h \ + /usr/include/wx-2.8/wx/gtk/dataobj.h \ + /usr/include/wx-2.8/wx/gtk/dataobj2.h /usr/include/wx-2.8/wx/ctrlsub.h \ + /usr/include/wx-2.8/wx/bmpbuttn.h /usr/include/wx-2.8/wx/gtk/bmpbuttn.h \ + /usr/include/wx-2.8/wx/checkbox.h /usr/include/wx-2.8/wx/gtk/checkbox.h \ + /usr/include/wx-2.8/wx/checklst.h /usr/include/wx-2.8/wx/listbox.h \ + /usr/include/wx-2.8/wx/gtk/listbox.h \ + /usr/include/wx-2.8/wx/gtk/checklst.h /usr/include/wx-2.8/wx/choice.h \ + /usr/include/wx-2.8/wx/gtk/choice.h /usr/include/wx-2.8/wx/scrolbar.h \ + /usr/include/wx-2.8/wx/gtk/scrolbar.h /usr/include/wx-2.8/wx/stattext.h \ + /usr/include/wx-2.8/wx/gtk/stattext.h /usr/include/wx-2.8/wx/statbmp.h \ + /usr/include/wx-2.8/wx/gtk/statbmp.h /usr/include/wx-2.8/wx/statbox.h \ + /usr/include/wx-2.8/wx/gtk/statbox.h /usr/include/wx-2.8/wx/radiobox.h \ + /usr/include/wx-2.8/wx/gtk/radiobox.h /usr/include/wx-2.8/wx/radiobut.h \ + /usr/include/wx-2.8/wx/gtk/radiobut.h /usr/include/wx-2.8/wx/textctrl.h \ + /usr/include/wx-2.8/wx/ioswrap.h /usr/include/wx-2.8/wx/gtk/textctrl.h \ + /usr/include/wx-2.8/wx/slider.h /usr/include/wx-2.8/wx/gtk/slider.h \ + /usr/include/wx-2.8/wx/gauge.h /usr/include/wx-2.8/wx/gtk/gauge.h \ + /usr/include/wx-2.8/wx/scrolwin.h /usr/include/wx-2.8/wx/gtk/scrolwin.h \ + /usr/include/wx-2.8/wx/dirdlg.h /usr/include/wx-2.8/wx/gtk/dirdlg.h \ + /usr/include/wx-2.8/wx/generic/dirdlgg.h \ + /usr/include/wx-2.8/wx/toolbar.h /usr/include/wx-2.8/wx/tbarbase.h \ + /usr/include/wx-2.8/wx/gtk/tbargtk.h /usr/include/wx-2.8/wx/combobox.h \ + /usr/include/wx-2.8/wx/gtk/combobox.h /usr/include/wx-2.8/wx/layout.h \ + /usr/include/wx-2.8/wx/sizer.h /usr/include/wx-2.8/wx/mdi.h \ + /usr/include/wx-2.8/wx/gtk/mdi.h /usr/include/wx-2.8/wx/statusbr.h \ + /usr/include/wx-2.8/wx/generic/statusbr.h \ + /usr/include/wx-2.8/wx/choicdlg.h \ + /usr/include/wx-2.8/wx/generic/choicdgg.h \ + /usr/include/wx-2.8/wx/textdlg.h \ + /usr/include/wx-2.8/wx/generic/textdlgg.h \ + /usr/include/wx-2.8/wx/valtext.h /usr/include/wx-2.8/wx/filedlg.h \ + /usr/include/wx-2.8/wx/gtk/filedlg.h \ + /usr/include/wx-2.8/wx/generic/filedlgg.h \ + /usr/include/wx-2.8/wx/listctrl.h /usr/include/wx-2.8/wx/listbase.h \ + /usr/include/wx-2.8/wx/generic/listctrl.h \ + ../../../Windows/Control/DialogImpl.h ../../../Windows/Window.h \ + ../../../Windows/Defs.h ../../../Windows/../Common/MyWindows.h \ + ../../../Common/MyString.h ../../../Common/MyVector.h \ + ../../../Common/Defs.h ../../../Windows/Control/Dialog.h \ + ../../UI/FileManager/PasswordDialogRes.h +Window.o: ../../../Windows/Window.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h /usr/include/wx-2.8/wx/wxprec.h \ + /usr/include/wx-2.8/wx/defs.h /usr/include/wx-2.8/wx/platform.h \ + /usr/lib/wx/include/gtk2-unicode-release-2.8/wx/setup.h \ + /usr/include/wx-2.8/wx/chkconf.h /usr/include/wx-2.8/wx/features.h \ + /usr/include/wx-2.8/wx/version.h /usr/include/wx-2.8/wx/cpp.h \ + /usr/include/wx-2.8/wx/dlimpexp.h /usr/include/wx-2.8/wx/debug.h \ + /usr/include/wx-2.8/wx/wxchar.h /usr/include/wx-2.8/wx/wx.h \ + /usr/include/wx-2.8/wx/object.h /usr/include/wx-2.8/wx/memory.h \ + /usr/include/wx-2.8/wx/string.h /usr/include/wx-2.8/wx/buffer.h \ + /usr/include/wx-2.8/wx/strconv.h /usr/include/wx-2.8/wx/fontenc.h \ + /usr/include/wx-2.8/wx/beforestd.h /usr/include/wx-2.8/wx/afterstd.h \ + /usr/include/wx-2.8/wx/iosfwrap.h /usr/include/wx-2.8/wx/msgout.h \ + /usr/include/wx-2.8/wx/dynarray.h /usr/include/wx-2.8/wx/list.h \ + /usr/include/wx-2.8/wx/hash.h /usr/include/wx-2.8/wx/hashmap.h \ + /usr/include/wx-2.8/wx/arrstr.h /usr/include/wx-2.8/wx/intl.h \ + /usr/include/wx-2.8/wx/log.h /usr/include/wx-2.8/wx/generic/logg.h \ + /usr/include/wx-2.8/wx/event.h /usr/include/wx-2.8/wx/clntdata.h \ + /usr/include/wx-2.8/wx/vector.h /usr/include/wx-2.8/wx/gdicmn.h \ + /usr/include/wx-2.8/wx/math.h /usr/include/wx-2.8/wx/cursor.h \ + /usr/include/wx-2.8/wx/gtk/cursor.h /usr/include/wx-2.8/wx/utils.h \ + /usr/include/wx-2.8/wx/filefn.h /usr/include/wx-2.8/wx/longlong.h \ + /usr/include/wx-2.8/wx/platinfo.h /usr/include/wx-2.8/wx/thread.h \ + /usr/include/wx-2.8/wx/app.h /usr/include/wx-2.8/wx/build.h \ + /usr/include/wx-2.8/wx/init.h /usr/include/wx-2.8/wx/gtk/app.h \ + /usr/include/wx-2.8/wx/stream.h /usr/include/wx-2.8/wx/stopwatch.h \ + /usr/include/wx-2.8/wx/module.h /usr/include/wx-2.8/wx/window.h \ + /usr/include/wx-2.8/wx/font.h /usr/include/wx-2.8/wx/gdiobj.h \ + /usr/include/wx-2.8/wx/gtk/font.h /usr/include/wx-2.8/wx/colour.h \ + /usr/include/wx-2.8/wx/variant.h /usr/include/wx-2.8/wx/datetime.h \ + /usr/include/wx-2.8/wx/gtk/colour.h /usr/include/wx-2.8/wx/region.h \ + /usr/include/wx-2.8/wx/gtk/region.h /usr/include/wx-2.8/wx/validate.h \ + /usr/include/wx-2.8/wx/palette.h \ + /usr/include/wx-2.8/wx/generic/paletteg.h \ + /usr/include/wx-2.8/wx/accel.h /usr/include/wx-2.8/wx/gtk/accel.h \ + /usr/include/wx-2.8/wx/generic/accel.h \ + /usr/include/wx-2.8/wx/gtk/window.h /usr/include/wx-2.8/wx/containr.h \ + /usr/include/wx-2.8/wx/panel.h /usr/include/wx-2.8/wx/generic/panelg.h \ + /usr/include/wx-2.8/wx/toplevel.h /usr/include/wx-2.8/wx/iconbndl.h \ + /usr/include/wx-2.8/wx/gtk/toplevel.h /usr/include/wx-2.8/wx/frame.h \ + /usr/include/wx-2.8/wx/gtk/frame.h /usr/include/wx-2.8/wx/bitmap.h \ + /usr/include/wx-2.8/wx/gtk/bitmap.h /usr/include/wx-2.8/wx/image.h \ + /usr/include/wx-2.8/wx/imagbmp.h /usr/include/wx-2.8/wx/imagpng.h \ + /usr/include/wx-2.8/wx/imaggif.h /usr/include/wx-2.8/wx/imagpcx.h \ + /usr/include/wx-2.8/wx/imagjpeg.h /usr/include/wx-2.8/wx/imagtga.h \ + /usr/include/wx-2.8/wx/imagtiff.h /usr/include/wx-2.8/wx/imagpnm.h \ + /usr/include/wx-2.8/wx/imagxpm.h /usr/include/wx-2.8/wx/imagiff.h \ + /usr/include/wx-2.8/wx/dc.h /usr/include/wx-2.8/wx/brush.h \ + /usr/include/wx-2.8/wx/gtk/brush.h /usr/include/wx-2.8/wx/pen.h \ + /usr/include/wx-2.8/wx/gtk/pen.h /usr/include/wx-2.8/wx/gtk/dc.h \ + /usr/include/wx-2.8/wx/dcgraph.h /usr/include/wx-2.8/wx/geometry.h \ + /usr/include/wx-2.8/wx/graphics.h /usr/include/wx-2.8/wx/dcclient.h \ + /usr/include/wx-2.8/wx/gtk/dcclient.h /usr/include/wx-2.8/wx/dcmemory.h \ + /usr/include/wx-2.8/wx/gtk/dcmemory.h /usr/include/wx-2.8/wx/dcprint.h \ + /usr/include/wx-2.8/wx/dcscreen.h /usr/include/wx-2.8/wx/gtk/dcscreen.h \ + /usr/include/wx-2.8/wx/button.h /usr/include/wx-2.8/wx/control.h \ + /usr/include/wx-2.8/wx/gtk/control.h \ + /usr/include/wx-2.8/wx/gtk/button.h /usr/include/wx-2.8/wx/menuitem.h \ + /usr/include/wx-2.8/wx/gtk/menuitem.h /usr/include/wx-2.8/wx/menu.h \ + /usr/include/wx-2.8/wx/gtk/menu.h /usr/include/wx-2.8/wx/icon.h \ + /usr/include/wx-2.8/wx/iconloc.h /usr/include/wx-2.8/wx/generic/icon.h \ + /usr/include/wx-2.8/wx/dialog.h /usr/include/wx-2.8/wx/gtk/dialog.h \ + /usr/include/wx-2.8/wx/timer.h /usr/include/wx-2.8/wx/gtk/timer.h \ + /usr/include/wx-2.8/wx/settings.h /usr/include/wx-2.8/wx/msgdlg.h \ + /usr/include/wx-2.8/wx/gtk/msgdlg.h /usr/include/wx-2.8/wx/cmndata.h \ + /usr/include/wx-2.8/wx/encinfo.h /usr/include/wx-2.8/wx/dataobj.h \ + /usr/include/wx-2.8/wx/gtk/dataform.h \ + /usr/include/wx-2.8/wx/gtk/dataobj.h \ + /usr/include/wx-2.8/wx/gtk/dataobj2.h /usr/include/wx-2.8/wx/ctrlsub.h \ + /usr/include/wx-2.8/wx/bmpbuttn.h /usr/include/wx-2.8/wx/gtk/bmpbuttn.h \ + /usr/include/wx-2.8/wx/checkbox.h /usr/include/wx-2.8/wx/gtk/checkbox.h \ + /usr/include/wx-2.8/wx/checklst.h /usr/include/wx-2.8/wx/listbox.h \ + /usr/include/wx-2.8/wx/gtk/listbox.h \ + /usr/include/wx-2.8/wx/gtk/checklst.h /usr/include/wx-2.8/wx/choice.h \ + /usr/include/wx-2.8/wx/gtk/choice.h /usr/include/wx-2.8/wx/scrolbar.h \ + /usr/include/wx-2.8/wx/gtk/scrolbar.h /usr/include/wx-2.8/wx/stattext.h \ + /usr/include/wx-2.8/wx/gtk/stattext.h /usr/include/wx-2.8/wx/statbmp.h \ + /usr/include/wx-2.8/wx/gtk/statbmp.h /usr/include/wx-2.8/wx/statbox.h \ + /usr/include/wx-2.8/wx/gtk/statbox.h /usr/include/wx-2.8/wx/radiobox.h \ + /usr/include/wx-2.8/wx/gtk/radiobox.h /usr/include/wx-2.8/wx/radiobut.h \ + /usr/include/wx-2.8/wx/gtk/radiobut.h /usr/include/wx-2.8/wx/textctrl.h \ + /usr/include/wx-2.8/wx/ioswrap.h /usr/include/wx-2.8/wx/gtk/textctrl.h \ + /usr/include/wx-2.8/wx/slider.h /usr/include/wx-2.8/wx/gtk/slider.h \ + /usr/include/wx-2.8/wx/gauge.h /usr/include/wx-2.8/wx/gtk/gauge.h \ + /usr/include/wx-2.8/wx/scrolwin.h /usr/include/wx-2.8/wx/gtk/scrolwin.h \ + /usr/include/wx-2.8/wx/dirdlg.h /usr/include/wx-2.8/wx/gtk/dirdlg.h \ + /usr/include/wx-2.8/wx/generic/dirdlgg.h \ + /usr/include/wx-2.8/wx/toolbar.h /usr/include/wx-2.8/wx/tbarbase.h \ + /usr/include/wx-2.8/wx/gtk/tbargtk.h /usr/include/wx-2.8/wx/combobox.h \ + /usr/include/wx-2.8/wx/gtk/combobox.h /usr/include/wx-2.8/wx/layout.h \ + /usr/include/wx-2.8/wx/sizer.h /usr/include/wx-2.8/wx/mdi.h \ + /usr/include/wx-2.8/wx/gtk/mdi.h /usr/include/wx-2.8/wx/statusbr.h \ + /usr/include/wx-2.8/wx/generic/statusbr.h \ + /usr/include/wx-2.8/wx/choicdlg.h \ + /usr/include/wx-2.8/wx/generic/choicdgg.h \ + /usr/include/wx-2.8/wx/textdlg.h \ + /usr/include/wx-2.8/wx/generic/textdlgg.h \ + /usr/include/wx-2.8/wx/valtext.h /usr/include/wx-2.8/wx/filedlg.h \ + /usr/include/wx-2.8/wx/gtk/filedlg.h \ + /usr/include/wx-2.8/wx/generic/filedlgg.h \ + /usr/include/wx-2.8/wx/listctrl.h /usr/include/wx-2.8/wx/listbase.h \ + /usr/include/wx-2.8/wx/generic/listctrl.h ../../../Windows/Window.h \ + ../../../Windows/Defs.h ../../../Windows/../Common/MyWindows.h \ + ../../../Common/MyString.h ../../../Common/MyVector.h \ + ../../../Common/Defs.h +Dialog.o: ../../../Windows/Control/Dialog.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h /usr/include/wx-2.8/wx/wxprec.h \ + /usr/include/wx-2.8/wx/defs.h /usr/include/wx-2.8/wx/platform.h \ + /usr/lib/wx/include/gtk2-unicode-release-2.8/wx/setup.h \ + /usr/include/wx-2.8/wx/chkconf.h /usr/include/wx-2.8/wx/features.h \ + /usr/include/wx-2.8/wx/version.h /usr/include/wx-2.8/wx/cpp.h \ + /usr/include/wx-2.8/wx/dlimpexp.h /usr/include/wx-2.8/wx/debug.h \ + /usr/include/wx-2.8/wx/wxchar.h /usr/include/wx-2.8/wx/wx.h \ + /usr/include/wx-2.8/wx/object.h /usr/include/wx-2.8/wx/memory.h \ + /usr/include/wx-2.8/wx/string.h /usr/include/wx-2.8/wx/buffer.h \ + /usr/include/wx-2.8/wx/strconv.h /usr/include/wx-2.8/wx/fontenc.h \ + /usr/include/wx-2.8/wx/beforestd.h /usr/include/wx-2.8/wx/afterstd.h \ + /usr/include/wx-2.8/wx/iosfwrap.h /usr/include/wx-2.8/wx/msgout.h \ + /usr/include/wx-2.8/wx/dynarray.h /usr/include/wx-2.8/wx/list.h \ + /usr/include/wx-2.8/wx/hash.h /usr/include/wx-2.8/wx/hashmap.h \ + /usr/include/wx-2.8/wx/arrstr.h /usr/include/wx-2.8/wx/intl.h \ + /usr/include/wx-2.8/wx/log.h /usr/include/wx-2.8/wx/generic/logg.h \ + /usr/include/wx-2.8/wx/event.h /usr/include/wx-2.8/wx/clntdata.h \ + /usr/include/wx-2.8/wx/vector.h /usr/include/wx-2.8/wx/gdicmn.h \ + /usr/include/wx-2.8/wx/math.h /usr/include/wx-2.8/wx/cursor.h \ + /usr/include/wx-2.8/wx/gtk/cursor.h /usr/include/wx-2.8/wx/utils.h \ + /usr/include/wx-2.8/wx/filefn.h /usr/include/wx-2.8/wx/longlong.h \ + /usr/include/wx-2.8/wx/platinfo.h /usr/include/wx-2.8/wx/thread.h \ + /usr/include/wx-2.8/wx/app.h /usr/include/wx-2.8/wx/build.h \ + /usr/include/wx-2.8/wx/init.h /usr/include/wx-2.8/wx/gtk/app.h \ + /usr/include/wx-2.8/wx/stream.h /usr/include/wx-2.8/wx/stopwatch.h \ + /usr/include/wx-2.8/wx/module.h /usr/include/wx-2.8/wx/window.h \ + /usr/include/wx-2.8/wx/font.h /usr/include/wx-2.8/wx/gdiobj.h \ + /usr/include/wx-2.8/wx/gtk/font.h /usr/include/wx-2.8/wx/colour.h \ + /usr/include/wx-2.8/wx/variant.h /usr/include/wx-2.8/wx/datetime.h \ + /usr/include/wx-2.8/wx/gtk/colour.h /usr/include/wx-2.8/wx/region.h \ + /usr/include/wx-2.8/wx/gtk/region.h /usr/include/wx-2.8/wx/validate.h \ + /usr/include/wx-2.8/wx/palette.h \ + /usr/include/wx-2.8/wx/generic/paletteg.h \ + /usr/include/wx-2.8/wx/accel.h /usr/include/wx-2.8/wx/gtk/accel.h \ + /usr/include/wx-2.8/wx/generic/accel.h \ + /usr/include/wx-2.8/wx/gtk/window.h /usr/include/wx-2.8/wx/containr.h \ + /usr/include/wx-2.8/wx/panel.h /usr/include/wx-2.8/wx/generic/panelg.h \ + /usr/include/wx-2.8/wx/toplevel.h /usr/include/wx-2.8/wx/iconbndl.h \ + /usr/include/wx-2.8/wx/gtk/toplevel.h /usr/include/wx-2.8/wx/frame.h \ + /usr/include/wx-2.8/wx/gtk/frame.h /usr/include/wx-2.8/wx/bitmap.h \ + /usr/include/wx-2.8/wx/gtk/bitmap.h /usr/include/wx-2.8/wx/image.h \ + /usr/include/wx-2.8/wx/imagbmp.h /usr/include/wx-2.8/wx/imagpng.h \ + /usr/include/wx-2.8/wx/imaggif.h /usr/include/wx-2.8/wx/imagpcx.h \ + /usr/include/wx-2.8/wx/imagjpeg.h /usr/include/wx-2.8/wx/imagtga.h \ + /usr/include/wx-2.8/wx/imagtiff.h /usr/include/wx-2.8/wx/imagpnm.h \ + /usr/include/wx-2.8/wx/imagxpm.h /usr/include/wx-2.8/wx/imagiff.h \ + /usr/include/wx-2.8/wx/dc.h /usr/include/wx-2.8/wx/brush.h \ + /usr/include/wx-2.8/wx/gtk/brush.h /usr/include/wx-2.8/wx/pen.h \ + /usr/include/wx-2.8/wx/gtk/pen.h /usr/include/wx-2.8/wx/gtk/dc.h \ + /usr/include/wx-2.8/wx/dcgraph.h /usr/include/wx-2.8/wx/geometry.h \ + /usr/include/wx-2.8/wx/graphics.h /usr/include/wx-2.8/wx/dcclient.h \ + /usr/include/wx-2.8/wx/gtk/dcclient.h /usr/include/wx-2.8/wx/dcmemory.h \ + /usr/include/wx-2.8/wx/gtk/dcmemory.h /usr/include/wx-2.8/wx/dcprint.h \ + /usr/include/wx-2.8/wx/dcscreen.h /usr/include/wx-2.8/wx/gtk/dcscreen.h \ + /usr/include/wx-2.8/wx/button.h /usr/include/wx-2.8/wx/control.h \ + /usr/include/wx-2.8/wx/gtk/control.h \ + /usr/include/wx-2.8/wx/gtk/button.h /usr/include/wx-2.8/wx/menuitem.h \ + /usr/include/wx-2.8/wx/gtk/menuitem.h /usr/include/wx-2.8/wx/menu.h \ + /usr/include/wx-2.8/wx/gtk/menu.h /usr/include/wx-2.8/wx/icon.h \ + /usr/include/wx-2.8/wx/iconloc.h /usr/include/wx-2.8/wx/generic/icon.h \ + /usr/include/wx-2.8/wx/dialog.h /usr/include/wx-2.8/wx/gtk/dialog.h \ + /usr/include/wx-2.8/wx/timer.h /usr/include/wx-2.8/wx/gtk/timer.h \ + /usr/include/wx-2.8/wx/settings.h /usr/include/wx-2.8/wx/msgdlg.h \ + /usr/include/wx-2.8/wx/gtk/msgdlg.h /usr/include/wx-2.8/wx/cmndata.h \ + /usr/include/wx-2.8/wx/encinfo.h /usr/include/wx-2.8/wx/dataobj.h \ + /usr/include/wx-2.8/wx/gtk/dataform.h \ + /usr/include/wx-2.8/wx/gtk/dataobj.h \ + /usr/include/wx-2.8/wx/gtk/dataobj2.h /usr/include/wx-2.8/wx/ctrlsub.h \ + /usr/include/wx-2.8/wx/bmpbuttn.h /usr/include/wx-2.8/wx/gtk/bmpbuttn.h \ + /usr/include/wx-2.8/wx/checkbox.h /usr/include/wx-2.8/wx/gtk/checkbox.h \ + /usr/include/wx-2.8/wx/checklst.h /usr/include/wx-2.8/wx/listbox.h \ + /usr/include/wx-2.8/wx/gtk/listbox.h \ + /usr/include/wx-2.8/wx/gtk/checklst.h /usr/include/wx-2.8/wx/choice.h \ + /usr/include/wx-2.8/wx/gtk/choice.h /usr/include/wx-2.8/wx/scrolbar.h \ + /usr/include/wx-2.8/wx/gtk/scrolbar.h /usr/include/wx-2.8/wx/stattext.h \ + /usr/include/wx-2.8/wx/gtk/stattext.h /usr/include/wx-2.8/wx/statbmp.h \ + /usr/include/wx-2.8/wx/gtk/statbmp.h /usr/include/wx-2.8/wx/statbox.h \ + /usr/include/wx-2.8/wx/gtk/statbox.h /usr/include/wx-2.8/wx/radiobox.h \ + /usr/include/wx-2.8/wx/gtk/radiobox.h /usr/include/wx-2.8/wx/radiobut.h \ + /usr/include/wx-2.8/wx/gtk/radiobut.h /usr/include/wx-2.8/wx/textctrl.h \ + /usr/include/wx-2.8/wx/ioswrap.h /usr/include/wx-2.8/wx/gtk/textctrl.h \ + /usr/include/wx-2.8/wx/slider.h /usr/include/wx-2.8/wx/gtk/slider.h \ + /usr/include/wx-2.8/wx/gauge.h /usr/include/wx-2.8/wx/gtk/gauge.h \ + /usr/include/wx-2.8/wx/scrolwin.h /usr/include/wx-2.8/wx/gtk/scrolwin.h \ + /usr/include/wx-2.8/wx/dirdlg.h /usr/include/wx-2.8/wx/gtk/dirdlg.h \ + /usr/include/wx-2.8/wx/generic/dirdlgg.h \ + /usr/include/wx-2.8/wx/toolbar.h /usr/include/wx-2.8/wx/tbarbase.h \ + /usr/include/wx-2.8/wx/gtk/tbargtk.h /usr/include/wx-2.8/wx/combobox.h \ + /usr/include/wx-2.8/wx/gtk/combobox.h /usr/include/wx-2.8/wx/layout.h \ + /usr/include/wx-2.8/wx/sizer.h /usr/include/wx-2.8/wx/mdi.h \ + /usr/include/wx-2.8/wx/gtk/mdi.h /usr/include/wx-2.8/wx/statusbr.h \ + /usr/include/wx-2.8/wx/generic/statusbr.h \ + /usr/include/wx-2.8/wx/choicdlg.h \ + /usr/include/wx-2.8/wx/generic/choicdgg.h \ + /usr/include/wx-2.8/wx/textdlg.h \ + /usr/include/wx-2.8/wx/generic/textdlgg.h \ + /usr/include/wx-2.8/wx/valtext.h /usr/include/wx-2.8/wx/filedlg.h \ + /usr/include/wx-2.8/wx/gtk/filedlg.h \ + /usr/include/wx-2.8/wx/generic/filedlgg.h \ + /usr/include/wx-2.8/wx/listctrl.h /usr/include/wx-2.8/wx/listbase.h \ + /usr/include/wx-2.8/wx/generic/listctrl.h \ + ../../../Windows/Control/DialogImpl.h ../../../Windows/Window.h \ + ../../../Windows/Defs.h ../../../Windows/../Common/MyWindows.h \ + ../../../Common/MyString.h ../../../Common/MyVector.h \ + ../../../Common/Defs.h ../../../Windows/Control/Dialog.h \ + ../../../Windows/Synchronization.h ../../../Windows/Defs.h \ + ../../../Windows/../../C/Threads.h ../../../Windows/../../C/Types.h \ + ../../../Windows/Synchronization2.h +Controls.o: ../../../Windows/Control/Controls.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + /usr/include/wx-2.8/wx/wxprec.h /usr/include/wx-2.8/wx/defs.h \ + /usr/include/wx-2.8/wx/platform.h \ + /usr/lib/wx/include/gtk2-unicode-release-2.8/wx/setup.h \ + /usr/include/wx-2.8/wx/chkconf.h /usr/include/wx-2.8/wx/features.h \ + /usr/include/wx-2.8/wx/version.h /usr/include/wx-2.8/wx/cpp.h \ + /usr/include/wx-2.8/wx/dlimpexp.h /usr/include/wx-2.8/wx/debug.h \ + /usr/include/wx-2.8/wx/wxchar.h /usr/include/wx-2.8/wx/wx.h \ + /usr/include/wx-2.8/wx/object.h /usr/include/wx-2.8/wx/memory.h \ + /usr/include/wx-2.8/wx/string.h /usr/include/wx-2.8/wx/buffer.h \ + /usr/include/wx-2.8/wx/strconv.h /usr/include/wx-2.8/wx/fontenc.h \ + /usr/include/wx-2.8/wx/beforestd.h /usr/include/wx-2.8/wx/afterstd.h \ + /usr/include/wx-2.8/wx/iosfwrap.h /usr/include/wx-2.8/wx/msgout.h \ + /usr/include/wx-2.8/wx/dynarray.h /usr/include/wx-2.8/wx/list.h \ + /usr/include/wx-2.8/wx/hash.h /usr/include/wx-2.8/wx/hashmap.h \ + /usr/include/wx-2.8/wx/arrstr.h /usr/include/wx-2.8/wx/intl.h \ + /usr/include/wx-2.8/wx/log.h /usr/include/wx-2.8/wx/generic/logg.h \ + /usr/include/wx-2.8/wx/event.h /usr/include/wx-2.8/wx/clntdata.h \ + /usr/include/wx-2.8/wx/vector.h /usr/include/wx-2.8/wx/gdicmn.h \ + /usr/include/wx-2.8/wx/math.h /usr/include/wx-2.8/wx/cursor.h \ + /usr/include/wx-2.8/wx/gtk/cursor.h /usr/include/wx-2.8/wx/utils.h \ + /usr/include/wx-2.8/wx/filefn.h /usr/include/wx-2.8/wx/longlong.h \ + /usr/include/wx-2.8/wx/platinfo.h /usr/include/wx-2.8/wx/thread.h \ + /usr/include/wx-2.8/wx/app.h /usr/include/wx-2.8/wx/build.h \ + /usr/include/wx-2.8/wx/init.h /usr/include/wx-2.8/wx/gtk/app.h \ + /usr/include/wx-2.8/wx/stream.h /usr/include/wx-2.8/wx/stopwatch.h \ + /usr/include/wx-2.8/wx/module.h /usr/include/wx-2.8/wx/window.h \ + /usr/include/wx-2.8/wx/font.h /usr/include/wx-2.8/wx/gdiobj.h \ + /usr/include/wx-2.8/wx/gtk/font.h /usr/include/wx-2.8/wx/colour.h \ + /usr/include/wx-2.8/wx/variant.h /usr/include/wx-2.8/wx/datetime.h \ + /usr/include/wx-2.8/wx/gtk/colour.h /usr/include/wx-2.8/wx/region.h \ + /usr/include/wx-2.8/wx/gtk/region.h /usr/include/wx-2.8/wx/validate.h \ + /usr/include/wx-2.8/wx/palette.h \ + /usr/include/wx-2.8/wx/generic/paletteg.h \ + /usr/include/wx-2.8/wx/accel.h /usr/include/wx-2.8/wx/gtk/accel.h \ + /usr/include/wx-2.8/wx/generic/accel.h \ + /usr/include/wx-2.8/wx/gtk/window.h /usr/include/wx-2.8/wx/containr.h \ + /usr/include/wx-2.8/wx/panel.h /usr/include/wx-2.8/wx/generic/panelg.h \ + /usr/include/wx-2.8/wx/toplevel.h /usr/include/wx-2.8/wx/iconbndl.h \ + /usr/include/wx-2.8/wx/gtk/toplevel.h /usr/include/wx-2.8/wx/frame.h \ + /usr/include/wx-2.8/wx/gtk/frame.h /usr/include/wx-2.8/wx/bitmap.h \ + /usr/include/wx-2.8/wx/gtk/bitmap.h /usr/include/wx-2.8/wx/image.h \ + /usr/include/wx-2.8/wx/imagbmp.h /usr/include/wx-2.8/wx/imagpng.h \ + /usr/include/wx-2.8/wx/imaggif.h /usr/include/wx-2.8/wx/imagpcx.h \ + /usr/include/wx-2.8/wx/imagjpeg.h /usr/include/wx-2.8/wx/imagtga.h \ + /usr/include/wx-2.8/wx/imagtiff.h /usr/include/wx-2.8/wx/imagpnm.h \ + /usr/include/wx-2.8/wx/imagxpm.h /usr/include/wx-2.8/wx/imagiff.h \ + /usr/include/wx-2.8/wx/dc.h /usr/include/wx-2.8/wx/brush.h \ + /usr/include/wx-2.8/wx/gtk/brush.h /usr/include/wx-2.8/wx/pen.h \ + /usr/include/wx-2.8/wx/gtk/pen.h /usr/include/wx-2.8/wx/gtk/dc.h \ + /usr/include/wx-2.8/wx/dcgraph.h /usr/include/wx-2.8/wx/geometry.h \ + /usr/include/wx-2.8/wx/graphics.h /usr/include/wx-2.8/wx/dcclient.h \ + /usr/include/wx-2.8/wx/gtk/dcclient.h /usr/include/wx-2.8/wx/dcmemory.h \ + /usr/include/wx-2.8/wx/gtk/dcmemory.h /usr/include/wx-2.8/wx/dcprint.h \ + /usr/include/wx-2.8/wx/dcscreen.h /usr/include/wx-2.8/wx/gtk/dcscreen.h \ + /usr/include/wx-2.8/wx/button.h /usr/include/wx-2.8/wx/control.h \ + /usr/include/wx-2.8/wx/gtk/control.h \ + /usr/include/wx-2.8/wx/gtk/button.h /usr/include/wx-2.8/wx/menuitem.h \ + /usr/include/wx-2.8/wx/gtk/menuitem.h /usr/include/wx-2.8/wx/menu.h \ + /usr/include/wx-2.8/wx/gtk/menu.h /usr/include/wx-2.8/wx/icon.h \ + /usr/include/wx-2.8/wx/iconloc.h /usr/include/wx-2.8/wx/generic/icon.h \ + /usr/include/wx-2.8/wx/dialog.h /usr/include/wx-2.8/wx/gtk/dialog.h \ + /usr/include/wx-2.8/wx/timer.h /usr/include/wx-2.8/wx/gtk/timer.h \ + /usr/include/wx-2.8/wx/settings.h /usr/include/wx-2.8/wx/msgdlg.h \ + /usr/include/wx-2.8/wx/gtk/msgdlg.h /usr/include/wx-2.8/wx/cmndata.h \ + /usr/include/wx-2.8/wx/encinfo.h /usr/include/wx-2.8/wx/dataobj.h \ + /usr/include/wx-2.8/wx/gtk/dataform.h \ + /usr/include/wx-2.8/wx/gtk/dataobj.h \ + /usr/include/wx-2.8/wx/gtk/dataobj2.h /usr/include/wx-2.8/wx/ctrlsub.h \ + /usr/include/wx-2.8/wx/bmpbuttn.h /usr/include/wx-2.8/wx/gtk/bmpbuttn.h \ + /usr/include/wx-2.8/wx/checkbox.h /usr/include/wx-2.8/wx/gtk/checkbox.h \ + /usr/include/wx-2.8/wx/checklst.h /usr/include/wx-2.8/wx/listbox.h \ + /usr/include/wx-2.8/wx/gtk/listbox.h \ + /usr/include/wx-2.8/wx/gtk/checklst.h /usr/include/wx-2.8/wx/choice.h \ + /usr/include/wx-2.8/wx/gtk/choice.h /usr/include/wx-2.8/wx/scrolbar.h \ + /usr/include/wx-2.8/wx/gtk/scrolbar.h /usr/include/wx-2.8/wx/stattext.h \ + /usr/include/wx-2.8/wx/gtk/stattext.h /usr/include/wx-2.8/wx/statbmp.h \ + /usr/include/wx-2.8/wx/gtk/statbmp.h /usr/include/wx-2.8/wx/statbox.h \ + /usr/include/wx-2.8/wx/gtk/statbox.h /usr/include/wx-2.8/wx/radiobox.h \ + /usr/include/wx-2.8/wx/gtk/radiobox.h /usr/include/wx-2.8/wx/radiobut.h \ + /usr/include/wx-2.8/wx/gtk/radiobut.h /usr/include/wx-2.8/wx/textctrl.h \ + /usr/include/wx-2.8/wx/ioswrap.h /usr/include/wx-2.8/wx/gtk/textctrl.h \ + /usr/include/wx-2.8/wx/slider.h /usr/include/wx-2.8/wx/gtk/slider.h \ + /usr/include/wx-2.8/wx/gauge.h /usr/include/wx-2.8/wx/gtk/gauge.h \ + /usr/include/wx-2.8/wx/scrolwin.h /usr/include/wx-2.8/wx/gtk/scrolwin.h \ + /usr/include/wx-2.8/wx/dirdlg.h /usr/include/wx-2.8/wx/gtk/dirdlg.h \ + /usr/include/wx-2.8/wx/generic/dirdlgg.h \ + /usr/include/wx-2.8/wx/toolbar.h /usr/include/wx-2.8/wx/tbarbase.h \ + /usr/include/wx-2.8/wx/gtk/tbargtk.h /usr/include/wx-2.8/wx/combobox.h \ + /usr/include/wx-2.8/wx/gtk/combobox.h /usr/include/wx-2.8/wx/layout.h \ + /usr/include/wx-2.8/wx/sizer.h /usr/include/wx-2.8/wx/mdi.h \ + /usr/include/wx-2.8/wx/gtk/mdi.h /usr/include/wx-2.8/wx/statusbr.h \ + /usr/include/wx-2.8/wx/generic/statusbr.h \ + /usr/include/wx-2.8/wx/choicdlg.h \ + /usr/include/wx-2.8/wx/generic/choicdgg.h \ + /usr/include/wx-2.8/wx/textdlg.h \ + /usr/include/wx-2.8/wx/generic/textdlgg.h \ + /usr/include/wx-2.8/wx/valtext.h /usr/include/wx-2.8/wx/filedlg.h \ + /usr/include/wx-2.8/wx/gtk/filedlg.h \ + /usr/include/wx-2.8/wx/generic/filedlgg.h \ + /usr/include/wx-2.8/wx/listctrl.h /usr/include/wx-2.8/wx/listbase.h \ + /usr/include/wx-2.8/wx/generic/listctrl.h \ + /usr/include/wx-2.8/wx/imaglist.h \ + /usr/include/wx-2.8/wx/generic/imaglist.h \ + ../../../Windows/Control/Dialog.h ../../../Windows/Window.h \ + ../../../Windows/Defs.h ../../../Windows/../Common/MyWindows.h \ + ../../../Common/MyString.h ../../../Common/MyVector.h \ + ../../../Common/Defs.h ../../../Windows/Control/ComboBox.h \ + ../../../Windows/Control/Edit.h ../../../Windows/Control/ProgressBar.h \ + ../../../Windows/Control/StatusBar.h \ + ../../../Windows/Control/ListView.h +TestUI.o: TestUI.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h /usr/include/wx-2.8/wx/wxprec.h \ + /usr/include/wx-2.8/wx/defs.h /usr/include/wx-2.8/wx/platform.h \ + /usr/lib/wx/include/gtk2-unicode-release-2.8/wx/setup.h \ + /usr/include/wx-2.8/wx/chkconf.h /usr/include/wx-2.8/wx/features.h \ + /usr/include/wx-2.8/wx/version.h /usr/include/wx-2.8/wx/cpp.h \ + /usr/include/wx-2.8/wx/dlimpexp.h /usr/include/wx-2.8/wx/debug.h \ + /usr/include/wx-2.8/wx/wxchar.h /usr/include/wx-2.8/wx/wx.h \ + /usr/include/wx-2.8/wx/object.h /usr/include/wx-2.8/wx/memory.h \ + /usr/include/wx-2.8/wx/string.h /usr/include/wx-2.8/wx/buffer.h \ + /usr/include/wx-2.8/wx/strconv.h /usr/include/wx-2.8/wx/fontenc.h \ + /usr/include/wx-2.8/wx/beforestd.h /usr/include/wx-2.8/wx/afterstd.h \ + /usr/include/wx-2.8/wx/iosfwrap.h /usr/include/wx-2.8/wx/msgout.h \ + /usr/include/wx-2.8/wx/dynarray.h /usr/include/wx-2.8/wx/list.h \ + /usr/include/wx-2.8/wx/hash.h /usr/include/wx-2.8/wx/hashmap.h \ + /usr/include/wx-2.8/wx/arrstr.h /usr/include/wx-2.8/wx/intl.h \ + /usr/include/wx-2.8/wx/log.h /usr/include/wx-2.8/wx/generic/logg.h \ + /usr/include/wx-2.8/wx/event.h /usr/include/wx-2.8/wx/clntdata.h \ + /usr/include/wx-2.8/wx/vector.h /usr/include/wx-2.8/wx/gdicmn.h \ + /usr/include/wx-2.8/wx/math.h /usr/include/wx-2.8/wx/cursor.h \ + /usr/include/wx-2.8/wx/gtk/cursor.h /usr/include/wx-2.8/wx/utils.h \ + /usr/include/wx-2.8/wx/filefn.h /usr/include/wx-2.8/wx/longlong.h \ + /usr/include/wx-2.8/wx/platinfo.h /usr/include/wx-2.8/wx/thread.h \ + /usr/include/wx-2.8/wx/app.h /usr/include/wx-2.8/wx/build.h \ + /usr/include/wx-2.8/wx/init.h /usr/include/wx-2.8/wx/gtk/app.h \ + /usr/include/wx-2.8/wx/stream.h /usr/include/wx-2.8/wx/stopwatch.h \ + /usr/include/wx-2.8/wx/module.h /usr/include/wx-2.8/wx/window.h \ + /usr/include/wx-2.8/wx/font.h /usr/include/wx-2.8/wx/gdiobj.h \ + /usr/include/wx-2.8/wx/gtk/font.h /usr/include/wx-2.8/wx/colour.h \ + /usr/include/wx-2.8/wx/variant.h /usr/include/wx-2.8/wx/datetime.h \ + /usr/include/wx-2.8/wx/gtk/colour.h /usr/include/wx-2.8/wx/region.h \ + /usr/include/wx-2.8/wx/gtk/region.h /usr/include/wx-2.8/wx/validate.h \ + /usr/include/wx-2.8/wx/palette.h \ + /usr/include/wx-2.8/wx/generic/paletteg.h \ + /usr/include/wx-2.8/wx/accel.h /usr/include/wx-2.8/wx/gtk/accel.h \ + /usr/include/wx-2.8/wx/generic/accel.h \ + /usr/include/wx-2.8/wx/gtk/window.h /usr/include/wx-2.8/wx/containr.h \ + /usr/include/wx-2.8/wx/panel.h /usr/include/wx-2.8/wx/generic/panelg.h \ + /usr/include/wx-2.8/wx/toplevel.h /usr/include/wx-2.8/wx/iconbndl.h \ + /usr/include/wx-2.8/wx/gtk/toplevel.h /usr/include/wx-2.8/wx/frame.h \ + /usr/include/wx-2.8/wx/gtk/frame.h /usr/include/wx-2.8/wx/bitmap.h \ + /usr/include/wx-2.8/wx/gtk/bitmap.h /usr/include/wx-2.8/wx/image.h \ + /usr/include/wx-2.8/wx/imagbmp.h /usr/include/wx-2.8/wx/imagpng.h \ + /usr/include/wx-2.8/wx/imaggif.h /usr/include/wx-2.8/wx/imagpcx.h \ + /usr/include/wx-2.8/wx/imagjpeg.h /usr/include/wx-2.8/wx/imagtga.h \ + /usr/include/wx-2.8/wx/imagtiff.h /usr/include/wx-2.8/wx/imagpnm.h \ + /usr/include/wx-2.8/wx/imagxpm.h /usr/include/wx-2.8/wx/imagiff.h \ + /usr/include/wx-2.8/wx/dc.h /usr/include/wx-2.8/wx/brush.h \ + /usr/include/wx-2.8/wx/gtk/brush.h /usr/include/wx-2.8/wx/pen.h \ + /usr/include/wx-2.8/wx/gtk/pen.h /usr/include/wx-2.8/wx/gtk/dc.h \ + /usr/include/wx-2.8/wx/dcgraph.h /usr/include/wx-2.8/wx/geometry.h \ + /usr/include/wx-2.8/wx/graphics.h /usr/include/wx-2.8/wx/dcclient.h \ + /usr/include/wx-2.8/wx/gtk/dcclient.h /usr/include/wx-2.8/wx/dcmemory.h \ + /usr/include/wx-2.8/wx/gtk/dcmemory.h /usr/include/wx-2.8/wx/dcprint.h \ + /usr/include/wx-2.8/wx/dcscreen.h /usr/include/wx-2.8/wx/gtk/dcscreen.h \ + /usr/include/wx-2.8/wx/button.h /usr/include/wx-2.8/wx/control.h \ + /usr/include/wx-2.8/wx/gtk/control.h \ + /usr/include/wx-2.8/wx/gtk/button.h /usr/include/wx-2.8/wx/menuitem.h \ + /usr/include/wx-2.8/wx/gtk/menuitem.h /usr/include/wx-2.8/wx/menu.h \ + /usr/include/wx-2.8/wx/gtk/menu.h /usr/include/wx-2.8/wx/icon.h \ + /usr/include/wx-2.8/wx/iconloc.h /usr/include/wx-2.8/wx/generic/icon.h \ + /usr/include/wx-2.8/wx/dialog.h /usr/include/wx-2.8/wx/gtk/dialog.h \ + /usr/include/wx-2.8/wx/timer.h /usr/include/wx-2.8/wx/gtk/timer.h \ + /usr/include/wx-2.8/wx/settings.h /usr/include/wx-2.8/wx/msgdlg.h \ + /usr/include/wx-2.8/wx/gtk/msgdlg.h /usr/include/wx-2.8/wx/cmndata.h \ + /usr/include/wx-2.8/wx/encinfo.h /usr/include/wx-2.8/wx/dataobj.h \ + /usr/include/wx-2.8/wx/gtk/dataform.h \ + /usr/include/wx-2.8/wx/gtk/dataobj.h \ + /usr/include/wx-2.8/wx/gtk/dataobj2.h /usr/include/wx-2.8/wx/ctrlsub.h \ + /usr/include/wx-2.8/wx/bmpbuttn.h /usr/include/wx-2.8/wx/gtk/bmpbuttn.h \ + /usr/include/wx-2.8/wx/checkbox.h /usr/include/wx-2.8/wx/gtk/checkbox.h \ + /usr/include/wx-2.8/wx/checklst.h /usr/include/wx-2.8/wx/listbox.h \ + /usr/include/wx-2.8/wx/gtk/listbox.h \ + /usr/include/wx-2.8/wx/gtk/checklst.h /usr/include/wx-2.8/wx/choice.h \ + /usr/include/wx-2.8/wx/gtk/choice.h /usr/include/wx-2.8/wx/scrolbar.h \ + /usr/include/wx-2.8/wx/gtk/scrolbar.h /usr/include/wx-2.8/wx/stattext.h \ + /usr/include/wx-2.8/wx/gtk/stattext.h /usr/include/wx-2.8/wx/statbmp.h \ + /usr/include/wx-2.8/wx/gtk/statbmp.h /usr/include/wx-2.8/wx/statbox.h \ + /usr/include/wx-2.8/wx/gtk/statbox.h /usr/include/wx-2.8/wx/radiobox.h \ + /usr/include/wx-2.8/wx/gtk/radiobox.h /usr/include/wx-2.8/wx/radiobut.h \ + /usr/include/wx-2.8/wx/gtk/radiobut.h /usr/include/wx-2.8/wx/textctrl.h \ + /usr/include/wx-2.8/wx/ioswrap.h /usr/include/wx-2.8/wx/gtk/textctrl.h \ + /usr/include/wx-2.8/wx/slider.h /usr/include/wx-2.8/wx/gtk/slider.h \ + /usr/include/wx-2.8/wx/gauge.h /usr/include/wx-2.8/wx/gtk/gauge.h \ + /usr/include/wx-2.8/wx/scrolwin.h /usr/include/wx-2.8/wx/gtk/scrolwin.h \ + /usr/include/wx-2.8/wx/dirdlg.h /usr/include/wx-2.8/wx/gtk/dirdlg.h \ + /usr/include/wx-2.8/wx/generic/dirdlgg.h \ + /usr/include/wx-2.8/wx/toolbar.h /usr/include/wx-2.8/wx/tbarbase.h \ + /usr/include/wx-2.8/wx/gtk/tbargtk.h /usr/include/wx-2.8/wx/combobox.h \ + /usr/include/wx-2.8/wx/gtk/combobox.h /usr/include/wx-2.8/wx/layout.h \ + /usr/include/wx-2.8/wx/sizer.h /usr/include/wx-2.8/wx/mdi.h \ + /usr/include/wx-2.8/wx/gtk/mdi.h /usr/include/wx-2.8/wx/statusbr.h \ + /usr/include/wx-2.8/wx/generic/statusbr.h \ + /usr/include/wx-2.8/wx/choicdlg.h \ + /usr/include/wx-2.8/wx/generic/choicdgg.h \ + /usr/include/wx-2.8/wx/textdlg.h \ + /usr/include/wx-2.8/wx/generic/textdlgg.h \ + /usr/include/wx-2.8/wx/valtext.h /usr/include/wx-2.8/wx/filedlg.h \ + /usr/include/wx-2.8/wx/gtk/filedlg.h \ + /usr/include/wx-2.8/wx/generic/filedlgg.h \ + /usr/include/wx-2.8/wx/listctrl.h /usr/include/wx-2.8/wx/listbase.h \ + /usr/include/wx-2.8/wx/generic/listctrl.h ../../../../GUI/p7zip_32.xpm \ + ../../UI/FileManager/PasswordDialog.h ../../../Windows/Control/Dialog.h \ + ../../../Windows/Window.h ../../../Windows/Defs.h \ + ../../../Windows/../Common/MyWindows.h ../../../Common/MyString.h \ + ../../../Common/MyVector.h ../../../Common/Defs.h \ + ../../../Windows/Control/Edit.h \ + ../../UI/FileManager/PasswordDialogRes.h \ + ../../../Windows/Control/DialogImpl.h diff --git a/CPP/7zip/TEST/TestUI/makefile.list b/CPP/7zip/TEST/TestUI/makefile.list new file mode 100644 index 0000000..28688dd --- /dev/null +++ b/CPP/7zip/TEST/TestUI/makefile.list @@ -0,0 +1,16 @@ +SRCS=\ + ../../UI/FileManager/PasswordDialog.cpp \ + ../../UI/FileManager/PasswordDialog_rc.cpp \ + ../../../Windows/Window.cpp \ + ../../../Windows/Control/Dialog.cpp \ + ../../../Windows/Control/Controls.cpp \ + TestUI.cpp \ + +SRCS_C=\ + ../../../../C/Threads.c + +include ../../../../makefile.rules + +TestUI.o : TestUI.cpp + $(CXX) $(CXXFLAGS) TestUI.cpp + diff --git a/CPP/7zip/UI/Agent/Agent.cpp b/CPP/7zip/UI/Agent/Agent.cpp new file mode 100644 index 0000000..4a09930 --- /dev/null +++ b/CPP/7zip/UI/Agent/Agent.cpp @@ -0,0 +1,645 @@ +// Agent.cpp + +#include "StdAfx.h" + +#include "../../../../C/Sort.h" + +#include "Common/ComTry.h" + +#include "../Common/ArchiveExtractCallback.h" + +#include "Agent.h" + +using namespace NWindows; + +STDMETHODIMP CAgentFolder::GetAgentFolder(CAgentFolder **agentFolder) +{ + *agentFolder = this; + return S_OK; +} + +void CAgentFolder::LoadFolder(CProxyFolder *folder) +{ + int i; + CProxyItem item; + item.Folder = folder; + for (i = 0; i < folder->Folders.Size(); i++) + { + item.Index = i; + _items.Add(item); + LoadFolder(&folder->Folders[i]); + } + int start = folder->Folders.Size(); + for (i = 0; i < folder->Files.Size(); i++) + { + item.Index = start + i; + _items.Add(item); + } +} + +STDMETHODIMP CAgentFolder::LoadItems() +{ + if (!_agentSpec->_archiveLink.IsOpen) + return E_FAIL; + _items.Clear(); + if (_flatMode) + LoadFolder(_proxyFolderItem); + return S_OK; +} + +STDMETHODIMP CAgentFolder::GetNumberOfItems(UInt32 *numItems) +{ + if (_flatMode) + *numItems = _items.Size(); + else + *numItems = _proxyFolderItem->Folders.Size() +_proxyFolderItem->Files.Size(); + return S_OK; +} + +UString CAgentFolder::GetName(UInt32 index) const +{ + UInt32 realIndex; + const CProxyFolder *folder; + if (_flatMode) + { + const CProxyItem &item = _items[index]; + folder = item.Folder; + realIndex = item.Index; + } + else + { + folder = _proxyFolderItem; + realIndex = index; + } + + if (realIndex < (UInt32)folder->Folders.Size()) + return folder->Folders[realIndex].Name; + return folder->Files[realIndex - folder->Folders.Size()].Name; +} + +UString CAgentFolder::GetPrefix(UInt32 index) const +{ + if (!_flatMode) + return UString(); + const CProxyItem &item = _items[index]; + const CProxyFolder *folder = item.Folder; + UString path; + while (folder != _proxyFolderItem) + { + path = folder->Name + UString(WCHAR_PATH_SEPARATOR) + path; + folder = folder->Parent; + } + return path; +} + +UString CAgentFolder::GetFullPathPrefixPlusPrefix(UInt32 index) const +{ + return _proxyFolderItem->GetFullPathPrefix() + GetPrefix(index); +} + +void CAgentFolder::GetPrefixIfAny(UInt32 index, NCOM::CPropVariant &prop) const +{ + if (!_flatMode) + return; + prop = GetPrefix(index); +} + + +STDMETHODIMP CAgentFolder::GetProperty(UInt32 itemIndex, PROPID propID, PROPVARIANT *value) +{ + NCOM::CPropVariant prop; + const CProxyFolder *folder; + UInt32 realIndex; + if (_flatMode) + { + const CProxyItem &item = _items[itemIndex]; + folder = item.Folder; + realIndex = item.Index; + } + else + { + folder = _proxyFolderItem; + realIndex = itemIndex; + } + + if (realIndex < (UInt32)folder->Folders.Size()) + { + const CProxyFolder &item = folder->Folders[realIndex]; + if (!_flatMode && propID == kpidSize) + prop = item.Size; + else if (!_flatMode && propID == kpidPackSize) + prop = item.PackSize; + else + switch(propID) + { + case kpidIsDir: prop = true; break; + case kpidNumSubDirs: prop = item.NumSubFolders; break; + case kpidNumSubFiles: prop = item.NumSubFiles; break; + case kpidName: prop = item.Name; break; + case kpidCRC: + { + if (item.IsLeaf) + { + RINOK(_agentSpec->GetArchive()->GetProperty(item.Index, propID, value)); + } + if (item.CrcIsDefined && value->vt == VT_EMPTY) + prop = item.Crc; + break; + } + case kpidPrefix: GetPrefixIfAny(itemIndex, prop); break; + + default: + if (item.IsLeaf) + return _agentSpec->GetArchive()->GetProperty(item.Index, propID, value); + } + } + else + { + realIndex -= folder->Folders.Size(); + const CProxyFile &item = folder->Files[realIndex]; + switch(propID) + { + case kpidIsDir: prop = false; break; + case kpidName: prop = item.Name; break; + case kpidPrefix: GetPrefixIfAny(itemIndex, prop); break; + default: + return _agentSpec->GetArchive()->GetProperty(item.Index, propID, value); + } + } + prop.Detach(value); + return S_OK; +} + +HRESULT CAgentFolder::BindToFolder(CProxyFolder *folder, IFolderFolder **resultFolder) +{ + CMyComPtr parentFolder; + if (folder->Parent != _proxyFolderItem) + { + RINOK(BindToFolder(folder->Parent, &parentFolder)); + } + else + parentFolder = this; + CAgentFolder *folderSpec = new CAgentFolder; + CMyComPtr agentFolder = folderSpec; + folderSpec->Init(_proxyArchive, folder, parentFolder, _agentSpec); + *resultFolder = agentFolder.Detach(); + return S_OK; +} + +STDMETHODIMP CAgentFolder::BindToFolder(UInt32 index, IFolderFolder **resultFolder) +{ + COM_TRY_BEGIN + + CProxyFolder *folder; + UInt32 realIndex; + if (_flatMode) + { + const CProxyItem &item = _items[index]; + folder = item.Folder; + realIndex = item.Index; + } + else + { + folder = _proxyFolderItem; + realIndex = index; + } + if (realIndex >= (UInt32)folder->Folders.Size()) + return E_INVALIDARG; + return BindToFolder(&folder->Folders[realIndex], resultFolder); + COM_TRY_END +} + +STDMETHODIMP CAgentFolder::BindToFolder(const wchar_t *name, IFolderFolder **resultFolder) +{ + COM_TRY_BEGIN + int index = _proxyFolderItem->FindDirSubItemIndex(name); + if (index < 0) + return E_INVALIDARG; + return BindToFolder(index, resultFolder); + COM_TRY_END +} + +STDMETHODIMP CAgentFolder::BindToParentFolder(IFolderFolder **resultFolder) +{ + COM_TRY_BEGIN + CMyComPtr parentFolder = _parentFolder; + *resultFolder = parentFolder.Detach(); + return S_OK; + COM_TRY_END +} + +STDMETHODIMP CAgentFolder::GetStream(UInt32 index, ISequentialInStream **stream) +{ + CMyComPtr getStream; + _agentSpec->GetArchive()->QueryInterface(IID_IInArchiveGetStream, (void **)&getStream); + if (!getStream) + return S_OK; + + const CProxyFolder *folder; + UInt32 realIndex; + if (_flatMode) + { + const CProxyItem &item = _items[index]; + folder = item.Folder; + realIndex = item.Index; + } + else + { + folder = _proxyFolderItem; + realIndex = index; + } + + UInt32 indexInArchive; + if (realIndex < (UInt32)folder->Folders.Size()) + { + const CProxyFolder &item = folder->Folders[realIndex]; + if (!item.IsLeaf) + return S_OK; + indexInArchive = item.Index; + } + else + indexInArchive = folder->Files[realIndex - folder->Folders.Size()].Index; + return getStream->GetStream(indexInArchive, stream); +} + +STATPROPSTG kProperties[] = +{ + { NULL, kpidNumSubDirs, VT_UI4}, + { NULL, kpidNumSubFiles, VT_UI4}, + { NULL, kpidPrefix, VT_BSTR} +}; + +static const UInt32 kNumProperties = sizeof(kProperties) / sizeof(kProperties[0]); + +struct CArchiveItemPropertyTemp +{ + UString Name; + PROPID ID; + VARTYPE Type; +}; + +STDMETHODIMP CAgentFolder::GetNumberOfProperties(UInt32 *numProps) +{ + COM_TRY_BEGIN + RINOK(_agentSpec->GetArchive()->GetNumberOfProperties(numProps)); + *numProps += kNumProperties; + if (!_flatMode) + (*numProps)--; + if (!_agentSpec->_proxyArchive->ThereIsPathProp) + (*numProps)++; + return S_OK; + COM_TRY_END +} + +STDMETHODIMP CAgentFolder::GetPropertyInfo(UInt32 index, BSTR *name, PROPID *propID, VARTYPE *varType) +{ + COM_TRY_BEGIN + UInt32 numProps; + _agentSpec->GetArchive()->GetNumberOfProperties(&numProps); + if (!_agentSpec->_proxyArchive->ThereIsPathProp) + { + if (index == 0) + { + *propID = kpidName; + *varType = VT_BSTR; + *name = 0; + return S_OK; + } + index--; + } + + if (index < numProps) + { + RINOK(_agentSpec->GetArchive()->GetPropertyInfo(index, name, propID, varType)); + if (*propID == kpidPath) + *propID = kpidName; + } + else + { + const STATPROPSTG &srcItem = kProperties[index - numProps]; + *propID = srcItem.propid; + *varType = srcItem.vt; + *name = 0; + } + return S_OK; + COM_TRY_END +} + +STATPROPSTG kFolderProps[] = +{ + { NULL, kpidSize, VT_UI8}, + { NULL, kpidPackSize, VT_UI8}, + { NULL, kpidNumSubDirs, VT_UI4}, + { NULL, kpidNumSubFiles, VT_UI4}, + { NULL, kpidCRC, VT_UI4} +}; + +static const UInt32 kNumFolderProps = sizeof(kFolderProps) / sizeof(kFolderProps[0]); + +STDMETHODIMP CAgentFolder::GetFolderProperty(PROPID propID, PROPVARIANT *value) +{ + COM_TRY_BEGIN + NWindows::NCOM::CPropVariant prop; + switch(propID) + { + case kpidSize: prop = _proxyFolderItem->Size; break; + case kpidPackSize: prop = _proxyFolderItem->PackSize; break; + case kpidNumSubDirs: prop = _proxyFolderItem->NumSubFolders; break; + case kpidNumSubFiles: prop = _proxyFolderItem->NumSubFiles; break; + case kpidName: prop = _proxyFolderItem->Name; break; + case kpidPath: prop = _proxyFolderItem->GetFullPathPrefix(); break; + case kpidType: prop = UString(L"7-Zip.") + _agentSpec->ArchiveType; break; + case kpidCRC: if (_proxyFolderItem->CrcIsDefined) prop = _proxyFolderItem->Crc; break; + } + prop.Detach(value); + return S_OK; + COM_TRY_END +} + +STDMETHODIMP CAgentFolder::GetNumberOfFolderProperties(UInt32 *numProps) +{ + *numProps = kNumFolderProps; + return S_OK; +} + +STDMETHODIMP CAgentFolder::GetFolderPropertyInfo(UInt32 index, BSTR *name, PROPID *propID, VARTYPE *varType) +{ + // if (index < kNumFolderProps) + { + const STATPROPSTG &srcItem = kFolderProps[index]; + *propID = srcItem.propid; + *varType = srcItem.vt; + *name = 0; + return S_OK; + } +} + +STDMETHODIMP CAgentFolder::GetFolderArcProps(IFolderArcProps **object) +{ + CMyComPtr temp = _agentSpec; + *object = temp.Detach(); + return S_OK; +} + +#ifdef NEW_FOLDER_INTERFACE + +STDMETHODIMP CAgentFolder::SetFlatMode(Int32 flatMode) +{ + _flatMode = IntToBool(flatMode); + return S_OK; +} + +#endif + +void CAgentFolder::GetRealIndices(const UInt32 *indices, UInt32 numItems, CUIntVector &realIndices) const +{ + if (!_flatMode) + { + _proxyFolderItem->GetRealIndices(indices, numItems, realIndices); + return; + } + realIndices.Clear(); + for(UInt32 i = 0; i < numItems; i++) + { + const CProxyItem &item = _items[indices[i]]; + const CProxyFolder *folder = item.Folder; + UInt32 realIndex = item.Index; + if (realIndex < (UInt32)folder->Folders.Size()) + continue; + realIndices.Add(folder->Files[realIndex - folder->Folders.Size()].Index); + } + HeapSort(&realIndices.Front(), realIndices.Size()); +} + +STDMETHODIMP CAgentFolder::Extract(const UInt32 *indices, + UInt32 numItems, + NExtract::NPathMode::EEnum pathMode, + NExtract::NOverwriteMode::EEnum overwriteMode, + const wchar_t *path, + Int32 testMode, + IFolderArchiveExtractCallback *extractCallback2) +{ + COM_TRY_BEGIN + CArchiveExtractCallback *extractCallbackSpec = new CArchiveExtractCallback; + CMyComPtr extractCallback = extractCallbackSpec; + UStringVector pathParts; + CProxyFolder *currentProxyFolder = _proxyFolderItem; + while (currentProxyFolder->Parent) + { + pathParts.Insert(0, currentProxyFolder->Name); + currentProxyFolder = currentProxyFolder->Parent; + } + + /* + if (_flatMode) + pathMode = NExtract::NPathMode::kNoPathnames; + */ + + extractCallbackSpec->InitForMulti(false, pathMode, overwriteMode); + + extractCallbackSpec->Init(NULL, &_agentSpec->GetArc(), + extractCallback2, + false, testMode ? true : false, false, + (path ? path : L""), + pathParts, + (UInt64)(Int64)-1); + CUIntVector realIndices; + GetRealIndices(indices, numItems, realIndices); + return _agentSpec->GetArchive()->Extract(&realIndices.Front(), + realIndices.Size(), testMode, extractCallback); + COM_TRY_END +} + +///////////////////////////////////////// +// CAgent + +CAgent::CAgent(): + _proxyArchive(NULL), + _codecs(0) +{ +} + +CAgent::~CAgent() +{ + if (_proxyArchive != NULL) + delete _proxyArchive; +} + +STDMETHODIMP CAgent::Open( + IInStream *inStream, + const wchar_t *filePath, + const wchar_t *arcFormat, + BSTR *archiveType, + IArchiveOpenCallback *openArchiveCallback) +{ + COM_TRY_BEGIN + _archiveFilePath = filePath; + NFile::NFind::CFileInfoW fi; + if (!inStream) + { + if (!fi.Find(_archiveFilePath)) + return ::GetLastError(); + if (fi.IsDir()) + return E_FAIL; + } + CArcInfoEx archiverInfo0, archiverInfo1; + + _compressCodecsInfo.Release(); + _codecs = new CCodecs; + _compressCodecsInfo = _codecs; + RINOK(_codecs->Load()); + + CIntVector formatIndices; + if (!_codecs->FindFormatForArchiveType(arcFormat, formatIndices)) + return S_FALSE; + + RINOK(_archiveLink.Open(_codecs, formatIndices, false, inStream, _archiveFilePath, openArchiveCallback)); + + CArc &arc = _archiveLink.Arcs.Back(); + if (!inStream) + { + arc.MTimeDefined = !fi.IsDevice; + arc.MTime = fi.MTime; + } + + ArchiveType = _codecs->Formats[arc.FormatIndex].Name; + if (archiveType == 0) + return S_OK; + return StringToBstr(ArchiveType, archiveType); + COM_TRY_END +} + +STDMETHODIMP CAgent::ReOpen(IArchiveOpenCallback *openArchiveCallback) +{ + COM_TRY_BEGIN + if (_proxyArchive != NULL) + { + delete _proxyArchive; + _proxyArchive = NULL; + } + RINOK(_archiveLink.ReOpen(_codecs, _archiveFilePath, openArchiveCallback)); + return ReadItems(); + COM_TRY_END +} + +STDMETHODIMP CAgent::Close() +{ + COM_TRY_BEGIN + return _archiveLink.Close(); + COM_TRY_END +} + +/* +STDMETHODIMP CAgent::EnumProperties(IEnumSTATPROPSTG **EnumProperties) +{ + return _archive->EnumProperties(EnumProperties); +} +*/ + +HRESULT CAgent::ReadItems() +{ + if (_proxyArchive != NULL) + return S_OK; + _proxyArchive = new CProxyArchive(); + return _proxyArchive->Load(GetArc(), NULL); +} + +STDMETHODIMP CAgent::BindToRootFolder(IFolderFolder **resultFolder) +{ + COM_TRY_BEGIN + RINOK(ReadItems()); + CAgentFolder *folderSpec = new CAgentFolder; + CMyComPtr rootFolder = folderSpec; + folderSpec->Init(_proxyArchive, &_proxyArchive->RootFolder, NULL, this); + *resultFolder = rootFolder.Detach(); + return S_OK; + COM_TRY_END +} + + +STDMETHODIMP CAgent::Extract( + NExtract::NPathMode::EEnum pathMode, + NExtract::NOverwriteMode::EEnum overwriteMode, + const wchar_t *path, + Int32 testMode, + IFolderArchiveExtractCallback *extractCallback2) +{ + COM_TRY_BEGIN + CArchiveExtractCallback *extractCallbackSpec = new CArchiveExtractCallback; + CMyComPtr extractCallback = extractCallbackSpec; + extractCallbackSpec->InitForMulti(false, pathMode, overwriteMode); + extractCallbackSpec->Init(NULL, &GetArc(), + extractCallback2, + false, testMode ? true : false, false, + path, + UStringVector(), + (UInt64)(Int64)-1); + return GetArchive()->Extract(0, (UInt32)(Int32)-1, testMode, extractCallback); + COM_TRY_END +} + +STDMETHODIMP CAgent::GetNumberOfProperties(UInt32 *numProps) +{ + COM_TRY_BEGIN + return GetArchive()->GetNumberOfProperties(numProps); + COM_TRY_END +} + +STDMETHODIMP CAgent::GetPropertyInfo(UInt32 index, + BSTR *name, PROPID *propID, VARTYPE *varType) +{ + COM_TRY_BEGIN + RINOK(GetArchive()->GetPropertyInfo(index, name, propID, varType)); + if (*propID == kpidPath) + *propID = kpidName; + return S_OK; + COM_TRY_END +} + +STDMETHODIMP CAgent::GetArcNumLevels(UInt32 *numLevels) +{ + *numLevels = _archiveLink.Arcs.Size(); + return S_OK; +} + +STDMETHODIMP CAgent::GetArcProp(UInt32 level, PROPID propID, PROPVARIANT *value) +{ + COM_TRY_BEGIN + NWindows::NCOM::CPropVariant prop; + CArc &arc = _archiveLink.Arcs[level]; + switch(propID) + { + case kpidType: prop = GetTypeOfArc(arc); break; + case kpidPath: prop = arc.Path; break; + default: return arc.Archive->GetArchiveProperty(propID, value); + } + prop.Detach(value); + return S_OK; + COM_TRY_END +} + +STDMETHODIMP CAgent::GetArcNumProps(UInt32 level, UInt32 *numProps) +{ + return _archiveLink.Arcs[level].Archive->GetNumberOfArchiveProperties(numProps); +} + +STDMETHODIMP CAgent::GetArcPropInfo(UInt32 level, UInt32 index, BSTR *name, PROPID *propID, VARTYPE *varType) +{ + return _archiveLink.Arcs[level].Archive->GetArchivePropertyInfo(index, name, propID, varType); +} + +// MainItemProperty +STDMETHODIMP CAgent::GetArcProp2(UInt32 level, PROPID propID, PROPVARIANT *value) +{ + return _archiveLink.Arcs[level - 1].Archive->GetProperty(_archiveLink.Arcs[level].SubfileIndex, propID, value); +} + +STDMETHODIMP CAgent::GetArcNumProps2(UInt32 level, UInt32 *numProps) +{ + return _archiveLink.Arcs[level - 1].Archive->GetNumberOfProperties(numProps); +} + +STDMETHODIMP CAgent::GetArcPropInfo2(UInt32 level, UInt32 index, BSTR *name, PROPID *propID, VARTYPE *varType) +{ + return _archiveLink.Arcs[level - 1].Archive->GetPropertyInfo(index, name, propID, varType); +} diff --git a/CPP/7zip/UI/Agent/Agent.h b/CPP/7zip/UI/Agent/Agent.h new file mode 100644 index 0000000..454964b --- /dev/null +++ b/CPP/7zip/UI/Agent/Agent.h @@ -0,0 +1,251 @@ +// Agent/Agent.h + +#ifndef __AGENT_AGENT_H +#define __AGENT_AGENT_H + +#include "Common/MyCom.h" + +#include "Windows/PropVariant.h" + +#include "../Common/OpenArchive.h" +#include "../Common/UpdateAction.h" + +#ifdef NEW_FOLDER_INTERFACE +#include "../FileManager/IFolder.h" +#include "../Common/LoadCodecs.h" +#endif + +#include "AgentProxy.h" +#include "IFolderArchive.h" + +class CAgentFolder; + +DECL_INTERFACE(IArchiveFolderInternal, 0x01, 0xC) +{ + STDMETHOD(GetAgentFolder)(CAgentFolder **agentFolder) PURE; +}; + +struct CProxyItem +{ + CProxyFolder *Folder; + UInt32 Index; +}; + +class CAgent; + +class CAgentFolder: + public IFolderFolder, + public IFolderProperties, + public IGetFolderArcProps, + public IArchiveFolder, + public IArchiveFolderInternal, + public IInArchiveGetStream, +#ifdef NEW_FOLDER_INTERFACE + public IFolderOperations, + public IFolderSetFlatMode, +#endif + public CMyUnknownImp +{ +public: + + MY_QUERYINTERFACE_BEGIN2(IFolderFolder) + MY_QUERYINTERFACE_ENTRY(IFolderProperties) + MY_QUERYINTERFACE_ENTRY(IGetFolderArcProps) + MY_QUERYINTERFACE_ENTRY(IArchiveFolder) + MY_QUERYINTERFACE_ENTRY(IArchiveFolderInternal) + MY_QUERYINTERFACE_ENTRY(IInArchiveGetStream) + #ifdef NEW_FOLDER_INTERFACE + MY_QUERYINTERFACE_ENTRY(IFolderOperations) + MY_QUERYINTERFACE_ENTRY(IFolderSetFlatMode) + #endif + MY_QUERYINTERFACE_END + MY_ADDREF_RELEASE + + void LoadFolder(CProxyFolder *folder); + HRESULT BindToFolder(CProxyFolder *folder, IFolderFolder **resultFolder); + void GetRealIndices(const UINT32 *indices, UINT32 numItems, CUIntVector &realIndices) const; + + INTERFACE_FolderFolder(;) + INTERFACE_FolderProperties(;) + + STDMETHOD(GetFolderArcProps)(IFolderArcProps **object); + + // IArchiveFolder + STDMETHOD(Extract)(const UINT32 *indices, UINT32 numItems, + NExtract::NPathMode::EEnum pathMode, + NExtract::NOverwriteMode::EEnum overwriteMode, + const wchar_t *path, + Int32 testMode, + IFolderArchiveExtractCallback *extractCallback); + + STDMETHOD(GetAgentFolder)(CAgentFolder **agentFolder); + + STDMETHOD(GetStream)(UInt32 index, ISequentialInStream **stream); + + #ifdef NEW_FOLDER_INTERFACE + INTERFACE_FolderOperations(;) + + STDMETHOD(SetFlatMode)(Int32 flatMode); + #endif + + CAgentFolder(): _proxyFolderItem(NULL), _flatMode(0) {} + + void Init(CProxyArchive *proxyHandler, + CProxyFolder *proxyFolderItem, + IFolderFolder *parentFolder, + CAgent *agent) + { + _proxyArchive = proxyHandler; + _proxyFolderItem = proxyFolderItem; + _parentFolder = parentFolder; + _agent = (IInFolderArchive *)agent; + _agentSpec = agent; + } + + void GetPathParts(UStringVector &pathParts); + HRESULT CommonUpdateOperation( + bool deleteOperation, + bool createFolderOperation, + bool renameOperation, + const wchar_t *newItemName, + const NUpdateArchive::CActionSet *actionSet, + const UINT32 *indices, UINT32 numItems, + IFolderArchiveUpdateCallback *updateCallback100); + + + UString GetPrefix(UInt32 index) const; + UString GetName(UInt32 index) const; + UString GetFullPathPrefixPlusPrefix(UInt32 index) const; + void GetPrefixIfAny(UInt32 index, NWindows::NCOM::CPropVariant &propVariant) const; + +public: + CProxyArchive *_proxyArchive; + CProxyFolder *_proxyFolderItem; + CMyComPtr _parentFolder; + CMyComPtr _agent; + CAgent *_agentSpec; + + CRecordVector _items; + bool _flatMode; +private: +}; + +class CAgent: + public IInFolderArchive, + public IFolderArcProps, + #ifndef EXTRACT_ONLY + public IOutFolderArchive, + public ISetProperties, + #endif + public CMyUnknownImp +{ +public: + + MY_QUERYINTERFACE_BEGIN2(IInFolderArchive) + MY_QUERYINTERFACE_ENTRY(IFolderArcProps) + #ifndef EXTRACT_ONLY + MY_QUERYINTERFACE_ENTRY(IOutFolderArchive) + MY_QUERYINTERFACE_ENTRY(ISetProperties) + #endif + MY_QUERYINTERFACE_END + MY_ADDREF_RELEASE + + INTERFACE_IInFolderArchive(;) + INTERFACE_IFolderArcProps(;) + + #ifndef EXTRACT_ONLY + INTERFACE_IOutFolderArchive(;) + + HRESULT CommonUpdate( + const wchar_t *newArchiveName, + int numUpdateItems, + IArchiveUpdateCallback *updateCallback); + + HRESULT CreateFolder( + const wchar_t *newArchiveName, + const wchar_t *folderName, + IFolderArchiveUpdateCallback *updateCallback100); + + HRESULT RenameItem( + const wchar_t *newArchiveName, + const UINT32 *indices, UINT32 numItems, + const wchar_t *newItemName, + IFolderArchiveUpdateCallback *updateCallback100); + + // ISetProperties + STDMETHOD(SetProperties)(const wchar_t **names, const PROPVARIANT *values, Int32 numProperties); + #endif + + CCodecs *_codecs; + CMyComPtr _compressCodecsInfo; + + CAgent(); + ~CAgent(); +private: + HRESULT ReadItems(); +public: + CProxyArchive *_proxyArchive; + CArchiveLink _archiveLink; + + + UString ArchiveType; + + UStringVector _names; + UString _folderPrefix; + + UString _archiveNamePrefix; + CAgentFolder *_agentFolder; + + UString _archiveFilePath; + + #ifndef EXTRACT_ONLY + CObjectVector m_PropNames; + CObjectVector m_PropValues; + #endif + + const CArc &GetArc() { return _archiveLink.Arcs.Back(); } + IInArchive *GetArchive() { if ( _archiveLink.Arcs.IsEmpty()) return 0; return GetArc().Archive; } + bool CanUpdate() const { return _archiveLink.Arcs.Size() <= 1; } + + UString GetTypeOfArc(const CArc &arc) const { return _codecs->Formats[arc.FormatIndex].Name; } + UString GetErrorMessage() const + { + UString s; + for (int i = _archiveLink.Arcs.Size() - 1; i >= 0; i--) + { + const CArc &arc = _archiveLink.Arcs[i]; + if (arc.ErrorMessage.IsEmpty()) + continue; + if (!s.IsEmpty()) + s += L"--------------------\n"; + s += arc.ErrorMessage; + s += L"\n\n["; + s += GetTypeOfArc(arc); + s += L"] "; + s += arc.Path; + s += L"\n"; + } + return s; + } +}; + +#ifdef NEW_FOLDER_INTERFACE +class CArchiveFolderManager: + public IFolderManager, + public CMyUnknownImp +{ +public: + MY_UNKNOWN_IMP1(IFolderManager) + + INTERFACE_IFolderManager(;) + + CArchiveFolderManager(): _codecs(0) {} +private: + void LoadFormats(); + int FindFormat(const UString &type); + CCodecs *_codecs; + CMyComPtr _compressCodecsInfo; +}; +#endif + +#endif diff --git a/CPP/7zip/UI/Agent/AgentOut.cpp b/CPP/7zip/UI/Agent/AgentOut.cpp new file mode 100644 index 0000000..5d9ae62 --- /dev/null +++ b/CPP/7zip/UI/Agent/AgentOut.cpp @@ -0,0 +1,533 @@ +// AgentOut.cpp + +#include "StdAfx.h" + +#include "Common/IntToString.h" +#include "Common/StringConvert.h" + +#include "Windows/FileDir.h" +#include "Windows/PropVariant.h" +#include "Windows/PropVariantConversions.h" +#include "Windows/Time.h" + +#include "../../Compress/CopyCoder.h" + +#include "../../Common/FileStreams.h" + +#include "../Common/EnumDirItems.h" +#include "../Common/OpenArchive.h" +#include "../Common/UpdateCallback.h" +#include "../Common/UpdatePair.h" + +#include "Agent.h" +#include "UpdateCallbackAgent.h" + +using namespace NWindows; +using namespace NCOM; + +STDMETHODIMP CAgent::SetFolder(IFolderFolder *folder) +{ + _archiveNamePrefix.Empty(); + if (folder == NULL) + { + _agentFolder = NULL; + return S_OK; + } + else + { + CMyComPtr archiveFolder = folder; + CMyComPtr archiveFolderInternal; + RINOK(archiveFolder.QueryInterface(IID_IArchiveFolderInternal, &archiveFolderInternal)); + RINOK(archiveFolderInternal->GetAgentFolder(&_agentFolder)); + } + + UStringVector pathParts; + pathParts.Clear(); + CMyComPtr folderItem = folder; + if (folderItem != NULL) + for (;;) + { + CMyComPtr newFolder; + folderItem->BindToParentFolder(&newFolder); + if (newFolder == NULL) + break; + + NCOM::CPropVariant prop; + if (folderItem->GetFolderProperty(kpidName, &prop) == S_OK) + if (prop.vt == VT_BSTR) + pathParts.Insert(0, (const wchar_t *)prop.bstrVal); + folderItem = newFolder; + } + + for (int i = 0; i < pathParts.Size(); i++) + { + _archiveNamePrefix += pathParts[i]; + _archiveNamePrefix += WCHAR_PATH_SEPARATOR; + } + return S_OK; +} + +STDMETHODIMP CAgent::SetFiles(const wchar_t *folderPrefix, + const wchar_t **names, UInt32 numNames) +{ + _folderPrefix = folderPrefix; + _names.Clear(); + _names.Reserve(numNames); + for (UInt32 i = 0; i < numNames; i++) + _names.Add(names[i]); + return S_OK; +} + +static HRESULT EnumerateArchiveItems(CAgent *agent, + const CProxyFolder &item, + const UString &prefix, + CObjectVector &arcItems) +{ + int i; + for (i = 0; i < item.Files.Size(); i++) + { + const CProxyFile &fileItem = item.Files[i]; + CArcItem ai; + RINOK(agent->GetArc().GetItemMTime(fileItem.Index, ai.MTime, ai.MTimeDefined)); + + CPropVariant property; + agent->GetArchive()->GetProperty(fileItem.Index, kpidSize, &property); + ai.SizeDefined = (property.vt != VT_EMPTY); + if (ai.SizeDefined) + ai.Size = ConvertPropVariantToUInt64(property); + ai.IsDir = false; + ai.Name = prefix + fileItem.Name; + ai.Censored = true; // test it + ai.IndexInServer = fileItem.Index; + arcItems.Add(ai); + } + for (i = 0; i < item.Folders.Size(); i++) + { + const CProxyFolder &dirItem = item.Folders[i]; + UString fullName = prefix + dirItem.Name; + if (dirItem.IsLeaf) + { + CArcItem ai; + RINOK(agent->GetArc().GetItemMTime(dirItem.Index, ai.MTime, ai.MTimeDefined)); + ai.IsDir = true; + ai.SizeDefined = false; + ai.Name = fullName; + ai.Censored = true; // test it + ai.IndexInServer = dirItem.Index; + arcItems.Add(ai); + } + RINOK(EnumerateArchiveItems(agent, dirItem, fullName + UString(WCHAR_PATH_SEPARATOR), arcItems)); + } + return S_OK; +} + +struct CAgUpCallbackImp: public IUpdateProduceCallback +{ + const CObjectVector *_arcItems; + IFolderArchiveUpdateCallback *_callback; + + CAgUpCallbackImp(const CObjectVector *a, + IFolderArchiveUpdateCallback *callback): _arcItems(a), _callback(callback) {} + HRESULT ShowDeleteFile(int arcIndex); +}; + +HRESULT CAgUpCallbackImp::ShowDeleteFile(int arcIndex) +{ + return _callback->DeleteOperation((*_arcItems)[arcIndex].Name); +} + +STDMETHODIMP CAgent::DoOperation( + CCodecs *codecs, + int formatIndex, + const wchar_t *newArchiveName, + const Byte *stateActions, + const wchar_t *sfxModule, + IFolderArchiveUpdateCallback *updateCallback100) +{ + if (!CanUpdate()) + return E_NOTIMPL; + NUpdateArchive::CActionSet actionSet; + int i; + for (i = 0; i < NUpdateArchive::NPairState::kNumValues; i++) + actionSet.StateActions[i] = (NUpdateArchive::NPairAction::EEnum)stateActions[i]; + + CDirItems dirItems; + + { + UString folderPrefix = _folderPrefix; + NFile::NName::NormalizeDirPathPrefix(folderPrefix); + UStringVector errorPaths; + CRecordVector errorCodes; + dirItems.EnumerateDirItems2(folderPrefix, _archiveNamePrefix, _names, errorPaths, errorCodes); + if (errorCodes.Size() > 0) + return errorCodes.Front(); + } + + CMyComPtr outArchive; + if (GetArchive()) + { + RINOK(GetArchive()->QueryInterface(IID_IOutArchive, (void **)&outArchive)); + } + else + { + if (formatIndex < 0) + return E_FAIL; + RINOK(codecs->CreateOutArchive(formatIndex, outArchive)); + #ifdef EXTERNAL_CODECS + { + CMyComPtr setCompressCodecsInfo; + outArchive.QueryInterface(IID_ISetCompressCodecsInfo, (void **)&setCompressCodecsInfo); + if (setCompressCodecsInfo) + { + RINOK(setCompressCodecsInfo->SetCompressCodecsInfo(codecs)); + } + } + #endif + + } + + NFileTimeType::EEnum fileTimeType; + UInt32 value; + RINOK(outArchive->GetFileTimeType(&value)); + + switch(value) + { + case NFileTimeType::kWindows: + case NFileTimeType::kDOS: + case NFileTimeType::kUnix: + fileTimeType = NFileTimeType::EEnum(value); + break; + default: + return E_FAIL; + } + + + CObjectVector arcItems; + if (GetArchive()) + { + RINOK(ReadItems()); + EnumerateArchiveItems(this, _proxyArchive->RootFolder, L"", arcItems); + } + + CRecordVector updatePairs2; + + { + CRecordVector updatePairs; + GetUpdatePairInfoList(dirItems, arcItems, fileTimeType, updatePairs); + CAgUpCallbackImp upCallback(&arcItems, updateCallback100); + UpdateProduce(updatePairs, actionSet, updatePairs2, &upCallback); + } + + UInt32 numFiles = 0; + for (i = 0; i < updatePairs2.Size(); i++) + if (updatePairs2[i].NewData) + numFiles++; + + if (updateCallback100) + { + RINOK(updateCallback100->SetNumFiles(numFiles)); + } + + CUpdateCallbackAgent updateCallbackAgent; + updateCallbackAgent.SetCallback(updateCallback100); + CArchiveUpdateCallback *updateCallbackSpec = new CArchiveUpdateCallback; + CMyComPtr updateCallback(updateCallbackSpec ); + + updateCallbackSpec->DirItems = &dirItems; + updateCallbackSpec->ArcItems = &arcItems; + updateCallbackSpec->UpdatePairs = &updatePairs2; + updateCallbackSpec->Archive = GetArchive(); + updateCallbackSpec->Callback = &updateCallbackAgent; + + COutFileStream *outStreamSpec = new COutFileStream; + CMyComPtr outStream(outStreamSpec); + UString archiveName = newArchiveName; + { + UString resultPath; + int pos; + if (!NFile::NDirectory::MyGetFullPathName(archiveName, resultPath, pos)) + return E_FAIL; + NFile::NDirectory::CreateComplexDirectory(resultPath.Left(pos)); + } + if (!outStreamSpec->Create(archiveName, true)) + { + // ShowLastErrorMessage(); + return E_FAIL; + } + + CMyComPtr setProperties; + if (outArchive->QueryInterface(IID_ISetProperties, (void **)&setProperties) == S_OK) + { + if (m_PropNames.Size() == 0) + { + RINOK(setProperties->SetProperties(0, 0, 0)); + } + else + { + CRecordVector names; + for(i = 0; i < m_PropNames.Size(); i++) + names.Add((const wchar_t *)m_PropNames[i]); + + NWindows::NCOM::CPropVariant *propValues = new NWindows::NCOM::CPropVariant[m_PropValues.Size()]; + try + { + for (int i = 0; i < m_PropValues.Size(); i++) + propValues[i] = m_PropValues[i]; + RINOK(setProperties->SetProperties(&names.Front(), propValues, names.Size())); + } + catch(...) + { + delete []propValues; + return E_FAIL; + } + delete []propValues; + } + } + m_PropNames.Clear(); + m_PropValues.Clear(); + + if (sfxModule != NULL) + { + CInFileStream *sfxStreamSpec = new CInFileStream; + CMyComPtr sfxStream(sfxStreamSpec); + if (!sfxStreamSpec->Open(sfxModule)) + return E_FAIL; + // throw "Can't open sfx module"; + RINOK(NCompress::CopyStream(sfxStream, outStream, NULL)); + } + + RINOK(outArchive->UpdateItems(outStream, updatePairs2.Size(),updateCallback)); + return outStreamSpec->Close(); +} + +STDMETHODIMP CAgent::DoOperation2( + const wchar_t *newArchiveName, + const Byte *stateActions, + const wchar_t *sfxModule, + IFolderArchiveUpdateCallback *updateCallback100) +{ + return DoOperation(_codecs, -1, newArchiveName, + stateActions, sfxModule, updateCallback100); +} + +HRESULT CAgent::CommonUpdate( + const wchar_t *newArchiveName, + int numUpdateItems, + IArchiveUpdateCallback *updateCallback) +{ + if (!CanUpdate()) + return E_NOTIMPL; + CMyComPtr outArchive; + RINOK(GetArchive()->QueryInterface(IID_IOutArchive, (void **)&outArchive)); + + COutFileStream *outStreamSpec = new COutFileStream; + CMyComPtr outStream(outStreamSpec); + + UString archiveName = newArchiveName; + { + UString resultPath; + int pos; + if (!NFile::NDirectory::MyGetFullPathName(archiveName, resultPath, pos)) + throw 141716; + NFile::NDirectory::CreateComplexDirectory(resultPath.Left(pos)); + } + + /* + bool isOK = false; + for (int i = 0; i < (1 << 16); i++) + { + resultName = newArchiveName; + if (i > 0) + { + wchar_t s[16]; + ConvertUInt32ToString(i, s); + resultName += s; + } + if (outStreamSpec->Open(realPath)) + { + isOK = true; + break; + } + if (::GetLastError() != ERROR_FILE_EXISTS) + return ::GetLastError(); + } + if (!isOK) + return ::GetLastError(); + */ + if (!outStreamSpec->Create(archiveName, true)) + { + // ShowLastErrorMessage(); + return E_FAIL; + } + + RINOK(outArchive->UpdateItems(outStream, numUpdateItems, updateCallback)); + return outStreamSpec->Close(); +} + + +STDMETHODIMP CAgent::DeleteItems( + const wchar_t *newArchiveName, + const UInt32 *indices, UInt32 numItems, + IFolderArchiveUpdateCallback *updateCallback100) +{ + if (!CanUpdate()) + return E_NOTIMPL; + CUpdateCallbackAgent updateCallbackAgent; + updateCallbackAgent.SetCallback(updateCallback100); + CArchiveUpdateCallback *updateCallbackSpec = new CArchiveUpdateCallback; + CMyComPtr updateCallback(updateCallbackSpec); + + CUIntVector realIndices; + _agentFolder->GetRealIndices(indices, numItems, realIndices); + CRecordVector updatePairs; + int curIndex = 0; + UInt32 numItemsInArchive; + RINOK(GetArchive()->GetNumberOfItems(&numItemsInArchive)); + for (UInt32 i = 0; i < numItemsInArchive; i++) + { + if (curIndex < realIndices.Size()) + if (realIndices[curIndex] == i) + { + curIndex++; + continue; + } + CUpdatePair2 up2; + up2.NewData = up2.NewProps = false; + up2.IsAnti = false; // check it. Maybe it can be undefined + up2.ArcIndex = i; + updatePairs.Add(up2); + } + updateCallbackSpec->UpdatePairs = &updatePairs; + updateCallbackSpec->Archive = GetArchive(); + updateCallbackSpec->Callback = &updateCallbackAgent; + return CommonUpdate(newArchiveName, updatePairs.Size(), updateCallback); +} + +HRESULT CAgent::CreateFolder( + const wchar_t *newArchiveName, + const wchar_t *folderName, + IFolderArchiveUpdateCallback *updateCallback100) +{ + if (!CanUpdate()) + return E_NOTIMPL; + CUpdateCallbackAgent updateCallbackAgent; + updateCallbackAgent.SetCallback(updateCallback100); + CArchiveUpdateCallback *updateCallbackSpec = new CArchiveUpdateCallback; + CMyComPtr updateCallback(updateCallbackSpec); + + CRecordVector updatePairs; + UInt32 numItemsInArchive; + RINOK(GetArchive()->GetNumberOfItems(&numItemsInArchive)); + for (UInt32 i = 0; i < numItemsInArchive; i++) + { + CUpdatePair2 up2; + up2.NewData = up2.NewProps = false; + up2.IsAnti = false; // check it. + up2.ArcIndex = i; + updatePairs.Add(up2); + } + CUpdatePair2 up2; + up2.NewData = up2.NewProps = true; + up2.IsAnti = false; + up2.DirIndex = 0; + + updatePairs.Add(up2); + + updatePairs.ReserveDown(); + + CDirItems dirItems; + CDirItem di; + + di.Attrib = FILE_ATTRIBUTE_DIRECTORY; + di.Size = 0; + di.Name = _agentFolder->_proxyFolderItem->GetFullPathPrefix() + folderName; + + FILETIME ft; + NTime::GetCurUtcFileTime(ft); + di.CTime = di.ATime = di.MTime = ft; + + dirItems.Items.Add(di); + + updateCallbackSpec->Callback = &updateCallbackAgent; + updateCallbackSpec->DirItems = &dirItems; + updateCallbackSpec->UpdatePairs = &updatePairs; + updateCallbackSpec->Archive = GetArchive(); + return CommonUpdate(newArchiveName, updatePairs.Size(), updateCallback); +} + + +HRESULT CAgent::RenameItem( + const wchar_t *newArchiveName, + const UInt32 *indices, UInt32 numItems, + const wchar_t *newItemName, + IFolderArchiveUpdateCallback *updateCallback100) +{ + if (!CanUpdate()) + return E_NOTIMPL; + if (numItems != 1) + return E_INVALIDARG; + CUpdateCallbackAgent updateCallbackAgent; + updateCallbackAgent.SetCallback(updateCallback100); + CArchiveUpdateCallback *updateCallbackSpec = new CArchiveUpdateCallback; + CMyComPtr updateCallback(updateCallbackSpec); + + CUIntVector realIndices; + _agentFolder->GetRealIndices(indices, numItems, realIndices); + + UString fullPrefix = _agentFolder->GetFullPathPrefixPlusPrefix(indices[0]); + UString oldItemPath = fullPrefix + _agentFolder->GetName(indices[0]); + UString newItemPath = fullPrefix + newItemName; + + CRecordVector updatePairs; + UStringVector newNames; + + int curIndex = 0; + UInt32 numItemsInArchive; + RINOK(GetArchive()->GetNumberOfItems(&numItemsInArchive)); + for (UInt32 i = 0; i < numItemsInArchive; i++) + { + if (curIndex < realIndices.Size()) + if (realIndices[curIndex] == i) + { + CUpdatePair2 up2; + up2.NewData = false; + up2.NewProps = true; + RINOK(GetArc().IsItemAnti(i, up2.IsAnti)); + up2.ArcIndex = i; + + UString oldFullPath; + RINOK(GetArc().GetItemPath(i, oldFullPath)); + + if (oldItemPath.CompareNoCase(oldFullPath.Left(oldItemPath.Length())) != 0) + return E_INVALIDARG; + + up2.NewNameIndex = newNames.Add(newItemPath + oldFullPath.Mid(oldItemPath.Length())); + updatePairs.Add(up2); + curIndex++; + continue; + } + CUpdatePair2 up2; + up2.NewData = up2.NewProps = false; + up2.IsAnti = false; + up2.ArcIndex = i; + updatePairs.Add(up2); + } + updateCallbackSpec->Callback = &updateCallbackAgent; + updateCallbackSpec->UpdatePairs = &updatePairs; + updateCallbackSpec->NewNames = &newNames; + updateCallbackSpec->Archive = GetArchive(); + return CommonUpdate(newArchiveName, updatePairs.Size(), updateCallback); +} + +STDMETHODIMP CAgent::SetProperties(const wchar_t **names, + const PROPVARIANT *values, Int32 numProperties) +{ + m_PropNames.Clear(); + m_PropValues.Clear(); + for (int i = 0; i < numProperties; i++) + { + m_PropNames.Add(names[i]); + m_PropValues.Add(values[i]); + } + return S_OK; +} diff --git a/CPP/7zip/UI/Agent/AgentProxy.cpp b/CPP/7zip/UI/Agent/AgentProxy.cpp new file mode 100644 index 0000000..9686cf3 --- /dev/null +++ b/CPP/7zip/UI/Agent/AgentProxy.cpp @@ -0,0 +1,246 @@ +// AgentProxy.cpp + +#include "StdAfx.h" + +#include "../../../../C/Sort.h" + +#include "Windows/PropVariant.h" +#include "Windows/PropVariantConversions.h" + +#include "../Common/OpenArchive.h" + +#include "AgentProxy.h" + +using namespace NWindows; + +int CProxyFolder::FindDirSubItemIndex(const UString &name, int &insertPos) const +{ + int left = 0, right = Folders.Size(); + for (;;) + { + if (left == right) + { + insertPos = left; + return -1; + } + int mid = (left + right) / 2; + int compare = name.CompareNoCase(Folders[mid].Name); + if (compare == 0) + return mid; + if (compare < 0) + right = mid; + else + left = mid + 1; + } +} + +int CProxyFolder::FindDirSubItemIndex(const UString &name) const +{ + int insertPos; + return FindDirSubItemIndex(name, insertPos); +} + +void CProxyFolder::AddFileSubItem(UInt32 index, const UString &name) +{ + Files.Add(CProxyFile()); + Files.Back().Name = name; + Files.Back().Index = index; +} + +CProxyFolder* CProxyFolder::AddDirSubItem(UInt32 index, bool leaf, const UString &name) +{ + int insertPos; + int folderIndex = FindDirSubItemIndex(name, insertPos); + if (folderIndex >= 0) + { + CProxyFolder *item = &Folders[folderIndex]; + if (leaf) + { + item->Index = index; + item->IsLeaf = true; + } + return item; + } + Folders.Insert(insertPos, CProxyFolder()); + CProxyFolder *item = &Folders[insertPos]; + item->Name = name; + item->Index = index; + item->Parent = this; + item->IsLeaf = leaf; + return item; +} + +void CProxyFolder::Clear() +{ + Folders.Clear(); + Files.Clear(); +} + +void CProxyFolder::GetPathParts(UStringVector &pathParts) const +{ + pathParts.Clear(); + UString result; + const CProxyFolder *current = this; + while (current->Parent != NULL) + { + pathParts.Insert(0, (const wchar_t *)current->Name); + current = current->Parent; + } +} + +UString CProxyFolder::GetFullPathPrefix() const +{ + UString result; + const CProxyFolder *current = this; + while (current->Parent != NULL) + { + result = current->Name + UString(WCHAR_PATH_SEPARATOR) + result; + current = current->Parent; + } + return result; +} + +UString CProxyFolder::GetItemName(UInt32 index) const +{ + if (index < (UInt32)Folders.Size()) + return Folders[index].Name; + return Files[index - Folders.Size()].Name; +} + +void CProxyFolder::AddRealIndices(CUIntVector &realIndices) const +{ + if (IsLeaf) + realIndices.Add(Index); + int i; + for (i = 0; i < Folders.Size(); i++) + Folders[i].AddRealIndices(realIndices); + for (i = 0; i < Files.Size(); i++) + realIndices.Add(Files[i].Index); +} + +void CProxyFolder::GetRealIndices(const UInt32 *indices, UInt32 numItems, CUIntVector &realIndices) const +{ + realIndices.Clear(); + for (UInt32 i = 0; i < numItems; i++) + { + int index = indices[i]; + int numDirItems = Folders.Size(); + if (index < numDirItems) + Folders[index].AddRealIndices(realIndices); + else + realIndices.Add(Files[index - numDirItems].Index); + } + HeapSort(&realIndices.Front(), realIndices.Size()); +} + +/////////////////////////////////////////////// +// CProxyArchive + +static UInt64 GetSize(IInArchive *archive, UInt32 index, PROPID propID) +{ + NCOM::CPropVariant prop; + if (archive->GetProperty(index, propID, &prop) == S_OK) + if (prop.vt != VT_EMPTY) + return ConvertPropVariantToUInt64(prop); + return 0; +} + +void CProxyFolder::CalculateSizes(IInArchive *archive) +{ + Size = PackSize = 0; + NumSubFolders = Folders.Size(); + NumSubFiles = Files.Size(); + CrcIsDefined = true; + Crc = 0; + int i; + for (i = 0; i < Files.Size(); i++) + { + UInt32 index = Files[i].Index; + Size += GetSize(archive, index, kpidSize); + PackSize += GetSize(archive, index, kpidPackSize); + { + NCOM::CPropVariant prop; + if (archive->GetProperty(index, kpidCRC, &prop) == S_OK && prop.vt == VT_UI4) + Crc += prop.ulVal; + else + CrcIsDefined = false; + } + } + for (i = 0; i < Folders.Size(); i++) + { + CProxyFolder &f = Folders[i]; + f.CalculateSizes(archive); + Size += f.Size; + PackSize += f.PackSize; + NumSubFiles += f.NumSubFiles; + NumSubFolders += f.NumSubFolders; + Crc += f.Crc; + if (!f.CrcIsDefined) + CrcIsDefined = false; + } +} + +HRESULT CProxyArchive::Load(const CArc &arc, IProgress *progress) +{ + RootFolder.Clear(); + IInArchive *archive = arc.Archive; + { + ThereIsPathProp = false; + UInt32 numProps; + archive->GetNumberOfProperties(&numProps); + for (UInt32 i = 0; i < numProps; i++) + { + CMyComBSTR name; + PROPID propID; + VARTYPE varType; + RINOK(archive->GetPropertyInfo(i, &name, &propID, &varType)); + if (propID == kpidPath) + { + ThereIsPathProp = true; + break; + } + } + } + + UInt32 numItems; + RINOK(archive->GetNumberOfItems(&numItems)); + if (progress != NULL) + { + UInt64 totalItems = numItems; + RINOK(progress->SetTotal(totalItems)); + } + UString fileName; + for (UInt32 i = 0; i < numItems; i++) + { + if (progress != NULL && (i & 0xFFFFF) == 0) + { + UInt64 currentItemIndex = i; + RINOK(progress->SetCompleted(¤tItemIndex)); + } + UString filePath; + RINOK(arc.GetItemPath(i, filePath)); + CProxyFolder *curItem = &RootFolder; + int len = filePath.Length(); + fileName.Empty(); + for (int j = 0; j < len; j++) + { + wchar_t c = filePath[j]; + if (c == WCHAR_PATH_SEPARATOR || c == L'/') + { + curItem = curItem->AddDirSubItem((UInt32)(Int32)-1, false, fileName); + fileName.Empty(); + } + else + fileName += c; + } + + bool isFolder; + RINOK(IsArchiveItemFolder(archive, i, isFolder)); + if (isFolder) + curItem->AddDirSubItem(i, true, fileName); + else + curItem->AddFileSubItem(i, fileName); + } + RootFolder.CalculateSizes(archive); + return S_OK; +} diff --git a/CPP/7zip/UI/Agent/AgentProxy.h b/CPP/7zip/UI/Agent/AgentProxy.h new file mode 100644 index 0000000..d4caca1 --- /dev/null +++ b/CPP/7zip/UI/Agent/AgentProxy.h @@ -0,0 +1,53 @@ +// AgentProxy.h + +#ifndef __AGENT_PROXY_H +#define __AGENT_PROXY_H + +#include "Common/MyString.h" + +#include "../Common/OpenArchive.h" + +struct CProxyFile +{ + UInt32 Index; + UString Name; +}; + +struct CProxyFolder: public CProxyFile +{ + CProxyFolder *Parent; + CObjectVector Folders; + CObjectVector Files; + bool IsLeaf; + + bool CrcIsDefined; + UInt64 Size; + UInt64 PackSize; + UInt32 Crc; + UInt32 NumSubFolders; + UInt32 NumSubFiles; + + CProxyFolder(): Parent(NULL) {}; + int FindDirSubItemIndex(const UString &name, int &insertPos) const; + int FindDirSubItemIndex(const UString &name) const; + CProxyFolder* AddDirSubItem(UInt32 index, bool leaf, const UString &name); + void AddFileSubItem(UInt32 index, const UString &name); + void Clear(); + + void GetPathParts(UStringVector &pathParts) const; + UString GetFullPathPrefix() const; + UString GetItemName(UInt32 index) const; + void AddRealIndices(CUIntVector &realIndices) const; + void GetRealIndices(const UInt32 *indices, UInt32 numItems, CUIntVector &realIndices) const; + void CalculateSizes(IInArchive *archive); +}; + +struct CProxyArchive +{ + CProxyFolder RootFolder; + bool ThereIsPathProp; + + HRESULT Load(const CArc &arc, IProgress *progress); +}; + +#endif diff --git a/CPP/7zip/UI/Agent/ArchiveFolder.cpp b/CPP/7zip/UI/Agent/ArchiveFolder.cpp new file mode 100644 index 0000000..57975e7 --- /dev/null +++ b/CPP/7zip/UI/Agent/ArchiveFolder.cpp @@ -0,0 +1,59 @@ +// Agent/ArchiveFolder.cpp + +#include "StdAfx.h" + +#include "Common/ComTry.h" + +#include "../Common/ArchiveExtractCallback.h" + +#include "Agent.h" + +using namespace NWindows; +using namespace NCOM; + +STDMETHODIMP CAgentFolder::CopyTo(const UInt32 *indices, UInt32 numItems, + const wchar_t *path, IFolderOperationsExtractCallback *callback) +{ + COM_TRY_BEGIN + CArchiveExtractCallback *extractCallbackSpec = new + CArchiveExtractCallback; + CMyComPtr extractCallback = extractCallbackSpec; + UStringVector pathParts; + CProxyFolder *currentProxyFolder = _proxyFolderItem; + while (currentProxyFolder->Parent) + { + pathParts.Insert(0, currentProxyFolder->Name); + currentProxyFolder = currentProxyFolder->Parent; + } + + CMyComPtr extractCallback2; + { + CMyComPtr callbackWrap = callback; + RINOK(callbackWrap.QueryInterface( + IID_IFolderArchiveExtractCallback, &extractCallback2)); + } + + NExtract::NPathMode::EEnum pathMode = _flatMode ? + NExtract::NPathMode::kNoPathnames : + NExtract::NPathMode::kCurrentPathnames; + + extractCallbackSpec->InitForMulti(false, pathMode, NExtract::NOverwriteMode::kAskBefore); + extractCallbackSpec->Init(NULL, &_agentSpec->GetArc(), + extractCallback2, + false, false, false, + path, + pathParts, + (UInt64)(Int64)-1); + CUIntVector realIndices; + GetRealIndices(indices, numItems, realIndices); + return _agentSpec->GetArchive()->Extract(&realIndices.Front(), + realIndices.Size(), BoolToInt(false), extractCallback); + COM_TRY_END +} + +STDMETHODIMP CAgentFolder::MoveTo(const UInt32 * /* indices */, UInt32 /* numItems */, + const wchar_t * /* path */, IFolderOperationsExtractCallback * /* callback */) +{ + return E_NOTIMPL; +} + diff --git a/CPP/7zip/UI/Agent/ArchiveFolderOpen.cpp b/CPP/7zip/UI/Agent/ArchiveFolderOpen.cpp new file mode 100644 index 0000000..e3b604d --- /dev/null +++ b/CPP/7zip/UI/Agent/ArchiveFolderOpen.cpp @@ -0,0 +1,144 @@ +// Zip/ArchiveFolder.cpp + +#include "StdAfx.h" + +#include "Agent.h" + +#include "Common/StringConvert.h" + +extern HINSTANCE g_hInstance; + +static inline UINT GetCurrentFileCodePage() +{ + #ifdef UNDER_CE + return CP_ACP; + #else + return AreFileApisANSI() ? CP_ACP : CP_OEMCP; + #endif +} + +void CArchiveFolderManager::LoadFormats() +{ + if (!_codecs) + { + _compressCodecsInfo = _codecs = new CCodecs; + _codecs->Load(); + } +} + +int CArchiveFolderManager::FindFormat(const UString &type) +{ + for (int i = 0; i < _codecs->Formats.Size(); i++) + if (type.CompareNoCase(_codecs->Formats[i].Name) == 0) + return i; + return -1; +} + +STDMETHODIMP CArchiveFolderManager::OpenFolderFile(IInStream *inStream, + const wchar_t *filePath, const wchar_t *arcFormat, + IFolderFolder **resultFolder, IProgress *progress) +{ + CMyComPtr openArchiveCallback; + if (progress != 0) + { + CMyComPtr progressWrapper = progress; + progressWrapper.QueryInterface(IID_IArchiveOpenCallback, &openArchiveCallback); + } + CAgent *agent = new CAgent(); + CMyComPtr archive = agent; + RINOK(agent->Open(inStream, filePath, arcFormat, NULL, openArchiveCallback)); + return agent->BindToRootFolder(resultFolder); +} + +/* +HRESULT CAgent::FolderReOpen( + IArchiveOpenCallback *openArchiveCallback) +{ + return ReOpenArchive(_archive, _archiveFilePath); +} +*/ + + +/* +STDMETHODIMP CArchiveFolderManager::GetExtensions(const wchar_t *type, BSTR *extensions) +{ + *extensions = 0; + int formatIndex = FindFormat(type); + if (formatIndex < 0) + return E_INVALIDARG; + // Exts[0].Ext; + return StringToBstr(_codecs.Formats[formatIndex].GetAllExtensions(), extensions); +} +*/ + +static void AddIconExt(const CCodecIcons &lib, UString &dest) +{ + for (int j = 0; j < lib.IconPairs.Size(); j++) + { + if (!dest.IsEmpty()) + dest += L' '; + dest += lib.IconPairs[j].Ext; + } +} + +STDMETHODIMP CArchiveFolderManager::GetExtensions(BSTR *extensions) +{ + LoadFormats(); + *extensions = 0; + UString res; + for (int i = 0; i < _codecs->Libs.Size(); i++) + AddIconExt(_codecs->Libs[i], res); + AddIconExt(_codecs->InternalIcons, res); + return StringToBstr(res, extensions); +} + +STDMETHODIMP CArchiveFolderManager::GetIconPath(const wchar_t *ext, BSTR *iconPath, Int32 *iconIndex) +{ + *iconPath = 0; + *iconIndex = 0; +#ifdef _WIN32 + LoadFormats(); + for (int i = 0; i < _codecs->Libs.Size(); i++) + { + const CCodecLib &lib = _codecs->Libs[i]; + int ii; + if (lib.FindIconIndex(ext, ii)) + { + *iconIndex = ii; + return StringToBstr(GetUnicodeString(lib.Path, GetCurrentFileCodePage()), iconPath); + } + } + int ii; + if (_codecs->InternalIcons.FindIconIndex(ext, ii)) + { + *iconIndex = ii; + UString path; + NWindows::NDLL::MyGetModuleFileName(g_hInstance, path); + return StringToBstr(path, iconPath); + } +#endif // #ifdef _WIN32 + return S_OK; +} + +/* +STDMETHODIMP CArchiveFolderManager::GetTypes(BSTR *types) +{ + LoadFormats(); + UString typesStrings; + for(int i = 0; i < _codecs.Formats.Size(); i++) + { + const CArcInfoEx &ai = _codecs.Formats[i]; + if (ai.AssociateExts.Size() == 0) + continue; + if (i != 0) + typesStrings += L' '; + typesStrings += ai.Name; + } + return StringToBstr(typesStrings, types); +} +STDMETHODIMP CArchiveFolderManager::CreateFolderFile(const wchar_t * type, + const wchar_t * filePath, IProgress progress) +{ + return E_NOTIMPL; +} +*/ diff --git a/CPP/7zip/UI/Agent/ArchiveFolderOut.cpp b/CPP/7zip/UI/Agent/ArchiveFolderOut.cpp new file mode 100644 index 0000000..cf3e2d5 --- /dev/null +++ b/CPP/7zip/UI/Agent/ArchiveFolderOut.cpp @@ -0,0 +1,214 @@ +// FolderOut.cpp + +#include "StdAfx.h" + +#include "Common/ComTry.h" + +#include "Windows/FileDir.h" + +#include "../Common/WorkDir.h" + +#include "Agent.h" + +using namespace NWindows; +using namespace NFile; +using namespace NDirectory; + +static LPCWSTR kTempArcivePrefix = L"7zA"; + +void CAgentFolder::GetPathParts(UStringVector &pathParts) +{ + _proxyFolderItem->GetPathParts(pathParts); +} + +HRESULT CAgentFolder::CommonUpdateOperation( + bool deleteOperation, + bool createFolderOperation, + bool renameOperation, + const wchar_t *newItemName, + const NUpdateArchive::CActionSet *actionSet, + const UINT32 *indices, UINT32 numItems, + IFolderArchiveUpdateCallback *updateCallback100) +{ + NWorkDir::CInfo workDirInfo; + workDirInfo.Load(); + UString archiveFilePath = _agentSpec->_archiveFilePath; + UString workDir = GetWorkDir(workDirInfo, archiveFilePath); + CreateComplexDirectory(workDir); + + CTempFileW tempFile; + UString tempFileName; + if (tempFile.Create(workDir, kTempArcivePrefix, tempFileName) == 0) + return E_FAIL; + + /* + if (SetOutProperties(anOutArchive, aCompressionInfo.Method) != S_OK) + return NFileOperationReturnCode::kError; + */ + + //////////////////////////// + // Save FolderItem; + + UStringVector pathParts; + GetPathParts(pathParts); + + HRESULT result; + if (deleteOperation) + result = _agentSpec->DeleteItems(tempFileName, + indices, numItems, updateCallback100); + else if (createFolderOperation) + { + result = _agentSpec->CreateFolder(tempFileName, + newItemName, updateCallback100); + } + else if (renameOperation) + { + result = _agentSpec->RenameItem( + tempFileName, + indices, numItems, + newItemName, + updateCallback100); + } + else + { + Byte actionSetByte[NUpdateArchive::NPairState::kNumValues]; + for (int i = 0; i < NUpdateArchive::NPairState::kNumValues; i++) + actionSetByte[i] = (Byte)actionSet->StateActions[i]; + result = _agentSpec->DoOperation2(tempFileName, actionSetByte, NULL, updateCallback100); + } + + if (result != S_OK) + return result; + + _agentSpec->Close(); + + // m_FolderItem = NULL; + + if (NFind::DoesFileExist(archiveFilePath)) + if (!DeleteFileAlways(archiveFilePath)) + return GetLastError(); + + tempFile.DisableDeleting(); + if (!MyMoveFile(tempFileName, archiveFilePath)) + return GetLastError(); + + { + CMyComPtr openCallback; + if (updateCallback100) + { + RINOK(updateCallback100->QueryInterface(IID_IArchiveOpenCallback, (void **)&openCallback)); + } + RINOK(_agentSpec->ReOpen(openCallback)); + } + + //////////////////////////// + // Restore FolderItem; + + CMyComPtr archiveFolder; + RINOK(_agentSpec->BindToRootFolder(&archiveFolder)); + for (int i = 0; i < pathParts.Size(); i++) + { + CMyComPtr newFolder; + archiveFolder->BindToFolder(pathParts[i], &newFolder); + if(!newFolder) + break; + archiveFolder = newFolder; + } + + CMyComPtr archiveFolderInternal; + RINOK(archiveFolder.QueryInterface(IID_IArchiveFolderInternal, &archiveFolderInternal)); + CAgentFolder *agentFolder; + RINOK(archiveFolderInternal->GetAgentFolder(&agentFolder)); + _proxyFolderItem = agentFolder->_proxyFolderItem; + _proxyArchive = agentFolder->_proxyArchive; + _parentFolder = agentFolder->_parentFolder; + + return S_OK; +} + +STDMETHODIMP CAgentFolder::CopyFrom( + const wchar_t *fromFolderPath, // test it + const wchar_t **itemsPaths, + UINT32 numItems, + IProgress *progress) +{ + COM_TRY_BEGIN + CMyComPtr updateCallback100; + if (progress != 0) + { + RINOK(progress->QueryInterface(IID_IFolderArchiveUpdateCallback, (void **)&updateCallback100)); + } + try + { + RINOK(_agentSpec->SetFiles(fromFolderPath, itemsPaths, numItems)); + RINOK(_agentSpec->SetFolder(this)); + return CommonUpdateOperation(false, false, false, NULL, + &NUpdateArchive::kAddActionSet, 0, 0, updateCallback100); + } + catch(const UString &s) + { + RINOK(updateCallback100->UpdateErrorMessage(UString(L"Error: ") + s)); + return E_FAIL; + } + COM_TRY_END +} + +STDMETHODIMP CAgentFolder::Delete(const UINT32 *indices, UINT32 numItems, IProgress *progress) +{ + COM_TRY_BEGIN + RINOK(_agentSpec->SetFolder(this)); + CMyComPtr updateCallback100; + if (progress != 0) + { + CMyComPtr progressWrapper = progress; + RINOK(progressWrapper.QueryInterface( + IID_IFolderArchiveUpdateCallback, &updateCallback100)); + } + return CommonUpdateOperation(true, false, false, NULL, + &NUpdateArchive::kDeleteActionSet, indices, numItems, updateCallback100); + COM_TRY_END +} + +STDMETHODIMP CAgentFolder::CreateFolder(const wchar_t *name, IProgress *progress) +{ + COM_TRY_BEGIN + if (_proxyFolderItem->FindDirSubItemIndex(name) >= 0) + return ERROR_ALREADY_EXISTS; + RINOK(_agentSpec->SetFolder(this)); + CMyComPtr updateCallback100; + if (progress != 0) + { + CMyComPtr progressWrapper = progress; + RINOK(progressWrapper.QueryInterface(IID_IFolderArchiveUpdateCallback, &updateCallback100)); + } + return CommonUpdateOperation(false, true, false, name, NULL, NULL, 0, updateCallback100); + COM_TRY_END +} + +STDMETHODIMP CAgentFolder::Rename(UINT32 index, const wchar_t *newName, IProgress *progress) +{ + COM_TRY_BEGIN + CUIntVector indices; + indices.Add(index); + RINOK(_agentSpec->SetFolder(this)); + CMyComPtr updateCallback100; + if (progress != 0) + { + CMyComPtr progressWrapper = progress; + RINOK(progressWrapper.QueryInterface(IID_IFolderArchiveUpdateCallback, &updateCallback100)); + } + return CommonUpdateOperation(false, false, true, newName, NULL, &indices.Front(), + indices.Size(), updateCallback100); + COM_TRY_END +} + +STDMETHODIMP CAgentFolder::CreateFile(const wchar_t * /* name */, IProgress * /* progress */) +{ + return E_NOTIMPL; +} + +STDMETHODIMP CAgentFolder::SetProperty(UINT32 /* index */, PROPID /* propID */, + const PROPVARIANT * /* value */, IProgress * /* progress */) +{ + return E_NOTIMPL; +} diff --git a/CPP/7zip/UI/Agent/IFolderArchive.h b/CPP/7zip/UI/Agent/IFolderArchive.h new file mode 100644 index 0000000..867ae27 --- /dev/null +++ b/CPP/7zip/UI/Agent/IFolderArchive.h @@ -0,0 +1,73 @@ +// IFolderArchive.h + +#ifndef __IFOLDER_ARCHIVE_H +#define __IFOLDER_ARCHIVE_H + +#include "../../IDecl.h" +#include "../../Archive/IArchive.h" +#include "../../UI/Common/LoadCodecs.h" +#include "../../UI/FileManager/IFolder.h" + +#include "../Common/ExtractMode.h" +#include "../Common/IFileExtractCallback.h" + +#define FOLDER_ARCHIVE_INTERFACE_SUB(i, base, x) DECL_INTERFACE_SUB(i, base, 0x01, x) +#define FOLDER_ARCHIVE_INTERFACE(i, x) FOLDER_ARCHIVE_INTERFACE_SUB(i, IUnknown, x) + +#define INTERFACE_IArchiveFolder(x) \ + STDMETHOD(Extract)(const UInt32 *indices, UInt32 numItems, \ + NExtract::NPathMode::EEnum pathMode, \ + NExtract::NOverwriteMode::EEnum overwriteMode, \ + const wchar_t *path, Int32 testMode, \ + IFolderArchiveExtractCallback *extractCallback2) x; \ + +FOLDER_ARCHIVE_INTERFACE(IArchiveFolder, 0x05) +{ + INTERFACE_IArchiveFolder(PURE) +}; + +#define INTERFACE_IInFolderArchive(x) \ + STDMETHOD(Open)(IInStream *inStream, const wchar_t *filePath, const wchar_t *arcFormat, BSTR *archiveTypeRes, IArchiveOpenCallback *openArchiveCallback) x; \ + STDMETHOD(ReOpen)(IArchiveOpenCallback *openArchiveCallback) x; \ + STDMETHOD(Close)() x; \ + STDMETHOD(GetNumberOfProperties)(UInt32 *numProperties) x; \ + STDMETHOD(GetPropertyInfo)(UInt32 index, BSTR *name, PROPID *propID, VARTYPE *varType) x; \ + STDMETHOD(BindToRootFolder)(IFolderFolder **resultFolder) x; \ + STDMETHOD(Extract)(NExtract::NPathMode::EEnum pathMode, \ + NExtract::NOverwriteMode::EEnum overwriteMode, const wchar_t *path, \ + Int32 testMode, IFolderArchiveExtractCallback *extractCallback2) x; \ + +FOLDER_ARCHIVE_INTERFACE(IInFolderArchive, 0x0E) +{ + INTERFACE_IInFolderArchive(PURE) +}; + +#define INTERFACE_IFolderArchiveUpdateCallback(x) \ + STDMETHOD(CompressOperation)(const wchar_t *name) x; \ + STDMETHOD(DeleteOperation)(const wchar_t *name) x; \ + STDMETHOD(OperationResult)(Int32 operationResult) x; \ + STDMETHOD(UpdateErrorMessage)(const wchar_t *message) x; \ + STDMETHOD(SetNumFiles)(UInt64 numFiles) x; \ + +FOLDER_ARCHIVE_INTERFACE_SUB(IFolderArchiveUpdateCallback, IProgress, 0x0B) +{ + INTERFACE_IFolderArchiveUpdateCallback(PURE) +}; + +#define INTERFACE_IOutFolderArchive(x) \ + STDMETHOD(SetFolder)(IFolderFolder *folder) x; \ + STDMETHOD(SetFiles)(const wchar_t *folderPrefix, const wchar_t **names, UInt32 numNames) x; \ + STDMETHOD(DeleteItems)(const wchar_t *newArchiveName, \ + const UInt32 *indices, UInt32 numItems, IFolderArchiveUpdateCallback *updateCallback) x; \ + STDMETHOD(DoOperation)(CCodecs *codecs, int index, \ + const wchar_t *newArchiveName, const Byte *stateActions, const wchar_t *sfxModule, \ + IFolderArchiveUpdateCallback *updateCallback) x; \ + STDMETHOD(DoOperation2)(const wchar_t *newArchiveName, const Byte *stateActions, \ + const wchar_t *sfxModule, IFolderArchiveUpdateCallback *updateCallback) x; \ + +FOLDER_ARCHIVE_INTERFACE(IOutFolderArchive, 0x0A) +{ + INTERFACE_IOutFolderArchive(PURE) +}; + +#endif diff --git a/CPP/7zip/UI/Agent/UpdateCallbackAgent.cpp b/CPP/7zip/UI/Agent/UpdateCallbackAgent.cpp new file mode 100644 index 0000000..e4aa443 --- /dev/null +++ b/CPP/7zip/UI/Agent/UpdateCallbackAgent.cpp @@ -0,0 +1,121 @@ +// UpdateCallbackAgent.h + +#include "StdAfx.h" + +#include "Windows/Error.h" +#include "Common/IntToString.h" + +#include "UpdateCallbackAgent.h" + +using namespace NWindows; + +void CUpdateCallbackAgent::SetCallback(IFolderArchiveUpdateCallback *callback) +{ + Callback = callback; + _compressProgress.Release(); + if (Callback) + Callback.QueryInterface(IID_ICompressProgressInfo, &_compressProgress); +} + +HRESULT CUpdateCallbackAgent::SetNumFiles(UInt64 numFiles) +{ + if (Callback) + return Callback->SetNumFiles(numFiles); + return S_OK; +} + + +HRESULT CUpdateCallbackAgent::SetTotal(UINT64 size) +{ + if (Callback) + return Callback->SetTotal(size); + return S_OK; +} + +HRESULT CUpdateCallbackAgent::SetCompleted(const UINT64 *completeValue) +{ + if (Callback) + return Callback->SetCompleted(completeValue); + return S_OK; +} + +HRESULT CUpdateCallbackAgent::SetRatioInfo(const UInt64 *inSize, const UInt64 *outSize) +{ + if (_compressProgress) + return _compressProgress->SetRatioInfo(inSize, outSize); + return S_OK; +} + +HRESULT CUpdateCallbackAgent::CheckBreak() +{ + return S_OK; +} + +HRESULT CUpdateCallbackAgent::Finilize() +{ + return S_OK; +} + +HRESULT CUpdateCallbackAgent::OpenFileError(const wchar_t *name, DWORD systemError) +{ + // if (systemError == ERROR_SHARING_VIOLATION) + { + if (Callback) + { + RINOK(Callback->UpdateErrorMessage( + UString(L"WARNING: ") + + NError::MyFormatMessageW(systemError) + + UString(L": ") + + UString(name))); + return S_FALSE; + } + } + // FailedFiles.Add(name); + return systemError; +} + +HRESULT CUpdateCallbackAgent::GetStream(const wchar_t *name, bool /* isAnti */) +{ + if (Callback) + return Callback->CompressOperation(name); + return S_OK; +} + +HRESULT CUpdateCallbackAgent::SetOperationResult(Int32 operationResult) +{ + if (Callback) + return Callback->OperationResult(operationResult); + return S_OK; +} + +HRESULT CUpdateCallbackAgent::CryptoGetTextPassword2(Int32 *passwordIsDefined, BSTR *password) +{ + *password = NULL; + *passwordIsDefined = BoolToInt(false); + if (!_cryptoGetTextPassword) + { + if (!Callback) + return S_OK; + Callback.QueryInterface(IID_ICryptoGetTextPassword2, &_cryptoGetTextPassword); + if (!_cryptoGetTextPassword) + return S_OK; + } + return _cryptoGetTextPassword->CryptoGetTextPassword2(passwordIsDefined, password); +} + +HRESULT CUpdateCallbackAgent::CryptoGetTextPassword(BSTR *password) +{ + *password = NULL; + CMyComPtr getTextPassword; + Callback.QueryInterface(IID_ICryptoGetTextPassword, &getTextPassword); + if (!getTextPassword) + return E_NOTIMPL; + return getTextPassword->CryptoGetTextPassword(password); +} + +/* +HRESULT CUpdateCallbackAgent::ShowDeleteFile(const wchar_t *name) +{ + return Callback->DeleteOperation(name); +} +*/ diff --git a/CPP/7zip/UI/Agent/UpdateCallbackAgent.h b/CPP/7zip/UI/Agent/UpdateCallbackAgent.h new file mode 100644 index 0000000..1d5ed17 --- /dev/null +++ b/CPP/7zip/UI/Agent/UpdateCallbackAgent.h @@ -0,0 +1,19 @@ +// UpdateCallbackAgent.h + +#ifndef __UPDATECALLBACKAGENT_H +#define __UPDATECALLBACKAGENT_H + +#include "../Common/UpdateCallback.h" +#include "IFolderArchive.h" + +class CUpdateCallbackAgent: public IUpdateCallbackUI +{ + INTERFACE_IUpdateCallbackUI(;) + CMyComPtr _cryptoGetTextPassword; + CMyComPtr Callback; + CMyComPtr _compressProgress; +public: + void SetCallback(IFolderArchiveUpdateCallback *callback); +}; + +#endif diff --git a/CPP/7zip/UI/Client7z/Client7z.cpp b/CPP/7zip/UI/Client7z/Client7z.cpp new file mode 100644 index 0000000..410b800 --- /dev/null +++ b/CPP/7zip/UI/Client7z/Client7z.cpp @@ -0,0 +1,871 @@ +// Client7z.cpp + +#include "StdAfx.h" + +#include "Common/IntToString.h" +#include "Common/MyInitGuid.h" +#include "Common/StringConvert.h" + +#include "Windows/DLL.h" +#include "Windows/FileDir.h" +#include "Windows/FileFind.h" +#include "Windows/FileName.h" +#include "Windows/NtCheck.h" +#include "Windows/PropVariant.h" +#include "Windows/PropVariantConversions.h" + +#include "../../Common/FileStreams.h" + +#include "../../Archive/IArchive.h" + +#include "../../IPassword.h" +#include "../../MyVersion.h" + +// use another CLSIDs, if you want to support other formats (zip, rar, ...). +// {23170F69-40C1-278A-1000-000110070000} +DEFINE_GUID(CLSID_CFormat7z, + 0x23170F69, 0x40C1, 0x278A, 0x10, 0x00, 0x00, 0x01, 0x10, 0x07, 0x00, 0x00); + +using namespace NWindows; + +#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" +" Client7z.exe a archive.7z f1.txt f2.txt : compress two files to archive.7z\n" +" Client7z.exe l archive.7z : List contents of archive.7z\n" +" Client7z.exe x archive.7z : eXtract files from archive.7z\n"; + + +typedef UINT32 (WINAPI * CreateObjectFunc)( + const GUID *clsID, + const GUID *interfaceID, + void **outObject); + + +void PrintString(const UString &s) +{ + printf("%s", (LPCSTR)GetOemString(s)); +} + +void PrintString(const AString &s) +{ + printf("%s", (LPCSTR)s); +} + +void PrintNewLine() +{ + PrintString("\n"); +} + +void PrintStringLn(const AString &s) +{ + PrintString(s); + PrintNewLine(); +} + +void PrintError(const AString &s) +{ + PrintNewLine(); + PrintString(s); + PrintNewLine(); +} + +static HRESULT IsArchiveItemProp(IInArchive *archive, UInt32 index, PROPID propID, bool &result) +{ + NCOM::CPropVariant prop; + RINOK(archive->GetProperty(index, propID, &prop)); + if (prop.vt == VT_BOOL) + result = VARIANT_BOOLToBool(prop.boolVal); + else if (prop.vt == VT_EMPTY) + result = false; + else + return E_FAIL; + return S_OK; +} + +static HRESULT IsArchiveItemFolder(IInArchive *archive, UInt32 index, bool &result) +{ + return IsArchiveItemProp(archive, index, kpidIsDir, result); +} + + +static const wchar_t *kEmptyFileAlias = L"[Content]"; + + +////////////////////////////////////////////////////////////// +// Archive Open callback class + + +class CArchiveOpenCallback: + public IArchiveOpenCallback, + public ICryptoGetTextPassword, + public CMyUnknownImp +{ +public: + MY_UNKNOWN_IMP1(ICryptoGetTextPassword) + + STDMETHOD(SetTotal)(const UInt64 *files, const UInt64 *bytes); + STDMETHOD(SetCompleted)(const UInt64 *files, const UInt64 *bytes); + + STDMETHOD(CryptoGetTextPassword)(BSTR *password); + + bool PasswordIsDefined; + UString Password; + + CArchiveOpenCallback() : PasswordIsDefined(false) {} +}; + +STDMETHODIMP CArchiveOpenCallback::SetTotal(const UInt64 * /* files */, const UInt64 * /* bytes */) +{ + return S_OK; +} + +STDMETHODIMP CArchiveOpenCallback::SetCompleted(const UInt64 * /* files */, const UInt64 * /* bytes */) +{ + return S_OK; +} + +STDMETHODIMP CArchiveOpenCallback::CryptoGetTextPassword(BSTR *password) +{ + if (!PasswordIsDefined) + { + // You can ask real password here from user + // Password = GetPassword(OutStream); + // PasswordIsDefined = true; + PrintError("Password is not defined"); + return E_ABORT; + } + return StringToBstr(Password, password); +} + + +////////////////////////////////////////////////////////////// +// Archive Extracting callback class + +static const wchar_t *kCantDeleteOutputFile = L"ERROR: Can not delete output file "; + +static const char *kTestingString = "Testing "; +static const char *kExtractingString = "Extracting "; +static const char *kSkippingString = "Skipping "; + +static const char *kUnsupportedMethod = "Unsupported Method"; +static const char *kCRCFailed = "CRC Failed"; +static const char *kDataError = "Data Error"; +static const char *kUnknownError = "Unknown Error"; + +class CArchiveExtractCallback: + public IArchiveExtractCallback, + public ICryptoGetTextPassword, + public CMyUnknownImp +{ +public: + MY_UNKNOWN_IMP1(ICryptoGetTextPassword) + + // IProgress + STDMETHOD(SetTotal)(UInt64 size); + STDMETHOD(SetCompleted)(const UInt64 *completeValue); + + // IArchiveExtractCallback + STDMETHOD(GetStream)(UInt32 index, ISequentialOutStream **outStream, Int32 askExtractMode); + STDMETHOD(PrepareOperation)(Int32 askExtractMode); + STDMETHOD(SetOperationResult)(Int32 resultEOperationResult); + + // ICryptoGetTextPassword + STDMETHOD(CryptoGetTextPassword)(BSTR *aPassword); + +private: + CMyComPtr _archiveHandler; + UString _directoryPath; // Output directory + UString _filePath; // name inside arcvhive + UString _diskFilePath; // full path to file on disk + bool _extractMode; + struct CProcessedFileInfo + { + FILETIME MTime; + UInt32 Attrib; + bool isDir; + bool AttribDefined; + bool MTimeDefined; + } _processedFileInfo; + + COutFileStream *_outFileStreamSpec; + CMyComPtr _outFileStream; + +public: + void Init(IInArchive *archiveHandler, const UString &directoryPath); + + UInt64 NumErrors; + bool PasswordIsDefined; + UString Password; + + CArchiveExtractCallback() : PasswordIsDefined(false) {} +}; + +void CArchiveExtractCallback::Init(IInArchive *archiveHandler, const UString &directoryPath) +{ + NumErrors = 0; + _archiveHandler = archiveHandler; + _directoryPath = directoryPath; + NFile::NName::NormalizeDirPathPrefix(_directoryPath); +} + +STDMETHODIMP CArchiveExtractCallback::SetTotal(UInt64 /* size */) +{ + return S_OK; +} + +STDMETHODIMP CArchiveExtractCallback::SetCompleted(const UInt64 * /* completeValue */) +{ + return S_OK; +} + +STDMETHODIMP CArchiveExtractCallback::GetStream(UInt32 index, + ISequentialOutStream **outStream, Int32 askExtractMode) +{ + *outStream = 0; + _outFileStream.Release(); + + { + // Get Name + NCOM::CPropVariant prop; + RINOK(_archiveHandler->GetProperty(index, kpidPath, &prop)); + + UString fullPath; + if (prop.vt == VT_EMPTY) + fullPath = kEmptyFileAlias; + else + { + if (prop.vt != VT_BSTR) + return E_FAIL; + fullPath = prop.bstrVal; + } + _filePath = fullPath; + } + + if (askExtractMode != NArchive::NExtract::NAskMode::kExtract) + return S_OK; + + { + // Get Attrib + NCOM::CPropVariant prop; + RINOK(_archiveHandler->GetProperty(index, kpidAttrib, &prop)); + if (prop.vt == VT_EMPTY) + { + _processedFileInfo.Attrib = 0; + _processedFileInfo.AttribDefined = false; + } + else + { + if (prop.vt != VT_UI4) + return E_FAIL; + _processedFileInfo.Attrib = prop.ulVal; + _processedFileInfo.AttribDefined = true; + } + } + + RINOK(IsArchiveItemFolder(_archiveHandler, index, _processedFileInfo.isDir)); + + { + // Get Modified Time + NCOM::CPropVariant prop; + RINOK(_archiveHandler->GetProperty(index, kpidMTime, &prop)); + _processedFileInfo.MTimeDefined = false; + switch(prop.vt) + { + case VT_EMPTY: + // _processedFileInfo.MTime = _utcMTimeDefault; + break; + case VT_FILETIME: + _processedFileInfo.MTime = prop.filetime; + _processedFileInfo.MTimeDefined = true; + break; + default: + return E_FAIL; + } + + } + { + // Get Size + NCOM::CPropVariant prop; + RINOK(_archiveHandler->GetProperty(index, kpidSize, &prop)); + bool newFileSizeDefined = (prop.vt != VT_EMPTY); + UInt64 newFileSize; + if (newFileSizeDefined) + newFileSize = ConvertPropVariantToUInt64(prop); + } + + + { + // Create folders for file + int slashPos = _filePath.ReverseFind(WCHAR_PATH_SEPARATOR); + if (slashPos >= 0) + NFile::NDirectory::CreateComplexDirectory(_directoryPath + _filePath.Left(slashPos)); + } + + UString fullProcessedPath = _directoryPath + _filePath; + _diskFilePath = fullProcessedPath; + + if (_processedFileInfo.isDir) + { + NFile::NDirectory::CreateComplexDirectory(fullProcessedPath); + } + else + { + NFile::NFind::CFileInfoW fi; + if (fi.Find(fullProcessedPath)) + { + if (!NFile::NDirectory::DeleteFileAlways(fullProcessedPath)) + { + PrintString(UString(kCantDeleteOutputFile) + fullProcessedPath); + return E_ABORT; + } + } + + _outFileStreamSpec = new COutFileStream; + CMyComPtr outStreamLoc(_outFileStreamSpec); + if (!_outFileStreamSpec->Open(fullProcessedPath, CREATE_ALWAYS)) + { + PrintString((UString)L"can not open output file " + fullProcessedPath); + return E_ABORT; + } + _outFileStream = outStreamLoc; + *outStream = outStreamLoc.Detach(); + } + return S_OK; +} + +STDMETHODIMP CArchiveExtractCallback::PrepareOperation(Int32 askExtractMode) +{ + _extractMode = false; + switch (askExtractMode) + { + case NArchive::NExtract::NAskMode::kExtract: _extractMode = true; break; + }; + switch (askExtractMode) + { + case NArchive::NExtract::NAskMode::kExtract: PrintString(kExtractingString); break; + case NArchive::NExtract::NAskMode::kTest: PrintString(kTestingString); break; + case NArchive::NExtract::NAskMode::kSkip: PrintString(kSkippingString); break; + }; + PrintString(_filePath); + return S_OK; +} + +STDMETHODIMP CArchiveExtractCallback::SetOperationResult(Int32 operationResult) +{ + switch(operationResult) + { + case NArchive::NExtract::NOperationResult::kOK: + break; + default: + { + NumErrors++; + PrintString(" "); + switch(operationResult) + { + case NArchive::NExtract::NOperationResult::kUnSupportedMethod: + PrintString(kUnsupportedMethod); + break; + case NArchive::NExtract::NOperationResult::kCRCError: + PrintString(kCRCFailed); + break; + case NArchive::NExtract::NOperationResult::kDataError: + PrintString(kDataError); + break; + default: + PrintString(kUnknownError); + } + } + } + + if (_outFileStream != NULL) + { + if (_processedFileInfo.MTimeDefined) + _outFileStreamSpec->SetMTime(&_processedFileInfo.MTime); + RINOK(_outFileStreamSpec->Close()); + } + _outFileStream.Release(); + if (_extractMode && _processedFileInfo.AttribDefined) + NFile::NDirectory::MySetFileAttributes(_diskFilePath, _processedFileInfo.Attrib); + PrintNewLine(); + return S_OK; +} + + +STDMETHODIMP CArchiveExtractCallback::CryptoGetTextPassword(BSTR *password) +{ + if (!PasswordIsDefined) + { + // You can ask real password here from user + // Password = GetPassword(OutStream); + // PasswordIsDefined = true; + PrintError("Password is not defined"); + return E_ABORT; + } + return StringToBstr(Password, password); +} + + + +////////////////////////////////////////////////////////////// +// Archive Creating callback class + +struct CDirItem +{ + UInt64 Size; + FILETIME CTime; + FILETIME ATime; + FILETIME MTime; + UString Name; + UString FullPath; + UInt32 Attrib; + + bool isDir() const { return (Attrib & FILE_ATTRIBUTE_DIRECTORY) != 0 ; } +}; + +class CArchiveUpdateCallback: + public IArchiveUpdateCallback2, + public ICryptoGetTextPassword2, + public CMyUnknownImp +{ +public: + MY_UNKNOWN_IMP2(IArchiveUpdateCallback2, ICryptoGetTextPassword2) + + // IProgress + STDMETHOD(SetTotal)(UInt64 size); + STDMETHOD(SetCompleted)(const UInt64 *completeValue); + + // IUpdateCallback2 + STDMETHOD(EnumProperties)(IEnumSTATPROPSTG **enumerator); + STDMETHOD(GetUpdateItemInfo)(UInt32 index, + Int32 *newData, Int32 *newProperties, UInt32 *indexInArchive); + STDMETHOD(GetProperty)(UInt32 index, PROPID propID, PROPVARIANT *value); + STDMETHOD(GetStream)(UInt32 index, ISequentialInStream **inStream); + STDMETHOD(SetOperationResult)(Int32 operationResult); + STDMETHOD(GetVolumeSize)(UInt32 index, UInt64 *size); + STDMETHOD(GetVolumeStream)(UInt32 index, ISequentialOutStream **volumeStream); + + STDMETHOD(CryptoGetTextPassword2)(Int32 *passwordIsDefined, BSTR *password); + +public: + CRecordVector VolumesSizes; + UString VolName; + UString VolExt; + + UString DirPrefix; + const CObjectVector *DirItems; + + bool PasswordIsDefined; + UString Password; + bool AskPassword; + + bool m_NeedBeClosed; + + UStringVector FailedFiles; + CRecordVector FailedCodes; + + CArchiveUpdateCallback(): PasswordIsDefined(false), AskPassword(false), DirItems(0) {}; + + ~CArchiveUpdateCallback() { Finilize(); } + HRESULT Finilize(); + + void Init(const CObjectVector *dirItems) + { + DirItems = dirItems; + m_NeedBeClosed = false; + FailedFiles.Clear(); + FailedCodes.Clear(); + } +}; + +STDMETHODIMP CArchiveUpdateCallback::SetTotal(UInt64 /* size */) +{ + return S_OK; +} + +STDMETHODIMP CArchiveUpdateCallback::SetCompleted(const UInt64 * /* completeValue */) +{ + return S_OK; +} + + +STDMETHODIMP CArchiveUpdateCallback::EnumProperties(IEnumSTATPROPSTG ** /* enumerator */) +{ + return E_NOTIMPL; +} + +STDMETHODIMP CArchiveUpdateCallback::GetUpdateItemInfo(UInt32 /* index */, + Int32 *newData, Int32 *newProperties, UInt32 *indexInArchive) +{ + if (newData != NULL) + *newData = BoolToInt(true); + if (newProperties != NULL) + *newProperties = BoolToInt(true); + if (indexInArchive != NULL) + *indexInArchive = (UInt32)-1; + return S_OK; +} + +STDMETHODIMP CArchiveUpdateCallback::GetProperty(UInt32 index, PROPID propID, PROPVARIANT *value) +{ + NWindows::NCOM::CPropVariant prop; + + if (propID == kpidIsAnti) + { + prop = false; + prop.Detach(value); + return S_OK; + } + + { + const CDirItem &dirItem = (*DirItems)[index]; + switch(propID) + { + case kpidPath: prop = dirItem.Name; break; + case kpidIsDir: prop = dirItem.isDir(); break; + case kpidSize: prop = dirItem.Size; break; + case kpidAttrib: prop = dirItem.Attrib; break; + case kpidCTime: prop = dirItem.CTime; break; + case kpidATime: prop = dirItem.ATime; break; + case kpidMTime: prop = dirItem.MTime; break; + } + } + prop.Detach(value); + return S_OK; +} + +HRESULT CArchiveUpdateCallback::Finilize() +{ + if (m_NeedBeClosed) + { + PrintNewLine(); + m_NeedBeClosed = false; + } + return S_OK; +} + +static void GetStream2(const wchar_t *name) +{ + PrintString("Compressing "); + if (name[0] == 0) + name = kEmptyFileAlias; + PrintString(name); +} + +STDMETHODIMP CArchiveUpdateCallback::GetStream(UInt32 index, ISequentialInStream **inStream) +{ + RINOK(Finilize()); + + const CDirItem &dirItem = (*DirItems)[index]; + GetStream2(dirItem.Name); + + if (dirItem.isDir()) + return S_OK; + + { + CInFileStream *inStreamSpec = new CInFileStream; + CMyComPtr inStreamLoc(inStreamSpec); + UString path = DirPrefix + dirItem.FullPath; + if (!inStreamSpec->Open(path)) + { + DWORD sysError = ::GetLastError(); + FailedCodes.Add(sysError); + FailedFiles.Add(path); + // if (systemError == ERROR_SHARING_VIOLATION) + { + PrintNewLine(); + PrintError("WARNING: can't open file"); + // PrintString(NError::MyFormatMessageW(systemError)); + return S_FALSE; + } + // return sysError; + } + *inStream = inStreamLoc.Detach(); + } + return S_OK; +} + +STDMETHODIMP CArchiveUpdateCallback::SetOperationResult(Int32 /* operationResult */) +{ + m_NeedBeClosed = true; + return S_OK; +} + +STDMETHODIMP CArchiveUpdateCallback::GetVolumeSize(UInt32 index, UInt64 *size) +{ + if (VolumesSizes.Size() == 0) + return S_FALSE; + if (index >= (UInt32)VolumesSizes.Size()) + index = VolumesSizes.Size() - 1; + *size = VolumesSizes[index]; + return S_OK; +} + +STDMETHODIMP CArchiveUpdateCallback::GetVolumeStream(UInt32 index, ISequentialOutStream **volumeStream) +{ + wchar_t temp[16]; + ConvertUInt32ToString(index + 1, temp); + UString res = temp; + while (res.Length() < 2) + res = UString(L'0') + res; + UString fileName = VolName; + fileName += L'.'; + fileName += res; + fileName += VolExt; + COutFileStream *streamSpec = new COutFileStream; + CMyComPtr streamLoc(streamSpec); + if (!streamSpec->Create(fileName, false)) + return ::GetLastError(); + *volumeStream = streamLoc.Detach(); + return S_OK; +} + +STDMETHODIMP CArchiveUpdateCallback::CryptoGetTextPassword2(Int32 *passwordIsDefined, BSTR *password) +{ + if (!PasswordIsDefined) + { + if (AskPassword) + { + // You can ask real password here from user + // Password = GetPassword(OutStream); + // PasswordIsDefined = true; + PrintError("Password is not defined"); + return E_ABORT; + } + } + *passwordIsDefined = BoolToInt(PasswordIsDefined); + return StringToBstr(Password, password); +} + + + +////////////////////////////////////////////////////////////////////////// +// Main function + +#define NT_CHECK_FAIL_ACTION PrintError("Unsupported Windows version"); return 1; + +int MY_CDECL main(int numArgs, const char *args[]) +{ + NT_CHECK + + PrintStringLn(kCopyrightString); + + if (numArgs < 3) + { + PrintStringLn(kHelpString); + return 1; + } + NWindows::NDLL::CLibrary lib; + if (!lib.Load(TEXT(kDllName))) + { + PrintError("Can not load 7-zip library"); + return 1; + } + CreateObjectFunc createObjectFunc = (CreateObjectFunc)lib.GetProc("CreateObject"); + if (createObjectFunc == 0) + { + PrintError("Can not get CreateObject"); + return 1; + } + + char c; + { + AString command = args[1]; + if (command.Length() != 1) + { + PrintError("incorrect command"); + return 1; + } + c = MyCharLower(command[0]); + } + UString archiveName = GetUnicodeString(args[2]); + if (c == 'a') + { + // create archive command + if (numArgs < 4) + { + PrintStringLn(kHelpString); + return 1; + } + CObjectVector dirItems; + int i; + for (i = 3; i < numArgs; i++) + { + CDirItem di; + UString name = GetUnicodeString(args[i]); + + NFile::NFind::CFileInfoW fi; + if (!fi.Find(name)) + { + PrintString(UString(L"Can't find file") + name); + return 1; + } + + di.Attrib = fi.Attrib; + di.Size = fi.Size; + di.CTime = fi.CTime; + di.ATime = fi.ATime; + di.MTime = fi.MTime; + di.Name = name; + di.FullPath = name; + dirItems.Add(di); + } + COutFileStream *outFileStreamSpec = new COutFileStream; + CMyComPtr outFileStream = outFileStreamSpec; + if (!outFileStreamSpec->Create(archiveName, false)) + { + PrintError("can't create archive file"); + return 1; + } + + CMyComPtr outArchive; + if (createObjectFunc(&CLSID_CFormat7z, &IID_IOutArchive, (void **)&outArchive) != S_OK) + { + PrintError("Can not get class object"); + return 1; + } + + CArchiveUpdateCallback *updateCallbackSpec = new CArchiveUpdateCallback; + CMyComPtr updateCallback(updateCallbackSpec); + updateCallbackSpec->Init(&dirItems); + // updateCallbackSpec->PasswordIsDefined = true; + // updateCallbackSpec->Password = L"1"; + + /* + { + const wchar_t *names[] = + { + L"s", + L"x" + }; + const int kNumProps = sizeof(names) / sizeof(names[0]); + NWindows::NCOM::CPropVariant values[kNumProps] = + { + false, // solid mode OFF + (UInt32)9 // compression level = 9 - ultra + }; + CMyComPtr setProperties; + outArchive->QueryInterface(IID_ISetProperties, (void **)&setProperties); + if (!setProperties) + { + PrintError("ISetProperties unsupported"); + return 1; + } + RINOK(setProperties->SetProperties(names, values, kNumProps)); + } + */ + + HRESULT result = outArchive->UpdateItems(outFileStream, dirItems.Size(), updateCallback); + updateCallbackSpec->Finilize(); + if (result != S_OK) + { + PrintError("Update Error"); + return 1; + } + for (i = 0; i < updateCallbackSpec->FailedFiles.Size(); i++) + { + PrintNewLine(); + PrintString((UString)L"Error for file: " + updateCallbackSpec->FailedFiles[i]); + } + if (updateCallbackSpec->FailedFiles.Size() != 0) + return 1; + } + else + { + if (numArgs != 3) + { + PrintStringLn(kHelpString); + return 1; + } + + bool listCommand; + if (c == 'l') + listCommand = true; + else if (c == 'x') + listCommand = false; + else + { + PrintError("incorrect command"); + return 1; + } + + CMyComPtr archive; + if (createObjectFunc(&CLSID_CFormat7z, &IID_IInArchive, (void **)&archive) != S_OK) + { + PrintError("Can not get class object"); + return 1; + } + + CInFileStream *fileSpec = new CInFileStream; + CMyComPtr file = fileSpec; + + if (!fileSpec->Open(archiveName)) + { + PrintError("Can not open archive file"); + return 1; + } + + { + CArchiveOpenCallback *openCallbackSpec = new CArchiveOpenCallback; + CMyComPtr openCallback(openCallbackSpec); + openCallbackSpec->PasswordIsDefined = false; + // openCallbackSpec->PasswordIsDefined = true; + // openCallbackSpec->Password = L"1"; + + if (archive->Open(file, 0, openCallback) != S_OK) + { + PrintError("Can not open archive"); + return 1; + } + } + + if (listCommand) + { + // List command + UInt32 numItems = 0; + archive->GetNumberOfItems(&numItems); + for (UInt32 i = 0; i < numItems; i++) + { + { + // Get uncompressed size of file + NWindows::NCOM::CPropVariant prop; + archive->GetProperty(i, kpidSize, &prop); + UString s = ConvertPropVariantToString(prop); + PrintString(s); + PrintString(" "); + } + { + // Get name of file + NWindows::NCOM::CPropVariant prop; + archive->GetProperty(i, kpidPath, &prop); + UString s = ConvertPropVariantToString(prop); + PrintString(s); + } + PrintString("\n"); + } + } + else + { + // Extract command + CArchiveExtractCallback *extractCallbackSpec = new CArchiveExtractCallback; + CMyComPtr extractCallback(extractCallbackSpec); + extractCallbackSpec->Init(archive, L""); // second parameter is output folder path + extractCallbackSpec->PasswordIsDefined = false; + // extractCallbackSpec->PasswordIsDefined = true; + // extractCallbackSpec->Password = L"1"; + HRESULT result = archive->Extract(NULL, (UInt32)(Int32)(-1), false, extractCallback); + if (result != S_OK) + { + PrintError("Extract Error"); + return 1; + } + } + } + return 0; +} diff --git a/CPP/7zip/UI/Client7z/makefile b/CPP/7zip/UI/Client7z/makefile new file mode 100644 index 0000000..c7c7af5 --- /dev/null +++ b/CPP/7zip/UI/Client7z/makefile @@ -0,0 +1,33 @@ +PROG=../../../../bin/Client7z$(BINSUFFIX) + +LOCAL_FLAGS=-DUNICODE -D_UNICODE + +include ../../../../makefile.crc32 +include ../../../../makefile.machine + +PCH_NAME=$(PRE_COMPILED_HEADER) + +LIBS=$(LOCAL_LIBS_DLL) + +OBJS = \ +wine_date_and_time.o \ +MyWindows.o \ +DLL.o \ +FileDir.o \ +FileFind.o \ +FileIO.o \ +FileName.o \ +PropVariant.o \ +PropVariantConversions.o \ +IntToString.o \ +MyString.o \ +StringConvert.o \ +UTFConvert.o \ +MyVector.o \ +Wildcard.o \ +FileStreams.o \ +Threads.o \ +Client7z.o + +include ../../../../makefile.glb + diff --git a/CPP/7zip/UI/Client7z/makefile.depend b/CPP/7zip/UI/Client7z/makefile.depend new file mode 100644 index 0000000..af8353a --- /dev/null +++ b/CPP/7zip/UI/Client7z/makefile.depend @@ -0,0 +1,180 @@ +wine_date_and_time.o: ../../../myWindows/wine_date_and_time.cpp \ + ../../../myWindows/config.h ../../../include_windows/windows.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../include_windows/basetyps.h +DLL.o: ../../../Windows/DLL.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../../Windows/DLL.h \ + ../../../Windows/../Common/MyString.h \ + ../../../Windows/../Common/MyVector.h ../../../Windows/../Common/Defs.h \ + ../../../Windows/Defs.h ../../../Windows/../Common/MyWindows.h \ + ../../../Windows/../Common/StringConvert.h \ + ../../../Windows/../Common/MyWindows.h \ + ../../../Windows/../Common/MyString.h ../../../Windows/../Common/Types.h \ + ../../../myWindows/myPrivate.h +FileDir.o: ../../../Windows/FileDir.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../../Windows/FileDir.h \ + ../../../Windows/../Common/MyString.h \ + ../../../Windows/../Common/MyVector.h ../../../Windows/../Common/Defs.h \ + ../../../Windows/Defs.h ../../../Windows/../Common/MyWindows.h \ + ../../../Windows/FileName.h ../../../Windows/../../C/Types.h \ + ../../../Windows/FileFind.h ../../../Windows/../Common/StringConvert.h \ + ../../../Windows/../Common/MyWindows.h \ + ../../../Windows/../Common/MyString.h ../../../Windows/../Common/Types.h \ + ../../../Windows/../Common/IntToString.h ../../../myWindows/myPrivate.h \ + ../../../Windows/Synchronization.h ../../../Windows/../../C/Threads.h \ + ../../../Windows/../../C/Types.h ../../../Windows/Synchronization2.h +FileFind.o: ../../../Windows/FileFind.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../../Windows/FileFind.h \ + ../../../Windows/../Common/MyString.h \ + ../../../Windows/../Common/MyVector.h ../../../Windows/../Common/Defs.h \ + ../../../Windows/FileName.h ../../../Windows/../../C/Types.h \ + ../../../Windows/Defs.h ../../../Windows/../Common/MyWindows.h \ + ../../../Windows/../Common/StringConvert.h \ + ../../../Windows/../Common/MyWindows.h \ + ../../../Windows/../Common/MyString.h ../../../Windows/../Common/Types.h \ + ../../../myWindows/myPrivate.h +FileIO.o: ../../../Windows/FileIO.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../../Windows/FileIO.h \ + ../../../Common/MyString.h ../../../Common/MyVector.h \ + ../../../Common/Defs.h ../../../Windows/Defs.h \ + ../../../Windows/../Common/MyWindows.h \ + ../../../Windows/../Common/StringConvert.h \ + ../../../Windows/../Common/MyWindows.h \ + ../../../Windows/../Common/MyString.h ../../../Windows/../Common/Types.h \ + ../../../myWindows/myPrivate.h +FileName.o: ../../../Windows/FileName.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../../Windows/FileName.h \ + ../../../Windows/../../C/Types.h ../../../Windows/../Common/MyString.h \ + ../../../Windows/../Common/MyVector.h ../../../Windows/../Common/Defs.h \ + ../../../Common/Wildcard.h ../../../Common/MyString.h +PropVariant.o: ../../../Windows/PropVariant.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../../Windows/PropVariant.h ../../../Windows/../Common/MyWindows.h \ + ../../../Windows/../Common/Types.h ../../../Windows/../Common/Defs.h +PropVariantConversions.o: ../../../Windows/PropVariantConversions.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../../Common/IntToString.h ../../../Common/StringConvert.h \ + ../../../Common/MyWindows.h ../../../Common/MyString.h \ + ../../../Common/MyVector.h ../../../Common/Defs.h \ + ../../../Windows/Defs.h ../../../Windows/../Common/MyWindows.h \ + ../../../Windows/PropVariantConversions.h ../../../Common/MyString.h +IntToString.o: ../../../Common/IntToString.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../../Common/IntToString.h +MyWindows.o: ../../../Common/MyWindows.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../../Common/MyWindows.h +MyString.o: ../../../Common/MyString.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../../Common/StringConvert.h \ + ../../../Common/MyWindows.h ../../../Common/MyString.h \ + ../../../Common/MyVector.h ../../../Common/Defs.h \ + ../../../myWindows/myPrivate.h +StringConvert.o: ../../../Common/StringConvert.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../../Common/StringConvert.h ../../../Common/MyWindows.h \ + ../../../Common/MyString.h ../../../Common/MyVector.h \ + ../../../Common/Defs.h +UTFConvert.o: ../../../Common/UTFConvert.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../../Common/UTFConvert.h \ + ../../../Common/MyString.h ../../../Common/MyVector.h \ + ../../../Common/Defs.h +MyVector.o: ../../../Common/MyVector.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../../Common/MyVector.h \ + ../../../Common/Defs.h +Wildcard.o: ../../../Common/Wildcard.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../../Common/Wildcard.h \ + ../../../Common/MyString.h ../../../Common/MyVector.h \ + ../../../Common/Defs.h +FileStreams.o: ../../Common/FileStreams.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../Common/FileStreams.h \ + ../../Common/../../Windows/FileIO.h ../../../Common/MyString.h \ + ../../../Common/MyVector.h ../../../Common/Defs.h \ + ../../Common/../../Common/MyCom.h ../../Common/../../Common/MyWindows.h \ + ../../Common/../IStream.h ../../Common/../../Common/MyUnknown.h \ + ../../Common/../../Common/Types.h ../../Common/../IDecl.h +Client7z.o: Client7z.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../../Common/IntToString.h \ + ../../../Common/MyInitGuid.h ../../../Common/StringConvert.h \ + ../../../Common/MyWindows.h ../../../Common/MyString.h \ + ../../../Common/MyVector.h ../../../Common/Defs.h ../../../Windows/DLL.h \ + ../../../Windows/../Common/MyString.h ../../../Windows/FileDir.h \ + ../../../Windows/Defs.h ../../../Windows/../Common/MyWindows.h \ + ../../../Windows/FileFind.h ../../../Windows/FileName.h \ + ../../../Windows/../../C/Types.h ../../../Windows/FileName.h \ + ../../../Windows/NtCheck.h ../../../Windows/PropVariant.h \ + ../../../Windows/../Common/Types.h \ + ../../../Windows/PropVariantConversions.h ../../../Common/MyString.h \ + ../../Common/FileStreams.h ../../Common/../../Windows/FileIO.h \ + ../../Common/../../Common/MyCom.h ../../Common/../../Common/MyWindows.h \ + ../../Common/../IStream.h ../../Common/../../Common/MyUnknown.h \ + ../../Common/../../Common/Types.h ../../Common/../IDecl.h \ + ../../Archive/IArchive.h ../../Archive/../IProgress.h \ + ../../Archive/../../Common/MyUnknown.h \ + ../../Archive/../../Common/Types.h ../../Archive/../IDecl.h \ + ../../Archive/../IStream.h ../../Archive/../PropID.h ../../IPassword.h \ + ../../../Common/MyUnknown.h ../../../Common/Types.h ../../IDecl.h \ + ../../MyVersion.h diff --git a/CPP/7zip/UI/Client7z/makefile.list b/CPP/7zip/UI/Client7z/makefile.list new file mode 100644 index 0000000..801bf3e --- /dev/null +++ b/CPP/7zip/UI/Client7z/makefile.list @@ -0,0 +1,23 @@ +SRCS=\ +../../../myWindows/wine_date_and_time.cpp \ +../../../Windows/DLL.cpp \ +../../../Windows/FileDir.cpp \ +../../../Windows/FileFind.cpp \ +../../../Windows/FileIO.cpp \ +../../../Windows/FileName.cpp \ +../../../Windows/PropVariant.cpp \ +../../../Windows/PropVariantConversions.cpp \ +../../../Common/IntToString.cpp \ +../../../Common/MyWindows.cpp \ +../../../Common/MyString.cpp \ +../../../Common/StringConvert.cpp \ +../../../Common/UTFConvert.cpp \ +../../../Common/MyVector.cpp \ +../../../Common/Wildcard.cpp \ +../../Common/FileStreams.cpp \ +./Client7z.cpp + +include ../../../../makefile.rules + +Client7z.o : ./Client7z.cpp + $(CXX) $(CXXFLAGS) ./Client7z.cpp diff --git a/CPP/7zip/UI/ClientCodec/ClientCodec.cpp b/CPP/7zip/UI/ClientCodec/ClientCodec.cpp new file mode 100644 index 0000000..664889b --- /dev/null +++ b/CPP/7zip/UI/ClientCodec/ClientCodec.cpp @@ -0,0 +1,370 @@ +// Client7z.cpp + +#include "StdAfx.h" + +#ifdef _WIN32 +#include +#else +#include "Common/MyInitGuid.h" +#endif + +#include "Windows/DLL.h" +#include "../../ICoder.h" +#include "Windows/PropVariant.h" +#include "Common/MyCom.h" + +using namespace NWindows; + +class CFileIn : public ISequentialInStream, public CMyUnknownImp +{ + FILE *file_; + size_t pos_; + public: + MY_UNKNOWN_IMP + + CFileIn() : file_(0) , pos_(0) { } + ~CFileIn() { this->close(); } + + HRESULT open(const char *name) + { + file_ = fopen(name,"rb"); + if (file_) return S_OK; + return E_FAIL; + } + void close() + { + if (file_) fclose(file_); + file_ = 0; + pos_ = 0; + } + HRESULT Read(void *data, UInt32 size, UInt32 *processedSize) + { + if (file_) + { + size_t ret = fread (data, 1, size, file_); + *processedSize = ret; + pos_ += ret; + // TBD : if ret == 0, test for feof/ferror + return S_OK; + } + return E_FAIL; + } + size_t pos() { return pos_; } +}; + +class CFileOut : public ISequentialOutStream, public CMyUnknownImp +{ + FILE *file_; + size_t pos_; + public: + MY_UNKNOWN_IMP + + CFileOut() : file_(0) { } + ~CFileOut() { this->close(); } + + HRESULT open(const char *name) + { + file_ = fopen(name,"wb"); + if (file_) return S_OK; + return E_FAIL; + } + void close() + { + if (file_) fclose(file_); + file_ = 0; + } + HRESULT Write(const void *data, UInt32 size, UInt32 *processedSize) + { + if (file_) + { + size_t ret = fwrite(data, 1, size, file_); + *processedSize = ret; + pos_ += ret; + // TBD : if ret == 0, test for feof/ferror + return S_OK; + } + return E_FAIL; + } + size_t pos() { return pos_; } +}; + +////////////////////////////////////////////////////////////////////////// +// Main function + +static const char *kHelpString = +"Usage: ClientCodec codec.so [c | d | i] [file_in file_out]\n" +"Examples:\n" +" ClientCodec LZMA.so i : info about the codec\n" +" ClientCodec LZMA.so e file_in file_out : encodes file_in to file_out\n" +" ClientCodec LZMA.so d file_in file_out : decodes file_in to file_out\n" +; + +typedef UINT32 (WINAPI * CreateObjectFunc)( + const GUID *clsID, + const GUID *interfaceID, + void **outObject); + +typedef UINT32 (WINAPI * GetNumberOfMethodsFunc)(UINT32 *numMethods); + +typedef UINT32 (WINAPI * GetMethodPropertyFunc)(UINT32 index, PROPID propID, PROPVARIANT *value); + +int main(int argc, char* argv[]) +{ + if ((argc != 3) && (argc != 5)) + { + printf(kHelpString); + return 1; + } + + if ((argc == 3) && (strcmp(argv[2],"i") != 0)) + { + printf(kHelpString); + return 1; + } + + NWindows::NDLL::CLibrary library; + if (!library.Load(argv[1])) + { + printf("Can not load library %s\n",argv[1]); + return 1; + } + CreateObjectFunc createObjectFunc = (CreateObjectFunc)library.GetProcAddress("CreateObject"); + if (createObjectFunc == 0) + { + printf("Can not get CreateObject\n"); + return 1; + } + + GetNumberOfMethodsFunc getNumberOfMethodsFunc = (GetNumberOfMethodsFunc)library.GetProcAddress("GetNumberOfMethods"); + if (getNumberOfMethodsFunc == 0) + { + printf("Can not get GetNumberOfMethodsFunc\n"); + return 1; + } + + UINT32 numMethods = 0; + HRESULT res = getNumberOfMethodsFunc(&numMethods); + if (res != S_OK) + { + printf("Error in GetNumberOfMethods\n"); + return 1; + } + + GetMethodPropertyFunc getMethodPropertyFunc = (GetMethodPropertyFunc)library.GetProcAddress("GetMethodProperty"); + if (getMethodPropertyFunc == 0) + { + printf("Can not get GetMethodProperty\n"); + return 1; + } + + if (argv[2][0] == 'i') + { + printf("%s has %d method(s)\n",argv[1],(int)numMethods); + + for(UINT32 m = 0; m < numMethods ; m++) + { + printf("\tMethod %d :\n",(int)m); + NCOM::CPropVariant propVariant; + res = getMethodPropertyFunc(m,NMethodPropID::kName,&propVariant); + if (res == S_OK) + { + if (propVariant.vt == VT_BSTR) + { + printf("\t\tName : %ls\n",propVariant.bstrVal); // Unicode Name + } else { + printf("\t\tName : Error\n"); + } + } else { + printf("\t\tName : Unknown\n"); + } + res = getMethodPropertyFunc(m,NMethodPropID::kDecoder,&propVariant); + if ((res == S_OK) && (propVariant.vt == VT_BSTR)) printf("\t\tDecoder : YES\n"); + else printf("\t\tDecoder : NO\n"); + + res = getMethodPropertyFunc(m,NMethodPropID::kEncoder,&propVariant); + if ((res == S_OK) && (propVariant.vt == VT_BSTR)) printf("\t\tEncoder : YES\n"); + else printf("\t\tEncoder : NO\n"); + } + } + + int numMethod = 0; // TBD + + if (argv[2][0] == 'e') + { + NCOM::CPropVariant propVariant; + res = getMethodPropertyFunc(numMethod,NMethodPropID::kEncoder,&propVariant); + if ((res == S_OK) && (propVariant.vt == VT_BSTR)) + { + CMyComPtr outCoder; + if (createObjectFunc((const GUID *)propVariant.bstrVal, &IID_ICompressCoder, (void **)&outCoder) != S_OK) + { + printf("Can not get class object\n"); + return 1; + } + printf("Encoding : ...\n"); + + CMyComPtr inStream = new CFileIn; + res = inStream->open(argv[3]); + if (res != S_OK) + { + printf("cannot open %s\n",argv[3]); + return 1; + } + + CMyComPtr outStream = new CFileOut; + res = outStream->open(argv[4]); + if (res != S_OK) + { + printf("cannot open %s\n",argv[4]); + return 1; + } +{ + CMyComPtr setCoderProperties; + outCoder.QueryInterface(IID_ICompressSetCoderProperties, &setCoderProperties); + if (setCoderProperties != NULL) + { + printf("IID_ICompressSetCoderProperties : Found\n"); + PROPID propID = NCoderPropID::kEndMarker; + NWindows::NCOM::CPropVariant value = true; + res = setCoderProperties->SetCoderProperties(&propID, &value, 1); + if (res = S_OK) printf("kEndMarker : ON\n"); + else printf("kEndMarker : KO KO\n"); + } + else + { + printf("IID_ICompressSetCoderProperties : NOT Found\n"); + } +} + +{ + CMyComPtr writeCoderProperties; + + outCoder.QueryInterface(IID_ICompressWriteCoderProperties, &writeCoderProperties); + + if (writeCoderProperties != NULL) + { + UINT32 len = 5; // TBD + UInt32 processedSize; + outStream->Write(&len, sizeof(len), &processedSize); + + printf("IID_ICompressWriteCoderProperties : Found\n"); + size_t pos1 = outStream->pos(); + writeCoderProperties->WriteCoderProperties(outStream); + size_t pos2 = outStream->pos(); + printf("SizeOfProp : %d\n",(int)(pos2-pos1)); +/* + CSequentialOutStreamImp *outStreamSpec = new CSequentialOutStreamImp; + CMyComPtr outStream(outStreamSpec); + outStreamSpec->Init(); + writeCoderProperties->WriteCoderProperties(outStream); + + size_t size = outStreamSpec->GetSize(); + + // encodingInfo.Properties.SetCapacity(size); + if (encodingInfo.AltCoders.Size() == 0) + encodingInfo.AltCoders.Add(CAltCoderInfo()); + CAltCoderInfo &altCoderInfo = encodingInfo.AltCoders.Front(); + altCoderInfo.Properties.SetCapacity(size); + + memmove(altCoderInfo.Properties, outStreamSpec->GetBuffer(), size); +*/ + } + else + { + printf("IID_ICompressWriteCoderProperties : NOT Found\n"); + UINT32 len = 0; + UInt32 processedSize; + outStream->Write(&len, sizeof(len), &processedSize); + } +} + + res = outCoder->Code(inStream,outStream,0,0,0); + inStream->close(); + outStream->close(); + + if (res == S_OK) + { + printf("Encoding : Done\n"); + } else { + printf("Encoding : Error\n"); + return 1; + } + } + else + { + printf("Encoder not available\n"); + return 1; + } + } + + if (argv[2][0] == 'd') + { + NCOM::CPropVariant propVariant; + res = getMethodPropertyFunc(numMethod,NMethodPropID::kDecoder,&propVariant); + if ((res == S_OK) && (propVariant.vt == VT_BSTR)) + { + CMyComPtr outCoder; + if (createObjectFunc((const GUID *)propVariant.bstrVal, &IID_ICompressCoder, (void **)&outCoder) != S_OK) + { + printf("Can not get class object\n"); + return 1; + } + printf("Decoding : ...\n"); + + CMyComPtr inStream = new CFileIn; + res = inStream->open(argv[3]); + if (res != S_OK) + { + printf("cannot open %s\n",argv[3]); + return 1; + } + + CMyComPtr outStream = new CFileOut; + res = outStream->open(argv[4]); + if (res != S_OK) + { + printf("cannot open %s\n",argv[4]); + return 1; + } +{ + UINT32 len = 0; + UInt32 processedSize; + inStream->Read(&len, sizeof(len), &processedSize); + + if (len > 0) + { + Byte props[256]; // TBD + inStream->Read(props, len, &processedSize); + + CMyComPtr setDecoderProperties; + outCoder->QueryInterface(IID_ICompressSetDecoderProperties2, (void **)&setDecoderProperties); + if (setDecoderProperties) + { + setDecoderProperties->SetDecoderProperties2(props, len); + printf("IID_ICompressSetDecoderProperties2 : Found (%d)\n",(int)len); + } + } +} + + // FIXME UInt64 outSize = 10511; // res = outCoder->Code(inStream,outStream,0,&outSize,0); + res = outCoder->Code(inStream,outStream,0,0,0); + inStream->close(); + outStream->close(); + + if (res == S_OK) + { + printf("Decoding : Done\n"); + } else { + printf("Decoding : Error\n"); + return 1; + } + } + else + { + printf("Decoder not available\n"); + return 1; + } + } + + return 0; +} diff --git a/CPP/7zip/UI/ClientCodec/makefile b/CPP/7zip/UI/ClientCodec/makefile new file mode 100644 index 0000000..33690da --- /dev/null +++ b/CPP/7zip/UI/ClientCodec/makefile @@ -0,0 +1,41 @@ +PROG=../../../../bin/ClientCodec + +LOCAL_FLAGS=-DUNICODE -D_UNICODE + +include ../../../../makefile.crc32 +include ../../../../makefile.machine + +LIBS=$(LOCAL_LIBS_DLL) + +OBJS = \ +wine_date_and_time.o \ +MyWindows.o \ +ClientCodec.o \ +MyString.o \ +StringConvert.o \ +PropVariant.o \ +DLL.o + + + +.PHONY: test + +#CODER=../../../bin/Codecs/BZip2.so # OK - ICompressWriteCoderProperties : NOT Found +#CODER=../../../bin/Codecs/Copy.so # OK - ICompressWriteCoderProperties : NOT Found +#CODER=../../../bin/Codecs/Deflate.so # OK - ICompressWriteCoderProperties : NOT Found +CODER=../../../bin/Codecs/LZMA.so # OK - ICompressWriteCoderProperties=5 +#CODER=../../../bin/Codecs/PPMD.so # KO Encoder - ICompressWriteCoderProperties=5 + + +test : all + cp ClientCodec.cpp f1 + ../../../../bin/ClientCodec $(CODER) i + ../../../../bin/ClientCodec $(CODER) e f1 f2 + ../../../../bin/ClientCodec $(CODER) d f2 f3 + diff -q f1 f3 + +clean2: + rm -f f1 f2 f3 + +include ../../../../makefile.glb + diff --git a/CPP/7zip/UI/ClientCodec/makefile.depend b/CPP/7zip/UI/ClientCodec/makefile.depend new file mode 100644 index 0000000..5158b87 --- /dev/null +++ b/CPP/7zip/UI/ClientCodec/makefile.depend @@ -0,0 +1,62 @@ +wine_date_and_time.o: ../../../myWindows/wine_date_and_time.cpp \ + ../../../myWindows/config.h ../../../include_windows/windows.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../include_windows/basetyps.h +MyWindows.o: ../../../Common/MyWindows.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../Common/MyWindows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../../Common/MyWindows.h +MyString.o: ../../../Common/MyString.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../Common/MyWindows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../../Common/StringConvert.h \ + ../../../Common/MyWindows.h ../../../Common/MyString.h \ + ../../../Common/MyVector.h ../../../Common/Defs.h \ + ../../../myWindows/myPrivate.h +StringConvert.o: ../../../Common/StringConvert.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../Common/MyWindows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../../Common/StringConvert.h ../../../Common/MyWindows.h \ + ../../../Common/MyString.h ../../../Common/MyVector.h \ + ../../../Common/Defs.h ../../../Common/UTFConvert.cpp \ + ../../../Common/UTFConvert.h +PropVariant.o: ../../../Windows/PropVariant.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../Common/MyWindows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../../Windows/PropVariant.h ../../../Windows/../Common/MyWindows.h \ + ../../../Windows/../Common/Types.h ../../../Windows/../Common/Defs.h +DLL.o: ../../../Windows/DLL.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../Common/MyWindows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../../Windows/DLL.h \ + ../../../Windows/../Common/MyString.h \ + ../../../Windows/../Common/MyVector.h ../../../Windows/../Common/Defs.h \ + ../../../Windows/Defs.h ../../../Windows/../Common/StringConvert.h \ + ../../../Windows/../Common/MyWindows.h \ + ../../../Windows/../Common/MyString.h \ + ../../../Windows/../Common/Types.h ../../../myWindows/myPrivate.h +ClientCodec.o: ClientCodec.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../Common/MyWindows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../../Common/MyInitGuid.h \ + ../../../Windows/DLL.h ../../../Windows/../Common/MyString.h \ + ../../../Windows/../Common/MyVector.h ../../../Windows/../Common/Defs.h \ + ../../ICoder.h ../../IStream.h ../../../Common/MyUnknown.h \ + ../../../Common/MyWindows.h ../../../Common/Types.h \ + ../../../Windows/PropVariant.h ../../../Windows/../Common/MyWindows.h \ + ../../../Windows/../Common/Types.h ../../../Common/MyCom.h \ + ../../../Common/MyWindows.h diff --git a/CPP/7zip/UI/ClientCodec/makefile.list b/CPP/7zip/UI/ClientCodec/makefile.list new file mode 100644 index 0000000..3fc4d2c --- /dev/null +++ b/CPP/7zip/UI/ClientCodec/makefile.list @@ -0,0 +1,24 @@ +SRCS=\ +../../../myWindows/wine_date_and_time.cpp \ +../../../Common/MyWindows.cpp \ +../../../Common/MyString.cpp \ +../../../Common/StringConvert.cpp \ +../../../Windows/PropVariant.cpp \ +../../../Windows/DLL.cpp \ +./ClientCodec.cpp + +wine_date_and_time.o : ../../../myWindows/wine_date_and_time.cpp + $(CXX) $(CXXFLAGS) ../../../myWindows/wine_date_and_time.cpp +MyWindows.o : ../../../Common/MyWindows.cpp + $(CXX) $(CXXFLAGS) ../../../Common/MyWindows.cpp +MyString.o : ../../../Common/MyString.cpp + $(CXX) $(CXXFLAGS) ../../../Common/MyString.cpp +StringConvert.o : ../../../Common/StringConvert.cpp + $(CXX) $(CXXFLAGS) ../../../Common/StringConvert.cpp +PropVariant.o : ../../../Windows/PropVariant.cpp + $(CXX) $(CXXFLAGS) ../../../Windows/PropVariant.cpp +DLL.o : ../../../Windows/DLL.cpp + $(CXX) $(CXXFLAGS) ../../../Windows/DLL.cpp +ClientCodec.o : ./ClientCodec.cpp + $(CXX) $(CXXFLAGS) ./ClientCodec.cpp + diff --git a/CPP/7zip/UI/Common/ArchiveCommandLine.cpp b/CPP/7zip/UI/Common/ArchiveCommandLine.cpp new file mode 100644 index 0000000..d954129 --- /dev/null +++ b/CPP/7zip/UI/Common/ArchiveCommandLine.cpp @@ -0,0 +1,1010 @@ +// ArchiveCommandLine.cpp + +#include "StdAfx.h" + +#ifdef _WIN32 +#ifndef UNDER_CE +#include +#endif +#endif +#include + +#include "Common/ListFileUtils.h" +#include "Common/StringConvert.h" +#include "Common/StringToInt.h" + +#include "Windows/FileDir.h" +#include "Windows/FileName.h" +#ifdef _WIN32 +#include "Windows/FileMapping.h" +#include "Windows/Synchronization.h" +#else +#include "myPrivate.h" +#endif + +#include "ArchiveCommandLine.h" +#include "EnumDirItems.h" +#include "SortUtils.h" +#include "Update.h" +#include "UpdateAction.h" + +extern bool g_CaseSensitive; + +#ifdef UNDER_CE + +#define MY_IS_TERMINAL(x) false; + +#else + +#if _MSC_VER >= 1400 +#define MY_isatty_fileno(x) _isatty(_fileno(x)) +#else +#define MY_isatty_fileno(x) isatty(fileno(x)) +#endif + +#define MY_IS_TERMINAL(x) (MY_isatty_fileno(x) != 0); + +#endif + +using namespace NCommandLineParser; +using namespace NWindows; +using namespace NFile; + +namespace NKey { +enum Enum +{ + kHelp1 = 0, + kHelp2, + kHelp3, + kDisableHeaders, + kDisablePercents, + kArchiveType, + kYes, + #ifndef _NO_CRYPTO + kPassword, + #endif + kProperty, + kOutputDir, + kWorkingDir, + kInclude, + kExclude, + kArInclude, + kArExclude, + kNoArName, + kUpdate, + kVolume, + kRecursed, + kSfx, + kStdIn, + kStdOut, + kOverwrite, + kEmail, + kShowDialog, + kLargePages, + kUseLStat, + kTechMode, + kCaseSensitive, + kCalcCrc +}; + +} + + +static const wchar_t kRecursedIDChar = 'R'; +static const wchar_t *kRecursedPostCharSet = L"0-"; + +namespace NRecursedPostCharIndex { + enum EEnum + { + kWildCardRecursionOnly = 0, + kNoRecursion = 1 + }; +} + +static const char kImmediateNameID = '!'; +static const char kMapNameID = '#'; +static const char kFileListID = '@'; + +static const char kSomeCludePostStringMinSize = 2; // at least <@|!>ame must be +static const char kSomeCludeAfterRecursedPostStringMinSize = 2; // at least <@|!>ame must be + +static const wchar_t *kOverwritePostCharSet = L"asut"; + +NExtract::NOverwriteMode::EEnum k_OverwriteModes[] = +{ + NExtract::NOverwriteMode::kWithoutPrompt, + NExtract::NOverwriteMode::kSkipExisting, + NExtract::NOverwriteMode::kAutoRename, + NExtract::NOverwriteMode::kAutoRenameExisting +}; + +static const CSwitchForm kSwitchForms[] = + { + { L"?", NSwitchType::kSimple, false }, + { L"H", NSwitchType::kSimple, false }, + { L"-HELP", NSwitchType::kSimple, false }, + { L"BA", NSwitchType::kSimple, false }, + { L"BD", NSwitchType::kSimple, false }, + { L"T", NSwitchType::kUnLimitedPostString, false, 1 }, + { L"Y", NSwitchType::kSimple, false }, + #ifndef _NO_CRYPTO + { L"P", NSwitchType::kUnLimitedPostString, false, 0 }, + #endif + { L"M", NSwitchType::kUnLimitedPostString, true, 1 }, + { L"O", NSwitchType::kUnLimitedPostString, false, 1 }, + { L"W", NSwitchType::kUnLimitedPostString, false, 0 }, + { L"I", NSwitchType::kUnLimitedPostString, true, kSomeCludePostStringMinSize}, + { L"X", NSwitchType::kUnLimitedPostString, true, kSomeCludePostStringMinSize}, + { L"AI", NSwitchType::kUnLimitedPostString, true, kSomeCludePostStringMinSize}, + { L"AX", NSwitchType::kUnLimitedPostString, true, kSomeCludePostStringMinSize}, + { L"AN", NSwitchType::kSimple, false }, + { L"U", NSwitchType::kUnLimitedPostString, true, 1}, + { L"V", NSwitchType::kUnLimitedPostString, true, 1}, + { L"R", NSwitchType::kPostChar, false, 0, 0, kRecursedPostCharSet }, + { L"SFX", NSwitchType::kUnLimitedPostString, false, 0 }, + { L"SI", NSwitchType::kUnLimitedPostString, false, 0 }, + { L"SO", NSwitchType::kSimple, false, 0 }, + { L"AO", NSwitchType::kPostChar, false, 1, 1, kOverwritePostCharSet}, + { L"SEML", NSwitchType::kUnLimitedPostString, false, 0}, + { L"AD", NSwitchType::kSimple, false }, + { L"SLP", NSwitchType::kUnLimitedPostString, false, 0}, + { L"L", NSwitchType::kSimple, false }, + { L"SLT", NSwitchType::kSimple, false }, + { L"SSC", NSwitchType::kPostChar, false, 0, 0, L"-" }, + { L"SCRC", NSwitchType::kSimple, false } + }; + +static const CCommandForm g_CommandForms[] = +{ + { L"A", false }, + { L"U", false }, + { L"D", false }, + { L"T", false }, + { L"E", false }, + { L"X", false }, + { L"L", false }, + { L"B", false }, + { L"I", false } +}; + +static const int kNumCommandForms = sizeof(g_CommandForms) / sizeof(g_CommandForms[0]); + +static const wchar_t *kUniversalWildcard = L"*"; +static const int kMinNonSwitchWords = 1; +static const int kCommandIndex = 0; + +// --------------------------- +// exception messages + +static const char *kUserErrorMessage = "Incorrect command line"; +static const char *kCannotFindListFile = "Cannot find listfile"; +static const char *kIncorrectListFile = "Incorrect item in listfile.\nCheck charset encoding and -scs switch."; +static const char *kIncorrectWildCardInListFile = "Incorrect wildcard in listfile"; +static const char *kIncorrectWildCardInCommandLine = "Incorrect wildcard in command line"; +static const char *kTerminalOutError = "I won't write compressed data to a terminal"; +static const char *kSameTerminalError = "I won't write data and program's messages to same terminal"; +static const char *kEmptyFilePath = "Empty file path"; + +static void ThrowException(const char *errorMessage) +{ + throw CArchiveCommandLineException(errorMessage); +} + +static void ThrowUserErrorException() +{ + ThrowException(kUserErrorMessage); +} + +// --------------------------- + +bool CArchiveCommand::IsFromExtractGroup() const +{ + switch(CommandType) + { + case NCommandType::kTest: + case NCommandType::kExtract: + case NCommandType::kFullExtract: + return true; + default: + return false; + } +} + +NExtract::NPathMode::EEnum CArchiveCommand::GetPathMode() const +{ + switch(CommandType) + { + case NCommandType::kTest: + case NCommandType::kFullExtract: + return NExtract::NPathMode::kFullPathnames; + default: + return NExtract::NPathMode::kNoPathnames; + } +} + +bool CArchiveCommand::IsFromUpdateGroup() const +{ + return (CommandType == NCommandType::kAdd || + CommandType == NCommandType::kUpdate || + CommandType == NCommandType::kDelete); +} + +static NRecursedType::EEnum GetRecursedTypeFromIndex(int index) +{ + switch (index) + { + case NRecursedPostCharIndex::kWildCardRecursionOnly: + return NRecursedType::kWildCardOnlyRecursed; + case NRecursedPostCharIndex::kNoRecursion: + return NRecursedType::kNonRecursed; + default: + return NRecursedType::kRecursed; + } +} + +static bool ParseArchiveCommand(const UString &commandString, CArchiveCommand &command) +{ + UString commandStringUpper = commandString; + commandStringUpper.MakeUpper(); + UString postString; + int commandIndex = ParseCommand(kNumCommandForms, g_CommandForms, commandStringUpper, + postString) ; + if (commandIndex < 0) + return false; + command.CommandType = (NCommandType::EEnum)commandIndex; + return true; +} + +// ------------------------------------------------------------------ +// filenames functions + +static void AddNameToCensor(NWildcard::CCensor &wildcardCensor, + const UString &name, bool include, NRecursedType::EEnum type) +{ + bool recursed = false; + + switch (type) + { + case NRecursedType::kWildCardOnlyRecursed: + recursed = DoesNameContainWildCard(name); + break; + case NRecursedType::kRecursed: + recursed = true; + break; + } + wildcardCensor.AddItem(include, name, recursed); +} + +static void AddToCensorFromListFile(NWildcard::CCensor &wildcardCensor, + LPCWSTR fileName, bool include, NRecursedType::EEnum type, UINT codePage) +{ + UStringVector names; + if (!NFind::DoesFileExist(fileName)) + throw kCannotFindListFile; + if (!ReadNamesFromListFile(fileName, names, codePage)) + throw kIncorrectListFile; + for (int i = 0; i < names.Size(); i++) + AddNameToCensor(wildcardCensor, names[i], include, type); +} + +static void AddToCensorFromNonSwitchesStrings( + int startIndex, + NWildcard::CCensor &wildcardCensor, + const UStringVector &nonSwitchStrings, NRecursedType::EEnum type, + bool thereAreSwitchIncludes, UINT codePage) +{ + if (nonSwitchStrings.Size() == startIndex && (!thereAreSwitchIncludes)) + AddNameToCensor(wildcardCensor, kUniversalWildcard, true, type); + for (int i = startIndex; i < nonSwitchStrings.Size(); i++) + { + const UString &s = nonSwitchStrings[i]; + if (s.IsEmpty()) + throw kEmptyFilePath; + if (s[0] == kFileListID) + AddToCensorFromListFile(wildcardCensor, s.Mid(1), true, type, codePage); + else + AddNameToCensor(wildcardCensor, s, true, type); + } +} + +#ifdef _WIN32 +static void ParseMapWithPaths(NWildcard::CCensor &wildcardCensor, + const UString &switchParam, bool include, + NRecursedType::EEnum commonRecursedType) +{ + int splitPos = switchParam.Find(L':'); + if (splitPos < 0) + ThrowUserErrorException(); + UString mappingName = switchParam.Left(splitPos); + + UString switchParam2 = switchParam.Mid(splitPos + 1); + splitPos = switchParam2.Find(L':'); + if (splitPos < 0) + ThrowUserErrorException(); + + UString mappingSize = switchParam2.Left(splitPos); + UString eventName = switchParam2.Mid(splitPos + 1); + + UInt64 dataSize64 = ConvertStringToUInt64(mappingSize, NULL); + UInt32 dataSize = (UInt32)dataSize64; + { + CFileMapping fileMapping; + if (fileMapping.Open(FILE_MAP_READ, GetSystemString(mappingName)) != 0) + ThrowException("Can not open mapping"); + LPVOID data = fileMapping.Map(FILE_MAP_READ, 0, dataSize); + if (data == NULL) + ThrowException("MapViewOfFile error"); + try + { + const wchar_t *curData = (const wchar_t *)data; + if (*curData != 0) + ThrowException("Incorrect mapping data"); + UInt32 numChars = dataSize / sizeof(wchar_t); + UString name; + for (UInt32 i = 1; i < numChars; i++) + { + wchar_t c = curData[i]; + if (c == L'\0') + { + AddNameToCensor(wildcardCensor, name, include, commonRecursedType); + name.Empty(); + } + else + name += c; + } + if (!name.IsEmpty()) + ThrowException("data error"); + } + catch(...) + { + UnmapViewOfFile(data); + throw; + } + UnmapViewOfFile(data); + } + + { + NSynchronization::CManualResetEvent event; + if (event.Open(EVENT_MODIFY_STATE, false, GetSystemString(eventName)) == S_OK) + event.Set(); + } +} +#endif + +static void AddSwitchWildCardsToCensor(NWildcard::CCensor &wildcardCensor, + const UStringVector &strings, bool include, + NRecursedType::EEnum commonRecursedType, UINT codePage) +{ + for (int i = 0; i < strings.Size(); i++) + { + const UString &name = strings[i]; + NRecursedType::EEnum recursedType; + int pos = 0; + if (name.Length() < kSomeCludePostStringMinSize) + ThrowUserErrorException(); + if (::MyCharUpper(name[pos]) == kRecursedIDChar) + { + pos++; + int index = UString(kRecursedPostCharSet).Find(name[pos]); + recursedType = GetRecursedTypeFromIndex(index); + if (index >= 0) + pos++; + } + else + recursedType = commonRecursedType; + if (name.Length() < pos + kSomeCludeAfterRecursedPostStringMinSize) + ThrowUserErrorException(); + UString tail = name.Mid(pos + 1); + if (name[pos] == kImmediateNameID) + AddNameToCensor(wildcardCensor, tail, include, recursedType); + else if (name[pos] == kFileListID) + AddToCensorFromListFile(wildcardCensor, tail, include, recursedType, codePage); + #ifdef _WIN32 + else if (name[pos] == kMapNameID) + ParseMapWithPaths(wildcardCensor, tail, include, recursedType); + #endif + else + ThrowUserErrorException(); + } +} + +#ifdef _WIN32 + +// This code converts all short file names to long file names. + +static void ConvertToLongName(const UString &prefix, UString &name) +{ + if (name.IsEmpty() || DoesNameContainWildCard(name)) + return; + NFind::CFileInfoW fi; + if (fi.Find(prefix + name)) + name = fi.Name; +} + +static void ConvertToLongNames(const UString &prefix, CObjectVector &items) +{ + for (int i = 0; i < items.Size(); i++) + { + NWildcard::CItem &item = items[i]; + if (item.Recursive || item.PathParts.Size() != 1) + continue; + ConvertToLongName(prefix, item.PathParts.Front()); + } +} + +static void ConvertToLongNames(const UString &prefix, NWildcard::CCensorNode &node) +{ + ConvertToLongNames(prefix, node.IncludeItems); + ConvertToLongNames(prefix, node.ExcludeItems); + int i; + for (i = 0; i < node.SubNodes.Size(); i++) + ConvertToLongName(prefix, node.SubNodes[i].Name); + // mix folders with same name + for (i = 0; i < node.SubNodes.Size(); i++) + { + NWildcard::CCensorNode &nextNode1 = node.SubNodes[i]; + for (int j = i + 1; j < node.SubNodes.Size();) + { + const NWildcard::CCensorNode &nextNode2 = node.SubNodes[j]; + if (nextNode1.Name.CompareNoCase(nextNode2.Name) == 0) + { + nextNode1.IncludeItems += nextNode2.IncludeItems; + nextNode1.ExcludeItems += nextNode2.ExcludeItems; + node.SubNodes.Delete(j); + } + else + j++; + } + } + for (i = 0; i < node.SubNodes.Size(); i++) + { + NWildcard::CCensorNode &nextNode = node.SubNodes[i]; + ConvertToLongNames(prefix + nextNode.Name + wchar_t(NFile::NName::kDirDelimiter), nextNode); + } +} + +static void ConvertToLongNames(NWildcard::CCensor &censor) +{ + for (int i = 0; i < censor.Pairs.Size(); i++) + { + NWildcard::CPair &pair = censor.Pairs[i]; + ConvertToLongNames(pair.Prefix, pair.Head); + } +} + +#endif + +static NUpdateArchive::NPairAction::EEnum GetUpdatePairActionType(int i) +{ + switch(i) + { + case NUpdateArchive::NPairAction::kIgnore: return NUpdateArchive::NPairAction::kIgnore; + case NUpdateArchive::NPairAction::kCopy: return NUpdateArchive::NPairAction::kCopy; + case NUpdateArchive::NPairAction::kCompress: return NUpdateArchive::NPairAction::kCompress; + case NUpdateArchive::NPairAction::kCompressAsAnti: return NUpdateArchive::NPairAction::kCompressAsAnti; + } + throw 98111603; +} + +const UString kUpdatePairStateIDSet = L"PQRXYZW"; +const int kUpdatePairStateNotSupportedActions[] = {2, 2, 1, -1, -1, -1, -1}; + +const UString kUpdatePairActionIDSet = L"0123"; //Ignore, Copy, Compress, Create Anti + +const wchar_t *kUpdateIgnoreItselfPostStringID = L"-"; +const wchar_t kUpdateNewArchivePostCharID = '!'; + + +static bool ParseUpdateCommandString2(const UString &command, + NUpdateArchive::CActionSet &actionSet, UString &postString) +{ + for (int i = 0; i < command.Length();) + { + wchar_t c = MyCharUpper(command[i]); + int statePos = kUpdatePairStateIDSet.Find(c); + if (statePos < 0) + { + postString = command.Mid(i); + return true; + } + i++; + if (i >= command.Length()) + return false; + int actionPos = kUpdatePairActionIDSet.Find(::MyCharUpper(command[i])); + if (actionPos < 0) + return false; + actionSet.StateActions[statePos] = GetUpdatePairActionType(actionPos); + if (kUpdatePairStateNotSupportedActions[statePos] == actionPos) + return false; + i++; + } + postString.Empty(); + return true; +} + +static void ParseUpdateCommandString(CUpdateOptions &options, + const UStringVector &updatePostStrings, + const NUpdateArchive::CActionSet &defaultActionSet) +{ + for (int i = 0; i < updatePostStrings.Size(); i++) + { + const UString &updateString = updatePostStrings[i]; + if (updateString.CompareNoCase(kUpdateIgnoreItselfPostStringID) == 0) + { + if (options.UpdateArchiveItself) + { + options.UpdateArchiveItself = false; + options.Commands.Delete(0); + } + } + else + { + NUpdateArchive::CActionSet actionSet = defaultActionSet; + + UString postString; + if (!ParseUpdateCommandString2(updateString, actionSet, postString)) + ThrowUserErrorException(); + if (postString.IsEmpty()) + { + if (options.UpdateArchiveItself) + options.Commands[0].ActionSet = actionSet; + } + else + { + if (MyCharUpper(postString[0]) != kUpdateNewArchivePostCharID) + ThrowUserErrorException(); + CUpdateArchiveCommand uc; + UString archivePath = postString.Mid(1); + if (archivePath.IsEmpty()) + ThrowUserErrorException(); + uc.UserArchivePath = archivePath; + uc.ActionSet = actionSet; + options.Commands.Add(uc); + } + } + } +} + +static const char kByteSymbol = 'B'; +static const char kKiloSymbol = 'K'; +static const char kMegaSymbol = 'M'; +static const char kGigaSymbol = 'G'; + +static bool ParseComplexSize(const UString &src, UInt64 &result) +{ + UString s = src; + s.MakeUpper(); + + const wchar_t *start = s; + const wchar_t *end; + UInt64 number = ConvertStringToUInt64(start, &end); + int numDigits = (int)(end - start); + if (numDigits == 0 || s.Length() > numDigits + 1) + return false; + if (s.Length() == numDigits) + { + result = number; + return true; + } + int numBits; + switch (s[numDigits]) + { + case kByteSymbol: + result = number; + return true; + case kKiloSymbol: + numBits = 10; + break; + case kMegaSymbol: + numBits = 20; + break; + case kGigaSymbol: + numBits = 30; + break; + default: + return false; + } + if (number >= ((UInt64)1 << (64 - numBits))) + return false; + result = number << numBits; + return true; +} + +static void SetAddCommandOptions( + NCommandType::EEnum commandType, + const CParser &parser, + CUpdateOptions &options) +{ + NUpdateArchive::CActionSet defaultActionSet; + switch(commandType) + { + case NCommandType::kAdd: + defaultActionSet = NUpdateArchive::kAddActionSet; + break; + case NCommandType::kDelete: + defaultActionSet = NUpdateArchive::kDeleteActionSet; + break; + default: + defaultActionSet = NUpdateArchive::kUpdateActionSet; + } + + options.UpdateArchiveItself = true; + + options.Commands.Clear(); + CUpdateArchiveCommand updateMainCommand; + updateMainCommand.ActionSet = defaultActionSet; + options.Commands.Add(updateMainCommand); + if (parser[NKey::kUpdate].ThereIs) + ParseUpdateCommandString(options, parser[NKey::kUpdate].PostStrings, + defaultActionSet); + if (parser[NKey::kWorkingDir].ThereIs) + { + const UString &postString = parser[NKey::kWorkingDir].PostStrings[0]; + if (postString.IsEmpty()) + NDirectory::MyGetTempPath(options.WorkingDir); + else + options.WorkingDir = postString; + } + options.SfxMode = parser[NKey::kSfx].ThereIs; + if (options.SfxMode) + options.SfxModule = parser[NKey::kSfx].PostStrings[0]; + + if (parser[NKey::kVolume].ThereIs) + { + const UStringVector &sv = parser[NKey::kVolume].PostStrings; + for (int i = 0; i < sv.Size(); i++) + { + UInt64 size; + if (!ParseComplexSize(sv[i], size)) + ThrowException("Incorrect volume size"); + options.VolumesSizes.Add(size); + } + } +} + +static void SetMethodOptions(const CParser &parser, CObjectVector &properties) +{ + if (parser[NKey::kProperty].ThereIs) + { + // options.MethodMode.Properties.Clear(); + for (int i = 0; i < parser[NKey::kProperty].PostStrings.Size(); i++) + { + CProperty property; + const UString &postString = parser[NKey::kProperty].PostStrings[i]; + int index = postString.Find(L'='); + if (index < 0) + property.Name = postString; + else + { + property.Name = postString.Left(index); + property.Value = postString.Mid(index + 1); + } + properties.Add(property); + } + } +} + +CArchiveCommandLineParser::CArchiveCommandLineParser(): + parser(sizeof(kSwitchForms) / sizeof(kSwitchForms[0])) {} + +void CArchiveCommandLineParser::Parse1(const UStringVector &commandStrings, + CArchiveCommandLineOptions &options) +{ + try + { + parser.ParseStrings(kSwitchForms, commandStrings); + } + catch(...) + { + ThrowUserErrorException(); + } + + options.IsInTerminal = MY_IS_TERMINAL(stdin); + options.IsStdOutTerminal = MY_IS_TERMINAL(stdout); + options.IsStdErrTerminal = MY_IS_TERMINAL(stderr); + options.StdInMode = parser[NKey::kStdIn].ThereIs; + options.StdOutMode = parser[NKey::kStdOut].ThereIs; + options.EnableHeaders = !parser[NKey::kDisableHeaders].ThereIs; + options.HelpMode = parser[NKey::kHelp1].ThereIs || parser[NKey::kHelp2].ThereIs || parser[NKey::kHelp3].ThereIs; + + #ifdef _7ZIP_LARGE_PAGES + options.LargePages = false; + if (parser[NKey::kLargePages].ThereIs) + { + const UString &postString = parser[NKey::kLargePages].PostStrings.Front(); + if (postString.IsEmpty()) + options.LargePages = true; + } + #endif +} + +static bool ConvertStringToUInt32(const wchar_t *s, UInt32 &v) +{ + const wchar_t *end; + UInt64 number = ConvertStringToUInt64(s, &end); + if (*end != 0) + return false; + if (number > (UInt32)0xFFFFFFFF) + return false; + v = (UInt32)number; + return true; +} + +void CArchiveCommandLineParser::Parse2(CArchiveCommandLineOptions &options) +{ + const UStringVector &nonSwitchStrings = parser.NonSwitchStrings; + int numNonSwitchStrings = nonSwitchStrings.Size(); + if (numNonSwitchStrings < kMinNonSwitchWords) + ThrowUserErrorException(); + + if (!ParseArchiveCommand(nonSwitchStrings[kCommandIndex], options.Command)) + ThrowUserErrorException(); + + options.TechMode = parser[NKey::kTechMode].ThereIs; + options.CalcCrc = parser[NKey::kCalcCrc].ThereIs; + + if (parser[NKey::kCaseSensitive].ThereIs) + g_CaseSensitive = (parser[NKey::kCaseSensitive].PostCharIndex < 0); + + NRecursedType::EEnum recursedType; + if (parser[NKey::kRecursed].ThereIs) + recursedType = GetRecursedTypeFromIndex(parser[NKey::kRecursed].PostCharIndex); + else + recursedType = NRecursedType::kNonRecursed; + + UINT codePage = CP_ACP; + + bool thereAreSwitchIncludes = false; + if (parser[NKey::kInclude].ThereIs) + { + thereAreSwitchIncludes = true; + AddSwitchWildCardsToCensor(options.WildcardCensor, + parser[NKey::kInclude].PostStrings, true, recursedType, codePage); + } + if (parser[NKey::kExclude].ThereIs) + AddSwitchWildCardsToCensor(options.WildcardCensor, + parser[NKey::kExclude].PostStrings, false, recursedType, codePage); + + int curCommandIndex = kCommandIndex + 1; + bool thereIsArchiveName = !parser[NKey::kNoArName].ThereIs && + options.Command.CommandType != NCommandType::kBenchmark && + options.Command.CommandType != NCommandType::kInfo; + + bool isExtractGroupCommand = options.Command.IsFromExtractGroup(); + bool isExtractOrList = isExtractGroupCommand || options.Command.CommandType == NCommandType::kList; + + if (isExtractOrList && options.StdInMode) + thereIsArchiveName = false; + + if (thereIsArchiveName) + { + if (curCommandIndex >= numNonSwitchStrings) + ThrowUserErrorException(); + options.ArchiveName = nonSwitchStrings[curCommandIndex++]; + if (options.ArchiveName.IsEmpty()) + ThrowUserErrorException(); + } + + AddToCensorFromNonSwitchesStrings( + curCommandIndex, options.WildcardCensor, + nonSwitchStrings, recursedType, thereAreSwitchIncludes, codePage); + + options.YesToAll = parser[NKey::kYes].ThereIs; + +#ifdef ENV_HAVE_LSTAT + global_use_lstat = !parser[NKey::kUseLStat].ThereIs; +#endif + + #ifndef _NO_CRYPTO + options.PasswordEnabled = parser[NKey::kPassword].ThereIs; + if (options.PasswordEnabled) + options.Password = parser[NKey::kPassword].PostStrings[0]; + #endif + + options.ShowDialog = parser[NKey::kShowDialog].ThereIs; + + if (parser[NKey::kArchiveType].ThereIs) + options.ArcType = parser[NKey::kArchiveType].PostStrings[0]; + + if (isExtractOrList) + { + if (!options.WildcardCensor.AllAreRelative()) + ThrowException("Cannot use absolute pathnames for this command"); + + NWildcard::CCensor archiveWildcardCensor; + + if (parser[NKey::kArInclude].ThereIs) + AddSwitchWildCardsToCensor(archiveWildcardCensor, + parser[NKey::kArInclude].PostStrings, true, NRecursedType::kNonRecursed, codePage); + if (parser[NKey::kArExclude].ThereIs) + AddSwitchWildCardsToCensor(archiveWildcardCensor, + parser[NKey::kArExclude].PostStrings, false, NRecursedType::kNonRecursed, codePage); + + bool directlyAddArchiveName = false; + if (thereIsArchiveName) { + if ((options.ArchiveName.Find(kUniversalWildcard) == -1) && (options.ArchiveName.Find(L"?") == -1)) { + // no wildcard => no need to scan + directlyAddArchiveName = true; + } else { + AddNameToCensor(archiveWildcardCensor, options.ArchiveName, true, NRecursedType::kNonRecursed); + } + } + + #ifdef _WIN32 + ConvertToLongNames(archiveWildcardCensor); + #endif + + archiveWildcardCensor.ExtendExclude(); + + if (options.StdInMode) + { + UString arcName = parser[NKey::kStdIn].PostStrings.Front(); + options.ArchivePathsSorted.Add(arcName); + options.ArchivePathsFullSorted.Add(arcName); + } + else + { + + UStringVector archivePaths; + + { + CDirItems dirItems; + { + UStringVector errorPaths; + CRecordVector errorCodes; + HRESULT res = EnumerateItems(archiveWildcardCensor, dirItems, NULL, errorPaths, errorCodes); + if (res != S_OK || errorPaths.Size() > 0) + throw "cannot find archive"; + } + for (int i = 0; i < dirItems.Items.Size(); i++) + { + const CDirItem &dirItem = dirItems.Items[i]; + if (!dirItem.IsDir()) + archivePaths.Add(dirItems.GetPhyPath(i)); + } + } + + // Because the pathname of archive can be a symbolic link + // do not use "AddCommandLineWildCardToCensr(archiveWildcardCensor, options.ArchiveName" + if (directlyAddArchiveName) + archivePaths.Add(options.ArchiveName); + + if (archivePaths.Size() == 0) + throw "there is no such archive"; + + UStringVector archivePathsFull; + + int i; + for (i = 0; i < archivePaths.Size(); i++) + { + UString fullPath; + NFile::NDirectory::MyGetFullPathName(archivePaths[i], fullPath); + archivePathsFull.Add(fullPath); + } + CIntVector indices; + SortFileNames(archivePathsFull, indices); + options.ArchivePathsSorted.Reserve(indices.Size()); + options.ArchivePathsFullSorted.Reserve(indices.Size()); + for (i = 0; i < indices.Size(); i++) + { + options.ArchivePathsSorted.Add(archivePaths[indices[i]]); + options.ArchivePathsFullSorted.Add(archivePathsFull[indices[i]]); + } + + } + + if (isExtractGroupCommand) + { + SetMethodOptions(parser, options.ExtractProperties); + if (options.StdOutMode && options.IsStdOutTerminal && options.IsStdErrTerminal) + throw kSameTerminalError; + if (parser[NKey::kOutputDir].ThereIs) + { + options.OutputDir = parser[NKey::kOutputDir].PostStrings[0]; + NFile::NName::NormalizeDirPathPrefix(options.OutputDir); + } + + options.OverwriteMode = NExtract::NOverwriteMode::kAskBefore; + if (parser[NKey::kOverwrite].ThereIs) + options.OverwriteMode = k_OverwriteModes[parser[NKey::kOverwrite].PostCharIndex]; + else if (options.YesToAll) + options.OverwriteMode = NExtract::NOverwriteMode::kWithoutPrompt; + } + } + else if (options.Command.IsFromUpdateGroup()) + { + CUpdateOptions &updateOptions = options.UpdateOptions; + + SetAddCommandOptions(options.Command.CommandType, parser, updateOptions); + + SetMethodOptions(parser, updateOptions.MethodMode.Properties); + + options.EnablePercents = !parser[NKey::kDisablePercents].ThereIs; + + if (options.EnablePercents) + { + if ((options.StdOutMode && !options.IsStdErrTerminal) || + (!options.StdOutMode && !options.IsStdOutTerminal)) + options.EnablePercents = false; + } + + updateOptions.EMailMode = parser[NKey::kEmail].ThereIs; + if (updateOptions.EMailMode) + { + updateOptions.EMailAddress = parser[NKey::kEmail].PostStrings.Front(); + if (updateOptions.EMailAddress.Length() > 0) + if (updateOptions.EMailAddress[0] == L'.') + { + updateOptions.EMailRemoveAfter = true; + updateOptions.EMailAddress.Delete(0); + } + } + + updateOptions.StdOutMode = options.StdOutMode; + updateOptions.StdInMode = options.StdInMode; + + if (updateOptions.StdOutMode && updateOptions.EMailMode) + throw "stdout mode and email mode cannot be combined"; + if (updateOptions.StdOutMode && options.IsStdOutTerminal) + throw kTerminalOutError; + if (updateOptions.StdInMode) + updateOptions.StdInFileName = parser[NKey::kStdIn].PostStrings.Front(); + + #ifdef _WIN32 + ConvertToLongNames(options.WildcardCensor); + #endif + } + else if (options.Command.CommandType == NCommandType::kBenchmark) + { + options.NumThreads = (UInt32)-1; + options.DictionarySize = (UInt32)-1; + options.NumIterations = 1; + if (curCommandIndex < numNonSwitchStrings) + { + if (!ConvertStringToUInt32(nonSwitchStrings[curCommandIndex++], options.NumIterations)) + ThrowUserErrorException(); + } + for (int i = 0; i < parser[NKey::kProperty].PostStrings.Size(); i++) + { + UString postString = parser[NKey::kProperty].PostStrings[i]; + postString.MakeUpper(); + if (postString.Length() < 2) + ThrowUserErrorException(); + if (postString[0] == 'D') + { + int pos = 1; + if (postString[pos] == '=') + pos++; + UInt32 logSize; + if (!ConvertStringToUInt32((const wchar_t *)postString + pos, logSize)) + ThrowUserErrorException(); + if (logSize > 31) + ThrowUserErrorException(); + options.DictionarySize = 1 << logSize; + } + else if (postString[0] == 'M' && postString[1] == 'T' ) + { + int pos = 2; + if (postString[pos] == '=') + pos++; + if (postString[pos] != 0) + if (!ConvertStringToUInt32((const wchar_t *)postString + pos, options.NumThreads)) + ThrowUserErrorException(); + } + else if (postString[0] == 'M' && postString[1] == '=' ) + { + int pos = 2; + if (postString[pos] != 0) + options.Method = postString.Mid(2); + } + else + ThrowUserErrorException(); + } + } + else if (options.Command.CommandType == NCommandType::kInfo) + { + } + else + ThrowUserErrorException(); + options.WildcardCensor.ExtendExclude(); +} diff --git a/CPP/7zip/UI/Common/ArchiveCommandLine.h b/CPP/7zip/UI/Common/ArchiveCommandLine.h new file mode 100644 index 0000000..bc7a99b --- /dev/null +++ b/CPP/7zip/UI/Common/ArchiveCommandLine.h @@ -0,0 +1,111 @@ +// ArchiveCommandLine.h + +#ifndef __ARCHIVE_COMMAND_LINE_H +#define __ARCHIVE_COMMAND_LINE_H + +#include "Common/CommandLineParser.h" +#include "Common/Wildcard.h" + +#include "Extract.h" +#include "Update.h" + +struct CArchiveCommandLineException: public AString +{ + CArchiveCommandLineException(const char *errorMessage): AString(errorMessage) {} +}; + +namespace NCommandType { enum EEnum +{ + kAdd = 0, + kUpdate, + kDelete, + kTest, + kExtract, + kFullExtract, + kList, + kBenchmark, + kInfo +};} + +namespace NRecursedType { enum EEnum +{ + kRecursed, + kWildCardOnlyRecursed, + kNonRecursed +};} + +struct CArchiveCommand +{ + NCommandType::EEnum CommandType; + bool IsFromExtractGroup() const; + bool IsFromUpdateGroup() const; + bool IsTestMode() const { return CommandType == NCommandType::kTest; } + NExtract::NPathMode::EEnum GetPathMode() const; +}; + +struct CArchiveCommandLineOptions +{ + bool HelpMode; + + #ifdef _7ZIP_LARGE_PAGES + bool LargePages; + #endif + + bool IsInTerminal; + bool IsStdOutTerminal; + bool IsStdErrTerminal; + bool StdInMode; + bool StdOutMode; + bool EnableHeaders; + + bool YesToAll; + bool ShowDialog; + // NWildcard::CCensor ArchiveWildcardCensor; + NWildcard::CCensor WildcardCensor; + + CArchiveCommand Command; + UString ArchiveName; + + #ifndef _NO_CRYPTO + bool PasswordEnabled; + UString Password; + #endif + + bool TechMode; + // Extract + bool CalcCrc; + bool AppendName; + UString OutputDir; + NExtract::NOverwriteMode::EEnum OverwriteMode; + UStringVector ArchivePathsSorted; + UStringVector ArchivePathsFullSorted; + CObjectVector ExtractProperties; + + CUpdateOptions UpdateOptions; + UString ArcType; + bool EnablePercents; + + // Benchmark + UInt32 NumIterations; + UInt32 NumThreads; + UInt32 DictionarySize; + UString Method; + + + CArchiveCommandLineOptions(): StdInMode(false), StdOutMode(false) {}; +}; + +class CArchiveCommandLineParser +{ + NCommandLineParser::CParser parser; +public: + CArchiveCommandLineParser(); + void Parse1(const UStringVector &commandStrings, CArchiveCommandLineOptions &options); + void Parse2(CArchiveCommandLineOptions &options); +}; + +void EnumerateDirItemsAndSort(NWildcard::CCensor &wildcardCensor, + UStringVector &sortedPaths, + UStringVector &sortedFullPaths); + +#endif diff --git a/CPP/7zip/UI/Common/ArchiveExtractCallback.cpp b/CPP/7zip/UI/Common/ArchiveExtractCallback.cpp new file mode 100644 index 0000000..4c0cc90 --- /dev/null +++ b/CPP/7zip/UI/Common/ArchiveExtractCallback.cpp @@ -0,0 +1,488 @@ +// ArchiveExtractCallback.cpp + +#include "StdAfx.h" + +#include "Common/ComTry.h" +#include "Common/Wildcard.h" + +#include "Windows/FileDir.h" +#include "Windows/FileFind.h" +#include "Windows/PropVariant.h" +#include "Windows/PropVariantConversions.h" + +#include "../../Common/FilePathAutoRename.h" + +#include "../Common/ExtractingFilePath.h" + +#include "ArchiveExtractCallback.h" + +using namespace NWindows; + +static const wchar_t *kCantAutoRename = L"ERROR: Can not create file with auto name"; +static const wchar_t *kCantRenameFile = L"ERROR: Can not rename existing file "; +static const wchar_t *kCantDeleteOutputFile = L"ERROR: Can not delete output file "; + +void CArchiveExtractCallback::Init( + const NWildcard::CCensorNode *wildcardCensor, + const CArc *arc, + IFolderArchiveExtractCallback *extractCallback2, + bool stdOutMode, bool testMode, bool crcMode, + const UString &directoryPath, + const UStringVector &removePathParts, + UInt64 packSize) +{ + _wildcardCensor = wildcardCensor; + + _stdOutMode = stdOutMode; + _testMode = testMode; + _crcMode = crcMode; + _unpTotal = 1; + _packTotal = packSize; + + _extractCallback2 = extractCallback2; + _compressProgress.Release(); + _extractCallback2.QueryInterface(IID_ICompressProgressInfo, &_compressProgress); + + LocalProgressSpec->Init(extractCallback2, true); + LocalProgressSpec->SendProgress = false; + + + _removePathParts = removePathParts; + _arc = arc; + _directoryPath = directoryPath; + NFile::NName::NormalizeDirPathPrefix(_directoryPath); +} + +STDMETHODIMP CArchiveExtractCallback::SetTotal(UInt64 size) +{ + COM_TRY_BEGIN + _unpTotal = size; + if (!_multiArchives && _extractCallback2) + return _extractCallback2->SetTotal(size); + return S_OK; + COM_TRY_END +} + +static void NormalizeVals(UInt64 &v1, UInt64 &v2) +{ + const UInt64 kMax = (UInt64)1 << 31; + while (v1 > kMax) + { + v1 >>= 1; + v2 >>= 1; + } +} + +static UInt64 MyMultDiv64(UInt64 unpCur, UInt64 unpTotal, UInt64 packTotal) +{ + NormalizeVals(packTotal, unpTotal); + NormalizeVals(unpCur, unpTotal); + if (unpTotal == 0) + unpTotal = 1; + return unpCur * packTotal / unpTotal; +} + +STDMETHODIMP CArchiveExtractCallback::SetCompleted(const UInt64 *completeValue) +{ + COM_TRY_BEGIN + if (!_extractCallback2) + return S_OK; + + if (_multiArchives) + { + if (completeValue != NULL) + { + UInt64 packCur = LocalProgressSpec->InSize + MyMultDiv64(*completeValue, _unpTotal, _packTotal); + return _extractCallback2->SetCompleted(&packCur); + } + } + return _extractCallback2->SetCompleted(completeValue); + COM_TRY_END +} + +STDMETHODIMP CArchiveExtractCallback::SetRatioInfo(const UInt64 *inSize, const UInt64 *outSize) +{ + COM_TRY_BEGIN + return _localProgress->SetRatioInfo(inSize, outSize); + COM_TRY_END +} + +void CArchiveExtractCallback::CreateComplexDirectory(const UStringVector &dirPathParts, UString &fullPath) +{ + fullPath = _directoryPath; + for (int i = 0; i < dirPathParts.Size(); i++) + { + if (i > 0) + fullPath += wchar_t(NFile::NName::kDirDelimiter); + fullPath += dirPathParts[i]; + NFile::NDirectory::MyCreateDirectory(fullPath); + } +} + +HRESULT CArchiveExtractCallback::GetTime(int index, PROPID propID, FILETIME &filetime, bool &filetimeIsDefined) +{ + filetimeIsDefined = false; + NCOM::CPropVariant prop; + RINOK(_arc->Archive->GetProperty(index, propID, &prop)); + if (prop.vt == VT_FILETIME) + { + filetime = prop.filetime; + filetimeIsDefined = (filetime.dwHighDateTime != 0 || filetime.dwLowDateTime != 0); + } + else if (prop.vt != VT_EMPTY) + return E_FAIL; + return S_OK; +} + +HRESULT CArchiveExtractCallback::GetUnpackSize() +{ + NCOM::CPropVariant prop; + RINOK(_arc->Archive->GetProperty(_index, kpidSize, &prop)); + _curSizeDefined = (prop.vt != VT_EMPTY); + if (_curSizeDefined) + _curSize = ConvertPropVariantToUInt64(prop); + return S_OK; +} + +STDMETHODIMP CArchiveExtractCallback::GetStream(UInt32 index, ISequentialOutStream **outStream, Int32 askExtractMode) +{ + COM_TRY_BEGIN + _crcStream.Release(); + *outStream = 0; + _outFileStream.Release(); + + _encrypted = false; + _isSplit = false; + _curSize = 0; + _curSizeDefined = false; + _index = index; + + UString fullPath; + + IInArchive *archive = _arc->Archive; + RINOK(_arc->GetItemPath(index, fullPath)); + RINOK(IsArchiveItemFolder(archive, index, _fi.IsDir)); + + _filePath = fullPath; + + { + NCOM::CPropVariant prop; + RINOK(archive->GetProperty(index, kpidPosition, &prop)); + if (prop.vt != VT_EMPTY) + { + if (prop.vt != VT_UI8) + return E_FAIL; + _position = prop.uhVal.QuadPart; + _isSplit = true; + } + } + + RINOK(GetArchiveItemBoolProp(archive, index, kpidEncrypted, _encrypted)); + + RINOK(GetUnpackSize()); + + if (_wildcardCensor) + { + if (!_wildcardCensor->CheckPath(fullPath, !_fi.IsDir)) + return S_OK; + } + + if (askExtractMode == NArchive::NExtract::NAskMode::kExtract && !_testMode) + { + if (_stdOutMode) + { + CMyComPtr outStreamLoc = new CStdOutFileStream; + *outStream = outStreamLoc.Detach(); + return S_OK; + } + + { + NCOM::CPropVariant prop; + RINOK(archive->GetProperty(index, kpidAttrib, &prop)); + if (prop.vt == VT_UI4) + { + _fi.Attrib = prop.ulVal; + _fi.AttribDefined = true; + } + else if (prop.vt == VT_EMPTY) + _fi.AttribDefined = false; + else + return E_FAIL; + } + + RINOK(GetTime(index, kpidCTime, _fi.CTime, _fi.CTimeDefined)); + RINOK(GetTime(index, kpidATime, _fi.ATime, _fi.ATimeDefined)); + RINOK(GetTime(index, kpidMTime, _fi.MTime, _fi.MTimeDefined)); + + bool isAnti = false; + RINOK(_arc->IsItemAnti(index, isAnti)); + + UStringVector pathParts; + SplitPathToParts(fullPath, pathParts); + + if (pathParts.IsEmpty()) + return E_FAIL; + int numRemovePathParts = 0; + switch(_pathMode) + { + case NExtract::NPathMode::kFullPathnames: + break; + case NExtract::NPathMode::kCurrentPathnames: + { + numRemovePathParts = _removePathParts.Size(); + if (pathParts.Size() <= numRemovePathParts) + return E_FAIL; + for (int i = 0; i < numRemovePathParts; i++) + if (_removePathParts[i].CompareNoCase(pathParts[i]) != 0) + return E_FAIL; + break; + } + case NExtract::NPathMode::kNoPathnames: + { + numRemovePathParts = pathParts.Size() - 1; + break; + } + } + pathParts.Delete(0, numRemovePathParts); + MakeCorrectPath(pathParts); + UString processedPath = MakePathNameFromParts(pathParts); + if (!isAnti) + { + if (!_fi.IsDir) + { + if (!pathParts.IsEmpty()) + pathParts.DeleteBack(); + } + + if (!pathParts.IsEmpty()) + { + UString fullPathNew; + CreateComplexDirectory(pathParts, fullPathNew); + if (_fi.IsDir) + NFile::NDirectory::SetDirTime(fullPathNew, + (WriteCTime && _fi.CTimeDefined) ? &_fi.CTime : NULL, + (WriteATime && _fi.ATimeDefined) ? &_fi.ATime : NULL, + (WriteMTime && _fi.MTimeDefined) ? &_fi.MTime : (_arc->MTimeDefined ? &_arc->MTime : NULL)); + } + } + + + UString fullProcessedPath = _directoryPath + processedPath; + + if (_fi.IsDir) + { + _diskFilePath = fullProcessedPath; + if (isAnti) + NFile::NDirectory::MyRemoveDirectory(_diskFilePath); + return S_OK; + } + + if (!_isSplit) + { + NFile::NFind::CFileInfoW fileInfo; + if (fileInfo.Find(fullProcessedPath)) + { + switch(_overwriteMode) + { + case NExtract::NOverwriteMode::kSkipExisting: + return S_OK; + case NExtract::NOverwriteMode::kAskBefore: + { + Int32 overwiteResult; + RINOK(_extractCallback2->AskOverwrite( + fullProcessedPath, &fileInfo.MTime, &fileInfo.Size, fullPath, + _fi.MTimeDefined ? &_fi.MTime : NULL, + _curSizeDefined ? &_curSize : NULL, + &overwiteResult)) + + switch(overwiteResult) + { + case NOverwriteAnswer::kCancel: + return E_ABORT; + case NOverwriteAnswer::kNo: + return S_OK; + case NOverwriteAnswer::kNoToAll: + _overwriteMode = NExtract::NOverwriteMode::kSkipExisting; + return S_OK; + case NOverwriteAnswer::kYesToAll: + _overwriteMode = NExtract::NOverwriteMode::kWithoutPrompt; + break; + case NOverwriteAnswer::kYes: + break; + case NOverwriteAnswer::kAutoRename: + _overwriteMode = NExtract::NOverwriteMode::kAutoRename; + break; + default: + return E_FAIL; + } + } + } + if (_overwriteMode == NExtract::NOverwriteMode::kAutoRename) + { + if (!AutoRenamePath(fullProcessedPath)) + { + UString message = UString(kCantAutoRename) + fullProcessedPath; + RINOK(_extractCallback2->MessageError(message)); + return E_FAIL; + } + } + else if (_overwriteMode == NExtract::NOverwriteMode::kAutoRenameExisting) + { + UString existPath = fullProcessedPath; + if (!AutoRenamePath(existPath)) + { + UString message = kCantAutoRename + fullProcessedPath; + RINOK(_extractCallback2->MessageError(message)); + return E_FAIL; + } + if (!NFile::NDirectory::MyMoveFile(fullProcessedPath, existPath)) + { + UString message = UString(kCantRenameFile) + fullProcessedPath; + RINOK(_extractCallback2->MessageError(message)); + return E_FAIL; + } + } + else + if (!NFile::NDirectory::DeleteFileAlways(fullProcessedPath)) + { + UString message = UString(kCantDeleteOutputFile) + fullProcessedPath; + RINOK(_extractCallback2->MessageError(message)); + return S_OK; + // return E_FAIL; + } + } + } + if (!isAnti) + { + _outFileStreamSpec = new COutFileStream; + CMyComPtr outStreamLoc(_outFileStreamSpec); + if (!_outFileStreamSpec->Open(fullProcessedPath, _isSplit ? OPEN_ALWAYS: CREATE_ALWAYS)) + { + // if (::GetLastError() != ERROR_FILE_EXISTS || !isSplit) + { + UString message = L"can not open output file " + fullProcessedPath; + RINOK(_extractCallback2->MessageError(message)); + return S_OK; + } + } + if (_isSplit) + { + RINOK(_outFileStreamSpec->Seek(_position, STREAM_SEEK_SET, NULL)); + } + _outFileStream = outStreamLoc; + *outStream = outStreamLoc.Detach(); + } + _diskFilePath = fullProcessedPath; + } + else + { + *outStream = NULL; + } + if (_crcMode) + { + _crcStreamSpec = new COutStreamWithCRC; + _crcStream = _crcStreamSpec; + CMyComPtr crcStream = _crcStreamSpec; + _crcStreamSpec->SetStream(*outStream); + if (*outStream) + (*outStream)->Release(); + *outStream = crcStream.Detach(); + _crcStreamSpec->Init(true); + } + return S_OK; + COM_TRY_END +} + +STDMETHODIMP CArchiveExtractCallback::PrepareOperation(Int32 askExtractMode) +{ + COM_TRY_BEGIN + _extractMode = false; + switch (askExtractMode) + { + case NArchive::NExtract::NAskMode::kExtract: + if (_testMode) + askExtractMode = NArchive::NExtract::NAskMode::kTest; + else + _extractMode = true; + break; + }; + return _extractCallback2->PrepareOperation(_filePath, _fi.IsDir, + askExtractMode, _isSplit ? &_position: 0); + COM_TRY_END +} + +STDMETHODIMP CArchiveExtractCallback::SetOperationResult(Int32 operationResult) +{ + COM_TRY_BEGIN + switch(operationResult) + { + case NArchive::NExtract::NOperationResult::kOK: + case NArchive::NExtract::NOperationResult::kUnSupportedMethod: + case NArchive::NExtract::NOperationResult::kCRCError: + case NArchive::NExtract::NOperationResult::kDataError: + break; + default: + _outFileStream.Release(); + return E_FAIL; + } + if (_crcStream) + { + CrcSum += _crcStreamSpec->GetCRC(); + _curSize = _crcStreamSpec->GetSize(); + _curSizeDefined = true; + _crcStream.Release(); + } + if (_outFileStream) + { + _outFileStreamSpec->SetTime( + (WriteCTime && _fi.CTimeDefined) ? &_fi.CTime : NULL, + (WriteATime && _fi.ATimeDefined) ? &_fi.ATime : NULL, + (WriteMTime && _fi.MTimeDefined) ? &_fi.MTime : (_arc->MTimeDefined ? &_arc->MTime : NULL)); + _curSize = _outFileStreamSpec->ProcessedSize; + _curSizeDefined = true; + RINOK(_outFileStreamSpec->Close()); + _outFileStream.Release(); + } + if (!_curSizeDefined) + GetUnpackSize(); + if (_curSizeDefined) + UnpackSize += _curSize; + if (_fi.IsDir) + NumFolders++; + else + NumFiles++; + + if (_extractMode && _fi.AttribDefined) + NFile::NDirectory::MySetFileAttributes(_diskFilePath, _fi.Attrib); + RINOK(_extractCallback2->SetOperationResult(operationResult, _encrypted)); + return S_OK; + COM_TRY_END +} + +/* +STDMETHODIMP CArchiveExtractCallback::GetInStream( + const wchar_t *name, ISequentialInStream **inStream) +{ + COM_TRY_BEGIN + CInFileStream *inFile = new CInFileStream; + CMyComPtr inStreamTemp = inFile; + if (!inFile->Open(_srcDirectoryPrefix + name)) + return ::GetLastError(); + *inStream = inStreamTemp.Detach(); + return S_OK; + COM_TRY_END +} +*/ + +STDMETHODIMP CArchiveExtractCallback::CryptoGetTextPassword(BSTR *password) +{ + COM_TRY_BEGIN + if (!_cryptoGetTextPassword) + { + RINOK(_extractCallback2.QueryInterface(IID_ICryptoGetTextPassword, + &_cryptoGetTextPassword)); + } + return _cryptoGetTextPassword->CryptoGetTextPassword(password); + COM_TRY_END +} + diff --git a/CPP/7zip/UI/Common/ArchiveExtractCallback.h b/CPP/7zip/UI/Common/ArchiveExtractCallback.h new file mode 100644 index 0000000..367e4b0 --- /dev/null +++ b/CPP/7zip/UI/Common/ArchiveExtractCallback.h @@ -0,0 +1,143 @@ +// ArchiveExtractCallback.h + +#ifndef __ARCHIVE_EXTRACT_CALLBACK_H +#define __ARCHIVE_EXTRACT_CALLBACK_H + +#include "Common/MyCom.h" +#include "Common/Wildcard.h" + +#include "../../IPassword.h" + +#include "../../Common/FileStreams.h" +#include "../../Common/ProgressUtils.h" + +#include "../../Archive/IArchive.h" + +#include "../../Archive/Common/OutStreamWithCRC.h" + +#include "ExtractMode.h" +#include "IFileExtractCallback.h" +#include "OpenArchive.h" + +class CArchiveExtractCallback: + public IArchiveExtractCallback, + // public IArchiveVolumeExtractCallback, + public ICryptoGetTextPassword, + public ICompressProgressInfo, + public CMyUnknownImp +{ + const CArc *_arc; + const NWildcard::CCensorNode *_wildcardCensor; + CMyComPtr _extractCallback2; + CMyComPtr _compressProgress; + CMyComPtr _cryptoGetTextPassword; + UString _directoryPath; + NExtract::NPathMode::EEnum _pathMode; + NExtract::NOverwriteMode::EEnum _overwriteMode; + + UString _diskFilePath; + UString _filePath; + UInt64 _position; + bool _isSplit; + + bool _extractMode; + + bool WriteCTime; + bool WriteATime; + bool WriteMTime; + + bool _encrypted; + + struct CProcessedFileInfo + { + FILETIME CTime; + FILETIME ATime; + FILETIME MTime; + UInt32 Attrib; + + bool CTimeDefined; + bool ATimeDefined; + bool MTimeDefined; + bool AttribDefined; + + bool IsDir; + } _fi; + + UInt32 _index; + UInt64 _curSize; + bool _curSizeDefined; + COutFileStream *_outFileStreamSpec; + CMyComPtr _outFileStream; + + COutStreamWithCRC *_crcStreamSpec; + CMyComPtr _crcStream; + + UStringVector _removePathParts; + + bool _stdOutMode; + bool _testMode; + bool _crcMode; + bool _multiArchives; + + CMyComPtr _localProgress; + UInt64 _packTotal; + UInt64 _unpTotal; + + void CreateComplexDirectory(const UStringVector &dirPathParts, UString &fullPath); + HRESULT GetTime(int index, PROPID propID, FILETIME &filetime, bool &filetimeIsDefined); + HRESULT GetUnpackSize(); + +public: + + CLocalProgress *LocalProgressSpec; + + UInt64 NumFolders; + UInt64 NumFiles; + UInt64 UnpackSize; + UInt32 CrcSum; + + MY_UNKNOWN_IMP2(ICryptoGetTextPassword, ICompressProgressInfo) + // COM_INTERFACE_ENTRY(IArchiveVolumeExtractCallback) + + INTERFACE_IArchiveExtractCallback(;) + + STDMETHOD(SetRatioInfo)(const UInt64 *inSize, const UInt64 *outSize); + + // IArchiveVolumeExtractCallback + // STDMETHOD(GetInStream)(const wchar_t *name, ISequentialInStream **inStream); + + STDMETHOD(CryptoGetTextPassword)(BSTR *password); + + CArchiveExtractCallback(): + WriteCTime(true), + WriteATime(true), + WriteMTime(true), + _multiArchives(false) + { + LocalProgressSpec = new CLocalProgress(); + _localProgress = LocalProgressSpec; + } + + void InitForMulti(bool multiArchives, + NExtract::NPathMode::EEnum pathMode, + NExtract::NOverwriteMode::EEnum overwriteMode) + { + _multiArchives = multiArchives; + _pathMode = pathMode; + _overwriteMode = overwriteMode; + NumFolders = NumFiles = UnpackSize = 0; + CrcSum = 0; + } + + void Init( + const NWildcard::CCensorNode *wildcardCensor, + const CArc *arc, + IFolderArchiveExtractCallback *extractCallback2, + bool stdOutMode, bool testMode, bool crcMode, + const UString &directoryPath, + const UStringVector &removePathParts, + UInt64 packSize); + +}; + +#endif diff --git a/CPP/7zip/UI/Common/ArchiveName.cpp b/CPP/7zip/UI/Common/ArchiveName.cpp new file mode 100644 index 0000000..c3684de --- /dev/null +++ b/CPP/7zip/UI/Common/ArchiveName.cpp @@ -0,0 +1,54 @@ +// ArchiveName.cpp + +#include "StdAfx.h" + +#include "Windows/FileDir.h" +#include "Windows/FileFind.h" + +#include "ExtractingFilePath.h" + +using namespace NWindows; + +static UString CreateArchiveName2(const UString &srcName, bool fromPrev, bool keepName) +{ + UString resultName = L"Archive"; + if (fromPrev) + { + UString dirPrefix; + if (NFile::NDirectory::GetOnlyDirPrefix(srcName, dirPrefix)) + { + if (dirPrefix.Length() > 0) + if (dirPrefix[dirPrefix.Length() - 1] == WCHAR_PATH_SEPARATOR) + { + dirPrefix.Delete(dirPrefix.Length() - 1); + NFile::NFind::CFileInfoW fileInfo; + if (fileInfo.Find(dirPrefix)) + resultName = fileInfo.Name; + } + } + } + else + { + NFile::NFind::CFileInfoW fileInfo; + if (!fileInfo.Find(srcName)) + // return resultName; + return srcName; + resultName = fileInfo.Name; + if (!fileInfo.IsDir() && !keepName) + { + int dotPos = resultName.ReverseFind('.'); + if (dotPos > 0) + { + UString archiveName2 = resultName.Left(dotPos); + if (archiveName2.ReverseFind('.') < 0) + resultName = archiveName2; + } + } + } + return resultName; +} + +UString CreateArchiveName(const UString &srcName, bool fromPrev, bool keepName) +{ + return GetCorrectFsPath(CreateArchiveName2(srcName, fromPrev, keepName)); +} diff --git a/CPP/7zip/UI/Common/ArchiveName.h b/CPP/7zip/UI/Common/ArchiveName.h new file mode 100644 index 0000000..9513fb2 --- /dev/null +++ b/CPP/7zip/UI/Common/ArchiveName.h @@ -0,0 +1,10 @@ +// ArchiveName.h + +#ifndef __ARCHIVENAME_H +#define __ARCHIVENAME_H + +#include "Common/MyString.h" + +UString CreateArchiveName(const UString &srcName, bool fromPrev, bool keepName); + +#endif diff --git a/CPP/7zip/UI/Common/ArchiveOpenCallback.cpp b/CPP/7zip/UI/Common/ArchiveOpenCallback.cpp new file mode 100644 index 0000000..e7e6171 --- /dev/null +++ b/CPP/7zip/UI/Common/ArchiveOpenCallback.cpp @@ -0,0 +1,133 @@ +// ArchiveOpenCallback.cpp + +#include "StdAfx.h" + +#include "Common/StringConvert.h" +#include "Common/ComTry.h" + +#include "Windows/PropVariant.h" + +#include "../../Common/FileStreams.h" + +#include "ArchiveOpenCallback.h" + +using namespace NWindows; + +STDMETHODIMP COpenCallbackImp::SetTotal(const UInt64 *files, const UInt64 *bytes) +{ + COM_TRY_BEGIN + if (ReOpenCallback) + return ReOpenCallback->SetTotal(files, bytes); + if (!Callback) + return S_OK; + return Callback->Open_SetTotal(files, bytes); + COM_TRY_END +} + +STDMETHODIMP COpenCallbackImp::SetCompleted(const UInt64 *files, const UInt64 *bytes) +{ + COM_TRY_BEGIN + if (ReOpenCallback) + return ReOpenCallback->SetCompleted(files, bytes); + if (!Callback) + return S_OK; + return Callback->Open_SetCompleted(files, bytes); + COM_TRY_END +} + +STDMETHODIMP COpenCallbackImp::GetProperty(PROPID propID, PROPVARIANT *value) +{ + COM_TRY_BEGIN + NCOM::CPropVariant prop; + if (_subArchiveMode) + switch(propID) + { + case kpidName: prop = _subArchiveName; break; + } + else + switch(propID) + { + case kpidName: prop = _fileInfo.Name; break; + case kpidIsDir: prop = _fileInfo.IsDir(); break; + case kpidSize: prop = _fileInfo.Size; break; + case kpidAttrib: prop = (UInt32)_fileInfo.Attrib; break; + case kpidCTime: prop = _fileInfo.CTime; break; + case kpidATime: prop = _fileInfo.ATime; break; + case kpidMTime: prop = _fileInfo.MTime; break; + } + prop.Detach(value); + return S_OK; + COM_TRY_END +} + +int COpenCallbackImp::FindName(const UString &name) +{ + for (int i = 0; i < FileNames.Size(); i++) + if (name.CompareNoCase(FileNames[i]) == 0) + return i; + return -1; +} + +struct CInFileStreamVol: public CInFileStream +{ + UString Name; + COpenCallbackImp *OpenCallbackImp; + CMyComPtr OpenCallbackRef; + ~CInFileStreamVol() + { + if (OpenCallbackRef) + { + int index = OpenCallbackImp->FindName(Name); + if (index >= 0) + OpenCallbackImp->FileNames.Delete(index); + } + } +}; + +STDMETHODIMP COpenCallbackImp::GetStream(const wchar_t *name, IInStream **inStream) +{ + COM_TRY_BEGIN + if (_subArchiveMode) + return S_FALSE; + if (Callback) + { + RINOK(Callback->Open_CheckBreak()); + } + *inStream = NULL; + UString fullPath = _folderPrefix + name; + if (!_fileInfo.Find(fullPath)) + return S_FALSE; + if (_fileInfo.IsDir()) + return S_FALSE; + CInFileStreamVol *inFile = new CInFileStreamVol; + CMyComPtr inStreamTemp = inFile; + if (!inFile->Open(fullPath)) + return ::GetLastError(); + *inStream = inStreamTemp.Detach(); + inFile->Name = name; + inFile->OpenCallbackImp = this; + inFile->OpenCallbackRef = this; + FileNames.Add(name); + TotalSize += _fileInfo.Size; + return S_OK; + COM_TRY_END +} + +#ifndef _NO_CRYPTO +STDMETHODIMP COpenCallbackImp::CryptoGetTextPassword(BSTR *password) +{ + COM_TRY_BEGIN + if (ReOpenCallback) + { + CMyComPtr getTextPassword; + ReOpenCallback.QueryInterface(IID_ICryptoGetTextPassword, &getTextPassword); + if (getTextPassword) + return getTextPassword->CryptoGetTextPassword(password); + } + if (!Callback) + return E_NOTIMPL; + return Callback->Open_CryptoGetTextPassword(password); + COM_TRY_END +} +#endif + diff --git a/CPP/7zip/UI/Common/ArchiveOpenCallback.h b/CPP/7zip/UI/Common/ArchiveOpenCallback.h new file mode 100644 index 0000000..c6651e8 --- /dev/null +++ b/CPP/7zip/UI/Common/ArchiveOpenCallback.h @@ -0,0 +1,103 @@ +// ArchiveOpenCallback.h + +#ifndef __ARCHIVE_OPEN_CALLBACK_H +#define __ARCHIVE_OPEN_CALLBACK_H + +#include "Common/MyCom.h" +#include "Common/MyString.h" + +#include "Windows/FileFind.h" + +#ifndef _NO_CRYPTO +#include "../../IPassword.h" +#endif +#include "../../Archive/IArchive.h" + +#ifdef _NO_CRYPTO + +#define INTERFACE_IOpenCallbackUI_Crypto(x) + +#else + +#define INTERFACE_IOpenCallbackUI_Crypto(x) \ + virtual HRESULT Open_CryptoGetTextPassword(BSTR *password) x; \ + virtual HRESULT Open_GetPasswordIfAny(UString &password) x; \ + virtual bool Open_WasPasswordAsked() x; \ + virtual void Open_ClearPasswordWasAskedFlag() x; \ + +#endif + +#define INTERFACE_IOpenCallbackUI(x) \ + virtual HRESULT Open_CheckBreak() x; \ + virtual HRESULT Open_SetTotal(const UInt64 *files, const UInt64 *bytes) x; \ + virtual HRESULT Open_SetCompleted(const UInt64 *files, const UInt64 *bytes) x; \ + INTERFACE_IOpenCallbackUI_Crypto(x) + +struct IOpenCallbackUI +{ + INTERFACE_IOpenCallbackUI(=0) +}; + +class COpenCallbackImp: + public IArchiveOpenCallback, + public IArchiveOpenVolumeCallback, + public IArchiveOpenSetSubArchiveName, + #ifndef _NO_CRYPTO + public ICryptoGetTextPassword, + #endif + public CMyUnknownImp +{ +public: + #ifndef _NO_CRYPTO + MY_UNKNOWN_IMP3( + IArchiveOpenVolumeCallback, + ICryptoGetTextPassword, + IArchiveOpenSetSubArchiveName + ) + #else + MY_UNKNOWN_IMP2( + IArchiveOpenVolumeCallback, + IArchiveOpenSetSubArchiveName + ) + #endif + + INTERFACE_IArchiveOpenCallback(;) + INTERFACE_IArchiveOpenVolumeCallback(;) + + #ifndef _NO_CRYPTO + STDMETHOD(CryptoGetTextPassword)(BSTR *password); + #endif + + STDMETHOD(SetSubArchiveName(const wchar_t *name)) + { + _subArchiveMode = true; + _subArchiveName = name; + TotalSize = 0; + return S_OK; + } + +private: + UString _folderPrefix; + NWindows::NFile::NFind::CFileInfoW _fileInfo; + bool _subArchiveMode; + UString _subArchiveName; +public: + UStringVector FileNames; + IOpenCallbackUI *Callback; + CMyComPtr ReOpenCallback; + UInt64 TotalSize; + + COpenCallbackImp(): Callback(NULL) {} + void Init(const UString &folderPrefix, const UString &fileName) + { + _folderPrefix = folderPrefix; + if (!_fileInfo.Find(_folderPrefix + fileName)) + throw 1; + FileNames.Clear(); + _subArchiveMode = false; + TotalSize = 0; + } + int FindName(const UString &name); +}; + +#endif diff --git a/CPP/7zip/UI/Common/Bench.cpp b/CPP/7zip/UI/Common/Bench.cpp new file mode 100644 index 0000000..282f405 --- /dev/null +++ b/CPP/7zip/UI/Common/Bench.cpp @@ -0,0 +1,1028 @@ +// Bench.cpp + +#include "StdAfx.h" + +#include "Bench.h" + +#ifndef _WIN32 +#define USE_POSIX_TIME +#define USE_POSIX_TIME2 +#endif + +#ifdef USE_POSIX_TIME +#include +#ifdef USE_POSIX_TIME2 +#include +#endif +#endif + +#ifdef _WIN32 +#define USE_ALLOCA +#endif + +#ifdef USE_ALLOCA +#ifdef _WIN32 +#include +#else +#include +#endif +#endif + +#include "../../../../C/7zCrc.h" +#include "../../../../C/Alloc.h" + +#ifndef _7ZIP_ST +#include "../../../Windows/Synchronization.h" +#include "../../../Windows/Thread.h" +#endif + +#include "../../../Windows/PropVariant.h" + +static const UInt32 kUncompressMinBlockSize = +#ifdef UNDER_CE +1 << 24; +#else +1 << 26; +#endif + +static const UInt32 kCrcBlockSize = +#ifdef UNDER_CE +1 << 25; +#else +1 << 30; +#endif + +static const UInt32 kAdditionalSize = (1 << 16); +static const UInt32 kCompressedAdditionalSize = (1 << 10); +static const UInt32 kMaxLzmaPropSize = 5; + +class CBaseRandomGenerator +{ + UInt32 A1; + UInt32 A2; +public: + CBaseRandomGenerator() { Init(); } + void Init() { A1 = 362436069; A2 = 521288629;} + UInt32 GetRnd() + { + return + ((A1 = 36969 * (A1 & 0xffff) + (A1 >> 16)) << 16) + + ((A2 = 18000 * (A2 & 0xffff) + (A2 >> 16)) ); + } +}; + +class CBenchBuffer +{ +public: + size_t BufferSize; + Byte *Buffer; + CBenchBuffer(): Buffer(0) {} + virtual ~CBenchBuffer() { Free(); } + void Free() + { + ::MidFree(Buffer); + Buffer = 0; + } + bool Alloc(size_t bufferSize) + { + if (Buffer != 0 && BufferSize == bufferSize) + return true; + Free(); + Buffer = (Byte *)::MidAlloc(bufferSize); + BufferSize = bufferSize; + return (Buffer != 0); + } +}; + +class CBenchRandomGenerator: public CBenchBuffer +{ + CBaseRandomGenerator *RG; +public: + void Set(CBaseRandomGenerator *rg) { RG = rg; } + UInt32 GetVal(UInt32 &res, int numBits) + { + UInt32 val = res & (((UInt32)1 << numBits) - 1); + res >>= numBits; + return val; + } + UInt32 GetLen(UInt32 &res) + { + UInt32 len = GetVal(res, 2); + return GetVal(res, 1 + len); + } + void Generate() + { + UInt32 pos = 0; + UInt32 rep0 = 1; + while (pos < BufferSize) + { + UInt32 res = RG->GetRnd(); + res >>= 1; + if (GetVal(res, 1) == 0 || pos < 1024) + Buffer[pos++] = (Byte)(res & 0xFF); + else + { + UInt32 len; + len = 1 + GetLen(res); + if (GetVal(res, 3) != 0) + { + len += GetLen(res); + do + { + UInt32 ppp = GetVal(res, 5) + 6; + res = RG->GetRnd(); + if (ppp > 30) + continue; + rep0 = /* (1 << ppp) +*/ GetVal(res, ppp); + res = RG->GetRnd(); + } + while (rep0 >= pos); + rep0++; + } + + for (UInt32 i = 0; i < len && pos < BufferSize; i++, pos++) + Buffer[pos] = Buffer[pos - rep0]; + } + } + } +}; + + +class CBenchmarkInStream: + public ISequentialInStream, + public CMyUnknownImp +{ + const Byte *Data; + size_t Pos; + size_t Size; +public: + MY_UNKNOWN_IMP + void Init(const Byte *data, size_t size) + { + Data = data; + Size = size; + Pos = 0; + } + STDMETHOD(Read)(void *data, UInt32 size, UInt32 *processedSize); +}; + +STDMETHODIMP CBenchmarkInStream::Read(void *data, UInt32 size, UInt32 *processedSize) +{ + size_t remain = Size - Pos; + UInt32 kMaxBlockSize = (1 << 20); + if (size > kMaxBlockSize) + size = kMaxBlockSize; + if (size > remain) + size = (UInt32)remain; + for (UInt32 i = 0; i < size; i++) + ((Byte *)data)[i] = Data[Pos + i]; + Pos += size; + if(processedSize != NULL) + *processedSize = size; + return S_OK; +} + +class CBenchmarkOutStream: + public ISequentialOutStream, + public CBenchBuffer, + public CMyUnknownImp +{ + // bool _overflow; +public: + UInt32 Pos; + // CBenchmarkOutStream(): _overflow(false) {} + void Init() + { + // _overflow = false; + Pos = 0; + } + MY_UNKNOWN_IMP + STDMETHOD(Write)(const void *data, UInt32 size, UInt32 *processedSize); +}; + +STDMETHODIMP CBenchmarkOutStream::Write(const void *data, UInt32 size, UInt32 *processedSize) +{ + size_t curSize = BufferSize - Pos; + if (curSize > size) + curSize = size; + memcpy(Buffer + Pos, data, curSize); + Pos += (UInt32)curSize; + if(processedSize != NULL) + *processedSize = (UInt32)curSize; + if (curSize != size) + { + // _overflow = true; + return E_FAIL; + } + return S_OK; +} + +class CCrcOutStream: + public ISequentialOutStream, + public CMyUnknownImp +{ +public: + UInt32 Crc; + MY_UNKNOWN_IMP + void Init() { Crc = CRC_INIT_VAL; } + STDMETHOD(Write)(const void *data, UInt32 size, UInt32 *processedSize); +}; + +STDMETHODIMP CCrcOutStream::Write(const void *data, UInt32 size, UInt32 *processedSize) +{ + Crc = CrcUpdate(Crc, data, size); + if (processedSize != NULL) + *processedSize = size; + return S_OK; +} + +static UInt64 GetTimeCount() +{ + #ifdef USE_POSIX_TIME + #ifdef USE_POSIX_TIME2 + timeval v; + if (gettimeofday(&v, 0) == 0) + return (UInt64)(v.tv_sec) * 1000000 + v.tv_usec; + return (UInt64)time(NULL) * 1000000; + #else + return time(NULL); + #endif + #else + /* + LARGE_INTEGER value; + if (::QueryPerformanceCounter(&value)) + return value.QuadPart; + */ + return GetTickCount(); + #endif +} + +static UInt64 GetFreq() +{ + #ifdef USE_POSIX_TIME + #ifdef USE_POSIX_TIME2 + return 1000000; + #else + return 1; + #endif + #else + /* + LARGE_INTEGER value; + if (::QueryPerformanceFrequency(&value)) + return value.QuadPart; + */ + return 1000; + #endif +} + +#ifndef USE_POSIX_TIME +static inline UInt64 GetTime64(const FILETIME &t) { return ((UInt64)t.dwHighDateTime << 32) | t.dwLowDateTime; } +#endif + +static UInt64 GetUserTime() +{ + #ifdef USE_POSIX_TIME + return clock(); + #else + FILETIME creationTime, exitTime, kernelTime, userTime; + if ( + #ifdef UNDER_CE + ::GetThreadTimes(::GetCurrentThread() + #else + ::GetProcessTimes(::GetCurrentProcess() + #endif + , &creationTime, &exitTime, &kernelTime, &userTime) != 0) + return GetTime64(userTime) + GetTime64(kernelTime); + return (UInt64)GetTickCount() * 10000; + #endif +} + +static UInt64 GetUserFreq() +{ + #ifdef USE_POSIX_TIME + return CLOCKS_PER_SEC; + #else + return 10000000; + #endif +} + +class CBenchProgressStatus +{ + #ifndef _7ZIP_ST + NWindows::NSynchronization::CCriticalSection CS; + #endif +public: + HRESULT Res; + bool EncodeMode; + void SetResult(HRESULT res) + { + #ifndef _7ZIP_ST + NWindows::NSynchronization::CCriticalSectionLock lock(CS); + #endif + Res = res; + } + HRESULT GetResult() + { + #ifndef _7ZIP_ST + NWindows::NSynchronization::CCriticalSectionLock lock(CS); + #endif + return Res; + } +}; + +class CBenchProgressInfo: + public ICompressProgressInfo, + public CMyUnknownImp +{ +public: + CBenchProgressStatus *Status; + CBenchInfo BenchInfo; + HRESULT Res; + IBenchCallback *callback; + CBenchProgressInfo(): callback(0) {} + MY_UNKNOWN_IMP + STDMETHOD(SetRatioInfo)(const UInt64 *inSize, const UInt64 *outSize); +}; + +static void SetStartTime(CBenchInfo &bi) +{ + bi.GlobalFreq = GetFreq(); + bi.UserFreq = GetUserFreq(); + bi.GlobalTime = ::GetTimeCount(); + bi.UserTime = ::GetUserTime(); +} + +static void SetFinishTime(const CBenchInfo &biStart, CBenchInfo &dest) +{ + dest.GlobalFreq = GetFreq(); + dest.UserFreq = GetUserFreq(); + dest.GlobalTime = ::GetTimeCount() - biStart.GlobalTime; + dest.UserTime = ::GetUserTime() - biStart.UserTime; +} + +STDMETHODIMP CBenchProgressInfo::SetRatioInfo(const UInt64 *inSize, const UInt64 *outSize) +{ + HRESULT res = Status->GetResult(); + if (res != S_OK) + return res; + if (!callback) + return res; + CBenchInfo info = BenchInfo; + SetFinishTime(BenchInfo, info); + if (Status->EncodeMode) + { + info.UnpackSize = *inSize; + info.PackSize = *outSize; + res = callback->SetEncodeResult(info, false); + } + else + { + info.PackSize = BenchInfo.PackSize + *inSize; + info.UnpackSize = BenchInfo.UnpackSize + *outSize; + res = callback->SetDecodeResult(info, false); + } + if (res != S_OK) + Status->SetResult(res); + return res; +} + +static const int kSubBits = 8; + +static UInt32 GetLogSize(UInt32 size) +{ + for (int i = kSubBits; i < 32; i++) + for (UInt32 j = 0; j < (1 << kSubBits); j++) + if (size <= (((UInt32)1) << i) + (j << (i - kSubBits))) + return (i << kSubBits) + j; + return (32 << kSubBits); +} + +static void NormalizeVals(UInt64 &v1, UInt64 &v2) +{ + while (v1 > 1000000) + { + v1 >>= 1; + v2 >>= 1; + } +} + +UInt64 GetUsage(const CBenchInfo &info) +{ + UInt64 userTime = info.UserTime; + UInt64 userFreq = info.UserFreq; + UInt64 globalTime = info.GlobalTime; + UInt64 globalFreq = info.GlobalFreq; + NormalizeVals(userTime, userFreq); + NormalizeVals(globalFreq, globalTime); + if (userFreq == 0) + userFreq = 1; + if (globalTime == 0) + globalTime = 1; + return userTime * globalFreq * 1000000 / userFreq / globalTime; +} + +UInt64 GetRatingPerUsage(const CBenchInfo &info, UInt64 rating) +{ + UInt64 userTime = info.UserTime; + UInt64 userFreq = info.UserFreq; + UInt64 globalTime = info.GlobalTime; + UInt64 globalFreq = info.GlobalFreq; + NormalizeVals(userFreq, userTime); + NormalizeVals(globalTime, globalFreq); + if (globalFreq == 0) + globalFreq = 1; + if (userTime == 0) + userTime = 1; + return userFreq * globalTime / globalFreq * rating / userTime; +} + +static UInt64 MyMultDiv64(UInt64 value, UInt64 elapsedTime, UInt64 freq) +{ + UInt64 elTime = elapsedTime; + NormalizeVals(freq, elTime); + if (elTime == 0) + elTime = 1; + return value * freq / elTime; +} + +UInt64 GetCompressRating(UInt32 dictionarySize, UInt64 elapsedTime, UInt64 freq, UInt64 size) +{ + UInt64 t = GetLogSize(dictionarySize) - (kBenchMinDicLogSize << kSubBits); + UInt64 numCommandsForOne = 870 + ((t * t * 5) >> (2 * kSubBits)); + UInt64 numCommands = (UInt64)(size) * numCommandsForOne; + return MyMultDiv64(numCommands, elapsedTime, freq); +} + +UInt64 GetDecompressRating(UInt64 elapsedTime, UInt64 freq, UInt64 outSize, UInt64 inSize, UInt32 numIterations) +{ + UInt64 numCommands = (inSize * 200 + outSize * 4) * numIterations; + return MyMultDiv64(numCommands, elapsedTime, freq); +} + +struct CEncoderInfo; + +struct CEncoderInfo +{ + #ifndef _7ZIP_ST + NWindows::CThread thread[2]; + #endif + CMyComPtr encoder; + CBenchProgressInfo *progressInfoSpec[2]; + CMyComPtr progressInfo[2]; + UInt32 NumIterations; + #ifdef USE_ALLOCA + size_t AllocaSize; + #endif + + struct CDecoderInfo + { + CEncoderInfo *Encoder; + UInt32 DecoderIndex; + #ifdef USE_ALLOCA + size_t AllocaSize; + #endif + bool CallbackMode; + }; + CDecoderInfo decodersInfo[2]; + + CMyComPtr decoders[2]; + HRESULT Results[2]; + CBenchmarkOutStream *outStreamSpec; + CMyComPtr outStream; + IBenchCallback *callback; + UInt32 crc; + UInt32 kBufferSize; + UInt32 compressedSize; + CBenchRandomGenerator rg; + CBenchmarkOutStream *propStreamSpec; + CMyComPtr propStream; + HRESULT Init(UInt32 dictionarySize, UInt32 numThreads, CBaseRandomGenerator *rg); + HRESULT Encode(); + HRESULT Decode(UInt32 decoderIndex); + + CEncoderInfo(): outStreamSpec(0), callback(0), propStreamSpec(0) {} + + #ifndef _7ZIP_ST + static THREAD_FUNC_DECL EncodeThreadFunction(void *param) + { + CEncoderInfo *encoder = (CEncoderInfo *)param; + #ifdef USE_ALLOCA + alloca(encoder->AllocaSize); + #endif + HRESULT res = encoder->Encode(); + encoder->Results[0] = res; + if (res != S_OK) + encoder->progressInfoSpec[0]->Status->SetResult(res); + + return 0; + } + static THREAD_FUNC_DECL DecodeThreadFunction(void *param) + { + CDecoderInfo *decoder = (CDecoderInfo *)param; + #ifdef USE_ALLOCA + alloca(decoder->AllocaSize); + #endif + CEncoderInfo *encoder = decoder->Encoder; + encoder->Results[decoder->DecoderIndex] = encoder->Decode(decoder->DecoderIndex); + return 0; + } + + HRESULT CreateEncoderThread() + { + return thread[0].Create(EncodeThreadFunction, this); + } + + HRESULT CreateDecoderThread(int index, bool callbackMode + #ifdef USE_ALLOCA + , size_t allocaSize + #endif + ) + { + CDecoderInfo &decoder = decodersInfo[index]; + decoder.DecoderIndex = index; + decoder.Encoder = this; + #ifdef USE_ALLOCA + decoder.AllocaSize = allocaSize; + #endif + decoder.CallbackMode = callbackMode; + return thread[index].Create(DecodeThreadFunction, &decoder); + } + #endif +}; + +HRESULT CEncoderInfo::Init(UInt32 dictionarySize, UInt32 numThreads, CBaseRandomGenerator *rgLoc) +{ + rg.Set(rgLoc); + kBufferSize = dictionarySize + kAdditionalSize; + UInt32 kCompressedBufferSize = (kBufferSize / 2) + kCompressedAdditionalSize; + if (!rg.Alloc(kBufferSize)) + return E_OUTOFMEMORY; + rg.Generate(); + crc = CrcCalc(rg.Buffer, rg.BufferSize); + + outStreamSpec = new CBenchmarkOutStream; + if (!outStreamSpec->Alloc(kCompressedBufferSize)) + return E_OUTOFMEMORY; + + outStream = outStreamSpec; + + propStreamSpec = 0; + if (!propStream) + { + propStreamSpec = new CBenchmarkOutStream; + propStream = propStreamSpec; + } + if (!propStreamSpec->Alloc(kMaxLzmaPropSize)) + return E_OUTOFMEMORY; + propStreamSpec->Init(); + + PROPID propIDs[] = + { + NCoderPropID::kDictionarySize, + NCoderPropID::kNumThreads + }; + const int kNumProps = sizeof(propIDs) / sizeof(propIDs[0]); + PROPVARIANT props[kNumProps]; + props[0].vt = VT_UI4; + props[0].ulVal = dictionarySize; + + props[1].vt = VT_UI4; + props[1].ulVal = numThreads; + + { + CMyComPtr setCoderProperties; + RINOK(encoder.QueryInterface(IID_ICompressSetCoderProperties, &setCoderProperties)); + if (!setCoderProperties) + return E_FAIL; + RINOK(setCoderProperties->SetCoderProperties(propIDs, props, kNumProps)); + + CMyComPtr writeCoderProperties; + encoder.QueryInterface(IID_ICompressWriteCoderProperties, &writeCoderProperties); + if (writeCoderProperties) + { + RINOK(writeCoderProperties->WriteCoderProperties(propStream)); + } + } + return S_OK; +} + +HRESULT CEncoderInfo::Encode() +{ + CBenchmarkInStream *inStreamSpec = new CBenchmarkInStream; + CMyComPtr inStream = inStreamSpec; + inStreamSpec->Init(rg.Buffer, rg.BufferSize); + outStreamSpec->Init(); + + RINOK(encoder->Code(inStream, outStream, 0, 0, progressInfo[0])); + compressedSize = outStreamSpec->Pos; + encoder.Release(); + return S_OK; +} + +HRESULT CEncoderInfo::Decode(UInt32 decoderIndex) +{ + CBenchmarkInStream *inStreamSpec = new CBenchmarkInStream; + CMyComPtr inStream = inStreamSpec; + CMyComPtr &decoder = decoders[decoderIndex]; + + CMyComPtr compressSetDecoderProperties; + decoder.QueryInterface(IID_ICompressSetDecoderProperties2, &compressSetDecoderProperties); + if (!compressSetDecoderProperties) + return E_FAIL; + + CCrcOutStream *crcOutStreamSpec = new CCrcOutStream; + CMyComPtr crcOutStream = crcOutStreamSpec; + + CBenchProgressInfo *pi = progressInfoSpec[decoderIndex]; + pi->BenchInfo.UnpackSize = 0; + pi->BenchInfo.PackSize = 0; + + for (UInt32 j = 0; j < NumIterations; j++) + { + inStreamSpec->Init(outStreamSpec->Buffer, compressedSize); + crcOutStreamSpec->Init(); + + RINOK(compressSetDecoderProperties->SetDecoderProperties2(propStreamSpec->Buffer, propStreamSpec->Pos)); + UInt64 outSize = kBufferSize; + RINOK(decoder->Code(inStream, crcOutStream, 0, &outSize, progressInfo[decoderIndex])); + if (CRC_GET_DIGEST(crcOutStreamSpec->Crc) != crc) + return S_FALSE; + pi->BenchInfo.UnpackSize += kBufferSize; + pi->BenchInfo.PackSize += compressedSize; + } + decoder.Release(); + return S_OK; +} + +static const UInt32 kNumThreadsMax = (1 << 16); + +struct CBenchEncoders +{ + CEncoderInfo *encoders; + CBenchEncoders(UInt32 num): encoders(0) { encoders = new CEncoderInfo[num]; } + ~CBenchEncoders() { delete []encoders; } +}; + +HRESULT LzmaBench( + DECL_EXTERNAL_CODECS_LOC_VARS + UInt32 numThreads, UInt32 dictionarySize, IBenchCallback *callback) +{ + UInt32 numEncoderThreads = + #ifndef _7ZIP_ST + (numThreads > 1 ? numThreads / 2 : 1); + #else + 1; + #endif + UInt32 numSubDecoderThreads = + #ifndef _7ZIP_ST + (numThreads > 1 ? 2 : 1); + #else + 1; + #endif + if (dictionarySize < (1 << kBenchMinDicLogSize) || numThreads < 1 || numEncoderThreads > kNumThreadsMax) + { + return E_INVALIDARG; + } + + CBenchEncoders encodersSpec(numEncoderThreads); + CEncoderInfo *encoders = encodersSpec.encoders; + + + UInt32 i; + for (i = 0; i < numEncoderThreads; i++) + { + CEncoderInfo &encoder = encoders[i]; + encoder.callback = (i == 0) ? callback : 0; + + const UInt32 kLzmaId = 0x030101; + RINOK(CreateCoder(EXTERNAL_CODECS_LOC_VARS kLzmaId, encoder.encoder, true)); + if (!encoder.encoder) + return E_NOTIMPL; + for (UInt32 j = 0; j < numSubDecoderThreads; j++) + { + RINOK(CreateCoder(EXTERNAL_CODECS_LOC_VARS kLzmaId, encoder.decoders[j], false)); + if (!encoder.decoders[j]) + return E_NOTIMPL; + } + } + + CBaseRandomGenerator rg; + rg.Init(); + for (i = 0; i < numEncoderThreads; i++) + { + RINOK(encoders[i].Init(dictionarySize, numThreads, &rg)); + } + + CBenchProgressStatus status; + status.Res = S_OK; + status.EncodeMode = true; + + for (i = 0; i < numEncoderThreads; i++) + { + CEncoderInfo &encoder = encoders[i]; + for (int j = 0; j < 2; j++) + { + encoder.progressInfo[j] = encoder.progressInfoSpec[j] = new CBenchProgressInfo; + encoder.progressInfoSpec[j]->Status = &status; + } + if (i == 0) + { + encoder.progressInfoSpec[0]->callback = callback; + encoder.progressInfoSpec[0]->BenchInfo.NumIterations = numEncoderThreads; + SetStartTime(encoder.progressInfoSpec[0]->BenchInfo); + } + + #ifndef _7ZIP_ST + if (numEncoderThreads > 1) + { + #ifdef USE_ALLOCA + encoder.AllocaSize = (i * 16 * 21) & 0x7FF; + #endif + RINOK(encoder.CreateEncoderThread()) + } + else + #endif + { + RINOK(encoder.Encode()); + } + } + #ifndef _7ZIP_ST + if (numEncoderThreads > 1) + for (i = 0; i < numEncoderThreads; i++) + encoders[i].thread[0].Wait(); + #endif + + RINOK(status.Res); + + CBenchInfo info; + + SetFinishTime(encoders[0].progressInfoSpec[0]->BenchInfo, info); + info.UnpackSize = 0; + info.PackSize = 0; + info.NumIterations = 1; // progressInfoSpec->NumIterations; + for (i = 0; i < numEncoderThreads; i++) + { + CEncoderInfo &encoder = encoders[i]; + info.UnpackSize += encoder.kBufferSize; + info.PackSize += encoder.compressedSize; + } + RINOK(callback->SetEncodeResult(info, true)); + + + status.Res = S_OK; + status.EncodeMode = false; + + UInt32 numDecoderThreads = numEncoderThreads * numSubDecoderThreads; + for (i = 0; i < numEncoderThreads; i++) + { + CEncoderInfo &encoder = encoders[i]; + encoder.NumIterations = 2 + kUncompressMinBlockSize / encoder.kBufferSize; + + if (i == 0) + { + encoder.progressInfoSpec[0]->callback = callback; + encoder.progressInfoSpec[0]->BenchInfo.NumIterations = numDecoderThreads; + SetStartTime(encoder.progressInfoSpec[0]->BenchInfo); + } + + #ifndef _7ZIP_ST + if (numDecoderThreads > 1) + { + for (UInt32 j = 0; j < numSubDecoderThreads; j++) + { + HRESULT res = encoder.CreateDecoderThread(j, (i == 0 && j == 0) + #ifdef USE_ALLOCA + , ((i * numSubDecoderThreads + j) * 16 * 21) & 0x7FF + #endif + ); + RINOK(res); + } + } + else + #endif + { + RINOK(encoder.Decode(0)); + } + } + #ifndef _7ZIP_ST + HRESULT res = S_OK; + if (numDecoderThreads > 1) + for (i = 0; i < numEncoderThreads; i++) + for (UInt32 j = 0; j < numSubDecoderThreads; j++) + { + CEncoderInfo &encoder = encoders[i]; + encoder.thread[j].Wait(); + if (encoder.Results[j] != S_OK) + res = encoder.Results[j]; + } + RINOK(res); + #endif + RINOK(status.Res); + SetFinishTime(encoders[0].progressInfoSpec[0]->BenchInfo, info); + #ifndef _7ZIP_ST + #ifdef UNDER_CE + if (numDecoderThreads > 1) + for (i = 0; i < numEncoderThreads; i++) + for (UInt32 j = 0; j < numSubDecoderThreads; j++) + { + FILETIME creationTime, exitTime, kernelTime, userTime; + if (::GetThreadTimes(encoders[i].thread[j], &creationTime, &exitTime, &kernelTime, &userTime) != 0) + info.UserTime += GetTime64(userTime) + GetTime64(kernelTime); + } + #endif + #endif + info.UnpackSize = 0; + info.PackSize = 0; + info.NumIterations = numSubDecoderThreads * encoders[0].NumIterations; + for (i = 0; i < numEncoderThreads; i++) + { + CEncoderInfo &encoder = encoders[i]; + info.UnpackSize += encoder.kBufferSize; + info.PackSize += encoder.compressedSize; + } + RINOK(callback->SetDecodeResult(info, false)); + RINOK(callback->SetDecodeResult(info, true)); + return S_OK; +} + + +inline UInt64 GetLZMAUsage(bool multiThread, UInt32 dictionary) +{ + UInt32 hs = dictionary - 1; + hs |= (hs >> 1); + hs |= (hs >> 2); + hs |= (hs >> 4); + hs |= (hs >> 8); + hs >>= 1; + hs |= 0xFFFF; + if (hs > (1 << 24)) + hs >>= 1; + hs++; + return ((hs + (1 << 16)) + (UInt64)dictionary * 2) * 4 + (UInt64)dictionary * 3 / 2 + + (1 << 20) + (multiThread ? (6 << 20) : 0); +} + +UInt64 GetBenchMemoryUsage(UInt32 numThreads, UInt32 dictionary) +{ + const UInt32 kBufferSize = dictionary; + const UInt32 kCompressedBufferSize = (kBufferSize / 2); + UInt32 numSubThreads = (numThreads > 1) ? 2 : 1; + UInt32 numBigThreads = numThreads / numSubThreads; + return (kBufferSize + kCompressedBufferSize + + GetLZMAUsage((numThreads > 1), dictionary) + (2 << 20)) * numBigThreads; +} + +static bool CrcBig(const void *data, UInt32 size, UInt32 numCycles, UInt32 crcBase) +{ + for (UInt32 i = 0; i < numCycles; i++) + if (CrcCalc(data, size) != crcBase) + return false; + return true; +} + +#ifndef _7ZIP_ST +struct CCrcInfo +{ + NWindows::CThread Thread; + const Byte *Data; + UInt32 Size; + UInt32 NumCycles; + UInt32 Crc; + bool Res; + void Wait() + { + Thread.Wait(); + Thread.Close(); + } +}; + +static THREAD_FUNC_DECL CrcThreadFunction(void *param) +{ + CCrcInfo *p = (CCrcInfo *)param; + p->Res = CrcBig(p->Data, p->Size, p->NumCycles, p->Crc); + return 0; +} + +struct CCrcThreads +{ + UInt32 NumThreads; + CCrcInfo *Items; + CCrcThreads(): Items(0), NumThreads(0) {} + void WaitAll() + { + for (UInt32 i = 0; i < NumThreads; i++) + Items[i].Wait(); + NumThreads = 0; + } + ~CCrcThreads() + { + WaitAll(); + delete []Items; + } +}; +#endif + +static UInt32 CrcCalc1(const Byte *buf, UInt32 size) +{ + UInt32 crc = CRC_INIT_VAL;; + for (UInt32 i = 0; i < size; i++) + crc = CRC_UPDATE_BYTE(crc, buf[i]); + return CRC_GET_DIGEST(crc); +} + +static void RandGen(Byte *buf, UInt32 size, CBaseRandomGenerator &RG) +{ + for (UInt32 i = 0; i < size; i++) + buf[i] = (Byte)RG.GetRnd(); +} + +static UInt32 RandGenCrc(Byte *buf, UInt32 size, CBaseRandomGenerator &RG) +{ + RandGen(buf, size, RG); + return CrcCalc1(buf, size); +} + +bool CrcInternalTest() +{ + CBenchBuffer buffer; + const UInt32 kBufferSize0 = (1 << 8); + const UInt32 kBufferSize1 = (1 << 10); + const UInt32 kCheckSize = (1 << 5); + if (!buffer.Alloc(kBufferSize0 + kBufferSize1)) + return false; + Byte *buf = buffer.Buffer; + UInt32 i; + for (i = 0; i < kBufferSize0; i++) + buf[i] = (Byte)i; + UInt32 crc1 = CrcCalc1(buf, kBufferSize0); + if (crc1 != 0x29058C73) + return false; + CBaseRandomGenerator RG; + RandGen(buf + kBufferSize0, kBufferSize1, RG); + for (i = 0; i < kBufferSize0 + kBufferSize1 - kCheckSize; i++) + for (UInt32 j = 0; j < kCheckSize; j++) + if (CrcCalc1(buf + i, j) != CrcCalc(buf + i, j)) + return false; + return true; +} + +HRESULT CrcBench(UInt32 numThreads, UInt32 bufferSize, UInt64 &speed) +{ + if (numThreads == 0) + numThreads = 1; + + CBenchBuffer buffer; + size_t totalSize = (size_t)bufferSize * numThreads; + if (totalSize / numThreads != bufferSize) + return E_OUTOFMEMORY; + if (!buffer.Alloc(totalSize)) + return E_OUTOFMEMORY; + + Byte *buf = buffer.Buffer; + CBaseRandomGenerator RG; + UInt32 numCycles = (kCrcBlockSize) / ((bufferSize >> 2) + 1) + 1; + + UInt64 timeVal; + #ifndef _7ZIP_ST + CCrcThreads threads; + if (numThreads > 1) + { + threads.Items = new CCrcInfo[numThreads]; + UInt32 i; + for (i = 0; i < numThreads; i++) + { + CCrcInfo &info = threads.Items[i]; + Byte *data = buf + (size_t)bufferSize * i; + info.Data = data; + info.NumCycles = numCycles; + info.Size = bufferSize; + info.Crc = RandGenCrc(data, bufferSize, RG); + } + timeVal = GetTimeCount(); + for (i = 0; i < numThreads; i++) + { + CCrcInfo &info = threads.Items[i]; + RINOK(info.Thread.Create(CrcThreadFunction, &info)); + threads.NumThreads++; + } + threads.WaitAll(); + for (i = 0; i < numThreads; i++) + if (!threads.Items[i].Res) + return S_FALSE; + } + else + #endif + { + UInt32 crc = RandGenCrc(buf, bufferSize, RG); + timeVal = GetTimeCount(); + if (!CrcBig(buf, bufferSize, numCycles, crc)) + return S_FALSE; + } + timeVal = GetTimeCount() - timeVal; + if (timeVal == 0) + timeVal = 1; + + UInt64 size = (UInt64)numCycles * totalSize; + speed = MyMultDiv64(size, timeVal, GetFreq()); + return S_OK; +} diff --git a/CPP/7zip/UI/Common/Bench.h b/CPP/7zip/UI/Common/Bench.h new file mode 100644 index 0000000..a8d02a1 --- /dev/null +++ b/CPP/7zip/UI/Common/Bench.h @@ -0,0 +1,42 @@ +// Bench.h + +#ifndef __7ZIP_BENCH_H +#define __7ZIP_BENCH_H + +#include "../../Common/CreateCoder.h" + +struct CBenchInfo +{ + UInt64 GlobalTime; + UInt64 GlobalFreq; + UInt64 UserTime; + UInt64 UserFreq; + UInt64 UnpackSize; + UInt64 PackSize; + UInt32 NumIterations; + CBenchInfo(): NumIterations(0) {} +}; + +struct IBenchCallback +{ + virtual HRESULT SetEncodeResult(const CBenchInfo &info, bool final) = 0; + virtual HRESULT SetDecodeResult(const CBenchInfo &info, bool final) = 0; +}; + +UInt64 GetUsage(const CBenchInfo &benchOnfo); +UInt64 GetRatingPerUsage(const CBenchInfo &info, UInt64 rating); +UInt64 GetCompressRating(UInt32 dictionarySize, UInt64 elapsedTime, UInt64 freq, UInt64 size); +UInt64 GetDecompressRating(UInt64 elapsedTime, UInt64 freq, UInt64 outSize, UInt64 inSize, UInt32 numIterations); + +HRESULT LzmaBench( + DECL_EXTERNAL_CODECS_LOC_VARS + UInt32 numThreads, UInt32 dictionarySize, IBenchCallback *callback); + +const int kBenchMinDicLogSize = 18; + +UInt64 GetBenchMemoryUsage(UInt32 numThreads, UInt32 dictionary); + +bool CrcInternalTest(); +HRESULT CrcBench(UInt32 numThreads, UInt32 bufferSize, UInt64 &speed); + +#endif diff --git a/CPP/7zip/UI/Common/CompressCall.cpp b/CPP/7zip/UI/Common/CompressCall.cpp new file mode 100644 index 0000000..fdc6c66 --- /dev/null +++ b/CPP/7zip/UI/Common/CompressCall.cpp @@ -0,0 +1,470 @@ +// CompressCall.cpp + +#include "StdAfx.h" + +// For compilers that support precompilation, includes "wx/wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ +#pragma hdrstop +#endif + +#ifndef WX_PRECOMP +#include "wx/wx.h" +#endif + +#undef _WIN32 + +#include "CompressCall.h" + +// FIXME #include "Common/Random.h" +#include "Common/IntToString.h" +#include "Common/MyCom.h" +#include "Common/StringConvert.h" + +#include "Windows/Synchronization.h" +// FIXME #include "Windows/FileMapping.h" +#include "Windows/FileDir.h" + +#include "../FileManager/ProgramLocation.h" +#include "../FileManager/RegistryUtils.h" + +#define NEED_NAME_WINDOWS_TO_UNIX +#include "myPrivate.h" + +#ifndef _UNICODE +extern bool g_IsNT; +#endif // _UNICODE + +using namespace NWindows; + +static LPCWSTR kShowDialogSwitch = L" -ad"; +static LPCWSTR kEmailSwitch = L" -seml."; +static LPCWSTR kMapSwitch = L" -i#"; +static LPCWSTR kArchiveNoNameSwitch = L" -an"; +static LPCWSTR kArchiveTypeSwitch = L" -t"; +static LPCWSTR kArchiveMapSwitch = L" -ai#"; +static LPCWSTR kStopSwitchParsing = L" --"; +static LPCWSTR kLargePagesDisable = L" -slp-"; + +static void AddLagePagesSwitch(UString ¶ms) +{ +#ifdef _WIN32 + if (!ReadLockMemoryEnable()) + params += kLargePagesDisable; +#endif +} + +HRESULT MyCreateProcess(const UString ¶ms, + LPCWSTR curDir, bool waitFinish, + NWindows::NSynchronization::CBaseEvent *event) +{ + printf("MyCreateProcess: waitFinish=%d event=%p\n",(unsigned)waitFinish,event); + printf("\tparams : %ls\n",(const wchar_t*)params); + printf("\tcurDir : %ls\n",(const wchar_t*)curDir); + + wxString cmd(params); + wxString memoCurDir = wxGetCwd(); + + if (curDir) { // FIXME + wxSetWorkingDirectory(wxString(curDir)); + + + // under MacOSX, a bundle does not keep the current directory + // between 7zFM and 7zG ... + // So, try to use the environment variable P7ZIP_CURRENT_DIR + + char p7zip_current_dir[MAX_PATH]; + + AString aCurPath = GetAnsiString(curDir); + + const char *dir2 = nameWindowToUnix((const char *)aCurPath); + + snprintf(p7zip_current_dir,sizeof(p7zip_current_dir),"P7ZIP_CURRENT_DIR=%s/",dir2); + + p7zip_current_dir[sizeof(p7zip_current_dir)-1] = 0; + + putenv(p7zip_current_dir); + + printf("putenv(%s)\n",p7zip_current_dir); + + } + + + printf("MyCreateProcess: cmd='%ls'\n",(const wchar_t *)cmd); + long pid = 0; + if (waitFinish) pid = wxExecute(cmd, wxEXEC_SYNC); // FIXME process never ends and stays zombie ... + else pid = wxExecute(cmd, wxEXEC_ASYNC); + + if (curDir) wxSetWorkingDirectory(memoCurDir); + + + // FIXME if (pid == 0) return E_FAIL; + + return S_OK; +#ifdef _WIN32 // FIXME + const UString params2 = params; + BOOL result; + { + STARTUPINFOW startupInfo; + startupInfo.cb = sizeof(startupInfo); + startupInfo.lpReserved = 0; + startupInfo.lpDesktop = 0; + startupInfo.lpTitle = 0; + startupInfo.dwFlags = 0; + startupInfo.cbReserved2 = 0; + startupInfo.lpReserved2 = 0; + + result = ::CreateProcessW(NULL, (LPWSTR)(LPCWSTR)params, + NULL, NULL, FALSE, 0, NULL, + curDir, + &startupInfo, &processInformation); + } + if (result == 0) + return ::GetLastError(); + else + { + ::CloseHandle(processInformation.hThread); + if (waitFinish) + WaitForSingleObject(processInformation.hProcess, INFINITE); + else if (event != NULL) + { + HANDLE handles[] = {processInformation.hProcess, *event }; + ::WaitForMultipleObjects(sizeof(handles) / sizeof(handles[0]), + handles, FALSE, INFINITE); + } + ::CloseHandle(processInformation.hProcess); + } + return S_OK; +#endif +} + +UString GetQuotedString(const UString &s) +{ + return UString(L"\"") + s + UString(L"\""); +} + +static UString Get7zGuiPath() +{ + UString path; + UString folder; + if (GetProgramFolderPath(folder)) + path += folder; +#ifdef _WIN32 + path += L"7zG.exe"; +#else + path += L"7zG"; +#endif + return GetQuotedString(path); +} + +#ifdef _WIN32 +static HRESULT CreateTempEvent(const wchar_t *name, + NSynchronization::CManualResetEvent &event, UString &eventName) +{ + CRandom random; + random.Init(GetTickCount()); + for (;;) + { + int number = random.Generate(); + wchar_t temp[32]; + ConvertUInt64ToString((UInt32)number, temp); + eventName = name; + eventName += temp; + RINOK(event.CreateWithName(false, GetSystemString(eventName))); + if (::GetLastError() != ERROR_ALREADY_EXISTS) + return S_OK; + event.Close(); + } +} + +static HRESULT CreateMap(const UStringVector &names, + const UString &id, + CFileMapping &fileMapping, NSynchronization::CManualResetEvent &event, + UString ¶ms) +{ + UInt32 extraSize = 2; + UInt32 dataSize = 0; + for (int i = 0; i < names.Size(); i++) + dataSize += (names[i].Length() + 1) * sizeof(wchar_t); + UInt32 totalSize = extraSize + dataSize; + + UString mappingName; + + CRandom random; + random.Init(GetTickCount()); + for (;;) + { + int number = random.Generate(); + wchar_t temp[32]; + ConvertUInt64ToString(UInt32(number), temp); + mappingName = id; + mappingName += L"Mapping"; + mappingName += temp; + if (!fileMapping.Create(INVALID_HANDLE_VALUE, NULL, + PAGE_READWRITE, totalSize, GetSystemString(mappingName))) + return E_FAIL; + if (::GetLastError() != ERROR_ALREADY_EXISTS) + break; + fileMapping.Close(); + } + + UString eventName; + RINOK(CreateTempEvent(id + L"MappingEndEvent", event, eventName)); + + params += mappingName; + params += L":"; + wchar_t string[10]; + ConvertUInt64ToString(totalSize, string); + params += string; + + params += L":"; + params += eventName; + + LPVOID data = fileMapping.MapViewOfFile(FILE_MAP_WRITE, 0, totalSize); + if (data == NULL) + return E_FAIL; + { + wchar_t *curData = (wchar_t *)data; + *curData = 0; + curData++; + for (int i = 0; i < names.Size(); i++) + { + const UString &s = names[i]; + memcpy(curData, (const wchar_t *)s, s.Length() * sizeof(wchar_t)); + curData += s.Length(); + *curData++ = L'\0'; + } + } + return S_OK; +} +#endif + +HRESULT CompressFiles( + const UString &curDir, + const UString &archiveName, + const UString &archiveType, + const UStringVector &names, + // const UString &outFolder, + bool email, + bool showDialog, + bool waitFinish) +{ + /* + UString curDir; + if (names.Size() > 0) + { + NFile::NDirectory::GetOnlyDirPrefix(names[0], curDir); + } + */ + UString params; + params = Get7zGuiPath(); + params += L" a"; +#ifdef _WIN32 + params += kMapSwitch; + // params += _fileNames[0]; + + UInt32 extraSize = 2; + UInt32 dataSize = 0; + for (int i = 0; i < names.Size(); i++) + dataSize += (names[i].Length() + 1) * sizeof(wchar_t); + UInt32 totalSize = extraSize + dataSize; + + UString mappingName; + + CFileMapping fileMapping; + CRandom random; + random.Init(GetTickCount()); + for (;;) + { + int number = random.Generate(); + wchar_t temp[32]; + ConvertUInt64ToString(UInt32(number), temp); + mappingName = L"7zCompressMapping"; + mappingName += temp; + if (!fileMapping.Create(INVALID_HANDLE_VALUE, NULL, + PAGE_READWRITE, totalSize, GetSystemString(mappingName))) + { + // MyMessageBox(IDS_ERROR, 0x02000605); + return E_FAIL; + } + if (::GetLastError() != ERROR_ALREADY_EXISTS) + break; + fileMapping.Close(); + } + + NSynchronization::CManualResetEvent event; + UString eventName; + RINOK(CreateTempEvent(L"7zCompressMappingEndEvent", event, eventName)); + + params += mappingName; + params += L":"; + wchar_t string[10]; + ConvertUInt64ToString(totalSize, string); + params += string; + + params += L":"; + params += eventName; +#else + char tempFile[256]; + static int count = 1000; + + sprintf(tempFile,"/tmp/7zCompress_%d_%d.tmp",(int)getpid(),count++); + + FILE * file = fopen(tempFile,"w"); + if (file) + { + for (int i = 0; i < names.Size(); i++) { + fprintf(file,"%ls\n",(const wchar_t *)names[i]); + printf(" TMP_%d : '%ls'\n",i,(const wchar_t *)names[i]); + } + + fclose(file); + } + params += L" -i@"; + params += GetUnicodeString(tempFile); +#endif + + if (!archiveType.IsEmpty()) + { + params += kArchiveTypeSwitch; + params += archiveType; + } + + if (email) + params += kEmailSwitch; + + if (showDialog) + params += kShowDialogSwitch; + + AddLagePagesSwitch(params); + + params += kStopSwitchParsing; + params += L" "; + + params += GetQuotedString(archiveName); + +#ifdef _WIN32 + LPVOID data = fileMapping.MapViewOfFile(FILE_MAP_WRITE, 0, totalSize); + if (data == NULL) + { + // MyMessageBox(IDS_ERROR, 0x02000605); + return E_FAIL; + } + try + { + wchar_t *curData = (wchar_t *)data; + *curData = 0; + curData++; + for (int i = 0; i < names.Size(); i++) + { + const UString &unicodeString = names[i]; + memcpy(curData, (const wchar_t *)unicodeString , + unicodeString .Length() * sizeof(wchar_t)); + curData += unicodeString.Length(); + *curData++ = L'\0'; + } + // MessageBox(0, params, 0, 0); + RINOK(MyCreateProcess(params, + (curDir.IsEmpty()? 0: (LPCWSTR)curDir), + waitFinish, &event)); + } + catch(...) + { + UnmapViewOfFile(data); + throw; + } + UnmapViewOfFile(data); + + + /* + CThreadCompressMain *compressor = new CThreadCompressMain();; + compressor->FileNames = _fileNames; + CThread thread; + if (!thread.Create(CThreadCompressMain::MyThreadFunction, compressor)) + throw 271824; + */ +#else + printf("CompressFiles : -%ls-\n",(const wchar_t *)params); + HRESULT res = MyCreateProcess(params, + (curDir.IsEmpty()? 0: (LPCWSTR)curDir), + true, /* &event FIXME */ 0); + printf("CompressFiles : END\n"); + + remove(tempFile); +#endif + return S_OK; +} + +static HRESULT ExtractGroupCommand(const UStringVector &archivePaths, + const UString ¶ms) +{ + UString params2 = params; + AddLagePagesSwitch(params2); + params2 += kArchiveNoNameSwitch; +#ifdef _WIN32 + params2 += kArchiveMapSwitch; + CFileMapping fileMapping; + NSynchronization::CManualResetEvent event; + RINOK(CreateMap(archivePaths, L"7zExtract", fileMapping, event, params2)); + return MyCreateProcess(params2, 0, false, &event); +#else + char tempFile[256]; + static int count = 1000; + + sprintf(tempFile,"/tmp/7zExtract_%d_%d.tmp",(int)getpid(),count++); + + FILE * file = fopen(tempFile,"w"); + if (file) + { + for (int i = 0; i < archivePaths.Size(); i++) { + fprintf(file,"%ls\n",(const wchar_t *)archivePaths[i]); + printf(" TMP_%d : '%ls'\n",i,(const wchar_t *)archivePaths[i]); + } + + fclose(file); + } + params2 += L" -ai@"; + params2 += GetUnicodeString(tempFile); + printf("ExtractGroupCommand : -%ls-\n",(const wchar_t *)params2); + HRESULT res = MyCreateProcess(params2, 0, true, /* &event FIXME */ 0); + printf("ExtractGroupCommand : END\n"); + + remove(tempFile); + + return res; +#endif +} + +HRESULT ExtractArchives(const UStringVector &archivePaths, + const UString &outFolder, bool showDialog) +{ + UString params; + params = Get7zGuiPath(); + params += L" x"; + if (!outFolder.IsEmpty()) + { + params += L" \"-o"; + params += outFolder; + params += L"\""; + } + if (showDialog) + params += kShowDialogSwitch; + return ExtractGroupCommand(archivePaths, params); +} + +HRESULT TestArchives(const UStringVector &archivePaths) +{ + UString params; + params = Get7zGuiPath(); + params += L" t"; + return ExtractGroupCommand(archivePaths, params); +} + +HRESULT Benchmark() +{ + UString params; + params = Get7zGuiPath(); + params += L" b"; + return MyCreateProcess(params, 0, false, NULL); +} diff --git a/CPP/7zip/UI/Common/CompressCall.h b/CPP/7zip/UI/Common/CompressCall.h new file mode 100644 index 0000000..fc18df5 --- /dev/null +++ b/CPP/7zip/UI/Common/CompressCall.h @@ -0,0 +1,24 @@ +// CompressCall.h + +#ifndef __COMPRESS_CALL_H +#define __COMPRESS_CALL_H + +#include "Common/MyString.h" + +UString GetQuotedString(const UString &s); + +extern HWND g_HWND; +UString HResultToMessage(HRESULT errorCode); + +HRESULT CompressFiles( + const UString &arcPathPrefix, + const UString &arcName, + const UString &arcType, + const UStringVector &names, + bool email, bool showDialog, bool waitFinish); + +HRESULT ExtractArchives(const UStringVector &arcPaths, const UString &outFolder, bool showDialog); +HRESULT TestArchives(const UStringVector &arcPaths); +HRESULT Benchmark(); + +#endif diff --git a/CPP/7zip/UI/Common/DefaultName.cpp b/CPP/7zip/UI/Common/DefaultName.cpp new file mode 100644 index 0000000..4335e27 --- /dev/null +++ b/CPP/7zip/UI/Common/DefaultName.cpp @@ -0,0 +1,35 @@ +// DefaultName.cpp + +#include "StdAfx.h" + +#include "DefaultName.h" + +static UString GetDefaultName3(const UString &fileName, + const UString &extension, const UString &addSubExtension) +{ + int extLength = extension.Length(); + int fileNameLength = fileName.Length(); + if (fileNameLength > extLength + 1) + { + int dotPos = fileNameLength - (extLength + 1); + if (fileName[dotPos] == '.') + if (extension.CompareNoCase(fileName.Mid(dotPos + 1)) == 0) + return fileName.Left(dotPos) + addSubExtension; + } + int dotPos = fileName.ReverseFind(L'.'); + if (dotPos > 0) + return fileName.Left(dotPos) + addSubExtension; + + if (addSubExtension.IsEmpty()) + return fileName + L"~"; + else + return fileName + addSubExtension; +} + +UString GetDefaultName2(const UString &fileName, + const UString &extension, const UString &addSubExtension) +{ + UString name = GetDefaultName3(fileName, extension, addSubExtension); + name.TrimRight(); + return name; +} diff --git a/CPP/7zip/UI/Common/DefaultName.h b/CPP/7zip/UI/Common/DefaultName.h new file mode 100644 index 0000000..9764ff8 --- /dev/null +++ b/CPP/7zip/UI/Common/DefaultName.h @@ -0,0 +1,11 @@ +// DefaultName.h + +#ifndef __DEFAULTNAME_H +#define __DEFAULTNAME_H + +#include "Common/MyString.h" + +UString GetDefaultName2(const UString &fileName, + const UString &extension, const UString &addSubExtension); + +#endif diff --git a/CPP/7zip/UI/Common/DirItem.h b/CPP/7zip/UI/Common/DirItem.h new file mode 100644 index 0000000..29cc60d --- /dev/null +++ b/CPP/7zip/UI/Common/DirItem.h @@ -0,0 +1,69 @@ +// DirItem.h + +#ifndef __DIR_ITEM_H +#define __DIR_ITEM_H + +#include "Common/MyString.h" +#include "Common/Types.h" +#include "../../Archive/IArchive.h" + +struct CDirItem +{ + UInt64 Size; + FILETIME CTime; + FILETIME ATime; + FILETIME MTime; + UString Name; + UInt32 Attrib; + int PhyParent; + int LogParent; + + CDirItem(): PhyParent(-1), LogParent(-1) {} + bool IsDir() const { return (Attrib & FILE_ATTRIBUTE_DIRECTORY) != 0 ; } +}; + +class CDirItems +{ + UStringVector Prefixes; + CIntVector PhyParents; + CIntVector LogParents; + + UString GetPrefixesPath(const CIntVector &parents, int index, const UString &name) const; +public: + CObjectVector Items; + + int GetNumFolders() const { return Prefixes.Size(); } + UString GetPhyPath(int index) const; + UString GetLogPath(int index) const; + + int AddPrefix(int phyParent, int logParent, const UString &prefix); + void DeleteLastPrefix(); + + void EnumerateDirectory(int phyParent, int logParent, const UString &phyPrefix, + UStringVector &errorPaths, CRecordVector &errorCodes); + + void EnumerateDirItems2( + const UString &phyPrefix, + const UString &logPrefix, + const UStringVector &filePaths, + UStringVector &errorPaths, CRecordVector &errorCodes); + + void ReserveDown(); +}; + +struct CArcItem +{ + UInt64 Size; + FILETIME MTime; + UString Name; + bool IsDir; + bool SizeDefined; + bool MTimeDefined; + bool Censored; + UInt32 IndexInServer; + int TimeType; + + CArcItem(): IsDir(false), SizeDefined(false), MTimeDefined(false), Censored(false), TimeType(-1) {} +}; + +#endif diff --git a/CPP/7zip/UI/Common/EnumDirItems.cpp b/CPP/7zip/UI/Common/EnumDirItems.cpp new file mode 100644 index 0000000..ba03ea3 --- /dev/null +++ b/CPP/7zip/UI/Common/EnumDirItems.cpp @@ -0,0 +1,361 @@ +// EnumDirItems.cpp + +#include "StdAfx.h" + +#include "EnumDirItems.h" + +using namespace NWindows; +using namespace NFile; +using namespace NName; + +void AddDirFileInfo(int phyParent, int logParent, + const NFind::CFileInfoW &fi, CObjectVector &dirItems) +{ + CDirItem di; + di.Size = fi.Size; + di.CTime = fi.CTime; + di.ATime = fi.ATime; + di.MTime = fi.MTime; + di.Attrib = fi.Attrib; + di.PhyParent = phyParent; + di.LogParent = logParent; + di.Name = fi.Name; + dirItems.Add(di); +} + +UString CDirItems::GetPrefixesPath(const CIntVector &parents, int index, const UString &name) const +{ + UString path; + int len = name.Length(); + int i; + for (i = index; i >= 0; i = parents[i]) + len += Prefixes[i].Length(); + int totalLen = len; + wchar_t *p = path.GetBuffer(len); + p[len] = 0; + len -= name.Length(); + memcpy(p + len, (const wchar_t *)name, name.Length() * sizeof(wchar_t)); + for (i = index; i >= 0; i = parents[i]) + { + const UString &s = Prefixes[i]; + len -= s.Length(); + memcpy(p + len, (const wchar_t *)s, s.Length() * sizeof(wchar_t)); + } + path.ReleaseBuffer(totalLen); + return path; +} + +UString CDirItems::GetPhyPath(int index) const +{ + const CDirItem &di = Items[index]; + return GetPrefixesPath(PhyParents, di.PhyParent, di.Name); +} + +UString CDirItems::GetLogPath(int index) const +{ + const CDirItem &di = Items[index]; + return GetPrefixesPath(LogParents, di.LogParent, di.Name); +} + +void CDirItems::ReserveDown() +{ + Prefixes.ReserveDown(); + PhyParents.ReserveDown(); + LogParents.ReserveDown(); + Items.ReserveDown(); +} + +int CDirItems::AddPrefix(int phyParent, int logParent, const UString &prefix) +{ + PhyParents.Add(phyParent); + LogParents.Add(logParent); + return Prefixes.Add(prefix); +} + +void CDirItems::DeleteLastPrefix() +{ + PhyParents.DeleteBack(); + LogParents.DeleteBack(); + Prefixes.DeleteBack(); +} + +void CDirItems::EnumerateDirectory(int phyParent, int logParent, const UString &phyPrefix, + UStringVector &errorPaths, CRecordVector &errorCodes) +{ + NFind::CEnumeratorW enumerator(phyPrefix + (wchar_t)kAnyStringWildcard); + for (;;) + { + NFind::CFileInfoW fi; + bool found; + if (!enumerator.Next(fi, found)) + { + errorCodes.Add(::GetLastError()); + errorPaths.Add(phyPrefix); + return; + } + if (!found) + break; + AddDirFileInfo(phyParent, logParent, fi, Items); + if (fi.IsDir()) + { + const UString name2 = fi.Name + (wchar_t)kDirDelimiter; + int parent = AddPrefix(phyParent, logParent, name2); + EnumerateDirectory(parent, parent, phyPrefix + name2, errorPaths, errorCodes); + } + } +} + +void CDirItems::EnumerateDirItems2(const UString &phyPrefix, const UString &logPrefix, + const UStringVector &filePaths, UStringVector &errorPaths, CRecordVector &errorCodes) +{ + int phyParent = phyPrefix.IsEmpty() ? -1 : AddPrefix(-1, -1, phyPrefix); + int logParent = logPrefix.IsEmpty() ? -1 : AddPrefix(-1, -1, logPrefix); + + for (int i = 0; i < filePaths.Size(); i++) + { + const UString &filePath = filePaths[i]; + NFind::CFileInfoW fi; + const UString phyPath = phyPrefix + filePath; + if (!fi.Find(phyPath)) + { + errorCodes.Add(::GetLastError()); + errorPaths.Add(phyPath); + continue; + } + int delimiter = filePath.ReverseFind((wchar_t)kDirDelimiter); + UString phyPrefixCur; + int phyParentCur = phyParent; + if (delimiter >= 0) + { + phyPrefixCur = filePath.Left(delimiter + 1); + phyParentCur = AddPrefix(phyParent, logParent, phyPrefixCur); + } + AddDirFileInfo(phyParentCur, logParent, fi, Items); + if (fi.IsDir()) + { + const UString name2 = fi.Name + (wchar_t)kDirDelimiter; + int parent = AddPrefix(phyParentCur, logParent, name2); + EnumerateDirectory(parent, parent, phyPrefix + phyPrefixCur + name2, errorPaths, errorCodes); + } + } + ReserveDown(); +} + +static HRESULT EnumerateDirItems(const NWildcard::CCensorNode &curNode, + int phyParent, int logParent, const UString &phyPrefix, + const UStringVector &addArchivePrefix, + CDirItems &dirItems, + bool enterToSubFolders, + IEnumDirItemCallback *callback, + UStringVector &errorPaths, + CRecordVector &errorCodes); + +static HRESULT EnumerateDirItems_Spec(const NWildcard::CCensorNode &curNode, + int phyParent, int logParent, const UString &curFolderName, + const UString &phyPrefix, + const UStringVector &addArchivePrefix, + CDirItems &dirItems, + bool enterToSubFolders, + IEnumDirItemCallback *callback, + UStringVector &errorPaths, + CRecordVector &errorCodes) + +{ + const UString name2 = curFolderName + (wchar_t)kDirDelimiter; + int parent = dirItems.AddPrefix(phyParent, logParent, name2); + int numItems = dirItems.Items.Size(); + HRESULT res = EnumerateDirItems(curNode, parent, parent, phyPrefix + name2, + addArchivePrefix, dirItems, enterToSubFolders, callback, errorPaths, errorCodes); + if (numItems == dirItems.Items.Size()) + dirItems.DeleteLastPrefix(); + return res; +} + + +static HRESULT EnumerateDirItems(const NWildcard::CCensorNode &curNode, + int phyParent, int logParent, const UString &phyPrefix, + const UStringVector &addArchivePrefix, // prefix from curNode + CDirItems &dirItems, + bool enterToSubFolders, + IEnumDirItemCallback *callback, + UStringVector &errorPaths, + CRecordVector &errorCodes) +{ + if (!enterToSubFolders) + if (curNode.NeedCheckSubDirs()) + enterToSubFolders = true; + if (callback) + RINOK(callback->ScanProgress(dirItems.GetNumFolders(), dirItems.Items.Size(), phyPrefix)); + + // try direct_names case at first + if (addArchivePrefix.IsEmpty() && !enterToSubFolders) + { + // check that all names are direct + int i; + for (i = 0; i < curNode.IncludeItems.Size(); i++) + { + const NWildcard::CItem &item = curNode.IncludeItems[i]; + if (item.Recursive || item.PathParts.Size() != 1) + break; + const UString &name = item.PathParts.Front(); + if (name.IsEmpty() || DoesNameContainWildCard(name)) + break; + } + if (i == curNode.IncludeItems.Size()) + { + // all names are direct (no wildcards) + // so we don't need file_system's dir enumerator + CRecordVector needEnterVector; + for (i = 0; i < curNode.IncludeItems.Size(); i++) + { + const NWildcard::CItem &item = curNode.IncludeItems[i]; + const UString &name = item.PathParts.Front(); + const UString fullPath = phyPrefix + name; + NFind::CFileInfoW fi; + if (!fi.Find(fullPath)) + { + errorCodes.Add(::GetLastError()); + errorPaths.Add(fullPath); + continue; + } + bool isDir = fi.IsDir(); + if (isDir && !item.ForDir || !isDir && !item.ForFile) + { + errorCodes.Add((DWORD)E_FAIL); + errorPaths.Add(fullPath); + continue; + } + { + UStringVector pathParts; + pathParts.Add(fi.Name); + if (curNode.CheckPathToRoot(false, pathParts, !isDir)) + continue; + } + AddDirFileInfo(phyParent, logParent, fi, dirItems.Items); + if (!isDir) + continue; + + UStringVector addArchivePrefixNew; + const NWildcard::CCensorNode *nextNode = 0; + int index = curNode.FindSubNode(name); + if (index >= 0) + { + for (int t = needEnterVector.Size(); t <= index; t++) + needEnterVector.Add(true); + needEnterVector[index] = false; + nextNode = &curNode.SubNodes[index]; + } + else + { + nextNode = &curNode; + addArchivePrefixNew.Add(name); // don't change it to fi.Name. It's for shortnames support + } + + RINOK(EnumerateDirItems_Spec(*nextNode, phyParent, logParent, fi.Name, phyPrefix, + addArchivePrefixNew, dirItems, true, callback, errorPaths, errorCodes)); + } + for (i = 0; i < curNode.SubNodes.Size(); i++) + { + if (i < needEnterVector.Size()) + if (!needEnterVector[i]) + continue; + const NWildcard::CCensorNode &nextNode = curNode.SubNodes[i]; + const UString fullPath = phyPrefix + nextNode.Name; + NFind::CFileInfoW fi; + if (!fi.Find(fullPath)) + { + if (!nextNode.AreThereIncludeItems()) + continue; + errorCodes.Add(::GetLastError()); + errorPaths.Add(fullPath); + continue; + } + if (!fi.IsDir()) + { + errorCodes.Add((DWORD)E_FAIL); + errorPaths.Add(fullPath); + continue; + } + + RINOK(EnumerateDirItems_Spec(nextNode, phyParent, logParent, fi.Name, phyPrefix, + UStringVector(), dirItems, false, callback, errorPaths, errorCodes)); + } + return S_OK; + } + } + + + NFind::CEnumeratorW enumerator(phyPrefix + wchar_t(kAnyStringWildcard)); + for (int ttt = 0; ; ttt++) + { + NFind::CFileInfoW fi; + bool found; + if (!enumerator.Next(fi, found)) + { + errorCodes.Add(::GetLastError()); + errorPaths.Add(phyPrefix); + break; + } + if (!found) + break; + + if (callback && (ttt & 0xFF) == 0xFF) + RINOK(callback->ScanProgress(dirItems.GetNumFolders(), dirItems.Items.Size(), phyPrefix)); + const UString &name = fi.Name; + bool enterToSubFolders2 = enterToSubFolders; + UStringVector addArchivePrefixNew = addArchivePrefix; + addArchivePrefixNew.Add(name); + { + UStringVector addArchivePrefixNewTemp(addArchivePrefixNew); + if (curNode.CheckPathToRoot(false, addArchivePrefixNewTemp, !fi.IsDir())) + continue; + } + if (curNode.CheckPathToRoot(true, addArchivePrefixNew, !fi.IsDir())) + { + AddDirFileInfo(phyParent, logParent, fi, dirItems.Items); + if (fi.IsDir()) + enterToSubFolders2 = true; + } + if (!fi.IsDir()) + continue; + + const NWildcard::CCensorNode *nextNode = 0; + if (addArchivePrefix.IsEmpty()) + { + int index = curNode.FindSubNode(name); + if (index >= 0) + nextNode = &curNode.SubNodes[index]; + } + if (!enterToSubFolders2 && nextNode == 0) + continue; + + addArchivePrefixNew = addArchivePrefix; + if (nextNode == 0) + { + nextNode = &curNode; + addArchivePrefixNew.Add(name); + } + + RINOK(EnumerateDirItems_Spec(*nextNode, phyParent, logParent, name, phyPrefix, + addArchivePrefixNew, dirItems, enterToSubFolders2, callback, errorPaths, errorCodes)); + } + return S_OK; +} + +HRESULT EnumerateItems( + const NWildcard::CCensor &censor, + CDirItems &dirItems, + IEnumDirItemCallback *callback, + UStringVector &errorPaths, + CRecordVector &errorCodes) +{ + for (int i = 0; i < censor.Pairs.Size(); i++) + { + const NWildcard::CPair &pair = censor.Pairs[i]; + int phyParent = pair.Prefix.IsEmpty() ? -1 : dirItems.AddPrefix(-1, -1, pair.Prefix); + RINOK(EnumerateDirItems(pair.Head, phyParent, -1, pair.Prefix, UStringVector(), dirItems, false, + callback, errorPaths, errorCodes)); + } + dirItems.ReserveDown(); + return S_OK; +} diff --git a/CPP/7zip/UI/Common/EnumDirItems.h b/CPP/7zip/UI/Common/EnumDirItems.h new file mode 100644 index 0000000..d0ce950 --- /dev/null +++ b/CPP/7zip/UI/Common/EnumDirItems.h @@ -0,0 +1,25 @@ +// EnumDirItems.h + +#ifndef __ENUM_DIR_ITEMS_H +#define __ENUM_DIR_ITEMS_H + +#include "Common/Wildcard.h" +#include "Windows/FileFind.h" +#include "DirItem.h" + +void AddDirFileInfo(int phyParent, int logParent, + const NWindows::NFile::NFind::CFileInfoW &fi, CObjectVector &dirItems); + +struct IEnumDirItemCallback +{ + virtual HRESULT ScanProgress(UInt64 numFolders, UInt64 numFiles, const wchar_t *path) = 0; +}; + +HRESULT EnumerateItems( + const NWildcard::CCensor &censor, + CDirItems &dirItems, + IEnumDirItemCallback *callback, + UStringVector &errorPaths, + CRecordVector &errorCodes); + +#endif diff --git a/CPP/7zip/UI/Common/ExitCode.h b/CPP/7zip/UI/Common/ExitCode.h new file mode 100644 index 0000000..b6d7d4d --- /dev/null +++ b/CPP/7zip/UI/Common/ExitCode.h @@ -0,0 +1,27 @@ +// ExitCode.h + +#ifndef __EXIT_CODE_H +#define __EXIT_CODE_H + +namespace NExitCode { + +enum EEnum { + + kSuccess = 0, // Successful operation + kWarning = 1, // Non fatal error(s) occurred + kFatalError = 2, // A fatal error occurred + // kCRCError = 3, // A CRC error occurred when unpacking + // kLockedArchive = 4, // Attempt to modify an archive previously locked + // kWriteError = 5, // Write to disk error + // kOpenError = 6, // Open file error + kUserError = 7, // Command line option error + kMemoryError = 8, // Not enough memory for operation + // kCreateFileError = 9, // Create file error + + kUserBreak = 255 // User stopped the process + +}; + +} + +#endif diff --git a/CPP/7zip/UI/Common/Extract.cpp b/CPP/7zip/UI/Common/Extract.cpp new file mode 100644 index 0000000..ca2c8c7 --- /dev/null +++ b/CPP/7zip/UI/Common/Extract.cpp @@ -0,0 +1,263 @@ +// Extract.cpp + +#include "StdAfx.h" + +#include + +#include "Windows/FileDir.h" +#include "Windows/PropVariant.h" +#include "Windows/PropVariantConversions.h" + +#include "../Common/ExtractingFilePath.h" + +#include "Extract.h" +#include "SetProperties.h" + +using namespace NWindows; + +static HRESULT DecompressArchive( + const CArc &arc, + UInt64 packSize, + const NWildcard::CCensorNode &wildcardCensor, + const CExtractOptions &options, + IExtractCallbackUI *callback, + CArchiveExtractCallback *extractCallbackSpec, + UString &errorMessage, + UInt64 &stdInProcessed) +{ + stdInProcessed = 0; + IInArchive *archive = arc.Archive; + CRecordVector realIndices; + if (!options.StdInMode) + { + UInt32 numItems; + RINOK(archive->GetNumberOfItems(&numItems)); + + for (UInt32 i = 0; i < numItems; i++) + { + UString filePath; + RINOK(arc.GetItemPath(i, filePath)); + bool isFolder; + RINOK(IsArchiveItemFolder(archive, i, isFolder)); + if (!wildcardCensor.CheckPath(filePath, !isFolder)) + continue; + realIndices.Add(i); + } + if (realIndices.Size() == 0) + { + callback->ThereAreNoFiles(); + return S_OK; + } + } + + UStringVector removePathParts; + + UString outDir = options.OutputDir; + outDir.Replace(L"*", GetCorrectFsPath(arc.DefaultName)); + #ifdef _WIN32 + // GetCorrectFullFsPath doesn't like "..". + // outDir.TrimRight(); + // outDir = GetCorrectFullFsPath(outDir); + #endif + + if (!outDir.IsEmpty()) + if (!NFile::NDirectory::CreateComplexDirectory(outDir)) + { + HRESULT res = ::GetLastError(); + if (res == S_OK) + res = E_FAIL; + errorMessage = ((UString)L"Can not create output directory ") + outDir; + return res; + } + + extractCallbackSpec->Init( + options.StdInMode ? &wildcardCensor : NULL, + &arc, + callback, + options.StdOutMode, options.TestMode, options.CalcCrc, + outDir, + removePathParts, + packSize); + + #if !defined(_7ZIP_ST) && !defined(_SFX) + RINOK(SetProperties(archive, options.Properties)); + #endif + + HRESULT result; + Int32 testMode = (options.TestMode && !options.CalcCrc) ? 1: 0; + if (options.StdInMode) + { + result = archive->Extract(NULL, (UInt32)(Int32)-1, testMode, extractCallbackSpec); + NCOM::CPropVariant prop; + if (archive->GetArchiveProperty(kpidPhySize, &prop) == S_OK) + if (prop.vt == VT_UI8 || prop.vt == VT_UI4) + stdInProcessed = ConvertPropVariantToUInt64(prop); + } + else + result = archive->Extract(&realIndices.Front(), realIndices.Size(), testMode, extractCallbackSpec); + + return callback->ExtractResult(result); +} + +HRESULT DecompressArchives( + CCodecs *codecs, const CIntVector &formatIndices, + UStringVector &arcPaths, UStringVector &arcPathsFull, + const NWildcard::CCensorNode &wildcardCensor, + const CExtractOptions &options, + IOpenCallbackUI *openCallback, + IExtractCallbackUI *extractCallback, + UString &errorMessage, + CDecompressStat &stat) +{ + stat.Clear(); + int i; + UInt64 totalPackSize = 0; + CRecordVector archiveSizes; + + int numArcs = options.StdInMode ? 1 : arcPaths.Size(); + + for (i = 0; i < numArcs; i++) + { + NFile::NFind::CFileInfoW fi; + fi.Size = 0; + if (!options.StdInMode) + { + const UString &arcPath = arcPaths[i]; + if (!fi.Find(arcPath)) + throw "there is no such archive"; + if (fi.IsDir()) + throw "can't decompress folder"; + } + archiveSizes.Add(fi.Size); + totalPackSize += fi.Size; + } + CArchiveExtractCallback *extractCallbackSpec = new CArchiveExtractCallback; + CMyComPtr ec(extractCallbackSpec); + bool multi = (numArcs > 1); + extractCallbackSpec->InitForMulti(multi, options.PathMode, options.OverwriteMode); + if (multi) + { + RINOK(extractCallback->SetTotal(totalPackSize)); + } + for (i = 0; i < numArcs; i++) + { + const UString &arcPath = arcPaths[i]; + NFile::NFind::CFileInfoW fi; + if (options.StdInMode) + { + fi.Size = 0; + fi.Attrib = 0; + } + else + { + if (!fi.Find(arcPath) || fi.IsDir()) + throw "there is no such archive"; + } + + #ifndef _NO_CRYPTO + openCallback->Open_ClearPasswordWasAskedFlag(); + #endif + + RINOK(extractCallback->BeforeOpen(arcPath)); + CArchiveLink archiveLink; + + CIntVector formatIndices2 = formatIndices; + #ifndef _SFX + if (formatIndices.IsEmpty()) + { + int pos = arcPath.ReverseFind(L'.'); + if (pos >= 0) + { + UString s = arcPath.Mid(pos + 1); + int index = codecs->FindFormatForExtension(s); + if (index >= 0 && s == L"001") + { + s = arcPath.Left(pos); + pos = s.ReverseFind(L'.'); + if (pos >= 0) + { + int index2 = codecs->FindFormatForExtension(s.Mid(pos + 1)); + if (index2 >= 0 && s.CompareNoCase(L"rar") != 0) + { + formatIndices2.Add(index2); + formatIndices2.Add(index); + } + } + } + } + } + #endif + HRESULT result = archiveLink.Open2(codecs, formatIndices2, options.StdInMode, NULL, arcPath, openCallback); + if (result == E_ABORT) + return result; + + bool crypted = false; + #ifndef _NO_CRYPTO + crypted = openCallback->Open_WasPasswordAsked(); + #endif + + RINOK(extractCallback->OpenResult(arcPath, result, crypted)); + if (result != S_OK) + continue; + + if (!options.StdInMode) + for (int v = 0; v < archiveLink.VolumePaths.Size(); v++) + { + int index = arcPathsFull.FindInSorted(archiveLink.VolumePaths[v]); + if (index >= 0 && index > i) + { + arcPaths.Delete(index); + arcPathsFull.Delete(index); + totalPackSize -= archiveSizes[index]; + archiveSizes.Delete(index); + numArcs = arcPaths.Size(); + } + } + if (archiveLink.VolumePaths.Size() != 0) + { + totalPackSize += archiveLink.VolumesSize; + RINOK(extractCallback->SetTotal(totalPackSize)); + } + + #ifndef _NO_CRYPTO + UString password; + RINOK(openCallback->Open_GetPasswordIfAny(password)); + if (!password.IsEmpty()) + { + RINOK(extractCallback->SetPassword(password)); + } + #endif + + for (int v = 0; v < archiveLink.Arcs.Size(); v++) + { + const UString &s = archiveLink.Arcs[v].ErrorMessage; + if (!s.IsEmpty()) + { + RINOK(extractCallback->MessageError(s)); + } + } + + CArc &arc = archiveLink.Arcs.Back(); + arc.MTimeDefined = (!options.StdInMode && !fi.IsDevice); + arc.MTime = fi.MTime; + + UInt64 packProcessed; + RINOK(DecompressArchive(arc, + fi.Size + archiveLink.VolumesSize, + wildcardCensor, options, extractCallback, extractCallbackSpec, errorMessage, packProcessed)); + if (!options.StdInMode) + packProcessed = fi.Size + archiveLink.VolumesSize; + extractCallbackSpec->LocalProgressSpec->InSize += packProcessed; + extractCallbackSpec->LocalProgressSpec->OutSize = extractCallbackSpec->UnpackSize; + if (!errorMessage.IsEmpty()) + return E_FAIL; + } + stat.NumFolders = extractCallbackSpec->NumFolders; + stat.NumFiles = extractCallbackSpec->NumFiles; + stat.UnpackSize = extractCallbackSpec->UnpackSize; + stat.CrcSum = extractCallbackSpec->CrcSum; + + stat.NumArchives = arcPaths.Size(); + stat.PackSize = extractCallbackSpec->LocalProgressSpec->InSize; + return S_OK; +} diff --git a/CPP/7zip/UI/Common/Extract.h b/CPP/7zip/UI/Common/Extract.h new file mode 100644 index 0000000..5a939ed --- /dev/null +++ b/CPP/7zip/UI/Common/Extract.h @@ -0,0 +1,76 @@ +// Extract.h + +#ifndef __EXTRACT_H +#define __EXTRACT_H + +#include "Windows/FileFind.h" + +#include "../../Archive/IArchive.h" + +#include "ArchiveExtractCallback.h" +#include "ArchiveOpenCallback.h" +#include "ExtractMode.h" +#include "Property.h" + +#include "../Common/LoadCodecs.h" + +struct CExtractOptions +{ + bool StdInMode; + bool StdOutMode; + bool YesToAll; + bool TestMode; + bool CalcCrc; + NExtract::NPathMode::EEnum PathMode; + NExtract::NOverwriteMode::EEnum OverwriteMode; + UString OutputDir; + + // bool ShowDialog; + // bool PasswordEnabled; + // UString Password; + #if !defined(_7ZIP_ST) && !defined(_SFX) + CObjectVector Properties; + #endif + + #ifdef EXTERNAL_CODECS + CCodecs *Codecs; + #endif + + CExtractOptions(): + StdInMode(false), + StdOutMode(false), + YesToAll(false), + TestMode(false), + CalcCrc(false), + PathMode(NExtract::NPathMode::kFullPathnames), + OverwriteMode(NExtract::NOverwriteMode::kAskBefore) + {} +}; + +struct CDecompressStat +{ + UInt64 NumArchives; + UInt64 UnpackSize; + UInt64 PackSize; + UInt64 NumFolders; + UInt64 NumFiles; + UInt32 CrcSum; + + void Clear() + { + NumArchives = UnpackSize = PackSize = NumFolders = NumFiles = 0; + CrcSum = 0; + } +}; + +HRESULT DecompressArchives( + CCodecs *codecs, const CIntVector &formatIndices, + UStringVector &archivePaths, UStringVector &archivePathsFull, + const NWildcard::CCensorNode &wildcardCensor, + const CExtractOptions &options, + IOpenCallbackUI *openCallback, + IExtractCallbackUI *extractCallback, + UString &errorMessage, + CDecompressStat &stat); + +#endif diff --git a/CPP/7zip/UI/Common/ExtractMode.h b/CPP/7zip/UI/Common/ExtractMode.h new file mode 100644 index 0000000..b448fb3 --- /dev/null +++ b/CPP/7zip/UI/Common/ExtractMode.h @@ -0,0 +1,31 @@ +// ExtractMode.h + +#ifndef __EXTRACT_MODE_H +#define __EXTRACT_MODE_H + +namespace NExtract { + + namespace NPathMode + { + enum EEnum + { + kFullPathnames, + kCurrentPathnames, + kNoPathnames + }; + } + + namespace NOverwriteMode + { + enum EEnum + { + kAskBefore, + kWithoutPrompt, + kSkipExisting, + kAutoRename, + kAutoRenameExisting + }; + } +} + +#endif diff --git a/CPP/7zip/UI/Common/ExtractingFilePath.cpp b/CPP/7zip/UI/Common/ExtractingFilePath.cpp new file mode 100644 index 0000000..8f31708 --- /dev/null +++ b/CPP/7zip/UI/Common/ExtractingFilePath.cpp @@ -0,0 +1,142 @@ +// ExtractingFilePath.cpp + +#include "StdAfx.h" + +#include "../../../../C/Types.h" + +#include "Common/Wildcard.h" + +#include "ExtractingFilePath.h" + +static UString ReplaceIncorrectChars(const UString &s) +{ + #ifdef _WIN32 + UString res; + for (int i = 0; i < s.Length(); i++) + { + wchar_t c = s[i]; + if (c < 0x20 || c == '*' || c == '?' || c == '<' || c == '>' || c == '|' || c == ':' || c == '"') + c = '_'; + res += c; + } + res.TrimRight(); + while (!res.IsEmpty() && res[res.Length() - 1] == '.') + res.Delete(res.Length() - 1); + return res; + #else + return s; + #endif +} + +#ifdef _WIN32 +static const wchar_t *g_ReservedNames[] = +{ + L"CON", L"PRN", L"AUX", L"NUL" +}; + +static bool CheckTail(const UString &name, int len) +{ + int dotPos = name.Find(L'.'); + if (dotPos < 0) + dotPos = name.Length(); + UString s = name.Left(dotPos); + s.TrimRight(); + return (s.Length() != len); +} + +static bool CheckNameNum(const UString &name, const wchar_t *reservedName) +{ + int len = MyStringLen(reservedName); + if (name.Length() <= len) + return true; + if (name.Left(len).CompareNoCase(reservedName) != 0) + return true; + wchar_t c = name[len]; + if (c < L'0' || c > L'9') + return true; + return CheckTail(name, len + 1); +} + +static bool IsSupportedName(const UString &name) +{ + for (int i = 0; i < sizeof(g_ReservedNames) / sizeof(g_ReservedNames[0]); i++) + { + const wchar_t *reservedName = g_ReservedNames[i]; + int len = MyStringLen(reservedName); + if (name.Length() < len) + continue; + if (name.Left(len).CompareNoCase(reservedName) != 0) + continue; + if (!CheckTail(name, len)) + return false; + } + if (!CheckNameNum(name, L"COM")) + return false; + return CheckNameNum(name, L"LPT"); +} +#endif + +static UString GetCorrectFileName(const UString &path) +{ + if (path == L".." || path == L".") + return UString(); + return ReplaceIncorrectChars(path); +} + +void MakeCorrectPath(UStringVector &pathParts) +{ + for (int i = 0; i < pathParts.Size();) + { + UString &s = pathParts[i]; + s = GetCorrectFileName(s); + if (s.IsEmpty()) + pathParts.Delete(i); + else + { + #ifdef _WIN32 + if (!IsSupportedName(s)) + s = (UString)L"_" + s; + #endif + i++; + } + } +} + +UString MakePathNameFromParts(const UStringVector &parts) +{ + UString result; + for (int i = 0; i < parts.Size(); i++) + { + if (i != 0) + result += WCHAR_PATH_SEPARATOR; + result += parts[i]; + } + return result; +} + +UString GetCorrectFsPath(const UString &path) +{ + UString res = GetCorrectFileName(path); + #ifdef _WIN32 + if (!IsSupportedName(res)) + res = (UString)L"_" + res; + #endif + return res; +} + +UString GetCorrectFullFsPath(const UString &path) +{ + UStringVector parts; + SplitPathToParts(path, parts); + for (int i = 0; i < parts.Size(); i++) + { + UString &s = parts[i]; + #ifdef _WIN32 + while (!s.IsEmpty() && s[s.Length() - 1] == '.') + s.Delete(s.Length() - 1); + if (!IsSupportedName(s)) + s = (UString)L"_" + s; + #endif + } + return MakePathNameFromParts(parts); +} diff --git a/CPP/7zip/UI/Common/ExtractingFilePath.h b/CPP/7zip/UI/Common/ExtractingFilePath.h new file mode 100644 index 0000000..da28bfc --- /dev/null +++ b/CPP/7zip/UI/Common/ExtractingFilePath.h @@ -0,0 +1,13 @@ +// ExtractingFilePath.h + +#ifndef __EXTRACTING_FILE_PATH_H +#define __EXTRACTING_FILE_PATH_H + +#include "Common/MyString.h" + +UString MakePathNameFromParts(const UStringVector &parts); +void MakeCorrectPath(UStringVector &pathParts); +UString GetCorrectFsPath(const UString &path); +UString GetCorrectFullFsPath(const UString &path); + +#endif diff --git a/CPP/7zip/UI/Common/IFileExtractCallback.h b/CPP/7zip/UI/Common/IFileExtractCallback.h new file mode 100644 index 0000000..e8dcdce --- /dev/null +++ b/CPP/7zip/UI/Common/IFileExtractCallback.h @@ -0,0 +1,46 @@ +// IFileExtractCallback.h + +#ifndef __IFILEEXTRACTCALLBACK_H +#define __IFILEEXTRACTCALLBACK_H + +#include "Common/MyString.h" +#include "../../IDecl.h" + +namespace NOverwriteAnswer +{ + enum EEnum + { + kYes, + kYesToAll, + kNo, + kNoToAll, + kAutoRename, + kCancel + }; +} + +DECL_INTERFACE_SUB(IFolderArchiveExtractCallback, IProgress, 0x01, 0x07) +{ +public: + STDMETHOD(AskOverwrite)( + const wchar_t *existName, const FILETIME *existTime, const UInt64 *existSize, + const wchar_t *newName, const FILETIME *newTime, const UInt64 *newSize, + Int32 *answer) PURE; + STDMETHOD(PrepareOperation)(const wchar_t *name, bool isFolder, Int32 askExtractMode, const UInt64 *position) PURE; + STDMETHOD(MessageError)(const wchar_t *message) PURE; + STDMETHOD(SetOperationResult)(Int32 operationResult, bool encrypted) PURE; +}; + +struct IExtractCallbackUI: IFolderArchiveExtractCallback +{ + virtual HRESULT BeforeOpen(const wchar_t *name) = 0; + virtual HRESULT OpenResult(const wchar_t *name, HRESULT result, bool encrypted) = 0; + virtual HRESULT ThereAreNoFiles() = 0; + virtual HRESULT ExtractResult(HRESULT result) = 0; + + #ifndef _NO_CRYPTO + virtual HRESULT SetPassword(const UString &password) = 0; + #endif +}; + +#endif diff --git a/CPP/7zip/UI/Common/LoadCodecs.cpp b/CPP/7zip/UI/Common/LoadCodecs.cpp new file mode 100644 index 0000000..171b7c1 --- /dev/null +++ b/CPP/7zip/UI/Common/LoadCodecs.cpp @@ -0,0 +1,716 @@ +// LoadCodecs.cpp + +#include "StdAfx.h" + +#include "LoadCodecs.h" + +#include "../../../Common/MyCom.h" +#ifdef NEW_FOLDER_INTERFACE +#include "../../../Common/StringToInt.h" +#endif +#include "../../../Windows/PropVariant.h" + +#include "../../ICoder.h" +#include "../../Common/RegisterArc.h" + +#ifdef EXTERNAL_CODECS +#include "../../../Windows/FileFind.h" +#include "../../../Windows/DLL.h" +#ifdef NEW_FOLDER_INTERFACE +#include "../../../Windows/ResourceString.h" +static const UINT kIconTypesResId = 100; +#endif + +#ifdef _WIN32 +#include "Windows/Registry.h" +#else +#include "Common/StringConvert.h" +#endif + +using namespace NWindows; +using namespace NFile; + +#ifdef _WIN32 +extern HINSTANCE g_hInstance; +#endif + +static CSysString GetLibraryFolderPrefix() +{ + #ifdef _WIN32 + TCHAR fullPath[MAX_PATH + 1]; + ::GetModuleFileName(g_hInstance, fullPath, MAX_PATH); + CSysString path = fullPath; + int pos = path.ReverseFind(TEXT(CHAR_PATH_SEPARATOR)); + return path.Left(pos + 1); + #else + const char *p7zip_home_dir = getenv("P7ZIP_HOME_DIR"); + if (p7zip_home_dir == 0) p7zip_home_dir="./"; +#ifdef _UNICODE + return MultiByteToUnicodeString(p7zip_home_dir); +#else + return p7zip_home_dir; +#endif + #endif +} + +#define kCodecsFolderName TEXT("Codecs") +#define kFormatsFolderName TEXT("Formats") +static const TCHAR *kMainDll = TEXT("7z.dll"); + +#ifdef _WIN32 +static LPCTSTR kRegistryPath = TEXT("Software") TEXT(STRING_PATH_SEPARATOR) TEXT("7-zip"); +static LPCTSTR kProgramPathValue = TEXT("Path"); +static bool ReadPathFromRegistry(HKEY baseKey, CSysString &path) +{ + NRegistry::CKey key; + if(key.Open(baseKey, kRegistryPath, KEY_READ) == ERROR_SUCCESS) + if (key.QueryValue(kProgramPathValue, path) == ERROR_SUCCESS) + { + NName::NormalizeDirPathPrefix(path); + return true; + } + return false; +} + +#endif + +CSysString GetBaseFolderPrefixFromRegistry() +{ + CSysString moduleFolderPrefix = GetLibraryFolderPrefix(); +#ifdef _UNICODE + NFind::CFileInfoW fi; +#else + NFind::CFileInfo fi; +#endif + if (NFind::FindFile(moduleFolderPrefix + kMainDll, fi)) + if (!fi.IsDir()) + return moduleFolderPrefix; + if (NFind::FindFile(moduleFolderPrefix + kCodecsFolderName, fi)) + if (fi.IsDir()) + return moduleFolderPrefix; + if (NFind::FindFile(moduleFolderPrefix + kFormatsFolderName, fi)) + if (fi.IsDir()) + return moduleFolderPrefix; + #ifdef _WIN32 + if (!NFind::DoesFileExist(moduleFolderPrefix + kMainDll) && + !NFind::DoesDirExist(moduleFolderPrefix + kCodecsFolderName) && + !NFind::DoesDirExist(moduleFolderPrefix + kFormatsFolderName)) + { + CSysString path; + if (ReadPathFromRegistry(HKEY_CURRENT_USER, path)) + return path; + if (ReadPathFromRegistry(HKEY_LOCAL_MACHINE, path)) + return path; + } + #endif + return moduleFolderPrefix; +} + +typedef UInt32 (WINAPI *GetNumberOfMethodsFunc)(UInt32 *numMethods); +typedef UInt32 (WINAPI *GetNumberOfFormatsFunc)(UInt32 *numFormats); +typedef UInt32 (WINAPI *GetHandlerPropertyFunc)(PROPID propID, PROPVARIANT *value); +typedef UInt32 (WINAPI *GetHandlerPropertyFunc2)(UInt32 index, PROPID propID, PROPVARIANT *value); +typedef UInt32 (WINAPI *CreateObjectFunc)(const GUID *clsID, const GUID *iid, void **outObject); +typedef UInt32 (WINAPI *SetLargePageModeFunc)(); + + +static HRESULT GetCoderClass(GetMethodPropertyFunc getMethodProperty, UInt32 index, + PROPID propId, CLSID &clsId, bool &isAssigned) +{ + NWindows::NCOM::CPropVariant prop; + isAssigned = false; + RINOK(getMethodProperty(index, propId, &prop)); + if (prop.vt == VT_BSTR) + { + isAssigned = true; + clsId = *(const GUID *)prop.bstrVal; + } + else if (prop.vt != VT_EMPTY) + return E_FAIL; + return S_OK; +} + +HRESULT CCodecs::LoadCodecs() +{ + CCodecLib &lib = Libs.Back(); + lib.GetMethodProperty = (GetMethodPropertyFunc)lib.Lib.GetProc("GetMethodProperty"); + if (lib.GetMethodProperty == NULL) + return S_OK; + + UInt32 numMethods = 1; + GetNumberOfMethodsFunc getNumberOfMethodsFunc = (GetNumberOfMethodsFunc)lib.Lib.GetProc("GetNumberOfMethods"); + if (getNumberOfMethodsFunc != NULL) + { + RINOK(getNumberOfMethodsFunc(&numMethods)); + } + + for(UInt32 i = 0; i < numMethods; i++) + { + CDllCodecInfo info; + info.LibIndex = Libs.Size() - 1; + info.CodecIndex = i; + + RINOK(GetCoderClass(lib.GetMethodProperty, i, NMethodPropID::kEncoder, info.Encoder, info.EncoderIsAssigned)); + RINOK(GetCoderClass(lib.GetMethodProperty, i, NMethodPropID::kDecoder, info.Decoder, info.DecoderIsAssigned)); + + Codecs.Add(info); + } + return S_OK; +} + +static HRESULT ReadProp( + GetHandlerPropertyFunc getProp, + GetHandlerPropertyFunc2 getProp2, + UInt32 index, PROPID propID, NCOM::CPropVariant &prop) +{ + if (getProp2) + return getProp2(index, propID, &prop);; + return getProp(propID, &prop); +} + +static HRESULT ReadBoolProp( + GetHandlerPropertyFunc getProp, + GetHandlerPropertyFunc2 getProp2, + UInt32 index, PROPID propID, bool &res) +{ + NCOM::CPropVariant prop; + RINOK(ReadProp(getProp, getProp2, index, propID, prop)); + if (prop.vt == VT_BOOL) + res = VARIANT_BOOLToBool(prop.boolVal); + else if (prop.vt != VT_EMPTY) + return E_FAIL; + return S_OK; +} + +static HRESULT ReadStringProp( + GetHandlerPropertyFunc getProp, + GetHandlerPropertyFunc2 getProp2, + UInt32 index, PROPID propID, UString &res) +{ + NCOM::CPropVariant prop; + RINOK(ReadProp(getProp, getProp2, index, propID, prop)); + if (prop.vt == VT_BSTR) + res = prop.bstrVal; + else if (prop.vt != VT_EMPTY) + return E_FAIL; + return S_OK; +} + +#endif + +static const unsigned int kNumArcsMax = 48; +static unsigned int g_NumArcs = 0; +static const CArcInfo *g_Arcs[kNumArcsMax]; +void RegisterArc(const CArcInfo *arcInfo) +{ + if (g_NumArcs < kNumArcsMax) + g_Arcs[g_NumArcs++] = arcInfo; +} + +static void SplitString(const UString &srcString, UStringVector &destStrings) +{ + destStrings.Clear(); + UString s; + int len = srcString.Length(); + if (len == 0) + return; + for (int i = 0; i < len; i++) + { + wchar_t c = srcString[i]; + if (c == L' ') + { + if (!s.IsEmpty()) + { + destStrings.Add(s); + s.Empty(); + } + } + else + s += c; + } + if (!s.IsEmpty()) + destStrings.Add(s); +} + +void CArcInfoEx::AddExts(const wchar_t *ext, const wchar_t *addExt) +{ + UStringVector exts, addExts; + if (ext != 0) + SplitString(ext, exts); + if (addExt != 0) + SplitString(addExt, addExts); + for (int i = 0; i < exts.Size(); i++) + { + CArcExtInfo extInfo; + extInfo.Ext = exts[i]; + if (i < addExts.Size()) + { + extInfo.AddExt = addExts[i]; + if (extInfo.AddExt == L"*") + extInfo.AddExt.Empty(); + } + Exts.Add(extInfo); + } +} + +#ifdef EXTERNAL_CODECS + +HRESULT CCodecs::LoadFormats() +{ + const NDLL::CLibrary &lib = Libs.Back().Lib; + GetHandlerPropertyFunc getProp = 0; + GetHandlerPropertyFunc2 getProp2 = (GetHandlerPropertyFunc2)lib.GetProc("GetHandlerProperty2"); + if (getProp2 == NULL) + { + getProp = (GetHandlerPropertyFunc)lib.GetProc("GetHandlerProperty"); + if (getProp == NULL) + return S_OK; + } + + UInt32 numFormats = 1; + GetNumberOfFormatsFunc getNumberOfFormats = (GetNumberOfFormatsFunc)lib.GetProc("GetNumberOfFormats"); + if (getNumberOfFormats != NULL) + { + RINOK(getNumberOfFormats(&numFormats)); + } + if (getProp2 == NULL) + numFormats = 1; + + for(UInt32 i = 0; i < numFormats; i++) + { + CArcInfoEx item; + item.LibIndex = Libs.Size() - 1; + item.FormatIndex = i; + + RINOK(ReadStringProp(getProp, getProp2, i, NArchive::kName, item.Name)); + + NCOM::CPropVariant prop; + if (ReadProp(getProp, getProp2, i, NArchive::kClassID, prop) != S_OK) + continue; + if (prop.vt != VT_BSTR) + continue; + item.ClassID = *(const GUID *)prop.bstrVal; + prop.Clear(); + + UString ext, addExt; + RINOK(ReadStringProp(getProp, getProp2, i, NArchive::kExtension, ext)); + RINOK(ReadStringProp(getProp, getProp2, i, NArchive::kAddExtension, addExt)); + item.AddExts(ext, addExt); + + ReadBoolProp(getProp, getProp2, i, NArchive::kUpdate, item.UpdateEnabled); + if (item.UpdateEnabled) + ReadBoolProp(getProp, getProp2, i, NArchive::kKeepName, item.KeepName); + + if (ReadProp(getProp, getProp2, i, NArchive::kStartSignature, prop) == S_OK) + if (prop.vt == VT_BSTR) + { + UINT len = ::SysStringByteLen(prop.bstrVal); + item.StartSignature.SetCapacity(len); + memmove((Byte *)item.StartSignature, prop.bstrVal, len); + } + Formats.Add(item); + } + return S_OK; +} + +#ifdef NEW_FOLDER_INTERFACE +void CCodecIcons::LoadIcons(HMODULE m) +{ +#ifdef _WIN32 + UString iconTypes = MyLoadStringW(m, kIconTypesResId); + UStringVector pairs; + SplitString(iconTypes, pairs); + for (int i = 0; i < pairs.Size(); i++) + { + const UString &s = pairs[i]; + int pos = s.Find(L':'); + CIconPair iconPair; + iconPair.IconIndex = -1; + if (pos < 0) + pos = s.Length(); + else + { + UString num = s.Mid(pos + 1); + if (!num.IsEmpty()) + { + const wchar_t *end; + iconPair.IconIndex = (UInt32)ConvertStringToUInt64(num, &end); + if (*end != L'\0') + continue; + } + } + iconPair.Ext = s.Left(pos); + IconPairs.Add(iconPair); + } +#endif // #ifdef _WIN32 +} + +bool CCodecIcons::FindIconIndex(const UString &ext, int &iconIndex) const +{ +#ifdef _WIN32 + iconIndex = -1; + for (int i = 0; i < IconPairs.Size(); i++) + { + const CIconPair &pair = IconPairs[i]; + if (ext.CompareNoCase(pair.Ext) == 0) + { + iconIndex = pair.IconIndex; + return true; + } + } +#endif // #ifdef _WIN32 + return false; +} +#endif + +#ifdef _7ZIP_LARGE_PAGES +extern "C" +{ + extern size_t g_LargePageSize; +} +#endif + +HRESULT CCodecs::LoadDll(const CSysString &dllPath, bool needCheckDll) +{ +#ifdef _WIN32 + if (needCheckDll) + { + NDLL::CLibrary library; + if (!library.LoadEx(dllPath, LOAD_LIBRARY_AS_DATAFILE)) + return S_OK; + } +#endif + Libs.Add(CCodecLib()); + CCodecLib &lib = Libs.Back(); + #ifdef NEW_FOLDER_INTERFACE + lib.Path = dllPath; + #endif + bool used = false; + HRESULT res = S_OK; + if (lib.Lib.Load(dllPath)) + { + #ifdef NEW_FOLDER_INTERFACE + lib.LoadIcons(); + #endif + + #ifdef _7ZIP_LARGE_PAGES + if (g_LargePageSize != 0) + { + SetLargePageModeFunc setLargePageMode = (SetLargePageModeFunc)lib.Lib.GetProc("SetLargePageMode"); + if (setLargePageMode != 0) + setLargePageMode(); + } + #endif + + lib.CreateObject = (CreateObjectFunc)lib.Lib.GetProc("CreateObject"); + if (lib.CreateObject != 0) + { + int startSize = Codecs.Size(); + res = LoadCodecs(); + used = (Codecs.Size() != startSize); + if (res == S_OK) + { + startSize = Formats.Size(); + res = LoadFormats(); + used = used || (Formats.Size() != startSize); + } + } + } + if (!used) + Libs.DeleteBack(); + return res; +} + +HRESULT CCodecs::LoadDllsFromFolder(const CSysString &folderPrefix) +{ +#ifdef _UNICODE + NFile::NFind::CEnumeratorW enumerator(folderPrefix + CSysString(TEXT("*"))); + NFile::NFind::CFileInfoW fi; +#else + NFile::NFind::CEnumerator enumerator(folderPrefix + CSysString(TEXT("*"))); + NFile::NFind::CFileInfo fi; +#endif + while (enumerator.Next(fi)) + { + if (fi.IsDir()) + continue; + RINOK(LoadDll(folderPrefix + fi.Name, true)); + } + return S_OK; +} + +#endif + +#ifndef _SFX +static inline void SetBuffer(CByteBuffer &bb, const Byte *data, int size) +{ + bb.SetCapacity(size); + memmove((Byte *)bb, data, size); +} +#endif + +HRESULT CCodecs::Load() +{ + #ifdef NEW_FOLDER_INTERFACE + #ifdef _WIN32 + InternalIcons.LoadIcons(g_hInstance); + #endif + #endif + + Formats.Clear(); + #ifdef EXTERNAL_CODECS + Codecs.Clear(); + #endif + for (UInt32 i = 0; i < g_NumArcs; i++) + { + const CArcInfo &arc = *g_Arcs[i]; + CArcInfoEx item; + item.Name = arc.Name; + item.CreateInArchive = arc.CreateInArchive; + item.CreateOutArchive = arc.CreateOutArchive; + item.AddExts(arc.Ext, arc.AddExt); + item.UpdateEnabled = (arc.CreateOutArchive != 0); + item.KeepName = arc.KeepName; + + #ifndef _SFX + SetBuffer(item.StartSignature, arc.Signature, arc.SignatureSize); + #endif + Formats.Add(item); + } + #ifdef EXTERNAL_CODECS + const CSysString baseFolder = GetBaseFolderPrefixFromRegistry(); + RINOK(LoadDll(baseFolder + kMainDll, false)); + RINOK(LoadDllsFromFolder(baseFolder + kCodecsFolderName TEXT(STRING_PATH_SEPARATOR))); + RINOK(LoadDllsFromFolder(baseFolder + kFormatsFolderName TEXT(STRING_PATH_SEPARATOR))); + #endif + return S_OK; +} + +#ifndef _SFX + +int CCodecs::FindFormatForArchiveName(const UString &arcPath) const +{ + int slashPos1 = arcPath.ReverseFind(WCHAR_PATH_SEPARATOR); + int slashPos2 = arcPath.ReverseFind(L'.'); + int dotPos = arcPath.ReverseFind(L'.'); + if (dotPos < 0 || dotPos < slashPos1 || dotPos < slashPos2) + return -1; + UString ext = arcPath.Mid(dotPos + 1); + for (int i = 0; i < Formats.Size(); i++) + { + const CArcInfoEx &arc = Formats[i]; + if (!arc.UpdateEnabled) + continue; + if (arc.FindExtension(ext) >= 0) + return i; + } + return -1; +} + +int CCodecs::FindFormatForExtension(const UString &ext) const +{ + if (ext.IsEmpty()) + return -1; + for (int i = 0; i < Formats.Size(); i++) + if (Formats[i].FindExtension(ext) >= 0) + return i; + return -1; +} + +int CCodecs::FindFormatForArchiveType(const UString &arcType) const +{ + for (int i = 0; i < Formats.Size(); i++) + if (Formats[i].Name.CompareNoCase(arcType) == 0) + return i; + return -1; +} + +bool CCodecs::FindFormatForArchiveType(const UString &arcType, CIntVector &formatIndices) const +{ + formatIndices.Clear(); + for (int pos = 0; pos < arcType.Length();) + { + int pos2 = arcType.Find('.', pos); + if (pos2 < 0) + pos2 = arcType.Length(); + const UString name = arcType.Mid(pos, pos2 - pos); + int index = FindFormatForArchiveType(name); + if (index < 0 && name != L"*") + { + formatIndices.Clear(); + return false; + } + formatIndices.Add(index); + pos = pos2 + 1; + } + return true; +} + +#endif + +#ifdef EXTERNAL_CODECS + +#ifdef EXPORT_CODECS +extern unsigned int g_NumCodecs; +STDAPI CreateCoder2(bool encode, UInt32 index, const GUID *iid, void **outObject); +STDAPI GetMethodProperty(UInt32 codecIndex, PROPID propID, PROPVARIANT *value); +// STDAPI GetNumberOfMethods(UInt32 *numCodecs); +#endif + +STDMETHODIMP CCodecs::GetNumberOfMethods(UInt32 *numMethods) +{ + *numMethods = + #ifdef EXPORT_CODECS + g_NumCodecs + + #endif + Codecs.Size(); + return S_OK; +} + +STDMETHODIMP CCodecs::GetProperty(UInt32 index, PROPID propID, PROPVARIANT *value) +{ + #ifdef EXPORT_CODECS + if (index < g_NumCodecs) + return GetMethodProperty(index, propID, value); + #endif + + const CDllCodecInfo &ci = Codecs[index + #ifdef EXPORT_CODECS + - g_NumCodecs + #endif + ]; + + if (propID == NMethodPropID::kDecoderIsAssigned) + { + NWindows::NCOM::CPropVariant propVariant; + propVariant = ci.DecoderIsAssigned; + propVariant.Detach(value); + return S_OK; + } + if (propID == NMethodPropID::kEncoderIsAssigned) + { + NWindows::NCOM::CPropVariant propVariant; + propVariant = ci.EncoderIsAssigned; + propVariant.Detach(value); + return S_OK; + } + return Libs[ci.LibIndex].GetMethodProperty(ci.CodecIndex, propID, value); +} + +STDMETHODIMP CCodecs::CreateDecoder(UInt32 index, const GUID *iid, void **coder) +{ + #ifdef EXPORT_CODECS + if (index < g_NumCodecs) + return CreateCoder2(false, index, iid, coder); + #endif + const CDllCodecInfo &ci = Codecs[index + #ifdef EXPORT_CODECS + - g_NumCodecs + #endif + ]; + if (ci.DecoderIsAssigned) + return Libs[ci.LibIndex].CreateObject(&ci.Decoder, iid, (void **)coder); + return S_OK; +} + +STDMETHODIMP CCodecs::CreateEncoder(UInt32 index, const GUID *iid, void **coder) +{ + #ifdef EXPORT_CODECS + if (index < g_NumCodecs) + return CreateCoder2(true, index, iid, coder); + #endif + const CDllCodecInfo &ci = Codecs[index + #ifdef EXPORT_CODECS + - g_NumCodecs + #endif + ]; + if (ci.EncoderIsAssigned) + return Libs[ci.LibIndex].CreateObject(&ci.Encoder, iid, (void **)coder); + return S_OK; +} + +HRESULT CCodecs::CreateCoder(const UString &name, bool encode, CMyComPtr &coder) const +{ + for (int i = 0; i < Codecs.Size(); i++) + { + const CDllCodecInfo &codec = Codecs[i]; + if (encode && !codec.EncoderIsAssigned || !encode && !codec.DecoderIsAssigned) + continue; + const CCodecLib &lib = Libs[codec.LibIndex]; + UString res; + NWindows::NCOM::CPropVariant prop; + RINOK(lib.GetMethodProperty(codec.CodecIndex, NMethodPropID::kName, &prop)); + if (prop.vt == VT_BSTR) + res = prop.bstrVal; + else if (prop.vt != VT_EMPTY) + continue; + if (name.CompareNoCase(res) == 0) + return lib.CreateObject(encode ? &codec.Encoder : &codec.Decoder, &IID_ICompressCoder, (void **)&coder); + } + return CLASS_E_CLASSNOTAVAILABLE; +} + +int CCodecs::GetCodecLibIndex(UInt32 index) +{ + #ifdef EXPORT_CODECS + if (index < g_NumCodecs) + return -1; + #endif + #ifdef EXTERNAL_CODECS + const CDllCodecInfo &ci = Codecs[index + #ifdef EXPORT_CODECS + - g_NumCodecs + #endif + ]; + return ci.LibIndex; + #else + return -1; + #endif +} + +bool CCodecs::GetCodecEncoderIsAssigned(UInt32 index) +{ + #ifdef EXPORT_CODECS + if (index < g_NumCodecs) + { + NWindows::NCOM::CPropVariant prop; + if (GetProperty(index, NMethodPropID::kEncoder, &prop) == S_OK) + if (prop.vt != VT_EMPTY) + return true; + return false; + } + #endif + #ifdef EXTERNAL_CODECS + const CDllCodecInfo &ci = Codecs[index + #ifdef EXPORT_CODECS + - g_NumCodecs + #endif + ]; + return ci.EncoderIsAssigned; + #else + return false; + #endif +} + +HRESULT CCodecs::GetCodecId(UInt32 index, UInt64 &id) +{ + UString s; + NWindows::NCOM::CPropVariant prop; + RINOK(GetProperty(index, NMethodPropID::kID, &prop)); + if (prop.vt != VT_UI8) + return E_INVALIDARG; + id = prop.uhVal.QuadPart; + return S_OK; +} + +UString CCodecs::GetCodecName(UInt32 index) +{ + UString s; + NWindows::NCOM::CPropVariant prop; + if (GetProperty(index, NMethodPropID::kName, &prop) == S_OK) + if (prop.vt == VT_BSTR) + s = prop.bstrVal; + return s; +} + +#endif diff --git a/CPP/7zip/UI/Common/LoadCodecs.h b/CPP/7zip/UI/Common/LoadCodecs.h new file mode 100644 index 0000000..a633dd2 --- /dev/null +++ b/CPP/7zip/UI/Common/LoadCodecs.h @@ -0,0 +1,235 @@ +// LoadCodecs.h + +#ifndef __LOADCODECS_H +#define __LOADCODECS_H + +#include "../../../Common/Types.h" +#include "../../../Common/MyCom.h" +#include "../../../Common/MyString.h" +#include "../../../Common/Buffer.h" +#include "../../ICoder.h" + +#ifdef EXTERNAL_CODECS +#include "../../../Windows/DLL.h" +#endif + +struct CDllCodecInfo +{ + CLSID Encoder; + CLSID Decoder; + bool EncoderIsAssigned; + bool DecoderIsAssigned; + int LibIndex; + UInt32 CodecIndex; +}; + +#include "../../Archive/IArchive.h" + +typedef IInArchive * (*CreateInArchiveP)(); +typedef IOutArchive * (*CreateOutArchiveP)(); + +struct CArcExtInfo +{ + UString Ext; + UString AddExt; + CArcExtInfo() {} + CArcExtInfo(const UString &ext): Ext(ext) {} + CArcExtInfo(const UString &ext, const UString &addExt): Ext(ext), AddExt(addExt) {} +}; + + +struct CArcInfoEx +{ + #ifdef EXTERNAL_CODECS + int LibIndex; + UInt32 FormatIndex; + CLSID ClassID; + #endif + bool UpdateEnabled; + CreateInArchiveP CreateInArchive; + CreateOutArchiveP CreateOutArchive; + UString Name; + CObjectVector Exts; + #ifndef _SFX + CByteBuffer StartSignature; + // CByteBuffer FinishSignature; + #ifdef NEW_FOLDER_INTERFACE + UStringVector AssociateExts; + #endif + #endif + bool KeepName; + UString GetMainExt() const + { + if (Exts.IsEmpty()) + return UString(); + return Exts[0].Ext; + } + int FindExtension(const UString &ext) const + { + for (int i = 0; i < Exts.Size(); i++) + if (ext.CompareNoCase(Exts[i].Ext) == 0) + return i; + return -1; + } + UString GetAllExtensions() const + { + UString s; + for (int i = 0; i < Exts.Size(); i++) + { + if (i > 0) + s += ' '; + s += Exts[i].Ext; + } + return s; + } + + void AddExts(const wchar_t* ext, const wchar_t* addExt); + + CArcInfoEx(): + #ifdef EXTERNAL_CODECS + LibIndex(-1), + #endif + UpdateEnabled(false), + CreateInArchive(0), CreateOutArchive(0), + KeepName(false) + #ifndef _SFX + #endif + {} +}; + +#ifdef EXTERNAL_CODECS +typedef UInt32 (WINAPI *GetMethodPropertyFunc)(UInt32 index, PROPID propID, PROPVARIANT *value); +typedef UInt32 (WINAPI *CreateObjectFunc)(const GUID *clsID, const GUID *interfaceID, void **outObject); + + +#ifdef NEW_FOLDER_INTERFACE +struct CCodecIcons +{ + struct CIconPair + { + UString Ext; + int IconIndex; + }; + CObjectVector IconPairs; + void LoadIcons(HMODULE m); + bool FindIconIndex(const UString &ext, int &iconIndex) const; +}; +#endif + +struct CCodecLib +#ifdef NEW_FOLDER_INTERFACE +: public CCodecIcons +#endif +{ + NWindows::NDLL::CLibrary Lib; + GetMethodPropertyFunc GetMethodProperty; + CreateObjectFunc CreateObject; + #ifdef NEW_FOLDER_INTERFACE + CSysString Path; + void LoadIcons() { CCodecIcons::LoadIcons((HMODULE)Lib); } + #endif + CCodecLib(): GetMethodProperty(0) {} +}; +#endif + +class CCodecs: + #ifdef EXTERNAL_CODECS + public ICompressCodecsInfo, + #else + public IUnknown, + #endif + public CMyUnknownImp +{ +public: + #ifdef EXTERNAL_CODECS + CObjectVector Libs; + CObjectVector Codecs; + + #ifdef NEW_FOLDER_INTERFACE + CCodecIcons InternalIcons; + #endif + + HRESULT LoadCodecs(); + HRESULT LoadFormats(); + HRESULT LoadDll(const CSysString &path, bool needCheckDll); + HRESULT LoadDllsFromFolder(const CSysString &folderPrefix); + + HRESULT CreateArchiveHandler(const CArcInfoEx &ai, void **archive, bool outHandler) const + { + return Libs[ai.LibIndex].CreateObject(&ai.ClassID, outHandler ? &IID_IOutArchive : &IID_IInArchive, (void **)archive); + } + #endif + +public: + CObjectVector Formats; + HRESULT Load(); + + #ifndef _SFX + int FindFormatForArchiveName(const UString &arcPath) const; + int FindFormatForExtension(const UString &ext) const; + int FindFormatForArchiveType(const UString &arcType) const; + bool FindFormatForArchiveType(const UString &arcType, CIntVector &formatIndices) const; + #endif + + MY_UNKNOWN_IMP + + #ifdef EXTERNAL_CODECS + STDMETHOD(GetNumberOfMethods)(UInt32 *numMethods); + STDMETHOD(GetProperty)(UInt32 index, PROPID propID, PROPVARIANT *value); + STDMETHOD(CreateDecoder)(UInt32 index, const GUID *interfaceID, void **coder); + STDMETHOD(CreateEncoder)(UInt32 index, const GUID *interfaceID, void **coder); + #endif + + int GetCodecLibIndex(UInt32 index); + bool GetCodecEncoderIsAssigned(UInt32 index); + HRESULT GetCodecId(UInt32 index, UInt64 &id); + UString GetCodecName(UInt32 index); + + HRESULT CreateInArchive(int formatIndex, CMyComPtr &archive) const + { + const CArcInfoEx &ai = Formats[formatIndex]; + #ifdef EXTERNAL_CODECS + if (ai.LibIndex < 0) + #endif + { + archive = ai.CreateInArchive(); + return S_OK; + } + #ifdef EXTERNAL_CODECS + return CreateArchiveHandler(ai, (void **)&archive, false); + #endif + } + HRESULT CreateOutArchive(int formatIndex, CMyComPtr &archive) const + { + const CArcInfoEx &ai = Formats[formatIndex]; + #ifdef EXTERNAL_CODECS + if (ai.LibIndex < 0) + #endif + { + archive = ai.CreateOutArchive(); + return S_OK; + } + #ifdef EXTERNAL_CODECS + return CreateArchiveHandler(ai, (void **)&archive, true); + #endif + } + int FindOutFormatFromName(const UString &name) const + { + for (int i = 0; i < Formats.Size(); i++) + { + const CArcInfoEx &arc = Formats[i]; + if (!arc.UpdateEnabled) + continue; + if (arc.Name.CompareNoCase(name) == 0) + return i; + } + return -1; + } + + #ifdef EXTERNAL_CODECS + HRESULT CreateCoder(const UString &name, bool encode, CMyComPtr &coder) const; + #endif + +}; + +#endif diff --git a/CPP/7zip/UI/Common/OpenArchive.cpp b/CPP/7zip/UI/Common/OpenArchive.cpp new file mode 100644 index 0000000..12b8e14 --- /dev/null +++ b/CPP/7zip/UI/Common/OpenArchive.cpp @@ -0,0 +1,536 @@ +// OpenArchive.cpp + +#include "StdAfx.h" + +#include "Common/Wildcard.h" + +#include "Windows/FileDir.h" +#include "Windows/PropVariant.h" + +#include "../../Common/FileStreams.h" +#include "../../Common/StreamUtils.h" + +#include "DefaultName.h" +#include "OpenArchive.h" + +using namespace NWindows; + +// Static-SFX (for Linux) can be big. +const UInt64 kMaxCheckStartPosition = 1 << 22; + +HRESULT GetArchiveItemBoolProp(IInArchive *archive, UInt32 index, PROPID propID, bool &result) +{ + NCOM::CPropVariant prop; + result = false; + RINOK(archive->GetProperty(index, propID, &prop)); + if (prop.vt == VT_BOOL) + result = VARIANT_BOOLToBool(prop.boolVal); + else if (prop.vt != VT_EMPTY) + return E_FAIL; + return S_OK; +} + +HRESULT IsArchiveItemFolder(IInArchive *archive, UInt32 index, bool &result) +{ + return GetArchiveItemBoolProp(archive, index, kpidIsDir, result); +} + +HRESULT CArc::GetItemPath(UInt32 index, UString &result) const +{ + { + NCOM::CPropVariant prop; + RINOK(Archive->GetProperty(index, kpidPath, &prop)); + if (prop.vt == VT_BSTR) + result = prop.bstrVal; + else if (prop.vt == VT_EMPTY) + result.Empty(); + else + return E_FAIL; + } + if (result.IsEmpty()) + { + result = DefaultName; + NCOM::CPropVariant prop; + RINOK(Archive->GetProperty(index, kpidExtension, &prop)); + if (prop.vt == VT_BSTR) + { + result += L'.'; + result += prop.bstrVal; + } + else if (prop.vt != VT_EMPTY) + return E_FAIL; + } + return S_OK; +} + +HRESULT CArc::GetItemMTime(UInt32 index, FILETIME &ft, bool &defined) const +{ + NCOM::CPropVariant prop; + defined = false; + ft.dwHighDateTime = ft.dwLowDateTime = 0; + RINOK(Archive->GetProperty(index, kpidMTime, &prop)); + if (prop.vt == VT_FILETIME) + { + ft = prop.filetime; + defined = true; + } + else if (prop.vt != VT_EMPTY) + return E_FAIL; + else if (MTimeDefined) + { + ft = MTime; + defined = true; + } + return S_OK; +} + +#ifndef _SFX +static inline bool TestSignature(const Byte *p1, const Byte *p2, size_t size) +{ + for (size_t i = 0; i < size; i++) + if (p1[i] != p2[i]) + return false; + return true; +} +#endif + +#ifdef UNDER_CE +static const int kNumHashBytes = 1; +#define HASH_VAL(buf, pos) ((buf)[pos]) +#else +static const int kNumHashBytes = 2; +#define HASH_VAL(buf, pos) ((buf)[pos] | ((UInt32)(buf)[pos + 1] << 8)) +#endif + + +HRESULT CArc::OpenStream( + CCodecs *codecs, + int formatIndex, + IInStream *stream, + ISequentialInStream *seqStream, + IArchiveOpenCallback *callback) +{ + Archive.Release(); + ErrorMessage.Empty(); + const UString fileName = ExtractFileNameFromPath(Path); + UString extension; + { + int dotPos = fileName.ReverseFind(L'.'); + if (dotPos >= 0) + extension = fileName.Mid(dotPos + 1); + } + CIntVector orderIndices; + if (formatIndex >= 0) + orderIndices.Add(formatIndex); + else + { + + int i; + int numFinded = 0; + for (i = 0; i < codecs->Formats.Size(); i++) + if (codecs->Formats[i].FindExtension(extension) >= 0) + orderIndices.Insert(numFinded++, i); + else + orderIndices.Add(i); + + if (!stream) + { + if (numFinded != 1) + return E_NOTIMPL; + orderIndices.DeleteFrom(1); + } + + #ifndef _SFX + if (orderIndices.Size() >= 2 && (numFinded == 0 || extension.CompareNoCase(L"exe") == 0)) + { + CIntVector orderIndices2; + CByteBuffer byteBuffer; + const size_t kBufferSize = (1 << 21); + byteBuffer.SetCapacity(kBufferSize); + RINOK(stream->Seek(0, STREAM_SEEK_SET, NULL)); + size_t processedSize = kBufferSize; + RINOK(ReadStream(stream, byteBuffer, &processedSize)); + if (processedSize == 0) + return S_FALSE; + + const Byte *buf = byteBuffer; + CByteBuffer hashBuffer; + const UInt32 kNumVals = 1 << (kNumHashBytes * 8); + hashBuffer.SetCapacity(kNumVals); + Byte *hash = hashBuffer; + memset(hash, 0xFF, kNumVals); + Byte prevs[256]; + if (orderIndices.Size() >= 256) + return S_FALSE; + int i; + for (i = 0; i < orderIndices.Size(); i++) + { + const CArcInfoEx &ai = codecs->Formats[orderIndices[i]]; + const CByteBuffer &sig = ai.StartSignature; + if (sig.GetCapacity() < kNumHashBytes) + continue; + UInt32 v = HASH_VAL(sig, 0); + prevs[i] = hash[v]; + hash[v] = (Byte)i; + } + + processedSize -= (kNumHashBytes - 1); + for (UInt32 pos = 0; pos < processedSize; pos++) + { + for (; pos < processedSize && hash[HASH_VAL(buf, pos)] == 0xFF; pos++); + if (pos == processedSize) + break; + UInt32 v = HASH_VAL(buf, pos); + Byte *ptr = &hash[v]; + int i = *ptr; + do + { + int index = orderIndices[i]; + const CArcInfoEx &ai = codecs->Formats[index]; + const CByteBuffer &sig = ai.StartSignature; + if (sig.GetCapacity() != 0 && pos + sig.GetCapacity() <= processedSize + (kNumHashBytes - 1) && + TestSignature(buf + pos, sig, sig.GetCapacity())) + { + orderIndices2.Add(index); + orderIndices[i] = 0xFF; + *ptr = prevs[i]; + } + else + ptr = &prevs[i]; + i = *ptr; + } + while (i != 0xFF); + } + + for (i = 0; i < orderIndices.Size(); i++) + { + int val = orderIndices[i]; + if (val != 0xFF) + orderIndices2.Add(val); + } + orderIndices = orderIndices2; + } + else if (extension == L"000" || extension == L"001") + { + CByteBuffer byteBuffer; + const size_t kBufferSize = (1 << 10); + byteBuffer.SetCapacity(kBufferSize); + Byte *buffer = byteBuffer; + RINOK(stream->Seek(0, STREAM_SEEK_SET, NULL)); + size_t processedSize = kBufferSize; + RINOK(ReadStream(stream, buffer, &processedSize)); + if (processedSize >= 16) + { + Byte kRarHeader[] = {0x52 , 0x61, 0x72, 0x21, 0x1a, 0x07, 0x00}; + if (TestSignature(buffer, kRarHeader, 7) && buffer[9] == 0x73 && (buffer[10] & 1) != 0) + { + for (int i = 0; i < orderIndices.Size(); i++) + { + int index = orderIndices[i]; + const CArcInfoEx &ai = codecs->Formats[index]; + if (ai.Name.CompareNoCase(L"rar") != 0) + continue; + orderIndices.Delete(i--); + orderIndices.Insert(0, index); + break; + } + } + } + } + if (orderIndices.Size() >= 2) + { + int isoIndex = codecs->FindFormatForArchiveType(L"iso"); + int udfIndex = codecs->FindFormatForArchiveType(L"udf"); + int iIso = -1; + int iUdf = -1; + for (int i = 0; i < orderIndices.Size(); i++) + { + if (orderIndices[i] == isoIndex) iIso = i; + if (orderIndices[i] == udfIndex) iUdf = i; + } + if (iUdf > iIso && iIso >= 0) + { + orderIndices[iUdf] = isoIndex; + orderIndices[iIso] = udfIndex; + } + } + + #endif + } + + for (int i = 0; i < orderIndices.Size(); i++) + { + if (stream) + { + RINOK(stream->Seek(0, STREAM_SEEK_SET, NULL)); + } + CMyComPtr archive; + + FormatIndex = orderIndices[i]; + RINOK(codecs->CreateInArchive(FormatIndex, archive)); + if (!archive) + continue; + + #ifdef EXTERNAL_CODECS + { + CMyComPtr setCompressCodecsInfo; + archive.QueryInterface(IID_ISetCompressCodecsInfo, (void **)&setCompressCodecsInfo); + if (setCompressCodecsInfo) + { + RINOK(setCompressCodecsInfo->SetCompressCodecsInfo(codecs)); + } + } + #endif + + // OutputDebugStringW(codecs->Formats[FormatIndex].Name); + + HRESULT result; + if (stream) + result = archive->Open(stream, &kMaxCheckStartPosition, callback); + else + { + CMyComPtr openSeq; + archive.QueryInterface(IID_IArchiveOpenSeq, (void **)&openSeq); + if (!openSeq) + return E_NOTIMPL; + result = openSeq->OpenSeq(seqStream); + } + + if (result == S_FALSE) + continue; + RINOK(result); + + { + NCOM::CPropVariant prop; + archive->GetArchiveProperty(kpidError, &prop); + if (prop.vt != VT_EMPTY) + ErrorMessage = (prop.vt == VT_BSTR) ? prop.bstrVal : L"Unknown error"; + } + + Archive = archive; + const CArcInfoEx &format = codecs->Formats[FormatIndex]; + if (format.Exts.Size() == 0) + DefaultName = GetDefaultName2(fileName, L"", L""); + else + { + int subExtIndex = format.FindExtension(extension); + if (subExtIndex < 0) + subExtIndex = 0; + const CArcExtInfo &extInfo = format.Exts[subExtIndex]; + DefaultName = GetDefaultName2(fileName, extInfo.Ext, extInfo.AddExt); + } + return S_OK; + } + return S_FALSE; +} + +HRESULT CArc::OpenStreamOrFile( + CCodecs *codecs, + int formatIndex, + bool stdInMode, + IInStream *stream, + IArchiveOpenCallback *callback) +{ + CMyComPtr fileStream; + CMyComPtr seqStream; + if (stdInMode) + seqStream = new CStdInFileStream; + else if (!stream) + { + CInFileStream *fileStreamSpec = new CInFileStream(true); + fileStream = fileStreamSpec; + if (!fileStreamSpec->Open(Path)) + return GetLastError(); + stream = fileStream; + } + + /* + if (callback) + { + UInt64 fileSize; + RINOK(stream->Seek(0, STREAM_SEEK_END, &fileSize)); + RINOK(callback->SetTotal(NULL, &fileSize)) + } + */ + + return OpenStream(codecs, formatIndex, stream, seqStream, callback); +} + +HRESULT CArchiveLink::Close() +{ + for (int i = Arcs.Size() - 1; i >= 0; i--) + { + RINOK(Arcs[i].Archive->Close()); + } + IsOpen = false; + return S_OK; +} + +void CArchiveLink::Release() +{ + while (!Arcs.IsEmpty()) + Arcs.DeleteBack(); +} + +HRESULT CArchiveLink::Open( + CCodecs *codecs, + const CIntVector &formatIndices, + bool stdInMode, + IInStream *stream, + const UString &filePath, + IArchiveOpenCallback *callback) +{ + Release(); + if (formatIndices.Size() >= 32) + return E_NOTIMPL; + + HRESULT resSpec; + + for (;;) + { + resSpec = S_OK; + int formatIndex = -1; + if (formatIndices.Size() >= 1) + { + if (Arcs.Size() >= formatIndices.Size()) + break; + formatIndex = formatIndices[formatIndices.Size() - Arcs.Size() - 1]; + } + else if (Arcs.Size() >= 32) + break; + + if (Arcs.IsEmpty()) + { + CArc arc; + arc.Path = filePath; + arc.SubfileIndex = (UInt32)(Int32)-1; + RINOK(arc.OpenStreamOrFile(codecs, formatIndex, stdInMode, stream, callback)); + Arcs.Add(arc); + continue; + } + + const CArc &arc = Arcs.Back(); + + resSpec = (formatIndices.Size() == 0 ? S_OK : E_NOTIMPL); + + UInt32 mainSubfile; + { + NCOM::CPropVariant prop; + RINOK(arc.Archive->GetArchiveProperty(kpidMainSubfile, &prop)); + if (prop.vt == VT_UI4) + mainSubfile = prop.ulVal; + else + break; + UInt32 numItems; + RINOK(arc.Archive->GetNumberOfItems(&numItems)); + if (mainSubfile >= numItems) + break; + } + + + CMyComPtr getStream; + if (arc.Archive->QueryInterface(IID_IInArchiveGetStream, (void **)&getStream) != S_OK || !getStream) + break; + + CMyComPtr subSeqStream; + if (getStream->GetStream(mainSubfile, &subSeqStream) != S_OK || !subSeqStream) + break; + + CMyComPtr subStream; + if (subSeqStream.QueryInterface(IID_IInStream, &subStream) != S_OK || !subStream) + break; + + CArc arc2; + RINOK(arc.GetItemPath(mainSubfile, arc2.Path)); + + CMyComPtr setSubArchiveName; + callback->QueryInterface(IID_IArchiveOpenSetSubArchiveName, (void **)&setSubArchiveName); + if (setSubArchiveName) + setSubArchiveName->SetSubArchiveName(arc2.Path); + + arc2.SubfileIndex = mainSubfile; + HRESULT result = arc2.OpenStream(codecs, formatIndex, subStream, NULL, callback); + resSpec = (formatIndices.Size() == 0 ? S_OK : S_FALSE); + if (result == S_FALSE) + break; + RINOK(result); + RINOK(arc.GetItemMTime(mainSubfile, arc2.MTime, arc2.MTimeDefined)); + Arcs.Add(arc2); + } + IsOpen = !Arcs.IsEmpty(); + return S_OK; +} + +static void SetCallback(const UString &filePath, + IOpenCallbackUI *callbackUI, + IArchiveOpenCallback *reOpenCallback, + CMyComPtr &callback) +{ + COpenCallbackImp *openCallbackSpec = new COpenCallbackImp; + callback = openCallbackSpec; + openCallbackSpec->Callback = callbackUI; + openCallbackSpec->ReOpenCallback = reOpenCallback; + + UString fullName; + int fileNamePartStartIndex; + NFile::NDirectory::MyGetFullPathName(filePath, fullName, fileNamePartStartIndex); + openCallbackSpec->Init( + fullName.Left(fileNamePartStartIndex), + fullName.Mid(fileNamePartStartIndex)); +} + +HRESULT CArchiveLink::Open2(CCodecs *codecs, + const CIntVector &formatIndices, + bool stdInMode, + IInStream *stream, + const UString &filePath, + IOpenCallbackUI *callbackUI) +{ + VolumesSize = 0; + COpenCallbackImp *openCallbackSpec = new COpenCallbackImp; + CMyComPtr callback = openCallbackSpec; + openCallbackSpec->Callback = callbackUI; + + UString fullName, prefix, name; + if (!stream && !stdInMode) + { + int fileNamePartStartIndex; + if (!NFile::NDirectory::MyGetFullPathName(filePath, fullName, fileNamePartStartIndex)) + return GetLastError(); + prefix = fullName.Left(fileNamePartStartIndex); + name = fullName.Mid(fileNamePartStartIndex); + openCallbackSpec->Init(prefix, name); + } + else + { + openCallbackSpec->SetSubArchiveName(filePath); + } + + RINOK(Open(codecs, formatIndices, stdInMode, stream, filePath, callback)); + VolumePaths.Add(prefix + name); + for (int i = 0; i < openCallbackSpec->FileNames.Size(); i++) + VolumePaths.Add(prefix + openCallbackSpec->FileNames[i]); + VolumesSize = openCallbackSpec->TotalSize; + return S_OK; +} + +HRESULT CArchiveLink::ReOpen(CCodecs *codecs, const UString &filePath, + IArchiveOpenCallback *callback) +{ + if (Arcs.Size() > 1) + return E_NOTIMPL; + + if (Arcs.Size() == 0) + return Open2(codecs, CIntVector(), false, NULL, filePath, 0); + + CMyComPtr openCallbackNew; + SetCallback(filePath, NULL, callback, openCallbackNew); + + CInFileStream *fileStreamSpec = new CInFileStream(true); + CMyComPtr stream(fileStreamSpec); + if (!fileStreamSpec->Open(filePath)) + return GetLastError(); + HRESULT res = GetArchive()->Open(stream, &kMaxCheckStartPosition, callback); + IsOpen = (res == S_OK); + return res; +} diff --git a/CPP/7zip/UI/Common/OpenArchive.h b/CPP/7zip/UI/Common/OpenArchive.h new file mode 100644 index 0000000..4a003ee --- /dev/null +++ b/CPP/7zip/UI/Common/OpenArchive.h @@ -0,0 +1,87 @@ +// OpenArchive.h + +#ifndef __OPEN_ARCHIVE_H +#define __OPEN_ARCHIVE_H + +#include "Common/MyString.h" + +#include "Windows/FileFind.h" + +#include "../../Archive/IArchive.h" + +#include "ArchiveOpenCallback.h" +#include "LoadCodecs.h" + +HRESULT GetArchiveItemBoolProp(IInArchive *archive, UInt32 index, PROPID propID, bool &result); +HRESULT IsArchiveItemFolder(IInArchive *archive, UInt32 index, bool &result); + +struct CArc +{ + CMyComPtr Archive; + UString Path; + UString DefaultName; + int FormatIndex; + int SubfileIndex; + FILETIME MTime; + bool MTimeDefined; + UString ErrorMessage; + + CArc(): MTimeDefined(false) {} + + HRESULT GetItemPath(UInt32 index, UString &result) const; + HRESULT GetItemMTime(UInt32 index, FILETIME &ft, bool &defined) const; + HRESULT IsItemAnti(UInt32 index, bool &result) const + { return GetArchiveItemBoolProp(Archive, index, kpidIsAnti, result); } + + HRESULT OpenStream( + CCodecs *codecs, + int formatIndex, + IInStream *stream, + ISequentialInStream *seqStream, + IArchiveOpenCallback *callback); + + HRESULT OpenStreamOrFile( + CCodecs *codecs, + int formatIndex, + bool stdInMode, + IInStream *stream, + IArchiveOpenCallback *callback); +}; + +struct CArchiveLink +{ + CObjectVector Arcs; + UStringVector VolumePaths; + UInt64 VolumesSize; + bool IsOpen; + + CArchiveLink(): VolumesSize(0), IsOpen(false) {} + HRESULT Close(); + void Release(); + ~CArchiveLink() { Release(); } + + IInArchive *GetArchive() const { return Arcs.Back().Archive; } + + HRESULT Open( + CCodecs *codecs, + const CIntVector &formatIndices, + bool stdInMode, + IInStream *stream, + const UString &filePath, + IArchiveOpenCallback *callback); + + HRESULT Open2( + CCodecs *codecs, + const CIntVector &formatIndices, + bool stdInMode, + IInStream *stream, + const UString &filePath, + IOpenCallbackUI *callbackUI); + + HRESULT ReOpen( + CCodecs *codecs, + const UString &filePath, + IArchiveOpenCallback *callback); +}; + +#endif diff --git a/CPP/7zip/UI/Common/PropIDUtils.cpp b/CPP/7zip/UI/Common/PropIDUtils.cpp new file mode 100644 index 0000000..dacaca5 --- /dev/null +++ b/CPP/7zip/UI/Common/PropIDUtils.cpp @@ -0,0 +1,120 @@ +// PropIDUtils.cpp + +#include "StdAfx.h" + +#include "Common/IntToString.h" + +#include "Windows/FileFind.h" +#include "Windows/PropVariantConversions.h" + +#include "../../PropID.h" + +#include "PropIDUtils.h" + +using namespace NWindows; + +void ConvertUInt32ToHex(UInt32 value, wchar_t *s) +{ + for (int i = 0; i < 8; i++) + { + int t = value & 0xF; + value >>= 4; + s[7 - i] = (wchar_t)((t < 10) ? (L'0' + t) : (L'A' + (t - 10))); + } + s[8] = L'\0'; +} + +static const char g_WinAttrib[17] = "RHS8DAdNTsrCOnE_"; +/* +0 READONLY +1 HIDDEN +3 SYSTEM + +4 DIRECTORY +5 ARCHIVE +6 DEVICE +7 NORMAL +8 TEMPORARY +9 SPARSE_FILE +10 REPARSE_POINT +11 COMPRESSED +12 OFFLINE +13 NOT_CONTENT_INDEXED +14 ENCRYPTED + +16 VIRTUAL +*/ + +static const char kPosixTypes[16] = { '0', 'p', 'c', '3', 'd', '5', 'b', '7', '-', '9', 'l', 'B', 's', 'D', 'E', 'F' }; +#define MY_ATTR_CHAR(a, n, c) ((a )& (1 << (n))) ? c : L'-'; + +UString ConvertPropertyToString(const PROPVARIANT &prop, PROPID propID, bool full) +{ + switch(propID) + { + case kpidCTime: + case kpidATime: + case kpidMTime: + { + if (prop.vt != VT_FILETIME) + break; + FILETIME localFileTime; + if ((prop.filetime.dwHighDateTime == 0 && + prop.filetime.dwLowDateTime == 0) || + !::FileTimeToLocalFileTime(&prop.filetime, &localFileTime)) + return UString(); + return ConvertFileTimeToString(localFileTime, true, full); + } + case kpidCRC: + { + if (prop.vt != VT_UI4) + break; + wchar_t temp[12]; + ConvertUInt32ToHex(prop.ulVal, temp); + return temp; + } + case kpidAttrib: + { + if (prop.vt != VT_UI4) + break; + UInt32 a = prop.ulVal; + wchar_t sz[32]; + int pos = 0; + for (int i = 0; i < 16; i++) + if (a & (1 << i) && i != 7) + sz[pos++] = g_WinAttrib[i]; + sz[pos] = '\0'; + return sz; + } + case kpidPosixAttrib: + { + if (prop.vt != VT_UI4) + break; + UString res; + UInt32 a = prop.ulVal; + wchar_t temp[16]; + + temp[0] = kPosixTypes[(a >> 12) & 0xF]; + for (int i = 6; i >= 0; i -= 3) + { + temp[7 - i] = MY_ATTR_CHAR(a, i + 2, L'r'); + temp[8 - i] = MY_ATTR_CHAR(a, i + 1, L'w'); + temp[9 - i] = MY_ATTR_CHAR(a, i + 0, L'x'); + } + if ((a & 0x800) != 0) temp[3] = ((a & (1 << 6)) ? 's' : 'S'); + if ((a & 0x400) != 0) temp[6] = ((a & (1 << 3)) ? 's' : 'S'); + if ((a & 0x200) != 0) temp[9] = ((a & (1 << 0)) ? 't' : 'T'); + temp[10] = 0; + res = temp; + + a &= ~(UInt32)0xFFFF; + if (a != 0) + { + ConvertUInt32ToHex(a, temp); + res = UString(temp) + L' ' + res; + } + return res; + } + } + return ConvertPropVariantToString(prop); +} diff --git a/CPP/7zip/UI/Common/PropIDUtils.h b/CPP/7zip/UI/Common/PropIDUtils.h new file mode 100644 index 0000000..ca14d09 --- /dev/null +++ b/CPP/7zip/UI/Common/PropIDUtils.h @@ -0,0 +1,12 @@ +// PropIDUtils.h + +#ifndef __PROPID_UTILS_H +#define __PROPID_UTILS_H + +#include "Common/MyString.h" +#include "Common/Types.h" + +void ConvertUInt32ToHex(UInt32 value, wchar_t *s); +UString ConvertPropertyToString(const PROPVARIANT &propVariant, PROPID propID, bool full = true); + +#endif diff --git a/CPP/7zip/UI/Common/Property.h b/CPP/7zip/UI/Common/Property.h new file mode 100644 index 0000000..9fd340c --- /dev/null +++ b/CPP/7zip/UI/Common/Property.h @@ -0,0 +1,14 @@ +// Property.h + +#ifndef __PROPERTY_H +#define __PROPERTY_H + +#include "Common/MyString.h" + +struct CProperty +{ + UString Name; + UString Value; +}; + +#endif diff --git a/CPP/7zip/UI/Common/SetProperties.cpp b/CPP/7zip/UI/Common/SetProperties.cpp new file mode 100644 index 0000000..4827f2a --- /dev/null +++ b/CPP/7zip/UI/Common/SetProperties.cpp @@ -0,0 +1,79 @@ +// SetProperties.cpp + +#include "StdAfx.h" + +#include "SetProperties.h" + +#include "Windows/PropVariant.h" +#include "Common/MyString.h" +#include "Common/StringToInt.h" +#include "Common/MyCom.h" + +#include "../../Archive/IArchive.h" + +using namespace NWindows; +using namespace NCOM; + +static void ParseNumberString(const UString &s, NCOM::CPropVariant &prop) +{ + const wchar_t *endPtr; + UInt64 result = ConvertStringToUInt64(s, &endPtr); + if (endPtr - (const wchar_t *)s != s.Length()) + prop = s; + else if (result <= 0xFFFFFFFF) + prop = (UInt32)result; + else + prop = result; +} + +HRESULT SetProperties(IUnknown *unknown, const CObjectVector &properties) +{ + if (properties.IsEmpty()) + return S_OK; + CMyComPtr setProperties; + unknown->QueryInterface(IID_ISetProperties, (void **)&setProperties); + if (!setProperties) + return S_OK; + + UStringVector realNames; + CPropVariant *values = new CPropVariant[properties.Size()]; + try + { + int i; + for(i = 0; i < properties.Size(); i++) + { + const CProperty &property = properties[i]; + NCOM::CPropVariant propVariant; + UString name = property.Name; + if (property.Value.IsEmpty()) + { + if (!name.IsEmpty()) + { + wchar_t c = name[name.Length() - 1]; + if (c == L'-') + propVariant = false; + else if (c == L'+') + propVariant = true; + if (propVariant.vt != VT_EMPTY) + name = name.Left(name.Length() - 1); + } + } + else + ParseNumberString(property.Value, propVariant); + realNames.Add(name); + values[i] = propVariant; + } + CRecordVector names; + for(i = 0; i < realNames.Size(); i++) + names.Add((const wchar_t *)realNames[i]); + + RINOK(setProperties->SetProperties(&names.Front(), values, names.Size())); + } + catch(...) + { + delete []values; + throw; + } + delete []values; + return S_OK; +} diff --git a/CPP/7zip/UI/Common/SetProperties.h b/CPP/7zip/UI/Common/SetProperties.h new file mode 100644 index 0000000..892f1a2 --- /dev/null +++ b/CPP/7zip/UI/Common/SetProperties.h @@ -0,0 +1,10 @@ +// SetProperties.h + +#ifndef __SETPROPERTIES_H +#define __SETPROPERTIES_H + +#include "Property.h" + +HRESULT SetProperties(IUnknown *unknown, const CObjectVector &properties); + +#endif diff --git a/CPP/7zip/UI/Common/SortUtils.cpp b/CPP/7zip/UI/Common/SortUtils.cpp new file mode 100644 index 0000000..061e777 --- /dev/null +++ b/CPP/7zip/UI/Common/SortUtils.cpp @@ -0,0 +1,22 @@ +// SortUtils.cpp + +#include "StdAfx.h" + +#include "SortUtils.h" +#include "Common/Wildcard.h" + +static int CompareStrings(const int *p1, const int *p2, void *param) +{ + const UStringVector &strings = *(const UStringVector *)param; + return CompareFileNames(strings[*p1], strings[*p2]); +} + +void SortFileNames(const UStringVector &strings, CIntVector &indices) +{ + indices.Clear(); + int numItems = strings.Size(); + indices.Reserve(numItems); + for(int i = 0; i < numItems; i++) + indices.Add(i); + indices.Sort(CompareStrings, (void *)&strings); +} diff --git a/CPP/7zip/UI/Common/SortUtils.h b/CPP/7zip/UI/Common/SortUtils.h new file mode 100644 index 0000000..e152246 --- /dev/null +++ b/CPP/7zip/UI/Common/SortUtils.h @@ -0,0 +1,10 @@ +// SortUtils.h + +#ifndef __SORTUTLS_H +#define __SORTUTLS_H + +#include "Common/MyString.h" + +void SortFileNames(const UStringVector &strings, CIntVector &indices); + +#endif diff --git a/CPP/7zip/UI/Common/TempFiles.cpp b/CPP/7zip/UI/Common/TempFiles.cpp new file mode 100644 index 0000000..eeaec18 --- /dev/null +++ b/CPP/7zip/UI/Common/TempFiles.cpp @@ -0,0 +1,22 @@ +// TempFiles.cpp + +#include "StdAfx.h" + +#include "TempFiles.h" + +#include "Windows/FileDir.h" +#include "Windows/FileIO.h" + +using namespace NWindows; +using namespace NFile; + +void CTempFiles::Clear() +{ + while(!Paths.IsEmpty()) + { + NDirectory::DeleteFileAlways((LPCWSTR)Paths.Back()); + Paths.DeleteBack(); + } +} + + diff --git a/CPP/7zip/UI/Common/TempFiles.h b/CPP/7zip/UI/Common/TempFiles.h new file mode 100644 index 0000000..eb474a7 --- /dev/null +++ b/CPP/7zip/UI/Common/TempFiles.h @@ -0,0 +1,16 @@ +// TempFiles.h + +#ifndef __TEMPFILES_H +#define __TEMPFILES_H + +#include "Common/MyString.h" + +class CTempFiles +{ + void Clear(); +public: + UStringVector Paths; + ~CTempFiles() { Clear(); } +}; + +#endif diff --git a/CPP/7zip/UI/Common/Update.cpp b/CPP/7zip/UI/Common/Update.cpp new file mode 100644 index 0000000..a5db3c1 --- /dev/null +++ b/CPP/7zip/UI/Common/Update.cpp @@ -0,0 +1,912 @@ +// Update.cpp + +#include "StdAfx.h" + +#include "Update.h" + +#include "Common/IntToString.h" +#include "Common/StringConvert.h" + +#ifdef _WIN32 +#include "Windows/DLL.h" +#endif + +#include "Windows/FileDir.h" +#include "Windows/FileFind.h" +#include "Windows/FileName.h" +#include "Windows/PropVariant.h" +#include "Windows/PropVariantConversions.h" +#include "Windows/Time.h" + +#include "../../Common/FileStreams.h" + +#include "../../Compress/CopyCoder.h" + +#include "../Common/DirItem.h" +#include "../Common/EnumDirItems.h" +#include "../Common/OpenArchive.h" +#include "../Common/UpdateProduce.h" + +#include "EnumDirItems.h" +#include "SetProperties.h" +#include "TempFiles.h" +#include "UpdateCallback.h" + +static const char *kUpdateIsNotSupoorted = + "update operations are not supported for this archive"; + +using namespace NWindows; +using namespace NCOM; +using namespace NFile; +using namespace NName; + +#ifdef _WIN32 +static const wchar_t *kTempFolderPrefix = L"7zE"; +#endif + +using namespace NUpdateArchive; + +class COutMultiVolStream: + public IOutStream, + public CMyUnknownImp +{ + int _streamIndex; // required stream + UInt64 _offsetPos; // offset from start of _streamIndex index + UInt64 _absPos; + UInt64 _length; + + struct CSubStreamInfo + { + COutFileStream *StreamSpec; + CMyComPtr Stream; + UString Name; + UInt64 Pos; + UInt64 RealSize; + }; + CObjectVector Streams; +public: + // CMyComPtr VolumeCallback; + CRecordVector Sizes; + UString Prefix; + CTempFiles *TempFiles; + + void Init() + { + _streamIndex = 0; + _offsetPos = 0; + _absPos = 0; + _length = 0; + } + + HRESULT Close(); + + MY_UNKNOWN_IMP1(IOutStream) + + STDMETHOD(Write)(const void *data, UInt32 size, UInt32 *processedSize); + STDMETHOD(Seek)(Int64 offset, UInt32 seekOrigin, UInt64 *newPosition); + STDMETHOD(SetSize)(UInt64 newSize); +}; + +// static NSynchronization::CCriticalSection g_TempPathsCS; + +HRESULT COutMultiVolStream::Close() +{ + HRESULT res = S_OK; + for (int i = 0; i < Streams.Size(); i++) + { + CSubStreamInfo &s = Streams[i]; + if (s.StreamSpec) + { + HRESULT res2 = s.StreamSpec->Close(); + if (res2 != S_OK) + res = res2; + } + } + return res; +} + +STDMETHODIMP COutMultiVolStream::Write(const void *data, UInt32 size, UInt32 *processedSize) +{ + if (processedSize != NULL) + *processedSize = 0; + while(size > 0) + { + if (_streamIndex >= Streams.Size()) + { + CSubStreamInfo subStream; + + wchar_t temp[16]; + ConvertUInt32ToString(_streamIndex + 1, temp); + UString res = temp; + while (res.Length() < 3) + res = UString(L'0') + res; + UString name = Prefix + res; + subStream.StreamSpec = new COutFileStream; + subStream.Stream = subStream.StreamSpec; + if (!subStream.StreamSpec->Create(name, false)) + return ::GetLastError(); + { + // NSynchronization::CCriticalSectionLock lock(g_TempPathsCS); + TempFiles->Paths.Add(name); + } + + subStream.Pos = 0; + subStream.RealSize = 0; + subStream.Name = name; + Streams.Add(subStream); + continue; + } + CSubStreamInfo &subStream = Streams[_streamIndex]; + + int index = _streamIndex; + if (index >= Sizes.Size()) + index = Sizes.Size() - 1; + UInt64 volSize = Sizes[index]; + + if (_offsetPos >= volSize) + { + _offsetPos -= volSize; + _streamIndex++; + continue; + } + if (_offsetPos != subStream.Pos) + { + // CMyComPtr outStream; + // RINOK(subStream.Stream.QueryInterface(IID_IOutStream, &outStream)); + RINOK(subStream.Stream->Seek(_offsetPos, STREAM_SEEK_SET, NULL)); + subStream.Pos = _offsetPos; + } + + UInt32 curSize = (UInt32)MyMin((UInt64)size, volSize - subStream.Pos); + UInt32 realProcessed; + RINOK(subStream.Stream->Write(data, curSize, &realProcessed)); + data = (void *)((Byte *)data + realProcessed); + size -= realProcessed; + subStream.Pos += realProcessed; + _offsetPos += realProcessed; + _absPos += realProcessed; + if (_absPos > _length) + _length = _absPos; + if (_offsetPos > subStream.RealSize) + subStream.RealSize = _offsetPos; + if (processedSize != NULL) + *processedSize += realProcessed; + if (subStream.Pos == volSize) + { + _streamIndex++; + _offsetPos = 0; + } + if (realProcessed == 0 && curSize != 0) + return E_FAIL; + break; + } + return S_OK; +} + +STDMETHODIMP COutMultiVolStream::Seek(Int64 offset, UInt32 seekOrigin, UInt64 *newPosition) +{ + if (seekOrigin >= 3) + return STG_E_INVALIDFUNCTION; + switch(seekOrigin) + { + case STREAM_SEEK_SET: + _absPos = offset; + break; + case STREAM_SEEK_CUR: + _absPos += offset; + break; + case STREAM_SEEK_END: + _absPos = _length + offset; + break; + } + _offsetPos = _absPos; + if (newPosition != NULL) + *newPosition = _absPos; + _streamIndex = 0; + return S_OK; +} + +STDMETHODIMP COutMultiVolStream::SetSize(UInt64 newSize) +{ + if (newSize < 0) + return E_INVALIDARG; + int i = 0; + while (i < Streams.Size()) + { + CSubStreamInfo &subStream = Streams[i++]; + if ((UInt64)newSize < subStream.RealSize) + { + RINOK(subStream.Stream->SetSize(newSize)); + subStream.RealSize = newSize; + break; + } + newSize -= subStream.RealSize; + } + while (i < Streams.Size()) + { + { + CSubStreamInfo &subStream = Streams.Back(); + subStream.Stream.Release(); + NDirectory::DeleteFileAlways(subStream.Name); + } + Streams.DeleteBack(); + } + _offsetPos = _absPos; + _streamIndex = 0; + _length = newSize; + return S_OK; +} + +static const wchar_t *kDefaultArchiveType = L"7z"; +static const wchar_t *kSFXExtension = + #ifdef _WIN32 + L"exe"; + #else + L""; + #endif + +bool CUpdateOptions::Init(const CCodecs *codecs, const CIntVector &formatIndices, const UString &arcPath) +{ + if (formatIndices.Size() > 1) + return false; + int arcTypeIndex = -1; + if (formatIndices.Size() != 0) + arcTypeIndex = formatIndices[0]; + if (arcTypeIndex >= 0) + MethodMode.FormatIndex = arcTypeIndex; + else + { + MethodMode.FormatIndex = codecs->FindFormatForArchiveName(arcPath); + // It works incorrectly for update command if archive has some non-default extension! + if (MethodMode.FormatIndex < 0) + MethodMode.FormatIndex = codecs->FindFormatForArchiveType(kDefaultArchiveType); + } + if (MethodMode.FormatIndex < 0) + return false; + const CArcInfoEx &arcInfo = codecs->Formats[MethodMode.FormatIndex]; + if (!arcInfo.UpdateEnabled) + return false; + UString typeExt = arcInfo.GetMainExt(); + UString ext = typeExt; + if (SfxMode) + ext = kSFXExtension; + ArchivePath.BaseExtension = ext; + ArchivePath.VolExtension = typeExt; + ArchivePath.ParseFromPath(arcPath); + for (int i = 0; i < Commands.Size(); i++) + { + CUpdateArchiveCommand &uc = Commands[i]; + uc.ArchivePath.BaseExtension = ext; + uc.ArchivePath.VolExtension = typeExt; + uc.ArchivePath.ParseFromPath(uc.UserArchivePath); + } + return true; +} + +/* +struct CUpdateProduceCallbackImp: public IUpdateProduceCallback +{ + const CObjectVector *_arcItems; + IUpdateCallbackUI *_callback; + + CUpdateProduceCallbackImp(const CObjectVector *a, + IUpdateCallbackUI *callback): _arcItems(a), _callback(callback) {} + virtual HRESULT ShowDeleteFile(int arcIndex); +}; + +HRESULT CUpdateProduceCallbackImp::ShowDeleteFile(int arcIndex) +{ + return _callback->ShowDeleteFile((*_arcItems)[arcIndex].Name); +} +*/ + +static HRESULT Compress( + CCodecs *codecs, + const CActionSet &actionSet, + IInArchive *archive, + const CCompressionMethodMode &compressionMethod, + CArchivePath &archivePath, + const CObjectVector &arcItems, + bool shareForWrite, + bool stdInMode, + /* const UString & stdInFileName, */ + bool stdOutMode, + const CDirItems &dirItems, + bool sfxMode, + const UString &sfxModule, + const CRecordVector &volumesSizes, + CTempFiles &tempFiles, + CUpdateErrorInfo &errorInfo, + IUpdateCallbackUI *callback) +{ + CMyComPtr outArchive; + if (archive != NULL) + { + CMyComPtr archive2 = archive; + HRESULT result = archive2.QueryInterface(IID_IOutArchive, &outArchive); + if (result != S_OK) + throw kUpdateIsNotSupoorted; + } + else + { + RINOK(codecs->CreateOutArchive(compressionMethod.FormatIndex, outArchive)); + + #ifdef EXTERNAL_CODECS + { + CMyComPtr setCompressCodecsInfo; + outArchive.QueryInterface(IID_ISetCompressCodecsInfo, (void **)&setCompressCodecsInfo); + if (setCompressCodecsInfo) + { + RINOK(setCompressCodecsInfo->SetCompressCodecsInfo(codecs)); + } + } + #endif + } + if (outArchive == 0) + throw kUpdateIsNotSupoorted; + + NFileTimeType::EEnum fileTimeType; + UInt32 value; + RINOK(outArchive->GetFileTimeType(&value)); + + switch(value) + { + case NFileTimeType::kWindows: + case NFileTimeType::kUnix: + case NFileTimeType::kDOS: + fileTimeType = (NFileTimeType::EEnum)value; + break; + default: + return E_FAIL; + } + + CRecordVector updatePairs2; + + { + CRecordVector updatePairs; + GetUpdatePairInfoList(dirItems, arcItems, fileTimeType, updatePairs); // must be done only once!!! + // CUpdateProduceCallbackImp upCallback(&arcItems, callback); + UpdateProduce(updatePairs, actionSet, updatePairs2, NULL /* &upCallback */); + } + + UInt32 numFiles = 0; + for (int i = 0; i < updatePairs2.Size(); i++) + if (updatePairs2[i].NewData) + numFiles++; + + RINOK(callback->SetNumFiles(numFiles)); + + + CArchiveUpdateCallback *updateCallbackSpec = new CArchiveUpdateCallback; + CMyComPtr updateCallback(updateCallbackSpec); + + updateCallbackSpec->ShareForWrite = shareForWrite; + updateCallbackSpec->StdInMode = stdInMode; + updateCallbackSpec->Callback = callback; + updateCallbackSpec->DirItems = &dirItems; + updateCallbackSpec->ArcItems = &arcItems; + updateCallbackSpec->UpdatePairs = &updatePairs2; + + CMyComPtr outStream; + + if (!stdOutMode) + { + UString resultPath; + int pos; + if (!NFile::NDirectory::MyGetFullPathName(archivePath.GetFinalPath(), resultPath, pos)) + throw 1417161; + NFile::NDirectory::CreateComplexDirectory(resultPath.Left(pos)); + } + + COutFileStream *outStreamSpec = NULL; + COutMultiVolStream *volStreamSpec = NULL; + + if (volumesSizes.Size() == 0) + { + if (stdOutMode) + outStream = new CStdOutFileStream; + else + { + outStreamSpec = new COutFileStream; + outStream = outStreamSpec; + bool isOK = false; + UString realPath; + for (int i = 0; i < (1 << 16); i++) + { + if (archivePath.Temp) + { + if (i > 0) + { + wchar_t s[16]; + ConvertUInt32ToString(i, s); + archivePath.TempPostfix = s; + } + realPath = archivePath.GetTempPath(); + } + else + realPath = archivePath.GetFinalPath(); + if (outStreamSpec->Create(realPath, false)) + { + tempFiles.Paths.Add(realPath); + isOK = true; + break; + } + if (::GetLastError() != ERROR_FILE_EXISTS) + break; + if (!archivePath.Temp) + break; + } + if (!isOK) + { + errorInfo.SystemError = ::GetLastError(); + errorInfo.FileName = realPath; + errorInfo.Message = L"7-Zip cannot open file"; + return E_FAIL; + } + } + } + else + { + if (stdOutMode) + return E_FAIL; + volStreamSpec = new COutMultiVolStream; + outStream = volStreamSpec; + volStreamSpec->Sizes = volumesSizes; + volStreamSpec->Prefix = archivePath.GetFinalPath() + UString(L"."); + volStreamSpec->TempFiles = &tempFiles; + volStreamSpec->Init(); + + /* + updateCallbackSpec->VolumesSizes = volumesSizes; + updateCallbackSpec->VolName = archivePath.Prefix + archivePath.Name; + if (!archivePath.VolExtension.IsEmpty()) + updateCallbackSpec->VolExt = UString(L'.') + archivePath.VolExtension; + */ + } + + RINOK(SetProperties(outArchive, compressionMethod.Properties)); + + if (sfxMode) + { + CInFileStream *sfxStreamSpec = new CInFileStream; + CMyComPtr sfxStream(sfxStreamSpec); + if (!sfxStreamSpec->Open(sfxModule)) + { + errorInfo.SystemError = ::GetLastError(); + errorInfo.Message = L"7-Zip cannot open SFX module"; + errorInfo.FileName = sfxModule; + return E_FAIL; + } + + CMyComPtr sfxOutStream; + COutFileStream *outStreamSpec = NULL; + if (volumesSizes.Size() == 0) + sfxOutStream = outStream; + else + { + outStreamSpec = new COutFileStream; + sfxOutStream = outStreamSpec; + UString realPath = archivePath.GetFinalPath(); + if (!outStreamSpec->Create(realPath, false)) + { + errorInfo.SystemError = ::GetLastError(); + errorInfo.FileName = realPath; + errorInfo.Message = L"7-Zip cannot open file"; + return E_FAIL; + } + } + RINOK(NCompress::CopyStream(sfxStream, sfxOutStream, NULL)); + if (outStreamSpec) + { + RINOK(outStreamSpec->Close()); + } + } + + HRESULT result = outArchive->UpdateItems(outStream, updatePairs2.Size(), updateCallback); + callback->Finilize(); + RINOK(result); + if (outStreamSpec) + result = outStreamSpec->Close(); + else if (volStreamSpec) + result = volStreamSpec->Close(); + return result; +} + +HRESULT EnumerateInArchiveItems(const NWildcard::CCensor &censor, + const CArc &arc, + CObjectVector &arcItems) +{ + arcItems.Clear(); + UInt32 numItems; + IInArchive *archive = arc.Archive; + RINOK(archive->GetNumberOfItems(&numItems)); + arcItems.Reserve(numItems); + for (UInt32 i = 0; i < numItems; i++) + { + CArcItem ai; + + RINOK(arc.GetItemPath(i, ai.Name)); + RINOK(IsArchiveItemFolder(archive, i, ai.IsDir)); + ai.Censored = censor.CheckPath(ai.Name, !ai.IsDir); + RINOK(arc.GetItemMTime(i, ai.MTime, ai.MTimeDefined)); + + { + CPropVariant prop; + RINOK(archive->GetProperty(i, kpidSize, &prop)); + ai.SizeDefined = (prop.vt != VT_EMPTY); + if (ai.SizeDefined) + ai.Size = ConvertPropVariantToUInt64(prop); + } + + { + CPropVariant prop; + RINOK(archive->GetProperty(i, kpidTimeType, &prop)); + if (prop.vt == VT_UI4) + { + ai.TimeType = (int)(NFileTimeType::EEnum)prop.ulVal; + switch(ai.TimeType) + { + case NFileTimeType::kWindows: + case NFileTimeType::kUnix: + case NFileTimeType::kDOS: + break; + default: + return E_FAIL; + } + } + } + + ai.IndexInServer = i; + arcItems.Add(ai); + } + return S_OK; +} + + +static HRESULT UpdateWithItemLists( + CCodecs *codecs, + CUpdateOptions &options, + IInArchive *archive, + const CObjectVector &arcItems, + CDirItems &dirItems, + CTempFiles &tempFiles, + CUpdateErrorInfo &errorInfo, + IUpdateCallbackUI2 *callback) +{ + for(int i = 0; i < options.Commands.Size(); i++) + { + CUpdateArchiveCommand &command = options.Commands[i]; + if (options.StdOutMode) + { + RINOK(callback->StartArchive(L"stdout", archive != 0)); + } + else + { + RINOK(callback->StartArchive(command.ArchivePath.GetFinalPath(), + i == 0 && options.UpdateArchiveItself && archive != 0)); + } + + RINOK(Compress( + codecs, + command.ActionSet, archive, + options.MethodMode, + command.ArchivePath, + arcItems, + options.OpenShareForWrite, + options.StdInMode, + /* options.StdInFileName, */ + options.StdOutMode, + dirItems, + options.SfxMode, options.SfxModule, + options.VolumesSizes, + tempFiles, + errorInfo, callback)); + + RINOK(callback->FinishArchive()); + } + return S_OK; +} + +#if defined(_WIN32) && !defined(UNDER_CE) +class CCurrentDirRestorer +{ + UString _path; +public: + CCurrentDirRestorer() { NFile::NDirectory::MyGetCurrentDirectory(_path); } + ~CCurrentDirRestorer() { RestoreDirectory();} + bool RestoreDirectory() { return BOOLToBool(NFile::NDirectory::MySetCurrentDirectory(_path)); } +}; +#endif + +struct CEnumDirItemUpdateCallback: public IEnumDirItemCallback +{ + IUpdateCallbackUI2 *Callback; + HRESULT ScanProgress(UInt64 numFolders, UInt64 numFiles, const wchar_t *path) + { + return Callback->ScanProgress(numFolders, numFiles, path); + } +}; + +#ifdef _WIN32 +typedef ULONG (FAR PASCAL MY_MAPISENDDOCUMENTS)( + ULONG_PTR ulUIParam, + LPSTR lpszDelimChar, + LPSTR lpszFilePaths, + LPSTR lpszFileNames, + ULONG ulReserved +); +typedef MY_MAPISENDDOCUMENTS FAR *MY_LPMAPISENDDOCUMENTS; +#endif + +HRESULT UpdateArchive( + CCodecs *codecs, + const NWildcard::CCensor &censor, + CUpdateOptions &options, + CUpdateErrorInfo &errorInfo, + IOpenCallbackUI *openCallback, + IUpdateCallbackUI2 *callback) +{ + if (options.StdOutMode && options.EMailMode) + return E_FAIL; + + if (options.VolumesSizes.Size() > 0 && (options.EMailMode || options.SfxMode)) + return E_NOTIMPL; + + if (options.SfxMode) + { + CProperty property; + property.Name = L"rsfx"; + property.Value = L"on"; + options.MethodMode.Properties.Add(property); + if (options.SfxModule.IsEmpty()) + { + errorInfo.Message = L"SFX file is not specified"; + return E_FAIL; + } + UString name = options.SfxModule; + #ifdef UNDER_CE + if (!NFind::DoesFileExist(name)) + #else + if (!NDirectory::MySearchPath(NULL, name, NULL, options.SfxModule)) + #endif + { + errorInfo.SystemError = ::GetLastError(); + errorInfo.Message = L"7-Zip cannot find specified SFX module"; + errorInfo.FileName = name; + return E_FAIL; + } + } + + + CArchiveLink arcLink; + const UString arcPath = options.ArchivePath.GetFinalPath(); + + if (!options.ArchivePath.OriginalPath.IsEmpty()) + { + NFind::CFileInfoW fi; + if (fi.Find(arcPath)) + { + if (fi.IsDir()) + throw "there is no such archive"; + if (options.VolumesSizes.Size() > 0) + return E_NOTIMPL; + CIntVector formatIndices; + if (options.MethodMode.FormatIndex >= 0) + formatIndices.Add(options.MethodMode.FormatIndex); + HRESULT result = arcLink.Open2(codecs, formatIndices, false, NULL, arcPath, openCallback); + if (result == E_ABORT) + return result; + RINOK(callback->OpenResult(arcPath, result)); + RINOK(result); + if (arcLink.VolumePaths.Size() > 1) + { + errorInfo.SystemError = (DWORD)E_NOTIMPL; + errorInfo.Message = L"Updating for multivolume archives is not implemented"; + return E_NOTIMPL; + } + + CArc &arc = arcLink.Arcs.Back(); + arc.MTimeDefined = !fi.IsDevice; + arc.MTime = fi.MTime; + } + } + else + { + /* + if (archiveType.IsEmpty()) + throw "type of archive is not specified"; + */ + } + + CDirItems dirItems; + if (options.StdInMode) + { + CDirItem di; + di.Name = options.StdInFileName; + di.Size = (UInt64)(Int64)-1; + di.Attrib = 0; + NTime::GetCurUtcFileTime(di.MTime); + di.CTime = di.ATime = di.MTime; + dirItems.Items.Add(di); + } + else + { + bool needScanning = false; + for(int i = 0; i < options.Commands.Size(); i++) + if (options.Commands[i].ActionSet.NeedScanning()) + needScanning = true; + if (needScanning) + { + CEnumDirItemUpdateCallback enumCallback; + enumCallback.Callback = callback; + RINOK(callback->StartScanning()); + UStringVector errorPaths; + CRecordVector errorCodes; + HRESULT res = EnumerateItems(censor, dirItems, &enumCallback, errorPaths, errorCodes); + for (int i = 0; i < errorPaths.Size(); i++) + { + RINOK(callback->CanNotFindError(errorPaths[i], errorCodes[i])); + } + if (res != S_OK) + { + if (res != E_ABORT) + errorInfo.Message = L"Scanning error"; + return res; + } + RINOK(callback->FinishScanning()); + } + } + + UString tempDirPrefix; + bool usesTempDir = false; + + #ifdef _WIN32 + NDirectory::CTempDirectoryW tempDirectory; + if (options.EMailMode && options.EMailRemoveAfter) + { + tempDirectory.Create(kTempFolderPrefix); + tempDirPrefix = tempDirectory.GetPath(); + NormalizeDirPathPrefix(tempDirPrefix); + usesTempDir = true; + } + #endif + + CTempFiles tempFiles; + + bool createTempFile = false; + + bool thereIsInArchive = arcLink.IsOpen; + + if (!options.StdOutMode && options.UpdateArchiveItself) + { + CArchivePath &ap = options.Commands[0].ArchivePath; + ap = options.ArchivePath; + // if ((archive != 0 && !usesTempDir) || !options.WorkingDir.IsEmpty()) + if ((thereIsInArchive || !options.WorkingDir.IsEmpty()) && !usesTempDir && options.VolumesSizes.Size() == 0) + { + createTempFile = true; + ap.Temp = true; + if (!options.WorkingDir.IsEmpty()) + { + ap.TempPrefix = options.WorkingDir; + NormalizeDirPathPrefix(ap.TempPrefix); + } + } + } + + for(int i = 0; i < options.Commands.Size(); i++) + { + CArchivePath &ap = options.Commands[i].ArchivePath; + if (usesTempDir) + { + // Check it + ap.Prefix = tempDirPrefix; + // ap.Temp = true; + // ap.TempPrefix = tempDirPrefix; + } + if (!options.StdOutMode && + (i > 0 || !createTempFile)) + { + const UString &path = ap.GetFinalPath(); + if (NFind::DoesFileOrDirExist(path)) + { + errorInfo.SystemError = 0; + errorInfo.Message = L"The file already exists"; + errorInfo.FileName = path; + return E_FAIL; + } + } + } + + CObjectVector arcItems; + if (thereIsInArchive) + { + RINOK(EnumerateInArchiveItems(censor, arcLink.Arcs.Back(), arcItems)); + } + + RINOK(UpdateWithItemLists(codecs, options, + thereIsInArchive ? arcLink.GetArchive() : 0, + arcItems, dirItems, + tempFiles, errorInfo, callback)); + + if (thereIsInArchive) + { + RINOK(arcLink.Close()); + arcLink.Release(); + } + + tempFiles.Paths.Clear(); + if (createTempFile) + { + try + { + CArchivePath &ap = options.Commands[0].ArchivePath; + const UString &tempPath = ap.GetTempPath(); + if (thereIsInArchive) + if (!NDirectory::DeleteFileAlways(arcPath)) + { + errorInfo.SystemError = ::GetLastError(); + errorInfo.Message = L"7-Zip cannot delete the file"; + errorInfo.FileName = arcPath; + return E_FAIL; + } + if (!NDirectory::MyMoveFile(tempPath, arcPath)) + { + errorInfo.SystemError = ::GetLastError(); + errorInfo.Message = L"7-Zip cannot move the file"; + errorInfo.FileName = tempPath; + errorInfo.FileName2 = arcPath; + return E_FAIL; + } + } + catch(...) + { + throw; + } + } + + #if defined(_WIN32) && !defined(UNDER_CE) + if (options.EMailMode) + { + NDLL::CLibrary mapiLib; + if (!mapiLib.Load(TEXT("Mapi32.dll"))) + { + errorInfo.SystemError = ::GetLastError(); + errorInfo.Message = L"7-Zip cannot load Mapi32.dll"; + return E_FAIL; + } + MY_LPMAPISENDDOCUMENTS fnSend = (MY_LPMAPISENDDOCUMENTS)mapiLib.GetProc("MAPISendDocuments"); + if (fnSend == 0) + { + errorInfo.SystemError = ::GetLastError(); + errorInfo.Message = L"7-Zip cannot find MAPISendDocuments function"; + return E_FAIL; + } + UStringVector fullPaths; + int i; + for(i = 0; i < options.Commands.Size(); i++) + { + CArchivePath &ap = options.Commands[i].ArchivePath; + UString arcPath; + if (!NFile::NDirectory::MyGetFullPathName(ap.GetFinalPath(), arcPath)) + { + errorInfo.SystemError = ::GetLastError(); + errorInfo.Message = L"GetFullPathName error"; + return E_FAIL; + } + fullPaths.Add(arcPath); + } + CCurrentDirRestorer curDirRestorer; + for(i = 0; i < fullPaths.Size(); i++) + { + UString arcPath = fullPaths[i]; + UString fileName = ExtractFileNameFromPath(arcPath); + AString path = GetAnsiString(arcPath); + AString name = GetAnsiString(fileName); + // Warning!!! MAPISendDocuments function changes Current directory + fnSend(0, ";", (LPSTR)(LPCSTR)path, (LPSTR)(LPCSTR)name, 0); + } + } + #endif + return S_OK; +} diff --git a/CPP/7zip/UI/Common/Update.h b/CPP/7zip/UI/Common/Update.h new file mode 100644 index 0000000..49af009 --- /dev/null +++ b/CPP/7zip/UI/Common/Update.h @@ -0,0 +1,175 @@ +// Update.h + +#ifndef __COMMON_UPDATE_H +#define __COMMON_UPDATE_H + +#include "Common/Wildcard.h" + +#include "ArchiveOpenCallback.h" +#include "LoadCodecs.h" +#include "Property.h" +#include "UpdateAction.h" +#include "UpdateCallback.h" + +struct CArchivePath +{ + UString OriginalPath; + + UString Prefix; // path(folder) prefix including slash + UString Name; // base name + UString BaseExtension; // archive type extension or "exe" extension + UString VolExtension; // archive type extension for volumes + + bool Temp; + UString TempPrefix; // path(folder) for temp location + UString TempPostfix; + + CArchivePath(): Temp(false) {}; + + void ParseFromPath(const UString &path) + { + OriginalPath = path; + + SplitPathToParts(path, Prefix, Name); + int dotPos = Name.ReverseFind(L'.'); + if (dotPos < 0) + return; + if (dotPos == Name.Length() - 1) + { + Name = Name.Left(dotPos); + BaseExtension.Empty(); + return; + } + if (BaseExtension.CompareNoCase(Name.Mid(dotPos + 1)) == 0) + { + BaseExtension = Name.Mid(dotPos + 1); + Name = Name.Left(dotPos); + } + else + BaseExtension.Empty(); + } + + UString GetPathWithoutExt() const + { + return Prefix + Name; + } + + UString GetFinalPath() const + { + UString path = GetPathWithoutExt(); + if (!BaseExtension.IsEmpty()) + path += UString(L'.') + BaseExtension; + return path; + } + + + UString GetTempPath() const + { + UString path = TempPrefix + Name; + if (!BaseExtension.IsEmpty()) + path += UString(L'.') + BaseExtension; + path += L".tmp"; + path += TempPostfix; + return path; + } +}; + +struct CUpdateArchiveCommand +{ + UString UserArchivePath; + CArchivePath ArchivePath; + NUpdateArchive::CActionSet ActionSet; +}; + +struct CCompressionMethodMode +{ + int FormatIndex; + CObjectVector Properties; + CCompressionMethodMode(): FormatIndex(-1) {} +}; + +struct CUpdateOptions +{ + CCompressionMethodMode MethodMode; + + CObjectVector Commands; + bool UpdateArchiveItself; + CArchivePath ArchivePath; + + bool SfxMode; + UString SfxModule; + + bool OpenShareForWrite; + + bool StdInMode; + UString StdInFileName; + bool StdOutMode; + + bool EMailMode; + bool EMailRemoveAfter; + UString EMailAddress; + + UString WorkingDir; + + bool Init(const CCodecs *codecs, const CIntVector &formatIndices, const UString &arcPath); + + CUpdateOptions(): + UpdateArchiveItself(true), + SfxMode(false), + StdInMode(false), + StdOutMode(false), + EMailMode(false), + EMailRemoveAfter(false), + OpenShareForWrite(false) + {}; + + void SetAddActionCommand() + { + Commands.Clear(); + CUpdateArchiveCommand c; + c.ActionSet = NUpdateArchive::kAddActionSet; + Commands.Add(c); + } + + CRecordVector VolumesSizes; +}; + +struct CErrorInfo +{ + DWORD SystemError; + UString FileName; + UString FileName2; + UString Message; + // UStringVector ErrorPaths; + // CRecordVector ErrorCodes; + CErrorInfo(): SystemError(0) {}; +}; + +struct CUpdateErrorInfo: public CErrorInfo +{ +}; + +#define INTERFACE_IUpdateCallbackUI2(x) \ + INTERFACE_IUpdateCallbackUI(x) \ + virtual HRESULT OpenResult(const wchar_t *name, HRESULT result) x; \ + virtual HRESULT StartScanning() x; \ + virtual HRESULT ScanProgress(UInt64 numFolders, UInt64 numFiles, const wchar_t *path) x; \ + virtual HRESULT CanNotFindError(const wchar_t *name, DWORD systemError) x; \ + virtual HRESULT FinishScanning() x; \ + virtual HRESULT StartArchive(const wchar_t *name, bool updating) x; \ + virtual HRESULT FinishArchive() x; \ + +struct IUpdateCallbackUI2: public IUpdateCallbackUI +{ + INTERFACE_IUpdateCallbackUI2(=0) +}; + +HRESULT UpdateArchive( + CCodecs *codecs, + const NWildcard::CCensor &censor, + CUpdateOptions &options, + CUpdateErrorInfo &errorInfo, + IOpenCallbackUI *openCallback, + IUpdateCallbackUI2 *callback); + +#endif diff --git a/CPP/7zip/UI/Common/UpdateAction.cpp b/CPP/7zip/UI/Common/UpdateAction.cpp new file mode 100644 index 0000000..879a49c --- /dev/null +++ b/CPP/7zip/UI/Common/UpdateAction.cpp @@ -0,0 +1,64 @@ +// UpdateAction.cpp + +#include "StdAfx.h" + +#include "UpdateAction.h" + +namespace NUpdateArchive { + +const CActionSet kAddActionSet = +{{ + NPairAction::kCopy, + NPairAction::kCopy, + NPairAction::kCompress, + NPairAction::kCompress, + NPairAction::kCompress, + NPairAction::kCompress, + NPairAction::kCompress +}}; + +const CActionSet kUpdateActionSet = +{{ + NPairAction::kCopy, + NPairAction::kCopy, + NPairAction::kCompress, + NPairAction::kCopy, + NPairAction::kCompress, + NPairAction::kCopy, + NPairAction::kCompress +}}; + +const CActionSet kFreshActionSet = +{{ + NPairAction::kCopy, + NPairAction::kCopy, + NPairAction::kIgnore, + NPairAction::kCopy, + NPairAction::kCompress, + NPairAction::kCopy, + NPairAction::kCompress +}}; + +const CActionSet kSynchronizeActionSet = +{{ + NPairAction::kCopy, + NPairAction::kIgnore, + NPairAction::kCompress, + NPairAction::kCopy, + NPairAction::kCompress, + NPairAction::kCopy, + NPairAction::kCompress, +}}; + +const CActionSet kDeleteActionSet = +{{ + NPairAction::kCopy, + NPairAction::kIgnore, + NPairAction::kIgnore, + NPairAction::kIgnore, + NPairAction::kIgnore, + NPairAction::kIgnore, + NPairAction::kIgnore +}}; + +} diff --git a/CPP/7zip/UI/Common/UpdateAction.h b/CPP/7zip/UI/Common/UpdateAction.h new file mode 100644 index 0000000..0ac1c10 --- /dev/null +++ b/CPP/7zip/UI/Common/UpdateAction.h @@ -0,0 +1,57 @@ +// UpdateAction.h + +#ifndef __UPDATE_ACTION_H +#define __UPDATE_ACTION_H + +namespace NUpdateArchive { + + namespace NPairState + { + const int kNumValues = 7; + enum EEnum + { + kNotMasked = 0, + kOnlyInArchive, + kOnlyOnDisk, + kNewInArchive, + kOldInArchive, + kSameFiles, + kUnknowNewerFiles + }; + } + + namespace NPairAction + { + enum EEnum + { + kIgnore = 0, + kCopy, + kCompress, + kCompressAsAnti + }; + } + + struct CActionSet + { + NPairAction::EEnum StateActions[NPairState::kNumValues]; + bool NeedScanning() const + { + int i; + for (i = 0; i < NPairState::kNumValues; i++) + if (StateActions[i] == NPairAction::kCompress) + return true; + for (i = 1; i < NPairState::kNumValues; i++) + if (StateActions[i] != NPairAction::kIgnore) + return true; + return false; + } + }; + + extern const CActionSet kAddActionSet; + extern const CActionSet kUpdateActionSet; + extern const CActionSet kFreshActionSet; + extern const CActionSet kSynchronizeActionSet; + extern const CActionSet kDeleteActionSet; +} + +#endif diff --git a/CPP/7zip/UI/Common/UpdateCallback.cpp b/CPP/7zip/UI/Common/UpdateCallback.cpp new file mode 100644 index 0000000..0f22905 --- /dev/null +++ b/CPP/7zip/UI/Common/UpdateCallback.cpp @@ -0,0 +1,249 @@ +// UpdateCallback.cpp + +#include "StdAfx.h" + +#include "Common/ComTry.h" +#include "Common/Defs.h" +#include "Common/IntToString.h" +#include "Common/StringConvert.h" + +#include "Windows/PropVariant.h" + +#include "../../Common/FileStreams.h" + +#include "UpdateCallback.h" + +using namespace NWindows; + +CArchiveUpdateCallback::CArchiveUpdateCallback(): + Callback(0), + ShareForWrite(false), + StdInMode(false), + DirItems(0), + ArcItems(0), + UpdatePairs(0), + NewNames(0) + {} + + +STDMETHODIMP CArchiveUpdateCallback::SetTotal(UInt64 size) +{ + COM_TRY_BEGIN + return Callback->SetTotal(size); + COM_TRY_END +} + +STDMETHODIMP CArchiveUpdateCallback::SetCompleted(const UInt64 *completeValue) +{ + COM_TRY_BEGIN + return Callback->SetCompleted(completeValue); + COM_TRY_END +} + +STDMETHODIMP CArchiveUpdateCallback::SetRatioInfo(const UInt64 *inSize, const UInt64 *outSize) +{ + COM_TRY_BEGIN + return Callback->SetRatioInfo(inSize, outSize); + COM_TRY_END +} + + +/* +STATPROPSTG kProperties[] = +{ + { NULL, kpidPath, VT_BSTR}, + { NULL, kpidIsDir, VT_BOOL}, + { NULL, kpidSize, VT_UI8}, + { NULL, kpidCTime, VT_FILETIME}, + { NULL, kpidATime, VT_FILETIME}, + { NULL, kpidMTime, VT_FILETIME}, + { NULL, kpidAttrib, VT_UI4}, + { NULL, kpidIsAnti, VT_BOOL} +}; + +STDMETHODIMP CArchiveUpdateCallback::EnumProperties(IEnumSTATPROPSTG **) +{ + return CStatPropEnumerator::CreateEnumerator(kProperties, sizeof(kProperties) / sizeof(kProperties[0]), enumerator); +} +*/ + +STDMETHODIMP CArchiveUpdateCallback::GetUpdateItemInfo(UInt32 index, + Int32 *newData, Int32 *newProps, UInt32 *indexInArchive) +{ + COM_TRY_BEGIN + RINOK(Callback->CheckBreak()); + const CUpdatePair2 &up = (*UpdatePairs)[index]; + if (newData != NULL) *newData = BoolToInt(up.NewData); + if (newProps != NULL) *newProps = BoolToInt(up.NewProps); + if (indexInArchive != NULL) + { + *indexInArchive = (UInt32)-1; + if (up.ExistInArchive()) + *indexInArchive = (ArcItems == 0) ? up.ArcIndex : (*ArcItems)[up.ArcIndex].IndexInServer; + } + return S_OK; + COM_TRY_END +} + +STDMETHODIMP CArchiveUpdateCallback::GetProperty(UInt32 index, PROPID propID, PROPVARIANT *value) +{ + COM_TRY_BEGIN + const CUpdatePair2 &up = (*UpdatePairs)[index]; + NWindows::NCOM::CPropVariant prop; + + if (propID == kpidIsAnti) + { + prop = up.IsAnti; + prop.Detach(value); + return S_OK; + } + + if (up.IsAnti) + { + switch(propID) + { + case kpidIsDir: + case kpidPath: + break; + case kpidSize: + prop = (UInt64)0; + prop.Detach(value); + return S_OK; + default: + prop.Detach(value); + return S_OK; + } + } + + if (up.ExistOnDisk()) + { + const CDirItem &di = DirItems->Items[up.DirIndex]; + switch(propID) + { + case kpidPath: prop = DirItems->GetLogPath(up.DirIndex); break; + case kpidIsDir: prop = di.IsDir(); break; + case kpidSize: prop = di.Size; break; + case kpidAttrib: prop = di.Attrib; break; + case kpidCTime: prop = di.CTime; break; + case kpidATime: prop = di.ATime; break; + case kpidMTime: prop = di.MTime; break; + } + } + else + { + if (propID == kpidPath) + { + if (up.NewNameIndex >= 0) + { + prop = (*NewNames)[up.NewNameIndex]; + prop.Detach(value); + return S_OK; + } + } + if (up.ExistInArchive() && Archive) + { + UInt32 indexInArchive; + if (ArcItems == 0) + indexInArchive = up.ArcIndex; + else + indexInArchive = (*ArcItems)[up.ArcIndex].IndexInServer; + return Archive->GetProperty(indexInArchive, propID, value); + } + } + prop.Detach(value); + return S_OK; + COM_TRY_END +} + +STDMETHODIMP CArchiveUpdateCallback::GetStream(UInt32 index, ISequentialInStream **inStream) +{ + COM_TRY_BEGIN + const CUpdatePair2 &up = (*UpdatePairs)[index]; + if (!up.NewData) + return E_FAIL; + + RINOK(Callback->CheckBreak()); + RINOK(Callback->Finilize()); + + if (up.IsAnti) + { + return Callback->GetStream((*ArcItems)[up.ArcIndex].Name, true); + } + const CDirItem &di = DirItems->Items[up.DirIndex]; + RINOK(Callback->GetStream(DirItems->GetLogPath(up.DirIndex), false)); + + if (di.IsDir()) + return S_OK; + + if (StdInMode) + { + CStdInFileStream *inStreamSpec = new CStdInFileStream; + CMyComPtr inStreamLoc(inStreamSpec); + *inStream = inStreamLoc.Detach(); + } + else + { + CInFileStream *inStreamSpec = new CInFileStream; + CMyComPtr inStreamLoc(inStreamSpec); + const UString path = DirItems->GetPhyPath(up.DirIndex); + if (!inStreamSpec->OpenShared(path, ShareForWrite)) + { + return Callback->OpenFileError(path, ::GetLastError()); + } + *inStream = inStreamLoc.Detach(); + } + return S_OK; + COM_TRY_END +} + +STDMETHODIMP CArchiveUpdateCallback::SetOperationResult(Int32 operationResult) +{ + COM_TRY_BEGIN + return Callback->SetOperationResult(operationResult); + COM_TRY_END +} + +STDMETHODIMP CArchiveUpdateCallback::GetVolumeSize(UInt32 index, UInt64 *size) +{ + if (VolumesSizes.Size() == 0) + return S_FALSE; + if (index >= (UInt32)VolumesSizes.Size()) + index = VolumesSizes.Size() - 1; + *size = VolumesSizes[index]; + return S_OK; +} + +STDMETHODIMP CArchiveUpdateCallback::GetVolumeStream(UInt32 index, ISequentialOutStream **volumeStream) +{ + COM_TRY_BEGIN + wchar_t temp[16]; + ConvertUInt32ToString(index + 1, temp); + UString res = temp; + while (res.Length() < 2) + res = UString(L'0') + res; + UString fileName = VolName; + fileName += L'.'; + fileName += res; + fileName += VolExt; + COutFileStream *streamSpec = new COutFileStream; + CMyComPtr streamLoc(streamSpec); + if (!streamSpec->Create(fileName, false)) + return ::GetLastError(); + *volumeStream = streamLoc.Detach(); + return S_OK; + COM_TRY_END +} + +STDMETHODIMP CArchiveUpdateCallback::CryptoGetTextPassword2(Int32 *passwordIsDefined, BSTR *password) +{ + COM_TRY_BEGIN + return Callback->CryptoGetTextPassword2(passwordIsDefined, password); + COM_TRY_END +} + +STDMETHODIMP CArchiveUpdateCallback::CryptoGetTextPassword(BSTR *password) +{ + COM_TRY_BEGIN + return Callback->CryptoGetTextPassword(password); + COM_TRY_END +} diff --git a/CPP/7zip/UI/Common/UpdateCallback.h b/CPP/7zip/UI/Common/UpdateCallback.h new file mode 100644 index 0000000..9a20c31 --- /dev/null +++ b/CPP/7zip/UI/Common/UpdateCallback.h @@ -0,0 +1,74 @@ +// UpdateCallback.h + +#ifndef __UPDATECALLBACK_H +#define __UPDATECALLBACK_H + +#include "Common/MyCom.h" +#include "Common/MyString.h" + +#include "../../IPassword.h" +#include "../../ICoder.h" + +#include "../Common/UpdatePair.h" +#include "../Common/UpdateProduce.h" + +#define INTERFACE_IUpdateCallbackUI(x) \ + virtual HRESULT SetTotal(UInt64 size) x; \ + virtual HRESULT SetCompleted(const UInt64 *completeValue) x; \ + virtual HRESULT SetRatioInfo(const UInt64 *inSize, const UInt64 *outSize) x; \ + virtual HRESULT CheckBreak() x; \ + virtual HRESULT Finilize() x; \ + virtual HRESULT SetNumFiles(UInt64 numFiles) x; \ + virtual HRESULT GetStream(const wchar_t *name, bool isAnti) x; \ + virtual HRESULT OpenFileError(const wchar_t *name, DWORD systemError) x; \ + virtual HRESULT SetOperationResult(Int32 operationResult) x; \ + virtual HRESULT CryptoGetTextPassword2(Int32 *passwordIsDefined, BSTR *password) x; \ + virtual HRESULT CryptoGetTextPassword(BSTR *password) x; \ + /* virtual HRESULT ShowDeleteFile(const wchar_t *name) x; */ \ + /* virtual HRESULT CloseProgress() { return S_OK; }; */ + +struct IUpdateCallbackUI +{ + INTERFACE_IUpdateCallbackUI(=0) +}; + +class CArchiveUpdateCallback: + public IArchiveUpdateCallback2, + public ICryptoGetTextPassword2, + public ICryptoGetTextPassword, + public ICompressProgressInfo, + public CMyUnknownImp +{ +public: + MY_UNKNOWN_IMP4( + IArchiveUpdateCallback2, + ICryptoGetTextPassword2, + ICryptoGetTextPassword, + ICompressProgressInfo) + + STDMETHOD(SetRatioInfo)(const UInt64 *inSize, const UInt64 *outSize); + + INTERFACE_IArchiveUpdateCallback2(;) + + STDMETHOD(CryptoGetTextPassword2)(Int32 *passwordIsDefined, BSTR *password); + STDMETHOD(CryptoGetTextPassword)(BSTR *password); + +public: + CRecordVector VolumesSizes; + UString VolName; + UString VolExt; + + IUpdateCallbackUI *Callback; + + bool ShareForWrite; + bool StdInMode; + const CDirItems *DirItems; + const CObjectVector *ArcItems; + const CRecordVector *UpdatePairs; + const UStringVector *NewNames; + CMyComPtr Archive; + + CArchiveUpdateCallback(); +}; + +#endif diff --git a/CPP/7zip/UI/Common/UpdatePair.cpp b/CPP/7zip/UI/Common/UpdatePair.cpp new file mode 100644 index 0000000..a43a9e7 --- /dev/null +++ b/CPP/7zip/UI/Common/UpdatePair.cpp @@ -0,0 +1,158 @@ +// UpdatePair.cpp + +#include "StdAfx.h" + +#include + +#include "Common/Defs.h" +#include "Common/Wildcard.h" + +#include "Windows/Time.h" + +#include "SortUtils.h" +#include "UpdatePair.h" + +using namespace NWindows; +using namespace NTime; + +static int MyCompareTime(NFileTimeType::EEnum fileTimeType, const FILETIME &time1, const FILETIME &time2) +{ + switch(fileTimeType) + { + case NFileTimeType::kWindows: + return ::CompareFileTime(&time1, &time2); + case NFileTimeType::kUnix: + { + UInt32 unixTime1, unixTime2; + FileTimeToUnixTime(time1, unixTime1); + FileTimeToUnixTime(time2, unixTime2); + return MyCompare(unixTime1, unixTime2); + } + case NFileTimeType::kDOS: + { + UInt32 dosTime1, dosTime2; + FileTimeToDosTime(time1, dosTime1); + FileTimeToDosTime(time2, dosTime2); + return MyCompare(dosTime1, dosTime2); + } + } + throw 4191618; +} + +static const wchar_t *kDuplicateFileNameMessage = L"Duplicate filename:"; +static const wchar_t *kNotCensoredCollisionMessaged = L"Internal file name collision (file on disk, file in archive):"; + +static void ThrowError(const UString &message, const UString &s1, const UString &s2) +{ + UString m = message; + m += L'\n'; + m += s1; + m += L'\n'; + m += s2; + throw m; +} + +static void TestDuplicateString(const UStringVector &strings, const CIntVector &indices) +{ + for(int i = 0; i + 1 < indices.Size(); i++) + if (CompareFileNames(strings[indices[i]], strings[indices[i + 1]]) == 0) + ThrowError(kDuplicateFileNameMessage, strings[indices[i]], strings[indices[i + 1]]); +} + +void GetUpdatePairInfoList( + const CDirItems &dirItems, + const CObjectVector &arcItems, + NFileTimeType::EEnum fileTimeType, + CRecordVector &updatePairs) +{ + CIntVector dirIndices, arcIndices; + + int numDirItems = dirItems.Items.Size(); + int numArcItems = arcItems.Size(); + + + { + UStringVector arcNames; + arcNames.Reserve(numArcItems); + for (int i = 0; i < numArcItems; i++) + arcNames.Add(arcItems[i].Name); + SortFileNames(arcNames, arcIndices); + TestDuplicateString(arcNames, arcIndices); + } + + UStringVector dirNames; + { + dirNames.Reserve(numDirItems); + for (int i = 0; i < numDirItems; i++) + dirNames.Add(dirItems.GetLogPath(i)); + SortFileNames(dirNames, dirIndices); + TestDuplicateString(dirNames, dirIndices); + } + + int dirIndex = 0, arcIndex = 0; + while (dirIndex < numDirItems && arcIndex < numArcItems) + { + CUpdatePair pair; + int dirIndex2 = dirIndices[dirIndex]; + int arcIndex2 = arcIndices[arcIndex]; + const CDirItem &di = dirItems.Items[dirIndex2]; + const CArcItem &ai = arcItems[arcIndex2]; + int compareResult = CompareFileNames(dirNames[dirIndex2], ai.Name); + if (compareResult < 0) + { + pair.State = NUpdateArchive::NPairState::kOnlyOnDisk; + pair.DirIndex = dirIndex2; + dirIndex++; + } + else if (compareResult > 0) + { + pair.State = ai.Censored ? + NUpdateArchive::NPairState::kOnlyInArchive: + NUpdateArchive::NPairState::kNotMasked; + pair.ArcIndex = arcIndex2; + arcIndex++; + } + else + { + if (!ai.Censored) + ThrowError(kNotCensoredCollisionMessaged, dirNames[dirIndex2], ai.Name); + pair.DirIndex = dirIndex2; + pair.ArcIndex = arcIndex2; + switch (ai.MTimeDefined ? MyCompareTime( + ai.TimeType != - 1 ? (NFileTimeType::EEnum)ai.TimeType : fileTimeType, + di.MTime, ai.MTime): 0) + { + case -1: pair.State = NUpdateArchive::NPairState::kNewInArchive; break; + case 1: pair.State = NUpdateArchive::NPairState::kOldInArchive; break; + default: + pair.State = (ai.SizeDefined && di.Size == ai.Size) ? + NUpdateArchive::NPairState::kSameFiles : + NUpdateArchive::NPairState::kUnknowNewerFiles; + } + dirIndex++; + arcIndex++; + } + updatePairs.Add(pair); + } + + for (; dirIndex < numDirItems; dirIndex++) + { + CUpdatePair pair; + pair.State = NUpdateArchive::NPairState::kOnlyOnDisk; + pair.DirIndex = dirIndices[dirIndex]; + updatePairs.Add(pair); + } + + for (; arcIndex < numArcItems; arcIndex++) + { + CUpdatePair pair; + int arcIndex2 = arcIndices[arcIndex]; + pair.State = arcItems[arcIndex2].Censored ? + NUpdateArchive::NPairState::kOnlyInArchive: + NUpdateArchive::NPairState::kNotMasked; + pair.ArcIndex = arcIndex2; + updatePairs.Add(pair); + } + + updatePairs.ReserveDown(); +} diff --git a/CPP/7zip/UI/Common/UpdatePair.h b/CPP/7zip/UI/Common/UpdatePair.h new file mode 100644 index 0000000..3a33264 --- /dev/null +++ b/CPP/7zip/UI/Common/UpdatePair.h @@ -0,0 +1,25 @@ +// UpdatePair.h + +#ifndef __UPDATE_PAIR_H +#define __UPDATE_PAIR_H + +#include "DirItem.h" +#include "UpdateAction.h" + +#include "../../Archive/IArchive.h" + +struct CUpdatePair +{ + NUpdateArchive::NPairState::EEnum State; + int ArcIndex; + int DirIndex; + CUpdatePair(): ArcIndex(-1), DirIndex(-1) {} +}; + +void GetUpdatePairInfoList( + const CDirItems &dirItems, + const CObjectVector &arcItems, + NFileTimeType::EEnum fileTimeType, + CRecordVector &updatePairs); + +#endif diff --git a/CPP/7zip/UI/Common/UpdateProduce.cpp b/CPP/7zip/UI/Common/UpdateProduce.cpp new file mode 100644 index 0000000..c21db3b --- /dev/null +++ b/CPP/7zip/UI/Common/UpdateProduce.cpp @@ -0,0 +1,58 @@ +// UpdateProduce.cpp + +#include "StdAfx.h" + +#include "UpdateProduce.h" + +using namespace NUpdateArchive; + +static const char *kUpdateActionSetCollision = "Internal collision in update action set"; + +void UpdateProduce( + const CRecordVector &updatePairs, + const CActionSet &actionSet, + CRecordVector &operationChain, + IUpdateProduceCallback *callback) +{ + for (int i = 0; i < updatePairs.Size(); i++) + { + const CUpdatePair &pair = updatePairs[i]; + + CUpdatePair2 up2; + up2.IsAnti = false; + up2.DirIndex = pair.DirIndex; + up2.ArcIndex = pair.ArcIndex; + up2.NewData = up2.NewProps = true; + + switch(actionSet.StateActions[pair.State]) + { + case NPairAction::kIgnore: + /* + if (pair.State != NPairState::kOnlyOnDisk) + IgnoreArchiveItem(m_ArchiveItems[pair.ArcIndex]); + // cout << "deleting"; + */ + if (callback) + callback->ShowDeleteFile(pair.ArcIndex); + continue; + + case NPairAction::kCopy: + if (pair.State == NPairState::kOnlyOnDisk) + throw kUpdateActionSetCollision; + up2.NewData = up2.NewProps = false; + break; + + case NPairAction::kCompress: + if (pair.State == NPairState::kOnlyInArchive || + pair.State == NPairState::kNotMasked) + throw kUpdateActionSetCollision; + break; + + case NPairAction::kCompressAsAnti: + up2.IsAnti = true; + break; + } + operationChain.Add(up2); + } + operationChain.ReserveDown(); +} diff --git a/CPP/7zip/UI/Common/UpdateProduce.h b/CPP/7zip/UI/Common/UpdateProduce.h new file mode 100644 index 0000000..e18648c --- /dev/null +++ b/CPP/7zip/UI/Common/UpdateProduce.h @@ -0,0 +1,35 @@ +// UpdateProduce.h + +#ifndef __UPDATE_PRODUCE_H +#define __UPDATE_PRODUCE_H + +#include "UpdatePair.h" + +struct CUpdatePair2 +{ + bool NewData; + bool NewProps; + bool IsAnti; + + int DirIndex; + int ArcIndex; + int NewNameIndex; + + bool ExistOnDisk() const { return DirIndex != -1; } + bool ExistInArchive() const { return ArcIndex != -1; } + + CUpdatePair2(): IsAnti(false), DirIndex(-1), ArcIndex(-1), NewNameIndex(-1) {} +}; + +struct IUpdateProduceCallback +{ + virtual HRESULT ShowDeleteFile(int arcIndex) = 0; +}; + +void UpdateProduce( + const CRecordVector &updatePairs, + const NUpdateArchive::CActionSet &actionSet, + CRecordVector &operationChain, + IUpdateProduceCallback *callback); + +#endif diff --git a/CPP/7zip/UI/Common/WorkDir.cpp b/CPP/7zip/UI/Common/WorkDir.cpp new file mode 100644 index 0000000..28d36df --- /dev/null +++ b/CPP/7zip/UI/Common/WorkDir.cpp @@ -0,0 +1,59 @@ +// WorkDir.cpp + +#include "StdAfx.h" + +#include "Common/StringConvert.h" +#include "Common/Wildcard.h" + +#include "Windows/FileDir.h" +#include "Windows/FileName.h" + +#include "WorkDir.h" + +using namespace NWindows; +using namespace NFile; + +UString GetWorkDir(const NWorkDir::CInfo &workDirInfo, const UString &path) +{ + NWorkDir::NMode::EEnum mode = workDirInfo.Mode; + #if !defined(UNDER_CE) && defined(_WIN32) + if (workDirInfo.ForRemovableOnly) + { + mode = NWorkDir::NMode::kCurrent; + UString prefix = path.Left(3); + if (prefix[1] == L':' && prefix[2] == L'\\') + { + UINT driveType = GetDriveType(GetSystemString(prefix, ::AreFileApisANSI() ? CP_ACP : CP_OEMCP)); + if (driveType == DRIVE_CDROM || driveType == DRIVE_REMOVABLE) + mode = workDirInfo.Mode; + } + /* + CParsedPath parsedPath; + parsedPath.ParsePath(archiveName); + UINT driveType = GetDriveType(parsedPath.Prefix); + if ((driveType != DRIVE_CDROM) && (driveType != DRIVE_REMOVABLE)) + mode = NZipSettings::NWorkDir::NMode::kCurrent; + */ + } + #endif + switch(mode) + { + case NWorkDir::NMode::kCurrent: + { + return ExtractDirPrefixFromPath(path); + } + case NWorkDir::NMode::kSpecified: + { + UString tempDir = workDirInfo.Path; + NName::NormalizeDirPathPrefix(tempDir); + return tempDir; + } + default: + { + UString tempDir; + if (!NDirectory::MyGetTempPath(tempDir)) + throw 141717; + return tempDir; + } + } +} diff --git a/CPP/7zip/UI/Common/WorkDir.h b/CPP/7zip/UI/Common/WorkDir.h new file mode 100644 index 0000000..0643d67 --- /dev/null +++ b/CPP/7zip/UI/Common/WorkDir.h @@ -0,0 +1,10 @@ +// WorkDir.h + +#ifndef __WORKDIR_H +#define __WORKDIR_H + +#include "ZipRegistry.h" + +UString GetWorkDir(const NWorkDir::CInfo &workDirInfo, const UString &path); + +#endif diff --git a/CPP/7zip/UI/Common/ZipRegistry.cpp b/CPP/7zip/UI/Common/ZipRegistry.cpp new file mode 100644 index 0000000..ac17807 --- /dev/null +++ b/CPP/7zip/UI/Common/ZipRegistry.cpp @@ -0,0 +1,293 @@ +// ZipRegistry.cpp + +#include "StdAfx.h" + +#include "Common/IntToString.h" +#include "Common/StringConvert.h" + +#include "Windows/FileDir.h" +#include "Windows/Registry.h" +#include "Windows/Synchronization.h" + +#include "ZipRegistry.h" + +using namespace NWindows; +using namespace NRegistry; + +static NSynchronization::CCriticalSection g_CS; +#define CS_LOCK NSynchronization::CCriticalSectionLock lock(g_CS); + +static const TCHAR *kCuPrefix = TEXT("Software") TEXT(STRING_PATH_SEPARATOR) TEXT("7-Zip") TEXT(STRING_PATH_SEPARATOR); + +static CSysString GetKeyPath(const CSysString &path) { return kCuPrefix + path; } + +static LONG OpenMainKey(CKey &key, LPCTSTR keyName) +{ + return key.Open(HKEY_CURRENT_USER, GetKeyPath(keyName), KEY_READ); +} + +static LONG CreateMainKey(CKey &key, LPCTSTR keyName) +{ + return key.Create(HKEY_CURRENT_USER, GetKeyPath(keyName)); +} + +namespace NExtract +{ + +static const TCHAR *kKeyName = TEXT("Extraction"); + +static const TCHAR *kExtractMode = TEXT("ExtractMode"); +static const TCHAR *kOverwriteMode = TEXT("OverwriteMode"); +static const TCHAR *kShowPassword = TEXT("ShowPassword"); +static const TCHAR *kPathHistory = TEXT("PathHistory"); + +void CInfo::Save() const +{ + CS_LOCK + CKey key; + CreateMainKey(key, kKeyName); + key.SetValue(kExtractMode, (UInt32)PathMode); + key.SetValue(kOverwriteMode, (UInt32)OverwriteMode); + key.SetValue(kShowPassword, ShowPassword); + key.RecurseDeleteKey(kPathHistory); + key.SetValue_Strings(kPathHistory, Paths); +} + + +void CInfo::Load() +{ + PathMode = NPathMode::kCurrentPathnames; + OverwriteMode = NOverwriteMode::kAskBefore; + ShowPassword = false; + Paths.Clear(); + + CS_LOCK + CKey key; + if (OpenMainKey(key, kKeyName) != ERROR_SUCCESS) + return; + + key.GetValue_Strings(kPathHistory, Paths); + UInt32 v; + if (key.QueryValue(kExtractMode, v) == ERROR_SUCCESS && v <= NPathMode::kNoPathnames) + PathMode = (NPathMode::EEnum)v; + if (key.QueryValue(kOverwriteMode, v) == ERROR_SUCCESS && v <= NOverwriteMode::kAutoRenameExisting) + OverwriteMode = (NOverwriteMode::EEnum)v; + key.GetValue_IfOk(kShowPassword, ShowPassword); +} + +} + +namespace NCompression +{ + +static const TCHAR *kKeyName = TEXT("Compression"); + +static const TCHAR *kArcHistory = TEXT("ArcHistory"); +static const WCHAR *kArchiver = L"Archiver"; +static const TCHAR *kShowPassword = TEXT("ShowPassword"); +static const TCHAR *kEncryptHeaders = TEXT("EncryptHeaders"); + +static const TCHAR *kOptionsKeyName = TEXT("Options"); + +static const TCHAR *kLevel = TEXT("Level"); +static const TCHAR *kDictionary = TEXT("Dictionary"); +static const TCHAR *kOrder = TEXT("Order"); +static const TCHAR *kBlockSize = TEXT("BlockSize"); +static const TCHAR *kNumThreads = TEXT("NumThreads"); +static const WCHAR *kMethod = L"Method"; +static const WCHAR *kOptions = L"Options"; +static const WCHAR *kEncryptionMethod = L"EncryptionMethod"; + +static void SetRegString(CKey &key, const WCHAR *name, const UString &value) +{ + if (value.IsEmpty()) + key.DeleteValue(name); + else + key.SetValue(name, value); +} + +static void SetRegUInt32(CKey &key, const TCHAR *name, UInt32 value) +{ + if (value == (UInt32)-1) + key.DeleteValue(name); + else + key.SetValue(name, value); +} + +static void GetRegString(CKey &key, const WCHAR *name, UString &value) +{ + if (key.QueryValue(name, value) != ERROR_SUCCESS) + value.Empty(); +} + +static void GetRegUInt32(CKey &key, const TCHAR *name, UInt32 &value) +{ + if (key.QueryValue(name, value) != ERROR_SUCCESS) + value = (UInt32)-1; +} + +void CInfo::Save() const +{ + CS_LOCK + + CKey key; + CreateMainKey(key, kKeyName); + key.SetValue(kLevel, (UInt32)Level); + key.SetValue(kArchiver, ArcType); + key.SetValue(kShowPassword, ShowPassword); + key.SetValue(kEncryptHeaders, EncryptHeaders); + key.RecurseDeleteKey(kArcHistory); + key.SetValue_Strings(kArcHistory, ArcPaths); + + key.RecurseDeleteKey(kOptionsKeyName); + { + CKey optionsKey; + optionsKey.Create(key, kOptionsKeyName); + for (int i = 0; i < Formats.Size(); i++) + { + const CFormatOptions &fo = Formats[i]; + CKey fk; + fk.Create(optionsKey, fo.FormatID); + + SetRegUInt32(fk, kLevel, fo.Level); + SetRegUInt32(fk, kDictionary, fo.Dictionary); + SetRegUInt32(fk, kOrder, fo.Order); + SetRegUInt32(fk, kBlockSize, fo.BlockLogSize); + SetRegUInt32(fk, kNumThreads, fo.NumThreads); + + SetRegString(fk, kMethod, fo.Method); + SetRegString(fk, kOptions, fo.Options); + SetRegString(fk, kEncryptionMethod, fo.EncryptionMethod); + } + } +} + +void CInfo::Load() +{ + ArcPaths.Clear(); + Formats.Clear(); + + Level = 5; + ArcType = L"7z"; + ShowPassword = false; + EncryptHeaders = false; + + CS_LOCK + CKey key; + + if (OpenMainKey(key, kKeyName) != ERROR_SUCCESS) + return; + + key.GetValue_Strings(kArcHistory, ArcPaths); + + { + CKey optionsKey; + if (optionsKey.Open(key, kOptionsKeyName, KEY_READ) == ERROR_SUCCESS) + { + CSysStringVector formatIDs; + optionsKey.EnumKeys(formatIDs); + for (int i = 0; i < formatIDs.Size(); i++) + { + CKey fk; + CFormatOptions fo; + fo.FormatID = formatIDs[i]; + if (fk.Open(optionsKey, fo.FormatID, KEY_READ) == ERROR_SUCCESS) + { + GetRegString(fk, kOptions, fo.Options); + GetRegString(fk, kMethod, fo.Method); + GetRegString(fk, kEncryptionMethod, fo.EncryptionMethod); + + GetRegUInt32(fk, kLevel, fo.Level); + GetRegUInt32(fk, kDictionary, fo.Dictionary); + GetRegUInt32(fk, kOrder, fo.Order); + GetRegUInt32(fk, kBlockSize, fo.BlockLogSize); + GetRegUInt32(fk, kNumThreads, fo.NumThreads); + + Formats.Add(fo); + } + } + } + } + + UString a; + if (key.QueryValue(kArchiver, a) == ERROR_SUCCESS) + ArcType = a; + key.GetValue_IfOk(kLevel, Level); + key.GetValue_IfOk(kShowPassword, ShowPassword); + key.GetValue_IfOk(kEncryptHeaders, EncryptHeaders); +} + +} + +static const TCHAR *kOptionsInfoKeyName = TEXT("Options"); + +namespace NWorkDir +{ +static const TCHAR *kWorkDirType = TEXT("WorkDirType"); +static const WCHAR *kWorkDirPath = L"WorkDirPath"; +static const TCHAR *kTempRemovableOnly = TEXT("TempRemovableOnly"); + + +void CInfo::Save()const +{ + CS_LOCK + CKey key; + CreateMainKey(key, kOptionsInfoKeyName); + key.SetValue(kWorkDirType, (UInt32)Mode); + key.SetValue(kWorkDirPath, Path); + key.SetValue(kTempRemovableOnly, ForRemovableOnly); +} + +void CInfo::Load() +{ + SetDefault(); + + CS_LOCK + CKey key; + if (OpenMainKey(key, kOptionsInfoKeyName) != ERROR_SUCCESS) + return; + + UInt32 dirType; + if (key.QueryValue(kWorkDirType, dirType) != ERROR_SUCCESS) + return; + switch (dirType) + { + case NMode::kSystem: + case NMode::kCurrent: + case NMode::kSpecified: + Mode = (NMode::EEnum)dirType; + } + if (key.QueryValue(kWorkDirPath, Path) != ERROR_SUCCESS) + { + Path.Empty(); + if (Mode == NMode::kSpecified) + Mode = NMode::kSystem; + } + key.GetValue_IfOk(kTempRemovableOnly, ForRemovableOnly); +} + +} + +static const TCHAR *kCascadedMenu = TEXT("CascadedMenu"); +static const TCHAR *kContextMenu = TEXT("ContextMenu"); + +void CContextMenuInfo::Save() const +{ + CS_LOCK + CKey key; + CreateMainKey(key, kOptionsInfoKeyName); + key.SetValue(kCascadedMenu, Cascaded); + key.SetValue(kContextMenu, Flags); +} + +void CContextMenuInfo::Load() +{ + Cascaded = true; + Flags = (UInt32)-1; + CS_LOCK + CKey key; + if (OpenMainKey(key, kOptionsInfoKeyName) != ERROR_SUCCESS) + return; + key.GetValue_IfOk(kCascadedMenu, Cascaded); + key.GetValue_IfOk(kContextMenu, Flags); +} diff --git a/CPP/7zip/UI/Common/ZipRegistry.h b/CPP/7zip/UI/Common/ZipRegistry.h new file mode 100644 index 0000000..3783538 --- /dev/null +++ b/CPP/7zip/UI/Common/ZipRegistry.h @@ -0,0 +1,105 @@ +// ZipRegistry.h + +#ifndef __ZIP_REGISTRY_H +#define __ZIP_REGISTRY_H + +#include "Common/MyString.h" +#include "Common/Types.h" + +#include "ExtractMode.h" + +namespace NExtract +{ + struct CInfo + { + NPathMode::EEnum PathMode; + NOverwriteMode::EEnum OverwriteMode; + bool ShowPassword; + UStringVector Paths; + + void Save() const; + void Load(); + }; +} + +namespace NCompression +{ + struct CFormatOptions + { + UInt32 Level; + UInt32 Dictionary; + UInt32 Order; + UInt32 BlockLogSize; + UInt32 NumThreads; + + CSysString FormatID; + UString Method; + UString Options; + UString EncryptionMethod; + + void ResetForLevelChange() + { + BlockLogSize = NumThreads = Level = Dictionary = Order = UInt32(-1); + Method.Empty(); + // Options.Empty(); + // EncryptionMethod.Empty(); + } + CFormatOptions() { ResetForLevelChange(); } + }; + + struct CInfo + { + UInt32 Level; + bool ShowPassword; + bool EncryptHeaders; + UString ArcType; + UStringVector ArcPaths; + + CObjectVector Formats; + + void Save() const; + void Load(); + }; +} + +namespace NWorkDir +{ + namespace NMode + { + enum EEnum + { + kSystem, + kCurrent, + kSpecified + }; + } + struct CInfo + { + NMode::EEnum Mode; + UString Path; + bool ForRemovableOnly; + + void SetForRemovableOnlyDefault() { ForRemovableOnly = true; } + void SetDefault() + { + Mode = NMode::kSystem; + Path.Empty(); + SetForRemovableOnlyDefault(); + } + + void Save() const; + void Load(); + }; +} + + +struct CContextMenuInfo +{ + bool Cascaded; + UInt32 Flags; + + void Save() const; + void Load(); +}; + +#endif diff --git a/CPP/7zip/UI/Console/BenchCon.cpp b/CPP/7zip/UI/Console/BenchCon.cpp new file mode 100644 index 0000000..35e868c --- /dev/null +++ b/CPP/7zip/UI/Console/BenchCon.cpp @@ -0,0 +1,297 @@ +// BenchCon.cpp + +#include "StdAfx.h" + +#include "../../../Common/IntToString.h" +#include "../../../Common/MyCom.h" + +#if !defined(_7ZIP_ST) || defined(_WIN32) +#include "../../../Windows/System.h" +#endif + +#include "../Common/Bench.h" + +#include "BenchCon.h" +#include "ConsoleClose.h" + +struct CTotalBenchRes +{ + UInt64 NumIterations; + UInt64 Rating; + UInt64 Usage; + UInt64 RPU; + void Init() { NumIterations = 0; Rating = 0; Usage = 0; RPU = 0; } + void Normalize() + { + if (NumIterations == 0) + return; + Rating /= NumIterations; + Usage /= NumIterations; + RPU /= NumIterations; + NumIterations = 1; + } + void SetMid(const CTotalBenchRes &r1, const CTotalBenchRes &r2) + { + Rating = (r1.Rating + r2.Rating) / 2; + Usage = (r1.Usage + r2.Usage) / 2; + RPU = (r1.RPU + r2.RPU) / 2; + NumIterations = (r1.NumIterations + r2.NumIterations) / 2; + } +}; + +struct CBenchCallback: public IBenchCallback +{ + CTotalBenchRes EncodeRes; + CTotalBenchRes DecodeRes; + FILE *f; + void Init() { EncodeRes.Init(); DecodeRes.Init(); } + void Normalize() { EncodeRes.Normalize(); DecodeRes.Normalize(); } + UInt32 dictionarySize; + HRESULT SetEncodeResult(const CBenchInfo &info, bool final); + HRESULT SetDecodeResult(const CBenchInfo &info, bool final); +}; + +static void NormalizeVals(UInt64 &v1, UInt64 &v2) +{ + while (v1 > 1000000) + { + v1 >>= 1; + v2 >>= 1; + } +} + +static UInt64 MyMultDiv64(UInt64 value, UInt64 elapsedTime, UInt64 freq) +{ + UInt64 elTime = elapsedTime; + NormalizeVals(freq, elTime); + if (elTime == 0) + elTime = 1; + return value * freq / elTime; +} + +static void PrintNumber(FILE *f, UInt64 value, int size) +{ + char s[32]; + ConvertUInt64ToString(value, s); + fprintf(f, " "); + for (int len = (int)strlen(s); len < size; len++) + fprintf(f, " "); + fputs(s, f); +} + +static void PrintRating(FILE *f, UInt64 rating) +{ + PrintNumber(f, rating / 1000000, 6); +} + +static void PrintResults(FILE *f, UInt64 usage, UInt64 rpu, UInt64 rating) +{ + PrintNumber(f, (usage + 5000) / 10000, 5); + PrintRating(f, rpu); + PrintRating(f, rating); +} + + +static void PrintResults(FILE *f, const CBenchInfo &info, UInt64 rating, CTotalBenchRes &res) +{ + UInt64 speed = MyMultDiv64(info.UnpackSize, info.GlobalTime, info.GlobalFreq); + PrintNumber(f, speed / 1024, 7); + UInt64 usage = GetUsage(info); + UInt64 rpu = GetRatingPerUsage(info, rating); + PrintResults(f, usage, rpu, rating); + res.NumIterations++; + res.RPU += rpu; + res.Rating += rating; + res.Usage += usage; +} + +static void PrintTotals(FILE *f, const CTotalBenchRes &res) +{ + fprintf(f, " "); + PrintResults(f, res.Usage, res.RPU, res.Rating); +} + + +HRESULT CBenchCallback::SetEncodeResult(const CBenchInfo &info, bool final) +{ + if (NConsoleClose::TestBreakSignal()) + return E_ABORT; + if (final) + { + UInt64 rating = GetCompressRating(dictionarySize, info.GlobalTime, info.GlobalFreq, info.UnpackSize); + PrintResults(f, info, rating, EncodeRes); + } + return S_OK; +} + +static const char *kSep = " | "; + + +HRESULT CBenchCallback::SetDecodeResult(const CBenchInfo &info, bool final) +{ + if (NConsoleClose::TestBreakSignal()) + return E_ABORT; + if (final) + { + UInt64 rating = GetDecompressRating(info.GlobalTime, info.GlobalFreq, info.UnpackSize, info.PackSize, info.NumIterations); + fputs(kSep, f); + CBenchInfo info2 = info; + info2.UnpackSize *= info2.NumIterations; + info2.PackSize *= info2.NumIterations; + info2.NumIterations = 1; + PrintResults(f, info2, rating, DecodeRes); + } + return S_OK; +} + +static void PrintRequirements(FILE *f, const char *sizeString, UInt64 size, const char *threadsString, UInt32 numThreads) +{ + fprintf(f, "\nRAM %s ", sizeString); + PrintNumber(f, (size >> 20), 5); + fprintf(f, " MB, # %s %3d", threadsString, (unsigned int)numThreads); +} + +HRESULT LzmaBenchCon( + DECL_EXTERNAL_CODECS_LOC_VARS + FILE *f, UInt32 numIterations, UInt32 numThreads, UInt32 dictionary) +{ + if (!CrcInternalTest()) + return S_FALSE; + #ifndef _7ZIP_ST + UInt64 ramSize = NWindows::NSystem::GetRamSize(); // + UInt32 numCPUs = NWindows::NSystem::GetNumberOfProcessors(); + PrintRequirements(f, "size: ", ramSize, "CPU hardware threads:", numCPUs); + if (numThreads == (UInt32)-1) + numThreads = numCPUs; + if (numThreads > 1) + numThreads &= ~1; + if (dictionary == (UInt32)-1) + { + int dicSizeLog; + for (dicSizeLog = 25; dicSizeLog > kBenchMinDicLogSize; dicSizeLog--) + if (GetBenchMemoryUsage(numThreads, ((UInt32)1 << dicSizeLog)) + (8 << 20) <= ramSize) + break; + dictionary = (1 << dicSizeLog); + } + #else + if (dictionary == (UInt32)-1) + dictionary = (1 << 22); + numThreads = 1; + #endif + + PrintRequirements(f, "usage:", GetBenchMemoryUsage(numThreads, dictionary), "Benchmark threads: ", numThreads); + + CBenchCallback callback; + callback.Init(); + callback.f = f; + + fprintf(f, "\n\nDict Compressing | Decompressing\n "); + int j; + for (j = 0; j < 2; j++) + { + fprintf(f, " Speed Usage R/U Rating"); + if (j == 0) + fputs(kSep, f); + } + fprintf(f, "\n "); + for (j = 0; j < 2; j++) + { + fprintf(f, " KB/s %% MIPS MIPS"); + if (j == 0) + fputs(kSep, f); + } + fprintf(f, "\n\n"); + for (UInt32 i = 0; i < numIterations; i++) + { + const int kStartDicLog = 22; + int pow = (dictionary < ((UInt32)1 << kStartDicLog)) ? kBenchMinDicLogSize : kStartDicLog; + while (((UInt32)1 << pow) > dictionary) + pow--; + for (; ((UInt32)1 << pow) <= dictionary; pow++) + { + fprintf(f, "%2d:", pow); + callback.dictionarySize = (UInt32)1 << pow; + HRESULT res = LzmaBench( + EXTERNAL_CODECS_LOC_VARS + numThreads, callback.dictionarySize, &callback); + fprintf(f, "\n"); + RINOK(res); + } + } + callback.Normalize(); + fprintf(f, "----------------------------------------------------------------\nAvr:"); + PrintTotals(f, callback.EncodeRes); + fprintf(f, " "); + PrintTotals(f, callback.DecodeRes); + fprintf(f, "\nTot:"); + CTotalBenchRes midRes; + midRes.SetMid(callback.EncodeRes, callback.DecodeRes); + PrintTotals(f, midRes); + fprintf(f, "\n"); + return S_OK; +} + +struct CTempValues +{ + UInt64 *Values; + CTempValues(UInt32 num) { Values = new UInt64[num]; } + ~CTempValues() { delete []Values; } +}; + +HRESULT CrcBenchCon(FILE *f, UInt32 numIterations, UInt32 numThreads, UInt32 dictionary) +{ + if (!CrcInternalTest()) + return S_FALSE; + + #ifndef _7ZIP_ST + UInt64 ramSize = NWindows::NSystem::GetRamSize(); + UInt32 numCPUs = NWindows::NSystem::GetNumberOfProcessors(); + PrintRequirements(f, "size: ", ramSize, "CPU hardware threads:", numCPUs); + if (numThreads == (UInt32)-1) + numThreads = numCPUs; + #else + numThreads = 1; + #endif + if (dictionary == (UInt32)-1) + dictionary = (1 << 24); + + CTempValues speedTotals(numThreads); + fprintf(f, "\n\nSize"); + for (UInt32 ti = 0; ti < numThreads; ti++) + { + fprintf(f, " %5d", ti + 1); + speedTotals.Values[ti] = 0; + } + fprintf(f, "\n\n"); + + UInt64 numSteps = 0; + for (UInt32 i = 0; i < numIterations; i++) + { + for (int pow = 10; pow < 32; pow++) + { + UInt32 bufSize = (UInt32)1 << pow; + if (bufSize > dictionary) + break; + fprintf(f, "%2d: ", pow); + UInt64 speed; + for (UInt32 ti = 0; ti < numThreads; ti++) + { + if (NConsoleClose::TestBreakSignal()) + return E_ABORT; + RINOK(CrcBench(ti + 1, bufSize, speed)); + PrintNumber(f, (speed >> 20), 5); + speedTotals.Values[ti] += speed; + } + fprintf(f, "\n"); + numSteps++; + } + } + if (numSteps != 0) + { + fprintf(f, "\nAvg:"); + for (UInt32 ti = 0; ti < numThreads; ti++) + PrintNumber(f, ((speedTotals.Values[ti] / numSteps) >> 20), 5); + fprintf(f, "\n"); + } + return S_OK; +} diff --git a/CPP/7zip/UI/Console/BenchCon.h b/CPP/7zip/UI/Console/BenchCon.h new file mode 100644 index 0000000..966a83a --- /dev/null +++ b/CPP/7zip/UI/Console/BenchCon.h @@ -0,0 +1,16 @@ +// BenchCon.h + +#ifndef __BENCH_CON_H +#define __BENCH_CON_H + +#include + +#include "../../Common/CreateCoder.h" + +HRESULT LzmaBenchCon( + DECL_EXTERNAL_CODECS_LOC_VARS + FILE *f, UInt32 numIterations, UInt32 numThreads, UInt32 dictionary); + +HRESULT CrcBenchCon(FILE *f, UInt32 numIterations, UInt32 numThreads, UInt32 dictionary); + +#endif diff --git a/CPP/7zip/UI/Console/ConsoleClose.cpp b/CPP/7zip/UI/Console/ConsoleClose.cpp new file mode 100644 index 0000000..9bb2082 --- /dev/null +++ b/CPP/7zip/UI/Console/ConsoleClose.cpp @@ -0,0 +1,49 @@ +// ConsoleClose.cpp + +#include "StdAfx.h" + +#include "ConsoleClose.h" + +#include + +static int g_BreakCounter = 0; +static const int kBreakAbortThreshold = 2; + +namespace NConsoleClose { + +static void HandlerRoutine(int) +{ + g_BreakCounter++; + if (g_BreakCounter < kBreakAbortThreshold) + return ; + exit(EXIT_FAILURE); +} + +bool TestBreakSignal() +{ + return (g_BreakCounter > 0); +} + +void CheckCtrlBreak() +{ + if (TestBreakSignal()) + throw CCtrlBreakException(); +} + +CCtrlHandlerSetter::CCtrlHandlerSetter() +{ + memo_sig_int = signal(SIGINT,HandlerRoutine); // CTRL-C + if (memo_sig_int == SIG_ERR) + throw "SetConsoleCtrlHandler fails (SIGINT)"; + memo_sig_term = signal(SIGTERM,HandlerRoutine); // for kill -15 (before "kill -9") + if (memo_sig_term == SIG_ERR) + throw "SetConsoleCtrlHandler fails (SIGTERM)"; +} + +CCtrlHandlerSetter::~CCtrlHandlerSetter() +{ + signal(SIGINT,memo_sig_int); // CTRL-C + signal(SIGTERM,memo_sig_term); // kill {pid} +} + +} diff --git a/CPP/7zip/UI/Console/ConsoleClose.h b/CPP/7zip/UI/Console/ConsoleClose.h new file mode 100644 index 0000000..042aaf2 --- /dev/null +++ b/CPP/7zip/UI/Console/ConsoleClose.h @@ -0,0 +1,26 @@ +// ConsoleCloseUtils.h + +#ifndef __CONSOLECLOSEUTILS_H +#define __CONSOLECLOSEUTILS_H + +namespace NConsoleClose { + +bool TestBreakSignal(); + +class CCtrlHandlerSetter +{ + void (*memo_sig_int)(int); + void (*memo_sig_term)(int); +public: + CCtrlHandlerSetter(); + virtual ~CCtrlHandlerSetter(); +}; + +class CCtrlBreakException +{}; + +void CheckCtrlBreak(); + +} + +#endif diff --git a/CPP/7zip/UI/Console/ExtractCallbackConsole.cpp b/CPP/7zip/UI/Console/ExtractCallbackConsole.cpp new file mode 100644 index 0000000..af65739 --- /dev/null +++ b/CPP/7zip/UI/Console/ExtractCallbackConsole.cpp @@ -0,0 +1,228 @@ +// ExtractCallbackConsole.h + +#include "StdAfx.h" + +#include "ExtractCallbackConsole.h" +#include "UserInputUtils.h" +#include "ConsoleClose.h" + +#include "Common/Wildcard.h" + +#include "Windows/FileDir.h" +#include "Windows/FileFind.h" +#include "Windows/Time.h" +#include "Windows/Defs.h" +#include "Windows/PropVariant.h" +#include "Windows/Error.h" +#include "Windows/PropVariantConversions.h" + +#include "../../Common/FilePathAutoRename.h" + +#include "../Common/ExtractingFilePath.h" + +using namespace NWindows; +using namespace NFile; +using namespace NDirectory; + +static const char *kTestString = "Testing "; +static const char *kExtractString = "Extracting "; +static const char *kSkipString = "Skipping "; + +// static const char *kCantAutoRename = "can not create file with auto name\n"; +// static const char *kCantRenameFile = "can not rename existing file\n"; +// static const char *kCantDeleteOutputFile = "can not delete output file "; +static const char *kError = "ERROR: "; +static const char *kMemoryExceptionMessage = "Can't allocate required memory!"; + +static const char *kProcessing = "Processing archive: "; +static const char *kEverythingIsOk = "Everything is Ok"; +static const char *kNoFiles = "No files to process"; + +static const char *kUnsupportedMethod = "Unsupported Method"; +static const char *kCrcFailed = "CRC Failed"; +static const char *kCrcFailedEncrypted = "CRC Failed in encrypted file. Wrong password?"; +static const char *kDataError = "Data Error"; +static const char *kDataErrorEncrypted = "Data Error in encrypted file. Wrong password?"; +static const char *kUnknownError = "Unknown Error"; + +STDMETHODIMP CExtractCallbackConsole::SetTotal(UInt64) +{ + if (NConsoleClose::TestBreakSignal()) + return E_ABORT; + return S_OK; +} + +STDMETHODIMP CExtractCallbackConsole::SetCompleted(const UInt64 *) +{ + if (NConsoleClose::TestBreakSignal()) + return E_ABORT; + return S_OK; +} + +STDMETHODIMP CExtractCallbackConsole::AskOverwrite( + const wchar_t *existName, const FILETIME *, const UInt64 *, + const wchar_t *newName, const FILETIME *, const UInt64 *, + Int32 *answer) +{ + (*OutStream) << "file " << existName << + "\nalready exists. Overwrite with " << endl; + (*OutStream) << newName; + + NUserAnswerMode::EEnum overwriteAnswer = ScanUserYesNoAllQuit(OutStream); + + switch(overwriteAnswer) + { + case NUserAnswerMode::kQuit: return E_ABORT; + case NUserAnswerMode::kNo: *answer = NOverwriteAnswer::kNo; break; + case NUserAnswerMode::kNoAll: *answer = NOverwriteAnswer::kNoToAll; break; + case NUserAnswerMode::kYesAll: *answer = NOverwriteAnswer::kYesToAll; break; + case NUserAnswerMode::kYes: *answer = NOverwriteAnswer::kYes; break; + case NUserAnswerMode::kAutoRenameAll: *answer = NOverwriteAnswer::kAutoRename; break; + default: return E_FAIL; + } + return S_OK; +} + +STDMETHODIMP CExtractCallbackConsole::PrepareOperation(const wchar_t *name, bool /* isFolder */, Int32 askExtractMode, const UInt64 *position) +{ + switch (askExtractMode) + { + case NArchive::NExtract::NAskMode::kExtract: (*OutStream) << kExtractString; break; + case NArchive::NExtract::NAskMode::kTest: (*OutStream) << kTestString; break; + case NArchive::NExtract::NAskMode::kSkip: (*OutStream) << kSkipString; break; + }; + (*OutStream) << name; + if (position != 0) + (*OutStream) << " <" << *position << ">"; + return S_OK; +} + +STDMETHODIMP CExtractCallbackConsole::MessageError(const wchar_t *message) +{ + (*OutStream) << message << endl; + NumFileErrorsInCurrentArchive++; + NumFileErrors++; + return S_OK; +} + +STDMETHODIMP CExtractCallbackConsole::SetOperationResult(Int32 operationResult, bool encrypted) +{ + switch(operationResult) + { + case NArchive::NExtract::NOperationResult::kOK: + break; + default: + { + NumFileErrorsInCurrentArchive++; + NumFileErrors++; + (*OutStream) << " "; + switch(operationResult) + { + case NArchive::NExtract::NOperationResult::kUnSupportedMethod: + (*OutStream) << kUnsupportedMethod; + break; + case NArchive::NExtract::NOperationResult::kCRCError: + (*OutStream) << (encrypted ? kCrcFailedEncrypted: kCrcFailed); + break; + case NArchive::NExtract::NOperationResult::kDataError: + (*OutStream) << (encrypted ? kDataErrorEncrypted : kDataError); + break; + default: + (*OutStream) << kUnknownError; + } + } + } + (*OutStream) << endl; + return S_OK; +} + +#ifndef _NO_CRYPTO + +HRESULT CExtractCallbackConsole::SetPassword(const UString &password) +{ + PasswordIsDefined = true; + Password = password; + return S_OK; +} + +STDMETHODIMP CExtractCallbackConsole::CryptoGetTextPassword(BSTR *password) +{ + if (!PasswordIsDefined) + { + Password = GetPassword(OutStream); + PasswordIsDefined = true; + } + return StringToBstr(Password, password); +} + +#endif + +HRESULT CExtractCallbackConsole::BeforeOpen(const wchar_t *name) +{ + NumArchives++; + NumFileErrorsInCurrentArchive = 0; + (*OutStream) << endl << kProcessing << name << endl; + return S_OK; +} + +HRESULT CExtractCallbackConsole::OpenResult(const wchar_t * /* name */, HRESULT result, bool encrypted) +{ + (*OutStream) << endl; + if (result != S_OK) + { + (*OutStream) << "Error: "; + if (result == S_FALSE) + { + (*OutStream) << (encrypted ? + "Can not open encrypted archive. Wrong password?" : + "Can not open file as archive"); + } + else + { + if (result == E_OUTOFMEMORY) + (*OutStream) << "Can't allocate required memory"; + else + (*OutStream) << NError::MyFormatMessage(result); + } + (*OutStream) << endl; + NumArchiveErrors++; + } + return S_OK; +} + +HRESULT CExtractCallbackConsole::ThereAreNoFiles() +{ + (*OutStream) << endl << kNoFiles << endl; + return S_OK; +} + +HRESULT CExtractCallbackConsole::ExtractResult(HRESULT result) +{ + if (result == S_OK) + { + (*OutStream) << endl; + if (NumFileErrorsInCurrentArchive == 0) + (*OutStream) << kEverythingIsOk << endl; + else + { + NumArchiveErrors++; + (*OutStream) << "Sub items Errors: " << NumFileErrorsInCurrentArchive << endl; + } + } + if (result == S_OK) + return result; + NumArchiveErrors++; + if (result == E_ABORT || result == ERROR_DISK_FULL) + return result; + (*OutStream) << endl << kError; + if (result == E_OUTOFMEMORY) + (*OutStream) << kMemoryExceptionMessage; + else + { + UString message; + NError::MyFormatMessage(result, message); + (*OutStream) << message; + } + (*OutStream) << endl; + return S_OK; +} diff --git a/CPP/7zip/UI/Console/ExtractCallbackConsole.h b/CPP/7zip/UI/Console/ExtractCallbackConsole.h new file mode 100644 index 0000000..e42ca6f --- /dev/null +++ b/CPP/7zip/UI/Console/ExtractCallbackConsole.h @@ -0,0 +1,73 @@ +// ExtractCallbackConsole.h + +#ifndef __EXTRACTCALLBACKCONSOLE_H +#define __EXTRACTCALLBACKCONSOLE_H + +#include "Common/MyString.h" +#include "Common/StdOutStream.h" +#include "../../Common/FileStreams.h" +#include "../../IPassword.h" +#include "../../Archive/IArchive.h" +#include "../Common/ArchiveExtractCallback.h" + +class CExtractCallbackConsole: + public IExtractCallbackUI, + #ifndef _NO_CRYPTO + public ICryptoGetTextPassword, + #endif + public CMyUnknownImp +{ +public: + MY_QUERYINTERFACE_BEGIN2(IFolderArchiveExtractCallback) + #ifndef _NO_CRYPTO + MY_QUERYINTERFACE_ENTRY(ICryptoGetTextPassword) + #endif + MY_QUERYINTERFACE_END + MY_ADDREF_RELEASE + + STDMETHOD(SetTotal)(UInt64 total); + STDMETHOD(SetCompleted)(const UInt64 *completeValue); + + // IFolderArchiveExtractCallback + STDMETHOD(AskOverwrite)( + const wchar_t *existName, const FILETIME *existTime, const UInt64 *existSize, + const wchar_t *newName, const FILETIME *newTime, const UInt64 *newSize, + Int32 *answer); + STDMETHOD (PrepareOperation)(const wchar_t *name, bool isFolder, Int32 askExtractMode, const UInt64 *position); + + STDMETHOD(MessageError)(const wchar_t *message); + STDMETHOD(SetOperationResult)(Int32 operationResult, bool encrypted); + + HRESULT BeforeOpen(const wchar_t *name); + HRESULT OpenResult(const wchar_t *name, HRESULT result, bool encrypted); + HRESULT ThereAreNoFiles(); + HRESULT ExtractResult(HRESULT result); + + + #ifndef _NO_CRYPTO + HRESULT SetPassword(const UString &password); + STDMETHOD(CryptoGetTextPassword)(BSTR *password); + + bool PasswordIsDefined; + UString Password; + + #endif + + UInt64 NumArchives; + UInt64 NumArchiveErrors; + UInt64 NumFileErrors; + UInt64 NumFileErrorsInCurrentArchive; + + CStdOutStream *OutStream; + + void Init() + { + NumArchives = 0; + NumArchiveErrors = 0; + NumFileErrors = 0; + NumFileErrorsInCurrentArchive = 0; + } + +}; + +#endif diff --git a/CPP/7zip/UI/Console/List.cpp b/CPP/7zip/UI/Console/List.cpp new file mode 100644 index 0000000..f747cfd --- /dev/null +++ b/CPP/7zip/UI/Console/List.cpp @@ -0,0 +1,654 @@ +// List.cpp + +#include "StdAfx.h" + +#include "Common/IntToString.h" +#include "Common/MyCom.h" +#include "Common/StdOutStream.h" +#include "Common/StringConvert.h" + +#include "Windows/Error.h" +#include "Windows/FileDir.h" +#include "Windows/PropVariant.h" +#include "Windows/PropVariantConversions.h" + +#include "../../Archive/IArchive.h" + +#include "../Common/OpenArchive.h" +#include "../Common/PropIDUtils.h" + +#include "ConsoleClose.h" +#include "List.h" +#include "OpenCallbackConsole.h" + +using namespace NWindows; + +struct CPropIdToName +{ + PROPID PropID; + const wchar_t *Name; +}; + +static const CPropIdToName kPropIdToName[] = +{ + { kpidPath, L"Path" }, + { kpidName, L"Name" }, + { kpidIsDir, L"Folder" }, + { kpidSize, L"Size" }, + { kpidPackSize, L"Packed Size" }, + { kpidAttrib, L"Attributes" }, + { kpidCTime, L"Created" }, + { kpidATime, L"Accessed" }, + { kpidMTime, L"Modified" }, + { kpidSolid, L"Solid" }, + { kpidCommented, L"Commented" }, + { kpidEncrypted, L"Encrypted" }, + { kpidSplitBefore, L"Split Before" }, + { kpidSplitAfter, L"Split After" }, + { kpidDictionarySize, L"Dictionary Size" }, + { kpidCRC, L"CRC" }, + { kpidType, L"Type" }, + { kpidIsAnti, L"Anti" }, + { kpidMethod, L"Method" }, + { kpidHostOS, L"Host OS" }, + { kpidFileSystem, L"File System" }, + { kpidUser, L"User" }, + { kpidGroup, L"Group" }, + { kpidBlock, L"Block" }, + { kpidComment, L"Comment" }, + { kpidPosition, L"Position" }, + { kpidPrefix, L"Prefix" }, + { kpidNumSubDirs, L"Folders" }, + { kpidNumSubFiles, L"Files" }, + { kpidUnpackVer, L"Version" }, + { kpidVolume, L"Volume" }, + { kpidIsVolume, L"Multivolume" }, + { kpidOffset, L"Offset" }, + { kpidLinks, L"Links" }, + { kpidNumBlocks, L"Blocks" }, + { kpidNumVolumes, L"Volumes" }, + + { kpidBit64, L"64-bit" }, + { kpidBigEndian, L"Big-endian" }, + { kpidCpu, L"CPU" }, + { kpidPhySize, L"Physical Size" }, + { kpidHeadersSize, L"Headers Size" }, + { kpidChecksum, L"Checksum" }, + { kpidCharacts, L"Characteristics" }, + { kpidVa, L"Virtual Address" }, + { kpidId, L"ID" }, + { kpidShortName, L"Short Name" }, + { kpidCreatorApp, L"Creator Application"}, + { kpidSectorSize, L"Sector Size" }, + { kpidPosixAttrib, L"Mode" }, + { kpidLink, L"Link" }, + { kpidError, L"Error" }, + + { kpidTotalSize, L"Total Size" }, + { kpidFreeSpace, L"Free Space" }, + { kpidClusterSize, L"Cluster Size" }, + { kpidVolumeName, L"Label" } +}; + +static const char kEmptyAttribChar = '.'; + +static const char *kListing = "Listing archive: "; +static const wchar_t *kFilesMessage = L"files"; +static const wchar_t *kDirsMessage = L"folders"; + +static void GetAttribString(DWORD wa, bool isDir, char *s) +{ + s[0] = ((wa & FILE_ATTRIBUTE_DIRECTORY) != 0 || isDir) ? 'D' : kEmptyAttribChar; + s[1] = ((wa & FILE_ATTRIBUTE_READONLY) != 0) ? 'R': kEmptyAttribChar; + s[2] = ((wa & FILE_ATTRIBUTE_HIDDEN) != 0) ? 'H': kEmptyAttribChar; + s[3] = ((wa & FILE_ATTRIBUTE_SYSTEM) != 0) ? 'S': kEmptyAttribChar; + s[4] = ((wa & FILE_ATTRIBUTE_ARCHIVE) != 0) ? 'A': kEmptyAttribChar; + s[5] = '\0'; +} + +enum EAdjustment +{ + kLeft, + kCenter, + kRight +}; + +struct CFieldInfo +{ + PROPID PropID; + UString Name; + EAdjustment TitleAdjustment; + EAdjustment TextAdjustment; + int PrefixSpacesWidth; + int Width; +}; + +struct CFieldInfoInit +{ + PROPID PropID; + const wchar_t *Name; + EAdjustment TitleAdjustment; + EAdjustment TextAdjustment; + int PrefixSpacesWidth; + int Width; +}; + +static CFieldInfoInit kStandardFieldTable[] = +{ + { kpidMTime, L" Date Time", kLeft, kLeft, 0, 19 }, + { kpidAttrib, L"Attr", kRight, kCenter, 1, 5 }, + { kpidSize, L"Size", kRight, kRight, 1, 12 }, + { kpidPackSize, L"Compressed", kRight, kRight, 1, 12 }, + { kpidPath, L"Name", kLeft, kLeft, 2, 24 } +}; + +static void PrintSpaces(int numSpaces) +{ + for (int i = 0; i < numSpaces; i++) + g_StdOut << ' '; +} + +static void PrintString(EAdjustment adjustment, int width, const UString &textString) +{ + const int numSpaces = width - textString.Length(); + int numLeftSpaces = 0; + switch (adjustment) + { + case kLeft: + numLeftSpaces = 0; + break; + case kCenter: + numLeftSpaces = numSpaces / 2; + break; + case kRight: + numLeftSpaces = numSpaces; + break; + } + PrintSpaces(numLeftSpaces); + g_StdOut << textString; + PrintSpaces(numSpaces - numLeftSpaces); +} + +class CFieldPrinter +{ + CObjectVector _fields; +public: + void Clear() { _fields.Clear(); } + void Init(const CFieldInfoInit *standardFieldTable, int numItems); + HRESULT Init(IInArchive *archive); + void PrintTitle(); + void PrintTitleLines(); + HRESULT PrintItemInfo(const CArc &arc, UInt32 index, bool techMode); + HRESULT PrintSummaryInfo(UInt64 numFiles, UInt64 numDirs, + const UInt64 *size, const UInt64 *compressedSize); +}; + +void CFieldPrinter::Init(const CFieldInfoInit *standardFieldTable, int numItems) +{ + Clear(); + for (int i = 0; i < numItems; i++) + { + CFieldInfo fieldInfo; + const CFieldInfoInit &fieldInfoInit = standardFieldTable[i]; + fieldInfo.PropID = fieldInfoInit.PropID; + fieldInfo.Name = fieldInfoInit.Name; + fieldInfo.TitleAdjustment = fieldInfoInit.TitleAdjustment; + fieldInfo.TextAdjustment = fieldInfoInit.TextAdjustment; + fieldInfo.PrefixSpacesWidth = fieldInfoInit.PrefixSpacesWidth; + fieldInfo.Width = fieldInfoInit.Width; + _fields.Add(fieldInfo); + } +} + +static UString GetPropName(PROPID propID, BSTR name) +{ + for (int i = 0; i < sizeof(kPropIdToName) / sizeof(kPropIdToName[0]); i++) + { + const CPropIdToName &propIdToName = kPropIdToName[i]; + if (propIdToName.PropID == propID) + return propIdToName.Name; + } + if (name) + return name; + wchar_t s[16]; + ConvertUInt32ToString(propID, s); + return s; +} + +HRESULT CFieldPrinter::Init(IInArchive *archive) +{ + Clear(); + UInt32 numProps; + RINOK(archive->GetNumberOfProperties(&numProps)); + for (UInt32 i = 0; i < numProps; i++) + { + CMyComBSTR name; + PROPID propID; + VARTYPE vt; + RINOK(archive->GetPropertyInfo(i, &name, &propID, &vt)); + CFieldInfo fieldInfo; + fieldInfo.PropID = propID; + fieldInfo.Name = GetPropName(propID, name); + _fields.Add(fieldInfo); + } + return S_OK; +} + +void CFieldPrinter::PrintTitle() +{ + for (int i = 0; i < _fields.Size(); i++) + { + const CFieldInfo &fieldInfo = _fields[i]; + PrintSpaces(fieldInfo.PrefixSpacesWidth); + PrintString(fieldInfo.TitleAdjustment, + ((fieldInfo.PropID == kpidPath) ? 0: fieldInfo.Width), fieldInfo.Name); + } +} + +void CFieldPrinter::PrintTitleLines() +{ + for (int i = 0; i < _fields.Size(); i++) + { + const CFieldInfo &fieldInfo = _fields[i]; + PrintSpaces(fieldInfo.PrefixSpacesWidth); + for (int i = 0; i < fieldInfo.Width; i++) + g_StdOut << '-'; + } +} + + +static BOOL IsFileTimeZero(CONST FILETIME *lpFileTime) +{ + return (lpFileTime->dwLowDateTime == 0) && (lpFileTime->dwHighDateTime == 0); +} + +static const char *kEmptyTimeString = " "; +static void PrintTime(const NCOM::CPropVariant &prop) +{ + if (prop.vt != VT_FILETIME) + throw "incorrect item"; + if (IsFileTimeZero(&prop.filetime)) + g_StdOut << kEmptyTimeString; + else + { + FILETIME localFileTime; + if (!FileTimeToLocalFileTime(&prop.filetime, &localFileTime)) + throw "FileTimeToLocalFileTime error"; + char s[32]; + if (ConvertFileTimeToString(localFileTime, s, true, true)) + g_StdOut << s; + else + g_StdOut << kEmptyTimeString; + } +} + +HRESULT CFieldPrinter::PrintItemInfo(const CArc &arc, UInt32 index, bool techMode) +{ + /* + if (techMode) + { + g_StdOut << "Index = "; + g_StdOut << (UInt64)index; + g_StdOut << endl; + } + */ + for (int i = 0; i < _fields.Size(); i++) + { + const CFieldInfo &fieldInfo = _fields[i]; + if (!techMode) + PrintSpaces(fieldInfo.PrefixSpacesWidth); + + NCOM::CPropVariant prop; + if (fieldInfo.PropID == kpidPath) + { + UString s; + RINOK(arc.GetItemPath(index, s)); + prop = s; + } + else + { + RINOK(arc.Archive->GetProperty(index, fieldInfo.PropID, &prop)); + } + if (techMode) + { + g_StdOut << fieldInfo.Name << " = "; + } + int width = (fieldInfo.PropID == kpidPath) ? 0: fieldInfo.Width; + if (fieldInfo.PropID == kpidAttrib && (prop.vt == VT_EMPTY || prop.vt == VT_UI4)) + { + UInt32 attrib = (prop.vt == VT_EMPTY) ? 0 : prop.ulVal; + bool isFolder; + RINOK(IsArchiveItemFolder(arc.Archive, index, isFolder)); + char s[8]; + GetAttribString(attrib, isFolder, s); + g_StdOut << s; + } + else if (prop.vt == VT_EMPTY) + { + if (!techMode) + PrintSpaces(width); + } + else if (fieldInfo.PropID == kpidMTime) + { + PrintTime(prop); + } + else if (prop.vt == VT_BSTR) + { + if (techMode) + g_StdOut << prop.bstrVal; + else + PrintString(fieldInfo.TextAdjustment, width, prop.bstrVal); + } + else + { + UString s = ConvertPropertyToString(prop, fieldInfo.PropID); + s.Replace(wchar_t(0xA), L' '); + s.Replace(wchar_t(0xD), L' '); + + if (techMode) + g_StdOut << s; + else + PrintString(fieldInfo.TextAdjustment, width, s); + } + if (techMode) + g_StdOut << endl; + } + return S_OK; +} + +static void PrintNumberString(EAdjustment adjustment, int width, const UInt64 *value) +{ + wchar_t textString[32] = { 0 }; + if (value != NULL) + ConvertUInt64ToString(*value, textString); + PrintString(adjustment, width, textString); +} + + +HRESULT CFieldPrinter::PrintSummaryInfo(UInt64 numFiles, UInt64 numDirs, + const UInt64 *size, const UInt64 *compressedSize) +{ + for (int i = 0; i < _fields.Size(); i++) + { + const CFieldInfo &fieldInfo = _fields[i]; + PrintSpaces(fieldInfo.PrefixSpacesWidth); + NCOM::CPropVariant prop; + if (fieldInfo.PropID == kpidSize) + PrintNumberString(fieldInfo.TextAdjustment, fieldInfo.Width, size); + else if (fieldInfo.PropID == kpidPackSize) + PrintNumberString(fieldInfo.TextAdjustment, fieldInfo.Width, compressedSize); + else if (fieldInfo.PropID == kpidPath) + { + wchar_t textString[32]; + ConvertUInt64ToString(numFiles, textString); + UString temp = textString; + temp += L" "; + temp += kFilesMessage; + temp += L", "; + ConvertUInt64ToString(numDirs, textString); + temp += textString; + temp += L" "; + temp += kDirsMessage; + PrintString(fieldInfo.TextAdjustment, 0, temp); + } + else + PrintString(fieldInfo.TextAdjustment, fieldInfo.Width, L""); + } + return S_OK; +} + +bool GetUInt64Value(IInArchive *archive, UInt32 index, PROPID propID, UInt64 &value) +{ + NCOM::CPropVariant prop; + if (archive->GetProperty(index, propID, &prop) != S_OK) + throw "GetPropertyValue error"; + if (prop.vt == VT_EMPTY) + return false; + value = ConvertPropVariantToUInt64(prop); + return true; +} + +static void PrintPropPair(const wchar_t *name, const wchar_t *value) +{ + g_StdOut << name << " = " << value << endl; +} + +HRESULT ListArchives(CCodecs *codecs, const CIntVector &formatIndices, + bool stdInMode, + UStringVector &arcPaths, UStringVector &arcPathsFull, + const NWildcard::CCensorNode &wildcardCensor, + bool enableHeaders, bool techMode, + #ifndef _NO_CRYPTO + bool &passwordEnabled, UString &password, + #endif + UInt64 &numErrors) +{ + numErrors = 0; + CFieldPrinter fieldPrinter; + if (!techMode) + fieldPrinter.Init(kStandardFieldTable, sizeof(kStandardFieldTable) / sizeof(kStandardFieldTable[0])); + + UInt64 numFiles2 = 0, numDirs2 = 0, totalPackSize2 = 0, totalUnPackSize2 = 0; + UInt64 *totalPackSizePointer2 = 0, *totalUnPackSizePointer2 = 0; + int numArcs = /* stdInMode ? 1 : */ arcPaths.Size(); + for (int i = 0; i < numArcs; i++) + { + const UString &archiveName = arcPaths[i]; + UInt64 arcPackSize = 0; + if (!stdInMode) + { + NFile::NFind::CFileInfoW fi; + if (!fi.Find(archiveName) || fi.IsDir()) + { + g_StdOut << endl << "Error: " << archiveName << " is not file" << endl; + numErrors++; + continue; + } + arcPackSize = fi.Size; + } + + CArchiveLink archiveLink; + + COpenCallbackConsole openCallback; + openCallback.OutStream = &g_StdOut; + + #ifndef _NO_CRYPTO + + openCallback.PasswordIsDefined = passwordEnabled; + openCallback.Password = password; + + #endif + + HRESULT result = archiveLink.Open2(codecs, formatIndices, stdInMode, NULL, archiveName, &openCallback); + if (result != S_OK) + { + if (result == E_ABORT) + return result; + g_StdOut << endl << "Error: " << archiveName << ": "; + if (result == S_FALSE) + { + #ifndef _NO_CRYPTO + if (openCallback.Open_WasPasswordAsked()) + g_StdOut << "Can not open encrypted archive. Wrong password?"; + else + #endif + g_StdOut << "Can not open file as archive"; + } + else if (result == E_OUTOFMEMORY) + g_StdOut << "Can't allocate required memory"; + else + g_StdOut << NError::MyFormatMessage(result); + g_StdOut << endl; + numErrors++; + continue; + } + + if (!stdInMode) + for (int v = 0; v < archiveLink.VolumePaths.Size(); v++) + { + int index = arcPathsFull.FindInSorted(archiveLink.VolumePaths[v]); + if (index >= 0 && index > i) + { + arcPaths.Delete(index); + arcPathsFull.Delete(index); + numArcs = arcPaths.Size(); + } + } + + if (enableHeaders) + { + g_StdOut << endl << kListing << archiveName << endl << endl; + + for (int i = 0; i < archiveLink.Arcs.Size(); i++) + { + const CArc &arc = archiveLink.Arcs[i]; + + g_StdOut << "--\n"; + PrintPropPair(L"Path", arc.Path); + PrintPropPair(L"Type", codecs->Formats[arc.FormatIndex].Name); + if (!arc.ErrorMessage.IsEmpty()) + PrintPropPair(L"Error", arc.ErrorMessage); + UInt32 numProps; + IInArchive *archive = arc.Archive; + if (archive->GetNumberOfArchiveProperties(&numProps) == S_OK) + { + for (UInt32 j = 0; j < numProps; j++) + { + CMyComBSTR name; + PROPID propID; + VARTYPE vt; + RINOK(archive->GetArchivePropertyInfo(j, &name, &propID, &vt)); + NCOM::CPropVariant prop; + RINOK(archive->GetArchiveProperty(propID, &prop)); + UString s = ConvertPropertyToString(prop, propID); + if (!s.IsEmpty()) + PrintPropPair(GetPropName(propID, name), s); + } + } + if (i != archiveLink.Arcs.Size() - 1) + { + UInt32 numProps; + g_StdOut << "----\n"; + if (archive->GetNumberOfProperties(&numProps) == S_OK) + { + UInt32 mainIndex = archiveLink.Arcs[i + 1].SubfileIndex; + for (UInt32 j = 0; j < numProps; j++) + { + CMyComBSTR name; + PROPID propID; + VARTYPE vt; + RINOK(archive->GetPropertyInfo(j, &name, &propID, &vt)); + NCOM::CPropVariant prop; + RINOK(archive->GetProperty(mainIndex, propID, &prop)); + UString s = ConvertPropertyToString(prop, propID); + if (!s.IsEmpty()) + PrintPropPair(GetPropName(propID, name), s); + } + } + } + + } + g_StdOut << endl; + if (techMode) + g_StdOut << "----------\n"; + } + + if (enableHeaders && !techMode) + { + fieldPrinter.PrintTitle(); + g_StdOut << endl; + fieldPrinter.PrintTitleLines(); + g_StdOut << endl; + } + + const CArc &arc = archiveLink.Arcs.Back(); + IInArchive *archive = arc.Archive; + if (techMode) + { + RINOK(fieldPrinter.Init(archive)); + } + UInt64 numFiles = 0, numDirs = 0, totalPackSize = 0, totalUnPackSize = 0; + UInt64 *totalPackSizePointer = 0, *totalUnPackSizePointer = 0; + UInt32 numItems; + RINOK(archive->GetNumberOfItems(&numItems)); + for (UInt32 i = 0; i < numItems; i++) + { + if (NConsoleClose::TestBreakSignal()) + return E_ABORT; + + UString filePath; + HRESULT res = arc.GetItemPath(i, filePath); + if (stdInMode && res == E_INVALIDARG) + break; + RINOK(res); + + bool isFolder; + RINOK(IsArchiveItemFolder(archive, i, isFolder)); + if (!wildcardCensor.CheckPath(filePath, !isFolder)) + continue; + + fieldPrinter.PrintItemInfo(arc, i, techMode); + + UInt64 packSize, unpackSize; + if (!GetUInt64Value(archive, i, kpidSize, unpackSize)) + unpackSize = 0; + else + totalUnPackSizePointer = &totalUnPackSize; + if (!GetUInt64Value(archive, i, kpidPackSize, packSize)) + packSize = 0; + else + totalPackSizePointer = &totalPackSize; + + g_StdOut << endl; + + if (isFolder) + numDirs++; + else + numFiles++; + totalPackSize += packSize; + totalUnPackSize += unpackSize; + } + + if (!stdInMode && totalPackSizePointer == 0) + { + if (archiveLink.VolumePaths.Size() != 0) + arcPackSize += archiveLink.VolumesSize; + totalPackSize = (numFiles == 0) ? 0 : arcPackSize; + totalPackSizePointer = &totalPackSize; + } + if (totalUnPackSizePointer == 0 && numFiles == 0) + { + totalUnPackSize = 0; + totalUnPackSizePointer = &totalUnPackSize; + } + if (enableHeaders && !techMode) + { + fieldPrinter.PrintTitleLines(); + g_StdOut << endl; + fieldPrinter.PrintSummaryInfo(numFiles, numDirs, totalUnPackSizePointer, totalPackSizePointer); + g_StdOut << endl; + } + if (totalPackSizePointer != 0) + { + totalPackSizePointer2 = &totalPackSize2; + totalPackSize2 += totalPackSize; + } + if (totalUnPackSizePointer != 0) + { + totalUnPackSizePointer2 = &totalUnPackSize2; + totalUnPackSize2 += totalUnPackSize; + } + numFiles2 += numFiles; + numDirs2 += numDirs; + } + if (enableHeaders && !techMode && numArcs > 1) + { + g_StdOut << endl; + fieldPrinter.PrintTitleLines(); + g_StdOut << endl; + fieldPrinter.PrintSummaryInfo(numFiles2, numDirs2, totalUnPackSizePointer2, totalPackSizePointer2); + g_StdOut << endl; + g_StdOut << "Archives: " << numArcs << endl; + } + return S_OK; +} diff --git a/CPP/7zip/UI/Console/List.h b/CPP/7zip/UI/Console/List.h new file mode 100644 index 0000000..97d9fb1 --- /dev/null +++ b/CPP/7zip/UI/Console/List.h @@ -0,0 +1,20 @@ +// List.h + +#ifndef __LIST_H +#define __LIST_H + +#include "Common/Wildcard.h" +#include "../Common/LoadCodecs.h" + +HRESULT ListArchives(CCodecs *codecs, const CIntVector &formatIndices, + bool stdInMode, + UStringVector &archivePaths, UStringVector &archivePathsFull, + const NWildcard::CCensorNode &wildcardCensor, + bool enableHeaders, bool techMode, + #ifndef _NO_CRYPTO + bool &passwordEnabled, UString &password, + #endif + UInt64 &errors); + +#endif + diff --git a/CPP/7zip/UI/Console/Main.cpp b/CPP/7zip/UI/Console/Main.cpp new file mode 100644 index 0000000..cebfe2e --- /dev/null +++ b/CPP/7zip/UI/Console/Main.cpp @@ -0,0 +1,628 @@ +// Main.cpp + +#include "StdAfx.h" + +#if defined( _7ZIP_LARGE_PAGES) +#include "../../../../C/Alloc.h" +#endif + +#include "Common/MyInitGuid.h" + +#include "Common/CommandLineParser.h" +#include "Common/IntToString.h" +#include "Common/MyException.h" +#include "Common/StdOutStream.h" +#include "Common/StringConvert.h" +#include "Common/StringToInt.h" + +#include "Windows/Error.h" +#ifdef _WIN32 +#include "Windows/MemoryLock.h" +#endif + +#include "../Common/ArchiveCommandLine.h" +#include "../Common/ExitCode.h" +#include "../Common/Extract.h" +#ifdef EXTERNAL_CODECS +#include "../Common/LoadCodecs.h" +#endif + +#include "BenchCon.h" +#include "ExtractCallbackConsole.h" +#include "List.h" +#include "OpenCallbackConsole.h" +#include "UpdateCallbackConsole.h" + +#include "../../MyVersion.h" + +#include "myPrivate.h" +#include "Windows/System.h" + +using namespace NWindows; +using namespace NFile; +using namespace NCommandLineParser; + +// HINSTANCE g_hInstance = 0; +extern CStdOutStream *g_StdStream; + +static const char *kCopyrightString = "\n7-Zip" +#ifndef EXTERNAL_CODECS +" (A)" +#endif + +#ifdef _WIN64 +" [64]" +#endif + +" " MY_VERSION_COPYRIGHT_DATE "\n" +"p7zip Version " P7ZIP_VERSION ; + +static const char *kHelpString = + "\nUsage: 7z" +#ifdef _NO_CRYPTO + "r" +#else +#ifndef EXTERNAL_CODECS + "a" +#endif +#endif + " [...] [...]\n" + " [<@listfiles...>]\n" + "\n" + "\n" + " a: Add files to archive\n" + " b: Benchmark\n" + " d: Delete files from archive\n" + " e: Extract files from archive (without using directory names)\n" + " l: List contents of archive\n" +// " l[a|t][f]: List contents of archive\n" +// " a - with Additional fields\n" +// " t - with all fields\n" +// " f - with Full pathnames\n" + " t: Test integrity of archive\n" + " u: Update files to archive\n" + " x: eXtract files with full paths\n" + "\n" + " -ai[r[-|0]]{@listfile|!wildcard}: Include archives\n" + " -ax[r[-|0]]{@listfile|!wildcard}: eXclude archives\n" + " -bd: Disable percentage indicator\n" + " -i[r[-|0]]{@listfile|!wildcard}: Include filenames\n" + " -m{Parameters}: set compression Method\n" + " -o{Directory}: set Output directory\n" + #ifndef _NO_CRYPTO + " -p{Password}: set Password\n" + #endif + " -r[-|0]: Recurse subdirectories\n" + " -scs{UTF-8 | WIN | DOS}: set charset for list files\n" + " -sfx[{name}]: Create SFX archive\n" + " -si[{name}]: read data from stdin\n" + " -slt: show technical information for l (List) command\n" + " -so: write data to stdout\n" + " -ssc[-]: set sensitive case mode\n" + " -t{Type}: Set type of archive\n" + " -u[-][p#][q#][r#][x#][y#][z#][!newArchiveName]: Update options\n" + " -v{Size}[b|k|m|g]: Create volumes\n" + " -w[{path}]: assign Work directory. Empty path means a temporary directory\n" + " -x[r[-|0]]]{@listfile|!wildcard}: eXclude filenames\n" + " -y: assume Yes on all queries\n"; + +// --------------------------- +// exception messages + +static const char *kEverythingIsOk = "Everything is Ok"; +static const char *kUserErrorMessage = "Incorrect command line"; +static const char *kNoFormats = "7-Zip cannot find the code that works with archives."; +static const char *kUnsupportedArcTypeMessage = "Unsupported archive type"; + +static const wchar_t *kDefaultSfxModule = L"7zCon.sfx"; + +static void ShowMessageAndThrowException(CStdOutStream &s, LPCSTR message, NExitCode::EEnum code) +{ + s << message << endl; + throw code; +} + +static void PrintHelpAndExit(CStdOutStream &s) +{ + s << kHelpString; + ShowMessageAndThrowException(s, kUserErrorMessage, NExitCode::kUserError); +} + +#ifndef _WIN32 +static void GetArguments(int numArgs, const char *args[], UStringVector &parts) +{ + parts.Clear(); + for (int i = 0; i < numArgs; i++) + { + UString s = MultiByteToUnicodeString(args[i]); + parts.Add(s); + } +} +#endif + +static void ShowCopyrightAndHelp(CStdOutStream &s, bool needHelp) +{ + s << kCopyrightString << " (locale=" << my_getlocale() <<",Utf16="; + if (global_use_utf16_conversion) s << "on"; + else s << "off"; + s << ",HugeFiles="; + if (sizeof(off_t) >= 8) s << "on,"; + else s << "off,"; + int nbcpu = NWindows::NSystem::GetNumberOfProcessors(); + if (nbcpu > 1) s << nbcpu << " CPUs)\n"; + else s << nbcpu << " CPU)\n"; + + if (needHelp) + s << kHelpString; +} + +#ifdef EXTERNAL_CODECS +static void PrintString(CStdOutStream &stdStream, const AString &s, int size) +{ + int len = s.Length(); + stdStream << s; + for (int i = len; i < size; i++) + stdStream << ' '; +} +#endif + +static void PrintString(CStdOutStream &stdStream, const UString &s, int size) +{ + int len = s.Length(); + stdStream << s; + for (int i = len; i < size; i++) + stdStream << ' '; +} + +static inline char GetHex(Byte value) +{ + return (char)((value < 10) ? ('0' + value) : ('A' + (value - 10))); +} + +int Main2( + #ifndef _WIN32 + int numArgs, const char *args[] + #endif +) +{ + #if defined(_WIN32) && !defined(UNDER_CE) + SetFileApisToOEM(); + #endif + + UStringVector commandStrings; + #ifdef _WIN32 + NCommandLineParser::SplitCommandLine(GetCommandLineW(), commandStrings); + #else + // GetArguments(numArgs, args, commandStrings); + extern void mySplitCommandLine(int numArgs,const char *args[],UStringVector &parts); + mySplitCommandLine(numArgs,args,commandStrings); + #endif + + if (commandStrings.Size() == 1) + { + ShowCopyrightAndHelp(g_StdOut, true); + return 0; + } + commandStrings.Delete(0); + + CArchiveCommandLineOptions options; + + CArchiveCommandLineParser parser; + + parser.Parse1(commandStrings, options); + + if (options.HelpMode) + { + ShowCopyrightAndHelp(g_StdOut, true); + return 0; + } + + #if defined(_7ZIP_LARGE_PAGES) + if (options.LargePages) + { + SetLargePageSize(); +#ifdef _WIN32 + NSecurity::EnableLockMemoryPrivilege(); +#endif + } + #endif + + CStdOutStream &stdStream = options.StdOutMode ? g_StdErr : g_StdOut; + g_StdStream = &stdStream; + + if (options.EnableHeaders) + ShowCopyrightAndHelp(stdStream, false); + + parser.Parse2(options); + + CCodecs *codecs = new CCodecs; + CMyComPtr< + #ifdef EXTERNAL_CODECS + ICompressCodecsInfo + #else + IUnknown + #endif + > compressCodecsInfo = codecs; + HRESULT result = codecs->Load(); + if (result != S_OK) + throw CSystemException(result); + + bool isExtractGroupCommand = options.Command.IsFromExtractGroup(); + + if (codecs->Formats.Size() == 0 && + (isExtractGroupCommand || + options.Command.CommandType == NCommandType::kList || + options.Command.IsFromUpdateGroup())) + throw kNoFormats; + + CIntVector formatIndices; + if (!codecs->FindFormatForArchiveType(options.ArcType, formatIndices)) + throw kUnsupportedArcTypeMessage; + + if (options.Command.CommandType == NCommandType::kInfo) + { + stdStream << endl << "Formats:" << endl; + int i; + for (i = 0; i < codecs->Formats.Size(); i++) + { + const CArcInfoEx &arc = codecs->Formats[i]; + #ifdef EXTERNAL_CODECS + if (arc.LibIndex >= 0) + { + char s[16]; + ConvertUInt32ToString(arc.LibIndex, s); + PrintString(stdStream, s, 2); + } + else + #endif + stdStream << " "; + stdStream << ' '; + stdStream << (char)(arc.UpdateEnabled ? 'C' : ' '); + stdStream << (char)(arc.KeepName ? 'K' : ' '); + stdStream << " "; + PrintString(stdStream, arc.Name, 6); + stdStream << " "; + UString s; + for (int t = 0; t < arc.Exts.Size(); t++) + { + const CArcExtInfo &ext = arc.Exts[t]; + s += ext.Ext; + if (!ext.AddExt.IsEmpty()) + { + s += L" ("; + s += ext.AddExt; + s += L')'; + } + s += L' '; + } + PrintString(stdStream, s, 14); + stdStream << " "; + const CByteBuffer &sig = arc.StartSignature; + for (size_t j = 0; j < sig.GetCapacity(); j++) + { + Byte b = sig[j]; + if (b > 0x20 && b < 0x80) + { + stdStream << (char)b; + } + else + { + stdStream << GetHex((Byte)((b >> 4) & 0xF)); + stdStream << GetHex((Byte)(b & 0xF)); + } + stdStream << ' '; + } + stdStream << endl; + } + stdStream << endl << "Codecs:" << endl; + + #ifdef EXTERNAL_CODECS + UInt32 numMethods; + if (codecs->GetNumberOfMethods(&numMethods) == S_OK) + for (UInt32 j = 0; j < numMethods; j++) + { + int libIndex = codecs->GetCodecLibIndex(j); + if (libIndex >= 0) + { + char s[16]; + ConvertUInt32ToString(libIndex, s); + PrintString(stdStream, s, 2); + } + else + stdStream << " "; + stdStream << ' '; + stdStream << (char)(codecs->GetCodecEncoderIsAssigned(j) ? 'C' : ' '); + UInt64 id; + stdStream << " "; + HRESULT res = codecs->GetCodecId(j, id); + if (res != S_OK) + id = (UInt64)(Int64)-1; + char s[32]; + ConvertUInt64ToString(id, s, 16); + PrintString(stdStream, s, 8); + stdStream << " "; + PrintString(stdStream, codecs->GetCodecName(j), 11); + stdStream << endl; + /* + if (res != S_OK) + throw "incorrect Codec ID"; + */ + } + #endif + return S_OK; + } + else if (options.Command.CommandType == NCommandType::kBenchmark) + { + if (options.Method.CompareNoCase(L"CRC") == 0) + { + HRESULT res = CrcBenchCon((FILE *)stdStream, options.NumIterations, options.NumThreads, options.DictionarySize); + if (res != S_OK) + { + if (res == S_FALSE) + { + stdStream << "\nCRC Error\n"; + return NExitCode::kFatalError; + } + throw CSystemException(res); + } + } + else + { + HRESULT res; + #ifdef EXTERNAL_CODECS + CObjectVector externalCodecs; + res = LoadExternalCodecs(compressCodecsInfo, externalCodecs); + if (res != S_OK) + throw CSystemException(res); + #endif + res = LzmaBenchCon( + #ifdef EXTERNAL_CODECS + compressCodecsInfo, &externalCodecs, + #endif + (FILE *)stdStream, options.NumIterations, options.NumThreads, options.DictionarySize); + if (res != S_OK) + { + if (res == S_FALSE) + { + stdStream << "\nDecoding Error\n"; + return NExitCode::kFatalError; + } + throw CSystemException(res); + } + } + } + else if (isExtractGroupCommand || options.Command.CommandType == NCommandType::kList) + { + if (isExtractGroupCommand) + { + CExtractCallbackConsole *ecs = new CExtractCallbackConsole; + CMyComPtr extractCallback = ecs; + + ecs->OutStream = &stdStream; + + #ifndef _NO_CRYPTO + ecs->PasswordIsDefined = options.PasswordEnabled; + ecs->Password = options.Password; + #endif + + ecs->Init(); + + COpenCallbackConsole openCallback; + openCallback.OutStream = &stdStream; + + #ifndef _NO_CRYPTO + openCallback.PasswordIsDefined = options.PasswordEnabled; + openCallback.Password = options.Password; + #endif + + CExtractOptions eo; + eo.StdInMode = options.StdInMode; + eo.StdOutMode = options.StdOutMode; + eo.PathMode = options.Command.GetPathMode(); + eo.TestMode = options.Command.IsTestMode(); + eo.OverwriteMode = options.OverwriteMode; + eo.OutputDir = options.OutputDir; + eo.YesToAll = options.YesToAll; + eo.CalcCrc = options.CalcCrc; + #if !defined(_7ZIP_ST) && !defined(_SFX) + eo.Properties = options.ExtractProperties; + #endif + UString errorMessage; + CDecompressStat stat; + HRESULT result = DecompressArchives( + codecs, + formatIndices, + options.ArchivePathsSorted, + options.ArchivePathsFullSorted, + options.WildcardCensor.Pairs.Front().Head, + eo, &openCallback, ecs, errorMessage, stat); + if (!errorMessage.IsEmpty()) + { + stdStream << endl << "Error: " << errorMessage; + if (result == S_OK) + result = E_FAIL; + } + + stdStream << endl; + if (ecs->NumArchives > 1) + stdStream << "Archives: " << ecs->NumArchives << endl; + if (ecs->NumArchiveErrors != 0 || ecs->NumFileErrors != 0) + { + if (ecs->NumArchives > 1) + { + stdStream << endl; + if (ecs->NumArchiveErrors != 0) + stdStream << "Archive Errors: " << ecs->NumArchiveErrors << endl; + if (ecs->NumFileErrors != 0) + stdStream << "Sub items Errors: " << ecs->NumFileErrors << endl; + } + if (result != S_OK) + throw CSystemException(result); + return NExitCode::kFatalError; + } + if (result != S_OK) + throw CSystemException(result); + if (stat.NumFolders != 0) + stdStream << "Folders: " << stat.NumFolders << endl; + if (stat.NumFiles != 1 || stat.NumFolders != 0) + stdStream << "Files: " << stat.NumFiles << endl; + stdStream + << "Size: " << stat.UnpackSize << endl + << "Compressed: " << stat.PackSize << endl; + if (options.CalcCrc) + { + char s[16]; + ConvertUInt32ToHexWithZeros(stat.CrcSum, s); + stdStream << "CRC: " << s << endl; + } + } + else + { + UInt64 numErrors = 0; + HRESULT result = ListArchives( + codecs, + formatIndices, + options.StdInMode, + options.ArchivePathsSorted, + options.ArchivePathsFullSorted, + options.WildcardCensor.Pairs.Front().Head, + options.EnableHeaders, + options.TechMode, + #ifndef _NO_CRYPTO + options.PasswordEnabled, + options.Password, + #endif + numErrors); + if (numErrors > 0) + { + g_StdOut << endl << "Errors: " << numErrors; + return NExitCode::kFatalError; + } + if (result != S_OK) + throw CSystemException(result); + } + } + else if (options.Command.IsFromUpdateGroup()) + { + CUpdateOptions &uo = options.UpdateOptions; + if (uo.SfxMode && uo.SfxModule.IsEmpty()) + uo.SfxModule = kDefaultSfxModule; + + COpenCallbackConsole openCallback; + openCallback.OutStream = &stdStream; + + #ifndef _NO_CRYPTO + bool passwordIsDefined = + options.PasswordEnabled && !options.Password.IsEmpty(); + openCallback.PasswordIsDefined = passwordIsDefined; + openCallback.Password = options.Password; + #endif + + CUpdateCallbackConsole callback; + callback.EnablePercents = options.EnablePercents; + + #ifndef _NO_CRYPTO + callback.PasswordIsDefined = passwordIsDefined; + callback.AskPassword = options.PasswordEnabled && options.Password.IsEmpty(); + callback.Password = options.Password; + #endif + callback.StdOutMode = uo.StdOutMode; + callback.Init(&stdStream); + + CUpdateErrorInfo errorInfo; + + if (!uo.Init(codecs, formatIndices, options.ArchiveName)) + throw kUnsupportedArcTypeMessage; + HRESULT result = UpdateArchive(codecs, + options.WildcardCensor, uo, + errorInfo, &openCallback, &callback); + +#ifdef ENV_UNIX + if (uo.SfxMode) + { + void myAddExeFlag(const UString &name); + for(int i = 0; i < uo.Commands.Size(); i++) + { + CUpdateArchiveCommand &command = uo.Commands[i]; + if (!uo.StdOutMode) + { + myAddExeFlag(command.ArchivePath.GetFinalPath()); + } + } + } +#endif + + int exitCode = NExitCode::kSuccess; + if (callback.CantFindFiles.Size() > 0) + { + stdStream << endl; + stdStream << "WARNINGS for files:" << endl << endl; + int numErrors = callback.CantFindFiles.Size(); + for (int i = 0; i < numErrors; i++) + { + stdStream << callback.CantFindFiles[i] << " : "; + stdStream << NError::MyFormatMessageW(callback.CantFindCodes[i]) << endl; + } + stdStream << "----------------" << endl; + stdStream << "WARNING: Cannot find " << numErrors << " file"; + if (numErrors > 1) + stdStream << "s"; + stdStream << endl; + exitCode = NExitCode::kWarning; + } + + if (result != S_OK) + { + UString message; + if (!errorInfo.Message.IsEmpty()) + { + message += errorInfo.Message; + message += L"\n"; + } + if (!errorInfo.FileName.IsEmpty()) + { + message += errorInfo.FileName; + message += L"\n"; + } + if (!errorInfo.FileName2.IsEmpty()) + { + message += errorInfo.FileName2; + message += L"\n"; + } + if (errorInfo.SystemError != 0) + { + message += NError::MyFormatMessageW(errorInfo.SystemError); + message += L"\n"; + } + if (!message.IsEmpty()) + stdStream << L"\nError:\n" << message; + throw CSystemException(result); + } + int numErrors = callback.FailedFiles.Size(); + if (numErrors == 0) + { + if (callback.CantFindFiles.Size() == 0) + stdStream << kEverythingIsOk << endl; + } + else + { + stdStream << endl; + stdStream << "WARNINGS for files:" << endl << endl; + for (int i = 0; i < numErrors; i++) + { + stdStream << callback.FailedFiles[i] << " : "; + stdStream << NError::MyFormatMessageW(callback.FailedCodes[i]) << endl; + } + stdStream << "----------------" << endl; + stdStream << "WARNING: Cannot open " << numErrors << " file"; + if (numErrors > 1) + stdStream << "s"; + stdStream << endl; + exitCode = NExitCode::kWarning; + } + return exitCode; + } + else + PrintHelpAndExit(stdStream); + return 0; +} diff --git a/CPP/7zip/UI/Console/MainAr.cpp b/CPP/7zip/UI/Console/MainAr.cpp new file mode 100644 index 0000000..6805957 --- /dev/null +++ b/CPP/7zip/UI/Console/MainAr.cpp @@ -0,0 +1,127 @@ +// MainAr.cpp + +#include "StdAfx.h" + +#include "Common/NewHandler.h" // FIXME + +#include "Common/MyException.h" +#include "Common/StdOutStream.h" + +#include "Windows/Error.h" +#include "Windows/NtCheck.h" + +#include "../Common/ArchiveCommandLine.h" +#include "../Common/ExitCode.h" + +#include "ConsoleClose.h" + +using namespace NWindows; + +CStdOutStream *g_StdStream = 0; + +extern int Main2( + #ifndef _WIN32 + int numArgs, const char *args[] + #endif +); + +static const char *kExceptionErrorMessage = "\n\nError:\n"; +static const char *kUserBreak = "\nBreak signaled\n"; +static const char *kMemoryExceptionMessage = "\n\nERROR: Can't allocate required memory!\n"; +static const char *kUnknownExceptionMessage = "\n\nUnknown Error\n"; +static const char *kInternalExceptionMessage = "\n\nInternal Error #"; + +#define NT_CHECK_FAIL_ACTION (*g_StdStream) << "Unsupported Windows version"; return NExitCode::kFatalError; + +int MY_CDECL main +( + #ifndef _WIN32 + int numArgs, const char *args[] + #endif +) +{ + g_StdStream = &g_StdOut; + + NT_CHECK + + NConsoleClose::CCtrlHandlerSetter ctrlHandlerSetter; + int res = 0; + try + { + res = Main2( + #ifndef _WIN32 + numArgs, args + #endif + ); + } + catch(const CNewException &) + { + (*g_StdStream) << kMemoryExceptionMessage; + return (NExitCode::kMemoryError); + } + catch(const NConsoleClose::CCtrlBreakException &) + { + (*g_StdStream) << endl << kUserBreak; + return (NExitCode::kUserBreak); + } + catch(const CArchiveCommandLineException &e) + { + (*g_StdStream) << kExceptionErrorMessage << e << endl; + return (NExitCode::kUserError); + } + catch(const CSystemException &systemError) + { + if (systemError.ErrorCode == E_OUTOFMEMORY) + { + (*g_StdStream) << kMemoryExceptionMessage; + return (NExitCode::kMemoryError); + } + if (systemError.ErrorCode == E_ABORT) + { + (*g_StdStream) << endl << kUserBreak; + return (NExitCode::kUserBreak); + } + UString message; + NError::MyFormatMessage(systemError.ErrorCode, message); + (*g_StdStream) << endl << endl << "System error:" << endl << message << endl; + return (NExitCode::kFatalError); + } + catch(NExitCode::EEnum &exitCode) + { + (*g_StdStream) << kInternalExceptionMessage << exitCode << endl; + return (exitCode); + } + /* + catch(const NExitCode::CMultipleErrors &multipleErrors) + { + (*g_StdStream) << endl << multipleErrors.NumErrors << " errors" << endl; + return (NExitCode::kFatalError); + } + */ + catch(const UString &s) + { + (*g_StdStream) << kExceptionErrorMessage << s << endl; + return (NExitCode::kFatalError); + } + catch(const AString &s) + { + (*g_StdStream) << kExceptionErrorMessage << s << endl; + return (NExitCode::kFatalError); + } + catch(const char *s) + { + (*g_StdStream) << kExceptionErrorMessage << s << endl; + return (NExitCode::kFatalError); + } + catch(int t) + { + (*g_StdStream) << kInternalExceptionMessage << t << endl; + return (NExitCode::kFatalError); + } + catch(...) + { + (*g_StdStream) << kUnknownExceptionMessage; + return (NExitCode::kFatalError); + } + return res; +} diff --git a/CPP/7zip/UI/Console/OpenCallbackConsole.cpp b/CPP/7zip/UI/Console/OpenCallbackConsole.cpp new file mode 100644 index 0000000..7dba2ad --- /dev/null +++ b/CPP/7zip/UI/Console/OpenCallbackConsole.cpp @@ -0,0 +1,58 @@ +// OpenCallbackConsole.cpp + +#include "StdAfx.h" + +#include "OpenCallbackConsole.h" + +#include "ConsoleClose.h" +#include "UserInputUtils.h" + +HRESULT COpenCallbackConsole::Open_CheckBreak() +{ + if (NConsoleClose::TestBreakSignal()) + return E_ABORT; + return S_OK; +} + +HRESULT COpenCallbackConsole::Open_SetTotal(const UInt64 *, const UInt64 *) +{ + return Open_CheckBreak(); +} + +HRESULT COpenCallbackConsole::Open_SetCompleted(const UInt64 *, const UInt64 *) +{ + return Open_CheckBreak(); +} + +#ifndef _NO_CRYPTO + +HRESULT COpenCallbackConsole::Open_CryptoGetTextPassword(BSTR *password) +{ + PasswordWasAsked = true; + RINOK(Open_CheckBreak()); + if (!PasswordIsDefined) + { + Password = GetPassword(OutStream); + PasswordIsDefined = true; + } + return StringToBstr(Password, password); +} + +HRESULT COpenCallbackConsole::Open_GetPasswordIfAny(UString &password) +{ + if (PasswordIsDefined) + password = Password; + return S_OK; +} + +bool COpenCallbackConsole::Open_WasPasswordAsked() +{ + return PasswordWasAsked; +} + +void COpenCallbackConsole::Open_ClearPasswordWasAskedFlag() +{ + PasswordWasAsked = false; +} + +#endif diff --git a/CPP/7zip/UI/Console/OpenCallbackConsole.h b/CPP/7zip/UI/Console/OpenCallbackConsole.h new file mode 100644 index 0000000..c002e6a --- /dev/null +++ b/CPP/7zip/UI/Console/OpenCallbackConsole.h @@ -0,0 +1,24 @@ +// OpenCallbackConsole.h + +#ifndef __OPENCALLBACKCONSOLE_H +#define __OPENCALLBACKCONSOLE_H + +#include "Common/StdOutStream.h" +#include "../Common/ArchiveOpenCallback.h" + +class COpenCallbackConsole: public IOpenCallbackUI +{ +public: + INTERFACE_IOpenCallbackUI(;) + + CStdOutStream *OutStream; + + #ifndef _NO_CRYPTO + bool PasswordIsDefined; + bool PasswordWasAsked; + UString Password; + COpenCallbackConsole(): PasswordIsDefined(false), PasswordWasAsked(false) {} + #endif +}; + +#endif diff --git a/CPP/7zip/UI/Console/PercentPrinter.cpp b/CPP/7zip/UI/Console/PercentPrinter.cpp new file mode 100644 index 0000000..28452b1 --- /dev/null +++ b/CPP/7zip/UI/Console/PercentPrinter.cpp @@ -0,0 +1,90 @@ +// PercentPrinter.cpp + +#include "StdAfx.h" + +#include "Common/IntToString.h" +#include "Common/MyString.h" + +#include "PercentPrinter.h" + +const int kPaddingSize = 2; +const int kPercentsSize = 4; +const int kMaxExtraSize = kPaddingSize + 32 + kPercentsSize; + +static void ClearPrev(char *p, int num) +{ + int i; + for (i = 0; i < num; i++) *p++ = '\b'; + for (i = 0; i < num; i++) *p++ = ' '; + for (i = 0; i < num; i++) *p++ = '\b'; + *p = '\0'; +} + +void CPercentPrinter::ClosePrint() +{ + if (m_NumExtraChars == 0) + return; + char s[kMaxExtraSize * 3 + 1]; + ClearPrev(s, m_NumExtraChars); + (*OutStream) << s; + m_NumExtraChars = 0; +} + +void CPercentPrinter::PrintString(const char *s) +{ + ClosePrint(); + (*OutStream) << s; +} + +void CPercentPrinter::PrintString(const wchar_t *s) +{ + ClosePrint(); + (*OutStream) << s; +} + +void CPercentPrinter::PrintNewLine() +{ + ClosePrint(); + (*OutStream) << "\n"; +} + +void CPercentPrinter::RePrintRatio() +{ + char s[32]; + ConvertUInt64ToString(((m_Total == 0) ? 0 : (m_CurValue * 100 / m_Total)), s); + int size = (int)strlen(s); + s[size++] = '%'; + s[size] = '\0'; + + int extraSize = kPaddingSize + MyMax(size, kPercentsSize); + if (extraSize < m_NumExtraChars) + extraSize = m_NumExtraChars; + + char fullString[kMaxExtraSize * 3]; + char *p = fullString; + int i; + if (m_NumExtraChars == 0) + { + for (i = 0; i < extraSize; i++) + *p++ = ' '; + m_NumExtraChars = extraSize; + } + + for (i = 0; i < m_NumExtraChars; i++) + *p++ = '\b'; + m_NumExtraChars = extraSize; + for (; size < m_NumExtraChars; size++) + *p++ = ' '; + MyStringCopy(p, s); + (*OutStream) << fullString; + OutStream->Flush(); + m_PrevValue = m_CurValue; +} + +void CPercentPrinter::PrintRatio() +{ + if (m_CurValue < m_PrevValue + m_MinStepSize && + m_CurValue + m_MinStepSize > m_PrevValue && m_NumExtraChars != 0) + return; + RePrintRatio(); +} diff --git a/CPP/7zip/UI/Console/PercentPrinter.h b/CPP/7zip/UI/Console/PercentPrinter.h new file mode 100644 index 0000000..97f2e6a --- /dev/null +++ b/CPP/7zip/UI/Console/PercentPrinter.h @@ -0,0 +1,31 @@ +// PercentPrinter.h + +#ifndef __PERCENTPRINTER_H +#define __PERCENTPRINTER_H + +#include "Common/Types.h" +#include "Common/StdOutStream.h" + +class CPercentPrinter +{ + UInt64 m_MinStepSize; + UInt64 m_PrevValue; + UInt64 m_CurValue; + UInt64 m_Total; + int m_NumExtraChars; +public: + CStdOutStream *OutStream; + + CPercentPrinter(UInt64 minStepSize = 1): m_MinStepSize(minStepSize), + m_PrevValue(0), m_CurValue(0), m_Total(1), m_NumExtraChars(0) {} + void SetTotal(UInt64 total) { m_Total = total; m_PrevValue = 0; } + void SetRatio(UInt64 doneValue) { m_CurValue = doneValue; } + void PrintString(const char *s); + void PrintString(const wchar_t *s); + void PrintNewLine(); + void ClosePrint(); + void RePrintRatio(); + void PrintRatio(); +}; + +#endif diff --git a/CPP/7zip/UI/Console/UpdateCallbackConsole.cpp b/CPP/7zip/UI/Console/UpdateCallbackConsole.cpp new file mode 100644 index 0000000..e0eb4de --- /dev/null +++ b/CPP/7zip/UI/Console/UpdateCallbackConsole.cpp @@ -0,0 +1,261 @@ +// UpdateCallbackConsole.cpp + +#include "StdAfx.h" + +#include "UpdateCallbackConsole.h" + +#include "Windows/Error.h" +#ifndef _7ZIP_ST +#include "Windows/Synchronization.h" +#endif + +#include "ConsoleClose.h" +#include "UserInputUtils.h" + +using namespace NWindows; + +#ifndef _7ZIP_ST +static NSynchronization::CCriticalSection g_CriticalSection; +#define MT_LOCK NSynchronization::CCriticalSectionLock lock(g_CriticalSection); +#else +#define MT_LOCK +#endif + +static const wchar_t *kEmptyFileAlias = L"[Content]"; + +static const char *kCreatingArchiveMessage = "Creating archive "; +static const char *kUpdatingArchiveMessage = "Updating archive "; +static const char *kScanningMessage = "Scanning"; + + +HRESULT CUpdateCallbackConsole::OpenResult(const wchar_t *name, HRESULT result) +{ + (*OutStream) << endl; + if (result != S_OK) + (*OutStream) << "Error: " << name << " is not supported archive" << endl; + return S_OK; +} + +HRESULT CUpdateCallbackConsole::StartScanning() +{ + (*OutStream) << kScanningMessage; + return S_OK; +} + +HRESULT CUpdateCallbackConsole::ScanProgress(UInt64 /* numFolders */, UInt64 /* numFiles */, const wchar_t * /* path */) +{ + return CheckBreak(); +} + +HRESULT CUpdateCallbackConsole::CanNotFindError(const wchar_t *name, DWORD systemError) +{ + CantFindFiles.Add(name); + CantFindCodes.Add(systemError); + // m_PercentPrinter.ClosePrint(); + if (!m_WarningsMode) + { + (*OutStream) << endl << endl; + m_PercentPrinter.PrintNewLine(); + m_WarningsMode = true; + } + m_PercentPrinter.PrintString(name); + m_PercentPrinter.PrintString(": WARNING: "); + m_PercentPrinter.PrintString(NError::MyFormatMessageW(systemError)); + m_PercentPrinter.PrintNewLine(); + return S_OK; +} + +HRESULT CUpdateCallbackConsole::FinishScanning() +{ + (*OutStream) << endl << endl; + return S_OK; +} + +HRESULT CUpdateCallbackConsole::StartArchive(const wchar_t *name, bool updating) +{ + if(updating) + (*OutStream) << kUpdatingArchiveMessage; + else + (*OutStream) << kCreatingArchiveMessage; + if (name != 0) + (*OutStream) << name; + else + (*OutStream) << "StdOut"; + (*OutStream) << endl << endl; + return S_OK; +} + +HRESULT CUpdateCallbackConsole::FinishArchive() +{ + (*OutStream) << endl; + return S_OK; +} + +HRESULT CUpdateCallbackConsole::CheckBreak() +{ + if (NConsoleClose::TestBreakSignal()) + return E_ABORT; + return S_OK; +} + +HRESULT CUpdateCallbackConsole::Finilize() +{ + MT_LOCK + if (m_NeedBeClosed) + { + if (EnablePercents) + { + m_PercentPrinter.ClosePrint(); + } + if (!StdOutMode && m_NeedNewLine) + { + m_PercentPrinter.PrintNewLine(); + m_NeedNewLine = false; + } + m_NeedBeClosed = false; + } + return S_OK; +} + +HRESULT CUpdateCallbackConsole::SetNumFiles(UInt64 /* numFiles */) +{ + return S_OK; +} + +HRESULT CUpdateCallbackConsole::SetTotal(UInt64 size) +{ + MT_LOCK + if (EnablePercents) + m_PercentPrinter.SetTotal(size); + return S_OK; +} + +HRESULT CUpdateCallbackConsole::SetCompleted(const UInt64 *completeValue) +{ + MT_LOCK + if (completeValue != NULL) + { + if (EnablePercents) + { + m_PercentPrinter.SetRatio(*completeValue); + m_PercentPrinter.PrintRatio(); + m_NeedBeClosed = true; + } + } + if (NConsoleClose::TestBreakSignal()) + return E_ABORT; + return S_OK; +} + +HRESULT CUpdateCallbackConsole::SetRatioInfo(const UInt64 * /* inSize */, const UInt64 * /* outSize */) +{ + if (NConsoleClose::TestBreakSignal()) + return E_ABORT; + return S_OK; +} + +HRESULT CUpdateCallbackConsole::GetStream(const wchar_t *name, bool isAnti) +{ + MT_LOCK + if (StdOutMode) + return S_OK; + if(isAnti) + m_PercentPrinter.PrintString("Anti item "); + else + m_PercentPrinter.PrintString("Compressing "); + if (name[0] == 0) + name = kEmptyFileAlias; + m_PercentPrinter.PrintString(name); + if (EnablePercents) + m_PercentPrinter.RePrintRatio(); + return S_OK; +} + +HRESULT CUpdateCallbackConsole::OpenFileError(const wchar_t *name, DWORD systemError) +{ + MT_LOCK + FailedCodes.Add(systemError); + FailedFiles.Add(name); + // if (systemError == ERROR_SHARING_VIOLATION) + { + m_PercentPrinter.ClosePrint(); + m_PercentPrinter.PrintNewLine(); + m_PercentPrinter.PrintString("WARNING: "); + m_PercentPrinter.PrintString(NError::MyFormatMessageW(systemError)); + return S_FALSE; + } + // return systemError; +} + +HRESULT CUpdateCallbackConsole::SetOperationResult(Int32 ) +{ + m_NeedBeClosed = true; + m_NeedNewLine = true; + return S_OK; +} + +HRESULT CUpdateCallbackConsole::CryptoGetTextPassword2(Int32 *passwordIsDefined, BSTR *password) +{ + *password = NULL; + + #ifdef _NO_CRYPTO + + *passwordIsDefined = false; + return S_OK; + + #else + + if (!PasswordIsDefined) + { + if (AskPassword) + { + Password = GetPassword(OutStream,true); + PasswordIsDefined = true; + } + } + *passwordIsDefined = BoolToInt(PasswordIsDefined); + return StringToBstr(Password, password); + + #endif +} + +HRESULT CUpdateCallbackConsole::CryptoGetTextPassword(BSTR *password) +{ + *password = NULL; + + #ifdef _NO_CRYPTO + + return E_NOTIMPL; + + #else + + if (!PasswordIsDefined) + { + { + Password = GetPassword(OutStream); + PasswordIsDefined = true; + } + } + return StringToBstr(Password, password); + + #endif +} + +/* +HRESULT CUpdateCallbackConsole::ShowDeleteFile(const wchar_t *name) +{ + // MT_LOCK + if (StdOutMode) + return S_OK; + RINOK(Finilize()); + m_PercentPrinter.PrintString("Deleting "); + if (name[0] == 0) + name = kEmptyFileAlias; + m_PercentPrinter.PrintString(name); + if (EnablePercents) + m_PercentPrinter.RePrintRatio(); + m_NeedBeClosed = true; + m_NeedNewLine = true; + return S_OK; +} +*/ diff --git a/CPP/7zip/UI/Console/UpdateCallbackConsole.h b/CPP/7zip/UI/Console/UpdateCallbackConsole.h new file mode 100644 index 0000000..5ffe3eb --- /dev/null +++ b/CPP/7zip/UI/Console/UpdateCallbackConsole.h @@ -0,0 +1,62 @@ +// UpdateCallbackConsole.h + +#ifndef __UPDATE_CALLBACK_CONSOLE_H +#define __UPDATE_CALLBACK_CONSOLE_H + +#include "Common/StdOutStream.h" + +#include "../Common/Update.h" + +#include "PercentPrinter.h" + +class CUpdateCallbackConsole: public IUpdateCallbackUI2 +{ + CPercentPrinter m_PercentPrinter; + bool m_NeedBeClosed; + bool m_NeedNewLine; + + bool m_WarningsMode; + + CStdOutStream *OutStream; +public: + bool EnablePercents; + bool StdOutMode; + + #ifndef _NO_CRYPTO + bool PasswordIsDefined; + UString Password; + bool AskPassword; + #endif + + CUpdateCallbackConsole(): + m_PercentPrinter(1 << 16), + #ifndef _NO_CRYPTO + PasswordIsDefined(false), + AskPassword(false), + #endif + StdOutMode(false), + EnablePercents(true), + m_WarningsMode(false) + {} + + ~CUpdateCallbackConsole() { Finilize(); } + void Init(CStdOutStream *outStream) + { + m_NeedBeClosed = false; + m_NeedNewLine = false; + FailedFiles.Clear(); + FailedCodes.Clear(); + OutStream = outStream; + m_PercentPrinter.OutStream = outStream; + } + + INTERFACE_IUpdateCallbackUI2(;) + + UStringVector FailedFiles; + CRecordVector FailedCodes; + + UStringVector CantFindFiles; + CRecordVector CantFindCodes; +}; + +#endif diff --git a/CPP/7zip/UI/Console/UserInputUtils.cpp b/CPP/7zip/UI/Console/UserInputUtils.cpp new file mode 100644 index 0000000..4733e4f --- /dev/null +++ b/CPP/7zip/UI/Console/UserInputUtils.cpp @@ -0,0 +1,96 @@ +// UserInputUtils.cpp + +#include "StdAfx.h" + +#include "Common/StdInStream.h" +#include "Common/StringConvert.h" + +#include "UserInputUtils.h" + +#ifdef USE_FLTK +// the programs like file-roller or xarchiver do not support archives with password +// these programs freeze because p7zip is waiting for a password +// defining USE_FLTK allows p7zip to use a popup in order to ask the password. +#include +#include +#include +#else +#ifdef ENV_HAVE_GETPASS +#include +#include +#include "Common/MyException.h" +#endif +#endif + +static const char kYes = 'Y'; +static const char kNo = 'N'; +static const char kYesAll = 'A'; +static const char kNoAll = 'S'; +static const char kAutoRenameAll = 'U'; +static const char kQuit = 'Q'; + +static const char *kFirstQuestionMessage = "?\n"; +static const char *kHelpQuestionMessage = + "(Y)es / (N)o / (A)lways / (S)kip all / A(u)to rename all / (Q)uit? "; + +// return true if pressed Quite; + +NUserAnswerMode::EEnum ScanUserYesNoAllQuit(CStdOutStream *outStream) +{ + (*outStream) << kFirstQuestionMessage; + for (;;) + { + (*outStream) << kHelpQuestionMessage; + outStream->Flush(); + AString scannedString = g_StdIn.ScanStringUntilNewLine(); + scannedString.Trim(); + if (!scannedString.IsEmpty()) + switch( + ::MyCharUpper( + #ifdef UNDER_CE + (wchar_t) + #endif + scannedString[0])) + { + case kYes: + return NUserAnswerMode::kYes; + case kNo: + return NUserAnswerMode::kNo; + case kYesAll: + return NUserAnswerMode::kYesAll; + case kNoAll: + return NUserAnswerMode::kNoAll; + case kAutoRenameAll: + return NUserAnswerMode::kAutoRenameAll; + case kQuit: + return NUserAnswerMode::kQuit; + } + } +} + +UString GetPassword(CStdOutStream *outStream,bool verify) +{ +#ifdef USE_FLTK + const char *r = fl_password("Enter password", 0); + AString oemPassword = ""; + if (r) oemPassword = r; +#else /* USE_FLTK */ +#ifdef ENV_HAVE_GETPASS + (*outStream) << "\nEnter password (will not be echoed) :"; + outStream->Flush(); + AString oemPassword = getpass(""); + if (verify) + { + (*outStream) << "Verify password (will not be echoed) :"; + outStream->Flush(); + AString oemPassword2 = getpass(""); + if (oemPassword != oemPassword2) throw "password verification failed"; + } +#else + (*outStream) << "\nEnter password:"; + outStream->Flush(); + AString oemPassword = g_StdIn.ScanStringUntilNewLine(); +#endif +#endif /* USE_FLTK */ + return MultiByteToUnicodeString(oemPassword, CP_OEMCP); +} diff --git a/CPP/7zip/UI/Console/UserInputUtils.h b/CPP/7zip/UI/Console/UserInputUtils.h new file mode 100644 index 0000000..8c57519 --- /dev/null +++ b/CPP/7zip/UI/Console/UserInputUtils.h @@ -0,0 +1,24 @@ +// UserInputUtils.h + +#ifndef __USERINPUTUTILS_H +#define __USERINPUTUTILS_H + +#include "Common/StdOutStream.h" + +namespace NUserAnswerMode { + +enum EEnum +{ + kYes, + kNo, + kYesAll, + kNoAll, + kAutoRenameAll, + kQuit +}; +} + +NUserAnswerMode::EEnum ScanUserYesNoAllQuit(CStdOutStream *outStream); +UString GetPassword(CStdOutStream *outStream,bool verify = false); + +#endif diff --git a/CPP/7zip/UI/Console/makefile b/CPP/7zip/UI/Console/makefile new file mode 100644 index 0000000..8ca4674 --- /dev/null +++ b/CPP/7zip/UI/Console/makefile @@ -0,0 +1,109 @@ +PROG=../../../../bin/7z$(BINSUFFIX) + +LOCAL_FLAGS=\ + -DEXTERNAL_LZMA \ + -DEXTERNAL_CODECS \ + -DBREAK_HANDLER \ + -DUNICODE -D_UNICODE + +include ../../../../makefile.crc32 +include ../../../../makefile.machine + +PCH_NAME=$(PRE_COMPILED_HEADER) + +LIBS=$(LOCAL_LIBS_DLL) + +CONSOLE_OBJS = \ + ConsoleClose.o \ + ExtractCallbackConsole.o \ + BenchCon.o \ + List.o \ + Main.o \ + MainAr.o \ + OpenCallbackConsole.o \ + PercentPrinter.o \ + UpdateCallbackConsole.o \ + UserInputUtils.o \ + +# NewHandler.o +COMMON_OBJS = \ + CommandLineParser.o \ + CRC.o \ + IntToString.o \ + ListFileUtils.o \ + StdInStream.o \ + StdOutStream.o \ + MyString.o \ + MyWindows.o \ + StringConvert.o \ + StringToInt.o \ + UTFConvert.o \ + MyVector.o \ + Wildcard.o \ + +# MemoryLock.o Registry.o +WIN_OBJS = \ + DLL.o \ + Error.o \ + FileDir.o \ + FileFind.o \ + FileIO.o \ + FileName.o \ + PropVariant.o \ + PropVariantConversions.o \ + System.o \ + Time.o \ + +7ZIP_COMMON_OBJS = \ + CreateCoder.o \ + FilePathAutoRename.o \ + FileStreams.o \ + FilterCoder.o \ + ProgressUtils.o \ + StreamUtils.o \ + +# WorkDir.o +UI_COMMON_OBJS = \ + ArchiveCommandLine.o \ + ArchiveExtractCallback.o \ + ArchiveOpenCallback.o \ + DefaultName.o \ + EnumDirItems.o \ + Extract.o \ + Bench.o \ + ExtractingFilePath.o \ + LoadCodecs.o \ + OpenArchive.o \ + PropIDUtils.o \ + SetProperties.o \ + SortUtils.o \ + TempFiles.o \ + Update.o \ + UpdateAction.o \ + UpdateCallback.o \ + UpdatePair.o \ + UpdateProduce.o \ + +AR_COMMON_OBJS = \ + OutStreamWithCRC.o \ + +C_OBJS = \ + Alloc.o \ + Threads.o \ + +OBJS = \ + mySplitCommandLine.o \ + myAddExeFlag.o \ + wine_date_and_time.o \ + $(CONSOLE_OBJS) \ + $(COMMON_OBJS) \ + $(WIN_OBJS) \ + $(7ZIP_COMMON_OBJS) \ + $(UI_COMMON_OBJS) \ + $(AR_COMMON_OBJS) \ + CopyCoder.o \ + $(C_OBJS) \ + $(OBJ_CRC32) + +include ../../../../makefile.glb + diff --git a/CPP/7zip/UI/Console/makefile.depend b/CPP/7zip/UI/Console/makefile.depend new file mode 100644 index 0000000..9bab9a5 --- /dev/null +++ b/CPP/7zip/UI/Console/makefile.depend @@ -0,0 +1,1252 @@ +myAddExeFlag.o: ../../../myWindows/myAddExeFlag.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../../myWindows/myPrivate.h ../../../Common/StringConvert.h \ + ../../../Common/MyWindows.h ../../../Common/MyString.h \ + ../../../Common/MyVector.h ../../../Common/Defs.h +mySplitCommandLine.o: ../../../myWindows/mySplitCommandLine.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../../myWindows/../Common/StringConvert.h \ + ../../../myWindows/../Common/MyWindows.h \ + ../../../myWindows/../Common/MyString.h \ + ../../../myWindows/../Common/MyVector.h \ + ../../../myWindows/../Common/Defs.h ../../../myWindows/../Common/Types.h \ + ../../../myWindows/myPrivate.h +wine_date_and_time.o: ../../../myWindows/wine_date_and_time.cpp \ + ../../../myWindows/config.h ../../../include_windows/windows.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../include_windows/basetyps.h +ConsoleClose.o: ../../UI/Console/ConsoleClose.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../UI/Console/ConsoleClose.h +ExtractCallbackConsole.o: ../../UI/Console/ExtractCallbackConsole.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../UI/Console/ExtractCallbackConsole.h ../../../Common/MyString.h \ + ../../../Common/MyVector.h ../../../Common/Defs.h \ + ../../../Common/StdOutStream.h \ + ../../UI/Console/../../Common/FileStreams.h \ + ../../UI/Console/../../Common/../../Windows/FileIO.h \ + ../../UI/Console/../../Common/../../Common/MyCom.h \ + ../../UI/Console/../../Common/../../Common/MyWindows.h \ + ../../UI/Console/../../Common/../IStream.h \ + ../../UI/Console/../../Common/../../Common/MyUnknown.h \ + ../../UI/Console/../../Common/../../Common/Types.h \ + ../../UI/Console/../../Common/../IDecl.h \ + ../../UI/Console/../../IPassword.h \ + ../../UI/Console/../../../Common/MyUnknown.h \ + ../../UI/Console/../../../Common/Types.h ../../UI/Console/../../IDecl.h \ + ../../UI/Console/../../Archive/IArchive.h \ + ../../UI/Console/../../Archive/../IProgress.h \ + ../../UI/Console/../../Archive/../../Common/MyUnknown.h \ + ../../UI/Console/../../Archive/../../Common/Types.h \ + ../../UI/Console/../../Archive/../IDecl.h \ + ../../UI/Console/../../Archive/../IStream.h \ + ../../UI/Console/../../Archive/../PropID.h \ + ../../UI/Console/../Common/ArchiveExtractCallback.h \ + ../../../Common/MyCom.h ../../../Common/Wildcard.h \ + ../../../Common/MyString.h ../../UI/Console/../Common/../../IPassword.h \ + ../../UI/Console/../Common/../../Common/FileStreams.h \ + ../../UI/Console/../Common/../../Common/ProgressUtils.h \ + ../../UI/Console/../Common/../../Common/../../Common/MyCom.h \ + ../../UI/Console/../Common/../../Common/../ICoder.h \ + ../../UI/Console/../Common/../../Common/../IStream.h \ + ../../UI/Console/../Common/../../Common/../IProgress.h \ + ../../UI/Console/../Common/../../Archive/IArchive.h \ + ../../UI/Console/../Common/../../Archive/Common/OutStreamWithCRC.h \ + ../../UI/Console/../Common/../../Archive/Common/../../../../C/7zCrc.h \ + ../../UI/Console/../Common/../../Archive/Common/../../../../C/Types.h \ + ../../UI/Console/../Common/../../Archive/Common/../../../Common/MyCom.h \ + ../../UI/Console/../Common/../../Archive/Common/../../IStream.h \ + ../../UI/Console/../Common/ExtractMode.h \ + ../../UI/Console/../Common/IFileExtractCallback.h \ + ../../UI/Console/../Common/../../IDecl.h \ + ../../UI/Console/../Common/OpenArchive.h ../../../Windows/FileFind.h \ + ../../../Windows/../Common/MyString.h ../../../Windows/FileName.h \ + ../../../Windows/../../C/Types.h ../../../Windows/Defs.h \ + ../../../Windows/../Common/MyWindows.h \ + ../../UI/Console/../Common/ArchiveOpenCallback.h \ + ../../UI/Console/../Common/LoadCodecs.h \ + ../../UI/Console/../Common/../../../Common/Types.h \ + ../../UI/Console/../Common/../../../Common/MyCom.h \ + ../../UI/Console/../Common/../../../Common/MyString.h \ + ../../UI/Console/../Common/../../../Common/Buffer.h \ + ../../UI/Console/../Common/../../../Common/Defs.h \ + ../../UI/Console/../Common/../../ICoder.h \ + ../../UI/Console/../Common/../../../Windows/DLL.h \ + ../../UI/Console/../Common/../../../Windows/../Common/MyString.h \ + ../../UI/Console/UserInputUtils.h ../../UI/Console/ConsoleClose.h \ + ../../../Windows/FileDir.h ../../../Windows/Time.h \ + ../../../Windows/Defs.h ../../../Windows/PropVariant.h \ + ../../../Windows/../Common/Types.h ../../../Windows/Error.h \ + ../../../Windows/PropVariantConversions.h \ + ../../UI/Console/../../Common/FilePathAutoRename.h \ + ../../UI/Console/../Common/ExtractingFilePath.h +BenchCon.o: ../../UI/Console/BenchCon.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h \ + ../../UI/Console/../../../Common/IntToString.h \ + ../../UI/Console/../../../Common/Types.h \ + ../../UI/Console/../../../Common/MyCom.h \ + ../../UI/Console/../../../Common/MyWindows.h \ + ../../UI/Console/../../../Windows/System.h \ + ../../UI/Console/../../../Windows/../Common/Types.h \ + ../../UI/Console/../Common/Bench.h \ + ../../UI/Console/../Common/../../Common/CreateCoder.h \ + ../../UI/Console/../Common/../../Common/../../Common/MyCom.h \ + ../../UI/Console/../Common/../../Common/../../Common/MyString.h \ + ../../UI/Console/../Common/../../Common/../../Common/MyVector.h \ + ../../UI/Console/../Common/../../Common/../../Common/Defs.h \ + ../../UI/Console/../Common/../../Common/../ICoder.h \ + ../../UI/Console/../Common/../../Common/../IStream.h \ + ../../UI/Console/../Common/../../Common/../../Common/MyUnknown.h \ + ../../UI/Console/../Common/../../Common/../../Common/MyWindows.h \ + ../../UI/Console/../Common/../../Common/../../Common/Types.h \ + ../../UI/Console/../Common/../../Common/../IDecl.h \ + ../../UI/Console/../Common/../../Common/MethodId.h \ + ../../UI/Console/../Common/../../Common/../../Common/Types.h \ + ../../UI/Console/BenchCon.h ../../UI/Console/../../Common/CreateCoder.h \ + ../../UI/Console/ConsoleClose.h +List.o: ../../UI/Console/List.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../../Common/IntToString.h \ + ../../../Common/MyCom.h ../../../Common/MyWindows.h \ + ../../../Common/StdOutStream.h ../../../Common/StringConvert.h \ + ../../../Common/MyString.h ../../../Common/MyVector.h \ + ../../../Common/Defs.h ../../../Windows/Error.h \ + ../../../Common/MyString.h ../../../Windows/FileDir.h \ + ../../../Windows/../Common/MyString.h ../../../Windows/Defs.h \ + ../../../Windows/../Common/MyWindows.h ../../../Windows/PropVariant.h \ + ../../../Windows/../Common/Types.h \ + ../../../Windows/PropVariantConversions.h \ + ../../UI/Console/../../Archive/IArchive.h \ + ../../UI/Console/../../Archive/../IProgress.h \ + ../../UI/Console/../../Archive/../../Common/MyUnknown.h \ + ../../UI/Console/../../Archive/../../Common/MyWindows.h \ + ../../UI/Console/../../Archive/../../Common/Types.h \ + ../../UI/Console/../../Archive/../IDecl.h \ + ../../UI/Console/../../Archive/../IStream.h \ + ../../UI/Console/../../Archive/../PropID.h \ + ../../UI/Console/../Common/OpenArchive.h ../../../Windows/FileFind.h \ + ../../../Windows/FileName.h ../../../Windows/../../C/Types.h \ + ../../UI/Console/../Common/../../Archive/IArchive.h \ + ../../UI/Console/../Common/ArchiveOpenCallback.h \ + ../../UI/Console/../Common/../../IPassword.h \ + ../../UI/Console/../Common/../../../Common/MyUnknown.h \ + ../../UI/Console/../Common/../../../Common/Types.h \ + ../../UI/Console/../Common/../../IDecl.h \ + ../../UI/Console/../Common/LoadCodecs.h \ + ../../UI/Console/../Common/../../../Common/Types.h \ + ../../UI/Console/../Common/../../../Common/MyCom.h \ + ../../UI/Console/../Common/../../../Common/MyString.h \ + ../../UI/Console/../Common/../../../Common/Buffer.h \ + ../../UI/Console/../Common/../../../Common/Defs.h \ + ../../UI/Console/../Common/../../ICoder.h \ + ../../UI/Console/../Common/../../IStream.h \ + ../../UI/Console/../Common/../../../Windows/DLL.h \ + ../../UI/Console/../Common/../../../Windows/../Common/MyString.h \ + ../../UI/Console/../Common/PropIDUtils.h ../../UI/Console/ConsoleClose.h \ + ../../UI/Console/List.h ../../../Common/Wildcard.h \ + ../../UI/Console/../Common/LoadCodecs.h \ + ../../UI/Console/OpenCallbackConsole.h \ + ../../UI/Console/../Common/ArchiveOpenCallback.h +Main.o: ../../UI/Console/Main.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../UI/Console/../../../../C/Alloc.h \ + ../../../Common/MyInitGuid.h ../../../Common/CommandLineParser.h \ + ../../../Common/MyString.h ../../../Common/MyVector.h \ + ../../../Common/Defs.h ../../../Common/IntToString.h \ + ../../../Common/MyException.h ../../../Common/MyWindows.h \ + ../../../Common/StdOutStream.h ../../../Common/StringConvert.h \ + ../../../Common/StringToInt.h ../../../Windows/Error.h \ + ../../../Common/MyString.h \ + ../../UI/Console/../Common/ArchiveCommandLine.h \ + ../../../Common/Wildcard.h ../../UI/Console/../Common/Extract.h \ + ../../../Windows/FileFind.h ../../../Windows/../Common/MyString.h \ + ../../../Windows/FileName.h ../../../Windows/../../C/Types.h \ + ../../../Windows/Defs.h ../../../Windows/../Common/MyWindows.h \ + ../../UI/Console/../Common/../../Archive/IArchive.h \ + ../../UI/Console/../Common/../../Archive/../IProgress.h \ + ../../UI/Console/../Common/../../Archive/../../Common/MyUnknown.h \ + ../../UI/Console/../Common/../../Archive/../../Common/MyWindows.h \ + ../../UI/Console/../Common/../../Archive/../../Common/Types.h \ + ../../UI/Console/../Common/../../Archive/../IDecl.h \ + ../../UI/Console/../Common/../../Archive/../IStream.h \ + ../../UI/Console/../Common/../../Archive/../PropID.h \ + ../../UI/Console/../Common/ArchiveExtractCallback.h \ + ../../../Common/MyCom.h ../../UI/Console/../Common/../../IPassword.h \ + ../../UI/Console/../Common/../../../Common/MyUnknown.h \ + ../../UI/Console/../Common/../../../Common/Types.h \ + ../../UI/Console/../Common/../../IDecl.h \ + ../../UI/Console/../Common/../../Common/FileStreams.h \ + ../../UI/Console/../Common/../../Common/../../Windows/FileIO.h \ + ../../UI/Console/../Common/../../Common/../../Common/MyCom.h \ + ../../UI/Console/../Common/../../Common/../IStream.h \ + ../../UI/Console/../Common/../../Common/ProgressUtils.h \ + ../../UI/Console/../Common/../../Common/../ICoder.h \ + ../../UI/Console/../Common/../../Common/../IStream.h \ + ../../UI/Console/../Common/../../Common/../IProgress.h \ + ../../UI/Console/../Common/../../Archive/Common/OutStreamWithCRC.h \ + ../../UI/Console/../Common/../../Archive/Common/../../../../C/7zCrc.h \ + ../../UI/Console/../Common/../../Archive/Common/../../../../C/Types.h \ + ../../UI/Console/../Common/../../Archive/Common/../../../Common/MyCom.h \ + ../../UI/Console/../Common/../../Archive/Common/../../IStream.h \ + ../../UI/Console/../Common/ExtractMode.h \ + ../../UI/Console/../Common/IFileExtractCallback.h \ + ../../UI/Console/../Common/../../IDecl.h \ + ../../UI/Console/../Common/OpenArchive.h \ + ../../UI/Console/../Common/ArchiveOpenCallback.h \ + ../../UI/Console/../Common/LoadCodecs.h \ + ../../UI/Console/../Common/../../../Common/Types.h \ + ../../UI/Console/../Common/../../../Common/MyCom.h \ + ../../UI/Console/../Common/../../../Common/MyString.h \ + ../../UI/Console/../Common/../../../Common/Buffer.h \ + ../../UI/Console/../Common/../../../Common/Defs.h \ + ../../UI/Console/../Common/../../ICoder.h \ + ../../UI/Console/../Common/../../../Windows/DLL.h \ + ../../UI/Console/../Common/../../../Windows/../Common/MyString.h \ + ../../UI/Console/../Common/Property.h \ + ../../UI/Console/../Common/../Common/LoadCodecs.h \ + ../../UI/Console/../Common/Update.h \ + ../../UI/Console/../Common/UpdateAction.h \ + ../../UI/Console/../Common/UpdateCallback.h \ + ../../UI/Console/../Common/../Common/UpdatePair.h \ + ../../UI/Console/../Common/../Common/DirItem.h \ + ../../UI/Console/../Common/../Common/../../Archive/IArchive.h \ + ../../UI/Console/../Common/../Common/UpdateAction.h \ + ../../UI/Console/../Common/../Common/UpdateProduce.h \ + ../../UI/Console/../Common/../Common/UpdatePair.h \ + ../../UI/Console/../Common/ExitCode.h \ + ../../UI/Console/../Common/Extract.h \ + ../../UI/Console/../Common/LoadCodecs.h ../../UI/Console/BenchCon.h \ + ../../UI/Console/../../Common/CreateCoder.h \ + ../../UI/Console/../../Common/../../Common/MyCom.h \ + ../../UI/Console/../../Common/../../Common/MyString.h \ + ../../UI/Console/../../Common/../ICoder.h \ + ../../UI/Console/../../Common/MethodId.h \ + ../../UI/Console/../../Common/../../Common/Types.h \ + ../../UI/Console/ExtractCallbackConsole.h \ + ../../UI/Console/../../Common/FileStreams.h \ + ../../UI/Console/../../IPassword.h \ + ../../UI/Console/../../Archive/IArchive.h \ + ../../UI/Console/../Common/ArchiveExtractCallback.h \ + ../../UI/Console/List.h ../../UI/Console/OpenCallbackConsole.h \ + ../../UI/Console/../Common/ArchiveOpenCallback.h \ + ../../UI/Console/UpdateCallbackConsole.h \ + ../../UI/Console/../Common/Update.h ../../UI/Console/PercentPrinter.h \ + ../../UI/Console/../../MyVersion.h ../../../myWindows/myPrivate.h \ + ../../../Windows/System.h ../../../Windows/../Common/Types.h +MainAr.o: ../../UI/Console/MainAr.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../../Common/NewHandler.h \ + ../../../Common/MyException.h ../../../Common/MyWindows.h \ + ../../../Common/StdOutStream.h ../../../Windows/Error.h \ + ../../../Common/MyString.h ../../../Common/MyVector.h \ + ../../../Common/Defs.h ../../../Windows/NtCheck.h \ + ../../UI/Console/../Common/ArchiveCommandLine.h \ + ../../../Common/CommandLineParser.h ../../../Common/MyString.h \ + ../../../Common/Wildcard.h ../../UI/Console/../Common/Extract.h \ + ../../../Windows/FileFind.h ../../../Windows/../Common/MyString.h \ + ../../../Windows/FileName.h ../../../Windows/../../C/Types.h \ + ../../../Windows/Defs.h ../../../Windows/../Common/MyWindows.h \ + ../../UI/Console/../Common/../../Archive/IArchive.h \ + ../../UI/Console/../Common/../../Archive/../IProgress.h \ + ../../UI/Console/../Common/../../Archive/../../Common/MyUnknown.h \ + ../../UI/Console/../Common/../../Archive/../../Common/MyWindows.h \ + ../../UI/Console/../Common/../../Archive/../../Common/Types.h \ + ../../UI/Console/../Common/../../Archive/../IDecl.h \ + ../../UI/Console/../Common/../../Archive/../IStream.h \ + ../../UI/Console/../Common/../../Archive/../PropID.h \ + ../../UI/Console/../Common/ArchiveExtractCallback.h \ + ../../../Common/MyCom.h ../../UI/Console/../Common/../../IPassword.h \ + ../../UI/Console/../Common/../../../Common/MyUnknown.h \ + ../../UI/Console/../Common/../../../Common/Types.h \ + ../../UI/Console/../Common/../../IDecl.h \ + ../../UI/Console/../Common/../../Common/FileStreams.h \ + ../../UI/Console/../Common/../../Common/../../Windows/FileIO.h \ + ../../UI/Console/../Common/../../Common/../../Common/MyCom.h \ + ../../UI/Console/../Common/../../Common/../IStream.h \ + ../../UI/Console/../Common/../../Common/ProgressUtils.h \ + ../../UI/Console/../Common/../../Common/../ICoder.h \ + ../../UI/Console/../Common/../../Common/../IStream.h \ + ../../UI/Console/../Common/../../Common/../IProgress.h \ + ../../UI/Console/../Common/../../Archive/Common/OutStreamWithCRC.h \ + ../../UI/Console/../Common/../../Archive/Common/../../../../C/7zCrc.h \ + ../../UI/Console/../Common/../../Archive/Common/../../../../C/Types.h \ + ../../UI/Console/../Common/../../Archive/Common/../../../Common/MyCom.h \ + ../../UI/Console/../Common/../../Archive/Common/../../IStream.h \ + ../../UI/Console/../Common/ExtractMode.h \ + ../../UI/Console/../Common/IFileExtractCallback.h \ + ../../UI/Console/../Common/../../IDecl.h \ + ../../UI/Console/../Common/OpenArchive.h \ + ../../UI/Console/../Common/ArchiveOpenCallback.h \ + ../../UI/Console/../Common/LoadCodecs.h \ + ../../UI/Console/../Common/../../../Common/Types.h \ + ../../UI/Console/../Common/../../../Common/MyCom.h \ + ../../UI/Console/../Common/../../../Common/MyString.h \ + ../../UI/Console/../Common/../../../Common/Buffer.h \ + ../../UI/Console/../Common/../../../Common/Defs.h \ + ../../UI/Console/../Common/../../ICoder.h \ + ../../UI/Console/../Common/../../../Windows/DLL.h \ + ../../UI/Console/../Common/../../../Windows/../Common/MyString.h \ + ../../UI/Console/../Common/Property.h \ + ../../UI/Console/../Common/../Common/LoadCodecs.h \ + ../../UI/Console/../Common/Update.h \ + ../../UI/Console/../Common/UpdateAction.h \ + ../../UI/Console/../Common/UpdateCallback.h \ + ../../UI/Console/../Common/../Common/UpdatePair.h \ + ../../UI/Console/../Common/../Common/DirItem.h \ + ../../UI/Console/../Common/../Common/../../Archive/IArchive.h \ + ../../UI/Console/../Common/../Common/UpdateAction.h \ + ../../UI/Console/../Common/../Common/UpdateProduce.h \ + ../../UI/Console/../Common/../Common/UpdatePair.h \ + ../../UI/Console/../Common/ExitCode.h ../../UI/Console/ConsoleClose.h +OpenCallbackConsole.o: ../../UI/Console/OpenCallbackConsole.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../UI/Console/OpenCallbackConsole.h ../../../Common/StdOutStream.h \ + ../../UI/Console/../Common/ArchiveOpenCallback.h ../../../Common/MyCom.h \ + ../../../Common/MyWindows.h ../../../Common/MyString.h \ + ../../../Common/MyVector.h ../../../Common/Defs.h \ + ../../../Windows/FileFind.h ../../../Windows/../Common/MyString.h \ + ../../../Windows/FileName.h ../../../Windows/../../C/Types.h \ + ../../../Windows/Defs.h ../../../Windows/../Common/MyWindows.h \ + ../../UI/Console/../Common/../../IPassword.h \ + ../../UI/Console/../Common/../../../Common/MyUnknown.h \ + ../../UI/Console/../Common/../../../Common/MyWindows.h \ + ../../UI/Console/../Common/../../../Common/Types.h \ + ../../UI/Console/../Common/../../IDecl.h \ + ../../UI/Console/../Common/../../Archive/IArchive.h \ + ../../UI/Console/../Common/../../Archive/../IProgress.h \ + ../../UI/Console/../Common/../../Archive/../../Common/MyUnknown.h \ + ../../UI/Console/../Common/../../Archive/../../Common/Types.h \ + ../../UI/Console/../Common/../../Archive/../IDecl.h \ + ../../UI/Console/../Common/../../Archive/../IStream.h \ + ../../UI/Console/../Common/../../Archive/../PropID.h \ + ../../UI/Console/ConsoleClose.h ../../UI/Console/UserInputUtils.h +PercentPrinter.o: ../../UI/Console/PercentPrinter.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../../Common/IntToString.h ../../../Common/MyString.h \ + ../../../Common/MyVector.h ../../../Common/Defs.h \ + ../../UI/Console/PercentPrinter.h ../../../Common/StdOutStream.h +UpdateCallbackConsole.o: ../../UI/Console/UpdateCallbackConsole.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../UI/Console/UpdateCallbackConsole.h ../../../Common/StdOutStream.h \ + ../../UI/Console/../Common/Update.h ../../../Common/Wildcard.h \ + ../../../Common/MyString.h ../../../Common/MyVector.h \ + ../../../Common/Defs.h ../../UI/Console/../Common/ArchiveOpenCallback.h \ + ../../../Common/MyCom.h ../../../Common/MyWindows.h \ + ../../../Common/MyString.h ../../../Windows/FileFind.h \ + ../../../Windows/../Common/MyString.h ../../../Windows/FileName.h \ + ../../../Windows/../../C/Types.h ../../../Windows/Defs.h \ + ../../../Windows/../Common/MyWindows.h \ + ../../UI/Console/../Common/../../IPassword.h \ + ../../UI/Console/../Common/../../../Common/MyUnknown.h \ + ../../UI/Console/../Common/../../../Common/MyWindows.h \ + ../../UI/Console/../Common/../../../Common/Types.h \ + ../../UI/Console/../Common/../../IDecl.h \ + ../../UI/Console/../Common/../../Archive/IArchive.h \ + ../../UI/Console/../Common/../../Archive/../IProgress.h \ + ../../UI/Console/../Common/../../Archive/../../Common/MyUnknown.h \ + ../../UI/Console/../Common/../../Archive/../../Common/Types.h \ + ../../UI/Console/../Common/../../Archive/../IDecl.h \ + ../../UI/Console/../Common/../../Archive/../IStream.h \ + ../../UI/Console/../Common/../../Archive/../PropID.h \ + ../../UI/Console/../Common/LoadCodecs.h \ + ../../UI/Console/../Common/../../../Common/Types.h \ + ../../UI/Console/../Common/../../../Common/MyCom.h \ + ../../UI/Console/../Common/../../../Common/MyString.h \ + ../../UI/Console/../Common/../../../Common/Buffer.h \ + ../../UI/Console/../Common/../../../Common/Defs.h \ + ../../UI/Console/../Common/../../ICoder.h \ + ../../UI/Console/../Common/../../IStream.h \ + ../../UI/Console/../Common/../../../Windows/DLL.h \ + ../../UI/Console/../Common/../../../Windows/../Common/MyString.h \ + ../../UI/Console/../Common/Property.h \ + ../../UI/Console/../Common/UpdateAction.h \ + ../../UI/Console/../Common/UpdateCallback.h \ + ../../UI/Console/../Common/../Common/UpdatePair.h \ + ../../UI/Console/../Common/../Common/DirItem.h \ + ../../UI/Console/../Common/../Common/../../Archive/IArchive.h \ + ../../UI/Console/../Common/../Common/UpdateAction.h \ + ../../UI/Console/../Common/../Common/UpdateProduce.h \ + ../../UI/Console/../Common/../Common/UpdatePair.h \ + ../../UI/Console/PercentPrinter.h ../../../Windows/Error.h \ + ../../../Windows/Synchronization.h ../../../Windows/../../C/Threads.h \ + ../../../Windows/../../C/Types.h ../../../Windows/Synchronization2.h \ + ../../UI/Console/ConsoleClose.h ../../UI/Console/UserInputUtils.h +UserInputUtils.o: ../../UI/Console/UserInputUtils.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../../Common/StdInStream.h ../../../Common/MyString.h \ + ../../../Common/MyVector.h ../../../Common/Defs.h \ + ../../../Common/StringConvert.h ../../../Common/MyWindows.h \ + ../../UI/Console/UserInputUtils.h ../../../Common/StdOutStream.h \ + ../../../Common/MyException.h +CommandLineParser.o: ../../../Common/CommandLineParser.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../../Common/CommandLineParser.h ../../../Common/MyString.h \ + ../../../Common/MyVector.h ../../../Common/Defs.h +CRC.o: ../../../Common/CRC.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../../Common/../../C/7zCrc.h \ + ../../../Common/../../C/Types.h +IntToString.o: ../../../Common/IntToString.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../../Common/IntToString.h +ListFileUtils.o: ../../../Common/ListFileUtils.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../../Common/MyWindows.h ../../../Common/../Windows/FileIO.h \ + ../../../Common/MyString.h ../../../Common/MyVector.h \ + ../../../Common/Defs.h ../../../Common/ListFileUtils.h \ + ../../../Common/MyString.h ../../../Common/StringConvert.h \ + ../../../Common/UTFConvert.h +StdInStream.o: ../../../Common/StdInStream.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../../Common/StdInStream.h ../../../Common/MyString.h \ + ../../../Common/MyVector.h ../../../Common/Defs.h \ + ../../../Common/StringConvert.h ../../../Common/MyWindows.h \ + ../../../myWindows/myPrivate.h +StdOutStream.o: ../../../Common/StdOutStream.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../../Common/StdOutStream.h ../../../Common/IntToString.h \ + ../../../Common/StringConvert.h ../../../Common/MyWindows.h \ + ../../../Common/MyString.h ../../../Common/MyVector.h \ + ../../../Common/Defs.h +MyString.o: ../../../Common/MyString.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../../Common/StringConvert.h \ + ../../../Common/MyWindows.h ../../../Common/MyString.h \ + ../../../Common/MyVector.h ../../../Common/Defs.h \ + ../../../myWindows/myPrivate.h +MyWindows.o: ../../../Common/MyWindows.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../../Common/MyWindows.h +StringConvert.o: ../../../Common/StringConvert.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../../Common/StringConvert.h ../../../Common/MyWindows.h \ + ../../../Common/MyString.h ../../../Common/MyVector.h \ + ../../../Common/Defs.h +StringToInt.o: ../../../Common/StringToInt.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../../Common/StringToInt.h +UTFConvert.o: ../../../Common/UTFConvert.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../../Common/UTFConvert.h \ + ../../../Common/MyString.h ../../../Common/MyVector.h \ + ../../../Common/Defs.h +MyVector.o: ../../../Common/MyVector.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../../Common/MyVector.h \ + ../../../Common/Defs.h +Wildcard.o: ../../../Common/Wildcard.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../../Common/Wildcard.h \ + ../../../Common/MyString.h ../../../Common/MyVector.h \ + ../../../Common/Defs.h +DLL.o: ../../../Windows/DLL.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../../Windows/DLL.h \ + ../../../Windows/../Common/MyString.h \ + ../../../Windows/../Common/MyVector.h ../../../Windows/../Common/Defs.h \ + ../../../Windows/Defs.h ../../../Windows/../Common/MyWindows.h \ + ../../../Windows/../Common/StringConvert.h \ + ../../../Windows/../Common/MyWindows.h \ + ../../../Windows/../Common/MyString.h ../../../Windows/../Common/Types.h \ + ../../../myWindows/myPrivate.h +Error.o: ../../../Windows/Error.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../../Windows/Error.h \ + ../../../Common/MyString.h ../../../Common/MyVector.h \ + ../../../Common/Defs.h ../../../Common/StringConvert.h \ + ../../../Common/MyWindows.h ../../../Common/MyString.h +FileDir.o: ../../../Windows/FileDir.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../../Windows/FileDir.h \ + ../../../Windows/../Common/MyString.h \ + ../../../Windows/../Common/MyVector.h ../../../Windows/../Common/Defs.h \ + ../../../Windows/Defs.h ../../../Windows/../Common/MyWindows.h \ + ../../../Windows/FileName.h ../../../Windows/../../C/Types.h \ + ../../../Windows/FileFind.h ../../../Windows/../Common/StringConvert.h \ + ../../../Windows/../Common/MyWindows.h \ + ../../../Windows/../Common/MyString.h ../../../Windows/../Common/Types.h \ + ../../../Windows/../Common/IntToString.h ../../../myWindows/myPrivate.h \ + ../../../Windows/Synchronization.h ../../../Windows/../../C/Threads.h \ + ../../../Windows/../../C/Types.h ../../../Windows/Synchronization2.h +FileFind.o: ../../../Windows/FileFind.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../../Windows/FileFind.h \ + ../../../Windows/../Common/MyString.h \ + ../../../Windows/../Common/MyVector.h ../../../Windows/../Common/Defs.h \ + ../../../Windows/FileName.h ../../../Windows/../../C/Types.h \ + ../../../Windows/Defs.h ../../../Windows/../Common/MyWindows.h \ + ../../../Windows/../Common/StringConvert.h \ + ../../../Windows/../Common/MyWindows.h \ + ../../../Windows/../Common/MyString.h ../../../Windows/../Common/Types.h \ + ../../../myWindows/myPrivate.h +FileIO.o: ../../../Windows/FileIO.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../../Windows/FileIO.h \ + ../../../Common/MyString.h ../../../Common/MyVector.h \ + ../../../Common/Defs.h ../../../Windows/Defs.h \ + ../../../Windows/../Common/MyWindows.h \ + ../../../Windows/../Common/StringConvert.h \ + ../../../Windows/../Common/MyWindows.h \ + ../../../Windows/../Common/MyString.h ../../../Windows/../Common/Types.h \ + ../../../myWindows/myPrivate.h +FileName.o: ../../../Windows/FileName.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../../Windows/FileName.h \ + ../../../Windows/../../C/Types.h ../../../Windows/../Common/MyString.h \ + ../../../Windows/../Common/MyVector.h ../../../Windows/../Common/Defs.h \ + ../../../Common/Wildcard.h ../../../Common/MyString.h +PropVariant.o: ../../../Windows/PropVariant.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../../Windows/PropVariant.h ../../../Windows/../Common/MyWindows.h \ + ../../../Windows/../Common/Types.h ../../../Windows/../Common/Defs.h +PropVariantConversions.o: ../../../Windows/PropVariantConversions.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../../Common/IntToString.h ../../../Common/StringConvert.h \ + ../../../Common/MyWindows.h ../../../Common/MyString.h \ + ../../../Common/MyVector.h ../../../Common/Defs.h \ + ../../../Windows/Defs.h ../../../Windows/../Common/MyWindows.h \ + ../../../Windows/PropVariantConversions.h ../../../Common/MyString.h +System.o: ../../../Windows/System.cpp ../../../Common/Types.h \ + ../../../Common/../../C/Types.h +Time.o: ../../../Windows/Time.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../../Windows/Time.h \ + ../../../Windows/Defs.h ../../../Windows/../Common/MyWindows.h +CreateCoder.o: ../../Common/CreateCoder.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../Common/../../Windows/Defs.h \ + ../../Common/../../Windows/../Common/MyWindows.h \ + ../../Common/../../Windows/PropVariant.h \ + ../../Common/../../Windows/../Common/Types.h ../../Common/CreateCoder.h \ + ../../Common/../../Common/MyCom.h ../../Common/../../Common/MyWindows.h \ + ../../Common/../../Common/MyString.h \ + ../../Common/../../Common/MyVector.h ../../Common/../../Common/Defs.h \ + ../../Common/../ICoder.h ../../Common/../IStream.h \ + ../../Common/../../Common/MyUnknown.h ../../Common/../../Common/Types.h \ + ../../Common/../IDecl.h ../../Common/MethodId.h \ + ../../Common/../../Common/Types.h ../../Common/FilterCoder.h \ + ../../Common/../IPassword.h ../../Common/RegisterCodec.h \ + ../../Common/../Common/MethodId.h +FilePathAutoRename.o: ../../Common/FilePathAutoRename.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../../Common/Defs.h ../../../Common/IntToString.h \ + ../../../Windows/FileFind.h ../../../Windows/../Common/MyString.h \ + ../../../Windows/../Common/MyVector.h ../../../Windows/../Common/Defs.h \ + ../../../Windows/FileName.h ../../../Windows/../../C/Types.h \ + ../../../Windows/Defs.h ../../../Windows/../Common/MyWindows.h \ + ../../Common/FilePathAutoRename.h ../../../Common/MyString.h +FileStreams.o: ../../Common/FileStreams.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../Common/FileStreams.h \ + ../../Common/../../Windows/FileIO.h ../../../Common/MyString.h \ + ../../../Common/MyVector.h ../../../Common/Defs.h \ + ../../Common/../../Common/MyCom.h ../../Common/../../Common/MyWindows.h \ + ../../Common/../IStream.h ../../Common/../../Common/MyUnknown.h \ + ../../Common/../../Common/Types.h ../../Common/../IDecl.h +FilterCoder.o: ../../Common/FilterCoder.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../Common/../../../C/Alloc.h \ + ../../Common/../../Common/Defs.h ../../Common/FilterCoder.h \ + ../../Common/../../Common/MyCom.h ../../Common/../../Common/MyWindows.h \ + ../../Common/../ICoder.h ../../Common/../IStream.h \ + ../../Common/../../Common/MyUnknown.h ../../Common/../../Common/Types.h \ + ../../Common/../IDecl.h ../../Common/../IPassword.h \ + ../../Common/StreamUtils.h ../../Common/../IStream.h +ProgressUtils.o: ../../Common/ProgressUtils.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../Common/ProgressUtils.h ../../Common/../../Common/MyCom.h \ + ../../Common/../../Common/MyWindows.h ../../Common/../ICoder.h \ + ../../Common/../IStream.h ../../Common/../../Common/MyUnknown.h \ + ../../Common/../../Common/Types.h ../../Common/../IDecl.h \ + ../../Common/../IProgress.h +StreamUtils.o: ../../Common/StreamUtils.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../Common/StreamUtils.h \ + ../../Common/../IStream.h ../../Common/../../Common/MyUnknown.h \ + ../../Common/../../Common/MyWindows.h ../../Common/../../Common/Types.h \ + ../../Common/../IDecl.h +ArchiveCommandLine.o: ../../UI/Common/ArchiveCommandLine.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../../Common/ListFileUtils.h ../../../Common/MyString.h \ + ../../../Common/MyVector.h ../../../Common/Defs.h \ + ../../../Common/StringConvert.h ../../../Common/MyWindows.h \ + ../../../Common/StringToInt.h ../../../Windows/FileDir.h \ + ../../../Windows/../Common/MyString.h ../../../Windows/Defs.h \ + ../../../Windows/../Common/MyWindows.h ../../../Windows/FileName.h \ + ../../../Windows/../../C/Types.h ../../../myWindows/myPrivate.h \ + ../../UI/Common/ArchiveCommandLine.h ../../../Common/CommandLineParser.h \ + ../../../Common/Wildcard.h ../../UI/Common/Extract.h \ + ../../../Windows/FileFind.h ../../../Windows/FileName.h \ + ../../UI/Common/../../Archive/IArchive.h \ + ../../UI/Common/../../Archive/../IProgress.h \ + ../../UI/Common/../../Archive/../../Common/MyUnknown.h \ + ../../UI/Common/../../Archive/../../Common/MyWindows.h \ + ../../UI/Common/../../Archive/../../Common/Types.h \ + ../../UI/Common/../../Archive/../IDecl.h \ + ../../UI/Common/../../Archive/../IStream.h \ + ../../UI/Common/../../Archive/../PropID.h \ + ../../UI/Common/ArchiveExtractCallback.h ../../../Common/MyCom.h \ + ../../UI/Common/../../IPassword.h \ + ../../UI/Common/../../../Common/MyUnknown.h \ + ../../UI/Common/../../../Common/Types.h ../../UI/Common/../../IDecl.h \ + ../../UI/Common/../../Common/FileStreams.h \ + ../../UI/Common/../../Common/../../Windows/FileIO.h \ + ../../../Common/MyString.h \ + ../../UI/Common/../../Common/../../Common/MyCom.h \ + ../../UI/Common/../../Common/../IStream.h \ + ../../UI/Common/../../Common/ProgressUtils.h \ + ../../UI/Common/../../Common/../ICoder.h \ + ../../UI/Common/../../Common/../IStream.h \ + ../../UI/Common/../../Common/../IProgress.h \ + ../../UI/Common/../../Archive/Common/OutStreamWithCRC.h \ + ../../UI/Common/../../Archive/Common/../../../../C/7zCrc.h \ + ../../UI/Common/../../Archive/Common/../../../../C/Types.h \ + ../../UI/Common/../../Archive/Common/../../../Common/MyCom.h \ + ../../UI/Common/../../Archive/Common/../../IStream.h \ + ../../UI/Common/ExtractMode.h ../../UI/Common/IFileExtractCallback.h \ + ../../UI/Common/../../IDecl.h ../../UI/Common/OpenArchive.h \ + ../../UI/Common/ArchiveOpenCallback.h ../../UI/Common/LoadCodecs.h \ + ../../UI/Common/../../../Common/Types.h \ + ../../UI/Common/../../../Common/MyCom.h \ + ../../UI/Common/../../../Common/MyString.h \ + ../../UI/Common/../../../Common/Buffer.h \ + ../../UI/Common/../../../Common/Defs.h ../../UI/Common/../../ICoder.h \ + ../../UI/Common/../../../Windows/DLL.h \ + ../../UI/Common/../../../Windows/../Common/MyString.h \ + ../../UI/Common/Property.h ../../UI/Common/../Common/LoadCodecs.h \ + ../../UI/Common/Update.h ../../UI/Common/UpdateAction.h \ + ../../UI/Common/UpdateCallback.h ../../UI/Common/../Common/UpdatePair.h \ + ../../UI/Common/../Common/DirItem.h \ + ../../UI/Common/../Common/../../Archive/IArchive.h \ + ../../UI/Common/../Common/UpdateAction.h \ + ../../UI/Common/../Common/UpdateProduce.h \ + ../../UI/Common/../Common/UpdatePair.h ../../UI/Common/EnumDirItems.h \ + ../../UI/Common/DirItem.h ../../UI/Common/SortUtils.h +ArchiveExtractCallback.o: ../../UI/Common/ArchiveExtractCallback.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../../Common/ComTry.h ../../../Common/MyWindows.h \ + ../../../Common/Wildcard.h ../../../Common/MyString.h \ + ../../../Common/MyVector.h ../../../Common/Defs.h \ + ../../../Windows/FileDir.h ../../../Windows/../Common/MyString.h \ + ../../../Windows/Defs.h ../../../Windows/../Common/MyWindows.h \ + ../../../Windows/FileFind.h ../../../Windows/FileName.h \ + ../../../Windows/../../C/Types.h ../../../Windows/PropVariant.h \ + ../../../Windows/../Common/Types.h \ + ../../../Windows/PropVariantConversions.h ../../../Common/MyString.h \ + ../../UI/Common/../../Common/FilePathAutoRename.h \ + ../../UI/Common/../Common/ExtractingFilePath.h \ + ../../UI/Common/ArchiveExtractCallback.h ../../../Common/MyCom.h \ + ../../UI/Common/../../IPassword.h \ + ../../UI/Common/../../../Common/MyUnknown.h \ + ../../UI/Common/../../../Common/MyWindows.h \ + ../../UI/Common/../../../Common/Types.h ../../UI/Common/../../IDecl.h \ + ../../UI/Common/../../Common/FileStreams.h \ + ../../UI/Common/../../Common/../../Windows/FileIO.h \ + ../../UI/Common/../../Common/../../Common/MyCom.h \ + ../../UI/Common/../../Common/../IStream.h \ + ../../UI/Common/../../Common/../../Common/MyUnknown.h \ + ../../UI/Common/../../Common/../../Common/Types.h \ + ../../UI/Common/../../Common/../IDecl.h \ + ../../UI/Common/../../Common/ProgressUtils.h \ + ../../UI/Common/../../Common/../ICoder.h \ + ../../UI/Common/../../Common/../IStream.h \ + ../../UI/Common/../../Common/../IProgress.h \ + ../../UI/Common/../../Archive/IArchive.h \ + ../../UI/Common/../../Archive/../IProgress.h \ + ../../UI/Common/../../Archive/../IStream.h \ + ../../UI/Common/../../Archive/../PropID.h \ + ../../UI/Common/../../Archive/Common/OutStreamWithCRC.h \ + ../../UI/Common/../../Archive/Common/../../../../C/7zCrc.h \ + ../../UI/Common/../../Archive/Common/../../../../C/Types.h \ + ../../UI/Common/../../Archive/Common/../../../Common/MyCom.h \ + ../../UI/Common/../../Archive/Common/../../IStream.h \ + ../../UI/Common/ExtractMode.h ../../UI/Common/IFileExtractCallback.h \ + ../../UI/Common/../../IDecl.h ../../UI/Common/OpenArchive.h \ + ../../UI/Common/ArchiveOpenCallback.h ../../UI/Common/LoadCodecs.h \ + ../../UI/Common/../../../Common/Types.h \ + ../../UI/Common/../../../Common/MyCom.h \ + ../../UI/Common/../../../Common/MyString.h \ + ../../UI/Common/../../../Common/Buffer.h \ + ../../UI/Common/../../../Common/Defs.h ../../UI/Common/../../ICoder.h \ + ../../UI/Common/../../../Windows/DLL.h \ + ../../UI/Common/../../../Windows/../Common/MyString.h +ArchiveOpenCallback.o: ../../UI/Common/ArchiveOpenCallback.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../../Common/StringConvert.h ../../../Common/MyWindows.h \ + ../../../Common/MyString.h ../../../Common/MyVector.h \ + ../../../Common/Defs.h ../../../Common/ComTry.h \ + ../../../Windows/PropVariant.h ../../../Windows/../Common/MyWindows.h \ + ../../../Windows/../Common/Types.h \ + ../../UI/Common/../../Common/FileStreams.h \ + ../../UI/Common/../../Common/../../Windows/FileIO.h \ + ../../../Common/MyString.h \ + ../../UI/Common/../../Common/../../Common/MyCom.h \ + ../../UI/Common/../../Common/../../Common/MyWindows.h \ + ../../UI/Common/../../Common/../IStream.h \ + ../../UI/Common/../../Common/../../Common/MyUnknown.h \ + ../../UI/Common/../../Common/../../Common/Types.h \ + ../../UI/Common/../../Common/../IDecl.h \ + ../../UI/Common/ArchiveOpenCallback.h ../../../Common/MyCom.h \ + ../../../Windows/FileFind.h ../../../Windows/../Common/MyString.h \ + ../../../Windows/FileName.h ../../../Windows/../../C/Types.h \ + ../../../Windows/Defs.h ../../UI/Common/../../IPassword.h \ + ../../UI/Common/../../../Common/MyUnknown.h \ + ../../UI/Common/../../../Common/Types.h ../../UI/Common/../../IDecl.h \ + ../../UI/Common/../../Archive/IArchive.h \ + ../../UI/Common/../../Archive/../IProgress.h \ + ../../UI/Common/../../Archive/../../Common/MyUnknown.h \ + ../../UI/Common/../../Archive/../../Common/Types.h \ + ../../UI/Common/../../Archive/../IDecl.h \ + ../../UI/Common/../../Archive/../IStream.h \ + ../../UI/Common/../../Archive/../PropID.h +DefaultName.o: ../../UI/Common/DefaultName.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../UI/Common/DefaultName.h ../../../Common/MyString.h \ + ../../../Common/MyVector.h ../../../Common/Defs.h +EnumDirItems.o: ../../UI/Common/EnumDirItems.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../UI/Common/EnumDirItems.h ../../../Common/Wildcard.h \ + ../../../Common/MyString.h ../../../Common/MyVector.h \ + ../../../Common/Defs.h ../../../Windows/FileFind.h \ + ../../../Windows/../Common/MyString.h ../../../Windows/FileName.h \ + ../../../Windows/../../C/Types.h ../../../Windows/Defs.h \ + ../../../Windows/../Common/MyWindows.h ../../UI/Common/DirItem.h \ + ../../../Common/MyString.h ../../UI/Common/../../Archive/IArchive.h \ + ../../UI/Common/../../Archive/../IProgress.h \ + ../../UI/Common/../../Archive/../../Common/MyUnknown.h \ + ../../UI/Common/../../Archive/../../Common/MyWindows.h \ + ../../UI/Common/../../Archive/../../Common/Types.h \ + ../../UI/Common/../../Archive/../IDecl.h \ + ../../UI/Common/../../Archive/../IStream.h \ + ../../UI/Common/../../Archive/../PropID.h +Extract.o: ../../UI/Common/Extract.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../../Windows/FileDir.h \ + ../../../Windows/../Common/MyString.h \ + ../../../Windows/../Common/MyVector.h ../../../Windows/../Common/Defs.h \ + ../../../Windows/Defs.h ../../../Windows/../Common/MyWindows.h \ + ../../../Windows/PropVariant.h ../../../Windows/../Common/Types.h \ + ../../../Windows/PropVariantConversions.h ../../../Common/MyString.h \ + ../../UI/Common/../Common/ExtractingFilePath.h ../../UI/Common/Extract.h \ + ../../../Windows/FileFind.h ../../../Windows/FileName.h \ + ../../../Windows/../../C/Types.h \ + ../../UI/Common/../../Archive/IArchive.h \ + ../../UI/Common/../../Archive/../IProgress.h \ + ../../UI/Common/../../Archive/../../Common/MyUnknown.h \ + ../../UI/Common/../../Archive/../../Common/MyWindows.h \ + ../../UI/Common/../../Archive/../../Common/Types.h \ + ../../UI/Common/../../Archive/../IDecl.h \ + ../../UI/Common/../../Archive/../IStream.h \ + ../../UI/Common/../../Archive/../PropID.h \ + ../../UI/Common/ArchiveExtractCallback.h ../../../Common/MyCom.h \ + ../../../Common/MyWindows.h ../../../Common/Wildcard.h \ + ../../../Common/MyString.h ../../UI/Common/../../IPassword.h \ + ../../UI/Common/../../../Common/MyUnknown.h \ + ../../UI/Common/../../../Common/Types.h ../../UI/Common/../../IDecl.h \ + ../../UI/Common/../../Common/FileStreams.h \ + ../../UI/Common/../../Common/../../Windows/FileIO.h \ + ../../UI/Common/../../Common/../../Common/MyCom.h \ + ../../UI/Common/../../Common/../IStream.h \ + ../../UI/Common/../../Common/ProgressUtils.h \ + ../../UI/Common/../../Common/../ICoder.h \ + ../../UI/Common/../../Common/../IStream.h \ + ../../UI/Common/../../Common/../IProgress.h \ + ../../UI/Common/../../Archive/Common/OutStreamWithCRC.h \ + ../../UI/Common/../../Archive/Common/../../../../C/7zCrc.h \ + ../../UI/Common/../../Archive/Common/../../../../C/Types.h \ + ../../UI/Common/../../Archive/Common/../../../Common/MyCom.h \ + ../../UI/Common/../../Archive/Common/../../IStream.h \ + ../../UI/Common/ExtractMode.h ../../UI/Common/IFileExtractCallback.h \ + ../../UI/Common/../../IDecl.h ../../UI/Common/OpenArchive.h \ + ../../UI/Common/ArchiveOpenCallback.h ../../UI/Common/LoadCodecs.h \ + ../../UI/Common/../../../Common/Types.h \ + ../../UI/Common/../../../Common/MyCom.h \ + ../../UI/Common/../../../Common/MyString.h \ + ../../UI/Common/../../../Common/Buffer.h \ + ../../UI/Common/../../../Common/Defs.h ../../UI/Common/../../ICoder.h \ + ../../UI/Common/../../../Windows/DLL.h \ + ../../UI/Common/../../../Windows/../Common/MyString.h \ + ../../UI/Common/Property.h ../../UI/Common/../Common/LoadCodecs.h \ + ../../UI/Common/SetProperties.h +ExtractingFilePath.o: ../../UI/Common/ExtractingFilePath.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../UI/Common/../../../../C/Types.h ../../../Common/Wildcard.h \ + ../../../Common/MyString.h ../../../Common/MyVector.h \ + ../../../Common/Defs.h ../../UI/Common/ExtractingFilePath.h \ + ../../../Common/MyString.h +Bench.o: ../../UI/Common/Bench.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../UI/Common/Bench.h \ + ../../UI/Common/../../Common/CreateCoder.h \ + ../../UI/Common/../../Common/../../Common/MyCom.h \ + ../../UI/Common/../../Common/../../Common/MyWindows.h \ + ../../UI/Common/../../Common/../../Common/MyString.h \ + ../../UI/Common/../../Common/../../Common/MyVector.h \ + ../../UI/Common/../../Common/../../Common/Defs.h \ + ../../UI/Common/../../Common/../ICoder.h \ + ../../UI/Common/../../Common/../IStream.h \ + ../../UI/Common/../../Common/../../Common/MyUnknown.h \ + ../../UI/Common/../../Common/../../Common/Types.h \ + ../../UI/Common/../../Common/../IDecl.h \ + ../../UI/Common/../../Common/MethodId.h \ + ../../UI/Common/../../Common/../../Common/Types.h \ + ../../UI/Common/../../../../C/7zCrc.h \ + ../../UI/Common/../../../../C/Types.h \ + ../../UI/Common/../../../../C/Alloc.h \ + ../../UI/Common/../../../Windows/Synchronization.h \ + ../../UI/Common/../../../Windows/Defs.h \ + ../../UI/Common/../../../Windows/../Common/MyWindows.h \ + ../../UI/Common/../../../Windows/../../C/Threads.h \ + ../../UI/Common/../../../Windows/../../C/Types.h \ + ../../UI/Common/../../../Windows/Synchronization2.h \ + ../../UI/Common/../../../Windows/Thread.h \ + ../../UI/Common/../../../Windows/PropVariant.h \ + ../../UI/Common/../../../Windows/../Common/Types.h +LoadCodecs.o: ../../UI/Common/LoadCodecs.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../UI/Common/LoadCodecs.h \ + ../../UI/Common/../../../Common/Types.h \ + ../../UI/Common/../../../Common/MyCom.h \ + ../../UI/Common/../../../Common/MyWindows.h \ + ../../UI/Common/../../../Common/MyString.h \ + ../../UI/Common/../../../Common/MyVector.h \ + ../../UI/Common/../../../Common/Defs.h \ + ../../UI/Common/../../../Common/Buffer.h ../../UI/Common/../../ICoder.h \ + ../../UI/Common/../../IStream.h \ + ../../UI/Common/../../../Common/MyUnknown.h \ + ../../UI/Common/../../../Common/Types.h ../../UI/Common/../../IDecl.h \ + ../../UI/Common/../../../Windows/DLL.h \ + ../../UI/Common/../../../Windows/../Common/MyString.h \ + ../../UI/Common/../../Archive/IArchive.h \ + ../../UI/Common/../../Archive/../IProgress.h \ + ../../UI/Common/../../Archive/../../Common/MyUnknown.h \ + ../../UI/Common/../../Archive/../../Common/Types.h \ + ../../UI/Common/../../Archive/../IDecl.h \ + ../../UI/Common/../../Archive/../IStream.h \ + ../../UI/Common/../../Archive/../PropID.h \ + ../../UI/Common/../../../Windows/PropVariant.h \ + ../../UI/Common/../../../Windows/../Common/MyWindows.h \ + ../../UI/Common/../../../Windows/../Common/Types.h \ + ../../UI/Common/../../Common/RegisterArc.h \ + ../../UI/Common/../../Common/../Archive/IArchive.h \ + ../../UI/Common/../../../Windows/FileFind.h \ + ../../UI/Common/../../../Windows/FileName.h \ + ../../UI/Common/../../../Windows/../../C/Types.h \ + ../../UI/Common/../../../Windows/Defs.h ../../../Common/StringConvert.h \ + ../../../Common/MyWindows.h ../../../Common/MyString.h +OpenArchive.o: ../../UI/Common/OpenArchive.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../../Common/Wildcard.h ../../../Common/MyString.h \ + ../../../Common/MyVector.h ../../../Common/Defs.h \ + ../../../Windows/FileDir.h ../../../Windows/../Common/MyString.h \ + ../../../Windows/Defs.h ../../../Windows/../Common/MyWindows.h \ + ../../../Windows/PropVariant.h ../../../Windows/../Common/Types.h \ + ../../UI/Common/../../Common/FileStreams.h \ + ../../UI/Common/../../Common/../../Windows/FileIO.h \ + ../../../Common/MyString.h \ + ../../UI/Common/../../Common/../../Common/MyCom.h \ + ../../UI/Common/../../Common/../../Common/MyWindows.h \ + ../../UI/Common/../../Common/../IStream.h \ + ../../UI/Common/../../Common/../../Common/MyUnknown.h \ + ../../UI/Common/../../Common/../../Common/Types.h \ + ../../UI/Common/../../Common/../IDecl.h \ + ../../UI/Common/../../Common/StreamUtils.h ../../UI/Common/DefaultName.h \ + ../../UI/Common/OpenArchive.h ../../../Windows/FileFind.h \ + ../../../Windows/FileName.h ../../../Windows/../../C/Types.h \ + ../../UI/Common/../../Archive/IArchive.h \ + ../../UI/Common/../../Archive/../IProgress.h \ + ../../UI/Common/../../Archive/../../Common/MyUnknown.h \ + ../../UI/Common/../../Archive/../../Common/Types.h \ + ../../UI/Common/../../Archive/../IDecl.h \ + ../../UI/Common/../../Archive/../IStream.h \ + ../../UI/Common/../../Archive/../PropID.h \ + ../../UI/Common/ArchiveOpenCallback.h ../../../Common/MyCom.h \ + ../../UI/Common/../../IPassword.h \ + ../../UI/Common/../../../Common/MyUnknown.h \ + ../../UI/Common/../../../Common/Types.h ../../UI/Common/../../IDecl.h \ + ../../UI/Common/LoadCodecs.h ../../UI/Common/../../../Common/Types.h \ + ../../UI/Common/../../../Common/MyCom.h \ + ../../UI/Common/../../../Common/MyString.h \ + ../../UI/Common/../../../Common/Buffer.h \ + ../../UI/Common/../../../Common/Defs.h ../../UI/Common/../../ICoder.h \ + ../../UI/Common/../../IStream.h ../../UI/Common/../../../Windows/DLL.h \ + ../../UI/Common/../../../Windows/../Common/MyString.h +PropIDUtils.o: ../../UI/Common/PropIDUtils.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../../Common/IntToString.h ../../../Windows/FileFind.h \ + ../../../Windows/../Common/MyString.h \ + ../../../Windows/../Common/MyVector.h ../../../Windows/../Common/Defs.h \ + ../../../Windows/FileName.h ../../../Windows/../../C/Types.h \ + ../../../Windows/Defs.h ../../../Windows/../Common/MyWindows.h \ + ../../../Windows/PropVariantConversions.h ../../../Common/MyString.h \ + ../../UI/Common/../../PropID.h ../../UI/Common/PropIDUtils.h +SetProperties.o: ../../UI/Common/SetProperties.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../UI/Common/SetProperties.h ../../UI/Common/Property.h \ + ../../../Common/MyString.h ../../../Common/MyVector.h \ + ../../../Common/Defs.h ../../../Windows/PropVariant.h \ + ../../../Windows/../Common/MyWindows.h \ + ../../../Windows/../Common/Types.h ../../../Common/StringToInt.h \ + ../../../Common/MyCom.h ../../../Common/MyWindows.h \ + ../../UI/Common/../../Archive/IArchive.h \ + ../../UI/Common/../../Archive/../IProgress.h \ + ../../UI/Common/../../Archive/../../Common/MyUnknown.h \ + ../../UI/Common/../../Archive/../../Common/MyWindows.h \ + ../../UI/Common/../../Archive/../../Common/Types.h \ + ../../UI/Common/../../Archive/../IDecl.h \ + ../../UI/Common/../../Archive/../IStream.h \ + ../../UI/Common/../../Archive/../PropID.h +SortUtils.o: ../../UI/Common/SortUtils.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../UI/Common/SortUtils.h \ + ../../../Common/MyString.h ../../../Common/MyVector.h \ + ../../../Common/Defs.h ../../../Common/Wildcard.h \ + ../../../Common/MyString.h +TempFiles.o: ../../UI/Common/TempFiles.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../UI/Common/TempFiles.h \ + ../../../Common/MyString.h ../../../Common/MyVector.h \ + ../../../Common/Defs.h ../../../Windows/FileDir.h \ + ../../../Windows/../Common/MyString.h ../../../Windows/Defs.h \ + ../../../Windows/../Common/MyWindows.h ../../../Windows/FileIO.h +Update.o: ../../UI/Common/Update.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../UI/Common/Update.h \ + ../../../Common/Wildcard.h ../../../Common/MyString.h \ + ../../../Common/MyVector.h ../../../Common/Defs.h \ + ../../UI/Common/ArchiveOpenCallback.h ../../../Common/MyCom.h \ + ../../../Common/MyWindows.h ../../../Common/MyString.h \ + ../../../Windows/FileFind.h ../../../Windows/../Common/MyString.h \ + ../../../Windows/FileName.h ../../../Windows/../../C/Types.h \ + ../../../Windows/Defs.h ../../../Windows/../Common/MyWindows.h \ + ../../UI/Common/../../IPassword.h \ + ../../UI/Common/../../../Common/MyUnknown.h \ + ../../UI/Common/../../../Common/MyWindows.h \ + ../../UI/Common/../../../Common/Types.h ../../UI/Common/../../IDecl.h \ + ../../UI/Common/../../Archive/IArchive.h \ + ../../UI/Common/../../Archive/../IProgress.h \ + ../../UI/Common/../../Archive/../../Common/MyUnknown.h \ + ../../UI/Common/../../Archive/../../Common/Types.h \ + ../../UI/Common/../../Archive/../IDecl.h \ + ../../UI/Common/../../Archive/../IStream.h \ + ../../UI/Common/../../Archive/../PropID.h ../../UI/Common/LoadCodecs.h \ + ../../UI/Common/../../../Common/Types.h \ + ../../UI/Common/../../../Common/MyCom.h \ + ../../UI/Common/../../../Common/MyString.h \ + ../../UI/Common/../../../Common/Buffer.h \ + ../../UI/Common/../../../Common/Defs.h ../../UI/Common/../../ICoder.h \ + ../../UI/Common/../../IStream.h ../../UI/Common/../../../Windows/DLL.h \ + ../../UI/Common/../../../Windows/../Common/MyString.h \ + ../../UI/Common/Property.h ../../UI/Common/UpdateAction.h \ + ../../UI/Common/UpdateCallback.h ../../UI/Common/../Common/UpdatePair.h \ + ../../UI/Common/../Common/DirItem.h \ + ../../UI/Common/../Common/../../Archive/IArchive.h \ + ../../UI/Common/../Common/UpdateAction.h \ + ../../UI/Common/../Common/UpdateProduce.h \ + ../../UI/Common/../Common/UpdatePair.h ../../../Common/IntToString.h \ + ../../../Common/StringConvert.h ../../../Windows/FileDir.h \ + ../../../Windows/FileName.h ../../../Windows/PropVariant.h \ + ../../../Windows/../Common/Types.h \ + ../../../Windows/PropVariantConversions.h ../../../Windows/Time.h \ + ../../UI/Common/../../Common/FileStreams.h \ + ../../UI/Common/../../Common/../../Windows/FileIO.h \ + ../../UI/Common/../../Common/../../Common/MyCom.h \ + ../../UI/Common/../../Common/../IStream.h \ + ../../UI/Common/../../Compress/CopyCoder.h \ + ../../UI/Common/../../Compress/../../Common/MyCom.h \ + ../../UI/Common/../../Compress/../ICoder.h \ + ../../UI/Common/../Common/DirItem.h \ + ../../UI/Common/../Common/EnumDirItems.h \ + ../../UI/Common/../Common/OpenArchive.h \ + ../../UI/Common/../Common/ArchiveOpenCallback.h \ + ../../UI/Common/../Common/LoadCodecs.h ../../UI/Common/EnumDirItems.h \ + ../../UI/Common/SetProperties.h ../../UI/Common/TempFiles.h +UpdateAction.o: ../../UI/Common/UpdateAction.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../UI/Common/UpdateAction.h +UpdateCallback.o: ../../UI/Common/UpdateCallback.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../../Common/ComTry.h ../../../Common/MyWindows.h \ + ../../../Common/Defs.h ../../../Common/IntToString.h \ + ../../../Common/StringConvert.h ../../../Common/MyString.h \ + ../../../Common/MyVector.h ../../../Common/Defs.h \ + ../../../Windows/PropVariant.h ../../../Windows/../Common/MyWindows.h \ + ../../../Windows/../Common/Types.h \ + ../../UI/Common/../../Common/FileStreams.h \ + ../../UI/Common/../../Common/../../Windows/FileIO.h \ + ../../../Common/MyString.h \ + ../../UI/Common/../../Common/../../Common/MyCom.h \ + ../../UI/Common/../../Common/../../Common/MyWindows.h \ + ../../UI/Common/../../Common/../IStream.h \ + ../../UI/Common/../../Common/../../Common/MyUnknown.h \ + ../../UI/Common/../../Common/../../Common/Types.h \ + ../../UI/Common/../../Common/../IDecl.h ../../UI/Common/UpdateCallback.h \ + ../../../Common/MyCom.h ../../UI/Common/../../IPassword.h \ + ../../UI/Common/../../../Common/MyUnknown.h \ + ../../UI/Common/../../../Common/Types.h ../../UI/Common/../../IDecl.h \ + ../../UI/Common/../../ICoder.h ../../UI/Common/../../IStream.h \ + ../../UI/Common/../Common/UpdatePair.h \ + ../../UI/Common/../Common/DirItem.h \ + ../../UI/Common/../Common/../../Archive/IArchive.h \ + ../../UI/Common/../Common/../../Archive/../IProgress.h \ + ../../UI/Common/../Common/../../Archive/../../Common/MyUnknown.h \ + ../../UI/Common/../Common/../../Archive/../../Common/Types.h \ + ../../UI/Common/../Common/../../Archive/../IDecl.h \ + ../../UI/Common/../Common/../../Archive/../IStream.h \ + ../../UI/Common/../Common/../../Archive/../PropID.h \ + ../../UI/Common/../Common/UpdateAction.h \ + ../../UI/Common/../Common/UpdateProduce.h \ + ../../UI/Common/../Common/UpdatePair.h +UpdatePair.o: ../../UI/Common/UpdatePair.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../../Common/Defs.h \ + ../../../Common/Wildcard.h ../../../Common/MyString.h \ + ../../../Common/MyVector.h ../../../Common/Defs.h \ + ../../../Windows/Time.h ../../UI/Common/SortUtils.h \ + ../../../Common/MyString.h ../../UI/Common/UpdatePair.h \ + ../../UI/Common/DirItem.h ../../UI/Common/../../Archive/IArchive.h \ + ../../UI/Common/../../Archive/../IProgress.h \ + ../../UI/Common/../../Archive/../../Common/MyUnknown.h \ + ../../UI/Common/../../Archive/../../Common/MyWindows.h \ + ../../UI/Common/../../Archive/../../Common/Types.h \ + ../../UI/Common/../../Archive/../IDecl.h \ + ../../UI/Common/../../Archive/../IStream.h \ + ../../UI/Common/../../Archive/../PropID.h ../../UI/Common/UpdateAction.h +UpdateProduce.o: ../../UI/Common/UpdateProduce.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../UI/Common/UpdateProduce.h ../../UI/Common/UpdatePair.h \ + ../../UI/Common/DirItem.h ../../../Common/MyString.h \ + ../../../Common/MyVector.h ../../../Common/Defs.h \ + ../../UI/Common/../../Archive/IArchive.h \ + ../../UI/Common/../../Archive/../IProgress.h \ + ../../UI/Common/../../Archive/../../Common/MyUnknown.h \ + ../../UI/Common/../../Archive/../../Common/MyWindows.h \ + ../../UI/Common/../../Archive/../../Common/Types.h \ + ../../UI/Common/../../Archive/../IDecl.h \ + ../../UI/Common/../../Archive/../IStream.h \ + ../../UI/Common/../../Archive/../PropID.h ../../UI/Common/UpdateAction.h +OutStreamWithCRC.o: ../../Archive/Common/OutStreamWithCRC.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../Archive/Common/OutStreamWithCRC.h \ + ../../Archive/Common/../../../../C/7zCrc.h \ + ../../Archive/Common/../../../../C/Types.h \ + ../../Archive/Common/../../../Common/MyCom.h \ + ../../Archive/Common/../../../Common/MyWindows.h \ + ../../Archive/Common/../../IStream.h \ + ../../Archive/Common/../../../Common/MyUnknown.h \ + ../../Archive/Common/../../../Common/Types.h \ + ../../Archive/Common/../../IDecl.h diff --git a/CPP/7zip/UI/Console/makefile.list b/CPP/7zip/UI/Console/makefile.list new file mode 100644 index 0000000..5bd4444 --- /dev/null +++ b/CPP/7zip/UI/Console/makefile.list @@ -0,0 +1,81 @@ +SRCS=\ + ../../../myWindows/myAddExeFlag.cpp \ + ../../../myWindows/mySplitCommandLine.cpp \ + ../../../myWindows/wine_date_and_time.cpp \ + \ + ../../UI/Console/ConsoleClose.cpp \ + ../../UI/Console/ExtractCallbackConsole.cpp \ + ../../UI/Console/BenchCon.cpp \ + ../../UI/Console/List.cpp \ + ../../UI/Console/Main.cpp \ + ../../UI/Console/MainAr.cpp \ + ../../UI/Console/OpenCallbackConsole.cpp \ + ../../UI/Console/PercentPrinter.cpp \ + ../../UI/Console/UpdateCallbackConsole.cpp \ + ../../UI/Console/UserInputUtils.cpp \ + \ + ../../../Common/CommandLineParser.cpp \ + ../../../Common/CRC.cpp \ + ../../../Common/IntToString.cpp \ + ../../../Common/ListFileUtils.cpp \ + ../../../Common/StdInStream.cpp \ + ../../../Common/StdOutStream.cpp \ + ../../../Common/MyString.cpp \ + ../../../Common/MyWindows.cpp \ + ../../../Common/StringConvert.cpp \ + ../../../Common/StringToInt.cpp \ + ../../../Common/UTFConvert.cpp \ + ../../../Common/MyVector.cpp \ + ../../../Common/Wildcard.cpp \ + \ + ../../../Windows/DLL.cpp \ + ../../../Windows/Error.cpp \ + ../../../Windows/FileDir.cpp \ + ../../../Windows/FileFind.cpp \ + ../../../Windows/FileIO.cpp \ + ../../../Windows/FileName.cpp \ + ../../../Windows/PropVariant.cpp \ + ../../../Windows/PropVariantConversions.cpp \ + ../../../Windows/System.cpp \ + ../../../Windows/Time.cpp \ + \ + ../../Common/CreateCoder.cpp \ + ../../Common/FilePathAutoRename.cpp \ + ../../Common/FileStreams.cpp \ + ../../Common/FilterCoder.cpp \ + ../../Common/ProgressUtils.cpp \ + ../../Common/StreamUtils.cpp \ + \ + ../../UI/Common/ArchiveCommandLine.cpp \ + ../../UI/Common/ArchiveExtractCallback.cpp \ + ../../UI/Common/ArchiveOpenCallback.cpp \ + ../../UI/Common/DefaultName.cpp \ + ../../UI/Common/EnumDirItems.cpp \ + ../../UI/Common/Extract.cpp \ + ../../UI/Common/ExtractingFilePath.cpp \ + ../../UI/Common/Bench.cpp \ + ../../UI/Common/LoadCodecs.cpp \ + ../../UI/Common/OpenArchive.cpp \ + ../../UI/Common/PropIDUtils.cpp \ + ../../UI/Common/SetProperties.cpp \ + ../../UI/Common/SortUtils.cpp \ + ../../UI/Common/TempFiles.cpp \ + ../../UI/Common/Update.cpp \ + ../../UI/Common/UpdateAction.cpp \ + ../../UI/Common/UpdateCallback.cpp \ + ../../UI/Common/UpdatePair.cpp \ + ../../UI/Common/UpdateProduce.cpp \ + \ + ../../Archive/Common/OutStreamWithCRC.cpp + + + +SRCS_C=\ + ../../../../C/Alloc.c \ + ../../../../C/Threads.c \ + +include ../../../../makefile.rules + +Main.o : ../../UI/Console/Main.cpp + $(CXX) $(CXXFLAGS) ../../UI/Console/Main.cpp + diff --git a/CPP/7zip/UI/Explorer/ContextMenu.h b/CPP/7zip/UI/Explorer/ContextMenu.h new file mode 100644 index 0000000..b5577de --- /dev/null +++ b/CPP/7zip/UI/Explorer/ContextMenu.h @@ -0,0 +1,5 @@ + + +/* TODO */ + + diff --git a/CPP/7zip/UI/Explorer/MyMessages.cpp b/CPP/7zip/UI/Explorer/MyMessages.cpp new file mode 100644 index 0000000..62ac42e --- /dev/null +++ b/CPP/7zip/UI/Explorer/MyMessages.cpp @@ -0,0 +1,58 @@ +// MyMessages.cpp + +#include "StdAfx.h" + +#include "MyMessages.h" + +#include "Windows/Error.h" +#include "Windows/ResourceString.h" + +#ifdef LANG +#include "../FileManager/LangUtils.h" +#endif + +using namespace NWindows; + +void ShowErrorMessage(HWND window, LPCWSTR message) +{ + ::MessageBoxW(window, message, L"7-Zip", MB_OK | MB_ICONSTOP); +} + +void ShowErrorMessageHwndRes(HWND window, UINT resID + #ifdef LANG + , UInt32 langID + #endif + ) +{ + ShowErrorMessage(window, + #ifdef LANG + LangString(resID, langID) + #else + MyLoadStringW(resID) + #endif + ); +} + +void ShowErrorMessageRes(UINT resID + #ifdef LANG + , UInt32 langID + #endif + ) +{ + ShowErrorMessageHwndRes(0, resID + #ifdef LANG + , langID + #endif + ); +} + +void ShowErrorMessageDWORD(HWND window, DWORD errorCode) +{ + ShowErrorMessage(window, NError::MyFormatMessageW(errorCode)); +} + +void ShowLastErrorMessage(HWND window) +{ + ShowErrorMessageDWORD(window, ::GetLastError()); +} + diff --git a/CPP/7zip/UI/Explorer/MyMessages.h b/CPP/7zip/UI/Explorer/MyMessages.h new file mode 100644 index 0000000..10da975 --- /dev/null +++ b/CPP/7zip/UI/Explorer/MyMessages.h @@ -0,0 +1,28 @@ +// MyMessages.h + +#ifndef __MYMESSAGES_H +#define __MYMESSAGES_H + +#include "Common/MyString.h" +#include "Common/Types.h" + +void ShowErrorMessage(HWND window, LPCWSTR message); +inline void ShowErrorMessage(LPCWSTR message) { ShowErrorMessage(0, message); } + +void ShowErrorMessageHwndRes(HWND window, UINT resID + #ifdef LANG + , UInt32 langID + #endif + ); + +void ShowErrorMessageRes(UINT resID + #ifdef LANG + , UInt32 langID + #endif + ); + +// void ShowErrorMessageDWORD(HWND window, DWORD errorCode); +// inline void ErrorMessageDWORD(DWORD errorCode) { ShowErrorMessageDWORD(0, errorCode); } +void ShowLastErrorMessage(HWND window = 0); + +#endif diff --git a/CPP/7zip/UI/FileManager/App.cpp b/CPP/7zip/UI/FileManager/App.cpp new file mode 100644 index 0000000..ef018be --- /dev/null +++ b/CPP/7zip/UI/FileManager/App.cpp @@ -0,0 +1,852 @@ +// App.cpp + +#include "StdAfx.h" + +#include "resource.h" +#include "OverwriteDialogRes.h" + +#include "Common/IntToString.h" +#include "Common/StringConvert.h" + +#include "Windows/COM.h" +#include "Windows/Error.h" +#include "Windows/FileDir.h" +#include "Windows/PropVariant.h" +#include "Windows/PropVariantConversions.h" +#include "Windows/Thread.h" + +#include "App.h" +#include "CopyDialog.h" +#include "ExtractCallback.h" +#include "FormatUtils.h" +#include "IFolder.h" +#include "LangUtils.h" +#include "RegistryUtils.h" +#include "ViewSettings.h" + +using namespace NWindows; +using namespace NFile; +using namespace NFind; + +extern DWORD g_ComCtl32Version; +extern HINSTANCE g_hInstance; + +static LPCWSTR kTempDirPrefix = L"7zE"; + +void CPanelCallbackImp::OnTab() +{ + if (g_App.NumPanels != 1) + _app->Panels[1 - _index].SetFocusToList(); + _app->RefreshTitle(); +} + +void CPanelCallbackImp::SetFocusToPath(int index) +{ + int newPanelIndex = index; + if (g_App.NumPanels == 1) + newPanelIndex = g_App.LastFocusedPanel; + _app->RefreshTitle(); + // _app->Panels[newPanelIndex]._headerComboBox.SetFocus(); + // _app->Panels[newPanelIndex]._headerComboBox.ShowDropDown(); +} + + +void CPanelCallbackImp::OnCopy(bool move, bool copyToSame) { _app->OnCopy(move, copyToSame, _index); } +void CPanelCallbackImp::OnSetSameFolder() { _app->OnSetSameFolder(_index); } +void CPanelCallbackImp::OnSetSubFolder() { _app->OnSetSubFolder(_index); } +void CPanelCallbackImp::PanelWasFocused() { _app->SetFocusedPanel(_index); _app->RefreshTitle(_index); } +void CPanelCallbackImp::DragBegin() { _app->DragBegin(_index); } +void CPanelCallbackImp::DragEnd() { _app->DragEnd(); } +void CPanelCallbackImp::RefreshTitle(bool always) { _app->RefreshTitle(_index, always); } + +void CApp::SetListSettings() +{ + bool showDots = ReadShowDots(); + bool showRealFileIcons = ReadShowRealFileIcons(); + + DWORD extendedStyle =0; /* FIXME = LVS_EX_HEADERDRAGDROP; + if (ReadFullRow()) + extendedStyle |= LVS_EX_FULLROWSELECT; + if (ReadShowGrid()) + extendedStyle |= LVS_EX_GRIDLINES; + */ + bool mySelectionMode = ReadAlternativeSelection(); + +#ifdef _WIN32 + if (ReadSingleClick()) + { + extendedStyle |= LVS_EX_ONECLICKACTIVATE | LVS_EX_TRACKSELECT; + /* + if (ReadUnderline()) + extendedStyle |= LVS_EX_UNDERLINEHOT; + */ + } +#endif + + for (int i = 0; i < kNumPanelsMax; i++) + { + CPanel &panel = Panels[i]; + panel._mySelectMode = mySelectionMode; + panel._showDots = showDots; + panel._showRealFileIcons = showRealFileIcons; + panel._exStyle = extendedStyle; + + /* FIXME + DWORD style = (DWORD)panel._listView.GetStyle(); + if (mySelectionMode) + style |= LVS_SINGLESEL; + else + style &= ~LVS_SINGLESEL; + panel._listView.SetStyle(style); + */ + panel.SetExtendedStyle(); + } +} + +void CApp::SetShowSystemMenu() +{ + ShowSystemMenu = ReadShowSystemMenu(); +} + +#ifndef ILC_COLOR32 +#define ILC_COLOR32 0x0020 +#endif + +HRESULT CApp::CreateOnePanel(int panelIndex, const UString &mainPath, const UString &arcFormat, + bool &archiveIsOpened, bool &encrypted) +{ + if (PanelsCreated[panelIndex]) + return S_OK; + m_PanelCallbackImp[panelIndex].Init(this, panelIndex); + UString path; + if (mainPath.IsEmpty()) + { + if (!::ReadPanelPath(panelIndex, path)) + path.Empty(); + } + else + path = mainPath; + int id = 1000 + 100 * panelIndex; + RINOK(Panels[panelIndex].Create(_window, _window, + id, path, arcFormat, &m_PanelCallbackImp[panelIndex], &AppState, archiveIsOpened, encrypted)); + PanelsCreated[panelIndex] = true; + return S_OK; +} + +#if _WIN32 +static void CreateToolbar(HWND parent, + NWindows::NControl::CImageList &imageList, + NWindows::NControl::CToolBar &toolBar, + bool largeButtons) +{ + toolBar.Attach(::CreateWindowEx(0, TOOLBARCLASSNAME, NULL, 0 + | WS_CHILD + | WS_VISIBLE + | TBSTYLE_FLAT + | TBSTYLE_TOOLTIPS + | TBSTYLE_WRAPABLE + // | TBSTYLE_AUTOSIZE + // | CCS_NORESIZE + #ifdef UNDER_CE + | CCS_NODIVIDER + | CCS_NOPARENTALIGN + #endif + ,0,0,0,0, parent, NULL, g_hInstance, NULL)); + + // TB_BUTTONSTRUCTSIZE message, which is required for + // backward compatibility. + toolBar.ButtonStructSize(); + + imageList.Create( + largeButtons ? 48: 24, + largeButtons ? 36: 24, + ILC_MASK | ILC_COLOR32, 0, 0); + toolBar.SetImageList(0, imageList); +} +#endif + +struct CButtonInfo +{ + int CommandID; + UINT BitmapResID; + UINT Bitmap2ResID; + UINT StringResID; + UInt32 LangID; + UString GetText() const { return LangString(StringResID, LangID); } +}; + +static CButtonInfo g_StandardButtons[] = +{ + { IDM_COPY_TO, IDB_COPY, IDB_COPY2, IDS_BUTTON_COPY, 0x03020420}, + { IDM_MOVE_TO, IDB_MOVE, IDB_MOVE2, IDS_BUTTON_MOVE, 0x03020421}, + { IDM_DELETE, IDB_DELETE, IDB_DELETE2, IDS_BUTTON_DELETE, 0x03020422} , + { IDM_FILE_PROPERTIES, IDB_INFO, IDB_INFO2, IDS_BUTTON_INFO, 0x03020423} +}; + +static CButtonInfo g_ArchiveButtons[] = +{ + { kAddCommand, IDB_ADD, IDB_ADD2, IDS_ADD, 0x03020400}, + { kExtractCommand, IDB_EXTRACT, IDB_EXTRACT2, IDS_EXTRACT, 0x03020401}, + { kTestCommand , IDB_TEST, IDB_TEST2, IDS_TEST, 0x03020402} +}; + +static bool SetButtonText(int commandID, CButtonInfo *buttons, int numButtons, UString &s) +{ + for (int i = 0; i < numButtons; i++) + { + const CButtonInfo &b = buttons[i]; + if (b.CommandID == commandID) + { + s = b.GetText(); + return true; + } + } + return false; +} + +static void SetButtonText(int commandID, UString &s) +{ + if (SetButtonText(commandID, g_StandardButtons, + sizeof(g_StandardButtons) / sizeof(g_StandardButtons[0]), s)) + return; + SetButtonText(commandID, g_ArchiveButtons, + sizeof(g_ArchiveButtons) / sizeof(g_ArchiveButtons[0]), s); +} + +#ifdef _WIN32 +static void AddButton( + NControl::CImageList &imageList, + NControl::CToolBar &toolBar, + CButtonInfo &butInfo, bool showText, bool large) +{ + TBBUTTON but; + but.iBitmap = 0; + but.idCommand = butInfo.CommandID; + but.fsState = TBSTATE_ENABLED; + but.fsStyle = TBSTYLE_BUTTON; + but.dwData = 0; + + UString s = butInfo.GetText(); + but.iString = 0; + if (showText) + but.iString = (INT_PTR)(LPCWSTR)s; + + but.iBitmap = imageList.GetImageCount(); + HBITMAP b = ::LoadBitmap(g_hInstance, + large ? + MAKEINTRESOURCE(butInfo.BitmapResID): + MAKEINTRESOURCE(butInfo.Bitmap2ResID)); + if (b != 0) + { + imageList.AddMasked(b, RGB(255, 0, 255)); + ::DeleteObject(b); + } + #ifdef _UNICODE + toolBar.AddButton(1, &but); + #else + toolBar.AddButtonW(1, &but); + #endif +} + +void CApp::ReloadToolbars() +{ + _buttonsImageList.Destroy(); + _toolBar.Destroy(); + + + if (ShowArchiveToolbar || ShowStandardToolbar) + { + CreateToolbar(_window, _buttonsImageList, _toolBar, LargeButtons); + int i; + if (ShowArchiveToolbar) + for (i = 0; i < sizeof(g_ArchiveButtons) / sizeof(g_ArchiveButtons[0]); i++) + AddButton(_buttonsImageList, _toolBar, g_ArchiveButtons[i], ShowButtonsLables, LargeButtons); + if (ShowStandardToolbar) + for (i = 0; i < sizeof(g_StandardButtons) / sizeof(g_StandardButtons[0]); i++) + AddButton(_buttonsImageList, _toolBar, g_StandardButtons[i], ShowButtonsLables, LargeButtons); + + _toolBar.AutoSize(); + } +} +#endif + +void CApp::SaveToolbarChanges() +{ +#ifdef _WIN32 + SaveToolbar(); + ReloadToolbars(); + MoveSubWindows(); +#endif // #ifdef _WIN32 +} + +void MyLoadMenu(); + +HRESULT CApp::Create(HWND hwnd, const UString &mainPath, const UString &arcFormat, int xSizes[2], bool &archiveIsOpened, bool &encrypted) +{ + _window.Attach(hwnd); +#ifdef _WIN32 + ReadToolbar(); + ReloadToolbars(); +#endif + + int i; + for (i = 0; i < kNumPanelsMax; i++) + PanelsCreated[i] = false; + + AppState.Read(); + SetListSettings(); + SetShowSystemMenu(); + if (LastFocusedPanel >= kNumPanelsMax) + LastFocusedPanel = 0; + + CListMode listMode; + ReadListMode(listMode); + for (i = 0; i < kNumPanelsMax; i++) + { + CPanel &panel = Panels[i]; + panel._ListViewMode = listMode.Panels[i]; + panel._xSize = xSizes[i]; + panel._flatModeForArc = ReadFlatView(i); + } + for (i = 0; i < kNumPanelsMax; i++) + if (NumPanels > 1 || i == LastFocusedPanel) + { + if (NumPanels == 1) + Panels[i]._xSize = xSizes[0] + xSizes[1]; + bool archiveIsOpened2 = false; + bool encrypted2 = false; + bool mainPanel = (i == LastFocusedPanel); + RINOK(CreateOnePanel(i, mainPanel ? mainPath : L"", arcFormat, archiveIsOpened2, encrypted2)); + if (mainPanel) + { + archiveIsOpened = archiveIsOpened2; + encrypted = encrypted2; + } + } + SetFocusedPanel(LastFocusedPanel); + Panels[LastFocusedPanel].SetFocusToList(); + return S_OK; +} + +HRESULT CApp::SwitchOnOffOnePanel() +{ + if (NumPanels == 1) + { + NumPanels++; + bool archiveIsOpened, encrypted; + RINOK(CreateOnePanel(1 - LastFocusedPanel, UString(), UString(), archiveIsOpened, encrypted)); + // FIXME Panels[1 - LastFocusedPanel].Enable(true); + // FIXME Panels[1 - LastFocusedPanel].Show(SW_SHOWNORMAL); + } + else + { + NumPanels--; + // FIXME Panels[1 - LastFocusedPanel].Enable(false); + // FIXME Panels[1 - LastFocusedPanel].Show(SW_HIDE); + } + MoveSubWindows(); + return S_OK; +} + +void CApp::Save() +{ + AppState.Save(); + CListMode listMode; + for (int i = 0; i < kNumPanelsMax; i++) + { + const CPanel &panel = Panels[i]; + UString path; + if (panel._parentFolders.IsEmpty()) + path = panel._currentFolderPrefix; + else + path = GetFolderPath(panel._parentFolders[0].ParentFolder); + SavePanelPath(i, path); + listMode.Panels[i] = panel.GetListViewMode(); + SaveFlatView(i, panel._flatModeForArc); + } + SaveListMode(listMode); +} + +void CApp::Release() +{ + // It's for unloading COM dll's: don't change it. + for (int i = 0; i < kNumPanelsMax; i++) + Panels[i].Release(); +} + +// reduces path to part that exists on disk +static void ReducePathToRealFileSystemPath(UString &path) +{ + while (!path.IsEmpty()) + { + if (NFind::DoesDirExist(path)) + { + NName::NormalizeDirPathPrefix(path); + break; + } + int pos = path.ReverseFind(WCHAR_PATH_SEPARATOR); + if (pos < 0) + path.Empty(); + else + { + path = path.Left(pos + 1); + if (path.Length() == 3 && path[1] == L':') + break; + if (path.Length() > 2 && path[0] == WCHAR_PATH_SEPARATOR && path[1] == WCHAR_PATH_SEPARATOR) + { + int nextPos = path.Find(WCHAR_PATH_SEPARATOR, 2); // pos after \\COMPNAME + if (nextPos > 0 && path.Find(WCHAR_PATH_SEPARATOR, nextPos + 1) == pos) + break; + } + path = path.Left(pos); + } + } +} + +// return true for dir\, if dir exist +static bool CheckFolderPath(const UString &path) +{ + UString pathReduced = path; + ReducePathToRealFileSystemPath(pathReduced); + return (pathReduced == path); +} + +static bool IsPathAbsolute(const UString &path) +{ + if (path.Length() >= 1 && path[0] == WCHAR_PATH_SEPARATOR) + return true; +// #ifdef _WIN32 + if (path.Length() >= 3 && path[1] == L':' && path[2] == L'\\') + return true; +// #endif + return false; +} + +extern UString ConvertSizeToString(UInt64 value); + +static UString AddSizeValue(UInt64 size) +{ + return MyFormatNew(IDS_FILE_SIZE, 0x02000982, ConvertSizeToString(size)); +} + +static void AddValuePair1(UINT resourceID, UInt32 langID, UInt64 size, UString &s) +{ + s += LangString(resourceID, langID); + s += L" "; + s += AddSizeValue(size); + s += L"\n"; +} + +void AddValuePair2(UINT resourceID, UInt32 langID, UInt64 num, UInt64 size, UString &s) +{ + if (num == 0) + return; + s += LangString(resourceID, langID); + s += L" "; + s += ConvertSizeToString(num); + + if (size != (UInt64)(Int64)-1) + { + s += L" ( "; + s += AddSizeValue(size); + s += L" )"; + } + s += L"\n"; +} + +static void AddPropValueToSum(IFolderFolder *folder, int index, PROPID propID, UInt64 &sum) +{ + if (sum == (UInt64)(Int64)-1) + return; + NCOM::CPropVariant prop; + folder->GetProperty(index, propID, &prop); + switch(prop.vt) + { + case VT_UI4: + case VT_UI8: + sum += ConvertPropVariantToUInt64(prop); + break; + default: + sum = (UInt64)(Int64)-1; + } +} + +UString CPanel::GetItemsInfoString(const CRecordVector &indices) +{ + UString info; + UInt64 numDirs, numFiles, filesSize, foldersSize; + numDirs = numFiles = filesSize = foldersSize = 0; + int i; + for (i = 0; i < indices.Size(); i++) + { + int index = indices[i]; + if (IsItemFolder(index)) + { + AddPropValueToSum(_folder, index, kpidSize, foldersSize); + numDirs++; + } + else + { + AddPropValueToSum(_folder, index, kpidSize, filesSize); + numFiles++; + } + } + + AddValuePair2(IDS_FOLDERS_COLON, 0x02000321, numDirs, foldersSize, info); + AddValuePair2(IDS_FILES_COLON, 0x02000320, numFiles, filesSize, info); + int numDefined = ((foldersSize != (UInt64)(Int64)-1) && foldersSize != 0) ? 1: 0; + numDefined += ((filesSize != (UInt64)(Int64)-1) && filesSize != 0) ? 1: 0; + if (numDefined == 2) + AddValuePair1(IDS_SIZE_COLON, 0x02000322, filesSize + foldersSize, info); + + info += L"\n"; +#ifdef _WIN32 + info += _currentFolderPrefix; +#else + { + extern const TCHAR * nameWindowToUnix(const TCHAR * lpFileName); + + UString tmp = nameWindowToUnix(_currentFolderPrefix); + + info += tmp; + } +#endif + + + for (i = 0; i < indices.Size() && i < kCopyDialog_NumInfoLines - 6; i++) + { + info += L"\n "; + int index = indices[i]; + info += GetItemRelPath(index); + if (IsItemFolder(index)) + info += WCHAR_PATH_SEPARATOR; + } + if (i != indices.Size()) + info += L"\n ..."; + return info; +} + +void CApp::OnCopy(bool move, bool copyToSame, int srcPanelIndex) +{ + int destPanelIndex = (NumPanels <= 1) ? srcPanelIndex : (1 - srcPanelIndex); + CPanel &srcPanel = Panels[srcPanelIndex]; + CPanel &destPanel = Panels[destPanelIndex]; + + CPanel::CDisableTimerProcessing disableTimerProcessing1(destPanel); + CPanel::CDisableTimerProcessing disableTimerProcessing2(srcPanel); + + if (!srcPanel.DoesItSupportOperations()) + { + srcPanel.MessageBoxErrorLang(IDS_OPERATION_IS_NOT_SUPPORTED, 0x03020208); + return; + } + + CRecordVector indices; + UString destPath; + bool useDestPanel = false; + + { + if (copyToSame) + { + int focusedItem = srcPanel._listView.GetFocusedItem(); + if (focusedItem < 0) + return; + int realIndex = srcPanel.GetRealItemIndex(focusedItem); + if (realIndex == kParentIndex) + return; + indices.Add(realIndex); + destPath = srcPanel.GetItemName(realIndex); + } + else + { + srcPanel.GetOperatedIndicesSmart(indices); + if (indices.Size() == 0) + return; + destPath = destPanel._currentFolderPrefix; + if (NumPanels == 1) + ReducePathToRealFileSystemPath(destPath); + } + + CCopyDialog copyDialog; + UStringVector copyFolders; + ReadCopyHistory(copyFolders); + + copyDialog.Strings = copyFolders; + copyDialog.Value = destPath; + + copyDialog.Title = move ? + LangString(IDS_MOVE, 0x03020202): + LangString(IDS_COPY, 0x03020201); + copyDialog.Static = move ? + LangString(IDS_MOVE_TO, 0x03020204): + LangString(IDS_COPY_TO, 0x03020203); + + copyDialog.Info = srcPanel.GetItemsInfoString(indices); + + if (copyDialog.Create(srcPanel.GetParent()) == IDCANCEL) + return; + + destPath = copyDialog.Value; + + if (destPath.IsEmpty()) + { + srcPanel.MessageBoxErrorLang(IDS_OPERATION_IS_NOT_SUPPORTED, 0x03020208); + return; + } + + if (!IsPathAbsolute(destPath)) + { + if (!srcPanel.IsFSFolder()) + { + srcPanel.MessageBoxErrorLang(IDS_OPERATION_IS_NOT_SUPPORTED, 0x03020208); + return; + } + destPath = srcPanel._currentFolderPrefix + destPath; + } + + #ifndef UNDER_CE + if (destPath.Length() > 0 && destPath[0] == '\\') + if (destPath.Length() == 1 || destPath[1] != '\\') + { + srcPanel.MessageBoxErrorLang(IDS_OPERATION_IS_NOT_SUPPORTED, 0x03020208); + return; + } + #endif + + if (indices.Size() > 1 || + (!destPath.IsEmpty() && destPath.Back() == WCHAR_PATH_SEPARATOR) || + NFind::DoesDirExist(destPath) || + srcPanel.IsArcFolder()) + { + NDirectory::CreateComplexDirectory(destPath); + NName::NormalizeDirPathPrefix(destPath); + if (!CheckFolderPath(destPath)) + { + if (NumPanels < 2 || destPath != destPanel._currentFolderPrefix || !destPanel.DoesItSupportOperations()) + { + srcPanel.MessageBoxErrorLang(IDS_OPERATION_IS_NOT_SUPPORTED, 0x03020208); + return; + } + useDestPanel = true; + } + } + else + { + int pos = destPath.ReverseFind(WCHAR_PATH_SEPARATOR); + if (pos >= 0) + { + UString prefix = destPath.Left(pos + 1); + NDirectory::CreateComplexDirectory(prefix); + if (!CheckFolderPath(prefix)) + { + srcPanel.MessageBoxErrorLang(IDS_OPERATION_IS_NOT_SUPPORTED, 0x03020208); + return; + } + } + } + + AddUniqueStringToHeadOfList(copyFolders, destPath); + while (copyFolders.Size() > 20) + copyFolders.DeleteBack(); + SaveCopyHistory(copyFolders); + } + + /* + if (destPath == destPanel._currentFolderPrefix) + { + if (destPanel.GetFolderTypeID() == L"PhysDrive") + useDestPanel = true; + } + */ + + bool useSrcPanel = (!useDestPanel || !srcPanel.IsFsOrDrivesFolder() || destPanel.IsFSFolder()); + bool useTemp = useSrcPanel && useDestPanel; + NFile::NDirectory::CTempDirectoryW tempDirectory; + UString tempDirPrefix; + if (useTemp) + { + tempDirectory.Create(kTempDirPrefix); + tempDirPrefix = tempDirectory.GetPath(); + NFile::NName::NormalizeDirPathPrefix(tempDirPrefix); + } + + CSelectedState srcSelState; + CSelectedState destSelState; + srcPanel.SaveSelectedState(srcSelState); + destPanel.SaveSelectedState(destSelState); + + HRESULT result; + if (useSrcPanel) + { + UString folder = useTemp ? tempDirPrefix : destPath; + result = srcPanel.CopyTo(indices, folder, move, true, 0); + if (result != S_OK) + { + disableTimerProcessing1.Restore(); + disableTimerProcessing2.Restore(); + // For Password: + srcPanel.SetFocusToList(); + if (result != E_ABORT) + srcPanel.MessageBoxError(result, L"Error"); + return; + } + } + + if (useDestPanel) + { + UStringVector filePaths; + UString folderPrefix; + if (useTemp) + folderPrefix = tempDirPrefix; + else + folderPrefix = srcPanel._currentFolderPrefix; + filePaths.Reserve(indices.Size()); + for (int i = 0; i < indices.Size(); i++) + filePaths.Add(srcPanel.GetItemRelPath(indices[i])); + + result = destPanel.CopyFrom(folderPrefix, filePaths, true, 0); + + if (result != S_OK) + { + disableTimerProcessing1.Restore(); + disableTimerProcessing2.Restore(); + // For Password: + srcPanel.SetFocusToList(); + if (result != E_ABORT) + srcPanel.MessageBoxError(result, L"Error"); + return; + } + } + + RefreshTitleAlways(); + if (copyToSame || move) + { + srcPanel.RefreshListCtrl(srcSelState); + } + if (!copyToSame) + { + destPanel.RefreshListCtrl(destSelState); + srcPanel.KillSelection(); + } + disableTimerProcessing1.Restore(); + disableTimerProcessing2.Restore(); + srcPanel.SetFocusToList(); +} + +void CApp::OnSetSameFolder(int srcPanelIndex) +{ + if (NumPanels <= 1) + return; + const CPanel &srcPanel = Panels[srcPanelIndex]; + CPanel &destPanel = Panels[1 - srcPanelIndex]; + destPanel.BindToPathAndRefresh(srcPanel._currentFolderPrefix); +} + +void CApp::OnSetSubFolder(int srcPanelIndex) +{ + if (NumPanels <= 1) + return; + const CPanel &srcPanel = Panels[srcPanelIndex]; + CPanel &destPanel = Panels[1 - srcPanelIndex]; + + int focusedItem = srcPanel._listView.GetFocusedItem(); + if (focusedItem < 0) + return; + int realIndex = srcPanel.GetRealItemIndex(focusedItem); + if (!srcPanel.IsItemFolder(realIndex)) + return; + + // destPanel.BindToFolder(srcPanel._currentFolderPrefix + srcPanel.GetItemName(realIndex) + WCHAR_PATH_SEPARATOR); + + CMyComPtr newFolder; + if (realIndex == kParentIndex) + { + if (srcPanel._folder->BindToParentFolder(&newFolder) != S_OK) + return; + } + else + { + if (srcPanel._folder->BindToFolder(realIndex, &newFolder) != S_OK) + return; + } + destPanel.CloseOpenFolders(); + destPanel._folder = newFolder; + destPanel.RefreshListCtrl(); +} + +/* +int CApp::GetFocusedPanelIndex() const +{ + return LastFocusedPanel; + HWND hwnd = ::GetFocus(); + for (;;) + { + if (hwnd == 0) + return 0; + for (int i = 0; i < kNumPanelsMax; i++) + { + if (PanelsCreated[i] && + ((HWND)Panels[i] == hwnd || Panels[i]._listView == hwnd)) + return i; + } + hwnd = GetParent(hwnd); + } +} +*/ + +static UString g_ToolTipBuffer; +static CSysString g_ToolTipBufferSys; + +#ifdef _WIN32 +void CApp::OnNotify(int /* ctrlID */, LPNMHDR pnmh) +{ + { + if (pnmh->code == TTN_GETDISPINFO) + { + LPNMTTDISPINFO info = (LPNMTTDISPINFO)pnmh; + info->hinst = 0; + g_ToolTipBuffer.Empty(); + SetButtonText((int)info->hdr.idFrom, g_ToolTipBuffer); + g_ToolTipBufferSys = GetSystemString(g_ToolTipBuffer); + info->lpszText = (LPTSTR)(LPCTSTR)g_ToolTipBufferSys; + return; + } + #ifndef _UNICODE + if (pnmh->code == TTN_GETDISPINFOW) + { + LPNMTTDISPINFOW info = (LPNMTTDISPINFOW)pnmh; + info->hinst = 0; + g_ToolTipBuffer.Empty(); + SetButtonText((int)info->hdr.idFrom, g_ToolTipBuffer); + info->lpszText = (LPWSTR)(LPCWSTR)g_ToolTipBuffer; + return; + } + #endif + } +} +#endif + +void CApp::RefreshTitle(bool always) +{ + UString path = GetFocusedPanel()._currentFolderPrefix; +#ifndef _WIN32 + { + extern const TCHAR * nameWindowToUnix(const TCHAR * lpFileName); + UString tmp = nameWindowToUnix(path); + path = tmp; + } +#endif + if (path.IsEmpty()) + path += LangString(IDS_APP_TITLE, 0x03000000); + if (!always && path == PrevTitle) + return; + PrevTitle = path; + NWindows::MySetWindowText(_window, path); +} + +void CApp::RefreshTitle(int panelIndex, bool always) +{ + if (panelIndex != GetFocusedPanelIndex()) + return; + RefreshTitle(always); +} diff --git a/CPP/7zip/UI/FileManager/App.h b/CPP/7zip/UI/FileManager/App.h new file mode 100644 index 0000000..0709c54 --- /dev/null +++ b/CPP/7zip/UI/FileManager/App.h @@ -0,0 +1,327 @@ +// App.h + +#ifndef __APP_H +#define __APP_H + +// #include "Windows/Control/CommandBar.h" +// #include "Windows/Control/ImageList.h" + +#include "AppState.h" +#include "Panel.h" + +class CApp; + +extern CApp g_App; +extern HWND g_HWND; + +const int kNumPanelsMax = 2; + +extern bool g_IsSmallScreen; + +enum +{ + kAddCommand = kToolbarStartID, + kExtractCommand, + kTestCommand +}; + +class CPanelCallbackImp: public CPanelCallback +{ + CApp *_app; + int _index; +public: + void Init(CApp *app, int index) + { + _app = app; + _index = index; + } + virtual void OnTab(); + virtual void SetFocusToPath(int index); + virtual void OnCopy(bool move, bool copyToSame); + virtual void OnSetSameFolder(); + virtual void OnSetSubFolder(); + virtual void PanelWasFocused(); + virtual void DragBegin(); + virtual void DragEnd(); + virtual void RefreshTitle(bool always); +}; + +class CApp; + +#if _WIN32 +class CDropTarget: + public IDropTarget, + public CMyUnknownImp +{ + CMyComPtr m_DataObject; + UStringVector m_SourcePaths; + int m_SelectionIndex; + bool m_DropIsAllowed; // = true, if data contain fillist + bool m_PanelDropIsAllowed; // = false, if current target_panel is source_panel. + // check it only if m_DropIsAllowed == true + int m_SubFolderIndex; + UString m_SubFolderName; + + CPanel *m_Panel; + bool m_IsAppTarget; // true, if we want to drop to app window (not to panel). + + bool m_SetPathIsOK; + + bool IsItSameDrive() const; + + void QueryGetData(IDataObject *dataObject); + bool IsFsFolderPath() const; + DWORD GetEffect(DWORD keyState, POINTL pt, DWORD allowedEffect); + void RemoveSelection(); + void PositionCursor(POINTL ptl); + UString GetTargetPath() const; + bool SetPath(bool enablePath) const; + bool SetPath(); + +public: + MY_UNKNOWN_IMP1_MT(IDropTarget) + STDMETHOD(DragEnter)(IDataObject * dataObject, DWORD keyState, POINTL pt, DWORD *effect); + STDMETHOD(DragOver)(DWORD keyState, POINTL pt, DWORD * effect); + STDMETHOD(DragLeave)(); + STDMETHOD(Drop)(IDataObject * dataObject, DWORD keyState, POINTL pt, DWORD *effect); + + CDropTarget(): + TargetPanelIndex(-1), + SrcPanelIndex(-1), + m_IsAppTarget(false), + m_Panel(0), + App(0), + m_PanelDropIsAllowed(false), + m_DropIsAllowed(false), + m_SelectionIndex(-1), + m_SubFolderIndex(-1), + m_SetPathIsOK(false) {} + + CApp *App; + int SrcPanelIndex; // index of D&D source_panel + int TargetPanelIndex; // what panel to use as target_panel of Application +}; +#endif + +class CApp +{ +public: + NWindows::CWindow _window; + bool ShowSystemMenu; + int NumPanels; + int LastFocusedPanel; + + bool ShowStandardToolbar; + bool ShowArchiveToolbar; + bool ShowButtonsLables; + bool LargeButtons; + + CAppState AppState; + CPanelCallbackImp m_PanelCallbackImp[kNumPanelsMax]; + CPanel Panels[kNumPanelsMax]; + bool PanelsCreated[kNumPanelsMax]; + +#ifdef _WIN32 + NWindows::NControl::CImageList _buttonsImageList; + + #ifdef UNDER_CE + NWindows::NControl::CCommandBar _commandBar; + #endif + NWindows::NControl::CToolBar _toolBar; + + CDropTarget *_dropTargetSpec; + CMyComPtr _dropTarget; +#endif + + CApp(): _window(0), NumPanels(2), LastFocusedPanel(0) {} + +#ifdef _WIN32 + void CreateDragTarget() + { + _dropTargetSpec = new CDropTarget(); + _dropTarget = _dropTargetSpec; + _dropTargetSpec->App = (this); + } +#endif + + void SetFocusedPanel(int index) + { + LastFocusedPanel = index; + // FIXME _dropTargetSpec->TargetPanelIndex = LastFocusedPanel; + } + + void DragBegin(int panelIndex) + { +#ifdef _WIN32 + _dropTargetSpec->TargetPanelIndex = (NumPanels > 1) ? 1 - panelIndex : panelIndex; + _dropTargetSpec->SrcPanelIndex = panelIndex; +#endif + } + + void DragEnd() + { +#ifdef _WIN32 + _dropTargetSpec->TargetPanelIndex = LastFocusedPanel; + _dropTargetSpec->SrcPanelIndex = -1; +#endif + } + + + void OnCopy(bool move, bool copyToSame, int srcPanelIndex); + void OnSetSameFolder(int srcPanelIndex); + void OnSetSubFolder(int srcPanelIndex); + + HRESULT CreateOnePanel(int panelIndex, const UString &mainPath, const UString &arcFormat, bool &archiveIsOpened, bool &encrypted); + HRESULT Create(HWND hwnd, const UString &mainPath, const UString &arcFormat, int xSizes[2], bool &archiveIsOpened, bool &encrypted); + void Read(); + void Save(); + void Release(); + + // void SetFocus(int panelIndex) { Panels[panelIndex].SetFocusToList(); } + // void SetFocusToLastItem() { Panels[LastFocusedPanel].SetFocusToLastRememberedItem(); } + int GetFocusedPanelIndex() const { return LastFocusedPanel; } + bool IsPanelVisible(int index) const { return (NumPanels > 1 || index == LastFocusedPanel); } + CPanel &GetFocusedPanel() { return Panels[GetFocusedPanelIndex()]; } + + // File Menu + void OpenItem() { GetFocusedPanel().OpenSelectedItems(true); } + void OpenItemInside() { GetFocusedPanel().OpenFocusedItemAsInternal(); } + void OpenItemOutside() { GetFocusedPanel().OpenSelectedItems(false); } + void EditItem() { GetFocusedPanel().EditItem(); } + void Rename() { GetFocusedPanel().RenameFile(); } + void CopyTo() { OnCopy(false, false, GetFocusedPanelIndex()); } + void MoveTo() { OnCopy(true, false, GetFocusedPanelIndex()); } + void Delete(bool toRecycleBin) { GetFocusedPanel().DeleteItems(toRecycleBin); } + void CalculateCrc(); + void DiffFiles(); + void Split(); + void Combine(); + void Properties() { GetFocusedPanel().Properties(); } + void Comment() { GetFocusedPanel().ChangeComment(); } + + void CreateFolder() { GetFocusedPanel().CreateFolder(); } + void CreateFile() { GetFocusedPanel().CreateFile(); } + + // Edit + void EditCut() { GetFocusedPanel().EditCut(); } + void EditCopy() { GetFocusedPanel().EditCopy(); } + void EditPaste() { GetFocusedPanel().EditPaste(); } + + void SelectAll(bool selectMode) { GetFocusedPanel().SelectAll(selectMode); } + void InvertSelection() { GetFocusedPanel().InvertSelection(); } + void SelectSpec(bool selectMode) { GetFocusedPanel().SelectSpec(selectMode); } + void SelectByType(bool selectMode) { GetFocusedPanel().SelectByType(selectMode); } + + void RefreshStatusBar() { GetFocusedPanel().RefreshStatusBar(); } + + void SetListViewMode(UInt32 index) { GetFocusedPanel().SetListViewMode(index); } + UInt32 GetListViewMode() { return GetFocusedPanel().GetListViewMode(); } + PROPID GetSortID() { return GetFocusedPanel().GetSortID(); } + + void SortItemsWithPropID(PROPID propID) { GetFocusedPanel().SortItemsWithPropID(propID); } + + void OpenRootFolder() { GetFocusedPanel().OpenDrivesFolder(); } + void OpenParentFolder() { GetFocusedPanel().OpenParentFolder(); } + void FoldersHistory() { GetFocusedPanel().FoldersHistory(); } + void RefreshView() { GetFocusedPanel().OnReload(); } + void RefreshAllPanels() + { + for (int i = 0; i < NumPanels; i++) + { + int index = i; + if (NumPanels == 1) + index = LastFocusedPanel; + Panels[index].OnReload(); + } + } + + /* + void SysIconsWereChanged() + { + for (int i = 0; i < NumPanels; i++) + { + int index = i; + if (NumPanels == 1) + index = LastFocusedPanel; + Panels[index].SysIconsWereChanged(); + } + } + */ + + void SetListSettings(); + void SetShowSystemMenu(); + HRESULT SwitchOnOffOnePanel(); + bool GetFlatMode() { return Panels[LastFocusedPanel].GetFlatMode(); } + void ChangeFlatMode() { Panels[LastFocusedPanel].ChangeFlatMode(); } + + void OpenBookmark(int index) { GetFocusedPanel().OpenBookmark(index); } + void SetBookmark(int index) { GetFocusedPanel().SetBookmark(index); } + + void ReloadToolbars(); + void ReadToolbar() + { + UInt32 mask = ReadToolbarsMask(); + if (mask & ((UInt32)1 << 31)) + { + ShowButtonsLables = !g_IsSmallScreen; + LargeButtons = false; + ShowStandardToolbar = ShowArchiveToolbar = true; + } + else + { + ShowButtonsLables = ((mask & 1) != 0); + LargeButtons = ((mask & 2) != 0); + ShowStandardToolbar = ((mask & 4) != 0); + ShowArchiveToolbar = ((mask & 8) != 0); + } + } + void SaveToolbar() + { + UInt32 mask = 0; + if (ShowButtonsLables) mask |= 1; + if (LargeButtons) mask |= 2; + if (ShowStandardToolbar) mask |= 4; + if (ShowArchiveToolbar) mask |= 8; + SaveToolbarsMask(mask); + } + + void SaveToolbarChanges(); + + void SwitchStandardToolbar() + { + ShowStandardToolbar = !ShowStandardToolbar; + SaveToolbarChanges(); + } + void SwitchArchiveToolbar() + { + ShowArchiveToolbar = !ShowArchiveToolbar; + SaveToolbarChanges(); + } + void SwitchButtonsLables() + { + ShowButtonsLables = !ShowButtonsLables; + SaveToolbarChanges(); + } + void SwitchLargeButtons() + { + LargeButtons = !LargeButtons; + SaveToolbarChanges(); + } + + void AddToArchive() { GetFocusedPanel().AddToArchive(); } + void ExtractArchives() { GetFocusedPanel().ExtractArchives(); } + void TestArchives() { GetFocusedPanel().TestArchives(); } + +#ifdef _WIN32 + void OnNotify(int ctrlID, LPNMHDR pnmh); +#endif + + UString PrevTitle; + void RefreshTitle(bool always = false); + void RefreshTitleAlways() { RefreshTitle(true); } + void RefreshTitle(int panelIndex, bool always = false); + + void MoveSubWindows(); +}; + +#endif diff --git a/CPP/7zip/UI/FileManager/AppState.h b/CPP/7zip/UI/FileManager/AppState.h new file mode 100644 index 0000000..374cf04 --- /dev/null +++ b/CPP/7zip/UI/FileManager/AppState.h @@ -0,0 +1,114 @@ +// AppState.h + +#ifndef __APP_STATE_H +#define __APP_STATE_H + +#include "Windows/Synchronization.h" + +#include "ViewSettings.h" + +void inline AddUniqueStringToHead(UStringVector &list, + const UString &string) +{ + for(int i = 0; i < list.Size();) + if (string.CompareNoCase(list[i]) == 0) + list.Delete(i); + else + i++; + list.Insert(0, string); +} + +class CFastFolders +{ + NWindows::NSynchronization::CCriticalSection _criticalSection; +public: + UStringVector Strings; + void SetString(int index, const UString &string) + { + NWindows::NSynchronization::CCriticalSectionLock lock(_criticalSection); + while(Strings.Size() <= index) + Strings.Add(UString()); + Strings[index] = string; + } + UString GetString(int index) + { + NWindows::NSynchronization::CCriticalSectionLock lock(_criticalSection); + if (index >= Strings.Size()) + return UString(); + return Strings[index]; + } + void Save() + { + NWindows::NSynchronization::CCriticalSectionLock lock(_criticalSection); + SaveFastFolders(Strings); + } + void Read() + { + NWindows::NSynchronization::CCriticalSectionLock lock(_criticalSection); + ReadFastFolders(Strings); + } +}; + +class CFolderHistory +{ + NWindows::NSynchronization::CCriticalSection _criticalSection; + UStringVector Strings; + void Normalize() + { + const int kMaxSize = 100; + if (Strings.Size() > kMaxSize) + Strings.Delete(kMaxSize, Strings.Size() - kMaxSize); + } + +public: + + void GetList(UStringVector &foldersHistory) + { + NWindows::NSynchronization::CCriticalSectionLock lock(_criticalSection); + foldersHistory = Strings; + } + + void AddString(const UString &string) + { + NWindows::NSynchronization::CCriticalSectionLock lock(_criticalSection); + AddUniqueStringToHead(Strings, string); + Normalize(); + } + + void RemoveAll() + { + NWindows::NSynchronization::CCriticalSectionLock lock(_criticalSection); + Strings.Clear(); + } + + void Save() + { + NWindows::NSynchronization::CCriticalSectionLock lock(_criticalSection); + SaveFolderHistory(Strings); + } + + void Read() + { + NWindows::NSynchronization::CCriticalSectionLock lock(_criticalSection); + ReadFolderHistory(Strings); + Normalize(); + } +}; + +struct CAppState +{ + CFastFolders FastFolders; + CFolderHistory FolderHistory; + void Save() + { + FastFolders.Save(); + FolderHistory.Save(); + } + void Read() + { + FastFolders.Read(); + FolderHistory.Read(); + } +}; + +#endif diff --git a/CPP/7zip/UI/FileManager/BrowseDialog.h b/CPP/7zip/UI/FileManager/BrowseDialog.h new file mode 100644 index 0000000..41eb6b5 --- /dev/null +++ b/CPP/7zip/UI/FileManager/BrowseDialog.h @@ -0,0 +1,77 @@ +// BrowseDialog.h + +#ifndef __BROWSE_DIALOG_H +#define __BROWSE_DIALOG_H + +#ifdef UNDER_CE + +#include "Windows/FileFind.h" + +#include "Windows/Control/Dialog.h" +#include "Windows/Control/ListView.h" + +#include "BrowseDialogRes.h" +#include "SysIconUtils.h" + +class CBrowseDialog: public NWindows::NControl::CModalDialog +{ + NWindows::NControl::CListView _list; + CObjectVector _files; + CExtToIconMap _extToIconMap; + int _sortIndex; + bool _ascending; + bool _showDots; + + virtual bool OnInit(); + virtual bool OnSize(WPARAM wParam, int xSize, int ySize); + virtual bool OnNotify(UINT controlID, LPNMHDR header); + virtual void OnOK(); + + virtual bool OnButtonClicked(int buttonID, HWND buttonHWND); + virtual bool OnKeyDown(LPNMLVKEYDOWN keyDownInfo, LRESULT &result); + + void FinishOnOK(); + HRESULT Reload(const UString &pathPrefix, const UString &selectedName); + HRESULT Reload(); + void OpenParentFolder(); + + void OnItemEnter(); + + int GetRealItemIndex(int indexInListView) const + { + LPARAM param; + if (!_list.GetItemParam(indexInListView, param)) + return (int)-1; + return (int)param; + } + + void ShowError(LPCWSTR s); + void ShowSelectError(); +public: + UString Title; + UString Path; + bool FolderMode; + + CBrowseDialog(): FolderMode(true), _showDots(false) {} + + INT_PTR Create(HWND parent = 0) { return CModalDialog::Create(IDD_DIALOG_BROWSE, parent); } + int CompareItems(LPARAM lParam1, LPARAM lParam2); +}; + +bool MyBrowseForFolder(HWND owner, LPCWSTR title, LPCWSTR initialFolder, UString &resultPath); +bool MyBrowseForFile(HWND owner, LPCWSTR title, LPCWSTR initialFolder, LPCWSTR s, UString &resultPath); + +#else + +#include "Windows/CommonDialog.h" +#include "Windows/Shell.h" + +#define MyBrowseForFolder(h, title, initialFolder, resultPath) \ + NShell::BrowseForFolder(h, title, initialFolder, resultPath) + +#define MyBrowseForFile(h, title, initialFolder, s, resultPath) \ + MyGetOpenFileName(h, title, initialFolder, s, resultPath) + +#endif + +#endif diff --git a/CPP/7zip/UI/FileManager/ClassDefs.cpp b/CPP/7zip/UI/FileManager/ClassDefs.cpp new file mode 100644 index 0000000..ca05cc6 --- /dev/null +++ b/CPP/7zip/UI/FileManager/ClassDefs.cpp @@ -0,0 +1,7 @@ +// ClassDefs.cpp + +#include "StdAfx.h" + +#include "Common/MyInitGuid.h" + +#include "../Agent/Agent.h" diff --git a/CPP/7zip/UI/FileManager/ComboDialog.cpp b/CPP/7zip/UI/FileManager/ComboDialog.cpp new file mode 100644 index 0000000..566430d --- /dev/null +++ b/CPP/7zip/UI/FileManager/ComboDialog.cpp @@ -0,0 +1,54 @@ +// ComboDialog.cpp + +#include "StdAfx.h" +#include "ComboDialog.h" + +#include "Windows/Control/Static.h" + +#ifdef LANG +#include "LangUtils.h" +#endif + +using namespace NWindows; + +#ifdef LANG +static CIDLangPair kIDLangPairs[] = +{ + { IDOK, 0x02000702 }, + { IDCANCEL, 0x02000710 } +}; +#endif + +bool CComboDialog::OnInit() +{ + #ifdef LANG + LangSetDlgItemsText(HWND(*this), kIDLangPairs, sizeof(kIDLangPairs) / sizeof(kIDLangPairs[0])); + #endif + _comboBox.Attach(GetItem(IDC_COMBO_COMBO)); + + /* + // why it doesn't work ? + DWORD style = _comboBox.GetStyle(); + if (Sorted) + style |= CBS_SORT; + else + style &= ~CBS_SORT; + _comboBox.SetStyle(style); + */ + SetText(Title); + + NControl::CStatic staticContol; + staticContol.Attach(GetItem(IDC_COMBO_STATIC)); + staticContol.SetText(Static); + _comboBox.SetText(Value); + for(int i = 0; i < Strings.Size(); i++) + _comboBox.AddString(Strings[i]); + NormalizeSize(); + return CModalDialog::OnInit(); +} + +void CComboDialog::OnOK() +{ + _comboBox.GetText(Value); + CModalDialog::OnOK(); +} diff --git a/CPP/7zip/UI/FileManager/ComboDialog.h b/CPP/7zip/UI/FileManager/ComboDialog.h new file mode 100644 index 0000000..1f8259d --- /dev/null +++ b/CPP/7zip/UI/FileManager/ComboDialog.h @@ -0,0 +1,26 @@ +// ComboDialog.h + +#ifndef __COMBO_DIALOG_H +#define __COMBO_DIALOG_H + +#include "Windows/Control/ComboBox.h" +#include "Windows/Control/Dialog.h" + +#include "ComboDialogRes.h" + +class CComboDialog: public NWindows::NControl::CModalDialog +{ + NWindows::NControl::CComboBox _comboBox; + virtual void OnOK(); + virtual bool OnInit(); +public: + // bool Sorted; + UString Title; + UString Static; + UString Value; + UStringVector Strings; + // CComboDialog(): Sorted(false) {}; + INT_PTR Create(HWND parentWindow = 0) { return CModalDialog::Create(IDD_DIALOG_COMBO, parentWindow); } +}; + +#endif diff --git a/CPP/7zip/UI/FileManager/ComboDialogRes.h b/CPP/7zip/UI/FileManager/ComboDialogRes.h new file mode 100644 index 0000000..7f37cb9 --- /dev/null +++ b/CPP/7zip/UI/FileManager/ComboDialogRes.h @@ -0,0 +1,4 @@ +#define IDD_DIALOG_COMBO 505 + +#define IDC_COMBO_STATIC 1000 +#define IDC_COMBO_COMBO 1001 diff --git a/CPP/7zip/UI/FileManager/ComboDialog_rc.cpp b/CPP/7zip/UI/FileManager/ComboDialog_rc.cpp new file mode 100644 index 0000000..056af6f --- /dev/null +++ b/CPP/7zip/UI/FileManager/ComboDialog_rc.cpp @@ -0,0 +1,60 @@ +// PasswordDialog.cpp + +#include "StdAfx.h" + +// For compilers that support precompilation, includes "wx/wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +// for all others, include the necessary headers (this file is usually all you +// need because it includes almost all "standard" wxWidgets headers) +#ifndef WX_PRECOMP + #include "wx/wx.h" +#endif + +#undef _WIN32 + +#include "Windows/Control/DialogImpl.h" + +#include "ComboDialogRes.h" + +class ComboDialogImpl : public NWindows::NControl::CModalDialogImpl +{ + public: + ComboDialogImpl(NWindows::NControl::CModalDialog *dialog,wxWindow * parent,int id) : CModalDialogImpl(dialog, parent, id, wxT("Combo")) + { + + wxBoxSizer* topsizer = new wxBoxSizer(wxVERTICAL); + + + topsizer->Add(new wxStaticText(this, IDC_COMBO_STATIC, _T("")) , 0 ,wxALL | wxALIGN_LEFT, 5 ); + + + wxArrayString pathArray; + wxComboBox *combo = new wxComboBox(this, IDC_COMBO_COMBO, wxEmptyString, wxDefaultPosition, wxSize(200,-1), pathArray, wxCB_DROPDOWN|wxCB_SORT); + + topsizer->Add(combo, 0 ,wxALL | wxALIGN_LEFT, 5 ); + + topsizer->Add(CreateButtonSizer(wxOK|wxCANCEL), 0, wxALL|wxEXPAND, 5); + + this->OnInit(); + + SetSizer(topsizer); // use the sizer for layout + topsizer->SetSizeHints(this); // set size hints to honour minimum size + } +private: + // Any class wishing to process wxWindows events must use this macro + DECLARE_EVENT_TABLE() +}; + +REGISTER_DIALOG(IDD_DIALOG_COMBO,ComboDialog,0) + +BEGIN_EVENT_TABLE(ComboDialogImpl, wxDialog) + EVT_BUTTON(wxID_ANY, CModalDialogImpl::OnAnyButton) + EVT_CHECKBOX(wxID_ANY, CModalDialogImpl::OnAnyButton) + EVT_MENU(WORKER_EVENT, CModalDialogImpl::OnWorkerEvent) +END_EVENT_TABLE() + diff --git a/CPP/7zip/UI/FileManager/CopyDialog.cpp b/CPP/7zip/UI/FileManager/CopyDialog.cpp new file mode 100644 index 0000000..5d8c7f1 --- /dev/null +++ b/CPP/7zip/UI/FileManager/CopyDialog.cpp @@ -0,0 +1,87 @@ +// CopyDialog.cpp + +#include "StdAfx.h" + +#include "Windows/FileName.h" + +#include "Windows/Control/Static.h" + +#include "BrowseDialog.h" +#include "CopyDialog.h" + +#ifdef LANG +#include "LangUtils.h" +#endif + +using namespace NWindows; + +#ifdef LANG +static CIDLangPair kIDLangPairs[] = +{ + { IDOK, 0x02000702 }, + { IDCANCEL, 0x02000710 } +}; +#endif + +#ifndef _WIN32 +extern const TCHAR * nameWindowToUnix(const TCHAR * lpFileName); +#endif + +bool CCopyDialog::OnInit() +{ + #ifdef LANG + LangSetDlgItemsText(HWND(*this), kIDLangPairs, sizeof(kIDLangPairs) / sizeof(kIDLangPairs[0])); + #endif + _path.Attach(GetItem(IDC_COPY_COMBO)); + SetText(Title); + + NControl::CStatic staticContol; + staticContol.Attach(GetItem(IDC_COPY_STATIC)); + staticContol.SetText(Static); + #ifdef UNDER_CE + // we do it, since WinCE selects Value\something instead of Value !!!! + _path.AddString(Value); + #endif + for (int i = 0; i < Strings.Size(); i++) + _path.AddString(Strings[i]); +#ifndef _WIN32 + UString tmp = nameWindowToUnix(Value); + Value = tmp; +#endif + _path.SetText(Value); + SetItemText(IDC_COPY_INFO, Info); + NormalizeSize(true); + return CModalDialog::OnInit(); +} + +bool CCopyDialog::OnButtonClicked(int buttonID, HWND buttonHWND) +{ + switch(buttonID) + { + case IDC_COPY_SET_PATH: + OnButtonSetPath(); + return true; + } + return CModalDialog::OnButtonClicked(buttonID, buttonHWND); +} + +void CCopyDialog::OnButtonSetPath() +{ + UString currentPath; + _path.GetText(currentPath); + + UString title = LangStringSpec(IDS_SET_FOLDER, 0x03020209); + + UString resultPath; + if (!MyBrowseForFolder(HWND(*this), title, currentPath, resultPath)) + return; + NFile::NName::NormalizeDirPathPrefix(resultPath); + _path.SetCurSel(-1); + _path.SetText(resultPath); +} + +void CCopyDialog::OnOK() +{ + _path.GetText(Value); + CModalDialog::OnOK(); +} diff --git a/CPP/7zip/UI/FileManager/CopyDialog.h b/CPP/7zip/UI/FileManager/CopyDialog.h new file mode 100644 index 0000000..5eff789 --- /dev/null +++ b/CPP/7zip/UI/FileManager/CopyDialog.h @@ -0,0 +1,30 @@ +// CopyDialog.h + +#ifndef __COPY_DIALOG_H +#define __COPY_DIALOG_H + +#include "Windows/Control/ComboBox.h" +#include "Windows/Control/Dialog.h" + +#include "CopyDialogRes.h" + +const int kCopyDialog_NumInfoLines = 11; + +class CCopyDialog: public NWindows::NControl::CModalDialog +{ + NWindows::NControl::CComboBox _path; + virtual void OnOK(); + virtual bool OnInit(); + void OnButtonSetPath(); + bool OnButtonClicked(int buttonID, HWND buttonHWND); +public: + UString Title; + UString Static; + UString Value; + UString Info; + UStringVector Strings; + + INT_PTR Create(HWND parentWindow = 0) { return CModalDialog::Create(IDD_DIALOG_COPY, parentWindow); } +}; + +#endif diff --git a/CPP/7zip/UI/FileManager/CopyDialogRes.h b/CPP/7zip/UI/FileManager/CopyDialogRes.h new file mode 100644 index 0000000..4944de8 --- /dev/null +++ b/CPP/7zip/UI/FileManager/CopyDialogRes.h @@ -0,0 +1,8 @@ +#define IDD_DIALOG_COPY 506 + +#define IDC_COPY_STATIC 1000 +#define IDC_COPY_COMBO 1001 +#define IDC_COPY_SET_PATH 1002 +#define IDC_COPY_INFO 1003 + +#define IDS_SET_FOLDER 210 diff --git a/CPP/7zip/UI/FileManager/CopyDialog_rc.cpp b/CPP/7zip/UI/FileManager/CopyDialog_rc.cpp new file mode 100644 index 0000000..104d2a2 --- /dev/null +++ b/CPP/7zip/UI/FileManager/CopyDialog_rc.cpp @@ -0,0 +1,77 @@ +// PasswordDialog.cpp + +#include "StdAfx.h" + +// For compilers that support precompilation, includes "wx/wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +// for all others, include the necessary headers (this file is usually all you +// need because it includes almost all "standard" wxWidgets headers) +#ifndef WX_PRECOMP + #include "wx/wx.h" +#endif + +#undef _WIN32 + +#include "Windows/Control/DialogImpl.h" + +#include "CopyDialogRes.h" + +class CopyDialogImpl : public NWindows::NControl::CModalDialogImpl +{ + public: + CopyDialogImpl(NWindows::NControl::CModalDialog *dialog,wxWindow * parent,int id) : CModalDialogImpl(dialog, parent, id, wxT("Copy")) + { + + wxBoxSizer* topsizer = new wxBoxSizer(wxVERTICAL); + + + topsizer->Add(new wxStaticText(this, IDC_COPY_STATIC, _T("")) , 0 ,wxEXPAND | wxALL | wxALIGN_LEFT, 5 ); + + + { + wxBoxSizer *pathSizer = new wxBoxSizer(wxHORIZONTAL); + + wxArrayString pathArray; + wxComboBox *combo = new wxComboBox(this, IDC_COPY_COMBO, wxEmptyString, wxDefaultPosition, wxSize(600,-1), pathArray, wxCB_DROPDOWN|wxCB_SORT); + wxButton *button = new wxButton(this, IDC_COPY_SET_PATH, wxT("..."), wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT); + pathSizer->Add(combo, 1, wxLEFT|wxRIGHT|wxEXPAND, 5); + pathSizer->Add(button, 0, wxLEFT|wxRIGHT|wxEXPAND, 5); + + topsizer->Add(pathSizer, 0 ,wxALL | wxALIGN_LEFT, 5 ); + } + +// topsizer->Add(new wxStaticText(this, IDC_COPY_INFO, _T("line1\nline2\nline3\nline4\n")) , 0 ,wxEXPAND | wxALL | wxALIGN_LEFT, 5 ); + topsizer->Add(new wxStaticText(this, IDC_COPY_INFO, _T("")) , 0 ,wxEXPAND | wxALL | wxALIGN_LEFT, 5 ); + + topsizer->Add(CreateButtonSizer(wxOK|wxCANCEL), 0, wxALL|wxEXPAND, 5); + + this->OnInit(); + + SetSizer(topsizer); // use the sizer for layout + topsizer->SetSizeHints(this); // set size hints to honour minimum size + } +private: + // Any class wishing to process wxWindows events must use this macro + DECLARE_EVENT_TABLE() +}; + +static CStringTable g_stringTable[] = +{ + { IDS_SET_FOLDER, L"Specify a location for output folder." }, + { 0 , 0 } +}; + + +REGISTER_DIALOG(IDD_DIALOG_COPY,CopyDialog,g_stringTable) + +BEGIN_EVENT_TABLE(CopyDialogImpl, wxDialog) + EVT_BUTTON(wxID_ANY, CModalDialogImpl::OnAnyButton) + EVT_CHECKBOX(wxID_ANY, CModalDialogImpl::OnAnyButton) + EVT_MENU(WORKER_EVENT, CModalDialogImpl::OnWorkerEvent) +END_EVENT_TABLE() + diff --git a/CPP/7zip/UI/FileManager/DialogSize.h b/CPP/7zip/UI/FileManager/DialogSize.h new file mode 100644 index 0000000..f4dd1c3 --- /dev/null +++ b/CPP/7zip/UI/FileManager/DialogSize.h @@ -0,0 +1,16 @@ +// DialogSize.h + +#ifndef __DIALOG_SIZE_H +#define __DIALOG_SIZE_H + +#include "Windows/Control/Dialog.h" + +#ifdef UNDER_CE +#define BIG_DIALOG_SIZE(x, y) bool isBig = NWindows::NControl::IsDialogSizeOK(x, y); +#define SIZED_DIALOG(big) (isBig ? big : big ## _2) +#else +#define BIG_DIALOG_SIZE(x, y) +#define SIZED_DIALOG(big) big +#endif + +#endif diff --git a/CPP/7zip/UI/FileManager/ExtractCallback.cpp b/CPP/7zip/UI/FileManager/ExtractCallback.cpp new file mode 100644 index 0000000..d27db23 --- /dev/null +++ b/CPP/7zip/UI/FileManager/ExtractCallback.cpp @@ -0,0 +1,453 @@ +// ExtractCallback.cpp + +#include "StdAfx.h" + +#include "Windows/Error.h" +#include "Windows/FileDir.h" +#include "Windows/FileFind.h" + +#include "../../Common/FilePathAutoRename.h" + +#include "../GUI/ExtractRes.h" + +#include "ExtractCallback.h" +#include "FormatUtils.h" +#include "OverwriteDialog.h" +#ifndef _NO_CRYPTO +#include "PasswordDialog.h" +#endif + +using namespace NWindows; +using namespace NFile; +using namespace NFind; + +CExtractCallbackImp::~CExtractCallbackImp() {} + +void CExtractCallbackImp::Init() +{ + NumArchiveErrors = 0; + ThereAreMessageErrors = false; + #ifndef _SFX + NumFolders = NumFiles = 0; + NeedAddFile = false; + #endif +} + +void CExtractCallbackImp::AddErrorMessage(LPCWSTR message) +{ + ThereAreMessageErrors = true; + ProgressDialog->Sync.AddErrorMessage(message); +} + +STDMETHODIMP CExtractCallbackImp::SetNumFiles(UInt64 + #ifndef _SFX + numFiles + #endif + ) +{ + #ifndef _SFX + ProgressDialog->Sync.SetNumFilesTotal(numFiles); + #endif + return S_OK; +} + +STDMETHODIMP CExtractCallbackImp::SetTotal(UInt64 total) +{ + ProgressDialog->Sync.SetProgress(total, 0); + return S_OK; +} + +STDMETHODIMP CExtractCallbackImp::SetCompleted(const UInt64 *value) +{ + RINOK(ProgressDialog->Sync.ProcessStopAndPause()); + if (value != NULL) + ProgressDialog->Sync.SetPos(*value); + return S_OK; +} + +HRESULT CExtractCallbackImp::Open_CheckBreak() +{ + return ProgressDialog->Sync.ProcessStopAndPause(); +} + +HRESULT CExtractCallbackImp::Open_SetTotal(const UInt64 * /* numFiles */, const UInt64 * /* numBytes */) +{ + // if (numFiles != NULL) ProgressDialog->Sync.SetNumFilesTotal(*numFiles); + return S_OK; +} + +HRESULT CExtractCallbackImp::Open_SetCompleted(const UInt64 * /* numFiles */, const UInt64 * /* numBytes */) +{ + RINOK(ProgressDialog->Sync.ProcessStopAndPause()); + // if (numFiles != NULL) ProgressDialog->Sync.SetNumFilesCur(*numFiles); + return S_OK; +} + +#ifndef _NO_CRYPTO + +HRESULT CExtractCallbackImp::Open_CryptoGetTextPassword(BSTR *password) +{ + return CryptoGetTextPassword(password); +} + +HRESULT CExtractCallbackImp::Open_GetPasswordIfAny(UString &password) +{ + if (PasswordIsDefined) + password = Password; + return S_OK; +} + +bool CExtractCallbackImp::Open_WasPasswordAsked() +{ + return PasswordWasAsked; +} + +void CExtractCallbackImp::Open_ClearPasswordWasAskedFlag() +{ + PasswordWasAsked = false; +} + +#endif + + +#ifndef _SFX +STDMETHODIMP CExtractCallbackImp::SetRatioInfo(const UInt64 *inSize, const UInt64 *outSize) +{ + ProgressDialog->Sync.SetRatioInfo(inSize, outSize); + return S_OK; +} +#endif + +/* +STDMETHODIMP CExtractCallbackImp::SetTotalFiles(UInt64 total) +{ + ProgressDialog->Sync.SetNumFilesTotal(total); + return S_OK; +} + +STDMETHODIMP CExtractCallbackImp::SetCompletedFiles(const UInt64 *value) +{ + if (value != NULL) + ProgressDialog->Sync.SetNumFilesCur(*value); + return S_OK; +} +*/ + +STDMETHODIMP CExtractCallbackImp::AskOverwrite( + const wchar_t *existName, const FILETIME *existTime, const UInt64 *existSize, + const wchar_t *newName, const FILETIME *newTime, const UInt64 *newSize, + Int32 *answer) +{ + COverwriteDialog dialog; + + dialog.OldFileInfo.SetTime(existTime); + dialog.OldFileInfo.SetSize(existSize); + dialog.OldFileInfo.Name = existName; + + dialog.NewFileInfo.SetTime(newTime); + dialog.NewFileInfo.SetSize(newSize); + dialog.NewFileInfo.Name = newName; + + ProgressDialog->WaitCreating(); + INT_PTR writeAnswer = dialog.Create(*ProgressDialog); + + switch(writeAnswer) + { + case IDCANCEL: *answer = NOverwriteAnswer::kCancel; return E_ABORT; + case IDYES: *answer = NOverwriteAnswer::kYes; break; + case IDNO: *answer = NOverwriteAnswer::kNo; break; + case IDC_BUTTON_OVERWRITE_YES_TO_ALL: *answer = NOverwriteAnswer::kYesToAll; break; + case IDC_BUTTON_OVERWRITE_NO_TO_ALL: *answer = NOverwriteAnswer::kNoToAll; break; + case IDC_BUTTON_OVERWRITE_AUTO_RENAME: *answer = NOverwriteAnswer::kAutoRename; break; + default: return E_FAIL; + } + return S_OK; +} + + +STDMETHODIMP CExtractCallbackImp::PrepareOperation(const wchar_t *name, bool isFolder, Int32 /* askExtractMode */, const UInt64 * /* position */) +{ + _isFolder = isFolder; + return SetCurrentFilePath2(name); +} + +STDMETHODIMP CExtractCallbackImp::MessageError(const wchar_t *message) +{ + AddErrorMessage(message); + return S_OK; +} + +STDMETHODIMP CExtractCallbackImp::ShowMessage(const wchar_t *message) +{ + AddErrorMessage(message); + return S_OK; +} + +STDMETHODIMP CExtractCallbackImp::SetOperationResult(Int32 operationResult, bool encrypted) +{ + switch(operationResult) + { + case NArchive::NExtract::NOperationResult::kOK: + break; + default: + { + UINT messageID; + UInt32 langID; + switch(operationResult) + { + case NArchive::NExtract::NOperationResult::kUnSupportedMethod: + messageID = IDS_MESSAGES_DIALOG_EXTRACT_MESSAGE_UNSUPPORTED_METHOD; + langID = 0x02000A91; + break; + case NArchive::NExtract::NOperationResult::kDataError: + messageID = encrypted ? + IDS_MESSAGES_DIALOG_EXTRACT_MESSAGE_DATA_ERROR_ENCRYPTED: + IDS_MESSAGES_DIALOG_EXTRACT_MESSAGE_DATA_ERROR; + langID = encrypted ? 0x02000A94 : 0x02000A92; + break; + case NArchive::NExtract::NOperationResult::kCRCError: + messageID = encrypted ? + IDS_MESSAGES_DIALOG_EXTRACT_MESSAGE_CRC_ENCRYPTED: + IDS_MESSAGES_DIALOG_EXTRACT_MESSAGE_CRC; + langID = encrypted ? 0x02000A95 : 0x02000A93; + break; + default: + return E_FAIL; + } + if (_needWriteArchivePath) + { + if (!_currentArchivePath.IsEmpty()) + AddErrorMessage(_currentArchivePath); + _needWriteArchivePath = false; + } + AddErrorMessage( + MyFormatNew(messageID, + #ifdef LANG + langID, + #endif + _currentFilePath)); + } + } + #ifndef _SFX + if (_isFolder) + NumFolders++; + else + NumFiles++; + ProgressDialog->Sync.SetNumFilesCur(NumFiles); + #endif + return S_OK; +} + +//////////////////////////////////////// +// IExtractCallbackUI + +HRESULT CExtractCallbackImp::BeforeOpen(const wchar_t *name) +{ + #ifndef _SFX + ProgressDialog->Sync.SetTitleFileName(name); + #endif + _currentArchivePath = name; + return S_OK; +} + +HRESULT CExtractCallbackImp::SetCurrentFilePath2(const wchar_t *path) +{ + _currentFilePath = path; + #ifndef _SFX + ProgressDialog->Sync.SetCurrentFileName(path); + #endif + return S_OK; +} + +HRESULT CExtractCallbackImp::SetCurrentFilePath(const wchar_t *path) +{ + #ifndef _SFX + if (NeedAddFile) + NumFiles++; + NeedAddFile = true; + ProgressDialog->Sync.SetNumFilesCur(NumFiles); + #endif + return SetCurrentFilePath2(path); +} + +HRESULT CExtractCallbackImp::OpenResult(const wchar_t *name, HRESULT result, bool encrypted) +{ + if (result != S_OK) + { + UString message; + if (result == S_FALSE) + { + message = MyFormatNew(encrypted ? IDS_CANT_OPEN_ENCRYPTED_ARCHIVE : IDS_CANT_OPEN_ARCHIVE, + #ifdef LANG + (encrypted ? 0x0200060A : 0x02000609), + #endif + name); + } + else + { + message = name; + message += L": "; + UString message2; + if (result == E_OUTOFMEMORY) + message2 = + #ifdef LANG + LangString(IDS_MEM_ERROR, 0x0200060B); + #else + MyLoadStringW(IDS_MEM_ERROR); + #endif + else + NError::MyFormatMessage(result, message2); + message += message2; + } + MessageError(message); + NumArchiveErrors++; + } + _currentArchivePath = name; + _needWriteArchivePath = true; + return S_OK; +} + +HRESULT CExtractCallbackImp::ThereAreNoFiles() +{ + return S_OK; +} + +HRESULT CExtractCallbackImp::ExtractResult(HRESULT result) +{ + if (result == S_OK) + return result; + NumArchiveErrors++; + if (result == E_ABORT || result == ERROR_DISK_FULL) + return result; + MessageError(_currentFilePath); + MessageError(NError::MyFormatMessageW(result)); + return S_OK; +} + +#ifndef _NO_CRYPTO + +HRESULT CExtractCallbackImp::SetPassword(const UString &password) +{ + PasswordIsDefined = true; + Password = password; + return S_OK; +} + +STDMETHODIMP CExtractCallbackImp::CryptoGetTextPassword(BSTR *password) +{ + PasswordWasAsked = true; + if (!PasswordIsDefined) + { + CPasswordDialog dialog; + ProgressDialog->WaitCreating(); + if (dialog.Create(*ProgressDialog) == IDCANCEL) + return E_ABORT; + Password = dialog.Password; + PasswordIsDefined = true; + } + return StringToBstr(Password, password); +} + +#endif + +// IExtractCallBack3 +STDMETHODIMP CExtractCallbackImp::AskWrite( + const wchar_t *srcPath, Int32 srcIsFolder, + const FILETIME *srcTime, const UInt64 *srcSize, + const wchar_t *destPath, + BSTR *destPathResult, + Int32 *writeAnswer) +{ + UString destPathResultTemp = destPath; + + // RINOK(StringToBstr(destPath, destPathResult)); + + *destPathResult = 0; + *writeAnswer = BoolToInt(false); + + UString destPathSpec = destPath; + UString destPathSys = destPathSpec; + bool srcIsFolderSpec = IntToBool(srcIsFolder); + CFileInfoW destFileInfo; + if (destFileInfo.Find(destPathSys)) + { + if (srcIsFolderSpec) + { + if (!destFileInfo.IsDir()) + { + UString message = UString(L"can not replace file \'") + + destPathSpec + + UString(L"\' with folder with same name"); + RINOK(MessageError(message)); + return E_ABORT; + } + *writeAnswer = BoolToInt(false); + return S_OK; + } + if (destFileInfo.IsDir()) + { + UString message = UString(L"can not replace folder \'") + + destPathSpec + + UString(L"\' with file with same name"); + RINOK(MessageError(message)); + return E_FAIL; + } + + switch(OverwriteMode) + { + case NExtract::NOverwriteMode::kSkipExisting: + return S_OK; + case NExtract::NOverwriteMode::kAskBefore: + { + Int32 overwiteResult; + RINOK(AskOverwrite( + destPathSpec, + &destFileInfo.MTime, &destFileInfo.Size, + srcPath, + srcTime, srcSize, + &overwiteResult)); + switch(overwiteResult) + { + case NOverwriteAnswer::kCancel: + return E_ABORT; + case NOverwriteAnswer::kNo: + return S_OK; + case NOverwriteAnswer::kNoToAll: + OverwriteMode = NExtract::NOverwriteMode::kSkipExisting; + return S_OK; + case NOverwriteAnswer::kYesToAll: + OverwriteMode = NExtract::NOverwriteMode::kWithoutPrompt; + break; + case NOverwriteAnswer::kYes: + break; + case NOverwriteAnswer::kAutoRename: + OverwriteMode = NExtract::NOverwriteMode::kAutoRename; + break; + default: + return E_FAIL; + } + } + } + if (OverwriteMode == NExtract::NOverwriteMode::kAutoRename) + { + if (!AutoRenamePath(destPathSys)) + { + UString message = UString(L"can not create name of file ") + + destPathSys; + RINOK(MessageError(message)); + return E_ABORT; + } + destPathResultTemp = destPathSys; + } + else + if (!NFile::NDirectory::DeleteFileAlways(destPathSys)) + { + UString message = UString(L"can not delete output file ") + + destPathSys; + RINOK(MessageError(message)); + return E_ABORT; + } + } + *writeAnswer = BoolToInt(true); + return StringToBstr(destPathResultTemp, destPathResult); +} diff --git a/CPP/7zip/UI/FileManager/ExtractCallback.h b/CPP/7zip/UI/FileManager/ExtractCallback.h new file mode 100644 index 0000000..b4e88fd --- /dev/null +++ b/CPP/7zip/UI/FileManager/ExtractCallback.h @@ -0,0 +1,138 @@ +// ExtractCallback.h + +#ifndef __EXTRACT_CALLBACK_H +#define __EXTRACT_CALLBACK_H + +#include "Common/MyCom.h" + +#include "Windows/ResourceString.h" + +#include "../Agent/IFolderArchive.h" +#include "../Common/ArchiveOpenCallback.h" + +#ifndef _NO_CRYPTO +#include "../../IPassword.h" +#endif + +#include "IFolder.h" + +#include "ProgressDialog2.h" + +#ifdef LANG +#include "LangUtils.h" +#endif + +class CExtractCallbackImp: + public IExtractCallbackUI, + public IOpenCallbackUI, + public IFolderOperationsExtractCallback, + // public IFolderArchiveExtractCallback, // mkultiple from IProgress + #ifndef _SFX + public ICompressProgressInfo, + #endif + #ifndef _NO_CRYPTO + public ICryptoGetTextPassword, + #endif + public CMyUnknownImp +{ +public: + MY_QUERYINTERFACE_BEGIN2(IFolderOperationsExtractCallback) + MY_QUERYINTERFACE_ENTRY(IFolderArchiveExtractCallback) + #ifndef _SFX + MY_QUERYINTERFACE_ENTRY(ICompressProgressInfo) + #endif + #ifndef _NO_CRYPTO + MY_QUERYINTERFACE_ENTRY(ICryptoGetTextPassword) + #endif + MY_QUERYINTERFACE_END + MY_ADDREF_RELEASE + + #ifndef _SFX + STDMETHOD(SetRatioInfo)(const UInt64 *inSize, const UInt64 *outSize); + #endif + + INTERFACE_IProgress(;) + INTERFACE_IOpenCallbackUI(;) + + // IFolderArchiveExtractCallback + // STDMETHOD(SetTotalFiles)(UInt64 total); + // STDMETHOD(SetCompletedFiles)(const UInt64 *value); + STDMETHOD(AskOverwrite)( + const wchar_t *existName, const FILETIME *existTime, const UInt64 *existSize, + const wchar_t *newName, const FILETIME *newTime, const UInt64 *newSize, + Int32 *answer); + STDMETHOD (PrepareOperation)(const wchar_t *name, bool isFolder, Int32 askExtractMode, const UInt64 *position); + + STDMETHOD(MessageError)(const wchar_t *message); + STDMETHOD(SetOperationResult)(Int32 operationResult, bool encrypted); + + // IExtractCallbackUI + + HRESULT BeforeOpen(const wchar_t *name); + HRESULT OpenResult(const wchar_t *name, HRESULT result, bool encrypted); + HRESULT ThereAreNoFiles(); + HRESULT ExtractResult(HRESULT result); + + #ifndef _NO_CRYPTO + HRESULT SetPassword(const UString &password); + #endif + + // IFolderOperationsExtractCallback + STDMETHOD(AskWrite)( + const wchar_t *srcPath, + Int32 srcIsFolder, + const FILETIME *srcTime, + const UInt64 *srcSize, + const wchar_t *destPathRequest, + BSTR *destPathResult, + Int32 *writeAnswer); + STDMETHOD(ShowMessage)(const wchar_t *message); + STDMETHOD(SetCurrentFilePath)(const wchar_t *filePath); + STDMETHOD(SetNumFiles)(UInt64 numFiles); + + // ICryptoGetTextPassword + #ifndef _NO_CRYPTO + STDMETHOD(CryptoGetTextPassword)(BSTR *password); + #endif + +private: + UString _currentArchivePath; + bool _needWriteArchivePath; + + UString _currentFilePath; + bool _isFolder; + + HRESULT SetCurrentFilePath2(const wchar_t *filePath); + void AddErrorMessage(LPCWSTR message); +public: + CProgressDialog *ProgressDialog; + #ifndef _SFX + UInt64 NumFolders; + UInt64 NumFiles; + bool NeedAddFile; + #endif + UInt32 NumArchiveErrors; + bool ThereAreMessageErrors; + NExtract::NOverwriteMode::EEnum OverwriteMode; + + #ifndef _NO_CRYPTO + bool PasswordIsDefined; + bool PasswordWasAsked; + UString Password; + #endif + + CExtractCallbackImp(): + #ifndef _NO_CRYPTO + PasswordIsDefined(false), + PasswordWasAsked(false), + #endif + OverwriteMode(NExtract::NOverwriteMode::kAskBefore) + {} + + ~CExtractCallbackImp(); + void Init(); + + bool IsOK() const { return NumArchiveErrors == 0 && !ThereAreMessageErrors; } +}; + +#endif diff --git a/CPP/7zip/UI/FileManager/FM.cpp b/CPP/7zip/UI/FileManager/FM.cpp new file mode 100644 index 0000000..9644d0d --- /dev/null +++ b/CPP/7zip/UI/FileManager/FM.cpp @@ -0,0 +1,980 @@ +// FM.cpp + +#include "StdAfx.h" + +#include "resource.h" +#include "Panel.h" + +extern "C" +{ + #include "../../../../C/Alloc.h" +} + +#include "Common/Defs.h" +#include "Common/StringConvert.h" +// #include "Common/CommandLineParser.h" + +// FIXME #include "Windows/Control/Toolbar.h" +#include "Windows/Error.h" +#include "Windows/COM.h" +#include "Windows/DLL.h" +// FIXME #include "Windows/Security.h" +// FIXME #include "Windows/MemoryLock.h" + +#include "ViewSettings.h" +#include "../GUI/ExtractRes.h" + +#include "App.h" +#include "StringUtils.h" + +#include "MyLoadMenu.h" +#include "LangUtils.h" +#include "FormatUtils.h" +#include "RegistryUtils.h" + +using namespace NWindows; +using namespace NFile; +using namespace NFind; +// using namespace NCommandLineParser; + +#define MAX_LOADSTRING 100 + +#define MENU_HEIGHT 26 + +#ifndef _UNICODE +bool g_IsNT = false; +#endif +HINSTANCE g_hInstance; +HWND g_HWND; +bool g_OpenArchive = false; +static UString g_MainPath; +static UString g_ArcFormat; + +const int kNumDefaultPanels = 1; + +const int kSplitterWidth = 4; +int kSplitterRateMax = 1 << 16; + +// bool OnMenuCommand(HWND hWnd, int id); + +static void local_WM_CREATE(HWND hWnd); + +#ifdef _WIN32 +static UString GetProgramPath() +{ + UString s; + NDLL::MyGetModuleFileName(g_hInstance, s); + return s; +} + +UString GetProgramFolderPrefix() +{ + UString path = GetProgramPath(); + int pos = path.ReverseFind(WCHAR_PATH_SEPARATOR); + return path.Left(pos + 1); +} + + +class CSplitterPos +{ + int _ratio; // 10000 is max + int _pos; + int _fullWidth; + void SetRatioFromPos(HWND hWnd) + { _ratio = (_pos + kSplitterWidth / 2) * kSplitterRateMax / + MyMax(GetWidth(hWnd), 1); } +public: + int GetPos() const + { return _pos; } + int GetWidth(HWND hWnd) const + { + RECT rect; + ::GetClientRect(hWnd, &rect); + return rect.right; + } + void SetRatio(HWND hWnd, int aRatio) + { + _ratio = aRatio; + SetPosFromRatio(hWnd); + } + void SetPosPure(HWND hWnd, int pos) + { + int posMax = GetWidth(hWnd) - kSplitterWidth; + if (pos > posMax) + pos = posMax; + if (pos < 0) + pos = 0; + _pos = pos; + } + void SetPos(HWND hWnd, int pos) + { + _fullWidth = GetWidth(hWnd); + SetPosPure(hWnd, pos); + SetRatioFromPos(hWnd); + } + void SetPosFromRatio(HWND hWnd) + { + int fullWidth = GetWidth(hWnd); + if (_fullWidth != fullWidth) + { + _fullWidth = fullWidth; + SetPosPure(hWnd, GetWidth(hWnd) * _ratio / kSplitterRateMax - kSplitterWidth / 2); + } + } +}; +#endif + +bool g_CanChangeSplitter = false; +UINT32 g_SplitterPos = 0; +// FIXME CSplitterPos g_Splitter; +bool g_PanelsInfoDefined = false; + +int g_StartCaptureMousePos; +int g_StartCaptureSplitterPos; + +CApp g_App; + +void MoveSubWindows(HWND hWnd); +void OnSize(HWND hWnd); + +// FIXME LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam); + +const wchar_t *kWindowClass = L"FM"; + +#ifndef _UNICODE +static bool IsItWindowsNT() +{ + OSVERSIONINFO versionInfo; + versionInfo.dwOSVersionInfoSize = sizeof(versionInfo); + if (!::GetVersionEx(&versionInfo)) + return false; + return (versionInfo.dwPlatformId == VER_PLATFORM_WIN32_NT); +} +#endif + +// FUNCTION: InitInstance(HANDLE, int) +BOOL InitInstance(HINSTANCE hInstance, int nCmdShow) +{ + CWindow wnd; + + g_hInstance = hInstance; + + ReloadLangSmart(); + + // LoadString(hInstance, IDS_CLASS, windowClass, MAX_LOADSTRING); + + // LoadString(hInstance, IDS_APP_TITLE, title, MAX_LOADSTRING); + UString title = LangString(IDS_APP_TITLE, 0x03000000); + + /* + //If it is already running, then focus on the window + hWnd = FindWindow(windowClass, title); + if (hWnd) + { + SetForegroundWindow ((HWND) (((DWORD)hWnd) | 0x01)); + return 0; + } + */ + +#ifdef _WIN32 + WNDCLASSW wc; + + // wc.style = CS_HREDRAW | CS_VREDRAW; + wc.style = 0; + wc.lpfnWndProc = (WNDPROC) WndProc; + wc.cbClsExtra = 0; + wc.cbWndExtra = 0; + wc.hInstance = hInstance; + wc.hIcon = LoadIcon(hInstance, MAKEINTRESOURCE(IDI_FAM)); + + // wc.hCursor = LoadCursor (NULL, IDC_ARROW); + wc.hCursor = ::LoadCursor(0, IDC_SIZEWE); + // wc.hbrBackground = (HBRUSH) GetStockObject(WHITE_BRUSH); + wc.hbrBackground = (HBRUSH) (COLOR_BTNFACE + 1); + + wc.lpszMenuName = MAKEINTRESOURCEW(IDM_MENU); + wc.lpszClassName = kWindowClass; + + MyRegisterClass(&wc); + + // RECT rect; + // GetClientRect(hWnd, &rect); + + DWORD style = WS_OVERLAPPEDWINDOW; + // DWORD style = 0; + + RECT rect; + bool maximized = false; + int x , y, xSize, ySize; + x = y = xSize = ySize = CW_USEDEFAULT; + bool windowPosIsRead = ReadWindowSize(rect, maximized); + + if (windowPosIsRead) + { + // x = rect.left; + // y = rect.top; + xSize = rect.right - rect.left; + ySize = rect.bottom - rect.top; + } +#endif + + UINT32 numPanels, currentPanel; + g_PanelsInfoDefined = ReadPanelsInfo(numPanels, currentPanel, g_SplitterPos); + if (g_PanelsInfoDefined) + { + if (numPanels < 1 || numPanels > 2) + numPanels = kNumDefaultPanels; + if (currentPanel >= 2) + currentPanel = 0; + } + else + { + numPanels = kNumDefaultPanels; + currentPanel = 0; + } + g_App.NumPanels = numPanels; + g_App.LastFocusedPanel = currentPanel; + +#ifdef _WIN32 // FIXME + if (!wnd.Create(kWindowClass, title, style, + x, y, xSize, ySize, NULL, NULL, hInstance, NULL)) + return FALSE; + g_HWND = (HWND)wnd; +#else + { + extern HWND myCreateAndShowMainWindow(LPCTSTR title,void (*fct)(HWND)); + g_HWND = myCreateAndShowMainWindow(title,local_WM_CREATE); + } +#endif + +#ifdef _WIN32 + WINDOWPLACEMENT placement; + placement.length = sizeof(placement); + if (wnd.GetPlacement(&placement)) + { + if (nCmdShow == SW_SHOWNORMAL || nCmdShow == SW_SHOW || + nCmdShow == SW_SHOWDEFAULT) + { + if (maximized) + placement.showCmd = SW_SHOWMAXIMIZED; + else + placement.showCmd = SW_SHOWNORMAL; + } + else + placement.showCmd = nCmdShow; + if (windowPosIsRead) + placement.rcNormalPosition = rect; + wnd.SetPlacement(&placement); + // window.Show(nCmdShow); + } + else + wnd.Show(nCmdShow); +#endif + return TRUE; +} + +/* +static void GetCommands(const UString &aCommandLine, UString &aCommands) +{ + UString aProgramName; + aCommands.Empty(); + bool aQuoteMode = false; + for (int i = 0; i < aCommandLine.Length(); i++) + { + wchar_t aChar = aCommandLine[i]; + if (aChar == L'\"') + aQuoteMode = !aQuoteMode; + else if (aChar == L' ' && !aQuoteMode) + { + if (!aQuoteMode) + { + i++; + break; + } + } + else + aProgramName += aChar; + } + aCommands = aCommandLine.Mid(i); +} +*/ + +#ifdef _WIN32 +DWORD GetDllVersion(LPCTSTR lpszDllName) +{ + HINSTANCE hinstDll; + DWORD dwVersion = 0; + hinstDll = LoadLibrary(lpszDllName); + if(hinstDll) + { + DLLGETVERSIONPROC pDllGetVersion; + pDllGetVersion = (DLLGETVERSIONPROC) GetProcAddress(hinstDll, "DllGetVersion"); + + /*Because some DLLs might not implement this function, you + must test for it explicitly. Depending on the particular + DLL, the lack of a DllGetVersion function can be a useful + indicator of the version. + */ + if(pDllGetVersion) + { + DLLVERSIONINFO dvi; + HRESULT hr; + + ZeroMemory(&dvi, sizeof(dvi)); + dvi.cbSize = sizeof(dvi); + + hr = (*pDllGetVersion)(&dvi); + + if(SUCCEEDED(hr)) + { + dwVersion = MAKELONG(dvi.dwMinorVersion, dvi.dwMajorVersion); + } + } + FreeLibrary(hinstDll); + } + return dwVersion; +} + +DWORD g_ComCtl32Version; +#endif + +/* +#ifndef _WIN64 +typedef BOOL (WINAPI *LPFN_ISWOW64PROCESS) (HANDLE, PBOOL); + +static bool IsWow64() +{ + LPFN_ISWOW64PROCESS fnIsWow64Process = (LPFN_ISWOW64PROCESS)GetProcAddress( + GetModuleHandle("kernel32"), "IsWow64Process"); + if (fnIsWow64Process == NULL) + return false; + BOOL isWow; + if (!fnIsWow64Process(GetCurrentProcess(),&isWow)) + return false; + return isWow != FALSE; +} +#endif +*/ + +#ifdef _WIN32 +bool IsLargePageSupported() +{ + #ifdef _WIN64 + return true; + #else + OSVERSIONINFO versionInfo; + versionInfo.dwOSVersionInfoSize = sizeof(versionInfo); + if (!::GetVersionEx(&versionInfo)) + return false; + if (versionInfo.dwPlatformId != VER_PLATFORM_WIN32_NT || versionInfo.dwMajorVersion < 5) + return false; + if (versionInfo.dwMajorVersion > 5) + return true; + if (versionInfo.dwMinorVersion < 1) + return false; + if (versionInfo.dwMinorVersion > 1) + return true; + // return IsWow64(); + return false; + #endif +} + +static void SetMemoryLock() +{ + if (!IsLargePageSupported()) + return; + // if (ReadLockMemoryAdd()) + NSecurity::AddLockMemoryPrivilege(); + + if (ReadLockMemoryEnable()) + NSecurity::EnableLockMemoryPrivilege(); +} +#endif + +/* +static const int kNumSwitches = 1; + +namespace NKey { +enum Enum +{ + kOpenArachive = 0, +}; + +} + +static const CSwitchForm kSwitchForms[kNumSwitches] = + { + { L"SOA", NSwitchType::kSimple, false }, + }; +*/ + +// int APIENTRY WinMain2(HINSTANCE hInstance, HINSTANCE /* hPrevInstance */, LPSTR /* lpCmdLine */, int /* nCmdShow */); + +#ifdef _WIN32 +int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE /* hPrevInstance */, LPSTR /* lpCmdLine */, int nCmdShow) +{ + #ifndef _UNICODE + g_IsNT = IsItWindowsNT(); + #endif + + #ifdef _WIN32 + SetLargePageSize(); + #endif + + InitCommonControls(); + + g_ComCtl32Version = ::GetDllVersion(TEXT("comctl32.dll")); + + // OleInitialize is required for drag and drop. + OleInitialize(NULL); + // Maybe needs CoInitializeEx also ? + // NCOM::CComInitializer comInitializer; + + UString programString, commandsString; + // MessageBoxW(0, GetCommandLineW(), L"", 0); + SplitStringToTwoStrings(GetCommandLineW(), programString, commandsString); + + commandsString.Trim(); + UString paramString, tailString; + SplitStringToTwoStrings(commandsString, paramString, tailString); + paramString.Trim(); + + if (!paramString.IsEmpty()) + { + g_MainPath = paramString; + // return WinMain2(hInstance, hPrevInstance, lpCmdLine, nCmdShow); + + // MessageBoxW(0, paramString, L"", 0); + } + /* + UStringVector commandStrings; + NCommandLineParser::SplitCommandLine(GetCommandLineW(), commandStrings); + NCommandLineParser::CParser parser(kNumSwitches); + try + { + parser.ParseStrings(kSwitchForms, commandStrings); + const UStringVector &nonSwitchStrings = parser.NonSwitchStrings; + if(nonSwitchStrings.Size() > 1) + { + g_MainPath = nonSwitchStrings[1]; + // g_OpenArchive = parser[NKey::kOpenArachive].ThereIs; + CFileInfoW fileInfo; + if (FindFile(g_MainPath, fileInfo)) + { + if (!fileInfo.IsDir()) + g_OpenArchive = true; + } + } + } + catch(...) { } + */ + + + SetMemoryLock(); + + MSG msg; + if (!InitInstance (hInstance, nCmdShow)) + return FALSE; + + MyLoadMenu(g_HWND); + + #ifndef _UNICODE + if (g_IsNT) + { + HACCEL hAccels = LoadAcceleratorsW(hInstance, MAKEINTRESOURCEW(IDR_ACCELERATOR1)); + while (GetMessageW(&msg, NULL, 0, 0)) + { + if (TranslateAcceleratorW(g_HWND, hAccels, &msg) == 0) + { + TranslateMessage(&msg); + DispatchMessageW(&msg); + } + } + } + else + #endif + { + HACCEL hAccels = LoadAccelerators(hInstance, MAKEINTRESOURCE(IDR_ACCELERATOR1)); + while (GetMessage(&msg, NULL, 0, 0)) + { + if (TranslateAccelerator(g_HWND, hAccels, &msg) == 0) + { + // if (g_Hwnd != NULL || !IsDialogMessage(g_Hwnd, &msg)) + // if (!IsDialogMessage(g_Hwnd, &msg)) + TranslateMessage(&msg); + DispatchMessage(&msg); + } + } + } + + g_HWND = 0; + OleUninitialize(); + return (int)msg.wParam; +} + +static void SaveWindowInfo(HWND aWnd) +{ + /* + RECT rect; + if (!::GetWindowRect(aWnd, &rect)) + return; + */ + WINDOWPLACEMENT placement; + placement.length = sizeof(placement); + if (!::GetWindowPlacement(aWnd, &placement)) + return; + SaveWindowSize(placement.rcNormalPosition, + BOOLToBool(::IsZoomed(aWnd))); + SavePanelsInfo(g_App.NumPanels, g_App.LastFocusedPanel, + g_Splitter.GetPos()); +} +#else +int Main1(int argc,TCHAR **argv) +{ + if (argc >= 2) + { + g_MainPath = argv[1]; + } + + if (!InitInstance (0, 0)) + return FALSE; + + MyLoadMenu(g_HWND); + + // FIXME : install Accelerators ? + + return 0; +} + +#endif + +void ExecuteCommand(UINT commandID) +{ +// CPanel::CDisableTimerProcessing disableTimerProcessing1(g_App.Panels[0]); +// CPanel::CDisableTimerProcessing disableTimerProcessing2(g_App.Panels[1]); + + printf("FM - ExecuteCommand(%d)\n",commandID); + switch (commandID) + { + case kAddCommand: g_App.AddToArchive(); break; + case kExtractCommand: g_App.ExtractArchives(); break; + case kTestCommand: g_App.TestArchives(); break; + case IDEXIT: { // FIXME only for MacOSX ? + extern void appClose(void); + appClose(); + break; + } + case IDM_ABOUT: { // FIXME only for MacOSX ? + extern void createAboutDialog(void); + createAboutDialog(); + break; + } + } +} + +#ifdef _WIN32 +LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) +{ + int wmId, wmEvent; + switch (message) + { + case WM_COMMAND: + wmId = LOWORD(wParam); + wmEvent = HIWORD(wParam); + if ((HWND) lParam != NULL && wmEvent != 0) + break; + if (wmId >= kToolbarStartID) + { + ExecuteCommand(wmId); + return 0; + } + if (OnMenuCommand(hWnd, wmId)) + return 0; + break; + case WM_INITMENUPOPUP: + OnMenuActivating(hWnd, HMENU(wParam), LOWORD(lParam)); + break; + + /* + It doesn't help + case WM_EXITMENULOOP: + { + OnMenuUnActivating(hWnd); + break; + } + case WM_UNINITMENUPOPUP: + OnMenuUnActivating(hWnd, HMENU(wParam), lParam); + break; + */ + + case WM_CREATE: + { + + /* + INITCOMMONCONTROLSEX icex; + icex.dwSize = sizeof(INITCOMMONCONTROLSEX); + icex.dwICC = ICC_BAR_CLASSES; + InitCommonControlsEx(&icex); + + // Toolbar buttons used to create the first 4 buttons. + TBBUTTON tbb [ ] = + { + // {0, 0, TBSTATE_ENABLED, BTNS_SEP, 0L, 0}, + // {VIEW_PARENTFOLDER, kParentFolderID, TBSTATE_ENABLED, BTNS_BUTTON, 0L, 0}, + // {0, 0, TBSTATE_ENABLED, BTNS_SEP, 0L, 0}, + {VIEW_NEWFOLDER, ID_FILE_CREATEFOLDER, TBSTATE_ENABLED, BTNS_BUTTON, 0L, 0}, + }; + + int baseID = 100; + NWindows::NControl::CToolBar aToolBar; + aToolBar.Attach(::CreateToolbarEx (hWnd, + WS_CHILD | WS_BORDER | WS_VISIBLE | TBSTYLE_TOOLTIPS, // | TBSTYLE_FLAT + baseID + 2, 11, + (HINSTANCE)HINST_COMMCTRL, IDB_VIEW_SMALL_COLOR, + (LPCTBBUTTON)&tbb, sizeof(tbb) / sizeof(tbb[0]), + 0, 0, 100, 30, sizeof (TBBUTTON))); + */ + // HCURSOR cursor = ::LoadCursor(0, IDC_SIZEWE); + // ::SetCursor(cursor); + + if (g_PanelsInfoDefined) + g_Splitter.SetPos(hWnd, g_SplitterPos); + else + { + g_Splitter.SetRatio(hWnd, kSplitterRateMax / 2); + g_SplitterPos = g_Splitter.GetPos(); + } + + RECT rect; + ::GetClientRect(hWnd, &rect); + int xSize = rect.right; + int xSizes[2]; + xSizes[0] = g_Splitter.GetPos(); + xSizes[1] = xSize - kSplitterWidth - xSizes[0]; + if (xSizes[1] < 0) + xSizes[1] = 0; + + g_App.CreateDragTarget(); + bool archiveIsOpened; + bool encrypted; + bool needOpenFile = false; + if (!g_MainPath.IsEmpty() /* && g_OpenArchive */) + { + NFile::NFind::CFileInfoW fileInfo; + if (NFile::NFind::FindFile(g_MainPath, fileInfo)) + if (!fileInfo.IsDir()) + needOpenFile = true; + } + g_App.Create(hWnd, g_MainPath, xSizes, archiveIsOpened, encrypted); + + if (needOpenFile && !archiveIsOpened) + { + UString message; + if (encrypted) + message = MyFormatNew(IDS_CANT_OPEN_ENCRYPTED_ARCHIVE, 0x0200060A, g_MainPath); + else + message = MyFormatNew(IDS_CANT_OPEN_ARCHIVE, 0x02000609, g_MainPath); + MessageBoxW(0, message, L"7-zip", MB_ICONERROR); + return -1; + } + // g_SplitterPos = 0; + + // ::DragAcceptFiles(hWnd, TRUE); + RegisterDragDrop(hWnd, g_App._dropTarget); + + break; + } + case WM_DESTROY: + { + // ::DragAcceptFiles(hWnd, FALSE); + RevokeDragDrop(hWnd); + g_App._dropTarget.Release(); + + g_App.Save(); + g_App.Release(); + SaveWindowInfo(hWnd); + PostQuitMessage(0); + break; + } + /* + case WM_MOVE: + { + break; + } + */ + case WM_LBUTTONDOWN: + g_StartCaptureMousePos = LOWORD(lParam); + g_StartCaptureSplitterPos = g_Splitter.GetPos(); + ::SetCapture(hWnd); + break; + case WM_LBUTTONUP: + { + ::ReleaseCapture(); + break; + } + case WM_MOUSEMOVE: + { + if ((wParam & MK_LBUTTON) != 0 && ::GetCapture() == hWnd) + { + g_Splitter.SetPos(hWnd, g_StartCaptureSplitterPos + + (short)LOWORD(lParam) - g_StartCaptureMousePos); + MoveSubWindows(hWnd); + } + break; + } + + case WM_SIZE: + { + if (g_CanChangeSplitter) + g_Splitter.SetPosFromRatio(hWnd); + else + { + g_Splitter.SetPos(hWnd, g_SplitterPos ); + g_CanChangeSplitter = true; + } + + OnSize(hWnd); + /* + int xSize = LOWORD(lParam); + int ySize = HIWORD(lParam); + // int xSplitter = 2; + int xWidth = g_SplitPos; + // int xSplitPos = xWidth; + g_Panel[0]._listView.MoveWindow(0, 0, xWidth, ySize); + g_Panel[1]._listView.MoveWindow(xSize - xWidth, 0, xWidth, ySize); + */ + return 0; + break; + } + case WM_SETFOCUS: + // g_App.SetFocus(g_App.LastFocusedPanel); + g_App.SetFocusToLastItem(); + break; + /* + case WM_ACTIVATE: + { + int fActive = LOWORD(wParam); + switch (fActive) + { + case WA_INACTIVE: + { + // g_FocusIndex = g_App.LastFocusedPanel; + // g_App.LastFocusedPanel = g_App.GetFocusedPanelIndex(); + // return 0; + } + } + break; + } + */ + /* + case kLangWasChangedMessage: + MyLoadMenu(g_HWND); + return 0; + */ + + /* + case WM_SETTINGCHANGE: + break; + */ + case WM_NOTIFY: + { + g_App.OnNotify((int)wParam, (LPNMHDR)lParam); + break; + } + /* + case WM_DROPFILES: + { + g_App.GetFocusedPanel().CompressDropFiles((HDROP)wParam); + return 0 ; + } + */ + } + #ifndef _UNICODE + if (g_IsNT) + return DefWindowProcW(hWnd, message, wParam, lParam); + else + #endif + return DefWindowProc(hWnd, message, wParam, lParam); + +} + +void OnSize(HWND hWnd) +{ + /* + if (g_App._rebar) + { + RECT rect; + ::GetClientRect(hWnd, &rect); + int xSize = rect.right; + int ySize = rect.bottom; + // rect.bottom = 0; + // g_App._rebar.SizeToRect(&rect); + // g_App._rebar.Move(0, 0, xSize, ySize); + } + */ + MoveSubWindows(hWnd); +} + +int Window_GetRealHeight(NWindows::CWindow &w) +{ + RECT rect; + WINDOWPLACEMENT placement; + w.GetWindowRect(&rect); + int res = rect.bottom - rect.top; + if (w.GetPlacement(&placement)) + res += placement.rcNormalPosition.top; + return res; +} +#else // _WIN32 +static void local_WM_CREATE(HWND hWnd) + { + printf("**local_WM_CREATE**\n"); +#if 0 + if (g_PanelsInfoDefined) + g_Splitter.SetPos(hWnd, g_SplitterPos); + else + { + g_Splitter.SetRatio(hWnd, kSplitterRateMax / 2); + g_SplitterPos = g_Splitter.GetPos(); + } + + RECT rect; + ::GetClientRect(hWnd, &rect); + int xSize = rect.right; + int xSizes[2]; + xSizes[0] = g_Splitter.GetPos(); + xSizes[1] = xSize - kSplitterWidth - xSizes[0]; + if (xSizes[1] < 0) + xSizes[1] = 0; + + g_App.CreateDragTarget(); +#else + int xSizes[2] = { 0,0 }; +#endif + bool archiveIsOpened; + bool encrypted; + bool needOpenFile = false; + if (!g_MainPath.IsEmpty() /* && g_OpenArchive */) + { + NFile::NFind::CFileInfoW fileInfo; + if (NFile::NFind::FindFile(g_MainPath, fileInfo)) + if (!fileInfo.IsDir()) + needOpenFile = true; + } + g_App.Create(hWnd, g_MainPath, g_ArcFormat, xSizes, archiveIsOpened, encrypted); + + if (needOpenFile && !archiveIsOpened) + { + UString message; + if (encrypted) + message = MyFormatNew(IDS_CANT_OPEN_ENCRYPTED_ARCHIVE, 0x0200060A, g_MainPath); + else + message = MyFormatNew(IDS_CANT_OPEN_ARCHIVE, 0x02000609, g_MainPath); + MessageBoxW(0, message, L"7-zip", MB_ICONERROR); + return ;// -1; + } + // g_SplitterPos = 0; + + // FIXME RegisterDragDrop(hWnd, g_App._dropTarget); + +} + +void main_WM_DESTROY() +{ + // RevokeDragDrop(hWnd); + // g_App._dropTarget.Release(); +printf("main_WM_DESTROY\n"); + g_App.Save(); + g_App.Release(); + // SaveWindowInfo(hWnd); + // PostQuitMessage(0); +} +#endif + +void MoveSubWindows(HWND hWnd) +{ +#ifdef _WIN32 + RECT rect; + ::GetClientRect(hWnd, &rect); + int xSize = rect.right; + int headerSize = 0; + if (g_App._rebar) + headerSize = Window_GetRealHeight(g_App._rebar); + int ySize = MyMax((int)(rect.bottom - headerSize), 0); + + if (g_App.NumPanels > 1) + { + g_App.Panels[0].Move(0, headerSize, g_Splitter.GetPos(), ySize); + int xWidth1 = g_Splitter.GetPos() + kSplitterWidth; + g_App.Panels[1].Move(xWidth1, headerSize, xSize - xWidth1, ySize); + } + else + { + /* + int otherPanel = 1 - g_App.LastFocusedPanel; + if (g_App.PanelsCreated[otherPanel]) + g_App.Panels[otherPanel].Move(0, headerSize, 0, ySize); + */ + g_App.Panels[g_App.LastFocusedPanel].Move(0, headerSize, xSize, ySize); + } +#endif +} + + +void CApp::MoveSubWindows() +{ +#ifdef _WIN32 + HWND hWnd = _window; + RECT rect; + if (hWnd == 0) + return; + ::GetClientRect(hWnd, &rect); + int xSize = rect.right; + if (xSize == 0) + return; + int headerSize = 0; + #ifdef UNDER_CE + _commandBar.AutoSize(); + { + _commandBar.Show(true); // maybe we need it for + headerSize += _commandBar.Height(); + } + #endif + if (_toolBar) + { + _toolBar.AutoSize(); + #ifdef UNDER_CE + int h2 = Window_GetRealHeight(_toolBar); + _toolBar.Move(0, headerSize, xSize, h2); + #endif + headerSize += Window_GetRealHeight(_toolBar); + } + int ySize = MyMax((int)(rect.bottom - headerSize), 0); + + if (NumPanels > 1) + { + Panels[0].Move(0, headerSize, g_Splitter.GetPos(), ySize); + int xWidth1 = g_Splitter.GetPos() + kSplitterWidth; + Panels[1].Move(xWidth1, headerSize, xSize - xWidth1, ySize); + } + else + { + /* + int otherPanel = 1 - LastFocusedPanel; + if (PanelsCreated[otherPanel]) + Panels[otherPanel].Move(0, headerSize, 0, ySize); + */ + Panels[LastFocusedPanel].Move(0, headerSize, xSize, ySize); + } +#endif +} + + + +// FIXME for mac +void doMacOpenFile( const UString & fileName ) +{ + g_App.GetFocusedPanel().BindToPathAndRefresh(fileName); +} + + diff --git a/CPP/7zip/UI/FileManager/FM_rc.cpp b/CPP/7zip/UI/FileManager/FM_rc.cpp new file mode 100644 index 0000000..f2de734 --- /dev/null +++ b/CPP/7zip/UI/FileManager/FM_rc.cpp @@ -0,0 +1,1122 @@ +#include "StdAfx.h" + +// For compilers that support precompilation, includes "wx/wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ +#pragma hdrstop +#endif + +#ifndef WX_PRECOMP +#include "wx/wx.h" +#endif + +#include "wx/mimetype.h" +#include "wx/artprov.h" +#include "wx/imaglist.h" + +#undef _WIN32 + +#include "resource.h" + +#include "PropertyNameRes.h" + +#include "App.h" + +#include "Windows/Window.h" // FIXME +#include "Windows/Control/DialogImpl.h" +#include "Windows/Control/ListView.h" +#include "Windows/Control/Window2.h" + +#define static const +#include "../GUI/p7zip_32.xpm" +#undef static + +extern HWND g_HWND; + +#define BASE_ID_PANEL_1 (1000 + 100 * 0) +#define BASE_ID_PANEL_2 (1000 + 100 * 1) + +////////////////////////////////////// Tool bar images +#include "res/AddPNG.h" +#include "res/Add2PNG.h" +#include "res/ExtractPNG.h" +#include "res/Extract2PNG.h" +#include "res/TestPNG.h" +#include "res/Test2PNG.h" +#include "res/CopyPNG.h" +#include "res/Copy2PNG.h" +#include "res/MovePNG.h" +#include "res/Move2PNG.h" +#include "res/DeletePNG.h" +#include "res/Delete2PNG.h" +#include "res/InfoPNG.h" +#include "res/Info2PNG.h" + +#include "LangUtils.h" + +#include +#define wxGetBitmapFromMemory(name) _wxGetBitmapFromMemory(name ## _png, sizeof(name ## _png)) + +static inline wxBitmap _wxGetBitmapFromMemory(const unsigned char *data, int length) { + wxMemoryInputStream is(data, length); + return wxBitmap(wxImage(is, wxBITMAP_TYPE_ANY, -1), -1); +} + +///////////////////////////////////// SevenZipPanel.h ///////////////////// + +#include + +typedef wxListCtrl CExplorerListCtrl; + +class MyFrame; + +class SevenZipPanel : public wxPanel +{ + static int count; + + MyFrame *m_frame; + + CExplorerListCtrl *m_pListCtrlExplorer; + NWindows::NControl::CWindow2 *_wList; + + + wxBitmapButton *m_pBmpButtonParentFolder; + wxComboBox *m_pComboBoxPath; + wxStatusBar *m_pStatusBar; + + wxImageList imgList; + + int _panelIndex; + + // wxString m_currentDirectory; + + // int m_nbDirs; + + // wxString m_prompt; + +public: + SevenZipPanel(MyFrame *frame, wxWindow *parent,int id,int panelIndex); + + void registerWindow2(NWindows::NControl::CWindow2 *w) + { + _wList = w; + _wList->OnMessage(WM_CREATE,0,0); + } + + void OnAnyButton( wxCommandEvent &event ); + void OnSelected(wxListEvent& event); + void OnDeselected(wxListEvent& event); + void OnActivated(wxListEvent& event); + void OnFocused(wxListEvent& event); + void OnLeftDownBeginDrag(wxListEvent& event); + void OnRightClick(wxListEvent& event); + void OnColumnClick(wxListEvent& event); + + void OnLeftDown(wxMouseEvent &event ); + void OnRightDown(wxMouseEvent &event ); + + void OnTextEnter(wxCommandEvent& event); + + void WriteText(const wxString& text) { + printf("DEBUG : %ls",(const wchar_t *)text); + } + + /* Don't work ... + void OnCloseWindow(wxCloseEvent& WXUNUSED(event)) { + _wList->OnDestroy(); + } + */ + + void evt_destroy() { + _wList->OnDestroy(); + } + + +private: + DECLARE_EVENT_TABLE() +}; + + + +///////////////////////////////////// SevenZipPanel.h ///////////////////// + + + +class MyFrame: public wxFrame +{ +public: + // ctor + MyFrame(void (*fct)(HWND),wxFrame *frame, const wxString& title, int x, int y, int w, int h); + // virtual ~MyFrame(); + + void registerWindow2(int baseID,NWindows::NControl::CWindow2 *w) + { + printf("MyFrame::registerWindow2(%d,%p)\n",baseID,w); + switch (baseID) + { + case BASE_ID_PANEL_1: _panel1->registerWindow2(w); break; + case BASE_ID_PANEL_2: _panel2->registerWindow2(w); break; + default: printf("FIXME - MyFrame::registerWindow2\n"); + } + } + + void PopulateToolbar(wxToolBar* toolBar); + void RecreateToolbar(); + + +protected: + // callbacks + void OnWorkerEvent(wxCommandEvent& event); + void OnAnyMenu(wxCommandEvent& event) + { + extern bool OnMenuCommand(HWND hWnd, int id); + extern void ExecuteCommand(UINT commandID); + + int wmId = event.GetId(); + + if (wmId >= kToolbarStartID) + { + ExecuteCommand(wmId); + return ; // 0; + } + OnMenuCommand(this, wmId); + } + void OnCloseWindow(wxCloseEvent& WXUNUSED(event)) + { + if (_panel1) _panel1->evt_destroy(); + if (_panel2) _panel2->evt_destroy(); + + extern void main_WM_DESTROY(); + main_WM_DESTROY(); + Destroy(); + } +private: + SevenZipPanel * _panel1; + SevenZipPanel * _panel2; + DECLARE_EVENT_TABLE() +}; + +BEGIN_EVENT_TABLE(MyFrame, wxFrame) + EVT_MENU(WORKER_EVENT, MyFrame::OnWorkerEvent) + EVT_MENU(wxID_ANY, MyFrame::OnAnyMenu) + EVT_CLOSE(MyFrame::OnCloseWindow) +END_EVENT_TABLE() + + +static bool TEST_create(HWND hWnd) // FIXME +{ +extern HWND g_HWND; + CMyListView _listView; + + int _baseID = 1000; + + HWND w = NWindows::GetDlgItem(g_HWND, _baseID + 1); + if (w == 0) + { + printf("Can't find id=%d\n",_baseID + 1); + return false; + } + printf("CPanel::OnCreate : _listView.Attach(%p)\n",w); + _listView.Attach(w); + + _listView.SetRedraw(false); + + _listView.DeleteAllItems(); + + _listView.DeleteColumn(1); + + _listView.InsertColumn(0, L"toto", 100); + +// _listView.SetItemCount(1); + + _listView.InsertItem(0, L"item 1"); + + + _listView.SetRedraw(true); + + return true; +} + +// My frame constructor +MyFrame::MyFrame(void (*wm_create)(HWND),wxFrame *frame, const wxString& title, + int x, int y, int w, int h) + : wxFrame(frame, wxID_ANY, title, wxPoint(x, y), wxSize(w, h)) +{ +printf("===MyFrame::MyFrame===BEGIN===\n"); + + this->SetIcon(wxICON(p7zip_32)); + + g_HWND = this; // FIXME + + SetMinSize(wxSize(800,700)); + + wxBoxSizer *topsizer = new wxBoxSizer( wxVERTICAL ); + + _panel1 = new SevenZipPanel(this,this,BASE_ID_PANEL_1,0); // FIXME panelIndex = 0 + _panel2 = 0; + topsizer->Add( + _panel1, + 1, // make vertically stretchable + wxEXPAND | // make horizontally stretchable + wxALL, // and make border all around + 0 ); // set border width to 10 + + // Create the toolbar + // FIXME RecreateToolbar(); +printf("===MyFrame::MyFrame===WM_CREATE===\n"); + wm_create(this); +// FIXME TEST_create(this); + + + // Create the toolbar // FIXME + RecreateToolbar(); + + +printf("===MyFrame::MyFrame===SIZER===\n"); + + SetSizer( topsizer ); // use the sizer for layout + + topsizer->SetSizeHints( this ); // set size hints to honour minimum size +printf("===MyFrame::MyFrame===END===\n"); +} + +void myCreateHandle(int n); +void MyFrame::OnWorkerEvent(wxCommandEvent& event) +{ + int n = event.GetInt(); +// printf(" MyFrame::OnWorkerEvent(n=%d)\n",n); + myCreateHandle(n); +} + +wxWindow * g_window=0; +HWND myCreateAndShowMainWindow(LPCTSTR title,void (*fct)(HWND)) +{ + MyFrame *frame = new MyFrame(fct,(wxFrame *)NULL, title, 40, 40, 800, 600); + + g_window = frame; + + // Don't Show the frame ! + frame->Show(true); // FIXME + + // FIXME : SetTopWindow(g_HWND); + + return frame; +} + + +class myToolBar +{ + wxToolBar * m_toolbar; + + bool m_bShowText; + +public: + myToolBar(wxToolBar * toolbar,bool bShowText ) : m_toolbar(toolbar), m_bShowText(bShowText) { } + + myToolBar* AddTool(int toolId, const wxString& label, const wxBitmap& bitmap1, const wxString& shortHelpString = _T(""), wxItemKind kind = wxITEM_NORMAL) + { + wxString text = wxEmptyString; + if (m_bShowText) text = label; + + wxSize tb_size = m_toolbar->GetToolBitmapSize(); + int tb_witdh = tb_size.GetWidth(); + int tb_height = tb_size.GetHeight(); + + if ((bitmap1.GetWidth() > tb_witdh) || ( bitmap1.GetHeight()> tb_height)) + { + wxBitmap bmp(bitmap1.ConvertToImage().Scale(tb_witdh, tb_height)); + m_toolbar->AddTool(toolId,text,bmp,shortHelpString,kind); + } + else + { + m_toolbar->AddTool(toolId,text,bitmap1,shortHelpString,kind); + } + + return this; + } + + void SetToolBitmapSize(const wxSize& size) + { + m_toolbar->SetToolBitmapSize(size); + } + + bool Realize() + { + return m_toolbar->Realize(); + } + + void AddSeparator() { m_toolbar->AddSeparator(); } +}; + +void MyFrame::PopulateToolbar(wxToolBar* p_toolBar) +{/* + toolBar->AddTool(wxID_NEW, _T("New"),toolBarBitmaps[Tool_new], wxNullBitmap, wxITEM_NORMAL, + _T("New file"), _T("This is help for new file tool")); + */ + myToolBar toolBar(p_toolBar,true); + + const int kWidth = 24; + const int kHeight = 24; + + UString msg; + + // FIXME toolBar->SetToolBitmapSize(wxSize(24,24)); + toolBar.SetToolBitmapSize(wxSize(kWidth,kHeight)); + + + + msg = LangString(0x03020400); // { kAddCommand, IDB_ADD, IDB_ADD2, IDS_ADD, 0x03020400} + if (msg == L"") msg = L"Add"; + toolBar.AddTool(kAddCommand, (const wchar_t *)msg, wxGetBitmapFromMemory(ADD2)); + + msg = LangString(0x03020401); // { kExtractCommand, IDB_EXTRACT, IDB_EXTRACT2, IDS_EXTRACT, 0x03020401} + if (msg == L"") msg = L"Extract"; + toolBar.AddTool(kExtractCommand,(const wchar_t *)msg, wxGetBitmapFromMemory(EXTRACT2)); + + msg = LangString(0x03020402); // { kTestCommand , IDB_TEST, IDB_TEST2, IDS_TEST, 0x03020402} + if (msg == L"") msg = L"Test"; + toolBar.AddTool(kTestCommand,(const wchar_t *)msg, wxGetBitmapFromMemory(TEST2)); + + toolBar.AddSeparator(); + + msg = LangString(0x03020420); // { IDM_COPY_TO, IDB_COPY, IDB_COPY2, IDS_BUTTON_COPY, 0x03020420} + if (msg == L"") msg = L"Copy"; + toolBar.AddTool(IDM_COPY_TO, (const wchar_t *)msg, wxGetBitmapFromMemory(COPY2)); + + msg = LangString(0x03020421); // { IDM_MOVE_TO, IDB_MOVE, IDB_MOVE2, IDS_BUTTON_MOVE, 0x03020421} + if (msg == L"") msg = L"Move"; + toolBar.AddTool(IDM_MOVE_TO, (const wchar_t *)msg, wxGetBitmapFromMemory(MOVE2)); + + msg = LangString(0x03020422); // { IDM_DELETE, IDB_DELETE, IDB_DELETE2, IDS_BUTTON_DELETE, 0x03020422} + if (msg == L"") msg = L"Delete"; + toolBar.AddTool(IDM_DELETE, (const wchar_t *)msg, wxGetBitmapFromMemory(DELETE2)); + + msg = LangString(0x03020423); // { IDM_FILE_PROPERTIES, IDB_INFO, IDB_INFO2, IDS_BUTTON_INFO, 0x03020423} + if (msg == L"") msg = L"Info"; + toolBar.AddTool(IDM_FILE_PROPERTIES, (const wchar_t *)msg, wxGetBitmapFromMemory(INFO2)); + + //////////////////////////////////////////////////////// + + /* FIXME + if (g_mimeDatabase) + { + toolBar.AddSeparator(); + + TryMime(&toolBar, _T("txt")); + TryMime(&toolBar, _T("rar")); + TryMime(&toolBar, _T("7z")); + } + + toolBar.AddSeparator(); + + wxIcon i_plus = wxArtProvider::GetIcon(wxART_ADD_BOOKMARK , wxART_TOOLBAR , wxSize(kWidth,kHeight)); + toolBar.AddTool(wxID_ANY, wxT("Add Bookmark"), i_plus); + + wxIcon i_go_up_dir = wxArtProvider::GetIcon(wxART_GO_DIR_UP , wxART_TOOLBAR , wxSize(kWidth,kHeight)); + toolBar.AddTool(wxID_ANY, wxT("Go up dir"), i_go_up_dir); + + wxIcon i_folder = wxArtProvider::GetIcon(wxART_FOLDER , wxART_TOOLBAR , wxSize(kWidth,kHeight)); + toolBar.AddTool(wxID_ANY, wxT("Folder"), i_folder); + + wxIcon i_missing_image = wxArtProvider::GetIcon(wxART_MISSING_IMAGE , wxART_TOOLBAR , wxSize(kWidth,kHeight)); + toolBar.AddTool(wxID_ANY, wxT("missing image"), i_missing_image); + */ + + /////////////////////////////////////////////////////// + + toolBar.Realize(); + + // toolBar->SetRows(!(toolBar->IsVertical()) ? m_rows : 10 / m_rows); +} +void MyFrame::RecreateToolbar() +{ + // delete and recreate the toolbar + wxToolBar *toolBar = GetToolBar(); + // long style = toolBar ? toolBar->GetWindowStyle() : TOOLBAR_STYLE; + + SetToolBar(NULL); + + delete toolBar; + /* + style &= ~(wxTB_HORIZONTAL | wxTB_VERTICAL | wxTB_BOTTOM | wxTB_RIGHT | wxTB_HORZ_LAYOUT); + switch( m_toolbarPosition ) + { + case TOOLBAR_LEFT:style |= wxTB_LEFT; break; + case TOOLBAR_TOP: style |= wxTB_TOP;break; + case TOOLBAR_RIGHT:style |= wxTB_RIGHT;break; + case TOOLBAR_BOTTOM:style |= wxTB_BOTTOM;break; + } + */ + long style = wxTB_FLAT | wxTB_NODIVIDER | wxTB_TEXT; // TOOLBAR_STYLE | wxTB_TOP; + /* + if ( m_showTooltips ) style &= ~wxTB_NO_TOOLTIPS; + else style |= wxTB_NO_TOOLTIPS; + + if ( style & wxTB_TEXT && !(style & wxTB_NOICONS) && m_horzText ) style |= wxTB_HORZ_LAYOUT; + */ + toolBar = CreateToolBar(style, wxID_ANY); + + PopulateToolbar(toolBar); +} + +void registerWindow2(int baseID,NWindows::NControl::CWindow2 *w) +{ + MyFrame * f = (MyFrame *) g_HWND; + f->registerWindow2(baseID,w); + +} + + +///////////////////////////////////////////////////////// +#include "LangUtils.h" + +static const UINT kOpenBookmarkMenuID = 730; // FIXME / duplicate +static const UINT kSetBookmarkMenuID = 740; + + +void rc_MyLoadMenu(HWND hWnd) +{ + wxFrame *hwnd = (wxFrame *)hWnd; + wxMenu *m; + wxMenu *m_file = m = new wxMenu; + { + m->Append(IDM_FILE_OPEN, _T("&Open")); // FIXME "&Open\tEnter" - don't use Enter to support combobox enter ... + m->Append(IDM_FILE_OPEN_INSIDE,_T("Open &Inside\tCtrl+PgDn")); + m->Append(IDM_FILE_OPEN_OUTSIDE,_T("Open O&utside\tShift+Enter")); +// m->Append(IDM_FILE_EDIT,_T("&Edit\tF4")); + m->AppendSeparator(); +// m->Append(IDM_RENAME,_T("Rena&me\tF2")); + m->Append(IDM_COPY_TO,_T("&Copy To...\tF5")); + m->Append(IDM_MOVE_TO,_T("&Move To...\tF6")); + m->Append(IDM_DELETE,_T("&Delete\tDel")); + m->AppendSeparator(); + m->Append(IDM_FILE_SPLIT,_T("&Split file...")); + m->Append(IDM_FILE_COMBINE,_T("Com&bine files...")); + m->AppendSeparator(); +// m->Append(IDM_FILE_PROPERTIES,_T("P&roperties\tAlt+Enter")); +// m->Append(IDM_FILE_COMMENT,_T("Comme&nt\tCtrl+Z")); + m->Append(IDM_FILE_CRC,_T("Calculate checksum")); + m->Append(IDM_FILE_DIFF,_T("Di&ff")); + m->AppendSeparator(); + m->Append(IDM_CREATE_FOLDER,_T("Create Folder\tF7")); + m->Append(IDM_CREATE_FILE,_T("Create File\tCtrl+N")); + m->AppendSeparator(); + m->Append(IDEXIT,_T("E&xit\tAlt+F4")); + } + wxMenu *m_edit = m = new wxMenu; + { + m->Append(IDM_EDIT_CUT, _T("Cu&t\tCtrl+X"))->Enable(true); // GRAYED + // m->Enable(IDM_EDIT_CUT, false); + m->Append(IDM_EDIT_COPY, _T("&Copy\tCtrl+C"))->Enable(true); // GRAYED + m->Append(IDM_EDIT_PASTE, _T("&Paste\tCtrl+V"))->Enable(true); // GRAYED + m->AppendSeparator(); + m->Append(IDM_SELECT_ALL, _T("Select &All\tShift+[Grey +]")); + m->Append(IDM_DESELECT_ALL, _T("Deselect All\tShift+[Grey -]")); + m->Append(IDM_INVERT_SELECTION, _T("&Invert Selection\tGrey *")); + m->Append(IDM_SELECT, _T("Select...\tGrey +")); + m->Append(IDM_DESELECT, _T("Deselect...\tGrey -")); +// FIXME m->Append(IDM_SELECT_BY_TYPE, _T("Select by Type\tAlt+[Grey+]")); +// FIXME m->Append(IDM_DESELECT_BY_TYPE, _T("Deselect by Type\tAlt+[Grey -]")); + } + wxMenu *m_view = m = new wxMenu; + { +/* + m->AppendRadioItem(IDM_VIEW_LARGE_ICONS, _T("Lar&ge Icons\tCtrl+1")); + m->AppendRadioItem(IDM_VIEW_SMALL_ICONS, _T("S&mall Icons\tCtrl+2")); + m->AppendRadioItem(IDM_VIEW_LIST, _T("&List\tCtrl+3")); + m->AppendRadioItem(IDM_VIEW_DETAILS, _T("&Details\tCtrl+4"))->Check(true); // CHECKED + m->AppendSeparator(); + m->Append(IDM_VIEW_ARANGE_BY_NAME, _T("Name\tCtrl+F3")); + m->Append(IDM_VIEW_ARANGE_BY_TYPE, _T("Type\tCtrl+F4")); + m->Append(IDM_VIEW_ARANGE_BY_DATE, _T("Date\tCtrl+F5")); + m->Append(IDM_VIEW_ARANGE_BY_SIZE, _T("Size\tCtrl+F6")); + m->Append(IDM_VIEW_ARANGE_NO_SORT, _T("Unsorted\tCtrl+F7")); + m->AppendSeparator(); + m->AppendCheckItem(IDM_VIEW_FLAT_VIEW, _T("Flat View")); + m->AppendCheckItem(IDM_VIEW_TWO_PANELS, _T("&2 Panels\tF9")); + + { + wxMenu* subMenu = new wxMenu; + subMenu->AppendCheckItem(IDM_VIEW_ARCHIVE_TOOLBAR, _T("Archive Toolbar")); + subMenu->AppendCheckItem(IDM_VIEW_STANDARD_TOOLBAR, _T("Standard Toolbar")); + subMenu->AppendSeparator(); + subMenu->AppendCheckItem(IDM_VIEW_TOOLBARS_LARGE_BUTTONS, _T("Large Buttons")); + subMenu->AppendCheckItem(IDM_VIEW_TOOLBARS_SHOW_BUTTONS_TEXT, _T("Show Buttons Text")); + m->Append(12112, _T("Toolbars"), subMenu); // FIXME ID ? + } + m->AppendSeparator(); +*/ + m->Append(IDM_OPEN_ROOT_FOLDER, _T("Open Root Folder\t" STRING_PATH_SEPARATOR)); + m->Append(IDM_OPEN_PARENT_FOLDER, _T("Up One Level\tBackspace")); + m->Append(IDM_FOLDERS_HISTORY, _T("Folders History...\tAlt+F12")); + m->AppendSeparator(); + m->Append(IDM_VIEW_REFRESH, _T("&Refresh\tCtrl+R")); + } + wxMenu *m_favorites = m = new wxMenu; + { + { + wxMenu* subMenu = new wxMenu; + for (int i = 0; i < 10; i++) + { + UString s = LangString(IDS_BOOKMARK, 0x03000720); + s += L" "; + wchar_t c = (wchar_t)(L'0' + i); + s += c; + s += L"\tAlt+Shift+"; + s += c; + subMenu->Append( kSetBookmarkMenuID + i, wxString(s)); + } + + m->Append(12111, _T("&Add folder to Favorites as"), subMenu); // FIXME ID ? + } + m->AppendSeparator(); + for (int i = 0; i < 10; i++) + { + UString path = g_App.AppState.FastFolders.GetString(i); + const int kMaxSize = 100; + const int kFirstPartSize = kMaxSize / 2; + if (path.Length() > kMaxSize) + { + path = path.Left(kFirstPartSize) + UString(L" ... ") + + path.Right(kMaxSize - kFirstPartSize); + } + UString s = path; + if (s.IsEmpty()) + s = L"-"; + s += L"\tAlt+"; + s += (wchar_t)(L'0' + i); + // menu.AppendItem(MF_STRING, kOpenBookmarkMenuID + i, s); + m->Append( kOpenBookmarkMenuID + i, wxString(s)); + } + + } + wxMenu *m_tools = m = new wxMenu; + { +// m->Append(IDM_OPTIONS, _T("&Options...")); + m->Append(IDM_BENCHMARK, _T("&Benchmark")); + } + wxMenu *m_help = m = new wxMenu; + { + m->Append(IDM_HELP_CONTENTS, _T("&Contents...\tF1")); + m->AppendSeparator(); + m->Append(IDM_ABOUT, _T("&About 7-Zip...")); + } + + wxMenuBar *menuBar = new wxMenuBar; + + menuBar->Append(m_file, _T("&File")); + menuBar->Append(m_edit, _T("&Edit")); + menuBar->Append(m_view, _T("&View")); + menuBar->Append(m_favorites, _T("F&avorites")); + menuBar->Append(m_tools, _T("&Tools")); + menuBar->Append(m_help, _T("&Help")); + hwnd->SetMenuBar(menuBar); +} + +////////////////////////////////////////////////////////////////// + + +static CStringTable g_stringTable[] = +{ + /* resource.rc */ + /***************/ + { IDS_APP_TITLE, L"7-Zip File Manager" }, + + { IDS_COPY , L"Copy" }, + { IDS_MOVE , L"Move" }, + { IDS_COPY_TO , L"Copy to:" }, + { IDS_MOVE_TO , L"Move to:" }, + { IDS_COPYING , L"Copying..." }, + { IDS_MOVING , L"Moving..." }, + { IDS_CANNOT_COPY , L"You cannot move or copy items for such folders." }, + { IDS_SPLITTING , L"Splitting..." }, + { IDS_SPLIT_CONFIRM_TITLE , L"Confirm Splitting" }, + { IDS_SPLIT_CONFIRM_MESSAGE , L"Are you sure you want to split file into {0} volumes?" }, + { IDS_SPLIT_VOL_MUST_BE_SMALLER , L"Volume size must be smaller than size of original file" }, + + { IDS_COMBINE , L"Combine Files" }, + { IDS_COMBINE_TO , L"&Combine to:" }, + { IDS_COMBINING , L"Combining..." }, + { IDS_COMBINE_SELECT_ONE_FILE , L"Select only first file" }, + + { IDS_CHECKSUM_CALCULATING , L"Checksum calculating..." }, + { IDS_CHECKSUM_INFORMATION , L"Checksum information" }, + { IDS_CHECKSUM_CRC_DATA , L"CRC checksum for data:" }, + { IDS_CHECKSUM_CRC_DATA_NAMES , L"CRC checksum for data and names:" }, + + { IDS_SCANNING , L"Scanning..." }, + + { IDS_PROPERTIES , L"Properties" }, + + { IDS_OPERATION_IS_NOT_SUPPORTED , L"Operation is not supported." }, + + { IDS_CONFIRM_FILE_DELETE , L"Confirm File Delete" }, + { IDS_CONFIRM_FOLDER_DELETE , L"Confirm Folder Delete" }, + { IDS_CONFIRM_ITEMS_DELETE , L"Confirm Multiple File Delete" }, + { IDS_WANT_TO_DELETE_FILE , L"Are you sure you want to delete '{0}'?" }, + { IDS_WANT_TO_DELETE_FOLDER , L"Are you sure you want to delete the folder '{0}' and all its contents?" }, + { IDS_WANT_TO_DELETE_ITEMS , L"Are you sure you want to delete these {0} items?" }, + { IDS_DELETING , L"Deleting..." }, + { IDS_ERROR_DELETING , L"Error Deleting File or Folder" }, + { IDS_RENAMING , L"Renaming..." }, + { IDS_ERROR_RENAMING , L"Error Renaming File or Folder" }, + { IDS_CONFIRM_FILE_COPY , L"Confirm File Copy" }, + { IDS_WANT_TO_COPY_FILES , L"Are you sure you want to copy files to archive" }, + + { IDS_CREATE_FOLDER , L"Create Folder" }, + { IDS_CREATE_FOLDER_NAME , L"Folder name:" }, + { IDS_CREATE_FOLDER_DEFAULT_NAME , L"New Folder" }, + { IDS_CREATE_FOLDER_ERROR , L"Error Creating Folder" }, + { IDS_CREATE_FILE , L"Create File" }, + { IDS_CREATE_FILE_NAME , L"File Name:" }, + { IDS_CREATE_FILE_DEFAULT_NAME , L"New File" }, + { IDS_CREATE_FILE_ERROR , L"Error Creating File" }, + { IDS_SELECT , L"Select" }, + { IDS_DESELECT , L"Deselect" }, + { IDS_SELECT_MASK , L"Mask:" }, + { IDS_FOLDERS_HISTORY , L"Folders History" }, + { IDS_N_SELECTED_ITEMS , L"{0} object(s) selected" }, + { IDS_FILES_COLON , L"Files:" }, + { IDS_FOLDERS_COLON , L"Folders:" }, + { IDS_SIZE_COLON , L"Size:" }, + + { IDS_PROP_TOTAL_SIZE , L"Total Size" }, + { IDS_PROP_FREE_SPACE , L"Free Space" }, + { IDS_PROP_CLUSTER_SIZE , L"Cluster Size" }, + { IDS_PROP_VOLUME_NAME , L"Label" }, + { IDS_PROP_LOCAL_NAME , L"Local Name" }, + { IDS_PROP_PROVIDER , L"Provider" }, + { IDS_OPTIONS , L"Options" }, + { IDS_COMMENT , L"Comment" }, + { IDS_COMMENT2 , L"&Comment:" }, + { IDS_SYSTEM , L"System" }, + { IDS_TOO_MANY_ITEMS , L"Too many items" }, + { IDS_WANT_UPDATE_MODIFIED_FILE , L"File '{0}' was modified.\nDo you want to update it in the archive?" }, + { IDS_CANNOT_UPDATE_FILE , L"Can not update file\n'{0}'" }, + { IDS_CANNOT_START_EDITOR , L"Cannot start editor." }, + { IDS_OPENNING , L"Opening..." }, + { IDS_ADD , L"Add" }, + { IDS_EXTRACT , L"Extract" }, + { IDS_TEST , L"Test" }, + { IDS_BUTTON_COPY , L"Copy" }, + { IDS_BUTTON_MOVE , L"Move" }, + { IDS_BUTTON_DELETE , L"Delete" }, + { IDS_BUTTON_INFO , L"Info" }, + { IDS_BOOKMARK , L"Bookmark" }, + { IDS_COMPUTER , L"Computer" }, + { IDS_NETWORK , L"Network" }, + + { IDS_PROGRESS_TESTING , L"Testing" }, + { IDS_MESSAGE_NO_ERRORS , L"There are no errors" }, + + /* PropertyName.rc */ + /*******************/ + { IDS_PROP_PATH , L"Path" }, + { IDS_PROP_NAME , L"Name" }, + { IDS_PROP_EXTENSION , L"Extension" }, + { IDS_PROP_IS_FOLDER , L"Folder" }, + { IDS_PROP_SIZE , L"Size" }, + { IDS_PROP_PACKED_SIZE , L"Packed Size" }, + { IDS_PROP_ATTRIBUTES , L"Attributes" }, + { IDS_PROP_CTIME , L"Created" }, + { IDS_PROP_ATIME , L"Accessed" }, + { IDS_PROP_MTIME , L"Modified" }, + { IDS_PROP_SOLID , L"Solid" }, + { IDS_PROP_C0MMENTED , L"Commented" }, + { IDS_PROP_ENCRYPTED , L"Encrypted" }, + { IDS_PROP_DICTIONARY_SIZE , L"Dictionary Size" }, + { IDS_PROP_SPLIT_BEFORE , L"Split Before" }, + { IDS_PROP_SPLIT_AFTER , L"Split After" }, + { IDS_PROP_CRC , L"CRC" }, + { IDS_PROP_FILE_TYPE , L"Type" }, + { IDS_PROP_ANTI , L"Anti" }, + { IDS_PROP_METHOD , L"Method" }, + { IDS_PROP_HOST_OS , L"Host OS" }, + { IDS_PROP_FILE_SYSTEM , L"File System" }, + { IDS_PROP_USER , L"User" }, + { IDS_PROP_GROUP , L"Group" }, + { IDS_PROP_BLOCK , L"Block" }, + { IDS_PROP_COMMENT , L"Comment" }, + { IDS_PROP_POSITION , L"Position" }, + { IDS_PROP_PREFIX , L"Path Prefix" }, + { IDS_PROP_FOLDERS , L"Folders" }, + { IDS_PROP_FILES , L"Files" }, + { IDS_PROP_VERSION , L"Version" }, + { IDS_PROP_VOLUME , L"Volume" }, + { IDS_PROP_IS_VOLUME , L"Multivolume" }, + { IDS_PROP_OFFSET , L"Offset" }, + { IDS_PROP_LINKS , L"Links" }, + { IDS_PROP_NUM_BLOCKS , L"Blocks" }, + { IDS_PROP_NUM_VOLUMES , L"Volumes" }, + + { IDS_PROP_BIT64 , L"64-bit" }, + { IDS_PROP_BIG_ENDIAN , L"Big-endian" }, + { IDS_PROP_CPU , L"CPU" }, + { IDS_PROP_PHY_SIZE , L"Physical Size" }, + { IDS_PROP_HEADERS_SIZE , L"Headers Size" }, + { IDS_PROP_CHECKSUM , L"Checksum" }, + { IDS_PROP_CHARACTS , L"Characteristics" }, + { IDS_PROP_VA , L"Virtual Address" }, + { IDS_PROP_ID , L"ID" }, + { IDS_PROP_SHORT_NAME , L"Short Name" }, + { IDS_PROP_CREATOR_APP , L"Creator Application" }, + { IDS_PROP_SECTOR_SIZE , L"Sector Size" }, + { IDS_PROP_POSIX_ATTRIB , L"Mode" }, + { IDS_PROP_LINK , L"Link" }, + { IDS_PROP_ERROR , L"Error" }, + + + { 0 , 0 } +}; + +REGISTER_STRINGTABLE(g_stringTable) + +///////////////////////////////////////////////////// + +#include "res/ParentFolder.h" + + SevenZipPanel::SevenZipPanel(MyFrame *frame, wxWindow *parent,int id,int panelIndex) : + wxPanel(parent,id) , m_frame(frame), _wList(0) + { + _panelIndex = panelIndex; + + int _baseID = id; // FIXME + int _listID = _baseID + 1; + int _comboBoxID = _baseID + 3; + int _statusBarID = _comboBoxID + 1; + int kParentFolderID = 100; // FIXME Panel.h + + + ///Sizer for adding the controls created by users + wxBoxSizer* pMainSizer = new wxBoxSizer(wxVERTICAL); + int sizes[] = {150, 250, 350, -1}; + wxArrayString pathArray; + wxBoxSizer *pPathSizer = new wxBoxSizer(wxHORIZONTAL); + m_pBmpButtonParentFolder = new wxBitmapButton(this, kParentFolderID, wxGetBitmapFromMemory(PARENT_FOLDER), wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW); + m_pComboBoxPath = new wxComboBox(this, _comboBoxID, wxEmptyString, wxDefaultPosition, wxSize(300,-1), pathArray, wxCB_DROPDOWN | wxCB_SORT ); + pPathSizer->Add(m_pBmpButtonParentFolder, 0, wxALL|wxEXPAND, 0); + pPathSizer->Add(m_pComboBoxPath, 1, wxALL|wxEXPAND, 5); + + m_pListCtrlExplorer = new CExplorerListCtrl(this,_listID,wxDefaultPosition, wxSize(300,300), + wxLC_REPORT | // wxLC_EDIT_LABELS | FIXME + wxSUNKEN_BORDER); + + printf("DEBUG : new CExplorerListCtrl(id=%d) => %p\n",_listID,m_pListCtrlExplorer); + + m_pStatusBar = new wxStatusBar(this, _statusBarID); + m_pStatusBar->SetFieldsCount(4, sizes); + pMainSizer->Add(pPathSizer, 0, wxALL|wxEXPAND, 0); + pMainSizer->Add(m_pListCtrlExplorer, 1, wxALL|wxEXPAND, 0); + pMainSizer->Add(m_pStatusBar, 0, wxALL|wxEXPAND, 0); + SetSizer(pMainSizer); + SetAutoLayout (true); + Layout(); + + + // m_pListCtrlExplorer->SetDropTarget(new DnDFile(this)); + + } + + void SevenZipPanel::OnAnyButton( wxCommandEvent &event ) + { + count++; + + int id = event.GetId(); + + wxString msg = wxString::Format(_T("P %d : button %d \n"), count,id); + + WriteText(msg); + + _wList->OnMessage(WM_COMMAND , id , 0); + } + + void SevenZipPanel::OnSelected(wxListEvent& event) + { + const wxListItem & item = event.GetItem(); + count++; + + wxString msg = wxString::Format(_T("P %d : OnSelected %d \n"), count,event.GetId()); + + WriteText(msg); + + NMLISTVIEW info; + info.hdr.hwndFrom = m_pListCtrlExplorer; + info.hdr.code = LVN_ITEMCHANGED; + info.uOldState = 0; + info.uNewState = LVIS_SELECTED; + info.lParam = item.GetData(); // event.GetIndex(); // FIXME ? event.GetData(); + _wList->OnMessage(WM_NOTIFY , event.GetId() , (LPARAM)&info); + /* + if ( GetWindowStyle() & wxLC_REPORT ) + { + wxListItem info; + info.m_itemId = event.m_itemIndex; + info.m_col = 1; + info.m_mask = wxLIST_MASK_TEXT; + if ( GetItem(info) ) + { + wxLogMessage(wxT("Value of the 2nd field of the selected item: %s"), + info.m_text.c_str()); + } + else + { + wxFAIL_MSG(wxT("wxListCtrl::GetItem() failed")); + } + } + */ + } + + + + void SevenZipPanel::OnDeselected(wxListEvent& event) + { + const wxListItem & item = event.GetItem(); + count++; + wxString msg = wxString::Format(_T("P %d : OnDeselected %d \n"), count,event.GetId()); + WriteText(msg); + + NMLISTVIEW info; + info.hdr.hwndFrom = m_pListCtrlExplorer; + info.hdr.code = LVN_ITEMCHANGED; + info.uOldState = LVIS_SELECTED; + info.uNewState = 0; + info.lParam = item.GetData(); // event.GetIndex(); // FIXME ? event.GetData(); + _wList->OnMessage(WM_NOTIFY , event.GetId() , (LPARAM)&info); + } + + void SevenZipPanel::OnColumnClick(wxListEvent& event) + { + count++; + wxString msg = wxString::Format(_T("P %d : OnColumnClick %d col=%d\n"), count,event.GetId(),event.GetColumn()); + WriteText(msg); + + NMLISTVIEW info; + info.hdr.hwndFrom = m_pListCtrlExplorer; + info.hdr.code = LVN_COLUMNCLICK; + info.iSubItem = event.GetColumn(); + _wList->OnMessage(WM_NOTIFY , event.GetId() , (LPARAM)&info); + + } + + + void SevenZipPanel::OnActivated(wxListEvent& event) + { + count++; + + int ind = event.GetIndex(); + + NMHDR info; + info.hwndFrom = m_pListCtrlExplorer; + info.code = NM_DBLCLK; + _wList->OnMessage(WM_NOTIFY , event.GetId() , (LPARAM)&info); + + /* + if ((ind >= 0) && ( ind < m_nbDirs)) + { + wxString msg = wxString::Format(_T("P %d : OnActivated %d : DIR = %d\n"), count,event.GetId(),ind); + WriteText(msg); + + wxString name = m_pListCtrlExplorer->GetItemText(ind); + + wxFileName filename (m_currentDirectory,name); + BinPath(filename.GetFullPath()); + + } + else + */ + { + wxString msg = wxString::Format(_T("P %d : OnActivated %d : FILE = %d\n"), count,event.GetId(),ind); + WriteText(msg); + } + } + + void SevenZipPanel::OnFocused(wxListEvent& event) + { + count++; + + wxString msg = wxString::Format(_T("P %d : OnFocused %d \n"), count,event.GetId()); + + WriteText(msg); + + event.Skip(); + } + + void SevenZipPanel::OnLeftDownBeginDrag(wxListEvent& event) + { + count++; + + wxString msg = wxString::Format(_T("P %d : OnLeftDownBeginDrag %d \n"), count,event.GetId()); + WriteText(msg); + +#if 0 + if ( m_pListCtrlExplorer->GetSelectedItemCount() < 1) return ; + + // start drag operation + wxFileDataObject filesData; + + + long item = -1; + for ( ;; ) + { + item = m_pListCtrlExplorer->GetNextItem(item, + wxLIST_NEXT_ALL, + wxLIST_STATE_SELECTED); + if ( item == -1 ) + break; + + // this item is selected - do whatever is needed with it + // wxLogMessage("Item %ld is selected.", item); + wxString file = m_currentDirectory + _T("/") + m_pListCtrlExplorer->GetItemText(item); + + filesData.AddFile(file); + + } + + msg = wxString::Format(_T("P %d : wxDropSource %d \n"), count,event.GetId()); + WriteText(msg); + + wxDropSource source(filesData, this, + wxDROP_ICON(dnd_copy), + wxDROP_ICON(dnd_move), + wxDROP_ICON(dnd_none)); + + int flags = 0; + /* + if ( m_moveByDefault ) + flags |= wxDrag_DefaultMove; + else if ( m_moveAllow ) + flags |= wxDrag_AllowMove; + */ + flags |= wxDrag_AllowMove; + + msg = wxString::Format(_T("P %d : DoDragDrop %d \n"), count,event.GetId()); + WriteText(msg); + + + wxDragResult result = source.DoDragDrop(flags); + + + const wxChar *pc; + switch ( result ) + { + case wxDragError: pc = _T("Error!"); break; + case wxDragNone: pc = _T("Nothing"); break; + case wxDragCopy: pc = _T("Copied"); break; + case wxDragMove: pc = _T("Moved"); break; + case wxDragCancel: pc = _T("Cancelled"); break; + default: pc = _T("Huh?"); break; + } + + WriteText(wxString(_T(" Drag result: ")) + pc); +#endif + } + +void SevenZipPanel::OnLeftDown(wxMouseEvent &WXUNUSED(event) ) +{ + WriteText(_T("OnLeftDown")); +#if 0 + if ( !m_strText.empty() ) + { + // start drag operation + wxTextDataObject textData(m_strText); + wxDropSource source(textData, this, + wxDROP_ICON(dnd_copy), + wxDROP_ICON(dnd_move), + wxDROP_ICON(dnd_none)); + + int flags = 0; + if ( m_moveByDefault ) + flags |= wxDrag_DefaultMove; + else if ( m_moveAllow ) + flags |= wxDrag_AllowMove; + + wxDragResult result = source.DoDragDrop(flags); + +#if wxUSE_STATUSBAR + const wxChar *pc; + switch ( result ) + { + case wxDragError: pc = _T("Error!"); break; + case wxDragNone: pc = _T("Nothing"); break; + case wxDragCopy: pc = _T("Copied"); break; + case wxDragMove: pc = _T("Moved"); break; + case wxDragCancel: pc = _T("Cancelled"); break; + default: pc = _T("Huh?"); break; + } + + SetStatusText(wxString(_T("Drag result: ")) + pc); +#else + wxUnusedVar(result); +#endif // wxUSE_STATUSBAR + } +#endif // wxUSE_DRAG_AND_DROP +} + +void SevenZipPanel::OnRightClick(wxListEvent& event) +{ + wxPoint point = event.GetPoint(); + + WriteText(_T("OnRightClick")); + wxMenu menu; // (_T("Dnd sample menu")); + + menu.Append(wxID_ANY, _T("&Test drag...")); + menu.AppendSeparator(); + menu.Append(wxID_ANY, _T("item1")); + menu.Append(wxID_ANY, _T("item2")); + menu.Append(wxID_ANY, _T("item3")); + menu.Append(wxID_ANY, _T("&About")); + + PopupMenu( &menu, point.x, point.y ); +} + +void SevenZipPanel::OnTextEnter(wxCommandEvent& event) +{ + count++; + + NMCBEENDEDITW info; + info.hdr.hwndFrom = m_pComboBoxPath; + info.hdr.code = CBEN_ENDEDITW; + info.iWhy = CBENF_RETURN; + + _wList->OnMessage(WM_NOTIFY , event.GetId() , (LPARAM)&info); + + { + wxString msg = wxString::Format(_T("P %d : OnTextEnter %d\n"), count,event.GetId()); + WriteText(msg); + } +} + +int SevenZipPanel::count = 0; + +BEGIN_EVENT_TABLE(SevenZipPanel, wxPanel) +// EVT_MENU(wxID_ANY, SevenZipPanel::OnAnyMenu) +// EVT_LISTBOX (wxID_ANY, MyPanel::OnListBox) +// EVT_LISTBOX_DCLICK(wxID_ANY, MyPanel::OnAnyListBoxDoubleClick) +EVT_BUTTON (wxID_ANY, SevenZipPanel::OnAnyButton) + + // EVT_CLOSE(SevenZipPanel::OnCloseWindow) + +///////////////// +EVT_LIST_ITEM_SELECTED(wxID_ANY, SevenZipPanel::OnSelected) +EVT_LIST_ITEM_DESELECTED(wxID_ANY, SevenZipPanel::OnDeselected) +EVT_LIST_ITEM_ACTIVATED(wxID_ANY, SevenZipPanel::OnActivated) +EVT_LIST_ITEM_FOCUSED(wxID_ANY, SevenZipPanel::OnFocused) + +EVT_LIST_BEGIN_DRAG(wxID_ANY, SevenZipPanel::OnLeftDownBeginDrag) +// FIXME - add for menu on item - EVT_LIST_ITEM_RIGHT_CLICK(wxID_ANY, SevenZipPanel::OnRightClick) + +EVT_LIST_COL_CLICK(wxID_ANY, SevenZipPanel::OnColumnClick) + + +EVT_TEXT_ENTER(wxID_ANY, SevenZipPanel::OnTextEnter) // FIXME - not called + + +END_EVENT_TABLE() + + + +void appClose(void) +{ + g_window->Close(true); +} diff --git a/CPP/7zip/UI/FileManager/FSDrives.cpp b/CPP/7zip/UI/FileManager/FSDrives.cpp new file mode 100644 index 0000000..9816076 --- /dev/null +++ b/CPP/7zip/UI/FileManager/FSDrives.cpp @@ -0,0 +1,456 @@ +// FSDrives.cpp + +#include "StdAfx.h" + +#include "../../../../C/Alloc.h" + +#include "Common/ComTry.h" +#include "Common/StringConvert.h" + +#include "Windows/Defs.h" +#include "Windows/FileDir.h" +#include "Windows/FileIO.h" +// FIXME #include "Windows/FileSystem.h" +#include "Windows/PropVariant.h" + +#include "../../PropID.h" + +#include "FSDrives.h" +#include "FSFolder.h" +#include "LangUtils.h" +#include "SysIconUtils.h" + +#include "resource.h" + +using namespace NWindows; +using namespace NFile; +using namespace NFind; + +static const wchar_t *kVolPrefix = L"\\\\.\\"; + +UString CDriveInfo::GetDeviceFileIoName() const +{ + return kVolPrefix + Name; +} + +struct CPhysTempBuffer +{ + void *buffer; + CPhysTempBuffer(): buffer(0) {} + ~CPhysTempBuffer() { MidFree(buffer); } +}; + +static HRESULT CopyFileSpec(LPCWSTR fromPath, LPCWSTR toPath, bool writeToDisk, UInt64 fileSize, + UInt32 bufferSize, UInt64 progressStart, IProgress *progress) +{ + NFile::NIO::CInFile inFile; + if (!inFile.Open(fromPath)) + return GetLastError(); + if (fileSize == (UInt64)(Int64)-1) + { + if (!inFile.GetLength(fileSize)) + ::GetLastError(); + } + NFile::NIO::COutFile outFile; + if (writeToDisk) + { + if (!outFile.Open(toPath, FILE_SHARE_WRITE, OPEN_EXISTING, 0)) + return GetLastError(); + } + else + if (!outFile.Create(toPath, true)) + return GetLastError(); + CPhysTempBuffer tempBuffer; + tempBuffer.buffer = MidAlloc(bufferSize); + if (tempBuffer.buffer == 0) + return E_OUTOFMEMORY; + + for (UInt64 pos = 0; pos < fileSize;) + { + UInt64 progressCur = progressStart + pos; + RINOK(progress->SetCompleted(&progressCur)); + UInt64 rem = fileSize - pos; + UInt32 curSize = (UInt32)MyMin(rem, (UInt64)bufferSize); + UInt32 processedSize; + if (!inFile.Read(tempBuffer.buffer, curSize, processedSize)) + return GetLastError(); + if (processedSize == 0) + break; + curSize = processedSize; + if (writeToDisk) + { + const UInt32 kMask = 0x1FF; + curSize = (curSize + kMask) & ~kMask; + if (curSize > bufferSize) + return E_FAIL; + } + + if (!outFile.Write(tempBuffer.buffer, curSize, processedSize)) + return GetLastError(); + if (curSize != processedSize) + return E_FAIL; + pos += curSize; + } + return S_OK; +} + +static const STATPROPSTG kProps[] = +{ + { NULL, kpidName, VT_BSTR}, + { NULL, kpidTotalSize, VT_UI8}, + { NULL, kpidFreeSpace, VT_UI8}, + { NULL, kpidType, VT_BSTR}, + { NULL, kpidVolumeName, VT_BSTR}, + { NULL, kpidFileSystem, VT_BSTR}, + { NULL, kpidClusterSize, VT_UI8} +}; + +static const char *kDriveTypes[] = +{ + "Unknown", + "No Root Dir", + "Removable", + "Fixed", + "Remote", + "CD-ROM", + "RAM disk" +}; + +STDMETHODIMP CFSDrives::LoadItems() +{ + _drives.Clear(); +#ifdef _WIN32 + UStringVector driveStrings; + MyGetLogicalDriveStrings(driveStrings); + for (int i = 0; i < driveStrings.Size(); i++) + { + CDriveInfo di; + + const UString &driveName = driveStrings[i]; + + di.FullSystemName = driveName; + + di.Name = di.FullSystemName.Left(di.FullSystemName.Length() - 1); + di.ClusterSize = 0; + di.DriveSize = 0; + di.FreeSpace = 0; + di.DriveType = NFile::NSystem::MyGetDriveType(driveName); + bool needRead = true; + if (di.DriveType == DRIVE_CDROM || di.DriveType == DRIVE_REMOVABLE) + { + /* + DWORD dwSerialNumber;` + if (!::GetVolumeInformation(di.FullSystemName, + NULL, 0, &dwSerialNumber, NULL, NULL, NULL, 0)) + */ + di.KnownSizes = false; + { + needRead = false; + } + } + if (needRead) + { + UString volumeName, fileSystemName; + DWORD volumeSerialNumber, maximumComponentLength, fileSystemFlags; + NFile::NSystem::MyGetVolumeInformation(driveName, + volumeName, + &volumeSerialNumber, &maximumComponentLength, &fileSystemFlags, + fileSystemName); + di.VolumeName = volumeName; + di.FileSystemName = fileSystemName; + + NFile::NSystem::MyGetDiskFreeSpace(driveName, + di.ClusterSize, di.DriveSize, di.FreeSpace); + di.KnownSizes = true; + } + _drives.Add(di); + } +#else + CDriveInfo di; + // Root + di.FullSystemName = L"/"; + di.VolumeName = L"/"; + di.FileSystemName = L"img"; + di.Name = L"/"; // di.FullSystemName.Left(di.FullSystemName.Length() - 1); + di.ClusterSize = 0; + di.DriveSize = 0; + di.FreeSpace = 0; + di.DriveType = 0; // FIXME NFile::NSystem::MyGetDriveType(driveName); + di.KnownSizes = false; + _drives.Add(di); + + // Home Directory + const char * home = getenv("HOME"); + if (home) { + UString ustr = GetUnicodeString(home); + di.FullSystemName = ustr + L"/"; + di.VolumeName = ustr; + di.FileSystemName = L"img"; + di.Name = ustr; + _drives.Add(di); + } +#endif + return S_OK; +} + +STDMETHODIMP CFSDrives::GetNumberOfItems(UInt32 *numItems) +{ + *numItems = _drives.Size(); + return S_OK; +} + +STDMETHODIMP CFSDrives::GetProperty(UInt32 itemIndex, PROPID propID, PROPVARIANT *value) +{ + if (itemIndex >= (UInt32)_drives.Size()) + return E_INVALIDARG; + NCOM::CPropVariant prop; + const CDriveInfo &di = _drives[itemIndex]; + switch(propID) + { + case kpidIsDir: prop = !_volumeMode; break; + case kpidName: prop = di.Name; break; + case kpidTotalSize: if (di.KnownSizes) prop = di.DriveSize; break; + case kpidFreeSpace: if (di.KnownSizes) prop = di.FreeSpace; break; + case kpidClusterSize: if (di.KnownSizes) prop = di.ClusterSize; break; + case kpidType: + if (di.DriveType < sizeof(kDriveTypes) / sizeof(kDriveTypes[0])) + prop = kDriveTypes[di.DriveType]; + break; + case kpidVolumeName: prop = di.VolumeName; break; + case kpidFileSystem: prop = di.FileSystemName; break; + } + prop.Detach(value); + return S_OK; +} + +HRESULT CFSDrives::BindToFolderSpec(const wchar_t *name, IFolderFolder **resultFolder) +{ + *resultFolder = 0; + if (_volumeMode) + return S_OK; + NFsFolder::CFSFolder *fsFolderSpec = new NFsFolder::CFSFolder; + CMyComPtr subFolder = fsFolderSpec; + RINOK(fsFolderSpec->Init(name, 0)); + *resultFolder = subFolder.Detach(); + return S_OK; +} + +STDMETHODIMP CFSDrives::BindToFolder(UInt32 index, IFolderFolder **resultFolder) +{ + *resultFolder = 0; + if (index >= (UInt32)_drives.Size()) + return E_INVALIDARG; + const CDriveInfo &di = _drives[index]; + /* + if (_volumeMode) + { + *resultFolder = 0; + CPhysDriveFolder *folderSpec = new CPhysDriveFolder; + CMyComPtr subFolder = folderSpec; + RINOK(folderSpec->Init(di.Name)); + *resultFolder = subFolder.Detach(); + return S_OK; + } + */ + return BindToFolderSpec(di.FullSystemName, resultFolder); +} + +STDMETHODIMP CFSDrives::BindToFolder(const wchar_t *name, IFolderFolder **resultFolder) +{ + return BindToFolderSpec(name, resultFolder); +} + +STDMETHODIMP CFSDrives::BindToParentFolder(IFolderFolder **resultFolder) +{ + *resultFolder = 0; + return S_OK; +} + +IMP_IFolderFolder_Props(CFSDrives) + +STDMETHODIMP CFSDrives::GetFolderProperty(PROPID propID, PROPVARIANT *value) +{ + COM_TRY_BEGIN + NWindows::NCOM::CPropVariant prop; + switch(propID) + { + case kpidType: prop = L"FSDrives"; break; + case kpidPath: + if (_volumeMode) + prop = kVolPrefix; + else + prop = LangString(IDS_COMPUTER, 0x03020300) + UString(WCHAR_PATH_SEPARATOR); + break; + } + prop.Detach(value); + return S_OK; + COM_TRY_END +} + + +STDMETHODIMP CFSDrives::GetSystemIconIndex(UInt32 index, Int32 *iconIndex) +{ + *iconIndex = 0; + const CDriveInfo &di = _drives[index]; + int iconIndexTemp; + if (GetRealIconIndex(di.FullSystemName, 0, iconIndexTemp) != 0) + { + *iconIndex = iconIndexTemp; + return S_OK; + } + return GetLastError(); +} + +UString CFSDrives::GetExt(int index) const +{ + const wchar_t *ext = NULL; +#ifdef _WIN32 + const CDriveInfo &di = _drives[index]; + if (di.DriveType == DRIVE_CDROM) + ext = L"iso"; + else if (di.FileSystemName.Find(L"NTFS") >= 0) + ext = L"ntfs"; + else if (di.FileSystemName.Find(L"FAT") >= 0) + ext = L"fat"; + else +#endif + ext = L"img"; + return (UString)L'.' + ext; +} + +HRESULT CFSDrives::GetLength(int index, UInt64 &length) const +{ +#ifdef _WIN32 + NFile::NIO::CInFile inFile; + if (!inFile.Open(_drives[index].GetDeviceFileIoName())) + return GetLastError(); + if (!inFile.LengthDefined) + return E_FAIL; + length = inFile.Length; +#else + length = 0; +#endif + return S_OK; +} + +STDMETHODIMP CFSDrives::CopyTo(const UInt32 *indices, UInt32 numItems, + const wchar_t *path, IFolderOperationsExtractCallback *callback) +{ + if (numItems == 0) + return S_OK; + + if (!_volumeMode) + return E_NOTIMPL; + + UInt64 totalSize = 0; + UInt32 i; + for (i = 0; i < numItems; i++) + { + const CDriveInfo &di = _drives[indices[i]]; + if (di.KnownSizes) + totalSize += di.DriveSize; + } + RINOK(callback->SetTotal(totalSize)); + RINOK(callback->SetNumFiles(numItems)); + + UString destPath = path; + if (destPath.IsEmpty()) + return E_INVALIDARG; + bool directName = (destPath[destPath.Length() - 1] != WCHAR_PATH_SEPARATOR); + if (directName) + { + if (numItems > 1) + return E_INVALIDARG; + } + + UInt64 completedSize = 0; + RINOK(callback->SetCompleted(&completedSize)); + for (i = 0; i < numItems; i++) + { + int index = indices[i]; + const CDriveInfo &di = _drives[index]; + UString destPath2 = destPath; + UString name = di.Name; + if (!directName) + { + UString destName = name; + if (!destName.IsEmpty() && destName[destName.Length() - 1] == L':') + { + destName.Delete(destName.Length() - 1); + destName += GetExt(index); + } + destPath2 += destName; + } + UString srcPath = di.GetDeviceFileIoName(); + + UInt64 fileSize = 0; + if (GetLength(index, fileSize) != S_OK) + { + return E_FAIL; + } + if (!di.KnownSizes) + totalSize += fileSize; + RINOK(callback->SetTotal(totalSize)); + + Int32 writeAskResult; + CMyComBSTR destPathResult; + RINOK(callback->AskWrite(srcPath, BoolToInt(false), NULL, &fileSize, + destPath2, &destPathResult, &writeAskResult)); + if (!IntToBool(writeAskResult)) + continue; + + RINOK(callback->SetCurrentFilePath(srcPath)); + + static const UInt32 kBufferSize = (4 << 20); +#ifdef _WIN32 + UInt32 bufferSize = (di.DriveType == DRIVE_REMOVABLE) ? (18 << 10) * 4 : kBufferSize; +#else + UInt32 bufferSize = kBufferSize; +#endif + + RINOK(CopyFileSpec(srcPath, destPathResult, false, fileSize, bufferSize, completedSize, callback)); + completedSize += fileSize; + } + return S_OK; +} + +STDMETHODIMP CFSDrives::MoveTo( + const UInt32 * /* indices */, + UInt32 /* numItems */, + const wchar_t * /* path */, + IFolderOperationsExtractCallback * /* callback */) +{ + return E_NOTIMPL; +} + +STDMETHODIMP CFSDrives::CopyFrom(const wchar_t * /* fromFolderPath */, + const wchar_t ** /* itemsPaths */, UInt32 /* numItems */, IProgress * /* progress */) +{ + return E_NOTIMPL; +} + +STDMETHODIMP CFSDrives::CreateFolder(const wchar_t * /* name */, IProgress * /* progress */) +{ + return E_NOTIMPL; +} + +STDMETHODIMP CFSDrives::CreateFile(const wchar_t * /* name */, IProgress * /* progress */) +{ + return E_NOTIMPL; +} + +STDMETHODIMP CFSDrives::Rename(UInt32 /* index */, const wchar_t * /* newName */, IProgress * /* progress */) +{ + return E_NOTIMPL; +} + +STDMETHODIMP CFSDrives::Delete(const UInt32 * /* indices */, UInt32 /* numItems */, IProgress * /* progress */) +{ + return E_NOTIMPL; +} + +STDMETHODIMP CFSDrives::SetProperty(UInt32 /* index */, PROPID /* propID */, + const PROPVARIANT * /* value */, IProgress * /* progress */) +{ + return E_NOTIMPL; +} diff --git a/CPP/7zip/UI/FileManager/FSDrives.h b/CPP/7zip/UI/FileManager/FSDrives.h new file mode 100644 index 0000000..fc99bce --- /dev/null +++ b/CPP/7zip/UI/FileManager/FSDrives.h @@ -0,0 +1,53 @@ +// FSDrives.h + +#ifndef __FS_DRIVES_H +#define __FS_DRIVES_H + +#include "Common/MyCom.h" +#include "Common/MyString.h" + +#include "IFolder.h" + +struct CDriveInfo +{ + UString Name; + UString FullSystemName; + bool KnownSizes; + UInt64 DriveSize; + UInt64 FreeSpace; + UInt64 ClusterSize; + // UString Type; + UString VolumeName; + UString FileSystemName; + UINT DriveType; + + UString GetDeviceFileIoName() const; +}; + +class CFSDrives: + public IFolderFolder, + public IFolderOperations, + public IFolderGetSystemIconIndex, + public CMyUnknownImp +{ + CObjectVector _drives; + bool _volumeMode; + + HRESULT BindToFolderSpec(const wchar_t *name, IFolderFolder **resultFolder); + UString GetExt(int index) const; + HRESULT GetLength(int index, UInt64 &length) const; +public: + MY_UNKNOWN_IMP2(IFolderGetSystemIconIndex, IFolderOperations) + + INTERFACE_FolderFolder(;) + INTERFACE_FolderOperations(;) + + STDMETHOD(GetSystemIconIndex)(UInt32 index, Int32 *iconIndex); + + void Init(bool volMode = false) + { + _volumeMode = volMode; + } +}; + +#endif diff --git a/CPP/7zip/UI/FileManager/FSFolder.cpp b/CPP/7zip/UI/FileManager/FSFolder.cpp new file mode 100644 index 0000000..0773c25 --- /dev/null +++ b/CPP/7zip/UI/FileManager/FSFolder.cpp @@ -0,0 +1,685 @@ +// FSFolder.cpp + +#include "StdAfx.h" + +#include "Common/ComTry.h" +#include "Common/StringConvert.h" +#include "Common/UTFConvert.h" + +#include "Windows/FileDir.h" +#include "Windows/FileIO.h" +#include "Windows/PropVariant.h" + +#include "../../PropID.h" + +#include "FSDrives.h" +#include "FSFolder.h" + +#ifdef _WIN32 +#include "NetFolder.h" +#endif + +#include "SysIconUtils.h" + +namespace NWindows { +namespace NFile { + +bool GetLongPath(LPCWSTR path, UString &longPath); + +}} + +using namespace NWindows; +using namespace NFile; +using namespace NFind; + +namespace NFsFolder { + +static STATPROPSTG kProps[] = +{ + { NULL, kpidName, VT_BSTR}, + { NULL, kpidSize, VT_UI8}, + { NULL, kpidMTime, VT_FILETIME}, + { NULL, kpidCTime, VT_FILETIME}, + { NULL, kpidATime, VT_FILETIME}, + { NULL, kpidAttrib, VT_UI4}, + { NULL, kpidPackSize, VT_UI8}, + { NULL, kpidComment, VT_BSTR}, + { NULL, kpidPrefix, VT_BSTR} +}; + +HRESULT CFSFolder::Init(const UString &path, IFolderFolder *parentFolder) +{ + _parentFolder = parentFolder; + _path = path; + +#ifdef _WIN32 + _findChangeNotification.FindFirst(_path, false, + FILE_NOTIFY_CHANGE_FILE_NAME | + FILE_NOTIFY_CHANGE_DIR_NAME | + FILE_NOTIFY_CHANGE_ATTRIBUTES | + FILE_NOTIFY_CHANGE_SIZE | + FILE_NOTIFY_CHANGE_LAST_WRITE /*| + FILE_NOTIFY_CHANGE_LAST_ACCESS | + FILE_NOTIFY_CHANGE_CREATION | + FILE_NOTIFY_CHANGE_SECURITY */); + if (!_findChangeNotification.IsHandleAllocated()) + { + DWORD lastError = GetLastError(); + CFindFile findFile; + CFileInfoW fi; + if (!findFile.FindFirst(_path + UString(L"*"), fi)) + return lastError; + } +#endif + return S_OK; +} + +HRESULT GetFolderSize(const UString &path, UInt64 &numFolders, UInt64 &numFiles, UInt64 &size, IProgress *progress) +{ + RINOK(progress->SetCompleted(NULL)); + numFiles = numFolders = size = 0; + CEnumeratorW enumerator(path + UString(WSTRING_PATH_SEPARATOR L"*")); + CFileInfoW fi; + while (enumerator.Next(fi)) + { + if (fi.IsDir()) + { + UInt64 subFolders, subFiles, subSize; + RINOK(GetFolderSize(path + UString(WSTRING_PATH_SEPARATOR) + fi.Name, subFolders, subFiles, subSize, progress)); + numFolders += subFolders; + numFolders++; + numFiles += subFiles; + size += subSize; + } + else + { + numFiles++; + size += fi.Size; + } + } + return S_OK; +} + +HRESULT CFSFolder::LoadSubItems(CDirItem &dirItem, const UString &path) +{ + { + CEnumeratorW enumerator(path + L"*"); + CDirItem fi; + while (enumerator.Next(fi)) + { + fi.CompressedSizeIsDefined = false; + /* + if (!GetCompressedFileSize(_path + fi.Name, + fi.CompressedSize)) + fi.CompressedSize = fi.Size; + */ + if (fi.IsDir()) + { + // fi.Size = GetFolderSize(_path + fi.Name); + fi.Size = 0; + } + dirItem.Files.Add(fi); + } + } + if (!_flatMode) + return S_OK; + + for (int i = 0; i < dirItem.Files.Size(); i++) + { + CDirItem &item = dirItem.Files[i]; + if (item.IsDir()) + LoadSubItems(item, path + item.Name + WCHAR_PATH_SEPARATOR); + } + return S_OK; +} + +void CFSFolder::AddRefs(CDirItem &dirItem) +{ + int i; + for (i = 0; i < dirItem.Files.Size(); i++) + { + CDirItem &item = dirItem.Files[i]; + item.Parent = &dirItem; + _refs.Add(&item); + } + if (!_flatMode) + return; + for (i = 0; i < dirItem.Files.Size(); i++) + { + CDirItem &item = dirItem.Files[i]; + if (item.IsDir()) + AddRefs(item); + } +} + +STDMETHODIMP CFSFolder::LoadItems() +{ + // OutputDebugString(TEXT("Start\n")); + Int32 dummy; + WasChanged(&dummy); + Clear(); + RINOK(LoadSubItems(_root, _path)); + AddRefs(_root); + + // OutputDebugString(TEXT("Finish\n")); + _commentsAreLoaded = false; + return S_OK; +} + +static const wchar_t *kDescriptionFileName = L"descript.ion"; + +bool CFSFolder::LoadComments() +{ + if (_commentsAreLoaded) + return true; + _comments.Clear(); + _commentsAreLoaded = true; + NIO::CInFile file; + if (!file.Open(_path + kDescriptionFileName)) + return false; + UInt64 length; + if (!file.GetLength(length)) + return false; + if (length >= (1 << 28)) + return false; + AString s; + char *p = s.GetBuffer((int)((size_t)length + 1)); + UInt32 processedSize; + file.Read(p, (UInt32)length, processedSize); + p[length] = 0; + s.ReleaseBuffer(); + if (processedSize != length) + return false; + file.Close(); + UString unicodeString; + if (!ConvertUTF8ToUnicode(s, unicodeString)) + return false; + return _comments.ReadFromString(unicodeString); +} + +static bool IsAscii(const UString &testString) +{ + for (int i = 0; i < testString.Length(); i++) + if (testString[i] >= 0x80) + return false; + return true; +} + +bool CFSFolder::SaveComments() +{ + NIO::COutFile file; + if (!file.Create(_path + kDescriptionFileName, true)) + return false; + UString unicodeString; + _comments.SaveToString(unicodeString); + AString utfString; + ConvertUnicodeToUTF8(unicodeString, utfString); + UInt32 processedSize; + if (!IsAscii(unicodeString)) + { + Byte bom [] = { 0xEF, 0xBB, 0xBF, 0x0D, 0x0A }; + file.Write(bom , sizeof(bom), processedSize); + } + file.Write(utfString, utfString.Length(), processedSize); + _commentsAreLoaded = false; + return true; +} + +STDMETHODIMP CFSFolder::GetNumberOfItems(UInt32 *numItems) +{ + *numItems = _refs.Size(); + return S_OK; +} + +/* +STDMETHODIMP CFSFolder::GetNumberOfSubFolders(UInt32 *numSubFolders) +{ + UInt32 numSubFoldersLoc = 0; + for (int i = 0; i < _files.Size(); i++) + if (_files[i].IsDir()) + numSubFoldersLoc++; + *numSubFolders = numSubFoldersLoc; + return S_OK; +} +*/ + +#ifdef _WIN32 +static bool MyGetCompressedFileSizeW(LPCWSTR fileName, UInt64 &size) +{ + DWORD highPart; + DWORD lowPart = ::GetCompressedFileSizeW(fileName, &highPart); + if (lowPart == INVALID_FILE_SIZE && ::GetLastError() != NO_ERROR) + { + #ifdef WIN_LONG_PATH + { + UString longPath; + if (GetLongPath(fileName, longPath)) + lowPart = ::GetCompressedFileSizeW(longPath, &highPart); + } + #endif + if (lowPart == INVALID_FILE_SIZE && ::GetLastError() != NO_ERROR) + return false; + } + size = (UInt64(highPart) << 32) | lowPart; + return true; +} +#endif + +STDMETHODIMP CFSFolder::GetProperty(UInt32 itemIndex, PROPID propID, PROPVARIANT *value) +{ + NCOM::CPropVariant prop; + if (itemIndex >= (UInt32)_refs.Size()) + return E_INVALIDARG; + CDirItem &fi = *_refs[itemIndex]; + switch(propID) + { + case kpidIsDir: prop = fi.IsDir(); break; + case kpidName: prop = fi.Name; break; + case kpidSize: if (!fi.IsDir()) prop = fi.Size; break; + case kpidPackSize: + if (!fi.CompressedSizeIsDefined) + { + fi.CompressedSizeIsDefined = true; +#ifdef _WIN32 + if (fi.IsDir () || + !MyGetCompressedFileSizeW(_path + GetRelPath(fi), fi.CompressedSize)) +#endif + fi.CompressedSize = fi.Size; + } + prop = fi.CompressedSize; + break; + case kpidAttrib: prop = (UInt32)fi.Attrib; break; + case kpidCTime: prop = fi.CTime; break; + case kpidATime: prop = fi.ATime; break; + case kpidMTime: prop = fi.MTime; break; + case kpidComment: + { + LoadComments(); + UString comment; + if (_comments.GetValue(GetRelPath(fi), comment)) + prop = comment; + break; + } + case kpidPrefix: + { + if (_flatMode) + prop = GetPrefix(fi); + break; + } + } + prop.Detach(value); + return S_OK; +} + +HRESULT CFSFolder::BindToFolderSpec(const wchar_t *name, IFolderFolder **resultFolder) +{ + *resultFolder = 0; + CFSFolder *folderSpec = new CFSFolder; + CMyComPtr subFolder = folderSpec; + RINOK(folderSpec->Init(_path + name + UString(WCHAR_PATH_SEPARATOR), 0)); + *resultFolder = subFolder.Detach(); + return S_OK; +} + +UString CFSFolder::GetPrefix(const CDirItem &item) const +{ + UString path; + CDirItem *cur = item.Parent; + while (cur->Parent != 0) + { + path = cur->Name + UString(WCHAR_PATH_SEPARATOR) + path; + cur = cur->Parent; + } + return path; +} + +UString CFSFolder::GetRelPath(const CDirItem &item) const +{ + return GetPrefix(item) + item.Name; +} + +STDMETHODIMP CFSFolder::BindToFolder(UInt32 index, IFolderFolder **resultFolder) +{ + *resultFolder = 0; + const CDirItem &fi = *_refs[index]; + if (!fi.IsDir()) + return E_INVALIDARG; + return BindToFolderSpec(GetRelPath(fi), resultFolder); +} + +STDMETHODIMP CFSFolder::BindToFolder(const wchar_t *name, IFolderFolder **resultFolder) +{ + return BindToFolderSpec(name, resultFolder); +} + +STDMETHODIMP CFSFolder::BindToParentFolder(IFolderFolder **resultFolder) +{ + *resultFolder = 0; + if (_parentFolder) + { + CMyComPtr parentFolder = _parentFolder; + *resultFolder = parentFolder.Detach(); + return S_OK; + } + if (_path.IsEmpty()) + return E_INVALIDARG; + printf("CFSFolder::BindToParentFolder path='%ls'\n",(const wchar_t *)_path); + int pos = _path.ReverseFind(WCHAR_PATH_SEPARATOR); + if (pos < 0 || pos != _path.Length() - 1) + return E_FAIL; + UString parentPath = _path.Left(pos); + printf("CFSFolder::BindToParentFolder parentPath='%ls'\n",(const wchar_t *)parentPath); + pos = parentPath.ReverseFind(WCHAR_PATH_SEPARATOR); + if (pos < 0) + { +#ifdef _WIN32 + parentPath.Empty(); + CFSDrives *drivesFolderSpec = new CFSDrives; + CMyComPtr drivesFolder = drivesFolderSpec; + drivesFolderSpec->Init(); + *resultFolder = drivesFolder.Detach(); +#else + parentPath = WSTRING_PATH_SEPARATOR; + CFSFolder *parentFolderSpec = new CFSFolder; + CMyComPtr parentFolder = parentFolderSpec; + printf("CFSFolder::BindToParentFolder Init-0 with parentPath='%ls'\n",(const wchar_t *)parentPath); + RINOK(parentFolderSpec->Init(parentPath, 0)); + *resultFolder = parentFolder.Detach(); +#endif + return S_OK; + } + UString parentPathReduced = parentPath.Left(pos); + parentPath = parentPath.Left(pos + 1); + pos = parentPathReduced.ReverseFind(WCHAR_PATH_SEPARATOR); + if (pos == 1) + { +#ifdef _WIN32 + if (parentPath[0] != WCHAR_PATH_SEPARATOR) + return E_FAIL; + CNetFolder *netFolderSpec = new CNetFolder; + CMyComPtr netFolder = netFolderSpec; + netFolderSpec->Init(parentPath); + *resultFolder = netFolder.Detach(); +#else + parentPath = WSTRING_PATH_SEPARATOR; + CFSFolder *parentFolderSpec = new CFSFolder; + CMyComPtr parentFolder = parentFolderSpec; + printf("CFSFolder::BindToParentFolder Init-1 with parentPath='%ls'\n",(const wchar_t *)parentPath); + RINOK(parentFolderSpec->Init(parentPath, 0)); + *resultFolder = parentFolder.Detach(); +#endif // ifdef _WIN32 + return S_OK; + } + CFSFolder *parentFolderSpec = new CFSFolder; + CMyComPtr parentFolder = parentFolderSpec; + printf("CFSFolder::BindToParentFolder Init-2 with parentPath='%ls'\n",(const wchar_t *)parentPath); + RINOK(parentFolderSpec->Init(parentPath, 0)); + *resultFolder = parentFolder.Detach(); + return S_OK; +} + +STDMETHODIMP CFSFolder::GetNumberOfProperties(UInt32 *numProperties) +{ + *numProperties = sizeof(kProps) / sizeof(kProps[0]); + if (!_flatMode) + (*numProperties)--; + return S_OK; +} + +STDMETHODIMP CFSFolder::GetPropertyInfo IMP_IFolderFolder_GetProp(kProps) + +STDMETHODIMP CFSFolder::GetFolderProperty(PROPID propID, PROPVARIANT *value) +{ + COM_TRY_BEGIN + NWindows::NCOM::CPropVariant prop; + switch(propID) + { + case kpidType: prop = L"FSFolder"; break; + case kpidPath: prop = _path; break; + } + prop.Detach(value); + return S_OK; + COM_TRY_END +} + +STDMETHODIMP CFSFolder::WasChanged(Int32 *wasChanged) +{ + bool wasChangedMain = false; +#ifdef _WIN32 + for (;;) + { + if (!_findChangeNotification.IsHandleAllocated()) + { + *wasChanged = BoolToInt(false); + return S_OK; + } + + DWORD waitResult = ::WaitForSingleObject(_findChangeNotification, 0); + bool wasChangedLoc = (waitResult == WAIT_OBJECT_0); + if (wasChangedLoc) + { + _findChangeNotification.FindNext(); + wasChangedMain = true; + } + else + break; + } +#endif + *wasChanged = BoolToInt(wasChangedMain); + return S_OK; +} + +STDMETHODIMP CFSFolder::Clone(IFolderFolder **resultFolder) +{ + CFSFolder *fsFolderSpec = new CFSFolder; + CMyComPtr folderNew = fsFolderSpec; + fsFolderSpec->Init(_path, 0); + *resultFolder = folderNew.Detach(); + return S_OK; +} + +HRESULT CFSFolder::GetItemsFullSize(const UInt32 *indices, UInt32 numItems, + UInt64 &numFolders, UInt64 &numFiles, UInt64 &size, IProgress *progress) +{ + numFiles = numFolders = size = 0; + UInt32 i; + for (i = 0; i < numItems; i++) + { + int index = indices[i]; + if (index >= _refs.Size()) + return E_INVALIDARG; + const CDirItem &fi = *_refs[index]; + if (fi.IsDir()) + { + UInt64 subFolders, subFiles, subSize; + RINOK(GetFolderSize(_path + GetRelPath(fi), subFolders, subFiles, subSize, progress)); + numFolders += subFolders; + numFolders++; + numFiles += subFiles; + size += subSize; + } + else + { + numFiles++; + size += fi.Size; + } + } + return S_OK; +} + +HRESULT CFSFolder::GetItemFullSize(int index, UInt64 &size, IProgress *progress) +{ + const CDirItem &fi = *_refs[index]; + if (fi.IsDir()) + { + /* + CMyComPtr subFolder; + RINOK(BindToFolder(index, &subFolder)); + CMyComPtr aFolderReload; + subFolder.QueryInterface(&aFolderReload); + aFolderReload->Reload(); + UInt32 numItems; + RINOK(subFolder->GetNumberOfItems(&numItems)); + CMyComPtr aGetItemFullSize; + subFolder.QueryInterface(&aGetItemFullSize); + for (UInt32 i = 0; i < numItems; i++) + { + UInt64 size; + RINOK(aGetItemFullSize->GetItemFullSize(i, &size)); + *totalSize += size; + } + */ + UInt64 numFolders, numFiles; + return GetFolderSize(_path + GetRelPath(fi), numFolders, numFiles, size, progress); + } + size = fi.Size; + return S_OK; +} + +STDMETHODIMP CFSFolder::GetItemFullSize(UInt32 index, PROPVARIANT *value, IProgress *progress) +{ + NCOM::CPropVariant prop; + if (index >= (UInt32)_refs.Size()) + return E_INVALIDARG; + UInt64 size = 0; + HRESULT result = GetItemFullSize(index, size, progress); + prop = size; + prop.Detach(value); + return result; +} + +HRESULT CFSFolder::GetComplexName(const wchar_t *name, UString &resultPath) +{ + UString newName = name; + resultPath = _path + newName; + if (newName.Length() < 1) + return S_OK; + if (newName[0] == WCHAR_PATH_SEPARATOR) + { + resultPath = newName; + return S_OK; + } + if (newName.Length() < 2) + return S_OK; + if (newName[1] == L':') + resultPath = newName; + return S_OK; +} + +STDMETHODIMP CFSFolder::CreateFolder(const wchar_t *name, IProgress * /* progress */) +{ + UString processedName; + RINOK(GetComplexName(name, processedName)); + if(NDirectory::MyCreateDirectory(processedName)) + return S_OK; + if(::GetLastError() == ERROR_ALREADY_EXISTS) + return ::GetLastError(); + if (!NDirectory::CreateComplexDirectory(processedName)) + return ::GetLastError(); + return S_OK; +} + +STDMETHODIMP CFSFolder::CreateFile(const wchar_t *name, IProgress * /* progress */) +{ + UString processedName; + RINOK(GetComplexName(name, processedName)); + NIO::COutFile outFile; + if (!outFile.Create(processedName, false)) + return ::GetLastError(); + return S_OK; +} + +STDMETHODIMP CFSFolder::Rename(UInt32 index, const wchar_t *newName, IProgress * /* progress */) +{ + const CDirItem &fi = *_refs[index]; + const UString fullPrefix = _path + GetPrefix(fi); + if (!NDirectory::MyMoveFile(fullPrefix + fi.Name, fullPrefix + newName)) + return GetLastError(); + return S_OK; +} + +STDMETHODIMP CFSFolder::Delete(const UInt32 *indices, UInt32 numItems,IProgress *progress) +{ + RINOK(progress->SetTotal(numItems)); + for (UInt32 i = 0; i < numItems; i++) + { + const CDirItem &fi = *_refs[indices[i]]; + const UString fullPath = _path + GetRelPath(fi); + bool result; + if (fi.IsDir()) + result = NDirectory::RemoveDirectoryWithSubItems(fullPath); + else + result = NDirectory::DeleteFileAlways(fullPath); + if (!result) + return GetLastError(); + UInt64 completed = i; + RINOK(progress->SetCompleted(&completed)); + } + return S_OK; +} + +STDMETHODIMP CFSFolder::SetProperty(UInt32 index, PROPID propID, + const PROPVARIANT *value, IProgress * /* progress */) +{ + if (index >= (UInt32)_refs.Size()) + return E_INVALIDARG; + CDirItem &fi = *_refs[index]; + if (fi.Parent->Parent != 0) + return E_NOTIMPL; + switch(propID) + { + case kpidComment: + { + UString filename = fi.Name; + filename.Trim(); + if (value->vt == VT_EMPTY) + _comments.DeletePair(filename); + else if (value->vt == VT_BSTR) + { + CTextPair pair; + pair.ID = filename; + pair.ID.Trim(); + pair.Value = value->bstrVal; + pair.Value.Trim(); + if (pair.Value.IsEmpty()) + _comments.DeletePair(filename); + else + _comments.AddPair(pair); + } + else + return E_INVALIDARG; + SaveComments(); + break; + } + default: + return E_NOTIMPL; + } + return S_OK; +} + +STDMETHODIMP CFSFolder::GetSystemIconIndex(UInt32 index, Int32 *iconIndex) +{ +#ifdef _WIN32 + if (index >= (UInt32)_refs.Size()) + return E_INVALIDARG; + const CDirItem &fi = *_refs[index]; + *iconIndex = 0; + int iconIndexTemp; + if (GetRealIconIndex(_path + GetRelPath(fi), fi.Attributes, iconIndexTemp) != 0) + { + *iconIndex = iconIndexTemp; + return S_OK; + } + return GetLastError(); +#endif + *iconIndex = 0; + return S_OK; +} + +STDMETHODIMP CFSFolder::SetFlatMode(Int32 flatMode) +{ + _flatMode = IntToBool(flatMode); + return S_OK; +} + +} diff --git a/CPP/7zip/UI/FileManager/FSFolder.h b/CPP/7zip/UI/FileManager/FSFolder.h new file mode 100644 index 0000000..51f08bd --- /dev/null +++ b/CPP/7zip/UI/FileManager/FSFolder.h @@ -0,0 +1,123 @@ +// FSFolder.h + +#ifndef __FSFOLDER_H +#define __FSFOLDER_H + +#include "Common/MyCom.h" + +#include "Windows/FileFind.h" + +#include "IFolder.h" +#include "TextPairs.h" + +namespace NFsFolder { + +class CFSFolder; + +struct CFileInfoEx: public NWindows::NFile::NFind::CFileInfoW +{ + #ifndef UNDER_CE + bool CompressedSizeIsDefined; + UInt64 CompressedSize; + #endif +}; + +struct CDirItem; + +struct CDirItem: public CFileInfoEx +{ + CDirItem *Parent; + CObjectVector Files; + + CDirItem(): Parent(0) {} + void Clear() + { + Files.Clear(); + Parent = 0; + } +}; + +class CFSFolder: + public IFolderFolder, + public IFolderWasChanged, + public IFolderOperations, + // public IFolderOperationsDeleteToRecycleBin, + public IFolderGetItemFullSize, + public IFolderClone, + public IFolderGetSystemIconIndex, + public IFolderSetFlatMode, + public CMyUnknownImp +{ + UInt64 GetSizeOfItem(int anIndex) const; +public: + MY_QUERYINTERFACE_BEGIN2(IFolderFolder) + MY_QUERYINTERFACE_ENTRY(IFolderWasChanged) + // MY_QUERYINTERFACE_ENTRY(IFolderOperationsDeleteToRecycleBin) + MY_QUERYINTERFACE_ENTRY(IFolderOperations) + MY_QUERYINTERFACE_ENTRY(IFolderGetItemFullSize) + MY_QUERYINTERFACE_ENTRY(IFolderClone) + MY_QUERYINTERFACE_ENTRY(IFolderGetSystemIconIndex) + MY_QUERYINTERFACE_ENTRY(IFolderSetFlatMode) + MY_QUERYINTERFACE_END + MY_ADDREF_RELEASE + + + INTERFACE_FolderFolder(;) + INTERFACE_FolderOperations(;) + + STDMETHOD(WasChanged)(Int32 *wasChanged); + STDMETHOD(Clone)(IFolderFolder **resultFolder); + STDMETHOD(GetItemFullSize)(UInt32 index, PROPVARIANT *value, IProgress *progress); + + STDMETHOD(SetFlatMode)(Int32 flatMode); + + STDMETHOD(GetSystemIconIndex)(UInt32 index, Int32 *iconIndex); + +private: + UString _path; + CDirItem _root; + CRecordVector _refs; + + CMyComPtr _parentFolder; + + bool _commentsAreLoaded; + CPairsStorage _comments; + + bool _flatMode; + + // FIXME NWindows::NFile::NFind::CFindChangeNotification _findChangeNotification; + + HRESULT GetItemsFullSize(const UInt32 *indices, UInt32 numItems, + UInt64 &numFolders, UInt64 &numFiles, UInt64 &size, IProgress *progress); + HRESULT GetItemFullSize(int index, UInt64 &size, IProgress *progress); + HRESULT GetComplexName(const wchar_t *name, UString &resultPath); + HRESULT BindToFolderSpec(const wchar_t *name, IFolderFolder **resultFolder); + + bool LoadComments(); + bool SaveComments(); + HRESULT LoadSubItems(CDirItem &dirItem, const UString &path); + void AddRefs(CDirItem &dirItem); +public: + HRESULT Init(const UString &path, IFolderFolder *parentFolder); + #ifdef UNDER_CE + HRESULT InitToRoot() { return Init(L"\\", NULL); } + #endif + + CFSFolder() : _flatMode(false) {} + + UString GetPrefix(const CDirItem &item) const; + UString GetRelPath(const CDirItem &item) const; + UString GetRelPath(UInt32 index) const { return GetRelPath(*_refs[index]); } + + void Clear() + { + _root.Clear(); + _refs.Clear(); + } +}; + +HRESULT GetFolderSize(const UString &path, UInt64 &numFolders, UInt64 &numFiles, UInt64 &size, IProgress *progress); + +} + +#endif diff --git a/CPP/7zip/UI/FileManager/FSFolderCopy.cpp b/CPP/7zip/UI/FileManager/FSFolderCopy.cpp new file mode 100644 index 0000000..db1ba2b --- /dev/null +++ b/CPP/7zip/UI/FileManager/FSFolderCopy.cpp @@ -0,0 +1,523 @@ +// FSFolderCopy.cpp + +#include "StdAfx.h" + +// FIXME #include + +#include "FSFolder.h" +#include "Windows/FileDir.h" +#include "Windows/Error.h" + +#include "Common/StringConvert.h" + +#include "../../Common/FilePathAutoRename.h" + +using namespace NWindows; +using namespace NFile; +using namespace NFind; + +#ifndef _UNICODE +extern bool g_IsNT; +#endif + +namespace NFsFolder { + +/* +static bool IsItWindows2000orHigher() +{ + OSVERSIONINFO versionInfo; + versionInfo.dwOSVersionInfoSize = sizeof(versionInfo); + if (!::GetVersionEx(&versionInfo)) + return false; + return (versionInfo.dwPlatformId == VER_PLATFORM_WIN32_NT) && + (versionInfo.dwMajorVersion >= 5); +} +*/ + +struct CProgressInfo +{ + UInt64 StartPos; + IProgress *Progress; +}; + +#ifdef _WIN32 + +static DWORD CALLBACK CopyProgressRoutine( + LARGE_INTEGER /* TotalFileSize */, // file size + LARGE_INTEGER TotalBytesTransferred, // bytes transferred + LARGE_INTEGER /* StreamSize */, // bytes in stream + LARGE_INTEGER /* StreamBytesTransferred */, // bytes transferred for stream + DWORD /* dwStreamNumber */, // current stream + DWORD /* dwCallbackReason */, // callback reason + HANDLE /* hSourceFile */, // handle to source file + HANDLE /* hDestinationFile */, // handle to destination file + LPVOID lpData // from CopyFileEx +) +{ + CProgressInfo &progressInfo = *(CProgressInfo *)lpData; + UInt64 completed = progressInfo.StartPos + TotalBytesTransferred.QuadPart; + if (progressInfo.Progress->SetCompleted(&completed) != S_OK) + return PROGRESS_CANCEL; + return PROGRESS_CONTINUE; +} + +typedef BOOL (WINAPI * CopyFileExPointer)( + IN LPCSTR lpExistingFileName, + IN LPCSTR lpNewFileName, + IN LPPROGRESS_ROUTINE lpProgressRoutine OPTIONAL, + IN LPVOID lpData OPTIONAL, + IN LPBOOL pbCancel OPTIONAL, + IN DWORD dwCopyFlags + ); + +typedef BOOL (WINAPI * CopyFileExPointerW)( + IN LPCWSTR lpExistingFileName, + IN LPCWSTR lpNewFileName, + IN LPPROGRESS_ROUTINE lpProgressRoutine OPTIONAL, + IN LPVOID lpData OPTIONAL, + IN LPBOOL pbCancel OPTIONAL, + IN DWORD dwCopyFlags + ); + +#ifndef _UNICODE +static inline UINT GetCurrentCodePage() { return ::AreFileApisANSI() ? CP_ACP : CP_OEMCP; } +static CSysString GetSysPath(LPCWSTR sysPath) + { return UnicodeStringToMultiByte(sysPath, GetCurrentCodePage()); } +#endif + +#endif + +static bool MyCopyFile(LPCWSTR existingFile, LPCWSTR newFile, IProgress *progress, UInt64 &completedSize) +{ +#ifdef _WIN32 + CProgressInfo progressInfo; + progressInfo.Progress = progress; + progressInfo.StartPos = completedSize; + BOOL CancelFlag = FALSE; + #ifndef _UNICODE + if (g_IsNT) + #endif + { + CopyFileExPointerW copyFunctionW = (CopyFileExPointerW) + ::GetProcAddress(::GetModuleHandleW(L"kernel32.dll"), + "CopyFileExW"); + if (copyFunctionW == 0) + return false; + if (copyFunctionW(existingFile, newFile, CopyProgressRoutine, + &progressInfo, &CancelFlag, COPY_FILE_FAIL_IF_EXISTS)) + return true; + #ifdef WIN_LONG_PATH + UString longPathExisting, longPathNew; + if (!NDirectory::GetLongPaths(existingFile, newFile, longPathExisting, longPathNew)) + return false; + if (copyFunctionW(longPathExisting, longPathNew, CopyProgressRoutine, + &progressInfo, &CancelFlag, COPY_FILE_FAIL_IF_EXISTS)) + return true; + #endif + return false; + } + #ifndef _UNICODE + else + { + CopyFileExPointer copyFunction = (CopyFileExPointer) + ::GetProcAddress(::GetModuleHandleA("kernel32.dll"), + "CopyFileExA"); + if (copyFunction != 0) + { + if (copyFunction(GetSysPath(existingFile), GetSysPath(newFile), + CopyProgressRoutine,&progressInfo, &CancelFlag, COPY_FILE_FAIL_IF_EXISTS)) + return true; + if (::GetLastError() != ERROR_CALL_NOT_IMPLEMENTED) + return false; + } + return BOOLToBool(::CopyFile(GetSysPath(existingFile), GetSysPath(newFile), TRUE)); + } + #endif +#else + extern bool wxw_CopyFile(LPCWSTR existingFile, LPCWSTR newFile, bool overwrite); + return wxw_CopyFile(existingFile, newFile, true); +#endif +} + +#ifdef _WIN32 +typedef BOOL (WINAPI * MoveFileWithProgressPointer)( + IN LPCWSTR lpExistingFileName, + IN LPCWSTR lpNewFileName, + IN LPPROGRESS_ROUTINE lpProgressRoutine OPTIONAL, + IN LPVOID lpData OPTIONAL, + IN DWORD dwFlags + ); +#endif + +static bool MyMoveFile(LPCWSTR existingFile, LPCWSTR newFile, IProgress *progress, UInt64 &completedSize) +{ +#ifdef _WIN32 + // if (IsItWindows2000orHigher()) + // { + CProgressInfo progressInfo; + progressInfo.Progress = progress; + progressInfo.StartPos = completedSize; + + MoveFileWithProgressPointer moveFunction = (MoveFileWithProgressPointer) + ::GetProcAddress(::GetModuleHandle(TEXT("kernel32.dll")), + "MoveFileWithProgressW"); + if (moveFunction != 0) + { + if (moveFunction( + existingFile, newFile, CopyProgressRoutine, + &progressInfo, MOVEFILE_COPY_ALLOWED)) + return true; + if (::GetLastError() != ERROR_CALL_NOT_IMPLEMENTED) + { + #ifdef WIN_LONG_PATH + UString longPathExisting, longPathNew; + if (!NDirectory::GetLongPaths(existingFile, newFile, longPathExisting, longPathNew)) + return false; + if (moveFunction(longPathExisting, longPathNew, CopyProgressRoutine, + &progressInfo, MOVEFILE_COPY_ALLOWED)) + return true; + #endif + if (::GetLastError() != ERROR_CALL_NOT_IMPLEMENTED) + return false; + } + } + // } + // else +#endif + return NDirectory::MyMoveFile(existingFile, newFile); +} + +static HRESULT MyCopyFile( + const UString &srcPath, + const CFileInfoW &srcFileInfo, + const UString &destPathSpec, + IFolderOperationsExtractCallback *callback, + UInt64 &completedSize) +{ + UString destPath = destPathSpec; + if (destPath.CompareNoCase(srcPath) == 0) + { + UString message = UString(L"can not move file \'") + destPath + UString(L"\' onto itself"); + RINOK(callback->ShowMessage(message)); + return E_ABORT; + } + + INT32 writeAskResult; + CMyComBSTR destPathResult; + RINOK(callback->AskWrite( + srcPath, + BoolToInt(false), + &srcFileInfo.MTime, &srcFileInfo.Size, + destPath, + &destPathResult, + &writeAskResult)); + if (IntToBool(writeAskResult)) + { + UString destPathNew = UString(destPathResult); + RINOK(callback->SetCurrentFilePath(srcPath)); + if (!MyCopyFile(srcPath, destPathNew, callback, completedSize)) + { + UString message = NError::MyFormatMessageW(GetLastError()) + + UString(L" \'") + + UString(destPathNew) + + UString(L"\'"); + RINOK(callback->ShowMessage(message)); + return E_ABORT; + } + } + completedSize += srcFileInfo.Size; + return callback->SetCompleted(&completedSize); +} + +static HRESULT CopyFolder( + const UString &srcPath, + const UString &destPathSpec, + IFolderOperationsExtractCallback *callback, + UInt64 &completedSize) +{ + RINOK(callback->SetCompleted(&completedSize)); + + UString destPath = destPathSpec; + int len = srcPath.Length(); + if (destPath.Length() >= len && srcPath.CompareNoCase(destPath.Left(len)) == 0) + { + if (destPath.Length() == len || destPath[len] == WCHAR_PATH_SEPARATOR) + { + UString message = UString(L"can not copy folder \'") + + destPath + UString(L"\' onto itself"); + RINOK(callback->ShowMessage(message)); + return E_ABORT; + } + } + + if (!NDirectory::CreateComplexDirectory(destPath)) + { + UString message = UString(L"can not create folder ") + destPath; + RINOK(callback->ShowMessage(message)); + return E_ABORT; + } + CEnumeratorW enumerator(srcPath + UString(WSTRING_PATH_SEPARATOR L"*")); + CFileInfoEx fileInfo; + while (enumerator.Next(fileInfo)) + { + const UString srcPath2 = srcPath + UString(WSTRING_PATH_SEPARATOR) + fileInfo.Name; + const UString destPath2 = destPath + UString(WSTRING_PATH_SEPARATOR) + fileInfo.Name; + if (fileInfo.IsDir()) + { + RINOK(CopyFolder(srcPath2, destPath2, callback, completedSize)); + } + else + { + RINOK(MyCopyFile(srcPath2, fileInfo, destPath2, callback, completedSize)); + } + } + return S_OK; +} + + +STDMETHODIMP CFSFolder::CopyTo(const UInt32 *indices, UInt32 numItems, + const wchar_t *path, IFolderOperationsExtractCallback *callback) +{ + if (numItems == 0) + return S_OK; + + UInt64 numFolders, numFiles, totalSize; + GetItemsFullSize(indices, numItems, numFolders, numFiles, totalSize, callback); + RINOK(callback->SetTotal(totalSize)); + RINOK(callback->SetNumFiles(numFiles)); + + UString destPath = path; + if (destPath.IsEmpty()) + return E_INVALIDARG; + bool directName = (destPath[destPath.Length() - 1] != WCHAR_PATH_SEPARATOR); + if (directName) + { + if (numItems > 1) + return E_INVALIDARG; + } + /* + // doesn't work in network + else + if (!NDirectory::CreateComplexDirectory(destPath))) + { + DWORD lastError = ::GetLastError(); + UString message = UString(L"can not create folder ") + + destPath; + RINOK(callback->ShowMessage(message)); + return E_ABORT; + } + */ + + UInt64 completedSize = 0; + RINOK(callback->SetCompleted(&completedSize)); + for (UInt32 i = 0; i < numItems; i++) + { + const CDirItem &fileInfo = *_refs[indices[i]]; + UString destPath2 = destPath; + if (!directName) + destPath2 += fileInfo.Name; + UString srcPath = _path + GetPrefix(fileInfo) + fileInfo.Name; + if (fileInfo.IsDir()) + { + RINOK(CopyFolder(srcPath, destPath2, callback, completedSize)); + } + else + { + RINOK(MyCopyFile(srcPath, fileInfo, destPath2, callback, completedSize)); + } + } + return S_OK; +} + +///////////////////////////////////////////////// +// Move Operations + +HRESULT MyMoveFile( + const UString &srcPath, + const CFileInfoW &srcFileInfo, + const UString &destPathSpec, + IFolderOperationsExtractCallback *callback, + UInt64 &completedSize) +{ + UString destPath = destPathSpec; + if (destPath.CompareNoCase(srcPath) == 0) + { + UString message = UString(L"can not move file \'") + + destPath + + UString(L"\' onto itself"); + RINOK(callback->ShowMessage(message)); + return E_ABORT; + } + + INT32 writeAskResult; + CMyComBSTR destPathResult; + RINOK(callback->AskWrite( + srcPath, + BoolToInt(false), + &srcFileInfo.MTime, &srcFileInfo.Size, + destPath, + &destPathResult, + &writeAskResult)); + if (IntToBool(writeAskResult)) + { + UString destPathNew = UString(destPathResult); + RINOK(callback->SetCurrentFilePath(srcPath)); + if (!MyMoveFile(srcPath, destPathNew, callback, completedSize)) + { + UString message = UString(L"can not move to file ") + destPathNew; + RINOK(callback->ShowMessage(message)); + } + } + completedSize += srcFileInfo.Size; + RINOK(callback->SetCompleted(&completedSize)); + return S_OK; +} + +HRESULT MyMoveFolder( + const UString &srcPath, + const UString &destPathSpec, + IFolderOperationsExtractCallback *callback, + UInt64 &completedSize) +{ + UString destPath = destPathSpec; + int len = srcPath.Length(); + if (destPath.Length() >= len && srcPath.CompareNoCase(destPath.Left(len)) == 0) + { + if (destPath.Length() == len || destPath[len] == WCHAR_PATH_SEPARATOR) + { + UString message = UString(L"can not move folder \'") + + destPath + UString(L"\' onto itself"); + RINOK(callback->ShowMessage(message)); + return E_ABORT; + } + } + + if (MyMoveFile(srcPath, destPath, callback, completedSize)) + return S_OK; + + if (!NDirectory::CreateComplexDirectory(destPath)) + { + UString message = UString(L"can not create folder ") + destPath; + RINOK(callback->ShowMessage(message)); + return E_ABORT; + } + { + CEnumeratorW enumerator(srcPath + UString(WSTRING_PATH_SEPARATOR L"*")); + CFileInfoEx fileInfo; + while (enumerator.Next(fileInfo)) + { + const UString srcPath2 = srcPath + UString(WSTRING_PATH_SEPARATOR) + fileInfo.Name; + const UString destPath2 = destPath + UString(WSTRING_PATH_SEPARATOR) + fileInfo.Name; + if (fileInfo.IsDir()) + { + RINOK(MyMoveFolder(srcPath2, destPath2, callback, completedSize)); + } + else + { + RINOK(MyMoveFile(srcPath2, fileInfo, destPath2, callback, completedSize)); + } + } + } + if (!NDirectory::MyRemoveDirectory(srcPath)) + { + UString message = UString(L"can not remove folder") + srcPath; + RINOK(callback->ShowMessage(message)); + return E_ABORT; + } + return S_OK; +} + +STDMETHODIMP CFSFolder::MoveTo( + const UInt32 *indices, + UInt32 numItems, + const wchar_t *path, + IFolderOperationsExtractCallback *callback) +{ + if (numItems == 0) + return S_OK; + + UInt64 numFolders, numFiles, totalSize; + GetItemsFullSize(indices, numItems, numFolders, numFiles, totalSize, callback); + RINOK(callback->SetTotal(totalSize)); + RINOK(callback->SetNumFiles(numFiles)); + + UString destPath = path; + if (destPath.IsEmpty()) + return E_INVALIDARG; + bool directName = (destPath[destPath.Length() - 1] != WCHAR_PATH_SEPARATOR); + if (directName) + { + if (numItems > 1) + return E_INVALIDARG; + } + else + if (!NDirectory::CreateComplexDirectory(destPath)) + { + UString message = UString(L"can not create folder ") + + destPath; + RINOK(callback->ShowMessage(message)); + return E_ABORT; + } + + UInt64 completedSize = 0; + RINOK(callback->SetCompleted(&completedSize)); + for (UInt32 i = 0; i < numItems; i++) + { + const CDirItem &fileInfo = *_refs[indices[i]]; + UString destPath2 = destPath; + if (!directName) + destPath2 += fileInfo.Name; + UString srcPath = _path + GetPrefix(fileInfo) + fileInfo.Name; + if (fileInfo.IsDir()) + { + RINOK(MyMoveFolder(srcPath, destPath2, callback, completedSize)); + } + else + { + RINOK(MyMoveFile(srcPath, fileInfo, destPath2, callback, completedSize)); + } + } + return S_OK; +} + +STDMETHODIMP CFSFolder::CopyFrom(const wchar_t * /* fromFolderPath */, + const wchar_t ** /* itemsPaths */, UInt32 /* numItems */, IProgress * /* progress */) +{ + /* + UInt64 numFolders, numFiles, totalSize; + numFiles = numFolders = totalSize = 0; + UInt32 i; + for (i = 0; i < numItems; i++) + { + UString path = (UString)fromFolderPath + itemsPaths[i]; + + CFileInfoW fileInfo; + if (!FindFile(path, fileInfo)) + return ::GetLastError(); + if (fileInfo.IsDir()) + { + UInt64 subFolders, subFiles, subSize; + RINOK(GetFolderSize(path + UString(WSTRING_PATH_SEPARATOR) + fileInfo.Name, subFolders, subFiles, subSize, progress)); + numFolders += subFolders; + numFolders++; + numFiles += subFiles; + totalSize += subSize; + } + else + { + numFiles++; + totalSize += fileInfo.Size; + } + } + RINOK(progress->SetTotal(totalSize)); + RINOK(callback->SetNumFiles(numFiles)); + for (i = 0; i < numItems; i++) + { + UString path = (UString)fromFolderPath + itemsPaths[i]; + } + return S_OK; + */ + return E_NOTIMPL; +} + +} diff --git a/CPP/7zip/UI/FileManager/FileFolderPluginOpen.cpp b/CPP/7zip/UI/FileManager/FileFolderPluginOpen.cpp new file mode 100644 index 0000000..1fb1b38 --- /dev/null +++ b/CPP/7zip/UI/FileManager/FileFolderPluginOpen.cpp @@ -0,0 +1,176 @@ +// FileFolderPluginOpen.cpp + +#include "StdAfx.h" + +#include "resource.h" + +#include "Windows/Thread.h" + +#include "../Agent/Agent.h" + +#include "LangUtils.h" +#include "OpenCallback.h" +#include "PluginLoader.h" +#include "RegistryAssociations.h" +#include "RegistryPlugins.h" + +using namespace NWindows; +using namespace NRegistryAssociations; + +struct CThreadArchiveOpen +{ + UString Path; + UString ArcFormat; + CMyComPtr InStream; + CMyComPtr FolderManager; + CMyComPtr OpenCallback; + COpenArchiveCallback *OpenCallbackSpec; + + CMyComPtr Folder; + HRESULT Result; + + void Process() + { + try + { + CProgressCloser closer(OpenCallbackSpec->ProgressDialog); + Result = FolderManager->OpenFolderFile(InStream, Path, ArcFormat, &Folder, OpenCallback); + } + catch(...) { Result = E_FAIL; } + } + + static THREAD_FUNC_DECL MyThreadFunction(void *param) + { + ((CThreadArchiveOpen *)param)->Process(); + return 0; + } +}; + +/* +static int FindPlugin(const CObjectVector &plugins, const UString &pluginName) +{ + for (int i = 0; i < plugins.Size(); i++) + if (plugins[i].Name.CompareNoCase(pluginName) == 0) + return i; + return -1; +} +*/ + +HRESULT OpenFileFolderPlugin( + IInStream *inStream, + const UString &path, + const UString &arcFormat, + HMODULE *module, + IFolderFolder **resultFolder, + HWND parentWindow, + bool &encrypted, UString &password) +{ +#ifdef _WIN32 + CObjectVector plugins; + ReadFileFolderPluginInfoList(plugins); +#endif + + UString extension, name, pureName, dot; + + int slashPos = path.ReverseFind(WCHAR_PATH_SEPARATOR); + UString dirPrefix; + UString fileName; + if (slashPos >= 0) + { + dirPrefix = path.Left(slashPos + 1); + fileName = path.Mid(slashPos + 1); + } + else + fileName = path; + + NFile::NName::SplitNameToPureNameAndExtension(fileName, pureName, dot, extension); + + /* + if (!extension.IsEmpty()) + { + CExtInfo extInfo; + if (ReadInternalAssociation(extension, extInfo)) + { + for (int i = extInfo.Plugins.Size() - 1; i >= 0; i--) + { + int pluginIndex = FindPlugin(plugins, extInfo.Plugins[i]); + if (pluginIndex >= 0) + { + const CPluginInfo plugin = plugins[pluginIndex]; + plugins.Delete(pluginIndex); + plugins.Insert(0, plugin); + } + } + } + } + */ + +#ifdef _WIN32 + for (int i = 0; i < plugins.Size(); i++) + { + const CPluginInfo &plugin = plugins[i]; + if (!plugin.ClassIDDefined) + continue; +#endif + CPluginLibrary library; + + CThreadArchiveOpen t; + +#ifdef _WIN32 + if (plugin.FilePath.IsEmpty()) + t.FolderManager = new CArchiveFolderManager; + else if (library.LoadAndCreateManager(plugin.FilePath, plugin.ClassID, &t.FolderManager) != S_OK) + continue; +#else + t.FolderManager = new CArchiveFolderManager; +#endif + + t.OpenCallbackSpec = new COpenArchiveCallback; + t.OpenCallback = t.OpenCallbackSpec; + t.OpenCallbackSpec->PasswordIsDefined = encrypted; + t.OpenCallbackSpec->Password = password; + t.OpenCallbackSpec->ParentWindow = parentWindow; + + if (inStream) + t.OpenCallbackSpec->SetSubArchiveName(fileName); + else + t.OpenCallbackSpec->LoadFileInfo(dirPrefix, fileName); + + t.InStream = inStream; + t.Path = path; + t.ArcFormat = arcFormat; + + UString progressTitle = LangString(IDS_OPENNING, 0x03020283); + t.OpenCallbackSpec->ProgressDialog.MainWindow = parentWindow; + t.OpenCallbackSpec->ProgressDialog.MainTitle = LangString(IDS_APP_TITLE, 0x03000000); + t.OpenCallbackSpec->ProgressDialog.MainAddTitle = progressTitle + UString(L" "); + // FIXME t.OpenCallbackSpec->ProgressDialog.WaitMode = true; + + { + NWindows::CThread thread; + RINOK(thread.Create(CThreadArchiveOpen::MyThreadFunction, &t)); + t.OpenCallbackSpec->StartProgressDialog(progressTitle, thread); + } + + if (t.Result == E_ABORT) + return t.Result; + + if (t.Result == S_OK) + { + // if (openCallbackSpec->PasswordWasAsked) + { + encrypted = t.OpenCallbackSpec->PasswordIsDefined; + password = t.OpenCallbackSpec->Password; + } + *module = library.Detach(); + *resultFolder = t.Folder.Detach(); + return S_OK; + } + + if (t.Result != S_FALSE) + return t.Result; +#ifdef _WIN32 + } +#endif + return S_FALSE; +} \ No newline at end of file diff --git a/CPP/7zip/UI/FileManager/FileFolderPluginOpen.h b/CPP/7zip/UI/FileManager/FileFolderPluginOpen.h new file mode 100644 index 0000000..85717ef --- /dev/null +++ b/CPP/7zip/UI/FileManager/FileFolderPluginOpen.h @@ -0,0 +1,9 @@ +// FileFolderPluginOpen.h + +#ifndef __FILE_FOLDER_PLUGIN_OPEN_H +#define __FILE_FOLDER_PLUGIN_OPEN_H + +HRESULT OpenFileFolderPlugin(IInStream *inStream, const UString &path, const UString &arcFormat, + HMODULE *module, IFolderFolder **resultFolder, HWND parentWindow, bool &encrypted, UString &password); + +#endif diff --git a/CPP/7zip/UI/FileManager/FormatUtils.cpp b/CPP/7zip/UI/FileManager/FormatUtils.cpp new file mode 100644 index 0000000..98bb043 --- /dev/null +++ b/CPP/7zip/UI/FileManager/FormatUtils.cpp @@ -0,0 +1,40 @@ +// FormatUtils.cpp + +#include "StdAfx.h" + +#include "FormatUtils.h" +#include "Common/IntToString.h" +#include "Windows/ResourceString.h" + +#ifdef LANG +#include "LangUtils.h" +#endif + +UString NumberToString(UInt64 number) +{ + wchar_t numberString[32]; + ConvertUInt64ToString(number, numberString); + return numberString; +} + +UString MyFormatNew(const UString &format, const UString &argument) +{ + UString result = format; + result.Replace(L"{0}", argument); + return result; +} + +UString MyFormatNew(UINT resourceID, + #ifdef LANG + UInt32 langID, + #endif + const UString &argument) +{ + return MyFormatNew( + #ifdef LANG + LangString(resourceID, langID), + #else + NWindows::MyLoadStringW(resourceID), + #endif + argument); +} diff --git a/CPP/7zip/UI/FileManager/FormatUtils.h b/CPP/7zip/UI/FileManager/FormatUtils.h new file mode 100644 index 0000000..70a4443 --- /dev/null +++ b/CPP/7zip/UI/FileManager/FormatUtils.h @@ -0,0 +1,18 @@ +// FormatUtils.h + +#ifndef __FORMATUTILS_H +#define __FORMATUTILS_H + +#include "Common/Types.h" +#include "Common/MyString.h" + +UString NumberToString(UInt64 number); + +UString MyFormatNew(const UString &format, const UString &argument); +UString MyFormatNew(UINT resourceID, + #ifdef LANG + UInt32 langID, + #endif + const UString &argument); + +#endif diff --git a/CPP/7zip/UI/FileManager/HelpUtils.h b/CPP/7zip/UI/FileManager/HelpUtils.h new file mode 100644 index 0000000..2a7b85a --- /dev/null +++ b/CPP/7zip/UI/FileManager/HelpUtils.h @@ -0,0 +1,10 @@ +// HelpUtils.h + +#ifndef __HELPUTILS_H +#define __HELPUTILS_H + +#include "Common/MyString.h" + +void ShowHelpWindow(HWND hwnd, LPCWSTR topicFile); + +#endif diff --git a/CPP/7zip/UI/FileManager/IFolder.h b/CPP/7zip/UI/FileManager/IFolder.h new file mode 100644 index 0000000..743017b --- /dev/null +++ b/CPP/7zip/UI/FileManager/IFolder.h @@ -0,0 +1,161 @@ +// IFolder.h + +#ifndef __IFOLDER_H +#define __IFOLDER_H + +#include "../../IProgress.h" +#include "../../IStream.h" + +#define FOLDER_INTERFACE_SUB(i, b, x) DECL_INTERFACE_SUB(i, b, 8, x) +#define FOLDER_INTERFACE(i, x) FOLDER_INTERFACE_SUB(i, IUnknown, x) + +namespace NPlugin +{ + enum + { + kName = 0, + kType, + kClassID, + kOptionsClassID + }; +} + +#define INTERFACE_FolderFolder(x) \ + STDMETHOD(LoadItems)() x; \ + STDMETHOD(GetNumberOfItems)(UInt32 *numItems) x; \ + STDMETHOD(GetProperty)(UInt32 itemIndex, PROPID propID, PROPVARIANT *value) x; \ + STDMETHOD(BindToFolder)(UInt32 index, IFolderFolder **resultFolder) x; \ + STDMETHOD(BindToFolder)(const wchar_t *name, IFolderFolder **resultFolder) x; \ + STDMETHOD(BindToParentFolder)(IFolderFolder **resultFolder) x; \ + STDMETHOD(GetNumberOfProperties)(UInt32 *numProperties) x; \ + STDMETHOD(GetPropertyInfo)(UInt32 index, BSTR *name, PROPID *propID, VARTYPE *varType) x; \ + STDMETHOD(GetFolderProperty)(PROPID propID, PROPVARIANT *value) x; \ + +FOLDER_INTERFACE(IFolderFolder, 0x00) +{ + INTERFACE_FolderFolder(PURE) +}; + +FOLDER_INTERFACE(IFolderWasChanged, 0x04) +{ + STDMETHOD(WasChanged)(Int32 *wasChanged) PURE; +}; + +FOLDER_INTERFACE_SUB(IFolderOperationsExtractCallback, IProgress, 0x0B) +{ + // STDMETHOD(SetTotalFiles)(UInt64 total) PURE; + // STDMETHOD(SetCompletedFiles)(const UInt64 *completedValue) PURE; + STDMETHOD(AskWrite)( + const wchar_t *srcPath, + Int32 srcIsFolder, + const FILETIME *srcTime, + const UInt64 *srcSize, + const wchar_t *destPathRequest, + BSTR *destPathResult, + Int32 *writeAnswer) PURE; + STDMETHOD(ShowMessage)(const wchar_t *message) PURE; + STDMETHOD(SetCurrentFilePath)(const wchar_t *filePath) PURE; + STDMETHOD(SetNumFiles)(UInt64 numFiles) PURE; +}; + +#define INTERFACE_FolderOperations(x) \ + STDMETHOD(CreateFolder)(const wchar_t *name, IProgress *progress) x; \ + STDMETHOD(CreateFile)(const wchar_t *name, IProgress *progress) x; \ + STDMETHOD(Rename)(UInt32 index, const wchar_t *newName, IProgress *progress) x; \ + STDMETHOD(Delete)(const UInt32 *indices, UInt32 numItems, IProgress *progress) x; \ + STDMETHOD(CopyTo)(const UInt32 *indices, UInt32 numItems, \ + const wchar_t *path, IFolderOperationsExtractCallback *callback) x; \ + STDMETHOD(MoveTo)(const UInt32 *indices, UInt32 numItems, \ + const wchar_t *path, IFolderOperationsExtractCallback *callback) x; \ + STDMETHOD(CopyFrom)(const wchar_t *fromFolderPath, \ + const wchar_t **itemsPaths, UInt32 numItems, IProgress *progress) x; \ + STDMETHOD(SetProperty)(UInt32 index, PROPID propID, const PROPVARIANT *value, IProgress *progress) x; \ + +FOLDER_INTERFACE(IFolderOperations, 0x06) +{ + INTERFACE_FolderOperations(PURE) +}; + +/* +FOLDER_INTERFACE2(IFolderOperationsDeleteToRecycleBin, 0x06, 0x03) +{ + STDMETHOD(DeleteToRecycleBin)(const UInt32 *indices, UInt32 numItems, IProgress *progress) PURE; +}; +*/ + +FOLDER_INTERFACE(IFolderGetSystemIconIndex, 0x07) +{ + STDMETHOD(GetSystemIconIndex)(UInt32 index, Int32 *iconIndex) PURE; +}; + +FOLDER_INTERFACE(IFolderGetItemFullSize, 0x08) +{ + STDMETHOD(GetItemFullSize)(UInt32 index, PROPVARIANT *value, IProgress *progress) PURE; +}; + +FOLDER_INTERFACE(IFolderClone, 0x09) +{ + STDMETHOD(Clone)(IFolderFolder **resultFolder) PURE; +}; + +FOLDER_INTERFACE(IFolderSetFlatMode, 0x0A) +{ + STDMETHOD(SetFlatMode)(Int32 flatMode) PURE; +}; + +#define INTERFACE_FolderProperties(x) \ + STDMETHOD(GetNumberOfFolderProperties)(UInt32 *numProperties) x; \ + STDMETHOD(GetFolderPropertyInfo)(UInt32 index, BSTR *name, PROPID *propID, VARTYPE *varType) x; \ + +FOLDER_INTERFACE(IFolderProperties, 0x0E) +{ + INTERFACE_FolderProperties(PURE) +}; + +#define INTERFACE_IFolderArcProps(x) \ + STDMETHOD(GetArcNumLevels)(UInt32 *numLevels) x; \ + STDMETHOD(GetArcProp)(UInt32 level, PROPID propID, PROPVARIANT *value) x; \ + STDMETHOD(GetArcNumProps)(UInt32 level, UInt32 *numProps) x; \ + STDMETHOD(GetArcPropInfo)(UInt32 level, UInt32 index, BSTR *name, PROPID *propID, VARTYPE *varType) x; \ + STDMETHOD(GetArcProp2)(UInt32 level, PROPID propID, PROPVARIANT *value) x; \ + STDMETHOD(GetArcNumProps2)(UInt32 level, UInt32 *numProps) x; \ + STDMETHOD(GetArcPropInfo2)(UInt32 level, UInt32 index, BSTR *name, PROPID *propID, VARTYPE *varType) x; \ + +FOLDER_INTERFACE(IFolderArcProps, 0x10) +{ + INTERFACE_IFolderArcProps(PURE) +}; + +FOLDER_INTERFACE(IGetFolderArcProps, 0x11) +{ + STDMETHOD(GetFolderArcProps)(IFolderArcProps **object) PURE; +}; + +#define FOLDER_MANAGER_INTERFACE(i, x) DECL_INTERFACE(i, 9, x) + +#define INTERFACE_IFolderManager(x) \ + STDMETHOD(OpenFolderFile)(IInStream *inStream, const wchar_t *filePath, const wchar_t *arcFormat, IFolderFolder **resultFolder, IProgress *progress) x; \ + STDMETHOD(GetExtensions)(BSTR *extensions) x; \ + STDMETHOD(GetIconPath)(const wchar_t *ext, BSTR *iconPath, Int32 *iconIndex) x; \ + + // STDMETHOD(GetTypes)(BSTR *types) PURE; + // STDMETHOD(CreateFolderFile)(const wchar_t *type, const wchar_t *filePath, IProgress *progress) PURE; + +FOLDER_MANAGER_INTERFACE(IFolderManager, 0x05) +{ + INTERFACE_IFolderManager(PURE); +}; + + +#define IMP_IFolderFolder_GetProp(k) \ + (UInt32 index, BSTR *name, PROPID *propID, VARTYPE *varType) \ + { if(index >= sizeof(k) / sizeof(k[0])) return E_INVALIDARG; \ + const STATPROPSTG &srcItem = k[index]; \ + *propID = srcItem.propid; *varType = srcItem.vt; *name = 0; return S_OK; } \ + +#define IMP_IFolderFolder_Props(c) \ + STDMETHODIMP c::GetNumberOfProperties(UInt32 *numProperties) \ + { *numProperties = sizeof(kProps) / sizeof(kProps[0]); return S_OK; } \ + STDMETHODIMP c::GetPropertyInfo IMP_IFolderFolder_GetProp(kProps) + +#endif diff --git a/CPP/7zip/UI/FileManager/LangUtils.cpp b/CPP/7zip/UI/FileManager/LangUtils.cpp new file mode 100644 index 0000000..52f8534 --- /dev/null +++ b/CPP/7zip/UI/FileManager/LangUtils.cpp @@ -0,0 +1,208 @@ +// LangUtils.cpp + +#include "StdAfx.h" + +#include "LangUtils.h" +#include "Common/StringConvert.h" +#include "Common/StringToInt.h" +#include "Windows/Synchronization.h" +#include "Windows/Window.h" +#include "Windows/FileFind.h" +#include "RegistryUtils.h" +#include "ProgramLocation.h" + +using namespace NWindows; + +static CLang g_Lang; +UString g_LangID; + +#ifndef _UNICODE +extern bool g_IsNT; +#endif + +void ReloadLang() +{ + ReadRegLang(g_LangID); + g_Lang.Clear(); + if (!g_LangID.IsEmpty() && g_LangID != L"-") + { + UString langPath = g_LangID; + if (langPath.Find(WCHAR_PATH_SEPARATOR) < 0) + { + if (langPath.Find(L'.') < 0) + langPath += L".txt"; + UString folderPath; + if (GetProgramFolderPath(folderPath)) + langPath = folderPath + UString(L"Lang" WSTRING_PATH_SEPARATOR) + langPath; + } + g_Lang.Open(langPath); + } +} + +static bool g_Loaded = false; +static NSynchronization::CCriticalSection g_CriticalSection; + +void LoadLangOneTime() +{ + NSynchronization::CCriticalSectionLock lock(g_CriticalSection); + if (g_Loaded) + return; + g_Loaded = true; + ReloadLang(); +} + +void LangSetDlgItemsText(HWND dialogWindow, CIDLangPair *idLangPairs, int numItems) +{ + for (int i = 0; i < numItems; i++) + { + const CIDLangPair &idLangPair = idLangPairs[i]; + UString message; + if (g_Lang.GetMessage(idLangPair.LangID, message)) + { + NWindows::CWindow window(GetDlgItem(dialogWindow, idLangPair.ControlID)); + window.SetText(message); + } + } +} + +void LangSetWindowText(HWND window, UInt32 langID) +{ + UString message; + if (g_Lang.GetMessage(langID, message)) + MySetWindowText(window, message); +} + +UString LangString(UInt32 langID) +{ + UString message; + if (g_Lang.GetMessage(langID, message)) + return message; + return UString(); +} + +UString LangString(UINT resourceID, UInt32 langID) +{ + UString message; + if (g_Lang.GetMessage(langID, message)) + return message; + return NWindows::MyLoadStringW(resourceID); +} + +void LoadLangs(CObjectVector &langs) +{ + langs.Clear(); + UString folderPath; + if (!::GetProgramFolderPath(folderPath)) + return; + folderPath += L"Lang" WSTRING_PATH_SEPARATOR; + NWindows::NFile::NFind::CEnumeratorW enumerator(folderPath + L"*.txt"); + NWindows::NFile::NFind::CFileInfoW fileInfo; + while (enumerator.Next(fileInfo)) + { + if (fileInfo.IsDir()) + continue; + CLangEx lang; + UString filePath = folderPath + fileInfo.Name; + const int kExtSize = 4; + const UString ext = fileInfo.Name.Right(kExtSize); + if (ext.CompareNoCase(L".txt") != 0) + continue; + lang.ShortName = fileInfo.Name.Left(fileInfo.Name.Length() - kExtSize); + if (lang.Lang.Open(filePath)) + langs.Add(lang); + } +} + +bool SplidID(const UString &id, WORD &primID, WORD &subID) +{ + primID = 0; + subID = 0; + const wchar_t *start = id; + const wchar_t *end; + UInt64 value = ConvertStringToUInt64(start, &end); + if (start == end) + return false; + primID = (WORD)value; + if (*end == 0) + return true; + if (*end != L'-') + return false; + start = end + 1; + value = ConvertStringToUInt64(start, &end); + if (start == end) + return false; + subID = (WORD)value; + return (*end == 0); +} + +typedef LANGID (WINAPI *GetUserDefaultUILanguageP)(); + +void FindMatchLang(UString &shortName) +{ + shortName.Empty(); + + LANGID SystemDefaultLangID = GetSystemDefaultLangID(); // Lang for non-Unicode in XP64 + LANGID UserDefaultLangID = GetUserDefaultLangID(); // Standarts and formats in XP64 + + if (SystemDefaultLangID != UserDefaultLangID) + return; + LANGID langID = UserDefaultLangID; + /* + LANGID SystemDefaultUILanguage; // english in XP64 + LANGID UserDefaultUILanguage; // english in XP64 + + GetUserDefaultUILanguageP fn = (GetUserDefaultUILanguageP)GetProcAddress( + GetModuleHandle("kernel32"), "GetUserDefaultUILanguage"); + if (fn != NULL) + UserDefaultUILanguage = fn(); + fn = (GetUserDefaultUILanguageP)GetProcAddress( + GetModuleHandle("kernel32"), "GetSystemDefaultUILanguage"); + if (fn != NULL) + SystemDefaultUILanguage = fn(); + */ + + WORD primLang = (WORD)(PRIMARYLANGID(langID)); + WORD subLang = (WORD)(SUBLANGID(langID)); + CObjectVector langs; + LoadLangs(langs); + for (int i = 0; i < langs.Size(); i++) + { + const CLangEx &lang = langs[i]; + UString id; + if (lang.Lang.GetMessage(0x00000002, id)) + { + WORD primID; + WORD subID; + if (SplidID(id, primID, subID)) + if (primID == primLang) + { + if (subID == 0) + shortName = lang.ShortName; + if (subLang == subID) + { + shortName = lang.ShortName; + return; + } + } + } + } +} + +void ReloadLangSmart() +{ + #ifndef _UNICODE + if (g_IsNT) + #endif + { + ReadRegLang(g_LangID); + if (g_LangID.IsEmpty()) + { + UString shortName; + FindMatchLang(shortName); + if (shortName.IsEmpty()) + shortName = L"-"; + SaveRegLang(shortName); + } + } + ReloadLang(); +} diff --git a/CPP/7zip/UI/FileManager/LangUtils.h b/CPP/7zip/UI/FileManager/LangUtils.h new file mode 100644 index 0000000..40debdf --- /dev/null +++ b/CPP/7zip/UI/FileManager/LangUtils.h @@ -0,0 +1,41 @@ +// LangUtils.h + +#ifndef __LANGUTILS_H +#define __LANGUTILS_H + +#include "Common/Lang.h" +#include "Windows/ResourceString.h" + +extern UString g_LangID; + +struct CIDLangPair +{ + int ControlID; + UInt32 LangID; +}; + +void ReloadLang(); +void LoadLangOneTime(); +void ReloadLangSmart(); + +struct CLangEx +{ + CLang Lang; + UString ShortName; +}; + +void LoadLangs(CObjectVector &langs); + +void LangSetDlgItemsText(HWND dialogWindow, CIDLangPair *idLangPairs, int numItems); +void LangSetWindowText(HWND window, UInt32 langID); + +UString LangString(UInt32 langID); +UString LangString(UINT resourceID, UInt32 langID); + +#ifdef LANG +#define LangStringSpec(resourceID, langID) LangString(resourceID, langID) +#else +#define LangStringSpec(resourceID, langID) NWindows::MyLoadStringW(resourceID) +#endif + +#endif diff --git a/CPP/7zip/UI/FileManager/ListViewDialog.cpp b/CPP/7zip/UI/FileManager/ListViewDialog.cpp new file mode 100644 index 0000000..3fbfbf0 --- /dev/null +++ b/CPP/7zip/UI/FileManager/ListViewDialog.cpp @@ -0,0 +1,119 @@ +// ListViewDialog.cpp + +#include "StdAfx.h" + +#include "ListViewDialog.h" +#include "RegistryUtils.h" + +#ifdef LANG +#include "LangUtils.h" +static CIDLangPair kIDLangPairs[] = +{ + { IDOK, 0x02000702 }, + { IDCANCEL, 0x02000710 } +}; +#endif + +bool CListViewDialog::OnInit() +{ + #ifdef LANG + LangSetDlgItemsText(HWND(*this), kIDLangPairs, sizeof(kIDLangPairs) / sizeof(kIDLangPairs[0])); + #endif + _listView.Attach(GetItem(IDC_LISTVIEW_LIST)); + +//FIXME if (ReadSingleClick()) +//FIXME _listView.SetExtendedListViewStyle(LVS_EX_ONECLICKACTIVATE | LVS_EX_TRACKSELECT); + + SetText(Title); + + LVCOLUMN columnInfo; + columnInfo.mask = LVCF_FMT | LVCF_WIDTH | LVCF_SUBITEM; + columnInfo.fmt = LVCFMT_LEFT; + columnInfo.iSubItem = 0; + columnInfo.cx = 200; + + _listView.InsertColumn(0, &columnInfo); + + for (int i = 0; i < Strings.Size(); i++) + _listView.InsertItem(i, Strings[i]); + + if (Strings.Size() > 0) + _listView.SetItemState_FocusedSelected(0); + + _listView.SetColumnWidthAuto(0); + StringsWereChanged = false; + + NormalizeSize(); + return CModalDialog::OnInit(); +} + +#ifdef _WIN32 // FIXME +bool CListViewDialog::OnNotify(UINT /* controlID */, LPNMHDR header) +{ + if (header->hwndFrom != _listView) + return false; + switch(header->code) + { + case LVN_ITEMACTIVATE: + if (g_LVN_ITEMACTIVATE_Support) + { + OnOK(); + return true; + } + break; + case NM_DBLCLK: + case NM_RETURN: // probabably it's unused + if (!g_LVN_ITEMACTIVATE_Support) + { + OnOK(); + return true; + } + break; + + case LVN_KEYDOWN: + { + LPNMLVKEYDOWN keyDownInfo = LPNMLVKEYDOWN(header); + switch(keyDownInfo->wVKey) + { + case VK_DELETE: + { + if (!DeleteIsAllowed) + return false; + for (;;) + { + int index = _listView.GetNextSelectedItem(-1); + if (index < 0) + break; + StringsWereChanged = true; + _listView.DeleteItem(index); + Strings.Delete(index); + } + int focusedIndex = _listView.GetFocusedItem(); + if (focusedIndex >= 0) + _listView.SetItemState_FocusedSelected(focusedIndex); + _listView.SetColumnWidthAuto(0); + return true; + } + case 'A': + { + bool ctrl = (::GetKeyState(VK_CONTROL) & 0x8000) != 0; + if (ctrl) + { + int numItems = _listView.GetItemCount(); + for (int i = 0; i < numItems; i++) + _listView.SetItemState(i, LVIS_SELECTED, LVIS_SELECTED); + return true; + } + } + } + } + } + return false; +} +#endif + +void CListViewDialog::OnOK() +{ + FocusedItemIndex = _listView.GetFocusedItem(); + CModalDialog::OnOK(); +} diff --git a/CPP/7zip/UI/FileManager/ListViewDialog.h b/CPP/7zip/UI/FileManager/ListViewDialog.h new file mode 100644 index 0000000..a9b66c7 --- /dev/null +++ b/CPP/7zip/UI/FileManager/ListViewDialog.h @@ -0,0 +1,32 @@ +// ListViewDialog.h + +#ifndef __LISTVIEW_DIALOG_H +#define __LISTVIEW_DIALOG_H + +#include "Windows/Control/Dialog.h" +#include "Windows/Control/ListView.h" + +#include "ListViewDialogRes.h" + +class CListViewDialog: public NWindows::NControl::CModalDialog +{ + NWindows::NControl::CListView _listView; + virtual void OnOK(); + virtual bool OnInit(); +#ifdef _WIN32 // FIXME + virtual bool OnNotify(UINT controlID, LPNMHDR header); +#endif + +public: + UString Title; + bool DeleteIsAllowed; + bool StringsWereChanged; + UStringVector Strings; + int FocusedItemIndex; + + INT_PTR Create(HWND wndParent = 0) { return CModalDialog::Create(IDD_DIALOG_LISTVIEW, wndParent); } + + CListViewDialog(): DeleteIsAllowed(false) {} +}; + +#endif diff --git a/CPP/7zip/UI/FileManager/ListViewDialogRes.h b/CPP/7zip/UI/FileManager/ListViewDialogRes.h new file mode 100644 index 0000000..aaa6521 --- /dev/null +++ b/CPP/7zip/UI/FileManager/ListViewDialogRes.h @@ -0,0 +1,2 @@ +#define IDD_DIALOG_LISTVIEW 508 +#define IDC_LISTVIEW_LIST 1000 diff --git a/CPP/7zip/UI/FileManager/ListViewDialog_rc.cpp b/CPP/7zip/UI/FileManager/ListViewDialog_rc.cpp new file mode 100644 index 0000000..9b1776e --- /dev/null +++ b/CPP/7zip/UI/FileManager/ListViewDialog_rc.cpp @@ -0,0 +1,60 @@ +// PasswordDialog.cpp + +#include "StdAfx.h" + +// For compilers that support precompilation, includes "wx/wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +// for all others, include the necessary headers (this file is usually all you +// need because it includes almost all "standard" wxWidgets headers) +#ifndef WX_PRECOMP + #include "wx/wx.h" +#endif + +#include + +#undef _WIN32 + +#include "Windows/Control/DialogImpl.h" + +#include "ListViewDialogRes.h" + +class CListViewDialogImpl : public NWindows::NControl::CModalDialogImpl +{ + public: + CListViewDialogImpl(NWindows::NControl::CModalDialog *dialog,wxWindow * parent,int id) : + CModalDialogImpl(dialog,parent, id, wxT("ListView"), wxDefaultPosition, wxDefaultSize, + wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER | wxMAXIMIZE_BOX | wxMINIMIZE_BOX) + + { + + wxBoxSizer* topsizer = new wxBoxSizer(wxVERTICAL); + + wxListCtrl *list = new wxListCtrl(this, IDC_LISTVIEW_LIST, wxDefaultPosition, wxSize(645,195), wxLC_REPORT | wxLC_NO_HEADER); + + topsizer->Add(list, 1, wxALL|wxEXPAND, 5); + + topsizer->Add(CreateButtonSizer(wxOK|wxCANCEL), 0, wxALL|wxEXPAND, 5); + + this->OnInit(); + + SetSizer(topsizer); // use the sizer for layout + topsizer->SetSizeHints(this); // set size hints to honour minimum size + } +private: + // Any class wishing to process wxWindows events must use this macro + DECLARE_EVENT_TABLE() +}; + +REGISTER_DIALOG(IDD_DIALOG_LISTVIEW,CListViewDialog,0) + +BEGIN_EVENT_TABLE(CListViewDialogImpl, wxDialog) + EVT_BUTTON(wxID_ANY, CModalDialogImpl::OnAnyButton) + EVT_CHECKBOX(wxID_ANY, CModalDialogImpl::OnAnyButton) + EVT_MENU(WORKER_EVENT, CModalDialogImpl::OnWorkerEvent) +END_EVENT_TABLE() + diff --git a/CPP/7zip/UI/FileManager/MessagesDialog.cpp b/CPP/7zip/UI/FileManager/MessagesDialog.cpp new file mode 100644 index 0000000..41ca059 --- /dev/null +++ b/CPP/7zip/UI/FileManager/MessagesDialog.cpp @@ -0,0 +1,77 @@ +// MessagesDialog.cpp + +#include "StdAfx.h" + +#include "Common/IntToString.h" + +#include "Windows/ResourceString.h" + +#include "MessagesDialog.h" + +#ifdef LANG +#include "LangUtils.h" +#endif + +using namespace NWindows; + +#ifdef LANG +static CIDLangPair kIDLangPairs[] = +{ + { IDOK, 0x02000713 } +}; +#endif + +void CMessagesDialog::AddMessageDirect(LPCWSTR message) +{ + int itemIndex = _messageList.GetItemCount(); + wchar_t sz[32]; + ConvertInt64ToString(itemIndex, sz); + _messageList.InsertItem(itemIndex, sz); + _messageList.SetSubItem(itemIndex, 1, message); +} + +void CMessagesDialog::AddMessage(LPCWSTR message) +{ + UString s = message; + while (!s.IsEmpty()) + { + int pos = s.Find(L'\n'); + if (pos < 0) + break; + AddMessageDirect(s.Left(pos)); + s.Delete(0, pos + 1); + } + AddMessageDirect(s); +} + +bool CMessagesDialog::OnInit() +{ + #ifdef LANG + LangSetWindowText(HWND(*this), 0x02000A00); + LangSetDlgItemsText(HWND(*this), kIDLangPairs, sizeof(kIDLangPairs) / sizeof(kIDLangPairs[0])); + #endif + _messageList.Attach(GetItem(IDC_MESSAGE_LIST)); + + #ifndef UNDER_CE + _messageList.SetUnicodeFormat(true); + #endif + + _messageList.InsertColumn(0, L"", 30); + + const UString s = + #ifdef LANG + LangString(IDS_MESSAGES_DIALOG_MESSAGE_COLUMN, 0x02000A80); + #else + MyLoadStringW(IDS_MESSAGES_DIALOG_MESSAGE_COLUMN); + #endif + + _messageList.InsertColumn(1, s, 600); + + for (int i = 0; i < Messages->Size(); i++) + AddMessage((*Messages)[i]); + + _messageList.SetColumnWidthAuto(0); + _messageList.SetColumnWidthAuto(1); + NormalizeSize(); + return CModalDialog::OnInit(); +} diff --git a/CPP/7zip/UI/FileManager/MessagesDialog.h b/CPP/7zip/UI/FileManager/MessagesDialog.h new file mode 100644 index 0000000..344718f --- /dev/null +++ b/CPP/7zip/UI/FileManager/MessagesDialog.h @@ -0,0 +1,22 @@ +// MessagesDialog.h + +#ifndef __MESSAGES_DIALOG_H +#define __MESSAGES_DIALOG_H + +#include "Windows/Control/Dialog.h" +#include "Windows/Control/ListView.h" + +#include "MessagesDialogRes.h" + +class CMessagesDialog: public NWindows::NControl::CModalDialog +{ + NWindows::NControl::CListView _messageList; + void AddMessageDirect(LPCWSTR message); + void AddMessage(LPCWSTR message); + virtual bool OnInit(); +public: + const UStringVector *Messages; + INT_PTR Create(HWND parent = 0) { return CModalDialog::Create(IDD_DIALOG_MESSAGES, parent); } +}; + +#endif diff --git a/CPP/7zip/UI/FileManager/MessagesDialogRes.h b/CPP/7zip/UI/FileManager/MessagesDialogRes.h new file mode 100644 index 0000000..39d49f5 --- /dev/null +++ b/CPP/7zip/UI/FileManager/MessagesDialogRes.h @@ -0,0 +1,3 @@ +#define IDS_MESSAGES_DIALOG_MESSAGE_COLUMN 503 +#define IDD_DIALOG_MESSAGES 503 +#define IDC_MESSAGE_LIST 1000 diff --git a/CPP/7zip/UI/FileManager/MessagesDialog_rc.cpp b/CPP/7zip/UI/FileManager/MessagesDialog_rc.cpp new file mode 100644 index 0000000..4d58afd --- /dev/null +++ b/CPP/7zip/UI/FileManager/MessagesDialog_rc.cpp @@ -0,0 +1,89 @@ +// MessagesDialog_rc.cpp + +#include "StdAfx.h" + +// For compilers that support precompilation, includes "wx/wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +// for all others, include the necessary headers (this file is usually all you +// need because it includes almost all "standard" wxWidgets headers) +#ifndef WX_PRECOMP + #include "wx/wx.h" +#endif + +#include + +#undef _WIN32 + +#include "Windows/Control/DialogImpl.h" +#include "MessagesDialogRes.h" + +/* +IDD_DIALOG_MESSAGES DIALOG 0, 0, xSize, ySize MY_MODAL_DIALOG_STYLE +CAPTION "7-Zip: Diagnostic messages" +MY_FONT +BEGIN + DEFPUSHBUTTON "&Close", IDOK, bXPos, bYPos, bXSize, bYSize + CONTROL "List1",IDC_MESSAGE_LIST,"SysListView32", + LVS_REPORT | LVS_SHOWSELALWAYS | LVS_NOSORTHEADER | WS_BORDER | WS_TABSTOP, + marg, marg, xSize2, ySize2 - bYSize - 6 +END + +STRINGTABLE +BEGIN + IDS_MESSAGES_DIALOG_MESSAGE_COLUMN "Message" +END +*/ + +class CMessagesDialogImpl : public NWindows::NControl::CModalDialogImpl +{ + public: + CMessagesDialogImpl(NWindows::NControl::CModalDialog *dialog,wxWindow * parent , int id) : + CModalDialogImpl(dialog,parent, id, wxT("7-Zip: Diagnostic messages"), wxDefaultPosition, wxDefaultSize, + wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER | wxMAXIMIZE_BOX | wxMINIMIZE_BOX) + { + wxBoxSizer* topsizer = new wxBoxSizer(wxVERTICAL); + + + wxListCtrl *list = new wxListCtrl(this, IDC_MESSAGE_LIST, wxDefaultPosition, wxSize(645,195), wxLC_REPORT ); + +#if 0 + list->InsertColumn(0, wxT("Col1"), wxLIST_FORMAT_LEFT); + list->InsertColumn(1, wxT("Col2"), wxLIST_FORMAT_RIGHT); + list->InsertItem(0, wxT("#1")); + list->SetItem(0, 1, L"message 1"); + list->InsertItem(1, wxT("#2")); + list->SetItem(1, 1, L"message 2"); +#endif + topsizer->Add(list , 1, wxALL|wxEXPAND, 5); + + + topsizer->Add(new wxButton(this, wxID_OK, _T("&Close")) , 0, wxALL | wxALIGN_RIGHT, 5); + + this->OnInit(); + + SetSizer(topsizer); // use the sizer for layout + topsizer->SetSizeHints(this); // set size hints to honour minimum size + } +private: + // Any class wishing to process wxWindows events must use this macro + DECLARE_EVENT_TABLE() +}; + +static CStringTable g_stringTable[] = +{ + { IDS_MESSAGES_DIALOG_MESSAGE_COLUMN, L"Message" }, + { 0 , 0 } +}; + +REGISTER_DIALOG(IDD_DIALOG_MESSAGES,CMessagesDialog,g_stringTable) + +BEGIN_EVENT_TABLE(CMessagesDialogImpl, wxDialog) + EVT_BUTTON(wxID_ANY, CModalDialogImpl::OnAnyButton) + EVT_MENU(WORKER_EVENT, CModalDialogImpl::OnWorkerEvent) +END_EVENT_TABLE() + diff --git a/CPP/7zip/UI/FileManager/MyLoadMenu.cpp b/CPP/7zip/UI/FileManager/MyLoadMenu.cpp new file mode 100644 index 0000000..69dc264 --- /dev/null +++ b/CPP/7zip/UI/FileManager/MyLoadMenu.cpp @@ -0,0 +1,765 @@ +// MyLoadMenu + +#include "StdAfx.h" + +// For compilers that support precompilation, includes "wx/wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ +#pragma hdrstop +#endif + +#ifndef WX_PRECOMP +#include "wx/wx.h" +#endif + +#undef _WIN32 + +#include + +typedef wxMenuBar * HMENU; + +#include "Common/StringConvert.h" + +#include "Windows/Menu.h" +#include "Windows/Error.h" +// FIXME #include "Windows/Clipboard.h" + +#include "../../PropID.h" + +#include "resource.h" +#include "App.h" +// FIXME #include "AboutDialog.h" +#include "../Common/CompressCall.h" + +#include "HelpUtils.h" +#include "LangUtils.h" +#include "PluginInterface.h" + +#include "../../MyVersion.h" + +static const UINT kOpenBookmarkMenuID = 730; +static const UINT kSetBookmarkMenuID = 740; + +extern HINSTANCE g_hInstance; + +static LPCWSTR kFMHelpTopic = L"fm/index.htm"; + +extern void OptionsDialog(HWND hwndOwner, HINSTANCE hInstance); + +using namespace NWindows; + +static const int kFileMenuIndex = 0; +static const int kEditMenuIndex = 1; +static const int kViewMenuIndex = 2; +static const int kBookmarksMenuIndex = kViewMenuIndex + 1; + +struct CStringLangPair +{ + wchar_t *String; + UINT32 LangID; +}; + +static CStringLangPair kStringLangPairs[] = +{ + { L"&File", 0x03000102 }, + { L"&Edit", 0x03000103 }, + { L"&View", 0x03000104 }, + { L"&Bookmarks", 0x03000107 }, + { L"&Tools", 0x03000105 }, + { L"&Help", 0x03000106 }, +}; + +UINT32 kAddToFavoritesLangID = 0x03000710; +UINT32 kToolbarsLangID = 0x03000451; + +/* +static int FindStringLangItem(const UString &anItem) +{ + for (int i = 0; i < sizeof(kStringLangPairs) / + sizeof(kStringLangPairs[0]); i++) + if (anItem.CompareNoCase(kStringLangPairs[i].String) == 0) + return i; + return -1; +} +*/ + +static CIDLangPair kIDLangPairs[] = +{ + // File + { IDM_FILE_OPEN, 0x03000210 }, + { IDM_FILE_OPEN_INSIDE, 0x03000211 }, + { IDM_FILE_OPEN_OUTSIDE, 0x03000212 }, + // { IDM_FILE_VIEW, 0x03000220 }, // FIXME : does not exist ! + { IDM_FILE_EDIT, 0x03000221 }, + { IDM_RENAME, 0x03000230 }, + { IDM_COPY_TO, 0x03000231 }, + { IDM_MOVE_TO, 0x03000232 }, + { IDM_DELETE, 0x03000233 }, + { IDM_FILE_PROPERTIES, 0x03000240 }, + { IDM_FILE_COMMENT, 0x03000241 }, + { IDM_FILE_CRC, 0x03000242 }, + { IDM_FILE_DIFF, 0x03000243 }, + { IDM_FILE_SPLIT, 0x03000270 }, + { IDM_FILE_COMBINE, 0x03000271 }, + { IDM_CREATE_FOLDER, 0x03000250 }, + { IDM_CREATE_FILE, 0x03000251 }, + // FIXME { IDCLOSE, 0x03000260 }, + + // Edit + { IDM_EDIT_CUT, 0x03000320 }, + { IDM_EDIT_COPY, 0x03000321 }, + { IDM_EDIT_PASTE, 0x03000322 }, + + { IDM_SELECT_ALL, 0x03000330 }, + { IDM_DESELECT_ALL, 0x03000331 }, + { IDM_INVERT_SELECTION, 0x03000332 }, + { IDM_SELECT, 0x03000333 }, + { IDM_DESELECT, 0x03000334 }, + { IDM_SELECT_BY_TYPE, 0x03000335 }, + { IDM_DESELECT_BY_TYPE, 0x03000336 }, + + { IDM_VIEW_LARGE_ICONS, 0x03000410 }, + { IDM_VIEW_SMALL_ICONS, 0x03000411 }, + { IDM_VIEW_LIST, 0x03000412 }, + { IDM_VIEW_DETAILS, 0x03000413 }, + + { IDM_VIEW_ARANGE_BY_NAME, 0x02000204 }, + { IDM_VIEW_ARANGE_BY_TYPE, 0x02000214 }, + { IDM_VIEW_ARANGE_BY_DATE, 0x0200020C }, + { IDM_VIEW_ARANGE_BY_SIZE, 0x02000207 }, + { IDM_VIEW_ARANGE_NO_SORT, 0x03000420 }, + + { IDM_OPEN_ROOT_FOLDER, 0x03000430 }, + { IDM_OPEN_PARENT_FOLDER, 0x03000431 }, + { IDM_FOLDERS_HISTORY, 0x03000432 }, + + { IDM_VIEW_REFRESH, 0x03000440 }, + + { IDM_VIEW_FLAT_VIEW, 0x03000449 }, + { IDM_VIEW_TWO_PANELS, 0x03000450 }, + { IDM_VIEW_ARCHIVE_TOOLBAR, 0x03000460 }, + { IDM_VIEW_STANDARD_TOOLBAR, 0x03000461 }, + { IDM_VIEW_TOOLBARS_LARGE_BUTTONS, 0x03000462 }, + { IDM_VIEW_TOOLBARS_SHOW_BUTTONS_TEXT, 0x03000463 }, + + { IDM_OPTIONS, 0x03000510 }, + { IDM_BENCHMARK, 0x03000511 }, + + { IDM_HELP_CONTENTS, 0x03000610 }, + { IDM_ABOUT, 0x03000620 }, + + { 12111 , 0x03000710 }, // FIXME kAddToFavoritesLangID + { 12112 , 0x03000451 } // FIXME kToolbarsLangID +}; + + +#ifdef _WIN32 +static int FindLangItem(int ControlID) +{ + for (int i = 0; i < sizeof(kIDLangPairs) / sizeof(kIDLangPairs[0]); i++) + if (kIDLangPairs[i].ControlID == ControlID) + return i; + return -1; +} +#endif + + +/* +static bool g_IsNew_fMask = true; + +class CInit_fMask +{ +public: + CInit_fMask() + { + g_IsNew_fMask = false; + OSVERSIONINFO vi; + vi.dwOSVersionInfoSize = sizeof(vi); + if (::GetVersionEx(&vi)) + { + g_IsNew_fMask = (vi.dwMajorVersion > 4 || + (vi.dwMajorVersion == 4 && vi.dwMinorVersion > 0)); + } + g_IsNew_fMask = false; + } +} g_Init_fMask; + +// it's hack for supporting Windows NT +// constants are from WinUser.h + +#if(WINVER < 0x0500) +#define MIIM_STRING 0x00000040 +#define MIIM_BITMAP 0x00000080 +#define MIIM_FTYPE 0x00000100 +#endif + +static UINT Get_fMaskForString() +{ + return g_IsNew_fMask ? MIIM_STRING : MIIM_TYPE; +} + +static UINT Get_fMaskForFTypeAndString() +{ + return g_IsNew_fMask ? (MIIM_STRING | MIIM_FTYPE) : MIIM_TYPE; +} +*/ + +#ifdef _WIN32 +static UINT Get_fMaskForString() +{ + return MIIM_TYPE; +} + +static UINT Get_fMaskForFTypeAndString() +{ + return MIIM_TYPE; +} +#endif + + +static void MyChangeItem(wxMenuItem * mi,int LangID) +{ + UString newString = LangString(LangID); + if (newString.IsEmpty()) + return; + wxString ss = mi->GetItemLabel(); + UString shorcutString((const wchar_t *)ss); // = item.StringValue; + int tabPos = shorcutString.ReverseFind(wchar_t('\t')); + if (tabPos >= 0) + newString += shorcutString.Mid(tabPos); + // printf("Change Menu : %ls => %ls\n",(const wchar_t *)ss,(const wchar_t *)newString); + mi->SetItemLabel((const wchar_t *)newString); + +} + +static void MyChangeMenu(HMENU menuLoc, int level, int menuIndex) +{ + // Sets the label of the top-level menus + for (int i1= 0; i1< sizeof(kStringLangPairs) / sizeof(kStringLangPairs[0]); i1++) + { + UString newString = LangString(kStringLangPairs[i1].LangID); + if (! newString.IsEmpty()) menuLoc->SetMenuLabel(i1, (const TCHAR *)newString); + } + + // sub-menu items + for (int i = 0; i < sizeof(kIDLangPairs) / sizeof(kIDLangPairs[0]); i++) + { + wxMenuItem * mi = menuLoc->FindItem(kIDLangPairs[i].ControlID); + if (mi) + { + MyChangeItem(mi,kIDLangPairs[i].LangID); + } +// else +// printf("Change Menu : id=%d index=%d<>\n",kIDLangPairs[i].ControlID,i); + } +} + +#ifdef _WIN32 +CMenu g_FileMenu; + +class CFileMenuDestroyer +{ +public: + ~CFileMenuDestroyer() + { + if ((HMENU)g_FileMenu != 0) + g_FileMenu.Destroy(); + } +} g_FileMenuDestroyer; +#endif + + +void MyLoadMenu(HWND hWnd) +{ +#ifdef _WIN32 + if ((HMENU)g_FileMenu != 0) + g_FileMenu.Destroy(); + HMENU oldMenu = ::GetMenu(hWnd); + HMENU baseMenu = ::LoadMenu(g_hInstance, MAKEINTRESOURCE(IDM_MENU)); + ::SetMenu(hWnd, baseMenu); + ::DestroyMenu(oldMenu); + if (!g_LangID.IsEmpty()) + { + HMENU menuOld = ::GetMenu(hWnd); + MyChangeMenu(menuOld, 0, 0); + } + ::DrawMenuBar(hWnd); +#else + extern void rc_MyLoadMenu(HWND hWnd); + rc_MyLoadMenu(hWnd); + if (!g_LangID.IsEmpty()) + { + HMENU menuOld = ((wxFrame *)hWnd)->GetMenuBar(); // ::GetMenu(hWnd); + MyChangeMenu(menuOld, 0, 0); + } +#endif +} + +#ifdef _WIN32 +extern HWND g_HWND; +void MyLoadMenu() +{ + MyLoadMenu(g_HWND); +} + +static void CopyMenu(HMENU srcMenuSpec, HMENU destMenuSpec) +{ + CMenu srcMenu; + srcMenu.Attach(srcMenuSpec); + CMenu destMenu; + destMenu.Attach(destMenuSpec); + int startPos = 0; + for (int i = 0; i < srcMenu.GetItemCount(); i++) + { + CMenuItem item; + item.fMask = MIIM_STATE | MIIM_ID | Get_fMaskForFTypeAndString(); + item.fType = MFT_STRING; + if (srcMenu.GetItem(i, true, item)) + if (destMenu.InsertItem(startPos, true, item)) + startPos++; + } +} + +void OnMenuActivating(HWND /* hWnd */, HMENU hMenu, int position) +{ + if (::GetSubMenu(::GetMenu(g_HWND), position) != hMenu) + return; + if (position == kFileMenuIndex) + { + if ((HMENU)g_FileMenu == 0) + { + g_FileMenu.CreatePopup(); + CopyMenu(hMenu, g_FileMenu); + } + CMenu menu; + menu.Attach(hMenu); + while (menu.GetItemCount() > 0) + { + if (!menu.RemoveItem(0, MF_BYPOSITION)) + break; + } + // CopyMenu(g_FileMenu, hMenu); + g_App.GetFocusedPanel().CreateFileMenu(hMenu); + } + else if (position == kEditMenuIndex) + { + /* + CMenu menu; + menu.Attach(hMenu); + menu.EnableItem(IDM_EDIT_CUT, MF_ENABLED); + menu.EnableItem(IDM_EDIT_COPY, MF_ENABLED); + menu.EnableItem(IDM_EDIT_PASTE, IsClipboardFormatAvailableHDROP() ? MF_ENABLED : MF_GRAYED); + */ + } + else if (position == kViewMenuIndex) + { + // View; + CMenu menu; + menu.Attach(hMenu); + menu.CheckRadioItem(IDM_VIEW_LARGE_ICONS, IDM_VIEW_DETAILS, + IDM_VIEW_LARGE_ICONS + g_App.GetListViewMode(), MF_BYCOMMAND); + menu.CheckItem(IDM_VIEW_TWO_PANELS, MF_BYCOMMAND | + ((g_App.NumPanels == 2) ? MF_CHECKED : MF_UNCHECKED)); + menu.CheckItem(IDM_VIEW_FLAT_VIEW, MF_BYCOMMAND | + ((g_App.GetFlatMode()) ? MF_CHECKED : MF_UNCHECKED)); + menu.CheckItem(IDM_VIEW_ARCHIVE_TOOLBAR, MF_BYCOMMAND | + (g_App.ShowArchiveToolbar ? MF_CHECKED : MF_UNCHECKED)); + menu.CheckItem(IDM_VIEW_STANDARD_TOOLBAR, MF_BYCOMMAND | + (g_App.ShowStandardToolbar ? MF_CHECKED : MF_UNCHECKED)); + menu.CheckItem(IDM_VIEW_TOOLBARS_LARGE_BUTTONS, MF_BYCOMMAND | + (g_App.LargeButtons ? MF_CHECKED : MF_UNCHECKED)); + menu.CheckItem(IDM_VIEW_TOOLBARS_SHOW_BUTTONS_TEXT, MF_BYCOMMAND | + (g_App.ShowButtonsLables ? MF_CHECKED : MF_UNCHECKED)); + } + else if (position == kBookmarksMenuIndex) + { + CMenu menu; + menu.Attach(hMenu); + + CMenu subMenu; + subMenu.Attach(menu.GetSubMenu(0)); + while (subMenu.GetItemCount() > 0) + subMenu.RemoveItem(subMenu.GetItemCount() - 1, MF_BYPOSITION); + int i; + for (i = 0; i < 10; i++) + { + UString s = LangString(IDS_BOOKMARK, 0x03000720); + s += L" "; + wchar_t c = (wchar_t)(L'0' + i); + s += c; + s += L"\tAlt+Shift+"; + s += c; + subMenu.AppendItem(MF_STRING, kSetBookmarkMenuID + i, s); + } + + while (menu.GetItemCount() > 2) + menu.RemoveItem(menu.GetItemCount() - 1, MF_BYPOSITION); + + for (i = 0; i < 10; i++) + { + UString path = g_App.AppState.FastFolders.GetString(i); + const int kMaxSize = 100; + const int kFirstPartSize = kMaxSize / 2; + if (path.Length() > kMaxSize) + { + path = path.Left(kFirstPartSize) + UString(L" ... ") + + path.Right(kMaxSize - kFirstPartSize); + } + UString s = path; + if (s.IsEmpty()) + s = L"-"; + s += L"\tAlt+"; + s += (wchar_t)(L'0' + i); + menu.AppendItem(MF_STRING, kOpenBookmarkMenuID + i, s); + } + } +} + +/* +It doesn't help +void OnMenuUnActivating(HWND hWnd, HMENU hMenu, int id) +{ + if (::GetSubMenu(::GetMenu(g_HWND), 0) != hMenu) + return; + // g_App.GetFocusedPanel()._contextMenu.Release(); +} + +void OnMenuUnActivating(HWND hWnd) +{ +} +*/ + + +void LoadFileMenu(HMENU hMenu, int startPos, bool /* forFileMode */, bool programMenu) +{ + { + CMenu srcMenu; + srcMenu.Attach(::GetSubMenu(::GetMenu(g_HWND), 0)); + if ((HMENU)g_FileMenu == 0) + { + g_FileMenu.CreatePopup(); + CopyMenu(srcMenu, g_FileMenu); + } + } + + CMenu destMenu; + destMenu.Attach(hMenu); + + for (int i = 0; i < g_FileMenu.GetItemCount(); i++) + { + CMenuItem item; + + item.fMask = MIIM_STATE | MIIM_ID | Get_fMaskForFTypeAndString(); + item.fType = MFT_STRING; + if (g_FileMenu.GetItem(i, true, item)) + { + if (!programMenu) + if (item.wID == IDCLOSE) + continue; + /* + bool createItem = (item.wID == IDM_CREATE_FOLDER || item.wID == IDM_CREATE_FILE); + if (forFileMode) + { + if (createItem) + continue; + } + else + { + if (!createItem) + continue; + } + */ + if (destMenu.InsertItem(startPos, true, item)) + startPos++; + } + } + while (destMenu.GetItemCount() > 0) + { + CMenuItem item; + item.fMask = MIIM_TYPE; + item.fType = 0; + // item.dwTypeData = 0; + int lastIndex = destMenu.GetItemCount() - 1; + if (!destMenu.GetItem(lastIndex, true, item)) + break; + if(item.fType != MFT_SEPARATOR) + break; + if (!destMenu.RemoveItem(lastIndex, MF_BYPOSITION)) + break; + } +} +#endif + +bool ExecuteFileCommand(int id) +{ + if (id >= kPluginMenuStartID) + { +#ifdef _WIN32 + g_App.GetFocusedPanel().InvokePluginCommand(id); + g_App.GetFocusedPanel()._sevenZipContextMenu.Release(); + g_App.GetFocusedPanel()._systemContextMenu.Release(); +#endif + return true; + } + + switch (id) + { + // File + case IDM_FILE_OPEN: + g_App.OpenItem(); + break; + case IDM_FILE_OPEN_INSIDE: + g_App.OpenItemInside(); + break; + case IDM_FILE_OPEN_OUTSIDE: + g_App.OpenItemOutside(); + break; + case IDM_FILE_VIEW: + break; + case IDM_FILE_EDIT: + g_App.EditItem(); + break; + case IDM_RENAME: + g_App.Rename(); + break; + case IDM_COPY_TO: + g_App.CopyTo(); + break; + case IDM_MOVE_TO: + g_App.MoveTo(); + break; + case IDM_DELETE: + { +#ifdef _WIN32 // FIXME + bool shift = (::GetKeyState(VK_SHIFT) & 0x8000) != 0; + g_App.Delete(!shift); +#else + g_App.Delete(true); +#endif + break; + } + case IDM_FILE_CRC: + g_App.CalculateCrc(); + break; + case IDM_FILE_DIFF: + g_App.DiffFiles(); + break; + case IDM_FILE_SPLIT: + g_App.Split(); + break; + case IDM_FILE_COMBINE: + g_App.Combine(); + break; + case IDM_FILE_PROPERTIES: + g_App.Properties(); + break; + case IDM_FILE_COMMENT: + g_App.Comment(); + break; + + case IDM_CREATE_FOLDER: + g_App.CreateFolder(); + break; + case IDM_CREATE_FILE: + g_App.CreateFile(); + break; + default: + return false; + } + return true; +} + +void createAboutDialog(void) +{ + wxAboutDialogInfo info; + + UString msg; + + msg = LangString(0x01000103); // IDC_ABOUT_STATIC_REGISTER_INFO + if (msg == L"") msg = L"7-Zip is free software. However, you can support development of 7-Zip by registering."; + info.SetDescription((const wchar_t *)msg); + + + info.SetName(_("P7ZIP")); + info.SetVersion(wxString(MY_7ZIP_VERSION, wxConvUTF8)); + info.SetCopyright(wxString(MY_COPYRIGHT, wxConvUTF8)); + info.SetWebSite(_T("www.7-zip.org")); + + wxAboutBox(info); +} + +bool OnMenuCommand(HWND hWnd, int id) +{ + printf("DEBUG : OnMenuCommand(%p,id=%d)-0\n",hWnd,id); + + if (ExecuteFileCommand(id)) + return true; + + printf("DEBUG : OnMenuCommand(%p,id=%d)-1\n",hWnd,id); + + switch (id) + { + // File + case IDCLOSE: + /* FIXME + SendMessage(hWnd, WM_ACTIVATE, MAKEWPARAM(WA_INACTIVE, 0), (LPARAM)hWnd); + SendMessage (hWnd, WM_CLOSE, 0, 0); + */ + hWnd->Close(true); + break; + + // Edit + case IDM_EDIT_CUT: + g_App.EditCut(); + break; + case IDM_EDIT_COPY: + g_App.EditCopy(); + break; + case IDM_EDIT_PASTE: + g_App.EditPaste(); + break; + case IDM_SELECT_ALL: + g_App.SelectAll(true); + g_App.RefreshStatusBar(); + break; + case IDM_DESELECT_ALL: + g_App.SelectAll(false); + g_App.RefreshStatusBar(); + break; + case IDM_INVERT_SELECTION: + g_App.InvertSelection(); + g_App.RefreshStatusBar(); + break; + case IDM_SELECT: + g_App.SelectSpec(true); + g_App.RefreshStatusBar(); + break; + case IDM_DESELECT: + g_App.SelectSpec(false); + g_App.RefreshStatusBar(); + break; + case IDM_SELECT_BY_TYPE: + g_App.SelectByType(true); + g_App.RefreshStatusBar(); + break; + case IDM_DESELECT_BY_TYPE: + g_App.SelectByType(false); + g_App.RefreshStatusBar(); + break; + + //View + case IDM_VIEW_LARGE_ICONS: + case IDM_VIEW_SMALL_ICONS: + case IDM_VIEW_LIST: + case IDM_VIEW_DETAILS: + { + UINT index = id - IDM_VIEW_LARGE_ICONS; + if (index < 4) + { + g_App.SetListViewMode(index); + /* + CMenu menu; + menu.Attach(::GetSubMenu(::GetMenu(hWnd), kViewMenuIndex)); + menu.CheckRadioItem(IDM_VIEW_LARGE_ICONS, IDM_VIEW_DETAILS, + id, MF_BYCOMMAND); + */ + } + break; + } + case IDM_VIEW_ARANGE_BY_NAME: + { + g_App.SortItemsWithPropID(kpidName); + break; + } + case IDM_VIEW_ARANGE_BY_TYPE: + { + g_App.SortItemsWithPropID(kpidExtension); + break; + } + case IDM_VIEW_ARANGE_BY_DATE: + { + g_App.SortItemsWithPropID(kpidMTime); + break; + } + case IDM_VIEW_ARANGE_BY_SIZE: + { + g_App.SortItemsWithPropID(kpidSize); + break; + } + case IDM_VIEW_ARANGE_NO_SORT: + { + g_App.SortItemsWithPropID(kpidNoProperty); + break; + } + + case IDM_OPEN_ROOT_FOLDER: + g_App.OpenRootFolder(); + break; + case IDM_OPEN_PARENT_FOLDER: + g_App.OpenParentFolder(); + break; + case IDM_FOLDERS_HISTORY: + g_App.FoldersHistory(); + break; + case IDM_VIEW_REFRESH: + g_App.RefreshView(); + break; + case IDM_VIEW_FLAT_VIEW: + g_App.ChangeFlatMode(); + break; + case IDM_VIEW_TWO_PANELS: + g_App.SwitchOnOffOnePanel(); + break; + case IDM_VIEW_STANDARD_TOOLBAR: + g_App.SwitchStandardToolbar(); + break; + case IDM_VIEW_ARCHIVE_TOOLBAR: + g_App.SwitchArchiveToolbar(); + break; + case IDM_VIEW_TOOLBARS_SHOW_BUTTONS_TEXT: + g_App.SwitchButtonsLables(); + break; + case IDM_VIEW_TOOLBARS_LARGE_BUTTONS: + g_App.SwitchLargeButtons(); + break; + + // Tools + case IDM_OPTIONS: + // FIXME OptionsDialog(hWnd, g_hInstance); + break; + + case IDM_BENCHMARK: + Benchmark(); + break; + // Help + case IDM_HELP_CONTENTS: + ShowHelpWindow(NULL, kFMHelpTopic); + break; + case IDM_ABOUT: + { + /* FIXME + CAboutDialog dialog; + dialog.Create(hWnd); + */ + createAboutDialog(); + break; + } + default: + { + if (id >= kOpenBookmarkMenuID && id <= kOpenBookmarkMenuID + 9) + { + g_App.OpenBookmark(id - kOpenBookmarkMenuID); + return true; + } + else if (id >= kSetBookmarkMenuID && id <= kSetBookmarkMenuID + 9) + { + g_App.SetBookmark(id - kSetBookmarkMenuID); + return true; + } + return false; + } + } + return true; +} + diff --git a/CPP/7zip/UI/FileManager/MyLoadMenu.h b/CPP/7zip/UI/FileManager/MyLoadMenu.h new file mode 100644 index 0000000..9dae77f --- /dev/null +++ b/CPP/7zip/UI/FileManager/MyLoadMenu.h @@ -0,0 +1,20 @@ +// MyLoadMenu.h + +#ifndef __MYLOADMENU_H +#define __MYLOADMENU_H + +class myHMENU; // FIXME +typedef myHMENU * HMENU; // FIXME + +void OnMenuActivating(HWND hWnd, HMENU hMenu, int position); +// void OnMenuUnActivating(HWND hWnd, HMENU hMenu, int id); +// void OnMenuUnActivating(HWND hWnd); + +void MyLoadMenu(HWND hWnd); +bool OnMenuCommand(HWND hWnd, int id); +void MyLoadMenu(); +void LoadFileMenu(HMENU hMenu, int startPos, bool programMenu, + bool isFsFolder, int numItems, bool allAreFiles); +bool ExecuteFileCommand(int id); + +#endif diff --git a/CPP/7zip/UI/FileManager/NetFolder.h.OUT b/CPP/7zip/UI/FileManager/NetFolder.h.OUT new file mode 100644 index 0000000..384e7f1 --- /dev/null +++ b/CPP/7zip/UI/FileManager/NetFolder.h.OUT @@ -0,0 +1,56 @@ +// NetFolder.h + +#ifndef __NETFOLDER_H +#define __NETFOLDER_H + +#include "Common/MyString.h" +#include "Common/Buffer.h" +#include "Common/MyCom.h" +#include "Windows/PropVariant.h" +// FIXME #include "Windows/Net.h" + +#include "IFolder.h" + +struct CResourceEx // FIXME : public NWindows::NNet::CResourceW +{ + UString Name; +}; + +class CNetFolder: + public IFolderFolder, + public IFolderGetSystemIconIndex, + public CMyUnknownImp +{ +public: + MY_UNKNOWN_IMP1( + IFolderGetSystemIconIndex + ) + + INTERFACE_FolderFolder(;) + + STDMETHOD(GetSystemIconIndex)(UInt32 index, INT32 *iconIndex); + +private: +#ifdef _WIN32 + NWindows::NNet::CResourceW _netResource; + NWindows::NNet::CResourceW *_netResourcePointer; +#else + int _netResource; + int *_netResourcePointer; +#endif + + CObjectVector _items; + + CMyComPtr _parentFolder; + UString _path; + +public: + void Init(const UString &path); +#ifdef _WIN32 + void Init(const NWindows::NNet::CResourceW *netResource, + IFolderFolder *parentFolder, const UString &path); + CNetFolder(): _netResourcePointer(0) {} +#endif +}; + +#endif diff --git a/CPP/7zip/UI/FileManager/OpenCallback.cpp b/CPP/7zip/UI/FileManager/OpenCallback.cpp new file mode 100644 index 0000000..72245ac --- /dev/null +++ b/CPP/7zip/UI/FileManager/OpenCallback.cpp @@ -0,0 +1,123 @@ +// OpenCallback.cpp + +#include "StdAfx.h" + +#include "Common/StringConvert.h" + +#include "Windows/PropVariant.h" + +#include "../../Common/FileStreams.h" + +#include "OpenCallback.h" +#include "PasswordDialog.h" + +using namespace NWindows; + +STDMETHODIMP COpenArchiveCallback::SetTotal(const UInt64 *numFiles, const UInt64 *numBytes) +{ + RINOK(ProgressDialog.Sync.ProcessStopAndPause()); + { + NSynchronization::CCriticalSectionLock lock(_criticalSection); + if (numFiles != NULL) + { + ProgressDialog.Sync.SetNumFilesTotal(*numFiles); + ProgressDialog.Sync.SetBytesProgressMode(false); + } + if (numBytes != NULL) + ProgressDialog.Sync.SetNumBytesTotal(*numBytes); + } + return S_OK; +} + +STDMETHODIMP COpenArchiveCallback::SetCompleted(const UInt64 *numFiles, const UInt64 *numBytes) +{ + RINOK(ProgressDialog.Sync.ProcessStopAndPause()); + NSynchronization::CCriticalSectionLock lock(_criticalSection); + if (numFiles != NULL) + ProgressDialog.Sync.SetNumFilesCur(*numFiles); + if (numBytes != NULL) + ProgressDialog.Sync.SetPos(*numBytes); + return S_OK; +} + +STDMETHODIMP COpenArchiveCallback::SetTotal(const UInt64 total) +{ + RINOK(ProgressDialog.Sync.ProcessStopAndPause()); + ProgressDialog.Sync.SetNumBytesTotal(total); + return S_OK; +} + +STDMETHODIMP COpenArchiveCallback::SetCompleted(const UInt64 *completed) +{ + RINOK(ProgressDialog.Sync.ProcessStopAndPause()); + if (completed != NULL) + ProgressDialog.Sync.SetPos(*completed); + return S_OK; +} + +STDMETHODIMP COpenArchiveCallback::GetProperty(PROPID propID, PROPVARIANT *value) +{ + NCOM::CPropVariant prop; + if (_subArchiveMode) + { + switch(propID) + { + case kpidName: prop = _subArchiveName; break; + } + } + else + { + switch(propID) + { + case kpidName: prop = _fileInfo.Name; break; + case kpidIsDir: prop = _fileInfo.IsDir(); break; + case kpidSize: prop = _fileInfo.Size; break; + case kpidAttrib: prop = (UInt32)_fileInfo.Attrib; break; + case kpidCTime: prop = _fileInfo.CTime; break; + case kpidATime: prop = _fileInfo.ATime; break; + case kpidMTime: prop = _fileInfo.MTime; break; + } + } + prop.Detach(value); + return S_OK; +} + +STDMETHODIMP COpenArchiveCallback::GetStream(const wchar_t *name, + IInStream **inStream) +{ + *inStream = NULL; + if (_subArchiveMode) + return S_FALSE; + + NFile::NFind::CFileInfoW fileInfo; + + UString fullPath = _folderPrefix + name; + if (!fileInfo.Find(fullPath)) + return S_FALSE; + _fileInfo = fileInfo; + if (_fileInfo.IsDir()) + return S_FALSE; + CInFileStream *inFile = new CInFileStream; + CMyComPtr inStreamTemp = inFile; + if (!inFile->Open(fullPath)) + return ::GetLastError(); + *inStream = inStreamTemp.Detach(); + return S_OK; +} + +STDMETHODIMP COpenArchiveCallback::CryptoGetTextPassword(BSTR *password) +{ + PasswordWasAsked = true; + if (!PasswordIsDefined) + { + CPasswordDialog dialog; + + ProgressDialog.WaitCreating(); + if (dialog.Create(ProgressDialog) == IDCANCEL) + return E_ABORT; + + Password = dialog.Password; + PasswordIsDefined = true; + } + return StringToBstr(Password, password); +} diff --git a/CPP/7zip/UI/FileManager/OpenCallback.h b/CPP/7zip/UI/FileManager/OpenCallback.h new file mode 100644 index 0000000..559eb8f --- /dev/null +++ b/CPP/7zip/UI/FileManager/OpenCallback.h @@ -0,0 +1,92 @@ +// OpenCallback.h + +#ifndef __OPENCALLBACK_H +#define __OPENCALLBACK_H + +#include "Common/MyCom.h" +#include "Common/MyString.h" + +#include "Windows/FileFind.h" + +#include "../../IPassword.h" + +#include "../../Archive/IArchive.h" + +#ifdef _SFX +#include "ProgressDialog.h" +#else +#include "ProgressDialog2.h" +#endif + + +class COpenArchiveCallback: + public IArchiveOpenCallback, + public IArchiveOpenVolumeCallback, + public IArchiveOpenSetSubArchiveName, + public IProgress, + public ICryptoGetTextPassword, + public CMyUnknownImp +{ + UString _folderPrefix; + NWindows::NFile::NFind::CFileInfoW _fileInfo; + NWindows::NSynchronization::CCriticalSection _criticalSection; + bool _subArchiveMode; + UString _subArchiveName; + +public: + bool PasswordIsDefined; + bool PasswordWasAsked; + UString Password; + HWND ParentWindow; + CProgressDialog ProgressDialog; + + MY_UNKNOWN_IMP5( + IArchiveOpenCallback, + IArchiveOpenVolumeCallback, + IArchiveOpenSetSubArchiveName, + IProgress, + ICryptoGetTextPassword) + + INTERFACE_IProgress(;) + INTERFACE_IArchiveOpenCallback(;) + INTERFACE_IArchiveOpenVolumeCallback(;) + + // ICryptoGetTextPassword + STDMETHOD(CryptoGetTextPassword)(BSTR *password); + + STDMETHOD(SetSubArchiveName(const wchar_t *name)) + { + _subArchiveMode = true; + _subArchiveName = name; + return S_OK; + } + + COpenArchiveCallback(): + ParentWindow(0) + { + _subArchiveMode = false; + PasswordIsDefined = false; + PasswordWasAsked = false; + } + /* + void Init() + { + PasswordIsDefined = false; + _subArchiveMode = false; + } + */ + void LoadFileInfo(const UString &folderPrefix, const UString &fileName) + { + _folderPrefix = folderPrefix; + if (!_fileInfo.Find(_folderPrefix + fileName)) + throw 1; + } + void ShowMessage(const UInt64 *completed); + + INT_PTR StartProgressDialog(const UString &title, NWindows::CThread &thread) + { + return ProgressDialog.Create(title, thread, ParentWindow); + } +}; + +#endif diff --git a/CPP/7zip/UI/FileManager/OverwriteDialog.cpp b/CPP/7zip/UI/FileManager/OverwriteDialog.cpp new file mode 100644 index 0000000..4f46877 --- /dev/null +++ b/CPP/7zip/UI/FileManager/OverwriteDialog.cpp @@ -0,0 +1,139 @@ +// OverwriteDialog.cpp + +#include "StdAfx.h" + +#include "Common/StringConvert.h" + +#include "Windows/FileName.h" +#include "Windows/Defs.h" +#include "Windows/ResourceString.h" +#include "Windows/Control/Static.h" +#include "Windows/PropVariantConversions.h" + +#include "FormatUtils.h" +#include "OverwriteDialog.h" + +// #include "../resource.h" + +#ifdef LANG +#include "LangUtils.h" +#endif + +using namespace NWindows; + +#ifdef LANG +static CIDLangPair kIDLangPairs[] = +{ + { IDC_STATIC_OVERWRITE_HEADER, 0x02000901}, + { IDC_STATIC_OVERWRITE_QUESTION_BEGIN, 0x02000902 }, + { IDC_STATIC_OVERWRITE_QUESTION_END, 0x02000903 }, + { IDYES, 0x02000705 }, + { IDC_BUTTON_OVERWRITE_YES_TO_ALL, 0x02000707 }, + { IDNO, 0x02000709 }, + { IDC_BUTTON_OVERWRITE_NO_TO_ALL,0x0200070B }, + { IDC_BUTTON_OVERWRITE_AUTO_RENAME, 0x02000911 }, + { IDCANCEL, 0x02000711 } +}; +#endif + +static const int kCurrentFileNameSizeLimit = 82; +static const int kCurrentFileNameSizeLimit2 = 30; + +void COverwriteDialog::ReduceString(UString &s) +{ + int size = _isBig ? kCurrentFileNameSizeLimit : kCurrentFileNameSizeLimit2; + if (s.Length() > size) + s = s.Left(size / 2) + UString(L" ... ") + s.Right(size / 2); +} + +void COverwriteDialog::SetFileInfoControl(int textID, int iconID, + const NOverwriteDialog::CFileInfo &fileInfo) +{ + UString sizeString; + if (fileInfo.SizeIsDefined) + sizeString = MyFormatNew(IDS_FILE_SIZE, + #ifdef LANG + 0x02000982, + #endif + NumberToString(fileInfo.Size)); + + const UString &fileName = fileInfo.Name; + int slashPos = fileName.ReverseFind(WCHAR_PATH_SEPARATOR); + UString s1, s2; + if (slashPos >= 0) + { + s1 = fileName.Left(slashPos + 1); + s2 = fileName.Mid(slashPos + 1); + } + else + s2 = fileName; + ReduceString(s1); + ReduceString(s2); + + UString fullString = s1 + L'\n' + s2; + fullString += L'\n'; + fullString += sizeString; + fullString += L'\n'; + + if (fileInfo.TimeIsDefined) + { + UString timeString; + FILETIME localFileTime; + if (!FileTimeToLocalFileTime(&fileInfo.Time, &localFileTime)) + throw 4190402; + timeString = ConvertFileTimeToString(localFileTime); + + fullString += + #ifdef LANG + LangString(IDS_FILE_MODIFIED, 0x02000983); + #else + MyLoadStringW(IDS_FILE_MODIFIED); + #endif + + fullString += L" "; + fullString += timeString; + } + + NWindows::NControl::CDialogChildControl control; + control.Init(*this, textID); + control.SetText(fullString); + +#if _WIN32 + SHFILEINFO shellFileInfo; + if (::SHGetFileInfo( + GetSystemString(fileInfo.Name), FILE_ATTRIBUTE_NORMAL, &shellFileInfo, + sizeof(shellFileInfo), SHGFI_ICON | SHGFI_USEFILEATTRIBUTES | SHGFI_LARGEICON)) + { + NControl::CStatic staticContol; + staticContol.Attach(GetItem(iconID)); + staticContol.SetIcon(shellFileInfo.hIcon); + } +#endif +} + +bool COverwriteDialog::OnInit() +{ + #ifdef LANG + LangSetWindowText(HWND(*this), 0x02000900); + LangSetDlgItemsText(HWND(*this), kIDLangPairs, sizeof(kIDLangPairs) / sizeof(kIDLangPairs[0])); + #endif + SetFileInfoControl(IDC_STATIC_OVERWRITE_OLD_FILE_SIZE_TIME, IDC_STATIC_OVERWRITE_OLD_FILE_ICON, OldFileInfo); + SetFileInfoControl(IDC_STATIC_OVERWRITE_NEW_FILE_SIZE_TIME, IDC_STATIC_OVERWRITE_NEW_FILE_ICON, NewFileInfo); + NormalizePosition(); + return CModalDialog::OnInit(); +} + +bool COverwriteDialog::OnButtonClicked(int buttonID, HWND buttonHWND) +{ + switch(buttonID) + { + case IDYES: + case IDC_BUTTON_OVERWRITE_YES_TO_ALL: + case IDNO: + case IDC_BUTTON_OVERWRITE_NO_TO_ALL: + case IDC_BUTTON_OVERWRITE_AUTO_RENAME: + End(buttonID); + return true; + } + return CModalDialog::OnButtonClicked(buttonID, buttonHWND); +} diff --git a/CPP/7zip/UI/FileManager/OverwriteDialog.h b/CPP/7zip/UI/FileManager/OverwriteDialog.h new file mode 100644 index 0000000..f760611 --- /dev/null +++ b/CPP/7zip/UI/FileManager/OverwriteDialog.h @@ -0,0 +1,71 @@ +// OverwriteDialog.h + +#ifndef __OVERWRITE_DIALOG_H +#define __OVERWRITE_DIALOG_H + +#include "Common/Types.h" + +#include "Windows/Control/Dialog.h" + +#include "DialogSize.h" +#include "OverwriteDialogRes.h" + +namespace NOverwriteDialog +{ + struct CFileInfo + { + bool SizeIsDefined; + bool TimeIsDefined; + UInt64 Size; + FILETIME Time; + UString Name; + + void SetTime(const FILETIME *t) + { + if (t == 0) + TimeIsDefined = false; + else + { + TimeIsDefined = true; + Time = *t; + } + } + void SetSize(const UInt64 *size) + { + if (size == 0) + SizeIsDefined = false; + else + { + SizeIsDefined = true; + Size = *size; + } + } + }; +} + +class COverwriteDialog: public NWindows::NControl::CModalDialog +{ + bool _isBig; + + void SetFileInfoControl(int textID, int iconID, const NOverwriteDialog::CFileInfo &fileInfo); + virtual bool OnInit(); + bool OnButtonClicked(int buttonID, HWND buttonHWND); + void ReduceString(UString &s); + +public: + INT_PTR Create(HWND parent = 0) + { + BIG_DIALOG_SIZE(280, 200); + #ifdef UNDER_CE + _isBig = isBig; + #else + _isBig = true; + #endif + return CModalDialog::Create(SIZED_DIALOG(IDD_DIALOG_OVERWRITE), parent); + } + + NOverwriteDialog::CFileInfo OldFileInfo; + NOverwriteDialog::CFileInfo NewFileInfo; +}; + +#endif diff --git a/CPP/7zip/UI/FileManager/OverwriteDialogRes.h b/CPP/7zip/UI/FileManager/OverwriteDialogRes.h new file mode 100644 index 0000000..3bc6900 --- /dev/null +++ b/CPP/7zip/UI/FileManager/OverwriteDialogRes.h @@ -0,0 +1,20 @@ +#define IDD_DIALOG_OVERWRITE 502 +#define IDD_DIALOG_OVERWRITE_2 602 + +#define IDS_FILE_MODIFIED 600 +#define IDS_FILE_SIZE 601 + +#define IDC_STATIC_OVERWRITE_HEADER 1000 + +#define IDC_STATIC_OVERWRITE_QUESTION_BEGIN 1001 +#define IDC_STATIC_OVERWRITE_QUESTION_END 1002 + +#define IDC_STATIC_OVERWRITE_OLD_FILE_ICON 1003 +#define IDC_STATIC_OVERWRITE_NEW_FILE_ICON 1004 + +#define IDC_STATIC_OVERWRITE_OLD_FILE_SIZE_TIME 1005 +#define IDC_STATIC_OVERWRITE_NEW_FILE_SIZE_TIME 1006 + +#define IDC_BUTTON_OVERWRITE_YES_TO_ALL 1010 +#define IDC_BUTTON_OVERWRITE_NO_TO_ALL 1011 +#define IDC_BUTTON_OVERWRITE_AUTO_RENAME 1012 diff --git a/CPP/7zip/UI/FileManager/OverwriteDialog_rc.cpp b/CPP/7zip/UI/FileManager/OverwriteDialog_rc.cpp new file mode 100644 index 0000000..5cebcc9 --- /dev/null +++ b/CPP/7zip/UI/FileManager/OverwriteDialog_rc.cpp @@ -0,0 +1,99 @@ +// OverwriteDialog_rc.cpp + +#include "StdAfx.h" + +// For compilers that support precompilation, includes "wx/wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +// for all others, include the necessary headers (this file is usually all you +// need because it includes almost all "standard" wxWidgets headers) +#ifndef WX_PRECOMP + #include "wx/wx.h" +#endif + +#undef _WIN32 + +#include "OverwriteDialogRes.h" +#include "Windows/Control/DialogImpl.h" + +/* +IDD_DIALOG_OVERWRITE DIALOG 0, 0, xSize, ySize MY_MODAL_DIALOG_STYLE +CAPTION "Confirm File Replace" +MY_FONT +BEGIN + LTEXT "Destination folder already contains processed file.", IDC_STATIC_OVERWRITE_HEADER, marg, 7, xSize2, 8 + LTEXT "Would you like to replace the existing file", IDC_STATIC_OVERWRITE_QUESTION_BEGIN, marg, 28, xSize2, 8 + ICON "", IDC_STATIC_OVERWRITE_OLD_FILE_ICON, marg, 44, iconSize, iconSize + LTEXT "", IDC_STATIC_OVERWRITE_OLD_FILE_SIZE_TIME, fiXPos, 44, fiXSize, fiYSize, SS_NOPREFIX + LTEXT "with this one?",IDC_STATIC_OVERWRITE_QUESTION_END, marg, 98, xSize2, 8 + ICON "",IDC_STATIC_OVERWRITE_NEW_FILE_ICON, marg, 114, iconSize, iconSize + LTEXT "",IDC_STATIC_OVERWRITE_NEW_FILE_SIZE_TIME, fiXPos, 114, fiXSize, fiYSize, SS_NOPREFIX + PUSHBUTTON "&Yes", IDYES, 78, b2YPos, bXSize, bYSize + PUSHBUTTON "Yes to &All", IDC_BUTTON_OVERWRITE_YES_TO_ALL, 152, b2YPos, bXSize, bYSize + PUSHBUTTON "&No", IDNO, 226, b2YPos, bXSize, bYSize + PUSHBUTTON "No to A&ll", IDC_BUTTON_OVERWRITE_NO_TO_ALL, 300, b2YPos, bXSize, bYSize + PUSHBUTTON "A&uto Rename", IDC_BUTTON_OVERWRITE_AUTO_RENAME, 181, b1YPos, 109, bYSize + PUSHBUTTON "&Cancel", IDCANCEL, 300, b1YPos, bXSize, bYSize +END +*/ + +class COverwriteDialogImpl : public NWindows::NControl::CModalDialogImpl +{ + public: + COverwriteDialogImpl(NWindows::NControl::CModalDialog *dialog,wxWindow * parent , int id) : CModalDialogImpl(dialog,parent, id, wxT("Confirm File Replace")) + { + ///Sizer for adding the controls created by users + wxBoxSizer* topsizer = new wxBoxSizer(wxVERTICAL); + + topsizer->Add(new wxStaticText(this, IDC_STATIC_OVERWRITE_HEADER, _T("Destination folder already contains processed file.")) , 0 ,wxALL | wxALIGN_LEFT, 5 ); + topsizer->Add(new wxStaticText(this, IDC_STATIC_OVERWRITE_QUESTION_BEGIN, _T("Would you like to replace the existing file")) , 0 ,wxALL | wxALIGN_LEFT, 5 ); + + // FIXME ICON "", IDC_STATIC_OVERWRITE_OLD_FILE_ICON, marg, 44, iconSize, iconSize + topsizer->Add(new wxStaticText(this, IDC_STATIC_OVERWRITE_OLD_FILE_SIZE_TIME, _T(""), + wxDefaultPosition, wxDefaultSize, wxALIGN_LEFT) , 0 ,wxALL | wxALIGN_LEFT, 15 ); + topsizer->Add(new wxStaticText(this, IDC_STATIC_OVERWRITE_QUESTION_END, _T("with this one?")) , 0 ,wxALL | wxALIGN_LEFT, 5 ); + + // FIXME ICON "",IDC_STATIC_OVERWRITE_NEW_FILE_ICON, marg, 114, iconSize, iconSize + topsizer->Add(new wxStaticText(this, IDC_STATIC_OVERWRITE_NEW_FILE_SIZE_TIME, _T(""), + wxDefaultPosition, wxDefaultSize, wxALIGN_LEFT) , 0 ,wxALL | wxALIGN_LEFT, 15 ); + + wxBoxSizer* Sizer1 = new wxBoxSizer(wxHORIZONTAL); + Sizer1->Add(new wxButton(this, wxID_YES, _T("&Yes")) , 0, wxALL | wxALIGN_RIGHT, 5); + Sizer1->Add(new wxButton(this, IDC_BUTTON_OVERWRITE_YES_TO_ALL, _T("Yes to &All")) , 0, wxALL | wxALIGN_RIGHT, 5); + Sizer1->Add(new wxButton(this, wxID_NO, _T("&No")) , 0, wxALL | wxALIGN_RIGHT, 5); + Sizer1->Add(new wxButton(this, IDC_BUTTON_OVERWRITE_NO_TO_ALL, _T("No to A&ll")) , 0, wxALL | wxALIGN_RIGHT, 5); + topsizer->Add(Sizer1 , 0, wxALL | wxALIGN_RIGHT, 5); + + wxBoxSizer* Sizer2 = new wxBoxSizer(wxHORIZONTAL); + Sizer2->Add(new wxButton(this, IDC_BUTTON_OVERWRITE_AUTO_RENAME, _T("A&uto Rename")) , 0, wxALL | wxALIGN_RIGHT, 5); + Sizer2->Add(new wxButton(this, wxID_CANCEL, _T("&Cancel")) , 0, wxALL | wxALIGN_RIGHT, 5); + topsizer->Add(Sizer2 , 1, wxALL | wxALIGN_RIGHT, 5); + + this->OnInit(); + + SetSizer(topsizer); // use the sizer for layout + topsizer->SetSizeHints(this); // set size hints to honour minimum size + } +private: + // Any class wishing to process wxWindows events must use this macro + DECLARE_EVENT_TABLE() +}; + +static CStringTable g_stringTable[] = +{ + { IDS_FILE_MODIFIED, L"modified on" }, + { IDS_FILE_SIZE, L"{0} bytes" }, + { 0 , 0 } +}; + +REGISTER_DIALOG(IDD_DIALOG_OVERWRITE,COverwriteDialog,g_stringTable) + +BEGIN_EVENT_TABLE(COverwriteDialogImpl, wxDialog) + EVT_BUTTON(wxID_ANY, CModalDialogImpl::OnAnyButton) + EVT_MENU(WORKER_EVENT, CModalDialogImpl::OnWorkerEvent) +END_EVENT_TABLE() + diff --git a/CPP/7zip/UI/FileManager/Panel.cpp b/CPP/7zip/UI/FileManager/Panel.cpp new file mode 100644 index 0000000..260d821 --- /dev/null +++ b/CPP/7zip/UI/FileManager/Panel.cpp @@ -0,0 +1,1089 @@ +// Panel.cpp + +#include "StdAfx.h" + +#ifdef _WIN32 +#include +#endif + +#include "Common/Defs.h" +#include "Common/StringConvert.h" +#include "Common/IntToString.h" +#include "Windows/Error.h" +#include "Windows/PropVariant.h" +#include "Windows/Thread.h" + +#include "../../PropID.h" + +#include "Panel.h" +#include "RootFolder.h" +#include "FSFolder.h" +#include "FormatUtils.h" +#include "App.h" +#include "ExtractCallback.h" + +#include "resource.h" +#include "../GUI/ExtractRes.h" + +#include "../Agent/IFolderArchive.h" + +#include "../Common/CompressCall.h" +#include "../Common/ArchiveName.h" + +using namespace NWindows; +using namespace NControl; + +#ifndef _UNICODE +extern bool g_IsNT; +#endif + +static const UINT_PTR kTimerID = 1; +static const UINT kTimerElapse = 1000; + +#ifdef _WIN32 +static DWORD kStyles[4] = { LVS_ICON, LVS_SMALLICON, LVS_LIST, LVS_REPORT }; +#endif + +// static const int kCreateFolderID = 101; +// static const UINT kFileChangeNotifyMessage = WM_APP; + +extern HINSTANCE g_hInstance; +extern DWORD g_ComCtl32Version; + +void CPanel::Release() +{ + // It's for unloading COM dll's: don't change it. + CloseOpenFolders(); +#ifdef _WIN32 + _sevenZipContextMenu.Release(); + _systemContextMenu.Release(); +#endif +} + +CPanel::~CPanel() +{ + CloseOpenFolders(); +} + +#ifdef _WIN32 // FIXME +HWND CPanel::GetParent() +{ + HWND h = CWindow2::GetParent(); + return (h == 0) ? _mainWindow : h; +} +#endif + +static LPCWSTR kClassName = L"7-Zip::Panel"; + + +HRESULT CPanel::Create(HWND mainWindow, HWND parentWindow, UINT id, + const UString ¤tFolderPrefix, + const UString &arcFormat, + CPanelCallback *panelCallback, CAppState *appState, + bool &archiveIsOpened, bool &encrypted) +{ + _mainWindow = mainWindow; + _processTimer = true; + _processNotify = true; + + _panelCallback = panelCallback; + _appState = appState; + // _index = index; + _baseID = id; + _comboBoxID = _baseID + 3; + _statusBarID = _comboBoxID + 1; + + UString cfp = currentFolderPrefix; + + if (!currentFolderPrefix.IsEmpty()) + if (currentFolderPrefix[0] == L'.') + if (!NFile::NDirectory::MyGetFullPathName(currentFolderPrefix, cfp)) + cfp = currentFolderPrefix; + RINOK(BindToPath(cfp, arcFormat, archiveIsOpened, encrypted)); + +#ifdef _WIN32 + if (!CreateEx(0, kClassName, 0, WS_CHILD | WS_VISIBLE, + 0, 0, _xSize, 260, + parentWindow, (HMENU)(UINT_PTR)id, g_hInstance)) + return E_FAIL; +#else + { + // printf("WARNING CPanel::Create => CreateEx\n"); + // this->OnCreate(0); + extern void registerWindow2(int baseID,NWindows::NControl::CWindow2 *w); + registerWindow2(_baseID,this); + } +#endif + + return S_OK; +} + +LRESULT CPanel::OnMessage(UINT message, WPARAM wParam, LPARAM lParam) +{ + switch(message) + { + case kShiftSelectMessage: + OnShiftSelectMessage(); + return 0; + case kReLoadMessage: + RefreshListCtrl(_selectedState); + return 0; + case kSetFocusToListView: + _listView.SetFocus(); + return 0; + case kOpenItemChanged: + return OnOpenItemChanged(lParam); + case kRefreshStatusBar: + OnRefreshStatusBar(); + return 0; +#ifdef _WIN32 + case WM_TIMER: + OnTimer(); + return 0; + case WM_CONTEXTMENU: + if (OnContextMenu(HANDLE(wParam), GET_X_LPARAM(lParam), GET_Y_LPARAM(lParam))) + return 0; + break; + /* + case WM_DROPFILES: + CompressDropFiles(HDROP(wParam)); + return 0; + */ +#endif + } + return CWindow2::OnMessage(message, wParam, lParam); +} + +#ifdef _WIN32 +static LRESULT APIENTRY ListViewSubclassProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) +{ + CWindow tempDialog(hwnd); + CMyListView *w = (CMyListView *)(tempDialog.GetUserDataLongPtr()); + if (w == NULL) + return 0; + return w->OnMessage(message, wParam, lParam); +} + +LRESULT CMyListView::OnMessage(UINT message, WPARAM wParam, LPARAM lParam) +{ + if (message == WM_CHAR) + { + UINT scanCode = (UINT)((lParam >> 16) & 0xFF); + bool extended = ((lParam & 0x1000000) != 0); + UINT virtualKey = MapVirtualKey(scanCode, 1); + if (virtualKey == VK_MULTIPLY || virtualKey == VK_ADD || + virtualKey == VK_SUBTRACT) + return 0; + if ((wParam == '/' && extended) + || wParam == CHAR_PATH_SEPARATOR || wParam == '/') + { + _panel->OpenDrivesFolder(); + return 0; + } + } + else if (message == WM_SYSCHAR) + { + // For Alt+Enter Beep disabling + UINT scanCode = (UINT)(lParam >> 16) & 0xFF; + UINT virtualKey = MapVirtualKey(scanCode, 1); + if (virtualKey == VK_RETURN || virtualKey == VK_MULTIPLY || + virtualKey == VK_ADD || virtualKey == VK_SUBTRACT) + return 0; + } + /* + else if (message == WM_SYSKEYDOWN) + { + // return 0; + } + */ + else if (message == WM_KEYDOWN) + { + bool alt = (::GetKeyState(VK_MENU) & 0x8000) != 0; + bool ctrl = (::GetKeyState(VK_CONTROL) & 0x8000) != 0; + // bool leftCtrl = (::GetKeyState(VK_LCONTROL) & 0x8000) != 0; + // bool RightCtrl = (::GetKeyState(VK_RCONTROL) & 0x8000) != 0; + bool shift = (::GetKeyState(VK_SHIFT) & 0x8000) != 0; + switch(wParam) + { + case VK_RETURN: + { + if (shift && !alt && !ctrl) + { + _panel->OpenSelectedItems(false); + return 0; + } + break; + } + case VK_NEXT: + { + if (ctrl && !alt && !shift) + { + _panel->OpenFocusedItemAsInternal(); + return 0; + } + break; + } + case VK_PRIOR: + if (ctrl && !alt && !shift) + { + _panel->OpenParentFolder(); + return 0; + } + } + } + else if (message == WM_SETFOCUS) + { + _panel->_lastFocusedIsList = true; + _panel->_panelCallback->PanelWasFocused(); + } + #ifndef _UNICODE + if (g_IsNT) + return CallWindowProcW(_origWindowProc, *this, message, wParam, lParam); + else + #endif + return CallWindowProc(_origWindowProc, *this, message, wParam, lParam); +} + +/* +static LRESULT APIENTRY ComboBoxSubclassProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) +{ + CWindow tempDialog(hwnd); + CMyComboBox *w = (CMyComboBox *)(tempDialog.GetUserDataLongPtr()); + if (w == NULL) + return 0; + return w->OnMessage(message, wParam, lParam); +} + +LRESULT CMyComboBox::OnMessage(UINT message, WPARAM wParam, LPARAM lParam) +{ + return CallWindowProc(_origWindowProc, *this, message, wParam, lParam); +} +*/ +static LRESULT APIENTRY ComboBoxEditSubclassProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) +{ + CWindow tempDialog(hwnd); + CMyComboBoxEdit *w = (CMyComboBoxEdit *)(tempDialog.GetUserDataLongPtr()); + if (w == NULL) + return 0; + return w->OnMessage(message, wParam, lParam); +} + +LRESULT CMyComboBoxEdit::OnMessage(UINT message, WPARAM wParam, LPARAM lParam) +{ + // See MSDN / Subclassing a Combo Box / Creating a Combo-box Toolbar + switch (message) + { + case WM_SYSKEYDOWN: + switch (wParam) + { + case VK_F1: + case VK_F2: + { + // check ALT + if ((lParam & (1<<29)) == 0) + break; + bool alt = (::GetKeyState(VK_MENU) & 0x8000) != 0; + bool ctrl = (::GetKeyState(VK_CONTROL) & 0x8000) != 0; + bool shift = (::GetKeyState(VK_SHIFT) & 0x8000) != 0; + if (alt && !ctrl && !shift) + { + _panel->_panelCallback->SetFocusToPath(wParam == VK_F1 ? 0 : 1); + return 0; + } + break; + } + } + break; + case WM_KEYDOWN: + switch (wParam) + { + case VK_TAB: + // SendMessage(hwndMain, WM_ENTER, 0, 0); + _panel->SetFocusToList(); + return 0; + case VK_F9: + { + bool alt = (::GetKeyState(VK_MENU) & 0x8000) != 0; + bool ctrl = (::GetKeyState(VK_CONTROL) & 0x8000) != 0; + bool shift = (::GetKeyState(VK_SHIFT) & 0x8000) != 0; + if (!alt && !ctrl && !shift) + { + g_App.SwitchOnOffOnePanel();; + return 0; + } + break; + } + } + break; + case WM_CHAR: + switch (wParam) + { + case VK_TAB: + case VK_ESCAPE: + return 0; + } + } + #ifndef _UNICODE + if (g_IsNT) + return CallWindowProcW(_origWindowProc, *this, message, wParam, lParam); + else + #endif + return CallWindowProc(_origWindowProc, *this, message, wParam, lParam); +} + +static HIMAGELIST GetSysImageList(bool smallIcons) +{ + SHFILEINFO shellInfo; + return (HIMAGELIST)SHGetFileInfo(TEXT(""), + FILE_ATTRIBUTE_NORMAL |FILE_ATTRIBUTE_DIRECTORY, + &shellInfo, sizeof(shellInfo), + SHGFI_USEFILEATTRIBUTES | SHGFI_SYSICONINDEX | (smallIcons ? SHGFI_SMALLICON : SHGFI_ICON)); +} + +bool CPanel::OnCreate(CREATESTRUCT * /* createStruct */) +{ + // _virtualMode = false; + // _sortIndex = 0; + _sortID = kpidName; + _ascending = true; + _lastFocusedIsList = true; + + DWORD style = WS_CHILD | WS_VISIBLE; // | WS_BORDER ; // | LVS_SHAREIMAGELISTS; // | LVS_SHOWSELALWAYS;; + + style |= LVS_SHAREIMAGELISTS; + // style |= LVS_AUTOARRANGE; + style |= WS_CLIPCHILDREN; + style |= WS_CLIPSIBLINGS; + + const UInt32 kNumListModes = sizeof(kStyles) / sizeof(kStyles[0]); + if (_ListViewMode >= kNumListModes) + _ListViewMode = kNumListModes - 1; + + style |= kStyles[_ListViewMode] + | WS_TABSTOP + | LVS_EDITLABELS; + if (_mySelectMode) + style |= LVS_SINGLESEL; + + /* + if (_virtualMode) + style |= LVS_OWNERDATA; + */ + + DWORD exStyle; + exStyle = WS_EX_CLIENTEDGE; + + if (!_listView.CreateEx(exStyle, style, 0, 0, 116, 260, + HWND(*this), (HMENU)(UINT_PTR)(_baseID + 1), g_hInstance, NULL)) + return false; + + _listView.SetUnicodeFormat(true); + + _listView.SetUserDataLongPtr(LONG_PTR(&_listView)); + _listView._panel = this; + + #ifndef _UNICODE + if(g_IsNT) + _listView._origWindowProc = + (WNDPROC)_listView.SetLongPtrW(GWLP_WNDPROC, LONG_PTR(ListViewSubclassProc)); + else + #endif + _listView._origWindowProc = + (WNDPROC)_listView.SetLongPtr(GWLP_WNDPROC, LONG_PTR(ListViewSubclassProc)); + + _listView.SetImageList(GetSysImageList(true), LVSIL_SMALL); + _listView.SetImageList(GetSysImageList(false), LVSIL_NORMAL); + + // _exStyle |= LVS_EX_HEADERDRAGDROP; + // DWORD extendedStyle = _listView.GetExtendedListViewStyle(); + // extendedStyle |= _exStyle; + // _listView.SetExtendedListViewStyle(extendedStyle); + SetExtendedStyle(); + + _listView.Show(SW_SHOW); + _listView.InvalidateRect(NULL, true); + _listView.Update(); + + // Ensure that the common control DLL is loaded. + INITCOMMONCONTROLSEX icex; + + icex.dwSize = sizeof(INITCOMMONCONTROLSEX); + icex.dwICC = ICC_BAR_CLASSES; + InitCommonControlsEx(&icex); + + TBBUTTON tbb [ ] = + { + // {0, 0, TBSTATE_ENABLED, BTNS_SEP, 0L, 0}, + {VIEW_PARENTFOLDER, kParentFolderID, TBSTATE_ENABLED, BTNS_BUTTON, 0L, 0}, + // {0, 0, TBSTATE_ENABLED, BTNS_SEP, 0L, 0}, + // {VIEW_NEWFOLDER, kCreateFolderID, TBSTATE_ENABLED, BTNS_BUTTON, 0L, 0}, + }; + + if (g_ComCtl32Version >= MAKELONG(71, 4)) + { + icex.dwSize = sizeof(INITCOMMONCONTROLSEX); + icex.dwICC = ICC_COOL_CLASSES | ICC_BAR_CLASSES; + InitCommonControlsEx(&icex); + + _headerReBar.Attach(::CreateWindowEx(WS_EX_TOOLWINDOW, + REBARCLASSNAME, + NULL, WS_VISIBLE | WS_BORDER | WS_CHILD | + WS_CLIPCHILDREN | WS_CLIPSIBLINGS + | CCS_NODIVIDER + | CCS_NOPARENTALIGN + | CCS_TOP + | RBS_VARHEIGHT + | RBS_BANDBORDERS + ,0,0,0,0, HWND(*this), NULL, g_hInstance, NULL)); + } + + DWORD toolbarStyle = WS_CHILD | WS_VISIBLE ; + if (_headerReBar) + { + toolbarStyle |= 0 + // | WS_CLIPCHILDREN + // | WS_CLIPSIBLINGS + + | TBSTYLE_TOOLTIPS + | CCS_NODIVIDER + | CCS_NORESIZE + | TBSTYLE_FLAT + ; + } + + _headerToolBar.Attach(::CreateToolbarEx ((*this), toolbarStyle, + _baseID + 2, 11, + (HINSTANCE)HINST_COMMCTRL, + IDB_VIEW_SMALL_COLOR, + (LPCTBBUTTON)&tbb, sizeof(tbb) / sizeof(tbb[0]), + 0, 0, 0, 0, sizeof (TBBUTTON))); + + icex.dwSize = sizeof(INITCOMMONCONTROLSEX); + icex.dwICC = ICC_USEREX_CLASSES; + InitCommonControlsEx(&icex); + + _headerComboBox.CreateEx(0, WC_COMBOBOXEXW, NULL, + WS_BORDER | WS_VISIBLE |WS_CHILD | CBS_DROPDOWN | CBS_AUTOHSCROLL, + 0, 0, 100, 520, + ((_headerReBar == 0) ? HWND(*this) : _headerToolBar), + (HMENU)(UINT_PTR)(_comboBoxID), + g_hInstance, NULL); + _headerComboBox.SendMessage(CBEM_SETUNICODEFORMAT, (WPARAM)(BOOL)TRUE, 0); + + _headerComboBox.SetImageList(GetSysImageList(true)); + + _headerComboBox.SetExtendedStyle(CBES_EX_PATHWORDBREAKPROC, CBES_EX_PATHWORDBREAKPROC); + + /* + _headerComboBox.SetUserDataLongPtr(LONG_PTR(&_headerComboBox)); + _headerComboBox._panel = this; + _headerComboBox._origWindowProc = + (WNDPROC)_headerComboBox.SetLongPtr(GWLP_WNDPROC, + LONG_PTR(ComboBoxSubclassProc)); + */ + _comboBoxEdit.Attach(_headerComboBox.GetEditControl()); + + // _comboBoxEdit.SendMessage(CCM_SETUNICODEFORMAT, (WPARAM)(BOOL)TRUE, 0); + + _comboBoxEdit.SetUserDataLongPtr(LONG_PTR(&_comboBoxEdit)); + _comboBoxEdit._panel = this; + #ifndef _UNICODE + if(g_IsNT) + _comboBoxEdit._origWindowProc = + (WNDPROC)_comboBoxEdit.SetLongPtrW(GWLP_WNDPROC, LONG_PTR(ComboBoxEditSubclassProc)); + else + #endif + _comboBoxEdit._origWindowProc = + (WNDPROC)_comboBoxEdit.SetLongPtr(GWLP_WNDPROC, LONG_PTR(ComboBoxEditSubclassProc)); + + if (_headerReBar) + { + REBARINFO rbi; + rbi.cbSize = sizeof(REBARINFO); // Required when using this struct. + rbi.fMask = 0; + rbi.himl = (HIMAGELIST)NULL; + _headerReBar.SetBarInfo(&rbi); + + // Send the TB_BUTTONSTRUCTSIZE message, which is required for + // backward compatibility. + // _headerToolBar.SendMessage(TB_BUTTONSTRUCTSIZE, (WPARAM)sizeof(TBBUTTON), 0); + SIZE size; + _headerToolBar.GetMaxSize(&size); + + REBARBANDINFO rbBand; + rbBand.cbSize = sizeof(REBARBANDINFO); // Required + rbBand.fMask = RBBIM_STYLE | RBBIM_CHILD | RBBIM_CHILDSIZE | RBBIM_SIZE; + rbBand.fStyle = RBBS_NOGRIPPER; + rbBand.cxMinChild = size.cx; + rbBand.cyMinChild = size.cy; + rbBand.cyChild = size.cy; + rbBand.cx = size.cx; + rbBand.hwndChild = _headerToolBar; + _headerReBar.InsertBand(-1, &rbBand); + + RECT rc; + ::GetWindowRect(_headerComboBox, &rc); + rbBand.cxMinChild = 30; + rbBand.cyMinChild = rc.bottom - rc.top; + rbBand.cx = 1000; + rbBand.hwndChild = _headerComboBox; + _headerReBar.InsertBand(-1, &rbBand); + // _headerReBar.MaximizeBand(1, false); + } + + _statusBar.Create(WS_CHILD | WS_VISIBLE, L"Status", (*this), _statusBarID); + // _statusBar2.Create(WS_CHILD | WS_VISIBLE, L"Status", (*this), _statusBarID + 1); + + int sizes[] = {150, 250, 350, -1}; + _statusBar.SetParts(4, sizes); + // _statusBar2.SetParts(5, sizes); + + /* + RECT rect; + GetClientRect(&rect); + OnSize(0, rect.right - rect.left, rect.top - rect.bottom); + */ + + SetTimer(kTimerID, kTimerElapse); + + // InitListCtrl(); + RefreshListCtrl(); + RefreshStatusBar(); + + return true; +} +#else +bool CPanel::OnCreate(CREATESTRUCT * /* createStruct */) +{ + printf("WARNING CPanel::OnCreate\n"); + _sortID = kpidName; + _ascending = true; + _lastFocusedIsList = true; + + extern HWND g_HWND; + HWND w = GetDlgItem(g_HWND, _comboBoxID); + if (w == 0) + { + printf("Can't find id=%d\n",_comboBoxID); + return false; + } + printf("CPanel::OnCreate : _headerComboBox.Attach(%p)\n",w); + _headerComboBox.Attach(w); + + w = GetDlgItem(g_HWND, _statusBarID); + if (w == 0) + { + printf("Can't find id=%d\n",_statusBarID); + return false; + } + printf("CPanel::OnCreate : _statusBar.Attach(%p)\n",w); + _statusBar.Attach(w); + + w = GetDlgItem(g_HWND, _baseID + 1); + if (w == 0) + { + printf("Can't find id=%d\n",_baseID + 1); + return false; + } + printf("CPanel::OnCreate : _listView.Attach(%p)\n",w); + _listView.Attach(w); + + _listView.SetUnicodeFormat(true); + + // _listView.SetUserDataLongPtr(LONG_PTR(&_listView)); + _listView._panel = this; + + // FIXME _listView.SetImageList(GetSysImageList(true), LVSIL_SMALL); + // FIXME _listView.SetImageList(GetSysImageList(false), LVSIL_NORMAL); + + // FIXME SetExtendedStyle(); + + // FIXME _listView.Show(SW_SHOW); + // FIXME _listView.InvalidateRect(NULL, true); + _listView.Update(); + + /* FIXME + _headerToolBar.Attach(::CreateToolbarEx ((*this), toolbarStyle, + _baseID + 2, 11, + (HINSTANCE)HINST_COMMCTRL, + IDB_VIEW_SMALL_COLOR, + (LPCTBBUTTON)&tbb, sizeof(tbb) / sizeof(tbb[0]), + 0, 0, 0, 0, sizeof (TBBUTTON))); + */ + + /* FIXME + _headerComboBox.CreateEx(0, WC_COMBOBOXEXW, NULL, + WS_BORDER | WS_VISIBLE |WS_CHILD | CBS_DROPDOWN | CBS_AUTOHSCROLL, + 0, 0, 100, 520, + ((_headerReBar == 0) ? HWND(*this) : _headerToolBar), + (HMENU)(UINT_PTR)(_comboBoxID), + g_hInstance, NULL); + _headerComboBox.SendMessage(CBEM_SETUNICODEFORMAT, (WPARAM)(BOOL)TRUE, 0); + + _headerComboBox.SetImageList(GetSysImageList(true)); + + _headerComboBox.SetExtendedStyle(CBES_EX_PATHWORDBREAKPROC, CBES_EX_PATHWORDBREAKPROC); + */ + + // FIXME _comboBoxEdit.Attach(_headerComboBox.GetEditControl()); + + _comboBoxEdit._panel = this; + + // FIXME if (_headerReBar) ... + + // _statusBar.Create(WS_CHILD | WS_VISIBLE, L"Status", (*this), _statusBarID); + + // int sizes[] = {150, 250, 350, -1}; + // _statusBar.SetParts(4, sizes); + + // SetTimer(kTimerID, kTimerElapse); + + // InitListCtrl(); + RefreshListCtrl(); + RefreshStatusBar(); + + return true; +} +#endif + + +void CPanel::OnDestroy() +{ + printf("CPanel::OnDestroy\n"); + + SaveListViewInfo(); + CWindow2::OnDestroy(); +} + +#ifdef _WIN32 +void CPanel::ChangeWindowSize(int xSize, int ySize) +{ + int kHeaderSize; + int kStatusBarSize; + // int kStatusBar2Size; + RECT rect; + if (_headerReBar) + _headerReBar.GetWindowRect(&rect); + else + _headerToolBar.GetWindowRect(&rect); + + kHeaderSize = rect.bottom - rect.top; + + _statusBar.GetWindowRect(&rect); + kStatusBarSize = rect.bottom - rect.top; + + // _statusBar2.GetWindowRect(&rect); + // kStatusBar2Size = rect.bottom - rect.top; + + int yListViewSize = MyMax(ySize - kHeaderSize - kStatusBarSize, 0); + const int kStartXPos = 32; + if (_headerReBar) + { + } + else + { + _headerToolBar.Move(0, 0, xSize, 0); + _headerComboBox.Move(kStartXPos, 2, + MyMax(xSize - kStartXPos - 10, kStartXPos), 0); + } + _listView.Move(0, kHeaderSize, xSize, yListViewSize); + _statusBar.Move(0, kHeaderSize + yListViewSize, xSize, kStatusBarSize); + // _statusBar2.MoveWindow(0, kHeaderSize + yListViewSize + kStatusBarSize, xSize, kStatusBar2Size); + // _statusBar.MoveWindow(0, 100, xSize, kStatusBarSize); + // _statusBar2.MoveWindow(0, 200, xSize, kStatusBar2Size); +} + +bool CPanel::OnSize(WPARAM /* wParam */, int xSize, int ySize) +{ + if (_headerReBar) + _headerReBar.Move(0, 0, xSize, 0); + ChangeWindowSize(xSize, ySize); + return true; +} + +bool CPanel::OnNotifyReBar(LPNMHDR header, LRESULT & /* result */) +{ + switch(header->code) + { + case RBN_HEIGHTCHANGE: + { + RECT rect; + GetWindowRect(&rect); + ChangeWindowSize(rect.right - rect.left, rect.bottom - rect.top); + return false; + } + } + return false; +} +#endif + +bool CPanel::OnNotify(UINT /* controlID */, LPNMHDR header, LRESULT &result) +{ + if (!_processNotify) + return false; + if (header->hwndFrom == _headerComboBox) + return OnNotifyComboBox(header, result); +#ifdef _WIN32 + else if (header->hwndFrom == _headerReBar) + return OnNotifyReBar(header, result); +#endif + else if (header->hwndFrom == _listView) + return OnNotifyList(header, result); +#ifdef _WIN32 + else if (::GetParent(header->hwndFrom) == _listView && + header->code == NM_RCLICK) + return OnRightClick((LPNMITEMACTIVATE)header, result); +#endif + return false; +} + +bool CPanel::OnCommand(int code, int itemID, LPARAM lParam, LRESULT &result) +{ + printf("CPanel::OnCommand(code=%d,itemID=%d)\n",code,itemID); + if (itemID == kParentFolderID) + { + OpenParentFolder(); + result = 0; + return true; + } + /* + if (itemID == kCreateFolderID) + { + CreateFolder(); + result = 0; + return true; + } + */ + if (itemID == _comboBoxID) + { + if (OnComboBoxCommand(code, lParam, result)) + return true; + } + return CWindow2::OnCommand(code, itemID, lParam, result); +} + +void CPanel::MessageBoxInfo(LPCWSTR message, LPCWSTR caption) + { ::MessageBoxW(HWND(*this), message, caption, MB_OK); } +void CPanel::MessageBox(LPCWSTR message, LPCWSTR caption) + { ::MessageBoxW(HWND(*this), message, caption, MB_OK | MB_ICONSTOP); } +void CPanel::MessageBox(LPCWSTR message) + { MessageBox(message, L"7-Zip"); } +void CPanel::MessageBoxMyError(LPCWSTR message) + { MessageBox(message, L"Error"); } +void CPanel::MessageBoxError(HRESULT errorCode, LPCWSTR caption) +{ + UString message; + if (errorCode == E_OUTOFMEMORY) + message = LangString(IDS_MEM_ERROR, 0x0200060B); + else + if (!NError::MyFormatMessage(errorCode, message)) + message = L"Error"; + MessageBox(message, caption); +} + +void CPanel::MessageBoxError(HRESULT errorCode) + { MessageBoxError(errorCode, L"7-Zip"); } +void CPanel::MessageBoxLastError(LPCWSTR caption) + { MessageBoxError(::GetLastError(), caption); } +void CPanel::MessageBoxLastError() + { MessageBoxLastError(L"Error"); } + +void CPanel::MessageBoxErrorLang(UINT resourceID, UInt32 langID) + { MessageBox(LangString(resourceID, langID)); } + + +void CPanel::SetFocusToList() +{ + _listView.SetFocus(); + // SetCurrentPathText(); +} + +void CPanel::SetFocusToLastRememberedItem() +{ + if (_lastFocusedIsList) + SetFocusToList(); +#ifdef _WIN32 // FIXME + else + _headerComboBox.SetFocus(); +#endif +} + +UString CPanel::GetFolderTypeID() const +{ + NCOM::CPropVariant prop; + if (_folder->GetFolderProperty(kpidType, &prop) == S_OK) + if (prop.vt == VT_BSTR) + return (const wchar_t *)prop.bstrVal; + return L""; +} + +bool CPanel::IsFolderTypeEqTo(const wchar_t *s) const +{ + return GetFolderTypeID() == s; +} + +bool CPanel::IsRootFolder() const { return IsFolderTypeEqTo(L"RootFolder"); } +bool CPanel::IsFSFolder() const { return IsFolderTypeEqTo(L"FSFolder"); } +bool CPanel::IsFSDrivesFolder() const { return IsFolderTypeEqTo(L"FSDrives"); } +bool CPanel::IsArcFolder() const +{ + UString s = GetFolderTypeID(); + return s.Left(5) == L"7-Zip"; +} + +UString CPanel::GetFsPath() const +{ + if (IsFSDrivesFolder()) + return UString(); + return _currentFolderPrefix; +} + +UString CPanel::GetDriveOrNetworkPrefix() const +{ + if (!IsFSFolder()) + return UString(); + UString drive = GetFsPath(); + if (drive.Length() < 3) + return UString(); + if (drive[0] == L'\\' && drive[1] == L'\\') + { + // if network + int pos = drive.Find(L'\\', 2); + if (pos < 0) + return UString(); + pos = drive.Find(L'\\', pos + 1); + if (pos < 0) + return UString(); + return drive.Left(pos + 1); + } + if (drive[1] != L':' || drive[2] != L'\\') + return UString(); + return drive.Left(3); +} + +bool CPanel::DoesItSupportOperations() const +{ + CMyComPtr folderOperations; + return _folder.QueryInterface(IID_IFolderOperations, &folderOperations) == S_OK; +} + +void CPanel::SetListViewMode(UInt32 index) +{ +#ifdef _WIN32 // FIXME + if (index >= 4) + return; + _ListViewMode = index; + DWORD oldStyle = (DWORD)_listView.GetStyle(); + DWORD newStyle = kStyles[index]; + if ((oldStyle & LVS_TYPEMASK) != newStyle) + _listView.SetStyle((oldStyle & ~LVS_TYPEMASK) | newStyle); + // RefreshListCtrlSaveFocused(); +#endif +} + +void CPanel::ChangeFlatMode() +{ + _flatMode = !_flatMode; + RefreshListCtrlSaveFocused(); +} + + +void CPanel::RefreshStatusBar() +{ + // FIXME PostMessage(kRefreshStatusBar); +} + +void CPanel::AddToArchive() +{ + CRecordVector indices; + GetOperatedItemIndices(indices); + if (!IsFsOrDrivesFolder()) + { + MessageBoxErrorLang(IDS_OPERATION_IS_NOT_SUPPORTED, 0x03020208); + return; + } + if (indices.Size() == 0) + { + MessageBoxErrorLang(IDS_SELECT_FILES, 0x03020A03); + return; + } + UStringVector names; + + UString curPrefix = _currentFolderPrefix; + UString destCurDirPrefix = _currentFolderPrefix; + if (IsFSDrivesFolder()) + { + destCurDirPrefix = ROOT_FS_FOLDER; + if (!IsDeviceDrivesPrefix()) + curPrefix.Empty(); + } + + for (int i = 0; i < indices.Size(); i++) + names.Add(curPrefix + GetItemRelPath(indices[i])); + const UString archiveName = CreateArchiveName(names.Front(), (names.Size() > 1), false); + HRESULT res = CompressFiles(destCurDirPrefix, archiveName, L"", names, false, true, false); + if (res != S_OK) + { + if (destCurDirPrefix.Length() >= MAX_PATH) + MessageBoxErrorLang(IDS_MESSAGE_UNSUPPORTED_OPERATION_FOR_LONG_PATH_FOLDER, 0x03020A01); + } + // KillSelection(); +} + +static UString GetSubFolderNameForExtract(const UString &archiveName) +{ + int slashPos = archiveName.ReverseFind(WCHAR_PATH_SEPARATOR); + int dotPos = archiveName.ReverseFind(L'.'); + if (dotPos < 0 || slashPos > dotPos) + return archiveName + UString(L"~"); + UString res = archiveName.Left(dotPos); + res.TrimRight(); + return res; +} + +void CPanel::GetFilePaths(const CRecordVector &indices, UStringVector &paths) +{ + for (int i = 0; i < indices.Size(); i++) + { + int index = indices[i]; + if (IsItemFolder(index)) + { + paths.Clear(); + break; + } + paths.Add(GetItemFullPath(index)); + } + if (paths.Size() == 0) + { + MessageBoxErrorLang(IDS_SELECT_FILES, 0x03020A03); + return; + } +} + +void CPanel::ExtractArchives() +{ + if (_parentFolders.Size() > 0) + { + _panelCallback->OnCopy(false, false); + return; + } + CRecordVector indices; + GetOperatedItemIndices(indices); + UStringVector paths; + GetFilePaths(indices, paths); + if (paths.IsEmpty()) + return; + UString folderName; + if (indices.Size() == 1) + folderName = GetSubFolderNameForExtract(GetItemRelPath(indices[0])); + else + folderName = L"*"; + ::ExtractArchives(paths, _currentFolderPrefix + folderName + UString(WCHAR_PATH_SEPARATOR), true); +} + +static void AddValuePair(UINT resourceID, UInt32 langID, UInt64 value, UString &s) +{ + wchar_t sz[32]; + s += LangString(resourceID, langID); + s += L' '; + ConvertUInt64ToString(value, sz); + s += sz; + s += L'\n'; +} + +class CThreadTest: public CProgressThreadVirt +{ + HRESULT ProcessVirt(); +public: + CRecordVector Indices; + CExtractCallbackImp *ExtractCallbackSpec; + CMyComPtr ExtractCallback; + CMyComPtr ArchiveFolder; +}; + +HRESULT CThreadTest::ProcessVirt() +{ + RINOK(ArchiveFolder->Extract(&Indices[0], Indices.Size(), + NExtract::NPathMode::kFullPathnames, NExtract::NOverwriteMode::kAskBefore, + NULL, BoolToInt(true), ExtractCallback)); + if (ExtractCallbackSpec->IsOK()) + { + UString s; + AddValuePair(IDS_FOLDERS_COLON, 0x02000321, ExtractCallbackSpec->NumFolders, s); + AddValuePair(IDS_FILES_COLON, 0x02000320, ExtractCallbackSpec->NumFiles, s); + // AddSizePair(IDS_SIZE_COLON, 0x02000322, Stat.UnpackSize, s); + // AddSizePair(IDS_COMPRESSED_COLON, 0x02000323, Stat.PackSize, s); + s += L'\n'; + s += LangString(IDS_MESSAGE_NO_ERRORS, 0x02000608); + OkMessage = s; + } + return S_OK; +}; + +/* +static void AddSizePair(UINT resourceID, UInt32 langID, UInt64 value, UString &s) +{ + wchar_t sz[32]; + s += LangString(resourceID, langID); + s += L" "; + ConvertUInt64ToString(value, sz); + s += sz; + ConvertUInt64ToString(value >> 20, sz); + s += L" ("; + s += sz; + s += L" MB)"; + s += L'\n'; +} +*/ + +void CPanel::TestArchives() +{ + CRecordVector indices; + GetOperatedIndicesSmart(indices); + CMyComPtr archiveFolder; + _folder.QueryInterface(IID_IArchiveFolder, &archiveFolder); + if (archiveFolder) + { + { + CThreadTest extracter; + + extracter.ArchiveFolder = archiveFolder; + extracter.ExtractCallbackSpec = new CExtractCallbackImp; + extracter.ExtractCallback = extracter.ExtractCallbackSpec; + extracter.ExtractCallbackSpec->ProgressDialog = &extracter.ProgressDialog; + + if (indices.IsEmpty()) + return; + + extracter.Indices = indices; + + UString title = LangString(IDS_PROGRESS_TESTING, 0x02000F90); + UString progressWindowTitle = LangString(IDS_APP_TITLE, 0x03000000); + + extracter.ProgressDialog.CompressingMode = false; + extracter.ProgressDialog.MainWindow = GetParent(); + extracter.ProgressDialog.MainTitle = progressWindowTitle; + extracter.ProgressDialog.MainAddTitle = title + L" "; + + extracter.ExtractCallbackSpec->OverwriteMode = NExtract::NOverwriteMode::kAskBefore; + extracter.ExtractCallbackSpec->Init(); + + if (extracter.Create(title, GetParent()) != S_OK) + return; + + } + RefreshTitleAlways(); + return; + } + + if (!IsFSFolder()) + { + MessageBoxErrorLang(IDS_OPERATION_IS_NOT_SUPPORTED, 0x03020208); + return; + } + UStringVector paths; + GetFilePaths(indices, paths); + if (paths.IsEmpty()) + return; + ::TestArchives(paths); +} diff --git a/CPP/7zip/UI/FileManager/Panel.h b/CPP/7zip/UI/FileManager/Panel.h new file mode 100644 index 0000000..25c5a8e --- /dev/null +++ b/CPP/7zip/UI/FileManager/Panel.h @@ -0,0 +1,625 @@ +// Panel.h + +#ifndef __PANEL_H +#define __PANEL_H + +#include "../../../../C/Alloc.h" + +#include "Common/MyCom.h" + +#include "Windows/DLL.h" +#include "Windows/FileFind.h" +#include "Windows/FileDir.h" +#include "Windows/Synchronization.h" + +#include "Windows/Control/ComboBox.h" +#include "Windows/Control/Edit.h" +#include "Windows/Control/ListView.h" +// #include "Windows/Control/ReBar.h" +#include "Windows/Control/Static.h" +#include "Windows/Control/StatusBar.h" +// #include "Windows/Control/ToolBar.h" +#include "Windows/Control/Window2.h" + +#include "AppState.h" +#include "IFolder.h" +//#include "MyCom2.h" +#include "ProgressDialog2.h" +#include "SysIconUtils.h" + +const int kParentFolderID = 100; +const int kPluginMenuStartID = 1000; +const int kToolbarStartID = 2000; + +const int kParentIndex = -1; + +#ifdef UNDER_CE +#define ROOT_FS_FOLDER L"\\" +#else +#ifdef _WIN32 +#define ROOT_FS_FOLDER L"C:\\\\" +#else +#define ROOT_FS_FOLDER L"\\" +#endif +#endif + +struct CPanelCallback +{ + virtual void OnTab() = 0; + virtual void SetFocusToPath(int index) = 0; + virtual void OnCopy(bool move, bool copyToSame) = 0; + virtual void OnSetSameFolder() = 0; + virtual void OnSetSubFolder() = 0; + virtual void PanelWasFocused() = 0; + virtual void DragBegin() = 0; + virtual void DragEnd() = 0; + virtual void RefreshTitle(bool always) = 0; +}; + +void PanelCopyItems(); + +struct CItemProperty +{ + UString Name; + PROPID ID; + VARTYPE Type; + int Order; + bool IsVisible; + UInt32 Width; +}; + +inline bool operator<(const CItemProperty &a1, const CItemProperty &a2) + { return (a1.Order < a2.Order); } + +inline bool operator==(const CItemProperty &a1, const CItemProperty &a2) + { return (a1.Order == a2.Order); } + +class CItemProperties: public CObjectVector +{ +public: + int FindItemWithID(PROPID id) + { + for (int i = 0; i < Size(); i++) + if ((*this)[i].ID == id) + return i; + return -1; + } +}; + +struct CTempFileInfo +{ + UString ItemName; + UString FolderPath; + UString FilePath; + NWindows::NFile::NFind::CFileInfoW FileInfo; + bool NeedDelete; + + CTempFileInfo(): NeedDelete(false) {} + void DeleteDirAndFile() const + { + if (NeedDelete) + { + NWindows::NFile::NDirectory::DeleteFileAlways(FilePath); + NWindows::NFile::NDirectory::MyRemoveDirectory(FolderPath); + } + } + bool WasChanged(const NWindows::NFile::NFind::CFileInfoW &newFileInfo) const + { + return newFileInfo.Size != FileInfo.Size || + CompareFileTime(&newFileInfo.MTime, &FileInfo.MTime) != 0; + } +}; + +struct CFolderLink: public CTempFileInfo +{ + NWindows::NDLL::CLibrary Library; + CMyComPtr ParentFolder; + bool UsePassword; + UString Password; + bool IsVirtual; + + UString VirtualPath; + CFolderLink(): UsePassword(false), IsVirtual(false) {} + + bool WasChanged(const NWindows::NFile::NFind::CFileInfoW &newFileInfo) const + { + return IsVirtual || CTempFileInfo::WasChanged(newFileInfo); + } + +}; + +enum MyMessages +{ + kShiftSelectMessage = 20000, // FIXME = WM_USER + 1, + kReLoadMessage, + kSetFocusToListView, + kOpenItemChanged, + kRefreshStatusBar +}; + +UString GetFolderPath(IFolderFolder * folder); + +class CPanel; + +class CMyListView: public NWindows::NControl::CListView +{ +public: + WNDPROC _origWindowProc; + CPanel *_panel; + LRESULT OnMessage(UINT message, WPARAM wParam, LPARAM lParam); +}; + +/* +class CMyComboBox: public NWindows::NControl::CComboBoxEx +{ +public: + WNDPROC _origWindowProc; + CPanel *_panel; + LRESULT OnMessage(UINT message, WPARAM wParam, LPARAM lParam); +}; +*/ +class CMyComboBoxEdit: public NWindows::NControl::CEdit +{ +public: + WNDPROC _origWindowProc; + CPanel *_panel; + LRESULT OnMessage(UINT message, WPARAM wParam, LPARAM lParam); +}; + +struct CSelectedState +{ + int FocusedItem; + UString FocusedName; + bool SelectFocused; + UStringVector SelectedNames; + CSelectedState(): FocusedItem(-1), SelectFocused(false) {} +}; + +class CPanel :public NWindows::NControl::CWindow2 +{ + CExtToIconMap _extToIconMap; + UINT _baseID; + int _comboBoxID; + UINT _statusBarID; + + CAppState *_appState; + + bool OnCommand(int code, int itemID, LPARAM lParam, LRESULT &result); + LRESULT OnMessage(UINT message, WPARAM wParam, LPARAM lParam); + virtual bool OnCreate(CREATESTRUCT *createStruct); + // FIXME virtual bool OnSize(WPARAM wParam, int xSize, int ySize); + virtual void OnDestroy(); + virtual bool OnNotify(UINT controlID, LPNMHDR lParam, LRESULT &result); + + void AddComboBoxItem(const UString &name, int iconIndex, int indent, bool addToList); + + bool OnComboBoxCommand(UINT code, LPARAM param, LRESULT &result); + + #ifndef UNDER_CE + + LRESULT OnNotifyComboBoxEnter(const UString &s); + bool OnNotifyComboBoxEndEdit(PNMCBEENDEDITW info, LRESULT &result); + #ifndef _UNICODE + bool OnNotifyComboBoxEndEdit(PNMCBEENDEDIT info, LRESULT &result); + #endif + + #endif + + // FIXME bool OnNotifyReBar(LPNMHDR lParam, LRESULT &result); + bool OnNotifyComboBox(LPNMHDR lParam, LRESULT &result); + void OnItemChanged(NMLISTVIEW *item); + bool OnNotifyList(LPNMHDR lParam, LRESULT &result); + // FIXME void OnDrag(LPNMLISTVIEW nmListView); + // FIXME bool OnKeyDown(LPNMLVKEYDOWN keyDownInfo, LRESULT &result); + // FIXME BOOL OnBeginLabelEdit(LV_DISPINFOW * lpnmh); + // FIXME BOOL OnEndLabelEdit(LV_DISPINFOW * lpnmh); + void OnColumnClick(LPNMLISTVIEW info); + // FIXME bool OnCustomDraw(LPNMLVCUSTOMDRAW lplvcd, LRESULT &result); + +public: + HWND _mainWindow; + CPanelCallback *_panelCallback; + +/* FIXME BEGIN */ + HWND GetParent() { return 0; } + operator HWND() const { return 0; } +/* FIXME END */ + + void DeleteItems(bool toRecycleBin); + void DeleteItemsInternal(CRecordVector &indices); + void CreateFolder(); + void CreateFile(); + +private: + + void ChangeWindowSize(int xSize, int ySize); + + void InitColumns(); + // void InitColumns2(PROPID sortID); + void InsertColumn(int index); + + void SetFocusedSelectedItem(int index, bool select); + void RefreshListCtrl(const UString &focusedName, int focusedPos, bool selectFocused, + const UStringVector &selectedNames); + + void OnShiftSelectMessage(); + void OnArrowWithShift(); + + void OnInsert(); + // void OnUpWithShift(); + // void OnDownWithShift(); +public: + void myTests(); + void UpdateSelection(); + void SelectSpec(bool selectMode); + void SelectByType(bool selectMode); + void SelectAll(bool selectMode); + void InvertSelection(); +private: + + // UString GetFileType(UInt32 index); + LRESULT SetItemText(LVITEMW &item); + + // CRecordVector m_ColumnsPropIDs; + +public: + // FIXME NWindows::NControl::CReBar _headerReBar; + // FIXME NWindows::NControl::CToolBar _headerToolBar; + NWindows::NControl::CComboBoxEx _headerComboBox; + // CMyComboBox _headerComboBox; + CMyComboBoxEdit _comboBoxEdit; + CMyListView _listView; + NWindows::NControl::CStatusBar _statusBar; + bool _lastFocusedIsList; + // NWindows::NControl::CStatusBar _statusBar2; + + DWORD _exStyle; + bool _showDots; + bool _showRealFileIcons; + // bool _virtualMode; + // CUIntVector _realIndices; + bool _enableItemChangeNotify; + bool _mySelectMode; + CBoolVector _selectedStatusVector; + + CSelectedState _selectedState; + + UInt32 GetRealIndex(const LVITEMW &item) const + { + /* + if (_virtualMode) + return _realIndices[item.iItem]; + */ + return (UInt32)item.lParam; + } + int GetRealItemIndex(int indexInListView) const + { + /* + if (_virtualMode) + return indexInListView; + */ + LPARAM param; + if (!_listView.GetItemParam(indexInListView, param)) + throw 1; + return (int)param; + } + + UInt32 _ListViewMode; + int _xSize; + + bool _flatMode; + bool _flatModeForDisk; + bool _flatModeForArc; + + bool _dontShowMode; + + + UString _currentFolderPrefix; + + CObjectVector _parentFolders; + NWindows::NDLL::CLibrary _library; + CMyComPtr _folder; + // CMyComPtr _folderGetSystemIconIndex; + + UStringVector _fastFolders; + + void GetSelectedNames(UStringVector &selectedNames); + void SaveSelectedState(CSelectedState &s); + void RefreshListCtrl(const CSelectedState &s); + void RefreshListCtrlSaveFocused(); + + UString GetItemName(int itemIndex) const; + UString GetItemPrefix(int itemIndex) const; + UString GetItemRelPath(int itemIndex) const; + UString GetItemFullPath(int itemIndex) const; + bool IsItemFolder(int itemIndex) const; + UInt64 GetItemSize(int itemIndex) const; + + //////////////////////// + // PanelFolderChange.cpp + + void SetToRootFolder(); + HRESULT BindToPath(const UString &fullPath, const UString &arcFormat, bool &archiveIsOpened, bool &encrypted); // can be prefix + HRESULT BindToPathAndRefresh(const UString &path); + void OpenDrivesFolder(); + + void SetBookmark(int index); + void OpenBookmark(int index); + + void LoadFullPath(); + void LoadFullPathAndShow(); + void FoldersHistory(); + void OpenParentFolder(); + void CloseOpenFolders(); + void OpenRootFolder(); + + + HRESULT Create(HWND mainWindow, HWND parentWindow, + UINT id, + const UString ¤tFolderPrefix, + const UString &arcFormat, + CPanelCallback *panelCallback, + CAppState *appState, bool &archiveIsOpened, bool &encrypted); + void SetFocusToList(); + void SetFocusToLastRememberedItem(); + + + void ReadListViewInfo(); + void SaveListViewInfo(); + + CPanel() : + // _virtualMode(flase), + _exStyle(0), + _showDots(false), + _showRealFileIcons(false), + _needSaveInfo(false), + _startGroupSelect(0), + _selectionIsDefined(false), + _ListViewMode(3), + _flatMode(false), + _flatModeForDisk(false), + _flatModeForArc(false), + _xSize(300), + _mySelectMode(false), + _enableItemChangeNotify(true), + _dontShowMode(false) + {} + + + void SetExtendedStyle() + { +/* FIXME + if (_listView != 0) + _listView.SetExtendedListViewStyle(_exStyle); + */ + } + + + bool _needSaveInfo; + UString _typeIDString; + CListViewInfo _listViewInfo; + CItemProperties _properties; + CItemProperties _visibleProperties; + + PROPID _sortID; + // int _sortIndex; + bool _ascending; + + void Release(); + ~CPanel(); + // FIXME void OnLeftClick(LPNMITEMACTIVATE itemActivate); + // FIXME bool OnRightClick(LPNMITEMACTIVATE itemActivate, LRESULT &result); + + void OnTimer(); + void OnReload(); + bool OnContextMenu(HANDLE windowHandle, int xPos, int yPos); + +#ifdef _WIN32 + CMyComPtr _sevenZipContextMenu; + CMyComPtr _systemContextMenu; + HRESULT CreateShellContextMenu( + const CRecordVector &operatedIndices, + CMyComPtr &systemContextMenu); + void CreateSystemMenu(HMENU menu, + const CRecordVector &operatedIndices, + CMyComPtr &systemContextMenu); + void CreateSevenZipMenu(HMENU menu, + const CRecordVector &operatedIndices, + CMyComPtr &sevenZipContextMenu); + void CreateFileMenu(HMENU menu, + CMyComPtr &sevenZipContextMenu, + CMyComPtr &systemContextMenu, + bool programMenu); + void CreateFileMenu(HMENU menu); + bool InvokePluginCommand(int id); + bool InvokePluginCommand(int id, IContextMenu *sevenZipContextMenu, + IContextMenu *systemContextMenu); +#endif // ifdef _WIN32 + + void InvokeSystemCommand(const char *command); + void Properties(); + void EditCut(); + void EditCopy(); + void EditPaste(); + + int _startGroupSelect; + + bool _selectionIsDefined; + bool _selectMark; + int _prevFocusedItem; + + + // void SortItems(int index); + void SortItemsWithPropID(PROPID propID); + + void GetSelectedItemsIndices(CRecordVector &indices) const; + void GetOperatedItemIndices(CRecordVector &indices) const; + void GetAllItemIndices(CRecordVector &indices) const; + void GetOperatedIndicesSmart(CRecordVector &indices) const; + // void GetOperatedListViewIndices(CRecordVector &indices) const; + void KillSelection(); + + UString GetFolderTypeID() const; + bool IsFolderTypeEqTo(const wchar_t *s) const; + bool IsRootFolder() const; + bool IsFSFolder() const; + bool IsFSDrivesFolder() const; + bool IsArcFolder() const; + bool IsFsOrDrivesFolder() const { return IsFSFolder() || IsFSDrivesFolder(); } + bool IsDeviceDrivesPrefix() const { return _currentFolderPrefix == L"\\\\.\\"; } + bool IsFsOrPureDrivesFolder() const { return IsFSFolder() || (IsFSDrivesFolder() && !IsDeviceDrivesPrefix()); } + + UString GetFsPath() const; + UString GetDriveOrNetworkPrefix() const; + + bool DoesItSupportOperations() const; + + bool _processTimer; + bool _processNotify; + + class CDisableTimerProcessing + { + bool _processTimerMem; + bool _processNotifyMem; + + CPanel &_panel; + public: + + CDisableTimerProcessing(CPanel &panel): _panel(panel) + { + Disable(); + } + void Disable() + { + _processTimerMem = _panel._processTimer; + _processNotifyMem = _panel._processNotify; + _panel._processTimer = false; + _panel._processNotify = false; + } + void Restore() + { + _panel._processTimer = _processTimerMem; + _panel._processNotify = _processNotifyMem; + } + ~CDisableTimerProcessing() + { + Restore(); + } + CDisableTimerProcessing& operator=(const CDisableTimerProcessing &) {; } + }; + + // bool _passwordIsDefined; + // UString _password; + + void RefreshListCtrl(); + + void MessageBoxInfo(LPCWSTR message, LPCWSTR caption); + void MessageBox(LPCWSTR message); + void MessageBox(LPCWSTR message, LPCWSTR caption); + void MessageBoxMyError(LPCWSTR message); + void MessageBoxError(HRESULT errorCode, LPCWSTR caption); + void MessageBoxError(HRESULT errorCode); + void MessageBoxLastError(LPCWSTR caption); + void MessageBoxLastError(); + + void MessageBoxErrorForUpdate(HRESULT errorCode, UINT resourceID, UInt32 langID); + + void MessageBoxErrorLang(UINT resourceID, UInt32 langID); + + void OpenFocusedItemAsInternal(); + void OpenSelectedItems(bool internal); + + void OpenFolderExternal(int index); + + void OpenFolder(int index); + HRESULT OpenParentArchiveFolder(); + HRESULT OpenItemAsArchive(IInStream *inStream, + const CTempFileInfo &tempFileInfo, + const UString &virtualFilePath, + const UString &arcFormat, + bool &encrypted); + HRESULT OpenItemAsArchive(const UString &name, const UString &arcFormat, bool &encrypted); + HRESULT OpenItemAsArchive(int index); + void OpenItemInArchive(int index, bool tryInternal, bool tryExternal, + bool editMode); + HRESULT OnOpenItemChanged(const UString &folderPath, const UString &itemName, bool usePassword, const UString &password); + LRESULT OnOpenItemChanged(LPARAM lParam); + + void OpenItem(int index, bool tryInternal, bool tryExternal); + void EditItem(); + void EditItem(int index); + + void RenameFile(); + void ChangeComment(); + + void SetListViewMode(UInt32 index); + UInt32 GetListViewMode() const { return _ListViewMode; }; + PROPID GetSortID() const { return _sortID; } + + void ChangeFlatMode(); + bool GetFlatMode() const { return _flatMode; }; + + void RefreshStatusBar(); + void OnRefreshStatusBar(); + + void AddToArchive(); + + void GetFilePaths(const CRecordVector &indices, UStringVector &paths); + void ExtractArchives(); + void TestArchives(); + + HRESULT CopyTo(const CRecordVector &indices, const UString &folder, + bool moveMode, bool showErrorMessages, UStringVector *messages, + bool &usePassword, UString &password); + + HRESULT CopyTo(const CRecordVector &indices, const UString &folder, + bool moveMode, bool showErrorMessages, UStringVector *messages) + { + bool usePassword = false; + UString password; + if (_parentFolders.Size() > 0) + { + const CFolderLink &fl = _parentFolders.Back(); + usePassword = fl.UsePassword; + password = fl.Password; + } + return CopyTo(indices, folder, moveMode, showErrorMessages, messages, usePassword, password); + } + + HRESULT CopyFrom(const UString &folderPrefix, const UStringVector &filePaths, + bool showErrorMessages, UStringVector *messages); + + void CopyFromNoAsk(const UStringVector &filePaths); + void CopyFromAsk(const UStringVector &filePaths); + + // empty folderPath means create new Archive to path of first fileName. + #ifdef _WIN32 + void DropObject(IDataObject * dataObject, const UString &folderPath); + + // empty folderPath means create new Archive to path of first fileName. + void CompressDropFiles(const UStringVector &fileNames, const UString &folderPath); +#endif + + void RefreshTitle(bool always = false) { _panelCallback->RefreshTitle(always); } + void RefreshTitleAlways() { RefreshTitle(true); } + + UString GetItemsInfoString(const CRecordVector &indices); +}; + +class CMyBuffer +{ + void *_data; +public: + CMyBuffer(): _data(0) {} + operator void *() { return _data; } + bool Allocate(size_t size) + { + if (_data != 0) + return false; + _data = ::MidAlloc(size); + return _data != 0; + } + ~CMyBuffer() { ::MidFree(_data); } +}; + +#endif diff --git a/CPP/7zip/UI/FileManager/PanelCopy.cpp b/CPP/7zip/UI/FileManager/PanelCopy.cpp new file mode 100644 index 0000000..8c27ef2 --- /dev/null +++ b/CPP/7zip/UI/FileManager/PanelCopy.cpp @@ -0,0 +1,227 @@ +// PanelExtract.cpp + +#include "StdAfx.h" + +#include "Panel.h" +#include "resource.h" +#include "LangUtils.h" +#include "ExtractCallback.h" +#include "Windows/Thread.h" +//////////////////////////////////////////////////////////////// + +#include "UpdateCallback100.h" + +using namespace NWindows; + +class CPanelCopyThread: public CProgressThreadVirt +{ + HRESULT ProcessVirt(); +public: + CMyComPtr FolderOperations; + CRecordVector Indices; + UString DestPath; + CExtractCallbackImp *ExtractCallbackSpec; + CMyComPtr ExtractCallback; + HRESULT Result; + bool MoveMode; + + CPanelCopyThread(): MoveMode(false), Result(E_FAIL) {} +}; + +HRESULT CPanelCopyThread::ProcessVirt() +{ + if (MoveMode) + Result = FolderOperations->MoveTo(&Indices.Front(), Indices.Size(), DestPath, ExtractCallback); + else + Result = FolderOperations->CopyTo(&Indices.Front(), Indices.Size(), DestPath, ExtractCallback); + return Result; +} + +HRESULT CPanel::CopyTo(const CRecordVector &indices, const UString &folder, + bool moveMode, bool showErrorMessages, UStringVector *messages, + bool &usePassword, UString &password) +{ + CMyComPtr folderOperations; + if (_folder.QueryInterface(IID_IFolderOperations, &folderOperations) != S_OK) + { + UString errorMessage = LangString(IDS_OPERATION_IS_NOT_SUPPORTED, 0x03020208); + if (showErrorMessages) + MessageBox(errorMessage); + else if (messages != 0) + messages->Add(errorMessage); + return E_FAIL; + } + + HRESULT res; + { + CPanelCopyThread extracter; + + + extracter.ExtractCallbackSpec = new CExtractCallbackImp; + extracter.ExtractCallback = extracter.ExtractCallbackSpec; + extracter.ExtractCallbackSpec->ProgressDialog = &extracter.ProgressDialog; + extracter.ProgressDialog.CompressingMode = false; + + UString title = moveMode ? + LangString(IDS_MOVING, 0x03020206): + LangString(IDS_COPYING, 0x03020205); + UString progressWindowTitle = LangString(IDS_APP_TITLE, 0x03000000); + + extracter.ProgressDialog.MainWindow = GetParent(); + extracter.ProgressDialog.MainTitle = progressWindowTitle; + extracter.ProgressDialog.MainAddTitle = title + L" "; + + extracter.ExtractCallbackSpec->OverwriteMode = NExtract::NOverwriteMode::kAskBefore; + extracter.ExtractCallbackSpec->Init(); + extracter.Indices = indices; + extracter.DestPath = folder; + extracter.FolderOperations = folderOperations; + extracter.MoveMode = moveMode; + + extracter.ExtractCallbackSpec->PasswordIsDefined = usePassword; + extracter.ExtractCallbackSpec->Password = password; + + RINOK(extracter.Create(title, GetParent())); + + if (messages != 0) + *messages = extracter.ProgressDialog.Sync.Messages; + res = extracter.Result; + + if (res == S_OK && extracter.ExtractCallbackSpec->IsOK()) + { + usePassword = extracter.ExtractCallbackSpec->PasswordIsDefined; + password = extracter.ExtractCallbackSpec->Password; + } + } + RefreshTitleAlways(); + return res; +} + + +struct CThreadUpdate +{ + CMyComPtr FolderOperations; + UString FolderPrefix; + UStringVector FileNames; + CRecordVector FileNamePointers; + CProgressDialog ProgressDialog; + CMyComPtr UpdateCallback; + CUpdateCallback100Imp *UpdateCallbackSpec; + HRESULT Result; + + void Process() + { + try + { + CProgressCloser closer(ProgressDialog); + Result = FolderOperations->CopyFrom( + FolderPrefix, + &FileNamePointers.Front(), + FileNamePointers.Size(), + UpdateCallback); + } + catch(...) { Result = E_FAIL; } + } + static THREAD_FUNC_DECL MyThreadFunction(void *param) + { + ((CThreadUpdate *)param)->Process(); + return 0; + } +}; + +HRESULT CPanel::CopyFrom(const UString &folderPrefix, const UStringVector &filePaths, + bool showErrorMessages, UStringVector *messages) +{ + CMyComPtr folderOperations; + _folder.QueryInterface(IID_IFolderOperations, &folderOperations); + HRESULT res; + if (!folderOperations) + res = E_NOINTERFACE; + else + { + CThreadUpdate updater; + updater.UpdateCallbackSpec = new CUpdateCallback100Imp; + updater.UpdateCallback = updater.UpdateCallbackSpec; + + updater.UpdateCallbackSpec->ProgressDialog = &updater.ProgressDialog; + + UString title = LangString(IDS_COPYING, 0x03020205); + UString progressWindowTitle = LangString(IDS_APP_TITLE, 0x03000000); + + updater.ProgressDialog.MainWindow = GetParent(); + updater.ProgressDialog.MainTitle = progressWindowTitle; + updater.ProgressDialog.MainAddTitle = title + UString(L" "); + + updater.UpdateCallbackSpec->Init(false, L""); + updater.FolderOperations = folderOperations; + updater.FolderPrefix = folderPrefix; + updater.FileNames.Reserve(filePaths.Size()); + int i; + for(i = 0; i < filePaths.Size(); i++) + updater.FileNames.Add(filePaths[i]); + updater.FileNamePointers.Reserve(updater.FileNames.Size()); + for(i = 0; i < updater.FileNames.Size(); i++) + updater.FileNamePointers.Add(updater.FileNames[i]); + + NWindows::CThread thread; + RINOK(thread.Create(CThreadUpdate::MyThreadFunction, &updater)); + updater.ProgressDialog.Create(title, thread, GetParent()); + + if (messages != 0) + *messages = updater.ProgressDialog.Sync.Messages; + + res = updater.Result; + } + + if (res == E_NOINTERFACE) + { + UString errorMessage = LangString(IDS_OPERATION_IS_NOT_SUPPORTED, 0x03020208); + if (showErrorMessages) + MessageBox(errorMessage); + else if (messages != 0) + messages->Add(errorMessage); + return E_ABORT; + } + + RefreshTitleAlways(); + return res; +} + +void CPanel::CopyFromNoAsk(const UStringVector &filePaths) +{ + CDisableTimerProcessing disableTimerProcessing(*this); + + CSelectedState srcSelState; + SaveSelectedState(srcSelState); + + HRESULT result = CopyFrom(L"", filePaths, true, 0); + + if (result != S_OK) + { + disableTimerProcessing.Restore(); + // For Password: + SetFocusToList(); + if (result != E_ABORT) + MessageBoxError(result); + return; + } + + RefreshListCtrl(srcSelState); + + disableTimerProcessing.Restore(); + SetFocusToList(); +} + +void CPanel::CopyFromAsk(const UStringVector &filePaths) +{ + UString title = LangString(IDS_CONFIRM_FILE_COPY, 0x03020222); + UString message = LangString(IDS_WANT_TO_COPY_FILES, 0x03020223); + message += L"\n\'"; + message += _currentFolderPrefix; + message += L"\' ?"; + int res = ::MessageBoxW(*(this), message, title, MB_YESNOCANCEL | MB_ICONQUESTION); + if (res != IDYES) + return; + + CopyFromNoAsk(filePaths); +} diff --git a/CPP/7zip/UI/FileManager/PanelCrc.cpp b/CPP/7zip/UI/FileManager/PanelCrc.cpp new file mode 100644 index 0000000..6b00a9b --- /dev/null +++ b/CPP/7zip/UI/FileManager/PanelCrc.cpp @@ -0,0 +1,342 @@ +// PanelSplitFile.cpp + +#include "StdAfx.h" + +#include "../../../../C/7zCrc.h" +#include "../../../../C/Sha256.h" + +#include "Common/IntToString.h" + +#include "Windows/FileFind.h" +#include "Windows/FileIO.h" +#include "Windows/FileName.h" + +#include "OverwriteDialogRes.h" + +#include "App.h" +#include "FormatUtils.h" +#include "LangUtils.h" + +#include "../Common/PropIDUtils.h" + +#include "resource.h" + +using namespace NWindows; +using namespace NFile; + +static const UInt32 kBufSize = (1 << 15); + +struct CDirEnumerator +{ + bool FlatMode; + UString BasePrefix; + UStringVector FileNames; + + CObjectVector Enumerators; + UStringVector Prefixes; + int Index; + HRESULT GetNextFile(NFind::CFileInfoW &fileInfo, bool &filled, UString &fullPath); + void Init(); + + CDirEnumerator(): FlatMode(false) {}; +}; + +void CDirEnumerator::Init() +{ + Enumerators.Clear(); + Prefixes.Clear(); + Index = 0; +} + +static HRESULT GetNormalizedError() +{ + HRESULT errorCode = GetLastError(); + return (errorCode == 0) ? E_FAIL : errorCode; +} + +HRESULT CDirEnumerator::GetNextFile(NFind::CFileInfoW &fileInfo, bool &filled, UString &resPath) +{ + filled = false; + for (;;) + { + if (Enumerators.IsEmpty()) + { + if (Index >= FileNames.Size()) + return S_OK; + const UString &path = FileNames[Index]; + int pos = path.ReverseFind(WCHAR_PATH_SEPARATOR); + resPath.Empty(); + if (pos >= 0) + resPath = path.Left(pos + 1); + + #ifdef _WIN32 + // it's for "c:" paths/ + if (BasePrefix.IsEmpty() && path.Length() == 2 && path[1] == ':') + { + fileInfo.Name = path; + fileInfo.Attrib = FILE_ATTRIBUTE_DIRECTORY; + fileInfo.Size = 0; + } + else + #endif + if (!fileInfo.Find(BasePrefix + path)) + { + WRes errorCode = GetNormalizedError(); + resPath = path; + return errorCode; + } + Index++; + break; + } + bool found; + if (!Enumerators.Back().Next(fileInfo, found)) + { + HRESULT errorCode = GetNormalizedError(); + resPath = Prefixes.Back(); + return errorCode; + } + if (found) + { + resPath = Prefixes.Back(); + break; + } + Enumerators.DeleteBack(); + Prefixes.DeleteBack(); + } + resPath += fileInfo.Name; + if (!FlatMode && fileInfo.IsDir()) + { + UString prefix = resPath + WCHAR_PATH_SEPARATOR; + Enumerators.Add(NFind::CEnumeratorW(BasePrefix + prefix + (UString)(wchar_t)NName::kAnyStringWildcard)); + Prefixes.Add(prefix); + } + filled = true; + return S_OK; +} + +static void ConvertByteToHex(unsigned value, wchar_t *s) +{ + for (int i = 0; i < 2; i++) + { + unsigned t = value & 0xF; + value >>= 4; + s[1 - i] = (wchar_t)((t < 10) ? (L'0' + t) : (L'A' + (t - 10))); + } +} + +class CThreadCrc: public CProgressThreadVirt +{ + UInt64 NumFilesScan; + UInt64 NumFiles; + UInt64 NumFolders; + UInt64 DataSize; + UInt32 DataCrcSum; + Byte Sha256Sum[SHA256_DIGEST_SIZE]; + UInt32 DataNameCrcSum; + + UString GetResultMessage() const; + HRESULT ProcessVirt(); +public: + CDirEnumerator Enumerator; + +}; + +UString CThreadCrc::GetResultMessage() const +{ + UString s; + wchar_t sz[32]; + + s += LangString(IDS_FILES_COLON, 0x02000320); + s += L' '; + ConvertUInt64ToString(NumFiles, sz); + s += sz; + s += L'\n'; + + s += LangString(IDS_FOLDERS_COLON, 0x02000321); + s += L' '; + ConvertUInt64ToString(NumFolders, sz); + s += sz; + s += L'\n'; + + s += LangString(IDS_SIZE_COLON, 0x02000322); + s += L' '; + ConvertUInt64ToString(DataSize, sz); + s += MyFormatNew(IDS_FILE_SIZE, 0x02000982, sz); + s += L'\n'; + + s += LangString(IDS_CHECKSUM_CRC_DATA, 0x03020721); + s += L' '; + ConvertUInt32ToHex(DataCrcSum, sz); + s += sz; + s += L'\n'; + + s += LangString(IDS_CHECKSUM_CRC_DATA_NAMES, 0x03020722); + s += L' '; + ConvertUInt32ToHex(DataNameCrcSum, sz); + s += sz; + s += L'\n'; + + if (NumFiles == 1 && NumFilesScan == 1) + { + s += L"SHA-256: "; + for (int i = 0; i < SHA256_DIGEST_SIZE; i++) + { + wchar_t s2[4]; + ConvertByteToHex(Sha256Sum[i], s2); + s2[2] = 0; + s += s2; + } + } + return s; +} + +HRESULT CThreadCrc::ProcessVirt() +{ + DataSize = NumFolders = NumFiles = NumFilesScan = DataCrcSum = DataNameCrcSum = 0; + memset(Sha256Sum, 0, SHA256_DIGEST_SIZE); + // ProgressDialog.WaitCreating(); + + CMyBuffer bufferObject; + if (!bufferObject.Allocate(kBufSize)) + return E_OUTOFMEMORY; + Byte *buffer = (Byte *)(void *)bufferObject; + + UInt64 totalSize = 0; + + Enumerator.Init(); + + UString scanningStr = LangString(IDS_SCANNING, 0x03020800); + scanningStr += L' '; + + CProgressSync &sync = ProgressDialog.Sync; + + for (;;) + { + NFind::CFileInfoW fileInfo; + bool filled; + UString resPath; + HRESULT errorCode = Enumerator.GetNextFile(fileInfo, filled, resPath); + if (errorCode != 0) + { + ErrorPath1 = resPath; + return errorCode; + } + if (!filled) + break; + if (!fileInfo.IsDir()) + { + totalSize += fileInfo.Size; + NumFilesScan++; + } + sync.SetCurrentFileName(scanningStr + resPath); + sync.SetProgress(totalSize, 0); + RINOK(sync.SetPosAndCheckPaused(0)); + } + sync.SetNumFilesTotal(NumFilesScan); + sync.SetProgress(totalSize, 0); + + Enumerator.Init(); + + for (;;) + { + NFind::CFileInfoW fileInfo; + bool filled; + UString resPath; + HRESULT errorCode = Enumerator.GetNextFile(fileInfo, filled, resPath); + if (errorCode != 0) + { + ErrorPath1 = resPath; + return errorCode; + } + if (!filled) + break; + + UInt32 crc = CRC_INIT_VAL; + CSha256 sha256; + Sha256_Init(&sha256); + + if (fileInfo.IsDir()) + NumFolders++; + else + { + NIO::CInFile inFile; + if (!inFile.Open(Enumerator.BasePrefix + resPath)) + { + errorCode = GetNormalizedError(); + ErrorPath1 = resPath; + return errorCode; + } + sync.SetCurrentFileName(resPath); + sync.SetNumFilesCur(NumFiles); + NumFiles++; + for (;;) + { + UInt32 processedSize; + if (!inFile.Read(buffer, kBufSize, processedSize)) + { + errorCode = GetNormalizedError(); + ErrorPath1 = resPath; + return errorCode; + } + if (processedSize == 0) + break; + crc = CrcUpdate(crc, buffer, processedSize); + if (NumFilesScan == 1) + Sha256_Update(&sha256, buffer, processedSize); + + DataSize += processedSize; + RINOK(sync.SetPosAndCheckPaused(DataSize)); + } + DataCrcSum += CRC_GET_DIGEST(crc); + if (NumFilesScan == 1) + Sha256_Final(&sha256, Sha256Sum); + } + for (int i = 0; i < resPath.Length(); i++) + { + wchar_t c = resPath[i]; + crc = CRC_UPDATE_BYTE(crc, ((Byte)(c & 0xFF))); + crc = CRC_UPDATE_BYTE(crc, ((Byte)((c >> 8) & 0xFF))); + } + DataNameCrcSum += CRC_GET_DIGEST(crc); + RINOK(sync.SetPosAndCheckPaused(DataSize)); + } + sync.SetNumFilesCur(NumFiles); + OkMessage = GetResultMessage(); + OkMessageTitle = LangString(IDS_CHECKSUM_INFORMATION, 0x03020720); + return S_OK; +} + +void CApp::CalculateCrc() +{ + int srcPanelIndex = GetFocusedPanelIndex(); + CPanel &srcPanel = Panels[srcPanelIndex]; + if (!srcPanel.IsFsOrDrivesFolder()) + { + srcPanel.MessageBoxErrorLang(IDS_OPERATION_IS_NOT_SUPPORTED, 0x03020208); + return; + } + CRecordVector indices; + srcPanel.GetOperatedItemIndices(indices); + if (indices.IsEmpty()) + return; + + { + CThreadCrc t; + for (int i = 0; i < indices.Size(); i++) + t.Enumerator.FileNames.Add(srcPanel.GetItemRelPath(indices[i])); + t.Enumerator.BasePrefix = srcPanel.GetFsPath(); + t.Enumerator.FlatMode = GetFlatMode(); + + t.ProgressDialog.ShowCompressionInfo = false; + + UString title = LangString(IDS_CHECKSUM_CALCULATING, 0x03020710); + + t.ProgressDialog.MainWindow = _window; + t.ProgressDialog.MainTitle = LangString(IDS_APP_TITLE, 0x03000000); + t.ProgressDialog.MainAddTitle = title + UString(L' '); + + if (t.Create(title, _window) != S_OK) + return; + } + RefreshTitleAlways(); +} diff --git a/CPP/7zip/UI/FileManager/PanelCrc.cpp.back b/CPP/7zip/UI/FileManager/PanelCrc.cpp.back new file mode 100644 index 0000000..61490b5 --- /dev/null +++ b/CPP/7zip/UI/FileManager/PanelCrc.cpp.back @@ -0,0 +1,368 @@ +// PanelSplitFile.cpp + +#include "StdAfx.h" + +#include "resource.h" + +extern "C" +{ + #include "../../../../C/Alloc.h" + #include "../../../../C/7zCrc.h" +} + +#include "Common/IntToString.h" +#include "Common/StringConvert.h" + +#include "Windows/FileIO.h" +#include "Windows/FileFind.h" +#include "Windows/FileName.h" +#include "Windows/Thread.h" +#include "Windows/Error.h" + +#include "ProgressDialog2.h" +#include "OverwriteDialogRes.h" + +#include "App.h" +#include "FormatUtils.h" +#include "LangUtils.h" + +using namespace NWindows; +using namespace NFile; +using namespace NName; + +static const UInt32 kBufSize = (1 << 15); + +struct CDirEnumerator +{ + bool FlatMode; + UString BasePrefix; + UStringVector FileNames; + + CObjectVector Enumerators; + UStringVector Prefixes; + int Index; + bool GetNextFile(NFind::CFileInfoW &fileInfo, bool &filled, UString &fullPath, DWORD &errorCode); + void Init(); + + CDirEnumerator(): FlatMode(false) {}; +}; + +void CDirEnumerator::Init() +{ + Enumerators.Clear(); + Prefixes.Clear(); + Index = 0; +} + +bool CDirEnumerator::GetNextFile(NFind::CFileInfoW &fileInfo, bool &filled, UString &resPath, DWORD &errorCode) +{ + filled = false; + for (;;) + { + if (Enumerators.IsEmpty()) + { + if (Index >= FileNames.Size()) + return true; + const UString &path = FileNames[Index]; + int pos = path.ReverseFind('\\'); + resPath.Empty(); + if (pos >= 0) + resPath = path.Left(pos + 1); + if (!NFind::FindFile(BasePrefix + path, fileInfo)) + { + errorCode = ::GetLastError(); + resPath = path; + return false; + } + Index++; + break; + } + bool found; + if (!Enumerators.Back().Next(fileInfo, found)) + { + errorCode = ::GetLastError(); + resPath = Prefixes.Back(); + return false; + } + if (found) + { + resPath = Prefixes.Back(); + break; + } + Enumerators.DeleteBack(); + Prefixes.DeleteBack(); + } + resPath += fileInfo.Name; + if (!FlatMode && fileInfo.IsDir()) + { + UString prefix = resPath + (UString)(wchar_t)kDirDelimiter; + Enumerators.Add(NFind::CEnumeratorW(BasePrefix + prefix + (UString)(wchar_t)kAnyStringWildcard)); + Prefixes.Add(prefix); + } + filled = true; + return true; +} + +struct CThreadCrc +{ + class CMyBuffer + { + void *_data; + public: + CMyBuffer(): _data(0) {} + operator void *() { return _data; } + bool Allocate(size_t size) + { + if (_data != 0) + return false; + _data = ::MidAlloc(size); + return _data != 0; + } + ~CMyBuffer() { ::MidFree(_data); } + }; + + CProgressDialog *ProgressDialog; + + CDirEnumerator DirEnumerator; + + UInt64 NumFiles; + UInt64 NumFolders; + UInt64 DataSize; + UInt32 DataCrcSum; + UInt32 DataNameCrcSum; + + HRESULT Result; + DWORD ErrorCode; + UString ErrorPath; + UString Error; + bool ThereIsError; + + void Process2() + { + DataSize = NumFolders = NumFiles = DataCrcSum = DataNameCrcSum = 0; + ProgressDialog->WaitCreating(); + + CMyBuffer bufferObject; + if (!bufferObject.Allocate(kBufSize)) + { + Error = L"Can not allocate memory"; + ThereIsError = true; + return; + } + Byte *buffer = (Byte *)(void *)bufferObject; + + UInt64 totalSize = 0; + + DirEnumerator.Init(); + + UString scanningStr = LangString(IDS_SCANNING, 0x03020800); + scanningStr += L" "; + + for (;;) + { + NFile::NFind::CFileInfoW fileInfo; + bool filled; + UString resPath; + if (!DirEnumerator.GetNextFile(fileInfo, filled, resPath, ErrorCode)) + { + ThereIsError = true; + ErrorPath = resPath; + return; + } + if (!filled) + break; + if (!fileInfo.IsDir()) + totalSize += fileInfo.Size; + ProgressDialog->ProgressSynch.SetCurrentFileName(scanningStr + resPath); + ProgressDialog->ProgressSynch.SetProgress(totalSize, 0); + Result = ProgressDialog->ProgressSynch.SetPosAndCheckPaused(0); + if (Result != S_OK) + return; + } + + ProgressDialog->ProgressSynch.SetProgress(totalSize, 0); + + DirEnumerator.Init(); + + for (;;) + { + NFile::NFind::CFileInfoW fileInfo; + bool filled; + UString resPath; + if (!DirEnumerator.GetNextFile(fileInfo, filled, resPath, ErrorCode)) + { + ThereIsError = true; + ErrorPath = resPath; + return; + } + if (!filled) + break; + + UInt32 crc = CRC_INIT_VAL; + if (fileInfo.IsDir()) + NumFolders++; + else + { + NFile::NIO::CInFile inFile; + if (!inFile.Open(DirEnumerator.BasePrefix + resPath)) + { + ErrorCode = ::GetLastError(); + ThereIsError = true; + ErrorPath = resPath; + return; + } + NumFiles++; + ProgressDialog->ProgressSynch.SetCurrentFileName(resPath); + for (;;) + { + UInt32 processedSize; + if (!inFile.Read(buffer, kBufSize, processedSize)) + { + ErrorCode = ::GetLastError(); + ThereIsError = true; + ErrorPath = resPath; + return; + } + if (processedSize == 0) + break; + crc = CrcUpdate(crc, buffer, processedSize); + DataSize += processedSize; + Result = ProgressDialog->ProgressSynch.SetPosAndCheckPaused(DataSize); + if (Result != S_OK) + return; + } + DataCrcSum += CRC_GET_DIGEST(crc); + } + for (int i = 0; i < resPath.Length(); i++) + { + wchar_t c = resPath[i]; + crc = CRC_UPDATE_BYTE(crc, ((Byte)(c & 0xFF))); + crc = CRC_UPDATE_BYTE(crc, ((Byte)((c >> 8) & 0xFF))); + } + DataNameCrcSum += CRC_GET_DIGEST(crc); + Result = ProgressDialog->ProgressSynch.SetPosAndCheckPaused(DataSize); + if (Result != S_OK) + return; + } + } + DWORD Process() + { + try { Process2(); } + catch(...) { Error = L"Error"; ThereIsError = true;} + ProgressDialog->MyClose(); + return 0; + } + + static THREAD_FUNC_DECL MyThreadFunction(void *param) + { + return ((CThreadCrc *)param)->Process(); + } +}; + +static void ConvertUInt32ToHex(UInt32 value, wchar_t *s) +{ + for (int i = 0; i < 8; i++) + { + int t = value & 0xF; + value >>= 4; + s[7 - i] = (wchar_t)((t < 10) ? (L'0' + t) : (L'A' + (t - 10))); + } + s[8] = L'\0'; +} + +void CApp::CalculateCrc() +{ + int srcPanelIndex = GetFocusedPanelIndex(); + CPanel &srcPanel = Panels[srcPanelIndex]; + if (!srcPanel.IsFSFolder()) + { + srcPanel.MessageBoxErrorLang(IDS_OPERATION_IS_NOT_SUPPORTED, 0x03020208); + return; + } + CRecordVector indices; + srcPanel.GetOperatedItemIndices(indices); + if (indices.IsEmpty()) + return; + + CThreadCrc combiner; + for (int i = 0; i < indices.Size(); i++) + combiner.DirEnumerator.FileNames.Add(srcPanel.GetItemRelPath(indices[i])); + combiner.DirEnumerator.BasePrefix = srcPanel._currentFolderPrefix; + combiner.DirEnumerator.FlatMode = GetFlatMode(); + + { + CProgressDialog progressDialog; + combiner.ProgressDialog = &progressDialog; + combiner.ErrorCode = 0; + combiner.Result = S_OK; + combiner.ThereIsError = false; + + UString progressWindowTitle = LangString(IDS_APP_TITLE, 0x03000000); + UString title = LangString(IDS_CHECKSUM_CALCULATING, 0x03020710); + + progressDialog.MainWindow = _window; + progressDialog.MainTitle = progressWindowTitle; + progressDialog.MainAddTitle = title + UString(L" "); + + NWindows::CThread thread; + if (thread.Create(CThreadCrc::MyThreadFunction, &combiner) != S_OK) + return; + progressDialog.Create(title, _window); + + if (combiner.Result != S_OK) + { + if (combiner.Result != E_ABORT) + srcPanel.MessageBoxError(combiner.Result); + } + else if (combiner.ThereIsError) + { + if (combiner.Error.IsEmpty()) + { + UString message = combiner.DirEnumerator.BasePrefix + combiner.ErrorPath; + message += L"\n"; + message += NError::MyFormatMessageW(combiner.ErrorCode); + srcPanel.MessageBoxMyError(message); + } + else + srcPanel.MessageBoxMyError(combiner.Error); + } + else + { + UString s; + { + wchar_t sz[32]; + + s += LangString(IDS_FILES_COLON, 0x02000320); + s += L" "; + ConvertUInt64ToString(combiner.NumFiles, sz); + s += sz; + s += L"\n"; + + s += LangString(IDS_FOLDERS_COLON, 0x02000321); + s += L" "; + ConvertUInt64ToString(combiner.NumFolders, sz); + s += sz; + s += L"\n"; + + s += LangString(IDS_SIZE_COLON, 0x02000322); + s += L" "; + ConvertUInt64ToString(combiner.DataSize, sz); + s += MyFormatNew(IDS_FILE_SIZE, 0x02000982, sz);; + s += L"\n"; + + s += LangString(IDS_CHECKSUM_CRC_DATA, 0x03020721); + s += L" "; + ConvertUInt32ToHex(combiner.DataCrcSum, sz); + s += sz; + s += L"\n"; + + s += LangString(IDS_CHECKSUM_CRC_DATA_NAMES, 0x03020722); + s += L" "; + ConvertUInt32ToHex(combiner.DataNameCrcSum, sz); + s += sz; + } + srcPanel.MessageBoxInfo(s, LangString(IDS_CHECKSUM_INFORMATION, 0x03020720)); + } + } + RefreshTitleAlways(); +} diff --git a/CPP/7zip/UI/FileManager/PanelFolderChange.cpp b/CPP/7zip/UI/FileManager/PanelFolderChange.cpp new file mode 100644 index 0000000..6d1c83e --- /dev/null +++ b/CPP/7zip/UI/FileManager/PanelFolderChange.cpp @@ -0,0 +1,635 @@ +// PanelFolderChange.cpp + +#include "StdAfx.h" + +#include "Common/StringConvert.h" +#include "Common/Wildcard.h" + +#include "Windows/PropVariant.h" + +#include "../../PropID.h" + +#ifdef UNDER_CE +#include "FSFolder.h" +#else +#include "FSDrives.h" +#endif +#include "LangUtils.h" +#include "ListViewDialog.h" +#include "Panel.h" +#include "RootFolder.h" +#include "ViewSettings.h" + +#include "resource.h" + +using namespace NWindows; +using namespace NFile; +using namespace NFind; + +void CPanel::SetToRootFolder() +{ + _folder.Release(); + _library.Free(); + CRootFolder *rootFolderSpec = new CRootFolder; + _folder = rootFolderSpec; + rootFolderSpec->Init(); +} + +HRESULT CPanel::BindToPath(const UString &fullPath, const UString &arcFormat, bool &archiveIsOpened, bool &encrypted) +{ + archiveIsOpened = false; + encrypted = false; + CDisableTimerProcessing disableTimerProcessing1(*this); + + printf("CPanel::BindToPath(%ls)\n",(const wchar_t *)fullPath); + + if (_parentFolders.Size() > 0) + { + const UString &virtPath = _parentFolders.Back().VirtualPath; + if (fullPath.Left(virtPath.Length()) == virtPath) + { + for (;;) + { + CMyComPtr newFolder; + HRESULT res = _folder->BindToParentFolder(&newFolder); + if (!newFolder || res != S_OK) + break; + _folder = newFolder; + } + UStringVector parts; + SplitPathToParts(fullPath.Mid(virtPath.Length()), parts); + for (int i = 0; i < parts.Size(); i++) + { + const UString &s = parts[i]; + if ((i == 0 || i == parts.Size() - 1) && s.IsEmpty()) + continue; + CMyComPtr newFolder; + HRESULT res = _folder->BindToFolder(s, &newFolder); + if (!newFolder || res != S_OK) + break; + _folder = newFolder; + } + return S_OK; + } + } + + CloseOpenFolders(); + UString sysPath = fullPath; + CFileInfoW fileInfo; + UStringVector reducedParts; + while (!sysPath.IsEmpty()) + { + if (fileInfo.Find(sysPath)) + break; + int pos = sysPath.ReverseFind(WCHAR_PATH_SEPARATOR); + if (pos < 0) + sysPath.Empty(); + else + { + if (reducedParts.Size() > 0 || pos < sysPath.Length() - 1) + reducedParts.Add(sysPath.Mid(pos + 1)); + sysPath = sysPath.Left(pos); + } + } + SetToRootFolder(); + CMyComPtr newFolder; + if (sysPath.IsEmpty()) + { + if (_folder->BindToFolder(fullPath, &newFolder) == S_OK) + _folder = newFolder; + } + else if (fileInfo.IsDir()) + { + NName::NormalizeDirPathPrefix(sysPath); + if (_folder->BindToFolder(sysPath, &newFolder) == S_OK) + _folder = newFolder; + } + else + { + UString dirPrefix; + if (!NDirectory::GetOnlyDirPrefix(sysPath, dirPrefix)) + dirPrefix.Empty(); + if (_folder->BindToFolder(dirPrefix, &newFolder) == S_OK) + { + _folder = newFolder; + LoadFullPath(); + UString fileName; + if (NDirectory::GetOnlyName(sysPath, fileName)) + { + HRESULT res = OpenItemAsArchive(fileName, arcFormat, encrypted); + if (res != S_FALSE) + { + RINOK(res); + } + /* + if (res == E_ABORT) + return res; + */ + if (res == S_OK) + { + archiveIsOpened = true; + for (int i = reducedParts.Size() - 1; i >= 0; i--) + { + CMyComPtr newFolder; + _folder->BindToFolder(reducedParts[i], &newFolder); + if (!newFolder) + break; + _folder = newFolder; + } + } + } + } + } + return S_OK; +} + +HRESULT CPanel::BindToPathAndRefresh(const UString &path) +{ + CDisableTimerProcessing disableTimerProcessing1(*this); + bool archiveIsOpened, encrypted; + RINOK(BindToPath(path, UString(), archiveIsOpened, encrypted)); + RefreshListCtrl(UString(), -1, true, UStringVector()); + return S_OK; +} + +void CPanel::SetBookmark(int index) +{ + _appState->FastFolders.SetString(index, _currentFolderPrefix); +} + +void CPanel::OpenBookmark(int index) +{ + BindToPathAndRefresh(_appState->FastFolders.GetString(index)); +} + +UString GetFolderPath(IFolderFolder *folder) +{ + NCOM::CPropVariant prop; + if (folder->GetFolderProperty(kpidPath, &prop) == S_OK) + if (prop.vt == VT_BSTR) + return (wchar_t *)prop.bstrVal; + return UString(); +} + +void CPanel::LoadFullPath() +{ + _currentFolderPrefix.Empty(); + for (int i = 0; i < _parentFolders.Size(); i++) + { + const CFolderLink &folderLink = _parentFolders[i]; + _currentFolderPrefix += GetFolderPath(folderLink.ParentFolder); + _currentFolderPrefix += folderLink.ItemName; + _currentFolderPrefix += WCHAR_PATH_SEPARATOR; + } + if (_folder) + _currentFolderPrefix += GetFolderPath(_folder); +} + +static int GetRealIconIndex(LPCWSTR path, DWORD attributes) +{ + int index = -1; + if (GetRealIconIndex(path, attributes, index) != 0) + return index; + return -1; +} + +void CPanel::LoadFullPathAndShow() +{ + LoadFullPath(); + _appState->FolderHistory.AddString(_currentFolderPrefix); + +#ifdef _WIN32 + _headerComboBox.SetText(_currentFolderPrefix); +#else + { + extern const TCHAR * nameWindowToUnix(const TCHAR * lpFileName); + UString tmp = nameWindowToUnix(_currentFolderPrefix); + _headerComboBox.SetText(tmp); + } +#endif + +#ifdef _WIN32 // FIXME + COMBOBOXEXITEM item; + item.mask = 0; + + UString path = _currentFolderPrefix; + if (path.Length() > + #ifdef _WIN32 + 3 + #else + 1 + #endif + && path[path.Length() - 1] == WCHAR_PATH_SEPARATOR) + path.Delete(path.Length() - 1); + + CFileInfoW info; + DWORD attrib = FILE_ATTRIBUTE_DIRECTORY; + if (info.Find(path)) + attrib = info.Attrib; + + item.iImage = GetRealIconIndex(path, attrib); + + if (item.iImage >= 0) + { + item.iSelectedImage = item.iImage; + item.mask |= (CBEIF_IMAGE | CBEIF_SELECTEDIMAGE); + } + item.iItem = -1; + _headerComboBox.SetItem(&item); +#endif + + RefreshTitle(); +} + +#ifndef UNDER_CE +LRESULT CPanel::OnNotifyComboBoxEnter(const UString &s) +{ + if (BindToPathAndRefresh(GetUnicodeString(s)) == S_OK) + { + // FIXME PostMessage(kSetFocusToListView); + return TRUE; + } + return FALSE; +} + +bool CPanel::OnNotifyComboBoxEndEdit(PNMCBEENDEDITW info, LRESULT &result) +{ + if (info->iWhy == CBENF_ESCAPE) + { + _headerComboBox.SetText(_currentFolderPrefix); + // FIXME PostMessage(kSetFocusToListView); + result = FALSE; + return true; + } + + /* + if (info->iWhy == CBENF_DROPDOWN) + { + result = FALSE; + return true; + } + */ + + if (info->iWhy == CBENF_RETURN) + { + // When we use Edit control and press Enter. + UString s; + _headerComboBox.GetText(s); + result = OnNotifyComboBoxEnter(s); + return true; + } + return false; +} +#endif + +#ifndef _UNICODE +bool CPanel::OnNotifyComboBoxEndEdit(PNMCBEENDEDIT info, LRESULT &result) +{ + if (info->iWhy == CBENF_ESCAPE) + { + _headerComboBox.SetText(_currentFolderPrefix); + PostMessage(kSetFocusToListView); + result = FALSE; + return true; + } + /* + if (info->iWhy == CBENF_DROPDOWN) + { + result = FALSE; + return true; + } + */ + + if (info->iWhy == CBENF_RETURN) + { + UString s; + _headerComboBox.GetText(s); + // GetUnicodeString(info->szText) + result = OnNotifyComboBoxEnter(s); + return true; + } + return false; +} +#endif + +#ifdef _WIN32 +void CPanel::AddComboBoxItem(const UString &name, int iconIndex, int indent, bool addToList) +{ + #ifdef UNDER_CE + + UString s; + iconIndex = iconIndex; + for (int i = 0; i < indent; i++) + s += L" "; + _headerComboBox.AddString(s + name); + + #else + + COMBOBOXEXITEMW item; + item.mask = CBEIF_TEXT | CBEIF_INDENT; + item.iSelectedImage = item.iImage = iconIndex; + if (iconIndex >= 0) + item.mask |= (CBEIF_IMAGE | CBEIF_SELECTEDIMAGE); + item.iItem = -1; + item.iIndent = indent; + item.pszText = (LPWSTR)(LPCWSTR)name; + _headerComboBox.InsertItem(&item); + + #endif + + if (addToList) + ComboBoxPaths.Add(name); +} + +extern UString RootFolder_GetName_Computer(int &iconIndex); +extern UString RootFolder_GetName_Network(int &iconIndex); +extern UString RootFolder_GetName_Documents(int &iconIndex); +#endif + + +bool CPanel::OnComboBoxCommand(UINT code, LPARAM /* param */, LRESULT &result) +{ +#ifdef _WIN32 // FIXME + result = FALSE; + switch(code) + { + case CBN_DROPDOWN: + { + ComboBoxPaths.Clear(); + _headerComboBox.ResetContent(); + + int i; + UStringVector pathParts; + + SplitPathToParts(_currentFolderPrefix, pathParts); + UString sumPass; + if (!pathParts.IsEmpty()) + pathParts.DeleteBack(); + for (i = 0; i < pathParts.Size(); i++) + { + UString name = pathParts[i]; + sumPass += name; + sumPass += WCHAR_PATH_SEPARATOR; + CFileInfoW info; + DWORD attrib = FILE_ATTRIBUTE_DIRECTORY; + if (info.Find(sumPass)) + attrib = info.Attrib; + AddComboBoxItem(name.IsEmpty() ? L"\\" : name, GetRealIconIndex(sumPass, attrib), i, false); + ComboBoxPaths.Add(sumPass); + } + + #ifndef UNDER_CE + + int iconIndex; + UString name; + name = RootFolder_GetName_Documents(iconIndex); + AddComboBoxItem(name, iconIndex, 0, true); + + name = RootFolder_GetName_Computer(iconIndex); + AddComboBoxItem(name, iconIndex, 0, true); + + UStringVector driveStrings; + MyGetLogicalDriveStrings(driveStrings); + for (i = 0; i < driveStrings.Size(); i++) + { + UString s = driveStrings[i]; + ComboBoxPaths.Add(s); + int iconIndex = GetRealIconIndex(s, 0); + if (s.Length() > 0 && s[s.Length() - 1] == WCHAR_PATH_SEPARATOR) + s.Delete(s.Length() - 1); + AddComboBoxItem(s, iconIndex, 1, false); + } + + name = RootFolder_GetName_Network(iconIndex); + AddComboBoxItem(name, iconIndex, 0, true); + + #endif + + return false; + } + + case CBN_SELENDOK: + { + code = code; + int index = _headerComboBox.GetCurSel(); + if (index >= 0) + { + UString pass = ComboBoxPaths[index]; + _headerComboBox.SetCurSel(-1); + // _headerComboBox.SetText(pass); // it's fix for seclecting by mouse. + if (BindToPathAndRefresh(pass) == S_OK) + { + PostMessage(kSetFocusToListView); + #ifdef UNDER_CE + PostMessage(kRefreshHeaderComboBox); + #endif + + return true; + } + } + return false; + } + /* + case CBN_CLOSEUP: + { + LoadFullPathAndShow(); + true; + + } + case CBN_SELCHANGE: + { + // LoadFullPathAndShow(); + return true; + } + */ + } +#endif + return false; +} + +bool CPanel::OnNotifyComboBox(LPNMHDR header, LRESULT &result) +{ + #ifndef UNDER_CE + switch(header->code) + { + case CBEN_BEGINEDIT: + { + _lastFocusedIsList = false; + _panelCallback->PanelWasFocused(); + break; + } +#ifdef _WIN32 + #ifndef _UNICODE + case CBEN_ENDEDIT: + { + return OnNotifyComboBoxEndEdit((PNMCBEENDEDIT)header, result); + } + #endif +#endif // #ifdef _WIN32 + case CBEN_ENDEDITW: + { + return OnNotifyComboBoxEndEdit((PNMCBEENDEDITW)header, result); + } + } + #endif + return false; +} + + +void CPanel::FoldersHistory() +{ + CListViewDialog listViewDialog; + listViewDialog.DeleteIsAllowed = true; + listViewDialog.Title = LangString(IDS_FOLDERS_HISTORY, 0x03020260); + _appState->FolderHistory.GetList(listViewDialog.Strings); + if (listViewDialog.Create(GetParent()) == IDCANCEL) + return; + UString selectString; + if (listViewDialog.StringsWereChanged) + { + _appState->FolderHistory.RemoveAll(); + for (int i = listViewDialog.Strings.Size() - 1; i >= 0; i--) + _appState->FolderHistory.AddString(listViewDialog.Strings[i]); + if (listViewDialog.FocusedItemIndex >= 0) + selectString = listViewDialog.Strings[listViewDialog.FocusedItemIndex]; + } + else + { + if (listViewDialog.FocusedItemIndex >= 0) + selectString = listViewDialog.Strings[listViewDialog.FocusedItemIndex]; + } + if (listViewDialog.FocusedItemIndex >= 0) + BindToPathAndRefresh(selectString); +} + +void CPanel::OpenParentFolder() +{ +printf("CPanel::OpenParentFolder\n"); + LoadFullPath(); // Maybe we don't need it ?? + UString focucedName; + if (!_currentFolderPrefix.IsEmpty() && + _currentFolderPrefix.Back() == WCHAR_PATH_SEPARATOR) + { + focucedName = _currentFolderPrefix; + focucedName.DeleteBack(); + if (focucedName != L"\\\\.") + { + int pos = focucedName.ReverseFind(WCHAR_PATH_SEPARATOR); + if (pos >= 0) + focucedName = focucedName.Mid(pos + 1); + } + } + + printf("CPanel::OpenParentFolder focucedName=%ls\n",(const wchar_t *)focucedName); + + CDisableTimerProcessing disableTimerProcessing1(*this); + CMyComPtr newFolder; + _folder->BindToParentFolder(&newFolder); + if (newFolder) + _folder = newFolder; + else + { + if (_parentFolders.IsEmpty()) + { + SetToRootFolder(); + if (focucedName.IsEmpty()) + focucedName = GetItemName(0); + } + else + { + _folder.Release(); + _library.Free(); + CFolderLink &link = _parentFolders.Back(); + _folder = link.ParentFolder; + _library.Attach(link.Library.Detach()); + focucedName = link.ItemName; + if (_parentFolders.Size() > 1) + OpenParentArchiveFolder(); + _parentFolders.DeleteBack(); + if (_parentFolders.IsEmpty()) + _flatMode = _flatModeForDisk; + } + } + + UStringVector selectedItems; + /* + if (!focucedName.IsEmpty()) + selectedItems.Add(focucedName); + */ + LoadFullPath(); + // ::SetCurrentDirectory(::_currentFolderPrefix); + RefreshListCtrl(focucedName, -1, true, selectedItems); + _listView.EnsureVisible(_listView.GetFocusedItem(), false); + RefreshStatusBar(); + + printf("CPanel::OpenParentFolder-end\n"); +} + +void CPanel::CloseOpenFolders() +{ + while (_parentFolders.Size() > 0) + { + _folder.Release(); + _library.Free(); + _folder = _parentFolders.Back().ParentFolder; + _library.Attach(_parentFolders.Back().Library.Detach()); + if (_parentFolders.Size() > 1) + OpenParentArchiveFolder(); + _parentFolders.DeleteBack(); + } + _flatMode = _flatModeForDisk; + _folder.Release(); + _library.Free(); +} + +void CPanel::OpenRootFolder() +{ + CDisableTimerProcessing disableTimerProcessing1(*this); + _parentFolders.Clear(); + SetToRootFolder(); + RefreshListCtrl(UString(), -1, true, UStringVector()); + // ::SetCurrentDirectory(::_currentFolderPrefix); + /* + BeforeChangeFolder(); + _currentFolderPrefix.Empty(); + AfterChangeFolder(); + SetCurrentPathText(); + RefreshListCtrl(UString(), 0, UStringVector()); + _listView.EnsureVisible(_listView.GetFocusedItem(), false); + */ +} + +void CPanel::OpenDrivesFolder() +{ + CloseOpenFolders(); + #ifdef UNDER_CE + NFsFolder::CFSFolder *folderSpec = new NFsFolder::CFSFolder; + _folder = folderSpec; + folderSpec->InitToRoot(); + #else + CFSDrives *folderSpec = new CFSDrives; + _folder = folderSpec; + folderSpec->Init(); + #endif + RefreshListCtrl(); +} + +void CPanel::OpenFolder(int index) +{ + if (index == kParentIndex) + { + OpenParentFolder(); + return; + } + CMyComPtr newFolder; + _folder->BindToFolder(index, &newFolder); + if (!newFolder) + return; + _folder = newFolder; + LoadFullPath(); + // ::SetCurrentDirectory(::_currentFolderPrefix); + RefreshListCtrl(); + UINT state = LVIS_SELECTED; + _listView.SetItemState(_listView.GetFocusedItem(), state, state); + _listView.EnsureVisible(_listView.GetFocusedItem(), false); +} diff --git a/CPP/7zip/UI/FileManager/PanelItemOpen.cpp b/CPP/7zip/UI/FileManager/PanelItemOpen.cpp new file mode 100644 index 0000000..5612078 --- /dev/null +++ b/CPP/7zip/UI/FileManager/PanelItemOpen.cpp @@ -0,0 +1,750 @@ +// PanelItemOpen.cpp + +#include "StdAfx.h" + +// For compilers that support precompilation, includes "wx/wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ +#pragma hdrstop +#endif + +#ifndef WX_PRECOMP +#include "wx/wx.h" +#endif +#include "wx/mimetype.h" + +#undef _WIN32 + +#include "resource.h" + +#include "Common/StringConvert.h" +// FIXME #include "Common/Random.h" +#include "Common/StringConvert.h" +#include "Common/AutoPtr.h" + +#include "Windows/FileDir.h" +#include "Windows/FileFind.h" +#include "Windows/Thread.h" +#include "Windows/Synchronization.h" +#include "Windows/Error.h" +#include "Windows/PropVariant.h" + +#include "App.h" + +#include "ExtractCallback.h" +#include "UpdateCallback100.h" +#include "IFolder.h" +#include "FileFolderPluginOpen.h" +#include "FormatUtils.h" +#include "Panel.h" +#include "RegistryUtils.h" +#include "LangUtils.h" + +using namespace NWindows; +using namespace NSynchronization; +using namespace NFile; +using namespace NDirectory; + +extern HWND g_HWND; +#ifndef _UNICODE +extern bool g_IsNT; +#endif + +#ifndef _WIN32 +void CloseHandle(HANDLE) {} +#endif + +static const wchar_t *kTempDirPrefix = L"7zO"; + + +static bool IsNameVirus(const UString &name) +{ + return (name.Find(L" ") >= 0); +} + +struct CTmpProcessInfo: public CTempFileInfo +{ + HANDLE ProcessHandle; + HWND Window; + UString FullPathFolderPrefix; + bool UsePassword; + UString Password; + CTmpProcessInfo(): UsePassword(false) {} +}; + +class CTmpProcessInfoRelease +{ + CTmpProcessInfo *_tmpProcessInfo; +public: + bool _needDelete; + CTmpProcessInfoRelease(CTmpProcessInfo &tmpProcessInfo): + _tmpProcessInfo(&tmpProcessInfo), _needDelete(true) {} + ~CTmpProcessInfoRelease() + { + if (_needDelete) + _tmpProcessInfo->DeleteDirAndFile(); + } +}; + +HRESULT CPanel::OpenItemAsArchive(IInStream *inStream, + const CTempFileInfo &tempFileInfo, + const UString &virtualFilePath, + const UString &arcFormat, + bool &encrypted) +{ + encrypted = false; + CFolderLink folderLink; + (CTempFileInfo &)folderLink = tempFileInfo; + if (inStream) + folderLink.IsVirtual = true; + else + { + if (!folderLink.FileInfo.Find(folderLink.FilePath)) + return ::GetLastError(); + if (folderLink.FileInfo.IsDir()) + return S_FALSE; + folderLink.IsVirtual = false; + } + + folderLink.VirtualPath = virtualFilePath; + + CMyComPtr newFolder; + + // _passwordIsDefined = false; + // _password.Empty(); + + NDLL::CLibrary library; + + UString password; + RINOK(OpenFileFolderPlugin(inStream, + folderLink.FilePath.IsEmpty() ? virtualFilePath : folderLink.FilePath, + arcFormat, + &library, &newFolder, GetParent(), encrypted, password)); + + folderLink.Password = password; + folderLink.UsePassword = encrypted; + + folderLink.ParentFolder = _folder; + _parentFolders.Add(folderLink); + _parentFolders.Back().Library.Attach(_library.Detach()); + + _folder.Release(); + _library.Free(); + _folder = newFolder; + _library.Attach(library.Detach()); + + _flatMode = _flatModeForArc; + + CMyComPtr getFolderArcProps; + _folder.QueryInterface(IID_IGetFolderArcProps, &getFolderArcProps); + if (getFolderArcProps) + { + CMyComPtr arcProps; + getFolderArcProps->GetFolderArcProps(&arcProps); + if (arcProps) + { + UString s; + UInt32 numLevels; + if (arcProps->GetArcNumLevels(&numLevels) != S_OK) + numLevels = 0; + for (UInt32 level2 = 0; level2 < numLevels; level2++) + { + UInt32 level = numLevels - 1 - level2; + PROPID propIDs[] = { kpidError, kpidPath, kpidType } ; + UString values[3]; + for (Int32 i = 0; i < 3; i++) + { + CMyComBSTR name; + NCOM::CPropVariant prop; + if (arcProps->GetArcProp(level, propIDs[i], &prop) != S_OK) + continue; + if (prop.vt != VT_EMPTY) + values[i] = (prop.vt == VT_BSTR) ? prop.bstrVal : L"?"; + } + if (!values[0].IsEmpty()) + { + if (!s.IsEmpty()) + s += L"--------------------\n"; + s += values[0]; s += L"\n\n["; + s += values[2]; s += L"] "; + s += values[1]; s += L"\n"; + } + } + if (!s.IsEmpty()) + MessageBox(s); + } + } + + return S_OK; +} + +HRESULT CPanel::OpenItemAsArchive(const UString &name, const UString &arcFormat, bool &encrypted) +{ + CTempFileInfo tfi; + tfi.ItemName = name; + tfi.FolderPath = _currentFolderPrefix; + tfi.FilePath = _currentFolderPrefix + name; + return OpenItemAsArchive(NULL, tfi, _currentFolderPrefix + name, arcFormat, encrypted); +} + +HRESULT CPanel::OpenItemAsArchive(int index) +{ + CDisableTimerProcessing disableTimerProcessing1(*this); + bool encrypted; + RINOK(OpenItemAsArchive(GetItemRelPath(index), UString(), encrypted)); + RefreshListCtrl(); + return S_OK; +} + +HRESULT CPanel::OpenParentArchiveFolder() +{ + CDisableTimerProcessing disableTimerProcessing1(*this); + if (_parentFolders.Size() < 2) + return S_OK; + CFolderLink &folderLink = _parentFolders.Back(); + NFind::CFileInfoW newFileInfo; + if (NFind::FindFile(folderLink.FilePath, newFileInfo)) + { + if (newFileInfo.Size != folderLink.FileInfo.Size || + CompareFileTime(&newFileInfo.MTime, &folderLink.FileInfo.MTime) != 0) + { + UString message = MyFormatNew(IDS_WANT_UPDATE_MODIFIED_FILE, + 0x03020280, folderLink.ItemName); + if (::MessageBoxW(HWND(*this), message, L"7-Zip", MB_OKCANCEL | MB_ICONQUESTION) == IDOK) + { + if (OnOpenItemChanged(folderLink.FolderPath, folderLink.ItemName, + folderLink.UsePassword, folderLink.Password) != S_OK) + { + ::MessageBoxW(HWND(*this), MyFormatNew(IDS_CANNOT_UPDATE_FILE, + 0x03020281, folderLink.FilePath), L"7-Zip", MB_OK | MB_ICONSTOP); + return S_OK; + } + } + } + } + folderLink.DeleteDirAndFile(); + return S_OK; +} + +static const wchar_t *kStartExtensions[] = +{ + #ifdef UNDER_CE + L"cab", + #endif + L"exe", L"bat", L"com", + L"chm", + L"msi", L"doc", L"xls", L"ppt", L"pps", L"wps", L"wpt", L"wks", L"xlr", L"wdb", + + L"docx", L"docm", L"dotx", L"dotm", L"xlsx", L"xlsm", L"xltx", L"xltm", L"xlsb", + L"xlam", L"pptx", L"pptm", L"potx", L"potm", L"ppam", L"ppsx", L"ppsm", L"xsn", + L"msg", + L"dwf", + + L"flv", L"swf", + + L"odt", L"ods", + L"wb3", + L"pdf" +}; + +static bool DoItemAlwaysStart(const UString &name) +{ + int extPos = name.ReverseFind('.'); + if (extPos < 0) + return false; + UString ext = name.Mid(extPos + 1); + ext.MakeLower(); + for (int i = 0; i < sizeof(kStartExtensions) / sizeof(kStartExtensions[0]); i++) + if (ext.Compare(kStartExtensions[i]) == 0) + return true; + return false; +} + +static UString GetQuotedString(const UString &s) +{ + return UString(L'\"') + s + UString(L'\"'); +} + +static HANDLE StartEditApplication(const UString &path, HWND window) +{ + UString command; + ReadRegEditor(command); + if (command.IsEmpty()) + { +#ifdef _WIN32 + if (!MyGetWindowsDirectory(command)) + return 0; + NFile::NName::NormalizeDirPathPrefix(command); + command += L"notepad.exe"; +#else + command += L"vi"; +#endif // _WIN32 + } + command = UString(L"\"") + command + UString(L"\""); + command += L" \""; + command += UString(path); + command += L"\""; + +#ifdef _WIN32 + PROCESS_INFORMATION processInformation; + BOOL result; + #ifndef _UNICODE + if (!g_IsNT) + { + STARTUPINFOA startupInfo; + startupInfo.cb = sizeof(startupInfo); + startupInfo.lpReserved = 0; + startupInfo.lpDesktop = 0; + startupInfo.lpTitle = 0; + startupInfo.dwFlags = 0; + startupInfo.cbReserved2 = 0; + startupInfo.lpReserved2 = 0; + + result = ::CreateProcessA(NULL, (CHAR *)(const CHAR *)GetSystemString(command), + NULL, NULL, FALSE, 0, NULL, NULL, &startupInfo, &processInformation); + } + else + #endif + { + STARTUPINFOW startupInfo; + startupInfo.cb = sizeof(startupInfo); + startupInfo.lpReserved = 0; + startupInfo.lpDesktop = 0; + startupInfo.lpTitle = 0; + startupInfo.dwFlags = 0; + startupInfo.cbReserved2 = 0; + startupInfo.lpReserved2 = 0; + + result = ::CreateProcessW(NULL, (WCHAR *)(const WCHAR *)command, + NULL, NULL, FALSE, 0, NULL, NULL, &startupInfo, &processInformation); + } + + if (result != FALSE) + { + ::CloseHandle(processInformation.hThread); + return processInformation.hProcess; + } +#else + wxString cmd = (const wchar_t *)command; + long pid = wxExecute(cmd, wxEXEC_ASYNC); + if (pid) return 0; +#endif + ::MessageBoxW(window, LangString(IDS_CANNOT_START_EDITOR, 0x03020282), + L"7-Zip", MB_OK | MB_ICONSTOP); + return 0; +} + +void CApp::DiffFiles() +{ + const CPanel &panel = GetFocusedPanel(); + + CRecordVector indices; + panel.GetSelectedItemsIndices(indices); + + UString path1, path2; + if (indices.Size() == 2) + { + path1 = panel.GetItemFullPath(indices[0]); + path2 = panel.GetItemFullPath(indices[1]); + } + else if (indices.Size() == 1 && NumPanels >= 2) + { + const CPanel &destPanel = Panels[1 - LastFocusedPanel]; + path1 = panel.GetItemFullPath(indices[0]); + const UString relPath = panel.GetItemRelPath(indices[0]); + CRecordVector indices2; + destPanel.GetSelectedItemsIndices(indices2); + if (indices2.Size() == 1) + path2 = destPanel.GetItemFullPath(indices2[0]); + else + path2 = destPanel._currentFolderPrefix + relPath; + } + else + return; + + UString command; + ReadRegDiff(command); + if (command.IsEmpty()) + return; + + UString param = GetQuotedString(path1) + L' ' + GetQuotedString(path2); + +#ifdef _WIN32 + HRESULT res = MyCreateProcess(command, param); + if (res == SZ_OK) + return; +#else + wxString cmd = (const wchar_t *)command; + cmd += L" "; + cmd += (const wchar_t *)param; + + long pid = wxExecute(cmd, wxEXEC_ASYNC); + if (pid) return ; +#endif + ::MessageBoxW(_window, LangString(IDS_CANNOT_START_EDITOR, 0x03020282), L"7-Zip", MB_OK | MB_ICONSTOP); +} + +#ifndef _UNICODE +typedef BOOL (WINAPI * ShellExecuteExWP)(LPSHELLEXECUTEINFOW lpExecInfo); +#endif + +static HANDLE StartApplication(const UString &path, HWND window) +{ + // FIXME + extern const TCHAR * nameWindowToUnix(const TCHAR * lpFileName); + UString tmpPath = path; + + wxString filename(nameWindowToUnix(tmpPath)); + + + wxString ext = filename.AfterLast(_T('.')); + + printf("StartApplication(%ls) ext='%ls'\n",(const wchar_t *)filename,(const wchar_t *)ext); + + if ( ! ext.empty() ) + { + wxFileType *ft = wxTheMimeTypesManager->GetFileTypeFromExtension(ext); + // printf("StartApplication(%ls) ft=%p\n",(const wchar_t *)filename,ft); + if (ft) + { + wxString cmd; + // wxString type; ft->GetMimeType(&type); + wxFileType::MessageParameters params(filename); // , type); + bool ok = ft->GetOpenCommand(&cmd, params); + // printf("StartApplication(%ls) ok=%d\n",(const wchar_t *)filename,(int)ok); + delete ft; + if ( ok ) + { + printf("StartApplication(%ls) cmd='%ls'\n",(const wchar_t *)filename,(const wchar_t *)cmd); + long pid = wxExecute(cmd, wxEXEC_ASYNC); + if (pid) return 0; + } + } + } + ::MessageBoxW(window, + // NError::MyFormatMessageW(::GetLastError()), + L"There is no application associated with the given file name extension", + L"7-Zip", MB_OK | MB_ICONSTOP); + return 0; +} + +void CPanel::EditItem(int index) +{ + if (!_parentFolders.IsEmpty()) + { + OpenItemInArchive(index, false, true, true); + return; + } + HANDLE hProcess = StartEditApplication(_currentFolderPrefix + GetItemRelPath(index), (HWND)*this); + if (hProcess != 0) + ::CloseHandle(hProcess); +} + +void CPanel::OpenFolderExternal(int index) +{ + HANDLE hProcess = StartApplication(GetFsPath() + GetItemRelPath(index), (HWND)*this); + if (hProcess != 0) + ::CloseHandle(hProcess); +} + +void CPanel::OpenItem(int index, bool tryInternal, bool tryExternal) +{ + CDisableTimerProcessing disableTimerProcessing1(*this); + if (!_parentFolders.IsEmpty()) + { + OpenItemInArchive(index, tryInternal, tryExternal, false); + return; + } + UString name = GetItemRelPath(index); + if (IsNameVirus(name)) + { + MessageBoxErrorLang(IDS_VIRUS, 0x03020284); + return; + } + UString fullPath = _currentFolderPrefix + name; + if (tryInternal) + if (!tryExternal || !DoItemAlwaysStart(name)) + { + HRESULT res = OpenItemAsArchive(index); + if (res == S_OK || res == E_ABORT) + return; + if (res != S_FALSE) + { + MessageBoxError(res); + return; + } + } + if (tryExternal) + { + // SetCurrentDirectory opens HANDLE to folder!!! + // NDirectory::MySetCurrentDirectory(_currentFolderPrefix); + HANDLE hProcess = StartApplication(fullPath, (HWND)*this); + if (hProcess != 0) + ::CloseHandle(hProcess); + } +} + +class CThreadCopyFrom: public CProgressThreadVirt +{ + HRESULT ProcessVirt(); +public: + UString PathPrefix; + UString Name; + + CMyComPtr FolderOperations; + CMyComPtr UpdateCallback; + CUpdateCallback100Imp *UpdateCallbackSpec; +}; + +HRESULT CThreadCopyFrom::ProcessVirt() +{ + UStringVector fileNames; + CRecordVector fileNamePointers; + fileNames.Add(Name); + fileNamePointers.Add(fileNames[0]); + return FolderOperations->CopyFrom(PathPrefix, &fileNamePointers.Front(), fileNamePointers.Size(), UpdateCallback); +}; + +HRESULT CPanel::OnOpenItemChanged(const UString &folderPath, const UString &itemName, + bool usePassword, const UString &password) +{ + CMyComPtr folderOperations; + if (_folder.QueryInterface(IID_IFolderOperations, &folderOperations) != S_OK) + { + MessageBoxErrorLang(IDS_OPERATION_IS_NOT_SUPPORTED, 0x03020208); + return E_FAIL; + } + + CThreadCopyFrom t; + t.UpdateCallbackSpec = new CUpdateCallback100Imp; + t.UpdateCallback = t.UpdateCallbackSpec; + t.UpdateCallbackSpec->ProgressDialog = &t.ProgressDialog; + t.Name = itemName; + t.PathPrefix = folderPath; + NName::NormalizeDirPathPrefix(t.PathPrefix); + t.FolderOperations = folderOperations; + t.UpdateCallbackSpec->Init(usePassword, password); + RINOK(t.Create(itemName, (HWND)*this)); + return t.Result; +} + +LRESULT CPanel::OnOpenItemChanged(LPARAM lParam) +{ + CTmpProcessInfo &tmpProcessInfo = *(CTmpProcessInfo *)lParam; + // LoadCurrentPath() + if (tmpProcessInfo.FullPathFolderPrefix != _currentFolderPrefix) + return 0; + + CSelectedState state; + SaveSelectedState(state); + + HRESULT result = OnOpenItemChanged(tmpProcessInfo.FolderPath, tmpProcessInfo.ItemName, + tmpProcessInfo.UsePassword, tmpProcessInfo.Password); + if (result != S_OK) + return 0; + RefreshListCtrl(state); + return 1; +} + +/* +class CTmpProcessInfoList +{ +public: + CObjectVector _items; +} g_TmpProcessInfoList; +*/ + +class CExitEventLauncher +{ +public: + NWindows::NSynchronization::CManualResetEvent _exitEvent; + CExitEventLauncher() + { + if (_exitEvent.Create(false) != S_OK) + throw 9387173; + }; + ~CExitEventLauncher() { _exitEvent.Set(); } +} g_ExitEventLauncher; + +#ifdef _WIN32 +static THREAD_FUNC_DECL MyThreadFunction(void *param) +{ + CMyAutoPtr tmpProcessInfoPtr((CTmpProcessInfo *)param); + CTmpProcessInfo *tmpProcessInfo = tmpProcessInfoPtr.get(); + + HANDLE hProcess = tmpProcessInfo->ProcessHandle; + HANDLE events[2] = { g_ExitEventLauncher._exitEvent, hProcess}; + DWORD waitResult = ::WaitForMultipleObjects(2, events, FALSE, INFINITE); + ::CloseHandle(hProcess); + if (waitResult == WAIT_OBJECT_0 + 0) + return 0; + if (waitResult != WAIT_OBJECT_0 + 1) + return 1; + Sleep(200); + NFind::CFileInfoW newFileInfo; + if (NFind::FindFile(tmpProcessInfo->FilePath, newFileInfo)) + { + if (newFileInfo.Size != tmpProcessInfo->FileInfo.Size || + CompareFileTime(&newFileInfo.MTime, &tmpProcessInfo->FileInfo.MTime) != 0) + { + UString message = MyFormatNew(IDS_WANT_UPDATE_MODIFIED_FILE, + 0x03020280, tmpProcessInfo->ItemName); + if (::MessageBoxW(g_HWND, message, L"7-Zip", MB_OKCANCEL | MB_ICONQUESTION) == IDOK) + { + if (SendMessage(tmpProcessInfo->Window, kOpenItemChanged, 0, (LONG_PTR)tmpProcessInfo) != 1) + { + ::MessageBoxW(g_HWND, MyFormatNew(IDS_CANNOT_UPDATE_FILE, + 0x03020281, tmpProcessInfo->FilePath), L"7-Zip", MB_OK | MB_ICONSTOP); + return 0; + } + } + } + } + tmpProcessInfo->DeleteDirAndFile(); + return 0; +} +#endif + +void CPanel::OpenItemInArchive(int index, bool tryInternal, bool tryExternal, bool editMode) +{ + const UString name = GetItemName(index); + if (IsNameVirus(name)) + { + MessageBoxErrorLang(IDS_VIRUS, 0x03020284); + return; + } + + CMyComPtr folderOperations; + if (_folder.QueryInterface(IID_IFolderOperations, &folderOperations) != S_OK) + { + MessageBoxErrorLang(IDS_OPERATION_IS_NOT_SUPPORTED, 0x03020208); + return; + } + +#ifdef _WIN32 + NFile::NDirectory::CTempDirectoryW tempDirectory; + tempDirectory.Create(kTempDirPrefix); + UString tempDir = tempDirectory.GetPath(); + UString tempDirNorm = tempDir; + NFile::NName::NormalizeDirPathPrefix(tempDirNorm); + + CRecordVector indices; + indices.Add(index); + + UStringVector messages; + + bool usePassword = false; + UString password; + if (_parentFolders.Size() > 0) + { + const CFolderLink &fl = _parentFolders.Back(); + usePassword = fl.UsePassword; + password = fl.Password; + } + + HRESULT result = CopyTo(indices, tempDirNorm, false, true, &messages, usePassword, password); + + if (_parentFolders.Size() > 0) + { + CFolderLink &fl = _parentFolders.Back(); + fl.UsePassword = usePassword; + fl.Password = password; + } + + if (!messages.IsEmpty()) + return; + if (result != S_OK) + { + if (result != E_ABORT) + MessageBoxError(result); + return; + } + + UString tempFilePath = tempDirNorm + name; + + CMyAutoPtr tmpProcessInfoPtr(new CTmpProcessInfo()); + CTmpProcessInfo *tmpProcessInfo = tmpProcessInfoPtr.get(); + tmpProcessInfo->FolderPath = tempDir; + tmpProcessInfo->FilePath = tempFilePath; + tmpProcessInfo->UsePassword = usePassword; + tmpProcessInfo->Password = password; + + if (!NFind::FindFile(tempFilePath, tmpProcessInfo->FileInfo)) + return; + + if (tryInternal) + { + if (!tryExternal || !DoItemAlwaysStart(name)) + { + bool encrypted; + if (OpenItemAsArchive(name, tempDir, tempFilePath, + _currentFolderPrefix + name, encrypted) == S_OK) + { + RefreshListCtrl(); + return; + } + } + } + + CTmpProcessInfoRelease tmpProcessInfoRelease(*tmpProcessInfo); + + if (!tryExternal) + return; + + HANDLE hProcess; + if (editMode) + hProcess = StartEditApplication(tempFilePath, (HWND)*this); + else + hProcess = StartApplication(tempFilePath, (HWND)*this); + + if (hProcess == 0) + return; + + tmpProcessInfo->Window = (HWND)(*this); + tmpProcessInfo->FullPathFolderPrefix = _currentFolderPrefix; + tmpProcessInfo->ItemName = name; + tmpProcessInfo->ProcessHandle = hProcess; + + NWindows::CThread thread; + if (thread.Create(MyThreadFunction, tmpProcessInfo) != S_OK) + throw 271824; + tempDirectory.DisableDeleting(); + tmpProcessInfoPtr.release(); + tmpProcessInfoRelease._needDelete = false; +#else + printf(" CPanel::OpenItemInArchive : FIXME\n"); +#endif +} + +/* +static const UINT64 kTimeLimit = UINT64(10000000) * 3600 * 24; + +static bool CheckDeleteItem(UINT64 currentFileTime, UINT64 folderFileTime) +{ + return (currentFileTime - folderFileTime > kTimeLimit && + folderFileTime - currentFileTime > kTimeLimit); +} + +void DeleteOldTempFiles() +{ + UString tempPath; + if(!NFile::NDirectory::MyGetTempPath(tempPath)) + throw 1; + + UINT64 currentFileTime; + NTime::GetCurUtcFileTime(currentFileTime); + UString searchWildCard = tempPath + kTempDirPrefix + L"*.tmp"; + searchWildCard += WCHAR(NName::kAnyStringWildcard); + NFind::CEnumeratorW enumerator(searchWildCard); + NFind::CFileInfoW fileInfo; + while(enumerator.Next(fileInfo)) + { + if (!fileInfo.IsDir()) + continue; + const UINT64 &cTime = *(const UINT64 *)(&fileInfo.CTime); + if(CheckDeleteItem(cTime, currentFileTime)) + RemoveDirectoryWithSubItems(tempPath + fileInfo.Name); + } +} +*/ diff --git a/CPP/7zip/UI/FileManager/PanelItems.cpp b/CPP/7zip/UI/FileManager/PanelItems.cpp new file mode 100644 index 0000000..1fe08ec --- /dev/null +++ b/CPP/7zip/UI/FileManager/PanelItems.cpp @@ -0,0 +1,832 @@ +// PanelItems.cpp + +#include "StdAfx.h" + +#include "../../../../C/Sort.h" + +#include "Common/StringConvert.h" + +#include "Windows/PropVariant.h" +#include "Windows/PropVariantConversions.h" +#include "Windows/Menu.h" + +#include "../../PropID.h" + +#include "resource.h" + +#include "LangUtils.h" +#include "Panel.h" +#include "PropertyName.h" +#include "RootFolder.h" + +using namespace NWindows; + +static int GetColumnAlign(PROPID propID, VARTYPE varType) +{ + switch(propID) + { + case kpidCTime: + case kpidATime: + case kpidMTime: + return LVCFMT_LEFT; + } + switch(varType) + { + case VT_UI1: + case VT_I2: + case VT_UI2: + case VT_I4: + case VT_INT: + case VT_UI4: + case VT_UINT: + case VT_I8: + case VT_UI8: + case VT_BOOL: + return LVCFMT_RIGHT; + + case VT_EMPTY: + case VT_I1: + case VT_FILETIME: + case VT_BSTR: + return LVCFMT_LEFT; + + default: + return LVCFMT_CENTER; + } +} + +void CPanel::InitColumns() +{ + printf("CPanel::InitColumns\n"); + if (_needSaveInfo) + SaveListViewInfo(); + + _listView.DeleteAllItems(); + _selectedStatusVector.Clear(); + + ReadListViewInfo(); + + + PROPID sortID; + /* + if (_listViewInfo.SortIndex >= 0) + sortID = _listViewInfo.Columns[_listViewInfo.SortIndex].PropID; + */ + sortID = _listViewInfo.SortID; + + _ascending = _listViewInfo.Ascending; + + _properties.Clear(); + + _needSaveInfo = true; + + UInt32 numProperties; + _folder->GetNumberOfProperties(&numProperties); + int i; + for (i = 0; i < (int)numProperties; i++) + { + CMyComBSTR name; + PROPID propID; + VARTYPE varType; + + if (_folder->GetPropertyInfo(i, &name, &propID, &varType) != S_OK) + throw 1; + + if (propID == kpidIsDir) + continue; + + CItemProperty prop; + prop.Type = varType; + prop.ID = propID; + prop.Name = GetNameOfProperty(propID, name); + prop.Order = -1; + prop.IsVisible = true; + prop.Width = 100; + + _properties.Add(prop); + } + // InitColumns2(sortID); + + for (;;) + if (!_listView.DeleteColumn(0)) + break; + + int order = 0; + for(i = 0; i < _listViewInfo.Columns.Size(); i++) + { + const CColumnInfo &columnInfo = _listViewInfo.Columns[i]; + int index = _properties.FindItemWithID(columnInfo.PropID); + if (index >= 0) + { + CItemProperty &item = _properties[index]; + item.IsVisible = columnInfo.IsVisible; + item.Width = columnInfo.Width; + + if (columnInfo.IsVisible) + item.Order = order++; + continue; + } + } + for(i = 0; i < _properties.Size(); i++) + { + CItemProperty &item = _properties[i]; + if (item.Order < 0) + item.Order = order++; + } + + _visibleProperties.Clear(); + for (i = 0; i < _properties.Size(); i++) + { + const CItemProperty &prop = _properties[i]; + if (prop.IsVisible) + _visibleProperties.Add(prop); + } + + // _sortIndex = 0; + _sortID = kpidName; + /* + if (_listViewInfo.SortIndex >= 0) + { + int sortIndex = _properties.FindItemWithID(sortID); + if (sortIndex >= 0) + _sortIndex = sortIndex; + } + */ + _sortID = _listViewInfo.SortID; + + for (i = 0; i < _visibleProperties.Size(); i++) + { + InsertColumn(i); + } +} + +void CPanel::InsertColumn(int index) +{ + const CItemProperty &prop = _visibleProperties[index]; + LV_COLUMNW column; + column.mask = LVCF_FMT | LVCF_WIDTH | LVCF_TEXT | LVCF_SUBITEM | LVCF_ORDER; + column.cx = prop.Width; + column.fmt = GetColumnAlign(prop.ID, prop.Type); + column.iOrder = prop.Order; + column.iSubItem = index; + column.pszText = (wchar_t *)(const wchar_t *)prop.Name; + + _listView.InsertColumn(index, &column); +} + +void CPanel::RefreshListCtrl() +{ + RefreshListCtrl(UString(), -1, true, UStringVector()); +} + +// int CALLBACK CompareItems(LPARAM lParam1, LPARAM lParam2, LPARAM lpData); +int +#if defined(__WIN32__) && !defined(__WXMICROWIN__) // FIXME + wxCALLBACK +#endif + CompareItems_WX(long item1, long item2, long sortData); + + +void CPanel::GetSelectedNames(UStringVector &selectedNames) +{ + selectedNames.Clear(); + + CRecordVector indices; + GetSelectedItemsIndices(indices); + selectedNames.Reserve(indices.Size()); + for (int i = 0; i < indices.Size(); i++) + selectedNames.Add(GetItemRelPath(indices[i])); + + /* + for (int i = 0; i < _listView.GetItemCount(); i++) + { + const int kSize = 1024; + WCHAR name[kSize + 1]; + LVITEMW item; + item.iItem = i; + item.pszText = name; + item.cchTextMax = kSize; + item.iSubItem = 0; + item.mask = LVIF_TEXT | LVIF_PARAM; + if (!_listView.GetItem(&item)) + continue; + int realIndex = GetRealIndex(item); + if (realIndex == kParentIndex) + continue; + if (_selectedStatusVector[realIndex]) + selectedNames.Add(item.pszText); + } + */ + selectedNames.Sort(); +} + +void CPanel::SaveSelectedState(CSelectedState &s) +{ + s.FocusedName.Empty(); + s.SelectedNames.Clear(); + s.FocusedItem = _listView.GetFocusedItem(); + { + if (s.FocusedItem >= 0) + { + int realIndex = GetRealItemIndex(s.FocusedItem); + if (realIndex != kParentIndex) + s.FocusedName = GetItemRelPath(realIndex); + /* + const int kSize = 1024; + WCHAR name[kSize + 1]; + LVITEMW item; + item.iItem = focusedItem; + item.pszText = name; + item.cchTextMax = kSize; + item.iSubItem = 0; + item.mask = LVIF_TEXT; + if (_listView.GetItem(&item)) + focusedName = item.pszText; + */ + } + } + GetSelectedNames(s.SelectedNames); +} + +void CPanel::RefreshListCtrl(const CSelectedState &s) +{ + bool selectFocused = s.SelectFocused; + if (_mySelectMode) + selectFocused = true; + RefreshListCtrl(s.FocusedName, s.FocusedItem, selectFocused, s.SelectedNames); +} + +void CPanel::RefreshListCtrlSaveFocused() +{ + CSelectedState state; + SaveSelectedState(state); + RefreshListCtrl(state); +} + +void CPanel::SetFocusedSelectedItem(int index, bool select) +{ + UINT state = LVIS_FOCUSED; + if (select) + state |= LVIS_SELECTED; + _listView.SetItemState(index, state, state); + if (!_mySelectMode && select) + { + int realIndex = GetRealItemIndex(index); + if (realIndex != kParentIndex) + _selectedStatusVector[realIndex] = true; + } +} + +void CPanel::RefreshListCtrl(const UString &focusedName, int focusedPos, bool selectFocused, + const UStringVector &selectedNames) +{ +printf("CPanel::RefreshListCtrl\n"); + _dontShowMode = false; + LoadFullPathAndShow(); + // OutputDebugStringA("=======\n"); + // OutputDebugStringA("s1 \n"); + CDisableTimerProcessing timerProcessing(*this); + + if (focusedPos < 0) + focusedPos = 0; + + _listView.SetRedraw(false); + // m_RedrawEnabled = false; + +#ifdef _WIN32 + LVITEMW item; + ZeroMemory(&item, sizeof(item)); +#else + LVITEMW item = { 0 }; +#endif + + _listView.DeleteAllItems(); + _selectedStatusVector.Clear(); + // _realIndices.Clear(); + _startGroupSelect = 0; + + _selectionIsDefined = false; + + // m_Files.Clear(); + // _folder.Release(); + + if (!_folder) + { + // throw 1; + SetToRootFolder(); + } + + // FIXME _headerToolBar.EnableButton(kParentFolderID, !IsRootFolder()); + + CMyComPtr folderSetFlatMode; + _folder.QueryInterface(IID_IFolderSetFlatMode, &folderSetFlatMode); + if (folderSetFlatMode) + folderSetFlatMode->SetFlatMode(BoolToInt(_flatMode)); + + if (_folder->LoadItems() != S_OK) + return; + + InitColumns(); + + + // OutputDebugString(TEXT("Start Dir\n")); + UInt32 numItems; + _folder->GetNumberOfItems(&numItems); + + bool showDots = _showDots && !IsRootFolder(); + + _listView.SetItemCount(numItems + (showDots ? 1 : 0)); + + _selectedStatusVector.Reserve(numItems); + int cursorIndex = -1; + + CMyComPtr folderGetSystemIconIndex; + if (!IsFSFolder() || _showRealFileIcons) + _folder.QueryInterface(IID_IFolderGetSystemIconIndex, &folderGetSystemIconIndex); + + if (showDots) + { + UString itemName = L".."; + item.iItem = _listView.GetItemCount(); + if (itemName.CompareNoCase(focusedName) == 0) + cursorIndex = item.iItem; + item.mask = LVIF_TEXT | LVIF_PARAM | LVIF_IMAGE; + int subItem = 0; + item.iSubItem = subItem++; + item.lParam = kParentIndex; + item.pszText = (wchar_t *)(const wchar_t *)itemName; + UInt32 attrib = FILE_ATTRIBUTE_DIRECTORY; + item.iImage = _extToIconMap.GetIconIndex(attrib, itemName); + if (item.iImage < 0) + item.iImage = 0; + if(_listView.InsertItem(&item) == -1) + return; + } + + // OutputDebugStringA("S1\n"); + + for(UInt32 i = 0; i < numItems; i++) + { + UString itemName = GetItemName(i); + const UString relPath = GetItemRelPath(i); + if (relPath.CompareNoCase(focusedName) == 0) + cursorIndex = _listView.GetItemCount(); + bool selected = false; + if (selectedNames.FindInSorted(relPath) >= 0) + selected = true; + _selectedStatusVector.Add(selected); + + item.mask = LVIF_TEXT | LVIF_PARAM | LVIF_IMAGE; + + if (!_mySelectMode) + if (selected) + { + item.mask |= LVIF_STATE; + item.state = LVIS_SELECTED; + } + + int subItem = 0; + item.iItem = _listView.GetItemCount(); + + item.iSubItem = subItem++; + item.lParam = i; + + UString correctedName; + if (itemName.Find(L" ") >= 0) + { + int pos = 0; + for (;;) + { + int posNew = itemName.Find(L" ", pos); + if (posNew < 0) + { + correctedName += itemName.Mid(pos); + break; + } + correctedName += itemName.Mid(pos, posNew - pos); + correctedName += L" ... "; + pos = posNew; + while (itemName[++pos] == ' '); + } + item.pszText = (wchar_t *)(const wchar_t *)correctedName; + } + else + item.pszText = (wchar_t *)(const wchar_t *)itemName; + + NCOM::CPropVariant prop; + _folder->GetProperty(i, kpidAttrib, &prop); + UInt32 attrib = 0; + if (prop.vt == VT_UI4) + attrib = prop.ulVal; + else if (IsItemFolder(i)) + attrib |= FILE_ATTRIBUTE_DIRECTORY; + + bool defined = false; + + if (folderGetSystemIconIndex) + { + folderGetSystemIconIndex->GetSystemIconIndex(i, &item.iImage); + defined = (item.iImage > 0); + } + if (!defined) + { + if (_currentFolderPrefix.IsEmpty()) + { + int iconIndexTemp; + GetRealIconIndex(itemName + WCHAR_PATH_SEPARATOR, attrib, iconIndexTemp); + item.iImage = iconIndexTemp; + } + else + { + item.iImage = _extToIconMap.GetIconIndex(attrib, itemName); + } + } + if (item.iImage < 0) + item.iImage = 0; + + if(_listView.InsertItem(&item) == -1) + return; // error + + // FIXME Added + item.pszText = (LPWSTR)malloc(4096); // FIXME + for(int col=1;col < _listView.GetColumnCount(); col++) + { + item.iSubItem = col; + item.cchTextMax = 4096 / sizeof(item.pszText[0]); + this->SetItemText(item); + _listView.SetItem(&item); + } + free(item.pszText); item.pszText = 0; + + } + // OutputDebugStringA("End2\n"); + + if(_listView.GetItemCount() > 0 && cursorIndex >= 0) + SetFocusedSelectedItem(cursorIndex, selectFocused); + _listView.SortItems(CompareItems_WX, (LPARAM)this); + if (cursorIndex < 0 && _listView.GetItemCount() > 0) + { + if (focusedPos >= _listView.GetItemCount()) + focusedPos = _listView.GetItemCount() - 1; + SetFocusedSelectedItem(focusedPos, showDots); + } + // m_RedrawEnabled = true; + _listView.EnsureVisible(_listView.GetFocusedItem(), false); + _listView.SetRedraw(true); + _listView.InvalidateRect(NULL, true); + // OutputDebugStringA("End1\n"); + /* + _listView.UpdateWindow(); + */ +} + +void CPanel::GetSelectedItemsIndices(CRecordVector &indices) const +{ + indices.Clear(); + /* + int itemIndex = -1; + while ((itemIndex = _listView.GetNextItem(itemIndex, LVNI_SELECTED)) != -1) + { + LPARAM param; + if (_listView.GetItemParam(itemIndex, param)) + indices.Add(param); + } + */ + for (int i = 0; i < _selectedStatusVector.Size(); i++) + if (_selectedStatusVector[i]) + indices.Add(i); + HeapSort(&indices.Front(), indices.Size()); +} + +void CPanel::GetOperatedItemIndices(CRecordVector &indices) const +{ + GetSelectedItemsIndices(indices); + if (!indices.IsEmpty()) + return; + if (_listView.GetSelectedCount() == 0) + return; + int focusedItem = _listView.GetFocusedItem(); + if (focusedItem >= 0) + { + if(_listView.GetItemState(focusedItem, LVIS_SELECTED) == LVIS_SELECTED) + { + int realIndex = GetRealItemIndex(focusedItem); + if (realIndex != kParentIndex) + indices.Add(realIndex); + } + } +} + +void CPanel::GetAllItemIndices(CRecordVector &indices) const +{ + indices.Clear(); + UInt32 numItems; + if (_folder->GetNumberOfItems(&numItems) == S_OK) + for (UInt32 i = 0; i < numItems; i++) + indices.Add(i); +} + +void CPanel::GetOperatedIndicesSmart(CRecordVector &indices) const +{ + GetOperatedItemIndices(indices); + if (indices.IsEmpty() || (indices.Size() == 1 && indices[0] == (UInt32)(Int32)-1)) + GetAllItemIndices(indices); +} + +/* +void CPanel::GetOperatedListViewIndices(CRecordVector &indices) const +{ + indices.Clear(); + int numItems = _listView.GetItemCount(); + for (int i = 0; i < numItems; i++) + { + int realIndex = GetRealItemIndex(i); + if (realIndex >= 0) + if (_selectedStatusVector[realIndex]) + indices.Add(i); + } + if (indices.IsEmpty()) + { + int focusedItem = _listView.GetFocusedItem(); + if (focusedItem >= 0) + indices.Add(focusedItem); + } +} +*/ + +void CPanel::EditItem() +{ + int focusedItem = _listView.GetFocusedItem(); + if (focusedItem < 0) + return; + int realIndex = GetRealItemIndex(focusedItem); + if (realIndex == kParentIndex) + return; + if (!IsItemFolder(realIndex)) + EditItem(realIndex); +} + +void CPanel::OpenFocusedItemAsInternal() +{ + int focusedItem = _listView.GetFocusedItem(); + if (focusedItem < 0) + return; + int realIndex = GetRealItemIndex(focusedItem); + if (IsItemFolder(realIndex)) + OpenFolder(realIndex); + else + OpenItem(realIndex, true, false); +} + +void CPanel::OpenSelectedItems(bool tryInternal) +{ + CRecordVector indices; + GetOperatedItemIndices(indices); + if (indices.Size() > 20) + { + MessageBoxErrorLang(IDS_TOO_MANY_ITEMS, 0x02000606); + return; + } + + int focusedItem = _listView.GetFocusedItem(); + if (focusedItem >= 0) + { + int realIndex = GetRealItemIndex(focusedItem); + if (realIndex == kParentIndex && (tryInternal || indices.Size() == 0) && + _listView.GetItemState(focusedItem, LVIS_SELECTED) == LVIS_SELECTED) + indices.Insert(0, realIndex); + } + + bool dirIsStarted = false; + for(int i = 0; i < indices.Size(); i++) + { + UInt32 index = indices[i]; + // CFileInfo &aFile = m_Files[index]; + if (IsItemFolder(index)) + { + if (!dirIsStarted) + { + if (tryInternal) + { + OpenFolder(index); + dirIsStarted = true; + break; + } + else + OpenFolderExternal(index); + } + } + else + OpenItem(index, (tryInternal && indices.Size() == 1), true); + } +} + +UString CPanel::GetItemName(int itemIndex) const +{ + if (itemIndex == kParentIndex) + return L".."; + NCOM::CPropVariant prop; + if (_folder->GetProperty(itemIndex, kpidName, &prop) != S_OK) + throw 2723400; + if (prop.vt != VT_BSTR) + throw 2723401; + return prop.bstrVal; +} + +UString CPanel::GetItemPrefix(int itemIndex) const +{ + if (itemIndex == kParentIndex) + return UString(); + NCOM::CPropVariant prop; + if (_folder->GetProperty(itemIndex, kpidPrefix, &prop) != S_OK) + throw 2723400; + UString prefix; + if (prop.vt == VT_BSTR) + prefix = prop.bstrVal; + return prefix; +} + +UString CPanel::GetItemRelPath(int itemIndex) const +{ + return GetItemPrefix(itemIndex) + GetItemName(itemIndex); +} + +UString CPanel::GetItemFullPath(int itemIndex) const +{ + return _currentFolderPrefix + GetItemRelPath(itemIndex); +} + +bool CPanel::IsItemFolder(int itemIndex) const +{ + if (itemIndex == kParentIndex) + return true; + NCOM::CPropVariant prop; + if (_folder->GetProperty(itemIndex, kpidIsDir, &prop) != S_OK) + throw 2723400; + if (prop.vt == VT_BOOL) + return VARIANT_BOOLToBool(prop.boolVal); + if (prop.vt == VT_EMPTY) + return false; + return false; +} + +UINT64 CPanel::GetItemSize(int itemIndex) const +{ + if (itemIndex == kParentIndex) + return 0; + NCOM::CPropVariant prop; + if (_folder->GetProperty(itemIndex, kpidSize, &prop) != S_OK) + throw 2723400; + if (prop.vt == VT_EMPTY) + return 0; + return ConvertPropVariantToUInt64(prop); +} + +void CPanel::ReadListViewInfo() +{ + _typeIDString = GetFolderTypeID(); + if (!_typeIDString.IsEmpty()) + ::ReadListViewInfo(_typeIDString, _listViewInfo); +} + +void CPanel::SaveListViewInfo() +{ + int i; + for(i = 0; i < _visibleProperties.Size(); i++) + { + CItemProperty &prop = _visibleProperties[i]; + LVCOLUMN winColumnInfo; + winColumnInfo.mask = LVCF_ORDER | LVCF_WIDTH; + if (!_listView.GetColumn(i, &winColumnInfo)) + throw 1; + prop.Order = winColumnInfo.iOrder; + prop.Width = winColumnInfo.cx; + } + + CListViewInfo viewInfo; + + // PROPID sortPropID = _properties[_sortIndex].ID; + PROPID sortPropID = _sortID; + + _visibleProperties.Sort(); + for(i = 0; i < _visibleProperties.Size(); i++) + { + const CItemProperty &prop = _visibleProperties[i]; + CColumnInfo columnInfo; + columnInfo.IsVisible = prop.IsVisible; + columnInfo.PropID = prop.ID; + columnInfo.Width = prop.Width; + viewInfo.Columns.Add(columnInfo); + } + for(i = 0; i < _properties.Size(); i++) + { + const CItemProperty &prop = _properties[i]; + if (!prop.IsVisible) + { + CColumnInfo columnInfo; + columnInfo.IsVisible = prop.IsVisible; + columnInfo.PropID = prop.ID; + columnInfo.Width = prop.Width; + viewInfo.Columns.Add(columnInfo); + } + } + + // viewInfo.SortIndex = viewInfo.FindColumnWithID(sortPropID); + viewInfo.SortID = sortPropID; + + viewInfo.Ascending = _ascending; + if (!_listViewInfo.IsEqual(viewInfo)) + { + ::SaveListViewInfo(_typeIDString, viewInfo); + _listViewInfo = viewInfo; + } +} + +#ifdef _WIN32 +bool CPanel::OnRightClick(LPNMITEMACTIVATE itemActiveate, LRESULT &result) +{ + if(itemActiveate->hdr.hwndFrom == HWND(_listView)) + return false; + POINT point; + ::GetCursorPos(&point); + ShowColumnsContextMenu(point.x, point.y); + result = TRUE; + return true; +} + +void CPanel::ShowColumnsContextMenu(int x, int y) +{ + + CMenu menu; + CMenuDestroyer menuDestroyer(menu); + + menu.CreatePopup(); + + const int kCommandStart = 100; + for(int i = 0; i < _properties.Size(); i++) + { + const CItemProperty &prop = _properties[i]; + UINT flags = MF_STRING; + if (prop.IsVisible) + flags |= MF_CHECKED; + if (i == 0) + flags |= MF_GRAYED; + menu.AppendItem(flags, kCommandStart + i, prop.Name); + } + int menuResult = menu.Track(TPM_LEFTALIGN | TPM_RETURNCMD | TPM_NONOTIFY, x, y, _listView); + if (menuResult >= kCommandStart && menuResult <= kCommandStart + _properties.Size()) + { + int index = menuResult - kCommandStart; + CItemProperty &prop = _properties[index]; + prop.IsVisible = !prop.IsVisible; + + if (prop.IsVisible) + { + int prevVisibleSize = _visibleProperties.Size(); + prop.Order = prevVisibleSize; + _visibleProperties.Add(prop); + InsertColumn(prevVisibleSize); + } + else + { + int visibleIndex = _visibleProperties.FindItemWithID(prop.ID); + _visibleProperties.Delete(visibleIndex); + /* + if (_sortIndex == index) + { + _sortIndex = 0; + _ascending = true; + } + */ + if (_sortID == prop.ID) + { + _sortID = kpidName; + _ascending = true; + } + + _listView.DeleteColumn(visibleIndex); + } + } +} +#endif // _WIN32 + +void CPanel::OnReload() +{ + RefreshListCtrlSaveFocused(); + OnRefreshStatusBar(); +} + +void CPanel::OnTimer() +{ + if (!_processTimer) + return; + CMyComPtr folderWasChanged; + if (_folder.QueryInterface(IID_IFolderWasChanged, &folderWasChanged) != S_OK) + return; + Int32 wasChanged; + if (folderWasChanged->WasChanged(&wasChanged) != S_OK) + return; + if (wasChanged == 0) + return; + OnReload(); +} diff --git a/CPP/7zip/UI/FileManager/PanelListNotify.cpp b/CPP/7zip/UI/FileManager/PanelListNotify.cpp new file mode 100644 index 0000000..4e95632 --- /dev/null +++ b/CPP/7zip/UI/FileManager/PanelListNotify.cpp @@ -0,0 +1,429 @@ +// PanelListNotify.cpp + +#include "StdAfx.h" + +#include "resource.h" + +#include "Common/IntToString.h" +#include "Common/StringConvert.h" + +#include "Windows/PropVariant.h" +#include "Windows/PropVariantConversions.h" + +#include "../Common/PropIDUtils.h" +#include "../../PropID.h" + +#include "Panel.h" +#include "FormatUtils.h" + +using namespace NWindows; + +static UString ConvertSizeToStringShort(UInt64 value) +{ + wchar_t s[32]; + wchar_t c, c2 = L'B'; + if (value < (UInt64)10000) + { + c = L'B'; + c2 = L'\0'; + } + else if (value < ((UInt64)10000 << 10)) + { + value >>= 10; + c = L'K'; + } + else if (value < ((UInt64)10000 << 20)) + { + value >>= 20; + c = L'M'; + } + else + { + value >>= 30; + c = L'G'; + } + ConvertUInt64ToString(value, s); + int p = MyStringLen(s); + s[p++] = L' '; + s[p++] = c; + s[p++] = c2; + s[p++] = L'\0'; + return s; +} + +UString ConvertSizeToString(UInt64 value) +{ + wchar_t s[32]; + ConvertUInt64ToString(value, s); + int i = MyStringLen(s); + int pos = sizeof(s) / sizeof(s[0]); + s[--pos] = L'\0'; + while (i > 3) + { + s[--pos] = s[--i]; + s[--pos] = s[--i]; + s[--pos] = s[--i]; + s[--pos] = L' '; + } + while (i > 0) + s[--pos] = s[--i]; + return s + pos; +} + +LRESULT CPanel::SetItemText(LVITEMW &item) +{ + if (_dontShowMode) + return 0; + + UINT32 realIndex = GetRealIndex(item); + // printf(" CPanel::SetItemText : realIndex=%d\n",realIndex); + + /* + if ((item.mask & LVIF_IMAGE) != 0) + { + bool defined = false; + CComPtr folderGetSystemIconIndex; + _folder.QueryInterface(&folderGetSystemIconIndex); + if (folderGetSystemIconIndex) + { + folderGetSystemIconIndex->GetSystemIconIndex(index, &item.iImage); + defined = (item.iImage > 0); + } + if (!defined) + { + NCOM::CPropVariant prop; + _folder->GetProperty(index, kpidAttrib, &prop); + UINT32 attrib = 0; + if (prop.vt == VT_UI4) + attrib = prop.ulVal; + else if (IsItemFolder(index)) + attrib |= FILE_ATTRIBUTE_DIRECTORY; + if (_currentFolderPrefix.IsEmpty()) + throw 1; + else + item.iImage = _extToIconMap.GetIconIndex(attrib, GetSystemString(GetItemName(index))); + } + // item.iImage = 1; + } + */ + + if ((item.mask & LVIF_TEXT) == 0) + return 0; + + if (realIndex == kParentIndex) + return 0; + UString s; + UINT32 subItemIndex = item.iSubItem; + PROPID propID = _visibleProperties[subItemIndex].ID; + /* + { + NCOM::CPropVariant property; + if(propID == kpidType) + string = GetFileType(index); + else + { + HRESULT result = m_ArchiveFolder->GetProperty(index, propID, &property); + if (result != S_OK) + { + // PrintMessage("GetPropertyValue error"); + return 0; + } + string = ConvertPropertyToString(property, propID, false); + } + } + */ + // const NFind::CFileInfo &aFileInfo = m_Files[index]; + + NCOM::CPropVariant prop; + /* + bool needRead = true; + if (propID == kpidSize) + { + CComPtr getItemFullSize; + if (_folder.QueryInterface(&getItemFullSize) == S_OK) + { + if (getItemFullSize->GetItemFullSize(index, &prop) == S_OK) + needRead = false; + } + } + if (needRead) + */ + + if (_folder->GetProperty(realIndex, propID, &prop) != S_OK) + throw 2723407; + + if ((propID == kpidSize || propID == kpidPackSize || propID == kpidClusterSize || + propID == kpidNumSubDirs || propID == kpidNumSubFiles) && + (prop.vt == VT_UI8 || prop.vt == VT_UI4)) + s = ConvertSizeToString(ConvertPropVariantToUInt64(prop)); + else if ((propID == kpidTotalSize || propID == kpidFreeSpace) && + (prop.vt == VT_UI8 || prop.vt == VT_UI4)) + s = ConvertSizeToStringShort(ConvertPropVariantToUInt64(prop)); + else + { + s = ConvertPropertyToString(prop, propID, false); + s.Replace(wchar_t(0xA), L' '); + s.Replace(wchar_t(0xD), L' '); + } + int size = item.cchTextMax; + if(size > 0) + { + if(s.Length() + 1 > size) + s = s.Left(size - 1); + MyStringCopy(item.pszText, (const wchar_t *)s); + } + return 0; +} + +#ifdef _WIN32 +extern DWORD g_ComCtl32Version; +#endif + +void CPanel::OnItemChanged(NMLISTVIEW *item) +{ + int index = (int)item->lParam; + if (index == kParentIndex) + return; + bool oldSelected = (item->uOldState & LVIS_SELECTED) != 0; + bool newSelected = (item->uNewState & LVIS_SELECTED) != 0; + // Don't change this code. It works only with such check + printf("CPanel::OnItemChanged : index=%d oldSel=%d newSel=%d\n",index,(int)oldSelected,(int)newSelected); + if(oldSelected != newSelected) { + printf("CPanel::OnItemChanged : _selectedStatusVector[%d] = %d\n",index,(int)newSelected); + _selectedStatusVector[index] = newSelected; + } +} + +bool CPanel::OnNotifyList(LPNMHDR header, LRESULT &result) +{ + printf("CPanel::OnNotifyList : FIXME\n"); + // bool alt = (::GetKeyState(VK_MENU) & 0x8000) != 0; + // bool ctrl = (::GetKeyState(VK_CONTROL) & 0x8000) != 0; + // bool shift = (::GetKeyState(VK_SHIFT) & 0x8000) != 0; + switch(header->code) + { + case LVN_ITEMCHANGED: + { + if (_enableItemChangeNotify) + { + if (!_mySelectMode) + OnItemChanged((LPNMLISTVIEW)header); + RefreshStatusBar(); + } + return false; + } + /* + + case LVN_ODSTATECHANGED: + { + break; + } + */ + +#ifdef _WIN32 + case LVN_GETDISPINFOW: + { + LV_DISPINFOW *dispInfo = (LV_DISPINFOW *)header; + + //is the sub-item information being requested? + + if((dispInfo->item.mask & LVIF_TEXT) != 0 || + (dispInfo->item.mask & LVIF_IMAGE) != 0) + SetItemText(dispInfo->item); + return false; + } + case LVN_KEYDOWN: + { + bool boolResult = OnKeyDown(LPNMLVKEYDOWN(header), result); + RefreshStatusBar(); + return boolResult; + } +#endif + + case LVN_COLUMNCLICK: + OnColumnClick(LPNMLISTVIEW(header)); + return false; + /* + case LVN_ITEMACTIVATE: + RefreshStatusBar(); + if (!alt && !ctrl && !shift) + OpenSelectedItems(true); + return false; + */ + + case NM_DBLCLK: + RefreshStatusBar(); + OpenSelectedItems(true); + return false; +#ifdef _WIN32 + case NM_RETURN: + { + bool alt = (::GetKeyState(VK_MENU) & 0x8000) != 0; + bool ctrl = (::GetKeyState(VK_CONTROL) & 0x8000) != 0; + // bool leftCtrl = (::GetKeyState(VK_LCONTROL) & 0x8000) != 0; + // bool RightCtrl = (::GetKeyState(VK_RCONTROL) & 0x8000) != 0; + bool shift = (::GetKeyState(VK_SHIFT) & 0x8000) != 0; + if (!shift && alt && !ctrl) + { + Properties(); + return false; + } + OpenSelectedItems(true); + return false; + } + case NM_RCLICK: + RefreshStatusBar(); + break; + + /* + return OnRightClick((LPNMITEMACTIVATE)header, result); + */ + /* + case NM_CLICK: + SendRefreshStatusBarMessage(); + return 0; + + // TODO : Handler default action... + return 0; + case LVN_ITEMCHANGED: + { + NMLISTVIEW *pNMLV = (NMLISTVIEW *) lpnmh; + SelChange(pNMLV); + return TRUE; + } + case NM_SETFOCUS: + return onSetFocus(NULL); + case NM_KILLFOCUS: + return onKillFocus(NULL); + */ + case NM_CLICK: + { + // we need SetFocusToList, if we drag-select items from other panel. + SetFocusToList(); + RefreshStatusBar(); + if(_mySelectMode) + if(g_ComCtl32Version >= MAKELONG(71, 4)) + OnLeftClick((LPNMITEMACTIVATE)header); + return false; + } + case LVN_BEGINLABELEDITW: + result = OnBeginLabelEdit((LV_DISPINFOW *)header); + return true; + case LVN_ENDLABELEDITW: + result = OnEndLabelEdit((LV_DISPINFOW *)header); + return true; + + case NM_CUSTOMDRAW: + { + if (_mySelectMode) + return OnCustomDraw((LPNMLVCUSTOMDRAW)header, result); + break; + } + case LVN_BEGINDRAG: + { + OnDrag((LPNMLISTVIEW)header); + RefreshStatusBar(); + break; + } +#endif + // case LVN_BEGINRDRAG: + } + return false; +} + +#ifdef _WIN32 +bool CPanel::OnCustomDraw(LPNMLVCUSTOMDRAW lplvcd, LRESULT &result) +{ + switch(lplvcd->nmcd.dwDrawStage) + { + case CDDS_PREPAINT : + result = CDRF_NOTIFYITEMDRAW; + return true; + + case CDDS_ITEMPREPAINT: + /* + SelectObject(lplvcd->nmcd.hdc, + GetFontForItem(lplvcd->nmcd.dwItemSpec, + lplvcd->nmcd.lItemlParam) ); + lplvcd->clrText = GetColorForItem(lplvcd->nmcd.dwItemSpec, + lplvcd->nmcd.lItemlParam); + lplvcd->clrTextBk = GetBkColorForItem(lplvcd->nmcd.dwItemSpec, + lplvcd->nmcd.lItemlParam); + */ + int realIndex = (int)lplvcd->nmcd.lItemlParam; + bool selected = false; + if (realIndex != kParentIndex) + selected = _selectedStatusVector[realIndex]; + if (selected) + lplvcd->clrTextBk = RGB(255, 192, 192); + // lplvcd->clrText = RGB(255, 0, 128); + else + lplvcd->clrTextBk = _listView.GetBkColor(); + // lplvcd->clrText = RGB(0, 0, 0); + // result = CDRF_NEWFONT; + result = CDRF_NOTIFYITEMDRAW; + return true; + + // return false; + // return true; + /* + case CDDS_SUBITEM | CDDS_ITEMPREPAINT: + if (lplvcd->iSubItem == 0) + { + // lplvcd->clrText = RGB(255, 0, 0); + lplvcd->clrTextBk = RGB(192, 192, 192); + } + else + { + lplvcd->clrText = RGB(0, 0, 0); + lplvcd->clrTextBk = RGB(255, 255, 255); + } + return true; + */ + + /* At this point, you can change the background colors for the item + and any subitems and return CDRF_NEWFONT. If the list-view control + is in report mode, you can simply return CDRF_NOTIFYSUBITEMREDRAW + to customize the item's subitems individually */ + } + return false; +} +#endif //#ifdef _WIN32 + +void CPanel::OnRefreshStatusBar() +{ + CRecordVector indices; + GetOperatedItemIndices(indices); + + _statusBar.SetText(0, MyFormatNew(IDS_N_SELECTED_ITEMS, 0x02000301, NumberToString(indices.Size()))); + + UString selectSizeString; + + if (indices.Size() > 0) + { + UInt64 totalSize = 0; + for (int i = 0; i < indices.Size(); i++) + totalSize += GetItemSize(indices[i]); + selectSizeString = ConvertSizeToString(totalSize); + } + _statusBar.SetText(1, selectSizeString); + + int focusedItem = _listView.GetFocusedItem(); + UString sizeString; + UString dateString; + if (focusedItem >= 0 && _listView.GetSelectedCount() > 0) + { + int realIndex = GetRealItemIndex(focusedItem); + if (realIndex != kParentIndex) + { + sizeString = ConvertSizeToString(GetItemSize(realIndex)); + NCOM::CPropVariant prop; + if (_folder->GetProperty(realIndex, kpidMTime, &prop) == S_OK) + dateString = ConvertPropertyToString(prop, kpidMTime, false); + } + } + _statusBar.SetText(2, sizeString); + _statusBar.SetText(3, dateString); + // _statusBar.SetText(4, nameString); + // _statusBar2.SetText(1, MyFormatNew(L"{0} bytes", NumberToStringW(totalSize))); +} diff --git a/CPP/7zip/UI/FileManager/PanelMenu.cpp b/CPP/7zip/UI/FileManager/PanelMenu.cpp new file mode 100644 index 0000000..4b0ea05 --- /dev/null +++ b/CPP/7zip/UI/FileManager/PanelMenu.cpp @@ -0,0 +1,684 @@ +#include "StdAfx.h" + +#include "Common/StringConvert.h" + +#include "Windows/COM.h" +#include "Windows/Clipboard.h" +#include "Windows/Menu.h" +#include "Windows/PropVariant.h" +#include "Windows/PropVariantConversions.h" + +#include "../../PropID.h" +#include "../Common/PropIDUtils.h" +#include "../Explorer/ContextMenu.h" + +#include "App.h" +#include "LangUtils.h" +#include "MyLoadMenu.h" +#include "PropertyName.h" + +#include "resource.h" +#include "PropertyNameRes.h" + +using namespace NWindows; + +LONG g_DllRefCount = 0; + +static const UINT kSevenZipStartMenuID = kPluginMenuStartID ; +static const UINT kSystemStartMenuID = kPluginMenuStartID + 100; + +void CPanel::InvokeSystemCommand(const char *command) +{ +#ifdef _WIN32 + NCOM::CComInitializer comInitializer; + if (!IsFsOrPureDrivesFolder()) + return; + CRecordVector operatedIndices; + GetOperatedItemIndices(operatedIndices); + if (operatedIndices.IsEmpty()) + return; + CMyComPtr contextMenu; + if (CreateShellContextMenu(operatedIndices, contextMenu) != S_OK) + return; + + CMINVOKECOMMANDINFO ci; + ZeroMemory(&ci, sizeof(ci)); + ci.cbSize = sizeof(CMINVOKECOMMANDINFO); + ci.hwnd = GetParent(); + ci.lpVerb = command; + contextMenu->InvokeCommand(&ci); +#endif +} + +static const wchar_t *kSeparator = L"----------------------------\n"; +static const wchar_t *kSeparatorSmall = L"----\n"; +static const wchar_t *kPropValueSeparator = L": "; + +extern UString ConvertSizeToString(UInt64 value); + +static void AddPropertyString(PROPID propID, const wchar_t *nameBSTR, + const NCOM::CPropVariant &prop, UString &s) +{ + if (prop.vt != VT_EMPTY) + { + UString val; + + if ((prop.vt == VT_UI8 || prop.vt == VT_UI4) && ( + propID == kpidSize || + propID == kpidPackSize || + propID == kpidNumSubDirs || + propID == kpidNumSubFiles || + propID == kpidNumBlocks || + propID == kpidClusterSize || + propID == kpidTotalSize || + propID == kpidFreeSpace || + propID == kpidPhySize || + propID == kpidHeadersSize || + propID == kpidFreeSpace + )) + val = ConvertSizeToString(ConvertPropVariantToUInt64(prop)); + else + val = ConvertPropertyToString(prop, propID); + + if (!val.IsEmpty()) + { + s += GetNameOfProperty(propID, nameBSTR); + s += kPropValueSeparator; + /* + if (propID == kpidComment) + s += L'\n'; + */ + s += val; + s += L'\n'; + } + } +} + +void CPanel::Properties() +{ + CMyComPtr getFolderArcProps; + _folder.QueryInterface(IID_IGetFolderArcProps, &getFolderArcProps); + if (!getFolderArcProps) + { + InvokeSystemCommand("properties"); + return; + } + + { + UString message; + + CRecordVector operatedIndices; + GetOperatedItemIndices(operatedIndices); + if (operatedIndices.Size() == 1) + { + UInt32 index = operatedIndices[0]; + // message += L"Item:\n"; + UInt32 numProps; + if (_folder->GetNumberOfProperties(&numProps) == S_OK) + { + for (UInt32 i = 0; i < numProps; i++) + { + CMyComBSTR name; + PROPID propID; + VARTYPE varType; + + if (_folder->GetPropertyInfo(i, &name, &propID, &varType) != S_OK) + continue; + + NCOM::CPropVariant prop; + if (_folder->GetProperty(index, propID, &prop) != S_OK) + continue; + AddPropertyString(propID, name, prop, message); + } + } + message += kSeparator; + } + + /* + message += LangString(IDS_PROP_FILE_TYPE, 0x02000214); + message += kPropValueSeparator; + message += GetFolderTypeID(); + message += L"\n"; + */ + + { + NCOM::CPropVariant prop; + if (_folder->GetFolderProperty(kpidPath, &prop) == S_OK) + { + AddPropertyString(kpidName, L"Path", prop, message); + } + } + + CMyComPtr folderProperties; + _folder.QueryInterface(IID_IFolderProperties, &folderProperties); + if (folderProperties) + { + UInt32 numProps; + if (folderProperties->GetNumberOfFolderProperties(&numProps) == S_OK) + { + for (UInt32 i = 0; i < numProps; i++) + { + CMyComBSTR name; + PROPID propID; + VARTYPE vt; + if (folderProperties->GetFolderPropertyInfo(i, &name, &propID, &vt) != S_OK) + continue; + NCOM::CPropVariant prop; + if (_folder->GetFolderProperty(propID, &prop) != S_OK) + continue; + AddPropertyString(propID, name, prop, message); + } + } + } + + CMyComPtr getFolderArcProps; + _folder.QueryInterface(IID_IGetFolderArcProps, &getFolderArcProps); + if (getFolderArcProps) + { + CMyComPtr getProps; + getFolderArcProps->GetFolderArcProps(&getProps); + if (getProps) + { + UInt32 numLevels; + if (getProps->GetArcNumLevels(&numLevels) != S_OK) + numLevels = 0; + for (UInt32 level2 = 0; level2 < numLevels; level2++) + { + { + UInt32 level = numLevels - 1 - level2; + UInt32 numProps; + if (getProps->GetArcNumProps(level, &numProps) == S_OK) + { + message += kSeparator; + for (Int32 i = -3; i < (Int32)numProps; i++) + { + CMyComBSTR name; + PROPID propID; + VARTYPE vt; + switch (i) + { + case -3: propID = kpidPath; break; + case -2: propID = kpidType; break; + case -1: propID = kpidError; break; + default: + if (getProps->GetArcPropInfo(level, i, &name, &propID, &vt) != S_OK) + continue; + } + NCOM::CPropVariant prop; + if (getProps->GetArcProp(level, propID, &prop) != S_OK) + continue; + AddPropertyString(propID, name, prop, message); + } + } + } + if (level2 != numLevels - 1) + { + UInt32 level = numLevels - 1 - level2; + UInt32 numProps; + if (getProps->GetArcNumProps2(level, &numProps) == S_OK) + { + message += kSeparatorSmall; + for (Int32 i = 0; i < (Int32)numProps; i++) + { + CMyComBSTR name; + PROPID propID; + VARTYPE vt; + if (getProps->GetArcPropInfo2(level, i, &name, &propID, &vt) != S_OK) + continue; + NCOM::CPropVariant prop; + if (getProps->GetArcProp2(level, propID, &prop) != S_OK) + continue; + AddPropertyString(propID, name, prop, message); + } + } + } + } + } + } + ::MessageBoxW(*(this), message, LangString(IDS_PROPERTIES, 0x03020900), MB_OK); + } +} + +void CPanel::EditCut() +{ + // InvokeSystemCommand("cut"); +} + +void CPanel::EditCopy() +{ + /* + CMyComPtr getFolderArcProps; + _folder.QueryInterface(IID_IGetFolderArcProps, &getFolderArcProps); + if (!getFolderArcProps) + { + InvokeSystemCommand("copy"); + return; + } + */ + UString s; + CRecordVector indices; + GetSelectedItemsIndices(indices); + for (int i = 0; i < indices.Size(); i++) + { + if (i > 0) + s += L"\xD\n"; + s += GetItemName(indices[i]); + } + ClipboardSetText(_mainWindow, s); +} + +void CPanel::EditPaste() +{ + /* + UStringVector names; + ClipboardGetFileNames(names); + CopyFromNoAsk(names); + UString s; + for (int i = 0; i < names.Size(); i++) + { + s += L" "; + s += names[i]; + } + + MessageBoxW(0, s, L"", 0); + */ + + // InvokeSystemCommand("paste"); +} + +#ifdef _WIN32 +HRESULT CPanel::CreateShellContextMenu( + const CRecordVector &operatedIndices, + CMyComPtr &systemContextMenu) +{ + systemContextMenu.Release(); + UString folderPath = GetFsPath(); + + CMyComPtr desktopFolder; + RINOK(::SHGetDesktopFolder(&desktopFolder)); + if (!desktopFolder) + { + // ShowMessage("Failed to get Desktop folder."); + return E_FAIL; + } + + // Separate the file from the folder. + + + // Get a pidl for the folder the file + // is located in. + LPITEMIDLIST parentPidl; + DWORD eaten; + RINOK(desktopFolder->ParseDisplayName( + GetParent(), 0, (wchar_t *)(const wchar_t *)folderPath, + &eaten, &parentPidl, 0)); + + // Get an IShellFolder for the folder + // the file is located in. + CMyComPtr parentFolder; + RINOK(desktopFolder->BindToObject(parentPidl, + 0, IID_IShellFolder, (void**)&parentFolder)); + if (!parentFolder) + { + // ShowMessage("Invalid file name."); + return E_FAIL; + } + + // Get a pidl for the file itself. + CRecordVector pidls; + pidls.Reserve(operatedIndices.Size()); + for (int i = 0; i < operatedIndices.Size(); i++) + { + LPITEMIDLIST pidl; + UString fileName = GetItemRelPath(operatedIndices[i]); + if (IsFSDrivesFolder()) + fileName += WCHAR_PATH_SEPARATOR; + RINOK(parentFolder->ParseDisplayName(GetParent(), 0, + (wchar_t *)(const wchar_t *)fileName, &eaten, &pidl, 0)); + pidls.Add(pidl); + } + + ITEMIDLIST temp; + if (pidls.Size() == 0) + { + temp.mkid.cb = 0; + /* + LPITEMIDLIST pidl; + HRESULT result = parentFolder->ParseDisplayName(GetParent(), 0, + L"." WSTRING_PATH_SEPARATOR, &eaten, &pidl, 0); + if (result != NOERROR) + return; + */ + pidls.Add(&temp); + } + + // Get the IContextMenu for the file. + CMyComPtr cm; + RINOK( parentFolder->GetUIObjectOf(GetParent(), pidls.Size(), + (LPCITEMIDLIST *)&pidls.Front(), IID_IContextMenu, 0, (void**)&cm)); + if (!cm) + { + // ShowMessage("Unable to get context menu interface."); + return E_FAIL; + } + systemContextMenu = cm; + return S_OK; +} + +void CPanel::CreateSystemMenu(HMENU menuSpec, + const CRecordVector &operatedIndices, + CMyComPtr &systemContextMenu) +{ + systemContextMenu.Release(); + + CreateShellContextMenu(operatedIndices, systemContextMenu); + + if (systemContextMenu == 0) + return; + + // Set up a CMINVOKECOMMANDINFO structure. + CMINVOKECOMMANDINFO ci; + ZeroMemory(&ci, sizeof(ci)); + ci.cbSize = sizeof(CMINVOKECOMMANDINFO); + ci.hwnd = GetParent(); + + /* + if (Sender == GoBtn) + { + // Verbs that can be used are cut, paste, + // properties, delete, and so on. + String action; + if (CutRb->Checked) + action = "cut"; + else if (CopyRb->Checked) + action = "copy"; + else if (DeleteRb->Checked) + action = "delete"; + else if (PropertiesRb->Checked) + action = "properties"; + + ci.lpVerb = action.c_str(); + result = cm->InvokeCommand(&ci); + if (result) + ShowMessage( + "Error copying file to clipboard."); + + } + else + */ + { + // HMENU hMenu = CreatePopupMenu(); + CMenu popupMenu; + // CMenuDestroyer menuDestroyer(popupMenu); + if(!popupMenu.CreatePopup()) + throw 210503; + + HMENU hMenu = popupMenu; + + DWORD Flags = CMF_EXPLORE; + // Optionally the shell will show the extended + // context menu on some operating systems when + // the shift key is held down at the time the + // context menu is invoked. The following is + // commented out but you can uncommnent this + // line to show the extended context menu. + // Flags |= 0x00000080; + systemContextMenu->QueryContextMenu(hMenu, 0, kSystemStartMenuID, 0x7FFF, Flags); + + + { + CMenu menu; + menu.Attach(menuSpec); + CMenuItem menuItem; + menuItem.fMask = MIIM_SUBMENU | MIIM_TYPE | MIIM_ID; + menuItem.fType = MFT_STRING; + menuItem.hSubMenu = popupMenu.Detach(); + // menuDestroyer.Disable(); + menuItem.StringValue = LangString(IDS_SYSTEM, 0x030202A0); + menu.InsertItem(0, true, menuItem); + } + /* + if (Cmd < 100 && Cmd != 0) + { + ci.lpVerb = MAKEINTRESOURCE(Cmd - 1); + ci.lpParameters = ""; + ci.lpDirectory = ""; + ci.nShow = SW_SHOWNORMAL; + cm->InvokeCommand(&ci); + } + // If Cmd is > 100 then it's one of our + // inserted menu items. + else + // Find the menu item. + for (int i = 0; i < popupMenu1->Items->Count; i++) + { + TMenuItem* menu = popupMenu1->Items->Items[i]; + // Call its OnClick handler. + if (menu->Command == Cmd - 100) + menu->OnClick(this); + } + // Release the memory allocated for the menu. + DestroyMenu(hMenu); + */ + } +} + +void CPanel::CreateFileMenu(HMENU menuSpec) +{ + CreateFileMenu(menuSpec, _sevenZipContextMenu, _systemContextMenu, true); +} + +void CPanel::CreateSevenZipMenu(HMENU menuSpec, + const CRecordVector &operatedIndices, + CMyComPtr &sevenZipContextMenu) +{ + sevenZipContextMenu.Release(); + + CMenu menu; + menu.Attach(menuSpec); + // CMenuDestroyer menuDestroyer(menu); + // menu.CreatePopup(); + + bool sevenZipMenuCreated = false; + + CZipContextMenu *contextMenuSpec = new CZipContextMenu; + CMyComPtr contextMenu = contextMenuSpec; + // if (contextMenu.CoCreateInstance(CLSID_CZipContextMenu, IID_IContextMenu) == S_OK) + { + /* + CMyComPtr initContextMenu; + if (contextMenu.QueryInterface(IID_IInitContextMenu, &initContextMenu) != S_OK) + return; + */ + UString currentFolderUnicode = _currentFolderPrefix; + UStringVector names; + int i; + for(i = 0; i < operatedIndices.Size(); i++) + names.Add(currentFolderUnicode + GetItemRelPath(operatedIndices[i])); + CRecordVector namePointers; + for(i = 0; i < operatedIndices.Size(); i++) + namePointers.Add(names[i]); + + // NFile::NDirectory::MySetCurrentDirectory(currentFolderUnicode); + if (contextMenuSpec->InitContextMenu(currentFolderUnicode, &namePointers.Front(), + operatedIndices.Size()) == S_OK) + { + HRESULT res = contextMenu->QueryContextMenu(menu, 0, kSevenZipStartMenuID, + kSystemStartMenuID - 1, 0); + sevenZipMenuCreated = (HRESULT_SEVERITY(res) == SEVERITY_SUCCESS); + if (sevenZipMenuCreated) + sevenZipContextMenu = contextMenu; + // int code = HRESULT_CODE(res); + // int nextItemID = code; + } + } +} + +void CPanel::CreateFileMenu(HMENU menuSpec, + CMyComPtr &sevenZipContextMenu, + CMyComPtr &systemContextMenu, + bool programMenu) +{ + sevenZipContextMenu.Release(); + systemContextMenu.Release(); + + CRecordVector operatedIndices; + GetOperatedItemIndices(operatedIndices); + + CMenu menu; + menu.Attach(menuSpec); + + CreateSevenZipMenu(menu, operatedIndices, sevenZipContextMenu); + if (g_App.ShowSystemMenu) + CreateSystemMenu(menu, operatedIndices, systemContextMenu); + + /* + if (menu.GetItemCount() > 0) + menu.AppendItem(MF_SEPARATOR, 0, (LPCTSTR)0); + */ + + int i; + for (i = 0; i < operatedIndices.Size(); i++) + if (IsItemFolder(operatedIndices[i])) + break; + bool allAreFiles = (i == operatedIndices.Size()); + LoadFileMenu(menu, menu.GetItemCount(), programMenu, + IsFSFolder(), operatedIndices.Size(), allAreFiles); +} + +bool CPanel::InvokePluginCommand(int id) +{ + return InvokePluginCommand(id, _sevenZipContextMenu, _systemContextMenu); +} + +bool CPanel::InvokePluginCommand(int id, + IContextMenu *sevenZipContextMenu, IContextMenu *systemContextMenu) +{ + UInt32 offset; + bool isSystemMenu = (id >= kSystemStartMenuID); + if (isSystemMenu) + offset = id - kSystemStartMenuID; + else + offset = id - kSevenZipStartMenuID; + + #ifdef UNDER_CE + CMINVOKECOMMANDINFO + #else + CMINVOKECOMMANDINFOEX + #endif + commandInfo; + commandInfo.cbSize = sizeof(commandInfo); + commandInfo.fMask = 0 + #ifndef UNDER_CE + | CMIC_MASK_UNICODE + #endif + ; + commandInfo.hwnd = GetParent(); + commandInfo.lpVerb = (LPCSTR)(MAKEINTRESOURCE(offset)); + commandInfo.lpParameters = NULL; + CSysString currentFolderSys = GetSystemString(_currentFolderPrefix); + commandInfo.lpDirectory = (LPCSTR)(LPCTSTR)(currentFolderSys); + commandInfo.nShow = SW_SHOW; + commandInfo.lpParameters = NULL; + #ifndef UNDER_CE + commandInfo.lpTitle = ""; + commandInfo.lpVerbW = (LPCWSTR)(MAKEINTRESOURCEW(offset)); + UString currentFolderUnicode = _currentFolderPrefix; + commandInfo.lpDirectoryW = currentFolderUnicode; + commandInfo.lpTitleW = L""; + // commandInfo.ptInvoke.x = xPos; + // commandInfo.ptInvoke.y = yPos; + commandInfo.ptInvoke.x = 0; + commandInfo.ptInvoke.y = 0; + #endif + HRESULT result; + if (isSystemMenu) + result = systemContextMenu->InvokeCommand(LPCMINVOKECOMMANDINFO(&commandInfo)); + else + result = sevenZipContextMenu->InvokeCommand(LPCMINVOKECOMMANDINFO(&commandInfo)); + if (result == NOERROR) + { + KillSelection(); + return true; + } + return false; +} + +bool CPanel::OnContextMenu(HANDLE windowHandle, int xPos, int yPos) +{ + if (::GetParent((HWND)windowHandle) == _listView) + { + ShowColumnsContextMenu(xPos, yPos); + return true; + } + + if (windowHandle != _listView) + return false; + /* + POINT point; + point.x = xPos; + point.y = yPos; + if (!_listView.ScreenToClient(&point)) + return false; + + LVHITTESTINFO info; + info.pt = point; + int index = _listView.HitTest(&info); + */ + + CRecordVector operatedIndices; + GetOperatedItemIndices(operatedIndices); + + if (xPos < 0 || yPos < 0) + { + if (operatedIndices.Size() == 0) + { + xPos = 0; + yPos = 0; + } + else + { + int itemIndex = _listView.GetNextItem(-1, LVNI_FOCUSED); + if (itemIndex == -1) + return false; + RECT rect; + if (!_listView.GetItemRect(itemIndex, &rect, LVIR_ICON)) + return false; + xPos = (rect.left + rect.right) / 2; + yPos = (rect.top + rect.bottom) / 2; + } + POINT point = {xPos, yPos}; + _listView.ClientToScreen(&point); + xPos = point.x; + yPos = point.y; + } + + CMenu menu; + CMenuDestroyer menuDestroyer(menu); + menu.CreatePopup(); + + CMyComPtr sevenZipContextMenu; + CMyComPtr systemContextMenu; + CreateFileMenu(menu, sevenZipContextMenu, systemContextMenu, false); + + int result = menu.Track(TPM_LEFTALIGN + #ifndef UNDER_CE + | TPM_RIGHTBUTTON + #endif + | TPM_RETURNCMD | TPM_NONOTIFY, + xPos, yPos, _listView); + + if (result == 0) + return true; + + if (result >= kPluginMenuStartID) + { + InvokePluginCommand(result, sevenZipContextMenu, systemContextMenu); + return true; + } + if (ExecuteFileCommand(result)) + return true; + return true; +} +#endif + diff --git a/CPP/7zip/UI/FileManager/PanelOperations.cpp b/CPP/7zip/UI/FileManager/PanelOperations.cpp new file mode 100644 index 0000000..cf475af --- /dev/null +++ b/CPP/7zip/UI/FileManager/PanelOperations.cpp @@ -0,0 +1,475 @@ +// PanelOperations.cpp + +#include "StdAfx.h" + +#include "Common/DynamicBuffer.h" +#include "Common/StringConvert.h" + +#include "Windows/COM.h" +#include "Windows/FileDir.h" +#include "Windows/PropVariant.h" +#include "Windows/ResourceString.h" +#include "Windows/Thread.h" + +#include "ComboDialog.h" + +#include "FSFolder.h" +#include "FormatUtils.h" +#include "LangUtils.h" +#include "Panel.h" +#include "UpdateCallback100.h" + +#include "resource.h" + +using namespace NWindows; +using namespace NFile; + +#ifndef _UNICODE +extern bool g_IsNT; +#endif + +enum EFolderOpType +{ + FOLDER_TYPE_CREATE_FOLDER = 0, + FOLDER_TYPE_DELETE = 1, + FOLDER_TYPE_RENAME = 2 +}; + +class CThreadFolderOperations: public CProgressThreadVirt +{ + HRESULT ProcessVirt(); +public: + EFolderOpType OpType; + UString Name; + UInt32 Index; + CRecordVector Indices; + + CMyComPtr FolderOperations; + CMyComPtr UpdateCallback; + CUpdateCallback100Imp *UpdateCallbackSpec; + + HRESULT Result; + + CThreadFolderOperations(EFolderOpType opType): OpType(opType), Result(E_FAIL) {}; + HRESULT DoOperation(CPanel &panel, const UString &progressTitle, const UString &titleError); +}; + +HRESULT CThreadFolderOperations::ProcessVirt() +{ +#ifdef _WIN32 + NCOM::CComInitializer comInitializer; +#endif + switch(OpType) + { + case FOLDER_TYPE_CREATE_FOLDER: + Result = FolderOperations->CreateFolder(Name, UpdateCallback); + break; + case FOLDER_TYPE_DELETE: + Result = FolderOperations->Delete(&Indices.Front(), Indices.Size(), UpdateCallback); + break; + case FOLDER_TYPE_RENAME: + Result = FolderOperations->Rename(Index, Name, UpdateCallback); + break; + default: + Result = E_FAIL; + } + return Result; +}; + + +HRESULT CThreadFolderOperations::DoOperation(CPanel &panel, const UString &progressTitle, const UString &titleError) +{ + UpdateCallbackSpec = new CUpdateCallback100Imp; + UpdateCallback = UpdateCallbackSpec; + UpdateCallbackSpec->ProgressDialog = &ProgressDialog; + + // FIXME ProgressDialog.WaitMode = true; + ProgressDialog.Sync.SetErrorMessageTitle(titleError); + Result = S_OK; + + bool usePassword = false; + UString password; + if (panel._parentFolders.Size() > 0) + { + const CFolderLink &fl = panel._parentFolders.Back(); + usePassword = fl.UsePassword; + password = fl.Password; + } + + UpdateCallbackSpec->Init(usePassword, password); + + ProgressDialog.MainWindow = panel._mainWindow; // panel.GetParent() + ProgressDialog.MainTitle = LangString(IDS_APP_TITLE, 0x03000000); + ProgressDialog.MainAddTitle = progressTitle + UString(L" "); + + RINOK(Create(progressTitle, ProgressDialog.MainWindow)); + return Result; +} + +#ifndef _UNICODE +typedef int (WINAPI * SHFileOperationWP)(LPSHFILEOPSTRUCTW lpFileOp); +#endif + +void CPanel::DeleteItems(bool toRecycleBin) +{ + CPanel::CDisableTimerProcessing disableTimerProcessing2(*this); + CRecordVector indices; + GetOperatedItemIndices(indices); + if (indices.IsEmpty()) + return; + CSelectedState state; + SaveSelectedState(state); + + #ifndef UNDER_CE + // WM6 / SHFileOperationW doesn't ask user! So we use internal delete + bool useInternalDelete = false; + if (IsFSFolder() && toRecycleBin) + { + #ifndef _UNICODE + if (!g_IsNT) + { + CDynamicBuffer buffer; + size_t size = 0; + for (int i = 0; i < indices.Size(); i++) + { + const AString path = GetSystemString(GetFsPath() + GetItemRelPath(indices[i])); + buffer.EnsureCapacity(size + path.Length() + 1); + memmove(((CHAR *)buffer) + size, (const CHAR *)path, (path.Length() + 1) * sizeof(CHAR)); + size += path.Length() + 1; + } + buffer.EnsureCapacity(size + 1); + ((CHAR *)buffer)[size] = 0; + SHFILEOPSTRUCTA fo; + fo.hwnd = GetParent(); + fo.wFunc = FO_DELETE; + fo.pFrom = (const CHAR *)buffer; + fo.pTo = 0; + fo.fFlags = 0; + if (toRecycleBin) + fo.fFlags |= FOF_ALLOWUNDO; + // fo.fFlags |= FOF_NOCONFIRMATION; + // fo.fFlags |= FOF_NOERRORUI; + // fo.fFlags |= FOF_SILENT; + // fo.fFlags |= FOF_WANTNUKEWARNING; + fo.fAnyOperationsAborted = FALSE; + fo.hNameMappings = 0; + fo.lpszProgressTitle = 0; + /* int res = */ ::SHFileOperationA(&fo); + } + else + #endif + { + CDynamicBuffer buffer; + size_t size = 0; + int maxLen = 0; + for (int i = 0; i < indices.Size(); i++) + { + // L"\\\\?\\") doesn't work here. + const UString path = GetFsPath() + GetItemRelPath(indices[i]); + if (path.Length() > maxLen) + maxLen = path.Length(); + buffer.EnsureCapacity(size + path.Length() + 1); + memmove(((WCHAR *)buffer) + size, (const WCHAR *)path, (path.Length() + 1) * sizeof(WCHAR)); + size += path.Length() + 1; + } + buffer.EnsureCapacity(size + 1); + ((WCHAR *)buffer)[size] = 0; +#ifdef _WIN32 + if (maxLen >= MAX_PATH) + { + if (toRecycleBin) + { + MessageBoxErrorLang(IDS_ERROR_LONG_PATH_TO_RECYCLE, 0x03020218); + return; + } + useInternalDelete = true; + } + else + { + SHFILEOPSTRUCTW fo; + fo.hwnd = GetParent(); + fo.wFunc = FO_DELETE; + fo.pFrom = (const WCHAR *)buffer; + fo.pTo = 0; + fo.fFlags = 0; + if (toRecycleBin) + fo.fFlags |= FOF_ALLOWUNDO; + fo.fAnyOperationsAborted = FALSE; + fo.hNameMappings = 0; + fo.lpszProgressTitle = 0; + int res; + #ifdef _UNICODE + res = ::SHFileOperationW(&fo); + #else + SHFileOperationWP shFileOperationW = (SHFileOperationWP) + ::GetProcAddress(::GetModuleHandleW(L"shell32.dll"), "SHFileOperationW"); + if (shFileOperationW == 0) + return; + res = shFileOperationW(&fo); + #endif + } +#else + // FIXME - how to use the recycle bin undex Gnome or KDE ? + useInternalDelete = true; +#endif + } + /* + if (fo.fAnyOperationsAborted) + MessageBoxError(result, LangString(IDS_ERROR_DELETING, 0x03020217)); + */ + } + else + useInternalDelete = true; + if (useInternalDelete) + #endif + DeleteItemsInternal(indices); + RefreshListCtrl(state); +} + +void CPanel::MessageBoxErrorForUpdate(HRESULT errorCode, UINT resourceID, UInt32 langID) +{ + if (errorCode == E_NOINTERFACE) + MessageBoxErrorLang(IDS_OPERATION_IS_NOT_SUPPORTED, 0x03020208); + else + MessageBoxError(errorCode, LangString(resourceID, langID)); +} + +void CPanel::DeleteItemsInternal(CRecordVector &indices) +{ + CMyComPtr folderOperations; + if (_folder.QueryInterface(IID_IFolderOperations, &folderOperations) != S_OK) + { + MessageBoxErrorForUpdate(E_NOINTERFACE, IDS_ERROR_DELETING, 0x03020217); + return; + } + + UString title; + UString message; + if (indices.Size() == 1) + { + int index = indices[0]; + const UString itemName = GetItemRelPath(index); + if (IsItemFolder(index)) + { + title = LangString(IDS_CONFIRM_FOLDER_DELETE, 0x03020211); + message = MyFormatNew(IDS_WANT_TO_DELETE_FOLDER, 0x03020214, itemName); + } + else + { + title = LangString(IDS_CONFIRM_FILE_DELETE, 0x03020210); + message = MyFormatNew(IDS_WANT_TO_DELETE_FILE, 0x03020213, itemName); + } + } + else + { + title = LangString(IDS_CONFIRM_ITEMS_DELETE, 0x03020212); + message = MyFormatNew(IDS_WANT_TO_DELETE_ITEMS, 0x03020215, + NumberToString(indices.Size())); + } + if (::MessageBoxW(GetParent(), message, title, MB_OKCANCEL | MB_ICONQUESTION) != IDOK) + return; + + { + CThreadFolderOperations op(FOLDER_TYPE_DELETE); + op.FolderOperations = folderOperations; + op.Indices = indices; + op.DoOperation(*this, + LangString(IDS_DELETING, 0x03020216), + LangString(IDS_ERROR_DELETING, 0x03020217)); + } + RefreshTitleAlways(); +} + +#ifdef _WIN32 +BOOL CPanel::OnBeginLabelEdit(LV_DISPINFOW * lpnmh) +{ + int realIndex = GetRealIndex(lpnmh->item); + if (realIndex == kParentIndex) + return TRUE; + CMyComPtr folderOperations; + if (_folder.QueryInterface(IID_IFolderOperations, &folderOperations) != S_OK) + return TRUE; + return FALSE; +} + +BOOL CPanel::OnEndLabelEdit(LV_DISPINFOW * lpnmh) +{ + if (lpnmh->item.pszText == NULL) + return FALSE; + CMyComPtr folderOperations; + if (_folder.QueryInterface(IID_IFolderOperations, &folderOperations) != S_OK) + { + MessageBoxErrorForUpdate(E_NOINTERFACE, IDS_ERROR_RENAMING, 0x03020221); + return FALSE; + } + const UString newName = lpnmh->item.pszText; + CPanel::CDisableTimerProcessing disableTimerProcessing2(*this); + + SaveSelectedState(_selectedState); + + int realIndex = GetRealIndex(lpnmh->item); + if (realIndex == kParentIndex) + return FALSE; + const UString prefix = GetItemPrefix(realIndex); + + + { + CThreadFolderOperations op(FOLDER_TYPE_RENAME); + op.FolderOperations = folderOperations; + op.Index = realIndex; + op.Name = newName; + HRESULT res = op.DoOperation(*this, + LangString(IDS_RENAMING, 0x03020220), + LangString(IDS_ERROR_RENAMING, 0x03020221)); + if (res != S_OK) + return FALSE; + } + + // Can't use RefreshListCtrl here. + // RefreshListCtrlSaveFocused(); + _selectedState.FocusedName = prefix + newName; + _selectedState.SelectFocused = true; + + // We need clear all items to disable GetText before Reload: + // number of items can change. + // _listView.DeleteAllItems(); + // But seems it can still call GetText (maybe for current item) + // so we can't delete items. + + _dontShowMode = true; + + PostMessage(kReLoadMessage); + return TRUE; +} +#endif + +void CPanel::CreateFolder() +{ + CMyComPtr folderOperations; + if (_folder.QueryInterface(IID_IFolderOperations, &folderOperations) != S_OK) + { + MessageBoxErrorForUpdate(E_NOINTERFACE, IDS_CREATE_FOLDER_ERROR, 0x03020233); + return; + } + CPanel::CDisableTimerProcessing disableTimerProcessing2(*this); + CSelectedState state; + SaveSelectedState(state); + CComboDialog comboDialog; + comboDialog.Title = LangString(IDS_CREATE_FOLDER, 0x03020230); + comboDialog.Static = LangString(IDS_CREATE_FOLDER_NAME, 0x03020231); + comboDialog.Value = LangString(IDS_CREATE_FOLDER_DEFAULT_NAME, /*0x03020232*/ (UInt32)-1); + if (comboDialog.Create(GetParent()) == IDCANCEL) + return; + + UString newName = comboDialog.Value; + + { + CThreadFolderOperations op(FOLDER_TYPE_CREATE_FOLDER); + op.FolderOperations = folderOperations; + op.Name = newName; + HRESULT res = op.DoOperation(*this, + LangString(IDS_CREATE_FOLDER, 0x03020230), + LangString(IDS_CREATE_FOLDER_ERROR, 0x03020233)); + if (res != S_OK) + return; + } + int pos = newName.Find(WCHAR_PATH_SEPARATOR); + if (pos >= 0) + newName = newName.Left(pos); + if (!_mySelectMode) + state.SelectedNames.Clear(); + state.FocusedName = newName; + state.SelectFocused = true; + RefreshTitleAlways(); + RefreshListCtrl(state); +} + +void CPanel::CreateFile() +{ + CMyComPtr folderOperations; + if (_folder.QueryInterface(IID_IFolderOperations, &folderOperations) != S_OK) + { + MessageBoxErrorForUpdate(E_NOINTERFACE, IDS_CREATE_FILE_ERROR, 0x03020243); + return; + } + CPanel::CDisableTimerProcessing disableTimerProcessing2(*this); + CSelectedState state; + SaveSelectedState(state); + CComboDialog comboDialog; + comboDialog.Title = LangString(IDS_CREATE_FILE, 0x03020240); + comboDialog.Static = LangString(IDS_CREATE_FILE_NAME, 0x03020241); + comboDialog.Value = LangString(IDS_CREATE_FILE_DEFAULT_NAME, /*0x03020242*/ (UInt32)-1); + if (comboDialog.Create(GetParent()) == IDCANCEL) + return; + UString newName = comboDialog.Value; + HRESULT result = folderOperations->CreateFile(newName, 0); + if (result != S_OK) + { + MessageBoxErrorForUpdate(result, IDS_CREATE_FILE_ERROR, 0x03020243); + return; + } + int pos = newName.Find(WCHAR_PATH_SEPARATOR); + if (pos >= 0) + newName = newName.Left(pos); + if (!_mySelectMode) + state.SelectedNames.Clear(); + state.FocusedName = newName; + state.SelectFocused = true; + RefreshListCtrl(state); +} + +void CPanel::RenameFile() +{ + int index = _listView.GetFocusedItem(); + if (index >= 0) + _listView.EditLabel(index); +} + +void CPanel::ChangeComment() +{ + CPanel::CDisableTimerProcessing disableTimerProcessing2(*this); + int index = _listView.GetFocusedItem(); + if (index < 0) + return; + int realIndex = GetRealItemIndex(index); + if (realIndex == kParentIndex) + return; + CSelectedState state; + SaveSelectedState(state); + CMyComPtr folderOperations; + if (_folder.QueryInterface(IID_IFolderOperations, &folderOperations) != S_OK) + { + MessageBoxErrorLang(IDS_OPERATION_IS_NOT_SUPPORTED, 0x03020208); + return; + } + + UString comment; + { + NCOM::CPropVariant propVariant; + if (_folder->GetProperty(realIndex, kpidComment, &propVariant) != S_OK) + return; + if (propVariant.vt == VT_BSTR) + comment = propVariant.bstrVal; + else if (propVariant.vt != VT_EMPTY) + return; + } + UString name = GetItemRelPath(realIndex); + CComboDialog comboDialog; + comboDialog.Title = name + L" " + LangString(IDS_COMMENT, 0x03020290); + comboDialog.Value = comment; + comboDialog.Static = LangString(IDS_COMMENT2, 0x03020291); + if (comboDialog.Create(GetParent()) == IDCANCEL) + return; + // FIXME NCOM::CPropVariant propVariant = comboDialog.Value; + NCOM::CPropVariant propVariant(comboDialog.Value); + + HRESULT result = folderOperations->SetProperty(realIndex, kpidComment, &propVariant, NULL); + if (result != S_OK) + { + if (result == E_NOINTERFACE) + MessageBoxErrorLang(IDS_OPERATION_IS_NOT_SUPPORTED, 0x03020208); + else + MessageBoxError(result, L"Set Comment Error"); + } + RefreshListCtrl(state); +} diff --git a/CPP/7zip/UI/FileManager/PanelSelect.cpp b/CPP/7zip/UI/FileManager/PanelSelect.cpp new file mode 100644 index 0000000..0e24230 --- /dev/null +++ b/CPP/7zip/UI/FileManager/PanelSelect.cpp @@ -0,0 +1,305 @@ +// PanelSelect.cpp + +#include "StdAfx.h" + +#include "resource.h" + +#include "Common/StringConvert.h" +#include "Common/Wildcard.h" + +#include "Panel.h" + +#include "ComboDialog.h" + +#include "LangUtils.h" + +void CPanel::OnShiftSelectMessage() +{ + if (!_mySelectMode) + return; + int focusedItem = _listView.GetFocusedItem(); + if (focusedItem < 0) + return; + if (!_selectionIsDefined) + return; + int startItem = MyMin(focusedItem, _prevFocusedItem); + int finishItem = MyMax(focusedItem, _prevFocusedItem); + for (int i = 0; i < _listView.GetItemCount(); i++) + { + int realIndex = GetRealItemIndex(i); + if (realIndex == kParentIndex) + continue; + if (i >= startItem && i <= finishItem) + if (_selectedStatusVector[realIndex] != _selectMark) + { + _selectedStatusVector[realIndex] = _selectMark; + _listView.RedrawItem(i); + } + } + _prevFocusedItem = focusedItem; +} + +#ifdef _WIN32 +void CPanel::OnArrowWithShift() +{ + if (!_mySelectMode) + return; + int focusedItem = _listView.GetFocusedItem(); + if (focusedItem < 0) + return; + int realIndex = GetRealItemIndex(focusedItem); + if (_selectionIsDefined) + { + if (realIndex != kParentIndex) + _selectedStatusVector[realIndex] = _selectMark; + } + else + { + if (realIndex == kParentIndex) + { + _selectionIsDefined = true; + _selectMark = true; + } + else + { + _selectionIsDefined = true; + _selectMark = !_selectedStatusVector[realIndex]; + _selectedStatusVector[realIndex] = _selectMark; + } + } + _prevFocusedItem = focusedItem; + PostMessage(kShiftSelectMessage); + _listView.RedrawItem(focusedItem); +} + +void CPanel::OnInsert() +{ + /* + const int kState = CDIS_MARKED; // LVIS_DROPHILITED; + UINT state = (_listView.GetItemState(focusedItem, LVIS_CUT) == 0) ? + LVIS_CUT : 0; + _listView.SetItemState(focusedItem, state, LVIS_CUT); + // _listView.SetItemState(focusedItem, LVIS_SELECTED, LVIS_SELECTED); + + */ + int focusedItem = _listView.GetFocusedItem(); + if (focusedItem < 0) + return; + int realIndex = GetRealItemIndex(focusedItem); + bool isSelected = !_selectedStatusVector[realIndex]; + if (realIndex != kParentIndex) + _selectedStatusVector[realIndex] = isSelected; + + if (!_mySelectMode) + _listView.SetItemState(focusedItem, isSelected ? LVIS_SELECTED: 0, LVIS_SELECTED); + + _listView.RedrawItem(focusedItem); + + int nextIndex = focusedItem + 1; + if (nextIndex < _listView.GetItemCount()) + { + _listView.SetItemState(nextIndex, LVIS_FOCUSED | LVIS_SELECTED, + LVIS_FOCUSED | LVIS_SELECTED); + _listView.EnsureVisible(nextIndex, false); + } +} +#endif // _WIN32 + +/* +void CPanel::OnUpWithShift() +{ + int focusedItem = _listView.GetFocusedItem(); + if (focusedItem < 0) + return; + int index = GetRealItemIndex(focusedItem); + _selectedStatusVector[index] = !_selectedStatusVector[index]; + _listView.RedrawItem(index); +} + +void CPanel::OnDownWithShift() +{ + int focusedItem = _listView.GetFocusedItem(); + if (focusedItem < 0) + return; + int index = GetRealItemIndex(focusedItem); + _selectedStatusVector[index] = !_selectedStatusVector[index]; + _listView.RedrawItem(index); +} +*/ + +void CPanel::UpdateSelection() +{ +printf("CPanel::UpdateSelection : _mySelectMode=%d\n",(int)_mySelectMode); + if (!_mySelectMode) + { + bool enableTemp = _enableItemChangeNotify; + _enableItemChangeNotify = false; + int numItems = _listView.GetItemCount(); +printf("CPanel::UpdateSelection : numItems=%d\n",(int)numItems); + for (int i = 0; i < numItems; i++) + { + int realIndex = GetRealItemIndex(i); + if (realIndex != kParentIndex) + { + UINT value = 0; + value = _selectedStatusVector[realIndex] ? LVIS_SELECTED: 0; +printf("CPanel::UpdateSelection : SetItemState(%d,%d,LVIS_SELECTED)\n",(int)i,(unsigned)value); + _listView.SetItemState(i, value, LVIS_SELECTED); + } + } + _enableItemChangeNotify = enableTemp; + } + _listView.RedrawAllItems(); +} + + +void CPanel::SelectSpec(bool selectMode) +{ + CComboDialog comboDialog; + comboDialog.Title = selectMode ? + LangString(IDS_SELECT, 0x03020250): + LangString(IDS_DESELECT, 0x03020251); + comboDialog.Static = LangString(IDS_SELECT_MASK, 0x03020252); + comboDialog.Value = L"*"; + if (comboDialog.Create(GetParent()) == IDCANCEL) + return; + const UString &mask = comboDialog.Value; + for (int i = 0; i < _selectedStatusVector.Size(); i++) + if (CompareWildCardWithName(mask, GetItemName(i))) + _selectedStatusVector[i] = selectMode; + UpdateSelection(); +} + +void CPanel::SelectByType(bool selectMode) +{ + int focusedItem = _listView.GetFocusedItem(); + if (focusedItem < 0) + return; + int realIndex = GetRealItemIndex(focusedItem); + UString name = GetItemName(realIndex); + bool isItemFolder = IsItemFolder(realIndex); + + /* + UINT32 numItems; + _folder->GetNumberOfItems(&numItems); + if ((UInt32)_selectedStatusVector.Size() != numItems) + throw 11111; + */ + + if (isItemFolder) + { + for (int i = 0; i < _selectedStatusVector.Size(); i++) + if (IsItemFolder(i) == isItemFolder) + _selectedStatusVector[i] = selectMode; + } + else + { + int pos = name.ReverseFind(L'.'); + if (pos < 0) + { + for (int i = 0; i < _selectedStatusVector.Size(); i++) + if (IsItemFolder(i) == isItemFolder && GetItemName(i).ReverseFind(L'.') < 0) + _selectedStatusVector[i] = selectMode; + } + else + { + UString mask = UString(L'*') + name.Mid(pos); + for (int i = 0; i < _selectedStatusVector.Size(); i++) + if (IsItemFolder(i) == isItemFolder && CompareWildCardWithName(mask, GetItemName(i))) + _selectedStatusVector[i] = selectMode; + } + } + UpdateSelection(); +} + +void CPanel::SelectAll(bool selectMode) +{ + for (int i = 0; i < _selectedStatusVector.Size(); i++) + _selectedStatusVector[i] = selectMode; + UpdateSelection(); +} + +void CPanel::InvertSelection() +{ + if (!_mySelectMode) + { + int numSelected = 0; + for (int i = 0; i < _selectedStatusVector.Size(); i++) + if (_selectedStatusVector[i]) + numSelected++; + if (numSelected == 1) + { + int focused = _listView.GetFocusedItem(); + if (focused >= 0) + { + int realIndex = GetRealItemIndex(focused); + if (realIndex >= 0) + if (_selectedStatusVector[realIndex]) + _selectedStatusVector[realIndex] = false; + } + } + } + for (int i = 0; i < _selectedStatusVector.Size(); i++) + _selectedStatusVector[i] = !_selectedStatusVector[i]; + UpdateSelection(); +} + +void CPanel::KillSelection() +{ + SelectAll(false); + if (!_mySelectMode) + { + int focused = _listView.GetFocusedItem(); + if (focused >= 0) + _listView.SetItemState(focused, LVIS_SELECTED, LVIS_SELECTED); + } +} + +#ifdef _WIN32 +void CPanel::OnLeftClick(LPNMITEMACTIVATE itemActivate) +{ + if(itemActivate->hdr.hwndFrom != HWND(_listView)) + return; + // It will be work only for Version 4.71 (IE 4); + int indexInList = itemActivate->iItem; + if (indexInList < 0) + return; + if ((itemActivate->uKeyFlags & LVKF_SHIFT) != 0) + { + // int focusedIndex = _listView.GetFocusedItem(); + int focusedIndex = _startGroupSelect; + if (focusedIndex < 0) + return; + int startItem = MyMin(focusedIndex, indexInList); + int finishItem = MyMax(focusedIndex, indexInList); + for (int i = 0; i < _selectedStatusVector.Size(); i++) + { + int realIndex = GetRealItemIndex(i); + if (realIndex == kParentIndex) + continue; + bool selected = (i >= startItem && i <= finishItem); + if (_selectedStatusVector[realIndex] != selected) + { + _selectedStatusVector[realIndex] = selected; + _listView.RedrawItem(i); + } + } + } + else + { + _startGroupSelect = indexInList; + if ((itemActivate->uKeyFlags & LVKF_CONTROL) != 0) + { + int realIndex = GetRealItemIndex(indexInList); + if (realIndex != kParentIndex) + { + _selectedStatusVector[realIndex] = !_selectedStatusVector[realIndex]; + _listView.RedrawItem(indexInList); + } + } + } + return; +} +#endif + + diff --git a/CPP/7zip/UI/FileManager/PanelSort.cpp b/CPP/7zip/UI/FileManager/PanelSort.cpp new file mode 100644 index 0000000..85f715c --- /dev/null +++ b/CPP/7zip/UI/FileManager/PanelSort.cpp @@ -0,0 +1,175 @@ +// PanelSort.cpp + +#include "StdAfx.h" + +#include "Windows/PropVariant.h" + +#include "../../PropID.h" + +#include "Panel.h" + +using namespace NWindows; + +static UString GetExtension(const UString &name) +{ + int dotPos = name.ReverseFind(L'.'); + if (dotPos < 0) + return UString(); + return name.Mid(dotPos); +} + +static int CALLBACK CompareItems2(LPARAM lParam1, LPARAM lParam2, LPARAM lpData) +{ + if (lpData == 0) // FIXME NULL) + return 0; + CPanel *panel = (CPanel*)lpData; + + switch(panel->_sortID) + { + // if (panel->_sortIndex == 0) + case kpidName: + { + const UString name1 = panel->GetItemName((int)lParam1); + const UString name2 = panel->GetItemName((int)lParam2); + int res = name1.CompareNoCase(name2); + /* + if (res != 0 || !panel->_flatMode) + return res; + const UString prefix1 = panel->GetItemPrefix(lParam1); + const UString prefix2 = panel->GetItemPrefix(lParam2); + return res = prefix1.CompareNoCase(prefix2); + */ + return res; + } + case kpidNoProperty: + { + return MyCompare(lParam1, lParam2); + } + case kpidExtension: + { + const UString ext1 = GetExtension(panel->GetItemName((int)lParam1)); + const UString ext2 = GetExtension(panel->GetItemName((int)lParam2)); + return ext1.CompareNoCase(ext2); + } + } + /* + if (panel->_sortIndex == 1) + return MyCompare(file1.Size, file2.Size); + return ::CompareFileTime(&file1.MTime, &file2.MTime); + */ + + // PROPID propID = panel->_properties[panel->_sortIndex].ID; + PROPID propID = panel->_sortID; + + NCOM::CPropVariant prop1, prop2; + // Name must be first property + panel->_folder->GetProperty((UINT32)lParam1, propID, &prop1); + panel->_folder->GetProperty((UINT32)lParam2, propID, &prop2); + if (prop1.vt != prop2.vt) + { + return MyCompare(prop1.vt, prop2.vt); + } + if (prop1.vt == VT_BSTR) + { + return _wcsicmp(prop1.bstrVal, prop2.bstrVal); + } + return prop1.Compare(prop2); + // return 0; +} + +static int CALLBACK CompareItems(LPARAM lParam1, LPARAM lParam2, LPARAM lpData) +{ + if (lpData == 0) // FIXME NULL) + return 0; + if (lParam1 == kParentIndex) return -1; + if (lParam2 == kParentIndex) return 1; + + CPanel *panel = (CPanel*)lpData; + + bool isDir1 = panel->IsItemFolder((int)lParam1); + bool isDir2 = panel->IsItemFolder((int)lParam2); + + if (isDir1 && !isDir2) return -1; + if (isDir2 && !isDir1) return 1; + + int result = CompareItems2(lParam1, lParam2, lpData); + return panel->_ascending ? result: (-result); +} + + +int +#if defined(__WIN32__) && !defined(__WXMICROWIN__) // FIXME + wxCALLBACK +#endif + CompareItems_WX(long item1, long item2, long sortData) +{ + return CompareItems(item1,item2,sortData); +} + + +/* +void CPanel::SortItems(int index) +{ + if (index == _sortIndex) + _ascending = !_ascending; + else + { + _sortIndex = index; + _ascending = true; + switch (_properties[_sortIndex].ID) + { + case kpidSize: + case kpidPackedSize: + case kpidCTime: + case kpidATime: + case kpidMTime: + _ascending = false; + break; + } + } + if (sizeof(long) != sizeof(LPARAM)) { + printf("INTERNAL ERROR : sizeof(long) != sizeof(LPARAM)\n"); + exit(-1); + } + _listView.SortItems(CompareItems_WX, (LPARAM)this); + _listView.EnsureVisible(_listView.GetFocusedItem(), false); +} +void CPanel::SortItemsWithPropID(PROPID propID) +{ + int index = _properties.FindItemWithID(propID); + if (index >= 0) + SortItems(index); +} +*/ +void CPanel::SortItemsWithPropID(PROPID propID) +{ + if (propID == _sortID) + _ascending = !_ascending; + else + { + _sortID = propID; + _ascending = true; + switch (propID) + { + case kpidSize: + case kpidPackSize: + case kpidCTime: + case kpidATime: + case kpidMTime: + _ascending = false; + break; + } + } + _listView.SortItems(CompareItems, (LPARAM)this); + _listView.EnsureVisible(_listView.GetFocusedItem(), false); +} + + +void CPanel::OnColumnClick(LPNMLISTVIEW info) +{ + /* + int index = _properties.FindItemWithID(_visibleProperties[info->iSubItem].ID); + SortItems(index); + */ + SortItemsWithPropID(_visibleProperties[info->iSubItem].ID); +} diff --git a/CPP/7zip/UI/FileManager/PanelSplitFile.cpp b/CPP/7zip/UI/FileManager/PanelSplitFile.cpp new file mode 100644 index 0000000..213c2d4 --- /dev/null +++ b/CPP/7zip/UI/FileManager/PanelSplitFile.cpp @@ -0,0 +1,494 @@ +// PanelSplitFile.cpp + +#include "StdAfx.h" + +#include "Common/IntToString.h" + +#include "Windows/Error.h" +#include "Windows/FileIO.h" +#include "Windows/FileFind.h" + +#include "../GUI/ExtractRes.h" + +#include "resource.h" + +#include "App.h" +#include "CopyDialog.h" +#include "FormatUtils.h" +#include "LangUtils.h" +#include "SplitDialog.h" +#include "SplitUtils.h" + +using namespace NWindows; + +static const wchar_t *g_Message_FileWriteError = L"File write error"; + +struct CVolSeqName +{ + UString UnchangedPart; + UString ChangedPart; + CVolSeqName(): ChangedPart(L"000") {}; + + void SetNumDigits(UInt64 numVolumes) + { + ChangedPart = L"000"; + while (numVolumes > 999) + { + numVolumes /= 10; + ChangedPart += L'0'; + } + } + + bool ParseName(const UString &name) + { + if (name.Right(2) != L"01") + return false; + int numLetters = 2; + while (numLetters < name.Length()) + { + if (name[name.Length() - numLetters - 1] != '0') + break; + numLetters++; + } + UnchangedPart = name.Left(name.Length() - numLetters); + ChangedPart = name.Right(numLetters); + return true; + } + + UString GetNextName() + { + UString newName; + int i; + int numLetters = ChangedPart.Length(); + for (i = numLetters - 1; i >= 0; i--) + { + wchar_t c = ChangedPart[i]; + if (c == L'9') + { + c = L'0'; + newName = c + newName; + if (i == 0) + newName = UString(L'1') + newName; + continue; + } + c++; + newName = c + newName; + i--; + for (; i >= 0; i--) + newName = ChangedPart[i] + newName; + break; + } + ChangedPart = newName; + return UnchangedPart + ChangedPart; + } +}; + +static const UInt32 kBufSize = (1 << 20); + +class CThreadSplit: public CProgressThreadVirt +{ + HRESULT ProcessVirt(); +public: + UString FilePath; + UString VolBasePath; + UInt64 NumVolumes; + CRecordVector VolumeSizes; +}; + +HRESULT CThreadSplit::ProcessVirt() +{ + NFile::NIO::CInFile inFile; + if (!inFile.Open(FilePath)) + return GetLastError(); + NFile::NIO::COutFile outFile; + CMyBuffer bufferObject; + if (!bufferObject.Allocate(kBufSize)) + return E_OUTOFMEMORY; + Byte *buffer = (Byte *)(void *)bufferObject; + UInt64 curVolSize = 0; + CVolSeqName seqName; + seqName.SetNumDigits(NumVolumes); + UInt64 length; + if (!inFile.GetLength(length)) + return GetLastError(); + + CProgressSync &sync = ProgressDialog.Sync; + sync.SetProgress(length, 0); + UInt64 pos = 0; + + UInt64 numFiles = 0; + int volIndex = 0; + + for (;;) + { + UInt64 volSize; + if (volIndex < VolumeSizes.Size()) + volSize = VolumeSizes[volIndex]; + else + volSize = VolumeSizes.Back(); + + UInt32 needSize = (UInt32)(MyMin((UInt64)kBufSize, volSize - curVolSize)); + UInt32 processedSize; + if (!inFile.Read(buffer, needSize, processedSize)) + return GetLastError(); + if (processedSize == 0) + break; + needSize = processedSize; + if (curVolSize == 0) + { + UString name = VolBasePath; + name += L'.'; + name += seqName.GetNextName(); + sync.SetCurrentFileName(name); + sync.SetNumFilesCur(numFiles++); + if (!outFile.Create(name, false)) + { + HRESULT res = GetLastError(); + ErrorPath1 = name; + return res; + } + } + if (!outFile.Write(buffer, needSize, processedSize)) + return GetLastError(); + if (needSize != processedSize) + throw g_Message_FileWriteError; + curVolSize += processedSize; + if (curVolSize == volSize) + { + outFile.Close(); + if (volIndex < VolumeSizes.Size()) + volIndex++; + curVolSize = 0; + } + pos += processedSize; + RINOK(sync.SetPosAndCheckPaused(pos)); + } + sync.SetNumFilesCur(numFiles); + return S_OK; +} + +void CApp::Split() +{ + int srcPanelIndex = GetFocusedPanelIndex(); + CPanel &srcPanel = Panels[srcPanelIndex]; + if (!srcPanel.IsFSFolder()) + { + srcPanel.MessageBoxErrorLang(IDS_OPERATION_IS_NOT_SUPPORTED, 0x03020208); + return; + } + CRecordVector indices; + srcPanel.GetOperatedItemIndices(indices); + if (indices.IsEmpty()) + return; + if (indices.Size() != 1) + { + srcPanel.MessageBoxErrorLang(IDS_SELECT_ONE_FILE, 0x03020A02); + return; + } + int index = indices[0]; + if (srcPanel.IsItemFolder(index)) + { + srcPanel.MessageBoxErrorLang(IDS_SELECT_ONE_FILE, 0x03020A02); + return; + } + const UString itemName = srcPanel.GetItemName(index); + + UString srcPath = srcPanel._currentFolderPrefix + srcPanel.GetItemPrefix(index); + UString path = srcPath; + int destPanelIndex = (NumPanels <= 1) ? srcPanelIndex : (1 - srcPanelIndex); + CPanel &destPanel = Panels[destPanelIndex]; + if (NumPanels > 1) + if (destPanel.IsFSFolder()) + path = destPanel._currentFolderPrefix; + CSplitDialog splitDialog; + splitDialog.FilePath = srcPanel.GetItemRelPath(index); + splitDialog.Path = path; + if (splitDialog.Create(srcPanel.GetParent()) == IDCANCEL) + return; + + NFile::NFind::CFileInfoW fileInfo; + if (!fileInfo.Find(srcPath + itemName)) + { + srcPanel.MessageBoxMyError(L"Can not find file"); + return; + } + if (fileInfo.Size <= splitDialog.VolumeSizes.Front()) + { + srcPanel.MessageBoxErrorLang(IDS_SPLIT_VOL_MUST_BE_SMALLER, 0x03020522); + return; + } + const UInt64 numVolumes = GetNumberOfVolumes(fileInfo.Size, splitDialog.VolumeSizes); + if (numVolumes >= 100) + { + wchar_t s[32]; + ConvertUInt64ToString(numVolumes, s); + if (::MessageBoxW(srcPanel, MyFormatNew(IDS_SPLIT_CONFIRM_MESSAGE, 0x03020521, s), + LangString(IDS_SPLIT_CONFIRM_TITLE, 0x03020520), + MB_YESNOCANCEL | MB_ICONQUESTION) != IDYES) + return; + } + + path = splitDialog.Path; + NFile::NName::NormalizeDirPathPrefix(path); + if (!NFile::NDirectory::CreateComplexDirectory(path)) + { + srcPanel.MessageBoxMyError(MyFormatNew(IDS_CANNOT_CREATE_FOLDER, 0x02000603, path)); + return; + } + + { + CThreadSplit spliter; + spliter.NumVolumes = numVolumes; + + CProgressDialog &progressDialog = spliter.ProgressDialog; + + UString progressWindowTitle = LangString(IDS_APP_TITLE, 0x03000000); + UString title = LangString(IDS_SPLITTING, 0x03020510); + + progressDialog.ShowCompressionInfo = false; + + progressDialog.MainWindow = _window; + progressDialog.MainTitle = progressWindowTitle; + progressDialog.MainAddTitle = title + UString(L" "); + progressDialog.Sync.SetTitleFileName(itemName); + + + spliter.FilePath = srcPath + itemName; + spliter.VolBasePath = path + itemName; + spliter.VolumeSizes = splitDialog.VolumeSizes; + + // if (splitDialog.VolumeSizes.Size() == 0) return; + + // CPanel::CDisableTimerProcessing disableTimerProcessing1(srcPanel); + // CPanel::CDisableTimerProcessing disableTimerProcessing2(destPanel); + + if (spliter.Create(title, _window) != 0) + return; + } + RefreshTitleAlways(); + + + // disableTimerProcessing1.Restore(); + // disableTimerProcessing2.Restore(); + // srcPanel.SetFocusToList(); + // srcPanel.RefreshListCtrlSaveFocused(); +} + + +class CThreadCombine: public CProgressThreadVirt +{ + HRESULT ProcessVirt(); +public: + UString InputDirPrefix; + UStringVector Names; + UString OutputPath; + UInt64 TotalSize; +}; + +HRESULT CThreadCombine::ProcessVirt() +{ + NFile::NIO::COutFile outFile; + if (!outFile.Create(OutputPath, false)) + { + HRESULT res = GetLastError(); + ErrorPath1 = OutputPath; + return res; + } + + CProgressSync &sync = ProgressDialog.Sync; + sync.SetProgress(TotalSize, 0); + + CMyBuffer bufferObject; + if (!bufferObject.Allocate(kBufSize)) + return E_OUTOFMEMORY; + Byte *buffer = (Byte *)(void *)bufferObject; + UInt64 pos = 0; + for (int i = 0; i < Names.Size(); i++) + { + NFile::NIO::CInFile inFile; + const UString nextName = InputDirPrefix + Names[i]; + if (!inFile.Open(nextName)) + { + HRESULT res = GetLastError(); + ErrorPath1 = nextName; + return res; + } + sync.SetCurrentFileName(nextName); + for (;;) + { + UInt32 processedSize; + if (!inFile.Read(buffer, kBufSize, processedSize)) + { + HRESULT res = GetLastError(); + ErrorPath1 = nextName; + return res; + } + if (processedSize == 0) + break; + UInt32 needSize = processedSize; + if (!outFile.Write(buffer, needSize, processedSize)) + { + HRESULT res = GetLastError(); + ErrorPath1 = OutputPath; + return res; + } + if (needSize != processedSize) + throw g_Message_FileWriteError; + pos += processedSize; + RINOK(sync.SetPosAndCheckPaused(pos)); + } + } + return S_OK; +} + +extern void AddValuePair2(UINT resourceID, UInt32 langID, UInt64 num, UInt64 size, UString &s); + +static void AddInfoFileName(const UString &name, UString &dest) +{ + dest += L"\n "; + dest += name; +} + +void CApp::Combine() +{ + int srcPanelIndex = GetFocusedPanelIndex(); + CPanel &srcPanel = Panels[srcPanelIndex]; + if (!srcPanel.IsFSFolder()) + { + srcPanel.MessageBoxErrorLang(IDS_OPERATION_IS_NOT_SUPPORTED, 0x03020208); + return; + } + CRecordVector indices; + srcPanel.GetOperatedItemIndices(indices); + if (indices.IsEmpty()) + return; + int index = indices[0]; + if (indices.Size() != 1 || srcPanel.IsItemFolder(index)) + { + srcPanel.MessageBoxErrorLang(IDS_COMBINE_SELECT_ONE_FILE, 0x03020620); + return; + } + const UString itemName = srcPanel.GetItemName(index); + + UString srcPath = srcPanel._currentFolderPrefix + srcPanel.GetItemPrefix(index); + UString path = srcPath; + int destPanelIndex = (NumPanels <= 1) ? srcPanelIndex : (1 - srcPanelIndex); + CPanel &destPanel = Panels[destPanelIndex]; + if (NumPanels > 1) + if (destPanel.IsFSFolder()) + path = destPanel._currentFolderPrefix; + + CVolSeqName volSeqName; + if (!volSeqName.ParseName(itemName)) + { + srcPanel.MessageBoxErrorLang(IDS_COMBINE_CANT_DETECT_SPLIT_FILE, 0x03020621); + return; + } + + { + CThreadCombine combiner; + + UString nextName = itemName; + combiner.TotalSize = 0; + for (;;) + { + NFile::NFind::CFileInfoW fileInfo; + if (!fileInfo.Find(srcPath + nextName) || fileInfo.IsDir()) + break; + combiner.Names.Add(nextName); + combiner.TotalSize += fileInfo.Size; + nextName = volSeqName.GetNextName(); + } + if (combiner.Names.Size() == 1) + { + srcPanel.MessageBoxErrorLang(IDS_COMBINE_CANT_FIND_MORE_THAN_ONE_PART, 0x03020622); + return; + } + + if (combiner.TotalSize == 0) + { + srcPanel.MessageBoxMyError(L"No data"); + return; + } + + UString info; + AddValuePair2(IDS_FILES_COLON, 0x02000320, combiner.Names.Size(), combiner.TotalSize, info); + + info += L"\n"; + info += srcPath; + + int i; + for (i = 0; i < combiner.Names.Size() && i < 2; i++) + AddInfoFileName(combiner.Names[i], info); + if (i != combiner.Names.Size()) + { + if (i + 1 != combiner.Names.Size()) + AddInfoFileName(L"...", info); + AddInfoFileName(combiner.Names.Back(), info); + } + + { + CCopyDialog copyDialog; + copyDialog.Value = path; + copyDialog.Title = LangString(IDS_COMBINE, 0x03020600); + copyDialog.Title += ' '; + copyDialog.Title += srcPanel.GetItemRelPath(index); + copyDialog.Static = LangString(IDS_COMBINE_TO, 0x03020601); + copyDialog.Info = info; + if (copyDialog.Create(srcPanel.GetParent()) == IDCANCEL) + return; + path = copyDialog.Value; + } + + NFile::NName::NormalizeDirPathPrefix(path); + if (!NFile::NDirectory::CreateComplexDirectory(path)) + { + srcPanel.MessageBoxMyError(MyFormatNew(IDS_CANNOT_CREATE_FOLDER, 0x02000603, path)); + return; + } + + UString outName = volSeqName.UnchangedPart; + while (!outName.IsEmpty()) + { + int lastIndex = outName.Length() - 1; + if (outName[lastIndex] != L'.') + break; + outName.Delete(lastIndex); + } + if (outName.IsEmpty()) + outName = L"file"; + + NFile::NFind::CFileInfoW fileInfo; + UString destFilePath = path + outName; + combiner.OutputPath = destFilePath; + if (fileInfo.Find(destFilePath)) + { + srcPanel.MessageBoxMyError(MyFormatNew(IDS_FILE_EXIST, 0x03020A04, destFilePath)); + return; + } + + CProgressDialog &progressDialog = combiner.ProgressDialog; + progressDialog.ShowCompressionInfo = false; + + UString progressWindowTitle = LangString(IDS_APP_TITLE, 0x03000000); + UString title = LangString(IDS_COMBINING, 0x03020610); + + progressDialog.MainWindow = _window; + progressDialog.MainTitle = progressWindowTitle; + progressDialog.MainAddTitle = title + UString(L" "); + + combiner.InputDirPrefix = srcPath; + + // CPanel::CDisableTimerProcessing disableTimerProcessing1(srcPanel); + // CPanel::CDisableTimerProcessing disableTimerProcessing2(destPanel); + + if (combiner.Create(title, _window) != 0) + return; + } + RefreshTitleAlways(); + + // disableTimerProcessing1.Restore(); + // disableTimerProcessing2.Restore(); + // srcPanel.SetFocusToList(); + // srcPanel.RefreshListCtrlSaveFocused(); +} diff --git a/CPP/7zip/UI/FileManager/PasswordDialog.cpp b/CPP/7zip/UI/FileManager/PasswordDialog.cpp new file mode 100644 index 0000000..eaf90a2 --- /dev/null +++ b/CPP/7zip/UI/FileManager/PasswordDialog.cpp @@ -0,0 +1,51 @@ +// PasswordDialog.cpp + +#include "StdAfx.h" + +#include "PasswordDialog.h" + +#ifdef LANG +#include "LangUtils.h" +#endif + +#ifdef LANG +static CIDLangPair kIDLangPairs[] = +{ + { IDC_STATIC_PASSWORD_HEADER, 0x02000B01 }, + { IDC_CHECK_PASSWORD_SHOW, 0x02000B02 }, + { IDOK, 0x02000702 }, + { IDCANCEL, 0x02000710 } +}; +#endif + + +bool CPasswordDialog::OnInit() +{ + #ifdef LANG + LangSetWindowText(HWND(*this), 0x02000B00); + LangSetDlgItemsText(HWND(*this), kIDLangPairs, sizeof(kIDLangPairs) / sizeof(kIDLangPairs[0])); + #endif + _passwordControl.Attach(GetItem(IDC_EDIT_PASSWORD)); + _passwordControl.SetText(Password); + _passwordControl.SetPasswordChar(TEXT('*')); + return CModalDialog::OnInit(); +} + +bool CPasswordDialog::OnButtonClicked(int buttonID, HWND buttonHWND) +{ + if (buttonID == IDC_CHECK_PASSWORD_SHOW) + { + _passwordControl.SetPasswordChar(IsButtonCheckedBool(IDC_CHECK_PASSWORD_SHOW) ? 0: TEXT('*')); + UString password; + _passwordControl.GetText(password); + _passwordControl.SetText(password); + return true; + } + return CDialog::OnButtonClicked(buttonID, buttonHWND); +} + +void CPasswordDialog::OnOK() +{ + _passwordControl.GetText(Password); + CModalDialog::OnOK(); +} diff --git a/CPP/7zip/UI/FileManager/PasswordDialog.h b/CPP/7zip/UI/FileManager/PasswordDialog.h new file mode 100644 index 0000000..e5a9607 --- /dev/null +++ b/CPP/7zip/UI/FileManager/PasswordDialog.h @@ -0,0 +1,21 @@ +// PasswordDialog.h + +#ifndef __PASSWORDDIALOG_H +#define __PASSWORDDIALOG_H + +#include "Windows/Control/Dialog.h" +#include "Windows/Control/Edit.h" +#include "PasswordDialogRes.h" + +class CPasswordDialog: public NWindows::NControl::CModalDialog +{ + NWindows::NControl::CEdit _passwordControl; + virtual void OnOK(); + virtual bool OnInit(); + virtual bool OnButtonClicked(int buttonID, HWND buttonHWND); +public: + UString Password; + INT_PTR Create(HWND parentWindow = 0) { return CModalDialog::Create(IDD_DIALOG_PASSWORD, parentWindow); } +}; + +#endif diff --git a/CPP/7zip/UI/FileManager/PasswordDialogRes.h b/CPP/7zip/UI/FileManager/PasswordDialogRes.h new file mode 100644 index 0000000..e0b4266 --- /dev/null +++ b/CPP/7zip/UI/FileManager/PasswordDialogRes.h @@ -0,0 +1,4 @@ +#define IDD_DIALOG_PASSWORD 501 +#define IDC_STATIC_PASSWORD_HEADER 1000 +#define IDC_EDIT_PASSWORD 1001 +#define IDC_CHECK_PASSWORD_SHOW 1002 diff --git a/CPP/7zip/UI/FileManager/PasswordDialog_rc.cpp b/CPP/7zip/UI/FileManager/PasswordDialog_rc.cpp new file mode 100644 index 0000000..99e1e0b --- /dev/null +++ b/CPP/7zip/UI/FileManager/PasswordDialog_rc.cpp @@ -0,0 +1,66 @@ +// PasswordDialog.cpp + +#include "StdAfx.h" + +// For compilers that support precompilation, includes "wx/wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +// for all others, include the necessary headers (this file is usually all you +// need because it includes almost all "standard" wxWidgets headers) +#ifndef WX_PRECOMP + #include "wx/wx.h" +#endif + +#undef _WIN32 + +#include "Windows/Control/DialogImpl.h" + +#include "PasswordDialogRes.h" + +class CPasswordDialogImpl : public NWindows::NControl::CModalDialogImpl +{ + public: + CPasswordDialogImpl(NWindows::NControl::CModalDialog *dialog,wxWindow * parent,int id) : CModalDialogImpl(dialog, parent, id, wxT("Enter password")) + { + bool bShowPassword = false; + + wxBoxSizer* topsizer = new wxBoxSizer(wxVERTICAL); + + { + wxStaticBoxSizer *passwdSizer = new wxStaticBoxSizer(new wxStaticBox(this,IDC_STATIC_PASSWORD_HEADER,_T("&Enter password:")),wxVERTICAL); + + wxTextCtrl *TxtPasswd = new wxTextCtrl(this, IDC_EDIT_PASSWORD, L"", + wxDefaultPosition, wxSize(260,-1), bShowPassword?wxTE_LEFT:wxTE_PASSWORD ); + + wxCheckBox *ChkShowPasswd = new wxCheckBox(this, IDC_CHECK_PASSWORD_SHOW, wxT("&Show password")); + + ChkShowPasswd->SetValue(bShowPassword); + passwdSizer->Add(TxtPasswd, 0, wxALL, 5); + passwdSizer->Add(ChkShowPasswd, 0, wxALL, 5); + + topsizer->Add(passwdSizer, 0, wxALL, 5); + } + topsizer->Add(CreateButtonSizer(wxOK|wxCANCEL), 0, wxALL|wxEXPAND, 5); + + this->OnInit(); + + SetSizer(topsizer); // use the sizer for layout + topsizer->SetSizeHints(this); // set size hints to honour minimum size + } +private: + // Any class wishing to process wxWindows events must use this macro + DECLARE_EVENT_TABLE() +}; + +REGISTER_DIALOG(IDD_DIALOG_PASSWORD,CPasswordDialog,0) + +BEGIN_EVENT_TABLE(CPasswordDialogImpl, wxDialog) + EVT_BUTTON(wxID_ANY, CModalDialogImpl::OnAnyButton) + EVT_CHECKBOX(wxID_ANY, CModalDialogImpl::OnAnyButton) + EVT_MENU(WORKER_EVENT, CModalDialogImpl::OnWorkerEvent) +END_EVENT_TABLE() + diff --git a/CPP/7zip/UI/FileManager/PluginInterface.h b/CPP/7zip/UI/FileManager/PluginInterface.h new file mode 100644 index 0000000..72711fd --- /dev/null +++ b/CPP/7zip/UI/FileManager/PluginInterface.h @@ -0,0 +1,31 @@ +// PluginInterface.h + +#ifndef __PLUGIN_INTERFACE_H +#define __PLUGIN_INTERFACE_H + +/* +#include "../../../Common/Types.h" +#include "../../IDecl.h" + +#define PLUGIN_INTERFACE(i, x) DECL_INTERFACE(i, 0x0A, x) + +PLUGIN_INTERFACE(IInitContextMenu, 0x00) +{ + STDMETHOD(InitContextMenu)(const wchar_t *folder, const wchar_t **names, UINT32 numFiles) PURE; +}; + +PLUGIN_INTERFACE(IPluginOptionsCallback, 0x01) +{ + STDMETHOD(GetProgramFolderPath)(BSTR *value) PURE; + STDMETHOD(GetProgramPath)(BSTR *value) PURE; + STDMETHOD(GetRegistryCUPath)(BSTR *value) PURE; +}; + +PLUGIN_INTERFACE(IPluginOptions, 0x02) +{ + STDMETHOD(PluginOptions)(HWND hWnd, IPluginOptionsCallback *callback) PURE; + // STDMETHOD(GetFileExtensions)(BSTR *extensions) PURE; +}; +*/ + +#endif diff --git a/CPP/7zip/UI/FileManager/PluginLoader.h b/CPP/7zip/UI/FileManager/PluginLoader.h new file mode 100644 index 0000000..3cf15aa --- /dev/null +++ b/CPP/7zip/UI/FileManager/PluginLoader.h @@ -0,0 +1,28 @@ +// PluginLoader.h + +#ifndef __PLUGIN_LOADER_H +#define __PLUGIN_LOADER_H + +#include "Windows/DLL.h" + +typedef UINT32 (WINAPI * CreateObjectPointer)(const GUID *clsID, const GUID *interfaceID, void **outObject); + +class CPluginLibrary: public NWindows::NDLL::CLibrary +{ +public: + HRESULT CreateManager(REFGUID clsID, IFolderManager **manager) + { + CreateObjectPointer createObject = (CreateObjectPointer)GetProc("CreateObject"); + if (createObject == NULL) + return GetLastError(); + return createObject(&clsID, &IID_IFolderManager, (void **)manager); + } + HRESULT LoadAndCreateManager(LPCWSTR filePath, REFGUID clsID, IFolderManager **manager) + { + if (!Load(filePath)) + return GetLastError(); + return CreateManager(clsID, manager); + } +}; + +#endif diff --git a/CPP/7zip/UI/FileManager/ProgramLocation.cpp b/CPP/7zip/UI/FileManager/ProgramLocation.cpp new file mode 100644 index 0000000..ea8afd5 --- /dev/null +++ b/CPP/7zip/UI/FileManager/ProgramLocation.cpp @@ -0,0 +1,20 @@ +// ProgramLocation.h + +#include "StdAfx.h" + +#include "ProgramLocation.h" + +// #include "Windows/FileName.h" +#include "Common/StringConvert.h" + + +bool GetProgramFolderPath(UString &folder) +{ + const char *p7zip_home_dir = getenv("P7ZIP_HOME_DIR"); + if (p7zip_home_dir == 0) p7zip_home_dir="./"; + + folder = MultiByteToUnicodeString(p7zip_home_dir); + + return true; +} + diff --git a/CPP/7zip/UI/FileManager/ProgramLocation.h b/CPP/7zip/UI/FileManager/ProgramLocation.h new file mode 100644 index 0000000..55c5614 --- /dev/null +++ b/CPP/7zip/UI/FileManager/ProgramLocation.h @@ -0,0 +1,10 @@ +// ProgramLocation.h + +#ifndef __PROGRAM_LOCATION_H +#define __PROGRAM_LOCATION_H + +#include "Common/MyString.h" + +bool GetProgramFolderPath(UString &folder); // normalized + +#endif diff --git a/CPP/7zip/UI/FileManager/ProgressDialog2.cpp b/CPP/7zip/UI/FileManager/ProgressDialog2.cpp new file mode 100644 index 0000000..450ed00 --- /dev/null +++ b/CPP/7zip/UI/FileManager/ProgressDialog2.cpp @@ -0,0 +1,1049 @@ +// ProgressDialog2.cpp + +#include "StdAfx.h" + +#include "Common/IntToString.h" +#include "Common/StringConvert.h" + +#include "Windows/Control/Static.h" +#include "Windows/Error.h" + +#include "ProgressDialog2.h" +#include "DialogSize.h" + +#include "ProgressDialog2Res.h" + +#include "../GUI/ExtractRes.h" + +using namespace NWindows; + +extern HINSTANCE g_hInstance; + +static const UINT_PTR kTimerID = 3; + +static const UINT kCloseMessage = WM_USER + 1; + +static const UINT kTimerElapse = + #ifdef UNDER_CE + 500 + #else + 100 + #endif + ; + +#include "LangUtils.h" + +#ifdef LANG +static CIDLangPair kIDLangPairs[] = +{ + { IDCANCEL, 0x02000C00 }, + { IDC_PROGRESS_ELAPSED, 0x02000C01 }, + { IDC_PROGRESS_REMAINING, 0x02000C02 }, + { IDC_PROGRESS_TOTAL, 0x02000C03 }, + { IDC_PROGRESS_SPEED, 0x02000C04 }, + { IDC_PROGRESS_UNPACKED, 0x02000C05 }, + { IDC_PROGRESS_PACKED, 0x02000323 }, + { IDC_PROGRESS_RATIO, 0x02000C06 }, + { IDC_PROGRESS_SPEED, 0x02000C04 }, + { IDC_PROGRESS_FILES, 0x02000320 }, + { IDC_PROGRESS_ERRORS, 0x0308000A }, + { IDC_BUTTON_PROGRESS_PRIORITY, 0x02000C10 }, + { IDC_BUTTON_PAUSE, 0x02000C12 }, + { IDCANCEL, 0x02000711 }, +}; +#endif + +HRESULT CProgressSync::ProcessStopAndPause() +{ + for (;;) + { + if (GetStopped()) + return E_ABORT; + if (!GetPaused()) + break; + ::Sleep(100); + } + return S_OK; +} + +HRESULT CProgressSync::SetPosAndCheckPaused(UInt64 completed) +{ + RINOK(ProcessStopAndPause()); + SetPos(completed); + return S_OK; +} + + +CProgressDialog::CProgressDialog(): _timer(0), CompressingMode(true) + #ifndef _SFX + , MainWindow(0) + #endif + { + IconID = -1; + MessagesDisplayed = false; + _wasCreated = false; + _needClose = false; + _inCancelMessageBox = false; + _externalCloseMessageWasReceived = false; + + _numPostedMessages = 0; + _numAutoSizeMessages = 0; + _errorsWereDisplayed = false; + _waitCloseByCancelButton = false; + _cancelWasPressed = false; + ShowCompressionInfo = true; + // FIXME not supported WaitMode = false; + if (_dialogCreatedEvent.Create() != S_OK) + throw 1334987; + if (_createDialogEvent.Create() != S_OK) + throw 1334987; + } + +#ifndef _SFX +CProgressDialog::~CProgressDialog() +{ + AddToTitle(L""); +} +void CProgressDialog::AddToTitle(LPCWSTR s) +{ + if (MainWindow != 0) + { + CWindow window(MainWindow); + window.SetText(s + UString(MainTitle)); + } +} + +#endif + +static const int kTitleFileNameSizeLimit = 36; +static const int kCurrentFileNameSizeLimit = 82; + +static void ReduceString(UString &s, int size) +{ + if (s.Length() > size) + s = s.Left(size / 2) + UString(L" ... ") + s.Right(size / 2); +} + +void CProgressDialog::EnableErrorsControls(bool enable) +{ + int cmdShow = enable ? SW_SHOW : SW_HIDE; + ShowItem(IDC_PROGRESS_ERRORS, cmdShow); + ShowItem(IDC_PROGRESS_ERRORS_VALUE, cmdShow); + ShowItem(IDC_PROGRESS_LIST, cmdShow); +} + +bool CProgressDialog::OnInit() +{ + _range = (UInt64)(Int64)-1; + _prevPercentValue = (UInt32)-1; + _prevElapsedSec = (UInt32)-1; + _prevRemainingSec = (UInt32)-1; + _prevSpeed = (UInt32)-1; + _prevMode = kSpeedBytes; + _prevTime = ::GetTickCount(); + _elapsedTime = 0; + _foreground = true; + + m_ProgressBar.Attach(GetItem(IDC_PROGRESS1)); + // FIXME _messageList.Attach(GetItem(IDC_PROGRESS_LIST)); + + _wasCreated = true; + _dialogCreatedEvent.Set(); + + #ifdef LANG + LangSetDlgItemsText(HWND(*this), kIDLangPairs, sizeof(kIDLangPairs) / sizeof(kIDLangPairs[0])); + #endif + + + CWindow window(GetItem(IDC_BUTTON_PROGRESS_PRIORITY)); + window.GetText(backgroundString); + backgroundedString = backgroundString; + backgroundedString.Replace(L"&", L""); + + window = GetItem(IDC_BUTTON_PAUSE); + window.GetText(pauseString); + + foregroundString = LangStringSpec(IDS_PROGRESS_FOREGROUND, 0x02000C11); + continueString = LangStringSpec(IDS_PROGRESS_CONTINUE, 0x02000C13); + pausedString = LangStringSpec(IDS_PROGRESS_PAUSED, 0x02000C20); + + SetText(_title); + SetPauseText(); + SetPriorityText(); + + + #ifndef UNDER_CE + // FIXME _messageList.SetUnicodeFormat(true); + #endif + + // FIXME _messageList.InsertColumn(0, L"", 30); + + const UString s = LangStringSpec(IDS_MESSAGES_DIALOG_MESSAGE_COLUMN, 0x02000A80); + + // FIXME _messageList.InsertColumn(1, s, 600); + + // FIXME _messageList.SetColumnWidthAuto(0); + // FIXME _messageList.SetColumnWidthAuto(1); + + + EnableErrorsControls(false); + +#ifdef _WIN32 + GetItemSizes(IDCANCEL, buttonSizeX, buttonSizeY); +#endif + _numReduceSymbols = kCurrentFileNameSizeLimit; + NormalizeSize(true); + + if (!ShowCompressionInfo) + { + HideItem(IDC_PROGRESS_PACKED); + HideItem(IDC_PROGRESS_PACKED_VALUE); + HideItem(IDC_PROGRESS_RATIO); + HideItem(IDC_PROGRESS_RATIO_VALUE); + } + +#ifdef _WIN32 + if (IconID >= 0) + { + HICON icon = LoadIcon(g_hInstance, MAKEINTRESOURCE(IconID)); + // SetIcon(ICON_SMALL, icon); + SetIcon(ICON_BIG, icon); + } +#endif + _timer = SetTimer(kTimerID, kTimerElapse); + #ifdef UNDER_CE + Foreground(); + #endif + + CheckNeedClose(); + + return CModalDialog::OnInit(); +} + +bool CProgressDialog::OnSize(WPARAM /* wParam */, int xSize, int ySize) +{ +#ifdef _WIN32 + int sY; + int sStep; + int mx, my; + { + RECT rect; + GetClientRectOfItem(IDC_PROGRESS_ELAPSED, rect); + mx = rect.left; + my = rect.top; + sY = rect.bottom - rect.top; + GetClientRectOfItem(IDC_PROGRESS_REMAINING, rect); + sStep = rect.top - my; + } + + + InvalidateRect(NULL); + + int xSizeClient = xSize - mx * 2; + + { + int i; + for (i = 800; i > 40; i = i * 9 / 10) + if (Units_To_Pixels_X(i) <= xSizeClient) + break; + _numReduceSymbols = i / 4; + } + + int yPos = ySize - my - buttonSizeY; + + ChangeSubWindowSizeX(GetItem(IDC_PROGRESS_FILE_NAME), xSize - mx * 2); + ChangeSubWindowSizeX(GetItem(IDC_PROGRESS1), xSize - mx * 2); + + int bSizeX = buttonSizeX; + int mx2 = mx; + for (;; mx2--) + { + int bSize2 = bSizeX * 3 + mx2 * 2; + if (bSize2 <= xSizeClient) + break; + if (mx2 < 5) + { + bSizeX = (xSizeClient - mx2 * 2) / 3; + break; + } + } + if (bSizeX < 2) + bSizeX = 2; + + { + RECT rect; + GetClientRectOfItem(IDC_PROGRESS_LIST, rect); + int y = rect.top; + int ySize2 = yPos - my - y; + const int kMinYSize = buttonSizeY + buttonSizeY * 3 / 4; + int xx = xSize - mx * 2; + if (ySize2 < kMinYSize) + { + ySize2 = kMinYSize; + if (xx > bSizeX * 2) + xx -= bSizeX; + } + + // FIXME _messageList.Move(mx, y, xx, ySize2); + } + + { + int xPos = xSize - mx; + xPos -= bSizeX; + MoveItem(IDCANCEL, xPos, yPos, bSizeX, buttonSizeY); + xPos -= (mx2 + bSizeX); + MoveItem(IDC_BUTTON_PAUSE, xPos, yPos, bSizeX, buttonSizeY); + xPos -= (mx2 + bSizeX); + MoveItem(IDC_BUTTON_PROGRESS_PRIORITY, xPos, yPos, bSizeX, buttonSizeY); + } + + int valueSize; + int labelSize; + int padSize; + + labelSize = Units_To_Pixels_X(MY_PROGRESS_LABEL_UNITS_MIN); + valueSize = Units_To_Pixels_X(MY_PROGRESS_VALUE_UNITS); + padSize = Units_To_Pixels_X(MY_PROGRESS_PAD_UNITS); + int requiredSize = (labelSize + valueSize) * 2 + padSize; + + int gSize; + { + if (requiredSize < xSizeClient) + { + int incr = (xSizeClient - requiredSize) / 3; + labelSize += incr; + } + else + labelSize = (xSizeClient - valueSize * 2 - padSize) / 2; + if (labelSize < 0) + labelSize = 0; + + gSize = labelSize + valueSize; + padSize = xSizeClient - gSize * 2; + } + + labelSize = gSize - valueSize; + + UINT IDs[] = + { + IDC_PROGRESS_ELAPSED, IDC_PROGRESS_ELAPSED_VALUE, + IDC_PROGRESS_REMAINING, IDC_PROGRESS_REMAINING_VALUE, + IDC_PROGRESS_FILES, IDC_PROGRESS_FILES_VALUE, + IDC_PROGRESS_RATIO, IDC_PROGRESS_RATIO_VALUE, + IDC_PROGRESS_ERRORS, IDC_PROGRESS_ERRORS_VALUE, + + IDC_PROGRESS_TOTAL, IDC_PROGRESS_TOTAL_VALUE, + IDC_PROGRESS_SPEED, IDC_PROGRESS_SPEED_VALUE, + IDC_PROGRESS_UNPACKED, IDC_PROGRESS_UNPACKED_VALUE, + IDC_PROGRESS_PACKED, IDC_PROGRESS_PACKED_VALUE + }; + + yPos = my; + for (int i = 0; i < sizeof(IDs) / sizeof(IDs[0]); i += 2) + { + int x = mx; + const int kNumColumn1Items = 5 * 2; + if (i >= kNumColumn1Items) + { + if (i == kNumColumn1Items) + yPos = my; + x = mx + gSize + padSize; + } + MoveItem(IDs[i], x, yPos, labelSize, sY); + MoveItem(IDs[i + 1], x + labelSize, yPos, valueSize, sY); + yPos += sStep; + } +#endif // ifdef _WIN32 + return false; +} + +void CProgressDialog::OnCancel() { Sync.SetStopped(true); } +void CProgressDialog::OnOK() { } + +static void ConvertSizeToString(UInt64 value, wchar_t *s) +{ + const wchar_t *kModif = L" KM"; + for (int i = 0; ; i++) + if (i == 2 || value < (UInt64(10000) << (i * 10))) + { + ConvertUInt64ToString(value >> (i * 10), s); + s += wcslen(s); + *s++ = ' '; + if (i != 0) + *s++ = kModif[i]; + *s++ = L'B'; + *s++ = L'\0'; + return; + } +} + +void CProgressDialog::SetRange(UInt64 range) +{ + _range = range; + _previousPos = (UInt64)(Int64)-1; + _converter.Init(range); + m_ProgressBar.SetRange32(0, _converter.Count(range)); +} + +void CProgressDialog::SetPos(UInt64 pos) +{ + bool redraw = true; + if (pos < _range && pos > _previousPos) + { + if (pos - _previousPos < (_range >> 10)) + redraw = false; + } + if(redraw) + { + m_ProgressBar.SetPos(_converter.Count(pos)); // Test it for 100% + _previousPos = pos; + } +} + +static void GetTimeString(UInt64 timeValue, TCHAR *s) +{ + wsprintf(s, TEXT("%02d:%02d:%02d"), + UInt32(timeValue / 3600), + UInt32((timeValue / 60) % 60), + UInt32(timeValue % 60)); +} + +void CProgressDialog::ShowSize(int id, UInt64 value) +{ + wchar_t s[40]; + s[0] = 0; + if (value != (UInt64)(Int64)-1) + ConvertSizeToString(value, s); + SetItemText(id, s); +} + +void CProgressDialog::UpdateStatInfo(bool showAll) +{ + UInt64 total, completed, totalFiles, completedFiles, inSize, outSize; + bool bytesProgressMode; + Sync.GetProgress(total, completed, totalFiles, completedFiles, inSize, outSize, bytesProgressMode); + + UInt32 curTime = ::GetTickCount(); + + UInt64 progressTotal = bytesProgressMode ? total : totalFiles; + UInt64 progressCompleted = bytesProgressMode ? completed : completedFiles; + + if (progressTotal != _range) + SetRange(progressTotal); + if (progressTotal == (UInt64)(Int64)-1) + { + SetPos(0); + SetRange(progressCompleted); + } + else + SetPos(progressCompleted); + + wchar_t s[32] = { 0 }; + if (total != (UInt64)(Int64)-1) + ConvertSizeToString(total, s); + SetItemText(IDC_PROGRESS_TOTAL_VALUE, s); + + _elapsedTime += (curTime - _prevTime); + _prevTime = curTime; + + UInt32 elapsedSec = _elapsedTime / 1000; + + bool elapsedChanged = false; + if (elapsedSec != _prevElapsedSec) + { + TCHAR s[40]; + GetTimeString(elapsedSec, s); + SetItemText(IDC_PROGRESS_ELAPSED_VALUE, s); + _prevElapsedSec = elapsedSec; + elapsedChanged = true; + } + + if (elapsedChanged || showAll) + { + { + UInt64 numErrors; + + { + NWindows::NSynchronization::CCriticalSectionLock lock(Sync._cs); + numErrors = Sync.Messages.Size(); + } + if (numErrors > 0) + { + UpdateMessagesDialog(); + TCHAR s[40]; + ConvertUInt64ToString(numErrors, s); + SetItemText(IDC_PROGRESS_ERRORS_VALUE, s); + if (!_errorsWereDisplayed) + { + _errorsWereDisplayed = true; + EnableErrorsControls(true); + } + } + } + + if (completed != 0) + { + + if (total == (UInt64)(Int64)-1) + { + SetItemText(IDC_PROGRESS_REMAINING_VALUE, L""); + } + else + { + UInt64 remainingTime = 0; + if (completed < total) + remainingTime = _elapsedTime * (total - completed) / completed; + UInt64 remainingSec = remainingTime / 1000; + if (remainingSec != _prevRemainingSec) + { + TCHAR s[40]; + GetTimeString(remainingSec, s); + SetItemText(IDC_PROGRESS_REMAINING_VALUE, s); + _prevRemainingSec = remainingSec; + } + } + { + UInt32 elapsedTime = (_elapsedTime == 0) ? 1 : _elapsedTime; + UInt64 speedB = (completed * 1000) / elapsedTime; + UInt64 speedKB = speedB / 1024; + UInt64 speedMB = speedKB / 1024; + const UInt32 kLimit1 = 10; + TCHAR s[40]; + bool needRedraw = false; + if (speedMB >= kLimit1) + { + if (_prevMode != kSpeedMBytes || speedMB != _prevSpeed) + { + ConvertUInt64ToString(speedMB, s); + lstrcat(s, TEXT(" MB/s")); + _prevMode = kSpeedMBytes; + _prevSpeed = speedMB; + needRedraw = true; + } + } + else if (speedKB >= kLimit1) + { + if (_prevMode != kSpeedKBytes || speedKB != _prevSpeed) + { + ConvertUInt64ToString(speedKB, s); + lstrcat(s, TEXT(" KB/s")); + _prevMode = kSpeedKBytes; + _prevSpeed = speedKB; + needRedraw = true; + } + } + else + { + if (_prevMode != kSpeedBytes || speedB != _prevSpeed) + { + ConvertUInt64ToString(speedB, s); + lstrcat(s, TEXT(" B/s")); + _prevMode = kSpeedBytes; + _prevSpeed = speedB; + needRedraw = true; + } + } + if (needRedraw) + SetItemText(IDC_PROGRESS_SPEED_VALUE, s); + } + } + + if (total == 0) + total = 1; + UInt32 percentValue = (UInt32)(completed * 100 / total); + UString titleName; + Sync.GetTitleFileName(titleName); + if (percentValue != _prevPercentValue || _prevTitleName != titleName) + { + _prevPercentValue = percentValue; + SetTitleText(); + _prevTitleName = titleName; + } + + TCHAR s[64]; + ConvertUInt64ToString(completedFiles, s); + if (totalFiles != (UInt64)(Int64)-1) + { + lstrcat(s, TEXT(" / ")); + ConvertUInt64ToString(totalFiles, s + lstrlen(s)); + } + + SetItemText(IDC_PROGRESS_FILES_VALUE, s); + + const UInt64 packSize = CompressingMode ? outSize : inSize; + const UInt64 unpackSize = CompressingMode ? inSize : outSize; + + if (unpackSize == (UInt64)(Int64)-1 && packSize == (UInt64)(Int64)-1) + { + ShowSize(IDC_PROGRESS_UNPACKED_VALUE, completed); + SetItemText(IDC_PROGRESS_PACKED_VALUE, L""); + } + else + { + ShowSize(IDC_PROGRESS_UNPACKED_VALUE, unpackSize); + ShowSize(IDC_PROGRESS_PACKED_VALUE, packSize); + + if (packSize != (UInt64)(Int64)-1 && unpackSize != (UInt64)(Int64)-1 && unpackSize != 0) + { + UInt64 ratio = packSize * 100 / unpackSize; + ConvertUInt64ToString(ratio, s); + lstrcat(s, TEXT("%")); + SetItemText(IDC_PROGRESS_RATIO_VALUE, s); + } + } + } + + + UString fileName; + Sync.GetCurrentFileName(fileName); + if (_prevFileName != fileName) + { + int slashPos = fileName.ReverseFind(WCHAR_PATH_SEPARATOR); + UString s1, s2; + if (slashPos >= 0) + { + s1 = fileName.Left(slashPos + 1); + s2 = fileName.Mid(slashPos + 1); + } + else + s2 = fileName; + ReduceString(s1, _numReduceSymbols); + ReduceString(s2, _numReduceSymbols); + UString s = s1 + L"\n" + s2; + SetItemText(IDC_PROGRESS_FILE_NAME, s); + _prevFileName == fileName; + } +} + +bool CProgressDialog::OnTimer(WPARAM /* timerID */, LPARAM /* callback */) +{ + if (Sync.GetPaused()) + return true; + + CheckNeedClose(); + + UpdateStatInfo(false); + return true; +} + +#ifdef _WIN32 // FIXME +struct CWaitCursor +{ + HCURSOR _waitCursor; + HCURSOR _oldCursor; + CWaitCursor() + { + _waitCursor = LoadCursor(NULL, IDC_WAIT); + if (_waitCursor != NULL) + _oldCursor = SetCursor(_waitCursor); + } + ~CWaitCursor() + { + if (_waitCursor != NULL) + SetCursor(_oldCursor); + } +}; +#endif + +INT_PTR CProgressDialog::Create(const UString &title, NWindows::CThread &thread, HWND wndParent) +{ + INT_PTR res = 0; + try + { +#ifdef _WIN32 + if (WaitMode) + { + CWaitCursor waitCursor; + HANDLE h[] = { thread, _createDialogEvent }; + + WRes res = WaitForMultipleObjects(sizeof(h) / sizeof(h[0]), h, FALSE, + #ifdef UNDER_CE + 2500 + #else + 1000 + #endif + ); + if (res == WAIT_OBJECT_0 && !Sync.ThereIsMessage()) + return 0; + } +#endif + _title = title; + BIG_DIALOG_SIZE(360, 192); + res = CModalDialog::Create(SIZED_DIALOG(IDD_DIALOG_PROGRESS), wndParent); + } + catch(...) + { + _wasCreated = true; + _dialogCreatedEvent.Set(); + res = res; + } + thread.Wait(); + if (!MessagesDisplayed) + MessageBoxW(wndParent, L"Progress Error", L"7-Zip", MB_ICONERROR | MB_OK); + return res; +} + +bool CProgressDialog::OnExternalCloseMessage() +{ + UpdateStatInfo(true); + + HideItem(IDC_BUTTON_PROGRESS_PRIORITY); + HideItem(IDC_BUTTON_PAUSE); + SetItemText(IDCANCEL, LangStringSpec(IDS_CLOSE, 0x02000713)); + + bool thereAreMessages; + UString okMessage; + UString okMessageTitle; + UString errorMessage; + UString errorMessageTitle; + { + NWindows::NSynchronization::CCriticalSectionLock lock(Sync._cs); + errorMessage = Sync.ErrorMessage; + errorMessageTitle = Sync.ErrorMessageTitle; + okMessage = Sync.OkMessage; + okMessageTitle = Sync.OkMessageTitle; + thereAreMessages = !Sync.Messages.IsEmpty(); + } + if (!errorMessage.IsEmpty()) + { + MessagesDisplayed = true; + if (errorMessageTitle.IsEmpty()) + errorMessageTitle = L"7-Zip"; + MessageBoxW(*this, errorMessage, errorMessageTitle, MB_ICONERROR | MB_OK); + } + else if (!thereAreMessages) + { + MessagesDisplayed = true; + if (!okMessage.IsEmpty()) + { + if (okMessageTitle.IsEmpty()) + okMessageTitle = L"7-Zip"; + MessageBoxW(*this, okMessage, okMessageTitle, MB_OK); + } + } + + if (thereAreMessages && !_cancelWasPressed) + { + +#ifdef _WIN32 + _waitCloseByCancelButton = true; + UpdateMessagesDialog(); + return true; +#else + + // FIXME : p7zip does not have a messages zone + // FIXME : even if so, the close button does not close the main window + // So p7zip uses a MessageBoxW ... + UStringVector messages; + { + NWindows::NSynchronization::CCriticalSectionLock lock(Sync._cs); + for (int i = 0; i < Sync.Messages.Size(); i++) + messages.Add(Sync.Messages[i]); + _numPostedMessages = Sync.Messages.Size(); + } + + if (!messages.IsEmpty()) + { + for (int i = 0; i < messages.Size(); i++) + errorMessage = errorMessage + messages[i] + L"\n"; + } + else + errorMessage = L"Error(s) in the archive"; + + MessageBoxW(*this, errorMessage, L"7-Zip - ERROR", MB_ICONERROR | MB_OK); + + MessagesDisplayed = true; + +#endif + } + + End(0); + return true; +} + +bool CProgressDialog::OnMessage(UINT message, WPARAM wParam, LPARAM lParam) +{ + switch(message) + { + case kCloseMessage: + { + KillTimer(_timer); + _timer = 0; + if (_inCancelMessageBox) + { + _externalCloseMessageWasReceived = true; + break; + } + return OnExternalCloseMessage(); + } + /* + case WM_SETTEXT: + { + if (_timer == 0) + return true; + break; + } + */ + } + return CModalDialog::OnMessage(message, wParam, lParam); +} + +void CProgressDialog::SetTitleText() +{ + UString title; + if (Sync.GetPaused()) + { + title = pausedString; + title += L' '; + } + if (_prevPercentValue != (UInt32)-1) + { + wchar_t s[64]; + ConvertUInt64ToString(_prevPercentValue, s); + title += s; + title += L'%'; + } + if (!_foreground) + { + title += L' '; + title += backgroundedString; + } + title += L' '; + UString totalTitle = title + _title; + UString fileName; + Sync.GetTitleFileName(fileName); + if (!fileName.IsEmpty()) + { + ReduceString(fileName, kTitleFileNameSizeLimit); + totalTitle += L' '; + totalTitle += fileName; + } + SetText(totalTitle); + #ifndef _SFX + AddToTitle(title + MainAddTitle); + #endif +} + +void CProgressDialog::SetPauseText() +{ + SetItemText(IDC_BUTTON_PAUSE, Sync.GetPaused() ? + continueString : pauseString); + SetTitleText(); +} + +void CProgressDialog::OnPauseButton() +{ + bool paused = !Sync.GetPaused(); + Sync.SetPaused(paused); + UInt32 curTime = ::GetTickCount(); + if (paused) + _elapsedTime += (curTime - _prevTime); + _prevTime = curTime; + SetPauseText(); +} + +void CProgressDialog::SetPriorityText() +{ + SetItemText(IDC_BUTTON_PROGRESS_PRIORITY, _foreground ? + backgroundString : + foregroundString); + SetTitleText(); +} + +void CProgressDialog::OnPriorityButton() +{ + _foreground = !_foreground; + #ifndef UNDER_CE + SetPriorityClass(GetCurrentProcess(), _foreground ? + NORMAL_PRIORITY_CLASS: IDLE_PRIORITY_CLASS); + #endif + SetPriorityText(); +} + +void CProgressDialog::AddMessageDirect(LPCWSTR message) +{ +#ifdef _WIN32 // FIXME + int itemIndex = _messageList.GetItemCount(); + wchar_t sz[32]; + ConvertInt64ToString(itemIndex, sz); + _messageList.InsertItem(itemIndex, sz); + _messageList.SetSubItem(itemIndex, 1, message); +#endif +} + +void CProgressDialog::AddMessage(LPCWSTR message) +{ + UString s = message; + while (!s.IsEmpty()) + { + int pos = s.Find(L'\n'); + if (pos < 0) + break; + AddMessageDirect(s.Left(pos)); + s.Delete(0, pos + 1); + } + AddMessageDirect(s); +} + +static unsigned GetNumDigits(UInt32 value) +{ + unsigned i; + for (i = 0; value >= 10; i++) + value /= 10; + return i; +} + +void CProgressDialog::UpdateMessagesDialog() +{ + UStringVector messages; + { + NWindows::NSynchronization::CCriticalSectionLock lock(Sync._cs); + for (int i = _numPostedMessages; i < Sync.Messages.Size(); i++) + messages.Add(Sync.Messages[i]); + _numPostedMessages = Sync.Messages.Size(); + } + if (!messages.IsEmpty()) + { + for (int i = 0; i < messages.Size(); i++) + AddMessage(messages[i]); + if (_numAutoSizeMessages < 256 || GetNumDigits(_numPostedMessages) > GetNumDigits(_numAutoSizeMessages)) + { + // FIXME_messageList.SetColumnWidthAuto(0); + // FIXME_messageList.SetColumnWidthAuto(1); + _numAutoSizeMessages = _numPostedMessages; + } + } +} + + +bool CProgressDialog::OnButtonClicked(int buttonID, HWND buttonHWND) +{ + switch(buttonID) + { + // case IDOK: // if IDCANCEL is not DEFPUSHBUTTON + case IDCANCEL: + { + if (_waitCloseByCancelButton) + { + MessagesDisplayed = true; + End(IDCLOSE); + break; + } + + bool paused = Sync.GetPaused(); + if (!paused) + OnPauseButton(); + _inCancelMessageBox = true; + int res = ::MessageBoxW(HWND(*this), + LangStringSpec(IDS_PROGRESS_ASK_CANCEL, 0x02000C30), + _title, MB_YESNOCANCEL); + _inCancelMessageBox = false; + if (!paused) + OnPauseButton(); + if (res == IDCANCEL || res == IDNO) + { + if (_externalCloseMessageWasReceived) + OnExternalCloseMessage(); + return true; + } + + _cancelWasPressed = true; + MessagesDisplayed = true; + break; + } + + case IDC_BUTTON_PAUSE: + OnPauseButton(); + return true; + case IDC_BUTTON_PROGRESS_PRIORITY: + OnPriorityButton(); + return true; + } + return CModalDialog::OnButtonClicked(buttonID, buttonHWND); +} + +void CProgressDialog::CheckNeedClose() +{ + if (_needClose) + { + PostMessage(kCloseMessage); + _needClose = false; + } +} + +void CProgressDialog::ProcessWasFinished() +{ + // Set Window title here. + // FIXME - not supported if (!WaitMode) + WaitCreating(); + + if (_wasCreated) + PostMessage(kCloseMessage); + else + _needClose = true; +} + + +HRESULT CProgressThreadVirt::Create(const UString &title, HWND parentWindow) +{ + NWindows::CThread thread; + RINOK(thread.Create(MyThreadFunction, this)); + ProgressDialog.Create(title, thread, parentWindow); + return S_OK; +} + +UString HResultToMessage(HRESULT errorCode) +{ + UString message; + if (errorCode == E_OUTOFMEMORY) + message = LangStringSpec(IDS_MEM_ERROR, 0x0200060B); + else if (!NError::MyFormatMessage(errorCode, message)) + message.Empty(); + if (message.IsEmpty()) + message = L"Error"; + return message; +} + +static void AddMessageToString(UString &dest, const UString &src) +{ + if (!src.IsEmpty()) + { + if (!dest.IsEmpty()) + dest += L'\n'; + dest += src; + } +} + +void CProgressThreadVirt::Process() +{ + CProgressCloser closer(ProgressDialog); + UString m; + try { Result = ProcessVirt(); } + catch(const wchar_t *s) { m = s; } + catch(const UString &s) { m = s; } + catch(const char *s) { m = GetUnicodeString(s); } + catch(...) { m = L"Error"; } + if (Result != E_ABORT) + { + if (m.IsEmpty() && Result != S_OK) + m = HResultToMessage(Result); + } + AddMessageToString(m, ErrorMessage); + AddMessageToString(m, ErrorPath1); + AddMessageToString(m, ErrorPath2); + + if (m.IsEmpty()) + { + if (!OkMessage.IsEmpty()) + { + ProgressDialog.Sync.SetOkMessageTitle(OkMessageTitle); + ProgressDialog.Sync.SetOkMessage(OkMessage); + } + } + else + { + ProgressDialog.Sync.SetErrorMessage(m); + if (Result == S_OK) + Result = E_FAIL; + } +} diff --git a/CPP/7zip/UI/FileManager/ProgressDialog2.h b/CPP/7zip/UI/FileManager/ProgressDialog2.h new file mode 100644 index 0000000..3f908d1 --- /dev/null +++ b/CPP/7zip/UI/FileManager/ProgressDialog2.h @@ -0,0 +1,359 @@ +// ProgressDialog2.h + +#ifndef __PROGRESS_DIALOG2_H +#define __PROGRESS_DIALOG2_H + +#include "Windows/Synchronization.h" +#include "Windows/Thread.h" + +#include "Windows/Control/Dialog.h" +#include "Windows/Control/ListView.h" +#include "Windows/Control/ProgressBar.h" + +class CProgressSync +{ + bool _stopped; + bool _paused; + bool _bytesProgressMode; + + UInt64 _totalBytes; + UInt64 _curBytes; + UInt64 _totalFiles; + UInt64 _curFiles; + UInt64 _inSize; + UInt64 _outSize; + + UString _titleFileName; + UString _currentFileName; + +public: + UStringVector Messages; + UString ErrorMessage; + UString ErrorMessageTitle; + + UString OkMessage; + UString OkMessageTitle; + + NWindows::NSynchronization::CCriticalSection _cs; + + CProgressSync(): + _stopped(false), _paused(false), + _totalBytes((UInt64)(Int64)-1), _curBytes(0), + _totalFiles((UInt64)(Int64)-1), _curFiles(0), + _inSize((UInt64)(Int64)-1), + _outSize((UInt64)(Int64)-1), + _bytesProgressMode(true) + {} + + bool GetStopped() + { + NWindows::NSynchronization::CCriticalSectionLock lock(_cs); + return _stopped; + } + void SetStopped(bool value) + { + NWindows::NSynchronization::CCriticalSectionLock lock(_cs); + _stopped = value; + } + bool GetPaused() + { + NWindows::NSynchronization::CCriticalSectionLock lock(_cs); + return _paused; + } + void SetPaused(bool value) + { + NWindows::NSynchronization::CCriticalSectionLock lock(_cs); + _paused = value; + } + void SetBytesProgressMode(bool bytesProgressMode) + { + NWindows::NSynchronization::CCriticalSectionLock lock(_cs); + _bytesProgressMode = bytesProgressMode; + } + void SetProgress(UInt64 total, UInt64 completed) + { + NWindows::NSynchronization::CCriticalSectionLock lock(_cs); + _totalBytes = total; + _curBytes = completed; + } + void SetRatioInfo(const UInt64 *inSize, const UInt64 *outSize) + { + NWindows::NSynchronization::CCriticalSectionLock lock(_cs); + if (inSize) + _inSize = *inSize; + if (outSize) + _outSize = *outSize; + } + void SetPos(UInt64 completed) + { + NWindows::NSynchronization::CCriticalSectionLock lock(_cs); + _curBytes = completed; + } + void SetNumBytesTotal(UInt64 value) + { + NWindows::NSynchronization::CCriticalSectionLock lock(_cs); + _totalBytes = value; + } + void SetNumFilesTotal(UInt64 value) + { + NWindows::NSynchronization::CCriticalSectionLock lock(_cs); + _totalFiles = value; + } + void SetNumFilesCur(UInt64 value) + { + NWindows::NSynchronization::CCriticalSectionLock lock(_cs); + _curFiles = value; + } + HRESULT ProcessStopAndPause(); + HRESULT SetPosAndCheckPaused(UInt64 completed); + void GetProgress(UInt64 &total, UInt64 &completed, + UInt64 &totalFiles, UInt64 &curFiles, + UInt64 &inSize, UInt64 &outSize, + bool &bytesProgressMode) + { + NWindows::NSynchronization::CCriticalSectionLock lock(_cs); + total = _totalBytes; + completed = _curBytes; + totalFiles = _totalFiles; + curFiles = _curFiles; + inSize = _inSize; + outSize = _outSize; + bytesProgressMode = _bytesProgressMode; + } + void SetTitleFileName(const UString &fileName) + { + NWindows::NSynchronization::CCriticalSectionLock lock(_cs); + _titleFileName = fileName; + } + void GetTitleFileName(UString &fileName) + { + NWindows::NSynchronization::CCriticalSectionLock lock(_cs); + fileName = _titleFileName; + } + void SetCurrentFileName(const UString &fileName) + { + NWindows::NSynchronization::CCriticalSectionLock lock(_cs); + _currentFileName = fileName; + } + void GetCurrentFileName(UString &fileName) + { + NWindows::NSynchronization::CCriticalSectionLock lock(_cs); + fileName = _currentFileName; + } + + void AddErrorMessage(LPCWSTR message) + { + NWindows::NSynchronization::CCriticalSectionLock lock(_cs); + Messages.Add(message); + } + + void SetErrorMessage(const UString &message) + { + NWindows::NSynchronization::CCriticalSectionLock lock(_cs); + ErrorMessage = message; + } + + void SetOkMessage(const UString &message) + { + NWindows::NSynchronization::CCriticalSectionLock lock(_cs); + OkMessage = message; + } + + void SetOkMessageTitle(const UString &title) + { + NWindows::NSynchronization::CCriticalSectionLock lock(_cs); + OkMessageTitle = title; + } + + void SetErrorMessageTitle(const UString &title) + { + NWindows::NSynchronization::CCriticalSectionLock lock(_cs); + ErrorMessageTitle = title; + } + + bool ThereIsMessage() const + { + return !Messages.IsEmpty() || !ErrorMessage.IsEmpty() || !OkMessage.IsEmpty(); + } +}; + +class CU64ToI32Converter +{ + UInt64 _numShiftBits; +public: + void Init(UInt64 range) + { + // Windows CE doesn't like big number here. + for (_numShiftBits = 0; range > (1 << 15); _numShiftBits++) + range >>= 1; + } + int Count(UInt64 value) { return int(value >> _numShiftBits); } +}; + +enum ESpeedMode +{ + kSpeedBytes, + kSpeedKBytes, + kSpeedMBytes +}; + +class CProgressDialog: public NWindows::NControl::CModalDialog +{ + UString _prevFileName; + UString _prevTitleName; +private: + UString backgroundString; + UString backgroundedString; + UString foregroundString; + UString pauseString; + UString continueString; + UString pausedString; + + int buttonSizeX; + int buttonSizeY; + + UINT_PTR _timer; + + UString _title; + CU64ToI32Converter _converter; + UInt64 _previousPos; + UInt64 _range; + NWindows::NControl::CProgressBar m_ProgressBar; + // FIXME NWindows::NControl::CListView _messageList; + + UInt32 _prevPercentValue; + UInt32 _prevTime; + UInt32 _elapsedTime; + UInt32 _prevElapsedSec; + UInt64 _prevRemainingSec; + ESpeedMode _prevMode; + UInt64 _prevSpeed; + + bool _foreground; + + int _numReduceSymbols; + + bool _wasCreated; + bool _needClose; + + UInt32 _numPostedMessages; + UInt32 _numAutoSizeMessages; + + bool _errorsWereDisplayed; + + bool _waitCloseByCancelButton; + bool _cancelWasPressed; + + bool _inCancelMessageBox; + bool _externalCloseMessageWasReceived; + + void UpdateStatInfo(bool showAll); + bool OnTimer(WPARAM timerID, LPARAM callback); + void SetRange(UInt64 range); + void SetPos(UInt64 pos); + virtual bool OnInit(); + virtual bool OnSize(WPARAM wParam, int xSize, int ySize); + virtual void OnCancel(); + virtual void OnOK(); + NWindows::NSynchronization::CManualResetEvent _createDialogEvent; + NWindows::NSynchronization::CManualResetEvent _dialogCreatedEvent; + #ifndef _SFX + void AddToTitle(LPCWSTR string); + #endif + + void SetPauseText(); + void SetPriorityText(); + void OnPauseButton(); + void OnPriorityButton(); + bool OnButtonClicked(int buttonID, HWND buttonHWND); + + void SetTitleText(); + void ShowSize(int id, UInt64 value); + + void UpdateMessagesDialog(); + + void AddMessageDirect(LPCWSTR message); + void AddMessage(LPCWSTR message); + + bool OnExternalCloseMessage(); + void EnableErrorsControls(bool enable); + + void ShowAfterMessages(HWND wndParent); + + void CheckNeedClose(); +public: + CProgressSync Sync; + bool CompressingMode; + // FIXME - not supported bool WaitMode; + bool ShowCompressionInfo; + bool MessagesDisplayed; // = true if user pressed OK on all messages or there are no messages. + int IconID; + + #ifndef _SFX + HWND MainWindow; + UString MainTitle; + UString MainAddTitle; + ~CProgressDialog(); + #endif + + CProgressDialog(); + void WaitCreating() + { + _createDialogEvent.Set(); + _dialogCreatedEvent.Lock(); + } + + + INT_PTR Create(const UString &title, NWindows::CThread &thread, HWND wndParent = 0); + + + virtual bool OnMessage(UINT message, WPARAM wParam, LPARAM lParam); + + void ProcessWasFinished(); +}; + + +class CProgressCloser +{ + CProgressDialog *_p; +public: + CProgressCloser(CProgressDialog &p) : _p(&p) {} + ~CProgressCloser() { _p->ProcessWasFinished(); } +}; + +class CProgressThreadVirt +{ +protected: + UString ErrorMessage; + UString ErrorPath1; + UString ErrorPath2; + UString OkMessage; + UString OkMessageTitle; + + // error if any of HRESULT, ErrorMessage, ErrorPath + virtual HRESULT ProcessVirt() = 0; + void Process(); +public: + HRESULT Result; + bool ThreadFinishedOK; // if there is no fatal exception + CProgressDialog ProgressDialog; + + static THREAD_FUNC_DECL MyThreadFunction(void *param) + { + CProgressThreadVirt *p = (CProgressThreadVirt *)param; + try + { + p->Process(); + p->ThreadFinishedOK = true; + } + catch (...) { p->Result = E_FAIL; } + return 0; + } + + HRESULT Create(const UString &title, HWND parentWindow = 0); + CProgressThreadVirt(): Result(E_FAIL), ThreadFinishedOK(false) {} +}; + +UString HResultToMessage(HRESULT errorCode); + +#endif diff --git a/CPP/7zip/UI/FileManager/ProgressDialog2Res.h b/CPP/7zip/UI/FileManager/ProgressDialog2Res.h new file mode 100644 index 0000000..21ac03c --- /dev/null +++ b/CPP/7zip/UI/FileManager/ProgressDialog2Res.h @@ -0,0 +1,41 @@ +#define IDD_DIALOG_PROGRESS 500 +#define IDD_DIALOG_PROGRESS_2 600 + +#define IDC_BUTTON_PAUSE 50 +#define IDC_BUTTON_PROGRESS_PRIORITY 51 + +#define IDS_PROGRESS_PAUSED 700 +#define IDS_PROGRESS_FOREGROUND 701 +#define IDS_PROGRESS_CONTINUE 702 +#define IDS_PROGRESS_ASK_CANCEL 703 +#define IDS_CLOSE 704 +#define IDS_MESSAGES_DIALOG_MESSAGE_COLUMN 503 + +#define IDC_PROGRESS1 1000 +#define IDC_PROGRESS_ELAPSED 1002 +#define IDC_PROGRESS_ELAPSED_VALUE 1003 +#define IDC_PROGRESS_REMAINING 1004 +#define IDC_PROGRESS_REMAINING_VALUE 1005 +#define IDC_PROGRESS_SPEED 1006 +#define IDC_PROGRESS_SPEED_VALUE 1007 +#define IDC_PROGRESS_TOTAL 1008 +#define IDC_PROGRESS_TOTAL_VALUE 1009 +#define IDC_PROGRESS_FILE_NAME 1010 + +#define IDC_PROGRESS_FILES 1012 +#define IDC_PROGRESS_FILES_VALUE 1013 +#define IDC_PROGRESS_RATIO 1014 +#define IDC_PROGRESS_RATIO_VALUE 1015 +#define IDC_PROGRESS_PACKED 1016 +#define IDC_PROGRESS_PACKED_VALUE 1017 +#define IDC_PROGRESS_UNPACKED 1018 +#define IDC_PROGRESS_UNPACKED_VALUE 1019 + +#define IDC_PROGRESS_ERRORS 1030 +#define IDC_PROGRESS_ERRORS_VALUE 1031 +#define IDC_PROGRESS_LIST 1032 + +#define MY_PROGRESS_VALUE_UNITS 44 +#define MY_PROGRESS_LABEL_UNITS_MIN 60 +#define MY_PROGRESS_LABEL_UNITS_START 90 +#define MY_PROGRESS_PAD_UNITS 4 diff --git a/CPP/7zip/UI/FileManager/ProgressDialog2_rc.cpp b/CPP/7zip/UI/FileManager/ProgressDialog2_rc.cpp new file mode 100644 index 0000000..ad10e0d --- /dev/null +++ b/CPP/7zip/UI/FileManager/ProgressDialog2_rc.cpp @@ -0,0 +1,180 @@ +// ProgressDialog2_rc.cpp + +#include "StdAfx.h" + +// For compilers that support precompilation, includes "wx/wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +// for all others, include the necessary headers (this file is usually all you +// need because it includes almost all "standard" wxWidgets headers) +#ifndef WX_PRECOMP + #include "wx/wx.h" +#endif + +#undef _WIN32 + +#include "ProgressDialog2Res.h" + +#include "Windows/Control/DialogImpl.h" + +/* +IDD_DIALOG_PROGRESS DIALOG 0, 0, xSize, ySize MY_MODAL_DIALOG_STYLE | WS_MINIMIZEBOX +CAPTION "Progress" +MY_FONT +BEGIN + PUSHBUTTON "&Background", IDC_BUTTON_PROGRESS_PRIORITY, bXPos3, bYPos, bXSize, bYSize + PUSHBUTTON "&Pause", IDC_BUTTON_PAUSE, bXPos2, bYPos, bXSize, bYSize + PUSHBUTTON "Cancel", IDCANCEL, bXPos1, bYPos, bXSize, bYSize + LTEXT "Elapsed time:", IDC_PROGRESS_ELAPSED, marg, y0, x0Size, 8 + LTEXT "Remaining time:", IDC_PROGRESS_REMAINING, marg, y1, x0Size, 8 + LTEXT "Files:", IDC_PROGRESS_FILES, marg, y2, x0Size, 8 + LTEXT "Compression ratio:",IDC_PROGRESS_RATIO, marg, y3, x0Size, 8 + + LTEXT "Total size:", IDC_PROGRESS_TOTAL, x2, y0, x2Size, 8 + LTEXT "Speed:", IDC_PROGRESS_SPEED, x2, y1, x2Size, 8 + LTEXT "Processed:", IDC_PROGRESS_UNPACKED, x2, y2, x2Size, 8 + LTEXT "Compressed size:", IDC_PROGRESS_PACKED, x2, y3, x2Size, 8 + + RTEXT "00:00:00", IDC_PROGRESS_ELAPSED_VALUE, x1, y0, x1Size, 8 + RTEXT "", IDC_PROGRESS_REMAINING_VALUE, x1, y1, x1Size, 8 + RTEXT "", IDC_PROGRESS_FILES_VALUE, x1, y2, x1Size, 8 + RTEXT "", IDC_PROGRESS_RATIO_VALUE, x1, y3, x1Size, 8 + + RTEXT "", IDC_PROGRESS_TOTAL_VALUE, x3, y0, x3Size, 8 + RTEXT "", IDC_PROGRESS_SPEED_VALUE, x3, y1, x3Size, 8 + RTEXT "", IDC_PROGRESS_UNPACKED_VALUE, x3, y2, x3Size, 8 + RTEXT "", IDC_PROGRESS_PACKED_VALUE, x3, y3, x3Size, 8 + + LTEXT "", IDC_PROGRESS_FILE_NAME, marg, bYPos - 30, xSize2, 8, SS_NOPREFIX + CONTROL "Progress1", IDC_PROGRESS1, "msctls_progress32", PBS_SMOOTH | WS_BORDER, marg, bYPos - 20, xSize2, 13 +END + + +STRINGTABLE DISCARDABLE +BEGIN + IDS_PROGRESS_PAUSED "Paused" + IDS_PROGRESS_FOREGROUND "&Foreground" + IDS_PROGRESS_CONTINUE "&Continue" + IDS_PROGRESS_ASK_CANCEL "Are you sure you want to cancel?" +END + +*/ +class CProgressDialogImpl : public NWindows::NControl::CModalDialogImpl +{ + public: + CProgressDialogImpl(NWindows::NControl::CModalDialog *dialog,wxWindow * parent , int id) : CModalDialogImpl(dialog,parent, id, wxT("Progress")) + { +// FIXME : ProgressDialog2 but ProgressDialog ... + + ///Sizer for adding the controls created by users + wxBoxSizer* topsizer = new wxBoxSizer(wxVERTICAL); + + wxStaticText *pStaticTextElapsedTime = new wxStaticText(this, IDC_PROGRESS_ELAPSED, wxT("Elapsed time:")); + wxStaticText *m_pStaticTextElapsedTime = new wxStaticText(this, IDC_PROGRESS_ELAPSED_VALUE, wxT("00:00:00"), wxDefaultPosition, wxDefaultSize, wxALIGN_RIGHT); + wxStaticText *pStaticTextRemainingTime = new wxStaticText(this, IDC_PROGRESS_REMAINING, wxT("Remaining time")); + wxStaticText *m_pStaticTextRemainingTime = new wxStaticText(this, IDC_PROGRESS_REMAINING_VALUE, wxT("00:00:00"), wxDefaultPosition, wxDefaultSize, wxALIGN_RIGHT); + + wxStaticText *pStaticTextFiles = new wxStaticText(this, IDC_PROGRESS_FILES, wxT("Files:")); + wxStaticText *m_pStaticTextFiles = new wxStaticText(this, IDC_PROGRESS_FILES_VALUE, wxT(" "), wxDefaultPosition, wxDefaultSize, wxALIGN_RIGHT); + + wxStaticText *pStaticTextRatio = new wxStaticText(this, IDC_PROGRESS_RATIO, wxT("Compression ratio:")); + wxStaticText *m_pStaticTextRatio = new wxStaticText(this, IDC_PROGRESS_RATIO_VALUE, wxT(" "), wxDefaultPosition, wxDefaultSize, wxALIGN_RIGHT); + + + wxStaticText *pStaticTextSize = new wxStaticText(this, IDC_PROGRESS_TOTAL, wxT("Total Size:")); + wxStaticText *m_pStaticTextSize = new wxStaticText(this, IDC_PROGRESS_TOTAL_VALUE, wxT(" "), wxDefaultPosition, wxDefaultSize, wxALIGN_RIGHT); + wxStaticText *pStaticTextSpeed = new wxStaticText(this, IDC_PROGRESS_SPEED, wxT("Speed:")); + wxStaticText *m_pStaticTextSpeed = new wxStaticText(this, IDC_PROGRESS_SPEED_VALUE, wxT(" "), wxDefaultPosition, wxDefaultSize, wxALIGN_RIGHT); + + wxStaticText *pStaticTextUnpacked = new wxStaticText(this, IDC_PROGRESS_UNPACKED, wxT("Processed:")); + wxStaticText *m_pStaticTextUnpacked = new wxStaticText(this, IDC_PROGRESS_UNPACKED, wxT(" "), wxDefaultPosition, wxDefaultSize, wxALIGN_RIGHT); + + wxStaticText *pStaticTextPacked = new wxStaticText(this, IDC_PROGRESS_PACKED, wxT("Compressed size:")); + wxStaticText *m_pStaticTextPacked = new wxStaticText(this, IDC_PROGRESS_PACKED_VALUE, wxT(" "), wxDefaultPosition, wxDefaultSize, wxALIGN_RIGHT); + + wxBoxSizer *pInfoSizer = new wxBoxSizer(wxHORIZONTAL); + wxBoxSizer *pTimeSizer = new wxBoxSizer(wxHORIZONTAL); + wxBoxSizer *pTimeLabelSizer = new wxBoxSizer(wxVERTICAL); + pTimeLabelSizer->Add(pStaticTextElapsedTime , 0, wxALL|wxEXPAND, 5); + pTimeLabelSizer->Add(pStaticTextRemainingTime, 0, wxALL|wxEXPAND, 5); + pTimeLabelSizer->Add(pStaticTextFiles , 0, wxALL|wxEXPAND, 5); + pTimeLabelSizer->Add(pStaticTextRatio , 0, wxALL|wxEXPAND, 5); + wxBoxSizer *pTimeInfoSizer = new wxBoxSizer(wxVERTICAL); + pTimeInfoSizer->Add(m_pStaticTextElapsedTime , 0, wxALL|wxEXPAND, 5); + pTimeInfoSizer->Add(m_pStaticTextRemainingTime, 0, wxALL|wxEXPAND, 5); + pTimeInfoSizer->Add(m_pStaticTextFiles , 0, wxALL|wxEXPAND, 5); + pTimeInfoSizer->Add(m_pStaticTextRatio , 0, wxALL|wxEXPAND, 5); + pTimeSizer->Add(pTimeLabelSizer , 0, wxALL|wxEXPAND, 5); + pTimeSizer->Add(pTimeInfoSizer , 0, wxALL|wxEXPAND, 5); + wxBoxSizer *pSizeSpeedSizer = new wxBoxSizer(wxHORIZONTAL); + wxBoxSizer *pSizeSpeedLabelSizer = new wxBoxSizer(wxVERTICAL); + pSizeSpeedLabelSizer->Add(pStaticTextSize , 0, wxALL|wxEXPAND, 5); + pSizeSpeedLabelSizer->Add(pStaticTextSpeed , 0, wxALL|wxEXPAND, 5); + pSizeSpeedLabelSizer->Add(pStaticTextUnpacked , 0, wxALL|wxEXPAND, 5); + pSizeSpeedLabelSizer->Add(pStaticTextPacked , 0, wxALL|wxEXPAND, 5); + + wxBoxSizer *pSizeSpeedInfoSizer = new wxBoxSizer(wxVERTICAL); + pSizeSpeedInfoSizer->Add(m_pStaticTextSize , 0, wxALL|wxEXPAND, 5); + pSizeSpeedInfoSizer->Add(m_pStaticTextSpeed , 0, wxALL|wxEXPAND, 5); + pSizeSpeedInfoSizer->Add(m_pStaticTextUnpacked, 0, wxALL|wxEXPAND, 5); + pSizeSpeedInfoSizer->Add(m_pStaticTextPacked , 0, wxALL|wxEXPAND, 5); + + pSizeSpeedSizer->Add(pSizeSpeedLabelSizer, 1, wxALL|wxEXPAND, 5); + pSizeSpeedSizer->Add(pSizeSpeedInfoSizer, 1, wxALL|wxEXPAND, 5); + pInfoSizer->Add(pTimeSizer, 0, wxALL|wxEXPAND, 5); + pInfoSizer->Add(pSizeSpeedSizer, 0, wxALL|wxEXPAND, 5); + + // wxStaticText *m_pStaticArchiveName = new wxStaticText(this, IDC_PROGRESS_FILE_NAME, wxT(" \n ")); + wxStaticText *m_pStaticArchiveName = new wxStaticText(this, IDC_PROGRESS_FILE_NAME, wxT("")); + // m_pStaticArchiveName->Wrap( -1 ); // No Wrapping + + wxGauge *m_pGaugeProgress = new wxGauge(this, IDC_PROGRESS1, 100); + + wxBoxSizer *pButtonSizer = new wxBoxSizer(wxHORIZONTAL); + wxButton *m_pButtonBackground = new wxButton(this, IDC_BUTTON_PROGRESS_PRIORITY, wxT("&Background")); + wxButton *m_pButtonPause = new wxButton(this, IDC_BUTTON_PAUSE, wxT("&Pause")); + wxButton *m_pButtonCancel = new wxButton(this, wxID_CANCEL, wxT("&Cancel")); + // FIXME pButtonSizer->AddStretchSpacer(1); + pButtonSizer->Add(m_pButtonBackground, 0, wxALL|wxEXPAND, 5); + pButtonSizer->Add(m_pButtonPause, 0, wxALL|wxEXPAND, 5); + pButtonSizer->Add(m_pButtonCancel, 0, wxALL|wxEXPAND, 5); + + topsizer->Add(pInfoSizer, 0, wxBOTTOM|wxEXPAND, 5); + topsizer->Add(m_pStaticArchiveName, 0, wxEXPAND | wxALL | wxALIGN_LEFT, 10); + topsizer->Add(m_pGaugeProgress, 0, wxALL|wxEXPAND, 10); + topsizer->Add(pButtonSizer, 0, wxALL|wxEXPAND, 5); + + this->OnInit(); + + SetSizer(topsizer); // use the sizer for layout + topsizer->SetSizeHints(this); // set size hints to honour minimum size + } + +private: + // Any class wishing to process wxWindows events must use this macro + DECLARE_EVENT_TABLE() +}; + +static CStringTable g_stringTable[] = +{ + { IDS_PROGRESS_PAUSED , L"Paused" }, + { IDS_PROGRESS_FOREGROUND , L"&Foreground" }, + { IDS_PROGRESS_CONTINUE , L"&Continue" }, + { IDS_PROGRESS_ASK_CANCEL , L"Are you sure you want to cancel?" }, + { IDS_CLOSE , L"&Close" }, + { IDS_MESSAGES_DIALOG_MESSAGE_COLUMN , L"Message"}, + { 0 , 0 } +}; + +REGISTER_DIALOG(IDD_DIALOG_PROGRESS,CProgressDialog,g_stringTable) + +BEGIN_EVENT_TABLE(CProgressDialogImpl, wxDialog) + EVT_TIMER(wxID_ANY, CModalDialogImpl::OnAnyTimer) + EVT_BUTTON(wxID_ANY, CModalDialogImpl::OnAnyButton) + EVT_MENU(WORKER_EVENT, CModalDialogImpl::OnWorkerEvent) +END_EVENT_TABLE() + diff --git a/CPP/7zip/UI/FileManager/ProgressDialogRes.h b/CPP/7zip/UI/FileManager/ProgressDialogRes.h new file mode 100644 index 0000000..97e4722 --- /dev/null +++ b/CPP/7zip/UI/FileManager/ProgressDialogRes.h @@ -0,0 +1,3 @@ +#define IDD_DIALOG_PROGRESS 500 + +#define IDC_PROGRESS1 1000 diff --git a/CPP/7zip/UI/FileManager/PropertyName.cpp b/CPP/7zip/UI/FileManager/PropertyName.cpp new file mode 100644 index 0000000..098bc47 --- /dev/null +++ b/CPP/7zip/UI/FileManager/PropertyName.cpp @@ -0,0 +1,110 @@ +// PropertyName.cpp + +#include "StdAfx.h" + +#include "Common/IntToString.h" + +#include "Windows/ResourceString.h" + +#include "../../PropID.h" + +#include "LangUtils.h" +#include "PropertyName.h" + +#include "resource.h" +#include "PropertyNameRes.h" + +struct CPropertyIDNamePair +{ + PROPID PropID; + UINT ResourceID; + UInt32 LangID; +}; + +static CPropertyIDNamePair kPropertyIDNamePairs[] = +{ + { kpidPath, IDS_PROP_PATH, 0x02000203 }, + { kpidName, IDS_PROP_NAME, 0x02000204 }, + { kpidExtension, IDS_PROP_EXTENSION, 0x02000205 }, + { kpidIsDir, IDS_PROP_IS_FOLDER, 0x02000206}, + { kpidSize, IDS_PROP_SIZE, 0x02000207}, + { kpidPackSize, IDS_PROP_PACKED_SIZE, 0x02000208 }, + { kpidAttrib, IDS_PROP_ATTRIBUTES, 0x02000209 }, + { kpidCTime, IDS_PROP_CTIME, 0x0200020A }, + { kpidATime, IDS_PROP_ATIME, 0x0200020B }, + { kpidMTime, IDS_PROP_MTIME, 0x0200020C }, + { kpidSolid, IDS_PROP_SOLID, 0x0200020D }, + { kpidCommented, IDS_PROP_C0MMENTED, 0x0200020E }, + { kpidEncrypted, IDS_PROP_ENCRYPTED, 0x0200020F }, + { kpidSplitBefore, IDS_PROP_SPLIT_BEFORE, 0x02000210 }, + { kpidSplitAfter, IDS_PROP_SPLIT_AFTER, 0x02000211 }, + { kpidDictionarySize, IDS_PROP_DICTIONARY_SIZE, 0x02000212 }, + { kpidCRC, IDS_PROP_CRC, 0x02000213 }, + { kpidType, IDS_PROP_FILE_TYPE, 0x02000214}, + { kpidIsAnti, IDS_PROP_ANTI, 0x02000215 }, + { kpidMethod, IDS_PROP_METHOD, 0x02000216 }, + { kpidHostOS, IDS_PROP_HOST_OS, 0x02000217 }, + { kpidFileSystem, IDS_PROP_FILE_SYSTEM, 0x02000218}, + { kpidUser, IDS_PROP_USER, 0x02000219}, + { kpidGroup, IDS_PROP_GROUP, 0x0200021A}, + { kpidBlock, IDS_PROP_BLOCK, 0x0200021B }, + { kpidComment, IDS_PROP_COMMENT, 0x0200021C }, + { kpidPosition, IDS_PROP_POSITION, 0x0200021D }, + { kpidPrefix, IDS_PROP_PREFIX, 0x0200021E }, + { kpidNumSubDirs, IDS_PROP_FOLDERS, 0x0200021F }, + { kpidNumSubFiles, IDS_PROP_FILES, 0x02000220 }, + { kpidUnpackVer, IDS_PROP_VERSION, 0x02000221}, + { kpidVolume, IDS_PROP_VOLUME, 0x02000222}, + { kpidIsVolume, IDS_PROP_IS_VOLUME, 0x02000223}, + { kpidOffset, IDS_PROP_OFFSET, 0x02000224}, + { kpidLinks, IDS_PROP_LINKS, 0x02000225}, + { kpidNumBlocks, IDS_PROP_NUM_BLOCKS, 0x02000226}, + { kpidNumVolumes, IDS_PROP_NUM_VOLUMES, 0x02000227}, + + { kpidBit64, IDS_PROP_BIT64, 0x02000229}, + { kpidBigEndian, IDS_PROP_BIG_ENDIAN, 0x0200022A}, + { kpidCpu, IDS_PROP_CPU, 0x0200022B}, + { kpidPhySize, IDS_PROP_PHY_SIZE, 0x0200022C}, + { kpidHeadersSize, IDS_PROP_HEADERS_SIZE, 0x0200022D}, + { kpidChecksum, IDS_PROP_CHECKSUM, 0x0200022E}, + { kpidCharacts, IDS_PROP_CHARACTS, 0x0200022F}, + { kpidVa, IDS_PROP_VA, 0x02000230}, + { kpidId, IDS_PROP_ID, 0x02000231 }, + { kpidShortName, IDS_PROP_SHORT_NAME, 0x02000232 }, + { kpidCreatorApp, IDS_PROP_CREATOR_APP, 0x02000233 }, + { kpidSectorSize, IDS_PROP_SECTOR_SIZE, 0x02000234 }, + { kpidPosixAttrib, IDS_PROP_POSIX_ATTRIB, 0x02000235 }, + { kpidLink, IDS_PROP_LINK, 0x02000236 }, + { kpidError, IDS_PROP_ERROR, 0x02000605 }, + + { kpidTotalSize, IDS_PROP_TOTAL_SIZE, 0x03031100 }, + { kpidFreeSpace, IDS_PROP_FREE_SPACE, 0x03031101 }, + { kpidClusterSize, IDS_PROP_CLUSTER_SIZE, 0x03031102}, + { kpidVolumeName, IDS_PROP_VOLUME_NAME, 0x03031103 }, + + { kpidLocalName, IDS_PROP_LOCAL_NAME, 0x03031200 }, + { kpidProvider, IDS_PROP_PROVIDER, 0x03031201 } +}; + +int FindProperty(PROPID propID) +{ + for (int i = 0; i < sizeof(kPropertyIDNamePairs) / sizeof(kPropertyIDNamePairs[0]); i++) + if (kPropertyIDNamePairs[i].PropID == propID) + return i; + return -1; +} + +UString GetNameOfProperty(PROPID propID, const wchar_t *name) +{ + int index = FindProperty(propID); + if (index < 0) + { + if (name) + return name; + wchar_t s[16]; + ConvertUInt32ToString(propID, s); + return s; + } + const CPropertyIDNamePair &pair = kPropertyIDNamePairs[index]; + return LangString(pair.ResourceID, pair.LangID); +} diff --git a/CPP/7zip/UI/FileManager/PropertyName.h b/CPP/7zip/UI/FileManager/PropertyName.h new file mode 100644 index 0000000..95e9dc9 --- /dev/null +++ b/CPP/7zip/UI/FileManager/PropertyName.h @@ -0,0 +1,10 @@ +// PropertyName.h + +#ifndef __PROPERTYNAME_H +#define __PROPERTYNAME_H + +#include "Common/MyString.h" + +UString GetNameOfProperty(PROPID propID, const wchar_t *name); + +#endif diff --git a/CPP/7zip/UI/FileManager/PropertyNameRes.h b/CPP/7zip/UI/FileManager/PropertyNameRes.h new file mode 100644 index 0000000..9cc9f7c --- /dev/null +++ b/CPP/7zip/UI/FileManager/PropertyNameRes.h @@ -0,0 +1,53 @@ +#define IDS_PROP_PATH 3 +#define IDS_PROP_NAME 4 +#define IDS_PROP_EXTENSION 5 +#define IDS_PROP_IS_FOLDER 6 +#define IDS_PROP_SIZE 7 +#define IDS_PROP_PACKED_SIZE 8 +#define IDS_PROP_ATTRIBUTES 9 +#define IDS_PROP_CTIME 10 +#define IDS_PROP_ATIME 11 +#define IDS_PROP_MTIME 12 +#define IDS_PROP_SOLID 13 +#define IDS_PROP_C0MMENTED 14 +#define IDS_PROP_ENCRYPTED 15 +#define IDS_PROP_DICTIONARY_SIZE 16 +#define IDS_PROP_SPLIT_BEFORE 17 +#define IDS_PROP_SPLIT_AFTER 18 +#define IDS_PROP_CRC 19 +#define IDS_PROP_FILE_TYPE 20 +#define IDS_PROP_ANTI 21 +#define IDS_PROP_METHOD 22 +#define IDS_PROP_HOST_OS 23 +#define IDS_PROP_FILE_SYSTEM 24 +#define IDS_PROP_USER 25 +#define IDS_PROP_GROUP 26 +#define IDS_PROP_BLOCK 27 +#define IDS_PROP_COMMENT 28 +#define IDS_PROP_POSITION 29 +#define IDS_PROP_PREFIX 30 +#define IDS_PROP_FOLDERS 31 +#define IDS_PROP_FILES 32 +#define IDS_PROP_VERSION 33 +#define IDS_PROP_VOLUME 34 +#define IDS_PROP_IS_VOLUME 35 +#define IDS_PROP_OFFSET 36 +#define IDS_PROP_LINKS 37 +#define IDS_PROP_NUM_BLOCKS 38 +#define IDS_PROP_NUM_VOLUMES 39 + +#define IDS_PROP_BIT64 41 +#define IDS_PROP_BIG_ENDIAN 42 +#define IDS_PROP_CPU 43 +#define IDS_PROP_PHY_SIZE 44 +#define IDS_PROP_HEADERS_SIZE 45 +#define IDS_PROP_CHECKSUM 46 +#define IDS_PROP_CHARACTS 47 +#define IDS_PROP_VA 48 +#define IDS_PROP_ID 49 +#define IDS_PROP_SHORT_NAME 50 +#define IDS_PROP_CREATOR_APP 51 +#define IDS_PROP_SECTOR_SIZE 52 +#define IDS_PROP_POSIX_ATTRIB 53 +#define IDS_PROP_LINK 54 +#define IDS_PROP_ERROR 55 diff --git a/CPP/7zip/UI/FileManager/RegistryAssociations.cpp b/CPP/7zip/UI/FileManager/RegistryAssociations.cpp new file mode 100644 index 0000000..f7edbb4 --- /dev/null +++ b/CPP/7zip/UI/FileManager/RegistryAssociations.cpp @@ -0,0 +1,312 @@ +// RegistryAssociations.cpp + +#include "StdAfx.h" + +#include "RegistryAssociations.h" + +#include "Common/IntToString.h" +#include "Common/StringConvert.h" +#include "Common/StringToInt.h" + +#include "Windows/Registry.h" +#include "Windows/Synchronization.h" + +#include "StringUtils.h" + +using namespace NWindows; +using namespace NRegistry; + +namespace NRegistryAssociations { + +static NSynchronization::CCriticalSection g_CriticalSection; + +#define REG_PATH_FM TEXT("Software") TEXT(STRING_PATH_SEPARATOR) TEXT("7-Zip") TEXT(STRING_PATH_SEPARATOR) TEXT("FM") + +/* + +static const TCHAR *kCUKeyPath = REG_PATH_FM; +static const WCHAR *kExtPlugins = L"Plugins"; +static const TCHAR *kExtEnabled = TEXT("Enabled"); + +#define kAssociations TEXT("Associations") +#define kAssociationsPath REG_PATH_FM TEXT(STRING_PATH_SEPARATOR) kAssociations + +bool ReadInternalAssociation(const wchar_t *ext, CExtInfo &extInfo) +{ + NSynchronization::CCriticalSectionLock lock(g_CriticalSection); + CKey key; + if (key.Open(HKEY_CURRENT_USER, + CSysString(kAssociationsPath TEXT(STRING_PATH_SEPARATOR)) + + GetSystemString(ext), KEY_READ) != ERROR_SUCCESS) + return false; + UString pluginsString; + key.QueryValue(kExtPlugins, pluginsString); + SplitString(pluginsString, extInfo.Plugins); + return true; +} + +void ReadInternalAssociations(CObjectVector &items) +{ + items.Clear(); + NSynchronization::CCriticalSectionLock lock(g_CriticalSection); + CKey associationsKey; + if (associationsKey.Open(HKEY_CURRENT_USER, kAssociationsPath, KEY_READ) != ERROR_SUCCESS) + return; + CSysStringVector extNames; + associationsKey.EnumKeys(extNames); + for(int i = 0; i < extNames.Size(); i++) + { + const CSysString extName = extNames[i]; + CExtInfo extInfo; + // extInfo.Enabled = false; + extInfo.Ext = GetUnicodeString(extName); + CKey key; + if (key.Open(associationsKey, extName, KEY_READ) != ERROR_SUCCESS) + return; + UString pluginsString; + key.QueryValue(kExtPlugins, pluginsString); + SplitString(pluginsString, extInfo.Plugins); + // if (key.QueryValue(kExtEnabled, extInfo.Enabled) != ERROR_SUCCESS) + // extInfo.Enabled = false; + items.Add(extInfo); + } +} + +void WriteInternalAssociations(const CObjectVector &items) +{ + NSynchronization::CCriticalSectionLock lock(g_CriticalSection); + CKey mainKey; + mainKey.Create(HKEY_CURRENT_USER, kCUKeyPath); + mainKey.RecurseDeleteKey(kAssociations); + CKey associationsKey; + associationsKey.Create(mainKey, kAssociations); + for(int i = 0; i < items.Size(); i++) + { + const CExtInfo &extInfo = items[i]; + CKey key; + key.Create(associationsKey, GetSystemString(extInfo.Ext)); + key.SetValue(kExtPlugins, JoinStrings(extInfo.Plugins)); + // key.SetValue(kExtEnabled, extInfo.Enabled); + } +} +*/ + +/////////////////////////////////// +// External + +static const TCHAR *kShellNewKeyName = TEXT("ShellNew"); +static const TCHAR *kShellNewDataValueName = TEXT("Data"); + +static const TCHAR *kDefaultIconKeyName = TEXT("DefaultIcon"); +static const TCHAR *kShellKeyName = TEXT("shell"); +static const TCHAR *kOpenKeyName = TEXT("open"); +static const TCHAR *kCommandKeyName = TEXT("command"); +static const TCHAR *k7zipPrefix = TEXT("7-Zip."); + +static CSysString GetExtensionKeyName(const CSysString &extension) +{ + return CSysString(TEXT(".")) + extension; +} + +static CSysString GetExtProgramKeyName(const CSysString &extension) +{ + return CSysString(k7zipPrefix) + extension; +} + +static bool CheckShellExtensionInfo2(const CSysString &extension, + CSysString programKeyName, UString &iconPath, int &iconIndex) +{ + iconIndex = -1; + iconPath.Empty(); + NSynchronization::CCriticalSectionLock lock(g_CriticalSection); + CKey extKey; + if (extKey.Open(HKEY_CLASSES_ROOT, GetExtensionKeyName(extension), KEY_READ) != ERROR_SUCCESS) + return false; + if (extKey.QueryValue(NULL, programKeyName) != ERROR_SUCCESS) + return false; + UString s = GetUnicodeString(k7zipPrefix); + if (s.CompareNoCase(GetUnicodeString(programKeyName.Left(s.Length()))) != 0) + return false; + CKey iconKey; + if (extKey.Open(HKEY_CLASSES_ROOT, programKeyName + CSysString(TEXT(CHAR_PATH_SEPARATOR)) + kDefaultIconKeyName, KEY_READ) != ERROR_SUCCESS) + return false; + UString value; + if (extKey.QueryValue(NULL, value) == ERROR_SUCCESS) + { + int pos = value.ReverseFind(L','); + iconPath = value; + if (pos >= 0) + { + const wchar_t *end; + UInt64 index = ConvertStringToUInt64((const wchar_t *)value + pos + 1, &end); + if (*end == 0) + { + iconIndex = (int)index; + iconPath = value.Left(pos); + } + } + } + return true; +} + +bool CheckShellExtensionInfo(const CSysString &extension, UString &iconPath, int &iconIndex) +{ + NSynchronization::CCriticalSectionLock lock(g_CriticalSection); + CSysString programKeyName; + if (!CheckShellExtensionInfo2(extension, programKeyName, iconPath, iconIndex)) + return false; + CKey extProgKey; + return (extProgKey.Open(HKEY_CLASSES_ROOT, programKeyName, KEY_READ) == ERROR_SUCCESS); +} + +static void DeleteShellExtensionKey(const CSysString &extension) +{ + NSynchronization::CCriticalSectionLock lock(g_CriticalSection); + CKey rootKey; + rootKey.Attach(HKEY_CLASSES_ROOT); + rootKey.RecurseDeleteKey(GetExtensionKeyName(extension)); + rootKey.Detach(); +} + +static void DeleteShellExtensionProgramKey(const CSysString &extension) +{ + NSynchronization::CCriticalSectionLock lock(g_CriticalSection); + CKey rootKey; + rootKey.Attach(HKEY_CLASSES_ROOT); + rootKey.RecurseDeleteKey(GetExtProgramKeyName(extension)); + rootKey.Detach(); +} + +void DeleteShellExtensionInfo(const CSysString &extension) +{ + CSysString programKeyName; + UString iconPath; + int iconIndex; + if (CheckShellExtensionInfo2(extension, programKeyName, iconPath, iconIndex)) + DeleteShellExtensionKey(extension); + DeleteShellExtensionProgramKey(extension); +} + +void AddShellExtensionInfo(const CSysString &extension, + const UString &programTitle, + const UString &programOpenCommand, + const UString &iconPath, int iconIndex, + const void *shellNewData, int shellNewDataSize) +{ + DeleteShellExtensionKey(extension); + DeleteShellExtensionProgramKey(extension); + NSynchronization::CCriticalSectionLock lock(g_CriticalSection); + CSysString programKeyName; + { + CSysString ext = extension; + if (iconIndex < 0) + ext = TEXT("*"); + programKeyName = GetExtProgramKeyName(ext); + } + { + CKey extKey; + extKey.Create(HKEY_CLASSES_ROOT, GetExtensionKeyName(extension)); + extKey.SetValue(NULL, programKeyName); + if (shellNewData != NULL) + { + CKey shellNewKey; + shellNewKey.Create(extKey, kShellNewKeyName); + shellNewKey.SetValue(kShellNewDataValueName, shellNewData, shellNewDataSize); + } + } + CKey programKey; + programKey.Create(HKEY_CLASSES_ROOT, programKeyName); + programKey.SetValue(NULL, programTitle); + { + CKey iconKey; + iconKey.Create(programKey, kDefaultIconKeyName); + UString iconPathFull = iconPath; + if (iconIndex < 0) + iconIndex = 0; + // if (iconIndex >= 0) + { + iconPathFull += L","; + wchar_t s[16]; + ConvertUInt32ToString(iconIndex, s); + iconPathFull += s; + } + iconKey.SetValue(NULL, iconPathFull); + } + + CKey shellKey; + shellKey.Create(programKey, kShellKeyName); + shellKey.SetValue(NULL, TEXT("")); + + CKey openKey; + openKey.Create(shellKey, kOpenKeyName); + openKey.SetValue(NULL, TEXT("")); + + CKey commandKey; + commandKey.Create(openKey, kCommandKeyName); + + commandKey.SetValue(NULL, programOpenCommand); +} + +/////////////////////////// +// ContextMenu +/* + +static const TCHAR *kContextMenuKeyName = TEXT("\\shellex\\ContextMenuHandlers\\7-Zip"); +static const TCHAR *kContextMenuHandlerCLASSIDValue = + TEXT("{23170F69-40C1-278A-1000-000100020000}"); +static const TCHAR *kRootKeyNameForFile = TEXT("*"); +static const TCHAR *kRootKeyNameForFolder = TEXT("Folder"); + +static CSysString GetFullContextMenuKeyName(const CSysString &aKeyName) + { return (aKeyName + kContextMenuKeyName); } + +static bool CheckContextMenuHandlerCommon(const CSysString &aKeyName) +{ + NSynchronization::CCriticalSectionLock lock(&g_CriticalSection, true); + CKey aKey; + if (aKey.Open(HKEY_CLASSES_ROOT, GetFullContextMenuKeyName(aKeyName), KEY_READ) + != ERROR_SUCCESS) + return false; + CSysString aValue; + if (aKey.QueryValue(NULL, aValue) != ERROR_SUCCESS) + return false; + return (aValue.CompareNoCase(kContextMenuHandlerCLASSIDValue) == 0); +} + +bool CheckContextMenuHandler() +{ + return CheckContextMenuHandlerCommon(kRootKeyNameForFile) && + CheckContextMenuHandlerCommon(kRootKeyNameForFolder); +} + +static void DeleteContextMenuHandlerCommon(const CSysString &aKeyName) +{ + CKey rootKey; + rootKey.Attach(HKEY_CLASSES_ROOT); + rootKey.RecurseDeleteKey(GetFullContextMenuKeyName(aKeyName)); + rootKey.Detach(); +} + +void DeleteContextMenuHandler() +{ + DeleteContextMenuHandlerCommon(kRootKeyNameForFile); + DeleteContextMenuHandlerCommon(kRootKeyNameForFolder); +} + +static void AddContextMenuHandlerCommon(const CSysString &aKeyName) +{ + DeleteContextMenuHandlerCommon(aKeyName); + NSynchronization::CCriticalSectionLock lock(&g_CriticalSection, true); + CKey aKey; + aKey.Create(HKEY_CLASSES_ROOT, GetFullContextMenuKeyName(aKeyName)); + aKey.SetValue(NULL, kContextMenuHandlerCLASSIDValue); +} + +void AddContextMenuHandler() +{ + AddContextMenuHandlerCommon(kRootKeyNameForFile); + AddContextMenuHandlerCommon(kRootKeyNameForFolder); +} +*/ + +} diff --git a/CPP/7zip/UI/FileManager/RegistryAssociations.h b/CPP/7zip/UI/FileManager/RegistryAssociations.h new file mode 100644 index 0000000..5390b9d --- /dev/null +++ b/CPP/7zip/UI/FileManager/RegistryAssociations.h @@ -0,0 +1,46 @@ +// RegistryAssociations.h + +#ifndef __REGISTRYASSOCIATIONS_H +#define __REGISTRYASSOCIATIONS_H + +#include "Common/MyString.h" + +namespace NRegistryAssociations { + + /* + struct CExtInfo + { + UString Ext; + UStringVector Plugins; + // bool Enabled; + }; + bool ReadInternalAssociation(const wchar_t *ext, CExtInfo &extInfo); + void ReadInternalAssociations(CObjectVector &items); + void WriteInternalAssociations(const CObjectVector &items); + */ + + bool CheckShellExtensionInfo(const CSysString &extension, UString &iconPath, int &iconIndex); + + // void ReadCompressionInfo(NZipSettings::NCompression::CInfo &anInfo, + void DeleteShellExtensionInfo(const CSysString &extension); + + void AddShellExtensionInfo(const CSysString &extension, + const UString &programTitle, + const UString &programOpenCommand, + const UString &iconPath, int iconIndex, + const void *shellNewData, int shellNewDataSize); + + + /////////////////////////// + // ContextMenu + /* + bool CheckContextMenuHandler(); + void AddContextMenuHandler(); + void DeleteContextMenuHandler(); + */ + +} + +// bool GetProgramDirPrefix(CSysString &aFolder); + +#endif diff --git a/CPP/7zip/UI/FileManager/RegistryPlugins.h b/CPP/7zip/UI/FileManager/RegistryPlugins.h new file mode 100644 index 0000000..77055ac --- /dev/null +++ b/CPP/7zip/UI/FileManager/RegistryPlugins.h @@ -0,0 +1,32 @@ +// RegistryPlugins.h + +#ifndef __REGISTRYPLUGINS_H +#define __REGISTRYPLUGINS_H + +#include "Common/MyString.h" + +enum EPluginType +{ + kPluginTypeFF = 0 +}; + +struct CPluginInfo +{ + UString FilePath; + EPluginType Type; + UString Name; + CLSID ClassID; + CLSID OptionsClassID; + bool ClassIDDefined; + bool OptionsClassIDDefined; + + // CSysString Extension; + // CSysString AddExtension; + // bool UpdateEnabled; + // bool KeepName; +}; + +void ReadPluginInfoList(CObjectVector &plugins); +void ReadFileFolderPluginInfoList(CObjectVector &plugins); + +#endif diff --git a/CPP/7zip/UI/FileManager/RegistryUtils.cpp b/CPP/7zip/UI/FileManager/RegistryUtils.cpp new file mode 100644 index 0000000..6697169 --- /dev/null +++ b/CPP/7zip/UI/FileManager/RegistryUtils.cpp @@ -0,0 +1,160 @@ +// RegistryUtils.cpp + +#include "StdAfx.h" + +#include "Common/IntToString.h" + +#include "Windows/Registry.h" + +#include "RegistryUtils.h" + +using namespace NWindows; +using namespace NRegistry; + +#define REG_PATH_7Z TEXT("Software") TEXT(STRING_PATH_SEPARATOR) TEXT("7-Zip") + +static const TCHAR *kCUBasePath = REG_PATH_7Z; +static const TCHAR *kCU_FMPath = REG_PATH_7Z TEXT(STRING_PATH_SEPARATOR) TEXT("FM"); +// static const TCHAR *kLM_Path = REG_PATH_7Z TEXT(STRING_PATH_SEPARATOR) TEXT("FM"); + +static const WCHAR *kLangValueName = L"Lang"; +static const WCHAR *kEditor = L"Editor"; +static const WCHAR *kDiff = L"Diff"; +static const TCHAR *kShowDots = TEXT("ShowDots"); +static const TCHAR *kShowRealFileIcons = TEXT("ShowRealFileIcons"); +static const TCHAR *kShowSystemMenu = TEXT("ShowSystemMenu"); + +static const TCHAR *kFullRow = TEXT("FullRow"); +static const TCHAR *kShowGrid = TEXT("ShowGrid"); +static const TCHAR *kAlternativeSelection = TEXT("AlternativeSelection"); +// static const TCHAR *kLockMemoryAdd = TEXT("LockMemoryAdd"); +static const TCHAR *kLargePagesEnable = TEXT("LargePages"); +static const TCHAR *kSingleClick = TEXT("SingleClick"); +// static const TCHAR *kUnderline = TEXT("Underline"); + +static const TCHAR *kFlatViewName = TEXT("FlatViewArc"); + +static void SaveCuString(LPCTSTR keyPath, LPCWSTR valuePath, LPCWSTR value) +{ + CKey key; + key.Create(HKEY_CURRENT_USER, keyPath); + key.SetValue(valuePath, value); +} + +static void ReadCuString(LPCTSTR keyPath, LPCWSTR valuePath, UString &res) +{ + res.Empty(); + CKey key; + if (key.Open(HKEY_CURRENT_USER, keyPath, KEY_READ) == ERROR_SUCCESS) + key.QueryValue(valuePath, res); +} + +void SaveRegLang(const UString &path) { SaveCuString(kCUBasePath, kLangValueName, path); } +void ReadRegLang(UString &path) { ReadCuString(kCUBasePath, kLangValueName, path); } + +void SaveRegEditor(const UString &path) { SaveCuString(kCU_FMPath, kEditor, path); } +void ReadRegEditor(UString &path) { ReadCuString(kCU_FMPath, kEditor, path); } + +void SaveRegDiff(const UString &path) { SaveCuString(kCU_FMPath, kDiff, path); } +void ReadRegDiff(UString &path) { ReadCuString(kCU_FMPath, kDiff, path); } + +static void Save7ZipOption(const TCHAR *value, bool enabled) +{ + CKey key; + key.Create(HKEY_CURRENT_USER, kCUBasePath); + key.SetValue(value, enabled); +} + +static void SaveOption(const TCHAR *value, bool enabled) +{ + CKey key; + key.Create(HKEY_CURRENT_USER, kCU_FMPath); + key.SetValue(value, enabled); +} + +static bool Read7ZipOption(const TCHAR *value, bool defaultValue) +{ + CKey key; + if (key.Open(HKEY_CURRENT_USER, kCUBasePath, KEY_READ) == ERROR_SUCCESS) + { + bool enabled; + if (key.QueryValue(value, enabled) == ERROR_SUCCESS) + return enabled; + } + return defaultValue; +} + +static bool ReadOption(const TCHAR *value, bool defaultValue) +{ + CKey key; + if (key.Open(HKEY_CURRENT_USER, kCU_FMPath, KEY_READ) == ERROR_SUCCESS) + { + bool enabled; + if (key.QueryValue(value, enabled) == ERROR_SUCCESS) + return enabled; + } + return defaultValue; +} + +/* +static void SaveLmOption(const TCHAR *value, bool enabled) +{ + CKey key; + key.Create(HKEY_LOCAL_MACHINE, kLM_Path); + key.SetValue(value, enabled); +} + +static bool ReadLmOption(const TCHAR *value, bool defaultValue) +{ + CKey key; + if (key.Open(HKEY_LOCAL_MACHINE, kLM_Path, KEY_READ) == ERROR_SUCCESS) + { + bool enabled; + if (key.QueryValue(value, enabled) == ERROR_SUCCESS) + return enabled; + } + return defaultValue; +} +*/ + +void SaveShowDots(bool showDots) { SaveOption(kShowDots, showDots); } +bool ReadShowDots() { return ReadOption(kShowDots, false); } + +void SaveShowRealFileIcons(bool show) { SaveOption(kShowRealFileIcons, show); } +bool ReadShowRealFileIcons() { return ReadOption(kShowRealFileIcons, false); } + +void SaveShowSystemMenu(bool show) { SaveOption(kShowSystemMenu, show); } +bool ReadShowSystemMenu(){ return ReadOption(kShowSystemMenu, false); } + +void SaveFullRow(bool enable) { SaveOption(kFullRow, enable); } +bool ReadFullRow() { return ReadOption(kFullRow, false); } + +void SaveShowGrid(bool enable) { SaveOption(kShowGrid, enable); } +bool ReadShowGrid(){ return ReadOption(kShowGrid, false); } + +void SaveAlternativeSelection(bool enable) { SaveOption(kAlternativeSelection, enable); } +bool ReadAlternativeSelection(){ return ReadOption(kAlternativeSelection, false); } + +void SaveSingleClick(bool enable) { SaveOption(kSingleClick, enable); } +bool ReadSingleClick(){ return ReadOption(kSingleClick, false); } + +/* +void SaveUnderline(bool enable) { SaveOption(kUnderline, enable); } +bool ReadUnderline(){ return ReadOption(kUnderline, false); } +*/ + +// void SaveLockMemoryAdd(bool enable) { SaveLmOption(kLockMemoryAdd, enable); } +// bool ReadLockMemoryAdd() { return ReadLmOption(kLockMemoryAdd, true); } + +void SaveLockMemoryEnable(bool enable) { Save7ZipOption(kLargePagesEnable, enable); } +bool ReadLockMemoryEnable() { return Read7ZipOption(kLargePagesEnable, false); } + +static CSysString GetFlatViewName(UInt32 panelIndex) +{ + TCHAR panelString[16]; + ConvertUInt32ToString(panelIndex, panelString); + return (CSysString)kFlatViewName + panelString; +} + +void SaveFlatView(UInt32 panelIndex, bool enable) { SaveOption(GetFlatViewName(panelIndex), enable); } +bool ReadFlatView(UInt32 panelIndex) { return ReadOption(GetFlatViewName(panelIndex), false); } diff --git a/CPP/7zip/UI/FileManager/RegistryUtils.h b/CPP/7zip/UI/FileManager/RegistryUtils.h new file mode 100644 index 0000000..3bf0661 --- /dev/null +++ b/CPP/7zip/UI/FileManager/RegistryUtils.h @@ -0,0 +1,53 @@ +// RegistryUtils.h + +#ifndef __REGISTRY_UTILS_H +#define __REGISTRY_UTILS_H + +#include "Common/MyString.h" +#include "Common/Types.h" + +void SaveRegLang(const UString &path); +void ReadRegLang(UString &path); + +void SaveRegEditor(const UString &path); +void ReadRegEditor(UString &path); + +void SaveRegDiff(const UString &path); +void ReadRegDiff(UString &path); + +void SaveShowDots(bool showDots); +bool ReadShowDots(); + +void SaveShowRealFileIcons(bool show); +bool ReadShowRealFileIcons(); + +void SaveShowSystemMenu(bool showSystemMenu); +bool ReadShowSystemMenu(); + +void SaveFullRow(bool enable); +bool ReadFullRow(); + +void SaveShowGrid(bool enable); +bool ReadShowGrid(); + +void SaveAlternativeSelection(bool enable); +bool ReadAlternativeSelection(); + +// void SaveLockMemoryAdd(bool enable); +// bool ReadLockMemoryAdd(); + +bool ReadLockMemoryEnable(); +void SaveLockMemoryEnable(bool enable); + +void SaveSingleClick(bool enable); +bool ReadSingleClick(); + +/* +void SaveUnderline(bool enable); +bool ReadUnderline(); +*/ + +void SaveFlatView(UInt32 panelIndex, bool enable); +bool ReadFlatView(UInt32 panelIndex); + +#endif diff --git a/CPP/7zip/UI/FileManager/RootFolder.cpp b/CPP/7zip/UI/FileManager/RootFolder.cpp new file mode 100644 index 0000000..d868c79 --- /dev/null +++ b/CPP/7zip/UI/FileManager/RootFolder.cpp @@ -0,0 +1,278 @@ +// RootFolder.cpp + +#include "StdAfx.h" + +#include "resource.h" + +#include "RootFolder.h" + +#include "Common/StringConvert.h" +#include "../../PropID.h" +#include "Windows/Defs.h" +#include "Windows/PropVariant.h" + +#ifdef _WIN32 +#include "FSDrives.h" +#include "PhysDriveFolder.h" +#include "NetFolder.h" +#endif +#include "SysIconUtils.h" +#include "LangUtils.h" + +using namespace NWindows; + + +static const STATPROPSTG kProperties[] = +{ + { NULL, kpidName, VT_BSTR} +}; + +// static const wchar_t *kMyComputerTitle = L"Computer"; +// static const wchar_t *kMyNetworkTitle = L"Network"; + +#ifdef _WIN32 +UString RootFolder_GetName_Computer(int &iconIndex) +{ + iconIndex = GetIconIndexForCSIDL(CSIDL_DRIVES); + return LangString(IDS_COMPUTER, 0x03020300); +} + +UString RootFolder_GetName_Network(int &iconIndex) +{ + iconIndex = GetIconIndexForCSIDL(CSIDL_NETWORK); + return LangString(IDS_NETWORK, 0x03020301); +} + +UString RootFolder_GetName_Documents(int &iconIndex) +{ + iconIndex = GetIconIndexForCSIDL(CSIDL_PERSONAL); + return LangString(IDS_DOCUMENTS, 0x03020302); ; +} + +const int ROOT_INDEX_COMPUTER = 0; +const int ROOT_INDEX_DOCUMENTS = 1; +const int ROOT_INDEX_NETWORK = 2; + +void CRootFolder::Init() +{ + _names[ROOT_INDEX_COMPUTER] = RootFolder_GetName_Computer(_iconIndices[ROOT_INDEX_COMPUTER]); + _names[ROOT_INDEX_DOCUMENTS] = RootFolder_GetName_Documents(_iconIndices[ROOT_INDEX_DOCUMENTS]); + _names[ROOT_INDEX_NETWORK] = RootFolder_GetName_Network(_iconIndices[ROOT_INDEX_NETWORK]); +} +#else +void CRootFolder::Init() +{ +} +#endif + +STDMETHODIMP CRootFolder::LoadItems() +{ + Init(); + return S_OK; +} + +STDMETHODIMP CRootFolder::GetNumberOfItems(UInt32 *numItems) +{ +#ifdef _WIN32 + *numItems = kNumRootFolderItems; +#else + *numItems = 1; // only "/" ! +#endif + return S_OK; +} + +STDMETHODIMP CRootFolder::GetProperty(UInt32 itemIndex, PROPID propID, PROPVARIANT *value) +{ + NCOM::CPropVariant prop; + switch(propID) + { + case kpidIsDir: prop = true; break; +#ifdef _WIN32 + case kpidName: prop = _names[itemIndex]; break; +#else + case kpidName: prop = L"/"; break; +#endif + } + prop.Detach(value); + return S_OK; +} + +#ifdef _WIN32 +UString GetMyDocsPath() +{ + UString us; + WCHAR s[MAX_PATH + 1]; + if (SHGetSpecialFolderPathW(0, s, CSIDL_PERSONAL, FALSE)) + us = s; + #ifndef _UNICODE + else + { + CHAR s2[MAX_PATH + 1]; + if (SHGetSpecialFolderPathA(0, s2, CSIDL_PERSONAL, FALSE)) + us = GetUnicodeString(s2); + } + #endif + if (us.Length() > 0 && us[us.Length() - 1] != L'\\') + us += L'\\'; + return us; +} +#endif + +STDMETHODIMP CRootFolder::BindToFolder(UInt32 index, IFolderFolder **resultFolder) +{ +#ifdef _WIN32 + if (index == ROOT_INDEX_COMPUTER) + { + CFSDrives *fsDrivesSpec = new CFSDrives; + CMyComPtr subFolder = fsDrivesSpec; + fsDrivesSpec->Init(); + *resultFolder = subFolder.Detach(); + } + else if (index == ROOT_INDEX_NETWORK) + { + CNetFolder *netFolderSpec = new CNetFolder; + CMyComPtr subFolder = netFolderSpec; + netFolderSpec->Init(0, 0, _names[ROOT_INDEX_NETWORK] + L'\\'); + *resultFolder = subFolder.Detach(); + } + else if (index == ROOT_INDEX_DOCUMENTS) + { + UString s = GetMyDocsPath(); + if (!s.IsEmpty()) + { + NFsFolder::CFSFolder *fsFolderSpec = new NFsFolder::CFSFolder; + CMyComPtr subFolder = fsFolderSpec; + RINOK(fsFolderSpec->Init(s, NULL)); + *resultFolder = subFolder.Detach(); + } + } + else + return E_INVALIDARG; + return S_OK; +#else + return E_INVALIDARG; +#endif +} + +static bool AreEqualNames(const UString &name1, const UString &name2) +{ + return (name1 == name2 || name1 == (name2 + UString(WCHAR_PATH_SEPARATOR))); +} + +STDMETHODIMP CRootFolder::BindToFolder(const wchar_t *name, IFolderFolder **resultFolder) +{ + *resultFolder = 0; + UString name2 = name; + name2.Trim(); + if (name2.IsEmpty()) + { + CRootFolder *rootFolderSpec = new CRootFolder; + CMyComPtr rootFolder = rootFolderSpec; + rootFolderSpec->Init(); + *resultFolder = rootFolder.Detach(); + return S_OK; + } +#ifdef _WIN32 + for (int i = 0; i < kNumRootFolderItems; i++) + if (AreEqualNames(name2, _names[i])) + return BindToFolder((UInt32)i, resultFolder); + if (AreEqualNames(name2, L"My Documents") || + AreEqualNames(name2, L"Documents")) + return BindToFolder((UInt32)ROOT_INDEX_DOCUMENTS, resultFolder); + if (AreEqualNames(name2, L"My Computer") || + AreEqualNames(name2, L"Computer")) + return BindToFolder((UInt32)ROOT_INDEX_COMPUTER, resultFolder); +#endif + if (name2 == UString(WCHAR_PATH_SEPARATOR)) + { + CMyComPtr subFolder = this; + *resultFolder = subFolder.Detach(); + return S_OK; + } + + if (name2.Length () < 2) + return E_INVALIDARG; + + CMyComPtr subFolder; + +#ifdef _WIN32 + if (name2.Left(4) == L"\\\\.\\") + { + CPhysDriveFolder *folderSpec = new CPhysDriveFolder; + subFolder = folderSpec; + RINOK(folderSpec->Init(name2.Mid(4, 2))); + } + else +#endif + { + if (name2[name2.Length () - 1] != WCHAR_PATH_SEPARATOR) + name2 += WCHAR_PATH_SEPARATOR; + NFsFolder::CFSFolder *fsFolderSpec = new NFsFolder::CFSFolder; + subFolder = fsFolderSpec; + if (fsFolderSpec->Init(name2, 0) != S_OK) + { +#ifdef _WIN32 + if (name2[0] == WCHAR_PATH_SEPARATOR) + { + CNetFolder *netFolderSpec = new CNetFolder; + subFolder = netFolderSpec; + netFolderSpec->Init(name2); + } + else +#endif + return E_INVALIDARG; + } + } + *resultFolder = subFolder.Detach(); + return S_OK; +} + +STDMETHODIMP CRootFolder::BindToParentFolder(IFolderFolder **resultFolder) +{ + *resultFolder = 0; + return S_OK; +} + +STDMETHODIMP CRootFolder::GetNumberOfProperties(UInt32 *numProperties) +{ + *numProperties = sizeof(kProperties) / sizeof(kProperties[0]); + return S_OK; +} + +STDMETHODIMP CRootFolder::GetPropertyInfo(UInt32 index, + BSTR *name, PROPID *propID, VARTYPE *varType) +{ + if (index >= sizeof(kProperties) / sizeof(kProperties[0])) + return E_INVALIDARG; + const STATPROPSTG &prop = kProperties[index]; + *propID = prop.propid; + *varType = prop.vt; + *name = 0; + return S_OK; +} + +STDMETHODIMP CRootFolder::GetFolderProperty(PROPID propID, PROPVARIANT *value) +{ + NWindows::NCOM::CPropVariant prop; + switch(propID) + { + case kpidType: prop = L"RootFolder"; break; + case kpidPath: prop = L""; break; + } + prop.Detach(value); + return S_OK; +} + +STDMETHODIMP CRootFolder::GetSystemIconIndex(UInt32 index, INT32 *iconIndex) +{ +#ifdef _WIN32 + *iconIndex = _iconIndices[index]; +#else + *iconIndex = -1; // FIXME - folder icon ? +#endif + return S_OK; +} + + + + diff --git a/CPP/7zip/UI/FileManager/RootFolder.h b/CPP/7zip/UI/FileManager/RootFolder.h new file mode 100644 index 0000000..a65bb76 --- /dev/null +++ b/CPP/7zip/UI/FileManager/RootFolder.h @@ -0,0 +1,38 @@ +// RootFolder.h + +#ifndef __ROOTFOLDER_H +#define __ROOTFOLDER_H + +#include "Common/MyString.h" + +#include "Windows/PropVariant.h" + +#include "FSFolder.h" + +#ifdef _WIN32 +const int kNumRootFolderItems = 3; +#endif + +class CRootFolder: + public IFolderFolder, + public IFolderGetSystemIconIndex, + public CMyUnknownImp +{ +public: + MY_UNKNOWN_IMP1( + IFolderGetSystemIconIndex + ) + + INTERFACE_FolderFolder(;) + + STDMETHOD(GetSystemIconIndex)(UInt32 index, INT32 *iconIndex); + + void Init(); +private: +#ifdef _WIN32 + UString _names[kNumRootFolderItems]; + int _iconIndices[kNumRootFolderItems]; +#endif +}; + +#endif diff --git a/CPP/7zip/UI/FileManager/SplitDialog.cpp b/CPP/7zip/UI/FileManager/SplitDialog.cpp new file mode 100644 index 0000000..2249c0a --- /dev/null +++ b/CPP/7zip/UI/FileManager/SplitDialog.cpp @@ -0,0 +1,118 @@ +// SplitDialog.cpp + +#include "StdAfx.h" + +#include "Windows/FileName.h" + +#ifdef LANG +#include "LangUtils.h" +#endif + +#include "BrowseDialog.h" +#include "CopyDialogRes.h" +#include "SplitDialog.h" +#include "SplitUtils.h" +#include "resourceGui.h" + +using namespace NWindows; + +#ifdef LANG +static CIDLangPair kIDLangPairs[] = +{ + { IDC_STATIC_SPLIT_PATH, 0x03020501 }, + { IDC_STATIC_SPLIT_VOLUME, 0x02000D40 }, +}; +#endif + + +bool CSplitDialog::OnInit() +{ + #ifdef LANG + LangSetWindowText(HWND(*this), 0x03020500); + LangSetDlgItemsText(HWND(*this), kIDLangPairs, sizeof(kIDLangPairs) / sizeof(kIDLangPairs[0])); + #endif + _pathCombo.Attach(GetItem(IDC_COMBO_SPLIT_PATH)); + _volumeCombo.Attach(GetItem(IDC_COMBO_SPLIT_VOLUME)); + + if (!FilePath.IsEmpty()) + { + UString title; + GetText(title); + title += L' '; + title += FilePath; + SetText(title); + } + _pathCombo.SetText(Path); + AddVolumeItems(_volumeCombo); + _volumeCombo.SetCurSel(0); + NormalizeSize(); + return CModalDialog::OnInit(); +} + +#ifdef _WIN32 +bool CSplitDialog::OnSize(WPARAM /* wParam */, int xSize, int ySize) +{ + int mx, my; + GetMargins(8, mx, my); + int bx1, bx2, by; + GetItemSizes(IDCANCEL, bx1, by); + GetItemSizes(IDOK, bx2, by); + int yPos = ySize - my - by; + int xPos = xSize - mx - bx1; + + InvalidateRect(NULL); + + { + RECT rect; + GetClientRectOfItem(IDC_BUTTON_SPLIT_PATH, rect); + int bx = rect.right - rect.left; + MoveItem(IDC_BUTTON_SPLIT_PATH, xSize - mx - bx, rect.top, bx, rect.bottom - rect.top); + ChangeSubWindowSizeX(_pathCombo, xSize - mx - mx - bx - mx); + } + + MoveItem(IDCANCEL, xPos, yPos, bx1, by); + MoveItem(IDOK, xPos - mx - bx2, yPos, bx2, by); + + return false; +} +#endif + +bool CSplitDialog::OnButtonClicked(int buttonID, HWND buttonHWND) +{ + switch(buttonID) + { + case IDC_BUTTON_SPLIT_PATH: + OnButtonSetPath(); + return true; + } + return CModalDialog::OnButtonClicked(buttonID, buttonHWND); +} + +void CSplitDialog::OnButtonSetPath() +{ + UString currentPath; + _pathCombo.GetText(currentPath); + // UString title = L"Specify a location for output folder"; + UString title = LangStringSpec(IDS_SET_FOLDER, 0x03020209); + + UString resultPath; + if (!MyBrowseForFolder(HWND(*this), title, currentPath, resultPath)) + return; + NFile::NName::NormalizeDirPathPrefix(resultPath); + _pathCombo.SetCurSel(-1); + _pathCombo.SetText(resultPath); +} + +void CSplitDialog::OnOK() +{ + _pathCombo.GetText(Path); + UString volumeString; + _volumeCombo.GetText(volumeString); + volumeString.Trim(); + if (!ParseVolumeSizes(volumeString, VolumeSizes) || VolumeSizes.Size() == 0) + { + ::MessageBoxW(*this, LangString(IDS_INCORRECT_VOLUME_SIZE, 0x02000D41), L"7-Zip", 0); + return; + } + CModalDialog::OnOK(); +} diff --git a/CPP/7zip/UI/FileManager/SplitDialog.h b/CPP/7zip/UI/FileManager/SplitDialog.h new file mode 100644 index 0000000..c9455a6 --- /dev/null +++ b/CPP/7zip/UI/FileManager/SplitDialog.h @@ -0,0 +1,28 @@ +// SplitDialog.h + +#ifndef __SPLIT_DIALOG_H +#define __SPLIT_DIALOG_H + +#include "Windows/Control/Dialog.h" +#include "Windows/Control/ComboBox.h" + +#include "SplitDialogRes.h" + +class CSplitDialog: public NWindows::NControl::CModalDialog +{ + NWindows::NControl::CComboBox _pathCombo; + NWindows::NControl::CComboBox _volumeCombo; + virtual void OnOK(); + virtual bool OnInit(); + // FIXME virtual bool OnSize(WPARAM wParam, int xSize, int ySize); + virtual bool OnButtonClicked(int buttonID, HWND buttonHWND); + void OnButtonSetPath(); +public: + UString FilePath; + UString Path; + CRecordVector VolumeSizes; + INT_PTR Create(HWND parentWindow = 0) + { return CModalDialog::Create(IDD_DIALOG_SPLIT, parentWindow); } +}; + +#endif diff --git a/CPP/7zip/UI/FileManager/SplitDialogRes.h b/CPP/7zip/UI/FileManager/SplitDialogRes.h new file mode 100644 index 0000000..a6f06d1 --- /dev/null +++ b/CPP/7zip/UI/FileManager/SplitDialogRes.h @@ -0,0 +1,7 @@ +#define IDD_DIALOG_SPLIT 504 +#define IDC_STATIC_SPLIT_PATH 1000 +#define IDC_COMBO_SPLIT_PATH 1001 +#define IDC_BUTTON_SPLIT_PATH 1002 +#define IDC_STATIC_SPLIT_VOLUME 1010 +#define IDC_COMBO_SPLIT_VOLUME 1011 + diff --git a/CPP/7zip/UI/FileManager/SplitDialog_rc.cpp b/CPP/7zip/UI/FileManager/SplitDialog_rc.cpp new file mode 100644 index 0000000..36afa11 --- /dev/null +++ b/CPP/7zip/UI/FileManager/SplitDialog_rc.cpp @@ -0,0 +1,81 @@ +// PasswordDialog.cpp + +#include "StdAfx.h" + +// For compilers that support precompilation, includes "wx/wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +// for all others, include the necessary headers (this file is usually all you +// need because it includes almost all "standard" wxWidgets headers) +#ifndef WX_PRECOMP + #include "wx/wx.h" +#endif + +#undef _WIN32 + +#include "Windows/Control/DialogImpl.h" + +#include "SplitDialogRes.h" + +class CSplitDialogImpl : public NWindows::NControl::CModalDialogImpl +{ + public: + CSplitDialogImpl(NWindows::NControl::CModalDialog *dialog,wxWindow * parent,int id) : CModalDialogImpl(dialog, parent, id, wxT("Split File")) + { + + wxArrayString pathArray; + + wxBoxSizer* topsizer = new wxBoxSizer(wxVERTICAL); + + + topsizer->Add(new wxStaticText(this, IDC_STATIC_SPLIT_PATH, _T("&Split to:")) , 0 ,wxALL | wxALIGN_LEFT, 5 ); + + + { + wxBoxSizer *pathSizer = new wxBoxSizer(wxHORIZONTAL); + + wxComboBox *combo = new wxComboBox(this, IDC_COMBO_SPLIT_PATH, wxEmptyString, wxDefaultPosition, wxSize(600,-1), pathArray, wxCB_DROPDOWN|wxCB_SORT); + wxButton *button = new wxButton(this, IDC_BUTTON_SPLIT_PATH, wxT("..."), wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT); + pathSizer->Add(combo, 1, wxLEFT|wxRIGHT|wxEXPAND, 5); + pathSizer->Add(button, 0, wxLEFT|wxRIGHT|wxEXPAND, 5); + + topsizer->Add(pathSizer, 0 ,wxALL | wxALIGN_LEFT, 5 ); + } + + topsizer->Add(new wxStaticText(this, IDC_STATIC_SPLIT_VOLUME, _T("Split to &volumes, bytes:")) , 0 ,wxALL | wxALIGN_LEFT, 5 ); + + wxComboBox *combo = new wxComboBox(this, IDC_COMBO_SPLIT_VOLUME, wxEmptyString, wxDefaultPosition, wxSize(600,-1), pathArray, wxCB_DROPDOWN|wxCB_SORT); + + topsizer->Add(combo, 0 ,wxALL | wxALIGN_LEFT, 5 ); + + + topsizer->Add(CreateButtonSizer(wxOK|wxCANCEL), 0, wxALL|wxEXPAND, 5); + + this->OnInit(); + + SetSizer(topsizer); // use the sizer for layout + topsizer->SetSizeHints(this); // set size hints to honour minimum size + } +private: + // Any class wishing to process wxWindows events must use this macro + DECLARE_EVENT_TABLE() +}; + +static CStringTable g_stringTable[] = +{ + { 0 , 0 } +}; + + +REGISTER_DIALOG(IDD_DIALOG_SPLIT,CSplitDialog,g_stringTable) + +BEGIN_EVENT_TABLE(CSplitDialogImpl, wxDialog) + EVT_BUTTON(wxID_ANY, CModalDialogImpl::OnAnyButton) + EVT_CHECKBOX(wxID_ANY, CModalDialogImpl::OnAnyButton) + EVT_MENU(WORKER_EVENT, CModalDialogImpl::OnWorkerEvent) +END_EVENT_TABLE() + diff --git a/CPP/7zip/UI/FileManager/SplitUtils.cpp b/CPP/7zip/UI/FileManager/SplitUtils.cpp new file mode 100644 index 0000000..8bae057 --- /dev/null +++ b/CPP/7zip/UI/FileManager/SplitUtils.cpp @@ -0,0 +1,86 @@ +// SplitUtils.cpp + +#include "StdAfx.h" + +#include "Common/StringToInt.h" + +#include "SplitUtils.h" +#include "StringUtils.h" + +bool ParseVolumeSizes(const UString &s, CRecordVector &values) +{ + values.Clear(); + UStringVector destStrings; + SplitString(s, destStrings); + bool prevIsNumber = false; + for (int i = 0; i < destStrings.Size(); i++) + { + UString subString = destStrings[i]; + subString.MakeUpper(); + if (subString.IsEmpty()) + return false; + if (subString == L"-") + return true; + if (prevIsNumber) + { + wchar_t c = subString[0]; + UInt64 &value = values.Back(); + prevIsNumber = false; + switch(c) + { + case L'B': + continue; + case L'K': + value <<= 10; + continue; + case L'M': + value <<= 20; + continue; + case L'G': + value <<= 30; + continue; + } + } + const wchar_t *start = subString; + const wchar_t *end; + UInt64 value = ConvertStringToUInt64(start, &end); + if (start == end) + return false; + if (value == 0) + return false; + values.Add(value); + prevIsNumber = true; + UString rem = subString.Mid((int)(end - start)); + if (!rem.IsEmpty()) + destStrings.Insert(i + 1, rem); + } + return true; +} + +void AddVolumeItems(NWindows::NControl::CComboBox &volumeCombo) +{ + volumeCombo.AddString(TEXT("10M")); + volumeCombo.AddString(TEXT("650M - CD")); + volumeCombo.AddString(TEXT("700M - CD")); + volumeCombo.AddString(TEXT("4480M - DVD")); + volumeCombo.AddString(TEXT("1457664 - 3.5\" floppy")); +} + +UInt64 GetNumberOfVolumes(UInt64 size, CRecordVector &volSizes) +{ + if (size == 0 || volSizes.Size() == 0) + return 1; + UInt64 numVolumes = 0; + for (int i = 0; i < volSizes.Size(); i++) + { + UInt64 volSize = volSizes[i]; + numVolumes++; + if (volSize >= size) + return numVolumes; + size -= volSize; + } + UInt64 volSize = volSizes.Back(); + if (volSize == 0) + return (UInt64)(Int64)-1; + return numVolumes + (size - 1) / volSize + 1; +} diff --git a/CPP/7zip/UI/FileManager/SplitUtils.h b/CPP/7zip/UI/FileManager/SplitUtils.h new file mode 100644 index 0000000..755c707 --- /dev/null +++ b/CPP/7zip/UI/FileManager/SplitUtils.h @@ -0,0 +1,15 @@ +// SplitUtils.h + +#ifndef __SPLITUTILS_H +#define __SPLITUTILS_H + +#include "Common/MyString.h" +#include "Common/Types.h" +#include "Windows/Control/ComboBox.h" + +bool ParseVolumeSizes(const UString &s, CRecordVector &values); +void AddVolumeItems(NWindows::NControl::CComboBox &volumeCombo); + +UInt64 GetNumberOfVolumes(UInt64 size, CRecordVector &volSizes); + +#endif diff --git a/CPP/7zip/UI/FileManager/StringUtils.cpp b/CPP/7zip/UI/FileManager/StringUtils.cpp new file mode 100644 index 0000000..bddaa97 --- /dev/null +++ b/CPP/7zip/UI/FileManager/StringUtils.cpp @@ -0,0 +1,68 @@ +// StringUtils.cpp + +#include "StdAfx.h" + +#include "StringUtils.h" + +void SplitStringToTwoStrings(const UString &src, UString &dest1, UString &dest2) +{ + dest1.Empty(); + dest2.Empty(); + bool quoteMode = false; + int i; + for (i = 0; i < src.Length(); i++) + { + wchar_t c = src[i]; + if (c == L'\"') + quoteMode = !quoteMode; + else if (c == L' ' && !quoteMode) + { + if (!quoteMode) + { + i++; + break; + } + } + else + dest1 += c; + } + dest2 = src.Mid(i); +} + +void SplitString(const UString &srcString, UStringVector &destStrings) +{ + destStrings.Clear(); + UString string; + int len = srcString.Length(); + if (len == 0) + return; + for (int i = 0; i < len; i++) + { + wchar_t c = srcString[i]; + if (c == L' ') + { + if (!string.IsEmpty()) + { + destStrings.Add(string); + string.Empty(); + } + } + else + string += c; + } + if (!string.IsEmpty()) + destStrings.Add(string); +} + +UString JoinStrings(const UStringVector &srcStrings) +{ + UString destString; + for (int i = 0; i < srcStrings.Size(); i++) + { + if (i != 0) + destString += L' '; + destString += srcStrings[i]; + } + return destString; +} + diff --git a/CPP/7zip/UI/FileManager/StringUtils.h b/CPP/7zip/UI/FileManager/StringUtils.h new file mode 100644 index 0000000..7f72b76 --- /dev/null +++ b/CPP/7zip/UI/FileManager/StringUtils.h @@ -0,0 +1,13 @@ +// StringUtils.h + +#ifndef __STRINGUTILS_H +#define __STRINGUTILS_H + +#include "Common/MyString.h" + +void SplitStringToTwoStrings(const UString &src, UString &dest1, UString &dest2); + +void SplitString(const UString &srcString, UStringVector &destStrings); +UString JoinStrings(const UStringVector &srcStrings); + +#endif diff --git a/CPP/7zip/UI/FileManager/SysIconUtils.cpp b/CPP/7zip/UI/FileManager/SysIconUtils.cpp new file mode 100644 index 0000000..e28bd09 --- /dev/null +++ b/CPP/7zip/UI/FileManager/SysIconUtils.cpp @@ -0,0 +1,173 @@ +// SysIconUtils.cpp + +#include "StdAfx.h" + +#ifndef _UNICODE +#include "Common/StringConvert.h" +#endif + +#include "SysIconUtils.h" + +#ifndef _UNICODE +extern bool g_IsNT; +#endif + +#ifdef _WIN32 + +int GetIconIndexForCSIDL(int csidl) +{ + LPITEMIDLIST pidl = 0; + SHGetSpecialFolderLocation(NULL, csidl, &pidl); + if (pidl) + { + SHFILEINFO shellInfo; + SHGetFileInfo(LPCTSTR(pidl), FILE_ATTRIBUTE_NORMAL, + &shellInfo, sizeof(shellInfo), + SHGFI_PIDL | SHGFI_SYSICONINDEX); + IMalloc *pMalloc; + SHGetMalloc(&pMalloc); + if(pMalloc) + { + pMalloc->Free(pidl); + pMalloc->Release(); + } + return shellInfo.iIcon; + } + return 0; +} + +DWORD_PTR GetRealIconIndex(LPCTSTR path, DWORD attrib, int &iconIndex) +{ + SHFILEINFO shellInfo; + DWORD_PTR res = ::SHGetFileInfo(path, FILE_ATTRIBUTE_NORMAL | attrib, &shellInfo, + sizeof(shellInfo), SHGFI_USEFILEATTRIBUTES | SHGFI_SYSICONINDEX); + iconIndex = shellInfo.iIcon; + return res; +} + + +#ifndef _UNICODE +typedef int (WINAPI * SHGetFileInfoWP)(LPCWSTR pszPath, DWORD attrib, SHFILEINFOW *psfi, UINT cbFileInfo, UINT uFlags); + +struct CSHGetFileInfoInit +{ + SHGetFileInfoWP shGetFileInfoW; + CSHGetFileInfoInit() + { + shGetFileInfoW = (SHGetFileInfoWP) + ::GetProcAddress(::GetModuleHandleW(L"shell32.dll"), "SHGetFileInfoW"); + } +} g_SHGetFileInfoInit; +#endif + +static DWORD_PTR MySHGetFileInfoW(LPCWSTR pszPath, DWORD attrib, SHFILEINFOW *psfi, UINT cbFileInfo, UINT uFlags) +{ + #ifdef _UNICODE + return SHGetFileInfo( + #else + if (g_SHGetFileInfoInit.shGetFileInfoW == 0) + return 0; + return g_SHGetFileInfoInit.shGetFileInfoW( + #endif + pszPath, attrib, psfi, cbFileInfo, uFlags); +} + +#ifndef _UNICODE +// static inline UINT GetCurrentCodePage() { return ::AreFileApisANSI() ? CP_ACP : CP_OEMCP; } +DWORD_PTR GetRealIconIndex(LPCWSTR path, DWORD attrib, int &iconIndex) +{ + if(g_IsNT) + { + SHFILEINFOW shellInfo; + DWORD_PTR res = ::MySHGetFileInfoW(path, FILE_ATTRIBUTE_NORMAL | attrib, &shellInfo, + sizeof(shellInfo), SHGFI_USEFILEATTRIBUTES | SHGFI_SYSICONINDEX); + iconIndex = shellInfo.iIcon; + return res; + } + else + return GetRealIconIndex(UnicodeStringToMultiByte(path), attrib, iconIndex); +} +#endif + +DWORD_PTR GetRealIconIndex(const UString &fileName, DWORD attrib, + int &iconIndex, UString &typeName) +{ + #ifndef _UNICODE + if(!g_IsNT) + { + SHFILEINFO shellInfo; + shellInfo.szTypeName[0] = 0; + DWORD_PTR res = ::SHGetFileInfoA(GetSystemString(fileName), FILE_ATTRIBUTE_NORMAL | attrib, &shellInfo, + sizeof(shellInfo), SHGFI_USEFILEATTRIBUTES | SHGFI_SYSICONINDEX | SHGFI_TYPENAME); + typeName = GetUnicodeString(shellInfo.szTypeName); + iconIndex = shellInfo.iIcon; + return res; + } + else + #endif + { + SHFILEINFOW shellInfo; + shellInfo.szTypeName[0] = 0; + DWORD_PTR res = ::MySHGetFileInfoW(fileName, FILE_ATTRIBUTE_NORMAL | attrib, &shellInfo, + sizeof(shellInfo), SHGFI_USEFILEATTRIBUTES | SHGFI_SYSICONINDEX | SHGFI_TYPENAME); + typeName = shellInfo.szTypeName; + iconIndex = shellInfo.iIcon; + return res; + } +} + +int CExtToIconMap::GetIconIndex(DWORD attrib, const UString &fileName, UString &typeName) +{ + int dotPos = fileName.ReverseFind(L'.'); + if ((attrib & FILE_ATTRIBUTE_DIRECTORY) != 0 || dotPos < 0) + { + CAttribIconPair pair; + pair.Attrib = attrib; + int index = _attribMap.FindInSorted(pair); + if (index >= 0) + { + typeName = _attribMap[index].TypeName; + return _attribMap[index].IconIndex; + } + GetRealIconIndex( + #ifdef UNDER_CE + L"\\" + #endif + L"__File__" + , attrib, pair.IconIndex, pair.TypeName); + _attribMap.AddToSorted(pair); + typeName = pair.TypeName; + return pair.IconIndex; + } + + CExtIconPair pair; + pair.Ext = fileName.Mid(dotPos + 1); + int index = _extMap.FindInSorted(pair); + if (index >= 0) + { + typeName = _extMap[index].TypeName; + return _extMap[index].IconIndex; + } + GetRealIconIndex(fileName.Mid(dotPos), attrib, pair.IconIndex, pair.TypeName); + _extMap.AddToSorted(pair); + typeName = pair.TypeName; + return pair.IconIndex; +} + +int CExtToIconMap::GetIconIndex(DWORD attrib, const UString &fileName) +{ + UString typeName; + return GetIconIndex(attrib, fileName, typeName); +} +#else +DWORD_PTR GetRealIconIndex(LPCTSTR path, DWORD attrib, int &iconIndex) +{ + iconIndex = -1; + return -1; +} +int CExtToIconMap::GetIconIndex(DWORD attrib, const UString &fileName) +{ + return -1; +} +#endif + diff --git a/CPP/7zip/UI/FileManager/SysIconUtils.h b/CPP/7zip/UI/FileManager/SysIconUtils.h new file mode 100644 index 0000000..4933ebb --- /dev/null +++ b/CPP/7zip/UI/FileManager/SysIconUtils.h @@ -0,0 +1,59 @@ +// SysIconUtils.h + +#ifndef __SYS_ICON_UTILS_H +#define __SYS_ICON_UTILS_H + +#include "Common/MyString.h" + +struct CExtIconPair +{ + UString Ext; + int IconIndex; + UString TypeName; +}; + +struct CAttribIconPair +{ + DWORD Attrib; + int IconIndex; + UString TypeName; +}; + +inline bool operator==(const CExtIconPair &a1, const CExtIconPair &a2) { return a1.Ext == a2.Ext; } +inline bool operator< (const CExtIconPair &a1, const CExtIconPair &a2) { return a1.Ext < a2.Ext; } + +inline bool operator==(const CAttribIconPair &a1, const CAttribIconPair &a2) { return a1.Attrib == a2.Attrib; } +inline bool operator< (const CAttribIconPair &a1, const CAttribIconPair &a2) { return a1.Attrib < a2.Attrib; } + +class CExtToIconMap +{ + CObjectVector _extMap; + CObjectVector _attribMap; +public: + void Clear() + { + _extMap.Clear(); + _attribMap.Clear(); + } + int GetIconIndex(DWORD attrib, const UString &fileName, UString &typeName); + int GetIconIndex(DWORD attrib, const UString &fileName); +}; + +DWORD_PTR GetRealIconIndex(LPCTSTR path, DWORD attrib, int &iconIndex); +#ifndef _UNICODE +DWORD_PTR GetRealIconIndex(LPCWSTR path, DWORD attrib, int &iconIndex); +#endif +int GetIconIndexForCSIDL(int csidl); + +#ifdef WIN32 +inline HIMAGELIST GetSysImageList(bool smallIcons) +{ + SHFILEINFO shellInfo; + return (HIMAGELIST)SHGetFileInfo(TEXT(""), + FILE_ATTRIBUTE_NORMAL | FILE_ATTRIBUTE_DIRECTORY, + &shellInfo, sizeof(shellInfo), + SHGFI_USEFILEATTRIBUTES | SHGFI_SYSICONINDEX | (smallIcons ? SHGFI_SMALLICON : SHGFI_ICON)); +} +#endif + +#endif diff --git a/CPP/7zip/UI/FileManager/TextPairs.cpp b/CPP/7zip/UI/FileManager/TextPairs.cpp new file mode 100644 index 0000000..cc57c0d --- /dev/null +++ b/CPP/7zip/UI/FileManager/TextPairs.cpp @@ -0,0 +1,189 @@ +// TextPairs.cpp + +#include "StdAfx.h" + +#include "TextPairs.h" + +static const wchar_t kNewLineChar = '\n'; +static const wchar_t kQuoteChar = '\"'; + +static const wchar_t kBOM = (wchar_t)0xFEFF; + +static bool IsSeparatorChar(wchar_t c) +{ + return (c == ' ' || c == '\t'); +} + +static void RemoveCr(UString &s) +{ + s.Replace(L"\x0D", L""); +} + +static UString GetIDString(const wchar_t *srcString, int &finishPos) +{ + UString result; + bool quotes = false; + for (finishPos = 0;;) + { + wchar_t c = srcString[finishPos]; + if (c == 0) + break; + finishPos++; + bool isSeparatorChar = IsSeparatorChar(c); + if (c == kNewLineChar || (isSeparatorChar && !quotes) + || (c == kQuoteChar && quotes)) + break; + else if (c == kQuoteChar) + quotes = true; + else + result += c; + } + result.Trim(); + RemoveCr(result); + return result; +} + +static UString GetValueString(const wchar_t *srcString, int &finishPos) +{ + UString result; + for (finishPos = 0;;) + { + wchar_t c = srcString[finishPos]; + if (c == 0) + break; + finishPos++; + if (c == kNewLineChar) + break; + result += c; + } + result.Trim(); + RemoveCr(result); + return result; +} + +static bool GetTextPairs(const UString &srcString, CObjectVector &pairs) +{ + pairs.Clear(); + int pos = 0; + + if (srcString.Length() > 0) + { + if (srcString[0] == kBOM) + pos++; + } + while (pos < srcString.Length()) + { + int finishPos; + UString id = GetIDString((const wchar_t *)srcString + pos, finishPos); + pos += finishPos; + if (id.IsEmpty()) + continue; + UString value = GetValueString((const wchar_t *)srcString + pos, finishPos); + pos += finishPos; + if (!id.IsEmpty()) + { + CTextPair pair; + pair.ID = id; + pair.Value = value; + pairs.Add(pair); + } + } + return true; +} + +static int ComparePairIDs(const UString &s1, const UString &s2) + { return s1.CompareNoCase(s2); } +static int ComparePairItems(const CTextPair &p1, const CTextPair &p2) + { return ComparePairIDs(p1.ID, p2.ID); } + +static int ComparePairItems(void *const *a1, void *const *a2, void * /* param */) + { return ComparePairItems(**(const CTextPair **)a1, **(const CTextPair **)a2); } + +void CPairsStorage::Sort() { Pairs.Sort(ComparePairItems, 0); } + +int CPairsStorage::FindID(const UString &id, int &insertPos) +{ + int left = 0, right = Pairs.Size(); + while (left != right) + { + int mid = (left + right) / 2; + int compResult = ComparePairIDs(id, Pairs[mid].ID); + if (compResult == 0) + return mid; + if (compResult < 0) + right = mid; + else + left = mid + 1; + } + insertPos = left; + return -1; +} + +int CPairsStorage::FindID(const UString &id) +{ + int pos; + return FindID(id, pos); +} + +void CPairsStorage::AddPair(const CTextPair &pair) +{ + int insertPos; + int pos = FindID(pair.ID, insertPos); + if (pos >= 0) + Pairs[pos] = pair; + else + Pairs.Insert(insertPos, pair); +} + +void CPairsStorage::DeletePair(const UString &id) +{ + int pos = FindID(id); + if (pos >= 0) + Pairs.Delete(pos); +} + +bool CPairsStorage::GetValue(const UString &id, UString &value) +{ + value.Empty(); + int pos = FindID(id); + if (pos < 0) + return false; + value = Pairs[pos].Value; + return true; +} + +UString CPairsStorage::GetValue(const UString &id) +{ + int pos = FindID(id); + if (pos < 0) + return UString(); + return Pairs[pos].Value; +} + +bool CPairsStorage::ReadFromString(const UString &text) +{ + bool result = ::GetTextPairs(text, Pairs); + if (result) + Sort(); + else + Pairs.Clear(); + return result; +} + +void CPairsStorage::SaveToString(UString &text) +{ + for (int i = 0; i < Pairs.Size(); i++) + { + const CTextPair &pair = Pairs[i]; + bool multiWord = (pair.ID.Find(L' ') >= 0); + if (multiWord) + text += L'\"'; + text += pair.ID; + if (multiWord) + text += L'\"'; + text += L' '; + text += pair.Value; + text += L'\x0D'; + text += L'\n'; + } +} diff --git a/CPP/7zip/UI/FileManager/TextPairs.h b/CPP/7zip/UI/FileManager/TextPairs.h new file mode 100644 index 0000000..2670e03 --- /dev/null +++ b/CPP/7zip/UI/FileManager/TextPairs.h @@ -0,0 +1,31 @@ +// TextPairs.h + +#ifndef __FM_TEXT_PAIRS_H +#define __FM_TEXT_PAIRS_H + +#include "Common/MyString.h" + +struct CTextPair +{ + UString ID; + UString Value; +}; + +class CPairsStorage +{ + CObjectVector Pairs; + int FindID(const UString &id, int &insertPos); + int FindID(const UString &id); + void Sort(); +public: + void Clear() { Pairs.Clear(); }; + bool ReadFromString(const UString &text); + void SaveToString(UString &text); + + bool GetValue(const UString &id, UString &value); + UString GetValue(const UString &id); + void AddPair(const CTextPair &pair); + void DeletePair(const UString &id); +}; + +#endif diff --git a/CPP/7zip/UI/FileManager/UpdateCallback100.cpp b/CPP/7zip/UI/FileManager/UpdateCallback100.cpp new file mode 100644 index 0000000..43dfa4d --- /dev/null +++ b/CPP/7zip/UI/FileManager/UpdateCallback100.cpp @@ -0,0 +1,90 @@ +// UpdateCallback100.cpp + +#include "StdAfx.h" + +#include "PasswordDialog.h" +#include "UpdateCallback100.h" + +STDMETHODIMP CUpdateCallback100Imp::SetNumFiles(UInt64 numFiles) +{ + ProgressDialog->Sync.SetNumFilesTotal(numFiles); + return S_OK; +} + +STDMETHODIMP CUpdateCallback100Imp::SetTotal(UInt64 size) +{ + ProgressDialog->Sync.SetProgress(size, 0); + return S_OK; +} + +STDMETHODIMP CUpdateCallback100Imp::SetCompleted(const UInt64 *completeValue) +{ + RINOK(ProgressDialog->Sync.ProcessStopAndPause()); + if (completeValue != NULL) + ProgressDialog->Sync.SetPos(*completeValue); + return S_OK; +} + +STDMETHODIMP CUpdateCallback100Imp::SetRatioInfo(const UInt64 *inSize, const UInt64 *outSize) +{ + ProgressDialog->Sync.SetRatioInfo(inSize, outSize); + return S_OK; +} + +STDMETHODIMP CUpdateCallback100Imp::CompressOperation(const wchar_t *name) +{ + ProgressDialog->Sync.SetCurrentFileName(name); + return S_OK; +} + +STDMETHODIMP CUpdateCallback100Imp::DeleteOperation(const wchar_t *name) +{ + ProgressDialog->Sync.SetCurrentFileName(name); + return S_OK; +} + +STDMETHODIMP CUpdateCallback100Imp::OperationResult(Int32 /* operationResult */) +{ + ProgressDialog->Sync.SetNumFilesCur(++_numFiles); + return S_OK; +} + +STDMETHODIMP CUpdateCallback100Imp::UpdateErrorMessage(const wchar_t *message) +{ + ProgressDialog->Sync.AddErrorMessage(message); + return S_OK; +} + +STDMETHODIMP CUpdateCallback100Imp::CryptoGetTextPassword2(Int32 *passwordIsDefined, BSTR *password) +{ + *password = NULL; + *passwordIsDefined = BoolToInt(_passwordIsDefined); + if (!_passwordIsDefined) + return S_OK; + return StringToBstr(_password, password); +} + +STDMETHODIMP CUpdateCallback100Imp::SetTotal(const UInt64 * /* files */, const UInt64 * /* bytes */) +{ + return S_OK; +} + +STDMETHODIMP CUpdateCallback100Imp::SetCompleted(const UInt64 * /* files */, const UInt64 * /* bytes */) +{ + return ProgressDialog->Sync.ProcessStopAndPause(); +} + +STDMETHODIMP CUpdateCallback100Imp::CryptoGetTextPassword(BSTR *password) +{ + *password = NULL; + if (!_passwordIsDefined) + { + CPasswordDialog dialog; + ProgressDialog->WaitCreating(); + if (dialog.Create(*ProgressDialog) == IDCANCEL) + return E_ABORT; + _password = dialog.Password; + _passwordIsDefined = true; + } + return StringToBstr(_password, password); +} diff --git a/CPP/7zip/UI/FileManager/UpdateCallback100.h b/CPP/7zip/UI/FileManager/UpdateCallback100.h new file mode 100644 index 0000000..aa13320 --- /dev/null +++ b/CPP/7zip/UI/FileManager/UpdateCallback100.h @@ -0,0 +1,54 @@ +// UpdateCallback100.h + +#ifndef __UPDATE_CALLBACK100_H +#define __UPDATE_CALLBACK100_H + +#include "Common/MyCom.h" + +#include "../../IPassword.h" + +#include "../Agent/IFolderArchive.h" + +#include "ProgressDialog2.h" + +class CUpdateCallback100Imp: + public IFolderArchiveUpdateCallback, + public ICryptoGetTextPassword2, + public ICryptoGetTextPassword, + public IArchiveOpenCallback, + public ICompressProgressInfo, + public CMyUnknownImp +{ + bool _passwordIsDefined; + UString _password; + UInt64 _numFiles; +public: + CProgressDialog *ProgressDialog; + + CUpdateCallback100Imp(): ProgressDialog(0) {} + + MY_UNKNOWN_IMP5( + IFolderArchiveUpdateCallback, + ICryptoGetTextPassword2, + ICryptoGetTextPassword, + IArchiveOpenCallback, + ICompressProgressInfo) + + INTERFACE_IProgress(;) + INTERFACE_IArchiveOpenCallback(;) + INTERFACE_IFolderArchiveUpdateCallback(;) + + STDMETHOD(SetRatioInfo)(const UInt64 *inSize, const UInt64 *outSize); + + STDMETHOD(CryptoGetTextPassword)(BSTR *password); + STDMETHOD(CryptoGetTextPassword2)(Int32 *passwordIsDefined, BSTR *password); + + void Init(bool passwordIsDefined, const UString &password) + { + _passwordIsDefined = passwordIsDefined; + _password = password; + _numFiles = 0; + } +}; + +#endif diff --git a/CPP/7zip/UI/FileManager/ViewSettings.cpp b/CPP/7zip/UI/FileManager/ViewSettings.cpp new file mode 100644 index 0000000..a013535 --- /dev/null +++ b/CPP/7zip/UI/FileManager/ViewSettings.cpp @@ -0,0 +1,395 @@ +// ViewSettings.h + +#include "StdAfx.h" + +#include "Common/IntToString.h" +#include "Common/StringConvert.h" + +#include "ViewSettings.h" +#include "Windows/Registry.h" +#include "Windows/Synchronization.h" + +using namespace NWindows; +using namespace NRegistry; + +#define REG_PATH_FM TEXT("Software") TEXT(STRING_PATH_SEPARATOR) TEXT("7-Zip") TEXT(STRING_PATH_SEPARATOR) TEXT("FM") + +static const TCHAR *kCUBasePath = REG_PATH_FM; +static const TCHAR *kCulumnsKeyName = REG_PATH_FM TEXT(STRING_PATH_SEPARATOR) TEXT("Columns"); + +static const TCHAR *kPositionValueName = TEXT("Position"); +static const TCHAR *kPanelsInfoValueName = TEXT("Panels"); +static const TCHAR *kToolbars = TEXT("Toolbars"); + +static const WCHAR *kPanelPathValueName = L"PanelPath"; +static const TCHAR *kListMode = TEXT("ListMode"); +static const TCHAR *kFolderHistoryValueName = TEXT("FolderHistory"); +static const TCHAR *kFastFoldersValueName = TEXT("FolderShortcuts"); +static const TCHAR *kCopyHistoryValueName = TEXT("CopyHistory"); + +/* +class CColumnInfoSpec +{ + UInt32 PropID; + Byte IsVisible; + UInt32 Width; +}; + +struct CColumnHeader +{ + UInt32 Version; + UInt32 SortID; + Byte Ascending; +}; +*/ + +static const UInt32 kColumnInfoSpecHeader = 12; +static const UInt32 kColumnHeaderSize = 12; + +static const UInt32 kColumnInfoVersion = 1; + +static NSynchronization::CCriticalSection g_CS; + +class CTempOutBufferSpec +{ + CByteBuffer Buffer; + UInt32 Size; + UInt32 Pos; +public: + operator const Byte *() const { return (const Byte *)Buffer; } + void Init(UInt32 dataSize) + { + Buffer.SetCapacity(dataSize); + Size = dataSize; + Pos = 0; + } + void WriteByte(Byte value) + { + if (Pos >= Size) + throw "overflow"; + ((Byte *)Buffer)[Pos++] = value; + } + void WriteUInt32(UInt32 value) + { + for (int i = 0; i < 4; i++) + { + WriteByte((Byte)value); + value >>= 8; + } + } + void WriteBool(bool value) + { + WriteUInt32(value ? 1 : 0); + } +}; + +class CTempInBufferSpec +{ +public: + Byte *Buffer; + UInt32 Size; + UInt32 Pos; + Byte ReadByte() + { + if (Pos >= Size) + throw "overflow"; + return Buffer[Pos++]; + } + UInt32 ReadUInt32() + { + UInt32 value = 0; + for (int i = 0; i < 4; i++) + value |= (((UInt32)ReadByte()) << (8 * i)); + return value; + } + bool ReadBool() + { + return (ReadUInt32() != 0); + } +}; + +void SaveListViewInfo(const UString &id, const CListViewInfo &viewInfo) +{ + const CObjectVector &columns = viewInfo.Columns; + CTempOutBufferSpec buffer; + UInt32 dataSize = kColumnHeaderSize + kColumnInfoSpecHeader * columns.Size(); + buffer.Init(dataSize); + + + + buffer.WriteUInt32(kColumnInfoVersion); + buffer.WriteUInt32(viewInfo.SortID); + buffer.WriteBool(viewInfo.Ascending); + + for(int i = 0; i < columns.Size(); i++) + { + const CColumnInfo &column = columns[i]; + buffer.WriteUInt32(column.PropID); + buffer.WriteBool(column.IsVisible); + buffer.WriteUInt32(column.Width); + } + { + NSynchronization::CCriticalSectionLock lock(g_CS); + CKey key; + key.Create(HKEY_CURRENT_USER, kCulumnsKeyName); + key.SetValue(GetSystemString(id), (const Byte *)buffer, dataSize); + } +} + +void ReadListViewInfo(const UString &id, CListViewInfo &viewInfo) +{ + viewInfo.Clear(); + CObjectVector &columns = viewInfo.Columns; + CByteBuffer buffer; + UInt32 size; + { + NSynchronization::CCriticalSectionLock lock(g_CS); + CKey key; + if (key.Open(HKEY_CURRENT_USER, kCulumnsKeyName, KEY_READ) != ERROR_SUCCESS) + return; + if (key.QueryValue(GetSystemString(id), buffer, size) != ERROR_SUCCESS) + return; + } + if (size < kColumnHeaderSize) + return; + CTempInBufferSpec inBuffer; + inBuffer.Size = size; + inBuffer.Buffer = (Byte *)buffer; + inBuffer.Pos = 0; + + + UInt32 version = inBuffer.ReadUInt32(); + if (version != kColumnInfoVersion) + return; + viewInfo.SortID = inBuffer.ReadUInt32(); + viewInfo.Ascending = inBuffer.ReadBool(); + + size -= kColumnHeaderSize; + if (size % kColumnInfoSpecHeader != 0) + return; + int numItems = size / kColumnInfoSpecHeader; + columns.Reserve(numItems); + for(int i = 0; i < numItems; i++) + { + CColumnInfo columnInfo; + columnInfo.PropID = inBuffer.ReadUInt32(); + columnInfo.IsVisible = inBuffer.ReadBool(); + columnInfo.Width = inBuffer.ReadUInt32(); + columns.Add(columnInfo); + } +} + +static const UInt32 kWindowPositionHeaderSize = 5 * 4; +static const UInt32 kPanelsInfoHeaderSize = 3 * 4; + +/* +struct CWindowPosition +{ + RECT Rect; + UInt32 Maximized; +}; + +struct CPanelsInfo +{ + UInt32 NumPanels; + UInt32 CurrentPanel; + UInt32 SplitterPos; +}; +*/ + +#ifdef _WIN32 +void SaveWindowSize(const RECT &rect, bool maximized) +{ + CSysString keyName = kCUBasePath; + NSynchronization::CCriticalSectionLock lock(g_CS); + CKey key; + key.Create(HKEY_CURRENT_USER, keyName); + // CWindowPosition position; + CTempOutBufferSpec buffer; + buffer.Init(kWindowPositionHeaderSize); + buffer.WriteUInt32(rect.left); + buffer.WriteUInt32(rect.top); + buffer.WriteUInt32(rect.right); + buffer.WriteUInt32(rect.bottom); + buffer.WriteBool(maximized); + key.SetValue(kPositionValueName, (const Byte *)buffer, kWindowPositionHeaderSize); +} + +bool ReadWindowSize(RECT &rect, bool &maximized) +{ + CSysString keyName = kCUBasePath; + NSynchronization::CCriticalSectionLock lock(g_CS); + CKey key; + if (key.Open(HKEY_CURRENT_USER, keyName, KEY_READ) != ERROR_SUCCESS) + return false; + CByteBuffer buffer; + UInt32 size; + if (key.QueryValue(kPositionValueName, buffer, size) != ERROR_SUCCESS) + return false; + if (size != kWindowPositionHeaderSize) + return false; + CTempInBufferSpec inBuffer; + inBuffer.Size = size; + inBuffer.Buffer = (Byte *)buffer; + inBuffer.Pos = 0; + rect.left = inBuffer.ReadUInt32(); + rect.top = inBuffer.ReadUInt32(); + rect.right = inBuffer.ReadUInt32(); + rect.bottom = inBuffer.ReadUInt32(); + maximized = inBuffer.ReadBool(); + return true; +} +#endif + +void SavePanelsInfo(UInt32 numPanels, UInt32 currentPanel, UInt32 splitterPos) +{ + CSysString keyName = kCUBasePath; + NSynchronization::CCriticalSectionLock lock(g_CS); + CKey key; + key.Create(HKEY_CURRENT_USER, keyName); + + CTempOutBufferSpec buffer; + buffer.Init(kPanelsInfoHeaderSize); + buffer.WriteUInt32(numPanels); + buffer.WriteUInt32(currentPanel); + buffer.WriteUInt32(splitterPos); + key.SetValue(kPanelsInfoValueName, (const Byte *)buffer, kPanelsInfoHeaderSize); +} + +bool ReadPanelsInfo(UInt32 &numPanels, UInt32 ¤tPanel, UInt32 &splitterPos) +{ + CSysString keyName = kCUBasePath; + NSynchronization::CCriticalSectionLock lock(g_CS); + CKey key; + if (key.Open(HKEY_CURRENT_USER, keyName, KEY_READ) != ERROR_SUCCESS) + return false; + CByteBuffer buffer; + UInt32 size; + if (key.QueryValue(kPanelsInfoValueName, buffer, size) != ERROR_SUCCESS) + return false; + if (size != kPanelsInfoHeaderSize) + return false; + CTempInBufferSpec inBuffer; + inBuffer.Size = size; + inBuffer.Buffer = (Byte *)buffer; + inBuffer.Pos = 0; + numPanels = inBuffer.ReadUInt32(); + currentPanel = inBuffer.ReadUInt32(); + splitterPos = inBuffer.ReadUInt32(); + return true; +} + +void SaveToolbarsMask(UInt32 toolbarMask) +{ + CKey key; + key.Create(HKEY_CURRENT_USER, kCUBasePath); + key.SetValue(kToolbars, toolbarMask); +} + +static const UInt32 kDefaultToolbarMask = ((UInt32)1 << 31) | 8 | 4 | 1; + +UInt32 ReadToolbarsMask() +{ + CKey key; + if (key.Open(HKEY_CURRENT_USER, kCUBasePath, KEY_READ) != ERROR_SUCCESS) + return kDefaultToolbarMask; + UInt32 mask; + if (key.QueryValue(kToolbars, mask) != ERROR_SUCCESS) + return kDefaultToolbarMask; + return mask; +} + + +static UString GetPanelPathName(UInt32 panelIndex) +{ + WCHAR panelString[16]; + ConvertUInt32ToString(panelIndex, panelString); + return UString(kPanelPathValueName) + panelString; +} + + +void SavePanelPath(UInt32 panel, const UString &path) +{ + NSynchronization::CCriticalSectionLock lock(g_CS); + CKey key; + key.Create(HKEY_CURRENT_USER, kCUBasePath); + key.SetValue(GetPanelPathName(panel), path); +} + +bool ReadPanelPath(UInt32 panel, UString &path) +{ + NSynchronization::CCriticalSectionLock lock(g_CS); + CKey key; + if (key.Open(HKEY_CURRENT_USER, kCUBasePath, KEY_READ) != ERROR_SUCCESS) + return false; + return (key.QueryValue(GetPanelPathName(panel), path) == ERROR_SUCCESS); +} + +void SaveListMode(const CListMode &listMode) +{ + CKey key; + key.Create(HKEY_CURRENT_USER, kCUBasePath); + UInt32 t = 0; + for (int i = 0; i < 2; i++) + t |= ((listMode.Panels[i]) & 0xFF) << (i * 8); + key.SetValue(kListMode, t); +} + +void ReadListMode(CListMode &listMode) +{ + CKey key; + listMode.Init(); + if (key.Open(HKEY_CURRENT_USER, kCUBasePath, KEY_READ) != ERROR_SUCCESS) + return; + UInt32 t; + if (key.QueryValue(kListMode, t) != ERROR_SUCCESS) + return; + for (int i = 0; i < 2; i++) + { + listMode.Panels[i] = (t & 0xFF); + t >>= 8; + } +} + + +static void SaveStringList(LPCTSTR valueName, const UStringVector &folders) +{ + NSynchronization::CCriticalSectionLock lock(g_CS); + CKey key; + key.Create(HKEY_CURRENT_USER, kCUBasePath); + key.SetValue_Strings(valueName, folders); +} + +static void ReadStringList(LPCTSTR valueName, UStringVector &folders) +{ + folders.Clear(); + NSynchronization::CCriticalSectionLock lock(g_CS); + CKey key; + if (key.Open(HKEY_CURRENT_USER, kCUBasePath, KEY_READ) == ERROR_SUCCESS) + key.GetValue_Strings(valueName, folders); +} + +void SaveFolderHistory(const UStringVector &folders) + { SaveStringList(kFolderHistoryValueName, folders); } +void ReadFolderHistory(UStringVector &folders) + { ReadStringList(kFolderHistoryValueName, folders); } + +void SaveFastFolders(const UStringVector &folders) + { SaveStringList(kFastFoldersValueName, folders); } +void ReadFastFolders(UStringVector &folders) + { ReadStringList(kFastFoldersValueName, folders); } + +void SaveCopyHistory(const UStringVector &folders) + { SaveStringList(kCopyHistoryValueName, folders); } +void ReadCopyHistory(UStringVector &folders) + { ReadStringList(kCopyHistoryValueName, folders); } + +void AddUniqueStringToHeadOfList(UStringVector &list, const UString &s) +{ + for (int i = 0; i < list.Size();) + if (s.CompareNoCase(list[i]) == 0) + list.Delete(i); + else + i++; + list.Insert(0, s); +} diff --git a/CPP/7zip/UI/FileManager/ViewSettings.h b/CPP/7zip/UI/FileManager/ViewSettings.h new file mode 100644 index 0000000..2c4e7db --- /dev/null +++ b/CPP/7zip/UI/FileManager/ViewSettings.h @@ -0,0 +1,100 @@ +// ViewSettings.h + +#ifndef __VIEW_SETTINGS_H +#define __VIEW_SETTINGS_H + +#include "Common/MyString.h" +#include "Common/Types.h" + +struct CColumnInfo +{ + PROPID PropID; + bool IsVisible; + UInt32 Width; +}; + +inline bool operator==(const CColumnInfo &a1, const CColumnInfo &a2) +{ + return (a1.PropID == a2.PropID) && + (a1.IsVisible == a2.IsVisible) && (a1.Width == a2.Width); +} + +inline bool operator!=(const CColumnInfo &a1, const CColumnInfo &a2) +{ + return !(a1 == a2); +} + +struct CListViewInfo +{ + CObjectVector Columns; + PROPID SortID; + bool Ascending; + + void Clear() + { + SortID = 0; + Ascending = true; + Columns.Clear(); + } + + int FindColumnWithID(PROPID propID) const + { + for (int i = 0; i < Columns.Size(); i++) + if (Columns[i].PropID == propID) + return i; + return -1; + } + + bool IsEqual(const CListViewInfo &info) const + { + if (Columns.Size() != info.Columns.Size() || + // SortIndex != info.SortIndex || + SortID != info.SortID || + Ascending != info.Ascending) + return false; + for (int i = 0; i < Columns.Size(); i++) + if (Columns[i] != info.Columns[i]) + return false; + return true; + } +}; + +void SaveListViewInfo(const UString &id, const CListViewInfo &viewInfo); +void ReadListViewInfo(const UString &id, CListViewInfo &viewInfo); + +#ifdef _WIN32 +void SaveWindowSize(const RECT &rect, bool maximized); +bool ReadWindowSize(RECT &rect, bool &maximized); +#endif + +void SavePanelsInfo(UInt32 numPanels, UInt32 currentPanel, UInt32 splitterPos); +bool ReadPanelsInfo(UInt32 &numPanels, UInt32 ¤tPanel, UInt32 &splitterPos); + +void SaveToolbarsMask(UInt32 toolbarMask); +UInt32 ReadToolbarsMask(); + +void SavePanelPath(UInt32 panel, const UString &path); +bool ReadPanelPath(UInt32 panel, UString &path); + +struct CListMode +{ + UInt32 Panels[2]; + void Init() { Panels[0] = Panels[1] = 3; } + CListMode() { Init(); } +}; + +void SaveListMode(const CListMode &listMode); +void ReadListMode(CListMode &listMode); + +void SaveFolderHistory(const UStringVector &folders); +void ReadFolderHistory(UStringVector &folders); + +void SaveFastFolders(const UStringVector &folders); +void ReadFastFolders(UStringVector &folders); + +void SaveCopyHistory(const UStringVector &folders); +void ReadCopyHistory(UStringVector &folders); + +void AddUniqueStringToHeadOfList(UStringVector &list, const UString &s); + +#endif diff --git a/CPP/7zip/UI/FileManager/err b/CPP/7zip/UI/FileManager/err new file mode 100644 index 0000000..2be9533 --- /dev/null +++ b/CPP/7zip/UI/FileManager/err @@ -0,0 +1,2334 @@ +In file included from /Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/platform.h:293, + from /Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/defs.h:21, + from /Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/wxprec.h:13, + from wxFM.cpp:6: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/chkconf.h:23:30: error: wx/msw/chkconf.h: No such file or directory +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/chkconf.h:95:9: error: #error "wxUSE_CRASHREPORT must be defined." +In file included from /Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/defs.h:21, + from /Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/wxprec.h:13, + from wxFM.cpp:6: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/platform.h:540:33: error: wx/msw/libraries.h: No such file or directory +In file included from /Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/wxprec.h:13, + from wxFM.cpp:6: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/defs.h:2856:29: error: wx/msw/winundef.h: No such file or directory +In file included from /Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/event.h:22, + from /Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/wx.h:25, + from wxFM.cpp:15: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/cursor.h:20:31: error: wx/msw/cursor.h: No such file or directory +In file included from /Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/utils.h:21, + from /Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/cursor.h:41, + from /Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/event.h:22, + from /Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/wx.h:25, + from wxFM.cpp:15: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/filefn.h:62:24: error: direct.h: No such file or directory +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/filefn.h:63:21: error: dos.h: No such file or directory +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/filefn.h:64:20: error: io.h: No such file or directory +In file included from /Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/wx.h:26, + from wxFM.cpp:15: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/app.h:562:32: error: wx/msw/app.h: No such file or directory +In file included from /Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/window.h:24, + from /Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/wx.h:36, + from wxFM.cpp:15: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/font.h:229:29: error: wx/msw/font.h: No such file or directory +In file included from /Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/window.h:25, + from /Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/wx.h:36, + from wxFM.cpp:15: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/colour.h:131:31: error: wx/msw/colour.h: No such file or directory +In file included from /Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/window.h:26, + from /Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/wx.h:36, + from wxFM.cpp:15: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/region.h:222:31: error: wx/msw/region.h: No such file or directory +In file included from /Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/window.h:33, + from /Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/wx.h:36, + from wxFM.cpp:15: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/palette.h:36:32: error: wx/msw/palette.h: No such file or directory +In file included from /Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/window.h:37, + from /Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/wx.h:36, + from wxFM.cpp:15: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/accel.h:151:30: error: wx/msw/accel.h: No such file or directory +In file included from /Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/wx.h:36, + from wxFM.cpp:15: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/window.h:1477:31: error: wx/msw/window.h: No such file or directory +In file included from /Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/wx.h:39, + from wxFM.cpp:15: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/toplevel.h:317:33: error: wx/msw/toplevel.h: No such file or directory +In file included from /Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/wx.h:40, + from wxFM.cpp:15: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/frame.h:245:34: error: wx/msw/frame.h: No such file or directory +In file included from /Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/wx.h:44, + from wxFM.cpp:15: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/bitmap.h:209:31: error: wx/msw/bitmap.h: No such file or directory +In file included from /Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/dc.h:26, + from /Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/wx.h:48, + from wxFM.cpp:15: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/brush.h:34:30: error: wx/msw/brush.h: No such file or directory +In file included from /Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/dc.h:27, + from /Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/wx.h:48, + from wxFM.cpp:15: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/pen.h:20:24: error: wx/msw/pen.h: No such file or directory +In file included from /Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/wx.h:48, + from wxFM.cpp:15: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/dc.h:865:27: error: wx/msw/dc.h: No such file or directory +In file included from /Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/wx.h:49, + from wxFM.cpp:15: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/dcclient.h:20:29: error: wx/msw/dcclient.h: No such file or directory +In file included from /Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/wx.h:50, + from wxFM.cpp:15: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/dcmemory.h:54:29: error: wx/msw/dcmemory.h: No such file or directory +In file included from /Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/wx.h:51, + from wxFM.cpp:15: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/dcprint.h:22:28: error: wx/msw/dcprint.h: No such file or directory +In file included from /Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/wx.h:52, + from wxFM.cpp:15: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/dcscreen.h:20:29: error: wx/msw/dcscreen.h: No such file or directory +In file included from /Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/button.h:46, + from /Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/wx.h:53, + from wxFM.cpp:15: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/control.h:99:32: error: wx/msw/control.h: No such file or directory +In file included from /Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/wx.h:53, + from wxFM.cpp:15: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/button.h:86:31: error: wx/msw/button.h: No such file or directory +In file included from /Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/wx.h:54, + from wxFM.cpp:15: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/menuitem.h:184:33: error: wx/msw/menuitem.h: No such file or directory +In file included from /Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/wx.h:55, + from wxFM.cpp:15: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/menu.h:536:29: error: wx/msw/menu.h: No such file or directory +In file included from /Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/wx.h:59, + from wxFM.cpp:15: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/icon.h:20:27: error: wx/msw/icon.h: No such file or directory +In file included from /Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/wx.h:61, + from wxFM.cpp:15: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/dialog.h:150:35: error: wx/msw/dialog.h: No such file or directory +In file included from /Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/wx.h:62, + from wxFM.cpp:15: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/timer.h:114:30: error: wx/msw/timer.h: No such file or directory +In file included from /Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/wx.h:64, + from wxFM.cpp:15: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/msgdlg.h:49:27: error: wx/msw/msgdlg.h: No such file or directory +In file included from /Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/wx.h:66, + from wxFM.cpp:15: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/dataobj.h:76:37: error: wx/msw/ole/dataform.h: No such file or directory +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/dataobj.h:164:36: error: wx/msw/ole/dataobj.h: No such file or directory +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/dataobj.h:504:37: error: wx/msw/ole/dataobj2.h: No such file or directory +In file included from /Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/wx.h:70, + from wxFM.cpp:15: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/bmpbuttn.h:105:33: error: wx/msw/bmpbuttn.h: No such file or directory +In file included from /Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/wx.h:71, + from wxFM.cpp:15: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/checkbox.h:136:33: error: wx/msw/checkbox.h: No such file or directory +In file included from /Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/checklst.h:17, + from /Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/wx.h:72, + from wxFM.cpp:15: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/listbox.h:148:32: error: wx/msw/listbox.h: No such file or directory +In file included from /Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/wx.h:72, + from wxFM.cpp:15: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/checklst.h:46:33: error: wx/msw/checklst.h: No such file or directory +In file included from /Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/wx.h:73, + from wxFM.cpp:15: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/choice.h:71:31: error: wx/msw/choice.h: No such file or directory +In file included from /Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/wx.h:74, + from wxFM.cpp:15: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/scrolbar.h:62:33: error: wx/msw/scrolbar.h: No such file or directory +In file included from /Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/wx.h:75, + from wxFM.cpp:15: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/stattext.h:49:33: error: wx/msw/stattext.h: No such file or directory +In file included from /Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/wx.h:76, + from wxFM.cpp:15: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/statbmp.h:56:32: error: wx/msw/statbmp.h: No such file or directory +In file included from /Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/wx.h:77, + from wxFM.cpp:15: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/statbox.h:56:32: error: wx/msw/statbox.h: No such file or directory +In file included from /Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/wx.h:79, + from wxFM.cpp:15: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/radiobox.h:162:33: error: wx/msw/radiobox.h: No such file or directory +In file included from /Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/wx.h:80, + from wxFM.cpp:15: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/radiobut.h:41:33: error: wx/msw/radiobut.h: No such file or directory +In file included from /Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/wx.h:81, + from wxFM.cpp:15: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/textctrl.h:473:33: error: wx/msw/textctrl.h: No such file or directory +In file included from /Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/wx.h:82, + from wxFM.cpp:15: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/slider.h:128:33: error: wx/msw/slider95.h: No such file or directory +In file included from /Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/wx.h:83, + from wxFM.cpp:15: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/gauge.h:107:32: error: wx/msw/gauge95.h: No such file or directory +In file included from /Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/wx.h:85, + from wxFM.cpp:15: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/dirdlg.h:102:36: error: wx/generic/dirdlgg.h: No such file or directory +In file included from /Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/wx.h:86, + from wxFM.cpp:15: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/toolbar.h:74:34: error: wx/msw/tbar95.h: No such file or directory +In file included from /Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/wx.h:87, + from wxFM.cpp:15: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/combobox.h:79:33: error: wx/msw/combobox.h: No such file or directory +In file included from /Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/wx.h:90, + from wxFM.cpp:15: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/mdi.h:22:28: error: wx/msw/mdi.h: No such file or directory +In file included from /Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/wx.h:91, + from wxFM.cpp:15: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/statusbr.h:159:33: error: wx/msw/statbr95.h: No such file or directory +In file included from /Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/wx.h:94, + from wxFM.cpp:15: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/filedlg.h:206:28: error: wx/msw/filedlg.h: No such file or directory +In file included from /Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/wxprec.h:13, + from wxFM.cpp:6: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/defs.h:2581: error: conflicting declaration ‘typedef void* WXHICON’ +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/defs.h:2390: error: ‘WXHICON’ has a previous declaration as ‘typedef struct wxOpaqueCIconHandle* WXHICON’ +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/defs.h:2600: error: conflicting declaration ‘typedef long unsigned int WXCOLORREF’ +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/defs.h:2372: error: ‘WXCOLORREF’ has a previous declaration as ‘typedef unsigned char WXCOLORREF [6]’ +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/defs.h:2611: error: conflicting declaration ‘typedef void* WXWidget’ +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/defs.h:2396: error: ‘WXWidget’ has a previous declaration as ‘typedef struct wxOpaqueControlRef* WXWidget’ +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/defs.h:2626: error: expected `)' before ‘*’ token +In file included from /Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/event.h:22, + from /Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/wx.h:25, + from wxFM.cpp:15: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/cursor.h: In destructor ‘wxBusyCursorSuspender::~wxBusyCursorSuspender()’: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/cursor.h:74: error: invalid use of incomplete type ‘const struct wxCursor’ +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/gdicmn.h:33: error: forward declaration of ‘const struct wxCursor’ +In file included from /Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/wx.h:25, + from wxFM.cpp:15: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/event.h: At global scope: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/event.h:921: error: field ‘m_cursor’ has incomplete type +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/event.h: In constructor ‘wxSetCursorEvent::wxSetCursorEvent(wxCoord, wxCoord)’: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/event.h:900: error: class ‘wxSetCursorEvent’ does not have any field named ‘m_cursor’ +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/event.h: In copy constructor ‘wxSetCursorEvent::wxSetCursorEvent(const wxSetCursorEvent&)’: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/event.h:907: error: class ‘wxSetCursorEvent’ does not have any field named ‘m_cursor’ +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/event.h:907: error: ‘const class wxSetCursorEvent’ has no member named ‘m_cursor’ +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/event.h: In member function ‘void wxSetCursorEvent::SetCursor(const wxCursor&)’: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/event.h:913: error: ‘m_cursor’ was not declared in this scope +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/event.h: In member function ‘const wxCursor& wxSetCursorEvent::GetCursor() const’: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/event.h:914: error: ‘m_cursor’ was not declared in this scope +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/event.h: In member function ‘bool wxSetCursorEvent::HasCursor() const’: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/event.h:915: error: ‘m_cursor’ was not declared in this scope +In file included from /Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/wx.h:26, + from wxFM.cpp:15: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/app.h: In constructor ‘wxAppInitializer::wxAppInitializer(wxAppConsole* (*)())’: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/app.h:637: error: ‘wxApp’ has not been declared +In file included from /Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/window.h:26, + from /Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/wx.h:36, + from wxFM.cpp:15: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/region.h: In member function ‘bool wxRegionBase::Intersect(const wxRect&)’: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/region.h:251: error: invalid use of incomplete type ‘struct wxRegion’ +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/gdicmn.h:38: error: forward declaration of ‘struct wxRegion’ +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/region.h: In member function ‘bool wxRegionBase::Subtract(const wxRect&)’: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/region.h:256: error: invalid use of incomplete type ‘struct wxRegion’ +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/gdicmn.h:38: error: forward declaration of ‘struct wxRegion’ +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/region.h: In member function ‘bool wxRegionBase::Xor(const wxRect&)’: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/region.h:261: error: invalid use of incomplete type ‘struct wxRegion’ +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/gdicmn.h:38: error: forward declaration of ‘struct wxRegion’ +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/region.h: In member function ‘bool wxRegionWithCombine::Combine(wxCoord, wxCoord, wxCoord, wxCoord, wxRegionOp)’: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/region.h:290: error: invalid use of incomplete type ‘struct wxRegion’ +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/gdicmn.h:38: error: forward declaration of ‘struct wxRegion’ +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/region.h: In member function ‘bool wxRegionWithCombine::Combine(const wxRect&, wxRegionOp)’: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/region.h:295: error: invalid use of incomplete type ‘struct wxRegion’ +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/gdicmn.h:38: error: forward declaration of ‘struct wxRegion’ +In file included from /Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/wx.h:36, + from wxFM.cpp:15: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/window.h: At global scope: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/window.h:82: error: field ‘font’ has incomplete type +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/window.h:85: error: field ‘colFg’ has incomplete type +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/window.h:89: error: field ‘colBg’ has incomplete type +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/window.h:1230: error: field ‘m_cursor’ has incomplete type +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/window.h:1231: error: field ‘m_font’ has incomplete type +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/window.h:1232: error: field ‘m_backgroundColour’ has incomplete type +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/window.h:1233: error: field ‘m_foregroundColour’ has incomplete type +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/window.h:1240: error: field ‘m_updateRegion’ has incomplete type +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/window.h:1245: error: field ‘m_acceleratorTable’ has incomplete type +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/window.h:1293: error: field ‘m_palette’ has incomplete type +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/window.h: In member function ‘virtual void wxWindowBase::SetAcceleratorTable(const wxAcceleratorTable&)’: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/window.h:670: error: ‘m_acceleratorTable’ was not declared in this scope +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/window.h: In member function ‘wxAcceleratorTable* wxWindowBase::GetAcceleratorTable()’: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/window.h:672: error: ‘m_acceleratorTable’ was not declared in this scope +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/window.h: In member function ‘const wxRegion& wxWindowBase::GetUpdateRegion() const’: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/window.h:761: error: ‘m_updateRegion’ was not declared in this scope +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/window.h: In member function ‘wxRegion& wxWindowBase::GetUpdateRegion()’: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/window.h:762: error: ‘m_updateRegion’ was not declared in this scope +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/window.h: In member function ‘const wxCursor& wxWindowBase::GetCursor() const’: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/window.h:850: error: ‘m_cursor’ was not declared in this scope +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/window.h: In member function ‘wxPalette wxWindowBase::GetPalette() const’: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/window.h:1142: error: return type ‘struct wxPalette’ is incomplete +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/window.h:1142: error: ‘m_palette’ was not declared in this scope +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/window.h: In member function ‘wxWindow* wxWindowBase::GetGrandParent() const’: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/window.h:1547: error: invalid use of incomplete type ‘struct wxWindow’ +../../../myWindows/StdAfx.h:58: error: forward declaration of ‘struct wxWindow’ +In file included from /Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/panel.h:15, + from /Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/wx.h:38, + from wxFM.cpp:15: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/generic/panelg.h: At global scope: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/generic/panelg.h:31: error: invalid use of incomplete type ‘struct wxWindow’ +../../../myWindows/StdAfx.h:58: error: forward declaration of ‘struct wxWindow’ +In file included from /Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/wx.h:39, + from wxFM.cpp:15: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/toplevel.h:119: error: invalid use of incomplete type ‘struct wxWindow’ +../../../myWindows/StdAfx.h:58: error: forward declaration of ‘struct wxWindow’ +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/toplevel.h: In member function ‘virtual bool wxTopLevelWindowBase::IsActive()’: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/toplevel.h:183: error: ‘FindFocus’ was not declared in this scope +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/toplevel.h: In member function ‘virtual bool wxTopLevelWindowBase::IsVisible() const’: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/toplevel.h:235: error: ‘IsShown’ was not declared in this scope +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/toplevel.h: In member function ‘virtual void wxTopLevelWindowBase::DoGetScreenPosition(int*, int*) const’: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/toplevel.h:273: error: ‘DoGetPosition’ was not declared in this scope +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/toplevel.h: At global scope: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/toplevel.h:353: error: expected class-name before ‘{’ token +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/toplevel.h: In constructor ‘wxTopLevelWindow::wxTopLevelWindow()’: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/toplevel.h:356: error: ‘Init’ was not declared in this scope +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/toplevel.h: In constructor ‘wxTopLevelWindow::wxTopLevelWindow(wxWindow*, wxWindowID, const wxString&, const wxPoint&, const wxSize&, long int, const wxString&)’: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/toplevel.h:365: error: ‘Init’ was not declared in this scope +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/toplevel.h:366: error: ‘Create’ was not declared in this scope +In file included from /Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/wx.h:44, + from wxFM.cpp:15: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/bitmap.h: In member function ‘virtual wxColour wxBitmapBase::QuantizeColour(const wxColour&) const’: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/bitmap.h:194: error: return type ‘struct wxColour’ is incomplete +In file included from /Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/wx.h:48, + from wxFM.cpp:15: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/dc.h: At global scope: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/dc.h:841: error: field ‘m_pen’ has incomplete type +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/dc.h:842: error: field ‘m_brush’ has incomplete type +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/dc.h:843: error: field ‘m_backgroundBrush’ has incomplete type +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/dc.h:844: error: field ‘m_textForegroundColour’ has incomplete type +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/dc.h:845: error: field ‘m_textBackgroundColour’ has incomplete type +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/dc.h:846: error: field ‘m_font’ has incomplete type +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/dc.h:849: error: field ‘m_palette’ has incomplete type +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/dc.h: In constructor ‘wxDCBase::wxDCBase()’: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/dc.h:121: error: class ‘wxDCBase’ does not have any field named ‘m_pen’ +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/dc.h:122: error: class ‘wxDCBase’ does not have any field named ‘m_brush’ +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/dc.h:123: error: class ‘wxDCBase’ does not have any field named ‘m_backgroundBrush’ +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/dc.h:124: error: class ‘wxDCBase’ does not have any field named ‘m_textForegroundColour’ +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/dc.h:125: error: class ‘wxDCBase’ does not have any field named ‘m_textBackgroundColour’ +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/dc.h:126: error: class ‘wxDCBase’ does not have any field named ‘m_font’ +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/dc.h:128: error: class ‘wxDCBase’ does not have any field named ‘m_palette’ +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/dc.h: In member function ‘wxBitmap wxDCBase::GetAsBitmap(const wxRect*) const’: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/dc.h:318: error: return type ‘struct wxBitmap’ is incomplete +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/dc.h:319: error: invalid use of incomplete type ‘struct wxBitmap’ +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/gdicmn.h:30: error: forward declaration of ‘struct wxBitmap’ +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/dc.h: In member function ‘virtual const wxBrush& wxDCBase::GetBackground() const’: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/dc.h:527: error: ‘m_backgroundBrush’ was not declared in this scope +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/dc.h: In member function ‘virtual const wxBrush& wxDCBase::GetBrush() const’: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/dc.h:528: error: ‘m_brush’ was not declared in this scope +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/dc.h: In member function ‘virtual const wxFont& wxDCBase::GetFont() const’: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/dc.h:529: error: ‘m_font’ was not declared in this scope +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/dc.h: In member function ‘virtual const wxPen& wxDCBase::GetPen() const’: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/dc.h:530: error: ‘m_pen’ was not declared in this scope +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/dc.h: In member function ‘virtual const wxColour& wxDCBase::GetTextForeground() const’: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/dc.h:532: error: ‘m_textForegroundColour’ was not declared in this scope +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/dc.h: In member function ‘virtual const wxColour& wxDCBase::GetTextBackground() const’: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/dc.h:533: error: ‘m_textBackgroundColour’ was not declared in this scope +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/dc.h: In member function ‘virtual void wxDCBase::SetTextForeground(const wxColour&)’: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/dc.h:535: error: ‘m_textForegroundColour’ was not declared in this scope +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/dc.h: In member function ‘virtual void wxDCBase::SetTextBackground(const wxColour&)’: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/dc.h:537: error: ‘m_textBackgroundColour’ was not declared in this scope +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/dc.h: In member function ‘virtual wxBitmap wxDCBase::DoGetAsBitmap(const wxRect*) const’: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/dc.h:733: error: return type ‘struct wxBitmap’ is incomplete +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/dc.h: At global scope: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/dc.h:921: error: field ‘m_colFgOld’ has incomplete type +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/dc.h: In constructor ‘wxDCTextColourChanger::wxDCTextColourChanger(wxDC&)’: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/dc.h:898: error: class ‘wxDCTextColourChanger’ does not have any field named ‘m_colFgOld’ +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/dc.h: In destructor ‘wxDCTextColourChanger::~wxDCTextColourChanger()’: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/dc.h:907: error: ‘m_colFgOld’ was not declared in this scope +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/dc.h:908: error: invalid use of incomplete type ‘struct wxDC’ +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/event.h:36: error: forward declaration of ‘struct wxDC’ +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/dc.h: In member function ‘void wxDCTextColourChanger::Set(const wxColour&)’: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/dc.h:913: error: ‘m_colFgOld’ was not declared in this scope +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/dc.h:914: error: invalid use of incomplete type ‘struct wxDC’ +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/event.h:36: error: forward declaration of ‘struct wxDC’ +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/dc.h:915: error: invalid use of incomplete type ‘struct wxDC’ +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/event.h:36: error: forward declaration of ‘struct wxDC’ +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/dc.h: At global scope: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/dc.h:948: error: field ‘m_penOld’ has incomplete type +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/dc.h: In constructor ‘wxDCPenChanger::wxDCPenChanger(wxDC&, const wxPen&)’: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/dc.h:934: error: class ‘wxDCPenChanger’ does not have any field named ‘m_penOld’ +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/dc.h:934: error: invalid use of incomplete type ‘struct wxDC’ +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/event.h:36: error: forward declaration of ‘struct wxDC’ +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/dc.h:936: error: invalid use of incomplete type ‘struct wxDC’ +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/event.h:36: error: forward declaration of ‘struct wxDC’ +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/dc.h: In destructor ‘wxDCPenChanger::~wxDCPenChanger()’: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/dc.h:941: error: ‘m_penOld’ was not declared in this scope +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/dc.h:942: error: invalid use of incomplete type ‘struct wxDC’ +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/event.h:36: error: forward declaration of ‘struct wxDC’ +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/dc.h: At global scope: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/dc.h:975: error: field ‘m_brushOld’ has incomplete type +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/dc.h: In constructor ‘wxDCBrushChanger::wxDCBrushChanger(wxDC&, const wxBrush&)’: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/dc.h:961: error: class ‘wxDCBrushChanger’ does not have any field named ‘m_brushOld’ +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/dc.h:961: error: invalid use of incomplete type ‘struct wxDC’ +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/event.h:36: error: forward declaration of ‘struct wxDC’ +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/dc.h:963: error: invalid use of incomplete type ‘struct wxDC’ +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/event.h:36: error: forward declaration of ‘struct wxDC’ +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/dc.h: In destructor ‘wxDCBrushChanger::~wxDCBrushChanger()’: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/dc.h:968: error: ‘m_brushOld’ was not declared in this scope +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/dc.h:969: error: invalid use of incomplete type ‘struct wxDC’ +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/event.h:36: error: forward declaration of ‘struct wxDC’ +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/dc.h: In constructor ‘wxDCClipper::wxDCClipper(wxDC&, const wxRegion&)’: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/dc.h:989: error: invalid use of incomplete type ‘struct wxDC’ +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/event.h:36: error: forward declaration of ‘struct wxDC’ +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/dc.h: In constructor ‘wxDCClipper::wxDCClipper(wxDC&, const wxRect&)’: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/dc.h:991: error: invalid use of incomplete type ‘struct wxDC’ +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/event.h:36: error: forward declaration of ‘struct wxDC’ +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/dc.h: In constructor ‘wxDCClipper::wxDCClipper(wxDC&, wxCoord, wxCoord, wxCoord, wxCoord)’: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/dc.h:993: error: invalid use of incomplete type ‘struct wxDC’ +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/event.h:36: error: forward declaration of ‘struct wxDC’ +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/dc.h: In destructor ‘wxDCClipper::~wxDCClipper()’: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/dc.h:995: error: invalid use of incomplete type ‘struct wxDC’ +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/event.h:36: error: forward declaration of ‘struct wxDC’ +In file included from /Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/wx.h:50, + from wxFM.cpp:15: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/dcmemory.h: In member function ‘void wxMemoryDCBase::SelectObject(wxBitmap&)’: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/dcmemory.h:35: error: invalid use of incomplete type ‘struct wxBitmap’ +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/gdicmn.h:30: error: forward declaration of ‘struct wxBitmap’ +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/dcmemory.h:36: error: invalid use of incomplete type ‘struct wxBitmap’ +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/gdicmn.h:30: error: forward declaration of ‘struct wxBitmap’ +In file included from /Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/mac/carbon/dcprint.h:16, + from /Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/mac/dcprint.h:4, + from /Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/dcprint.h:28, + from /Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/wx.h:51, + from wxFM.cpp:15: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/cmndata.h: At global scope: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/cmndata.h:49: error: field ‘m_dataColour’ has incomplete type +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/cmndata.h:50: error: field ‘m_custColours’ has incomplete type +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/cmndata.h: In member function ‘void wxColourData::SetColour(const wxColour&)’: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/cmndata.h:38: error: ‘m_dataColour’ was not declared in this scope +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/cmndata.h: In member function ‘const wxColour& wxColourData::GetColour() const’: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/cmndata.h:39: error: ‘m_dataColour’ was not declared in this scope +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/cmndata.h: In member function ‘wxColour& wxColourData::GetColour()’: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/cmndata.h:40: error: ‘m_dataColour’ was not declared in this scope +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/cmndata.h: At global scope: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/cmndata.h:125: error: field ‘m_fontColour’ has incomplete type +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/cmndata.h:129: error: field ‘m_initialFont’ has incomplete type +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/cmndata.h:130: error: field ‘m_chosenFont’ has incomplete type +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/cmndata.h: In copy constructor ‘wxFontData::wxFontData(const wxFontData&)’: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/cmndata.h:65: error: class ‘wxFontData’ does not have any field named ‘m_fontColour’ +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/cmndata.h:65: error: ‘const class wxFontData’ has no member named ‘m_fontColour’ +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/cmndata.h:69: error: class ‘wxFontData’ does not have any field named ‘m_initialFont’ +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/cmndata.h:69: error: ‘const class wxFontData’ has no member named ‘m_initialFont’ +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/cmndata.h:70: error: class ‘wxFontData’ does not have any field named ‘m_chosenFont’ +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/cmndata.h:70: error: ‘const class wxFontData’ has no member named ‘m_chosenFont’ +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/cmndata.h: In member function ‘wxFontData& wxFontData::operator=(const wxFontData&)’: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/cmndata.h:81: error: ‘m_fontColour’ was not declared in this scope +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/cmndata.h:81: error: ‘const class wxFontData’ has no member named ‘m_fontColour’ +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/cmndata.h:85: error: ‘m_initialFont’ was not declared in this scope +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/cmndata.h:85: error: ‘const class wxFontData’ has no member named ‘m_initialFont’ +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/cmndata.h:86: error: ‘m_chosenFont’ was not declared in this scope +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/cmndata.h:86: error: ‘const class wxFontData’ has no member named ‘m_chosenFont’ +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/cmndata.h: In member function ‘void wxFontData::SetColour(const wxColour&)’: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/cmndata.h:97: error: ‘m_fontColour’ was not declared in this scope +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/cmndata.h: In member function ‘const wxColour& wxFontData::GetColour() const’: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/cmndata.h:98: error: ‘m_fontColour’ was not declared in this scope +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/cmndata.h: In member function ‘void wxFontData::SetInitialFont(const wxFont&)’: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/cmndata.h:106: error: ‘m_initialFont’ was not declared in this scope +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/cmndata.h: In member function ‘wxFont wxFontData::GetInitialFont() const’: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/cmndata.h:107: error: return type ‘struct wxFont’ is incomplete +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/cmndata.h:107: error: ‘m_initialFont’ was not declared in this scope +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/cmndata.h: In member function ‘void wxFontData::SetChosenFont(const wxFont&)’: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/cmndata.h:109: error: ‘m_chosenFont’ was not declared in this scope +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/cmndata.h: In member function ‘wxFont wxFontData::GetChosenFont() const’: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/cmndata.h:110: error: return type ‘struct wxFont’ is incomplete +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/cmndata.h:110: error: ‘m_chosenFont’ was not declared in this scope +In file included from /Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/mac/dcprint.h:4, + from /Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/dcprint.h:28, + from /Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/wx.h:51, + from wxFM.cpp:15: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/mac/carbon/dcprint.h: At global scope: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/mac/carbon/dcprint.h:21: error: invalid use of incomplete type ‘struct wxDC’ +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/event.h:36: error: forward declaration of ‘struct wxDC’ +In file included from /Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/button.h:46, + from /Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/wx.h:53, + from wxFM.cpp:15: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/control.h:32: error: invalid use of incomplete type ‘struct wxWindow’ +../../../myWindows/StdAfx.h:58: error: forward declaration of ‘struct wxWindow’ +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/control.h: In member function ‘int wxControlBase::GetAlignment() const’: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/control.h:47: error: ‘m_windowStyle’ was not declared in this scope +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/control.h: In member function ‘wxString wxControlBase::GetLabelText() const’: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/control.h:53: error: ‘GetLabel’ was not declared in this scope +In file included from /Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/wx.h:53, + from wxFM.cpp:15: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/button.h: At global scope: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/button.h:57: error: invalid use of incomplete type ‘struct wxControl’ +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/window.h:57: error: forward declaration of ‘struct wxControl’ +In file included from /Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/wx.h:55, + from wxFM.cpp:15: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/menu.h: In member function ‘wxMenuItem* wxMenuBase::Append(int, const wxString&, const wxString&, wxItemKind)’: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/menu.h:67: error: incomplete type ‘wxMenuItem’ used in nested name specifier +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/menu.h: In member function ‘wxMenuItem* wxMenuBase::AppendSubMenu(wxMenu*, const wxString&, const wxString&)’: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/menu.h:94: error: incomplete type ‘wxMenuItem’ used in nested name specifier +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/menu.h: In member function ‘wxMenuItem* wxMenuBase::Insert(size_t, int, const wxString&, const wxString&, wxItemKind)’: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/menu.h:115: error: incomplete type ‘wxMenuItem’ used in nested name specifier +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/menu.h: In member function ‘wxMenuItem* wxMenuBase::InsertSeparator(size_t)’: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/menu.h:121: error: incomplete type ‘wxMenuItem’ used in nested name specifier +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/menu.h: In member function ‘wxMenuItem* wxMenuBase::Insert(size_t, int, const wxString&, wxMenu*, const wxString&)’: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/menu.h:149: error: incomplete type ‘wxMenuItem’ used in nested name specifier +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/menu.h: In member function ‘wxMenuItem* wxMenuBase::Append(int, const wxString&, wxMenu*, const wxString&)’: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/menu.h:317: error: incomplete type ‘wxMenuItem’ used in nested name specifier +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/menu.h: In member function ‘wxString wxMenuBase::GetLabelText(int) const’: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/menu.h:383: error: incomplete type ‘wxMenuItem’ used in nested name specifier +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/menu.h: At global scope: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/menu.h:393: error: invalid use of incomplete type ‘struct wxWindow’ +../../../myWindows/StdAfx.h:58: error: forward declaration of ‘struct wxWindow’ +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/menu.h: In member function ‘virtual bool wxMenuBarBase::IsEnabled() const’: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/menu.h:466: error: incomplete type ‘wxWindow’ used in nested name specifier +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/menu.h: In member function ‘virtual bool wxMenuBarBase::Enable(bool)’: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/menu.h:489: error: incomplete type ‘wxWindow’ used in nested name specifier +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/menu.h: In member function ‘virtual void wxMenuBarBase::SetLabel(const wxString&)’: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/menu.h:490: error: incomplete type ‘wxWindow’ used in nested name specifier +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/menu.h: In member function ‘virtual wxString wxMenuBarBase::GetLabel() const’: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/menu.h:491: error: incomplete type ‘wxWindow’ used in nested name specifier +In file included from /Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/wx.h:62, + from wxFM.cpp:15: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/timer.h: In member function ‘void wxTimerBase::SetOwner(wxEvtHandler*, int)’: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/timer.h:57: error: incomplete type ‘wxWindow’ used in nested name specifier +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/timer.h: At global scope: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/timer.h:138: error: expected `)' before ‘&’ token +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/timer.h:139: error: expected `)' before ‘&’ token +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/timer.h:159: error: ISO C++ forbids declaration of ‘wxTimer’ with no type +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/timer.h:159: error: expected ‘;’ before ‘&’ token +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/timer.h: In member function ‘void wxTimerRunner::Start(int, bool)’: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/timer.h:147: error: ‘m_timer’ was not declared in this scope +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/timer.h: In destructor ‘wxTimerRunner::~wxTimerRunner()’: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/timer.h:152: error: ‘m_timer’ was not declared in this scope +In file included from /Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/wx.h:64, + from wxFM.cpp:15: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/msgdlg.h: At global scope: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/msgdlg.h:71: error: ‘wxMessageBoxCaptionStr’ was not declared in this scope +In file included from /Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/wx.h:66, + from wxFM.cpp:15: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/dataobj.h:95: error: expected initializer before ‘&’ token +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/dataobj.h:131: error: ‘wxDataFormat’ does not name a type +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/dataobj.h:137: error: ‘wxDataFormat’ has not been declared +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/dataobj.h:141: error: expected ‘,’ or ‘...’ before ‘&’ token +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/dataobj.h:141: error: ISO C++ forbids declaration of ‘wxDataFormat’ with no type +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/dataobj.h:145: error: expected ‘,’ or ‘...’ before ‘&’ token +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/dataobj.h:145: error: ISO C++ forbids declaration of ‘wxDataFormat’ with no type +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/dataobj.h:149: error: expected ‘,’ or ‘...’ before ‘&’ token +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/dataobj.h:150: error: ISO C++ forbids declaration of ‘wxDataFormat’ with no type +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/dataobj.h:156: error: expected ‘,’ or ‘...’ before ‘&’ token +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/dataobj.h:156: error: ISO C++ forbids declaration of ‘wxDataFormat’ with no type +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/dataobj.h:198: error: expected class-name before ‘{’ token +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/dataobj.h:202: error: expected ‘,’ or ‘...’ before ‘&’ token +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/dataobj.h:202: error: ISO C++ forbids declaration of ‘wxDataFormat’ with no type +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/dataobj.h:208: error: ISO C++ forbids declaration of ‘wxDataFormat’ with no type +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/dataobj.h:208: error: expected ‘;’ before ‘&’ token +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/dataobj.h:209: error: expected `;' before ‘void’ +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/dataobj.h:209: error: expected ‘,’ or ‘...’ before ‘&’ token +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/dataobj.h:209: error: ISO C++ forbids declaration of ‘wxDataFormat’ with no type +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/dataobj.h:229: error: ‘wxDataFormat’ does not name a type +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/dataobj.h:233: error: ‘wxDataFormat’ has not been declared +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/dataobj.h:236: error: expected ‘,’ or ‘...’ before ‘&’ token +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/dataobj.h:236: error: ISO C++ forbids declaration of ‘wxDataFormat’ with no type +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/dataobj.h:238: error: expected ‘,’ or ‘...’ before ‘&’ token +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/dataobj.h:239: error: ISO C++ forbids declaration of ‘wxDataFormat’ with no type +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/dataobj.h:241: error: expected ‘,’ or ‘...’ before ‘&’ token +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/dataobj.h:242: error: ISO C++ forbids declaration of ‘wxDataFormat’ with no type +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/dataobj.h:247: error: ‘wxDataFormat’ does not name a type +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/dataobj.h:231: error: ‘Get’ was not declared in this scope +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/dataobj.h:234: error: ‘Get’ was not declared in this scope +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/dataobj.h: In constructor ‘wxDataObjectSimple::wxDataObjectSimple(int)’: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/dataobj.h:203: error: class ‘wxDataObjectSimple’ does not have any field named ‘m_format’ +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/dataobj.h:203: error: ‘format’ was not declared in this scope +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/dataobj.h: In member function ‘void wxDataObjectSimple::SetFormat(int)’: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/dataobj.h:209: error: ‘m_format’ was not declared in this scope +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/dataobj.h:209: error: ‘format’ was not declared in this scope +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/dataobj.h: In member function ‘virtual void wxDataObjectSimple::GetAllFormats(int*, wxDataObjectBase::Direction) const’: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/dataobj.h:235: error: ‘m_format’ was not declared in this scope +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/dataobj.h: In member function ‘virtual bool wxDataObjectSimple::GetDataHere(int) const’: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/dataobj.h:240: error: ‘buf’ was not declared in this scope +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/dataobj.h: In member function ‘virtual bool wxDataObjectSimple::SetData(int)’: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/dataobj.h:243: error: ‘len’ was not declared in this scope +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/dataobj.h:243: error: ‘buf’ was not declared in this scope +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/dataobj.h: At global scope: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/dataobj.h:265: error: expected class-name before ‘{’ token +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/dataobj.h:280: error: ‘wxDataFormat’ does not name a type +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/dataobj.h:284: error: ‘wxDataFormat’ does not name a type +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/dataobj.h:286: error: ‘wxDataFormat’ has not been declared +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/dataobj.h:287: error: expected ‘,’ or ‘...’ before ‘&’ token +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/dataobj.h:287: error: ISO C++ forbids declaration of ‘wxDataFormat’ with no type +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/dataobj.h:288: error: expected ‘,’ or ‘...’ before ‘&’ token +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/dataobj.h:288: error: ISO C++ forbids declaration of ‘wxDataFormat’ with no type +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/dataobj.h:289: error: expected ‘,’ or ‘...’ before ‘&’ token +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/dataobj.h:289: error: ISO C++ forbids declaration of ‘wxDataFormat’ with no type +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/dataobj.h:292: error: expected ‘,’ or ‘...’ before ‘&’ token +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/dataobj.h:292: error: ISO C++ forbids declaration of ‘wxDataFormat’ with no type +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/dataobj.h:294: error: expected ‘,’ or ‘...’ before ‘&’ token +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/dataobj.h:294: error: ISO C++ forbids declaration of ‘wxDataFormat’ with no type +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/dataobj.h:295: error: expected ‘,’ or ‘...’ before ‘&’ token +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/dataobj.h:295: error: ISO C++ forbids declaration of ‘wxDataFormat’ with no type +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/dataobj.h:300: error: expected ‘,’ or ‘...’ before ‘&’ token +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/dataobj.h:300: error: ISO C++ forbids declaration of ‘wxDataFormat’ with no type +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/dataobj.h:310: error: ‘wxDataFormat’ does not name a type +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/dataobj.h:285: error: ‘Get’ was not declared in this scope +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/dataobj.h:286: error: ‘Get’ was not declared in this scope +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/dataobj.h:355: error: ‘Direction’ has not been declared +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/dataobj.h:356: error: ‘wxDataFormat’ has not been declared +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/dataobj.h:363: error: expected ‘,’ or ‘...’ before ‘&’ token +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/dataobj.h:363: error: ISO C++ forbids declaration of ‘wxDataFormat’ with no type +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/dataobj.h:364: error: expected ‘,’ or ‘...’ before ‘&’ token +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/dataobj.h:364: error: ISO C++ forbids declaration of ‘wxDataFormat’ with no type +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/dataobj.h:365: error: expected ‘,’ or ‘...’ before ‘&’ token +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/dataobj.h:365: error: ISO C++ forbids declaration of ‘wxDataFormat’ with no type +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/dataobj.h:355: error: ‘Get’ was not declared in this scope +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/dataobj.h:357: error: ‘Get’ was not declared in this scope +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/dataobj.h: In member function ‘virtual size_t wxTextDataObject::GetDataSize() const’: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/dataobj.h:359: error: ‘GetPreferredFormat’ was not declared in this scope +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/dataobj.h: In member function ‘virtual bool wxTextDataObject::GetDataHere(void*) const’: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/dataobj.h:360: error: ‘GetPreferredFormat’ was not declared in this scope +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/dataobj.h: In member function ‘virtual bool wxTextDataObject::SetData(size_t, const void*)’: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/dataobj.h:361: error: ‘GetPreferredFormat’ was not declared in this scope +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/dataobj.h: At global scope: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/dataobj.h:411: error: field ‘m_bitmap’ has incomplete type +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/dataobj.h: In constructor ‘wxBitmapDataObjectBase::wxBitmapDataObjectBase(const wxBitmap&)’: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/dataobj.h:401: error: class ‘wxBitmapDataObjectBase’ does not have any field named ‘m_bitmap’ +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/dataobj.h: In member function ‘virtual wxBitmap wxBitmapDataObjectBase::GetBitmap() const’: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/dataobj.h:407: error: return type ‘struct wxBitmap’ is incomplete +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/dataobj.h:407: error: ‘m_bitmap’ was not declared in this scope +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/dataobj.h: In member function ‘virtual void wxBitmapDataObjectBase::SetBitmap(const wxBitmap&)’: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/dataobj.h:408: error: ‘m_bitmap’ was not declared in this scope +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/dataobj.h: At global scope: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/dataobj.h:449: error: expected ‘,’ or ‘...’ before ‘&’ token +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/dataobj.h:449: error: ISO C++ forbids declaration of ‘wxDataFormat’ with no type +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/dataobj.h:479: error: expected ‘,’ or ‘...’ before ‘&’ token +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/dataobj.h:479: error: ISO C++ forbids declaration of ‘wxDataFormat’ with no type +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/dataobj.h:483: error: expected ‘,’ or ‘...’ before ‘&’ token +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/dataobj.h:483: error: ISO C++ forbids declaration of ‘wxDataFormat’ with no type +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/dataobj.h:487: error: expected ‘,’ or ‘...’ before ‘&’ token +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/dataobj.h:487: error: ISO C++ forbids declaration of ‘wxDataFormat’ with no type +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/dataobj.h: In member function ‘virtual bool wxCustomDataObject::GetDataHere(int) const’: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/dataobj.h:485: error: ‘buf’ was not declared in this scope +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/dataobj.h: In member function ‘virtual bool wxCustomDataObject::SetData(int)’: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/dataobj.h:489: error: ‘len’ was not declared in this scope +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/dataobj.h:489: error: ‘buf’ was not declared in this scope +In file included from /Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/wx.h:69, + from wxFM.cpp:15: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/ctrlsub.h: At global scope: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/ctrlsub.h:175: error: invalid use of incomplete type ‘struct wxControl’ +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/window.h:57: error: forward declaration of ‘struct wxControl’ +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/ctrlsub.h: In member function ‘void wxControlWithItems::SetClientData(void*)’: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/ctrlsub.h:185: error: cannot call member function ‘void wxEvtHandler::SetClientData(void*)’ without object +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/ctrlsub.h: In member function ‘void* wxControlWithItems::GetClientData() const’: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/ctrlsub.h:185: error: cannot call member function ‘void* wxEvtHandler::GetClientData() const’ without object +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/ctrlsub.h: In member function ‘void wxControlWithItems::SetClientObject(wxClientData*)’: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/ctrlsub.h:185: error: cannot call member function ‘void wxEvtHandler::SetClientObject(wxClientData*)’ without object +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/ctrlsub.h: In member function ‘wxClientData* wxControlWithItems::GetClientObject() const’: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/ctrlsub.h:185: error: cannot call member function ‘wxClientData* wxEvtHandler::GetClientObject() const’ without object +In file included from /Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/wx.h:70, + from wxFM.cpp:15: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/bmpbuttn.h: At global scope: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/bmpbuttn.h:30: error: expected class-name before ‘{’ token +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/bmpbuttn.h:81: error: field ‘m_bmpNormal’ has incomplete type +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/bmpbuttn.h:82: error: field ‘m_bmpSelected’ has incomplete type +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/bmpbuttn.h:83: error: field ‘m_bmpFocus’ has incomplete type +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/bmpbuttn.h:84: error: field ‘m_bmpDisabled’ has incomplete type +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/bmpbuttn.h:85: error: field ‘m_bmpHover’ has incomplete type +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/bmpbuttn.h: In member function ‘void wxBitmapButtonBase::SetBitmapLabel(const wxBitmap&)’: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/bmpbuttn.h:40: error: ‘m_bmpNormal’ was not declared in this scope +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/bmpbuttn.h: In member function ‘void wxBitmapButtonBase::SetBitmapSelected(const wxBitmap&)’: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/bmpbuttn.h:42: error: ‘m_bmpSelected’ was not declared in this scope +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/bmpbuttn.h: In member function ‘void wxBitmapButtonBase::SetBitmapFocus(const wxBitmap&)’: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/bmpbuttn.h:44: error: ‘m_bmpFocus’ was not declared in this scope +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/bmpbuttn.h: In member function ‘void wxBitmapButtonBase::SetBitmapDisabled(const wxBitmap&)’: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/bmpbuttn.h:46: error: ‘m_bmpDisabled’ was not declared in this scope +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/bmpbuttn.h: In member function ‘void wxBitmapButtonBase::SetBitmapHover(const wxBitmap&)’: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/bmpbuttn.h:48: error: ‘m_bmpHover’ was not declared in this scope +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/bmpbuttn.h: In member function ‘const wxBitmap& wxBitmapButtonBase::GetBitmapLabel() const’: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/bmpbuttn.h:51: error: ‘m_bmpNormal’ was not declared in this scope +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/bmpbuttn.h: In member function ‘const wxBitmap& wxBitmapButtonBase::GetBitmapSelected() const’: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/bmpbuttn.h:52: error: ‘m_bmpSelected’ was not declared in this scope +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/bmpbuttn.h: In member function ‘const wxBitmap& wxBitmapButtonBase::GetBitmapFocus() const’: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/bmpbuttn.h:53: error: ‘m_bmpFocus’ was not declared in this scope +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/bmpbuttn.h: In member function ‘const wxBitmap& wxBitmapButtonBase::GetBitmapDisabled() const’: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/bmpbuttn.h:54: error: ‘m_bmpDisabled’ was not declared in this scope +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/bmpbuttn.h: In member function ‘const wxBitmap& wxBitmapButtonBase::GetBitmapHover() const’: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/bmpbuttn.h:55: error: ‘m_bmpHover’ was not declared in this scope +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/bmpbuttn.h: In member function ‘wxBitmap& wxBitmapButtonBase::GetBitmapLabel()’: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/bmpbuttn.h:56: error: ‘m_bmpNormal’ was not declared in this scope +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/bmpbuttn.h: In member function ‘wxBitmap& wxBitmapButtonBase::GetBitmapSelected()’: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/bmpbuttn.h:57: error: ‘m_bmpSelected’ was not declared in this scope +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/bmpbuttn.h: In member function ‘wxBitmap& wxBitmapButtonBase::GetBitmapFocus()’: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/bmpbuttn.h:58: error: ‘m_bmpFocus’ was not declared in this scope +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/bmpbuttn.h: In member function ‘wxBitmap& wxBitmapButtonBase::GetBitmapDisabled()’: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/bmpbuttn.h:59: error: ‘m_bmpDisabled’ was not declared in this scope +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/bmpbuttn.h: In member function ‘wxBitmap& wxBitmapButtonBase::GetBitmapHover()’: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/bmpbuttn.h:60: error: ‘m_bmpHover’ was not declared in this scope +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/bmpbuttn.h: In member function ‘virtual void wxBitmapButtonBase::SetLabel(const wxString&)’: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/bmpbuttn.h:73: error: incomplete type ‘wxWindow’ used in nested name specifier +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/bmpbuttn.h: In member function ‘virtual void wxBitmapButtonBase::OnSetBitmap()’: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/bmpbuttn.h:78: error: ‘InvalidateBestSize’ was not declared in this scope +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/bmpbuttn.h:78: error: ‘Refresh’ was not declared in this scope +In file included from /Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/wx.h:71, + from wxFM.cpp:15: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/checkbox.h: At global scope: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/checkbox.h:59: error: invalid use of incomplete type ‘struct wxControl’ +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/window.h:57: error: forward declaration of ‘struct wxControl’ +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/checkbox.h: In member function ‘bool wxCheckBoxBase::Is3State() const’: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/checkbox.h:102: error: ‘HasFlag’ was not declared in this scope +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/checkbox.h: In member function ‘bool wxCheckBoxBase::Is3rdStateAllowedForUser() const’: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/checkbox.h:106: error: ‘HasFlag’ was not declared in this scope +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/checkbox.h: In member function ‘virtual void wxCheckBoxBase::DoUpdateWindowUI(wxUpdateUIEvent&)’: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/checkbox.h:114: error: incomplete type ‘wxControl’ used in nested name specifier +In file included from /Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/checklst.h:17, + from /Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/wx.h:72, + from wxFM.cpp:15: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/listbox.h: In member function ‘bool wxListBoxBase::HasMultipleSelection() const’: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/listbox.h:95: error: ‘m_windowStyle’ was not declared in this scope +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/listbox.h: In member function ‘bool wxListBoxBase::IsSorted() const’: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/listbox.h:100: error: ‘m_windowStyle’ was not declared in this scope +In file included from /Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/wx.h:72, + from wxFM.cpp:15: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/checklst.h: At global scope: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/checklst.h:30: error: expected class-name before ‘{’ token +In file included from /Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/wx.h:74, + from wxFM.cpp:15: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/scrolbar.h:28: error: invalid use of incomplete type ‘struct wxControl’ +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/window.h:57: error: forward declaration of ‘struct wxControl’ +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/scrolbar.h: In member function ‘bool wxScrollBarBase::IsVertical() const’: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/scrolbar.h:47: error: ‘m_windowStyle’ was not declared in this scope +In file included from /Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/wx.h:75, + from wxFM.cpp:15: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/stattext.h: At global scope: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/stattext.h:24: error: invalid use of incomplete type ‘struct wxControl’ +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/window.h:57: error: forward declaration of ‘struct wxControl’ +In file included from /Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/wx.h:76, + from wxFM.cpp:15: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/statbmp.h:27: error: invalid use of incomplete type ‘struct wxControl’ +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/window.h:57: error: forward declaration of ‘struct wxControl’ +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/statbmp.h: In member function ‘virtual wxIcon wxStaticBitmapBase::GetIcon() const’: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/statbmp.h:37: error: return type ‘struct wxIcon’ is incomplete +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/statbmp.h:40: error: invalid use of incomplete type ‘struct wxIcon’ +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/gdicmn.h:35: error: forward declaration of ‘struct wxIcon’ +In file included from /Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/wx.h:77, + from wxFM.cpp:15: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/statbox.h: At global scope: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/statbox.h:28: error: invalid use of incomplete type ‘struct wxControl’ +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/window.h:57: error: forward declaration of ‘struct wxControl’ +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/statbox.h: In member function ‘virtual void wxStaticBoxBase::GetBordersForSizer(int*, int*) const’: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/statbox.h:45: error: ‘GetLabel’ was not declared in this scope +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/statbox.h:45: error: ‘GetCharHeight’ was not declared in this scope +In file included from /Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/wx.h:81, + from wxFM.cpp:15: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/textctrl.h: At global scope: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/textctrl.h:267: error: field ‘m_colText’ has incomplete type +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/textctrl.h:268: error: field ‘m_colBack’ has incomplete type +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/textctrl.h:269: error: field ‘m_font’ has incomplete type +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/textctrl.h: In member function ‘void wxTextAttr::SetTextColour(const wxColour&)’: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/textctrl.h:222: error: ‘m_colText’ was not declared in this scope +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/textctrl.h: In member function ‘void wxTextAttr::SetBackgroundColour(const wxColour&)’: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/textctrl.h:223: error: ‘m_colBack’ was not declared in this scope +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/textctrl.h: In member function ‘void wxTextAttr::SetFont(const wxFont&, long int)’: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/textctrl.h:224: error: ‘m_font’ was not declared in this scope +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/textctrl.h: In member function ‘bool wxTextAttr::HasTextColour() const’: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/textctrl.h:232: error: ‘m_colText’ was not declared in this scope +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/textctrl.h: In member function ‘bool wxTextAttr::HasBackgroundColour() const’: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/textctrl.h:233: error: ‘m_colBack’ was not declared in this scope +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/textctrl.h: In member function ‘bool wxTextAttr::HasFont() const’: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/textctrl.h:234: error: ‘m_font’ was not declared in this scope +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/textctrl.h: In member function ‘const wxColour& wxTextAttr::GetTextColour() const’: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/textctrl.h:241: error: ‘m_colText’ was not declared in this scope +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/textctrl.h: In member function ‘const wxColour& wxTextAttr::GetBackgroundColour() const’: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/textctrl.h:242: error: ‘m_colBack’ was not declared in this scope +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/textctrl.h: In member function ‘const wxFont& wxTextAttr::GetFont() const’: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/textctrl.h:243: error: ‘m_font’ was not declared in this scope +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/textctrl.h: At global scope: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/textctrl.h:289: error: invalid use of incomplete type ‘struct wxControl’ +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/window.h:57: error: forward declaration of ‘struct wxControl’ +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/textctrl.h: In member function ‘bool wxTextCtrlBase::IsSingleLine() const’: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/textctrl.h:318: error: ‘HasFlag’ was not declared in this scope +In file included from /Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/wx.h:82, + from wxFM.cpp:15: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/slider.h: At global scope: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/slider.h:55: error: invalid use of incomplete type ‘struct wxControl’ +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/window.h:57: error: forward declaration of ‘struct wxControl’ +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/slider.h: In member function ‘virtual int wxSliderBase::ValueInvertOrNot(int) const’: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/slider.h:111: error: ‘HasFlag’ was not declared in this scope +In file included from /Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/wx.h:83, + from wxFM.cpp:15: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/gauge.h: At global scope: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/gauge.h:51: error: invalid use of incomplete type ‘struct wxControl’ +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/window.h:57: error: forward declaration of ‘struct wxControl’ +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/gauge.h: In member function ‘bool wxGaugeBase::IsVertical() const’: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/gauge.h:78: error: ‘HasFlag’ was not declared in this scope +In file included from /Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/wx.h:84, + from wxFM.cpp:15: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/scrolwin.h: In member function ‘wxSize wxScrollHelper::GetTargetSize() const’: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/scrolwin.h:185: error: invalid use of incomplete type ‘struct wxWindow’ +../../../myWindows/StdAfx.h:58: error: forward declaration of ‘struct wxWindow’ +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/scrolwin.h: In constructor ‘wxScrolledWindow::wxScrolledWindow()’: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/scrolwin.h:274: error: no matching function for call to ‘wxScrollHelper::wxScrollHelper(wxScrolledWindow* const)’ +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/scrolwin.h:240: note: candidates are: wxScrollHelper::wxScrollHelper(const wxScrollHelper&) +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/scrolwin.h:55: note: wxScrollHelper::wxScrollHelper(wxWindow*) +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/scrolwin.h: In constructor ‘wxScrolledWindow::wxScrolledWindow(wxWindow*, wxWindowID, const wxPoint&, const wxSize&, long int, const wxString&)’: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/scrolwin.h:281: error: no matching function for call to ‘wxScrollHelper::wxScrollHelper(wxScrolledWindow* const)’ +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/scrolwin.h:240: note: candidates are: wxScrollHelper::wxScrollHelper(const wxScrollHelper&) +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/scrolwin.h:55: note: wxScrollHelper::wxScrollHelper(wxWindow*) +In file included from /Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/wx.h:85, + from wxFM.cpp:15: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/dirdlg.h: At global scope: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/dirdlg.h:44: error: expected class-name before ‘{’ token +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/dirdlg.h: In member function ‘bool wxDirDialogBase::Create(wxWindow*, const wxString&, const wxString&, long int, const wxPoint&, const wxSize&, const wxString&)’: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/dirdlg.h:69: error: ‘wxDialog’ has not been declared +In file included from /Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/toolbar.h:67, + from /Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/wx.h:86, + from wxFM.cpp:15: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/tbarbase.h: At global scope: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/tbarbase.h:217: error: field ‘m_bmpNormal’ has incomplete type +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/tbarbase.h:218: error: field ‘m_bmpDisabled’ has incomplete type +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/tbarbase.h: In constructor ‘wxToolBarToolBase::wxToolBarToolBase(wxToolBarBase*, int, const wxString&, const wxBitmap&, const wxBitmap&, wxItemKind, wxObject*, const wxString&, const wxString&)’: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/tbarbase.h:82: error: ‘m_bmpNormal’ was not declared in this scope +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/tbarbase.h:83: error: ‘m_bmpDisabled’ was not declared in this scope +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/tbarbase.h: In constructor ‘wxToolBarToolBase::wxToolBarToolBase(wxToolBarBase*, wxControl*)’: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/tbarbase.h:98: error: invalid use of incomplete type ‘struct wxControl’ +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/window.h:57: error: forward declaration of ‘struct wxControl’ +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/tbarbase.h: In member function ‘const wxBitmap& wxToolBarToolBase::GetNormalBitmap() const’: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/tbarbase.h:144: error: ‘m_bmpNormal’ was not declared in this scope +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/tbarbase.h: In member function ‘const wxBitmap& wxToolBarToolBase::GetDisabledBitmap() const’: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/tbarbase.h:145: error: ‘m_bmpDisabled’ was not declared in this scope +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/tbarbase.h: In member function ‘wxObject* wxToolBarToolBase::GetClientData() const’: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/tbarbase.h:159: error: invalid use of incomplete type ‘struct wxControl’ +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/window.h:57: error: forward declaration of ‘struct wxControl’ +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/tbarbase.h: In member function ‘void wxToolBarToolBase::SetNormalBitmap(const wxBitmap&)’: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/tbarbase.h:176: error: ‘m_bmpNormal’ was not declared in this scope +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/tbarbase.h: In member function ‘void wxToolBarToolBase::SetDisabledBitmap(const wxBitmap&)’: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/tbarbase.h:177: error: ‘m_bmpDisabled’ was not declared in this scope +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/tbarbase.h: In member function ‘void wxToolBarToolBase::SetClientData(wxObject*)’: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/tbarbase.h:185: error: invalid use of incomplete type ‘struct wxControl’ +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/window.h:57: error: forward declaration of ‘struct wxControl’ +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/tbarbase.h: At global scope: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/tbarbase.h:238: error: invalid use of incomplete type ‘struct wxControl’ +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/window.h:57: error: forward declaration of ‘struct wxControl’ +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/tbarbase.h: In member function ‘bool wxToolBarBase::IsVertical() const’: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/tbarbase.h:423: error: ‘HasFlag’ was not declared in this scope +In file included from /Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/wx.h:89, + from wxFM.cpp:15: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/sizer.h: In member function ‘void wxSizerItem::SetMinSize(const wxSize&)’: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/sizer.h:292: error: invalid use of incomplete type ‘struct wxWindow’ +../../../myWindows/StdAfx.h:58: error: forward declaration of ‘struct wxWindow’ +In file included from /Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/wx.h:91, + from wxFM.cpp:15: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/statusbr.h: At global scope: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/statusbr.h:41: error: invalid use of incomplete type ‘struct wxWindow’ +../../../myWindows/StdAfx.h:58: error: forward declaration of ‘struct wxWindow’ +In file included from /Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/choicdlg.h:17, + from /Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/wx.h:92, + from wxFM.cpp:15: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/generic/choicdgg.h:40: error: expected class-name before ‘{’ token +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/generic/choicdgg.h: In member function ‘char* wxSingleChoiceDialog::GetSelectionClientData() const’: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/generic/choicdgg.h:141: error: ‘m_clientData’ was not declared in this scope +In file included from /Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/generic/textdlgg.h:22, + from /Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/textdlg.h:15, + from /Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/wx.h:93, + from wxFM.cpp:15: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/valtext.h: In member function ‘bool wxTextValidator::CheckValidator() const’: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/valtext.h:103: error: incomplete type ‘wxTextCtrl’ used in nested name specifier +In file included from /Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/textdlg.h:15, + from /Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/wx.h:93, + from wxFM.cpp:15: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/generic/textdlgg.h: At global scope: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/generic/textdlgg.h:37: error: expected class-name before ‘{’ token +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/generic/textdlgg.h: In member function ‘wxTextValidator* wxTextEntryDialog::GetTextValidator()’: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/generic/textdlgg.h:52: error: invalid use of incomplete type ‘struct wxTextCtrl’ +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/log.h:72: error: forward declaration of ‘struct wxTextCtrl’ +In file included from /Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/wx.h:94, + from wxFM.cpp:15: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/filedlg.h: At global scope: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/filedlg.h:73: error: expected class-name before ‘{’ token +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/filedlg.h: In member function ‘bool wxFileDialogBase::HasFdFlag(int) const’: +/Users/me/WXWIDGETS_2_8_10/ins/include/wx-2.8/wx/filedlg.h:101: error: ‘HasFlag’ was not declared in this scope +In file included from /System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFNetwork.h:27, + from /System/Library/Frameworks/CoreServices.framework/Headers/CoreServices.h:37, + from /System/Library/Frameworks/ApplicationServices.framework/Headers/ApplicationServices.h:20, + from wxFM.cpp:23: +/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFNetworkErrors.h: At global scope: +/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFNetworkErrors.h:53: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFNetworkErrors.h:67: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFNetworkErrors.h:187: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFNetworkErrors.h:202: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFNetworkErrors.h:217: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFNetworkErrors.h:231: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFNetworkErrors.h:246: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFNetworkErrors.h:261: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFNetworkErrors.h:276: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFNetworkErrors.h:291: error: expected constructor, destructor, or type conversion before ‘(’ token +In file included from /System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFSocketStream.h:26, + from /System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFNetwork.h:31, + from /System/Library/Frameworks/CoreServices.framework/Headers/CoreServices.h:37, + from /System/Library/Frameworks/ApplicationServices.framework/Headers/ApplicationServices.h:20, + from wxFM.cpp:23: +/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFHost.h:67: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFHost.h:81: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFHost.h:199: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFHost.h:233: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFHost.h:269: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFHost.h:306: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFHost.h:350: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFHost.h:390: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFHost.h:428: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFHost.h:470: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFHost.h:501: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFHost.h:545: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFHost.h:584: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFHost.h:623: error: expected constructor, destructor, or type conversion before ‘(’ token +In file included from /System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFSocketStream.h:30, + from /System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFNetwork.h:31, + from /System/Library/Frameworks/CoreServices.framework/Headers/CoreServices.h:37, + from /System/Library/Frameworks/ApplicationServices.framework/Headers/ApplicationServices.h:20, + from wxFM.cpp:23: +/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFNetServices.h:87: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFNetServices.h:104: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFNetServices.h:352: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFNetServices.h:370: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFNetServices.h:388: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFNetServices.h:442: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFNetServices.h:483: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFNetServices.h:516: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFNetServices.h:547: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFNetServices.h:578: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFNetServices.h:625: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFNetServices.h:674: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFNetServices.h:701: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFNetServices.h:734: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFNetServices.h:764: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFNetServices.h:798: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFNetServices.h:832: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFNetServices.h:863: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFNetServices.h:902: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFNetServices.h:949: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFNetServices.h:999: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFNetServices.h:1034: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFNetServices.h:1070: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFNetServices.h:1115: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFNetServices.h:1145: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFNetServices.h:1188: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFNetServices.h:1223: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFNetServices.h:1260: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFNetServices.h:1295: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFNetServices.h:1336: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFNetServices.h:1362: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFNetServices.h:1407: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFNetServices.h:1457: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFNetServices.h:1495: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFNetServices.h:1532: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFNetServices.h:1567: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFNetServices.h:1618: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFNetServices.h:1670: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFNetServices.h:1713: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFNetServices.h:1746: error: expected constructor, destructor, or type conversion before ‘(’ token +In file included from /System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFNetwork.h:31, + from /System/Library/Frameworks/CoreServices.framework/Headers/CoreServices.h:37, + from /System/Library/Frameworks/ApplicationServices.framework/Headers/ApplicationServices.h:20, + from wxFM.cpp:23: +/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFSocketStream.h:58: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFSocketStream.h:74: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFSocketStream.h:89: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFSocketStream.h:104: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFSocketStream.h:121: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFSocketStream.h:137: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFSocketStream.h:154: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFSocketStream.h:196: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFSocketStream.h:212: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFSocketStream.h:228: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFSocketStream.h:244: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFSocketStream.h:260: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFSocketStream.h:273: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFSocketStream.h:336: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFSocketStream.h:352: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFSocketStream.h:369: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFSocketStream.h:386: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFSocketStream.h:400: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFSocketStream.h:414: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFSocketStream.h:432: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFSocketStream.h:450: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFSocketStream.h:463: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFSocketStream.h:481: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFSocketStream.h:495: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFSocketStream.h:509: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFSocketStream.h:523: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFSocketStream.h:537: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFSocketStream.h:552: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFSocketStream.h:573: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFSocketStream.h:588: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFSocketStream.h:603: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFSocketStream.h:644: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFSocketStream.h:689: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFSocketStream.h:772: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFSocketStream.h:795: error: expected constructor, destructor, or type conversion before ‘(’ token +In file included from /System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFNetwork.h:35, + from /System/Library/Frameworks/CoreServices.framework/Headers/CoreServices.h:37, + from /System/Library/Frameworks/ApplicationServices.framework/Headers/ApplicationServices.h:20, + from wxFM.cpp:23: +/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFFTPStream.h:48: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFFTPStream.h:73: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFFTPStream.h:89: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFFTPStream.h:105: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFFTPStream.h:120: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFFTPStream.h:138: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFFTPStream.h:153: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFFTPStream.h:169: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFFTPStream.h:186: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFFTPStream.h:204: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFFTPStream.h:222: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFFTPStream.h:232: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFFTPStream.h:241: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFFTPStream.h:263: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFFTPStream.h:278: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFFTPStream.h:293: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFFTPStream.h:308: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFFTPStream.h:324: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFFTPStream.h:339: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFFTPStream.h:354: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFFTPStream.h:369: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFFTPStream.h:408: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFFTPStream.h:456: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFFTPStream.h:500: error: expected constructor, destructor, or type conversion before ‘(’ token +In file included from /System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFNetwork.h:43, + from /System/Library/Frameworks/CoreServices.framework/Headers/CoreServices.h:37, + from /System/Library/Frameworks/ApplicationServices.framework/Headers/ApplicationServices.h:20, + from wxFM.cpp:23: +/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFHTTPMessage.h:52: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFHTTPMessage.h:66: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFHTTPMessage.h:80: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFHTTPMessage.h:94: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFHTTPMessage.h:107: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFHTTPMessage.h:120: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFHTTPMessage.h:149: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFHTTPMessage.h:192: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFHTTPMessage.h:239: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFHTTPMessage.h:279: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFHTTPMessage.h:316: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFHTTPMessage.h:347: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFHTTPMessage.h:375: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFHTTPMessage.h:403: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFHTTPMessage.h:431: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFHTTPMessage.h:465: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFHTTPMessage.h:495: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFHTTPMessage.h:527: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFHTTPMessage.h:566: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFHTTPMessage.h:597: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFHTTPMessage.h:626: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFHTTPMessage.h:657: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFHTTPMessage.h:684: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFHTTPMessage.h:733: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFHTTPMessage.h:770: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFHTTPMessage.h:799: error: expected constructor, destructor, or type conversion before ‘(’ token +In file included from /System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFNetwork.h:47, + from /System/Library/Frameworks/CoreServices.framework/Headers/CoreServices.h:37, + from /System/Library/Frameworks/ApplicationServices.framework/Headers/ApplicationServices.h:20, + from wxFM.cpp:23: +/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFHTTPStream.h:58: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFHTTPStream.h:97: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFHTTPStream.h:114: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFHTTPStream.h:130: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFHTTPStream.h:150: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFHTTPStream.h:165: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFHTTPStream.h:179: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFHTTPStream.h:194: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFHTTPStream.h:209: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFHTTPStream.h:225: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFHTTPStream.h:243: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFHTTPStream.h:260: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFHTTPStream.h:302: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFHTTPStream.h:352: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFHTTPStream.h:382: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFHTTPStream.h:413: error: expected constructor, destructor, or type conversion before ‘(’ token +In file included from /System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFNetwork.h:51, + from /System/Library/Frameworks/CoreServices.framework/Headers/CoreServices.h:37, + from /System/Library/Frameworks/ApplicationServices.framework/Headers/ApplicationServices.h:20, + from wxFM.cpp:23: +/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFHTTPAuthentication.h:100: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFHTTPAuthentication.h:115: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFHTTPAuthentication.h:130: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFHTTPAuthentication.h:146: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFHTTPAuthentication.h:182: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFHTTPAuthentication.h:228: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFHTTPAuthentication.h:265: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFHTTPAuthentication.h:300: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFHTTPAuthentication.h:349: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFHTTPAuthentication.h:401: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFHTTPAuthentication.h:440: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFHTTPAuthentication.h:475: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFHTTPAuthentication.h:508: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFHTTPAuthentication.h:540: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFHTTPAuthentication.h:573: error: expected constructor, destructor, or type conversion before ‘(’ token +In file included from /System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFNetwork.h:55, + from /System/Library/Frameworks/CoreServices.framework/Headers/CoreServices.h:37, + from /System/Library/Frameworks/ApplicationServices.framework/Headers/ApplicationServices.h:20, + from wxFM.cpp:23: +/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFNetDiagnostics.h:119: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFNetDiagnostics.h:149: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFNetDiagnostics.h:180: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFNetDiagnostics.h:210: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFNetDiagnostics.h:244: error: expected constructor, destructor, or type conversion before ‘(’ token +In file included from /System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFNetwork.h:63, + from /System/Library/Frameworks/CoreServices.framework/Headers/CoreServices.h:37, + from /System/Library/Frameworks/ApplicationServices.framework/Headers/ApplicationServices.h:20, + from wxFM.cpp:23: +/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFProxySupport.h:83: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFProxySupport.h:114: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFProxySupport.h:179: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFProxySupport.h:225: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFProxySupport.h:250: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFProxySupport.h:270: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFProxySupport.h:284: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFProxySupport.h:298: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFProxySupport.h:314: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFProxySupport.h:330: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFProxySupport.h:346: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFProxySupport.h:365: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFProxySupport.h:374: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFProxySupport.h:383: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFProxySupport.h:392: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFProxySupport.h:401: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFProxySupport.h:410: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFProxySupport.h:420: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFProxySupport.h:431: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFProxySupport.h:440: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFProxySupport.h:448: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFProxySupport.h:457: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFProxySupport.h:465: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFProxySupport.h:473: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFProxySupport.h:481: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFProxySupport.h:489: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFProxySupport.h:497: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFProxySupport.h:505: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFProxySupport.h:513: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFProxySupport.h:521: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFProxySupport.h:529: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFProxySupport.h:537: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFProxySupport.h:545: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFProxySupport.h:553: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFProxySupport.h:561: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFProxySupport.h:569: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFProxySupport.h:577: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFProxySupport.h:585: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFProxySupport.h:593: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFProxySupport.h:601: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFProxySupport.h:609: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/CoreServices.framework/Frameworks/CFNetwork.framework/Headers/CFProxySupport.h:617: error: expected constructor, destructor, or type conversion before ‘(’ token +In file included from /System/Library/Frameworks/ApplicationServices.framework/Frameworks/ATS.framework/Headers/ATSTypes.h:32, + from /System/Library/Frameworks/ApplicationServices.framework/Frameworks/ATS.framework/Headers/ATSLayoutTypes.h:36, + from /System/Library/Frameworks/ApplicationServices.framework/Frameworks/ATS.framework/Headers/ATS.h:33, + from /System/Library/Frameworks/ApplicationServices.framework/Headers/ApplicationServices.h:26, + from wxFM.cpp:23: +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGGeometry.h:44: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGGeometry.h:49: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGGeometry.h:54: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGGeometry.h:61: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGGeometry.h:66: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGGeometry.h:84: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGGeometry.h:89: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGGeometry.h:94: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGGeometry.h:99: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGGeometry.h:104: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGGeometry.h:109: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGGeometry.h:114: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGGeometry.h:119: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGGeometry.h:124: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGGeometry.h:129: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGGeometry.h:134: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGGeometry.h:140: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGGeometry.h:146: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGGeometry.h:151: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGGeometry.h:156: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGGeometry.h:162: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGGeometry.h:168: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGGeometry.h:173: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGGeometry.h:178: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGGeometry.h:183: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGGeometry.h:192: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGGeometry.h:198: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGGeometry.h:205: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGGeometry.h:212: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGGeometry.h:219: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGGeometry.h:226: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGGeometry.h:231: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGGeometry.h:238: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGGeometry.h:243: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGGeometry.h:250: error: expected constructor, destructor, or type conversion before ‘(’ token +In file included from /System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.h:10, + from /System/Library/Frameworks/ApplicationServices.framework/Frameworks/QD.framework/Headers/QD.h:25, + from /System/Library/Frameworks/ApplicationServices.framework/Headers/ApplicationServices.h:30, + from wxFM.cpp:23: +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGAffineTransform.h:20: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGAffineTransform.h:25: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGAffineTransform.h:32: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGAffineTransform.h:38: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGAffineTransform.h:44: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGAffineTransform.h:49: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGAffineTransform.h:55: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGAffineTransform.h:61: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGAffineTransform.h:67: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGAffineTransform.h:73: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGAffineTransform.h:79: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGAffineTransform.h:84: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGAffineTransform.h:91: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGAffineTransform.h:98: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGAffineTransform.h:108: error: expected constructor, destructor, or type conversion before ‘(’ token +In file included from /System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGColorSpace.h:11, + from /System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGColor.h:11, + from /System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGContext.h:12, + from /System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGBitmapContext.h:9, + from /System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.h:11, + from /System/Library/Frameworks/ApplicationServices.framework/Frameworks/QD.framework/Headers/QD.h:25, + from /System/Library/Frameworks/ApplicationServices.framework/Headers/ApplicationServices.h:30, + from wxFM.cpp:23: +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGDataProvider.h:101: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGDataProvider.h:107: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGDataProvider.h:114: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGDataProvider.h:127: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGDataProvider.h:134: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGDataProvider.h:139: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGDataProvider.h:144: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGDataProvider.h:151: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGDataProvider.h:157: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGDataProvider.h:164: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGDataProvider.h:223: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGDataProvider.h:231: error: expected constructor, destructor, or type conversion before ‘(’ token +In file included from /System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGColor.h:11, + from /System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGContext.h:12, + from /System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGBitmapContext.h:9, + from /System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.h:11, + from /System/Library/Frameworks/ApplicationServices.framework/Frameworks/QD.framework/Headers/QD.h:25, + from /System/Library/Frameworks/ApplicationServices.framework/Headers/ApplicationServices.h:30, + from wxFM.cpp:23: +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGColorSpace.h:40: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGColorSpace.h:45: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGColorSpace.h:50: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGColorSpace.h:56: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGColorSpace.h:63: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGColorSpace.h:72: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGColorSpace.h:77: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGColorSpace.h:82: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGColorSpace.h:87: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGColorSpace.h:92: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGColorSpace.h:101: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGColorSpace.h:114: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGColorSpace.h:125: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGColorSpace.h:132: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGColorSpace.h:148: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGColorSpace.h:162: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGColorSpace.h:171: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGColorSpace.h:177: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGColorSpace.h:183: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGColorSpace.h:189: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGColorSpace.h:195: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGColorSpace.h:201: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGColorSpace.h:206: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGColorSpace.h:211: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGColorSpace.h:216: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGColorSpace.h:223: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGColorSpace.h:230: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGColorSpace.h:240: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGColorSpace.h:246: error: expected constructor, destructor, or type conversion before ‘(’ token +In file included from /System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGColor.h:12, + from /System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGContext.h:12, + from /System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGBitmapContext.h:9, + from /System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.h:11, + from /System/Library/Frameworks/ApplicationServices.framework/Frameworks/QD.framework/Headers/QD.h:25, + from /System/Library/Frameworks/ApplicationServices.framework/Headers/ApplicationServices.h:30, + from wxFM.cpp:23: +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGPattern.h:55: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGPattern.h:60: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGPattern.h:70: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGPattern.h:76: error: expected constructor, destructor, or type conversion before ‘(’ token +In file included from /System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGContext.h:12, + from /System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGBitmapContext.h:9, + from /System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.h:11, + from /System/Library/Frameworks/ApplicationServices.framework/Frameworks/QD.framework/Headers/QD.h:25, + from /System/Library/Frameworks/ApplicationServices.framework/Headers/ApplicationServices.h:30, + from wxFM.cpp:23: +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGColor.h:18: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGColor.h:23: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGColor.h:28: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGColor.h:33: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGColor.h:44: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGColor.h:50: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGColor.h:56: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGColor.h:61: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGColor.h:67: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGColor.h:73: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGColor.h:78: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGColor.h:84: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGColor.h:89: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGColor.h:94: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGColor.h:99: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGColor.h:105: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGColor.h:110: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGColor.h:117: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGColor.h:120: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGColor.h:123: error: expected constructor, destructor, or type conversion before ‘(’ token +In file included from /System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGContext.h:14, + from /System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGBitmapContext.h:9, + from /System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.h:11, + from /System/Library/Frameworks/ApplicationServices.framework/Frameworks/QD.framework/Headers/QD.h:25, + from /System/Library/Frameworks/ApplicationServices.framework/Headers/ApplicationServices.h:30, + from wxFM.cpp:23: +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGFont.h:52: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGFont.h:59: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGFont.h:66: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGFont.h:73: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGFont.h:84: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGFont.h:90: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGFont.h:96: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGFont.h:101: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGFont.h:106: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGFont.h:111: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGFont.h:116: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGFont.h:123: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGFont.h:130: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGFont.h:137: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGFont.h:144: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGFont.h:151: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGFont.h:158: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGFont.h:164: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGFont.h:170: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGFont.h:178: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGFont.h:188: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGFont.h:196: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGFont.h:206: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGFont.h:213: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGFont.h:219: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGFont.h:225: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGFont.h:234: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGFont.h:242: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGFont.h:249: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGFont.h:255: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGFont.h:264: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGFont.h:271: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGFont.h:278: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGFont.h:285: error: expected constructor, destructor, or type conversion before ‘(’ token +In file included from /System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGContext.h:15, + from /System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGBitmapContext.h:9, + from /System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.h:11, + from /System/Library/Frameworks/ApplicationServices.framework/Frameworks/QD.framework/Headers/QD.h:25, + from /System/Library/Frameworks/ApplicationServices.framework/Headers/ApplicationServices.h:30, + from wxFM.cpp:23: +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGGradient.h:34: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGGradient.h:50: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGGradient.h:70: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGGradient.h:77: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGGradient.h:83: error: expected constructor, destructor, or type conversion before ‘(’ token +In file included from /System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGContext.h:16, + from /System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGBitmapContext.h:9, + from /System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.h:11, + from /System/Library/Frameworks/ApplicationServices.framework/Frameworks/QD.framework/Headers/QD.h:25, + from /System/Library/Frameworks/ApplicationServices.framework/Headers/ApplicationServices.h:30, + from wxFM.cpp:23: +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGImage.h:49: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGImage.h:54: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGImage.h:63: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGImage.h:71: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGImage.h:76: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGImage.h:83: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGImage.h:109: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGImage.h:138: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGImage.h:157: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGImage.h:166: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGImage.h:171: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGImage.h:176: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGImage.h:181: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGImage.h:186: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGImage.h:191: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGImage.h:196: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGImage.h:201: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGImage.h:206: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGImage.h:212: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGImage.h:217: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGImage.h:222: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGImage.h:227: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGImage.h:232: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGImage.h:237: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGImage.h:242: error: expected constructor, destructor, or type conversion before ‘(’ token +In file included from /System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGContext.h:17, + from /System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGBitmapContext.h:9, + from /System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.h:11, + from /System/Library/Frameworks/ApplicationServices.framework/Frameworks/QD.framework/Headers/QD.h:25, + from /System/Library/Frameworks/ApplicationServices.framework/Headers/ApplicationServices.h:30, + from wxFM.cpp:23: +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGPath.h:17: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGPath.h:22: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGPath.h:27: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGPath.h:32: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGPath.h:38: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGPath.h:44: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGPath.h:49: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGPath.h:57: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGPath.h:65: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGPath.h:73: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGPath.h:82: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGPath.h:90: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGPath.h:98: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGPath.h:105: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGPath.h:113: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGPath.h:128: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGPath.h:142: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGPath.h:154: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGPath.h:161: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGPath.h:169: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGPath.h:174: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGPath.h:180: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGPath.h:188: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGPath.h:196: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGPath.h:206: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGPath.h:237: error: expected constructor, destructor, or type conversion before ‘(’ token +In file included from /System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGPDFArray.h:11, + from /System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGPDFDictionary.h:10, + from /System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGPDFPage.h:11, + from /System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGPDFDocument.h:12, + from /System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGContext.h:19, + from /System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGBitmapContext.h:9, + from /System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.h:11, + from /System/Library/Frameworks/ApplicationServices.framework/Frameworks/QD.framework/Headers/QD.h:25, + from /System/Library/Frameworks/ApplicationServices.framework/Headers/ApplicationServices.h:30, + from wxFM.cpp:23: +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGPDFObject.h:43: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGPDFObject.h:53: error: expected constructor, destructor, or type conversion before ‘(’ token +In file included from /System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGPDFArray.h:12, + from /System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGPDFDictionary.h:10, + from /System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGPDFPage.h:11, + from /System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGPDFDocument.h:12, + from /System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGContext.h:19, + from /System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGBitmapContext.h:9, + from /System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.h:11, + from /System/Library/Frameworks/ApplicationServices.framework/Frameworks/QD.framework/Headers/QD.h:25, + from /System/Library/Frameworks/ApplicationServices.framework/Headers/ApplicationServices.h:30, + from wxFM.cpp:23: +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGPDFStream.h:21: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGPDFStream.h:26: error: expected constructor, destructor, or type conversion before ‘(’ token +In file included from /System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGPDFArray.h:13, + from /System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGPDFDictionary.h:10, + from /System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGPDFPage.h:11, + from /System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGPDFDocument.h:12, + from /System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGContext.h:19, + from /System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGBitmapContext.h:9, + from /System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.h:11, + from /System/Library/Frameworks/ApplicationServices.framework/Frameworks/QD.framework/Headers/QD.h:25, + from /System/Library/Frameworks/ApplicationServices.framework/Headers/ApplicationServices.h:30, + from wxFM.cpp:23: +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGPDFString.h:16: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGPDFString.h:21: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGPDFString.h:28: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGPDFString.h:34: error: expected constructor, destructor, or type conversion before ‘(’ token +In file included from /System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGPDFDictionary.h:10, + from /System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGPDFPage.h:11, + from /System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGPDFDocument.h:12, + from /System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGContext.h:19, + from /System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGBitmapContext.h:9, + from /System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.h:11, + from /System/Library/Frameworks/ApplicationServices.framework/Frameworks/QD.framework/Headers/QD.h:25, + from /System/Library/Frameworks/ApplicationServices.framework/Headers/ApplicationServices.h:30, + from wxFM.cpp:23: +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGPDFArray.h:17: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGPDFArray.h:23: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGPDFArray.h:29: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGPDFArray.h:35: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGPDFArray.h:41: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGPDFArray.h:48: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGPDFArray.h:54: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGPDFArray.h:60: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGPDFArray.h:66: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGPDFArray.h:72: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGPDFArray.h:79: error: expected constructor, destructor, or type conversion before ‘(’ token +In file included from /System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGPDFPage.h:11, + from /System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGPDFDocument.h:12, + from /System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGContext.h:19, + from /System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGBitmapContext.h:9, + from /System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.h:11, + from /System/Library/Frameworks/ApplicationServices.framework/Frameworks/QD.framework/Headers/QD.h:25, + from /System/Library/Frameworks/ApplicationServices.framework/Headers/ApplicationServices.h:30, + from wxFM.cpp:23: +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGPDFDictionary.h:17: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGPDFDictionary.h:23: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGPDFDictionary.h:31: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGPDFDictionary.h:39: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGPDFDictionary.h:47: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGPDFDictionary.h:54: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGPDFDictionary.h:60: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGPDFDictionary.h:67: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGPDFDictionary.h:75: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGPDFDictionary.h:82: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGPDFDictionary.h:97: error: expected constructor, destructor, or type conversion before ‘(’ token +In file included from /System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGPDFDocument.h:12, + from /System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGContext.h:19, + from /System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGBitmapContext.h:9, + from /System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.h:11, + from /System/Library/Frameworks/ApplicationServices.framework/Frameworks/QD.framework/Headers/QD.h:25, + from /System/Library/Frameworks/ApplicationServices.framework/Headers/ApplicationServices.h:30, + from wxFM.cpp:23: +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGPDFPage.h:26: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGPDFPage.h:32: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGPDFPage.h:37: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGPDFPage.h:42: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGPDFPage.h:49: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGPDFPage.h:55: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGPDFPage.h:71: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGPDFPage.h:77: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGPDFPage.h:82: error: expected constructor, destructor, or type conversion before ‘(’ token +In file included from /System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGContext.h:19, + from /System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGBitmapContext.h:9, + from /System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.h:11, + from /System/Library/Frameworks/ApplicationServices.framework/Frameworks/QD.framework/Headers/QD.h:25, + from /System/Library/Frameworks/ApplicationServices.framework/Headers/ApplicationServices.h:30, + from wxFM.cpp:23: +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGPDFDocument.h:17: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGPDFDocument.h:22: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGPDFDocument.h:28: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGPDFDocument.h:34: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGPDFDocument.h:39: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGPDFDocument.h:48: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGPDFDocument.h:55: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGPDFDocument.h:62: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGPDFDocument.h:70: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGPDFDocument.h:78: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGPDFDocument.h:83: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGPDFDocument.h:89: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGPDFDocument.h:94: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGPDFDocument.h:99: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGPDFDocument.h:104: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGPDFDocument.h:109: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGPDFDocument.h:116: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGPDFDocument.h:122: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGPDFDocument.h:128: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGPDFDocument.h:134: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGPDFDocument.h:140: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGPDFDocument.h:147: error: expected constructor, destructor, or type conversion before ‘(’ token +In file included from /System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGShading.h:10, + from /System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGContext.h:20, + from /System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGBitmapContext.h:9, + from /System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.h:11, + from /System/Library/Frameworks/ApplicationServices.framework/Frameworks/QD.framework/Headers/QD.h:25, + from /System/Library/Frameworks/ApplicationServices.framework/Headers/ApplicationServices.h:30, + from wxFM.cpp:23: +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGFunction.h:47: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGFunction.h:76: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGFunction.h:84: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGFunction.h:90: error: expected constructor, destructor, or type conversion before ‘(’ token +In file included from /System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGContext.h:20, + from /System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGBitmapContext.h:9, + from /System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.h:11, + from /System/Library/Frameworks/ApplicationServices.framework/Frameworks/QD.framework/Headers/QD.h:25, + from /System/Library/Frameworks/ApplicationServices.framework/Headers/ApplicationServices.h:30, + from wxFM.cpp:23: +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGShading.h:18: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGShading.h:36: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGShading.h:55: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGShading.h:63: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGShading.h:69: error: expected constructor, destructor, or type conversion before ‘(’ token +In file included from /System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGBitmapContext.h:9, + from /System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.h:11, + from /System/Library/Frameworks/ApplicationServices.framework/Frameworks/QD.framework/Headers/QD.h:25, + from /System/Library/Frameworks/ApplicationServices.framework/Headers/ApplicationServices.h:30, + from wxFM.cpp:23: +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGContext.h:144: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGContext.h:153: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGContext.h:159: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGContext.h:167: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGContext.h:173: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGContext.h:179: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGContext.h:185: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGContext.h:190: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGContext.h:197: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGContext.h:202: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGContext.h:207: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGContext.h:212: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGContext.h:217: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGContext.h:224: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGContext.h:229: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGContext.h:234: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGContext.h:244: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGContext.h:249: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGContext.h:254: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGContext.h:260: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGContext.h:267: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGContext.h:273: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGContext.h:280: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGContext.h:285: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGContext.h:290: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGContext.h:297: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGContext.h:307: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGContext.h:316: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGContext.h:323: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGContext.h:336: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGContext.h:344: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGContext.h:350: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGContext.h:357: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGContext.h:363: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGContext.h:371: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGContext.h:378: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGContext.h:386: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGContext.h:392: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGContext.h:397: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGContext.h:402: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGContext.h:408: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGContext.h:413: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGContext.h:419: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGContext.h:424: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGContext.h:429: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGContext.h:434: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGContext.h:448: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGContext.h:458: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGContext.h:465: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGContext.h:495: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGContext.h:502: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGContext.h:510: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGContext.h:517: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGContext.h:524: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGContext.h:529: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGContext.h:538: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGContext.h:545: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGContext.h:556: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGContext.h:566: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGContext.h:579: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGContext.h:590: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGContext.h:597: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGContext.h:605: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGContext.h:611: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGContext.h:617: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGContext.h:625: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGContext.h:633: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGContext.h:641: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGContext.h:650: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGContext.h:659: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGContext.h:669: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGContext.h:678: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGContext.h:683: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGContext.h:698: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGContext.h:707: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGContext.h:719: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGContext.h:733: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGContext.h:740: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGContext.h:749: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGContext.h:755: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGContext.h:760: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGContext.h:765: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGContext.h:770: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGContext.h:776: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGContext.h:782: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGContext.h:788: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGContext.h:796: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGContext.h:804: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGContext.h:815: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGContext.h:823: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGContext.h:830: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGContext.h:836: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGContext.h:845: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGContext.h:853: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGContext.h:862: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGContext.h:871: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGContext.h:876: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGContext.h:883: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGContext.h:888: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGContext.h:893: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGContext.h:898: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGContext.h:906: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGContext.h:914: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGContext.h:924: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGContext.h:933: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGContext.h:941: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGContext.h:952: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGContext.h:961: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGContext.h:972: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGContext.h:994: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGContext.h:1002: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGContext.h:1008: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGContext.h:1016: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGContext.h:1022: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGContext.h:1027: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGContext.h:1032: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGContext.h:1037: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGContext.h:1045: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGContext.h:1053: error: expected constructor, destructor, or type conversion before ‘(’ token +In file included from /System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.h:11, + from /System/Library/Frameworks/ApplicationServices.framework/Frameworks/QD.framework/Headers/QD.h:25, + from /System/Library/Frameworks/ApplicationServices.framework/Headers/ApplicationServices.h:30, + from wxFM.cpp:23: +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGBitmapContext.h:34: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGBitmapContext.h:55: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGBitmapContext.h:63: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGBitmapContext.h:69: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGBitmapContext.h:75: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGBitmapContext.h:81: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGBitmapContext.h:87: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGBitmapContext.h:93: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGBitmapContext.h:99: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGBitmapContext.h:105: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGBitmapContext.h:111: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGBitmapContext.h:127: error: expected constructor, destructor, or type conversion before ‘(’ token +In file included from /System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.h:15, + from /System/Library/Frameworks/ApplicationServices.framework/Frameworks/QD.framework/Headers/QD.h:25, + from /System/Library/Frameworks/ApplicationServices.framework/Headers/ApplicationServices.h:30, + from wxFM.cpp:23: +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGDataConsumer.h:39: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGDataConsumer.h:45: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGDataConsumer.h:51: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGDataConsumer.h:56: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGDataConsumer.h:61: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGDataConsumer.h:66: error: expected constructor, destructor, or type conversion before ‘(’ token +In file included from /System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.h:23, + from /System/Library/Frameworks/ApplicationServices.framework/Frameworks/QD.framework/Headers/QD.h:25, + from /System/Library/Frameworks/ApplicationServices.framework/Headers/ApplicationServices.h:30, + from wxFM.cpp:23: +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGLayer.h:18: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGLayer.h:25: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGLayer.h:31: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGLayer.h:36: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGLayer.h:41: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGLayer.h:48: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGLayer.h:55: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGLayer.h:60: error: expected constructor, destructor, or type conversion before ‘(’ token +In file included from /System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.h:25, + from /System/Library/Frameworks/ApplicationServices.framework/Frameworks/QD.framework/Headers/QD.h:25, + from /System/Library/Frameworks/ApplicationServices.framework/Headers/ApplicationServices.h:30, + from wxFM.cpp:23: +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGPDFContentStream.h:14: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGPDFContentStream.h:19: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGPDFContentStream.h:26: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGPDFContentStream.h:31: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGPDFContentStream.h:37: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGPDFContentStream.h:43: error: expected constructor, destructor, or type conversion before ‘(’ token +In file included from /System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.h:26, + from /System/Library/Frameworks/ApplicationServices.framework/Frameworks/QD.framework/Headers/QD.h:25, + from /System/Library/Frameworks/ApplicationServices.framework/Headers/ApplicationServices.h:30, + from wxFM.cpp:23: +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGPDFContext.h:21: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGPDFContext.h:29: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGPDFContext.h:38: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGPDFContext.h:43: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGPDFContext.h:49: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGPDFContext.h:55: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGPDFContext.h:61: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGPDFContext.h:68: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGPDFContext.h:78: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGPDFContext.h:85: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGPDFContext.h:92: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGPDFContext.h:99: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGPDFContext.h:106: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGPDFContext.h:114: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGPDFContext.h:120: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGPDFContext.h:126: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGPDFContext.h:139: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGPDFContext.h:146: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGPDFContext.h:159: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGPDFContext.h:171: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGPDFContext.h:181: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGPDFContext.h:188: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGPDFContext.h:195: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGPDFContext.h:205: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGPDFContext.h:214: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGPDFContext.h:223: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGPDFContext.h:231: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGPDFContext.h:240: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGPDFContext.h:250: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGPDFContext.h:260: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGPDFContext.h:273: error: expected constructor, destructor, or type conversion before ‘(’ token +In file included from /System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGPDFOperatorTable.h:10, + from /System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.h:30, + from /System/Library/Frameworks/ApplicationServices.framework/Frameworks/QD.framework/Headers/QD.h:25, + from /System/Library/Frameworks/ApplicationServices.framework/Headers/ApplicationServices.h:30, + from wxFM.cpp:23: +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGPDFScanner.h:15: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGPDFScanner.h:21: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGPDFScanner.h:26: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGPDFScanner.h:33: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGPDFScanner.h:38: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGPDFScanner.h:43: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGPDFScanner.h:49: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGPDFScanner.h:55: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGPDFScanner.h:61: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGPDFScanner.h:67: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGPDFScanner.h:73: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGPDFScanner.h:79: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGPDFScanner.h:86: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGPDFScanner.h:92: error: expected constructor, destructor, or type conversion before ‘(’ token +In file included from /System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.h:30, + from /System/Library/Frameworks/ApplicationServices.framework/Frameworks/QD.framework/Headers/QD.h:25, + from /System/Library/Frameworks/ApplicationServices.framework/Headers/ApplicationServices.h:30, + from wxFM.cpp:23: +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGPDFOperatorTable.h:16: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGPDFOperatorTable.h:21: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGPDFOperatorTable.h:26: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGPDFOperatorTable.h:31: error: expected constructor, destructor, or type conversion before ‘(’ token +In file included from /System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.h:39, + from /System/Library/Frameworks/ApplicationServices.framework/Frameworks/QD.framework/Headers/QD.h:25, + from /System/Library/Frameworks/ApplicationServices.framework/Headers/ApplicationServices.h:30, + from wxFM.cpp:23: +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGDirectDisplay.h:25: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGDirectDisplay.h:39: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGDirectDisplay.h:43: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGDirectDisplay.h:47: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGDirectDisplay.h:64: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGDirectDisplay.h:80: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGDirectDisplay.h:87: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGDirectDisplay.h:94: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGDirectDisplay.h:100: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGDirectDisplay.h:105: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGDirectDisplay.h:110: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGDirectDisplay.h:117: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGDirectDisplay.h:123: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGDirectDisplay.h:139: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGDirectDisplay.h:145: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGDirectDisplay.h:150: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGDirectDisplay.h:156: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGDirectDisplay.h:161: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGDirectDisplay.h:166: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGDirectDisplay.h:171: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGDirectDisplay.h:177: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGDirectDisplay.h:182: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGDirectDisplay.h:188: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGDirectDisplay.h:194: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGDirectDisplay.h:213: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGDirectDisplay.h:221: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGDirectDisplay.h:230: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGDirectDisplay.h:241: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGDirectDisplay.h:252: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGDirectDisplay.h:266: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGDirectDisplay.h:273: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGDirectDisplay.h:287: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGDirectDisplay.h:292: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGDirectDisplay.h:298: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGDirectDisplay.h:303: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGDirectDisplay.h:310: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGDirectDisplay.h:317: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGDirectDisplay.h:324: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGDirectDisplay.h:330: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGDirectDisplay.h:336: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGDirectDisplay.h:342: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGDirectDisplay.h:350: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGDirectDisplay.h:356: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGDirectDisplay.h:362: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGDirectDisplay.h:370: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGDirectDisplay.h:376: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGDirectDisplay.h:382: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGDirectDisplay.h:387: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGDirectDisplay.h:402: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGDirectDisplay.h:411: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGDirectDisplay.h:425: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGDirectDisplay.h:465: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGDirectDisplay.h:470: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGDirectDisplay.h:475: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGDirectDisplay.h:480: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGDirectDisplay.h:485: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGDirectDisplay.h:491: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGDirectDisplay.h:498: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGDirectDisplay.h:506: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGDirectDisplay.h:511: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGDirectDisplay.h:516: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGDirectDisplay.h:521: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGDirectDisplay.h:525: error: expected constructor, destructor, or type conversion before ‘(’ token +In file included from /System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.h:40, + from /System/Library/Frameworks/ApplicationServices.framework/Frameworks/QD.framework/Headers/QD.h:25, + from /System/Library/Frameworks/ApplicationServices.framework/Headers/ApplicationServices.h:30, + from wxFM.cpp:23: +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGDirectPalette.h:37: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGDirectPalette.h:43: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGDirectPalette.h:49: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGDirectPalette.h:54: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGDirectPalette.h:59: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGDirectPalette.h:64: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGDirectPalette.h:69: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGDirectPalette.h:75: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGDirectPalette.h:80: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGDirectPalette.h:85: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGDirectPalette.h:91: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGDirectPalette.h:96: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGDirectPalette.h:102: error: expected constructor, destructor, or type conversion before ‘(’ token +In file included from /System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.h:41, + from /System/Library/Frameworks/ApplicationServices.framework/Frameworks/QD.framework/Headers/QD.h:25, + from /System/Library/Frameworks/ApplicationServices.framework/Headers/ApplicationServices.h:30, + from wxFM.cpp:23: +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGDisplayConfiguration.h:27: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGDisplayConfiguration.h:43: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGDisplayConfiguration.h:58: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGDisplayConfiguration.h:85: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGDisplayConfiguration.h:125: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGDisplayConfiguration.h:132: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGDisplayConfiguration.h:162: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGDisplayConfiguration.h:168: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGDisplayConfiguration.h:220: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGDisplayConfiguration.h:226: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGDisplayConfiguration.h:258: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGDisplayConfiguration.h:265: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGDisplayConfiguration.h:271: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGDisplayConfiguration.h:276: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGDisplayConfiguration.h:282: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGDisplayConfiguration.h:288: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGDisplayConfiguration.h:293: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGDisplayConfiguration.h:299: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGDisplayConfiguration.h:305: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGDisplayConfiguration.h:312: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGDisplayConfiguration.h:318: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGDisplayConfiguration.h:324: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGDisplayConfiguration.h:330: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGDisplayConfiguration.h:335: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGDisplayConfiguration.h:340: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGDisplayConfiguration.h:345: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGDisplayConfiguration.h:350: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGDisplayConfiguration.h:355: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGDisplayConfiguration.h:369: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGDisplayConfiguration.h:380: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGDisplayConfiguration.h:385: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGDisplayConfiguration.h:390: error: expected constructor, destructor, or type conversion before ‘(’ token +In file included from /System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.h:42, + from /System/Library/Frameworks/ApplicationServices.framework/Frameworks/QD.framework/Headers/QD.h:25, + from /System/Library/Frameworks/ApplicationServices.framework/Headers/ApplicationServices.h:30, + from wxFM.cpp:23: +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGDisplayFade.h:43: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGDisplayFade.h:66: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGDisplayFade.h:78: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGDisplayFade.h:124: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGDisplayFade.h:133: error: expected constructor, destructor, or type conversion before ‘(’ token +In file included from /System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGEventTypes.h:9, + from /System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGEvent.h:8, + from /System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.h:43, + from /System/Library/Frameworks/ApplicationServices.framework/Frameworks/QD.framework/Headers/QD.h:25, + from /System/Library/Frameworks/ApplicationServices.framework/Headers/ApplicationServices.h:30, + from wxFM.cpp:23: +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGRemoteOperation.h:66: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGRemoteOperation.h:75: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGRemoteOperation.h:91: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGRemoteOperation.h:140: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGRemoteOperation.h:145: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGRemoteOperation.h:175: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGRemoteOperation.h:183: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGRemoteOperation.h:188: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGRemoteOperation.h:201: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGRemoteOperation.h:207: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGRemoteOperation.h:230: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGRemoteOperation.h:261: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGRemoteOperation.h:267: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGRemoteOperation.h:274: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGRemoteOperation.h:304: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGRemoteOperation.h:326: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGRemoteOperation.h:332: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGRemoteOperation.h:364: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGRemoteOperation.h:372: error: expected constructor, destructor, or type conversion before ‘(’ token +In file included from /System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.h:43, + from /System/Library/Frameworks/ApplicationServices.framework/Frameworks/QD.framework/Headers/QD.h:25, + from /System/Library/Frameworks/ApplicationServices.framework/Headers/ApplicationServices.h:30, + from wxFM.cpp:23: +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGEvent.h:12: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGEvent.h:18: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGEvent.h:23: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGEvent.h:29: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGEvent.h:46: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGEvent.h:66: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGEvent.h:86: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGEvent.h:92: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGEvent.h:104: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGEvent.h:109: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGEvent.h:114: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGEvent.h:119: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGEvent.h:124: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGEvent.h:129: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGEvent.h:134: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGEvent.h:140: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGEvent.h:145: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGEvent.h:150: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGEvent.h:155: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGEvent.h:164: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGEvent.h:177: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGEvent.h:183: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGEvent.h:197: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGEvent.h:207: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGEvent.h:220: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGEvent.h:268: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGEvent.h:279: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGEvent.h:291: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGEvent.h:296: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGEvent.h:307: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGEvent.h:316: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGEvent.h:330: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGEvent.h:350: error: expected constructor, destructor, or type conversion before ‘(’ token +In file included from /System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.h:44, + from /System/Library/Frameworks/ApplicationServices.framework/Frameworks/QD.framework/Headers/QD.h:25, + from /System/Library/Frameworks/ApplicationServices.framework/Headers/ApplicationServices.h:30, + from wxFM.cpp:23: +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGEventSource.h:44: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGEventSource.h:49: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGEventSource.h:54: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGEventSource.h:59: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGEventSource.h:71: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGEventSource.h:83: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGEventSource.h:95: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGEventSource.h:101: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGEventSource.h:107: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGEventSource.h:113: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGEventSource.h:121: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGEventSource.h:139: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGEventSource.h:150: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGEventSource.h:160: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGEventSource.h:181: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGEventSource.h:200: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGEventSource.h:213: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGEventSource.h:220: error: expected constructor, destructor, or type conversion before ‘(’ token +In file included from /System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.h:46, + from /System/Library/Frameworks/ApplicationServices.framework/Frameworks/QD.framework/Headers/QD.h:25, + from /System/Library/Frameworks/ApplicationServices.framework/Headers/ApplicationServices.h:30, + from wxFM.cpp:23: +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGGLContext.h:23: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGGLContext.h:36: error: expected constructor, destructor, or type conversion before ‘(’ token +In file included from /System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.h:47, + from /System/Library/Frameworks/ApplicationServices.framework/Frameworks/QD.framework/Headers/QD.h:25, + from /System/Library/Frameworks/ApplicationServices.framework/Headers/ApplicationServices.h:30, + from wxFM.cpp:23: +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGPSConverter.h:74: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGPSConverter.h:82: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGPSConverter.h:89: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGPSConverter.h:94: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGPSConverter.h:99: error: expected constructor, destructor, or type conversion before ‘(’ token +In file included from /System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.h:49, + from /System/Library/Frameworks/ApplicationServices.framework/Frameworks/QD.framework/Headers/QD.h:25, + from /System/Library/Frameworks/ApplicationServices.framework/Headers/ApplicationServices.h:30, + from wxFM.cpp:23: +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGSession.h:15: error: expected constructor, destructor, or type conversion before ‘(’ token +In file included from /System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.h:50, + from /System/Library/Frameworks/ApplicationServices.framework/Frameworks/QD.framework/Headers/QD.h:25, + from /System/Library/Frameworks/ApplicationServices.framework/Headers/ApplicationServices.h:30, + from wxFM.cpp:23: +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGWindow.h:50: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGWindow.h:57: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGWindow.h:63: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGWindow.h:71: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGWindow.h:78: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGWindow.h:85: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGWindow.h:91: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGWindow.h:98: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGWindow.h:106: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGWindow.h:112: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGWindow.h:118: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGWindow.h:125: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGWindow.h:132: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGWindow.h:170: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGWindow.h:179: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGWindow.h:189: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGWindow.h:255: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGWindow.h:264: error: expected constructor, destructor, or type conversion before ‘(’ token +In file included from /System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.h:51, + from /System/Library/Frameworks/ApplicationServices.framework/Frameworks/QD.framework/Headers/QD.h:25, + from /System/Library/Frameworks/ApplicationServices.framework/Headers/ApplicationServices.h:30, + from wxFM.cpp:23: +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGWindowLevel.h:52: error: expected constructor, destructor, or type conversion before ‘(’ token +In file included from /System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/ImageIO.h:14, + from /System/Library/Frameworks/ApplicationServices.framework/Headers/ApplicationServices.h:55, + from wxFM.cpp:23: +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageSource.h:33: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageSource.h:42: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageSource.h:50: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageSource.h:64: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageSource.h:74: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageSource.h:81: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageSource.h:88: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageSource.h:94: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageSource.h:98: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageSource.h:104: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageSource.h:110: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageSource.h:116: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageSource.h:123: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageSource.h:128: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageSource.h:134: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageSource.h:141: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageSource.h:147: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageSource.h:154: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageSource.h:162: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageSource.h:169: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageSource.h:176: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageSource.h:182: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageSource.h:189: error: expected constructor, destructor, or type conversion before ‘(’ token +In file included from /System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/ImageIO.h:16, + from /System/Library/Frameworks/ApplicationServices.framework/Headers/ApplicationServices.h:55, + from wxFM.cpp:23: +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageDestination.h:29: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageDestination.h:38: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageDestination.h:44: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageDestination.h:48: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageDestination.h:57: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageDestination.h:65: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageDestination.h:74: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageDestination.h:79: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageDestination.h:86: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageDestination.h:95: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageDestination.h:103: error: expected constructor, destructor, or type conversion before ‘(’ token +In file included from /System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/ImageIO.h:18, + from /System/Library/Frameworks/ApplicationServices.framework/Headers/ApplicationServices.h:55, + from wxFM.cpp:23: +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:18: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:19: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:20: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:21: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:22: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:23: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:24: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:25: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:26: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:27: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:28: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:29: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:30: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:31: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:32: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:33: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:34: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:35: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:45: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:54: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:55: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:60: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:61: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:66: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:81: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:86: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:91: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:96: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:101: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:106: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:111: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:112: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:113: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:114: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:119: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:120: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:121: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:122: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:123: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:124: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:125: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:126: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:127: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:128: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:129: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:130: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:131: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:132: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:133: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:134: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:135: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:136: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:140: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:141: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:142: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:143: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:144: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:149: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:150: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:151: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:152: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:153: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:154: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:155: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:156: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:157: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:158: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:159: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:160: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:161: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:162: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:163: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:164: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:165: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:166: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:167: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:168: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:169: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:170: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:171: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:172: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:173: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:174: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:175: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:176: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:177: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:178: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:179: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:180: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:181: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:182: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:183: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:184: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:185: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:186: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:187: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:188: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:189: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:190: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:191: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:192: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:193: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:194: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:195: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:196: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:197: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:198: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:199: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:200: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:201: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:202: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:203: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:204: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:205: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:208: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:209: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:210: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:211: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:212: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:213: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:214: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:215: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:216: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:220: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:221: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:222: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:223: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:227: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:228: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:229: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:230: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:231: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:232: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:236: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:237: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:238: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:239: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:240: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:241: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:242: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:243: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:244: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:245: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:246: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:247: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:248: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:249: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:250: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:251: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:252: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:253: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:254: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:255: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:256: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:257: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:258: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:259: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:260: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:261: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:262: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:263: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:264: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:265: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:266: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:270: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:271: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:272: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:273: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:274: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:275: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:276: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:277: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:278: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:279: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:280: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:281: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:282: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:283: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:284: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:285: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:286: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:287: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:288: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:289: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:290: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:291: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:292: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:293: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:294: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:295: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:296: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:297: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:298: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:299: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:300: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:301: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:302: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:303: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:304: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:305: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:306: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:307: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:308: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:309: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:310: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:311: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:312: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:313: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:314: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:315: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:316: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:317: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:318: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:319: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:320: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:324: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:325: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:326: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:327: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:328: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:329: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:330: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:331: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:335: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:340: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:341: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:342: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:343: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:344: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:345: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:350: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:351: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:352: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:353: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:354: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:355: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:356: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:357: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:358: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:359: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:360: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:361: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:362: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:363: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:364: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:365: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:366: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:367: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:368: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:369: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:370: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:375: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:376: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:377: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:378: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:379: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:380: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:381: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:382: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:383: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:384: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:385: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:386: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:387: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:388: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:389: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:390: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:391: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:392: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:396: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:397: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:398: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:399: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:400: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:401: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:402: error: expected constructor, destructor, or type conversion before ‘(’ token +/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:403: error: expected constructor, destructor, or type conversion before ‘(’ token +wxFM.cpp:140: error: expected class-name before ‘{’ token +wxFM.cpp: In function ‘wxAppConsole* wxCreateApp()’: +wxFM.cpp:161: error: cannot convert ‘MyApp*’ to ‘wxAppConsole*’ in return +wxFM.cpp: In function ‘MyApp& wxGetApp()’: +wxFM.cpp:161: error: ‘wxApp’ has not been declared +wxFM.cpp: In member function ‘virtual bool MyApp::OnInit()’: +wxFM.cpp:227: error: ‘wxApp’ has not been declared +wxFM.cpp:263: error: ‘wxApp’ has not been declared +wxFM.cpp:263: error: ‘wxApp’ has not been declared +make: *** [wxFM.o] Error 1 diff --git a/CPP/7zip/UI/FileManager/makefile b/CPP/7zip/UI/FileManager/makefile new file mode 100644 index 0000000..acb68ee --- /dev/null +++ b/CPP/7zip/UI/FileManager/makefile @@ -0,0 +1,154 @@ +PROG=../../../../bin/7zFM$(BINSUFFIX) + +LOCAL_FLAGS=\ + -DUNICODE -D_UNICODE \ + -DLANG \ + -DNEW_FOLDER_INTERFACE \ + -DEXTERNAL_CODECS \ + -I. \ + `wx-config --unicode=yes --cxxflags` + +include ../../../../makefile.crc32 +include ../../../../makefile.machine + +PCH_NAME=$(PRE_COMPILED_HEADER) + +LIBS=`wx-config --unicode=yes --libs` $(LOCAL_LIBS_DLL) + +OBJS=\ +OutStreamWithCRC.o \ +Agent.o \ +AgentOut.o \ +AgentProxy.o \ +ArchiveFolder.o \ +ArchiveFolderOpen.o \ +ArchiveFolderOut.o \ +UpdateCallbackAgent.o \ +ClassDefs.o \ +wxFM.o \ +FM.o \ +FM_rc.o \ +App.o \ +OpenCallback.o \ +MyLoadMenu.o \ +Panel.o \ +PanelCrc.o \ +PanelCopy.o \ +PanelItems.o \ +PanelListNotify.o \ +PanelFolderChange.o \ +PanelItemOpen.o \ +PanelMenu.o \ +PanelOperations.o \ +PanelSelect.o \ +PanelSort.o \ +PanelSplitFile.o \ +PropertyName.o \ +RegistryUtils.o \ +UpdateCallback100.o \ +ViewSettings.o \ +FileFolderPluginOpen.o \ +RootFolder.o \ +FSDrives.o \ +FSFolder.o \ +FSFolderCopy.o \ +FormatUtils.o \ +SysIconUtils.o \ +TextPairs.o \ +ExtractCallback.o \ +ProgramLocation.o \ +CopyDialog.o \ +CopyDialog_rc.o \ +ListViewDialog.o \ +ListViewDialog_rc.o \ +ProgressDialog2.o \ +ProgressDialog2_rc.o \ +SplitDialog.o \ +SplitDialog_rc.o \ +SplitUtils.o \ +StringUtils.o \ +ComboDialog.o \ +ComboDialog_rc.o \ +OverwriteDialog.o \ +OverwriteDialog_rc.o \ +PasswordDialog.o \ +PasswordDialog_rc.o \ +MessagesDialog.o \ +MessagesDialog_rc.o \ +ArchiveExtractCallback.o \ +ArchiveOpenCallback.o \ +LoadCodecs.o \ +OpenArchive.o \ +FilePathAutoRename.o \ +FileStreams.o \ +ProgressUtils.o \ +StreamUtils.o \ +DefaultName.o \ +EnumDirItems.o \ +ZipRegistry.o \ +ExtractingFilePath.o \ +PropIDUtils.o \ +UpdateAction.o \ +UpdateCallback.o \ +UpdatePair.o \ +UpdateProduce.o \ +SortUtils.o \ +TextConfig.o \ +UTFConvert.o \ +ArchiveName.o \ +CompressCall.o \ +WorkDir.o \ +CopyCoder.o \ +MyString.o \ +MyVector.o \ +StringConvert.o \ +StringToInt.o \ +IntToString.o \ +Wildcard.o \ +DLL.o \ +Error.o \ +FileDir.o \ +FileFind.o \ +FileIO.o \ +FileName.o \ +PropVariant.o \ +PropVariantConversions.o \ +Synchronization.o \ +Clipboard.o \ +Time.o \ +System.o \ +MyWindows.o \ +Registry.o \ +Window.o \ +Dialog.o \ +Controls.o \ +Window2.o \ +LangUtils.o \ +Lang.o \ +CRC.o \ +wine_date_and_time.o \ +wine_GetXXXDefaultLangID.o \ +Sort.o \ +Sha256.o \ +Alloc.o \ +Threads.o \ +$(OBJ_CRC32) + + +OBJS2=\ +RegistryAssociations.o \ + + +OBJS_OUT=\ +ArchiveCommandLine.o \ +SetProperties.o \ +TempFiles.o \ +Update.o \ +MyMessages.o \ +FormatUtils.o \ +StringUtils.o \ +CommandLineParser.o \ +ListFileUtils.o \ + +include ../../../../makefile.glb + diff --git a/CPP/7zip/UI/FileManager/makefile.depend b/CPP/7zip/UI/FileManager/makefile.depend new file mode 100644 index 0000000..ef226f7 --- /dev/null +++ b/CPP/7zip/UI/FileManager/makefile.depend @@ -0,0 +1,3825 @@ +ClassDefs.o: ClassDefs.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../../Common/MyInitGuid.h \ + ../Agent/Agent.h ../../../Common/MyCom.h ../../../Common/MyWindows.h \ + ../../../Windows/PropVariant.h ../../../Windows/../Common/MyWindows.h \ + ../../../Windows/../Common/Types.h ../Agent/../Common/OpenArchive.h \ + ../../../Common/MyString.h ../../../Common/MyVector.h \ + ../../../Common/Defs.h ../../../Windows/FileFind.h \ + ../../../Windows/../Common/MyString.h ../../../Windows/FileName.h \ + ../../../Windows/../../C/Types.h ../../../Windows/Defs.h \ + ../Agent/../Common/../../Archive/IArchive.h \ + ../Agent/../Common/../../Archive/../IProgress.h \ + ../Agent/../Common/../../Archive/../../Common/MyUnknown.h \ + ../Agent/../Common/../../Archive/../../Common/MyWindows.h \ + ../Agent/../Common/../../Archive/../../Common/Types.h \ + ../Agent/../Common/../../Archive/../IDecl.h \ + ../Agent/../Common/../../Archive/../IStream.h \ + ../Agent/../Common/../../Archive/../PropID.h \ + ../Agent/../Common/ArchiveOpenCallback.h \ + ../Agent/../Common/../../IPassword.h \ + ../Agent/../Common/../../../Common/MyUnknown.h \ + ../Agent/../Common/../../../Common/Types.h \ + ../Agent/../Common/../../IDecl.h ../Agent/../Common/LoadCodecs.h \ + ../Agent/../Common/../../../Common/Types.h \ + ../Agent/../Common/../../../Common/MyCom.h \ + ../Agent/../Common/../../../Common/MyString.h \ + ../Agent/../Common/../../../Common/Buffer.h \ + ../Agent/../Common/../../../Common/Defs.h \ + ../Agent/../Common/../../ICoder.h ../Agent/../Common/../../IStream.h \ + ../Agent/../Common/../../../Windows/DLL.h \ + ../Agent/../Common/../../../Windows/../Common/MyString.h \ + ../Agent/../Common/UpdateAction.h ../Agent/../FileManager/IFolder.h \ + ../Agent/../FileManager/../../IProgress.h \ + ../Agent/../FileManager/../../IStream.h ../Agent/../Common/LoadCodecs.h \ + ../Agent/AgentProxy.h ../Agent/IFolderArchive.h ../Agent/../../IDecl.h \ + ../Agent/../../Archive/IArchive.h ../Agent/../../UI/Common/LoadCodecs.h \ + ../Agent/../../UI/FileManager/IFolder.h ../Agent/../Common/ExtractMode.h \ + ../Agent/../Common/IFileExtractCallback.h \ + ../Agent/../Common/../../IDecl.h +Agent.o: ../Agent/Agent.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../Agent/../../../../C/Sort.h \ + ../Agent/../../../../C/Types.h ../../../Common/ComTry.h \ + ../../../Common/MyWindows.h ../Agent/../Common/ArchiveExtractCallback.h \ + ../../../Common/MyCom.h ../../../Common/Wildcard.h \ + ../../../Common/MyString.h ../../../Common/MyVector.h \ + ../../../Common/Defs.h ../Agent/../Common/../../IPassword.h \ + ../Agent/../Common/../../../Common/MyUnknown.h \ + ../Agent/../Common/../../../Common/MyWindows.h \ + ../Agent/../Common/../../../Common/Types.h \ + ../Agent/../Common/../../IDecl.h \ + ../Agent/../Common/../../Common/FileStreams.h \ + ../Agent/../Common/../../Common/../../Windows/FileIO.h \ + ../../../Common/MyString.h \ + ../Agent/../Common/../../Common/../../Common/MyCom.h \ + ../Agent/../Common/../../Common/../IStream.h \ + ../Agent/../Common/../../Common/../../Common/MyUnknown.h \ + ../Agent/../Common/../../Common/../../Common/Types.h \ + ../Agent/../Common/../../Common/../IDecl.h \ + ../Agent/../Common/../../Common/ProgressUtils.h \ + ../Agent/../Common/../../Common/../ICoder.h \ + ../Agent/../Common/../../Common/../IStream.h \ + ../Agent/../Common/../../Common/../IProgress.h \ + ../Agent/../Common/../../Archive/IArchive.h \ + ../Agent/../Common/../../Archive/../IProgress.h \ + ../Agent/../Common/../../Archive/../IStream.h \ + ../Agent/../Common/../../Archive/../PropID.h \ + ../Agent/../Common/../../Archive/Common/OutStreamWithCRC.h \ + ../Agent/../Common/../../Archive/Common/../../../../C/7zCrc.h \ + ../Agent/../Common/../../Archive/Common/../../../../C/Types.h \ + ../Agent/../Common/../../Archive/Common/../../../Common/MyCom.h \ + ../Agent/../Common/../../Archive/Common/../../IStream.h \ + ../Agent/../Common/ExtractMode.h \ + ../Agent/../Common/IFileExtractCallback.h \ + ../Agent/../Common/../../IDecl.h ../Agent/../Common/OpenArchive.h \ + ../../../Windows/FileFind.h ../../../Windows/../Common/MyString.h \ + ../../../Windows/FileName.h ../../../Windows/../../C/Types.h \ + ../../../Windows/Defs.h ../../../Windows/../Common/MyWindows.h \ + ../Agent/../Common/ArchiveOpenCallback.h ../Agent/../Common/LoadCodecs.h \ + ../Agent/../Common/../../../Common/Types.h \ + ../Agent/../Common/../../../Common/MyCom.h \ + ../Agent/../Common/../../../Common/MyString.h \ + ../Agent/../Common/../../../Common/Buffer.h \ + ../Agent/../Common/../../../Common/Defs.h \ + ../Agent/../Common/../../ICoder.h \ + ../Agent/../Common/../../../Windows/DLL.h \ + ../Agent/../Common/../../../Windows/../Common/MyString.h \ + ../Agent/Agent.h ../../../Windows/PropVariant.h \ + ../../../Windows/../Common/Types.h ../Agent/../Common/OpenArchive.h \ + ../Agent/../Common/UpdateAction.h ../Agent/../FileManager/IFolder.h \ + ../Agent/../FileManager/../../IProgress.h \ + ../Agent/../FileManager/../../IStream.h ../Agent/../Common/LoadCodecs.h \ + ../Agent/AgentProxy.h ../Agent/IFolderArchive.h ../Agent/../../IDecl.h \ + ../Agent/../../Archive/IArchive.h ../Agent/../../UI/Common/LoadCodecs.h \ + ../Agent/../../UI/FileManager/IFolder.h ../Agent/../Common/ExtractMode.h \ + ../Agent/../Common/IFileExtractCallback.h +AgentOut.o: ../Agent/AgentOut.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../../Common/IntToString.h \ + ../../../Common/StringConvert.h ../../../Common/MyWindows.h \ + ../../../Common/MyString.h ../../../Common/MyVector.h \ + ../../../Common/Defs.h ../../../Windows/FileDir.h \ + ../../../Windows/../Common/MyString.h ../../../Windows/Defs.h \ + ../../../Windows/../Common/MyWindows.h ../../../Windows/PropVariant.h \ + ../../../Windows/../Common/Types.h \ + ../../../Windows/PropVariantConversions.h ../../../Common/MyString.h \ + ../../../Windows/Time.h ../Agent/../../Compress/CopyCoder.h \ + ../Agent/../../Compress/../../Common/MyCom.h \ + ../Agent/../../Compress/../../Common/MyWindows.h \ + ../Agent/../../Compress/../ICoder.h ../Agent/../../Compress/../IStream.h \ + ../Agent/../../Compress/../../Common/MyUnknown.h \ + ../Agent/../../Compress/../../Common/Types.h \ + ../Agent/../../Compress/../IDecl.h ../Agent/../../Common/FileStreams.h \ + ../Agent/../../Common/../../Windows/FileIO.h \ + ../Agent/../../Common/../../Common/MyCom.h \ + ../Agent/../../Common/../IStream.h ../Agent/../Common/EnumDirItems.h \ + ../../../Common/Wildcard.h ../../../Windows/FileFind.h \ + ../../../Windows/FileName.h ../../../Windows/../../C/Types.h \ + ../Agent/../Common/DirItem.h ../Agent/../Common/../../Archive/IArchive.h \ + ../Agent/../Common/../../Archive/../IProgress.h \ + ../Agent/../Common/../../Archive/../../Common/MyUnknown.h \ + ../Agent/../Common/../../Archive/../../Common/Types.h \ + ../Agent/../Common/../../Archive/../IDecl.h \ + ../Agent/../Common/../../Archive/../IStream.h \ + ../Agent/../Common/../../Archive/../PropID.h \ + ../Agent/../Common/OpenArchive.h \ + ../Agent/../Common/ArchiveOpenCallback.h ../../../Common/MyCom.h \ + ../Agent/../Common/../../IPassword.h \ + ../Agent/../Common/../../../Common/MyUnknown.h \ + ../Agent/../Common/../../../Common/Types.h \ + ../Agent/../Common/../../IDecl.h ../Agent/../Common/LoadCodecs.h \ + ../Agent/../Common/../../../Common/Types.h \ + ../Agent/../Common/../../../Common/MyCom.h \ + ../Agent/../Common/../../../Common/MyString.h \ + ../Agent/../Common/../../../Common/Buffer.h \ + ../Agent/../Common/../../../Common/Defs.h \ + ../Agent/../Common/../../ICoder.h \ + ../Agent/../Common/../../../Windows/DLL.h \ + ../Agent/../Common/../../../Windows/../Common/MyString.h \ + ../Agent/../Common/UpdateCallback.h \ + ../Agent/../Common/../Common/UpdatePair.h \ + ../Agent/../Common/../Common/DirItem.h \ + ../Agent/../Common/../Common/UpdateAction.h \ + ../Agent/../Common/../Common/../../Archive/IArchive.h \ + ../Agent/../Common/../Common/UpdateProduce.h \ + ../Agent/../Common/../Common/UpdatePair.h \ + ../Agent/../Common/UpdatePair.h ../Agent/Agent.h \ + ../Agent/../Common/UpdateAction.h ../Agent/../FileManager/IFolder.h \ + ../Agent/../FileManager/../../IProgress.h \ + ../Agent/../FileManager/../../IStream.h ../Agent/../Common/LoadCodecs.h \ + ../Agent/AgentProxy.h ../Agent/IFolderArchive.h ../Agent/../../IDecl.h \ + ../Agent/../../Archive/IArchive.h ../Agent/../../UI/Common/LoadCodecs.h \ + ../Agent/../../UI/FileManager/IFolder.h ../Agent/../Common/ExtractMode.h \ + ../Agent/../Common/IFileExtractCallback.h \ + ../Agent/../Common/../../IDecl.h ../Agent/UpdateCallbackAgent.h +AgentProxy.o: ../Agent/AgentProxy.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../Agent/../../../../C/Sort.h \ + ../Agent/../../../../C/Types.h ../../../Windows/PropVariant.h \ + ../../../Windows/../Common/MyWindows.h \ + ../../../Windows/../Common/Types.h \ + ../../../Windows/PropVariantConversions.h ../../../Common/MyString.h \ + ../../../Common/MyVector.h ../../../Common/Defs.h \ + ../Agent/../Common/OpenArchive.h ../../../Windows/FileFind.h \ + ../../../Windows/../Common/MyString.h ../../../Windows/FileName.h \ + ../../../Windows/../../C/Types.h ../../../Windows/Defs.h \ + ../Agent/../Common/../../Archive/IArchive.h \ + ../Agent/../Common/../../Archive/../IProgress.h \ + ../Agent/../Common/../../Archive/../../Common/MyUnknown.h \ + ../Agent/../Common/../../Archive/../../Common/MyWindows.h \ + ../Agent/../Common/../../Archive/../../Common/Types.h \ + ../Agent/../Common/../../Archive/../IDecl.h \ + ../Agent/../Common/../../Archive/../IStream.h \ + ../Agent/../Common/../../Archive/../PropID.h \ + ../Agent/../Common/ArchiveOpenCallback.h ../../../Common/MyCom.h \ + ../../../Common/MyWindows.h ../Agent/../Common/../../IPassword.h \ + ../Agent/../Common/../../../Common/MyUnknown.h \ + ../Agent/../Common/../../../Common/Types.h \ + ../Agent/../Common/../../IDecl.h ../Agent/../Common/LoadCodecs.h \ + ../Agent/../Common/../../../Common/Types.h \ + ../Agent/../Common/../../../Common/MyCom.h \ + ../Agent/../Common/../../../Common/MyString.h \ + ../Agent/../Common/../../../Common/Buffer.h \ + ../Agent/../Common/../../../Common/Defs.h \ + ../Agent/../Common/../../ICoder.h ../Agent/../Common/../../IStream.h \ + ../Agent/../Common/../../../Windows/DLL.h \ + ../Agent/../Common/../../../Windows/../Common/MyString.h \ + ../Agent/AgentProxy.h +ArchiveFolder.o: ../Agent/ArchiveFolder.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../../Common/ComTry.h \ + ../../../Common/MyWindows.h ../Agent/../Common/ArchiveExtractCallback.h \ + ../../../Common/MyCom.h ../../../Common/Wildcard.h \ + ../../../Common/MyString.h ../../../Common/MyVector.h \ + ../../../Common/Defs.h ../Agent/../Common/../../IPassword.h \ + ../Agent/../Common/../../../Common/MyUnknown.h \ + ../Agent/../Common/../../../Common/MyWindows.h \ + ../Agent/../Common/../../../Common/Types.h \ + ../Agent/../Common/../../IDecl.h \ + ../Agent/../Common/../../Common/FileStreams.h \ + ../Agent/../Common/../../Common/../../Windows/FileIO.h \ + ../../../Common/MyString.h \ + ../Agent/../Common/../../Common/../../Common/MyCom.h \ + ../Agent/../Common/../../Common/../IStream.h \ + ../Agent/../Common/../../Common/../../Common/MyUnknown.h \ + ../Agent/../Common/../../Common/../../Common/Types.h \ + ../Agent/../Common/../../Common/../IDecl.h \ + ../Agent/../Common/../../Common/ProgressUtils.h \ + ../Agent/../Common/../../Common/../ICoder.h \ + ../Agent/../Common/../../Common/../IStream.h \ + ../Agent/../Common/../../Common/../IProgress.h \ + ../Agent/../Common/../../Archive/IArchive.h \ + ../Agent/../Common/../../Archive/../IProgress.h \ + ../Agent/../Common/../../Archive/../IStream.h \ + ../Agent/../Common/../../Archive/../PropID.h \ + ../Agent/../Common/../../Archive/Common/OutStreamWithCRC.h \ + ../Agent/../Common/../../Archive/Common/../../../../C/7zCrc.h \ + ../Agent/../Common/../../Archive/Common/../../../../C/Types.h \ + ../Agent/../Common/../../Archive/Common/../../../Common/MyCom.h \ + ../Agent/../Common/../../Archive/Common/../../IStream.h \ + ../Agent/../Common/ExtractMode.h \ + ../Agent/../Common/IFileExtractCallback.h \ + ../Agent/../Common/../../IDecl.h ../Agent/../Common/OpenArchive.h \ + ../../../Windows/FileFind.h ../../../Windows/../Common/MyString.h \ + ../../../Windows/FileName.h ../../../Windows/../../C/Types.h \ + ../../../Windows/Defs.h ../../../Windows/../Common/MyWindows.h \ + ../Agent/../Common/ArchiveOpenCallback.h ../Agent/../Common/LoadCodecs.h \ + ../Agent/../Common/../../../Common/Types.h \ + ../Agent/../Common/../../../Common/MyCom.h \ + ../Agent/../Common/../../../Common/MyString.h \ + ../Agent/../Common/../../../Common/Buffer.h \ + ../Agent/../Common/../../../Common/Defs.h \ + ../Agent/../Common/../../ICoder.h \ + ../Agent/../Common/../../../Windows/DLL.h \ + ../Agent/../Common/../../../Windows/../Common/MyString.h \ + ../Agent/Agent.h ../../../Windows/PropVariant.h \ + ../../../Windows/../Common/Types.h ../Agent/../Common/OpenArchive.h \ + ../Agent/../Common/UpdateAction.h ../Agent/../FileManager/IFolder.h \ + ../Agent/../FileManager/../../IProgress.h \ + ../Agent/../FileManager/../../IStream.h ../Agent/../Common/LoadCodecs.h \ + ../Agent/AgentProxy.h ../Agent/IFolderArchive.h ../Agent/../../IDecl.h \ + ../Agent/../../Archive/IArchive.h ../Agent/../../UI/Common/LoadCodecs.h \ + ../Agent/../../UI/FileManager/IFolder.h ../Agent/../Common/ExtractMode.h \ + ../Agent/../Common/IFileExtractCallback.h +ArchiveFolderOpen.o: ../Agent/ArchiveFolderOpen.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../Agent/Agent.h ../../../Common/MyCom.h ../../../Common/MyWindows.h \ + ../../../Windows/PropVariant.h ../../../Windows/../Common/MyWindows.h \ + ../../../Windows/../Common/Types.h ../Agent/../Common/OpenArchive.h \ + ../../../Common/MyString.h ../../../Common/MyVector.h \ + ../../../Common/Defs.h ../../../Windows/FileFind.h \ + ../../../Windows/../Common/MyString.h ../../../Windows/FileName.h \ + ../../../Windows/../../C/Types.h ../../../Windows/Defs.h \ + ../Agent/../Common/../../Archive/IArchive.h \ + ../Agent/../Common/../../Archive/../IProgress.h \ + ../Agent/../Common/../../Archive/../../Common/MyUnknown.h \ + ../Agent/../Common/../../Archive/../../Common/MyWindows.h \ + ../Agent/../Common/../../Archive/../../Common/Types.h \ + ../Agent/../Common/../../Archive/../IDecl.h \ + ../Agent/../Common/../../Archive/../IStream.h \ + ../Agent/../Common/../../Archive/../PropID.h \ + ../Agent/../Common/ArchiveOpenCallback.h \ + ../Agent/../Common/../../IPassword.h \ + ../Agent/../Common/../../../Common/MyUnknown.h \ + ../Agent/../Common/../../../Common/Types.h \ + ../Agent/../Common/../../IDecl.h ../Agent/../Common/LoadCodecs.h \ + ../Agent/../Common/../../../Common/Types.h \ + ../Agent/../Common/../../../Common/MyCom.h \ + ../Agent/../Common/../../../Common/MyString.h \ + ../Agent/../Common/../../../Common/Buffer.h \ + ../Agent/../Common/../../../Common/Defs.h \ + ../Agent/../Common/../../ICoder.h ../Agent/../Common/../../IStream.h \ + ../Agent/../Common/../../../Windows/DLL.h \ + ../Agent/../Common/../../../Windows/../Common/MyString.h \ + ../Agent/../Common/UpdateAction.h ../Agent/../FileManager/IFolder.h \ + ../Agent/../FileManager/../../IProgress.h \ + ../Agent/../FileManager/../../IStream.h ../Agent/../Common/LoadCodecs.h \ + ../Agent/AgentProxy.h ../Agent/IFolderArchive.h ../Agent/../../IDecl.h \ + ../Agent/../../Archive/IArchive.h ../Agent/../../UI/Common/LoadCodecs.h \ + ../Agent/../../UI/FileManager/IFolder.h ../Agent/../Common/ExtractMode.h \ + ../Agent/../Common/IFileExtractCallback.h \ + ../Agent/../Common/../../IDecl.h ../../../Common/StringConvert.h \ + ../../../Common/MyString.h +ArchiveFolderOut.o: ../Agent/ArchiveFolderOut.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../../Common/ComTry.h ../../../Common/MyWindows.h \ + ../../../Windows/FileDir.h ../../../Windows/../Common/MyString.h \ + ../../../Windows/../Common/MyVector.h ../../../Windows/../Common/Defs.h \ + ../../../Windows/Defs.h ../../../Windows/../Common/MyWindows.h \ + ../Agent/../Common/WorkDir.h ../Agent/../Common/ZipRegistry.h \ + ../../../Common/MyString.h ../Agent/../Common/ExtractMode.h \ + ../Agent/Agent.h ../../../Common/MyCom.h ../../../Windows/PropVariant.h \ + ../../../Windows/../Common/Types.h ../Agent/../Common/OpenArchive.h \ + ../../../Windows/FileFind.h ../../../Windows/FileName.h \ + ../../../Windows/../../C/Types.h \ + ../Agent/../Common/../../Archive/IArchive.h \ + ../Agent/../Common/../../Archive/../IProgress.h \ + ../Agent/../Common/../../Archive/../../Common/MyUnknown.h \ + ../Agent/../Common/../../Archive/../../Common/MyWindows.h \ + ../Agent/../Common/../../Archive/../../Common/Types.h \ + ../Agent/../Common/../../Archive/../IDecl.h \ + ../Agent/../Common/../../Archive/../IStream.h \ + ../Agent/../Common/../../Archive/../PropID.h \ + ../Agent/../Common/ArchiveOpenCallback.h \ + ../Agent/../Common/../../IPassword.h \ + ../Agent/../Common/../../../Common/MyUnknown.h \ + ../Agent/../Common/../../../Common/Types.h \ + ../Agent/../Common/../../IDecl.h ../Agent/../Common/LoadCodecs.h \ + ../Agent/../Common/../../../Common/Types.h \ + ../Agent/../Common/../../../Common/MyCom.h \ + ../Agent/../Common/../../../Common/MyString.h \ + ../Agent/../Common/../../../Common/Buffer.h \ + ../Agent/../Common/../../../Common/Defs.h \ + ../Agent/../Common/../../ICoder.h ../Agent/../Common/../../IStream.h \ + ../Agent/../Common/../../../Windows/DLL.h \ + ../Agent/../Common/../../../Windows/../Common/MyString.h \ + ../Agent/../Common/UpdateAction.h ../Agent/../FileManager/IFolder.h \ + ../Agent/../FileManager/../../IProgress.h \ + ../Agent/../FileManager/../../IStream.h ../Agent/../Common/LoadCodecs.h \ + ../Agent/AgentProxy.h ../Agent/IFolderArchive.h ../Agent/../../IDecl.h \ + ../Agent/../../Archive/IArchive.h ../Agent/../../UI/Common/LoadCodecs.h \ + ../Agent/../../UI/FileManager/IFolder.h ../Agent/../Common/ExtractMode.h \ + ../Agent/../Common/IFileExtractCallback.h \ + ../Agent/../Common/../../IDecl.h +UpdateCallbackAgent.o: ../Agent/UpdateCallbackAgent.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../../Windows/Error.h ../../../Common/MyString.h \ + ../../../Common/MyVector.h ../../../Common/Defs.h \ + ../../../Common/IntToString.h ../Agent/UpdateCallbackAgent.h \ + ../Agent/../Common/UpdateCallback.h ../../../Common/MyCom.h \ + ../../../Common/MyWindows.h ../Agent/../Common/../../IPassword.h \ + ../Agent/../Common/../../../Common/MyUnknown.h \ + ../Agent/../Common/../../../Common/MyWindows.h \ + ../Agent/../Common/../../../Common/Types.h \ + ../Agent/../Common/../../IDecl.h ../Agent/../Common/../../ICoder.h \ + ../Agent/../Common/../../IStream.h \ + ../Agent/../Common/../Common/UpdatePair.h \ + ../Agent/../Common/../Common/DirItem.h \ + ../Agent/../Common/../Common/../../Archive/IArchive.h \ + ../Agent/../Common/../Common/../../Archive/../IProgress.h \ + ../Agent/../Common/../Common/../../Archive/../../Common/MyUnknown.h \ + ../Agent/../Common/../Common/../../Archive/../../Common/Types.h \ + ../Agent/../Common/../Common/../../Archive/../IDecl.h \ + ../Agent/../Common/../Common/../../Archive/../IStream.h \ + ../Agent/../Common/../Common/../../Archive/../PropID.h \ + ../Agent/../Common/../Common/UpdateAction.h \ + ../Agent/../Common/../Common/UpdateProduce.h \ + ../Agent/../Common/../Common/UpdatePair.h ../Agent/IFolderArchive.h \ + ../Agent/../../IDecl.h ../Agent/../../Archive/IArchive.h \ + ../Agent/../../UI/Common/LoadCodecs.h \ + ../Agent/../../UI/Common/../../../Common/Types.h \ + ../Agent/../../UI/Common/../../../Common/MyCom.h \ + ../Agent/../../UI/Common/../../../Common/MyString.h \ + ../Agent/../../UI/Common/../../../Common/Buffer.h \ + ../Agent/../../UI/Common/../../../Common/Defs.h \ + ../Agent/../../UI/Common/../../ICoder.h \ + ../Agent/../../UI/Common/../../../Windows/DLL.h \ + ../Agent/../../UI/Common/../../../Windows/../Common/MyString.h \ + ../Agent/../../UI/Common/../../Archive/IArchive.h \ + ../Agent/../../UI/FileManager/IFolder.h \ + ../Agent/../../UI/FileManager/../../IProgress.h \ + ../Agent/../../UI/FileManager/../../IStream.h \ + ../Agent/../Common/ExtractMode.h \ + ../Agent/../Common/IFileExtractCallback.h \ + ../Agent/../Common/../../IDecl.h +App.o: App.cpp ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + resource.h resourceGui.h OverwriteDialogRes.h \ + ../../../Common/IntToString.h ../../../Common/StringConvert.h \ + ../../../Common/MyWindows.h ../../../Common/MyString.h \ + ../../../Common/MyVector.h ../../../Common/Defs.h ../../../Windows/COM.h \ + ../../../Common/MyString.h ../../../Windows/Error.h \ + ../../../Windows/FileDir.h ../../../Windows/../Common/MyString.h \ + ../../../Windows/Defs.h ../../../Windows/../Common/MyWindows.h \ + ../../../Windows/PropVariant.h ../../../Windows/../Common/Types.h \ + ../../../Windows/PropVariantConversions.h ../../../Windows/Thread.h \ + ../../../Windows/../../C/Threads.h ../../../Windows/../../C/Types.h \ + App.h AppState.h ../../../Windows/Synchronization.h \ + ../../../Windows/Synchronization2.h ViewSettings.h Panel.h \ + ../../../../C/Alloc.h ../../../Common/MyCom.h ../../../Windows/DLL.h \ + ../../../Windows/FileFind.h ../../../Windows/FileName.h \ + ../../../Windows/../../C/Types.h ../../../Windows/Control/ComboBox.h \ + ../../../Windows/Window.h ../../../Windows/Defs.h \ + ../../../Windows/Control/Window2.h ../../../Windows/Control/Edit.h \ + ../../../Windows/Control/ListView.h ../../../Windows/Control/Static.h \ + ../../../Windows/Control/StatusBar.h IFolder.h ../../IProgress.h \ + ../../../Common/MyUnknown.h ../../../Common/Types.h ../../IDecl.h \ + ../../IStream.h ProgressDialog2.h ../../../Windows/Control/Dialog.h \ + ../../../Windows/Control/ProgressBar.h SysIconUtils.h CopyDialog.h \ + CopyDialogRes.h ExtractCallback.h ../../../Windows/ResourceString.h \ + ../Agent/IFolderArchive.h ../Agent/../../IDecl.h \ + ../Agent/../../Archive/IArchive.h ../Agent/../../Archive/../IProgress.h \ + ../Agent/../../Archive/../IStream.h ../Agent/../../Archive/../PropID.h \ + ../Agent/../../UI/Common/LoadCodecs.h \ + ../Agent/../../UI/Common/../../../Common/Types.h \ + ../Agent/../../UI/Common/../../../Common/MyCom.h \ + ../Agent/../../UI/Common/../../../Common/MyString.h \ + ../Agent/../../UI/Common/../../../Common/Buffer.h \ + ../Agent/../../UI/Common/../../../Common/Defs.h \ + ../Agent/../../UI/Common/../../ICoder.h \ + ../Agent/../../UI/Common/../../IStream.h \ + ../Agent/../../UI/Common/../../../Windows/DLL.h \ + ../Agent/../../UI/Common/../../Archive/IArchive.h \ + ../Agent/../../UI/FileManager/IFolder.h ../Agent/../Common/ExtractMode.h \ + ../Agent/../Common/IFileExtractCallback.h \ + ../Agent/../Common/../../IDecl.h ../Common/ArchiveOpenCallback.h \ + ../Common/../../IPassword.h ../Common/../../../Common/MyUnknown.h \ + ../Common/../../../Common/Types.h ../Common/../../IDecl.h \ + ../Common/../../Archive/IArchive.h ../../IPassword.h LangUtils.h \ + ../../../Common/Lang.h FormatUtils.h RegistryUtils.h +wxFM.o: wxFM.cpp ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + /usr/include/wx-2.8/wx/wxprec.h /usr/include/wx-2.8/wx/defs.h \ + /usr/include/wx-2.8/wx/platform.h \ + /usr/lib/wx/include/gtk2-unicode-release-2.8/wx/setup.h \ + /usr/include/wx-2.8/wx/chkconf.h /usr/include/wx-2.8/wx/features.h \ + /usr/include/wx-2.8/wx/version.h /usr/include/wx-2.8/wx/cpp.h \ + /usr/include/wx-2.8/wx/dlimpexp.h /usr/include/wx-2.8/wx/debug.h \ + /usr/include/wx-2.8/wx/wxchar.h /usr/include/wx-2.8/wx/wx.h \ + /usr/include/wx-2.8/wx/object.h /usr/include/wx-2.8/wx/memory.h \ + /usr/include/wx-2.8/wx/string.h /usr/include/wx-2.8/wx/buffer.h \ + /usr/include/wx-2.8/wx/strconv.h /usr/include/wx-2.8/wx/fontenc.h \ + /usr/include/wx-2.8/wx/beforestd.h /usr/include/wx-2.8/wx/afterstd.h \ + /usr/include/wx-2.8/wx/iosfwrap.h /usr/include/wx-2.8/wx/msgout.h \ + /usr/include/wx-2.8/wx/dynarray.h /usr/include/wx-2.8/wx/list.h \ + /usr/include/wx-2.8/wx/hash.h /usr/include/wx-2.8/wx/hashmap.h \ + /usr/include/wx-2.8/wx/arrstr.h /usr/include/wx-2.8/wx/intl.h \ + /usr/include/wx-2.8/wx/log.h /usr/include/wx-2.8/wx/generic/logg.h \ + /usr/include/wx-2.8/wx/event.h /usr/include/wx-2.8/wx/clntdata.h \ + /usr/include/wx-2.8/wx/vector.h /usr/include/wx-2.8/wx/gdicmn.h \ + /usr/include/wx-2.8/wx/math.h /usr/include/wx-2.8/wx/cursor.h \ + /usr/include/wx-2.8/wx/gtk/cursor.h /usr/include/wx-2.8/wx/utils.h \ + /usr/include/wx-2.8/wx/filefn.h /usr/include/wx-2.8/wx/longlong.h \ + /usr/include/wx-2.8/wx/platinfo.h /usr/include/wx-2.8/wx/thread.h \ + /usr/include/wx-2.8/wx/app.h /usr/include/wx-2.8/wx/build.h \ + /usr/include/wx-2.8/wx/init.h /usr/include/wx-2.8/wx/gtk/app.h \ + /usr/include/wx-2.8/wx/stream.h /usr/include/wx-2.8/wx/stopwatch.h \ + /usr/include/wx-2.8/wx/module.h /usr/include/wx-2.8/wx/window.h \ + /usr/include/wx-2.8/wx/font.h /usr/include/wx-2.8/wx/gdiobj.h \ + /usr/include/wx-2.8/wx/gtk/font.h /usr/include/wx-2.8/wx/colour.h \ + /usr/include/wx-2.8/wx/variant.h /usr/include/wx-2.8/wx/datetime.h \ + /usr/include/wx-2.8/wx/gtk/colour.h /usr/include/wx-2.8/wx/region.h \ + /usr/include/wx-2.8/wx/gtk/region.h /usr/include/wx-2.8/wx/validate.h \ + /usr/include/wx-2.8/wx/palette.h \ + /usr/include/wx-2.8/wx/generic/paletteg.h /usr/include/wx-2.8/wx/accel.h \ + /usr/include/wx-2.8/wx/gtk/accel.h \ + /usr/include/wx-2.8/wx/generic/accel.h \ + /usr/include/wx-2.8/wx/gtk/window.h /usr/include/wx-2.8/wx/containr.h \ + /usr/include/wx-2.8/wx/panel.h /usr/include/wx-2.8/wx/generic/panelg.h \ + /usr/include/wx-2.8/wx/toplevel.h /usr/include/wx-2.8/wx/iconbndl.h \ + /usr/include/wx-2.8/wx/gtk/toplevel.h /usr/include/wx-2.8/wx/frame.h \ + /usr/include/wx-2.8/wx/gtk/frame.h /usr/include/wx-2.8/wx/bitmap.h \ + /usr/include/wx-2.8/wx/gtk/bitmap.h /usr/include/wx-2.8/wx/image.h \ + /usr/include/wx-2.8/wx/imagbmp.h /usr/include/wx-2.8/wx/imagpng.h \ + /usr/include/wx-2.8/wx/imaggif.h /usr/include/wx-2.8/wx/imagpcx.h \ + /usr/include/wx-2.8/wx/imagjpeg.h /usr/include/wx-2.8/wx/imagtga.h \ + /usr/include/wx-2.8/wx/imagtiff.h /usr/include/wx-2.8/wx/imagpnm.h \ + /usr/include/wx-2.8/wx/imagxpm.h /usr/include/wx-2.8/wx/imagiff.h \ + /usr/include/wx-2.8/wx/dc.h /usr/include/wx-2.8/wx/brush.h \ + /usr/include/wx-2.8/wx/gtk/brush.h /usr/include/wx-2.8/wx/pen.h \ + /usr/include/wx-2.8/wx/gtk/pen.h /usr/include/wx-2.8/wx/gtk/dc.h \ + /usr/include/wx-2.8/wx/dcgraph.h /usr/include/wx-2.8/wx/geometry.h \ + /usr/include/wx-2.8/wx/graphics.h /usr/include/wx-2.8/wx/dcclient.h \ + /usr/include/wx-2.8/wx/gtk/dcclient.h /usr/include/wx-2.8/wx/dcmemory.h \ + /usr/include/wx-2.8/wx/gtk/dcmemory.h /usr/include/wx-2.8/wx/dcprint.h \ + /usr/include/wx-2.8/wx/dcscreen.h /usr/include/wx-2.8/wx/gtk/dcscreen.h \ + /usr/include/wx-2.8/wx/button.h /usr/include/wx-2.8/wx/control.h \ + /usr/include/wx-2.8/wx/gtk/control.h /usr/include/wx-2.8/wx/gtk/button.h \ + /usr/include/wx-2.8/wx/menuitem.h /usr/include/wx-2.8/wx/gtk/menuitem.h \ + /usr/include/wx-2.8/wx/menu.h /usr/include/wx-2.8/wx/gtk/menu.h \ + /usr/include/wx-2.8/wx/icon.h /usr/include/wx-2.8/wx/iconloc.h \ + /usr/include/wx-2.8/wx/generic/icon.h /usr/include/wx-2.8/wx/dialog.h \ + /usr/include/wx-2.8/wx/gtk/dialog.h /usr/include/wx-2.8/wx/timer.h \ + /usr/include/wx-2.8/wx/gtk/timer.h /usr/include/wx-2.8/wx/settings.h \ + /usr/include/wx-2.8/wx/msgdlg.h /usr/include/wx-2.8/wx/gtk/msgdlg.h \ + /usr/include/wx-2.8/wx/cmndata.h /usr/include/wx-2.8/wx/encinfo.h \ + /usr/include/wx-2.8/wx/dataobj.h /usr/include/wx-2.8/wx/gtk/dataform.h \ + /usr/include/wx-2.8/wx/gtk/dataobj.h \ + /usr/include/wx-2.8/wx/gtk/dataobj2.h /usr/include/wx-2.8/wx/ctrlsub.h \ + /usr/include/wx-2.8/wx/bmpbuttn.h /usr/include/wx-2.8/wx/gtk/bmpbuttn.h \ + /usr/include/wx-2.8/wx/checkbox.h /usr/include/wx-2.8/wx/gtk/checkbox.h \ + /usr/include/wx-2.8/wx/checklst.h /usr/include/wx-2.8/wx/listbox.h \ + /usr/include/wx-2.8/wx/gtk/listbox.h \ + /usr/include/wx-2.8/wx/gtk/checklst.h /usr/include/wx-2.8/wx/choice.h \ + /usr/include/wx-2.8/wx/gtk/choice.h /usr/include/wx-2.8/wx/scrolbar.h \ + /usr/include/wx-2.8/wx/gtk/scrolbar.h /usr/include/wx-2.8/wx/stattext.h \ + /usr/include/wx-2.8/wx/gtk/stattext.h /usr/include/wx-2.8/wx/statbmp.h \ + /usr/include/wx-2.8/wx/gtk/statbmp.h /usr/include/wx-2.8/wx/statbox.h \ + /usr/include/wx-2.8/wx/gtk/statbox.h /usr/include/wx-2.8/wx/radiobox.h \ + /usr/include/wx-2.8/wx/gtk/radiobox.h /usr/include/wx-2.8/wx/radiobut.h \ + /usr/include/wx-2.8/wx/gtk/radiobut.h /usr/include/wx-2.8/wx/textctrl.h \ + /usr/include/wx-2.8/wx/ioswrap.h /usr/include/wx-2.8/wx/gtk/textctrl.h \ + /usr/include/wx-2.8/wx/slider.h /usr/include/wx-2.8/wx/gtk/slider.h \ + /usr/include/wx-2.8/wx/gauge.h /usr/include/wx-2.8/wx/gtk/gauge.h \ + /usr/include/wx-2.8/wx/scrolwin.h /usr/include/wx-2.8/wx/gtk/scrolwin.h \ + /usr/include/wx-2.8/wx/dirdlg.h /usr/include/wx-2.8/wx/gtk/dirdlg.h \ + /usr/include/wx-2.8/wx/generic/dirdlgg.h \ + /usr/include/wx-2.8/wx/toolbar.h /usr/include/wx-2.8/wx/tbarbase.h \ + /usr/include/wx-2.8/wx/gtk/tbargtk.h /usr/include/wx-2.8/wx/combobox.h \ + /usr/include/wx-2.8/wx/gtk/combobox.h /usr/include/wx-2.8/wx/layout.h \ + /usr/include/wx-2.8/wx/sizer.h /usr/include/wx-2.8/wx/mdi.h \ + /usr/include/wx-2.8/wx/gtk/mdi.h /usr/include/wx-2.8/wx/statusbr.h \ + /usr/include/wx-2.8/wx/generic/statusbr.h \ + /usr/include/wx-2.8/wx/choicdlg.h \ + /usr/include/wx-2.8/wx/generic/choicdgg.h \ + /usr/include/wx-2.8/wx/textdlg.h \ + /usr/include/wx-2.8/wx/generic/textdlgg.h \ + /usr/include/wx-2.8/wx/valtext.h /usr/include/wx-2.8/wx/filedlg.h \ + /usr/include/wx-2.8/wx/gtk/filedlg.h \ + /usr/include/wx-2.8/wx/generic/filedlgg.h \ + /usr/include/wx-2.8/wx/listctrl.h /usr/include/wx-2.8/wx/listbase.h \ + /usr/include/wx-2.8/wx/generic/listctrl.h ../../../Windows/Registry.h \ + ../../../Common/Buffer.h ../../../Common/Defs.h \ + ../../../Common/MyString.h ../../../Common/MyVector.h \ + ../../../Common/StringConvert.h ../../../Common/MyWindows.h \ + ../../../Common/MyString.h ../../../Windows/FileDir.h \ + ../../../Windows/../Common/MyString.h ../../../Windows/Defs.h \ + ../../../Windows/../Common/MyWindows.h \ + ../../../Windows/Synchronization.h ../../../Windows/../../C/Threads.h \ + ../../../Windows/../../C/Types.h ../../../Windows/Synchronization2.h \ + ../Explorer/MyMessages.h RegistryUtils.h \ + ../FileManager/ProgramLocation.h ../../../myWindows/myPrivate.h +FM.o: FM.cpp ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + resource.h resourceGui.h Panel.h ../../../../C/Alloc.h \ + ../../../Common/MyCom.h ../../../Common/MyWindows.h \ + ../../../Windows/DLL.h ../../../Windows/../Common/MyString.h \ + ../../../Windows/../Common/MyVector.h ../../../Windows/../Common/Defs.h \ + ../../../Windows/FileFind.h ../../../Windows/FileName.h \ + ../../../Windows/../../C/Types.h ../../../Windows/Defs.h \ + ../../../Windows/../Common/MyWindows.h ../../../Windows/FileDir.h \ + ../../../Windows/Synchronization.h ../../../Windows/../../C/Threads.h \ + ../../../Windows/../../C/Types.h ../../../Windows/Synchronization2.h \ + ../../../Windows/Control/ComboBox.h ../../../Windows/Window.h \ + ../../../Windows/Defs.h ../../../Common/MyString.h \ + ../../../Windows/Control/Window2.h ../../../Windows/Control/Edit.h \ + ../../../Windows/Control/ListView.h ../../../Windows/Control/Static.h \ + ../../../Windows/Control/StatusBar.h AppState.h ViewSettings.h IFolder.h \ + ../../IProgress.h ../../../Common/MyUnknown.h ../../../Common/Types.h \ + ../../IDecl.h ../../IStream.h ProgressDialog2.h \ + ../../../Windows/Thread.h ../../../Windows/Control/Dialog.h \ + ../../../Windows/Control/ProgressBar.h SysIconUtils.h \ + ../../../Common/Defs.h ../../../Common/StringConvert.h \ + ../../../Common/MyString.h ../../../Windows/Error.h \ + ../../../Windows/COM.h ../GUI/ExtractRes.h App.h StringUtils.h \ + MyLoadMenu.h LangUtils.h ../../../Common/Lang.h \ + ../../../Common/MyVector.h ../../../Windows/ResourceString.h \ + FormatUtils.h RegistryUtils.h +FM_rc.o: FM_rc.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h /usr/include/wx-2.8/wx/wxprec.h \ + /usr/include/wx-2.8/wx/defs.h /usr/include/wx-2.8/wx/platform.h \ + /usr/lib/wx/include/gtk2-unicode-release-2.8/wx/setup.h \ + /usr/include/wx-2.8/wx/chkconf.h /usr/include/wx-2.8/wx/features.h \ + /usr/include/wx-2.8/wx/version.h /usr/include/wx-2.8/wx/cpp.h \ + /usr/include/wx-2.8/wx/dlimpexp.h /usr/include/wx-2.8/wx/debug.h \ + /usr/include/wx-2.8/wx/wxchar.h /usr/include/wx-2.8/wx/wx.h \ + /usr/include/wx-2.8/wx/object.h /usr/include/wx-2.8/wx/memory.h \ + /usr/include/wx-2.8/wx/string.h /usr/include/wx-2.8/wx/buffer.h \ + /usr/include/wx-2.8/wx/strconv.h /usr/include/wx-2.8/wx/fontenc.h \ + /usr/include/wx-2.8/wx/beforestd.h /usr/include/wx-2.8/wx/afterstd.h \ + /usr/include/wx-2.8/wx/iosfwrap.h /usr/include/wx-2.8/wx/msgout.h \ + /usr/include/wx-2.8/wx/dynarray.h /usr/include/wx-2.8/wx/list.h \ + /usr/include/wx-2.8/wx/hash.h /usr/include/wx-2.8/wx/hashmap.h \ + /usr/include/wx-2.8/wx/arrstr.h /usr/include/wx-2.8/wx/intl.h \ + /usr/include/wx-2.8/wx/log.h /usr/include/wx-2.8/wx/generic/logg.h \ + /usr/include/wx-2.8/wx/event.h /usr/include/wx-2.8/wx/clntdata.h \ + /usr/include/wx-2.8/wx/vector.h /usr/include/wx-2.8/wx/gdicmn.h \ + /usr/include/wx-2.8/wx/math.h /usr/include/wx-2.8/wx/cursor.h \ + /usr/include/wx-2.8/wx/gtk/cursor.h /usr/include/wx-2.8/wx/utils.h \ + /usr/include/wx-2.8/wx/filefn.h /usr/include/wx-2.8/wx/longlong.h \ + /usr/include/wx-2.8/wx/platinfo.h /usr/include/wx-2.8/wx/thread.h \ + /usr/include/wx-2.8/wx/app.h /usr/include/wx-2.8/wx/build.h \ + /usr/include/wx-2.8/wx/init.h /usr/include/wx-2.8/wx/gtk/app.h \ + /usr/include/wx-2.8/wx/stream.h /usr/include/wx-2.8/wx/stopwatch.h \ + /usr/include/wx-2.8/wx/module.h /usr/include/wx-2.8/wx/window.h \ + /usr/include/wx-2.8/wx/font.h /usr/include/wx-2.8/wx/gdiobj.h \ + /usr/include/wx-2.8/wx/gtk/font.h /usr/include/wx-2.8/wx/colour.h \ + /usr/include/wx-2.8/wx/variant.h /usr/include/wx-2.8/wx/datetime.h \ + /usr/include/wx-2.8/wx/gtk/colour.h /usr/include/wx-2.8/wx/region.h \ + /usr/include/wx-2.8/wx/gtk/region.h /usr/include/wx-2.8/wx/validate.h \ + /usr/include/wx-2.8/wx/palette.h \ + /usr/include/wx-2.8/wx/generic/paletteg.h /usr/include/wx-2.8/wx/accel.h \ + /usr/include/wx-2.8/wx/gtk/accel.h \ + /usr/include/wx-2.8/wx/generic/accel.h \ + /usr/include/wx-2.8/wx/gtk/window.h /usr/include/wx-2.8/wx/containr.h \ + /usr/include/wx-2.8/wx/panel.h /usr/include/wx-2.8/wx/generic/panelg.h \ + /usr/include/wx-2.8/wx/toplevel.h /usr/include/wx-2.8/wx/iconbndl.h \ + /usr/include/wx-2.8/wx/gtk/toplevel.h /usr/include/wx-2.8/wx/frame.h \ + /usr/include/wx-2.8/wx/gtk/frame.h /usr/include/wx-2.8/wx/bitmap.h \ + /usr/include/wx-2.8/wx/gtk/bitmap.h /usr/include/wx-2.8/wx/image.h \ + /usr/include/wx-2.8/wx/imagbmp.h /usr/include/wx-2.8/wx/imagpng.h \ + /usr/include/wx-2.8/wx/imaggif.h /usr/include/wx-2.8/wx/imagpcx.h \ + /usr/include/wx-2.8/wx/imagjpeg.h /usr/include/wx-2.8/wx/imagtga.h \ + /usr/include/wx-2.8/wx/imagtiff.h /usr/include/wx-2.8/wx/imagpnm.h \ + /usr/include/wx-2.8/wx/imagxpm.h /usr/include/wx-2.8/wx/imagiff.h \ + /usr/include/wx-2.8/wx/dc.h /usr/include/wx-2.8/wx/brush.h \ + /usr/include/wx-2.8/wx/gtk/brush.h /usr/include/wx-2.8/wx/pen.h \ + /usr/include/wx-2.8/wx/gtk/pen.h /usr/include/wx-2.8/wx/gtk/dc.h \ + /usr/include/wx-2.8/wx/dcgraph.h /usr/include/wx-2.8/wx/geometry.h \ + /usr/include/wx-2.8/wx/graphics.h /usr/include/wx-2.8/wx/dcclient.h \ + /usr/include/wx-2.8/wx/gtk/dcclient.h /usr/include/wx-2.8/wx/dcmemory.h \ + /usr/include/wx-2.8/wx/gtk/dcmemory.h /usr/include/wx-2.8/wx/dcprint.h \ + /usr/include/wx-2.8/wx/dcscreen.h /usr/include/wx-2.8/wx/gtk/dcscreen.h \ + /usr/include/wx-2.8/wx/button.h /usr/include/wx-2.8/wx/control.h \ + /usr/include/wx-2.8/wx/gtk/control.h /usr/include/wx-2.8/wx/gtk/button.h \ + /usr/include/wx-2.8/wx/menuitem.h /usr/include/wx-2.8/wx/gtk/menuitem.h \ + /usr/include/wx-2.8/wx/menu.h /usr/include/wx-2.8/wx/gtk/menu.h \ + /usr/include/wx-2.8/wx/icon.h /usr/include/wx-2.8/wx/iconloc.h \ + /usr/include/wx-2.8/wx/generic/icon.h /usr/include/wx-2.8/wx/dialog.h \ + /usr/include/wx-2.8/wx/gtk/dialog.h /usr/include/wx-2.8/wx/timer.h \ + /usr/include/wx-2.8/wx/gtk/timer.h /usr/include/wx-2.8/wx/settings.h \ + /usr/include/wx-2.8/wx/msgdlg.h /usr/include/wx-2.8/wx/gtk/msgdlg.h \ + /usr/include/wx-2.8/wx/cmndata.h /usr/include/wx-2.8/wx/encinfo.h \ + /usr/include/wx-2.8/wx/dataobj.h /usr/include/wx-2.8/wx/gtk/dataform.h \ + /usr/include/wx-2.8/wx/gtk/dataobj.h \ + /usr/include/wx-2.8/wx/gtk/dataobj2.h /usr/include/wx-2.8/wx/ctrlsub.h \ + /usr/include/wx-2.8/wx/bmpbuttn.h /usr/include/wx-2.8/wx/gtk/bmpbuttn.h \ + /usr/include/wx-2.8/wx/checkbox.h /usr/include/wx-2.8/wx/gtk/checkbox.h \ + /usr/include/wx-2.8/wx/checklst.h /usr/include/wx-2.8/wx/listbox.h \ + /usr/include/wx-2.8/wx/gtk/listbox.h \ + /usr/include/wx-2.8/wx/gtk/checklst.h /usr/include/wx-2.8/wx/choice.h \ + /usr/include/wx-2.8/wx/gtk/choice.h /usr/include/wx-2.8/wx/scrolbar.h \ + /usr/include/wx-2.8/wx/gtk/scrolbar.h /usr/include/wx-2.8/wx/stattext.h \ + /usr/include/wx-2.8/wx/gtk/stattext.h /usr/include/wx-2.8/wx/statbmp.h \ + /usr/include/wx-2.8/wx/gtk/statbmp.h /usr/include/wx-2.8/wx/statbox.h \ + /usr/include/wx-2.8/wx/gtk/statbox.h /usr/include/wx-2.8/wx/radiobox.h \ + /usr/include/wx-2.8/wx/gtk/radiobox.h /usr/include/wx-2.8/wx/radiobut.h \ + /usr/include/wx-2.8/wx/gtk/radiobut.h /usr/include/wx-2.8/wx/textctrl.h \ + /usr/include/wx-2.8/wx/ioswrap.h /usr/include/wx-2.8/wx/gtk/textctrl.h \ + /usr/include/wx-2.8/wx/slider.h /usr/include/wx-2.8/wx/gtk/slider.h \ + /usr/include/wx-2.8/wx/gauge.h /usr/include/wx-2.8/wx/gtk/gauge.h \ + /usr/include/wx-2.8/wx/scrolwin.h /usr/include/wx-2.8/wx/gtk/scrolwin.h \ + /usr/include/wx-2.8/wx/dirdlg.h /usr/include/wx-2.8/wx/gtk/dirdlg.h \ + /usr/include/wx-2.8/wx/generic/dirdlgg.h \ + /usr/include/wx-2.8/wx/toolbar.h /usr/include/wx-2.8/wx/tbarbase.h \ + /usr/include/wx-2.8/wx/gtk/tbargtk.h /usr/include/wx-2.8/wx/combobox.h \ + /usr/include/wx-2.8/wx/gtk/combobox.h /usr/include/wx-2.8/wx/layout.h \ + /usr/include/wx-2.8/wx/sizer.h /usr/include/wx-2.8/wx/mdi.h \ + /usr/include/wx-2.8/wx/gtk/mdi.h /usr/include/wx-2.8/wx/statusbr.h \ + /usr/include/wx-2.8/wx/generic/statusbr.h \ + /usr/include/wx-2.8/wx/choicdlg.h \ + /usr/include/wx-2.8/wx/generic/choicdgg.h \ + /usr/include/wx-2.8/wx/textdlg.h \ + /usr/include/wx-2.8/wx/generic/textdlgg.h \ + /usr/include/wx-2.8/wx/valtext.h /usr/include/wx-2.8/wx/filedlg.h \ + /usr/include/wx-2.8/wx/gtk/filedlg.h \ + /usr/include/wx-2.8/wx/generic/filedlgg.h \ + /usr/include/wx-2.8/wx/listctrl.h /usr/include/wx-2.8/wx/listbase.h \ + /usr/include/wx-2.8/wx/generic/listctrl.h \ + /usr/include/wx-2.8/wx/mimetype.h /usr/include/wx-2.8/wx/artprov.h \ + /usr/include/wx-2.8/wx/imaglist.h \ + /usr/include/wx-2.8/wx/generic/imaglist.h resource.h resourceGui.h \ + PropertyNameRes.h App.h AppState.h ../../../Windows/Synchronization.h \ + ../../../Windows/Defs.h ../../../Windows/../Common/MyWindows.h \ + ../../../Windows/../../C/Threads.h ../../../Windows/../../C/Types.h \ + ../../../Windows/Synchronization2.h ViewSettings.h \ + ../../../Common/MyString.h ../../../Common/MyVector.h \ + ../../../Common/Defs.h Panel.h ../../../../C/Alloc.h \ + ../../../Common/MyCom.h ../../../Common/MyWindows.h \ + ../../../Windows/DLL.h ../../../Windows/../Common/MyString.h \ + ../../../Windows/FileFind.h ../../../Windows/FileName.h \ + ../../../Windows/../../C/Types.h ../../../Windows/FileDir.h \ + ../../../Windows/Control/ComboBox.h ../../../Windows/Window.h \ + ../../../Windows/Defs.h ../../../Windows/Control/Window2.h \ + ../../../Windows/Control/Edit.h ../../../Windows/Control/ListView.h \ + ../../../Windows/Control/Static.h ../../../Windows/Control/StatusBar.h \ + IFolder.h ../../IProgress.h ../../../Common/MyUnknown.h \ + ../../../Common/Types.h ../../IDecl.h ../../IStream.h ProgressDialog2.h \ + ../../../Windows/Thread.h ../../../Windows/Control/Dialog.h \ + ../../../Windows/Control/ProgressBar.h SysIconUtils.h \ + ../../../Windows/Control/DialogImpl.h ../../../../GUI/p7zip_32.xpm \ + res/AddPNG.h res/Add2PNG.h res/ExtractPNG.h res/Extract2PNG.h \ + res/TestPNG.h res/Test2PNG.h res/CopyPNG.h res/Copy2PNG.h res/MovePNG.h \ + res/Move2PNG.h res/DeletePNG.h res/Delete2PNG.h res/InfoPNG.h \ + res/Info2PNG.h LangUtils.h ../../../Common/Lang.h \ + ../../../Common/MyString.h ../../../Windows/ResourceString.h \ + /usr/include/wx-2.8/wx/mstream.h res/ParentFolder.h +OpenCallback.o: OpenCallback.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../../Common/StringConvert.h \ + ../../../Common/MyWindows.h ../../../Common/MyString.h \ + ../../../Common/MyVector.h ../../../Common/Defs.h \ + ../../../Windows/PropVariant.h ../../../Windows/../Common/MyWindows.h \ + ../../../Windows/../Common/Types.h ../../Common/FileStreams.h \ + ../../Common/../../Windows/FileIO.h ../../../Common/MyString.h \ + ../../Common/../../Common/MyCom.h ../../Common/../../Common/MyWindows.h \ + ../../Common/../IStream.h ../../Common/../../Common/MyUnknown.h \ + ../../Common/../../Common/Types.h ../../Common/../IDecl.h OpenCallback.h \ + ../../../Common/MyCom.h ../../../Windows/FileFind.h \ + ../../../Windows/../Common/MyString.h ../../../Windows/FileName.h \ + ../../../Windows/../../C/Types.h ../../../Windows/Defs.h \ + ../../IPassword.h ../../../Common/MyUnknown.h ../../../Common/Types.h \ + ../../IDecl.h ../../Archive/IArchive.h ../../Archive/../IProgress.h \ + ../../Archive/../../Common/MyUnknown.h \ + ../../Archive/../../Common/Types.h ../../Archive/../IDecl.h \ + ../../Archive/../IStream.h ../../Archive/../PropID.h ProgressDialog2.h \ + ../../../Windows/Synchronization.h ../../../Windows/../../C/Threads.h \ + ../../../Windows/../../C/Types.h ../../../Windows/Synchronization2.h \ + ../../../Windows/Thread.h ../../../Windows/Control/Dialog.h \ + ../../../Windows/Window.h ../../../Windows/Defs.h \ + ../../../Windows/Control/ListView.h \ + ../../../Windows/Control/ProgressBar.h PasswordDialog.h \ + ../../../Windows/Control/Edit.h PasswordDialogRes.h +MyLoadMenu.o: MyLoadMenu.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h /usr/include/wx-2.8/wx/wxprec.h \ + /usr/include/wx-2.8/wx/defs.h /usr/include/wx-2.8/wx/platform.h \ + /usr/lib/wx/include/gtk2-unicode-release-2.8/wx/setup.h \ + /usr/include/wx-2.8/wx/chkconf.h /usr/include/wx-2.8/wx/features.h \ + /usr/include/wx-2.8/wx/version.h /usr/include/wx-2.8/wx/cpp.h \ + /usr/include/wx-2.8/wx/dlimpexp.h /usr/include/wx-2.8/wx/debug.h \ + /usr/include/wx-2.8/wx/wxchar.h /usr/include/wx-2.8/wx/wx.h \ + /usr/include/wx-2.8/wx/object.h /usr/include/wx-2.8/wx/memory.h \ + /usr/include/wx-2.8/wx/string.h /usr/include/wx-2.8/wx/buffer.h \ + /usr/include/wx-2.8/wx/strconv.h /usr/include/wx-2.8/wx/fontenc.h \ + /usr/include/wx-2.8/wx/beforestd.h /usr/include/wx-2.8/wx/afterstd.h \ + /usr/include/wx-2.8/wx/iosfwrap.h /usr/include/wx-2.8/wx/msgout.h \ + /usr/include/wx-2.8/wx/dynarray.h /usr/include/wx-2.8/wx/list.h \ + /usr/include/wx-2.8/wx/hash.h /usr/include/wx-2.8/wx/hashmap.h \ + /usr/include/wx-2.8/wx/arrstr.h /usr/include/wx-2.8/wx/intl.h \ + /usr/include/wx-2.8/wx/log.h /usr/include/wx-2.8/wx/generic/logg.h \ + /usr/include/wx-2.8/wx/event.h /usr/include/wx-2.8/wx/clntdata.h \ + /usr/include/wx-2.8/wx/vector.h /usr/include/wx-2.8/wx/gdicmn.h \ + /usr/include/wx-2.8/wx/math.h /usr/include/wx-2.8/wx/cursor.h \ + /usr/include/wx-2.8/wx/gtk/cursor.h /usr/include/wx-2.8/wx/utils.h \ + /usr/include/wx-2.8/wx/filefn.h /usr/include/wx-2.8/wx/longlong.h \ + /usr/include/wx-2.8/wx/platinfo.h /usr/include/wx-2.8/wx/thread.h \ + /usr/include/wx-2.8/wx/app.h /usr/include/wx-2.8/wx/build.h \ + /usr/include/wx-2.8/wx/init.h /usr/include/wx-2.8/wx/gtk/app.h \ + /usr/include/wx-2.8/wx/stream.h /usr/include/wx-2.8/wx/stopwatch.h \ + /usr/include/wx-2.8/wx/module.h /usr/include/wx-2.8/wx/window.h \ + /usr/include/wx-2.8/wx/font.h /usr/include/wx-2.8/wx/gdiobj.h \ + /usr/include/wx-2.8/wx/gtk/font.h /usr/include/wx-2.8/wx/colour.h \ + /usr/include/wx-2.8/wx/variant.h /usr/include/wx-2.8/wx/datetime.h \ + /usr/include/wx-2.8/wx/gtk/colour.h /usr/include/wx-2.8/wx/region.h \ + /usr/include/wx-2.8/wx/gtk/region.h /usr/include/wx-2.8/wx/validate.h \ + /usr/include/wx-2.8/wx/palette.h \ + /usr/include/wx-2.8/wx/generic/paletteg.h /usr/include/wx-2.8/wx/accel.h \ + /usr/include/wx-2.8/wx/gtk/accel.h \ + /usr/include/wx-2.8/wx/generic/accel.h \ + /usr/include/wx-2.8/wx/gtk/window.h /usr/include/wx-2.8/wx/containr.h \ + /usr/include/wx-2.8/wx/panel.h /usr/include/wx-2.8/wx/generic/panelg.h \ + /usr/include/wx-2.8/wx/toplevel.h /usr/include/wx-2.8/wx/iconbndl.h \ + /usr/include/wx-2.8/wx/gtk/toplevel.h /usr/include/wx-2.8/wx/frame.h \ + /usr/include/wx-2.8/wx/gtk/frame.h /usr/include/wx-2.8/wx/bitmap.h \ + /usr/include/wx-2.8/wx/gtk/bitmap.h /usr/include/wx-2.8/wx/image.h \ + /usr/include/wx-2.8/wx/imagbmp.h /usr/include/wx-2.8/wx/imagpng.h \ + /usr/include/wx-2.8/wx/imaggif.h /usr/include/wx-2.8/wx/imagpcx.h \ + /usr/include/wx-2.8/wx/imagjpeg.h /usr/include/wx-2.8/wx/imagtga.h \ + /usr/include/wx-2.8/wx/imagtiff.h /usr/include/wx-2.8/wx/imagpnm.h \ + /usr/include/wx-2.8/wx/imagxpm.h /usr/include/wx-2.8/wx/imagiff.h \ + /usr/include/wx-2.8/wx/dc.h /usr/include/wx-2.8/wx/brush.h \ + /usr/include/wx-2.8/wx/gtk/brush.h /usr/include/wx-2.8/wx/pen.h \ + /usr/include/wx-2.8/wx/gtk/pen.h /usr/include/wx-2.8/wx/gtk/dc.h \ + /usr/include/wx-2.8/wx/dcgraph.h /usr/include/wx-2.8/wx/geometry.h \ + /usr/include/wx-2.8/wx/graphics.h /usr/include/wx-2.8/wx/dcclient.h \ + /usr/include/wx-2.8/wx/gtk/dcclient.h /usr/include/wx-2.8/wx/dcmemory.h \ + /usr/include/wx-2.8/wx/gtk/dcmemory.h /usr/include/wx-2.8/wx/dcprint.h \ + /usr/include/wx-2.8/wx/dcscreen.h /usr/include/wx-2.8/wx/gtk/dcscreen.h \ + /usr/include/wx-2.8/wx/button.h /usr/include/wx-2.8/wx/control.h \ + /usr/include/wx-2.8/wx/gtk/control.h /usr/include/wx-2.8/wx/gtk/button.h \ + /usr/include/wx-2.8/wx/menuitem.h /usr/include/wx-2.8/wx/gtk/menuitem.h \ + /usr/include/wx-2.8/wx/menu.h /usr/include/wx-2.8/wx/gtk/menu.h \ + /usr/include/wx-2.8/wx/icon.h /usr/include/wx-2.8/wx/iconloc.h \ + /usr/include/wx-2.8/wx/generic/icon.h /usr/include/wx-2.8/wx/dialog.h \ + /usr/include/wx-2.8/wx/gtk/dialog.h /usr/include/wx-2.8/wx/timer.h \ + /usr/include/wx-2.8/wx/gtk/timer.h /usr/include/wx-2.8/wx/settings.h \ + /usr/include/wx-2.8/wx/msgdlg.h /usr/include/wx-2.8/wx/gtk/msgdlg.h \ + /usr/include/wx-2.8/wx/cmndata.h /usr/include/wx-2.8/wx/encinfo.h \ + /usr/include/wx-2.8/wx/dataobj.h /usr/include/wx-2.8/wx/gtk/dataform.h \ + /usr/include/wx-2.8/wx/gtk/dataobj.h \ + /usr/include/wx-2.8/wx/gtk/dataobj2.h /usr/include/wx-2.8/wx/ctrlsub.h \ + /usr/include/wx-2.8/wx/bmpbuttn.h /usr/include/wx-2.8/wx/gtk/bmpbuttn.h \ + /usr/include/wx-2.8/wx/checkbox.h /usr/include/wx-2.8/wx/gtk/checkbox.h \ + /usr/include/wx-2.8/wx/checklst.h /usr/include/wx-2.8/wx/listbox.h \ + /usr/include/wx-2.8/wx/gtk/listbox.h \ + /usr/include/wx-2.8/wx/gtk/checklst.h /usr/include/wx-2.8/wx/choice.h \ + /usr/include/wx-2.8/wx/gtk/choice.h /usr/include/wx-2.8/wx/scrolbar.h \ + /usr/include/wx-2.8/wx/gtk/scrolbar.h /usr/include/wx-2.8/wx/stattext.h \ + /usr/include/wx-2.8/wx/gtk/stattext.h /usr/include/wx-2.8/wx/statbmp.h \ + /usr/include/wx-2.8/wx/gtk/statbmp.h /usr/include/wx-2.8/wx/statbox.h \ + /usr/include/wx-2.8/wx/gtk/statbox.h /usr/include/wx-2.8/wx/radiobox.h \ + /usr/include/wx-2.8/wx/gtk/radiobox.h /usr/include/wx-2.8/wx/radiobut.h \ + /usr/include/wx-2.8/wx/gtk/radiobut.h /usr/include/wx-2.8/wx/textctrl.h \ + /usr/include/wx-2.8/wx/ioswrap.h /usr/include/wx-2.8/wx/gtk/textctrl.h \ + /usr/include/wx-2.8/wx/slider.h /usr/include/wx-2.8/wx/gtk/slider.h \ + /usr/include/wx-2.8/wx/gauge.h /usr/include/wx-2.8/wx/gtk/gauge.h \ + /usr/include/wx-2.8/wx/scrolwin.h /usr/include/wx-2.8/wx/gtk/scrolwin.h \ + /usr/include/wx-2.8/wx/dirdlg.h /usr/include/wx-2.8/wx/gtk/dirdlg.h \ + /usr/include/wx-2.8/wx/generic/dirdlgg.h \ + /usr/include/wx-2.8/wx/toolbar.h /usr/include/wx-2.8/wx/tbarbase.h \ + /usr/include/wx-2.8/wx/gtk/tbargtk.h /usr/include/wx-2.8/wx/combobox.h \ + /usr/include/wx-2.8/wx/gtk/combobox.h /usr/include/wx-2.8/wx/layout.h \ + /usr/include/wx-2.8/wx/sizer.h /usr/include/wx-2.8/wx/mdi.h \ + /usr/include/wx-2.8/wx/gtk/mdi.h /usr/include/wx-2.8/wx/statusbr.h \ + /usr/include/wx-2.8/wx/generic/statusbr.h \ + /usr/include/wx-2.8/wx/choicdlg.h \ + /usr/include/wx-2.8/wx/generic/choicdgg.h \ + /usr/include/wx-2.8/wx/textdlg.h \ + /usr/include/wx-2.8/wx/generic/textdlgg.h \ + /usr/include/wx-2.8/wx/valtext.h /usr/include/wx-2.8/wx/filedlg.h \ + /usr/include/wx-2.8/wx/gtk/filedlg.h \ + /usr/include/wx-2.8/wx/generic/filedlgg.h \ + /usr/include/wx-2.8/wx/listctrl.h /usr/include/wx-2.8/wx/listbase.h \ + /usr/include/wx-2.8/wx/generic/listctrl.h \ + /usr/include/wx-2.8/wx/aboutdlg.h ../../../Common/StringConvert.h \ + ../../../Common/MyWindows.h ../../../Common/MyString.h \ + ../../../Common/MyVector.h ../../../Common/Defs.h \ + ../../../Windows/Menu.h ../../../Windows/Error.h \ + ../../../Common/MyString.h ../../PropID.h resource.h resourceGui.h App.h \ + AppState.h ../../../Windows/Synchronization.h ../../../Windows/Defs.h \ + ../../../Windows/../Common/MyWindows.h \ + ../../../Windows/../../C/Threads.h ../../../Windows/../../C/Types.h \ + ../../../Windows/Synchronization2.h ViewSettings.h Panel.h \ + ../../../../C/Alloc.h ../../../Common/MyCom.h ../../../Windows/DLL.h \ + ../../../Windows/../Common/MyString.h ../../../Windows/FileFind.h \ + ../../../Windows/FileName.h ../../../Windows/../../C/Types.h \ + ../../../Windows/FileDir.h ../../../Windows/Control/ComboBox.h \ + ../../../Windows/Window.h ../../../Windows/Defs.h \ + ../../../Windows/Control/Window2.h ../../../Windows/Control/Edit.h \ + ../../../Windows/Control/ListView.h ../../../Windows/Control/Static.h \ + ../../../Windows/Control/StatusBar.h IFolder.h ../../IProgress.h \ + ../../../Common/MyUnknown.h ../../../Common/Types.h ../../IDecl.h \ + ../../IStream.h ProgressDialog2.h ../../../Windows/Thread.h \ + ../../../Windows/Control/Dialog.h ../../../Windows/Control/ProgressBar.h \ + SysIconUtils.h ../Common/CompressCall.h HelpUtils.h LangUtils.h \ + ../../../Common/Lang.h ../../../Windows/ResourceString.h \ + PluginInterface.h ../../MyVersion.h +Panel.o: Panel.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../../Common/Defs.h \ + ../../../Common/StringConvert.h ../../../Common/MyWindows.h \ + ../../../Common/MyString.h ../../../Common/MyVector.h \ + ../../../Common/Defs.h ../../../Common/IntToString.h \ + ../../../Windows/Error.h ../../../Common/MyString.h \ + ../../../Windows/PropVariant.h ../../../Windows/../Common/MyWindows.h \ + ../../../Windows/../Common/Types.h ../../../Windows/Thread.h \ + ../../../Windows/Defs.h ../../../Windows/../../C/Threads.h \ + ../../../Windows/../../C/Types.h ../../PropID.h Panel.h \ + ../../../../C/Alloc.h ../../../Common/MyCom.h ../../../Windows/DLL.h \ + ../../../Windows/../Common/MyString.h ../../../Windows/FileFind.h \ + ../../../Windows/FileName.h ../../../Windows/../../C/Types.h \ + ../../../Windows/FileDir.h ../../../Windows/Synchronization.h \ + ../../../Windows/Synchronization2.h ../../../Windows/Control/ComboBox.h \ + ../../../Windows/Window.h ../../../Windows/Defs.h \ + ../../../Windows/Control/Window2.h ../../../Windows/Control/Edit.h \ + ../../../Windows/Control/ListView.h ../../../Windows/Control/Static.h \ + ../../../Windows/Control/StatusBar.h AppState.h ViewSettings.h IFolder.h \ + ../../IProgress.h ../../../Common/MyUnknown.h ../../../Common/Types.h \ + ../../IDecl.h ../../IStream.h ProgressDialog2.h \ + ../../../Windows/Control/Dialog.h ../../../Windows/Control/ProgressBar.h \ + SysIconUtils.h RootFolder.h FSFolder.h TextPairs.h FormatUtils.h App.h \ + ExtractCallback.h ../../../Windows/ResourceString.h \ + ../Agent/IFolderArchive.h ../Agent/../../IDecl.h \ + ../Agent/../../Archive/IArchive.h ../Agent/../../Archive/../IProgress.h \ + ../Agent/../../Archive/../IStream.h ../Agent/../../Archive/../PropID.h \ + ../Agent/../../UI/Common/LoadCodecs.h \ + ../Agent/../../UI/Common/../../../Common/Types.h \ + ../Agent/../../UI/Common/../../../Common/MyCom.h \ + ../Agent/../../UI/Common/../../../Common/MyString.h \ + ../Agent/../../UI/Common/../../../Common/Buffer.h \ + ../Agent/../../UI/Common/../../../Common/Defs.h \ + ../Agent/../../UI/Common/../../ICoder.h \ + ../Agent/../../UI/Common/../../IStream.h \ + ../Agent/../../UI/Common/../../../Windows/DLL.h \ + ../Agent/../../UI/Common/../../Archive/IArchive.h \ + ../Agent/../../UI/FileManager/IFolder.h ../Agent/../Common/ExtractMode.h \ + ../Agent/../Common/IFileExtractCallback.h \ + ../Agent/../Common/../../IDecl.h ../Common/ArchiveOpenCallback.h \ + ../Common/../../IPassword.h ../Common/../../../Common/MyUnknown.h \ + ../Common/../../../Common/Types.h ../Common/../../IDecl.h \ + ../Common/../../Archive/IArchive.h ../../IPassword.h LangUtils.h \ + ../../../Common/Lang.h resource.h resourceGui.h ../GUI/ExtractRes.h \ + ../Common/CompressCall.h ../Common/ArchiveName.h +PanelCrc.o: PanelCrc.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../../../C/7zCrc.h \ + ../../../../C/Types.h ../../../../C/Sha256.h \ + ../../../Common/IntToString.h ../../../Windows/FileFind.h \ + ../../../Windows/../Common/MyString.h \ + ../../../Windows/../Common/MyVector.h ../../../Windows/../Common/Defs.h \ + ../../../Windows/FileName.h ../../../Windows/../../C/Types.h \ + ../../../Windows/Defs.h ../../../Windows/../Common/MyWindows.h \ + ../../../Windows/FileIO.h ../../../Common/MyString.h \ + ../../../Windows/FileName.h OverwriteDialogRes.h App.h AppState.h \ + ../../../Windows/Synchronization.h ../../../Windows/../../C/Threads.h \ + ../../../Windows/../../C/Types.h ../../../Windows/Synchronization2.h \ + ViewSettings.h Panel.h ../../../../C/Alloc.h ../../../Common/MyCom.h \ + ../../../Common/MyWindows.h ../../../Windows/DLL.h \ + ../../../Windows/FileDir.h ../../../Windows/Control/ComboBox.h \ + ../../../Windows/Window.h ../../../Windows/Defs.h \ + ../../../Windows/Control/Window2.h ../../../Windows/Control/Edit.h \ + ../../../Windows/Control/ListView.h ../../../Windows/Control/Static.h \ + ../../../Windows/Control/StatusBar.h IFolder.h ../../IProgress.h \ + ../../../Common/MyUnknown.h ../../../Common/Types.h ../../IDecl.h \ + ../../IStream.h ProgressDialog2.h ../../../Windows/Thread.h \ + ../../../Windows/Control/Dialog.h ../../../Windows/Control/ProgressBar.h \ + SysIconUtils.h FormatUtils.h LangUtils.h ../../../Common/Lang.h \ + ../../../Common/MyVector.h ../../../Common/MyString.h \ + ../../../Windows/ResourceString.h ../Common/PropIDUtils.h resource.h \ + resourceGui.h +PanelCopy.o: PanelCopy.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h Panel.h ../../../../C/Alloc.h \ + ../../../Common/MyCom.h ../../../Common/MyWindows.h \ + ../../../Windows/DLL.h ../../../Windows/../Common/MyString.h \ + ../../../Windows/../Common/MyVector.h ../../../Windows/../Common/Defs.h \ + ../../../Windows/FileFind.h ../../../Windows/FileName.h \ + ../../../Windows/../../C/Types.h ../../../Windows/Defs.h \ + ../../../Windows/../Common/MyWindows.h ../../../Windows/FileDir.h \ + ../../../Windows/Synchronization.h ../../../Windows/../../C/Threads.h \ + ../../../Windows/../../C/Types.h ../../../Windows/Synchronization2.h \ + ../../../Windows/Control/ComboBox.h ../../../Windows/Window.h \ + ../../../Windows/Defs.h ../../../Common/MyString.h \ + ../../../Windows/Control/Window2.h ../../../Windows/Control/Edit.h \ + ../../../Windows/Control/ListView.h ../../../Windows/Control/Static.h \ + ../../../Windows/Control/StatusBar.h AppState.h ViewSettings.h IFolder.h \ + ../../IProgress.h ../../../Common/MyUnknown.h ../../../Common/Types.h \ + ../../IDecl.h ../../IStream.h ProgressDialog2.h \ + ../../../Windows/Thread.h ../../../Windows/Control/Dialog.h \ + ../../../Windows/Control/ProgressBar.h SysIconUtils.h resource.h \ + resourceGui.h LangUtils.h ../../../Common/Lang.h \ + ../../../Common/MyVector.h ../../../Common/MyString.h \ + ../../../Windows/ResourceString.h ExtractCallback.h \ + ../Agent/IFolderArchive.h ../Agent/../../IDecl.h \ + ../Agent/../../Archive/IArchive.h ../Agent/../../Archive/../IProgress.h \ + ../Agent/../../Archive/../IStream.h ../Agent/../../Archive/../PropID.h \ + ../Agent/../../UI/Common/LoadCodecs.h \ + ../Agent/../../UI/Common/../../../Common/Types.h \ + ../Agent/../../UI/Common/../../../Common/MyCom.h \ + ../Agent/../../UI/Common/../../../Common/MyString.h \ + ../Agent/../../UI/Common/../../../Common/Buffer.h \ + ../Agent/../../UI/Common/../../../Common/Defs.h \ + ../Agent/../../UI/Common/../../ICoder.h \ + ../Agent/../../UI/Common/../../IStream.h \ + ../Agent/../../UI/Common/../../../Windows/DLL.h \ + ../Agent/../../UI/Common/../../Archive/IArchive.h \ + ../Agent/../../UI/FileManager/IFolder.h ../Agent/../Common/ExtractMode.h \ + ../Agent/../Common/IFileExtractCallback.h \ + ../Agent/../Common/../../IDecl.h ../Common/ArchiveOpenCallback.h \ + ../Common/../../IPassword.h ../Common/../../../Common/MyUnknown.h \ + ../Common/../../../Common/Types.h ../Common/../../IDecl.h \ + ../Common/../../Archive/IArchive.h ../../IPassword.h UpdateCallback100.h +PanelItems.o: PanelItems.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../../../C/Sort.h \ + ../../../../C/Types.h ../../../Common/StringConvert.h \ + ../../../Common/MyWindows.h ../../../Common/MyString.h \ + ../../../Common/MyVector.h ../../../Common/Defs.h \ + ../../../Windows/PropVariant.h ../../../Windows/../Common/MyWindows.h \ + ../../../Windows/../Common/Types.h \ + ../../../Windows/PropVariantConversions.h ../../../Common/MyString.h \ + ../../../Windows/Menu.h ../../PropID.h resource.h resourceGui.h \ + LangUtils.h ../../../Common/Lang.h ../../../Windows/ResourceString.h \ + Panel.h ../../../../C/Alloc.h ../../../Common/MyCom.h \ + ../../../Windows/DLL.h ../../../Windows/../Common/MyString.h \ + ../../../Windows/FileFind.h ../../../Windows/FileName.h \ + ../../../Windows/../../C/Types.h ../../../Windows/Defs.h \ + ../../../Windows/FileDir.h ../../../Windows/Synchronization.h \ + ../../../Windows/../../C/Threads.h ../../../Windows/../../C/Types.h \ + ../../../Windows/Synchronization2.h ../../../Windows/Control/ComboBox.h \ + ../../../Windows/Window.h ../../../Windows/Defs.h \ + ../../../Windows/Control/Window2.h ../../../Windows/Control/Edit.h \ + ../../../Windows/Control/ListView.h ../../../Windows/Control/Static.h \ + ../../../Windows/Control/StatusBar.h AppState.h ViewSettings.h IFolder.h \ + ../../IProgress.h ../../../Common/MyUnknown.h ../../../Common/Types.h \ + ../../IDecl.h ../../IStream.h ProgressDialog2.h \ + ../../../Windows/Thread.h ../../../Windows/Control/Dialog.h \ + ../../../Windows/Control/ProgressBar.h SysIconUtils.h PropertyName.h \ + RootFolder.h FSFolder.h TextPairs.h +PanelListNotify.o: PanelListNotify.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h resource.h resourceGui.h \ + ../../../Common/IntToString.h ../../../Common/StringConvert.h \ + ../../../Common/MyWindows.h ../../../Common/MyString.h \ + ../../../Common/MyVector.h ../../../Common/Defs.h \ + ../../../Windows/PropVariant.h ../../../Windows/../Common/MyWindows.h \ + ../../../Windows/../Common/Types.h \ + ../../../Windows/PropVariantConversions.h ../../../Common/MyString.h \ + ../Common/PropIDUtils.h ../../PropID.h Panel.h ../../../../C/Alloc.h \ + ../../../Common/MyCom.h ../../../Windows/DLL.h \ + ../../../Windows/../Common/MyString.h ../../../Windows/FileFind.h \ + ../../../Windows/FileName.h ../../../Windows/../../C/Types.h \ + ../../../Windows/Defs.h ../../../Windows/FileDir.h \ + ../../../Windows/Synchronization.h ../../../Windows/../../C/Threads.h \ + ../../../Windows/../../C/Types.h ../../../Windows/Synchronization2.h \ + ../../../Windows/Control/ComboBox.h ../../../Windows/Window.h \ + ../../../Windows/Defs.h ../../../Windows/Control/Window2.h \ + ../../../Windows/Control/Edit.h ../../../Windows/Control/ListView.h \ + ../../../Windows/Control/Static.h ../../../Windows/Control/StatusBar.h \ + AppState.h ViewSettings.h IFolder.h ../../IProgress.h \ + ../../../Common/MyUnknown.h ../../../Common/Types.h ../../IDecl.h \ + ../../IStream.h ProgressDialog2.h ../../../Windows/Thread.h \ + ../../../Windows/Control/Dialog.h ../../../Windows/Control/ProgressBar.h \ + SysIconUtils.h FormatUtils.h +PanelFolderChange.o: PanelFolderChange.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../../Common/StringConvert.h \ + ../../../Common/MyWindows.h ../../../Common/MyString.h \ + ../../../Common/MyVector.h ../../../Common/Defs.h \ + ../../../Common/Wildcard.h ../../../Windows/PropVariant.h \ + ../../../Windows/../Common/MyWindows.h \ + ../../../Windows/../Common/Types.h ../../PropID.h FSDrives.h \ + ../../../Common/MyCom.h ../../../Common/MyString.h IFolder.h \ + ../../IProgress.h ../../../Common/MyUnknown.h ../../../Common/Types.h \ + ../../IDecl.h ../../IStream.h LangUtils.h ../../../Common/Lang.h \ + ../../../Windows/ResourceString.h ListViewDialog.h \ + ../../../Windows/Control/Dialog.h ../../../Windows/Window.h \ + ../../../Windows/Defs.h ../../../Windows/Control/ListView.h \ + ListViewDialogRes.h Panel.h ../../../../C/Alloc.h ../../../Windows/DLL.h \ + ../../../Windows/../Common/MyString.h ../../../Windows/FileFind.h \ + ../../../Windows/FileName.h ../../../Windows/../../C/Types.h \ + ../../../Windows/Defs.h ../../../Windows/FileDir.h \ + ../../../Windows/Synchronization.h ../../../Windows/../../C/Threads.h \ + ../../../Windows/../../C/Types.h ../../../Windows/Synchronization2.h \ + ../../../Windows/Control/ComboBox.h ../../../Windows/Control/Window2.h \ + ../../../Windows/Control/Edit.h ../../../Windows/Control/Static.h \ + ../../../Windows/Control/StatusBar.h AppState.h ViewSettings.h \ + ProgressDialog2.h ../../../Windows/Thread.h \ + ../../../Windows/Control/ProgressBar.h SysIconUtils.h RootFolder.h \ + FSFolder.h TextPairs.h resource.h resourceGui.h +PanelItemOpen.o: PanelItemOpen.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h /usr/include/wx-2.8/wx/wxprec.h \ + /usr/include/wx-2.8/wx/defs.h /usr/include/wx-2.8/wx/platform.h \ + /usr/lib/wx/include/gtk2-unicode-release-2.8/wx/setup.h \ + /usr/include/wx-2.8/wx/chkconf.h /usr/include/wx-2.8/wx/features.h \ + /usr/include/wx-2.8/wx/version.h /usr/include/wx-2.8/wx/cpp.h \ + /usr/include/wx-2.8/wx/dlimpexp.h /usr/include/wx-2.8/wx/debug.h \ + /usr/include/wx-2.8/wx/wxchar.h /usr/include/wx-2.8/wx/wx.h \ + /usr/include/wx-2.8/wx/object.h /usr/include/wx-2.8/wx/memory.h \ + /usr/include/wx-2.8/wx/string.h /usr/include/wx-2.8/wx/buffer.h \ + /usr/include/wx-2.8/wx/strconv.h /usr/include/wx-2.8/wx/fontenc.h \ + /usr/include/wx-2.8/wx/beforestd.h /usr/include/wx-2.8/wx/afterstd.h \ + /usr/include/wx-2.8/wx/iosfwrap.h /usr/include/wx-2.8/wx/msgout.h \ + /usr/include/wx-2.8/wx/dynarray.h /usr/include/wx-2.8/wx/list.h \ + /usr/include/wx-2.8/wx/hash.h /usr/include/wx-2.8/wx/hashmap.h \ + /usr/include/wx-2.8/wx/arrstr.h /usr/include/wx-2.8/wx/intl.h \ + /usr/include/wx-2.8/wx/log.h /usr/include/wx-2.8/wx/generic/logg.h \ + /usr/include/wx-2.8/wx/event.h /usr/include/wx-2.8/wx/clntdata.h \ + /usr/include/wx-2.8/wx/vector.h /usr/include/wx-2.8/wx/gdicmn.h \ + /usr/include/wx-2.8/wx/math.h /usr/include/wx-2.8/wx/cursor.h \ + /usr/include/wx-2.8/wx/gtk/cursor.h /usr/include/wx-2.8/wx/utils.h \ + /usr/include/wx-2.8/wx/filefn.h /usr/include/wx-2.8/wx/longlong.h \ + /usr/include/wx-2.8/wx/platinfo.h /usr/include/wx-2.8/wx/thread.h \ + /usr/include/wx-2.8/wx/app.h /usr/include/wx-2.8/wx/build.h \ + /usr/include/wx-2.8/wx/init.h /usr/include/wx-2.8/wx/gtk/app.h \ + /usr/include/wx-2.8/wx/stream.h /usr/include/wx-2.8/wx/stopwatch.h \ + /usr/include/wx-2.8/wx/module.h /usr/include/wx-2.8/wx/window.h \ + /usr/include/wx-2.8/wx/font.h /usr/include/wx-2.8/wx/gdiobj.h \ + /usr/include/wx-2.8/wx/gtk/font.h /usr/include/wx-2.8/wx/colour.h \ + /usr/include/wx-2.8/wx/variant.h /usr/include/wx-2.8/wx/datetime.h \ + /usr/include/wx-2.8/wx/gtk/colour.h /usr/include/wx-2.8/wx/region.h \ + /usr/include/wx-2.8/wx/gtk/region.h /usr/include/wx-2.8/wx/validate.h \ + /usr/include/wx-2.8/wx/palette.h \ + /usr/include/wx-2.8/wx/generic/paletteg.h /usr/include/wx-2.8/wx/accel.h \ + /usr/include/wx-2.8/wx/gtk/accel.h \ + /usr/include/wx-2.8/wx/generic/accel.h \ + /usr/include/wx-2.8/wx/gtk/window.h /usr/include/wx-2.8/wx/containr.h \ + /usr/include/wx-2.8/wx/panel.h /usr/include/wx-2.8/wx/generic/panelg.h \ + /usr/include/wx-2.8/wx/toplevel.h /usr/include/wx-2.8/wx/iconbndl.h \ + /usr/include/wx-2.8/wx/gtk/toplevel.h /usr/include/wx-2.8/wx/frame.h \ + /usr/include/wx-2.8/wx/gtk/frame.h /usr/include/wx-2.8/wx/bitmap.h \ + /usr/include/wx-2.8/wx/gtk/bitmap.h /usr/include/wx-2.8/wx/image.h \ + /usr/include/wx-2.8/wx/imagbmp.h /usr/include/wx-2.8/wx/imagpng.h \ + /usr/include/wx-2.8/wx/imaggif.h /usr/include/wx-2.8/wx/imagpcx.h \ + /usr/include/wx-2.8/wx/imagjpeg.h /usr/include/wx-2.8/wx/imagtga.h \ + /usr/include/wx-2.8/wx/imagtiff.h /usr/include/wx-2.8/wx/imagpnm.h \ + /usr/include/wx-2.8/wx/imagxpm.h /usr/include/wx-2.8/wx/imagiff.h \ + /usr/include/wx-2.8/wx/dc.h /usr/include/wx-2.8/wx/brush.h \ + /usr/include/wx-2.8/wx/gtk/brush.h /usr/include/wx-2.8/wx/pen.h \ + /usr/include/wx-2.8/wx/gtk/pen.h /usr/include/wx-2.8/wx/gtk/dc.h \ + /usr/include/wx-2.8/wx/dcgraph.h /usr/include/wx-2.8/wx/geometry.h \ + /usr/include/wx-2.8/wx/graphics.h /usr/include/wx-2.8/wx/dcclient.h \ + /usr/include/wx-2.8/wx/gtk/dcclient.h /usr/include/wx-2.8/wx/dcmemory.h \ + /usr/include/wx-2.8/wx/gtk/dcmemory.h /usr/include/wx-2.8/wx/dcprint.h \ + /usr/include/wx-2.8/wx/dcscreen.h /usr/include/wx-2.8/wx/gtk/dcscreen.h \ + /usr/include/wx-2.8/wx/button.h /usr/include/wx-2.8/wx/control.h \ + /usr/include/wx-2.8/wx/gtk/control.h /usr/include/wx-2.8/wx/gtk/button.h \ + /usr/include/wx-2.8/wx/menuitem.h /usr/include/wx-2.8/wx/gtk/menuitem.h \ + /usr/include/wx-2.8/wx/menu.h /usr/include/wx-2.8/wx/gtk/menu.h \ + /usr/include/wx-2.8/wx/icon.h /usr/include/wx-2.8/wx/iconloc.h \ + /usr/include/wx-2.8/wx/generic/icon.h /usr/include/wx-2.8/wx/dialog.h \ + /usr/include/wx-2.8/wx/gtk/dialog.h /usr/include/wx-2.8/wx/timer.h \ + /usr/include/wx-2.8/wx/gtk/timer.h /usr/include/wx-2.8/wx/settings.h \ + /usr/include/wx-2.8/wx/msgdlg.h /usr/include/wx-2.8/wx/gtk/msgdlg.h \ + /usr/include/wx-2.8/wx/cmndata.h /usr/include/wx-2.8/wx/encinfo.h \ + /usr/include/wx-2.8/wx/dataobj.h /usr/include/wx-2.8/wx/gtk/dataform.h \ + /usr/include/wx-2.8/wx/gtk/dataobj.h \ + /usr/include/wx-2.8/wx/gtk/dataobj2.h /usr/include/wx-2.8/wx/ctrlsub.h \ + /usr/include/wx-2.8/wx/bmpbuttn.h /usr/include/wx-2.8/wx/gtk/bmpbuttn.h \ + /usr/include/wx-2.8/wx/checkbox.h /usr/include/wx-2.8/wx/gtk/checkbox.h \ + /usr/include/wx-2.8/wx/checklst.h /usr/include/wx-2.8/wx/listbox.h \ + /usr/include/wx-2.8/wx/gtk/listbox.h \ + /usr/include/wx-2.8/wx/gtk/checklst.h /usr/include/wx-2.8/wx/choice.h \ + /usr/include/wx-2.8/wx/gtk/choice.h /usr/include/wx-2.8/wx/scrolbar.h \ + /usr/include/wx-2.8/wx/gtk/scrolbar.h /usr/include/wx-2.8/wx/stattext.h \ + /usr/include/wx-2.8/wx/gtk/stattext.h /usr/include/wx-2.8/wx/statbmp.h \ + /usr/include/wx-2.8/wx/gtk/statbmp.h /usr/include/wx-2.8/wx/statbox.h \ + /usr/include/wx-2.8/wx/gtk/statbox.h /usr/include/wx-2.8/wx/radiobox.h \ + /usr/include/wx-2.8/wx/gtk/radiobox.h /usr/include/wx-2.8/wx/radiobut.h \ + /usr/include/wx-2.8/wx/gtk/radiobut.h /usr/include/wx-2.8/wx/textctrl.h \ + /usr/include/wx-2.8/wx/ioswrap.h /usr/include/wx-2.8/wx/gtk/textctrl.h \ + /usr/include/wx-2.8/wx/slider.h /usr/include/wx-2.8/wx/gtk/slider.h \ + /usr/include/wx-2.8/wx/gauge.h /usr/include/wx-2.8/wx/gtk/gauge.h \ + /usr/include/wx-2.8/wx/scrolwin.h /usr/include/wx-2.8/wx/gtk/scrolwin.h \ + /usr/include/wx-2.8/wx/dirdlg.h /usr/include/wx-2.8/wx/gtk/dirdlg.h \ + /usr/include/wx-2.8/wx/generic/dirdlgg.h \ + /usr/include/wx-2.8/wx/toolbar.h /usr/include/wx-2.8/wx/tbarbase.h \ + /usr/include/wx-2.8/wx/gtk/tbargtk.h /usr/include/wx-2.8/wx/combobox.h \ + /usr/include/wx-2.8/wx/gtk/combobox.h /usr/include/wx-2.8/wx/layout.h \ + /usr/include/wx-2.8/wx/sizer.h /usr/include/wx-2.8/wx/mdi.h \ + /usr/include/wx-2.8/wx/gtk/mdi.h /usr/include/wx-2.8/wx/statusbr.h \ + /usr/include/wx-2.8/wx/generic/statusbr.h \ + /usr/include/wx-2.8/wx/choicdlg.h \ + /usr/include/wx-2.8/wx/generic/choicdgg.h \ + /usr/include/wx-2.8/wx/textdlg.h \ + /usr/include/wx-2.8/wx/generic/textdlgg.h \ + /usr/include/wx-2.8/wx/valtext.h /usr/include/wx-2.8/wx/filedlg.h \ + /usr/include/wx-2.8/wx/gtk/filedlg.h \ + /usr/include/wx-2.8/wx/generic/filedlgg.h \ + /usr/include/wx-2.8/wx/listctrl.h /usr/include/wx-2.8/wx/listbase.h \ + /usr/include/wx-2.8/wx/generic/listctrl.h \ + /usr/include/wx-2.8/wx/mimetype.h resource.h resourceGui.h \ + ../../../Common/StringConvert.h ../../../Common/MyWindows.h \ + ../../../Common/MyString.h ../../../Common/MyVector.h \ + ../../../Common/Defs.h ../../../Common/AutoPtr.h \ + ../../../Windows/FileDir.h ../../../Windows/../Common/MyString.h \ + ../../../Windows/Defs.h ../../../Windows/../Common/MyWindows.h \ + ../../../Windows/FileFind.h ../../../Windows/FileName.h \ + ../../../Windows/../../C/Types.h ../../../Windows/Thread.h \ + ../../../Windows/../../C/Threads.h ../../../Windows/../../C/Types.h \ + ../../../Windows/Synchronization.h ../../../Windows/Synchronization2.h \ + ../../../Windows/Error.h ../../../Common/MyString.h \ + ../../../Windows/PropVariant.h ../../../Windows/../Common/Types.h App.h \ + AppState.h ViewSettings.h Panel.h ../../../../C/Alloc.h \ + ../../../Common/MyCom.h ../../../Windows/DLL.h \ + ../../../Windows/Control/ComboBox.h ../../../Windows/Window.h \ + ../../../Windows/Defs.h ../../../Windows/Control/Window2.h \ + ../../../Windows/Control/Edit.h ../../../Windows/Control/ListView.h \ + ../../../Windows/Control/Static.h ../../../Windows/Control/StatusBar.h \ + IFolder.h ../../IProgress.h ../../../Common/MyUnknown.h \ + ../../../Common/Types.h ../../IDecl.h ../../IStream.h ProgressDialog2.h \ + ../../../Windows/Control/Dialog.h ../../../Windows/Control/ProgressBar.h \ + SysIconUtils.h ExtractCallback.h ../../../Windows/ResourceString.h \ + ../Agent/IFolderArchive.h ../Agent/../../IDecl.h \ + ../Agent/../../Archive/IArchive.h ../Agent/../../Archive/../IProgress.h \ + ../Agent/../../Archive/../IStream.h ../Agent/../../Archive/../PropID.h \ + ../Agent/../../UI/Common/LoadCodecs.h \ + ../Agent/../../UI/Common/../../../Common/Types.h \ + ../Agent/../../UI/Common/../../../Common/MyCom.h \ + ../Agent/../../UI/Common/../../../Common/MyString.h \ + ../Agent/../../UI/Common/../../../Common/Buffer.h \ + ../Agent/../../UI/Common/../../../Common/Defs.h \ + ../Agent/../../UI/Common/../../ICoder.h \ + ../Agent/../../UI/Common/../../IStream.h \ + ../Agent/../../UI/Common/../../../Windows/DLL.h \ + ../Agent/../../UI/Common/../../Archive/IArchive.h \ + ../Agent/../../UI/FileManager/IFolder.h ../Agent/../Common/ExtractMode.h \ + ../Agent/../Common/IFileExtractCallback.h \ + ../Agent/../Common/../../IDecl.h ../Common/ArchiveOpenCallback.h \ + ../Common/../../IPassword.h ../Common/../../../Common/MyUnknown.h \ + ../Common/../../../Common/Types.h ../Common/../../IDecl.h \ + ../Common/../../Archive/IArchive.h ../../IPassword.h LangUtils.h \ + ../../../Common/Lang.h UpdateCallback100.h FileFolderPluginOpen.h \ + FormatUtils.h RegistryUtils.h +PanelMenu.o: PanelMenu.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../../Common/StringConvert.h \ + ../../../Common/MyWindows.h ../../../Common/MyString.h \ + ../../../Common/MyVector.h ../../../Common/Defs.h ../../../Windows/COM.h \ + ../../../Common/MyString.h ../../../Windows/Clipboard.h \ + ../../../Windows/Menu.h ../../../Windows/PropVariant.h \ + ../../../Windows/../Common/MyWindows.h \ + ../../../Windows/../Common/Types.h \ + ../../../Windows/PropVariantConversions.h ../../PropID.h \ + ../Common/PropIDUtils.h ../Explorer/ContextMenu.h App.h AppState.h \ + ../../../Windows/Synchronization.h ../../../Windows/Defs.h \ + ../../../Windows/../../C/Threads.h ../../../Windows/../../C/Types.h \ + ../../../Windows/Synchronization2.h ViewSettings.h Panel.h \ + ../../../../C/Alloc.h ../../../Common/MyCom.h ../../../Windows/DLL.h \ + ../../../Windows/../Common/MyString.h ../../../Windows/FileFind.h \ + ../../../Windows/FileName.h ../../../Windows/../../C/Types.h \ + ../../../Windows/FileDir.h ../../../Windows/Control/ComboBox.h \ + ../../../Windows/Window.h ../../../Windows/Defs.h \ + ../../../Windows/Control/Window2.h ../../../Windows/Control/Edit.h \ + ../../../Windows/Control/ListView.h ../../../Windows/Control/Static.h \ + ../../../Windows/Control/StatusBar.h IFolder.h ../../IProgress.h \ + ../../../Common/MyUnknown.h ../../../Common/Types.h ../../IDecl.h \ + ../../IStream.h ProgressDialog2.h ../../../Windows/Thread.h \ + ../../../Windows/Control/Dialog.h ../../../Windows/Control/ProgressBar.h \ + SysIconUtils.h LangUtils.h ../../../Common/Lang.h \ + ../../../Windows/ResourceString.h MyLoadMenu.h PropertyName.h resource.h \ + resourceGui.h PropertyNameRes.h +PanelOperations.o: PanelOperations.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../../Common/DynamicBuffer.h \ + ../../../Common/Buffer.h ../../../Common/Defs.h \ + ../../../Common/StringConvert.h ../../../Common/MyWindows.h \ + ../../../Common/MyString.h ../../../Common/MyVector.h \ + ../../../Windows/COM.h ../../../Common/MyString.h \ + ../../../Windows/FileDir.h ../../../Windows/../Common/MyString.h \ + ../../../Windows/Defs.h ../../../Windows/../Common/MyWindows.h \ + ../../../Windows/PropVariant.h ../../../Windows/../Common/Types.h \ + ../../../Windows/ResourceString.h ../../../Windows/Thread.h \ + ../../../Windows/../../C/Threads.h ../../../Windows/../../C/Types.h \ + ComboDialog.h ../../../Windows/Control/ComboBox.h \ + ../../../Windows/Window.h ../../../Windows/Defs.h \ + ../../../Windows/Control/Window2.h ../../../Windows/Control/Dialog.h \ + ComboDialogRes.h FSFolder.h ../../../Common/MyCom.h \ + ../../../Windows/FileFind.h ../../../Windows/FileName.h \ + ../../../Windows/../../C/Types.h IFolder.h ../../IProgress.h \ + ../../../Common/MyUnknown.h ../../../Common/Types.h ../../IDecl.h \ + ../../IStream.h TextPairs.h FormatUtils.h LangUtils.h \ + ../../../Common/Lang.h Panel.h ../../../../C/Alloc.h \ + ../../../Windows/DLL.h ../../../Windows/Synchronization.h \ + ../../../Windows/Synchronization2.h ../../../Windows/Control/Edit.h \ + ../../../Windows/Control/ListView.h ../../../Windows/Control/Static.h \ + ../../../Windows/Control/StatusBar.h AppState.h ViewSettings.h \ + ProgressDialog2.h ../../../Windows/Control/ProgressBar.h SysIconUtils.h \ + UpdateCallback100.h ../../IPassword.h ../Agent/IFolderArchive.h \ + ../Agent/../../IDecl.h ../Agent/../../Archive/IArchive.h \ + ../Agent/../../Archive/../IProgress.h \ + ../Agent/../../Archive/../IStream.h ../Agent/../../Archive/../PropID.h \ + ../Agent/../../UI/Common/LoadCodecs.h \ + ../Agent/../../UI/Common/../../../Common/Types.h \ + ../Agent/../../UI/Common/../../../Common/MyCom.h \ + ../Agent/../../UI/Common/../../../Common/MyString.h \ + ../Agent/../../UI/Common/../../../Common/Buffer.h \ + ../Agent/../../UI/Common/../../ICoder.h \ + ../Agent/../../UI/Common/../../IStream.h \ + ../Agent/../../UI/Common/../../../Windows/DLL.h \ + ../Agent/../../UI/Common/../../Archive/IArchive.h \ + ../Agent/../../UI/FileManager/IFolder.h ../Agent/../Common/ExtractMode.h \ + ../Agent/../Common/IFileExtractCallback.h \ + ../Agent/../Common/../../IDecl.h resource.h resourceGui.h +PanelSelect.o: PanelSelect.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h resource.h resourceGui.h \ + ../../../Common/StringConvert.h ../../../Common/MyWindows.h \ + ../../../Common/MyString.h ../../../Common/MyVector.h \ + ../../../Common/Defs.h ../../../Common/Wildcard.h Panel.h \ + ../../../../C/Alloc.h ../../../Common/MyCom.h ../../../Windows/DLL.h \ + ../../../Windows/../Common/MyString.h ../../../Windows/FileFind.h \ + ../../../Windows/FileName.h ../../../Windows/../../C/Types.h \ + ../../../Windows/Defs.h ../../../Windows/../Common/MyWindows.h \ + ../../../Windows/FileDir.h ../../../Windows/Synchronization.h \ + ../../../Windows/../../C/Threads.h ../../../Windows/../../C/Types.h \ + ../../../Windows/Synchronization2.h ../../../Windows/Control/ComboBox.h \ + ../../../Windows/Window.h ../../../Windows/Defs.h \ + ../../../Common/MyString.h ../../../Windows/Control/Window2.h \ + ../../../Windows/Control/Edit.h ../../../Windows/Control/ListView.h \ + ../../../Windows/Control/Static.h ../../../Windows/Control/StatusBar.h \ + AppState.h ViewSettings.h IFolder.h ../../IProgress.h \ + ../../../Common/MyUnknown.h ../../../Common/Types.h ../../IDecl.h \ + ../../IStream.h ProgressDialog2.h ../../../Windows/Thread.h \ + ../../../Windows/Control/Dialog.h ../../../Windows/Control/ProgressBar.h \ + SysIconUtils.h ComboDialog.h ComboDialogRes.h LangUtils.h \ + ../../../Common/Lang.h ../../../Windows/ResourceString.h +PanelSort.o: PanelSort.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../../Windows/PropVariant.h \ + ../../../Windows/../Common/MyWindows.h \ + ../../../Windows/../Common/Types.h ../../PropID.h Panel.h \ + ../../../../C/Alloc.h ../../../Common/MyCom.h \ + ../../../Common/MyWindows.h ../../../Windows/DLL.h \ + ../../../Windows/../Common/MyString.h \ + ../../../Windows/../Common/MyVector.h ../../../Windows/../Common/Defs.h \ + ../../../Windows/FileFind.h ../../../Windows/FileName.h \ + ../../../Windows/../../C/Types.h ../../../Windows/Defs.h \ + ../../../Windows/FileDir.h ../../../Windows/Synchronization.h \ + ../../../Windows/../../C/Threads.h ../../../Windows/../../C/Types.h \ + ../../../Windows/Synchronization2.h ../../../Windows/Control/ComboBox.h \ + ../../../Windows/Window.h ../../../Windows/Defs.h \ + ../../../Common/MyString.h ../../../Windows/Control/Window2.h \ + ../../../Windows/Control/Edit.h ../../../Windows/Control/ListView.h \ + ../../../Windows/Control/Static.h ../../../Windows/Control/StatusBar.h \ + AppState.h ViewSettings.h IFolder.h ../../IProgress.h \ + ../../../Common/MyUnknown.h ../../../Common/Types.h ../../IDecl.h \ + ../../IStream.h ProgressDialog2.h ../../../Windows/Thread.h \ + ../../../Windows/Control/Dialog.h ../../../Windows/Control/ProgressBar.h \ + SysIconUtils.h +PanelSplitFile.o: PanelSplitFile.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../../Common/IntToString.h \ + ../../../Windows/Error.h ../../../Common/MyString.h \ + ../../../Common/MyVector.h ../../../Common/Defs.h \ + ../../../Windows/FileIO.h ../../../Windows/FileFind.h \ + ../../../Windows/../Common/MyString.h ../../../Windows/FileName.h \ + ../../../Windows/../../C/Types.h ../../../Windows/Defs.h \ + ../../../Windows/../Common/MyWindows.h ../GUI/ExtractRes.h resource.h \ + resourceGui.h App.h AppState.h ../../../Windows/Synchronization.h \ + ../../../Windows/../../C/Threads.h ../../../Windows/../../C/Types.h \ + ../../../Windows/Synchronization2.h ViewSettings.h Panel.h \ + ../../../../C/Alloc.h ../../../Common/MyCom.h \ + ../../../Common/MyWindows.h ../../../Windows/DLL.h \ + ../../../Windows/FileDir.h ../../../Windows/Control/ComboBox.h \ + ../../../Windows/Window.h ../../../Windows/Defs.h \ + ../../../Windows/Control/Window2.h ../../../Windows/Control/Edit.h \ + ../../../Windows/Control/ListView.h ../../../Windows/Control/Static.h \ + ../../../Windows/Control/StatusBar.h IFolder.h ../../IProgress.h \ + ../../../Common/MyUnknown.h ../../../Common/Types.h ../../IDecl.h \ + ../../IStream.h ProgressDialog2.h ../../../Windows/Thread.h \ + ../../../Windows/Control/Dialog.h ../../../Windows/Control/ProgressBar.h \ + SysIconUtils.h CopyDialog.h CopyDialogRes.h FormatUtils.h LangUtils.h \ + ../../../Common/Lang.h ../../../Common/MyString.h \ + ../../../Windows/ResourceString.h SplitDialog.h SplitDialogRes.h \ + SplitUtils.h +PropertyName.o: PropertyName.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../../Common/IntToString.h \ + ../../../Windows/ResourceString.h ../../../Common/MyString.h \ + ../../../Common/MyVector.h ../../../Common/Defs.h ../../PropID.h \ + LangUtils.h ../../../Common/Lang.h ../../../Common/MyString.h \ + PropertyName.h resource.h resourceGui.h PropertyNameRes.h +RegistryUtils.o: RegistryUtils.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../../Common/IntToString.h \ + ../../../Windows/Registry.h ../../../Common/Buffer.h \ + ../../../Common/Defs.h ../../../Common/MyString.h \ + ../../../Common/MyVector.h RegistryUtils.h +ViewSettings.o: ViewSettings.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../../Common/IntToString.h \ + ../../../Common/StringConvert.h ../../../Common/MyWindows.h \ + ../../../Common/MyString.h ../../../Common/MyVector.h \ + ../../../Common/Defs.h ViewSettings.h ../../../Common/MyString.h \ + ../../../Windows/Registry.h ../../../Common/Buffer.h \ + ../../../Windows/Synchronization.h ../../../Windows/Defs.h \ + ../../../Windows/../Common/MyWindows.h \ + ../../../Windows/../../C/Threads.h ../../../Windows/../../C/Types.h \ + ../../../Windows/Synchronization2.h +UpdateCallback100.o: UpdateCallback100.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h PasswordDialog.h \ + ../../../Windows/Control/Dialog.h ../../../Windows/Window.h \ + ../../../Windows/Defs.h ../../../Windows/../Common/MyWindows.h \ + ../../../Common/MyString.h ../../../Common/MyVector.h \ + ../../../Common/Defs.h ../../../Windows/Control/Edit.h \ + PasswordDialogRes.h UpdateCallback100.h ../../../Common/MyCom.h \ + ../../../Common/MyWindows.h ../../IPassword.h \ + ../../../Common/MyUnknown.h ../../../Common/Types.h ../../IDecl.h \ + ../Agent/IFolderArchive.h ../Agent/../../IDecl.h \ + ../Agent/../../Archive/IArchive.h ../Agent/../../Archive/../IProgress.h \ + ../Agent/../../Archive/../../Common/MyUnknown.h \ + ../Agent/../../Archive/../../Common/Types.h \ + ../Agent/../../Archive/../IDecl.h ../Agent/../../Archive/../IStream.h \ + ../Agent/../../Archive/../PropID.h ../Agent/../../UI/Common/LoadCodecs.h \ + ../Agent/../../UI/Common/../../../Common/Types.h \ + ../Agent/../../UI/Common/../../../Common/MyCom.h \ + ../Agent/../../UI/Common/../../../Common/MyString.h \ + ../Agent/../../UI/Common/../../../Common/Buffer.h \ + ../Agent/../../UI/Common/../../../Common/Defs.h \ + ../Agent/../../UI/Common/../../ICoder.h \ + ../Agent/../../UI/Common/../../IStream.h \ + ../Agent/../../UI/Common/../../../Windows/DLL.h \ + ../Agent/../../UI/Common/../../../Windows/../Common/MyString.h \ + ../Agent/../../UI/Common/../../Archive/IArchive.h \ + ../Agent/../../UI/FileManager/IFolder.h \ + ../Agent/../../UI/FileManager/../../IProgress.h \ + ../Agent/../../UI/FileManager/../../IStream.h \ + ../Agent/../Common/ExtractMode.h \ + ../Agent/../Common/IFileExtractCallback.h \ + ../Agent/../Common/../../IDecl.h ProgressDialog2.h \ + ../../../Windows/Synchronization.h ../../../Windows/Defs.h \ + ../../../Windows/../../C/Threads.h ../../../Windows/../../C/Types.h \ + ../../../Windows/Synchronization2.h ../../../Windows/Thread.h \ + ../../../Windows/Control/ListView.h \ + ../../../Windows/Control/ProgressBar.h +RegistryAssociations.o: RegistryAssociations.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + RegistryAssociations.h ../../../Common/MyString.h \ + ../../../Common/MyVector.h ../../../Common/Defs.h \ + ../../../Common/IntToString.h ../../../Common/StringConvert.h \ + ../../../Common/MyWindows.h ../../../Common/MyString.h \ + ../../../Common/StringToInt.h ../../../Windows/Registry.h \ + ../../../Common/Buffer.h ../../../Windows/Synchronization.h \ + ../../../Windows/Defs.h ../../../Windows/../Common/MyWindows.h \ + ../../../Windows/../../C/Threads.h ../../../Windows/../../C/Types.h \ + ../../../Windows/Synchronization2.h StringUtils.h +FileFolderPluginOpen.o: FileFolderPluginOpen.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + resource.h resourceGui.h ../../../Windows/Thread.h \ + ../../../Windows/Defs.h ../../../Windows/../Common/MyWindows.h \ + ../../../Windows/../../C/Threads.h ../../../Windows/../../C/Types.h \ + ../Agent/Agent.h ../../../Common/MyCom.h ../../../Common/MyWindows.h \ + ../../../Windows/PropVariant.h ../../../Windows/../Common/Types.h \ + ../Agent/../Common/OpenArchive.h ../../../Common/MyString.h \ + ../../../Common/MyVector.h ../../../Common/Defs.h \ + ../../../Windows/FileFind.h ../../../Windows/../Common/MyString.h \ + ../../../Windows/FileName.h ../../../Windows/../../C/Types.h \ + ../Agent/../Common/../../Archive/IArchive.h \ + ../Agent/../Common/../../Archive/../IProgress.h \ + ../Agent/../Common/../../Archive/../../Common/MyUnknown.h \ + ../Agent/../Common/../../Archive/../../Common/MyWindows.h \ + ../Agent/../Common/../../Archive/../../Common/Types.h \ + ../Agent/../Common/../../Archive/../IDecl.h \ + ../Agent/../Common/../../Archive/../IStream.h \ + ../Agent/../Common/../../Archive/../PropID.h \ + ../Agent/../Common/ArchiveOpenCallback.h \ + ../Agent/../Common/../../IPassword.h \ + ../Agent/../Common/../../../Common/MyUnknown.h \ + ../Agent/../Common/../../../Common/Types.h \ + ../Agent/../Common/../../IDecl.h ../Agent/../Common/LoadCodecs.h \ + ../Agent/../Common/../../../Common/Types.h \ + ../Agent/../Common/../../../Common/MyCom.h \ + ../Agent/../Common/../../../Common/MyString.h \ + ../Agent/../Common/../../../Common/Buffer.h \ + ../Agent/../Common/../../../Common/Defs.h \ + ../Agent/../Common/../../ICoder.h ../Agent/../Common/../../IStream.h \ + ../Agent/../Common/../../../Windows/DLL.h \ + ../Agent/../Common/../../../Windows/../Common/MyString.h \ + ../Agent/../Common/UpdateAction.h ../Agent/../FileManager/IFolder.h \ + ../Agent/../FileManager/../../IProgress.h \ + ../Agent/../FileManager/../../IStream.h ../Agent/../Common/LoadCodecs.h \ + ../Agent/AgentProxy.h ../Agent/IFolderArchive.h ../Agent/../../IDecl.h \ + ../Agent/../../Archive/IArchive.h ../Agent/../../UI/Common/LoadCodecs.h \ + ../Agent/../../UI/FileManager/IFolder.h ../Agent/../Common/ExtractMode.h \ + ../Agent/../Common/IFileExtractCallback.h \ + ../Agent/../Common/../../IDecl.h LangUtils.h ../../../Common/Lang.h \ + ../../../Common/MyString.h ../../../Windows/ResourceString.h \ + OpenCallback.h ../../IPassword.h ../../Archive/IArchive.h \ + ProgressDialog2.h ../../../Windows/Synchronization.h \ + ../../../Windows/Synchronization2.h ../../../Windows/Control/Dialog.h \ + ../../../Windows/Window.h ../../../Windows/Defs.h \ + ../../../Windows/Control/ListView.h \ + ../../../Windows/Control/ProgressBar.h PluginLoader.h \ + ../../../Windows/DLL.h RegistryAssociations.h RegistryPlugins.h +RootFolder.o: RootFolder.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h resource.h resourceGui.h RootFolder.h \ + ../../../Common/MyString.h ../../../Common/MyVector.h \ + ../../../Common/Defs.h ../../../Windows/PropVariant.h \ + ../../../Windows/../Common/MyWindows.h \ + ../../../Windows/../Common/Types.h FSFolder.h ../../../Common/MyCom.h \ + ../../../Common/MyWindows.h ../../../Windows/FileFind.h \ + ../../../Windows/../Common/MyString.h ../../../Windows/FileName.h \ + ../../../Windows/../../C/Types.h ../../../Windows/Defs.h IFolder.h \ + ../../IProgress.h ../../../Common/MyUnknown.h ../../../Common/Types.h \ + ../../IDecl.h ../../IStream.h TextPairs.h \ + ../../../Common/StringConvert.h ../../../Common/MyString.h \ + ../../PropID.h ../../../Windows/Defs.h SysIconUtils.h LangUtils.h \ + ../../../Common/Lang.h ../../../Windows/ResourceString.h +FSDrives.o: FSDrives.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../../../C/Alloc.h \ + ../../../Common/ComTry.h ../../../Common/MyWindows.h \ + ../../../Common/StringConvert.h ../../../Common/MyString.h \ + ../../../Common/MyVector.h ../../../Common/Defs.h \ + ../../../Windows/Defs.h ../../../Windows/../Common/MyWindows.h \ + ../../../Windows/FileDir.h ../../../Windows/../Common/MyString.h \ + ../../../Windows/Defs.h ../../../Windows/FileIO.h \ + ../../../Common/MyString.h ../../../Windows/PropVariant.h \ + ../../../Windows/../Common/Types.h ../../PropID.h FSDrives.h \ + ../../../Common/MyCom.h IFolder.h ../../IProgress.h \ + ../../../Common/MyUnknown.h ../../../Common/Types.h ../../IDecl.h \ + ../../IStream.h FSFolder.h ../../../Windows/FileFind.h \ + ../../../Windows/FileName.h ../../../Windows/../../C/Types.h TextPairs.h \ + LangUtils.h ../../../Common/Lang.h ../../../Windows/ResourceString.h \ + SysIconUtils.h resource.h resourceGui.h +FSFolder.o: FSFolder.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../../Common/ComTry.h \ + ../../../Common/MyWindows.h ../../../Common/StringConvert.h \ + ../../../Common/MyString.h ../../../Common/MyVector.h \ + ../../../Common/Defs.h ../../../Common/UTFConvert.h \ + ../../../Windows/FileDir.h ../../../Windows/../Common/MyString.h \ + ../../../Windows/Defs.h ../../../Windows/../Common/MyWindows.h \ + ../../../Windows/FileIO.h ../../../Common/MyString.h \ + ../../../Windows/PropVariant.h ../../../Windows/../Common/Types.h \ + ../../PropID.h FSDrives.h ../../../Common/MyCom.h IFolder.h \ + ../../IProgress.h ../../../Common/MyUnknown.h ../../../Common/Types.h \ + ../../IDecl.h ../../IStream.h FSFolder.h ../../../Windows/FileFind.h \ + ../../../Windows/FileName.h ../../../Windows/../../C/Types.h TextPairs.h \ + SysIconUtils.h +FSFolderCopy.o: FSFolderCopy.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h FSFolder.h ../../../Common/MyCom.h \ + ../../../Common/MyWindows.h ../../../Windows/FileFind.h \ + ../../../Windows/../Common/MyString.h \ + ../../../Windows/../Common/MyVector.h ../../../Windows/../Common/Defs.h \ + ../../../Windows/FileName.h ../../../Windows/../../C/Types.h \ + ../../../Windows/Defs.h ../../../Windows/../Common/MyWindows.h IFolder.h \ + ../../IProgress.h ../../../Common/MyUnknown.h ../../../Common/Types.h \ + ../../IDecl.h ../../IStream.h TextPairs.h ../../../Common/MyString.h \ + ../../../Windows/FileDir.h ../../../Windows/Error.h \ + ../../../Common/StringConvert.h ../../../Common/MyString.h \ + ../../Common/FilePathAutoRename.h +FormatUtils.o: FormatUtils.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h FormatUtils.h \ + ../../../Common/MyString.h ../../../Common/MyVector.h \ + ../../../Common/Defs.h ../../../Common/IntToString.h \ + ../../../Windows/ResourceString.h LangUtils.h ../../../Common/Lang.h \ + ../../../Common/MyString.h +SysIconUtils.o: SysIconUtils.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h SysIconUtils.h \ + ../../../Common/MyString.h ../../../Common/MyVector.h \ + ../../../Common/Defs.h +TextPairs.o: TextPairs.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h TextPairs.h ../../../Common/MyString.h \ + ../../../Common/MyVector.h ../../../Common/Defs.h +ArchiveName.o: ../Common/ArchiveName.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../../Windows/FileDir.h \ + ../../../Windows/../Common/MyString.h \ + ../../../Windows/../Common/MyVector.h ../../../Windows/../Common/Defs.h \ + ../../../Windows/Defs.h ../../../Windows/../Common/MyWindows.h \ + ../../../Windows/FileFind.h ../../../Windows/FileName.h \ + ../../../Windows/../../C/Types.h ../Common/ExtractingFilePath.h \ + ../../../Common/MyString.h +CompressCall.o: ../Common/CompressCall.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h /usr/include/wx-2.8/wx/wxprec.h \ + /usr/include/wx-2.8/wx/defs.h /usr/include/wx-2.8/wx/platform.h \ + /usr/lib/wx/include/gtk2-unicode-release-2.8/wx/setup.h \ + /usr/include/wx-2.8/wx/chkconf.h /usr/include/wx-2.8/wx/features.h \ + /usr/include/wx-2.8/wx/version.h /usr/include/wx-2.8/wx/cpp.h \ + /usr/include/wx-2.8/wx/dlimpexp.h /usr/include/wx-2.8/wx/debug.h \ + /usr/include/wx-2.8/wx/wxchar.h /usr/include/wx-2.8/wx/wx.h \ + /usr/include/wx-2.8/wx/object.h /usr/include/wx-2.8/wx/memory.h \ + /usr/include/wx-2.8/wx/string.h /usr/include/wx-2.8/wx/buffer.h \ + /usr/include/wx-2.8/wx/strconv.h /usr/include/wx-2.8/wx/fontenc.h \ + /usr/include/wx-2.8/wx/beforestd.h /usr/include/wx-2.8/wx/afterstd.h \ + /usr/include/wx-2.8/wx/iosfwrap.h /usr/include/wx-2.8/wx/msgout.h \ + /usr/include/wx-2.8/wx/dynarray.h /usr/include/wx-2.8/wx/list.h \ + /usr/include/wx-2.8/wx/hash.h /usr/include/wx-2.8/wx/hashmap.h \ + /usr/include/wx-2.8/wx/arrstr.h /usr/include/wx-2.8/wx/intl.h \ + /usr/include/wx-2.8/wx/log.h /usr/include/wx-2.8/wx/generic/logg.h \ + /usr/include/wx-2.8/wx/event.h /usr/include/wx-2.8/wx/clntdata.h \ + /usr/include/wx-2.8/wx/vector.h /usr/include/wx-2.8/wx/gdicmn.h \ + /usr/include/wx-2.8/wx/math.h /usr/include/wx-2.8/wx/cursor.h \ + /usr/include/wx-2.8/wx/gtk/cursor.h /usr/include/wx-2.8/wx/utils.h \ + /usr/include/wx-2.8/wx/filefn.h /usr/include/wx-2.8/wx/longlong.h \ + /usr/include/wx-2.8/wx/platinfo.h /usr/include/wx-2.8/wx/thread.h \ + /usr/include/wx-2.8/wx/app.h /usr/include/wx-2.8/wx/build.h \ + /usr/include/wx-2.8/wx/init.h /usr/include/wx-2.8/wx/gtk/app.h \ + /usr/include/wx-2.8/wx/stream.h /usr/include/wx-2.8/wx/stopwatch.h \ + /usr/include/wx-2.8/wx/module.h /usr/include/wx-2.8/wx/window.h \ + /usr/include/wx-2.8/wx/font.h /usr/include/wx-2.8/wx/gdiobj.h \ + /usr/include/wx-2.8/wx/gtk/font.h /usr/include/wx-2.8/wx/colour.h \ + /usr/include/wx-2.8/wx/variant.h /usr/include/wx-2.8/wx/datetime.h \ + /usr/include/wx-2.8/wx/gtk/colour.h /usr/include/wx-2.8/wx/region.h \ + /usr/include/wx-2.8/wx/gtk/region.h /usr/include/wx-2.8/wx/validate.h \ + /usr/include/wx-2.8/wx/palette.h \ + /usr/include/wx-2.8/wx/generic/paletteg.h /usr/include/wx-2.8/wx/accel.h \ + /usr/include/wx-2.8/wx/gtk/accel.h \ + /usr/include/wx-2.8/wx/generic/accel.h \ + /usr/include/wx-2.8/wx/gtk/window.h /usr/include/wx-2.8/wx/containr.h \ + /usr/include/wx-2.8/wx/panel.h /usr/include/wx-2.8/wx/generic/panelg.h \ + /usr/include/wx-2.8/wx/toplevel.h /usr/include/wx-2.8/wx/iconbndl.h \ + /usr/include/wx-2.8/wx/gtk/toplevel.h /usr/include/wx-2.8/wx/frame.h \ + /usr/include/wx-2.8/wx/gtk/frame.h /usr/include/wx-2.8/wx/bitmap.h \ + /usr/include/wx-2.8/wx/gtk/bitmap.h /usr/include/wx-2.8/wx/image.h \ + /usr/include/wx-2.8/wx/imagbmp.h /usr/include/wx-2.8/wx/imagpng.h \ + /usr/include/wx-2.8/wx/imaggif.h /usr/include/wx-2.8/wx/imagpcx.h \ + /usr/include/wx-2.8/wx/imagjpeg.h /usr/include/wx-2.8/wx/imagtga.h \ + /usr/include/wx-2.8/wx/imagtiff.h /usr/include/wx-2.8/wx/imagpnm.h \ + /usr/include/wx-2.8/wx/imagxpm.h /usr/include/wx-2.8/wx/imagiff.h \ + /usr/include/wx-2.8/wx/dc.h /usr/include/wx-2.8/wx/brush.h \ + /usr/include/wx-2.8/wx/gtk/brush.h /usr/include/wx-2.8/wx/pen.h \ + /usr/include/wx-2.8/wx/gtk/pen.h /usr/include/wx-2.8/wx/gtk/dc.h \ + /usr/include/wx-2.8/wx/dcgraph.h /usr/include/wx-2.8/wx/geometry.h \ + /usr/include/wx-2.8/wx/graphics.h /usr/include/wx-2.8/wx/dcclient.h \ + /usr/include/wx-2.8/wx/gtk/dcclient.h /usr/include/wx-2.8/wx/dcmemory.h \ + /usr/include/wx-2.8/wx/gtk/dcmemory.h /usr/include/wx-2.8/wx/dcprint.h \ + /usr/include/wx-2.8/wx/dcscreen.h /usr/include/wx-2.8/wx/gtk/dcscreen.h \ + /usr/include/wx-2.8/wx/button.h /usr/include/wx-2.8/wx/control.h \ + /usr/include/wx-2.8/wx/gtk/control.h /usr/include/wx-2.8/wx/gtk/button.h \ + /usr/include/wx-2.8/wx/menuitem.h /usr/include/wx-2.8/wx/gtk/menuitem.h \ + /usr/include/wx-2.8/wx/menu.h /usr/include/wx-2.8/wx/gtk/menu.h \ + /usr/include/wx-2.8/wx/icon.h /usr/include/wx-2.8/wx/iconloc.h \ + /usr/include/wx-2.8/wx/generic/icon.h /usr/include/wx-2.8/wx/dialog.h \ + /usr/include/wx-2.8/wx/gtk/dialog.h /usr/include/wx-2.8/wx/timer.h \ + /usr/include/wx-2.8/wx/gtk/timer.h /usr/include/wx-2.8/wx/settings.h \ + /usr/include/wx-2.8/wx/msgdlg.h /usr/include/wx-2.8/wx/gtk/msgdlg.h \ + /usr/include/wx-2.8/wx/cmndata.h /usr/include/wx-2.8/wx/encinfo.h \ + /usr/include/wx-2.8/wx/dataobj.h /usr/include/wx-2.8/wx/gtk/dataform.h \ + /usr/include/wx-2.8/wx/gtk/dataobj.h \ + /usr/include/wx-2.8/wx/gtk/dataobj2.h /usr/include/wx-2.8/wx/ctrlsub.h \ + /usr/include/wx-2.8/wx/bmpbuttn.h /usr/include/wx-2.8/wx/gtk/bmpbuttn.h \ + /usr/include/wx-2.8/wx/checkbox.h /usr/include/wx-2.8/wx/gtk/checkbox.h \ + /usr/include/wx-2.8/wx/checklst.h /usr/include/wx-2.8/wx/listbox.h \ + /usr/include/wx-2.8/wx/gtk/listbox.h \ + /usr/include/wx-2.8/wx/gtk/checklst.h /usr/include/wx-2.8/wx/choice.h \ + /usr/include/wx-2.8/wx/gtk/choice.h /usr/include/wx-2.8/wx/scrolbar.h \ + /usr/include/wx-2.8/wx/gtk/scrolbar.h /usr/include/wx-2.8/wx/stattext.h \ + /usr/include/wx-2.8/wx/gtk/stattext.h /usr/include/wx-2.8/wx/statbmp.h \ + /usr/include/wx-2.8/wx/gtk/statbmp.h /usr/include/wx-2.8/wx/statbox.h \ + /usr/include/wx-2.8/wx/gtk/statbox.h /usr/include/wx-2.8/wx/radiobox.h \ + /usr/include/wx-2.8/wx/gtk/radiobox.h /usr/include/wx-2.8/wx/radiobut.h \ + /usr/include/wx-2.8/wx/gtk/radiobut.h /usr/include/wx-2.8/wx/textctrl.h \ + /usr/include/wx-2.8/wx/ioswrap.h /usr/include/wx-2.8/wx/gtk/textctrl.h \ + /usr/include/wx-2.8/wx/slider.h /usr/include/wx-2.8/wx/gtk/slider.h \ + /usr/include/wx-2.8/wx/gauge.h /usr/include/wx-2.8/wx/gtk/gauge.h \ + /usr/include/wx-2.8/wx/scrolwin.h /usr/include/wx-2.8/wx/gtk/scrolwin.h \ + /usr/include/wx-2.8/wx/dirdlg.h /usr/include/wx-2.8/wx/gtk/dirdlg.h \ + /usr/include/wx-2.8/wx/generic/dirdlgg.h \ + /usr/include/wx-2.8/wx/toolbar.h /usr/include/wx-2.8/wx/tbarbase.h \ + /usr/include/wx-2.8/wx/gtk/tbargtk.h /usr/include/wx-2.8/wx/combobox.h \ + /usr/include/wx-2.8/wx/gtk/combobox.h /usr/include/wx-2.8/wx/layout.h \ + /usr/include/wx-2.8/wx/sizer.h /usr/include/wx-2.8/wx/mdi.h \ + /usr/include/wx-2.8/wx/gtk/mdi.h /usr/include/wx-2.8/wx/statusbr.h \ + /usr/include/wx-2.8/wx/generic/statusbr.h \ + /usr/include/wx-2.8/wx/choicdlg.h \ + /usr/include/wx-2.8/wx/generic/choicdgg.h \ + /usr/include/wx-2.8/wx/textdlg.h \ + /usr/include/wx-2.8/wx/generic/textdlgg.h \ + /usr/include/wx-2.8/wx/valtext.h /usr/include/wx-2.8/wx/filedlg.h \ + /usr/include/wx-2.8/wx/gtk/filedlg.h \ + /usr/include/wx-2.8/wx/generic/filedlgg.h \ + /usr/include/wx-2.8/wx/listctrl.h /usr/include/wx-2.8/wx/listbase.h \ + /usr/include/wx-2.8/wx/generic/listctrl.h ../Common/CompressCall.h \ + ../../../Common/MyString.h ../../../Common/MyVector.h \ + ../../../Common/Defs.h ../../../Common/IntToString.h \ + ../../../Common/MyCom.h ../../../Common/MyWindows.h \ + ../../../Common/StringConvert.h ../../../Common/MyString.h \ + ../../../Windows/Synchronization.h ../../../Windows/Defs.h \ + ../../../Windows/../Common/MyWindows.h \ + ../../../Windows/../../C/Threads.h ../../../Windows/../../C/Types.h \ + ../../../Windows/Synchronization2.h ../../../Windows/FileDir.h \ + ../../../Windows/../Common/MyString.h \ + ../Common/../FileManager/ProgramLocation.h \ + ../Common/../FileManager/RegistryUtils.h ../../../myWindows/myPrivate.h +WorkDir.o: ../Common/WorkDir.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../../Common/StringConvert.h \ + ../../../Common/MyWindows.h ../../../Common/MyString.h \ + ../../../Common/MyVector.h ../../../Common/Defs.h \ + ../../../Common/Wildcard.h ../../../Windows/FileDir.h \ + ../../../Windows/../Common/MyString.h ../../../Windows/Defs.h \ + ../../../Windows/../Common/MyWindows.h ../../../Windows/FileName.h \ + ../../../Windows/../../C/Types.h ../Common/WorkDir.h \ + ../Common/ZipRegistry.h ../../../Common/MyString.h \ + ../Common/ExtractMode.h +ExtractCallback.o: ExtractCallback.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../../Windows/Error.h \ + ../../../Common/MyString.h ../../../Common/MyVector.h \ + ../../../Common/Defs.h ../../../Windows/FileDir.h \ + ../../../Windows/../Common/MyString.h ../../../Windows/Defs.h \ + ../../../Windows/../Common/MyWindows.h ../../../Windows/FileFind.h \ + ../../../Windows/FileName.h ../../../Windows/../../C/Types.h \ + ../../Common/FilePathAutoRename.h ../GUI/ExtractRes.h ExtractCallback.h \ + ../../../Common/MyCom.h ../../../Common/MyWindows.h \ + ../../../Windows/ResourceString.h ../Agent/IFolderArchive.h \ + ../Agent/../../IDecl.h ../Agent/../../../Common/MyUnknown.h \ + ../Agent/../../../Common/MyWindows.h ../Agent/../../Archive/IArchive.h \ + ../Agent/../../Archive/../IProgress.h \ + ../Agent/../../Archive/../../Common/MyUnknown.h \ + ../Agent/../../Archive/../../Common/Types.h \ + ../Agent/../../Archive/../IDecl.h ../Agent/../../Archive/../IStream.h \ + ../Agent/../../Archive/../PropID.h ../Agent/../../UI/Common/LoadCodecs.h \ + ../Agent/../../UI/Common/../../../Common/Types.h \ + ../Agent/../../UI/Common/../../../Common/MyCom.h \ + ../Agent/../../UI/Common/../../../Common/MyString.h \ + ../Agent/../../UI/Common/../../../Common/Buffer.h \ + ../Agent/../../UI/Common/../../../Common/Defs.h \ + ../Agent/../../UI/Common/../../ICoder.h \ + ../Agent/../../UI/Common/../../IStream.h \ + ../Agent/../../UI/Common/../../../Windows/DLL.h \ + ../Agent/../../UI/Common/../../../Windows/../Common/MyString.h \ + ../Agent/../../UI/Common/../../Archive/IArchive.h \ + ../Agent/../../UI/FileManager/IFolder.h \ + ../Agent/../../UI/FileManager/../../IProgress.h \ + ../Agent/../../UI/FileManager/../../IStream.h \ + ../Agent/../Common/ExtractMode.h \ + ../Agent/../Common/IFileExtractCallback.h \ + ../Agent/../Common/../../IDecl.h ../Common/ArchiveOpenCallback.h \ + ../Common/../../IPassword.h ../Common/../../../Common/MyUnknown.h \ + ../Common/../../../Common/Types.h ../Common/../../IDecl.h \ + ../Common/../../Archive/IArchive.h ../../IPassword.h IFolder.h \ + ProgressDialog2.h ../../../Windows/Synchronization.h \ + ../../../Windows/../../C/Threads.h ../../../Windows/../../C/Types.h \ + ../../../Windows/Synchronization2.h ../../../Windows/Thread.h \ + ../../../Windows/Control/Dialog.h ../../../Windows/Window.h \ + ../../../Windows/Defs.h ../../../Windows/Control/ListView.h \ + ../../../Windows/Control/ProgressBar.h LangUtils.h \ + ../../../Common/Lang.h ../../../Common/MyString.h FormatUtils.h \ + OverwriteDialog.h DialogSize.h OverwriteDialogRes.h PasswordDialog.h \ + ../../../Windows/Control/Edit.h PasswordDialogRes.h +ProgramLocation.o: ProgramLocation.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ProgramLocation.h \ + ../../../Common/MyString.h ../../../Common/MyVector.h \ + ../../../Common/Defs.h ../../../Common/StringConvert.h \ + ../../../Common/MyWindows.h ../../../Common/MyString.h +CopyDialog.o: CopyDialog.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../../Windows/FileName.h \ + ../../../Windows/../../C/Types.h ../../../Windows/../Common/MyString.h \ + ../../../Windows/../Common/MyVector.h ../../../Windows/../Common/Defs.h \ + ../../../Windows/Control/Static.h ../../../Windows/Window.h \ + ../../../Windows/Defs.h ../../../Windows/../Common/MyWindows.h \ + ../../../Common/MyString.h BrowseDialog.h \ + ../../../Windows/CommonDialog.h ../../../Windows/Shell.h CopyDialog.h \ + ../../../Windows/Control/ComboBox.h ../../../Windows/Control/Window2.h \ + ../../../Windows/Control/Dialog.h CopyDialogRes.h LangUtils.h \ + ../../../Common/Lang.h ../../../Common/MyVector.h \ + ../../../Common/MyString.h ../../../Windows/ResourceString.h +CopyDialog_rc.o: CopyDialog_rc.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h /usr/include/wx-2.8/wx/wxprec.h \ + /usr/include/wx-2.8/wx/defs.h /usr/include/wx-2.8/wx/platform.h \ + /usr/lib/wx/include/gtk2-unicode-release-2.8/wx/setup.h \ + /usr/include/wx-2.8/wx/chkconf.h /usr/include/wx-2.8/wx/features.h \ + /usr/include/wx-2.8/wx/version.h /usr/include/wx-2.8/wx/cpp.h \ + /usr/include/wx-2.8/wx/dlimpexp.h /usr/include/wx-2.8/wx/debug.h \ + /usr/include/wx-2.8/wx/wxchar.h /usr/include/wx-2.8/wx/wx.h \ + /usr/include/wx-2.8/wx/object.h /usr/include/wx-2.8/wx/memory.h \ + /usr/include/wx-2.8/wx/string.h /usr/include/wx-2.8/wx/buffer.h \ + /usr/include/wx-2.8/wx/strconv.h /usr/include/wx-2.8/wx/fontenc.h \ + /usr/include/wx-2.8/wx/beforestd.h /usr/include/wx-2.8/wx/afterstd.h \ + /usr/include/wx-2.8/wx/iosfwrap.h /usr/include/wx-2.8/wx/msgout.h \ + /usr/include/wx-2.8/wx/dynarray.h /usr/include/wx-2.8/wx/list.h \ + /usr/include/wx-2.8/wx/hash.h /usr/include/wx-2.8/wx/hashmap.h \ + /usr/include/wx-2.8/wx/arrstr.h /usr/include/wx-2.8/wx/intl.h \ + /usr/include/wx-2.8/wx/log.h /usr/include/wx-2.8/wx/generic/logg.h \ + /usr/include/wx-2.8/wx/event.h /usr/include/wx-2.8/wx/clntdata.h \ + /usr/include/wx-2.8/wx/vector.h /usr/include/wx-2.8/wx/gdicmn.h \ + /usr/include/wx-2.8/wx/math.h /usr/include/wx-2.8/wx/cursor.h \ + /usr/include/wx-2.8/wx/gtk/cursor.h /usr/include/wx-2.8/wx/utils.h \ + /usr/include/wx-2.8/wx/filefn.h /usr/include/wx-2.8/wx/longlong.h \ + /usr/include/wx-2.8/wx/platinfo.h /usr/include/wx-2.8/wx/thread.h \ + /usr/include/wx-2.8/wx/app.h /usr/include/wx-2.8/wx/build.h \ + /usr/include/wx-2.8/wx/init.h /usr/include/wx-2.8/wx/gtk/app.h \ + /usr/include/wx-2.8/wx/stream.h /usr/include/wx-2.8/wx/stopwatch.h \ + /usr/include/wx-2.8/wx/module.h /usr/include/wx-2.8/wx/window.h \ + /usr/include/wx-2.8/wx/font.h /usr/include/wx-2.8/wx/gdiobj.h \ + /usr/include/wx-2.8/wx/gtk/font.h /usr/include/wx-2.8/wx/colour.h \ + /usr/include/wx-2.8/wx/variant.h /usr/include/wx-2.8/wx/datetime.h \ + /usr/include/wx-2.8/wx/gtk/colour.h /usr/include/wx-2.8/wx/region.h \ + /usr/include/wx-2.8/wx/gtk/region.h /usr/include/wx-2.8/wx/validate.h \ + /usr/include/wx-2.8/wx/palette.h \ + /usr/include/wx-2.8/wx/generic/paletteg.h /usr/include/wx-2.8/wx/accel.h \ + /usr/include/wx-2.8/wx/gtk/accel.h \ + /usr/include/wx-2.8/wx/generic/accel.h \ + /usr/include/wx-2.8/wx/gtk/window.h /usr/include/wx-2.8/wx/containr.h \ + /usr/include/wx-2.8/wx/panel.h /usr/include/wx-2.8/wx/generic/panelg.h \ + /usr/include/wx-2.8/wx/toplevel.h /usr/include/wx-2.8/wx/iconbndl.h \ + /usr/include/wx-2.8/wx/gtk/toplevel.h /usr/include/wx-2.8/wx/frame.h \ + /usr/include/wx-2.8/wx/gtk/frame.h /usr/include/wx-2.8/wx/bitmap.h \ + /usr/include/wx-2.8/wx/gtk/bitmap.h /usr/include/wx-2.8/wx/image.h \ + /usr/include/wx-2.8/wx/imagbmp.h /usr/include/wx-2.8/wx/imagpng.h \ + /usr/include/wx-2.8/wx/imaggif.h /usr/include/wx-2.8/wx/imagpcx.h \ + /usr/include/wx-2.8/wx/imagjpeg.h /usr/include/wx-2.8/wx/imagtga.h \ + /usr/include/wx-2.8/wx/imagtiff.h /usr/include/wx-2.8/wx/imagpnm.h \ + /usr/include/wx-2.8/wx/imagxpm.h /usr/include/wx-2.8/wx/imagiff.h \ + /usr/include/wx-2.8/wx/dc.h /usr/include/wx-2.8/wx/brush.h \ + /usr/include/wx-2.8/wx/gtk/brush.h /usr/include/wx-2.8/wx/pen.h \ + /usr/include/wx-2.8/wx/gtk/pen.h /usr/include/wx-2.8/wx/gtk/dc.h \ + /usr/include/wx-2.8/wx/dcgraph.h /usr/include/wx-2.8/wx/geometry.h \ + /usr/include/wx-2.8/wx/graphics.h /usr/include/wx-2.8/wx/dcclient.h \ + /usr/include/wx-2.8/wx/gtk/dcclient.h /usr/include/wx-2.8/wx/dcmemory.h \ + /usr/include/wx-2.8/wx/gtk/dcmemory.h /usr/include/wx-2.8/wx/dcprint.h \ + /usr/include/wx-2.8/wx/dcscreen.h /usr/include/wx-2.8/wx/gtk/dcscreen.h \ + /usr/include/wx-2.8/wx/button.h /usr/include/wx-2.8/wx/control.h \ + /usr/include/wx-2.8/wx/gtk/control.h /usr/include/wx-2.8/wx/gtk/button.h \ + /usr/include/wx-2.8/wx/menuitem.h /usr/include/wx-2.8/wx/gtk/menuitem.h \ + /usr/include/wx-2.8/wx/menu.h /usr/include/wx-2.8/wx/gtk/menu.h \ + /usr/include/wx-2.8/wx/icon.h /usr/include/wx-2.8/wx/iconloc.h \ + /usr/include/wx-2.8/wx/generic/icon.h /usr/include/wx-2.8/wx/dialog.h \ + /usr/include/wx-2.8/wx/gtk/dialog.h /usr/include/wx-2.8/wx/timer.h \ + /usr/include/wx-2.8/wx/gtk/timer.h /usr/include/wx-2.8/wx/settings.h \ + /usr/include/wx-2.8/wx/msgdlg.h /usr/include/wx-2.8/wx/gtk/msgdlg.h \ + /usr/include/wx-2.8/wx/cmndata.h /usr/include/wx-2.8/wx/encinfo.h \ + /usr/include/wx-2.8/wx/dataobj.h /usr/include/wx-2.8/wx/gtk/dataform.h \ + /usr/include/wx-2.8/wx/gtk/dataobj.h \ + /usr/include/wx-2.8/wx/gtk/dataobj2.h /usr/include/wx-2.8/wx/ctrlsub.h \ + /usr/include/wx-2.8/wx/bmpbuttn.h /usr/include/wx-2.8/wx/gtk/bmpbuttn.h \ + /usr/include/wx-2.8/wx/checkbox.h /usr/include/wx-2.8/wx/gtk/checkbox.h \ + /usr/include/wx-2.8/wx/checklst.h /usr/include/wx-2.8/wx/listbox.h \ + /usr/include/wx-2.8/wx/gtk/listbox.h \ + /usr/include/wx-2.8/wx/gtk/checklst.h /usr/include/wx-2.8/wx/choice.h \ + /usr/include/wx-2.8/wx/gtk/choice.h /usr/include/wx-2.8/wx/scrolbar.h \ + /usr/include/wx-2.8/wx/gtk/scrolbar.h /usr/include/wx-2.8/wx/stattext.h \ + /usr/include/wx-2.8/wx/gtk/stattext.h /usr/include/wx-2.8/wx/statbmp.h \ + /usr/include/wx-2.8/wx/gtk/statbmp.h /usr/include/wx-2.8/wx/statbox.h \ + /usr/include/wx-2.8/wx/gtk/statbox.h /usr/include/wx-2.8/wx/radiobox.h \ + /usr/include/wx-2.8/wx/gtk/radiobox.h /usr/include/wx-2.8/wx/radiobut.h \ + /usr/include/wx-2.8/wx/gtk/radiobut.h /usr/include/wx-2.8/wx/textctrl.h \ + /usr/include/wx-2.8/wx/ioswrap.h /usr/include/wx-2.8/wx/gtk/textctrl.h \ + /usr/include/wx-2.8/wx/slider.h /usr/include/wx-2.8/wx/gtk/slider.h \ + /usr/include/wx-2.8/wx/gauge.h /usr/include/wx-2.8/wx/gtk/gauge.h \ + /usr/include/wx-2.8/wx/scrolwin.h /usr/include/wx-2.8/wx/gtk/scrolwin.h \ + /usr/include/wx-2.8/wx/dirdlg.h /usr/include/wx-2.8/wx/gtk/dirdlg.h \ + /usr/include/wx-2.8/wx/generic/dirdlgg.h \ + /usr/include/wx-2.8/wx/toolbar.h /usr/include/wx-2.8/wx/tbarbase.h \ + /usr/include/wx-2.8/wx/gtk/tbargtk.h /usr/include/wx-2.8/wx/combobox.h \ + /usr/include/wx-2.8/wx/gtk/combobox.h /usr/include/wx-2.8/wx/layout.h \ + /usr/include/wx-2.8/wx/sizer.h /usr/include/wx-2.8/wx/mdi.h \ + /usr/include/wx-2.8/wx/gtk/mdi.h /usr/include/wx-2.8/wx/statusbr.h \ + /usr/include/wx-2.8/wx/generic/statusbr.h \ + /usr/include/wx-2.8/wx/choicdlg.h \ + /usr/include/wx-2.8/wx/generic/choicdgg.h \ + /usr/include/wx-2.8/wx/textdlg.h \ + /usr/include/wx-2.8/wx/generic/textdlgg.h \ + /usr/include/wx-2.8/wx/valtext.h /usr/include/wx-2.8/wx/filedlg.h \ + /usr/include/wx-2.8/wx/gtk/filedlg.h \ + /usr/include/wx-2.8/wx/generic/filedlgg.h \ + /usr/include/wx-2.8/wx/listctrl.h /usr/include/wx-2.8/wx/listbase.h \ + /usr/include/wx-2.8/wx/generic/listctrl.h \ + ../../../Windows/Control/DialogImpl.h ../../../Windows/Window.h \ + ../../../Windows/Defs.h ../../../Windows/../Common/MyWindows.h \ + ../../../Common/MyString.h ../../../Common/MyVector.h \ + ../../../Common/Defs.h ../../../Windows/Control/Dialog.h CopyDialogRes.h +ListViewDialog.o: ListViewDialog.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ListViewDialog.h \ + ../../../Windows/Control/Dialog.h ../../../Windows/Window.h \ + ../../../Windows/Defs.h ../../../Windows/../Common/MyWindows.h \ + ../../../Common/MyString.h ../../../Common/MyVector.h \ + ../../../Common/Defs.h ../../../Windows/Control/ListView.h \ + ListViewDialogRes.h RegistryUtils.h LangUtils.h ../../../Common/Lang.h \ + ../../../Common/MyString.h ../../../Windows/ResourceString.h +ListViewDialog_rc.o: ListViewDialog_rc.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h /usr/include/wx-2.8/wx/wxprec.h \ + /usr/include/wx-2.8/wx/defs.h /usr/include/wx-2.8/wx/platform.h \ + /usr/lib/wx/include/gtk2-unicode-release-2.8/wx/setup.h \ + /usr/include/wx-2.8/wx/chkconf.h /usr/include/wx-2.8/wx/features.h \ + /usr/include/wx-2.8/wx/version.h /usr/include/wx-2.8/wx/cpp.h \ + /usr/include/wx-2.8/wx/dlimpexp.h /usr/include/wx-2.8/wx/debug.h \ + /usr/include/wx-2.8/wx/wxchar.h /usr/include/wx-2.8/wx/wx.h \ + /usr/include/wx-2.8/wx/object.h /usr/include/wx-2.8/wx/memory.h \ + /usr/include/wx-2.8/wx/string.h /usr/include/wx-2.8/wx/buffer.h \ + /usr/include/wx-2.8/wx/strconv.h /usr/include/wx-2.8/wx/fontenc.h \ + /usr/include/wx-2.8/wx/beforestd.h /usr/include/wx-2.8/wx/afterstd.h \ + /usr/include/wx-2.8/wx/iosfwrap.h /usr/include/wx-2.8/wx/msgout.h \ + /usr/include/wx-2.8/wx/dynarray.h /usr/include/wx-2.8/wx/list.h \ + /usr/include/wx-2.8/wx/hash.h /usr/include/wx-2.8/wx/hashmap.h \ + /usr/include/wx-2.8/wx/arrstr.h /usr/include/wx-2.8/wx/intl.h \ + /usr/include/wx-2.8/wx/log.h /usr/include/wx-2.8/wx/generic/logg.h \ + /usr/include/wx-2.8/wx/event.h /usr/include/wx-2.8/wx/clntdata.h \ + /usr/include/wx-2.8/wx/vector.h /usr/include/wx-2.8/wx/gdicmn.h \ + /usr/include/wx-2.8/wx/math.h /usr/include/wx-2.8/wx/cursor.h \ + /usr/include/wx-2.8/wx/gtk/cursor.h /usr/include/wx-2.8/wx/utils.h \ + /usr/include/wx-2.8/wx/filefn.h /usr/include/wx-2.8/wx/longlong.h \ + /usr/include/wx-2.8/wx/platinfo.h /usr/include/wx-2.8/wx/thread.h \ + /usr/include/wx-2.8/wx/app.h /usr/include/wx-2.8/wx/build.h \ + /usr/include/wx-2.8/wx/init.h /usr/include/wx-2.8/wx/gtk/app.h \ + /usr/include/wx-2.8/wx/stream.h /usr/include/wx-2.8/wx/stopwatch.h \ + /usr/include/wx-2.8/wx/module.h /usr/include/wx-2.8/wx/window.h \ + /usr/include/wx-2.8/wx/font.h /usr/include/wx-2.8/wx/gdiobj.h \ + /usr/include/wx-2.8/wx/gtk/font.h /usr/include/wx-2.8/wx/colour.h \ + /usr/include/wx-2.8/wx/variant.h /usr/include/wx-2.8/wx/datetime.h \ + /usr/include/wx-2.8/wx/gtk/colour.h /usr/include/wx-2.8/wx/region.h \ + /usr/include/wx-2.8/wx/gtk/region.h /usr/include/wx-2.8/wx/validate.h \ + /usr/include/wx-2.8/wx/palette.h \ + /usr/include/wx-2.8/wx/generic/paletteg.h /usr/include/wx-2.8/wx/accel.h \ + /usr/include/wx-2.8/wx/gtk/accel.h \ + /usr/include/wx-2.8/wx/generic/accel.h \ + /usr/include/wx-2.8/wx/gtk/window.h /usr/include/wx-2.8/wx/containr.h \ + /usr/include/wx-2.8/wx/panel.h /usr/include/wx-2.8/wx/generic/panelg.h \ + /usr/include/wx-2.8/wx/toplevel.h /usr/include/wx-2.8/wx/iconbndl.h \ + /usr/include/wx-2.8/wx/gtk/toplevel.h /usr/include/wx-2.8/wx/frame.h \ + /usr/include/wx-2.8/wx/gtk/frame.h /usr/include/wx-2.8/wx/bitmap.h \ + /usr/include/wx-2.8/wx/gtk/bitmap.h /usr/include/wx-2.8/wx/image.h \ + /usr/include/wx-2.8/wx/imagbmp.h /usr/include/wx-2.8/wx/imagpng.h \ + /usr/include/wx-2.8/wx/imaggif.h /usr/include/wx-2.8/wx/imagpcx.h \ + /usr/include/wx-2.8/wx/imagjpeg.h /usr/include/wx-2.8/wx/imagtga.h \ + /usr/include/wx-2.8/wx/imagtiff.h /usr/include/wx-2.8/wx/imagpnm.h \ + /usr/include/wx-2.8/wx/imagxpm.h /usr/include/wx-2.8/wx/imagiff.h \ + /usr/include/wx-2.8/wx/dc.h /usr/include/wx-2.8/wx/brush.h \ + /usr/include/wx-2.8/wx/gtk/brush.h /usr/include/wx-2.8/wx/pen.h \ + /usr/include/wx-2.8/wx/gtk/pen.h /usr/include/wx-2.8/wx/gtk/dc.h \ + /usr/include/wx-2.8/wx/dcgraph.h /usr/include/wx-2.8/wx/geometry.h \ + /usr/include/wx-2.8/wx/graphics.h /usr/include/wx-2.8/wx/dcclient.h \ + /usr/include/wx-2.8/wx/gtk/dcclient.h /usr/include/wx-2.8/wx/dcmemory.h \ + /usr/include/wx-2.8/wx/gtk/dcmemory.h /usr/include/wx-2.8/wx/dcprint.h \ + /usr/include/wx-2.8/wx/dcscreen.h /usr/include/wx-2.8/wx/gtk/dcscreen.h \ + /usr/include/wx-2.8/wx/button.h /usr/include/wx-2.8/wx/control.h \ + /usr/include/wx-2.8/wx/gtk/control.h /usr/include/wx-2.8/wx/gtk/button.h \ + /usr/include/wx-2.8/wx/menuitem.h /usr/include/wx-2.8/wx/gtk/menuitem.h \ + /usr/include/wx-2.8/wx/menu.h /usr/include/wx-2.8/wx/gtk/menu.h \ + /usr/include/wx-2.8/wx/icon.h /usr/include/wx-2.8/wx/iconloc.h \ + /usr/include/wx-2.8/wx/generic/icon.h /usr/include/wx-2.8/wx/dialog.h \ + /usr/include/wx-2.8/wx/gtk/dialog.h /usr/include/wx-2.8/wx/timer.h \ + /usr/include/wx-2.8/wx/gtk/timer.h /usr/include/wx-2.8/wx/settings.h \ + /usr/include/wx-2.8/wx/msgdlg.h /usr/include/wx-2.8/wx/gtk/msgdlg.h \ + /usr/include/wx-2.8/wx/cmndata.h /usr/include/wx-2.8/wx/encinfo.h \ + /usr/include/wx-2.8/wx/dataobj.h /usr/include/wx-2.8/wx/gtk/dataform.h \ + /usr/include/wx-2.8/wx/gtk/dataobj.h \ + /usr/include/wx-2.8/wx/gtk/dataobj2.h /usr/include/wx-2.8/wx/ctrlsub.h \ + /usr/include/wx-2.8/wx/bmpbuttn.h /usr/include/wx-2.8/wx/gtk/bmpbuttn.h \ + /usr/include/wx-2.8/wx/checkbox.h /usr/include/wx-2.8/wx/gtk/checkbox.h \ + /usr/include/wx-2.8/wx/checklst.h /usr/include/wx-2.8/wx/listbox.h \ + /usr/include/wx-2.8/wx/gtk/listbox.h \ + /usr/include/wx-2.8/wx/gtk/checklst.h /usr/include/wx-2.8/wx/choice.h \ + /usr/include/wx-2.8/wx/gtk/choice.h /usr/include/wx-2.8/wx/scrolbar.h \ + /usr/include/wx-2.8/wx/gtk/scrolbar.h /usr/include/wx-2.8/wx/stattext.h \ + /usr/include/wx-2.8/wx/gtk/stattext.h /usr/include/wx-2.8/wx/statbmp.h \ + /usr/include/wx-2.8/wx/gtk/statbmp.h /usr/include/wx-2.8/wx/statbox.h \ + /usr/include/wx-2.8/wx/gtk/statbox.h /usr/include/wx-2.8/wx/radiobox.h \ + /usr/include/wx-2.8/wx/gtk/radiobox.h /usr/include/wx-2.8/wx/radiobut.h \ + /usr/include/wx-2.8/wx/gtk/radiobut.h /usr/include/wx-2.8/wx/textctrl.h \ + /usr/include/wx-2.8/wx/ioswrap.h /usr/include/wx-2.8/wx/gtk/textctrl.h \ + /usr/include/wx-2.8/wx/slider.h /usr/include/wx-2.8/wx/gtk/slider.h \ + /usr/include/wx-2.8/wx/gauge.h /usr/include/wx-2.8/wx/gtk/gauge.h \ + /usr/include/wx-2.8/wx/scrolwin.h /usr/include/wx-2.8/wx/gtk/scrolwin.h \ + /usr/include/wx-2.8/wx/dirdlg.h /usr/include/wx-2.8/wx/gtk/dirdlg.h \ + /usr/include/wx-2.8/wx/generic/dirdlgg.h \ + /usr/include/wx-2.8/wx/toolbar.h /usr/include/wx-2.8/wx/tbarbase.h \ + /usr/include/wx-2.8/wx/gtk/tbargtk.h /usr/include/wx-2.8/wx/combobox.h \ + /usr/include/wx-2.8/wx/gtk/combobox.h /usr/include/wx-2.8/wx/layout.h \ + /usr/include/wx-2.8/wx/sizer.h /usr/include/wx-2.8/wx/mdi.h \ + /usr/include/wx-2.8/wx/gtk/mdi.h /usr/include/wx-2.8/wx/statusbr.h \ + /usr/include/wx-2.8/wx/generic/statusbr.h \ + /usr/include/wx-2.8/wx/choicdlg.h \ + /usr/include/wx-2.8/wx/generic/choicdgg.h \ + /usr/include/wx-2.8/wx/textdlg.h \ + /usr/include/wx-2.8/wx/generic/textdlgg.h \ + /usr/include/wx-2.8/wx/valtext.h /usr/include/wx-2.8/wx/filedlg.h \ + /usr/include/wx-2.8/wx/gtk/filedlg.h \ + /usr/include/wx-2.8/wx/generic/filedlgg.h \ + /usr/include/wx-2.8/wx/listctrl.h /usr/include/wx-2.8/wx/listbase.h \ + /usr/include/wx-2.8/wx/generic/listctrl.h \ + ../../../Windows/Control/DialogImpl.h ../../../Windows/Window.h \ + ../../../Windows/Defs.h ../../../Windows/../Common/MyWindows.h \ + ../../../Common/MyString.h ../../../Common/MyVector.h \ + ../../../Common/Defs.h ../../../Windows/Control/Dialog.h \ + ListViewDialogRes.h +SplitDialog.o: SplitDialog.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../../Windows/FileName.h \ + ../../../Windows/../../C/Types.h ../../../Windows/../Common/MyString.h \ + ../../../Windows/../Common/MyVector.h ../../../Windows/../Common/Defs.h \ + LangUtils.h ../../../Common/Lang.h ../../../Common/MyVector.h \ + ../../../Common/MyString.h ../../../Windows/ResourceString.h \ + ../../../Common/MyString.h BrowseDialog.h \ + ../../../Windows/CommonDialog.h ../../../Windows/Shell.h \ + ../../../Windows/Defs.h ../../../Windows/../Common/MyWindows.h \ + CopyDialogRes.h SplitDialog.h ../../../Windows/Control/Dialog.h \ + ../../../Windows/Window.h ../../../Windows/Control/ComboBox.h \ + ../../../Windows/Control/Window2.h SplitDialogRes.h SplitUtils.h \ + resourceGui.h +SplitDialog_rc.o: SplitDialog_rc.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h /usr/include/wx-2.8/wx/wxprec.h \ + /usr/include/wx-2.8/wx/defs.h /usr/include/wx-2.8/wx/platform.h \ + /usr/lib/wx/include/gtk2-unicode-release-2.8/wx/setup.h \ + /usr/include/wx-2.8/wx/chkconf.h /usr/include/wx-2.8/wx/features.h \ + /usr/include/wx-2.8/wx/version.h /usr/include/wx-2.8/wx/cpp.h \ + /usr/include/wx-2.8/wx/dlimpexp.h /usr/include/wx-2.8/wx/debug.h \ + /usr/include/wx-2.8/wx/wxchar.h /usr/include/wx-2.8/wx/wx.h \ + /usr/include/wx-2.8/wx/object.h /usr/include/wx-2.8/wx/memory.h \ + /usr/include/wx-2.8/wx/string.h /usr/include/wx-2.8/wx/buffer.h \ + /usr/include/wx-2.8/wx/strconv.h /usr/include/wx-2.8/wx/fontenc.h \ + /usr/include/wx-2.8/wx/beforestd.h /usr/include/wx-2.8/wx/afterstd.h \ + /usr/include/wx-2.8/wx/iosfwrap.h /usr/include/wx-2.8/wx/msgout.h \ + /usr/include/wx-2.8/wx/dynarray.h /usr/include/wx-2.8/wx/list.h \ + /usr/include/wx-2.8/wx/hash.h /usr/include/wx-2.8/wx/hashmap.h \ + /usr/include/wx-2.8/wx/arrstr.h /usr/include/wx-2.8/wx/intl.h \ + /usr/include/wx-2.8/wx/log.h /usr/include/wx-2.8/wx/generic/logg.h \ + /usr/include/wx-2.8/wx/event.h /usr/include/wx-2.8/wx/clntdata.h \ + /usr/include/wx-2.8/wx/vector.h /usr/include/wx-2.8/wx/gdicmn.h \ + /usr/include/wx-2.8/wx/math.h /usr/include/wx-2.8/wx/cursor.h \ + /usr/include/wx-2.8/wx/gtk/cursor.h /usr/include/wx-2.8/wx/utils.h \ + /usr/include/wx-2.8/wx/filefn.h /usr/include/wx-2.8/wx/longlong.h \ + /usr/include/wx-2.8/wx/platinfo.h /usr/include/wx-2.8/wx/thread.h \ + /usr/include/wx-2.8/wx/app.h /usr/include/wx-2.8/wx/build.h \ + /usr/include/wx-2.8/wx/init.h /usr/include/wx-2.8/wx/gtk/app.h \ + /usr/include/wx-2.8/wx/stream.h /usr/include/wx-2.8/wx/stopwatch.h \ + /usr/include/wx-2.8/wx/module.h /usr/include/wx-2.8/wx/window.h \ + /usr/include/wx-2.8/wx/font.h /usr/include/wx-2.8/wx/gdiobj.h \ + /usr/include/wx-2.8/wx/gtk/font.h /usr/include/wx-2.8/wx/colour.h \ + /usr/include/wx-2.8/wx/variant.h /usr/include/wx-2.8/wx/datetime.h \ + /usr/include/wx-2.8/wx/gtk/colour.h /usr/include/wx-2.8/wx/region.h \ + /usr/include/wx-2.8/wx/gtk/region.h /usr/include/wx-2.8/wx/validate.h \ + /usr/include/wx-2.8/wx/palette.h \ + /usr/include/wx-2.8/wx/generic/paletteg.h /usr/include/wx-2.8/wx/accel.h \ + /usr/include/wx-2.8/wx/gtk/accel.h \ + /usr/include/wx-2.8/wx/generic/accel.h \ + /usr/include/wx-2.8/wx/gtk/window.h /usr/include/wx-2.8/wx/containr.h \ + /usr/include/wx-2.8/wx/panel.h /usr/include/wx-2.8/wx/generic/panelg.h \ + /usr/include/wx-2.8/wx/toplevel.h /usr/include/wx-2.8/wx/iconbndl.h \ + /usr/include/wx-2.8/wx/gtk/toplevel.h /usr/include/wx-2.8/wx/frame.h \ + /usr/include/wx-2.8/wx/gtk/frame.h /usr/include/wx-2.8/wx/bitmap.h \ + /usr/include/wx-2.8/wx/gtk/bitmap.h /usr/include/wx-2.8/wx/image.h \ + /usr/include/wx-2.8/wx/imagbmp.h /usr/include/wx-2.8/wx/imagpng.h \ + /usr/include/wx-2.8/wx/imaggif.h /usr/include/wx-2.8/wx/imagpcx.h \ + /usr/include/wx-2.8/wx/imagjpeg.h /usr/include/wx-2.8/wx/imagtga.h \ + /usr/include/wx-2.8/wx/imagtiff.h /usr/include/wx-2.8/wx/imagpnm.h \ + /usr/include/wx-2.8/wx/imagxpm.h /usr/include/wx-2.8/wx/imagiff.h \ + /usr/include/wx-2.8/wx/dc.h /usr/include/wx-2.8/wx/brush.h \ + /usr/include/wx-2.8/wx/gtk/brush.h /usr/include/wx-2.8/wx/pen.h \ + /usr/include/wx-2.8/wx/gtk/pen.h /usr/include/wx-2.8/wx/gtk/dc.h \ + /usr/include/wx-2.8/wx/dcgraph.h /usr/include/wx-2.8/wx/geometry.h \ + /usr/include/wx-2.8/wx/graphics.h /usr/include/wx-2.8/wx/dcclient.h \ + /usr/include/wx-2.8/wx/gtk/dcclient.h /usr/include/wx-2.8/wx/dcmemory.h \ + /usr/include/wx-2.8/wx/gtk/dcmemory.h /usr/include/wx-2.8/wx/dcprint.h \ + /usr/include/wx-2.8/wx/dcscreen.h /usr/include/wx-2.8/wx/gtk/dcscreen.h \ + /usr/include/wx-2.8/wx/button.h /usr/include/wx-2.8/wx/control.h \ + /usr/include/wx-2.8/wx/gtk/control.h /usr/include/wx-2.8/wx/gtk/button.h \ + /usr/include/wx-2.8/wx/menuitem.h /usr/include/wx-2.8/wx/gtk/menuitem.h \ + /usr/include/wx-2.8/wx/menu.h /usr/include/wx-2.8/wx/gtk/menu.h \ + /usr/include/wx-2.8/wx/icon.h /usr/include/wx-2.8/wx/iconloc.h \ + /usr/include/wx-2.8/wx/generic/icon.h /usr/include/wx-2.8/wx/dialog.h \ + /usr/include/wx-2.8/wx/gtk/dialog.h /usr/include/wx-2.8/wx/timer.h \ + /usr/include/wx-2.8/wx/gtk/timer.h /usr/include/wx-2.8/wx/settings.h \ + /usr/include/wx-2.8/wx/msgdlg.h /usr/include/wx-2.8/wx/gtk/msgdlg.h \ + /usr/include/wx-2.8/wx/cmndata.h /usr/include/wx-2.8/wx/encinfo.h \ + /usr/include/wx-2.8/wx/dataobj.h /usr/include/wx-2.8/wx/gtk/dataform.h \ + /usr/include/wx-2.8/wx/gtk/dataobj.h \ + /usr/include/wx-2.8/wx/gtk/dataobj2.h /usr/include/wx-2.8/wx/ctrlsub.h \ + /usr/include/wx-2.8/wx/bmpbuttn.h /usr/include/wx-2.8/wx/gtk/bmpbuttn.h \ + /usr/include/wx-2.8/wx/checkbox.h /usr/include/wx-2.8/wx/gtk/checkbox.h \ + /usr/include/wx-2.8/wx/checklst.h /usr/include/wx-2.8/wx/listbox.h \ + /usr/include/wx-2.8/wx/gtk/listbox.h \ + /usr/include/wx-2.8/wx/gtk/checklst.h /usr/include/wx-2.8/wx/choice.h \ + /usr/include/wx-2.8/wx/gtk/choice.h /usr/include/wx-2.8/wx/scrolbar.h \ + /usr/include/wx-2.8/wx/gtk/scrolbar.h /usr/include/wx-2.8/wx/stattext.h \ + /usr/include/wx-2.8/wx/gtk/stattext.h /usr/include/wx-2.8/wx/statbmp.h \ + /usr/include/wx-2.8/wx/gtk/statbmp.h /usr/include/wx-2.8/wx/statbox.h \ + /usr/include/wx-2.8/wx/gtk/statbox.h /usr/include/wx-2.8/wx/radiobox.h \ + /usr/include/wx-2.8/wx/gtk/radiobox.h /usr/include/wx-2.8/wx/radiobut.h \ + /usr/include/wx-2.8/wx/gtk/radiobut.h /usr/include/wx-2.8/wx/textctrl.h \ + /usr/include/wx-2.8/wx/ioswrap.h /usr/include/wx-2.8/wx/gtk/textctrl.h \ + /usr/include/wx-2.8/wx/slider.h /usr/include/wx-2.8/wx/gtk/slider.h \ + /usr/include/wx-2.8/wx/gauge.h /usr/include/wx-2.8/wx/gtk/gauge.h \ + /usr/include/wx-2.8/wx/scrolwin.h /usr/include/wx-2.8/wx/gtk/scrolwin.h \ + /usr/include/wx-2.8/wx/dirdlg.h /usr/include/wx-2.8/wx/gtk/dirdlg.h \ + /usr/include/wx-2.8/wx/generic/dirdlgg.h \ + /usr/include/wx-2.8/wx/toolbar.h /usr/include/wx-2.8/wx/tbarbase.h \ + /usr/include/wx-2.8/wx/gtk/tbargtk.h /usr/include/wx-2.8/wx/combobox.h \ + /usr/include/wx-2.8/wx/gtk/combobox.h /usr/include/wx-2.8/wx/layout.h \ + /usr/include/wx-2.8/wx/sizer.h /usr/include/wx-2.8/wx/mdi.h \ + /usr/include/wx-2.8/wx/gtk/mdi.h /usr/include/wx-2.8/wx/statusbr.h \ + /usr/include/wx-2.8/wx/generic/statusbr.h \ + /usr/include/wx-2.8/wx/choicdlg.h \ + /usr/include/wx-2.8/wx/generic/choicdgg.h \ + /usr/include/wx-2.8/wx/textdlg.h \ + /usr/include/wx-2.8/wx/generic/textdlgg.h \ + /usr/include/wx-2.8/wx/valtext.h /usr/include/wx-2.8/wx/filedlg.h \ + /usr/include/wx-2.8/wx/gtk/filedlg.h \ + /usr/include/wx-2.8/wx/generic/filedlgg.h \ + /usr/include/wx-2.8/wx/listctrl.h /usr/include/wx-2.8/wx/listbase.h \ + /usr/include/wx-2.8/wx/generic/listctrl.h \ + ../../../Windows/Control/DialogImpl.h ../../../Windows/Window.h \ + ../../../Windows/Defs.h ../../../Windows/../Common/MyWindows.h \ + ../../../Common/MyString.h ../../../Common/MyVector.h \ + ../../../Common/Defs.h ../../../Windows/Control/Dialog.h \ + SplitDialogRes.h +SplitUtils.o: SplitUtils.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../../Common/StringToInt.h \ + SplitUtils.h ../../../Common/MyString.h ../../../Common/MyVector.h \ + ../../../Common/Defs.h ../../../Windows/Control/ComboBox.h \ + ../../../Windows/Window.h ../../../Windows/Defs.h \ + ../../../Windows/../Common/MyWindows.h \ + ../../../Windows/Control/Window2.h StringUtils.h +StringUtils.o: StringUtils.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h StringUtils.h \ + ../../../Common/MyString.h ../../../Common/MyVector.h \ + ../../../Common/Defs.h +ProgressDialog2.o: ProgressDialog2.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../../Common/IntToString.h \ + ../../../Common/StringConvert.h ../../../Common/MyWindows.h \ + ../../../Common/MyString.h ../../../Common/MyVector.h \ + ../../../Common/Defs.h ../../../Windows/Control/Static.h \ + ../../../Windows/Window.h ../../../Windows/Defs.h \ + ../../../Windows/../Common/MyWindows.h ../../../Common/MyString.h \ + ../../../Windows/Error.h ProgressDialog2.h \ + ../../../Windows/Synchronization.h ../../../Windows/Defs.h \ + ../../../Windows/../../C/Threads.h ../../../Windows/../../C/Types.h \ + ../../../Windows/Synchronization2.h ../../../Windows/Thread.h \ + ../../../Windows/Control/Dialog.h ../../../Windows/Control/ListView.h \ + ../../../Windows/Control/ProgressBar.h DialogSize.h ProgressDialog2Res.h \ + ../GUI/ExtractRes.h LangUtils.h ../../../Common/Lang.h \ + ../../../Windows/ResourceString.h +ProgressDialog2_rc.o: ProgressDialog2_rc.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h /usr/include/wx-2.8/wx/wxprec.h \ + /usr/include/wx-2.8/wx/defs.h /usr/include/wx-2.8/wx/platform.h \ + /usr/lib/wx/include/gtk2-unicode-release-2.8/wx/setup.h \ + /usr/include/wx-2.8/wx/chkconf.h /usr/include/wx-2.8/wx/features.h \ + /usr/include/wx-2.8/wx/version.h /usr/include/wx-2.8/wx/cpp.h \ + /usr/include/wx-2.8/wx/dlimpexp.h /usr/include/wx-2.8/wx/debug.h \ + /usr/include/wx-2.8/wx/wxchar.h /usr/include/wx-2.8/wx/wx.h \ + /usr/include/wx-2.8/wx/object.h /usr/include/wx-2.8/wx/memory.h \ + /usr/include/wx-2.8/wx/string.h /usr/include/wx-2.8/wx/buffer.h \ + /usr/include/wx-2.8/wx/strconv.h /usr/include/wx-2.8/wx/fontenc.h \ + /usr/include/wx-2.8/wx/beforestd.h /usr/include/wx-2.8/wx/afterstd.h \ + /usr/include/wx-2.8/wx/iosfwrap.h /usr/include/wx-2.8/wx/msgout.h \ + /usr/include/wx-2.8/wx/dynarray.h /usr/include/wx-2.8/wx/list.h \ + /usr/include/wx-2.8/wx/hash.h /usr/include/wx-2.8/wx/hashmap.h \ + /usr/include/wx-2.8/wx/arrstr.h /usr/include/wx-2.8/wx/intl.h \ + /usr/include/wx-2.8/wx/log.h /usr/include/wx-2.8/wx/generic/logg.h \ + /usr/include/wx-2.8/wx/event.h /usr/include/wx-2.8/wx/clntdata.h \ + /usr/include/wx-2.8/wx/vector.h /usr/include/wx-2.8/wx/gdicmn.h \ + /usr/include/wx-2.8/wx/math.h /usr/include/wx-2.8/wx/cursor.h \ + /usr/include/wx-2.8/wx/gtk/cursor.h /usr/include/wx-2.8/wx/utils.h \ + /usr/include/wx-2.8/wx/filefn.h /usr/include/wx-2.8/wx/longlong.h \ + /usr/include/wx-2.8/wx/platinfo.h /usr/include/wx-2.8/wx/thread.h \ + /usr/include/wx-2.8/wx/app.h /usr/include/wx-2.8/wx/build.h \ + /usr/include/wx-2.8/wx/init.h /usr/include/wx-2.8/wx/gtk/app.h \ + /usr/include/wx-2.8/wx/stream.h /usr/include/wx-2.8/wx/stopwatch.h \ + /usr/include/wx-2.8/wx/module.h /usr/include/wx-2.8/wx/window.h \ + /usr/include/wx-2.8/wx/font.h /usr/include/wx-2.8/wx/gdiobj.h \ + /usr/include/wx-2.8/wx/gtk/font.h /usr/include/wx-2.8/wx/colour.h \ + /usr/include/wx-2.8/wx/variant.h /usr/include/wx-2.8/wx/datetime.h \ + /usr/include/wx-2.8/wx/gtk/colour.h /usr/include/wx-2.8/wx/region.h \ + /usr/include/wx-2.8/wx/gtk/region.h /usr/include/wx-2.8/wx/validate.h \ + /usr/include/wx-2.8/wx/palette.h \ + /usr/include/wx-2.8/wx/generic/paletteg.h /usr/include/wx-2.8/wx/accel.h \ + /usr/include/wx-2.8/wx/gtk/accel.h \ + /usr/include/wx-2.8/wx/generic/accel.h \ + /usr/include/wx-2.8/wx/gtk/window.h /usr/include/wx-2.8/wx/containr.h \ + /usr/include/wx-2.8/wx/panel.h /usr/include/wx-2.8/wx/generic/panelg.h \ + /usr/include/wx-2.8/wx/toplevel.h /usr/include/wx-2.8/wx/iconbndl.h \ + /usr/include/wx-2.8/wx/gtk/toplevel.h /usr/include/wx-2.8/wx/frame.h \ + /usr/include/wx-2.8/wx/gtk/frame.h /usr/include/wx-2.8/wx/bitmap.h \ + /usr/include/wx-2.8/wx/gtk/bitmap.h /usr/include/wx-2.8/wx/image.h \ + /usr/include/wx-2.8/wx/imagbmp.h /usr/include/wx-2.8/wx/imagpng.h \ + /usr/include/wx-2.8/wx/imaggif.h /usr/include/wx-2.8/wx/imagpcx.h \ + /usr/include/wx-2.8/wx/imagjpeg.h /usr/include/wx-2.8/wx/imagtga.h \ + /usr/include/wx-2.8/wx/imagtiff.h /usr/include/wx-2.8/wx/imagpnm.h \ + /usr/include/wx-2.8/wx/imagxpm.h /usr/include/wx-2.8/wx/imagiff.h \ + /usr/include/wx-2.8/wx/dc.h /usr/include/wx-2.8/wx/brush.h \ + /usr/include/wx-2.8/wx/gtk/brush.h /usr/include/wx-2.8/wx/pen.h \ + /usr/include/wx-2.8/wx/gtk/pen.h /usr/include/wx-2.8/wx/gtk/dc.h \ + /usr/include/wx-2.8/wx/dcgraph.h /usr/include/wx-2.8/wx/geometry.h \ + /usr/include/wx-2.8/wx/graphics.h /usr/include/wx-2.8/wx/dcclient.h \ + /usr/include/wx-2.8/wx/gtk/dcclient.h /usr/include/wx-2.8/wx/dcmemory.h \ + /usr/include/wx-2.8/wx/gtk/dcmemory.h /usr/include/wx-2.8/wx/dcprint.h \ + /usr/include/wx-2.8/wx/dcscreen.h /usr/include/wx-2.8/wx/gtk/dcscreen.h \ + /usr/include/wx-2.8/wx/button.h /usr/include/wx-2.8/wx/control.h \ + /usr/include/wx-2.8/wx/gtk/control.h /usr/include/wx-2.8/wx/gtk/button.h \ + /usr/include/wx-2.8/wx/menuitem.h /usr/include/wx-2.8/wx/gtk/menuitem.h \ + /usr/include/wx-2.8/wx/menu.h /usr/include/wx-2.8/wx/gtk/menu.h \ + /usr/include/wx-2.8/wx/icon.h /usr/include/wx-2.8/wx/iconloc.h \ + /usr/include/wx-2.8/wx/generic/icon.h /usr/include/wx-2.8/wx/dialog.h \ + /usr/include/wx-2.8/wx/gtk/dialog.h /usr/include/wx-2.8/wx/timer.h \ + /usr/include/wx-2.8/wx/gtk/timer.h /usr/include/wx-2.8/wx/settings.h \ + /usr/include/wx-2.8/wx/msgdlg.h /usr/include/wx-2.8/wx/gtk/msgdlg.h \ + /usr/include/wx-2.8/wx/cmndata.h /usr/include/wx-2.8/wx/encinfo.h \ + /usr/include/wx-2.8/wx/dataobj.h /usr/include/wx-2.8/wx/gtk/dataform.h \ + /usr/include/wx-2.8/wx/gtk/dataobj.h \ + /usr/include/wx-2.8/wx/gtk/dataobj2.h /usr/include/wx-2.8/wx/ctrlsub.h \ + /usr/include/wx-2.8/wx/bmpbuttn.h /usr/include/wx-2.8/wx/gtk/bmpbuttn.h \ + /usr/include/wx-2.8/wx/checkbox.h /usr/include/wx-2.8/wx/gtk/checkbox.h \ + /usr/include/wx-2.8/wx/checklst.h /usr/include/wx-2.8/wx/listbox.h \ + /usr/include/wx-2.8/wx/gtk/listbox.h \ + /usr/include/wx-2.8/wx/gtk/checklst.h /usr/include/wx-2.8/wx/choice.h \ + /usr/include/wx-2.8/wx/gtk/choice.h /usr/include/wx-2.8/wx/scrolbar.h \ + /usr/include/wx-2.8/wx/gtk/scrolbar.h /usr/include/wx-2.8/wx/stattext.h \ + /usr/include/wx-2.8/wx/gtk/stattext.h /usr/include/wx-2.8/wx/statbmp.h \ + /usr/include/wx-2.8/wx/gtk/statbmp.h /usr/include/wx-2.8/wx/statbox.h \ + /usr/include/wx-2.8/wx/gtk/statbox.h /usr/include/wx-2.8/wx/radiobox.h \ + /usr/include/wx-2.8/wx/gtk/radiobox.h /usr/include/wx-2.8/wx/radiobut.h \ + /usr/include/wx-2.8/wx/gtk/radiobut.h /usr/include/wx-2.8/wx/textctrl.h \ + /usr/include/wx-2.8/wx/ioswrap.h /usr/include/wx-2.8/wx/gtk/textctrl.h \ + /usr/include/wx-2.8/wx/slider.h /usr/include/wx-2.8/wx/gtk/slider.h \ + /usr/include/wx-2.8/wx/gauge.h /usr/include/wx-2.8/wx/gtk/gauge.h \ + /usr/include/wx-2.8/wx/scrolwin.h /usr/include/wx-2.8/wx/gtk/scrolwin.h \ + /usr/include/wx-2.8/wx/dirdlg.h /usr/include/wx-2.8/wx/gtk/dirdlg.h \ + /usr/include/wx-2.8/wx/generic/dirdlgg.h \ + /usr/include/wx-2.8/wx/toolbar.h /usr/include/wx-2.8/wx/tbarbase.h \ + /usr/include/wx-2.8/wx/gtk/tbargtk.h /usr/include/wx-2.8/wx/combobox.h \ + /usr/include/wx-2.8/wx/gtk/combobox.h /usr/include/wx-2.8/wx/layout.h \ + /usr/include/wx-2.8/wx/sizer.h /usr/include/wx-2.8/wx/mdi.h \ + /usr/include/wx-2.8/wx/gtk/mdi.h /usr/include/wx-2.8/wx/statusbr.h \ + /usr/include/wx-2.8/wx/generic/statusbr.h \ + /usr/include/wx-2.8/wx/choicdlg.h \ + /usr/include/wx-2.8/wx/generic/choicdgg.h \ + /usr/include/wx-2.8/wx/textdlg.h \ + /usr/include/wx-2.8/wx/generic/textdlgg.h \ + /usr/include/wx-2.8/wx/valtext.h /usr/include/wx-2.8/wx/filedlg.h \ + /usr/include/wx-2.8/wx/gtk/filedlg.h \ + /usr/include/wx-2.8/wx/generic/filedlgg.h \ + /usr/include/wx-2.8/wx/listctrl.h /usr/include/wx-2.8/wx/listbase.h \ + /usr/include/wx-2.8/wx/generic/listctrl.h ProgressDialog2Res.h \ + ../../../Windows/Control/DialogImpl.h ../../../Windows/Window.h \ + ../../../Windows/Defs.h ../../../Windows/../Common/MyWindows.h \ + ../../../Common/MyString.h ../../../Common/MyVector.h \ + ../../../Common/Defs.h ../../../Windows/Control/Dialog.h +MessagesDialog.o: MessagesDialog.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../../Common/IntToString.h \ + ../../../Windows/ResourceString.h ../../../Common/MyString.h \ + ../../../Common/MyVector.h ../../../Common/Defs.h MessagesDialog.h \ + ../../../Windows/Control/Dialog.h ../../../Windows/Window.h \ + ../../../Windows/Defs.h ../../../Windows/../Common/MyWindows.h \ + ../../../Windows/Control/ListView.h MessagesDialogRes.h LangUtils.h \ + ../../../Common/Lang.h ../../../Common/MyString.h +MessagesDialog_rc.o: MessagesDialog_rc.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h /usr/include/wx-2.8/wx/wxprec.h \ + /usr/include/wx-2.8/wx/defs.h /usr/include/wx-2.8/wx/platform.h \ + /usr/lib/wx/include/gtk2-unicode-release-2.8/wx/setup.h \ + /usr/include/wx-2.8/wx/chkconf.h /usr/include/wx-2.8/wx/features.h \ + /usr/include/wx-2.8/wx/version.h /usr/include/wx-2.8/wx/cpp.h \ + /usr/include/wx-2.8/wx/dlimpexp.h /usr/include/wx-2.8/wx/debug.h \ + /usr/include/wx-2.8/wx/wxchar.h /usr/include/wx-2.8/wx/wx.h \ + /usr/include/wx-2.8/wx/object.h /usr/include/wx-2.8/wx/memory.h \ + /usr/include/wx-2.8/wx/string.h /usr/include/wx-2.8/wx/buffer.h \ + /usr/include/wx-2.8/wx/strconv.h /usr/include/wx-2.8/wx/fontenc.h \ + /usr/include/wx-2.8/wx/beforestd.h /usr/include/wx-2.8/wx/afterstd.h \ + /usr/include/wx-2.8/wx/iosfwrap.h /usr/include/wx-2.8/wx/msgout.h \ + /usr/include/wx-2.8/wx/dynarray.h /usr/include/wx-2.8/wx/list.h \ + /usr/include/wx-2.8/wx/hash.h /usr/include/wx-2.8/wx/hashmap.h \ + /usr/include/wx-2.8/wx/arrstr.h /usr/include/wx-2.8/wx/intl.h \ + /usr/include/wx-2.8/wx/log.h /usr/include/wx-2.8/wx/generic/logg.h \ + /usr/include/wx-2.8/wx/event.h /usr/include/wx-2.8/wx/clntdata.h \ + /usr/include/wx-2.8/wx/vector.h /usr/include/wx-2.8/wx/gdicmn.h \ + /usr/include/wx-2.8/wx/math.h /usr/include/wx-2.8/wx/cursor.h \ + /usr/include/wx-2.8/wx/gtk/cursor.h /usr/include/wx-2.8/wx/utils.h \ + /usr/include/wx-2.8/wx/filefn.h /usr/include/wx-2.8/wx/longlong.h \ + /usr/include/wx-2.8/wx/platinfo.h /usr/include/wx-2.8/wx/thread.h \ + /usr/include/wx-2.8/wx/app.h /usr/include/wx-2.8/wx/build.h \ + /usr/include/wx-2.8/wx/init.h /usr/include/wx-2.8/wx/gtk/app.h \ + /usr/include/wx-2.8/wx/stream.h /usr/include/wx-2.8/wx/stopwatch.h \ + /usr/include/wx-2.8/wx/module.h /usr/include/wx-2.8/wx/window.h \ + /usr/include/wx-2.8/wx/font.h /usr/include/wx-2.8/wx/gdiobj.h \ + /usr/include/wx-2.8/wx/gtk/font.h /usr/include/wx-2.8/wx/colour.h \ + /usr/include/wx-2.8/wx/variant.h /usr/include/wx-2.8/wx/datetime.h \ + /usr/include/wx-2.8/wx/gtk/colour.h /usr/include/wx-2.8/wx/region.h \ + /usr/include/wx-2.8/wx/gtk/region.h /usr/include/wx-2.8/wx/validate.h \ + /usr/include/wx-2.8/wx/palette.h \ + /usr/include/wx-2.8/wx/generic/paletteg.h /usr/include/wx-2.8/wx/accel.h \ + /usr/include/wx-2.8/wx/gtk/accel.h \ + /usr/include/wx-2.8/wx/generic/accel.h \ + /usr/include/wx-2.8/wx/gtk/window.h /usr/include/wx-2.8/wx/containr.h \ + /usr/include/wx-2.8/wx/panel.h /usr/include/wx-2.8/wx/generic/panelg.h \ + /usr/include/wx-2.8/wx/toplevel.h /usr/include/wx-2.8/wx/iconbndl.h \ + /usr/include/wx-2.8/wx/gtk/toplevel.h /usr/include/wx-2.8/wx/frame.h \ + /usr/include/wx-2.8/wx/gtk/frame.h /usr/include/wx-2.8/wx/bitmap.h \ + /usr/include/wx-2.8/wx/gtk/bitmap.h /usr/include/wx-2.8/wx/image.h \ + /usr/include/wx-2.8/wx/imagbmp.h /usr/include/wx-2.8/wx/imagpng.h \ + /usr/include/wx-2.8/wx/imaggif.h /usr/include/wx-2.8/wx/imagpcx.h \ + /usr/include/wx-2.8/wx/imagjpeg.h /usr/include/wx-2.8/wx/imagtga.h \ + /usr/include/wx-2.8/wx/imagtiff.h /usr/include/wx-2.8/wx/imagpnm.h \ + /usr/include/wx-2.8/wx/imagxpm.h /usr/include/wx-2.8/wx/imagiff.h \ + /usr/include/wx-2.8/wx/dc.h /usr/include/wx-2.8/wx/brush.h \ + /usr/include/wx-2.8/wx/gtk/brush.h /usr/include/wx-2.8/wx/pen.h \ + /usr/include/wx-2.8/wx/gtk/pen.h /usr/include/wx-2.8/wx/gtk/dc.h \ + /usr/include/wx-2.8/wx/dcgraph.h /usr/include/wx-2.8/wx/geometry.h \ + /usr/include/wx-2.8/wx/graphics.h /usr/include/wx-2.8/wx/dcclient.h \ + /usr/include/wx-2.8/wx/gtk/dcclient.h /usr/include/wx-2.8/wx/dcmemory.h \ + /usr/include/wx-2.8/wx/gtk/dcmemory.h /usr/include/wx-2.8/wx/dcprint.h \ + /usr/include/wx-2.8/wx/dcscreen.h /usr/include/wx-2.8/wx/gtk/dcscreen.h \ + /usr/include/wx-2.8/wx/button.h /usr/include/wx-2.8/wx/control.h \ + /usr/include/wx-2.8/wx/gtk/control.h /usr/include/wx-2.8/wx/gtk/button.h \ + /usr/include/wx-2.8/wx/menuitem.h /usr/include/wx-2.8/wx/gtk/menuitem.h \ + /usr/include/wx-2.8/wx/menu.h /usr/include/wx-2.8/wx/gtk/menu.h \ + /usr/include/wx-2.8/wx/icon.h /usr/include/wx-2.8/wx/iconloc.h \ + /usr/include/wx-2.8/wx/generic/icon.h /usr/include/wx-2.8/wx/dialog.h \ + /usr/include/wx-2.8/wx/gtk/dialog.h /usr/include/wx-2.8/wx/timer.h \ + /usr/include/wx-2.8/wx/gtk/timer.h /usr/include/wx-2.8/wx/settings.h \ + /usr/include/wx-2.8/wx/msgdlg.h /usr/include/wx-2.8/wx/gtk/msgdlg.h \ + /usr/include/wx-2.8/wx/cmndata.h /usr/include/wx-2.8/wx/encinfo.h \ + /usr/include/wx-2.8/wx/dataobj.h /usr/include/wx-2.8/wx/gtk/dataform.h \ + /usr/include/wx-2.8/wx/gtk/dataobj.h \ + /usr/include/wx-2.8/wx/gtk/dataobj2.h /usr/include/wx-2.8/wx/ctrlsub.h \ + /usr/include/wx-2.8/wx/bmpbuttn.h /usr/include/wx-2.8/wx/gtk/bmpbuttn.h \ + /usr/include/wx-2.8/wx/checkbox.h /usr/include/wx-2.8/wx/gtk/checkbox.h \ + /usr/include/wx-2.8/wx/checklst.h /usr/include/wx-2.8/wx/listbox.h \ + /usr/include/wx-2.8/wx/gtk/listbox.h \ + /usr/include/wx-2.8/wx/gtk/checklst.h /usr/include/wx-2.8/wx/choice.h \ + /usr/include/wx-2.8/wx/gtk/choice.h /usr/include/wx-2.8/wx/scrolbar.h \ + /usr/include/wx-2.8/wx/gtk/scrolbar.h /usr/include/wx-2.8/wx/stattext.h \ + /usr/include/wx-2.8/wx/gtk/stattext.h /usr/include/wx-2.8/wx/statbmp.h \ + /usr/include/wx-2.8/wx/gtk/statbmp.h /usr/include/wx-2.8/wx/statbox.h \ + /usr/include/wx-2.8/wx/gtk/statbox.h /usr/include/wx-2.8/wx/radiobox.h \ + /usr/include/wx-2.8/wx/gtk/radiobox.h /usr/include/wx-2.8/wx/radiobut.h \ + /usr/include/wx-2.8/wx/gtk/radiobut.h /usr/include/wx-2.8/wx/textctrl.h \ + /usr/include/wx-2.8/wx/ioswrap.h /usr/include/wx-2.8/wx/gtk/textctrl.h \ + /usr/include/wx-2.8/wx/slider.h /usr/include/wx-2.8/wx/gtk/slider.h \ + /usr/include/wx-2.8/wx/gauge.h /usr/include/wx-2.8/wx/gtk/gauge.h \ + /usr/include/wx-2.8/wx/scrolwin.h /usr/include/wx-2.8/wx/gtk/scrolwin.h \ + /usr/include/wx-2.8/wx/dirdlg.h /usr/include/wx-2.8/wx/gtk/dirdlg.h \ + /usr/include/wx-2.8/wx/generic/dirdlgg.h \ + /usr/include/wx-2.8/wx/toolbar.h /usr/include/wx-2.8/wx/tbarbase.h \ + /usr/include/wx-2.8/wx/gtk/tbargtk.h /usr/include/wx-2.8/wx/combobox.h \ + /usr/include/wx-2.8/wx/gtk/combobox.h /usr/include/wx-2.8/wx/layout.h \ + /usr/include/wx-2.8/wx/sizer.h /usr/include/wx-2.8/wx/mdi.h \ + /usr/include/wx-2.8/wx/gtk/mdi.h /usr/include/wx-2.8/wx/statusbr.h \ + /usr/include/wx-2.8/wx/generic/statusbr.h \ + /usr/include/wx-2.8/wx/choicdlg.h \ + /usr/include/wx-2.8/wx/generic/choicdgg.h \ + /usr/include/wx-2.8/wx/textdlg.h \ + /usr/include/wx-2.8/wx/generic/textdlgg.h \ + /usr/include/wx-2.8/wx/valtext.h /usr/include/wx-2.8/wx/filedlg.h \ + /usr/include/wx-2.8/wx/gtk/filedlg.h \ + /usr/include/wx-2.8/wx/generic/filedlgg.h \ + /usr/include/wx-2.8/wx/listctrl.h /usr/include/wx-2.8/wx/listbase.h \ + /usr/include/wx-2.8/wx/generic/listctrl.h \ + ../../../Windows/Control/DialogImpl.h ../../../Windows/Window.h \ + ../../../Windows/Defs.h ../../../Windows/../Common/MyWindows.h \ + ../../../Common/MyString.h ../../../Common/MyVector.h \ + ../../../Common/Defs.h ../../../Windows/Control/Dialog.h \ + MessagesDialogRes.h +ComboDialog.o: ComboDialog.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ComboDialog.h \ + ../../../Windows/Control/ComboBox.h ../../../Windows/Window.h \ + ../../../Windows/Defs.h ../../../Windows/../Common/MyWindows.h \ + ../../../Common/MyString.h ../../../Common/MyVector.h \ + ../../../Common/Defs.h ../../../Windows/Control/Window2.h \ + ../../../Windows/Control/Dialog.h ComboDialogRes.h \ + ../../../Windows/Control/Static.h LangUtils.h ../../../Common/Lang.h \ + ../../../Common/MyString.h ../../../Windows/ResourceString.h +ComboDialog_rc.o: ComboDialog_rc.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h /usr/include/wx-2.8/wx/wxprec.h \ + /usr/include/wx-2.8/wx/defs.h /usr/include/wx-2.8/wx/platform.h \ + /usr/lib/wx/include/gtk2-unicode-release-2.8/wx/setup.h \ + /usr/include/wx-2.8/wx/chkconf.h /usr/include/wx-2.8/wx/features.h \ + /usr/include/wx-2.8/wx/version.h /usr/include/wx-2.8/wx/cpp.h \ + /usr/include/wx-2.8/wx/dlimpexp.h /usr/include/wx-2.8/wx/debug.h \ + /usr/include/wx-2.8/wx/wxchar.h /usr/include/wx-2.8/wx/wx.h \ + /usr/include/wx-2.8/wx/object.h /usr/include/wx-2.8/wx/memory.h \ + /usr/include/wx-2.8/wx/string.h /usr/include/wx-2.8/wx/buffer.h \ + /usr/include/wx-2.8/wx/strconv.h /usr/include/wx-2.8/wx/fontenc.h \ + /usr/include/wx-2.8/wx/beforestd.h /usr/include/wx-2.8/wx/afterstd.h \ + /usr/include/wx-2.8/wx/iosfwrap.h /usr/include/wx-2.8/wx/msgout.h \ + /usr/include/wx-2.8/wx/dynarray.h /usr/include/wx-2.8/wx/list.h \ + /usr/include/wx-2.8/wx/hash.h /usr/include/wx-2.8/wx/hashmap.h \ + /usr/include/wx-2.8/wx/arrstr.h /usr/include/wx-2.8/wx/intl.h \ + /usr/include/wx-2.8/wx/log.h /usr/include/wx-2.8/wx/generic/logg.h \ + /usr/include/wx-2.8/wx/event.h /usr/include/wx-2.8/wx/clntdata.h \ + /usr/include/wx-2.8/wx/vector.h /usr/include/wx-2.8/wx/gdicmn.h \ + /usr/include/wx-2.8/wx/math.h /usr/include/wx-2.8/wx/cursor.h \ + /usr/include/wx-2.8/wx/gtk/cursor.h /usr/include/wx-2.8/wx/utils.h \ + /usr/include/wx-2.8/wx/filefn.h /usr/include/wx-2.8/wx/longlong.h \ + /usr/include/wx-2.8/wx/platinfo.h /usr/include/wx-2.8/wx/thread.h \ + /usr/include/wx-2.8/wx/app.h /usr/include/wx-2.8/wx/build.h \ + /usr/include/wx-2.8/wx/init.h /usr/include/wx-2.8/wx/gtk/app.h \ + /usr/include/wx-2.8/wx/stream.h /usr/include/wx-2.8/wx/stopwatch.h \ + /usr/include/wx-2.8/wx/module.h /usr/include/wx-2.8/wx/window.h \ + /usr/include/wx-2.8/wx/font.h /usr/include/wx-2.8/wx/gdiobj.h \ + /usr/include/wx-2.8/wx/gtk/font.h /usr/include/wx-2.8/wx/colour.h \ + /usr/include/wx-2.8/wx/variant.h /usr/include/wx-2.8/wx/datetime.h \ + /usr/include/wx-2.8/wx/gtk/colour.h /usr/include/wx-2.8/wx/region.h \ + /usr/include/wx-2.8/wx/gtk/region.h /usr/include/wx-2.8/wx/validate.h \ + /usr/include/wx-2.8/wx/palette.h \ + /usr/include/wx-2.8/wx/generic/paletteg.h /usr/include/wx-2.8/wx/accel.h \ + /usr/include/wx-2.8/wx/gtk/accel.h \ + /usr/include/wx-2.8/wx/generic/accel.h \ + /usr/include/wx-2.8/wx/gtk/window.h /usr/include/wx-2.8/wx/containr.h \ + /usr/include/wx-2.8/wx/panel.h /usr/include/wx-2.8/wx/generic/panelg.h \ + /usr/include/wx-2.8/wx/toplevel.h /usr/include/wx-2.8/wx/iconbndl.h \ + /usr/include/wx-2.8/wx/gtk/toplevel.h /usr/include/wx-2.8/wx/frame.h \ + /usr/include/wx-2.8/wx/gtk/frame.h /usr/include/wx-2.8/wx/bitmap.h \ + /usr/include/wx-2.8/wx/gtk/bitmap.h /usr/include/wx-2.8/wx/image.h \ + /usr/include/wx-2.8/wx/imagbmp.h /usr/include/wx-2.8/wx/imagpng.h \ + /usr/include/wx-2.8/wx/imaggif.h /usr/include/wx-2.8/wx/imagpcx.h \ + /usr/include/wx-2.8/wx/imagjpeg.h /usr/include/wx-2.8/wx/imagtga.h \ + /usr/include/wx-2.8/wx/imagtiff.h /usr/include/wx-2.8/wx/imagpnm.h \ + /usr/include/wx-2.8/wx/imagxpm.h /usr/include/wx-2.8/wx/imagiff.h \ + /usr/include/wx-2.8/wx/dc.h /usr/include/wx-2.8/wx/brush.h \ + /usr/include/wx-2.8/wx/gtk/brush.h /usr/include/wx-2.8/wx/pen.h \ + /usr/include/wx-2.8/wx/gtk/pen.h /usr/include/wx-2.8/wx/gtk/dc.h \ + /usr/include/wx-2.8/wx/dcgraph.h /usr/include/wx-2.8/wx/geometry.h \ + /usr/include/wx-2.8/wx/graphics.h /usr/include/wx-2.8/wx/dcclient.h \ + /usr/include/wx-2.8/wx/gtk/dcclient.h /usr/include/wx-2.8/wx/dcmemory.h \ + /usr/include/wx-2.8/wx/gtk/dcmemory.h /usr/include/wx-2.8/wx/dcprint.h \ + /usr/include/wx-2.8/wx/dcscreen.h /usr/include/wx-2.8/wx/gtk/dcscreen.h \ + /usr/include/wx-2.8/wx/button.h /usr/include/wx-2.8/wx/control.h \ + /usr/include/wx-2.8/wx/gtk/control.h /usr/include/wx-2.8/wx/gtk/button.h \ + /usr/include/wx-2.8/wx/menuitem.h /usr/include/wx-2.8/wx/gtk/menuitem.h \ + /usr/include/wx-2.8/wx/menu.h /usr/include/wx-2.8/wx/gtk/menu.h \ + /usr/include/wx-2.8/wx/icon.h /usr/include/wx-2.8/wx/iconloc.h \ + /usr/include/wx-2.8/wx/generic/icon.h /usr/include/wx-2.8/wx/dialog.h \ + /usr/include/wx-2.8/wx/gtk/dialog.h /usr/include/wx-2.8/wx/timer.h \ + /usr/include/wx-2.8/wx/gtk/timer.h /usr/include/wx-2.8/wx/settings.h \ + /usr/include/wx-2.8/wx/msgdlg.h /usr/include/wx-2.8/wx/gtk/msgdlg.h \ + /usr/include/wx-2.8/wx/cmndata.h /usr/include/wx-2.8/wx/encinfo.h \ + /usr/include/wx-2.8/wx/dataobj.h /usr/include/wx-2.8/wx/gtk/dataform.h \ + /usr/include/wx-2.8/wx/gtk/dataobj.h \ + /usr/include/wx-2.8/wx/gtk/dataobj2.h /usr/include/wx-2.8/wx/ctrlsub.h \ + /usr/include/wx-2.8/wx/bmpbuttn.h /usr/include/wx-2.8/wx/gtk/bmpbuttn.h \ + /usr/include/wx-2.8/wx/checkbox.h /usr/include/wx-2.8/wx/gtk/checkbox.h \ + /usr/include/wx-2.8/wx/checklst.h /usr/include/wx-2.8/wx/listbox.h \ + /usr/include/wx-2.8/wx/gtk/listbox.h \ + /usr/include/wx-2.8/wx/gtk/checklst.h /usr/include/wx-2.8/wx/choice.h \ + /usr/include/wx-2.8/wx/gtk/choice.h /usr/include/wx-2.8/wx/scrolbar.h \ + /usr/include/wx-2.8/wx/gtk/scrolbar.h /usr/include/wx-2.8/wx/stattext.h \ + /usr/include/wx-2.8/wx/gtk/stattext.h /usr/include/wx-2.8/wx/statbmp.h \ + /usr/include/wx-2.8/wx/gtk/statbmp.h /usr/include/wx-2.8/wx/statbox.h \ + /usr/include/wx-2.8/wx/gtk/statbox.h /usr/include/wx-2.8/wx/radiobox.h \ + /usr/include/wx-2.8/wx/gtk/radiobox.h /usr/include/wx-2.8/wx/radiobut.h \ + /usr/include/wx-2.8/wx/gtk/radiobut.h /usr/include/wx-2.8/wx/textctrl.h \ + /usr/include/wx-2.8/wx/ioswrap.h /usr/include/wx-2.8/wx/gtk/textctrl.h \ + /usr/include/wx-2.8/wx/slider.h /usr/include/wx-2.8/wx/gtk/slider.h \ + /usr/include/wx-2.8/wx/gauge.h /usr/include/wx-2.8/wx/gtk/gauge.h \ + /usr/include/wx-2.8/wx/scrolwin.h /usr/include/wx-2.8/wx/gtk/scrolwin.h \ + /usr/include/wx-2.8/wx/dirdlg.h /usr/include/wx-2.8/wx/gtk/dirdlg.h \ + /usr/include/wx-2.8/wx/generic/dirdlgg.h \ + /usr/include/wx-2.8/wx/toolbar.h /usr/include/wx-2.8/wx/tbarbase.h \ + /usr/include/wx-2.8/wx/gtk/tbargtk.h /usr/include/wx-2.8/wx/combobox.h \ + /usr/include/wx-2.8/wx/gtk/combobox.h /usr/include/wx-2.8/wx/layout.h \ + /usr/include/wx-2.8/wx/sizer.h /usr/include/wx-2.8/wx/mdi.h \ + /usr/include/wx-2.8/wx/gtk/mdi.h /usr/include/wx-2.8/wx/statusbr.h \ + /usr/include/wx-2.8/wx/generic/statusbr.h \ + /usr/include/wx-2.8/wx/choicdlg.h \ + /usr/include/wx-2.8/wx/generic/choicdgg.h \ + /usr/include/wx-2.8/wx/textdlg.h \ + /usr/include/wx-2.8/wx/generic/textdlgg.h \ + /usr/include/wx-2.8/wx/valtext.h /usr/include/wx-2.8/wx/filedlg.h \ + /usr/include/wx-2.8/wx/gtk/filedlg.h \ + /usr/include/wx-2.8/wx/generic/filedlgg.h \ + /usr/include/wx-2.8/wx/listctrl.h /usr/include/wx-2.8/wx/listbase.h \ + /usr/include/wx-2.8/wx/generic/listctrl.h \ + ../../../Windows/Control/DialogImpl.h ../../../Windows/Window.h \ + ../../../Windows/Defs.h ../../../Windows/../Common/MyWindows.h \ + ../../../Common/MyString.h ../../../Common/MyVector.h \ + ../../../Common/Defs.h ../../../Windows/Control/Dialog.h \ + ComboDialogRes.h +OverwriteDialog.o: OverwriteDialog.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../../Common/StringConvert.h \ + ../../../Common/MyWindows.h ../../../Common/MyString.h \ + ../../../Common/MyVector.h ../../../Common/Defs.h \ + ../../../Windows/FileName.h ../../../Windows/../../C/Types.h \ + ../../../Windows/../Common/MyString.h ../../../Windows/Defs.h \ + ../../../Windows/../Common/MyWindows.h ../../../Windows/ResourceString.h \ + ../../../Common/MyString.h ../../../Windows/Control/Static.h \ + ../../../Windows/Window.h ../../../Windows/PropVariantConversions.h \ + FormatUtils.h OverwriteDialog.h ../../../Windows/Control/Dialog.h \ + DialogSize.h OverwriteDialogRes.h LangUtils.h ../../../Common/Lang.h +OverwriteDialog_rc.o: OverwriteDialog_rc.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h /usr/include/wx-2.8/wx/wxprec.h \ + /usr/include/wx-2.8/wx/defs.h /usr/include/wx-2.8/wx/platform.h \ + /usr/lib/wx/include/gtk2-unicode-release-2.8/wx/setup.h \ + /usr/include/wx-2.8/wx/chkconf.h /usr/include/wx-2.8/wx/features.h \ + /usr/include/wx-2.8/wx/version.h /usr/include/wx-2.8/wx/cpp.h \ + /usr/include/wx-2.8/wx/dlimpexp.h /usr/include/wx-2.8/wx/debug.h \ + /usr/include/wx-2.8/wx/wxchar.h /usr/include/wx-2.8/wx/wx.h \ + /usr/include/wx-2.8/wx/object.h /usr/include/wx-2.8/wx/memory.h \ + /usr/include/wx-2.8/wx/string.h /usr/include/wx-2.8/wx/buffer.h \ + /usr/include/wx-2.8/wx/strconv.h /usr/include/wx-2.8/wx/fontenc.h \ + /usr/include/wx-2.8/wx/beforestd.h /usr/include/wx-2.8/wx/afterstd.h \ + /usr/include/wx-2.8/wx/iosfwrap.h /usr/include/wx-2.8/wx/msgout.h \ + /usr/include/wx-2.8/wx/dynarray.h /usr/include/wx-2.8/wx/list.h \ + /usr/include/wx-2.8/wx/hash.h /usr/include/wx-2.8/wx/hashmap.h \ + /usr/include/wx-2.8/wx/arrstr.h /usr/include/wx-2.8/wx/intl.h \ + /usr/include/wx-2.8/wx/log.h /usr/include/wx-2.8/wx/generic/logg.h \ + /usr/include/wx-2.8/wx/event.h /usr/include/wx-2.8/wx/clntdata.h \ + /usr/include/wx-2.8/wx/vector.h /usr/include/wx-2.8/wx/gdicmn.h \ + /usr/include/wx-2.8/wx/math.h /usr/include/wx-2.8/wx/cursor.h \ + /usr/include/wx-2.8/wx/gtk/cursor.h /usr/include/wx-2.8/wx/utils.h \ + /usr/include/wx-2.8/wx/filefn.h /usr/include/wx-2.8/wx/longlong.h \ + /usr/include/wx-2.8/wx/platinfo.h /usr/include/wx-2.8/wx/thread.h \ + /usr/include/wx-2.8/wx/app.h /usr/include/wx-2.8/wx/build.h \ + /usr/include/wx-2.8/wx/init.h /usr/include/wx-2.8/wx/gtk/app.h \ + /usr/include/wx-2.8/wx/stream.h /usr/include/wx-2.8/wx/stopwatch.h \ + /usr/include/wx-2.8/wx/module.h /usr/include/wx-2.8/wx/window.h \ + /usr/include/wx-2.8/wx/font.h /usr/include/wx-2.8/wx/gdiobj.h \ + /usr/include/wx-2.8/wx/gtk/font.h /usr/include/wx-2.8/wx/colour.h \ + /usr/include/wx-2.8/wx/variant.h /usr/include/wx-2.8/wx/datetime.h \ + /usr/include/wx-2.8/wx/gtk/colour.h /usr/include/wx-2.8/wx/region.h \ + /usr/include/wx-2.8/wx/gtk/region.h /usr/include/wx-2.8/wx/validate.h \ + /usr/include/wx-2.8/wx/palette.h \ + /usr/include/wx-2.8/wx/generic/paletteg.h /usr/include/wx-2.8/wx/accel.h \ + /usr/include/wx-2.8/wx/gtk/accel.h \ + /usr/include/wx-2.8/wx/generic/accel.h \ + /usr/include/wx-2.8/wx/gtk/window.h /usr/include/wx-2.8/wx/containr.h \ + /usr/include/wx-2.8/wx/panel.h /usr/include/wx-2.8/wx/generic/panelg.h \ + /usr/include/wx-2.8/wx/toplevel.h /usr/include/wx-2.8/wx/iconbndl.h \ + /usr/include/wx-2.8/wx/gtk/toplevel.h /usr/include/wx-2.8/wx/frame.h \ + /usr/include/wx-2.8/wx/gtk/frame.h /usr/include/wx-2.8/wx/bitmap.h \ + /usr/include/wx-2.8/wx/gtk/bitmap.h /usr/include/wx-2.8/wx/image.h \ + /usr/include/wx-2.8/wx/imagbmp.h /usr/include/wx-2.8/wx/imagpng.h \ + /usr/include/wx-2.8/wx/imaggif.h /usr/include/wx-2.8/wx/imagpcx.h \ + /usr/include/wx-2.8/wx/imagjpeg.h /usr/include/wx-2.8/wx/imagtga.h \ + /usr/include/wx-2.8/wx/imagtiff.h /usr/include/wx-2.8/wx/imagpnm.h \ + /usr/include/wx-2.8/wx/imagxpm.h /usr/include/wx-2.8/wx/imagiff.h \ + /usr/include/wx-2.8/wx/dc.h /usr/include/wx-2.8/wx/brush.h \ + /usr/include/wx-2.8/wx/gtk/brush.h /usr/include/wx-2.8/wx/pen.h \ + /usr/include/wx-2.8/wx/gtk/pen.h /usr/include/wx-2.8/wx/gtk/dc.h \ + /usr/include/wx-2.8/wx/dcgraph.h /usr/include/wx-2.8/wx/geometry.h \ + /usr/include/wx-2.8/wx/graphics.h /usr/include/wx-2.8/wx/dcclient.h \ + /usr/include/wx-2.8/wx/gtk/dcclient.h /usr/include/wx-2.8/wx/dcmemory.h \ + /usr/include/wx-2.8/wx/gtk/dcmemory.h /usr/include/wx-2.8/wx/dcprint.h \ + /usr/include/wx-2.8/wx/dcscreen.h /usr/include/wx-2.8/wx/gtk/dcscreen.h \ + /usr/include/wx-2.8/wx/button.h /usr/include/wx-2.8/wx/control.h \ + /usr/include/wx-2.8/wx/gtk/control.h /usr/include/wx-2.8/wx/gtk/button.h \ + /usr/include/wx-2.8/wx/menuitem.h /usr/include/wx-2.8/wx/gtk/menuitem.h \ + /usr/include/wx-2.8/wx/menu.h /usr/include/wx-2.8/wx/gtk/menu.h \ + /usr/include/wx-2.8/wx/icon.h /usr/include/wx-2.8/wx/iconloc.h \ + /usr/include/wx-2.8/wx/generic/icon.h /usr/include/wx-2.8/wx/dialog.h \ + /usr/include/wx-2.8/wx/gtk/dialog.h /usr/include/wx-2.8/wx/timer.h \ + /usr/include/wx-2.8/wx/gtk/timer.h /usr/include/wx-2.8/wx/settings.h \ + /usr/include/wx-2.8/wx/msgdlg.h /usr/include/wx-2.8/wx/gtk/msgdlg.h \ + /usr/include/wx-2.8/wx/cmndata.h /usr/include/wx-2.8/wx/encinfo.h \ + /usr/include/wx-2.8/wx/dataobj.h /usr/include/wx-2.8/wx/gtk/dataform.h \ + /usr/include/wx-2.8/wx/gtk/dataobj.h \ + /usr/include/wx-2.8/wx/gtk/dataobj2.h /usr/include/wx-2.8/wx/ctrlsub.h \ + /usr/include/wx-2.8/wx/bmpbuttn.h /usr/include/wx-2.8/wx/gtk/bmpbuttn.h \ + /usr/include/wx-2.8/wx/checkbox.h /usr/include/wx-2.8/wx/gtk/checkbox.h \ + /usr/include/wx-2.8/wx/checklst.h /usr/include/wx-2.8/wx/listbox.h \ + /usr/include/wx-2.8/wx/gtk/listbox.h \ + /usr/include/wx-2.8/wx/gtk/checklst.h /usr/include/wx-2.8/wx/choice.h \ + /usr/include/wx-2.8/wx/gtk/choice.h /usr/include/wx-2.8/wx/scrolbar.h \ + /usr/include/wx-2.8/wx/gtk/scrolbar.h /usr/include/wx-2.8/wx/stattext.h \ + /usr/include/wx-2.8/wx/gtk/stattext.h /usr/include/wx-2.8/wx/statbmp.h \ + /usr/include/wx-2.8/wx/gtk/statbmp.h /usr/include/wx-2.8/wx/statbox.h \ + /usr/include/wx-2.8/wx/gtk/statbox.h /usr/include/wx-2.8/wx/radiobox.h \ + /usr/include/wx-2.8/wx/gtk/radiobox.h /usr/include/wx-2.8/wx/radiobut.h \ + /usr/include/wx-2.8/wx/gtk/radiobut.h /usr/include/wx-2.8/wx/textctrl.h \ + /usr/include/wx-2.8/wx/ioswrap.h /usr/include/wx-2.8/wx/gtk/textctrl.h \ + /usr/include/wx-2.8/wx/slider.h /usr/include/wx-2.8/wx/gtk/slider.h \ + /usr/include/wx-2.8/wx/gauge.h /usr/include/wx-2.8/wx/gtk/gauge.h \ + /usr/include/wx-2.8/wx/scrolwin.h /usr/include/wx-2.8/wx/gtk/scrolwin.h \ + /usr/include/wx-2.8/wx/dirdlg.h /usr/include/wx-2.8/wx/gtk/dirdlg.h \ + /usr/include/wx-2.8/wx/generic/dirdlgg.h \ + /usr/include/wx-2.8/wx/toolbar.h /usr/include/wx-2.8/wx/tbarbase.h \ + /usr/include/wx-2.8/wx/gtk/tbargtk.h /usr/include/wx-2.8/wx/combobox.h \ + /usr/include/wx-2.8/wx/gtk/combobox.h /usr/include/wx-2.8/wx/layout.h \ + /usr/include/wx-2.8/wx/sizer.h /usr/include/wx-2.8/wx/mdi.h \ + /usr/include/wx-2.8/wx/gtk/mdi.h /usr/include/wx-2.8/wx/statusbr.h \ + /usr/include/wx-2.8/wx/generic/statusbr.h \ + /usr/include/wx-2.8/wx/choicdlg.h \ + /usr/include/wx-2.8/wx/generic/choicdgg.h \ + /usr/include/wx-2.8/wx/textdlg.h \ + /usr/include/wx-2.8/wx/generic/textdlgg.h \ + /usr/include/wx-2.8/wx/valtext.h /usr/include/wx-2.8/wx/filedlg.h \ + /usr/include/wx-2.8/wx/gtk/filedlg.h \ + /usr/include/wx-2.8/wx/generic/filedlgg.h \ + /usr/include/wx-2.8/wx/listctrl.h /usr/include/wx-2.8/wx/listbase.h \ + /usr/include/wx-2.8/wx/generic/listctrl.h OverwriteDialogRes.h \ + ../../../Windows/Control/DialogImpl.h ../../../Windows/Window.h \ + ../../../Windows/Defs.h ../../../Windows/../Common/MyWindows.h \ + ../../../Common/MyString.h ../../../Common/MyVector.h \ + ../../../Common/Defs.h ../../../Windows/Control/Dialog.h +PasswordDialog.o: PasswordDialog.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h PasswordDialog.h \ + ../../../Windows/Control/Dialog.h ../../../Windows/Window.h \ + ../../../Windows/Defs.h ../../../Windows/../Common/MyWindows.h \ + ../../../Common/MyString.h ../../../Common/MyVector.h \ + ../../../Common/Defs.h ../../../Windows/Control/Edit.h \ + PasswordDialogRes.h LangUtils.h ../../../Common/Lang.h \ + ../../../Common/MyString.h ../../../Windows/ResourceString.h +PasswordDialog_rc.o: PasswordDialog_rc.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h /usr/include/wx-2.8/wx/wxprec.h \ + /usr/include/wx-2.8/wx/defs.h /usr/include/wx-2.8/wx/platform.h \ + /usr/lib/wx/include/gtk2-unicode-release-2.8/wx/setup.h \ + /usr/include/wx-2.8/wx/chkconf.h /usr/include/wx-2.8/wx/features.h \ + /usr/include/wx-2.8/wx/version.h /usr/include/wx-2.8/wx/cpp.h \ + /usr/include/wx-2.8/wx/dlimpexp.h /usr/include/wx-2.8/wx/debug.h \ + /usr/include/wx-2.8/wx/wxchar.h /usr/include/wx-2.8/wx/wx.h \ + /usr/include/wx-2.8/wx/object.h /usr/include/wx-2.8/wx/memory.h \ + /usr/include/wx-2.8/wx/string.h /usr/include/wx-2.8/wx/buffer.h \ + /usr/include/wx-2.8/wx/strconv.h /usr/include/wx-2.8/wx/fontenc.h \ + /usr/include/wx-2.8/wx/beforestd.h /usr/include/wx-2.8/wx/afterstd.h \ + /usr/include/wx-2.8/wx/iosfwrap.h /usr/include/wx-2.8/wx/msgout.h \ + /usr/include/wx-2.8/wx/dynarray.h /usr/include/wx-2.8/wx/list.h \ + /usr/include/wx-2.8/wx/hash.h /usr/include/wx-2.8/wx/hashmap.h \ + /usr/include/wx-2.8/wx/arrstr.h /usr/include/wx-2.8/wx/intl.h \ + /usr/include/wx-2.8/wx/log.h /usr/include/wx-2.8/wx/generic/logg.h \ + /usr/include/wx-2.8/wx/event.h /usr/include/wx-2.8/wx/clntdata.h \ + /usr/include/wx-2.8/wx/vector.h /usr/include/wx-2.8/wx/gdicmn.h \ + /usr/include/wx-2.8/wx/math.h /usr/include/wx-2.8/wx/cursor.h \ + /usr/include/wx-2.8/wx/gtk/cursor.h /usr/include/wx-2.8/wx/utils.h \ + /usr/include/wx-2.8/wx/filefn.h /usr/include/wx-2.8/wx/longlong.h \ + /usr/include/wx-2.8/wx/platinfo.h /usr/include/wx-2.8/wx/thread.h \ + /usr/include/wx-2.8/wx/app.h /usr/include/wx-2.8/wx/build.h \ + /usr/include/wx-2.8/wx/init.h /usr/include/wx-2.8/wx/gtk/app.h \ + /usr/include/wx-2.8/wx/stream.h /usr/include/wx-2.8/wx/stopwatch.h \ + /usr/include/wx-2.8/wx/module.h /usr/include/wx-2.8/wx/window.h \ + /usr/include/wx-2.8/wx/font.h /usr/include/wx-2.8/wx/gdiobj.h \ + /usr/include/wx-2.8/wx/gtk/font.h /usr/include/wx-2.8/wx/colour.h \ + /usr/include/wx-2.8/wx/variant.h /usr/include/wx-2.8/wx/datetime.h \ + /usr/include/wx-2.8/wx/gtk/colour.h /usr/include/wx-2.8/wx/region.h \ + /usr/include/wx-2.8/wx/gtk/region.h /usr/include/wx-2.8/wx/validate.h \ + /usr/include/wx-2.8/wx/palette.h \ + /usr/include/wx-2.8/wx/generic/paletteg.h /usr/include/wx-2.8/wx/accel.h \ + /usr/include/wx-2.8/wx/gtk/accel.h \ + /usr/include/wx-2.8/wx/generic/accel.h \ + /usr/include/wx-2.8/wx/gtk/window.h /usr/include/wx-2.8/wx/containr.h \ + /usr/include/wx-2.8/wx/panel.h /usr/include/wx-2.8/wx/generic/panelg.h \ + /usr/include/wx-2.8/wx/toplevel.h /usr/include/wx-2.8/wx/iconbndl.h \ + /usr/include/wx-2.8/wx/gtk/toplevel.h /usr/include/wx-2.8/wx/frame.h \ + /usr/include/wx-2.8/wx/gtk/frame.h /usr/include/wx-2.8/wx/bitmap.h \ + /usr/include/wx-2.8/wx/gtk/bitmap.h /usr/include/wx-2.8/wx/image.h \ + /usr/include/wx-2.8/wx/imagbmp.h /usr/include/wx-2.8/wx/imagpng.h \ + /usr/include/wx-2.8/wx/imaggif.h /usr/include/wx-2.8/wx/imagpcx.h \ + /usr/include/wx-2.8/wx/imagjpeg.h /usr/include/wx-2.8/wx/imagtga.h \ + /usr/include/wx-2.8/wx/imagtiff.h /usr/include/wx-2.8/wx/imagpnm.h \ + /usr/include/wx-2.8/wx/imagxpm.h /usr/include/wx-2.8/wx/imagiff.h \ + /usr/include/wx-2.8/wx/dc.h /usr/include/wx-2.8/wx/brush.h \ + /usr/include/wx-2.8/wx/gtk/brush.h /usr/include/wx-2.8/wx/pen.h \ + /usr/include/wx-2.8/wx/gtk/pen.h /usr/include/wx-2.8/wx/gtk/dc.h \ + /usr/include/wx-2.8/wx/dcgraph.h /usr/include/wx-2.8/wx/geometry.h \ + /usr/include/wx-2.8/wx/graphics.h /usr/include/wx-2.8/wx/dcclient.h \ + /usr/include/wx-2.8/wx/gtk/dcclient.h /usr/include/wx-2.8/wx/dcmemory.h \ + /usr/include/wx-2.8/wx/gtk/dcmemory.h /usr/include/wx-2.8/wx/dcprint.h \ + /usr/include/wx-2.8/wx/dcscreen.h /usr/include/wx-2.8/wx/gtk/dcscreen.h \ + /usr/include/wx-2.8/wx/button.h /usr/include/wx-2.8/wx/control.h \ + /usr/include/wx-2.8/wx/gtk/control.h /usr/include/wx-2.8/wx/gtk/button.h \ + /usr/include/wx-2.8/wx/menuitem.h /usr/include/wx-2.8/wx/gtk/menuitem.h \ + /usr/include/wx-2.8/wx/menu.h /usr/include/wx-2.8/wx/gtk/menu.h \ + /usr/include/wx-2.8/wx/icon.h /usr/include/wx-2.8/wx/iconloc.h \ + /usr/include/wx-2.8/wx/generic/icon.h /usr/include/wx-2.8/wx/dialog.h \ + /usr/include/wx-2.8/wx/gtk/dialog.h /usr/include/wx-2.8/wx/timer.h \ + /usr/include/wx-2.8/wx/gtk/timer.h /usr/include/wx-2.8/wx/settings.h \ + /usr/include/wx-2.8/wx/msgdlg.h /usr/include/wx-2.8/wx/gtk/msgdlg.h \ + /usr/include/wx-2.8/wx/cmndata.h /usr/include/wx-2.8/wx/encinfo.h \ + /usr/include/wx-2.8/wx/dataobj.h /usr/include/wx-2.8/wx/gtk/dataform.h \ + /usr/include/wx-2.8/wx/gtk/dataobj.h \ + /usr/include/wx-2.8/wx/gtk/dataobj2.h /usr/include/wx-2.8/wx/ctrlsub.h \ + /usr/include/wx-2.8/wx/bmpbuttn.h /usr/include/wx-2.8/wx/gtk/bmpbuttn.h \ + /usr/include/wx-2.8/wx/checkbox.h /usr/include/wx-2.8/wx/gtk/checkbox.h \ + /usr/include/wx-2.8/wx/checklst.h /usr/include/wx-2.8/wx/listbox.h \ + /usr/include/wx-2.8/wx/gtk/listbox.h \ + /usr/include/wx-2.8/wx/gtk/checklst.h /usr/include/wx-2.8/wx/choice.h \ + /usr/include/wx-2.8/wx/gtk/choice.h /usr/include/wx-2.8/wx/scrolbar.h \ + /usr/include/wx-2.8/wx/gtk/scrolbar.h /usr/include/wx-2.8/wx/stattext.h \ + /usr/include/wx-2.8/wx/gtk/stattext.h /usr/include/wx-2.8/wx/statbmp.h \ + /usr/include/wx-2.8/wx/gtk/statbmp.h /usr/include/wx-2.8/wx/statbox.h \ + /usr/include/wx-2.8/wx/gtk/statbox.h /usr/include/wx-2.8/wx/radiobox.h \ + /usr/include/wx-2.8/wx/gtk/radiobox.h /usr/include/wx-2.8/wx/radiobut.h \ + /usr/include/wx-2.8/wx/gtk/radiobut.h /usr/include/wx-2.8/wx/textctrl.h \ + /usr/include/wx-2.8/wx/ioswrap.h /usr/include/wx-2.8/wx/gtk/textctrl.h \ + /usr/include/wx-2.8/wx/slider.h /usr/include/wx-2.8/wx/gtk/slider.h \ + /usr/include/wx-2.8/wx/gauge.h /usr/include/wx-2.8/wx/gtk/gauge.h \ + /usr/include/wx-2.8/wx/scrolwin.h /usr/include/wx-2.8/wx/gtk/scrolwin.h \ + /usr/include/wx-2.8/wx/dirdlg.h /usr/include/wx-2.8/wx/gtk/dirdlg.h \ + /usr/include/wx-2.8/wx/generic/dirdlgg.h \ + /usr/include/wx-2.8/wx/toolbar.h /usr/include/wx-2.8/wx/tbarbase.h \ + /usr/include/wx-2.8/wx/gtk/tbargtk.h /usr/include/wx-2.8/wx/combobox.h \ + /usr/include/wx-2.8/wx/gtk/combobox.h /usr/include/wx-2.8/wx/layout.h \ + /usr/include/wx-2.8/wx/sizer.h /usr/include/wx-2.8/wx/mdi.h \ + /usr/include/wx-2.8/wx/gtk/mdi.h /usr/include/wx-2.8/wx/statusbr.h \ + /usr/include/wx-2.8/wx/generic/statusbr.h \ + /usr/include/wx-2.8/wx/choicdlg.h \ + /usr/include/wx-2.8/wx/generic/choicdgg.h \ + /usr/include/wx-2.8/wx/textdlg.h \ + /usr/include/wx-2.8/wx/generic/textdlgg.h \ + /usr/include/wx-2.8/wx/valtext.h /usr/include/wx-2.8/wx/filedlg.h \ + /usr/include/wx-2.8/wx/gtk/filedlg.h \ + /usr/include/wx-2.8/wx/generic/filedlgg.h \ + /usr/include/wx-2.8/wx/listctrl.h /usr/include/wx-2.8/wx/listbase.h \ + /usr/include/wx-2.8/wx/generic/listctrl.h \ + ../../../Windows/Control/DialogImpl.h ../../../Windows/Window.h \ + ../../../Windows/Defs.h ../../../Windows/../Common/MyWindows.h \ + ../../../Common/MyString.h ../../../Common/MyVector.h \ + ../../../Common/Defs.h ../../../Windows/Control/Dialog.h \ + PasswordDialogRes.h +ArchiveExtractCallback.o: ../Common/ArchiveExtractCallback.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../../Common/ComTry.h ../../../Common/MyWindows.h \ + ../../../Common/Wildcard.h ../../../Common/MyString.h \ + ../../../Common/MyVector.h ../../../Common/Defs.h \ + ../../../Windows/FileDir.h ../../../Windows/../Common/MyString.h \ + ../../../Windows/Defs.h ../../../Windows/../Common/MyWindows.h \ + ../../../Windows/FileFind.h ../../../Windows/FileName.h \ + ../../../Windows/../../C/Types.h ../../../Windows/PropVariant.h \ + ../../../Windows/../Common/Types.h \ + ../../../Windows/PropVariantConversions.h ../../../Common/MyString.h \ + ../Common/../../Common/FilePathAutoRename.h \ + ../Common/../Common/ExtractingFilePath.h \ + ../Common/ArchiveExtractCallback.h ../../../Common/MyCom.h \ + ../Common/../../IPassword.h ../Common/../../../Common/MyUnknown.h \ + ../Common/../../../Common/MyWindows.h ../Common/../../../Common/Types.h \ + ../Common/../../IDecl.h ../Common/../../Common/FileStreams.h \ + ../Common/../../Common/../../Windows/FileIO.h \ + ../Common/../../Common/../../Common/MyCom.h \ + ../Common/../../Common/../IStream.h \ + ../Common/../../Common/../../Common/MyUnknown.h \ + ../Common/../../Common/../../Common/Types.h \ + ../Common/../../Common/../IDecl.h ../Common/../../Common/ProgressUtils.h \ + ../Common/../../Common/../ICoder.h ../Common/../../Common/../IStream.h \ + ../Common/../../Common/../IProgress.h ../Common/../../Archive/IArchive.h \ + ../Common/../../Archive/../IProgress.h \ + ../Common/../../Archive/../IStream.h ../Common/../../Archive/../PropID.h \ + ../Common/../../Archive/Common/OutStreamWithCRC.h \ + ../Common/../../Archive/Common/../../../../C/7zCrc.h \ + ../Common/../../Archive/Common/../../../../C/Types.h \ + ../Common/../../Archive/Common/../../../Common/MyCom.h \ + ../Common/../../Archive/Common/../../IStream.h ../Common/ExtractMode.h \ + ../Common/IFileExtractCallback.h ../Common/../../IDecl.h \ + ../Common/OpenArchive.h ../Common/ArchiveOpenCallback.h \ + ../Common/LoadCodecs.h ../Common/../../../Common/Types.h \ + ../Common/../../../Common/MyCom.h ../Common/../../../Common/MyString.h \ + ../Common/../../../Common/Buffer.h ../Common/../../../Common/Defs.h \ + ../Common/../../ICoder.h ../Common/../../../Windows/DLL.h \ + ../Common/../../../Windows/../Common/MyString.h +ArchiveOpenCallback.o: ../Common/ArchiveOpenCallback.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../../Common/StringConvert.h ../../../Common/MyWindows.h \ + ../../../Common/MyString.h ../../../Common/MyVector.h \ + ../../../Common/Defs.h ../../../Common/ComTry.h \ + ../../../Windows/PropVariant.h ../../../Windows/../Common/MyWindows.h \ + ../../../Windows/../Common/Types.h ../Common/../../Common/FileStreams.h \ + ../Common/../../Common/../../Windows/FileIO.h ../../../Common/MyString.h \ + ../Common/../../Common/../../Common/MyCom.h \ + ../Common/../../Common/../../Common/MyWindows.h \ + ../Common/../../Common/../IStream.h \ + ../Common/../../Common/../../Common/MyUnknown.h \ + ../Common/../../Common/../../Common/Types.h \ + ../Common/../../Common/../IDecl.h ../Common/ArchiveOpenCallback.h \ + ../../../Common/MyCom.h ../../../Windows/FileFind.h \ + ../../../Windows/../Common/MyString.h ../../../Windows/FileName.h \ + ../../../Windows/../../C/Types.h ../../../Windows/Defs.h \ + ../Common/../../IPassword.h ../Common/../../../Common/MyUnknown.h \ + ../Common/../../../Common/Types.h ../Common/../../IDecl.h \ + ../Common/../../Archive/IArchive.h \ + ../Common/../../Archive/../IProgress.h \ + ../Common/../../Archive/../../Common/MyUnknown.h \ + ../Common/../../Archive/../../Common/Types.h \ + ../Common/../../Archive/../IDecl.h ../Common/../../Archive/../IStream.h \ + ../Common/../../Archive/../PropID.h +DefaultName.o: ../Common/DefaultName.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../Common/DefaultName.h \ + ../../../Common/MyString.h ../../../Common/MyVector.h \ + ../../../Common/Defs.h +EnumDirItems.o: ../Common/EnumDirItems.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../Common/EnumDirItems.h \ + ../../../Common/Wildcard.h ../../../Common/MyString.h \ + ../../../Common/MyVector.h ../../../Common/Defs.h \ + ../../../Windows/FileFind.h ../../../Windows/../Common/MyString.h \ + ../../../Windows/FileName.h ../../../Windows/../../C/Types.h \ + ../../../Windows/Defs.h ../../../Windows/../Common/MyWindows.h \ + ../Common/DirItem.h ../../../Common/MyString.h \ + ../Common/../../Archive/IArchive.h \ + ../Common/../../Archive/../IProgress.h \ + ../Common/../../Archive/../../Common/MyUnknown.h \ + ../Common/../../Archive/../../Common/MyWindows.h \ + ../Common/../../Archive/../../Common/Types.h \ + ../Common/../../Archive/../IDecl.h ../Common/../../Archive/../IStream.h \ + ../Common/../../Archive/../PropID.h +LoadCodecs.o: ../Common/LoadCodecs.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../Common/LoadCodecs.h \ + ../Common/../../../Common/Types.h ../Common/../../../Common/MyCom.h \ + ../Common/../../../Common/MyWindows.h \ + ../Common/../../../Common/MyString.h \ + ../Common/../../../Common/MyVector.h ../Common/../../../Common/Defs.h \ + ../Common/../../../Common/Buffer.h ../Common/../../ICoder.h \ + ../Common/../../IStream.h ../Common/../../../Common/MyUnknown.h \ + ../Common/../../../Common/Types.h ../Common/../../IDecl.h \ + ../Common/../../../Windows/DLL.h \ + ../Common/../../../Windows/../Common/MyString.h \ + ../Common/../../Archive/IArchive.h \ + ../Common/../../Archive/../IProgress.h \ + ../Common/../../Archive/../../Common/MyUnknown.h \ + ../Common/../../Archive/../../Common/Types.h \ + ../Common/../../Archive/../IDecl.h ../Common/../../Archive/../IStream.h \ + ../Common/../../Archive/../PropID.h \ + ../Common/../../../Common/StringToInt.h \ + ../Common/../../../Common/Types.h \ + ../Common/../../../Windows/PropVariant.h \ + ../Common/../../../Windows/../Common/MyWindows.h \ + ../Common/../../../Windows/../Common/Types.h \ + ../Common/../../Common/RegisterArc.h \ + ../Common/../../Common/../Archive/IArchive.h \ + ../Common/../../../Windows/FileFind.h \ + ../Common/../../../Windows/FileName.h \ + ../Common/../../../Windows/../../C/Types.h \ + ../Common/../../../Windows/Defs.h \ + ../Common/../../../Windows/ResourceString.h ../../../Common/MyString.h \ + ../../../Common/StringConvert.h ../../../Common/MyWindows.h \ + ../../../Common/MyString.h +OpenArchive.o: ../Common/OpenArchive.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../../Common/Wildcard.h \ + ../../../Common/MyString.h ../../../Common/MyVector.h \ + ../../../Common/Defs.h ../../../Windows/FileDir.h \ + ../../../Windows/../Common/MyString.h ../../../Windows/Defs.h \ + ../../../Windows/../Common/MyWindows.h ../../../Windows/PropVariant.h \ + ../../../Windows/../Common/Types.h ../Common/../../Common/FileStreams.h \ + ../Common/../../Common/../../Windows/FileIO.h ../../../Common/MyString.h \ + ../Common/../../Common/../../Common/MyCom.h \ + ../Common/../../Common/../../Common/MyWindows.h \ + ../Common/../../Common/../IStream.h \ + ../Common/../../Common/../../Common/MyUnknown.h \ + ../Common/../../Common/../../Common/Types.h \ + ../Common/../../Common/../IDecl.h ../Common/../../Common/StreamUtils.h \ + ../Common/DefaultName.h ../Common/OpenArchive.h \ + ../../../Windows/FileFind.h ../../../Windows/FileName.h \ + ../../../Windows/../../C/Types.h ../Common/../../Archive/IArchive.h \ + ../Common/../../Archive/../IProgress.h \ + ../Common/../../Archive/../../Common/MyUnknown.h \ + ../Common/../../Archive/../../Common/Types.h \ + ../Common/../../Archive/../IDecl.h ../Common/../../Archive/../IStream.h \ + ../Common/../../Archive/../PropID.h ../Common/ArchiveOpenCallback.h \ + ../../../Common/MyCom.h ../Common/../../IPassword.h \ + ../Common/../../../Common/MyUnknown.h ../Common/../../../Common/Types.h \ + ../Common/../../IDecl.h ../Common/LoadCodecs.h \ + ../Common/../../../Common/Types.h ../Common/../../../Common/MyCom.h \ + ../Common/../../../Common/MyString.h ../Common/../../../Common/Buffer.h \ + ../Common/../../../Common/Defs.h ../Common/../../ICoder.h \ + ../Common/../../IStream.h ../Common/../../../Windows/DLL.h \ + ../Common/../../../Windows/../Common/MyString.h +ZipRegistry.o: ../Common/ZipRegistry.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../../Common/IntToString.h \ + ../../../Common/StringConvert.h ../../../Common/MyWindows.h \ + ../../../Common/MyString.h ../../../Common/MyVector.h \ + ../../../Common/Defs.h ../../../Windows/FileDir.h \ + ../../../Windows/../Common/MyString.h ../../../Windows/Defs.h \ + ../../../Windows/../Common/MyWindows.h ../../../Windows/Registry.h \ + ../../../Common/Buffer.h ../../../Common/MyString.h \ + ../../../Windows/Synchronization.h ../../../Windows/../../C/Threads.h \ + ../../../Windows/../../C/Types.h ../../../Windows/Synchronization2.h \ + ../Common/ZipRegistry.h ../Common/ExtractMode.h +ExtractingFilePath.o: ../Common/ExtractingFilePath.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../Common/../../../../C/Types.h ../../../Common/Wildcard.h \ + ../../../Common/MyString.h ../../../Common/MyVector.h \ + ../../../Common/Defs.h ../Common/ExtractingFilePath.h \ + ../../../Common/MyString.h +PropIDUtils.o: ../Common/PropIDUtils.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../../Common/IntToString.h \ + ../../../Windows/FileFind.h ../../../Windows/../Common/MyString.h \ + ../../../Windows/../Common/MyVector.h ../../../Windows/../Common/Defs.h \ + ../../../Windows/FileName.h ../../../Windows/../../C/Types.h \ + ../../../Windows/Defs.h ../../../Windows/../Common/MyWindows.h \ + ../../../Windows/PropVariantConversions.h ../../../Common/MyString.h \ + ../Common/../../PropID.h ../Common/PropIDUtils.h +SortUtils.o: ../Common/SortUtils.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../Common/SortUtils.h \ + ../../../Common/MyString.h ../../../Common/MyVector.h \ + ../../../Common/Defs.h ../../../Common/Wildcard.h \ + ../../../Common/MyString.h +UpdateAction.o: ../Common/UpdateAction.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../Common/UpdateAction.h +UpdateCallback.o: ../Common/UpdateCallback.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../../Common/ComTry.h ../../../Common/MyWindows.h \ + ../../../Common/Defs.h ../../../Common/IntToString.h \ + ../../../Common/StringConvert.h ../../../Common/MyString.h \ + ../../../Common/MyVector.h ../../../Common/Defs.h \ + ../../../Windows/PropVariant.h ../../../Windows/../Common/MyWindows.h \ + ../../../Windows/../Common/Types.h ../Common/../../Common/FileStreams.h \ + ../Common/../../Common/../../Windows/FileIO.h ../../../Common/MyString.h \ + ../Common/../../Common/../../Common/MyCom.h \ + ../Common/../../Common/../../Common/MyWindows.h \ + ../Common/../../Common/../IStream.h \ + ../Common/../../Common/../../Common/MyUnknown.h \ + ../Common/../../Common/../../Common/Types.h \ + ../Common/../../Common/../IDecl.h ../Common/UpdateCallback.h \ + ../../../Common/MyCom.h ../Common/../../IPassword.h \ + ../Common/../../../Common/MyUnknown.h ../Common/../../../Common/Types.h \ + ../Common/../../IDecl.h ../Common/../../ICoder.h \ + ../Common/../../IStream.h ../Common/../Common/UpdatePair.h \ + ../Common/../Common/DirItem.h \ + ../Common/../Common/../../Archive/IArchive.h \ + ../Common/../Common/../../Archive/../IProgress.h \ + ../Common/../Common/../../Archive/../../Common/MyUnknown.h \ + ../Common/../Common/../../Archive/../../Common/Types.h \ + ../Common/../Common/../../Archive/../IDecl.h \ + ../Common/../Common/../../Archive/../IStream.h \ + ../Common/../Common/../../Archive/../PropID.h \ + ../Common/../Common/UpdateAction.h ../Common/../Common/UpdateProduce.h \ + ../Common/../Common/UpdatePair.h +UpdatePair.o: ../Common/UpdatePair.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../../Common/Defs.h \ + ../../../Common/Wildcard.h ../../../Common/MyString.h \ + ../../../Common/MyVector.h ../../../Common/Defs.h \ + ../../../Windows/Time.h ../Common/SortUtils.h ../../../Common/MyString.h \ + ../Common/UpdatePair.h ../Common/DirItem.h \ + ../Common/../../Archive/IArchive.h \ + ../Common/../../Archive/../IProgress.h \ + ../Common/../../Archive/../../Common/MyUnknown.h \ + ../Common/../../Archive/../../Common/MyWindows.h \ + ../Common/../../Archive/../../Common/Types.h \ + ../Common/../../Archive/../IDecl.h ../Common/../../Archive/../IStream.h \ + ../Common/../../Archive/../PropID.h ../Common/UpdateAction.h +UpdateProduce.o: ../Common/UpdateProduce.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../Common/UpdateProduce.h \ + ../Common/UpdatePair.h ../Common/DirItem.h ../../../Common/MyString.h \ + ../../../Common/MyVector.h ../../../Common/Defs.h \ + ../Common/../../Archive/IArchive.h \ + ../Common/../../Archive/../IProgress.h \ + ../Common/../../Archive/../../Common/MyUnknown.h \ + ../Common/../../Archive/../../Common/MyWindows.h \ + ../Common/../../Archive/../../Common/Types.h \ + ../Common/../../Archive/../IDecl.h ../Common/../../Archive/../IStream.h \ + ../Common/../../Archive/../PropID.h ../Common/UpdateAction.h +OutStreamWithCRC.o: ../../Archive/Common/OutStreamWithCRC.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../Archive/Common/OutStreamWithCRC.h \ + ../../Archive/Common/../../../../C/7zCrc.h \ + ../../Archive/Common/../../../../C/Types.h \ + ../../Archive/Common/../../../Common/MyCom.h \ + ../../Archive/Common/../../../Common/MyWindows.h \ + ../../Archive/Common/../../IStream.h \ + ../../Archive/Common/../../../Common/MyUnknown.h \ + ../../Archive/Common/../../../Common/Types.h \ + ../../Archive/Common/../../IDecl.h +FilePathAutoRename.o: ../../Common/FilePathAutoRename.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../../Common/Defs.h ../../../Common/IntToString.h \ + ../../../Windows/FileFind.h ../../../Windows/../Common/MyString.h \ + ../../../Windows/../Common/MyVector.h ../../../Windows/../Common/Defs.h \ + ../../../Windows/FileName.h ../../../Windows/../../C/Types.h \ + ../../../Windows/Defs.h ../../../Windows/../Common/MyWindows.h \ + ../../Common/FilePathAutoRename.h ../../../Common/MyString.h +FileStreams.o: ../../Common/FileStreams.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../Common/FileStreams.h \ + ../../Common/../../Windows/FileIO.h ../../../Common/MyString.h \ + ../../../Common/MyVector.h ../../../Common/Defs.h \ + ../../Common/../../Common/MyCom.h ../../Common/../../Common/MyWindows.h \ + ../../Common/../IStream.h ../../Common/../../Common/MyUnknown.h \ + ../../Common/../../Common/Types.h ../../Common/../IDecl.h +ProgressUtils.o: ../../Common/ProgressUtils.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../Common/ProgressUtils.h ../../Common/../../Common/MyCom.h \ + ../../Common/../../Common/MyWindows.h ../../Common/../ICoder.h \ + ../../Common/../IStream.h ../../Common/../../Common/MyUnknown.h \ + ../../Common/../../Common/Types.h ../../Common/../IDecl.h \ + ../../Common/../IProgress.h +StreamUtils.o: ../../Common/StreamUtils.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../Common/StreamUtils.h \ + ../../Common/../IStream.h ../../Common/../../Common/MyUnknown.h \ + ../../Common/../../Common/MyWindows.h ../../Common/../../Common/Types.h \ + ../../Common/../IDecl.h +TextConfig.o: ../../../Common/TextConfig.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../../Common/TextConfig.h \ + ../../../Common/MyVector.h ../../../Common/Defs.h \ + ../../../Common/MyString.h ../../../Common/UTFConvert.h +UTFConvert.o: ../../../Common/UTFConvert.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../../Common/UTFConvert.h \ + ../../../Common/MyString.h ../../../Common/MyVector.h \ + ../../../Common/Defs.h +CopyCoder.o: ../../Compress/CopyCoder.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../Compress/../../../C/Alloc.h \ + ../../Compress/../Common/StreamUtils.h \ + ../../Compress/../Common/../IStream.h \ + ../../Compress/../Common/../../Common/MyUnknown.h \ + ../../Compress/../Common/../../Common/MyWindows.h \ + ../../Compress/../Common/../../Common/Types.h \ + ../../Compress/../Common/../IDecl.h ../../Compress/CopyCoder.h \ + ../../Compress/../../Common/MyCom.h \ + ../../Compress/../../Common/MyWindows.h ../../Compress/../ICoder.h \ + ../../Compress/../IStream.h +MyString.o: ../../../Common/MyString.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../../Common/StringConvert.h \ + ../../../Common/MyWindows.h ../../../Common/MyString.h \ + ../../../Common/MyVector.h ../../../Common/Defs.h \ + ../../../myWindows/myPrivate.h +MyVector.o: ../../../Common/MyVector.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../../Common/MyVector.h \ + ../../../Common/Defs.h +StringConvert.o: ../../../Common/StringConvert.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../../Common/StringConvert.h ../../../Common/MyWindows.h \ + ../../../Common/MyString.h ../../../Common/MyVector.h \ + ../../../Common/Defs.h +StringToInt.o: ../../../Common/StringToInt.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../../Common/StringToInt.h +IntToString.o: ../../../Common/IntToString.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../../Common/IntToString.h +MyWindows.o: ../../../Common/MyWindows.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../../Common/MyWindows.h +Wildcard.o: ../../../Common/Wildcard.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../../Common/Wildcard.h \ + ../../../Common/MyString.h ../../../Common/MyVector.h \ + ../../../Common/Defs.h +DLL.o: ../../../Windows/DLL.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../../Windows/DLL.h \ + ../../../Windows/../Common/MyString.h \ + ../../../Windows/../Common/MyVector.h ../../../Windows/../Common/Defs.h \ + ../../../Windows/Defs.h ../../../Windows/../Common/MyWindows.h \ + ../../../Windows/../Common/StringConvert.h \ + ../../../Windows/../Common/MyWindows.h \ + ../../../Windows/../Common/MyString.h ../../../Windows/../Common/Types.h \ + ../../../myWindows/myPrivate.h +Error.o: ../../../Windows/Error.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../../Windows/Error.h \ + ../../../Common/MyString.h ../../../Common/MyVector.h \ + ../../../Common/Defs.h ../../../Common/StringConvert.h \ + ../../../Common/MyWindows.h ../../../Common/MyString.h +FileDir.o: ../../../Windows/FileDir.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../../Windows/FileDir.h \ + ../../../Windows/../Common/MyString.h \ + ../../../Windows/../Common/MyVector.h ../../../Windows/../Common/Defs.h \ + ../../../Windows/Defs.h ../../../Windows/../Common/MyWindows.h \ + ../../../Windows/FileName.h ../../../Windows/../../C/Types.h \ + ../../../Windows/FileFind.h ../../../Windows/../Common/StringConvert.h \ + ../../../Windows/../Common/MyWindows.h \ + ../../../Windows/../Common/MyString.h ../../../Windows/../Common/Types.h \ + ../../../Windows/../Common/IntToString.h ../../../myWindows/myPrivate.h \ + ../../../Windows/Synchronization.h ../../../Windows/../../C/Threads.h \ + ../../../Windows/../../C/Types.h ../../../Windows/Synchronization2.h +FileFind.o: ../../../Windows/FileFind.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../../Windows/FileFind.h \ + ../../../Windows/../Common/MyString.h \ + ../../../Windows/../Common/MyVector.h ../../../Windows/../Common/Defs.h \ + ../../../Windows/FileName.h ../../../Windows/../../C/Types.h \ + ../../../Windows/Defs.h ../../../Windows/../Common/MyWindows.h \ + ../../../Windows/../Common/StringConvert.h \ + ../../../Windows/../Common/MyWindows.h \ + ../../../Windows/../Common/MyString.h ../../../Windows/../Common/Types.h \ + ../../../myWindows/myPrivate.h +FileIO.o: ../../../Windows/FileIO.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../../Windows/FileIO.h \ + ../../../Common/MyString.h ../../../Common/MyVector.h \ + ../../../Common/Defs.h ../../../Windows/Defs.h \ + ../../../Windows/../Common/MyWindows.h \ + ../../../Windows/../Common/StringConvert.h \ + ../../../Windows/../Common/MyWindows.h \ + ../../../Windows/../Common/MyString.h ../../../Windows/../Common/Types.h \ + ../../../myWindows/myPrivate.h +FileName.o: ../../../Windows/FileName.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../../Windows/FileName.h \ + ../../../Windows/../../C/Types.h ../../../Windows/../Common/MyString.h \ + ../../../Windows/../Common/MyVector.h ../../../Windows/../Common/Defs.h \ + ../../../Common/Wildcard.h ../../../Common/MyString.h +PropVariant.o: ../../../Windows/PropVariant.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../../Windows/PropVariant.h ../../../Windows/../Common/MyWindows.h \ + ../../../Windows/../Common/Types.h ../../../Windows/../Common/Defs.h +PropVariantConversions.o: ../../../Windows/PropVariantConversions.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../../Common/IntToString.h ../../../Common/StringConvert.h \ + ../../../Common/MyWindows.h ../../../Common/MyString.h \ + ../../../Common/MyVector.h ../../../Common/Defs.h \ + ../../../Windows/Defs.h ../../../Windows/../Common/MyWindows.h \ + ../../../Windows/PropVariantConversions.h ../../../Common/MyString.h +Registry.o: ../../../Windows/Registry.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../../Windows/Registry.h \ + ../../../Common/Buffer.h ../../../Common/Defs.h \ + ../../../Common/MyString.h ../../../Common/MyVector.h \ + /usr/include/wx-2.8/wx/config.h /usr/include/wx-2.8/wx/confbase.h \ + /usr/include/wx-2.8/wx/defs.h /usr/include/wx-2.8/wx/platform.h \ + /usr/lib/wx/include/gtk2-unicode-release-2.8/wx/setup.h \ + /usr/include/wx-2.8/wx/chkconf.h /usr/include/wx-2.8/wx/features.h \ + /usr/include/wx-2.8/wx/version.h /usr/include/wx-2.8/wx/cpp.h \ + /usr/include/wx-2.8/wx/dlimpexp.h /usr/include/wx-2.8/wx/debug.h \ + /usr/include/wx-2.8/wx/wxchar.h /usr/include/wx-2.8/wx/string.h \ + /usr/include/wx-2.8/wx/buffer.h /usr/include/wx-2.8/wx/strconv.h \ + /usr/include/wx-2.8/wx/fontenc.h /usr/include/wx-2.8/wx/beforestd.h \ + /usr/include/wx-2.8/wx/afterstd.h /usr/include/wx-2.8/wx/iosfwrap.h \ + /usr/include/wx-2.8/wx/fileconf.h /usr/include/wx-2.8/wx/textfile.h \ + /usr/include/wx-2.8/wx/textbuf.h /usr/include/wx-2.8/wx/arrstr.h \ + /usr/include/wx-2.8/wx/convauto.h /usr/include/wx-2.8/wx/dynarray.h \ + /usr/include/wx-2.8/wx/file.h /usr/include/wx-2.8/wx/filefn.h \ + /usr/include/wx-2.8/wx/list.h /usr/include/wx-2.8/wx/object.h \ + /usr/include/wx-2.8/wx/memory.h /usr/include/wx-2.8/wx/msgout.h +Synchronization.o: ../../../Windows/Synchronization.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../../Windows/Synchronization.h ../../../Windows/Defs.h \ + ../../../Windows/../Common/MyWindows.h \ + ../../../Windows/../../C/Threads.h ../../../Windows/../../C/Types.h \ + ../../../Windows/Synchronization2.h +Time.o: ../../../Windows/Time.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../../Windows/Time.h \ + ../../../Windows/Defs.h ../../../Windows/../Common/MyWindows.h +Clipboard.o: ../../../Windows/Clipboard.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../../Windows/Clipboard.h \ + ../../../Common/MyString.h ../../../Common/MyVector.h \ + ../../../Common/Defs.h ../../../Windows/Defs.h \ + ../../../Windows/../Common/MyWindows.h /usr/include/wx-2.8/wx/clipbrd.h \ + /usr/include/wx-2.8/wx/defs.h /usr/include/wx-2.8/wx/platform.h \ + /usr/lib/wx/include/gtk2-unicode-release-2.8/wx/setup.h \ + /usr/include/wx-2.8/wx/chkconf.h /usr/include/wx-2.8/wx/features.h \ + /usr/include/wx-2.8/wx/version.h /usr/include/wx-2.8/wx/cpp.h \ + /usr/include/wx-2.8/wx/dlimpexp.h /usr/include/wx-2.8/wx/debug.h \ + /usr/include/wx-2.8/wx/wxchar.h /usr/include/wx-2.8/wx/object.h \ + /usr/include/wx-2.8/wx/memory.h /usr/include/wx-2.8/wx/string.h \ + /usr/include/wx-2.8/wx/buffer.h /usr/include/wx-2.8/wx/strconv.h \ + /usr/include/wx-2.8/wx/fontenc.h /usr/include/wx-2.8/wx/beforestd.h \ + /usr/include/wx-2.8/wx/afterstd.h /usr/include/wx-2.8/wx/iosfwrap.h \ + /usr/include/wx-2.8/wx/msgout.h /usr/include/wx-2.8/wx/gtk/clipbrd.h \ + /usr/include/wx-2.8/wx/dataobj.h /usr/include/wx-2.8/wx/bitmap.h \ + /usr/include/wx-2.8/wx/gdicmn.h /usr/include/wx-2.8/wx/list.h \ + /usr/include/wx-2.8/wx/hashmap.h /usr/include/wx-2.8/wx/math.h \ + /usr/include/wx-2.8/wx/colour.h /usr/include/wx-2.8/wx/gdiobj.h \ + /usr/include/wx-2.8/wx/variant.h /usr/include/wx-2.8/wx/arrstr.h \ + /usr/include/wx-2.8/wx/datetime.h /usr/include/wx-2.8/wx/longlong.h \ + /usr/include/wx-2.8/wx/dynarray.h /usr/include/wx-2.8/wx/gtk/colour.h \ + /usr/include/wx-2.8/wx/gtk/bitmap.h \ + /usr/include/wx-2.8/wx/gtk/dataform.h \ + /usr/include/wx-2.8/wx/gtk/dataobj.h \ + /usr/include/wx-2.8/wx/gtk/dataobj2.h ../../../Common/StringConvert.h \ + ../../../Common/MyWindows.h ../../../Common/MyString.h +System.o: ../../../Windows/System.cpp ../../../Common/Types.h \ + ../../../Common/../../C/Types.h +Window.o: ../../../Windows/Window.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h /usr/include/wx-2.8/wx/wxprec.h \ + /usr/include/wx-2.8/wx/defs.h /usr/include/wx-2.8/wx/platform.h \ + /usr/lib/wx/include/gtk2-unicode-release-2.8/wx/setup.h \ + /usr/include/wx-2.8/wx/chkconf.h /usr/include/wx-2.8/wx/features.h \ + /usr/include/wx-2.8/wx/version.h /usr/include/wx-2.8/wx/cpp.h \ + /usr/include/wx-2.8/wx/dlimpexp.h /usr/include/wx-2.8/wx/debug.h \ + /usr/include/wx-2.8/wx/wxchar.h /usr/include/wx-2.8/wx/wx.h \ + /usr/include/wx-2.8/wx/object.h /usr/include/wx-2.8/wx/memory.h \ + /usr/include/wx-2.8/wx/string.h /usr/include/wx-2.8/wx/buffer.h \ + /usr/include/wx-2.8/wx/strconv.h /usr/include/wx-2.8/wx/fontenc.h \ + /usr/include/wx-2.8/wx/beforestd.h /usr/include/wx-2.8/wx/afterstd.h \ + /usr/include/wx-2.8/wx/iosfwrap.h /usr/include/wx-2.8/wx/msgout.h \ + /usr/include/wx-2.8/wx/dynarray.h /usr/include/wx-2.8/wx/list.h \ + /usr/include/wx-2.8/wx/hash.h /usr/include/wx-2.8/wx/hashmap.h \ + /usr/include/wx-2.8/wx/arrstr.h /usr/include/wx-2.8/wx/intl.h \ + /usr/include/wx-2.8/wx/log.h /usr/include/wx-2.8/wx/generic/logg.h \ + /usr/include/wx-2.8/wx/event.h /usr/include/wx-2.8/wx/clntdata.h \ + /usr/include/wx-2.8/wx/vector.h /usr/include/wx-2.8/wx/gdicmn.h \ + /usr/include/wx-2.8/wx/math.h /usr/include/wx-2.8/wx/cursor.h \ + /usr/include/wx-2.8/wx/gtk/cursor.h /usr/include/wx-2.8/wx/utils.h \ + /usr/include/wx-2.8/wx/filefn.h /usr/include/wx-2.8/wx/longlong.h \ + /usr/include/wx-2.8/wx/platinfo.h /usr/include/wx-2.8/wx/thread.h \ + /usr/include/wx-2.8/wx/app.h /usr/include/wx-2.8/wx/build.h \ + /usr/include/wx-2.8/wx/init.h /usr/include/wx-2.8/wx/gtk/app.h \ + /usr/include/wx-2.8/wx/stream.h /usr/include/wx-2.8/wx/stopwatch.h \ + /usr/include/wx-2.8/wx/module.h /usr/include/wx-2.8/wx/window.h \ + /usr/include/wx-2.8/wx/font.h /usr/include/wx-2.8/wx/gdiobj.h \ + /usr/include/wx-2.8/wx/gtk/font.h /usr/include/wx-2.8/wx/colour.h \ + /usr/include/wx-2.8/wx/variant.h /usr/include/wx-2.8/wx/datetime.h \ + /usr/include/wx-2.8/wx/gtk/colour.h /usr/include/wx-2.8/wx/region.h \ + /usr/include/wx-2.8/wx/gtk/region.h /usr/include/wx-2.8/wx/validate.h \ + /usr/include/wx-2.8/wx/palette.h \ + /usr/include/wx-2.8/wx/generic/paletteg.h /usr/include/wx-2.8/wx/accel.h \ + /usr/include/wx-2.8/wx/gtk/accel.h \ + /usr/include/wx-2.8/wx/generic/accel.h \ + /usr/include/wx-2.8/wx/gtk/window.h /usr/include/wx-2.8/wx/containr.h \ + /usr/include/wx-2.8/wx/panel.h /usr/include/wx-2.8/wx/generic/panelg.h \ + /usr/include/wx-2.8/wx/toplevel.h /usr/include/wx-2.8/wx/iconbndl.h \ + /usr/include/wx-2.8/wx/gtk/toplevel.h /usr/include/wx-2.8/wx/frame.h \ + /usr/include/wx-2.8/wx/gtk/frame.h /usr/include/wx-2.8/wx/bitmap.h \ + /usr/include/wx-2.8/wx/gtk/bitmap.h /usr/include/wx-2.8/wx/image.h \ + /usr/include/wx-2.8/wx/imagbmp.h /usr/include/wx-2.8/wx/imagpng.h \ + /usr/include/wx-2.8/wx/imaggif.h /usr/include/wx-2.8/wx/imagpcx.h \ + /usr/include/wx-2.8/wx/imagjpeg.h /usr/include/wx-2.8/wx/imagtga.h \ + /usr/include/wx-2.8/wx/imagtiff.h /usr/include/wx-2.8/wx/imagpnm.h \ + /usr/include/wx-2.8/wx/imagxpm.h /usr/include/wx-2.8/wx/imagiff.h \ + /usr/include/wx-2.8/wx/dc.h /usr/include/wx-2.8/wx/brush.h \ + /usr/include/wx-2.8/wx/gtk/brush.h /usr/include/wx-2.8/wx/pen.h \ + /usr/include/wx-2.8/wx/gtk/pen.h /usr/include/wx-2.8/wx/gtk/dc.h \ + /usr/include/wx-2.8/wx/dcgraph.h /usr/include/wx-2.8/wx/geometry.h \ + /usr/include/wx-2.8/wx/graphics.h /usr/include/wx-2.8/wx/dcclient.h \ + /usr/include/wx-2.8/wx/gtk/dcclient.h /usr/include/wx-2.8/wx/dcmemory.h \ + /usr/include/wx-2.8/wx/gtk/dcmemory.h /usr/include/wx-2.8/wx/dcprint.h \ + /usr/include/wx-2.8/wx/dcscreen.h /usr/include/wx-2.8/wx/gtk/dcscreen.h \ + /usr/include/wx-2.8/wx/button.h /usr/include/wx-2.8/wx/control.h \ + /usr/include/wx-2.8/wx/gtk/control.h /usr/include/wx-2.8/wx/gtk/button.h \ + /usr/include/wx-2.8/wx/menuitem.h /usr/include/wx-2.8/wx/gtk/menuitem.h \ + /usr/include/wx-2.8/wx/menu.h /usr/include/wx-2.8/wx/gtk/menu.h \ + /usr/include/wx-2.8/wx/icon.h /usr/include/wx-2.8/wx/iconloc.h \ + /usr/include/wx-2.8/wx/generic/icon.h /usr/include/wx-2.8/wx/dialog.h \ + /usr/include/wx-2.8/wx/gtk/dialog.h /usr/include/wx-2.8/wx/timer.h \ + /usr/include/wx-2.8/wx/gtk/timer.h /usr/include/wx-2.8/wx/settings.h \ + /usr/include/wx-2.8/wx/msgdlg.h /usr/include/wx-2.8/wx/gtk/msgdlg.h \ + /usr/include/wx-2.8/wx/cmndata.h /usr/include/wx-2.8/wx/encinfo.h \ + /usr/include/wx-2.8/wx/dataobj.h /usr/include/wx-2.8/wx/gtk/dataform.h \ + /usr/include/wx-2.8/wx/gtk/dataobj.h \ + /usr/include/wx-2.8/wx/gtk/dataobj2.h /usr/include/wx-2.8/wx/ctrlsub.h \ + /usr/include/wx-2.8/wx/bmpbuttn.h /usr/include/wx-2.8/wx/gtk/bmpbuttn.h \ + /usr/include/wx-2.8/wx/checkbox.h /usr/include/wx-2.8/wx/gtk/checkbox.h \ + /usr/include/wx-2.8/wx/checklst.h /usr/include/wx-2.8/wx/listbox.h \ + /usr/include/wx-2.8/wx/gtk/listbox.h \ + /usr/include/wx-2.8/wx/gtk/checklst.h /usr/include/wx-2.8/wx/choice.h \ + /usr/include/wx-2.8/wx/gtk/choice.h /usr/include/wx-2.8/wx/scrolbar.h \ + /usr/include/wx-2.8/wx/gtk/scrolbar.h /usr/include/wx-2.8/wx/stattext.h \ + /usr/include/wx-2.8/wx/gtk/stattext.h /usr/include/wx-2.8/wx/statbmp.h \ + /usr/include/wx-2.8/wx/gtk/statbmp.h /usr/include/wx-2.8/wx/statbox.h \ + /usr/include/wx-2.8/wx/gtk/statbox.h /usr/include/wx-2.8/wx/radiobox.h \ + /usr/include/wx-2.8/wx/gtk/radiobox.h /usr/include/wx-2.8/wx/radiobut.h \ + /usr/include/wx-2.8/wx/gtk/radiobut.h /usr/include/wx-2.8/wx/textctrl.h \ + /usr/include/wx-2.8/wx/ioswrap.h /usr/include/wx-2.8/wx/gtk/textctrl.h \ + /usr/include/wx-2.8/wx/slider.h /usr/include/wx-2.8/wx/gtk/slider.h \ + /usr/include/wx-2.8/wx/gauge.h /usr/include/wx-2.8/wx/gtk/gauge.h \ + /usr/include/wx-2.8/wx/scrolwin.h /usr/include/wx-2.8/wx/gtk/scrolwin.h \ + /usr/include/wx-2.8/wx/dirdlg.h /usr/include/wx-2.8/wx/gtk/dirdlg.h \ + /usr/include/wx-2.8/wx/generic/dirdlgg.h \ + /usr/include/wx-2.8/wx/toolbar.h /usr/include/wx-2.8/wx/tbarbase.h \ + /usr/include/wx-2.8/wx/gtk/tbargtk.h /usr/include/wx-2.8/wx/combobox.h \ + /usr/include/wx-2.8/wx/gtk/combobox.h /usr/include/wx-2.8/wx/layout.h \ + /usr/include/wx-2.8/wx/sizer.h /usr/include/wx-2.8/wx/mdi.h \ + /usr/include/wx-2.8/wx/gtk/mdi.h /usr/include/wx-2.8/wx/statusbr.h \ + /usr/include/wx-2.8/wx/generic/statusbr.h \ + /usr/include/wx-2.8/wx/choicdlg.h \ + /usr/include/wx-2.8/wx/generic/choicdgg.h \ + /usr/include/wx-2.8/wx/textdlg.h \ + /usr/include/wx-2.8/wx/generic/textdlgg.h \ + /usr/include/wx-2.8/wx/valtext.h /usr/include/wx-2.8/wx/filedlg.h \ + /usr/include/wx-2.8/wx/gtk/filedlg.h \ + /usr/include/wx-2.8/wx/generic/filedlgg.h \ + /usr/include/wx-2.8/wx/listctrl.h /usr/include/wx-2.8/wx/listbase.h \ + /usr/include/wx-2.8/wx/generic/listctrl.h ../../../Windows/Window.h \ + ../../../Windows/Defs.h ../../../Windows/../Common/MyWindows.h \ + ../../../Common/MyString.h ../../../Common/MyVector.h \ + ../../../Common/Defs.h +Dialog.o: ../../../Windows/Control/Dialog.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h /usr/include/wx-2.8/wx/wxprec.h \ + /usr/include/wx-2.8/wx/defs.h /usr/include/wx-2.8/wx/platform.h \ + /usr/lib/wx/include/gtk2-unicode-release-2.8/wx/setup.h \ + /usr/include/wx-2.8/wx/chkconf.h /usr/include/wx-2.8/wx/features.h \ + /usr/include/wx-2.8/wx/version.h /usr/include/wx-2.8/wx/cpp.h \ + /usr/include/wx-2.8/wx/dlimpexp.h /usr/include/wx-2.8/wx/debug.h \ + /usr/include/wx-2.8/wx/wxchar.h /usr/include/wx-2.8/wx/wx.h \ + /usr/include/wx-2.8/wx/object.h /usr/include/wx-2.8/wx/memory.h \ + /usr/include/wx-2.8/wx/string.h /usr/include/wx-2.8/wx/buffer.h \ + /usr/include/wx-2.8/wx/strconv.h /usr/include/wx-2.8/wx/fontenc.h \ + /usr/include/wx-2.8/wx/beforestd.h /usr/include/wx-2.8/wx/afterstd.h \ + /usr/include/wx-2.8/wx/iosfwrap.h /usr/include/wx-2.8/wx/msgout.h \ + /usr/include/wx-2.8/wx/dynarray.h /usr/include/wx-2.8/wx/list.h \ + /usr/include/wx-2.8/wx/hash.h /usr/include/wx-2.8/wx/hashmap.h \ + /usr/include/wx-2.8/wx/arrstr.h /usr/include/wx-2.8/wx/intl.h \ + /usr/include/wx-2.8/wx/log.h /usr/include/wx-2.8/wx/generic/logg.h \ + /usr/include/wx-2.8/wx/event.h /usr/include/wx-2.8/wx/clntdata.h \ + /usr/include/wx-2.8/wx/vector.h /usr/include/wx-2.8/wx/gdicmn.h \ + /usr/include/wx-2.8/wx/math.h /usr/include/wx-2.8/wx/cursor.h \ + /usr/include/wx-2.8/wx/gtk/cursor.h /usr/include/wx-2.8/wx/utils.h \ + /usr/include/wx-2.8/wx/filefn.h /usr/include/wx-2.8/wx/longlong.h \ + /usr/include/wx-2.8/wx/platinfo.h /usr/include/wx-2.8/wx/thread.h \ + /usr/include/wx-2.8/wx/app.h /usr/include/wx-2.8/wx/build.h \ + /usr/include/wx-2.8/wx/init.h /usr/include/wx-2.8/wx/gtk/app.h \ + /usr/include/wx-2.8/wx/stream.h /usr/include/wx-2.8/wx/stopwatch.h \ + /usr/include/wx-2.8/wx/module.h /usr/include/wx-2.8/wx/window.h \ + /usr/include/wx-2.8/wx/font.h /usr/include/wx-2.8/wx/gdiobj.h \ + /usr/include/wx-2.8/wx/gtk/font.h /usr/include/wx-2.8/wx/colour.h \ + /usr/include/wx-2.8/wx/variant.h /usr/include/wx-2.8/wx/datetime.h \ + /usr/include/wx-2.8/wx/gtk/colour.h /usr/include/wx-2.8/wx/region.h \ + /usr/include/wx-2.8/wx/gtk/region.h /usr/include/wx-2.8/wx/validate.h \ + /usr/include/wx-2.8/wx/palette.h \ + /usr/include/wx-2.8/wx/generic/paletteg.h /usr/include/wx-2.8/wx/accel.h \ + /usr/include/wx-2.8/wx/gtk/accel.h \ + /usr/include/wx-2.8/wx/generic/accel.h \ + /usr/include/wx-2.8/wx/gtk/window.h /usr/include/wx-2.8/wx/containr.h \ + /usr/include/wx-2.8/wx/panel.h /usr/include/wx-2.8/wx/generic/panelg.h \ + /usr/include/wx-2.8/wx/toplevel.h /usr/include/wx-2.8/wx/iconbndl.h \ + /usr/include/wx-2.8/wx/gtk/toplevel.h /usr/include/wx-2.8/wx/frame.h \ + /usr/include/wx-2.8/wx/gtk/frame.h /usr/include/wx-2.8/wx/bitmap.h \ + /usr/include/wx-2.8/wx/gtk/bitmap.h /usr/include/wx-2.8/wx/image.h \ + /usr/include/wx-2.8/wx/imagbmp.h /usr/include/wx-2.8/wx/imagpng.h \ + /usr/include/wx-2.8/wx/imaggif.h /usr/include/wx-2.8/wx/imagpcx.h \ + /usr/include/wx-2.8/wx/imagjpeg.h /usr/include/wx-2.8/wx/imagtga.h \ + /usr/include/wx-2.8/wx/imagtiff.h /usr/include/wx-2.8/wx/imagpnm.h \ + /usr/include/wx-2.8/wx/imagxpm.h /usr/include/wx-2.8/wx/imagiff.h \ + /usr/include/wx-2.8/wx/dc.h /usr/include/wx-2.8/wx/brush.h \ + /usr/include/wx-2.8/wx/gtk/brush.h /usr/include/wx-2.8/wx/pen.h \ + /usr/include/wx-2.8/wx/gtk/pen.h /usr/include/wx-2.8/wx/gtk/dc.h \ + /usr/include/wx-2.8/wx/dcgraph.h /usr/include/wx-2.8/wx/geometry.h \ + /usr/include/wx-2.8/wx/graphics.h /usr/include/wx-2.8/wx/dcclient.h \ + /usr/include/wx-2.8/wx/gtk/dcclient.h /usr/include/wx-2.8/wx/dcmemory.h \ + /usr/include/wx-2.8/wx/gtk/dcmemory.h /usr/include/wx-2.8/wx/dcprint.h \ + /usr/include/wx-2.8/wx/dcscreen.h /usr/include/wx-2.8/wx/gtk/dcscreen.h \ + /usr/include/wx-2.8/wx/button.h /usr/include/wx-2.8/wx/control.h \ + /usr/include/wx-2.8/wx/gtk/control.h /usr/include/wx-2.8/wx/gtk/button.h \ + /usr/include/wx-2.8/wx/menuitem.h /usr/include/wx-2.8/wx/gtk/menuitem.h \ + /usr/include/wx-2.8/wx/menu.h /usr/include/wx-2.8/wx/gtk/menu.h \ + /usr/include/wx-2.8/wx/icon.h /usr/include/wx-2.8/wx/iconloc.h \ + /usr/include/wx-2.8/wx/generic/icon.h /usr/include/wx-2.8/wx/dialog.h \ + /usr/include/wx-2.8/wx/gtk/dialog.h /usr/include/wx-2.8/wx/timer.h \ + /usr/include/wx-2.8/wx/gtk/timer.h /usr/include/wx-2.8/wx/settings.h \ + /usr/include/wx-2.8/wx/msgdlg.h /usr/include/wx-2.8/wx/gtk/msgdlg.h \ + /usr/include/wx-2.8/wx/cmndata.h /usr/include/wx-2.8/wx/encinfo.h \ + /usr/include/wx-2.8/wx/dataobj.h /usr/include/wx-2.8/wx/gtk/dataform.h \ + /usr/include/wx-2.8/wx/gtk/dataobj.h \ + /usr/include/wx-2.8/wx/gtk/dataobj2.h /usr/include/wx-2.8/wx/ctrlsub.h \ + /usr/include/wx-2.8/wx/bmpbuttn.h /usr/include/wx-2.8/wx/gtk/bmpbuttn.h \ + /usr/include/wx-2.8/wx/checkbox.h /usr/include/wx-2.8/wx/gtk/checkbox.h \ + /usr/include/wx-2.8/wx/checklst.h /usr/include/wx-2.8/wx/listbox.h \ + /usr/include/wx-2.8/wx/gtk/listbox.h \ + /usr/include/wx-2.8/wx/gtk/checklst.h /usr/include/wx-2.8/wx/choice.h \ + /usr/include/wx-2.8/wx/gtk/choice.h /usr/include/wx-2.8/wx/scrolbar.h \ + /usr/include/wx-2.8/wx/gtk/scrolbar.h /usr/include/wx-2.8/wx/stattext.h \ + /usr/include/wx-2.8/wx/gtk/stattext.h /usr/include/wx-2.8/wx/statbmp.h \ + /usr/include/wx-2.8/wx/gtk/statbmp.h /usr/include/wx-2.8/wx/statbox.h \ + /usr/include/wx-2.8/wx/gtk/statbox.h /usr/include/wx-2.8/wx/radiobox.h \ + /usr/include/wx-2.8/wx/gtk/radiobox.h /usr/include/wx-2.8/wx/radiobut.h \ + /usr/include/wx-2.8/wx/gtk/radiobut.h /usr/include/wx-2.8/wx/textctrl.h \ + /usr/include/wx-2.8/wx/ioswrap.h /usr/include/wx-2.8/wx/gtk/textctrl.h \ + /usr/include/wx-2.8/wx/slider.h /usr/include/wx-2.8/wx/gtk/slider.h \ + /usr/include/wx-2.8/wx/gauge.h /usr/include/wx-2.8/wx/gtk/gauge.h \ + /usr/include/wx-2.8/wx/scrolwin.h /usr/include/wx-2.8/wx/gtk/scrolwin.h \ + /usr/include/wx-2.8/wx/dirdlg.h /usr/include/wx-2.8/wx/gtk/dirdlg.h \ + /usr/include/wx-2.8/wx/generic/dirdlgg.h \ + /usr/include/wx-2.8/wx/toolbar.h /usr/include/wx-2.8/wx/tbarbase.h \ + /usr/include/wx-2.8/wx/gtk/tbargtk.h /usr/include/wx-2.8/wx/combobox.h \ + /usr/include/wx-2.8/wx/gtk/combobox.h /usr/include/wx-2.8/wx/layout.h \ + /usr/include/wx-2.8/wx/sizer.h /usr/include/wx-2.8/wx/mdi.h \ + /usr/include/wx-2.8/wx/gtk/mdi.h /usr/include/wx-2.8/wx/statusbr.h \ + /usr/include/wx-2.8/wx/generic/statusbr.h \ + /usr/include/wx-2.8/wx/choicdlg.h \ + /usr/include/wx-2.8/wx/generic/choicdgg.h \ + /usr/include/wx-2.8/wx/textdlg.h \ + /usr/include/wx-2.8/wx/generic/textdlgg.h \ + /usr/include/wx-2.8/wx/valtext.h /usr/include/wx-2.8/wx/filedlg.h \ + /usr/include/wx-2.8/wx/gtk/filedlg.h \ + /usr/include/wx-2.8/wx/generic/filedlgg.h \ + /usr/include/wx-2.8/wx/listctrl.h /usr/include/wx-2.8/wx/listbase.h \ + /usr/include/wx-2.8/wx/generic/listctrl.h \ + /usr/include/wx-2.8/wx/filename.h ../../../Windows/Control/DialogImpl.h \ + ../../../Windows/Window.h ../../../Windows/Defs.h \ + ../../../Windows/../Common/MyWindows.h ../../../Common/MyString.h \ + ../../../Common/MyVector.h ../../../Common/Defs.h \ + ../../../Windows/Control/Dialog.h ../../../Windows/Synchronization.h \ + ../../../Windows/Defs.h ../../../Windows/../../C/Threads.h \ + ../../../Windows/../../C/Types.h ../../../Windows/Synchronization2.h +Controls.o: ../../../Windows/Control/Controls.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + /usr/include/wx-2.8/wx/wxprec.h /usr/include/wx-2.8/wx/defs.h \ + /usr/include/wx-2.8/wx/platform.h \ + /usr/lib/wx/include/gtk2-unicode-release-2.8/wx/setup.h \ + /usr/include/wx-2.8/wx/chkconf.h /usr/include/wx-2.8/wx/features.h \ + /usr/include/wx-2.8/wx/version.h /usr/include/wx-2.8/wx/cpp.h \ + /usr/include/wx-2.8/wx/dlimpexp.h /usr/include/wx-2.8/wx/debug.h \ + /usr/include/wx-2.8/wx/wxchar.h /usr/include/wx-2.8/wx/wx.h \ + /usr/include/wx-2.8/wx/object.h /usr/include/wx-2.8/wx/memory.h \ + /usr/include/wx-2.8/wx/string.h /usr/include/wx-2.8/wx/buffer.h \ + /usr/include/wx-2.8/wx/strconv.h /usr/include/wx-2.8/wx/fontenc.h \ + /usr/include/wx-2.8/wx/beforestd.h /usr/include/wx-2.8/wx/afterstd.h \ + /usr/include/wx-2.8/wx/iosfwrap.h /usr/include/wx-2.8/wx/msgout.h \ + /usr/include/wx-2.8/wx/dynarray.h /usr/include/wx-2.8/wx/list.h \ + /usr/include/wx-2.8/wx/hash.h /usr/include/wx-2.8/wx/hashmap.h \ + /usr/include/wx-2.8/wx/arrstr.h /usr/include/wx-2.8/wx/intl.h \ + /usr/include/wx-2.8/wx/log.h /usr/include/wx-2.8/wx/generic/logg.h \ + /usr/include/wx-2.8/wx/event.h /usr/include/wx-2.8/wx/clntdata.h \ + /usr/include/wx-2.8/wx/vector.h /usr/include/wx-2.8/wx/gdicmn.h \ + /usr/include/wx-2.8/wx/math.h /usr/include/wx-2.8/wx/cursor.h \ + /usr/include/wx-2.8/wx/gtk/cursor.h /usr/include/wx-2.8/wx/utils.h \ + /usr/include/wx-2.8/wx/filefn.h /usr/include/wx-2.8/wx/longlong.h \ + /usr/include/wx-2.8/wx/platinfo.h /usr/include/wx-2.8/wx/thread.h \ + /usr/include/wx-2.8/wx/app.h /usr/include/wx-2.8/wx/build.h \ + /usr/include/wx-2.8/wx/init.h /usr/include/wx-2.8/wx/gtk/app.h \ + /usr/include/wx-2.8/wx/stream.h /usr/include/wx-2.8/wx/stopwatch.h \ + /usr/include/wx-2.8/wx/module.h /usr/include/wx-2.8/wx/window.h \ + /usr/include/wx-2.8/wx/font.h /usr/include/wx-2.8/wx/gdiobj.h \ + /usr/include/wx-2.8/wx/gtk/font.h /usr/include/wx-2.8/wx/colour.h \ + /usr/include/wx-2.8/wx/variant.h /usr/include/wx-2.8/wx/datetime.h \ + /usr/include/wx-2.8/wx/gtk/colour.h /usr/include/wx-2.8/wx/region.h \ + /usr/include/wx-2.8/wx/gtk/region.h /usr/include/wx-2.8/wx/validate.h \ + /usr/include/wx-2.8/wx/palette.h \ + /usr/include/wx-2.8/wx/generic/paletteg.h /usr/include/wx-2.8/wx/accel.h \ + /usr/include/wx-2.8/wx/gtk/accel.h \ + /usr/include/wx-2.8/wx/generic/accel.h \ + /usr/include/wx-2.8/wx/gtk/window.h /usr/include/wx-2.8/wx/containr.h \ + /usr/include/wx-2.8/wx/panel.h /usr/include/wx-2.8/wx/generic/panelg.h \ + /usr/include/wx-2.8/wx/toplevel.h /usr/include/wx-2.8/wx/iconbndl.h \ + /usr/include/wx-2.8/wx/gtk/toplevel.h /usr/include/wx-2.8/wx/frame.h \ + /usr/include/wx-2.8/wx/gtk/frame.h /usr/include/wx-2.8/wx/bitmap.h \ + /usr/include/wx-2.8/wx/gtk/bitmap.h /usr/include/wx-2.8/wx/image.h \ + /usr/include/wx-2.8/wx/imagbmp.h /usr/include/wx-2.8/wx/imagpng.h \ + /usr/include/wx-2.8/wx/imaggif.h /usr/include/wx-2.8/wx/imagpcx.h \ + /usr/include/wx-2.8/wx/imagjpeg.h /usr/include/wx-2.8/wx/imagtga.h \ + /usr/include/wx-2.8/wx/imagtiff.h /usr/include/wx-2.8/wx/imagpnm.h \ + /usr/include/wx-2.8/wx/imagxpm.h /usr/include/wx-2.8/wx/imagiff.h \ + /usr/include/wx-2.8/wx/dc.h /usr/include/wx-2.8/wx/brush.h \ + /usr/include/wx-2.8/wx/gtk/brush.h /usr/include/wx-2.8/wx/pen.h \ + /usr/include/wx-2.8/wx/gtk/pen.h /usr/include/wx-2.8/wx/gtk/dc.h \ + /usr/include/wx-2.8/wx/dcgraph.h /usr/include/wx-2.8/wx/geometry.h \ + /usr/include/wx-2.8/wx/graphics.h /usr/include/wx-2.8/wx/dcclient.h \ + /usr/include/wx-2.8/wx/gtk/dcclient.h /usr/include/wx-2.8/wx/dcmemory.h \ + /usr/include/wx-2.8/wx/gtk/dcmemory.h /usr/include/wx-2.8/wx/dcprint.h \ + /usr/include/wx-2.8/wx/dcscreen.h /usr/include/wx-2.8/wx/gtk/dcscreen.h \ + /usr/include/wx-2.8/wx/button.h /usr/include/wx-2.8/wx/control.h \ + /usr/include/wx-2.8/wx/gtk/control.h /usr/include/wx-2.8/wx/gtk/button.h \ + /usr/include/wx-2.8/wx/menuitem.h /usr/include/wx-2.8/wx/gtk/menuitem.h \ + /usr/include/wx-2.8/wx/menu.h /usr/include/wx-2.8/wx/gtk/menu.h \ + /usr/include/wx-2.8/wx/icon.h /usr/include/wx-2.8/wx/iconloc.h \ + /usr/include/wx-2.8/wx/generic/icon.h /usr/include/wx-2.8/wx/dialog.h \ + /usr/include/wx-2.8/wx/gtk/dialog.h /usr/include/wx-2.8/wx/timer.h \ + /usr/include/wx-2.8/wx/gtk/timer.h /usr/include/wx-2.8/wx/settings.h \ + /usr/include/wx-2.8/wx/msgdlg.h /usr/include/wx-2.8/wx/gtk/msgdlg.h \ + /usr/include/wx-2.8/wx/cmndata.h /usr/include/wx-2.8/wx/encinfo.h \ + /usr/include/wx-2.8/wx/dataobj.h /usr/include/wx-2.8/wx/gtk/dataform.h \ + /usr/include/wx-2.8/wx/gtk/dataobj.h \ + /usr/include/wx-2.8/wx/gtk/dataobj2.h /usr/include/wx-2.8/wx/ctrlsub.h \ + /usr/include/wx-2.8/wx/bmpbuttn.h /usr/include/wx-2.8/wx/gtk/bmpbuttn.h \ + /usr/include/wx-2.8/wx/checkbox.h /usr/include/wx-2.8/wx/gtk/checkbox.h \ + /usr/include/wx-2.8/wx/checklst.h /usr/include/wx-2.8/wx/listbox.h \ + /usr/include/wx-2.8/wx/gtk/listbox.h \ + /usr/include/wx-2.8/wx/gtk/checklst.h /usr/include/wx-2.8/wx/choice.h \ + /usr/include/wx-2.8/wx/gtk/choice.h /usr/include/wx-2.8/wx/scrolbar.h \ + /usr/include/wx-2.8/wx/gtk/scrolbar.h /usr/include/wx-2.8/wx/stattext.h \ + /usr/include/wx-2.8/wx/gtk/stattext.h /usr/include/wx-2.8/wx/statbmp.h \ + /usr/include/wx-2.8/wx/gtk/statbmp.h /usr/include/wx-2.8/wx/statbox.h \ + /usr/include/wx-2.8/wx/gtk/statbox.h /usr/include/wx-2.8/wx/radiobox.h \ + /usr/include/wx-2.8/wx/gtk/radiobox.h /usr/include/wx-2.8/wx/radiobut.h \ + /usr/include/wx-2.8/wx/gtk/radiobut.h /usr/include/wx-2.8/wx/textctrl.h \ + /usr/include/wx-2.8/wx/ioswrap.h /usr/include/wx-2.8/wx/gtk/textctrl.h \ + /usr/include/wx-2.8/wx/slider.h /usr/include/wx-2.8/wx/gtk/slider.h \ + /usr/include/wx-2.8/wx/gauge.h /usr/include/wx-2.8/wx/gtk/gauge.h \ + /usr/include/wx-2.8/wx/scrolwin.h /usr/include/wx-2.8/wx/gtk/scrolwin.h \ + /usr/include/wx-2.8/wx/dirdlg.h /usr/include/wx-2.8/wx/gtk/dirdlg.h \ + /usr/include/wx-2.8/wx/generic/dirdlgg.h \ + /usr/include/wx-2.8/wx/toolbar.h /usr/include/wx-2.8/wx/tbarbase.h \ + /usr/include/wx-2.8/wx/gtk/tbargtk.h /usr/include/wx-2.8/wx/combobox.h \ + /usr/include/wx-2.8/wx/gtk/combobox.h /usr/include/wx-2.8/wx/layout.h \ + /usr/include/wx-2.8/wx/sizer.h /usr/include/wx-2.8/wx/mdi.h \ + /usr/include/wx-2.8/wx/gtk/mdi.h /usr/include/wx-2.8/wx/statusbr.h \ + /usr/include/wx-2.8/wx/generic/statusbr.h \ + /usr/include/wx-2.8/wx/choicdlg.h \ + /usr/include/wx-2.8/wx/generic/choicdgg.h \ + /usr/include/wx-2.8/wx/textdlg.h \ + /usr/include/wx-2.8/wx/generic/textdlgg.h \ + /usr/include/wx-2.8/wx/valtext.h /usr/include/wx-2.8/wx/filedlg.h \ + /usr/include/wx-2.8/wx/gtk/filedlg.h \ + /usr/include/wx-2.8/wx/generic/filedlgg.h \ + /usr/include/wx-2.8/wx/listctrl.h /usr/include/wx-2.8/wx/listbase.h \ + /usr/include/wx-2.8/wx/generic/listctrl.h \ + /usr/include/wx-2.8/wx/imaglist.h \ + /usr/include/wx-2.8/wx/generic/imaglist.h \ + ../../../Windows/Control/Dialog.h ../../../Windows/Window.h \ + ../../../Windows/Defs.h ../../../Windows/../Common/MyWindows.h \ + ../../../Common/MyString.h ../../../Common/MyVector.h \ + ../../../Common/Defs.h ../../../Windows/Control/ComboBox.h \ + ../../../Windows/Control/Window2.h ../../../Windows/Control/Edit.h \ + ../../../Windows/Control/ProgressBar.h \ + ../../../Windows/Control/StatusBar.h ../../../Windows/Control/ListView.h +Window2.o: ../../../Windows/Control/Window2.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../../Windows/Control/Window2.h ../../../Windows/Window.h \ + ../../../Windows/Defs.h ../../../Windows/../Common/MyWindows.h \ + ../../../Common/MyString.h ../../../Common/MyVector.h \ + ../../../Common/Defs.h +LangUtils.o: LangUtils.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h LangUtils.h ../../../Common/Lang.h \ + ../../../Common/MyVector.h ../../../Common/Defs.h \ + ../../../Common/MyString.h ../../../Windows/ResourceString.h \ + ../../../Common/MyString.h ../../../Common/StringConvert.h \ + ../../../Common/MyWindows.h ../../../Common/StringToInt.h \ + ../../../Windows/Synchronization.h ../../../Windows/Defs.h \ + ../../../Windows/../Common/MyWindows.h \ + ../../../Windows/../../C/Threads.h ../../../Windows/../../C/Types.h \ + ../../../Windows/Synchronization2.h ../../../Windows/Window.h \ + ../../../Windows/Defs.h ../../../Windows/FileFind.h \ + ../../../Windows/../Common/MyString.h ../../../Windows/FileName.h \ + ../../../Windows/../../C/Types.h RegistryUtils.h ProgramLocation.h +Lang.o: ../../../Common/Lang.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../../Common/Lang.h \ + ../../../Common/MyVector.h ../../../Common/Defs.h \ + ../../../Common/MyString.h ../../../Common/TextConfig.h \ + ../../../Common/../Windows/FileIO.h ../../../Common/MyString.h \ + ../../../Common/UTFConvert.h +CRC.o: ../../../Common/CRC.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../../Common/../../C/7zCrc.h \ + ../../../Common/../../C/Types.h +wine_date_and_time.o: ../../../myWindows/wine_date_and_time.cpp \ + ../../../myWindows/config.h ../../../include_windows/windows.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../include_windows/basetyps.h +wine_GetXXXDefaultLangID.o: \ + ../../../myWindows/wine_GetXXXDefaultLangID.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h diff --git a/CPP/7zip/UI/FileManager/makefile.list b/CPP/7zip/UI/FileManager/makefile.list new file mode 100644 index 0000000..c0e622d --- /dev/null +++ b/CPP/7zip/UI/FileManager/makefile.list @@ -0,0 +1,240 @@ +SRCS=\ +ClassDefs.cpp \ +../Agent/Agent.cpp \ +../Agent/AgentOut.cpp \ +../Agent/AgentProxy.cpp \ +../Agent/ArchiveFolder.cpp \ +../Agent/ArchiveFolderOpen.cpp \ +../Agent/ArchiveFolderOut.cpp \ +../Agent/UpdateCallbackAgent.cpp \ + App.cpp \ + wxFM.cpp \ + FM.cpp \ + FM_rc.cpp \ + OpenCallback.cpp \ + MyLoadMenu.cpp \ + Panel.cpp \ + PanelCrc.cpp \ + PanelCopy.cpp \ + PanelItems.cpp \ + PanelListNotify.cpp \ + PanelFolderChange.cpp \ + PanelItemOpen.cpp \ + PanelMenu.cpp \ + PanelOperations.cpp \ + PanelSelect.cpp \ + PanelSort.cpp \ + PanelSplitFile.cpp \ + PropertyName.cpp \ + RegistryUtils.cpp \ + ViewSettings.cpp \ + UpdateCallback100.cpp \ + RegistryAssociations.cpp \ + FileFolderPluginOpen.cpp \ + RootFolder.cpp \ + FSDrives.cpp \ + FSFolder.cpp \ + FSFolderCopy.cpp \ + FormatUtils.cpp \ + SysIconUtils.cpp \ + TextPairs.cpp \ + ../Common/ArchiveName.cpp \ + ../Common/CompressCall.cpp \ + ../Common/WorkDir.cpp \ + ExtractCallback.cpp \ + ProgramLocation.cpp \ + CopyDialog.cpp \ + CopyDialog_rc.cpp \ + ListViewDialog.cpp \ + ListViewDialog_rc.cpp \ + SplitDialog.cpp \ + SplitDialog_rc.cpp \ + SplitUtils.cpp \ + StringUtils.cpp \ + ProgressDialog2.cpp \ + ProgressDialog2_rc.cpp \ + MessagesDialog.cpp \ + MessagesDialog_rc.cpp \ + ComboDialog.cpp \ + ComboDialog_rc.cpp \ + OverwriteDialog.cpp \ + OverwriteDialog_rc.cpp \ + PasswordDialog.cpp \ + PasswordDialog_rc.cpp \ + ../Common/ArchiveExtractCallback.cpp \ + ../Common/ArchiveOpenCallback.cpp \ + ../Common/DefaultName.cpp \ + ../Common/EnumDirItems.cpp \ + ../Common/LoadCodecs.cpp \ + ../Common/OpenArchive.cpp \ + ../Common/ZipRegistry.cpp \ + ../Common/ExtractingFilePath.cpp \ + ../Common/PropIDUtils.cpp \ + ../Common/SortUtils.cpp \ + ../Common/UpdateAction.cpp \ + ../Common/UpdateCallback.cpp \ + ../Common/UpdatePair.cpp \ + ../Common/UpdateProduce.cpp \ + ../../Archive/Common/OutStreamWithCRC.cpp \ + ../../Common/FilePathAutoRename.cpp \ + ../../Common/FileStreams.cpp \ + ../../Common/ProgressUtils.cpp \ + ../../Common/StreamUtils.cpp \ + ../../../Common/TextConfig.cpp \ + ../../../Common/UTFConvert.cpp \ + ../../Compress/CopyCoder.cpp \ + ../../../Common/MyString.cpp \ + ../../../Common/MyVector.cpp \ + ../../../Common/StringConvert.cpp \ + ../../../Common/StringToInt.cpp \ + ../../../Common/IntToString.cpp \ + ../../../Common/MyWindows.cpp \ + ../../../Common/Wildcard.cpp \ + ../../../Windows/DLL.cpp \ + ../../../Windows/Error.cpp \ + ../../../Windows/FileDir.cpp \ + ../../../Windows/FileFind.cpp \ + ../../../Windows/FileIO.cpp \ + ../../../Windows/FileName.cpp \ + ../../../Windows/PropVariant.cpp \ + ../../../Windows/PropVariantConversions.cpp \ + ../../../Windows/Registry.cpp \ + ../../../Windows/Synchronization.cpp \ + ../../../Windows/Time.cpp \ + ../../../Windows/Clipboard.cpp \ + ../../../Windows/System.cpp \ + ../../../Windows/Window.cpp \ + ../../../Windows/Control/Dialog.cpp \ + ../../../Windows/Control/Controls.cpp \ + ../../../Windows/Control/Window2.cpp \ + LangUtils.cpp \ + ../../../Common/Lang.cpp \ + ../../../Common/CRC.cpp \ + ../../../myWindows/wine_date_and_time.cpp \ + ../../../myWindows/wine_GetXXXDefaultLangID.cpp + +SRCS_OUT=\ + OpenCallbackGUI.cpp \ + UpdateCallbackGUI.cpp \ + UpdateGUI.cpp \ + ../Common/ArchiveCommandLine.cpp \ + ../Common/Extract.cpp \ + ../Common/SetProperties.cpp \ + ../Common/TempFiles.cpp \ + ../Common/Update.cpp \ + ../Explorer/MyMessages.cpp \ + ../../../Common/CommandLineParser.cpp \ + ../../../Common/ListFileUtils.cpp \ + ../../../myWindows/myGetTickCount.cpp \ + + +SRCS_C=\ + ../../../../C/7zCrc.c \ + ../../../../C/7zCrcOpt.c \ + ../../../../C/Alloc.c \ + ../../../../C/Sha256.c \ + ../../../../C/Sort.c \ + ../../../../C/Threads.c + +############################################################## +ClassDefs.o : ClassDefs.cpp + $(CXX) $(CXXFLAGS) ClassDefs.cpp +Agent.o : ../Agent/Agent.cpp + $(CXX) $(CXXFLAGS) ../Agent/Agent.cpp +AgentOut.o : ../Agent/AgentOut.cpp + $(CXX) $(CXXFLAGS) ../Agent/AgentOut.cpp +AgentProxy.o : ../Agent/AgentProxy.cpp + $(CXX) $(CXXFLAGS) ../Agent/AgentProxy.cpp +ArchiveFolder.o : ../Agent/ArchiveFolder.cpp + $(CXX) $(CXXFLAGS) ../Agent/ArchiveFolder.cpp +ArchiveFolderOpen.o : ../Agent/ArchiveFolderOpen.cpp + $(CXX) $(CXXFLAGS) ../Agent/ArchiveFolderOpen.cpp +ArchiveFolderOut.o : ../Agent/ArchiveFolderOut.cpp + $(CXX) $(CXXFLAGS) ../Agent/ArchiveFolderOut.cpp +UpdateCallbackAgent.o : ../Agent/UpdateCallbackAgent.cpp + $(CXX) $(CXXFLAGS) ../Agent/UpdateCallbackAgent.cpp +############################################################## + +CompressDialog.o : CompressDialog.cpp + $(CXX) $(CXXFLAGS) CompressDialog.cpp +CompressDialog_rc.o : CompressDialog_rc.cpp + $(CXX) $(CXXFLAGS) CompressDialog_rc.cpp +ExtractDialog.o : ExtractDialog.cpp + $(CXX) $(CXXFLAGS) ExtractDialog.cpp +ExtractDialog_rc.o : ExtractDialog_rc.cpp + $(CXX) $(CXXFLAGS) ExtractDialog_rc.cpp +BenchmarkDialog.o : BenchmarkDialog.cpp + $(CXX) $(CXXFLAGS) BenchmarkDialog.cpp +BenchmarkDialog_rc.o : BenchmarkDialog_rc.cpp + $(CXX) $(CXXFLAGS) BenchmarkDialog_rc.cpp +ExtractGUI.o : ExtractGUI.cpp + $(CXX) $(CXXFLAGS) ExtractGUI.cpp +App.o : App.cpp + $(CXX) $(CXXFLAGS) App.cpp +wxFM.o : wxFM.cpp + $(CXX) $(CXXFLAGS) wxFM.cpp +FM.o : FM.cpp + $(CXX) $(CXXFLAGS) FM.cpp +FM_rc.o : FM_rc.cpp + $(CXX) $(CXXFLAGS) FM_rc.cpp +OpenCallback.o : OpenCallback.cpp + $(CXX) $(CXXFLAGS) OpenCallback.cpp +MyLoadMenu.o : MyLoadMenu.cpp + $(CXX) $(CXXFLAGS) MyLoadMenu.cpp +Panel.o : Panel.cpp + $(CXX) $(CXXFLAGS) Panel.cpp +PanelCrc.o : PanelCrc.cpp + $(CXX) $(CXXFLAGS) PanelCrc.cpp +PanelCopy.o : PanelCopy.cpp + $(CXX) $(CXXFLAGS) PanelCopy.cpp +PanelItems.o : PanelItems.cpp + $(CXX) $(CXXFLAGS) PanelItems.cpp +PanelListNotify.o : PanelListNotify.cpp + $(CXX) $(CXXFLAGS) PanelListNotify.cpp +PanelFolderChange.o : PanelFolderChange.cpp + $(CXX) $(CXXFLAGS) PanelFolderChange.cpp +PanelItemOpen.o : PanelItemOpen.cpp + $(CXX) $(CXXFLAGS) PanelItemOpen.cpp +PanelMenu.o : PanelMenu.cpp + $(CXX) $(CXXFLAGS) PanelMenu.cpp +PanelOperations.o : PanelOperations.cpp + $(CXX) $(CXXFLAGS) PanelOperations.cpp +PanelSelect.o : PanelSelect.cpp + $(CXX) $(CXXFLAGS) PanelSelect.cpp +PanelSort.o : PanelSort.cpp + $(CXX) $(CXXFLAGS) PanelSort.cpp +PanelSplitFile.o : PanelSplitFile.cpp + $(CXX) $(CXXFLAGS) PanelSplitFile.cpp +PropertyName.o : PropertyName.cpp + $(CXX) $(CXXFLAGS) PropertyName.cpp +RegistryUtils.o : RegistryUtils.cpp + $(CXX) $(CXXFLAGS) RegistryUtils.cpp +UpdateCallback100.o : UpdateCallback100.cpp + $(CXX) $(CXXFLAGS) UpdateCallback100.cpp +ViewSettings.o : ViewSettings.cpp + $(CXX) $(CXXFLAGS) ViewSettings.cpp +RegistryAssociations.o : RegistryAssociations.cpp + $(CXX) $(CXXFLAGS) RegistryAssociations.cpp +FileFolderPluginOpen.o : FileFolderPluginOpen.cpp + $(CXX) $(CXXFLAGS) FileFolderPluginOpen.cpp +RootFolder.o : RootFolder.cpp + $(CXX) $(CXXFLAGS) RootFolder.cpp +FSDrives.o : FSDrives.cpp + $(CXX) $(CXXFLAGS) FSDrives.cpp +FSFolder.o : FSFolder.cpp + $(CXX) $(CXXFLAGS) FSFolder.cpp +FSFolderCopy.o : FSFolderCopy.cpp + $(CXX) $(CXXFLAGS) FSFolderCopy.cpp +SysIconUtils.o : SysIconUtils.cpp + $(CXX) $(CXXFLAGS) SysIconUtils.cpp +TextPairs.o : TextPairs.cpp + $(CXX) $(CXXFLAGS) TextPairs.cpp +OpenCallbackGUI.o : OpenCallbackGUI.cpp + $(CXX) $(CXXFLAGS) OpenCallbackGUI.cpp +UpdateCallbackGUI.o : UpdateCallbackGUI.cpp + $(CXX) $(CXXFLAGS) UpdateCallbackGUI.cpp +UpdateGUI.o : UpdateGUI.cpp + $(CXX) $(CXXFLAGS) UpdateGUI.cpp + +include ../../../../makefile.rules + diff --git a/CPP/7zip/UI/FileManager/res/Add2PNG.h b/CPP/7zip/UI/FileManager/res/Add2PNG.h new file mode 100644 index 0000000..a507a30 --- /dev/null +++ b/CPP/7zip/UI/FileManager/res/Add2PNG.h @@ -0,0 +1,20 @@ +static const unsigned char ADD2_png[] = { +0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d, +0x49, 0x48, 0x44, 0x52, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x18, +0x04, 0x03, 0x00, 0x00, 0x00, 0x12, 0x59, 0x20, 0xcb, 0x00, 0x00, 0x00, +0x30, 0x50, 0x4c, 0x54, 0x45, 0xff, 0x00, 0xff, 0x80, 0x00, 0x00, 0x00, +0x80, 0x00, 0x80, 0x80, 0x00, 0x00, 0x00, 0x80, 0x80, 0x00, 0x80, 0x00, +0x80, 0x80, 0x80, 0x80, 0x80, 0xc0, 0xc0, 0xc0, 0xff, 0x00, 0x00, 0x00, +0xff, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, +0xff, 0xff, 0xff, 0xff, 0xff, 0xd8, 0x14, 0x3b, 0x9d, 0x00, 0x00, 0x00, +0x01, 0x74, 0x52, 0x4e, 0x53, 0x00, 0x40, 0xe6, 0xd8, 0x66, 0x00, 0x00, +0x00, 0x09, 0x70, 0x48, 0x59, 0x73, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x01, 0xea, 0x65, 0x16, 0xa4, 0x00, 0x00, 0x00, 0x3b, 0x49, +0x44, 0x41, 0x54, 0x78, 0x9c, 0x63, 0x60, 0xc0, 0x0b, 0x78, 0xef, 0xde, +0xbd, 0x8b, 0xe0, 0xac, 0x5a, 0xb5, 0xb6, 0x80, 0x6c, 0x0e, 0xc8, 0x28, +0x20, 0x07, 0x62, 0x20, 0x50, 0x18, 0x02, 0x40, 0x92, 0x64, 0x71, 0xe0, +0xa6, 0x81, 0x4c, 0x2f, 0x2f, 0x2f, 0x07, 0x72, 0x80, 0x64, 0x01, 0xf9, +0x0e, 0x85, 0x1a, 0x05, 0x01, 0x70, 0xa3, 0x70, 0x01, 0x00, 0x61, 0xed, +0x52, 0x81, 0x19, 0x73, 0x26, 0x18, 0x00, 0x00, 0x00, 0x00, 0x49, 0x45, +0x4e, 0x44, 0xae, 0x42, 0x60, 0x82, 0x00, +}; diff --git a/CPP/7zip/UI/FileManager/res/AddPNG.h b/CPP/7zip/UI/FileManager/res/AddPNG.h new file mode 100644 index 0000000..be1ac91 --- /dev/null +++ b/CPP/7zip/UI/FileManager/res/AddPNG.h @@ -0,0 +1,22 @@ +static const unsigned char ADD_png[] = { +0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d, +0x49, 0x48, 0x44, 0x52, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x24, +0x04, 0x03, 0x00, 0x00, 0x00, 0x3d, 0x6b, 0xa4, 0x39, 0x00, 0x00, 0x00, +0x30, 0x50, 0x4c, 0x54, 0x45, 0xff, 0x00, 0xff, 0x80, 0x00, 0x00, 0x00, +0x80, 0x00, 0x80, 0x80, 0x00, 0x00, 0x00, 0x80, 0x80, 0x00, 0x80, 0x00, +0x80, 0x80, 0x80, 0x80, 0x80, 0xc0, 0xc0, 0xc0, 0xff, 0x00, 0x00, 0x00, +0xff, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, +0xff, 0xff, 0xff, 0xff, 0xff, 0xd8, 0x14, 0x3b, 0x9d, 0x00, 0x00, 0x00, +0x01, 0x74, 0x52, 0x4e, 0x53, 0x00, 0x40, 0xe6, 0xd8, 0x66, 0x00, 0x00, +0x00, 0x09, 0x70, 0x48, 0x59, 0x73, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x01, 0xea, 0x65, 0x16, 0xa4, 0x00, 0x00, 0x00, 0x4d, 0x49, +0x44, 0x41, 0x54, 0x78, 0x9c, 0x63, 0x60, 0xa0, 0x01, 0xe0, 0xbd, 0x0b, +0x04, 0x17, 0xb0, 0x49, 0xac, 0x02, 0x82, 0xeb, 0x43, 0x5b, 0x02, 0xe4, +0xb7, 0xbb, 0x20, 0x09, 0x30, 0x03, 0x49, 0xe2, 0xd6, 0x2a, 0x24, 0xb0, +0xb6, 0x60, 0xc8, 0x4a, 0xa0, 0x7a, 0x10, 0x49, 0x82, 0xbd, 0xbc, 0xbc, +0xbc, 0x16, 0x1c, 0x24, 0x40, 0x46, 0x39, 0x92, 0x04, 0xe9, 0x81, 0x38, +0xf0, 0x12, 0x20, 0xbf, 0x61, 0x93, 0x60, 0x00, 0xf9, 0xad, 0x1c, 0x9b, +0x04, 0xcd, 0x00, 0x00, 0xa3, 0xbb, 0xae, 0x61, 0x7b, 0x93, 0x6d, 0x0f, +0x00, 0x00, 0x00, 0x00, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82, +0x00, +}; diff --git a/CPP/7zip/UI/FileManager/res/Copy2PNG.h b/CPP/7zip/UI/FileManager/res/Copy2PNG.h new file mode 100644 index 0000000..14781e2 --- /dev/null +++ b/CPP/7zip/UI/FileManager/res/Copy2PNG.h @@ -0,0 +1,22 @@ +static const unsigned char COPY2_png[] = { +0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d, +0x49, 0x48, 0x44, 0x52, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x18, +0x04, 0x03, 0x00, 0x00, 0x00, 0x12, 0x59, 0x20, 0xcb, 0x00, 0x00, 0x00, +0x30, 0x50, 0x4c, 0x54, 0x45, 0xff, 0x00, 0xff, 0x80, 0x00, 0x00, 0x00, +0x80, 0x00, 0x80, 0x80, 0x00, 0x00, 0x00, 0x80, 0x80, 0x00, 0x80, 0x00, +0x80, 0x80, 0x80, 0x80, 0x80, 0xc0, 0xc0, 0xc0, 0xff, 0x00, 0x00, 0x00, +0xff, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, +0xff, 0xff, 0xff, 0xff, 0xff, 0xd8, 0x14, 0x3b, 0x9d, 0x00, 0x00, 0x00, +0x01, 0x74, 0x52, 0x4e, 0x53, 0x00, 0x40, 0xe6, 0xd8, 0x66, 0x00, 0x00, +0x00, 0x09, 0x70, 0x48, 0x59, 0x73, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x01, 0xea, 0x65, 0x16, 0xa4, 0x00, 0x00, 0x00, 0x52, 0x49, +0x44, 0x41, 0x54, 0x78, 0x9c, 0x95, 0xce, 0x31, 0x0a, 0xc0, 0x30, 0x08, +0x40, 0x51, 0xb7, 0xdc, 0xd4, 0x4d, 0x70, 0xf3, 0x9a, 0x99, 0xec, 0xe4, +0x5d, 0x9a, 0x18, 0x68, 0xff, 0x1a, 0xc9, 0xf2, 0x79, 0x22, 0x11, 0xb9, +0x9a, 0xc9, 0x28, 0x46, 0x92, 0xd2, 0x18, 0xda, 0x54, 0xb5, 0x5e, 0xa5, +0xda, 0x59, 0xf0, 0xd4, 0x3d, 0x93, 0x61, 0x8c, 0x4d, 0xbf, 0x38, 0xe2, +0xe9, 0x6b, 0x7e, 0xae, 0x2d, 0x90, 0x11, 0x3e, 0x22, 0xb2, 0xe1, 0xfb, +0x81, 0x23, 0x00, 0x52, 0x00, 0x21, 0x5c, 0xcd, 0x0b, 0x7e, 0x4c, 0x37, +0xbb, 0x3f, 0x86, 0x84, 0x7d, 0x00, 0x00, 0x00, 0x00, 0x49, 0x45, 0x4e, +0x44, 0xae, 0x42, 0x60, 0x82, 0x00, +}; diff --git a/CPP/7zip/UI/FileManager/res/CopyPNG.h b/CPP/7zip/UI/FileManager/res/CopyPNG.h new file mode 100644 index 0000000..69770b9 --- /dev/null +++ b/CPP/7zip/UI/FileManager/res/CopyPNG.h @@ -0,0 +1,26 @@ +static const unsigned char COPY_png[] = { +0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d, +0x49, 0x48, 0x44, 0x52, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x24, +0x04, 0x03, 0x00, 0x00, 0x00, 0x3d, 0x6b, 0xa4, 0x39, 0x00, 0x00, 0x00, +0x30, 0x50, 0x4c, 0x54, 0x45, 0xff, 0x00, 0xff, 0x80, 0x00, 0x00, 0x00, +0x80, 0x00, 0x80, 0x80, 0x00, 0x00, 0x00, 0x80, 0x80, 0x00, 0x80, 0x00, +0x80, 0x80, 0x80, 0x80, 0x80, 0xc0, 0xc0, 0xc0, 0xff, 0x00, 0x00, 0x00, +0xff, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, +0xff, 0xff, 0xff, 0xff, 0xff, 0xd8, 0x14, 0x3b, 0x9d, 0x00, 0x00, 0x00, +0x01, 0x74, 0x52, 0x4e, 0x53, 0x00, 0x40, 0xe6, 0xd8, 0x66, 0x00, 0x00, +0x00, 0x09, 0x70, 0x48, 0x59, 0x73, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x01, 0xea, 0x65, 0x16, 0xa4, 0x00, 0x00, 0x00, 0x80, 0x49, +0x44, 0x41, 0x54, 0x78, 0x9c, 0xbd, 0xd1, 0x31, 0x0e, 0x80, 0x20, 0x0c, +0x85, 0xe1, 0x6e, 0x4e, 0x5c, 0x93, 0x8d, 0xa4, 0x1b, 0xd7, 0x64, 0x2a, +0x53, 0xef, 0xe2, 0x43, 0x23, 0x12, 0xed, 0x5b, 0xe9, 0x60, 0x62, 0x7e, +0xbf, 0x00, 0x22, 0xb2, 0x7d, 0x1a, 0x0b, 0xce, 0x82, 0x31, 0x62, 0x85, +0x85, 0x4c, 0x88, 0x65, 0x42, 0x2c, 0x13, 0x82, 0x10, 0x13, 0x84, 0x85, +0x24, 0x77, 0xec, 0xdf, 0xc7, 0x8c, 0xf0, 0x92, 0x84, 0x17, 0xbd, 0x3e, +0xbe, 0xa7, 0xb1, 0x50, 0x58, 0x98, 0xe4, 0x17, 0x0a, 0x0b, 0x9d, 0xad, +0xa1, 0x24, 0xf4, 0xb9, 0x38, 0x0e, 0xa0, 0xcb, 0x39, 0x1e, 0x20, 0x52, +0x6b, 0x55, 0x39, 0xf0, 0xac, 0xb6, 0x82, 0xef, 0xbf, 0x52, 0x12, 0x42, +0x30, 0xee, 0x23, 0x04, 0x08, 0x31, 0xc0, 0x9d, 0xc7, 0x40, 0x8c, 0x00, +0x71, 0x02, 0x84, 0x81, 0xcd, 0x73, 0x02, 0xb6, 0x2b, 0x69, 0xbd, 0x15, +0x92, 0x2f, 0xff, 0x00, 0x00, 0x00, 0x00, 0x49, 0x45, 0x4e, 0x44, 0xae, +0x42, 0x60, 0x82, 0x00, +}; diff --git a/CPP/7zip/UI/FileManager/res/Delete2PNG.h b/CPP/7zip/UI/FileManager/res/Delete2PNG.h new file mode 100644 index 0000000..5f09077 --- /dev/null +++ b/CPP/7zip/UI/FileManager/res/Delete2PNG.h @@ -0,0 +1,23 @@ +static const unsigned char DELETE2_png[] = { +0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d, +0x49, 0x48, 0x44, 0x52, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x18, +0x04, 0x03, 0x00, 0x00, 0x00, 0x12, 0x59, 0x20, 0xcb, 0x00, 0x00, 0x00, +0x30, 0x50, 0x4c, 0x54, 0x45, 0xff, 0x00, 0xff, 0x80, 0x00, 0x00, 0x00, +0x80, 0x00, 0x80, 0x80, 0x00, 0x00, 0x00, 0x80, 0x80, 0x00, 0x80, 0x00, +0x80, 0x80, 0x80, 0x80, 0x80, 0xc0, 0xc0, 0xc0, 0xff, 0x00, 0x00, 0x00, +0xff, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, +0xff, 0xff, 0xff, 0xff, 0xff, 0xd8, 0x14, 0x3b, 0x9d, 0x00, 0x00, 0x00, +0x01, 0x74, 0x52, 0x4e, 0x53, 0x00, 0x40, 0xe6, 0xd8, 0x66, 0x00, 0x00, +0x00, 0x09, 0x70, 0x48, 0x59, 0x73, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x01, 0xea, 0x65, 0x16, 0xa4, 0x00, 0x00, 0x00, 0x5a, 0x49, +0x44, 0x41, 0x54, 0x78, 0x9c, 0x9d, 0x8e, 0xc1, 0x11, 0x00, 0x21, 0x08, +0x03, 0x69, 0xc0, 0x5e, 0x6d, 0xe0, 0x0a, 0xc9, 0xc3, 0x9e, 0xf8, 0x31, +0x76, 0x73, 0x80, 0x06, 0x7d, 0xde, 0x5c, 0x46, 0xf3, 0x60, 0x27, 0x10, +0x91, 0xcf, 0x6a, 0x65, 0xae, 0xa9, 0x34, 0x9f, 0x61, 0x6c, 0x8b, 0x19, +0xa0, 0xcb, 0x92, 0x60, 0xc4, 0xef, 0x44, 0xfe, 0x6c, 0x6f, 0x03, 0x0a, +0x24, 0x22, 0x58, 0x29, 0x82, 0x24, 0x2a, 0x77, 0xe6, 0x00, 0x9e, 0xc9, +0xc4, 0x83, 0xd3, 0xc0, 0xae, 0x06, 0xbe, 0xaa, 0x55, 0x03, 0xa3, 0x05, +0xea, 0xb4, 0x1f, 0x7a, 0x01, 0xc5, 0x78, 0x3b, 0x10, 0xc3, 0x1f, 0xc3, +0xce, 0x00, 0x00, 0x00, 0x00, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, +0x82, 0x00, +}; diff --git a/CPP/7zip/UI/FileManager/res/DeletePNG.h b/CPP/7zip/UI/FileManager/res/DeletePNG.h new file mode 100644 index 0000000..7795bc0 --- /dev/null +++ b/CPP/7zip/UI/FileManager/res/DeletePNG.h @@ -0,0 +1,26 @@ +static const unsigned char DELETE_png[] = { +0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d, +0x49, 0x48, 0x44, 0x52, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x24, +0x04, 0x03, 0x00, 0x00, 0x00, 0x3d, 0x6b, 0xa4, 0x39, 0x00, 0x00, 0x00, +0x30, 0x50, 0x4c, 0x54, 0x45, 0xff, 0x00, 0xff, 0x80, 0x00, 0x00, 0x00, +0x80, 0x00, 0x80, 0x80, 0x00, 0x00, 0x00, 0x80, 0x80, 0x00, 0x80, 0x00, +0x80, 0x80, 0x80, 0x80, 0x80, 0xc0, 0xc0, 0xc0, 0xff, 0x00, 0x00, 0x00, +0xff, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, +0xff, 0xff, 0xff, 0xff, 0xff, 0xd8, 0x14, 0x3b, 0x9d, 0x00, 0x00, 0x00, +0x01, 0x74, 0x52, 0x4e, 0x53, 0x00, 0x40, 0xe6, 0xd8, 0x66, 0x00, 0x00, +0x00, 0x09, 0x70, 0x48, 0x59, 0x73, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x01, 0xea, 0x65, 0x16, 0xa4, 0x00, 0x00, 0x00, 0x81, 0x49, +0x44, 0x41, 0x54, 0x78, 0x9c, 0xc5, 0xd1, 0xc1, 0x0d, 0x80, 0x30, 0x08, +0x05, 0x50, 0x17, 0x60, 0x57, 0xd7, 0xe1, 0xd0, 0x9d, 0x7a, 0x23, 0x6e, +0x63, 0x2c, 0x14, 0x2d, 0xff, 0x7b, 0x55, 0x2e, 0xfd, 0x31, 0xbc, 0x58, +0xe8, 0xb6, 0x7d, 0x57, 0x1d, 0x82, 0x97, 0xb4, 0x1a, 0xa2, 0x0e, 0xed, +0x25, 0x44, 0x9f, 0x6a, 0x5b, 0x43, 0x02, 0xf5, 0xce, 0x0c, 0xb7, 0x18, +0x9d, 0xe3, 0xdc, 0x09, 0xb9, 0x0e, 0x5b, 0x6f, 0x35, 0x08, 0x82, 0x20, +0x08, 0x82, 0x10, 0xe0, 0x84, 0x00, 0x27, 0x0c, 0x04, 0x41, 0xc0, 0x66, +0x78, 0x8a, 0x8e, 0xdf, 0xe3, 0x1f, 0x2f, 0x80, 0x90, 0x9c, 0x83, 0x01, +0xab, 0xbb, 0xcd, 0x2b, 0x09, 0x92, 0xd8, 0x12, 0x90, 0x39, 0x03, 0x90, +0x5c, 0x2b, 0x79, 0x41, 0x1f, 0x5a, 0xf0, 0x05, 0xad, 0x84, 0x49, 0x66, +0x9f, 0xd4, 0x75, 0x19, 0x84, 0x3f, 0xeb, 0x04, 0x1a, 0xa7, 0x7e, 0xab, +0x5a, 0xf7, 0xe4, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x49, 0x45, 0x4e, 0x44, +0xae, 0x42, 0x60, 0x82, 0x00, +}; diff --git a/CPP/7zip/UI/FileManager/res/Extract2PNG.h b/CPP/7zip/UI/FileManager/res/Extract2PNG.h new file mode 100644 index 0000000..ee01ef6 --- /dev/null +++ b/CPP/7zip/UI/FileManager/res/Extract2PNG.h @@ -0,0 +1,18 @@ +static const unsigned char EXTRACT2_png[] = { +0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d, +0x49, 0x48, 0x44, 0x52, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x18, +0x04, 0x03, 0x00, 0x00, 0x00, 0x12, 0x59, 0x20, 0xcb, 0x00, 0x00, 0x00, +0x30, 0x50, 0x4c, 0x54, 0x45, 0xff, 0x00, 0xff, 0x80, 0x00, 0x00, 0x00, +0x80, 0x00, 0x80, 0x80, 0x00, 0x00, 0x00, 0x80, 0x80, 0x00, 0x80, 0x00, +0x80, 0x80, 0x80, 0x80, 0x80, 0xc0, 0xc0, 0xc0, 0xff, 0x00, 0x00, 0x00, +0xff, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, +0xff, 0xff, 0xff, 0xff, 0xff, 0xd8, 0x14, 0x3b, 0x9d, 0x00, 0x00, 0x00, +0x01, 0x74, 0x52, 0x4e, 0x53, 0x00, 0x40, 0xe6, 0xd8, 0x66, 0x00, 0x00, +0x00, 0x09, 0x70, 0x48, 0x59, 0x73, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x01, 0xea, 0x65, 0x16, 0xa4, 0x00, 0x00, 0x00, 0x22, 0x49, +0x44, 0x41, 0x54, 0x78, 0x9c, 0x63, 0x60, 0xa0, 0x17, 0xe0, 0xbd, 0x0b, +0x05, 0x17, 0x40, 0x9c, 0x33, 0x50, 0x70, 0x9d, 0x5c, 0x0e, 0xcc, 0x34, +0x10, 0x87, 0xa1, 0x1c, 0x06, 0xe8, 0xe6, 0x1b, 0x00, 0xa6, 0x78, 0x38, +0x15, 0x21, 0xee, 0x22, 0xc7, 0x00, 0x00, 0x00, 0x00, 0x49, 0x45, 0x4e, +0x44, 0xae, 0x42, 0x60, 0x82, 0x00, +}; diff --git a/CPP/7zip/UI/FileManager/res/ExtractPNG.h b/CPP/7zip/UI/FileManager/res/ExtractPNG.h new file mode 100644 index 0000000..807f8e4 --- /dev/null +++ b/CPP/7zip/UI/FileManager/res/ExtractPNG.h @@ -0,0 +1,18 @@ +static const unsigned char EXTRACT_png[] = { +0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d, +0x49, 0x48, 0x44, 0x52, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x24, +0x04, 0x03, 0x00, 0x00, 0x00, 0x3d, 0x6b, 0xa4, 0x39, 0x00, 0x00, 0x00, +0x30, 0x50, 0x4c, 0x54, 0x45, 0xff, 0x00, 0xff, 0x80, 0x00, 0x00, 0x00, +0x80, 0x00, 0x80, 0x80, 0x00, 0x00, 0x00, 0x80, 0x80, 0x00, 0x80, 0x00, +0x80, 0x80, 0x80, 0x80, 0x80, 0xc0, 0xc0, 0xc0, 0xff, 0x00, 0x00, 0x00, +0xff, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, +0xff, 0xff, 0xff, 0xff, 0xff, 0xd8, 0x14, 0x3b, 0x9d, 0x00, 0x00, 0x00, +0x01, 0x74, 0x52, 0x4e, 0x53, 0x00, 0x40, 0xe6, 0xd8, 0x66, 0x00, 0x00, +0x00, 0x09, 0x70, 0x48, 0x59, 0x73, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x01, 0xea, 0x65, 0x16, 0xa4, 0x00, 0x00, 0x00, 0x28, 0x49, +0x44, 0x41, 0x54, 0x78, 0x9c, 0x63, 0x60, 0x18, 0x05, 0xa4, 0x81, 0xbb, +0x28, 0x00, 0x49, 0xe2, 0xce, 0x19, 0x24, 0x70, 0xb6, 0x60, 0xc8, 0x4a, +0xa0, 0x7a, 0x10, 0x49, 0x82, 0xbd, 0x1c, 0x19, 0x20, 0x49, 0x8c, 0x02, +0x8a, 0x00, 0x00, 0x11, 0x6c, 0x7c, 0x67, 0x00, 0x94, 0xd4, 0x2c, 0x00, +0x00, 0x00, 0x00, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82, 0x00, +}; diff --git a/CPP/7zip/UI/FileManager/res/Info2PNG.h b/CPP/7zip/UI/FileManager/res/Info2PNG.h new file mode 100644 index 0000000..b517084 --- /dev/null +++ b/CPP/7zip/UI/FileManager/res/Info2PNG.h @@ -0,0 +1,21 @@ +static const unsigned char INFO2_png[] = { +0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d, +0x49, 0x48, 0x44, 0x52, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x18, +0x04, 0x03, 0x00, 0x00, 0x00, 0x12, 0x59, 0x20, 0xcb, 0x00, 0x00, 0x00, +0x30, 0x50, 0x4c, 0x54, 0x45, 0xff, 0x00, 0xff, 0x80, 0x00, 0x00, 0x00, +0x80, 0x00, 0x80, 0x80, 0x00, 0x00, 0x00, 0x80, 0x80, 0x00, 0x80, 0x00, +0x80, 0x80, 0x80, 0x80, 0x80, 0xc0, 0xc0, 0xc0, 0xff, 0x00, 0x00, 0x00, +0xff, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, +0xff, 0xff, 0xff, 0xff, 0xff, 0xd8, 0x14, 0x3b, 0x9d, 0x00, 0x00, 0x00, +0x01, 0x74, 0x52, 0x4e, 0x53, 0x00, 0x40, 0xe6, 0xd8, 0x66, 0x00, 0x00, +0x00, 0x09, 0x70, 0x48, 0x59, 0x73, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x01, 0xea, 0x65, 0x16, 0xa4, 0x00, 0x00, 0x00, 0x46, 0x49, +0x44, 0x41, 0x54, 0x78, 0x9c, 0x63, 0x60, 0x40, 0x07, 0xbc, 0x77, 0xef, +0x5e, 0x40, 0x70, 0x76, 0xef, 0xbe, 0x8e, 0x83, 0x73, 0xf7, 0x2e, 0x82, +0xc3, 0x50, 0x5e, 0x5e, 0x8e, 0x61, 0x10, 0x54, 0x15, 0xc2, 0x34, 0xa0, +0x7e, 0x84, 0x01, 0xbc, 0x77, 0x91, 0x4d, 0xab, 0xc5, 0x6d, 0x0f, 0xe9, +0x1c, 0x90, 0xd1, 0x70, 0x5b, 0x41, 0x96, 0xc2, 0xa5, 0x40, 0xce, 0x41, +0x38, 0xbb, 0xbc, 0x1c, 0x97, 0xb3, 0x09, 0x03, 0x00, 0x3a, 0xb2, 0x32, +0x23, 0xbc, 0x78, 0x77, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x49, 0x45, 0x4e, +0x44, 0xae, 0x42, 0x60, 0x82, 0x00, +}; diff --git a/CPP/7zip/UI/FileManager/res/InfoPNG.h b/CPP/7zip/UI/FileManager/res/InfoPNG.h new file mode 100644 index 0000000..1810983 --- /dev/null +++ b/CPP/7zip/UI/FileManager/res/InfoPNG.h @@ -0,0 +1,22 @@ +static const unsigned char INFO_png[] = { +0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d, +0x49, 0x48, 0x44, 0x52, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x24, +0x04, 0x03, 0x00, 0x00, 0x00, 0x3d, 0x6b, 0xa4, 0x39, 0x00, 0x00, 0x00, +0x30, 0x50, 0x4c, 0x54, 0x45, 0xff, 0x00, 0xff, 0x80, 0x00, 0x00, 0x00, +0x80, 0x00, 0x80, 0x80, 0x00, 0x00, 0x00, 0x80, 0x80, 0x00, 0x80, 0x00, +0x80, 0x80, 0x80, 0x80, 0x80, 0xc0, 0xc0, 0xc0, 0xff, 0x00, 0x00, 0x00, +0xff, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, +0xff, 0xff, 0xff, 0xff, 0xff, 0xd8, 0x14, 0x3b, 0x9d, 0x00, 0x00, 0x00, +0x01, 0x74, 0x52, 0x4e, 0x53, 0x00, 0x40, 0xe6, 0xd8, 0x66, 0x00, 0x00, +0x00, 0x09, 0x70, 0x48, 0x59, 0x73, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x01, 0xea, 0x65, 0x16, 0xa4, 0x00, 0x00, 0x00, 0x57, 0x49, +0x44, 0x41, 0x54, 0x78, 0x9c, 0x63, 0x60, 0xa0, 0x05, 0xb8, 0x0b, 0x04, +0x17, 0xb0, 0x49, 0xdc, 0xde, 0xbd, 0x7b, 0xf7, 0x75, 0xea, 0x48, 0x80, +0xec, 0xc0, 0x2a, 0xc1, 0x5e, 0x0e, 0x04, 0xc4, 0xba, 0x94, 0x2c, 0xc0, +0x7b, 0x17, 0x87, 0x07, 0x79, 0x77, 0xef, 0xc6, 0xee, 0x5c, 0xdc, 0x12, +0x77, 0x71, 0x79, 0xb0, 0x9c, 0x8a, 0x61, 0x35, 0x18, 0x25, 0x20, 0x3e, +0xbf, 0x7b, 0x17, 0x53, 0x02, 0x1c, 0x56, 0xbb, 0xf7, 0x16, 0x10, 0x2f, +0x71, 0x17, 0x02, 0x30, 0x24, 0x18, 0xca, 0x21, 0x00, 0x53, 0x62, 0x30, +0x01, 0x00, 0xd3, 0xa5, 0x67, 0xc0, 0x11, 0x9d, 0x79, 0xc0, 0x00, 0x00, +0x00, 0x00, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82, 0x00, +}; diff --git a/CPP/7zip/UI/FileManager/res/Move2PNG.h b/CPP/7zip/UI/FileManager/res/Move2PNG.h new file mode 100644 index 0000000..6eafd8d --- /dev/null +++ b/CPP/7zip/UI/FileManager/res/Move2PNG.h @@ -0,0 +1,21 @@ +static const unsigned char MOVE2_png[] = { +0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d, +0x49, 0x48, 0x44, 0x52, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x18, +0x04, 0x03, 0x00, 0x00, 0x00, 0x12, 0x59, 0x20, 0xcb, 0x00, 0x00, 0x00, +0x30, 0x50, 0x4c, 0x54, 0x45, 0xff, 0x00, 0xff, 0x80, 0x00, 0x00, 0x00, +0x80, 0x00, 0x80, 0x80, 0x00, 0x00, 0x00, 0x80, 0x80, 0x00, 0x80, 0x00, +0x80, 0x80, 0x80, 0x80, 0x80, 0xc0, 0xc0, 0xc0, 0xff, 0x00, 0x00, 0x00, +0xff, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, +0xff, 0xff, 0xff, 0xff, 0xff, 0xd8, 0x14, 0x3b, 0x9d, 0x00, 0x00, 0x00, +0x01, 0x74, 0x52, 0x4e, 0x53, 0x00, 0x40, 0xe6, 0xd8, 0x66, 0x00, 0x00, +0x00, 0x09, 0x70, 0x48, 0x59, 0x73, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x01, 0xea, 0x65, 0x16, 0xa4, 0x00, 0x00, 0x00, 0x4c, 0x49, +0x44, 0x41, 0x54, 0x78, 0x9c, 0x95, 0xce, 0xb1, 0x0d, 0xc0, 0x20, 0x0c, +0x44, 0xd1, 0xeb, 0xb2, 0x18, 0xad, 0x77, 0xa1, 0x63, 0x4d, 0x0a, 0x4b, +0xa9, 0xbc, 0x4b, 0x82, 0x41, 0xf0, 0x5b, 0xae, 0xfb, 0x3c, 0xc9, 0x42, +0xba, 0x5a, 0x67, 0x04, 0xc3, 0x49, 0x6e, 0x8c, 0x92, 0x14, 0x39, 0x2f, +0x36, 0xdf, 0xd6, 0x3a, 0xc3, 0x18, 0x83, 0x8e, 0x54, 0xc4, 0xcb, 0x6b, +0x3f, 0xe8, 0x69, 0x63, 0x9e, 0xb0, 0x7f, 0x50, 0x11, 0x00, 0x05, 0x40, +0x84, 0xab, 0x7d, 0xa9, 0x14, 0x30, 0x23, 0x6c, 0x8b, 0xd3, 0x1c, 0x00, +0x00, 0x00, 0x00, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82, 0x00, +}; diff --git a/CPP/7zip/UI/FileManager/res/MovePNG.h b/CPP/7zip/UI/FileManager/res/MovePNG.h new file mode 100644 index 0000000..a0dc143 --- /dev/null +++ b/CPP/7zip/UI/FileManager/res/MovePNG.h @@ -0,0 +1,25 @@ +static const unsigned char MOVE_png[] = { +0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d, +0x49, 0x48, 0x44, 0x52, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x24, +0x04, 0x03, 0x00, 0x00, 0x00, 0x3d, 0x6b, 0xa4, 0x39, 0x00, 0x00, 0x00, +0x30, 0x50, 0x4c, 0x54, 0x45, 0xff, 0x00, 0xff, 0x80, 0x00, 0x00, 0x00, +0x80, 0x00, 0x80, 0x80, 0x00, 0x00, 0x00, 0x80, 0x80, 0x00, 0x80, 0x00, +0x80, 0x80, 0x80, 0x80, 0x80, 0xc0, 0xc0, 0xc0, 0xff, 0x00, 0x00, 0x00, +0xff, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, +0xff, 0xff, 0xff, 0xff, 0xff, 0xd8, 0x14, 0x3b, 0x9d, 0x00, 0x00, 0x00, +0x01, 0x74, 0x52, 0x4e, 0x53, 0x00, 0x40, 0xe6, 0xd8, 0x66, 0x00, 0x00, +0x00, 0x09, 0x70, 0x48, 0x59, 0x73, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x01, 0xea, 0x65, 0x16, 0xa4, 0x00, 0x00, 0x00, 0x71, 0x49, +0x44, 0x41, 0x54, 0x78, 0x9c, 0xbd, 0xd1, 0xb1, 0x0d, 0xc0, 0x20, 0x0c, +0x05, 0x51, 0x2f, 0xc0, 0x56, 0x6e, 0xd9, 0x85, 0x2e, 0x6b, 0x52, 0x58, +0xa2, 0x62, 0x97, 0x98, 0x22, 0x84, 0x10, 0x5f, 0xcb, 0x6f, 0x4f, 0x4f, +0x08, 0x10, 0x39, 0xbe, 0x4a, 0xa1, 0x53, 0x30, 0x22, 0x96, 0x29, 0x28, +0x10, 0x53, 0x20, 0xa6, 0x40, 0x3c, 0xc4, 0xc4, 0xc3, 0x42, 0x52, 0x9f, +0x1b, 0xe1, 0x25, 0x49, 0xbf, 0xab, 0x14, 0x32, 0x85, 0x49, 0x7e, 0x21, +0x53, 0x68, 0x74, 0x46, 0x81, 0xd0, 0xe6, 0xe1, 0xdb, 0x3d, 0x1e, 0x20, +0x72, 0xcd, 0xd9, 0x0a, 0xf6, 0xb7, 0x2a, 0x10, 0x42, 0x30, 0xfe, 0x23, +0x04, 0x1e, 0x62, 0xe0, 0x7f, 0x1e, 0x03, 0x31, 0x00, 0xd2, 0x01, 0x08, +0x81, 0xc3, 0xbb, 0x01, 0xf5, 0x5d, 0x59, 0xea, 0x53, 0xc3, 0x86, 0x77, +0x00, 0x00, 0x00, 0x00, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82, +0x00, +}; diff --git a/CPP/7zip/UI/FileManager/res/ParentFolder.h b/CPP/7zip/UI/FileManager/res/ParentFolder.h new file mode 100644 index 0000000..544b9c7 --- /dev/null +++ b/CPP/7zip/UI/FileManager/res/ParentFolder.h @@ -0,0 +1,91 @@ +static unsigned char PARENT_FOLDER_png[] = { +0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d, +0x49, 0x48, 0x44, 0x52, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, +0x08, 0x03, 0x00, 0x00, 0x00, 0x28, 0x2d, 0x0f, 0x53, 0x00, 0x00, 0x03, +0x00, 0x50, 0x4c, 0x54, 0x45, 0x01, 0x67, 0x01, 0x08, 0x6e, 0x05, 0x08, +0x77, 0x04, 0x0c, 0x79, 0x07, 0x11, 0x70, 0x0a, 0x11, 0x7c, 0x09, 0x16, +0x7c, 0x0c, 0x17, 0x79, 0x13, 0x1f, 0x78, 0x1f, 0x37, 0x7a, 0x0b, 0x21, +0x7d, 0x21, 0x14, 0x8c, 0x0b, 0x19, 0x98, 0x0d, 0x1c, 0xa0, 0x0f, 0x22, +0x81, 0x17, 0x27, 0x8c, 0x14, 0x27, 0x8f, 0x14, 0x26, 0x8b, 0x1a, 0x27, +0x8c, 0x1b, 0x2f, 0x94, 0x1f, 0x31, 0x81, 0x1b, 0x2f, 0x81, 0x2f, 0x3b, +0x85, 0x2e, 0x3d, 0x8a, 0x3d, 0x3e, 0x8a, 0x3f, 0x3c, 0xa1, 0x1f, 0x34, +0xb3, 0x1b, 0x41, 0x8c, 0x3e, 0x51, 0x8e, 0x29, 0x43, 0xad, 0x22, 0x44, +0xb7, 0x22, 0x49, 0xbd, 0x25, 0x59, 0xbe, 0x39, 0x61, 0x93, 0x2e, 0x4e, +0x8f, 0x41, 0x6b, 0xa5, 0x6c, 0x6c, 0xa6, 0x6d, 0x79, 0xad, 0x7a, 0x57, +0xc4, 0x2c, 0x67, 0xcc, 0x34, 0x6c, 0xd1, 0x39, 0x60, 0xc5, 0x40, 0x75, +0xda, 0x42, 0x74, 0xd8, 0x47, 0x7f, 0xe3, 0x4c, 0xb9, 0x9c, 0x11, 0x81, +0xac, 0x47, 0x85, 0xea, 0x53, 0x8e, 0xf4, 0x5c, 0xcc, 0x99, 0x01, 0xd6, +0xa5, 0x17, 0xd1, 0xa4, 0x1e, 0xd3, 0xa9, 0x2c, 0xdd, 0xaf, 0x35, 0xde, +0xb5, 0x36, 0xdf, 0xba, 0x3c, 0xe6, 0xbc, 0x3e, 0xde, 0xbe, 0x51, 0xd9, +0xb9, 0x58, 0xdb, 0xbe, 0x66, 0xe2, 0xb8, 0x43, 0xe6, 0xbc, 0x51, 0xdf, +0xc3, 0x6b, 0xe6, 0xc2, 0x44, 0xec, 0xc6, 0x4e, 0xea, 0xc0, 0x57, 0xf2, +0xcc, 0x5b, 0xe2, 0xc6, 0x71, 0xe6, 0xc9, 0x79, 0xe6, 0xd1, 0x63, 0xf2, +0xd5, 0x64, 0xf5, 0xdf, 0x79, 0xff, 0xdc, 0x77, 0xef, 0xe0, 0x7b, 0xfc, +0xe4, 0x7c, 0x89, 0xb7, 0x8b, 0x8f, 0xbc, 0x87, 0xb7, 0xd3, 0xba, 0xdf, +0xec, 0x86, 0xdf, 0xe6, 0xaf, 0xe3, 0xce, 0x92, 0xe4, 0xd3, 0x9e, 0xe4, +0xd4, 0x9e, 0xec, 0xd9, 0x99, 0xec, 0xd9, 0x9f, 0xfc, 0xd4, 0x83, 0xff, +0xdb, 0x89, 0xe5, 0xd6, 0xa3, 0xe5, 0xd7, 0xab, 0xef, 0xdf, 0xab, 0xff, +0xe8, 0x83, 0xff, 0xea, 0x95, 0xff, 0xf2, 0x8c, 0xff, 0xf9, 0x93, 0xff, +0xff, 0x99, 0xef, 0xf5, 0xbc, 0xf2, 0xe6, 0xa4, 0xff, 0xe6, 0xa0, 0xff, +0xf2, 0xa9, 0xff, 0xf8, 0xa6, 0xff, 0xff, 0xac, 0xff, 0xff, 0xbe, 0xc6, +0xdb, 0xc9, 0xd6, 0xe3, 0xd9, 0xea, 0xe2, 0xca, 0xeb, 0xe7, 0xd6, 0xee, +0xea, 0xdb, 0xf5, 0xea, 0xc1, 0xff, 0xf4, 0xc8, 0xff, 0xfe, 0xc6, 0xfc, +0xf9, 0xcf, 0xff, 0xff, 0xd1, 0xff, 0xff, 0xd9, 0xe5, 0xed, 0xe9, 0xff, +0xff, 0xe7, 0xf3, 0xf4, 0xf7, 0xff, 0xff, 0xf2, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0xf5, 0xd0, 0xf6, 0xa4, 0x00, 0x00, 0x00, +0x01, 0x74, 0x52, 0x4e, 0x53, 0x00, 0x40, 0xe6, 0xd8, 0x66, 0x00, 0x00, +0x00, 0x09, 0x70, 0x48, 0x59, 0x73, 0x00, 0x00, 0x0e, 0xc4, 0x00, 0x00, +0x0e, 0xc4, 0x01, 0x95, 0x2b, 0x0e, 0x1b, 0x00, 0x00, 0x00, 0xc1, 0x49, +0x44, 0x41, 0x54, 0x78, 0x9c, 0x63, 0x28, 0x86, 0x02, 0x15, 0x89, 0x74, +0x30, 0xcd, 0x00, 0xe5, 0xfb, 0x32, 0xf1, 0xb0, 0x7b, 0x23, 0x09, 0x14, +0x72, 0xf1, 0x4a, 0xc9, 0x09, 0x88, 0xa6, 0xc1, 0x05, 0x94, 0xb9, 0xa5, +0xe4, 0xd5, 0xd4, 0x25, 0x19, 0x55, 0xc1, 0x02, 0xa6, 0xa6, 0xa6, 0x0c, +0xcc, 0xac, 0xb2, 0xea, 0x1a, 0x1c, 0xac, 0xac, 0x20, 0x01, 0xd3, 0xe0, +0xbc, 0x78, 0xa0, 0x18, 0xbf, 0x86, 0x96, 0x38, 0xc4, 0x0c, 0xd3, 0xdc, +0xb8, 0xb8, 0xd4, 0xfc, 0x5c, 0x36, 0x2d, 0x1d, 0x31, 0xa8, 0x40, 0x72, +0x2c, 0x10, 0x98, 0x72, 0xea, 0x68, 0x2b, 0x99, 0x9a, 0x82, 0x05, 0xa2, +0xbd, 0xdc, 0xec, 0xcd, 0x43, 0xa4, 0xf5, 0x15, 0x7c, 0x4a, 0xec, 0xc0, +0x02, 0x61, 0x36, 0x91, 0x45, 0x05, 0xb9, 0x7c, 0x06, 0x82, 0xfe, 0x09, +0xe1, 0x60, 0x81, 0x50, 0xe7, 0x94, 0xb8, 0x38, 0x3f, 0x61, 0x4d, 0xc5, +0x24, 0x4b, 0x88, 0x19, 0x8e, 0xd9, 0x31, 0x31, 0x31, 0x7a, 0x42, 0x22, +0x9e, 0xee, 0x01, 0x10, 0x01, 0xdb, 0x9c, 0xa8, 0xa8, 0x28, 0x16, 0x19, +0x57, 0x07, 0xb3, 0x2c, 0x88, 0x80, 0x4b, 0xa2, 0x87, 0x93, 0x85, 0xae, +0xa1, 0xb1, 0x55, 0x10, 0xd4, 0xda, 0x10, 0x23, 0x43, 0x13, 0xeb, 0xc0, +0x8c, 0x62, 0x98, 0x6f, 0x4d, 0x4d, 0x23, 0x32, 0x8b, 0xe1, 0x00, 0x00, +0xfc, 0x33, 0x50, 0x72, 0x6d, 0x03, 0x36, 0xf2, 0x00, 0x00, 0x00, 0x00, +0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82, +}; diff --git a/CPP/7zip/UI/FileManager/res/Test2PNG.h b/CPP/7zip/UI/FileManager/res/Test2PNG.h new file mode 100644 index 0000000..80a768a --- /dev/null +++ b/CPP/7zip/UI/FileManager/res/Test2PNG.h @@ -0,0 +1,21 @@ +static const unsigned char TEST2_png[] = { +0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d, +0x49, 0x48, 0x44, 0x52, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x18, +0x04, 0x03, 0x00, 0x00, 0x00, 0x12, 0x59, 0x20, 0xcb, 0x00, 0x00, 0x00, +0x30, 0x50, 0x4c, 0x54, 0x45, 0xff, 0x00, 0xff, 0x80, 0x00, 0x00, 0x00, +0x80, 0x00, 0x80, 0x80, 0x00, 0x00, 0x00, 0x80, 0x80, 0x00, 0x80, 0x00, +0x80, 0x80, 0x80, 0x80, 0x80, 0xc0, 0xc0, 0xc0, 0xff, 0x00, 0x00, 0x00, +0xff, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, +0xff, 0xff, 0xff, 0xff, 0xff, 0xd8, 0x14, 0x3b, 0x9d, 0x00, 0x00, 0x00, +0x01, 0x74, 0x52, 0x4e, 0x53, 0x00, 0x40, 0xe6, 0xd8, 0x66, 0x00, 0x00, +0x00, 0x09, 0x70, 0x48, 0x59, 0x73, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x01, 0xea, 0x65, 0x16, 0xa4, 0x00, 0x00, 0x00, 0x47, 0x49, +0x44, 0x41, 0x54, 0x78, 0x9c, 0xb5, 0xcd, 0xbb, 0x11, 0x00, 0x20, 0x08, +0x03, 0x50, 0x16, 0x60, 0x57, 0x47, 0xb5, 0xb3, 0xc2, 0x0d, 0xcc, 0x0c, +0x22, 0x9f, 0xc3, 0xde, 0x33, 0x05, 0x29, 0x5e, 0xee, 0x20, 0xfa, 0x1e, +0x16, 0x91, 0x1e, 0x97, 0x26, 0xb0, 0x9a, 0x17, 0x31, 0x80, 0x71, 0x06, +0xda, 0x3d, 0xc0, 0x29, 0xc0, 0x29, 0xc1, 0x28, 0xc1, 0x29, 0xc1, 0x68, +0xd4, 0xc7, 0x0b, 0x94, 0x0a, 0x94, 0x2e, 0x78, 0xc9, 0x06, 0xae, 0xb5, +0x39, 0x27, 0x85, 0x82, 0xfa, 0x1b, 0x00, 0x00, 0x00, 0x00, 0x49, 0x45, +0x4e, 0x44, 0xae, 0x42, 0x60, 0x82, 0x00, +}; diff --git a/CPP/7zip/UI/FileManager/res/TestPNG.h b/CPP/7zip/UI/FileManager/res/TestPNG.h new file mode 100644 index 0000000..c1c0887 --- /dev/null +++ b/CPP/7zip/UI/FileManager/res/TestPNG.h @@ -0,0 +1,25 @@ +static const unsigned char TEST_png[] = { +0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d, +0x49, 0x48, 0x44, 0x52, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x24, +0x04, 0x03, 0x00, 0x00, 0x00, 0x3d, 0x6b, 0xa4, 0x39, 0x00, 0x00, 0x00, +0x30, 0x50, 0x4c, 0x54, 0x45, 0xff, 0x00, 0xff, 0x80, 0x00, 0x00, 0x00, +0x80, 0x00, 0x80, 0x80, 0x00, 0x00, 0x00, 0x80, 0x80, 0x00, 0x80, 0x00, +0x80, 0x80, 0x80, 0x80, 0x80, 0xc0, 0xc0, 0xc0, 0xff, 0x00, 0x00, 0x00, +0xff, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, +0xff, 0xff, 0xff, 0xff, 0xff, 0xd8, 0x14, 0x3b, 0x9d, 0x00, 0x00, 0x00, +0x01, 0x74, 0x52, 0x4e, 0x53, 0x00, 0x40, 0xe6, 0xd8, 0x66, 0x00, 0x00, +0x00, 0x09, 0x70, 0x48, 0x59, 0x73, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x01, 0xea, 0x65, 0x16, 0xa4, 0x00, 0x00, 0x00, 0x75, 0x49, +0x44, 0x41, 0x54, 0x78, 0x9c, 0xd5, 0xd1, 0x31, 0x1a, 0x80, 0x20, 0x08, +0x05, 0x60, 0xc7, 0x96, 0xee, 0xdb, 0xd8, 0x05, 0xb8, 0x9b, 0x9b, 0x53, +0xdd, 0xa0, 0xce, 0x10, 0x20, 0xfa, 0x55, 0xef, 0xd5, 0x2e, 0x23, 0xf2, +0x2b, 0x60, 0x4a, 0x63, 0xc4, 0x66, 0x91, 0x31, 0x3f, 0x9f, 0x1a, 0xc7, +0x82, 0x07, 0xbb, 0x1d, 0x94, 0xf5, 0x1f, 0xdc, 0x6f, 0x7d, 0x00, 0xf1, +0x2a, 0xf2, 0xc2, 0xe4, 0x65, 0x99, 0xbc, 0xd0, 0xc9, 0xbb, 0xa5, 0x4e, +0xa0, 0xa5, 0x20, 0x38, 0x43, 0x10, 0x32, 0x43, 0x25, 0x64, 0xe8, 0x4a, +0xd8, 0xd0, 0x12, 0x79, 0xd8, 0x52, 0x23, 0xb8, 0x25, 0xe1, 0xa0, 0x11, +0xb2, 0x56, 0x27, 0xec, 0x1f, 0x9c, 0x30, 0x60, 0x84, 0x02, 0x23, 0x1c, +0x28, 0xe1, 0x40, 0xc9, 0x07, 0x18, 0x21, 0x2e, 0x97, 0xf8, 0xa1, 0xe3, +0xf9, 0x5b, 0x6d, 0x8c, 0x00, 0x00, 0x00, 0x00, 0x49, 0x45, 0x4e, 0x44, +0xae, 0x42, 0x60, 0x82, 0x00, +}; diff --git a/CPP/7zip/UI/FileManager/resource.h b/CPP/7zip/UI/FileManager/resource.h new file mode 100644 index 0000000..4683e5e --- /dev/null +++ b/CPP/7zip/UI/FileManager/resource.h @@ -0,0 +1,163 @@ +#include "resourceGui.h" + +#define IDR_MENUBAR1 103 +#define IDM_MENU 103 +#define IDR_ACCELERATOR1 209 +#define IDM_FILE_OPEN 210 +#define IDM_FILE_OPEN_INSIDE 211 +#define IDM_FILE_OPEN_OUTSIDE 212 +#define IDM_FILE_VIEW 220 +#define IDM_FILE_EDIT 221 +#define IDM_RENAME 230 +#define IDM_COPY_TO 231 +#define IDM_MOVE_TO 232 +#define IDM_DELETE 233 +#define IDM_FILE_SPLIT 238 +#define IDM_FILE_COMBINE 239 +#define IDM_FILE_PROPERTIES 240 +#define IDM_FILE_COMMENT 241 +#define IDM_FILE_CRC 242 +#define IDM_FILE_DIFF 243 +#define IDM_CREATE_FOLDER 250 +#define IDM_CREATE_FILE 251 +#define IDM_EDIT_CUT 320 +#define IDM_EDIT_COPY 321 +#define IDM_EDIT_PASTE 322 +#define IDM_SELECT_ALL 330 +#define IDM_DESELECT_ALL 331 +#define IDM_INVERT_SELECTION 332 +#define IDM_SELECT 333 +#define IDM_DESELECT 334 +#define IDM_SELECT_BY_TYPE 335 +#define IDM_DESELECT_BY_TYPE 336 +#define IDM_VIEW_LARGE_ICONS 410 +#define IDM_VIEW_SMALL_ICONS 411 +#define IDM_VIEW_LIST 412 +#define IDM_VIEW_DETAILS 413 +#define IDM_VIEW_ARANGE_BY_NAME 420 +#define IDM_VIEW_ARANGE_BY_TYPE 421 +#define IDM_VIEW_ARANGE_BY_DATE 422 +#define IDM_VIEW_ARANGE_BY_SIZE 423 +#define IDM_VIEW_ARANGE_NO_SORT 424 +#define IDM_OPEN_ROOT_FOLDER 430 +#define IDM_OPEN_PARENT_FOLDER 431 +#define IDM_FOLDERS_HISTORY 432 +#define IDM_VIEW_REFRESH 440 +#define IDM_VIEW_FLAT_VIEW 449 +#define IDM_VIEW_TWO_PANELS 450 +#define IDM_VIEW_TOOLBARS 451 +#define IDM_VIEW_STANDARD_TOOLBAR 460 +#define IDM_VIEW_ARCHIVE_TOOLBAR 461 +#define IDM_VIEW_TOOLBARS_LARGE_BUTTONS 462 +#define IDM_VIEW_TOOLBARS_SHOW_BUTTONS_TEXT 463 +#define IDM_OPTIONS 510 +#define IDM_BENCHMARK 511 +#define IDM_HELP_CONTENTS 610 +#define IDM_ABOUT 5014 /* FIXME 620 5014 = wxID_ABOUT */ +#define IDS_BOOKMARK 720 +#define IDB_ADD 2002 +#define IDB_EXTRACT 2003 +#define IDB_TEST 2004 +#define IDB_COPY 2010 +#define IDB_MOVE 2011 +#define IDB_DELETE 2012 +#define IDB_INFO 2013 +#define IDB_ADD2 2082 +#define IDB_EXTRACT2 2083 +#define IDB_TEST2 2084 +#define IDB_COPY2 2090 +#define IDB_MOVE2 2091 +#define IDB_DELETE2 2092 +#define IDB_INFO2 2093 +#define IDS_APP_TITLE 2200 +#define IDS_COPY 2201 +#define IDS_MOVE 2202 +#define IDS_COPY_TO 2203 +#define IDS_MOVE_TO 2204 +#define IDS_COPYING 2205 +#define IDS_MOVING 2206 +#define IDS_CANNOT_COPY 2207 +#define IDS_OPERATION_IS_NOT_SUPPORTED 2208 + +#define IDS_CONFIRM_FILE_DELETE 2210 +#define IDS_CONFIRM_FOLDER_DELETE 2211 +#define IDS_CONFIRM_ITEMS_DELETE 2212 +#define IDS_WANT_TO_DELETE_FILE 2213 +#define IDS_WANT_TO_DELETE_FOLDER 2214 +#define IDS_WANT_TO_DELETE_ITEMS 2215 +#define IDS_DELETING 2216 +#define IDS_ERROR_DELETING 2217 +#define IDS_ERROR_LONG_PATH_TO_RECYCLE 2218 + +#define IDS_RENAMING 2220 +#define IDS_ERROR_RENAMING 2221 +#define IDS_CONFIRM_FILE_COPY 2222 +#define IDS_WANT_TO_COPY_FILES 2223 + + +#define IDS_CREATE_FOLDER 2230 +#define IDS_CREATE_FOLDER_NAME 2231 +#define IDS_CREATE_FOLDER_DEFAULT_NAME 2232 +#define IDS_CREATE_FOLDER_ERROR 2233 +#define IDS_CREATE_FILE 2240 +#define IDS_CREATE_FILE_NAME 2241 +#define IDS_CREATE_FOLDER_DEFAULT_FILE_NAME 2242 +#define IDS_CREATE_FILE_DEFAULT_NAME 2242 +#define IDS_CREATE_FILE_ERROR 2243 +#define IDS_SELECT 2250 +#define IDS_DESELECT 2251 +#define IDS_SELECT_MASK 2252 +#define IDS_FOLDERS_HISTORY 2260 +#define IDS_N_SELECTED_ITEMS 2270 + +#define IDS_TOO_MANY_ITEMS 2279 +#define IDS_WANT_UPDATE_MODIFIED_FILE 2280 +#define IDS_CANNOT_UPDATE_FILE 2281 +#define IDS_CANNOT_START_EDITOR 2282 +#define IDS_OPENNING 2283 +#define IDS_VIRUS 2284 +#define IDS_COMPUTER 2300 +#define IDS_NETWORK 2301 +#define IDS_DOCUMENTS 2302 +#define IDS_ADD 2400 +#define IDS_EXTRACT 2401 +#define IDS_TEST 2402 +#define IDS_BUTTON_COPY 2420 +#define IDS_BUTTON_MOVE 2421 +#define IDS_BUTTON_DELETE 2422 +#define IDS_BUTTON_INFO 2423 +#define IDS_PROP_TOTAL_SIZE 3100 +#define IDS_PROP_FREE_SPACE 3101 +#define IDS_PROP_CLUSTER_SIZE 3102 +#define IDS_PROP_VOLUME_NAME 3103 +#define IDS_PROP_LOCAL_NAME 3200 +#define IDS_PROP_PROVIDER 3201 +#define IDS_OPTIONS 4000 +#define IDS_COMMENT 4001 +#define IDS_COMMENT2 4002 +#define IDS_SYSTEM 4010 + +#define IDS_SPLITTING 4020 +#define IDS_SPLIT_CONFIRM_TITLE 4021 +#define IDS_SPLIT_CONFIRM_MESSAGE 4022 +#define IDS_SPLIT_VOL_MUST_BE_SMALLER 4023 + +#define IDS_COMBINE 4030 +#define IDS_COMBINE_TO 4031 +#define IDS_COMBINING 4032 +#define IDS_COMBINE_SELECT_ONE_FILE 4033 +#define IDS_COMBINE_CANT_DETECT_SPLIT_FILE 4034 +#define IDS_COMBINE_CANT_FIND_MORE_THAN_ONE_PART 4035 + +#define IDS_CHECKSUM_CALCULATING 4040 +#define IDS_CHECKSUM_INFORMATION 4041 +#define IDS_CHECKSUM_CRC_DATA 4042 +#define IDS_CHECKSUM_CRC_DATA_NAMES 4043 + +#define IDS_SCANNING 4050 +#define IDS_PROPERTIES 4060 + +#define IDS_MESSAGE_UNSUPPORTED_OPERATION_FOR_LONG_PATH_FOLDER 4301 +#define IDS_SELECT_ONE_FILE 4302 +#define IDS_SELECT_FILES 4303 +#define IDS_FILE_EXIST 4304 diff --git a/CPP/7zip/UI/FileManager/resourceGui.h b/CPP/7zip/UI/FileManager/resourceGui.h new file mode 100644 index 0000000..14cedda --- /dev/null +++ b/CPP/7zip/UI/FileManager/resourceGui.h @@ -0,0 +1,10 @@ +#define IDI_ICON 1 + +#define IDS_INCORRECT_VOLUME_SIZE 95 + +#define IDS_FILES_COLON 2274 +#define IDS_FOLDERS_COLON 2275 +#define IDS_SIZE_COLON 2276 + +#define IDS_PROGRESS_TESTING 4100 +#define IDS_MESSAGE_NO_ERRORS 4200 diff --git a/CPP/7zip/UI/FileManager/wxFM.cpp b/CPP/7zip/UI/FileManager/wxFM.cpp new file mode 100644 index 0000000..338ce18 --- /dev/null +++ b/CPP/7zip/UI/FileManager/wxFM.cpp @@ -0,0 +1,327 @@ +// wxFM.cpp + +#include "StdAfx.h" + +// For compilers that support precompilation, includes "wx/wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +// for all others, include the necessary headers (this file is usually all you +// need because it includes almost all "standard" wxWidgets headers) +#ifndef WX_PRECOMP + #include "wx/wx.h" +#endif + +#undef _WIN32 + +#ifdef __WXMAC__ + +#define UInt32 max_UInt32 +#include +#undef UInt32 + +#endif + + +// FIXME + +static pthread_t g_main_thread; + +void verify_main_thread(void) +{ + if (g_main_thread != pthread_self()) + { + printf("verify_main_thread-wxFM\n"); + abort(); + } +} + +// #include "../GUI/p7zip_32.xpm" + +int Main1(int argc,TCHAR **argv); + +/* +int Main1(int argc,TCHAR **argv) +{ + // FIXME + Sleep(10000); +} +*/ + + +#include "Windows/Registry.h" +using namespace NWindows; +using namespace NRegistry; + + +#include "Common/StringConvert.h" +#include "Windows/FileDir.h" +#include "Windows/Synchronization.h" + +// FIXME #include "ExtractRes.h" +#include "../Explorer/MyMessages.h" + +// FIXME #include "ExtractGUI.h" +// FIXME #include "UpdateGUI.h" +// FIXME #include "BenchmarkDialog.h" +#include "RegistryUtils.h" + +using namespace NWindows; +using namespace NFile; + +#include "../FileManager/ProgramLocation.h" + +static LPCWSTR kHelpFileName = L"help/"; + +void ShowHelpWindow(HWND hwnd, LPCWSTR topicFile) +{ + UString path; + if (!::GetProgramFolderPath(path)) + return; + path += kHelpFileName; + path += topicFile; + printf("ShowHelpWindow(%p,%ls)=>%ls\n",hwnd,topicFile,(const wchar_t *)path); + // HtmlHelp(hwnd, GetSystemString(path), HH_DISPLAY_TOPIC, NULL); + wxString path2(path); + wxLaunchDefaultBrowser(path2); +} + +////////////////////////////////// + +#define NEED_NAME_WINDOWS_TO_UNIX +#include "myPrivate.h" // global_use_utf16_conversion + +void mySplitCommandLineW(int numArguments, TCHAR **arguments,UStringVector &parts) { + + parts.Clear(); + for(int ind=0;ind < numArguments; ind++) { + UString tmp = arguments[ind]; + // tmp.Trim(); " " is a valid filename ... + if (!tmp.IsEmpty()) { + parts.Add(tmp); + } + } +} + +// ---------------------------------------------------------------------------- +// private classes +// ---------------------------------------------------------------------------- + +// Define a new application type, each program should derive a class from wxApp +class MyApp : public wxApp +{ +public: + // override base class virtuals + // ---------------------------- + + // this one is called on application startup and is a good place for the app + // initialization (doing it here and not in the ctor allows to have an error + // return: if OnInit() returns false, the application terminates) + virtual bool OnInit(); + +#ifdef __WXMAC__ + virtual void MacOpenFile ( const wxString & fileName ) ; +#endif + +}; + +// Create a new application object: this macro will allow wxWidgets to create +// the application object during program execution (it's better than using a +// static object for many reasons) and also implements the accessor function +// wxGetApp() which will return the reference of the right type (i.e. MyApp and +// not wxApp) +IMPLEMENT_APP(MyApp) + +time_t g_T0 = 0; + +#if 0 +class MyThread : public wxThread +{ + int _argc; + TCHAR **_argv; +public: + MyThread(int argc,TCHAR **argv): wxThread(),_argc(argc), _argv(argv) {} + + // thread execution starts here + virtual void *Entry() + { + int ret = Main1(_argc,_argv); + exit(ret); + } +}; +#endif + +#ifdef __WXMAC__ +void doMacOpenFile( const UString & fileName ); + +void MyApp::MacOpenFile ( const wxString & fileName ) +{ + const wchar_t * wstr = fileName.wc_str (); + + // ::MessageBoxW(0, L"MyApp::MacOpenFile 2", wstr , MB_OKCANCEL | MB_ICONQUESTION); + + doMacOpenFile(wstr); +} +#endif + +// 'Main program' equivalent: the program execution "starts" here +bool MyApp::OnInit() +{ + // don't parse the command-line options ! + // : if ( !wxApp::OnInit() ) return false; + +/* +*/ +#ifdef __WXMAC__ +ProcessSerialNumber PSN; +GetCurrentProcess(&PSN); +TransformProcessType(&PSN,kProcessTransformToForegroundApplication); +#endif + + +/* + UString args(L"Args="); + + for(int i = 0 ; i < wxApp::argc ; i++) + args = args + L" '" + wxApp::argv[i] + L"'"; + + + ::MessageBoxW(0, L"MyApp::OnInit 3", args, MB_OKCANCEL | MB_ICONQUESTION); +*/ + + g_main_thread = pthread_self(); + + { // define P7ZIP_HOME_DIR + extern void my_windows_split_path(const AString &p_path, AString &dir , AString &base); + static char p7zip_home_dir[MAX_PATH]; + + UString fullPath; + NDirectory::MyGetFullPathName(wxApp::argv[0], fullPath); + AString afullPath = GetAnsiString(fullPath); + + AString dir,name; + + my_windows_split_path(afullPath,dir,name); + + const char *dir2 = nameWindowToUnix((const char *)dir); + snprintf(p7zip_home_dir,sizeof(p7zip_home_dir),"P7ZIP_HOME_DIR=%s/",dir2); + p7zip_home_dir[sizeof(p7zip_home_dir)-1] = 0; + putenv(p7zip_home_dir); + // DEBUG printf("putenv(%s)\n",p7zip_home_dir); + } + global_use_utf16_conversion = 1; // UNICODE ! + + g_T0 = time(0); + // DEBUG printf("MAIN Thread : 0x%lx\n",wxThread::GetCurrentId()); + + // Create the main frame window +#if 0 + MyFrame *frame = new MyFrame((wxFrame *)NULL, _T("7-zip Main Window"), 50, 50, 450, 340); + // Don't Show the frame ! + frame->Show(true); // FIXME + + SetTopWindow(frame); + +#endif + + /* + MyThread *thread = new MyThread(wxApp::argc,wxApp::argv); + thread->Create(); // != wxTHREAD_NO_ERROR + thread->Run(); + */ + + wxInitAllImageHandlers(); + + Main1(wxApp::argc,wxApp::argv); + + // success: wxApp::OnRun() will be called which will enter the main message + // loop and the application will run. If we returned false here, the + // application would exit immediately. + return true; +} + +DWORD WINAPI GetTickCount(VOID) { + static wxStopWatch sw; + return sw.Time(); +} + +////////////////////////////////////////// + +#if 0 +#include "resource.h" +#include "ExtractRes.h" + +static CStringTable g_stringTable[] = +{ + /* resource.rc */ + /***************/ + { IDS_OPEN_TYPE_ALL_FILES, L"All Files" }, + { IDS_METHOD_STORE, L"Store" }, + { IDS_METHOD_NORMAL, L"Normal" }, + { IDS_METHOD_MAXIMUM, L"Maximum" }, + { IDS_METHOD_FAST, L"Fast" }, + { IDS_METHOD_FASTEST, L"Fastest" }, + { IDS_METHOD_ULTRA, L"Ultra" }, + { IDS_COMPRESS_NON_SOLID, L"Non-solid" }, + { IDS_COMPRESS_SOLID, L"Solid" }, + + { IDS_COMPRESS_UPDATE_MODE_ADD, L"Add and replace files" }, + { IDS_COMPRESS_UPDATE_MODE_UPDATE, L"Update and add files" }, + { IDS_COMPRESS_UPDATE_MODE_FRESH, L"Freshen existing files" }, + { IDS_COMPRESS_UPDATE_MODE_SYNCHRONIZE, L"Synchronize files" }, + { IDS_COMPRESS_SET_ARCHIVE_DIALOG_TITLE, L"Browse" }, + { IDS_COMPRESS_INCORRECT_VOLUME_SIZE, L"Incorrect volume size" }, + { IDS_COMPRESS_SPLIT_CONFIRM_MESSAGE, L"Specified volume size: {0} bytes.\nAre you sure you want to split archive into such volumes?" }, + + { IDS_PASSWORD_USE_ASCII, L"Use only English letters, numbers and special characters (!, #, $, ...) for password." }, + { IDS_PASSWORD_PASSWORDS_DO_NOT_MATCH, L"Passwords do not match" }, + { IDS_PASSWORD_IS_TOO_LONG, L"Password is too long" }, + + { IDS_PROGRESS_COMPRESSING, L"Compressing" }, + { IDS_PROGRESS_TESTING, L"Testing" }, + { IDS_MESSAGE_NO_ERRORS, L"There are no errors" }, + { IDS_FILES_COLON, L"Files:" }, + { IDS_FOLDERS_COLON, L"Folders:" }, + { IDS_SIZE_COLON, L"Size:" }, + { IDS_COMPRESSED_COLON, L"Compressed size:" }, + { IDS_ARCHIVES_COLON, L"Archives:" }, + + /* Extract.rc */ + /**************/ + { IDS_CANNOT_CREATE_FOLDER , L"Cannot create folder '{0}'"}, + { IDS_OPEN_IS_NOT_SUPORTED_ARCHIVE, L"File is not supported archive."}, + + { IDS_MESSAGES_DIALOG_EXTRACT_MESSAGE_CRC , L"CRC failed in '{0}'. File is broken."}, + { IDS_MESSAGES_DIALOG_EXTRACT_MESSAGE_DATA_ERROR , L"Data error in '{0}'. File is broken"}, + { IDS_MESSAGES_DIALOG_EXTRACT_MESSAGE_UNSUPPORTED_METHOD , L"Unsupported compression method for '{0}'."}, + { IDS_MESSAGES_DIALOG_EXTRACT_MESSAGE_CRC_ENCRYPTED , L"CRC failed in encrypted file '{0}'. Wrong password?"}, + { IDS_MESSAGES_DIALOG_EXTRACT_MESSAGE_DATA_ERROR_ENCRYPTED , L"Data error in encrypted file '{0}'. Wrong password?"}, + + { IDS_EXTRACT_SET_FOLDER , L"Specify a location for extracted files."}, + { IDS_MESSAGES_DIALOG_EXTRACT_MESSAGE_CANNOT_OPEN_FILE, L"Can not open output file '{0}'."}, + { IDS_PROGRESS_EXTRACTING, L"Extracting" }, + + { IDS_CANT_OPEN_ARCHIVE , L"Can not open file '{0}' as archive"}, + { IDS_CANT_OPEN_ENCRYPTED_ARCHIVE , L"Can not open encrypted archive '{0}'. Wrong password?"}, + + { 0 , 0 } +}; + +REGISTER_STRINGTABLE(g_stringTable) +#endif + + +/////////////////////////////////////////// + +namespace NFsFolder { + + // FIXME + bool wxw_CopyFile(LPCWSTR existingFile, LPCWSTR newFile, bool overwrite) + { + return wxCopyFile(wxString(existingFile), wxString(newFile), overwrite); + } +} + diff --git a/CPP/7zip/UI/GUI/BenchmarkDialog.cpp b/CPP/7zip/UI/GUI/BenchmarkDialog.cpp new file mode 100644 index 0000000..e4d6c01 --- /dev/null +++ b/CPP/7zip/UI/GUI/BenchmarkDialog.cpp @@ -0,0 +1,581 @@ +// BenchmarkDialog.cpp + +#include "StdAfx.h" + +#include "Common/IntToString.h" +#include "Common/MyException.h" + +#include "Windows/Error.h" +#include "Windows/System.h" +#include "Windows/Thread.h" + +#include "../FileManager/HelpUtils.h" + +#include "BenchmarkDialog.h" + +using namespace NWindows; + +static LPCWSTR kHelpTopic = L"fm/benchmark.htm"; + +static const UINT_PTR kTimerID = 4; +static const UINT kTimerElapse = 1000; + +#ifdef LANG +#include "../FileManager/LangUtils.h" +#endif + +using namespace NWindows; + +UString HResultToMessage(HRESULT errorCode); + +#ifdef LANG +static CIDLangPair kIDLangPairs[] = +{ + { IDC_BENCHMARK_DICTIONARY, 0x02000D0C }, + { IDC_BENCHMARK_MEMORY, 0x03080001 }, + { IDC_BENCHMARK_NUM_THREADS, 0x02000D12 }, + { IDC_BENCHMARK_SPEED_LABEL, 0x03080004 }, + { IDC_BENCHMARK_RATING_LABEL, 0x03080005 }, + { IDC_BENCHMARK_COMPRESSING, 0x03080002 }, + { IDC_BENCHMARK_DECOMPRESSING, 0x03080003 }, + { IDC_BENCHMARK_CURRENT, 0x03080007 }, + { IDC_BENCHMARK_RESULTING, 0x03080008 }, + { IDC_BENCHMARK_CURRENT2, 0x03080007 }, + { IDC_BENCHMARK_RESULTING2, 0x03080008 }, + { IDC_BENCHMARK_TOTAL_RATING, 0x03080006 }, + { IDC_BENCHMARK_ELAPSED, 0x02000C01 }, + { IDC_BENCHMARK_SIZE, 0x02000C03 }, + { IDC_BENCHMARK_PASSES, 0x03080009 }, + // { IDC_BENCHMARK_ERRORS, 0x0308000A }, + { IDC_BENCHMARK_USAGE_LABEL, 0x0308000B }, + { IDC_BENCHMARK_RPU_LABEL, 0x0308000C }, + { IDC_BENCHMARK_COMBO_NUM_THREADS, 0x02000D12}, + + { IDC_BUTTON_STOP, 0x02000714 }, + { IDC_BUTTON_RESTART, 0x02000715 }, + { IDHELP, 0x02000720 }, + { IDCANCEL, 0x02000710 } +}; +#endif + +const LPCTSTR kProcessingString = TEXT("..."); +const LPCTSTR kMB = TEXT(" MB"); +const LPCTSTR kMIPS = TEXT(" MIPS"); +const LPCTSTR kKBs = TEXT(" KB/s"); + +#ifdef UNDER_CE +static const int kMinDicLogSize = 20; +#else +static const int kMinDicLogSize = 21; +#endif +static const UInt32 kMinDicSize = (1 << kMinDicLogSize); +static const UInt32 kMaxDicSize = + #ifdef _WIN64 + (1 << 30); + #else + (1 << 27); + #endif + +bool CBenchmarkDialog::OnInit() +{ + #ifdef LANG + LangSetWindowText(HWND(*this), 0x03080000); + LangSetDlgItemsText(HWND(*this), kIDLangPairs, sizeof(kIDLangPairs) / sizeof(kIDLangPairs[0])); + #endif + + Sync.Init(); + + + UInt32 numCPUs = NSystem::GetNumberOfProcessors(); + if (numCPUs < 1) + numCPUs = 1; + numCPUs = MyMin(numCPUs, (UInt32)(1 << 8)); + + if (Sync.NumThreads == (UInt32)-1) + { + Sync.NumThreads = numCPUs; + if (Sync.NumThreads > 1) + Sync.NumThreads &= ~1; + } + m_NumThreads.Attach(GetItem(IDC_BENCHMARK_COMBO_NUM_THREADS)); + int cur = 0; + for (UInt32 num = 1; num <= numCPUs * 2;) + { + TCHAR s[40]; + ConvertUInt64ToString(num, s); + int index = (int)m_NumThreads.AddString(s); + m_NumThreads.SetItemData(index, num); + if (num <= Sync.NumThreads) + cur = index; + if (num > 1) + num++; + num++; + } + m_NumThreads.SetCurSel(cur); + Sync.NumThreads = GetNumberOfThreads(); + + m_Dictionary.Attach(GetItem(IDC_BENCHMARK_COMBO_DICTIONARY)); + cur = 0; + UInt64 ramSize = NSystem::GetRamSize(); + + #ifdef UNDER_CE + const UInt32 kNormalizedCeSize = (16 << 20); + if (ramSize > kNormalizedCeSize && ramSize < (33 << 20)) + ramSize = kNormalizedCeSize; + #endif + + if (Sync.DictionarySize == (UInt32)-1) + { + int dicSizeLog; + for (dicSizeLog = 25; dicSizeLog > kBenchMinDicLogSize; dicSizeLog--) + if (GetBenchMemoryUsage(Sync.NumThreads, ((UInt32)1 << dicSizeLog)) + (8 << 20) <= ramSize) + break; + Sync.DictionarySize = (1 << dicSizeLog); + } + if (Sync.DictionarySize < kMinDicSize) + Sync.DictionarySize = kMinDicSize; + if (Sync.DictionarySize > kMaxDicSize) + Sync.DictionarySize = kMaxDicSize; + + for (int i = kMinDicLogSize; i <= 30; i++) + for (int j = 0; j < 2; j++) + { + UInt32 dictionary = (1 << i) + (j << (i - 1)); + if (dictionary > kMaxDicSize) + continue; + TCHAR s[40]; + ConvertUInt64ToString((dictionary >> 20), s); + lstrcat(s, kMB); + int index = (int)m_Dictionary.AddString(s); + m_Dictionary.SetItemData(index, dictionary); + if (dictionary <= Sync.DictionarySize) + cur = index; + } + m_Dictionary.SetCurSel(cur); + + OnChangeSettings(); + + Sync._startEvent.Set(); + _timer = SetTimer(kTimerID, kTimerElapse); + + NormalizePosition(); + return CModalDialog::OnInit(); +} + +UInt32 CBenchmarkDialog::GetNumberOfThreads() +{ + return (UInt32)m_NumThreads.GetItemData(m_NumThreads.GetCurSel()); +} + +UInt32 CBenchmarkDialog::OnChangeDictionary() +{ + UInt32 dictionary = (UInt32)m_Dictionary.GetItemData(m_Dictionary.GetCurSel()); + UInt64 memUsage = GetBenchMemoryUsage(GetNumberOfThreads(), dictionary); + memUsage = (memUsage + (1 << 20) - 1) >> 20; + TCHAR s[40]; + ConvertUInt64ToString(memUsage, s); + lstrcat(s, kMB); + SetItemText(IDC_BENCHMARK_MEMORY_VALUE, s); + return dictionary; +} + +static const UInt32 g_IDs[] = +{ + IDC_BENCHMARK_COMPRESSING_USAGE, + IDC_BENCHMARK_COMPRESSING_USAGE2, + IDC_BENCHMARK_COMPRESSING_SPEED, + IDC_BENCHMARK_COMPRESSING_SPEED2, + IDC_BENCHMARK_COMPRESSING_RATING, + IDC_BENCHMARK_COMPRESSING_RATING2, + IDC_BENCHMARK_COMPRESSING_RPU, + IDC_BENCHMARK_COMPRESSING_RPU2, + + IDC_BENCHMARK_DECOMPRESSING_SPEED, + IDC_BENCHMARK_DECOMPRESSING_SPEED2, + IDC_BENCHMARK_DECOMPRESSING_RATING, + IDC_BENCHMARK_DECOMPRESSING_RATING2, + IDC_BENCHMARK_DECOMPRESSING_USAGE, + IDC_BENCHMARK_DECOMPRESSING_USAGE2, + IDC_BENCHMARK_DECOMPRESSING_RPU, + IDC_BENCHMARK_DECOMPRESSING_RPU2, + + IDC_BENCHMARK_TOTAL_USAGE_VALUE, + IDC_BENCHMARK_TOTAL_RATING_VALUE, + IDC_BENCHMARK_TOTAL_RPU_VALUE +}; + +void CBenchmarkDialog::OnChangeSettings() +{ + EnableItem(IDC_BUTTON_STOP, true); + UInt32 dictionary = OnChangeDictionary(); + TCHAR s[40] = { TEXT('/'), TEXT(' '), 0 }; + ConvertUInt64ToString(NSystem::GetNumberOfProcessors(), s + 2); + SetItemText(IDC_BENCHMARK_HARDWARE_THREADS, s); + for (int i = 0; i < sizeof(g_IDs) / sizeof(g_IDs[0]); i++) + SetItemText(g_IDs[i], kProcessingString); + _startTime = GetTickCount(); + PrintTime(); + NWindows::NSynchronization::CCriticalSectionLock lock(Sync.CS); + Sync.Init(); + Sync.DictionarySize = dictionary; + Sync.Changed = true; + Sync.NumThreads = GetNumberOfThreads(); +} + +void CBenchmarkDialog::OnRestartButton() +{ + OnChangeSettings(); +} + +void CBenchmarkDialog::OnStopButton() +{ + EnableItem(IDC_BUTTON_STOP, false); + Sync.Pause(); +} + +void CBenchmarkDialog::OnHelp() +{ + ShowHelpWindow(NULL, kHelpTopic); +} + +void CBenchmarkDialog::OnCancel() +{ + Sync.Stop(); + KillTimer(_timer); + CModalDialog::OnCancel(); +} + +static void GetTimeString(UInt64 timeValue, TCHAR *s) +{ + wsprintf(s, TEXT("%02d:%02d:%02d"), + UInt32(timeValue / 3600), + UInt32((timeValue / 60) % 60), + UInt32(timeValue % 60)); +} + +void CBenchmarkDialog::PrintTime() +{ + UInt32 curTime = ::GetTickCount(); + UInt32 elapsedTime = (curTime - _startTime); + UInt32 elapsedSec = elapsedTime / 1000; + if (elapsedSec != 0 && Sync.WasPaused()) + return; + TCHAR s[40]; + GetTimeString(elapsedSec, s); + SetItemText(IDC_BENCHMARK_ELAPSED_VALUE, s); +} + +void CBenchmarkDialog::PrintRating(UInt64 rating, UINT controlID) +{ + TCHAR s[40]; + ConvertUInt64ToString(rating / 1000000, s); + lstrcat(s, kMIPS); + SetItemText(controlID, s); +} + +void CBenchmarkDialog::PrintUsage(UInt64 usage, UINT controlID) +{ + TCHAR s[40]; + ConvertUInt64ToString((usage + 5000) / 10000, s); + lstrcat(s, TEXT("%")); + SetItemText(controlID, s); +} + +void CBenchmarkDialog::PrintResults( + UInt32 dictionarySize, + const CBenchInfo2 &info, + UINT usageID, UINT speedID, UINT rpuID, UINT ratingID, + bool decompressMode) +{ + if (info.GlobalTime == 0) + return; + + UInt64 size = info.UnpackSize; + TCHAR s[40]; + { + UInt64 speed = size * info.GlobalFreq / info.GlobalTime; + ConvertUInt64ToString(speed / 1024, s); + lstrcat(s, kKBs); + SetItemText(speedID, s); + } + UInt64 rating; + if (decompressMode) + rating = GetDecompressRating(info.GlobalTime, info.GlobalFreq, size, info.PackSize, 1); + else + rating = GetCompressRating(dictionarySize, info.GlobalTime, info.GlobalFreq, size * info.NumIterations); + + PrintRating(rating, ratingID); + PrintRating(GetRatingPerUsage(info, rating), rpuID); + PrintUsage(GetUsage(info), usageID); +} + +bool CBenchmarkDialog::OnTimer(WPARAM /* timerID */, LPARAM /* callback */) +{ + PrintTime(); + NWindows::NSynchronization::CCriticalSectionLock lock(Sync.CS); + + TCHAR s[40]; + ConvertUInt64ToString((Sync.ProcessedSize >> 20), s); + lstrcat(s, kMB); + SetItemText(IDC_BENCHMARK_SIZE_VALUE, s); + + ConvertUInt64ToString(Sync.NumPasses, s); + SetItemText(IDC_BENCHMARK_PASSES_VALUE, s); + + /* + ConvertUInt64ToString(Sync.NumErrors, s); + SetItemText(IDC_BENCHMARK_ERRORS_VALUE, s); + */ + + { + UInt32 dicSizeTemp = (UInt32)MyMax(Sync.ProcessedSize, UInt64(1) << 20); + dicSizeTemp = MyMin(dicSizeTemp, Sync.DictionarySize), + PrintResults(dicSizeTemp, + Sync.CompressingInfoTemp, + IDC_BENCHMARK_COMPRESSING_USAGE, + IDC_BENCHMARK_COMPRESSING_SPEED, + IDC_BENCHMARK_COMPRESSING_RPU, + IDC_BENCHMARK_COMPRESSING_RATING); + } + + { + PrintResults( + Sync.DictionarySize, + Sync.CompressingInfo, + IDC_BENCHMARK_COMPRESSING_USAGE2, + IDC_BENCHMARK_COMPRESSING_SPEED2, + IDC_BENCHMARK_COMPRESSING_RPU2, + IDC_BENCHMARK_COMPRESSING_RATING2); + } + + { + PrintResults( + Sync.DictionarySize, + Sync.DecompressingInfoTemp, + IDC_BENCHMARK_DECOMPRESSING_USAGE, + IDC_BENCHMARK_DECOMPRESSING_SPEED, + IDC_BENCHMARK_DECOMPRESSING_RPU, + IDC_BENCHMARK_DECOMPRESSING_RATING, + true); + } + { + PrintResults( + Sync.DictionarySize, + Sync.DecompressingInfo, + IDC_BENCHMARK_DECOMPRESSING_USAGE2, + IDC_BENCHMARK_DECOMPRESSING_SPEED2, + IDC_BENCHMARK_DECOMPRESSING_RPU2, + IDC_BENCHMARK_DECOMPRESSING_RATING2, + true); + if (Sync.DecompressingInfo.GlobalTime > 0 && + Sync.CompressingInfo.GlobalTime > 0) + { + UInt64 comprRating = GetCompressRating(Sync.DictionarySize, + Sync.CompressingInfo.GlobalTime, Sync.CompressingInfo.GlobalFreq, Sync.CompressingInfo.UnpackSize); + UInt64 decomprRating = GetDecompressRating(Sync.DecompressingInfo.GlobalTime, + Sync.DecompressingInfo.GlobalFreq, Sync.DecompressingInfo.UnpackSize, + Sync.DecompressingInfo.PackSize, 1); + PrintRating((comprRating + decomprRating) / 2, IDC_BENCHMARK_TOTAL_RATING_VALUE); + PrintRating(( + GetRatingPerUsage(Sync.CompressingInfo, comprRating) + + GetRatingPerUsage(Sync.DecompressingInfo, decomprRating)) / 2, IDC_BENCHMARK_TOTAL_RPU_VALUE); + PrintUsage((GetUsage(Sync.CompressingInfo) + GetUsage(Sync.DecompressingInfo)) / 2, IDC_BENCHMARK_TOTAL_USAGE_VALUE); + } + } + return true; +} + +bool CBenchmarkDialog::OnCommand(int code, int itemID, LPARAM lParam) +{ + if (code == CBN_SELCHANGE && + (itemID == IDC_BENCHMARK_COMBO_DICTIONARY || + itemID == IDC_BENCHMARK_COMBO_NUM_THREADS)) + { + OnChangeSettings(); + return true; + } + return CModalDialog::OnCommand(code, itemID, lParam); +} + +bool CBenchmarkDialog::OnButtonClicked(int buttonID, HWND buttonHWND) +{ + switch(buttonID) + { + case IDC_BUTTON_RESTART: + OnRestartButton(); + return true; + case IDC_BUTTON_STOP: + OnStopButton(); + return true; + } + return CModalDialog::OnButtonClicked(buttonID, buttonHWND); +} + +struct CThreadBenchmark +{ + CBenchmarkDialog *BenchmarkDialog; + UInt64 _startTime; + DECL_EXTERNAL_CODECS_VARS + // UInt32 dictionarySize; + // UInt32 numThreads; + + HRESULT Process(); + HRESULT Result; + static THREAD_FUNC_DECL MyThreadFunction(void *param) + { + ((CThreadBenchmark *)param)->Result = ((CThreadBenchmark *)param)->Process(); + return 0; + } +}; + +struct CBenchCallback: public IBenchCallback +{ + UInt32 dictionarySize; + CProgressSyncInfo *Sync; + HRESULT SetEncodeResult(const CBenchInfo &info, bool final); + HRESULT SetDecodeResult(const CBenchInfo &info, bool final); +}; + +HRESULT CBenchCallback::SetEncodeResult(const CBenchInfo &info, bool final) +{ + NSynchronization::CCriticalSectionLock lock(Sync->CS); + if (Sync->Changed || Sync->Paused || Sync->Stopped) + return E_ABORT; + Sync->ProcessedSize = info.UnpackSize; + if (final && Sync->CompressingInfo.GlobalTime == 0) + { + (CBenchInfo&)Sync->CompressingInfo = info; + if (Sync->CompressingInfo.GlobalTime == 0) + Sync->CompressingInfo.GlobalTime = 1; + } + else + (CBenchInfo&)Sync->CompressingInfoTemp = info; + + return S_OK; +} + +HRESULT CBenchCallback::SetDecodeResult(const CBenchInfo &info, bool final) +{ + NSynchronization::CCriticalSectionLock lock(Sync->CS); + if (Sync->Changed || Sync->Paused || Sync->Stopped) + return E_ABORT; + CBenchInfo info2 = info; + if (info2.NumIterations == 0) + info2.NumIterations = 1; + + info2.UnpackSize *= info2.NumIterations; + info2.PackSize *= info2.NumIterations; + info2.NumIterations = 1; + + if (final && Sync->DecompressingInfo.GlobalTime == 0) + { + (CBenchInfo&)Sync->DecompressingInfo = info2; + if (Sync->DecompressingInfo.GlobalTime == 0) + Sync->DecompressingInfo.GlobalTime = 1; + } + else + (CBenchInfo&)Sync->DecompressingInfoTemp = info2; + return S_OK; +} + +HRESULT CThreadBenchmark::Process() +{ + CProgressSyncInfo &sync = BenchmarkDialog->Sync; + sync.WaitCreating(); + try + { + for (;;) + { + if (sync.WasStopped()) + return 0; + if (sync.WasPaused()) + { + Sleep(200); + continue; + } + UInt32 dictionarySize; + UInt32 numThreads; + { + NSynchronization::CCriticalSectionLock lock(sync.CS); + if (sync.Stopped || sync.Paused) + continue; + if (sync.Changed) + sync.Init(); + dictionarySize = sync.DictionarySize; + numThreads = sync.NumThreads; + } + + CBenchCallback callback; + callback.dictionarySize = dictionarySize; + callback.Sync = &sync; + HRESULT result; + try + { + result = LzmaBench( + EXTERNAL_CODECS_VARS + numThreads, dictionarySize, &callback); + } + catch(...) + { + result = E_FAIL; + } + + if (result != S_OK) + { + if (result != E_ABORT) + { + // sync.NumErrors++; + { + NSynchronization::CCriticalSectionLock lock(sync.CS); + sync.Pause(); + } + UString message; + if (result == S_FALSE) + message = L"Decoding error"; + else if (result == CLASS_E_CLASSNOTAVAILABLE) + message = L"Can't find 7z.dll"; + else + message = HResultToMessage(result); + BenchmarkDialog->MessageBoxError(message); + } + } + else + { + NSynchronization::CCriticalSectionLock lock(sync.CS); + sync.NumPasses++; + } + } + // return S_OK; + } + catch(CSystemException &e) + { + BenchmarkDialog->MessageBoxError(HResultToMessage(e.ErrorCode)); + return E_FAIL; + } + catch(...) + { + BenchmarkDialog->MessageBoxError(HResultToMessage(E_FAIL)); + return E_FAIL; + } +} + +HRESULT Benchmark( + DECL_EXTERNAL_CODECS_LOC_VARS + UInt32 numThreads, UInt32 dictionarySize, HWND hwndParent) +{ + CThreadBenchmark benchmarker; + #ifdef EXTERNAL_CODECS + benchmarker._codecsInfo = codecsInfo; + benchmarker._externalCodecs = *externalCodecs; + #endif + + CBenchmarkDialog benchmarkDialog; + benchmarkDialog.Sync.DictionarySize = dictionarySize; + benchmarkDialog.Sync.NumThreads = numThreads; + + benchmarker.BenchmarkDialog = &benchmarkDialog; + NWindows::CThread thread; + RINOK(thread.Create(CThreadBenchmark::MyThreadFunction, &benchmarker)); + benchmarkDialog.Create(hwndParent); + return thread.Wait(); +} diff --git a/CPP/7zip/UI/GUI/BenchmarkDialog.h b/CPP/7zip/UI/GUI/BenchmarkDialog.h new file mode 100644 index 0000000..2b6216f --- /dev/null +++ b/CPP/7zip/UI/GUI/BenchmarkDialog.h @@ -0,0 +1,135 @@ +// BenchmarkDialog.h + +#ifndef __BENCHMARK_DIALOG_H +#define __BENCHMARK_DIALOG_H + +#include "Windows/Synchronization.h" +#include "Windows/Control/ComboBox.h" + +#include "../Common/Bench.h" + +#include "../FileManager/DialogSize.h" + +#include "BenchmarkDialogRes.h" + +struct CBenchInfo2 : public CBenchInfo +{ + void Init() { GlobalTime = UserTime = 0; } +}; + +class CProgressSyncInfo +{ +public: + bool Stopped; + bool Paused; + bool Changed; + UInt32 DictionarySize; + UInt32 NumThreads; + UInt64 NumPasses; + // UInt64 NumErrors; + NWindows::NSynchronization::CManualResetEvent _startEvent; + NWindows::NSynchronization::CCriticalSection CS; + + CBenchInfo2 CompressingInfoTemp; + CBenchInfo2 CompressingInfo; + UInt64 ProcessedSize; + + CBenchInfo2 DecompressingInfoTemp; + CBenchInfo2 DecompressingInfo; + + CProgressSyncInfo() + { + if (_startEvent.Create() != S_OK) + throw 3986437; + } + void Init() + { + Changed = false; + Stopped = false; + Paused = false; + CompressingInfoTemp.Init(); + CompressingInfo.Init(); + ProcessedSize = 0; + + DecompressingInfoTemp.Init(); + DecompressingInfo.Init(); + + NumPasses = 0; + // NumErrors = 0; + } + void Stop() + { + NWindows::NSynchronization::CCriticalSectionLock lock(CS); + Stopped = true; + } + bool WasStopped() + { + NWindows::NSynchronization::CCriticalSectionLock lock(CS); + return Stopped; + } + void Pause() + { + NWindows::NSynchronization::CCriticalSectionLock lock(CS); + Paused = true; + } + void Start() + { + NWindows::NSynchronization::CCriticalSectionLock lock(CS); + Paused = false; + } + bool WasPaused() + { + NWindows::NSynchronization::CCriticalSectionLock lock(CS); + return Paused; + } + void WaitCreating() { _startEvent.Lock(); } +}; + +class CBenchmarkDialog: + public NWindows::NControl::CModalDialog +{ + NWindows::NControl::CComboBox m_Dictionary; + NWindows::NControl::CComboBox m_NumThreads; + UINT_PTR _timer; + UINT32 _startTime; + + bool OnTimer(WPARAM timerID, LPARAM callback); + virtual bool OnInit(); + void OnRestartButton(); + void OnStopButton(); + void OnHelp(); + virtual void OnCancel(); + bool OnButtonClicked(int buttonID, HWND buttonHWND); + bool OnCommand(int code, int itemID, LPARAM lParam); + + void PrintTime(); + void PrintRating(UInt64 rating, UINT controlID); + void PrintUsage(UInt64 usage, UINT controlID); + void PrintResults( + UINT32 dictionarySize, + const CBenchInfo2 &info, UINT usageID, UINT speedID, UINT rpuID, UINT ratingID, + bool decompressMode = false); + + UInt32 GetNumberOfThreads(); + UInt32 OnChangeDictionary(); + void OnChangeSettings(); +public: + CProgressSyncInfo Sync; + + CBenchmarkDialog(): _timer(0) {} + INT_PTR Create(HWND wndParent = 0) + { + BIG_DIALOG_SIZE(332, 228); + return CModalDialog::Create(SIZED_DIALOG(IDD_DIALOG_BENCHMARK), wndParent); + } + void MessageBoxError(LPCWSTR message) + { + MessageBoxW(*this, message, L"7-Zip", MB_ICONERROR); + } +}; + +HRESULT Benchmark( + DECL_EXTERNAL_CODECS_LOC_VARS + UInt32 numThreads, UInt32 dictionarySize, HWND hwndParent = NULL); + +#endif diff --git a/CPP/7zip/UI/GUI/BenchmarkDialogRes.h b/CPP/7zip/UI/GUI/BenchmarkDialogRes.h new file mode 100644 index 0000000..2488bd1 --- /dev/null +++ b/CPP/7zip/UI/GUI/BenchmarkDialogRes.h @@ -0,0 +1,55 @@ +#define IDD_DIALOG_BENCHMARK 550 +#define IDD_DIALOG_BENCHMARK_2 650 +#define IDC_BUTTON_STOP 1001 +#define IDC_BUTTON_RESTART 1002 +#define IDC_BENCHMARK_DICTIONARY 1010 +#define IDC_BENCHMARK_COMBO_DICTIONARY 1011 +#define IDC_BENCHMARK_MEMORY 1012 +#define IDC_BENCHMARK_MEMORY_VALUE 1013 +#define IDC_BENCHMARK_NUM_THREADS 1014 +#define IDC_BENCHMARK_COMBO_NUM_THREADS 1015 +#define IDC_BENCHMARK_HARDWARE_THREADS 1016 + +#define IDC_BENCHMARK_SPEED_LABEL 1020 +#define IDC_BENCHMARK_RATING_LABEL 1021 +#define IDC_BENCHMARK_COMPRESSING 1022 +#define IDC_BENCHMARK_DECOMPRESSING 1023 +#define IDC_BENCHMARK_CURRENT 1024 +#define IDC_BENCHMARK_RESULTING 1025 +#define IDC_BENCHMARK_CURRENT2 1026 +#define IDC_BENCHMARK_RESULTING2 1027 +#define IDC_BENCHMARK_USAGE_LABEL 1028 +#define IDC_BENCHMARK_RPU_LABEL 1029 + +#define IDC_BENCHMARK_COMPRESSING_SPEED 1030 +#define IDC_BENCHMARK_COMPRESSING_SPEED2 1031 +#define IDC_BENCHMARK_COMPRESSING_RATING 1032 +#define IDC_BENCHMARK_COMPRESSING_RATING2 1033 +#define IDC_BENCHMARK_COMPRESSING_USAGE 1034 +#define IDC_BENCHMARK_COMPRESSING_USAGE2 1035 +#define IDC_BENCHMARK_COMPRESSING_RPU 1036 +#define IDC_BENCHMARK_COMPRESSING_RPU2 1037 + + +#define IDC_BENCHMARK_DECOMPRESSING_SPEED 1040 +#define IDC_BENCHMARK_DECOMPRESSING_SPEED2 1041 +#define IDC_BENCHMARK_DECOMPRESSING_RATING 1042 +#define IDC_BENCHMARK_DECOMPRESSING_RATING2 1043 +#define IDC_BENCHMARK_DECOMPRESSING_USAGE 1044 +#define IDC_BENCHMARK_DECOMPRESSING_USAGE2 1045 +#define IDC_BENCHMARK_DECOMPRESSING_RPU 1046 +#define IDC_BENCHMARK_DECOMPRESSING_RPU2 1047 + + +#define IDC_BENCHMARK_TOTAL_RATING 1050 + +#define IDC_BENCHMARK_TOTAL_RATING_VALUE 1051 +#define IDC_BENCHMARK_TOTAL_RPU_VALUE 1052 +#define IDC_BENCHMARK_TOTAL_USAGE_VALUE 1053 + +#define IDC_BENCHMARK_ELAPSED 1060 +#define IDC_BENCHMARK_ELAPSED_VALUE 1061 +#define IDC_BENCHMARK_SIZE 1062 +#define IDC_BENCHMARK_SIZE_VALUE 1063 +#define IDC_BENCHMARK_PASSES 1066 +#define IDC_BENCHMARK_PASSES_VALUE 1067 diff --git a/CPP/7zip/UI/GUI/BenchmarkDialog_rc.cpp b/CPP/7zip/UI/GUI/BenchmarkDialog_rc.cpp new file mode 100644 index 0000000..a10d4bb --- /dev/null +++ b/CPP/7zip/UI/GUI/BenchmarkDialog_rc.cpp @@ -0,0 +1,248 @@ +// BenchmarkDialog.cpp + +#include "StdAfx.h" + +// For compilers that support precompilation, includes "wx/wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +// for all others, include the necessary headers (this file is usually all you +// need because it includes almost all "standard" wxWidgets headers) +#ifndef WX_PRECOMP + #include "wx/wx.h" +#endif + +#undef _WIN32 + +#include "Windows/Control/DialogImpl.h" +#include "BenchmarkDialogRes.h" + +#if 0 + + +IDD_DIALOG_BENCHMARK DIALOG 0, 0, xSize, ySize MY_MODAL_DIALOG_STYLE | WS_MINIMIZEBOX +CAPTION "Benchmark" +MY_FONT +BEGIN +OK PUSHBUTTON "&Restart", IDC_BUTTON_RESTART, bXPos1, marg, bXSize, bYSize +OK PUSHBUTTON "&Stop", IDC_BUTTON_STOP, bXPos1, 27, bXSize, bYSize + + PUSHBUTTON "&Help", IDHELP, bXPos2, bYPos, bXSize,bYSize + PUSHBUTTON "Cancel", IDCANCEL, bXPos1, bYPos, bXSize, bYSize + +OK LTEXT "&Dictionary size:", IDC_BENCHMARK_DICTIONARY, marg, marg + 1, g0XSize, 8 +OK COMBOBOX IDC_BENCHMARK_COMBO_DICTIONARY, g1XPos, marg, g1XSize, 140, CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + + LTEXT "&Number of CPU threads:", IDC_BENCHMARK_NUM_THREADS, marg, 24, g0XSize, 8 + COMBOBOX IDC_BENCHMARK_COMBO_NUM_THREADS, g1XPos, 23, g1XSize, 140, CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + + LTEXT "Memory usage:", IDC_BENCHMARK_MEMORY, gc2XPos, marg + 1, gc2XSize, 8 + LTEXT "0 MB", IDC_BENCHMARK_MEMORY_VALUE, gc2XPos + gc2XSize, marg + 1, 40, 8 + LTEXT "1", IDC_BENCHMARK_HARDWARE_THREADS, gc2XPos, 24, 40, 8 + + RTEXT "CPU Usage", IDC_BENCHMARK_USAGE_LABEL, gUsagePos, 53, gUsageSize, 8 + RTEXT "Speed", IDC_BENCHMARK_SPEED_LABEL, gSpeedPos, 53, gSpeedSize, 8 + RTEXT "Rating / Usage", IDC_BENCHMARK_RPU_LABEL, gRpuPos, 53, gRpuSize, 8 + RTEXT "Rating", IDC_BENCHMARK_RATING_LABEL, gRatingPos, 53, gRatingSize, 8 + + GROUPBOX "Compressing", IDC_BENCHMARK_COMPRESSING, marg, 64, xSize2, 40 + + LTEXT "Current", IDC_BENCHMARK_CURRENT, g10XPos, 76, gLabelSize, 8 + RTEXT "100%", IDC_BENCHMARK_COMPRESSING_USAGE, gUsagePos, 76, gUsageSize, 8 + RTEXT "100 KB/s", IDC_BENCHMARK_COMPRESSING_SPEED, gSpeedPos, 76, gSpeedSize, 8 + RTEXT "0", IDC_BENCHMARK_COMPRESSING_RPU, gRpuPos, 76, gRpuSize, 8 + RTEXT "0", IDC_BENCHMARK_COMPRESSING_RATING, gRatingPos, 76, gRatingSize, 8 + + LTEXT "Resulting", IDC_BENCHMARK_RESULTING, g10XPos, 89, gLabelSize, 8 + RTEXT "100%", IDC_BENCHMARK_COMPRESSING_USAGE2, gUsagePos, 89, gUsageSize, 8 + RTEXT "100 KB/s", IDC_BENCHMARK_COMPRESSING_SPEED2, gSpeedPos, 89, gSpeedSize, 8 + RTEXT "0", IDC_BENCHMARK_COMPRESSING_RPU2, gRpuPos, 89, gRpuSize, 8 + RTEXT "0", IDC_BENCHMARK_COMPRESSING_RATING2, gRatingPos, 89, gRatingSize, 8 + + GROUPBOX "Decompressing", IDC_BENCHMARK_DECOMPRESSING, marg, 111, xSize2, 40 + + LTEXT "Current", IDC_BENCHMARK_CURRENT2, g10XPos, 123, gLabelSize, 8 + RTEXT "100%", IDC_BENCHMARK_DECOMPRESSING_USAGE, gUsagePos, 123, gUsageSize, 8 + RTEXT "100 KB/s", IDC_BENCHMARK_DECOMPRESSING_SPEED, gSpeedPos, 123, gSpeedSize, 8 + RTEXT "0", IDC_BENCHMARK_DECOMPRESSING_RPU, gRpuPos, 123, gRpuSize, 8 + RTEXT "0", IDC_BENCHMARK_DECOMPRESSING_RATING, gRatingPos, 123, gRatingSize, 8 + + LTEXT "Resulting", IDC_BENCHMARK_RESULTING2, g10XPos, 136, gLabelSize, 8 + RTEXT "100%", IDC_BENCHMARK_DECOMPRESSING_USAGE2, gUsagePos, 136, gUsageSize, 8 + RTEXT "100 KB/s", IDC_BENCHMARK_DECOMPRESSING_SPEED2, gSpeedPos, 136, gSpeedSize, 8 + RTEXT "0", IDC_BENCHMARK_DECOMPRESSING_RPU2, gRpuPos, 136, gRpuSize, 8 + RTEXT "0", IDC_BENCHMARK_DECOMPRESSING_RATING2, gRatingPos, 136, gRatingSize, 8 + + GROUPBOX "Total Rating", IDC_BENCHMARK_TOTAL_RATING, gTotalRatingPos, 163, gTotalRatingSize, 38 + RTEXT "0", IDC_BENCHMARK_TOTAL_USAGE_VALUE, gUsagePos, 181, gUsageSize, 8 + RTEXT "0", IDC_BENCHMARK_TOTAL_RPU_VALUE, gRpuPos, 181, gRpuSize, 8 + RTEXT "0", IDC_BENCHMARK_TOTAL_RATING_VALUE, gRatingPos, 181, gRatingSize, 8 + + LTEXT "Elapsed time:", IDC_BENCHMARK_ELAPSED, marg, 163, g2XSize, 8 + LTEXT "Size:", IDC_BENCHMARK_SIZE, marg, 176, g2XSize, 8 + LTEXT "Passes:", IDC_BENCHMARK_PASSES, marg, 189, g2XSize, 8 + RTEXT "00:00:00", IDC_BENCHMARK_ELAPSED_VALUE, g3XPos, 163, g3XSize, 8 + RTEXT "0", IDC_BENCHMARK_SIZE_VALUE, g3XPos, 176, g3XSize, 8 + RTEXT "0", IDC_BENCHMARK_PASSES_VALUE, g3XPos, 189, g3XSize, 8 +END +#endif // #if 0 + +class CBenchmarkDialogImpl : public NWindows::NControl::CModalDialogImpl +{ + public: + CBenchmarkDialogImpl(NWindows::NControl::CModalDialog *dialog,wxWindow * parent , int id) : CModalDialogImpl(dialog,parent, id, wxT("Benchmark")) + { + + wxSizer *topsizer = new wxBoxSizer(wxVERTICAL); + + wxSizer *sizerLine1 = new wxBoxSizer(wxHORIZONTAL); + + wxSizer *sizeLine1Btn = new wxBoxSizer(wxVERTICAL); + sizeLine1Btn->Add(new wxButton(this, IDC_BUTTON_RESTART, _T("&Restart")) , 0, wxALL|wxEXPAND, 5 ); + sizeLine1Btn->Add(new wxButton(this, IDC_BUTTON_STOP, _T("&Stop")) , 0, wxALL|wxEXPAND, 5 ); + + wxSizer *sizeLine1Combo = new wxBoxSizer(wxVERTICAL); + + wxComboBox * chcDicoSize = new wxComboBox(this, IDC_BENCHMARK_COMBO_DICTIONARY, + wxEmptyString, wxDefaultPosition, wxDefaultSize, wxArrayString(), wxCB_READONLY); + + wxComboBox * chcThread = new wxComboBox(this, IDC_BENCHMARK_COMBO_NUM_THREADS, + wxEmptyString, wxDefaultPosition, wxDefaultSize, wxArrayString(), wxCB_READONLY); + + sizeLine1Combo->Add(chcDicoSize , 0, wxALL, 5 ); + sizeLine1Combo->Add(chcThread , 0, wxALL, 5 ); + + wxSizer *sizeLine1ComboLabel = new wxBoxSizer(wxVERTICAL); + sizeLine1ComboLabel->Add(new wxStaticText(this, IDC_BENCHMARK_DICTIONARY, _T("&Dictionary size:")) , 1, wxALL|wxEXPAND, 5 ); + sizeLine1ComboLabel->Add(new wxStaticText(this, IDC_BENCHMARK_NUM_THREADS, _T("&Number of CPU threads:")) , 1, wxALL|wxEXPAND, 5 ); + + wxSizer *sizeLine1Col3 = new wxBoxSizer(wxVERTICAL); + sizeLine1Col3->Add(new wxStaticText(this, IDC_BENCHMARK_MEMORY, _T("Memory usage:")) , 1, wxALL|wxEXPAND, 5 ); + sizeLine1Col3->Add(new wxStaticText(this, IDC_BENCHMARK_HARDWARE_THREADS, _T("1")) , 1, wxALL|wxEXPAND, 5 ); + + wxSizer *sizeLine1Col4 = new wxBoxSizer(wxVERTICAL); + sizeLine1Col4->Add(new wxStaticText(this, IDC_BENCHMARK_MEMORY_VALUE, _T("0 MB")) , 0, wxALL|wxEXPAND, 5 ); + + sizerLine1->Add(sizeLine1ComboLabel,0, wxALL|wxEXPAND, 5); + sizerLine1->Add(sizeLine1Combo,0, wxALL|wxEXPAND, 5); + sizerLine1->Add(sizeLine1Col3,0, wxALL|wxEXPAND, 5); + sizerLine1->Add(sizeLine1Col4,0, wxALL|wxEXPAND, 5); + sizerLine1->Add(sizeLine1Btn,0, wxALL|wxEXPAND, 5); + + // LABEL (copy the structure of the compressing or decompressing group + + wxStaticBoxSizer * sizerLine2 = new wxStaticBoxSizer(new wxStaticBox(this,wxID_ANY,_T("")),wxVERTICAL); + wxSizer *sizerLabel = new wxBoxSizer(wxHORIZONTAL); + sizerLabel->Add(new wxStaticText(this, wxID_ANY, _T(" ")) , 1, wxALL|wxEXPAND, 5 ); + sizerLabel->Add(new wxStaticText(this, IDC_BENCHMARK_SPEED_LABEL, _T("Speed")) , 1, wxALL|wxEXPAND, 5 ); + sizerLabel->Add(new wxStaticText(this, IDC_BENCHMARK_USAGE_LABEL, _T("CPU Usage")) , 1, wxALL|wxEXPAND, 5 ); + sizerLabel->Add(new wxStaticText(this, IDC_BENCHMARK_RPU_LABEL, _T("Rating / Usage")), 1, wxALL|wxEXPAND, 5 ); + sizerLabel->Add(new wxStaticText(this, IDC_BENCHMARK_RATING_LABEL, _T("Rating")) , 1, wxALL|wxEXPAND, 5 ); + + sizerLine2->Add(sizerLabel, 0, wxALL|wxEXPAND, 5); + + // GROUP COMPRESSING + + wxStaticBoxSizer * grpCompress = new wxStaticBoxSizer(new wxStaticBox(this,IDC_BENCHMARK_COMPRESSING,_T("Compressing")),wxVERTICAL); + wxSizer *grpCompress1 = new wxBoxSizer(wxHORIZONTAL); + grpCompress1->Add(new wxStaticText(this, IDC_BENCHMARK_CURRENT, _T("Current")) , 1, wxALL|wxEXPAND, 5 ); + grpCompress1->Add(new wxStaticText(this, IDC_BENCHMARK_COMPRESSING_SPEED, _T("100 KB/s")) , 1, wxALL|wxEXPAND, 5 ); + grpCompress1->Add(new wxStaticText(this, IDC_BENCHMARK_COMPRESSING_USAGE, _T("100%")) , 1, wxALL|wxEXPAND, 5 ); + grpCompress1->Add(new wxStaticText(this, IDC_BENCHMARK_COMPRESSING_RPU, _T("0")), 1, wxALL|wxEXPAND, 5 ); + grpCompress1->Add(new wxStaticText(this, IDC_BENCHMARK_COMPRESSING_RATING, _T("0")) , 1, wxALL|wxEXPAND, 5 ); + + wxSizer *grpCompress2 = new wxBoxSizer(wxHORIZONTAL); + grpCompress2->Add(new wxStaticText(this, IDC_BENCHMARK_RESULTING, _T("Resulting")) , 1, wxALL|wxEXPAND, 5 ); + grpCompress2->Add(new wxStaticText(this, IDC_BENCHMARK_COMPRESSING_SPEED2, _T("100 KB/s")) , 1, wxALL|wxEXPAND, 5 ); + grpCompress2->Add(new wxStaticText(this, IDC_BENCHMARK_COMPRESSING_USAGE2, _T("100%")) , 1, wxALL|wxEXPAND, 5 ); + grpCompress2->Add(new wxStaticText(this, IDC_BENCHMARK_COMPRESSING_RPU2, _T("0")) , 1, wxALL|wxEXPAND, 5); + grpCompress2->Add(new wxStaticText(this, IDC_BENCHMARK_COMPRESSING_RATING2, _T("0")) , 1, wxALL|wxEXPAND, 5 ); + + grpCompress->Add(grpCompress1, 0, wxALL|wxEXPAND, 5); + grpCompress->Add(grpCompress2, 0, wxALL|wxEXPAND, 5); + + // GROUP DECOMPRESSING + + wxStaticBoxSizer * grpDecompress = new wxStaticBoxSizer(new wxStaticBox(this,IDC_BENCHMARK_DECOMPRESSING,_T("Decompressing")),wxVERTICAL); + wxSizer *grpDecompress1 = new wxBoxSizer(wxHORIZONTAL); + grpDecompress1->Add(new wxStaticText(this, IDC_BENCHMARK_CURRENT2, _T("Current")) , 1, wxALL|wxEXPAND, 5 ); + grpDecompress1->Add(new wxStaticText(this, IDC_BENCHMARK_DECOMPRESSING_SPEED, _T("100 KB/s")) , 1, wxALL|wxEXPAND, 5 ); + grpDecompress1->Add(new wxStaticText(this, IDC_BENCHMARK_DECOMPRESSING_USAGE, _T("100%")) , 1, wxALL|wxEXPAND, 5 ); + grpDecompress1->Add(new wxStaticText(this, IDC_BENCHMARK_DECOMPRESSING_RPU, _T("0")), 1, wxALL|wxEXPAND, 5 ); + grpDecompress1->Add(new wxStaticText(this, IDC_BENCHMARK_DECOMPRESSING_RATING, _T("0")) , 1, wxALL|wxEXPAND, 5 ); + + wxSizer *grpDecompress2 = new wxBoxSizer(wxHORIZONTAL); + grpDecompress2->Add(new wxStaticText(this, IDC_BENCHMARK_RESULTING2, _T("Resulting")) , 1, wxALL|wxEXPAND, 5 ); + grpDecompress2->Add(new wxStaticText(this, IDC_BENCHMARK_DECOMPRESSING_SPEED2, _T("100 KB/s")) , 1, wxALL|wxEXPAND, 5 ); + grpDecompress2->Add(new wxStaticText(this, IDC_BENCHMARK_DECOMPRESSING_USAGE2, _T("100%")) , 1, wxALL|wxEXPAND, 5 ); + grpDecompress2->Add(new wxStaticText(this, IDC_BENCHMARK_DECOMPRESSING_RPU2, _T("0")) , 1, wxALL|wxEXPAND, 5); + grpDecompress2->Add(new wxStaticText(this, IDC_BENCHMARK_DECOMPRESSING_RATING2, _T("0")) , 1, wxALL|wxEXPAND, 5 ); + + grpDecompress->Add(grpDecompress1, 0, wxALL|wxEXPAND, 5); + grpDecompress->Add(grpDecompress2, 0, wxALL|wxEXPAND, 5); + + // GROUPE TOTAL RATING + wxStaticBoxSizer * grpTotalRating = new wxStaticBoxSizer(new wxStaticBox(this,IDC_BENCHMARK_TOTAL_RATING,_T("Total Rating")),wxHORIZONTAL); + grpTotalRating->Add(new wxStaticText(this, wxID_ANY, _T("")) , 1, wxALL|wxEXPAND, 5 ); + grpTotalRating->Add(new wxStaticText(this, IDC_BENCHMARK_TOTAL_USAGE_VALUE, _T("0")) , 1, wxALL|wxEXPAND, 5 ); + grpTotalRating->Add(new wxStaticText(this, IDC_BENCHMARK_TOTAL_RPU_VALUE, _T("0")) , 1, wxALL|wxEXPAND, 5 ); + grpTotalRating->Add(new wxStaticText(this, IDC_BENCHMARK_TOTAL_RATING_VALUE, _T("0")) , 1, wxALL|wxEXPAND, 5 ); + + // GROUPE ELAPSED TIME + wxSizer * grpElapsedTime = new wxBoxSizer(wxHORIZONTAL); + + wxSizer * grpElapsedTime1 = new wxBoxSizer(wxVERTICAL); + grpElapsedTime1->Add(new wxStaticText(this, IDC_BENCHMARK_ELAPSED, _T("Elapsed time:")) , 0, wxALL|wxEXPAND, 5 ); + grpElapsedTime1->Add(new wxStaticText(this, IDC_BENCHMARK_SIZE, _T("Size:")) , 0, wxALL|wxEXPAND, 5 ); + grpElapsedTime1->Add(new wxStaticText(this, IDC_BENCHMARK_PASSES, _T("Passes:")) , 0, wxALL|wxEXPAND, 5 ); + + wxSizer * grpElapsedTime2 = new wxBoxSizer(wxVERTICAL); + grpElapsedTime2->Add(new wxStaticText(this, IDC_BENCHMARK_ELAPSED_VALUE, _T("00:00:00")) , 0, wxALL|wxEXPAND, 5 ); + grpElapsedTime2->Add(new wxStaticText(this, IDC_BENCHMARK_SIZE_VALUE, _T("0")) , 0, wxALL|wxEXPAND, 5 ); + grpElapsedTime2->Add(new wxStaticText(this, IDC_BENCHMARK_PASSES_VALUE, _T("0")) , 0, wxALL|wxEXPAND, 5 ); + + grpElapsedTime->Add(grpElapsedTime1,0, wxALL|wxEXPAND, 5); + grpElapsedTime->Add(grpElapsedTime2,0, wxALL|wxEXPAND, 5); + + wxSizer * grp_ElapsedTime_TotalRating = new wxBoxSizer(wxHORIZONTAL); + grp_ElapsedTime_TotalRating->Add(grpElapsedTime, 0, wxALL|wxEXPAND, 5); + grp_ElapsedTime_TotalRating->Add(grpTotalRating, 1, wxALL|wxEXPAND, 5); + + // TOP + topsizer->Add(sizerLine1,0, wxALL|wxEXPAND, 5); + topsizer->Add(sizerLine2,0, wxALL|wxEXPAND, 5); + topsizer->Add(grpCompress, 0, wxALL|wxEXPAND, 5); + topsizer->Add(grpDecompress, 0, wxALL|wxEXPAND, 5); + topsizer->Add(grp_ElapsedTime_TotalRating, 0, wxALL|wxEXPAND, 5); + + topsizer->Add(CreateButtonSizer(wxHELP|wxCANCEL), 0, wxALL|wxEXPAND, 5); + + this->OnInit(); + + SetSizer(topsizer); // use the sizer for layout + topsizer->SetSizeHints(this); // set size hints to honour minimum size + } +private: + // Any class wishing to process wxWindows events must use this macro + DECLARE_EVENT_TABLE() +}; + +REGISTER_DIALOG(IDD_DIALOG_BENCHMARK,CBenchmarkDialog,0) + +// ---------------------------------------------------------------------------- +// event tables and other macros for wxWidgets +// ---------------------------------------------------------------------------- + +// the event tables connect the wxWidgets events with the functions (event +// handlers) which process them. It can be also done at run-time, but for the +// simple menu events like this the static method is much simpler. +BEGIN_EVENT_TABLE(CBenchmarkDialogImpl, wxDialog) + EVT_TIMER(wxID_ANY, CModalDialogImpl::OnAnyTimer) + EVT_BUTTON(wxID_ANY, CModalDialogImpl::OnAnyButton) + EVT_COMBOBOX(wxID_ANY, CModalDialogImpl::OnAnyChoice) + EVT_MENU(WORKER_EVENT, CModalDialogImpl::OnWorkerEvent) +END_EVENT_TABLE() + diff --git a/CPP/7zip/UI/GUI/CompressDialog.cpp b/CPP/7zip/UI/GUI/CompressDialog.cpp new file mode 100644 index 0000000..da2b792 --- /dev/null +++ b/CPP/7zip/UI/GUI/CompressDialog.cpp @@ -0,0 +1,1496 @@ +// CompressDialog.cpp + +#include "StdAfx.h" + +#include "Common/IntToString.h" +#include "Common/StringConvert.h" + +#include "Windows/FileDir.h" +#include "Windows/FileName.h" +#include "Windows/System.h" + +#include "../FileManager/BrowseDialog.h" +#include "../FileManager/FormatUtils.h" +#include "../FileManager/HelpUtils.h" +#include "../FileManager/SplitUtils.h" + +#include "../Explorer/MyMessages.h" + +#include "../Common/ZipRegistry.h" + +#include "CompressDialog.h" + +#ifndef _UNICODE +extern bool g_IsNT; +#endif + +#ifdef LANG +#include "../FileManager/LangUtils.h" +#endif + +#include "CompressDialogRes.h" + +#define MY_SIZE_OF_ARRAY(x) (sizeof(x) / sizeof(x[0])) + +#ifdef LANG +static CIDLangPair kIDLangPairs[] = +{ + { IDC_STATIC_COMPRESS_ARCHIVE, 0x02000D01 }, + { IDC_STATIC_COMPRESS_FORMAT, 0x02000D03 }, + { IDC_STATIC_COMPRESS_LEVEL, 0x02000D0B }, + { IDC_STATIC_COMPRESS_METHOD, 0x02000D04 }, + { IDC_STATIC_COMPRESS_DICTIONARY, 0x02000D0C }, + { IDC_STATIC_COMPRESS_ORDER, 0x02000D0D }, + { IDC_STATIC_COMPRESS_MEMORY, 0x02000D0E }, + { IDC_STATIC_COMPRESS_MEMORY_DE, 0x02000D0F }, + { IDC_STATIC_COMPRESS_THREADS, 0x02000D12 }, + { IDC_STATIC_COMPRESS_SOLID, 0x02000D13 }, + { IDC_STATIC_COMPRESS_VOLUME, 0x02000D40 }, + { IDC_STATIC_COMPRESS_PARAMETERS, 0x02000D06 }, + + { IDC_STATIC_COMPRESS_UPDATE_MODE, 0x02000D02 }, + { IDC_STATIC_COMPRESS_OPTIONS, 0x02000D07 }, + { IDC_COMPRESS_SFX, 0x02000D08 }, + { IDC_COMPRESS_SHARED, 0x02000D16 }, + + { IDC_COMPRESS_ENCRYPTION, 0x02000D10 }, + { IDC_STATIC_COMPRESS_PASSWORD1, 0x02000B01 }, + { IDC_STATIC_COMPRESS_PASSWORD2, 0x02000B03 }, + { IDC_COMPRESS_CHECK_SHOW_PASSWORD, 0x02000B02 }, + { IDC_STATIC_COMPRESS_ENCRYPTION_METHOD, 0x02000D11 }, + { IDC_COMPRESS_CHECK_ENCRYPT_FILE_NAMES, 0x02000D0A }, + + { IDOK, 0x02000702 }, + { IDCANCEL, 0x02000710 }, + { IDHELP, 0x02000720 } +}; +#endif + +using namespace NWindows; +using namespace NFile; +using namespace NName; +using namespace NDirectory; + +static const int kHistorySize = 20; + +static LPCWSTR kExeExt = L".exe"; +static LPCWSTR k7zFormat = L"7z"; + +struct CLevelInfo +{ + UInt32 ResourceID; + UInt32 LangID; +}; + +enum ELevel +{ + kStore = 0, + kFastest = 1, + kFast = 3, + kNormal = 5, + kMaximum = 7, + kUltra = 9 +}; + +static const CLevelInfo g_Levels[] = +{ + { IDS_METHOD_STORE, 0x02000D81 }, + { IDS_METHOD_FASTEST, 0x02000D85 }, + { 0, 0 }, + { IDS_METHOD_FAST, 0x02000D84 }, + { 0, 0 }, + { IDS_METHOD_NORMAL, 0x02000D82 }, + { 0, 0 }, + { IDS_METHOD_MAXIMUM, 0x02000D83 }, + { 0, 0 }, + { IDS_METHOD_ULTRA, 0x02000D86 } +}; + +enum EMethodID +{ + kCopy, + kLZMA, + kLZMA2, + kPPMd, + kBZip2, + kDeflate, + kDeflate64, + kPPMdZip +}; + +static const LPCWSTR kMethodsNames[] = +{ + L"Copy", + L"LZMA", + L"LZMA2", + L"PPMd", + L"BZip2", + L"Deflate", + L"Deflate64", + L"PPMd" +}; + +static const EMethodID g_7zMethods[] = +{ + kLZMA, + kLZMA2, + kPPMd, + kBZip2 +}; + +static const EMethodID g_7zSfxMethods[] = +{ + kCopy, + kLZMA, + kLZMA2, + kPPMd +}; + +static EMethodID g_ZipMethods[] = +{ + kDeflate, + kDeflate64, + kBZip2, + kLZMA, + kPPMdZip +}; + +static EMethodID g_GZipMethods[] = +{ + kDeflate +}; + +static EMethodID g_BZip2Methods[] = +{ + kBZip2 +}; + +static EMethodID g_XzMethods[] = +{ + kLZMA2 +}; + +struct CFormatInfo +{ + LPCWSTR Name; + UInt32 LevelsMask; + const EMethodID *MathodIDs; + int NumMethods; + bool Filter; + bool Solid; + bool MultiThread; + bool SFX; + bool Encrypt; + bool EncryptFileNames; +}; + +#define METHODS_PAIR(x) x, MY_SIZE_OF_ARRAY(x) + +static const CFormatInfo g_Formats[] = +{ + { + L"", + (1 << 0) | (1 << 1) | (1 << 3) | (1 << 5) | (1 << 7) | (1 << 9), + 0, 0, + false, false, false, false, false, false + }, + { + k7zFormat, + (1 << 0) | (1 << 1) | (1 << 3) | (1 << 5) | (1 << 7) | (1 << 9), + METHODS_PAIR(g_7zMethods), + true, true, true, true, true, true + }, + { + L"Zip", + (1 << 0) | (1 << 1) | (1 << 3) | (1 << 5) | (1 << 7) | (1 << 9), + METHODS_PAIR(g_ZipMethods), + false, false, true, false, true, false + }, + { + L"GZip", + (1 << 1) | (1 << 5) | (1 << 7) | (1 << 9), + METHODS_PAIR(g_GZipMethods), + false, false, false, false, false, false + }, + { + L"BZip2", + (1 << 1) | (1 << 3) | (1 << 5) | (1 << 7) | (1 << 9), + METHODS_PAIR(g_BZip2Methods), + false, false, true, false, false, false + }, + { + L"xz", + (1 << 1) | (1 << 3) | (1 << 5) | (1 << 7) | (1 << 9), + METHODS_PAIR(g_XzMethods), + false, false, true, false, false, false + }, + { + L"Tar", + (1 << 0), + 0, 0, + false, false, false, false, false, false + }, + { + L"wim", + (1 << 0), + 0, 0, + false, false, false, false, false, false + } +}; + +static bool IsMethodSupportedBySfx(int methodID) +{ + for (int i = 0; i < MY_SIZE_OF_ARRAY(g_7zSfxMethods); i++) + if (methodID == g_7zSfxMethods[i]) + return true; + return false; +} + +static UInt64 GetMaxRamSizeForProgram() +{ + UInt64 physSize = NSystem::GetRamSize(); + const UInt64 kMinSysSize = (1 << 24); + if (physSize <= kMinSysSize) + physSize = 0; + else + physSize -= kMinSysSize; + const UInt64 kMinUseSize = (1 << 24); + if (physSize < kMinUseSize) + physSize = kMinUseSize; + return physSize; +} + +bool CCompressDialog::OnInit() +{ + #ifdef LANG + LangSetWindowText(HWND(*this), 0x02000D00); + LangSetDlgItemsText(HWND(*this), kIDLangPairs, MY_SIZE_OF_ARRAY(kIDLangPairs) ); + #endif + _password1Control.Attach(GetItem(IDC_COMPRESS_EDIT_PASSWORD1)); + _password2Control.Attach(GetItem(IDC_COMPRESS_EDIT_PASSWORD2)); + _password1Control.SetText(Info.Password); + _password2Control.SetText(Info.Password); + _encryptionMethod.Attach(GetItem(IDC_COMPRESS_COMBO_ENCRYPTION_METHOD)); + + m_ArchivePath.Attach(GetItem(IDC_COMPRESS_COMBO_ARCHIVE)); + m_Format.Attach(GetItem(IDC_COMPRESS_COMBO_FORMAT)); + m_Level.Attach(GetItem(IDC_COMPRESS_COMBO_LEVEL)); + m_Method.Attach(GetItem(IDC_COMPRESS_COMBO_METHOD)); + m_Dictionary.Attach(GetItem(IDC_COMPRESS_COMBO_DICTIONARY)); + m_Order.Attach(GetItem(IDC_COMPRESS_COMBO_ORDER)); + m_Solid.Attach(GetItem(IDC_COMPRESS_COMBO_SOLID)); + m_NumThreads.Attach(GetItem(IDC_COMPRESS_COMBO_THREADS)); + + m_UpdateMode.Attach(GetItem(IDC_COMPRESS_COMBO_UPDATE_MODE)); + m_Volume.Attach(GetItem(IDC_COMPRESS_COMBO_VOLUME)); + m_Params.Attach(GetItem(IDC_COMPRESS_EDIT_PARAMETERS)); + + AddVolumeItems(m_Volume); + + m_RegistryInfo.Load(); + CheckButton(IDC_COMPRESS_CHECK_SHOW_PASSWORD, m_RegistryInfo.ShowPassword); + CheckButton(IDC_COMPRESS_CHECK_ENCRYPT_FILE_NAMES, m_RegistryInfo.EncryptHeaders); + + UpdatePasswordControl(); + + Info.FormatIndex = -1; + int i; + for (i = 0; i < ArcIndices.Size(); i++) + { + int arcIndex = ArcIndices[i]; + const CArcInfoEx &ai = (*ArcFormats)[arcIndex]; + int index = (int)m_Format.AddString(ai.Name); + m_Format.SetItemData(index, arcIndex); + if (ai.Name.CompareNoCase(m_RegistryInfo.ArcType) == 0 || i == 0) + { + m_Format.SetCurSel(index); + Info.FormatIndex = arcIndex; + } + } + + SetArchiveName(Info.ArchiveName); + SetLevel(); + SetParams(); + + for (i = 0; i < m_RegistryInfo.ArcPaths.Size() && i < kHistorySize; i++) + m_ArchivePath.AddString(m_RegistryInfo.ArcPaths[i]); + + m_UpdateMode.AddString(LangString(IDS_COMPRESS_UPDATE_MODE_ADD, 0x02000DA1)); + m_UpdateMode.AddString(LangString(IDS_COMPRESS_UPDATE_MODE_UPDATE, 0x02000DA2)); + m_UpdateMode.AddString(LangString(IDS_COMPRESS_UPDATE_MODE_FRESH, 0x02000DA3)); + m_UpdateMode.AddString(LangString(IDS_COMPRESS_UPDATE_MODE_SYNCHRONIZE, 0x02000DA4)); + + m_UpdateMode.SetCurSel(0); + + SetSolidBlockSize(); + SetNumThreads(); + + TCHAR s[40] = { TEXT('/'), TEXT(' '), 0 }; + ConvertUInt32ToString(NSystem::GetNumberOfProcessors(), s + 2); + SetItemText(IDC_COMPRESS_HARDWARE_THREADS, s); + + CheckButton(IDC_COMPRESS_SFX, Info.SFXMode); + CheckButton(IDC_COMPRESS_SHARED, Info.OpenShareForWrite); + + CheckControlsEnable(); + + OnButtonSFX(); + + SetEncryptionMethod(); + SetMemoryUsage(); + + NormalizePosition(); + + return CModalDialog::OnInit(); +} + +namespace NCompressDialog +{ + bool CInfo::GetFullPathName(UString &result) const + { + #ifndef UNDER_CE + NDirectory::MySetCurrentDirectory(CurrentDirPrefix); + #endif + return MyGetFullPathName(ArchiveName, result); + } +} + +void CCompressDialog::UpdatePasswordControl() +{ + bool showPassword = IsShowPasswordChecked(); + TCHAR c = showPassword ? 0: TEXT('*'); + _password1Control.SetPasswordChar(c); + _password2Control.SetPasswordChar(c); + UString password; + _password1Control.GetText(password); + _password1Control.SetText(password); + _password2Control.GetText(password); + _password2Control.SetText(password); + + int cmdShow = showPassword ? SW_HIDE : SW_SHOW; + ShowItem(IDC_STATIC_COMPRESS_PASSWORD2, cmdShow); + _password2Control.Show(cmdShow); +} + +bool CCompressDialog::OnButtonClicked(int buttonID, HWND buttonHWND) +{ + switch(buttonID) + { + case IDC_COMPRESS_BUTTON_SET_ARCHIVE: + { + OnButtonSetArchive(); + return true; + } + case IDC_COMPRESS_SFX: + { + OnButtonSFX(); + SetMemoryUsage(); + return true; + } + case IDC_COMPRESS_CHECK_SHOW_PASSWORD: + { + UpdatePasswordControl(); + return true; + } + } + return CModalDialog::OnButtonClicked(buttonID, buttonHWND); +} + +void CCompressDialog::CheckSFXControlsEnable() +{ + const CFormatInfo &fi = g_Formats[GetStaticFormatIndex()]; + bool enable = fi.SFX; + if (enable) + { + int methodID = GetMethodID(); + enable = (methodID == -1 || IsMethodSupportedBySfx(methodID)); + } + if (!enable) + CheckButton(IDC_COMPRESS_SFX, false); + EnableItem(IDC_COMPRESS_SFX, enable); +} + +void CCompressDialog::CheckVolumeEnable() +{ + bool isSFX = IsSFX(); + m_Volume.Enable(!isSFX); + if (isSFX) + m_Volume.SetText(TEXT("")); +} + +void CCompressDialog::CheckControlsEnable() +{ + const CFormatInfo &fi = g_Formats[GetStaticFormatIndex()]; + Info.SolidIsSpecified = fi.Solid; + bool multiThreadEnable = fi.MultiThread; + Info.MultiThreadIsAllowed = multiThreadEnable; + Info.EncryptHeadersIsAllowed = fi.EncryptFileNames; + + EnableItem(IDC_COMPRESS_COMBO_SOLID, fi.Solid); + EnableItem(IDC_COMPRESS_COMBO_THREADS, multiThreadEnable); + CheckSFXControlsEnable(); + CheckVolumeEnable(); + + EnableItem(IDC_COMPRESS_ENCRYPTION, fi.Encrypt); + + EnableItem(IDC_STATIC_COMPRESS_PASSWORD1, fi.Encrypt); + EnableItem(IDC_STATIC_COMPRESS_PASSWORD2, fi.Encrypt); + EnableItem(IDC_COMPRESS_EDIT_PASSWORD1, fi.Encrypt); + EnableItem(IDC_COMPRESS_EDIT_PASSWORD2, fi.Encrypt); + EnableItem(IDC_COMPRESS_CHECK_SHOW_PASSWORD, fi.Encrypt); + + EnableItem(IDC_STATIC_COMPRESS_ENCRYPTION_METHOD, fi.Encrypt); + EnableItem(IDC_COMPRESS_COMBO_ENCRYPTION_METHOD, fi.Encrypt); + EnableItem(IDC_COMPRESS_CHECK_ENCRYPT_FILE_NAMES, fi.EncryptFileNames); + + ShowItem(IDC_COMPRESS_CHECK_ENCRYPT_FILE_NAMES, fi.EncryptFileNames ? SW_SHOW : SW_HIDE); +} + +bool CCompressDialog::IsSFX() +{ + CWindow sfxButton = GetItem(IDC_COMPRESS_SFX); + return sfxButton.IsEnabled() && IsButtonCheckedBool(IDC_COMPRESS_SFX); +} + +void CCompressDialog::OnButtonSFX() +{ + SetMethod(GetMethodID()); + + UString fileName; + m_ArchivePath.GetText(fileName); + int dotPos = fileName.ReverseFind(L'.'); + int slashPos = fileName.ReverseFind(WCHAR_PATH_SEPARATOR); + if (dotPos < 0 || dotPos <= slashPos) + dotPos = -1; + if (IsSFX()) + { + if (dotPos >= 0) + fileName = fileName.Left(dotPos); + fileName += kExeExt; + m_ArchivePath.SetText(fileName); + } + else + { + if (dotPos >= 0) + { + UString ext = fileName.Mid(dotPos); + if (ext.CompareNoCase(kExeExt) == 0) + { + fileName = fileName.Left(dotPos); + m_ArchivePath.SetText(fileName); + } + } + SetArchiveName2(false); // it's for OnInit + } + + CheckVolumeEnable(); +} + +void CCompressDialog::OnButtonSetArchive() +{ + UString fileName; + m_ArchivePath.GetText(fileName); + fileName.Trim(); + Info.ArchiveName = fileName; + UString fullFileName; + if (!Info.GetFullPathName(fullFileName)) + { + fullFileName = Info.ArchiveName; + return; + } + UString title = LangString(IDS_COMPRESS_SET_ARCHIVE_DIALOG_TITLE, 0x02000D90); + UString s = LangString(IDS_OPEN_TYPE_ALL_FILES, 0x02000DB1); + s += L" (*.*)"; + UString resPath; + if (!MyBrowseForFile(HWND(*this), title, fullFileName, s, resPath)) + return; + m_ArchivePath.SetText(resPath); +} + +// in ExtractDialog.cpp +extern void AddUniqueString(UStringVector &strings, const UString &srcString); + +static bool IsAsciiString(const UString &s) +{ + for (int i = 0; i < s.Length(); i++) + { + wchar_t c = s[i]; + if (c < 0x20 || c > 0x7F) + return false; + } + return true; +} + +void CCompressDialog::OnOK() +{ + _password1Control.GetText(Info.Password); + if (IsZipFormat()) + { + if (!IsAsciiString(Info.Password)) + { + ShowErrorMessageHwndRes(*this, IDS_PASSWORD_USE_ASCII, 0x02000B11); + return; + } + UString method = GetEncryptionMethodSpec(); + method.MakeUpper(); + if (method.Find(L"AES") == 0) + { + if (Info.Password.Length() > 99) + { + ShowErrorMessageHwndRes(*this, IDS_PASSWORD_IS_TOO_LONG, 0x02000B12); + return; + } + } + } + if (!IsShowPasswordChecked()) + { + UString password2; + _password2Control.GetText(password2); + if (password2 != Info.Password) + { + ShowErrorMessageHwndRes(*this, IDS_PASSWORD_PASSWORDS_DO_NOT_MATCH, 0x02000B10); + return; + } + } + + SaveOptionsInMem(); + UString s; + m_ArchivePath.GetText(s); + s.Trim(); + m_RegistryInfo.ArcPaths.Clear(); + AddUniqueString(m_RegistryInfo.ArcPaths, s); + Info.ArchiveName = s; + Info.UpdateMode = NCompressDialog::NUpdateMode::EEnum(m_UpdateMode.GetCurSel()); + + Info.Level = GetLevelSpec(); + Info.Dictionary = GetDictionarySpec(); + Info.Order = GetOrderSpec(); + Info.OrderMode = GetOrderMode(); + Info.NumThreads = GetNumThreadsSpec(); + + UInt32 solidLogSize = GetBlockSizeSpec(); + Info.SolidBlockSize = 0; + if (solidLogSize > 0 && solidLogSize != (UInt32)-1) + Info.SolidBlockSize = (solidLogSize >= 64) ? (UInt64)(Int64)-1 : ((UInt64)1 << solidLogSize); + + Info.Method = GetMethodSpec(); + Info.EncryptionMethod = GetEncryptionMethodSpec(); + Info.FormatIndex = GetFormatIndex(); + Info.SFXMode = IsSFX(); + Info.OpenShareForWrite = IsButtonCheckedBool(IDC_COMPRESS_SHARED); + + m_RegistryInfo.EncryptHeaders = Info.EncryptHeaders = IsButtonCheckedBool(IDC_COMPRESS_CHECK_ENCRYPT_FILE_NAMES); + + m_Params.GetText(Info.Options); + UString volumeString; + m_Volume.GetText(volumeString); + volumeString.Trim(); + Info.VolumeSizes.Clear(); + if (!volumeString.IsEmpty()) + { + if (!ParseVolumeSizes(volumeString, Info.VolumeSizes)) + { + ShowErrorMessageHwndRes(*this, IDS_COMPRESS_INCORRECT_VOLUME_SIZE, 0x02000D41); + return; + } + if (!Info.VolumeSizes.IsEmpty()) + { + const UInt64 volumeSize = Info.VolumeSizes.Back(); + if (volumeSize < (100 << 10)) + { + wchar_t s[32]; + ConvertUInt64ToString(volumeSize, s); + if (::MessageBoxW(*this, MyFormatNew(IDS_COMPRESS_SPLIT_CONFIRM_MESSAGE, 0x02000D42, s), + L"7-Zip", MB_YESNOCANCEL | MB_ICONQUESTION) != IDYES) + return; + } + } + } + + for (int i = 0; i < m_ArchivePath.GetCount(); i++) + { + UString sTemp; + m_ArchivePath.GetLBText(i, sTemp); + sTemp.Trim(); + AddUniqueString(m_RegistryInfo.ArcPaths, sTemp); + } + if (m_RegistryInfo.ArcPaths.Size() > kHistorySize) + m_RegistryInfo.ArcPaths.DeleteBack(); + + m_RegistryInfo.ArcType = (*ArcFormats)[Info.FormatIndex].Name; + m_RegistryInfo.ShowPassword = IsShowPasswordChecked(); + + m_RegistryInfo.Save(); + + CModalDialog::OnOK(); +} + +static LPCWSTR kHelpTopic = L"fm/plugins/7-zip/add.htm"; + +void CCompressDialog::OnHelp() +{ + ShowHelpWindow(NULL, kHelpTopic); +} + +bool CCompressDialog::OnCommand(int code, int itemID, LPARAM lParam) +{ + if (code == CBN_SELCHANGE) + { + switch(itemID) + { + case IDC_COMPRESS_COMBO_FORMAT: + { + bool isSFX = IsSFX(); + SaveOptionsInMem(); + SetLevel(); + SetSolidBlockSize(); + SetNumThreads(); + SetParams(); + CheckControlsEnable(); + SetArchiveName2(isSFX); + SetEncryptionMethod(); + SetMemoryUsage(); + return true; + } + case IDC_COMPRESS_COMBO_LEVEL: + { + const CArcInfoEx &ai = (*ArcFormats)[GetFormatIndex()]; + int index = FindRegistryFormatAlways(ai.Name); + NCompression::CFormatOptions &fo = m_RegistryInfo.Formats[index]; + fo.ResetForLevelChange(); + SetMethod(); + SetSolidBlockSize(); + SetNumThreads(); + CheckSFXNameChange(); + SetMemoryUsage(); + return true; + } + case IDC_COMPRESS_COMBO_METHOD: + { + SetDictionary(); + SetOrder(); + SetSolidBlockSize(); + SetNumThreads(); + CheckSFXNameChange(); + SetMemoryUsage(); + return true; + } + case IDC_COMPRESS_COMBO_DICTIONARY: + case IDC_COMPRESS_COMBO_ORDER: + { + SetSolidBlockSize(); + SetMemoryUsage(); + return true; + } + case IDC_COMPRESS_COMBO_THREADS: + { + SetMemoryUsage(); + return true; + } + } + } + return CModalDialog::OnCommand(code, itemID, lParam); +} + +void CCompressDialog::CheckSFXNameChange() +{ + bool isSFX = IsSFX(); + CheckSFXControlsEnable(); + if (isSFX != IsSFX()) + SetArchiveName2(isSFX); +} + +void CCompressDialog::SetArchiveName2(bool prevWasSFX) +{ + UString fileName; + m_ArchivePath.GetText(fileName); + const CArcInfoEx &prevArchiverInfo = (*ArcFormats)[m_PrevFormat]; + if (prevArchiverInfo.KeepName || Info.KeepName) + { + UString prevExtension = prevArchiverInfo.GetMainExt(); + if (prevWasSFX) + prevExtension = kExeExt; + else + prevExtension = UString('.') + prevExtension; + const int prevExtensionLen = prevExtension.Length(); + if (fileName.Length() >= prevExtensionLen) + if (fileName.Right(prevExtensionLen).CompareNoCase(prevExtension) == 0) + fileName = fileName.Left(fileName.Length() - prevExtensionLen); + } + SetArchiveName(fileName); +} + +// if type.KeepName then use OriginalFileName +// else if !KeepName remove extension +// add new extension + +void CCompressDialog::SetArchiveName(const UString &name) +{ + UString fileName = name; + Info.FormatIndex = GetFormatIndex(); + const CArcInfoEx &ai = (*ArcFormats)[Info.FormatIndex]; + m_PrevFormat = Info.FormatIndex; + if (ai.KeepName) + { + fileName = OriginalFileName; + } + else + { + if (!Info.KeepName) + { + int dotPos = fileName.ReverseFind('.'); + int slashPos = MyMax(fileName.ReverseFind(WCHAR_PATH_SEPARATOR), fileName.ReverseFind('/')); + if (dotPos >= 0 && dotPos > slashPos + 1) + fileName = fileName.Left(dotPos); + } + } + + if (IsSFX()) + fileName += kExeExt; + else + { + fileName += L'.'; + fileName += ai.GetMainExt(); + } + m_ArchivePath.SetText(fileName); +} + +int CCompressDialog::FindRegistryFormat(const UString &name) +{ + for (int i = 0; i < m_RegistryInfo.Formats.Size(); i++) + { + const NCompression::CFormatOptions &fo = m_RegistryInfo.Formats[i]; + if (name.CompareNoCase(GetUnicodeString(fo.FormatID)) == 0) + return i; + } + return -1; +} + +int CCompressDialog::FindRegistryFormatAlways(const UString &name) +{ + int index = FindRegistryFormat(name); + if (index < 0) + { + NCompression::CFormatOptions fo; + fo.FormatID = GetSystemString(name); + index = m_RegistryInfo.Formats.Add(fo); + } + return index; +} + +int CCompressDialog::GetStaticFormatIndex() +{ + int formatIndex = GetFormatIndex(); + const CArcInfoEx &ai = (*ArcFormats)[formatIndex]; + for (int i = 0; i < MY_SIZE_OF_ARRAY(g_Formats); i++) + if (ai.Name.CompareNoCase(g_Formats[i].Name) == 0) + return i; + return 0; // -1; +} + +void CCompressDialog::SetNearestSelectComboBox(NControl::CComboBox &comboBox, UInt32 value) +{ + for (int i = comboBox.GetCount() - 1; i >= 0; i--) + if ((UInt32)comboBox.GetItemData(i) <= value) + { + comboBox.SetCurSel(i); + return; + } + if (comboBox.GetCount() > 0) + comboBox.SetCurSel(0); +} + +void CCompressDialog::SetLevel() +{ + m_Level.ResetContent(); + const CFormatInfo &fi = g_Formats[GetStaticFormatIndex()]; + const CArcInfoEx &ai = (*ArcFormats)[GetFormatIndex()]; + int index = FindRegistryFormat(ai.Name); + UInt32 level = kNormal; + if (index >= 0) + { + const NCompression::CFormatOptions &fo = m_RegistryInfo.Formats[index]; + if (fo.Level <= kUltra) + level = fo.Level; + else + level = kUltra; + } + int i; + for (i = 0; i <= kUltra; i++) + { + if ((fi.LevelsMask & (1 << i)) != 0) + { + const CLevelInfo &levelInfo = g_Levels[i]; + int index = (int)m_Level.AddString(LangString(levelInfo.ResourceID, levelInfo.LangID)); + m_Level.SetItemData(index, i); + } + } + SetNearestSelectComboBox(m_Level, level); + SetMethod(); +} + +void CCompressDialog::SetMethod(int keepMethodId) +{ + m_Method.ResetContent(); + UInt32 level = GetLevel(); + if (level == 0) + { + SetDictionary(); + SetOrder(); + return; + } + const CFormatInfo &fi = g_Formats[GetStaticFormatIndex()]; + const CArcInfoEx &ai = (*ArcFormats)[GetFormatIndex()]; + int index = FindRegistryFormat(ai.Name); + UString defaultMethod; + if (index >= 0) + { + const NCompression::CFormatOptions &fo = m_RegistryInfo.Formats[index]; + defaultMethod = fo.Method; + } + bool isSfx = IsSFX(); + bool weUseSameMethod = false; + for (int m = 0; m < fi.NumMethods; m++) + { + EMethodID methodID = fi.MathodIDs[m]; + if (isSfx) + if (!IsMethodSupportedBySfx(methodID)) + continue; + const LPCWSTR method = kMethodsNames[methodID]; + int itemIndex = (int)m_Method.AddString(GetSystemString(method)); + m_Method.SetItemData(itemIndex, methodID); + if (keepMethodId == methodID) + { + m_Method.SetCurSel(itemIndex); + weUseSameMethod = true; + continue; + } + if ((defaultMethod.CompareNoCase(method) == 0 || m == 0) && !weUseSameMethod) + m_Method.SetCurSel(itemIndex); + } + if (!weUseSameMethod) + { + SetDictionary(); + SetOrder(); + } +} + +bool CCompressDialog::IsZipFormat() +{ + const CArcInfoEx &ai = (*ArcFormats)[GetFormatIndex()]; + return (ai.Name.CompareNoCase(L"zip") == 0); +} + +void CCompressDialog::SetEncryptionMethod() +{ + _encryptionMethod.ResetContent(); + const CArcInfoEx &ai = (*ArcFormats)[GetFormatIndex()]; + if (ai.Name.CompareNoCase(L"7z") == 0) + { + _encryptionMethod.AddString(TEXT("AES-256")); + _encryptionMethod.SetCurSel(0); + } + else if (ai.Name.CompareNoCase(L"zip") == 0) + { + int index = FindRegistryFormat(ai.Name); + UString encryptionMethod; + if (index >= 0) + { + const NCompression::CFormatOptions &fo = m_RegistryInfo.Formats[index]; + encryptionMethod = fo.EncryptionMethod; + } + _encryptionMethod.AddString(TEXT("ZipCrypto")); + _encryptionMethod.AddString(TEXT("AES-256")); + _encryptionMethod.SetCurSel(encryptionMethod.Find(L"AES") == 0 ? 1 : 0); + } +} + +int CCompressDialog::GetMethodID() +{ + if (m_Method.GetCount() <= 0) + return -1; + return (int)(UInt32)m_Method.GetItemData(m_Method.GetCurSel()); +} + +UString CCompressDialog::GetMethodSpec() +{ + if (m_Method.GetCount() <= 1) + return UString(); + return kMethodsNames[GetMethodID()]; +} + +UString CCompressDialog::GetEncryptionMethodSpec() +{ + if (_encryptionMethod.GetCount() <= 1) + return UString(); + if (_encryptionMethod.GetCurSel() <= 0) + return UString(); + UString result; + _encryptionMethod.GetText(result); + result.Replace(L"-", L""); + return result; +} + +int CCompressDialog::AddDictionarySize(UInt32 size, bool kilo, bool maga) +{ + UInt32 sizePrint = size; + if (kilo) + sizePrint >>= 10; + else if (maga) + sizePrint >>= 20; + TCHAR s[40]; + ConvertUInt32ToString(sizePrint, s); + if (kilo) + lstrcat(s, TEXT(" K")); + else if (maga) + lstrcat(s, TEXT(" M")); + else + lstrcat(s, TEXT(" ")); + lstrcat(s, TEXT("B")); + int index = (int)m_Dictionary.AddString(s); + m_Dictionary.SetItemData(index, size); + return index; +} + +int CCompressDialog::AddDictionarySize(UInt32 size) +{ + if (size > 0) + { + if ((size & 0xFFFFF) == 0) + return AddDictionarySize(size, false, true); + if ((size & 0x3FF) == 0) + return AddDictionarySize(size, true, false); + } + return AddDictionarySize(size, false, false); +} + +void CCompressDialog::SetDictionary() +{ + m_Dictionary.ResetContent(); + const CArcInfoEx &ai = (*ArcFormats)[GetFormatIndex()]; + int index = FindRegistryFormat(ai.Name); + UInt32 defaultDictionary = (UInt32)-1; + if (index >= 0) + { + const NCompression::CFormatOptions &fo = m_RegistryInfo.Formats[index]; + if (fo.Method.CompareNoCase(GetMethodSpec()) == 0) + defaultDictionary = fo.Dictionary; + } + int methodID = GetMethodID(); + UInt32 level = GetLevel2(); + if (methodID < 0) + return; + const UInt64 maxRamSize = GetMaxRamSizeForProgram(); + switch (methodID) + { + case kLZMA: + case kLZMA2: + { + static const UInt32 kMinDicSize = (1 << 16); + if (defaultDictionary == (UInt32)-1) + { + if (level >= 9) defaultDictionary = (1 << 26); + else if (level >= 7) defaultDictionary = (1 << 25); + else if (level >= 5) defaultDictionary = (1 << 24); + else if (level >= 3) defaultDictionary = (1 << 20); + else defaultDictionary = (kMinDicSize); + } + int i; + AddDictionarySize(kMinDicSize); + m_Dictionary.SetCurSel(0); + for (i = 20; i <= 30; i++) + for (int j = 0; j < 2; j++) + { + if (i == 20 && j > 0) + continue; + UInt32 dictionary = (1 << i) + (j << (i - 1)); + if (dictionary > + #ifdef _WIN64 + (1 << 30) + #else + (1 << 26) + #endif + ) + continue; + AddDictionarySize(dictionary); + UInt64 decomprSize; + UInt64 requiredComprSize = GetMemoryUsage(dictionary, decomprSize); + if (dictionary <= defaultDictionary && requiredComprSize <= maxRamSize) + m_Dictionary.SetCurSel(m_Dictionary.GetCount() - 1); + } + + // SetNearestSelectComboBox(m_Dictionary, defaultDictionary); + break; + } + case kPPMd: + { + if (defaultDictionary == (UInt32)-1) + { + if (level >= 9) defaultDictionary = (192 << 20); + else if (level >= 7) defaultDictionary = ( 64 << 20); + else if (level >= 5) defaultDictionary = ( 16 << 20); + else defaultDictionary = ( 4 << 20); + } + int i; + for (i = 20; i < 31; i++) + for (int j = 0; j < 2; j++) + { + if (i == 20 && j > 0) + continue; + UInt32 dictionary = (1 << i) + (j << (i - 1)); + if (dictionary > + #ifdef _WIN64 + (1 << 30) + #else + (1 << 29) + #endif + ) + continue; + AddDictionarySize(dictionary); + UInt64 decomprSize; + UInt64 requiredComprSize = GetMemoryUsage(dictionary, decomprSize); + if (dictionary <= defaultDictionary && requiredComprSize <= maxRamSize || m_Dictionary.GetCount() == 0) + m_Dictionary.SetCurSel(m_Dictionary.GetCount() - 1); + } + SetNearestSelectComboBox(m_Dictionary, defaultDictionary); + break; + } + case kDeflate: + { + AddDictionarySize(32 << 10); + m_Dictionary.SetCurSel(0); + break; + } + case kDeflate64: + { + AddDictionarySize(64 << 10); + m_Dictionary.SetCurSel(0); + break; + } + case kBZip2: + { + if (defaultDictionary == (UInt32)-1) + { + if (level >= 5) + defaultDictionary = (900 << 10); + else if (level >= 3) + defaultDictionary = (500 << 10); + else + defaultDictionary = (100 << 10); + } + for (int i = 1; i <= 9; i++) + { + UInt32 dictionary = (i * 100) << 10; + AddDictionarySize(dictionary); + if (dictionary <= defaultDictionary || m_Dictionary.GetCount() == 0) + m_Dictionary.SetCurSel(m_Dictionary.GetCount() - 1); + } + break; + } + case kPPMdZip: + { + if (defaultDictionary == (UInt32)-1) + defaultDictionary = (1 << (19 + (level > 8 ? 8 : level))); + for (int i = 20; i <= 28; i++) + { + UInt32 dictionary = (1 << i); + AddDictionarySize(dictionary); + UInt64 decomprSize; + UInt64 requiredComprSize = GetMemoryUsage(dictionary, decomprSize); + if (dictionary <= defaultDictionary && requiredComprSize <= maxRamSize || m_Dictionary.GetCount() == 0) + m_Dictionary.SetCurSel(m_Dictionary.GetCount() - 1); + } + SetNearestSelectComboBox(m_Dictionary, defaultDictionary); + break; + } + } +} + +UInt32 CCompressDialog::GetComboValue(NWindows::NControl::CComboBox &c, int defMax) +{ + if (c.GetCount() <= defMax) + return (UInt32)-1; + return (UInt32)c.GetItemData(c.GetCurSel()); +} + +UInt32 CCompressDialog::GetLevel2() +{ + UInt32 level = GetLevel(); + if (level == (UInt32)-1) + level = 5; + return level; +} + +int CCompressDialog::AddOrder(UInt32 size) +{ + TCHAR s[40]; + ConvertUInt32ToString(size, s); + int index = (int)m_Order.AddString(s); + m_Order.SetItemData(index, size); + return index; +} + +void CCompressDialog::SetOrder() +{ + m_Order.ResetContent(); + const CArcInfoEx &ai = (*ArcFormats)[GetFormatIndex()]; + int index = FindRegistryFormat(ai.Name); + UInt32 defaultOrder = (UInt32)-1; + if (index >= 0) + { + const NCompression::CFormatOptions &fo = m_RegistryInfo.Formats[index]; + if (fo.Method.CompareNoCase(GetMethodSpec()) == 0) + defaultOrder = fo.Order; + } + int methodID = GetMethodID(); + UInt32 level = GetLevel2(); + if (methodID < 0) + return; + switch (methodID) + { + case kLZMA: + case kLZMA2: + { + if (defaultOrder == (UInt32)-1) + defaultOrder = (level >= 7) ? 64 : 32; + for (int i = 3; i <= 8; i++) + for (int j = 0; j < 2; j++) + { + UInt32 order = (1 << i) + (j << (i - 1)); + if (order <= 256) + AddOrder(order); + } + AddOrder(273); + SetNearestSelectComboBox(m_Order, defaultOrder); + break; + } + case kPPMd: + { + if (defaultOrder == (UInt32)-1) + { + if (level >= 9) + defaultOrder = 32; + else if (level >= 7) + defaultOrder = 16; + else if (level >= 5) + defaultOrder = 6; + else + defaultOrder = 4; + } + int i; + AddOrder(2); + AddOrder(3); + for (i = 2; i < 8; i++) + for (int j = 0; j < 4; j++) + { + UInt32 order = (1 << i) + (j << (i - 2)); + if (order < 32) + AddOrder(order); + } + AddOrder(32); + SetNearestSelectComboBox(m_Order, defaultOrder); + break; + } + case kDeflate: + case kDeflate64: + { + if (defaultOrder == (UInt32)-1) + { + if (level >= 9) + defaultOrder = 128; + else if (level >= 7) + defaultOrder = 64; + else + defaultOrder = 32; + } + int i; + for (i = 3; i <= 8; i++) + for (int j = 0; j < 2; j++) + { + UInt32 order = (1 << i) + (j << (i - 1)); + if (order <= 256) + AddOrder(order); + } + AddOrder(methodID == kDeflate64 ? 257 : 258); + SetNearestSelectComboBox(m_Order, defaultOrder); + break; + } + case kBZip2: + { + break; + } + case kPPMdZip: + { + if (defaultOrder == (UInt32)-1) + defaultOrder = level + 3; + for (int i = 2; i <= 16; i++) + AddOrder(i); + SetNearestSelectComboBox(m_Order, defaultOrder); + break; + } + } +} + +bool CCompressDialog::GetOrderMode() +{ + switch (GetMethodID()) + { + case kPPMd: + return true; + } + return false; +} + +static const UInt32 kNoSolidBlockSize = 0; +static const UInt32 kSolidBlockSize = 64; + +void CCompressDialog::SetSolidBlockSize() +{ + m_Solid.ResetContent(); + const CFormatInfo &fi = g_Formats[GetStaticFormatIndex()]; + if (!fi.Solid) + return; + + UInt32 level = GetLevel2(); + if (level == 0) + return; + + UInt32 dictionary = GetDictionarySpec(); + if (dictionary == (UInt32)-1) + dictionary = 1; + + UInt32 defaultBlockSize = (UInt32)-1; + + const CArcInfoEx &ai = (*ArcFormats)[GetFormatIndex()]; + int index = FindRegistryFormat(ai.Name); + if (index >= 0) + { + const NCompression::CFormatOptions &fo = m_RegistryInfo.Formats[index]; + if (fo.Method.CompareNoCase(GetMethodSpec()) == 0) + defaultBlockSize = fo.BlockLogSize; + } + + index = (int)m_Solid.AddString(LangString(IDS_COMPRESS_NON_SOLID, 0x02000D14)); + m_Solid.SetItemData(index, (UInt32)kNoSolidBlockSize); + m_Solid.SetCurSel(0); + bool needSet = defaultBlockSize == (UInt32)-1; + for (int i = 20; i <= 36; i++) + { + if (needSet && dictionary >= (((UInt64)1 << (i - 7))) && i <= 32) + defaultBlockSize = i; + TCHAR s[40]; + ConvertUInt32ToString(1 << (i % 10), s); + if (i < 30) lstrcat(s, TEXT(" M")); + else lstrcat(s, TEXT(" G")); + lstrcat(s, TEXT("B")); + int index = (int)m_Solid.AddString(s); + m_Solid.SetItemData(index, (UInt32)i); + } + index = (int)m_Solid.AddString(LangString(IDS_COMPRESS_SOLID, 0x02000D15)); + m_Solid.SetItemData(index, kSolidBlockSize); + if (defaultBlockSize == (UInt32)-1) + defaultBlockSize = kSolidBlockSize; + if (defaultBlockSize != kNoSolidBlockSize) + SetNearestSelectComboBox(m_Solid, defaultBlockSize); +} + +void CCompressDialog::SetNumThreads() +{ + m_NumThreads.ResetContent(); + + const CFormatInfo &fi = g_Formats[GetStaticFormatIndex()]; + if (!fi.MultiThread) + return; + + UInt32 numHardwareThreads = NSystem::GetNumberOfProcessors(); + UInt32 defaultValue = numHardwareThreads; + + const CArcInfoEx &ai = (*ArcFormats)[GetFormatIndex()]; + int index = FindRegistryFormat(ai.Name); + if (index >= 0) + { + const NCompression::CFormatOptions &fo = m_RegistryInfo.Formats[index]; + if (fo.Method.CompareNoCase(GetMethodSpec()) == 0 && fo.NumThreads != (UInt32)-1) + defaultValue = fo.NumThreads; + } + + UInt32 numAlgoThreadsMax = 1; + int methodID = GetMethodID(); + switch (methodID) + { + case kLZMA: numAlgoThreadsMax = 2; break; + case kLZMA2: numAlgoThreadsMax = 32; break; + case kBZip2: numAlgoThreadsMax = 32; break; + } + if (IsZipFormat()) + numAlgoThreadsMax = 128; + for (UInt32 i = 1; i <= numHardwareThreads * 2 && i <= numAlgoThreadsMax; i++) + { + TCHAR s[40]; + ConvertUInt32ToString(i, s); + int index = (int)m_NumThreads.AddString(s); + m_NumThreads.SetItemData(index, (UInt32)i); + } + SetNearestSelectComboBox(m_NumThreads, defaultValue); +} + +UInt64 CCompressDialog::GetMemoryUsage(UInt32 dictionary, UInt64 &decompressMemory) +{ + decompressMemory = UInt64(Int64(-1)); + UInt32 level = GetLevel2(); + if (level == 0) + { + decompressMemory = (1 << 20); + return decompressMemory; + } + UInt64 size = 0; + + const CFormatInfo &fi = g_Formats[GetStaticFormatIndex()]; + if (fi.Filter && level >= 9) + size += (12 << 20) * 2 + (5 << 20); + UInt32 numThreads = GetNumThreads2(); + if (IsZipFormat()) + { + UInt32 numSubThreads = 1; + if (GetMethodID() == kLZMA && numThreads > 1 && level >= 5) + numSubThreads = 2; + UInt32 numMainThreads = numThreads / numSubThreads; + if (numMainThreads > 1) + size += (UInt64)numMainThreads << 25; + } + int methidId = GetMethodID(); + switch (methidId) + { + case kLZMA: + case kLZMA2: + { + UInt32 hs = dictionary - 1; + hs |= (hs >> 1); + hs |= (hs >> 2); + hs |= (hs >> 4); + hs |= (hs >> 8); + hs >>= 1; + hs |= 0xFFFF; + if (hs > (1 << 24)) + hs >>= 1; + hs++; + UInt64 size1 = (UInt64)hs * 4; + size1 += (UInt64)dictionary * 4; + if (level >= 5) + size1 += (UInt64)dictionary * 4; + size1 += (2 << 20); + + UInt32 numThreads1 = 1; + if (numThreads > 1 && level >= 5) + { + size1 += (2 << 20) + (4 << 20); + numThreads1 = 2; + } + UInt32 numBlockThreads = numThreads / numThreads1; + if (methidId == kLZMA || numBlockThreads == 1) + size1 += (UInt64)dictionary * 3 / 2; + else + { + UInt64 chunkSize = (UInt64)dictionary << 2; + chunkSize = MyMax(chunkSize, (UInt64)(1 << 20)); + chunkSize = MyMin(chunkSize, (UInt64)(1 << 28)); + chunkSize = MyMax(chunkSize, (UInt64)dictionary); + size1 += chunkSize * 2; + } + size += size1 * numBlockThreads; + + decompressMemory = dictionary + (2 << 20); + return size; + } + case kPPMd: + { + decompressMemory = dictionary + (2 << 20); + return size + decompressMemory; + } + case kDeflate: + case kDeflate64: + { + UInt32 order = GetOrder(); + if (order == (UInt32)-1) + order = 32; + if (level >= 7) + size += (1 << 20); + size += 3 << 20; + decompressMemory = (2 << 20); + return size; + } + case kBZip2: + { + decompressMemory = (7 << 20); + UInt64 memForOneThread = (10 << 20); + return size + memForOneThread * numThreads; + } + case kPPMdZip: + { + decompressMemory = dictionary + (2 << 20); + return size + (UInt64)decompressMemory * numThreads; + } + } + return (UInt64)(Int64)-1; +} + +UInt64 CCompressDialog::GetMemoryUsage(UInt64 &decompressMemory) +{ + return GetMemoryUsage(GetDictionary(), decompressMemory); +} + +void CCompressDialog::PrintMemUsage(UINT res, UInt64 value) +{ + if (value == (UInt64)(Int64)-1) + { + SetItemText(res, TEXT("?")); + return; + } + value = (value + (1 << 20) - 1) >> 20; + TCHAR s[40]; + ConvertUInt64ToString(value, s); + lstrcat(s, TEXT(" MB")); + SetItemText(res, s); +} + +void CCompressDialog::SetMemoryUsage() +{ + UInt64 decompressMem; + UInt64 memUsage = GetMemoryUsage(decompressMem); + PrintMemUsage(IDC_STATIC_COMPRESS_MEMORY_VALUE, memUsage); + PrintMemUsage(IDC_STATIC_COMPRESS_MEMORY_DE_VALUE, decompressMem); +} + +void CCompressDialog::SetParams() +{ + const CArcInfoEx &ai = (*ArcFormats)[GetFormatIndex()]; + m_Params.SetText(TEXT("")); + int index = FindRegistryFormat(ai.Name); + if (index >= 0) + { + const NCompression::CFormatOptions &fo = m_RegistryInfo.Formats[index]; + m_Params.SetText(fo.Options); + } +} + +void CCompressDialog::SaveOptionsInMem() +{ + const CArcInfoEx &ai = (*ArcFormats)[Info.FormatIndex]; + int index = FindRegistryFormatAlways(ai.Name); + m_Params.GetText(Info.Options); + Info.Options.Trim(); + NCompression::CFormatOptions &fo = m_RegistryInfo.Formats[index]; + fo.Options = Info.Options; + fo.Level = GetLevelSpec(); + fo.Dictionary = GetDictionarySpec(); + fo.Order = GetOrderSpec(); + fo.Method = GetMethodSpec(); + fo.EncryptionMethod = GetEncryptionMethodSpec(); + fo.NumThreads = GetNumThreadsSpec(); + fo.BlockLogSize = GetBlockSizeSpec(); +} + +int CCompressDialog::GetFormatIndex() +{ + return (int)m_Format.GetItemData(m_Format.GetCurSel()); +} diff --git a/CPP/7zip/UI/GUI/CompressDialog.h b/CPP/7zip/UI/GUI/CompressDialog.h new file mode 100644 index 0000000..86f7b17 --- /dev/null +++ b/CPP/7zip/UI/GUI/CompressDialog.h @@ -0,0 +1,189 @@ +// CompressDialog.h + +#ifndef __COMPRESS_DIALOG_H +#define __COMPRESS_DIALOG_H + +#include "Windows/Control/ComboBox.h" +#include "Windows/Control/Edit.h" + +#include "../Common/LoadCodecs.h" +#include "../Common/ZipRegistry.h" + +#include "../FileManager/DialogSize.h" + +#include "CompressDialogRes.h" + +namespace NCompressDialog +{ + namespace NUpdateMode + { + enum EEnum + { + kAdd, + kUpdate, + kFresh, + kSynchronize + }; + } + struct CInfo + { + NUpdateMode::EEnum UpdateMode; + bool SolidIsSpecified; + bool MultiThreadIsAllowed; + UInt64 SolidBlockSize; + UInt32 NumThreads; + + CRecordVector VolumeSizes; + + UInt32 Level; + UString Method; + UInt32 Dictionary; + bool OrderMode; + UInt32 Order; + UString Options; + + UString EncryptionMethod; + + bool SFXMode; + bool OpenShareForWrite; + + + UString ArchiveName; // in: Relative for ; out: abs + UString CurrentDirPrefix; + bool KeepName; + + bool GetFullPathName(UString &result) const; + + int FormatIndex; + + UString Password; + bool EncryptHeadersIsAllowed; + bool EncryptHeaders; + + void Init() + { + Level = Dictionary = Order = UInt32(-1); + OrderMode = false; + Method.Empty(); + Options.Empty(); + EncryptionMethod.Empty(); + } + CInfo() + { + Init(); + } + }; +} + +class CCompressDialog: public NWindows::NControl::CModalDialog +{ + NWindows::NControl::CComboBox m_ArchivePath; + NWindows::NControl::CComboBox m_Format; + NWindows::NControl::CComboBox m_Level; + NWindows::NControl::CComboBox m_Method; + NWindows::NControl::CComboBox m_Dictionary; + NWindows::NControl::CComboBox m_Order; + NWindows::NControl::CComboBox m_Solid; + NWindows::NControl::CComboBox m_NumThreads; + NWindows::NControl::CComboBox m_UpdateMode; + NWindows::NControl::CComboBox m_Volume; + NWindows::NControl::CDialogChildControl m_Params; + + NWindows::NControl::CEdit _password1Control; + NWindows::NControl::CEdit _password2Control; + NWindows::NControl::CComboBox _encryptionMethod; + + NCompression::CInfo m_RegistryInfo; + + int m_PrevFormat; + void SetArchiveName(const UString &name); + int FindRegistryFormat(const UString &name); + int FindRegistryFormatAlways(const UString &name); + + void CheckSFXNameChange(); + void SetArchiveName2(bool prevWasSFX); + + int GetStaticFormatIndex(); + + void SetNearestSelectComboBox(NWindows::NControl::CComboBox &comboBox, UInt32 value); + + void SetLevel(); + + void SetMethod(int keepMethodId = -1); + int GetMethodID(); + UString GetMethodSpec(); + UString GetEncryptionMethodSpec(); + + bool IsZipFormat(); + + void SetEncryptionMethod(); + + int AddDictionarySize(UInt32 size, bool kilo, bool maga); + int AddDictionarySize(UInt32 size); + + void SetDictionary(); + + UInt32 GetComboValue(NWindows::NControl::CComboBox &c, int defMax = 0); + + UInt32 GetLevel() { return GetComboValue(m_Level); } + UInt32 GetLevelSpec() { return GetComboValue(m_Level, 1); } + UInt32 GetLevel2(); + UInt32 GetDictionary() { return GetComboValue(m_Dictionary); } + UInt32 GetDictionarySpec() { return GetComboValue(m_Dictionary, 1); } + UInt32 GetOrder() { return GetComboValue(m_Order); } + UInt32 GetOrderSpec() { return GetComboValue(m_Order, 1); } + UInt32 GetNumThreadsSpec() { return GetComboValue(m_NumThreads, 1); } + UInt32 GetNumThreads2() { UInt32 num = GetNumThreadsSpec(); if (num == UInt32(-1)) num = 1; return num; } + UInt32 GetBlockSizeSpec() { return GetComboValue(m_Solid, 1); } + + int AddOrder(UInt32 size); + void SetOrder(); + bool GetOrderMode(); + + void SetSolidBlockSize(); + void SetNumThreads(); + + UInt64 GetMemoryUsage(UInt32 dictionary, UInt64 &decompressMemory); + UInt64 GetMemoryUsage(UInt64 &decompressMemory); + void PrintMemUsage(UINT res, UInt64 value); + void SetMemoryUsage(); + void SetParams(); + void SaveOptionsInMem(); + + void UpdatePasswordControl(); + bool IsShowPasswordChecked() const + { return IsButtonChecked(IDC_COMPRESS_CHECK_SHOW_PASSWORD) == BST_CHECKED; } + + int GetFormatIndex(); +public: + CObjectVector *ArcFormats; + CRecordVector ArcIndices; + + NCompressDialog::CInfo Info; + UString OriginalFileName; // for bzip2, gzip2 + + INT_PTR Create(HWND wndParent = 0) + { + BIG_DIALOG_SIZE(400, 304); + return CModalDialog::Create(SIZED_DIALOG(IDD_DIALOG_COMPRESS), wndParent); + } + +protected: + + void CheckSFXControlsEnable(); + void CheckVolumeEnable(); + void CheckControlsEnable(); + + void OnButtonSetArchive(); + bool IsSFX(); + void OnButtonSFX(); + + virtual bool OnInit(); + virtual bool OnCommand(int code, int itemID, LPARAM lParam); + virtual bool OnButtonClicked(int buttonID, HWND buttonHWND); + virtual void OnOK(); + virtual void OnHelp(); + +}; + +#endif diff --git a/CPP/7zip/UI/GUI/CompressDialogRes.h b/CPP/7zip/UI/GUI/CompressDialogRes.h new file mode 100644 index 0000000..2dcdc80 --- /dev/null +++ b/CPP/7zip/UI/GUI/CompressDialogRes.h @@ -0,0 +1,81 @@ +#define IDD_DIALOG_COMPRESS 551 +#define IDD_DIALOG_COMPRESS_2 651 +#define IDC_STATIC_COMPRESS_MEMORY 1022 +#define IDC_STATIC_COMPRESS_MEMORY_DE 1023 +#define IDC_STATIC_COMPRESS_MEMORY_VALUE 1027 +#define IDC_STATIC_COMPRESS_MEMORY_DE_VALUE 1028 +#define IDC_COMPRESS_COMBO_ARCHIVE 1072 +#define IDC_COMPRESS_BUTTON_SET_ARCHIVE 1073 +#define IDC_COMPRESS_COMBO_LEVEL 1074 +#define IDC_COMPRESS_COMBO_UPDATE_MODE 1075 +#define IDC_COMPRESS_COMBO_FORMAT 1076 +#define IDC_COMPRESS_COMBO_VOLUME 1077 +#define IDC_COMPRESS_COMBO_METHOD 1078 +#define IDC_COMPRESS_COMBO_DICTIONARY 1079 +#define IDC_COMPRESS_COMBO_ORDER 1080 + +#define IDC_COMPRESS_COMBO_SOLID 1081 +#define IDC_COMPRESS_COMBO_THREADS 1082 +#define IDC_COMPRESS_HARDWARE_THREADS 1083 + +#define IDC_COMPRESS_SFX 1090 +#define IDC_COMPRESS_EDIT_PARAMETERS 1091 + +// #define IDC_COMPRESS_SOLID 1092 +// #define IDC_COMPRESS_MULTI_THREAD 1093 + +#define IDC_STATIC_COMPRESS_ARCHIVE 1097 +#define IDC_STATIC_COMPRESS_FORMAT 1098 +#define IDC_STATIC_COMPRESS_LEVEL 1099 +#define IDC_STATIC_COMPRESS_PARAMETERS 1100 +#define IDC_STATIC_COMPRESS_UPDATE_MODE 1101 +#define IDC_STATIC_COMPRESS_OPTIONS 1102 +#define IDC_STATIC_COMPRESS_VOLUME 1103 +#define IDC_STATIC_COMPRESS_METHOD 1104 +#define IDC_STATIC_COMPRESS_DICTIONARY 1105 +#define IDC_STATIC_COMPRESS_ORDER 1106 + +#define IDC_STATIC_COMPRESS_SOLID 1107 +#define IDC_STATIC_COMPRESS_THREADS 1108 + +#define IDC_COMPRESS_ENCRYPTION 1110 +#define IDC_STATIC_COMPRESS_PASSWORD1 1111 +#define IDC_COMPRESS_EDIT_PASSWORD1 1112 +#define IDC_STATIC_COMPRESS_PASSWORD2 1113 +#define IDC_COMPRESS_EDIT_PASSWORD2 1114 +#define IDC_COMPRESS_CHECK_SHOW_PASSWORD 1115 + +#define IDC_STATIC_COMPRESS_ENCRYPTION_METHOD 1120 +#define IDC_COMPRESS_COMBO_ENCRYPTION_METHOD 1121 + +#define IDC_COMPRESS_CHECK_ENCRYPT_FILE_NAMES 1122 + +#define IDC_COMPRESS_SHARED 1130 + + +#define IDS_OPEN_TYPE_ALL_FILES 80 + +#define IDS_METHOD_STORE 81 +#define IDS_METHOD_NORMAL 82 +#define IDS_METHOD_MAXIMUM 83 +#define IDS_METHOD_FAST 84 +#define IDS_METHOD_FASTEST 85 +#define IDS_METHOD_ULTRA 86 + +#define IDS_COMPRESS_NON_SOLID 88 +#define IDS_COMPRESS_SOLID 89 + +#define IDS_COMPRESS_UPDATE_MODE_ADD 90 +#define IDS_COMPRESS_UPDATE_MODE_UPDATE 91 +#define IDS_COMPRESS_UPDATE_MODE_FRESH 92 +#define IDS_COMPRESS_UPDATE_MODE_SYNCHRONIZE 93 + +#define IDS_COMPRESS_SPLIT_CONFIRM_MESSAGE 94 + +#define IDS_COMPRESS_SET_ARCHIVE_DIALOG_TITLE 96 + +#define IDS_PASSWORD_USE_ASCII 110 +#define IDS_PASSWORD_PASSWORDS_DO_NOT_MATCH 111 +#define IDS_PASSWORD_IS_TOO_LONG 112 + +#define IDS_COMPRESS_INCORRECT_VOLUME_SIZE 95 diff --git a/CPP/7zip/UI/GUI/CompressDialog_rc.cpp b/CPP/7zip/UI/GUI/CompressDialog_rc.cpp new file mode 100644 index 0000000..02b2eb5 --- /dev/null +++ b/CPP/7zip/UI/GUI/CompressDialog_rc.cpp @@ -0,0 +1,314 @@ +// CompressDialog.cpp + +#include "StdAfx.h" + +// For compilers that support precompilation, includes "wx/wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +// for all others, include the necessary headers (this file is usually all you +// need because it includes almost all "standard" wxWidgets headers) +#ifndef WX_PRECOMP + #include "wx/wx.h" +#endif + +#undef _WIN32 + +#include "resource2.h" +#include "Windows/Control/DialogImpl.h" + +#include "CompressDialogRes.h" + +class CCompressDialogImpl : public NWindows::NControl::CModalDialogImpl +{ + public: + CCompressDialogImpl(NWindows::NControl::CModalDialog *dialog,wxWindow * parent , int id) : CModalDialogImpl(dialog,parent, id, wxT("Add to Archive")) + { + wxStaticText *m_pStaticTextMemoryCompress; + wxStaticText *m_pStaticTextMemoryDecompress; + wxTextCtrl *m_pTextCtrlPassword; + wxTextCtrl *m_pTextCtrlRePassword; + wxTextCtrl *m_pTextCtrlParameters; + wxComboBox *m_pComboBoxArchiveName; + wxComboBox *m_pComboBoxArchiveFormat; + wxComboBox *m_pComboBoxCompressionLevel; + wxComboBox *m_pComboBoxCompressionMethod; + wxComboBox *m_pComboBoxDictionarySize; + wxComboBox *m_pComboBoxWordSize; + wxComboBox *m_pComboBoxUpdateMode; + wxComboBox *m_pComboBoxEncryptionMethod; + wxComboBox *m_pComboBoxSplitToVolumes; + wxCheckBox *m_pCheckBoxShowPassword; + wxCheckBox *m_pCheckBoxEncryptFileNames; + wxButton *m_pButtonBrowse; + + + ///Sizer for adding the controls created by users + wxBoxSizer* topsizer = new wxBoxSizer(wxVERTICAL); + + wxStaticText *pStaticTextArchive = new wxStaticText(this, IDC_STATIC_COMPRESS_ARCHIVE, wxT("&Archive:")); + wxBoxSizer *pArchiveNameSizer = new wxBoxSizer(wxHORIZONTAL); + m_pComboBoxArchiveName = new wxComboBox(this, IDC_COMPRESS_COMBO_ARCHIVE, wxEmptyString, wxDefaultPosition, wxSize(600,-1), wxArrayString(), wxCB_DROPDOWN|wxCB_SORT); + m_pButtonBrowse = new wxButton(this, IDC_COMPRESS_BUTTON_SET_ARCHIVE, wxT("..."), wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT); + pArchiveNameSizer->Add(m_pComboBoxArchiveName, 1, wxALL|wxEXPAND, 5); + pArchiveNameSizer->Add(m_pButtonBrowse, 0, wxALL|wxEXPAND, 5); + wxBoxSizer *pControlSizer = new wxBoxSizer(wxHORIZONTAL); + wxBoxSizer *pLeftSizer = new wxBoxSizer(wxVERTICAL); + + wxBoxSizer *pCompressionOptionsSizer = new wxBoxSizer(wxHORIZONTAL); + wxBoxSizer *pCompressionStaticSizer = new wxBoxSizer(wxVERTICAL); + wxBoxSizer *pCompressionComboSizer = new wxBoxSizer(wxVERTICAL); + + wxStaticText *pStaticTextArchiveFormat = new wxStaticText(this, IDC_STATIC_COMPRESS_FORMAT, wxT("Archive &format:")); + /* + wxArrayString archiveFormatArray; + archiveFormatArray.Add(wxT("7z")); + archiveFormatArray.Add(wxT("Tar")); + archiveFormatArray.Add(wxT("Zip")); + m_pComboBoxArchiveFormat = new wxComboBox(this, IDC_COMPRESS_COMBO_FORMAT, archiveFormatArray.Item(0), wxDefaultPosition, wxDefaultSize, archiveFormatArray, wxCB_READONLY); + */ + + m_pComboBoxArchiveFormat = new wxComboBox(this, IDC_COMPRESS_COMBO_FORMAT, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxArrayString(), wxCB_READONLY); + + wxStaticText *pStaticTextCompressionLevel = new wxStaticText(this, IDC_STATIC_COMPRESS_LEVEL, wxT("Compression &level:")); + wxArrayString compressionLevelArray; + /* + compressionLevelArray.Add(wxT("Store")); + compressionLevelArray.Add(wxT("Fastest")); + compressionLevelArray.Add(wxT("Fast")); + compressionLevelArray.Add(wxT("Normal")); + compressionLevelArray.Add(wxT("Maximum")); + compressionLevelArray.Add(wxT("Ultra")); + m_pComboBoxCompressionLevel = new wxComboBox(this, IDC_COMPRESS_COMBO_LEVEL, compressionLevelArray.Item(0), wxDefaultPosition, wxDefaultSize, compressionLevelArray, wxCB_READONLY); + */ + m_pComboBoxCompressionLevel = new wxComboBox(this, IDC_COMPRESS_COMBO_LEVEL, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxArrayString(), wxCB_READONLY); + + wxStaticText *pStaticTextCompressionMethod = new wxStaticText(this, IDC_STATIC_COMPRESS_METHOD, wxT("Compression &method:")); +/* + wxArrayString compressionMethodArray; + compressionMethodArray.Add(wxT("LZMA")); + compressionMethodArray.Add(wxT("PPMd")); + compressionMethodArray.Add(wxT("BZip2")); + m_pComboBoxCompressionMethod = new wxComboBox(this, IDC_COMPRESS_COMBO_METHOD, compressionMethodArray.Item(0), wxDefaultPosition, wxDefaultSize, compressionMethodArray, wxCB_READONLY); +*/ + m_pComboBoxCompressionMethod = new wxComboBox(this, IDC_COMPRESS_COMBO_METHOD, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxArrayString(), wxCB_READONLY); + + wxStaticText *pStaticTextDictionarySize = new wxStaticText(this, IDC_STATIC_COMPRESS_DICTIONARY, wxT("&Dictionary size:")); +/* + wxArrayString dictionarySizeArray; + dictionarySizeArray.Add(wxT("64 KB")); + dictionarySizeArray.Add(wxT("1 MB")); + dictionarySizeArray.Add(wxT("1 MB")); + dictionarySizeArray.Add(wxT("2 MB")); + dictionarySizeArray.Add(wxT("3 MB")); + dictionarySizeArray.Add(wxT("4 MB")); + dictionarySizeArray.Add(wxT("6 MB")); + dictionarySizeArray.Add(wxT("8 MB")); + dictionarySizeArray.Add(wxT("12 MB")); + dictionarySizeArray.Add(wxT("16 MB")); + dictionarySizeArray.Add(wxT("24 MB")); + dictionarySizeArray.Add(wxT("32 MB")); + dictionarySizeArray.Add(wxT("48 MB")); + dictionarySizeArray.Add(wxT("64 MB")); + dictionarySizeArray.Add(wxT("96 MB")); + dictionarySizeArray.Add(wxT("128 MB")); + m_pComboBoxDictionarySize = new wxComboBox(this, IDC_COMPRESS_COMBO_DICTIONARY, dictionarySizeArray.Item(0), wxDefaultPosition, wxDefaultSize, dictionarySizeArray, wxCB_READONLY); +*/ + m_pComboBoxDictionarySize = new wxComboBox(this, IDC_COMPRESS_COMBO_DICTIONARY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxArrayString(), wxCB_READONLY); + + wxStaticText *pStaticTextNumberOfThreads = new wxStaticText(this, IDC_STATIC_COMPRESS_THREADS, wxT("&Number of CPU threads:")); +/* + wxArrayString numberOfThreadsArray; + numberOfThreadsArray.Add(wxT("1")); + numberOfThreadsArray.Add(wxT("2")); + wxComboBox *m_pComboBoxNumberOfThreads = new wxComboBox(this, IDC_COMPRESS_COMBO_THREADS, numberOfThreadsArray.Item(0), wxDefaultPosition, wxDefaultSize, numberOfThreadsArray, wxCB_READONLY); +*/ + wxComboBox *m_pComboBoxNumberOfThreads = new wxComboBox(this, IDC_COMPRESS_COMBO_THREADS, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxArrayString(), wxCB_READONLY); + + + + + + + wxStaticText *pStaticTextWordSize = new wxStaticText(this, IDC_STATIC_COMPRESS_ORDER, wxT("&Word size:")); +/* + wxArrayString wordSizeArray; + wordSizeArray.Add(wxT("8")); + wordSizeArray.Add(wxT("12")); + wordSizeArray.Add(wxT("16")); + wordSizeArray.Add(wxT("24")); + wordSizeArray.Add(wxT("32")); + wordSizeArray.Add(wxT("48")); + wordSizeArray.Add(wxT("64")); + wordSizeArray.Add(wxT("96")); + wordSizeArray.Add(wxT("128")); + wordSizeArray.Add(wxT("192")); + wordSizeArray.Add(wxT("256")); + wordSizeArray.Add(wxT("273")); + m_pComboBoxWordSize = new wxComboBox(this, IDC_COMPRESS_COMBO_ORDER, wordSizeArray.Item(0), wxDefaultPosition, wxDefaultSize, wordSizeArray, wxCB_READONLY); +*/ + m_pComboBoxWordSize = new wxComboBox(this, IDC_COMPRESS_COMBO_ORDER, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxArrayString(), wxCB_READONLY); + + + wxStaticText *pStaticTextBlockSize = new wxStaticText(this, IDC_STATIC_COMPRESS_SOLID, wxT("&Solid Block size:")); + + wxComboBox *m_pComboBoxBlockSize = new wxComboBox(this, IDC_COMPRESS_COMBO_SOLID, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxArrayString(), wxCB_READONLY); + + pCompressionStaticSizer->Add(pStaticTextArchiveFormat, 1, wxALL|wxEXPAND, 5); + pCompressionStaticSizer->Add(pStaticTextCompressionLevel, 1, wxALL|wxEXPAND, 5); + pCompressionStaticSizer->Add(pStaticTextCompressionMethod, 1, wxALL|wxEXPAND, 5); + pCompressionStaticSizer->Add(pStaticTextDictionarySize, 1, wxALL|wxEXPAND, 5); + pCompressionStaticSizer->Add(pStaticTextWordSize, 1, wxALL|wxEXPAND, 5); + pCompressionStaticSizer->Add(pStaticTextBlockSize, 1, wxALL|wxEXPAND, 5); + pCompressionStaticSizer->Add(pStaticTextNumberOfThreads, 1, wxALL|wxEXPAND, 5); + pCompressionComboSizer->Add(m_pComboBoxArchiveFormat, 1, wxALL|wxEXPAND, 5); + pCompressionComboSizer->Add(m_pComboBoxCompressionLevel, 1, wxALL|wxEXPAND, 5); + pCompressionComboSizer->Add(m_pComboBoxCompressionMethod, 1, wxALL|wxEXPAND, 5); + pCompressionComboSizer->Add(m_pComboBoxDictionarySize, 1, wxALL|wxEXPAND, 5); + pCompressionComboSizer->Add(m_pComboBoxWordSize, 1, wxALL|wxEXPAND, 5); + pCompressionComboSizer->Add(m_pComboBoxBlockSize, 1, wxALL|wxEXPAND, 5); + pCompressionComboSizer->Add(m_pComboBoxNumberOfThreads, 1, wxALL|wxEXPAND, 5); + pCompressionOptionsSizer->Add(pCompressionStaticSizer, 1, wxALL|wxEXPAND, 0); + pCompressionOptionsSizer->Add(pCompressionComboSizer, 1, wxALL|wxEXPAND, 0); + + wxBoxSizer *pMemoryUsageSizer = new wxBoxSizer(wxHORIZONTAL); + wxBoxSizer *pMemoryUsageLabelSizer = new wxBoxSizer(wxVERTICAL); + wxBoxSizer *pMemoryUsageInfoSizer = new wxBoxSizer(wxVERTICAL); + wxStaticText *pStaticTextCompressMemoryUsage = new wxStaticText(this, IDC_STATIC_COMPRESS_MEMORY, wxT("Memory usage for Compressing:")); + m_pStaticTextMemoryCompress = new wxStaticText(this, IDC_STATIC_COMPRESS_MEMORY_VALUE, wxT("709 MB"), wxDefaultPosition, wxDefaultSize, wxALIGN_RIGHT); + wxStaticText *pStaticTextDecompressMemoryUsage = new wxStaticText(this, IDC_STATIC_COMPRESS_MEMORY_DE, wxT("Memory usage for Decompressing")); + m_pStaticTextMemoryDecompress = new wxStaticText(this, IDC_STATIC_COMPRESS_MEMORY_DE_VALUE, wxT("66 MB"), wxDefaultPosition, wxDefaultSize, wxALIGN_RIGHT); + pMemoryUsageLabelSizer->Add(pStaticTextCompressMemoryUsage, 1, wxALL|wxEXPAND, 5); + pMemoryUsageLabelSizer->Add(pStaticTextDecompressMemoryUsage, 1, wxALL|wxEXPAND, 5); + pMemoryUsageInfoSizer->Add(m_pStaticTextMemoryCompress, 1, wxALL|wxEXPAND, 5); + pMemoryUsageInfoSizer->Add(m_pStaticTextMemoryDecompress, 1, wxALL|wxEXPAND, 5); + pMemoryUsageSizer->Add(pMemoryUsageLabelSizer, 1, wxALL|wxEXPAND, 0); + pMemoryUsageSizer->Add(pMemoryUsageInfoSizer, 0, wxALL|wxEXPAND, 0); + + wxStaticText *pStaticSplit2Volumes = new wxStaticText(this, IDC_STATIC_COMPRESS_VOLUME, wxT("Split to &volumes, bytes:")); +/* + wxArrayString split2VolumesArray; + split2VolumesArray.Add(wxT("1457664 - 3.5\" floppy")); + split2VolumesArray.Add(wxT("650M - CD")); + split2VolumesArray.Add(wxT("700M - CD")); + split2VolumesArray.Add(wxT("4480M - DVD")); + m_pComboBoxSplitToVolumes = new wxComboBox(this, IDC_COMPRESS_COMBO_VOLUME, wxEmptyString, wxDefaultPosition, wxDefaultSize, split2VolumesArray, wxCB_DROPDOWN); +*/ + m_pComboBoxSplitToVolumes = new wxComboBox(this, IDC_COMPRESS_COMBO_VOLUME, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxArrayString(), wxCB_DROPDOWN); + + pLeftSizer->Add(pCompressionOptionsSizer, 0, wxALL|wxEXPAND, 0); + pLeftSizer->Add(pMemoryUsageSizer, 1, wxALL|wxEXPAND, 0); + pLeftSizer->Add(pStaticSplit2Volumes, 0, wxALL|wxEXPAND, 5); + pLeftSizer->Add(m_pComboBoxSplitToVolumes, 0, wxALL|wxEXPAND, 5); + + wxBoxSizer *pRightSizer = new wxBoxSizer(wxVERTICAL); + wxStaticText *pStaticTextUpdateMode = new wxStaticText(this, IDC_STATIC_COMPRESS_UPDATE_MODE, wxT("&Update mode:")); +/* + wxArrayString updateModeArray; + updateModeArray.Add(wxT("Add and replace files")); + updateModeArray.Add(wxT("Update and add files")); + updateModeArray.Add(wxT("Freshen existing files")); + updateModeArray.Add(wxT("Synchronize files")); + m_pComboBoxUpdateMode = new wxComboBox(this, IDC_COMPRESS_COMBO_UPDATE_MODE, updateModeArray.Item(0), wxDefaultPosition, wxDefaultSize, updateModeArray, wxCB_READONLY); +*/ + m_pComboBoxUpdateMode = new wxComboBox(this, IDC_COMPRESS_COMBO_UPDATE_MODE, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxArrayString(), wxCB_READONLY); + + wxStaticBoxSizer *pOptionsSizer = new wxStaticBoxSizer(new wxStaticBox(this,IDC_STATIC_COMPRESS_OPTIONS,_T("Options")),wxVERTICAL); + wxCheckBox *m_pCheckBoxSFXArchive = new wxCheckBox(this, IDC_COMPRESS_SFX, wxT("Create SF&X archive")); + pOptionsSizer->Add(m_pCheckBoxSFXArchive, 1, wxALL|wxEXPAND, 5); + wxCheckBox *m_pCheckBoxCompressSharedFiles = new wxCheckBox(this, IDC_COMPRESS_SHARED, wxT("Compress shared files")); + m_pCheckBoxCompressSharedFiles->Show(false); // this option is useless undex Unix ... + pOptionsSizer->Add(m_pCheckBoxCompressSharedFiles, 1, wxALL|wxEXPAND, 5); + + wxStaticBoxSizer * pEncryptSizer = new wxStaticBoxSizer(new wxStaticBox(this,IDC_COMPRESS_ENCRYPTION,_T("Encryption")),wxVERTICAL); + wxStaticText *pStaticTextPassword = new wxStaticText(this, IDC_STATIC_COMPRESS_PASSWORD1, wxT("Enter password:")); + m_pTextCtrlPassword = new wxTextCtrl(this, IDC_COMPRESS_EDIT_PASSWORD1, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_PASSWORD); + wxStaticText *pStaticTextRePassword = new wxStaticText(this, IDC_STATIC_COMPRESS_PASSWORD2, wxT("Re-enter password:")); + m_pTextCtrlRePassword = new wxTextCtrl(this, IDC_COMPRESS_EDIT_PASSWORD2, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_PASSWORD); + m_pCheckBoxShowPassword = new wxCheckBox(this, IDC_COMPRESS_CHECK_SHOW_PASSWORD, wxT("Show Password")); + wxBoxSizer *pEncryptionMethodSizer = new wxBoxSizer(wxHORIZONTAL); + wxStaticText *pStaticTextEncryptionMethod = new wxStaticText(this, IDC_STATIC_COMPRESS_ENCRYPTION_METHOD, wxT("&Encryption method:")); +/* + wxArrayString encryptionMethodArray; + encryptionMethodArray.Add(wxT("AES-256")); + m_pComboBoxEncryptionMethod =new wxComboBox(this, IDC_COMPRESS_COMBO_ENCRYPTION_METHOD, encryptionMethodArray.Item(0), wxDefaultPosition, wxDefaultSize, encryptionMethodArray, wxCB_READONLY); +*/ + m_pComboBoxEncryptionMethod =new wxComboBox(this, IDC_COMPRESS_COMBO_ENCRYPTION_METHOD, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxArrayString(), wxCB_READONLY); + + pEncryptionMethodSizer->Add(pStaticTextEncryptionMethod, 1, wxALL|wxEXPAND, 5); + pEncryptionMethodSizer->Add(m_pComboBoxEncryptionMethod, 1, wxALL|wxEXPAND, 5); + m_pCheckBoxEncryptFileNames = new wxCheckBox(this, IDC_COMPRESS_CHECK_ENCRYPT_FILE_NAMES, wxT("Encrypt file &names")); + pEncryptSizer->Add(pStaticTextPassword, 0, wxALL|wxEXPAND, 5); + pEncryptSizer->Add(m_pTextCtrlPassword, 0, wxLEFT|wxRIGHT|wxEXPAND, 5); + pEncryptSizer->Add(pStaticTextRePassword, 0, wxALL|wxEXPAND, 5); + pEncryptSizer->Add(m_pTextCtrlRePassword, 0, wxLEFT|wxRIGHT|wxBOTTOM|wxEXPAND, 5); + pEncryptSizer->Add(m_pCheckBoxShowPassword, 0, wxALL|wxEXPAND, 5); + pEncryptSizer->Add(pEncryptionMethodSizer, 0, wxLEFT|wxRIGHT|wxEXPAND, 0); + pEncryptSizer->Add(m_pCheckBoxEncryptFileNames, 0, wxALL|wxEXPAND, 5); + + pRightSizer->Add(pStaticTextUpdateMode, 0, wxALL|wxEXPAND, 5); + pRightSizer->Add(m_pComboBoxUpdateMode, 0, wxALL|wxEXPAND, 5); + pRightSizer->Add(pOptionsSizer, 1, wxALL|wxEXPAND, 5); + pRightSizer->Add(pEncryptSizer, 0, wxALL|wxEXPAND, 5); + + pControlSizer->Add(pLeftSizer, 1, wxALL|wxEXPAND, 5); + pControlSizer->Add(pRightSizer, 1, wxALL|wxEXPAND, 5); + wxStaticText *pStaticTextParameters = new wxStaticText(this, IDC_STATIC_COMPRESS_PARAMETERS, wxT("&Parameters:")); + m_pTextCtrlParameters = new wxTextCtrl(this, IDC_COMPRESS_EDIT_PARAMETERS, wxEmptyString); + topsizer->Add(pStaticTextArchive, 0, wxLEFT | wxRIGHT | wxTOP |wxEXPAND, 10); + topsizer->Add(pArchiveNameSizer, 1, wxLEFT | wxRIGHT |wxEXPAND, 5); + topsizer->Add(pControlSizer, 0, wxALL|wxEXPAND, 5); + topsizer->Add(pStaticTextParameters, 0, wxLEFT | wxRIGHT | wxBOTTOM |wxEXPAND, 10); + topsizer->Add(m_pTextCtrlParameters, 0, wxLEFT | wxRIGHT |wxEXPAND, 10); + topsizer->Add(CreateButtonSizer(wxOK | wxCANCEL | wxHELP), 0, wxALL|wxEXPAND, 10); + + this->OnInit(); + + SetSizer(topsizer); // use the sizer for layout + topsizer->SetSizeHints(this); // set size hints to honour minimum size + } +private: + // Any class wishing to process wxWindows events must use this macro + DECLARE_EVENT_TABLE() +}; + +static CStringTable g_stringTable[] = +{ + { IDS_METHOD_STORE ,L"Store" }, + { IDS_METHOD_NORMAL ,L"Normal" }, + { IDS_METHOD_MAXIMUM ,L"Maximum" }, + { IDS_METHOD_FAST ,L"Fast" }, + { IDS_METHOD_FASTEST ,L"Fastest" }, + { IDS_METHOD_ULTRA ,L"Ultra" }, + + { IDS_COMPRESS_NON_SOLID ,L"Non-solid" }, + { IDS_COMPRESS_SOLID ,L"Solid" }, + + { IDS_COMPRESS_UPDATE_MODE_ADD ,L"Add and replace files" }, + { IDS_COMPRESS_UPDATE_MODE_UPDATE ,L"Update and add files" }, + { IDS_COMPRESS_UPDATE_MODE_FRESH ,L"Freshen existing files" }, + { IDS_COMPRESS_UPDATE_MODE_SYNCHRONIZE ,L"Synchronize files" }, + { IDS_COMPRESS_SET_ARCHIVE_DIALOG_TITLE ,L"Browse" }, + { IDS_COMPRESS_SPLIT_CONFIRM_MESSAGE ,L"Specified volume size: {0} bytes.\nAre you sure you want to split archive into such volumes?" }, + + { IDS_OPEN_TYPE_ALL_FILES ,L"All Files" }, + + { IDS_PASSWORD_USE_ASCII ,L"Use only English letters, numbers and special characters (!, #, $, ...) for password." }, + { IDS_PASSWORD_PASSWORDS_DO_NOT_MATCH ,L"Passwords do not match" }, + { IDS_PASSWORD_IS_TOO_LONG ,L"Password is too long" }, + + { 0 , 0 } +}; + +REGISTER_DIALOG(IDD_DIALOG_COMPRESS,CCompressDialog,g_stringTable) + +BEGIN_EVENT_TABLE(CCompressDialogImpl, wxDialog) + EVT_BUTTON(wxID_ANY, CModalDialogImpl::OnAnyButton) + EVT_CHECKBOX(wxID_ANY, CModalDialogImpl::OnAnyButton) + EVT_COMBOBOX(wxID_ANY, CModalDialogImpl::OnAnyChoice) + EVT_MENU(WORKER_EVENT, CModalDialogImpl::OnWorkerEvent) +END_EVENT_TABLE() + diff --git a/CPP/7zip/UI/GUI/ExtractDialog.cpp b/CPP/7zip/UI/GUI/ExtractDialog.cpp new file mode 100644 index 0000000..cf0c18a --- /dev/null +++ b/CPP/7zip/UI/GUI/ExtractDialog.cpp @@ -0,0 +1,358 @@ +// ExtractDialog.cpp + +#include "StdAfx.h" + +// #include + +#include "ExtractDialog.h" + +#include "Common/StringConvert.h" + +#include "Windows/FileName.h" +#include "Windows/FileDir.h" +#include "Windows/ResourceString.h" + +#ifndef NO_REGISTRY +#include "../FileManager/HelpUtils.h" +#endif + +#include "../Common/ZipRegistry.h" + +#include "../FileManager/BrowseDialog.h" +#include "../FileManager/LangUtils.h" +#include "../FileManager/resourceGui.h" + +#include "ExtractRes.h" +#include "ExtractDialogRes.h" + +using namespace NWindows; +using namespace NFile; +using namespace NName; + +extern HINSTANCE g_hInstance; + +static CIDLangPair kPathMode_Pairs[] = +{ + { IDC_EXTRACT_RADIO_FULL_PATHNAMES, 0x02000811 }, + // { IDC_EXTRACT_RADIO_CURRENT_PATHNAMES, 0x02000812 }, + { IDC_EXTRACT_RADIO_NO_PATHNAMES, 0x02000813 } +}; + +static CIDLangPair kOverwriteMode_Pairs[] = +{ + { IDC_EXTRACT_RADIO_ASK_BEFORE_OVERWRITE, 0x02000821 }, + { IDC_EXTRACT_RADIO_OVERWRITE_WITHOUT_PROMPT, 0x02000822 }, + { IDC_EXTRACT_RADIO_SKIP_EXISTING_FILES, 0x02000823 }, + { IDC_EXTRACT_RADIO_AUTO_RENAME, 0x02000824 }, + { IDC_EXTRACT_RADIO_AUTO_RENAME_EXISTING, 0x02000825 } +}; + +#ifndef _SFX + +static const + // NExtract::NPathMode::EEnum + int + kPathModeButtonsVals[] = +{ + NExtract::NPathMode::kFullPathnames, + // NExtract::NPathMode::kCurrentPathnames, + NExtract::NPathMode::kNoPathnames +}; + +static const int kOverwriteButtons[] = +{ + IDC_EXTRACT_RADIO_ASK_BEFORE_OVERWRITE, + IDC_EXTRACT_RADIO_OVERWRITE_WITHOUT_PROMPT, + IDC_EXTRACT_RADIO_SKIP_EXISTING_FILES, + IDC_EXTRACT_RADIO_AUTO_RENAME, + IDC_EXTRACT_RADIO_AUTO_RENAME_EXISTING, +}; + +static const + int + // NExtract::NOverwriteMode::EEnum + kOverwriteButtonsVals[] = +{ + NExtract::NOverwriteMode::kAskBefore, + NExtract::NOverwriteMode::kWithoutPrompt, + NExtract::NOverwriteMode::kSkipExisting, + NExtract::NOverwriteMode::kAutoRename, + NExtract::NOverwriteMode::kAutoRenameExisting +}; + +static const int kNumOverwriteButtons = sizeof(kOverwriteButtons) / sizeof(kOverwriteButtons[0]); + +/* +static const int kFilesButtons[] = +{ + IDC_EXTRACT_RADIO_SELECTED_FILES, + IDC_EXTRACT_RADIO_ALL_FILES +}; +static const int kNumFilesButtons = sizeof(kFilesButtons) / sizeof(kFilesButtons[0]); +*/ + +/* +int CExtractDialog::GetFilesMode() const +{ + for (int i = 0; i < kNumFilesButtons; i++) + if (IsButtonCheckedBool(kFilesButtons[i])) + return i; + throw 0; +} +*/ + +#endif + +#ifdef LANG +static CIDLangPair kIDLangPairs[] = +{ + { IDC_STATIC_EXTRACT_EXTRACT_TO, 0x02000801 }, + { IDC_EXTRACT_PATH_MODE, 0x02000810 }, + { IDC_EXTRACT_OVERWRITE_MODE, 0x02000820 }, + // { IDC_EXTRACT_FILES, 0x02000830 }, + // { IDC_EXTRACT_RADIO_SELECTED_FILES, 0x02000831 }, + // { IDC_EXTRACT_RADIO_ALL_FILES, 0x02000832 }, + { IDC_EXTRACT_PASSWORD, 0x02000802 }, + { IDC_EXTRACT_CHECK_SHOW_PASSWORD, 0x02000B02 }, + { IDOK, 0x02000702 }, + { IDCANCEL, 0x02000710 }, + { IDHELP, 0x02000720 } + +}; +#endif + +// static const int kWildcardsButtonIndex = 2; + +#ifndef NO_REGISTRY +static const int kHistorySize = 8; +#endif + +#ifndef _SFX +static void AddComboItems(NWindows::NControl::CComboBox &combo, const CIDLangPair *items, int numItems, const int *values, int curVal) +{ + int curSel = 0; + for (int i = 0; i < numItems; i++) + { + UString s = LangString(items[i].ControlID, items[i].LangID); + s.Replace(L"&", L""); + int index = (int)combo.AddString(s); + combo.SetItemData(index, i); + if (values[i] == curVal) + curSel = i; + } + combo.SetCurSel(curSel); +} +#endif + +bool CExtractDialog::OnInit() +{ + #ifdef LANG + LangSetWindowText(HWND(*this), 0x02000800); + LangSetDlgItemsText(HWND(*this), kIDLangPairs, sizeof(kIDLangPairs) / sizeof(kIDLangPairs[0])); + #endif + #ifndef _SFX + _passwordControl.Attach(GetItem(IDC_EXTRACT_EDIT_PASSWORD)); + _passwordControl.SetText(Password); + _passwordControl.SetPasswordChar(TEXT('*')); + #endif + + NExtract::CInfo info; + + #ifdef NO_REGISTRY + PathMode = NExtract::NPathMode::kFullPathnames; + OverwriteMode = NExtract::NOverwriteMode::kAskBefore; + // info.Paths = NExtract::NPathMode::kFullPathnames; + #else + info.Load(); + CheckButton(IDC_EXTRACT_CHECK_SHOW_PASSWORD, info.ShowPassword); + UpdatePasswordControl(); + PathMode = info.PathMode; + OverwriteMode = info.OverwriteMode; + #endif + + _path.Attach(GetItem(IDC_EXTRACT_COMBO_PATH)); + + _path.SetText(DirectoryPath); + + #ifndef NO_REGISTRY + for (int i = 0; i < info.Paths.Size() && i < kHistorySize; i++) + _path.AddString(info.Paths[i]); + #endif + + /* + if (info.Paths.Size() > 0) + _path.SetCurSel(0); + else + _path.SetCurSel(-1); + */ + + #ifndef _SFX + + _pathMode.Attach(GetItem(IDC_EXTRACT_COMBO_PATH_MODE)); + AddComboItems(_pathMode, kPathMode_Pairs, sizeof(kPathMode_Pairs) / sizeof(kPathMode_Pairs[0]), + kPathModeButtonsVals, PathMode); + + _overwriteMode.Attach(GetItem(IDC_EXTRACT_COMBO_OVERWRITE_MODE)); + AddComboItems(_overwriteMode, kOverwriteMode_Pairs, sizeof(kOverwriteMode_Pairs) / sizeof(kOverwriteMode_Pairs[0]), + kOverwriteButtonsVals, OverwriteMode); + + /* + CheckRadioButton(kFilesButtons[0], kFilesButtons[kNumFilesButtons - 1], + kFilesButtons[_filesMode]); + */ + + // CWindow selectedFilesWindow = GetItem(IDC_EXTRACT_RADIO_SELECTED_FILES); + // selectedFilesWindow.Enable(_enableSelectedFilesButton); + + + #endif + + +#ifdef _WIN32 + HICON icon = LoadIcon(g_hInstance, MAKEINTRESOURCE(IDI_ICON)); + SetIcon(ICON_BIG, icon); +#endif + + // CWindow filesWindow = GetItem(IDC_EXTRACT_RADIO_FILES); + // filesWindow.Enable(_enableFilesButton); + + // UpdateWildCardState(); + NormalizePosition(); + + return CModalDialog::OnInit(); +} + +#ifndef _SFX +void CExtractDialog::UpdatePasswordControl() +{ + _passwordControl.SetPasswordChar((IsButtonChecked( + IDC_EXTRACT_CHECK_SHOW_PASSWORD) == BST_CHECKED) ? 0: TEXT('*')); + UString password; + _passwordControl.GetText(password); + _passwordControl.SetText(password); +} +#endif + +bool CExtractDialog::OnButtonClicked(int buttonID, HWND buttonHWND) +{ + /* + for (int i = 0; i < kNumFilesButtons; i++) + if (buttonID == kFilesButtons[i]) + { + UpdateWildCardState(); + return true; + } + */ + switch(buttonID) + { + case IDC_EXTRACT_BUTTON_SET_PATH: + OnButtonSetPath(); + return true; + #ifndef _SFX + case IDC_EXTRACT_CHECK_SHOW_PASSWORD: + { + UpdatePasswordControl(); + return true; + } + #endif + } + return CModalDialog::OnButtonClicked(buttonID, buttonHWND); +} + +void CExtractDialog::OnButtonSetPath() +{ + UString currentPath; + _path.GetText(currentPath); + UString title = LangStringSpec(IDS_EXTRACT_SET_FOLDER, 0x02000881); + UString resultPath; + if (!MyBrowseForFolder(HWND(*this), title, currentPath, resultPath)) + return; + #ifndef NO_REGISTRY + _path.SetCurSel(-1); + #endif + _path.SetText(resultPath); +} + +void AddUniqueString(UStringVector &list, const UString &s) +{ + for (int i = 0; i < list.Size(); i++) + if (s.CompareNoCase(list[i]) == 0) + return; + list.Add(s); +} + +void CExtractDialog::OnOK() +{ + #ifndef _SFX + NExtract::NPathMode::EEnum pathMode2 = (NExtract::NPathMode::EEnum)kPathModeButtonsVals[_pathMode.GetItemData(_pathMode.GetCurSel())]; + if (PathMode != NExtract::NPathMode::kCurrentPathnames || + pathMode2 != NExtract::NPathMode::kFullPathnames) + PathMode = pathMode2; + OverwriteMode = (NExtract::NOverwriteMode::EEnum)kOverwriteButtonsVals[_overwriteMode.GetItemData(_overwriteMode.GetCurSel())]; + + // _filesMode = (NExtractionDialog::NFilesMode::EEnum)GetFilesMode(); + + _passwordControl.GetText(Password); + #endif + + NExtract::CInfo info; + info.PathMode = PathMode; + info.OverwriteMode = OverwriteMode; + info.ShowPassword = (IsButtonCheckedBool(IDC_EXTRACT_CHECK_SHOW_PASSWORD)); + + UString s; + + #ifdef NO_REGISTRY + + _path.GetText(s); + + #else + + int currentItem = _path.GetCurSel(); + if (currentItem == CB_ERR) + { + _path.GetText(s); + if (_path.GetCount() >= kHistorySize) + currentItem = _path.GetCount() - 1; + } + else + _path.GetLBText(currentItem, s); + + #endif + + s.Trim(); + #ifndef _SFX + AddUniqueString(info.Paths, s); + #endif + DirectoryPath = s; + #ifndef NO_REGISTRY + for (int i = 0; i < _path.GetCount(); i++) + if (i != currentItem) + { + UString sTemp; + _path.GetLBText(i, sTemp); + sTemp.Trim(); + AddUniqueString(info.Paths, sTemp); + } + info.Save(); + #endif + CModalDialog::OnOK(); +} + +/* +void CExtractDialog::UpdateWildCardState() +{ + // UpdateData(TRUE); + // m_Wildcards.EnableWindow(BoolToBOOL(m_Files == kWildcardsButtonIndex)); +} +*/ + +#ifndef NO_REGISTRY +static LPCWSTR kHelpTopic = L"fm/plugins/7-zip/extract.htm"; +void CExtractDialog::OnHelp() +{ + ShowHelpWindow(NULL, kHelpTopic); + CModalDialog::OnHelp(); +} +#endif + diff --git a/CPP/7zip/UI/GUI/ExtractDialog.h b/CPP/7zip/UI/GUI/ExtractDialog.h new file mode 100644 index 0000000..b0636c7 --- /dev/null +++ b/CPP/7zip/UI/GUI/ExtractDialog.h @@ -0,0 +1,83 @@ +// ExtractDialog.h + +#ifndef __EXTRACT_DIALOG_H +#define __EXTRACT_DIALOG_H + +#include "ExtractDialogRes.h" + +#include "Windows/Control/Edit.h" +#include "Windows/Control/ComboBox.h" + +#ifndef NO_REGISTRY +#include "../Common/ZipRegistry.h" +#endif +#include "../Common/ExtractMode.h" + +#include "../FileManager/DialogSize.h" + +namespace NExtractionDialog +{ + /* + namespace NFilesMode + { + enum EEnum + { + kSelected, + kAll, + kSpecified + }; + } + */ +} + +class CExtractDialog: public NWindows::NControl::CModalDialog +{ + #ifdef NO_REGISTRY + NWindows::NControl::CDialogChildControl _path; + #else + NWindows::NControl::CComboBox _path; + #endif + + #ifndef _SFX + NWindows::NControl::CEdit _passwordControl; + NWindows::NControl::CComboBox _pathMode; + NWindows::NControl::CComboBox _overwriteMode; + #endif + + #ifndef _SFX + // int GetFilesMode() const; + void UpdatePasswordControl(); + #endif + + void OnButtonSetPath(); + + virtual bool OnInit(); + virtual bool OnButtonClicked(int buttonID, HWND buttonHWND); + virtual void OnOK(); + #ifndef NO_REGISTRY + virtual void OnHelp(); + #endif +public: + // bool _enableSelectedFilesButton; + // bool _enableFilesButton; + // NExtractionDialog::NFilesMode::EEnum FilesMode; + + UString DirectoryPath; + #ifndef _SFX + UString Password; + #endif + NExtract::NPathMode::EEnum PathMode; + NExtract::NOverwriteMode::EEnum OverwriteMode; + + INT_PTR Create(HWND aWndParent = 0) + { + #ifdef _SFX + BIG_DIALOG_SIZE(240, 64); + #else + BIG_DIALOG_SIZE(300, 160); + #endif + return CModalDialog::Create(SIZED_DIALOG(IDD_DIALOG_EXTRACT), aWndParent); + } +}; + +#endif diff --git a/CPP/7zip/UI/GUI/ExtractDialogRes.h b/CPP/7zip/UI/GUI/ExtractDialogRes.h new file mode 100644 index 0000000..38652b2 --- /dev/null +++ b/CPP/7zip/UI/GUI/ExtractDialogRes.h @@ -0,0 +1,19 @@ +#define IDD_DIALOG_EXTRACT 552 +#define IDD_DIALOG_EXTRACT_2 652 + +#define IDC_STATIC_EXTRACT_EXTRACT_TO 1020 +#define IDC_EXTRACT_COMBO_PATH 1021 +#define IDC_EXTRACT_BUTTON_SET_PATH 1022 + +#define IDC_EXTRACT_COMBO_PATH_MODE 1030 +#define IDC_EXTRACT_COMBO_OVERWRITE_MODE 1031 + +#define IDC_EXTRACT_PATH_MODE 1040 +#define IDC_EXTRACT_OVERWRITE_MODE 1050 + +#define IDC_EXTRACT_FILES 1060 + +#define IDC_EXTRACT_PASSWORD 1100 +#define IDC_EXTRACT_EDIT_PASSWORD 1101 +#define IDC_EXTRACT_CHECK_SHOW_PASSWORD 1102 + diff --git a/CPP/7zip/UI/GUI/ExtractDialog_rc.cpp b/CPP/7zip/UI/GUI/ExtractDialog_rc.cpp new file mode 100644 index 0000000..7cb8dbf --- /dev/null +++ b/CPP/7zip/UI/GUI/ExtractDialog_rc.cpp @@ -0,0 +1,134 @@ +// ExtractDialog.cpp + +#include "StdAfx.h" + +// For compilers that support precompilation, includes "wx/wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +// for all others, include the necessary headers (this file is usually all you +// need because it includes almost all "standard" wxWidgets headers) +#ifndef WX_PRECOMP + #include "wx/wx.h" +#endif + +#undef _WIN32 + +#include "Windows/Control/DialogImpl.h" + +#include "ExtractRes.h" +#include "ExtractDialogRes.h" + +/* +IDD_DIALOG_EXTRACT MY_DIALOG +CAPTION "Extract" +BEGIN + LTEXT "E&xtract to:", IDC_STATIC_EXTRACT_EXTRACT_TO, m, m, xc, 8 + COMBOBOX IDC_EXTRACT_COMBO_PATH, m, m + 12, xc - bxsDots - 12, 100, MY_COMBO_WITH_EDIT + PUSHBUTTON "...", IDC_EXTRACT_BUTTON_SET_PATH, xs - m - bxsDots, m + 12 - 2, bxsDots, bys, WS_GROUP + + LTEXT "Path mode:", IDC_EXTRACT_PATH_MODE, m, m + 36, g1xs, 8 + COMBOBOX IDC_EXTRACT_COMBO_PATH_MODE, m, m + 48, g1xs, 140, MY_COMBO + + LTEXT "Overwrite mode:", IDC_EXTRACT_OVERWRITE_MODE, m, m + 68, g1xs, 8 + COMBOBOX IDC_EXTRACT_COMBO_OVERWRITE_MODE, m, m + 80, g1xs, 140, MY_COMBO + + #ifdef UNDER_CE + LTEXT "Password", IDC_EXTRACT_PASSWORD, g2x, m + 36, g2xs, 8 + #else + GROUPBOX "Password", IDC_EXTRACT_PASSWORD, g2x, m + 36, g2xs, 56 + #endif + EDITTEXT IDC_EXTRACT_EDIT_PASSWORD, g2x2, m + 50, g2xs2, 14, ES_PASSWORD | ES_AUTOHSCROLL + CONTROL "Show Password", IDC_EXTRACT_CHECK_SHOW_PASSWORD, MY_CHECKBOX, g2x2, m + 72, g2xs2, 10 + + DEFPUSHBUTTON "OK", IDOK, bx3, by, bxs, bys, WS_GROUP + PUSHBUTTON "Cancel", IDCANCEL, bx2, by, bxs, bys + PUSHBUTTON "Help", IDHELP, bx1, by, bxs, bys +END +*/ + + +class CExtractDialogImpl : public NWindows::NControl::CModalDialogImpl +{ + public: + CExtractDialogImpl(NWindows::NControl::CModalDialog *dialog,wxWindow * parent , int id) : CModalDialogImpl(dialog,parent, id, wxT("Extract")) + { + wxStaticText *m_pStaticTextExtractTo; + wxTextCtrl *m_pTextCtrlPassword; + wxButton *m_pButtonBrowse; + wxComboBox *m_pComboBoxExtractTo; + wxCheckBox *m_pCheckBoxShowPassword; + + wxComboBox *m_pPathMode; + wxComboBox *m_pOverWriteMode; + + ///Sizer for adding the controls created by users + wxBoxSizer* topsizer = new wxBoxSizer(wxVERTICAL); + + wxArrayString pathArray; + m_pStaticTextExtractTo = new wxStaticText(this, IDC_STATIC_EXTRACT_EXTRACT_TO, wxT("E&xtract To:")); + wxBoxSizer *pPathSizer = new wxBoxSizer(wxHORIZONTAL); + // m_pComboBoxExtractTo = new wxComboBox(this, IDC_EXTRACT_COMBO_PATH, wxEmptyString, wxDefaultPosition, wxDefaultSize, pathArray, wxCB_DROPDOWN|wxCB_SORT); + m_pComboBoxExtractTo = new wxComboBox(this, IDC_EXTRACT_COMBO_PATH, wxEmptyString, wxDefaultPosition, wxSize(600,-1), pathArray, wxCB_DROPDOWN|wxCB_SORT); + m_pButtonBrowse = new wxButton(this, IDC_EXTRACT_BUTTON_SET_PATH, wxT("..."), wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT); + pPathSizer->Add(m_pComboBoxExtractTo, 1, wxLEFT|wxRIGHT|wxEXPAND, 5); + pPathSizer->Add(m_pButtonBrowse, 0, wxLEFT|wxRIGHT|wxEXPAND, 5); + + wxBoxSizer *pControlSizer = new wxBoxSizer(wxHORIZONTAL); + + wxStaticBoxSizer * grpPathMode = new wxStaticBoxSizer(new wxStaticBox(this,IDC_EXTRACT_PATH_MODE,_T("Path mode :")),wxVERTICAL); + + m_pPathMode = new wxComboBox(this, IDC_EXTRACT_COMBO_PATH_MODE, wxEmptyString, wxDefaultPosition, wxDefaultSize, pathArray, wxCB_DROPDOWN); + + grpPathMode->Add(m_pPathMode, 1, wxLEFT|wxRIGHT|wxEXPAND, 5); + + wxBoxSizer *pLeftSizer = new wxBoxSizer(wxVERTICAL); + wxBoxSizer *pRightSizer = new wxBoxSizer(wxVERTICAL); + + wxStaticBoxSizer * grpOverWriteMode = new wxStaticBoxSizer(new wxStaticBox(this,IDC_EXTRACT_OVERWRITE_MODE,wxT("Overwrite mode :")),wxVERTICAL); + + m_pOverWriteMode = new wxComboBox(this, IDC_EXTRACT_COMBO_OVERWRITE_MODE, wxEmptyString, wxDefaultPosition, wxDefaultSize, pathArray, wxCB_DROPDOWN); + + grpOverWriteMode->Add(m_pOverWriteMode, 1, wxLEFT|wxRIGHT|wxEXPAND, 5); + + wxStaticBoxSizer *pPasswordSizer = new wxStaticBoxSizer(new wxStaticBox(this,IDC_EXTRACT_PASSWORD,wxT("Password")),wxVERTICAL); + + m_pTextCtrlPassword = new wxTextCtrl(this, IDC_EXTRACT_EDIT_PASSWORD, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_PASSWORD); + m_pCheckBoxShowPassword = new wxCheckBox(this, IDC_EXTRACT_CHECK_SHOW_PASSWORD, wxT("Show Password")); + pPasswordSizer->Add(m_pTextCtrlPassword, 0, wxALL|wxEXPAND, 5); + pPasswordSizer->Add(m_pCheckBoxShowPassword, 0, wxALL|wxEXPAND, 5); + + pLeftSizer->Add(grpPathMode, 1, wxALL|wxEXPAND, 5); + pLeftSizer->Add(grpOverWriteMode, 0, wxALL|wxEXPAND, 5); + + pRightSizer->Add(pPasswordSizer, 0, wxALL|wxEXPAND, 5); + + pControlSizer->Add(pLeftSizer, 1, wxALL|wxEXPAND, 5); + pControlSizer->Add(pRightSizer, 1, wxLEFT | wxRIGHT | wxEXPAND, 5); + + topsizer->Add(m_pStaticTextExtractTo, 0, wxALL | wxEXPAND , 10); + topsizer->Add(pPathSizer, 0, wxLEFT | wxRIGHT | wxBOTTOM | wxEXPAND , 5); + topsizer->Add(pControlSizer, 1, wxALL | wxEXPAND , 5); + topsizer->Add(CreateButtonSizer(wxOK | wxCANCEL | wxHELP), 0, wxALL | wxEXPAND , 5); + + this->OnInit(); + + SetSizer(topsizer); // use the sizer for layout + topsizer->SetSizeHints(this); // set size hints to honour minimum size + } +private: + // Any class wishing to process wxWindows events must use this macro + DECLARE_EVENT_TABLE() +}; + +REGISTER_DIALOG(IDD_DIALOG_EXTRACT,CExtractDialog,0) + +BEGIN_EVENT_TABLE(CExtractDialogImpl, wxDialog) + EVT_BUTTON(wxID_ANY, CModalDialogImpl::OnAnyButton) + EVT_CHECKBOX(wxID_ANY, CModalDialogImpl::OnAnyButton) + EVT_MENU(WORKER_EVENT, CModalDialogImpl::OnWorkerEvent) +END_EVENT_TABLE() + diff --git a/CPP/7zip/UI/GUI/ExtractGUI.cpp b/CPP/7zip/UI/GUI/ExtractGUI.cpp new file mode 100644 index 0000000..f0786be --- /dev/null +++ b/CPP/7zip/UI/GUI/ExtractGUI.cpp @@ -0,0 +1,212 @@ +// ExtractGUI.cpp + +#include "StdAfx.h" + +#include "Common/IntToString.h" +#include "Common/StringConvert.h" + +#include "Windows/Error.h" +#include "Windows/FileDir.h" +#include "Windows/FileFind.h" +#include "Windows/Thread.h" + +#include "../FileManager/ExtractCallback.h" +#include "../FileManager/FormatUtils.h" +#include "../FileManager/LangUtils.h" +#include "../FileManager/resourceGui.h" + +#include "../Common/ArchiveExtractCallback.h" +#include "../Common/PropIDUtils.h" + +#include "../Explorer/MyMessages.h" + +#include "resource2.h" +#include "ExtractRes.h" + +#include "ExtractDialog.h" +#include "ExtractGUI.h" + +using namespace NWindows; + +static const wchar_t *kIncorrectOutDir = L"Incorrect output directory path"; + +#ifndef _SFX + +static void AddValuePair(UINT resourceID, UInt32 langID, UInt64 value, UString &s) +{ + wchar_t sz[32]; + s += LangString(resourceID, langID); + s += L' '; + ConvertUInt64ToString(value, sz); + s += sz; + s += L'\n'; +} + +static void AddSizePair(UINT resourceID, UInt32 langID, UInt64 value, UString &s) +{ + wchar_t sz[32]; + s += LangString(resourceID, langID); + s += L' '; + ConvertUInt64ToString(value, sz); + s += sz; + ConvertUInt64ToString(value >> 20, sz); + s += L" ("; + s += sz; + s += L" MB)"; + s += L'\n'; +} + +#endif + +class CThreadExtracting: public CProgressThreadVirt +{ + HRESULT ProcessVirt(); +public: + CCodecs *codecs; + CExtractCallbackImp *ExtractCallbackSpec; + CIntVector FormatIndices; + + UStringVector *ArchivePaths; + UStringVector *ArchivePathsFull; + const NWildcard::CCensorNode *WildcardCensor; + const CExtractOptions *Options; + CMyComPtr ExtractCallback; + UString Title; +}; + +HRESULT CThreadExtracting::ProcessVirt() +{ + CDecompressStat Stat; + HRESULT res = DecompressArchives(codecs, FormatIndices, *ArchivePaths, *ArchivePathsFull, + *WildcardCensor, *Options, ExtractCallbackSpec, ExtractCallback, ErrorMessage, Stat); + #ifndef _SFX + if (Options->TestMode && ExtractCallbackSpec->IsOK()) + { + UString s; + AddValuePair(IDS_ARCHIVES_COLON, 0x02000324, Stat.NumArchives, s); + AddValuePair(IDS_FOLDERS_COLON, 0x02000321, Stat.NumFolders, s); + AddValuePair(IDS_FILES_COLON, 0x02000320, Stat.NumFiles, s); + AddSizePair(IDS_SIZE_COLON, 0x02000322, Stat.UnpackSize, s); + AddSizePair(IDS_COMPRESSED_COLON, 0x02000323, Stat.PackSize, s); + + if (Options->CalcCrc) + { + wchar_t temp[16]; + ConvertUInt32ToHex(Stat.CrcSum, temp); + s += L"CRC: "; + s += temp; + s += L'\n'; + } + + s += L'\n'; + s += LangString(IDS_MESSAGE_NO_ERRORS, 0x02000608); + + OkMessageTitle = Title; + OkMessage = s; + } + #endif + return res; +} + +HRESULT ExtractGUI( + CCodecs *codecs, + const CIntVector &formatIndices, + UStringVector &archivePaths, + UStringVector &archivePathsFull, + const NWildcard::CCensorNode &wildcardCensor, + CExtractOptions &options, + bool showDialog, + bool &messageWasDisplayed, + CExtractCallbackImp *extractCallback, + HWND hwndParent) +{ + messageWasDisplayed = false; + + CThreadExtracting extracter; + extracter.codecs = codecs; + extracter.FormatIndices = formatIndices; + + if (!options.TestMode) + { + UString outputDir = options.OutputDir; + #ifndef UNDER_CE + if (outputDir.IsEmpty()) + NFile::NDirectory::MyGetCurrentDirectory(outputDir); + #endif + if (showDialog) + { + CExtractDialog dialog; + if (!NFile::NDirectory::MyGetFullPathName(outputDir, dialog.DirectoryPath)) + { + ShowErrorMessage(kIncorrectOutDir); + messageWasDisplayed = true; + return E_FAIL; + } + NFile::NName::NormalizeDirPathPrefix(dialog.DirectoryPath); +#ifndef _WIN32 + { + extern const TCHAR * nameWindowToUnix(const TCHAR * lpFileName); + UString tmpDirectoryPath = dialog.DirectoryPath; + dialog.DirectoryPath = nameWindowToUnix(tmpDirectoryPath); + } +#endif + + // dialog.OverwriteMode = options.OverwriteMode; + // dialog.PathMode = options.PathMode; + + if (dialog.Create(hwndParent) != IDOK) + return E_ABORT; + outputDir = dialog.DirectoryPath; + options.OverwriteMode = dialog.OverwriteMode; + options.PathMode = dialog.PathMode; + #ifndef _SFX + extractCallback->Password = dialog.Password; + extractCallback->PasswordIsDefined = !dialog.Password.IsEmpty(); + #endif + } + if (!NFile::NDirectory::MyGetFullPathName(outputDir, options.OutputDir)) + { + ShowErrorMessage(kIncorrectOutDir); + messageWasDisplayed = true; + return E_FAIL; + } + NFile::NName::NormalizeDirPathPrefix(options.OutputDir); + + /* + if(!NFile::NDirectory::CreateComplexDirectory(options.OutputDir)) + { + UString s = GetUnicodeString(NError::MyFormatMessage(GetLastError())); + UString s2 = MyFormatNew(IDS_CANNOT_CREATE_FOLDER, + #ifdef LANG + 0x02000603, + #endif + options.OutputDir); + MyMessageBox(s2 + UString(L'\n') + s); + return E_FAIL; + } + */ + } + + UString title = LangStringSpec(options.TestMode ? IDS_PROGRESS_TESTING : IDS_PROGRESS_EXTRACTING, + options.TestMode ? 0x02000F90: 0x02000890); + + extracter.Title = title; + extracter.ExtractCallbackSpec = extractCallback; + extracter.ExtractCallbackSpec->ProgressDialog = &extracter.ProgressDialog; + extracter.ExtractCallback = extractCallback; + extracter.ExtractCallbackSpec->Init(); + + extracter.ProgressDialog.CompressingMode = false; + + extracter.ArchivePaths = &archivePaths; + extracter.ArchivePathsFull = &archivePathsFull; + extracter.WildcardCensor = &wildcardCensor; + extracter.Options = &options; + + extracter.ProgressDialog.IconID = IDI_ICON; + + RINOK(extracter.Create(title, hwndParent)); + messageWasDisplayed = extracter.ThreadFinishedOK & + extracter.ProgressDialog.MessagesDisplayed; + return extracter.Result; +} diff --git a/CPP/7zip/UI/GUI/ExtractGUI.h b/CPP/7zip/UI/GUI/ExtractGUI.h new file mode 100644 index 0000000..b0a692f --- /dev/null +++ b/CPP/7zip/UI/GUI/ExtractGUI.h @@ -0,0 +1,34 @@ +// GUI/ExtractGUI.h + +#ifndef __EXTRACT_GUI_H +#define __EXTRACT_GUI_H + +#include "../Common/Extract.h" + +#include "../FileManager/ExtractCallback.h" + +/* + RESULT can be S_OK, even if there are errors!!! + if RESULT == S_OK, check extractCallback->IsOK() after ExtractGUI(). + + RESULT = E_ABORT - user break. + RESULT != E_ABORT: + { + messageWasDisplayed = true - message was displayed already. + messageWasDisplayed = false - there was some internal error, so you must show error message. + } +*/ + +HRESULT ExtractGUI( + CCodecs *codecs, + const CIntVector &formatIndices, + UStringVector &archivePaths, + UStringVector &archivePathsFull, + const NWildcard::CCensorNode &wildcardCensor, + CExtractOptions &options, + bool showDialog, + bool &messageWasDisplayed, + CExtractCallbackImp *extractCallback, + HWND hwndParent = NULL); + +#endif diff --git a/CPP/7zip/UI/GUI/ExtractRes.h b/CPP/7zip/UI/GUI/ExtractRes.h new file mode 100644 index 0000000..6219edd --- /dev/null +++ b/CPP/7zip/UI/GUI/ExtractRes.h @@ -0,0 +1,29 @@ +#define IDS_UPDATE_NOT_SUPPORTED 199 +#define IDS_CANNOT_CREATE_FOLDER 200 +#define IDS_OPEN_IS_NOT_SUPORTED_ARCHIVE 201 + +#define IDS_MESSAGES_DIALOG_EXTRACT_MESSAGE_CRC 202 +#define IDS_MESSAGES_DIALOG_EXTRACT_MESSAGE_DATA_ERROR 203 +#define IDS_MESSAGES_DIALOG_EXTRACT_MESSAGE_UNSUPPORTED_METHOD 204 +#define IDS_MESSAGES_DIALOG_EXTRACT_MESSAGE_CRC_ENCRYPTED 205 +#define IDS_MESSAGES_DIALOG_EXTRACT_MESSAGE_DATA_ERROR_ENCRYPTED 206 + +#define IDS_EXTRACT_SET_FOLDER 207 +#define IDS_MESSAGES_DIALOG_EXTRACT_MESSAGE_CANNOT_OPEN_FILE 208 +#define IDS_PROGRESS_EXTRACTING 209 + +#define IDS_CANT_OPEN_ARCHIVE 103 +#define IDS_CANT_OPEN_ENCRYPTED_ARCHIVE 104 +#define IDS_MEM_ERROR 105 +#define IDS_UNKNOWN_ERROR 106 +#define IDS_UNSUPPORTED_ARCHIVE_TYPE 107 + +#define IDC_EXTRACT_RADIO_FULL_PATHNAMES 1041 +#define IDC_EXTRACT_RADIO_CURRENT_PATHNAMES 1042 +#define IDC_EXTRACT_RADIO_NO_PATHNAMES 1043 + +#define IDC_EXTRACT_RADIO_ASK_BEFORE_OVERWRITE 1051 +#define IDC_EXTRACT_RADIO_OVERWRITE_WITHOUT_PROMPT 1052 +#define IDC_EXTRACT_RADIO_SKIP_EXISTING_FILES 1053 +#define IDC_EXTRACT_RADIO_AUTO_RENAME 1056 +#define IDC_EXTRACT_RADIO_AUTO_RENAME_EXISTING 1057 diff --git a/CPP/7zip/UI/GUI/GUI.cpp b/CPP/7zip/UI/GUI/GUI.cpp new file mode 100644 index 0000000..63b8c3c --- /dev/null +++ b/CPP/7zip/UI/GUI/GUI.cpp @@ -0,0 +1,321 @@ +// GUI.cpp + +#include "StdAfx.h" + +#include + +#include "../../../../C/Alloc.h" + +#include "Common/CommandLineParser.h" +#include "Common/MyException.h" +#include "Common/NewHandler.h" +#include "Common/StringConvert.h" + +#include "Windows/Error.h" +#ifdef _WIN32 +#include "Windows/MemoryLock.h" +#endif + +#include "../Common/ArchiveCommandLine.h" +#include "../Common/ExitCode.h" + +#include "../FileManager/StringUtils.h" + +#include "BenchmarkDialog.h" +#include "ExtractGUI.h" +#include "UpdateGUI.h" + +#include "Windows/FileDir.h" // FIXME + +#include "ExtractRes.h" + +using namespace NWindows; + +HINSTANCE g_hInstance; +#ifndef _UNICODE +bool g_IsNT = false; +#endif + +static void ErrorMessage(LPCWSTR message) +{ + MessageBoxW(NULL, message, L"7-Zip", MB_ICONERROR | MB_OK); +} + +static void ErrorLangMessage(UINT resourceID, UInt32 langID) +{ + ErrorMessage(LangString(resourceID, langID)); +} + +static const char *kNoFormats = "7-Zip cannot find the code that works with archives."; + +static int ShowMemErrorMessage() +{ + ErrorLangMessage(IDS_MEM_ERROR, 0x0200060B); + return NExitCode::kMemoryError; +} + +static int ShowSysErrorMessage(DWORD errorCode) +{ + if (errorCode == E_OUTOFMEMORY) + return ShowMemErrorMessage(); + ErrorMessage(HResultToMessage(errorCode)); + return NExitCode::kFatalError; +} + +int Main2(int argc,TCHAR **argv) +{ + UStringVector commandStrings; + #ifdef _WIN32 + NCommandLineParser::SplitCommandLine(GetCommandLineW(), commandStrings); + #else + extern void mySplitCommandLineW(int numArguments,TCHAR **arguments,UStringVector &parts); + mySplitCommandLineW(argc,argv,commandStrings); + #endif + + #ifndef UNDER_CE + if (commandStrings.Size() > 0) + commandStrings.Delete(0); + #endif + if (commandStrings.Size() == 0) + { + MessageBoxW(0, L"Specify command", L"7-Zip", 0); + return 0; + } + +/* + { + CSysString resultPath; + NWindows::NFile::NDirectory::MyGetCurrentDirectory(resultPath); + + ::MessageBoxW(0, resultPath, L"7-Zip - curDir", 0); + } +*/ + + CArchiveCommandLineOptions options; + CArchiveCommandLineParser parser; + + parser.Parse1(commandStrings, options); + parser.Parse2(options); + + #if defined(_WIN32) && defined(_7ZIP_LARGE_PAGES) + if (options.LargePages) + NSecurity::EnableLockMemoryPrivilege(); + #endif + + CCodecs *codecs = new CCodecs; + CMyComPtr compressCodecsInfo = codecs; + HRESULT result = codecs->Load(); + if (result != S_OK) + throw CSystemException(result); + + bool isExtractGroupCommand = options.Command.IsFromExtractGroup(); + if (codecs->Formats.Size() == 0 && + (isExtractGroupCommand || + options.Command.IsFromUpdateGroup())) + throw kNoFormats; + + CIntVector formatIndices; + if (!codecs->FindFormatForArchiveType(options.ArcType, formatIndices)) + { + ErrorLangMessage(IDS_UNSUPPORTED_ARCHIVE_TYPE, 0x0200060D); + return NExitCode::kFatalError; + } + + if (options.Command.CommandType == NCommandType::kBenchmark) + { + HRESULT res; + #ifdef EXTERNAL_CODECS + CObjectVector externalCodecs; + res = LoadExternalCodecs(codecs, externalCodecs); + if (res != S_OK) + throw CSystemException(res); + #endif + res = Benchmark( + #ifdef EXTERNAL_CODECS + codecs, &externalCodecs, + #endif + options.NumThreads, options.DictionarySize); + if (res != S_OK) + throw CSystemException(res); + } + else if (isExtractGroupCommand) + { + CExtractCallbackImp *ecs = new CExtractCallbackImp; + CMyComPtr extractCallback = ecs; + + #ifndef _NO_CRYPTO + ecs->PasswordIsDefined = options.PasswordEnabled; + ecs->Password = options.Password; + #endif + + ecs->Init(); + + CExtractOptions eo; + eo.StdOutMode = options.StdOutMode; + eo.OutputDir = options.OutputDir; + eo.YesToAll = options.YesToAll; + eo.OverwriteMode = options.OverwriteMode; + eo.PathMode = options.Command.GetPathMode(); + eo.TestMode = options.Command.IsTestMode(); + eo.CalcCrc = options.CalcCrc; + #if !defined(_7ZIP_ST) && !defined(_SFX) + eo.Properties = options.ExtractProperties; + #endif + + bool messageWasDisplayed = false; + HRESULT result = ExtractGUI(codecs, formatIndices, + options.ArchivePathsSorted, + options.ArchivePathsFullSorted, + options.WildcardCensor.Pairs.Front().Head, + eo, options.ShowDialog, messageWasDisplayed, ecs); + if (result != S_OK) + { + if (result != E_ABORT && messageWasDisplayed) + return NExitCode::kFatalError; + throw CSystemException(result); + } + if (!ecs->IsOK()) + return NExitCode::kFatalError; + } + else if (options.Command.IsFromUpdateGroup()) + { + #ifndef _NO_CRYPTO + bool passwordIsDefined = options.PasswordEnabled && !options.Password.IsEmpty(); + #endif + + CUpdateCallbackGUI callback; + // callback.EnablePercents = options.EnablePercents; + + #ifndef _NO_CRYPTO + callback.PasswordIsDefined = passwordIsDefined; + callback.AskPassword = options.PasswordEnabled && options.Password.IsEmpty(); + callback.Password = options.Password; + #endif + + // callback.StdOutMode = options.UpdateOptions.StdOutMode; + callback.Init(); + + if (!options.UpdateOptions.Init(codecs, formatIndices, options.ArchiveName)) + { + ErrorLangMessage(IDS_UPDATE_NOT_SUPPORTED, 0x02000601); + return NExitCode::kFatalError; + } + bool messageWasDisplayed = false; + HRESULT result = UpdateGUI( + codecs, + options.WildcardCensor, options.UpdateOptions, + options.ShowDialog, + messageWasDisplayed, &callback); + + if (result != S_OK) + { + if (result != E_ABORT && messageWasDisplayed) + return NExitCode::kFatalError; + throw CSystemException(result); + } + if (callback.FailedFiles.Size() > 0) + { + if (!messageWasDisplayed) + throw CSystemException(E_FAIL); + return NExitCode::kWarning; + } + } + else + { + throw "Unsupported command"; + } + return 0; +} + +#define NT_CHECK_FAIL_ACTION ErrorMessage(L"Unsupported Windows version"); return NExitCode::kFatalError; + +#ifdef _WIN32 +int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE /* hPrevInstance */, + #ifdef UNDER_CE + LPWSTR + #else + LPSTR + #endif + /* lpCmdLine */, int /* nCmdShow */) +{ + g_hInstance = hInstance; + #ifdef _WIN32 + SetLargePageSize(); + #endif + + InitCommonControls(); + + ReloadLang(); + + // setlocale(LC_COLLATE, ".ACP"); + try + { + return Main2(); + } +#else +int Main1(int argc,TCHAR **argv) +{ + ReloadLangSmart(); // ReloadLang(); + + + // under MacOSX, a bundle does not keep the current directory + // between 7zFM and 7zG ... + // So, try to use the environment variable P7ZIP_CURRENT_DIR + const char *p7zip_current_dir = getenv("P7ZIP_CURRENT_DIR"); + + if (p7zip_current_dir) + { + UString currentDir = MultiByteToUnicodeString(p7zip_current_dir); + + NWindows::NFile::NDirectory::MySetCurrentDirectory(currentDir); + } + + + // setlocale(LC_COLLATE, ".ACP"); + try + { + return Main2(argc,argv); + } +#endif + catch(const CNewException &) + { + return ShowMemErrorMessage(); + } + catch(const CArchiveCommandLineException &e) + { + ErrorMessage(GetUnicodeString(e)); + return NExitCode::kUserError; + } + catch(const CSystemException &systemError) + { + if (systemError.ErrorCode == E_ABORT) + return NExitCode::kUserBreak; + return ShowSysErrorMessage(systemError.ErrorCode); + } + catch(const UString &s) + { + ErrorMessage(s); + return NExitCode::kFatalError; + } + catch(const AString &s) + { + ErrorMessage(GetUnicodeString(s)); + return NExitCode::kFatalError; + } + catch(const wchar_t *s) + { + ErrorMessage(s); + return NExitCode::kFatalError; + } + catch(const char *s) + { + ErrorMessage(GetUnicodeString(s)); + return NExitCode::kFatalError; + } + catch(...) + { + ErrorLangMessage(IDS_UNKNOWN_ERROR, 0x0200060C); + return NExitCode::kFatalError; + } +} + diff --git a/CPP/7zip/UI/GUI/UpdateCallbackGUI.cpp b/CPP/7zip/UI/GUI/UpdateCallbackGUI.cpp new file mode 100644 index 0000000..8ec0186 --- /dev/null +++ b/CPP/7zip/UI/GUI/UpdateCallbackGUI.cpp @@ -0,0 +1,228 @@ +// UpdateCallbackGUI.cpp + +#include "StdAfx.h" + +#include "Common/IntToString.h" +#include "Common/StringConvert.h" + +#include "Windows/Error.h" +#include "Windows/PropVariant.h" + +#include "../FileManager/PasswordDialog.h" + +#include "UpdateCallbackGUI.h" + +using namespace NWindows; + +CUpdateCallbackGUI::~CUpdateCallbackGUI() {} + +void CUpdateCallbackGUI::Init() +{ + FailedFiles.Clear(); + NumFiles = 0; +} + +void CUpdateCallbackGUI::AddErrorMessage(LPCWSTR message) +{ + ProgressDialog->Sync.AddErrorMessage(message); +} + +void CUpdateCallbackGUI::AddErrorMessage(const wchar_t *name, DWORD systemError) +{ + AddErrorMessage( + UString(L"WARNING: ") + + NError::MyFormatMessageW(systemError) + + UString(L": ") + + UString(name)); +} + +HRESULT CUpdateCallbackGUI::OpenResult(const wchar_t *name, HRESULT result) +{ + if (result != S_OK) + { + AddErrorMessage (UString(L"Error: ") + name + UString(L" is not supported archive")); + } + return S_OK; +} + +HRESULT CUpdateCallbackGUI::StartScanning() +{ + return S_OK; +} + +HRESULT CUpdateCallbackGUI::CanNotFindError(const wchar_t *name, DWORD systemError) +{ + FailedFiles.Add(name); + AddErrorMessage(name, systemError); + return S_OK; +} + +HRESULT CUpdateCallbackGUI::FinishScanning() +{ + return S_OK; +} + +HRESULT CUpdateCallbackGUI::StartArchive(const wchar_t *name, bool /* updating */) +{ + ProgressDialog->Sync.SetTitleFileName(name); + return S_OK; +} + +HRESULT CUpdateCallbackGUI::FinishArchive() +{ + return S_OK; +} + +HRESULT CUpdateCallbackGUI::CheckBreak() +{ + return ProgressDialog->Sync.ProcessStopAndPause(); +} + +HRESULT CUpdateCallbackGUI::ScanProgress(UInt64 /* numFolders */, UInt64 numFiles, const wchar_t *path) +{ + ProgressDialog->Sync.SetCurrentFileName(path); + ProgressDialog->Sync.SetNumFilesTotal(numFiles); + return ProgressDialog->Sync.ProcessStopAndPause(); +} + +HRESULT CUpdateCallbackGUI::Finilize() +{ + return S_OK; +} + +HRESULT CUpdateCallbackGUI::SetNumFiles(UInt64 numFiles) +{ + ProgressDialog->Sync.SetNumFilesTotal(numFiles); + return S_OK; +} + +HRESULT CUpdateCallbackGUI::SetTotal(UInt64 total) +{ + ProgressDialog->Sync.SetProgress(total, 0); + return S_OK; +} + +HRESULT CUpdateCallbackGUI::SetCompleted(const UInt64 *completeValue) +{ + RINOK(CheckBreak()); + if (completeValue != NULL) + ProgressDialog->Sync.SetPos(*completeValue); + return S_OK; +} + +HRESULT CUpdateCallbackGUI::SetRatioInfo(const UInt64 *inSize, const UInt64 *outSize) +{ + RINOK(CheckBreak()); + ProgressDialog->Sync.SetRatioInfo(inSize, outSize); + return S_OK; +} + +HRESULT CUpdateCallbackGUI::GetStream(const wchar_t *name, bool /* isAnti */) +{ + ProgressDialog->Sync.SetCurrentFileName(name); + return S_OK; +} + +HRESULT CUpdateCallbackGUI::OpenFileError(const wchar_t *name, DWORD systemError) +{ + FailedFiles.Add(name); + // if (systemError == ERROR_SHARING_VIOLATION) + { + AddErrorMessage(name, systemError); + return S_FALSE; + } + // return systemError; +} + +HRESULT CUpdateCallbackGUI::SetOperationResult(Int32 /* operationResult */) +{ + NumFiles++; + ProgressDialog->Sync.SetNumFilesCur(NumFiles); + return S_OK; +} + +HRESULT CUpdateCallbackGUI::CryptoGetTextPassword2(Int32 *passwordIsDefined, BSTR *password) +{ + *password = NULL; + if (!PasswordIsDefined) + { + if (passwordIsDefined == 0 || AskPassword) + { + CPasswordDialog dialog; + ProgressDialog->WaitCreating(); + if (dialog.Create(*ProgressDialog) == IDCANCEL) + return E_ABORT; + Password = dialog.Password; + PasswordIsDefined = true; + } + } + if (passwordIsDefined != 0) + *passwordIsDefined = BoolToInt(PasswordIsDefined); + return StringToBstr(Password, password); +} + +HRESULT CUpdateCallbackGUI::CryptoGetTextPassword(BSTR *password) +{ + return CryptoGetTextPassword2(NULL, password); +} + +/* +It doesn't work, since main stream waits Dialog +HRESULT CUpdateCallbackGUI::CloseProgress() +{ + ProgressDialog->MyClose(); + return S_OK; +} +*/ + + +HRESULT CUpdateCallbackGUI::Open_CheckBreak() +{ + return ProgressDialog->Sync.ProcessStopAndPause(); +} + +HRESULT CUpdateCallbackGUI::Open_SetTotal(const UInt64 * /* numFiles */, const UInt64 * /* numBytes */) +{ + // if (numFiles != NULL) ProgressDialog->Sync.SetNumFilesTotal(*numFiles); + return S_OK; +} + +HRESULT CUpdateCallbackGUI::Open_SetCompleted(const UInt64 * /* numFiles */, const UInt64 * /* numBytes */) +{ + return ProgressDialog->Sync.ProcessStopAndPause(); +} + +#ifndef _NO_CRYPTO + +HRESULT CUpdateCallbackGUI::Open_CryptoGetTextPassword(BSTR *password) +{ + PasswordWasAsked = true; + return CryptoGetTextPassword2(NULL, password); +} + +HRESULT CUpdateCallbackGUI::Open_GetPasswordIfAny(UString &password) +{ + if (PasswordIsDefined) + password = Password; + return S_OK; +} + +bool CUpdateCallbackGUI::Open_WasPasswordAsked() +{ + return PasswordWasAsked; +} + +void CUpdateCallbackGUI::Open_ClearPasswordWasAskedFlag() +{ + PasswordWasAsked = false; +} + +/* +HRESULT CUpdateCallbackGUI::ShowDeleteFile(const wchar_t *name) +{ + ProgressDialog->Sync.SetCurrentFileName(name); + return S_OK; +} +*/ + +#endif diff --git a/CPP/7zip/UI/GUI/UpdateCallbackGUI.h b/CPP/7zip/UI/GUI/UpdateCallbackGUI.h new file mode 100644 index 0000000..b5ca154 --- /dev/null +++ b/CPP/7zip/UI/GUI/UpdateCallbackGUI.h @@ -0,0 +1,41 @@ +// UpdateCallbackGUI.h + +#ifndef __UPDATE_CALLBACK_GUI_H +#define __UPDATE_CALLBACK_GUI_H + +#include "../Common/Update.h" +#include "../Common/ArchiveOpenCallback.h" +#include "../FileManager/ProgressDialog2.h" + +class CUpdateCallbackGUI: + public IOpenCallbackUI, + public IUpdateCallbackUI2 +{ +public: + bool PasswordIsDefined; + UString Password; + bool AskPassword; + bool PasswordWasAsked; + UInt64 NumFiles; + + CUpdateCallbackGUI(): + PasswordIsDefined(false), + PasswordWasAsked(false), + AskPassword(false) + {} + + ~CUpdateCallbackGUI(); + void Init(); + + INTERFACE_IUpdateCallbackUI2(;) + INTERFACE_IOpenCallbackUI(;) + + UStringVector FailedFiles; + + CProgressDialog *ProgressDialog; + + void AddErrorMessage(LPCWSTR message); + void AddErrorMessage(const wchar_t *name, DWORD systemError); +}; + +#endif diff --git a/CPP/7zip/UI/GUI/UpdateGUI.cpp b/CPP/7zip/UI/GUI/UpdateGUI.cpp new file mode 100644 index 0000000..7ee74fc --- /dev/null +++ b/CPP/7zip/UI/GUI/UpdateGUI.cpp @@ -0,0 +1,399 @@ +// UpdateGUI.cpp + +#include "StdAfx.h" + +#include "UpdateGUI.h" + +#include "Common/IntToString.h" +#include "Common/StringConvert.h" +#include "Common/StringToInt.h" + +#include "Windows/Error.h" +#include "Windows/FileDir.h" +#include "Windows/Thread.h" + +#include "../Common/WorkDir.h" + +#include "../Explorer/MyMessages.h" + +#include "../FileManager/LangUtils.h" +#include "../FileManager/ProgramLocation.h" +#include "../FileManager/StringUtils.h" +#include "../FileManager/resourceGui.h" + +#include "CompressDialog.h" +#include "UpdateGUI.h" + +#include "resource2.h" + +using namespace NWindows; +using namespace NFile; + +static const wchar_t *kDefaultSfxModule = L"7z.sfx"; +static const wchar_t *kSFXExtension = L"exe"; + +extern void AddMessageToString(UString &dest, const UString &src); + +UString HResultToMessage(HRESULT errorCode); + +class CThreadUpdating: public CProgressThreadVirt +{ + HRESULT ProcessVirt(); +public: + CCodecs *codecs; + CUpdateCallbackGUI *UpdateCallbackGUI; + const NWildcard::CCensor *WildcardCensor; + CUpdateOptions *Options; +}; + +HRESULT CThreadUpdating::ProcessVirt() +{ + CUpdateErrorInfo ei; + HRESULT res = UpdateArchive(codecs, *WildcardCensor, *Options, + ei, UpdateCallbackGUI, UpdateCallbackGUI); + ErrorMessage = ei.Message; + ErrorPath1 = ei.FileName; + ErrorPath2 = ei.FileName2; + if (ei.SystemError != S_OK && ei.SystemError != E_FAIL && ei.SystemError != E_ABORT) + return ei.SystemError; + return res; +} + +static void AddProp(CObjectVector &properties, const UString &name, const UString &value) +{ + CProperty prop; + prop.Name = name; + prop.Value = value; + properties.Add(prop); +} + +static void AddProp(CObjectVector &properties, const UString &name, UInt32 value) +{ + wchar_t tmp[32]; + ConvertUInt64ToString(value, tmp); + AddProp(properties, name, tmp); +} + +static void AddProp(CObjectVector &properties, const UString &name, bool value) +{ + AddProp(properties, name, value ? UString(L"on"): UString(L"off")); +} + +static bool IsThereMethodOverride(bool is7z, const UString &propertiesString) +{ + UStringVector strings; + SplitString(propertiesString, strings); + for (int i = 0; i < strings.Size(); i++) + { + const UString &s = strings[i]; + if (is7z) + { + const wchar_t *end; + UInt64 n = ConvertStringToUInt64(s, &end); + if (n == 0 && *end == L'=') + return true; + } + else + { + if (s.Length() > 0) + if (s[0] == L'm' && s[1] == L'=') + return true; + } + } + return false; +} + +static void ParseAndAddPropertires(CObjectVector &properties, + const UString &propertiesString) +{ + UStringVector strings; + SplitString(propertiesString, strings); + for (int i = 0; i < strings.Size(); i++) + { + const UString &s = strings[i]; + CProperty property; + int index = s.Find(L'='); + if (index < 0) + property.Name = s; + else + { + property.Name = s.Left(index); + property.Value = s.Mid(index + 1); + } + properties.Add(property); + } +} + +static UString GetNumInBytesString(UInt64 v) +{ + wchar_t s[32]; + ConvertUInt64ToString(v, s); + size_t len = wcslen(s); + s[len++] = L'B'; + s[len] = L'\0'; + return s; +} + +static void SetOutProperties( + CObjectVector &properties, + bool is7z, + UInt32 level, + bool setMethod, + const UString &method, + UInt32 dictionary, + bool orderMode, + UInt32 order, + bool solidIsSpecified, UInt64 solidBlockSize, + bool multiThreadIsAllowed, UInt32 numThreads, + const UString &encryptionMethod, + bool encryptHeadersIsAllowed, bool encryptHeaders, + bool /* sfxMode */) +{ + if (level != (UInt32)(Int32)-1) + AddProp(properties, L"x", (UInt32)level); + if (setMethod) + { + if (!method.IsEmpty()) + AddProp(properties, is7z ? L"0": L"m", method); + if (dictionary != (UInt32)(Int32)-1) + { + UString name; + if (is7z) + name = L"0"; + if (orderMode) + name += L"mem"; + else + name += L"d"; + AddProp(properties, name, GetNumInBytesString(dictionary)); + } + if (order != (UInt32)(Int32)-1) + { + UString name; + if (is7z) + name = L"0"; + if (orderMode) + name += L"o"; + else + name += L"fb"; + AddProp(properties, name, (UInt32)order); + } + } + + if (!encryptionMethod.IsEmpty()) + AddProp(properties, L"em", encryptionMethod); + + if (encryptHeadersIsAllowed) + AddProp(properties, L"he", encryptHeaders); + if (solidIsSpecified) + AddProp(properties, L"s", GetNumInBytesString(solidBlockSize)); + if (multiThreadIsAllowed) + AddProp(properties, L"mt", numThreads); +} + +static HRESULT ShowDialog( + CCodecs *codecs, + const NWildcard::CCensor &censor, + CUpdateOptions &options, CUpdateCallbackGUI *callback, HWND hwndParent) +{ + if (options.Commands.Size() != 1) + throw "It must be one command"; + UString currentDirPrefix; + #ifndef UNDER_CE + { + if (!NDirectory::MyGetCurrentDirectory(currentDirPrefix)) + return E_FAIL; + NName::NormalizeDirPathPrefix(currentDirPrefix); + } + #endif + + bool oneFile = false; + NFind::CFileInfoW fileInfo; + UString name; + if (censor.Pairs.Size() > 0) + { + const NWildcard::CPair &pair = censor.Pairs[0]; + if (pair.Head.IncludeItems.Size() > 0) + { + const NWildcard::CItem &item = pair.Head.IncludeItems[0]; + if (item.ForFile) + { + name = pair.Prefix; + for (int i = 0; i < item.PathParts.Size(); i++) + { + if (i > 0) + name += WCHAR_PATH_SEPARATOR; + name += item.PathParts[i]; + } + if (fileInfo.Find(name)) + { + if (censor.Pairs.Size() == 1 && pair.Head.IncludeItems.Size() == 1) + oneFile = !fileInfo.IsDir(); + } + } + } + } + + CCompressDialog dialog; + NCompressDialog::CInfo &di = dialog.Info; + dialog.ArcFormats = &codecs->Formats; + for (int i = 0; i < codecs->Formats.Size(); i++) + { + const CArcInfoEx &ai = codecs->Formats[i]; + if (ai.Name.CompareNoCase(L"swfc") == 0) + if (!oneFile || name.Right(4).CompareNoCase(L".swf") != 0) + continue; + if (ai.UpdateEnabled && (oneFile || !ai.KeepName)) + dialog.ArcIndices.Add(i); + } + if (dialog.ArcIndices.Size() == 0) + { + ShowErrorMessage(L"No Update Engines"); + return E_FAIL; + } + + // di.ArchiveName = options.ArchivePath.GetFinalPath(); + di.ArchiveName = options.ArchivePath.GetPathWithoutExt(); + dialog.OriginalFileName = options.ArchivePath.Prefix + fileInfo.Name; + + di.CurrentDirPrefix = currentDirPrefix; + di.SFXMode = options.SfxMode; + di.OpenShareForWrite = options.OpenShareForWrite; + + if (callback->PasswordIsDefined) + di.Password = callback->Password; + + di.KeepName = !oneFile; + + if (dialog.Create(hwndParent) != IDOK) + return E_ABORT; + + options.VolumesSizes = di.VolumeSizes; + /* + if (di.VolumeSizeIsDefined) + { + MyMessageBox(L"Splitting to volumes is not supported"); + return E_FAIL; + } + */ + + NUpdateArchive::CActionSet &actionSet = options.Commands.Front().ActionSet; + + switch(di.UpdateMode) + { + case NCompressDialog::NUpdateMode::kAdd: + actionSet = NUpdateArchive::kAddActionSet; + break; + case NCompressDialog::NUpdateMode::kUpdate: + actionSet = NUpdateArchive::kUpdateActionSet; + break; + case NCompressDialog::NUpdateMode::kFresh: + actionSet = NUpdateArchive::kFreshActionSet; + break; + case NCompressDialog::NUpdateMode::kSynchronize: + actionSet = NUpdateArchive::kSynchronizeActionSet; + break; + default: + throw 1091756; + } + const CArcInfoEx &archiverInfo = codecs->Formats[di.FormatIndex]; + callback->PasswordIsDefined = (!di.Password.IsEmpty()); + if (callback->PasswordIsDefined) + callback->Password = di.Password; + + options.MethodMode.Properties.Clear(); + + bool is7z = archiverInfo.Name.CompareNoCase(L"7z") == 0; + bool methodOverride = IsThereMethodOverride(is7z, di.Options); + + SetOutProperties( + options.MethodMode.Properties, + is7z, + di.Level, + !methodOverride, + di.Method, + di.Dictionary, + di.OrderMode, di.Order, + di.SolidIsSpecified, di.SolidBlockSize, + di.MultiThreadIsAllowed, di.NumThreads, + di.EncryptionMethod, + di.EncryptHeadersIsAllowed, di.EncryptHeaders, + di.SFXMode); + + options.OpenShareForWrite = di.OpenShareForWrite; + ParseAndAddPropertires(options.MethodMode.Properties, di.Options); + + if (di.SFXMode) + options.SfxMode = true; + options.MethodMode.FormatIndex = di.FormatIndex; + + options.ArchivePath.VolExtension = archiverInfo.GetMainExt(); + if (di.SFXMode) + options.ArchivePath.BaseExtension = kSFXExtension; + else + options.ArchivePath.BaseExtension = options.ArchivePath.VolExtension; + options.ArchivePath.ParseFromPath(di.ArchiveName); + + NWorkDir::CInfo workDirInfo; + workDirInfo.Load(); + options.WorkingDir.Empty(); + if (workDirInfo.Mode != NWorkDir::NMode::kCurrent) + { + UString fullPath; + NDirectory::MyGetFullPathName(di.ArchiveName, fullPath); + options.WorkingDir = GetWorkDir(workDirInfo, fullPath); + NDirectory::CreateComplexDirectory(options.WorkingDir); + } + return S_OK; +} + +HRESULT UpdateGUI( + CCodecs *codecs, + const NWildcard::CCensor &censor, + CUpdateOptions &options, + bool showDialog, + bool &messageWasDisplayed, + CUpdateCallbackGUI *callback, + HWND hwndParent) +{ + messageWasDisplayed = false; + if (showDialog) + { + RINOK(ShowDialog(codecs, censor, options, callback, hwndParent)); + } + if (options.SfxMode && options.SfxModule.IsEmpty()) + { + UString folder; + if (!GetProgramFolderPath(folder)) + folder.Empty(); + options.SfxModule = folder + kDefaultSfxModule; + } + + CThreadUpdating tu; + + tu.codecs = codecs; + + tu.UpdateCallbackGUI = callback; + tu.UpdateCallbackGUI->ProgressDialog = &tu.ProgressDialog; + tu.UpdateCallbackGUI->Init(); + + UString title = LangString(IDS_PROGRESS_COMPRESSING, 0x02000DC0); + + /* + if (hwndParent != 0) + { + tu.ProgressDialog.MainWindow = hwndParent; + // tu.ProgressDialog.MainTitle = fileName; + tu.ProgressDialog.MainAddTitle = title + L" "; + } + */ + + tu.WildcardCensor = &censor; + tu.Options = &options; + tu.ProgressDialog.IconID = IDI_ICON; + + RINOK(tu.Create(title, hwndParent)); + + messageWasDisplayed = tu.ThreadFinishedOK & + tu.ProgressDialog.MessagesDisplayed; + return tu.Result; +} diff --git a/CPP/7zip/UI/GUI/UpdateGUI.h b/CPP/7zip/UI/GUI/UpdateGUI.h new file mode 100644 index 0000000..c06ec1e --- /dev/null +++ b/CPP/7zip/UI/GUI/UpdateGUI.h @@ -0,0 +1,31 @@ +// GUI/UpdateGUI.h + +#ifndef __UPDATE_GUI_H +#define __UPDATE_GUI_H + +#include "../Common/Update.h" + +#include "UpdateCallbackGUI.h" + +/* + callback->FailedFiles contains names of files for that there were problems. + RESULT can be S_OK, even if there are such warnings!!! + + RESULT = E_ABORT - user break. + RESULT != E_ABORT: + { + messageWasDisplayed = true - message was displayed already. + messageWasDisplayed = false - there was some internal error, so you must show error message. + } +*/ + +HRESULT UpdateGUI( + CCodecs *codecs, + const NWildcard::CCensor &censor, + CUpdateOptions &options, + bool showDialog, + bool &messageWasDisplayed, + CUpdateCallbackGUI *callback, + HWND hwndParent = NULL); + +#endif diff --git a/CPP/7zip/UI/GUI/err b/CPP/7zip/UI/GUI/err new file mode 100644 index 0000000..1d354ef --- /dev/null +++ b/CPP/7zip/UI/GUI/err @@ -0,0 +1,998 @@ +In file included from /usr/include/wx-2.8/wx/platform.h:293, + from /usr/include/wx-2.8/wx/defs.h:21, + from /usr/include/wx-2.8/wx/wxprec.h:13, + from BenchmarkDialog_rc.cpp:11: +/usr/include/wx-2.8/wx/chkconf.h:23:30: error: wx/msw/chkconf.h: No such file or directory +/usr/include/wx-2.8/wx/chkconf.h:95:9: error: #error "wxUSE_CRASHREPORT must be defined." +In file included from /usr/include/wx-2.8/wx/defs.h:21, + from /usr/include/wx-2.8/wx/wxprec.h:13, + from BenchmarkDialog_rc.cpp:11: +/usr/include/wx-2.8/wx/platform.h:540:33: error: wx/msw/libraries.h: No such file or directory +In file included from /usr/include/wx-2.8/wx/wxprec.h:13, + from BenchmarkDialog_rc.cpp:11: +/usr/include/wx-2.8/wx/defs.h:2856:29: error: wx/msw/winundef.h: No such file or directory +BenchmarkDialog_rc.cpp:15:2: error: #error 10 +In file included from /usr/include/wx-2.8/wx/event.h:22, + from /usr/include/wx-2.8/wx/wx.h:25, + from BenchmarkDialog_rc.cpp:25: +/usr/include/wx-2.8/wx/cursor.h:20:31: error: wx/msw/cursor.h: No such file or directory +In file included from /usr/include/wx-2.8/wx/utils.h:21, + from /usr/include/wx-2.8/wx/cursor.h:41, + from /usr/include/wx-2.8/wx/event.h:22, + from /usr/include/wx-2.8/wx/wx.h:25, + from BenchmarkDialog_rc.cpp:25: +/usr/include/wx-2.8/wx/filefn.h:62:24: error: direct.h: No such file or directory +/usr/include/wx-2.8/wx/filefn.h:63:21: error: dos.h: No such file or directory +/usr/include/wx-2.8/wx/filefn.h:64:20: error: io.h: No such file or directory +In file included from /usr/include/wx-2.8/wx/wx.h:26, + from BenchmarkDialog_rc.cpp:25: +/usr/include/wx-2.8/wx/app.h:562:32: error: wx/msw/app.h: No such file or directory +In file included from /usr/include/wx-2.8/wx/window.h:24, + from /usr/include/wx-2.8/wx/wx.h:36, + from BenchmarkDialog_rc.cpp:25: +/usr/include/wx-2.8/wx/font.h:229:29: error: wx/msw/font.h: No such file or directory +In file included from /usr/include/wx-2.8/wx/window.h:25, + from /usr/include/wx-2.8/wx/wx.h:36, + from BenchmarkDialog_rc.cpp:25: +/usr/include/wx-2.8/wx/colour.h:131:31: error: wx/msw/colour.h: No such file or directory +In file included from /usr/include/wx-2.8/wx/window.h:26, + from /usr/include/wx-2.8/wx/wx.h:36, + from BenchmarkDialog_rc.cpp:25: +/usr/include/wx-2.8/wx/region.h:222:31: error: wx/msw/region.h: No such file or directory +In file included from /usr/include/wx-2.8/wx/window.h:33, + from /usr/include/wx-2.8/wx/wx.h:36, + from BenchmarkDialog_rc.cpp:25: +/usr/include/wx-2.8/wx/palette.h:36:32: error: wx/msw/palette.h: No such file or directory +In file included from /usr/include/wx-2.8/wx/window.h:37, + from /usr/include/wx-2.8/wx/wx.h:36, + from BenchmarkDialog_rc.cpp:25: +/usr/include/wx-2.8/wx/accel.h:151:30: error: wx/msw/accel.h: No such file or directory +In file included from /usr/include/wx-2.8/wx/wx.h:36, + from BenchmarkDialog_rc.cpp:25: +/usr/include/wx-2.8/wx/window.h:1462:31: error: wx/msw/window.h: No such file or directory +In file included from /usr/include/wx-2.8/wx/wx.h:39, + from BenchmarkDialog_rc.cpp:25: +/usr/include/wx-2.8/wx/toplevel.h:317:33: error: wx/msw/toplevel.h: No such file or directory +In file included from /usr/include/wx-2.8/wx/wx.h:40, + from BenchmarkDialog_rc.cpp:25: +/usr/include/wx-2.8/wx/frame.h:245:34: error: wx/msw/frame.h: No such file or directory +In file included from /usr/include/wx-2.8/wx/wx.h:44, + from BenchmarkDialog_rc.cpp:25: +/usr/include/wx-2.8/wx/bitmap.h:209:31: error: wx/msw/bitmap.h: No such file or directory +In file included from /usr/include/wx-2.8/wx/dc.h:26, + from /usr/include/wx-2.8/wx/wx.h:48, + from BenchmarkDialog_rc.cpp:25: +/usr/include/wx-2.8/wx/brush.h:34:30: error: wx/msw/brush.h: No such file or directory +In file included from /usr/include/wx-2.8/wx/dc.h:27, + from /usr/include/wx-2.8/wx/wx.h:48, + from BenchmarkDialog_rc.cpp:25: +/usr/include/wx-2.8/wx/pen.h:20:24: error: wx/msw/pen.h: No such file or directory +In file included from /usr/include/wx-2.8/wx/wx.h:48, + from BenchmarkDialog_rc.cpp:25: +/usr/include/wx-2.8/wx/dc.h:859:27: error: wx/msw/dc.h: No such file or directory +In file included from /usr/include/wx-2.8/wx/wx.h:49, + from BenchmarkDialog_rc.cpp:25: +/usr/include/wx-2.8/wx/dcclient.h:20:29: error: wx/msw/dcclient.h: No such file or directory +In file included from /usr/include/wx-2.8/wx/wx.h:50, + from BenchmarkDialog_rc.cpp:25: +/usr/include/wx-2.8/wx/dcmemory.h:54:29: error: wx/msw/dcmemory.h: No such file or directory +In file included from /usr/include/wx-2.8/wx/wx.h:51, + from BenchmarkDialog_rc.cpp:25: +/usr/include/wx-2.8/wx/dcprint.h:22:28: error: wx/msw/dcprint.h: No such file or directory +In file included from /usr/include/wx-2.8/wx/wx.h:52, + from BenchmarkDialog_rc.cpp:25: +/usr/include/wx-2.8/wx/dcscreen.h:20:29: error: wx/msw/dcscreen.h: No such file or directory +In file included from /usr/include/wx-2.8/wx/button.h:46, + from /usr/include/wx-2.8/wx/wx.h:53, + from BenchmarkDialog_rc.cpp:25: +/usr/include/wx-2.8/wx/control.h:99:32: error: wx/msw/control.h: No such file or directory +In file included from /usr/include/wx-2.8/wx/wx.h:53, + from BenchmarkDialog_rc.cpp:25: +/usr/include/wx-2.8/wx/button.h:86:31: error: wx/msw/button.h: No such file or directory +In file included from /usr/include/wx-2.8/wx/wx.h:54, + from BenchmarkDialog_rc.cpp:25: +/usr/include/wx-2.8/wx/menuitem.h:184:33: error: wx/msw/menuitem.h: No such file or directory +In file included from /usr/include/wx-2.8/wx/wx.h:55, + from BenchmarkDialog_rc.cpp:25: +/usr/include/wx-2.8/wx/menu.h:536:29: error: wx/msw/menu.h: No such file or directory +In file included from /usr/include/wx-2.8/wx/wx.h:59, + from BenchmarkDialog_rc.cpp:25: +/usr/include/wx-2.8/wx/icon.h:20:27: error: wx/msw/icon.h: No such file or directory +In file included from /usr/include/wx-2.8/wx/wx.h:61, + from BenchmarkDialog_rc.cpp:25: +/usr/include/wx-2.8/wx/dialog.h:150:35: error: wx/msw/dialog.h: No such file or directory +In file included from /usr/include/wx-2.8/wx/wx.h:62, + from BenchmarkDialog_rc.cpp:25: +/usr/include/wx-2.8/wx/timer.h:114:30: error: wx/msw/timer.h: No such file or directory +In file included from /usr/include/wx-2.8/wx/wx.h:64, + from BenchmarkDialog_rc.cpp:25: +/usr/include/wx-2.8/wx/msgdlg.h:49:27: error: wx/msw/msgdlg.h: No such file or directory +In file included from /usr/include/wx-2.8/wx/wx.h:66, + from BenchmarkDialog_rc.cpp:25: +/usr/include/wx-2.8/wx/dataobj.h:76:37: error: wx/msw/ole/dataform.h: No such file or directory +/usr/include/wx-2.8/wx/dataobj.h:164:36: error: wx/msw/ole/dataobj.h: No such file or directory +/usr/include/wx-2.8/wx/dataobj.h:504:37: error: wx/msw/ole/dataobj2.h: No such file or directory +In file included from /usr/include/wx-2.8/wx/wx.h:70, + from BenchmarkDialog_rc.cpp:25: +/usr/include/wx-2.8/wx/bmpbuttn.h:105:33: error: wx/msw/bmpbuttn.h: No such file or directory +In file included from /usr/include/wx-2.8/wx/wx.h:71, + from BenchmarkDialog_rc.cpp:25: +/usr/include/wx-2.8/wx/checkbox.h:136:33: error: wx/msw/checkbox.h: No such file or directory +In file included from /usr/include/wx-2.8/wx/checklst.h:17, + from /usr/include/wx-2.8/wx/wx.h:72, + from BenchmarkDialog_rc.cpp:25: +/usr/include/wx-2.8/wx/listbox.h:148:32: error: wx/msw/listbox.h: No such file or directory +In file included from /usr/include/wx-2.8/wx/wx.h:72, + from BenchmarkDialog_rc.cpp:25: +/usr/include/wx-2.8/wx/checklst.h:46:33: error: wx/msw/checklst.h: No such file or directory +In file included from /usr/include/wx-2.8/wx/wx.h:73, + from BenchmarkDialog_rc.cpp:25: +/usr/include/wx-2.8/wx/choice.h:71:31: error: wx/msw/choice.h: No such file or directory +In file included from /usr/include/wx-2.8/wx/wx.h:74, + from BenchmarkDialog_rc.cpp:25: +/usr/include/wx-2.8/wx/scrolbar.h:62:33: error: wx/msw/scrolbar.h: No such file or directory +In file included from /usr/include/wx-2.8/wx/wx.h:75, + from BenchmarkDialog_rc.cpp:25: +/usr/include/wx-2.8/wx/stattext.h:49:33: error: wx/msw/stattext.h: No such file or directory +In file included from /usr/include/wx-2.8/wx/wx.h:76, + from BenchmarkDialog_rc.cpp:25: +/usr/include/wx-2.8/wx/statbmp.h:56:32: error: wx/msw/statbmp.h: No such file or directory +In file included from /usr/include/wx-2.8/wx/wx.h:77, + from BenchmarkDialog_rc.cpp:25: +/usr/include/wx-2.8/wx/statbox.h:56:32: error: wx/msw/statbox.h: No such file or directory +In file included from /usr/include/wx-2.8/wx/wx.h:79, + from BenchmarkDialog_rc.cpp:25: +/usr/include/wx-2.8/wx/radiobox.h:161:33: error: wx/msw/radiobox.h: No such file or directory +In file included from /usr/include/wx-2.8/wx/wx.h:80, + from BenchmarkDialog_rc.cpp:25: +/usr/include/wx-2.8/wx/radiobut.h:41:33: error: wx/msw/radiobut.h: No such file or directory +In file included from /usr/include/wx-2.8/wx/wx.h:81, + from BenchmarkDialog_rc.cpp:25: +/usr/include/wx-2.8/wx/textctrl.h:473:33: error: wx/msw/textctrl.h: No such file or directory +In file included from /usr/include/wx-2.8/wx/wx.h:82, + from BenchmarkDialog_rc.cpp:25: +/usr/include/wx-2.8/wx/slider.h:128:33: error: wx/msw/slider95.h: No such file or directory +In file included from /usr/include/wx-2.8/wx/wx.h:83, + from BenchmarkDialog_rc.cpp:25: +/usr/include/wx-2.8/wx/gauge.h:107:32: error: wx/msw/gauge95.h: No such file or directory +In file included from /usr/include/wx-2.8/wx/wx.h:85, + from BenchmarkDialog_rc.cpp:25: +/usr/include/wx-2.8/wx/dirdlg.h:102:36: error: wx/generic/dirdlgg.h: No such file or directory +In file included from /usr/include/wx-2.8/wx/wx.h:86, + from BenchmarkDialog_rc.cpp:25: +/usr/include/wx-2.8/wx/toolbar.h:74:34: error: wx/msw/tbar95.h: No such file or directory +In file included from /usr/include/wx-2.8/wx/wx.h:87, + from BenchmarkDialog_rc.cpp:25: +/usr/include/wx-2.8/wx/combobox.h:79:33: error: wx/msw/combobox.h: No such file or directory +In file included from /usr/include/wx-2.8/wx/wx.h:90, + from BenchmarkDialog_rc.cpp:25: +/usr/include/wx-2.8/wx/mdi.h:22:28: error: wx/msw/mdi.h: No such file or directory +In file included from /usr/include/wx-2.8/wx/wx.h:91, + from BenchmarkDialog_rc.cpp:25: +/usr/include/wx-2.8/wx/statusbr.h:159:33: error: wx/msw/statbr95.h: No such file or directory +In file included from /usr/include/wx-2.8/wx/wx.h:94, + from BenchmarkDialog_rc.cpp:25: +/usr/include/wx-2.8/wx/filedlg.h:206:28: error: wx/msw/filedlg.h: No such file or directory +BenchmarkDialog_rc.cpp:30:2: error: #error 100 +In file included from /usr/include/wx-2.8/wx/wxprec.h:13, + from BenchmarkDialog_rc.cpp:11: +/usr/include/wx-2.8/wx/defs.h:2581: error: conflicting declaration ‘typedef void* WXHICON’ +/usr/include/wx-2.8/wx/defs.h:2390: error: ‘WXHICON’ has a previous declaration as ‘typedef struct wxOpaqueCIconHandle* WXHICON’ +/usr/include/wx-2.8/wx/defs.h:2600: error: conflicting declaration ‘typedef long unsigned int WXCOLORREF’ +/usr/include/wx-2.8/wx/defs.h:2372: error: ‘WXCOLORREF’ has a previous declaration as ‘typedef unsigned char WXCOLORREF [6]’ +/usr/include/wx-2.8/wx/defs.h:2611: error: conflicting declaration ‘typedef void* WXWidget’ +/usr/include/wx-2.8/wx/defs.h:2396: error: ‘WXWidget’ has a previous declaration as ‘typedef struct wxOpaqueControlRef* WXWidget’ +/usr/include/wx-2.8/wx/defs.h:2626: error: expected `)' before ‘*’ token +In file included from /usr/include/wx-2.8/wx/event.h:22, + from /usr/include/wx-2.8/wx/wx.h:25, + from BenchmarkDialog_rc.cpp:25: +/usr/include/wx-2.8/wx/cursor.h: In destructor ‘wxBusyCursorSuspender::~wxBusyCursorSuspender()’: +/usr/include/wx-2.8/wx/cursor.h:74: error: invalid use of incomplete type ‘const struct wxCursor’ +/usr/include/wx-2.8/wx/gdicmn.h:33: error: forward declaration of ‘const struct wxCursor’ +In file included from /usr/include/wx-2.8/wx/wx.h:25, + from BenchmarkDialog_rc.cpp:25: +/usr/include/wx-2.8/wx/event.h: At global scope: +/usr/include/wx-2.8/wx/event.h:921: error: field ‘m_cursor’ has incomplete type +/usr/include/wx-2.8/wx/event.h: In constructor ‘wxSetCursorEvent::wxSetCursorEvent(wxCoord, wxCoord)’: +/usr/include/wx-2.8/wx/event.h:900: error: class ‘wxSetCursorEvent’ does not have any field named ‘m_cursor’ +/usr/include/wx-2.8/wx/event.h: In copy constructor ‘wxSetCursorEvent::wxSetCursorEvent(const wxSetCursorEvent&)’: +/usr/include/wx-2.8/wx/event.h:907: error: class ‘wxSetCursorEvent’ does not have any field named ‘m_cursor’ +/usr/include/wx-2.8/wx/event.h:907: error: ‘const class wxSetCursorEvent’ has no member named ‘m_cursor’ +/usr/include/wx-2.8/wx/event.h: In member function ‘void wxSetCursorEvent::SetCursor(const wxCursor&)’: +/usr/include/wx-2.8/wx/event.h:913: error: ‘m_cursor’ was not declared in this scope +/usr/include/wx-2.8/wx/event.h: In member function ‘const wxCursor& wxSetCursorEvent::GetCursor() const’: +/usr/include/wx-2.8/wx/event.h:914: error: ‘m_cursor’ was not declared in this scope +/usr/include/wx-2.8/wx/event.h: In member function ‘bool wxSetCursorEvent::HasCursor() const’: +/usr/include/wx-2.8/wx/event.h:915: error: ‘m_cursor’ was not declared in this scope +In file included from /usr/include/wx-2.8/wx/wx.h:26, + from BenchmarkDialog_rc.cpp:25: +/usr/include/wx-2.8/wx/app.h: In constructor ‘wxAppInitializer::wxAppInitializer(wxAppConsole* (*)())’: +/usr/include/wx-2.8/wx/app.h:637: error: ‘wxApp’ has not been declared +In file included from /usr/include/wx-2.8/wx/window.h:26, + from /usr/include/wx-2.8/wx/wx.h:36, + from BenchmarkDialog_rc.cpp:25: +/usr/include/wx-2.8/wx/region.h: In member function ‘bool wxRegionBase::Intersect(const wxRect&)’: +/usr/include/wx-2.8/wx/region.h:251: error: invalid use of incomplete type ‘struct wxRegion’ +/usr/include/wx-2.8/wx/gdicmn.h:38: error: forward declaration of ‘struct wxRegion’ +/usr/include/wx-2.8/wx/region.h: In member function ‘bool wxRegionBase::Subtract(const wxRect&)’: +/usr/include/wx-2.8/wx/region.h:256: error: invalid use of incomplete type ‘struct wxRegion’ +/usr/include/wx-2.8/wx/gdicmn.h:38: error: forward declaration of ‘struct wxRegion’ +/usr/include/wx-2.8/wx/region.h: In member function ‘bool wxRegionBase::Xor(const wxRect&)’: +/usr/include/wx-2.8/wx/region.h:261: error: invalid use of incomplete type ‘struct wxRegion’ +/usr/include/wx-2.8/wx/gdicmn.h:38: error: forward declaration of ‘struct wxRegion’ +/usr/include/wx-2.8/wx/region.h: In member function ‘bool wxRegionWithCombine::Combine(wxCoord, wxCoord, wxCoord, wxCoord, wxRegionOp)’: +/usr/include/wx-2.8/wx/region.h:290: error: invalid use of incomplete type ‘struct wxRegion’ +/usr/include/wx-2.8/wx/gdicmn.h:38: error: forward declaration of ‘struct wxRegion’ +/usr/include/wx-2.8/wx/region.h: In member function ‘bool wxRegionWithCombine::Combine(const wxRect&, wxRegionOp)’: +/usr/include/wx-2.8/wx/region.h:295: error: invalid use of incomplete type ‘struct wxRegion’ +/usr/include/wx-2.8/wx/gdicmn.h:38: error: forward declaration of ‘struct wxRegion’ +In file included from /usr/include/wx-2.8/wx/wx.h:36, + from BenchmarkDialog_rc.cpp:25: +/usr/include/wx-2.8/wx/window.h: At global scope: +/usr/include/wx-2.8/wx/window.h:82: error: field ‘font’ has incomplete type +/usr/include/wx-2.8/wx/window.h:85: error: field ‘colFg’ has incomplete type +/usr/include/wx-2.8/wx/window.h:89: error: field ‘colBg’ has incomplete type +/usr/include/wx-2.8/wx/window.h:1215: error: field ‘m_cursor’ has incomplete type +/usr/include/wx-2.8/wx/window.h:1216: error: field ‘m_font’ has incomplete type +/usr/include/wx-2.8/wx/window.h:1217: error: field ‘m_backgroundColour’ has incomplete type +/usr/include/wx-2.8/wx/window.h:1218: error: field ‘m_foregroundColour’ has incomplete type +/usr/include/wx-2.8/wx/window.h:1225: error: field ‘m_updateRegion’ has incomplete type +/usr/include/wx-2.8/wx/window.h:1230: error: field ‘m_acceleratorTable’ has incomplete type +/usr/include/wx-2.8/wx/window.h:1278: error: field ‘m_palette’ has incomplete type +/usr/include/wx-2.8/wx/window.h: In member function ‘virtual void wxWindowBase::SetAcceleratorTable(const wxAcceleratorTable&)’: +/usr/include/wx-2.8/wx/window.h:670: error: ‘m_acceleratorTable’ was not declared in this scope +/usr/include/wx-2.8/wx/window.h: In member function ‘wxAcceleratorTable* wxWindowBase::GetAcceleratorTable()’: +/usr/include/wx-2.8/wx/window.h:672: error: ‘m_acceleratorTable’ was not declared in this scope +/usr/include/wx-2.8/wx/window.h: In member function ‘const wxRegion& wxWindowBase::GetUpdateRegion() const’: +/usr/include/wx-2.8/wx/window.h:761: error: ‘m_updateRegion’ was not declared in this scope +/usr/include/wx-2.8/wx/window.h: In member function ‘wxRegion& wxWindowBase::GetUpdateRegion()’: +/usr/include/wx-2.8/wx/window.h:762: error: ‘m_updateRegion’ was not declared in this scope +/usr/include/wx-2.8/wx/window.h: In member function ‘const wxCursor& wxWindowBase::GetCursor() const’: +/usr/include/wx-2.8/wx/window.h:850: error: ‘m_cursor’ was not declared in this scope +/usr/include/wx-2.8/wx/window.h: In member function ‘wxPalette wxWindowBase::GetPalette() const’: +/usr/include/wx-2.8/wx/window.h:1127: error: return type ‘struct wxPalette’ is incomplete +/usr/include/wx-2.8/wx/window.h:1127: error: ‘m_palette’ was not declared in this scope +/usr/include/wx-2.8/wx/window.h: In member function ‘wxWindow* wxWindowBase::GetGrandParent() const’: +/usr/include/wx-2.8/wx/window.h:1532: error: invalid use of incomplete type ‘struct wxWindow’ +../../../myWindows/StdAfx.h:58: error: forward declaration of ‘struct wxWindow’ +In file included from /usr/include/wx-2.8/wx/panel.h:15, + from /usr/include/wx-2.8/wx/wx.h:38, + from BenchmarkDialog_rc.cpp:25: +/usr/include/wx-2.8/wx/generic/panelg.h: At global scope: +/usr/include/wx-2.8/wx/generic/panelg.h:31: error: invalid use of incomplete type ‘struct wxWindow’ +../../../myWindows/StdAfx.h:58: error: forward declaration of ‘struct wxWindow’ +In file included from /usr/include/wx-2.8/wx/wx.h:39, + from BenchmarkDialog_rc.cpp:25: +/usr/include/wx-2.8/wx/toplevel.h:119: error: invalid use of incomplete type ‘struct wxWindow’ +../../../myWindows/StdAfx.h:58: error: forward declaration of ‘struct wxWindow’ +/usr/include/wx-2.8/wx/toplevel.h: In member function ‘virtual bool wxTopLevelWindowBase::IsActive()’: +/usr/include/wx-2.8/wx/toplevel.h:183: error: ‘FindFocus’ was not declared in this scope +/usr/include/wx-2.8/wx/toplevel.h: In member function ‘virtual bool wxTopLevelWindowBase::IsVisible() const’: +/usr/include/wx-2.8/wx/toplevel.h:235: error: ‘IsShown’ was not declared in this scope +/usr/include/wx-2.8/wx/toplevel.h: In member function ‘virtual void wxTopLevelWindowBase::DoGetScreenPosition(int*, int*) const’: +/usr/include/wx-2.8/wx/toplevel.h:273: error: ‘DoGetPosition’ was not declared in this scope +/usr/include/wx-2.8/wx/toplevel.h: At global scope: +/usr/include/wx-2.8/wx/toplevel.h:353: error: expected class-name before ‘{’ token +/usr/include/wx-2.8/wx/toplevel.h: In constructor ‘wxTopLevelWindow::wxTopLevelWindow()’: +/usr/include/wx-2.8/wx/toplevel.h:356: error: ‘Init’ was not declared in this scope +/usr/include/wx-2.8/wx/toplevel.h: In constructor ‘wxTopLevelWindow::wxTopLevelWindow(wxWindow*, wxWindowID, const wxString&, const wxPoint&, const wxSize&, long int, const wxString&)’: +/usr/include/wx-2.8/wx/toplevel.h:365: error: ‘Init’ was not declared in this scope +/usr/include/wx-2.8/wx/toplevel.h:366: error: ‘Create’ was not declared in this scope +In file included from /usr/include/wx-2.8/wx/wx.h:44, + from BenchmarkDialog_rc.cpp:25: +/usr/include/wx-2.8/wx/bitmap.h: In member function ‘virtual wxColour wxBitmapBase::QuantizeColour(const wxColour&) const’: +/usr/include/wx-2.8/wx/bitmap.h:194: error: return type ‘struct wxColour’ is incomplete +In file included from /usr/include/wx-2.8/wx/wx.h:48, + from BenchmarkDialog_rc.cpp:25: +/usr/include/wx-2.8/wx/dc.h: At global scope: +/usr/include/wx-2.8/wx/dc.h:835: error: field ‘m_pen’ has incomplete type +/usr/include/wx-2.8/wx/dc.h:836: error: field ‘m_brush’ has incomplete type +/usr/include/wx-2.8/wx/dc.h:837: error: field ‘m_backgroundBrush’ has incomplete type +/usr/include/wx-2.8/wx/dc.h:838: error: field ‘m_textForegroundColour’ has incomplete type +/usr/include/wx-2.8/wx/dc.h:839: error: field ‘m_textBackgroundColour’ has incomplete type +/usr/include/wx-2.8/wx/dc.h:840: error: field ‘m_font’ has incomplete type +/usr/include/wx-2.8/wx/dc.h:843: error: field ‘m_palette’ has incomplete type +/usr/include/wx-2.8/wx/dc.h: In constructor ‘wxDCBase::wxDCBase()’: +/usr/include/wx-2.8/wx/dc.h:121: error: class ‘wxDCBase’ does not have any field named ‘m_pen’ +/usr/include/wx-2.8/wx/dc.h:122: error: class ‘wxDCBase’ does not have any field named ‘m_brush’ +/usr/include/wx-2.8/wx/dc.h:123: error: class ‘wxDCBase’ does not have any field named ‘m_backgroundBrush’ +/usr/include/wx-2.8/wx/dc.h:124: error: class ‘wxDCBase’ does not have any field named ‘m_textForegroundColour’ +/usr/include/wx-2.8/wx/dc.h:125: error: class ‘wxDCBase’ does not have any field named ‘m_textBackgroundColour’ +/usr/include/wx-2.8/wx/dc.h:126: error: class ‘wxDCBase’ does not have any field named ‘m_font’ +/usr/include/wx-2.8/wx/dc.h:128: error: class ‘wxDCBase’ does not have any field named ‘m_palette’ +/usr/include/wx-2.8/wx/dc.h: In member function ‘wxBitmap wxDCBase::GetAsBitmap(const wxRect*) const’: +/usr/include/wx-2.8/wx/dc.h:318: error: return type ‘struct wxBitmap’ is incomplete +/usr/include/wx-2.8/wx/dc.h:319: error: invalid use of incomplete type ‘struct wxBitmap’ +/usr/include/wx-2.8/wx/gdicmn.h:30: error: forward declaration of ‘struct wxBitmap’ +/usr/include/wx-2.8/wx/dc.h: In member function ‘virtual const wxBrush& wxDCBase::GetBackground() const’: +/usr/include/wx-2.8/wx/dc.h:528: error: ‘m_backgroundBrush’ was not declared in this scope +/usr/include/wx-2.8/wx/dc.h: In member function ‘virtual const wxBrush& wxDCBase::GetBrush() const’: +/usr/include/wx-2.8/wx/dc.h:529: error: ‘m_brush’ was not declared in this scope +/usr/include/wx-2.8/wx/dc.h: In member function ‘virtual const wxFont& wxDCBase::GetFont() const’: +/usr/include/wx-2.8/wx/dc.h:530: error: ‘m_font’ was not declared in this scope +/usr/include/wx-2.8/wx/dc.h: In member function ‘virtual const wxPen& wxDCBase::GetPen() const’: +/usr/include/wx-2.8/wx/dc.h:531: error: ‘m_pen’ was not declared in this scope +/usr/include/wx-2.8/wx/dc.h: In member function ‘virtual const wxColour& wxDCBase::GetTextForeground() const’: +/usr/include/wx-2.8/wx/dc.h:533: error: ‘m_textForegroundColour’ was not declared in this scope +/usr/include/wx-2.8/wx/dc.h: In member function ‘virtual const wxColour& wxDCBase::GetTextBackground() const’: +/usr/include/wx-2.8/wx/dc.h:534: error: ‘m_textBackgroundColour’ was not declared in this scope +/usr/include/wx-2.8/wx/dc.h: In member function ‘virtual void wxDCBase::SetTextForeground(const wxColour&)’: +/usr/include/wx-2.8/wx/dc.h:536: error: ‘m_textForegroundColour’ was not declared in this scope +/usr/include/wx-2.8/wx/dc.h: In member function ‘virtual void wxDCBase::SetTextBackground(const wxColour&)’: +/usr/include/wx-2.8/wx/dc.h:538: error: ‘m_textBackgroundColour’ was not declared in this scope +/usr/include/wx-2.8/wx/dc.h: In member function ‘virtual wxBitmap wxDCBase::DoGetAsBitmap(const wxRect*) const’: +/usr/include/wx-2.8/wx/dc.h:734: error: return type ‘struct wxBitmap’ is incomplete +In file included from /usr/include/wx-2.8/wx/wx.h:48, + from BenchmarkDialog_rc.cpp:25: +/usr/include/wx-2.8/wx/dc.h: At global scope: +/usr/include/wx-2.8/wx/dc.h:915: error: field ‘m_colFgOld’ has incomplete type +/usr/include/wx-2.8/wx/dc.h: In constructor ‘wxDCTextColourChanger::wxDCTextColourChanger(wxDC&)’: +/usr/include/wx-2.8/wx/dc.h:892: error: class ‘wxDCTextColourChanger’ does not have any field named ‘m_colFgOld’ +/usr/include/wx-2.8/wx/dc.h: In destructor ‘wxDCTextColourChanger::~wxDCTextColourChanger()’: +/usr/include/wx-2.8/wx/dc.h:901: error: ‘m_colFgOld’ was not declared in this scope +/usr/include/wx-2.8/wx/dc.h: In member function ‘void wxDCTextColourChanger::Set(const wxColour&)’: +/usr/include/wx-2.8/wx/dc.h:907: error: ‘m_colFgOld’ was not declared in this scope +/usr/include/wx-2.8/wx/dc.h: At global scope: +/usr/include/wx-2.8/wx/dc.h:942: error: field ‘m_penOld’ has incomplete type +/usr/include/wx-2.8/wx/dc.h: In constructor ‘wxDCPenChanger::wxDCPenChanger(wxDC&, const wxPen&)’: +/usr/include/wx-2.8/wx/dc.h:928: error: class ‘wxDCPenChanger’ does not have any field named ‘m_penOld’ +/usr/include/wx-2.8/wx/dc.h: In destructor ‘wxDCPenChanger::~wxDCPenChanger()’: +/usr/include/wx-2.8/wx/dc.h:935: error: ‘m_penOld’ was not declared in this scope +/usr/include/wx-2.8/wx/dc.h: At global scope: +/usr/include/wx-2.8/wx/dc.h:969: error: field ‘m_brushOld’ has incomplete type +/usr/include/wx-2.8/wx/dc.h: In constructor ‘wxDCBrushChanger::wxDCBrushChanger(wxDC&, const wxBrush&)’: +/usr/include/wx-2.8/wx/dc.h:955: error: class ‘wxDCBrushChanger’ does not have any field named ‘m_brushOld’ +/usr/include/wx-2.8/wx/dc.h: In destructor ‘wxDCBrushChanger::~wxDCBrushChanger()’: +/usr/include/wx-2.8/wx/dc.h:962: error: ‘m_brushOld’ was not declared in this scope +In file included from /usr/include/wx-2.8/wx/wx.h:50, + from BenchmarkDialog_rc.cpp:25: +/usr/include/wx-2.8/wx/dcmemory.h: In member function ‘void wxMemoryDCBase::SelectObject(wxBitmap&)’: +/usr/include/wx-2.8/wx/dcmemory.h:35: error: invalid use of incomplete type ‘struct wxBitmap’ +/usr/include/wx-2.8/wx/gdicmn.h:30: error: forward declaration of ‘struct wxBitmap’ +/usr/include/wx-2.8/wx/dcmemory.h:36: error: invalid use of incomplete type ‘struct wxBitmap’ +/usr/include/wx-2.8/wx/gdicmn.h:30: error: forward declaration of ‘struct wxBitmap’ +In file included from /usr/include/wx-2.8/wx/mac/carbon/dcprint.h:16, + from /usr/include/wx-2.8/wx/mac/dcprint.h:4, + from /usr/include/wx-2.8/wx/dcprint.h:28, + from /usr/include/wx-2.8/wx/wx.h:51, + from BenchmarkDialog_rc.cpp:25: +/usr/include/wx-2.8/wx/cmndata.h: At global scope: +/usr/include/wx-2.8/wx/cmndata.h:49: error: field ‘m_dataColour’ has incomplete type +/usr/include/wx-2.8/wx/cmndata.h:50: error: field ‘m_custColours’ has incomplete type +/usr/include/wx-2.8/wx/cmndata.h: In member function ‘void wxColourData::SetColour(const wxColour&)’: +/usr/include/wx-2.8/wx/cmndata.h:38: error: ‘m_dataColour’ was not declared in this scope +/usr/include/wx-2.8/wx/cmndata.h: In member function ‘const wxColour& wxColourData::GetColour() const’: +/usr/include/wx-2.8/wx/cmndata.h:39: error: ‘m_dataColour’ was not declared in this scope +/usr/include/wx-2.8/wx/cmndata.h: In member function ‘wxColour& wxColourData::GetColour()’: +/usr/include/wx-2.8/wx/cmndata.h:40: error: ‘m_dataColour’ was not declared in this scope +/usr/include/wx-2.8/wx/cmndata.h: At global scope: +/usr/include/wx-2.8/wx/cmndata.h:125: error: field ‘m_fontColour’ has incomplete type +/usr/include/wx-2.8/wx/cmndata.h:129: error: field ‘m_initialFont’ has incomplete type +/usr/include/wx-2.8/wx/cmndata.h:130: error: field ‘m_chosenFont’ has incomplete type +/usr/include/wx-2.8/wx/cmndata.h: In copy constructor ‘wxFontData::wxFontData(const wxFontData&)’: +/usr/include/wx-2.8/wx/cmndata.h:65: error: class ‘wxFontData’ does not have any field named ‘m_fontColour’ +/usr/include/wx-2.8/wx/cmndata.h:65: error: ‘const class wxFontData’ has no member named ‘m_fontColour’ +/usr/include/wx-2.8/wx/cmndata.h:69: error: class ‘wxFontData’ does not have any field named ‘m_initialFont’ +/usr/include/wx-2.8/wx/cmndata.h:69: error: ‘const class wxFontData’ has no member named ‘m_initialFont’ +/usr/include/wx-2.8/wx/cmndata.h:70: error: class ‘wxFontData’ does not have any field named ‘m_chosenFont’ +/usr/include/wx-2.8/wx/cmndata.h:70: error: ‘const class wxFontData’ has no member named ‘m_chosenFont’ +/usr/include/wx-2.8/wx/cmndata.h: In member function ‘wxFontData& wxFontData::operator=(const wxFontData&)’: +/usr/include/wx-2.8/wx/cmndata.h:81: error: ‘m_fontColour’ was not declared in this scope +/usr/include/wx-2.8/wx/cmndata.h:81: error: ‘const class wxFontData’ has no member named ‘m_fontColour’ +/usr/include/wx-2.8/wx/cmndata.h:85: error: ‘m_initialFont’ was not declared in this scope +/usr/include/wx-2.8/wx/cmndata.h:85: error: ‘const class wxFontData’ has no member named ‘m_initialFont’ +/usr/include/wx-2.8/wx/cmndata.h:86: error: ‘m_chosenFont’ was not declared in this scope +/usr/include/wx-2.8/wx/cmndata.h:86: error: ‘const class wxFontData’ has no member named ‘m_chosenFont’ +/usr/include/wx-2.8/wx/cmndata.h: In member function ‘void wxFontData::SetColour(const wxColour&)’: +/usr/include/wx-2.8/wx/cmndata.h:97: error: ‘m_fontColour’ was not declared in this scope +/usr/include/wx-2.8/wx/cmndata.h: In member function ‘const wxColour& wxFontData::GetColour() const’: +/usr/include/wx-2.8/wx/cmndata.h:98: error: ‘m_fontColour’ was not declared in this scope +/usr/include/wx-2.8/wx/cmndata.h: In member function ‘void wxFontData::SetInitialFont(const wxFont&)’: +/usr/include/wx-2.8/wx/cmndata.h:106: error: ‘m_initialFont’ was not declared in this scope +/usr/include/wx-2.8/wx/cmndata.h: In member function ‘wxFont wxFontData::GetInitialFont() const’: +/usr/include/wx-2.8/wx/cmndata.h:107: error: return type ‘struct wxFont’ is incomplete +/usr/include/wx-2.8/wx/cmndata.h:107: error: ‘m_initialFont’ was not declared in this scope +/usr/include/wx-2.8/wx/cmndata.h: In member function ‘void wxFontData::SetChosenFont(const wxFont&)’: +/usr/include/wx-2.8/wx/cmndata.h:109: error: ‘m_chosenFont’ was not declared in this scope +/usr/include/wx-2.8/wx/cmndata.h: In member function ‘wxFont wxFontData::GetChosenFont() const’: +/usr/include/wx-2.8/wx/cmndata.h:110: error: return type ‘struct wxFont’ is incomplete +/usr/include/wx-2.8/wx/cmndata.h:110: error: ‘m_chosenFont’ was not declared in this scope +In file included from /usr/include/wx-2.8/wx/button.h:46, + from /usr/include/wx-2.8/wx/wx.h:53, + from BenchmarkDialog_rc.cpp:25: +/usr/include/wx-2.8/wx/control.h: At global scope: +/usr/include/wx-2.8/wx/control.h:32: error: invalid use of incomplete type ‘struct wxWindow’ +../../../myWindows/StdAfx.h:58: error: forward declaration of ‘struct wxWindow’ +/usr/include/wx-2.8/wx/control.h: In member function ‘int wxControlBase::GetAlignment() const’: +/usr/include/wx-2.8/wx/control.h:47: error: ‘m_windowStyle’ was not declared in this scope +/usr/include/wx-2.8/wx/control.h: In member function ‘wxString wxControlBase::GetLabelText() const’: +/usr/include/wx-2.8/wx/control.h:53: error: ‘GetLabel’ was not declared in this scope +In file included from /usr/include/wx-2.8/wx/wx.h:53, + from BenchmarkDialog_rc.cpp:25: +/usr/include/wx-2.8/wx/button.h: At global scope: +/usr/include/wx-2.8/wx/button.h:57: error: invalid use of incomplete type ‘struct wxControl’ +/usr/include/wx-2.8/wx/window.h:57: error: forward declaration of ‘struct wxControl’ +In file included from /usr/include/wx-2.8/wx/wx.h:55, + from BenchmarkDialog_rc.cpp:25: +/usr/include/wx-2.8/wx/menu.h: In member function ‘wxMenuItem* wxMenuBase::Append(int, const wxString&, const wxString&, wxItemKind)’: +/usr/include/wx-2.8/wx/menu.h:67: error: incomplete type ‘wxMenuItem’ used in nested name specifier +/usr/include/wx-2.8/wx/menu.h: In member function ‘wxMenuItem* wxMenuBase::AppendSubMenu(wxMenu*, const wxString&, const wxString&)’: +/usr/include/wx-2.8/wx/menu.h:94: error: incomplete type ‘wxMenuItem’ used in nested name specifier +/usr/include/wx-2.8/wx/menu.h: In member function ‘wxMenuItem* wxMenuBase::Insert(size_t, int, const wxString&, const wxString&, wxItemKind)’: +/usr/include/wx-2.8/wx/menu.h:115: error: incomplete type ‘wxMenuItem’ used in nested name specifier +/usr/include/wx-2.8/wx/menu.h: In member function ‘wxMenuItem* wxMenuBase::InsertSeparator(size_t)’: +/usr/include/wx-2.8/wx/menu.h:121: error: incomplete type ‘wxMenuItem’ used in nested name specifier +/usr/include/wx-2.8/wx/menu.h: In member function ‘wxMenuItem* wxMenuBase::Insert(size_t, int, const wxString&, wxMenu*, const wxString&)’: +/usr/include/wx-2.8/wx/menu.h:149: error: incomplete type ‘wxMenuItem’ used in nested name specifier +/usr/include/wx-2.8/wx/menu.h: In member function ‘wxMenuItem* wxMenuBase::Append(int, const wxString&, wxMenu*, const wxString&)’: +/usr/include/wx-2.8/wx/menu.h:317: error: incomplete type ‘wxMenuItem’ used in nested name specifier +/usr/include/wx-2.8/wx/menu.h: In member function ‘wxString wxMenuBase::GetLabelText(int) const’: +/usr/include/wx-2.8/wx/menu.h:383: error: incomplete type ‘wxMenuItem’ used in nested name specifier +/usr/include/wx-2.8/wx/menu.h: At global scope: +/usr/include/wx-2.8/wx/menu.h:393: error: invalid use of incomplete type ‘struct wxWindow’ +../../../myWindows/StdAfx.h:58: error: forward declaration of ‘struct wxWindow’ +/usr/include/wx-2.8/wx/menu.h: In member function ‘virtual bool wxMenuBarBase::IsEnabled() const’: +/usr/include/wx-2.8/wx/menu.h:466: error: incomplete type ‘wxWindow’ used in nested name specifier +/usr/include/wx-2.8/wx/menu.h: In member function ‘virtual bool wxMenuBarBase::Enable(bool)’: +/usr/include/wx-2.8/wx/menu.h:489: error: incomplete type ‘wxWindow’ used in nested name specifier +/usr/include/wx-2.8/wx/menu.h: In member function ‘virtual void wxMenuBarBase::SetLabel(const wxString&)’: +/usr/include/wx-2.8/wx/menu.h:490: error: incomplete type ‘wxWindow’ used in nested name specifier +/usr/include/wx-2.8/wx/menu.h: In member function ‘virtual wxString wxMenuBarBase::GetLabel() const’: +/usr/include/wx-2.8/wx/menu.h:491: error: incomplete type ‘wxWindow’ used in nested name specifier +In file included from /usr/include/wx-2.8/wx/wx.h:62, + from BenchmarkDialog_rc.cpp:25: +/usr/include/wx-2.8/wx/timer.h: In member function ‘void wxTimerBase::SetOwner(wxEvtHandler*, int)’: +/usr/include/wx-2.8/wx/timer.h:57: error: incomplete type ‘wxWindow’ used in nested name specifier +/usr/include/wx-2.8/wx/timer.h: At global scope: +/usr/include/wx-2.8/wx/timer.h:138: error: expected `)' before ‘&’ token +/usr/include/wx-2.8/wx/timer.h:139: error: expected `)' before ‘&’ token +/usr/include/wx-2.8/wx/timer.h:159: error: ISO C++ forbids declaration of ‘wxTimer’ with no type +/usr/include/wx-2.8/wx/timer.h:159: error: expected ‘;’ before ‘&’ token +/usr/include/wx-2.8/wx/timer.h: In member function ‘void wxTimerRunner::Start(int, bool)’: +/usr/include/wx-2.8/wx/timer.h:147: error: ‘m_timer’ was not declared in this scope +/usr/include/wx-2.8/wx/timer.h: In destructor ‘wxTimerRunner::~wxTimerRunner()’: +/usr/include/wx-2.8/wx/timer.h:152: error: ‘m_timer’ was not declared in this scope +In file included from /usr/include/wx-2.8/wx/wx.h:64, + from BenchmarkDialog_rc.cpp:25: +/usr/include/wx-2.8/wx/msgdlg.h: At global scope: +/usr/include/wx-2.8/wx/msgdlg.h:71: error: ‘wxMessageBoxCaptionStr’ was not declared in this scope +In file included from /usr/include/wx-2.8/wx/wx.h:66, + from BenchmarkDialog_rc.cpp:25: +/usr/include/wx-2.8/wx/dataobj.h:95: error: expected initializer before ‘&’ token +/usr/include/wx-2.8/wx/dataobj.h:131: error: ‘wxDataFormat’ does not name a type +/usr/include/wx-2.8/wx/dataobj.h:137: error: ‘wxDataFormat’ has not been declared +/usr/include/wx-2.8/wx/dataobj.h:141: error: expected ‘,’ or ‘...’ before ‘&’ token +/usr/include/wx-2.8/wx/dataobj.h:141: error: ISO C++ forbids declaration of ‘wxDataFormat’ with no type +/usr/include/wx-2.8/wx/dataobj.h:145: error: expected ‘,’ or ‘...’ before ‘&’ token +/usr/include/wx-2.8/wx/dataobj.h:145: error: ISO C++ forbids declaration of ‘wxDataFormat’ with no type +/usr/include/wx-2.8/wx/dataobj.h:149: error: expected ‘,’ or ‘...’ before ‘&’ token +/usr/include/wx-2.8/wx/dataobj.h:150: error: ISO C++ forbids declaration of ‘wxDataFormat’ with no type +/usr/include/wx-2.8/wx/dataobj.h:156: error: expected ‘,’ or ‘...’ before ‘&’ token +/usr/include/wx-2.8/wx/dataobj.h:156: error: ISO C++ forbids declaration of ‘wxDataFormat’ with no type +/usr/include/wx-2.8/wx/dataobj.h:198: error: expected class-name before ‘{’ token +/usr/include/wx-2.8/wx/dataobj.h:202: error: expected ‘,’ or ‘...’ before ‘&’ token +/usr/include/wx-2.8/wx/dataobj.h:202: error: ISO C++ forbids declaration of ‘wxDataFormat’ with no type +/usr/include/wx-2.8/wx/dataobj.h:208: error: ISO C++ forbids declaration of ‘wxDataFormat’ with no type +/usr/include/wx-2.8/wx/dataobj.h:208: error: expected ‘;’ before ‘&’ token +/usr/include/wx-2.8/wx/dataobj.h:209: error: expected `;' before ‘void’ +/usr/include/wx-2.8/wx/dataobj.h:209: error: expected ‘,’ or ‘...’ before ‘&’ token +/usr/include/wx-2.8/wx/dataobj.h:209: error: ISO C++ forbids declaration of ‘wxDataFormat’ with no type +/usr/include/wx-2.8/wx/dataobj.h:229: error: ‘wxDataFormat’ does not name a type +/usr/include/wx-2.8/wx/dataobj.h:233: error: ‘wxDataFormat’ has not been declared +/usr/include/wx-2.8/wx/dataobj.h:236: error: expected ‘,’ or ‘...’ before ‘&’ token +/usr/include/wx-2.8/wx/dataobj.h:236: error: ISO C++ forbids declaration of ‘wxDataFormat’ with no type +/usr/include/wx-2.8/wx/dataobj.h:238: error: expected ‘,’ or ‘...’ before ‘&’ token +/usr/include/wx-2.8/wx/dataobj.h:239: error: ISO C++ forbids declaration of ‘wxDataFormat’ with no type +/usr/include/wx-2.8/wx/dataobj.h:241: error: expected ‘,’ or ‘...’ before ‘&’ token +/usr/include/wx-2.8/wx/dataobj.h:242: error: ISO C++ forbids declaration of ‘wxDataFormat’ with no type +/usr/include/wx-2.8/wx/dataobj.h:247: error: ‘wxDataFormat’ does not name a type +/usr/include/wx-2.8/wx/dataobj.h:231: error: ‘Get’ was not declared in this scope +/usr/include/wx-2.8/wx/dataobj.h:234: error: ‘Get’ was not declared in this scope +/usr/include/wx-2.8/wx/dataobj.h: In constructor ‘wxDataObjectSimple::wxDataObjectSimple(int)’: +/usr/include/wx-2.8/wx/dataobj.h:203: error: class ‘wxDataObjectSimple’ does not have any field named ‘m_format’ +/usr/include/wx-2.8/wx/dataobj.h:203: error: ‘format’ was not declared in this scope +/usr/include/wx-2.8/wx/dataobj.h: In member function ‘void wxDataObjectSimple::SetFormat(int)’: +/usr/include/wx-2.8/wx/dataobj.h:209: error: ‘m_format’ was not declared in this scope +/usr/include/wx-2.8/wx/dataobj.h:209: error: ‘format’ was not declared in this scope +/usr/include/wx-2.8/wx/dataobj.h: In member function ‘virtual void wxDataObjectSimple::GetAllFormats(int*, wxDataObjectBase::Direction) const’: +/usr/include/wx-2.8/wx/dataobj.h:235: error: ‘m_format’ was not declared in this scope +/usr/include/wx-2.8/wx/dataobj.h: In member function ‘virtual bool wxDataObjectSimple::GetDataHere(int) const’: +/usr/include/wx-2.8/wx/dataobj.h:240: error: ‘buf’ was not declared in this scope +/usr/include/wx-2.8/wx/dataobj.h: In member function ‘virtual bool wxDataObjectSimple::SetData(int)’: +/usr/include/wx-2.8/wx/dataobj.h:243: error: ‘len’ was not declared in this scope +/usr/include/wx-2.8/wx/dataobj.h:243: error: ‘buf’ was not declared in this scope +/usr/include/wx-2.8/wx/dataobj.h: At global scope: +/usr/include/wx-2.8/wx/dataobj.h:265: error: expected class-name before ‘{’ token +/usr/include/wx-2.8/wx/dataobj.h:280: error: ‘wxDataFormat’ does not name a type +/usr/include/wx-2.8/wx/dataobj.h:284: error: ‘wxDataFormat’ does not name a type +/usr/include/wx-2.8/wx/dataobj.h:286: error: ‘wxDataFormat’ has not been declared +/usr/include/wx-2.8/wx/dataobj.h:287: error: expected ‘,’ or ‘...’ before ‘&’ token +/usr/include/wx-2.8/wx/dataobj.h:287: error: ISO C++ forbids declaration of ‘wxDataFormat’ with no type +/usr/include/wx-2.8/wx/dataobj.h:288: error: expected ‘,’ or ‘...’ before ‘&’ token +/usr/include/wx-2.8/wx/dataobj.h:288: error: ISO C++ forbids declaration of ‘wxDataFormat’ with no type +/usr/include/wx-2.8/wx/dataobj.h:289: error: expected ‘,’ or ‘...’ before ‘&’ token +/usr/include/wx-2.8/wx/dataobj.h:289: error: ISO C++ forbids declaration of ‘wxDataFormat’ with no type +/usr/include/wx-2.8/wx/dataobj.h:292: error: expected ‘,’ or ‘...’ before ‘&’ token +/usr/include/wx-2.8/wx/dataobj.h:292: error: ISO C++ forbids declaration of ‘wxDataFormat’ with no type +/usr/include/wx-2.8/wx/dataobj.h:294: error: expected ‘,’ or ‘...’ before ‘&’ token +/usr/include/wx-2.8/wx/dataobj.h:294: error: ISO C++ forbids declaration of ‘wxDataFormat’ with no type +/usr/include/wx-2.8/wx/dataobj.h:295: error: expected ‘,’ or ‘...’ before ‘&’ token +/usr/include/wx-2.8/wx/dataobj.h:295: error: ISO C++ forbids declaration of ‘wxDataFormat’ with no type +/usr/include/wx-2.8/wx/dataobj.h:300: error: expected ‘,’ or ‘...’ before ‘&’ token +/usr/include/wx-2.8/wx/dataobj.h:300: error: ISO C++ forbids declaration of ‘wxDataFormat’ with no type +/usr/include/wx-2.8/wx/dataobj.h:310: error: ‘wxDataFormat’ does not name a type +/usr/include/wx-2.8/wx/dataobj.h:285: error: ‘Get’ was not declared in this scope +/usr/include/wx-2.8/wx/dataobj.h:286: error: ‘Get’ was not declared in this scope +/usr/include/wx-2.8/wx/dataobj.h:355: error: ‘Direction’ has not been declared +/usr/include/wx-2.8/wx/dataobj.h:356: error: ‘wxDataFormat’ has not been declared +/usr/include/wx-2.8/wx/dataobj.h:363: error: expected ‘,’ or ‘...’ before ‘&’ token +/usr/include/wx-2.8/wx/dataobj.h:363: error: ISO C++ forbids declaration of ‘wxDataFormat’ with no type +/usr/include/wx-2.8/wx/dataobj.h:364: error: expected ‘,’ or ‘...’ before ‘&’ token +/usr/include/wx-2.8/wx/dataobj.h:364: error: ISO C++ forbids declaration of ‘wxDataFormat’ with no type +/usr/include/wx-2.8/wx/dataobj.h:365: error: expected ‘,’ or ‘...’ before ‘&’ token +/usr/include/wx-2.8/wx/dataobj.h:365: error: ISO C++ forbids declaration of ‘wxDataFormat’ with no type +/usr/include/wx-2.8/wx/dataobj.h:355: error: ‘Get’ was not declared in this scope +/usr/include/wx-2.8/wx/dataobj.h:357: error: ‘Get’ was not declared in this scope +/usr/include/wx-2.8/wx/dataobj.h: In member function ‘virtual size_t wxTextDataObject::GetDataSize() const’: +/usr/include/wx-2.8/wx/dataobj.h:359: error: ‘GetPreferredFormat’ was not declared in this scope +/usr/include/wx-2.8/wx/dataobj.h: In member function ‘virtual bool wxTextDataObject::GetDataHere(void*) const’: +/usr/include/wx-2.8/wx/dataobj.h:360: error: ‘GetPreferredFormat’ was not declared in this scope +/usr/include/wx-2.8/wx/dataobj.h: In member function ‘virtual bool wxTextDataObject::SetData(size_t, const void*)’: +/usr/include/wx-2.8/wx/dataobj.h:361: error: ‘GetPreferredFormat’ was not declared in this scope +/usr/include/wx-2.8/wx/dataobj.h: At global scope: +/usr/include/wx-2.8/wx/dataobj.h:411: error: field ‘m_bitmap’ has incomplete type +/usr/include/wx-2.8/wx/dataobj.h: In constructor ‘wxBitmapDataObjectBase::wxBitmapDataObjectBase(const wxBitmap&)’: +/usr/include/wx-2.8/wx/dataobj.h:401: error: class ‘wxBitmapDataObjectBase’ does not have any field named ‘m_bitmap’ +/usr/include/wx-2.8/wx/dataobj.h: In member function ‘virtual wxBitmap wxBitmapDataObjectBase::GetBitmap() const’: +/usr/include/wx-2.8/wx/dataobj.h:407: error: return type ‘struct wxBitmap’ is incomplete +/usr/include/wx-2.8/wx/dataobj.h:407: error: ‘m_bitmap’ was not declared in this scope +/usr/include/wx-2.8/wx/dataobj.h: In member function ‘virtual void wxBitmapDataObjectBase::SetBitmap(const wxBitmap&)’: +/usr/include/wx-2.8/wx/dataobj.h:408: error: ‘m_bitmap’ was not declared in this scope +/usr/include/wx-2.8/wx/dataobj.h: At global scope: +/usr/include/wx-2.8/wx/dataobj.h:449: error: expected ‘,’ or ‘...’ before ‘&’ token +/usr/include/wx-2.8/wx/dataobj.h:449: error: ISO C++ forbids declaration of ‘wxDataFormat’ with no type +/usr/include/wx-2.8/wx/dataobj.h:479: error: expected ‘,’ or ‘...’ before ‘&’ token +/usr/include/wx-2.8/wx/dataobj.h:479: error: ISO C++ forbids declaration of ‘wxDataFormat’ with no type +/usr/include/wx-2.8/wx/dataobj.h:483: error: expected ‘,’ or ‘...’ before ‘&’ token +/usr/include/wx-2.8/wx/dataobj.h:483: error: ISO C++ forbids declaration of ‘wxDataFormat’ with no type +/usr/include/wx-2.8/wx/dataobj.h:487: error: expected ‘,’ or ‘...’ before ‘&’ token +/usr/include/wx-2.8/wx/dataobj.h:487: error: ISO C++ forbids declaration of ‘wxDataFormat’ with no type +/usr/include/wx-2.8/wx/dataobj.h: In member function ‘virtual bool wxCustomDataObject::GetDataHere(int) const’: +/usr/include/wx-2.8/wx/dataobj.h:485: error: ‘buf’ was not declared in this scope +/usr/include/wx-2.8/wx/dataobj.h: In member function ‘virtual bool wxCustomDataObject::SetData(int)’: +/usr/include/wx-2.8/wx/dataobj.h:489: error: ‘len’ was not declared in this scope +/usr/include/wx-2.8/wx/dataobj.h:489: error: ‘buf’ was not declared in this scope +In file included from /usr/include/wx-2.8/wx/wx.h:69, + from BenchmarkDialog_rc.cpp:25: +/usr/include/wx-2.8/wx/ctrlsub.h: At global scope: +/usr/include/wx-2.8/wx/ctrlsub.h:175: error: invalid use of incomplete type ‘struct wxControl’ +/usr/include/wx-2.8/wx/window.h:57: error: forward declaration of ‘struct wxControl’ +/usr/include/wx-2.8/wx/ctrlsub.h: In member function ‘void wxControlWithItems::SetClientData(void*)’: +/usr/include/wx-2.8/wx/ctrlsub.h:185: error: cannot call member function ‘void wxEvtHandler::SetClientData(void*)’ without object +/usr/include/wx-2.8/wx/ctrlsub.h: In member function ‘void* wxControlWithItems::GetClientData() const’: +/usr/include/wx-2.8/wx/ctrlsub.h:185: error: cannot call member function ‘void* wxEvtHandler::GetClientData() const’ without object +/usr/include/wx-2.8/wx/ctrlsub.h: In member function ‘void wxControlWithItems::SetClientObject(wxClientData*)’: +/usr/include/wx-2.8/wx/ctrlsub.h:185: error: cannot call member function ‘void wxEvtHandler::SetClientObject(wxClientData*)’ without object +/usr/include/wx-2.8/wx/ctrlsub.h: In member function ‘wxClientData* wxControlWithItems::GetClientObject() const’: +/usr/include/wx-2.8/wx/ctrlsub.h:185: error: cannot call member function ‘wxClientData* wxEvtHandler::GetClientObject() const’ without object +In file included from /usr/include/wx-2.8/wx/wx.h:70, + from BenchmarkDialog_rc.cpp:25: +/usr/include/wx-2.8/wx/bmpbuttn.h: At global scope: +/usr/include/wx-2.8/wx/bmpbuttn.h:30: error: expected class-name before ‘{’ token +/usr/include/wx-2.8/wx/bmpbuttn.h:81: error: field ‘m_bmpNormal’ has incomplete type +/usr/include/wx-2.8/wx/bmpbuttn.h:82: error: field ‘m_bmpSelected’ has incomplete type +/usr/include/wx-2.8/wx/bmpbuttn.h:83: error: field ‘m_bmpFocus’ has incomplete type +/usr/include/wx-2.8/wx/bmpbuttn.h:84: error: field ‘m_bmpDisabled’ has incomplete type +/usr/include/wx-2.8/wx/bmpbuttn.h:85: error: field ‘m_bmpHover’ has incomplete type +/usr/include/wx-2.8/wx/bmpbuttn.h: In member function ‘void wxBitmapButtonBase::SetBitmapLabel(const wxBitmap&)’: +/usr/include/wx-2.8/wx/bmpbuttn.h:40: error: ‘m_bmpNormal’ was not declared in this scope +/usr/include/wx-2.8/wx/bmpbuttn.h: In member function ‘void wxBitmapButtonBase::SetBitmapSelected(const wxBitmap&)’: +/usr/include/wx-2.8/wx/bmpbuttn.h:42: error: ‘m_bmpSelected’ was not declared in this scope +/usr/include/wx-2.8/wx/bmpbuttn.h: In member function ‘void wxBitmapButtonBase::SetBitmapFocus(const wxBitmap&)’: +/usr/include/wx-2.8/wx/bmpbuttn.h:44: error: ‘m_bmpFocus’ was not declared in this scope +/usr/include/wx-2.8/wx/bmpbuttn.h: In member function ‘void wxBitmapButtonBase::SetBitmapDisabled(const wxBitmap&)’: +/usr/include/wx-2.8/wx/bmpbuttn.h:46: error: ‘m_bmpDisabled’ was not declared in this scope +/usr/include/wx-2.8/wx/bmpbuttn.h: In member function ‘void wxBitmapButtonBase::SetBitmapHover(const wxBitmap&)’: +/usr/include/wx-2.8/wx/bmpbuttn.h:48: error: ‘m_bmpHover’ was not declared in this scope +/usr/include/wx-2.8/wx/bmpbuttn.h: In member function ‘const wxBitmap& wxBitmapButtonBase::GetBitmapLabel() const’: +/usr/include/wx-2.8/wx/bmpbuttn.h:51: error: ‘m_bmpNormal’ was not declared in this scope +/usr/include/wx-2.8/wx/bmpbuttn.h: In member function ‘const wxBitmap& wxBitmapButtonBase::GetBitmapSelected() const’: +/usr/include/wx-2.8/wx/bmpbuttn.h:52: error: ‘m_bmpSelected’ was not declared in this scope +/usr/include/wx-2.8/wx/bmpbuttn.h: In member function ‘const wxBitmap& wxBitmapButtonBase::GetBitmapFocus() const’: +/usr/include/wx-2.8/wx/bmpbuttn.h:53: error: ‘m_bmpFocus’ was not declared in this scope +/usr/include/wx-2.8/wx/bmpbuttn.h: In member function ‘const wxBitmap& wxBitmapButtonBase::GetBitmapDisabled() const’: +/usr/include/wx-2.8/wx/bmpbuttn.h:54: error: ‘m_bmpDisabled’ was not declared in this scope +/usr/include/wx-2.8/wx/bmpbuttn.h: In member function ‘const wxBitmap& wxBitmapButtonBase::GetBitmapHover() const’: +/usr/include/wx-2.8/wx/bmpbuttn.h:55: error: ‘m_bmpHover’ was not declared in this scope +/usr/include/wx-2.8/wx/bmpbuttn.h: In member function ‘wxBitmap& wxBitmapButtonBase::GetBitmapLabel()’: +/usr/include/wx-2.8/wx/bmpbuttn.h:56: error: ‘m_bmpNormal’ was not declared in this scope +/usr/include/wx-2.8/wx/bmpbuttn.h: In member function ‘wxBitmap& wxBitmapButtonBase::GetBitmapSelected()’: +/usr/include/wx-2.8/wx/bmpbuttn.h:57: error: ‘m_bmpSelected’ was not declared in this scope +/usr/include/wx-2.8/wx/bmpbuttn.h: In member function ‘wxBitmap& wxBitmapButtonBase::GetBitmapFocus()’: +/usr/include/wx-2.8/wx/bmpbuttn.h:58: error: ‘m_bmpFocus’ was not declared in this scope +/usr/include/wx-2.8/wx/bmpbuttn.h: In member function ‘wxBitmap& wxBitmapButtonBase::GetBitmapDisabled()’: +/usr/include/wx-2.8/wx/bmpbuttn.h:59: error: ‘m_bmpDisabled’ was not declared in this scope +/usr/include/wx-2.8/wx/bmpbuttn.h: In member function ‘wxBitmap& wxBitmapButtonBase::GetBitmapHover()’: +/usr/include/wx-2.8/wx/bmpbuttn.h:60: error: ‘m_bmpHover’ was not declared in this scope +/usr/include/wx-2.8/wx/bmpbuttn.h: In member function ‘virtual void wxBitmapButtonBase::SetLabel(const wxString&)’: +/usr/include/wx-2.8/wx/bmpbuttn.h:73: error: incomplete type ‘wxWindow’ used in nested name specifier +/usr/include/wx-2.8/wx/bmpbuttn.h: In member function ‘virtual void wxBitmapButtonBase::OnSetBitmap()’: +/usr/include/wx-2.8/wx/bmpbuttn.h:78: error: ‘InvalidateBestSize’ was not declared in this scope +/usr/include/wx-2.8/wx/bmpbuttn.h:78: error: ‘Refresh’ was not declared in this scope +In file included from /usr/include/wx-2.8/wx/wx.h:71, + from BenchmarkDialog_rc.cpp:25: +/usr/include/wx-2.8/wx/checkbox.h: At global scope: +/usr/include/wx-2.8/wx/checkbox.h:59: error: invalid use of incomplete type ‘struct wxControl’ +/usr/include/wx-2.8/wx/window.h:57: error: forward declaration of ‘struct wxControl’ +/usr/include/wx-2.8/wx/checkbox.h: In member function ‘bool wxCheckBoxBase::Is3State() const’: +/usr/include/wx-2.8/wx/checkbox.h:102: error: ‘HasFlag’ was not declared in this scope +/usr/include/wx-2.8/wx/checkbox.h: In member function ‘bool wxCheckBoxBase::Is3rdStateAllowedForUser() const’: +/usr/include/wx-2.8/wx/checkbox.h:106: error: ‘HasFlag’ was not declared in this scope +/usr/include/wx-2.8/wx/checkbox.h: In member function ‘virtual void wxCheckBoxBase::DoUpdateWindowUI(wxUpdateUIEvent&)’: +/usr/include/wx-2.8/wx/checkbox.h:114: error: incomplete type ‘wxControl’ used in nested name specifier +In file included from /usr/include/wx-2.8/wx/checklst.h:17, + from /usr/include/wx-2.8/wx/wx.h:72, + from BenchmarkDialog_rc.cpp:25: +/usr/include/wx-2.8/wx/listbox.h: In member function ‘bool wxListBoxBase::HasMultipleSelection() const’: +/usr/include/wx-2.8/wx/listbox.h:95: error: ‘m_windowStyle’ was not declared in this scope +/usr/include/wx-2.8/wx/listbox.h: In member function ‘bool wxListBoxBase::IsSorted() const’: +/usr/include/wx-2.8/wx/listbox.h:100: error: ‘m_windowStyle’ was not declared in this scope +In file included from /usr/include/wx-2.8/wx/wx.h:72, + from BenchmarkDialog_rc.cpp:25: +/usr/include/wx-2.8/wx/checklst.h: At global scope: +/usr/include/wx-2.8/wx/checklst.h:30: error: expected class-name before ‘{’ token +In file included from /usr/include/wx-2.8/wx/wx.h:74, + from BenchmarkDialog_rc.cpp:25: +/usr/include/wx-2.8/wx/scrolbar.h:28: error: invalid use of incomplete type ‘struct wxControl’ +/usr/include/wx-2.8/wx/window.h:57: error: forward declaration of ‘struct wxControl’ +/usr/include/wx-2.8/wx/scrolbar.h: In member function ‘bool wxScrollBarBase::IsVertical() const’: +/usr/include/wx-2.8/wx/scrolbar.h:47: error: ‘m_windowStyle’ was not declared in this scope +In file included from /usr/include/wx-2.8/wx/wx.h:75, + from BenchmarkDialog_rc.cpp:25: +/usr/include/wx-2.8/wx/stattext.h: At global scope: +/usr/include/wx-2.8/wx/stattext.h:24: error: invalid use of incomplete type ‘struct wxControl’ +/usr/include/wx-2.8/wx/window.h:57: error: forward declaration of ‘struct wxControl’ +In file included from /usr/include/wx-2.8/wx/wx.h:76, + from BenchmarkDialog_rc.cpp:25: +/usr/include/wx-2.8/wx/statbmp.h:27: error: invalid use of incomplete type ‘struct wxControl’ +/usr/include/wx-2.8/wx/window.h:57: error: forward declaration of ‘struct wxControl’ +/usr/include/wx-2.8/wx/statbmp.h: In member function ‘virtual wxIcon wxStaticBitmapBase::GetIcon() const’: +/usr/include/wx-2.8/wx/statbmp.h:37: error: return type ‘struct wxIcon’ is incomplete +/usr/include/wx-2.8/wx/statbmp.h:40: error: invalid use of incomplete type ‘struct wxIcon’ +/usr/include/wx-2.8/wx/gdicmn.h:35: error: forward declaration of ‘struct wxIcon’ +In file included from /usr/include/wx-2.8/wx/wx.h:77, + from BenchmarkDialog_rc.cpp:25: +/usr/include/wx-2.8/wx/statbox.h: At global scope: +/usr/include/wx-2.8/wx/statbox.h:28: error: invalid use of incomplete type ‘struct wxControl’ +/usr/include/wx-2.8/wx/window.h:57: error: forward declaration of ‘struct wxControl’ +/usr/include/wx-2.8/wx/statbox.h: In member function ‘virtual void wxStaticBoxBase::GetBordersForSizer(int*, int*) const’: +/usr/include/wx-2.8/wx/statbox.h:45: error: ‘GetLabel’ was not declared in this scope +/usr/include/wx-2.8/wx/statbox.h:45: error: ‘GetCharHeight’ was not declared in this scope +In file included from /usr/include/wx-2.8/wx/wx.h:81, + from BenchmarkDialog_rc.cpp:25: +/usr/include/wx-2.8/wx/textctrl.h: At global scope: +/usr/include/wx-2.8/wx/textctrl.h:267: error: field ‘m_colText’ has incomplete type +/usr/include/wx-2.8/wx/textctrl.h:268: error: field ‘m_colBack’ has incomplete type +/usr/include/wx-2.8/wx/textctrl.h:269: error: field ‘m_font’ has incomplete type +/usr/include/wx-2.8/wx/textctrl.h: In member function ‘void wxTextAttr::SetTextColour(const wxColour&)’: +/usr/include/wx-2.8/wx/textctrl.h:222: error: ‘m_colText’ was not declared in this scope +/usr/include/wx-2.8/wx/textctrl.h: In member function ‘void wxTextAttr::SetBackgroundColour(const wxColour&)’: +/usr/include/wx-2.8/wx/textctrl.h:223: error: ‘m_colBack’ was not declared in this scope +/usr/include/wx-2.8/wx/textctrl.h: In member function ‘void wxTextAttr::SetFont(const wxFont&, long int)’: +/usr/include/wx-2.8/wx/textctrl.h:224: error: ‘m_font’ was not declared in this scope +/usr/include/wx-2.8/wx/textctrl.h: In member function ‘bool wxTextAttr::HasTextColour() const’: +/usr/include/wx-2.8/wx/textctrl.h:232: error: ‘m_colText’ was not declared in this scope +/usr/include/wx-2.8/wx/textctrl.h: In member function ‘bool wxTextAttr::HasBackgroundColour() const’: +/usr/include/wx-2.8/wx/textctrl.h:233: error: ‘m_colBack’ was not declared in this scope +/usr/include/wx-2.8/wx/textctrl.h: In member function ‘bool wxTextAttr::HasFont() const’: +/usr/include/wx-2.8/wx/textctrl.h:234: error: ‘m_font’ was not declared in this scope +/usr/include/wx-2.8/wx/textctrl.h: In member function ‘const wxColour& wxTextAttr::GetTextColour() const’: +/usr/include/wx-2.8/wx/textctrl.h:241: error: ‘m_colText’ was not declared in this scope +/usr/include/wx-2.8/wx/textctrl.h: In member function ‘const wxColour& wxTextAttr::GetBackgroundColour() const’: +/usr/include/wx-2.8/wx/textctrl.h:242: error: ‘m_colBack’ was not declared in this scope +/usr/include/wx-2.8/wx/textctrl.h: In member function ‘const wxFont& wxTextAttr::GetFont() const’: +/usr/include/wx-2.8/wx/textctrl.h:243: error: ‘m_font’ was not declared in this scope +/usr/include/wx-2.8/wx/textctrl.h: At global scope: +/usr/include/wx-2.8/wx/textctrl.h:289: error: invalid use of incomplete type ‘struct wxControl’ +/usr/include/wx-2.8/wx/window.h:57: error: forward declaration of ‘struct wxControl’ +/usr/include/wx-2.8/wx/textctrl.h: In member function ‘bool wxTextCtrlBase::IsSingleLine() const’: +/usr/include/wx-2.8/wx/textctrl.h:318: error: ‘HasFlag’ was not declared in this scope +In file included from /usr/include/wx-2.8/wx/wx.h:82, + from BenchmarkDialog_rc.cpp:25: +/usr/include/wx-2.8/wx/slider.h: At global scope: +/usr/include/wx-2.8/wx/slider.h:55: error: invalid use of incomplete type ‘struct wxControl’ +/usr/include/wx-2.8/wx/window.h:57: error: forward declaration of ‘struct wxControl’ +/usr/include/wx-2.8/wx/slider.h: In member function ‘virtual int wxSliderBase::ValueInvertOrNot(int) const’: +/usr/include/wx-2.8/wx/slider.h:111: error: ‘HasFlag’ was not declared in this scope +In file included from /usr/include/wx-2.8/wx/wx.h:83, + from BenchmarkDialog_rc.cpp:25: +/usr/include/wx-2.8/wx/gauge.h: At global scope: +/usr/include/wx-2.8/wx/gauge.h:51: error: invalid use of incomplete type ‘struct wxControl’ +/usr/include/wx-2.8/wx/window.h:57: error: forward declaration of ‘struct wxControl’ +/usr/include/wx-2.8/wx/gauge.h: In member function ‘bool wxGaugeBase::IsVertical() const’: +/usr/include/wx-2.8/wx/gauge.h:78: error: ‘HasFlag’ was not declared in this scope +In file included from /usr/include/wx-2.8/wx/wx.h:84, + from BenchmarkDialog_rc.cpp:25: +/usr/include/wx-2.8/wx/scrolwin.h: In member function ‘wxSize wxScrollHelper::GetTargetSize() const’: +/usr/include/wx-2.8/wx/scrolwin.h:185: error: invalid use of incomplete type ‘struct wxWindow’ +../../../myWindows/StdAfx.h:58: error: forward declaration of ‘struct wxWindow’ +/usr/include/wx-2.8/wx/scrolwin.h: In constructor ‘wxScrolledWindow::wxScrolledWindow()’: +/usr/include/wx-2.8/wx/scrolwin.h:274: error: no matching function for call to ‘wxScrollHelper::wxScrollHelper(wxScrolledWindow* const)’ +/usr/include/wx-2.8/wx/scrolwin.h:240: note: candidates are: wxScrollHelper::wxScrollHelper(const wxScrollHelper&) +/usr/include/wx-2.8/wx/scrolwin.h:55: note: wxScrollHelper::wxScrollHelper(wxWindow*) +/usr/include/wx-2.8/wx/scrolwin.h: In constructor ‘wxScrolledWindow::wxScrolledWindow(wxWindow*, wxWindowID, const wxPoint&, const wxSize&, long int, const wxString&)’: +/usr/include/wx-2.8/wx/scrolwin.h:281: error: no matching function for call to ‘wxScrollHelper::wxScrollHelper(wxScrolledWindow* const)’ +/usr/include/wx-2.8/wx/scrolwin.h:240: note: candidates are: wxScrollHelper::wxScrollHelper(const wxScrollHelper&) +/usr/include/wx-2.8/wx/scrolwin.h:55: note: wxScrollHelper::wxScrollHelper(wxWindow*) +In file included from /usr/include/wx-2.8/wx/wx.h:85, + from BenchmarkDialog_rc.cpp:25: +/usr/include/wx-2.8/wx/dirdlg.h: At global scope: +/usr/include/wx-2.8/wx/dirdlg.h:44: error: expected class-name before ‘{’ token +/usr/include/wx-2.8/wx/dirdlg.h: In member function ‘bool wxDirDialogBase::Create(wxWindow*, const wxString&, const wxString&, long int, const wxPoint&, const wxSize&, const wxString&)’: +/usr/include/wx-2.8/wx/dirdlg.h:69: error: ‘wxDialog’ has not been declared +In file included from /usr/include/wx-2.8/wx/toolbar.h:67, + from /usr/include/wx-2.8/wx/wx.h:86, + from BenchmarkDialog_rc.cpp:25: +/usr/include/wx-2.8/wx/tbarbase.h: At global scope: +/usr/include/wx-2.8/wx/tbarbase.h:217: error: field ‘m_bmpNormal’ has incomplete type +/usr/include/wx-2.8/wx/tbarbase.h:218: error: field ‘m_bmpDisabled’ has incomplete type +/usr/include/wx-2.8/wx/tbarbase.h: In constructor ‘wxToolBarToolBase::wxToolBarToolBase(wxToolBarBase*, int, const wxString&, const wxBitmap&, const wxBitmap&, wxItemKind, wxObject*, const wxString&, const wxString&)’: +/usr/include/wx-2.8/wx/tbarbase.h:82: error: ‘m_bmpNormal’ was not declared in this scope +/usr/include/wx-2.8/wx/tbarbase.h:83: error: ‘m_bmpDisabled’ was not declared in this scope +/usr/include/wx-2.8/wx/tbarbase.h: In constructor ‘wxToolBarToolBase::wxToolBarToolBase(wxToolBarBase*, wxControl*)’: +/usr/include/wx-2.8/wx/tbarbase.h:98: error: invalid use of incomplete type ‘struct wxControl’ +/usr/include/wx-2.8/wx/window.h:57: error: forward declaration of ‘struct wxControl’ +/usr/include/wx-2.8/wx/tbarbase.h: In member function ‘const wxBitmap& wxToolBarToolBase::GetNormalBitmap() const’: +/usr/include/wx-2.8/wx/tbarbase.h:144: error: ‘m_bmpNormal’ was not declared in this scope +/usr/include/wx-2.8/wx/tbarbase.h: In member function ‘const wxBitmap& wxToolBarToolBase::GetDisabledBitmap() const’: +/usr/include/wx-2.8/wx/tbarbase.h:145: error: ‘m_bmpDisabled’ was not declared in this scope +/usr/include/wx-2.8/wx/tbarbase.h: In member function ‘wxObject* wxToolBarToolBase::GetClientData() const’: +/usr/include/wx-2.8/wx/tbarbase.h:159: error: invalid use of incomplete type ‘struct wxControl’ +/usr/include/wx-2.8/wx/window.h:57: error: forward declaration of ‘struct wxControl’ +/usr/include/wx-2.8/wx/tbarbase.h: In member function ‘void wxToolBarToolBase::SetNormalBitmap(const wxBitmap&)’: +/usr/include/wx-2.8/wx/tbarbase.h:176: error: ‘m_bmpNormal’ was not declared in this scope +/usr/include/wx-2.8/wx/tbarbase.h: In member function ‘void wxToolBarToolBase::SetDisabledBitmap(const wxBitmap&)’: +/usr/include/wx-2.8/wx/tbarbase.h:177: error: ‘m_bmpDisabled’ was not declared in this scope +/usr/include/wx-2.8/wx/tbarbase.h: In member function ‘void wxToolBarToolBase::SetClientData(wxObject*)’: +/usr/include/wx-2.8/wx/tbarbase.h:185: error: invalid use of incomplete type ‘struct wxControl’ +/usr/include/wx-2.8/wx/window.h:57: error: forward declaration of ‘struct wxControl’ +/usr/include/wx-2.8/wx/tbarbase.h: At global scope: +/usr/include/wx-2.8/wx/tbarbase.h:238: error: invalid use of incomplete type ‘struct wxControl’ +/usr/include/wx-2.8/wx/window.h:57: error: forward declaration of ‘struct wxControl’ +/usr/include/wx-2.8/wx/tbarbase.h: In member function ‘bool wxToolBarBase::IsVertical() const’: +/usr/include/wx-2.8/wx/tbarbase.h:423: error: ‘HasFlag’ was not declared in this scope +In file included from /usr/include/wx-2.8/wx/wx.h:89, + from BenchmarkDialog_rc.cpp:25: +/usr/include/wx-2.8/wx/sizer.h: In member function ‘void wxSizerItem::SetMinSize(const wxSize&)’: +/usr/include/wx-2.8/wx/sizer.h:292: error: invalid use of incomplete type ‘struct wxWindow’ +../../../myWindows/StdAfx.h:58: error: forward declaration of ‘struct wxWindow’ +In file included from /usr/include/wx-2.8/wx/wx.h:91, + from BenchmarkDialog_rc.cpp:25: +/usr/include/wx-2.8/wx/statusbr.h: At global scope: +/usr/include/wx-2.8/wx/statusbr.h:41: error: invalid use of incomplete type ‘struct wxWindow’ +../../../myWindows/StdAfx.h:58: error: forward declaration of ‘struct wxWindow’ +In file included from /usr/include/wx-2.8/wx/choicdlg.h:17, + from /usr/include/wx-2.8/wx/wx.h:92, + from BenchmarkDialog_rc.cpp:25: +/usr/include/wx-2.8/wx/generic/choicdgg.h:40: error: expected class-name before ‘{’ token +/usr/include/wx-2.8/wx/generic/choicdgg.h: In member function ‘char* wxSingleChoiceDialog::GetSelectionClientData() const’: +/usr/include/wx-2.8/wx/generic/choicdgg.h:141: error: ‘m_clientData’ was not declared in this scope +In file included from /usr/include/wx-2.8/wx/generic/textdlgg.h:22, + from /usr/include/wx-2.8/wx/textdlg.h:15, + from /usr/include/wx-2.8/wx/wx.h:93, + from BenchmarkDialog_rc.cpp:25: +/usr/include/wx-2.8/wx/valtext.h: In member function ‘bool wxTextValidator::CheckValidator() const’: +/usr/include/wx-2.8/wx/valtext.h:103: error: incomplete type ‘wxTextCtrl’ used in nested name specifier +In file included from /usr/include/wx-2.8/wx/textdlg.h:15, + from /usr/include/wx-2.8/wx/wx.h:93, + from BenchmarkDialog_rc.cpp:25: +/usr/include/wx-2.8/wx/generic/textdlgg.h: At global scope: +/usr/include/wx-2.8/wx/generic/textdlgg.h:37: error: expected class-name before ‘{’ token +/usr/include/wx-2.8/wx/generic/textdlgg.h: In member function ‘wxTextValidator* wxTextEntryDialog::GetTextValidator()’: +/usr/include/wx-2.8/wx/generic/textdlgg.h:52: error: invalid use of incomplete type ‘struct wxTextCtrl’ +/usr/include/wx-2.8/wx/log.h:72: error: forward declaration of ‘struct wxTextCtrl’ +In file included from /usr/include/wx-2.8/wx/wx.h:94, + from BenchmarkDialog_rc.cpp:25: +/usr/include/wx-2.8/wx/filedlg.h: At global scope: +/usr/include/wx-2.8/wx/filedlg.h:73: error: expected class-name before ‘{’ token +/usr/include/wx-2.8/wx/filedlg.h: In member function ‘bool wxFileDialogBase::HasFdFlag(int) const’: +/usr/include/wx-2.8/wx/filedlg.h:101: error: ‘HasFlag’ was not declared in this scope +In file included from BenchmarkDialog_rc.cpp:35: +../../../Windows/Control/DialogImpl.h: At global scope: +../../../Windows/Control/DialogImpl.h:21: error: expected class-name before ‘{’ token +../../../Windows/Control/DialogImpl.h:22: error: field ‘_timer’ has incomplete type +../../../Windows/Control/DialogImpl.h: In member function ‘UINT_PTR NWindows::NControl::CModalDialogImpl::SetTimer(UINT_PTR, unsigned int)’: +../../../Windows/Control/DialogImpl.h:55: error: ‘_timer’ was not declared in this scope +../../../Windows/Control/DialogImpl.h: In member function ‘void NWindows::NControl::CModalDialogImpl::KillTimer(UINT_PTR)’: +../../../Windows/Control/DialogImpl.h:60: error: ‘_timer’ was not declared in this scope +BenchmarkDialog_rc.cpp: In constructor ‘CBenchmarkDialogImpl::CBenchmarkDialogImpl(NWindows::NControl::CModalDialog*, wxWindow*, int)’: +BenchmarkDialog_rc.cpp:119: error: invalid use of incomplete type ‘struct wxButton’ +/usr/include/wx-2.8/wx/sizer.h:23: error: forward declaration of ‘struct wxButton’ +BenchmarkDialog_rc.cpp:120: error: invalid use of incomplete type ‘struct wxButton’ +/usr/include/wx-2.8/wx/sizer.h:23: error: forward declaration of ‘struct wxButton’ +BenchmarkDialog_rc.cpp:124: error: ‘wxComboBox’ was not declared in this scope +BenchmarkDialog_rc.cpp:124: error: ‘chcDicoSize’ was not declared in this scope +BenchmarkDialog_rc.cpp:124: error: expected type-specifier before ‘wxComboBox’ +BenchmarkDialog_rc.cpp:124: error: expected `;' before ‘wxComboBox’ +BenchmarkDialog_rc.cpp:127: error: ‘chcThread’ was not declared in this scope +BenchmarkDialog_rc.cpp:127: error: expected type-specifier before ‘wxComboBox’ +BenchmarkDialog_rc.cpp:127: error: expected `;' before ‘wxComboBox’ +BenchmarkDialog_rc.cpp:134: error: expected type-specifier before ‘wxStaticText’ +BenchmarkDialog_rc.cpp:134: error: expected `)' before ‘wxStaticText’ +BenchmarkDialog_rc.cpp:134: error: invalid conversion from ‘int*’ to ‘int’ +BenchmarkDialog_rc.cpp:134: error: initializing argument 1 of ‘wxSizerItem* wxSizer::Add(int, int, int, int, int, wxObject*)’ +BenchmarkDialog_rc.cpp:135: error: expected type-specifier before ‘wxStaticText’ +BenchmarkDialog_rc.cpp:135: error: expected `)' before ‘wxStaticText’ +BenchmarkDialog_rc.cpp:135: error: invalid conversion from ‘int*’ to ‘int’ +BenchmarkDialog_rc.cpp:135: error: initializing argument 1 of ‘wxSizerItem* wxSizer::Add(int, int, int, int, int, wxObject*)’ +BenchmarkDialog_rc.cpp:138: error: expected type-specifier before ‘wxStaticText’ +BenchmarkDialog_rc.cpp:138: error: expected `)' before ‘wxStaticText’ +BenchmarkDialog_rc.cpp:138: error: invalid conversion from ‘int*’ to ‘int’ +BenchmarkDialog_rc.cpp:138: error: initializing argument 1 of ‘wxSizerItem* wxSizer::Add(int, int, int, int, int, wxObject*)’ +BenchmarkDialog_rc.cpp:139: error: expected type-specifier before ‘wxStaticText’ +BenchmarkDialog_rc.cpp:139: error: expected `)' before ‘wxStaticText’ +BenchmarkDialog_rc.cpp:139: error: invalid conversion from ‘int*’ to ‘int’ +BenchmarkDialog_rc.cpp:139: error: initializing argument 1 of ‘wxSizerItem* wxSizer::Add(int, int, int, int, int, wxObject*)’ +BenchmarkDialog_rc.cpp:142: error: expected type-specifier before ‘wxStaticText’ +BenchmarkDialog_rc.cpp:142: error: expected `)' before ‘wxStaticText’ +BenchmarkDialog_rc.cpp:142: error: invalid conversion from ‘int*’ to ‘int’ +BenchmarkDialog_rc.cpp:142: error: initializing argument 1 of ‘wxSizerItem* wxSizer::Add(int, int, int, int, int, wxObject*)’ +BenchmarkDialog_rc.cpp:152: error: invalid use of incomplete type ‘struct wxStaticBox’ +/usr/include/wx-2.8/wx/sizer.h:788: error: forward declaration of ‘struct wxStaticBox’ +BenchmarkDialog_rc.cpp:154: error: expected type-specifier before ‘wxStaticText’ +BenchmarkDialog_rc.cpp:154: error: expected `)' before ‘wxStaticText’ +BenchmarkDialog_rc.cpp:154: error: invalid conversion from ‘int*’ to ‘int’ +BenchmarkDialog_rc.cpp:154: error: initializing argument 1 of ‘wxSizerItem* wxSizer::Add(int, int, int, int, int, wxObject*)’ +BenchmarkDialog_rc.cpp:155: error: expected type-specifier before ‘wxStaticText’ +BenchmarkDialog_rc.cpp:155: error: expected `)' before ‘wxStaticText’ +BenchmarkDialog_rc.cpp:155: error: invalid conversion from ‘int*’ to ‘int’ +BenchmarkDialog_rc.cpp:155: error: initializing argument 1 of ‘wxSizerItem* wxSizer::Add(int, int, int, int, int, wxObject*)’ +BenchmarkDialog_rc.cpp:156: error: expected type-specifier before ‘wxStaticText’ +BenchmarkDialog_rc.cpp:156: error: expected `)' before ‘wxStaticText’ +BenchmarkDialog_rc.cpp:156: error: invalid conversion from ‘int*’ to ‘int’ +BenchmarkDialog_rc.cpp:156: error: initializing argument 1 of ‘wxSizerItem* wxSizer::Add(int, int, int, int, int, wxObject*)’ +BenchmarkDialog_rc.cpp:157: error: expected type-specifier before ‘wxStaticText’ +BenchmarkDialog_rc.cpp:157: error: expected `)' before ‘wxStaticText’ +BenchmarkDialog_rc.cpp:157: error: invalid conversion from ‘int*’ to ‘int’ +BenchmarkDialog_rc.cpp:157: error: initializing argument 1 of ‘wxSizerItem* wxSizer::Add(int, int, int, int, int, wxObject*)’ +BenchmarkDialog_rc.cpp:158: error: expected type-specifier before ‘wxStaticText’ +BenchmarkDialog_rc.cpp:158: error: expected `)' before ‘wxStaticText’ +BenchmarkDialog_rc.cpp:158: error: invalid conversion from ‘int*’ to ‘int’ +BenchmarkDialog_rc.cpp:158: error: initializing argument 1 of ‘wxSizerItem* wxSizer::Add(int, int, int, int, int, wxObject*)’ +BenchmarkDialog_rc.cpp:164: error: invalid use of incomplete type ‘struct wxStaticBox’ +/usr/include/wx-2.8/wx/sizer.h:788: error: forward declaration of ‘struct wxStaticBox’ +BenchmarkDialog_rc.cpp:166: error: expected type-specifier before ‘wxStaticText’ +BenchmarkDialog_rc.cpp:166: error: expected `)' before ‘wxStaticText’ +BenchmarkDialog_rc.cpp:166: error: invalid conversion from ‘int*’ to ‘int’ +BenchmarkDialog_rc.cpp:166: error: initializing argument 1 of ‘wxSizerItem* wxSizer::Add(int, int, int, int, int, wxObject*)’ +BenchmarkDialog_rc.cpp:167: error: expected type-specifier before ‘wxStaticText’ +BenchmarkDialog_rc.cpp:167: error: expected `)' before ‘wxStaticText’ +BenchmarkDialog_rc.cpp:167: error: invalid conversion from ‘int*’ to ‘int’ +BenchmarkDialog_rc.cpp:167: error: initializing argument 1 of ‘wxSizerItem* wxSizer::Add(int, int, int, int, int, wxObject*)’ +BenchmarkDialog_rc.cpp:168: error: expected type-specifier before ‘wxStaticText’ +BenchmarkDialog_rc.cpp:168: error: expected `)' before ‘wxStaticText’ +BenchmarkDialog_rc.cpp:168: error: invalid conversion from ‘int*’ to ‘int’ +BenchmarkDialog_rc.cpp:168: error: initializing argument 1 of ‘wxSizerItem* wxSizer::Add(int, int, int, int, int, wxObject*)’ +BenchmarkDialog_rc.cpp:169: error: expected type-specifier before ‘wxStaticText’ +BenchmarkDialog_rc.cpp:169: error: expected `)' before ‘wxStaticText’ +BenchmarkDialog_rc.cpp:169: error: invalid conversion from ‘int*’ to ‘int’ +BenchmarkDialog_rc.cpp:169: error: initializing argument 1 of ‘wxSizerItem* wxSizer::Add(int, int, int, int, int, wxObject*)’ +BenchmarkDialog_rc.cpp:170: error: expected type-specifier before ‘wxStaticText’ +BenchmarkDialog_rc.cpp:170: error: expected `)' before ‘wxStaticText’ +BenchmarkDialog_rc.cpp:170: error: invalid conversion from ‘int*’ to ‘int’ +BenchmarkDialog_rc.cpp:170: error: initializing argument 1 of ‘wxSizerItem* wxSizer::Add(int, int, int, int, int, wxObject*)’ +BenchmarkDialog_rc.cpp:173: error: expected type-specifier before ‘wxStaticText’ +BenchmarkDialog_rc.cpp:173: error: expected `)' before ‘wxStaticText’ +BenchmarkDialog_rc.cpp:173: error: invalid conversion from ‘int*’ to ‘int’ +BenchmarkDialog_rc.cpp:173: error: initializing argument 1 of ‘wxSizerItem* wxSizer::Add(int, int, int, int, int, wxObject*)’ +BenchmarkDialog_rc.cpp:174: error: expected type-specifier before ‘wxStaticText’ +BenchmarkDialog_rc.cpp:174: error: expected `)' before ‘wxStaticText’ +BenchmarkDialog_rc.cpp:174: error: invalid conversion from ‘int*’ to ‘int’ +BenchmarkDialog_rc.cpp:174: error: initializing argument 1 of ‘wxSizerItem* wxSizer::Add(int, int, int, int, int, wxObject*)’ +BenchmarkDialog_rc.cpp:175: error: expected type-specifier before ‘wxStaticText’ +BenchmarkDialog_rc.cpp:175: error: expected `)' before ‘wxStaticText’ +BenchmarkDialog_rc.cpp:175: error: invalid conversion from ‘int*’ to ‘int’ +BenchmarkDialog_rc.cpp:175: error: initializing argument 1 of ‘wxSizerItem* wxSizer::Add(int, int, int, int, int, wxObject*)’ +BenchmarkDialog_rc.cpp:176: error: expected type-specifier before ‘wxStaticText’ +BenchmarkDialog_rc.cpp:176: error: expected `)' before ‘wxStaticText’ +BenchmarkDialog_rc.cpp:176: error: invalid conversion from ‘int*’ to ‘int’ +BenchmarkDialog_rc.cpp:176: error: initializing argument 1 of ‘wxSizerItem* wxSizer::Add(int, int, int, int, int, wxObject*)’ +BenchmarkDialog_rc.cpp:177: error: expected type-specifier before ‘wxStaticText’ +BenchmarkDialog_rc.cpp:177: error: expected `)' before ‘wxStaticText’ +BenchmarkDialog_rc.cpp:177: error: invalid conversion from ‘int*’ to ‘int’ +BenchmarkDialog_rc.cpp:177: error: initializing argument 1 of ‘wxSizerItem* wxSizer::Add(int, int, int, int, int, wxObject*)’ +BenchmarkDialog_rc.cpp:184: error: invalid use of incomplete type ‘struct wxStaticBox’ +/usr/include/wx-2.8/wx/sizer.h:788: error: forward declaration of ‘struct wxStaticBox’ +BenchmarkDialog_rc.cpp:186: error: expected type-specifier before ‘wxStaticText’ +BenchmarkDialog_rc.cpp:186: error: expected `)' before ‘wxStaticText’ +BenchmarkDialog_rc.cpp:186: error: invalid conversion from ‘int*’ to ‘int’ +BenchmarkDialog_rc.cpp:186: error: initializing argument 1 of ‘wxSizerItem* wxSizer::Add(int, int, int, int, int, wxObject*)’ +BenchmarkDialog_rc.cpp:187: error: expected type-specifier before ‘wxStaticText’ +BenchmarkDialog_rc.cpp:187: error: expected `)' before ‘wxStaticText’ +BenchmarkDialog_rc.cpp:187: error: invalid conversion from ‘int*’ to ‘int’ +BenchmarkDialog_rc.cpp:187: error: initializing argument 1 of ‘wxSizerItem* wxSizer::Add(int, int, int, int, int, wxObject*)’ +BenchmarkDialog_rc.cpp:188: error: expected type-specifier before ‘wxStaticText’ +BenchmarkDialog_rc.cpp:188: error: expected `)' before ‘wxStaticText’ +BenchmarkDialog_rc.cpp:188: error: invalid conversion from ‘int*’ to ‘int’ +BenchmarkDialog_rc.cpp:188: error: initializing argument 1 of ‘wxSizerItem* wxSizer::Add(int, int, int, int, int, wxObject*)’ +BenchmarkDialog_rc.cpp:189: error: expected type-specifier before ‘wxStaticText’ +BenchmarkDialog_rc.cpp:189: error: expected `)' before ‘wxStaticText’ +BenchmarkDialog_rc.cpp:189: error: invalid conversion from ‘int*’ to ‘int’ +BenchmarkDialog_rc.cpp:189: error: initializing argument 1 of ‘wxSizerItem* wxSizer::Add(int, int, int, int, int, wxObject*)’ +BenchmarkDialog_rc.cpp:190: error: expected type-specifier before ‘wxStaticText’ +BenchmarkDialog_rc.cpp:190: error: expected `)' before ‘wxStaticText’ +BenchmarkDialog_rc.cpp:190: error: invalid conversion from ‘int*’ to ‘int’ +BenchmarkDialog_rc.cpp:190: error: initializing argument 1 of ‘wxSizerItem* wxSizer::Add(int, int, int, int, int, wxObject*)’ +BenchmarkDialog_rc.cpp:193: error: expected type-specifier before ‘wxStaticText’ +BenchmarkDialog_rc.cpp:193: error: expected `)' before ‘wxStaticText’ +BenchmarkDialog_rc.cpp:193: error: invalid conversion from ‘int*’ to ‘int’ +BenchmarkDialog_rc.cpp:193: error: initializing argument 1 of ‘wxSizerItem* wxSizer::Add(int, int, int, int, int, wxObject*)’ +BenchmarkDialog_rc.cpp:194: error: expected type-specifier before ‘wxStaticText’ +BenchmarkDialog_rc.cpp:194: error: expected `)' before ‘wxStaticText’ +BenchmarkDialog_rc.cpp:194: error: invalid conversion from ‘int*’ to ‘int’ +BenchmarkDialog_rc.cpp:194: error: initializing argument 1 of ‘wxSizerItem* wxSizer::Add(int, int, int, int, int, wxObject*)’ +BenchmarkDialog_rc.cpp:195: error: expected type-specifier before ‘wxStaticText’ +BenchmarkDialog_rc.cpp:195: error: expected `)' before ‘wxStaticText’ +BenchmarkDialog_rc.cpp:195: error: invalid conversion from ‘int*’ to ‘int’ +BenchmarkDialog_rc.cpp:195: error: initializing argument 1 of ‘wxSizerItem* wxSizer::Add(int, int, int, int, int, wxObject*)’ +BenchmarkDialog_rc.cpp:196: error: expected type-specifier before ‘wxStaticText’ +BenchmarkDialog_rc.cpp:196: error: expected `)' before ‘wxStaticText’ +BenchmarkDialog_rc.cpp:196: error: invalid conversion from ‘int*’ to ‘int’ +BenchmarkDialog_rc.cpp:196: error: initializing argument 1 of ‘wxSizerItem* wxSizer::Add(int, int, int, int, int, wxObject*)’ +BenchmarkDialog_rc.cpp:197: error: expected type-specifier before ‘wxStaticText’ +BenchmarkDialog_rc.cpp:197: error: expected `)' before ‘wxStaticText’ +BenchmarkDialog_rc.cpp:197: error: invalid conversion from ‘int*’ to ‘int’ +BenchmarkDialog_rc.cpp:197: error: initializing argument 1 of ‘wxSizerItem* wxSizer::Add(int, int, int, int, int, wxObject*)’ +BenchmarkDialog_rc.cpp:203: error: invalid use of incomplete type ‘struct wxStaticBox’ +/usr/include/wx-2.8/wx/sizer.h:788: error: forward declaration of ‘struct wxStaticBox’ +BenchmarkDialog_rc.cpp:204: error: expected type-specifier before ‘wxStaticText’ +BenchmarkDialog_rc.cpp:204: error: expected `)' before ‘wxStaticText’ +BenchmarkDialog_rc.cpp:204: error: invalid conversion from ‘int*’ to ‘int’ +BenchmarkDialog_rc.cpp:204: error: initializing argument 1 of ‘wxSizerItem* wxSizer::Add(int, int, int, int, int, wxObject*)’ +BenchmarkDialog_rc.cpp:205: error: expected type-specifier before ‘wxStaticText’ +BenchmarkDialog_rc.cpp:205: error: expected `)' before ‘wxStaticText’ +BenchmarkDialog_rc.cpp:205: error: invalid conversion from ‘int*’ to ‘int’ +BenchmarkDialog_rc.cpp:205: error: initializing argument 1 of ‘wxSizerItem* wxSizer::Add(int, int, int, int, int, wxObject*)’ +BenchmarkDialog_rc.cpp:206: error: expected type-specifier before ‘wxStaticText’ +BenchmarkDialog_rc.cpp:206: error: expected `)' before ‘wxStaticText’ +BenchmarkDialog_rc.cpp:206: error: invalid conversion from ‘int*’ to ‘int’ +BenchmarkDialog_rc.cpp:206: error: initializing argument 1 of ‘wxSizerItem* wxSizer::Add(int, int, int, int, int, wxObject*)’ +BenchmarkDialog_rc.cpp:207: error: expected type-specifier before ‘wxStaticText’ +BenchmarkDialog_rc.cpp:207: error: expected `)' before ‘wxStaticText’ +BenchmarkDialog_rc.cpp:207: error: invalid conversion from ‘int*’ to ‘int’ +BenchmarkDialog_rc.cpp:207: error: initializing argument 1 of ‘wxSizerItem* wxSizer::Add(int, int, int, int, int, wxObject*)’ +BenchmarkDialog_rc.cpp:213: error: expected type-specifier before ‘wxStaticText’ +BenchmarkDialog_rc.cpp:213: error: expected `)' before ‘wxStaticText’ +BenchmarkDialog_rc.cpp:213: error: invalid conversion from ‘int*’ to ‘int’ +BenchmarkDialog_rc.cpp:213: error: initializing argument 1 of ‘wxSizerItem* wxSizer::Add(int, int, int, int, int, wxObject*)’ +BenchmarkDialog_rc.cpp:214: error: expected type-specifier before ‘wxStaticText’ +BenchmarkDialog_rc.cpp:214: error: expected `)' before ‘wxStaticText’ +BenchmarkDialog_rc.cpp:214: error: invalid conversion from ‘int*’ to ‘int’ +BenchmarkDialog_rc.cpp:214: error: initializing argument 1 of ‘wxSizerItem* wxSizer::Add(int, int, int, int, int, wxObject*)’ +BenchmarkDialog_rc.cpp:215: error: expected type-specifier before ‘wxStaticText’ +BenchmarkDialog_rc.cpp:215: error: expected `)' before ‘wxStaticText’ +BenchmarkDialog_rc.cpp:215: error: invalid conversion from ‘int*’ to ‘int’ +BenchmarkDialog_rc.cpp:215: error: initializing argument 1 of ‘wxSizerItem* wxSizer::Add(int, int, int, int, int, wxObject*)’ +BenchmarkDialog_rc.cpp:218: error: expected type-specifier before ‘wxStaticText’ +BenchmarkDialog_rc.cpp:218: error: expected `)' before ‘wxStaticText’ +BenchmarkDialog_rc.cpp:218: error: invalid conversion from ‘int*’ to ‘int’ +BenchmarkDialog_rc.cpp:218: error: initializing argument 1 of ‘wxSizerItem* wxSizer::Add(int, int, int, int, int, wxObject*)’ +BenchmarkDialog_rc.cpp:219: error: expected type-specifier before ‘wxStaticText’ +BenchmarkDialog_rc.cpp:219: error: expected `)' before ‘wxStaticText’ +BenchmarkDialog_rc.cpp:219: error: invalid conversion from ‘int*’ to ‘int’ +BenchmarkDialog_rc.cpp:219: error: initializing argument 1 of ‘wxSizerItem* wxSizer::Add(int, int, int, int, int, wxObject*)’ +BenchmarkDialog_rc.cpp:220: error: expected type-specifier before ‘wxStaticText’ +BenchmarkDialog_rc.cpp:220: error: expected `)' before ‘wxStaticText’ +BenchmarkDialog_rc.cpp:220: error: invalid conversion from ‘int*’ to ‘int’ +BenchmarkDialog_rc.cpp:220: error: initializing argument 1 of ‘wxSizerItem* wxSizer::Add(int, int, int, int, int, wxObject*)’ +BenchmarkDialog_rc.cpp:236: error: ‘CreateButtonSizer’ was not declared in this scope +BenchmarkDialog_rc.cpp:240: error: ‘SetSizer’ was not declared in this scope +BenchmarkDialog_rc.cpp:241: error: no matching function for call to ‘wxSizer::SetSizeHints(CBenchmarkDialogImpl* const)’ +/usr/include/wx-2.8/wx/sizer.h:572: note: candidates are: void wxSizer::SetSizeHints(wxWindow*) +BenchmarkDialog_rc.cpp: At global scope: +BenchmarkDialog_rc.cpp:257: error: ‘wxDialog’ has not been declared +BenchmarkDialog_rc.cpp:258: error: invalid static_cast from type ‘void (NWindows::NControl::CModalDialogImpl::*)(wxTimerEvent&)’ to type ‘void (wxEvtHandler::*)(wxTimerEvent&)’ +BenchmarkDialog_rc.cpp:259: error: invalid static_cast from type ‘void (NWindows::NControl::CModalDialogImpl::*)(wxCommandEvent&)’ to type ‘void (wxEvtHandler::*)(wxCommandEvent&)’ +BenchmarkDialog_rc.cpp:260: error: invalid static_cast from type ‘void (NWindows::NControl::CModalDialogImpl::*)(wxCommandEvent&)’ to type ‘void (wxEvtHandler::*)(wxCommandEvent&)’ +BenchmarkDialog_rc.cpp:261: error: invalid static_cast from type ‘void (NWindows::NControl::CModalDialogImpl::*)(wxCommandEvent&)’ to type ‘void (wxEvtHandler::*)(wxCommandEvent&)’ +make: *** [BenchmarkDialog_rc.o] Error 1 diff --git a/CPP/7zip/UI/GUI/makefile b/CPP/7zip/UI/GUI/makefile new file mode 100644 index 0000000..7c18f6c --- /dev/null +++ b/CPP/7zip/UI/GUI/makefile @@ -0,0 +1,139 @@ +PROG=../../../../bin/7zG$(BINSUFFIX) + +LOCAL_FLAGS=\ + -DUNICODE -D_UNICODE \ + -DLANG \ + -DEXTERNAL_LZMA \ + -DEXTERNAL_CODECS \ + -DBENCH_MT \ + -I. \ + `wx-config --unicode=yes --cxxflags` + +include ../../../../makefile.crc32 +include ../../../../makefile.machine + +PCH_NAME=$(PRE_COMPILED_HEADER) + +LIBS=`wx-config --unicode=yes --libs` $(LOCAL_LIBS_DLL) + +GUI_OBJS = \ + BenchmarkDialog.o \ + BenchmarkDialog_rc.o \ + CompressDialog.o \ + CompressDialog_rc.o \ + ExtractDialog.o \ + ExtractDialog_rc.o \ + ExtractGUI.o \ + GUI.o \ + wxGUI.o \ + UpdateCallbackGUI.o \ + UpdateGUI.o \ + +COMMON_OBJS = \ +CommandLineParser.o \ +CRC.o \ +IntToString.o \ +Lang.o \ +ListFileUtils.o \ +MyString.o \ +MyVector.o \ +StringConvert.o \ +StringToInt.o \ +TextConfig.o \ +UTFConvert.o \ +Wildcard.o \ + +# CommonDialog.o MemoryLock.o ResourceString.o ResourceString.o Shell.o +WIN_OBJS = \ +DLL.o \ +Error.o \ +FileDir.o \ +FileFind.o \ +FileIO.o \ +FileName.o \ +PropVariant.o \ +PropVariantConversions.o \ +Registry.o \ +Synchronization.o \ +System.o \ +Time.o \ +Window.o \ + +WIN_CTRL_OBJS = \ +Dialog.o \ +Controls.o \ + +7ZIP_COMMON_OBJS = \ +CreateCoder.o \ +FilePathAutoRename.o \ +FileStreams.o \ +FilterCoder.o \ +ProgressUtils.o \ +StreamUtils.o \ + +UI_COMMON_OBJS = \ +ArchiveCommandLine.o \ +ArchiveExtractCallback.o \ +ArchiveOpenCallback.o \ +Bench.o \ +DefaultName.o \ +EnumDirItems.o \ +Extract.o \ +ExtractingFilePath.o \ +LoadCodecs.o \ +OpenArchive.o \ +PropIDUtils.o \ +SetProperties.o \ +SortUtils.o \ +TempFiles.o \ +Update.o \ +UpdateAction.o \ +UpdateCallback.o \ +UpdatePair.o \ +UpdateProduce.o \ +WorkDir.o \ +ZipRegistry.o \ + +AR_COMMON_OBJS = \ + OutStreamWithCRC.o + +FM_OBJS = \ +ExtractCallback.o \ +FormatUtils.o \ +LangUtils.o \ +ProgramLocation.o \ +SplitUtils.o \ +StringUtils.o \ +MessagesDialog.o \ +MessagesDialog_rc.o \ +OverwriteDialog.o \ +OverwriteDialog_rc.o \ +PasswordDialog.o \ +PasswordDialog_rc.o \ +ProgressDialog2.o \ +ProgressDialog2_rc.o \ + + +C_OBJS = \ + Alloc.o \ + Threads.o \ + +OBJS=\ + $(GUI_OBJS) \ + $(COMMON_OBJS) \ + $(WIN_OBJS) \ + $(WIN_CTRL_OBJS) \ + $(7ZIP_COMMON_OBJS) \ + $(UI_COMMON_OBJS) \ + $(AR_COMMON_OBJS) \ + $(FM_OBJS)\ + MyMessages.o \ + CopyCoder.o \ + $(C_OBJS) \ + MyWindows.o \ + wine_date_and_time.o \ + wine_GetXXXDefaultLangID.o \ + $(OBJ_CRC32) + +include ../../../../makefile.glb + diff --git a/CPP/7zip/UI/GUI/makefile.depend b/CPP/7zip/UI/GUI/makefile.depend new file mode 100644 index 0000000..6897d89 --- /dev/null +++ b/CPP/7zip/UI/GUI/makefile.depend @@ -0,0 +1,2675 @@ +CompressDialog.o: CompressDialog.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../../Common/IntToString.h \ + ../../../Common/StringConvert.h ../../../Common/MyWindows.h \ + ../../../Common/MyString.h ../../../Common/MyVector.h \ + ../../../Common/Defs.h ../../../Windows/FileDir.h \ + ../../../Windows/../Common/MyString.h ../../../Windows/Defs.h \ + ../../../Windows/../Common/MyWindows.h ../../../Windows/FileName.h \ + ../../../Windows/../../C/Types.h ../../../Windows/System.h \ + ../../../Windows/../Common/Types.h ../FileManager/BrowseDialog.h \ + ../../../Windows/CommonDialog.h ../../../Common/MyString.h \ + ../../../Windows/Shell.h ../../../Windows/Defs.h \ + ../FileManager/FormatUtils.h ../FileManager/HelpUtils.h \ + ../FileManager/SplitUtils.h ../../../Windows/Control/ComboBox.h \ + ../../../Windows/Window.h ../../../Windows/Control/Window2.h \ + ../Explorer/MyMessages.h ../Common/ZipRegistry.h ../Common/ExtractMode.h \ + CompressDialog.h ../../../Windows/Control/Edit.h ../Common/LoadCodecs.h \ + ../Common/../../../Common/Types.h ../Common/../../../Common/MyCom.h \ + ../Common/../../../Common/MyWindows.h \ + ../Common/../../../Common/MyString.h ../Common/../../../Common/Buffer.h \ + ../Common/../../../Common/Defs.h ../Common/../../ICoder.h \ + ../Common/../../IStream.h ../Common/../../../Common/MyUnknown.h \ + ../Common/../../../Common/Types.h ../Common/../../IDecl.h \ + ../Common/../../../Windows/DLL.h \ + ../Common/../../../Windows/../Common/MyString.h \ + ../Common/../../Archive/IArchive.h \ + ../Common/../../Archive/../IProgress.h \ + ../Common/../../Archive/../../Common/MyUnknown.h \ + ../Common/../../Archive/../../Common/Types.h \ + ../Common/../../Archive/../IDecl.h ../Common/../../Archive/../IStream.h \ + ../Common/../../Archive/../PropID.h ../FileManager/DialogSize.h \ + ../../../Windows/Control/Dialog.h CompressDialogRes.h \ + ../FileManager/LangUtils.h ../../../Common/Lang.h \ + ../../../Windows/ResourceString.h +CompressDialog_rc.o: CompressDialog_rc.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h /usr/include/wx-2.8/wx/wxprec.h \ + /usr/include/wx-2.8/wx/defs.h /usr/include/wx-2.8/wx/platform.h \ + /usr/lib/wx/include/gtk2-unicode-release-2.8/wx/setup.h \ + /usr/include/wx-2.8/wx/chkconf.h /usr/include/wx-2.8/wx/features.h \ + /usr/include/wx-2.8/wx/version.h /usr/include/wx-2.8/wx/cpp.h \ + /usr/include/wx-2.8/wx/dlimpexp.h /usr/include/wx-2.8/wx/debug.h \ + /usr/include/wx-2.8/wx/wxchar.h /usr/include/wx-2.8/wx/wx.h \ + /usr/include/wx-2.8/wx/object.h /usr/include/wx-2.8/wx/memory.h \ + /usr/include/wx-2.8/wx/string.h /usr/include/wx-2.8/wx/buffer.h \ + /usr/include/wx-2.8/wx/strconv.h /usr/include/wx-2.8/wx/fontenc.h \ + /usr/include/wx-2.8/wx/beforestd.h /usr/include/wx-2.8/wx/afterstd.h \ + /usr/include/wx-2.8/wx/iosfwrap.h /usr/include/wx-2.8/wx/msgout.h \ + /usr/include/wx-2.8/wx/dynarray.h /usr/include/wx-2.8/wx/list.h \ + /usr/include/wx-2.8/wx/hash.h /usr/include/wx-2.8/wx/hashmap.h \ + /usr/include/wx-2.8/wx/arrstr.h /usr/include/wx-2.8/wx/intl.h \ + /usr/include/wx-2.8/wx/log.h /usr/include/wx-2.8/wx/generic/logg.h \ + /usr/include/wx-2.8/wx/event.h /usr/include/wx-2.8/wx/clntdata.h \ + /usr/include/wx-2.8/wx/vector.h /usr/include/wx-2.8/wx/gdicmn.h \ + /usr/include/wx-2.8/wx/math.h /usr/include/wx-2.8/wx/cursor.h \ + /usr/include/wx-2.8/wx/gtk/cursor.h /usr/include/wx-2.8/wx/utils.h \ + /usr/include/wx-2.8/wx/filefn.h /usr/include/wx-2.8/wx/longlong.h \ + /usr/include/wx-2.8/wx/platinfo.h /usr/include/wx-2.8/wx/thread.h \ + /usr/include/wx-2.8/wx/app.h /usr/include/wx-2.8/wx/build.h \ + /usr/include/wx-2.8/wx/init.h /usr/include/wx-2.8/wx/gtk/app.h \ + /usr/include/wx-2.8/wx/stream.h /usr/include/wx-2.8/wx/stopwatch.h \ + /usr/include/wx-2.8/wx/module.h /usr/include/wx-2.8/wx/window.h \ + /usr/include/wx-2.8/wx/font.h /usr/include/wx-2.8/wx/gdiobj.h \ + /usr/include/wx-2.8/wx/gtk/font.h /usr/include/wx-2.8/wx/colour.h \ + /usr/include/wx-2.8/wx/variant.h /usr/include/wx-2.8/wx/datetime.h \ + /usr/include/wx-2.8/wx/gtk/colour.h /usr/include/wx-2.8/wx/region.h \ + /usr/include/wx-2.8/wx/gtk/region.h /usr/include/wx-2.8/wx/validate.h \ + /usr/include/wx-2.8/wx/palette.h \ + /usr/include/wx-2.8/wx/generic/paletteg.h /usr/include/wx-2.8/wx/accel.h \ + /usr/include/wx-2.8/wx/gtk/accel.h \ + /usr/include/wx-2.8/wx/generic/accel.h \ + /usr/include/wx-2.8/wx/gtk/window.h /usr/include/wx-2.8/wx/containr.h \ + /usr/include/wx-2.8/wx/panel.h /usr/include/wx-2.8/wx/generic/panelg.h \ + /usr/include/wx-2.8/wx/toplevel.h /usr/include/wx-2.8/wx/iconbndl.h \ + /usr/include/wx-2.8/wx/gtk/toplevel.h /usr/include/wx-2.8/wx/frame.h \ + /usr/include/wx-2.8/wx/gtk/frame.h /usr/include/wx-2.8/wx/bitmap.h \ + /usr/include/wx-2.8/wx/gtk/bitmap.h /usr/include/wx-2.8/wx/image.h \ + /usr/include/wx-2.8/wx/imagbmp.h /usr/include/wx-2.8/wx/imagpng.h \ + /usr/include/wx-2.8/wx/imaggif.h /usr/include/wx-2.8/wx/imagpcx.h \ + /usr/include/wx-2.8/wx/imagjpeg.h /usr/include/wx-2.8/wx/imagtga.h \ + /usr/include/wx-2.8/wx/imagtiff.h /usr/include/wx-2.8/wx/imagpnm.h \ + /usr/include/wx-2.8/wx/imagxpm.h /usr/include/wx-2.8/wx/imagiff.h \ + /usr/include/wx-2.8/wx/dc.h /usr/include/wx-2.8/wx/brush.h \ + /usr/include/wx-2.8/wx/gtk/brush.h /usr/include/wx-2.8/wx/pen.h \ + /usr/include/wx-2.8/wx/gtk/pen.h /usr/include/wx-2.8/wx/gtk/dc.h \ + /usr/include/wx-2.8/wx/dcgraph.h /usr/include/wx-2.8/wx/geometry.h \ + /usr/include/wx-2.8/wx/graphics.h /usr/include/wx-2.8/wx/dcclient.h \ + /usr/include/wx-2.8/wx/gtk/dcclient.h /usr/include/wx-2.8/wx/dcmemory.h \ + /usr/include/wx-2.8/wx/gtk/dcmemory.h /usr/include/wx-2.8/wx/dcprint.h \ + /usr/include/wx-2.8/wx/dcscreen.h /usr/include/wx-2.8/wx/gtk/dcscreen.h \ + /usr/include/wx-2.8/wx/button.h /usr/include/wx-2.8/wx/control.h \ + /usr/include/wx-2.8/wx/gtk/control.h /usr/include/wx-2.8/wx/gtk/button.h \ + /usr/include/wx-2.8/wx/menuitem.h /usr/include/wx-2.8/wx/gtk/menuitem.h \ + /usr/include/wx-2.8/wx/menu.h /usr/include/wx-2.8/wx/gtk/menu.h \ + /usr/include/wx-2.8/wx/icon.h /usr/include/wx-2.8/wx/iconloc.h \ + /usr/include/wx-2.8/wx/generic/icon.h /usr/include/wx-2.8/wx/dialog.h \ + /usr/include/wx-2.8/wx/gtk/dialog.h /usr/include/wx-2.8/wx/timer.h \ + /usr/include/wx-2.8/wx/gtk/timer.h /usr/include/wx-2.8/wx/settings.h \ + /usr/include/wx-2.8/wx/msgdlg.h /usr/include/wx-2.8/wx/gtk/msgdlg.h \ + /usr/include/wx-2.8/wx/cmndata.h /usr/include/wx-2.8/wx/encinfo.h \ + /usr/include/wx-2.8/wx/dataobj.h /usr/include/wx-2.8/wx/gtk/dataform.h \ + /usr/include/wx-2.8/wx/gtk/dataobj.h \ + /usr/include/wx-2.8/wx/gtk/dataobj2.h /usr/include/wx-2.8/wx/ctrlsub.h \ + /usr/include/wx-2.8/wx/bmpbuttn.h /usr/include/wx-2.8/wx/gtk/bmpbuttn.h \ + /usr/include/wx-2.8/wx/checkbox.h /usr/include/wx-2.8/wx/gtk/checkbox.h \ + /usr/include/wx-2.8/wx/checklst.h /usr/include/wx-2.8/wx/listbox.h \ + /usr/include/wx-2.8/wx/gtk/listbox.h \ + /usr/include/wx-2.8/wx/gtk/checklst.h /usr/include/wx-2.8/wx/choice.h \ + /usr/include/wx-2.8/wx/gtk/choice.h /usr/include/wx-2.8/wx/scrolbar.h \ + /usr/include/wx-2.8/wx/gtk/scrolbar.h /usr/include/wx-2.8/wx/stattext.h \ + /usr/include/wx-2.8/wx/gtk/stattext.h /usr/include/wx-2.8/wx/statbmp.h \ + /usr/include/wx-2.8/wx/gtk/statbmp.h /usr/include/wx-2.8/wx/statbox.h \ + /usr/include/wx-2.8/wx/gtk/statbox.h /usr/include/wx-2.8/wx/radiobox.h \ + /usr/include/wx-2.8/wx/gtk/radiobox.h /usr/include/wx-2.8/wx/radiobut.h \ + /usr/include/wx-2.8/wx/gtk/radiobut.h /usr/include/wx-2.8/wx/textctrl.h \ + /usr/include/wx-2.8/wx/ioswrap.h /usr/include/wx-2.8/wx/gtk/textctrl.h \ + /usr/include/wx-2.8/wx/slider.h /usr/include/wx-2.8/wx/gtk/slider.h \ + /usr/include/wx-2.8/wx/gauge.h /usr/include/wx-2.8/wx/gtk/gauge.h \ + /usr/include/wx-2.8/wx/scrolwin.h /usr/include/wx-2.8/wx/gtk/scrolwin.h \ + /usr/include/wx-2.8/wx/dirdlg.h /usr/include/wx-2.8/wx/gtk/dirdlg.h \ + /usr/include/wx-2.8/wx/generic/dirdlgg.h \ + /usr/include/wx-2.8/wx/toolbar.h /usr/include/wx-2.8/wx/tbarbase.h \ + /usr/include/wx-2.8/wx/gtk/tbargtk.h /usr/include/wx-2.8/wx/combobox.h \ + /usr/include/wx-2.8/wx/gtk/combobox.h /usr/include/wx-2.8/wx/layout.h \ + /usr/include/wx-2.8/wx/sizer.h /usr/include/wx-2.8/wx/mdi.h \ + /usr/include/wx-2.8/wx/gtk/mdi.h /usr/include/wx-2.8/wx/statusbr.h \ + /usr/include/wx-2.8/wx/generic/statusbr.h \ + /usr/include/wx-2.8/wx/choicdlg.h \ + /usr/include/wx-2.8/wx/generic/choicdgg.h \ + /usr/include/wx-2.8/wx/textdlg.h \ + /usr/include/wx-2.8/wx/generic/textdlgg.h \ + /usr/include/wx-2.8/wx/valtext.h /usr/include/wx-2.8/wx/filedlg.h \ + /usr/include/wx-2.8/wx/gtk/filedlg.h \ + /usr/include/wx-2.8/wx/generic/filedlgg.h \ + /usr/include/wx-2.8/wx/listctrl.h /usr/include/wx-2.8/wx/listbase.h \ + /usr/include/wx-2.8/wx/generic/listctrl.h resource2.h \ + ../../../Windows/Control/DialogImpl.h ../../../Windows/Window.h \ + ../../../Windows/Defs.h ../../../Windows/../Common/MyWindows.h \ + ../../../Common/MyString.h ../../../Common/MyVector.h \ + ../../../Common/Defs.h ../../../Windows/Control/Dialog.h \ + CompressDialogRes.h +ExtractDialog.o: ExtractDialog.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ExtractDialog.h ExtractDialogRes.h \ + ../../../Windows/Control/Edit.h ../../../Windows/Window.h \ + ../../../Windows/Defs.h ../../../Windows/../Common/MyWindows.h \ + ../../../Common/MyString.h ../../../Common/MyVector.h \ + ../../../Common/Defs.h ../../../Windows/Control/ComboBox.h \ + ../../../Windows/Control/Window2.h ../Common/ZipRegistry.h \ + ../Common/ExtractMode.h ../Common/ExtractMode.h \ + ../FileManager/DialogSize.h ../../../Windows/Control/Dialog.h \ + ../../../Common/StringConvert.h ../../../Common/MyWindows.h \ + ../../../Common/MyString.h ../../../Windows/FileName.h \ + ../../../Windows/../../C/Types.h ../../../Windows/../Common/MyString.h \ + ../../../Windows/FileDir.h ../../../Windows/Defs.h \ + ../../../Windows/ResourceString.h ../FileManager/HelpUtils.h \ + ../FileManager/BrowseDialog.h ../../../Windows/CommonDialog.h \ + ../../../Windows/Shell.h ../FileManager/LangUtils.h \ + ../../../Common/Lang.h ../FileManager/resourceGui.h ExtractRes.h +ExtractDialog_rc.o: ExtractDialog_rc.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h /usr/include/wx-2.8/wx/wxprec.h \ + /usr/include/wx-2.8/wx/defs.h /usr/include/wx-2.8/wx/platform.h \ + /usr/lib/wx/include/gtk2-unicode-release-2.8/wx/setup.h \ + /usr/include/wx-2.8/wx/chkconf.h /usr/include/wx-2.8/wx/features.h \ + /usr/include/wx-2.8/wx/version.h /usr/include/wx-2.8/wx/cpp.h \ + /usr/include/wx-2.8/wx/dlimpexp.h /usr/include/wx-2.8/wx/debug.h \ + /usr/include/wx-2.8/wx/wxchar.h /usr/include/wx-2.8/wx/wx.h \ + /usr/include/wx-2.8/wx/object.h /usr/include/wx-2.8/wx/memory.h \ + /usr/include/wx-2.8/wx/string.h /usr/include/wx-2.8/wx/buffer.h \ + /usr/include/wx-2.8/wx/strconv.h /usr/include/wx-2.8/wx/fontenc.h \ + /usr/include/wx-2.8/wx/beforestd.h /usr/include/wx-2.8/wx/afterstd.h \ + /usr/include/wx-2.8/wx/iosfwrap.h /usr/include/wx-2.8/wx/msgout.h \ + /usr/include/wx-2.8/wx/dynarray.h /usr/include/wx-2.8/wx/list.h \ + /usr/include/wx-2.8/wx/hash.h /usr/include/wx-2.8/wx/hashmap.h \ + /usr/include/wx-2.8/wx/arrstr.h /usr/include/wx-2.8/wx/intl.h \ + /usr/include/wx-2.8/wx/log.h /usr/include/wx-2.8/wx/generic/logg.h \ + /usr/include/wx-2.8/wx/event.h /usr/include/wx-2.8/wx/clntdata.h \ + /usr/include/wx-2.8/wx/vector.h /usr/include/wx-2.8/wx/gdicmn.h \ + /usr/include/wx-2.8/wx/math.h /usr/include/wx-2.8/wx/cursor.h \ + /usr/include/wx-2.8/wx/gtk/cursor.h /usr/include/wx-2.8/wx/utils.h \ + /usr/include/wx-2.8/wx/filefn.h /usr/include/wx-2.8/wx/longlong.h \ + /usr/include/wx-2.8/wx/platinfo.h /usr/include/wx-2.8/wx/thread.h \ + /usr/include/wx-2.8/wx/app.h /usr/include/wx-2.8/wx/build.h \ + /usr/include/wx-2.8/wx/init.h /usr/include/wx-2.8/wx/gtk/app.h \ + /usr/include/wx-2.8/wx/stream.h /usr/include/wx-2.8/wx/stopwatch.h \ + /usr/include/wx-2.8/wx/module.h /usr/include/wx-2.8/wx/window.h \ + /usr/include/wx-2.8/wx/font.h /usr/include/wx-2.8/wx/gdiobj.h \ + /usr/include/wx-2.8/wx/gtk/font.h /usr/include/wx-2.8/wx/colour.h \ + /usr/include/wx-2.8/wx/variant.h /usr/include/wx-2.8/wx/datetime.h \ + /usr/include/wx-2.8/wx/gtk/colour.h /usr/include/wx-2.8/wx/region.h \ + /usr/include/wx-2.8/wx/gtk/region.h /usr/include/wx-2.8/wx/validate.h \ + /usr/include/wx-2.8/wx/palette.h \ + /usr/include/wx-2.8/wx/generic/paletteg.h /usr/include/wx-2.8/wx/accel.h \ + /usr/include/wx-2.8/wx/gtk/accel.h \ + /usr/include/wx-2.8/wx/generic/accel.h \ + /usr/include/wx-2.8/wx/gtk/window.h /usr/include/wx-2.8/wx/containr.h \ + /usr/include/wx-2.8/wx/panel.h /usr/include/wx-2.8/wx/generic/panelg.h \ + /usr/include/wx-2.8/wx/toplevel.h /usr/include/wx-2.8/wx/iconbndl.h \ + /usr/include/wx-2.8/wx/gtk/toplevel.h /usr/include/wx-2.8/wx/frame.h \ + /usr/include/wx-2.8/wx/gtk/frame.h /usr/include/wx-2.8/wx/bitmap.h \ + /usr/include/wx-2.8/wx/gtk/bitmap.h /usr/include/wx-2.8/wx/image.h \ + /usr/include/wx-2.8/wx/imagbmp.h /usr/include/wx-2.8/wx/imagpng.h \ + /usr/include/wx-2.8/wx/imaggif.h /usr/include/wx-2.8/wx/imagpcx.h \ + /usr/include/wx-2.8/wx/imagjpeg.h /usr/include/wx-2.8/wx/imagtga.h \ + /usr/include/wx-2.8/wx/imagtiff.h /usr/include/wx-2.8/wx/imagpnm.h \ + /usr/include/wx-2.8/wx/imagxpm.h /usr/include/wx-2.8/wx/imagiff.h \ + /usr/include/wx-2.8/wx/dc.h /usr/include/wx-2.8/wx/brush.h \ + /usr/include/wx-2.8/wx/gtk/brush.h /usr/include/wx-2.8/wx/pen.h \ + /usr/include/wx-2.8/wx/gtk/pen.h /usr/include/wx-2.8/wx/gtk/dc.h \ + /usr/include/wx-2.8/wx/dcgraph.h /usr/include/wx-2.8/wx/geometry.h \ + /usr/include/wx-2.8/wx/graphics.h /usr/include/wx-2.8/wx/dcclient.h \ + /usr/include/wx-2.8/wx/gtk/dcclient.h /usr/include/wx-2.8/wx/dcmemory.h \ + /usr/include/wx-2.8/wx/gtk/dcmemory.h /usr/include/wx-2.8/wx/dcprint.h \ + /usr/include/wx-2.8/wx/dcscreen.h /usr/include/wx-2.8/wx/gtk/dcscreen.h \ + /usr/include/wx-2.8/wx/button.h /usr/include/wx-2.8/wx/control.h \ + /usr/include/wx-2.8/wx/gtk/control.h /usr/include/wx-2.8/wx/gtk/button.h \ + /usr/include/wx-2.8/wx/menuitem.h /usr/include/wx-2.8/wx/gtk/menuitem.h \ + /usr/include/wx-2.8/wx/menu.h /usr/include/wx-2.8/wx/gtk/menu.h \ + /usr/include/wx-2.8/wx/icon.h /usr/include/wx-2.8/wx/iconloc.h \ + /usr/include/wx-2.8/wx/generic/icon.h /usr/include/wx-2.8/wx/dialog.h \ + /usr/include/wx-2.8/wx/gtk/dialog.h /usr/include/wx-2.8/wx/timer.h \ + /usr/include/wx-2.8/wx/gtk/timer.h /usr/include/wx-2.8/wx/settings.h \ + /usr/include/wx-2.8/wx/msgdlg.h /usr/include/wx-2.8/wx/gtk/msgdlg.h \ + /usr/include/wx-2.8/wx/cmndata.h /usr/include/wx-2.8/wx/encinfo.h \ + /usr/include/wx-2.8/wx/dataobj.h /usr/include/wx-2.8/wx/gtk/dataform.h \ + /usr/include/wx-2.8/wx/gtk/dataobj.h \ + /usr/include/wx-2.8/wx/gtk/dataobj2.h /usr/include/wx-2.8/wx/ctrlsub.h \ + /usr/include/wx-2.8/wx/bmpbuttn.h /usr/include/wx-2.8/wx/gtk/bmpbuttn.h \ + /usr/include/wx-2.8/wx/checkbox.h /usr/include/wx-2.8/wx/gtk/checkbox.h \ + /usr/include/wx-2.8/wx/checklst.h /usr/include/wx-2.8/wx/listbox.h \ + /usr/include/wx-2.8/wx/gtk/listbox.h \ + /usr/include/wx-2.8/wx/gtk/checklst.h /usr/include/wx-2.8/wx/choice.h \ + /usr/include/wx-2.8/wx/gtk/choice.h /usr/include/wx-2.8/wx/scrolbar.h \ + /usr/include/wx-2.8/wx/gtk/scrolbar.h /usr/include/wx-2.8/wx/stattext.h \ + /usr/include/wx-2.8/wx/gtk/stattext.h /usr/include/wx-2.8/wx/statbmp.h \ + /usr/include/wx-2.8/wx/gtk/statbmp.h /usr/include/wx-2.8/wx/statbox.h \ + /usr/include/wx-2.8/wx/gtk/statbox.h /usr/include/wx-2.8/wx/radiobox.h \ + /usr/include/wx-2.8/wx/gtk/radiobox.h /usr/include/wx-2.8/wx/radiobut.h \ + /usr/include/wx-2.8/wx/gtk/radiobut.h /usr/include/wx-2.8/wx/textctrl.h \ + /usr/include/wx-2.8/wx/ioswrap.h /usr/include/wx-2.8/wx/gtk/textctrl.h \ + /usr/include/wx-2.8/wx/slider.h /usr/include/wx-2.8/wx/gtk/slider.h \ + /usr/include/wx-2.8/wx/gauge.h /usr/include/wx-2.8/wx/gtk/gauge.h \ + /usr/include/wx-2.8/wx/scrolwin.h /usr/include/wx-2.8/wx/gtk/scrolwin.h \ + /usr/include/wx-2.8/wx/dirdlg.h /usr/include/wx-2.8/wx/gtk/dirdlg.h \ + /usr/include/wx-2.8/wx/generic/dirdlgg.h \ + /usr/include/wx-2.8/wx/toolbar.h /usr/include/wx-2.8/wx/tbarbase.h \ + /usr/include/wx-2.8/wx/gtk/tbargtk.h /usr/include/wx-2.8/wx/combobox.h \ + /usr/include/wx-2.8/wx/gtk/combobox.h /usr/include/wx-2.8/wx/layout.h \ + /usr/include/wx-2.8/wx/sizer.h /usr/include/wx-2.8/wx/mdi.h \ + /usr/include/wx-2.8/wx/gtk/mdi.h /usr/include/wx-2.8/wx/statusbr.h \ + /usr/include/wx-2.8/wx/generic/statusbr.h \ + /usr/include/wx-2.8/wx/choicdlg.h \ + /usr/include/wx-2.8/wx/generic/choicdgg.h \ + /usr/include/wx-2.8/wx/textdlg.h \ + /usr/include/wx-2.8/wx/generic/textdlgg.h \ + /usr/include/wx-2.8/wx/valtext.h /usr/include/wx-2.8/wx/filedlg.h \ + /usr/include/wx-2.8/wx/gtk/filedlg.h \ + /usr/include/wx-2.8/wx/generic/filedlgg.h \ + /usr/include/wx-2.8/wx/listctrl.h /usr/include/wx-2.8/wx/listbase.h \ + /usr/include/wx-2.8/wx/generic/listctrl.h \ + ../../../Windows/Control/DialogImpl.h ../../../Windows/Window.h \ + ../../../Windows/Defs.h ../../../Windows/../Common/MyWindows.h \ + ../../../Common/MyString.h ../../../Common/MyVector.h \ + ../../../Common/Defs.h ../../../Windows/Control/Dialog.h ExtractRes.h \ + ExtractDialogRes.h +BenchmarkDialog.o: BenchmarkDialog.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../../Common/IntToString.h \ + ../../../Common/MyException.h ../../../Common/MyWindows.h \ + ../../../Windows/Error.h ../../../Common/MyString.h \ + ../../../Common/MyVector.h ../../../Common/Defs.h \ + ../../../Windows/System.h ../../../Windows/../Common/Types.h \ + ../../../Windows/Thread.h ../../../Windows/Defs.h \ + ../../../Windows/../Common/MyWindows.h \ + ../../../Windows/../../C/Threads.h ../../../Windows/../../C/Types.h \ + ../FileManager/HelpUtils.h BenchmarkDialog.h \ + ../../../Windows/Synchronization.h ../../../Windows/Synchronization2.h \ + ../../../Windows/Control/ComboBox.h ../../../Windows/Window.h \ + ../../../Windows/Defs.h ../../../Windows/Control/Window2.h \ + ../Common/Bench.h ../Common/../../Common/CreateCoder.h \ + ../Common/../../Common/../../Common/MyCom.h \ + ../Common/../../Common/../../Common/MyWindows.h \ + ../Common/../../Common/../../Common/MyString.h \ + ../Common/../../Common/../ICoder.h ../Common/../../Common/../IStream.h \ + ../Common/../../Common/../../Common/MyUnknown.h \ + ../Common/../../Common/../../Common/Types.h \ + ../Common/../../Common/../IDecl.h ../Common/../../Common/MethodId.h \ + ../Common/../../Common/../../Common/Types.h ../FileManager/DialogSize.h \ + ../../../Windows/Control/Dialog.h BenchmarkDialogRes.h \ + ../FileManager/LangUtils.h ../../../Common/Lang.h \ + ../../../Common/MyString.h ../../../Windows/ResourceString.h +BenchmarkDialog_rc.o: BenchmarkDialog_rc.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h /usr/include/wx-2.8/wx/wxprec.h \ + /usr/include/wx-2.8/wx/defs.h /usr/include/wx-2.8/wx/platform.h \ + /usr/lib/wx/include/gtk2-unicode-release-2.8/wx/setup.h \ + /usr/include/wx-2.8/wx/chkconf.h /usr/include/wx-2.8/wx/features.h \ + /usr/include/wx-2.8/wx/version.h /usr/include/wx-2.8/wx/cpp.h \ + /usr/include/wx-2.8/wx/dlimpexp.h /usr/include/wx-2.8/wx/debug.h \ + /usr/include/wx-2.8/wx/wxchar.h /usr/include/wx-2.8/wx/wx.h \ + /usr/include/wx-2.8/wx/object.h /usr/include/wx-2.8/wx/memory.h \ + /usr/include/wx-2.8/wx/string.h /usr/include/wx-2.8/wx/buffer.h \ + /usr/include/wx-2.8/wx/strconv.h /usr/include/wx-2.8/wx/fontenc.h \ + /usr/include/wx-2.8/wx/beforestd.h /usr/include/wx-2.8/wx/afterstd.h \ + /usr/include/wx-2.8/wx/iosfwrap.h /usr/include/wx-2.8/wx/msgout.h \ + /usr/include/wx-2.8/wx/dynarray.h /usr/include/wx-2.8/wx/list.h \ + /usr/include/wx-2.8/wx/hash.h /usr/include/wx-2.8/wx/hashmap.h \ + /usr/include/wx-2.8/wx/arrstr.h /usr/include/wx-2.8/wx/intl.h \ + /usr/include/wx-2.8/wx/log.h /usr/include/wx-2.8/wx/generic/logg.h \ + /usr/include/wx-2.8/wx/event.h /usr/include/wx-2.8/wx/clntdata.h \ + /usr/include/wx-2.8/wx/vector.h /usr/include/wx-2.8/wx/gdicmn.h \ + /usr/include/wx-2.8/wx/math.h /usr/include/wx-2.8/wx/cursor.h \ + /usr/include/wx-2.8/wx/gtk/cursor.h /usr/include/wx-2.8/wx/utils.h \ + /usr/include/wx-2.8/wx/filefn.h /usr/include/wx-2.8/wx/longlong.h \ + /usr/include/wx-2.8/wx/platinfo.h /usr/include/wx-2.8/wx/thread.h \ + /usr/include/wx-2.8/wx/app.h /usr/include/wx-2.8/wx/build.h \ + /usr/include/wx-2.8/wx/init.h /usr/include/wx-2.8/wx/gtk/app.h \ + /usr/include/wx-2.8/wx/stream.h /usr/include/wx-2.8/wx/stopwatch.h \ + /usr/include/wx-2.8/wx/module.h /usr/include/wx-2.8/wx/window.h \ + /usr/include/wx-2.8/wx/font.h /usr/include/wx-2.8/wx/gdiobj.h \ + /usr/include/wx-2.8/wx/gtk/font.h /usr/include/wx-2.8/wx/colour.h \ + /usr/include/wx-2.8/wx/variant.h /usr/include/wx-2.8/wx/datetime.h \ + /usr/include/wx-2.8/wx/gtk/colour.h /usr/include/wx-2.8/wx/region.h \ + /usr/include/wx-2.8/wx/gtk/region.h /usr/include/wx-2.8/wx/validate.h \ + /usr/include/wx-2.8/wx/palette.h \ + /usr/include/wx-2.8/wx/generic/paletteg.h /usr/include/wx-2.8/wx/accel.h \ + /usr/include/wx-2.8/wx/gtk/accel.h \ + /usr/include/wx-2.8/wx/generic/accel.h \ + /usr/include/wx-2.8/wx/gtk/window.h /usr/include/wx-2.8/wx/containr.h \ + /usr/include/wx-2.8/wx/panel.h /usr/include/wx-2.8/wx/generic/panelg.h \ + /usr/include/wx-2.8/wx/toplevel.h /usr/include/wx-2.8/wx/iconbndl.h \ + /usr/include/wx-2.8/wx/gtk/toplevel.h /usr/include/wx-2.8/wx/frame.h \ + /usr/include/wx-2.8/wx/gtk/frame.h /usr/include/wx-2.8/wx/bitmap.h \ + /usr/include/wx-2.8/wx/gtk/bitmap.h /usr/include/wx-2.8/wx/image.h \ + /usr/include/wx-2.8/wx/imagbmp.h /usr/include/wx-2.8/wx/imagpng.h \ + /usr/include/wx-2.8/wx/imaggif.h /usr/include/wx-2.8/wx/imagpcx.h \ + /usr/include/wx-2.8/wx/imagjpeg.h /usr/include/wx-2.8/wx/imagtga.h \ + /usr/include/wx-2.8/wx/imagtiff.h /usr/include/wx-2.8/wx/imagpnm.h \ + /usr/include/wx-2.8/wx/imagxpm.h /usr/include/wx-2.8/wx/imagiff.h \ + /usr/include/wx-2.8/wx/dc.h /usr/include/wx-2.8/wx/brush.h \ + /usr/include/wx-2.8/wx/gtk/brush.h /usr/include/wx-2.8/wx/pen.h \ + /usr/include/wx-2.8/wx/gtk/pen.h /usr/include/wx-2.8/wx/gtk/dc.h \ + /usr/include/wx-2.8/wx/dcgraph.h /usr/include/wx-2.8/wx/geometry.h \ + /usr/include/wx-2.8/wx/graphics.h /usr/include/wx-2.8/wx/dcclient.h \ + /usr/include/wx-2.8/wx/gtk/dcclient.h /usr/include/wx-2.8/wx/dcmemory.h \ + /usr/include/wx-2.8/wx/gtk/dcmemory.h /usr/include/wx-2.8/wx/dcprint.h \ + /usr/include/wx-2.8/wx/dcscreen.h /usr/include/wx-2.8/wx/gtk/dcscreen.h \ + /usr/include/wx-2.8/wx/button.h /usr/include/wx-2.8/wx/control.h \ + /usr/include/wx-2.8/wx/gtk/control.h /usr/include/wx-2.8/wx/gtk/button.h \ + /usr/include/wx-2.8/wx/menuitem.h /usr/include/wx-2.8/wx/gtk/menuitem.h \ + /usr/include/wx-2.8/wx/menu.h /usr/include/wx-2.8/wx/gtk/menu.h \ + /usr/include/wx-2.8/wx/icon.h /usr/include/wx-2.8/wx/iconloc.h \ + /usr/include/wx-2.8/wx/generic/icon.h /usr/include/wx-2.8/wx/dialog.h \ + /usr/include/wx-2.8/wx/gtk/dialog.h /usr/include/wx-2.8/wx/timer.h \ + /usr/include/wx-2.8/wx/gtk/timer.h /usr/include/wx-2.8/wx/settings.h \ + /usr/include/wx-2.8/wx/msgdlg.h /usr/include/wx-2.8/wx/gtk/msgdlg.h \ + /usr/include/wx-2.8/wx/cmndata.h /usr/include/wx-2.8/wx/encinfo.h \ + /usr/include/wx-2.8/wx/dataobj.h /usr/include/wx-2.8/wx/gtk/dataform.h \ + /usr/include/wx-2.8/wx/gtk/dataobj.h \ + /usr/include/wx-2.8/wx/gtk/dataobj2.h /usr/include/wx-2.8/wx/ctrlsub.h \ + /usr/include/wx-2.8/wx/bmpbuttn.h /usr/include/wx-2.8/wx/gtk/bmpbuttn.h \ + /usr/include/wx-2.8/wx/checkbox.h /usr/include/wx-2.8/wx/gtk/checkbox.h \ + /usr/include/wx-2.8/wx/checklst.h /usr/include/wx-2.8/wx/listbox.h \ + /usr/include/wx-2.8/wx/gtk/listbox.h \ + /usr/include/wx-2.8/wx/gtk/checklst.h /usr/include/wx-2.8/wx/choice.h \ + /usr/include/wx-2.8/wx/gtk/choice.h /usr/include/wx-2.8/wx/scrolbar.h \ + /usr/include/wx-2.8/wx/gtk/scrolbar.h /usr/include/wx-2.8/wx/stattext.h \ + /usr/include/wx-2.8/wx/gtk/stattext.h /usr/include/wx-2.8/wx/statbmp.h \ + /usr/include/wx-2.8/wx/gtk/statbmp.h /usr/include/wx-2.8/wx/statbox.h \ + /usr/include/wx-2.8/wx/gtk/statbox.h /usr/include/wx-2.8/wx/radiobox.h \ + /usr/include/wx-2.8/wx/gtk/radiobox.h /usr/include/wx-2.8/wx/radiobut.h \ + /usr/include/wx-2.8/wx/gtk/radiobut.h /usr/include/wx-2.8/wx/textctrl.h \ + /usr/include/wx-2.8/wx/ioswrap.h /usr/include/wx-2.8/wx/gtk/textctrl.h \ + /usr/include/wx-2.8/wx/slider.h /usr/include/wx-2.8/wx/gtk/slider.h \ + /usr/include/wx-2.8/wx/gauge.h /usr/include/wx-2.8/wx/gtk/gauge.h \ + /usr/include/wx-2.8/wx/scrolwin.h /usr/include/wx-2.8/wx/gtk/scrolwin.h \ + /usr/include/wx-2.8/wx/dirdlg.h /usr/include/wx-2.8/wx/gtk/dirdlg.h \ + /usr/include/wx-2.8/wx/generic/dirdlgg.h \ + /usr/include/wx-2.8/wx/toolbar.h /usr/include/wx-2.8/wx/tbarbase.h \ + /usr/include/wx-2.8/wx/gtk/tbargtk.h /usr/include/wx-2.8/wx/combobox.h \ + /usr/include/wx-2.8/wx/gtk/combobox.h /usr/include/wx-2.8/wx/layout.h \ + /usr/include/wx-2.8/wx/sizer.h /usr/include/wx-2.8/wx/mdi.h \ + /usr/include/wx-2.8/wx/gtk/mdi.h /usr/include/wx-2.8/wx/statusbr.h \ + /usr/include/wx-2.8/wx/generic/statusbr.h \ + /usr/include/wx-2.8/wx/choicdlg.h \ + /usr/include/wx-2.8/wx/generic/choicdgg.h \ + /usr/include/wx-2.8/wx/textdlg.h \ + /usr/include/wx-2.8/wx/generic/textdlgg.h \ + /usr/include/wx-2.8/wx/valtext.h /usr/include/wx-2.8/wx/filedlg.h \ + /usr/include/wx-2.8/wx/gtk/filedlg.h \ + /usr/include/wx-2.8/wx/generic/filedlgg.h \ + /usr/include/wx-2.8/wx/listctrl.h /usr/include/wx-2.8/wx/listbase.h \ + /usr/include/wx-2.8/wx/generic/listctrl.h \ + ../../../Windows/Control/DialogImpl.h ../../../Windows/Window.h \ + ../../../Windows/Defs.h ../../../Windows/../Common/MyWindows.h \ + ../../../Common/MyString.h ../../../Common/MyVector.h \ + ../../../Common/Defs.h ../../../Windows/Control/Dialog.h \ + BenchmarkDialogRes.h +ExtractGUI.o: ExtractGUI.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../../Common/IntToString.h \ + ../../../Common/StringConvert.h ../../../Common/MyWindows.h \ + ../../../Common/MyString.h ../../../Common/MyVector.h \ + ../../../Common/Defs.h ../../../Windows/Error.h \ + ../../../Common/MyString.h ../../../Windows/FileDir.h \ + ../../../Windows/../Common/MyString.h ../../../Windows/Defs.h \ + ../../../Windows/../Common/MyWindows.h ../../../Windows/FileFind.h \ + ../../../Windows/FileName.h ../../../Windows/../../C/Types.h \ + ../../../Windows/Thread.h ../../../Windows/../../C/Threads.h \ + ../../../Windows/../../C/Types.h ../FileManager/ExtractCallback.h \ + ../../../Common/MyCom.h ../../../Windows/ResourceString.h \ + ../FileManager/../Agent/IFolderArchive.h \ + ../FileManager/../Agent/../../IDecl.h \ + ../FileManager/../Agent/../../../Common/MyUnknown.h \ + ../FileManager/../Agent/../../../Common/MyWindows.h \ + ../FileManager/../Agent/../../Archive/IArchive.h \ + ../FileManager/../Agent/../../Archive/../IProgress.h \ + ../FileManager/../Agent/../../Archive/../../Common/MyUnknown.h \ + ../FileManager/../Agent/../../Archive/../../Common/Types.h \ + ../FileManager/../Agent/../../Archive/../IDecl.h \ + ../FileManager/../Agent/../../Archive/../IStream.h \ + ../FileManager/../Agent/../../Archive/../PropID.h \ + ../FileManager/../Agent/../../UI/Common/LoadCodecs.h \ + ../FileManager/../Agent/../../UI/Common/../../../Common/Types.h \ + ../FileManager/../Agent/../../UI/Common/../../../Common/MyCom.h \ + ../FileManager/../Agent/../../UI/Common/../../../Common/MyString.h \ + ../FileManager/../Agent/../../UI/Common/../../../Common/Buffer.h \ + ../FileManager/../Agent/../../UI/Common/../../../Common/Defs.h \ + ../FileManager/../Agent/../../UI/Common/../../ICoder.h \ + ../FileManager/../Agent/../../UI/Common/../../IStream.h \ + ../FileManager/../Agent/../../UI/Common/../../../Windows/DLL.h \ + ../FileManager/../Agent/../../UI/Common/../../../Windows/../Common/MyString.h \ + ../FileManager/../Agent/../../UI/Common/../../Archive/IArchive.h \ + ../FileManager/../Agent/../../UI/FileManager/IFolder.h \ + ../FileManager/../Agent/../../UI/FileManager/../../IProgress.h \ + ../FileManager/../Agent/../../UI/FileManager/../../IStream.h \ + ../FileManager/../Agent/../Common/ExtractMode.h \ + ../FileManager/../Agent/../Common/IFileExtractCallback.h \ + ../FileManager/../Agent/../Common/../../IDecl.h \ + ../FileManager/../Common/ArchiveOpenCallback.h \ + ../FileManager/../Common/../../IPassword.h \ + ../FileManager/../Common/../../../Common/MyUnknown.h \ + ../FileManager/../Common/../../../Common/Types.h \ + ../FileManager/../Common/../../IDecl.h \ + ../FileManager/../Common/../../Archive/IArchive.h \ + ../FileManager/../../IPassword.h ../FileManager/IFolder.h \ + ../FileManager/ProgressDialog2.h ../../../Windows/Synchronization.h \ + ../../../Windows/Synchronization2.h ../../../Windows/Control/Dialog.h \ + ../../../Windows/Window.h ../../../Windows/Defs.h \ + ../../../Windows/Control/ListView.h \ + ../../../Windows/Control/ProgressBar.h ../FileManager/LangUtils.h \ + ../../../Common/Lang.h ../FileManager/FormatUtils.h \ + ../FileManager/LangUtils.h ../FileManager/resourceGui.h \ + ../Common/ArchiveExtractCallback.h ../../../Common/Wildcard.h \ + ../Common/../../IPassword.h ../Common/../../Common/FileStreams.h \ + ../Common/../../Common/../../Windows/FileIO.h \ + ../Common/../../Common/../../Common/MyCom.h \ + ../Common/../../Common/../IStream.h \ + ../Common/../../Common/ProgressUtils.h \ + ../Common/../../Common/../ICoder.h ../Common/../../Common/../IProgress.h \ + ../Common/../../Archive/IArchive.h \ + ../Common/../../Archive/Common/OutStreamWithCRC.h \ + ../Common/../../Archive/Common/../../../../C/7zCrc.h \ + ../Common/../../Archive/Common/../../../../C/Types.h \ + ../Common/../../Archive/Common/../../../Common/MyCom.h \ + ../Common/../../Archive/Common/../../IStream.h ../Common/ExtractMode.h \ + ../Common/IFileExtractCallback.h ../Common/OpenArchive.h \ + ../Common/ArchiveOpenCallback.h ../Common/LoadCodecs.h \ + ../Common/PropIDUtils.h ../Explorer/MyMessages.h resource2.h \ + ExtractRes.h ExtractDialog.h ExtractDialogRes.h \ + ../../../Windows/Control/Edit.h ../../../Windows/Control/ComboBox.h \ + ../../../Windows/Control/Window2.h ../Common/ZipRegistry.h \ + ../Common/ExtractMode.h ../FileManager/DialogSize.h ExtractGUI.h \ + ../Common/Extract.h ../Common/ArchiveExtractCallback.h \ + ../Common/Property.h ../Common/../Common/LoadCodecs.h +GUI.o: GUI.cpp ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../../myWindows/initguid.h ../../../Common/MyInitGuid.h \ + ../../../../C/Alloc.h ../../../Common/CommandLineParser.h \ + ../../../Common/MyString.h ../../../Common/MyVector.h \ + ../../../Common/Defs.h ../../../Common/MyException.h \ + ../../../Common/MyWindows.h ../../../Common/NewHandler.h \ + ../../../Common/StringConvert.h ../../../Windows/Error.h \ + ../../../Common/MyString.h ../Common/ArchiveCommandLine.h \ + ../../../Common/Wildcard.h ../Common/Extract.h \ + ../../../Windows/FileFind.h ../../../Windows/../Common/MyString.h \ + ../../../Windows/FileName.h ../../../Windows/../../C/Types.h \ + ../../../Windows/Defs.h ../../../Windows/../Common/MyWindows.h \ + ../Common/../../Archive/IArchive.h \ + ../Common/../../Archive/../IProgress.h \ + ../Common/../../Archive/../../Common/MyUnknown.h \ + ../Common/../../Archive/../../Common/MyWindows.h \ + ../Common/../../Archive/../../Common/Types.h \ + ../Common/../../Archive/../IDecl.h ../Common/../../Archive/../IStream.h \ + ../Common/../../Archive/../PropID.h ../Common/ArchiveExtractCallback.h \ + ../../../Common/MyCom.h ../Common/../../IPassword.h \ + ../Common/../../../Common/MyUnknown.h ../Common/../../../Common/Types.h \ + ../Common/../../IDecl.h ../Common/../../Common/FileStreams.h \ + ../Common/../../Common/../../Windows/FileIO.h \ + ../Common/../../Common/../../Common/MyCom.h \ + ../Common/../../Common/../IStream.h \ + ../Common/../../Common/ProgressUtils.h \ + ../Common/../../Common/../ICoder.h ../Common/../../Common/../IStream.h \ + ../Common/../../Common/../IProgress.h \ + ../Common/../../Archive/Common/OutStreamWithCRC.h \ + ../Common/../../Archive/Common/../../../../C/7zCrc.h \ + ../Common/../../Archive/Common/../../../../C/Types.h \ + ../Common/../../Archive/Common/../../../Common/MyCom.h \ + ../Common/../../Archive/Common/../../IStream.h ../Common/ExtractMode.h \ + ../Common/IFileExtractCallback.h ../Common/../../IDecl.h \ + ../Common/OpenArchive.h ../Common/ArchiveOpenCallback.h \ + ../Common/LoadCodecs.h ../Common/../../../Common/Types.h \ + ../Common/../../../Common/MyCom.h ../Common/../../../Common/MyString.h \ + ../Common/../../../Common/Buffer.h ../Common/../../../Common/Defs.h \ + ../Common/../../ICoder.h ../Common/../../../Windows/DLL.h \ + ../Common/../../../Windows/../Common/MyString.h ../Common/Property.h \ + ../Common/../Common/LoadCodecs.h ../Common/Update.h \ + ../Common/UpdateAction.h ../Common/UpdateCallback.h \ + ../Common/../Common/UpdatePair.h ../Common/../Common/DirItem.h \ + ../Common/../Common/../../Archive/IArchive.h \ + ../Common/../Common/UpdateAction.h ../Common/../Common/UpdateProduce.h \ + ../Common/../Common/UpdatePair.h ../Common/ExitCode.h \ + ../FileManager/StringUtils.h BenchmarkDialog.h \ + ../../../Windows/Synchronization.h ../../../Windows/../../C/Threads.h \ + ../../../Windows/../../C/Types.h ../../../Windows/Synchronization2.h \ + ../../../Windows/Control/ComboBox.h ../../../Windows/Window.h \ + ../../../Windows/Defs.h ../../../Windows/Control/Window2.h \ + ../Common/Bench.h ../Common/../../Common/CreateCoder.h \ + ../Common/../../Common/../../Common/MyString.h \ + ../Common/../../Common/MethodId.h \ + ../Common/../../Common/../../Common/Types.h ../FileManager/DialogSize.h \ + ../../../Windows/Control/Dialog.h BenchmarkDialogRes.h ExtractGUI.h \ + ../Common/Extract.h ../FileManager/ExtractCallback.h \ + ../../../Windows/ResourceString.h \ + ../FileManager/../Agent/IFolderArchive.h \ + ../FileManager/../Agent/../../IDecl.h \ + ../FileManager/../Agent/../../Archive/IArchive.h \ + ../FileManager/../Agent/../../UI/Common/LoadCodecs.h \ + ../FileManager/../Agent/../../UI/FileManager/IFolder.h \ + ../FileManager/../Agent/../../UI/FileManager/../../IProgress.h \ + ../FileManager/../Agent/../../UI/FileManager/../../IStream.h \ + ../FileManager/../Agent/../Common/ExtractMode.h \ + ../FileManager/../Agent/../Common/IFileExtractCallback.h \ + ../FileManager/../Common/ArchiveOpenCallback.h \ + ../FileManager/../../IPassword.h ../FileManager/IFolder.h \ + ../FileManager/ProgressDialog2.h ../../../Windows/Thread.h \ + ../../../Windows/Control/ListView.h \ + ../../../Windows/Control/ProgressBar.h ../FileManager/LangUtils.h \ + ../../../Common/Lang.h UpdateGUI.h ../Common/Update.h \ + UpdateCallbackGUI.h ../Common/ArchiveOpenCallback.h \ + ../FileManager/ProgressDialog2.h ../../../Windows/FileDir.h ExtractRes.h +wxGUI.o: wxGUI.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h /usr/include/wx-2.8/wx/wxprec.h \ + /usr/include/wx-2.8/wx/defs.h /usr/include/wx-2.8/wx/platform.h \ + /usr/lib/wx/include/gtk2-unicode-release-2.8/wx/setup.h \ + /usr/include/wx-2.8/wx/chkconf.h /usr/include/wx-2.8/wx/features.h \ + /usr/include/wx-2.8/wx/version.h /usr/include/wx-2.8/wx/cpp.h \ + /usr/include/wx-2.8/wx/dlimpexp.h /usr/include/wx-2.8/wx/debug.h \ + /usr/include/wx-2.8/wx/wxchar.h /usr/include/wx-2.8/wx/wx.h \ + /usr/include/wx-2.8/wx/object.h /usr/include/wx-2.8/wx/memory.h \ + /usr/include/wx-2.8/wx/string.h /usr/include/wx-2.8/wx/buffer.h \ + /usr/include/wx-2.8/wx/strconv.h /usr/include/wx-2.8/wx/fontenc.h \ + /usr/include/wx-2.8/wx/beforestd.h /usr/include/wx-2.8/wx/afterstd.h \ + /usr/include/wx-2.8/wx/iosfwrap.h /usr/include/wx-2.8/wx/msgout.h \ + /usr/include/wx-2.8/wx/dynarray.h /usr/include/wx-2.8/wx/list.h \ + /usr/include/wx-2.8/wx/hash.h /usr/include/wx-2.8/wx/hashmap.h \ + /usr/include/wx-2.8/wx/arrstr.h /usr/include/wx-2.8/wx/intl.h \ + /usr/include/wx-2.8/wx/log.h /usr/include/wx-2.8/wx/generic/logg.h \ + /usr/include/wx-2.8/wx/event.h /usr/include/wx-2.8/wx/clntdata.h \ + /usr/include/wx-2.8/wx/vector.h /usr/include/wx-2.8/wx/gdicmn.h \ + /usr/include/wx-2.8/wx/math.h /usr/include/wx-2.8/wx/cursor.h \ + /usr/include/wx-2.8/wx/gtk/cursor.h /usr/include/wx-2.8/wx/utils.h \ + /usr/include/wx-2.8/wx/filefn.h /usr/include/wx-2.8/wx/longlong.h \ + /usr/include/wx-2.8/wx/platinfo.h /usr/include/wx-2.8/wx/thread.h \ + /usr/include/wx-2.8/wx/app.h /usr/include/wx-2.8/wx/build.h \ + /usr/include/wx-2.8/wx/init.h /usr/include/wx-2.8/wx/gtk/app.h \ + /usr/include/wx-2.8/wx/stream.h /usr/include/wx-2.8/wx/stopwatch.h \ + /usr/include/wx-2.8/wx/module.h /usr/include/wx-2.8/wx/window.h \ + /usr/include/wx-2.8/wx/font.h /usr/include/wx-2.8/wx/gdiobj.h \ + /usr/include/wx-2.8/wx/gtk/font.h /usr/include/wx-2.8/wx/colour.h \ + /usr/include/wx-2.8/wx/variant.h /usr/include/wx-2.8/wx/datetime.h \ + /usr/include/wx-2.8/wx/gtk/colour.h /usr/include/wx-2.8/wx/region.h \ + /usr/include/wx-2.8/wx/gtk/region.h /usr/include/wx-2.8/wx/validate.h \ + /usr/include/wx-2.8/wx/palette.h \ + /usr/include/wx-2.8/wx/generic/paletteg.h /usr/include/wx-2.8/wx/accel.h \ + /usr/include/wx-2.8/wx/gtk/accel.h \ + /usr/include/wx-2.8/wx/generic/accel.h \ + /usr/include/wx-2.8/wx/gtk/window.h /usr/include/wx-2.8/wx/containr.h \ + /usr/include/wx-2.8/wx/panel.h /usr/include/wx-2.8/wx/generic/panelg.h \ + /usr/include/wx-2.8/wx/toplevel.h /usr/include/wx-2.8/wx/iconbndl.h \ + /usr/include/wx-2.8/wx/gtk/toplevel.h /usr/include/wx-2.8/wx/frame.h \ + /usr/include/wx-2.8/wx/gtk/frame.h /usr/include/wx-2.8/wx/bitmap.h \ + /usr/include/wx-2.8/wx/gtk/bitmap.h /usr/include/wx-2.8/wx/image.h \ + /usr/include/wx-2.8/wx/imagbmp.h /usr/include/wx-2.8/wx/imagpng.h \ + /usr/include/wx-2.8/wx/imaggif.h /usr/include/wx-2.8/wx/imagpcx.h \ + /usr/include/wx-2.8/wx/imagjpeg.h /usr/include/wx-2.8/wx/imagtga.h \ + /usr/include/wx-2.8/wx/imagtiff.h /usr/include/wx-2.8/wx/imagpnm.h \ + /usr/include/wx-2.8/wx/imagxpm.h /usr/include/wx-2.8/wx/imagiff.h \ + /usr/include/wx-2.8/wx/dc.h /usr/include/wx-2.8/wx/brush.h \ + /usr/include/wx-2.8/wx/gtk/brush.h /usr/include/wx-2.8/wx/pen.h \ + /usr/include/wx-2.8/wx/gtk/pen.h /usr/include/wx-2.8/wx/gtk/dc.h \ + /usr/include/wx-2.8/wx/dcgraph.h /usr/include/wx-2.8/wx/geometry.h \ + /usr/include/wx-2.8/wx/graphics.h /usr/include/wx-2.8/wx/dcclient.h \ + /usr/include/wx-2.8/wx/gtk/dcclient.h /usr/include/wx-2.8/wx/dcmemory.h \ + /usr/include/wx-2.8/wx/gtk/dcmemory.h /usr/include/wx-2.8/wx/dcprint.h \ + /usr/include/wx-2.8/wx/dcscreen.h /usr/include/wx-2.8/wx/gtk/dcscreen.h \ + /usr/include/wx-2.8/wx/button.h /usr/include/wx-2.8/wx/control.h \ + /usr/include/wx-2.8/wx/gtk/control.h /usr/include/wx-2.8/wx/gtk/button.h \ + /usr/include/wx-2.8/wx/menuitem.h /usr/include/wx-2.8/wx/gtk/menuitem.h \ + /usr/include/wx-2.8/wx/menu.h /usr/include/wx-2.8/wx/gtk/menu.h \ + /usr/include/wx-2.8/wx/icon.h /usr/include/wx-2.8/wx/iconloc.h \ + /usr/include/wx-2.8/wx/generic/icon.h /usr/include/wx-2.8/wx/dialog.h \ + /usr/include/wx-2.8/wx/gtk/dialog.h /usr/include/wx-2.8/wx/timer.h \ + /usr/include/wx-2.8/wx/gtk/timer.h /usr/include/wx-2.8/wx/settings.h \ + /usr/include/wx-2.8/wx/msgdlg.h /usr/include/wx-2.8/wx/gtk/msgdlg.h \ + /usr/include/wx-2.8/wx/cmndata.h /usr/include/wx-2.8/wx/encinfo.h \ + /usr/include/wx-2.8/wx/dataobj.h /usr/include/wx-2.8/wx/gtk/dataform.h \ + /usr/include/wx-2.8/wx/gtk/dataobj.h \ + /usr/include/wx-2.8/wx/gtk/dataobj2.h /usr/include/wx-2.8/wx/ctrlsub.h \ + /usr/include/wx-2.8/wx/bmpbuttn.h /usr/include/wx-2.8/wx/gtk/bmpbuttn.h \ + /usr/include/wx-2.8/wx/checkbox.h /usr/include/wx-2.8/wx/gtk/checkbox.h \ + /usr/include/wx-2.8/wx/checklst.h /usr/include/wx-2.8/wx/listbox.h \ + /usr/include/wx-2.8/wx/gtk/listbox.h \ + /usr/include/wx-2.8/wx/gtk/checklst.h /usr/include/wx-2.8/wx/choice.h \ + /usr/include/wx-2.8/wx/gtk/choice.h /usr/include/wx-2.8/wx/scrolbar.h \ + /usr/include/wx-2.8/wx/gtk/scrolbar.h /usr/include/wx-2.8/wx/stattext.h \ + /usr/include/wx-2.8/wx/gtk/stattext.h /usr/include/wx-2.8/wx/statbmp.h \ + /usr/include/wx-2.8/wx/gtk/statbmp.h /usr/include/wx-2.8/wx/statbox.h \ + /usr/include/wx-2.8/wx/gtk/statbox.h /usr/include/wx-2.8/wx/radiobox.h \ + /usr/include/wx-2.8/wx/gtk/radiobox.h /usr/include/wx-2.8/wx/radiobut.h \ + /usr/include/wx-2.8/wx/gtk/radiobut.h /usr/include/wx-2.8/wx/textctrl.h \ + /usr/include/wx-2.8/wx/ioswrap.h /usr/include/wx-2.8/wx/gtk/textctrl.h \ + /usr/include/wx-2.8/wx/slider.h /usr/include/wx-2.8/wx/gtk/slider.h \ + /usr/include/wx-2.8/wx/gauge.h /usr/include/wx-2.8/wx/gtk/gauge.h \ + /usr/include/wx-2.8/wx/scrolwin.h /usr/include/wx-2.8/wx/gtk/scrolwin.h \ + /usr/include/wx-2.8/wx/dirdlg.h /usr/include/wx-2.8/wx/gtk/dirdlg.h \ + /usr/include/wx-2.8/wx/generic/dirdlgg.h \ + /usr/include/wx-2.8/wx/toolbar.h /usr/include/wx-2.8/wx/tbarbase.h \ + /usr/include/wx-2.8/wx/gtk/tbargtk.h /usr/include/wx-2.8/wx/combobox.h \ + /usr/include/wx-2.8/wx/gtk/combobox.h /usr/include/wx-2.8/wx/layout.h \ + /usr/include/wx-2.8/wx/sizer.h /usr/include/wx-2.8/wx/mdi.h \ + /usr/include/wx-2.8/wx/gtk/mdi.h /usr/include/wx-2.8/wx/statusbr.h \ + /usr/include/wx-2.8/wx/generic/statusbr.h \ + /usr/include/wx-2.8/wx/choicdlg.h \ + /usr/include/wx-2.8/wx/generic/choicdgg.h \ + /usr/include/wx-2.8/wx/textdlg.h \ + /usr/include/wx-2.8/wx/generic/textdlgg.h \ + /usr/include/wx-2.8/wx/valtext.h /usr/include/wx-2.8/wx/filedlg.h \ + /usr/include/wx-2.8/wx/gtk/filedlg.h \ + /usr/include/wx-2.8/wx/generic/filedlgg.h \ + /usr/include/wx-2.8/wx/listctrl.h /usr/include/wx-2.8/wx/listbase.h \ + /usr/include/wx-2.8/wx/generic/listctrl.h ../../../../GUI/p7zip_32.xpm \ + ../../../Windows/Window.h ../../../Windows/Defs.h \ + ../../../Windows/../Common/MyWindows.h ../../../Common/MyString.h \ + ../../../Common/MyVector.h ../../../Common/Defs.h \ + ../../../Windows/Control/DialogImpl.h ../../../Windows/Control/Dialog.h \ + ../../../Windows/Registry.h ../../../Common/Buffer.h \ + ../../../Common/StringConvert.h ../../../Common/MyWindows.h \ + ../../../Common/MyString.h ../../../Windows/FileDir.h \ + ../../../Windows/../Common/MyString.h ../../../Windows/Defs.h \ + ../../../Windows/Synchronization.h ../../../Windows/../../C/Threads.h \ + ../../../Windows/../../C/Types.h ../../../Windows/Synchronization2.h \ + ExtractRes.h ../Explorer/MyMessages.h ../FileManager/resourceGui.h \ + ExtractGUI.h ../Common/Extract.h ../../../Windows/FileFind.h \ + ../../../Windows/FileName.h ../../../Windows/../../C/Types.h \ + ../Common/../../Archive/IArchive.h \ + ../Common/../../Archive/../IProgress.h \ + ../Common/../../Archive/../../Common/MyUnknown.h \ + ../Common/../../Archive/../../Common/MyWindows.h \ + ../Common/../../Archive/../../Common/Types.h \ + ../Common/../../Archive/../IDecl.h ../Common/../../Archive/../IStream.h \ + ../Common/../../Archive/../PropID.h ../Common/ArchiveExtractCallback.h \ + ../../../Common/MyCom.h ../../../Common/Wildcard.h \ + ../Common/../../IPassword.h ../Common/../../../Common/MyUnknown.h \ + ../Common/../../../Common/Types.h ../Common/../../IDecl.h \ + ../Common/../../Common/FileStreams.h \ + ../Common/../../Common/../../Windows/FileIO.h \ + ../Common/../../Common/../../Common/MyCom.h \ + ../Common/../../Common/../IStream.h \ + ../Common/../../Common/ProgressUtils.h \ + ../Common/../../Common/../ICoder.h ../Common/../../Common/../IStream.h \ + ../Common/../../Common/../IProgress.h \ + ../Common/../../Archive/Common/OutStreamWithCRC.h \ + ../Common/../../Archive/Common/../../../../C/7zCrc.h \ + ../Common/../../Archive/Common/../../../../C/Types.h \ + ../Common/../../Archive/Common/../../../Common/MyCom.h \ + ../Common/../../Archive/Common/../../IStream.h ../Common/ExtractMode.h \ + ../Common/IFileExtractCallback.h ../Common/../../IDecl.h \ + ../Common/OpenArchive.h ../Common/ArchiveOpenCallback.h \ + ../Common/LoadCodecs.h ../Common/../../../Common/Types.h \ + ../Common/../../../Common/MyCom.h ../Common/../../../Common/MyString.h \ + ../Common/../../../Common/Buffer.h ../Common/../../ICoder.h \ + ../Common/../../../Windows/DLL.h \ + ../Common/../../../Windows/../Common/MyString.h ../Common/Property.h \ + ../Common/../Common/LoadCodecs.h ../FileManager/ExtractCallback.h \ + ../../../Windows/ResourceString.h \ + ../FileManager/../Agent/IFolderArchive.h \ + ../FileManager/../Agent/../../IDecl.h \ + ../FileManager/../Agent/../../Archive/IArchive.h \ + ../FileManager/../Agent/../../UI/Common/LoadCodecs.h \ + ../FileManager/../Agent/../../UI/FileManager/IFolder.h \ + ../FileManager/../Agent/../../UI/FileManager/../../IProgress.h \ + ../FileManager/../Agent/../../UI/FileManager/../../IStream.h \ + ../FileManager/../Agent/../Common/ExtractMode.h \ + ../FileManager/../Agent/../Common/IFileExtractCallback.h \ + ../FileManager/../Common/ArchiveOpenCallback.h \ + ../FileManager/../../IPassword.h ../FileManager/IFolder.h \ + ../FileManager/ProgressDialog2.h ../../../Windows/Thread.h \ + ../../../Windows/Control/ListView.h \ + ../../../Windows/Control/ProgressBar.h ../FileManager/LangUtils.h \ + ../../../Common/Lang.h UpdateGUI.h ../Common/Update.h \ + ../Common/UpdateAction.h ../Common/UpdateCallback.h \ + ../Common/../Common/UpdatePair.h ../Common/../Common/DirItem.h \ + ../Common/../Common/../../Archive/IArchive.h \ + ../Common/../Common/UpdateAction.h ../Common/../Common/UpdateProduce.h \ + ../Common/../Common/UpdatePair.h UpdateCallbackGUI.h \ + ../Common/ArchiveOpenCallback.h ../FileManager/ProgressDialog2.h \ + BenchmarkDialog.h ../../../Windows/Control/ComboBox.h \ + ../../../Windows/Control/Window2.h ../Common/Bench.h \ + ../Common/../../Common/CreateCoder.h \ + ../Common/../../Common/../../Common/MyString.h \ + ../Common/../../Common/MethodId.h \ + ../Common/../../Common/../../Common/Types.h ../FileManager/DialogSize.h \ + BenchmarkDialogRes.h ../FileManager/RegistryUtils.h \ + ../FileManager/ProgramLocation.h ../../../myWindows/myPrivate.h \ + resource2.h +UpdateCallbackGUI.o: UpdateCallbackGUI.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../../Common/IntToString.h \ + ../../../Common/StringConvert.h ../../../Common/MyWindows.h \ + ../../../Common/MyString.h ../../../Common/MyVector.h \ + ../../../Common/Defs.h ../../../Windows/Error.h \ + ../../../Common/MyString.h ../../../Windows/PropVariant.h \ + ../../../Windows/../Common/MyWindows.h \ + ../../../Windows/../Common/Types.h ../FileManager/PasswordDialog.h \ + ../../../Windows/Control/Dialog.h ../../../Windows/Window.h \ + ../../../Windows/Defs.h ../../../Windows/Control/Edit.h \ + ../FileManager/PasswordDialogRes.h UpdateCallbackGUI.h \ + ../Common/Update.h ../../../Common/Wildcard.h \ + ../Common/ArchiveOpenCallback.h ../../../Common/MyCom.h \ + ../../../Windows/FileFind.h ../../../Windows/../Common/MyString.h \ + ../../../Windows/FileName.h ../../../Windows/../../C/Types.h \ + ../../../Windows/Defs.h ../Common/../../IPassword.h \ + ../Common/../../../Common/MyUnknown.h \ + ../Common/../../../Common/MyWindows.h ../Common/../../../Common/Types.h \ + ../Common/../../IDecl.h ../Common/../../Archive/IArchive.h \ + ../Common/../../Archive/../IProgress.h \ + ../Common/../../Archive/../../Common/MyUnknown.h \ + ../Common/../../Archive/../../Common/Types.h \ + ../Common/../../Archive/../IDecl.h ../Common/../../Archive/../IStream.h \ + ../Common/../../Archive/../PropID.h ../Common/LoadCodecs.h \ + ../Common/../../../Common/Types.h ../Common/../../../Common/MyCom.h \ + ../Common/../../../Common/MyString.h ../Common/../../../Common/Buffer.h \ + ../Common/../../../Common/Defs.h ../Common/../../ICoder.h \ + ../Common/../../IStream.h ../Common/../../../Windows/DLL.h \ + ../Common/../../../Windows/../Common/MyString.h ../Common/Property.h \ + ../Common/UpdateAction.h ../Common/UpdateCallback.h \ + ../Common/../Common/UpdatePair.h ../Common/../Common/DirItem.h \ + ../Common/../Common/../../Archive/IArchive.h \ + ../Common/../Common/UpdateAction.h ../Common/../Common/UpdateProduce.h \ + ../Common/../Common/UpdatePair.h ../Common/ArchiveOpenCallback.h \ + ../FileManager/ProgressDialog2.h ../../../Windows/Synchronization.h \ + ../../../Windows/../../C/Threads.h ../../../Windows/../../C/Types.h \ + ../../../Windows/Synchronization2.h ../../../Windows/Thread.h \ + ../../../Windows/Control/ListView.h \ + ../../../Windows/Control/ProgressBar.h +UpdateGUI.o: UpdateGUI.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h UpdateGUI.h ../Common/Update.h \ + ../../../Common/Wildcard.h ../../../Common/MyString.h \ + ../../../Common/MyVector.h ../../../Common/Defs.h \ + ../Common/ArchiveOpenCallback.h ../../../Common/MyCom.h \ + ../../../Common/MyWindows.h ../../../Common/MyString.h \ + ../../../Windows/FileFind.h ../../../Windows/../Common/MyString.h \ + ../../../Windows/FileName.h ../../../Windows/../../C/Types.h \ + ../../../Windows/Defs.h ../../../Windows/../Common/MyWindows.h \ + ../Common/../../IPassword.h ../Common/../../../Common/MyUnknown.h \ + ../Common/../../../Common/MyWindows.h ../Common/../../../Common/Types.h \ + ../Common/../../IDecl.h ../Common/../../Archive/IArchive.h \ + ../Common/../../Archive/../IProgress.h \ + ../Common/../../Archive/../../Common/MyUnknown.h \ + ../Common/../../Archive/../../Common/Types.h \ + ../Common/../../Archive/../IDecl.h ../Common/../../Archive/../IStream.h \ + ../Common/../../Archive/../PropID.h ../Common/LoadCodecs.h \ + ../Common/../../../Common/Types.h ../Common/../../../Common/MyCom.h \ + ../Common/../../../Common/MyString.h ../Common/../../../Common/Buffer.h \ + ../Common/../../../Common/Defs.h ../Common/../../ICoder.h \ + ../Common/../../IStream.h ../Common/../../../Windows/DLL.h \ + ../Common/../../../Windows/../Common/MyString.h ../Common/Property.h \ + ../Common/UpdateAction.h ../Common/UpdateCallback.h \ + ../Common/../Common/UpdatePair.h ../Common/../Common/DirItem.h \ + ../Common/../Common/../../Archive/IArchive.h \ + ../Common/../Common/UpdateAction.h ../Common/../Common/UpdateProduce.h \ + ../Common/../Common/UpdatePair.h UpdateCallbackGUI.h \ + ../Common/ArchiveOpenCallback.h ../FileManager/ProgressDialog2.h \ + ../../../Windows/Synchronization.h ../../../Windows/../../C/Threads.h \ + ../../../Windows/../../C/Types.h ../../../Windows/Synchronization2.h \ + ../../../Windows/Thread.h ../../../Windows/Control/Dialog.h \ + ../../../Windows/Window.h ../../../Windows/Defs.h \ + ../../../Windows/Control/ListView.h \ + ../../../Windows/Control/ProgressBar.h ../../../Common/IntToString.h \ + ../../../Common/StringConvert.h ../../../Common/StringToInt.h \ + ../../../Windows/Error.h ../../../Windows/FileDir.h ../Common/WorkDir.h \ + ../Common/ZipRegistry.h ../Common/ExtractMode.h ../Explorer/MyMessages.h \ + ../FileManager/LangUtils.h ../../../Common/Lang.h \ + ../../../Windows/ResourceString.h ../FileManager/ProgramLocation.h \ + ../FileManager/StringUtils.h ../FileManager/resourceGui.h \ + CompressDialog.h ../../../Windows/Control/ComboBox.h \ + ../../../Windows/Control/Window2.h ../../../Windows/Control/Edit.h \ + ../Common/LoadCodecs.h ../Common/ZipRegistry.h \ + ../FileManager/DialogSize.h CompressDialogRes.h resource2.h +ArchiveCommandLine.o: ../Common/ArchiveCommandLine.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../../Common/ListFileUtils.h ../../../Common/MyString.h \ + ../../../Common/MyVector.h ../../../Common/Defs.h \ + ../../../Common/StringConvert.h ../../../Common/MyWindows.h \ + ../../../Common/StringToInt.h ../../../Windows/FileDir.h \ + ../../../Windows/../Common/MyString.h ../../../Windows/Defs.h \ + ../../../Windows/../Common/MyWindows.h ../../../Windows/FileName.h \ + ../../../Windows/../../C/Types.h ../../../myWindows/myPrivate.h \ + ../Common/ArchiveCommandLine.h ../../../Common/CommandLineParser.h \ + ../../../Common/Wildcard.h ../Common/Extract.h \ + ../../../Windows/FileFind.h ../../../Windows/FileName.h \ + ../Common/../../Archive/IArchive.h \ + ../Common/../../Archive/../IProgress.h \ + ../Common/../../Archive/../../Common/MyUnknown.h \ + ../Common/../../Archive/../../Common/MyWindows.h \ + ../Common/../../Archive/../../Common/Types.h \ + ../Common/../../Archive/../IDecl.h ../Common/../../Archive/../IStream.h \ + ../Common/../../Archive/../PropID.h ../Common/ArchiveExtractCallback.h \ + ../../../Common/MyCom.h ../Common/../../IPassword.h \ + ../Common/../../../Common/MyUnknown.h ../Common/../../../Common/Types.h \ + ../Common/../../IDecl.h ../Common/../../Common/FileStreams.h \ + ../Common/../../Common/../../Windows/FileIO.h ../../../Common/MyString.h \ + ../Common/../../Common/../../Common/MyCom.h \ + ../Common/../../Common/../IStream.h \ + ../Common/../../Common/ProgressUtils.h \ + ../Common/../../Common/../ICoder.h ../Common/../../Common/../IStream.h \ + ../Common/../../Common/../IProgress.h \ + ../Common/../../Archive/Common/OutStreamWithCRC.h \ + ../Common/../../Archive/Common/../../../../C/7zCrc.h \ + ../Common/../../Archive/Common/../../../../C/Types.h \ + ../Common/../../Archive/Common/../../../Common/MyCom.h \ + ../Common/../../Archive/Common/../../IStream.h ../Common/ExtractMode.h \ + ../Common/IFileExtractCallback.h ../Common/../../IDecl.h \ + ../Common/OpenArchive.h ../Common/ArchiveOpenCallback.h \ + ../Common/LoadCodecs.h ../Common/../../../Common/Types.h \ + ../Common/../../../Common/MyCom.h ../Common/../../../Common/MyString.h \ + ../Common/../../../Common/Buffer.h ../Common/../../../Common/Defs.h \ + ../Common/../../ICoder.h ../Common/../../../Windows/DLL.h \ + ../Common/../../../Windows/../Common/MyString.h ../Common/Property.h \ + ../Common/../Common/LoadCodecs.h ../Common/Update.h \ + ../Common/UpdateAction.h ../Common/UpdateCallback.h \ + ../Common/../Common/UpdatePair.h ../Common/../Common/DirItem.h \ + ../Common/../Common/../../Archive/IArchive.h \ + ../Common/../Common/UpdateAction.h ../Common/../Common/UpdateProduce.h \ + ../Common/../Common/UpdatePair.h ../Common/EnumDirItems.h \ + ../Common/DirItem.h ../Common/SortUtils.h +ArchiveExtractCallback.o: ../Common/ArchiveExtractCallback.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../../Common/ComTry.h ../../../Common/MyWindows.h \ + ../../../Common/Wildcard.h ../../../Common/MyString.h \ + ../../../Common/MyVector.h ../../../Common/Defs.h \ + ../../../Windows/FileDir.h ../../../Windows/../Common/MyString.h \ + ../../../Windows/Defs.h ../../../Windows/../Common/MyWindows.h \ + ../../../Windows/FileFind.h ../../../Windows/FileName.h \ + ../../../Windows/../../C/Types.h ../../../Windows/PropVariant.h \ + ../../../Windows/../Common/Types.h \ + ../../../Windows/PropVariantConversions.h ../../../Common/MyString.h \ + ../Common/../../Common/FilePathAutoRename.h \ + ../Common/../Common/ExtractingFilePath.h \ + ../Common/ArchiveExtractCallback.h ../../../Common/MyCom.h \ + ../Common/../../IPassword.h ../Common/../../../Common/MyUnknown.h \ + ../Common/../../../Common/MyWindows.h ../Common/../../../Common/Types.h \ + ../Common/../../IDecl.h ../Common/../../Common/FileStreams.h \ + ../Common/../../Common/../../Windows/FileIO.h \ + ../Common/../../Common/../../Common/MyCom.h \ + ../Common/../../Common/../IStream.h \ + ../Common/../../Common/../../Common/MyUnknown.h \ + ../Common/../../Common/../../Common/Types.h \ + ../Common/../../Common/../IDecl.h ../Common/../../Common/ProgressUtils.h \ + ../Common/../../Common/../ICoder.h ../Common/../../Common/../IStream.h \ + ../Common/../../Common/../IProgress.h ../Common/../../Archive/IArchive.h \ + ../Common/../../Archive/../IProgress.h \ + ../Common/../../Archive/../IStream.h ../Common/../../Archive/../PropID.h \ + ../Common/../../Archive/Common/OutStreamWithCRC.h \ + ../Common/../../Archive/Common/../../../../C/7zCrc.h \ + ../Common/../../Archive/Common/../../../../C/Types.h \ + ../Common/../../Archive/Common/../../../Common/MyCom.h \ + ../Common/../../Archive/Common/../../IStream.h ../Common/ExtractMode.h \ + ../Common/IFileExtractCallback.h ../Common/../../IDecl.h \ + ../Common/OpenArchive.h ../Common/ArchiveOpenCallback.h \ + ../Common/LoadCodecs.h ../Common/../../../Common/Types.h \ + ../Common/../../../Common/MyCom.h ../Common/../../../Common/MyString.h \ + ../Common/../../../Common/Buffer.h ../Common/../../../Common/Defs.h \ + ../Common/../../ICoder.h ../Common/../../../Windows/DLL.h \ + ../Common/../../../Windows/../Common/MyString.h +ArchiveOpenCallback.o: ../Common/ArchiveOpenCallback.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../../Common/StringConvert.h ../../../Common/MyWindows.h \ + ../../../Common/MyString.h ../../../Common/MyVector.h \ + ../../../Common/Defs.h ../../../Common/ComTry.h \ + ../../../Windows/PropVariant.h ../../../Windows/../Common/MyWindows.h \ + ../../../Windows/../Common/Types.h ../Common/../../Common/FileStreams.h \ + ../Common/../../Common/../../Windows/FileIO.h ../../../Common/MyString.h \ + ../Common/../../Common/../../Common/MyCom.h \ + ../Common/../../Common/../../Common/MyWindows.h \ + ../Common/../../Common/../IStream.h \ + ../Common/../../Common/../../Common/MyUnknown.h \ + ../Common/../../Common/../../Common/Types.h \ + ../Common/../../Common/../IDecl.h ../Common/ArchiveOpenCallback.h \ + ../../../Common/MyCom.h ../../../Windows/FileFind.h \ + ../../../Windows/../Common/MyString.h ../../../Windows/FileName.h \ + ../../../Windows/../../C/Types.h ../../../Windows/Defs.h \ + ../Common/../../IPassword.h ../Common/../../../Common/MyUnknown.h \ + ../Common/../../../Common/Types.h ../Common/../../IDecl.h \ + ../Common/../../Archive/IArchive.h \ + ../Common/../../Archive/../IProgress.h \ + ../Common/../../Archive/../../Common/MyUnknown.h \ + ../Common/../../Archive/../../Common/Types.h \ + ../Common/../../Archive/../IDecl.h ../Common/../../Archive/../IStream.h \ + ../Common/../../Archive/../PropID.h +Bench.o: ../Common/Bench.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../Common/Bench.h \ + ../Common/../../Common/CreateCoder.h \ + ../Common/../../Common/../../Common/MyCom.h \ + ../Common/../../Common/../../Common/MyWindows.h \ + ../Common/../../Common/../../Common/MyString.h \ + ../Common/../../Common/../../Common/MyVector.h \ + ../Common/../../Common/../../Common/Defs.h \ + ../Common/../../Common/../ICoder.h ../Common/../../Common/../IStream.h \ + ../Common/../../Common/../../Common/MyUnknown.h \ + ../Common/../../Common/../../Common/Types.h \ + ../Common/../../Common/../IDecl.h ../Common/../../Common/MethodId.h \ + ../Common/../../Common/../../Common/Types.h \ + ../Common/../../../../C/7zCrc.h ../Common/../../../../C/Types.h \ + ../Common/../../../../C/Alloc.h \ + ../Common/../../../Windows/Synchronization.h \ + ../Common/../../../Windows/Defs.h \ + ../Common/../../../Windows/../Common/MyWindows.h \ + ../Common/../../../Windows/../../C/Threads.h \ + ../Common/../../../Windows/../../C/Types.h \ + ../Common/../../../Windows/Synchronization2.h \ + ../Common/../../../Windows/Thread.h \ + ../Common/../../../Windows/PropVariant.h \ + ../Common/../../../Windows/../Common/Types.h +DefaultName.o: ../Common/DefaultName.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../Common/DefaultName.h \ + ../../../Common/MyString.h ../../../Common/MyVector.h \ + ../../../Common/Defs.h +EnumDirItems.o: ../Common/EnumDirItems.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../Common/EnumDirItems.h \ + ../../../Common/Wildcard.h ../../../Common/MyString.h \ + ../../../Common/MyVector.h ../../../Common/Defs.h \ + ../../../Windows/FileFind.h ../../../Windows/../Common/MyString.h \ + ../../../Windows/FileName.h ../../../Windows/../../C/Types.h \ + ../../../Windows/Defs.h ../../../Windows/../Common/MyWindows.h \ + ../Common/DirItem.h ../../../Common/MyString.h \ + ../Common/../../Archive/IArchive.h \ + ../Common/../../Archive/../IProgress.h \ + ../Common/../../Archive/../../Common/MyUnknown.h \ + ../Common/../../Archive/../../Common/MyWindows.h \ + ../Common/../../Archive/../../Common/Types.h \ + ../Common/../../Archive/../IDecl.h ../Common/../../Archive/../IStream.h \ + ../Common/../../Archive/../PropID.h +Extract.o: ../Common/Extract.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../../Windows/FileDir.h \ + ../../../Windows/../Common/MyString.h \ + ../../../Windows/../Common/MyVector.h ../../../Windows/../Common/Defs.h \ + ../../../Windows/Defs.h ../../../Windows/../Common/MyWindows.h \ + ../../../Windows/PropVariant.h ../../../Windows/../Common/Types.h \ + ../../../Windows/PropVariantConversions.h ../../../Common/MyString.h \ + ../Common/../Common/ExtractingFilePath.h ../Common/Extract.h \ + ../../../Windows/FileFind.h ../../../Windows/FileName.h \ + ../../../Windows/../../C/Types.h ../Common/../../Archive/IArchive.h \ + ../Common/../../Archive/../IProgress.h \ + ../Common/../../Archive/../../Common/MyUnknown.h \ + ../Common/../../Archive/../../Common/MyWindows.h \ + ../Common/../../Archive/../../Common/Types.h \ + ../Common/../../Archive/../IDecl.h ../Common/../../Archive/../IStream.h \ + ../Common/../../Archive/../PropID.h ../Common/ArchiveExtractCallback.h \ + ../../../Common/MyCom.h ../../../Common/MyWindows.h \ + ../../../Common/Wildcard.h ../../../Common/MyString.h \ + ../Common/../../IPassword.h ../Common/../../../Common/MyUnknown.h \ + ../Common/../../../Common/Types.h ../Common/../../IDecl.h \ + ../Common/../../Common/FileStreams.h \ + ../Common/../../Common/../../Windows/FileIO.h \ + ../Common/../../Common/../../Common/MyCom.h \ + ../Common/../../Common/../IStream.h \ + ../Common/../../Common/ProgressUtils.h \ + ../Common/../../Common/../ICoder.h ../Common/../../Common/../IStream.h \ + ../Common/../../Common/../IProgress.h \ + ../Common/../../Archive/Common/OutStreamWithCRC.h \ + ../Common/../../Archive/Common/../../../../C/7zCrc.h \ + ../Common/../../Archive/Common/../../../../C/Types.h \ + ../Common/../../Archive/Common/../../../Common/MyCom.h \ + ../Common/../../Archive/Common/../../IStream.h ../Common/ExtractMode.h \ + ../Common/IFileExtractCallback.h ../Common/../../IDecl.h \ + ../Common/OpenArchive.h ../Common/ArchiveOpenCallback.h \ + ../Common/LoadCodecs.h ../Common/../../../Common/Types.h \ + ../Common/../../../Common/MyCom.h ../Common/../../../Common/MyString.h \ + ../Common/../../../Common/Buffer.h ../Common/../../../Common/Defs.h \ + ../Common/../../ICoder.h ../Common/../../../Windows/DLL.h \ + ../Common/../../../Windows/../Common/MyString.h ../Common/Property.h \ + ../Common/../Common/LoadCodecs.h ../Common/SetProperties.h +ExtractingFilePath.o: ../Common/ExtractingFilePath.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../Common/../../../../C/Types.h ../../../Common/Wildcard.h \ + ../../../Common/MyString.h ../../../Common/MyVector.h \ + ../../../Common/Defs.h ../Common/ExtractingFilePath.h \ + ../../../Common/MyString.h +LoadCodecs.o: ../Common/LoadCodecs.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../Common/LoadCodecs.h \ + ../Common/../../../Common/Types.h ../Common/../../../Common/MyCom.h \ + ../Common/../../../Common/MyWindows.h \ + ../Common/../../../Common/MyString.h \ + ../Common/../../../Common/MyVector.h ../Common/../../../Common/Defs.h \ + ../Common/../../../Common/Buffer.h ../Common/../../ICoder.h \ + ../Common/../../IStream.h ../Common/../../../Common/MyUnknown.h \ + ../Common/../../../Common/Types.h ../Common/../../IDecl.h \ + ../Common/../../../Windows/DLL.h \ + ../Common/../../../Windows/../Common/MyString.h \ + ../Common/../../Archive/IArchive.h \ + ../Common/../../Archive/../IProgress.h \ + ../Common/../../Archive/../../Common/MyUnknown.h \ + ../Common/../../Archive/../../Common/Types.h \ + ../Common/../../Archive/../IDecl.h ../Common/../../Archive/../IStream.h \ + ../Common/../../Archive/../PropID.h \ + ../Common/../../../Windows/PropVariant.h \ + ../Common/../../../Windows/../Common/MyWindows.h \ + ../Common/../../../Windows/../Common/Types.h \ + ../Common/../../Common/RegisterArc.h \ + ../Common/../../Common/../Archive/IArchive.h \ + ../Common/../../../Windows/FileFind.h \ + ../Common/../../../Windows/FileName.h \ + ../Common/../../../Windows/../../C/Types.h \ + ../Common/../../../Windows/Defs.h ../../../Common/StringConvert.h \ + ../../../Common/MyWindows.h ../../../Common/MyString.h +OpenArchive.o: ../Common/OpenArchive.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../../Common/Wildcard.h \ + ../../../Common/MyString.h ../../../Common/MyVector.h \ + ../../../Common/Defs.h ../../../Windows/FileDir.h \ + ../../../Windows/../Common/MyString.h ../../../Windows/Defs.h \ + ../../../Windows/../Common/MyWindows.h ../../../Windows/PropVariant.h \ + ../../../Windows/../Common/Types.h ../Common/../../Common/FileStreams.h \ + ../Common/../../Common/../../Windows/FileIO.h ../../../Common/MyString.h \ + ../Common/../../Common/../../Common/MyCom.h \ + ../Common/../../Common/../../Common/MyWindows.h \ + ../Common/../../Common/../IStream.h \ + ../Common/../../Common/../../Common/MyUnknown.h \ + ../Common/../../Common/../../Common/Types.h \ + ../Common/../../Common/../IDecl.h ../Common/../../Common/StreamUtils.h \ + ../Common/DefaultName.h ../Common/OpenArchive.h \ + ../../../Windows/FileFind.h ../../../Windows/FileName.h \ + ../../../Windows/../../C/Types.h ../Common/../../Archive/IArchive.h \ + ../Common/../../Archive/../IProgress.h \ + ../Common/../../Archive/../../Common/MyUnknown.h \ + ../Common/../../Archive/../../Common/Types.h \ + ../Common/../../Archive/../IDecl.h ../Common/../../Archive/../IStream.h \ + ../Common/../../Archive/../PropID.h ../Common/ArchiveOpenCallback.h \ + ../../../Common/MyCom.h ../Common/../../IPassword.h \ + ../Common/../../../Common/MyUnknown.h ../Common/../../../Common/Types.h \ + ../Common/../../IDecl.h ../Common/LoadCodecs.h \ + ../Common/../../../Common/Types.h ../Common/../../../Common/MyCom.h \ + ../Common/../../../Common/MyString.h ../Common/../../../Common/Buffer.h \ + ../Common/../../../Common/Defs.h ../Common/../../ICoder.h \ + ../Common/../../IStream.h ../Common/../../../Windows/DLL.h \ + ../Common/../../../Windows/../Common/MyString.h +PropIDUtils.o: ../Common/PropIDUtils.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../../Common/IntToString.h \ + ../../../Windows/FileFind.h ../../../Windows/../Common/MyString.h \ + ../../../Windows/../Common/MyVector.h ../../../Windows/../Common/Defs.h \ + ../../../Windows/FileName.h ../../../Windows/../../C/Types.h \ + ../../../Windows/Defs.h ../../../Windows/../Common/MyWindows.h \ + ../../../Windows/PropVariantConversions.h ../../../Common/MyString.h \ + ../Common/../../PropID.h ../Common/PropIDUtils.h +SetProperties.o: ../Common/SetProperties.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../Common/SetProperties.h \ + ../Common/Property.h ../../../Common/MyString.h \ + ../../../Common/MyVector.h ../../../Common/Defs.h \ + ../../../Windows/PropVariant.h ../../../Windows/../Common/MyWindows.h \ + ../../../Windows/../Common/Types.h ../../../Common/StringToInt.h \ + ../../../Common/MyCom.h ../../../Common/MyWindows.h \ + ../Common/../../Archive/IArchive.h \ + ../Common/../../Archive/../IProgress.h \ + ../Common/../../Archive/../../Common/MyUnknown.h \ + ../Common/../../Archive/../../Common/MyWindows.h \ + ../Common/../../Archive/../../Common/Types.h \ + ../Common/../../Archive/../IDecl.h ../Common/../../Archive/../IStream.h \ + ../Common/../../Archive/../PropID.h +SortUtils.o: ../Common/SortUtils.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../Common/SortUtils.h \ + ../../../Common/MyString.h ../../../Common/MyVector.h \ + ../../../Common/Defs.h ../../../Common/Wildcard.h \ + ../../../Common/MyString.h +TempFiles.o: ../Common/TempFiles.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../Common/TempFiles.h \ + ../../../Common/MyString.h ../../../Common/MyVector.h \ + ../../../Common/Defs.h ../../../Windows/FileDir.h \ + ../../../Windows/../Common/MyString.h ../../../Windows/Defs.h \ + ../../../Windows/../Common/MyWindows.h ../../../Windows/FileIO.h +Update.o: ../Common/Update.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../Common/Update.h \ + ../../../Common/Wildcard.h ../../../Common/MyString.h \ + ../../../Common/MyVector.h ../../../Common/Defs.h \ + ../Common/ArchiveOpenCallback.h ../../../Common/MyCom.h \ + ../../../Common/MyWindows.h ../../../Common/MyString.h \ + ../../../Windows/FileFind.h ../../../Windows/../Common/MyString.h \ + ../../../Windows/FileName.h ../../../Windows/../../C/Types.h \ + ../../../Windows/Defs.h ../../../Windows/../Common/MyWindows.h \ + ../Common/../../IPassword.h ../Common/../../../Common/MyUnknown.h \ + ../Common/../../../Common/MyWindows.h ../Common/../../../Common/Types.h \ + ../Common/../../IDecl.h ../Common/../../Archive/IArchive.h \ + ../Common/../../Archive/../IProgress.h \ + ../Common/../../Archive/../../Common/MyUnknown.h \ + ../Common/../../Archive/../../Common/Types.h \ + ../Common/../../Archive/../IDecl.h ../Common/../../Archive/../IStream.h \ + ../Common/../../Archive/../PropID.h ../Common/LoadCodecs.h \ + ../Common/../../../Common/Types.h ../Common/../../../Common/MyCom.h \ + ../Common/../../../Common/MyString.h ../Common/../../../Common/Buffer.h \ + ../Common/../../../Common/Defs.h ../Common/../../ICoder.h \ + ../Common/../../IStream.h ../Common/../../../Windows/DLL.h \ + ../Common/../../../Windows/../Common/MyString.h ../Common/Property.h \ + ../Common/UpdateAction.h ../Common/UpdateCallback.h \ + ../Common/../Common/UpdatePair.h ../Common/../Common/DirItem.h \ + ../Common/../Common/../../Archive/IArchive.h \ + ../Common/../Common/UpdateAction.h ../Common/../Common/UpdateProduce.h \ + ../Common/../Common/UpdatePair.h ../../../Common/IntToString.h \ + ../../../Common/StringConvert.h ../../../Windows/FileDir.h \ + ../../../Windows/FileName.h ../../../Windows/PropVariant.h \ + ../../../Windows/../Common/Types.h \ + ../../../Windows/PropVariantConversions.h ../../../Windows/Time.h \ + ../Common/../../Common/FileStreams.h \ + ../Common/../../Common/../../Windows/FileIO.h \ + ../Common/../../Common/../../Common/MyCom.h \ + ../Common/../../Common/../IStream.h ../Common/../../Compress/CopyCoder.h \ + ../Common/../../Compress/../../Common/MyCom.h \ + ../Common/../../Compress/../ICoder.h ../Common/../Common/DirItem.h \ + ../Common/../Common/EnumDirItems.h ../Common/../Common/OpenArchive.h \ + ../Common/../Common/ArchiveOpenCallback.h \ + ../Common/../Common/LoadCodecs.h ../Common/EnumDirItems.h \ + ../Common/SetProperties.h ../Common/TempFiles.h +UpdateAction.o: ../Common/UpdateAction.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../Common/UpdateAction.h +UpdateCallback.o: ../Common/UpdateCallback.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../../Common/ComTry.h ../../../Common/MyWindows.h \ + ../../../Common/Defs.h ../../../Common/IntToString.h \ + ../../../Common/StringConvert.h ../../../Common/MyString.h \ + ../../../Common/MyVector.h ../../../Common/Defs.h \ + ../../../Windows/PropVariant.h ../../../Windows/../Common/MyWindows.h \ + ../../../Windows/../Common/Types.h ../Common/../../Common/FileStreams.h \ + ../Common/../../Common/../../Windows/FileIO.h ../../../Common/MyString.h \ + ../Common/../../Common/../../Common/MyCom.h \ + ../Common/../../Common/../../Common/MyWindows.h \ + ../Common/../../Common/../IStream.h \ + ../Common/../../Common/../../Common/MyUnknown.h \ + ../Common/../../Common/../../Common/Types.h \ + ../Common/../../Common/../IDecl.h ../Common/UpdateCallback.h \ + ../../../Common/MyCom.h ../Common/../../IPassword.h \ + ../Common/../../../Common/MyUnknown.h ../Common/../../../Common/Types.h \ + ../Common/../../IDecl.h ../Common/../../ICoder.h \ + ../Common/../../IStream.h ../Common/../Common/UpdatePair.h \ + ../Common/../Common/DirItem.h \ + ../Common/../Common/../../Archive/IArchive.h \ + ../Common/../Common/../../Archive/../IProgress.h \ + ../Common/../Common/../../Archive/../../Common/MyUnknown.h \ + ../Common/../Common/../../Archive/../../Common/Types.h \ + ../Common/../Common/../../Archive/../IDecl.h \ + ../Common/../Common/../../Archive/../IStream.h \ + ../Common/../Common/../../Archive/../PropID.h \ + ../Common/../Common/UpdateAction.h ../Common/../Common/UpdateProduce.h \ + ../Common/../Common/UpdatePair.h +UpdatePair.o: ../Common/UpdatePair.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../../Common/Defs.h \ + ../../../Common/Wildcard.h ../../../Common/MyString.h \ + ../../../Common/MyVector.h ../../../Common/Defs.h \ + ../../../Windows/Time.h ../Common/SortUtils.h ../../../Common/MyString.h \ + ../Common/UpdatePair.h ../Common/DirItem.h \ + ../Common/../../Archive/IArchive.h \ + ../Common/../../Archive/../IProgress.h \ + ../Common/../../Archive/../../Common/MyUnknown.h \ + ../Common/../../Archive/../../Common/MyWindows.h \ + ../Common/../../Archive/../../Common/Types.h \ + ../Common/../../Archive/../IDecl.h ../Common/../../Archive/../IStream.h \ + ../Common/../../Archive/../PropID.h ../Common/UpdateAction.h +UpdateProduce.o: ../Common/UpdateProduce.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../Common/UpdateProduce.h \ + ../Common/UpdatePair.h ../Common/DirItem.h ../../../Common/MyString.h \ + ../../../Common/MyVector.h ../../../Common/Defs.h \ + ../Common/../../Archive/IArchive.h \ + ../Common/../../Archive/../IProgress.h \ + ../Common/../../Archive/../../Common/MyUnknown.h \ + ../Common/../../Archive/../../Common/MyWindows.h \ + ../Common/../../Archive/../../Common/Types.h \ + ../Common/../../Archive/../IDecl.h ../Common/../../Archive/../IStream.h \ + ../Common/../../Archive/../PropID.h ../Common/UpdateAction.h +WorkDir.o: ../Common/WorkDir.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../../Common/StringConvert.h \ + ../../../Common/MyWindows.h ../../../Common/MyString.h \ + ../../../Common/MyVector.h ../../../Common/Defs.h \ + ../../../Common/Wildcard.h ../../../Windows/FileDir.h \ + ../../../Windows/../Common/MyString.h ../../../Windows/Defs.h \ + ../../../Windows/../Common/MyWindows.h ../../../Windows/FileName.h \ + ../../../Windows/../../C/Types.h ../Common/WorkDir.h \ + ../Common/ZipRegistry.h ../../../Common/MyString.h \ + ../Common/ExtractMode.h +ZipRegistry.o: ../Common/ZipRegistry.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../../Common/IntToString.h \ + ../../../Common/StringConvert.h ../../../Common/MyWindows.h \ + ../../../Common/MyString.h ../../../Common/MyVector.h \ + ../../../Common/Defs.h ../../../Windows/FileDir.h \ + ../../../Windows/../Common/MyString.h ../../../Windows/Defs.h \ + ../../../Windows/../Common/MyWindows.h ../../../Windows/Registry.h \ + ../../../Common/Buffer.h ../../../Common/MyString.h \ + ../../../Windows/Synchronization.h ../../../Windows/../../C/Threads.h \ + ../../../Windows/../../C/Types.h ../../../Windows/Synchronization2.h \ + ../Common/ZipRegistry.h ../Common/ExtractMode.h +MyMessages.o: ../Explorer/MyMessages.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../Explorer/MyMessages.h \ + ../../../Common/MyString.h ../../../Common/MyVector.h \ + ../../../Common/Defs.h ../../../Windows/Error.h \ + ../../../Windows/ResourceString.h ../Explorer/../FileManager/LangUtils.h \ + ../../../Common/Lang.h ../../../Common/MyString.h +FormatUtils.o: ../../UI/FileManager/FormatUtils.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../UI/FileManager/FormatUtils.h ../../../Common/MyString.h \ + ../../../Common/MyVector.h ../../../Common/Defs.h \ + ../../../Common/IntToString.h ../../../Windows/ResourceString.h \ + ../../UI/FileManager/LangUtils.h ../../../Common/Lang.h \ + ../../../Common/MyString.h +ProgramLocation.o: ../../UI/FileManager/ProgramLocation.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../UI/FileManager/ProgramLocation.h ../../../Common/MyString.h \ + ../../../Common/MyVector.h ../../../Common/Defs.h \ + ../../../Common/StringConvert.h ../../../Common/MyWindows.h \ + ../../../Common/MyString.h +ProgressDialog2.o: ../../UI/FileManager/ProgressDialog2.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../../Common/IntToString.h ../../../Common/StringConvert.h \ + ../../../Common/MyWindows.h ../../../Common/MyString.h \ + ../../../Common/MyVector.h ../../../Common/Defs.h \ + ../../../Windows/Control/Static.h ../../../Windows/Window.h \ + ../../../Windows/Defs.h ../../../Windows/../Common/MyWindows.h \ + ../../../Common/MyString.h ../../../Windows/Error.h \ + ../../UI/FileManager/ProgressDialog2.h \ + ../../../Windows/Synchronization.h ../../../Windows/Defs.h \ + ../../../Windows/../../C/Threads.h ../../../Windows/../../C/Types.h \ + ../../../Windows/Synchronization2.h ../../../Windows/Thread.h \ + ../../../Windows/Control/Dialog.h ../../../Windows/Control/ListView.h \ + ../../../Windows/Control/ProgressBar.h ../../UI/FileManager/DialogSize.h \ + ../../UI/FileManager/ProgressDialog2Res.h \ + ../../UI/FileManager/../GUI/ExtractRes.h \ + ../../UI/FileManager/LangUtils.h ../../../Common/Lang.h \ + ../../../Windows/ResourceString.h +ProgressDialog2_rc.o: ../../UI/FileManager/ProgressDialog2_rc.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + /usr/include/wx-2.8/wx/wxprec.h /usr/include/wx-2.8/wx/defs.h \ + /usr/include/wx-2.8/wx/platform.h \ + /usr/lib/wx/include/gtk2-unicode-release-2.8/wx/setup.h \ + /usr/include/wx-2.8/wx/chkconf.h /usr/include/wx-2.8/wx/features.h \ + /usr/include/wx-2.8/wx/version.h /usr/include/wx-2.8/wx/cpp.h \ + /usr/include/wx-2.8/wx/dlimpexp.h /usr/include/wx-2.8/wx/debug.h \ + /usr/include/wx-2.8/wx/wxchar.h /usr/include/wx-2.8/wx/wx.h \ + /usr/include/wx-2.8/wx/object.h /usr/include/wx-2.8/wx/memory.h \ + /usr/include/wx-2.8/wx/string.h /usr/include/wx-2.8/wx/buffer.h \ + /usr/include/wx-2.8/wx/strconv.h /usr/include/wx-2.8/wx/fontenc.h \ + /usr/include/wx-2.8/wx/beforestd.h /usr/include/wx-2.8/wx/afterstd.h \ + /usr/include/wx-2.8/wx/iosfwrap.h /usr/include/wx-2.8/wx/msgout.h \ + /usr/include/wx-2.8/wx/dynarray.h /usr/include/wx-2.8/wx/list.h \ + /usr/include/wx-2.8/wx/hash.h /usr/include/wx-2.8/wx/hashmap.h \ + /usr/include/wx-2.8/wx/arrstr.h /usr/include/wx-2.8/wx/intl.h \ + /usr/include/wx-2.8/wx/log.h /usr/include/wx-2.8/wx/generic/logg.h \ + /usr/include/wx-2.8/wx/event.h /usr/include/wx-2.8/wx/clntdata.h \ + /usr/include/wx-2.8/wx/vector.h /usr/include/wx-2.8/wx/gdicmn.h \ + /usr/include/wx-2.8/wx/math.h /usr/include/wx-2.8/wx/cursor.h \ + /usr/include/wx-2.8/wx/gtk/cursor.h /usr/include/wx-2.8/wx/utils.h \ + /usr/include/wx-2.8/wx/filefn.h /usr/include/wx-2.8/wx/longlong.h \ + /usr/include/wx-2.8/wx/platinfo.h /usr/include/wx-2.8/wx/thread.h \ + /usr/include/wx-2.8/wx/app.h /usr/include/wx-2.8/wx/build.h \ + /usr/include/wx-2.8/wx/init.h /usr/include/wx-2.8/wx/gtk/app.h \ + /usr/include/wx-2.8/wx/stream.h /usr/include/wx-2.8/wx/stopwatch.h \ + /usr/include/wx-2.8/wx/module.h /usr/include/wx-2.8/wx/window.h \ + /usr/include/wx-2.8/wx/font.h /usr/include/wx-2.8/wx/gdiobj.h \ + /usr/include/wx-2.8/wx/gtk/font.h /usr/include/wx-2.8/wx/colour.h \ + /usr/include/wx-2.8/wx/variant.h /usr/include/wx-2.8/wx/datetime.h \ + /usr/include/wx-2.8/wx/gtk/colour.h /usr/include/wx-2.8/wx/region.h \ + /usr/include/wx-2.8/wx/gtk/region.h /usr/include/wx-2.8/wx/validate.h \ + /usr/include/wx-2.8/wx/palette.h \ + /usr/include/wx-2.8/wx/generic/paletteg.h /usr/include/wx-2.8/wx/accel.h \ + /usr/include/wx-2.8/wx/gtk/accel.h \ + /usr/include/wx-2.8/wx/generic/accel.h \ + /usr/include/wx-2.8/wx/gtk/window.h /usr/include/wx-2.8/wx/containr.h \ + /usr/include/wx-2.8/wx/panel.h /usr/include/wx-2.8/wx/generic/panelg.h \ + /usr/include/wx-2.8/wx/toplevel.h /usr/include/wx-2.8/wx/iconbndl.h \ + /usr/include/wx-2.8/wx/gtk/toplevel.h /usr/include/wx-2.8/wx/frame.h \ + /usr/include/wx-2.8/wx/gtk/frame.h /usr/include/wx-2.8/wx/bitmap.h \ + /usr/include/wx-2.8/wx/gtk/bitmap.h /usr/include/wx-2.8/wx/image.h \ + /usr/include/wx-2.8/wx/imagbmp.h /usr/include/wx-2.8/wx/imagpng.h \ + /usr/include/wx-2.8/wx/imaggif.h /usr/include/wx-2.8/wx/imagpcx.h \ + /usr/include/wx-2.8/wx/imagjpeg.h /usr/include/wx-2.8/wx/imagtga.h \ + /usr/include/wx-2.8/wx/imagtiff.h /usr/include/wx-2.8/wx/imagpnm.h \ + /usr/include/wx-2.8/wx/imagxpm.h /usr/include/wx-2.8/wx/imagiff.h \ + /usr/include/wx-2.8/wx/dc.h /usr/include/wx-2.8/wx/brush.h \ + /usr/include/wx-2.8/wx/gtk/brush.h /usr/include/wx-2.8/wx/pen.h \ + /usr/include/wx-2.8/wx/gtk/pen.h /usr/include/wx-2.8/wx/gtk/dc.h \ + /usr/include/wx-2.8/wx/dcgraph.h /usr/include/wx-2.8/wx/geometry.h \ + /usr/include/wx-2.8/wx/graphics.h /usr/include/wx-2.8/wx/dcclient.h \ + /usr/include/wx-2.8/wx/gtk/dcclient.h /usr/include/wx-2.8/wx/dcmemory.h \ + /usr/include/wx-2.8/wx/gtk/dcmemory.h /usr/include/wx-2.8/wx/dcprint.h \ + /usr/include/wx-2.8/wx/dcscreen.h /usr/include/wx-2.8/wx/gtk/dcscreen.h \ + /usr/include/wx-2.8/wx/button.h /usr/include/wx-2.8/wx/control.h \ + /usr/include/wx-2.8/wx/gtk/control.h /usr/include/wx-2.8/wx/gtk/button.h \ + /usr/include/wx-2.8/wx/menuitem.h /usr/include/wx-2.8/wx/gtk/menuitem.h \ + /usr/include/wx-2.8/wx/menu.h /usr/include/wx-2.8/wx/gtk/menu.h \ + /usr/include/wx-2.8/wx/icon.h /usr/include/wx-2.8/wx/iconloc.h \ + /usr/include/wx-2.8/wx/generic/icon.h /usr/include/wx-2.8/wx/dialog.h \ + /usr/include/wx-2.8/wx/gtk/dialog.h /usr/include/wx-2.8/wx/timer.h \ + /usr/include/wx-2.8/wx/gtk/timer.h /usr/include/wx-2.8/wx/settings.h \ + /usr/include/wx-2.8/wx/msgdlg.h /usr/include/wx-2.8/wx/gtk/msgdlg.h \ + /usr/include/wx-2.8/wx/cmndata.h /usr/include/wx-2.8/wx/encinfo.h \ + /usr/include/wx-2.8/wx/dataobj.h /usr/include/wx-2.8/wx/gtk/dataform.h \ + /usr/include/wx-2.8/wx/gtk/dataobj.h \ + /usr/include/wx-2.8/wx/gtk/dataobj2.h /usr/include/wx-2.8/wx/ctrlsub.h \ + /usr/include/wx-2.8/wx/bmpbuttn.h /usr/include/wx-2.8/wx/gtk/bmpbuttn.h \ + /usr/include/wx-2.8/wx/checkbox.h /usr/include/wx-2.8/wx/gtk/checkbox.h \ + /usr/include/wx-2.8/wx/checklst.h /usr/include/wx-2.8/wx/listbox.h \ + /usr/include/wx-2.8/wx/gtk/listbox.h \ + /usr/include/wx-2.8/wx/gtk/checklst.h /usr/include/wx-2.8/wx/choice.h \ + /usr/include/wx-2.8/wx/gtk/choice.h /usr/include/wx-2.8/wx/scrolbar.h \ + /usr/include/wx-2.8/wx/gtk/scrolbar.h /usr/include/wx-2.8/wx/stattext.h \ + /usr/include/wx-2.8/wx/gtk/stattext.h /usr/include/wx-2.8/wx/statbmp.h \ + /usr/include/wx-2.8/wx/gtk/statbmp.h /usr/include/wx-2.8/wx/statbox.h \ + /usr/include/wx-2.8/wx/gtk/statbox.h /usr/include/wx-2.8/wx/radiobox.h \ + /usr/include/wx-2.8/wx/gtk/radiobox.h /usr/include/wx-2.8/wx/radiobut.h \ + /usr/include/wx-2.8/wx/gtk/radiobut.h /usr/include/wx-2.8/wx/textctrl.h \ + /usr/include/wx-2.8/wx/ioswrap.h /usr/include/wx-2.8/wx/gtk/textctrl.h \ + /usr/include/wx-2.8/wx/slider.h /usr/include/wx-2.8/wx/gtk/slider.h \ + /usr/include/wx-2.8/wx/gauge.h /usr/include/wx-2.8/wx/gtk/gauge.h \ + /usr/include/wx-2.8/wx/scrolwin.h /usr/include/wx-2.8/wx/gtk/scrolwin.h \ + /usr/include/wx-2.8/wx/dirdlg.h /usr/include/wx-2.8/wx/gtk/dirdlg.h \ + /usr/include/wx-2.8/wx/generic/dirdlgg.h \ + /usr/include/wx-2.8/wx/toolbar.h /usr/include/wx-2.8/wx/tbarbase.h \ + /usr/include/wx-2.8/wx/gtk/tbargtk.h /usr/include/wx-2.8/wx/combobox.h \ + /usr/include/wx-2.8/wx/gtk/combobox.h /usr/include/wx-2.8/wx/layout.h \ + /usr/include/wx-2.8/wx/sizer.h /usr/include/wx-2.8/wx/mdi.h \ + /usr/include/wx-2.8/wx/gtk/mdi.h /usr/include/wx-2.8/wx/statusbr.h \ + /usr/include/wx-2.8/wx/generic/statusbr.h \ + /usr/include/wx-2.8/wx/choicdlg.h \ + /usr/include/wx-2.8/wx/generic/choicdgg.h \ + /usr/include/wx-2.8/wx/textdlg.h \ + /usr/include/wx-2.8/wx/generic/textdlgg.h \ + /usr/include/wx-2.8/wx/valtext.h /usr/include/wx-2.8/wx/filedlg.h \ + /usr/include/wx-2.8/wx/gtk/filedlg.h \ + /usr/include/wx-2.8/wx/generic/filedlgg.h \ + /usr/include/wx-2.8/wx/listctrl.h /usr/include/wx-2.8/wx/listbase.h \ + /usr/include/wx-2.8/wx/generic/listctrl.h \ + ../../UI/FileManager/ProgressDialog2Res.h \ + ../../../Windows/Control/DialogImpl.h ../../../Windows/Window.h \ + ../../../Windows/Defs.h ../../../Windows/../Common/MyWindows.h \ + ../../../Common/MyString.h ../../../Common/MyVector.h \ + ../../../Common/Defs.h ../../../Windows/Control/Dialog.h +MessagesDialog.o: ../../UI/FileManager/MessagesDialog.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../../Common/IntToString.h ../../../Windows/ResourceString.h \ + ../../../Common/MyString.h ../../../Common/MyVector.h \ + ../../../Common/Defs.h ../../UI/FileManager/MessagesDialog.h \ + ../../../Windows/Control/Dialog.h ../../../Windows/Window.h \ + ../../../Windows/Defs.h ../../../Windows/../Common/MyWindows.h \ + ../../../Windows/Control/ListView.h \ + ../../UI/FileManager/MessagesDialogRes.h \ + ../../UI/FileManager/LangUtils.h ../../../Common/Lang.h \ + ../../../Common/MyString.h +MessagesDialog_rc.o: ../../UI/FileManager/MessagesDialog_rc.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + /usr/include/wx-2.8/wx/wxprec.h /usr/include/wx-2.8/wx/defs.h \ + /usr/include/wx-2.8/wx/platform.h \ + /usr/lib/wx/include/gtk2-unicode-release-2.8/wx/setup.h \ + /usr/include/wx-2.8/wx/chkconf.h /usr/include/wx-2.8/wx/features.h \ + /usr/include/wx-2.8/wx/version.h /usr/include/wx-2.8/wx/cpp.h \ + /usr/include/wx-2.8/wx/dlimpexp.h /usr/include/wx-2.8/wx/debug.h \ + /usr/include/wx-2.8/wx/wxchar.h /usr/include/wx-2.8/wx/wx.h \ + /usr/include/wx-2.8/wx/object.h /usr/include/wx-2.8/wx/memory.h \ + /usr/include/wx-2.8/wx/string.h /usr/include/wx-2.8/wx/buffer.h \ + /usr/include/wx-2.8/wx/strconv.h /usr/include/wx-2.8/wx/fontenc.h \ + /usr/include/wx-2.8/wx/beforestd.h /usr/include/wx-2.8/wx/afterstd.h \ + /usr/include/wx-2.8/wx/iosfwrap.h /usr/include/wx-2.8/wx/msgout.h \ + /usr/include/wx-2.8/wx/dynarray.h /usr/include/wx-2.8/wx/list.h \ + /usr/include/wx-2.8/wx/hash.h /usr/include/wx-2.8/wx/hashmap.h \ + /usr/include/wx-2.8/wx/arrstr.h /usr/include/wx-2.8/wx/intl.h \ + /usr/include/wx-2.8/wx/log.h /usr/include/wx-2.8/wx/generic/logg.h \ + /usr/include/wx-2.8/wx/event.h /usr/include/wx-2.8/wx/clntdata.h \ + /usr/include/wx-2.8/wx/vector.h /usr/include/wx-2.8/wx/gdicmn.h \ + /usr/include/wx-2.8/wx/math.h /usr/include/wx-2.8/wx/cursor.h \ + /usr/include/wx-2.8/wx/gtk/cursor.h /usr/include/wx-2.8/wx/utils.h \ + /usr/include/wx-2.8/wx/filefn.h /usr/include/wx-2.8/wx/longlong.h \ + /usr/include/wx-2.8/wx/platinfo.h /usr/include/wx-2.8/wx/thread.h \ + /usr/include/wx-2.8/wx/app.h /usr/include/wx-2.8/wx/build.h \ + /usr/include/wx-2.8/wx/init.h /usr/include/wx-2.8/wx/gtk/app.h \ + /usr/include/wx-2.8/wx/stream.h /usr/include/wx-2.8/wx/stopwatch.h \ + /usr/include/wx-2.8/wx/module.h /usr/include/wx-2.8/wx/window.h \ + /usr/include/wx-2.8/wx/font.h /usr/include/wx-2.8/wx/gdiobj.h \ + /usr/include/wx-2.8/wx/gtk/font.h /usr/include/wx-2.8/wx/colour.h \ + /usr/include/wx-2.8/wx/variant.h /usr/include/wx-2.8/wx/datetime.h \ + /usr/include/wx-2.8/wx/gtk/colour.h /usr/include/wx-2.8/wx/region.h \ + /usr/include/wx-2.8/wx/gtk/region.h /usr/include/wx-2.8/wx/validate.h \ + /usr/include/wx-2.8/wx/palette.h \ + /usr/include/wx-2.8/wx/generic/paletteg.h /usr/include/wx-2.8/wx/accel.h \ + /usr/include/wx-2.8/wx/gtk/accel.h \ + /usr/include/wx-2.8/wx/generic/accel.h \ + /usr/include/wx-2.8/wx/gtk/window.h /usr/include/wx-2.8/wx/containr.h \ + /usr/include/wx-2.8/wx/panel.h /usr/include/wx-2.8/wx/generic/panelg.h \ + /usr/include/wx-2.8/wx/toplevel.h /usr/include/wx-2.8/wx/iconbndl.h \ + /usr/include/wx-2.8/wx/gtk/toplevel.h /usr/include/wx-2.8/wx/frame.h \ + /usr/include/wx-2.8/wx/gtk/frame.h /usr/include/wx-2.8/wx/bitmap.h \ + /usr/include/wx-2.8/wx/gtk/bitmap.h /usr/include/wx-2.8/wx/image.h \ + /usr/include/wx-2.8/wx/imagbmp.h /usr/include/wx-2.8/wx/imagpng.h \ + /usr/include/wx-2.8/wx/imaggif.h /usr/include/wx-2.8/wx/imagpcx.h \ + /usr/include/wx-2.8/wx/imagjpeg.h /usr/include/wx-2.8/wx/imagtga.h \ + /usr/include/wx-2.8/wx/imagtiff.h /usr/include/wx-2.8/wx/imagpnm.h \ + /usr/include/wx-2.8/wx/imagxpm.h /usr/include/wx-2.8/wx/imagiff.h \ + /usr/include/wx-2.8/wx/dc.h /usr/include/wx-2.8/wx/brush.h \ + /usr/include/wx-2.8/wx/gtk/brush.h /usr/include/wx-2.8/wx/pen.h \ + /usr/include/wx-2.8/wx/gtk/pen.h /usr/include/wx-2.8/wx/gtk/dc.h \ + /usr/include/wx-2.8/wx/dcgraph.h /usr/include/wx-2.8/wx/geometry.h \ + /usr/include/wx-2.8/wx/graphics.h /usr/include/wx-2.8/wx/dcclient.h \ + /usr/include/wx-2.8/wx/gtk/dcclient.h /usr/include/wx-2.8/wx/dcmemory.h \ + /usr/include/wx-2.8/wx/gtk/dcmemory.h /usr/include/wx-2.8/wx/dcprint.h \ + /usr/include/wx-2.8/wx/dcscreen.h /usr/include/wx-2.8/wx/gtk/dcscreen.h \ + /usr/include/wx-2.8/wx/button.h /usr/include/wx-2.8/wx/control.h \ + /usr/include/wx-2.8/wx/gtk/control.h /usr/include/wx-2.8/wx/gtk/button.h \ + /usr/include/wx-2.8/wx/menuitem.h /usr/include/wx-2.8/wx/gtk/menuitem.h \ + /usr/include/wx-2.8/wx/menu.h /usr/include/wx-2.8/wx/gtk/menu.h \ + /usr/include/wx-2.8/wx/icon.h /usr/include/wx-2.8/wx/iconloc.h \ + /usr/include/wx-2.8/wx/generic/icon.h /usr/include/wx-2.8/wx/dialog.h \ + /usr/include/wx-2.8/wx/gtk/dialog.h /usr/include/wx-2.8/wx/timer.h \ + /usr/include/wx-2.8/wx/gtk/timer.h /usr/include/wx-2.8/wx/settings.h \ + /usr/include/wx-2.8/wx/msgdlg.h /usr/include/wx-2.8/wx/gtk/msgdlg.h \ + /usr/include/wx-2.8/wx/cmndata.h /usr/include/wx-2.8/wx/encinfo.h \ + /usr/include/wx-2.8/wx/dataobj.h /usr/include/wx-2.8/wx/gtk/dataform.h \ + /usr/include/wx-2.8/wx/gtk/dataobj.h \ + /usr/include/wx-2.8/wx/gtk/dataobj2.h /usr/include/wx-2.8/wx/ctrlsub.h \ + /usr/include/wx-2.8/wx/bmpbuttn.h /usr/include/wx-2.8/wx/gtk/bmpbuttn.h \ + /usr/include/wx-2.8/wx/checkbox.h /usr/include/wx-2.8/wx/gtk/checkbox.h \ + /usr/include/wx-2.8/wx/checklst.h /usr/include/wx-2.8/wx/listbox.h \ + /usr/include/wx-2.8/wx/gtk/listbox.h \ + /usr/include/wx-2.8/wx/gtk/checklst.h /usr/include/wx-2.8/wx/choice.h \ + /usr/include/wx-2.8/wx/gtk/choice.h /usr/include/wx-2.8/wx/scrolbar.h \ + /usr/include/wx-2.8/wx/gtk/scrolbar.h /usr/include/wx-2.8/wx/stattext.h \ + /usr/include/wx-2.8/wx/gtk/stattext.h /usr/include/wx-2.8/wx/statbmp.h \ + /usr/include/wx-2.8/wx/gtk/statbmp.h /usr/include/wx-2.8/wx/statbox.h \ + /usr/include/wx-2.8/wx/gtk/statbox.h /usr/include/wx-2.8/wx/radiobox.h \ + /usr/include/wx-2.8/wx/gtk/radiobox.h /usr/include/wx-2.8/wx/radiobut.h \ + /usr/include/wx-2.8/wx/gtk/radiobut.h /usr/include/wx-2.8/wx/textctrl.h \ + /usr/include/wx-2.8/wx/ioswrap.h /usr/include/wx-2.8/wx/gtk/textctrl.h \ + /usr/include/wx-2.8/wx/slider.h /usr/include/wx-2.8/wx/gtk/slider.h \ + /usr/include/wx-2.8/wx/gauge.h /usr/include/wx-2.8/wx/gtk/gauge.h \ + /usr/include/wx-2.8/wx/scrolwin.h /usr/include/wx-2.8/wx/gtk/scrolwin.h \ + /usr/include/wx-2.8/wx/dirdlg.h /usr/include/wx-2.8/wx/gtk/dirdlg.h \ + /usr/include/wx-2.8/wx/generic/dirdlgg.h \ + /usr/include/wx-2.8/wx/toolbar.h /usr/include/wx-2.8/wx/tbarbase.h \ + /usr/include/wx-2.8/wx/gtk/tbargtk.h /usr/include/wx-2.8/wx/combobox.h \ + /usr/include/wx-2.8/wx/gtk/combobox.h /usr/include/wx-2.8/wx/layout.h \ + /usr/include/wx-2.8/wx/sizer.h /usr/include/wx-2.8/wx/mdi.h \ + /usr/include/wx-2.8/wx/gtk/mdi.h /usr/include/wx-2.8/wx/statusbr.h \ + /usr/include/wx-2.8/wx/generic/statusbr.h \ + /usr/include/wx-2.8/wx/choicdlg.h \ + /usr/include/wx-2.8/wx/generic/choicdgg.h \ + /usr/include/wx-2.8/wx/textdlg.h \ + /usr/include/wx-2.8/wx/generic/textdlgg.h \ + /usr/include/wx-2.8/wx/valtext.h /usr/include/wx-2.8/wx/filedlg.h \ + /usr/include/wx-2.8/wx/gtk/filedlg.h \ + /usr/include/wx-2.8/wx/generic/filedlgg.h \ + /usr/include/wx-2.8/wx/listctrl.h /usr/include/wx-2.8/wx/listbase.h \ + /usr/include/wx-2.8/wx/generic/listctrl.h \ + ../../../Windows/Control/DialogImpl.h ../../../Windows/Window.h \ + ../../../Windows/Defs.h ../../../Windows/../Common/MyWindows.h \ + ../../../Common/MyString.h ../../../Common/MyVector.h \ + ../../../Common/Defs.h ../../../Windows/Control/Dialog.h \ + ../../UI/FileManager/MessagesDialogRes.h +OverwriteDialog.o: ../../UI/FileManager/OverwriteDialog.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../../Common/StringConvert.h ../../../Common/MyWindows.h \ + ../../../Common/MyString.h ../../../Common/MyVector.h \ + ../../../Common/Defs.h ../../../Windows/FileName.h \ + ../../../Windows/../../C/Types.h ../../../Windows/../Common/MyString.h \ + ../../../Windows/Defs.h ../../../Windows/../Common/MyWindows.h \ + ../../../Windows/ResourceString.h ../../../Common/MyString.h \ + ../../../Windows/Control/Static.h ../../../Windows/Window.h \ + ../../../Windows/PropVariantConversions.h \ + ../../UI/FileManager/FormatUtils.h \ + ../../UI/FileManager/OverwriteDialog.h ../../../Windows/Control/Dialog.h \ + ../../UI/FileManager/DialogSize.h \ + ../../UI/FileManager/OverwriteDialogRes.h \ + ../../UI/FileManager/LangUtils.h ../../../Common/Lang.h +OverwriteDialog_rc.o: ../../UI/FileManager/OverwriteDialog_rc.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + /usr/include/wx-2.8/wx/wxprec.h /usr/include/wx-2.8/wx/defs.h \ + /usr/include/wx-2.8/wx/platform.h \ + /usr/lib/wx/include/gtk2-unicode-release-2.8/wx/setup.h \ + /usr/include/wx-2.8/wx/chkconf.h /usr/include/wx-2.8/wx/features.h \ + /usr/include/wx-2.8/wx/version.h /usr/include/wx-2.8/wx/cpp.h \ + /usr/include/wx-2.8/wx/dlimpexp.h /usr/include/wx-2.8/wx/debug.h \ + /usr/include/wx-2.8/wx/wxchar.h /usr/include/wx-2.8/wx/wx.h \ + /usr/include/wx-2.8/wx/object.h /usr/include/wx-2.8/wx/memory.h \ + /usr/include/wx-2.8/wx/string.h /usr/include/wx-2.8/wx/buffer.h \ + /usr/include/wx-2.8/wx/strconv.h /usr/include/wx-2.8/wx/fontenc.h \ + /usr/include/wx-2.8/wx/beforestd.h /usr/include/wx-2.8/wx/afterstd.h \ + /usr/include/wx-2.8/wx/iosfwrap.h /usr/include/wx-2.8/wx/msgout.h \ + /usr/include/wx-2.8/wx/dynarray.h /usr/include/wx-2.8/wx/list.h \ + /usr/include/wx-2.8/wx/hash.h /usr/include/wx-2.8/wx/hashmap.h \ + /usr/include/wx-2.8/wx/arrstr.h /usr/include/wx-2.8/wx/intl.h \ + /usr/include/wx-2.8/wx/log.h /usr/include/wx-2.8/wx/generic/logg.h \ + /usr/include/wx-2.8/wx/event.h /usr/include/wx-2.8/wx/clntdata.h \ + /usr/include/wx-2.8/wx/vector.h /usr/include/wx-2.8/wx/gdicmn.h \ + /usr/include/wx-2.8/wx/math.h /usr/include/wx-2.8/wx/cursor.h \ + /usr/include/wx-2.8/wx/gtk/cursor.h /usr/include/wx-2.8/wx/utils.h \ + /usr/include/wx-2.8/wx/filefn.h /usr/include/wx-2.8/wx/longlong.h \ + /usr/include/wx-2.8/wx/platinfo.h /usr/include/wx-2.8/wx/thread.h \ + /usr/include/wx-2.8/wx/app.h /usr/include/wx-2.8/wx/build.h \ + /usr/include/wx-2.8/wx/init.h /usr/include/wx-2.8/wx/gtk/app.h \ + /usr/include/wx-2.8/wx/stream.h /usr/include/wx-2.8/wx/stopwatch.h \ + /usr/include/wx-2.8/wx/module.h /usr/include/wx-2.8/wx/window.h \ + /usr/include/wx-2.8/wx/font.h /usr/include/wx-2.8/wx/gdiobj.h \ + /usr/include/wx-2.8/wx/gtk/font.h /usr/include/wx-2.8/wx/colour.h \ + /usr/include/wx-2.8/wx/variant.h /usr/include/wx-2.8/wx/datetime.h \ + /usr/include/wx-2.8/wx/gtk/colour.h /usr/include/wx-2.8/wx/region.h \ + /usr/include/wx-2.8/wx/gtk/region.h /usr/include/wx-2.8/wx/validate.h \ + /usr/include/wx-2.8/wx/palette.h \ + /usr/include/wx-2.8/wx/generic/paletteg.h /usr/include/wx-2.8/wx/accel.h \ + /usr/include/wx-2.8/wx/gtk/accel.h \ + /usr/include/wx-2.8/wx/generic/accel.h \ + /usr/include/wx-2.8/wx/gtk/window.h /usr/include/wx-2.8/wx/containr.h \ + /usr/include/wx-2.8/wx/panel.h /usr/include/wx-2.8/wx/generic/panelg.h \ + /usr/include/wx-2.8/wx/toplevel.h /usr/include/wx-2.8/wx/iconbndl.h \ + /usr/include/wx-2.8/wx/gtk/toplevel.h /usr/include/wx-2.8/wx/frame.h \ + /usr/include/wx-2.8/wx/gtk/frame.h /usr/include/wx-2.8/wx/bitmap.h \ + /usr/include/wx-2.8/wx/gtk/bitmap.h /usr/include/wx-2.8/wx/image.h \ + /usr/include/wx-2.8/wx/imagbmp.h /usr/include/wx-2.8/wx/imagpng.h \ + /usr/include/wx-2.8/wx/imaggif.h /usr/include/wx-2.8/wx/imagpcx.h \ + /usr/include/wx-2.8/wx/imagjpeg.h /usr/include/wx-2.8/wx/imagtga.h \ + /usr/include/wx-2.8/wx/imagtiff.h /usr/include/wx-2.8/wx/imagpnm.h \ + /usr/include/wx-2.8/wx/imagxpm.h /usr/include/wx-2.8/wx/imagiff.h \ + /usr/include/wx-2.8/wx/dc.h /usr/include/wx-2.8/wx/brush.h \ + /usr/include/wx-2.8/wx/gtk/brush.h /usr/include/wx-2.8/wx/pen.h \ + /usr/include/wx-2.8/wx/gtk/pen.h /usr/include/wx-2.8/wx/gtk/dc.h \ + /usr/include/wx-2.8/wx/dcgraph.h /usr/include/wx-2.8/wx/geometry.h \ + /usr/include/wx-2.8/wx/graphics.h /usr/include/wx-2.8/wx/dcclient.h \ + /usr/include/wx-2.8/wx/gtk/dcclient.h /usr/include/wx-2.8/wx/dcmemory.h \ + /usr/include/wx-2.8/wx/gtk/dcmemory.h /usr/include/wx-2.8/wx/dcprint.h \ + /usr/include/wx-2.8/wx/dcscreen.h /usr/include/wx-2.8/wx/gtk/dcscreen.h \ + /usr/include/wx-2.8/wx/button.h /usr/include/wx-2.8/wx/control.h \ + /usr/include/wx-2.8/wx/gtk/control.h /usr/include/wx-2.8/wx/gtk/button.h \ + /usr/include/wx-2.8/wx/menuitem.h /usr/include/wx-2.8/wx/gtk/menuitem.h \ + /usr/include/wx-2.8/wx/menu.h /usr/include/wx-2.8/wx/gtk/menu.h \ + /usr/include/wx-2.8/wx/icon.h /usr/include/wx-2.8/wx/iconloc.h \ + /usr/include/wx-2.8/wx/generic/icon.h /usr/include/wx-2.8/wx/dialog.h \ + /usr/include/wx-2.8/wx/gtk/dialog.h /usr/include/wx-2.8/wx/timer.h \ + /usr/include/wx-2.8/wx/gtk/timer.h /usr/include/wx-2.8/wx/settings.h \ + /usr/include/wx-2.8/wx/msgdlg.h /usr/include/wx-2.8/wx/gtk/msgdlg.h \ + /usr/include/wx-2.8/wx/cmndata.h /usr/include/wx-2.8/wx/encinfo.h \ + /usr/include/wx-2.8/wx/dataobj.h /usr/include/wx-2.8/wx/gtk/dataform.h \ + /usr/include/wx-2.8/wx/gtk/dataobj.h \ + /usr/include/wx-2.8/wx/gtk/dataobj2.h /usr/include/wx-2.8/wx/ctrlsub.h \ + /usr/include/wx-2.8/wx/bmpbuttn.h /usr/include/wx-2.8/wx/gtk/bmpbuttn.h \ + /usr/include/wx-2.8/wx/checkbox.h /usr/include/wx-2.8/wx/gtk/checkbox.h \ + /usr/include/wx-2.8/wx/checklst.h /usr/include/wx-2.8/wx/listbox.h \ + /usr/include/wx-2.8/wx/gtk/listbox.h \ + /usr/include/wx-2.8/wx/gtk/checklst.h /usr/include/wx-2.8/wx/choice.h \ + /usr/include/wx-2.8/wx/gtk/choice.h /usr/include/wx-2.8/wx/scrolbar.h \ + /usr/include/wx-2.8/wx/gtk/scrolbar.h /usr/include/wx-2.8/wx/stattext.h \ + /usr/include/wx-2.8/wx/gtk/stattext.h /usr/include/wx-2.8/wx/statbmp.h \ + /usr/include/wx-2.8/wx/gtk/statbmp.h /usr/include/wx-2.8/wx/statbox.h \ + /usr/include/wx-2.8/wx/gtk/statbox.h /usr/include/wx-2.8/wx/radiobox.h \ + /usr/include/wx-2.8/wx/gtk/radiobox.h /usr/include/wx-2.8/wx/radiobut.h \ + /usr/include/wx-2.8/wx/gtk/radiobut.h /usr/include/wx-2.8/wx/textctrl.h \ + /usr/include/wx-2.8/wx/ioswrap.h /usr/include/wx-2.8/wx/gtk/textctrl.h \ + /usr/include/wx-2.8/wx/slider.h /usr/include/wx-2.8/wx/gtk/slider.h \ + /usr/include/wx-2.8/wx/gauge.h /usr/include/wx-2.8/wx/gtk/gauge.h \ + /usr/include/wx-2.8/wx/scrolwin.h /usr/include/wx-2.8/wx/gtk/scrolwin.h \ + /usr/include/wx-2.8/wx/dirdlg.h /usr/include/wx-2.8/wx/gtk/dirdlg.h \ + /usr/include/wx-2.8/wx/generic/dirdlgg.h \ + /usr/include/wx-2.8/wx/toolbar.h /usr/include/wx-2.8/wx/tbarbase.h \ + /usr/include/wx-2.8/wx/gtk/tbargtk.h /usr/include/wx-2.8/wx/combobox.h \ + /usr/include/wx-2.8/wx/gtk/combobox.h /usr/include/wx-2.8/wx/layout.h \ + /usr/include/wx-2.8/wx/sizer.h /usr/include/wx-2.8/wx/mdi.h \ + /usr/include/wx-2.8/wx/gtk/mdi.h /usr/include/wx-2.8/wx/statusbr.h \ + /usr/include/wx-2.8/wx/generic/statusbr.h \ + /usr/include/wx-2.8/wx/choicdlg.h \ + /usr/include/wx-2.8/wx/generic/choicdgg.h \ + /usr/include/wx-2.8/wx/textdlg.h \ + /usr/include/wx-2.8/wx/generic/textdlgg.h \ + /usr/include/wx-2.8/wx/valtext.h /usr/include/wx-2.8/wx/filedlg.h \ + /usr/include/wx-2.8/wx/gtk/filedlg.h \ + /usr/include/wx-2.8/wx/generic/filedlgg.h \ + /usr/include/wx-2.8/wx/listctrl.h /usr/include/wx-2.8/wx/listbase.h \ + /usr/include/wx-2.8/wx/generic/listctrl.h \ + ../../UI/FileManager/OverwriteDialogRes.h \ + ../../../Windows/Control/DialogImpl.h ../../../Windows/Window.h \ + ../../../Windows/Defs.h ../../../Windows/../Common/MyWindows.h \ + ../../../Common/MyString.h ../../../Common/MyVector.h \ + ../../../Common/Defs.h ../../../Windows/Control/Dialog.h +PasswordDialog.o: ../../UI/FileManager/PasswordDialog.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../UI/FileManager/PasswordDialog.h ../../../Windows/Control/Dialog.h \ + ../../../Windows/Window.h ../../../Windows/Defs.h \ + ../../../Windows/../Common/MyWindows.h ../../../Common/MyString.h \ + ../../../Common/MyVector.h ../../../Common/Defs.h \ + ../../../Windows/Control/Edit.h ../../UI/FileManager/PasswordDialogRes.h \ + ../../UI/FileManager/LangUtils.h ../../../Common/Lang.h \ + ../../../Common/MyString.h ../../../Windows/ResourceString.h +PasswordDialog_rc.o: ../../UI/FileManager/PasswordDialog_rc.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + /usr/include/wx-2.8/wx/wxprec.h /usr/include/wx-2.8/wx/defs.h \ + /usr/include/wx-2.8/wx/platform.h \ + /usr/lib/wx/include/gtk2-unicode-release-2.8/wx/setup.h \ + /usr/include/wx-2.8/wx/chkconf.h /usr/include/wx-2.8/wx/features.h \ + /usr/include/wx-2.8/wx/version.h /usr/include/wx-2.8/wx/cpp.h \ + /usr/include/wx-2.8/wx/dlimpexp.h /usr/include/wx-2.8/wx/debug.h \ + /usr/include/wx-2.8/wx/wxchar.h /usr/include/wx-2.8/wx/wx.h \ + /usr/include/wx-2.8/wx/object.h /usr/include/wx-2.8/wx/memory.h \ + /usr/include/wx-2.8/wx/string.h /usr/include/wx-2.8/wx/buffer.h \ + /usr/include/wx-2.8/wx/strconv.h /usr/include/wx-2.8/wx/fontenc.h \ + /usr/include/wx-2.8/wx/beforestd.h /usr/include/wx-2.8/wx/afterstd.h \ + /usr/include/wx-2.8/wx/iosfwrap.h /usr/include/wx-2.8/wx/msgout.h \ + /usr/include/wx-2.8/wx/dynarray.h /usr/include/wx-2.8/wx/list.h \ + /usr/include/wx-2.8/wx/hash.h /usr/include/wx-2.8/wx/hashmap.h \ + /usr/include/wx-2.8/wx/arrstr.h /usr/include/wx-2.8/wx/intl.h \ + /usr/include/wx-2.8/wx/log.h /usr/include/wx-2.8/wx/generic/logg.h \ + /usr/include/wx-2.8/wx/event.h /usr/include/wx-2.8/wx/clntdata.h \ + /usr/include/wx-2.8/wx/vector.h /usr/include/wx-2.8/wx/gdicmn.h \ + /usr/include/wx-2.8/wx/math.h /usr/include/wx-2.8/wx/cursor.h \ + /usr/include/wx-2.8/wx/gtk/cursor.h /usr/include/wx-2.8/wx/utils.h \ + /usr/include/wx-2.8/wx/filefn.h /usr/include/wx-2.8/wx/longlong.h \ + /usr/include/wx-2.8/wx/platinfo.h /usr/include/wx-2.8/wx/thread.h \ + /usr/include/wx-2.8/wx/app.h /usr/include/wx-2.8/wx/build.h \ + /usr/include/wx-2.8/wx/init.h /usr/include/wx-2.8/wx/gtk/app.h \ + /usr/include/wx-2.8/wx/stream.h /usr/include/wx-2.8/wx/stopwatch.h \ + /usr/include/wx-2.8/wx/module.h /usr/include/wx-2.8/wx/window.h \ + /usr/include/wx-2.8/wx/font.h /usr/include/wx-2.8/wx/gdiobj.h \ + /usr/include/wx-2.8/wx/gtk/font.h /usr/include/wx-2.8/wx/colour.h \ + /usr/include/wx-2.8/wx/variant.h /usr/include/wx-2.8/wx/datetime.h \ + /usr/include/wx-2.8/wx/gtk/colour.h /usr/include/wx-2.8/wx/region.h \ + /usr/include/wx-2.8/wx/gtk/region.h /usr/include/wx-2.8/wx/validate.h \ + /usr/include/wx-2.8/wx/palette.h \ + /usr/include/wx-2.8/wx/generic/paletteg.h /usr/include/wx-2.8/wx/accel.h \ + /usr/include/wx-2.8/wx/gtk/accel.h \ + /usr/include/wx-2.8/wx/generic/accel.h \ + /usr/include/wx-2.8/wx/gtk/window.h /usr/include/wx-2.8/wx/containr.h \ + /usr/include/wx-2.8/wx/panel.h /usr/include/wx-2.8/wx/generic/panelg.h \ + /usr/include/wx-2.8/wx/toplevel.h /usr/include/wx-2.8/wx/iconbndl.h \ + /usr/include/wx-2.8/wx/gtk/toplevel.h /usr/include/wx-2.8/wx/frame.h \ + /usr/include/wx-2.8/wx/gtk/frame.h /usr/include/wx-2.8/wx/bitmap.h \ + /usr/include/wx-2.8/wx/gtk/bitmap.h /usr/include/wx-2.8/wx/image.h \ + /usr/include/wx-2.8/wx/imagbmp.h /usr/include/wx-2.8/wx/imagpng.h \ + /usr/include/wx-2.8/wx/imaggif.h /usr/include/wx-2.8/wx/imagpcx.h \ + /usr/include/wx-2.8/wx/imagjpeg.h /usr/include/wx-2.8/wx/imagtga.h \ + /usr/include/wx-2.8/wx/imagtiff.h /usr/include/wx-2.8/wx/imagpnm.h \ + /usr/include/wx-2.8/wx/imagxpm.h /usr/include/wx-2.8/wx/imagiff.h \ + /usr/include/wx-2.8/wx/dc.h /usr/include/wx-2.8/wx/brush.h \ + /usr/include/wx-2.8/wx/gtk/brush.h /usr/include/wx-2.8/wx/pen.h \ + /usr/include/wx-2.8/wx/gtk/pen.h /usr/include/wx-2.8/wx/gtk/dc.h \ + /usr/include/wx-2.8/wx/dcgraph.h /usr/include/wx-2.8/wx/geometry.h \ + /usr/include/wx-2.8/wx/graphics.h /usr/include/wx-2.8/wx/dcclient.h \ + /usr/include/wx-2.8/wx/gtk/dcclient.h /usr/include/wx-2.8/wx/dcmemory.h \ + /usr/include/wx-2.8/wx/gtk/dcmemory.h /usr/include/wx-2.8/wx/dcprint.h \ + /usr/include/wx-2.8/wx/dcscreen.h /usr/include/wx-2.8/wx/gtk/dcscreen.h \ + /usr/include/wx-2.8/wx/button.h /usr/include/wx-2.8/wx/control.h \ + /usr/include/wx-2.8/wx/gtk/control.h /usr/include/wx-2.8/wx/gtk/button.h \ + /usr/include/wx-2.8/wx/menuitem.h /usr/include/wx-2.8/wx/gtk/menuitem.h \ + /usr/include/wx-2.8/wx/menu.h /usr/include/wx-2.8/wx/gtk/menu.h \ + /usr/include/wx-2.8/wx/icon.h /usr/include/wx-2.8/wx/iconloc.h \ + /usr/include/wx-2.8/wx/generic/icon.h /usr/include/wx-2.8/wx/dialog.h \ + /usr/include/wx-2.8/wx/gtk/dialog.h /usr/include/wx-2.8/wx/timer.h \ + /usr/include/wx-2.8/wx/gtk/timer.h /usr/include/wx-2.8/wx/settings.h \ + /usr/include/wx-2.8/wx/msgdlg.h /usr/include/wx-2.8/wx/gtk/msgdlg.h \ + /usr/include/wx-2.8/wx/cmndata.h /usr/include/wx-2.8/wx/encinfo.h \ + /usr/include/wx-2.8/wx/dataobj.h /usr/include/wx-2.8/wx/gtk/dataform.h \ + /usr/include/wx-2.8/wx/gtk/dataobj.h \ + /usr/include/wx-2.8/wx/gtk/dataobj2.h /usr/include/wx-2.8/wx/ctrlsub.h \ + /usr/include/wx-2.8/wx/bmpbuttn.h /usr/include/wx-2.8/wx/gtk/bmpbuttn.h \ + /usr/include/wx-2.8/wx/checkbox.h /usr/include/wx-2.8/wx/gtk/checkbox.h \ + /usr/include/wx-2.8/wx/checklst.h /usr/include/wx-2.8/wx/listbox.h \ + /usr/include/wx-2.8/wx/gtk/listbox.h \ + /usr/include/wx-2.8/wx/gtk/checklst.h /usr/include/wx-2.8/wx/choice.h \ + /usr/include/wx-2.8/wx/gtk/choice.h /usr/include/wx-2.8/wx/scrolbar.h \ + /usr/include/wx-2.8/wx/gtk/scrolbar.h /usr/include/wx-2.8/wx/stattext.h \ + /usr/include/wx-2.8/wx/gtk/stattext.h /usr/include/wx-2.8/wx/statbmp.h \ + /usr/include/wx-2.8/wx/gtk/statbmp.h /usr/include/wx-2.8/wx/statbox.h \ + /usr/include/wx-2.8/wx/gtk/statbox.h /usr/include/wx-2.8/wx/radiobox.h \ + /usr/include/wx-2.8/wx/gtk/radiobox.h /usr/include/wx-2.8/wx/radiobut.h \ + /usr/include/wx-2.8/wx/gtk/radiobut.h /usr/include/wx-2.8/wx/textctrl.h \ + /usr/include/wx-2.8/wx/ioswrap.h /usr/include/wx-2.8/wx/gtk/textctrl.h \ + /usr/include/wx-2.8/wx/slider.h /usr/include/wx-2.8/wx/gtk/slider.h \ + /usr/include/wx-2.8/wx/gauge.h /usr/include/wx-2.8/wx/gtk/gauge.h \ + /usr/include/wx-2.8/wx/scrolwin.h /usr/include/wx-2.8/wx/gtk/scrolwin.h \ + /usr/include/wx-2.8/wx/dirdlg.h /usr/include/wx-2.8/wx/gtk/dirdlg.h \ + /usr/include/wx-2.8/wx/generic/dirdlgg.h \ + /usr/include/wx-2.8/wx/toolbar.h /usr/include/wx-2.8/wx/tbarbase.h \ + /usr/include/wx-2.8/wx/gtk/tbargtk.h /usr/include/wx-2.8/wx/combobox.h \ + /usr/include/wx-2.8/wx/gtk/combobox.h /usr/include/wx-2.8/wx/layout.h \ + /usr/include/wx-2.8/wx/sizer.h /usr/include/wx-2.8/wx/mdi.h \ + /usr/include/wx-2.8/wx/gtk/mdi.h /usr/include/wx-2.8/wx/statusbr.h \ + /usr/include/wx-2.8/wx/generic/statusbr.h \ + /usr/include/wx-2.8/wx/choicdlg.h \ + /usr/include/wx-2.8/wx/generic/choicdgg.h \ + /usr/include/wx-2.8/wx/textdlg.h \ + /usr/include/wx-2.8/wx/generic/textdlgg.h \ + /usr/include/wx-2.8/wx/valtext.h /usr/include/wx-2.8/wx/filedlg.h \ + /usr/include/wx-2.8/wx/gtk/filedlg.h \ + /usr/include/wx-2.8/wx/generic/filedlgg.h \ + /usr/include/wx-2.8/wx/listctrl.h /usr/include/wx-2.8/wx/listbase.h \ + /usr/include/wx-2.8/wx/generic/listctrl.h \ + ../../../Windows/Control/DialogImpl.h ../../../Windows/Window.h \ + ../../../Windows/Defs.h ../../../Windows/../Common/MyWindows.h \ + ../../../Common/MyString.h ../../../Common/MyVector.h \ + ../../../Common/Defs.h ../../../Windows/Control/Dialog.h \ + ../../UI/FileManager/PasswordDialogRes.h +ExtractCallback.o: ../../UI/FileManager/ExtractCallback.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../../Windows/Error.h ../../../Common/MyString.h \ + ../../../Common/MyVector.h ../../../Common/Defs.h \ + ../../../Windows/FileDir.h ../../../Windows/../Common/MyString.h \ + ../../../Windows/Defs.h ../../../Windows/../Common/MyWindows.h \ + ../../../Windows/FileFind.h ../../../Windows/FileName.h \ + ../../../Windows/../../C/Types.h \ + ../../UI/FileManager/../../Common/FilePathAutoRename.h \ + ../../UI/FileManager/../GUI/ExtractRes.h \ + ../../UI/FileManager/ExtractCallback.h ../../../Common/MyCom.h \ + ../../../Common/MyWindows.h ../../../Windows/ResourceString.h \ + ../../UI/FileManager/../Agent/IFolderArchive.h \ + ../../UI/FileManager/../Agent/../../IDecl.h \ + ../../UI/FileManager/../Agent/../../../Common/MyUnknown.h \ + ../../UI/FileManager/../Agent/../../../Common/MyWindows.h \ + ../../UI/FileManager/../Agent/../../Archive/IArchive.h \ + ../../UI/FileManager/../Agent/../../Archive/../IProgress.h \ + ../../UI/FileManager/../Agent/../../Archive/../../Common/MyUnknown.h \ + ../../UI/FileManager/../Agent/../../Archive/../../Common/Types.h \ + ../../UI/FileManager/../Agent/../../Archive/../IDecl.h \ + ../../UI/FileManager/../Agent/../../Archive/../IStream.h \ + ../../UI/FileManager/../Agent/../../Archive/../PropID.h \ + ../../UI/FileManager/../Agent/../../UI/Common/LoadCodecs.h \ + ../../UI/FileManager/../Agent/../../UI/Common/../../../Common/Types.h \ + ../../UI/FileManager/../Agent/../../UI/Common/../../../Common/MyCom.h \ + ../../UI/FileManager/../Agent/../../UI/Common/../../../Common/MyString.h \ + ../../UI/FileManager/../Agent/../../UI/Common/../../../Common/Buffer.h \ + ../../UI/FileManager/../Agent/../../UI/Common/../../../Common/Defs.h \ + ../../UI/FileManager/../Agent/../../UI/Common/../../ICoder.h \ + ../../UI/FileManager/../Agent/../../UI/Common/../../IStream.h \ + ../../UI/FileManager/../Agent/../../UI/Common/../../../Windows/DLL.h \ + ../../UI/FileManager/../Agent/../../UI/Common/../../../Windows/../Common/MyString.h \ + ../../UI/FileManager/../Agent/../../UI/Common/../../Archive/IArchive.h \ + ../../UI/FileManager/../Agent/../../UI/FileManager/IFolder.h \ + ../../UI/FileManager/../Agent/../../UI/FileManager/../../IProgress.h \ + ../../UI/FileManager/../Agent/../../UI/FileManager/../../IStream.h \ + ../../UI/FileManager/../Agent/../Common/ExtractMode.h \ + ../../UI/FileManager/../Agent/../Common/IFileExtractCallback.h \ + ../../UI/FileManager/../Agent/../Common/../../IDecl.h \ + ../../UI/FileManager/../Common/ArchiveOpenCallback.h \ + ../../UI/FileManager/../Common/../../IPassword.h \ + ../../UI/FileManager/../Common/../../../Common/MyUnknown.h \ + ../../UI/FileManager/../Common/../../../Common/Types.h \ + ../../UI/FileManager/../Common/../../IDecl.h \ + ../../UI/FileManager/../Common/../../Archive/IArchive.h \ + ../../UI/FileManager/../../IPassword.h ../../UI/FileManager/IFolder.h \ + ../../UI/FileManager/ProgressDialog2.h \ + ../../../Windows/Synchronization.h ../../../Windows/../../C/Threads.h \ + ../../../Windows/../../C/Types.h ../../../Windows/Synchronization2.h \ + ../../../Windows/Thread.h ../../../Windows/Control/Dialog.h \ + ../../../Windows/Window.h ../../../Windows/Defs.h \ + ../../../Windows/Control/ListView.h \ + ../../../Windows/Control/ProgressBar.h ../../UI/FileManager/LangUtils.h \ + ../../../Common/Lang.h ../../../Common/MyString.h \ + ../../UI/FileManager/FormatUtils.h \ + ../../UI/FileManager/OverwriteDialog.h ../../UI/FileManager/DialogSize.h \ + ../../UI/FileManager/OverwriteDialogRes.h \ + ../../UI/FileManager/PasswordDialog.h ../../../Windows/Control/Edit.h \ + ../../UI/FileManager/PasswordDialogRes.h +SplitUtils.o: ../../UI/FileManager/SplitUtils.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../../Common/StringToInt.h ../../UI/FileManager/SplitUtils.h \ + ../../../Common/MyString.h ../../../Common/MyVector.h \ + ../../../Common/Defs.h ../../../Windows/Control/ComboBox.h \ + ../../../Windows/Window.h ../../../Windows/Defs.h \ + ../../../Windows/../Common/MyWindows.h \ + ../../../Windows/Control/Window2.h ../../UI/FileManager/StringUtils.h +StringUtils.o: ../../UI/FileManager/StringUtils.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../UI/FileManager/StringUtils.h ../../../Common/MyString.h \ + ../../../Common/MyVector.h ../../../Common/Defs.h +LangUtils.o: ../../UI/FileManager/LangUtils.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../UI/FileManager/LangUtils.h ../../../Common/Lang.h \ + ../../../Common/MyVector.h ../../../Common/Defs.h \ + ../../../Common/MyString.h ../../../Windows/ResourceString.h \ + ../../../Common/MyString.h ../../../Common/StringConvert.h \ + ../../../Common/MyWindows.h ../../../Common/StringToInt.h \ + ../../../Windows/Synchronization.h ../../../Windows/Defs.h \ + ../../../Windows/../Common/MyWindows.h \ + ../../../Windows/../../C/Threads.h ../../../Windows/../../C/Types.h \ + ../../../Windows/Synchronization2.h ../../../Windows/Window.h \ + ../../../Windows/Defs.h ../../../Windows/FileFind.h \ + ../../../Windows/../Common/MyString.h ../../../Windows/FileName.h \ + ../../../Windows/../../C/Types.h ../../UI/FileManager/RegistryUtils.h \ + ../../UI/FileManager/ProgramLocation.h +OutStreamWithCRC.o: ../../Archive/Common/OutStreamWithCRC.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../Archive/Common/OutStreamWithCRC.h \ + ../../Archive/Common/../../../../C/7zCrc.h \ + ../../Archive/Common/../../../../C/Types.h \ + ../../Archive/Common/../../../Common/MyCom.h \ + ../../Archive/Common/../../../Common/MyWindows.h \ + ../../Archive/Common/../../IStream.h \ + ../../Archive/Common/../../../Common/MyUnknown.h \ + ../../Archive/Common/../../../Common/Types.h \ + ../../Archive/Common/../../IDecl.h +CreateCoder.o: ../../Common/CreateCoder.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../Common/../../Windows/Defs.h \ + ../../Common/../../Windows/../Common/MyWindows.h \ + ../../Common/../../Windows/PropVariant.h \ + ../../Common/../../Windows/../Common/Types.h ../../Common/CreateCoder.h \ + ../../Common/../../Common/MyCom.h ../../Common/../../Common/MyWindows.h \ + ../../Common/../../Common/MyString.h \ + ../../Common/../../Common/MyVector.h ../../Common/../../Common/Defs.h \ + ../../Common/../ICoder.h ../../Common/../IStream.h \ + ../../Common/../../Common/MyUnknown.h ../../Common/../../Common/Types.h \ + ../../Common/../IDecl.h ../../Common/MethodId.h \ + ../../Common/../../Common/Types.h ../../Common/FilterCoder.h \ + ../../Common/../IPassword.h ../../Common/RegisterCodec.h \ + ../../Common/../Common/MethodId.h +FilePathAutoRename.o: ../../Common/FilePathAutoRename.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../../Common/Defs.h ../../../Common/IntToString.h \ + ../../../Windows/FileFind.h ../../../Windows/../Common/MyString.h \ + ../../../Windows/../Common/MyVector.h ../../../Windows/../Common/Defs.h \ + ../../../Windows/FileName.h ../../../Windows/../../C/Types.h \ + ../../../Windows/Defs.h ../../../Windows/../Common/MyWindows.h \ + ../../Common/FilePathAutoRename.h ../../../Common/MyString.h +FileStreams.o: ../../Common/FileStreams.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../Common/FileStreams.h \ + ../../Common/../../Windows/FileIO.h ../../../Common/MyString.h \ + ../../../Common/MyVector.h ../../../Common/Defs.h \ + ../../Common/../../Common/MyCom.h ../../Common/../../Common/MyWindows.h \ + ../../Common/../IStream.h ../../Common/../../Common/MyUnknown.h \ + ../../Common/../../Common/Types.h ../../Common/../IDecl.h +FilterCoder.o: ../../Common/FilterCoder.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../Common/../../../C/Alloc.h \ + ../../Common/../../Common/Defs.h ../../Common/FilterCoder.h \ + ../../Common/../../Common/MyCom.h ../../Common/../../Common/MyWindows.h \ + ../../Common/../ICoder.h ../../Common/../IStream.h \ + ../../Common/../../Common/MyUnknown.h ../../Common/../../Common/Types.h \ + ../../Common/../IDecl.h ../../Common/../IPassword.h \ + ../../Common/StreamUtils.h ../../Common/../IStream.h +ProgressUtils.o: ../../Common/ProgressUtils.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../Common/ProgressUtils.h ../../Common/../../Common/MyCom.h \ + ../../Common/../../Common/MyWindows.h ../../Common/../ICoder.h \ + ../../Common/../IStream.h ../../Common/../../Common/MyUnknown.h \ + ../../Common/../../Common/Types.h ../../Common/../IDecl.h \ + ../../Common/../IProgress.h +StreamUtils.o: ../../Common/StreamUtils.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../Common/StreamUtils.h \ + ../../Common/../IStream.h ../../Common/../../Common/MyUnknown.h \ + ../../Common/../../Common/MyWindows.h ../../Common/../../Common/Types.h \ + ../../Common/../IDecl.h +CopyCoder.o: ../../Compress/CopyCoder.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../Compress/../../../C/Alloc.h \ + ../../Compress/../Common/StreamUtils.h \ + ../../Compress/../Common/../IStream.h \ + ../../Compress/../Common/../../Common/MyUnknown.h \ + ../../Compress/../Common/../../Common/MyWindows.h \ + ../../Compress/../Common/../../Common/Types.h \ + ../../Compress/../Common/../IDecl.h ../../Compress/CopyCoder.h \ + ../../Compress/../../Common/MyCom.h \ + ../../Compress/../../Common/MyWindows.h ../../Compress/../ICoder.h \ + ../../Compress/../IStream.h +CommandLineParser.o: ../../../Common/CommandLineParser.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../../Common/CommandLineParser.h ../../../Common/MyString.h \ + ../../../Common/MyVector.h ../../../Common/Defs.h +CRC.o: ../../../Common/CRC.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../../Common/../../C/7zCrc.h \ + ../../../Common/../../C/Types.h +IntToString.o: ../../../Common/IntToString.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../../Common/IntToString.h +Lang.o: ../../../Common/Lang.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../../Common/Lang.h \ + ../../../Common/MyVector.h ../../../Common/Defs.h \ + ../../../Common/MyString.h ../../../Common/TextConfig.h \ + ../../../Common/../Windows/FileIO.h ../../../Common/MyString.h \ + ../../../Common/UTFConvert.h +ListFileUtils.o: ../../../Common/ListFileUtils.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../../Common/MyWindows.h ../../../Common/../Windows/FileIO.h \ + ../../../Common/MyString.h ../../../Common/MyVector.h \ + ../../../Common/Defs.h ../../../Common/ListFileUtils.h \ + ../../../Common/MyString.h ../../../Common/StringConvert.h \ + ../../../Common/UTFConvert.h +MyString.o: ../../../Common/MyString.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../../Common/StringConvert.h \ + ../../../Common/MyWindows.h ../../../Common/MyString.h \ + ../../../Common/MyVector.h ../../../Common/Defs.h \ + ../../../myWindows/myPrivate.h +MyVector.o: ../../../Common/MyVector.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../../Common/MyVector.h \ + ../../../Common/Defs.h +StringConvert.o: ../../../Common/StringConvert.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../../Common/StringConvert.h ../../../Common/MyWindows.h \ + ../../../Common/MyString.h ../../../Common/MyVector.h \ + ../../../Common/Defs.h +StringToInt.o: ../../../Common/StringToInt.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../../Common/StringToInt.h +TextConfig.o: ../../../Common/TextConfig.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../../Common/TextConfig.h \ + ../../../Common/MyVector.h ../../../Common/Defs.h \ + ../../../Common/MyString.h ../../../Common/UTFConvert.h +UTFConvert.o: ../../../Common/UTFConvert.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../../Common/UTFConvert.h \ + ../../../Common/MyString.h ../../../Common/MyVector.h \ + ../../../Common/Defs.h +Wildcard.o: ../../../Common/Wildcard.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../../Common/Wildcard.h \ + ../../../Common/MyString.h ../../../Common/MyVector.h \ + ../../../Common/Defs.h +MyWindows.o: ../../../Common/MyWindows.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../../Common/MyWindows.h +DLL.o: ../../../Windows/DLL.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../../Windows/DLL.h \ + ../../../Windows/../Common/MyString.h \ + ../../../Windows/../Common/MyVector.h ../../../Windows/../Common/Defs.h \ + ../../../Windows/Defs.h ../../../Windows/../Common/MyWindows.h \ + ../../../Windows/../Common/StringConvert.h \ + ../../../Windows/../Common/MyWindows.h \ + ../../../Windows/../Common/MyString.h ../../../Windows/../Common/Types.h \ + ../../../myWindows/myPrivate.h +Error.o: ../../../Windows/Error.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../../Windows/Error.h \ + ../../../Common/MyString.h ../../../Common/MyVector.h \ + ../../../Common/Defs.h ../../../Common/StringConvert.h \ + ../../../Common/MyWindows.h ../../../Common/MyString.h +FileDir.o: ../../../Windows/FileDir.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../../Windows/FileDir.h \ + ../../../Windows/../Common/MyString.h \ + ../../../Windows/../Common/MyVector.h ../../../Windows/../Common/Defs.h \ + ../../../Windows/Defs.h ../../../Windows/../Common/MyWindows.h \ + ../../../Windows/FileName.h ../../../Windows/../../C/Types.h \ + ../../../Windows/FileFind.h ../../../Windows/../Common/StringConvert.h \ + ../../../Windows/../Common/MyWindows.h \ + ../../../Windows/../Common/MyString.h ../../../Windows/../Common/Types.h \ + ../../../Windows/../Common/IntToString.h ../../../myWindows/myPrivate.h \ + ../../../Windows/Synchronization.h ../../../Windows/../../C/Threads.h \ + ../../../Windows/../../C/Types.h ../../../Windows/Synchronization2.h +FileFind.o: ../../../Windows/FileFind.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../../Windows/FileFind.h \ + ../../../Windows/../Common/MyString.h \ + ../../../Windows/../Common/MyVector.h ../../../Windows/../Common/Defs.h \ + ../../../Windows/FileName.h ../../../Windows/../../C/Types.h \ + ../../../Windows/Defs.h ../../../Windows/../Common/MyWindows.h \ + ../../../Windows/../Common/StringConvert.h \ + ../../../Windows/../Common/MyWindows.h \ + ../../../Windows/../Common/MyString.h ../../../Windows/../Common/Types.h \ + ../../../myWindows/myPrivate.h +FileIO.o: ../../../Windows/FileIO.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../../Windows/FileIO.h \ + ../../../Common/MyString.h ../../../Common/MyVector.h \ + ../../../Common/Defs.h ../../../Windows/Defs.h \ + ../../../Windows/../Common/MyWindows.h \ + ../../../Windows/../Common/StringConvert.h \ + ../../../Windows/../Common/MyWindows.h \ + ../../../Windows/../Common/MyString.h ../../../Windows/../Common/Types.h \ + ../../../myWindows/myPrivate.h +FileName.o: ../../../Windows/FileName.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../../Windows/FileName.h \ + ../../../Windows/../../C/Types.h ../../../Windows/../Common/MyString.h \ + ../../../Windows/../Common/MyVector.h ../../../Windows/../Common/Defs.h \ + ../../../Common/Wildcard.h ../../../Common/MyString.h +PropVariant.o: ../../../Windows/PropVariant.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../../Windows/PropVariant.h ../../../Windows/../Common/MyWindows.h \ + ../../../Windows/../Common/Types.h ../../../Windows/../Common/Defs.h +PropVariantConversions.o: ../../../Windows/PropVariantConversions.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../../Common/IntToString.h ../../../Common/StringConvert.h \ + ../../../Common/MyWindows.h ../../../Common/MyString.h \ + ../../../Common/MyVector.h ../../../Common/Defs.h \ + ../../../Windows/Defs.h ../../../Windows/../Common/MyWindows.h \ + ../../../Windows/PropVariantConversions.h ../../../Common/MyString.h +Registry.o: ../../../Windows/Registry.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../../Windows/Registry.h \ + ../../../Common/Buffer.h ../../../Common/Defs.h \ + ../../../Common/MyString.h ../../../Common/MyVector.h \ + /usr/include/wx-2.8/wx/config.h /usr/include/wx-2.8/wx/confbase.h \ + /usr/include/wx-2.8/wx/defs.h /usr/include/wx-2.8/wx/platform.h \ + /usr/lib/wx/include/gtk2-unicode-release-2.8/wx/setup.h \ + /usr/include/wx-2.8/wx/chkconf.h /usr/include/wx-2.8/wx/features.h \ + /usr/include/wx-2.8/wx/version.h /usr/include/wx-2.8/wx/cpp.h \ + /usr/include/wx-2.8/wx/dlimpexp.h /usr/include/wx-2.8/wx/debug.h \ + /usr/include/wx-2.8/wx/wxchar.h /usr/include/wx-2.8/wx/string.h \ + /usr/include/wx-2.8/wx/buffer.h /usr/include/wx-2.8/wx/strconv.h \ + /usr/include/wx-2.8/wx/fontenc.h /usr/include/wx-2.8/wx/beforestd.h \ + /usr/include/wx-2.8/wx/afterstd.h /usr/include/wx-2.8/wx/iosfwrap.h \ + /usr/include/wx-2.8/wx/fileconf.h /usr/include/wx-2.8/wx/textfile.h \ + /usr/include/wx-2.8/wx/textbuf.h /usr/include/wx-2.8/wx/arrstr.h \ + /usr/include/wx-2.8/wx/convauto.h /usr/include/wx-2.8/wx/dynarray.h \ + /usr/include/wx-2.8/wx/file.h /usr/include/wx-2.8/wx/filefn.h \ + /usr/include/wx-2.8/wx/list.h /usr/include/wx-2.8/wx/object.h \ + /usr/include/wx-2.8/wx/memory.h /usr/include/wx-2.8/wx/msgout.h +Synchronization.o: ../../../Windows/Synchronization.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + ../../../Windows/Synchronization.h ../../../Windows/Defs.h \ + ../../../Windows/../Common/MyWindows.h \ + ../../../Windows/../../C/Threads.h ../../../Windows/../../C/Types.h \ + ../../../Windows/Synchronization2.h +Time.o: ../../../Windows/Time.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h ../../../Windows/Time.h \ + ../../../Windows/Defs.h ../../../Windows/../Common/MyWindows.h +System.o: ../../../Windows/System.cpp ../../../Common/Types.h \ + ../../../Common/../../C/Types.h +Window.o: ../../../Windows/Window.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h /usr/include/wx-2.8/wx/wxprec.h \ + /usr/include/wx-2.8/wx/defs.h /usr/include/wx-2.8/wx/platform.h \ + /usr/lib/wx/include/gtk2-unicode-release-2.8/wx/setup.h \ + /usr/include/wx-2.8/wx/chkconf.h /usr/include/wx-2.8/wx/features.h \ + /usr/include/wx-2.8/wx/version.h /usr/include/wx-2.8/wx/cpp.h \ + /usr/include/wx-2.8/wx/dlimpexp.h /usr/include/wx-2.8/wx/debug.h \ + /usr/include/wx-2.8/wx/wxchar.h /usr/include/wx-2.8/wx/wx.h \ + /usr/include/wx-2.8/wx/object.h /usr/include/wx-2.8/wx/memory.h \ + /usr/include/wx-2.8/wx/string.h /usr/include/wx-2.8/wx/buffer.h \ + /usr/include/wx-2.8/wx/strconv.h /usr/include/wx-2.8/wx/fontenc.h \ + /usr/include/wx-2.8/wx/beforestd.h /usr/include/wx-2.8/wx/afterstd.h \ + /usr/include/wx-2.8/wx/iosfwrap.h /usr/include/wx-2.8/wx/msgout.h \ + /usr/include/wx-2.8/wx/dynarray.h /usr/include/wx-2.8/wx/list.h \ + /usr/include/wx-2.8/wx/hash.h /usr/include/wx-2.8/wx/hashmap.h \ + /usr/include/wx-2.8/wx/arrstr.h /usr/include/wx-2.8/wx/intl.h \ + /usr/include/wx-2.8/wx/log.h /usr/include/wx-2.8/wx/generic/logg.h \ + /usr/include/wx-2.8/wx/event.h /usr/include/wx-2.8/wx/clntdata.h \ + /usr/include/wx-2.8/wx/vector.h /usr/include/wx-2.8/wx/gdicmn.h \ + /usr/include/wx-2.8/wx/math.h /usr/include/wx-2.8/wx/cursor.h \ + /usr/include/wx-2.8/wx/gtk/cursor.h /usr/include/wx-2.8/wx/utils.h \ + /usr/include/wx-2.8/wx/filefn.h /usr/include/wx-2.8/wx/longlong.h \ + /usr/include/wx-2.8/wx/platinfo.h /usr/include/wx-2.8/wx/thread.h \ + /usr/include/wx-2.8/wx/app.h /usr/include/wx-2.8/wx/build.h \ + /usr/include/wx-2.8/wx/init.h /usr/include/wx-2.8/wx/gtk/app.h \ + /usr/include/wx-2.8/wx/stream.h /usr/include/wx-2.8/wx/stopwatch.h \ + /usr/include/wx-2.8/wx/module.h /usr/include/wx-2.8/wx/window.h \ + /usr/include/wx-2.8/wx/font.h /usr/include/wx-2.8/wx/gdiobj.h \ + /usr/include/wx-2.8/wx/gtk/font.h /usr/include/wx-2.8/wx/colour.h \ + /usr/include/wx-2.8/wx/variant.h /usr/include/wx-2.8/wx/datetime.h \ + /usr/include/wx-2.8/wx/gtk/colour.h /usr/include/wx-2.8/wx/region.h \ + /usr/include/wx-2.8/wx/gtk/region.h /usr/include/wx-2.8/wx/validate.h \ + /usr/include/wx-2.8/wx/palette.h \ + /usr/include/wx-2.8/wx/generic/paletteg.h /usr/include/wx-2.8/wx/accel.h \ + /usr/include/wx-2.8/wx/gtk/accel.h \ + /usr/include/wx-2.8/wx/generic/accel.h \ + /usr/include/wx-2.8/wx/gtk/window.h /usr/include/wx-2.8/wx/containr.h \ + /usr/include/wx-2.8/wx/panel.h /usr/include/wx-2.8/wx/generic/panelg.h \ + /usr/include/wx-2.8/wx/toplevel.h /usr/include/wx-2.8/wx/iconbndl.h \ + /usr/include/wx-2.8/wx/gtk/toplevel.h /usr/include/wx-2.8/wx/frame.h \ + /usr/include/wx-2.8/wx/gtk/frame.h /usr/include/wx-2.8/wx/bitmap.h \ + /usr/include/wx-2.8/wx/gtk/bitmap.h /usr/include/wx-2.8/wx/image.h \ + /usr/include/wx-2.8/wx/imagbmp.h /usr/include/wx-2.8/wx/imagpng.h \ + /usr/include/wx-2.8/wx/imaggif.h /usr/include/wx-2.8/wx/imagpcx.h \ + /usr/include/wx-2.8/wx/imagjpeg.h /usr/include/wx-2.8/wx/imagtga.h \ + /usr/include/wx-2.8/wx/imagtiff.h /usr/include/wx-2.8/wx/imagpnm.h \ + /usr/include/wx-2.8/wx/imagxpm.h /usr/include/wx-2.8/wx/imagiff.h \ + /usr/include/wx-2.8/wx/dc.h /usr/include/wx-2.8/wx/brush.h \ + /usr/include/wx-2.8/wx/gtk/brush.h /usr/include/wx-2.8/wx/pen.h \ + /usr/include/wx-2.8/wx/gtk/pen.h /usr/include/wx-2.8/wx/gtk/dc.h \ + /usr/include/wx-2.8/wx/dcgraph.h /usr/include/wx-2.8/wx/geometry.h \ + /usr/include/wx-2.8/wx/graphics.h /usr/include/wx-2.8/wx/dcclient.h \ + /usr/include/wx-2.8/wx/gtk/dcclient.h /usr/include/wx-2.8/wx/dcmemory.h \ + /usr/include/wx-2.8/wx/gtk/dcmemory.h /usr/include/wx-2.8/wx/dcprint.h \ + /usr/include/wx-2.8/wx/dcscreen.h /usr/include/wx-2.8/wx/gtk/dcscreen.h \ + /usr/include/wx-2.8/wx/button.h /usr/include/wx-2.8/wx/control.h \ + /usr/include/wx-2.8/wx/gtk/control.h /usr/include/wx-2.8/wx/gtk/button.h \ + /usr/include/wx-2.8/wx/menuitem.h /usr/include/wx-2.8/wx/gtk/menuitem.h \ + /usr/include/wx-2.8/wx/menu.h /usr/include/wx-2.8/wx/gtk/menu.h \ + /usr/include/wx-2.8/wx/icon.h /usr/include/wx-2.8/wx/iconloc.h \ + /usr/include/wx-2.8/wx/generic/icon.h /usr/include/wx-2.8/wx/dialog.h \ + /usr/include/wx-2.8/wx/gtk/dialog.h /usr/include/wx-2.8/wx/timer.h \ + /usr/include/wx-2.8/wx/gtk/timer.h /usr/include/wx-2.8/wx/settings.h \ + /usr/include/wx-2.8/wx/msgdlg.h /usr/include/wx-2.8/wx/gtk/msgdlg.h \ + /usr/include/wx-2.8/wx/cmndata.h /usr/include/wx-2.8/wx/encinfo.h \ + /usr/include/wx-2.8/wx/dataobj.h /usr/include/wx-2.8/wx/gtk/dataform.h \ + /usr/include/wx-2.8/wx/gtk/dataobj.h \ + /usr/include/wx-2.8/wx/gtk/dataobj2.h /usr/include/wx-2.8/wx/ctrlsub.h \ + /usr/include/wx-2.8/wx/bmpbuttn.h /usr/include/wx-2.8/wx/gtk/bmpbuttn.h \ + /usr/include/wx-2.8/wx/checkbox.h /usr/include/wx-2.8/wx/gtk/checkbox.h \ + /usr/include/wx-2.8/wx/checklst.h /usr/include/wx-2.8/wx/listbox.h \ + /usr/include/wx-2.8/wx/gtk/listbox.h \ + /usr/include/wx-2.8/wx/gtk/checklst.h /usr/include/wx-2.8/wx/choice.h \ + /usr/include/wx-2.8/wx/gtk/choice.h /usr/include/wx-2.8/wx/scrolbar.h \ + /usr/include/wx-2.8/wx/gtk/scrolbar.h /usr/include/wx-2.8/wx/stattext.h \ + /usr/include/wx-2.8/wx/gtk/stattext.h /usr/include/wx-2.8/wx/statbmp.h \ + /usr/include/wx-2.8/wx/gtk/statbmp.h /usr/include/wx-2.8/wx/statbox.h \ + /usr/include/wx-2.8/wx/gtk/statbox.h /usr/include/wx-2.8/wx/radiobox.h \ + /usr/include/wx-2.8/wx/gtk/radiobox.h /usr/include/wx-2.8/wx/radiobut.h \ + /usr/include/wx-2.8/wx/gtk/radiobut.h /usr/include/wx-2.8/wx/textctrl.h \ + /usr/include/wx-2.8/wx/ioswrap.h /usr/include/wx-2.8/wx/gtk/textctrl.h \ + /usr/include/wx-2.8/wx/slider.h /usr/include/wx-2.8/wx/gtk/slider.h \ + /usr/include/wx-2.8/wx/gauge.h /usr/include/wx-2.8/wx/gtk/gauge.h \ + /usr/include/wx-2.8/wx/scrolwin.h /usr/include/wx-2.8/wx/gtk/scrolwin.h \ + /usr/include/wx-2.8/wx/dirdlg.h /usr/include/wx-2.8/wx/gtk/dirdlg.h \ + /usr/include/wx-2.8/wx/generic/dirdlgg.h \ + /usr/include/wx-2.8/wx/toolbar.h /usr/include/wx-2.8/wx/tbarbase.h \ + /usr/include/wx-2.8/wx/gtk/tbargtk.h /usr/include/wx-2.8/wx/combobox.h \ + /usr/include/wx-2.8/wx/gtk/combobox.h /usr/include/wx-2.8/wx/layout.h \ + /usr/include/wx-2.8/wx/sizer.h /usr/include/wx-2.8/wx/mdi.h \ + /usr/include/wx-2.8/wx/gtk/mdi.h /usr/include/wx-2.8/wx/statusbr.h \ + /usr/include/wx-2.8/wx/generic/statusbr.h \ + /usr/include/wx-2.8/wx/choicdlg.h \ + /usr/include/wx-2.8/wx/generic/choicdgg.h \ + /usr/include/wx-2.8/wx/textdlg.h \ + /usr/include/wx-2.8/wx/generic/textdlgg.h \ + /usr/include/wx-2.8/wx/valtext.h /usr/include/wx-2.8/wx/filedlg.h \ + /usr/include/wx-2.8/wx/gtk/filedlg.h \ + /usr/include/wx-2.8/wx/generic/filedlgg.h \ + /usr/include/wx-2.8/wx/listctrl.h /usr/include/wx-2.8/wx/listbase.h \ + /usr/include/wx-2.8/wx/generic/listctrl.h ../../../Windows/Window.h \ + ../../../Windows/Defs.h ../../../Windows/../Common/MyWindows.h \ + ../../../Common/MyString.h ../../../Common/MyVector.h \ + ../../../Common/Defs.h +Dialog.o: ../../../Windows/Control/Dialog.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../include_windows/basetyps.h \ + ../../../include_windows/tchar.h /usr/include/wx-2.8/wx/wxprec.h \ + /usr/include/wx-2.8/wx/defs.h /usr/include/wx-2.8/wx/platform.h \ + /usr/lib/wx/include/gtk2-unicode-release-2.8/wx/setup.h \ + /usr/include/wx-2.8/wx/chkconf.h /usr/include/wx-2.8/wx/features.h \ + /usr/include/wx-2.8/wx/version.h /usr/include/wx-2.8/wx/cpp.h \ + /usr/include/wx-2.8/wx/dlimpexp.h /usr/include/wx-2.8/wx/debug.h \ + /usr/include/wx-2.8/wx/wxchar.h /usr/include/wx-2.8/wx/wx.h \ + /usr/include/wx-2.8/wx/object.h /usr/include/wx-2.8/wx/memory.h \ + /usr/include/wx-2.8/wx/string.h /usr/include/wx-2.8/wx/buffer.h \ + /usr/include/wx-2.8/wx/strconv.h /usr/include/wx-2.8/wx/fontenc.h \ + /usr/include/wx-2.8/wx/beforestd.h /usr/include/wx-2.8/wx/afterstd.h \ + /usr/include/wx-2.8/wx/iosfwrap.h /usr/include/wx-2.8/wx/msgout.h \ + /usr/include/wx-2.8/wx/dynarray.h /usr/include/wx-2.8/wx/list.h \ + /usr/include/wx-2.8/wx/hash.h /usr/include/wx-2.8/wx/hashmap.h \ + /usr/include/wx-2.8/wx/arrstr.h /usr/include/wx-2.8/wx/intl.h \ + /usr/include/wx-2.8/wx/log.h /usr/include/wx-2.8/wx/generic/logg.h \ + /usr/include/wx-2.8/wx/event.h /usr/include/wx-2.8/wx/clntdata.h \ + /usr/include/wx-2.8/wx/vector.h /usr/include/wx-2.8/wx/gdicmn.h \ + /usr/include/wx-2.8/wx/math.h /usr/include/wx-2.8/wx/cursor.h \ + /usr/include/wx-2.8/wx/gtk/cursor.h /usr/include/wx-2.8/wx/utils.h \ + /usr/include/wx-2.8/wx/filefn.h /usr/include/wx-2.8/wx/longlong.h \ + /usr/include/wx-2.8/wx/platinfo.h /usr/include/wx-2.8/wx/thread.h \ + /usr/include/wx-2.8/wx/app.h /usr/include/wx-2.8/wx/build.h \ + /usr/include/wx-2.8/wx/init.h /usr/include/wx-2.8/wx/gtk/app.h \ + /usr/include/wx-2.8/wx/stream.h /usr/include/wx-2.8/wx/stopwatch.h \ + /usr/include/wx-2.8/wx/module.h /usr/include/wx-2.8/wx/window.h \ + /usr/include/wx-2.8/wx/font.h /usr/include/wx-2.8/wx/gdiobj.h \ + /usr/include/wx-2.8/wx/gtk/font.h /usr/include/wx-2.8/wx/colour.h \ + /usr/include/wx-2.8/wx/variant.h /usr/include/wx-2.8/wx/datetime.h \ + /usr/include/wx-2.8/wx/gtk/colour.h /usr/include/wx-2.8/wx/region.h \ + /usr/include/wx-2.8/wx/gtk/region.h /usr/include/wx-2.8/wx/validate.h \ + /usr/include/wx-2.8/wx/palette.h \ + /usr/include/wx-2.8/wx/generic/paletteg.h /usr/include/wx-2.8/wx/accel.h \ + /usr/include/wx-2.8/wx/gtk/accel.h \ + /usr/include/wx-2.8/wx/generic/accel.h \ + /usr/include/wx-2.8/wx/gtk/window.h /usr/include/wx-2.8/wx/containr.h \ + /usr/include/wx-2.8/wx/panel.h /usr/include/wx-2.8/wx/generic/panelg.h \ + /usr/include/wx-2.8/wx/toplevel.h /usr/include/wx-2.8/wx/iconbndl.h \ + /usr/include/wx-2.8/wx/gtk/toplevel.h /usr/include/wx-2.8/wx/frame.h \ + /usr/include/wx-2.8/wx/gtk/frame.h /usr/include/wx-2.8/wx/bitmap.h \ + /usr/include/wx-2.8/wx/gtk/bitmap.h /usr/include/wx-2.8/wx/image.h \ + /usr/include/wx-2.8/wx/imagbmp.h /usr/include/wx-2.8/wx/imagpng.h \ + /usr/include/wx-2.8/wx/imaggif.h /usr/include/wx-2.8/wx/imagpcx.h \ + /usr/include/wx-2.8/wx/imagjpeg.h /usr/include/wx-2.8/wx/imagtga.h \ + /usr/include/wx-2.8/wx/imagtiff.h /usr/include/wx-2.8/wx/imagpnm.h \ + /usr/include/wx-2.8/wx/imagxpm.h /usr/include/wx-2.8/wx/imagiff.h \ + /usr/include/wx-2.8/wx/dc.h /usr/include/wx-2.8/wx/brush.h \ + /usr/include/wx-2.8/wx/gtk/brush.h /usr/include/wx-2.8/wx/pen.h \ + /usr/include/wx-2.8/wx/gtk/pen.h /usr/include/wx-2.8/wx/gtk/dc.h \ + /usr/include/wx-2.8/wx/dcgraph.h /usr/include/wx-2.8/wx/geometry.h \ + /usr/include/wx-2.8/wx/graphics.h /usr/include/wx-2.8/wx/dcclient.h \ + /usr/include/wx-2.8/wx/gtk/dcclient.h /usr/include/wx-2.8/wx/dcmemory.h \ + /usr/include/wx-2.8/wx/gtk/dcmemory.h /usr/include/wx-2.8/wx/dcprint.h \ + /usr/include/wx-2.8/wx/dcscreen.h /usr/include/wx-2.8/wx/gtk/dcscreen.h \ + /usr/include/wx-2.8/wx/button.h /usr/include/wx-2.8/wx/control.h \ + /usr/include/wx-2.8/wx/gtk/control.h /usr/include/wx-2.8/wx/gtk/button.h \ + /usr/include/wx-2.8/wx/menuitem.h /usr/include/wx-2.8/wx/gtk/menuitem.h \ + /usr/include/wx-2.8/wx/menu.h /usr/include/wx-2.8/wx/gtk/menu.h \ + /usr/include/wx-2.8/wx/icon.h /usr/include/wx-2.8/wx/iconloc.h \ + /usr/include/wx-2.8/wx/generic/icon.h /usr/include/wx-2.8/wx/dialog.h \ + /usr/include/wx-2.8/wx/gtk/dialog.h /usr/include/wx-2.8/wx/timer.h \ + /usr/include/wx-2.8/wx/gtk/timer.h /usr/include/wx-2.8/wx/settings.h \ + /usr/include/wx-2.8/wx/msgdlg.h /usr/include/wx-2.8/wx/gtk/msgdlg.h \ + /usr/include/wx-2.8/wx/cmndata.h /usr/include/wx-2.8/wx/encinfo.h \ + /usr/include/wx-2.8/wx/dataobj.h /usr/include/wx-2.8/wx/gtk/dataform.h \ + /usr/include/wx-2.8/wx/gtk/dataobj.h \ + /usr/include/wx-2.8/wx/gtk/dataobj2.h /usr/include/wx-2.8/wx/ctrlsub.h \ + /usr/include/wx-2.8/wx/bmpbuttn.h /usr/include/wx-2.8/wx/gtk/bmpbuttn.h \ + /usr/include/wx-2.8/wx/checkbox.h /usr/include/wx-2.8/wx/gtk/checkbox.h \ + /usr/include/wx-2.8/wx/checklst.h /usr/include/wx-2.8/wx/listbox.h \ + /usr/include/wx-2.8/wx/gtk/listbox.h \ + /usr/include/wx-2.8/wx/gtk/checklst.h /usr/include/wx-2.8/wx/choice.h \ + /usr/include/wx-2.8/wx/gtk/choice.h /usr/include/wx-2.8/wx/scrolbar.h \ + /usr/include/wx-2.8/wx/gtk/scrolbar.h /usr/include/wx-2.8/wx/stattext.h \ + /usr/include/wx-2.8/wx/gtk/stattext.h /usr/include/wx-2.8/wx/statbmp.h \ + /usr/include/wx-2.8/wx/gtk/statbmp.h /usr/include/wx-2.8/wx/statbox.h \ + /usr/include/wx-2.8/wx/gtk/statbox.h /usr/include/wx-2.8/wx/radiobox.h \ + /usr/include/wx-2.8/wx/gtk/radiobox.h /usr/include/wx-2.8/wx/radiobut.h \ + /usr/include/wx-2.8/wx/gtk/radiobut.h /usr/include/wx-2.8/wx/textctrl.h \ + /usr/include/wx-2.8/wx/ioswrap.h /usr/include/wx-2.8/wx/gtk/textctrl.h \ + /usr/include/wx-2.8/wx/slider.h /usr/include/wx-2.8/wx/gtk/slider.h \ + /usr/include/wx-2.8/wx/gauge.h /usr/include/wx-2.8/wx/gtk/gauge.h \ + /usr/include/wx-2.8/wx/scrolwin.h /usr/include/wx-2.8/wx/gtk/scrolwin.h \ + /usr/include/wx-2.8/wx/dirdlg.h /usr/include/wx-2.8/wx/gtk/dirdlg.h \ + /usr/include/wx-2.8/wx/generic/dirdlgg.h \ + /usr/include/wx-2.8/wx/toolbar.h /usr/include/wx-2.8/wx/tbarbase.h \ + /usr/include/wx-2.8/wx/gtk/tbargtk.h /usr/include/wx-2.8/wx/combobox.h \ + /usr/include/wx-2.8/wx/gtk/combobox.h /usr/include/wx-2.8/wx/layout.h \ + /usr/include/wx-2.8/wx/sizer.h /usr/include/wx-2.8/wx/mdi.h \ + /usr/include/wx-2.8/wx/gtk/mdi.h /usr/include/wx-2.8/wx/statusbr.h \ + /usr/include/wx-2.8/wx/generic/statusbr.h \ + /usr/include/wx-2.8/wx/choicdlg.h \ + /usr/include/wx-2.8/wx/generic/choicdgg.h \ + /usr/include/wx-2.8/wx/textdlg.h \ + /usr/include/wx-2.8/wx/generic/textdlgg.h \ + /usr/include/wx-2.8/wx/valtext.h /usr/include/wx-2.8/wx/filedlg.h \ + /usr/include/wx-2.8/wx/gtk/filedlg.h \ + /usr/include/wx-2.8/wx/generic/filedlgg.h \ + /usr/include/wx-2.8/wx/listctrl.h /usr/include/wx-2.8/wx/listbase.h \ + /usr/include/wx-2.8/wx/generic/listctrl.h \ + /usr/include/wx-2.8/wx/filename.h ../../../Windows/Control/DialogImpl.h \ + ../../../Windows/Window.h ../../../Windows/Defs.h \ + ../../../Windows/../Common/MyWindows.h ../../../Common/MyString.h \ + ../../../Common/MyVector.h ../../../Common/Defs.h \ + ../../../Windows/Control/Dialog.h ../../../Windows/Synchronization.h \ + ../../../Windows/Defs.h ../../../Windows/../../C/Threads.h \ + ../../../Windows/../../C/Types.h ../../../Windows/Synchronization2.h +Controls.o: ../../../Windows/Control/Controls.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + /usr/include/wx-2.8/wx/wxprec.h /usr/include/wx-2.8/wx/defs.h \ + /usr/include/wx-2.8/wx/platform.h \ + /usr/lib/wx/include/gtk2-unicode-release-2.8/wx/setup.h \ + /usr/include/wx-2.8/wx/chkconf.h /usr/include/wx-2.8/wx/features.h \ + /usr/include/wx-2.8/wx/version.h /usr/include/wx-2.8/wx/cpp.h \ + /usr/include/wx-2.8/wx/dlimpexp.h /usr/include/wx-2.8/wx/debug.h \ + /usr/include/wx-2.8/wx/wxchar.h /usr/include/wx-2.8/wx/wx.h \ + /usr/include/wx-2.8/wx/object.h /usr/include/wx-2.8/wx/memory.h \ + /usr/include/wx-2.8/wx/string.h /usr/include/wx-2.8/wx/buffer.h \ + /usr/include/wx-2.8/wx/strconv.h /usr/include/wx-2.8/wx/fontenc.h \ + /usr/include/wx-2.8/wx/beforestd.h /usr/include/wx-2.8/wx/afterstd.h \ + /usr/include/wx-2.8/wx/iosfwrap.h /usr/include/wx-2.8/wx/msgout.h \ + /usr/include/wx-2.8/wx/dynarray.h /usr/include/wx-2.8/wx/list.h \ + /usr/include/wx-2.8/wx/hash.h /usr/include/wx-2.8/wx/hashmap.h \ + /usr/include/wx-2.8/wx/arrstr.h /usr/include/wx-2.8/wx/intl.h \ + /usr/include/wx-2.8/wx/log.h /usr/include/wx-2.8/wx/generic/logg.h \ + /usr/include/wx-2.8/wx/event.h /usr/include/wx-2.8/wx/clntdata.h \ + /usr/include/wx-2.8/wx/vector.h /usr/include/wx-2.8/wx/gdicmn.h \ + /usr/include/wx-2.8/wx/math.h /usr/include/wx-2.8/wx/cursor.h \ + /usr/include/wx-2.8/wx/gtk/cursor.h /usr/include/wx-2.8/wx/utils.h \ + /usr/include/wx-2.8/wx/filefn.h /usr/include/wx-2.8/wx/longlong.h \ + /usr/include/wx-2.8/wx/platinfo.h /usr/include/wx-2.8/wx/thread.h \ + /usr/include/wx-2.8/wx/app.h /usr/include/wx-2.8/wx/build.h \ + /usr/include/wx-2.8/wx/init.h /usr/include/wx-2.8/wx/gtk/app.h \ + /usr/include/wx-2.8/wx/stream.h /usr/include/wx-2.8/wx/stopwatch.h \ + /usr/include/wx-2.8/wx/module.h /usr/include/wx-2.8/wx/window.h \ + /usr/include/wx-2.8/wx/font.h /usr/include/wx-2.8/wx/gdiobj.h \ + /usr/include/wx-2.8/wx/gtk/font.h /usr/include/wx-2.8/wx/colour.h \ + /usr/include/wx-2.8/wx/variant.h /usr/include/wx-2.8/wx/datetime.h \ + /usr/include/wx-2.8/wx/gtk/colour.h /usr/include/wx-2.8/wx/region.h \ + /usr/include/wx-2.8/wx/gtk/region.h /usr/include/wx-2.8/wx/validate.h \ + /usr/include/wx-2.8/wx/palette.h \ + /usr/include/wx-2.8/wx/generic/paletteg.h /usr/include/wx-2.8/wx/accel.h \ + /usr/include/wx-2.8/wx/gtk/accel.h \ + /usr/include/wx-2.8/wx/generic/accel.h \ + /usr/include/wx-2.8/wx/gtk/window.h /usr/include/wx-2.8/wx/containr.h \ + /usr/include/wx-2.8/wx/panel.h /usr/include/wx-2.8/wx/generic/panelg.h \ + /usr/include/wx-2.8/wx/toplevel.h /usr/include/wx-2.8/wx/iconbndl.h \ + /usr/include/wx-2.8/wx/gtk/toplevel.h /usr/include/wx-2.8/wx/frame.h \ + /usr/include/wx-2.8/wx/gtk/frame.h /usr/include/wx-2.8/wx/bitmap.h \ + /usr/include/wx-2.8/wx/gtk/bitmap.h /usr/include/wx-2.8/wx/image.h \ + /usr/include/wx-2.8/wx/imagbmp.h /usr/include/wx-2.8/wx/imagpng.h \ + /usr/include/wx-2.8/wx/imaggif.h /usr/include/wx-2.8/wx/imagpcx.h \ + /usr/include/wx-2.8/wx/imagjpeg.h /usr/include/wx-2.8/wx/imagtga.h \ + /usr/include/wx-2.8/wx/imagtiff.h /usr/include/wx-2.8/wx/imagpnm.h \ + /usr/include/wx-2.8/wx/imagxpm.h /usr/include/wx-2.8/wx/imagiff.h \ + /usr/include/wx-2.8/wx/dc.h /usr/include/wx-2.8/wx/brush.h \ + /usr/include/wx-2.8/wx/gtk/brush.h /usr/include/wx-2.8/wx/pen.h \ + /usr/include/wx-2.8/wx/gtk/pen.h /usr/include/wx-2.8/wx/gtk/dc.h \ + /usr/include/wx-2.8/wx/dcgraph.h /usr/include/wx-2.8/wx/geometry.h \ + /usr/include/wx-2.8/wx/graphics.h /usr/include/wx-2.8/wx/dcclient.h \ + /usr/include/wx-2.8/wx/gtk/dcclient.h /usr/include/wx-2.8/wx/dcmemory.h \ + /usr/include/wx-2.8/wx/gtk/dcmemory.h /usr/include/wx-2.8/wx/dcprint.h \ + /usr/include/wx-2.8/wx/dcscreen.h /usr/include/wx-2.8/wx/gtk/dcscreen.h \ + /usr/include/wx-2.8/wx/button.h /usr/include/wx-2.8/wx/control.h \ + /usr/include/wx-2.8/wx/gtk/control.h /usr/include/wx-2.8/wx/gtk/button.h \ + /usr/include/wx-2.8/wx/menuitem.h /usr/include/wx-2.8/wx/gtk/menuitem.h \ + /usr/include/wx-2.8/wx/menu.h /usr/include/wx-2.8/wx/gtk/menu.h \ + /usr/include/wx-2.8/wx/icon.h /usr/include/wx-2.8/wx/iconloc.h \ + /usr/include/wx-2.8/wx/generic/icon.h /usr/include/wx-2.8/wx/dialog.h \ + /usr/include/wx-2.8/wx/gtk/dialog.h /usr/include/wx-2.8/wx/timer.h \ + /usr/include/wx-2.8/wx/gtk/timer.h /usr/include/wx-2.8/wx/settings.h \ + /usr/include/wx-2.8/wx/msgdlg.h /usr/include/wx-2.8/wx/gtk/msgdlg.h \ + /usr/include/wx-2.8/wx/cmndata.h /usr/include/wx-2.8/wx/encinfo.h \ + /usr/include/wx-2.8/wx/dataobj.h /usr/include/wx-2.8/wx/gtk/dataform.h \ + /usr/include/wx-2.8/wx/gtk/dataobj.h \ + /usr/include/wx-2.8/wx/gtk/dataobj2.h /usr/include/wx-2.8/wx/ctrlsub.h \ + /usr/include/wx-2.8/wx/bmpbuttn.h /usr/include/wx-2.8/wx/gtk/bmpbuttn.h \ + /usr/include/wx-2.8/wx/checkbox.h /usr/include/wx-2.8/wx/gtk/checkbox.h \ + /usr/include/wx-2.8/wx/checklst.h /usr/include/wx-2.8/wx/listbox.h \ + /usr/include/wx-2.8/wx/gtk/listbox.h \ + /usr/include/wx-2.8/wx/gtk/checklst.h /usr/include/wx-2.8/wx/choice.h \ + /usr/include/wx-2.8/wx/gtk/choice.h /usr/include/wx-2.8/wx/scrolbar.h \ + /usr/include/wx-2.8/wx/gtk/scrolbar.h /usr/include/wx-2.8/wx/stattext.h \ + /usr/include/wx-2.8/wx/gtk/stattext.h /usr/include/wx-2.8/wx/statbmp.h \ + /usr/include/wx-2.8/wx/gtk/statbmp.h /usr/include/wx-2.8/wx/statbox.h \ + /usr/include/wx-2.8/wx/gtk/statbox.h /usr/include/wx-2.8/wx/radiobox.h \ + /usr/include/wx-2.8/wx/gtk/radiobox.h /usr/include/wx-2.8/wx/radiobut.h \ + /usr/include/wx-2.8/wx/gtk/radiobut.h /usr/include/wx-2.8/wx/textctrl.h \ + /usr/include/wx-2.8/wx/ioswrap.h /usr/include/wx-2.8/wx/gtk/textctrl.h \ + /usr/include/wx-2.8/wx/slider.h /usr/include/wx-2.8/wx/gtk/slider.h \ + /usr/include/wx-2.8/wx/gauge.h /usr/include/wx-2.8/wx/gtk/gauge.h \ + /usr/include/wx-2.8/wx/scrolwin.h /usr/include/wx-2.8/wx/gtk/scrolwin.h \ + /usr/include/wx-2.8/wx/dirdlg.h /usr/include/wx-2.8/wx/gtk/dirdlg.h \ + /usr/include/wx-2.8/wx/generic/dirdlgg.h \ + /usr/include/wx-2.8/wx/toolbar.h /usr/include/wx-2.8/wx/tbarbase.h \ + /usr/include/wx-2.8/wx/gtk/tbargtk.h /usr/include/wx-2.8/wx/combobox.h \ + /usr/include/wx-2.8/wx/gtk/combobox.h /usr/include/wx-2.8/wx/layout.h \ + /usr/include/wx-2.8/wx/sizer.h /usr/include/wx-2.8/wx/mdi.h \ + /usr/include/wx-2.8/wx/gtk/mdi.h /usr/include/wx-2.8/wx/statusbr.h \ + /usr/include/wx-2.8/wx/generic/statusbr.h \ + /usr/include/wx-2.8/wx/choicdlg.h \ + /usr/include/wx-2.8/wx/generic/choicdgg.h \ + /usr/include/wx-2.8/wx/textdlg.h \ + /usr/include/wx-2.8/wx/generic/textdlgg.h \ + /usr/include/wx-2.8/wx/valtext.h /usr/include/wx-2.8/wx/filedlg.h \ + /usr/include/wx-2.8/wx/gtk/filedlg.h \ + /usr/include/wx-2.8/wx/generic/filedlgg.h \ + /usr/include/wx-2.8/wx/listctrl.h /usr/include/wx-2.8/wx/listbase.h \ + /usr/include/wx-2.8/wx/generic/listctrl.h \ + /usr/include/wx-2.8/wx/imaglist.h \ + /usr/include/wx-2.8/wx/generic/imaglist.h \ + ../../../Windows/Control/Dialog.h ../../../Windows/Window.h \ + ../../../Windows/Defs.h ../../../Windows/../Common/MyWindows.h \ + ../../../Common/MyString.h ../../../Common/MyVector.h \ + ../../../Common/Defs.h ../../../Windows/Control/ComboBox.h \ + ../../../Windows/Control/Window2.h ../../../Windows/Control/Edit.h \ + ../../../Windows/Control/ProgressBar.h \ + ../../../Windows/Control/StatusBar.h ../../../Windows/Control/ListView.h +wine_date_and_time.o: ../../../myWindows/wine_date_and_time.cpp \ + ../../../myWindows/config.h ../../../include_windows/windows.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../include_windows/basetyps.h +wine_GetXXXDefaultLangID.o: \ + ../../../myWindows/wine_GetXXXDefaultLangID.cpp \ + ../../../myWindows/StdAfx.h ../../../myWindows/config.h \ + ../../../Common/MyWindows.h ../../../Common/MyGuidDef.h \ + ../../../Common/Types.h ../../../Common/../../C/Types.h \ + ../../../Common/Types.h ../../../include_windows/windows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h diff --git a/CPP/7zip/UI/GUI/makefile.list b/CPP/7zip/UI/GUI/makefile.list new file mode 100644 index 0000000..b4db8f0 --- /dev/null +++ b/CPP/7zip/UI/GUI/makefile.list @@ -0,0 +1,136 @@ +SRCS=\ + CompressDialog.cpp \ + CompressDialog_rc.cpp \ + ExtractDialog.cpp \ + ExtractDialog_rc.cpp \ + BenchmarkDialog.cpp \ + BenchmarkDialog_rc.cpp \ + ExtractGUI.cpp \ + GUI.cpp \ + wxGUI.cpp \ + UpdateCallbackGUI.cpp \ + UpdateGUI.cpp \ + ../Common/ArchiveCommandLine.cpp \ + ../Common/ArchiveExtractCallback.cpp \ + ../Common/ArchiveOpenCallback.cpp \ + ../Common/Bench.cpp \ + ../Common/DefaultName.cpp \ + ../Common/EnumDirItems.cpp \ + ../Common/Extract.cpp \ + ../Common/ExtractingFilePath.cpp \ + ../Common/LoadCodecs.cpp \ + ../Common/OpenArchive.cpp \ + ../Common/PropIDUtils.cpp \ + ../Common/SetProperties.cpp \ + ../Common/SortUtils.cpp \ + ../Common/TempFiles.cpp \ + ../Common/Update.cpp \ + ../Common/UpdateAction.cpp \ + ../Common/UpdateCallback.cpp \ + ../Common/UpdatePair.cpp \ + ../Common/UpdateProduce.cpp \ + ../Common/WorkDir.cpp \ + ../Common/ZipRegistry.cpp \ + ../Explorer/MyMessages.cpp \ + ../../UI/FileManager/FormatUtils.cpp \ + ../../UI/FileManager/ProgramLocation.cpp \ + ../../UI/FileManager/ProgressDialog2.cpp \ + ../../UI/FileManager/ProgressDialog2_rc.cpp \ + ../../UI/FileManager/MessagesDialog.cpp \ + ../../UI/FileManager/MessagesDialog_rc.cpp \ + ../../UI/FileManager/OverwriteDialog.cpp \ + ../../UI/FileManager/OverwriteDialog_rc.cpp \ + ../../UI/FileManager/PasswordDialog.cpp \ + ../../UI/FileManager/PasswordDialog_rc.cpp \ + ../../UI/FileManager/ExtractCallback.cpp \ + ../../UI/FileManager/SplitUtils.cpp \ + ../../UI/FileManager/StringUtils.cpp \ + ../../UI/FileManager/LangUtils.cpp \ + ../../Archive/Common/OutStreamWithCRC.cpp \ + ../../Common/CreateCoder.cpp \ + ../../Common/FilePathAutoRename.cpp \ + ../../Common/FileStreams.cpp \ + ../../Common/FilterCoder.cpp \ + ../../Common/ProgressUtils.cpp \ + ../../Common/StreamUtils.cpp \ + ../../Compress/CopyCoder.cpp \ + ../../../Common/CommandLineParser.cpp \ + ../../../Common/CRC.cpp \ + ../../../Common/IntToString.cpp \ + ../../../Common/Lang.cpp \ + ../../../Common/ListFileUtils.cpp \ + ../../../Common/MyString.cpp \ + ../../../Common/MyVector.cpp \ + ../../../Common/StringConvert.cpp \ + ../../../Common/StringToInt.cpp \ + ../../../Common/TextConfig.cpp \ + ../../../Common/UTFConvert.cpp \ + ../../../Common/Wildcard.cpp \ + ../../../Common/MyWindows.cpp \ + ../../../Windows/DLL.cpp \ + ../../../Windows/Error.cpp \ + ../../../Windows/FileDir.cpp \ + ../../../Windows/FileFind.cpp \ + ../../../Windows/FileIO.cpp \ + ../../../Windows/FileName.cpp \ + ../../../Windows/PropVariant.cpp \ + ../../../Windows/PropVariantConversions.cpp \ + ../../../Windows/Registry.cpp \ + ../../../Windows/Synchronization.cpp \ + ../../../Windows/Time.cpp \ + ../../../Windows/System.cpp \ + ../../../Windows/Window.cpp \ + ../../../Windows/Control/Dialog.cpp \ + ../../../Windows/Control/Controls.cpp \ + ../../../myWindows/wine_date_and_time.cpp \ + ../../../myWindows/wine_GetXXXDefaultLangID.cpp + + +SRCS_OUT=\ + ../../UI/FileManager/HelpUtils.cpp \ + ../../UI/FileManager/OpenCallback.cpp \ + ../../UI/FileManager/RegistryUtils.cpp \ + ../../../Common/NewHandler.cpp \ + ../../../Windows/MemoryLock.cpp \ + ../../../Windows/Registry.cpp \ + ../../../Windows/ResourceString.cpp \ + ../../../Windows/Shell.cpp + +SRCS_C=\ + ../../../../C/7zCrc.c \ + ../../../../C/7zCrcOpt.c \ + ../../../../C/Alloc.c \ + ../../../../C/Threads.c + +include ../../../../makefile.rules + +CompressDialog.o : CompressDialog.cpp + $(CXX) $(CXXFLAGS) CompressDialog.cpp +CompressDialog_rc.o : CompressDialog_rc.cpp + $(CXX) $(CXXFLAGS) CompressDialog_rc.cpp +ExtractDialog.o : ExtractDialog.cpp + $(CXX) $(CXXFLAGS) ExtractDialog.cpp +ExtractDialog_rc.o : ExtractDialog_rc.cpp + $(CXX) $(CXXFLAGS) ExtractDialog_rc.cpp +BenchmarkDialog.o : BenchmarkDialog.cpp + $(CXX) $(CXXFLAGS) BenchmarkDialog.cpp +BenchmarkDialog_rc.o : BenchmarkDialog_rc.cpp + $(CXX) $(CXXFLAGS) BenchmarkDialog_rc.cpp +ExtractGUI.o : ExtractGUI.cpp + $(CXX) $(CXXFLAGS) ExtractGUI.cpp +GUI.o : GUI.cpp + $(CXX) $(CXXFLAGS) GUI.cpp +wxGUI.o : wxGUI.cpp + $(CXX) $(CXXFLAGS) wxGUI.cpp +UpdateCallbackGUI.o : UpdateCallbackGUI.cpp + $(CXX) $(CXXFLAGS) UpdateCallbackGUI.cpp +UpdateGUI.o : UpdateGUI.cpp + $(CXX) $(CXXFLAGS) UpdateGUI.cpp + +LzmaBench.o : ../../Compress/LZMA_Alone/LzmaBench.cpp + $(CXX) $(CXXFLAGS) ../../Compress/LZMA_Alone/LzmaBench.cpp + + +MyMessages.o : ../Explorer/MyMessages.cpp + $(CXX) $(CXXFLAGS) ../Explorer/MyMessages.cpp + diff --git a/CPP/7zip/UI/GUI/resource2.h b/CPP/7zip/UI/GUI/resource2.h new file mode 100644 index 0000000..4f8b157 --- /dev/null +++ b/CPP/7zip/UI/GUI/resource2.h @@ -0,0 +1,3 @@ +#define IDS_COMPRESSED_COLON 2277 +#define IDS_ARCHIVES_COLON 2278 +#define IDS_PROGRESS_COMPRESSING 98 diff --git a/CPP/7zip/UI/GUI/wxGUI.cpp b/CPP/7zip/UI/GUI/wxGUI.cpp new file mode 100644 index 0000000..6a4bf12 --- /dev/null +++ b/CPP/7zip/UI/GUI/wxGUI.cpp @@ -0,0 +1,617 @@ +// wxGUI.cpp + +#include "StdAfx.h" + +// For compilers that support precompilation, includes "wx/wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +// for all others, include the necessary headers (this file is usually all you +// need because it includes almost all "standard" wxWidgets headers) +#ifndef WX_PRECOMP + #include "wx/wx.h" +#endif + +#undef _WIN32 + +#ifdef __WXMAC__ + +#define UInt32 max_UInt32 +#include +#undef UInt32 + +#endif + +#define static const +#include "../GUI/p7zip_32.xpm" +#undef static + +#undef ACTIVATE_DIALOG_TESTS + +#ifdef _WIN32 +#error 5 +#endif + +#include "Windows/Window.h" +#include "Windows/Control/DialogImpl.h" + + +// FIXME + +static pthread_t g_main_thread; + +bool is_main_thread(void) +{ + return ( g_main_thread == pthread_self() ); +} + +void verify_main_thread(void) +{ + if ( ! is_main_thread() ) + { + printf("verify_main_thread-wxGUI\n"); + abort(); + } +} + + + + + + + + + +int Main1(int argc,TCHAR **argv); + +#include "Windows/Registry.h" +using namespace NWindows; +using namespace NRegistry; + + +#include "Common/StringConvert.h" +#include "Windows/FileDir.h" +#include "Windows/Synchronization.h" + +#include "ExtractRes.h" +#include "../Explorer/MyMessages.h" + +#include "../FileManager/resourceGui.h" +#include "ExtractGUI.h" +#include "UpdateGUI.h" +#include "BenchmarkDialog.h" +#include "../FileManager/RegistryUtils.h" + +using namespace NWindows; +using namespace NFile; + +#include "../FileManager/ProgramLocation.h" + +static LPCWSTR kHelpFileName = L"help/"; + +void ShowHelpWindow(HWND hwnd, LPCWSTR topicFile) +{ + UString path; + if (!::GetProgramFolderPath(path)) + return; + path += kHelpFileName; + path += topicFile; + printf("ShowHelpWindow(%p,%ls)=>%ls\n",hwnd,topicFile,(const wchar_t *)path); + // HtmlHelp(hwnd, GetSystemString(path), HH_DISPLAY_TOPIC, NULL); + wxString path2(path); + wxLaunchDefaultBrowser(path2); +} + +////////////////////////////// TRIES /////////////////////////////////// + +#ifdef ACTIVATE_DIALOG_TESTS +static void ErrorMessage(const wchar_t *message) +{ + MessageBox(0,message, wxT("7-Zip GUI"),wxICON_ERROR); +} + +#include "../FileManager/PasswordDialog.h" +#include "../FileManager/MessagesDialog.h" +#include "../FileManager/OverwriteDialog.h" +#include "Windows/Thread.h" + +void myErrorMsg(const wchar_t *message) +{ + MessageBox(0,message, wxT("Message"),wxICON_ERROR); +} + +void testCMessagesDialog() +{ + UStringVector Messages; + + Messages.Add(L"message 1"); + Messages.Add(L"message 2"); + Messages.Add(L"message 3"); + Messages.Add(L"message 4"); + Messages.Add(L"message 5"); + Messages.Add(L"message 6"); + Messages.Add(L"message 7"); + Messages.Add(L"message 8"); + Messages.Add(L"message 9"); + + CMessagesDialog messagesDialog; + messagesDialog.Messages = &Messages; + int ret = messagesDialog.Create( 0 ); // ParentWindow + + if (ret == IDOK) myErrorMsg(wxT("CMessagesDialog => IDOK")); + else if (ret == IDCANCEL) myErrorMsg(wxT("CMessagesDialog => IDCANCEL")); + else myErrorMsg(wxT("CMessagesDialog => ?")); + +} + +void testCOverwriteDialog() +{ +SYSTEMTIME systemTime; +GetSystemTime( &systemTime ); + + +const wchar_t *existName = L"existName"; +FILETIME data_existTime; +FILETIME *existTime = &data_existTime ; +UInt64 data_existSize = 1234; +UInt64 *existSize = &data_existSize; +const wchar_t *newName = L"newName"; +FILETIME data_newTime; +FILETIME *newTime = &data_newTime; +UInt64 data_newSize = 45678; +UInt64 *newSize = &data_newSize; +Int32 data_answer=0; +Int32 *answer = &data_answer; + +SystemTimeToFileTime( &systemTime , &data_existTime); +SystemTimeToFileTime( &systemTime , &data_newTime); + + COverwriteDialog dialog; + + dialog.OldFileInfo.Time = *existTime; + dialog.OldFileInfo.TimeIsDefined = true; // FIXME : look again at the sample ! + + dialog.OldFileInfo.SizeIsDefined = (existSize != NULL); + if (dialog.OldFileInfo.SizeIsDefined) + dialog.OldFileInfo.Size = *existSize; + dialog.OldFileInfo.Name = existName; + + if (newTime == 0) + dialog.NewFileInfo.TimeIsDefined = false; + else + { + dialog.NewFileInfo.TimeIsDefined = true; + dialog.NewFileInfo.Time = *newTime; + } + + dialog.NewFileInfo.SizeIsDefined = (newSize != NULL); + if (dialog.NewFileInfo.SizeIsDefined) + dialog.NewFileInfo.Size = *newSize; + dialog.NewFileInfo.Name = newName; + + /* + NOverwriteDialog::NResult::EEnum writeAnswer = + NOverwriteDialog::Execute(oldFileInfo, newFileInfo); + */ + INT_PTR writeAnswer = dialog.Create(NULL); // ParentWindow doesn't work with 7z + + switch(writeAnswer) + { + case IDCANCEL: myErrorMsg(wxT("COverwriteDialog => IDCANCEL")); break; + case IDNO: myErrorMsg(wxT("COverwriteDialog => IDNO")); break; + case IDC_BUTTON_OVERWRITE_NO_TO_ALL: myErrorMsg(wxT("COverwriteDialog => IDC_BUTTON_OVERWRITE_NO_TO_ALL")); break; + case IDC_BUTTON_OVERWRITE_YES_TO_ALL:myErrorMsg(wxT("COverwriteDialog => IDC_BUTTON_OVERWRITE_YES_TO_ALL")); break; + case IDC_BUTTON_OVERWRITE_AUTO_RENAME:myErrorMsg(wxT("COverwriteDialog => IDC_BUTTON_OVERWRITE_AUTO_RENAME")); break; + case IDYES: myErrorMsg(wxT("COverwriteDialog => IDYES")); break; + default: myErrorMsg(wxT("COverwriteDialog => default")); break; + } +} + +void testCPasswordDialog() +{ + CPasswordDialog dialog; + + int ret = dialog.Create(0); + if (ret == IDOK) { + UString Password = dialog.Password; + UString msg = wxT("CPasswordDialog => IDOK password=\""); + msg += Password; + msg += wxT("\""); + myErrorMsg(msg); + } + else if (ret == IDCANCEL) myErrorMsg(wxT("CPasswordDialog => IDCANCEL")); + else myErrorMsg(wxT("CPasswordDialog => ?")); + +} + +struct CThreadProgressDialog +{ + CProgressDialog * ProgressDialog; + static THREAD_FUNC_DECL MyThreadFunction(void *param) + { + ((CThreadProgressDialog *)param)->Result = ((CThreadProgressDialog *)param)->Process(); + return 0; + } + HRESULT Result; + HRESULT Process() + { + Sleep(1000); + int total = 1000; + + ProgressDialog->ProgressSynch.SetTitleFileName(L"SetTitleFileName"); + ProgressDialog->ProgressSynch.SetNumFilesTotal(100); + ProgressDialog->ProgressSynch.SetNumFilesCur(1); + ProgressDialog->ProgressSynch.SetProgress(total, 0); + // ProgressDialog.ProgressSynch.SetRatioInfo(inSize, outSize); + // ProgressDialog.ProgressSynch.SetCurrentFileName(name); + + ProgressDialog->ProgressSynch.SetPos(total/10); + ProgressDialog->ProgressSynch.SetCurrentFileName(L"File1"); + Sleep(1000); + ProgressDialog->ProgressSynch.SetPos(total/2); + ProgressDialog->ProgressSynch.SetCurrentFileName(L"File2"); + Sleep(1000); + ProgressDialog->ProgressSynch.SetPos(total); + ProgressDialog->ProgressSynch.SetCurrentFileName(L"File3"); + Sleep(1000); + ProgressDialog->MyClose(); + return 0; + } +}; + +void testCProgressDialog() +{ + CProgressDialog ProgressDialog; + + CThreadProgressDialog benchmarker; + benchmarker.ProgressDialog = &ProgressDialog; + NWindows::CThread thread; + thread.Create(CThreadProgressDialog::MyThreadFunction, &benchmarker); + + // void StartProgressDialog(const UString &title) + int ret = ProgressDialog.Create(L"testCProgressDialog", 0); + + if (ret == IDOK) myErrorMsg(wxT("CProgressDialog => IDOK")); + else if (ret == IDCANCEL) myErrorMsg(wxT("CProgressDialog => IDCANCEL")); + else myErrorMsg(wxT("CProgressDialog => ?")); + +} + +void testDialog(int num) +{ + NWindows::NControl::CModalDialog dialog; + + printf("Generic Dialog(%d)\n",num); + int ret = dialog.Create(num, 0); + if (ret == IDOK) myErrorMsg(wxT("Generic Dialog => IDOK")); + else if (ret == IDCANCEL) myErrorMsg(wxT("Generic Dialog => IDCANCEL")); + else myErrorMsg(wxT("Generic Dialog => ?")); +} + +void testMessageBox() +{ + int ret = MessageBoxW(0, L"test yes/no/cancel", + L"7-Zip", MB_YESNOCANCEL | MB_ICONQUESTION | MB_TASKMODAL); + if (ret == IDYES) myErrorMsg(wxT("MessageBoxW => IDYES")); + else if (ret == IDNO) myErrorMsg(wxT("MessageBoxW => IDNO")); + else if (ret == IDCANCEL) myErrorMsg(wxT("MessageBoxW => IDCANCEL")); + else myErrorMsg(wxT("MessageBoxW => ?")); +} + +static void testRegistry() +{ + SaveRegLang(L"fr"); + + UString langFile; + ReadRegLang(langFile); + + printf("testRegistry : -%ls-\n",(const wchar_t *)langFile); +} + + +int Main2(int argc,TCHAR **argv); + +int Main3(int argc,wxChar **argv) +{ + testRegistry(); + + int num = -1; + + if (argc >=2 ) + { + num = argv[1][0] - L'0'; + } + printf("num=%d\n",num); + + + switch(num) + { + case 0: + { + TCHAR **argv2 = (TCHAR **)calloc(argc,sizeof(*argv)); + + argv2[0] = argv[0]; + for(int i = 2; i < argc; i++) argv2[i-1] = argv[i]; + + return Main2(argc-1,argv2); + } + // TODO Benchmark + // TODO CCompressDialog + // TODO CExtractDialog ? + case 1 : testCMessagesDialog(); break; + case 2 : testCOverwriteDialog(); break; + case 3 : testCPasswordDialog(); break; + case 4 : testCProgressDialog(); break; + case 5 : testMessageBox(); break; + case 9 : + if (argc >= 3) + { + AString str = GetAnsiString(argv[2]); + int num = atoi((const char*)str); + testDialog(num); + } + else + { + printf("usage : 7zG 9 \n"); + } + break; + default : + printf("usage : 7zG number\n"); + + }; + + return 0; +} + +#endif // ACTIVATE_DIALOG_TESTS + +static const TCHAR *kCUBasePath = TEXT("Software/7-ZIP"); +static const WCHAR *kLangValueName = L"Lang"; + +void SaveRegLang(const UString &langFile) +{ + CKey key; + key.Create(HKEY_CURRENT_USER, kCUBasePath); + key.SetValue(kLangValueName, langFile); +} + +void ReadRegLang(UString &langFile) +{ + langFile.Empty(); + CKey key; + if (key.Open(HKEY_CURRENT_USER, kCUBasePath, KEY_READ) == ERROR_SUCCESS) + key.QueryValue(kLangValueName, langFile); +} + + +////////////////////////////////// + +#define NEED_NAME_WINDOWS_TO_UNIX +#include "myPrivate.h" // global_use_utf16_conversion + +void mySplitCommandLineW(int numArguments, TCHAR **arguments,UStringVector &parts) { + + parts.Clear(); + for(int ind=0;ind < numArguments; ind++) { + UString tmp = arguments[ind]; + // tmp.Trim(); " " is a valid filename ... + if (!tmp.IsEmpty()) { + parts.Add(tmp); +// DEBUG printf("ARG %d : '%ls'\n",ind,(const wchar_t *)tmp); + } + } +} + +// ---------------------------------------------------------------------------- +// private classes +// ---------------------------------------------------------------------------- + +// Define a new frame type +class MyFrame: public wxFrame +{ +public: + // ctor + MyFrame(wxFrame *frame, const wxString& title, int x, int y, int w, int h); + // virtual ~MyFrame(); + + // operations + void WriteText(const wxString& text) { m_txtctrl->WriteText(text); } + +protected: + // callbacks + void OnWorkerEvent(wxCommandEvent& event); +private: + // just some place to put our messages in + wxTextCtrl *m_txtctrl; + DECLARE_EVENT_TABLE() +}; + +BEGIN_EVENT_TABLE(MyFrame, wxFrame) + EVT_MENU(WORKER_EVENT, MyFrame::OnWorkerEvent) + // EVT_IDLE(MyFrame::OnIdle) +END_EVENT_TABLE() + +// My frame constructor +MyFrame::MyFrame(wxFrame *frame, const wxString& title, + int x, int y, int w, int h) + : wxFrame(frame, wxID_ANY, title, wxPoint(x, y), wxSize(w, h)) +{ + this->SetIcon(wxICON(p7zip_32)); + +#if wxUSE_STATUSBAR + CreateStatusBar(2); +#endif // wxUSE_STATUSBAR + + m_txtctrl = new wxTextCtrl(this, wxID_ANY, _T(""), wxPoint(0, 0), wxSize(0, 0), wxTE_MULTILINE | wxTE_READONLY); +} + +void myCreateHandle(int n); +wxWindow * g_window=0; + +void MyFrame::OnWorkerEvent(wxCommandEvent& event) +{ + int n = event.GetInt(); + myCreateHandle(n); +} + + +// Define a new application type, each program should derive a class from wxApp +class MyApp : public wxApp +{ +public: + // override base class virtuals + // ---------------------------- + + // this one is called on application startup and is a good place for the app + // initialization (doing it here and not in the ctor allows to have an error + // return: if OnInit() returns false, the application terminates) + virtual bool OnInit(); +}; + +// Create a new application object: this macro will allow wxWidgets to create +// the application object during program execution (it's better than using a +// static object for many reasons) and also implements the accessor function +// wxGetApp() which will return the reference of the right type (i.e. MyApp and +// not wxApp) +IMPLEMENT_APP(MyApp) + + + +time_t g_T0 = 0; + +/* FIXME : to erase ? +class MyThread : public wxThread +{ + int _argc; + TCHAR **_argv; +public: + MyThread(int argc,TCHAR **argv): wxThread(),_argc(argc), _argv(argv) {} + + // thread execution starts here + virtual void *Entry() + { +#ifdef ACTIVATE_DIALOG_TESTS + int ret = Main3(_argc,_argv); +#else + int ret = Main1(_argc,_argv); +#endif + exit(ret); + } +}; +*/ + +// 'Main program' equivalent: the program execution "starts" here +bool MyApp::OnInit() +{ + // don't parse the command-line options ! + // : if ( !wxApp::OnInit() ) return false; + +#ifdef __WXMAC__ +ProcessSerialNumber PSN; +GetCurrentProcess(&PSN); +TransformProcessType(&PSN,kProcessTransformToForegroundApplication); +#endif + + + g_main_thread = pthread_self(); + + { // define P7ZIP_HOME_DIR + extern void my_windows_split_path(const AString &p_path, AString &dir , AString &base); + static char p7zip_home_dir[MAX_PATH]; + + UString fullPath; + NDirectory::MyGetFullPathName(wxApp::argv[0], fullPath); + AString afullPath = GetAnsiString(fullPath); + + AString dir,name; + + my_windows_split_path(afullPath,dir,name); + + const char *dir2 = nameWindowToUnix((const char *)dir); + snprintf(p7zip_home_dir,sizeof(p7zip_home_dir),"P7ZIP_HOME_DIR=%s/",dir2); + p7zip_home_dir[sizeof(p7zip_home_dir)-1] = 0; + putenv(p7zip_home_dir); + // DEBUG printf("putenv(%s)\n",p7zip_home_dir); + } + global_use_utf16_conversion = 1; // UNICODE ! + + g_T0 = time(0); + // DEBUG printf("MAIN Thread : 0x%lx\n",wxThread::GetCurrentId()); + + // Create the main frame window + MyFrame *frame = new MyFrame((wxFrame *)NULL, _T("7-zip Main Window"), 50, 50, 450, 340); + // Don't Show the frame ! + // frame->Show(true); + + g_window = frame; + + SetTopWindow(frame); + +/* FIXME ? + MyThread *thread = new MyThread(wxApp::argc,wxApp::argv); + thread->Create(); // != wxTHREAD_NO_ERROR + thread->Run(); + + // success: wxApp::OnRun() will be called which will enter the main message + // loop and the application will run. If we returned false here, the + // application would exit immediately. + return true; +*/ + + int ret = Main1(wxApp::argc,wxApp::argv); + + exit(ret); + + return false; +} + +DWORD WINAPI GetTickCount(VOID) { + static wxStopWatch sw; + return sw.Time(); +} + +////////////////////////////////////////// + +#include "resource2.h" +#include "ExtractRes.h" + +static CStringTable g_stringTable[] = +{ + /* resource.rc */ + /***************/ + + { IDS_PROGRESS_COMPRESSING, L"Compressing" }, + { IDS_PROGRESS_TESTING, L"Testing" }, + { IDS_MESSAGE_NO_ERRORS, L"There are no errors" }, + { IDS_FILES_COLON, L"Files:" }, + { IDS_FOLDERS_COLON, L"Folders:" }, + { IDS_SIZE_COLON, L"Size:" }, + { IDS_COMPRESSED_COLON, L"Compressed size:" }, + { IDS_ARCHIVES_COLON, L"Archives:" }, + + /* Extract.rc */ + /**************/ + { IDS_CANNOT_CREATE_FOLDER , L"Cannot create folder '{0}'"}, + { IDS_OPEN_IS_NOT_SUPORTED_ARCHIVE, L"File is not supported archive."}, + + { IDS_MESSAGES_DIALOG_EXTRACT_MESSAGE_CRC , L"CRC failed in '{0}'. File is broken."}, + { IDS_MESSAGES_DIALOG_EXTRACT_MESSAGE_DATA_ERROR , L"Data error in '{0}'. File is broken"}, + { IDS_MESSAGES_DIALOG_EXTRACT_MESSAGE_UNSUPPORTED_METHOD , L"Unsupported compression method for '{0}'."}, + { IDS_MESSAGES_DIALOG_EXTRACT_MESSAGE_CRC_ENCRYPTED , L"CRC failed in encrypted file '{0}'. Wrong password?"}, + { IDS_MESSAGES_DIALOG_EXTRACT_MESSAGE_DATA_ERROR_ENCRYPTED , L"Data error in encrypted file '{0}'. Wrong password?"}, + + { IDS_EXTRACT_SET_FOLDER , L"Specify a location for extracted files."}, + { IDS_MESSAGES_DIALOG_EXTRACT_MESSAGE_CANNOT_OPEN_FILE, L"Can not open output file '{0}'."}, + { IDS_PROGRESS_EXTRACTING, L"Extracting" }, + + { IDS_CANT_OPEN_ARCHIVE , L"Can not open file '{0}' as archive"}, + { IDS_CANT_OPEN_ENCRYPTED_ARCHIVE , L"Can not open encrypted archive '{0}'. Wrong password?"}, + + { 0 , 0 } +}; + +REGISTER_STRINGTABLE(g_stringTable) + diff --git a/CPP/7zip/UI/P7ZIP/FileDir.o b/CPP/7zip/UI/P7ZIP/FileDir.o new file mode 100644 index 0000000..804bafd Binary files /dev/null and b/CPP/7zip/UI/P7ZIP/FileDir.o differ diff --git a/CPP/7zip/UI/P7ZIP/FileFind.o b/CPP/7zip/UI/P7ZIP/FileFind.o new file mode 100644 index 0000000..8bcae57 Binary files /dev/null and b/CPP/7zip/UI/P7ZIP/FileFind.o differ diff --git a/CPP/7zip/UI/P7ZIP/IntToString.o b/CPP/7zip/UI/P7ZIP/IntToString.o new file mode 100644 index 0000000..32a7c49 Binary files /dev/null and b/CPP/7zip/UI/P7ZIP/IntToString.o differ diff --git a/CPP/7zip/UI/P7ZIP/MyString.o b/CPP/7zip/UI/P7ZIP/MyString.o new file mode 100644 index 0000000..0be0aa2 Binary files /dev/null and b/CPP/7zip/UI/P7ZIP/MyString.o differ diff --git a/CPP/7zip/UI/P7ZIP/MyVector.o b/CPP/7zip/UI/P7ZIP/MyVector.o new file mode 100644 index 0000000..8990ef7 Binary files /dev/null and b/CPP/7zip/UI/P7ZIP/MyVector.o differ diff --git a/CPP/7zip/UI/P7ZIP/StringConvert.o b/CPP/7zip/UI/P7ZIP/StringConvert.o new file mode 100644 index 0000000..b2381b8 Binary files /dev/null and b/CPP/7zip/UI/P7ZIP/StringConvert.o differ diff --git a/CPP/7zip/UI/P7ZIP/Threads.o b/CPP/7zip/UI/P7ZIP/Threads.o new file mode 100644 index 0000000..11e1a93 Binary files /dev/null and b/CPP/7zip/UI/P7ZIP/Threads.o differ diff --git a/CPP/7zip/UI/P7ZIP/makefile b/CPP/7zip/UI/P7ZIP/makefile new file mode 100644 index 0000000..d5c0526 --- /dev/null +++ b/CPP/7zip/UI/P7ZIP/makefile @@ -0,0 +1,27 @@ +PROG=../../../../bin/p7zip$(BINSUFFIX) + +LOCAL_FLAGS=\ + -DUNICODE -D_UNICODE \ + -I. \ + `wx-config --unicode=yes --cxxflags` + +include ../../../../makefile.crc32 +include ../../../../makefile.machine + +PCH_NAME=$(PRE_COMPILED_HEADER) + +LIBS=`wx-config --unicode=yes --libs` $(LOCAL_LIBS_DLL) + +OBJS=\ + FileDir.o \ + FileFind.o \ + MyString.o \ + MyVector.o \ + IntToString.o \ +StringConvert.o \ +wine_date_and_time.o \ +Threads.o \ + wxP7ZIP.o + +include ../../../../makefile.glb + diff --git a/CPP/7zip/UI/P7ZIP/makefile.depend b/CPP/7zip/UI/P7ZIP/makefile.depend new file mode 100644 index 0000000..af1da14 --- /dev/null +++ b/CPP/7zip/UI/P7ZIP/makefile.depend @@ -0,0 +1,180 @@ +wxP7ZIP.o: wxP7ZIP.cpp ../../../myWindows/StdAfx.h \ + ../../../myWindows/config.h ../../../Common/MyWindows.h \ + ../../../Common/MyGuidDef.h ../../../Common/Types.h \ + ../../../Common/../../C/Types.h ../../../Common/Types.h \ + ../../../include_windows/windows.h ../../../Common/MyWindows.h \ + ../../../include_windows/basetyps.h ../../../include_windows/tchar.h \ + /usr/include/wx-2.8/wx/wxprec.h /usr/include/wx-2.8/wx/defs.h \ + /usr/include/wx-2.8/wx/platform.h \ + /usr/lib/wx/include/mac-unicode-debug-2.8/wx/setup.h \ + /usr/include/wx-2.8/wx/chkconf.h /usr/include/wx-2.8/wx/mac/chkconf.h \ + /usr/include/wx-2.8/wx/mac/carbon/chkconf.h \ + /usr/include/wx-2.8/wx/features.h /usr/include/wx-2.8/wx/version.h \ + /usr/include/wx-2.8/wx/cpp.h /usr/include/wx-2.8/wx/dlimpexp.h \ + /usr/include/wx-2.8/wx/debug.h /usr/include/wx-2.8/wx/wxchar.h \ + /usr/include/wx-2.8/wx/wx.h /usr/include/wx-2.8/wx/object.h \ + /usr/include/wx-2.8/wx/memory.h /usr/include/wx-2.8/wx/string.h \ + /usr/include/wx-2.8/wx/buffer.h /usr/include/wx-2.8/wx/strconv.h \ + /usr/include/wx-2.8/wx/fontenc.h /usr/include/wx-2.8/wx/msgout.h \ + /usr/include/wx-2.8/wx/dynarray.h /usr/include/wx-2.8/wx/list.h \ + /usr/include/wx-2.8/wx/hash.h /usr/include/wx-2.8/wx/hashmap.h \ + /usr/include/wx-2.8/wx/arrstr.h /usr/include/wx-2.8/wx/intl.h \ + /usr/include/wx-2.8/wx/log.h /usr/include/wx-2.8/wx/iosfwrap.h \ + /usr/include/wx-2.8/wx/generic/logg.h /usr/include/wx-2.8/wx/event.h \ + /usr/include/wx-2.8/wx/clntdata.h /usr/include/wx-2.8/wx/vector.h \ + /usr/include/wx-2.8/wx/gdicmn.h /usr/include/wx-2.8/wx/math.h \ + /usr/include/wx-2.8/wx/cursor.h /usr/include/wx-2.8/wx/mac/cursor.h \ + /usr/include/wx-2.8/wx/mac/carbon/cursor.h \ + /usr/include/wx-2.8/wx/bitmap.h /usr/include/wx-2.8/wx/colour.h \ + /usr/include/wx-2.8/wx/gdiobj.h /usr/include/wx-2.8/wx/variant.h \ + /usr/include/wx-2.8/wx/datetime.h /usr/include/wx-2.8/wx/longlong.h \ + /usr/include/wx-2.8/wx/mac/colour.h \ + /usr/include/wx-2.8/wx/mac/carbon/colour.h \ + /usr/include/wx-2.8/wx/object.h /usr/include/wx-2.8/wx/string.h \ + /usr/include/wx-2.8/wx/mac/bitmap.h \ + /usr/include/wx-2.8/wx/mac/carbon/bitmap.h \ + /usr/include/wx-2.8/wx/palette.h /usr/include/wx-2.8/wx/mac/palette.h \ + /usr/include/wx-2.8/wx/mac/carbon/palette.h \ + /usr/include/wx-2.8/wx/colour.h /usr/include/wx-2.8/wx/gdiobj.h \ + /usr/include/wx-2.8/wx/utils.h /usr/include/wx-2.8/wx/filefn.h \ + /usr/include/wx-2.8/wx/platinfo.h /usr/include/wx-2.8/wx/thread.h \ + /usr/include/wx-2.8/wx/app.h /usr/include/wx-2.8/wx/build.h \ + /usr/include/wx-2.8/wx/init.h /usr/include/wx-2.8/wx/mac/app.h \ + /usr/include/wx-2.8/wx/mac/carbon/app.h /usr/include/wx-2.8/wx/defs.h \ + /usr/include/wx-2.8/wx/gdicmn.h /usr/include/wx-2.8/wx/event.h \ + /usr/include/wx-2.8/wx/stream.h /usr/include/wx-2.8/wx/stopwatch.h \ + /usr/include/wx-2.8/wx/module.h /usr/include/wx-2.8/wx/window.h \ + /usr/include/wx-2.8/wx/font.h /usr/include/wx-2.8/wx/mac/font.h \ + /usr/include/wx-2.8/wx/mac/carbon/font.h \ + /usr/include/wx-2.8/wx/region.h /usr/include/wx-2.8/wx/mac/region.h \ + /usr/include/wx-2.8/wx/mac/carbon/region.h \ + /usr/include/wx-2.8/wx/list.h /usr/include/wx-2.8/wx/validate.h \ + /usr/include/wx-2.8/wx/palette.h /usr/include/wx-2.8/wx/accel.h \ + /usr/include/wx-2.8/wx/mac/accel.h \ + /usr/include/wx-2.8/wx/mac/carbon/accel.h \ + /usr/include/wx-2.8/wx/mac/window.h \ + /usr/include/wx-2.8/wx/mac/carbon/window.h \ + /usr/include/wx-2.8/wx/brush.h /usr/include/wx-2.8/wx/mac/brush.h \ + /usr/include/wx-2.8/wx/mac/carbon/brush.h /usr/include/wx-2.8/wx/dc.h \ + /usr/include/wx-2.8/wx/bitmap.h /usr/include/wx-2.8/wx/brush.h \ + /usr/include/wx-2.8/wx/pen.h /usr/include/wx-2.8/wx/mac/pen.h \ + /usr/include/wx-2.8/wx/mac/carbon/pen.h /usr/include/wx-2.8/wx/mac/dc.h \ + /usr/include/wx-2.8/wx/mac/carbon/dc.h /usr/include/wx-2.8/wx/pen.h \ + /usr/include/wx-2.8/wx/icon.h /usr/include/wx-2.8/wx/iconloc.h \ + /usr/include/wx-2.8/wx/mac/icon.h \ + /usr/include/wx-2.8/wx/mac/carbon/icon.h /usr/include/wx-2.8/wx/font.h \ + /usr/include/wx-2.8/wx/dcgraph.h /usr/include/wx-2.8/wx/geometry.h \ + /usr/include/wx-2.8/wx/graphics.h /usr/include/wx-2.8/wx/containr.h \ + /usr/include/wx-2.8/wx/panel.h /usr/include/wx-2.8/wx/generic/panelg.h \ + /usr/include/wx-2.8/wx/window.h /usr/include/wx-2.8/wx/containr.h \ + /usr/include/wx-2.8/wx/toplevel.h /usr/include/wx-2.8/wx/iconbndl.h \ + /usr/include/wx-2.8/wx/mac/toplevel.h \ + /usr/include/wx-2.8/wx/mac/carbon/toplevel.h \ + /usr/include/wx-2.8/wx/frame.h /usr/include/wx-2.8/wx/mac/frame.h \ + /usr/include/wx-2.8/wx/mac/carbon/frame.h \ + /usr/include/wx-2.8/wx/window.h /usr/include/wx-2.8/wx/toolbar.h \ + /usr/include/wx-2.8/wx/tbarbase.h /usr/include/wx-2.8/wx/control.h \ + /usr/include/wx-2.8/wx/mac/control.h \ + /usr/include/wx-2.8/wx/mac/carbon/control.h \ + /usr/include/wx-2.8/wx/mac/toolbar.h \ + /usr/include/wx-2.8/wx/mac/carbon/toolbar.h \ + /usr/include/wx-2.8/wx/tbarbase.h /usr/include/wx-2.8/wx/dynarray.h \ + /usr/include/wx-2.8/wx/accel.h /usr/include/wx-2.8/wx/image.h \ + /usr/include/wx-2.8/wx/imagbmp.h /usr/include/wx-2.8/wx/imagpng.h \ + /usr/include/wx-2.8/wx/imaggif.h /usr/include/wx-2.8/wx/imagpcx.h \ + /usr/include/wx-2.8/wx/imagjpeg.h /usr/include/wx-2.8/wx/imagtga.h \ + /usr/include/wx-2.8/wx/imagtiff.h /usr/include/wx-2.8/wx/imagpnm.h \ + /usr/include/wx-2.8/wx/imagxpm.h /usr/include/wx-2.8/wx/imagiff.h \ + /usr/include/wx-2.8/wx/dc.h /usr/include/wx-2.8/wx/dcclient.h \ + /usr/include/wx-2.8/wx/mac/dcclient.h \ + /usr/include/wx-2.8/wx/mac/carbon/dcclient.h \ + /usr/include/wx-2.8/wx/dcmemory.h /usr/include/wx-2.8/wx/mac/dcmemory.h \ + /usr/include/wx-2.8/wx/mac/carbon/dcmemory.h \ + /usr/include/wx-2.8/wx/dcclient.h /usr/include/wx-2.8/wx/dcprint.h \ + /usr/include/wx-2.8/wx/mac/dcprint.h \ + /usr/include/wx-2.8/wx/mac/carbon/dcprint.h \ + /usr/include/wx-2.8/wx/cmndata.h /usr/include/wx-2.8/wx/encinfo.h \ + /usr/include/wx-2.8/wx/dcscreen.h /usr/include/wx-2.8/wx/mac/dcscreen.h \ + /usr/include/wx-2.8/wx/mac/carbon/dcscreen.h \ + /usr/include/wx-2.8/wx/button.h /usr/include/wx-2.8/wx/mac/button.h \ + /usr/include/wx-2.8/wx/mac/carbon/button.h \ + /usr/include/wx-2.8/wx/control.h /usr/include/wx-2.8/wx/menuitem.h \ + /usr/include/wx-2.8/wx/mac/menuitem.h \ + /usr/include/wx-2.8/wx/mac/carbon/menuitem.h \ + /usr/include/wx-2.8/wx/menu.h /usr/include/wx-2.8/wx/mac/menu.h \ + /usr/include/wx-2.8/wx/mac/carbon/menu.h \ + /usr/include/wx-2.8/wx/arrstr.h /usr/include/wx-2.8/wx/icon.h \ + /usr/include/wx-2.8/wx/dialog.h /usr/include/wx-2.8/wx/mac/dialog.h \ + /usr/include/wx-2.8/wx/mac/carbon/dialog.h \ + /usr/include/wx-2.8/wx/panel.h /usr/include/wx-2.8/wx/timer.h \ + /usr/include/wx-2.8/wx/mac/timer.h \ + /usr/include/wx-2.8/wx/mac/carbon/timer.h \ + /usr/include/wx-2.8/wx/mac/macnotfy.h \ + /usr/include/wx-2.8/wx/mac/carbon/macnotfy.h \ + /usr/include/wx-2.8/wx/settings.h /usr/include/wx-2.8/wx/msgdlg.h \ + /usr/include/wx-2.8/wx/mac/msgdlg.h \ + /usr/include/wx-2.8/wx/mac/carbon/msgdlg.h \ + /usr/include/wx-2.8/wx/dialog.h /usr/include/wx-2.8/wx/cmndata.h \ + /usr/include/wx-2.8/wx/dataobj.h /usr/include/wx-2.8/wx/mac/dataform.h \ + /usr/include/wx-2.8/wx/mac/carbon/dataform.h \ + /usr/include/wx-2.8/wx/mac/dataobj.h \ + /usr/include/wx-2.8/wx/mac/carbon/dataobj.h \ + /usr/include/wx-2.8/wx/mac/dataobj2.h \ + /usr/include/wx-2.8/wx/mac/carbon/dataobj2.h \ + /usr/include/wx-2.8/wx/ctrlsub.h /usr/include/wx-2.8/wx/bmpbuttn.h \ + /usr/include/wx-2.8/wx/mac/bmpbuttn.h \ + /usr/include/wx-2.8/wx/mac/carbon/bmpbuttn.h \ + /usr/include/wx-2.8/wx/button.h /usr/include/wx-2.8/wx/checkbox.h \ + /usr/include/wx-2.8/wx/mac/checkbox.h \ + /usr/include/wx-2.8/wx/mac/carbon/checkbox.h \ + /usr/include/wx-2.8/wx/checklst.h /usr/include/wx-2.8/wx/listbox.h \ + /usr/include/wx-2.8/wx/mac/listbox.h \ + /usr/include/wx-2.8/wx/mac/carbon/listbox.h \ + /usr/include/wx-2.8/wx/mac/checklst.h \ + /usr/include/wx-2.8/wx/mac/carbon/checklst.h \ + /usr/include/wx-2.8/wx/choice.h /usr/include/wx-2.8/wx/mac/choice.h \ + /usr/include/wx-2.8/wx/mac/carbon/choice.h \ + /usr/include/wx-2.8/wx/scrolbar.h /usr/include/wx-2.8/wx/mac/scrolbar.h \ + /usr/include/wx-2.8/wx/mac/carbon/scrolbar.h \ + /usr/include/wx-2.8/wx/stattext.h /usr/include/wx-2.8/wx/mac/stattext.h \ + /usr/include/wx-2.8/wx/mac/carbon/stattext.h \ + /usr/include/wx-2.8/wx/statbmp.h /usr/include/wx-2.8/wx/mac/statbmp.h \ + /usr/include/wx-2.8/wx/mac/carbon/statbmp.h \ + /usr/include/wx-2.8/wx/statbox.h /usr/include/wx-2.8/wx/mac/statbox.h \ + /usr/include/wx-2.8/wx/mac/carbon/statbox.h \ + /usr/include/wx-2.8/wx/radiobox.h /usr/include/wx-2.8/wx/mac/radiobox.h \ + /usr/include/wx-2.8/wx/mac/carbon/radiobox.h \ + /usr/include/wx-2.8/wx/radiobut.h /usr/include/wx-2.8/wx/mac/radiobut.h \ + /usr/include/wx-2.8/wx/mac/carbon/radiobut.h \ + /usr/include/wx-2.8/wx/textctrl.h /usr/include/wx-2.8/wx/mac/textctrl.h \ + /usr/include/wx-2.8/wx/mac/carbon/textctrl.h \ + /usr/include/wx-2.8/wx/textctrl.h /usr/include/wx-2.8/wx/slider.h \ + /usr/include/wx-2.8/wx/mac/slider.h \ + /usr/include/wx-2.8/wx/mac/carbon/slider.h \ + /usr/include/wx-2.8/wx/slider.h /usr/include/wx-2.8/wx/stattext.h \ + /usr/include/wx-2.8/wx/gauge.h /usr/include/wx-2.8/wx/mac/gauge.h \ + /usr/include/wx-2.8/wx/mac/carbon/gauge.h \ + /usr/include/wx-2.8/wx/scrolwin.h /usr/include/wx-2.8/wx/dirdlg.h \ + /usr/include/wx-2.8/wx/mac/dirdlg.h \ + /usr/include/wx-2.8/wx/mac/carbon/dirdlg.h \ + /usr/include/wx-2.8/wx/toolbar.h /usr/include/wx-2.8/wx/combobox.h \ + /usr/include/wx-2.8/wx/mac/combobox.h \ + /usr/include/wx-2.8/wx/mac/carbon/combobox.h \ + /usr/include/wx-2.8/wx/containr.h /usr/include/wx-2.8/wx/choice.h \ + /usr/include/wx-2.8/wx/layout.h /usr/include/wx-2.8/wx/sizer.h \ + /usr/include/wx-2.8/wx/mdi.h /usr/include/wx-2.8/wx/mac/mdi.h \ + /usr/include/wx-2.8/wx/mac/carbon/mdi.h /usr/include/wx-2.8/wx/frame.h \ + /usr/include/wx-2.8/wx/statusbr.h \ + /usr/include/wx-2.8/wx/generic/statusbr.h /usr/include/wx-2.8/wx/defs.h \ + /usr/include/wx-2.8/wx/pen.h /usr/include/wx-2.8/wx/arrstr.h \ + /usr/include/wx-2.8/wx/mac/statusbr.h \ + /usr/include/wx-2.8/wx/mac/carbon/statusbr.h \ + /usr/include/wx-2.8/wx/choicdlg.h \ + /usr/include/wx-2.8/wx/generic/choicdgg.h \ + /usr/include/wx-2.8/wx/dynarray.h /usr/include/wx-2.8/wx/dialog.h \ + /usr/include/wx-2.8/wx/textdlg.h \ + /usr/include/wx-2.8/wx/generic/textdlgg.h \ + /usr/include/wx-2.8/wx/valtext.h /usr/include/wx-2.8/wx/filedlg.h \ + /usr/include/wx-2.8/wx/mac/filedlg.h \ + /usr/include/wx-2.8/wx/mac/carbon/filedlg.h \ + /usr/include/wx-2.8/wx/valtext.h diff --git a/CPP/7zip/UI/P7ZIP/makefile.list b/CPP/7zip/UI/P7ZIP/makefile.list new file mode 100644 index 0000000..68db51a --- /dev/null +++ b/CPP/7zip/UI/P7ZIP/makefile.list @@ -0,0 +1,10 @@ +SRCS=\ + wxP7ZIP.cpp + + +SRCS_C= + +include ../../../../makefile.rules + +wxP7ZIP.o : wxP7ZIP.cpp + $(CXX) $(CXXFLAGS) wxP7ZIP.cpp diff --git a/CPP/7zip/UI/P7ZIP/wine_date_and_time.o b/CPP/7zip/UI/P7ZIP/wine_date_and_time.o new file mode 100644 index 0000000..149daf3 Binary files /dev/null and b/CPP/7zip/UI/P7ZIP/wine_date_and_time.o differ diff --git a/CPP/7zip/UI/P7ZIP/wxP7ZIP.cpp b/CPP/7zip/UI/P7ZIP/wxP7ZIP.cpp new file mode 100644 index 0000000..63bd965 --- /dev/null +++ b/CPP/7zip/UI/P7ZIP/wxP7ZIP.cpp @@ -0,0 +1,371 @@ +// wxFM.cpp + +#include "StdAfx.h" + +// For compilers that support precompilation, includes "wx/wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +// for all others, include the necessary headers (this file is usually all you +// need because it includes almost all "standard" wxWidgets headers) +#ifndef WX_PRECOMP + #include "wx/wx.h" +#endif + +#include "wx/dnd.h" + +#undef _WIN32 + +#ifdef __WXMAC__ + +#define UInt32 max_UInt32 +#include +#undef UInt32 + +#endif + +#include "Common/StringConvert.h" +#include "Windows/FileDir.h" + +#define NEED_NAME_WINDOWS_TO_UNIX +#include "myPrivate.h" // global_use_utf16_conversion + +using namespace NWindows; +using namespace NFile; + + +/////////////////////////////////////////// + +static LPCWSTR kArchiveNoNameSwitch = L" -an"; + +HRESULT MyCreateProcess(const UString ¶ms,LPCWSTR curDir, bool waitFinish) +{ + printf("MyCreateProcess: waitFinish=%d\n",(unsigned)waitFinish); + printf("\tparams : %ls\n",(const wchar_t*)params); + + printf("\tcurDir : %ls\n",(const wchar_t*)curDir); + + wxString cmd(params); + wxString memoCurDir = wxGetCwd(); + + if (curDir) { // FIXME + wxSetWorkingDirectory(wxString(curDir)); + } + + printf("MyCreateProcess: cmd='%ls'\n",(const wchar_t *)cmd); + long pid = 0; + if (waitFinish) pid = wxExecute(cmd, wxEXEC_SYNC); // FIXME process never ends and stays zombie ... + else pid = wxExecute(cmd, wxEXEC_ASYNC); + + if (curDir) { + wxSetWorkingDirectory(memoCurDir); + } + + // FIXME if (pid == 0) return E_FAIL; + + return S_OK; +} + + + +static HRESULT ExtractGroupCommand(const UStringVector &archivePaths, + const UString ¶ms) +{ + UString params2 = params; +// AddLagePagesSwitch(params2); + params2 += kArchiveNoNameSwitch; + + + char tempFile[256]; + static int count = 1000; + + sprintf(tempFile,"/tmp/7zExtract_%d_%d.tmp",(int)getpid(),count++); + + FILE * file = fopen(tempFile,"w"); + if (file) + { + for (int i = 0; i < archivePaths.Size(); i++) { + fprintf(file,"%ls\n",(const wchar_t *)archivePaths[i]); + printf(" TMP_%d : '%ls'\n",i,(const wchar_t *)archivePaths[i]); + } + + fclose(file); + } + params2 += L" -ai@"; + params2 += GetUnicodeString(tempFile); + printf("ExtractGroupCommand : -%ls-\n",(const wchar_t *)params2); + HRESULT res = MyCreateProcess(params2, 0, true); + printf("ExtractGroupCommand : END\n"); + + remove(tempFile); + + return res; +} + + +HRESULT TestArchives(const UStringVector &archivePaths) +{ + UString params; + params = L"/Users/me/P7ZIP/bin/7zG"; // Get7zGuiPath(); + params += L" t"; + return ExtractGroupCommand(archivePaths, params); +} + +// Define a new application type, each program should derive a class from wxApp +class MyApp : public wxApp +{ +public: + virtual bool OnInit(); +}; + +// Create a new application object: this macro will allow wxWidgets to create +// the application object during program execution (it's better than using a +// static object for many reasons) and also implements the accessor function +// wxGetApp() which will return the reference of the right type (i.e. MyApp and +// not wxApp) +IMPLEMENT_APP(MyApp) + + +class DnDFile : public wxFileDropTarget +{ +public: + DnDFile(wxListBox *pOwner) { m_pOwner = pOwner; } + + virtual bool OnDropFiles(wxCoord x, wxCoord y, + const wxArrayString& filenames); + +private: + wxListBox *m_pOwner; +}; + + + + +bool DnDFile::OnDropFiles(wxCoord, wxCoord, const wxArrayString& filenames) +{ + size_t nFiles = filenames.GetCount(); + wxString str; + str.Printf( _T("%d files dropped"), (int)nFiles); + m_pOwner->Append(str); + + UStringVector archivePaths; + + for ( size_t n = 0; n < nFiles; n++ ) + { + // m_pOwner->Append(filenames[n]); +/* + if (wxFile::Exists(filenames[n])) + m_pOwner->Append(wxT(" This file exists.") ); + else + m_pOwner->Append(wxT(" This file doesn't exist.") ); +*/ + // cmd = cmd + _T(" \"") + filenames[n] + _T("\""); + const wchar_t * wx = filenames[n].wc_str (); + archivePaths.Add(wx); + } + + /* + m_pOwner->Append(cmd); + + + long pid = 0; + + pid = wxExecute(cmd, wxEXEC_ASYNC); + */ + + TestArchives(archivePaths); + + return true; +} + +////////////////// + +class DnDFrame : public wxFrame +{ +public: + DnDFrame(wxFrame *frame, const wxChar *title, int x, int y, int w, int h); + virtual ~DnDFrame(); + + void OnQuit(wxCommandEvent& event); + + DECLARE_EVENT_TABLE() + +// private: +public: + // GUI controls + wxListBox *m_ctrlFile; + +}; + +enum +{ + Menu_Quit = 1, + Menu_Drag, + Menu_DragMoveDef, + Menu_DragMoveAllow, + Menu_NewFrame, + Menu_About = 101, + Menu_OpenFile, + Menu_Help, + Menu_Clear, + Menu_Copy, + Menu_Paste, + Menu_CopyBitmap, + Menu_PasteBitmap, + Menu_PasteMFile, + Menu_CopyFiles, + Menu_Shape_New = 500, + Menu_Shape_Edit, + Menu_Shape_Clear, + Menu_ShapeClipboard_Copy, + Menu_ShapeClipboard_Paste, + Button_Colour = 1001 +}; + +DnDFrame::DnDFrame(wxFrame *frame, const wxChar *title, int x, int y, int w, int h) +: wxFrame(frame, wxID_ANY, title, wxPoint(x, y), wxSize(w, h)) +{ + // frame icon and status bar + // FIXME SetIcon(wxICON(sample)); + + + + // construct menu + wxMenu *file_menu = new wxMenu; + file_menu->Append(Menu_Drag, _T("&Test drag...")); + file_menu->AppendCheckItem(Menu_DragMoveDef, _T("&Move by default")); + file_menu->AppendCheckItem(Menu_DragMoveAllow, _T("&Allow moving")); + file_menu->AppendSeparator(); + file_menu->Append(Menu_NewFrame, _T("&New frame\tCtrl-N")); + file_menu->AppendSeparator(); + file_menu->Append(Menu_OpenFile, _T("&Open file...")); + file_menu->AppendSeparator(); + file_menu->Append(Menu_Quit, _T("E&xit\tCtrl-Q")); + + wxMenuBar *menu_bar = new wxMenuBar; + menu_bar->Append(file_menu, _T("&File")); +//#if wxUSE_LOG +// menu_bar->Append(log_menu, _T("&Log")); +//#endif // wxUSE_LOG +// menu_bar->Append(clip_menu, _T("&Clipboard")); +// menu_bar->Append(help_menu, _T("&Help")); + + SetMenuBar(menu_bar); + + + // + // wxString strFile(_T("Drop files here!")); + + wxString str; + wxString str2 = wxString::FromUTF8(getenv("P7ZIP_HOME_DIR")); + str = wxString(_T("P7ZIP_HOME_DIR -")) + str2 + _T("-"); + + wxString strFile(str); + + m_ctrlFile = new wxListBox(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 1, &strFile , + wxLB_HSCROLL | wxLB_ALWAYS_SB ); + + + // m_ctrlFile->Append(str); + + + m_ctrlFile->SetDropTarget(new DnDFile(m_ctrlFile)); + + wxBoxSizer *sizer_top = new wxBoxSizer( wxHORIZONTAL ); + sizer_top->Add(m_ctrlFile, 1, wxEXPAND ); + + wxBoxSizer *sizer = new wxBoxSizer( wxVERTICAL ); +sizer->Add(sizer_top, 2, wxEXPAND ); + +SetSizer(sizer); +sizer->SetSizeHints( this ); + +} + +void DnDFrame::OnQuit(wxCommandEvent& WXUNUSED(event)) +{ + Close(true); +} + +DnDFrame::~DnDFrame() +{ +/* +#if wxUSE_LOG + if ( m_pLog != NULL ) { + if ( wxLog::SetActiveTarget(m_pLogPrev) == m_pLog ) + delete m_pLog; + } +#endif // wxUSE_LOG + */ +} + + +BEGIN_EVENT_TABLE(DnDFrame, wxFrame) +EVT_MENU(Menu_Quit, DnDFrame::OnQuit) +END_EVENT_TABLE() + +// 'Main program' equivalent: the program execution "starts" here +bool MyApp::OnInit() +{ + // don't parse the command-line options ! + // : if ( !wxApp::OnInit() ) return false; + +#ifdef __WXMAC__ +ProcessSerialNumber PSN; +GetCurrentProcess(&PSN); +TransformProcessType(&PSN,kProcessTransformToForegroundApplication); +#endif + + + { // define P7ZIP_HOME_DIR + extern void my_windows_split_path(const AString &p_path, AString &dir , AString &base); + static char p7zip_home_dir[MAX_PATH]; + + UString fullPath; + NDirectory::MyGetFullPathName(wxApp::argv[0], fullPath); + AString afullPath = GetAnsiString(fullPath); + + AString dir,name; + + my_windows_split_path(afullPath,dir,name); + + const char *dir2 = nameWindowToUnix((const char *)dir); + snprintf(p7zip_home_dir,sizeof(p7zip_home_dir),"P7ZIP_HOME_DIR=%s/",dir2); + p7zip_home_dir[sizeof(p7zip_home_dir)-1] = 0; + putenv(p7zip_home_dir); + // DEBUG printf("putenv(%s)\n",p7zip_home_dir); + } + global_use_utf16_conversion = 1; // UNICODE ! + + + wxInitAllImageHandlers(); + +// Main1(wxApp::argc,wxApp::argv); + + // create the main frame window + DnDFrame *frame = new DnDFrame((wxFrame *) NULL, + _T("P7ZIP Drag-and-Drop"), + 10, 100, 750, 540); + + + printf("P7ZIP_HOME_DIR : -%s-\n", getenv("P7ZIP_HOME_DIR")); + + + + // activate it + frame->Show(true); + + SetTopWindow(frame); + + + + + + // success: wxApp::OnRun() will be called which will enter the main message + // loop and the application will run. If we returned false here, the + // application would exit immediately. + return true; +} diff --git a/CPP/7zip/UI/P7ZIP/wxP7ZIP.o b/CPP/7zip/UI/P7ZIP/wxP7ZIP.o new file mode 100644 index 0000000..b2d4a40 Binary files /dev/null and b/CPP/7zip/UI/P7ZIP/wxP7ZIP.o differ diff --git a/CPP/Common/AutoPtr.h b/CPP/Common/AutoPtr.h new file mode 100644 index 0000000..006d315 --- /dev/null +++ b/CPP/Common/AutoPtr.h @@ -0,0 +1,35 @@ +// Common/AutoPtr.h + +#ifndef __COMMON_AUTOPTR_H +#define __COMMON_AUTOPTR_H + +template class CMyAutoPtr +{ + T *_p; +public: + CMyAutoPtr(T *p = 0) : _p(p) {} + CMyAutoPtr(CMyAutoPtr& p): _p(p.release()) {} + CMyAutoPtr& operator=(CMyAutoPtr& p) + { + reset(p.release()); + return (*this); + } + ~CMyAutoPtr() { delete _p; } + T& operator*() const { return *_p; } + // T* operator->() const { return (&**this); } + T* get() const { return _p; } + T* release() + { + T *tmp = _p; + _p = 0; + return tmp; + } + void reset(T* p = 0) + { + if (p != _p) + delete _p; + _p = p; + } +}; + +#endif diff --git a/CPP/Common/Buffer.h b/CPP/Common/Buffer.h new file mode 100644 index 0000000..118fe11 --- /dev/null +++ b/CPP/Common/Buffer.h @@ -0,0 +1,77 @@ +// Common/Buffer.h + +#ifndef __COMMON_BUFFER_H +#define __COMMON_BUFFER_H + +#include "Defs.h" + +template class CBuffer +{ +protected: + size_t _capacity; + T *_items; +public: + void Free() + { + delete []_items; + _items = 0; + _capacity = 0; + } + CBuffer(): _capacity(0), _items(0) {}; + CBuffer(const CBuffer &buffer): _capacity(0), _items(0) { *this = buffer; } + CBuffer(size_t size): _items(0), _capacity(0) { SetCapacity(size); } + virtual ~CBuffer() { delete []_items; } + operator T *() { return _items; }; + operator const T *() const { return _items; }; + size_t GetCapacity() const { return _capacity; } + void SetCapacity(size_t newCapacity) + { + if (newCapacity == _capacity) + return; + T *newBuffer; + if (newCapacity > 0) + { + newBuffer = new T[newCapacity]; + if (_capacity > 0) + memmove(newBuffer, _items, MyMin(_capacity, newCapacity) * sizeof(T)); + } + else + newBuffer = 0; + delete []_items; + _items = newBuffer; + _capacity = newCapacity; + } + CBuffer& operator=(const CBuffer &buffer) + { + Free(); + if (buffer._capacity > 0) + { + SetCapacity(buffer._capacity); + memmove(_items, buffer._items, buffer._capacity * sizeof(T)); + } + return *this; + } +}; + +template +bool operator==(const CBuffer& b1, const CBuffer& b2) +{ + if (b1.GetCapacity() != b2.GetCapacity()) + return false; + for (size_t i = 0; i < b1.GetCapacity(); i++) + if (b1[i] != b2[i]) + return false; + return true; +} + +template +bool operator!=(const CBuffer& b1, const CBuffer& b2) +{ + return !(b1 == b2); +} + +typedef CBuffer CCharBuffer; +typedef CBuffer CWCharBuffer; +typedef CBuffer CByteBuffer; + +#endif diff --git a/CPP/Common/CRC.cpp b/CPP/Common/CRC.cpp new file mode 100644 index 0000000..9a9f81f --- /dev/null +++ b/CPP/Common/CRC.cpp @@ -0,0 +1,7 @@ +// Common/CRC.cpp + +#include "StdAfx.h" + +#include "../../C/7zCrc.h" + +struct CCRCTableInit { CCRCTableInit() { CrcGenerateTable(); } } g_CRCTableInit; diff --git a/CPP/Common/C_FileIO.cpp b/CPP/Common/C_FileIO.cpp new file mode 100644 index 0000000..b4893d6 --- /dev/null +++ b/CPP/Common/C_FileIO.cpp @@ -0,0 +1,88 @@ +// Common/C_FileIO.h + +#include "C_FileIO.h" + +#include +#include + +namespace NC { +namespace NFile { +namespace NIO { + +bool CFileBase::OpenBinary(const char *name, int flags) +{ + #ifdef O_BINARY + flags |= O_BINARY; + #endif + Close(); + _handle = ::open(name, flags, 0666); + return _handle != -1; +} + +bool CFileBase::Close() +{ + if (_handle == -1) + return true; + if (close(_handle) != 0) + return false; + _handle = -1; + return true; +} + +bool CFileBase::GetLength(UInt64 &length) const +{ + off_t curPos = Seek(0, SEEK_CUR); + off_t lengthTemp = Seek(0, SEEK_END); + Seek(curPos, SEEK_SET); + length = (UInt64)lengthTemp; + return true; +} + +off_t CFileBase::Seek(off_t distanceToMove, int moveMethod) const +{ + return ::lseek(_handle, distanceToMove, moveMethod); +} + +///////////////////////// +// CInFile + +bool CInFile::Open(const char *name) +{ + return CFileBase::OpenBinary(name, O_RDONLY); +} + +bool CInFile::OpenShared(const char *name, bool) +{ + return Open(name); +} + +ssize_t CInFile::Read(void *data, size_t size) +{ + return read(_handle, data, size); +} + +///////////////////////// +// COutFile + +bool COutFile::Create(const char *name, bool createAlways) +{ + if (createAlways) + { + Close(); + _handle = ::creat(name, 0666); + return _handle != -1; + } + return OpenBinary(name, O_CREAT | O_EXCL | O_WRONLY); +} + +bool COutFile::Open(const char *name, DWORD creationDisposition) +{ + return Create(name, false); +} + +ssize_t COutFile::Write(const void *data, size_t size) +{ + return write(_handle, data, size); +} + +}}} diff --git a/CPP/Common/C_FileIO.h b/CPP/Common/C_FileIO.h new file mode 100644 index 0000000..27aa568 --- /dev/null +++ b/CPP/Common/C_FileIO.h @@ -0,0 +1,47 @@ +// Common/C_FileIO.h + +#ifndef __COMMON_C_FILEIO_H +#define __COMMON_C_FILEIO_H + +#include +#include + +#include "Types.h" +#include "MyWindows.h" + +namespace NC { +namespace NFile { +namespace NIO { + +class CFileBase +{ +protected: + int _handle; + bool OpenBinary(const char *name, int flags); +public: + CFileBase(): _handle(-1) {}; + ~CFileBase() { Close(); } + bool Close(); + bool GetLength(UInt64 &length) const; + off_t Seek(off_t distanceToMove, int moveMethod) const; +}; + +class CInFile: public CFileBase +{ +public: + bool Open(const char *name); + bool OpenShared(const char *name, bool shareForWrite); + ssize_t Read(void *data, size_t size); +}; + +class COutFile: public CFileBase +{ +public: + bool Create(const char *name, bool createAlways); + bool Open(const char *name, DWORD creationDisposition); + ssize_t Write(const void *data, size_t size); +}; + +}}} + +#endif diff --git a/CPP/Common/ComTry.h b/CPP/Common/ComTry.h new file mode 100644 index 0000000..1f20e5d --- /dev/null +++ b/CPP/Common/ComTry.h @@ -0,0 +1,18 @@ +// ComTry.h + +#ifndef __COM_TRY_H +#define __COM_TRY_H + +#include "MyWindows.h" +// #include "Exception.h" +// #include "NewHandler.h" + +#define COM_TRY_BEGIN try { +#define COM_TRY_END } catch(const char * s) { throw s ; } \ + catch(...) { return E_OUTOFMEMORY; } + + // catch(const CNewException &) { return E_OUTOFMEMORY; } + // catch(const CSystemException &e) { return e.ErrorCode; } + // catch(...) { return E_FAIL; } + +#endif diff --git a/CPP/Common/CommandLineParser.cpp b/CPP/Common/CommandLineParser.cpp new file mode 100644 index 0000000..91fecc7 --- /dev/null +++ b/CPP/Common/CommandLineParser.cpp @@ -0,0 +1,230 @@ +// CommandLineParser.cpp + +#include "StdAfx.h" + +#include "CommandLineParser.h" + +namespace NCommandLineParser { + +#ifdef _WIN32 +bool SplitCommandLine(const UString &src, UString &dest1, UString &dest2) +{ + dest1.Empty(); + dest2.Empty(); + bool quoteMode = false; + int i; + for (i = 0; i < src.Length(); i++) + { + wchar_t c = src[i]; + if (c == L' ' && !quoteMode) + { + dest2 = src.Mid(i + 1); + return i != 0; + } + if (c == L'\"') + quoteMode = !quoteMode; + else + dest1 += c; + } + return i != 0; +} + +void SplitCommandLine(const UString &s, UStringVector &parts) +{ + UString sTemp = s; + sTemp.Trim(); + parts.Clear(); + for (;;) + { + UString s1, s2; + if (SplitCommandLine(sTemp, s1, s2)) + parts.Add(s1); + if (s2.IsEmpty()) + break; + sTemp = s2; + } +} +#endif + +static const wchar_t kSwitchID1 = '-'; +// static const wchar_t kSwitchID2 = '/'; + +static const wchar_t kSwitchMinus = '-'; +static const wchar_t *kStopSwitchParsing = L"--"; + +static bool IsItSwitchChar(wchar_t c) +{ + return (c == kSwitchID1 /*|| c == kSwitchID2 */); +} + +CParser::CParser(int numSwitches): + _numSwitches(numSwitches) +{ + _switches = new CSwitchResult[_numSwitches]; +} + +CParser::~CParser() +{ + delete []_switches; +} + +void CParser::ParseStrings(const CSwitchForm *switchForms, + const UStringVector &commandStrings) +{ + int numCommandStrings = commandStrings.Size(); + bool stopSwitch = false; + for (int i = 0; i < numCommandStrings; i++) + { + const UString &s = commandStrings[i]; + if (stopSwitch) + NonSwitchStrings.Add(s); + else + if (s == kStopSwitchParsing) + stopSwitch = true; + else + if (!ParseString(s, switchForms)) + NonSwitchStrings.Add(s); + } +} + +// if string contains switch then function updates switch structures +// out: (string is a switch) +bool CParser::ParseString(const UString &s, const CSwitchForm *switchForms) +{ + int len = s.Length(); + if (len == 0) + return false; + int pos = 0; + if (!IsItSwitchChar(s[pos])) + return false; + while (pos < len) + { + if (IsItSwitchChar(s[pos])) + pos++; + const int kNoLen = -1; + int matchedSwitchIndex = 0; // GCC Warning + int maxLen = kNoLen; + for (int switchIndex = 0; switchIndex < _numSwitches; switchIndex++) + { + int switchLen = MyStringLen(switchForms[switchIndex].IDString); + if (switchLen <= maxLen || pos + switchLen > len) + continue; + + UString temp = s + pos; + temp = temp.Left(switchLen); + if (temp.CompareNoCase(switchForms[switchIndex].IDString) == 0) + // if (_strnicmp(switchForms[switchIndex].IDString, LPCSTR(s) + pos, switchLen) == 0) + { + matchedSwitchIndex = switchIndex; + maxLen = switchLen; + } + } + if (maxLen == kNoLen) + throw "maxLen == kNoLen"; + CSwitchResult &matchedSwitch = _switches[matchedSwitchIndex]; + const CSwitchForm &switchForm = switchForms[matchedSwitchIndex]; + if ((!switchForm.Multi) && matchedSwitch.ThereIs) + throw "switch must be single"; + matchedSwitch.ThereIs = true; + pos += maxLen; + int tailSize = len - pos; + NSwitchType::EEnum type = switchForm.Type; + switch(type) + { + case NSwitchType::kPostMinus: + { + if (tailSize == 0) + matchedSwitch.WithMinus = false; + else + { + matchedSwitch.WithMinus = (s[pos] == kSwitchMinus); + if (matchedSwitch.WithMinus) + pos++; + } + break; + } + case NSwitchType::kPostChar: + { + if (tailSize < switchForm.MinLen) + throw "switch is not full"; + UString set = switchForm.PostCharSet; + const int kEmptyCharValue = -1; + if (tailSize == 0) + matchedSwitch.PostCharIndex = kEmptyCharValue; + else + { + int index = set.Find(s[pos]); + if (index < 0) + matchedSwitch.PostCharIndex = kEmptyCharValue; + else + { + matchedSwitch.PostCharIndex = index; + pos++; + } + } + break; + } + case NSwitchType::kLimitedPostString: + case NSwitchType::kUnLimitedPostString: + { + int minLen = switchForm.MinLen; + if (tailSize < minLen) + throw "switch is not full"; + if (type == NSwitchType::kUnLimitedPostString) + { + matchedSwitch.PostStrings.Add(s.Mid(pos)); + return true; + } + int maxLen = switchForm.MaxLen; + UString stringSwitch = s.Mid(pos, minLen); + pos += minLen; + for (int i = minLen; i < maxLen && pos < len; i++, pos++) + { + wchar_t c = s[pos]; + if (IsItSwitchChar(c)) + break; + stringSwitch += c; + } + matchedSwitch.PostStrings.Add(stringSwitch); + break; + } + case NSwitchType::kSimple: + break; + } + } + return true; +} + +const CSwitchResult& CParser::operator[](size_t index) const +{ + return _switches[index]; +} + +///////////////////////////////// +// Command parsing procedures + +int ParseCommand(int numCommandForms, const CCommandForm *commandForms, + const UString &commandString, UString &postString) +{ + for (int i = 0; i < numCommandForms; i++) + { + const UString id = commandForms[i].IDString; + if (commandForms[i].PostStringMode) + { + if (commandString.Find(id) == 0) + { + postString = commandString.Mid(id.Length()); + return i; + } + } + else + if (commandString == id) + { + postString.Empty(); + return i; + } + } + return -1; +} + +} diff --git a/CPP/Common/CommandLineParser.h b/CPP/Common/CommandLineParser.h new file mode 100644 index 0000000..3d0b41d --- /dev/null +++ b/CPP/Common/CommandLineParser.h @@ -0,0 +1,72 @@ +// Common/CommandLineParser.h + +#ifndef __COMMON_COMMAND_LINE_PARSER_H +#define __COMMON_COMMAND_LINE_PARSER_H + +#include "MyString.h" + +namespace NCommandLineParser { + +bool SplitCommandLine(const UString &src, UString &dest1, UString &dest2); +void SplitCommandLine(const UString &s, UStringVector &parts); + +namespace NSwitchType { + enum EEnum + { + kSimple, + kPostMinus, + kLimitedPostString, + kUnLimitedPostString, + kPostChar + }; +} + +struct CSwitchForm +{ + const wchar_t *IDString; + NSwitchType::EEnum Type; + bool Multi; + int MinLen; + int MaxLen; + const wchar_t *PostCharSet; +}; + +struct CSwitchResult +{ + bool ThereIs; + bool WithMinus; + UStringVector PostStrings; + int PostCharIndex; + CSwitchResult(): ThereIs(false) {}; +}; + +class CParser +{ + int _numSwitches; + CSwitchResult *_switches; + bool ParseString(const UString &s, const CSwitchForm *switchForms); +public: + UStringVector NonSwitchStrings; + CParser(int numSwitches); + ~CParser(); + void ParseStrings(const CSwitchForm *switchForms, + const UStringVector &commandStrings); + const CSwitchResult& operator[](size_t index) const; +}; + +///////////////////////////////// +// Command parsing procedures + +struct CCommandForm +{ + const wchar_t *IDString; + bool PostStringMode; +}; + +// Returns: Index of form and postString; -1, if there is no match +int ParseCommand(int numCommandForms, const CCommandForm *commandForms, + const UString &commandString, UString &postString); + +} + +#endif diff --git a/CPP/Common/Defs.h b/CPP/Common/Defs.h new file mode 100644 index 0000000..dad3ae8 --- /dev/null +++ b/CPP/Common/Defs.h @@ -0,0 +1,20 @@ +// Common/Defs.h + +#ifndef __COMMON_DEFS_H +#define __COMMON_DEFS_H + +template inline T MyMin(T a, T b) + { return a < b ? a : b; } +template inline T MyMax(T a, T b) + { return a > b ? a : b; } + +template inline int MyCompare(T a, T b) + { return a < b ? -1 : (a == b ? 0 : 1); } + +inline int BoolToInt(bool value) + { return (value ? 1: 0); } + +inline bool IntToBool(int value) + { return (value != 0); } + +#endif diff --git a/CPP/Common/DynamicBuffer.h b/CPP/Common/DynamicBuffer.h new file mode 100644 index 0000000..b5fd978 --- /dev/null +++ b/CPP/Common/DynamicBuffer.h @@ -0,0 +1,50 @@ +// Common/DynamicBuffer.h + +#ifndef __COMMON_DYNAMIC_BUFFER_H +#define __COMMON_DYNAMIC_BUFFER_H + +#include "Buffer.h" + +template class CDynamicBuffer: public CBuffer +{ + void GrowLength(size_t size) + { + size_t delta; + if (this->_capacity > 64) + delta = this->_capacity / 4; + else if (this->_capacity > 8) + delta = 16; + else + delta = 4; + delta = MyMax(delta, size); + size_t newCap = this->_capacity + delta; + if (newCap < delta) + newCap = this->_capacity + size; + this->SetCapacity(newCap); + } +public: + CDynamicBuffer(): CBuffer() {}; + CDynamicBuffer(const CDynamicBuffer &buffer): CBuffer(buffer) {}; + CDynamicBuffer(size_t size): CBuffer(size) {}; + CDynamicBuffer& operator=(const CDynamicBuffer &buffer) + { + this->Free(); + if (buffer._capacity > 0) + { + SetCapacity(buffer._capacity); + memmove(this->_items, buffer._items, buffer._capacity * sizeof(T)); + } + return *this; + } + void EnsureCapacity(size_t capacity) + { + if (this->_capacity < capacity) + GrowLength(capacity - this->_capacity); + } +}; + +typedef CDynamicBuffer CCharDynamicBuffer; +typedef CDynamicBuffer CWCharDynamicBuffer; +typedef CDynamicBuffer CByteDynamicBuffer; + +#endif diff --git a/CPP/Common/IntToString.cpp b/CPP/Common/IntToString.cpp new file mode 100644 index 0000000..013fee5 --- /dev/null +++ b/CPP/Common/IntToString.cpp @@ -0,0 +1,77 @@ +// Common/IntToString.cpp + +#include "StdAfx.h" + +#include "IntToString.h" + +void ConvertUInt64ToString(UInt64 value, char *s, UInt32 base) +{ + if (base < 2 || base > 36) + { + *s = '\0'; + return; + } + char temp[72]; + int pos = 0; + do + { + int delta = (int)(value % base); + temp[pos++] = (char)((delta < 10) ? ('0' + delta) : ('a' + (delta - 10))); + value /= base; + } + while (value != 0); + do + *s++ = temp[--pos]; + while (pos > 0); + *s = '\0'; +} + +void ConvertUInt64ToString(UInt64 value, wchar_t *s) +{ + wchar_t temp[32]; + int pos = 0; + do + { + temp[pos++] = (wchar_t)(L'0' + (int)(value % 10)); + value /= 10; + } + while (value != 0); + do + *s++ = temp[--pos]; + while (pos > 0); + *s = L'\0'; +} + +void ConvertUInt32ToString(UInt32 value, char *s) { ConvertUInt64ToString(value, s); } +void ConvertUInt32ToString(UInt32 value, wchar_t *s) { ConvertUInt64ToString(value, s); } + +void ConvertInt64ToString(Int64 value, char *s) +{ + if (value < 0) + { + *s++ = '-'; + value = -value; + } + ConvertUInt64ToString(value, s); +} + +void ConvertInt64ToString(Int64 value, wchar_t *s) +{ + if (value < 0) + { + *s++ = L'-'; + value = -value; + } + ConvertUInt64ToString(value, s); +} + +void ConvertUInt32ToHexWithZeros(UInt32 value, char *s) +{ + for (int i = 0; i < 8; i++) + { + int t = value & 0xF; + value >>= 4; + s[7 - i] = (char)((t < 10) ? ('0' + t) : ('A' + (t - 10))); + } + s[8] = '\0'; +} diff --git a/CPP/Common/IntToString.h b/CPP/Common/IntToString.h new file mode 100644 index 0000000..782f930 --- /dev/null +++ b/CPP/Common/IntToString.h @@ -0,0 +1,19 @@ +// Common/IntToString.h + +#ifndef __COMMON_INT_TO_STRING_H +#define __COMMON_INT_TO_STRING_H + +#include +#include "Types.h" + +void ConvertUInt64ToString(UInt64 value, char *s, UInt32 base = 10); +void ConvertUInt64ToString(UInt64 value, wchar_t *s); +void ConvertInt64ToString(Int64 value, char *s); +void ConvertInt64ToString(Int64 value, wchar_t *s); + +void ConvertUInt32ToString(UInt32 value, char *s); +void ConvertUInt32ToString(UInt32 value, wchar_t *s); + +void ConvertUInt32ToHexWithZeros(UInt32 value, char *s); + +#endif diff --git a/CPP/Common/Lang.cpp b/CPP/Common/Lang.cpp new file mode 100644 index 0000000..75dfed4 --- /dev/null +++ b/CPP/Common/Lang.cpp @@ -0,0 +1,130 @@ +// Common/Lang.cpp + +#include "StdAfx.h" + +#include "Lang.h" +#include "TextConfig.h" + +#include "../Windows/FileIO.h" +#include "UTFConvert.h" +#include "Defs.h" + +static bool HexStringToNumber(const UString &s, UInt32 &value) +{ + value = 0; + if (s.IsEmpty()) + return false; + for (int i = 0; i < s.Length(); i++) + { + wchar_t c = s[i]; + int a; + if (c >= L'0' && c <= L'9') + a = c - L'0'; + else if (c >= L'A' && c <= L'F') + a = 10 + c - L'A'; + else if (c >= L'a' && c <= L'f') + a = 10 + c - L'a'; + else + return false; + value *= 0x10; + value += a; + } + return true; +} + + +static bool WaitNextLine(const AString &s, int &pos) +{ + for (; pos < s.Length(); pos++) + if (s[pos] == 0x0A) + return true; + return false; +} + +static int CompareLangItems(void *const *elem1, void *const *elem2, void *) +{ + const CLangPair &langPair1 = *(*((const CLangPair **)elem1)); + const CLangPair &langPair2 = *(*((const CLangPair **)elem2)); + return MyCompare(langPair1.Value, langPair2.Value); +} + +bool CLang::Open(LPCWSTR fileName) +{ + _langPairs.Clear(); + NWindows::NFile::NIO::CInFile file; + if (!file.Open(fileName)) + return false; + UInt64 length; + if (!file.GetLength(length)) + return false; + if (length > (1 << 20)) + return false; + AString s; + char *p = s.GetBuffer((int)length + 1); + UInt32 processed; + if (!file.Read(p, (UInt32)length, processed)) + return false; + p[(UInt32)length] = 0; + s.ReleaseBuffer(); + file.Close(); + int pos = 0; + if (s.Length() >= 3) + { + if (Byte(s[0]) == 0xEF && Byte(s[1]) == 0xBB && Byte(s[2]) == 0xBF) + pos += 3; + } + + ///////////////////// + // read header + + AString stringID = ";!@Lang@!UTF-8!"; + if (s.Mid(pos, stringID.Length()) != stringID) + return false; + pos += stringID.Length(); + + if (!WaitNextLine(s, pos)) + return false; + + CObjectVector pairs; + if (!GetTextConfig(s.Mid(pos), pairs)) + return false; + + _langPairs.Reserve(_langPairs.Size()); + for (int i = 0; i < pairs.Size(); i++) + { + CTextConfigPair textConfigPair = pairs[i]; + CLangPair langPair; + if (!HexStringToNumber(textConfigPair.ID, langPair.Value)) + return false; + langPair.String = textConfigPair.String; + _langPairs.Add(langPair); + } + _langPairs.Sort(CompareLangItems, NULL); + return true; +} + +int CLang::FindItem(UInt32 value) const +{ + int left = 0, right = _langPairs.Size(); + while (left != right) + { + UInt32 mid = (left + right) / 2; + UInt32 midValue = _langPairs[mid].Value; + if (value == midValue) + return mid; + if (value < midValue) + right = mid; + else + left = mid + 1; + } + return -1; +} + +bool CLang::GetMessage(UInt32 value, UString &message) const +{ + int index = FindItem(value); + if (index < 0) + return false; + message = _langPairs[index].String; + return true; +} diff --git a/CPP/Common/Lang.h b/CPP/Common/Lang.h new file mode 100644 index 0000000..cf97875 --- /dev/null +++ b/CPP/Common/Lang.h @@ -0,0 +1,28 @@ +// Common/Lang.h + +#ifndef __COMMON_LANG_H +#define __COMMON_LANG_H + +#include "MyVector.h" +#include "MyString.h" +#include "Types.h" + +struct CLangPair +{ + UInt32 Value; + UString String; +}; + +class CLang +{ + CObjectVector _langPairs; +public: + bool Open(LPCWSTR fileName); + void Clear() { _langPairs.Clear(); } + int FindItem(UInt32 value) const; + bool GetMessage(UInt32 value, UString &message) const; +}; + +#endif + + diff --git a/CPP/Common/ListFileUtils.cpp b/CPP/Common/ListFileUtils.cpp new file mode 100644 index 0000000..8e40901 --- /dev/null +++ b/CPP/Common/ListFileUtils.cpp @@ -0,0 +1,75 @@ +// Common/ListFileUtils.cpp + +#include "StdAfx.h" + +#include "MyWindows.h" +#include "../Windows/FileIO.h" + +#include "ListFileUtils.h" +#include "StringConvert.h" +#include "UTFConvert.h" + +static const char kQuoteChar = '\"'; +static void RemoveQuote(UString &s) +{ + if (s.Length() >= 2) + if (s[0] == kQuoteChar && s[s.Length() - 1] == kQuoteChar) + s = s.Mid(1, s.Length() - 2); +} + +bool ReadNamesFromListFile(LPCWSTR fileName, UStringVector &resultStrings, UINT codePage) +{ + NWindows::NFile::NIO::CInFile file; + if (!file.Open(fileName,true)) /* follow the symbolic link */ + return false; + UInt64 length; + if (!file.GetLength(length)) + return false; + if (length > ((UInt32)1 << 31)) + return false; + AString s; + char *p = s.GetBuffer((int)length + 1); + UInt32 processed; + if (!file.Read(p, (UInt32)length, processed)) + return false; + p[(UInt32)length] = 0; + s.ReleaseBuffer(); + file.Close(); + + UString u; + #ifdef CP_UTF8 + if (codePage == CP_UTF8) + { + if (!ConvertUTF8ToUnicode(s, u)) + return false; + } + else + #endif + u = MultiByteToUnicodeString(s, codePage); + if (!u.IsEmpty()) + { + if (u[0] == 0xFEFF) + u.Delete(0); + } + + UString t; + for (int i = 0; i < u.Length(); i++) + { + wchar_t c = u[i]; + if (c == L'\n' || c == 0xD) + { + t.Trim(); + RemoveQuote(t); + if (!t.IsEmpty()) + resultStrings.Add(t); + t.Empty(); + } + else + t += c; + } + t.Trim(); + RemoveQuote(t); + if (!t.IsEmpty()) + resultStrings.Add(t); + return true; +} diff --git a/CPP/Common/ListFileUtils.h b/CPP/Common/ListFileUtils.h new file mode 100644 index 0000000..c58a8bd --- /dev/null +++ b/CPP/Common/ListFileUtils.h @@ -0,0 +1,11 @@ +// Common/ListFileUtils.h + +#ifndef __COMMON_LISTFILEUTILS_H +#define __COMMON_LISTFILEUTILS_H + +#include "MyString.h" +#include "Types.h" + +bool ReadNamesFromListFile(LPCWSTR fileName, UStringVector &strings, UINT codePage = CP_OEMCP); + +#endif diff --git a/CPP/Common/MyCom.h b/CPP/Common/MyCom.h new file mode 100644 index 0000000..2f00c25 --- /dev/null +++ b/CPP/Common/MyCom.h @@ -0,0 +1,225 @@ +// MyCom.h + +#ifndef __MYCOM_H +#define __MYCOM_H + +#include "MyWindows.h" + +#ifndef RINOK +#define RINOK(x) { HRESULT __result_ = (x); if (__result_ != S_OK) return __result_; } +#endif + +template +class CMyComPtr +{ + T* _p; +public: + // typedef T _PtrClass; + CMyComPtr() { _p = NULL;} + CMyComPtr(T* p) {if ((_p = p) != NULL) p->AddRef(); } + CMyComPtr(const CMyComPtr& lp) + { + if ((_p = lp._p) != NULL) + _p->AddRef(); + } + ~CMyComPtr() { if (_p) _p->Release(); } + void Release() { if (_p) { _p->Release(); _p = NULL; } } + operator T*() const { return (T*)_p; } + // T& operator*() const { return *_p; } + T** operator&() { return &_p; } + T* operator->() const { return _p; } + T* operator=(T* p) + { + if (p != 0) + p->AddRef(); + if (_p) + _p->Release(); + _p = p; + return p; + } + T* operator=(const CMyComPtr& lp) { return (*this = lp._p); } + bool operator!() const { return (_p == NULL); } + // bool operator==(T* pT) const { return _p == pT; } + // Compare two objects for equivalence + void Attach(T* p2) + { + Release(); + _p = p2; + } + T* Detach() + { + T* pt = _p; + _p = NULL; + return pt; + } + #ifdef _WIN32 + HRESULT CoCreateInstance(REFCLSID rclsid, REFIID iid, LPUNKNOWN pUnkOuter = NULL, DWORD dwClsContext = CLSCTX_ALL) + { + return ::CoCreateInstance(rclsid, pUnkOuter, dwClsContext, iid, (void**)&_p); + } + #endif + /* + HRESULT CoCreateInstance(LPCOLESTR szProgID, LPUNKNOWN pUnkOuter = NULL, DWORD dwClsContext = CLSCTX_ALL) + { + CLSID clsid; + HRESULT hr = CLSIDFromProgID(szProgID, &clsid); + ATLASSERT(_p == NULL); + if (SUCCEEDED(hr)) + hr = ::CoCreateInstance(clsid, pUnkOuter, dwClsContext, __uuidof(T), (void**)&_p); + return hr; + } + */ + template + HRESULT QueryInterface(REFGUID iid, Q** pp) const + { + return _p->QueryInterface(iid, (void**)pp); + } +}; + +////////////////////////////////////////////////////////// + +inline HRESULT StringToBstr(LPCOLESTR src, BSTR *bstr) +{ + *bstr = ::SysAllocString(src); + return (*bstr != 0) ? S_OK : E_OUTOFMEMORY; +} + +class CMyComBSTR +{ +public: + BSTR m_str; + CMyComBSTR(): m_str(NULL) {} + CMyComBSTR(LPCOLESTR src) { m_str = ::SysAllocString(src); } + // CMyComBSTR(int nSize) { m_str = ::SysAllocStringLen(NULL, nSize); } + // CMyComBSTR(int nSize, LPCOLESTR sz) { m_str = ::SysAllocStringLen(sz, nSize); } + CMyComBSTR(const CMyComBSTR& src) { m_str = src.MyCopy(); } + /* + CMyComBSTR(REFGUID src) + { + LPOLESTR szGuid; + StringFromCLSID(src, &szGuid); + m_str = ::SysAllocString(szGuid); + CoTaskMemFree(szGuid); + } + */ + ~CMyComBSTR() { ::SysFreeString(m_str); } + CMyComBSTR& operator=(const CMyComBSTR& src) + { + if (m_str != src.m_str) + { + if (m_str) + ::SysFreeString(m_str); + m_str = src.MyCopy(); + } + return *this; + } + CMyComBSTR& operator=(LPCOLESTR src) + { + ::SysFreeString(m_str); + m_str = ::SysAllocString(src); + return *this; + } + unsigned int Length() const { return ::SysStringLen(m_str); } + operator BSTR() const { return m_str; } + BSTR* operator&() { return &m_str; } + BSTR MyCopy() const + { + int byteLen = ::SysStringByteLen(m_str); + BSTR res = ::SysAllocStringByteLen(NULL, byteLen); + memcpy(res, m_str, byteLen); + return res; + } + /* + void Attach(BSTR src) { m_str = src; } + BSTR Detach() + { + BSTR s = m_str; + m_str = NULL; + return s; + } + */ + void Empty() + { + ::SysFreeString(m_str); + m_str = NULL; + } + bool operator!() const { return (m_str == NULL); } +}; + +////////////////////////////////////////////////////////// + +class CMyUnknownImp +{ +public: + ULONG __m_RefCount; + CMyUnknownImp(): __m_RefCount(0) {} +}; + +#define MY_QUERYINTERFACE_BEGIN STDMETHOD(QueryInterface) \ + (REFGUID iid, void **outObject) { + +#define MY_QUERYINTERFACE_ENTRY(i) if (iid == IID_ ## i) \ + { *outObject = (void *)(i *)this; AddRef(); return S_OK; } + +#define MY_QUERYINTERFACE_ENTRY_UNKNOWN(i) if (iid == IID_IUnknown) \ + { *outObject = (void *)(IUnknown *)(i *)this; AddRef(); return S_OK; } + +#define MY_QUERYINTERFACE_BEGIN2(i) MY_QUERYINTERFACE_BEGIN \ + MY_QUERYINTERFACE_ENTRY_UNKNOWN(i) \ + MY_QUERYINTERFACE_ENTRY(i) + +#define MY_QUERYINTERFACE_END return E_NOINTERFACE; } + +#define MY_ADDREF_RELEASE \ +STDMETHOD_(ULONG, AddRef)() { return ++__m_RefCount; } \ +STDMETHOD_(ULONG, Release)() { if (--__m_RefCount != 0) \ + return __m_RefCount; delete this; return 0; } + +#define MY_UNKNOWN_IMP_SPEC(i) \ + MY_QUERYINTERFACE_BEGIN \ + i \ + MY_QUERYINTERFACE_END \ + MY_ADDREF_RELEASE + + +#define MY_UNKNOWN_IMP MY_QUERYINTERFACE_BEGIN \ + MY_QUERYINTERFACE_ENTRY_UNKNOWN(IUnknown) \ + MY_QUERYINTERFACE_END \ + MY_ADDREF_RELEASE + +#define MY_UNKNOWN_IMP1(i) MY_UNKNOWN_IMP_SPEC( \ + MY_QUERYINTERFACE_ENTRY_UNKNOWN(i) \ + MY_QUERYINTERFACE_ENTRY(i) \ + ) + +#define MY_UNKNOWN_IMP2(i1, i2) MY_UNKNOWN_IMP_SPEC( \ + MY_QUERYINTERFACE_ENTRY_UNKNOWN(i1) \ + MY_QUERYINTERFACE_ENTRY(i1) \ + MY_QUERYINTERFACE_ENTRY(i2) \ + ) + +#define MY_UNKNOWN_IMP3(i1, i2, i3) MY_UNKNOWN_IMP_SPEC( \ + MY_QUERYINTERFACE_ENTRY_UNKNOWN(i1) \ + MY_QUERYINTERFACE_ENTRY(i1) \ + MY_QUERYINTERFACE_ENTRY(i2) \ + MY_QUERYINTERFACE_ENTRY(i3) \ + ) + +#define MY_UNKNOWN_IMP4(i1, i2, i3, i4) MY_UNKNOWN_IMP_SPEC( \ + MY_QUERYINTERFACE_ENTRY_UNKNOWN(i1) \ + MY_QUERYINTERFACE_ENTRY(i1) \ + MY_QUERYINTERFACE_ENTRY(i2) \ + MY_QUERYINTERFACE_ENTRY(i3) \ + MY_QUERYINTERFACE_ENTRY(i4) \ + ) + +#define MY_UNKNOWN_IMP5(i1, i2, i3, i4, i5) MY_UNKNOWN_IMP_SPEC( \ + MY_QUERYINTERFACE_ENTRY_UNKNOWN(i1) \ + MY_QUERYINTERFACE_ENTRY(i1) \ + MY_QUERYINTERFACE_ENTRY(i2) \ + MY_QUERYINTERFACE_ENTRY(i3) \ + MY_QUERYINTERFACE_ENTRY(i4) \ + MY_QUERYINTERFACE_ENTRY(i5) \ + ) + +#endif diff --git a/CPP/Common/MyException.h b/CPP/Common/MyException.h new file mode 100644 index 0000000..f0ad111 --- /dev/null +++ b/CPP/Common/MyException.h @@ -0,0 +1,14 @@ +// Common/Exception.h + +#ifndef __COMMON_EXCEPTION_H +#define __COMMON_EXCEPTION_H + +#include "MyWindows.h" + +struct CSystemException +{ + HRESULT ErrorCode; + CSystemException(HRESULT errorCode): ErrorCode(errorCode) {} +}; + +#endif diff --git a/CPP/Common/MyGuidDef.h b/CPP/Common/MyGuidDef.h new file mode 100644 index 0000000..3c52cc0 --- /dev/null +++ b/CPP/Common/MyGuidDef.h @@ -0,0 +1,54 @@ +// Common/MyGuidDef.h + +#ifndef GUID_DEFINED +#define GUID_DEFINED + +#include "Types.h" + +typedef struct { + UInt32 Data1; + UInt16 Data2; + UInt16 Data3; + unsigned char Data4[8]; +} GUID; + +#ifdef __cplusplus +#define REFGUID const GUID & +#else +#define REFGUID const GUID * +#endif + +#define REFCLSID REFGUID +#define REFIID REFGUID + +#ifdef __cplusplus +inline int operator==(REFGUID g1, REFGUID g2) +{ + for (int i = 0; i < (int)sizeof(g1); i++) + if (((unsigned char *)&g1)[i] != ((unsigned char *)&g2)[i]) + return 0; + return 1; +} +inline int operator!=(REFGUID g1, REFGUID g2) { return !(g1 == g2); } +#endif + +#ifdef __cplusplus + #define MY_EXTERN_C extern "C" +#else + #define MY_EXTERN_C extern +#endif + +#endif + + +#ifdef DEFINE_GUID +#undef DEFINE_GUID +#endif + +#ifdef INITGUID + #define DEFINE_GUID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \ + MY_EXTERN_C const GUID name = { l, w1, w2, { b1, b2, b3, b4, b5, b6, b7, b8 } } +#else + #define DEFINE_GUID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \ + MY_EXTERN_C const GUID name +#endif diff --git a/CPP/Common/MyInitGuid.h b/CPP/Common/MyInitGuid.h new file mode 100644 index 0000000..d6a4869 --- /dev/null +++ b/CPP/Common/MyInitGuid.h @@ -0,0 +1,22 @@ +// Common/MyInitGuid.h + +#ifndef __COMMON_MY_INITGUID_H +#define __COMMON_MY_INITGUID_H + +#ifdef _WIN32 +#ifdef UNDER_CE +#include +#endif +#include +#ifdef UNDER_CE +DEFINE_GUID(IID_IUnknown, +0x00000000, 0x0000, 0x0000, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46); +#endif +#else +#define INITGUID +#include "MyGuidDef.h" +DEFINE_GUID(IID_IUnknown, +0x00000000, 0x0000, 0x0000, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46); +#endif + +#endif diff --git a/CPP/Common/MyMap.cpp b/CPP/Common/MyMap.cpp new file mode 100644 index 0000000..0ee11e8 --- /dev/null +++ b/CPP/Common/MyMap.cpp @@ -0,0 +1,140 @@ +// MyMap.cpp + +#include "StdAfx.h" + +#include "MyMap.h" + +static const unsigned kNumBitsMax = sizeof(UInt32) * 8; + +static UInt32 GetSubBits(UInt32 value, unsigned startPos, unsigned numBits) +{ + if (startPos == sizeof(value) * 8) + return 0; + value >>= startPos; + if (numBits == sizeof(value) * 8) + return value; + return value & (((UInt32)1 << numBits) - 1); +} + +static inline unsigned GetSubBit(UInt32 v, unsigned n) { return (unsigned)(v >> n) & 1; } + +bool CMap32::Find(UInt32 key, UInt32 &valueRes) const +{ + valueRes = (UInt32)(Int32)-1; + if (Nodes.Size() == 0) + return false; + if (Nodes.Size() == 1) + { + const CNode &n = Nodes[0]; + if (n.Len == kNumBitsMax) + { + valueRes = n.Values[0]; + return (key == n.Key); + } + } + + int cur = 0; + unsigned bitPos = kNumBitsMax; + for (;;) + { + const CNode &n = Nodes[cur]; + bitPos -= n.Len; + if (GetSubBits(key, bitPos, n.Len) != GetSubBits(n.Key, bitPos, n.Len)) + return false; + unsigned bit = GetSubBit(key, --bitPos); + if (n.IsLeaf[bit]) + { + valueRes = n.Values[bit]; + return (key == n.Keys[bit]); + } + cur = (int)n.Keys[bit]; + } +} + +bool CMap32::Set(UInt32 key, UInt32 value) +{ + if (Nodes.Size() == 0) + { + CNode n; + n.Key = n.Keys[0] = n.Keys[1] = key; + n.Values[0] = n.Values[1] = value; + n.IsLeaf[0] = n.IsLeaf[1] = 1; + n.Len = kNumBitsMax; + Nodes.Add(n); + return false; + } + if (Nodes.Size() == 1) + { + CNode &n = Nodes[0]; + if (n.Len == kNumBitsMax) + { + if (key == n.Key) + { + n.Values[0] = n.Values[1] = value; + return true; + } + unsigned i = kNumBitsMax - 1; + for (;GetSubBit(key, i) == GetSubBit(n.Key, i); i--); + n.Len = (UInt16)(kNumBitsMax - (1 + i)); + unsigned newBit = GetSubBit(key, i); + n.Values[newBit] = value; + n.Keys[newBit] = key; + return false; + } + } + + int cur = 0; + unsigned bitPos = kNumBitsMax; + for (;;) + { + CNode &n = Nodes[cur]; + bitPos -= n.Len; + if (GetSubBits(key, bitPos, n.Len) != GetSubBits(n.Key, bitPos, n.Len)) + { + unsigned i = n.Len - 1; + for (; GetSubBit(key, bitPos + i) == GetSubBit(n.Key, bitPos + i); i--); + + CNode e2(n); + e2.Len = (UInt16)i; + + n.Len = (UInt16)(n.Len - (1 + i)); + unsigned newBit = GetSubBit(key, bitPos + i); + n.Values[newBit] = value; + n.IsLeaf[newBit] = 1; + n.IsLeaf[1 - newBit] = 0; + n.Keys[newBit] = key; + n.Keys[1 - newBit] = Nodes.Size(); + Nodes.Add(e2); + return false; + } + unsigned bit = GetSubBit(key, --bitPos); + + if (n.IsLeaf[bit]) + { + if (key == n.Keys[bit]) + { + n.Values[bit] = value; + return true; + } + unsigned i = bitPos - 1; + for (;GetSubBit(key, i) == GetSubBit(n.Keys[bit], i); i--); + + CNode e2; + + unsigned newBit = GetSubBit(key, i); + e2.Values[newBit] = value; + e2.Values[1 - newBit] = n.Values[bit]; + e2.IsLeaf[newBit] = e2.IsLeaf[1 - newBit] = 1; + e2.Keys[newBit] = key; + e2.Keys[1 - newBit] = e2.Key = n.Keys[bit]; + e2.Len = (UInt16)(bitPos - (1 + i)); + + n.IsLeaf[bit] = 0; + n.Keys[bit] = Nodes.Size(); + + Nodes.Add(e2); + return false; + } + cur = (int)n.Keys[bit]; + } +} diff --git a/CPP/Common/MyMap.h b/CPP/Common/MyMap.h new file mode 100644 index 0000000..d0dd43f --- /dev/null +++ b/CPP/Common/MyMap.h @@ -0,0 +1,28 @@ +// MyMap.h + +#ifndef __COMMON_MYMAP_H +#define __COMMON_MYMAP_H + +#include "MyVector.h" +#include "Types.h" + +class CMap32 +{ + struct CNode + { + UInt32 Key; + UInt32 Keys[2]; + UInt32 Values[2]; + UInt16 Len; + Byte IsLeaf[2]; + }; + CRecordVector Nodes; + +public: + + void Clear() { Nodes.Clear(); } + bool Find(UInt32 key, UInt32 &valueRes) const; + bool Set(UInt32 key, UInt32 value); // returns true, if there is such key already +}; + +#endif diff --git a/CPP/Common/MyString.cpp b/CPP/Common/MyString.cpp new file mode 100644 index 0000000..697a355 --- /dev/null +++ b/CPP/Common/MyString.cpp @@ -0,0 +1,206 @@ +// Common/String.cpp + +#include "StdAfx.h" + +#include +#ifdef ENV_HAVE_WCTYPE_H +#include +#endif +#include "StringConvert.h" // FIXED + +#include "MyString.h" // FIXED to avoid confusion with on some filesystems + +#include +#include + +#ifdef ENV_HAVE_WCHAR__H +#include +#endif + +#include +#ifndef MB_LEN_MAX +#define MB_LEN_MAX 1024 +#endif + +#include "myPrivate.h" + +LPSTR WINAPI CharPrevA( LPCSTR start, LPCSTR ptr ) { // OK for MBS + while (*start && (start < ptr)) { + LPCSTR next = CharNextA( start ); + if (next >= ptr) + break; + start = next; + } + return (LPSTR)start; +} + +LPSTR WINAPI CharNextA( LPCSTR ptr ) { + if (!*ptr) + return (LPSTR)ptr; +// #ifdef ENV_HAVE_MBRTOWC +// if (global_use_utf16_conversion) +// { +// wchar_t wc; +// size_t len = mbrtowc(&wc,ptr,MB_LEN_MAX,0); // mbrtowc stales on some configurations. +// if (len >= 1) return (LPSTR)(ptr + len); +// printf("INTERNAL ERROR - CharNextA\n"); +// exit(EXIT_FAILURE); +// } else { +// return (LPSTR)(ptr + 1); +// } +//#else + return (LPSTR)(ptr + 1); // p7zip search only for ASCII characters like '/' so no need to worry about current locale +//#endif +} + +char MyCharLower(char c) +{ + int r = c & 0xFF; + + return tolower(r); +} + +wchar_t MyCharLower(wchar_t c) +{ +#ifdef ENV_HAVE_TOWUPPER + return towlower(c); +#else + int ret = c; + if ((ret >= 1) && (ret <256)) ret = tolower(ret); + return (wchar_t)ret; +#endif +} + +char * MyStringLower(char *s) +{ + if (s == 0) + return 0; + char *ret = s; + while (*s) + { + *s = MyCharLower(*s); + s++; + } + return ret; +} + +wchar_t * MyStringLower(wchar_t *s) +{ + if (s == 0) + return 0; + wchar_t *ret = s; + while (*s) + { + *s = MyCharLower(*s); + s++; + } + return ret; +} + +wchar_t MyCharUpper(wchar_t c) +{ +#ifdef ENV_HAVE_TOWUPPER + return towupper(c); +#else + int ret = c; + if ((ret >= 1) && (ret <256)) ret = toupper(ret); + return (wchar_t)ret; +#endif +} + +wchar_t * MyStringUpper(wchar_t *s) +{ + if (s == 0) + return 0; + wchar_t *ret = s; + while (*s) + { + *s = MyCharUpper(*s); + s++; + } + return ret; +} + +int MyStringCompare(const char *s1, const char *s2) +{ + while (true) + { + unsigned char c1 = (unsigned char)*s1++; + unsigned char c2 = (unsigned char)*s2++; + if (c1 < c2) return -1; + if (c1 > c2) return 1; + if (c1 == 0) return 0; + } +} + +int MyStringCompare(const wchar_t *s1, const wchar_t *s2) +{ + while (true) + { + wchar_t c1 = *s1++; + wchar_t c2 = *s2++; + if (c1 < c2) return -1; + if (c1 > c2) return 1; + if (c1 == 0) return 0; + } +} + +int MyStringCompareNoCase(const wchar_t *s1, const wchar_t *s2) +{ + while (true) + { + wchar_t c1 = *s1++; + wchar_t c2 = *s2++; + if (c1 != c2) + { + wchar_t u1 = MyCharUpper(c1); + wchar_t u2 = MyCharUpper(c2); + if (u1 < u2) return -1; + if (u1 > u2) return 1; + } + if (c1 == 0) return 0; + } +} + +int MyStringCompareNoCase(const char *s1, const char *s2) +{ + return MyStringCompareNoCase(MultiByteToUnicodeString(s1), MultiByteToUnicodeString(s2)); +} + + +#ifndef ENV_HAVE_WCHAR__H + +EXTERN_C_BEGIN + +size_t wcslen(const wchar_t *s) +{ + register const wchar_t *p; + + for (p=s ; *p ; p++); + + return p - s; +} + +wchar_t *wcscpy(wchar_t * s1, const wchar_t * s2) +{ + register wchar_t *s = s1; + + while ( (*s++ = *s2++) != 0 ); + + return s1; +} + +wchar_t *wcscat(wchar_t * s1, const wchar_t * s2) +{ + register wchar_t *s = s1; + + while (*s++); + --s; + while ((*s++ = *s2++) != 0); + + return s1; +} + +EXTERN_C_END + +#endif diff --git a/CPP/Common/MyString.h b/CPP/Common/MyString.h new file mode 100644 index 0000000..3daa137 --- /dev/null +++ b/CPP/Common/MyString.h @@ -0,0 +1,601 @@ +// Common/String.h + +#ifndef __COMMON_STRING_H +#define __COMMON_STRING_H + +#include +// #include + +#include "MyVector.h" + +LPSTR WINAPI CharNextA( LPCSTR ptr ); +LPSTR WINAPI CharPrevA( LPCSTR start, LPCSTR ptr ); + +template +inline int MyStringLen(const T *s) +{ + int i; + for (i = 0; s[i] != '\0'; i++); + return i; +} + +template +inline T * MyStringCopy(T *dest, const T *src) +{ + T *destStart = dest; + while ((*dest++ = *src++) != 0); + return destStart; +} + +inline wchar_t* MyStringGetNextCharPointer(wchar_t *p) + { return (p + 1); } +inline const wchar_t* MyStringGetNextCharPointer(const wchar_t *p) + { return (p + 1); } +inline wchar_t* MyStringGetPrevCharPointer(const wchar_t *, wchar_t *p) + { return (p - 1); } +inline const wchar_t* MyStringGetPrevCharPointer(const wchar_t *, const wchar_t *p) + { return (p - 1); } + +wchar_t MyCharUpper(wchar_t c); +char * MyStringUpper(char *s); +wchar_t * MyStringUpper(wchar_t *s); + +char MyCharLower(char c); +char * MyStringLower(char *s); +wchar_t MyCharLower(wchar_t c); +wchar_t * MyStringLower(wchar_t *s); + + +inline char* MyStringGetPrevCharPointer(char *base, char *p) + { return CharPrevA(base, p); } +inline const char* MyStringGetPrevCharPointer(const char *base, const char *p) + { return CharPrevA(base, p); } +inline char* MyStringGetNextCharPointer(char *p) + { return CharNextA(p); } +inline const char* MyStringGetNextCharPointer(const char *p) + { return CharNextA(p); } + +////////////////////////////////////// +// Compare + +/* +#ifndef _WIN32_WCE +int MyStringCollate(const char *s1, const char *s2); +int MyStringCollateNoCase(const char *s1, const char *s2); +#endif +int MyStringCollate(const wchar_t *s1, const wchar_t *s2); +int MyStringCollateNoCase(const wchar_t *s1, const wchar_t *s2); +*/ + +int MyStringCompare(const char *s1, const char *s2); +int MyStringCompare(const wchar_t *s1, const wchar_t *s2); + +// int MyStringCompareNoCase(const char *s1, const char *s2); +int MyStringCompareNoCase(const wchar_t *s1, const wchar_t *s2); + +template +class CStringBase +{ + void TrimLeftWithCharSet(const CStringBase &charSet) + { + const T *p = _chars; + while (charSet.Find(*p) >= 0 && (*p != 0)) + p = GetNextCharPointer(p); + Delete(0, (int)(p - _chars)); + } + void TrimRightWithCharSet(const CStringBase &charSet) + { + const T *p = _chars; + const T *pLast = NULL; + while (*p != 0) + { + if (charSet.Find(*p) >= 0) + { + if (pLast == NULL) + pLast = p; + } + else + pLast = NULL; + p = GetNextCharPointer(p); + } + if (pLast != NULL) + { + int i = (int)(pLast - _chars); + Delete(i, _length - i); + } + + } + void MoveItems(int destIndex, int srcIndex) + { + memmove(_chars + destIndex, _chars + srcIndex, + sizeof(T) * (_length - srcIndex + 1)); + } + + void InsertSpace(int &index, int size) + { + CorrectIndex(index); + GrowLength(size); + MoveItems(index + size, index); + } + + static T *GetNextCharPointer(T *p) + { return MyStringGetNextCharPointer(p); } + static const T *GetNextCharPointer(const T *p) + { return MyStringGetNextCharPointer(p); } + static T *GetPrevCharPointer(T *base, T *p) + { return MyStringGetPrevCharPointer(base, p); } + static const T *GetPrevCharPointer(const T *base, const T *p) + { return MyStringGetPrevCharPointer(base, p); } +protected: + T *_chars; + int _length; + int _capacity; + + void SetCapacity(int newCapacity) + { + int realCapacity = newCapacity + 1; + if (realCapacity == _capacity) + return; + /* + const int kMaxStringSize = 0x20000000; + #ifndef _WIN32_WCE + if (newCapacity > kMaxStringSize || newCapacity < _length) + throw 1052337; + #endif + */ + T *newBuffer = new T[realCapacity]; + if (_capacity > 0) + { + for (int i = 0; i < _length; i++) + newBuffer[i] = _chars[i]; + delete []_chars; + } + _chars = newBuffer; + _chars[_length] = 0; + _capacity = realCapacity; + } + + void GrowLength(int n) + { + int freeSize = _capacity - _length - 1; + if (n <= freeSize) + return; + int delta; + if (_capacity > 64) + delta = _capacity / 2; + else if (_capacity > 8) + delta = 16; + else + delta = 4; + if (freeSize + delta < n) + delta = n - freeSize; + SetCapacity(_capacity + delta); + } + + void CorrectIndex(int &index) const + { + if (index > _length) + index = _length; + } + +public: + CStringBase(): _chars(0), _length(0), _capacity(0) { SetCapacity(3); } + CStringBase(T c): _chars(0), _length(0), _capacity(0) + { + SetCapacity(1); + _chars[0] = c; + _chars[1] = 0; + _length = 1; + } + CStringBase(const T *chars): _chars(0), _length(0), _capacity(0) + { + int length = MyStringLen(chars); + SetCapacity(length); + MyStringCopy(_chars, chars); // can be optimized by memove() + _length = length; + } + CStringBase(const CStringBase &s): _chars(0), _length(0), _capacity(0) + { + SetCapacity(s._length); + MyStringCopy(_chars, s._chars); + _length = s._length; + } + ~CStringBase() { delete []_chars; } + + operator const T*() const { return _chars;} + + T Back() const { return _chars[_length - 1]; } + + // The minimum size of the character buffer in characters. + // This value does not include space for a null terminator. + T* GetBuffer(int minBufLength) + { + if (minBufLength >= _capacity) + SetCapacity(minBufLength); + return _chars; + } + void ReleaseBuffer() { ReleaseBuffer(MyStringLen(_chars)); } + void ReleaseBuffer(int newLength) + { + /* + #ifndef _WIN32_WCE + if (newLength >= _capacity) + throw 282217; + #endif + */ + _chars[newLength] = 0; + _length = newLength; + } + + CStringBase& operator=(T c) + { + Empty(); + SetCapacity(1); + _chars[0] = c; + _chars[1] = 0; + _length = 1; + return *this; + } + CStringBase& operator=(const T *chars) + { + Empty(); + int length = MyStringLen(chars); + SetCapacity(length); + MyStringCopy(_chars, chars); + _length = length; + return *this; + } + CStringBase& operator=(const CStringBase& s) + { + if (&s == this) + return *this; + Empty(); + SetCapacity(s._length); + MyStringCopy(_chars, s._chars); + _length = s._length; + return *this; + } + + CStringBase& operator+=(T c) + { + GrowLength(1); + _chars[_length] = c; + _chars[++_length] = 0; + return *this; + } + CStringBase& operator+=(const T *s) + { + int len = MyStringLen(s); + GrowLength(len); + MyStringCopy(_chars + _length, s); + _length += len; + return *this; + } + CStringBase& operator+=(const CStringBase &s) + { + GrowLength(s._length); + MyStringCopy(_chars + _length, s._chars); + _length += s._length; + return *this; + } + void Empty() + { + _length = 0; + _chars[0] = 0; + } + int Length() const { return _length; } + bool IsEmpty() const { return (_length == 0); } + + CStringBase Mid(int startIndex) const + { return Mid(startIndex, _length - startIndex); } + CStringBase Mid(int startIndex, int count ) const + { + if (startIndex + count > _length) + count = _length - startIndex; + + if (startIndex == 0 && startIndex + count == _length) + return *this; + + CStringBase result; + result.SetCapacity(count); + // MyStringNCopy(result._chars, _chars + startIndex, count); + for (int i = 0; i < count; i++) + result._chars[i] = _chars[startIndex + i]; + result._chars[count] = 0; + result._length = count; + return result; + } + CStringBase Left(int count) const + { return Mid(0, count); } + CStringBase Right(int count) const + { + if (count > _length) + count = _length; + return Mid(_length - count, count); + } + + void MakeUpper() + { MyStringUpper(_chars); } + void MakeLower() + { MyStringLower(_chars); } + + int Compare(const CStringBase& s) const + { return MyStringCompare(_chars, s._chars); } + + int Compare(const T *s) const + { return MyStringCompare(_chars, s); } + + int CompareNoCase(const CStringBase& s) const + { return MyStringCompareNoCase(_chars, s._chars); } + + int CompareNoCase(const T *s) const + { return MyStringCompareNoCase(_chars, s); } + + /* + int Collate(const CStringBase& s) const + { return MyStringCollate(_chars, s._chars); } + int CollateNoCase(const CStringBase& s) const + { return MyStringCollateNoCase(_chars, s._chars); } + */ + + int Find(T c) const { return Find(c, 0); } + int Find(T c, int startIndex) const + { + T *p = _chars + startIndex; + for (;;) + { + if (*p == c) + return (int)(p - _chars); + if (*p == 0) + return -1; + p = GetNextCharPointer(p); + } + } + int Find(const CStringBase &s) const { return Find(s, 0); } + int Find(const CStringBase &s, int startIndex) const + { + if (s.IsEmpty()) + return startIndex; + for (; startIndex < _length; startIndex++) + { + int j; + for (j = 0; j < s._length && startIndex + j < _length; j++) + if (_chars[startIndex+j] != s._chars[j]) + break; + if (j == s._length) + return startIndex; + } + return -1; + } + int ReverseFind(T c) const + { + if (_length == 0) + return -1; + T *p = _chars + _length - 1; + for (;;) + { + if (*p == c) + return (int)(p - _chars); + if (p == _chars) + return -1; + p = GetPrevCharPointer(_chars, p); + } + } + int FindOneOf(const CStringBase &s) const + { + for (int i = 0; i < _length; i++) + if (s.Find(_chars[i]) >= 0) + return i; + return -1; + } + + void TrimLeft(T c) + { + const T *p = _chars; + while (c == *p) + p = GetNextCharPointer(p); + Delete(0, p - _chars); + } + private: + CStringBase GetTrimDefaultCharSet() + { + CStringBase charSet; + charSet += (T)' '; + charSet += (T)'\n'; + charSet += (T)'\t'; + return charSet; + } + public: + + void TrimLeft() + { + TrimLeftWithCharSet(GetTrimDefaultCharSet()); + } + void TrimRight() + { + TrimRightWithCharSet(GetTrimDefaultCharSet()); + } + void TrimRight(T c) + { + const T *p = _chars; + const T *pLast = NULL; + while (*p != 0) + { + if (*p == c) + { + if (pLast == NULL) + pLast = p; + } + else + pLast = NULL; + p = GetNextCharPointer(p); + } + if (pLast != NULL) + { + int i = pLast - _chars; + Delete(i, _length - i); + } + } + void Trim() + { + TrimRight(); + TrimLeft(); + } + + int Insert(int index, T c) + { + InsertSpace(index, 1); + _chars[index] = c; + _length++; + return _length; + } + int Insert(int index, const CStringBase &s) + { + CorrectIndex(index); + if (s.IsEmpty()) + return _length; + int numInsertChars = s.Length(); + InsertSpace(index, numInsertChars); + for (int i = 0; i < numInsertChars; i++) + _chars[index + i] = s[i]; + _length += numInsertChars; + return _length; + } + + // !!!!!!!!!!!!!!! test it if newChar = '\0' + int Replace(T oldChar, T newChar) + { + if (oldChar == newChar) + return 0; + int number = 0; + int pos = 0; + while (pos < Length()) + { + pos = Find(oldChar, pos); + if (pos < 0) + break; + _chars[pos] = newChar; + pos++; + number++; + } + return number; + } + int Replace(const CStringBase &oldString, const CStringBase &newString) + { + if (oldString.IsEmpty()) + return 0; + if (oldString == newString) + return 0; + int oldStringLength = oldString.Length(); + int newStringLength = newString.Length(); + int number = 0; + int pos = 0; + while (pos < _length) + { + pos = Find(oldString, pos); + if (pos < 0) + break; + Delete(pos, oldStringLength); + Insert(pos, newString); + pos += newStringLength; + number++; + } + return number; + } + int Delete(int index, int count = 1 ) + { + if (index + count > _length) + count = _length - index; + if (count > 0) + { + MoveItems(index, index + count); + _length -= count; + } + return _length; + } + void DeleteBack() { Delete(_length - 1); } +}; + +template +CStringBase operator+(const CStringBase& s1, const CStringBase& s2) +{ + CStringBase result(s1); + result += s2; + return result; +} + +template +CStringBase operator+(const CStringBase& s, T c) +{ + CStringBase result(s); + result += c; + return result; +} + +template +CStringBase operator+(T c, const CStringBase& s) +{ + CStringBase result(c); + result += s; + return result; +} + +template +CStringBase operator+(const CStringBase& s, const T * chars) +{ + CStringBase result(s); + result += chars; + return result; +} + +template +CStringBase operator+(const T * chars, const CStringBase& s) +{ + CStringBase result(chars); + result += s; + return result; +} + +template +bool operator==(const CStringBase& s1, const CStringBase& s2) + { return (s1.Compare(s2) == 0); } + +template +bool operator<(const CStringBase& s1, const CStringBase& s2) + { return (s1.Compare(s2) < 0); } + +template +bool operator==(const T *s1, const CStringBase& s2) + { return (s2.Compare(s1) == 0); } + +template +bool operator==(const CStringBase& s1, const T *s2) + { return (s1.Compare(s2) == 0); } + +template +bool operator!=(const CStringBase& s1, const CStringBase& s2) + { return (s1.Compare(s2) != 0); } + +template +bool operator!=(const T *s1, const CStringBase& s2) + { return (s2.Compare(s1) != 0); } + +template +bool operator!=(const CStringBase& s1, const T *s2) + { return (s1.Compare(s2) != 0); } + +typedef CStringBase AString; +typedef CStringBase UString; + +typedef CObjectVector AStringVector; +typedef CObjectVector UStringVector; + +#ifdef _UNICODE + typedef UString CSysString; +#else + typedef AString CSysString; +#endif + +typedef CObjectVector CSysStringVector; + +#endif diff --git a/CPP/Common/MyUnknown.h b/CPP/Common/MyUnknown.h new file mode 100644 index 0000000..e9e8666 --- /dev/null +++ b/CPP/Common/MyUnknown.h @@ -0,0 +1,13 @@ +// MyUnknown.h + +#ifndef __MY_UNKNOWN_H +#define __MY_UNKNOWN_H + +#ifdef _WIN32 +#include +#include +#else +#include "MyWindows.h" +#endif + +#endif diff --git a/CPP/Common/MyVector.cpp b/CPP/Common/MyVector.cpp new file mode 100644 index 0000000..3b53176 --- /dev/null +++ b/CPP/Common/MyVector.cpp @@ -0,0 +1,87 @@ +// Common/MyVector.cpp + +#include "StdAfx.h" + +#include + +#include "MyVector.h" + +CBaseRecordVector::~CBaseRecordVector() { ClearAndFree(); } + +void CBaseRecordVector::ClearAndFree() +{ + Clear(); + delete []((unsigned char *)_items); + _capacity = 0; + _size = 0; + _items = 0; +} + +void CBaseRecordVector::Clear() { DeleteFrom(0); } +void CBaseRecordVector::DeleteBack() { Delete(_size - 1); } +void CBaseRecordVector::DeleteFrom(int index) { Delete(index, _size - index); } + +void CBaseRecordVector::ReserveOnePosition() +{ + if (_size != _capacity) + return; + unsigned delta = 1; + if (_capacity >= 64) + delta = (unsigned)_capacity / 4; + else if (_capacity >= 8) + delta = 8; + Reserve(_capacity + (int)delta); +} + +void CBaseRecordVector::Reserve(int newCapacity) +{ + // if (newCapacity <= _capacity) + if (newCapacity == _capacity) + return; + if ((unsigned)newCapacity >= ((unsigned)1 << (sizeof(unsigned) * 8 - 1))) + throw 1052353; + size_t newSize = (size_t)(unsigned)newCapacity * _itemSize; + if (newSize / _itemSize != (size_t)(unsigned)newCapacity) + throw 1052354; + unsigned char *p = NULL; + if (newSize > 0) + { + p = new unsigned char[newSize]; + if (p == 0) + throw 1052355; + int numRecordsToMove = (_size < newCapacity ? _size : newCapacity); + memcpy(p, _items, _itemSize * numRecordsToMove); + } + delete [](unsigned char *)_items; + _items = p; + _capacity = newCapacity; +} + +void CBaseRecordVector::ReserveDown() +{ + Reserve(_size); +} + +void CBaseRecordVector::MoveItems(int destIndex, int srcIndex) +{ + memmove(((unsigned char *)_items) + destIndex * _itemSize, + ((unsigned char *)_items) + srcIndex * _itemSize, + _itemSize * (_size - srcIndex)); +} + +void CBaseRecordVector::InsertOneItem(int index) +{ + ReserveOnePosition(); + MoveItems(index + 1, index); + _size++; +} + +void CBaseRecordVector::Delete(int index, int num) +{ + TestIndexAndCorrectNum(index, num); + if (num > 0) + { + MoveItems(index, index + num); + _size -= num; + } +} diff --git a/CPP/Common/MyVector.h b/CPP/Common/MyVector.h new file mode 100644 index 0000000..781b648 --- /dev/null +++ b/CPP/Common/MyVector.h @@ -0,0 +1,266 @@ +// Common/Vector.h + +#ifndef __COMMON_VECTOR_H +#define __COMMON_VECTOR_H + +#include "Defs.h" + +class CBaseRecordVector +{ + void MoveItems(int destIndex, int srcIndex); +protected: + int _capacity; + int _size; + void *_items; + size_t _itemSize; + + void ReserveOnePosition(); + void InsertOneItem(int index); + void TestIndexAndCorrectNum(int index, int &num) const + { if (index + num > _size) num = _size - index; } +public: + CBaseRecordVector(size_t itemSize): _capacity(0), _size(0), _items(0), _itemSize(itemSize) {} + virtual ~CBaseRecordVector(); + void ClearAndFree(); + int Size() const { return _size; } + bool IsEmpty() const { return (_size == 0); } + void Reserve(int newCapacity); + void ReserveDown(); + virtual void Delete(int index, int num = 1); + void Clear(); + void DeleteFrom(int index); + void DeleteBack(); +}; + +template +class CRecordVector: public CBaseRecordVector +{ +public: + CRecordVector(): CBaseRecordVector(sizeof(T)){}; + CRecordVector(const CRecordVector &v): CBaseRecordVector(sizeof(T)) { *this = v; } + CRecordVector& operator=(const CRecordVector &v) + { + Clear(); + return (*this += v); + } + CRecordVector& operator+=(const CRecordVector &v) + { + int size = v.Size(); + Reserve(Size() + size); + for (int i = 0; i < size; i++) + Add(v[i]); + return *this; + } + int Add(T item) + { + ReserveOnePosition(); + ((T *)_items)[_size] = item; + return _size++; + } + void Insert(int index, T item) + { + InsertOneItem(index); + ((T *)_items)[index] = item; + } + // T* GetPointer() const { return (T*)_items; } + // operator const T *() const { return _items; }; + const T& operator[](int index) const { return ((T *)_items)[index]; } + T& operator[](int index) { return ((T *)_items)[index]; } + const T& Front() const { return operator[](0); } + T& Front() { return operator[](0); } + const T& Back() const { return operator[](_size - 1); } + T& Back() { return operator[](_size - 1); } + + void Swap(int i, int j) + { + T temp = operator[](i); + operator[](i) = operator[](j); + operator[](j) = temp; + } + + int FindInSorted(const T& item, int left, int right) const + { + while (left != right) + { + int mid = (left + right) / 2; + const T& midValue = (*this)[mid]; + if (item == midValue) + return mid; + if (item < midValue) + right = mid; + else + left = mid + 1; + } + return -1; + } + + int FindInSorted(const T& item) const + { + int left = 0, right = Size(); + while (left != right) + { + int mid = (left + right) / 2; + const T& midValue = (*this)[mid]; + if (item == midValue) + return mid; + if (item < midValue) + right = mid; + else + left = mid + 1; + } + return -1; + } + + int AddToUniqueSorted(const T& item) + { + int left = 0, right = Size(); + while (left != right) + { + int mid = (left + right) / 2; + const T& midValue = (*this)[mid]; + if (item == midValue) + return mid; + if (item < midValue) + right = mid; + else + left = mid + 1; + } + Insert(right, item); + return right; + } + + static void SortRefDown(T* p, int k, int size, int (*compare)(const T*, const T*, void *), void *param) + { + T temp = p[k]; + for (;;) + { + int s = (k << 1); + if (s > size) + break; + if (s < size && compare(p + s + 1, p + s, param) > 0) + s++; + if (compare(&temp, p + s, param) >= 0) + break; + p[k] = p[s]; + k = s; + } + p[k] = temp; + } + + void Sort(int (*compare)(const T*, const T*, void *), void *param) + { + int size = _size; + if (size <= 1) + return; + T* p = (&Front()) - 1; + { + int i = size / 2; + do + SortRefDown(p, i, size, compare, param); + while (--i != 0); + } + do + { + T temp = p[size]; + p[size--] = p[1]; + p[1] = temp; + SortRefDown(p, 1, size, compare, param); + } + while (size > 1); + } +}; + +typedef CRecordVector CIntVector; +typedef CRecordVector CUIntVector; +typedef CRecordVector CBoolVector; +typedef CRecordVector CByteVector; +typedef CRecordVector CPointerVector; + +template +class CObjectVector: public CPointerVector +{ +public: + CObjectVector() {}; + ~CObjectVector() { Clear(); }; + CObjectVector(const CObjectVector &v): CPointerVector() { *this = v; } + CObjectVector& operator=(const CObjectVector &v) + { + Clear(); + return (*this += v); + } + CObjectVector& operator+=(const CObjectVector &v) + { + int size = v.Size(); + Reserve(Size() + size); + for (int i = 0; i < size; i++) + Add(v[i]); + return *this; + } + const T& operator[](int index) const { return *((T *)CPointerVector::operator[](index)); } + T& operator[](int index) { return *((T *)CPointerVector::operator[](index)); } + T& Front() { return operator[](0); } + const T& Front() const { return operator[](0); } + T& Back() { return operator[](_size - 1); } + const T& Back() const { return operator[](_size - 1); } + int Add(const T& item) { return CPointerVector::Add(new T(item)); } + void Insert(int index, const T& item) { CPointerVector::Insert(index, new T(item)); } + virtual void Delete(int index, int num = 1) + { + TestIndexAndCorrectNum(index, num); + for (int i = 0; i < num; i++) + delete (T *)(((void **)_items)[index + i]); + CPointerVector::Delete(index, num); + } + int Find(const T& item) const + { + for (int i = 0; i < Size(); i++) + if (item == (*this)[i]) + return i; + return -1; + } + int FindInSorted(const T& item) const + { + int left = 0, right = Size(); + while (left != right) + { + int mid = (left + right) / 2; + const T& midValue = (*this)[mid]; + if (item == midValue) + return mid; + if (item < midValue) + right = mid; + else + left = mid + 1; + } + return -1; + } + int AddToSorted(const T& item) + { + int left = 0, right = Size(); + while (left != right) + { + int mid = (left + right) / 2; + const T& midValue = (*this)[mid]; + if (item == midValue) + { + right = mid + 1; + break; + } + if (item < midValue) + right = mid; + else + left = mid + 1; + } + Insert(right, item); + return right; + } + + void Sort(int (*compare)(void *const *, void *const *, void *), void *param) + { CPointerVector::Sort(compare, param); } + + static int CompareObjectItems(void *const *a1, void *const *a2, void * /* param */) + { return MyCompare(*(*((const T **)a1)), *(*((const T **)a2))); } + void Sort() { CPointerVector::Sort(CompareObjectItems, 0); } +}; + +#endif diff --git a/CPP/Common/MyWindows.cpp b/CPP/Common/MyWindows.cpp new file mode 100644 index 0000000..bee4acd --- /dev/null +++ b/CPP/Common/MyWindows.cpp @@ -0,0 +1,111 @@ +// MyWindows.cpp + +#include "StdAfx.h" + +#ifndef _WIN32 + +#include "MyWindows.h" +#include "Types.h" +#include /* FIXED */ + +static inline void *AllocateForBSTR(size_t cb) { return ::malloc(cb); } +static inline void FreeForBSTR(void *pv) { ::free(pv);} + +static UINT MyStringLen(const wchar_t *s) +{ + UINT i; + for (i = 0; s[i] != '\0'; i++); + return i; +} + +BSTR SysAllocStringByteLen(LPCSTR psz, UINT len) +{ + // FIXED int realLen = len + sizeof(UINT) + 3; + const int LEN_ADDON = sizeof(wchar_t) - 1; + int realLen = len + sizeof(UINT) + sizeof(wchar_t) + LEN_ADDON; + void *p = AllocateForBSTR(realLen); + if (p == 0) + return 0; + *(UINT *)p = len; + // "void *" instead of "BSTR" to avoid unaligned copy of "wchar_t" because of optimizer on Solaris + void * bstr = (void *)((UINT *)p + 1); + if (psz) memmove(bstr, psz, len); // psz does not always have "wchar_t" alignment. + void *pb = (void *)(((Byte *)bstr) + len); + memset(pb,0,sizeof(wchar_t) + LEN_ADDON); + return (BSTR)bstr; +} + +BSTR SysAllocString(const OLECHAR *sz) +{ + if (sz == 0) + return 0; + UINT strLen = MyStringLen(sz); + UINT len = (strLen + 1) * sizeof(OLECHAR); + void *p = AllocateForBSTR(len + sizeof(UINT)); + if (p == 0) + return 0; + *(UINT *)p = strLen * sizeof(OLECHAR); // FIXED + void * bstr = (void *)((UINT *)p + 1); + memmove(bstr, sz, len); // sz does not always have "wchar_t" alignment. + return (BSTR)bstr; +} + +void SysFreeString(BSTR bstr) +{ + if (bstr != 0) + FreeForBSTR((UINT *)bstr - 1); +} + +UINT SysStringByteLen(BSTR bstr) +{ + if (bstr == 0) + return 0; + return *((UINT *)bstr - 1); + +} + +UINT SysStringLen(BSTR bstr) +{ + return SysStringByteLen(bstr) / sizeof(OLECHAR); +} + +HRESULT VariantClear(VARIANTARG *prop) +{ + if (prop->vt == VT_BSTR) + SysFreeString(prop->bstrVal); + prop->vt = VT_EMPTY; + return S_OK; +} + +HRESULT VariantCopy(VARIANTARG *dest, VARIANTARG *src) +{ + HRESULT res = ::VariantClear(dest); + if (res != S_OK) + return res; + if (src->vt == VT_BSTR) + { + dest->bstrVal = SysAllocStringByteLen((LPCSTR)src->bstrVal, + SysStringByteLen(src->bstrVal)); + if (dest->bstrVal == 0) + return E_OUTOFMEMORY; + dest->vt = VT_BSTR; + } + else + *dest = *src; + return S_OK; +} + +LONG CompareFileTime(const FILETIME* ft1, const FILETIME* ft2) +{ + if(ft1->dwHighDateTime < ft2->dwHighDateTime) + return -1; + if(ft1->dwHighDateTime > ft2->dwHighDateTime) + return 1; + if(ft1->dwLowDateTime < ft2->dwLowDateTime) + return -1; + if(ft1->dwLowDateTime > ft2->dwLowDateTime) + return 1; + return 0; +} + +#endif diff --git a/CPP/Common/MyWindows.h b/CPP/Common/MyWindows.h new file mode 100644 index 0000000..d91f10f --- /dev/null +++ b/CPP/Common/MyWindows.h @@ -0,0 +1,218 @@ +// MyWindows.h + +#ifndef __MYWINDOWS_H +#define __MYWINDOWS_H + +#ifdef _WIN32 + +#include + +#else + +#include // for wchar_t +#include + +#include "MyGuidDef.h" + +typedef char CHAR; +typedef unsigned char UCHAR; + +#undef BYTE +typedef unsigned char BYTE; + +typedef short SHORT; +typedef unsigned short USHORT; + +#undef WORD +typedef unsigned short WORD; +typedef short VARIANT_BOOL; + +typedef int INT; +typedef Int32 INT32; +typedef unsigned int UINT; +typedef UInt32 UINT32; +typedef INT32 LONG; // LONG, ULONG and DWORD must be 32-bit +typedef UINT32 ULONG; + +#undef DWORD +typedef UINT32 DWORD; + +typedef Int64 LONGLONG; +typedef UInt64 ULONGLONG; + +typedef struct LARGE_INTEGER { LONGLONG QuadPart; }LARGE_INTEGER; +typedef struct _ULARGE_INTEGER { ULONGLONG QuadPart;} ULARGE_INTEGER; + +typedef const CHAR *LPCSTR; + +typedef wchar_t WCHAR; + +#ifdef _UNICODE +typedef WCHAR TCHAR; +#define lstrcpy wcscpy +#define lstrcat wcscat +#define lstrlen wcslen +#else +typedef CHAR TCHAR; +#define lstrcpy strcpy +#define lstrcat strcat +#define lstrlen strlen +#endif +#define _wcsicmp(str1,str2) MyStringCompareNoCase(str1,str2) + +typedef const TCHAR *LPCTSTR; +typedef WCHAR OLECHAR; +typedef const WCHAR *LPCWSTR; +typedef OLECHAR *BSTR; +typedef const OLECHAR *LPCOLESTR; +typedef OLECHAR *LPOLESTR; + +typedef struct _FILETIME +{ + DWORD dwLowDateTime; + DWORD dwHighDateTime; +}FILETIME; + +#define HRESULT LONG +#define FAILED(Status) ((HRESULT)(Status)<0) +typedef ULONG PROPID; +typedef LONG SCODE; + +#define S_OK ((HRESULT)0x00000000L) +#define S_FALSE ((HRESULT)0x00000001L) +#define E_NOTIMPL ((HRESULT)0x80004001L) +#define E_NOINTERFACE ((HRESULT)0x80004002L) +#define E_ABORT ((HRESULT)0x80004004L) +#define E_FAIL ((HRESULT)0x80004005L) +#define STG_E_INVALIDFUNCTION ((HRESULT)0x80030001L) +#define E_OUTOFMEMORY ((HRESULT)0x8007000EL) +#define E_INVALIDARG ((HRESULT)0x80070057L) + +#ifdef _MSC_VER +#define STDMETHODCALLTYPE __stdcall +#else +#define STDMETHODCALLTYPE +#endif + +#define STDMETHOD_(t, f) virtual t STDMETHODCALLTYPE f +#define STDMETHOD(f) STDMETHOD_(HRESULT, f) +#define STDMETHODIMP_(type) type STDMETHODCALLTYPE +#define STDMETHODIMP STDMETHODIMP_(HRESULT) + +#define PURE = 0 + +#define MIDL_INTERFACE(x) struct + +#ifdef __cplusplus + +DEFINE_GUID(IID_IUnknown, +0x00000000, 0x0000, 0x0000, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46); +struct IUnknown +{ + STDMETHOD(QueryInterface) (REFIID iid, void **outObject) PURE; + STDMETHOD_(ULONG, AddRef)() PURE; + STDMETHOD_(ULONG, Release)() PURE; + #ifndef _WIN32 + virtual ~IUnknown() {} + #endif +}; + +typedef IUnknown *LPUNKNOWN; + +#endif + +#define VARIANT_TRUE ((VARIANT_BOOL)-1) +#define VARIANT_FALSE ((VARIANT_BOOL)0) + +enum VARENUM +{ + VT_EMPTY = 0, + VT_NULL = 1, + VT_I2 = 2, + VT_I4 = 3, + VT_R4 = 4, + VT_R8 = 5, + VT_CY = 6, + VT_DATE = 7, + VT_BSTR = 8, + VT_DISPATCH = 9, + VT_ERROR = 10, + VT_BOOL = 11, + VT_VARIANT = 12, + VT_UNKNOWN = 13, + VT_DECIMAL = 14, + VT_I1 = 16, + VT_UI1 = 17, + VT_UI2 = 18, + VT_UI4 = 19, + VT_I8 = 20, + VT_UI8 = 21, + VT_INT = 22, + VT_UINT = 23, + VT_VOID = 24, + VT_HRESULT = 25, + VT_FILETIME = 64 +}; + +typedef unsigned short VARTYPE; +typedef WORD PROPVAR_PAD1; +typedef WORD PROPVAR_PAD2; +typedef WORD PROPVAR_PAD3; + +#ifdef __cplusplus + +typedef struct tagPROPVARIANT +{ + VARTYPE vt; + PROPVAR_PAD1 wReserved1; + PROPVAR_PAD2 wReserved2; + PROPVAR_PAD3 wReserved3; + union + { + CHAR cVal; + UCHAR bVal; + SHORT iVal; + USHORT uiVal; + LONG lVal; + ULONG ulVal; + INT intVal; + UINT uintVal; + LARGE_INTEGER hVal; + ULARGE_INTEGER uhVal; + VARIANT_BOOL boolVal; + SCODE scode; + FILETIME filetime; + BSTR bstrVal; + }; +} PROPVARIANT; + +typedef PROPVARIANT tagVARIANT; +typedef tagVARIANT VARIANT; +typedef VARIANT VARIANTARG; + +MY_EXTERN_C HRESULT VariantClear(VARIANTARG *prop); +MY_EXTERN_C HRESULT VariantCopy(VARIANTARG *dest, VARIANTARG *src); + +#endif + +MY_EXTERN_C BSTR SysAllocStringByteLen(LPCSTR psz, UINT len); +MY_EXTERN_C BSTR SysAllocString(const OLECHAR *sz); +MY_EXTERN_C void SysFreeString(BSTR bstr); +MY_EXTERN_C UINT SysStringByteLen(BSTR bstr); +MY_EXTERN_C UINT SysStringLen(BSTR bstr); + +/* MY_EXTERN_C DWORD GetLastError(); */ +MY_EXTERN_C LONG CompareFileTime(const FILETIME* ft1, const FILETIME* ft2); + +#define CP_ACP 0 +#define CP_OEMCP 1 + +typedef enum tagSTREAM_SEEK +{ + STREAM_SEEK_SET = 0, + STREAM_SEEK_CUR = 1, + STREAM_SEEK_END = 2 +} STREAM_SEEK; + +#endif +#endif diff --git a/CPP/Common/MyXml.cpp b/CPP/Common/MyXml.cpp new file mode 100644 index 0000000..8aa9ce8 --- /dev/null +++ b/CPP/Common/MyXml.cpp @@ -0,0 +1,209 @@ +// MyXml.cpp + +#include "StdAfx.h" + +#include "MyXml.h" + +static bool IsValidChar(char c) +{ + return + c >= 'a' && c <= 'z' || + c >= 'A' && c <= 'Z' || + c >= '0' && c <= '9' || + c == '-'; +} + +static bool IsSpaceChar(char c) +{ + return (c == ' ' || c == '\t' || c == 0x0D || c == 0x0A); +} + +#define SKIP_SPACES(s, pos) while (IsSpaceChar(s[pos])) pos++; + +static bool ReadProperty(const AString &s, int &pos, CXmlProp &prop) +{ + prop.Name.Empty(); + prop.Value.Empty(); + for (; pos < s.Length(); pos++) + { + char c = s[pos]; + if (!IsValidChar(c)) + break; + prop.Name += c; + } + + if (prop.Name.IsEmpty()) + return false; + + SKIP_SPACES(s, pos); + if (s[pos++] != '=') + return false; + + SKIP_SPACES(s, pos); + if (s[pos++] != '\"') + return false; + + while (pos < s.Length()) + { + char c = s[pos++]; + if (c == '\"') + return true; + prop.Value += c; + } + return false; +} + +int CXmlItem::FindProperty(const AString &propName) const +{ + for (int i = 0; i < Props.Size(); i++) + if (Props[i].Name == propName) + return i; + return -1; +} + +AString CXmlItem::GetPropertyValue(const AString &propName) const +{ + int index = FindProperty(propName); + if (index >= 0) + return Props[index].Value; + return AString(); +} + +bool CXmlItem::IsTagged(const AString &tag) const +{ + return (IsTag && Name == tag); +} + +int CXmlItem::FindSubTag(const AString &tag) const +{ + for (int i = 0; i < SubItems.Size(); i++) + if (SubItems[i].IsTagged(tag)) + return i; + return -1; +} + +AString CXmlItem::GetSubString() const +{ + if (SubItems.Size() == 1) + { + const CXmlItem &item = SubItems[0]; + if (!item.IsTag) + return item.Name; + } + return AString(); +} + +AString CXmlItem::GetSubStringForTag(const AString &tag) const +{ + int index = FindSubTag(tag); + if (index >= 0) + return SubItems[index].GetSubString(); + return AString(); +} + +bool CXmlItem::ParseItems(const AString &s, int &pos, int numAllowedLevels) +{ + if (numAllowedLevels == 0) + return false; + SubItems.Clear(); + AString finishString = "'); + } + if (s[pos] == '>') + { + if (!ParseItems(s, ++pos, numAllowedLevels)) + return false; + AString finishString = AString(""); + if (s.Mid(pos, finishString.Length()) != finishString) + return false; + pos += finishString.Length(); + return true; + } + if (posTemp == pos) + return false; + + CXmlProp prop; + if (!ReadProperty(s, pos, prop)) + return false; + Props.Add(prop); + posTemp = pos; + } +} + +static bool SkipHeader(const AString &s, int &pos, const AString &startString, const AString &endString) +{ + SKIP_SPACES(s, pos); + if (s.Mid(pos, startString.Length()) == startString) + { + pos = s.Find(endString, pos); + if (pos < 0) + return false; + pos += endString.Length(); + SKIP_SPACES(s, pos); + } + return true; +} + +bool CXml::Parse(const AString &s) +{ + int pos = 0; + if (!SkipHeader(s, pos, "")) + return false; + if (!SkipHeader(s, pos, "")) + return false; + if (!Root.ParseItem(s, pos, 1000)) + return false; + SKIP_SPACES(s, pos); + return (pos == s.Length() && Root.IsTag); +} diff --git a/CPP/Common/MyXml.h b/CPP/Common/MyXml.h new file mode 100644 index 0000000..c6e8829 --- /dev/null +++ b/CPP/Common/MyXml.h @@ -0,0 +1,40 @@ +// MyXml.h + +#ifndef __MYXML_H +#define __MYXML_H + +#include "MyString.h" + +struct CXmlProp +{ + AString Name; + AString Value; +}; + +class CXmlItem +{ + bool ParseItems(const AString &s, int &pos, int numAllowedLevels); + +public: + AString Name; + bool IsTag; + CObjectVector Props; + CObjectVector SubItems; + + bool ParseItem(const AString &s, int &pos, int numAllowedLevels); + + bool IsTagged(const AString &tag) const; + int FindProperty(const AString &propName) const; + AString GetPropertyValue(const AString &propName) const; + AString GetSubString() const; + int FindSubTag(const AString &tag) const; + AString GetSubStringForTag(const AString &tag) const; +}; + +struct CXml +{ + CXmlItem Root; + bool Parse(const AString &s); +}; + +#endif diff --git a/CPP/Common/NewHandler.h b/CPP/Common/NewHandler.h new file mode 100644 index 0000000..215ba05 --- /dev/null +++ b/CPP/Common/NewHandler.h @@ -0,0 +1,16 @@ +// Common/NewHandler.h + +#ifndef __COMMON_NEWHANDLER_H +#define __COMMON_NEWHANDLER_H + +class CNewException {}; + +#ifdef _WIN32 +void +#ifdef _MSC_VER +__cdecl +#endif +operator delete(void *p) throw(); +#endif + +#endif diff --git a/CPP/Common/StdInStream.cpp b/CPP/Common/StdInStream.cpp new file mode 100644 index 0000000..78897e5 --- /dev/null +++ b/CPP/Common/StdInStream.cpp @@ -0,0 +1,100 @@ +// Common/StdInStream.cpp + +#include "StdAfx.h" + +#include +#include "StdInStream.h" + +#ifdef _MSC_VER +// "was declared deprecated" disabling +#pragma warning(disable : 4996 ) +#endif + +#ifdef _UNICODE +#include "Common/StringConvert.h" +#define NEED_NAME_WINDOWS_TO_UNIX +#include "myPrivate.h" +#endif + +static const char kIllegalChar = '\0'; +static const char kNewLineChar = '\n'; + +static const char *kEOFMessage = "Unexpected end of input stream"; +static const char *kReadErrorMessage ="Error reading input stream"; +static const char *kIllegalCharMessage = "Illegal character in input stream"; + +static const char * kFileOpenMode = "r"; + +CStdInStream g_StdIn(stdin); + +bool CStdInStream::Open(LPCTSTR fileName) +{ + Close(); +#ifdef _UNICODE + AString aStr = UnicodeStringToMultiByte(fileName, CP_ACP); // FIXME + const char * name = nameWindowToUnix(aStr); +#else + const char * name = nameWindowToUnix(fileName); +#endif + _stream = fopen(name, kFileOpenMode); + _streamIsOpen = (_stream != 0); + return _streamIsOpen; +} + +bool CStdInStream::Close() +{ + if (!_streamIsOpen) + return true; + _streamIsOpen = (fclose(_stream) != 0); + return !_streamIsOpen; +} + +CStdInStream::~CStdInStream() +{ + Close(); +} + +AString CStdInStream::ScanStringUntilNewLine(bool allowEOF) +{ + AString s; + for (;;) + { + int intChar = GetChar(); + if (intChar == EOF) + { + if (allowEOF) + break; + throw kEOFMessage; + } + char c = char(intChar); + if (c == kIllegalChar) + throw kIllegalCharMessage; + if (c == kNewLineChar) + break; + s += c; + } + return s; +} + +void CStdInStream::ReadToString(AString &resultString) +{ + resultString.Empty(); + int c; + while ((c = GetChar()) != EOF) + resultString += char(c); +} + +bool CStdInStream::Eof() +{ + return (feof(_stream) != 0); +} + +int CStdInStream::GetChar() +{ + int c = fgetc(_stream); // getc() doesn't work in BeOS? + if (c == EOF && !Eof()) + throw kReadErrorMessage; + return c; +} + + diff --git a/CPP/Common/StdInStream.h b/CPP/Common/StdInStream.h new file mode 100644 index 0000000..0d182cc --- /dev/null +++ b/CPP/Common/StdInStream.h @@ -0,0 +1,32 @@ +// Common/StdInStream.h + +#ifndef __COMMON_STDINSTREAM_H +#define __COMMON_STDINSTREAM_H + +#include + +#include "MyString.h" +#include "Types.h" + +class CStdInStream +{ + bool _streamIsOpen; + FILE *_stream; +public: + CStdInStream(): _streamIsOpen(false) {}; + CStdInStream(FILE *stream): _streamIsOpen(false), _stream(stream) {}; + ~CStdInStream(); + bool Open(LPCTSTR fileName); + bool Close(); + + AString ScanStringUntilNewLine(bool allowEOF = false); + void ReadToString(AString &resultString); + UString ScanUStringUntilNewLine(); + + bool Eof(); + int GetChar(); +}; + +extern CStdInStream g_StdIn; + +#endif diff --git a/CPP/Common/StdOutStream.cpp b/CPP/Common/StdOutStream.cpp new file mode 100644 index 0000000..b93e255 --- /dev/null +++ b/CPP/Common/StdOutStream.cpp @@ -0,0 +1,93 @@ +// Common/StdOutStream.cpp + +#include "StdAfx.h" + +#include + +#include "StdOutStream.h" +#include "IntToString.h" +#include "StringConvert.h" + +#ifdef _MSC_VER +// "was declared deprecated" disabling +#pragma warning(disable : 4996 ) +#endif + +static const char kNewLineChar = '\n'; + +static const char *kFileOpenMode = "wt"; + +CStdOutStream g_StdOut(stdout); +CStdOutStream g_StdErr(stderr); + +bool CStdOutStream::Open(const char *fileName) +{ + Close(); + _stream = fopen(fileName, kFileOpenMode); + _streamIsOpen = (_stream != 0); + return _streamIsOpen; +} + +bool CStdOutStream::Close() +{ + if (!_streamIsOpen) + return true; + if (fclose(_stream) != 0) + return false; + _stream = 0; + _streamIsOpen = false; + return true; +} + +bool CStdOutStream::Flush() +{ + return (fflush(_stream) == 0); +} + +CStdOutStream::~CStdOutStream () +{ + Close(); +} + +CStdOutStream & CStdOutStream::operator<<(CStdOutStream & (*aFunction)(CStdOutStream &)) +{ + (*aFunction)(*this); + return *this; +} + +CStdOutStream & endl(CStdOutStream & outStream) +{ + return outStream << kNewLineChar; +} + +CStdOutStream & CStdOutStream::operator<<(const char *string) +{ + fputs(string, _stream); + return *this; +} + +CStdOutStream & CStdOutStream::operator<<(const wchar_t *string) +{ + *this << (const char *)UnicodeStringToMultiByte(string, CP_OEMCP); + return *this; +} + +CStdOutStream & CStdOutStream::operator<<(char c) +{ + fputc(c, _stream); + return *this; +} + +CStdOutStream & CStdOutStream::operator<<(int number) +{ + char textString[32]; + ConvertInt64ToString(number, textString); + return operator<<(textString); +} + +CStdOutStream & CStdOutStream::operator<<(UInt64 number) +{ + char textString[32]; + ConvertUInt64ToString(number, textString); + return operator<<(textString); +} diff --git a/CPP/Common/StdOutStream.h b/CPP/Common/StdOutStream.h new file mode 100644 index 0000000..b0b2c61 --- /dev/null +++ b/CPP/Common/StdOutStream.h @@ -0,0 +1,35 @@ +// Common/StdOutStream.h + +#ifndef __COMMON_STDOUTSTREAM_H +#define __COMMON_STDOUTSTREAM_H + +#include + +#include "Types.h" + +class CStdOutStream +{ + bool _streamIsOpen; + FILE *_stream; +public: + CStdOutStream (): _streamIsOpen(false), _stream(0) {}; + CStdOutStream (FILE *stream): _streamIsOpen(false), _stream(stream) {}; + ~CStdOutStream (); + operator FILE *() { return _stream; } + bool Open(const char *fileName); + bool Close(); + bool Flush(); + CStdOutStream & operator<<(CStdOutStream & (* aFunction)(CStdOutStream &)); + CStdOutStream & operator<<(const char *string); + CStdOutStream & operator<<(const wchar_t *string); + CStdOutStream & operator<<(char c); + CStdOutStream & operator<<(int number); + CStdOutStream & operator<<(UInt64 number); +}; + +CStdOutStream & endl(CStdOutStream & outStream); + +extern CStdOutStream g_StdOut; +extern CStdOutStream g_StdErr; + +#endif diff --git a/CPP/Common/StringConvert.cpp b/CPP/Common/StringConvert.cpp new file mode 100644 index 0000000..dc7dc26 --- /dev/null +++ b/CPP/Common/StringConvert.cpp @@ -0,0 +1,181 @@ +// Common/StringConvert.cpp + +#include "StdAfx.h" +#include + +#include "StringConvert.h" +extern "C" +{ +int global_use_utf16_conversion = 0; +} + + +#ifdef LOCALE_IS_UTF8 + +#ifdef __APPLE_CC__ +#define UInt32 macUIn32 +#include +#undef UInt32 + +UString MultiByteToUnicodeString(const AString &srcString, UINT codePage) +{ + if (!srcString.IsEmpty()) + { + UString resultString; + const char * path = &srcString[0]; + +// FIXME size_t n = strlen(path); + + CFStringRef cfpath = CFStringCreateWithCString(NULL,path,kCFStringEncodingUTF8); + + if (cfpath) + { + + CFMutableStringRef cfpath2 = CFStringCreateMutableCopy(NULL,0,cfpath); + CFRelease(cfpath); + CFStringNormalize(cfpath2,kCFStringNormalizationFormC); + + size_t n = CFStringGetLength(cfpath2); + for(size_t i = 0 ; i< n ;i++) { + resultString += CFStringGetCharacterAtIndex(cfpath2,i); + } + + CFRelease(cfpath2); + + return resultString; + } + } + + UString resultString; + for (int i = 0; i < srcString.Length(); i++) + resultString += wchar_t(srcString[i] & 255); + + return resultString; +} + +AString UnicodeStringToMultiByte(const UString &srcString, UINT codePage) +{ + if (!srcString.IsEmpty()) + { + const wchar_t * wcs = &srcString[0]; + char utf8[4096]; + UniChar unipath[4096]; + + size_t n = wcslen(wcs); + + for(size_t i = 0 ; i<= n ;i++) { + unipath[i] = wcs[i]; + } + + CFStringRef cfpath = CFStringCreateWithCharacters(NULL,unipath,n); + + CFMutableStringRef cfpath2 = CFStringCreateMutableCopy(NULL,0,cfpath); + CFRelease(cfpath); + CFStringNormalize(cfpath2,kCFStringNormalizationFormD); + + CFStringGetCString(cfpath2,(char *)utf8,4096,kCFStringEncodingUTF8); + + CFRelease(cfpath2); + + return AString(utf8); + } + + AString resultString; + for (int i = 0; i < srcString.Length(); i++) + { + if (srcString[i] >= 256) resultString += '?'; + else resultString += char(srcString[i]); + } + return resultString; +} + +#else /* __APPLE_CC__ */ + + +#include "UTFConvert.h" + +UString MultiByteToUnicodeString(const AString &srcString, UINT codePage) +{ + if ((global_use_utf16_conversion) && (!srcString.IsEmpty())) + { + UString resultString; + bool bret = ConvertUTF8ToUnicode(srcString,resultString); + if (bret) return resultString; + } + + UString resultString; + for (int i = 0; i < srcString.Length(); i++) + resultString += wchar_t(srcString[i] & 255); + + return resultString; +} + +AString UnicodeStringToMultiByte(const UString &srcString, UINT codePage) +{ + if ((global_use_utf16_conversion) && (!srcString.IsEmpty())) + { + AString resultString; + bool bret = ConvertUnicodeToUTF8(srcString,resultString); + if (bret) return resultString; + } + + AString resultString; + for (int i = 0; i < srcString.Length(); i++) + { + if (srcString[i] >= 256) resultString += '?'; + else resultString += char(srcString[i]); + } + return resultString; +} + +#endif /* __APPLE_CC__ */ + +#else /* LOCALE_IS_UTF8 */ + +UString MultiByteToUnicodeString(const AString &srcString, UINT /* codePage */ ) +{ +#ifdef ENV_HAVE_MBSTOWCS + if ((global_use_utf16_conversion) && (!srcString.IsEmpty())) + { + UString resultString; + int numChars = mbstowcs(resultString.GetBuffer(srcString.Length()),srcString,srcString.Length()+1); + if (numChars >= 0) { + resultString.ReleaseBuffer(numChars); + return resultString; + } + } +#endif + + UString resultString; + for (int i = 0; i < srcString.Length(); i++) + resultString += wchar_t(srcString[i] & 255); + + return resultString; +} + +AString UnicodeStringToMultiByte(const UString &srcString, UINT /* codePage */ ) +{ +#ifdef ENV_HAVE_WCSTOMBS + if ((global_use_utf16_conversion) && (!srcString.IsEmpty())) + { + AString resultString; + int numRequiredBytes = srcString.Length() * 6+1; + int numChars = wcstombs(resultString.GetBuffer(numRequiredBytes),srcString,numRequiredBytes); + if (numChars >= 0) { + resultString.ReleaseBuffer(numChars); + return resultString; + } + } +#endif + + AString resultString; + for (int i = 0; i < srcString.Length(); i++) + { + if (srcString[i] >= 256) resultString += '?'; + else resultString += char(srcString[i]); + } + return resultString; +} + +#endif /* LOCALE_IS_UTF8 */ + diff --git a/CPP/Common/StringConvert.h b/CPP/Common/StringConvert.h new file mode 100644 index 0000000..cd737be --- /dev/null +++ b/CPP/Common/StringConvert.h @@ -0,0 +1,73 @@ +// Common/StringConvert.h + +#ifndef __COMMON_STRING_CONVERT_H +#define __COMMON_STRING_CONVERT_H + +#include "MyWindows.h" +#include "MyString.h" +#include "Types.h" + +UString MultiByteToUnicodeString(const AString &srcString, UINT codePage = CP_ACP); +AString UnicodeStringToMultiByte(const UString &srcString, UINT codePage, char defaultChar, bool &defaultCharWasUsed); +AString UnicodeStringToMultiByte(const UString &srcString, UINT codePage = CP_ACP); + + +inline const wchar_t* GetUnicodeString(const wchar_t* unicodeString) + { return unicodeString; } +inline const UString& GetUnicodeString(const UString &unicodeString) + { return unicodeString; } +inline UString GetUnicodeString(const AString &ansiString) + { return MultiByteToUnicodeString(ansiString); } +inline UString GetUnicodeString(const AString &multiByteString, UINT codePage) + { return MultiByteToUnicodeString(multiByteString, codePage); } +inline const wchar_t* GetUnicodeString(const wchar_t* unicodeString, UINT) + { return unicodeString; } +inline const UString& GetUnicodeString(const UString &unicodeString, UINT) + { return unicodeString; } + +inline const char* GetAnsiString(const char* ansiString) + { return ansiString; } +inline const AString& GetAnsiString(const AString &ansiString) + { return ansiString; } +inline AString GetAnsiString(const UString &unicodeString) + { return UnicodeStringToMultiByte(unicodeString); } + +inline const char* GetOemString(const char* oemString) + { return oemString; } +inline const AString& GetOemString(const AString &oemString) + { return oemString; } +inline AString GetOemString(const UString &unicodeString) + { return UnicodeStringToMultiByte(unicodeString, CP_OEMCP); } + + +#ifdef _UNICODE + inline const wchar_t* GetSystemString(const wchar_t* unicodeString) + { return unicodeString;} + inline const UString& GetSystemString(const UString &unicodeString) + { return unicodeString;} + inline const wchar_t* GetSystemString(const wchar_t* unicodeString, UINT /* codePage */) + { return unicodeString;} + inline const UString& GetSystemString(const UString &unicodeString, UINT /* codePage */) + { return unicodeString;} + inline UString GetSystemString(const AString &multiByteString, UINT codePage) + { return MultiByteToUnicodeString(multiByteString, codePage);} + inline UString GetSystemString(const AString &multiByteString) + { return MultiByteToUnicodeString(multiByteString);} +#else + inline const char* GetSystemString(const char *ansiString) + { return ansiString; } + inline const AString& GetSystemString(const AString &multiByteString, UINT) + { return multiByteString; } + inline const char * GetSystemString(const char *multiByteString, UINT) + { return multiByteString; } + inline AString GetSystemString(const UString &unicodeString) + { return UnicodeStringToMultiByte(unicodeString); } + inline AString GetSystemString(const UString &unicodeString, UINT codePage) + { return UnicodeStringToMultiByte(unicodeString, codePage); } +#endif + +#ifndef UNDER_CE +AString SystemStringToOemString(const CSysString &srcString); +#endif + +#endif diff --git a/CPP/Common/StringToInt.cpp b/CPP/Common/StringToInt.cpp new file mode 100644 index 0000000..9473766 --- /dev/null +++ b/CPP/Common/StringToInt.cpp @@ -0,0 +1,90 @@ +// Common/StringToInt.cpp + +#include "StdAfx.h" + +#include "StringToInt.h" + +UInt64 ConvertStringToUInt64(const char *s, const char **end) +{ + UInt64 result = 0; + for (;;) + { + char c = *s; + if (c < '0' || c > '9') + { + if (end != NULL) + *end = s; + return result; + } + result *= 10; + result += (c - '0'); + s++; + } +} + +UInt64 ConvertOctStringToUInt64(const char *s, const char **end) +{ + UInt64 result = 0; + for (;;) + { + char c = *s; + if (c < '0' || c > '7') + { + if (end != NULL) + *end = s; + return result; + } + result <<= 3; + result += (c - '0'); + s++; + } +} + +UInt64 ConvertHexStringToUInt64(const char *s, const char **end) +{ + UInt64 result = 0; + for (;;) + { + char c = *s; + UInt32 v; + if (c >= '0' && c <= '9') v = (c - '0'); + else if (c >= 'A' && c <= 'F') v = 10 + (c - 'A'); + else if (c >= 'a' && c <= 'f') v = 10 + (c - 'a'); + else + { + if (end != NULL) + *end = s; + return result; + } + result <<= 4; + result |= v; + s++; + } +} + + +UInt64 ConvertStringToUInt64(const wchar_t *s, const wchar_t **end) +{ + UInt64 result = 0; + for (;;) + { + wchar_t c = *s; + if (c < '0' || c > '9') + { + if (end != NULL) + *end = s; + return result; + } + result *= 10; + result += (c - '0'); + s++; + } +} + + +Int64 ConvertStringToInt64(const char *s, const char **end) +{ + if (*s == '-') + return -(Int64)ConvertStringToUInt64(s + 1, end); + return ConvertStringToUInt64(s, end); +} diff --git a/CPP/Common/StringToInt.h b/CPP/Common/StringToInt.h new file mode 100644 index 0000000..c0d860e --- /dev/null +++ b/CPP/Common/StringToInt.h @@ -0,0 +1,18 @@ +// Common/StringToInt.h + +#ifndef __COMMON_STRINGTOINT_H +#define __COMMON_STRINGTOINT_H + +#include +#include "Types.h" + +UInt64 ConvertStringToUInt64(const char *s, const char **end); +UInt64 ConvertOctStringToUInt64(const char *s, const char **end); +UInt64 ConvertHexStringToUInt64(const char *s, const char **end); +UInt64 ConvertStringToUInt64(const wchar_t *s, const wchar_t **end); + +Int64 ConvertStringToInt64(const char *s, const char **end); + +#endif + + diff --git a/CPP/Common/TextConfig.cpp b/CPP/Common/TextConfig.cpp new file mode 100644 index 0000000..6a55012 --- /dev/null +++ b/CPP/Common/TextConfig.cpp @@ -0,0 +1,138 @@ +// Common/TextConfig.cpp + +#include "StdAfx.h" + +#include "TextConfig.h" + +#include "Defs.h" +#include "UTFConvert.h" + +static bool IsDelimitChar(char c) +{ + return (c == ' ' || c == 0x0A || c == 0x0D || + c == '\0' || c == '\t'); +} + +static AString GetIDString(const char *string, int &finishPos) +{ + AString result; + for (finishPos = 0; ; finishPos++) + { + char c = string[finishPos]; + if (IsDelimitChar(c) || c == '=') + break; + result += c; + } + return result; +} + +static bool WaitNextLine(const AString &string, int &pos) +{ + for (;pos < string.Length(); pos++) + if (string[pos] == 0x0A) + return true; + return false; +} + +static bool SkipSpaces(const AString &string, int &pos) +{ + for (;pos < string.Length(); pos++) + { + char c = string[pos]; + if (!IsDelimitChar(c)) + { + if (c != ';') + return true; + if (!WaitNextLine(string, pos)) + return false; + } + } + return false; +} + +bool GetTextConfig(const AString &string, CObjectVector &pairs) +{ + pairs.Clear(); + int pos = 0; + + ///////////////////// + // read strings + + for (;;) + { + if (!SkipSpaces(string, pos)) + break; + CTextConfigPair pair; + int finishPos; + AString temp = GetIDString(((const char *)string) + pos, finishPos); + if (!ConvertUTF8ToUnicode(temp, pair.ID)) + return false; + if (finishPos == 0) + return false; + pos += finishPos; + if (!SkipSpaces(string, pos)) + return false; + if (string[pos] != '=') + return false; + pos++; + if (!SkipSpaces(string, pos)) + return false; + if (string[pos] != '\"') + return false; + pos++; + AString message; + for (;;) + { + if (pos >= string.Length()) + return false; + char c = string[pos++]; + if (c == '\"') + break; + if (c == '\\') // FIXME ? + { + char c = string[pos++]; + switch(c) + { + case 'n': + message += '\n'; + break; + case 't': + message += '\t'; + break; + case '\\': // FIXME ? + message += '\\'; + break; + case '\"': + message += '\"'; + break; + default: + message += '\\'; // FIXME ? + message += c; + break; + } + } + else + message += c; + } + if (!ConvertUTF8ToUnicode(message, pair.String)) + return false; + pairs.Add(pair); + } + return true; +} + +int FindTextConfigItem(const CObjectVector &pairs, const UString &id) +{ + for (int i = 0; i < pairs.Size(); i++) + if (pairs[i].ID.Compare(id) == 0) + return i; + return -1; +} + +UString GetTextConfigValue(const CObjectVector &pairs, const UString &id) +{ + int index = FindTextConfigItem(pairs, id); + if (index < 0) + return UString(); + return pairs[index].String; +} diff --git a/CPP/Common/TextConfig.h b/CPP/Common/TextConfig.h new file mode 100644 index 0000000..a25142a --- /dev/null +++ b/CPP/Common/TextConfig.h @@ -0,0 +1,22 @@ +// Common/TextConfig.h + +#ifndef __COMMON_TEXTCONFIG_H +#define __COMMON_TEXTCONFIG_H + +#include "MyVector.h" +#include "MyString.h" + +struct CTextConfigPair +{ + UString ID; + UString String; +}; + +bool GetTextConfig(const AString &text, CObjectVector &pairs); + +int FindTextConfigItem(const CObjectVector &pairs, const UString &id); +UString GetTextConfigValue(const CObjectVector &pairs, const UString &id); + +#endif + + diff --git a/CPP/Common/Types.h b/CPP/Common/Types.h new file mode 100644 index 0000000..9365b32 --- /dev/null +++ b/CPP/Common/Types.h @@ -0,0 +1,11 @@ +// Common/Types.h + +#ifndef __COMMON_TYPES_H +#define __COMMON_TYPES_H + +#include "../../C/Types.h" + +typedef int HRes; + +#endif + diff --git a/CPP/Common/UTFConvert.cpp b/CPP/Common/UTFConvert.cpp new file mode 100644 index 0000000..9536243 --- /dev/null +++ b/CPP/Common/UTFConvert.cpp @@ -0,0 +1,145 @@ +// UTFConvert.cpp + +#include "StdAfx.h" + +#include "UTFConvert.h" +#include "Types.h" + +static const Byte kUtf8Limits[5] = { 0xC0, 0xE0, 0xF0, 0xF8, 0xFC }; + +static Bool Utf8_To_Utf16(wchar_t *dest, size_t *destLen, const char *src, size_t srcLen) +{ + size_t destPos = 0, srcPos = 0; + for (;;) + { + Byte c; + int numAdds; + if (srcPos == srcLen) + { + *destLen = destPos; + return True; + } + c = (Byte)src[srcPos++]; + + if (c < 0x80) + { + if (dest) + dest[destPos] = (wchar_t)c; + destPos++; + continue; + } + if (c < 0xC0) + break; + for (numAdds = 1; numAdds < 5; numAdds++) + if (c < kUtf8Limits[numAdds]) + break; + UInt32 value = (c - kUtf8Limits[numAdds - 1]); + + do + { + Byte c2; + if (srcPos == srcLen) + break; + c2 = (Byte)src[srcPos++]; + if (c2 < 0x80 || c2 >= 0xC0) + break; + value <<= 6; + value |= (c2 - 0x80); + } + while (--numAdds != 0); + + if (value < 0x10000) + { + if (dest) + dest[destPos] = (wchar_t)value; + destPos++; + } + else + { + value -= 0x10000; + if (value >= 0x100000) + break; + if (dest) + { + dest[destPos + 0] = (wchar_t)(0xD800 + (value >> 10)); + dest[destPos + 1] = (wchar_t)(0xDC00 + (value & 0x3FF)); + } + destPos += 2; + } + } + *destLen = destPos; + return False; +} + +static Bool Utf16_To_Utf8(char *dest, size_t *destLen, const wchar_t *src, size_t srcLen) +{ + size_t destPos = 0, srcPos = 0; + for (;;) + { + unsigned numAdds; + UInt32 value; + if (srcPos == srcLen) + { + *destLen = destPos; + return True; + } + value = src[srcPos++]; + if (value < 0x80) + { + if (dest) + dest[destPos] = (char)value; + destPos++; + continue; + } + if (value >= 0xD800 && value < 0xE000) + { + UInt32 c2; + if (value >= 0xDC00 || srcPos == srcLen) + break; + c2 = src[srcPos++]; + if (c2 < 0xDC00 || c2 >= 0xE000) + break; + value = (((value - 0xD800) << 10) | (c2 - 0xDC00)) + 0x10000; + } + for (numAdds = 1; numAdds < 5; numAdds++) + if (value < (((UInt32)1) << (numAdds * 5 + 6))) + break; + if (dest) + dest[destPos] = (char)(kUtf8Limits[numAdds - 1] + (value >> (6 * numAdds))); + destPos++; + do + { + numAdds--; + if (dest) + dest[destPos] = (char)(0x80 + ((value >> (6 * numAdds)) & 0x3F)); + destPos++; + } + while (numAdds != 0); + } + *destLen = destPos; + return False; +} + +bool ConvertUTF8ToUnicode(const AString &src, UString &dest) +{ + dest.Empty(); + size_t destLen = 0; + Utf8_To_Utf16(NULL, &destLen, src, src.Length()); + wchar_t *p = dest.GetBuffer((int)destLen); + Bool res = Utf8_To_Utf16(p, &destLen, src, src.Length()); + p[destLen] = 0; + dest.ReleaseBuffer(); + return res ? true : false; +} + +bool ConvertUnicodeToUTF8(const UString &src, AString &dest) +{ + dest.Empty(); + size_t destLen = 0; + Utf16_To_Utf8(NULL, &destLen, src, src.Length()); + char *p = dest.GetBuffer((int)destLen); + Bool res = Utf16_To_Utf8(p, &destLen, src, src.Length()); + p[destLen] = 0; + dest.ReleaseBuffer(); + return res ? true : false; +} diff --git a/CPP/Common/UTFConvert.h b/CPP/Common/UTFConvert.h new file mode 100644 index 0000000..2a14600 --- /dev/null +++ b/CPP/Common/UTFConvert.h @@ -0,0 +1,11 @@ +// Common/UTFConvert.h + +#ifndef __COMMON_UTFCONVERT_H +#define __COMMON_UTFCONVERT_H + +#include "MyString.h" + +bool ConvertUTF8ToUnicode(const AString &utfString, UString &resultString); +bool ConvertUnicodeToUTF8(const UString &unicodeString, AString &resultString); + +#endif diff --git a/CPP/Common/Wildcard.cpp b/CPP/Common/Wildcard.cpp new file mode 100644 index 0000000..476ddeb --- /dev/null +++ b/CPP/Common/Wildcard.cpp @@ -0,0 +1,462 @@ +// Common/Wildcard.cpp + +#include "StdAfx.h" + +#include "../../C/Types.h" + +#include "Wildcard.h" + +bool g_CaseSensitive = + #ifdef _WIN32 + false; + #else + true; + #endif + +static const wchar_t kAnyCharsChar = L'*'; +static const wchar_t kAnyCharChar = L'?'; + +#ifdef _WIN32 +static const wchar_t kDirDelimiter1 = L'\\'; +#endif +static const wchar_t kDirDelimiter2 = L'/'; + +static const UString kWildCardCharSet = L"?*"; + +static const UString kIllegalWildCardFileNameChars= + L"\x1\x2\x3\x4\x5\x6\x7\x8\x9\xA\xB\xC\xD\xE\xF" + L"\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1A\x1B\x1C\x1D\x1E\x1F" + L"\"/:<>\\|"; + + +static inline bool IsCharDirLimiter(wchar_t c) +{ + return ( + #ifdef _WIN32 + c == kDirDelimiter1 || + #endif + c == kDirDelimiter2); +} + +int CompareFileNames(const UString &s1, const UString &s2) +{ + if (g_CaseSensitive) + return s1.Compare(s2); + return s1.CompareNoCase(s2); +} + +// ----------------------------------------- +// this function compares name with mask +// ? - any char +// * - any char or empty + +static bool EnhancedMaskTest(const wchar_t *mask, const wchar_t *name) +{ + for (;;) + { + wchar_t m = *mask; + wchar_t c = *name; + if (m == 0) + return (c == 0); + if (m == kAnyCharsChar) + { + if (EnhancedMaskTest(mask + 1, name)) + return true; + if (c == 0) + return false; + } + else + { + if (m == kAnyCharChar) + { + if (c == 0) + return false; + } + else if (m != c) + if (g_CaseSensitive || MyCharUpper(m) != MyCharUpper(c)) + return false; + mask++; + } + name++; + } +} + +// -------------------------------------------------- +// Splits path to strings + +void SplitPathToParts(const UString &path, UStringVector &pathParts) +{ + pathParts.Clear(); + UString name; + int len = path.Length(); + if (len == 0) + return; + for (int i = 0; i < len; i++) + { + wchar_t c = path[i]; + if (IsCharDirLimiter(c)) + { + pathParts.Add(name); + name.Empty(); + } + else + name += c; + } + pathParts.Add(name); +} + +void SplitPathToParts(const UString &path, UString &dirPrefix, UString &name) +{ + int i; + for (i = path.Length() - 1; i >= 0; i--) + if (IsCharDirLimiter(path[i])) + break; + dirPrefix = path.Left(i + 1); + name = path.Mid(i + 1); +} + +UString ExtractDirPrefixFromPath(const UString &path) +{ + int i; + for (i = path.Length() - 1; i >= 0; i--) + if (IsCharDirLimiter(path[i])) + break; + return path.Left(i + 1); +} + +UString ExtractFileNameFromPath(const UString &path) +{ + int i; + for (i = path.Length() - 1; i >= 0; i--) + if (IsCharDirLimiter(path[i])) + break; + return path.Mid(i + 1); +} + + +bool CompareWildCardWithName(const UString &mask, const UString &name) +{ + return EnhancedMaskTest(mask, name); +} + +bool DoesNameContainWildCard(const UString &path) +{ + return (path.FindOneOf(kWildCardCharSet) >= 0); +} + + +// ----------------------------------------------------------' +// NWildcard + +namespace NWildcard { + + +/* +M = MaskParts.Size(); +N = TestNameParts.Size(); + + File Dir +ForFile req M<=N [N-M, N) - + nonreq M=N [0, M) - + +ForDir req M 1) + return true; + } + return false; +} + +bool CCensorNode::AreThereIncludeItems() const +{ + if (IncludeItems.Size() > 0) + return true; + for (int i = 0; i < SubNodes.Size(); i++) + if (SubNodes[i].AreThereIncludeItems()) + return true; + return false; +} + +bool CCensorNode::CheckPathCurrent(bool include, const UStringVector &pathParts, bool isFile) const +{ + const CObjectVector &items = include ? IncludeItems : ExcludeItems; + for (int i = 0; i < items.Size(); i++) + if (items[i].CheckPath(pathParts, isFile)) + return true; + return false; +} + +bool CCensorNode::CheckPath(UStringVector &pathParts, bool isFile, bool &include) const +{ + if (CheckPathCurrent(false, pathParts, isFile)) + { + include = false; + return true; + } + include = true; + bool finded = CheckPathCurrent(true, pathParts, isFile); + if (pathParts.Size() == 1) + return finded; + int index = FindSubNode(pathParts.Front()); + if (index >= 0) + { + UStringVector pathParts2 = pathParts; + pathParts2.Delete(0); + if (SubNodes[index].CheckPath(pathParts2, isFile, include)) + return true; + } + return finded; +} + +bool CCensorNode::CheckPath(const UString &path, bool isFile, bool &include) const +{ + UStringVector pathParts; + SplitPathToParts(path, pathParts); + return CheckPath(pathParts, isFile, include); +} + +bool CCensorNode::CheckPath(const UString &path, bool isFile) const +{ + bool include; + if (CheckPath(path, isFile, include)) + return include; + return false; +} + +bool CCensorNode::CheckPathToRoot(bool include, UStringVector &pathParts, bool isFile) const +{ + if (CheckPathCurrent(include, pathParts, isFile)) + return true; + if (Parent == 0) + return false; + pathParts.Insert(0, Name); + return Parent->CheckPathToRoot(include, pathParts, isFile); +} + +/* +bool CCensorNode::CheckPathToRoot(bool include, const UString &path, bool isFile) const +{ + UStringVector pathParts; + SplitPathToParts(path, pathParts); + return CheckPathToRoot(include, pathParts, isFile); +} +*/ + +void CCensorNode::AddItem2(bool include, const UString &path, bool recursive) +{ + if (path.IsEmpty()) + return; + bool forFile = true; + bool forFolder = true; + UString path2 = path; + if (IsCharDirLimiter(path[path.Length() - 1])) + { + path2.Delete(path.Length() - 1); + forFile = false; + } + AddItem(include, path2, recursive, forFile, forFolder); +} + +void CCensorNode::ExtendExclude(const CCensorNode &fromNodes) +{ + ExcludeItems += fromNodes.ExcludeItems; + for (int i = 0; i < fromNodes.SubNodes.Size(); i++) + { + const CCensorNode &node = fromNodes.SubNodes[i]; + int subNodeIndex = FindSubNode(node.Name); + if (subNodeIndex < 0) + subNodeIndex = SubNodes.Add(CCensorNode(node.Name, this)); + SubNodes[subNodeIndex].ExtendExclude(node); + } +} + +int CCensor::FindPrefix(const UString &prefix) const +{ + for (int i = 0; i < Pairs.Size(); i++) + if (CompareFileNames(Pairs[i].Prefix, prefix) == 0) + return i; + return -1; +} + +void CCensor::AddItem(bool include, const UString &path, bool recursive) +{ + UStringVector pathParts; + if (path.IsEmpty()) + throw "Empty file path"; + SplitPathToParts(path, pathParts); + bool forFile = true; + if (pathParts.Back().IsEmpty()) + { + forFile = false; + pathParts.DeleteBack(); + } + const UString &front = pathParts.Front(); + bool isAbs = false; + if (front.IsEmpty()) + isAbs = true; + else if (front.Length() == 2 && front[1] == L':') + isAbs = true; + else + { + for (int i = 0; i < pathParts.Size(); i++) + { + const UString &part = pathParts[i]; + if (part == L".." || part == L".") + { + isAbs = true; + break; + } + } + } + int numAbsParts = 0; + if (isAbs) + if (pathParts.Size() > 1) + numAbsParts = pathParts.Size() - 1; + else + numAbsParts = 1; + UString prefix; + for (int i = 0; i < numAbsParts; i++) + { + const UString &front = pathParts.Front(); + if (DoesNameContainWildCard(front)) + break; + prefix += front; + prefix += WCHAR_PATH_SEPARATOR; + pathParts.Delete(0); + } + int index = FindPrefix(prefix); + if (index < 0) + index = Pairs.Add(CPair(prefix)); + + CItem item; + item.PathParts = pathParts; + item.ForDir = true; + item.ForFile = forFile; + item.Recursive = recursive; + Pairs[index].Head.AddItem(include, item); +} + +bool CCensor::CheckPath(const UString &path, bool isFile) const +{ + bool finded = false; + for (int i = 0; i < Pairs.Size(); i++) + { + bool include; + if (Pairs[i].Head.CheckPath(path, isFile, include)) + { + if (!include) + return false; + finded = true; + } + } + return finded; +} + +void CCensor::ExtendExclude() +{ + int i; + for (i = 0; i < Pairs.Size(); i++) + if (Pairs[i].Prefix.IsEmpty()) + break; + if (i == Pairs.Size()) + return; + int index = i; + for (i = 0; i < Pairs.Size(); i++) + if (index != i) + Pairs[i].Head.ExtendExclude(Pairs[index].Head); +} + +} diff --git a/CPP/Common/Wildcard.h b/CPP/Common/Wildcard.h new file mode 100644 index 0000000..6d4cbce --- /dev/null +++ b/CPP/Common/Wildcard.h @@ -0,0 +1,80 @@ +// Common/Wildcard.h + +#ifndef __COMMON_WILDCARD_H +#define __COMMON_WILDCARD_H + +#include "MyString.h" + +int CompareFileNames(const UString &s1, const UString &s2); + +void SplitPathToParts(const UString &path, UStringVector &pathParts); +void SplitPathToParts(const UString &path, UString &dirPrefix, UString &name); +UString ExtractDirPrefixFromPath(const UString &path); +UString ExtractFileNameFromPath(const UString &path); +bool DoesNameContainWildCard(const UString &path); +bool CompareWildCardWithName(const UString &mask, const UString &name); + +namespace NWildcard { + +struct CItem +{ + UStringVector PathParts; + bool Recursive; + bool ForFile; + bool ForDir; + bool CheckPath(const UStringVector &pathParts, bool isFile) const; +}; + +class CCensorNode +{ + CCensorNode *Parent; + bool CheckPathCurrent(bool include, const UStringVector &pathParts, bool isFile) const; + void AddItemSimple(bool include, CItem &item); + bool CheckPath(UStringVector &pathParts, bool isFile, bool &include) const; +public: + CCensorNode(): Parent(0) { }; + CCensorNode(const UString &name, CCensorNode *parent): Name(name), Parent(parent) { }; + UString Name; + CObjectVector SubNodes; + CObjectVector IncludeItems; + CObjectVector ExcludeItems; + + int FindSubNode(const UString &path) const; + + void AddItem(bool include, CItem &item); + void AddItem(bool include, const UString &path, bool recursive, bool forFile, bool forDir); + void AddItem2(bool include, const UString &path, bool recursive); + + bool NeedCheckSubDirs() const; + bool AreThereIncludeItems() const; + + bool CheckPath(const UString &path, bool isFile, bool &include) const; + bool CheckPath(const UString &path, bool isFile) const; + + bool CheckPathToRoot(bool include, UStringVector &pathParts, bool isFile) const; + // bool CheckPathToRoot(const UString &path, bool isFile, bool include) const; + void ExtendExclude(const CCensorNode &fromNodes); +}; + +struct CPair +{ + UString Prefix; + CCensorNode Head; + CPair(const UString &prefix): Prefix(prefix) { }; +}; + +class CCensor +{ + int FindPrefix(const UString &prefix) const; +public: + CObjectVector Pairs; + bool AllAreRelative() const + { return (Pairs.Size() == 1 && Pairs.Front().Prefix.IsEmpty()); } + void AddItem(bool include, const UString &path, bool recursive); + bool CheckPath(const UString &path, bool isFile) const; + void ExtendExclude(); +}; + +} + +#endif diff --git a/CPP/Windows/COM.cpp b/CPP/Windows/COM.cpp new file mode 100644 index 0000000..a746de1 --- /dev/null +++ b/CPP/Windows/COM.cpp @@ -0,0 +1,37 @@ +// Windows/COM.cpp + +#include "StdAfx.h" + +#include "Windows/COM.h" +#include "Common/StringConvert.h" + +namespace NWindows { +namespace NCOM { + +// CoInitialize (NULL); must be called! + +UString GUIDToStringW(REFGUID guid) +{ + UString string; + const int kStringSize = 48; + StringFromGUID2(guid, string.GetBuffer(kStringSize), kStringSize); + string.ReleaseBuffer(); + return string; +} + +AString GUIDToStringA(REFGUID guid) +{ + return UnicodeStringToMultiByte(GUIDToStringW(guid)); +} + +HRESULT StringToGUIDW(const wchar_t *string, GUID &classID) +{ + return CLSIDFromString((wchar_t *)string, &classID); +} + +HRESULT StringToGUIDA(const char *string, GUID &classID) +{ + return StringToGUIDW(MultiByteToUnicodeString(string), classID); +} + +}} diff --git a/CPP/Windows/COM.h b/CPP/Windows/COM.h new file mode 100644 index 0000000..506bbbc --- /dev/null +++ b/CPP/Windows/COM.h @@ -0,0 +1,69 @@ +// Windows/COM.h + +#ifndef __WINDOWS_COM_H +#define __WINDOWS_COM_H + +#include "Common/MyString.h" + +namespace NWindows { +namespace NCOM { + +#ifdef _WIN32 + +class CComInitializer +{ +public: + CComInitializer() + { + #ifdef UNDER_CE + CoInitializeEx(NULL, COINIT_MULTITHREADED); + #else + // it's single thread. Do we need multithread? + CoInitialize(NULL); + #endif + }; + ~CComInitializer() { CoUninitialize(); }; +}; + +class CStgMedium +{ + STGMEDIUM _object; +public: + bool _mustBeReleased; + CStgMedium(): _mustBeReleased(false) {} + ~CStgMedium() { Free(); } + void Free() + { + if (_mustBeReleased) + ReleaseStgMedium(&_object); + _mustBeReleased = false; + } + const STGMEDIUM* operator->() const { return &_object;} + STGMEDIUM* operator->() { return &_object;} + STGMEDIUM* operator&() { return &_object; } +}; + +#endif + +////////////////////////////////// +// GUID <--> String Conversions +UString GUIDToStringW(REFGUID guid); +AString GUIDToStringA(REFGUID guid); +#ifdef UNICODE + #define GUIDToString GUIDToStringW +#else + #define GUIDToString GUIDToStringA +#endif + +HRESULT StringToGUIDW(const wchar_t *string, GUID &classID); +HRESULT StringToGUIDA(const char *string, GUID &classID); +#ifdef UNICODE + #define StringToGUID StringToGUIDW +#else + #define StringToGUID StringToGUIDA +#endif + + +}} + +#endif diff --git a/CPP/Windows/Clipboard.cpp b/CPP/Windows/Clipboard.cpp new file mode 100644 index 0000000..bb081e1 --- /dev/null +++ b/CPP/Windows/Clipboard.cpp @@ -0,0 +1,160 @@ +// Windows/Clipboard.cpp + +#include "StdAfx.h" + + +#include "Windows/Clipboard.h" +#include "Windows/Defs.h" +#ifdef _WIN32 +#include "Windows/Memory.h" +#include "Windows/Shell.h" +#include "Windows/Memory.h" +#else +#include +#include +#undef _WIN32 +#endif + +#include "Common/StringConvert.h" + +namespace NWindows { + +bool CClipboard::Open(HWND wndNewOwner) +{ +#ifdef _WIN32 + m_Open = BOOLToBool(::OpenClipboard(wndNewOwner)); +#else + m_Open = wxTheClipboard->Open(); +#endif + return m_Open; +} + +CClipboard::~CClipboard() +{ + Close(); +} + +bool CClipboard::Close() +{ + if (!m_Open) + return true; +#ifdef _WIN32 + m_Open = !BOOLToBool(CloseClipboard()); +#else + wxTheClipboard->Close(); + m_Open = false; +#endif + return !m_Open; +} + +#ifdef _WIN32 +bool ClipboardIsFormatAvailableHDROP() +{ + return BOOLToBool(IsClipboardFormatAvailable(CF_HDROP)); +} +#endif + +/* +bool ClipboardGetTextString(AString &s) +{ + s.Empty(); + if (!IsClipboardFormatAvailable(CF_TEXT)) + return false; + CClipboard clipboard; + + if (!clipboard.Open(NULL)) + return false; + + HGLOBAL h = ::GetClipboardData(CF_TEXT); + if (h != NULL) + { + NMemory::CGlobalLock globalLock(h); + const char *p = (const char *)globalLock.GetPointer(); + if (p != NULL) + { + s = p; + return true; + } + } + return false; +} +*/ + +/* +bool ClipboardGetFileNames(UStringVector &names) +{ + names.Clear(); + if (!IsClipboardFormatAvailable(CF_HDROP)) + return false; + CClipboard clipboard; + + if (!clipboard.Open(NULL)) + return false; + + HGLOBAL h = ::GetClipboardData(CF_HDROP); + if (h != NULL) + { + NMemory::CGlobalLock globalLock(h); + void *p = (void *)globalLock.GetPointer(); + if (p != NULL) + { + NShell::CDrop drop(false); + drop.Attach((HDROP)p); + drop.QueryFileNames(names); + return true; + } + } + return false; +} +*/ + +#ifdef _WIN32 +static bool ClipboardSetData(UINT uFormat, const void *data, size_t size) +{ + NMemory::CGlobal global; + if (!global.Alloc(GMEM_DDESHARE | GMEM_MOVEABLE, size)) + return false; + { + NMemory::CGlobalLock globalLock(global); + LPVOID p = globalLock.GetPointer(); + if (p == NULL) + return false; + memcpy(p, data, size); + } + if (::SetClipboardData(uFormat, global) == NULL) + return false; + global.Detach(); + return true; +} +#endif + +bool ClipboardSetText(HWND owner, const UString &s) +{ + CClipboard clipboard; + if (!clipboard.Open(owner)) + return false; +#ifdef _WIN32 + if (!::EmptyClipboard()) + return false; + + bool res; + res = ClipboardSetData(CF_UNICODETEXT, (const wchar_t *)s, (s.Length() + 1) * sizeof(wchar_t)); + #ifndef _UNICODE + AString a; + a = UnicodeStringToMultiByte(s, CP_ACP); + res |= ClipboardSetData(CF_TEXT, (const char *)a, (a.Length() + 1) * sizeof(char)); + a = UnicodeStringToMultiByte(s, CP_OEMCP); + res |= ClipboardSetData(CF_OEMTEXT, (const char *)a, (a.Length() + 1) * sizeof(char)); + #endif + return res; +#else + wxTheClipboard->Clear(); + // This data objects are held by the clipboard, + // so do not delete them in the app. + wxString ws(s); + wxTheClipboard->SetData( new wxTextDataObject(ws) ); + return true; +#endif +} + +} diff --git a/CPP/Windows/Clipboard.h b/CPP/Windows/Clipboard.h new file mode 100644 index 0000000..c80ba5e --- /dev/null +++ b/CPP/Windows/Clipboard.h @@ -0,0 +1,28 @@ +// Windows/Clipboard.h + +#ifndef __CLIPBOARD_H +#define __CLIPBOARD_H + +#include "Common/MyString.h" + +namespace NWindows { + +class CClipboard +{ + bool m_Open; +public: + CClipboard(): m_Open(false) {}; + ~CClipboard(); + bool Open(HWND wndNewOwner); + bool Close(); +}; + +bool ClipboardIsFormatAvailableHDROP(); + +// bool ClipboardGetFileNames(UStringVector &names); +// bool ClipboardGetTextString(AString &s); +bool ClipboardSetText(HWND owner, const UString &s); + +} + +#endif diff --git a/CPP/Windows/CommonDialog.h b/CPP/Windows/CommonDialog.h new file mode 100644 index 0000000..f24bb5b --- /dev/null +++ b/CPP/Windows/CommonDialog.h @@ -0,0 +1,19 @@ +// Windows/CommonDialog.h + +#ifndef __WINDOWS_COMMON_DIALOG_H +#define __WINDOWS_COMMON_DIALOG_H + +#include "Common/MyString.h" + +namespace NWindows{ + +bool MyGetOpenFileName(HWND hwnd, LPCWSTR title, LPCWSTR fullFileName, + LPCWSTR s, UString &resPath + #ifdef UNDER_CE + , bool openFolder = false + #endif +); + +} + +#endif diff --git a/CPP/Windows/Control/ComboBox.h b/CPP/Windows/Control/ComboBox.h new file mode 100644 index 0000000..8717b48 --- /dev/null +++ b/CPP/Windows/Control/ComboBox.h @@ -0,0 +1,82 @@ +// Windows/Control/ComboBox.h + +#ifndef __WINDOWS_WX_CONTROL_COMBOBOX_H +#define __WINDOWS_WX_CONTROL_COMBOBOX_H + +#include "Windows/Window.h" +#include "Windows/Defs.h" + + +#include "Windows/Control/Window2.h" // NMHDR + +#ifndef _WIN32 +#define CB_ERR (-1) // wxNOT_FOUND +#endif + +typedef struct +{ + NMHDR hdr; +#define CBENF_ESCAPE 1 +#define CBENF_RETURN 2 + int iWhy; +} NMCBEENDEDITW; + +typedef NMCBEENDEDITW * PNMCBEENDEDITW; + + +class wxComboBox; + +namespace NWindows { + namespace NControl { + + class CComboBox // : public CWindow + { + wxComboBox* _choice; + public: + CComboBox() : _choice(0) {} + + void Attach(wxWindow * newWindow); + wxWindow * Detach(); + operator HWND() const; + + int AddString(const TCHAR * txt); + + void SetText(LPCTSTR s); + + void GetText(CSysString &s); + + int GetCount() const ; + void GetLBText(int index, CSysString &s); + + void SetCurSel(int index); + int GetCurSel(); + + void SetItemData(int index, int val); + + int GetItemData(int index); + + void Enable(bool state); + + void ResetContent(); + }; + + class CComboBoxEx : public CComboBox // : public CWindow + { + public: + /* FIXME + LRESULT DeleteItem(int index) + { return SendMessage(CBEM_DELETEITEM, index, 0); } + LRESULT InsertItem(COMBOBOXEXITEM *item) + { return SendMessage(CBEM_INSERTITEM, 0, (LPARAM)item); } + DWORD SetExtendedStyle(DWORD exMask, DWORD exStyle) + { return (DWORD)SendMessage(CBEM_SETEXTENDEDSTYLE, exMask, exStyle); } + HWND GetEditControl() + { return (HWND)SendMessage(CBEM_GETEDITCONTROL, 0, 0); } + */ + }; + + + } +} + +#endif // __WINDOWS_WX_CONTROL_COMBOBOX_H diff --git a/CPP/Windows/Control/Controls.cpp b/CPP/Windows/Control/Controls.cpp new file mode 100644 index 0000000..2191d80 --- /dev/null +++ b/CPP/Windows/Control/Controls.cpp @@ -0,0 +1,515 @@ +// Dialog.cpp + +#include "StdAfx.h" + +// For compilers that support precompilation, includes "wx/wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +// for all others, include the necessary headers (this file is usually all you +// need because it includes almost all "standard" wxWidgets headers) +#ifndef WX_PRECOMP + #include "wx/wx.h" + #include "wx/imaglist.h" + #include "wx/listctrl.h" +#endif + +#undef _WIN32 + +#include "Windows/Control/Dialog.h" + +void verify_main_thread(void); + +class LockGUI +{ + bool _IsMain; + public: + LockGUI() { + verify_main_thread(); + _IsMain = wxThread::IsMain(); + if (!_IsMain) { + // DEBUG + printf("GuiEnter-Controls(0x%lx)\n",wxThread::GetCurrentId()); + abort(); // FIXME wxMutexGuiEnter(); + } + } + ~LockGUI() { + if (!_IsMain) { + wxMutexGuiLeave(); + // DEBUG printf("GuiLeave(0x%lx)\n",wxThread::GetCurrentId()); + } + } +}; +///////////////////////// + +static const wxString CLASS_NAME_wxStaticText = wxT("wxStaticText"); +static const wxString CLASS_NAME_wxTextCtrl = wxT("wxTextCtrl"); + +namespace NWindows { + namespace NControl { + + void CDialogChildControl::SetText(LPCWSTR s) + { + LockGUI lock; + const wxChar * class_name = _window->GetClassInfo()->GetClassName (); + + if ( CLASS_NAME_wxStaticText == class_name) { + ((wxStaticText *)_window)->SetLabel(s); + } else if ( CLASS_NAME_wxTextCtrl == class_name) { + ((wxTextCtrl *)_window)->SetLabel(s); + } else { + // ((wxControl *)_window)->SetValue(s); // FIXME + printf("INTERNAL ERROR - CDialogChildControl::SetText(class=%ls) not implemented\n",class_name); + exit(-1); + } + } + + bool CDialogChildControl::GetText(CSysString &s) + { + wxString str; + { + LockGUI lock; + const wxChar * class_name = _window->GetClassInfo()->GetClassName (); + if ( CLASS_NAME_wxStaticText == class_name) { + str = ((wxStaticText *)_window)->GetLabel(); + } else if ( CLASS_NAME_wxTextCtrl == class_name) { + str = ((wxTextCtrl *)_window)->GetLabel(); + } else { + // FIXME str = ((wxTextCtrl *)_window)->GetValue(); + printf("INTERNAL ERROR - CDialogChildControl::GetText(class=%ls) not implemented\n",class_name); + exit(-1); + } + } + s = str; + return true; + } + } +} + +///////////////////////// Windows/Control/ComboBox.cpp +#include "Windows/Control/ComboBox.h" + +namespace NWindows { + namespace NControl { + + void CComboBox::Attach(wxWindow * newWindow) { _choice = (wxComboBox*)newWindow; } + + wxWindow * CComboBox::Detach() + { + wxWindow * window = _choice; + _choice = NULL; + return window; + } + + CComboBox::operator HWND() const { return (HWND)_choice; } + + + int CComboBox::AddString(const TCHAR * txt) { + LockGUI lock; + wxString item(txt); + return _choice->Append(item); + } + + void CComboBox::SetText(LPCTSTR s) { + LockGUI lock; + wxString str(s); + _choice->SetValue(str); + } + + void CComboBox::GetText(CSysString &s) { + LockGUI lock; + wxString str = _choice->GetValue(); + s = str; + } + + int CComboBox::GetCount() const { + LockGUI lock; + return _choice->GetCount(); + } + + void CComboBox::GetLBText(int index, CSysString &s) { + LockGUI lock; + wxString str = _choice->GetString(index); + s = str; + } + + void CComboBox::SetCurSel(int index) { + LockGUI lock; + _choice->SetSelection(index); + } + + int CComboBox::GetCurSel() { + LockGUI lock; + return _choice->GetSelection(); + } + + void CComboBox::SetItemData(int index, int val) { + LockGUI lock; + _choice->SetClientData( index, (void *)(((char *)0) + val)); + } + + int CComboBox::GetItemData(int index) + { + LockGUI lock; + void * data = _choice->GetClientData(index); + int ret = (int)(((char *)data) - ((char *)0)); + return ret; + } + + void CComboBox::Enable(bool state) { + LockGUI lock; + _choice->Enable(state); + } + + void CComboBox::ResetContent() { + LockGUI lock; + _choice->Clear(); + } + } +} + +///////////////////////// Windows/Control/Edit.cpp +#include "Windows/Control/Edit.h" + +namespace NWindows { + namespace NControl { + + void CEdit::SetPasswordChar(WPARAM c) // Warning : does not work for wxMSW + { + LockGUI lock; + long style = _window->GetWindowStyle(); + if ( c == 0 ) style &= ~(wxTE_PASSWORD); + else style |= wxTE_PASSWORD; + _window->SetWindowStyle(style); + _window->Refresh(); + } + + + void CEdit::Show(int cmdShow) + { + LockGUI lock; + // FIXME _window->Show(cmdShow != SW_HIDE); + _window->Enable(cmdShow != SW_HIDE); + } + + void CEdit::SetText(LPCWSTR s) + { + LockGUI lock; + ((wxTextCtrl *)_window)->SetValue(s); + } + + bool CEdit::GetText(CSysString &s) + { + wxString str; + { + LockGUI lock; + str = ((wxTextCtrl *)_window)->GetValue(); + } + s = str; + return true; + } + + } +} + +///////////////////////// Windows/Control/ProgressBar.cpp +#include "Windows/Control/ProgressBar.h" + +namespace NWindows { + namespace NControl { + + CProgressBar::CProgressBar(wxWindow* newWindow): + _window((wxGauge *)newWindow) , _minValue(0), _range(0) { } + + void CProgressBar::Attach(wxWindow* newWindow) { + _window = (wxGauge *)newWindow; + _minValue = 0; + _range = 0; + } + + void CProgressBar::SetRange32(int minValue, int maxValue) { + int range = maxValue - minValue; + if (range >= 1) + { + LockGUI lock; + _minValue = minValue; + _range = range; + _window->SetRange(_range); + } + } + + void CProgressBar::SetPos(int pos) { + if (_range >= 1) + { + LockGUI lock; + int value = pos - _minValue; + if ((value >= 0) && (value <= _range)) _window->SetValue(value); + } + } + + } +} + +///////////////////////// Windows/Control/StatusBar.cpp +#include "Windows/Control/StatusBar.h" + +namespace NWindows { + namespace NControl { + + void CStatusBar::Attach(wxWindow * newWindow) { _statusBar = (wxStatusBar*)newWindow; } + + wxWindow * CStatusBar::Detach() + { + wxWindow * window = _statusBar; + _statusBar = NULL; + return window; + } + + void CStatusBar::SetText(int index, LPCTSTR text) + { + _statusBar->SetStatusText(text,index); + } + + } + +} + +///////////////////////// Windows/Control/ListView.cpp +#include "Windows/Control/ListView.h" + +namespace NWindows { +namespace NControl { + + void CListView::Attach(wxWindow * newWindow) { + _list = (wxListCtrl *)newWindow; + } + + CListView::operator HWND() const { return (HWND)_list; } + + int CListView::GetItemCount() const {return _list->GetItemCount(); } + + int CListView::InsertItem(int index, LPCTSTR text) { + return _list->InsertItem(index, text); + } + int CListView::InsertItem(const LVITEM* item) { + /* + int col = item->iSubItem; + wxString text; + if (item->mask & LVIF_TEXT) text = item->pszText; + + // printf("%p->InsertItem(id=%d,%ls)\n",_list,item->iItem, (const wchar_t *)text); + return _list->InsertItem(item->iItem, text); + */ + wxListItem info; + long mask = 0; + info.SetId(item->iItem); + if (item->mask & LVIF_TEXT) + { + info.SetText(item->pszText); + mask |= wxLIST_MASK_TEXT; + } + if (item->mask & LVIF_PARAM) + { + info.SetData(item->lParam); + mask |= wxLIST_MASK_DATA; + } + if (item->mask & LVIF_STATE) + { + info.SetState(item->state); + mask |= wxLIST_MASK_STATE; + } + // FIXME if (item->mask & LVIF_IMAGE) + + info.SetMask(mask); + + return _list->InsertItem(info); + } + + void CListView::SetItem(const LVITEM* item) { + int col = item->iSubItem; + wxString text; + if (item->mask & LVIF_TEXT) text = item->pszText; + // printf("%p->SetItem(id=%d,col=%d,%ls)\n",_list,item->iItem, col,(const wchar_t *)text); + _list->SetItem(item->iItem, col, text); + } + + int CListView::SetSubItem(int index, int subIndex, LPCTSTR text) + { + return _list->SetItem(index, subIndex, text); + } + + void SetUnicodeFormat(bool fUnicode) { return ; } + + void CListView::InsertColumn(int columnIndex, LPCTSTR text, int width) + { + _list->InsertColumn(columnIndex, text, wxLIST_FORMAT_LEFT, width); + } + + void CListView::InsertColumn(int columnIndex, const LVCOLUMNW *columnInfo) + { + wxString text; + int format = wxLIST_FORMAT_LEFT; + int width = -1; + if (columnInfo->mask & LVCF_FMT) + { + if (columnInfo->fmt == LVCFMT_LEFT) format = wxLIST_FORMAT_LEFT; + if (columnInfo->fmt == LVCFMT_RIGHT) format = wxLIST_FORMAT_RIGHT; + } + if (columnInfo->mask & LVCF_TEXT) text = columnInfo->pszText; + if (columnInfo->mask & LVCF_WIDTH) width = columnInfo->cx; + // FIXME LVCF_SUBITEM + // printf("%p->InsertColumn(%d,%ls)\n",_list,columnIndex,(const wchar_t *)heading); + _list->InsertColumn(columnIndex, text, format, width); + } + + void CListView::DeleteAllItems() { + _list->DeleteAllItems(); + printf("%p->DeleteAllItems()\n",_list); + } + + void CListView::SetRedraw(bool b) { + if (b) _list->Thaw(); + else _list->Freeze(); + printf(" %p->SetRedraw()\n",_list); + } + + void CListView::SetItemCount(int count) { + // ONLY IF VIRTUAL REPORT -- _list->SetItemCount(count); + printf(" %p->SetItemCount(%d)\n",_list,count); + } + + void CListView::InvalidateRect(void *, bool) { + printf("FIXME %p->InvalidateRect()\n",_list);/* FIXME */ + } + + int CListView::GetSelectedCount() const { + int nb = _list->GetSelectedItemCount(); + printf(" %p->GetSelectedCount()=>%d\n",_list,nb); + return nb; + } + + void /* bool */ CListView::EnsureVisible(int index, bool partialOK) { + + printf(" %p->EnsureVisible(%d)\n",_list,index); + + if (index == -1) index = 0; + _list->EnsureVisible(index); + + // return true; + } + + void CListView::SetItemState(int index, UINT state, UINT mask) { + // don't work _list->SetItemState(index, state, mask); !? + // try SetItem ... + /* + wxListItem info; + + info.m_mask = wxLIST_MASK_STATE; + info.m_itemId = index; + info.m_col = 0; + info.m_state = state; + info.m_mask = mask; + + _list->SetItem(info); + */ + + printf(" %p->EnsureVisible(%d)\n",_list,index); + + if (index == -1) return; + + if (mask & LVIS_FOCUSED) { + _list->SetItemState(index, state & LVIS_FOCUSED, mask & LVIS_FOCUSED); + } + + if (mask & LVIS_SELECTED) { + _list->SetItemState(index, state & LVIS_SELECTED, mask & LVIS_SELECTED); + } + + } + + UINT CListView::GetItemState(int index, UINT mask) const + { + UINT state = _list->GetItemState(index, mask); + printf("FIXME %p->GetItemState(index=%d,mask=0x%x)=0x%x\n",_list,index,(unsigned)mask,(unsigned)state); /* FIXME */ + + return state; + } + + void /* bool */ CListView::Update() { + printf("FIXME %p->Update()\n",_list); /* FIXME */ + } + + bool CListView::DeleteColumn(int columnIndex) { + // printf("%p->DeleteColumn()\n",_list); + if (_list->GetColumnCount() < 1) return false; + return _list->DeleteColumn(columnIndex); // always return true !? + } + + bool CListView::GetItemParam(int itemIndex, LPARAM ¶m) const + { + param = _list->GetItemData(itemIndex); + + // printf(" %p->GetItemParam(%d) => %ld\n",_list,itemIndex,(long)param); + + return true; + } + + int CListView::GetNextItem(int startIndex, UINT flags) const + { + int item = _list->GetNextItem(startIndex, wxLIST_NEXT_ALL, flags); + printf(" %p->GetNextItem(%d) => %d\n",_list,startIndex,item); + return item; + + } + + int CListView::GetFocusedItem() const + { + int item = _list->GetNextItem(-1, wxLIST_NEXT_ALL, wxLIST_STATE_FOCUSED); + printf(" %p->GetFocusedItem() => %d\n",_list,item); + return item; + } + + void CListView::RedrawAllItems() + { + printf("FIXME %p->RedrawAllItems()\n",_list); + } + + // FIXME added + int CListView::GetColumnCount() + { + return _list->GetColumnCount(); + } + + void CListView::SetFocus() { /* FIXME */ } + + void CListView::RedrawItem(int item) { /* FIXME */ } + + bool CListView::SortItems(PFNLVCOMPARE compareFunction, LPARAM dataParam) { + printf(" %p->SortItems()\n",_list); + return _list->SortItems(compareFunction, dataParam); + } + + bool CListView::GetColumn(int columnIndex, LVCOLUMN* columnInfo) + { + columnInfo->cx = _list->GetColumnWidth(columnIndex);// FIXME + + bool ret = false; + + if (columnInfo->cx >= 1) ret = true; + + // printf("CListView::GetColumn(%d) cx=%d\n",columnIndex,(int)columnInfo->cx); + + return ret; + } + + // HWND EditLabel(int itemIndex) + void CListView::EditLabel(int itemIndex) + { + /* FIXME */ + } + +}} + diff --git a/CPP/Windows/Control/Dialog.cpp b/CPP/Windows/Control/Dialog.cpp new file mode 100644 index 0000000..464ae30 --- /dev/null +++ b/CPP/Windows/Control/Dialog.cpp @@ -0,0 +1,560 @@ +// Dialog.cpp + +#include "StdAfx.h" + +// For compilers that support precompilation, includes "wx/wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +// for all others, include the necessary headers (this file is usually all you +// need because it includes almost all "standard" wxWidgets headers) +#ifndef WX_PRECOMP + #include "wx/wx.h" +#endif + +#include + + +#undef _WIN32 + +#include "Windows/Control/DialogImpl.h" +#include "Windows/Synchronization.h" + + +// FIXME +class MyApp : public wxApp +{ +public: + virtual bool OnInit(); +}; + +DECLARE_APP(MyApp) + +// #include "../GUI/p7zip_32.xpm" +extern const char * p7zip_32_xpm[]; + +const TCHAR * nameWindowToUnix(const TCHAR * lpFileName) { + if ((lpFileName[0] == wxT('c')) && (lpFileName[1] == wxT(':'))) return lpFileName+2; + return lpFileName; +} + + +extern time_t g_T0; // FIXME + +#define DIALOG_ID_MESSAGEBOX 8100 +#define DIALOG_ID_DIR_DIALOG 8101 +#define DIALOG_ID_FILE_DIALOG 8102 +#define DIALOG_ID_POST_DIALOG 8190 +#define DIALOG_ID_END_DIALOG 8199 + +static struct +{ + bool busy; + + int id; + wxWindow *parentWindow; + + // CreateDialog + NWindows::NControl::CModalDialog * dialog; + + // EndModal + int value; + NWindows::NControl::CModalDialogImpl * window; + + // MessageBox + const TCHAR * msg; + const TCHAR * title; + int flag; + + // + LPCWSTR initialFolderOrFile; + + wxSemaphore * sem; + int ret; + + UString resultPath; + +#define MAX_CREATE 16 +} g_tabCreate[MAX_CREATE]; + +static int myCreateHandle2(int n); + +static int findFreeInd() +{ +static NWindows::NSynchronization::CCriticalSection g_CriticalSection; + + g_CriticalSection.Enter(); + int ind = 0; + while (ind < MAX_CREATE) + { + if (g_tabCreate[ind].busy == false) + { + g_tabCreate[ind].busy = true; + break; + } + ind++; + } + g_CriticalSection.Leave(); + + return ind; +} + +static int WaitInd(wxWindow * destWindow, int ind,int id,wxWindow * parent,UString &resultPath) +{ + int ret = 0; + + g_tabCreate[ind].id = id; + g_tabCreate[ind].parentWindow = parent; + g_tabCreate[ind].ret = 0; + g_tabCreate[ind].resultPath = wxEmptyString; + + if (wxThread::IsMain()) + { + ret = myCreateHandle2(ind); + resultPath = g_tabCreate[ind].resultPath; + } + else + { + if (destWindow == 0) { + extern wxWindow * g_window; + if (g_window == 0) + { + printf("INTERNAL ERROR : g_window and destWindow == NULL\n"); abort(); + } + destWindow = g_window; + } + g_tabCreate[ind].sem = new wxSemaphore(0); + + // create any type of command event here + wxCommandEvent event( wxEVT_COMMAND_MENU_SELECTED, WORKER_EVENT ); + event.SetInt( ind ); + + // send in a thread-safe way + // DEBUG printf("T=0x%lx - %d : WaitInd(%d,%p): BEGIN\n", wxThread::GetCurrentId(),time(0)-g_T0,g_tabCreate[ind].id,g_tabCreate[ind].parentWindow); + wxPostEvent( destWindow, event ); + + g_tabCreate[ind].sem->Wait(); + + ret = g_tabCreate[ind].ret; + resultPath = g_tabCreate[ind].resultPath; + // DEBUG printf("T=0x%lx - %d : WaitInd(%d,%p): ret=%d\n", wxThread::GetCurrentId(),time(0)-g_T0,g_tabCreate[ind].id,g_tabCreate[ind].parentWindow,ret); + delete g_tabCreate[ind].sem; + g_tabCreate[ind].sem = 0; + } + + g_tabCreate[ind].busy = false; + + return ret; +} + +static int WaitInd(wxWindow * destWindow,int ind,int id,wxWindow * parent) +{ + UString resultPath; + return WaitInd(destWindow,ind,id,parent,resultPath); +} + +void verify_main_thread(void); + +class LockGUI +{ + bool _IsMain; + public: + LockGUI() { + + verify_main_thread(); + + _IsMain = wxThread::IsMain(); + if (!_IsMain) { + // DEBUG + printf("GuiEnter-Dialog(0x%lx)\n",wxThread::GetCurrentId()); + abort(); // FIXME wxMutexGuiEnter(); + } + } + ~LockGUI() { + if (!_IsMain) { + wxMutexGuiLeave(); + // DEBUG printf("GuiLeave(0x%lx)\n",wxThread::GetCurrentId()); + } + } +}; + +static const unsigned int kNumDialogsMax = 32; +static unsigned int g_NumDialogs = 0; +static const CDialogInfo *g_Dialogs[kNumDialogsMax]; + +void RegisterDialog(const CDialogInfo *dialogInfo) +{ + // DEBUG printf("RegisterDialog : %d\n",dialogInfo->id); + if (g_NumDialogs < kNumDialogsMax) + g_Dialogs[g_NumDialogs++] = dialogInfo; +} + +namespace NWindows { + + CSysString MyLoadString(unsigned int resourceID) + { + for(unsigned i=0; i < g_NumDialogs; i++) { + if (g_Dialogs[i]->stringTable) { + int j = 0; + while(g_Dialogs[i]->stringTable[j].str) { + if (resourceID == g_Dialogs[i]->stringTable[j].id) { + return g_Dialogs[i]->stringTable[j].str; + } + + j++; + } + } + } + return L"FIXME-MyLoadStringW-"; + } + + namespace NControl { + +/////////////////////////////////////////// CModalDialog ////////////////////////////////// + + bool CModalDialog::CheckButton(int buttonID, UINT checkState) + { + LockGUI lock; + wxCheckBox* w = (wxCheckBox*)_window->FindWindow(buttonID); + if (w) + { + w->SetValue(checkState == BST_CHECKED); + return true; + } + return false; + } + + UINT CModalDialog::IsButtonChecked(int buttonID) const + { + LockGUI lock; + wxCheckBox* w = (wxCheckBox*)_window->FindWindow(buttonID); + if (w) + { + bool bret = w->GetValue(); + if (bret) return BST_CHECKED; + } + return BST_UNCHECKED; + } + + void CModalDialog::EnableItem(int id, bool state) + { + LockGUI lock; + wxWindow* w = _window->FindWindow(id); + if (w) w->Enable(state); + } + + void CModalDialog::SetItemText(int id, const TCHAR *txt) + { + LockGUI lock; + wxWindow* w = _window->FindWindow(id); + if (w) + { + wxString label(txt); + w->SetLabel(label); + } + } + + wxWindow * CModalDialog::GetItem(long id) const + { + LockGUI lock; + return _window->FindWindow(id); + } + + void CModalDialog::ShowItem(int itemID, int cmdShow) const + { + LockGUI lock; + // cmdShow = SW_HIDE or SW_SHOW (sometimes false or true !) + wxWindow* w = _window->FindWindow(itemID); + if (w) + { +// FIXME w->Show(cmdShow != SW_HIDE); + w->Enable(cmdShow != SW_HIDE); + } + } + + UINT_PTR CModalDialog::SetTimer(UINT_PTR idEvent , unsigned milliseconds) + { + LockGUI lock; + return _window->SetTimer(idEvent , milliseconds); + } + + void CModalDialog::KillTimer(UINT_PTR idEvent) + { + LockGUI lock; + _window->KillTimer(idEvent); + } + + void CModalDialog::SetText(const TCHAR *_title) { + LockGUI lock; + _window->SetTitle(_title); + } + + + bool CModalDialog::GetText(CSysString &s) { + wxString str; + { + LockGUI lock; + str = _window->GetTitle(); + } + s = str; + return true; + } + + INT_PTR CModalDialog::Create(int id , HWND parentWindow) + { + int ind = findFreeInd(); + + g_tabCreate[ind].dialog = this; + + return WaitInd(0, ind,id,parentWindow); + } + + void CModalDialog::End(int result) + { + int ind = findFreeInd(); + + g_tabCreate[ind].window = _window; + g_tabCreate[ind].value = result; + + WaitInd(this->_window,ind,DIALOG_ID_END_DIALOG,0); + } + + void CModalDialog::PostMessage(UINT message) + { + int ind = findFreeInd(); + + g_tabCreate[ind].dialog = this; + g_tabCreate[ind].value = message; + + WaitInd(this->_window,ind,DIALOG_ID_POST_DIALOG,0); + } + +/////////////////////////////////////////// CModalDialogImpl /////////////////////////////////////// + + CModalDialogImpl::CModalDialogImpl(CDialog *dialog, wxWindow* parent, wxWindowID id, + const wxString& title, const wxPoint& pos, + const wxSize& size, long style) : + wxDialog(parent, id, title , pos , size, style /* | wxDIALOG_NO_PARENT */ ) , + _timer(this, TIMER_ID_IMPL), _dialog(dialog) + { + // set the frame icon + this->SetIcon(wxICON(p7zip_32)); + } + + void CModalDialogImpl::OnAnyButton(wxCommandEvent& event) + { + int id = event.GetId(); + if (id == wxID_OK) + { + if (_dialog) _dialog->OnOK(); + // event.Skip(true); + } + else if (id == wxID_CANCEL) + { + if (_dialog) _dialog->OnCancel(); + // event.Skip(true); + } + else if (id == wxID_HELP) + { + if (_dialog) _dialog->OnHelp(); + } + else + { + if (_dialog) + { + /* bool bret = */ _dialog->OnButtonClicked(id, FindWindow(id) ); + } + } + } + + void CModalDialogImpl::OnAnyChoice(wxCommandEvent &event) + { + int itemID = event.GetId(); + if (_dialog) _dialog->OnCommand(CBN_SELCHANGE, itemID, 0); + } + + void CModalDialogImpl::OnAnyTimer(wxTimerEvent &event) + { + int timerID = event.GetId(); + if (_dialog) _dialog->OnTimer(timerID , 0); + } + } +} + +///////////////////////// myCreateHandle + + +static int myCreateHandle2(int n) +{ + unsigned int id = g_tabCreate[n].id; + wxWindow * parentWindow = g_tabCreate[n].parentWindow; + NWindows::NControl::CModalDialogImpl * window = 0; + + // DEBUG printf("T=0x%lx - %d : myCreateHandle(%d): BEGIN\n", wxThread::GetCurrentId(),time(0)-g_T0,n); + + if (id == DIALOG_ID_END_DIALOG) + { + /* FIXME : the dialog must be shown before ending it ? + while (!g_tabCreate[n].window->IsShownOnScreen()) Sleep(200); + Sleep(200); + */ + g_tabCreate[n].window->EndModal(g_tabCreate[n].value); + return 0; + } + + if (id == DIALOG_ID_POST_DIALOG) + { + g_tabCreate[n].dialog->OnMessage(g_tabCreate[n].value, 0, 0); + return 0; + } + + if (id == DIALOG_ID_MESSAGEBOX) + { + long style = g_tabCreate[n].flag; + long decorated_style = style; + if ( ( style & ( wxICON_EXCLAMATION | wxICON_HAND | wxICON_INFORMATION | + wxICON_QUESTION ) ) == 0 ) + { + decorated_style |= ( style & wxYES ) ? wxICON_QUESTION : wxICON_INFORMATION ; + } + wxMessageDialog dialog(parentWindow, g_tabCreate[n].msg, g_tabCreate[n].title, decorated_style); + dialog.SetIcon(wxICON(p7zip_32)); + int ret = dialog.ShowModal(); + + return ret; + } + + if (id == DIALOG_ID_DIR_DIALOG) + { + wxString defaultDir = g_tabCreate[n].initialFolderOrFile; + wxDirDialog dirDialog(g_tabCreate[n].parentWindow, + g_tabCreate[n].title, defaultDir); + dirDialog.SetIcon(wxICON(p7zip_32)); + int ret = dirDialog.ShowModal(); + if (ret == wxID_OK) g_tabCreate[n].resultPath = dirDialog.GetPath(); + return ret; + } + + if (id == DIALOG_ID_FILE_DIALOG) + { + wxString defaultFilename = g_tabCreate[n].initialFolderOrFile; + + wxFileName filename(defaultFilename); + + wxString dir = filename.GetPath(); + wxString name = filename.GetFullName(); + + + // printf("DIALOG_ID_FILE_DIALOG = '%ls' => '%ls' '%ls'\n",&defaultFilename[0],&dir[0],&name[0]); + + + wxFileDialog fileDialog(g_tabCreate[n].parentWindow, g_tabCreate[n].title, + dir, name, wxT("All Files (*.*)|*.*"), wxFD_SAVE|wxFD_OVERWRITE_PROMPT); + fileDialog.SetIcon(wxICON(p7zip_32)); + int ret = fileDialog.ShowModal(); + if (ret == wxID_OK) g_tabCreate[n].resultPath = fileDialog.GetPath(); + return ret; + } + + for(unsigned i=0; i < g_NumDialogs; i++) { + if (id == g_Dialogs[i]->id) { + // DEBUG printf("%d : Create(%d,%p): CreateDialog-1\n",time(0)-g_T0,id,parentWindow); + window = (g_Dialogs[i]->createDialog)(g_tabCreate[n].dialog,g_tabCreate[n].parentWindow); + // DEBUG printf("%d : Create(%d,%p): CreateDialog-2\n",time(0)-g_T0,id,parentWindow); + break; + } + } + + if (window) { + + // DEBUG printf("%d : Create(%d,%p): %p->ShowModal()\n",time(0)-g_T0,id,parentWindow,window); + + // window->Show(true); + // wxGetApp().ProcessPendingEvents(); + + INT_PTR ret = window->ShowModal(); + + // DEBUG printf("%d : Create(%d,%p): %p->ShowModal() - ret=%d\n",time(0)-g_T0,id,parentWindow,window,ret); + window->Detach(); + window->Destroy(); + + // DEBUG printf("%d : Create(%d,%p): END\n",time(0)-g_T0,id,parentWindow,window); + + return ret; + } + + // FIXME + printf("INTERNAL ERROR : cannot find dialog %d\n",id); + + return 0; +} + +void myCreateHandle(int n) +{ + int ret = myCreateHandle2(n); + g_tabCreate[n].ret = ret; + g_tabCreate[n].sem->Post(); +} + +int MessageBoxW(wxWindow * parent, const TCHAR * msg, const TCHAR * title,int flag) +{ + int ind = findFreeInd(); + + g_tabCreate[ind].msg = msg; + g_tabCreate[ind].title = title; + g_tabCreate[ind].flag = flag; + + return WaitInd(parent,ind,DIALOG_ID_MESSAGEBOX,parent); // FIXME +} + + + +// FIXME : should be in Windows/Shell.cpp + +namespace NWindows{ +namespace NShell{ + +bool BrowseForFolder(HWND owner, LPCWSTR title, LPCWSTR initialFolder, UString &resultPath) +{ + int ind = findFreeInd(); + + g_tabCreate[ind].title = title; + g_tabCreate[ind].initialFolderOrFile = nameWindowToUnix(initialFolder); + + UString resTmp; + int ret = WaitInd(0,ind,DIALOG_ID_DIR_DIALOG,owner,resTmp); // FIXME + if(ret == wxID_OK) + { + resultPath = resTmp; + return true; + } + return false; +} + +}} + +/////////////////////////// CPP/Windows/CommonDialog.cpp +namespace NWindows +{ + + bool MyGetOpenFileName(HWND hwnd, LPCWSTR title, LPCWSTR fullFileName, LPCWSTR s, UString &resPath) + { + int ind = findFreeInd(); + + g_tabCreate[ind].title = title; + g_tabCreate[ind].initialFolderOrFile = nameWindowToUnix(fullFileName); + + UString resTmp; + int ret = WaitInd(0,ind,DIALOG_ID_FILE_DIALOG,hwnd,resTmp); // FIXME + if(ret == wxID_OK) + { + resPath = resTmp; + return true; + } + return false; + } +} + diff --git a/CPP/Windows/Control/Dialog.h b/CPP/Windows/Control/Dialog.h new file mode 100644 index 0000000..54899a1 --- /dev/null +++ b/CPP/Windows/Control/Dialog.h @@ -0,0 +1,179 @@ +// Windows/Control/Dialog.h + +#ifndef __WINDOWS_CONTROL_DIALOG_H +#define __WINDOWS_CONTROL_DIALOG_H + +#include "Windows/Window.h" + +#ifndef _WIN32 +#define SW_HIDE 0 +#define SW_SHOW 5 + +#define WM_SETTEXT (6000) // wxID_HIGHEST + 1 +#define WM_USER (6999) // wxID_HIGHEST + 1000 + +#endif + +#ifndef _WIN32 +#define CBN_SELCHANGE 1 +#endif + +// FIXME +#define IDCLOSE (5001) // wxID_CLOSE +#define IDEXIT (5006) // wxID_EXIT +#define IDOK (5100) // wxID_OK +#define IDCANCEL (5101) // wxID_CANCEL +#define IDABORT (5115) // wxID_ABORT +#define IDYES (5103) // wxID_YES +#define IDNO (5104) // wxID_NO +#define IDHELP (5009) // wxID_HELP + +#define BST_CHECKED 1 +#define BST_UNCHECKED 0 +// #define BST_INDETERMINATE 0x0002 + +#define wsprintf(a,b,c,d,e) swprintf(a,9999,b,c,d,e) // FIXME + +namespace NWindows { + namespace NControl { + + class CModalDialogImpl; + + class CDialog + { + protected: + CModalDialogImpl * _window; + public: + operator HWND() const { return HWND(_window); } + + bool OnInit(CModalDialogImpl * window) { + _window = window; + return OnInit(); + } + virtual bool OnInit() { return false; } + virtual void OnOK() {} + virtual void OnCancel() {} + virtual void OnHelp() {} + virtual bool OnButtonClicked(int buttonID, wxWindow * buttonHWND) { return false; } + virtual bool OnMessage(UINT message, WPARAM wParam, LPARAM lParam) { return false; } + virtual bool OnCommand(int code, int itemID, LPARAM lParam) { return false; } + virtual bool OnTimer(WPARAM /* timerID */, LPARAM /* callback */) { return false; } + + void NormalizeSize(bool fullNormalize = false) { /* FIXME */ } + void NormalizePosition() { /* FIXME */ } + }; + + class CModalDialog : public CDialog + { + public: + + + ////////////////// COMPATIBILITY + + bool CheckRadioButton(int firstButtonID, int lastButtonID, int checkButtonID) + { +/* + for(int id = firstButtonID; id <= lastButtonID; id++) + { + CheckButton(id,id == checkButtonID); + } +*/ + this->CheckButton(checkButtonID,true); + + return true; + } + + + bool CheckButton(int buttonID, UINT checkState); + bool CheckButton(int buttonID, bool checkState) + { + return CheckButton(buttonID, UINT(checkState ? BST_CHECKED : BST_UNCHECKED)); + } + + + UINT IsButtonChecked(int buttonID) const; + + bool IsButtonCheckedBool(long buttonID) const + { return (IsButtonChecked(buttonID) == BST_CHECKED); } + + void EnableItem(int id, bool state); + + void SetItemText(int id, const TCHAR *txt); + + wxWindow * GetItem(long id) const ; + + void ShowItem(int itemID, int cmdShow) const; + + void HideItem(int itemID) const { ShowItem(itemID, SW_HIDE); } + + void End(int result); + + void SetText(const TCHAR *_title); // { _dialog->SetTitle(_title); } + + bool GetText(CSysString &s); + + INT_PTR Create(int id , HWND parentWindow); + + void PostMessage(UINT message); + + virtual void OnHelp() {} + + UINT_PTR SetTimer(UINT_PTR idEvent , unsigned milliseconds); + + void KillTimer(UINT_PTR idEvent); + + virtual void OnOK() { End(IDOK); } + virtual void OnCancel() { End(IDCANCEL); } + }; + +class CDialogChildControl : public NWindows::CWindow +{ +public: + CDialogChildControl() {} + + int m_ID; + void Init(const NWindows::NControl::CModalDialog &parentDialog, int id) + { + m_ID = id; + this->Attach(parentDialog.GetItem(id)); + } + virtual void SetText(LPCWSTR s); + virtual bool GetText(CSysString &s); +}; + +} +} + +struct CStringTable +{ + unsigned int id; + const wchar_t *str; +}; + +struct CDialogInfo +{ + unsigned int id; + NWindows::NControl::CModalDialogImpl * (*createDialog)(NWindows::NControl::CModalDialog * dialog, HWND parentWindow); + CStringTable * stringTable; +}; + +void RegisterDialog(const CDialogInfo *dialogInfo); + +#define REGISTER_DIALOG_NAME(x) CRegister ## x + +#define REGISTER_DIALOG(id,x,stringTable) \ + static NWindows::NControl::CModalDialogImpl * myCreate##x(NWindows::NControl::CModalDialog * dialog,HWND parentWindow) \ + { return new x##Impl(dialog,parentWindow,id); } \ + static struct CDialogInfo g_DialogInfo = { id , myCreate##x, stringTable }; \ + struct REGISTER_DIALOG_NAME(x) { \ + REGISTER_DIALOG_NAME(x)() { RegisterDialog(&g_DialogInfo); }}; \ + static REGISTER_DIALOG_NAME(x) g_RegisterDialog; + +#define REGISTER_STRINGTABLE(stringTable) \ + static struct CDialogInfo g_DialogInfo = { -1 , 0 , stringTable }; \ + struct REGISTER_DIALOG_NAME(x) { \ + REGISTER_DIALOG_NAME(x)() { RegisterDialog(&g_DialogInfo); }}; \ + static REGISTER_DIALOG_NAME(x) g_RegisterDialog; + +#endif + diff --git a/CPP/Windows/Control/DialogImpl.h b/CPP/Windows/Control/DialogImpl.h new file mode 100644 index 0000000..a9720b7 --- /dev/null +++ b/CPP/Windows/Control/DialogImpl.h @@ -0,0 +1,73 @@ +// Windows/Control/DialogImpl.h + +#ifndef __WINDOWS_CONTROL_DIALOGIMPL_H +#define __WINDOWS_CONTROL_DIALOGIMPL_H + +#include "Windows/Window.h" +#include "Windows/Control/Dialog.h" + +void myCreateHandle(int n); // FIXME - duplicate + +enum { + WORKER_EVENT=100 // this one gets sent from the worker thread +}; + +namespace NWindows { + namespace NControl { + +#define TIMER_ID_IMPL (1234) + + class CModalDialogImpl : public wxDialog + { + wxTimer _timer; + + CDialog *_dialog; + public: + CModalDialogImpl(CDialog *dialog, wxWindow* parent, wxWindowID id, const wxString& title, + const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, + long style = wxDEFAULT_DIALOG_STYLE ); + + CDialog * Detach() + { + CDialog * oldDialog = _dialog; + _dialog = NULL; + return oldDialog; + } + + void OnInit() + { + if (_dialog) _dialog->OnInit(this); + } + + void OnAnyButton(wxCommandEvent& event); + void OnAnyChoice(wxCommandEvent &event); + void OnAnyTimer(wxTimerEvent &event); + +/* FIXME virtual void SetLabel(const wxString &title) + { + // Why we must do this "alias" ? + this->SetTitle(title); + } +*/ + ////////////////// + UINT_PTR SetTimer(UINT_PTR /* FIXME idEvent */, unsigned milliseconds) + { + _timer.Start(milliseconds); + return TIMER_ID_IMPL; + } + void KillTimer(UINT_PTR idEvent) + { + if (idEvent == TIMER_ID_IMPL) _timer.Stop(); + } + void OnWorkerEvent(wxCommandEvent& event) + { + int n = event.GetInt(); + // printf("CModalDialogImpl::OnWorkerEvent(n=%d)\n",n); + myCreateHandle(n); + } + }; +} +} + +#endif + diff --git a/CPP/Windows/Control/Edit.h b/CPP/Windows/Control/Edit.h new file mode 100644 index 0000000..e6930e5 --- /dev/null +++ b/CPP/Windows/Control/Edit.h @@ -0,0 +1,24 @@ +// Windows/Control/Edit.h + +#ifndef __WINDOWS_CONTROL_EDIT_H +#define __WINDOWS_CONTROL_EDIT_H + +#include "Windows/Window.h" +#include "Windows/Defs.h" + +namespace NWindows { +namespace NControl { + +class CEdit: public CWindow +{ +public: + void SetPasswordChar(WPARAM c); + void Show(int cmdShow); + virtual void SetText(LPCWSTR s); + virtual bool GetText(CSysString &s); +}; + +}} + +#endif + diff --git a/CPP/Windows/Control/ListView.h b/CPP/Windows/Control/ListView.h new file mode 100644 index 0000000..149f4a4 --- /dev/null +++ b/CPP/Windows/Control/ListView.h @@ -0,0 +1,164 @@ +// Windows/Control/ListView.h + +#ifndef __WINDOWS_CONTROL_LISTVIEW_H +#define __WINDOWS_CONTROL_LISTVIEW_H + +#include "Windows/Window.h" +#include "Windows/Defs.h" + +/* +#include +*/ + +#ifndef _WIN32 + +#define LVCF_FMT 0x0001 +#define LVCF_WIDTH 0x0002 +#define LVCF_TEXT 0x0004 +#define LVCF_SUBITEM 0x0008 +#define LVCF_IMAGE 0x0010 +#define LVCF_ORDER 0x0020 + +#define LVCFMT_LEFT 0x0000 +#define LVCFMT_RIGHT 0x0001 +#define LVCFMT_CENTER 0x0002 +#define LVCFMT_JUSTIFYMASK 0x0003 + + +// state +#define LVIS_FOCUSED 0x0002 /* wxLIST_STATE_FOCUSED */ +#define LVIS_SELECTED 0x0004 /* wxLIST_STATE_SELECTED */ + +#define LVNI_SELECTED 0x0004 /* wxLIST_STATE_SELECTED */ + +typedef INT (CALLBACK *PFNLVCOMPARE)(LPARAM, LPARAM, LPARAM); + +typedef struct tagLVCOLUMNW +{ + UINT mask; + int fmt; + int cx; + LPWSTR pszText; + int cchTextMax; + int iSubItem; + int iOrder; // FIXME +} LVCOLUMNW; + +#define LVCOLUMN LVCOLUMNW +#define LV_COLUMNW LVCOLUMNW /* FIXME */ + + + +typedef struct tagLVITEMW +{ + UINT mask; + int iItem; + int iSubItem; + UINT state; + UINT stateMask; + LPWSTR pszText; + int cchTextMax; + int iImage; + LPARAM lParam; +#if (_WIN32_IE >= 0x0300) + int iIndent; +#endif +#if (_WIN32_WINNT >= 0x501) + int iGroupId; + UINT cColumns; // tile view columns + PUINT puColumns; +#endif +} LVITEMW; + +#define LVITEM LVITEMW + +#define LVIF_TEXT 0x0001 +// FIXME - mask +#define LVIF_PARAM 2 +#define LVIF_IMAGE 4 +#define LVIF_STATE 8 + +#endif + +class wxListCtrl; + +namespace NWindows { +namespace NControl { + +class CListView // : public NWindows::CWindow +{ + wxListCtrl *_list; +public: + CListView() : _list(0) {} + void Attach(wxWindow * newWindow); + + operator HWND() const; + + int GetItemCount() const; + + int InsertItem(int index, LPCTSTR text); + int InsertItem(const LVITEM* item); + + void SetItem(const LVITEM* item); + + int SetSubItem(int index, int subIndex, LPCTSTR text); + + void SetUnicodeFormat(bool fUnicode) { return ; } + + void InsertColumn(int columnIndex, LPCTSTR text, int width); + + void InsertColumn(int columnIndex, const LVCOLUMNW *columnInfo); + + void DeleteAllItems(); + + void SetRedraw(bool); + + void SetItemCount(int ); + + void InvalidateRect(void *, bool); + + int GetSelectedCount() const; + + void /* bool */ EnsureVisible(int index, bool partialOK); + + void SetItemState(int index, UINT state, UINT mask); + + void SetItemState_FocusedSelected(int index) { SetItemState(index, LVIS_FOCUSED | LVIS_SELECTED, LVIS_FOCUSED | LVIS_SELECTED); } + + UINT GetItemState(int index, UINT mask) const; + + void /* bool */ Update(); + + bool DeleteColumn(int columnIndex); + + bool GetItemParam(int itemIndex, LPARAM ¶m) const; + + int GetNextItem(int startIndex, UINT flags) const; + + int GetFocusedItem() const; + + void RedrawAllItems(); + // FIXME added + int GetColumnCount(); + + void SetFocus(); + + void RedrawItem(int item); + + bool SortItems(PFNLVCOMPARE compareFunction, LPARAM dataParam); + + bool GetColumn(int columnIndex, LVCOLUMN* columnInfo); + + // HWND EditLabel(int itemIndex) + void EditLabel(int itemIndex); + + bool SetColumnWidthAuto(int iCol) { + return true; // FIXME SetColumnWidth(iCol, LVSCW_AUTOSIZE); + } + + +}; + +}} +#endif + diff --git a/CPP/Windows/Control/ProgressBar.h b/CPP/Windows/Control/ProgressBar.h new file mode 100644 index 0000000..c7bfa8e --- /dev/null +++ b/CPP/Windows/Control/ProgressBar.h @@ -0,0 +1,34 @@ +// Windows/Control/ProgressBar.h + +#ifndef __WINDOWS_CONTROL_PROGRESSBAR_H +#define __WINDOWS_CONTROL_PROGRESSBAR_H + +#include "Windows/Window.h" +#include "Windows/Defs.h" + +class wxGauge; + +namespace NWindows { +namespace NControl { + + +class CProgressBar : public CWindow +{ +protected: + wxGauge* _window; + int _minValue; + int _range; +public: + CProgressBar(wxWindow* newWindow = NULL); + + void Attach(wxWindow* newWindow); + + void SetRange32(int minValue, int maxValue); + + void SetPos(int pos); +}; + +}} + +#endif + diff --git a/CPP/Windows/Control/Static.h b/CPP/Windows/Control/Static.h new file mode 100644 index 0000000..36469c1 --- /dev/null +++ b/CPP/Windows/Control/Static.h @@ -0,0 +1,23 @@ +// Windows/Control/Static.h + +#ifndef __WINDOWS_CONTROL_STATIC_H +#define __WINDOWS_CONTROL_STATIC_H + +#include "Windows/Window.h" +#include "Windows/Defs.h" + +typedef void * HICON; + +namespace NWindows { +namespace NControl { + +class CStatic : public CWindow +{ +public: + + HICON SetIcon(HICON icon) { return 0; } // FIXME +}; + +}} + +#endif diff --git a/CPP/Windows/Control/StatusBar.h b/CPP/Windows/Control/StatusBar.h new file mode 100644 index 0000000..6b4417d --- /dev/null +++ b/CPP/Windows/Control/StatusBar.h @@ -0,0 +1,56 @@ +// Windows/Control/StatusBar.h + +#ifndef __WINDOWS_CONTROL_STATUSBAR_H +#define __WINDOWS_CONTROL_STATUSBAR_H + +#include "Windows/Window.h" +#include "Windows/Defs.h" + +class wxStatusBar; + +namespace NWindows { +namespace NControl { + +class CStatusBar // : public NWindows::CWindow +{ + wxStatusBar * _statusBar; +public: + CStatusBar() : _statusBar(0) {} + + void Attach(wxWindow * newWindow); + wxWindow * Detach(); + + void SetText(int index, LPCTSTR text); + +/* FIXME + bool Create(LONG style, LPCTSTR text, HWND hwndParent, UINT id) + { return (_window = ::CreateStatusWindow(style, text, hwndParent, id)) != 0; } + bool SetParts(int numParts, const int *edgePostions) + { return LRESULTToBool(SendMessage(SB_SETPARTS, numParts, (LPARAM)edgePostions)); } + bool SetText(LPCTSTR text) + { return CWindow::SetText(text); } + + bool SetText(int index, LPCTSTR text, UINT type) + { return LRESULTToBool(SendMessage(SB_SETTEXT, index | type, (LPARAM)text)); } + bool SetText(int index, LPCTSTR text) + { return SetText(index, text, 0); } + void Simple(bool simple) + { SendMessage(SB_SIMPLE, BoolToBOOL(simple), 0); } + + #ifndef _UNICODE + bool Create(LONG style, LPCWSTR text, HWND hwndParent, UINT id) + { return (_window = ::CreateStatusWindowW(style, text, hwndParent, id)) != 0; } + bool SetText(LPCWSTR text) + { return CWindow::SetText(text); } + bool SetText(int index, LPCWSTR text, UINT type) + { return LRESULTToBool(SendMessage(SB_SETTEXTW, index | type, (LPARAM)text)); } + bool SetText(int index, LPCWSTR text) + { return SetText(index, text, 0); } + #endif +*/ +}; + +}} + +#endif + diff --git a/CPP/Windows/Control/Window2.cpp b/CPP/Windows/Control/Window2.cpp new file mode 100644 index 0000000..dda1da0 --- /dev/null +++ b/CPP/Windows/Control/Window2.cpp @@ -0,0 +1,211 @@ +// Windows/Control/Window2.cpp + +#include "StdAfx.h" + +#ifndef _UNICODE +#include "Common/StringConvert.h" +#endif +#include "Windows/Control/Window2.h" + +// extern HINSTANCE g_hInstance; +#ifndef _UNICODE +extern bool g_IsNT; +#endif + +namespace NWindows { + +#ifndef _UNICODE +ATOM MyRegisterClass(CONST WNDCLASSW *wndClass); +#endif + +namespace NControl { + +#ifdef _WIN32 +static LRESULT CALLBACK WindowProcedure(HWND aHWND, UINT message, + WPARAM wParam, LPARAM lParam) +{ + CWindow tempWindow(aHWND); + if (message == WM_NCCREATE) + tempWindow.SetUserDataLongPtr( + LONG_PTR(((LPCREATESTRUCT)lParam)->lpCreateParams)); + CWindow2 *window = (CWindow2*)(tempWindow.GetUserDataLongPtr()); + if (window != NULL && message == WM_NCCREATE) + window->Attach(aHWND); + if (window == 0) + { + #ifndef _UNICODE + if (g_IsNT) + return DefWindowProcW(aHWND, message, wParam, lParam); + else + #endif + return DefWindowProc(aHWND, message, wParam, lParam); + } + return window->OnMessage(message, wParam, lParam); +} + +bool CWindow2::CreateEx(DWORD exStyle, LPCTSTR className, + LPCTSTR windowName, DWORD style, + int x, int y, int width, int height, + HWND parentWindow, HMENU idOrHMenu, + HINSTANCE instance) +{ + WNDCLASS windowClass; + if(!::GetClassInfo(instance, className, &windowClass)) + { + // windowClass.style = CS_HREDRAW | CS_VREDRAW; + windowClass.style = 0; + + windowClass.lpfnWndProc = WindowProcedure; + windowClass.cbClsExtra = NULL; + windowClass.cbWndExtra = NULL; + windowClass.hInstance = instance; + windowClass.hIcon = NULL; + windowClass.hCursor = LoadCursor(NULL, IDC_ARROW); + windowClass.hbrBackground = (HBRUSH)(COLOR_WINDOW + 1); + windowClass.lpszMenuName = NULL; + windowClass.lpszClassName = className; + if (::RegisterClass(&windowClass) == 0) + return false; + } + return CWindow::CreateEx(exStyle, className, windowName, + style, x, y, width, height, parentWindow, + idOrHMenu, instance, this); +} + +#ifndef _UNICODE + +bool CWindow2::CreateEx(DWORD exStyle, LPCWSTR className, + LPCWSTR windowName, DWORD style, + int x, int y, int width, int height, + HWND parentWindow, HMENU idOrHMenu, + HINSTANCE instance) +{ + bool needRegister; + if(g_IsNT) + { + WNDCLASSW windowClass; + needRegister = ::GetClassInfoW(instance, className, &windowClass) == 0; + } + else + { + WNDCLASSA windowClassA; + AString classNameA; + LPCSTR classNameP; + if (IS_INTRESOURCE(className)) + classNameP = (LPCSTR)className; + else + { + classNameA = GetSystemString(className); + classNameP = classNameA; + } + needRegister = ::GetClassInfoA(instance, classNameP, &windowClassA) == 0; + } + if (needRegister) + { + WNDCLASSW windowClass; + // windowClass.style = CS_HREDRAW | CS_VREDRAW; + windowClass.style = 0; + windowClass.lpfnWndProc = WindowProcedure; + windowClass.cbClsExtra = NULL; + windowClass.cbWndExtra = NULL; + windowClass.hInstance = instance; + windowClass.hIcon = NULL; + windowClass.hCursor = LoadCursor(NULL, IDC_ARROW); + windowClass.hbrBackground = (HBRUSH)(COLOR_WINDOW + 1); + windowClass.lpszMenuName = NULL; + windowClass.lpszClassName = className; + if (MyRegisterClass(&windowClass) == 0) + return false; + } + return CWindow::CreateEx(exStyle, className, windowName, + style, x, y, width, height, parentWindow, + idOrHMenu, instance, this); + +} +#endif + +LRESULT CWindow2::DefProc(UINT message, WPARAM wParam, LPARAM lParam) +{ + #ifndef _UNICODE + if (g_IsNT) + return DefWindowProcW(_window, message, wParam, lParam); + else + #endif + return DefWindowProc(_window, message, wParam, lParam); +} +#endif + +LRESULT CWindow2::OnMessage(UINT message, WPARAM wParam, LPARAM lParam) +{ + LRESULT result; + switch (message) + { + case WM_CREATE: + if (!OnCreate((CREATESTRUCT *)lParam)) + return -1; + break; + case WM_COMMAND: + if (OnCommand(wParam, lParam, result)) + return result; + break; + case WM_NOTIFY: + if (OnNotify((UINT)wParam, (LPNMHDR) lParam, result)) + return result; + break; + case WM_DESTROY: + OnDestroy(); + break; + case WM_CLOSE: + OnClose(); + return 0; +#ifdef _WIN32 + case WM_SIZE: + if (OnSize(wParam, LOWORD(lParam), HIWORD(lParam))) + return 0; +#endif + } +#ifdef _WIN32 + return DefProc(message, wParam, lParam); +#else + return 0; +#endif +} + +bool CWindow2::OnCommand(WPARAM wParam, LPARAM lParam, LRESULT &result) +{ + return OnCommand(HIWORD(wParam), LOWORD(wParam), lParam, result); +} + +bool CWindow2::OnCommand(int /* code */, int /* itemID */, LPARAM /* lParam */, LRESULT & /* result */) +{ + return false; + // return DefProc(message, wParam, lParam); + /* + if (code == BN_CLICKED) + return OnButtonClicked(itemID, (HWND)lParam); + */ +} + +/* +bool CDialog::OnButtonClicked(int buttonID, HWND buttonHWND) +{ + switch(aButtonID) + { + case IDOK: + OnOK(); + break; + case IDCANCEL: + OnCancel(); + break; + case IDHELP: + OnHelp(); + break; + default: + return false; + } + return true; +} + +*/ + +}} diff --git a/CPP/Windows/Control/Window2.h b/CPP/Windows/Control/Window2.h new file mode 100644 index 0000000..48c8906 --- /dev/null +++ b/CPP/Windows/Control/Window2.h @@ -0,0 +1,111 @@ +// Windows/Control/Window2.h + +#ifndef __WINDOWS_CONTROL_WINDOW2_H +#define __WINDOWS_CONTROL_WINDOW2_H + +#include "Windows/Window.h" +#include "Windows/Defs.h" + +#ifndef _WIN32 +typedef void * WNDPROC; +typedef void * CREATESTRUCT; +typedef struct +{ + HWND hwndFrom; + + UINT code; +#define NM_DBLCLK 1 +#define LVN_ITEMCHANGED 2 +#define LVN_COLUMNCLICK 3 +#define CBEN_BEGINEDIT 10 +#define CBEN_ENDEDITW 11 + + +} NMHDR; +typedef NMHDR * LPNMHDR; + +typedef struct tagNMLISTVIEW +{ + NMHDR hdr; + INT iItem; + INT iSubItem; + UINT uNewState; + UINT uOldState; + // UINT uChanged; + // POINT ptAction; + LPARAM lParam; +} NMLISTVIEW, *LPNMLISTVIEW; + +typedef void * LPNMITEMACTIVATE; + +#define NM_RCLICK 1234 /* FIXME */ + +// FIXME +#define WM_CREATE 1 +#define WM_COMMAND 2 +#define WM_NOTIFY 3 +#define WM_DESTROY 4 +#define WM_CLOSE 5 + +#define HIWORD(l) ((WORD)((DWORD_PTR)(l) >> 16)) +#define LOWORD(l) ((WORD)((DWORD_PTR)(l) & 0xFFFF)) + + +#endif + +namespace NWindows { +namespace NControl { + +class CWindow2 // : public CWindow +{ + // LRESULT DefProc(UINT message, WPARAM wParam, LPARAM lParam); +public: + // CWindow2(HWND newWindow = NULL): CWindow(newWindow){}; + CWindow2() {} + virtual ~CWindow2() {} + +#ifdef _WIN32 + bool CreateEx(DWORD exStyle, LPCTSTR className, + LPCTSTR windowName, DWORD style, + int x, int y, int width, int height, + HWND parentWindow, HMENU idOrHMenu, + HINSTANCE instance); + + #ifndef _UNICODE + bool CreateEx(DWORD exStyle, LPCWSTR className, + LPCWSTR windowName, DWORD style, + int x, int y, int width, int height, + HWND parentWindow, HMENU idOrHMenu, + HINSTANCE instance); + #endif +#endif + + virtual LRESULT OnMessage(UINT message, WPARAM wParam, LPARAM lParam); + virtual bool OnCreate(CREATESTRUCT * /* createStruct */) { return true; } + // virtual LRESULT OnCommand(WPARAM wParam, LPARAM lParam); + virtual bool OnCommand(WPARAM wParam, LPARAM lParam, LRESULT &result); + virtual bool OnCommand(int code, int itemID, LPARAM lParam, LRESULT &result); + virtual bool OnSize(WPARAM /* wParam */, int /* xSize */, int /* ySize */) { return false; } + virtual bool OnNotify(UINT /* controlID */, LPNMHDR /* lParam */, LRESULT & /* result */) { return false; } + virtual void OnDestroy() { /* FIXME PostQuitMessage(0); */ } + virtual void OnClose() { /* FIXME Destroy(); */ } + /* + virtual LRESULT OnHelp(LPHELPINFO helpInfo) { OnHelp(); }; + virtual LRESULT OnHelp() {}; + virtual bool OnButtonClicked(int buttonID, HWND buttonHWND); + virtual void OnOK() {}; + virtual void OnCancel() {}; + */ + +#ifdef _WIN32 + LONG_PTR SetMsgResult(LONG_PTR newLongPtr ) + { return SetLongPtr(DWLP_MSGRESULT, newLongPtr); } + LONG_PTR GetMsgResult() const + { return GetLongPtr(DWLP_MSGRESULT); } +#endif +}; + +}} + +#endif + diff --git a/CPP/Windows/DLL.cpp b/CPP/Windows/DLL.cpp new file mode 100644 index 0000000..5f76cc5 --- /dev/null +++ b/CPP/Windows/DLL.cpp @@ -0,0 +1,193 @@ +// Windows/DLL.cpp + +#include "StdAfx.h" + +#ifdef __APPLE_CC__ +#include +#elif ENV_BEOS +#include +#include +#else +#define UINT64 DLL_UINT64 // HP-UX , dlfcn.h defines UINT64 but p7zip also defines UINT64 +#include // dlopen ... +#undef UINT64 +#endif + +#include "DLL.h" +#include "Defs.h" +#ifdef _UNICODE +#include "../Common/StringConvert.h" +#endif + +#define NEED_NAME_WINDOWS_TO_UNIX +#include "myPrivate.h" + +// #define TRACEN(u) u; +#define TRACEN(u) /* */ + +namespace NWindows { +namespace NDLL { + +CLibrary::~CLibrary() +{ + Free(); +} + +bool CLibrary::Free() +{ +TRACEN((printf("CLibrary::Free(%p)\n",(void *)_module))) + if (_module == 0) + return true; + +#ifdef __APPLE_CC__ + int ret = NSUnLinkModule ((NSModule)_module, 0); +#elif ENV_BEOS + int ret = unload_add_on((image_id)_module); +#else + int ret = dlclose(_module); +#endif +TRACEN((printf("CLibrary::Free dlclose(%p)=%d\n",(void *)_module,ret))) + if (ret != 0) return false; + _module = 0; + return true; +} + +static FARPROC local_GetProcAddress(HMODULE module,LPCSTR lpProcName) +{ + void *ptr = 0; + TRACEN((printf("local_GetProcAddress(%p,%s)\n",(void *)module,lpProcName))) + if (module) { +#ifdef __APPLE_CC__ + char name[MAX_PATHNAME_LEN]; + snprintf(name,sizeof(name),"_%s",lpProcName); + name[sizeof(name)-1] = 0; + TRACEN((printf("NSLookupSymbolInModule(%p,%s)\n",(void *)module,name))) + NSSymbol sym; + sym = NSLookupSymbolInModule((NSModule)module, name); + if (sym) { + ptr = NSAddressOfSymbol(sym); + } else { + ptr = 0; + } +#elif ENV_BEOS + if (get_image_symbol((image_id)module, lpProcName, B_SYMBOL_TYPE_TEXT, &ptr) != B_OK) + ptr = 0; +#else + ptr = dlsym (module, lpProcName); +#endif + TRACEN((printf("CLibrary::GetProc : dlsym(%p,%s)=%p\n",(void *)module,lpProcName,ptr))) + } + return (FARPROC)ptr; +} + +FARPROC CLibrary::GetProc(LPCSTR lpProcName) const +{ + TRACEN((printf("CLibrary::GetProc(%p,%s)\n",(void *)_module,lpProcName))) + return local_GetProcAddress(_module,lpProcName); +} + +bool CLibrary::LoadOperations(HMODULE newModule) +{ + if (newModule == NULL) + return false; + if(!Free()) + return false; + _module = newModule; + return true; +} + +bool CLibrary::Load(LPCTSTR lpLibFileName) +{ + void *handler = 0; + char name[MAX_PATHNAME_LEN+1]; +#ifdef _UNICODE + AString name2 = UnicodeStringToMultiByte(lpLibFileName); + strcpy(name,nameWindowToUnix((const char *)name2)); +#else + strcpy(name,nameWindowToUnix(lpLibFileName)); +#endif + + // replace ".dll" with ".so" + size_t len = strlen(name); + if ((len >=4) && (strcmp(name+len-4,".dll") == 0)) { + strcpy(name+len-4,".so"); + } + + TRACEN((printf("CLibrary::Load(%ls) => %s\n",lpLibFileName,name))) + +#ifdef __APPLE_CC__ + NSObjectFileImage image; + NSObjectFileImageReturnCode nsret; + + nsret = NSCreateObjectFileImageFromFile (name, &image); + if (nsret == NSObjectFileImageSuccess) { + TRACEN((printf("NSCreateObjectFileImageFromFile(%s) : OK\n",name))) + handler = (HMODULE)NSLinkModule(image,name,NSLINKMODULE_OPTION_RETURN_ON_ERROR + | NSLINKMODULE_OPTION_PRIVATE | NSLINKMODULE_OPTION_BINDNOW); + } else { + TRACEN((printf("NSCreateObjectFileImageFromFile(%s) : ERROR\n",name))) + } +#elif ENV_BEOS + // normalize path (remove things like "./", "..", etc..), otherwise it won't work + BPath p(name, NULL, true); + status_t err = B_OK; + image_id image = load_add_on(p.Path()); +TRACEN((printf("load_add_on(%s)=%d\n",p.Path(),(int)image))) + if (image < 0) { + err = (image_id)handler; + handler = 0; + } else { + err = 0; + handler = (HMODULE)image; + } +#else + int options_dlopen = 0; +#ifdef RTLD_LOCAL + options_dlopen |= RTLD_LOCAL; +#endif +#ifdef RTLD_NOW + options_dlopen |= RTLD_NOW; +#endif +#ifdef RTLD_GROUP + #if ! (defined(hpux) || defined(__hpux)) + options_dlopen |= RTLD_GROUP; // mainly for solaris but not for HPUX + #endif +#endif + TRACEN((printf("CLibrary::Load - dlopen(%s,0x%d)\n",name,options_dlopen))) + handler = dlopen(name,options_dlopen); +#endif // __APPLE_CC__ + TRACEN((printf("CLibrary::Load(%s) => %p\n",name,handler))) + if (handler) { + + // Call DllMain() like in Windows : useless now + + // Propagate the value of global_use_utf16_conversion into the plugins + int *tmp = (int *)local_GetProcAddress(handler,"global_use_utf16_conversion"); + if (tmp) *tmp = global_use_utf16_conversion; + + tmp = (int *)local_GetProcAddress(handler,"global_use_lstat"); + if (tmp) *tmp = global_use_lstat; + + // test construtors calls + void (*fctTest)(void) = (void (*)(void))local_GetProcAddress(handler,"sync_TestConstructor"); + if (fctTest) fctTest(); + + } else { +#ifdef __APPLE_CC__ + NSLinkEditErrors c; + int num_err; + const char *file,*err; + NSLinkEditError(&c,&num_err,&file,&err); + printf("Can't load '%ls' (%s)\n", lpLibFileName,err); +#elif ENV_BEOS + printf("Can't load '%ls' (%s)\n", lpLibFileName,strerror(err)); +#else + printf("Can't load '%ls' (%s)\n", lpLibFileName,dlerror()); +#endif + } + + return LoadOperations(handler); +} + +}} + diff --git a/CPP/Windows/DLL.h b/CPP/Windows/DLL.h new file mode 100644 index 0000000..9b57bec --- /dev/null +++ b/CPP/Windows/DLL.h @@ -0,0 +1,48 @@ +// Windows/DLL.h + +#ifndef __WINDOWS_DLL_H +#define __WINDOWS_DLL_H + +#include "../Common/MyString.h" + +typedef void * HMODULE; + +typedef int (*FARPROC)(); + +namespace NWindows { +namespace NDLL { + +class CLibrary +{ + bool LoadOperations(HMODULE newModule); + HMODULE _module; +public: + operator HMODULE() const { return _module; } + HMODULE* operator&() { return &_module; } + + + CLibrary():_module(NULL) {}; + ~CLibrary(); + + bool Free(); + + void Attach(HMODULE m) + { + Free(); + _module = m; + } + HMODULE Detach() + { + HMODULE m = _module; + _module = NULL; + return m; + } + + + bool Load(LPCTSTR fileName); + FARPROC GetProc(LPCSTR procName) const; +}; + +}} + +#endif diff --git a/CPP/Windows/Defs.h b/CPP/Windows/Defs.h new file mode 100644 index 0000000..bad4e35 --- /dev/null +++ b/CPP/Windows/Defs.h @@ -0,0 +1,17 @@ +// Windows/Defs.h + +#ifndef __WINDOWS_DEFS_H +#define __WINDOWS_DEFS_H + +#include "../Common/MyWindows.h" + +// #ifdef _WIN32 +inline bool LRESULTToBool(LRESULT v) { return (v != FALSE); } +inline bool BOOLToBool(BOOL v) { return (v != FALSE); } +inline BOOL BoolToBOOL(bool v) { return (v ? TRUE: FALSE); } +// #endif + +inline VARIANT_BOOL BoolToVARIANT_BOOL(bool v) { return (v ? VARIANT_TRUE: VARIANT_FALSE); } +inline bool VARIANT_BOOLToBool(VARIANT_BOOL v) { return (v != VARIANT_FALSE); } + +#endif diff --git a/CPP/Windows/Error.cpp b/CPP/Windows/Error.cpp new file mode 100644 index 0000000..88008d7 --- /dev/null +++ b/CPP/Windows/Error.cpp @@ -0,0 +1,58 @@ +// Windows/Error.h + +#include "StdAfx.h" + +#include "Windows/Error.h" +#include "Common/StringConvert.h" + +namespace NWindows { +namespace NError { + +bool MyFormatMessage(DWORD messageID, CSysString &message) +{ + const char * txt = 0; + AString msg; + + switch(messageID) { + case ERROR_NO_MORE_FILES : txt = "No more files"; break ; + case E_NOTIMPL : txt = "E_NOTIMPL"; break ; + case E_NOINTERFACE : txt = "E_NOINTERFACE"; break ; + case E_ABORT : txt = "E_ABORT"; break ; + case E_FAIL : txt = "E_FAIL"; break ; + case STG_E_INVALIDFUNCTION : txt = "STG_E_INVALIDFUNCTION"; break ; + case E_OUTOFMEMORY : txt = "E_OUTOFMEMORY"; break ; + case E_INVALIDARG : txt = "E_INVALIDARG"; break ; + default: + txt = strerror(messageID); + } + if (txt) { + msg = txt; + } else { + char msgBuf[256]; + snprintf(msgBuf,sizeof(msgBuf),"error #%x",(unsigned)messageID); + msgBuf[sizeof(msgBuf)-1] = 0; + msg = msgBuf; + } + + msg += " "; + +#ifdef _UNICODE + message = MultiByteToUnicodeString(msg); +#else + message = msg; +#endif + return true; +} + +#ifndef _UNICODE +bool MyFormatMessage(DWORD messageID, UString &message) +{ + CSysString messageSys; + bool result = MyFormatMessage(messageID, messageSys); + message = GetUnicodeString(messageSys); + return result; +} +#endif + +}} + diff --git a/CPP/Windows/Error.h b/CPP/Windows/Error.h new file mode 100644 index 0000000..05b5cd0 --- /dev/null +++ b/CPP/Windows/Error.h @@ -0,0 +1,33 @@ +// Windows/Error.h + +#ifndef __WINDOWS_ERROR_H +#define __WINDOWS_ERROR_H + +#include "Common/MyString.h" + +namespace NWindows { +namespace NError { + +bool MyFormatMessage(DWORD messageID, CSysString &message); +inline CSysString MyFormatMessage(DWORD messageID) +{ + CSysString message; + MyFormatMessage(messageID, message); + return message; +} +#ifdef _UNICODE +inline UString MyFormatMessageW(DWORD messageID) + { return MyFormatMessage(messageID); } +#else +bool MyFormatMessage(DWORD messageID, UString &message); +inline UString MyFormatMessageW(DWORD messageID) +{ + UString message; + MyFormatMessage(messageID, message); + return message; +} +#endif + +}} + +#endif diff --git a/CPP/Windows/FileDir.cpp b/CPP/Windows/FileDir.cpp new file mode 100644 index 0000000..838f92d --- /dev/null +++ b/CPP/Windows/FileDir.cpp @@ -0,0 +1,927 @@ +// Windows/FileDir.cpp + +#include "StdAfx.h" + +#include "FileDir.h" +#include "FileName.h" +#include "FileFind.h" +#include "Defs.h" +#include "../Common/StringConvert.h" +#include "../Common/IntToString.h" + +#define NEED_NAME_WINDOWS_TO_UNIX +#include "myPrivate.h" +#include "Windows/Synchronization.h" + +#include // rmdir +#include + +#include // mkdir +#include +#include + +#include + +// #define TRACEN(u) u; +#define TRACEN(u) /* */ + +class Umask +{ + public: + mode_t current_umask; + mode_t mask; + Umask() { + current_umask = umask (0); /* get and set the umask */ + umask(current_umask); /* restore the umask */ + mask = 0777 & (~current_umask); + } +}; + +static Umask gbl_umask; + +#ifdef _UNICODE +AString nameWindowToUnix2(LPCWSTR name) // FIXME : optimization ? +{ + AString astr = UnicodeStringToMultiByte(name); + return AString(nameWindowToUnix((const char *)astr)); +} +#endif + +extern BOOLEAN WINAPI RtlTimeToSecondsSince1970( const LARGE_INTEGER *Time, DWORD *Seconds ); + +#ifdef _UNICODE +DWORD WINAPI GetFullPathName( LPCTSTR name, DWORD len, LPTSTR buffer, LPTSTR *lastpart ) { // FIXME + if (name == 0) return 0; + + DWORD name_len = lstrlen(name); + + if (name[0] == '/') { + DWORD ret = name_len+2; + if (ret >= len) { + TRACEN((printf("GetFullPathNameA(%ls,%d,)=0000 (case 0)\n",name, (int)len))) + return 0; + } + lstrcpy(buffer,L"c:"); + lstrcat(buffer,name); + + *lastpart=buffer; + TCHAR *ptr=buffer; + while (*ptr) { + if (*ptr == '/') + *lastpart=ptr+1; + ptr++; + } + TRACEN((printf("GetFullPathNameA(%s,%d,%ls,%ls)=%d\n",name, (int)len,buffer, *lastpart,(int)ret))) + return ret; + } + if (isascii(name[0]) && (name[1] == ':')) { // FIXME isascii + DWORD ret = name_len; + if (ret >= len) { + TRACEN((printf("GetFullPathNameA(%ls,%d,)=0000 (case 1)\n",name, (int)len))) + return 0; + } + lstrcpy(buffer,name); + + *lastpart=buffer; + TCHAR *ptr=buffer; + while (*ptr) { + if (*ptr == '/') + *lastpart=ptr+1; + ptr++; + } + TRACEN((printf("GetFullPathNameA(%sl,%d,%ls,%ls)=%d\n",name, (int)len,buffer, *lastpart,(int)ret))) + return ret; + } + + // name is a relative pathname. + // + if (len < 2) { + TRACEN((printf("GetFullPathNameA(%s,%d,)=0000 (case 2)\n",name, (int)len))) + return 0; + } + + DWORD ret = 0; + char begin[MAX_PATHNAME_LEN]; + /* DWORD begin_len = GetCurrentDirectoryA(MAX_PATHNAME_LEN,begin); */ + DWORD begin_len = 0; + begin[0]='c'; + begin[1]=':'; + char * cret = getcwd(begin+2, MAX_PATHNAME_LEN - 3); + if (cret) { + begin_len = strlen(begin); + } + + if (begin_len >= 1) { + // strlen(begin) + strlen("/") + strlen(name) + ret = begin_len + 1 + name_len; + + if (ret >= len) { + TRACEN((printf("GetFullPathNameA(%s,%d,)=0000 (case 4)\n",name, (int)len))) + return 0; + } + UString wbegin = GetUnicodeString(begin); + lstrcpy(buffer,wbegin); + lstrcat(buffer,L"/"); + lstrcat(buffer,name); + + *lastpart=buffer + begin_len + 1; + TCHAR *ptr=buffer; + while (*ptr) { + if (*ptr == '/') + *lastpart=ptr+1; + ptr++; + } + TRACEN((printf("GetFullPathNameA(%s,%d,%s,%s)=%d\n",name, (int)len,buffer, *lastpart,(int)ret))) + } else { + ret = 0; + TRACEN((printf("GetFullPathNameA(%s,%d,)=0000 (case 5)\n",name, (int)len))) + } + return ret; +} + +#endif + +#if 0 +DWORD WINAPI GetFullPathName( LPCSTR name, DWORD len, LPSTR buffer, LPSTR *lastpart ) { + if (name == 0) return 0; + + DWORD name_len = strlen(name); + + if (name[0] == '/') { + DWORD ret = name_len+2; + if (ret >= len) { + TRACEN((printf("GetFullPathNameA(%s,%d,)=0000 (case 0)\n",name, (int)len))) + return 0; + } + strcpy(buffer,"c:"); + strcat(buffer,name); + + *lastpart=buffer; + char *ptr=buffer; + while (*ptr) { + if (*ptr == '/') + *lastpart=ptr+1; + ptr++; + } + TRACEN((printf("GetFullPathNameA(%s,%d,%s,%s)=%d\n",name, (int)len,buffer, *lastpart,(int)ret))) + return ret; + } + if (isascii(name[0]) && (name[1] == ':')) { + DWORD ret = name_len; + if (ret >= len) { + TRACEN((printf("GetFullPathNameA(%s,%d,)=0000 (case 1)\n",name, (int)len))) + return 0; + } + strcpy(buffer,name); + + *lastpart=buffer; + char *ptr=buffer; + while (*ptr) { + if (*ptr == '/') + *lastpart=ptr+1; + ptr++; + } + TRACEN((printf("GetFullPathNameA(%s,%d,%s,%s)=%d\n",name, (int)len,buffer, *lastpart,(int)ret))) + return ret; + } + + // name is a relative pathname. + // + if (len < 2) { + TRACEN((printf("GetFullPathNameA(%s,%d,)=0000 (case 2)\n",name, (int)len))) + return 0; + } + + DWORD ret = 0; + char begin[MAX_PATHNAME_LEN]; + /* DWORD begin_len = GetCurrentDirectoryA(MAX_PATHNAME_LEN,begin); */ + DWORD begin_len = 0; + begin[0]='c'; + begin[1]=':'; + char * cret = getcwd(begin+2, MAX_PATHNAME_LEN - 3); + if (cret) { + begin_len = strlen(begin); + } + + if (begin_len >= 1) { + // strlen(begin) + strlen("/") + strlen(name) + ret = begin_len + 1 + name_len; + + if (ret >= len) { + TRACEN((printf("GetFullPathNameA(%s,%d,)=0000 (case 4)\n",name, (int)len))) + return 0; + } + strcpy(buffer,begin); + strcat(buffer,"/"); + strcat(buffer,name); + + *lastpart=buffer + begin_len + 1; + char *ptr=buffer; + while (*ptr) { + if (*ptr == '/') + *lastpart=ptr+1; + ptr++; + } + TRACEN((printf("GetFullPathNameA(%s,%d,%s,%s)=%d\n",name, (int)len,buffer, *lastpart,(int)ret))) + } else { + ret = 0; + TRACEN((printf("GetFullPathNameA(%s,%d,)=0000 (case 5)\n",name, (int)len))) + } + return ret; +} + +static BOOL WINAPI RemoveDirectory(LPCSTR path) { + if (!path || !*path) { + SetLastError(ERROR_PATH_NOT_FOUND); + return FALSE; + } + const char * name = nameWindowToUnix(path); + TRACEN((printf("RemoveDirectoryA(%s)\n",name))) + + if (rmdir( name ) != 0) { + return FALSE; + } + return TRUE; +} +#endif + +#ifdef _UNICODE +static BOOL WINAPI RemoveDirectory(LPCWSTR path) { + if (!path || !*path) { + SetLastError(ERROR_PATH_NOT_FOUND); + return FALSE; + } + AString name = nameWindowToUnix2(path); + TRACEN((printf("RemoveDirectoryA(%s)\n",(const char *)name))) + + if (rmdir( (const char *)name ) != 0) { + return FALSE; + } + return TRUE; +} +#endif + +static int copy_fd(int fin,int fout) +{ + char buffer[16384]; + ssize_t ret_in; + ssize_t ret_out; + + do { + ret_out = -1; + do { + ret_in = read(fin, buffer,sizeof(buffer)); + } while (ret_in < 0 && (errno == EINTR)); + if (ret_in >= 1) { + do { + ret_out = write (fout, buffer, ret_in); + } while (ret_out < 0 && (errno == EINTR)); + } else if (ret_in == 0) { + ret_out = 0; + } + } while (ret_out >= 1); + return ret_out; +} + +static BOOL CopyFile(const char *src,const char *dst) +{ + int ret = -1; + +#ifdef O_BINARY + int flags = O_BINARY; +#else + int flags = 0; +#endif + +#ifdef O_LARGEFILE + flags |= O_LARGEFILE; +#endif + + int fout = open(dst,O_CREAT | O_WRONLY | O_EXCL | flags, 0600); + if (fout != -1) + { + int fin = open(src,O_RDONLY | flags , 0600); + if (fin != -1) + { + ret = copy_fd(fin,fout); + if (ret == 0) ret = close(fin); + else close(fin); + } + if (ret == 0) ret = close(fout); + else close(fout); + } + if (ret == 0) return TRUE; + return FALSE; +} + +/*****************************************************************************************/ + + +namespace NWindows { +namespace NFile { +namespace NDirectory { + + +bool MySetCurrentDirectory(LPCWSTR wpath) +{ + AString path = UnicodeStringToMultiByte(wpath); + + return chdir((const char*)path) == 0; +} + +#ifdef _UNICODE +bool GetOnlyName(LPCTSTR fileName, CSysString &resultName) +{ + int index; + if (!MyGetFullPathName(fileName, resultName, index)) + return false; + resultName = resultName.Mid(index); + return true; +} + +bool GetOnlyDirPrefix(LPCTSTR fileName, CSysString &resultName) +{ + int index; + if (!MyGetFullPathName(fileName, resultName, index)) + return false; + resultName = resultName.Left(index); + return true; +} +#endif + + +bool MyGetCurrentDirectory(CSysString &resultPath) +{ + char begin[MAX_PATHNAME_LEN]; + begin[0]='c'; + begin[1]=':'; + char * cret = getcwd(begin+2, MAX_PATHNAME_LEN - 3); + if (cret) + { +#ifdef _UNICODE + resultPath = GetUnicodeString(begin); +#else + resultPath = begin; +#endif + return true; + } + return false; +} + +bool MyMoveFile( LPCTSTR fn1, LPCTSTR fn2 ) { +#ifdef _UNICODE + AString src = nameWindowToUnix2(fn1); + AString dst = nameWindowToUnix2(fn2); +#else + const char * src = nameWindowToUnix(fn1); + const char * dst = nameWindowToUnix(fn2); +#endif + + TRACEN((printf("MoveFileW(%s,%s)\n",src,dst))) + + int ret = rename(src,dst); + if (ret != 0) + { + if (errno == EXDEV) // FIXED : bug #1112167 (Temporary directory must be on same partition as target) + { + BOOL bret = CopyFile(src,dst); + if (bret == FALSE) return false; + + struct stat info_file; + ret = stat(src,&info_file); + if (ret == 0) { + TRACEN((printf("##DBG chmod-1(%s,%o)\n",dst,(unsigned)info_file.st_mode & gbl_umask.mask))) + ret = chmod(dst,info_file.st_mode & gbl_umask.mask); + } + if (ret == 0) { + ret = unlink(src); + } + if (ret == 0) return true; + } + return false; + } + return true; +} + +bool MyRemoveDirectory(LPCTSTR pathName) +{ + return BOOLToBool(::RemoveDirectory(pathName)); +} + +bool SetDirTime(LPCWSTR fileName, const FILETIME * /* creationTime */ , + const FILETIME *lpLastAccessTime, const FILETIME *lpLastWriteTime) +{ + AString cfilename = UnicodeStringToMultiByte(fileName); + const char * unix_filename = nameWindowToUnix((const char *)cfilename); + + struct utimbuf buf; + + struct stat oldbuf; + int ret = stat(unix_filename,&oldbuf); + if (ret == 0) { + buf.actime = oldbuf.st_atime; + buf.modtime = oldbuf.st_mtime; + } else { + time_t current_time = time(0); + buf.actime = current_time; + buf.modtime = current_time; + } + + if (lpLastAccessTime) + { + LARGE_INTEGER ltime; + DWORD dw; + ltime.QuadPart = lpLastAccessTime->dwHighDateTime; + ltime.QuadPart = (ltime.QuadPart << 32) | lpLastAccessTime->dwLowDateTime; + RtlTimeToSecondsSince1970( <ime, &dw ); + buf.actime = dw; + } + + if (lpLastWriteTime) + { + LARGE_INTEGER ltime; + DWORD dw; + ltime.QuadPart = lpLastWriteTime->dwHighDateTime; + ltime.QuadPart = (ltime.QuadPart << 32) | lpLastWriteTime->dwLowDateTime; + RtlTimeToSecondsSince1970( <ime, &dw ); + buf.modtime = dw; + } + + /* ret = */ utime(unix_filename, &buf); + + return true; +} + +#ifndef _UNICODE +bool MySetFileAttributes(LPCWSTR fileName, DWORD fileAttributes) +{ + return MySetFileAttributes(UnicodeStringToMultiByte(fileName, CP_ACP), fileAttributes); +} + +bool MyRemoveDirectory(LPCWSTR pathName) +{ + return MyRemoveDirectory(UnicodeStringToMultiByte(pathName, CP_ACP)); +} + +bool MyMoveFile(LPCWSTR existFileName, LPCWSTR newFileName) +{ + UINT codePage = CP_ACP; + return MyMoveFile(UnicodeStringToMultiByte(existFileName, codePage), UnicodeStringToMultiByte(newFileName, codePage)); +} +#endif + + +static int convert_to_symlink(const char * name) { + FILE *file = fopen(name,"rb"); + if (file) { + char buf[MAX_PATHNAME_LEN+1]; + char * ret = fgets(buf,sizeof(buf)-1,file); + fclose(file); + if (ret) { + int ir = unlink(name); + if (ir == 0) { + ir = symlink(buf,name); + } + return ir; + } + } + return -1; +} + +bool MySetFileAttributes(LPCTSTR fileName, DWORD fileAttributes) +{ + if (!fileName) { + SetLastError(ERROR_PATH_NOT_FOUND); + TRACEN((printf("MySetFileAttributes(NULL,%d) : false-1\n",fileAttributes))) + return false; + } +#ifdef _UNICODE + AString name = nameWindowToUnix2(fileName); +#else + const char * name = nameWindowToUnix(fileName); +#endif + struct stat stat_info; +#ifdef ENV_HAVE_LSTAT + if (global_use_lstat) { + if(lstat(name,&stat_info)!=0) { + TRACEN((printf("MySetFileAttributes(%s,%d) : false-2-1\n",name,fileAttributes))) + return false; + } + } else +#endif + { + if(stat(name,&stat_info)!=0) { + TRACEN((printf("MySetFileAttributes(%s,%d) : false-2-2\n",name,fileAttributes))) + return false; + } + } + + if (fileAttributes & FILE_ATTRIBUTE_UNIX_EXTENSION) { + stat_info.st_mode = fileAttributes >> 16; +#ifdef ENV_HAVE_LSTAT + if (S_ISLNK(stat_info.st_mode)) { + if ( convert_to_symlink(name) != 0) { + TRACEN((printf("MySetFileAttributes(%s,%d) : false-3\n",name,fileAttributes))) + return false; + } + } else +#endif + if (S_ISREG(stat_info.st_mode)) { + TRACEN((printf("##DBG chmod-2(%s,%o)\n",name,(unsigned)stat_info.st_mode & gbl_umask.mask))) + chmod(name,stat_info.st_mode & gbl_umask.mask); + } else if (S_ISDIR(stat_info.st_mode)) { + // user/7za must be able to create files in this directory + stat_info.st_mode |= (S_IRUSR | S_IWUSR | S_IXUSR); + TRACEN((printf("##DBG chmod-3(%s,%o)\n",name,(unsigned)stat_info.st_mode & gbl_umask.mask))) + chmod(name,stat_info.st_mode & gbl_umask.mask); + } +#ifdef ENV_HAVE_LSTAT + } else if (!S_ISLNK(stat_info.st_mode)) { + // do not use chmod on a link +#else + } else { +#endif + + /* Only Windows Attributes */ + if( S_ISDIR(stat_info.st_mode)) { + /* Remark : FILE_ATTRIBUTE_READONLY ignored for directory. */ + TRACEN((printf("##DBG chmod-4(%s,%o)\n",name,(unsigned)stat_info.st_mode & gbl_umask.mask))) + chmod(name,stat_info.st_mode & gbl_umask.mask); + } else { + if (fileAttributes & FILE_ATTRIBUTE_READONLY) stat_info.st_mode &= ~0222; /* octal!, clear write permission bits */ + TRACEN((printf("##DBG chmod-5(%s,%o)\n",name,(unsigned)stat_info.st_mode & gbl_umask.mask))) + chmod(name,stat_info.st_mode & gbl_umask.mask); + } + } + TRACEN((printf("MySetFileAttributes(%s,%d) : true\n",name,fileAttributes))) + + return true; +} + +bool MyCreateDirectory(LPCTSTR pathName) +{ + if (!pathName || !*pathName) { + SetLastError(ERROR_PATH_NOT_FOUND); + return false; + } + +#ifdef _UNICODE + AString name = nameWindowToUnix2(pathName); +#else + const char * name = nameWindowToUnix(pathName); +#endif + bool bret = false; + if (mkdir( name, 0700 ) == 0) bret = true; + + TRACEN((printf("MyCreateDirectory(%s)=%d\n",name,(int)bret))) + return bret; +} + +#ifndef _UNICODE +bool MyCreateDirectory(LPCWSTR pathName) +{ + return MyCreateDirectory(UnicodeStringToMultiByte(pathName, CP_ACP)); +} +#endif + +bool CreateComplexDirectory(LPCTSTR _aPathName) +{ + CSysString pathName = _aPathName; + int pos = pathName.ReverseFind(TEXT(CHAR_PATH_SEPARATOR)); + if (pos > 0 && pos == pathName.Length() - 1) + { + if (pathName.Length() == 3 && pathName[1] == ':') + return true; // Disk folder; + pathName.Delete(pos); + } + CSysString pathName2 = pathName; + pos = pathName.Length(); + while(true) + { + if(MyCreateDirectory(pathName)) + break; + if(::GetLastError() == ERROR_ALREADY_EXISTS) + { +#ifdef _WIN32 // FIXED for supporting symbolic link instead of a directory + NFind::CFileInfo fileInfo; + if (!NFind::FindFile(pathName, fileInfo)) // For network folders + return true; + if (!fileInfo.IsDir()) + return false; +#endif + break; + } + pos = pathName.ReverseFind(TEXT(CHAR_PATH_SEPARATOR)); + if (pos < 0 || pos == 0) + return false; + if (pathName[pos - 1] == ':') + return false; + pathName = pathName.Left(pos); + } + pathName = pathName2; + while(pos < pathName.Length()) + { + pos = pathName.Find(TEXT(CHAR_PATH_SEPARATOR), pos + 1); + if (pos < 0) + pos = pathName.Length(); + if(!MyCreateDirectory(pathName.Left(pos))) + return false; + } + return true; +} + +#ifndef _UNICODE + +bool CreateComplexDirectory(LPCWSTR _aPathName) +{ + UString pathName = _aPathName; + int pos = pathName.ReverseFind(WCHAR_PATH_SEPARATOR); + if (pos > 0 && pos == pathName.Length() - 1) + { + if (pathName.Length() == 3 && pathName[1] == L':') + return true; // Disk folder; + pathName.Delete(pos); + } + UString pathName2 = pathName; + pos = pathName.Length(); + while(true) + { + if(MyCreateDirectory(pathName)) + break; + if(::GetLastError() == ERROR_ALREADY_EXISTS) + { +#ifdef _WIN32 // FIXED for supporting symbolic link instead of a directory + NFind::CFileInfoW fileInfo; + if (!NFind::FindFile(pathName, fileInfo)) // For network folders + return true; + if (!fileInfo.IsDir()) + return false; +#endif + break; + } + pos = pathName.ReverseFind(WCHAR_PATH_SEPARATOR); + if (pos < 0 || pos == 0) + return false; + if (pathName[pos - 1] == L':') + return false; + pathName = pathName.Left(pos); + } + pathName = pathName2; + while(pos < pathName.Length()) + { + pos = pathName.Find(WCHAR_PATH_SEPARATOR, pos + 1); + if (pos < 0) + pos = pathName.Length(); + if(!MyCreateDirectory(pathName.Left(pos))) + return false; + } + return true; +} + +#endif + +bool DeleteFileAlways(LPCTSTR name) +{ + if (!name || !*name) { + SetLastError(ERROR_PATH_NOT_FOUND); + return false; + } +#ifdef _UNICODE + AString unixname = nameWindowToUnix2(name); +#else + const char * unixname = nameWindowToUnix(name); +#endif + bool bret = false; + if (remove(unixname) == 0) bret = true; + TRACEN((printf("DeleteFileAlways(%s)=%d\n",unixname,(int)bret))) + return bret; +} + +#ifndef _UNICODE +bool DeleteFileAlways(LPCWSTR name) +{ + return DeleteFileAlways(UnicodeStringToMultiByte(name, CP_ACP)); +} +#endif + + +static bool RemoveDirectorySubItems2(const UString &pathPrefix, const NFind::CFileInfoW &fileInfo) +{ + if (fileInfo.IsDir()) + return RemoveDirectoryWithSubItems(pathPrefix + fileInfo.Name); + return DeleteFileAlways(pathPrefix + fileInfo.Name); +} + +bool RemoveDirectoryWithSubItems(const UString &path) +{ + NFind::CFileInfoW fileInfo; + UString pathPrefix = path + NName::kDirDelimiter; + { + NFind::CEnumeratorW enumerator(pathPrefix + TCHAR(NName::kAnyStringWildcard)); + while (enumerator.Next(fileInfo)) + if (!RemoveDirectorySubItems2(pathPrefix, fileInfo)) + return false; + } + if (!MySetFileAttributes(path, 0)) + return false; + return MyRemoveDirectory(path); +} + +#ifndef _WIN32_WCE + +bool MyGetFullPathName(LPCTSTR fileName, CSysString &resultPath, + int &fileNamePartStartIndex) +{ + LPTSTR fileNamePointer = 0; + LPTSTR buffer = resultPath.GetBuffer(MAX_PATH); + DWORD needLength = ::GetFullPathName(fileName, MAX_PATH + 1, + buffer, &fileNamePointer); + resultPath.ReleaseBuffer(); + if (needLength == 0 || needLength >= MAX_PATH) + return false; + if (fileNamePointer == 0) + fileNamePartStartIndex = lstrlen(fileName); + else + fileNamePartStartIndex = fileNamePointer - buffer; + return true; +} + +#ifndef _UNICODE +bool MyGetFullPathName(LPCWSTR fileName, UString &resultPath, + int &fileNamePartStartIndex) +{ + const UINT currentPage = CP_ACP; + CSysString sysPath; + if (!MyGetFullPathName(UnicodeStringToMultiByte(fileName, + currentPage), sysPath, fileNamePartStartIndex)) + return false; + UString resultPath1 = MultiByteToUnicodeString( + sysPath.Left(fileNamePartStartIndex), currentPage); + UString resultPath2 = MultiByteToUnicodeString( + sysPath.Mid(fileNamePartStartIndex), currentPage); + fileNamePartStartIndex = resultPath1.Length(); + resultPath = resultPath1 + resultPath2; + return true; +} +#endif + + +bool MyGetFullPathName(LPCTSTR fileName, CSysString &path) +{ + int index; + return MyGetFullPathName(fileName, path, index); +} + +#ifndef _UNICODE +bool MyGetFullPathName(LPCWSTR fileName, UString &path) +{ + int index; + return MyGetFullPathName(fileName, path, index); +} +#endif + +#endif + +/* needed to find .DLL/.so and SFX */ +bool MySearchPath(LPCWSTR path, LPCWSTR fileName, LPCWSTR extension, UString &resultPath) +{ + if (path != 0) { + printf("NOT EXPECTED : MySearchPath : path != NULL\n"); + exit(EXIT_FAILURE); + } + + if (extension != 0) { + printf("NOT EXPECTED : MySearchPath : extension != NULL\n"); + exit(EXIT_FAILURE); + } + + if (fileName == 0) { + printf("NOT EXPECTED : MySearchPath : fileName == NULL\n"); + exit(EXIT_FAILURE); + } + + const char *p7zip_home_dir = getenv("P7ZIP_HOME_DIR"); + if (p7zip_home_dir) { + AString file_path = p7zip_home_dir; + file_path += UnicodeStringToMultiByte(fileName, CP_ACP); + + TRACEN((printf("MySearchPath() fopen(%s)\n",(const char *)file_path))) + FILE *file = fopen((const char *)file_path,"r"); + if (file) { + // file is found + fclose(file); + resultPath = MultiByteToUnicodeString(file_path, CP_ACP); + return true; + } + } + return false; +} + +#ifndef _UNICODE +bool MyGetTempPath(CSysString &path) +{ + path = "c:/tmp/"; // final '/' is needed + return true; +} +#endif + +bool MyGetTempPath(UString &path) +{ + path = L"c:/tmp/"; // final '/' is needed + return true; +} + +static NSynchronization::CCriticalSection g_CountCriticalSection; + +static CSysString CSysConvertUInt32ToString(UInt32 value) +{ + TCHAR buffer[32]; + ConvertUInt32ToString(value, buffer); + return buffer; +} + +UINT CTempFile::Create(LPCTSTR dirPath, LPCTSTR prefix, CSysString &resultPath) +{ + static UInt32 memo_count = 0; + UInt32 count; + + g_CountCriticalSection.Enter(); + count = memo_count++; + g_CountCriticalSection.Leave(); + + Remove(); +/* UINT number = ::GetTempFileName(dirPath, prefix, 0, path.GetBuffer(MAX_PATH)); */ + UINT number = (UINT)getpid(); + + resultPath = dirPath; + resultPath += prefix; + resultPath += TEXT('#'); + resultPath += CSysConvertUInt32ToString(number); + resultPath += TEXT('@'); + resultPath += CSysConvertUInt32ToString(count); + resultPath += TEXT(".tmp"); + + _fileName = resultPath; + _mustBeDeleted = true; + + return number; +} + +bool CTempFile::Create(LPCTSTR prefix, CSysString &resultPath) +{ + CSysString tempPath; + if (!MyGetTempPath(tempPath)) + return false; + if (Create(tempPath, prefix, resultPath) != 0) + return true; + return false; +} + + +bool CTempFile::Remove() +{ + if (!_mustBeDeleted) + return true; + _mustBeDeleted = !DeleteFileAlways(_fileName); + return !_mustBeDeleted; +} + +bool CreateTempDirectory(LPCWSTR prefix, UString &dirName) +{ + /* + CSysString prefix = tempPath + prefixChars; + CRandom random; + random.Init(); + */ + for (;;) + { + { + CTempFileW tempFile; + if (!tempFile.Create(prefix, dirName)) + return false; + if (!tempFile.Remove()) + return false; + } + /* + UINT32 randomNumber = random.Generate(); + TCHAR randomNumberString[32]; + _stprintf(randomNumberString, _T("%04X"), randomNumber); + dirName = prefix + randomNumberString; + */ + if (NFind::DoesFileOrDirExist(dirName)) + continue; + if (MyCreateDirectory(dirName)) + return true; + if (::GetLastError() != ERROR_ALREADY_EXISTS) + return false; + } +} + +bool CTempDirectory::Create(LPCTSTR prefix) +{ + Remove(); + return (_mustBeDeleted = CreateTempDirectory(prefix, _tempDir)); +} + + +}}} diff --git a/CPP/Windows/FileDir.h b/CPP/Windows/FileDir.h new file mode 100644 index 0000000..a7cfbaf --- /dev/null +++ b/CPP/Windows/FileDir.h @@ -0,0 +1,115 @@ +// Windows/FileDir.h + +#ifndef __WINDOWS_FILEDIR_H +#define __WINDOWS_FILEDIR_H + +#include "../Common/MyString.h" +#include "Defs.h" + +/* GetFullPathName for 7zAES.cpp */ +DWORD WINAPI GetFullPathName( LPCSTR name, DWORD len, LPSTR buffer, LPSTR *lastpart ); + +namespace NWindows { +namespace NFile { +namespace NDirectory { + +bool SetDirTime(LPCWSTR fileName, const FILETIME *creationTime, const FILETIME *lastAccessTime, const FILETIME *lastWriteTime); + +bool MySetFileAttributes(LPCTSTR fileName, DWORD fileAttributes); +#ifndef _UNICODE +bool MySetFileAttributes(LPCWSTR fileName, DWORD fileAttributes); +#endif + +bool MyMoveFile(LPCTSTR existFileName, LPCTSTR newFileName); +#ifndef _UNICODE +bool MyMoveFile(LPCWSTR existFileName, LPCWSTR newFileName); +#endif + +bool MyRemoveDirectory(LPCTSTR pathName); +#ifndef _UNICODE +bool MyRemoveDirectory(LPCWSTR pathName); +#endif + +bool MyCreateDirectory(LPCTSTR pathName); +bool CreateComplexDirectory(LPCTSTR pathName); +#ifndef _UNICODE +bool MyCreateDirectory(LPCWSTR pathName); +bool CreateComplexDirectory(LPCWSTR pathName); +#endif + +bool DeleteFileAlways(LPCTSTR name); +#ifndef _UNICODE +bool DeleteFileAlways(LPCWSTR name); +#endif +bool RemoveDirectoryWithSubItems(const UString &path); + +#ifndef _WIN32_WCE +bool MyGetFullPathName(LPCTSTR fileName, CSysString &resultPath, + int &fileNamePartStartIndex); +bool MyGetFullPathName(LPCTSTR fileName, CSysString &resultPath); +bool GetOnlyName(LPCTSTR fileName, CSysString &resultName); +bool GetOnlyDirPrefix(LPCTSTR fileName, CSysString &resultName); +#ifndef _UNICODE +bool MyGetFullPathName(LPCWSTR fileName, UString &resultPath, + int &fileNamePartStartIndex); +bool MyGetFullPathName(LPCWSTR fileName, UString &resultPath); +#endif + +#endif + +bool MySetCurrentDirectory(LPCWSTR path); +bool MyGetCurrentDirectory(CSysString &resultPath); + +bool MySearchPath(LPCWSTR path, LPCWSTR fileName, LPCWSTR extension, UString &resultPath); + +bool MyGetTempPath(CSysString &resultPath); +#ifndef _UNICODE +bool MyGetTempPath(UString &resultPath); +#endif + +class CTempFile +{ + bool _mustBeDeleted; + CSysString _fileName; +public: + CTempFile(): _mustBeDeleted(false) {} + ~CTempFile() { Remove(); } + void DisableDeleting() { _mustBeDeleted = false; } + UINT Create(LPCTSTR dirPath, LPCTSTR prefix, CSysString &resultPath); + bool Create(LPCTSTR prefix, CSysString &resultPath); + bool Remove(); +}; + +#ifdef _UNICODE +typedef CTempFile CTempFileW; +#endif + +bool CreateTempDirectory(LPCWSTR prefixChars, UString &dirName); + +class CTempDirectory +{ + bool _mustBeDeleted; + CSysString _tempDir; +public: + const CSysString &GetPath() const { return _tempDir; } + CTempDirectory(): _mustBeDeleted(false) {} + ~CTempDirectory() { Remove(); } + bool Create(LPCTSTR prefix) ; + bool Remove() + { + if (!_mustBeDeleted) + return true; + _mustBeDeleted = !RemoveDirectoryWithSubItems(_tempDir); + return (!_mustBeDeleted); + } + void DisableDeleting() { _mustBeDeleted = false; } +}; + +#ifdef _UNICODE +typedef CTempDirectory CTempDirectoryW; +#endif + + +}}} + +#endif diff --git a/CPP/Windows/FileFind.cpp b/CPP/Windows/FileFind.cpp new file mode 100644 index 0000000..9e526a2 --- /dev/null +++ b/CPP/Windows/FileFind.cpp @@ -0,0 +1,604 @@ +// Windows/FileFind.cpp + +#include "StdAfx.h" + +#include "FileFind.h" +#include "../Common/StringConvert.h" + +#include +#include +#include + +#ifdef ENV_HAVE_LSTAT +extern "C" +{ + +int global_use_lstat=1; // default behaviour : p7zip stores symlinks instead of dumping the files they point to +} +#endif + +#define NEED_NAME_WINDOWS_TO_UNIX +#include "myPrivate.h" + +// #define TRACEN(u) u; +#define TRACEN(u) /* */ + +void my_windows_split_path(const AString &p_path, AString &dir , AString &base) { + int pos = p_path.ReverseFind('/'); + if (pos == -1) { + // no separator + dir = "."; + if (p_path.IsEmpty()) + base = "."; + else + base = p_path; + } else if ((pos+1) < p_path.Length()) { + // true separator + base = p_path.Mid(pos+1); + while ((pos >= 1) && (p_path[pos-1] == '/')) + pos--; + if (pos == 0) + dir = "/"; + else + dir = p_path.Left(pos); + } else { + // separator at the end of the path + // pos = p_path.find_last_not_of("/"); + pos = -1; + int ind = 0; + while (p_path[ind]) { + if (p_path[ind] != '/') + pos = ind; + ind++; + } + if (pos == -1) { + base = "/"; + dir = "/"; + } else { + my_windows_split_path(p_path.Left(pos+1),dir,base); + } + } +} + +static void my_windows_split_path(const UString &p_path, UString &dir , UString &base) { + int pos = p_path.ReverseFind(L'/'); + if (pos == -1) { + // no separator + dir = L"."; + if (p_path.IsEmpty()) + base = L"."; + else + base = p_path; + } else if ((pos+1) < p_path.Length()) { + // true separator + base = p_path.Mid(pos+1); + while ((pos >= 1) && (p_path[pos-1] == L'/')) + pos--; + if (pos == 0) + dir = L"/"; + else + dir = p_path.Left(pos); + } else { + // separator at the end of the path + // pos = p_path.find_last_not_of("/"); + pos = -1; + int ind = 0; + while (p_path[ind]) { + if (p_path[ind] != L'/') + pos = ind; + ind++; + } + if (pos == -1) { + base = L"/"; + dir = L"/"; + } else { + my_windows_split_path(p_path.Left(pos+1),dir,base); + } + } +} + +static int filter_pattern(const char *string , const char *pattern , int flags_nocase) { + if ((string == 0) || (*string==0)) { + if (pattern == 0) + return 1; + while (*pattern=='*') + ++pattern; + return (!*pattern); + } + + switch (*pattern) { + case '*': + if (!filter_pattern(string+1,pattern,flags_nocase)) + return filter_pattern(string,pattern+1,flags_nocase); + return 1; + case 0: + if (*string==0) + return 1; + break; + case '?': + return filter_pattern(string+1,pattern+1,flags_nocase); + default: + if ( ((flags_nocase) && (tolower(*pattern)==tolower(*string))) + || (*pattern == *string) + ) { + return filter_pattern(string+1,pattern+1,flags_nocase); + } + break; + } + return 0; +} + + +namespace NWindows { +namespace NFile { +namespace NFind { + +static const TCHAR kDot = TEXT('.'); + +bool CFileInfo::IsDots() const +{ + if (!IsDir() || Name.IsEmpty()) + return false; + if (Name[0] != kDot) + return false; + return Name.Length() == 1 || (Name[1] == kDot && Name.Length() == 2); +} + +bool CFileInfoW::IsDots() const +{ + if (!IsDir() || Name.IsEmpty()) + return false; + if (Name[0] != kDot) + return false; + return Name.Length() == 1 || (Name[1] == kDot && Name.Length() == 2); +} + +static bool originalFilename(const UString & src, AString & res) +{ + // Try to recover the original filename + res = ""; + int i=0; + while (src[i]) + { + if (src[i] >= 256) { + return false; + } else { + res += char(src[i]); + } + i++; + } + return true; +} + + + +// Warning this function cannot update "fileInfo.Name" +static int fillin_CFileInfo(CFileInfo &fileInfo,const char *filename) { + struct stat stat_info; + + int ret; +#ifdef ENV_HAVE_LSTAT + if (global_use_lstat) { + ret = lstat(filename,&stat_info); + } else +#endif + { + ret = stat(filename,&stat_info); + } + + if (ret != 0) return ret; + + /* FIXME : FILE_ATTRIBUTE_HIDDEN ? */ + if (S_ISDIR(stat_info.st_mode)) { + fileInfo.Attrib = FILE_ATTRIBUTE_DIRECTORY; + } else { + fileInfo.Attrib = FILE_ATTRIBUTE_ARCHIVE; + } + + if (!(stat_info.st_mode & S_IWUSR)) + fileInfo.Attrib |= FILE_ATTRIBUTE_READONLY; + + fileInfo.Attrib |= FILE_ATTRIBUTE_UNIX_EXTENSION + ((stat_info.st_mode & 0xFFFF) << 16); + + RtlSecondsSince1970ToFileTime( stat_info.st_ctime, &fileInfo.CTime ); + RtlSecondsSince1970ToFileTime( stat_info.st_mtime, &fileInfo.MTime ); + RtlSecondsSince1970ToFileTime( stat_info.st_atime, &fileInfo.ATime ); + + fileInfo.IsDevice = false; + + if (S_ISDIR(stat_info.st_mode)) { + fileInfo.Size = 0; + } else { // file or symbolic link + fileInfo.Size = stat_info.st_size; // for a symbolic link, size = size of filename + } + return 0; +} + +static int fillin_CFileInfo(CFileInfo &fileInfo,const char *dir,const char *name) { + char filename[MAX_PATHNAME_LEN]; + size_t dir_len = strlen(dir); + size_t name_len = strlen(name); + size_t total = dir_len + 1 + name_len + 1; // 1 = strlen("/"); + le zero character + if (total >= MAX_PATHNAME_LEN) throw "fillin_CFileInfo - internal error - MAX_PATHNAME_LEN"; + memcpy(filename,dir,dir_len); + if (dir_len >= 1) + { + if (filename[dir_len-1] == CHAR_PATH_SEPARATOR) + { // delete the '/' + dir_len--; + } + } + filename[dir_len] = CHAR_PATH_SEPARATOR; + memcpy(filename+(dir_len+1),name,name_len+1); // copy also final '\0' + + fileInfo.Name = name; + + int ret = fillin_CFileInfo(fileInfo,filename); + if (ret != 0) { + AString err_msg = "stat error for "; + err_msg += filename; + err_msg += " ("; + err_msg += strerror(errno); + err_msg += ")"; + throw err_msg; + } + return ret; +} + +//////////////////////////////// +// CFindFile + +bool CFindFile::Close() +{ + + if(_dirp == 0) + return true; + int ret = closedir(_dirp); + if (ret == 0) + { + _dirp = 0; + return true; + } + return false; +} + +// bool CFindFile::FindFirst(LPCTSTR wildcard, CFileInfo &fileInfo) +bool CFindFile::FindFirst(LPCSTR wildcard, CFileInfo &fileInfo) +{ + if (!Close()) + return false; + + if ((!wildcard) || (wildcard[0]==0)) { + SetLastError(ERROR_PATH_NOT_FOUND); + return false; + } + + my_windows_split_path(nameWindowToUnix(wildcard),_directory,_pattern); + + TRACEN((printf("CFindFile::FindFirst : %s (dirname=%s,pattern=%s)\n",wildcard,(const char *)_directory,(const char *)_pattern))) + + _dirp = ::opendir((const char *)_directory); + TRACEN((printf("CFindFile::FindFirst : opendir=%p\n",_dirp))) + + if ((_dirp == 0) && (global_use_utf16_conversion)) { + // Try to recover the original filename + UString ustr = MultiByteToUnicodeString(_directory, 0); + AString resultString; + bool is_good = originalFilename(ustr, resultString); + if (is_good) { + _dirp = ::opendir((const char *)resultString); + _directory = resultString; + } + } + + if (_dirp == 0) return false; + + struct dirent *dp; + while ((dp = readdir(_dirp)) != NULL) { + if (filter_pattern(dp->d_name,(const char *)_pattern,0) == 1) { + int retf = fillin_CFileInfo(fileInfo,(const char *)_directory,dp->d_name); + if (retf) + { + TRACEN((printf("CFindFile::FindFirst : closedir-1(dirp=%p)\n",_dirp))) + closedir(_dirp); + _dirp = 0; + SetLastError( ERROR_NO_MORE_FILES ); + return false; + } + TRACEN((printf("CFindFile::FindFirst -%s- true\n",dp->d_name))) + return true; + } + } + + TRACEN((printf("CFindFile::FindFirst : closedir-2(dirp=%p)\n",_dirp))) + closedir(_dirp); + _dirp = 0; + SetLastError( ERROR_NO_MORE_FILES ); + return false; +} + +bool CFindFile::FindFirst(LPCWSTR wildcard, CFileInfoW &fileInfo) +{ + if (!Close()) + return false; + CFileInfo fileInfo0; + AString Awildcard = UnicodeStringToMultiByte(wildcard, CP_ACP); + bool bret = FindFirst((LPCSTR)Awildcard, fileInfo0); + if (bret) + { + fileInfo.Attrib = fileInfo0.Attrib; + fileInfo.CTime = fileInfo0.CTime; + fileInfo.ATime = fileInfo0.ATime; + fileInfo.MTime = fileInfo0.MTime; + fileInfo.Size = fileInfo0.Size; + fileInfo.IsDevice = fileInfo0.IsDevice; + fileInfo.Name = GetUnicodeString(fileInfo0.Name, CP_ACP); + } + return bret; +} + +bool CFindFile::FindNext(CFileInfo &fileInfo) +{ + if (_dirp == 0) + { + SetLastError( ERROR_INVALID_HANDLE ); + return false; + } + + struct dirent *dp; + while ((dp = readdir(_dirp)) != NULL) { + if (filter_pattern(dp->d_name,(const char *)_pattern,0) == 1) { + int retf = fillin_CFileInfo(fileInfo,(const char *)_directory,dp->d_name); + if (retf) + { + TRACEN((printf("FindNextFileA -%s- ret_handle=FALSE (errno=%d)\n",dp->d_name,errno))) + return false; + + } + TRACEN((printf("FindNextFileA -%s- true\n",dp->d_name))) + return true; + } + } + TRACEN((printf("FindNextFileA ret_handle=FALSE (ERROR_NO_MORE_FILES)\n"))) + SetLastError( ERROR_NO_MORE_FILES ); + return false; +} + +bool CFindFile::FindNext(CFileInfoW &fileInfo) +{ + CFileInfo fileInfo0; + bool bret = FindNext(fileInfo0); + if (bret) + { + fileInfo.Attrib = fileInfo0.Attrib; + fileInfo.CTime = fileInfo0.CTime; + fileInfo.ATime = fileInfo0.ATime; + fileInfo.MTime = fileInfo0.MTime; + fileInfo.Size = fileInfo0.Size; + fileInfo.IsDevice = fileInfo0.IsDevice; + fileInfo.Name = GetUnicodeString(fileInfo0.Name, CP_ACP); + } + return bret; +} + +bool CFileInfo::Find(LPCSTR wildcard) +{ + #ifdef SUPPORT_DEVICE_FILE + if (IsDeviceName(wildcard)) + { + Clear(); + IsDevice = true; + NIO::CInFile inFile; + if (!inFile.Open(wildcard)) + return false; + Name = wildcard + 4; + if (inFile.LengthDefined) + Size = inFile.Length; + return true; + } + #endif + CFindFile finder; + return finder.FindFirst(wildcard, *this); +} + + +// #ifndef _UNICODE +bool CFileInfoW::Find(LPCWSTR wildcard) +{ + #ifdef SUPPORT_DEVICE_FILE + if (IsDeviceName(wildcard)) + { + Clear(); + IsDevice = true; + NIO::CInFile inFile; + if (!inFile.Open(wildcard)) + return false; + Name = wildcard + 4; + if (inFile.LengthDefined) + Size = inFile.Length; + return true; + } + #endif + CFindFile finder; + return finder.FindFirst(wildcard, *this); +} +// #endif + +bool FindFile(LPCSTR wildcard, CFileInfo &fileInfo) +{ + // CFindFile finder; + // return finder.FindFirst(wildcard, fileInfo); + AString dir,base; + my_windows_split_path(wildcard, dir , base); + int ret = fillin_CFileInfo(fileInfo,nameWindowToUnix(wildcard)); + fileInfo.Name = base; + TRACEN((printf("FindFile(%s,CFileInfo) ret=%d\n",wildcard,ret))) + return (ret == 0); +} + +bool FindFile(LPCWSTR wildcard, CFileInfoW &fileInfo) +{ + // CFindFile finder; + // return finder.FindFirst(wildcard, fileInfo); + AString name = UnicodeStringToMultiByte(wildcard, CP_ACP); + CFileInfo fileInfo0; + int ret = fillin_CFileInfo(fileInfo0,nameWindowToUnix((const char *)name)); + TRACEN((printf("FindFile-1(%s,CFileInfo) ret=%d\n",(const char *)name,ret))) + if (ret != 0) + { + // Try to recover the original filename + AString resultString; + bool is_good = originalFilename(wildcard, resultString); + if (is_good) { + ret = fillin_CFileInfo(fileInfo0,nameWindowToUnix((const char *)resultString)); + TRACEN((printf("FindFile-2(%s,CFileInfo) ret=%d\n",(const char *)resultString,ret))) + } + } + if (ret == 0) + { + UString dir,base; + my_windows_split_path(wildcard, dir , base); + fileInfo.Attrib = fileInfo0.Attrib; + fileInfo.CTime = fileInfo0.CTime; + fileInfo.ATime = fileInfo0.ATime; + fileInfo.MTime = fileInfo0.MTime; + fileInfo.Size = fileInfo0.Size; + fileInfo.Name = base; + } + return (ret == 0); +} + +bool DoesFileExist(LPCSTR name) // FIXME +{ + CFileInfo fi; + int ret = fillin_CFileInfo(fi,nameWindowToUnix(name)); + TRACEN((printf("DoesFileExist(%s) ret=%d\n",name,ret))) + return (ret == 0) && !fi.IsDir();; +} + +bool DoesDirExist(LPCSTR name) // FIXME +{ + CFileInfo fi; + int ret = fillin_CFileInfo(fi,nameWindowToUnix(name)); + TRACEN((printf("DoesDirExist(%s) ret=%d\n",name,ret))) + return (ret == 0) && fi.IsDir();; +} + +bool DoesFileOrDirExist(LPCSTR name) +{ + CFileInfo fileInfo; + int ret = fillin_CFileInfo(fileInfo,nameWindowToUnix(name)); + TRACEN((printf("DoesFileOrDirExist(%s) ret=%d\n",name,ret))) + return (ret == 0); +} + +bool DoesFileExist(LPCWSTR name) +{ + AString Aname = UnicodeStringToMultiByte(name, CP_ACP); + bool bret = DoesFileExist((LPCSTR)Aname); + if (bret) return bret; + + // Try to recover the original filename + AString resultString; + bool is_good = originalFilename(name, resultString); + if (is_good) { + bret = DoesFileExist((const char *)resultString); + } + return bret; +} + +bool DoesDirExist(LPCWSTR name) +{ + AString Aname = UnicodeStringToMultiByte(name, CP_ACP); + bool bret = DoesDirExist((LPCSTR)Aname); + if (bret) return bret; + + // Try to recover the original filename + AString resultString; + bool is_good = originalFilename(name, resultString); + if (is_good) { + bret = DoesDirExist((const char *)resultString); + } + return bret; +} + +bool DoesFileOrDirExist(LPCWSTR name) +{ + AString Aname = UnicodeStringToMultiByte(name, CP_ACP); + bool bret = DoesFileOrDirExist((LPCSTR)Aname); + if (bret) return bret; + + // Try to recover the original filename + AString resultString; + bool is_good = originalFilename(name, resultString); + if (is_good) { + bret = DoesFileOrDirExist((const char *)resultString); + } + return bret; +} + +///////////////////////////////////// +// CEnumerator + +bool CEnumerator::NextAny(CFileInfo &fileInfo) +{ + if(_findFile.IsHandleAllocated()) + return _findFile.FindNext(fileInfo); + else + return _findFile.FindFirst(_wildcard, fileInfo); +} + +bool CEnumerator::Next(CFileInfo &fileInfo) +{ + while(true) + { + if(!NextAny(fileInfo)) + return false; + if(!fileInfo.IsDots()) + return true; + } +} + +bool CEnumerator::Next(CFileInfo &fileInfo, bool &found) +{ + if (Next(fileInfo)) + { + found = true; + return true; + } + found = false; + return (::GetLastError() == ERROR_NO_MORE_FILES); +} + +bool CEnumeratorW::NextAny(CFileInfoW &fileInfo) +{ + if(_findFile.IsHandleAllocated()) + return _findFile.FindNext(fileInfo); + else + return _findFile.FindFirst(_wildcard, fileInfo); +} + +bool CEnumeratorW::Next(CFileInfoW &fileInfo) +{ + while(true) + { + if(!NextAny(fileInfo)) + return false; + if(!fileInfo.IsDots()) + return true; + } +} + +bool CEnumeratorW::Next(CFileInfoW &fileInfo, bool &found) +{ + if (Next(fileInfo)) + { + found = true; + return true; + } + found = false; + return (::GetLastError() == ERROR_NO_MORE_FILES); +} + + +}}} diff --git a/CPP/Windows/FileFind.h b/CPP/Windows/FileFind.h new file mode 100644 index 0000000..a1fd0f0 --- /dev/null +++ b/CPP/Windows/FileFind.h @@ -0,0 +1,126 @@ +// Windows/FileFind.h + +#ifndef __WINDOWS_FILEFIND_H +#define __WINDOWS_FILEFIND_H + +#include "../Common/MyString.h" +#include "FileName.h" +#include "Defs.h" + +#include /* for DIR */ +#include + +namespace NWindows { +namespace NFile { +namespace NFind { + +namespace NAttributes +{ + inline bool IsReadOnly(DWORD attrib) { return (attrib & FILE_ATTRIBUTE_READONLY) != 0; } + inline bool IsHidden(DWORD attrib) { return (attrib & FILE_ATTRIBUTE_HIDDEN) != 0; } + inline bool IsSystem(DWORD attrib) { return (attrib & FILE_ATTRIBUTE_SYSTEM) != 0; } + inline bool IsDir(DWORD attrib) { return (attrib & FILE_ATTRIBUTE_DIRECTORY) != 0; } + inline bool IsArchived(DWORD attrib) { return (attrib & FILE_ATTRIBUTE_ARCHIVE) != 0; } + inline bool IsCompressed(DWORD attrib) { return (attrib & FILE_ATTRIBUTE_COMPRESSED) != 0; } + inline bool IsEncrypted(DWORD attrib) { return (attrib & FILE_ATTRIBUTE_ENCRYPTED) != 0; } +} + +class CFileInfoBase +{ + bool MatchesMask(UINT32 mask) const { return ((Attrib & mask) != 0); } +public: + UInt64 Size; + FILETIME CTime; + FILETIME ATime; + FILETIME MTime; + DWORD Attrib; + bool IsDevice; + + bool IsDir() const { return MatchesMask(FILE_ATTRIBUTE_DIRECTORY); } +}; + +class CFileInfo: public CFileInfoBase +{ +public: + AString Name; // FIXME CSysString Name; + bool IsDots() const; + bool Find(LPCSTR wildcard); +}; + +// FIXME #ifdef _UNICODE +// typedef CFileInfo CFileInfoW; +// #else +class CFileInfoW: public CFileInfoBase +{ +public: + UString Name; + bool IsDots() const; + bool Find(LPCWSTR wildcard); +}; +// #endif + +class CFindFile +{ + friend class CEnumerator; + DIR *_dirp; + AString _pattern; + AString _directory; +public: + bool IsHandleAllocated() const { return (_dirp != 0); } + CFindFile(): _dirp(0) {} + ~CFindFile() { Close(); } + // bool FindFirst(LPCTSTR wildcard, CFileInfo &fileInfo); + bool FindFirst(LPCSTR wildcard, CFileInfo &fileInfo); + bool FindNext(CFileInfo &fileInfo); + // FIXME #ifndef _UNICODE + bool FindFirst(LPCWSTR wildcard, CFileInfoW &fileInfo); + bool FindNext(CFileInfoW &fileInfo); + // FIXME #endif + bool Close(); +}; + +bool FindFile(LPCSTR wildcard, CFileInfo &fileInfo); + +bool DoesFileExist(LPCSTR name); +bool DoesDirExist(LPCTSTR name); +bool DoesFileOrDirExist(LPCSTR name); +// #ifndef _UNICODE +bool FindFile(LPCWSTR wildcard, CFileInfoW &fileInfo); +bool DoesFileExist(LPCWSTR name); +bool DoesDirExist(LPCWSTR name); +bool DoesFileOrDirExist(LPCWSTR name); +// #endif + +class CEnumerator +{ + CFindFile _findFile; + AString _wildcard; // FIXME CSysString _wildcard; + bool NextAny(CFileInfo &fileInfo); +public: + CEnumerator(): _wildcard(NName::kAnyStringWildcard) {} + // FIXME CEnumerator(const CSysString &wildcard): _wildcard(wildcard) {} + CEnumerator(const AString &wildcard): _wildcard(wildcard) {} + bool Next(CFileInfo &fileInfo); + bool Next(CFileInfo &fileInfo, bool &found); +}; + +// FIXME #ifdef _UNICODE +// typedef CEnumerator CEnumeratorW; +// #else +class CEnumeratorW +{ + CFindFile _findFile; + UString _wildcard; + bool NextAny(CFileInfoW &fileInfo); +public: + CEnumeratorW(): _wildcard(NName::kAnyStringWildcard) {} + CEnumeratorW(const UString &wildcard): _wildcard(wildcard) {} + bool Next(CFileInfoW &fileInfo); + bool Next(CFileInfoW &fileInfo, bool &found); +}; +// FIXME #endif + +}}} + +#endif + diff --git a/CPP/Windows/FileIO.cpp b/CPP/Windows/FileIO.cpp new file mode 100644 index 0000000..a731813 --- /dev/null +++ b/CPP/Windows/FileIO.cpp @@ -0,0 +1,475 @@ +// Windows/FileIO.cpp + +#include "StdAfx.h" + +#include "FileIO.h" +#include "Defs.h" +#include "../Common/StringConvert.h" + +#include +#include +#include +#include +#include + +#define NEED_NAME_WINDOWS_TO_UNIX +#include "myPrivate.h" + +#include +#include + +#ifdef ENV_HAVE_LSTAT +#define FD_LINK (-2) +#endif + +#define GENERIC_READ 0x80000000 +#define GENERIC_WRITE 0x40000000 + +extern BOOLEAN WINAPI RtlTimeToSecondsSince1970( const LARGE_INTEGER *Time, DWORD *Seconds ); + +namespace NWindows { +namespace NFile { +namespace NIO { + +CFileBase::~CFileBase() +{ + Close(); +} + +bool CFileBase::Create(LPCSTR filename, DWORD dwDesiredAccess, + DWORD dwShareMode, DWORD dwCreationDisposition, DWORD dwFlagsAndAttributes,bool ignoreSymbolicLink) +{ + Close(); + + int flags = 0; + const char * name = nameWindowToUnix(filename); + +#ifdef O_BINARY + flags |= O_BINARY; +#endif + +#ifdef O_LARGEFILE + flags |= O_LARGEFILE; +#endif + + /* now use the umask value */ + int mask = umask(0); + (void)umask(mask); + int mode = 0666 & ~(mask & 066); /* keep the R/W for the user */ + + if (dwDesiredAccess & GENERIC_WRITE) flags |= O_WRONLY; + if (dwDesiredAccess & GENERIC_READ) flags |= O_RDONLY; + + + switch (dwCreationDisposition) + { + case CREATE_NEW : flags |= O_CREAT | O_EXCL; break; + case CREATE_ALWAYS : flags |= O_CREAT; break; + case OPEN_EXISTING : break; + case OPEN_ALWAYS : flags |= O_CREAT; break; + // case TRUNCATE_EXISTING : flags |= O_TRUNC; break; + } + // printf("##DBG open(%s,0x%x,%o)##\n",name,flags,(unsigned)mode); + + _fd = -1; +#ifdef ENV_HAVE_LSTAT + if ((global_use_lstat) && (ignoreSymbolicLink == false)) + { + _size = readlink(name, _buffer, sizeof(_buffer)-1); + if (_size > 0) { + if (dwDesiredAccess & GENERIC_READ) { + _fd = FD_LINK; + _offset = 0; + _buffer[_size]=0; + } else if (dwDesiredAccess & GENERIC_WRITE) { + // does not overwrite the file pointed by symbolic link + if (!unlink(name)) return false; + } + } + } +#endif + + if (_fd == -1) { + _fd = open(name,flags, mode); + } + + if ((_fd == -1) && (global_use_utf16_conversion)) { + // bug #1204993 - Try to recover the original filename + UString ustr = MultiByteToUnicodeString(AString(name), 0); + AString resultString; + int is_good = 1; + for (int i = 0; i < ustr.Length(); i++) + { + if (ustr[i] >= 256) { + is_good = 0; + break; + } else { + resultString += char(ustr[i]); + } + } + if (is_good) { + _fd = open((const char *)resultString,flags, mode); + } + } + + if (_fd == -1) { + /* !ENV_HAVE_LSTAT : an invalid symbolic link => errno == ENOENT */ + return false; + } else { + _unix_filename = name; + } + + return true; +} + +bool CFileBase::Create(LPCWSTR fileName, DWORD desiredAccess, + DWORD shareMode, DWORD creationDisposition, DWORD flagsAndAttributes,bool ignoreSymbolicLink) +{ + Close(); + return Create(UnicodeStringToMultiByte(fileName, CP_ACP), + desiredAccess, shareMode, creationDisposition, flagsAndAttributes,ignoreSymbolicLink); +} + +bool CFileBase::Close() +{ + struct utimbuf buf; + + buf.actime = _lastAccessTime; + buf.modtime = _lastWriteTime; + + _lastAccessTime = _lastWriteTime = (time_t)-1; + + if(_fd == -1) + return true; + +#ifdef ENV_HAVE_LSTAT + if(_fd == FD_LINK) { + _fd = -1; + return true; + } +#endif + + int ret = ::close(_fd); + if (ret == 0) { + _fd = -1; + + /* On some OS (mingwin, MacOSX ...), you must close the file before updating times */ + if ((buf.actime != (time_t)-1) || (buf.modtime != (time_t)-1)) { + struct stat oldbuf; + int ret = stat((const char*)(_unix_filename),&oldbuf); + if (ret == 0) { + if (buf.actime == (time_t)-1) buf.actime = oldbuf.st_atime; + if (buf.modtime == (time_t)-1) buf.modtime = oldbuf.st_mtime; + } else { + time_t current_time = time(0); + if (buf.actime == (time_t)-1) buf.actime = current_time; + if (buf.modtime == (time_t)-1) buf.modtime = current_time; + } + /* ret = */ utime((const char *)(_unix_filename), &buf); + } + return true; + } + return false; +} + +bool CFileBase::GetLength(UINT64 &length) const +{ + if (_fd == -1) + { + SetLastError( ERROR_INVALID_HANDLE ); + return false; + } + +#ifdef ENV_HAVE_LSTAT + if (_fd == FD_LINK) { + length = _size; + return true; + } +#endif + + off_t pos_cur = ::lseek(_fd, 0, SEEK_CUR); + if (pos_cur == (off_t)-1) + return false; + + off_t pos_end = ::lseek(_fd, 0, SEEK_END); + if (pos_end == (off_t)-1) + return false; + + off_t pos_cur2 = ::lseek(_fd, pos_cur, SEEK_SET); + if (pos_cur2 == (off_t)-1) + return false; + + length = (UINT64)pos_end; + + return true; +} + +bool CFileBase::Seek(INT64 distanceToMove, DWORD moveMethod, UINT64 &newPosition) +{ + if (_fd == -1) + { + SetLastError( ERROR_INVALID_HANDLE ); + return false; + } + +#ifdef ENV_HAVE_LSTAT + if (_fd == FD_LINK) { + INT64 offset; + switch (moveMethod) { + case STREAM_SEEK_SET : offset = distanceToMove; break; + case STREAM_SEEK_CUR : offset = _offset + distanceToMove; break; + case STREAM_SEEK_END : offset = _size + distanceToMove; break; + default : offset = -1; + } + if (offset < 0) { + SetLastError( EINVAL ); + return false; + } + if (offset > _size) offset = _size; + newPosition = _offset = offset; + return true; + } +#endif + + bool ret = true; + + off_t pos = (off_t)distanceToMove; + + off_t newpos = ::lseek(_fd,pos,moveMethod); + + if (newpos == ((off_t)-1)) { + ret = false; + } else { + newPosition = (UINT64)newpos; + } + + return ret; +} + +bool CFileBase::Seek(UINT64 position, UINT64 &newPosition) +{ + return Seek(position, FILE_BEGIN, newPosition); +} + +///////////////////////// +// CInFile + +bool CInFile::Open(LPCTSTR fileName, DWORD shareMode, + DWORD creationDisposition, DWORD flagsAndAttributes) +{ + return Create(fileName, GENERIC_READ, shareMode, + creationDisposition, flagsAndAttributes); +} + +bool CInFile::Open(LPCTSTR fileName,bool ignoreSymbolicLink) +{ + return Create(fileName, GENERIC_READ , FILE_SHARE_READ, OPEN_EXISTING, + FILE_ATTRIBUTE_NORMAL,ignoreSymbolicLink); +} + +#ifndef _UNICODE +bool CInFile::Open(LPCWSTR fileName, DWORD shareMode, + DWORD creationDisposition, DWORD flagsAndAttributes) +{ + return Create(fileName, GENERIC_READ, shareMode, + creationDisposition, flagsAndAttributes); +} + +bool CInFile::Open(LPCWSTR fileName,bool ignoreSymbolicLink) +{ + return Create(fileName, GENERIC_READ , FILE_SHARE_READ, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL,ignoreSymbolicLink); +} +#endif + +// ReadFile and WriteFile functions in Windows have BUG: +// If you Read or Write 64MB or more (probably min_failure_size = 64MB - 32KB + 1) +// from/to Network file, it returns ERROR_NO_SYSTEM_RESOURCES +// (Insufficient system resources exist to complete the requested service). + +// static UINT32 kChunkSizeMax = (1 << 24); + +bool CInFile::ReadPart(void *data, UINT32 size, UINT32 &processedSize) +{ + // if (size > kChunkSizeMax) + // size = kChunkSizeMax; + return Read(data,size,processedSize); +} + +bool CInFile::Read(void *buffer, UINT32 bytesToRead, UINT32 &bytesRead) +{ + if (_fd == -1) + { + SetLastError( ERROR_INVALID_HANDLE ); + return false; + } + + if (bytesToRead == 0) { + bytesRead =0; + return TRUE; + } + +#ifdef ENV_HAVE_LSTAT + if (_fd == FD_LINK) { + if (_offset >= _size) { + bytesRead = 0; + return TRUE; + } + int len = (_size - _offset); + if (len > bytesToRead) len = bytesToRead; + memcpy(buffer,_buffer+_offset,len); + bytesRead = len; + _offset += len; + return TRUE; + } +#endif + + ssize_t ret; + do { + ret = read(_fd,buffer,bytesToRead); + } while (ret < 0 && (errno == EINTR)); + + if (ret != -1) { + bytesRead = ret; + return TRUE; + } + bytesRead =0; + return FALSE; +} + +///////////////////////// +// COutFile + +bool COutFile::Open(LPCTSTR fileName, DWORD shareMode, + DWORD creationDisposition, DWORD flagsAndAttributes) +{ + return CFileBase::Create(fileName, GENERIC_WRITE, shareMode, + creationDisposition, flagsAndAttributes); +} + +static inline DWORD GetCreationDisposition(bool createAlways) + { return createAlways? CREATE_ALWAYS: CREATE_NEW; } + +bool COutFile::Open(LPCTSTR fileName, DWORD creationDisposition) +{ + return Open(fileName, FILE_SHARE_READ, + creationDisposition, FILE_ATTRIBUTE_NORMAL); +} + +bool COutFile::Create(LPCTSTR fileName, bool createAlways) +{ + return Open(fileName, GetCreationDisposition(createAlways)); +} + +#ifndef _UNICODE + +bool COutFile::Open(LPCWSTR fileName, DWORD shareMode, + DWORD creationDisposition, DWORD flagsAndAttributes) +{ + return CFileBase::Create(fileName, GENERIC_WRITE, shareMode, + creationDisposition, flagsAndAttributes); +} + +bool COutFile::Open(LPCWSTR fileName, DWORD creationDisposition) +{ + return Open(fileName, FILE_SHARE_READ, + creationDisposition, FILE_ATTRIBUTE_NORMAL); +} + +bool COutFile::Create(LPCWSTR fileName, bool createAlways) +{ + return Open(fileName, GetCreationDisposition(createAlways)); +} + +#endif + +bool COutFile::SetTime(const FILETIME *cTime, const FILETIME *aTime, const FILETIME *mTime) +{ + LARGE_INTEGER ltime; + DWORD dw; + + if (_fd == -1) { + SetLastError( ERROR_INVALID_HANDLE ); + return false; + } + + /* On some OS (cygwin, MacOSX ...), you must close the file before updating times */ + if (aTime) { + ltime.QuadPart = aTime->dwHighDateTime; + ltime.QuadPart = (ltime.QuadPart << 32) | aTime->dwLowDateTime; + RtlTimeToSecondsSince1970( <ime, &dw ); + _lastAccessTime = dw; + } + if (mTime) { + ltime.QuadPart = mTime->dwHighDateTime; + ltime.QuadPart = (ltime.QuadPart << 32) | mTime->dwLowDateTime; + RtlTimeToSecondsSince1970( <ime, &dw ); + _lastWriteTime = dw; + } + + return true; +} + +bool COutFile::SetMTime(const FILETIME *mTime) +{ + return SetTime(NULL, NULL, mTime); +} + +bool COutFile::WritePart(const void *data, UINT32 size, UINT32 &processedSize) +{ +// if (size > kChunkSizeMax) +// size = kChunkSizeMax; + + return Write(data,size,processedSize); +} + +bool COutFile::Write(const void *buffer, UINT32 bytesToWrite, UINT32 &bytesWritten) +{ + if (_fd == -1) + { + SetLastError( ERROR_INVALID_HANDLE ); + return false; + } + + ssize_t ret; + do { + ret = write(_fd,buffer, bytesToWrite); + } while (ret < 0 && (errno == EINTR)); + + if (ret != -1) { + bytesWritten = ret; + return TRUE; + } + bytesWritten =0; + return FALSE; +} + +bool COutFile::SetEndOfFile() +{ + if (_fd == -1) + { + SetLastError( ERROR_INVALID_HANDLE ); + return false; + } + + bool bret = false; + + off_t pos_cur = lseek(_fd, 0, SEEK_CUR); + if (pos_cur != (off_t)-1) { + int iret = ftruncate(_fd, pos_cur); + if (iret == 0) bret = true; + } + + return bret; +} + +bool COutFile::SetLength(UINT64 length) +{ + UINT64 newPosition; + if(!Seek(length, newPosition)) + return false; + if(newPosition != length) + return false; + return SetEndOfFile(); +} + +}}} diff --git a/CPP/Windows/FileIO.h b/CPP/Windows/FileIO.h new file mode 100644 index 0000000..4aa84c0 --- /dev/null +++ b/CPP/Windows/FileIO.h @@ -0,0 +1,110 @@ +// Windows/FileIO.h + +#ifndef __WINDOWS_FILEIO_H +#define __WINDOWS_FILEIO_H + +#include + +#ifndef _WIN32 + +#define FILE_SHARE_READ 1 +#define FILE_SHARE_WRITE 2 + +#define FILE_BEGIN SEEK_SET +#define FILE_CURRENT SEEK_CUR +#define FILE_END SEEK_END +#define INVALID_SET_FILE_POINTER ((DWORD)-1) + +#define CREATE_NEW 1 +#define CREATE_ALWAYS 2 +#define OPEN_EXISTING 3 +#define OPEN_ALWAYS 4 +/* #define TRUNCATE_EXISTING 5 */ + +#endif + +namespace NWindows { +namespace NFile { +namespace NIO { + + +class CFileBase +{ +protected: + int _fd; + AString _unix_filename; + time_t _lastAccessTime; + time_t _lastWriteTime; +#ifdef ENV_HAVE_LSTAT + int _size; + char _buffer[MAX_PATHNAME_LEN+1]; + int _offset; +#endif + + bool Create(LPCSTR fileName, DWORD desiredAccess, + DWORD shareMode, DWORD creationDisposition, DWORD flagsAndAttributes,bool ignoreSymbolicLink=false); + bool Create(LPCWSTR fileName, DWORD desiredAccess, + DWORD shareMode, DWORD creationDisposition, DWORD flagsAndAttributes,bool ignoreSymbolicLink=false); + +public: + CFileBase(): _fd(-1) {}; + virtual ~CFileBase(); + + virtual bool Close(); + + bool GetLength(UINT64 &length) const; + + bool Seek(INT64 distanceToMove, DWORD moveMethod, UINT64 &newPosition); + bool Seek(UINT64 position, UINT64 &newPosition); +}; + +class CInFile: public CFileBase +{ +public: + bool Open(LPCTSTR fileName, DWORD shareMode, DWORD creationDisposition, DWORD flagsAndAttributes); + bool OpenShared(LPCTSTR fileName, bool /* shareForWrite */ ,bool ignoreSymbolicLink=false) { + return Open(fileName,ignoreSymbolicLink); + } + bool Open(LPCTSTR fileName,bool ignoreSymbolicLink=false); + #ifndef _UNICODE + bool Open(LPCWSTR fileName, DWORD shareMode, DWORD creationDisposition, DWORD flagsAndAttributes); + bool OpenShared(LPCWSTR fileName, bool /* shareForWrite */ ,bool ignoreSymbolicLink=false) { + return Open(fileName,ignoreSymbolicLink); + } + bool Open(LPCWSTR fileName,bool ignoreSymbolicLink=false); + #endif + bool ReadPart(void *data, UINT32 size, UINT32 &processedSize); + bool Read(void *data, UINT32 size, UINT32 &processedSize); +}; + +class COutFile: public CFileBase +{ +public: + bool Open(LPCTSTR fileName, DWORD shareMode, DWORD creationDisposition, DWORD flagsAndAttributes); + bool Open(LPCTSTR fileName, DWORD creationDisposition); + bool Create(LPCTSTR fileName, bool createAlways); + + #ifndef _UNICODE + bool Open(LPCWSTR fileName, DWORD shareMode, DWORD creationDisposition, DWORD flagsAndAttributes); + bool Open(LPCWSTR fileName, DWORD creationDisposition); + bool Create(LPCWSTR fileName, bool createAlways); + #endif + + /* + void SetOpenCreationDisposition(DWORD creationDisposition) + { m_CreationDisposition = creationDisposition; } + void SetOpenCreationDispositionCreateAlways() + { m_CreationDisposition = CREATE_ALWAYS; } + */ + + bool SetTime(const FILETIME *cTime, const FILETIME *aTime, const FILETIME *mTime); + bool SetMTime(const FILETIME *mTime); + bool WritePart(const void *data, UINT32 size, UINT32 &processedSize); + bool Write(const void *data, UINT32 size, UINT32 &processedSize); + bool SetEndOfFile(); + bool SetLength(UINT64 length); +}; + +}}} + +#endif diff --git a/CPP/Windows/FileName.cpp b/CPP/Windows/FileName.cpp new file mode 100644 index 0000000..8443a4a --- /dev/null +++ b/CPP/Windows/FileName.cpp @@ -0,0 +1,50 @@ +// Windows/FileName.cpp + +#include "StdAfx.h" + +#include "Windows/FileName.h" +#include "Common/Wildcard.h" + +namespace NWindows { +namespace NFile { +namespace NName { + +void NormalizeDirPathPrefix(CSysString &dirPath) +{ + if (dirPath.IsEmpty()) + return; + if (dirPath.ReverseFind(kDirDelimiter) != dirPath.Length() - 1) + dirPath += kDirDelimiter; +} + +#ifndef _UNICODE +void NormalizeDirPathPrefix(UString &dirPath) +{ + if (dirPath.IsEmpty()) + return; + if (dirPath.ReverseFind(wchar_t(kDirDelimiter)) != dirPath.Length() - 1) + dirPath += wchar_t(kDirDelimiter); +} +#endif + +const wchar_t kExtensionDelimiter = L'.'; + +void SplitNameToPureNameAndExtension(const UString &fullName, + UString &pureName, UString &extensionDelimiter, UString &extension) +{ + int index = fullName.ReverseFind(kExtensionDelimiter); + if (index < 0) + { + pureName = fullName; + extensionDelimiter.Empty(); + extension.Empty(); + } + else + { + pureName = fullName.Left(index); + extensionDelimiter = kExtensionDelimiter; + extension = fullName.Mid(index + 1); + } +} + +}}} diff --git a/CPP/Windows/FileName.h b/CPP/Windows/FileName.h new file mode 100644 index 0000000..d980790 --- /dev/null +++ b/CPP/Windows/FileName.h @@ -0,0 +1,27 @@ +// Windows/FileName.h + +#ifndef __WINDOWS_FILENAME_H +#define __WINDOWS_FILENAME_H + +#include "../../C/Types.h" + +#include "../Common/MyString.h" + +namespace NWindows { +namespace NFile { +namespace NName { + +const TCHAR kDirDelimiter = CHAR_PATH_SEPARATOR; +const TCHAR kAnyStringWildcard = '*'; + +void NormalizeDirPathPrefix(CSysString &dirPath); // ensures that it ended with '\\' +#ifndef _UNICODE +void NormalizeDirPathPrefix(UString &dirPath); // ensures that it ended with '\\' +#endif + +void SplitNameToPureNameAndExtension(const UString &fullName, + UString &pureName, UString &extensionDelimiter, UString &extension); + +}}} + +#endif diff --git a/CPP/Windows/Menu.h b/CPP/Windows/Menu.h new file mode 100644 index 0000000..2f753c2 --- /dev/null +++ b/CPP/Windows/Menu.h @@ -0,0 +1,4 @@ + +/* TODO */ + + diff --git a/CPP/Windows/NtCheck.h b/CPP/Windows/NtCheck.h new file mode 100644 index 0000000..e56318f --- /dev/null +++ b/CPP/Windows/NtCheck.h @@ -0,0 +1,44 @@ +// Windows/NtCheck.h + +#ifndef __WINDOWS_NT_CHECK_H +#define __WINDOWS_NT_CHECK_H + +#ifdef _WIN32 + +#if !defined(_WIN64) && !defined(UNDER_CE) +static inline bool IsItWindowsNT() +{ + OSVERSIONINFO vi; + vi.dwOSVersionInfoSize = sizeof(vi); + return (::GetVersionEx(&vi) && vi.dwPlatformId == VER_PLATFORM_WIN32_NT); +} +#endif + +#ifndef _UNICODE + #if defined(_WIN64) || defined(UNDER_CE) + bool g_IsNT = true; + #define SET_IS_NT + #else + bool g_IsNT = false; + #define SET_IS_NT g_IsNT = IsItWindowsNT(); + #endif + #define NT_CHECK_ACTION + // #define NT_CHECK_ACTION { NT_CHECK_FAIL_ACTION } +#else + #if !defined(_WIN64) && !defined(UNDER_CE) + #define NT_CHECK_ACTION if (!IsItWindowsNT()) { NT_CHECK_FAIL_ACTION } + #else + #define NT_CHECK_ACTION + #endif + #define SET_IS_NT +#endif + +#define NT_CHECK NT_CHECK_ACTION SET_IS_NT + +#else + +#define NT_CHECK + +#endif + +#endif diff --git a/CPP/Windows/PropVariant.cpp b/CPP/Windows/PropVariant.cpp new file mode 100644 index 0000000..90212e0 --- /dev/null +++ b/CPP/Windows/PropVariant.cpp @@ -0,0 +1,243 @@ +// Windows/PropVariant.cpp + +#include "StdAfx.h" + +#include "PropVariant.h" + +#include "../Common/Defs.h" + +namespace NWindows { +namespace NCOM { + +CPropVariant::CPropVariant(const PROPVARIANT &varSrc) +{ + vt = VT_EMPTY; + InternalCopy(&varSrc); +} + +CPropVariant::CPropVariant(const CPropVariant &varSrc) +{ + vt = VT_EMPTY; + InternalCopy(&varSrc); +} + +CPropVariant::CPropVariant(BSTR bstrSrc) +{ + vt = VT_EMPTY; + *this = bstrSrc; +} + +CPropVariant::CPropVariant(LPCOLESTR lpszSrc) +{ + vt = VT_EMPTY; + *this = lpszSrc; +} + +CPropVariant& CPropVariant::operator=(const CPropVariant &varSrc) +{ + InternalCopy(&varSrc); + return *this; +} +CPropVariant& CPropVariant::operator=(const PROPVARIANT &varSrc) +{ + InternalCopy(&varSrc); + return *this; +} + +CPropVariant& CPropVariant::operator=(BSTR bstrSrc) +{ + *this = (LPCOLESTR)bstrSrc; + return *this; +} + +static const char *kMemException = "out of memory"; + +CPropVariant& CPropVariant::operator=(LPCOLESTR lpszSrc) +{ + InternalClear(); + vt = VT_BSTR; + wReserved1 = 0; + bstrVal = ::SysAllocString(lpszSrc); + if (bstrVal == NULL && lpszSrc != NULL) + { + throw kMemException; + // vt = VT_ERROR; + // scode = E_OUTOFMEMORY; + } + return *this; +} + + +CPropVariant& CPropVariant::operator=(const char *s) +{ + InternalClear(); + vt = VT_BSTR; + wReserved1 = 0; + UINT len = (UINT)strlen(s); + bstrVal = ::SysAllocStringByteLen(0, (UINT)len * sizeof(OLECHAR)); + if (bstrVal == NULL) + { + throw kMemException; + // vt = VT_ERROR; + // scode = E_OUTOFMEMORY; + } + else + { + for (UINT i = 0; i <= len; i++) + bstrVal[i] = s[i]; + } + return *this; +} + +CPropVariant& CPropVariant::operator=(bool bSrc) +{ + if (vt != VT_BOOL) + { + InternalClear(); + vt = VT_BOOL; + } + boolVal = bSrc ? VARIANT_TRUE : VARIANT_FALSE; + return *this; +} + +#define SET_PROP_FUNC(type, id, dest) \ + CPropVariant& CPropVariant::operator=(type value) \ + { if (vt != id) { InternalClear(); vt = id; } \ + dest = value; return *this; } + +SET_PROP_FUNC(Byte, VT_UI1, bVal) +SET_PROP_FUNC(Int16, VT_I2, iVal) +SET_PROP_FUNC(Int32, VT_I4, lVal) +SET_PROP_FUNC(UInt32, VT_UI4, ulVal) +SET_PROP_FUNC(UInt64, VT_UI8, uhVal.QuadPart) +SET_PROP_FUNC(const FILETIME &, VT_FILETIME, filetime) + +static HRESULT MyPropVariantClear(PROPVARIANT *prop) +{ + switch(prop->vt) + { + case VT_UI1: + case VT_I1: + case VT_I2: + case VT_UI2: + case VT_BOOL: + case VT_I4: + case VT_UI4: + case VT_R4: + case VT_INT: + case VT_UINT: + case VT_ERROR: + case VT_FILETIME: + case VT_UI8: + case VT_R8: + case VT_CY: + case VT_DATE: + prop->vt = VT_EMPTY; + prop->wReserved1 = 0; + return S_OK; + } + return ::VariantClear((VARIANTARG *)prop); +} + +HRESULT CPropVariant::Clear() +{ + return MyPropVariantClear(this); +} + +HRESULT CPropVariant::Copy(const PROPVARIANT* pSrc) +{ + ::VariantClear((tagVARIANT *)this); + switch(pSrc->vt) + { + case VT_UI1: + case VT_I1: + case VT_I2: + case VT_UI2: + case VT_BOOL: + case VT_I4: + case VT_UI4: + case VT_R4: + case VT_INT: + case VT_UINT: + case VT_ERROR: + case VT_FILETIME: + case VT_UI8: + case VT_R8: + case VT_CY: + case VT_DATE: + memmove((PROPVARIANT*)this, pSrc, sizeof(PROPVARIANT)); + return S_OK; + } + return ::VariantCopy((tagVARIANT *)this, (tagVARIANT *)const_cast(pSrc)); +} + + +HRESULT CPropVariant::Attach(PROPVARIANT *pSrc) +{ + HRESULT hr = Clear(); + if (FAILED(hr)) + return hr; + memcpy(this, pSrc, sizeof(PROPVARIANT)); + pSrc->vt = VT_EMPTY; + return S_OK; +} + +HRESULT CPropVariant::Detach(PROPVARIANT *pDest) +{ + HRESULT hr = MyPropVariantClear(pDest); + if (FAILED(hr)) + return hr; + memcpy(pDest, this, sizeof(PROPVARIANT)); + vt = VT_EMPTY; + return S_OK; +} + +HRESULT CPropVariant::InternalClear() +{ + HRESULT hr = Clear(); + if (FAILED(hr)) + { + vt = VT_ERROR; + scode = hr; + } + return hr; +} + +void CPropVariant::InternalCopy(const PROPVARIANT *pSrc) +{ + HRESULT hr = Copy(pSrc); + if (FAILED(hr)) + { + if (hr == E_OUTOFMEMORY) + throw kMemException; + vt = VT_ERROR; + scode = hr; + } +} + +int CPropVariant::Compare(const CPropVariant &a) +{ + if (vt != a.vt) + return MyCompare(vt, a.vt); + switch (vt) + { + case VT_EMPTY: return 0; + // case VT_I1: return MyCompare(cVal, a.cVal); + case VT_UI1: return MyCompare(bVal, a.bVal); + case VT_I2: return MyCompare(iVal, a.iVal); + case VT_UI2: return MyCompare(uiVal, a.uiVal); + case VT_I4: return MyCompare(lVal, a.lVal); + case VT_UI4: return MyCompare(ulVal, a.ulVal); + // case VT_UINT: return MyCompare(uintVal, a.uintVal); + case VT_I8: return MyCompare(hVal.QuadPart, a.hVal.QuadPart); + case VT_UI8: return MyCompare(uhVal.QuadPart, a.uhVal.QuadPart); + case VT_BOOL: return -MyCompare(boolVal, a.boolVal); + case VT_FILETIME: return ::CompareFileTime(&filetime, &a.filetime); + case VT_BSTR: + return 0; // Not implemented + // return MyCompare(aPropVarint.cVal); + default: return 0; + } +} + +}} diff --git a/CPP/Windows/PropVariant.h b/CPP/Windows/PropVariant.h new file mode 100644 index 0000000..d018034 --- /dev/null +++ b/CPP/Windows/PropVariant.h @@ -0,0 +1,56 @@ +// Windows/PropVariant.h + +#ifndef __WINDOWS_PROPVARIANT_H +#define __WINDOWS_PROPVARIANT_H + +#include "../Common/MyWindows.h" +#include "../Common/Types.h" + +namespace NWindows { +namespace NCOM { + +class CPropVariant : public tagPROPVARIANT +{ +public: + CPropVariant() { vt = VT_EMPTY; wReserved1 = 0; } + ~CPropVariant() { Clear(); } + CPropVariant(const PROPVARIANT &varSrc); + CPropVariant(const CPropVariant &varSrc); + CPropVariant(BSTR bstrSrc); + CPropVariant(LPCOLESTR lpszSrc); + CPropVariant(bool bSrc) { vt = VT_BOOL; wReserved1 = 0; boolVal = (bSrc ? VARIANT_TRUE : VARIANT_FALSE); }; + CPropVariant(Byte value) { vt = VT_UI1; wReserved1 = 0; bVal = value; } + CPropVariant(Int16 value) { vt = VT_I2; wReserved1 = 0; iVal = value; } + CPropVariant(Int32 value) { vt = VT_I4; wReserved1 = 0; lVal = value; } + CPropVariant(UInt32 value) { vt = VT_UI4; wReserved1 = 0; ulVal = value; } + CPropVariant(UInt64 value) { vt = VT_UI8; wReserved1 = 0; uhVal.QuadPart = value; } + CPropVariant(const FILETIME &value) { vt = VT_FILETIME; wReserved1 = 0; filetime = value; } + + CPropVariant& operator=(const CPropVariant &varSrc); + CPropVariant& operator=(const PROPVARIANT &varSrc); + CPropVariant& operator=(BSTR bstrSrc); + CPropVariant& operator=(LPCOLESTR lpszSrc); + CPropVariant& operator=(const char *s); + CPropVariant& operator=(bool bSrc); + CPropVariant& operator=(Byte value); + CPropVariant& operator=(Int16 value); + CPropVariant& operator=(Int32 value); + CPropVariant& operator=(UInt32 value); + CPropVariant& operator=(Int64 value); + CPropVariant& operator=(UInt64 value); + CPropVariant& operator=(const FILETIME &value); + + HRESULT Clear(); + HRESULT Copy(const PROPVARIANT *pSrc); + HRESULT Attach(PROPVARIANT *pSrc); + HRESULT Detach(PROPVARIANT *pDest); + + HRESULT InternalClear(); + void InternalCopy(const PROPVARIANT *pSrc); + + int Compare(const CPropVariant &a1); +}; + +}} + +#endif diff --git a/CPP/Windows/PropVariantConversions.cpp b/CPP/Windows/PropVariantConversions.cpp new file mode 100644 index 0000000..61d524d --- /dev/null +++ b/CPP/Windows/PropVariantConversions.cpp @@ -0,0 +1,142 @@ +// PropVariantConversions.cpp + +#include "StdAfx.h" + +#include "Common/IntToString.h" +#include "Common/StringConvert.h" + +#include "Windows/Defs.h" + +#include "PropVariantConversions.h" + +static UString ConvertUInt64ToString(UInt64 value) +{ + wchar_t buffer[32]; + ConvertUInt64ToString(value, buffer); + return buffer; +} + +static UString ConvertInt64ToString(Int64 value) +{ + wchar_t buffer[32]; + ConvertInt64ToString(value, buffer); + return buffer; +} + +#ifdef _WIN32 +static char *UIntToStringSpec(char c, UInt32 value, char *s, int numPos) +{ + if (c != 0) + *s++ = c; + char temp[16]; + int pos = 0; + do + { + temp[pos++] = (char)('0' + value % 10); + value /= 10; + } + while (value != 0); + int i; + for (i = 0; i < numPos - pos; i++) + *s++ = '0'; + do + *s++ = temp[--pos]; + while (pos > 0); + *s = '\0'; + return s; +} +#endif + +bool ConvertFileTimeToString(const FILETIME &ft, char *s, bool includeTime, bool includeSeconds) +{ +#ifdef _WIN32 + s[0] = '\0'; + SYSTEMTIME st; + if (!BOOLToBool(FileTimeToSystemTime(&ft, &st))) + return false; + s = UIntToStringSpec(0, st.wYear, s, 4); + s = UIntToStringSpec('-', st.wMonth, s, 2); + s = UIntToStringSpec('-', st.wDay, s, 2); + if (includeTime) + { + s = UIntToStringSpec(' ', st.wHour, s, 2); + s = UIntToStringSpec(':', st.wMinute, s, 2); + if (includeSeconds) + UIntToStringSpec(':', st.wSecond, s, 2); + } + /* + sprintf(s, "%04d-%02d-%02d", st.wYear, st.wMonth, st.wDay); + if (includeTime) + { + sprintf(s + strlen(s), " %02d:%02d", st.wHour, st.wMinute); + if (includeSeconds) + sprintf(s + strlen(s), ":%02d", st.wSecond); + } + */ +#else + BOOLEAN WINAPI RtlTimeToSecondsSince1970( const LARGE_INTEGER *Time, DWORD *Seconds ); + + FILETIME filetime; + LocalFileTimeToFileTime(&ft, &filetime); + + LARGE_INTEGER ltime; + + ltime.QuadPart = filetime.dwHighDateTime; + ltime.QuadPart = (ltime.QuadPart << 32) | filetime.dwLowDateTime; + + DWORD dw; + RtlTimeToSecondsSince1970(<ime, &dw ); + time_t timep = (time_t)dw; + + struct tm * date = localtime(&timep); + + sprintf(s, "%04d-%02d-%02d", date->tm_year+1900, date->tm_mon+1,date->tm_mday); + if (includeTime) + { + sprintf(s + strlen(s), " %02d:%02d", date->tm_hour,date->tm_min); + if (includeSeconds) + sprintf(s + strlen(s), ":%02d", date->tm_sec); + } +#endif + return true; +} + +UString ConvertFileTimeToString(const FILETIME &ft, bool includeTime, bool includeSeconds) +{ + char s[32]; + ConvertFileTimeToString(ft, s, includeTime, includeSeconds); + return GetUnicodeString(s); +} + + +UString ConvertPropVariantToString(const PROPVARIANT &prop) +{ + switch (prop.vt) + { + case VT_EMPTY: return UString(); + case VT_BSTR: return prop.bstrVal; + case VT_UI1: return ConvertUInt64ToString(prop.bVal); + case VT_UI2: return ConvertUInt64ToString(prop.uiVal); + case VT_UI4: return ConvertUInt64ToString(prop.ulVal); + case VT_UI8: return ConvertUInt64ToString(prop.uhVal.QuadPart); + case VT_FILETIME: return ConvertFileTimeToString(prop.filetime, true, true); + // case VT_I1: return ConvertInt64ToString(prop.cVal); + case VT_I2: return ConvertInt64ToString(prop.iVal); + case VT_I4: return ConvertInt64ToString(prop.lVal); + case VT_I8: return ConvertInt64ToString(prop.hVal.QuadPart); + case VT_BOOL: return VARIANT_BOOLToBool(prop.boolVal) ? L"+" : L"-"; + default: throw 150245; + } +} + +UInt64 ConvertPropVariantToUInt64(const PROPVARIANT &prop) +{ + switch (prop.vt) + { + case VT_UI1: return prop.bVal; + case VT_UI2: return prop.uiVal; + case VT_UI4: return prop.ulVal; + case VT_UI8: return (UInt64)prop.uhVal.QuadPart; + default: throw 151199; + } +} diff --git a/CPP/Windows/PropVariantConversions.h b/CPP/Windows/PropVariantConversions.h new file mode 100644 index 0000000..3de4ded --- /dev/null +++ b/CPP/Windows/PropVariantConversions.h @@ -0,0 +1,14 @@ +// Windows/PropVariantConversions.h + +#ifndef __PROP_VARIANT_CONVERSIONS_H +#define __PROP_VARIANT_CONVERSIONS_H + +#include "Common/MyString.h" +#include "Common/Types.h" + +bool ConvertFileTimeToString(const FILETIME &ft, char *s, bool includeTime = true, bool includeSeconds = true); +UString ConvertFileTimeToString(const FILETIME &ft, bool includeTime = true, bool includeSeconds = true); +UString ConvertPropVariantToString(const PROPVARIANT &prop); +UInt64 ConvertPropVariantToUInt64(const PROPVARIANT &prop); + +#endif diff --git a/CPP/Windows/PropVariantUtils.cpp b/CPP/Windows/PropVariantUtils.cpp new file mode 100644 index 0000000..0a9cfab --- /dev/null +++ b/CPP/Windows/PropVariantUtils.cpp @@ -0,0 +1,78 @@ +// PropVariantUtils.cpp + +#include "StdAfx.h" + +#include "PropVariantUtils.h" +#include "Common/StringConvert.h" +#include "Common/IntToString.h" + +using namespace NWindows; + +static AString GetHex(UInt32 v) +{ + char sz[32] = { '0', 'x' }; + ConvertUInt64ToString(v, sz + 2, 16); + return sz; +} + +void StringToProp(const AString &s, NCOM::CPropVariant &prop) +{ + prop = MultiByteToUnicodeString(s); +} + +void PairToProp(const CUInt32PCharPair *pairs, unsigned num, UInt32 value, NCOM::CPropVariant &prop) +{ + AString s; + for (unsigned i = 0; i < num; i++) + { + const CUInt32PCharPair &p = pairs[i]; + if (p.Value == value) + s = p.Name; + } + if (s.IsEmpty()) + s = GetHex(value); + StringToProp(s, prop); +} + +AString TypeToString(const char *table[], unsigned num, UInt32 value) +{ + if (value < num) + return table[value]; + return GetHex(value); +} + +void TypeToProp(const char *table[], unsigned num, UInt32 value, NCOM::CPropVariant &prop) +{ + StringToProp(TypeToString(table, num, value), prop); +} + + +AString FlagsToString(const CUInt32PCharPair *pairs, unsigned num, UInt32 flags) +{ + AString s; + for (unsigned i = 0; i < num; i++) + { + const CUInt32PCharPair &p = pairs[i]; + UInt32 flag = (UInt32)1 << (unsigned)p.Value; + if ((flags & flag) != 0) + { + if (!s.IsEmpty()) + s += ' '; + s += p.Name; + } + flags &= ~flag; + } + if (flags != 0) + { + if (!s.IsEmpty()) + s += ' '; + s += GetHex(flags); + } + return s; +} + +void FlagsToProp(const CUInt32PCharPair *pairs, unsigned num, UInt32 flags, NCOM::CPropVariant &prop) +{ + StringToProp(FlagsToString(pairs, num, flags), prop); +} + diff --git a/CPP/Windows/PropVariantUtils.h b/CPP/Windows/PropVariantUtils.h new file mode 100644 index 0000000..5aaf65c --- /dev/null +++ b/CPP/Windows/PropVariantUtils.h @@ -0,0 +1,28 @@ +// Windows/PropVariantUtils.h + +#ifndef __PROP_VARIANT_UTILS_H +#define __PROP_VARIANT_UTILS_H + +#include "Common/MyString.h" +#include "PropVariant.h" + +struct CUInt32PCharPair +{ + UInt32 Value; + const char *Name; +}; + +void StringToProp(const AString &s, NWindows::NCOM::CPropVariant &prop); +void PairToProp(const CUInt32PCharPair *pairs, unsigned num, UInt32 value, NWindows::NCOM::CPropVariant &prop); + +AString FlagsToString(const CUInt32PCharPair *pairs, unsigned num, UInt32 flags); +void FlagsToProp(const CUInt32PCharPair *pairs, unsigned num, UInt32 flags, NWindows::NCOM::CPropVariant &prop); + +AString TypeToString(const char *table[], unsigned num, UInt32 value); +void TypeToProp(const char *table[], unsigned num, UInt32 value, NWindows::NCOM::CPropVariant &prop); + +#define PAIR_TO_PROP(pairs, value, prop) PairToProp(pairs, sizeof(pairs) / sizeof(pairs[0]), value, prop) +#define FLAGS_TO_PROP(pairs, value, prop) FlagsToProp(pairs, sizeof(pairs) / sizeof(pairs[0]), value, prop) +#define TYPE_TO_PROP(table, value, prop) TypeToProp(table, sizeof(table) / sizeof(table[0]), value, prop) + +#endif diff --git a/CPP/Windows/Registry.cpp b/CPP/Windows/Registry.cpp new file mode 100644 index 0000000..74e255d --- /dev/null +++ b/CPP/Windows/Registry.cpp @@ -0,0 +1,313 @@ +// Windows/Registry.cpp + +#include "StdAfx.h" + +#ifndef _UNICODE +#include "Common/StringConvert.h" +#endif +#include "Windows/Registry.h" + +#include + +class HKEY_Impl +{ + public: + wxString path; + HKEY_Impl(wxString a) : path(a) {} +}; + +namespace NWindows { +namespace NRegistry { + +#define ERROR_SET_VALUE (E_INVALIDARG) // FIXME +#define ERROR_GET_VALUE (E_INVALIDARG) // FIXME +#define PROGRAM_NAME L"p7zip" + +static wxConfig * g_config = 0; +static int g_config_ref = 0; + +static void configAddRef() { + if (g_config == 0) { + g_config = new wxConfig(PROGRAM_NAME); + g_config->Flush(true); + wxConfigBase::Set(g_config); + } + g_config_ref++; +} + +static void configSubRef() { + if (g_config_ref >= 1) + { + g_config_ref--; + if (g_config_ref == 0) { + delete g_config; + g_config = 0; + wxConfigBase::Set(NULL); + } else { + g_config->Flush(true); + } + } +} + + LONG CKey::Close() + { + if (_object) + { + configSubRef(); + delete _object; + } + _object = 0; + return ERROR_SUCCESS; + } + + LONG CKey::Create(HKEY parentKey, LPCTSTR keyName) + { + Close(); + + configAddRef(); + + wxString path; + + if (parentKey == HKEY_CURRENT_USER) { + path=L"/" + wxString(keyName); + } else { + path = parentKey->path + L"/" + wxString(keyName); + } + _object = new HKEY_Impl(path); + return ERROR_SUCCESS; + } + LONG CKey::Open(HKEY parentKey, LPCTSTR keyName, REGSAM accessMask) + { + Close(); + + configAddRef(); + + wxString path; + + if (parentKey == HKEY_CURRENT_USER) { + path=L"/" + wxString(keyName); + } else { + path = parentKey->path + L"/" + wxString(keyName); + } + _object = new HKEY_Impl(path); + return ERROR_SUCCESS; + } + + LONG CKey::RecurseDeleteKey(LPCTSTR subKeyName) + { + g_config->SetPath(_object->path); + bool ret = g_config->DeleteGroup(subKeyName); + if (ret) return ERROR_SUCCESS; + return ERROR_GET_VALUE; + } + + LONG CKey::DeleteValue(LPCTSTR name) + { + g_config->SetPath(_object->path); + bool ret = g_config->DeleteEntry(name); + if (ret) return ERROR_SUCCESS; + return ERROR_GET_VALUE; + } + + LONG CKey::QueryValue(LPCTSTR name, UInt32 &value) + { + g_config->SetPath(_object->path); + long val; + bool ret = g_config->Read(name,&val); + if (ret) { + value = (UInt32)val; + return ERROR_SUCCESS; + } + return ERROR_GET_VALUE; + } + + LONG CKey::QueryValue(LPCTSTR name, bool &value) + { + g_config->SetPath(_object->path); + bool ret = g_config->Read(name,&value); + if (ret) return ERROR_SUCCESS; + return ERROR_GET_VALUE; + } + + LONG CKey::QueryValue(LPCTSTR name, CSysString &value) + { + g_config->SetPath(_object->path); + wxString val; + bool ret = g_config->Read(name,&val); + if (ret) { + value = val; + return ERROR_SUCCESS; + } + return ERROR_GET_VALUE; + } + +LONG CKey::GetValue_IfOk(LPCTSTR name, UInt32 &value) +{ + UInt32 newVal; + LONG res = QueryValue(name, newVal); + if (res == ERROR_SUCCESS) + value = newVal; + return res; +} + +LONG CKey::GetValue_IfOk(LPCTSTR name, bool &value) +{ + bool newVal; + LONG res = QueryValue(name, newVal); + if (res == ERROR_SUCCESS) + value = newVal; + return res; +} + + + LONG CKey::SetValue(LPCTSTR valueName, UInt32 value) + { + g_config->SetPath(_object->path); + bool ret = g_config->Write(valueName,(long)value); + if (ret == true) return ERROR_SUCCESS; + return ERROR_SET_VALUE; + } + LONG CKey::SetValue(LPCTSTR valueName, bool value) + { + g_config->SetPath(_object->path); + bool ret = g_config->Write(valueName,value); + if (ret == true) return ERROR_SUCCESS; + return ERROR_SET_VALUE; + } + LONG CKey::SetValue(LPCTSTR valueName, LPCTSTR value) + { + g_config->SetPath(_object->path); + bool ret = g_config->Write(valueName,value); + if (ret == true) return ERROR_SUCCESS; + return ERROR_SET_VALUE; + } + + LONG CKey::SetValue(LPCTSTR name, const void *value, UInt32 size) + { + static char hexa[] = "0123456789ABCDEF"; + /* FIXME + MYASSERT(value != NULL); + MYASSERT(_object != NULL); + return RegSetValueEx(_object, name, NULL, REG_BINARY, (const BYTE *)value, size); + */ + BYTE *buf = (BYTE *)value; + wxString str; + for(UInt32 i=0;i>4) & 0x0f]; + str += hexa[ buf[i] & 0x0f]; + } + return SetValue(name,(LPCTSTR)str); + } + + LONG CKey::EnumKeys(CSysStringVector &keyNames) + { + g_config->SetPath(_object->path); + keyNames.Clear(); + // enumeration variables + wxString str; + long dummy; + bool bCont = g_config->GetFirstEntry(str, dummy); + while ( bCont ) { + keyNames.Add((const TCHAR *)str); + bCont = g_config->GetNextEntry(str, dummy); + } + + // now all groups... + bCont = g_config->GetFirstGroup(str, dummy); + while ( bCont ) { + keyNames.Add((const TCHAR *)str); + bCont = g_config->GetNextGroup(str, dummy); + } + return ERROR_SUCCESS; + } + + LONG CKey::QueryValue(LPCTSTR name, void *value, UInt32 &dataSize) + { + g_config->SetPath(_object->path); + wxString str; + bool ret = g_config->Read(name,&str); + if (ret == false) return ERROR_GET_VALUE; + + size_t l = str.Len() / 2; + if (l > dataSize) l = dataSize; + else dataSize=l; + + BYTE *buf = (BYTE *)value; + for(UInt32 i=0;iSetPath(_object->path); + wxString str; + bool ret = g_config->Read(name,&str); + if (ret == false) return ERROR_GET_VALUE; + + dataSize = str.Len() / 2; + value.SetCapacity(dataSize); + return QueryValue(name, (BYTE *)value, dataSize); + } + + +LONG CKey::SetValue_Strings(LPCTSTR valueName, const UStringVector &strings) +{ + UInt32 numChars = 0; + int i; + for (i = 0; i < strings.Size(); i++) + numChars += strings[i].Length() + 1; + CBuffer buffer; + buffer.SetCapacity(numChars); + int pos = 0; + for (i = 0; i < strings.Size(); i++) + { + const UString &s = strings[i]; + MyStringCopy((wchar_t *)buffer + pos, (const wchar_t *)s); + pos += s.Length() + 1; + } + return SetValue(valueName, buffer, numChars * sizeof(wchar_t)); +} + +LONG CKey::GetValue_Strings(LPCTSTR valueName, UStringVector &strings) +{ + strings.Clear(); + CByteBuffer buffer; + UInt32 dataSize; + LONG res = QueryValue(valueName, buffer, dataSize); + if (res != ERROR_SUCCESS) + return res; + if (dataSize % sizeof(wchar_t) != 0) + return E_FAIL; + const wchar_t *data = (const wchar_t *)(const Byte *)buffer; + int numChars = dataSize / sizeof(wchar_t); + UString s; + for (int i = 0; i < numChars; i++) + { + wchar_t c = data[i]; + if (c == 0) + { + strings.Add(s); + s.Empty(); + } + else + s += c; + } + return res; +} + + +} +} + diff --git a/CPP/Windows/Registry.h b/CPP/Windows/Registry.h new file mode 100644 index 0000000..a907875 --- /dev/null +++ b/CPP/Windows/Registry.h @@ -0,0 +1,113 @@ +// Windows/Registry.h + +#ifndef __WINDOWS_REGISTRY_H +#define __WINDOWS_REGISTRY_H + +#include "Common/Buffer.h" +#include "Common/MyString.h" +#include "Common/Types.h" + +#ifndef _WIN32 +class HKEY_Impl; + +typedef HKEY_Impl * HKEY; + +/* +#define HKEY_CLASSES_ROOT ((HKEY) 0x80000000) +#define HKEY_LOCAL_MACHINE ((HKEY) 0x80000002) +#define HKEY_USERS ((HKEY) 0x80000003) +#define HKEY_PERFORMANCE_DATA ((HKEY) 0x80000004) +#define HKEY_CURRENT_CONFIG ((HKEY) 0x80000005) +#define HKEY_DYN_DATA ((HKEY) 0x80000006) +*/ +#define HKEY_CURRENT_USER ((HKEY) 0x80000001) + + +typedef DWORD REGSAM; +#define ERROR_SUCCESS (0) +#define KEY_READ (0x1234) // FIXME +#define KEY_ALL_ACCESS (~0) // FIXME + +/* ------------------------------ end registry ------------------------------ */ + +#endif + +namespace NWindows { +namespace NRegistry { + +const TCHAR kKeyNameDelimiter = TEXT(CHAR_PATH_SEPARATOR); + +// LONG SetValue(HKEY parentKey, LPCTSTR keyName, LPCTSTR valueName, LPCTSTR value); + +class CKey +{ + HKEY _object; +public: + CKey(): _object(NULL) {} + ~CKey() { Close(); } + + operator HKEY() const { return _object; } + + #if 0 + HKEY Detach(); + void Attach(HKEY key); + LONG Create(HKEY parentKey, LPCTSTR keyName, + LPTSTR keyClass = REG_NONE, DWORD options = REG_OPTION_NON_VOLATILE, + REGSAM accessMask = KEY_ALL_ACCESS, + LPSECURITY_ATTRIBUTES securityAttributes = NULL, + LPDWORD disposition = NULL); + LONG Open(HKEY parentKey, LPCTSTR keyName, + REGSAM accessMask = KEY_ALL_ACCESS); +#endif // #if 0 + LONG Create(HKEY parentKey, LPCTSTR keyName); + LONG Open(HKEY parentKey, LPCTSTR keyName, + REGSAM accessMask = KEY_ALL_ACCESS); + + LONG Close(); + + LONG DeleteSubKey(LPCTSTR subKeyName); + LONG RecurseDeleteKey(LPCTSTR subKeyName); + + LONG DeleteValue(LPCTSTR name); + #ifndef _UNICODE + LONG DeleteValue(LPCWSTR name); + #endif + + LONG SetValue(LPCTSTR valueName, UInt32 value); + LONG SetValue(LPCTSTR valueName, bool value); + LONG SetValue(LPCTSTR valueName, LPCTSTR value); + // LONG SetValue(LPCTSTR valueName, const CSysString &value); + #ifndef _UNICODE + LONG SetValue(LPCWSTR name, LPCWSTR value); + // LONG SetValue(LPCWSTR name, const UString &value); + #endif + + LONG SetValue(LPCTSTR name, const void *value, UInt32 size); + + LONG SetValue_Strings(LPCTSTR valueName, const UStringVector &strings); + LONG GetValue_Strings(LPCTSTR valueName, UStringVector &strings); + + LONG SetKeyValue(LPCTSTR keyName, LPCTSTR valueName, LPCTSTR value); + + LONG QueryValue(LPCTSTR name, UInt32 &value); + LONG QueryValue(LPCTSTR name, bool &value); + LONG QueryValue(LPCTSTR name, LPTSTR value, UInt32 &dataSize); + LONG QueryValue(LPCTSTR name, CSysString &value); + + LONG GetValue_IfOk(LPCTSTR name, UInt32 &value); + LONG GetValue_IfOk(LPCTSTR name, bool &value); + + #ifndef _UNICODE + LONG QueryValue(LPCWSTR name, LPWSTR value, UInt32 &dataSize); + LONG QueryValue(LPCWSTR name, UString &value); + #endif + + LONG QueryValue(LPCTSTR name, void *value, UInt32 &dataSize); + LONG QueryValue(LPCTSTR name, CByteBuffer &value, UInt32 &dataSize); + + LONG EnumKeys(CSysStringVector &keyNames); +}; + +}} + +#endif diff --git a/CPP/Windows/ResourceString.h b/CPP/Windows/ResourceString.h new file mode 100644 index 0000000..ac9c5cd --- /dev/null +++ b/CPP/Windows/ResourceString.h @@ -0,0 +1,22 @@ +// Windows/ResourceString.h + +#ifndef __WINDOWS_RESOURCESTRING_H +#define __WINDOWS_RESOURCESTRING_H + +#include "Common/MyString.h" + +namespace NWindows { + +CSysString MyLoadString(HINSTANCE hInstance, UINT resourceID); +CSysString MyLoadString(UINT resourceID); +#ifdef _UNICODE +inline UString MyLoadStringW(HINSTANCE hInstance, UINT resourceID) { return MyLoadString(hInstance, resourceID); } +inline UString MyLoadStringW(UINT resourceID) { return MyLoadString(resourceID); } +#else +UString MyLoadStringW(HINSTANCE hInstance, UINT resourceID); +UString MyLoadStringW(UINT resourceID); +#endif + +} + +#endif diff --git a/CPP/Windows/Shell.h b/CPP/Windows/Shell.h new file mode 100644 index 0000000..f116b77 --- /dev/null +++ b/CPP/Windows/Shell.h @@ -0,0 +1,21 @@ +// Windows/Shell.h + +#ifndef __WINDOWS_SHELL_H +#define __WINDOWS_SHELL_H + +#include +// #include + +#include "Common/MyString.h" +#include "Windows/Defs.h" + + +namespace NWindows{ +namespace NShell{ + +bool BrowseForFolder(HWND owner, LPCWSTR title, LPCWSTR initialFolder, UString &resultPath); + +}} + + +#endif diff --git a/CPP/Windows/Synchronization.cpp b/CPP/Windows/Synchronization.cpp new file mode 100644 index 0000000..8130f9a --- /dev/null +++ b/CPP/Windows/Synchronization.cpp @@ -0,0 +1,157 @@ +// Windows/Synchronization.cpp + +#include "StdAfx.h" + +#include "Synchronization.h" + +// #define TRACEN(u) u; +#define TRACEN(u) /* */ + +#define MAGIC 0x1234CAFE +class CSynchroTest +{ + int _magic; + public: + CSynchroTest() { + _magic = MAGIC; + } + void testConstructor() { + if (_magic != MAGIC) { + printf("ERROR : no constructors called during loading of plugins (please look at LINK_SHARED in makefile.machine)\n"); + exit(EXIT_FAILURE); + } + } +}; + +static CSynchroTest gbl_synchroTest; + +extern "C" void sync_TestConstructor(void) { + gbl_synchroTest.testConstructor(); +} + + +namespace NWindows { +namespace NSynchronization { + + +#ifndef ENV_BEOS +#ifdef DEBUG_SYNCHRO + void CSynchro::dump_error(int ligne,int ret,const char *text,void *param) + { + printf("\n##T%d#ERROR2 (l=%d) %s : param=%p ret = %d (%s)##\n",(int)pthread_self(),ligne,text,param,ret,strerror(ret)); + // abort(); + } + CSynchro::CSynchro() { + TRACEN((printf("\nT%d : E1-CSynchro(this=%p,m=%p,cond=%p)\n",(int)pthread_self(),(void *)this,(void *)&_object,(void *)&_cond))) + _isValid = false; + } + + void CSynchro::Create() { + TRACEN((printf("\nT%d : E1-CSynchro::Create(this=%p,m=%p,cond=%p)\n",(int)pthread_self(),(void *)this,(void *)&_object,(void *)&_cond))) + pthread_mutexattr_t mutexattr; + memset(&mutexattr,0,sizeof(mutexattr)); + int ret = pthread_mutexattr_init(&mutexattr); + if (ret != 0) { + dump_error(__LINE__,ret,"pthread_mutexattr_init",&mutexattr); + } + ret = pthread_mutexattr_settype(&mutexattr,PTHREAD_MUTEX_ERRORCHECK); + if (ret != 0) dump_error(__LINE__,ret,"pthread_mutexattr_settype",&mutexattr); + ret = ::pthread_mutex_init(&_object,&mutexattr); + if (ret != 0) dump_error(__LINE__,ret,"pthread_mutex_init",&_object); + ret = ::pthread_cond_init(&_cond,0); + if (ret != 0) dump_error(__LINE__,ret,"pthread_cond_init",&_cond); + TRACEN((printf("\nT%d : E2-CSynchro::Create(m=%p,cond=%p)\n",(int)pthread_self(),(void *)&_object,(void *)&_cond))) + } + CSynchro::~CSynchro() { + TRACEN((printf("\nT%d : E1-~CSynchro(this=%p,m=%p,cond=%p)\n",(int)pthread_self(),(void *)this,(void *)&_object,(void *)&_cond))) + if (_isValid) { + int ret = ::pthread_mutex_destroy(&_object); + if (ret != 0) dump_error(__LINE__,ret,"pthread_mutex_destroy",&_object); + ret = ::pthread_cond_destroy(&_cond); + if (ret != 0) dump_error(__LINE__,ret,"pthread_cond_destroy",&_cond); + TRACEN((printf("\nT%d : E2-~CSynchro(m=%p,cond=%p)\n",(int)pthread_self(),(void *)&_object,(void *)&_cond))) + } + _isValid = false; + } + void CSynchro::Enter() { + TRACEN((printf("\nT%d : E1-CSynchro::Enter(%p)\n",(int)pthread_self(),(void *)&_object))) + int ret = ::pthread_mutex_lock(&_object); + if (ret != 0) { + dump_error(__LINE__,ret,"CSynchro::Enter-pthread_mutex_lock",&_object); + } + TRACEN((printf("\nT%d : E2-CSynchro::Enter(%p)\n",(int)pthread_self(),(void *)&_object))) + } + void CSynchro::Leave() { + TRACEN((printf("\nT%d : E1-CSynchro::Leave(%p)\n",(int)pthread_self(),(void *)&_object))) + int ret = ::pthread_mutex_unlock(&_object); + if (ret != 0) dump_error(__LINE__,ret,"Leave::pthread_mutex_unlock",&_object); + TRACEN((printf("\nT%d : E2-CSynchro::Leave(%p)\n",(int)pthread_self(),(void *)&_object))) + } + void CSynchro::WaitCond() { + TRACEN((printf("\nT%d : E1-CSynchro::WaitCond(%p,%p)\n",(int)pthread_self(),(void *)&_cond,(void *)&_object))) + int ret = ::pthread_cond_wait(&_cond, &_object); + if (ret != 0) dump_error(__LINE__,ret,"pthread_cond_wait",&_cond); + TRACEN((printf("\nT%d : E2-CSynchro::WaitCond(%p,%p)\n",(int)pthread_self(),(void *)&_cond,(void *)&_object))) + } + void CSynchro::LeaveAndSignal() { + TRACEN((printf("\nT%d : E1-CSynchro::LeaveAndSignal(%p)\n",(int)pthread_self(),(void *)&_cond))) + int ret = ::pthread_cond_broadcast(&_cond); + if (ret != 0) dump_error(__LINE__,ret,"pthread_cond_broadcast",&_cond); + TRACEN((printf("\nT%d : E2-CSynchro::LeaveAndSignal(%p)\n",(int)pthread_self(),(void *)&_object))) + ret = ::pthread_mutex_unlock(&_object); + if (ret != 0) dump_error(__LINE__,ret,"LeaveAndSignal::pthread_mutex_unlock",&_object); + TRACEN((printf("\nT%d : E3-CSynchro::LeaveAndSignal(%p)\n",(int)pthread_self(),(void *)&_cond))) + } +#endif +#endif + +}} + +DWORD WINAPI WaitForMultipleObjects( DWORD count, const HANDLE *handles, BOOL wait_all, DWORD timeout ) +{ + TRACEN((printf("\nT%d : E1-WaitForMultipleObjects(%d)\n",(int)pthread_self(),(int)count))) + if (wait_all != FALSE) { + printf("\n\n INTERNAL ERROR - WaitForMultipleObjects(...) wait_all(%d) != FALSE\n\n",(unsigned)wait_all); + abort(); + } + + if (timeout != INFINITE) { + printf("\n\n INTERNAL ERROR - WaitForMultipleObjects(...) timeout(%u) != INFINITE\n\n",(unsigned)timeout); + abort(); + } + + if (count < 1) { + printf("\n\n INTERNAL ERROR - WaitForMultipleObjects(...) count(%u) < 1\n\n",(unsigned)count); + abort(); + } + + NWindows::NSynchronization::CSynchro *synchro = handles[0]->_sync; + + TRACEN((printf("\nT%d : E2-WaitForMultipleObjects(%d)\n",(int)pthread_self(),(int)count))) + synchro->Enter(); + TRACEN((printf("\nT%d : E3-WaitForMultipleObjects(%d)\n",(int)pthread_self(),(int)count))) + +#ifdef DEBUG_SYNCHRO + for(DWORD i=1;i_sync) { + printf("\n\n INTERNAL ERROR - WaitForMultipleObjects(...) synchro(%p) != handles[%d]->_sync(%p)\n\n", + synchro,(unsigned)i,handles[i]->_sync); + abort(); + } + } +#endif + + while(1) { + for(DWORD i=0;iIsSignaledAndUpdate()) { + synchro->Leave(); + TRACEN((printf("\nT%d : E4-WaitForMultipleObjects(%d)\n",(int)pthread_self(),(int)count))) + return WAIT_OBJECT_0+i; + } + } + synchro->WaitCond(); + } + synchro->Leave(); + return ETIMEDOUT; // WAIT_TIMEOUT; +} + diff --git a/CPP/Windows/Synchronization.h b/CPP/Windows/Synchronization.h new file mode 100644 index 0000000..df3c693 --- /dev/null +++ b/CPP/Windows/Synchronization.h @@ -0,0 +1,187 @@ +// Windows/Synchronization.h + +#ifndef __WINDOWS_SYNCHRONIZATION_H +#define __WINDOWS_SYNCHRONIZATION_H + +#include "Defs.h" + +extern "C" +{ +#include "../../C/Threads.h" +} + +#ifdef _WIN32 +#include "Handle.h" +#endif + +namespace NWindows { +namespace NSynchronization { + +class Uncopyable { +protected: + Uncopyable() {} // allow construction + ~Uncopyable() {} // and destruction of derived objects... +private: + Uncopyable(const Uncopyable&); // ...but prevent copying + Uncopyable& operator=(const Uncopyable&); +}; + + +class CBaseEvent // FIXME : private Uncopyable +{ +protected: + ::CEvent _object; +public: + bool IsCreated() { return Event_IsCreated(&_object) != 0; } +#ifdef _WIN32 + operator HANDLE() { return _object.handle; } +#endif + CBaseEvent() { Event_Construct(&_object); } + ~CBaseEvent() { Close(); } + WRes Close() { return Event_Close(&_object); } + #ifdef _WIN32 + WRes Create(bool manualReset, bool initiallyOwn, LPCTSTR name = NULL, + LPSECURITY_ATTRIBUTES securityAttributes = NULL) + { + _object.handle = ::CreateEvent(securityAttributes, BoolToBOOL(manualReset), + BoolToBOOL(initiallyOwn), name); + if (_object.handle != 0) + return 0; + return ::GetLastError(); + } + WRes Open(DWORD desiredAccess, bool inheritHandle, LPCTSTR name) + { + _object.handle = ::OpenEvent(desiredAccess, BoolToBOOL(inheritHandle), name); + if (_object.handle != 0) + return 0; + return ::GetLastError(); + } + #endif + + WRes Set() { return Event_Set(&_object); } + // bool Pulse() { return BOOLToBool(::PulseEvent(_handle)); } + WRes Reset() { return Event_Reset(&_object); } + WRes Lock() { return Event_Wait(&_object); } +}; + +class CManualResetEvent: public CBaseEvent +{ +public: + WRes Create(bool initiallyOwn = false) + { + return ManualResetEvent_Create(&_object, initiallyOwn ? 1: 0); + } + WRes CreateIfNotCreated() + { + if (IsCreated()) + return 0; + return ManualResetEvent_CreateNotSignaled(&_object); + } + #ifdef _WIN32 + WRes CreateWithName(bool initiallyOwn, LPCTSTR name) + { + return CBaseEvent::Create(true, initiallyOwn, name); + } + #endif +}; + +class CAutoResetEvent: public CBaseEvent +{ +public: + WRes Create() + { + return AutoResetEvent_CreateNotSignaled(&_object); + } + WRes CreateIfNotCreated() + { + if (IsCreated()) + return 0; + return AutoResetEvent_CreateNotSignaled(&_object); + } +}; + +#ifdef _WIN32 +class CObject: public CHandle +{ +public: + WRes Lock(DWORD timeoutInterval = INFINITE) + { return (::WaitForSingleObject(_handle, timeoutInterval) == WAIT_OBJECT_0 ? 0 : ::GetLastError()); } +}; +class CMutex: public CObject +{ +public: + WRes Create(bool initiallyOwn, LPCTSTR name = NULL, + LPSECURITY_ATTRIBUTES securityAttributes = NULL) + { + _handle = ::CreateMutex(securityAttributes, BoolToBOOL(initiallyOwn), name); + if (_handle != 0) + return 0; + return ::GetLastError(); + } + WRes Open(DWORD desiredAccess, bool inheritHandle, LPCTSTR name) + { + _handle = ::OpenMutex(desiredAccess, BoolToBOOL(inheritHandle), name); + if (_handle != 0) + return 0; + return ::GetLastError(); + } + WRes Release() + { + return ::ReleaseMutex(_handle) ? 0 : ::GetLastError(); + } +}; +class CMutexLock +{ + CMutex *_object; +public: + CMutexLock(CMutex &object): _object(&object) { _object->Lock(); } + ~CMutexLock() { _object->Release(); } +}; +#endif + +class CSemaphore : private Uncopyable +{ + ::CSemaphore _object; +public: + CSemaphore() { Semaphore_Construct(&_object); } + ~CSemaphore() { Close(); } + WRes Close() { return Semaphore_Close(&_object); } +#ifdef _WIN32 + operator HANDLE() { return _object.handle; } +#endif + WRes Create(UInt32 initiallyCount, UInt32 maxCount) + { + return Semaphore_Create(&_object, initiallyCount, maxCount); + } + WRes Release() { return Semaphore_Release1(&_object); } + WRes Release(UInt32 releaseCount) { return Semaphore_ReleaseN(&_object, releaseCount); } + WRes Lock() { return Semaphore_Wait(&_object); } +}; + +class CCriticalSection : private Uncopyable +{ + ::CCriticalSection _object; +public: + CCriticalSection() { CriticalSection_Init(&_object); } + ~CCriticalSection() { CriticalSection_Delete(&_object); } + void Enter() { CriticalSection_Enter(&_object); } + void Leave() { CriticalSection_Leave(&_object); } +}; + +class CCriticalSectionLock : private Uncopyable +{ + CCriticalSection *_object; + void Unlock() { _object->Leave(); } +public: + CCriticalSectionLock(CCriticalSection &object): _object(&object) {_object->Enter(); } + ~CCriticalSectionLock() { Unlock(); } +}; + +}} + +#ifndef _WIN32 +#include "Synchronization2.h" +#endif + +#endif + diff --git a/CPP/Windows/Synchronization2.h b/CPP/Windows/Synchronization2.h new file mode 100644 index 0000000..d86b49d --- /dev/null +++ b/CPP/Windows/Synchronization2.h @@ -0,0 +1,218 @@ +// Windows/Synchronization.h + +#ifdef ENV_BEOS +#include +#include +#include +#endif + +/* Remark : WFMO = WaitForMultipleObjects */ + +namespace NWindows { namespace NSynchronization { struct CBaseHandleWFMO; } } + +typedef NWindows::NSynchronization::CBaseHandleWFMO *HANDLE; + +DWORD WINAPI WaitForMultipleObjects( DWORD count, const HANDLE *handles, BOOL wait_all, DWORD timeout ); + +namespace NWindows { +namespace NSynchronization { + +#ifdef ENV_BEOS +class CSynchro : BLocker, private Uncopyable +{ +#define MAX_THREAD 256 + thread_id _waiting[MAX_THREAD]; // std::list _waiting; + int index_waiting; +public: + CSynchro() { index_waiting = 0; } + void Create() { index_waiting = 0; } + ~CSynchro() {} + void Enter() { Lock(); } + void Leave() { Unlock(); } + void WaitCond() { + _waiting[index_waiting++] = find_thread(NULL); // _waiting.push_back(find_thread(NULL)); + thread_id sender; + Unlock(); + int msg = receive_data(&sender, NULL, 0); + Lock(); + } + void LeaveAndSignal() { + // Unlock(); + // Lock(); + // for (std::list::iterator index = _waiting.begin(); index != _waiting.end(); index++) + for(int index = 0 ; index < index_waiting ; index++) + { + send_data(_waiting[index], '7zCN', NULL, 0); + } + index_waiting = 0; // _waiting.clear(); + Unlock(); + } +}; +#else // #ifdef ENV_BEOS +#ifdef DEBUG_SYNCHRO +class CSynchro: private Uncopyable +{ + pthread_mutex_t _object; + pthread_cond_t _cond; + bool _isValid; + void dump_error(int ligne,int ret,const char *text,void *param); +public: + CSynchro(); + ~CSynchro(); + void Create(); + void Enter(); + void Leave(); + void WaitCond(); + void LeaveAndSignal(); +}; +#else // #ifdef DEBUG_SYNCHRO +class CSynchro : private Uncopyable +{ + pthread_mutex_t _object; + pthread_cond_t _cond; + bool _isValid; +public: + CSynchro() { _isValid = false; } + ~CSynchro() { + if (_isValid) { + ::pthread_mutex_destroy(&_object); + ::pthread_cond_destroy(&_cond); + } + _isValid = false; + } + void Create() { + ::pthread_mutex_init(&_object,0); + ::pthread_cond_init(&_cond,0); + } + void Enter() { + ::pthread_mutex_lock(&_object); + } + void Leave() { + ::pthread_mutex_unlock(&_object); + } + void WaitCond() { + ::pthread_cond_wait(&_cond, &_object); + } + void LeaveAndSignal() { + ::pthread_cond_broadcast(&_cond); + ::pthread_mutex_unlock(&_object); + } +}; +#endif // #ifdef DEBUG_SYNCHRO +#endif // #ifdef ENV_BEOS + +struct CBaseHandleWFMO // FIXME : private Uncopyable +{ + CSynchro *_sync; + + CBaseHandleWFMO() { } + + operator HANDLE() { return this; } + virtual bool IsSignaledAndUpdate() = 0; +}; + +class CBaseEventWFMO : public CBaseHandleWFMO +{ + bool _manual_reset; + bool _state; + +public: + + bool IsCreated() { return (this->_sync != 0); } + CBaseEventWFMO() { this->_sync = 0; } + ~CBaseEventWFMO() { Close(); } + + WRes Close() { this->_sync = 0; return S_OK; } + + WRes Create(CSynchro *sync,bool manualReset, bool initiallyOwn) + { + this->_sync = sync; + this->_manual_reset = manualReset; + this->_state = initiallyOwn; + return S_OK; + } + + WRes Set() { + this->_sync->Enter(); + this->_state = true; + this->_sync->LeaveAndSignal(); + return S_OK; + } + + WRes Reset() { + this->_sync->Enter(); + this->_state = false; + this->_sync->Leave(); + return S_OK; + } + virtual bool IsSignaledAndUpdate() { + if (this->_state == true) { + if (this->_manual_reset == false) this->_state = false; + return true; + } + return false; + } +}; + +class CManualResetEventWFMO: public CBaseEventWFMO +{ +public: + WRes Create(CSynchro *sync,bool initiallyOwn = false) { return CBaseEventWFMO::Create(sync,true, initiallyOwn); } +}; + +class CAutoResetEventWFMO: public CBaseEventWFMO +{ +public: + WRes Create(CSynchro *sync) { return CBaseEventWFMO::Create(sync,false, false); } + WRes CreateIfNotCreated(CSynchro *sync) + { + if (IsCreated()) + return 0; + return CBaseEventWFMO::Create(sync,false, false); + } +}; + +class CSemaphoreWFMO : public CBaseHandleWFMO +{ + LONG _count; + LONG _maxCount; + +public: + CSemaphoreWFMO() : _count(0), _maxCount(0) { this->_sync=0;} + WRes Create(CSynchro *sync,LONG initiallyCount, LONG maxCount) + { + if ((initiallyCount < 0) || (initiallyCount > maxCount) || (maxCount < 1)) return S_FALSE; + this->_sync = sync; + this->_count = initiallyCount; + this->_maxCount = maxCount; + return S_OK; + } + WRes Release(LONG releaseCount = 1) { + if (releaseCount < 1) return S_FALSE; + + this->_sync->Enter(); + LONG newCount = this->_count + releaseCount; + if (newCount > this->_maxCount) + { + this->_sync->Leave(); + return S_FALSE; + } + this->_count = newCount; + + this->_sync->LeaveAndSignal(); + + return S_OK; + } + WRes Close() { this->_sync=0; return S_OK; } + + virtual bool IsSignaledAndUpdate() { + if (this->_count > 0) { + this->_count--; + return true; + } + return false; + } +}; + +}} + diff --git a/CPP/Windows/System.cpp b/CPP/Windows/System.cpp new file mode 100644 index 0000000..b63ebec --- /dev/null +++ b/CPP/Windows/System.cpp @@ -0,0 +1,166 @@ +#include +#include + +#if defined (__NetBSD__) || defined(__OpenBSD__) || defined (__FreeBSD__) || defined (__FreeBSD_kernel__) || defined (__APPLE__) +#include +#include +#elif defined(__linux__) || defined(__CYGWIN__) || defined(sun) || defined(__NETWARE__) +#include +#elif defined(hpux) || defined(__hpux) +#include +#include +#endif + +#if defined(__NETWARE__) +#include +#endif + +#if defined(ENV_BEOS) +#include +#endif + + +#include "Common/Types.h" + +namespace NWindows +{ + namespace NSystem + { + /************************ GetNumberOfProcessors ************************/ + + #if defined (__NetBSD__) || defined(__OpenBSD__) + UInt32 GetNumberOfProcessors() { + int mib[2], value; + int nbcpu = 1; + + mib[0] = CTL_HW; + mib[1] = HW_NCPU; + size_t len = sizeof(size_t); + if (sysctl(mib, 2, &value, &len, NULL, 0) >= 0) + if (value > nbcpu) + nbcpu = value; + return nbcpu; + } + #elif defined (__FreeBSD__) || defined (__FreeBSD_kernel__) + UInt32 GetNumberOfProcessors() { + int nbcpu = 1; + size_t value; + size_t len = sizeof(value); + if (sysctlbyname("hw.ncpu", &value, &len, NULL, 0) == 0) + nbcpu = value; + return nbcpu; + } + #elif defined (__APPLE__) + UInt32 GetNumberOfProcessors() { + int nbcpu = 1,value; + size_t valSize = sizeof(value); + if (sysctlbyname ("hw.ncpu", &value, &valSize, NULL, 0) == 0) + nbcpu = value; + return nbcpu; + } + + #elif defined(__linux__) || defined(__CYGWIN__) || defined(sun) + UInt32 GetNumberOfProcessors() { + int nbcpu = sysconf (_SC_NPROCESSORS_CONF); + if (nbcpu < 1) nbcpu = 1; + return nbcpu; + } + #elif defined(hpux) || defined(__hpux) + UInt32 GetNumberOfProcessors() { + struct pst_dynamic psd; + if (pstat_getdynamic(&psd, sizeof(psd), (size_t)1, 0) != -1) + return (UInt32)psd.psd_proc_cnt; + return 1; + } + #elif defined(__NETWARE__) + UInt32 GetNumberOfProcessors() { + // int nbcpu = get_nprocs_conf(); + int nbcpu = get_nprocs(); + if (nbcpu < 1) nbcpu = 1; + return nbcpu; + } + #elif defined(ENV_BEOS) + UInt32 GetNumberOfProcessors() { + system_info info; + get_system_info(&info); + int nbcpu = info.cpu_count; + if (nbcpu < 1) nbcpu = 1; + return nbcpu; + } + #else + #warning Generic GetNumberOfProcessors + UInt32 GetNumberOfProcessors() { + return 1; + } + #endif + + /************************ GetRamSize ************************/ + UInt64 GetRamSize() { + UInt64 ullTotalPhys = 128 * 1024 * 1024; // default : 128MB + +#ifdef linux + FILE * f = fopen( "/proc/meminfo", "r" ); + if (f) + { + char buffer[256]; + unsigned long total; + + ullTotalPhys = 0; + + while (fgets( buffer, sizeof(buffer), f )) + { + /* old style /proc/meminfo ... */ + if (sscanf( buffer, "Mem: %lu", &total)) + { + ullTotalPhys += total; + } + + /* new style /proc/meminfo ... */ + if (sscanf(buffer, "MemTotal: %lu", &total)) + ullTotalPhys = ((UInt64)total)*1024; + } + fclose( f ); + } +#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__NetBSD__) || defined(__APPLE__) +#ifdef HW_MEMSIZE + uint64_t val = 0; // support 2Gb+ RAM + int mib[2] = { CTL_HW, HW_MEMSIZE }; +#else // HW_MEMSIZE + unsigned int val = 0; // For old system + int mib[2] = { CTL_HW, HW_PHYSMEM }; +#endif // HW_MEMSIZE + size_t size_sys = sizeof(val); + + sysctl(mib, 2, &val, &size_sys, NULL, 0); + if (val) ullTotalPhys = val; +#elif defined(__CYGWIN__) + unsigned long pagesize=4096; // FIXME - sysconf(_SC_PAGESIZE) returns 65536 !? + // see http://readlist.com/lists/cygwin.com/cygwin/0/3313.html + unsigned long maxpages=sysconf(_SC_PHYS_PAGES); + ullTotalPhys = ((UInt64)pagesize)*maxpages; +#elif defined ( sun ) || defined(__NETWARE__) + unsigned long pagesize=sysconf(_SC_PAGESIZE); + unsigned long maxpages=sysconf(_SC_PHYS_PAGES); + ullTotalPhys = ((UInt64)pagesize)*maxpages; +#elif defined(hpux) || defined(__hpux) + struct pst_static pst; + union pstun pu; + + pu.pst_static = &pst; + if ( pstat( PSTAT_STATIC, pu, (size_t)sizeof(pst), (size_t)0, 0 ) != -1 ) { + ullTotalPhys = ((UInt64)pst.physical_memory)*pst.page_size; + } +#elif defined(ENV_BEOS) + system_info info; + get_system_info(&info); + ullTotalPhys = info.max_pages; + ullTotalPhys *= 4096; +#else +#warning Generic GetRamSize +#endif + return ullTotalPhys; + } + + } +} + diff --git a/CPP/Windows/System.h b/CPP/Windows/System.h new file mode 100644 index 0000000..e006715 --- /dev/null +++ b/CPP/Windows/System.h @@ -0,0 +1,16 @@ +// Windows/System.h + +#ifndef __WINDOWS_SYSTEM_H +#define __WINDOWS_SYSTEM_H + +#include "../Common/Types.h" + +namespace NWindows { +namespace NSystem { + +UInt32 GetNumberOfProcessors(); +UInt64 GetRamSize(); + +}} + +#endif diff --git a/CPP/Windows/Thread.h b/CPP/Windows/Thread.h new file mode 100644 index 0000000..ed72507 --- /dev/null +++ b/CPP/Windows/Thread.h @@ -0,0 +1,41 @@ +// Windows/Thread.h + +#ifndef __WINDOWS_THREAD_H +#define __WINDOWS_THREAD_H + +#include "Defs.h" + +extern "C" +{ +#include "../../C/Threads.h" +} + +namespace NWindows { + +class CThread +{ + ::CThread thread; +public: + CThread() { Thread_Construct(&thread); } + ~CThread() { Close(); } + bool IsCreated() { return Thread_WasCreated(&thread) != 0; } + WRes Close() { return Thread_Close(&thread); } + WRes Create(THREAD_FUNC_RET_TYPE (THREAD_FUNC_CALL_TYPE *startAddress)(void *), LPVOID parameter) + { return Thread_Create(&thread, startAddress, parameter); } + WRes Wait() { return Thread_Wait(&thread); } + + #ifdef _WIN32 + operator HANDLE() { return thread; } + void Attach(HANDLE handle) { thread = handle; } + HANDLE Detach() { HANDLE h = thread; thread = NULL; return h; } + DWORD Resume() { return ::ResumeThread(thread); } + DWORD Suspend() { return ::SuspendThread(thread); } + bool Terminate(DWORD exitCode) { return BOOLToBool(::TerminateThread(thread, exitCode)); } + int GetPriority() { return ::GetThreadPriority(thread); } + bool SetPriority(int priority) { return BOOLToBool(::SetThreadPriority(thread, priority)); } + #endif +}; + +} + +#endif diff --git a/CPP/Windows/Time.cpp b/CPP/Windows/Time.cpp new file mode 100644 index 0000000..dfa0938 --- /dev/null +++ b/CPP/Windows/Time.cpp @@ -0,0 +1,88 @@ +// Windows/Time.cpp + +#include "StdAfx.h" + +#include "Time.h" +#include "Windows/Defs.h" + +namespace NWindows { +namespace NTime { + +static const UInt32 kFileTimeStartYear = 1601; + +bool DosTimeToFileTime(UInt32 dosTime, FILETIME &fileTime) +{ + return BOOLToBool(::DosDateTimeToFileTime((UInt16)(dosTime >> 16), (UInt16)(dosTime & 0xFFFF), &fileTime)); +} + +static const UInt32 kHighDosTime = 0xFF9FBF7D; +static const UInt32 kLowDosTime = 0x210000; + +bool FileTimeToDosTime(const FILETIME &fileTime, UInt32 &dosTime) +{ + WORD datePart, timePart; + if (!::FileTimeToDosDateTime(&fileTime, &datePart, &timePart)) + { + dosTime = (fileTime.dwHighDateTime >= 0x01C00000) ? kHighDosTime : kLowDosTime; + return false; + } + dosTime = (((UInt32)datePart) << 16) + timePart; + return true; +} + +static const UInt32 kNumTimeQuantumsInSecond = 10000000; +static const UInt64 kUnixTimeStartValue = ((UInt64)kNumTimeQuantumsInSecond) * 60 * 60 * 24 * 134774; + +void UnixTimeToFileTime(UInt32 unixTime, FILETIME &fileTime) +{ + UInt64 v = kUnixTimeStartValue + ((UInt64)unixTime) * kNumTimeQuantumsInSecond; + fileTime.dwLowDateTime = (DWORD)v; + fileTime.dwHighDateTime = (DWORD)(v >> 32); +} + +bool FileTimeToUnixTime(const FILETIME &fileTime, UInt32 &unixTime) +{ + UInt64 winTime = (((UInt64)fileTime.dwHighDateTime) << 32) + fileTime.dwLowDateTime; + if (winTime < kUnixTimeStartValue) + { + unixTime = 0; + return false; + } + winTime = (winTime - kUnixTimeStartValue) / kNumTimeQuantumsInSecond; + if (winTime > 0xFFFFFFFF) + { + unixTime = 0xFFFFFFFF; + return false; + } + unixTime = (UInt32)winTime; + return true; +} + +bool GetSecondsSince1601(unsigned year, unsigned month, unsigned day, + unsigned hour, unsigned min, unsigned sec, UInt64 &resSeconds) +{ + resSeconds = 0; + if (year < kFileTimeStartYear || year >= 10000 || month < 1 || month > 12 || + day < 1 || day > 31 || hour > 23 || min > 59 || sec > 59) + return false; + UInt32 numYears = year - kFileTimeStartYear; + UInt32 numDays = numYears * 365 + numYears / 4 - numYears / 100 + numYears / 400; + Byte ms[] = { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 }; + if (year % 4 == 0 && (year % 100 != 0 || year % 400 == 0)) + ms[1] = 29; + month--; + for (unsigned i = 0; i < month; i++) + numDays += ms[i]; + numDays += day - 1; + resSeconds = ((UInt64)(numDays * 24 + hour) * 60 + min) * 60 + sec; + return true; +} + +void GetCurUtcFileTime(FILETIME &ft) +{ + SYSTEMTIME st; + GetSystemTime(&st); + SystemTimeToFileTime(&st, &ft); +} + +}} diff --git a/CPP/Windows/Time.h b/CPP/Windows/Time.h new file mode 100644 index 0000000..6f510b2 --- /dev/null +++ b/CPP/Windows/Time.h @@ -0,0 +1,21 @@ +// Windows/Time.h + +#ifndef __WINDOWS_TIME_H +#define __WINDOWS_TIME_H + +#include "Common/Types.h" + +namespace NWindows { +namespace NTime { + +bool DosTimeToFileTime(UInt32 dosTime, FILETIME &fileTime); +bool FileTimeToDosTime(const FILETIME &fileTime, UInt32 &dosTime); +void UnixTimeToFileTime(UInt32 unixTime, FILETIME &fileTime); +bool FileTimeToUnixTime(const FILETIME &fileTime, UInt32 &unixTime); +bool GetSecondsSince1601(unsigned year, unsigned month, unsigned day, + unsigned hour, unsigned min, unsigned sec, UInt64 &resSeconds); +void GetCurUtcFileTime(FILETIME &ft); + +}} + +#endif diff --git a/CPP/Windows/Window.cpp b/CPP/Windows/Window.cpp new file mode 100644 index 0000000..e92228c --- /dev/null +++ b/CPP/Windows/Window.cpp @@ -0,0 +1,101 @@ +// Windows/Window.cpp + +#include "StdAfx.h" + +// For compilers that support precompilation, includes "wx/wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +// for all others, include the necessary headers (this file is usually all you +// need because it includes almost all "standard" wxWidgets headers) +#ifndef WX_PRECOMP + #include "wx/wx.h" +#endif + +#undef _WIN32 + +#ifndef _UNICODE +#include "Common/StringConvert.h" +#endif +#include "Windows/Window.h" + +void verify_main_thread(void); + +class LockGUI +{ + bool _IsMain; + public: + LockGUI() { + verify_main_thread(); + + _IsMain = wxThread::IsMain(); + if (!_IsMain) { + printf("LockGUI-Windows\n"); + abort(); // FIXME wxMutexGuiEnter(); + } + } + ~LockGUI() { if (!_IsMain) wxMutexGuiLeave(); } +}; + +namespace NWindows { + +HWND GetDlgItem(HWND dialogWindow, int ControlID) +{ + LockGUI lock; + if (dialogWindow) return dialogWindow->FindWindow(ControlID); + return 0; +} + +void MySetWindowText(HWND wnd, LPCWSTR s) +{ + if (wnd == 0) return; + + LockGUI lock; + + wxString str = s; + /* + int id = wnd->GetId(); + if ( (id != wxID_OK) && (id != wxID_CANCEL) && (id != wxID_HELP) && (id != wxID_YES) && (id != wxID_NO)) + */ + { + wnd->SetLabel(str); + } +} + + bool CWindow::GetText(CSysString &s) + { + wxString str; + { + LockGUI lock; + str = _window->GetLabel(); + } + s = str; + return true; + } + + bool CWindow::IsEnabled() + { + LockGUI lock; + return _window->IsEnabled(); + } +} + +////////////////////////////////// Windows Compatibility +#include + +void Sleep(unsigned millisec) +{ + wxMilliSleep(millisec); +} + +t_processID GetCurrentProcess(void) { + return getpid(); +} + +void SetPriorityClass(t_processID pid , int priority) { + setpriority(PRIO_PROCESS,pid,priority); +} + diff --git a/CPP/Windows/Window.h b/CPP/Windows/Window.h new file mode 100644 index 0000000..1970fe6 --- /dev/null +++ b/CPP/Windows/Window.h @@ -0,0 +1,43 @@ +// Windows/Window.h + +#ifndef __WINDOWS_WINDOW_H +#define __WINDOWS_WINDOW_H + +#include "Windows/Defs.h" +#include "Common/MyString.h" + +namespace NWindows { + +HWND GetDlgItem(HWND dialogWindow, int ControlID); +void MySetWindowText(HWND wnd, LPCWSTR s); + +class CWindow +{ +private: + // bool ModifyStyleBase(int styleOffset, DWORD remove, DWORD add, UINT flags); +protected: + HWND _window; +public: + CWindow(HWND newWindow = NULL): _window(newWindow){}; + CWindow& operator=(HWND newWindow) + { + _window = newWindow; + return *this; + } + operator HWND() const { return _window; } + void Attach(HWND newWindow) { _window = newWindow; } + HWND Detach() + { + HWND window = _window; + _window = NULL; + return window; + } + virtual void SetText(LPCWSTR s) { MySetWindowText(_window, s); } + virtual bool GetText(CSysString &s); + bool IsEnabled(); +}; + +} + +#endif + diff --git a/CPP/include_windows/basetyps.h b/CPP/include_windows/basetyps.h new file mode 100644 index 0000000..d761e74 --- /dev/null +++ b/CPP/include_windows/basetyps.h @@ -0,0 +1,19 @@ +#ifndef _BASETYPS_H +#define _BASETYPS_H + +#ifdef ENV_HAVE_GCCVISIBILITYPATCH + #define DLLEXPORT __attribute__ ((visibility("default"))) + #else + #define DLLEXPORT + #endif + +#ifdef __cplusplus +#define STDAPI extern "C" DLLEXPORT HRESULT +#else +#define STDAPI extern DLLEXPORT HRESULT +#endif /* __cplusplus */ + +typedef GUID IID; +typedef GUID CLSID; +#endif + diff --git a/CPP/include_windows/tchar.h b/CPP/include_windows/tchar.h new file mode 100644 index 0000000..4aa1a4f --- /dev/null +++ b/CPP/include_windows/tchar.h @@ -0,0 +1,89 @@ +/* + * tchar.h + * + * Unicode mapping layer for the standard C library. By including this + * file and using the 't' names for string functions + * (eg. _tprintf) you can make code which can be easily adapted to both + * Unicode and non-unicode environments. In a unicode enabled compile define + * _UNICODE before including tchar.h, otherwise the standard non-unicode + * library functions will be used. + * + * Note that you still need to include string.h or stdlib.h etc. to define + * the appropriate functions. Also note that there are several defines + * included for non-ANSI functions which are commonly available (but using + * the convention of prepending an underscore to non-ANSI library function + * names). + * + * This file is part of the Mingw32 package. + * + * Contributors: + * Created by Colin Peters + * + * THIS SOFTWARE IS NOT COPYRIGHTED + * + * This source code is offered for use in the public domain. You may + * use, modify or distribute it freely. + * + * This code is distributed in the hope that it will be useful but + * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY + * DISCLAIMED. This includes but is not limited to warranties of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * $Revision: 1.11 $ + * $Author: earnie $ + * $Date: 2003/05/03 13:48:46 $ + * + */ + +#ifndef _TCHAR_H_ +#define _TCHAR_H_ + +/* All the headers include this file. */ +#ifndef __int64 +#define __int64 long long +#endif + +#ifndef __cdecl +#define __cdecl /* */ +#endif + +/* + * NOTE: This tests _UNICODE, which is different from the UNICODE define + * used to differentiate Win32 API calls. + */ +#ifdef _UNICODE + + +/* + * Use TCHAR instead of char or wchar_t. It will be appropriately translated + * if _UNICODE is correctly defined (or not). + */ +#ifndef _TCHAR_DEFINED +typedef wchar_t TCHAR; +#define _TCHAR_DEFINED +#endif + +/* + * Unicode functions + */ +/* +#define _tfopen _wfopen +FILE *_wfopen( const wchar_t *filename, const wchar_t *mode ); +*/ + +#else /* Not _UNICODE */ + +#define _tfopen fopen + +/* + * TCHAR, the type you should use instead of char. + */ +#ifndef _TCHAR_DEFINED +typedef char TCHAR; +#define _TCHAR_DEFINED +#endif + +#endif /* Not _UNICODE */ + +#endif /* Not _TCHAR_H_ */ + diff --git a/CPP/include_windows/windows.h b/CPP/include_windows/windows.h new file mode 100644 index 0000000..ef0ca3d --- /dev/null +++ b/CPP/include_windows/windows.h @@ -0,0 +1,194 @@ +/* + windows.h - main header file for the Win32 API + + Written by Anders Norlander + + This file is part of a free library for the Win32 API. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + +*/ +#ifndef _WINDOWS_H +#define _WINDOWS_H + +#include + +/* BEGIN #include */ + +#include "Common/MyWindows.h" // FIXED + +#ifndef CONST +#define CONST const +#endif + +#undef MAX_PATH +#define MAX_PATH 4096 /* Linux : 4096 - Windows : 260 */ + +#ifndef FALSE +#define FALSE 0 +#endif +#ifndef TRUE +#define TRUE 1 +#endif + +#define WINAPI + +#undef BOOL +typedef int BOOL; + +/* BEGIN #include */ +/* BEGIN */ +#define NO_ERROR 0L +#define ERROR_ALREADY_EXISTS EEXIST +#define ERROR_FILE_EXISTS EEXIST +#define ERROR_INVALID_HANDLE EBADF +#define ERROR_PATH_NOT_FOUND ENOENT +#define ERROR_DISK_FULL ENOSPC +#define ERROR_NO_MORE_FILES 0x100123 // FIXME + +/* see Common/WyWindows.h +#define S_OK ((HRESULT)0x00000000L) +#define S_FALSE ((HRESULT)0x00000001L) +#define E_INVALIDARG ((HRESULT)0x80070057L) +#define E_NOTIMPL ((HRESULT)0x80004001L) +#define E_NOINTERFACE ((HRESULT)0x80004002L) +#define E_ABORT ((HRESULT)0x80004004L) +#define E_FAIL ((HRESULT)0x80004005L) +#define E_OUTOFMEMORY ((HRESULT)0x8007000EL) +#define STG_E_INVALIDFUNCTION ((HRESULT)0x80030001L) +#define SUCCEEDED(Status) ((HRESULT)(Status) >= 0) +#define FAILED(Status) ((HRESULT)(Status)<0) +*/ +#ifndef VOID +#define VOID void +#endif +typedef void *PVOID,*LPVOID; +typedef WCHAR *LPWSTR; +typedef CHAR *LPSTR; +typedef TCHAR *LPTSTR; + +#ifdef UNICODE +/* + * P7ZIP_TEXT is a private macro whose specific use is to force the expansion of a + * macro passed as an argument to the macro TEXT. DO NOT use this + * macro within your programs. It's name and function could change without + * notice. + */ +#define P7ZIP_TEXT(q) L##q +#else +#define P7ZIP_TEXT(q) q +#endif +/* + * UNICODE a constant string when UNICODE is defined, else returns the string + * unmodified. + * The corresponding macros _TEXT() and _T() for mapping _UNICODE strings + * passed to C runtime functions are defined in mingw/tchar.h + */ +#define TEXT(q) P7ZIP_TEXT(q) + +typedef BYTE BOOLEAN; + +/* BEGIN #include */ +#ifndef __int64 +#define __int64 long long +#endif +typedef unsigned __int64 UINT64; +typedef __int64 INT64; +/* END #include */ + +#define FILE_ATTRIBUTE_READONLY 1 +#define FILE_ATTRIBUTE_HIDDEN 2 +#define FILE_ATTRIBUTE_SYSTEM 4 +#define FILE_ATTRIBUTE_DIRECTORY 16 +#define FILE_ATTRIBUTE_ARCHIVE 32 +#define FILE_ATTRIBUTE_DEVICE 64 +#define FILE_ATTRIBUTE_NORMAL 128 +#define FILE_ATTRIBUTE_TEMPORARY 256 +#define FILE_ATTRIBUTE_SPARSE_FILE 512 +#define FILE_ATTRIBUTE_REPARSE_POINT 1024 +#define FILE_ATTRIBUTE_COMPRESSED 2048 +#define FILE_ATTRIBUTE_OFFLINE 0x1000 +#define FILE_ATTRIBUTE_ENCRYPTED 0x4000 +#define FILE_ATTRIBUTE_UNIX_EXTENSION 0x8000 /* trick for Unix */ + +/* END */ + +#include +#include + +/* END #include */ + +/* END #include */ + +/* BEGIN #include */ + +#define WAIT_OBJECT_0 0 +#define INFINITE 0xFFFFFFFF + +typedef struct _SYSTEMTIME { + WORD wYear; + WORD wMonth; + WORD wDayOfWeek; + WORD wDay; + WORD wHour; + WORD wMinute; + WORD wSecond; + WORD wMilliseconds; +} SYSTEMTIME; + +#ifdef __cplusplus +extern "C" { +#endif + +BOOL WINAPI DosDateTimeToFileTime(WORD,WORD,FILETIME *); +BOOL WINAPI FileTimeToDosDateTime(CONST FILETIME *,WORD *, WORD *); +BOOL WINAPI FileTimeToLocalFileTime(CONST FILETIME *,FILETIME *); +BOOL WINAPI FileTimeToSystemTime(CONST FILETIME *,SYSTEMTIME *); +BOOL WINAPI LocalFileTimeToFileTime(CONST FILETIME *,FILETIME *); +VOID WINAPI GetSystemTime(SYSTEMTIME *); +BOOL WINAPI SystemTimeToFileTime(const SYSTEMTIME*,FILETIME *); + +DWORD WINAPI GetTickCount(VOID); + +#ifdef __cplusplus +} +#endif +/* END #include */ + +/* BEGIN #include */ + +#define CP_ACP 0 +#define CP_OEMCP 1 +#define CP_UTF8 65001 + +/* #include */ +#include +struct IEnumSTATPROPSTG; + +typedef struct tagSTATPROPSTG { + LPOLESTR lpwstrName; + PROPID propid; + VARTYPE vt; +} STATPROPSTG; + +#ifdef __cplusplus +extern "C" const IID IID_ISequentialStream; +struct ISequentialStream : public IUnknown +{ + STDMETHOD(QueryInterface)(REFIID,PVOID*) PURE; + STDMETHOD_(ULONG,AddRef)(void) PURE; + STDMETHOD_(ULONG,Release)(void) PURE; + STDMETHOD(Read)(void*,ULONG,ULONG*) PURE; + STDMETHOD(Write)(void const*,ULONG,ULONG*) PURE; +}; +#else +extern const IID IID_ISequentialStream; +#endif /* __cplusplus */ + + +/* END #include */ + +#endif + diff --git a/CPP/myWindows/StdAfx.h b/CPP/myWindows/StdAfx.h new file mode 100644 index 0000000..629529d --- /dev/null +++ b/CPP/myWindows/StdAfx.h @@ -0,0 +1,124 @@ +// stdafx.h + +#ifndef __STDAFX_H +#define __STDAFX_H + + +#include "config.h" + + +#define NO_INLINE /* FIXME */ + +#ifdef ENV_HAVE_PTHREAD +#include +#endif + +#include "Common/MyWindows.h" +#include "Common/Types.h" + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#ifdef __NETWARE__ +#include +#endif + +#undef CS /* fix for Solaris 10 x86 */ + + +/***************************/ + +#ifndef ENV_HAVE_WCHAR__H + +EXTERN_C_BEGIN + +size_t wcslen(const wchar_t *); +wchar_t *wcscpy(wchar_t * , const wchar_t * ); +wchar_t *wcscat(wchar_t * , const wchar_t * ); + +EXTERN_C_END + +#endif + +/***************************/ + +#define CLASS_E_CLASSNOTAVAILABLE ((HRESULT)0x80040111L) + +/************************* LastError *************************/ +inline DWORD WINAPI GetLastError(void) { return errno; } +inline void WINAPI SetLastError( DWORD err ) { errno = err; } + +#define AreFileApisANSI() (1) + +void Sleep(unsigned millisleep); + +typedef pid_t t_processID; + +t_processID GetCurrentProcess(void); + +#define NORMAL_PRIORITY_CLASS (0) +#define IDLE_PRIORITY_CLASS (10) +void SetPriorityClass(t_processID , int priority); + +#ifdef __cplusplus +class wxWindow; +typedef wxWindow *HWND; + +#define MB_ICONERROR (0x00000200) // wxICON_ERROR +#define MB_YESNOCANCEL (0x00000002 | 0x00000008 | 0x00000010) // wxYES | wxNO | wxCANCEL +#define MB_ICONQUESTION (0x00000400) // wxICON_QUESTION +#define MB_TASKMODAL (0) // FIXME +#define MB_SYSTEMMODAL (0) // FIXME + +#define MB_OK (0x00000004) // wxOK +#define MB_ICONSTOP (0x00000200) // wxICON_STOP +#define MB_OKCANCEL (0x00000004 | 0x00000010) // wxOK | wxCANCEL + +#define MessageBox MessageBoxW +int MessageBoxW(wxWindow * parent, const TCHAR * mes, const TCHAR * title,int flag); + +typedef void *HINSTANCE; + +typedef int INT_PTR; // FIXME 64 bits ? +typedef unsigned int UINT_PTR; // FIXME 64 bits ? +typedef long LONG_PTR; // FIXME 64 bits ? +typedef long DWORD_PTR; // FIXME 64 bits ? +typedef UINT_PTR WPARAM; + +/* WARNING + LPARAM shall be 'long' because of CListView::SortItems and wxListCtrl::SortItems : +*/ +typedef LONG_PTR LPARAM; +typedef LONG_PTR LRESULT; + +#define CALLBACK /* */ + +/************ LANG ***********/ +typedef WORD LANGID; + +LANGID GetUserDefaultLangID(void); +LANGID GetSystemDefaultLangID(void); + +#define PRIMARYLANGID(l) ((WORD)(l) & 0x3ff) +#define SUBLANGID(l) ((WORD)(l) >> 10) + +#if defined( __x86_64__ ) + +#define _WIN64 1 + +#endif + +#endif + +#endif + diff --git a/CPP/myWindows/config.h b/CPP/myWindows/config.h new file mode 100644 index 0000000..54332aa --- /dev/null +++ b/CPP/myWindows/config.h @@ -0,0 +1,67 @@ + +#if !defined(__DJGPP__) + +#ifndef __CYGWIN__ + #define FILESYSTEM_IS_CASE_SENSITIVE 1 +#endif + + #if !defined(ENV_MACOSX) && !defined(ENV_BEOS) + + /* */ + /* ENV_HAVE_WCHAR__H and not ENV_HAVE_WCHAR_H to avoid warning with wxWidgets */ + #define ENV_HAVE_WCHAR__H + + /* */ + #define ENV_HAVE_WCTYPE_H + + /* mbrtowc */ +/* #ifndef __hpux */ +/* #define ENV_HAVE_MBRTOWC */ +/* #endif */ + + /* towupper */ + #define ENV_HAVE_TOWUPPER + + #endif /* !ENV_MACOSX && !ENV_BEOS */ + + #if !defined(ENV_BEOS) + #define ENV_HAVE_GETPASS + + #if !defined(sun) + #define ENV_HAVE_TIMEGM + #endif + + + #endif + + /* lstat, readlink and S_ISLNK */ + #define ENV_HAVE_LSTAT + + /* */ + #define ENV_HAVE_LOCALE + + /* mbstowcs */ + #define ENV_HAVE_MBSTOWCS + + /* wcstombs */ + #define ENV_HAVE_WCSTOMBS + +#endif /* !__DJGPP__ */ + +#ifndef ENV_BEOS +#define ENV_HAVE_PTHREAD +#endif + +#if defined(ENV_MACOSX) +#define LOCALE_IS_UTF8 +#endif + +#ifdef LOCALE_IS_UTF8 +#undef ENV_HAVE_LOCALE +#undef ENV_HAVE_MBSTOWCS +#undef ENV_HAVE_WCSTOMBS +/* #undef ENV_HAVE_MBRTOWC */ +#endif + +#define MAX_PATHNAME_LEN 1024 + diff --git a/CPP/myWindows/initguid.h b/CPP/myWindows/initguid.h new file mode 100644 index 0000000..f7580d5 --- /dev/null +++ b/CPP/myWindows/initguid.h @@ -0,0 +1,4 @@ +// initguid.h + +#include "Common/MyInitGuid.h" + diff --git a/CPP/myWindows/makefile b/CPP/myWindows/makefile new file mode 100644 index 0000000..1d694c1 --- /dev/null +++ b/CPP/myWindows/makefile @@ -0,0 +1,21 @@ +PROG=test_emul + +LOCAL_FLAGS=-I. -I.. -I../include_windows -DUNICODE -D_UNICODE + +include ../../makefile.crc32 +include ../../makefile.machine + +LIBS=$(LOCAL_LIBS) + +OBJS=myGetTickCount.o \ + wine_date_and_time.o \ + mySplitCommandLine.o \ + myAddExeFlag.o \ + wine_GetXXXDefaultLangID.o \ + test_emul.o \ + MyVector.o \ + MyString.o \ + MyWindows.o + +include ../../makefile.glb + diff --git a/CPP/myWindows/makefile.depend b/CPP/myWindows/makefile.depend new file mode 100644 index 0000000..b14d6a3 --- /dev/null +++ b/CPP/myWindows/makefile.depend @@ -0,0 +1,32 @@ +myGetTickCount.o: myGetTickCount.cpp StdAfx.h config.h \ + ../Common/MyWindows.h ../Common/MyGuidDef.h ../Common/Types.h +mySplitCommandLine.o: mySplitCommandLine.cpp StdAfx.h config.h \ + ../Common/MyWindows.h ../Common/MyGuidDef.h ../Common/Types.h \ + ../Common/StringConvert.h ../Common/MyString.h ../Common/MyVector.h \ + ../Common/Defs.h myPrivate.h +myAddExeFlag.o: myAddExeFlag.cpp StdAfx.h config.h \ + ../Common/MyWindows.h ../Common/MyGuidDef.h ../Common/Types.h \ + myPrivate.h ../Common/StringConvert.h ../Common/MyString.h \ + ../Common/MyVector.h ../Common/Defs.h +test_emul.o: test_emul.cpp StdAfx.h config.h ../Common/MyWindows.h \ + ../Common/MyGuidDef.h ../Common/Types.h ../Common/StringConvert.h \ + ../Common/MyString.h ../Common/MyVector.h ../Common/Defs.h \ + ../Common/StdOutStream.h ../Common/StringConvert.cpp \ + ../Common/UTFConvert.cpp ../Common/UTFConvert.h \ + ../Common/StdOutStream.cpp ../Common/IntToString.h \ + ../Common/IntToString.cpp ../Windows/Synchronization.cpp \ + ../Windows/Synchronization.h ../Windows/Defs.h \ + ../Windows/../../C/Threads.h ../Windows/../../C/Types.h \ + ../Windows/FileFind.cpp ../Windows/FileFind.h \ + ../Windows/../Common/MyString.h ../Windows/FileName.h \ + ../Windows/../Common/StringConvert.h myPrivate.h +wine_date_and_time.o: wine_date_and_time.cpp config.h +MyVector.o: ../Common/MyVector.cpp StdAfx.h config.h \ + ../Common/MyWindows.h ../Common/MyGuidDef.h ../Common/Types.h \ + ../Common/MyVector.h ../Common/Defs.h +MyString.o: ../Common/MyString.cpp StdAfx.h config.h \ + ../Common/MyWindows.h ../Common/MyGuidDef.h ../Common/Types.h \ + ../Common/StringConvert.h ../Common/MyString.h ../Common/MyVector.h \ + ../Common/Defs.h myPrivate.h +MyWindows.o: ../Common/MyWindows.cpp StdAfx.h config.h \ + ../Common/MyWindows.h ../Common/MyGuidDef.h ../Common/Types.h diff --git a/CPP/myWindows/makefile.list b/CPP/myWindows/makefile.list new file mode 100644 index 0000000..7d6ef19 --- /dev/null +++ b/CPP/myWindows/makefile.list @@ -0,0 +1,28 @@ +SRCS=myGetTickCount.cpp \ + mySplitCommandLine.cpp \ + myAddExeFlag.cpp \ + test_emul.cpp \ + wine_date_and_time.cpp \ + wine_GetXXXDefaultLangID.cpp \ + ../Common/MyVector.cpp \ + ../Common/MyString.cpp \ + ../Common/MyWindows.cpp + +mySplitCommandLine.o : mySplitCommandLine.cpp + $(CXX) $(CXXFLAGS) mySplitCommandLine.cpp +myAddExeFlag.o : myAddExeFlag.cpp + $(CXX) $(CXXFLAGS) myAddExeFlag.cpp +myGetTickCount.o : myGetTickCount.cpp + $(CXX) $(CXXFLAGS) myGetTickCount.cpp +test_emul.o : test_emul.cpp + $(CXX) $(CXXFLAGS) test_emul.cpp +wine_date_and_time.o : wine_date_and_time.cpp + $(CXX) $(CXXFLAGS) wine_date_and_time.cpp +wine_GetXXXDefaultLangID.o : wine_GetXXXDefaultLangID.cpp + $(CXX) $(CXXFLAGS) wine_GetXXXDefaultLangID.cpp +MyVector.o : ../Common/MyVector.cpp + $(CXX) $(CXXFLAGS) ../Common/MyVector.cpp +MyString.o : ../Common/MyString.cpp + $(CXX) $(CXXFLAGS) ../Common/MyString.cpp +MyWindows.o : ../Common/MyWindows.cpp + $(CXX) $(CXXFLAGS) ../Common/MyWindows.cpp diff --git a/CPP/myWindows/myAddExeFlag.cpp b/CPP/myWindows/myAddExeFlag.cpp new file mode 100644 index 0000000..6bdc34a --- /dev/null +++ b/CPP/myWindows/myAddExeFlag.cpp @@ -0,0 +1,20 @@ +#include "StdAfx.h" + +#include +#include + +#include + +#define NEED_NAME_WINDOWS_TO_UNIX +#include "myPrivate.h" + +#include "Common/StringConvert.h" + +void myAddExeFlag(const UString &u_name) +{ + AString filename = UnicodeStringToMultiByte(u_name, CP_ACP); // FIXME + const char * name = nameWindowToUnix(filename); + // printf("myAddExeFlag(%s)\n",name); + chmod(name,0700); +} + diff --git a/CPP/myWindows/myGetTickCount.cpp b/CPP/myWindows/myGetTickCount.cpp new file mode 100644 index 0000000..6a6080b --- /dev/null +++ b/CPP/myWindows/myGetTickCount.cpp @@ -0,0 +1,8 @@ +#include "StdAfx.h" + +#include + +DWORD WINAPI GetTickCount(VOID) { + return (DWORD)time(0); // FIXME : but only for the seed of the random generator +} + diff --git a/CPP/myWindows/myPrivate.h b/CPP/myWindows/myPrivate.h new file mode 100644 index 0000000..73739d0 --- /dev/null +++ b/CPP/myWindows/myPrivate.h @@ -0,0 +1,17 @@ + +void WINAPI RtlSecondsSince1970ToFileTime( DWORD Seconds, FILETIME * ft ); + +extern "C" int global_use_utf16_conversion; +#ifdef ENV_HAVE_LSTAT +extern "C" int global_use_lstat; +#endif + +const char *my_getlocale(void); + +#ifdef NEED_NAME_WINDOWS_TO_UNIX +static inline const char * nameWindowToUnix(const char * lpFileName) { + if ((lpFileName[0] == 'c') && (lpFileName[1] == ':')) return lpFileName+2; + return lpFileName; +} +#endif + diff --git a/CPP/myWindows/mySplitCommandLine.cpp b/CPP/myWindows/mySplitCommandLine.cpp new file mode 100644 index 0000000..9e07919 --- /dev/null +++ b/CPP/myWindows/mySplitCommandLine.cpp @@ -0,0 +1,82 @@ +#include "StdAfx.h" + +#include "../Common/StringConvert.h" + +#include "myPrivate.h" + +#ifdef ENV_HAVE_LOCALE +#include +#endif + +extern void my_windows_split_path(const AString &p_path, AString &dir , AString &base); + +void mySplitCommandLine(int numArguments,const char *arguments[],UStringVector &parts) { + + { // define P7ZIP_HOME_DIR + static char p7zip_home_dir[MAX_PATH]; + AString dir,name; + my_windows_split_path(arguments[0],dir,name); + snprintf(p7zip_home_dir,sizeof(p7zip_home_dir),"P7ZIP_HOME_DIR=%s/",(const char *)dir); + p7zip_home_dir[sizeof(p7zip_home_dir)-1] = 0; + putenv(p7zip_home_dir); + } + +#ifdef ENV_HAVE_LOCALE + // set the program's current locale from the user's environment variables + setlocale(LC_ALL,""); + + + // auto-detect which conversion p7zip should use + char *locale = setlocale(LC_CTYPE,0); + if (locale) { + size_t len = strlen(locale); + char *locale_upper = (char *)malloc(len+1); + if (locale_upper) { + strcpy(locale_upper,locale); + + for(size_t i=0;i +#include +#include +#include +#include +#include + +#ifdef __APPLE_CC__ +#define UInt32 macUIn32 +#include +#undef UInt32 +#endif + +#ifdef ENV_HAVE_WCHAR__H +#include +#endif +#ifdef ENV_HAVE_LOCALE +#include +#endif + +#include + +#define NEED_NAME_WINDOWS_TO_UNIX +// #include "myPrivate.h" + +#include "Common/StringConvert.h" +#include "Common/StdOutStream.h" + +#undef NDEBUG +#include + +#include "Common/StringConvert.cpp" +#include "Common/StdOutStream.cpp" +#include "Common/IntToString.cpp" + +#include "Windows/Synchronization.cpp" +#include "Windows/FileFind.cpp" +#include "Windows/Time.cpp" +#include "../C/Threads.c" +#include "../../C/Ppmd.h" + +using namespace NWindows; + +#if defined(ENV_HAVE_WCHAR__H) && defined(ENV_HAVE_MBSTOWCS) && defined(ENV_HAVE_WCSTOMBS) +void test_mbs(void) { + wchar_t wstr1[256] = { + L'e', + 0xE8, // latin small letter e with grave + 0xE9, // latin small letter e with acute + L'a', + 0xE0, // latin small letter a with grave + 0x20AC, // euro sign + L'b', + 0 }; + wchar_t wstr2[256]; + char astr[256]; + + global_use_utf16_conversion = 1; + + size_t len1 = wcslen(wstr1); + + printf("wstr1 - %d - '%ls'\n",(int)len1,wstr1); + + size_t len0 = wcstombs(astr,wstr1,sizeof(astr)); + printf("astr - %d - '%s'\n",(int)len0,astr); + + size_t len2 = mbstowcs(wstr2,astr,sizeof(wstr2)/sizeof(*wstr2)); + printf("wstr - %d - '%ls'\n",(int)len2,wstr2); + + if (wcscmp(wstr1,wstr2) != 0) { + printf("ERROR during conversions wcs -> mbs -> wcs\n"); + exit(EXIT_FAILURE); + } + + char *ptr = astr; + size_t len = 0; + while (*ptr) { + ptr = CharNextA(ptr); + len += 1; + } + if ((len != len1) && (len != 12)) { // 12 = when locale is UTF8 instead of ISO8859-15 + printf("ERROR CharNextA : len=%d, len1=%d\n",(int)len,(int)len1); + exit(EXIT_FAILURE); + } + + UString ustr(wstr1); + assert(ustr.Length() == (int)len1); + + AString ansistr(astr); + assert(ansistr.Length() == (int)len0); + + ansistr = UnicodeStringToMultiByte(ustr); + assert(ansistr.Length() == (int)len0); + + assert(strcmp(ansistr,astr) == 0); + assert(wcscmp(ustr,wstr1) == 0); + + UString ustr2 = MultiByteToUnicodeString(astr); + assert(ustr2.Length() == (int)len1); + assert(wcscmp(ustr2,wstr1) == 0); +} +#endif + +static void test_astring(int num) { + AString strResult; + + strResult = "first part : "; + char number[256]; + sprintf(number,"%d",num); + strResult += AString(number); + + strResult += " : last part"; + + printf("strResult -%s-\n",(const char *)strResult); + +} + + +extern void my_windows_split_path(const AString &p_path, AString &dir , AString &base); + +static struct { + const char *path; + const char *dir; + const char *base; +} +tabSplit[]= + { + { "",".","." }, + { "/","/","/" }, + { ".",".","." }, + { "//","/","/" }, + { "///","/","/" }, + { "dir",".","dir" }, + { "/dir","/","dir" }, + { "/dir/","/","dir" }, + { "/dir/base","/dir","base" }, + { "/dir//base","/dir","base" }, + { "/dir///base","/dir","base" }, + { "//dir/base","//dir","base" }, + { "///dir/base","///dir","base" }, + { "/dir/base/","/dir","base" }, + { 0,0,0 } + }; + +static void test_split_astring() { + int ind = 0; + while (tabSplit[ind].path) { + AString path(tabSplit[ind].path); + AString dir; + AString base; + + my_windows_split_path(path,dir,base); + + if ((dir != tabSplit[ind].dir) || (base != tabSplit[ind].base)) { + printf("ERROR : '%s' '%s' '%s'\n",(const char *)path,(const char *)dir,(const char *)base); + } + ind++; + } + printf("test_split_astring : done\n"); +} + + // Number of 100 nanosecond units from 1/1/1601 to 1/1/1970 +#define EPOCH_BIAS 116444736000000000LL +static LARGE_INTEGER UnixTimeToUL(time_t tps_unx) +{ + LARGE_INTEGER ul; + ul.QuadPart = tps_unx * 10000000LL + EPOCH_BIAS; + return ul; +} + +static LARGE_INTEGER FileTimeToUL(FILETIME fileTime) +{ + LARGE_INTEGER lFileTime; + lFileTime.QuadPart = fileTime.dwHighDateTime; + lFileTime.QuadPart = (lFileTime.QuadPart << 32) | fileTime.dwLowDateTime; + return lFileTime; +} + +static void display(const char *txt,SYSTEMTIME systime) +{ + FILETIME fileTime; + BOOL ret = SystemTimeToFileTime(&systime,&fileTime); + assert(ret == TRUE); + LARGE_INTEGER ulFileTime = FileTimeToUL(fileTime); + + const char * day=""; + switch (systime.wDayOfWeek) + { + case 0:day = "Sunday";break; + case 1:day = "Monday";break; + case 2:day = "Tuesday";break; + case 3:day = "Wednesday";break; + case 4:day = "Thursday";break; + case 5:day = "Friday";break; + case 6:day = "Saturday";break; + } + g_StdOut<< txt << day << " " + << (int)systime.wYear << "/" << (int)systime.wMonth << "/" << (int)systime.wDay << " " + << (int)systime.wHour << ":" << (int)systime.wMinute << ":" << (int)systime.wSecond << ":" + << (int)systime.wMilliseconds + << " (" << (UInt64)ulFileTime.QuadPart << ")\n"; +} + +static void test_time() +{ + time_t tps_unx = time(0); + + printf("Test Time (1):\n"); + printf("===========\n"); + SYSTEMTIME systimeGM; + GetSystemTime(&systimeGM); + + LARGE_INTEGER ul = UnixTimeToUL(tps_unx); + g_StdOut<<" unix time = " << (UInt64)tps_unx << " (" << (UInt64)ul.QuadPart << ")\n"; + + g_StdOut<<" gmtime : " << asctime(gmtime(&tps_unx))<<"\n"; + g_StdOut<<" localtime : " << asctime(localtime(&tps_unx))<<"\n"; + + display(" GetSystemTime : ", systimeGM); +} + +static void test_time2() +{ + UInt32 dosTime = 0x30d0094C; + FILETIME utcFileTime; + FILETIME localFileTime; + FILETIME localFileTime2; + UInt32 dosTime2 = 0; + + printf("Test Time (2):\n"); + printf("===========\n"); + NTime::DosTimeToFileTime(dosTime, localFileTime); + NTime::FileTimeToDosTime(localFileTime, dosTime2); + assert(dosTime == dosTime2); + + printf("Test Time (3):\n"); + printf("===========\n"); + /* DosTime To utcFileTime */ + + if (NTime::DosTimeToFileTime(dosTime, localFileTime)) /* DosDateTimeToFileTime */ + { + if (!LocalFileTimeToFileTime(&localFileTime, &utcFileTime)) + utcFileTime.dwHighDateTime = utcFileTime.dwLowDateTime = 0; + } + + printf(" - 0x%x => 0x%x 0x%x => 0x%x 0x%x\n",(unsigned)dosTime, + (unsigned)localFileTime.dwHighDateTime,(unsigned)localFileTime.dwLowDateTime, + (unsigned)utcFileTime.dwHighDateTime,(unsigned)utcFileTime.dwLowDateTime); + + + /* utcFileTime to DosTime */ + + FileTimeToLocalFileTime(&utcFileTime, &localFileTime2); + NTime::FileTimeToDosTime(localFileTime2, dosTime2); /* FileTimeToDosDateTime */ + + printf(" - 0x%x <= 0x%x 0x%x <= 0x%x 0x%x\n",(unsigned)dosTime2, + (unsigned)localFileTime2.dwHighDateTime,(unsigned)localFileTime2.dwLowDateTime, + (unsigned)utcFileTime.dwHighDateTime,(unsigned)utcFileTime.dwLowDateTime); + + assert(dosTime == dosTime2); + assert(localFileTime.dwHighDateTime == localFileTime2.dwHighDateTime); + assert(localFileTime.dwLowDateTime == localFileTime2.dwLowDateTime); +} + +static void test_semaphore() +{ + g_StdOut << "\nTEST SEMAPHORE :\n"; + + NWindows::NSynchronization::CSynchro sync; + NWindows::NSynchronization::CSemaphoreWFMO sema; + bool bres; + DWORD waitResult; + int i; + + sync.Create(); + sema.Create(&sync,2,10); + + g_StdOut << " - Release(1)\n"; + for(i = 0 ;i < 8;i++) + { + // g_StdOut << " - Release(1) : "<< i << "\n"; + bres = sema.Release(1); + assert(bres == S_OK); + } + // g_StdOut << " - Release(1) : done\n"; + bres = sema.Release(1); + assert(bres == S_FALSE); + + g_StdOut << " - WaitForMultipleObjects(INFINITE)\n"; + HANDLE events[1] = { sema }; + for(i=0;i<10;i++) + { + waitResult = ::WaitForMultipleObjects(1, events, FALSE, INFINITE); + assert(waitResult == WAIT_OBJECT_0); + } + + g_StdOut << " Done\n"; +} + + +/****************************************************************************************/ + + +static int threads_count = 0; + +static THREAD_FUNC_RET_TYPE thread_fct(void * /* param */ ) { + threads_count++; + return 0; +} + +#define MAX_THREADS 100000 + +int test_thread(void) { + ::CThread thread; + + Thread_Construct(&thread); + + threads_count = 0; + + printf("test_thread : %d threads\n",MAX_THREADS); + + for(int i=0;i +#include +#include +#include +#include +#include + +#ifdef __APPLE__ +#define UInt32 mac_UInt32 +#include +#undef UInt32 +#endif // __APPLE__ + + +// #define TRACE printf + +typedef DWORD LCID; +typedef void * ULONG_PTR; /* typedef unsigned long ULONG_PTR; */ + +#define SORT_DEFAULT 0x0 + +#define LANG_NEUTRAL 0x00 +#define LANG_ENGLISH 0x09 + +#define SUBLANG_DEFAULT 0x01 /* user default */ + +#define MAKELCID(l, s) ( (l & 0xFFFF) | ((s & 0xFFFF)<<16)) +#define MAKELANGID(p, s) ((((WORD)(s))<<10) | (WORD)(p)) + +#define LANGIDFROMLCID(lcid) ((WORD)(lcid)) + +static LCID lcid_LC_MESSAGES = 0; +static LCID lcid_LC_CTYPE = 0; + +struct locale_name +{ + WCHAR win_name[128]; /* Windows name ("en-US") */ + WCHAR lang[128]; /* language ("en") (note: buffer contains the other strings too) */ + WCHAR *country; /* country ("US") */ + WCHAR *charset; /* charset ("UTF-8") for Unix format only */ + WCHAR *script; /* script ("Latn") for Windows format only */ + WCHAR *modifier; /* modifier or sort order */ + LCID lcid; /* corresponding LCID */ + int matches; /* number of elements matching LCID (0..4) */ + UINT codepage; /* codepage corresponding to charset */ +}; +#define WINE_UNICODE_INLINE static + +/***********************************************************/ +typedef struct { + const WCHAR * LOCALE_SNAME; + const WCHAR * LOCALE_SISO639LANGNAME; + const WCHAR * LOCALE_SISO3166CTRYNAME; + unsigned int LOCALE_IDEFAULTUNIXCODEPAGE; + unsigned int LOCALE_ILANGUAGE; +} t_info; + +static t_info g_langInfo[] = { + { L"af-ZA" , L"af" , L"ZA" , 28591 , 0x0436 }, /* afk.nls */ + { L"ar-SA" , L"ar" , L"SA" , 28596 , 0x0401 }, /* ara.nls */ + { L"ar-LB" , L"ar" , L"LB" , 28596 , 0x3001 }, /* arb.nls */ + { L"ar-EG" , L"ar" , L"EG" , 28596 , 0x0c01 }, /* are.nls */ + { L"ar-DZ" , L"ar" , L"DZ" , 28596 , 0x1401 }, /* arg.nls */ + { L"ar-BH" , L"ar" , L"BH" , 28596 , 0x3c01 }, /* arh.nls */ + { L"ar-IQ" , L"ar" , L"IQ" , 28596 , 0x0801 }, /* ari.nls */ + { L"ar-JO" , L"ar" , L"JO" , 28596 , 0x2c01 }, /* arj.nls */ + { L"ar-KW" , L"ar" , L"KW" , 28596 , 0x3401 }, /* ark.nls */ + { L"ar-LY" , L"ar" , L"LY" , 28596 , 0x1001 }, /* arl.nls */ + { L"ar-MA" , L"ar" , L"MA" , 28596 , 0x1801 }, /* arm.nls */ + { L"ar-OM" , L"ar" , L"OM" , 28596 , 0x2001 }, /* aro.nls */ + { L"ar-QA" , L"ar" , L"QA" , 28596 , 0x4001 }, /* arq.nls */ + { L"ar-SY" , L"ar" , L"SY" , 28596 , 0x2801 }, /* ars.nls */ + { L"ar-TN" , L"ar" , L"TN" , 28596 , 0x1c01 }, /* art.nls */ + { L"ar-AE" , L"ar" , L"AE" , 28596 , 0x3801 }, /* aru.nls */ + { L"ar-YE" , L"ar" , L"YE" , 28596 , 0x2401 }, /* ary.nls */ + { L"az-AZ" , L"az" , L"AZ" , 28595 , 0x082c }, /* aze.nls */ + { L"az-Latn-AZ" , L"az" , L"AZ" , 28599 , 0x042c }, /* azl.nls */ + { L"be-BY" , L"be" , L"BY" , 1251 , 0x0423 }, /* bel.nls */ + { L"bg-BG" , L"bg" , L"BG" , 1251 , 0x0402 }, /* bgr.nls */ + { L"br-FR" , L"br" , L"FR" , 28605 , 0x0493 }, /* brf.nls */ + { L"ca-ES" , L"ca" , L"ES" , 28605 , 0x0403 }, /* cat.nls */ + { L"zh-CN" , L"zh" , L"CN" , 936 , 0x0804 }, /* chs.nls */ + { L"zh-TW" , L"zh" , L"TW" , 950 , 0x0404 }, /* cht.nls */ + { L"kw-GB" , L"kw" , L"GB" , 28605 , 0x04891 }, /* cor.nls */ + { L"cs-CZ" , L"cs" , L"CZ" , 28592 , 0x0405 }, /* csy.nls */ + { L"cy-GB" , L"cy" , L"GB" , 28604 , 0x0492 }, /* cym.nls */ + { L"da-DK" , L"da" , L"DK" , 28605 , 0x0406 }, /* dan.nls */ + { L"de-AT" , L"de" , L"AT" , 28605 , 0x0c07 }, /* dea.nls */ + { L"de-LI" , L"de" , L"LI" , 28605 , 0x1407 }, /* dec.nls */ + { L"de-LU" , L"de" , L"LU" , 28605 , 0x1007 }, /* del.nls */ + { L"de-CH" , L"de" , L"CH" , 28605 , 0x0807 }, /* des.nls */ + { L"de-DE" , L"de" , L"DE" , 28605 , 0x0407 }, /* deu.nls */ + { L"dv-MV" , L"dv" , L"MV" , 65001 , 0x0465 }, /* div.nls */ + { L"el-GR" , L"el" , L"GR" , 28597 , 0x0408 }, /* ell.nls */ + { L"en-AU" , L"en" , L"AU" , 28591 , 0x0c09 }, /* ena.nls */ + { L"en-CB" , L"en" , L"CB" , 28591 , 0x2409 }, /* enb.nls */ + { L"en-CA" , L"en" , L"CA" , 28591 , 0x1009 }, /* enc.nls */ + { L"en-GB" , L"en" , L"GB" , 28605 , 0x0809 }, /* eng.nls */ + { L"en-IE" , L"en" , L"IE" , 28605 , 0x1809 }, /* eni.nls */ + { L"en-JM" , L"en" , L"JM" , 28591 , 0x2009 }, /* enj.nls */ + { L"en-BZ" , L"en" , L"BZ" , 28591 , 0x2809 }, /* enl.nls */ + { L"en-PH" , L"en" , L"PH" , 28591 , 0x3409 }, /* enp.nls */ + { L"en-ZA" , L"en" , L"ZA" , 28591 , 0x1c09 }, /* ens.nls */ + { L"en-TT" , L"en" , L"TT" , 28591 , 0x2c09 }, /* ent.nls */ + { L"en-US" , L"en" , L"US" , 28591 , 0x0409 }, /* enu.nls */ + { L"en-ZW" , L"en" , L"ZW" , 28591 , 0x3009 }, /* enw.nls */ + { L"en-NZ" , L"en" , L"NZ" , 28591 , 0x1409 }, /* enz.nls */ + { L"eo" , L"eo" , L"" , 65001 , 0x048f }, /* eox.nls */ + { L"es-PA" , L"es" , L"PA" , 28591 , 0x180a }, /* esa.nls */ + { L"es-BO" , L"es" , L"BO" , 28591 , 0x400a }, /* esb.nls */ + { L"es-CR" , L"es" , L"CR" , 28591 , 0x140a }, /* esc.nls */ + { L"es-DO" , L"es" , L"DO" , 28591 , 0x1c0a }, /* esd.nls */ + { L"es-SV" , L"es" , L"SV" , 28591 , 0x440a }, /* ese.nls */ + { L"es-EC" , L"es" , L"EC" , 28591 , 0x300a }, /* esf.nls */ + { L"es-GT" , L"es" , L"GT" , 28591 , 0x100a }, /* esg.nls */ + { L"es-HN" , L"es" , L"HN" , 28591 , 0x480a }, /* esh.nls */ + { L"es-NI" , L"es" , L"NI" , 28591 , 0x4c0a }, /* esi.nls */ + { L"es-C" , L"es" , L"C" , 28591 , 0x340a }, /* esl.nls */ + { L"es-MX" , L"es" , L"MX" , 28591 , 0x080a }, /* esm.nls */ + { L"es-ES_modern" , L"es" , L"ES" , 28605 , 0x0c0a }, /* esn.nls */ + { L"es-CO" , L"es" , L"CO" , 28591 , 0x240a }, /* eso.nls */ + { L"es-ES" , L"es" , L"ES" , 28605 , 0x040a }, /* esp.nls */ + { L"es-PE" , L"es" , L"PE" , 28591 , 0x280a }, /* esr.nls */ + { L"es-AR" , L"es" , L"AR" , 28591 , 0x2c0a }, /* ess.nls */ + { L"es-PR" , L"es" , L"PR" , 28591 , 0x500a }, /* esu.nls */ + { L"es-VE" , L"es" , L"VE" , 28591 , 0x200a }, /* esv.nls */ + { L"es-UY" , L"es" , L"UY" , 28591 , 0x380a }, /* esy.nls */ + { L"es-PY" , L"es" , L"PY" , 28591 , 0x3c0a }, /* esz.nls */ + { L"et-EE" , L"et" , L"EE" , 28605 , 0x0425 }, /* eti.nls */ + { L"eu-ES" , L"eu" , L"ES" , 28605 , 0x042d }, /* euq.nls */ + { L"fa-IR" , L"fa" , L"IR" , 65001 , 0x0429 }, /* far.nls */ + { L"fi-FI" , L"fi" , L"FI" , 28605 , 0x040b }, /* fin.nls */ + { L"fo-FO" , L"fo" , L"FO" , 28605 , 0x0438 }, /* fos.nls */ + { L"fr-FR" , L"fr" , L"FR" , 28605 , 0x040c }, /* fra.nls */ + { L"fr-BE" , L"fr" , L"BE" , 28605 , 0x080c }, /* frb.nls */ + { L"fr-CA" , L"fr" , L"CA" , 28591 , 0x0c0c }, /* frc.nls */ + { L"fr-LU" , L"fr" , L"LU" , 28605 , 0x140c }, /* frl.nls */ + { L"fr-MC" , L"fr" , L"MC" , 28605 , 0x180c }, /* frm.nls */ + { L"fr-CH" , L"fr" , L"CH" , 28605 , 0x100c }, /* frs.nls */ + { L"ga-IE" , L"ga" , L"IE" , 28605 , 0x043c }, /* gae.nls */ + { L"gd-GB" , L"gd" , L"GB" , 28605 , 0x083c }, /* gdh.nls */ + { L"gv-GB" , L"gv" , L"GB" , 28605 , 0x0c3c }, /* gdv.nls */ + { L"gl-ES" , L"gl" , L"ES" , 28605 , 0x0456 }, /* glc.nls */ + { L"gu-IN" , L"gu" , L"IN" , 65001 , 0x0447 }, /* guj.nls */ + { L"he-I" , L"he" , L"I" , 28598 , 0x040d }, /* heb.nls */ + { L"hi-IN" , L"hi" , L"IN" , 65001 , 0x0439 }, /* hin.nls */ + { L"hr-HR" , L"hr" , L"HR" , 28592 , 0x041a }, /* hrv.nls */ + { L"hu-HU" , L"hu" , L"HU" , 28592 , 0x040e }, /* hun.nls */ + { L"hy-AM" , L"hy" , L"AM" , 65001 , 0x042b }, /* hye.nls */ + { L"id-ID" , L"id" , L"ID" , 28591 , 0x0421 }, /* ind.nls */ + { L"is-IS" , L"is" , L"IS" , 28605 , 0x040f }, /* isl.nls */ + { L"it-IT" , L"it" , L"IT" , 28605 , 0x0410 }, /* ita.nls */ + { L"it-CH" , L"it" , L"CH" , 28605 , 0x0810 }, /* its.nls */ + { L"ja-JP" , L"ja" , L"JP" , 20932 , 0x0411 }, /* jpn.nls */ + { L"kn-IN" , L"kn" , L"IN" , 65001 , 0x044b }, /* kan.nls */ + { L"ka-GE" , L"ka" , L"GE" , 65001 , 0x0437 }, /* kat.nls */ + { L"kk-KZ" , L"kk" , L"KZ" , 28595 , 0x043f }, /* kkz.nls */ + { L"kok-IN" , L"kok" , L"IN" , 65001 , 0x0457 }, /* knk.nls */ + { L"ko-KR" , L"ko" , L"KR" , 949 , 0x0412 }, /* kor.nls */ + { L"ky-KG" , L"ky" , L"KG" , 28595 , 0x0440 }, /* kyr.nls */ + { L"lt-LT" , L"lt" , L"LT" , 28603 , 0x0427 }, /* lth.nls */ + { L"lv-LV" , L"lv" , L"LV" , 28603 , 0x0426 }, /* lvi.nls */ + { L"mr-IN" , L"mr" , L"IN" , 65001 , 0x044e }, /* mar.nls */ + { L"mk-MK" , L"mk" , L"MK" , 28595 , 0x042f }, /* mki.nls */ + { L"mn-MN" , L"mn" , L"MN" , 28595 , 0x0450 }, /* mon.nls */ + { L"ms-BN" , L"ms" , L"BN" , 28591 , 0x083e }, /* msb.nls */ + { L"ms-MY" , L"ms" , L"MY" , 28591 , 0x043e }, /* msl.nls */ + { L"nl-BE" , L"nl" , L"BE" , 28605 , 0x0813 }, /* nlb.nls */ + { L"nl-N" , L"nl" , L"N" , 28605 , 0x0413 }, /* nld.nls */ + { L"nl-SR" , L"nl" , L"SR" , 28605 , 0x0c13 }, /* nls.nls */ + { L"nn-NO" , L"nn" , L"NO" , 28605 , 0x0814 }, /* non.nls */ + { L"nb-NO" , L"nb" , L"NO" , 28605 , 0x0414 }, /* nor.nls */ + { L"pa-IN" , L"pa" , L"IN" , 65001 , 0x0446 }, /* pan.nls */ + { L"pl-P" , L"pl" , L"P" , 28592 , 0x0415 }, /* plk.nls */ + { L"pt-BR" , L"pt" , L"BR" , 28591 , 0x0416 }, /* ptb.nls */ + { L"pt-PT" , L"pt" , L"PT" , 28605 , 0x0816 }, /* ptg.nls */ + { L"rm-CH" , L"rm" , L"CH" , 28605 , 0x0417 }, /* rmc.nls */ + { L"ro-RO" , L"ro" , L"RO" , 28592 , 0x0418 }, /* rom.nls */ + { L"ru-RU" , L"ru" , L"RU" , 20866 , 0x0419 }, /* rus.nls */ + { L"sa-IN" , L"sa" , L"IN" , 65001 , 0x044f }, /* san.nls */ + { L"sk-SK" , L"sk" , L"SK" , 28592 , 0x041b }, /* sky.nls */ + { L"sl-SI" , L"sl" , L"SI" , 28592 , 0x0424 }, /* slv.nls */ + { L"sq-A" , L"sq" , L"A" , 28592 , 0x041c }, /* sqi.nls */ + { L"sr-SP" , L"sr" , L"SP" , 28595 , 0x0c1a }, /* srb.nls */ + { L"sr-Latn-SP" , L"sr" , L"SP" , 28592 , 0x081a }, /* srl.nls */ + { L"sv-SE" , L"sv" , L"SE" , 28605 , 0x041d }, /* sve.nls */ + { L"sv-FI" , L"sv" , L"FI" , 28605 , 0x081d }, /* svf.nls */ + { L"sw-KE" , L"sw" , L"KE" , 28591 , 0x0441 }, /* swk.nls */ + { L"syr-SY" , L"syr" , L"SY" , 65001 , 0x045a }, /* syr.nls */ + { L"ta-IN" , L"ta" , L"IN" , 65001 , 0x0449 }, /* tam.nls */ + { L"te-IN" , L"te" , L"IN" , 65001 , 0x044a }, /* tel.nls */ + { L"th-TH" , L"th" , L"TH" , 874 , 0x041e }, /* tha.nls */ + { L"tr-TR" , L"tr" , L"TR" , 28599 , 0x041f }, /* trk.nls */ + { L"tt-TA" , L"tt" , L"TA" , 28595 , 0x0444 }, /* ttt.nls */ + { L"uk-UA" , L"uk" , L"UA" , 21866 , 0x0422 }, /* ukr.nls */ + { L"ur-PK" , L"ur" , L"PK" , 1256 , 0x0420 }, /* urd.nls */ + { L"uz-UZ" , L"uz" , L"UZ" , 28595 , 0x0843 }, /* uzb.nls */ + { L"uz-Latn-UZ" , L"uz" , L"UZ" , 28605 , 0x0443 }, /* uzl.nls */ + { L"vi-VN" , L"vi" , L"VN" , 1258 , 0x042a }, /* vit.nls */ + { L"wa-BE" , L"wa" , L"BE" , 28605 , 0x0490 }, /* wal.nls */ + { L"zh-HK" , L"zh" , L"HK" , 950 , 0x0c04 }, /* zhh.nls */ + { L"zh-SG" , L"zh" , L"SG" , 936 , 0x1004 }, /* zhi.nls */ + { L"zh-MO" , L"zh" , L"MO" , 950 , 0x1404 }, /* zhm.nls */ + { 0 , 0 , 0 , 0, 0 } +}; + +/***********************************************************/ +WINE_UNICODE_INLINE WCHAR *strchrW( const WCHAR *str, WCHAR ch ) +{ + do { if (*str == ch) return (WCHAR *)(ULONG_PTR)str; } while (*str++); + return NULL; +} + +WINE_UNICODE_INLINE WCHAR *strpbrkW( const WCHAR *str, const WCHAR *accept ) +{ + for ( ; *str; str++) if (strchrW( accept, *str )) return (WCHAR *)(ULONG_PTR)str; + return NULL; +} + + +/***********************************************************/ + +WINE_UNICODE_INLINE unsigned int strlenW( const WCHAR *str ) +{ + const WCHAR *s = str; + while (*s) s++; + return s - str; +} + +WINE_UNICODE_INLINE WCHAR *strcpyW( WCHAR *dst, const WCHAR *src ) +{ + WCHAR *p = dst; + while ((*p++ = *src++)); + return dst; +} + +WINE_UNICODE_INLINE WCHAR *strcatW( WCHAR *dst, const WCHAR *src ) +{ + strcpyW( dst + strlenW(dst), src ); + return dst; +} + +WINE_UNICODE_INLINE int strcmpW( const WCHAR *str1, const WCHAR *str2 ) +{ + while (*str1 && (*str1 == *str2)) { str1++; str2++; } + return *str1 - *str2; +} + + +WINE_UNICODE_INLINE LPWSTR lstrcpynW( LPWSTR dst, LPCWSTR src, int n ) +{ + { + LPWSTR d = dst; + LPCWSTR s = src; + UINT count = n; + + while ((count > 1) && *s) + { + count--; + *d++ = *s++; + } + if (count) *d = 0; + } + return dst; +} + +/* Copy Ascii string to Unicode without using codepages */ +static inline void strcpynAtoW( WCHAR *dst, const char *src, size_t n ) +{ + while (n > 1 && *src) + { + *dst++ = (unsigned char)*src++; + n--; + } + if (n) *dst = 0; +} + +/*******************************************************/ + +/* Charset to codepage map, sorted by name. */ +static const struct charset_entry +{ + const char *charset_name; + UINT codepage; +} charset_names[] = +{ + { "BIG5", 950 }, + { "CP1250", 1250 }, + { "CP1251", 1251 }, + { "CP1252", 1252 }, + { "CP1253", 1253 }, + { "CP1254", 1254 }, + { "CP1255", 1255 }, + { "CP1256", 1256 }, + { "CP1257", 1257 }, + { "CP1258", 1258 }, + { "CP932", 932 }, + { "CP936", 936 }, + { "CP949", 949 }, + { "CP950", 950 }, + { "EUCJP", 20932 }, + { "GB2312", 936 }, + { "IBM037", 37 }, + { "IBM1026", 1026 }, + { "IBM424", 424 }, + { "IBM437", 437 }, + { "IBM500", 500 }, + { "IBM850", 850 }, + { "IBM852", 852 }, + { "IBM855", 855 }, + { "IBM857", 857 }, + { "IBM860", 860 }, + { "IBM861", 861 }, + { "IBM862", 862 }, + { "IBM863", 863 }, + { "IBM864", 864 }, + { "IBM865", 865 }, + { "IBM866", 866 }, + { "IBM869", 869 }, + { "IBM874", 874 }, + { "IBM875", 875 }, + { "ISO88591", 28591 }, + { "ISO885910", 28600 }, + { "ISO885913", 28603 }, + { "ISO885914", 28604 }, + { "ISO885915", 28605 }, + { "ISO885916", 28606 }, + { "ISO88592", 28592 }, + { "ISO88593", 28593 }, + { "ISO88594", 28594 }, + { "ISO88595", 28595 }, + { "ISO88596", 28596 }, + { "ISO88597", 28597 }, + { "ISO88598", 28598 }, + { "ISO88599", 28599 }, + { "KOI8R", 20866 }, + { "KOI8U", 21866 }, + { "UTF8", CP_UTF8 } +}; + +static int charset_cmp( const void *name, const void *entry ) +{ + const struct charset_entry *charset = (const struct charset_entry *)entry; + return strcasecmp( (const char *)name, charset->charset_name ); +} + +static UINT find_charset( const WCHAR *name ) +{ + const struct charset_entry *entry; + char charset_name[16]; + size_t i, j; + + /* remove punctuation characters from charset name */ + for (i = j = 0; name[i] && j < sizeof(charset_name)-1; i++) + if (isalnum((unsigned char)name[i])) charset_name[j++] = name[i]; + charset_name[j] = 0; + + entry = (const struct charset_entry *)bsearch( charset_name, charset_names, + sizeof(charset_names)/sizeof(charset_names[0]), + sizeof(charset_names[0]), charset_cmp ); + if (entry) return entry->codepage; + + return 0; +} +/*******************************************************/ + +static BOOL find_locale_id_callback(/* LPCWSTR name, ? */ const t_info * tab, struct locale_name *data) +{ + // WCHAR buffer[128]; + int matches = 0; + WORD LangID = tab->LOCALE_ILANGUAGE & 0xFFFF; /* FIXME */ + LCID lcid = MAKELCID( LangID, SORT_DEFAULT ); /* FIXME: handle sort order */ + + if (PRIMARYLANGID(LangID) == LANG_NEUTRAL) return TRUE; /* continue search */ + + /* first check exact name */ + if (data->win_name[0] && tab->LOCALE_SNAME[0]) + /* GetLocaleInfoW( lcid, LOCALE_SNAME | LOCALE_NOUSEROVERRIDE, + buffer, sizeof(buffer)/sizeof(WCHAR) )) */ + { + if (!strcmpW( data->win_name, tab->LOCALE_SNAME )) + { + matches = 4; /* everything matches */ + goto done; + } + } + + /*if (!GetLocaleInfoW( lcid, LOCALE_SISO639LANGNAME | LOCALE_NOUSEROVERRIDE, + buffer, sizeof(buffer)/sizeof(WCHAR) )) */ + if (tab->LOCALE_SISO639LANGNAME[0] == 0) + return TRUE; + + if (strcmpW( tab->LOCALE_SISO639LANGNAME , data->lang )) return TRUE; + matches++; /* language name matched */ + + if (data->country) + { + /* if (GetLocaleInfoW( lcid, LOCALE_SISO3166CTRYNAME|LOCALE_NOUSEROVERRIDE, + buffer, sizeof(buffer)/sizeof(WCHAR) )) */ + if (tab->LOCALE_SISO3166CTRYNAME[0]) + { + if (strcmpW(tab->LOCALE_SISO3166CTRYNAME , data->country )) goto done; + matches++; /* country name matched */ + } + } + else /* match default language */ + { + if (SUBLANGID(LangID) == SUBLANG_DEFAULT) matches++; + } + + if (data->codepage) + { + UINT unix_cp; + /* if (GetLocaleInfoW( lcid, LOCALE_IDEFAULTUNIXCODEPAGE | LOCALE_RETURN_NUMBER, + (LPWSTR)&unix_cp, sizeof(unix_cp)/sizeof(WCHAR) )) */ + unix_cp = tab->LOCALE_IDEFAULTUNIXCODEPAGE; + { + if (unix_cp == data->codepage) matches++; + } + } + + /* FIXME: check sort order */ + +done: + if (matches > data->matches) + { + data->lcid = lcid; + data->matches = matches; + } + return (data->matches < 4); /* no need to continue for perfect match */ +} + + +/*********************************************************************** + * parse_locale_name + * + * Parse a locale name into a struct locale_name, handling both Windows and Unix formats. + * Unix format is: lang[_country][.charset][@modifier] + * Windows format is: lang[-script][-country][_modifier] + */ +static void parse_locale_name( const WCHAR *str, struct locale_name *name ) +{ + static const WCHAR sepW[] = {'-','_','.','@',0}; + static const WCHAR winsepW[] = {'-','_',0}; + static const WCHAR posixW[] = {'P','O','S','I','X',0}; + static const WCHAR cW[] = {'C',0}; + static const WCHAR latinW[] = {'l','a','t','i','n',0}; + static const WCHAR latnW[] = {'-','L','a','t','n',0}; + WCHAR *p; + int ind; + + // TRACE("%s\n", debugstr_w(str)); + + name->country = name->charset = name->script = name->modifier = NULL; + name->lcid = MAKELCID( MAKELANGID(LANG_ENGLISH,SUBLANG_DEFAULT), SORT_DEFAULT ); + name->matches = 0; + name->codepage = 0; + name->win_name[0] = 0; + lstrcpynW( name->lang, str, sizeof(name->lang)/sizeof(WCHAR) ); + + if (!(p = strpbrkW( name->lang, sepW ))) + { + if (!strcmpW( name->lang, posixW ) || !strcmpW( name->lang, cW )) + { + name->matches = 4; /* perfect match for default English lcid */ + return; + } + strcpyW( name->win_name, name->lang ); + } + else if (*p == '-') /* Windows format */ + { + strcpyW( name->win_name, name->lang ); + *p++ = 0; + name->country = p; + if (!(p = strpbrkW( p, winsepW ))) goto done; + if (*p == '-') + { + *p++ = 0; + name->script = name->country; + name->country = p; + if (!(p = strpbrkW( p, winsepW ))) goto done; + } + *p++ = 0; + name->modifier = p; + } + else /* Unix format */ + { + if (*p == '_') + { + *p++ = 0; + name->country = p; + p = strpbrkW( p, sepW + 2 ); + } + if (p && *p == '.') + { + *p++ = 0; + name->charset = p; + p = strchrW( p, '@' ); + } + if (p) + { + *p++ = 0; + name->modifier = p; + } + + if (name->charset) + name->codepage = find_charset( name->charset ); + + /* rebuild a Windows name if possible */ + + if (name->charset) goto done; /* can't specify charset in Windows format */ + if (name->modifier && strcmpW( name->modifier, latinW )) + goto done; /* only Latn script supported for now */ + strcpyW( name->win_name, name->lang ); + if (name->modifier) strcatW( name->win_name, latnW ); + if (name->country) + { + p = name->win_name + strlenW(name->win_name); + *p++ = '-'; + strcpyW( p, name->country ); + } + } +done: + ; + +/* DEBUG + printf("EnumResourceLanguagesW(...):\n"); + printf(" name->win_name=%ls\n", name->win_name); + printf(" name->lang=%ls\n", name->lang); + printf(" name->country=%ls\n", name->country); + printf(" name->codepage=%d\n", name->codepage); +*/ +// EnumResourceLanguagesW( kernel32_handle, (LPCWSTR)RT_STRING, (LPCWSTR)LOCALE_ILANGUAGE, +// find_locale_id_callback, (LPARAM)name ); + + ind = 0; + while (g_langInfo[ind].LOCALE_SNAME) + { + BOOL ret = find_locale_id_callback(&g_langInfo[ind],name); + if (ret == FALSE) + break; + + ind++; + } +} + + + + +/********************************/ + +static UINT setup_unix_locales(void) +{ + struct locale_name locale_name; + // WCHAR buffer[128]; + WCHAR ctype_buff[128]; + char *locale; + UINT unix_cp = 0; + + if ((locale = setlocale( LC_CTYPE, NULL ))) + { + strcpynAtoW( ctype_buff, locale, sizeof(ctype_buff)/sizeof(WCHAR) ); + parse_locale_name( ctype_buff, &locale_name ); + lcid_LC_CTYPE = locale_name.lcid; + unix_cp = locale_name.codepage; + } + if (!lcid_LC_CTYPE) /* this one needs a default value */ + lcid_LC_CTYPE = MAKELCID( MAKELANGID(LANG_ENGLISH,SUBLANG_DEFAULT), SORT_DEFAULT ); + +#if 0 + TRACE( "got lcid %04x (%d matches) for LC_CTYPE=%s\n", + locale_name.lcid, locale_name.matches, debugstr_a(locale) ); + +#define GET_UNIX_LOCALE(cat) do \ + if ((locale = setlocale( cat, NULL ))) \ + { \ + strcpynAtoW( buffer, locale, sizeof(buffer)/sizeof(WCHAR) ); \ + if (!strcmpW( buffer, ctype_buff )) lcid_##cat = lcid_LC_CTYPE; \ + else { \ + parse_locale_name( buffer, &locale_name ); \ + lcid_##cat = locale_name.lcid; \ + TRACE( "got lcid %04x (%d matches) for " #cat "=%s\n", \ + locale_name.lcid, locale_name.matches, debugstr_a(locale) ); \ + } \ + } while (0) + + GET_UNIX_LOCALE( LC_COLLATE ); + GET_UNIX_LOCALE( LC_MESSAGES ); + GET_UNIX_LOCALE( LC_MONETARY ); + GET_UNIX_LOCALE( LC_NUMERIC ); + GET_UNIX_LOCALE( LC_TIME ); +#ifdef LC_PAPER + GET_UNIX_LOCALE( LC_PAPER ); +#endif +#ifdef LC_MEASUREMENT + GET_UNIX_LOCALE( LC_MEASUREMENT ); +#endif +#ifdef LC_TELEPHONE + GET_UNIX_LOCALE( LC_TELEPHONE ); +#endif + +#undef GET_UNIX_LOCALE + +#endif // #if 0 + + return unix_cp; +} + +/********************************/ + +static void LOCALE_Init(void) +{ + /* + extern void __wine_init_codepages( const union cptable *ansi_cp, const union cptable *oem_cp, + const union cptable *unix_cp ); + */ + + // UINT ansi_cp = 1252, oem_cp = 437, mac_cp = 10000, unix_cp; + UINT unix_cp = 0; + +#ifdef __APPLE__ + /* MacOS doesn't set the locale environment variables so we have to do it ourselves */ + CFArrayRef preferred_locales, all_locales; + CFStringRef user_language_string_ref = NULL; + char user_locale[50]; + + CFLocaleRef user_locale_ref = CFLocaleCopyCurrent(); + CFStringRef user_locale_string_ref = CFLocaleGetIdentifier( user_locale_ref ); + + CFStringGetCString( user_locale_string_ref, user_locale, sizeof(user_locale), kCFStringEncodingUTF8 ); + CFRelease( user_locale_ref ); + if (!strchr( user_locale, '.' )) strcat( user_locale, ".UTF-8" ); + unix_cp = CP_UTF8; /* default to utf-8 even if we don't get a valid locale */ + setenv( "LANG", user_locale, 0 ); + // TRACE( "setting locale to '%s'\n", user_locale ); + + /* We still want to set the retrieve the preferred language as chosen in + System Preferences.app, because it can differ from CFLocaleCopyCurrent(). + */ + all_locales = CFLocaleCopyAvailableLocaleIdentifiers(); + preferred_locales = CFBundleCopyLocalizationsForPreferences( all_locales, NULL ); + if (preferred_locales && CFArrayGetCount( preferred_locales )) + user_language_string_ref = (CFStringRef)CFArrayGetValueAtIndex( preferred_locales, 0 ); // FIXME + CFRelease( all_locales ); +#endif /* __APPLE__ */ + + // FIXME setlocale( LC_ALL, "" ); + + unix_cp = setup_unix_locales(); + if (!lcid_LC_MESSAGES) lcid_LC_MESSAGES = lcid_LC_CTYPE; + +#ifdef __APPLE__ + /* Override lcid_LC_MESSAGES with user_language if LC_MESSAGES is set to default */ + if (lcid_LC_MESSAGES == lcid_LC_CTYPE && user_language_string_ref) + { + struct locale_name locale_name; + WCHAR buffer[128]; + CFStringGetCString( user_language_string_ref, user_locale, sizeof(user_locale), kCFStringEncodingUTF8 ); + strcpynAtoW( buffer, user_locale, sizeof(buffer)/sizeof(WCHAR) ); + parse_locale_name( buffer, &locale_name ); + lcid_LC_MESSAGES = locale_name.lcid; + // TRACE( "setting lcid_LC_MESSAGES to '%s'\n", user_locale ); + } + if (preferred_locales) + CFRelease( preferred_locales ); +#endif + +#if 0 // FIXME + NtSetDefaultUILanguage( LANGIDFROMLCID(lcid_LC_MESSAGES) ); + NtSetDefaultLocale( TRUE, lcid_LC_MESSAGES ); + NtSetDefaultLocale( FALSE, lcid_LC_CTYPE ); + + ansi_cp = get_lcid_codepage( LOCALE_USER_DEFAULT ); + GetLocaleInfoW( LOCALE_USER_DEFAULT, LOCALE_IDEFAULTMACCODEPAGE | LOCALE_RETURN_NUMBER, + (LPWSTR)&mac_cp, sizeof(mac_cp)/sizeof(WCHAR) ); + GetLocaleInfoW( LOCALE_USER_DEFAULT, LOCALE_IDEFAULTCODEPAGE | LOCALE_RETURN_NUMBER, + (LPWSTR)&oem_cp, sizeof(oem_cp)/sizeof(WCHAR) ); + if (!unix_cp) + GetLocaleInfoW( LOCALE_USER_DEFAULT, LOCALE_IDEFAULTUNIXCODEPAGE | LOCALE_RETURN_NUMBER, + (LPWSTR)&unix_cp, sizeof(unix_cp)/sizeof(WCHAR) ); + + if (!(ansi_cptable = wine_cp_get_table( ansi_cp ))) + ansi_cptable = wine_cp_get_table( 1252 ); + if (!(oem_cptable = wine_cp_get_table( oem_cp ))) + oem_cptable = wine_cp_get_table( 437 ); + if (!(mac_cptable = wine_cp_get_table( mac_cp ))) + mac_cptable = wine_cp_get_table( 10000 ); + if (unix_cp != CP_UTF8) + { + if (!(unix_cptable = wine_cp_get_table( unix_cp ))) + unix_cptable = wine_cp_get_table( 28591 ); + } + + __wine_init_codepages( ansi_cptable, oem_cptable, unix_cptable ); + + TRACE( "ansi=%03d oem=%03d mac=%03d unix=%03d\n", + ansi_cptable->info.codepage, oem_cptable->info.codepage, + mac_cptable->info.codepage, unix_cp ); + + setlocale(LC_NUMERIC, "C"); /* FIXME: oleaut32 depends on this */ +#endif +} + +LANGID GetUserDefaultLangID(void) +{ + // return LANGIDFROMLCID(GetUserDefaultLCID()); + if (lcid_LC_MESSAGES == 0) LOCALE_Init(); + return LANGIDFROMLCID(lcid_LC_MESSAGES); +} + +LANGID GetSystemDefaultLangID(void) +{ + // return LANGIDFROMLCID(GetSystemDefaultLCID()); + if (lcid_LC_MESSAGES == 0) LOCALE_Init(); + return LANGIDFROMLCID(lcid_LC_MESSAGES); +} + +#ifdef TEST +int main() +{ + LANGID langID; + WORD primLang; + WORD subLang; + + setlocale( LC_ALL, "" ); + + langID = GetUserDefaultLangID(); + printf("langID=0x%x\n",langID); + + primLang = (WORD)(PRIMARYLANGID(langID)); + subLang = (WORD)(SUBLANGID(langID)); + + printf("primLang=%d subLang=%d\n",(unsigned)primLang,(unsigned)subLang); + + return 0; +} +#endif + diff --git a/CPP/myWindows/wine_date_and_time.cpp b/CPP/myWindows/wine_date_and_time.cpp new file mode 100644 index 0000000..6d7f83a --- /dev/null +++ b/CPP/myWindows/wine_date_and_time.cpp @@ -0,0 +1,434 @@ +/* + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ +#include "config.h" + +#include +#include +#include +#include +#include /* gettimeofday */ +#include +#include +#include + +#include + +// #define TRACEN(u) u; +#define TRACEN(u) /* */ + +typedef LONG NTSTATUS; +#define STATUS_SUCCESS 0x00000000 + +#define TICKSPERSEC 10000000 +#define TICKSPERMSEC 10000 +#define SECSPERDAY 86400 +#define SECSPERHOUR 3600 +#define SECSPERMIN 60 +#define MINSPERHOUR 60 +#define HOURSPERDAY 24 +#define EPOCHWEEKDAY 1 /* Jan 1, 1601 was Monday */ +#define DAYSPERWEEK 7 +#define EPOCHYEAR 1601 +#define DAYSPERNORMALYEAR 365 +#define DAYSPERLEAPYEAR 366 +#define MONSPERYEAR 12 +#define DAYSPERQUADRICENTENNIUM (365 * 400 + 97) +#define DAYSPERNORMALCENTURY (365 * 100 + 24) +#define DAYSPERNORMALQUADRENNIUM (365 * 4 + 1) + +/* 1601 to 1970 is 369 years plus 89 leap days */ +#define SECS_1601_TO_1970 ((369 * 365 + 89) * (ULONGLONG)SECSPERDAY) +#define TICKS_1601_TO_1970 (SECS_1601_TO_1970 * TICKSPERSEC) +/* 1601 to 1980 is 379 years plus 91 leap days */ +#define SECS_1601_TO_1980 ((379 * 365 + 91) * (ULONGLONG)SECSPERDAY) +#define TICKS_1601_TO_1980 (SECS_1601_TO_1980 * TICKSPERSEC) +typedef short CSHORT; + +static LONG TIME_GetBias() { + time_t utc = time(NULL); + struct tm *ptm = localtime(&utc); + int localdaylight = ptm->tm_isdst; /* daylight for local timezone */ + ptm = gmtime(&utc); + ptm->tm_isdst = localdaylight; /* use local daylight, not that of Greenwich */ + LONG bias = (int)(mktime(ptm)-utc); + TRACEN((printf("TIME_GetBias %ld\n",(long)bias))) + return bias; +} + +static inline void RtlSystemTimeToLocalTime( const LARGE_INTEGER *SystemTime, + LARGE_INTEGER *LocalTime ) { + LONG bias = TIME_GetBias(); + LocalTime->QuadPart = SystemTime->QuadPart - bias * (LONGLONG)TICKSPERSEC; +} + +void WINAPI RtlSecondsSince1970ToFileTime( DWORD Seconds, FILETIME * ft ) { + ULONGLONG secs = Seconds * (ULONGLONG)TICKSPERSEC + TICKS_1601_TO_1970; + ft->dwLowDateTime = (DWORD)secs; + ft->dwHighDateTime = (DWORD)(secs >> 32); + TRACEN((printf("RtlSecondsSince1970ToFileTime %lx => %lx %lx\n",(long)Seconds,(long)ft->dwHighDateTime,(long)ft->dwLowDateTime))) +} + +/* +void WINAPI RtlSecondsSince1970ToTime( DWORD Seconds, LARGE_INTEGER *Time ) +{ + ULONGLONG secs = Seconds * (ULONGLONG)TICKSPERSEC + TICKS_1601_TO_1970; + // Time->u.LowPart = (DWORD)secs; Time->u.HighPart = (DWORD)(secs >> 32); + Time->QuadPart = secs; +} + */ + +BOOL WINAPI DosDateTimeToFileTime( WORD fatdate, WORD fattime, FILETIME * ft) +{ + struct tm newtm; +#ifndef ENV_HAVE_TIMEGM + struct tm *gtm; + time_t time1, time2; +#endif + + TRACEN((printf("DosDateTimeToFileTime\n"))) + + newtm.tm_sec = (fattime & 0x1f) * 2; + newtm.tm_min = (fattime >> 5) & 0x3f; + newtm.tm_hour = (fattime >> 11); + newtm.tm_mday = (fatdate & 0x1f); + newtm.tm_mon = ((fatdate >> 5) & 0x0f) - 1; + newtm.tm_year = (fatdate >> 9) + 80; + newtm.tm_isdst = -1; +#ifdef ENV_HAVE_TIMEGM + RtlSecondsSince1970ToFileTime( timegm(&newtm), ft ); +#else + newtm.tm_isdst = 0; + time1 = mktime(&newtm); + gtm = gmtime(&time1); + time2 = mktime(gtm); + RtlSecondsSince1970ToFileTime( 2*time1-time2, ft ); +#endif + TRACEN((printf("DosDateTimeToFileTime(%ld,%ld) => %lx %lx\n", + (long)fatdate,(long)fattime, + (long)ft->dwHighDateTime,(long)ft->dwLowDateTime))) + + return TRUE; +} + +/* +BOOL WINAPI DosDateTimeToFileTime( WORD fatdate, WORD fattime, FILETIME * ft) { + struct tm newtm; + + TRACEN((printf("DosDateTimeToFileTime\n"))) + + memset(&newtm,0,sizeof(newtm)); + newtm.tm_sec = (fattime & 0x1f) * 2; + newtm.tm_min = (fattime >> 5) & 0x3f; + newtm.tm_hour = (fattime >> 11); + newtm.tm_mday = (fatdate & 0x1f); + newtm.tm_mon = ((fatdate >> 5) & 0x0f) - 1; + newtm.tm_year = (fatdate >> 9) + 80; + newtm.tm_isdst = -1; + + time_t time1 = mktime(&newtm); + LONG bias = TIME_GetBias(); + RtlSecondsSince1970ToFileTime( time1 - bias, ft ); + + + TRACEN((printf("DosDateTimeToFileTime(%ld,%ld) t1=%ld => %lx %lx\n", + (long)fatdate,(long)fattime,(long)time1, + (long)ft->dwHighDateTime,(long)ft->dwLowDateTime))) + + return TRUE; +} +*/ + +BOOLEAN WINAPI RtlTimeToSecondsSince1970( const LARGE_INTEGER *Time, DWORD *Seconds ) { + ULONGLONG tmp = Time->QuadPart; + TRACEN((printf("RtlTimeToSecondsSince1970-1 %llx\n",tmp))) + tmp /= TICKSPERSEC; + tmp -= SECS_1601_TO_1970; + TRACEN((printf("RtlTimeToSecondsSince1970-2 %llx\n",tmp))) + if (tmp > 0xffffffff) return FALSE; + *Seconds = (DWORD)tmp; + return TRUE; +} + +BOOL WINAPI FileTimeToDosDateTime( const FILETIME *ft, WORD *fatdate, WORD *fattime ) { + LARGE_INTEGER li; + ULONG t; + time_t unixtime; + struct tm* tm; + WORD fat_d,fat_t; + + TRACEN((printf("FileTimeToDosDateTime\n"))) + li.QuadPart = ft->dwHighDateTime; + li.QuadPart = (li.QuadPart << 32) | ft->dwLowDateTime; + RtlTimeToSecondsSince1970( &li, &t ); + unixtime = t; /* unixtime = t; * FIXME unixtime = t - TIME_GetBias(); */ + + tm = gmtime( &unixtime ); + + fat_t = (tm->tm_hour << 11) + (tm->tm_min << 5) + (tm->tm_sec / 2); + fat_d = ((tm->tm_year - 80) << 9) + ((tm->tm_mon + 1) << 5) + tm->tm_mday; + if (fattime) + *fattime = fat_t; + if (fatdate) + *fatdate = fat_d; + + TRACEN((printf("FileTimeToDosDateTime : %lx %lx => %d %d\n", + (long)ft->dwHighDateTime,(long)ft->dwLowDateTime,(unsigned)fat_d,(unsigned)fat_t))) + + return TRUE; +} + +BOOL WINAPI FileTimeToLocalFileTime( const FILETIME *utcft, FILETIME * localft ) { + LARGE_INTEGER local, utc; + + TRACEN((printf("FileTimeToLocalFileTime\n"))) + utc.QuadPart = utcft->dwHighDateTime; + utc.QuadPart = (utc.QuadPart << 32) | utcft->dwLowDateTime; + RtlSystemTimeToLocalTime( &utc, &local ); + localft->dwLowDateTime = (DWORD)local.QuadPart; + localft->dwHighDateTime = (DWORD)(local.QuadPart >> 32); + + return TRUE; +} + +typedef struct _TIME_FIELDS { + CSHORT Year; + CSHORT Month; + CSHORT Day; + CSHORT Hour; + CSHORT Minute; + CSHORT Second; + CSHORT Milliseconds; + CSHORT Weekday; +} TIME_FIELDS; + +static const int MonthLengths[2][MONSPERYEAR] = +{ + { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 }, + { 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 } +}; + +static inline int IsLeapYear(int Year) { + return Year % 4 == 0 && (Year % 100 != 0 || Year % 400 == 0) ? 1 : 0; +} + +static inline VOID WINAPI RtlTimeToTimeFields( + const LARGE_INTEGER *liTime, + TIME_FIELDS * TimeFields) { + int SecondsInDay; + long int cleaps, years, yearday, months; + long int Days; + LONGLONG Time; + + /* Extract millisecond from time and convert time into seconds */ + TimeFields->Milliseconds = + (CSHORT) (( liTime->QuadPart % TICKSPERSEC) / TICKSPERMSEC); + Time = liTime->QuadPart / TICKSPERSEC; + + /* The native version of RtlTimeToTimeFields does not take leap seconds + * into account */ + + /* Split the time into days and seconds within the day */ + Days = Time / SECSPERDAY; + SecondsInDay = Time % SECSPERDAY; + + /* compute time of day */ + TimeFields->Hour = (CSHORT) (SecondsInDay / SECSPERHOUR); + SecondsInDay = SecondsInDay % SECSPERHOUR; + TimeFields->Minute = (CSHORT) (SecondsInDay / SECSPERMIN); + TimeFields->Second = (CSHORT) (SecondsInDay % SECSPERMIN); + + /* compute day of week */ + TimeFields->Weekday = (CSHORT) ((EPOCHWEEKDAY + Days) % DAYSPERWEEK); + + /* compute year, month and day of month. */ + cleaps=( 3 * ((4 * Days + 1227) / DAYSPERQUADRICENTENNIUM) + 3 ) / 4; + Days += 28188 + cleaps; + years = (20 * Days - 2442) / (5 * DAYSPERNORMALQUADRENNIUM); + yearday = Days - (years * DAYSPERNORMALQUADRENNIUM)/4; + months = (64 * yearday) / 1959; + /* the result is based on a year starting on March. + * To convert take 12 from Januari and Februari and + * increase the year by one. */ + if( months < 14 ) { + TimeFields->Month = months - 1; + TimeFields->Year = years + 1524; + } else { + TimeFields->Month = months - 13; + TimeFields->Year = years + 1525; + } + /* calculation of day of month is based on the wonderful + * sequence of INT( n * 30.6): it reproduces the + * 31-30-31-30-31-31 month lengths exactly for small n's */ + TimeFields->Day = yearday - (1959 * months) / 64 ; +} + + +BOOL WINAPI FileTimeToSystemTime( const FILETIME *ft, SYSTEMTIME * syst ) { + TIME_FIELDS tf; + LARGE_INTEGER t; + + TRACEN((printf("FileTimeToSystemTime\n"))) + t.QuadPart = ft->dwHighDateTime; + t.QuadPart = (t.QuadPart << 32) | ft->dwLowDateTime; + RtlTimeToTimeFields(&t, &tf); + + syst->wYear = tf.Year; + syst->wMonth = tf.Month; + syst->wDay = tf.Day; + syst->wHour = tf.Hour; + syst->wMinute = tf.Minute; + syst->wSecond = tf.Second; + syst->wMilliseconds = tf.Milliseconds; + syst->wDayOfWeek = tf.Weekday; + return TRUE; +} + + +static inline NTSTATUS WINAPI RtlLocalTimeToSystemTime( const LARGE_INTEGER *LocalTime, + LARGE_INTEGER *SystemTime) { + + TRACEN((printf("RtlLocalTimeToSystemTime\n"))) + LONG bias = TIME_GetBias(); + SystemTime->QuadPart = LocalTime->QuadPart + bias * (LONGLONG)TICKSPERSEC; + return STATUS_SUCCESS; +} + +BOOL WINAPI LocalFileTimeToFileTime( const FILETIME *localft, FILETIME * utcft ) { + LARGE_INTEGER local, utc; + + TRACEN((printf("LocalFileTimeToFileTime\n"))) + local.QuadPart = localft->dwHighDateTime; + local.QuadPart = (local.QuadPart << 32) | localft->dwLowDateTime; + RtlLocalTimeToSystemTime( &local, &utc ); + utcft->dwLowDateTime = (DWORD)utc.QuadPart; + utcft->dwHighDateTime = (DWORD)(utc.QuadPart >> 32); + + return TRUE; +} + +/********************************************************************* + * GetSystemTime (KERNEL32.@) + * + * Get the current system time. + * + * RETURNS + * Nothing. + */ +VOID WINAPI GetSystemTime(SYSTEMTIME * systime) /* [O] Destination for current time */ +{ + FILETIME ft; + LARGE_INTEGER t; + + TRACEN((printf("GetSystemTime\n"))) + + struct timeval now; + gettimeofday( &now, 0 ); + t.QuadPart = now.tv_sec * (ULONGLONG)TICKSPERSEC + TICKS_1601_TO_1970; + t.QuadPart += now.tv_usec * 10; + + ft.dwLowDateTime = (DWORD)(t.QuadPart); + ft.dwHighDateTime = (DWORD)(t.QuadPart >> 32); + FileTimeToSystemTime(&ft, systime); +} + +/****************************************************************************** + * RtlTimeFieldsToTime [NTDLL.@] + * + * Convert a TIME_FIELDS structure into a time. + * + * PARAMS + * ftTimeFields [I] TIME_FIELDS structure to convert. + * Time [O] Destination for the converted time. + * + * RETURNS + * Success: TRUE. + * Failure: FALSE. + */ +static BOOLEAN WINAPI RtlTimeFieldsToTime( + TIME_FIELDS * tfTimeFields, + LARGE_INTEGER *Time) +{ + int month, year, cleaps, day; + + TRACEN((printf("RtlTimeFieldsToTime\n"))) + + /* FIXME: normalize the TIME_FIELDS structure here */ + /* No, native just returns 0 (error) if the fields are not */ + if( tfTimeFields->Milliseconds< 0 || tfTimeFields->Milliseconds > 999 || + tfTimeFields->Second < 0 || tfTimeFields->Second > 59 || + tfTimeFields->Minute < 0 || tfTimeFields->Minute > 59 || + tfTimeFields->Hour < 0 || tfTimeFields->Hour > 23 || + tfTimeFields->Month < 1 || tfTimeFields->Month > 12 || + tfTimeFields->Day < 1 || + tfTimeFields->Day > MonthLengths + [ tfTimeFields->Month ==2 || IsLeapYear(tfTimeFields->Year)] + [ tfTimeFields->Month - 1] || + tfTimeFields->Year < 1601 ) + return FALSE; + + /* now calculate a day count from the date + * First start counting years from March. This way the leap days + * are added at the end of the year, not somewhere in the middle. + * Formula's become so much less complicate that way. + * To convert: add 12 to the month numbers of Jan and Feb, and + * take 1 from the year */ + if(tfTimeFields->Month < 3) { + month = tfTimeFields->Month + 13; + year = tfTimeFields->Year - 1; + } else { + month = tfTimeFields->Month + 1; + year = tfTimeFields->Year; + } + cleaps = (3 * (year / 100) + 3) / 4; /* nr of "century leap years"*/ + day = (36525 * year) / 100 - cleaps + /* year * dayperyr, corrected */ + (1959 * month) / 64 + /* months * daypermonth */ + tfTimeFields->Day - /* day of the month */ + 584817 ; /* zero that on 1601-01-01 */ + /* done */ + + Time->QuadPart = (((((LONGLONG) day * HOURSPERDAY + + tfTimeFields->Hour) * MINSPERHOUR + + tfTimeFields->Minute) * SECSPERMIN + + tfTimeFields->Second ) * 1000 + + tfTimeFields->Milliseconds ) * TICKSPERMSEC; + + return TRUE; +} + +/********************************************************************* + * SystemTimeToFileTime (KERNEL32.@) + */ +BOOL WINAPI SystemTimeToFileTime( const SYSTEMTIME *syst, FILETIME * ft ) { + TIME_FIELDS tf; + LARGE_INTEGER t; + + TRACEN((printf("SystemTimeToFileTime\n"))) + + tf.Year = syst->wYear; + tf.Month = syst->wMonth; + tf.Day = syst->wDay; + tf.Hour = syst->wHour; + tf.Minute = syst->wMinute; + tf.Second = syst->wSecond; + tf.Milliseconds = syst->wMilliseconds; + + RtlTimeFieldsToTime(&tf, &t); + ft->dwLowDateTime = (DWORD)t.QuadPart; + ft->dwHighDateTime = (DWORD)(t.QuadPart>>32); + return TRUE; +} + diff --git a/ChangeLog b/ChangeLog new file mode 100644 index 0000000..5887d43 --- /dev/null +++ b/ChangeLog @@ -0,0 +1,914 @@ + +Version 9.20.1 +============== + + - #3211479 "p7zip 9.20 - "unsupported method" with RAR files - " fixed + "install.sh" installs again "bin/Codecs/Rar29.so" + +Version 9.20 +============ + + - From Windows version of 7-zip 9.20, What's new after 7-Zip 4.65 (2009-02-03): + - 7-Zip now supports LZMA2 compression method. + - 7-Zip now can update solid .7z archives. + - 7-Zip now supports XZ archives. + - 7-Zip now supports PPMd compression in ZIP archives. + - 7-Zip now can unpack NTFS, FAT, VHD, MBR, APM, SquashFS, CramFS, MSLZ archives. + - 7-Zip now can unpack GZip, BZip2, LZMA, XZ and TAR archives from stdin. + - 7-Zip now can unpack some TAR and ISO archives with incorrect headers. + - 7-Zip now supports files that are larger than 8 GB in TAR archives. + - NSIS and WIM support was improved. + - Partial parsing for EXE resources, SWF and FLV. + - The support for archives in installers was improved. + - 7-Zip now can stores NTFS file timestamps to ZIP archives. + - Speed optimizations in PPMd codec. + - Speed optimizations in CRC calculation code for Intel's Atom CPUs. + - New -scrc switch to calculate total CRC-32 during extracting / testing. + - 7-Zip File Manager now doesn't use temp files to open nested archives stored without compression. + - Disk fragmentation problem for ZIP archives created by 7-Zip was fixed. + - Some bugs were fixed. + - New localizations: Hindi, Gujarati, Sanskrit, Tatar, Uyghur, Kazakh. + - Not in p7zip : Speed optimizations in AES code for Intel's 32nm CPUs. + + + + +Version 9.18 +============ + - From Windows version of 7-zip 9.17 + - Disk fragmentation problem for ZIP archives created by 7-Zip was fixed. + Notes: 7-Zip now uses 4 MB RAM buffer as file cache, when you create ZIP archives. + It reduces the number of Move_File_Position and Write_to_File operations. + + - From Windows version of 7-zip 9.18 + - 7-Zip now can unpack SquashFS and CramFS filesystem images. + - 7-Zip now can unpack some TAR and ISO archives with incorrect headers. + - Some bugs were fixed. + + - Some bugs were fixed in 7zG and 7zFM on MacOSX + + +Version 9.16 +============ + - From Windows version of 7-zip 9.16 + - 7-Zip now supports files that are larger than 8 GB in TAR archives. + - NSIS support was improved : + - 7-Zip now supports BZip2 method in NSIS installers. + - 7-Zip now can extract identical files from NSIS installers. + - Some bugs were fixed. + - New localizations: Hindi, Gujarati, Sanskrit. + + - From Windows version of 7-zip 9.15 + - Some bugs were fixed. + - New localization: Tatar + + - From Windows version of 7-zip 9.14 + - WIM support was improved. 7-Zip now can create WIM archives without compression. + + + - #3069545 "kSignatureDummy?" fixed + + + + +Version 9.13 +============ + - From Windows version of 7-zip 9.12 + - Some bugs were fixed. + + + - #2863580 "Crash in Rar decoder on a corrupted file" fixed + + - #2860898 "Dereferencing a zero pointer in cab handler" fixed + + - #2860679 "Division by zero in cab decoder" fixed + + + +Version 9.12 +============ + - From Windows version of 7-zip 9.12 + - ZIP / PPMd compression ratio was improved in Maximum and Ultra modes. + - The BUG in 7-Zip 9.* beta was fixed: LZMA2 codec didn't work, + if more than 10 threads were used (or more than 20 threads in some modes). + + - makefile.openbsd is now compatible with OpenBSD ports tree. + (thanks to jggimi) + + - cmake projects added. + + - 7zFM and 7zG can be built on MacOSX but these ports are in very alpha stage. + make app to build p7zip.app (p7zip for MacOSX) + + +Version 9.11 (never published) +============ + - From Windows version of 7-zip 9.11 + - 7-Zip now supports PPMd compression in .ZIP archives. + - Speed optimizations in PPMd codec. + - The support for archives in installers was improved. + - Some bugs were fixed. + + +Version 9.10 (never published) +============ + + - From Windows version of 7-zip 9.05 to 9.10 + - 7-Zip now can unpack Apple Partition Map (APM) disk images. + - 7-Zip now can unpack MSLZ archives. + - Partial parsing for EXE resources, SWF and FLV. + - Some bugs were fixed. + + - p7zip can now use hugetlbfs on Linux (thank to Joachim Henke) + Like with the Windows large pages, this gives a nice speedup, + when running memory intensive operations. + + - p7zip now uses UTF8 (kCFStringNormalizationFormD) On MacOSX + fixes #2831266 "p7zip can't find NFC Unicode filename in OSX Terminal" + and #2976169 "German Umlauts Failure" + + +Version 9.05 (never published) +============ + + - p7zip now uses precompiled header with gcc 4 + + +Version 9.04 (Major bugfixes and Major enhancements) +============ + + - From Windows version of 7-zip 9.04 : + - 7-Zip now can update solid .7z archives. + - 7-Zip now supports LZMA2 compression method. + - 7-Zip now supports XZ archives. + - 7-Zip now can unpack NTFS, FAT, VHD and MBR archives. + - 7-Zip now can unpack GZip, BZip2, LZMA, XZ and TAR archives from stdin. + - New -scrc switch to calculate total CRC-32 during extracting / testing. + - Some bugs were fixed. + + - #2799966 " A newly created 7z archive (by p7zip 4.65) is broken and cannot be unpacked / listed / tested" + Fixed : now "7za a -mx=9 archive.7z directory" creates a good archive even + if there are a lot of executable files. + + - Fixed : the RAM size was reported incorrectly on MacOSX 64bits (with 2Gb+ RAM) + + - #2798023 "segfault handling very large multivolume .7z file" + p7zip now displays the following error "Error: Too many open files" + if you don't have enough rights to open all the splitted files + ( on Linux : ulimit -n) + + +Version 4.65 +============ + - From Windows version of 7-zip 4.62 to 4.65 + - The bug in 7-Zip 4.63 was fixed: 7-Zip could not decrypt .ZIP archives encrypted with WinZip-AES method. + - 7-Zip now can unpack ZIP archives encrypted with PKWARE-AES. + - Some bugs were fixed. + + - Fixed : the RAM size was reported incorrectly on MacOSX 64bits + + - Fixed : makefile.linux_amd64_asm_icc + + - DJGPP : + makefile.djgpp becomes makefile.djgpp_old + makefile.djgpp_watt added (thank to Rugxulo) + + + - you can now compile 7za with a cmake project (see README) + the cmake project can build a codeblock project ;) + Remark : the kdevelop3 or Eclipse/CDT4 project don't work :( + +Version 4.61 +============ + - From Windows version of 7-zip 4.61 : + - 7-Zip now supports LZMA compression for .ZIP archives. + - Some bugs were fixed. + + - #2199036 : Ask for password twice when creating encrypted archive + + - 7zG added (read GUI/readme.txt) + + +Version 4.60 (never published) +============ + + - From Windows version of 7-zip 4.60 : + - Some bugs were fixed + + - p7zip didn't use the BCJ /BCJ2 filters for executables (: + - makefile.linux_amd64_asm_icc added (tested with Intel Compiler 11 on Ubuntu 8.04 x64) + + +Version 4.59 (never published) +============ + + - From Windows version of 7-zip 4.59 : + - 7-Zip now can unpack UDF, XAR and DMG/HFS archives. + - It's allowed to use -t switch for "list" and "extract" commands. + - Some bugs were fixed. + + - Bug : wrong timestamp for files extracted from .zip or .rar archives + + +Version 4.58 +============ + - From Windows version of 7-zip 4.58 : + - Some speed optimizations. + - 7-Zip now can unpack .lzma archives. + - Unicode (UTF-8) support for filenames in .ZIP archives. Now there are 3 modes: + 1) Default mode: 7-Zip uses UTF-8, if the local code page doesn't contain required symbols. + 2) -mcu switch: 7-Zip uses UTF-8, if there are non-ASCII symbols. + 3) -mcl switch: 7-Zip uses local code page. + - Now it's possible to store file creation time in 7z and ZIP archives (-mtc switch). + - 7-Zip now can unpack multivolume RAR archives created with + "old style volume names" scheme and names *.001, *.002, ... + - Now it's possible to use -mSW- and -mSW+ switches instead of -mSW=off and -mSW=on + - Some bugs were fixed. + + - Bug #1898410 : Timestamp error in archive listing + now "7za l .." and "ls -l just_extracted_file" give the same date and time. + + - Bug #1860938 : unix file rights only 600 instead of 644 + + - Bug #1941574 : gzip files always marked as OS FAT, Now p7zip uses "Unix". + + - Bug #1947700 : file containing excluded files not read + When using the -xr flag to list files not to be included in the + archive the file is not read if it is a symbolic link. + + - Feature Requests #1868080 : add support to compile for NetWare (makefile.netware_asm_gcc_3.X) + + - Patch #1883893 : Incorrect path ref to docs in man pages (When using the last ($DEST_DIR) argument with install.sh) + + - now "install.sh" supports filenames with spaces. + + - some code cleanup (Synchronization) + + - some minor fix in the BZip2 codec. + + - fix with the define "__TEXT" for s390 + + +Version 4.57 +============ + - From Windows version of 7-zip 4.57 : + - The BUG in command line version was fixed: -up3 switch could work incorrectly. + - Minor improvement in ZIP compression. + + +Version 4.56 (never published) +============ + - From Windows version of 7-zip 4.56 : + - Some bugs were fixed + + - On HPUX : fixed "Can't load '../bin/7z.dll'" + (Unsatisfied data symbol '_ZTVN10__cxxabiv121__vmi_class_type_infoE' in load module '../bin/7z.so'.) + + - bug : p7zip used to build a zip file with an "FAT" header instead of "Unix" header + If LANG was set, "unzip" tried to translate the filenames from "FAT" to locale ... + + - On AIX : fixed "HugeFiles=off" (thank kuriath) + + - bug #1800180 : LZMAlone compilation error in COutFile + + - Patch #1796569 : Fix FreeBSD FTBFS + + - Patch #1796575 : fix man1/7za.1 man1/7zr.1 man1/7z.1 + + +Version 4.55 +============ + - From Windows version of 7-zip 4.55 : + - Some bugs were fixed + + - fixed #1783007 : when make p7-zip 4.51 under hp-ux 11.11 error + + - fixed #1789154 : 7z use default or -m0=LZMA runtime error under HP-UX IA11.23 + + - support added for HPUX on Itanium. + (makefile.hpux-acc and makefile.hpux-acc_64) + + +Version 4.54 (never published) +============ + - From Windows version of 7-zip 4.54 : + - Decompression speed was increased + +Version 4.53 +============ + - From Windows version of 7-zip 4.53 : + - The bug in 7-Zip 4.48 - 4.52 beta was fixed: + 7-Zip could create .ZIP archives with broken files. + - Some bugs were fixed. + +Version 4.52 (never published) +============ + - From Windows version of 7-zip 4.52 : + - 7z now can unpack Compound files (msi, doc, ...). + - Some bugs were fixed (CAB decompressing) + + - lzma (CPP/7zip/Compress/LZMA_Alone) is now multi-threaded. + + - fixed #632912 : Extracting large directories takes quadratic time + (this bug was not fully fixed ...) + + - fixed : "7za x -odirectory archive.7z" now works even if "directory" is a symbolic link. + + - makefile.linux_s390x added : support for Linux on IBM z/Series Mainframe with s390x CPU + (thank y_stephen) + + - fixed crashes on BeOs with the flag "@filename" + + - cleanup in the makefile : defining LITTLE_ENDIAN or BIG_ENDIAN is not needed anymore + + - ppmd.exe added (CPP/7zip/Compress/PPMD_Alone) + +Version 4.51 +============ + - From Windows version of 7-zip 4.51 : + - Bug was fixed: 7-Zip 4.50 beta could not open some .7z archives. + + - fix built of test_emul + +Version 4.50 (never published) +============ + - From Windows version of 7-zip 4.50 : + - New switch for command line version: + -ssc[-] enables/disables case-sensitive mode for file names. + - Speed optimizations for AES encryption. + - Some bugs were fixed. + + - contrib/gzip-like_CLI_wrapper_for_7z/p7zip now supports commands like : + p7zip -- -name + p7zip "file name" + p7zip file1 file2 file3 + p7zip -d file1.7z file2.7z file3.7z + + never published because this version does not pass my tests. + +Version 4.49 +============ + - From Windows version of 7-zip 4.49 : + - 7-Zip (7z) now can unpack WIM archives + + - fixed : On Sparc Solaris, core dump during "7z a -sfx exe.x dir" with p7zip compiled with makefile.solaris_sparc_CC_32 + + - some code cleanup + + - On HPUX, p7zip can get the number of CPU and the size of the memory. + + +Version 4.48 +============ + - From Windows version of 7-zip 4.48 : + - Encryption strength for .7z format was increased. + Now it uses random initialization vectors. + - Some bugs were fixed. + + - fixed #1729236 : Makefile infrastructure not safe for parallel compilation + (if your make command understands -C and -j4, copy makefile.parallel_jobs over makefile) + + - Now the executables are not built with the PIC (position-independent code) flag. + 7z.so are still built with the PIC flag. + 7za and 7zr are now faster than 7z with 7z.so. + 7za, 7zr and 7r are now smaller. + + - contrib/gzip-like_CLI_wrapper_for_7z/p7zip now supports spaces in filename + and use 7za instead of 7z. + + - contrib/qnx630sp3 added to support QNX built (thank termterm) + + +Version 4.47 +============ + - From Windows version of 7-zip 4.47 : + - Bugs of 7-Zip 4.46 beta were fixed: BZip2 could work incorrectly + +Version 4.46 (never published) +============ + + - From Windows version of 7-zip 4.46 : + - New fast compression mode for Deflate method in Zip and GZip. + - Some bugs were fixed. + + - LZMA Benchmark : + - cygwin : RAM size detection + - computation of the CPU % + + - fixed #1721827 : install.sh now copies 7z.so + + - Client7z now uses 7z.so instead of 7za.so + + - new target : cygwin with asm + + - LZMA SDK added in the source package (CPP/7zip/Compress/LZMA_Alone) + + - fixed #1716987 : 7zr removed from 4.45 binary distribution + + - fixed #1706002 : make and install.sh use the same variables in the same order. + + +Version 4.45 +============ + + - From Windows version of 7-zip 4.45 : + - Default dictionary size was increased: Normal: 16 MB, Max: 32 MB. + - Speed optimizations. + - Benchmark was improved (new "b" command in command line version). + - The number of DLL files was reduced. + - switch -mhcf=off is not supported now. + - If -t{Type} switch is not specified, 7-Zip now uses extension of archive to detect the type of archive. + - Some bugs were fixed (BZip2 in multithread) + - x86 or x86_64 : ASM version of crc32 available + + - better detection of executable file (scripts do not need BCJ/BCJ2 filter) + + - default permissions are now : + - for a file : -rw------- + - for a directory : drwx------ + + - on MacOSX, locale is always utf8 (because the MacOSX filesystem supports only utf8 filenames) + + - makefile.qnx_static and makefile.qnx_shared added (Thank to termterm) + + +Version 4.44 +============ + + - From Windows version of 7-zip 4.44 : + - 7za : Cab support + - Speed optimizations for LZMA, Deflate, BZip2 and unRAR. + - fix : now, updating a crypted header archive keeps the crypted header + + - fixes in the help displayed by 7za/7z/7zr. + + - code cleanup + - remove of mySetModuleFileNameA (and its memory leak), GetModuleFileName ... + + - fixed : p7zip for DJGPP can now update an archive (thank stranix) + + - fixed : in the plugins of 7z, the "Utf16" state was always off. + + - fixed : support for directory names that are not encoded with the current locale. + (ex : directory name is in "iso 8859-15" whereas the locale is "utf8") + + - patch #1581907 : fix for FreeBSD in contrib/gzip-like_CLI_wrapper_for_7z/p7zip + + - fixed : p7zip can now restore a symbolic link from a Zip archive (archive.zip made with "zip -y") + remark/todo : p7zip stores, in a zip archive, the linked file instead of the symbolic link + + - fixed #1630452 : small fix in the output of the script install.sh + + - fixed #632912 : Extracting large directories takes quadratic time + + - preliminary support of HP-UX : remove of RTLD_GROUP for dlopen in DLL.cpp + makefile.hpux-acc should be able to build 7za for HP-UX (thank furiol) + + - Client7z added. + +Version 4.43 +============ + - From Windows version of 7-zip 4.43 : + - 7-Zip now can use multi-threading mode for compressing to .ZIP archives. + - ZIP format supporting was improved. + - 7-Zip now supports WinZip-compatible AES-256 encryption for .ZIP archives. + - 7-Zip now uses order list (list of extensions) for files sorting for compressing + to .7z archives. It can slightly increase compression ratio in some cases. + - 7-Zip now restores modification time of folders during .7z archives extracting. + - Some bugs were fixed. + + - fixed : the user can now see the percentage indicator. + + - fix "Bugs item #1612285" : doesn't preserve directory timestamps + + - support added for Tru64 / OSF 5.1 (makefile.tru64) + + - small fix "Bugs item #1533765" in install.sh (7zr install) + + - fix "Bugs item #1507913" : "make all" now build 7za and 7zCon.sfx + following the README. + + - manpage updated "bugs item #1509098" : exit codes added + + - manpage updated :-mhe=on (Header encryption) added + + - install.sh now can install the file README, ChangeLog and the directory DOCS + + +Version 4.42 +============ + - From Windows version of 7-zip 4.42 : + - Some bugs were fixed + + - the binaries provided by p7zip_4.XY_x86_linux_bin.tar.bz2 + can now run on Fedora x86_64, + and should now run on any 64bits Linux. + + - patch #1473746 - gzip-like CLI wrapper (for 7z) + see the directory "contrib/gzip-like_CLI_wrapper_for_7z". + + - patch #471478 - Support for OPTFLAGS + This patch allows to use system specific opt flags. + example : make OPTFLAGS="-O2 -march=athlon-xp" + + - the djgpp and cygwin makefile now build "7za" with case insensitive filenames + (Windows filesystem is case insensitive). + + +Version 4.41 +============ + - From Windows version of 7-zip 4.41 : + - Some bugs were fixed + + +Version 4.40 +============ + + - From Windows version of 7-zip 4.40 : + - 7-Zip now can unpack some installers created by NSIS + - Some bugs were fixed + + - format LZH/LHA : fixed directory display during listing or extracting + (a directory does not end with the path separator) + + - patch #1470817 - Handle 7zr in install.sh + + - code cleanup + + +Version 4.39 +============ + + - From Windows version of 7-zip 4.39 : + - Bug in versions 4.33:4.38 was fixed: + 7-Zip could not correctly compress files larger than 2 GB + to 7z archive in fast/fastest modes (HC4 match finder). + + +Version 4.38 +============ + + - From Windows version of 7-zip 4.38 : + - Some bugs were fixed. + + - new manpage : 7zr.1 + - update manpages : 7z.1 and 7za.1 + - new switch : --help + + - patch #1465026 - Patch for install.sh for packagers + + - DosDateTimeToFileTime fixed (rar format) + + - contrib/VirtualFileSystemForMidnightCommander/u7z updated + (thank sgh_punk) + + +Version 4.37 +============ + - From Windows version of 7-zip 4.37 : + - Some bugs were fixed. + + - fix build for Solaris sparc with CC instead of g++. + + - fix build for Solaris 9 x86 + - fix build for Solaris 10 x86 + - fix build for OpenBSD + - p7zip can now be build with djgpp. + - new target : 7zr (light version of 7za) + - new machine : IBM AIX + +Version 4.36 +============ + - From Windows version of 7-zip 4.36 : + - 7-zip now can unpack ISO archives + + - GCC 4.X : add C++ visibility support to reduce the size of the *.so + (see makefile.linux_x86_ppc_alpha__gcc_4.X) + + - cygwin now supports '-o/tmp' + +Version 4.35 +============ + - From Windows version of 7-zip 4.35 : + - New switch : -slt ("l" (list) command with -slt shows technical information for archive). + - Some bugs were fixed. + + - From Windows version of 7-zip 4.34 : + - BZip2 compressing / decompressing now can work in multi-threading mode + - Multi-threading mode now is default for multi-processor systems + +Version 4.33 +============ + - From Windows version of 7-zip 4.33 : + - Compressing speed and Memory requirements were increased. + Default dictionary size was increased: Fastest: 64 KB, Fast: 1 MB, + Normal: 4 MB, Max: 16 MB, Ultra: 64 MB. + - 64-bit version now supports 1 GB dictionary + - 7z/LZMA now can use only these match finders: HC4, BT2, BT3, BT4 + - Compression ratio in Zip/GZip/Deflate in Ultra mode was increased + - Some bugs were fixed + + - fix "Bugs item #1407358" : Passwords entered are not visible on command line + if the target has the system function "getpass". + + - fix "BCJ2" : now p7zip uses the "BCJ2" filter when the file has execute permission + (7-zip uses the "BCJ2" filter when the filename ends with ".dll", ".exe", ".ocx", ".sfx" or ".sys") + + - patch #1390722 : no new line at end of file + + - patch #1390716 : allow compiling with gcc-4.1 + + - patch #1425862 : allow other make programs than GNU make + + - Testing framework added ("make test" and "make test_7z") + + - fix 'lstat' : p7zip can compile if 'lstat' is not available + +Version 4.30 +============ + - From Windows version of 7-zip 4.30 : + - Speed optimizations in LZMA maximum/ultra compressing. + - LZMA now supports word size up to 273 + - 7-Zip now reduces dictionary size for LZMA, if you compress files + smaller than specified dictionary size. + - Some bugs were fixed + + - fix minor build trouble with MacOS X + - fix "Bugs item #1349229" : 7-zip now displays "e: Extract files from archive (without using directory names)" + +Version 4.29 +============ + + - fix "Bugs item #1305781" : "7z a -sfx" sets the execute-flag + and does not add ".exe" extension. + + - fix "Bugs item #1306783" : "7za a /tmp/t.7z /etc/passwd" + + - fix "Bugs item #1304797" : @lists don't handle files starting with ./ + + - fix "Bugs item #1309287" : man 7za fails after install + +Version 4.27 +============ + - From Windows version of 7-zip 4.27 : + - new plugin for 7z : 7-Zip can unpack CHM/HXS (MS HTML HELP) archives + - cab plugin for 7z : 7-Zip can unpack multivolume CAB archives + - Some bugs were fixed + - better support for 64bits (PPMD coder/decoder) + +Version 4.26 +============ + - From Windows version of 7-zip 4.26 : + - new plugin for 7z : LZH format support (extracting only) + + - fix (courtesy from Robert Millan) to make p7zip compile on GNU/kFreeBSD. + + - fix "Bug item #1273057", now "7z -so -t7z a dummy.7z file >output.7z" does not + finish with a "Segmentation fault (core dumped)". + + - fix "Bug item #1221056", now, makefile for p7zip use the flag "-O" to + support compilers that build invalid programs with the flag "-O2". + +Version 4.25 +============ + - From Windows version of 7-zip 4.25 : + - Some bugs were fixed + - DOCS/MANUAL/exit_codes.htm added + + - new plugin for 7z : RAR format support (extracting only) + + - better dependencies in makefile + +Version 4.23 +============ + - From Windows version of 7-zip 4.23 : + - Some bugs were fixed + + - manpages for 7za and 7z updated by Mohammed Adnene Trojette. + + - little fix for the help message of 7za or 7z. + + - bug #1224304 : Files and directories with \ in name not handled properly. + + - fix for tar archives that have pax header. + +Version 4.20 +============ + + - From Windows version of 7-zip 4.19 and 4.20 : + - BZip2 code was rewritten. Now it supports 3 modes: Normal, Maximum and + Ultra. In Normal mode it compresses almost as original BZip2 compressor. + Compression ratio in Maximum and Ultra modes is 1-3% better for some files, + but Maximum Mode is about 3 times slower and Ultra Mode is about 8 times + slower than Normal mode. + - Console version now prints all messages to stdout by default, + and if -so switch is specified, 7-Zip prints messages to stderr. + - Some bugs were fixed + + - Updating "contrib/VirtualFileSystemForMidnightCommander/" with u7z-4.16beta.tar.bz2 + + - bug #1204993 (does not find broken filenames) + + - bug #1201244 (Missing files in p7zip_4.18_x86_linux_bin.tar.bz2) + + - makefile.linux_x86_ppc_alpha : flag "-fPIC" added + + - flag "-l" added. + without : p7zip stores symlinks (like p7zip 4.18) + with "-l" : p7zip stores the files/directories pointed by symlinks (like before p7zip 4.18) + CAUTION : the scanning stage can never end because of symlinks like ".." + (ex: ln -s .. ldir) + +Version 4.18 +============ + + - From Windows version of 7-zip 4.18 and 4.17 : + - minor fixes + + - p7zip can now store and restore : + - symbolic links, + - file permission bits + Remark : for directory, restored_perm = stored_perm | 0700 . + + - fix in install.sh + + - On MacOSX, p7zip now restore times of a file. + + - more detailed errors during scanning stage. + + +Version 4.16 +============ + + - From Windows version of 7-zip 4.16 : + - Speed optimization (5%) for 7z / LZMA + - 7za now supports .Z archives + - -r- switch in command line now is default for all commands + - Some bugs were fixed + - bug #1119193 (list mode output confusing/wrong) + + - From Windows version of 7-zip 4.15 : + - Z format supporting (extracting only) + - 7-Zip now can extract ZIP archives compressed with "Shrink" method + - 7-Zip now doesn't interrupt the compressing when it can not open file. + 7-Zip just skips that file and shows warning. + - Some bugs were fixed + + - man pages added (thank Mohammed Adnene Trojette) + - bug #1112167 fixed (Temporary directory must be on same partition as target) + p7zip failed moving the temporary file at the end of + compressing to target file if the directories don't reside + on the same partition (or network path). + - bug #1164659 fixed (Invalid file date for "big endian" machine) + - p7zip now uses ".so" instead of ".dll" + - p7zip now handles "ctrl-c" and "kill" to cleanup temporary files before exiting + - p7zip now runs on BeOS. + - better support of filenames with spaces. + - some code cleanup + - "myWindows/myFiles.cpp" is now in "Windows/FileIO.cpp" + - "myWindows/myFindFile.cpp" is now in "Windows/FileFind.cpp" + - "myWindows/myDirectoryAndPath.cpp" is now in "Windows/FileDir.cpp" + - "myWindows/myEvents.cpp" is now in "Windows/Synchronization.cpp" + - "myWindows/wine_strings.cpp" is now in "Windows/String.cpp" + + +Version 4.14.01 +=============== + - huge speed up for multi CPUs machines (Thanks to loderunner - http://sourceforge.net/users/loderunner/). + - some code cleanup + - Fix problems with link files or directories. + - "7z a dummy -tgzip -so Doc.txt > archive.gz" now works. + - in the messages, the path separator is now '/' instead of '\'. + +Version 4.14 +============ + + - From Windows version of 7-zip 4.14 : + - STL using was reduced + - 7za now supports Split(001) archives + - "7za | more" now works + - Bugs item #1093095 : Usage banner now says "7za" (instead of "7z") when the binary is "7za" + + - use of AString instead of std::string (no more need of #include ") + - makefile.linux_gcc_2.95_no_need_for_libstdc added to build 7za for the + p7zip*_bin.tar.bz2 package. + 7za provided by p7zip*_bin.tar.bz2 is build on Debian 3.0 with gcc 2.95.4 + and should now find the locale on all kinds of Linux (Debian, Fedora, Mandrake, ...). + +Version 4.13 +============ + - new port of 7za from the source of 7za 4.13Beta for Windows + + - From Windows version of 7-zip 4.13 : + - Switch "--" stops switches parsing + - Some bugs were fixed + - User's manual updated (DOCS/MANUAL/index.htm) + + - makefile.netbsd_x86 added [Bug #1069055]. + + - new method to install 7z and its plugins (the "link" method do no work) + + - installer added (install.sh). + + - makefile.macosx_with_fink becomes makefile.macosx + and makefile.macosx uses c++ instead of CC + (on some MacOSX, CC is a link to gcc instead of g++) + + - new flag "-utf16" to enable "utf16" conversion [Bug #1075229]. + + - new logic to automatically enable or disable "utf16" conversion : + no locale, locale=="C" or locale=="POSIX" implies utf16=off + else utf16=on + uses "-utf16" or "-no-utf16" to change this behaviour. + [Bug #1075229] + + - 7z (compiled with -O2) works now on Sparc Solaris. + +Version 4.12 +============ + - new port of 7za from the source of 7za 4.12Beta for Windows + + - From Windows version of 7-zip 4.11 and 4.12 : + - 7-Zip now supports Zip64 extension of ZIP format. So now it's + possible to compress files bigger than 4 GB to ZIP archives. + - Some bugs were fixed + + - fix "7za a archive.7z file" that added all the files and directories + with filename "file", "FILE", "File" ... + + - p7zip now displays the locale (ex : en_US.UTF-8) in the banner. + + - new flag "-no-utf16" to avoid lossly conversion in filenames. + CAUTION : use this flag when you do not plan to export your archive. + + - support creation of self extracting archive. + + - better support of symbolic link (now, an invalid symbolic link + do not stop archiving but displays a warning). + + - better support of files that the user cannot read. + (now this kind of file is not added to the archive, and p7zip displays a warning). + + - return of 7z and its plugins. + + - support of listing/testing/extracting files from a splitted archive (only with 7z). + + - support of MacOX X 10.X. + + - creation of Gzip/Tar archives didn't work on Linux Alpha. + + - see "contrib/VirtualFileSystemForMidnightCommander/readme" to use 7za with "mc". + +Version 4.10 +============ + - new port of 7za from the source of 7za 4.10Beta for Windows + => p7zip now work on big endian CPU. + + - 7z for Unix is not maintain anymore (because as the source of unrar plugin for 7z + is not available, 7z is unless on Unix). + +Version 0.91 +============ + - add support for FreeBSD 5.2.1 + In Windows/Time.h add "#include " + and prototype change for FileTimeToUnixTime() + + - bug 990684 Corrected : support of filesystem + that support case sensitive filenames. + Example, since version 0.91 : + "7z a glibc -r glibc-2.3.2" + does not terminate with error : + Duplicate filename: + glibc-2.3.2\sysdeps\m88k\m88100\add_n.S + glibc-2.3.2\sysdeps\m88k\m88100\add_n.s + +Version 0.90 +============ + - build of 7z.exe and its DLL. + 7z.exe support more archive formats than 7za.exe + thanks to DLL in Formats and Codecs directories + - "#pragma once" is now in comments + - mainly For OpenBSD : + - add #include in include_windows/winnt.h + - remove stuff for GUID_SECTION and GUID_SECT in include_windows/basetyps.h + and include_windows/initguid.h + - some changes in 7zip/Crypto/aesopt.h because of endian.h + +Version 0.81 +============ + - add a copy of the help of 7-zip (see html directory) + - "7z a -r tmp.7z directory" works as expected. + no more need for commands like : 7z a -r tmp.7z "directory/*" + - 7z restores the date of each files (but not directories) + - 7z supports UNICODE filenames (version 0.80 supports only ASCII/Latin1 filenames) + - support of gcc 2.95 + - support of gcc 3.4 + - 7z needs no more libgen.h (dirname() and basename()) + - less "Internal Error #7" during arguments parsing + - minor change in class CThread + +Version 0.80 +============ + - First public release + - support of gcc 3.2 and 3.3 + diff --git a/DOCS/7zC.txt b/DOCS/7zC.txt new file mode 100644 index 0000000..5d5d06d --- /dev/null +++ b/DOCS/7zC.txt @@ -0,0 +1,194 @@ +7z ANSI-C Decoder 4.62 +---------------------- + +7z ANSI-C provides 7z/LZMA decoding. +7z ANSI-C version is simplified version ported from C++ code. + +LZMA is default and general compression method of 7z format +in 7-Zip compression program (www.7-zip.org). LZMA provides high +compression ratio and very fast decompression. + + +LICENSE +------- + +7z ANSI-C Decoder is part of the LZMA SDK. +LZMA SDK is written and placed in the public domain by Igor Pavlov. + +Files +--------------------- + +7zDecode.* - Low level 7z decoding +7zExtract.* - High level 7z decoding +7zHeader.* - .7z format constants +7zIn.* - .7z archive opening +7zItem.* - .7z structures +7zMain.c - Test application + + +How To Use +---------- + +You must download 7-Zip program from www.7-zip.org. + +You can create .7z archive with 7z.exe or 7za.exe: + + 7za.exe a archive.7z *.htm -r -mx -m0fb=255 + +If you have big number of files in archive, and you need fast extracting, +you can use partly-solid archives: + + 7za.exe a archive.7z *.htm -ms=512K -r -mx -m0fb=255 -m0d=512K + +In that example 7-Zip will use 512KB solid blocks. So it needs to decompress only +512KB for extracting one file from such archive. + + +Limitations of current version of 7z ANSI-C Decoder +--------------------------------------------------- + + - It reads only "FileName", "Size", "LastWriteTime" and "CRC" information for each file in archive. + - It supports only LZMA and Copy (no compression) methods with BCJ or BCJ2 filters. + - It converts original UTF-16 Unicode file names to UTF-8 Unicode file names. + +These limitations will be fixed in future versions. + + +Using 7z ANSI-C Decoder Test application: +----------------------------------------- + +Usage: 7zDec + +: + e: Extract files from archive + l: List contents of archive + t: Test integrity of archive + +Example: + + 7zDec l archive.7z + +lists contents of archive.7z + + 7zDec e archive.7z + +extracts files from archive.7z to current folder. + + +How to use .7z Decoder +---------------------- + +Memory allocation +~~~~~~~~~~~~~~~~~ + +7z Decoder uses two memory pools: +1) Temporary pool +2) Main pool +Such scheme can allow you to avoid fragmentation of allocated blocks. + + +Steps for using 7z decoder +-------------------------- + +Use code at 7zMain.c as example. + +1) Declare variables: + inStream /* implements ILookInStream interface */ + CSzArEx db; /* 7z archive database structure */ + ISzAlloc allocImp; /* memory functions for main pool */ + ISzAlloc allocTempImp; /* memory functions for temporary pool */ + +2) call CrcGenerateTable(); function to initialize CRC structures. + +3) call SzArEx_Init(&db); function to initialize db structures. + +4) call SzArEx_Open(&db, inStream, &allocMain, &allocTemp) to open archive + +This function opens archive "inStream" and reads headers to "db". +All items in "db" will be allocated with "allocMain" functions. +SzArEx_Open function allocates and frees temporary structures by "allocTemp" functions. + +5) List items or Extract items + + Listing code: + ~~~~~~~~~~~~~ + { + UInt32 i; + for (i = 0; i < db.db.NumFiles; i++) + { + CFileItem *f = db.db.Files + i; + printf("%10d %s\n", (int)f->Size, f->Name); + } + } + + Extracting code: + ~~~~~~~~~~~~~~~~ + + SZ_RESULT SzAr_Extract( + CArchiveDatabaseEx *db, + ILookInStream *inStream, + UInt32 fileIndex, /* index of file */ + UInt32 *blockIndex, /* index of solid block */ + Byte **outBuffer, /* pointer to pointer to output buffer (allocated with allocMain) */ + size_t *outBufferSize, /* buffer size for output buffer */ + size_t *offset, /* offset of stream for required file in *outBuffer */ + size_t *outSizeProcessed, /* size of file in *outBuffer */ + ISzAlloc *allocMain, + ISzAlloc *allocTemp); + + If you need to decompress more than one file, you can send these values from previous call: + blockIndex, + outBuffer, + outBufferSize, + You can consider "outBuffer" as cache of solid block. If your archive is solid, + it will increase decompression speed. + + After decompressing you must free "outBuffer": + allocImp.Free(outBuffer); + +6) call SzArEx_Free(&db, allocImp.Free) to free allocated items in "db". + + + + +Memory requirements for .7z decoding +------------------------------------ + +Memory usage for Archive opening: + - Temporary pool: + - Memory for uncompressed .7z headers + - some other temporary blocks + - Main pool: + - Memory for database: + Estimated size of one file structures in solid archive: + - Size (4 or 8 Bytes) + - CRC32 (4 bytes) + - LastWriteTime (8 bytes) + - Some file information (4 bytes) + - File Name (variable length) + pointer + allocation structures + +Memory usage for archive Decompressing: + - Temporary pool: + - Memory for LZMA decompressing structures + - Main pool: + - Memory for decompressed solid block + - Memory for temprorary buffers, if BCJ2 fileter is used. Usually these + temprorary buffers can be about 15% of solid block size. + + +7z Decoder doesn't allocate memory for compressed blocks. +Instead of this, you must allocate buffer with desired +size before calling 7z Decoder. Use 7zMain.c as example. + + +Defines +------- + +_SZ_ALLOC_DEBUG - define it if you want to debug alloc/free operations to stderr. + + +--- + +http://www.7-zip.org +http://www.7-zip.org/sdk.html +http://www.7-zip.org/support.html diff --git a/DOCS/7zFormat.txt b/DOCS/7zFormat.txt new file mode 100644 index 0000000..55b52b1 --- /dev/null +++ b/DOCS/7zFormat.txt @@ -0,0 +1,469 @@ +7z Format description (4.59) +---------------------------- + +This file contains description of 7z archive format. +7z archive can contain files compressed with any method. +See "Methods.txt" for description for defined compressing methods. + + +Format structure Overview +------------------------- + +Some fields can be optional. + +Archive structure +~~~~~~~~~~~~~~~~~ +SignatureHeader +[PackedStreams] +[PackedStreamsForHeaders] +[ + Header + or + { + Packed Header + HeaderInfo + } +] + + + +Header structure +~~~~~~~~~~~~~~~~ +{ + ArchiveProperties + AdditionalStreams + { + PackInfo + { + PackPos + NumPackStreams + Sizes[NumPackStreams] + CRCs[NumPackStreams] + } + CodersInfo + { + NumFolders + Folders[NumFolders] + { + NumCoders + CodersInfo[NumCoders] + { + ID + NumInStreams; + NumOutStreams; + PropertiesSize + Properties[PropertiesSize] + } + NumBindPairs + BindPairsInfo[NumBindPairs] + { + InIndex; + OutIndex; + } + PackedIndices + } + UnPackSize[Folders][Folders.NumOutstreams] + CRCs[NumFolders] + } + SubStreamsInfo + { + NumUnPackStreamsInFolders[NumFolders]; + UnPackSizes[] + CRCs[] + } + } + MainStreamsInfo + { + (Same as in AdditionalStreams) + } + FilesInfo + { + NumFiles + Properties[] + { + ID + Size + Data + } + } +} + +HeaderInfo structure +~~~~~~~~~~~~~~~~~~~~ +{ + (Same as in AdditionalStreams) +} + + + +Notes about Notation and encoding +--------------------------------- + +7z uses little endian encoding. + +7z archive format has optional headers that are marked as +[] +Header +[] + +REAL_UINT64 means real UINT64. + +UINT64 means real UINT64 encoded with the following scheme: + + Size of encoding sequence depends from first byte: + First_Byte Extra_Bytes Value + (binary) + 0xxxxxxx : ( xxxxxxx ) + 10xxxxxx BYTE y[1] : ( xxxxxx << (8 * 1)) + y + 110xxxxx BYTE y[2] : ( xxxxx << (8 * 2)) + y + ... + 1111110x BYTE y[6] : ( x << (8 * 6)) + y + 11111110 BYTE y[7] : y + 11111111 BYTE y[8] : y + + + +Property IDs +------------ + +0x00 = kEnd + +0x01 = kHeader + +0x02 = kArchiveProperties + +0x03 = kAdditionalStreamsInfo +0x04 = kMainStreamsInfo +0x05 = kFilesInfo + +0x06 = kPackInfo +0x07 = kUnPackInfo +0x08 = kSubStreamsInfo + +0x09 = kSize +0x0A = kCRC + +0x0B = kFolder + +0x0C = kCodersUnPackSize +0x0D = kNumUnPackStream + +0x0E = kEmptyStream +0x0F = kEmptyFile +0x10 = kAnti + +0x11 = kName +0x12 = kCTime +0x13 = kATime +0x14 = kMTime +0x15 = kWinAttributes +0x16 = kComment + +0x17 = kEncodedHeader + +0x18 = kStartPos +0x19 = kDummy + + +7z format headers +----------------- + +SignatureHeader +~~~~~~~~~~~~~~~ + BYTE kSignature[6] = {'7', 'z', 0xBC, 0xAF, 0x27, 0x1C}; + + ArchiveVersion + { + BYTE Major; // now = 0 + BYTE Minor; // now = 2 + }; + + UINT32 StartHeaderCRC; + + StartHeader + { + REAL_UINT64 NextHeaderOffset + REAL_UINT64 NextHeaderSize + UINT32 NextHeaderCRC + } + + +........................... + + +ArchiveProperties +~~~~~~~~~~~~~~~~~ +BYTE NID::kArchiveProperties (0x02) +for (;;) +{ + BYTE PropertyType; + if (aType == 0) + break; + UINT64 PropertySize; + BYTE PropertyData[PropertySize]; +} + + +Digests (NumStreams) +~~~~~~~~~~~~~~~~~~~~~ + BYTE AllAreDefined + if (AllAreDefined == 0) + { + for(NumStreams) + BIT Defined + } + UINT32 CRCs[NumDefined] + + +PackInfo +~~~~~~~~~~~~ + BYTE NID::kPackInfo (0x06) + UINT64 PackPos + UINT64 NumPackStreams + + [] + BYTE NID::kSize (0x09) + UINT64 PackSizes[NumPackStreams] + [] + + [] + BYTE NID::kCRC (0x0A) + PackStreamDigests[NumPackStreams] + [] + + BYTE NID::kEnd + + +Folder +~~~~~~ + UINT64 NumCoders; + for (NumCoders) + { + BYTE + { + 0:3 CodecIdSize + 4: Is Complex Coder + 5: There Are Attributes + 6: Reserved + 7: There are more alternative methods. (Not used anymore, must be 0). + } + BYTE CodecId[CodecIdSize] + if (Is Complex Coder) + { + UINT64 NumInStreams; + UINT64 NumOutStreams; + } + if (There Are Attributes) + { + UINT64 PropertiesSize + BYTE Properties[PropertiesSize] + } + } + + NumBindPairs = NumOutStreamsTotal - 1; + + for (NumBindPairs) + { + UINT64 InIndex; + UINT64 OutIndex; + } + + NumPackedStreams = NumInStreamsTotal - NumBindPairs; + if (NumPackedStreams > 1) + for(NumPackedStreams) + { + UINT64 Index; + }; + + + + +Coders Info +~~~~~~~~~~~ + + BYTE NID::kUnPackInfo (0x07) + + + BYTE NID::kFolder (0x0B) + UINT64 NumFolders + BYTE External + switch(External) + { + case 0: + Folders[NumFolders] + case 1: + UINT64 DataStreamIndex + } + + + BYTE ID::kCodersUnPackSize (0x0C) + for(Folders) + for(Folder.NumOutStreams) + UINT64 UnPackSize; + + + [] + BYTE NID::kCRC (0x0A) + UnPackDigests[NumFolders] + [] + + + + BYTE NID::kEnd + + + +SubStreams Info +~~~~~~~~~~~~~~ + BYTE NID::kSubStreamsInfo; (0x08) + + [] + BYTE NID::kNumUnPackStream; (0x0D) + UINT64 NumUnPackStreamsInFolders[NumFolders]; + [] + + + [] + BYTE NID::kSize (0x09) + UINT64 UnPackSizes[] + [] + + + [] + BYTE NID::kCRC (0x0A) + Digests[Number of streams with unknown CRC] + [] + + + BYTE NID::kEnd + + +Streams Info +~~~~~~~~~~~~ + + [] + PackInfo + [] + + + [] + CodersInfo + [] + + + [] + SubStreamsInfo + [] + + BYTE NID::kEnd + + +FilesInfo +~~~~~~~~~ + BYTE NID::kFilesInfo; (0x05) + UINT64 NumFiles + + for (;;) + { + BYTE PropertyType; + if (aType == 0) + break; + + UINT64 Size; + + switch(PropertyType) + { + kEmptyStream: (0x0E) + for(NumFiles) + BIT IsEmptyStream + + kEmptyFile: (0x0F) + for(EmptyStreams) + BIT IsEmptyFile + + kAnti: (0x10) + for(EmptyStreams) + BIT IsAntiFile + + case kCTime: (0x12) + case kATime: (0x13) + case kMTime: (0x14) + BYTE AllAreDefined + if (AllAreDefined == 0) + { + for(NumFiles) + BIT TimeDefined + } + BYTE External; + if(External != 0) + UINT64 DataIndex + [] + for(Definded Items) + UINT64 Time + [] + + kNames: (0x11) + BYTE External; + if(External != 0) + UINT64 DataIndex + [] + for(Files) + { + wchar_t Names[NameSize]; + wchar_t 0; + } + [] + + kAttributes: (0x15) + BYTE AllAreDefined + if (AllAreDefined == 0) + { + for(NumFiles) + BIT AttributesAreDefined + } + BYTE External; + if(External != 0) + UINT64 DataIndex + [] + for(Definded Attributes) + UINT32 Attributes + [] + } + } + + +Header +~~~~~~ + BYTE NID::kHeader (0x01) + + [] + ArchiveProperties + [] + + [] + BYTE NID::kAdditionalStreamsInfo; (0x03) + StreamsInfo + [] + + [] + BYTE NID::kMainStreamsInfo; (0x04) + StreamsInfo + [] + + [] + FilesInfo + [] + + BYTE NID::kEnd + + +HeaderInfo +~~~~~~~~~~ + [] + BYTE NID::kEncodedHeader; (0x17) + StreamsInfo for Encoded Header + [] + + +--- +End of document diff --git a/DOCS/License.txt b/DOCS/License.txt new file mode 100644 index 0000000..a6a7218 --- /dev/null +++ b/DOCS/License.txt @@ -0,0 +1,52 @@ + 7-Zip source code + ~~~~~~~~~~~~~~~~~ + License for use and distribution + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + 7-Zip Copyright (C) 1999-2010 Igor Pavlov. + + Licenses for files are: + + 1) CPP/7zip/Compress/Rar* files: GNU LGPL + unRAR restriction + 2) All other files: GNU LGPL + + The GNU LGPL + unRAR restriction means that you must follow both + GNU LGPL rules and unRAR restriction rules. + + + GNU LGPL information + -------------------- + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + + unRAR restriction + ----------------- + + The decompression engine for RAR archives was developed using source + code of unRAR program. + All copyrights to original unRAR code are owned by Alexander Roshal. + + The license for original unRAR code has the following restriction: + + The unRAR sources cannot be used to re-create the RAR compression algorithm, + which is proprietary. Distribution of modified unRAR sources in separate form + or as a part of other software is permitted, provided that it is clearly + stated in the documentation and source comments that the code may + not be used to develop a RAR (WinRAR) compatible archiver. + + + -- + Igor Pavlov diff --git a/DOCS/MANUAL/commands/add.htm b/DOCS/MANUAL/commands/add.htm new file mode 100644 index 0000000..7bc5ea2 --- /dev/null +++ b/DOCS/MANUAL/commands/add.htm @@ -0,0 +1,87 @@ + + + + + a (Add) command + + + + + +

a (Add) command

+ +

Adds files to archive.

+ +

Examples

+ +
+7z a archive1.zip subdir\
+
+ +

adds all files and subfolders from folder subdir to archive + archive1.zip. + The filenames in archive will contain subdir\ prefix.

+ +
+7z a archive2.zip .\subdir\*
+
+ +

adds all files and subfolders from folder subdir to archive + archive2.zip. + The filenames in archive will not contain subdir\ prefix.

+ + +
+cd /D c:\dir1\
+7z a c:\archive3.zip dir2\dir3\ 
+
+ +The filenames in archive c:\archive3.zip +will contain dir2\dir3\ prefix, +but they will not contain c:\dir1\ prefix. + +
+7z a Files.7z *.txt -r
+
+ +

adds all *.txt files from current folder and its subfolders to archive + Files.7z.

+ + +

Notes

+ +

7-Zip doesn't uses the system wildcard parser. 7-Zip doesn't +follow the archaic rule by which *.* means any file. 7-Zip treats +*.* as matching the name of any file that has an extension. To process +all files, you must use a * wildcard.

+ + +

Switches that can be used with this command

+ +

+ -i (Include)
+ -m (Method)
+ -p (Set Password)
+ -r (Recurse)
+ -sfx (create SFX)
+ -si (use StdIn)
+ -so (use StdOut)
+ -t (Type of archive)
+ -u (Update)
+ -v (Volumes)
+ -w (Working Dir)
+ -x (Exclude) +

+ +

See also

+ +

+ Commands: + d (Delete), + u (Update)
+ Switches: + -u (Update) +

+ + + diff --git a/DOCS/MANUAL/commands/bench.htm b/DOCS/MANUAL/commands/bench.htm new file mode 100644 index 0000000..14f456c --- /dev/null +++ b/DOCS/MANUAL/commands/bench.htm @@ -0,0 +1,79 @@ + + + + + b (Benchmark) command + + + + + +

b (Benchmark) command

+ +

Measures speed of the CPU and checks RAM for errors.

+ +

Syntax

+ +
+b [number_of_iterations] [-mmt{N}] [-md{N}] [-mm={Method}]
+
+ +

There are two tests:

+

    +
  1. Compressing with LZMA method +
  2. Decompressing with LZMA method +
+ +

The benchmark shows a rating in MIPS (million instructions per second). +The rating value is calculated from the measured CPU speed and it +is normalized with results of Intel Core 2 CPU with multi-threading option +switched off. So if you have Intel Core 2 Duo, +rating values must be close to real CPU frequency.

+ +

You can change the upper dictionary size to increase memory usage by -md{N} switch. +Also, you can change the number of threads by -mmt{N} switch.

+ +

The Dict column shows dictionary size. For example, 21 means 2^21 = 2 MB.

+ +

The Usage column shows the percentage of time the processor is working. +It's normalized for a one-thread load. For example, 180% CPU Usage for 2 threads +can mean that average CPU usage is about 90% for each thread.

+ +

The R / U column shows the rating normalized for 100% of CPU usage. +That column shows the performance of one average CPU thread.

+ +

Avr shows averages for different dictionary sizes.

+

Tot shows averages of the compression and decompression ratings.

+ +

Compression speed and rating strongly depend on memory (RAM) latency. + +

Decompression speed and rating strongly depend on the integer performance of the CPU. +For example, the Intel Pentium 4 has big branch +misprediction penalty (which is an effect of its long pipeline) and pretty slow +multiply and shift operations. So, the Pentium 4 has pretty low decompressing ratings.

+ +

You can run a CRC calculation benchmark by specifying -mm=crc. +That test shows the speed of CRC calculation in MB/s. The first column shows the size of the block. +The next column shows the speed of CRC calculation for one thread. The other columns are results +for multi-threaded CRC calculation.

+ + +

Examples

+ +
+7z b
+
+runs benchmarking. + +
+7z b -mmt1 -md26
+
+runs benchmarking with one thread and 64 MB dictionary. + +
+7z b 30
+
+

runs benchmarking with default settings for 30 iterations.

+ + + diff --git a/DOCS/MANUAL/commands/delete.htm b/DOCS/MANUAL/commands/delete.htm new file mode 100644 index 0000000..845b8d8 --- /dev/null +++ b/DOCS/MANUAL/commands/delete.htm @@ -0,0 +1,59 @@ + + + + + d (Delete) command + + + + + +

d (Delete) command

+ +

Deletes files from archive.

+ +

Example

+ +
+7z d archive.zip *.bak -r
+
+ +

deletes *.bak files from archive + archive.zip.

+ + +

Notes

+ +

7-Zip doesn't uses the system wildcard parser. 7-Zip doesn't +follow the archaic rule by which *.* means any file. 7-Zip treats +*.* as matching the name of any file that has an extension. To process +all files, you must use a * wildcard.

+ + +

Switches that can be used with this command

+ +

+ -i (Include)
+ -m (Method)
+ -p (Set Password)
+ -r (Recurse)
+ -u (Update)
+ -w (Working Dir)
+ -x (Exclude) +

+ +

See also

+ +

+ Commands: + a (Add), + u (Update) +

+ +

+ Switches: + -u (Update) +

+ + + diff --git a/DOCS/MANUAL/commands/extract.htm b/DOCS/MANUAL/commands/extract.htm new file mode 100644 index 0000000..dad6b2b --- /dev/null +++ b/DOCS/MANUAL/commands/extract.htm @@ -0,0 +1,91 @@ + + + + + e (Extract) command + + + + + +

e (Extract) command

+ +

Extracts files from an archive to the current +directory or to the output directory. The output directory can be specified by +-o (Set Output Directory) switch.

+ +

This command copies all extracted files to one directory. +If you want extract files with full paths, you must use +x (Extract with full paths) command. + +

7-Zip will prompt the user before overwriting existing files unless +the user specifies the -y (Assume Yes on all queries) +switch. If the user gives a no answer, 7-Zip will prompt for the file to be +extracted to a new filename. Then a no answer skips that file; or, yes +prompts for new filename.

+ +

7-Zip accepts the following responses:

+ + + + + + + + + +
Answer Abbr. Action
Yes y  
No n  
Always a Assume YES for ALL subsequent queries of the same class
Skip s Assume NO for ALL subsequent queries of the same class
Quit q Quit the program
+ +

Abbreviated responses are allowed.

+ +

Examples

+ +
+7z e archive.zip
+
+ +

extracts all files from archive + archive.zip to the current directory.

+ +
+7z e archive.zip -oc:\soft *.cpp -r
+
+ +

extracts all *.cpp files from archive + archive.zip to c:\soft folder.

+ + +

Notes

+ +

7-Zip doesn't uses the system wildcard parser. 7-Zip doesn't +follow the archaic rule by which *.* means any file. 7-Zip treats +*.* as matching the name of any file that has an extension. To process +all files, you must use a * wildcard.

+ + +

Switches that can be used with this command

+ +

+ -ai (Include archives)
+ -an (Disable parsing of archive_name)
+ -ao (Overwrite mode)
+ -ax (Exclude archives)
+ -i (Include)
+ -o (Set Output Directory)
+ -p (Set Password)
+ -r (Recurse)
+ -so (use StdOut)
+ -t (Type of archive)
+ -x (Exclude)
+ -y (Assume Yes on all queries) +

+ +

See also

+ +

+ Commands: + x (Extract with full paths) +

+ + + diff --git a/DOCS/MANUAL/commands/extract_full.htm b/DOCS/MANUAL/commands/extract_full.htm new file mode 100644 index 0000000..3f857a6 --- /dev/null +++ b/DOCS/MANUAL/commands/extract_full.htm @@ -0,0 +1,68 @@ + + + + + x (Extract with full paths) command + + + + + +

x (Extract with full paths) command

+ +

Extracts files from an archive with their full +paths in the current directory, or in an output directory if specified.

+ +

See the e (Extract) command description for more details.

+ +

Examples

+ +
+7z x archive.zip
+
+ +

extracts all files from the archive + archive.zip to the current directory.

+ +
+7z x archive.zip -oc:\soft *.cpp -r
+
+ +

extracts all *.cpp files from the archive + archive.zip to c:\soft folder.

+ + +

Notes

+ +

7-Zip doesn't uses the system wildcard parser. 7-Zip doesn't +follow the archaic rule by which *.* means any file. 7-Zip treats +*.* as matching the name of any file that has an extension. To process +all files, you must use a * wildcard.

+ + +

Switches that can be used with this command

+ +

+ -ai (Include archives)
+ -an (Disable parsing of archive_name)
+ -ao (Overwrite mode)
+ -ax (Exclude archives)
+ -i (Include)
+ -o (Set Output Directory)
+ -p (Set Password)
+ -r (Recurse)
+ -so (use StdOut)
+ -t (Type of archive)
+ -x (Exclude)
+ -y (Assume Yes on all queries) +

+ +

See also

+ +

+ Commands: + e (Extract) +

+ + + diff --git a/DOCS/MANUAL/commands/index.htm b/DOCS/MANUAL/commands/index.htm new file mode 100644 index 0000000..579ea29 --- /dev/null +++ b/DOCS/MANUAL/commands/index.htm @@ -0,0 +1,33 @@ + + + + + Command Line Commands + + + + + +

Command Line Commands

+ +

The command is the first non-switch argument on the command line.

+

Command names are not case sensitive.

+

See also Command Line Syntax for more details about using the command line.

+ +

Commands quick reference

+ + + + + + + + + + + +
CommandDescription
a Add
b Benchmark
d Delete
e Extract
l List
t Test
u Update
x eXtract with full paths
+ + + + diff --git a/DOCS/MANUAL/commands/list.htm b/DOCS/MANUAL/commands/list.htm new file mode 100644 index 0000000..1eba758 --- /dev/null +++ b/DOCS/MANUAL/commands/list.htm @@ -0,0 +1,77 @@ + + + + + l (List contents of archive) command + + + + + +

l (List contents of archive) command

+ + + + + +

Lists contents of archive.

+ + + + +

Examples

+ +
+7z l archive.zip
+
+ +

lists all files from archive archive.zip.

+ + + + +

Notes

+ +

7-Zip doesn't uses the system wildcard parser. 7-Zip doesn't +follow the archaic rule by which *.* means any file. 7-Zip treats +*.* as matching the name of any file that has an extension. To process +all files, you must use a * wildcard.

+ + +

Switches that can be used with this command

+ +

+ -ai (Include archives)
+ -an (Disable parsing of archive_name)
+ -ax (Exclude archives)
+ -i (Include)
+ -slt (Show technical information)
+ -p (Set Password)
+ -r (Recurse)
+ -t (Type of archive)
+ -x (Exclude) +

+ + + diff --git a/DOCS/MANUAL/commands/style.css b/DOCS/MANUAL/commands/style.css new file mode 100644 index 0000000..13ebb79 --- /dev/null +++ b/DOCS/MANUAL/commands/style.css @@ -0,0 +1,232 @@ +body + { + padding: 0px 0px 0px 26px; + background: #ffffff; + color: #000000; + font-family: Verdana, Arial, Helvetica, sans-serif; + font-size: 80%; + } + +div + { + width: 90%; + border: 2px solid #999999; + padding: 4px 8px; + background: #cccccc; + } + +h1, h2, h3, h4 + { + font-family: Verdana, Arial, Helvetica, sans-serif; + margin-left: -26px; + } + +h1 + { + font-size: 145%; + margin-top: .5em; + margin-bottom: 1em; + } + +h2 + { + font-size: 130%; + margin-top: 1.5em; + margin-bottom: .6em; + } + +h3 + { + font-size: 115%; + margin-top: 1.5em; + margin-bottom: .6em; + } + +h4 + { + font-size: 100%; + margin-top: 1.5em; + margin-bottom: .6em; + } + +ul p, ol p, dl p + { + margin-left: 0em; + } + +p + { + margin-top: .6em; + margin-bottom: .6em; + } + +dl + { + /*margin-top: 0em; */ + } + +dt + { + margin-top: .76em; + margin-bottom: .5em; + font-weight: bold; + } + +dd + { + margin-top: .5em; + margin-bottom: .5em; + margin-left: 1.9em; + } + + +ul, ol + { + margin-top: .6em; + margin-bottom: 0em; + } + +ol + { + margin-left: 3.6em; + } + +ul + { + list-style-type: disc; + margin-left: 1.9em; + } + +li + { + margin-bottom: .6em; + } + +ul ol, ol ol + { + list-style-type: lower-alpha; + { + + /* +pre + { + margin-top: .6em; + margin-bottom: .6em; + } + */ + +pre,code + { + font: 100% Courier New, Courier, mono; + color: #000000; + cursor: text; + } + +pre.syntax + { + background: #dddddd; + padding: 2pt,4pt + } + +pre.syntax + { + color: #000000; + } + +pre.example + { + margin-left: 2.0em; + /*margin-top: 12.0em;*/ + /*margin-bottom: 1.0em;*/ + color: #C00000; + /*padding: 10pt,20pt*/ + } + +table + { + /* width: 90%; */ + background: #999999; + margin-top: .6em; + margin-bottom: .3em; + } + +th + { + padding: 4px 8px; + background: #cccccc; + text-align: left; + font-size: 80%; + vertical-align: bottom; + } + +th.cc + { + text-align: center; + vertical-align: middle; + } + +td + { + padding: 4px 8px; + background: #ffffff; + vertical-align: top; + font-size: 80%; + } + +td.cc + { + text-align: center; + vertical-align: middle; + } + + +blockquote + { + margin-left: 3.8em; + margin-right: 3.8em; + margin-top: .6em; + margin-bottom: .6em; + } + +a:link + { + color: #0066ff; + } + +a:visited + { + color: #996600; + } + +a:hover + { + color: #cc9900; + } + +a.parameter:link + { + color: #0066ff; + text-decoration:none; + } + +a.parameter:visited + { + text-decoration:none; + } + +div.footer + { + width: 100%; + border: none; + background: #ffffff; + margin-top: 18pt; + padding-bottom: 12pt; + color: #228B22; + text-align: center; + font-size: 70%; + } + +span.filename +{ + color: #F00000; +} diff --git a/DOCS/MANUAL/commands/test.htm b/DOCS/MANUAL/commands/test.htm new file mode 100644 index 0000000..b09f8a4 --- /dev/null +++ b/DOCS/MANUAL/commands/test.htm @@ -0,0 +1,46 @@ + + + + + t (Test integrity of archive) command + + + + + +

t (Test integrity of archive) command

+ +

Tests archive files.

+ +

Example

+ +
+7z t archive.zip *.doc -r
+
+ +

tests *.doc files in archive + archive.zip.

+ + +

Notes

+ +

7-Zip doesn't uses the system wildcard parser. 7-Zip doesn't +follow the archaic rule by which *.* means any file. 7-Zip treats +*.* as matching the name of any file that has an extension. To process +all files, you must use a * wildcard.

+ + +

Switches that can be used with this command

+ +

+ -ai (Include archives)
+ -an (Disable parsing of archive_name)
+ -ax (Exclude archives)
+ -i (Include)
+ -p (Set Password)
+ -r (Recurse)
+ -x (Exclude) +

+ + + diff --git a/DOCS/MANUAL/commands/update.htm b/DOCS/MANUAL/commands/update.htm new file mode 100644 index 0000000..8600801 --- /dev/null +++ b/DOCS/MANUAL/commands/update.htm @@ -0,0 +1,66 @@ + + + + + u (Update) command + + + + + +

u (Update) command

+ +

Update older files in the archive and add files that are not already in the archive.

+ +

Note: the updating of solid .7z archives can be slow, since it +can require some recompression.

+ +

Example

+ +
+7z u archive.zip *.doc
+
+ +

updates *.doc files to archive + archive.zip.

+ + +

Notes

+ +

7-Zip doesn't uses the system wildcard parser. 7-Zip doesn't +follow the archaic rule by which *.* means any file. 7-Zip treats +*.* as matching the name of any file that has an extension. To process +all files, you must use a * wildcard.

+ + +

Switches that can be used with this command

+ +

+ -i (Include)
+ -m (Method)
+ -p (Set Password)
+ -r (Recurse)
+ -sfx (create SFX)
+ -si (use StdIn)
+ -so (use StdOut)
+ -t (Type of archive)
+ -u (Update)
+ -w (Working Dir)
+ -x (Exclude) +

+ +

See also

+ +

+ Commands: + a (Add), + d (Delete), +

+ +

+ Switches: + -u (Update) +

+ + + diff --git a/DOCS/MANUAL/exit_codes.htm b/DOCS/MANUAL/exit_codes.htm new file mode 100644 index 0000000..4cdc74a --- /dev/null +++ b/DOCS/MANUAL/exit_codes.htm @@ -0,0 +1,27 @@ + + + + + Exit Codes from 7-Zip + + + + + +

Exit Codes from 7-Zip

+ +

7-Zip returns the following exit codes:

+ + + + + + + + + +
CodeMeaning
0No error
1Warning (Non fatal error(s)). For example, one or more files were + locked by some other application, so they were not compressed.
2Fatal error
7Command line error
8Not enough memory for operation
255User stopped the process
+ + + diff --git a/DOCS/MANUAL/index.htm b/DOCS/MANUAL/index.htm new file mode 100644 index 0000000..5bf8aae --- /dev/null +++ b/DOCS/MANUAL/index.htm @@ -0,0 +1,29 @@ + + + + + Command Line Version User's Guide + + + + + +

Command Line Version User's Guide

+ + +

7z.exe is the command line version of 7-Zip. 7z.exe uses 7z.dll +from the 7-Zip package. 7z.dll is used by the 7-Zip File Manager also. + +

7za.exe (a = alone) is a standalone version of 7-Zip. +7za.exe supports only 7z, lzma, cab, zip, gzip, bzip2, Z and tar formats. +7za.exe doesn't use external modules. + +

+ + + diff --git a/DOCS/MANUAL/style.css b/DOCS/MANUAL/style.css new file mode 100644 index 0000000..13ebb79 --- /dev/null +++ b/DOCS/MANUAL/style.css @@ -0,0 +1,232 @@ +body + { + padding: 0px 0px 0px 26px; + background: #ffffff; + color: #000000; + font-family: Verdana, Arial, Helvetica, sans-serif; + font-size: 80%; + } + +div + { + width: 90%; + border: 2px solid #999999; + padding: 4px 8px; + background: #cccccc; + } + +h1, h2, h3, h4 + { + font-family: Verdana, Arial, Helvetica, sans-serif; + margin-left: -26px; + } + +h1 + { + font-size: 145%; + margin-top: .5em; + margin-bottom: 1em; + } + +h2 + { + font-size: 130%; + margin-top: 1.5em; + margin-bottom: .6em; + } + +h3 + { + font-size: 115%; + margin-top: 1.5em; + margin-bottom: .6em; + } + +h4 + { + font-size: 100%; + margin-top: 1.5em; + margin-bottom: .6em; + } + +ul p, ol p, dl p + { + margin-left: 0em; + } + +p + { + margin-top: .6em; + margin-bottom: .6em; + } + +dl + { + /*margin-top: 0em; */ + } + +dt + { + margin-top: .76em; + margin-bottom: .5em; + font-weight: bold; + } + +dd + { + margin-top: .5em; + margin-bottom: .5em; + margin-left: 1.9em; + } + + +ul, ol + { + margin-top: .6em; + margin-bottom: 0em; + } + +ol + { + margin-left: 3.6em; + } + +ul + { + list-style-type: disc; + margin-left: 1.9em; + } + +li + { + margin-bottom: .6em; + } + +ul ol, ol ol + { + list-style-type: lower-alpha; + { + + /* +pre + { + margin-top: .6em; + margin-bottom: .6em; + } + */ + +pre,code + { + font: 100% Courier New, Courier, mono; + color: #000000; + cursor: text; + } + +pre.syntax + { + background: #dddddd; + padding: 2pt,4pt + } + +pre.syntax + { + color: #000000; + } + +pre.example + { + margin-left: 2.0em; + /*margin-top: 12.0em;*/ + /*margin-bottom: 1.0em;*/ + color: #C00000; + /*padding: 10pt,20pt*/ + } + +table + { + /* width: 90%; */ + background: #999999; + margin-top: .6em; + margin-bottom: .3em; + } + +th + { + padding: 4px 8px; + background: #cccccc; + text-align: left; + font-size: 80%; + vertical-align: bottom; + } + +th.cc + { + text-align: center; + vertical-align: middle; + } + +td + { + padding: 4px 8px; + background: #ffffff; + vertical-align: top; + font-size: 80%; + } + +td.cc + { + text-align: center; + vertical-align: middle; + } + + +blockquote + { + margin-left: 3.8em; + margin-right: 3.8em; + margin-top: .6em; + margin-bottom: .6em; + } + +a:link + { + color: #0066ff; + } + +a:visited + { + color: #996600; + } + +a:hover + { + color: #cc9900; + } + +a.parameter:link + { + color: #0066ff; + text-decoration:none; + } + +a.parameter:visited + { + text-decoration:none; + } + +div.footer + { + width: 100%; + border: none; + background: #ffffff; + margin-top: 18pt; + padding-bottom: 12pt; + color: #228B22; + text-align: center; + font-size: 70%; + } + +span.filename +{ + color: #F00000; +} diff --git a/DOCS/MANUAL/switches/ar_exclude.htm b/DOCS/MANUAL/switches/ar_exclude.htm new file mode 100644 index 0000000..6978918 --- /dev/null +++ b/DOCS/MANUAL/switches/ar_exclude.htm @@ -0,0 +1,56 @@ + + + + + -ax (Exclude archive filenames) switch + + + + + +

-ax (Exclude archive filenames) switch

+ +

Specifies archives to be excluded from the operation.

+

Multiple exclude archive switches are supported.

+ +

Syntax

+ +
+-ax[<recurse_type>]<file_ref>
+
+<recurse_type> ::= r[- | 0]
+<file_ref> ::= @{listfile} | !{wildcard}
+
+ +

See -xi (Include archive filenames) switch description +for information about option parameters.

+ + +

Examples

+ +
+7z t -an -ai!*.7z -ax!a*.7z
+
+ +

tests all *.7z archives, + except a*.7z archives.

+ +

Commands that can be used with this switch

+ +

+ e (Extract), + l (List), + t (Test), + x (Extract with full paths) +

+ +

See also

+ +

+ Switches: + -ai (Include archives) + -an (Disable parsing of archive_name) +

+ + + diff --git a/DOCS/MANUAL/switches/ar_include.htm b/DOCS/MANUAL/switches/ar_include.htm new file mode 100644 index 0000000..30a5a9b --- /dev/null +++ b/DOCS/MANUAL/switches/ar_include.htm @@ -0,0 +1,83 @@ + + + + + -ai (Include archive filenames) switch + + + + + +

-ai (Include archive filenames) switch

+ +

Specifies additional include archive filenames and wildcards.

+

Multiple include switches are supported.

+ +

Syntax

+ +
+-ai[<recurse_type>]<file_ref>
+
+<recurse_type> ::= r[- | 0]
+<file_ref> ::= @{listfile} | !{wildcard}
+
+ +

Parameters

+ +
+
<recurse_type>
+

Specifies how wildcards and file names in this switch must + be used. If this option is not given, recursion will be not used. + For more details see specification of the + -r (Recurse) switch.

+
+<recurse_type> ::= r[- | 0]
+
+ +
+
<file_ref>
+
+

Specifies filenames and wildcards or list file that specify processed files.

+
+<file_ref> ::= @{listfile} | !{wildcard}
+
+ + + + +
Option Description
{listfile} Specifies name of list file. See + List file description.
{wildcard} Specifies wildcard or filename.
+
+
+ +

Examples

+ +
+7z t -an -air!*.7z
+
+ +

tests *.7z archives in current directory and all it's +subdirectories.

+ +

Commands that can be used with this switch

+ +

+ a (Add), + d (Delete), + e (Extract), + l (List), + t (Test), + u (Update), + x (Extract with full paths) +

+ +

See also

+ +

+ Switches: + -ax (Exclude archives) + -an (Disable parsing of archive_name) +

+ + + diff --git a/DOCS/MANUAL/switches/ar_no.htm b/DOCS/MANUAL/switches/ar_no.htm new file mode 100644 index 0000000..d925f13 --- /dev/null +++ b/DOCS/MANUAL/switches/ar_no.htm @@ -0,0 +1,52 @@ + + + + + -an (Disable parsing of archive_name) switch + + + + + +

-an (Disable parsing of archive_name) switch

+ +

Disables parsing of the archive_name field on the command line. +This switch must be used with the +-ai (Include archives) switch. +If you use a file list for your archives, you specify it with the -ai switch, +so you need to disable parsing of archive_name field from command line. + +

Syntax

+ +
+-an
+
+ +

Examples

+ +
+7z t -an -ai!*.7z -ax!a*.7z
+
+ +

tests all *.7z archives, + except a*.7z archives.

+ +

Commands that can be used with this switch

+ +

+ e (Extract), + l (List), + t (Test), + x (Extract with full paths) +

+ +

See also

+ +

+ Switches: + -ai (Include archives) + -ax (Exclude archives) +

+ + + diff --git a/DOCS/MANUAL/switches/charset.htm b/DOCS/MANUAL/switches/charset.htm new file mode 100644 index 0000000..e308026 --- /dev/null +++ b/DOCS/MANUAL/switches/charset.htm @@ -0,0 +1,49 @@ + + + + + -scs (Set charset for list files) switch + + + + + +

-scs (Set charset for list files) switch

+ +

Sets charset for list files.

+ +

Syntax

+ +
+-scs{UTF-8 | WIN | DOS}
+
+ +

Default charset is UTF-8.

+ +
+
UTF-8
+
Unicode UTF-8 character set.
+
WIN
+
Default character set of Windows.
+
DOS
+
Default DOS (OEM) character set of Windows.
+
+ +

Example

+ +
+7z a archive.7z @listfile.txt -scsWIN
+
+ +

compresses files from listfile.txt list, that contains +list of files in default character set of Windows.

+ +

Commands that can be used with this switch

+ +

+ a (Add), + u (Update) +

+ + + diff --git a/DOCS/MANUAL/switches/exclude.htm b/DOCS/MANUAL/switches/exclude.htm new file mode 100644 index 0000000..faf8768 --- /dev/null +++ b/DOCS/MANUAL/switches/exclude.htm @@ -0,0 +1,60 @@ + + + + + -x (Exclude filenames) switch + + + + + +

-x (Exclude filenames) switch

+ +

Specifies which filenames or wildcarded names must be excluded from the operation.

+

Multiple exclude switches are supported.

+ +

Syntax

+ +
+-x[<recurse_type>]<file_ref>
+
+<recurse_type> ::= r[- | 0]
+<file_ref> ::= @{listfile} | !{wildcard}
+
+ +

See -i (Include) switch description for information about + option parameters.

+ + +

Examples

+ +
+7z a -tzip archive.zip *.txt -x!temp.*
+
+ +

adds to the archive archive.zip all + *.txt files, + except temp.* files.

+ +

Commands that can be used with this switch

+ +

+ a (Add), + d (Delete), + e (Extract), + l (List), + t (Test), + u (Update), + x (Extract with full paths) +

+ +

See also

+ +

+ Switches: + -r (Recurse), + -i (Include) +

+ + + diff --git a/DOCS/MANUAL/switches/include.htm b/DOCS/MANUAL/switches/include.htm new file mode 100644 index 0000000..009f5ef --- /dev/null +++ b/DOCS/MANUAL/switches/include.htm @@ -0,0 +1,87 @@ + + + + + -i (Include filenames) switch + + + + + +

-i (Include filenames) switch

+ +

Specifies additional include filenames and wildcards.

+

Multiple include switches are supported.

+ +

Syntax

+ +
+-i[<recurse_type>]<file_ref>
+
+<recurse_type> ::= r[- | 0]
+<file_ref> ::= @{listfile} | !{wildcard}
+
+ +

Parameters

+ +
+
<recurse_type>
+

Specifies how wildcards and file names in this switch must + be used. If this option is not given, then the global value, assigned + by the -r (Recurse) switch will be used. For + more details see specification of the + -r (Recurse) switch.

+
+<recurse_type> ::= r[- | 0]
+
+ +
+
<file_ref>
+
+

Specifies filenames and wildcards, or a list file, for files to be processed.

+
+<file_ref> ::= @{listfile} | !{wildcard}
+
+ + + + +
Option Description
{listfile} Specifies name of list file. See + List file description.
{wildcard} Specifies wildcard or filename.
+
+
+ +

Examples

+ +
+7z a -tzip src.zip *.txt -ir!DIR1\*.cpp
+
+ +

adds to src.zip archive all + *.txt files from current directory + and all *.cpp + files from directory DIR1 + and from all it's subdirectories.

+ +

Commands that can be used with this switch

+ +

+ a (Add), + d (Delete), + e (Extract), + l (List), + t (Test), + u (Update), + x (Extract with full paths) +

+ +

See also

+ +

+ Switches: + -r (Recurse), + -x (Exclude) +

+ + + diff --git a/DOCS/MANUAL/switches/index.htm b/DOCS/MANUAL/switches/index.htm new file mode 100644 index 0000000..65e335d --- /dev/null +++ b/DOCS/MANUAL/switches/index.htm @@ -0,0 +1,64 @@ + + + + + Command Line Switches + + + + + +

Command Line Switches

+ +

Syntax

+ +
+<switch>::= <switch_symbol><switch_characters>[<option>]
+<switch_symbol> ::= '/' | '-' 
+
+
+

On the command line, a switch consists of a switch specifier, +either a dash (-) or a forward slash (/), followed by the name of +the switch. Switch names cannot be abbreviated.

+ +

Some switches take an argument after the switch name. +No spaces or tabs are allowed within a switch specification. +Switch names are not case sensitive, but arguments can be case sensitive. +

+ +

Switch can be used in any place in command line. + +

See also Command Line Syntax for more details + about using the command line.

+ +

Switch quick reference

+ + + + + + + + + + + + + + + + + + + + + + + + + + +
SwitchDescription
-- Stop switches parsing
-ai Include archive filenames
-an Disable parsing of archive_name
-ao Overwrite mode
-ax Exclude archive filenames
-i Include filenames
-m Set Compression Method
-o Set Output directory
-p Set Password
-r Recurse subdirectories
-scs Set charset for list files
-slp Set Large Pages mode
-slt Show technical information
-sfx Create SFX archive
-si Read data from StdIn
-so Write data to StdOut
-ssc Set Sensitive Case mode
-t Type of archive
-u Update options
-v Create Volumes
-w Set Working directory
-x Exclude filenames
-y Assume Yes on all queries
+ + + diff --git a/DOCS/MANUAL/switches/large_pages.htm b/DOCS/MANUAL/switches/large_pages.htm new file mode 100644 index 0000000..82fd5b7 --- /dev/null +++ b/DOCS/MANUAL/switches/large_pages.htm @@ -0,0 +1,50 @@ + + + + + -slp (Set Large Pages mode) switch + + + + + +

-slp (Set Large Pages mode) switch

+ +

Sets Large Pages mode.

+ +

Syntax

+ +
+-slp[-]
+
+ + + + + + +
Switch Description
-slp Enables Large Pages mode.
-slp- Disables Large Pages mode. This option is default for all commands.
+ +

Large Pages mode increases the speed of compression. +However, there is a pause at the start of compression while 7-Zip allocates the large pages in memory. +If 7-Zip can't allocate large pages, it allocates usual small pages. +Also, the Windows Task Manager doesn't show the real memory usage of the program, if 7-Zip uses large pages. +This feature works only on Windows 2003 / XP x64. +Also, it requires administrator's rights for your system. +The recommended size of RAM for this feature is 1 GB or more. +To install this feature, you must run the 7-Zip File Manager at least once, +close it, and then reboot the system.

+

Your system can hang for several seconds at compressing starting, if you use -slp mode. +So it's not recommended to use -slp mode to compress small data sets (less than 100 MB).

+ + +

Example

+ +
+7z a archive.7z -slp a.iso
+
+ +

compresses a.iso file with Large Pages mode switched on.

+ + + diff --git a/DOCS/MANUAL/switches/list_tech.htm b/DOCS/MANUAL/switches/list_tech.htm new file mode 100644 index 0000000..aa8e522 --- /dev/null +++ b/DOCS/MANUAL/switches/list_tech.htm @@ -0,0 +1,36 @@ + + + + + -slt (Show technical information) switch + + + + + +

-slt (Show technical information) switch

+ +

Sets technical mode for l (List) command.

+ +

Syntax

+ +
+-slt
+
+ +

Example

+ +
+7z l -slt archive.7z
+
+ +

shows detailed technical information for the files in archive.7z.

+ +

Commands that can be used with this switch

+ +

+ l (List) +

+ + + diff --git a/DOCS/MANUAL/switches/method.htm b/DOCS/MANUAL/switches/method.htm new file mode 100644 index 0000000..448dbdf --- /dev/null +++ b/DOCS/MANUAL/switches/method.htm @@ -0,0 +1,625 @@ + + + + + -m (Set compression Method) switch + + + + + +

-m (Set compression Method) switch

+ +

Specifies the compression method.

+ +

Syntax

+ +
+-m<method_parameters>
+
+
+ +

The format for this switch depends on the archive type.

+ + + +

Zip

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterDefaultDescription
x=[0 | 1 | 3 | 5 | 7 | 9 ]5Sets level of compression.
m={MethodID}DeflateSets a method: Copy, Deflate, Deflate64, BZip2, LZMA, PPMd.
fb={NumFastBytes}32Sets number of Fast Bytes for Deflate encoder.
pass={NumPasses}1Sets number of Passes for Deflate encoder.
d={Size}[b|k|m]900000Sets Dictionary size for BZip2
mem={Size}[b|k|m]24 Sets size of used memory for PPMd.
o={Size}8 Sets model order for PPMd.
mt=[off | on | {N}]onSets multithreading mode.
em={EncryptionMethodID}ZipCryptoSets a encryption method: ZipCrypto, AES128, AES192, AES256
tc=[off | on]off Stores NTFS timestamps for files: Modification time, Creation time, Last access time.
cl=[off | on]off 7-Zip always uses local code page for file names.
cu=[off | on]off 7-Zip uses UTF-8 for file names that contain non-ASCII symbols.
+ +

By default (if cl and cu switches are not specified), 7-Zip uses UTF-8 encoding +only for file names that contain symbols unsupported by local code page.

+ +
+
x=[0 | 1 | 3 | 5 | 7 | 9 ]
+
+

Sets level of compression. x=0 means Copy mode (no compression).

+

Deflate / Deflate64 settings:

+ + + + + + + +
Level NumFastBytes NumPasses Description
1 32 1 Fastest
3 Fast
5 Normal
7 64 3 Maximum
9 128 10 Ultra
+ +

x=1 and x=3 with Deflate method set fast mode for compression.

+ +

BZip2 settings:

+ + + + + + + +
Level Dictionary NumPasses Description
1 100000 1 Fastest
3 500000 Fast
5 900000 Normal
7 2 Maximum
9 7 Ultra
+
+ +
fb={NumFastBytes}
+
+

Sets the number of fast bytes for the Deflate/Deflate64 encoder. + It can be in the range from 3 to 258 (257 for Deflate64). + Usually, a big number gives a little bit better + compression ratio and a slower compression process. + A large fast bytes parameter can significantly increase the compression ratio + for files which contain long identical sequences of bytes.

+
+
pass={NumPasses}
+
+

Sets number of passes for Deflate encoder. It can be in the range from 1 to 15 for Deflate and + from 1 to 10 for BZip2. Usually, a big number gives a little bit better + compression ratio and a slower compression process. +

+
+
d={Size}[b|k|m]
+
+

Sets the Dictionary size for BZip2. You must specify the size in bytes, kilobytes, or megabytes. + The maximum value for the Dictionary size is 900000b. If you do not specify any symbol + from set [b|k|m], dictionary size will be calculated as DictionarySize = 2^Size bytes.

+
+ +
mem={Size}[b|k|m]
+
+

Sets the size of memory used for PPMd. You must specify the size in bytes, kilobytes, or megabytes. + The maximum value is 256 MB = 2^28 bytes. The default value + is 24 (16MB). If you do not specify any symbol from the set [b|k|m], the + memory size will be calculated as (2^Size) bytes. PPMd uses the same + amount of memory for compression and decompression.

+
+ +
o={Size}
+
+

Sets the model order for PPMd. The size must be in the range [2,16]. The default value is 8.

+
+ +
mt=[off | on | {N}]
+
+

Sets multithread mode. If you have a multiprocessor or multicore system, + you can get a speed increase with + this switch. This option affects only compression (with any method) and + decompression of BZip2 streams. + Each thread in the multithread mode uses 32 MB of RAM for buffering. + If you specify {N}, 7-Zip tries to use N threads.

+
+
+ +

GZip

+GZip uses the same parameters as Zip, but GZip compresses only with Deflate method. +So GZip supports only the following parameters: x, fb, pass. + +

BZip2

+ + + + + + + + + + + + + + + + + + + + + +
ParameterDefaultDescription
x=[1 | 3 | 5 | 7 | 9 ]5Sets level of compression.
pass={NumPasses}1Sets number of Passes for Bzip2 encoder.
d={Size}[b|k|m]900000Sets Dictionary size for BZip2
mt=[off | on | {N}]onSets multithreading mode.
+ +
+
x=[1 | 3 | 5 | 7 | 9 ]
+
+

Sets level of compression

+ + + + + + + +
Level Dictionary NumPasses Description
1 100000 1 Fastest
3 500000 Fast
5 900000 Normal
7 2 Maximum
9 7 Ultra
+
+ +
d={Size}[b|k|m]
+
+

Sets the Dictionary size for BZip2. You must specify the size in bytes, kilobytes, or megabytes. + The maximum value for the Dictionary size is 900000b. If you do not specify any symbol + from set [b|k|m], dictionary size will be calculated as DictionarySize = 2^Size bytes.

+
+ +
pass={NumPasses}
+
+

Sets the number of passes. It can be in the range from 1 to 10. + The default value is 1 for normal mode, 2 for maximum mode and 7 for ultra mode. + A bigger number can give a little bit better compression ratio and a slower compression process. +

+
+
mt=[off | on | {N}]
+
+

Sets multithread mode. If you have a multiprocessor or multicore system, + you can get a speed increase with + this switch. If you specify {N}, for example mt=4, 7-Zip tries to use 4 threads.

+
+
+ +

7z

+ + + + + + + + + + + + + + + + + + + + +
Parameter Default Description
x=[0 | 1 | 3 | 5 | 7 | 9 ]5Sets level of compression.
s=[off | on | [e] [{N}f] [{N}b | {N}k | {N}m | {N}g]on Sets solid mode.
f=[off | on]on Enables or disables compression filters for executable files.
hc=[off | on]on Enables or disables archive header compressing.
he=[off | on]off Enables or disables archive header encryption.
b{C1}[s{S1}]:{C2}[s{S2}] Sets binding beetwen coders.
{N}={MethodID}[:param1][:param2][..]LZMA Sets a method: LZMA, LZMA2, PPMd, BZip2, Deflate, Delta, BCJ, BCJ2, Copy.
mt=[off | on | {N}]on Sets multithreading mode.
tc=[off | on]off Stores file creation timestamps.
+ +
+
x=[0 | 1 | 3 | 5 | 7 | 9 ]
+
+

Sets level of compression

+ + + + + + + + +
Level Method Dictionary FastBytes MatchFinder Filter Description
0 Copy No compression.
1 LZMA 64 KB 32 HC4 BCJ Fastest compressing
3 LZMA 1 MB 32 HC4 BCJ Fast compressing
5 LZMA 16 MB 32 BT4 BCJ Normal compressing
7 LZMA 32 MB 64 BT4 BCJ Maximum compressing
9 LZMA 64 MB 64 BT4 BCJ2Ultra compressing
+

Note: "x" works as "x=9".

+
+ +
s=[off | on | [e] [{N}f] [{N}b | {N}k | {N}m | {N}g)]
+
+

Enables or disables solid mode. The default mode is s=on. + In solid mode, files are grouped together. Usually, compressing in + solid mode improves the compression ratio.

+ + + + + +
e Use a separate solid block for each new file extension
{N}f Set the limit for number of files in one solid block
{N}b | {N}k | {N}m | {N}g Set a limit for the total size of a solid block in bytes
+ +

These are the default limits for the solid block size:

+ + + + + + + + + +
Compression Level Solid block size
Store 0 B
Fastest 16 MB
Fast 128 MB
Normal 2 GB
Maximum 4 GB
Ultra 4 GB
+ + +

Limitation of the solid block size usually decreases compression ratio but gives the following advantages:

+
    +
  • Decreases losses in case of future archive damage. +
  • Decreases extraction time of a group of files (or just one + file), so long as the group doesn't contain the entire archive.
  • +
+

The updating of solid .7z archives can be slow, since it + can require some recompression.

+ +

Example:

+
+        s=100f10m
+      
+

set solid mode with 100 files & 10 MB limits per one solid block.

+ +
f=[off | on]
+
+

Enables or disables compression filters for executable files: + dll, exe, ocx, sfx, sys. It uses BCJ2 filter in Ultra mode and BCJ + filter in other modes. The default mode is f=on. +

+
hc=[off | on]
+
+

Enables or disables archive header compressing. The default mode is hc=on. + If archive header compressing is enabled, some parts of archive header will + be compressed with LZMA method. +

+
he=[off | on]
+
+

Enables or disables archive header encryption. The default mode is he=off. +

+
{N}
+
+

Sets order of methods. It is used also to associate parameters with + methods. Numbers must begin from 0. Methods that have smaller numbers will be used + before others.

+
+ +
b{C1}[s{S1}]:{C2}[s{S2}]
+
+

Binds output stream S1 in coder C1 with input stream S2 in coder C2. + If stream number is not specified, stream with number 0 will be used. +

+

Usally coder has one input stream and + one output stream. In 7z some coders can have multiple input and output streams.

+ +

For example, BCJ2 encoder has one + input stream and four output streams.

+
+ +
mt=[off | on | {N}]
+
+

Sets multithread mode. If you have a multiprocessor or multicore system, + you can get a increase with this switch. + 7-Zip supports multithread mode only for LZMA / LZMA2 compression and + BZip2 compression / decompression. If you specify {N}, for example mt=4, + 7-Zip tries to use 4 threads. LZMA compression uses only 2 threads. +

+
+ +
{N}={MethodID}[:param1][:param2] ... [:paramN]
+
+

Sets compression method. You can use any number of methods. + The default method is LZMA.

+

Parameters must be in one of the following forms:

+
    +
  • {ParamName}={ParamValue}. +
  • {ParamName}{ParamValue}, if {ParamValue} + is number and {ParamName} doesn't contain numbers. +
+ +

Supported methods:

+ + + + + + + + +
MethodID Description
LZMA LZ-based algorithm
LZMA2 LZMA-based algorithm
PPMd Dmitry Shkarin's PPMdH with small changes
BZip2 BWT algorithm
Deflate LZ+Huffman
Copy No compression
+ +

Supported filters:

+ + + + + + + + + + +
MethodID Description
Delta Delta filter
BCJ converter for x86 executables
BCJ2 converter for x86 executables (version 2)
ARM converter for ARM (little endian) executables
ARMT converter for ARM Thumb (little endian) executables
IA64 converter for IA-64 executables
PPC converter for PowerPC (big endian) executables
SPARC converter for SPARC executables
+

Filters increase the compression ratio for some types of files. Filters + must be used with one of the compression method (for example, BCJ + LZMA).

+
+ +

LZMA

+

LZMA is an algorithm based on Lempel-Ziv algorithm. + It provides very fast decompression (about 10-20 times faster than compression). + Memory requirements for compression and decompression also are different (see + d={Size}[b|k|m] switch for details).

+ + + + + + + + + + + + + + + + + + + + +
Parameter Default Description
a=[0|1]1 Sets compressing mode
d={Size}[b|k|m]24 Sets Dictionary size
mf={MF_ID}bt4 Sets Match Finder
fb={N}32 Sets number of Fast Bytes
mc={N}32Sets Number of Cycles for Match Finder
lc={N}3 Sets number of Literal Context bits - [0, 8]
lp={N}0 Sets number of Literal Pos bits - [0, 4]
pb={N}2 Set number of Pos Bits - [0, 4]
+ + +
+
a=[0|1]
+
+

Sets compression mode: 0 = fast, 1 = normal. + Default value is 1.

+
+
d={Size}[b|k|m]
+
+

Sets Dictionary size for LZMA. You must specify the size in bytes, kilobytes, or megabytes. + The maximum value for dictionary size is 1 GB = 2^30 bytes. Default values for LZMA + are 24 (16 MB) in normal mode, 25 (32 MB) in maximum mode (-mx=7) + and 26 (64 MB) in ultra mode (-mx=9). + If you do not specify any symbol from the set [b|k|m], the + dictionary size will be calculated as DictionarySize = 2^Size bytes. + For decompressing a file compressed by LZMA method with dictionary size N, you need + about N bytes of memory (RAM) available. +

+
+
mf={MF_ID}
+
+

Sets Match Finder for LZMA. Default method is bt4. + Algorithms from hc* group don't provide a good compression ratio, + but they often work pretty fast in combination with fast mode (a=0). + Memory requirements depend on dictionary size (parameter "d" in table below). +

+ + + + + + + + +
MF_ID Dictionary Memory Usage Description
bt2 9.5 * d + 4 MB Binary Tree 2 bytes hashing
bt3 11.5 * d 3 bytes hashing
bt4 64 KB ... 48 MB 11.5 * d 4 bytes hashing
64 MB ... 1024 MB 10.5 * d
hc4 64 KB ... 48 MB 7.5 * d Hash Chain
64 MB ... 1024 MB 6.5 * d
+

Note: Your operation system also needs some amount of physical memory for internal purposes. + So keep at least 32MB of physical memory unused.

+
+ +
fb={N}
+
+

Sets number of fast bytes for LZMA. It can be in the range from 5 to 273. + The default value is 32 for normal mode and 64 for maximum and ultra modes. + Usually, a big number gives a little bit better + compression ratio and slower compression process. +

+
+
mc={N}
+
+

Sets number of cycles (passes) for match finder. It can be in range from 0 to 1000000000. + Default value is (16 + number_of_fast_bytes / 2) for BT* match finders and + (8 + number_of_fast_bytes / 4) for HC4 match finder. + If you specify mc=0, LZMA will use default value. + Usually, a big number gives a little bit better compression ratio and slower + compression process. For example, mf=HC4 and mc=10000 can provide almost the same + compression ratio as mf=BT4.

+
+
lc={N}
+
+

Sets the number of literal context bits (high bits of previous literal). + It can be in range from 0 to 8. + Default value is 3. Sometimes lc=4 gives gain for big files.

+
+
lp={N}
+
+

Sets the number of literal pos bits (low bits of current position for literals). + It can be in the range from 0 to 4. + The default value is 0. The lp switch is intended for periodical data when the + period is equal to 2^value (where lp=value). For example, for 32-bit (4 bytes) + periodical data you can use lp=2. Often it's better to set lc=0, + if you change lp switch.

+
+
pb={N}
+
+

Sets the number of pos bits (low bits of current position). + It can be in the range from 0 to 4. + The default value is 2. The pb switch is intended for periodical data when the + period is equal 2^value (where lp=value).

+
+ +
+ +

LZMA2

+

LZMA2 is modified version of LZMA. it provides the following advantages over LZMA:

+
    +
  • Better compression ratio for data than can't be compressed. LZMA2 can store such + blocks of data in uncompressed form. Also it decompresses such data faster. +
  • Better multithreading support. If you compress big file, LZMA2 can split + that file to chunks and compress these chunks in multiple threads. +
+ + + + + + +
Parameter Default Description
c={Size}[b|k|m]dictSize * 4 Sets Chunk size
+ +

If you don't specify ChunkSize, LZMA2 sets it to DictionarySize * 4.

+ +

LZMA2 also supports all LZMA parameters, but lp+lc cannot be larger than 4.

+ +

LZMA2 uses: 1 thread for each chunk in x1 and x3 modes; and + 2 threads for each chunk in x5, x7 and x9 modes. + If LZMA2 is set to use only such number of threads required for one chunk, + it doesn't split stream to chunks. So you can get different compression + ratio for different number of threads. You can get the best compression + ratio, when you use 1 or 2 threads.

+ +

PPMd

+

PPMd is a PPM-based algorithm. This algorithm is mostly based + on Dmitry Shkarin's PPMdH source code. PPMd provides very good compression ratio for + plain text files. There is no difference between compression speed and + decompression speed. Memory requirements for compression and decompression + also are the same.

+ + + + + + +
Parameter Default Description
mem={Size}[b|k|m]24 Sets size of used memory for PPMd.
o={Size}6 Sets model order for PPMd.
+
+
mem={Size}[b|k|m]
+
+

Sets the size of memory used for PPMd. You must specify the size in bytes, kilobytes, or megabytes. + The maximum value is 2GB = 2^31 bytes. The default value + is 24 (16MB). If you do not specify any symbol from the set [b|k|m], the + memory size will be calculated as (2^Size) bytes. PPMd uses the same + amount of memory for compression and decompression.

+
+ +
o={Size}
+
+

Sets the model order for PPMd. The size must be in the range [2,32]. The default value is 6.

+
+
+ +

BCJ2

+

BCJ2 is a Branch converter for 32-bit x86 executables (version 2). + It converts some branch instructions for increasing further compression.

+

A BCJ2 encoder has one input stream and four output streams:

+
    +
  • s0: main stream. It requires further compression.
  • +
  • s1: stream for converted CALL values. It requires further compression.
  • +
  • s2: stream for converted JUMP values. It requires further compression.
  • +
  • s3: service stream. It is already compressed.
  • +
+

If LZMA is used, the size of the dictionary for streams + s1 and s2 can be much smaller (512 KB is enough for most cases) + than the dictionary size for stream s0.

+ +

Delta

+

It's possible to set delta offset in bytes. For example, to compress 16-bit stereo + WAV files, you can set "0=Delta:4". Default delta offset is 1.

+
+ +

XZ

+XZ supports only LZMA2 codec now. The switches are similar to switches for 7z format. + +

Examples

+ +
+7z a -tzip archive.zip *.jpg -mx0
+
+ +

adds *.jpg files to + archive.zip archive without compression.

+ +
+7z a -t7z archive.7z *.exe *.dll -m0=BCJ -m1=LZMA:d=21 -ms -mmt
+
+ +

adds *.exe and *.dll +files to solid archive archive.7z using LZMA method with +2 MB dictionary and BCJ converter. Compression will use multithreading optimization.

+ +
+7z a -t7z archive.7z *.exe *.dll -m0=BCJ2 -m1=LZMA:d23 -m2=LZMA:d19 -m3=LZMA:d19 
+     -mb0:1 -mb0s1:2 -mb0s2:3
+
+ +

adds *.exe and *.dll + files to archive archive.7z using BCJ2 converter, + LZMA with 8 MB dictionary for main output stream (s0), + and LZMA with 512 KB dictionary for s1 and s2 output streams of BCJ2.

+ + +
+7z a -t7z archive.7z *.txt -m0=PPMd
+
+ +

adds *.txt files to archive +archive.7z using PPMd method.

+ + + + +

Commands that can be used with this switch

+ +

+ a (Add), + d (Delete), + u (Update), +

+ +

See also

+ +

+ Switches: + -t (set Type of archive), +

+ + + diff --git a/DOCS/MANUAL/switches/output_dir.htm b/DOCS/MANUAL/switches/output_dir.htm new file mode 100644 index 0000000..b452349 --- /dev/null +++ b/DOCS/MANUAL/switches/output_dir.htm @@ -0,0 +1,53 @@ + + + + + -o (set Output directory) switch + + + + + +

-o (set Output directory) switch

+ +

Specifies a destination directory where files are to be extracted.

+

This switch can be used only with extraction commands.

+ +

Syntax

+ +
+-o{dir_path}
+
+ +
+
{dir_path}
+
This is the destination directory path. It's not required to end with a backslash. + If you specify * in {dir_path}, 7-Zip substitutes that * character to archive name.
+
+ + +

Example

+ +
+7z x archive.zip -oc:\Doc
+
+ +

extracts all files from the archive.zip archive +to the c:\Doc directory.

+ +
+7z x *.zip -o*
+
+ +

extracts all *.zip archives to subfolders +with names of these archives.

+ +

Commands that can be used with this switch

+ +

+ e (Extract), + x (Extract with full paths) +

+ + + diff --git a/DOCS/MANUAL/switches/overwrite.htm b/DOCS/MANUAL/switches/overwrite.htm new file mode 100644 index 0000000..c71ae40 --- /dev/null +++ b/DOCS/MANUAL/switches/overwrite.htm @@ -0,0 +1,56 @@ + + + + + -ao (Overwrite mode) switch + + + + + +

-ao (Overwrite mode) switch

+ +

Specifies the overwrite mode during extraction, to overwrite files already present on disk.

+ +

Syntax

+ +
+-ao[a | s | t | u ]
+
+ + + + + + + + +
Switch Description
-aoa Overwrite All existing files without prompt.
-aos Skip extracting of existing files.
-aou aUto rename extracting file (for example, name.txt will + be renamed to name_1.txt).
-aot auto rename existing file (for example, name.txt will + be renamed to name_1.txt).
+ +

Examples

+ +
+7z x test.zip -aoa
+
+ +

extracts all files from test.zip archive and overwrites +existing files without any prompt.

+ +

Commands that can be used with this switch

+ +

+ e (Extract), + x (Extract with full paths) +

+ +

See also

+ +

+ Switches: + -y (assume Yes on all queries), +

+ + + diff --git a/DOCS/MANUAL/switches/password.htm b/DOCS/MANUAL/switches/password.htm new file mode 100644 index 0000000..733dfc4 --- /dev/null +++ b/DOCS/MANUAL/switches/password.htm @@ -0,0 +1,54 @@ + + + + + -p (set Password) switch + + + + + +

-p (set Password) switch

+ +

Specifies password.

+ +

Syntax

+ +
+-p{password}
+
+ +
+
{password}
+
Specifies password.
+
+ + +

Examples

+ +
+7z a archive.7z -psecret -mhe *.txt
+
+

compresses *.txt files to archive.7z using password +"secret". Also it encrypts archive headers (-mhe switch), so filenames will be encrypted. +

+ +
+7z x archive.zip -psecret
+
+

extracts all files from archive.zip using password +"secret".

+ +

Commands that can be used with this switch

+ +

+ a (Add), + d (Delete), + e (Extract), + t (Test), + u (Update), + x (Extract with full paths) +

+ + + diff --git a/DOCS/MANUAL/switches/recurse.htm b/DOCS/MANUAL/switches/recurse.htm new file mode 100644 index 0000000..08dba2a --- /dev/null +++ b/DOCS/MANUAL/switches/recurse.htm @@ -0,0 +1,83 @@ + + + + + -r (Recurse subdirectories) switch + + + + + +

-r (Recurse subdirectories) switch

+ +

Specifies the method of treating wildcards and filenames on the command line.

+ +

Syntax

+ +
+-r[- | 0]
+
+ + + + + + + +
Switch Description
-r Enable recurse subdirectories.
-r- Disable recurse subdirectories. This option is default for all commands.
-r0 Enable recurse subdirectories only for wildcard names.
+ +

Examples

+ +
+7z l archive.zip *.doc -r-
+
+ +

lists all *.doc files + that belong to the archived root directory + in the archive.zip archive. +

+ +
+7z a -tzip archive.zip -r src\*.cpp src\*.h
+
+ +

adds all *.cpp and *.h + files from directory src and all it's subdirectories + to the archive.zip archive.

+ +
+7z a archive.7z folder1\
+
+ +

adds all files from directory folder1 and all it's subdirectories + to the archive.7z archive.

+ +
+7z a archive.7z -r folder2\
+
+ +

searches all folder2 directories in all subdirectories, + and adds them (including all subdirectories) to the archive.7z archive.

+ +

Commands that can be used with this switch

+ +

+ a (Add), + d (Delete), + e (Extract), + l (List), + t (Test), + u (Update), + x (Extract with full paths) +

+ +

See also

+ +

+ Switches: + -i (Include), + -x (Exclude) +

+ + + diff --git a/DOCS/MANUAL/switches/sfx.htm b/DOCS/MANUAL/switches/sfx.htm new file mode 100644 index 0000000..1260289 --- /dev/null +++ b/DOCS/MANUAL/switches/sfx.htm @@ -0,0 +1,156 @@ + + + + + -sfx (Create SFX archive) switch + + + + + +

-sfx (Create SFX archive) switch

+ +

Creates self extracting archive.

+ +

Syntax

+ +
+-sfx[{SFX_Module}]
+
+ +
+
{SFX_Module}
+
+

Specifies the SFX module that will be combined with the archive. + This module must be placed in the same directory as the 7z.exe. + If {SFX_Module} is not assigned, 7-Zip will use standard console + SFX module 7zCon.sfx.

+ + + + + + +
SFX_Module Description
7z.sfx Windows version.
7zCon.sfx Console version.
7zS.sfx Windows version for installers.
7zSD.sfx Windows version for installers (uses MSVCRT.dll).
+
+
+ +

+All SFX modules are uncompressed. You can use UPX program +(http://upx.sourceforge.net) +to compresss such modules. After compressing by the UPX program, the size of the +sfx module will be reduced to 40-50% of its original size. +

+ +

SFX modules for installers

+

SFX modules for installers are included in an external package (7z_extra). You can download +these modules from www.7-zip.org. SFX modules for installers (7zS.sfx and 7zSD.sfx) +allow you to create your own installation program. +Such a module extracts the archive to the user's temp folder, and runs a specified program, +and removes the temp files after the program finishes. +A self-extracting archive for installers must be created as joining 3 files: +SFX_Module, Installer_Config, 7z_Archive. +In addition, an optional file, Installer_Config, is allowed. You can use the following command to +create an installer self-extracting archive:

+
+copy /b 7zS.sfx + config.txt + archive.7z archive.exe
+
+ +

An optimally small installation package size can be achieved, +if the installation files are uncompressed before including them in the 7z archive.

+ +

-y switch for installer module specifies quiet mode extraction.

+ +

Installer Config file format

+

+This config file contains commands for the Installer. The file begins with the string +;!@Install@!UTF-8! and ends with ;!@InstallEnd@!. +The file must be written in UTF-8 encoding. +The file contains any or all these string pairs: +

ID_String="Value"

+

+ + + + + + + + + +
ID_String Description
Title Title for messages
BeginPrompt Begin Prompt message
Progress Value can be "yes" or "no". Default value is "yes".
RunProgram Command for executing. Default value is "setup.exe". Substring %%T + will be replaced with path to temporary folder, where files were extracted
Directory Directory prefix for "RunProgram". Default value is ".\\"
ExecuteFile Name of file for executing
ExecuteParameters Parameters for "ExecuteFile"
+

+

You may omit any pair.

+ +

There are two ways to run a installation program: RunProgram and ExecuteFile. +Use RunProgram, if you want to run a program from the .7z archive. +Use ExecuteFile, if you want to open a document from the .7z archive, or +if you want to execute a command from Windows.

+ +

If you use RunProgram, and if you specify empty directory prefix: Directory="", +the system searches for the executable file in the following sequence:

+
    +
  1. The directory from which the application (installer) loaded. +
  2. The temporary folder, where files were extracted. +
  3. The Windows system directory. +
+ +

Config file Examples

+ +
+;!@Install@!UTF-8!
+Title="7-Zip 4.00"
+BeginPrompt="Do you want to install the 7-Zip 4.00?"
+RunProgram="setup.exe"
+;!@InstallEnd@!
+
+ +
+ + +
+;!@Install@!UTF-8!
+Title="7-Zip 4.00"
+BeginPrompt="Do you want to install the 7-Zip 4.00?"
+ExecuteFile="7zip.msi"
+;!@InstallEnd@!
+
+ +
+ +
+;!@Install@!UTF-8!
+Title="7-Zip 4.01 Update"
+BeginPrompt="Do you want to install the 7-Zip 4.01 Update?"
+ExecuteFile="msiexec.exe"
+ExecuteParameters="/i 7zip.msi REINSTALL=ALL REINSTALLMODE=vomus"
+;!@InstallEnd@!
+
+ +

Examples

+ +
+7z a -sfx a.exe *.txt
+
+ +

adds *.txt files to self extracting + archive a.exe using the default console SFX module.

+ +
+7z a -sfx7z.sfx a.exe *
+
+ +

adds all files to self extracting archive a.exe +with module 7z.sfx using windows version of SFX mudule.

+ +

Commands that can be used with this switch

+ +

+ a (Add), + d (Delete), + u (Update), +

+ + + diff --git a/DOCS/MANUAL/switches/ssc.htm b/DOCS/MANUAL/switches/ssc.htm new file mode 100644 index 0000000..023dbf8 --- /dev/null +++ b/DOCS/MANUAL/switches/ssc.htm @@ -0,0 +1,50 @@ + + + + + -ssc (Set Sensitive Case mode) switch + + + + + +

-ssc (Set Sensitive Case mode) switch

+ +

Sets sensitive case mode for file names.

+ +

Syntax

+ +
+-scs[-]
+
+ + + + + +
Switch Description
-ssc Set case-sensitive mode. It's default for Posix/Linux systems.
-ssc- Set case-insensitive mode. It's default for Windows systems.
+ +

Example

+ +
+7z a archive.7z A*.txt -ssc -r
+
+ +

compresses all A*.txt files + from current directory and all it's subdirectories. That command doesn't compress + a*.txt files. + +

Commands that can be used with this switch

+ +

+ a (Add), + d (Delete), + e (Extract), + l (List), + t (Test), + u (Update), + x (Extract with full paths) +

+ + + diff --git a/DOCS/MANUAL/switches/stdin.htm b/DOCS/MANUAL/switches/stdin.htm new file mode 100644 index 0000000..f16b4eb --- /dev/null +++ b/DOCS/MANUAL/switches/stdin.htm @@ -0,0 +1,55 @@ + + + + + -si (read data from stdin) switch + + + + + +

-si (read data from stdin) switch

+ +

Causes 7-Zip to read data from stdin (standard input) instead of from disc files.

+ +

Syntax

+ +
+-si{file_name}
+
+ +
+
{file_name}
+
Specifies a name that will be stored in the archive for the compressed data. + If file_name is not specified, data will be stored without a name.
+
+ +

Note: The current version of 7-Zip support reading of archives from stdin only for xz, lzma, tar, gzip and bzip2 archives.

+ +

Examples

+ +
+7z a archive.gz -tgzip -siDoc2.txt < Doc.txt
+
+ +

compresses input stream from file Doc.txt to +archive.gz archive +using Doc2.txt file name.

+ +
+7z x 7z905.tar.gz -so | 7z x -si -ttar
+
+ +

decompresses tar.gz archive.

+ +

Commands that can be used with this switch

+ +

+ a (Add), + e (Extract), + u (Update), + x (Extract with full paths) +

+ + + diff --git a/DOCS/MANUAL/switches/stdout.htm b/DOCS/MANUAL/switches/stdout.htm new file mode 100644 index 0000000..62e5a66 --- /dev/null +++ b/DOCS/MANUAL/switches/stdout.htm @@ -0,0 +1,50 @@ + + + + + -so (write data to stdout) switch + + + + + +

-so (write data to stdout) switch

+ +

Causes 7-Zip to write output data to stdout (standard output stream).

+ +

Syntax

+ +
+-so
+
+ +

Examples

+ +
+7z x archive.gz -so > Doc.txt
+
+ +

decompresses archive.gz +archive to output stream and then redirects that stream to +Doc.txt file.

+ + +
+7z a dummy -tgzip -so Doc.txt > archive.gz
+
+ +

compresses the Doc.txt file to the 7-Zip standard +output stream and writes that stream to +archive.gz file.

+ +

Commands that can be used with this switch

+ +

+ a (Add), + e (Extract), + u (Update), + x (Extract with full paths) +

+ + + diff --git a/DOCS/MANUAL/switches/stop_switch.htm b/DOCS/MANUAL/switches/stop_switch.htm new file mode 100644 index 0000000..12383e5 --- /dev/null +++ b/DOCS/MANUAL/switches/stop_switch.htm @@ -0,0 +1,31 @@ + + + + + -- (Stop switches parsing) switch + + + + + +

-- (Stop switches parsing) switch

+ +

Disables switch parsing after "--" on the command line. +This is to allow 7-Zip to use file names that start with "-". + +

Syntax

+ +
+--
+
+ +

Examples

+ +
+7z t -- -ArchiveName.7z
+
+ +

tests -ArchiveName.7z archive.

+ + + diff --git a/DOCS/MANUAL/switches/style.css b/DOCS/MANUAL/switches/style.css new file mode 100644 index 0000000..13ebb79 --- /dev/null +++ b/DOCS/MANUAL/switches/style.css @@ -0,0 +1,232 @@ +body + { + padding: 0px 0px 0px 26px; + background: #ffffff; + color: #000000; + font-family: Verdana, Arial, Helvetica, sans-serif; + font-size: 80%; + } + +div + { + width: 90%; + border: 2px solid #999999; + padding: 4px 8px; + background: #cccccc; + } + +h1, h2, h3, h4 + { + font-family: Verdana, Arial, Helvetica, sans-serif; + margin-left: -26px; + } + +h1 + { + font-size: 145%; + margin-top: .5em; + margin-bottom: 1em; + } + +h2 + { + font-size: 130%; + margin-top: 1.5em; + margin-bottom: .6em; + } + +h3 + { + font-size: 115%; + margin-top: 1.5em; + margin-bottom: .6em; + } + +h4 + { + font-size: 100%; + margin-top: 1.5em; + margin-bottom: .6em; + } + +ul p, ol p, dl p + { + margin-left: 0em; + } + +p + { + margin-top: .6em; + margin-bottom: .6em; + } + +dl + { + /*margin-top: 0em; */ + } + +dt + { + margin-top: .76em; + margin-bottom: .5em; + font-weight: bold; + } + +dd + { + margin-top: .5em; + margin-bottom: .5em; + margin-left: 1.9em; + } + + +ul, ol + { + margin-top: .6em; + margin-bottom: 0em; + } + +ol + { + margin-left: 3.6em; + } + +ul + { + list-style-type: disc; + margin-left: 1.9em; + } + +li + { + margin-bottom: .6em; + } + +ul ol, ol ol + { + list-style-type: lower-alpha; + { + + /* +pre + { + margin-top: .6em; + margin-bottom: .6em; + } + */ + +pre,code + { + font: 100% Courier New, Courier, mono; + color: #000000; + cursor: text; + } + +pre.syntax + { + background: #dddddd; + padding: 2pt,4pt + } + +pre.syntax + { + color: #000000; + } + +pre.example + { + margin-left: 2.0em; + /*margin-top: 12.0em;*/ + /*margin-bottom: 1.0em;*/ + color: #C00000; + /*padding: 10pt,20pt*/ + } + +table + { + /* width: 90%; */ + background: #999999; + margin-top: .6em; + margin-bottom: .3em; + } + +th + { + padding: 4px 8px; + background: #cccccc; + text-align: left; + font-size: 80%; + vertical-align: bottom; + } + +th.cc + { + text-align: center; + vertical-align: middle; + } + +td + { + padding: 4px 8px; + background: #ffffff; + vertical-align: top; + font-size: 80%; + } + +td.cc + { + text-align: center; + vertical-align: middle; + } + + +blockquote + { + margin-left: 3.8em; + margin-right: 3.8em; + margin-top: .6em; + margin-bottom: .6em; + } + +a:link + { + color: #0066ff; + } + +a:visited + { + color: #996600; + } + +a:hover + { + color: #cc9900; + } + +a.parameter:link + { + color: #0066ff; + text-decoration:none; + } + +a.parameter:visited + { + text-decoration:none; + } + +div.footer + { + width: 100%; + border: none; + background: #ffffff; + margin-top: 18pt; + padding-bottom: 12pt; + color: #228B22; + text-align: center; + font-size: 70%; + } + +span.filename +{ + color: #F00000; +} diff --git a/DOCS/MANUAL/switches/type.htm b/DOCS/MANUAL/switches/type.htm new file mode 100644 index 0000000..73af4e1 --- /dev/null +++ b/DOCS/MANUAL/switches/type.htm @@ -0,0 +1,83 @@ + + + + + -o (set Output directory) switch + + + + + +

-t (set Type of archive) switch

+ +

Specifies the type of archive.

+ +

Syntax

+ +
+-t{archive_type}
+
+ +
+
{archive_type}
+
Specifies the type of archive. It can be: *, 7z, split, zip, gzip, bzip2, tar, ... , or + combination of them, like: mbr.vhd +
+
+ +

If -t{archive_type} switch is not specified, 7-Zip uses extension of archive filename to + detect the type of archive. If you create new archive, -t{archive_type} switch is not + specified and there is no extension of archive, 7-Zip will create .7z archive.

+ +

When you extract archive of some types that contains another +archive without compression (for example, MBR in VHD), 7-Zip can open both +levels in one step. If you want to open/extract just top +level archive, use -t* switch.

+ +

Note: gzip or bzip2 formats support only one file per archive. +If you want to compress more than one file to these formats, +create a tar archive first, and then compress it with your selected format.

+ +

Example

+ +
+7z a -tzip archive.zip *.txt
+
+ +

adds all *.txt files from current directory +to zip archive archive.zip.

+ +
+7z t -t7z.split archive.7z.001
+
+ +

tests all files in archive.7z.001. It also checks +that archive is multivolume .7z archive.

+ +
+7z x -tiso archive.iso
+
+ +

extracts files from archive.iso open as ISO archive. + +

+7z x -tudf archive.iso
+
+ +

extracts files from archive.iso open as UDF archive. + + +

Commands that can be used with this switch

+ +

+ a (Add), + d (Delete), + e (Extract), + l (List), + t (Test), + u (Update), + x (Extract with full paths) +

+ + + diff --git a/DOCS/MANUAL/switches/update.htm b/DOCS/MANUAL/switches/update.htm new file mode 100644 index 0000000..3c707a7 --- /dev/null +++ b/DOCS/MANUAL/switches/update.htm @@ -0,0 +1,176 @@ + + + + + -u (Update options) switch + + + + + +

-u (Update options) switch

+ +

Specifies how to update files in an archive and (or) how to create new archives.

+ +

Syntax

+ +
+-u[-]<action_set>[!{new_archive_name}]
+
+  <action_set> ::= <state_action>...
+
+    <state_action> ::= <state><action>
+
+      <state> ::= p | q | r | x | y | z | w
+
+      <action> ::= 0 | 1 | 2 | 3
+
+ + +

Parameters

+ +
+
dash (-)
+

Disables any updates in the base archive.

+ +

The term base archive means the archive assigned by "base_archive_name" + on the command line. See Command line syntax + for more details.

+
+
{new_archive_name}
+

Specifies the path name of the new archive to be created. + All options in this switch will refer to this new archive.

+

If not assigned, then all options in this switch will + refer to the base archive of the command.

+
+
<state>
+

Specifies the state of a particular file to be processed.

+
<state> ::= p | q | r | x | y | z | w
+

For each unique filename there are 6 variants of state:

+ + + + + + + + + + + + + + + + + + + + + + + + +
<state> State conditionFile on Disk File in Archive
p File exists in archive, but is not matched with wildcard.  Exists, but is not matched
q File exists in archive, but doesn't exist on disk.Doesn't exist Exists
r File doesn't exist in archive, but exists on disk.Exists Doesn't exist
x File in archive is newer than the file on disk.Older Newer
y File in archive is older than the file on disk.Newer Older
z File in archive is same as the file on diskSame Same
w Can not be detected what file is newer + (times are the same, sizes are different)? ?
+
+ +
<action>
+

Specifies the action for a given <state>.

+
<action> ::= 0 | 1 | 2 | 3
+

For each state you can specify one of the three variants of actions:

+ + + + + + +
<action> Description
0 Ignore file (don't create item in new archive for this file)
1 Copy file (copy from old archive to new)
2 Compress (compress file from disk to new archive)
3 Create Anti-item (item that will delete file or directory during extracting). This feature is supported only in 7z format.
+
+
+ + +

Remarks

+ +

Any update command (such as a (Add), + d (Delete), + u (Update)) can be assigned in these terms.

+

The following table shows action sets for update commands.

+ + + + + + + + + +
command \ <state>p q r x y z w
d (Delete) 1 0 0 0 0 0 0
a (Add) 1 1 2 2 2 2 2
u (Update) 1 1 2 1 2 1 2
Freshen 1 1 0 1 2 1 2
Synchronize 1 0 2 1 2 1 2
+ + +

If you don't specify a +!{new_archive_name} option, then +all options will refer to the main archive (the archive assigned on the command line after the 7z command). +If you specify !{new_archive_name} +option, then 7-Zip also will create a new archive with the specified name and all options +will refer to that new archive.

+ +

Multiple update switches are supported. +7-Zip can create any number of new archives during one operation.

+ +

By default, the action set for each new archive is assigned +as the action set of the main command. There are 3 different +action sets for commands: a (Add), + d (Delete), + u (Update). +You can overload any <state_action> pair.

+ +

Time zone notes

+

If you change time zone (when you move your computer to another time zone +or if there are clock changes for daylight saving in your zone), you can have some problems +with update commands that depend from file's modification time. It's strongly recommended to use only +file system that uses Coordinated Universal Time (UTC) and archive format that also uses UTC. +In that case you will have no problems with time zone changes. +Also it's recommended to use only UTC formats in other cases, for example, if you send files to +someone in another time zone.

+ +

Also in some cases there are no problems, if both file system and archive format use local time, for example, FAT file system and ZIP format.

+
    +
  • UTC file systems: NTFS +
  • UTC archive formats: .zip with -mtc switch, 7z, tar, gzip2, iso, wim +
  • Local time file systems : FAT, FAT32 +
  • Local time archive formats : rar, zip, cab +
+ +

Examples

+ +
+7z u c:\1\exist.7z -u- -up0q3x2z0!c:\1\update.7z *
+
+ +

creates a new archive update.7z and +writes to this archive all files from current directory which differ from +files in exist.7z archive. +exist.7z archive will not be changed.

+ +
+7z u c:\1\exist.7z -up0q3x2z0!c:\1\update.7z * -ms=off
+
+ +

creates a new archive update.7z and +writes to this archive all files from the current directory which differ from +files in exist.7z archive. + +

Note: the updating of solid .7z archives can be slow, since it +can require some recompression.

+ +

Commands that can be used with this switch

+ +

+ a (Add), + d (Delete), + u (Update), +

+ + + diff --git a/DOCS/MANUAL/switches/volume.htm b/DOCS/MANUAL/switches/volume.htm new file mode 100644 index 0000000..91ddc29 --- /dev/null +++ b/DOCS/MANUAL/switches/volume.htm @@ -0,0 +1,49 @@ + + + + + -v (Create Volumes) switch + + + + + +

-v (Create Volumes) switch

+ +

Specifies volume sizes.

+ +

Syntax

+ +
+-v{Size}[b | k | m | g]
+
+
+
+
{Size}[b | k | m | g]
+
Specifies volume size in Bytes, Kilobytes (1 Kilobyte = 1024 bytes), + Megabytes (1 Megabyte = 1024 Kilobytes) or Gigabytes (1 Gigabyte = 1024 Megabytes). + if you specify only {Size}, 7-zip will treat it as bytes.
+
+ +

It's possible to specify several -v switches.

+ +

NOTE: Please don't use volumes (and don't copy volumes) before finishing archiving. +7-Zip can change any volume (including first volume) at the end of archiving operation.

+ +

Examples

+ +
+7z a a.7z *.txt -v10k -v15k -v2m
+
+ +

creates multivolume a.7z archive. +First volume will be 10 KB, second will be 15 KB, and all others will be 2 MB.

+ +

Commands that can be used with this switch

+ +

+ a (Add), +

+ + + diff --git a/DOCS/MANUAL/switches/working_dir.htm b/DOCS/MANUAL/switches/working_dir.htm new file mode 100644 index 0000000..415c397 --- /dev/null +++ b/DOCS/MANUAL/switches/working_dir.htm @@ -0,0 +1,55 @@ + + + + + -w (set Working directory) switch + + + + + +

-w (set Working directory) switch

+ +

Sets the working directory for the temporary base archive. By +default, 7-Zip builds a new base archive file in the same directory as the +old base archive file. By specifying this switch, you can set the +working directory where the temporary base archive file will be built. +After the temporary base archive file is built, it is copied over the +original archive; then, the temporary file is deleted.

+ +

Syntax

+ +
+-w[{dir_path}]
+
+ +
+
{dir_path}
+
+

Specifies the destination directory path. It's not required that + a path end with a backslash.

+

If <dir_path> is not assigned, then 7-Zip will use the Windows temporary directory.

+
+
+ + +

Example

+ +
+7z a -tzip archive.zip *.cpp -wc:\temp
+
+ +

adds *.cpp files to the +archive.zip archive, creating a temporary archive +in c:\temp folder.

+ +

Commands that can be used with this switch

+ +

+ a (Add), + d (Delete), + u (Update), +

+ + + diff --git a/DOCS/MANUAL/switches/yes.htm b/DOCS/MANUAL/switches/yes.htm new file mode 100644 index 0000000..142ffd2 --- /dev/null +++ b/DOCS/MANUAL/switches/yes.htm @@ -0,0 +1,48 @@ + + + + + -y (assume Yes on all queries) switch + + + + + +

-y (assume Yes on all queries) switch

+ +

Disables most of the normal user queries during 7-Zip +execution. You can use this switch to suppress overwrite queries in the +e (Extract) and +x (Extract with full paths) commands.

+ +

Syntax

+ +
-y
+ +

Examples

+ +
+7z x src.zip -y
+
+ +

extracts all files from + src.zip archive. All overwrite queries will be +suppressed and files on disk with same filenames as in archive will be +overwritten.

+ +

Commands that can be used with this switch

+ +

+ e (Extract), + x (Extract with full paths) +

+ +

See also

+ +

+ Switches: + -ao (Overwrite mode), +

+ + + diff --git a/DOCS/MANUAL/syntax.htm b/DOCS/MANUAL/syntax.htm new file mode 100644 index 0000000..63822e0 --- /dev/null +++ b/DOCS/MANUAL/syntax.htm @@ -0,0 +1,120 @@ + + + + + Command Line Syntax + + + + + +

Command Line Syntax

+ +
+7z <command> [<switch>...] <base_archive_name> [<arguments>...]
+
+
+<arguments> ::= <switch> | <wildcard> | <filename> | <list_file>
+<switch>::= <switch_symbol><switch_characters>[<option>]
+<switch_symbol> ::= '/' | '-' 
+<list_file> ::= @{filename}
+
+ + +

Expressions in square brackets (between '[' and ']') are optional.

+ +

Expressions in curly braces ('{' and '}') mean that instead of that +Expression (including braces), the user must substitute some string.

+ +

Expression

+ +
+expression1 | expression2 | ... | expressionN
+
+ +

+means that any (but only one) from these expressions must be specified. + +

Commands and +switches can be entered in upper or lower case.

+ +

Command is the first non-switch argument.

+ +

The "base_archive_name" must be the first filename on the command line +after the command.

+ +

The switches and other filenames can be in any order.

+ +

Wildcards or filenames with spaces must be quoted:

+ +
+    "Dir\Program files\*"
+    Dir\"Program files"\*
+
+ +

Switch options can be combined to save command line length. However, some +switch options take optional string arguments and therefore, must be the +last option in a combined argument token string because 7-Zip accepts the +rest of the argument token as the optional argument.

+ +

7-Zip uses wild name matching similar to Windows 95:

+
    +
  • '*' means a sequence of arbitrary characters.
  • +
  • '?' means any character.
  • +
+ +

+7-Zip doesn't uses the system wildcard parser. 7-Zip doesn't +follow the archaic rule by which *.* means any file. 7-Zip treats +*.* as matching the name of any file that has an extension. To process all files, you must +use a * wildcard.

+ +

Examples:

+ + + + + +
*.txtmeans all files with an extension of ".txt"
?a*means all files with a second character of "a"
*1*means all names that contains character "1"
*.*.*means all names that contain two at least "." characters
+ + +

The default wildcard "*" will be used if there is no filename/wildcard in the +command line.

+ +

Slash ('\') at the end of a path means a directory. Without a Slash ('\') at +the end of the path, the path can refer either to a file or a directory. + + +

List file

+ +

You can supply one or more filenames or wildcards for special list files +(files containing lists of files). The filenames in such list file must be +separated by new line symbol(s).

+ +

For list files, 7-Zip uses UTF-8 encoding by default. You can change encoding +using -scs switch.

+ +

Multiple list files are supported.

+ +

For example, if the file "listfile.txt" contains the following:

+ +
+    My programs\*.cpp
+    Src\*.cpp
+
+

then the command

+ +
+    7z a -tzip archive.zip @listfile.txt
+
+ +

adds to the archive "archive.zip" all "*.cpp" files from directories "My +programs" and "Src".

+ +

Short and Long File Names

+ +

7-Zip supports short file names (like FILENA~1.TXT) in some cases. +However, it's strongly recommended to use only the real (long) file names.

+ + + diff --git a/DOCS/Methods.txt b/DOCS/Methods.txt new file mode 100644 index 0000000..f52e7c3 --- /dev/null +++ b/DOCS/Methods.txt @@ -0,0 +1,152 @@ +7-Zip method IDs (9.18) +----------------------- + +Each compression or crypto method in 7z has unique binary value (ID). +The length of ID in bytes is arbitrary but it can not exceed 63 bits (8 bytes). + +If you want to add some new ID, you have two ways: +1) Write request for allocating IDs to 7-zip developers. +2) Generate 8-bytes ID: + + 3F ZZ ZZ ZZ ZZ ZZ MM MM + + 3F - Prefix for random IDs (1 byte) + ZZ ZZ ZZ ZZ ZZ - Developer ID (5 bytes). Use real random bytes. + + MM MM - Method ID (2 bytes) + + You can notify 7-Zip developers about your Developer ID / Method ID. + + Note: Use new ID only if old codec can not decode data encoded with new version. + + +List of defined IDs +------------------- + +00 - Copy + +03 - Delta +04 - x86 (BCJ) +05 - PPC (Big Endian) +06 - IA64 +07 - ARM (little endian) +08 - ARM Thumb (little endian) +09 - SPARC +21 - LZMA2 + +02.. - Common + 03 Swap + - 2 Swap2 + - 4 Swap4 + +03.. - 7z + 01 - LZMA + 01 - Version + + 03 - Branch + 01 - x86 + 03 - BCJ + 1B - BCJ2 + 02 - PPC + 05 - PPC (Big Endian) + 03 - Alpha + 01 - Alpha + 04 - IA64 + 01 - IA64 + 05 - ARM + 01 - ARM + 06 - M68 + 05 - M68 (Big Endian) + 07 - ARM Thumb + 01 - ARMT + 08 - SPARC + 05 - SPARC + + 04 - PPMD + 01 - Version + + 7F - + 01 - experimental methods. + + +04.. - Misc + 00 - Reserved + 01 - Zip + 00 - Copy (not used). Use {00} instead + 01 - Shrink + 06 - Implode + 08 - Deflate + 09 - Deflate64 + 10 - Imploding + 12 - BZip2 (not used). Use {04 02 02} instead + 14 - LZMA + 60 - Jpeg + 61 - WavPack + 62 - PPMd + 63 - wzAES + 02 - BZip + 02 - BZip2 + 03 - Rar + 01 - Rar15 + 02 - Rar20 + 03 - Rar29 + 04 - Arj + 01 - Arj (1,2,3) + 02 - Arj 4 + 05 - Z + 06 - Lzh + 07 - Reserved for 7z + 08 - Cab + 09 - NSIS + 01 - DeflateNSIS + 02 - BZip2NSIS + + +06.. - Crypto + 00 - + 01 - AES + 0x - AES-128 + 4x - AES-192 + 8x - AES-256 + Cx - AES + + x0 - ECB + x1 - CBC + x2 - CFB + x3 - OFB + + 07 - Reserved + 0F - Reserved + + F0 - Misc Ciphers (Real Ciphers without hashing algo) + + F1 - Misc Ciphers (Combine) + 01 - Zip + 01 - Main Zip crypto algo + 03 - RAR + 02 - + 03 - Rar29 AES-128 + (modified SHA-1) + 07 - 7z + 01 - AES-256 + SHA-256 + +07.. - Hash (subject to change) + 00 - + 01 - CRC + 02 - SHA-1 + 03 - SHA-256 + 04 - SHA-384 + 05 - SHA-512 + + F0 - Misc Hash + + F1 - Misc + 03 - RAR + 03 - Rar29 Password Hashing (modified SHA1) + 07 - 7z + 01 - SHA-256 Password Hashing + + + + +--- +End of document diff --git a/DOCS/copying.txt b/DOCS/copying.txt new file mode 100644 index 0000000..4c38901 --- /dev/null +++ b/DOCS/copying.txt @@ -0,0 +1,504 @@ + GNU LESSER GENERAL PUBLIC LICENSE + Version 2.1, February 1999 + + Copyright (C) 1991, 1999 Free Software Foundation, Inc. + 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + +[This is the first released version of the Lesser GPL. It also counts + as the successor of the GNU Library Public License, version 2, hence + the version number 2.1.] + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +Licenses are intended to guarantee your freedom to share and change +free software--to make sure the software is free for all its users. + + This license, the Lesser General Public License, applies to some +specially designated software packages--typically libraries--of the +Free Software Foundation and other authors who decide to use it. You +can use it too, but we suggest you first think carefully about whether +this license or the ordinary General Public License is the better +strategy to use in any particular case, based on the explanations below. + + When we speak of free software, we are referring to freedom of use, +not price. Our General Public Licenses are designed to make sure that +you have the freedom to distribute copies of free software (and charge +for this service if you wish); that you receive source code or can get +it if you want it; that you can change the software and use pieces of +it in new free programs; and that you are informed that you can do +these things. + + To protect your rights, we need to make restrictions that forbid +distributors to deny you these rights or to ask you to surrender these +rights. These restrictions translate to certain responsibilities for +you if you distribute copies of the library or if you modify it. + + For example, if you distribute copies of the library, whether gratis +or for a fee, you must give the recipients all the rights that we gave +you. You must make sure that they, too, receive or can get the source +code. If you link other code with the library, you must provide +complete object files to the recipients, so that they can relink them +with the library after making changes to the library and recompiling +it. And you must show them these terms so they know their rights. + + We protect your rights with a two-step method: (1) we copyright the +library, and (2) we offer you this license, which gives you legal +permission to copy, distribute and/or modify the library. + + To protect each distributor, we want to make it very clear that +there is no warranty for the free library. Also, if the library is +modified by someone else and passed on, the recipients should know +that what they have is not the original version, so that the original +author's reputation will not be affected by problems that might be +introduced by others. + + Finally, software patents pose a constant threat to the existence of +any free program. We wish to make sure that a company cannot +effectively restrict the users of a free program by obtaining a +restrictive license from a patent holder. Therefore, we insist that +any patent license obtained for a version of the library must be +consistent with the full freedom of use specified in this license. + + Most GNU software, including some libraries, is covered by the +ordinary GNU General Public License. This license, the GNU Lesser +General Public License, applies to certain designated libraries, and +is quite different from the ordinary General Public License. We use +this license for certain libraries in order to permit linking those +libraries into non-free programs. + + When a program is linked with a library, whether statically or using +a shared library, the combination of the two is legally speaking a +combined work, a derivative of the original library. The ordinary +General Public License therefore permits such linking only if the +entire combination fits its criteria of freedom. The Lesser General +Public License permits more lax criteria for linking other code with +the library. + + We call this license the "Lesser" General Public License because it +does Less to protect the user's freedom than the ordinary General +Public License. It also provides other free software developers Less +of an advantage over competing non-free programs. These disadvantages +are the reason we use the ordinary General Public License for many +libraries. However, the Lesser license provides advantages in certain +special circumstances. + + For example, on rare occasions, there may be a special need to +encourage the widest possible use of a certain library, so that it becomes +a de-facto standard. To achieve this, non-free programs must be +allowed to use the library. A more frequent case is that a free +library does the same job as widely used non-free libraries. In this +case, there is little to gain by limiting the free library to free +software only, so we use the Lesser General Public License. + + In other cases, permission to use a particular library in non-free +programs enables a greater number of people to use a large body of +free software. For example, permission to use the GNU C Library in +non-free programs enables many more people to use the whole GNU +operating system, as well as its variant, the GNU/Linux operating +system. + + Although the Lesser General Public License is Less protective of the +users' freedom, it does ensure that the user of a program that is +linked with the Library has the freedom and the wherewithal to run +that program using a modified version of the Library. + + The precise terms and conditions for copying, distribution and +modification follow. Pay close attention to the difference between a +"work based on the library" and a "work that uses the library". The +former contains code derived from the library, whereas the latter must +be combined with the library in order to run. + + GNU LESSER GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License Agreement applies to any software library or other +program which contains a notice placed by the copyright holder or +other authorized party saying it may be distributed under the terms of +this Lesser General Public License (also called "this License"). +Each licensee is addressed as "you". + + A "library" means a collection of software functions and/or data +prepared so as to be conveniently linked with application programs +(which use some of those functions and data) to form executables. + + The "Library", below, refers to any such software library or work +which has been distributed under these terms. A "work based on the +Library" means either the Library or any derivative work under +copyright law: that is to say, a work containing the Library or a +portion of it, either verbatim or with modifications and/or translated +straightforwardly into another language. (Hereinafter, translation is +included without limitation in the term "modification".) + + "Source code" for a work means the preferred form of the work for +making modifications to it. For a library, complete source code means +all the source code for all modules it contains, plus any associated +interface definition files, plus the scripts used to control compilation +and installation of the library. + + Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running a program using the Library is not restricted, and output from +such a program is covered only if its contents constitute a work based +on the Library (independent of the use of the Library in a tool for +writing it). Whether that is true depends on what the Library does +and what the program that uses the Library does. + + 1. You may copy and distribute verbatim copies of the Library's +complete source code as you receive it, in any medium, provided that +you conspicuously and appropriately publish on each copy an +appropriate copyright notice and disclaimer of warranty; keep intact +all the notices that refer to this License and to the absence of any +warranty; and distribute a copy of this License along with the +Library. + + You may charge a fee for the physical act of transferring a copy, +and you may at your option offer warranty protection in exchange for a +fee. + + 2. You may modify your copy or copies of the Library or any portion +of it, thus forming a work based on the Library, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) The modified work must itself be a software library. + + b) You must cause the files modified to carry prominent notices + stating that you changed the files and the date of any change. + + c) You must cause the whole of the work to be licensed at no + charge to all third parties under the terms of this License. + + d) If a facility in the modified Library refers to a function or a + table of data to be supplied by an application program that uses + the facility, other than as an argument passed when the facility + is invoked, then you must make a good faith effort to ensure that, + in the event an application does not supply such function or + table, the facility still operates, and performs whatever part of + its purpose remains meaningful. + + (For example, a function in a library to compute square roots has + a purpose that is entirely well-defined independent of the + application. Therefore, Subsection 2d requires that any + application-supplied function or table used by this function must + be optional: if the application does not supply it, the square + root function must still compute square roots.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Library, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Library, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote +it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Library. + +In addition, mere aggregation of another work not based on the Library +with the Library (or with a work based on the Library) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may opt to apply the terms of the ordinary GNU General Public +License instead of this License to a given copy of the Library. To do +this, you must alter all the notices that refer to this License, so +that they refer to the ordinary GNU General Public License, version 2, +instead of to this License. (If a newer version than version 2 of the +ordinary GNU General Public License has appeared, then you can specify +that version instead if you wish.) Do not make any other change in +these notices. + + Once this change is made in a given copy, it is irreversible for +that copy, so the ordinary GNU General Public License applies to all +subsequent copies and derivative works made from that copy. + + This option is useful when you wish to copy part of the code of +the Library into a program that is not a library. + + 4. You may copy and distribute the Library (or a portion or +derivative of it, under Section 2) in object code or executable form +under the terms of Sections 1 and 2 above provided that you accompany +it with the complete corresponding machine-readable source code, which +must be distributed under the terms of Sections 1 and 2 above on a +medium customarily used for software interchange. + + If distribution of object code is made by offering access to copy +from a designated place, then offering equivalent access to copy the +source code from the same place satisfies the requirement to +distribute the source code, even though third parties are not +compelled to copy the source along with the object code. + + 5. A program that contains no derivative of any portion of the +Library, but is designed to work with the Library by being compiled or +linked with it, is called a "work that uses the Library". Such a +work, in isolation, is not a derivative work of the Library, and +therefore falls outside the scope of this License. + + However, linking a "work that uses the Library" with the Library +creates an executable that is a derivative of the Library (because it +contains portions of the Library), rather than a "work that uses the +library". The executable is therefore covered by this License. +Section 6 states terms for distribution of such executables. + + When a "work that uses the Library" uses material from a header file +that is part of the Library, the object code for the work may be a +derivative work of the Library even though the source code is not. +Whether this is true is especially significant if the work can be +linked without the Library, or if the work is itself a library. The +threshold for this to be true is not precisely defined by law. + + If such an object file uses only numerical parameters, data +structure layouts and accessors, and small macros and small inline +functions (ten lines or less in length), then the use of the object +file is unrestricted, regardless of whether it is legally a derivative +work. (Executables containing this object code plus portions of the +Library will still fall under Section 6.) + + Otherwise, if the work is a derivative of the Library, you may +distribute the object code for the work under the terms of Section 6. +Any executables containing that work also fall under Section 6, +whether or not they are linked directly with the Library itself. + + 6. As an exception to the Sections above, you may also combine or +link a "work that uses the Library" with the Library to produce a +work containing portions of the Library, and distribute that work +under terms of your choice, provided that the terms permit +modification of the work for the customer's own use and reverse +engineering for debugging such modifications. + + You must give prominent notice with each copy of the work that the +Library is used in it and that the Library and its use are covered by +this License. You must supply a copy of this License. If the work +during execution displays copyright notices, you must include the +copyright notice for the Library among them, as well as a reference +directing the user to the copy of this License. Also, you must do one +of these things: + + a) Accompany the work with the complete corresponding + machine-readable source code for the Library including whatever + changes were used in the work (which must be distributed under + Sections 1 and 2 above); and, if the work is an executable linked + with the Library, with the complete machine-readable "work that + uses the Library", as object code and/or source code, so that the + user can modify the Library and then relink to produce a modified + executable containing the modified Library. (It is understood + that the user who changes the contents of definitions files in the + Library will not necessarily be able to recompile the application + to use the modified definitions.) + + b) Use a suitable shared library mechanism for linking with the + Library. A suitable mechanism is one that (1) uses at run time a + copy of the library already present on the user's computer system, + rather than copying library functions into the executable, and (2) + will operate properly with a modified version of the library, if + the user installs one, as long as the modified version is + interface-compatible with the version that the work was made with. + + c) Accompany the work with a written offer, valid for at + least three years, to give the same user the materials + specified in Subsection 6a, above, for a charge no more + than the cost of performing this distribution. + + d) If distribution of the work is made by offering access to copy + from a designated place, offer equivalent access to copy the above + specified materials from the same place. + + e) Verify that the user has already received a copy of these + materials or that you have already sent this user a copy. + + For an executable, the required form of the "work that uses the +Library" must include any data and utility programs needed for +reproducing the executable from it. However, as a special exception, +the materials to be distributed need not include anything that is +normally distributed (in either source or binary form) with the major +components (compiler, kernel, and so on) of the operating system on +which the executable runs, unless that component itself accompanies +the executable. + + It may happen that this requirement contradicts the license +restrictions of other proprietary libraries that do not normally +accompany the operating system. Such a contradiction means you cannot +use both them and the Library together in an executable that you +distribute. + + 7. You may place library facilities that are a work based on the +Library side-by-side in a single library together with other library +facilities not covered by this License, and distribute such a combined +library, provided that the separate distribution of the work based on +the Library and of the other library facilities is otherwise +permitted, and provided that you do these two things: + + a) Accompany the combined library with a copy of the same work + based on the Library, uncombined with any other library + facilities. This must be distributed under the terms of the + Sections above. + + b) Give prominent notice with the combined library of the fact + that part of it is a work based on the Library, and explaining + where to find the accompanying uncombined form of the same work. + + 8. You may not copy, modify, sublicense, link with, or distribute +the Library except as expressly provided under this License. Any +attempt otherwise to copy, modify, sublicense, link with, or +distribute the Library is void, and will automatically terminate your +rights under this License. However, parties who have received copies, +or rights, from you under this License will not have their licenses +terminated so long as such parties remain in full compliance. + + 9. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Library or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Library (or any work based on the +Library), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Library or works based on it. + + 10. Each time you redistribute the Library (or any work based on the +Library), the recipient automatically receives a license from the +original licensor to copy, distribute, link with or modify the Library +subject to these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties with +this License. + + 11. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Library at all. For example, if a patent +license would not permit royalty-free redistribution of the Library by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Library. + +If any portion of this section is held invalid or unenforceable under any +particular circumstance, the balance of the section is intended to apply, +and the section as a whole is intended to apply in other circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 12. If the distribution and/or use of the Library is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Library under this License may add +an explicit geographical distribution limitation excluding those countries, +so that distribution is permitted only in or among countries not thus +excluded. In such case, this License incorporates the limitation as if +written in the body of this License. + + 13. The Free Software Foundation may publish revised and/or new +versions of the Lesser General Public License from time to time. +Such new versions will be similar in spirit to the present version, +but may differ in detail to address new problems or concerns. + +Each version is given a distinguishing version number. If the Library +specifies a version number of this License which applies to it and +"any later version", you have the option of following the terms and +conditions either of that version or of any later version published by +the Free Software Foundation. If the Library does not specify a +license version number, you may choose any version ever published by +the Free Software Foundation. + + 14. If you wish to incorporate parts of the Library into other free +programs whose distribution conditions are incompatible with these, +write to the author to ask for permission. For software which is +copyrighted by the Free Software Foundation, write to the Free +Software Foundation; we sometimes make exceptions for this. Our +decision will be guided by the two goals of preserving the free status +of all derivatives of our free software and of promoting the sharing +and reuse of software generally. + + NO WARRANTY + + 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO +WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. +EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR +OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY +KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE +LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME +THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN +WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY +AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU +FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR +CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE +LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING +RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A +FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF +SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH +DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Libraries + + If you develop a new library, and you want it to be of the greatest +possible use to the public, we recommend making it free software that +everyone can redistribute and change. You can do so by permitting +redistribution under these terms (or, alternatively, under the terms of the +ordinary General Public License). + + To apply these terms, attach the following notices to the library. It is +safest to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least the +"copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +Also add information on how to contact you by electronic and paper mail. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the library, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the + library `Frob' (a library for tweaking knobs) written by James Random Hacker. + + , 1 April 1990 + Ty Coon, President of Vice + +That's all there is to it! + + diff --git a/DOCS/history.txt b/DOCS/history.txt new file mode 100644 index 0000000..05a9a21 --- /dev/null +++ b/DOCS/history.txt @@ -0,0 +1,456 @@ +Sources history of the 7-Zip +---------------------------- + +9.18 2010-11-02 +------------------------- +- New small SFX module for installers (C/Util/SfxSetup). + + +9.17 2010-10-04 +------------------------- +- IStream.h::IOutStream:: + STDMETHOD(SetSize)(Int64 newSize) PURE; + was changed to + STDMETHOD(SetSize)(UInt64 newSize) PURE; + + +9.09 2009-12-12 +------------------------- +- The bug was fixed: + Utf16_To_Utf8 funstions in UTFConvert.cpp and 7zMain.c + incorrectly converted surrogate characters (the code >= 0x10000) to UTF-8. + + +9.05 2009-07-05 +------------------------- +- FileMapping.h::CFileMapping now returns WRes + + +9.04 2009-05-30 +------------------------- +- ICoder.h: NCoderPropID::EEnum values were changed + + +9.02 2009-04-23 +------------------------- +- Bug was fixed: if swap2 filter was requests at compression, + 7-zip used swap4 filter instead (but id was swap2), so archives were incorrect. + +4.61 2008-11-23 +------------------------- +- Bug in ver. 4.58+ was fixed: + 7-Zip didn't use any -m* switch after -mtc, -mcl or -mcu for .zip archives. +- Bug in .CAB code was fixed. 7-Zip didn't show some empty files, + if .CAB archive contains more than one empty file. + + +4.59 2008-07-27 +------------------------- +- Bug was fixed: + LZMA Encoder in fast compression mode could access memory outside of + allocated range in some rare cases. + + +4.59 alpha 2008-05-30 +------------------------- +- BUGS was fixed: + 7zOut.cpp: 7-Zip incorrectly wrote size of property records in some cases. + 7zIn.cpp: 7-Zip incorrectly work with archive, containg archive properties. + +4.58 alpha 9 2008-04-29 +------------------------- +- BUG was fixed: 7-Zip showed incorrect timestamps in ISO files. + + +4.58 alpha 8 2008-04-15 +------------------------- +- BUG in 4.58 alpha 5/6/7 was fixed: + LZMA encoder worked incorrectly, if lp != 0. +- Unicode (UTF-8) support for filenames in .ZIP archives. Now there are 3 modes: + 1) Default mode: 7-Zip uses UTF-8, if the local code page doesn't contain required symbols. + 2) -mcu switch: 7-Zip uses UTF-8, if there are non-ASCII symbols. + 3) -mcl switch: 7-Zip uses local code page. +- Now it's possible to use -mSW- and -mSW+ switches instead of -mSW=off and -mSW=on + + +4.58 alpha 7 2008-04-08 +------------------------- +- BUG was fixed: BZip2Encoder and BZip2Decoder used CEvent objects without + creating, when BZip2 code was called with one thread (with -mmt1 switch or with + default switches on single thread CPU). +- .lzma support. +- RPM and NSIS support was improved. +- LZMA now stores only (2 << n) or (3 << n) dictionary size value to LZMA properties. + + +4.58 alpha 6 2008-03-27 +------------------------- +- NTFS time extra in ZIP. +- New item property - kpidTimeType - VT_UI4 (0 - NTFS, 1 - Unix, 2 - DOS). +- Static CRC table is not required now for Lzma Encoder (in Lz MatchFinder). + + +4.58 alpha 5 2008-03-19 +------------------------- +- Creation time (-mtc switch) for .7z archives +- LZMA encoder was converted to ANSI-C + + +4.58 alpha 3 2008-02-25 +------------------------- +- Speed optimizations for LZMA decoding. Now it uses C code instead of C++. +- 7-Zip now has 128 MB dictionary limit for 32-bit version: + It's for speed optimization: kNumLogBits = 9 + sizeof(size_t) / 2; +- TAR: 'D' link flag support. +- 7-Zip now can unpack multivolume RAR archives created with + "old style volume names" scheme (-vn switch) and names *.001, *.002, ... +- Fixed bugs: + - 7-Zip FM could not copy / move files to root network folders like \\COMPNAME\FOLDERNAME\ + In case of move it removed original files. + - SFX-WIN: if there are errors, it still could return 0. + - ZIP (.XPS file) isZip64 && thisDiskNumber16 == 0xFFFF. + - ZIP name updating: + If zip file contains extra field and you try to change properties of files, + 7-zip tries to delete all extra fileds (except for WzAES). + And that code could hang. + - 7-Zip GUI didn't suggest BZip2 dictionary size used in previous run. + - If creation time stamp was included in .RAR archive, 7-zip used creation time stamp + as modification time stamp. + +4.58 alpha 2 2007-12-31 +------------------------- +- Small changes in Deflate and LZMA compression. +- Some speed optimizations. + + +4.57 +---- +- Bug was fixed: + Anti item is created for wrong file: + http://sourceforge.net/forum/forum.php?thread_id=1880366&forum_id=45798 + + +4.52 beta 2007-07-32 +------------------------- +- 7-Zip could not decompress some cab files +- "." dir creating at FAT was fixed / long names + + +4.50 beta 2007-07-24 +------------------------- +- 7-Zip now replaces unsupported filenames (like "nul", "com1") during extracting. +- New switch for command line version: + -ssc[-] enables/disables case-sensitive mode. +- 7z.exe l shows archive comment for zip archives +- Some bugs were fixed: long paths names shorter than 4. +- Speed optimizations for AES encryption. + + + +4.56 beta 2007-09-13 +------------------------- +- some fixes in LZ encoder (LZMA and Deflate) code. + size_t was replaces to ptrdiff_t. + size_t version worked incorrectly with some compilers. + + +4.46 beta 2007-05-25 +------------------------- +- CPP Synchronization objects now return HRes (error code) instead of bool. + + +4.45 beta 2007-04-16 +------------------------- +- 7-Zip now uses C version of CRC, so you must call CrcGenerateTable at + stratup code, or you must add CPP/Common/CRC.cpp to your project. +- Method ID in .7z now is 63-bit integer (UInt64). +- Open error messages +- unRar 1.5 fixed +- unShrink fixed +- BUG of 4.43 beta and 4.44 beta was fixed. + 7-Zip compressing to .zip in multi-threading mode didn't work in some cases. + + +4.44 beta 2007-01-20 +------------------------- + +- Bug was fixed: LZMAEncoder.cpp::CEncoder::GetOptimumFast + it was: + data++ + fixed version: + data = _matchFinder.GetPointerToCurrentPos(_matchFinderObj) - 1; + It could lead to very small cpmpression ratio decreasing when block needs move. + + +4.30 beta 2005-11-18 +------------------------- +- Security.h::AddLockMemoryPrivilege - installs "Large pages" feature +- MemoryLock.h::EnableLockMemoryPrivilege - enables "Large pages" feature +- Alloc.h::SetLargePageSize - sets optimal LargePageSize size + + +4.27 2005-09-21 +------------------------- +- Some GUIDs/interfaces were changed. + IStream.h: + ISequentialInStream::Read now works as old ReadPart + ISequentialOutStream::Write now works as old WritePart + + +4.26 beta 2005-08-05 +------------------------- +- MyAlloc(0)/BigAlloc(0) now return 0 + + +4.25 beta 2005-07-31 +------------------------- +- More 64-bit compatibilty + + +4.24 beta 2005-07-06 +------------------------- +- Common\NewHandler.h: using throw() for code size optimization. + + +4.23 2005-06-29 +------------------------- +- Bug was fixed: memory leak in Cab decoder. + + +4.19 beta 2005-05-21 +------------------------- +- BZip2 code was rewritten. Now 7-Zip doesn't use original BZip2 code. + Old (original) version was moved to folder 7zip/Compress/BZip2Original/ + + +4.14 beta 2005-01-11 +------------------------- +- STL using was reduced +- 7za now supports Split(001) archves + + +4.10 beta 2004-10-21 +------------------------- +- Codecs now use new interface: ICompressSetDecoderProperties2 + + +4.07 beta 2004-10-03 +------------------------- +- some interfaces were changed slightly to support + -stdin -stdout mode. +- FilterCoder for simple filters +- Wildcard censor class was changed. +- Bug was fixed: when encrypted stream was multiple 16, + it used additional 16 empty bytes. + + +3.11 2003-10-06 +------------------------- + File functions support unicode strings even + on Windows 95/98/ME. + + +3.08.02 2003-09-20 +------------------------- + More compatible with GCC. + + +3.08.02 beta 2003-08-20 +------------------------- + Extracting bug in 7zExtract.cpp was fixed. + + +3.08 beta 2003-08-19 +------------------------- + Big source code reconstruction. + + +2.30 Beta 32 2003-05-15 +------------------------- + Small changes in Deflate decoder. + + +2.30 Beta 31 2003-04-29 +------------------------- + Common/NewHandler.cpp + HeapAlloc in (included to beta 30) was changed to malloc. + HeapAlloc worked slower in Win95/98/Me. + + +2.30 Beta 30 2003-04-21 +------------------------- + new file: Common/String.cpp + Common/NewHandler.* were changed + + +2.30 Beta 29 2003-04-07 +------------------------- + Small changes in LZMA code. + + +2.30 Beta 28 2003-02-16 +------------------------- + Processing anti-files was corrected. + + +2.30 Beta 27 2003-01-24 +------------------------- + Project/Archiver/Format/Common/ArchiveInterface.h: + new IArchiveOpenVolumeCallback interface. + + +2.30 Beta 26 2003-01-12 +------------------------- + SDK/Interface/PropID.h: + kpidComment now is kpidCommented + + +2.30 Beta 25 2003-01-02 +------------------------- + Main archive interfaces were changed. + + +2.30 Beta 24 2002-11-01 +------------------------- + SDK/Windows/Synchronization.h + SDK/Windows/Synchronization.cpp + - some changes. + + +2.30 Beta 23 2002-09-07 +------------------------- + Project/FileManager folder was added. + Notation of some source files was changed. + + +2.30 Beta 22 2002-08-28 +------------------------- + Project/FileManager folder was added. + Notation of some source files was changed. + + + +2.30 Beta 21 2002-07-08 +------------------------- + Project/Compress/LZ/MatchFinder/BinTree/BinTree.h + Project/Compress/LZ/MatchFinder/BinTree/BinTreeMain.h + Project/Compress/LZ/MatchFinder/BinTree/HC.h + Project/Compress/LZ/MatchFinder/BinTree/HCMain.h + - RAM requirements for LZMA (7z) compression were reduced. + + +2.30 Beta 20 2002-07-01 +------------------------- +- SDK/Stream/WindowOut.h + now it uses only required memory (dictionary size). +- Project/Archiver/Resource + contains common resurces + + +2.30 Beta 19 2002-04-11 +------------------------- +- SDK/Archive/Rar/Handler.cpp + supporting RAR29 + +2.30 Beta 18 2002-03-25 +------------------------- +- SDK/Archive/Cab/MSZipDecoder.cpp + SDK/Archive/Cab/LZXDecoder.cpp: + bug with corrupted archives was fixed +- Project/Compress/LZ/MatchFinder/BinTree/BinTree.h +- Project/Compress/LZ/MatchFinder/BinTree/BinTreeMain.h + some speed optimization (using prefetching) + + +2.30 Beta 17 2002-03-03 +------------------------- +- ARJ suppport. + + +2.30 Beta 16 2002-02-24 +------------------------- +- Project/Compress/LZ/LZMA/Decoder.cpp: + Bug was fixed: LZMA could not extract more than 4 GB. +- RPM and CPIO formats. +- Project/Compress/LZ/LZMA/Encoder.* + Project/Archiver/Format/7z/OutHandler.cpp + New fast compression mode for LZMA: -m0a=0. +- New match finders for LZMA: bt4b, hc3, hc4. + + +2.30 Beta 15 2002-02-17 +------------------------- +- Compression ratio in LZMA was slightly improved: + Project/Compress/LZ/LZMA/Encoder.* + Project/Archiver/Format/7z/OutHandler.cpp + + +2.30 Beta 14 2002-02-10 +------------------------- +- Supporting multithreading for LZMA: + Project/Compress/LZ/MatchFinder/MT +- Common/String.h: + CStringBase::Replace function was fixed. + + +2.30 Beta 13 2002-01-27 +------------------------- +- Compress/LZ/MatchFinder/BinTree3.h: + method +- Compress/LZ/MatchFinder/BinTreemain.h: + - one VirtualAlloc array was splitted to + the for 3 arrays. + - Hash-functions were changed. + + + +2.30 Beta 12 2002-01-16 +------------------------- +- Compress/LZ/MatchFinder/BinTreemain.h: + Compress/LZ/MatchFinder/Patricia.h: + Compress/PPM/PPMd/SubAlloc.h: + Beta 11 bugs were fixed: + - VirtualFree was used incorrectly + - checking WIN32 instead _WINDOWS. + Compress/LZ/MatchFinder/Patricia.h: + Beta 11 bug with deleting m_Hash2Descendants was fixed. + + +2.30 Beta 11 2002-01-15 +------------------------- +- Compress/LZ/MatchFinder/BinTreemain.h: + Compress/LZ/MatchFinder/Patricia.h: + Compress/PPM/PPMd/SubAlloc.h: + using VirtualAlloc for memory allocating +- Exlorer/ContextMenu.cpp: + Testing supporting. + CreateProcess instead WinExec +- Format/Common/IArchiveHandler.h: + Exlorer/ProxyHandler.cpp: + FAR/Plugin.cpp: + New properties names: Method, HostOS. +- Exlorer/OverwriteDialog.cpp: + FAR/OverwriteDialog.cpp: + Windows/PropVariantConversions.h + Using National time format was eliminated. + + + +2.30 Beta 10 2002-01-11 +------------------------- +- Exlorer/ContextMenu.cpp: bug with context menu on + Windows NT4 in Unicode version was fixed. +- Format/7z/UpdateArchiveEngine.cpp: bug was fixed - + Updating in Beta 8 and 9 didn't work. +- Exlorer/CCompressDialog.cpp: history growing bug was fixed. + + +2.30 Beta 9 2002-01-08 +------------------------- +- SDK/Common/Vector.h: sopporting sorted object vectors . +- Lang features. +- Two new match finders: pat3h and pat4h. +- SDK/Archive/Zip/InEngine.cpp: bug was fixed. +- SDK/Windows/FileDir.cpp: function CreateComplexDirectory + was changed. + diff --git a/DOCS/lzma.txt b/DOCS/lzma.txt new file mode 100644 index 0000000..6593232 --- /dev/null +++ b/DOCS/lzma.txt @@ -0,0 +1,598 @@ +LZMA SDK 9.20 +------------- + +LZMA SDK provides the documentation, samples, header files, libraries, +and tools you need to develop applications that use LZMA compression. + +LZMA is default and general compression method of 7z format +in 7-Zip compression program (www.7-zip.org). LZMA provides high +compression ratio and very fast decompression. + +LZMA is an improved version of famous LZ77 compression algorithm. +It was improved in way of maximum increasing of compression ratio, +keeping high decompression speed and low memory requirements for +decompressing. + + + +LICENSE +------- + +LZMA SDK is written and placed in the public domain by Igor Pavlov. + +Some code in LZMA SDK is based on public domain code from another developers: + 1) PPMd var.H (2001): Dmitry Shkarin + 2) SHA-256: Wei Dai (Crypto++ library) + + +LZMA SDK Contents +----------------- + +LZMA SDK includes: + + - ANSI-C/C++/C#/Java source code for LZMA compressing and decompressing + - Compiled file->file LZMA compressing/decompressing program for Windows system + + +UNIX/Linux version +------------------ +To compile C++ version of file->file LZMA encoding, go to directory +CPP/7zip/Bundles/LzmaCon +and call make to recompile it: + make -f makefile.gcc clean all + +In some UNIX/Linux versions you must compile LZMA with static libraries. +To compile with static libraries, you can use +LIB = -lm -static + + +Files +--------------------- +lzma.txt - LZMA SDK description (this file) +7zFormat.txt - 7z Format description +7zC.txt - 7z ANSI-C Decoder description +methods.txt - Compression method IDs for .7z +lzma.exe - Compiled file->file LZMA encoder/decoder for Windows +7zr.exe - 7-Zip with 7z/lzma/xz support. +history.txt - history of the LZMA SDK + + +Source code structure +--------------------- + +C/ - C files + 7zCrc*.* - CRC code + Alloc.* - Memory allocation functions + Bra*.* - Filters for x86, IA-64, ARM, ARM-Thumb, PowerPC and SPARC code + LzFind.* - Match finder for LZ (LZMA) encoders + LzFindMt.* - Match finder for LZ (LZMA) encoders for multithreading encoding + LzHash.h - Additional file for LZ match finder + LzmaDec.* - LZMA decoding + LzmaEnc.* - LZMA encoding + LzmaLib.* - LZMA Library for DLL calling + Types.h - Basic types for another .c files + Threads.* - The code for multithreading. + + LzmaLib - LZMA Library (.DLL for Windows) + + LzmaUtil - LZMA Utility (file->file LZMA encoder/decoder). + + Archive - files related to archiving + 7z - 7z ANSI-C Decoder + +CPP/ -- CPP files + + Common - common files for C++ projects + Windows - common files for Windows related code + + 7zip - files related to 7-Zip Project + + Common - common files for 7-Zip + + Compress - files related to compression/decompression + + Archive - files related to archiving + + Common - common files for archive handling + 7z - 7z C++ Encoder/Decoder + + Bundles - Modules that are bundles of other modules + + Alone7z - 7zr.exe: Standalone version of 7z.exe that supports only 7z/LZMA/BCJ/BCJ2 + LzmaCon - lzma.exe: LZMA compression/decompression + Format7zR - 7zr.dll: Reduced version of 7za.dll: extracting/compressing to 7z/LZMA/BCJ/BCJ2 + Format7zExtractR - 7zxr.dll: Reduced version of 7zxa.dll: extracting from 7z/LZMA/BCJ/BCJ2. + + UI - User Interface files + + Client7z - Test application for 7za.dll, 7zr.dll, 7zxr.dll + Common - Common UI files + Console - Code for console archiver + + + +CS/ - C# files + 7zip + Common - some common files for 7-Zip + Compress - files related to compression/decompression + LZ - files related to LZ (Lempel-Ziv) compression algorithm + LZMA - LZMA compression/decompression + LzmaAlone - file->file LZMA compression/decompression + RangeCoder - Range Coder (special code of compression/decompression) + +Java/ - Java files + SevenZip + Compression - files related to compression/decompression + LZ - files related to LZ (Lempel-Ziv) compression algorithm + LZMA - LZMA compression/decompression + RangeCoder - Range Coder (special code of compression/decompression) + + +C/C++ source code of LZMA SDK is part of 7-Zip project. +7-Zip source code can be downloaded from 7-Zip's SourceForge page: + + http://sourceforge.net/projects/sevenzip/ + + + +LZMA features +------------- + - Variable dictionary size (up to 1 GB) + - Estimated compressing speed: about 2 MB/s on 2 GHz CPU + - Estimated decompressing speed: + - 20-30 MB/s on 2 GHz Core 2 or AMD Athlon 64 + - 1-2 MB/s on 200 MHz ARM, MIPS, PowerPC or other simple RISC + - Small memory requirements for decompressing (16 KB + DictionarySize) + - Small code size for decompressing: 5-8 KB + +LZMA decoder uses only integer operations and can be +implemented in any modern 32-bit CPU (or on 16-bit CPU with some conditions). + +Some critical operations that affect the speed of LZMA decompression: + 1) 32*16 bit integer multiply + 2) Misspredicted branches (penalty mostly depends from pipeline length) + 3) 32-bit shift and arithmetic operations + +The speed of LZMA decompressing mostly depends from CPU speed. +Memory speed has no big meaning. But if your CPU has small data cache, +overall weight of memory speed will slightly increase. + + +How To Use +---------- + +Using LZMA encoder/decoder executable +-------------------------------------- + +Usage: LZMA inputFile outputFile [...] + + e: encode file + + d: decode file + + b: Benchmark. There are two tests: compressing and decompressing + with LZMA method. Benchmark shows rating in MIPS (million + instructions per second). Rating value is calculated from + measured speed and it is normalized with Intel's Core 2 results. + Also Benchmark checks possible hardware errors (RAM + errors in most cases). Benchmark uses these settings: + (-a1, -d21, -fb32, -mfbt4). You can change only -d parameter. + Also you can change the number of iterations. Example for 30 iterations: + LZMA b 30 + Default number of iterations is 10. + + + + + -a{N}: set compression mode 0 = fast, 1 = normal + default: 1 (normal) + + d{N}: Sets Dictionary size - [0, 30], default: 23 (8MB) + The maximum value for dictionary size is 1 GB = 2^30 bytes. + Dictionary size is calculated as DictionarySize = 2^N bytes. + For decompressing file compressed by LZMA method with dictionary + size D = 2^N you need about D bytes of memory (RAM). + + -fb{N}: set number of fast bytes - [5, 273], default: 128 + Usually big number gives a little bit better compression ratio + and slower compression process. + + -lc{N}: set number of literal context bits - [0, 8], default: 3 + Sometimes lc=4 gives gain for big files. + + -lp{N}: set number of literal pos bits - [0, 4], default: 0 + lp switch is intended for periodical data when period is + equal 2^N. For example, for 32-bit (4 bytes) + periodical data you can use lp=2. Often it's better to set lc0, + if you change lp switch. + + -pb{N}: set number of pos bits - [0, 4], default: 2 + pb switch is intended for periodical data + when period is equal 2^N. + + -mf{MF_ID}: set Match Finder. Default: bt4. + Algorithms from hc* group doesn't provide good compression + ratio, but they often works pretty fast in combination with + fast mode (-a0). + + Memory requirements depend from dictionary size + (parameter "d" in table below). + + MF_ID Memory Description + + bt2 d * 9.5 + 4MB Binary Tree with 2 bytes hashing. + bt3 d * 11.5 + 4MB Binary Tree with 3 bytes hashing. + bt4 d * 11.5 + 4MB Binary Tree with 4 bytes hashing. + hc4 d * 7.5 + 4MB Hash Chain with 4 bytes hashing. + + -eos: write End Of Stream marker. By default LZMA doesn't write + eos marker, since LZMA decoder knows uncompressed size + stored in .lzma file header. + + -si: Read data from stdin (it will write End Of Stream marker). + -so: Write data to stdout + + +Examples: + +1) LZMA e file.bin file.lzma -d16 -lc0 + +compresses file.bin to file.lzma with 64 KB dictionary (2^16=64K) +and 0 literal context bits. -lc0 allows to reduce memory requirements +for decompression. + + +2) LZMA e file.bin file.lzma -lc0 -lp2 + +compresses file.bin to file.lzma with settings suitable +for 32-bit periodical data (for example, ARM or MIPS code). + +3) LZMA d file.lzma file.bin + +decompresses file.lzma to file.bin. + + +Compression ratio hints +----------------------- + +Recommendations +--------------- + +To increase the compression ratio for LZMA compressing it's desirable +to have aligned data (if it's possible) and also it's desirable to locate +data in such order, where code is grouped in one place and data is +grouped in other place (it's better than such mixing: code, data, code, +data, ...). + + +Filters +------- +You can increase the compression ratio for some data types, using +special filters before compressing. For example, it's possible to +increase the compression ratio on 5-10% for code for those CPU ISAs: +x86, IA-64, ARM, ARM-Thumb, PowerPC, SPARC. + +You can find C source code of such filters in C/Bra*.* files + +You can check the compression ratio gain of these filters with such +7-Zip commands (example for ARM code): +No filter: + 7z a a1.7z a.bin -m0=lzma + +With filter for little-endian ARM code: + 7z a a2.7z a.bin -m0=arm -m1=lzma + +It works in such manner: +Compressing = Filter_encoding + LZMA_encoding +Decompressing = LZMA_decoding + Filter_decoding + +Compressing and decompressing speed of such filters is very high, +so it will not increase decompressing time too much. +Moreover, it reduces decompression time for LZMA_decoding, +since compression ratio with filtering is higher. + +These filters convert CALL (calling procedure) instructions +from relative offsets to absolute addresses, so such data becomes more +compressible. + +For some ISAs (for example, for MIPS) it's impossible to get gain from such filter. + + +LZMA compressed file format +--------------------------- +Offset Size Description + 0 1 Special LZMA properties (lc,lp, pb in encoded form) + 1 4 Dictionary size (little endian) + 5 8 Uncompressed size (little endian). -1 means unknown size + 13 Compressed data + + +ANSI-C LZMA Decoder +~~~~~~~~~~~~~~~~~~~ + +Please note that interfaces for ANSI-C code were changed in LZMA SDK 4.58. +If you want to use old interfaces you can download previous version of LZMA SDK +from sourceforge.net site. + +To use ANSI-C LZMA Decoder you need the following files: +1) LzmaDec.h + LzmaDec.c + Types.h +LzmaUtil/LzmaUtil.c is example application that uses these files. + + +Memory requirements for LZMA decoding +------------------------------------- + +Stack usage of LZMA decoding function for local variables is not +larger than 200-400 bytes. + +LZMA Decoder uses dictionary buffer and internal state structure. +Internal state structure consumes + state_size = (4 + (1.5 << (lc + lp))) KB +by default (lc=3, lp=0), state_size = 16 KB. + + +How To decompress data +---------------------- + +LZMA Decoder (ANSI-C version) now supports 2 interfaces: +1) Single-call Decompressing +2) Multi-call State Decompressing (zlib-like interface) + +You must use external allocator: +Example: +void *SzAlloc(void *p, size_t size) { p = p; return malloc(size); } +void SzFree(void *p, void *address) { p = p; free(address); } +ISzAlloc alloc = { SzAlloc, SzFree }; + +You can use p = p; operator to disable compiler warnings. + + +Single-call Decompressing +------------------------- +When to use: RAM->RAM decompressing +Compile files: LzmaDec.h + LzmaDec.c + Types.h +Compile defines: no defines +Memory Requirements: + - Input buffer: compressed size + - Output buffer: uncompressed size + - LZMA Internal Structures: state_size (16 KB for default settings) + +Interface: + int LzmaDecode(Byte *dest, SizeT *destLen, const Byte *src, SizeT *srcLen, + const Byte *propData, unsigned propSize, ELzmaFinishMode finishMode, + ELzmaStatus *status, ISzAlloc *alloc); + In: + dest - output data + destLen - output data size + src - input data + srcLen - input data size + propData - LZMA properties (5 bytes) + propSize - size of propData buffer (5 bytes) + finishMode - It has meaning only if the decoding reaches output limit (*destLen). + LZMA_FINISH_ANY - Decode just destLen bytes. + LZMA_FINISH_END - Stream must be finished after (*destLen). + You can use LZMA_FINISH_END, when you know that + current output buffer covers last bytes of stream. + alloc - Memory allocator. + + Out: + destLen - processed output size + srcLen - processed input size + + Output: + SZ_OK + status: + LZMA_STATUS_FINISHED_WITH_MARK + LZMA_STATUS_NOT_FINISHED + LZMA_STATUS_MAYBE_FINISHED_WITHOUT_MARK + SZ_ERROR_DATA - Data error + SZ_ERROR_MEM - Memory allocation error + SZ_ERROR_UNSUPPORTED - Unsupported properties + SZ_ERROR_INPUT_EOF - It needs more bytes in input buffer (src). + + If LZMA decoder sees end_marker before reaching output limit, it returns OK result, + and output value of destLen will be less than output buffer size limit. + + You can use multiple checks to test data integrity after full decompression: + 1) Check Result and "status" variable. + 2) Check that output(destLen) = uncompressedSize, if you know real uncompressedSize. + 3) Check that output(srcLen) = compressedSize, if you know real compressedSize. + You must use correct finish mode in that case. */ + + +Multi-call State Decompressing (zlib-like interface) +---------------------------------------------------- + +When to use: file->file decompressing +Compile files: LzmaDec.h + LzmaDec.c + Types.h + +Memory Requirements: + - Buffer for input stream: any size (for example, 16 KB) + - Buffer for output stream: any size (for example, 16 KB) + - LZMA Internal Structures: state_size (16 KB for default settings) + - LZMA dictionary (dictionary size is encoded in LZMA properties header) + +1) read LZMA properties (5 bytes) and uncompressed size (8 bytes, little-endian) to header: + unsigned char header[LZMA_PROPS_SIZE + 8]; + ReadFile(inFile, header, sizeof(header) + +2) Allocate CLzmaDec structures (state + dictionary) using LZMA properties + + CLzmaDec state; + LzmaDec_Constr(&state); + res = LzmaDec_Allocate(&state, header, LZMA_PROPS_SIZE, &g_Alloc); + if (res != SZ_OK) + return res; + +3) Init LzmaDec structure before any new LZMA stream. And call LzmaDec_DecodeToBuf in loop + + LzmaDec_Init(&state); + for (;;) + { + ... + int res = LzmaDec_DecodeToBuf(CLzmaDec *p, Byte *dest, SizeT *destLen, + const Byte *src, SizeT *srcLen, ELzmaFinishMode finishMode); + ... + } + + +4) Free all allocated structures + LzmaDec_Free(&state, &g_Alloc); + +For full code example, look at C/LzmaUtil/LzmaUtil.c code. + + +How To compress data +-------------------- + +Compile files: LzmaEnc.h + LzmaEnc.c + Types.h + +LzFind.c + LzFind.h + LzFindMt.c + LzFindMt.h + LzHash.h + +Memory Requirements: + - (dictSize * 11.5 + 6 MB) + state_size + +Lzma Encoder can use two memory allocators: +1) alloc - for small arrays. +2) allocBig - for big arrays. + +For example, you can use Large RAM Pages (2 MB) in allocBig allocator for +better compression speed. Note that Windows has bad implementation for +Large RAM Pages. +It's OK to use same allocator for alloc and allocBig. + + +Single-call Compression with callbacks +-------------------------------------- + +Check C/LzmaUtil/LzmaUtil.c as example, + +When to use: file->file decompressing + +1) you must implement callback structures for interfaces: +ISeqInStream +ISeqOutStream +ICompressProgress +ISzAlloc + +static void *SzAlloc(void *p, size_t size) { p = p; return MyAlloc(size); } +static void SzFree(void *p, void *address) { p = p; MyFree(address); } +static ISzAlloc g_Alloc = { SzAlloc, SzFree }; + + CFileSeqInStream inStream; + CFileSeqOutStream outStream; + + inStream.funcTable.Read = MyRead; + inStream.file = inFile; + outStream.funcTable.Write = MyWrite; + outStream.file = outFile; + + +2) Create CLzmaEncHandle object; + + CLzmaEncHandle enc; + + enc = LzmaEnc_Create(&g_Alloc); + if (enc == 0) + return SZ_ERROR_MEM; + + +3) initialize CLzmaEncProps properties; + + LzmaEncProps_Init(&props); + + Then you can change some properties in that structure. + +4) Send LZMA properties to LZMA Encoder + + res = LzmaEnc_SetProps(enc, &props); + +5) Write encoded properties to header + + Byte header[LZMA_PROPS_SIZE + 8]; + size_t headerSize = LZMA_PROPS_SIZE; + UInt64 fileSize; + int i; + + res = LzmaEnc_WriteProperties(enc, header, &headerSize); + fileSize = MyGetFileLength(inFile); + for (i = 0; i < 8; i++) + header[headerSize++] = (Byte)(fileSize >> (8 * i)); + MyWriteFileAndCheck(outFile, header, headerSize) + +6) Call encoding function: + res = LzmaEnc_Encode(enc, &outStream.funcTable, &inStream.funcTable, + NULL, &g_Alloc, &g_Alloc); + +7) Destroy LZMA Encoder Object + LzmaEnc_Destroy(enc, &g_Alloc, &g_Alloc); + + +If callback function return some error code, LzmaEnc_Encode also returns that code +or it can return the code like SZ_ERROR_READ, SZ_ERROR_WRITE or SZ_ERROR_PROGRESS. + + +Single-call RAM->RAM Compression +-------------------------------- + +Single-call RAM->RAM Compression is similar to Compression with callbacks, +but you provide pointers to buffers instead of pointers to stream callbacks: + +HRes LzmaEncode(Byte *dest, SizeT *destLen, const Byte *src, SizeT srcLen, + CLzmaEncProps *props, Byte *propsEncoded, SizeT *propsSize, int writeEndMark, + ICompressProgress *progress, ISzAlloc *alloc, ISzAlloc *allocBig); + +Return code: + SZ_OK - OK + SZ_ERROR_MEM - Memory allocation error + SZ_ERROR_PARAM - Incorrect paramater + SZ_ERROR_OUTPUT_EOF - output buffer overflow + SZ_ERROR_THREAD - errors in multithreading functions (only for Mt version) + + + +Defines +------- + +_LZMA_SIZE_OPT - Enable some optimizations in LZMA Decoder to get smaller executable code. + +_LZMA_PROB32 - It can increase the speed on some 32-bit CPUs, but memory usage for + some structures will be doubled in that case. + +_LZMA_UINT32_IS_ULONG - Define it if int is 16-bit on your compiler and long is 32-bit. + +_LZMA_NO_SYSTEM_SIZE_T - Define it if you don't want to use size_t type. + + +_7ZIP_PPMD_SUPPPORT - Define it if you don't want to support PPMD method in AMSI-C .7z decoder. + + +C++ LZMA Encoder/Decoder +~~~~~~~~~~~~~~~~~~~~~~~~ +C++ LZMA code use COM-like interfaces. So if you want to use it, +you can study basics of COM/OLE. +C++ LZMA code is just wrapper over ANSI-C code. + + +C++ Notes +~~~~~~~~~~~~~~~~~~~~~~~~ +If you use some C++ code folders in 7-Zip (for example, C++ code for .7z handling), +you must check that you correctly work with "new" operator. +7-Zip can be compiled with MSVC 6.0 that doesn't throw "exception" from "new" operator. +So 7-Zip uses "CPP\Common\NewHandler.cpp" that redefines "new" operator: +operator new(size_t size) +{ + void *p = ::malloc(size); + if (p == 0) + throw CNewException(); + return p; +} +If you use MSCV that throws exception for "new" operator, you can compile without +"NewHandler.cpp". So standard exception will be used. Actually some code of +7-Zip catches any exception in internal code and converts it to HRESULT code. +So you don't need to catch CNewException, if you call COM interfaces of 7-Zip. + +--- + +http://www.7-zip.org +http://www.7-zip.org/sdk.html +http://www.7-zip.org/support.html diff --git a/DOCS/readme.txt b/DOCS/readme.txt new file mode 100644 index 0000000..aad4626 --- /dev/null +++ b/DOCS/readme.txt @@ -0,0 +1,181 @@ +7-Zip 9.20 Sources +------------------ + +7-Zip is a file archiver for Windows. + +7-Zip Copyright (C) 1999-2010 Igor Pavlov. + + +License Info +------------ + +7-Zip is free software distributed under the GNU LGPL +(except for unRar code). +read License.txt for more infomation about license. + +Notes about unRAR license: + +Please check main restriction from unRar license: + + 2. The unRAR sources may be used in any software to handle RAR + archives without limitations free of charge, but cannot be used + to re-create the RAR compression algorithm, which is proprietary. + Distribution of modified unRAR sources in separate form or as a + part of other software is permitted, provided that it is clearly + stated in the documentation and source comments that the code may + not be used to develop a RAR (WinRAR) compatible archiver. + +In brief it means: +1) You can compile and use compiled files under GNU LGPL rules, since + unRAR license almost has no restrictions for compiled files. + You can link these compiled files to LGPL programs. +2) You can fix bugs in source code and use compiled fixed version. +3) You can not use unRAR sources to re-create the RAR compression algorithm. + + +LZMA SDK +-------- + +Also this package contains files from LZMA SDK +you can download LZMA SDK from this page: +http://www.7-zip.org/sdk.html +read about addtional licenses for LZMA SDK in file +DOC/lzma.txt + + +How to compile +-------------- +To compile sources you need Visual C++ 6.0. +For compiling some files you also need +new Platform SDK from Microsoft' Site: +http://www.microsoft.com/msdownload/platformsdk/sdkupdate/psdk-full.htm +or +http://www.microsoft.com/msdownload/platformsdk/sdkupdate/XPSP2FULLInstall.htm +or +http://www.microsoft.com/msdownload/platformsdk/sdkupdate/ + +If you use MSVC6, specify SDK directories at top of directories lists: +Tools / Options / Directories + - Include files + - Library files + + +To compile 7-Zip for AMD64 and IA64 you need: + Windows Server 2003 SP1 Platform SDK from microsoft.com + +Also you need Microsoft Macro Assembler: + - ml.exe for x86 + - ml64.exe for AMD64 +You can use ml.exe from Windows SDK for Windows Vista or some other version. + + +Compiling under Unix/Linux +-------------------------- +Check this site for Posix/Linux version: +http://sourceforge.net/projects/p7zip/ + + +Notes: +------ +7-Zip consists of COM modules (DLL files). +But 7-Zip doesn't use standard COM interfaces for creating objects. +Look at +7zip\UI\Client7z folder for example of using DLL files of 7-Zip. +Some DLL files can use other DLL files from 7-Zip. +If you don't like it, you must use standalone version of DLL. +To compile standalone version of DLL you must include all used parts +to project and define some defs. +For example, 7zip\Bundles\Format7z is a standalone version of 7z.dll +that works with 7z format. So you can use such DLL in your project +without additional DLL files. + + +Description of 7-Zip sources package +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +DOC Documentation +--- + 7zFormat.txt - 7z format description + copying.txt - GNU LGPL license + unRarLicense.txt - License for unRAR part of source code + history.txt - Sources history + Methods.txt - Compression method IDs + readme.txt - Readme file + lzma.txt - LZMA SDK description + 7zip.nsi - installer script for NSIS + + +C - Source code in C +CPP - Source code in CPP + +Common Common modules +Windows Win32 wrappers + +7zip +------- + Common Common modules for 7-zip + + Archive 7-Zip Archive Format Plugins + -------- + Common + 7z + Arj + BZip2 + Cab + Cpio + GZip + Rar + Rpm + Split + Tar + Zip + + Bundle Modules that are bundles of other modules + ------ + Alone 7za.exe: Standalone version of 7z + Alone7z 7zr.exe: Standalone version of 7z that supports only 7z/LZMA/BCJ/BCJ2 + SFXCon 7zCon.sfx: Console 7z SFX module + SFXWin 7z.sfx: Windows 7z SFX module + SFXSetup 7zS.sfx: Windows 7z SFX module for Installers + Format7z 7za.dll: .7z support + Format7zExtract 7zxa.dll: .7z support, extracting only + Format7zR 7zr.dll: .7z support, LZMA/BCJ* only + Format7zExtractR 7zxr.dll: .7z support, LZMA/BCJ* only, extracting only + Format7zF 7z.dll: all formats + + UI + -- + Agent Intermediary modules for FAR plugin and Explorer plugin + Console 7z.exe Console version + Explorer Explorer plugin + Resource Resources + Far FAR plugin + Client7z Test application for 7za.dll + + Compress + -------- + BZip2 BZip2 compressor + Branch Branch converter + ByteSwap Byte Swap converter + Copy Copy coder + Deflate + Implode + Arj + LZMA + PPMd Dmitry Shkarin's PPMdH with small changes. + LZ Lempel - Ziv + + Crypto Crypto modules + ------ + 7zAES Cipher for 7z + AES AES Cipher + Rar20 Cipher for Rar 2.0 + RarAES Cipher for Rar 3.0 + Zip Cipher for Zip + + FileManager File Manager + + +--- +Igor Pavlov +http://www.7-zip.org diff --git a/GUI/Contents/Info.plist b/GUI/Contents/Info.plist new file mode 100644 index 0000000..71650e1 --- /dev/null +++ b/GUI/Contents/Info.plist @@ -0,0 +1,387 @@ + + + + + CFBundleDevelopmentRegion + English + CFBundleDisplayName + 7zFM + CFBundleDocumentTypes + + + CFBundleTypeExtensions + + 7z + 7Z + + CFBundleTypeIconFile + p7zip + CFBundleTypeName + 7-Zip + CFBundleTypeRole + Viewer + LSTypeIsPackage + + NSPersistentStoreTypeKey + XML + + + CFBundleTypeExtensions + + bz2 + BZ2 + bzip2 + BZIP2 + + CFBundleTypeIconFile + /System/Library/CoreServices/Archive Utility.app/Contents/Resources/bah-bz2.icns + CFBundleTypeName + BZip2 + CFBundleTypeRole + Viewer + LSTypeIsPackage + + NSPersistentStoreTypeKey + XML + + + CFBundleTypeExtensions + + tbz2 + TBZ2 + tbzip2 + TBZIP2 + + CFBundleTypeIconFile + /System/Library/CoreServices/Archive Utility.app/Contents/Resources/bah-tbz2.icns + CFBundleTypeName + TBZip2 + CFBundleTypeRole + Viewer + LSTypeIsPackage + + NSPersistentStoreTypeKey + XML + + + CFBundleTypeExtensions + + bz + BZ + bzip + BZIP + + CFBundleTypeIconFile + /System/Library/CoreServices/Archive Utility.app/Contents/Resources/bah-bz.icns + CFBundleTypeName + BZip + CFBundleTypeRole + Viewer + LSTypeIsPackage + + NSPersistentStoreTypeKey + XML + + + CFBundleTypeExtensions + + tbz + TBZ + tbzip + TBZIP + + CFBundleTypeIconFile + /System/Library/CoreServices/Archive Utility.app/Contents/Resources/bah-tbz.icns + CFBundleTypeName + TBzip + CFBundleTypeRole + Viewer + LSTypeIsPackage + + NSPersistentStoreTypeKey + XML + + + CFBundleTypeExtensions + + gz + GZ + gzip + GZIP + + CFBundleTypeIconFile + /System/Library/CoreServices/Archive Utility.app/Contents/Resources/bah-gz.icns + CFBundleTypeName + GZip + CFBundleTypeRole + Viewer + LSTypeIsPackage + + NSPersistentStoreTypeKey + XML + + + CFBundleTypeExtensions + + tgz + TGZ + tgzip + TGZIP + + CFBundleTypeIconFile + /System/Library/CoreServices/Archive Utility.app/Contents/Resources/bah-tgz.icns + CFBundleTypeName + TGZip + CFBundleTypeRole + Viewer + LSTypeIsPackage + + NSPersistentStoreTypeKey + XML + + + CFBundleTypeExtensions + + tar + TAR + + CFBundleTypeIconFile + /System/Library/CoreServices/Archive Utility.app/Contents/Resources/bah-tar.icns + CFBundleTypeName + Tar + CFBundleTypeRole + Viewer + LSTypeIsPackage + + NSPersistentStoreTypeKey + XML + + + CFBundleTypeExtensions + + cpio + CPIO + + CFBundleTypeIconFile + /System/Library/CoreServices/Archive Utility.app/Contents/Resources/bah-cpio.icns + CFBundleTypeName + CPIO + CFBundleTypeRole + Viewer + LSTypeIsPackage + + NSPersistentStoreTypeKey + XML + + + CFBundleTypeExtensions + + cpgz + CPGZ + + CFBundleTypeIconFile + /System/Library/CoreServices/Archive Utility.app/Contents/Resources/bah-cpgz.icns + CFBundleTypeName + CPGZ + CFBundleTypeRole + Viewer + LSTypeIsPackage + + NSPersistentStoreTypeKey + XML + + + CFBundleTypeExtensions + + lzma + LZMA + + CFBundleTypeIconFile + p7zip + CFBundleTypeName + Lzma + CFBundleTypeRole + Viewer + LSTypeIsPackage + + NSPersistentStoreTypeKey + XML + + + CFBundleTypeExtensions + + pax + PAX + + CFBundleTypeIconFile + /System/Library/CoreServices/Archive Utility.app/Contents/Resources/bah-pax.icns + CFBundleTypeName + Pax + CFBundleTypeRole + Viewer + LSTypeIsPackage + + NSPersistentStoreTypeKey + XML + + + CFBundleTypeExtensions + + 001 + + CFBundleTypeIconFile + p7zip + CFBundleTypeName + Volume + CFBundleTypeRole + Viewer + LSTypeIsPackage + + NSPersistentStoreTypeKey + XML + + + CFBundleTypeExtensions + + iso + ISO + + CFBundleTypeIconFile + /System/Library/CoreServices/DiskImageMounter.app/Contents/Resources/diskcopy-doc.icns + CFBundleTypeName + ISO + CFBundleTypeRole + Viewer + LSTypeIsPackage + + NSPersistentStoreTypeKey + XML + + + CFBundleTypeExtensions + + exe + EXE + + CFBundleTypeIconFile + /System/Library/CoreServices/CoreTypes.bundle/Contents/Resources/ExecutableBinaryIcon.icns + CFBundleTypeName + Windows Exe + CFBundleTypeRole + Viewer + LSTypeIsPackage + + NSPersistentStoreTypeKey + XML + + + CFBundleTypeExtensions + + cab + CAB + + CFBundleTypeIconFile + /System/Library/CoreServices/CoreTypes.bundle/Contents/Resources/ExecutableBinaryIcon.icns + CFBundleTypeName + CAB + CFBundleTypeRole + Viewer + LSTypeIsPackage + + NSPersistentStoreTypeKey + XML + + + CFBundleTypeExtensions + + zip + ZIP + + CFBundleTypeIconFile + /System/Library/CoreServices/Archive Utility.app/Contents/Resources/bah-zip.icns + CFBundleTypeName + Zip + CFBundleTypeRole + Viewer + LSTypeIsPackage + + NSPersistentStoreTypeKey + XML + + + CFBundleTypeExtensions + + rar + RAR + .r00 + + CFBundleTypeIconFile + p7zip + CFBundleTypeName + Rar + CFBundleTypeRole + Viewer + LSTypeIsPackage + + NSPersistentStoreTypeKey + XML + + + CFBundleTypeExtensions + + ace + ACE + .c00 + + CFBundleTypeIconFile + p7zip + CFBundleTypeName + Ace + CFBundleTypeRole + Viewer + LSTypeIsPackage + + NSPersistentStoreTypeKey + XML + + + CFBundleTypeExtensions + + * + + CFBundleTypeName + Archive + CFBundleTypeRole + Viewer + LSTypeIsPackage + + NSPersistentStoreTypeKey + XML + + + CFBundleExecutable + 7zFM + CFBundleIconFile + p7zip + CFBundleIdentifier + p7zip.7zFM + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + 7zFM + CFBundlePackageType + APPL + CFBundleShortVersionString + 0.1.3.2 + CFBundleSignature + aONe + CFBundleVersion + 57 + NSHumanReadableCopyright + Copyright © 2009-2010 aONe + NSPrincipalClass + NSApplication + SUFeedURL + http://p7zip.sourceforge.net + + diff --git a/GUI/Contents/PkgInfo b/GUI/Contents/PkgInfo new file mode 100644 index 0000000..e9b531d --- /dev/null +++ b/GUI/Contents/PkgInfo @@ -0,0 +1 @@ +APPLaONe \ No newline at end of file diff --git a/GUI/Contents/Resources/p7zip.icns b/GUI/Contents/Resources/p7zip.icns new file mode 100644 index 0000000..6ff7516 Binary files /dev/null and b/GUI/Contents/Resources/p7zip.icns differ diff --git a/GUI/Lang/af.txt b/GUI/Lang/af.txt new file mode 100644 index 0000000..b7f5ba5 --- /dev/null +++ b/GUI/Lang/af.txt @@ -0,0 +1,454 @@ +;!@Lang@!UTF-8! +; 7-Zip 4.09 +; Vertaal deur Petri Jooste +; +; +; +; + +00000000="Afrikaans" +00000001="Afrikaans" +00000002="54" + +; 7-Zip Configuration + +; Title +01000000="7-Zip Konfigurasie" + +; Info Page +01000100="Aangaande 7-Zip" +01000103="7-Zip is gratis programmatuur. Indien u egter so baie van 7-Zip hou dat u die verdere ontwikkeling wil ondersteun, registreer dan asb. met 'n geldelike donasie aan die 7-Zip Projek." +01000105="Registreer" + +; Folders Page +01000200="Gidse" +01000210="&Werkgids" +01000211="&TEMP-gids van het stelsel" +01000212="&Huidige gids" +01000213="&Gespesifiseerde gids:" +01000214="Gebruik slegs vir verwisselbare media." + +01000281="Spesifiseer die stoorplek vir tydelyke argieflêers." + +; System Page +01000300="Stelsel" +01000301="Integreer 7-Zip in kontekskeuselys." +01000302="Trapsgewyse kontekskeuselys" +01000310="Kontekskeuselysitems:" + +; Language Page +01000400="Taal" +01000401="Taal:" + + +; 7-Zip Explorer extension + +; Context menu +02000101="7-Zip" +02000102="7-Zip opdragte" +02000103="Open" +02000104="Open die geselekteerde argief." +02000105="Pak lêers uit..." +02000106="Pak lêers van geselekteerde argief uit." +02000107="Voeg by argief..." +02000108="Voeg geselekteerde items by argief." +02000109="Toets argief" +0200010A="Toets integriteit van die geselekteerde argief." +0200010B="Pak hier uit" +0200010C="Pak lêers van die geselekteerde argief in die huidige gids uit." +0200010D="Pak uit in {0}" +0200010E="Pak lêers uit in subgids." +0200010F="Voeg by {0}" +02000110="Voeg die geselekteerde items by argief." +02000111="Saampers en e-pos..." +02000112="Pers die geselekteerde items in 'n argief saam en stuur die argief via e-pos." +02000113="Pers saam in {0} en e-pos" +02000114="Pers die geselekteerde items saam in 'n argief en stuur die argief per e-pos." + +02000140="" +02000141="" + +; Properties +02000203="Pad" +02000204="Naam" +02000205="Uitgang" +02000206="Gids" +02000207="Grootte" +02000208="Ingepakte grootte" +02000209="Kenmerke" +0200020A="Gemaak" +0200020B="Laatste toegang" +0200020C="Gewysig" +0200020D="Kompak" +0200020E="Kommentaar" +0200020F="Versleuteld" +02000210="Verdeel Voor" +02000211="Verdeel Na" +02000212="Woordeboek" +02000213="CRC" +02000214="Tipe" +02000215="Anti" +02000216="Metode" +02000217="Gasheer BS" +02000218="Lêersstelsel" +02000219="Gebruiker" +0200021A="Groep" +0200021B="Blok" +0200021C="Kommentaar" +0200021D="Posisie" + +; Status bar +02000301="{0} objekt(e) is geselekteer" +02000302="{0} objekt(e)" + +; List Context Menu +02000401="&Kolomme..." + +02000411="&Open" +02000412="&Uitpak..." + +; ToolBar +02000501="Uitpak" + +; Messages +02000601="Bywerk-funksie word vir hierdie argief nie ondersteun nie." +02000602="Kan argief {0} nie bywerk nie" +02000603="Kan gids '{0}' nie maak nie" +02000604="Hierdie lêer is nie 'n ondersteunde argief nie." +02000605="Fout" +02000606="Te veel items" +02000607="Daar is geen program geassosieer met hierdie lêersnaam-uitgang nie" +02000608="Daar is geen foute nie" + +; Dialogs +02000702="OK" +02000705="&Ja" +02000707="Ja vir &almal" +02000709="&Nee" +0200070B="Nee vir a&lmal" + +02000710="Kanselleer" +02000711="&Kanselleer" +02000713="A&fsluit" +02000714="Stop" +02000715="Herbegin" + +02000720="Hulp" + +; Extract dialog +02000800="&Uitpak" +02000801="U&itpak in:" +02000802="&Wagwoord" + +02000810="Pad-metode" +02000811="Volledige padname" +02000812="Huidige padname" +02000813="Geen padname" + +02000820="Vervang lêers" +02000821="Vervang slegs met bevestiging" +02000822="Vervang sonder bevestiging" +02000823="Slaan bestaande lêers oor" +02000824="Hernoem outomaties" +02000825="Hernoem bestaande lêers outomaties" + +02000830="Lêers" +02000831="&Geselekteerde lêers" +02000832="&Alle lêers" + +02000881="Gee 'n bestemming vir uitgepakte lêers." + +02000890="Besig om uit te pak" + +; Overwrite dialog +02000900="Bevestig lêeroorskrywing" +02000901="Doelgids bevat alreeds 'n lêer met hierdie naam." +02000902="Wil u die bestaande lêer vervang" +02000903="deur hierdie lêer ?" + +02000911="O&utomaties hernoem" + +02000982="{0} grepe" +02000983="gewysig op" + +; Messages dialog +02000A00="Diagnostiese boodskappe" + +02000A80="Boodskap" + +02000A91="Nie-ondersteunde saampersmetode vir '{0}'." +02000A92="Datafout in '{0}'. Lêer is beskadig." +02000A93="CRC het misluk in '{0}'. Lêer is beskadig." + +; Password dialog +02000B00="Tik wagwoord in" +02000B01="Tik wagwoord in:" +02000B02="&Wys wagwoord" + +; Progress dialog +02000C00="Bewerk" +02000C01="Tydsduur sovêr:" +02000C02="Oorblywende tyd:" +02000C03="Grootte:" +02000C04="Spoed:" + +02000C10="&Agtergrond" +02000C11="&Voorgrond" +02000C12="&Wag" +02000C13="&Gaan voort" + +02000C20="Wagtend" + +02000C30="Is u seker dat u wil kanselleer?" + +; Compress dialog +02000D00="Voeg by argief" +02000D01="&Argief:" +02000D02="&Bywerkwyse:" +02000D03="Argie&fformaat:" +02000D04="&Saampersmetode:" +02000D05="Maak kom&pakte argief" +02000D06="Pa&rameters:" +02000D07="Opsies" +02000D08="Maak SF&X argief" +02000D09="Multi-uitvoerdraadhantering" +02000D0A="Enkripteer lêer&name" +02000D0B="Saampersingv&lak:" +02000D0C="&Woordeboekgrootte:" +02000D0D="&Woordgrootte:" +02000D0E="Geheuegebruik vir saampersing:" +02000D0F="Geheuegebruik vir uitpakking:" + +02000D40="Verdeel in &volumes, aantal grepe:" + +02000D81="Stoor" +02000D82="Normaal" +02000D83="Maksimum" +02000D84="Vinnig" +02000D85="Vinnigste" +02000D86="Ultra" + +02000D90="Blaai" + +02000DA1="Lêers byvoeg en vervang" +02000DA2="Lêers bywerk en byvoeg" +02000DA3="Verfris bestaande lêers" +02000DA4="Sinkroniseer lêers" + +02000DB1="Alle lêers" + +02000DC0="Besig met saampersing" + +; Columns dialog +02000E00="Kolomme" +02000E01="Merk die kolomme wat u sigbaar wil maak in hierdie gids. Gebruik die op-en-af-pyltjies om die kolomme te rangskik soos u wil." +02000E02="Die gemerkte kolom moet" +02000E03="pixels &breed wees." + +02000E10="&Opskuif" +02000E11="&Afskuif" +02000E12="&Wys" +02000E13="&Verberg" +02000E14="Stel" + +02000E81="Titel" +02000E82="Breedte" + +; Testing +02000F90="Besig om te toets" + + +; File Manager + +03000000="7-Zip Lêerbestuurder" + +; Menu +03000102="&Lêer" +03000103="R&edigeer" +03000104="&Vertoon" +03000105="&Gereedskap" +03000106="&Hulp" +03000107="G&unstelinge" + +; File +03000210="&Open" +03000211="Open &Binne" +03000212="Open B&uite" +03000220="&Wys" +03000221="R&edigeer" +03000230="Her&noem" +03000231="&Kopieer na..." +03000232="&Verskuif na..." +03000233="Ve&rwyder" +03000240="E&ienskappe" +03000241="Komme&ntaar" +03000250="Maak gids" +03000251="Maak lêer" +03000260="A&fsluit" +03000270="Ver&deel lêer..." +03000271="Kom&bineer lêers..." + +; Edit +03000310="&Ontdoen" +03000311="&Herhaal" +03000320="&Knip" +03000321="K&opieer" +03000322="&Plak" +03000323="&Verwyder" +03000330="Selekteer &alles" +03000331="Deselekteer a&lles" +03000332="Keer &seleksie om" +03000333="Selekteer..." +03000334="Deselekteer..." +03000335="Selekteer op Soort" +03000336="Deselekteer op Soort" + +; View +03000410="&Groot ikone" +03000411="&Klein ikone" +03000412="&Lys" +03000413="&Detail" +03000420="Ongesorteer" +03000430="Maak wortelgids oop" +03000431="Een vlak hoër" +03000432="Gidse geskiedenis..." +03000440="&Verfris" +03000450="&2 Panele" +03000451="&Nutsbalke" +03000460="Argiveernutsbalk" +03000461="Standaardnutsbalk" +03000462="Groot knoppies" +03000463="Wys teks op knoppies" + +; Tools +03000510="&Opsies..." +03000511="&Normtoetsing" + +; Help +03000610="&Inhoud..." +03000620="&Aangaande 7-Zip..." + +; Favorites +03000710="Voeg gids by gunstelinge &as" +03000720="Boekmerk" + +; Options Dialog + +03010000="Opsies" + +; Plugins +03010100="Inproppe" +03010101="In&proppe:" +03010110="Opsies..." + +; Edit +03010200="Redigeerder" +03010201="R&edigeerder:" + +; System +03010300="Stelsel" +03010302="Assosieer 7-Zip met:" +03010310="Inprop" + +; Settings +03010400="Instellings" +03010401="Wys \"..\" &item" +03010402="Wys &ware lêerikone" +03010410="Wys &stelselkeuselys" +03010420="Wys seleksie oor &hele ry(e)" +03010421="Wys &roosterlyne" + +; Strings + +03020201="Kopieer" +03020202="Verskuif" +03020203="Kopieer na:" +03020204="Verskuif na:" +03020205="Besig met kopiëring..." +03020206="Besig met verskuiwing..." +03020207="U kan items vir hierdie soort gidse nie verskuif of kopieer nie." +03020208="Bewerking word nie ondersteun nie." + +03020210="Bevestig lêerverwydering" +03020211="Bevestig gidsverwydering" +03020212="Bevestig verwydering van meerdere lêers" +03020213="Is u seker dat u '{0}' wil verwyder?" +03020214="Is u seker dat u gids '{0}' asook die inhoud daarvan wil verwyder?" +03020215="Is u seker dat u hierdie {0} items wil verwyder?" +03020216="Besig met verwydering..." +03020217="Fout by verwydering van lêer of gids" + +03020220="Besig met hernoeming..." +03020221="Fout by hernoeming van lêer of gids" + +03020230="Maak gids" +03020231="Naam van die gids:" +03020232="Nuwe gids" +03020233="Fout by maak van gids" + +03020240="Maak lêer" +03020241="Lêernaam:" +03020242="Nuwe lêer" +03020243="Fout by maak van nuwe lêer" + +03020250="Selekteer" +03020251="Deselekteer" +03020252="Masker:" + +03020260="Gidse-geskiedenis" + +03020280="Lêer '{0}' is gewysig.\nWil u dit bywerk in die argief?" +03020281="Kan lêer\n'{0}' nie bywerk nie" +03020282="Redigeerder nie aan die gang gesit word nie." +03020283="Besig om oop te maak..." + +03020300="Rekenaar" +03020301="Netwerk" + +030202A0="Stelsel" + +03020300="Rekenaar" +03020301="Network" + +03020400="Voeg by" +03020401="Pak uit" +03020402="Toets" + +03020420="Kopiëer" +03020421="Skuif" +03020422="Vee uit" +03020423="Intigting" + +03020500="Verdeel lêer" +03020501="&Verdeel na:" +03020510="Besig met verdeling..." + +03020600="Kombineer lêers" +03020601="&Kombineer na:" +03020610="Besig met kombinering..." + +; Computer +03031100="Totale grootte" +03031101="Vrye ruimte" +03031102="Klustergrootte" +03031103="Etiket" + +; Network +03031200="Plaaslike naam" +03031201="Verskaffer" + +; Benchmark Dialog + +03080000="Meet" +03080001="Geheuegebruik:" +03080002="Inpakking" +03080003="Uitpakking" +03080004="Spoed" +03080005="Gradering" +03080006="Totale gradering" +03080007="Huidige" +03080008="Resultaat" +03080009="Lopies:" +0308000A="Foute:" + +;!@LangEnd@! diff --git a/GUI/Lang/ar.txt b/GUI/Lang/ar.txt new file mode 100644 index 0000000..e41d7a7 --- /dev/null +++ b/GUI/Lang/ar.txt @@ -0,0 +1,521 @@ +;!@Lang@!UTF-8! +; 7-Zip 4.52 +; 20080215 Reviewed and corrected by Ahmad Gharbeia +; 20070819 Mohammad Deeb - corrected & updated +; 20070522 Awadh A Al-Ghaamdi - corrected & updated +; 20020111 Mohammad Deeb - first issue +; راجعه و صوبه أحمد غربية + +; IMPORTANT: This File contains Unicode control characters necessary to +; present Arabic messages in the right direction. These characters +; are invisible in editors by default. Caution should be taken when +; the file is edited, and the pattern of marking directionality with +; Unicode control characters observed for best results in the UI. +; هام للغاية: يحوي هذا الملف محارف تحكم يونيكود ضرورية لظهور العبارات العربية في الاتجاه الصحيح، و خاصة عند تداخلها مع كلمات بأحرف لاتينية؛ و هذه المحارف لا تكون +; ظاهرة بدئيا في محررات النصوص، لذا يرجى الانتباه عند تحريره و مراعا النسق المتبع في العبارات الموجودة لأجل أفضل نتيجة في واجهة المستخدم.. + +00000000="Arabic" +00000001="العربية" +00000002="1" + +; 7-Zip Configuration + +; Title +01000000="‮تضبيطات ‪7-Zip‬" + +; Info Page +01000100="‮عن ‪7-Zip‬" +01000103="‮هذه برمجية مجانية، لكنها إن أفادتك و أردت دعم تطويرها مستقبلا فيمكنك تسجيل نسختك مقابل مبلغ بسيط." +01000104="الدعم" +01000105="سجّل" + +; Folders Page +01000200="أدلة" +01000210="دليل ال&عمل" +01000211="الدليل المؤ&قت للنظام" +01000212="ال&حالي" +01000213="‮مُ&حدد:" +01000214="استخدمه فقط للوسائط للقابلة للنزع" + +01000281="حدد موضع الملفات المؤقتة للأرشيف." + +; System Page +01000300="نظام" +01000301="‮كامل ‪7-Zip‬ بقائمة سياق القشرة" +01000302="قائمة سياق منسدلة" +01000310="‮عناصر قائمة السياق:" + +; Language Page +01000400="اللغة" +01000401="‮اللغة:" + + +; 7-Zip Explorer extension + +; Context menu +02000101="7-Zip" +02000102="‮أوامر ‪7-Zip‬" +02000103="افتح الأرشيف" +02000104="يفتح الأرشيف المختار" +02000105="‮استخرج الملفات…" +02000106="يستخرج الملفات من الأرشيف المختار" +02000107="‮أضف إلى أرشيف…" +02000108="يضيف العناصر المختارة إلى أرشيف" +02000109="افحص الأرشيف" +0200010A="يفحص سلامة الأرشيف المختار" +0200010B="استخراج هنا" +0200010C="يستخرج الملفات من الأرشيف المختار إلى الدليل الحالي" +0200010D="استخرج إلى ‪{0}‬" +0200010E="يستخرج الملفات إلى دليل فرعي" +0200010F="أضف إلى ‪{0}‬" +02000110="يضف العناصر المختارة إلى أرشيف" +02000111="‮اضغط و أرسل…" +02000112="يضغط العناصر المختارة في أرشيف ثم يرسله بالبريد الإلكتروني" +02000113="اضغط إلى ‪{0}‬ ثم أرسل" +02000114="يضغط العناصر المختارة في أرشيف تحدده ثم يرسله بالبريد الإلكتروني" + +02000140="‮<دليل>" +02000141="‮<أرشيف>" + +; Properties +02000203="المسار" +02000204="الاسم" +02000205="الامتداد" +02000206="الدليل" +02000207="الحجم" +02000208="الحجم المضغوط" +02000209="خصائص" +0200020A="أنشئ في" +0200020B="فُتح في" +0200020C="عُدِّل في" +0200020D="مصمت" +0200020E="تعليق" +0200020F="مُعمَّى" +02000210="القسم السابق" +02000211="القسم اللاحق" +02000212="المعجم" +02000213="CRC" +02000214="النوع‪" +02000215="عكس" +02000216="الأسلوب" +02000217="النظام المضيف" +02000218="نظام الملفات" +02000219="المستخدم" +0200021A="المجموعة" +0200021B="الكتلة" +0200021C="تعليق" +0200021D="الموضع" +0200021E="بادئة المسار" +0200021F="الأدلة" +02000220="الملفات" +02000221="الإصدارة" +02000222="المجلد" +02000223="متعدد المجلدات" +02000224="إزاحة" +02000225="الروابط" +02000226="الكتل" +02000227="المجلدات" + +; Status bar +02000301="‮{0} عناصر مختارة" +02000302="‮{0} عناصر" + +02000320="‮ملفات:" +02000321="‮أدلة:" +02000322="‮الحجم:" +02000323="‮الحجم المضغوط:" +02000324="‮الأرشيفات:" + +; List Context Menu +02000401="‮أ&عمدة…" + +02000411="ا&فتح" +02000412="‮ا&ستخرج…" + +; ToolBar +02000501="استخرج" + +; Messages +02000601="عمليات التحديث غير مدعومة لنوع الأرشيف هذا." +02000602="‮تعذّر تحديث الأرشيف ‪{0}‬‬" +02000603="‮تعذّر إنشاء الدليل '‪{0}‬'" +02000604="ليس هذا الملف أرشيفا مدعوما." +02000605="عُطل" +02000606="عناصر أكثر من الممكن" +02000607="لا يرتبط امتداد اسم الملف المعطى بأي تطبيق" +02000608="لا أعطاب" +02000609="‮تعذّر فتح الملف '‪{0}‬' كأرشيف" +0200060A="‮تعذّر فتح الأرشيف المُعمَّى '‪{0}‬'. هل كلمة السرّ صحيحة؟" + +; Dialogs +02000702="حسن" +02000705="ن&عم" +02000707="&نعم للكل" +02000709="&لا" +0200070B="لا لل&كل " + +02000710="ألغِ" +02000711="أل&غِ" +02000713="أغل&ق" +02000714="أوقف" +02000715="أبدأ من جديد" + +02000720="مساعدة" + +; Extract dialog +02000800="استخرج" +02000801="‮ا&ستخرج إلى:" +02000802="كلمة السر" + +02000810="طور المسارات" +02000811="مسارات كاملة" +02000812="المسار الحالي" +02000813="بلا مسارات" + +02000820="طور استبدال الملفات" +02000821="اسأل قبل الاستبدال" +02000822="استبدل بلا توكيد" +02000823="تجاوز الملفات الموجودة" +02000824="غير الاسم آليا" +02000825="غير آليا أسماء الملفات الموجودة" + +02000830="الملفات" +02000831="الملفات الم&ختارة" +02000832="&كل الملفات" + +02000881="حدد موضع المفات المستخرجة." + +02000890="يجري الاستخراج" + +; Overwrite dialog +02000900="أكد قبل استبدال ملف" +02000901="الدليل الوجهة يحوي ملف بذات الاسم." +02000902="أتريد استبدال الملف الموجود" +02000903="بهذا الملف؟" + +02000911="&غيّر الاسم آليا" + +02000982="‮{0} بايت" +02000983="عُدِّل في" + +; Messages dialog +02000A00="رسائل الفحص" + +02000A80="رسالة" + +02000A91="‮أسلوب ضغط غير مدعوم في '‪{0}‬'" +02000A92="‮عطب بيانات في '‪{0}‬'؛ الملف مبتور." +02000A93="‮‪CRC‬ غير مطابق في '‪{0}‬'؛ الملف مبتور." +02000A94="‮عطب بيانات في الملف المعمَّى '‪{0}‬'. هل كلمة المرور صحيحة؟" +02000A95="‮فشل فحص ‪CRC‬ في الملف '‪{0}‬'. هل كلمة المرور صحيحة؟" + +; Password dialog +02000B00="أدخل كلمة السر" +02000B01="‮أدخل كلمة السر:" +02000B02="أ&ظهر كلمة السر" +02000B03="أعد إدخال كلمة السر:" +02000B10= "كلمتا المرور لا تطابقان" +02000B11="استخدم فقط أحرفا لاتينية و الأرقام و العلامات خاصة (! و # و $، إلخ…) في كلمة السر" +02000B12="كلمة المرور أطول مما ينبغي" + +; Progress dialog +02000C00="معالجة" +02000C01="‮الزمن المنقضي:" +02000C02="‮الزمن المتبقي:" +02000C03="‮الحجم:" +02000C04="‮السرعة:" +02000C05="الملفات المعالَجة:" +02000C06="نسبة الضغط:" + +02000C10="ال&خلفية" +02000C11="الم&قدمة" +02000C12="&جمِّد" +02000C13="&واصل" + +02000C20="مجمدة" + +02000C30="أمتأكد أنك تريد الإلغاء؟" + +; Compress dialog +02000D00="أضف إلى أرشيف" +02000D01="‮الأر&شيف:" +02000D02="‮طور الت&حديث:" +02000D03="‮صي&غة الأرشيف:" +02000D04="‮أ&سلوب الضغط:" +02000D05="أنشئ أرشيفا م&صمتا" +02000D06="‮معاملا&ت:" +02000D07="خيارات" +02000D08="أنشئ أرشيفا ذاتي الاستخراج" +02000D09="تعددية الخيوط" +02000D0A="&عمِّ أسماء الملفات" +02000D0B="‮&درجة الضغط:" +02000D0C="‮حجم المع&جم:" +02000D0D="‮&طول الكلمة:" +02000D0E="‮الذاكرة اللازمة للضغط:" +02000D0F="‮الذاكرة اللازمة للاستخراج:" +02000D10="التعمية" +02000D11="طريقة التعمية:" +02000D12="عدد خيوط المعالج الماكروي:" +02000D13="حجم الكتلة المصمتة:" +02000D14="غير مصمتة" +02000D15="مصمتة" +02000D16="اضغط الملفات المشتركة" + +02000D40="‮&قسِّم إلى أجزاء أو بايتات:" +02000D41="حجم المجلد غير صحيح" +02000D42="حجم المجلد المعين: ‪{0}‬ بايت\nأمتأكد أنك تريد تقسيم الأرشيف إلى كتل بهذا الحجم؟" + +02000D81="خزن" +02000D82="اعتيادي" +02000D83="الأقصى" +02000D84="سريع" +02000D85="الأسرع" +02000D86="فائق" + +02000D90="تصفح" + +02000DA1="إضافة و استبدال الملفات" +02000DA2="تحديث و إضافة الملفات" +02000DA3="تحديث الملفات الموجودة فقط" +02000DA4="مزامنة الملفات" + +02000DB1="كل الملفات" + +02000DC0="يجري الضغط" + +; Columns dialog +02000E00="الأعمدة" +02000E01="أشر الأعمدة التي تريد إظهارها في هذا الدليل. استخدم أزرار \"حرِّك لأعلى\" و \"حرِّك للأسفل\" لترتيب الأعمدة." +02000E02="يجب أن يكون عرض العمود المختار" +02000E03="عنصورة." + +02000E10="حرِّك لأعلى" +02000E11="حرِّك لأسفل" +02000E12="أ&ظهر" +02000E13="أ&خف" +02000E14="اضبط" + +02000E81="العنوان" +02000E82="العرض" + +; Testing +02000F90="الفحص" + + +; File Manager + +03000000="‮مدير ملفات ‪7-Zip‬" + +; Menu +03000102="&ملف" +03000103="&حرِّر" +03000104="ا&عرض" +03000105="أ&دوات" +03000106="مسا&عدة" +03000107="علامات" + +; File +03000210="ا&فتح" +03000211="افتح &هنا" +03000212="افتح خا&رجا" +03000220="است&عرض" +03000221="&حرِّر" +03000230="&غيِّر الاسم" +03000231="‮ان&سخ إلى…" +03000232="‮ا&نقل إلى…" +03000233="احذ&ف" +03000240="خ&صائص" +03000241="تعل&يق" +03000242="احسب التلبيدة" +03000250="أنشئ دليلا" +03000251="أنشئ ملفا" +03000260="ا&خرج" +03000270="‮&قسِّم الملف…" +03000271="‮ا&دمج الملفات…" + +; Edit +03000310="ت&راجع" +03000311="أ&عد" +03000320="&قص" +03000321="ا&نسخ" +03000322="أ&لصق" +03000323="احذ&ف" +03000330="اخ&تر الكل" +03000331="دع ال&كل" +03000332="اعك&س الاختيار" +03000333="‮اختر…" +03000334="‮دع…" +03000335="اختر حسب النوع" +03000336="دع حسب النوع" + +; View +03000410="أيقونات &كبيرة" +03000411="أيقونات &صغيرة" +03000412="&قائمة" +03000413="&تفصيلي" +03000420="غير مرتبة" +03000430="افتح الدليل الجذر" +03000431="مستوى واحد لأعلى" +03000432="‮تاريخ الأدلة…" +03000440="أن&عش" +03000449="منظور مسطح" +03000450="&لوحتان" +03000451="أشر&طة الأدوات" +03000460="شريط أدوات الأرشيفات" +03000461="شريط الأدوات القياسي" +03000462="أزرار كبيرة" +03000463="أظهر نصوص الأزرار" + +; Tools +03000510="‮&خيارات…" +03000511="الم&عايرة" + +; Help +03000610="‮ال&محتويات…" +03000620="‮&عن ‪7-Zip‬" + +; Favorites +03000710="أ&ضف الدليل إلى العلامات باسم" +03000720="علِّم" + +; Options Dialog + +03010000="خيارات" + +; Plugins +03010100="الملحقات" +03010101="‮المل&حقات:" +03010110="‮خيارات…" + +; Edit +03010200="المحرر" +03010201="‮ال&محرر:" + +; System +03010300="النظام" +03010302="‮اربط ‪7-Zip‬ بامتدادات الأسماء التالية:" +03010310="ملحقة" + +; Settings +03010400="تضبيطات" +03010401="‮أظهر عنصر \"..\"" +03010402="أظهر الأيقونات الفعلية للملفات" +03010410="أظهر قائمة النظام" +03010420="اختيار ال&صف بالكامل" +03010421="أظهر &خطوط الجدول" +03010430="طور الاختيار ال&بديل" +03010440="استخدم صفحات &ذاكرة كبيرة" + +; Strings + +03020201="انسخ" +03020202="انقل" +03020203="‮انسخ إلى:" +03020204="‮انقل إلى:" +03020205="‮يجري النسخ…" +03020206="‮يجري النقل…" +03020207="لا يمكن نسخ/نقل العناصر إلى مثل تلك الأدلة" +03020208="العملية غير مدعومة" +03020209="اختر الدليل الوجهة" + +03020210="تأكيد حذف ملف" +03020211="تأكيد حذف دليل" +03020212="تأكيد حذف عدة ملفات" +03020213="‮أمتأكد أنك تريد حذف '‪{0}‬'؟" +03020214="‮أمتأكد أنك تريد حذف الدليل '‪{0}‬' بكل محتوياته؟" +03020215="‮أمتأكد أنك تريد حذف ‪{0}‬ عناصر هذه؟" +03020216="‮يجري الحذف…" +03020217="عطل في حذف ملف أو دليل" + +03020220="‮يجري تغيير الاسم…" +03020221="عطل في تغيير اسم ملف أو دليل" +03020222="أكد نسخ ملف" +03020223="أمتأكد أنك تريد نسخ ملفات إلى دليل؟" + +03020230="أنشئ دليلا" +03020231="‮اسم الدليل:" +03020232="دليل جديد" +03020233="عطل في إنشاء دليل" + +03020240="أنشئ ملفا" +03020241="‮اسم الملف:" +03020242="ملف جديد" +03020243="عطل في إنشاء ملف" + +03020250="اختر" +03020251="دع" +03020252="القناع" + +03020260="تاريخ الأدلة" + +03020280="‮تغيّر الملف '‪{0}‬'.\nأتريد تحديثه في الأرشيف؟" +03020281="‮تعذّر تحديث الملف\n'‪{0}‬'" +03020282="لا يمكن بدء المحرر" +03020283="‮يجري فتح…" + +03020290="تعليق" +03020291="‮ت&عليق:" + +030202A0="النظام" + +03020300="الحاسوب" +03020301="الشبكة" + +03020400="أضف" +03020401="استخرج" +03020402="افحص" + +03020420="انسخ" +03020421="انقل" +03020422="ألغِ" +03020423="معلومات" + +03020500="‮قسِّم الملف‪" +03020501="‮&قسِّم إلى:" +03020510="‮يجري التقسيم…" +03020520="تأكيد التقسيم" +03020521="أتريد حقا تقسيم الملف إلى ‪{0}‬ قسما؟" +03020522="يجب أن يكون حجم القسم أقل من حجم الملف الأصلي" + +03020600="‮ادمج الملفات‪" +03020601="‮ا&دمج إلى:" +03020610="‮يجري الدمج…" +03020620="حدد الملف الأول فقط" + +03020710="‮يجري حساب التلبيدة…" +03020720="معلومات التلبيدة" +03020721="‮معلومات تلبيدة CRC للبيانات:" +03020722="‮معلومات تلبيدة CRC للبيانات و الأسماء:" + +03020800="‮يجري المسح…" + +03020900="الخصائص" + +; Computer +03031100="الحجم الكلي" +03031101="المساحة الشاغرة" +03031102="حجم العنقود" +03031103="العنوان" + +; Network +03031200="الاسم المحلي" +03031201="الموفِّر" + +; Benchmark Dialog + +03080000="المعايرة" +03080001="‮استغلال الذاكرة" +03080002="الضغط" +03080003="فك ضغط" +03080004="السرعة" +03080005="المستوى" +03080006="المستوى الكلي" +03080007="الحالي" +03080008="الناتج" +03080009="‮المرات" +0308000A="‮الأعطال" +0308000B="استغلال الـمعالج الماكروي" +0308000C="المستوى / الاستغلال" + + +;!@LangEnd@! diff --git a/GUI/Lang/ast.txt b/GUI/Lang/ast.txt new file mode 100644 index 0000000..73c1332 --- /dev/null +++ b/GUI/Lang/ast.txt @@ -0,0 +1,454 @@ +;!@Lang@!UTF-8! +; 7-Zip 4.07 beta +; Translated by Dinamiteru +; +; +; +; + +00000000="Asturian" +00000001="Asturianu" +00000002="" + +; 7-Zip Configuration + +; Title +01000000="Configuración de 7-Zip" + +; Info Page +01000100="Al rodiu 7-Zip" +01000103="7-Zip ye software llibre. De toos moos, tú pues sofitar el desendolcu de 7-Zip rexistrándote." +01000105="Rexistrar" + +; Folders Page +01000200="Carpetes" +01000210="&Carpeta de trabayu" +01000211="Carpeta &temporal de sistema" +01000212="&Actual" +01000213="&Especificar:" +01000214="Usar sólo pa dispositivos estrayibles" + +01000281="Especificar llocalización pa ficheros d´archivos temporales." + +; System Page +01000300="Sistema" +01000301="Integrar 7-Zip nel menú contestual" +01000302="Menú contestual en ´cascada´" +01000310="Artículos del menú contestual:" + +; Language Page +01000400="Llingua" +01000401="Llingua:" + + +; 7-Zip Explorer extension + +; Context menu +02000101="7-Zip" +02000102="Ordes 7-Zip" +02000103="Abrir archivu" +02000104="Abrir l´archivu seleicionáu." +02000105="Estrayer ficheros..." +02000106="Estrayer ficheros dende´l archivu seleicionáu." +02000107="Añedir al archivu..." +02000108="Añedir los oxetos seleicionaos al archivu." +02000109="Probar archivu" +0200010A="Probar integridá del archivu seleicionáu." +0200010B="Estrayer equí" +0200010C="Estrayer ficheros del archivu seleicionáu a la carpeta actual." +0200010D="Estrayer a {0}" +0200010E="Estrayer ficheros a subcarpeta." +0200010F="Añedir a {0}" +02000110="Añedir los oxetos seleicionaos al archivu." +02000111="Comprimir y mandar per correu..." +02000112="Comprimir los oxetos seleicionaos nel archivu y mandalu per correu." +02000113="Comprimir en {0} y mandar per correu" +02000114="Comprimir los oxetos seleicionaos nel archivu y mandalu per correu." + +02000140="" +02000141="" + +; Properties +02000203="Ruta" +02000204="Nome" +02000205="Estensión" +02000206="Carpeta" +02000207="Tamañu" +02000208="Tamañu comprimío" +02000209="Atributos" +0200020A="Creao" +0200020B="Accedío" +0200020C="Cambiao" +0200020D="Sólidu" +0200020E="Comentao" +0200020F="Cifrao" +02000210="Partir antes" +02000211="Partir dempués" +02000212="Diccionariu" +02000213="CRC" +02000214="Tipu" +02000215="Anti" +02000216="Métodu" +02000217="S.O. d´Acoyida" +02000218="Sistema de ficheros" +02000219="Usuariu" +0200021A="Grupu" +0200021B="Bloque" +0200021C="Comentariu" +0200021D="Posición" + +; Status bar +02000301="{0} oxetu(os) seleicionaos" +02000302="{0} oxetu(os)" + +; List Context Menu +02000401="&Columnes..." + +02000411="&Abrir" +02000412="&Estrayer..." + +; ToolBar +02000501="Estrayer" + +; Messages +02000601="Esti archivu nun permite les operaciones d´actualización." +02000602="Nun se puede actualizar l´archivu {0}" +02000603="Nun se puede crear la carpeta '{0}'" +02000604="El ficheru nun ye un archivu permitíu." +02000605="Error" +02000606="Demasiaos artículos" +02000607="Nun hai nengún programa asociau cola estensión del ficheru" +02000608="Ensín errores" + +; Dialogs +02000702="Val" +02000705="&Si" +02000707="Si a &Too" +02000709="&Non" +0200070B="Non a T&oo" + +02000710="Torgar" +02000711="&Torgar" +02000713="&Zarrar" +02000714="Parar" +02000715="Reentamar" + +02000720="Axuda" + +; Extract dialog +02000800="Estrayer" +02000801="E&strayer a:" +02000802="Clave" + +02000810="Mou de ruta" +02000811="Nomes de ruta completos" +02000812="Nomes de ruta actuales" +02000813="Ensín nomes de ruta" + +02000820="Mou de sobreescritura" +02000821="Entrugar enantes de sobreescribir" +02000822="Sobreescribir ensín confirmación" +02000823="Dexar ficheros esistentes" +02000824="Auto renomar" +02000825="Auto renomar ficheros esistentes" + +02000830="Ficheros" +02000831="Ficheros &seleicionaos" +02000832="&Tolos ficheros" + +02000881="Especificar llocalización pa ficheros estrayíos." + +02000890="Estrayendo" + +; Overwrite dialog +02000900="Confirmar sustitución de ficheros" +02000901="La carpeta destín yá tien el ficheru procesáu." +02000902="¿Quiés sustituyir el ficheru esistente" +02000903="con esti otru?" + +02000911="A&uto Renomar" + +02000982="{0} bytes" +02000983="modificao el" + +; Messages dialog +02000A00="Mensaxes de diagnósticu" + +02000A80="Mensax" + +02000A91="Métodu de compresión nun permitíu pa '{0}'." +02000A92="Error de datos en '{0}'. El ficheru ta rotu." +02000A93="El CRC falló en '{0}'. El ficheru ta rotu." + +; Password dialog +02000B00="Introduz clave" +02000B01="Introduz clave:" +02000B02="Amo&sar clave" + +; Progress dialog +02000C00="Procesu" +02000C01="Tiempu trescurríu:" +02000C02="Tiempu pa finar:" +02000C03="Tamañu:" +02000C04="Velocidá:" + +02000C10="&De fondu" +02000C11="&En primer planu" +02000C12="&Posar" +02000C13="&Siguir" + +02000C20="Posao" + +02000C30="¿Tas fixu que quies paralo?" + +; Compress dialog +02000D00="Añedir al archivu" +02000D01="&Archivu:" +02000D02="Mo&u d´actualización:" +02000D03="&Formatu del archivu:" +02000D04="&Métodu de compresión:" +02000D05="Crear archivu &sólidu" +02000D06="&Parámetros:" +02000D07="Opciones" +02000D08="Crear archivu SF&X" +02000D09="Multi-enfile" +02000D0A="Cifrar &nomes de ficheru" +02000D0B="Nive&l de compresión:" +02000D0C="Tamañu del &Diccionariu:" +02000D0D="Tamañu de la pa&llabra:" +02000D0E="Usu de memoria pa la compresión:" +02000D0F="Usu de memoria pa la descompresión:" + +02000D40="Partir en &cachos, bytes:" + +02000D81="Nenguna" +02000D82="Normal" +02000D83="Másima" +02000D84="Rápida" +02000D85="Más rápida" +02000D86="Ultra" + +02000D90="Agüeyar" + +02000DA1="Añedir y sustituyir ficheros" +02000DA2="Actualizar y añedir ficheros" +02000DA3="Actualizar ficheros esistentes" +02000DA4="Sincronizar ficheros" + +02000DB1="Tolos ficheros" + +02000DC0="Comprimiendo" + +; Columns dialog +02000E00="Columnes" +02000E01="Marca les columnes que quieras amosar nesta carpeta. Usa los botones Mover p´arriba y Mover p´abaxo pa reordenar les columnes." +02000E02="La columna selicionada tien de tener" +02000E03="pixels &d´anchu." + +02000E10="Mover &p´arriba" +02000E11="Mover p´a&baxo" +02000E12="Amo&sar" +02000E13="&Esconder" +02000E14="Iguar" + +02000E81="Títulu" +02000E82="Anchu" + +; Testing +02000F90="Probando" + + +; File Manager + +03000000="Xestor de ficheros de 7-Zip" + +; Menu +03000102="F&icheru" +03000103="&Remanar" +03000104="&Ver" +03000105="&Ferramientes" +03000106="A&xuda" +03000107="F&avoritos" + +; File +03000210="&Abrir" +03000211="Abrir &Dientro" +03000212="Abrir F&uera" +03000220="&Ver" +03000221="&Remanar" +03000230="Reno&mar" +03000231="&Copiar a..." +03000232="&Mover a..." +03000233="&Borrar" +03000240="P&ropiedaes" +03000241="Come&ntariu" +03000250="Crear carpeta" +03000251="Crear ficheru" +03000260="Co&lar" +03000270="&Partir ficheru..." +03000271="Com&binar ficheros..." + +; Edit +03000310="&Desfacer" +03000311="&Refacer" +03000320="Cor&tar" +03000321="&Copiar" +03000322="A&pegar" +03000323="&Borrar" +03000330="Seleicionar &Too" +03000331="Deseleicionar too" +03000332="&Invertir seleición" +03000333="Seleicionar..." +03000334="Deseleicionar..." +03000335="Seleicionar por Tipu" +03000336="Deseleicionar por Tipu" + +; View +03000410="Miniatures &Grandes" +03000411="&Miniatures Pequeñes" +03000412="&Llista" +03000413="&Detalles" +03000420="Ensín Ordenar" +03000430="Abrir Carpeta Raiz" +03000431="Xubir Un Nivel" +03000432="Hestorial de Carpetes..." +03000440="Actualiza&r" +03000450="&2 Paneles" +03000451="&Barres de Ferramientes" +03000460="Barra Ferramientes d´Archivu" +03000461="Barra Ferramientes Normal" +03000462="Botones Grandes" +03000463="Amosar Testu nos Botones" + +; Tools +03000510="&Opciones..." +03000511="&Bancu de Pruebes" + +; Help +03000610="&Conteníos..." +03000620="&Al rodiu 7-Zip..." + +; Favorites +03000710="&Añedir carpeta a Favoritos como" +03000720="Marca" + +; Options Dialog + +03010000="Opciones" + +; Plugins +03010100="Gabitos" +03010101="&Gabitos:" +03010110="Opciones..." + +; Edit +03010200="Remanaor" +03010201="&Remanaor:" + +; System +03010300="Sistema" +03010302="Asociar 7-Zip con:" +03010310="Gabitu" + +; Settings +03010400="Igües" +03010401="Amosar \"..\" artículu" +03010402="Amosar les miniatures reales del ficheru" +03010410="Amosar menú del sistema" +03010420="Seleicionar tola &fila" +03010421="Amosar les llinies de la &cuadrícula" + +; Strings + +03020201="Copiar" +03020202="Mover" +03020203="Copiar a:" +03020204="Mover a:" +03020205="Copiando..." +03020206="Moviendo..." +03020207="Nun se pueden mover o copiar aartículos pa ese carpetes." +03020208="La operación nun tá permitía." + +03020210="Confirmar Borráu de Ficheru" +03020211="Confirmar Borráu de Carpeta" +03020212="Confirmar Borráu Múltiple de Ficheros" +03020213="¿Tas fixu que quies borrar '{0}'?" +03020214="¿Tas fixu que quies borrar la carpeta '{0}' y tolos sos conteníos?" +03020215="¿Tas fixu que quies borrar estos {0} artículos?" +03020216="Borrando..." +03020217="Error al borrar el ficheru o carpeta" + +03020220="Renomando..." +03020221="Error al renomar el ficheru o carpeta" + +03020230="Crear Carpeta" +03020231="Nome de la carpeta:" +03020232="Nueva carpeta" +03020233="Error al crear la carpeta" + +03020240="Crear ficheru" +03020241="Nome del ficheru:" +03020242="Nuevu ficheru" +03020243="Error al crear el ficheru" + +03020250="Seleicionar" +03020251="Deseleicionar" +03020252="Mazcarita:" + +03020260="Hestorial de carpetes" + +03020280="El ficheru '{0}' foi modificáu.\nDo ¿Quies actualizalu nel archivu?" +03020281="Nun se pudo actualizar l´archivu\n'{0}'" +03020282="Nun se pudo entamar el Remanaor." +03020283="Abriendo..." + +03020290="Comentariu" +03020291="&Comentariu:" + +030202A0="Sistema" + +03020300="Ordenador" +03020301="Rede de Trabayu" + +03020400="Añedir" +03020401="Estrayer" +03020402="Probar" + +03020420="Copiar" +03020421="Mover" +03020422="Borrar" +03020423="Información" + +03020500="Partir Ficheru" +03020501="&Partir a:" +03020510="Partiendo..." + +03020600="Combinar Ficheros" +03020601="&Combinar a:" +03020610="Combinando..." + +; Computer +03031100="Tamañu total" +03031101="Espaciu llibre" +03031102="Tamañu del clúster" +03031103="Etiqueta" + +; Network +03031200="Nome llocal" +03031201="Suministrador" + +; Benchmark Dialog + +03080000="Bancu de Pruebes" +03080001="Usu de memoria:" +03080002="Comprimiendo" +03080003="Descomprimiendo" +03080004="Velocidá" +03080005="Valoración" +03080006="Valoración total" +03080007="Actual" +03080008="Resultáu" +03080009="Correutos:" +0308000A="Errores:" + +;!@LangEnd@! diff --git a/GUI/Lang/az.txt b/GUI/Lang/az.txt new file mode 100644 index 0000000..15b40f1 --- /dev/null +++ b/GUI/Lang/az.txt @@ -0,0 +1,543 @@ +;!@Lang@!UTF-8! +; 7-Zip 9.07 +; Translated by F@rhad +; +; +; + + +00000000="Azeri" +00000001="Azərbaycanca" +00000002="44" + +; 7-Zip Configuration + +; Title +01000000="7-Zip Nizamlama" + +; Info Page +01000100="7-Zip haqqında" +01000103="7-Zip açıq proqramdır. Ancaq, üzv olaraq 7-zip inkişaf fəaliyyətinə qoşula bilərsiniz." +01000104="Texniki kömək" +01000105="Qeydiyyat" + +; Folders Page +01000200="Qovluqlar" +01000210="İş &qovluğu" +01000211="Sistem &TEMP qovluğu" +01000212="&Cari qovluq" +01000213="&Göstərilən qovluq:" +01000214="Yalnız çıxarıla bilən sürücülərlə işlə" + +01000281="Müvəqqəti arxiv sənədləri üçün bir yer göstərin." + +; System Page +01000300="Sistem" +01000301="Tərkib menülərində 7-Zip görünsün" +01000302="Açılan tərkib menüsü" +01000310="Tərkib menüsündəkilər:" + +; Language Page +01000400="Dil" +01000401="Dil:" + + +; 7-Zip Explorer extension + +; Context menu +02000101="7-Zip" +02000102="7-Zip əmrləri" +02000103="Arxivi aç" +02000104="Seçilmiş arxivi açar." +02000105="Sənədləri çıxar..." +02000106="Seçilmiş arxivdən sənədləri çıxarar." +02000107="Arxivlə..." +02000108="Seçilənləri arxivə əlavə edər." +02000109="Arxivi sına" +0200010A="Seçilmiş arxivin tamlığını sınayar." +0200010B="Buraya çıxar" +0200010C="Seçilmiş arxivdəki sənədləri cari qovluqda çıxarar." +0200010D="{0} qovluğunda çıxar" +0200010E="Alt qovluğa çıxarar." +0200010F="{0} kimi arxivlə" +02000110="Seçilənləri arxivə əlavə edər." +02000111="Sıxıb e-məktubla göndər..." +02000112="Seçilənləri sıxıb arxivləyər və arxivi e-məktubla göndərər." +02000113="{0} kimi sıx və e-məktubla göndər" +02000114="Seçilənləri sıxıb arxivləyər və arxivi e-məktubla göndərər." + +02000140="" +02000141="" + +; Properties +02000203="Yol" +02000204="Ad" +02000205="Genişləmə" +02000206="Qovluq" +02000207="Ölçü" +02000208="Arxivdəki həcmi" +02000209="Xüsusi kəmiyyətlər" +0200020A="Yaranmış" +0200020B="Müdaxiləli" +0200020C="Dəyişmə" +0200020D="Tam" +0200020E="İzahlı" +0200020F="Kilidli" +02000210="Əvvəlki parça" +02000211="Sonrakı parça" +02000212="Lüğət" +02000213="CRC" +02000214="Tip" +02000215="Anti" +02000216="Sıxılma şəkli" +02000217="Sistem" +02000218="Sənəd Sistemi" +02000219="İstifadəçi" +0200021A="Qrup" +0200021B="Blok" +0200021C="İzah" +0200021D="Mövqe" +0200021E="Yol ön şəkilçisi" +0200021F="Qovluqlar" +02000220="Sənədlər" +02000221="Buraxılış" +02000222="Cild" +02000223="Çox cildli" +02000224="Ofset" +02000225="Körpülər" +02000226="Blok" +02000227="Cild" + +02000229="64-bit" +0200022A="Big-endian" +0200022B="CPU" +0200022C="Fiziki ölçü" +0200022D="Başlıqların ölçüsü" +0200022E="Checksum" +0200022F="Xarakteristika" +02000230="Xəyali ünvan" +02000231="Kimlik" +02000232="Qısa ad" +02000233="Yaradacaq proqram" +02000234="Qism ölçüsü" +02000235="Rejim" +02000236="Körpü" + +; Status bar +02000301="{0} ədəd seçildi" +02000302="{0} ədəd" + +02000320="Sənədlər:" +02000321="Qovluqlar:" +02000322="Ölçü:" +02000323="Sıxılmış halda ölçü:" +02000324="Arxivlər:" + +; List Context Menu +02000401="&Sütunlar..." + +02000411="&Aç" +02000412="Çıxa&r..." + +; ToolBar +02000501="Çıxar" + +; Messages +02000601="Bu arxivi yeniləyə bilməzsiniz." +02000602="{0} arxivi yenilənmir" +02000603="'{0}' qovluğu yaradıla bilmir" +02000604="Bu sənəd tanınan arxiv deyil." +02000605="Xəta" +02000606="Həddən artıq çoxdur" +02000607="Bu genişləməyə bağlı bir proqram yoxdur" +02000608="Xəta yoxdur." +02000609="'{0}' arxiv kimi açıla bilmir" +0200060A="Şifrlənmiş '{0}'arxivi açıla bilmir. Açar səhvdirmi?" +0200060B="Sistem lazımi qədər yaddaşı işlədə bilmir" +0200060C="Bilinməyən xəta baş verdi" +0200060D="Arxiv tipi tanınmır" + +; Dialogs +02000702="Oldu" +02000705="&Bəli" +02000707="&Hamısına bəli" +02000709="&Xeyr" +0200070B="Ha&mısına xeyr" + +02000710="Olmadı" +02000711="&Olmadı" +02000713="&Bağla" +02000714="Saxla" +02000715="Təkrar başla" + +02000720="Kömək" + +; Extract dialog +02000800="Çıxar" +02000801="Çıxarı&lacaq yer:" +02000802="Açar" + +02000810="Yol adları" +02000811="Tam yol adları" +02000812="Cari yol adları" +02000813="Yol adları olmasın" + +02000820="Üzərinə yazılma" +02000821="Üstünə yazmaq üçün soruş" +02000822="Soruşmadan üstünə yaz" +02000823="Mövcud olanları nəzərə alma" +02000824="Avtomatik yenidən adlandır" +02000825="Mövcud olanları yenidən adlandır" + +02000830="Sənədlər" +02000831="&Seçilmiş sənədlər" +02000832="&Bütün sənədlər" + +02000881="Çıxarılacaq sənədlər üçün bir yer göstərin." + +02000890="Çıxarılır" + +; Overwrite dialog +02000900="Üstünə yazma təsdiqi" +02000901="Hədəf qovluqda eyni adlı sənəd var. Üstünə yazılsın?" +02000902="Mövcud sənəd:" +02000903="bununla dəyişdirilsinmi:" + +02000911="&Yenidən adlandır" + +02000982="{0} bayt" +02000983="Son dəyişmə" + +; Messages dialog +02000A00="Bildirişlər" + +02000A80="Bildiriş" + +02000A91="'{0}' üçün sıxılma şəkli tanınmadı." +02000A92="'{0}' yararsızdır. (Verilənlər xətası)" +02000A93="'{0}' yararsızdır. (CRC xətası)" +02000A94="Şifrlənmiş '{0}' sənədində verilənlər xətası. Açar səhvdirmi?" +02000A95="Şifrlənmiş '{0}' sənədində CRC xətası. Açar səhvdirmi?" + +; Password dialog +02000B00="Açar" +02000B01="Açarı daxil edin:" +02000B02="Açar görü&nsün" +02000B03="Açarı təkrarlayın:" +02000B10="Açarlar eyni deyil" +02000B11="Açar üçün yalnız İngilis hərfləri, rəqəm və xüsusi simvollardan (!, #, $, ...) istifadə edin" +02000B12="Açar çox uzundur" + +; Progress dialog +02000C00="İş" +02000C01="Keçən müddət:" +02000C02="Qalan müddət:" +02000C03="Həcm:" +02000C04="Sür'ət:" +02000C05="Yerinə yetirilən:" +02000C06="Sıxılma dərəcəsi:" + +02000C10="&Arxa planda" +02000C11="Ö&n planda" +02000C12="A&ra ver" +02000C13="&Davam et" + +02000C20="Ara verildi" + +02000C30="Həqiqətən əməliyyatın dayandırılmasını istəyirsiniz?" + +; Compress dialog +02000D00="Arxivlə" +02000D01="Ar&xiv:" +02000D02="&Yeniləmə şəkli:" +02000D03="Arxiv &növü:" +02000D04="Sıxılma şə&kli:" +02000D05="&Tam olsun" +02000D06="&Parametrlər:" +02000D07="Seçmələr" +02000D08="Özü cıxarılan olsun (S&FX)" +02000D09="Çox ilməli" +02000D0A="Sənəd a&dlarını şifrlə" +02000D0B="Sıxılma &səviyyəsi:" +02000D0C="&Lüğət ölçüsü:" +02000D0D="Sö&z ölçüsü:" +02000D0E="Yaddaş istifadəsi (Sıxma):" +02000D0F="Yaddaş istifadəsi (Açma):" +02000D10="Şifrləmə" +02000D11="Şifrləmə üsulu:" +02000D12="CPU axın sayı:" +02000D13="Ardıcıl blok ölçüsü:" +02000D14="Qeyri ardıcıl" +02000D15="Ardıcıl" +02000D16="Birgə istifadəyə açıq sənədlər sıxılsın" + +02000D40="C&ildlərə böl (Bayt):" +02000D41="Cild ölçüsü düz deyil" +02000D42="Tə'yin edilmiş cild ölçüsü: {0} bayt.\nArxivi bu ölçü ilə cildlərə bölmək istədiyinizə əminsinizmi?" + +02000D81="Sıxılmasız" +02000D82="Normal" +02000D83="Ən yüksək" +02000D84="Sür'ətli" +02000D85="Ən sür'ətli" +02000D86="Ultra" + +02000D90="Göz gəzdir" + +02000DA1="Artır və dəyişdir" +02000DA2="Yenilə və artır" +02000DA3="Yalnız yenilə" +02000DA4="Tutuşdur" + +02000DB1="Bütün sənədlər" + +02000DC0="Sıxılır" + +; Columns dialog +02000E00="Sütunlar" +02000E01="Bu qovluqda görünə bilən olmasını istədiyiniz sütunları işarələyin. Sütunları düzmək üçün yuxarı-aşağı düymələrindən istifadə edin." +02000E02="Seçilən sütun genişliyi" +02000E03="nö&qtə olsun." + +02000E10="Y&uxarı" +02000E11="Aş&ağı" +02000E12="&Göstər" +02000E13="Gi&zlə" +02000E14="Tə'yin et" + +02000E81="Başlıq" +02000E82="Genişlik" + +; Testing +02000F90="Sınaq" + + +; File Manager + +03000000="7-Zip Sənəd İdarəedicisi" + +; Menu +03000102="&Sənəd" +03000103="&Düzəliş" +03000104="&Baxış" +03000105="&Vasitələr" +03000106="&Kömək" +03000107="Ç&ox işlədilənlər" + +; File +03000210="&Aç" +03000211="B&urada aç" +03000212="&Pəncərədə aç" +03000220="&Göstər" +03000221="&Dəyişiklik et" +03000230="Ye&nidən adlandır" +03000231="&Köçür" +03000232="&Yerini dəyiş" +03000233="Si&l" +03000240="&Xüsusiyyətlər" +03000241="Şər&h" +03000242="Yoxlama cəmini hesabla" +03000243="Fərq" +03000250="Qovluq yarat" +03000251="Sənəd yarat" +03000260="Çı&x" +03000270="&Böl..." +03000271="B&irləşdir..." + +; Edit +03000310="&Geri get" +03000311="&Təkrarla" +03000320="Kə&s" +03000321="&Köçür" +03000322="Ya&pıştır" +03000323="Si&l" +03000330="&Hamısını seç" +03000331="Heç &birini seçmə" +03000332="&Tərsini seç" +03000333="Seç..." +03000334="Seçmə..." +03000335="Bu genişləməni seç" +03000336="Genişləmə seçmə" + +; View +03000410="&Böyük Simvollar" +03000411="K&içik Simvollar" +03000412="&Siyahı" +03000413="Açı&qlamalı" +03000420="Sırasız" +03000430="Kök qovluğu aç" +03000431="Bir səviyyə yuxarı" +03000432="Qovluq tarixçəsi..." +03000440="&Yenilə" +03000449="Müstəvi görünüş" +03000450="&2 lövhə" +03000451="Alə&t çubuğu" +03000460="Arxiv çubuğu" +03000461="Standart çubuq" +03000462="Böyük düymələr" +03000463="Düymə mətni görünsün" + +; Tools +03000510="&Tənzimləmələr..." +03000511="&FİƏ ölçüsü" + +; Help +03000610="İç&indəkilər..." +03000620="7-Zip h&aqqında..." + +; Favorites +03000710="C&ari qovluğu Xatırladıcıya artır" +03000720="Xatırladıcı" + +; Options Dialog + +03010000="Tənzimləmələr" + +; Plugins +03010100="Əlavə tərkiblər" +03010101="Əlavə tə&rkiblər:" +03010110="Tənzimləmələr" + +; Edit +03010200="Mətn düzəltmə" +03010201="Mətn &düzəltmə:" +03010202="&Fərq:" + +; System +03010300="Sistem" +03010302="7-Zip-ə bağla:" +03010310="Əlavə tərkib" + +; Settings +03010400="Nizamlamalar" +03010401="\"..\" görünsün" +03010402="Sənədlərin həqiqi simvolları görünsün" +03010410="Sistem menüsü görünsün" +03010420="&Bütün sətir seçilsin" +03010421="A&yırıcılar görünsün" +03010422="Açmaq üçün tək vuruş" +03010430="&Alternativ seçki rejimi" +03010440="&Geniş yaddaş səhifələri işlət" + +; Strings + +03020201="Köçür" +03020202="Yerini dəyiş" +03020203="Köçürüləcək yer:" +03020204="Yer dəyişdiriləcək yer:" +03020205="Köçürülür..." +03020206="Yer dəyişdirilir..." +03020207="Köçürülmə və ya yer dəyişmə bu cür qovluq üçün mümkün deyil." +03020208="İş mümkün deyil." +03020209="Qovluq seçin." + +03020210="Sənəd silmə təsdiqi" +03020211="Qovluq silmə təsdiqi" +03020212="Birdən çox sənədi silmə təsdiqi" +03020213="\"{0}\" silinsin?" +03020214="\"{0}\" qovluğu və içindəkilər silinsin?" +03020215="Bu {0} ədəd silinənlər geri qaytarılmayacaq, silinsin?" +03020216="silinir..." +03020217="Silmə xətası" +03020218="Sistem uzun yola malik sənədi zibil qutusuna ata bilmir" + +03020220="Yeni ad verilir..." +03020221="Adlandırma xətası" +03020222="Sənəd köçürülməsi təsdiqi" +03020223="Sənədləri arxivə köçürmək istədiyinizə əminsinizmi" + +03020230="Qovluq yarat" +03020231="Qovluq adı:" +03020232="Yeni qovluq" +03020233="Qovluq yaratma xətası" + +03020240="Sənəd yarat" +03020241="Sənəd adı:" +03020242="Yeni sənəd" +03020243="Sənəd yaratma xətası" + +03020250="Seç" +03020251="Seçmə" +03020252="Seçmə ifadəsi:" + +03020260="Qovluq tarixçəsi" + +03020280="'{0}' sənədi dəyişmişdir.\nArxivdə yenilənməsini istəyirsinizmi?" +03020281="'{0}' sənədi yenilənmədi" +03020282="Mətn düzəltmə işə düşmədi." +03020283="Açılır..." +03020284="Sənəd virusa bənzəyir (sənəd adında çıx sayda simvol işlədilir)." + +03020290="Şərh" +03020291="Şər&h:" + +030202A0="Sistem" + +03020300="EHM" +03020301="Şəbəkə" +03020302="Sənədlər" + +03020400="Arxivlə" +03020401="Çıxar" +03020402="Sına" + +03020420="Köçür" +03020421="Yerini dəyiş" +03020422="Sil" +03020423="Mə'lumat" + +03020500="Böl" +03020501="Bu &qovluqda böl:" +03020510="Bölünür..." +03020520="Bölünmə təsdiqi" +03020521="Sənədi {0} cildə bölmək istədiyinizə əminsinizmi?" +03020522="Cild ölçüsü sənədin ölçüsündən kiçik olmalıdır" + +03020600="Birləşdir" +03020601="Bu &qovluqda birləşdir:" +03020610="birləşdirilir..." +03020620="Yalnız birinci sənədi seçin" +03020621="Sənədi bölünmüş sənədin bir hissəsi kimi qəbul etmək olmur" +03020622="Bölünmüş sənədin birdən çox parçası tapıla bilmir" + +03020710="Yoxlama cəmi hesablanır..." +03020720="Yoxlama cəmi" +03020721="Verilənlər üçün CRC yoxlama cəmi:" +03020722="Verilənlər və adlar üçün CRC yoxlama cəmi:" + +03020800="Oxunur..." + +03020900="Xüsusiyyətlər" + +03020A01="Əməliyyat uzun yola malik qovluqdan işə salına bilmir." +03020A02="Bir sənəd seçməlisiniz" +03020A03="Bir və ya daha çox sənəd seçməlisiniz" +03020A04="{0} sənədi mövcuddur" + +; Computer +03031100="Cəmi həcm" +03031101="Boş yer" +03031102="Qism həcmi" +03031103="Açıqlama" + +; Network +03031200="Yerli ad" +03031201="Tə'min edici" + +; Benchmark Dialog + +03080000="FİƏ ölçülməsi" +03080001="Yaddaş istifadəsi:" +03080002="Sıxma" +03080003="Çıxarma" +03080004="Sür'ət" +03080005="Xal" +03080006="Təxmini orta xal" +03080007="Cari" +03080008="Nəticə" +03080009="Müvəffəqiyyət:" +0308000A="Xətalar:" +0308000B="CPU istifadəsi" +0308000C="Üstünlük / İstifadə" + +;!@LangEnd@! diff --git a/GUI/Lang/ba.txt b/GUI/Lang/ba.txt new file mode 100644 index 0000000..5494246 --- /dev/null +++ b/GUI/Lang/ba.txt @@ -0,0 +1,538 @@ +;!@Lang@!UTF-8! +; 7-Zip 4.65 +; Translated by Farit (Haqmar-www.bashqort.com) +; +; +; +; + +00000000="Bashkir" +00000001="Башҡортса" +00000002="109" + +; 7-Zip Configuration + +; Title +01000000="7-Zip Яйлау" + +; Info Page +01000100="7-Zip тураhында" +01000103="7-Zip – ирекле рәүештә таратылған программа. Шулай ҙа һеҙ теркәлеп был программаның үҫешенә ярҙам итә алаһығыҙ." +01000104="Ярҙам" +01000105="Теркәлеү" + +; Folders Page +01000200="Папкалар" +01000210="&Эш папкаһы" +01000211="&Ваҡытлыса папка (temp)" +01000212="Ғә&мәлдәге" +01000213="&Папка билдәлә:" +01000214="Алмаш ташығыстар өсөн генә ҡулланырға" + +01000281="Вакытлыса архивтар өсөн урын билдәлә." + +; System Page +01000300="Система" +01000301="Контекст менюла 7-Zip күренһен" +01000302="Каскадлы контекст меню" +01000310="Контекст меню элементтары:" + +; Language Page +01000400="Тел һайлау" +01000401="Тел:" + + +; 7-Zip Explorer extension + +; Context menu +02000101="7-Zip" +02000102="7-Zip әмерҙәре" +02000103="Архивты асырға" +02000104="Һайланған архивты аса." +02000105="Файлдар сығарыу..." +02000106="Һайланған архивтан файлдарҙы сығара." +02000107="Архивларға..." +02000108="Һайланған матдәләрҙе архивға өҫтәй." +02000109="Архивты һынарға" +0200010A="Һайланған архивтың бөтөнлөгөн тикшерә." +0200010B="Бында сығарырға" +0200010C="Һайланған архивтағы файлдарҙы ғәмәлдәге папкаға сығара." +0200010D="{0} папкаһына сығарырға" +0200010E="Файлдарҙы эс папкаға сығара." +0200010F="{0} итеп архивла" +02000110="Һайланған есемдәрҙе архивға өҫтәй." +02000111="Архивлап, e-mail менән ебәрергә..." +02000112="Һайланған есемдәрҙе архивға өҫтәй һәм архивды e-mail менән ебәрә." +02000113="{0} итеп архивларға һәм e-mail менән ебәрергә" +02000114=" Һайланған есемдәрҙе архивға өҫтәй һәм архивды e-mail менән ебәрә." + +02000140="<Папка>" +02000141="<Архив>" + +; Properties +02000203="Юл" +02000204="Исем" +02000205="Киңәйеүе" +02000206="Папка" +02000207="Күләм" +02000208="Архивдағы күләме" +02000209="Мәғлүмәт" +0200020A="Яһалған" +0200020B="Ирешелгән" +0200020C="Мөхәррирләнгән" +0200020D="Ҡаты" +0200020E="Аңлатма" +0200020F="Серләнгән" +02000210="Алдағы киҫәк" +02000211="Киләһе киҫәк" +02000212="Һүҙлек" +02000213="CRC" +02000214="Төр" +02000215="Анти" +02000216="Ҡыҫыу ысулы" +02000217="Хост ОС" +02000218="Файл системаһы" +02000219="Ҡулланыусы" +0200021A="Tөркөм" +0200021B="Блок" +0200021C="Тасуирлама" +0200021D="Урыны" +0200021E="Юл префиксы" +0200021F="Папкалар" +02000220="Файлдар" +02000221="Версия" +02000222="Том" +02000223="Күпле том" +02000224="Шылыу" +02000225="Һылтанмалар" +02000226="Блоктар" +02000227="Томдар" + +02000229="64-bit" +0200022A="Big-endian" +0200022B="Процессор" +0200022C="Физик күләме" +0200022D="Башлыҡтар күләме" +0200022E="Тикшереү суммаһы" +0200022F="Характеристикалар" +02000230="Виртуаль адрес" + +; Status bar +02000301="{0} есем һайланған" +02000302="{0} есем" + +02000320="Файл:" +02000321="Папка:" +02000322="Күләм:" +02000323="Архивланған:" +02000324="Архивдар:" + +; List Context Menu +02000401="&Бағаналар..." + +02000411="&Асыу" +02000412="&Сығарыу..." + +; ToolBar +02000501="Сығарыу" + +; Messages +02000601="Был архивды яңыртыу ғәмәлен үтәп булмай." +02000602="{0} архивын яңыртып булмай" +02000603="{0} янсығын яһап булмай" +02000604="Был файл танылған архив төрө түгел." +02000605="Хата" +02000606="Бик күп есем" +02000607="Был файл киңәйеүе менән килешкән өҫтәмә юҡ" +02000608="Хата табылманы" +02000609="'{0}' файлын архив һымаҡ асып булмай" +0200060A="Шифрланған '{0}' файлын асып булманы. Хаталы пароль?" +0200060B="Буш хәтер етмәй" +0200060C="Беленмәгән хата" +0200060D="Терәкләнмәгән архив төрө" + +; Dialogs +02000702="Тамам" +02000705="&Эйе" +02000707="Бөтәһенә лә Э&йе" +02000709="&Юҡ" +0200070B=" Бөтәһенә лә Ю&ҡ" + +02000710="Кире ал" +02000711="&Кире ал " +02000713="&Яп" +02000714="Туҡта" +02000715="Яңынан башла" + +02000720="Ярҙам" + +; Extract dialog +02000800="Сығар" +02000801="Бында &сығар:" +02000802="Пароль" + +02000810="Юл исемдәре" +02000811="&Тулы юл исемдәре " +02000812="Ғәмәлдәге юл исемдәре " +02000813="Юл исемдәре булмаһын" + +02000820="Өҫтөнә яҙыу" +02000821="&Өҫтөнә яҙыу алдынан һора" +02000822="&Өҫтөнә яҙыу алдынан һорама" +02000823="Булған файлдарҙы үтеп кит" +02000824="Яңы исем ҡуш" +02000825="Булған файлдарға яңы исем ҡуш" + +02000830="Файлдар" +02000831="Һ&айланған файлдар" +02000832="&Бөтә файлдар " + +02000881="Сығарыласаҡ файлдар өсөн урын һайлағыҙ." + +02000890="Сығарыу бара..." + +; Overwrite dialog +02000900="Файл алмаштырыуҙы раҫлағыҙ" +02000901="Сығарыласаҡ папкала эшкәртелгән файл бар." +02000902="Булған" +02000903="файлын киләһе менән алыштырырғамы?" + +02000911="&Яңы исем ҡушылһын" + +02000982="{0} байт" +02000983="һуңғы мөхәррирләнеүе" + +; Messages dialog +02000A00="Тикшереү белдереүҙәре" + +02000A80="Белдереү" + +02000A91="'{0}' файлын ҡыҫыу ысулын табып булманы." +02000A92="'{0}' файлында мәғлүмәт хатаһы бар. Файл боҙоҡ." +02000A93="'{0}' файлында CRC хатаһы бар. Файл боҙоҡ." +02000A94="Шифрланған '{0}' файлы мәғлүмәттәрендә хата. Хаталы пароль?" +02000A95="Шифрланған '{0}' файлында CRC хатаһы. Хаталы пароль?" + +; Password dialog +02000B00="Пароль керетеү" +02000B01="&Паролде керетегеҙ:" +02000B02="П&ароль күренһен" +02000B03="Па&ролде яңынан керетегеҙ:" +02000B10="Паролдәр тап килмәй" +02000B11="Пароль өсөн тик латин хәрефтәрен, һандарҙы һәм махсус символдарҙы (!, #, $, ...) ҡулланығыҙ" +02000B12="Пароль бик оҙон" + +; Progress dialog +02000C00="Процесс" +02000C01="Үткән ваҡыт:" +02000C02="Ҡалған ваҡыт:" +02000C03="Барыһы:" +02000C04="Тиҙлек:" +02000C05="Күләм:" +02000C06="Ҡыҫыу нисбәте:" + +02000C10="&Артҡы планда" +02000C11="А&лғы планда" +02000C12="&Туҡтатып тор" +02000C13="&Дауам" + +02000C20="Паузала" + +02000C30="Был эште ысынлап та өҙөргә теләйһегеҙме?" + +; Compress dialog +02000D00="Архивлау" +02000D01="&Архив:" +02000D02="&Яңыртыу ысулы:" +02000D03="А&рхив төрө:" +02000D04="Ҡ&ыҫыу ысулы:" +02000D05="Ҡа&ты архив яһа" +02000D06="&Параметрҙар:" +02000D07="&Көйләү" +02000D08="SFX ар&хивын яһау" +02000D09="Күп &элмәкле" +02000D0A="&Файл исемдәрен шифрла" +02000D0B="Ҡыҫыу &дәрәжәһе:" +02000D0C="Һүҙ&лек күләме:" +02000D0D="Һүҙ күлә&ме:" +02000D0E="Ҡыҫҡанда хәтер ҡулланыу:" +02000D0F="Сығарғанда хәтер ҡулланыу:" +02000D10="Шифрлау" +02000D11="Шифрлау методы:" +02000D12="Ағымдар һаны:" +02000D13="Блоктар күләме:" +02000D14="Файл күләме буйынса" +02000D15="Өҙөлмәгән" +02000D16="Яҙыуға асыҡ файлдарҙы ҡыҫырға" + +02000D40="Киҫәк/&байт итеп бүл:" +02000D41="Хаталы том күләме" +02000D42="Том күләме : {0} байт.\nФайлды бындай томдарға бүлеүҙе раҫлайһығыҙмы?" + +02000D81="Ҡыҫыуһыҙ" +02000D82="Ғәҙәти" +02000D83="Максимум" +02000D84="Тиҙ" +02000D85="Бик тиҙ" +02000D86="Ультра" + +02000D90="Ҡарау" + +02000DA1="Өҫтәргә һәм алмаштырырға" +02000DA2="Яңыртырға һәм өҫтәргә" +02000DA3="Яңыртырға" +02000DA4="Синхронларға" + +02000DB1="Бар файлдар" + +02000DC0="Ҡыҫыу бара..." + +; Columns dialog +02000E00="Бағаналар" +02000E01="Был папкала күренәсәк бағаналарҙы билдәләгеҙ. Бағаналарҙы рәтләү өсөн Өҫкә һәм Аҫҡа төймәләрен ҡулланығыҙ" +02000E02="һайланған бағаналарҙың киңлеге" +02000E03="&нөктә булһын." + +02000E10="Өҫ&кә" +02000E11="&Аҫҡа" +02000E12="Кү&рһәт" +02000E13="&Йәшер" +02000E14="Ҡуйырға" + +02000E81="Башлыҡ" +02000E82="Киңлек" + +; Testing +02000F90="hынау" + + +; File Manager + +03000000="7-Zip File Manager" + +; Menu +03000102="&Файл" +03000103="Һа&йлау" +03000104="&Күренеш" +03000105="&Сервис" +03000106="&Белешмә" +03000107="Һ&айланмалар" + + +; File +03000210="&Асырға" +03000211="&Эсендә асырға" +03000212="&Тышта асырға" +03000220="Ҡа&рау" +03000221="&Мөхәррирләргә" +03000230="&Исемен алыштырырға" +03000231="&Күбәйтергә..." +03000232="Кү&серергә..." +03000233="&Юйырға" +03000240="Мәғ&лүмәт" +03000241="Тас&уирлама" +03000242="Тикшереү һаны" +03000250="Яңы папка..." +03000251="Яңы &файл..." +03000260="С&ығырға" +03000270="Файлды &бүл..." +03000271="Файлдар бер&ләштереү..." + +; Edit +03000310="&Кире ал" +03000311="Ҡ&айтар" +03000320="К&иҫ" +03000321="&Хәтергә ал" +03000322="&Йәбештер" +03000323="&Юй" +03000330="&Бөтәһен дә һайларға" +03000331="Һай&лаузы кире алырға" +03000332="Бил&дәләнгәндәрзе кире әйләндерергә" +03000333="Маска менән һайларға..." +03000334="Һайлаузы ябырға..." +03000335="Төр буйынса һайларға" +03000336="Төр буйынса һайлаузы ябырға" + +; View +03000410="&Эре тамғалар" +03000411="&Бәләкәй тамғалар" +03000412="&Исемлек" +03000413="&Ентекле" +03000420="Тәртип булмаһын" +03000430="Төп папканы ас" +03000431="Бер кимәл юғары" +03000432="Папкалар тарихы..." +03000440="&Яңырт" +03000449="Барыһын да күрһәт" +03000450="&2 Панель" +03000451="&Сервис панеле" +03000460="&Архивлау төймәләре" +03000461="Стандарт төймәләр" +03000462="Эре төймәләр" +03000463="Төймәләр аңлатмалы" + +; Tools +03000510="&Көйләү..." +03000511="&Етештереүсәнлекте үлсәү" + +; Help +03000610="&Эстәлек..." +03000620="7-Zip &тураhында..." + +; Favorites +03000710="Ғәмәлдәге папканы һайланғандарға ал:" +03000720="Урын" + +; Options Dialog + +03010000="Яйлау" + +; Plugins +03010100="Өҫтәмәләр" +03010101="&Өҫтәмәләр:" +03010110="Яйлауҙар..." + +; Edit +03010200="Мөхәррирләүсе" +03010201="&Мөхәррирләүсе:" + +; System +03010300="Система" +03010302="7-Zip менән килештер:" +03010310="Өҫтәмә" + + +; Settings +03010400="Көйләү" +03010401="\"..\" есеме күренһен" +03010402="Файлдарҙың ысын тамғалары күренһен" +03010410="Система менюһы күренһен" +03010420="Бөтә юл һайланһын" +03010421="Һыҙыҡтар күренһен" +03010430="Альтернатив һайлау ысулы" +03010440="Ҙур хәтер биттәрен ҡуллан" + +; Strings + +03020201="Хәтергә ал" +03020202="Күсер" +03020203="Күбәйтеләсәк урын:" +03020204="Күсереләсәк урын:" +03020205="Күбәйтеү..." +03020206="Күсереү..." +03020207="Был папка өсөн есемдәрҙе күбәйтеп йәки күсереп булмай." +03020208="Ғәмәлде үтәп булмай" +03020209="Папканы күрһәтегеҙ." + +03020210="Файл юйыуҙы раҫлау" +03020211="Папка юйыуҙы раҫлау" +03020212="Берҙән күп файл юйыуҙы раҫлау" +03020213="'{0}' юйылһынмы?" +03020214="'{0}' папкаһы һәм эсендәгеләр юйылһынмы?" +03020215="{0} есеме юйылһынмы?" +03020216="Юйыу бара..." +03020217="Файл йәки папка юйыу хатаһы" +03020218="Оҙон юллы файлдарҙы кәрзингә юйыуҙы система терәкләмәй" + +03020220="Яңынан исемләү бара..." +03020221="Файлға йәки папкаға яңы исем биреү хатаһы" +03020222="Файлдарҙы күбәйтеүҙе раҫлау" +03020223="Был файлдар архивға ҡуйылһынмы?" + +03020230="Папка яhа" +03020231="Папка исеме:" +03020232="Яңы папка" +03020233="Папка яһау хатаһы" + +03020240="Файл яhа" +03020241="Файл исеме:" +03020242="Яңы файл" +03020243="Файл яһау хатаһы" + +03020250="hайла" +03020251="Һайлауҙы кире ал" +03020252="Маска:" + +03020260="Папкалар тарихы" + +03020280="'{0}' файлы мөхәррирләнде.\nБыл файл архивта яңыртылһынмы?" +03020281="Файлды яңыртып булманы\n'{0}'" +03020282="Мөхәррирләүсене асып булманы." +03020283="Асыла..." +03020284="Файл вирусҡа оҡшаған (файл исемендә бер-бер артлы килгән күп бушлыҡтар бар)." + +03020290="Тасуирлама" +03020291="&Асыҡлама:" + +030202A0="Система" + +03020300="Компьютер" +03020301="Селтәр" +03020302="Документтар" + +03020400="Архивларға" +03020401="Сығарырға" +03020402="Һынарға" + +03020420="Күбәйтергә" +03020421="Күсерергә" +03020422="Юйырға" +03020423="Мәғлүмәт" + +03020500="Файлды бүл" +03020501="&Ошо папкаға бүл:" +03020510="Бүлеү бара..." +03020520="Бүлеүҙе раҫлау" +03020521="Был файлды {0} киҫәккә бүлеүҙе раҫлайһығыҙмы?" +03020522="Том күләме сығанак файлдан бәләкәй булырға тейеш" + +03020600="Файлдарҙы берләштер " +03020601="&Ошо папкала берләштер:" +03020610="Берләштереү бара..." +03020620="Бүленгән файлдың беренсе киҫәген генә һайлағыҙ" +03020621="Бүленгән файлды танып булманы" +03020622="Бүленгән файлдың берҙән күп киҫәген табып булманы" + + +03020710="Тикшереү һанын иҫәпләү бара..." +03020720="Тикшереү һаны" +03020721="Мәғлүмәттәр өсөн CRC тикшереү һаны:" +03020722=" Мәғлүмәттәр һәм исемдәр өсөн CRC тикшереү һаны:" + +03020800="Тарау бара..." + +03020900="Мәғлүмәт" + +03020A01="Ғәмәлде бындай оҙон юллы папканан үтәп булмай." +03020A02="Бер файлды һайлау кәрәк" +03020A03="Бер йәки күберәк файлды һайлау кәрәк" +03020A04="{0} файлы бар" + + +; Computer +03031100="Бар күләм" +03031101="Буш урын" +03031102="Бөртөк күләме" +03031103="Билдә" + +; Network +03031200="Урындағы Исем" +03031201="Провайдер" + +; Benchmark Dialog + +03080000="Етештереүсәнлекте тикшереү" +03080001="Хәтер ҡулланыу:" +03080002="Ҡыҫыу" +03080003="Сығарыу" +03080004="Тиҙлек" +03080005="Рейтинг" +03080006="Дөйөм рейтинг" +03080007="Хәҙерге" +03080008="Һөҙөмтә" +03080009="Үтеүҙәр:" +0308000A="Хаталар:" +0308000B="Процессор ҡулланыу" +0308000C="Рейтинг / Проц. ҡулл." + +;!@LangEnd@! \ No newline at end of file diff --git a/GUI/Lang/be.txt b/GUI/Lang/be.txt new file mode 100644 index 0000000..02f2a60 --- /dev/null +++ b/GUI/Lang/be.txt @@ -0,0 +1,479 @@ +;!@Lang@!UTF-8! +; 7-Zip 4.59 +; Translated by Drive DRKA +; Last modification : +; 05-09-2007 15:27 +; +; + +00000000="Belarusian" +00000001="Беларуская" +00000002="35" + +; 7-Zip Configuration +; Title +01000000="7-Zip - Канфігурацыя" + +; Info Page +01000100= "Аб праграме 7-Zip" +01000103= "7-Zip з'яўляецца вольна распаўсюджваемай праграмай. Аднак калі вы жадаеце падтрымаць распрацоўку 7-Zip, вы можаце зарэгістраваць праграму.Праграма перакладена Drive DRKA.Мая электронная скрыня: drka2003@mail.ru.Пераклад зроблен у верасні 2007 года." +01000104= "Падтрымка" +01000105= "Зарэгістраваць" + +; Folders Page +01000200="Папкі" +01000210="&Працоўная Папка" +01000211="&Сістэмная часавая Папка" +01000212="&Бягучая" +01000213="&Задаць:" +01000214="Выкарыстаць толькі для зменных носьбітаў" +01000281="Пакажыце становішча для часавых архіваў." + +; System Page +01000300="Сістэма" +01000301="Убудаваць 7-Zip у кантэкстнае меню абалонкі" +01000302="Каскаднае кантэкстнае меню" +01000310="Элементы кантэкстнага меню:" + +; Language Page +01000400="Мова" +01000401="Мова:" + +; 7-Zip Explorer extension +; Context menu +02000101="7-Zip" +02000102="Каманды 7-Zip." +02000103="Адкрыць архіў" +02000104="Адкрыццё вылучанага архіва." +02000105="Распакаваць" +02000106="Выманне файлаў з вылучанага архіва." +02000107="Дадаць да архіва..." +02000108="Дадаць вылучаныя аб'екты да архіва." +02000109="Тэставаць" +0200010A="Тэставанне вылучанага архіва." +0200010B="Распакаваць тут" +0200010C="Выманне файлаў з вылучанага архіва ў бягучую папку." +0200010D="Распакаваць у {0}" +0200010E="Выманне файлаў у падкаталог." +0200010F="Дадаць да {0}" +02000110="Дадаць вылучаныя аб'екты да архіва." +02000111="Сціснуць і адправіць па email..." +02000112="Сціснуць вылучаныя аб'екты і адправіць архіў па email." +02000113="Сціснуць у {0} і адправіць па email" +02000114="Сціснуць вылучаныя аб'екты і адправіць архіў па email." +02000140="<Папка>" +02000141="<Архіў>" + +; Properties +02000203="Шлях" +02000204="Імя" +02000205="Пашырэнне" +02000206="Папка" +02000207="Памер" +02000208="Сціснуты" +02000209="Атрыбуты" +0200020A="Створаны" +0200020B="Адчынены" +0200020C="Зменены" +0200020D="Бесперапынны" +0200020E="Каментар" +0200020F="Зашыфраваны" +02000210="Пабіты Да" +02000211="Пабіты Пасля" +02000212="Слоўнік" +02000213="CRC" +02000214="Тып" +02000215="Анты" +02000216="Метад" +02000217="Сістэма" +02000218="Файлавая Сістэма" +02000219="Карыстач" +0200021A="Група" +0200021B="Блок" +0200021C="Каментар" +0200021D="Пазіцыя" +0200021E="Шлях" +0200021F="папок" +02000220="Файлаў" +02000221="Версія" +02000222="Тым" +02000223="Шматтомны" +02000224="Зрушэнне" +02000225="Спасылак" +02000226="Блокаў" +02000227="Тамоў" +02000229="64-bit" +0200022A="Big-endian" +0200022B="Працэсар" +0200022C="Фізічны Памер" +0200022D="Памер Загалоўкаў" +0200022E="Кантрольная Сума" +0200022F="Характарыстыкі" +02000230="Віртуальны Адрас" + +; Status bar +02000301="Вылучана аб'ектаў: {0}" +02000302="{0} аб'ект(ов)" +02000320="Файлаў:" +02000321="папок:" +02000322="Памер:" +02000323="Сціснуты:" +02000324="Архіваў:" + +; List Context Menu +02000401="&Слупкі..." +02000411="&Адкрыць" +02000412="&Выняць..." + +; ToolBar +02000501="Выняць" + +; Messages +02000601="Аперацыі змены не падтрымліваюцца для гэтага архіва." +02000602="Не атрымалася змяніць архіў {0}" +02000603="Не атрымалася стварыць папку '{0}'" +02000604="Файл не з'яўляецца падтрымоўваным архівам." +02000605="Памылка" +02000606="Занадта шмат элементаў" +02000607="Няма асацыяванага прыкладання" +02000608="Памылак не знойдзена" +02000609="Не атрымалася адкрыць файл '{0}' як архіў" +0200060A="Не атрымалася адкрыць зашыфраваны архіў '{0}'. Няслушны пароль?" +0200060B="Нядосыць вольнай памяці" +0200060C="Невядомая памылка" +0200060D="Непадтрымоўваны тып архіва" + +; Dialogs +02000702="OK" +02000705="&Так" +02000707="Ды для &усіх" +02000709="&Не" +0200070B="Няма для ў&сех" +02000710="Адмена" +02000711="&Адмена" +02000713="&Зачыніць" +02000714="Стоп" +02000715="Перазапуск" +02000720="Дапамога" + +; Extract dialog +02000800="Выняць" +02000801="&Распакаваць у:" +02000802="&Пароль" +02000810="Шляхі" +02000811="Па&лные шляхі" +02000812="Аб&тносительные шляхі" +02000813="&Без шляхоў" +02000820="Перазапіс" +02000821="&З пацверджаннем" +02000822="Бы&ез пацверджанні" +02000823="Проп&ускать" +02000824="Пераназваць автом." +02000825="Переим. автом. істот." +02000830="Файлы" +02000831="Абраныя файлы" +02000832="Усе файлы" +02000881="Пакажыце становішча для вымаемых файлаў." +02000890="Распакаванне" + +; Overwrite dialog +02000900="Пацверджанне замены файла" +02000901="Папка ўжо ўтрымоўвае апрацоўваны файл." +02000902="Замяніць існы файл" +02000903="наступным файлам?" +02000911="Пераназваць автом." +02000982="{0} байтаў" +02000983="зменены" + +; Messages dialog +02000A00="Паведамленні" +02000A80="Паведамленне" +02000A91="Непадтрымоўваны метад сціску для файла '{0}'." +02000A92="Памылка ў дадзеных у '{0}'. Файл сапсаваны." +02000A93="Памылка CRC у '{0}'. Файл сапсаваны." +02000A94="Памылка ў дадзеных зашыфраванага файла '{0}'. Няслушны пароль?" +02000A95="Памылка CRC для зашыфраванага файла '{0}'. Няслушны пароль?" + +; Password dialog +02000B00="Увод пароля" +02000B01="&Увядзіце пароль:" +02000B02="&Паказаць пароль" +02000B03="&Паўторыце пароль:" +02000B10="Паролі не супадаюць" +02000B11="Для пароля выкарыстайце толькі знакі лацінскага алфавіту, лічбы і адмысловыя знакі (!, #, $, ...)" +02000B12="Пароль занадта доўгі" + +; Progress dialog +02000C00="Працэс" +02000C01="Мінула:" +02000C02="Засталося:" +02000C03="Усяго:" +02000C04="Хуткасць:" +02000C05="Памер:" +02000C06="Ступень сціску:" +02000C10="&Фонам" +02000C11="&На пярэдні план" +02000C12="&Паўза" +02000C13="&Працягнуць" +02000C20="На паўзе" +02000C30="Вы сапраўды жадаеце перапыніць аперацыю?" + +; Compress dialog +02000D00="Дадаць да архіва" +02000D01="&Архіў:" +02000D02="&Рэжым змены:" +02000D03="&Фармат архіва:" +02000D04="&Метад сціску:" +02000D05="Стварыць &Solid архіў" +02000D06="&Параметры:" +02000D07="&Опцыі" +02000D08="Стварыць SF&X-архіў" +02000D09="М&ногопоточность" +02000D0A="&Шыфраваць імёны файлаў" +02000D0B="&Узровень сціску:" +02000D0C="Памер &слоўніка:" +02000D0D="Памер з&лоўлі:" +02000D0E="Аб'ём памяці для пакавання:" +02000D0F="Аб'ём памяці для распакавання:" +02000D10="Шыфраванне" +02000D11="Метад шыфравання:" +02000D12="Лік струменяў:" +02000D13="Памер блока:" +02000D14="Па памеры файла" +02000D15="Бесперапынны" +02000D16="Сціскаць адчыненыя для запісу файлы" +02000D40="Разбіць на &тамы памерам (у байтах):" +02000D41="Памылка ў поле для задання памеру тамоў" +02000D42="Усталяваны памер тома: {0} байтаў.\nВы сапраўды жадаеце разбіць архіў на такія тамы?" +02000D81="Без сціску" +02000D82="Нармалёвы" +02000D83="Максімальны" +02000D84="Хуткі" +02000D85="Хуткасны" +02000D86="Ультра" +02000D90="Прагартаць" +02000DA1="Дадаць і замяніць" +02000DA2="Абнавіць і дадаць" +02000DA3="Абнавіць" +02000DA4="Сінхранізаваць" +02000DB1="Усе файлы" +02000DC0="Кампрэсія" + +; Columns dialog +02000E00="Слупкі" +02000E01="Пазначце слупкі, якія варта адлюстроўваць у гэтай тэчцы. Кнопкамі \"Уверх\" і \"Уніз\" можна задаць парадак прытрымлівання слупкоў." +02000E02="Абраныя слупкі павінны мець шырыню" +02000E03="кропак." +02000E10="&Уверх" +02000E11="У&ніз" +02000E12="П&аказаць" +02000E13="&Схаваць" +02000E14="Усталяваць" +02000E81="Імя" +02000E82="Шырыня" + +; Testing +02000F90="Тэставанне" + +; File Manager +03000000="7-Zip File Manager" + +; Menu +03000102="&Файл" +03000103="&Праўка" +03000104="&Выгляд" +03000105="С&ервіс" +03000106="&Даведка" +03000107="&Абранае" + +; File +03000210="&Адкрыць" +03000211="Адкрыць &усярэдзіне" +03000212="Адкрыць снару&жи" +03000220="Прагляд" +03000221="&Рэдагаваць" +03000230="Переи&меновать" +03000231="&Капіяваць у..." +03000232="&Перамясціць у..." +03000233="&Выдаліць" +03000240="Сво&йства" +03000241="Комме&нтарий" +03000242="Кантрольная сума" +03000250="&Стварыць папку" +03000251="Ств&арыць Файл" +03000260="У&ыход" +03000270="Ра&збить файл..." +03000271="Аб&бъединить файлы..." + +; Edit +03000310="&Адмяніць" +03000311="&Вярнуць" +03000320="&Выразаць" +03000321="&Капіяваць" +03000322="Вст&авить" +03000323="&Выдаліць" +03000330="Вылучыць у&сёе" +03000331="Прыбраць вылучэнне" +03000332="&Звярнуць у&ыделение" +03000333="Вылучыць..." +03000334="Прыбраць вылучэнне..." +03000335="Вылучыць па тыпе" +03000336="Прыбраць вылучэнне па тыпе" + +; View +03000410="&Буйныя значкі" +03000411="&Дробныя значкі" +03000412="Спис&ок" +03000413="&Табліца" +03000420="Без сартавання" +03000430="Адкрыць каранёвую папку" +03000431="Пераход на адзін узровень уверх" +03000432="Гісторыя папок..." +03000440="Аб&бновить" +03000449="Плоскі рэжым" +03000450="&2 Панэлі" +03000451="&Панэлі прылад" +03000460="Панэль кнопак архіватара" +03000461="Стандартная панэль кнопак" +03000462="Вялікія кнопкі" +03000463="Надпісы на кнопках" + +; Tools +03000510="Налады..." +03000511="Тэставанне прадукцыйнасці" + +; Help +03000610="&Змест..." +03000620="Аб &праграме..." + +; Favorites +03000710="Дадаць папку ў &абранае як" +03000720="Закладка" + +; Options Dialog +03010000="Налады" + +; Plugins +03010100="Убудовы" +03010101="&Убудовы:" +03010110="Сво&йства" + +; Edit +03010200="Рэдактар" +03010201="&Рэдактар:" + +; System +03010300="Сістэма" +03010302="Асацыяваць 7-Zip з файламі:" +03010310="Убудова" + +; Settings +03010400="Налады" +03010401="Паказваць элемент \"..\"" +03010402="Паказваць рэальныя абразкі файлаў" +03010410="Паказваць сістэмнае меню" +03010420="Курсор на ўвесь радок" +03010421="Паказваць падзельнікі" +03010430="Альтэрнатыўны рэжым пазнакі" +03010440="Выкарыстаць вялікія старонкі памяці" + +; Strings +03020201="Капіяваць" +03020202="Перамясціць" +03020203="Капіяваць у:" +03020204="Перамясціць у:" +03020205="Капіяванне..." +03020206="Перасоўванне..." +03020207="Нельга скапіяваць аб'екты для такіх папок" +03020208="Аперацыя не падтрымліваецца для гэтай папкі." +03020209="Пакажыце папку." +03020210="Пацверджанне выдалення файла" +03020211="Пацверджанне выдалення папкі" +03020212="Пацверджанне выдалення групы файлаў" +03020213="Вы сапраўды жадаеце выдаліць \"{0}\"?" +03020214="Вы сапраўды жадаеце выдаліць папку \"{0}\" і ўсё яе змесціва?" +03020215="Вы сапраўды жадаеце выдаліць гэтыя аб'екты ({0} шт.)?" +03020216="Выдаленне..." +03020217="Памылка пры выдаленні файла або папкі" +03020218="Сістэма не падтрымлівае аперацыю выдалення файлаў з доўгімі шляхамі ў кошык" +03020220="Пераназванне..." +03020221="Памылка пры пераназванні файла або папкі" +03020222="Пацверджанне капіявання файлаў" +03020223="Вы сапраўды жадаеце скапіяваць гэтыя файлы ў архіў" +03020230="Стварыць папку" +03020231="Імя папкі:" +03020232="Новая Папка" +03020233="Памылка пры стварэнні папкі" +03020240="Стварыць файл" +03020241="Імя файла:" +03020242="Новы файл" +03020243="Памылка пры стварэнні файла" +03020250="Вылучыць" +03020251="Прыбраць вылучэнне" +03020252="Маска:" +03020260="Гісторыя папок" +03020280="Файл '{0}' быў зменены.\nВы жадаеце абнавіць яго ў архіве?" +03020281="Не атрымалася абнавіць файл\n'{0}'" +03020282="Не атрымалася запусціць рэдактар" +03020283="Адкрыццё..." +03020284="Файл падобны на вірус (імя файла ўтрымоўвае доўгую паслядоўнасць прабелаў)." +03020290="Каментар" +03020291="&Каментар:" +030202A0="Сістэма" +03020300="Кампутар" +03020301="Сетка" +03020302="Дакументы" +03020400="Дадаць" +03020401="Выняць" +03020402="Тэставаць" +03020420="Капіяваць" +03020421="Перамясціць" +03020422="Выдаліць" +03020423="Інфармацыя" +03020500="Разбіць файл" +03020501="&Разбіць у:" +03020510="Разбіццё..." +03020520="Пацверджанне разбіцця" +03020521="Вы сапраўды жадаеце разбіць файл на {0} частак?" +03020522="Памер тома павінен быць менш памеру зыходнага файла" +03020600="Аб'яднаць файлы" +03020601="&Аб'яднаць у:" +03020610="Аб'яднанне..." +03020620="Неабходна вылучыць толькі першую частку пабітага файла" +03020621="Не атрымалася распазнаць пабіты файл" +03020622="Не атрымалася знайсці больш адной часткі пабітага файла" +03020710="Вылічэнне кантрольнай сумы..." +03020720="Кантрольная сума" +03020721="Кантрольная сума CRC для дадзеных:" +03020722="Кантрольная сума CRC для дадзеных і імёнаў:" +03020800="Сканаванне..." +03020900="Уласцівасці" +03020A01="Аперацыя не можа быць выкананая з папкі, якая мае доўгі шлях." +03020A02="Вы павінны вылучыць адзін файл" +03020A03="Вы павінны вылучыць адзін або некалькі файлаў" +03020A04="Файл {0} ужо існуе" + +; Computer +03031100="Ёмістасць" +03031101="Вольна" +03031102="Памер кластара" +03031103="Пазнака" + +; Network +03031200="Лакальнае імя" +03031201="Правайдэр" + +; Benchmark Dialog +03080000="Тэставанне прадукцыйнасці" +03080001="Аб'ём памяці:" +03080002="Пакаванне" +03080003="Распакаванне" +03080004="Хуткасць" +03080005="Рэйтынг" +03080006="Агульны рэйтынг" +03080007="Бягучы" +03080008="Выніковы" +03080009="Праходаў:" +0308000A="Памылак:" +0308000B="Нагрузка" +0308000C="Рэйтынг / Нагр." diff --git a/GUI/Lang/bg.txt b/GUI/Lang/bg.txt new file mode 100644 index 0000000..4c51530 --- /dev/null +++ b/GUI/Lang/bg.txt @@ -0,0 +1,535 @@ +;!@Lang@!UTF-8! +; 7-Zip 4.65 +; Translated by chavv, http://www.angelfire.com/creep/chavvdarrr/ +; icobgr +; Updated for 4.65 - Vassia Atanassova +; +; + +00000000="Bulgarian" +00000001="Български" +00000002="2" + +; 7-Zip Configuration + +; Title +01000000="Конфигурация на 7-Zip" + +; Info Page +01000100="Информация" +01000103="7-Zip се разпространява като свободен софтуер. Все пак, можете да подпомогнете разработката на 7-zip, като се регистрирате." +01000104="Поддръжка" +01000105="Регистрация" + +; Folders Page +01000200="Директории" +01000210="&Работна директория" +01000211="&Системната TEMP директория" +01000212="&Текущата" +01000213="&Друга:" +01000214="Използване само за преносими носители" + +01000281="Указване на място за временните архиви." + +; System Page +01000300="Система" +01000301="Интегриране на 7-Zip в контекстното меню на шела" +01000302="Каскадно контекстно меню" +01000310="Елементи на контекстното меню:" + +; Language Page +01000400="Език" +01000401="Език:" + + +; 7-Zip Explorer extension + +; Context menu +02000101="7-Zip" +02000102="Команди на 7-Zip" +02000103="Отваряне на архив" +02000104="Отваряне на избрания архив" +02000105="Разархивиране на файловете..." +02000106="Разархивиране на файловете от избрания архив." +02000107="Добавяне към архив..." +02000108="Добавяне на избраните файлове към архива " +02000109="Проверка на архива" +0200010A="Проверка на целостта на избрания архив." +0200010B="Разархивиране тук" +0200010C="Разархивиране на избрания архив в текущата директория." +0200010D="Разархивиране в {0}" +0200010E="Разархивиране на файловете в поддиректория." +0200010F="Добавяне в {0}" +02000110="Добавяне на избраните файлове (директории) в архив." +02000111="Архивиране и изпращане..." +02000112="Архивиране на избраните файлове (директории) и изпращане на архива." +02000113="Архивиране в {0} и изпращане" +02000114="Архивиране на избраните файлове (директории) и изпращане на архива." + +02000140="<Директория>" +02000141="<Архив>" + +; Properties +02000203="Път" +02000204="Име" +02000205="Разширение" +02000206="Директория" +02000207="Размер" +02000208="Компресиран размер" +02000209="Атрибути" +0200020A="Създаден" +0200020B="Отварян" +0200020C="Изменен" +0200020D="Солиден" +0200020E="Коментар" +0200020F="Зашифрован" +02000210="Разделен до" +02000211="Разделен след" +02000212="Речник" +02000213="CRC" +02000214="Тип" +02000215="Анти" +02000216="Метод" +02000217="Операционна система" +02000218="Файлова система" +02000219="Потребител" +0200021A="Група" +0200021B="Блок" +0200021C="Коментар" +0200021D="Позиция" +0200021E="Префикс на пътя" +0200021F="Директории" +02000220="Файлове" +02000221="Версия" +02000222="Том" +02000223="Multivolume" +02000224="Offset" +02000225="Links" +02000226="Blocks" +02000227="Томове" + +02000229="64-битов" +0200022A="Big-endian" +0200022B="CPU" +0200022C="Физически размер" +0200022D="Размер на заглавната част" +0200022E="Контролна сума" +0200022F="Характеристики" +02000230="Виртуален адрес" + +; Status bar +02000301="{0} обект(и) избрани" +02000302="{0} обект(и)" + +02000320="Файлове:" +02000321="Директории:" +02000322="Размер:" +02000323="Компресиран размер:" +02000324="Архиви:" + +; List Context Menu +02000401="&Колони..." + +02000411="&Отваряне" +02000412="&Разархивиране..." + +; ToolBar +02000501="Разархивиране" + +; Messages +02000601="Този архив не поддържа операции за изменение." +02000602="Архивът не може да бъде променен! {0}" +02000603="Не може да бъде създадена директория '{0}'" +02000604="Файлът не е архив от поддържан тип." +02000605="Грешка" +02000606="Твърде много обекти" +02000607="Няма програма, асоциирана с указаното файлово разширение" +02000608="Няма грешки в архива" +02000609="Файлът '{0}' не може да се отвори като архив" +0200060A="Криптираният архив '{0}' не може да се отвори. Грешка в паролата?" +0200060B="Системата не може да задели необходимото количество памет." +0200060C="Непозната грешка" +0200060D="Архив от тип, който не се поддържа" + +; Dialogs +02000702="OK" +02000705="&Да" +02000707="Да за &всички" +02000709="&Не" +0200070B="Не за &всички" + +02000710="Отказ" +02000711="&Отказ" +02000713="&Затваряне" +02000714="Стоп" +02000715="От начало" + +02000720="Помощ" + +; Extract dialog +02000800="Разархивиране" +02000801="&Разархивиране в:" +02000802="&Парола" + +02000810="Режим за пътищата" +02000811="Пълни пътища" +02000812="Текущи пътища" +02000813="Без пътища" + +02000820="Режим за презаписване" +02000821="Потвърждение преди презаписване" +02000822="Презаписване без потвърждение" +02000823="Пропускане на съществуващите файлове" +02000824="Автоматично преименуване" +02000825="Автоматично преименуване на съществуващите файлове" + +02000830="Файлове" +02000831="&Избраните файлове" +02000832="&Всички файлове" + +02000881="Избор на място за разархивираните файлове." + +02000890="Разархивиране" + +; Overwrite dialog +02000900="Подтвърдете замяната на файла" +02000901="Директорията вече съдържа файл с такова име." +02000902="Желаете ли да замените съществуващия файл" +02000903="с този файл?" + +02000911="&Автоматично преименуване" + +02000982="{0} байта" +02000983="изменен на" + +; Messages dialog +02000A00="Диагностични съобщения" + +02000A80="Съобщение" + +02000A91="Неподдържан метод за компресия във файл '{0}'." +02000A92="Грешка в данните в '{0}'. Файлът е повреден." +02000A93="Проверката на цикличния остатък даде грешка в '{0}'. Файлът е повреден." +02000A94="Грешка в данните в криптирания файл '{0}'. Грешка в паролата?" +02000A95="Проверката на цикличния остатък даде грешка в криптирания файл '{0}'. Грешка в паролата?" + +; Password dialog +02000B00="Въведете парола" +02000B01="Въведете парола:" +02000B02="&Показване на паролата" +02000B03="Въведете повторно парола:" +02000B10="Двете пароли не съвпадат" +02000B11="За паролата си използвайте само латински букви, цифри и специални символи (!, #, $, ...)" +02000B12="Паролата е твърде дълга" + + +; Progress dialog +02000C00="Обработка" +02000C01="Изминало време:" +02000C02="Оставащо време:" +02000C03="Размер:" +02000C04="Скорост:" +02000C05="Обработени:" +02000C06="Коефициент на компресия:" + +02000C10="&Фонов режим" +02000C11="&Нормален режим" +02000C12="&Пауза" +02000C13="Пр&одължаване" + +02000C20="В пауза" + +02000C30="Наистина ли желаете да прекратите?" + +; Compress dialog +02000D00="Добавяне към архив" +02000D01="&Архив:" +02000D02="Режим за изменение:" +02000D03="Формат на архива:" +02000D04="Метод за компресия:" +02000D05="Създаване на п&лътен архив" +02000D06="&Параметри:" +02000D07="&Опции" +02000D08="Самора&зархивиращ се архив" +02000D09="Нишковидно" +02000D0A="Криптиране на файловите &имена" +02000D0B="&Ниво на компресия:" +02000D0C="Размер на &речника:" +02000D0D="Размер на &думата:" +02000D0E="Използвана памет за архивиране:" +02000D0F="Използвана памет за разархивиране:" +02000D10="Криптиране" +02000D11="Метод за криптиране:" +02000D12="Брой процесорни нишки:" +02000D13="Размер на непрекъснат блок:" +02000D14="Non-solid" +02000D15="Непрекъсната (solid) компресия" +02000D16="Компресирани споделени файлове" + + +02000D40="Разделяне на &томове, байтове:" +02000D41="Невалиден размер на том" +02000D42="Указан размер на том: {0} байта.\nСигурни ли сте, че искате да разделите архива на томове с такъв размер?" + + +02000D81="Без компресия" +02000D82="Нормална" +02000D83="Максимална" +02000D84="Бърза" +02000D85="Най-бърза" +02000D86="Ултра" + +02000D90="Разглеждане" + +02000DA1="Добавяне и замяна на файлове" +02000DA2="Обновяване и добавяне на файлове" +02000DA3="Опресняване на съществуващите файлове" +02000DA4="Синхронизиране на файловете" + +02000DB1="Всички файлове" + +02000DC0="Компресия" + +; Columns dialog +02000E00="Колони" +02000E01="Маркирайте колоните, които искате да се виждат в тази директория. Използвайте бутоните \"Нагоре\" и \"Надолу\", за да промените реда на колоните." +02000E02="Избраните колони трябва да са с " +02000E03="пиксела по ширина." + +02000E10="Нагоре" +02000E11="Надолу" +02000E12="Показване" +02000E13="Скриване" +02000E14="Установяване" + +02000E81="Име" +02000E82="Ширина" + +; Testing +02000F90="Проверка" + + +; File Manager + +03000000="Файлов мениджър 7-Zip" + +; Menu +03000102="&Файл" +03000103="&Редактиране" +03000104="&Показване" +03000105="&Инструменти" +03000106="&Помощ" +03000107="&Любими" + +; File +03000210="&Отваряне" +03000211="Отваряне &в" +03000212="Отваряне &извън" +03000220="&Показване" +03000221="&Редактиране" +03000230="Преи&менуване" +03000231="&Копиране в..." +03000232="Пре&местване в..." +03000233="Из&триване" +03000240="&Свойства" +03000241="Ком&ентар" +03000242="Изчисляване на контролна сума" +03000250="Създаване на директория" +03000251="Създаване на файл" +03000260="Из&ход" +03000270="Р&азделяне на файл..." +03000271="О&бединяване на файлове..." + +; Edit +03000310="О&тмяна" +03000311="Възвр&ъщане" +03000320="&Отрязване" +03000321="&Копиране" +03000322="&Вмъкване" +03000323="&Изтриване" +03000330="&Маркиране на всички" +03000331="&Размаркиране на всички" +03000332="&Обръщане на избора" +03000333="Маркиране..." +03000334="Размаркиране..." +03000335="Маркиране по тип" +03000336="Размаркиране по тип" + +; View +03000410="&Големи икони" +03000411="&Малки икони" +03000412="&Списък" +03000413="&Детайли" +03000420="Несортиран" +03000430="Отваряне на главната директория" +03000431="Едно ниво нагоре" +03000432="История на директориите..." +03000440="&Опресняване" +03000449="Плосък изглед" +03000450="&2 панела" +03000451="&Ленти с инструменти" +03000460="Лента на архива" +03000461="Стандартна лента" +03000462="Големи бутони" +03000463="Показване на текст под бутоните" + +; Tools +03000510="&Настройки..." +03000511="&Статистика" + +; Help +03000610="&Съдържание..." +03000620="&За 7-zip..." + +; Favorites +03000710="&Добавяне на директорията като любима:" +03000720="Отметка" + +; Options Dialog + +03010000="Настройки" + +; Plugins +03010100="Плъгини" +03010101="&Плъгини:" +03010110="Настройки..." + +; Edit +03010200="Редактор" +03010201="&Редактор:" + +; System +03010300="Система" +03010302="Асоцииране на 7-Zip с:" +03010310="Плъгин" + +; Settings +03010400="Настройки" +03010401="Показване на обекта \"..\" " +03010402="Показване на истинските икони на файловете" +03010410="Показване на системното меню" +03010420="&Избор на цял ред" +03010421="Показване на помощни &линии" +03010430="&Алтернативен режим на избор" +03010440="Използване на &големи страници от паметта" + +; Strings + +03020201="Копиране" +03020202="Преместване" +03020203="Копиране в:" +03020204="Преместване в:" +03020205="Копиране..." +03020206="Местене..." +03020207="Не могат да се местят или копират обекти от тези директории." +03020208="Операцията не се поддържа за тази директория." +03020209="Избор на целева директория." + +03020210="Потвърждение за изтриването на файл" +03020211="Потвърждение за изтриването на директория" +03020212="Потвърждение за изтриването на множество файлове" +03020213="Сигурни ли сте, че искате да изтриете '{0}'?" +03020214="Сигурни ли сте, че искате да изтриете диркеторията '{0}' с цялото й съдържание?" +03020215="Сигурни ли сте, че искате да изтриете тези {0} обекта?" +03020216="Изтриване..." +03020217="Грешка при изтриване на файл или директория" +03020218="Системата не може да изтрие файл с толкова дълъг път" + +03020220="Преименуване..." +03020221="Грешка при преименуването на файл или директория" +03020222="Потвърждение за копирането на файл" +03020223="Сигурни ли сте, че искате да копирате файлове към архива?" + +03020230="Създаване на директория" +03020231="Име на директория:" +03020232="Нова директория" +03020233="Грешка при създаване на директория" + +03020240="Създаване на файл" +03020241="Име на файл:" +03020242="Нов файл" +03020243="Грешка при създаване на файл" + +03020250="Маркиране" +03020251="Размаркиране" +03020252="Маска:" + +03020260="История на директориите" + +03020280="Файлът '{0}' е бил променен.\nИскате ли да обновите копието му в архива?" +03020281="Не може да бъде обновен файл \n'{0}'" +03020282="Не може да бъде стартиран редактора." +03020283="Отваряне..." +03020284="Файлът прилича на вирус (името му съдържа дълги поредици интервали)." + +03020290="Коментар" +03020291="&Коментар:" + +030202A0="Система" + +03020300="Компютър" +03020301="Мрежа" +03020302="Документи" + +03020400="Добавяне" +03020401="Извличане" +03020402="Тестване" + +03020420="Копиране" +03020421="Преместване" +03020422="Изтриване" +03020423="Информация" + +03020500="Разделяне на файл" +03020501="&Разделяне на:" +03020510="Разделяне..." +03020520="Потвърждение на разделянето" +03020521="Сигурни ли сте, че искате да разделите файла на {0} тома?" +03020522="Размерът на том трябва да бъде по-малък от размера на оригиналния файл" + +03020600="Обединяване на файлове" +03020601="&Обединяване в:" +03020610="Обединяване..." +03020620="Избиране само на първата част от разделения файл" +03020621="Файлът не се разпознава като част от разделен оригинален файл" +03020622="Не се открива повече от една част от разделения файл" + +03020710="Изчисляване на контролната сума..." +03020720="Информация за контролната сума" +03020721="CRC контролна сума за данни:" +03020722="CRC контролна сума за данни и имена:" + +03020800="Претърсване..." + +03020900="Свойства" + +03020A01="Операцията не може да бъде извикана от директория с толкова дълъг път." +03020A02="Трябва да се избере един файл" +03020A03="Трябва да се изберат един или повече файлове" +03020A04="Файлът {0} вече съществува" + +; Computer +03031100="Пълен размер" +03031101="Свободно пространство" +03031102="Размер на клъстер" +03031103="Етикет" + +; Network +03031200="Локално име" +03031201="Доставчик" + +; Benchmark Dialog + +03080000="Статистика" +03080001="Използвана памет:" +03080002="Архивиране" +03080003="Разархивиране" +03080004="Скорост" +03080005="Оценка" +03080006="Обща оценка" +03080007="Текущо" +03080008="Резултат" +03080009="Успешно преминали:" +0308000A="Грешки:" + +;!@LangEnd@! diff --git a/GUI/Lang/bn.txt b/GUI/Lang/bn.txt new file mode 100644 index 0000000..84ced8a --- /dev/null +++ b/GUI/Lang/bn.txt @@ -0,0 +1,497 @@ +;!@Lang@!UTF-8! +; 7-Zip 4.46 +; +; Translated by Team Oruddho +; +; web : http://www.oruddho.com +; Translator : Fahad Mohammad Shaon, Mahmud Hassan + +00000000="Bangla" +00000001="বাংলা" +00000002="69" + +; 7-Zip Configuration + +; Title +01000000="7-Zip এর পছন্দনীয়" + +; Info Page +01000100="7-Zip সম্পর্কে" +01000103="7-Zip একটি মুক্ত প্রোগ্রাম কিন্তু এটি 7-Zip এর কতৃপক্ষের কাচে নিবন্ধনের মাধ্যমে আপনি উন্নত সেবা পেতে পারেন " +01000104="সহযোগিতা" +01000105="নিবন্ধন" + +; Folders Page +01000200="ফোল্ডার" +01000210="&কার্যরত ফোল্ডার" +01000211="&অস্থায়ী ফোল্ডার" +01000212="&প্রচলিত" +01000213="&নির্দিষ্ট:" +01000214="অস্থায়ী অংশের জন্য ব্যবহার করা" + +01000281="অস্থায়ী ফোল্ডার নির্বাচন করুন।" + +; System Page +01000300="কম্পিউটার" +01000301="সাহায্যকারী তালিকায় 7-Zip সংযোজন" +01000302="সাহায্যকারী তালিকায় একের ভিতর সব গুটিয়ে ফেলা " +01000310="সাহায্যকারী তালিকার বিষয়সমূহ:" + +; Language Page +01000400="ভাষা" +01000401="ভাষা:" + + +; 7-Zip Explorer extension + +; Context menu +02000101="7-Zip" +02000102="7-Zip আদেশ" +02000103="সংকুচিত ফাইল চালু করা" +02000104="নির্বাচিত সংকুচিত ফাইলগুলো চালু করা।" +02000105="ফাইল সম্প্রসারণ..." +02000106="নির্বাচিত সংকুচিত ফাইল থেকে ফাইল সম্প্রসারণ।" +02000107="সংকুচিত ফাইলে সংযোজন..." +02000108="নির্বাচিত ফাইলগুলো সংকুচিত ফাইলে সংযোজন।" +02000109="সংকুচিত ফাইল নিরীক্ষণ" +0200010A="সংকুচিত ফাইলের যথার্থতা নিরীক্ষণ।" +0200010B="এখানেই সম্প্রসারণ" +0200010C="নির্বাচিত সংকুচিত ফাইল থেকে বর্তমান ফোল্ডারে সম্প্রসারণ।" +0200010D="সম্প্রসারণ করা হবে {0}" +0200010E="উপধারকে সম্প্রসারণ করা হবে।" +0200010F="সযোজন করা হবে {0}" +02000110="নির্বাচিত ফাইলসমূহ সংকুচিত ফাইলে সযোজন করা হবে" +02000111="সংকোচন এবং ই-মেইল..." +02000112="নির্বাচিত ফাইলগুলো সংকুচিত করা এবং সংকুচিত ফাইল ই-মেইল করা।" +02000113="সংকোচন - {0} এবং ই-মেইল " +02000114="নির্বাচিত ফাইলগুলো সংকুচিত করা এবং সংকুচিত ফাইল ই-মেইল করা।" + +02000140="<ফোল্ডার>" +02000141="<সংকুচিত ফাইল>" + +; Properties +02000203="অবস্থান" +02000204="নাম" +02000205="পরিচয়" +02000206="ফোল্ডার" +02000207="আকার" +02000208="সংকুচিত আকার" +02000209="বৈশিষ্ট" +0200020A="সৃষ্টি হয়েছে" +0200020B="ব্যবহার হয়েছে" +0200020C="পরিবর্ধন হয়েছে" +0200020D="দৃঢ়" +0200020E="Commented" +0200020F="আটকানো" +02000210="খন্ডনের পূর্বে" +02000211="খন্ডনের পরে" +02000212="অভিধান" +02000213="CRC" +02000214="ধরন" +02000215="বিরোধী" +02000216="পদ্ধতি" +02000217="চলতি অপারেটিং সিস্টেম" +02000218="ফাইল ব্যবস্থা" +02000219="ব্যবহারকারী" +0200021A="দল" +0200021B="বাধা" +0200021C="মন্তব্য" +0200021D="অবস্থান" +0200021E="পথের বিশেষায়ণ (Path Prefix)" + +; Status bar +02000301="{0} ফাইল(সমূহ) নির্বাচিত" +02000302="{0} ফাইল(সমূহ)" + +02000320="ফাইলসমূহ :" +02000321="ফোল্ডারসমূহ :" +02000322="আকার :" + +; List Context Menu +02000401="&কলাম..." + +02000411="&চালু করা" +02000412="&সম্প্রসারন..." + +; ToolBar +02000501="সম্প্রসারন" + +; Messages +02000601="এই সংকোচনের ক্ষেত্রে এই সেবা প্রদান করা সম্ভব হচ্ছে না।" +02000602="এই সংকোচনের ক্ষেত্রে পরিবর্ধন সম্ভব নয় {0}" +02000603="'{0}' ফোল্ডার সৃষ্টি করা সম্ভব হচ্ছেনা" +02000604="ফাইলটি পরিচিত সংকুচিত ফাইল নয়" +02000605="ত্রুটি" +02000606="অনেক বেশী ফাইল" +02000607="এই পরিচয় এর ফাইল গুলোর জন্য কোন নির্ধারিত চালক নেই" +02000608="কোন ত্রুটি নেই" +02000609="'{0}' -কে সংকুচিত ফাইল হিসেবে চালু করা সম্ভব হচ্ছেনা" +0200060A="'{0}' বদ্ধ সংকুচিত ফাইল চালু করা সম্ভব হচ্ছেনা. ভুল পাসওয়ার্ড?" + +; Dialogs +02000702="ঠিক আছে" +02000705="&হ্যাঁ" +02000707="&সবগুলোর জন্য হ্যাঁ" +02000709="&না" +0200070B="স&বগুলোর জন্য না" + +02000710="বাতিল" +02000711="&বাতিল" +02000713="&বন্ধ করা" +02000714="বন্ধ" +02000715="আবার শুরু" + +02000720="সাহায্য" + +; Extract dialog +02000800="সম্প্রসারণ" +02000801="&সম্প্রসারণ করা হবে:" +02000802="পাসওর্য়াড" + +02000810="ঠিকানা নির্বাচন পদ্ধতি" +02000811="পূর্ণ ঠিকানাসমূহ " +02000812="বর্তমান ঠিকানা" +02000813="ঠিকানাবিহীন" + +02000820="প্রতিস্থাপন পদ্ধতি" +02000821="প্রতিস্থাপনের পূর্বাভাস" +02000822="আভাসবিহীন প্রতিস্থাপন" +02000823="একই পরিচয় প্রাপ্ত ফাইল এড়িয়ে চলা " +02000824="স্বয়ংক্রিয় পুঃনামকরণ" +02000825="একই পরিচয় প্রাপ্ত ফাইলের নাম পরিবর্ত্ন" + +02000830="ফাইলসমূহ" +02000831="&নির্বাচিত ফাইলসমূহ" +02000832="&সব ফাইল" + +02000881="ফাইল সম্প্রসারনের ঠিকানা" + +02000890="সম্প্রসারণ করা হচ্ছে" + +; Overwrite dialog +02000900="ফাইল প্রতিস্থাপন নিশ্চিত করণ " +02000901="নির্ধারিত ফোল্ডারে ফাইলটি আগেথেকেই আছে " +02000902="আপনিকি বর্তমান ফাইলটি প্রতিস্থাপন করতে চান?" +02000903="এইটির সাথে?" + +02000911="স্বয়ংক্রিয় পুঃনামকরণ" + +02000982="{0} bytesবাইট" +02000983="পরিবর্তিত করা হয়েছে" + +; Messages dialog +02000A00="সমস্যা নিরাময় আভাস" + +02000A80="আভাস" + +02000A91="অসমর্থিত সংকোচন পদ্ধতি -'{0}'." +02000A92="'{0}' ফাইলে ত্রুটিপূর্ণ তথ্য. ফাইলটি খন্ডিত" +02000A93="'{0}' ফাইলে CRC ব্যর্থ. ফাইলটি খন্ডিত" +02000A94="'{0}' বদ্ধ ফাইলে তথ্যে ত্রুটি. ভুল পাসওয়ার্ড?" +02000A95="'{0}' বদ্ধ ফাইলে CRC ব্যর্থ. ভুল পাসওয়ার্ড?" + +; Password dialog +02000B00="পাসওয়ার্ডটি প্রবেশ করুনঃ" +02000B01="পাসওয়ার্ডটি প্রবেশ করুনঃ" +02000B02="&পাসওয়ার্ড প্রদর্শন" +02000B03="আবার পাসওয়ার্ড প্রবেশ করুনঃ" +02000B10="পাসওয়ার্ড দুটি একই নয়" +02000B11="শুধু ইংলিশ বর্ণ, সংখ্যা এবং বিশেষ বর্ণ (!, #, $, ...) পাসওয়ার্ড হিসেবে ব্যবহার করুন" +02000B12="পাসওয়ার্ডটি খুব বেশী বড় হয়েছে" + +; Progress dialog +02000C00="প্রগতি" +02000C01="অতিবাহিত সময়ঃ" +02000C02="সময় বাকি আছেঃ" +02000C03="আকার:" +02000C04="গতি:" + +02000C10="&পটভূমি" +02000C11="& সামনে" +02000C12="&বিরতি" +02000C13="&চালিয়ে যাওয়া" + +02000C20="বিরতিতে অবস্থানরত" + +02000C30="আপনি বাতিল করতে ইচ্ছুক?" + +; Compress dialog +02000D00="সংকোচনে সংযোজন" +02000D01="&সংকোচন" +02000D02="&পরিমার্জন পদ্ধতি:" +02000D03="সংকোচনের & পরিচয়:" +02000D04="সংকোচন &পদ্ধতি:" +02000D05="Create &Solid archive" +02000D06="&Parameters:" +02000D07="পছন্দনীয়" +02000D08="স্বয়ংক্রিয় সংকোচন প্রোগ্রাম তৈরি" +02000D09="বহুমূখী..." +02000D0A="ফাইলের নাম &আটকে ফেলা" +02000D0B="সংকোচনের &পর্যায়:" +02000D0C="&Dictionary size:" +02000D0D="&Word size:" +02000D0E="সংকোচনের জন্য স্মৃতির ব্যবহার:" +02000D0F="সম্প্রসারনের জন্য স্মৃতির ব্যবহার:" +02000D10="বদ্ধ করা" +02000D11="বদ্ধ করার পদ্ধতি:" +02000D12="CPU-এর thread-এর সংখ্যা:" +02000D13="Solid block size:" +02000D14="Non-solid" +02000D15="Solid" +02000D16="বিনিময়যোগ্য ফাইল সংকোচন" + +02000D40="volumes(খন্ডে), bytes(বাইটস)-এ খন্ডায়নঃ" +02000D41="খন্ডের আকারে ভুল" +02000D42="উল্লেক্ষিত খন্ডের আকার : {0} bytes.\nআপনি কি সংকোচিত ফাইলটিকে এ ভাবেই খন্ডে খন্ডায়ন করতে চান?" + +02000D81="অতি সংকোচায়ন" +02000D82="সাধারন" +02000D83="সর্ব্বোচ্চ" +02000D84="দ্রুত" +02000D85="অতি দ্রুত" +02000D86="পলকের গতি" + +02000D90="বিচরণ" + +02000DA1="সংকোচন ও ফাইল প্রতিস্থাপন" +02000DA2="পরিমার্জন ও ফাইল প্রতিস্থাপন" +02000DA3="উল্লেখিত ফাইলে সতেজতা প্রদান" +02000DA4="ফাইল সাজিয়ে রাখা" + +02000DB1="সকল ফাইল" + +02000DC0="সংকোচায়ন প্রক্রিয়াধীন" + +; Columns dialog +02000E00="পর্যায়" +02000E01="আপনি সেই সকল শ্রেণীসমূহ নির্বাচন করুন যেগুলো আপনি দেখতে চান. আপনি উপরের ও নীচের বোতামে নির্বাচনের মাধ্যমে শ্রেণীসমূহ সুসজ্জিত করতে পারেন।" +02000E02="নির্বাচিত শ্রেণীসমূহ হতে পারে ..." +02000E03="পিক্সেল বৃহদায়ন" + +02000E10="উপরে" +02000E11="নিচে" +02000E12="প্রদর্শন" +02000E13="অদৃশ্য" +02000E14="নিরধারণ" + +02000E81="শিরোনাম" +02000E82="প্রস্থ" + +; Testing +02000F90="নিরক্ষণ করছে ..." + + +; File Manager + +03000000="7-Zip ফাইল ব্যবস্থাপক" + +; Menu +03000102="&ফাইল" +03000103="&পরিবর্তন" +03000104="প্রদর্শন&" +03000105="&দরকারি" +03000106="&সহায়তা" +03000107="&প্রিয়" + +; File +03000210="&উন্মুক্ত করা" +03000211="7-zip-এ উন্মুক্ত করা" +03000212="বাহিরে উন্মুক্ত করা" +03000220="&প্রদর্শন" +03000221="&পরিবর্তন" +03000230="নাম পরিবর্তন" +03000231="&অনুলিপি হবে..." +03000232="প্রতিস্থাপন হবে..." +03000233="&মুছে ফেলা" +03000240="বৈশিষ্টাবলি" +03000241="মন্তব্য" +03000242="Checksum গননা করা" +03000250="ফোল্ডার সৃষ্টি" +03000251="ফাইল সৃষ্টি" +03000260="বাহির" +03000270="&ফাইল খন্ডায়ন..." +03000271="ফাইল সংযোজন..." + +; Edit +03000310="&ফিরিয়ে দেয়া" +03000311="ফিরিয়ে দেয়া রদ করা" +03000320="অনুলিপি গ্রহন এবং মুছে ফেলা" +03000321="অনুলিপি গ্রহন" +03000322="অনুলিপি প্রদান" +03000323="মুছে ফেলা" +03000330="সব নির্বাচন" +03000331="নির্বাচন রদ করা" +03000332="উল্টো নির্বাচন" +03000333="নির্বাচন..." +03000334="নির্বাচন রদ করা..." +03000335="ধরণ অনুযায়ী নির্বাচন" +03000336="ধরণ অনুযায়ী নির্বাচন রদ করা" + +; View +03000410="বৃহৎ প্রতিক" +03000411="ছোট্ট প্রতিক" +03000412="&তালিকা" +03000413="&বিবরণ" +03000420="অসজ্জিত" +03000430="মূল ফোল্ডার উন্মুক্ত করা" +03000431="এক পর্যায় উপরে ..." +03000432="ফোল্ডারের অতীত বিবরণ..." +03000440="&সতেজতা" +03000449="সমতল সজ্জা" +03000450="&ব্যবস্থাপক দ্বিখন্ডন" +03000451="&দরকারিখুটি" +03000460="সংকোচোন ব্যবস্থাপক খুটি" +03000461="সাধারণ খুটি" +03000462="বৃহৎ বোতাম" +03000463="বোতামের শিরোনাম প্রদর্শন" + +; Tools +03000510="&পছন্দগুলো..." +03000511="&বেঞ্চমার্ক" + +; Help +03000610="&সাহায্য..." +03000620="&7-Zip সর্ম্পকে..." + +; Favorites +03000710="&প্রিয় ফোল্ডার হিসাবে সংযোজন ..." +03000720="পছন্দের তালিকা" + +; Options Dialog + +03010000="পছন্দগুলো" + +; Plugins +03010100="সংযোজনযোগ্য প্রোগ্রাম" +03010101="&সংযোজনযোগ্য প্রোগ্রামের তালিকা : " +03010110="পছন্দগুলো..." + +; Edit +03010200="সম্পাদক" +03010201="বর্তমান সম্পাদক : " + +; System +03010300="বর্তমান অবস্থা" +03010302="7-Zip-এর সাথে সম্পর্কিত : " +03010310="সংযোজনযোগ্য প্রোগ্রাম" + +; Settings +03010400="পছন্দগুলো" +03010401="\"..\" ফাইল প্রদর্শন" +03010402="ফাইলের আসল প্রতিক দেখানো" +03010410="কম্পিউটার চালকের তালিকা দেখানো" +03010420="পূর্ণ পর্যায় প্রদর্শন" +03010421="ছকের লাইন প্রদর্শন" +03010430="পরিপূরক নিবাচনের পদ্ধতি" +03010440="বেশি স্মৃতির ব্যবহার" + +; Strings + +03020201="অনুলিপি গ্রহন" +03020202="অনুলিপি গ্রহন এবং মুছে ফেলা" +03020203="অনুলিপি করা হবে:" +03020204="প্রতিস্থাপিত হবে:" +03020205="অনুলিপি করা হচ্ছে..." +03020206="প্রতিস্থাপিত হচ্ছে..." +03020207="আপনি এই ফাইলটি উল্লেখিত ফোল্ডারে অনুলিপি করা বা প্রতিস্থাপিত করা সম্ভব নয়" +03020208="কার্যটি সম্ভব নয়" +03020209="গন্তব্য ফোল্ডার নির্বাচন." + +03020210="ফাইলটি মুছে ফেলতে কি আপনি নিশ্চিত" +03020211="ফোল্ডারটি মুছে ফেলতে কি আপনি নিশ্চিত" +03020212="ফাইলটি মুছে ফেলতে কি আপনি নিশ্চিত" +03020213="মুছে ফেলতে আপনি কি নিশ্চিত - '{0}'?" +03020214="'{0}' ফোল্ডার এবং এর সব ফাইল আপনি কি মুছে ফেলতে নিশ্চিত?" +03020215="নির্বাচিত {0} টি ফাইল আপনি কি মুছে ফেলতে নিশ্চিত?" +03020216="মুছে ফেলা হচ্ছে..." +03020217="ফাইল বা ফোল্ডার মুছে ফেলাতে সমস্যা হচ্ছে" + +03020220="নাম পরিবর্তন..." +03020221="ফাইল বা ফোল্ডারের নাম পরিবর্তনে সম্ভব নয়" +03020222="ফাইল অনুলিপি নিশ্চিতকরণ" +03020223="আপনি কি ফাইলগুলোকে সংকুচিত ফাইলে অনুলিপি গ্রহণ করতে চান।" + +03020230="ফোল্ডার সৃষ্টি" +03020231="ফোল্ডারের নাম:" +03020232="নতুন ফোল্ডার" +03020233="ফোল্ডার সৃষ্টিতে সমস্যা" + +03020240="ফাইল সৃষ্টি" +03020241="ফাইল নাম:" +03020242="নতুন ধারক" +03020243="ফাইল সৃষ্টিতে সমস্যা" + +03020250="নির্বাচন" +03020251="নির্বাচন রদ করা" +03020252="আড়াল করা:" + +03020260="ফোল্ডারের অতিত বিবরন" + +03020280="ফাইলটি '{0}' পরিমার্জিত.\nআপনি সংকুচিত ফাইলটি ও পরিমার্জন করতে চান?" +03020281="পরিমার্জন করা সম্ভব হয়নি\n'{0}'" +03020282="সম্পাদক চালু করা সম্ভব নয়" +03020283="উন্মুক্ত করা হচ্ছে..." + +03020290="মন্তব্য" +03020291="&মন্তব্য:" + +030202A0="কম্পিউটার চালক" + +03020300="কম্পিউটার" +03020301="আন্তঃ সম্পর্ক " + +03020400="সংজোযন" +03020401="সম্প্রসারন" +03020402="নিরীক্ষণ" + +03020420="অনুলিপি গ্রহন" +03020421="প্রতিস্থাপন" +03020422="মুছে ফেলা" +03020423="তথ্য" + +03020500="ফাইল খন্ডায়ন" +03020501="&ফাইল খন্ডায়িত হবে:" +03020510="ফাইল খন্ডায়ন চলছে..." +03020520="ফাইল খন্ডায়ন নিশ্চিতকরণ" +03020521="আপনি কি সংকুচিত ফাইলটিকে {0} খন্ডে খন্ডায়ন করতে চান?" +03020522="খন্ডের আকার অবশ্যই মূল ফাইলের চেয়ে ছোট হতে হবে" + +03020600="ফাইল একীভূতি করণ" +03020601="&একীভূতি করা হবে:" +03020610="একীভূতি চলছে..." +03020620="শুধু প্রথম ফাইলটি নির্বাচন করুন" + +03020710="Checksum গননা চলছে..." +03020720="Checksum তথ্য" +03020721="তথ্যের জন্য CRC checksum:" +03020722="তথ্য এবং নামের জন্য CRC checksum:" + +03020800="তথ্য সংগ্রহ চলছে... (Scanning...)" + +; Computer +03031100="সম্পূর্ণ আকার" +03031101="অবশিষ্ট জায়গা" +03031102="ক্লাস্টারের আকার" +03031103="শিরোনাম" + +; Network +03031200="স্থানীয় নাম" +03031201="বিতরণকারী" + +; Benchmark Dialog + +03080000="বেঞ্চমার্ক" +03080001="ব্যবহৃত স্মৃতি : " +03080002="সংকোচায়ন ..." +03080003="সম্প্রসারণ ..." +03080004="গতি" +03080005="রেটিং" +03080006="মোট রেটিং" +03080007="চলতি" +03080008="ফলাফল" +03080009="সফলতা :" +0308000A="বিফলতা :" +0308000B="CPU ব্যবহার করছে" +0308000C="Rating / ব্যবহার করছে" + +;!@LangEnd@! diff --git a/GUI/Lang/br.txt b/GUI/Lang/br.txt new file mode 100644 index 0000000..6d4b1d9 --- /dev/null +++ b/GUI/Lang/br.txt @@ -0,0 +1,454 @@ +;!@Lang@!UTF-8! +; 7-Zip 3.12 +; Translated by KAD-Korvigelloù An Drouizig (drouizig.org). +; +; And updated since +; +; + +00000000="Breton" +00000001="Brezhoneg" +00000002="126" + +; 7-Zip Configuration + +; Title +01000000="Kefluniañ 7-Zip" + +; Info Page +01000100="Keloù" +01000103="Digoust eo ar meziant 7-Zip. Mar plij deoc'h 7-zip ha mar fell deoc'h skoazellañ ar raktres-mañ e c'hellit donezoniñ argant da 7-Zip." +01000105="Donezoniñ" + +; Folders Page +01000200="Teulioù" +01000210="Teulioù &labour" +01000211="Teul dibadelus ar &reizhiad" +01000212="Teul &red" +01000213="Teul &spisaet :" +01000214="Implijout nemet evit ar mediaoù dilec'hus" + +01000281="Spisait un teul evit lakaat ar restroù diell dibadelus." + +; System Page +01000300="Reizhiad" +01000301="Lakaat 7-Zip el lañser kemperzhel" +01000302="Lañser kemperzhel a-steud" +01000310="Elfennoù al lañser kemperzhel :" + +; Language Page +01000400="Yezh" +01000401="Yezh :" + + +; 7-Zip Explorer extension + +; Context menu +02000101="7-Zip" +02000102="Arc'hwelioù 7-Zip" +02000103="Digeriñ" +02000104="Digeriñ an diell diuzet." +02000105="Eztennañ ar restroù..." +02000106="Eztennañ ar restroù diouzh an diell diuzet." +02000107="Ouzhpennañ d'an diell..." +02000108="Ouzhpennañ an elfennoù diuzet d'an diell." +02000109="Gwiriañ an diell" +0200010A="Gwiriañ yalc'h an diell diuzet." +0200010B="Eztennañ amañ" +0200010C="Eztennañ restroù an diell diuzet en teul red." +0200010D="Eztennañ diwar {0}" +0200010E="Eztennañ e-barzh un is-teul." +0200010F="Ouzhpennañ da {0}" +02000110="Ouzhpennañ an elfennoù diuzet d'an diell." +02000111="Gwaskañ ha kas dre postel..." +02000112="Gwaskañ an elfennoù diuzet d'an diell a kas anezhi dre postel." +02000113="Gwaskañ diwar {0} ha kas dre postel." +02000114="Gwaskañ an elfennoù diuzet d'an diell ha kas anezhi dre postel." + +02000140="" +02000141="" + +; Properties +02000203="Treug" +02000204="Anv" +02000205="Astenn" +02000206="Teul" +02000207="Ment" +02000208="Gwasket" +02000209="Doareennoù" +0200020A="Savet d'ar" +0200020B="Stoket d'ar" +0200020C="Kemmet d'ar" +0200020D="Solut" +0200020E="Evezhiadenn" +0200020F="Ennodet" +02000210="Rannañ a-raok" +02000211="Rannañ war-lerc'h" +02000212="Geriadur" +02000213="CRC" +02000214="Rizh" +02000215="Enep" +02000216="Hentenn" +02000217="OS ostiz" +02000218="Reizhiad restroù" +02000219="Implijour" +0200021A="Strollad" +0200021B="Bloc'h" +0200021C="Evezhiadenn" +0200021D="Lec'hiadur" + +; Status bar +02000301="{0} elfenn ziuzet" +02000302="{0} elfenn" + +; List Context Menu +02000401="&Bannoù..." + +02000411="&Digeriñ" +02000412="&Eztennañ..." + +; ToolBar +02000501="Eztennañ" + +; Messages +02000601="N'haller ket ober gant an oberiadennoù nevesaat evti an diell-mañ." +02000602="N'haller ket nevesaat an diell '{0}'" +02000603="N'haller ket sevel ar restr '{0}'" +02000604="N'eo ket ur restr diell reizh ar restr-mañ." +02000605="Fazi" +02000606="Re a elfennoù" +02000607="Arload ebet kenstaget gant ar rizh restr-mañ" +02000608="N'eus fazi ebet" + +; Dialogs +02000702="Mat eo" +02000705="&Ya" +02000707="Ya be&pred" +02000709="&Ket" +0200070B="Ket &bepred" + +02000710="Nullañ" +02000711="&Nullañ" +02000713="&Serriñ" +02000714="Paouez" +02000715="Adloc'hañ" + +02000720="Skoazell" + +; Extract dialog +02000800="Eztennañ" +02000801="E&ztennañ diwar :" +02000802="Ger-tremen" + +02000810="Treugoù" +02000811="Treugoù klok" +02000812="Treugoù daveel" +02000813="Treug ebet" + +02000820="Mod erlec'hiañ" +02000821="Goulenn a-raok erlec'hiañ" +02000822="Erlec'hiañ hep goulenn" +02000823="Lakaat ar restroù a zo anezho a-gostez" +02000824="Adenvel ent-emgefre" +02000824="Adenvel ent-emgefre ar restroù a zo anezho" + +02000830="Restroù" +02000831="&Restroù diuzet" +02000832="&An holl restroù" + +02000881="Dibabit un teul evit eztennañ an restroù." + +02000890="Eztennañ" + +; Overwrite dialog +02000900="Kadarnaat a-raok erlec'hiañ ur restr" +02000901="Emañ dija ur restr gant ar memes anv en teul bukenn." +02000902="Ha fellout a ra deoc'h lakaat e-lec'h" +02000903="ar restr da heul ?" + +02000911="Adenvel ent-&emgefre" + +02000982="{0} eizhtet" +02000983="kemmet d'ar" + +; Messages dialog +02000A00="Kemennoù yalc'h" + +02000A80="Kemenn" + +02000A91="Hentenn waskañ direizh evit '{0}'." +02000A92="Stlenn faziet e-barzh '{0}'. Gwastet eo ar restr." +02000A93="Fazi ar reoliñ CRC evit '{0}'. Gwastet eo ar restr." + +; Password dialog +02000B00="Roit ar ger-tremen" +02000B01="Roit ar ger-tremen :" +02000B02="&Diskouez ar ger-tremen" + +; Progress dialog +02000C00="O labourat" +02000C01="Amzer dremenet :" +02000C02="Amzer o chom :" +02000C03="Ment :" +02000C04="Tizh :" + +02000C10="&Drekleur" +02000C11="&Rakleur" +02000C12="&Ehan" +02000C13="&Kenderc'hel" + +02000C20="Ehanet" + +02000C30="Ha fellout a ra deoc'h nullañ ?" + +; Compress dialog +02000D00="Ouzhpennañ d'an diell" +02000D01="&Diell :" +02000D02="&Mod nevesaat :" +02000D03="&Mentrezh an diell :" +02000D04="Rizh &gwaskañ:" +02000D05="Sevel un diell &solut" +02000D06="&Perzhioù:" +02000D07="&Dibaboù" +02000D08="Sevel un diell SF&X" +02000D09="Lies-neudennañ" +02000D0A="Ennodiñ an &anvioù restroù" +02000D0B="L&ive gwaskañ :" +02000D0C="&Ment ar geriadur :" +02000D0D="Me&nt ar gerioù :" +02000D0E="Memor evit ar waskerezh :" +02000D0F="Memor evit an diwaskerezh :" + +02000D40="Troc'hañ e &levrennoù, eizhtetoù :" + +02000D81="Gwaskañ ebet" +02000D82="Reizh" +02000D83="Uhelañ" +02000D84="Prim" +02000D85="Primañ" +02000D86="Gour" + +02000D90="Furchal" + +02000DA1="Ouzhpennañ hag erlec'hiañ ar restroù" +02000DA2="Nevesaat hag ouzhpennañ ar restroù" +02000DA3="Freskaat ar restroù a zo anezho" +02000DA4="Goubredañ ar restroù" + +02000DB1="An holl restroù" + +02000DC0="O waskañ" + +; Columns dialog +02000E00="Bannoù" +02000E01="Merkit ar bannoù a fell deoc'h diskouez. Implijit ar meudellioù Dilec'hiañ a-us hag a-zindan evit kemmañ an urzh." +02000E02="Ret eo bezañ ar bann diuzet" +02000E03="piksel a ledander." + +02000E10="Dil. a-&us" +02000E11="Dil. a-&zindan" +02000E12="&Diskouez" +02000E13="&Kuzhat" +02000E14="Lakaat" + +02000E81="Titl" +02000E82="Ledander" + +; Testing +02000F90="Gwiriañ" + + +; File Manager + +03000000="Ardoer restroù 7-Zip" + +; Menu +03000102="&Restr" +03000103="&Aozañ" +03000104="&Gwelout" +03000105="&Ostilhoù" +03000106="&Skoazell" +03000107="Di&baboù" + +; File +03000210="&Digeriñ" +03000211="Digeriñ a-zia&barzh" +03000212="Digeriñ a-zia&vaez" +03000220="&Gwelout" +03000221="&Aozañ" +03000230="Adenv&el" +03000231="&Kopiañ diwar..." +03000232="&Dilec'hiañ diwar..." +03000233="D&ilemel" +03000240="P&erzhioù" +03000241="Evezhia&denn" +03000250="Sevel un teul" +03000251="Sevel ur restr" +03000260="&Kuitaat" +03000270="&Troc'hañ restr..." +03000271="&Kendeuziñ restroù..." + +; Edit +03000310="&Nullañ" +03000311="&Adober" +03000320="&Troc'hañ" +03000321="Ko&piañ" +03000322="P&egañ" +03000323="Di&lemel" +03000330="Diuz pep &tra" +03000331="Diziuz pe tra" +03000332="Lakaat an &diuzad war an tu gin" +03000333="Diuz..." +03000334="Diziuz..." +03000335="Diuz diouzh ar rizh" +03000336="Diziuz diouzh ar rizh" + +; View +03000410="Arlunioù &bras" +03000411="Arlunioù &bihan" +03000412="&Roll" +03000413="&Munudoù" +03000420="Dirummet" +03000430="Digeriñ an teul gwrizienn" +03000431="Teul kerent" +03000432="Roll istor an teul..." +03000440="Fresk&aat" +03000450="&2 brenestr" +03000451="&Barrennoù ostilhoù" +03000460="Barrenn ziell" +03000461="Barrenn skouerek" +03000462="Meudellioù bras" +03000463="Diskouez an destenn" + +; Tools +03000510="&Dibaboù..." +03000511="&Amprouiñ" + +; Help +03000610="&Roll ar pennadoù..." +03000620="A-&zivout 7-Zip..." + +; Favorites +03000710="&Ouzhpennañ ar c'havlec'h d'ar sinedoù" +03000720="Sined" + +; Options Dialog + +03010000="Dibaboù" + +; Plugins +03010100="Molladoù" +03010101="&Molladoù :" +03010110="Dibaboù..." + +; Edit +03010200="Embanner" +03010201="&Embanner :" + +; System +03010300="Reizhiad" +03010302="Kenstagañ 7-Zip ouzh :" +03010310="Mollad" + +; Settings +03010400="Perzhioù" +03010401="Diskouez an elfenn \"..\"" +03010402="Diskouez arlunioù gwirion ar restroù" +03010410="Diskouez al lañser reizhiad" +03010420="&Diuz ar bannoù a-bezh" +03010421="Diskouez al &linennoù kael" + +; Strings + +03020201="Kopiañ" +03020202="Dilec'hiañ" +03020203="Kopiañ e-barzh :" +03020204="Dilec'hiañ diwar :" +03020205="O kopiañ..." +03020206="O tilec'hiañ..." +03020207="N'hallit ket dilec'hiañ pe gopiañ lod a elfennoù evit ar restroù-se." +03020208="N'haller ket ober an oberiadenn-mañ." + +03020210="Kadarnañ a-raok dilemel ar restr" +03020211="Kadarnañ a-raok dilemel an teul" +03020212="Kadarnañ a-raok dilemel an holl restroù" +03020213="Ha fellout a ra deoc'h dilemel '{0}' ?" +03020214="Ha fellout a ra deoc'h dilemel an teul '{0}' ha pep tra a zo e-barzh ?" +03020215="Ha fellout a ra deoc'h dilemel ar {0} elfenn-mañ ?" +03020216="O tilemel..." +03020217="Fazo o tilemel ar restr pe an teul" + +03020220="Oc'h adenvel..." +03020221="Fazi oc'h adenvel ar restr pe an teul" + +03020230="Sevel un teul" +03020231="Anv an teul :" +03020232="Teul nevez" +03020233="Fazi o sevel an teul" + +03020240="Sevel ur restr" +03020241="Anv restr :" +03020242="Restr nevez" +03020243="Fazi o sevel ar restr" + +03020250="Diuz" +03020251="Diziuz" +03020252="Kuzh :" + +03020260="Roll istor an teulioù" + +03020280="Kemmet ez eo bet ar restr '{0}'.\nHa fellout a ra deoc'h he nevesaat en diell ?" +03020281="N'haller ket nevesaat\n'{0}'" +03020282="N'haller ket loc'hañ an embanner." +03020283="O tigeriñ..." + +03020290="Evezhiadenn" +03020291="&Evezhiadenn :" + +030202A0="Reizhiad" + +03020300="Urzhiataer" +03020301="Rouedad" + +03020400="Ouzhpennañ" +03020401="Eztennañ" +03020402="Amprouiñ" + +03020420="Kopiañ" +03020421="Dilec'hiañ" +03020422="Dilemel" +03020423="Keloù" + +03020500="Troc'hañ restr" +03020501="&Troc'hañ da :" +03020510="O troc'hañ..." + +03020600="Kendeuziñ restroù" +03020601="&Kendeuziñ da :" +03020610="O kendeuziñ..." + +; Computer +03031100="Ment en holl" +03031101="Egor vak" +03031102="Ment ar c'hleusteurioù" +03031103="Skritellig" + +; Network +03031200="Anv lec'hel" +03031201="Pourchaser" + +; Benchmark Dialog + +03080000="Amprouiñ" +03080001="Implij ar vemor :" +03080002="Gwaskerezh" +03080003="Diwaskerezh" +03080004="Tizh" +03080005="Feur" +03080006="Feur en holl" +03080007="Red" +03080008="Da heul" +03080009="Tremenioù :" +0308000A="Fazioù :" + +;!@LangEnd@! diff --git a/GUI/Lang/ca.txt b/GUI/Lang/ca.txt new file mode 100644 index 0000000..d45ff98 --- /dev/null +++ b/GUI/Lang/ca.txt @@ -0,0 +1,543 @@ +;!@Lang@!UTF-8! +; 7-Zip 9.07 +; Translated by Josep Casals and Marc Folch +; +; +; +; + +00000000="Catalan" +00000001="Català" +00000002="3" + +; 7-Zip Configuration + +; Title +01000000="Configuració de 7-Zip" + +; Info Page +01000100="Informació sobre 7-Zip" +01000103="7-Zip és programari lliure. De totes maneres, podeu col.laborar en el seu desenvolupament registrant el programa." +01000104="Suport" +01000105="Registra" + +; Folders Page +01000200="Carpetes" +01000210="Carpeta de &treball" +01000211="Carpeta temporal del &sistema" +01000212="Carpeta a&ctual" +01000213="E&specifica una carpeta:" +01000214="Utilitza únicament per a discs extraïbles" + +01000281="Especifica una carpeta pels fitxers temporals." + +; System Page +01000300="Sistema" +01000301="Integra 7-Zip dins el menú contextual de Windows" +01000302="Menú contextual en cascada" +01000310="Objectes del menú contextual:" + +; Language Page +01000400="Llengua" +01000401="Llengua:" + + +; 7-Zip Explorer extension + +; Context menu +02000101="7-Zip" +02000102="7-Zip comandes" +02000103="Obre" +02000104="Obre el fitxer seleccionat." +02000105="Extreu fitxers..." +02000106="Extreu els fitxers de el fitxer seleccionat." +02000107="Afegeix al fitxer..." +02000108="Afegeix els fitxers seleccionats a l'arxiu." +02000109="Comprova el fitxer" +0200010A="Comprova la integritat del fitxer seleccionat." +0200010B="Extreu a aquesta carpeta" +0200010C="Extreu els fitxers de l'arxiu escollit al directori actual." +0200010D="Extreu a {0}" +0200010E="Extreu fitxers a la subcarpeta." +0200010F="Afegeix a {0}" +02000110="Afegeix els fitxers escollits a l'arxiu." +02000111="Comprimeix i envia per correu electrònic..." +02000112="Comprimeix els objectes escollits al fitxer i envia'l per correu electrònic." +02000113="Comprimeix a {0} i envia per correu electrònic" +02000114="Comprimeix els objectes escollits al fitxer i envia'l per correu electrònic.." + +02000140="" +02000141="" + +; Properties +02000203="Adreça" +02000204="Nom" +02000205="Tipus de fitxer" +02000206="Carpeta" +02000207="Mida" +02000208="Mida comprimit" +02000209="Atributs" +0200020A="Creat" +0200020B="Darrer accés" +0200020C="Darrera modificació" +0200020D="Compacte" +0200020E="Comentari" +0200020F="Xifrat" +02000210="Expandit abans" +02000211="Expandit després" +02000212="Diccionari" +02000213="CRC" +02000214="Tipus" +02000215="Anti" +02000216="Mètode" +02000217="SO orígen" +02000218="Sistema de fitxers" +02000219="Usuari" +0200021A="Grup" +0200021B="Bloc" +0200021C="Comentari" +0200021D="Posició" +0200021E="Path Prefix" +0200021F="Carpetes" +02000220="Fitxers" +02000221="Versió" +02000222="Volum" +02000223="Multivolum" +02000224="Desplaçament" +02000225="Enllaços" +02000226="Blocs" +02000227="Volums" + +02000229="64-bits" +0200022A="Big-endian" +0200022B="CPU" +0200022C="Mida física" +0200022D="Mida capçaleres" +0200022E="Suma de verificació" +0200022F="Característiques" +02000230="Adreça virtual" +02000231="ID" +02000232="Nom curt" +02000233="Aplicació creadora" +02000234="Mida del sector" +02000235="Mode" +02000236="Enllaç" + +; Status bar +02000301="{0} objecte(s) seleccionat(s)" +02000302="{0} objecte(s)" + +02000320="Fitxers:" +02000321="Carpetes:" +02000322="Mida:" +02000323="Mida comprimit:" +02000324="Arxius:" + +; List Context Menu +02000401="&Columnes..." + +02000411="&Obre" +02000412="&Extreu..." + +; ToolBar +02000501="Extreure" + +; Messages +02000601="Aquest tipus de fitxer no permet actualització." +02000602="No es pot actualitzar el fitxer {0}" +02000603="No es pot crear la carpeta '{0}'" +02000604="Tipus de fitxer desconegut." +02000605="Error" +02000606="Massa objectes" +02000607="No hi ha cap programa associat amb aquest tipus de fitxer" +02000608="No hi ha errors" +02000609="No es pot obrir el fitxe '{0}' com a arxiu" +0200060A="No es pot obrir el fitxer xifrat '{0}'. La contrasenya és incorrecta?" +0200060B="El sistema no pot assignar la quantitat de memòria requerida" +0200060C="Error desconegut" +0200060D="Tipus d'arxiu no admès" + +; Dialogs +02000702="D'acord" +02000705="&Sí" +02000707="Sí a &tot" +02000709="&No" +0200070B="No a t&ot" + +02000710="Cancel.la" +02000711="&Cancel.la" +02000713="Tan&ca" +02000714="Atura" +02000715="Reinicia" + +02000720="Ajuda" + +; Extract dialog +02000800="Extreu" +02000801="E&xtreu a:" +02000802="Contrasenya" + +02000810="Mode d'adreça" +02000811="Adreça completa" +02000812="Adreça actual" +02000813="Sense adreça" + +02000820="Sobreescriure" +02000821="Amb confirmació" +02000822="Sense confirmació" +02000823="Conserva els fitxers ja existents" +02000824="Reanomena automàticament" +02000825="Auto-reanomena fitxers existents" + +02000830="Fitxers" +02000831="Fitxers &seleccionats" +02000832="Tots els fitxers" + +02000881="Seleccioneu una destinació pels fitxers extrets." + +02000890="Extraient" + +; Overwrite dialog +02000900="Confirmeu substitució de fitxers" +02000901="La carpeta de destí conté un fitxer amb el mateix nom." +02000902="Voleu substituir el fitxer existent" +02000903="per aquest altre?" + +02000911="Renomena a&utomàticament" + +02000982="{0} bytes" +02000983="modificat el" + +; Messages dialog +02000A00="Missatges de diagnosi" + +02000A80="Missatge" + +02000A91="Mètode de compressió no vàlid per a '{0}'." +02000A92="Error de dades en '{0}'. El fitxer és corrupte." +02000A93="CRC ha fallat en '{0}'. El fitxer és corrupte." +02000A94="Error de dades al fitxer xifrat '{0}'. Contrasenya errònia?" +02000A95="CRC ha fallat al fitxer xifrat '{0}'. Contrasenya errònia?" + +; Password dialog +02000B00="Introduïu la contrasenya" +02000B01="Introduïu la contrasenya:" +02000B02="Mo&stra la contrasenya" +02000B03="Torneu a introduir la contrasenya:" +02000B10="Les contrasenyes no coincideixen" +02000B11="Utilitza només lletres (sense accents), números i caràcters especials (!, #, $, ...) a la contrasenya" +02000B12="La contrasenya és massa llarga" + +; Progress dialog +02000C00="Procés" +02000C01="Temps transcorregut:" +02000C02="Temps restant:" +02000C03="Mida:" +02000C04="Taxa:" +02000C05="Processat:" +02000C06="Ràtio de compressió:" + +02000C10="Rerefons" +02000C11="Primer pla" +02000C12="&Pausa" +02000C13="&Continua" + +02000C20="Aturat" + +02000C30="Esteu segur que voleu cancel.lar?" + +; Compress dialog +02000D00="Afegir al fitxer" +02000D01="&Fitxer:" +02000D02="Mode d'act&ualització:" +02000D03="&Format del fitxer:" +02000D04="&Tipus de compressió:" +02000D05="Crea fitxer compacte" +02000D06="&Paràmetres:" +02000D07="Opcions" +02000D08="Crea fitxer SF&X" +02000D09="Multi-threading" +02000D0A="Xifra el nom dels fitxers" +02000D0B="Nivell de &compressió:" +02000D0C="Mida del &diccionari:" +02000D0D="Mida de la paraula:" +02000D0E="Ús de memòria per comprimir:" +02000D0F="Ús de memòria per descomprimir:" +02000D10="Xifrat" +02000D11="Mètode de xifrat:" +02000D12="Nombre de fils de la CPU:" +02000D13="Mida de bloc sòlid:" +02000D14="No sòlid" +02000D15="Sòlid" +02000D16="Comprimeix fitxers compartits" + +02000D40="Divideix en &volums, bytes:" +02000D41="Mida del volum incorrecte" +02000D42="Mida de volum especificada: {0} bytes.\nEsteu segur que voleu dividir el fitxer en aquests volums?" + +02000D81="Sense compressió" +02000D82="Normal" +02000D83="Màxima" +02000D85="Ràpida" +02000D85="La més ràpida" +02000D86="Ultra" + +02000D90="Visualitza" + +02000DA1="Afegeix i substitueix fitxers" +02000DA2="Actualitza i afegeix fitxers" +02000DA3="Actualitza fitxers ja presents" +02000DA4="Sincronitza fitxers" + +02000DB1="Tots els fitxers" + +02000DC0="Comprimint" + +; Columns dialog +02000E00="Columnes" +02000E01="Seleccioneu les columnes que voleu que siguin visibles en aquest mode. Feu servir les tecles AvPg i RePg per a organitzar les columnes." +02000E02="La columna escollida ha de tenir" +02000E03="pixels d'amplària." + +02000E10="Mou cap am&unt" +02000E11="Mou cap avall" +02000E12="Mo&stra" +02000E13="Amaga" +02000E14="Fixa" + +02000E81="Títol" +02000E82="Ample" + +; Testing +02000F90="Provant" + + +; File Manager + +03000000="Gestor de Fitxers 7-Zip" + +; Menu +03000102="&Fitxer" +03000103="&Edita" +03000104="&Visualitza" +03000105="E&ines" +03000106="Aj&uda" +03000107="&Preferits" + +; File +03000210="&Obre" +03000211="Obre d&ins" +03000212="Obre fora" +03000220="&Visualitza" +03000221="&Edita" +03000230="Renom&ena" +03000231="&Copia a..." +03000232="&Moure a..." +03000233="Suprimeix" +03000240="P&ropietats" +03000241="Come&ntari" +03000242="Calcula el checksum" +03000243="Diff" +03000250="Crea carpeta" +03000251="Crea fitxer" +03000260="Surt" +03000270="&Divideix el fitxer..." +03000271="Com&bina el fitxer..." + +; Edit +03000310="Desfés" +03000311="&Refés" +03000320="Re&talla" +03000321="&Copia" +03000322="Enganxa" +03000323="&Suprimeix" +03000330="Seleccion&a-ho tot" +03000331="Deselecciona-ho tot" +03000332="&Inverteix selecció" +03000333="Selecciona..." +03000334="Deselecciona..." +03000335="Selecciona per tipus" +03000336="Deselecciona per tipus" + +; View +03000410="Icones g&rans" +03000411="Icones petites" +03000412="&Llista" +03000413="&Detalls" +03000420="No ordenat" +03000430="Obre carpeta arrel" +03000431="Carpeta pare" +03000432="Historial de carpetes..." +03000440="&Actualitza" +03000449="Vista plana" +03000450="&2 Taules" +03000451="&Barres d'eines" +03000460="Barra d'eines afegeix/extreu" +03000461="Barra d'eines estàndard" +03000462="Botons grans" +03000463="Mostra botons amb text" + +; Tools +03000510="Opcions..." +03000511="&Test de referència" + +; Help +03000610="&Contingut..." +03000620="Quant a 7-Zip..." + +; Favorites +03000710="&Afegeix la carpeta als Preferits com" +03000720="Personal" + +; Options Dialog + +03010000="Opcions" + +; Plugins +03010100="Connectors" +03010101="&Connectors:" +03010110="Opcions..." + +; Edit +03010200="Editor" +03010201="&Editor:" +03010202="&Diff:" + +; System +03010300="Sistema" +03010302="Associa 7-Zip amb:" +03010310="Connector" + +; Settings +03010400="Selecció" +03010401="Mostra l'element \"..\"" +03010402="Mostra icones reals dels fitxers" +03010410="Mostra el menú de sistema" +03010420="&Selecció de columna completa" +03010421="Mostra les línies de &graella" +03010422="Obre amb un sol clic els elements" +03010430="Mode de selecció &alternatiu" +03010440="Usa pàgines de memòria &grans" + +; Strings + +03020201="Copia" +03020202="Mou" +03020203="Copia a:" +03020204="Mou a:" +03020205="Copiant..." +03020206="Movent..." +03020207="No es poden moure o copiar elements d'aquest tipus de carpetes." +03020208="Operació no permesa." +03020209="Seleccioneu una carpeta de destí." + +03020210="Confirmeu la supressió del fitxer" +03020211="Confirmeu la supressió de la carpeta" +03020212="Confirmeu supressió múltiple de fitxers" +03020213="Esteu segur que voleu suprimir '{0}'?" +03020214="Esteu segur que voleu suprimir la carpeta '{0}' i tot el seu contingut?" +03020215="Esteu segur que voleu esborrar aquests {0} elements?" +03020216="Suprimint..." +03020217="Error esborrant fitxer o carpeta" +03020218="El sistema no pot moure un fitxer amb una ruta llarga a la paperea de reciclatge" + +03020220="Renomenant..." +03020221="Error renomenant fitxer o carpeta" +03020222="Confirmeu la còpia del fitxer" +03020223="Esteu segur que voleu copiar els fitxers a l'arxiu" + +03020230="Crea carpeta" +03020231="Nom de carpeta:" +03020232="Carpeta nova" +03020233="Error creant carpeta" + +03020240="Crea arxiu" +03020241="Nom d'arxiu:" +03020242="Fitxer nou" +03020243="Error creant el fitxer" + +03020250="Selecciona" +03020251="No selecciona" +03020252="Màscara:" + +03020260="Historial de carpetes" + +03020280="El fitxer '{0}' ha estat modificat.\nVoleu actualitzar-lo a l'arxiu?" +03020281="No pot actualitzar-se el fitxer\n'{0}'" +03020282="No pot executar-se l'editor." +03020283="Obrint..." +03020284="El fitxer sembla un virus (el nom del fitxer conté espais molt llargs al nom)." + +03020290="Comentari" +03020291="&Comentari:" + +030202A0="Sistema" + +03020300="El meu ordinador" +03020301="Entorn de xarxa" +03020302="Documents" + +03020400="Afegeix" +03020401="Extreu" +03020402="Prova" + +03020420="Copia" +03020421="Mou" +03020422="Suprimeix" +03020423="Info" + +03020500="Divideix fitxer" +03020501="&Divideix a:" +03020510="Dividint..." +03020520="Confirmació de la divisió" +03020521="Esteu segur que voleu dividir el fitxer en {0} volums?" +03020522="La mida del volum ha de ser més petita que la mida del fitxer original" + +03020600="Combina fitxers" +03020601="&Combina a:" +03020610="Combinant..." +03020620="Seleccioneu només el primer fitxer" +03020621="No es pot detectar un fitxer com a una part del fitxer dividit" +03020622="No es pot trobar més d'una part del fitxer dividit" + +03020710="Calculant el checksum..." +03020720="Informació del checksum" +03020721="CRC checksum per les dades:" +03020722="CRC checksum per les dades i els noms:" + +03020800="Scanning..." + +03020900="Properties" + +03020A01="L'operació no es pot cridar des d'una carpeta amb una ruta llarga." +03020A02="Heu de seleccionar un fitxer" +03020A03="Heu de seleccionar un o més fitxers" +03020A04="El fitxer {0} ja existeix" + +; Computer +03031100="Mida total" +03031101="Espai lliure" +03031102="Mida sector" +03031103="Etiqueta" + +; Network +03031200="Nom local" +03031201="Proveïdor" + +; Benchmark Dialog + +03080000="Test de referència" +03080001="Ús de la memòria:" +03080002="Comprimint" +03080003="Decomprimint" +03080004="Velocitat" +03080005="Taxa" +03080006="Taxa total" +03080007="Actual" +03080008="Resultant" +03080009="Passades:" +0308000A="Errors:" +0308000B="Ús de la CPU" +0308000C="Taxa / Ús" + +;!@LangEnd@! diff --git a/GUI/Lang/cs.txt b/GUI/Lang/cs.txt new file mode 100644 index 0000000..4af1757 --- /dev/null +++ b/GUI/Lang/cs.txt @@ -0,0 +1,545 @@ +;!@Lang@!UTF-8! +; 7-Zip 4.30 +; Translated by Milan Hrubý +; Updated for 4.33 version by Michal Molhanec +; 7-Zip 4.57 updated by Jiří Malák +; 7-Zip 9.07 updated by Jiří Malák +; + +00000000="Czech" +00000001="Čeština" +00000002="5" + +; 7-Zip Configuration + +; Title +01000000="7-Zip konfigurace" + +; Info Page +01000100="O programu 7-Zip" +01000103="7-Zip je svobodný software. Nicméně můžete podpořit jeho vývoj registrací." +01000104="Podpora" +01000105="Registrovat" + +; Folders Page +01000200="Složky" +01000210="Pracovní složka" +01000211="&Systémová složka pro dočasné soubory" +01000212="&Aktuální" +01000213="S&ložka:" +01000214="&Používat pouze pro vyjímatelné disky" + +01000281="Vyberte umístění pro dočasné komprimované soubory." + +; System Page +01000300="Systém" +01000301="&Integrovat 7-Zip do kontextového menu" +01000302="S&tupňovité kontextové menu" +01000310="&Položky kontextového menu:" + +; Language Page +01000400="Jazyk" +01000401="Jazyk:" + + +; 7-Zip Explorer extension + +; Context menu +02000101="7-Zip" +02000102="7-Zip příkazy" +02000103="Otevřít" +02000104="Otevře vybraný archiv." +02000105="Rozbalit soubory..." +02000106="Rozbalí soubory z vybraného archivu." +02000107="Přidat do archivu..." +02000108="Přidá vybrané položky do archivu." +02000109="Zkontrolovat archiv" +0200010A="Zkontroluje integritu vybraného archivu." +0200010B="Rozbalit zde" +0200010C="Rozbalí soubory z vybraného archivu do aktuální složky." +0200010D="Rozbalit do {0}" +0200010E="Rozbalí soubory do podsložky." +0200010F="Přidat do {0}" +02000110="Přidá vybrané položky do archivu." +02000111="Zkomprimovat a odeslat poštou..." +02000112="Zkomprimuje vybrané položky do archivu a odešle archiv poštou." +02000113="Zkomprimovat do {0} a odeslat poštou" +02000114="Zkomprimuje vybrané položky do archivu a odešle archiv poštou." + +02000140="" +02000141="" + +; Properties +02000203="Cesta" +02000204="Název" +02000205="Přípona" +02000206="Složka" +02000207="Velikost" +02000208="Komprimovaná velikost" +02000209="Atributy" +0200020A="Vytvořen" +0200020B="Použit" +0200020C="Změněn" +0200020D="Pevný" +0200020E="S poznámkou" +0200020F="Zakódovaný" +02000210="Rozdělen do" +02000211="Rozdělen od" +02000212="Slovník" +02000213="CRC" +02000214="Typ" +02000215="Anti" +02000216="Metoda" +02000217="Hostitelský OS" +02000218="Souborový systém" +02000219="Uživatel" +0200021A="Skupina" +0200021B="Blok" +0200021C="Poznámka" +0200021D="Pozice" +0200021E="Cesta" +0200021F="Složky" +02000220="Soubory" +02000221="Verze" +02000222="Díl" +02000223="Vícedílný" +02000224="Offset" +02000225="Odkazy" +02000226="Bloků" +02000227="Dílů" + +02000229="64-bit" +0200022A="Big-endian" +0200022B="Pocesor" +0200022C="Fyzická velikost" +0200022D="Velikost hlaviček" +0200022E="Kontrolní součet" +0200022F="Charakteristiky" +02000230="Virtuální adresa" +02000231="ID" +02000232="Krátké jméno" +02000233="Autor" +02000234="Velikost sektoru" +02000235="Režim" +02000236="Odkaz" + +; Status bar +02000301="vybráno {0} objekt(ů)" +02000302="{0} objekt(ů)" + +02000320="Soubory:" +02000321="Složky:" +02000322="Velikost:" +02000323="Komprimovaná velikost:" +02000324="Archívy:" + +; List Context Menu +02000401="&Sloupce..." + +02000411="&Otevřít" +02000412="&Rozbalit..." + +; ToolBar +02000501="Rozbalit" + +; Messages +02000601="Aktualizace není podporována pro tento archiv." +02000602="Nelze aktualizovat archiv {0}" +02000603="Nelze vytvořit složku '{0}'" +02000604="Soubor není podporovaným archivem." +02000605="Chyba" +02000606="Příliš mnoho položek" +02000607="Žádná aplikace není asociována s touto příponou souboru" +02000608="Nedošlo k žádným chybám" +02000609="Soubor '{0}' nelze otevřít jako archiv" +0200060A="Zakódovaný archiv '{0}' nelze otevřít. Špatné heslo?" +0200060B="Systém nemůže přidělit požadovanou velikost paměti" +0200060C="Neznámá chyba" +0200060D="Nepodporovaný typ archivu" + +; Dialogs +02000702="OK" +02000705="&Ano" +02000707="Ano na &všechno" +02000709="&Ne" +0200070B="N&e na všechno" + +02000710="Storno" +02000711="&Storno" +02000713="Zavří&t" +02000714="Zastavit" +02000715="Spustit znovu" + +02000720="Nápověda" + +; Extract dialog +02000800="Rozbalit" +02000801="&Rozbalit do:" +02000802="Heslo" + +02000810="Cesty" +02000811="Plné cesty" +02000812="Aktuální cesty" +02000813="Bez cesty" + +02000820="Způsob přepisování" +02000821="Zeptat se před přepisem" +02000822="Přepsat bez výzvy" +02000823="Přeskočit existující soubory" +02000824="Automatické přejmenování" +02000825="Automatické přejmenování existujících souborů" + +02000830="Soubory" +02000831="&Vybrané soubory" +02000832="Všechny &soubory" + +02000881="Vyberte umístění pro rozbalené soubory." + +02000890="Rozbalování" + +; Overwrite dialog +02000900="Potvrzení nahrazení souboru" +02000901="Cílová složka již obsahuje zpracovaný soubor." +02000902="Chcete nahradit existující soubor" +02000903="tímto?" + +02000911="A&utomaticky přejmenovat" + +02000982="{0} bajtů" +02000983="změněn" + +; Messages dialog +02000A00="Diagnostické zprávy" + +02000A80="Zpráva" + +02000A91="Nepodporovaná komprimační metoda pro '{0}'." +02000A92="Chyba dat v '{0}'. Soubor je poškozený." +02000A93="Chyba CRC v '{0}'. Soubor je poškozený." +02000A94="Chyba dat v zakódovaném souboru '{0}'. Chybné heslo?" +02000A95="Chyba CRC v zakódovaném souboru '{0}'. Chybné heslo?" + +; Password dialog +02000B00="Vložit heslo" +02000B01="Vložit heslo:" +02000B02="Zobrazit he&slo" +02000B03="Potvrzení hesla:" +02000B10="Heslo nesouhlasí" +02000B11="Pro heslo použíjte pouze anglická písmena, číslice a speciální znaky (!, #, $, ...)" +02000B12="Heslo je příliš dlouhé" + +; Progress dialog +02000C00="Průběh" +02000C01="Uplynulý čas:" +02000C02="Zbývající čas:" +02000C03="Celková velikost:" +02000C04="Rychlost:" +02000C05="Zpracováno:" +02000C06="Komprimační poměr:" + +02000C10="&Pozadí" +02000C11="P&opředí" +02000C12="Po&zastavit" +02000C13="Po&kračovat" + +02000C20="Pozastaveno" + +02000C30="Jste si jistí, že to chcete stornovat?" + +; Compress dialog +02000D00="Přidat do archivu" +02000D01="&Archiv:" +02000D02="Způsob aktualizace:" +02000D03="&Formát archivu:" +02000D04="&Komprimační metoda:" +02000D05="&Vytvořit pevný archiv" +02000D06="&Parametry:" +02000D07="Možnosti" +02000D08="Vytvořit SF&X archiv" +02000D09="Více-vláknový" +02000D0A="Zakódovat &názvy souborů" +02000D0B="Ú&roveň komprese:" +02000D0C="Ve&likost slovníku:" +02000D0D="V&elikost slova:" +02000D0E="Spotřeba paměti pro zabalení:" +02000D0F="Spotřeba paměti pro rozbalení:" +02000D10="Zakódování" +02000D11="Metoda zakódování:" +02000D12="Počet vláken procesoru:" +02000D13="Velikost bloku:" +02000D14="Podle velikosti souboru" +02000D15="Pevný" +02000D16="Zkomprimovat otevřené soubory" + +02000D40="Rozdělit na díly, bajtů:" +02000D41="Nesprávná velikost dílu" +02000D42="Zadaná velikost dílu: {0} bytů.\nJste si jistí, že chcete rozdělit archiv do takových dílů?" + +02000D81="Skladovací" +02000D82="Normální" +02000D83="Maximální" +02000D84="Rychlá" +02000D85="Nejrychlejší" +02000D86="Ultra" + +02000D90="Procházet" + +02000DA1="Přidat a nahradit soubory" +02000DA2="Aktualizovat a přidat soubory" +02000DA3="Aktualizovat existující soubory" +02000DA4="Synchronizovat soubory" + +02000DB1="Všechny soubory" + +02000DC0="Komprimování" + +; Columns dialog +02000E00="Sloupce" +02000E01="Zaškrtněte sloupce, které byste rádi zviditelnili v této složce. Použijte tlačítka Posunout nahoru a Posunout dolů pro uspořádání sloupců." +02000E02="Vybraný sloupec by měl být" +02000E03="pixelů šir&oký." + +02000E10="Posunout &nahoru" +02000E11="Posunout &dolů" +02000E12="&Ukázat" +02000E13="&Skrýt" +02000E14="Nastavit" + +02000E81="Název" +02000E82="Šířka" + +; Testing +02000F90="Konrola" + + +; File Manager + +03000000="7-Zip správce souborů" + +; Menu +03000102="&Soubor" +03000103="Úpr&avy" +03000104="&Zobrazení" +03000105="&Nástroje" +03000106="Nápo&věda" +03000107="&Oblíbené" + +; File +03000210="&Otevřít" +03000211="Otevřít u&vnitř" +03000212="Otevřít &mimo" +03000220="&Zobrazit" +03000221="&Upravit" +03000230="&Přejmenovat" +03000231="Kopírovat &do..." +03000232="Př&esunout do..." +03000233="Vymaza&t" +03000240="Vlast&nosti" +03000241="Poznámk&a" +03000242="Vypočítat kontrolní součet" +03000243="Porovnat soubory" +03000250="Vytvořit složku" +03000251="Vytvořit soubor" +03000260="&Konec" +03000270="&Rozdělit soubor..." +03000271="&Sloučit soubory..." + +; Edit +03000310="&Zpět" +03000311="&Opakovat" +03000320="Vyjmou&t" +03000321="&Kopírovat" +03000322="&Vložit" +03000323="Vym&azat" +03000330="Vybrat &vše" +03000331="Zrušit výběr vše" +03000332="&Invertovat výběr" +03000333="Vybrat..." +03000334="Zrušit výběr..." +03000335="Vybrat podle typu" +03000336="Zrušit výběr podle typu" + +; View +03000410="&Velké ikony" +03000411="&Malé ikony" +03000412="&Seznam" +03000413="&Podrobnosti" +03000420="&Bez třídění" +03000430="Otevřít kořenovou složku" +03000431="O úroveň výš" +03000432="Historie složek..." +03000440="&Obnovit" +03000449="\"Ploché\" zobrazení" +03000450="&2 panely" +03000451="Nástrojové lišty" +03000460="Archivační lišta" +03000461="Standardní lišta" +03000462="Velká tlačítka" +03000463="Zobrazovat text tlačítek" + +; Tools +03000510="&Možnosti..." +03000511="&Zkouška výkonu" + +; Help +03000610="&Obsah..." +03000620="O progr&amu 7-Zip..." + +; Favorites +03000710="&Přidat složku do oblíbených jako" +03000720="Záložka" + +; Options Dialog + +03010000="Možnosti" + +; Plugins +03010100="Pluginy" +03010101="&Pluginy:" +03010110="Možnosti..." + +; Edit +03010200="Editor" +03010201="&Editor:" +03010202="Program pro &porovnání souborů:" + +; System +03010300="Systém" +03010302="Asociovat 7-Zip s:" +03010310="Plugin" + +; Settings +03010400="Nastavení" +03010401="Zobrazovat položku \"..\"" +03010402="Zobrazovat skutečnou ikonu souboru" +03010410="Zobrazovat systémové menu" +03010420="&Vybírat celý řádek" +03010421="Zobrazovat &mřížku" +03010422="Otevřít položku jedním kliknutím" +03010430="&Alternativní způsob výběru" +03010440="&Používat velké stránky paměti" + +; Strings + +03020201="Kopírovat" +03020202="Přesunout" +03020203="Kopírovat do:" +03020204="Přesunout do:" +03020205="Kopírování..." +03020206="Přesouvání..." +03020207="Nemůžete přesunout nebo kopírovat položky do této složky." +03020208="Operace není podporována." +03020209="Vyberte cílovou složku." + +03020210="Potvrdit vymazání souboru" +03020211="Potvrdit vymazání složky" +03020212="Potvrdit mnohonásobné vymazání souboru" +03020213="Jste si jistí, že chcete vymazat '{0}'?" +03020214="Jste si jistí, že chcete vymazat složku '{0}' a všechno co obsahuje?" +03020215="Jste si jistí, že chcete vymazat tyto {0} položky?" +03020216="Mazání..." +03020217="Chyba při mazání souboru nebo složky" +03020218="Systém nepodporuje přesun soubor s dlouhou cestou do Odpadkového koše" + +03020220="Přejmenování..." +03020221="Chyba při přejmenování souboru nebo složky" +03020222="Potvrzení kopírování souborů" +03020223="Jste si jistí, že chcete zkopírovat soubory do archivu" + +03020230="Vytvořit složku" +03020231="Název složky:" +03020232="Nová složka" +03020233="Chyba při vytváření složky" + +03020240="Vytvořit soubor" +03020241="Název souboru:" +03020242="Nový soubor" +03020243="Chyba při vytváření souboru" + +03020250="Vybrat" +03020251="Zrušit výběr" +03020252="Maska:" + +03020260="Historie složek" + +03020280="Soubor '{0}' byl změněn.\nChcete ho aktualizovat v archivu?" +03020281="Nelze aktualizovat soubor\n'{0}'" +03020282="Editor nelze spustit." +03020283="Otevírání..." +03020284="Soubor se jeví jako virus (ve jménu souboru jsou dlouhé mezery)." + +03020290="Poznámka" +03020291="&Poznámka:" + +030202A0="Systém" + +03020300="Počítač" +03020301="Síť" +03020302="Dokumenty" + +03020400="Přidat" +03020401="Rozbalit" +03020402="Zkontrolovat" + +03020420="Kopírovat" +03020421="Přesunout" +03020422="Vymazat" +03020423="Informace" + +03020500="Rozdělit soubor" +03020501="Rozdělit do:" +03020510="Rozdělování..." +03020520="Potvrdit rozdělování" +03020521="Jste si jistí, že chcete rozdělit soubor na {0} dílů?" +03020522="Velikost dílu musí být menší než velikost původního souboru" + +03020600="Sloučit soubory" +03020601="Sloučit do:" +03020610="Slučování..." +03020620="Musí se vybrat pouze první díl rozděleného soubor" +03020621="Nepodařilo se rozpoznat rozdělený soubor" +03020622="Nepodařilo se nalézt více než jeden díl rozděleného souboru" + +03020710="Vypočítávání kontrolního součtu..." +03020720="Informace o kontrolním součtu" +03020721="CRC kontrolní součet pro data:" +03020722="CRC kontrolní součet pro data a jména:" + +03020800="Prohledávání..." + +03020900="Vlastnosti" + +03020A01="Operace nemůže být provedena ze složky s dlouhou cestou." +03020A02="Musíte vybrat jeden soubor" +03020A03="Musíte vybrat jeden nebo více souborů" +03020A04="Soubor {0} již existuje" + +; Computer +03031100="Celková velikost" +03031101="Volné místo" +03031102="Velikost clusteru" +03031103="Označení" + +; Network +03031200="Místní název" +03031201="Poskytovatel" + +; Benchmark Dialog + +03080000="Zkouška výkonu" +03080001="Spotřeba paměti:" +03080002="Komprimování" +03080003="Rozbalování" +03080004="Rychlost" +03080005="Výkon" +03080006="Celkový výkon" +03080007="Aktuální" +03080008="Výsledné" +03080009="Průchodů:" +0308000A="Chyb:" +0308000B="Využití procesoru" +0308000C="Výkon / Využití" + +;!@LangEnd@! + + diff --git a/GUI/Lang/cy.txt b/GUI/Lang/cy.txt new file mode 100644 index 0000000..522c127 --- /dev/null +++ b/GUI/Lang/cy.txt @@ -0,0 +1,482 @@ +;!@Lang@!UTF-8! +; 7-Zip 4.37 +; Translated by Owain Lewis +; +; +; +; + +00000000="Welsh" +00000001="Cymraeg" +00000002="82" + +; 7-Zip Configuration + +; Title +01000000="Ffurfweddiad 7-Zip" + +; Info Page +01000100="Manylion 7-Zip" +01000103="Mae 7-Zip yn meddalwedd am ddim. Ond, gallwch cefnogi y +datblygiad o 7-Zip trwy cofrestru." +01000104="Cefnogi" +01000105="Cofrestri" + +; Folders Page +01000200="Ffolderi" +01000210="Ffolder &gweithio" +01000211="Ffolder tymor byr y &system" +01000212="&Cyfredol" +01000213="&Penodol:" +01000214="Defnyddiwch am gyriant symudadwy yn unig" + +01000281="Nodwch lleoliad am ffeiliau archif tymor byr." + +; System Page +01000300="System" +01000301="Cyfuno 7-Zip mewn i dewislen cyd-destun y cribyn" +01000302="Dewislen cyd-destun wedi'i rhaeadru" +01000310="Eitemau dewislen cyd-destun:" + +; Language Page +01000400="Iaith" +01000401="Iaith:" + + +; 7-Zip Explorer extension + +; Context menu +02000101="7-Zip" +02000102="Gorchymynion 7-Zip" +02000103="Agor archif" +02000104="Agor yr archif dethol." +02000105="Echdynnu ffeiliau..." +02000106="Echdynnu ffeiliau o'r archif dethol." +02000107="Ychwanegu i'r archif..." +02000108="Ychwanegu yr eitemau dethol i'r archif." +02000109="Profi archif" +0200010A="Profi cywirdeb yr archif dethol." +0200010B="Echdynnu Yma" +0200010C="Echdynnu ffeiliau o'r archif dethol i'r ffolder cyfredol." +0200010D="Echdynnu i {0}" +0200010E="Echdynnu ffeiliau i is-ffolder." +0200010F="Ychwanegu i {0}" +02000110="Ychwanegu yr eitemau dethol i'r archif." +02000111="Cywasgu ac e-bostio..." +02000112="Cywasgu yr eitemau dethol i archif a danfon yr archif trwy +e-bost." +02000113="Cywasgu i {0} ac e-bostio" +02000114="Cywasgu yr eitemau dethol i archif a danfon yr archif trwy +e-bost." + +02000140="" +02000141="" + +; Properties +02000203="Llwybr" +02000204="Enw" +02000205="Estyniad" +02000206="Ffolder" +02000207="Maint" +02000208="Maint wedi'i Cywasgu" +02000209="Priodweddau" +0200020A="Crëwyd" +0200020B="Cyrchwyd" +0200020C="Addaswyd" +0200020D="Solet" +0200020E="Sylwad" +0200020F="Amgryptio" +02000210="Hollti Cyn" +02000211="Hollti ar Ôl" +02000212="Geiriadur" +02000213="CRC" +02000214="Math" +02000215="Anti" +02000216="Dull" +02000217="SW Cynnal" +02000218="System Ffeiliau" +02000219="Ddefnyddiwr" +0200021A="Grŵp" +0200021B="Bloc" +0200021C="Sylwad" +0200021D="Safle" +0200021E="Rhagddodiad y Llwybr" + +; Status bar +02000301="{0} gwrthrych(au) dethol" +02000302="{0} gwrthrych(au)" + +02000320="Ffeiliau:" +02000321="Ffolderi:" +02000322="Maint:" + +; List Context Menu +02000401="&Colofnau..." + +02000411="&Agor" +02000412="&Echdynnu..." + +; ToolBar +02000501="Echdynnu" + +; Messages +02000601="Mae gweithrediadau diweddaru ddim yn ateg am yr archif hyn." +02000602="Ddim yn gallu diweddaru yr archif {0}" +02000603="Ddim yn gallu creu y ffolder '{0}'" +02000604="Mae'r ffeil ddim yn archif ateg." +02000605="Gwall" +02000606="Gormod o eitemau" +02000607="Mae na ddim rhaglen wedi'i cysylltu gyda'r estyniad enw ffeil" +02000608="Mae na ddim wallau" + +; Dialogs +02000702="Iawn" +02000705="&Iawn" +02000707="Iawn i'r &Cwbwl" +02000709="&Na" +0200070B="Na i'r C&wbwl" + +02000710="Canslo" +02000711="&Canslo" +02000713="&Cau" +02000714="Stopio" +02000715="Ailgychwyn" + +02000720="Cymorth" + +; Extract dialog +02000800="Echdynnu" +02000801="E&chdynnu i:" +02000802="Cyfrinair" + +02000810="Modd llwybr" +02000811="Enwau llwybr llawn" +02000812="Enwau llwybr gyfredol" +02000813="Dim enwau llwybr" + +02000820="Modd disodli" +02000821="Gofyn cyn disodli" +02000822="Disodli heb awgrymeb" +02000823="Crychneidio ffeiliau presennol" +02000824="Ailenwu yn awtomatig" +02000825="Ailenwu ffeiliau presennol yn awtomatig" + +02000830="Ffeiliau" +02000831="&Ffeiliau dethol" +02000832="&Pob ffeil" + +02000881="Nodwch lleoliad am echdynnu ffeiliau." + +02000890="Echdynnu" + +; Overwrite dialog +02000900="Cadarnhau Disodli Ffeil" +02000901="Mae'r ffolder hon eisioes yn cynnwys y ffeil cyrchfan." +02000902="Hoffech chi ddisodli'r ffeil sy'n bodoli eisioes" +02000903="Gyda hon?" + +02000911="Ailenwi A&wtomatig" + +02000982="{0} beit" +02000983="addaswyd ar" + +; Messages dialog +02000A00="Neges diagnostig" + +02000A80="Neges" + +02000A91="Modd cywasgu ddim yn dilys am '{0}'." +02000A92="Gwall data mewn '{0}'. Ffeil wedi'i torri." +02000A93="CRC wedi'i methu mewn '{0}'. Ffeil wedi'i torri." + +; Password dialog +02000B00="Mewnbynnwch cyfrinair" +02000B01="Mewnbynnwch cyfrinair:" +02000B02="&Dangos cyfrinair" + +; Progress dialog +02000C00="Proses" +02000C01="Wedi treiglo:" +02000C02="Amser a'r ôl:" +02000C03="Maint:" +02000C04="Cyflymder:" + +02000C10="&Cefndir" +02000C11="&Blaendir" +02000C12="&Pwyllo" +02000C13="P&arhau" + +02000C20="Pwyllo" + +02000C30="Ydych chi am canslo?" + +; Compress dialog +02000D00="Ychwanegu i'r archif" +02000D01="&Archif:" +02000D02="Modd &diweddaru:" +02000D03="&Fformat yr archif:" +02000D04="Dull &cywasgu:" +02000D05="Creu archif &Solet" +02000D06="&Paramedrau:" +02000D07="Dewisiadau" +02000D08="Creu archif SF&X" +02000D09="Multi-threading" +02000D0A="Amgryptio &enwau ffeiliau" +02000D0B="&Lefel cywasgu:" +02000D0C="Maint &geiriadur:" +02000D0D="Maint geiria&u:" +02000D0E="Defnydd cof am Cywasgu:" +02000D0F="Defnydd cof am Datgywasgu:" + +02000D40="Hollti i &cyfeintiau, beitiau:" + +02000D81="Storio" +02000D82="Arferol" +02000D83="Uchafswm" +02000D84="Cyflum" +02000D85="Cyflymach" +02000D86="Ultra" + +02000D90="Pori" + +02000DA1="Ychwanegu ac amnewid ffeiliau" +02000DA2="Diweddaru ac ychwanegu ffeiliau" +02000DA3="Adnewyddu y ffeiliau presennol" +02000DA4="Cyfamseru ffeiliau" + +02000DB1="Pob Ffeil" + +02000DC0="Cywasgu" + +; Columns dialog +02000E00="Colofnau" +02000E01="Ticiwch y colofnau byddech yn hoffi gwneud yn gweledig yn y +ffolder hon. Defnyddiwch y botwmau Symud Lan a Symud Lawr i ailtrefnu y +colofnau." +02000E02="Dylid y colofn dethol bod" +02000E03="picseli &llydan." + +02000E10="Symud &Lan" +02000E11="Symud La&wr" +02000E12="&Dangos" +02000E13="&Cuddio" +02000E14="Gosod" + +02000E81="Teitl" +02000E82="Lled" + +; Testing +02000F90="Ymbrofi" + + +; File Manager + +03000000="Rheolwr Ffeil 7-Zip" + +; Menu +03000102="&Ffeil" +03000103="&Golygu" +03000104="Gwe&ld" +03000105="&Offer" +03000106="&Cymorth" +03000107="Ff&efrynnau" + +; File +03000210="&Agor" +03000211="Agor tu &Mewn" +03000212="Agor tu &Fas" +03000220="Gwe&ld" +03000221="&Golygu" +03000230="A&ilenwi" +03000231="&Copïo i..." +03000232="&Symud i..." +03000233="&Dileu" +03000240="&Priodweddau" +03000241="Syl&wad" +03000242="Cyfrifo swm-gwirio" +03000250="Creu Ffolder" +03000251="Creu Ffeil" +03000260="Alla&n" +03000270="&Hollti ffeil..." +03000271="Cy&funo ffeilau..." + +; Edit +03000310="&Dadwneud" +03000311="&Ailwneud" +03000320="&Torri" +03000321="&Copïo" +03000322="&Gludo" +03000323="D&ileu" +03000330="Dewis y C&yfan" +03000331="Dad-ddewis y Cyfan" +03000332="Gwrt&hdroi'r Dewis" +03000333="Dewis..." +03000334="Dad-ddewis..." +03000335="Dewis trwy Math" +03000336="Dad-ddewis trwy Math" + +; View +03000410="Eiconau &Mawr" +03000411="Eiconau &Bach" +03000412="&Rhestr" +03000413="Ma&nylion" +03000420="Dad-dosbarthu" +03000430="Agor Ffolder Gwraidd" +03000431="Lan Un Lefel" +03000432="Hanes Ffolderi..." +03000440="&Adnewyddu" +03000449="Golwg Flat" +03000450="&2 Paneli" +03000451="Bariau &Offer" +03000460="Bar Offer Archif" +03000461="Bar Offer Arferol" +03000462="Botwmau Fawr" +03000463="Dangos Testun Botwmau" + +; Tools +03000510="&Dewisiadau..." +03000511="&Meincnod" + +; Help +03000610="&Cynnwys..." +03000620="&Manylion 7-Zip..." + +; Favorites +03000710="&Ychwanegu ffolder i Ffefrynnau fel" +03000720="Llyfrnod" + +; Options Dialog + +03010000="Dewisiadau" + +; Plugins +03010100="Plugins" +03010101="&Plugins:" +03010110="Dewisiadau..." + +; Edit +03010200="Golygydd" +03010201="&Golygydd:" + +; System +03010300="System" +03010302="Cysylltu 7-Zip gyda:" +03010310="Plugin" + +; Settings +03010400="Gosodiadau" +03010401="Dangos eitem \"..\"" +03010402="Dangos eicon ffeil go iawn" +03010410="Dangos dewislen y system" +03010420="Dethol &holl rhes" +03010421="Dangos llinellau &grid" +03010430="Modd dethol &arallddewisiol" +03010440="Defnyddiwch tudalenau cof &mawr" + +; Strings + +03020201="Copïo" +03020202="Symud" +03020203="Copïo i:" +03020204="Symud i:" +03020205="Copïo..." +03020206="Symud..." +03020207="Rydych ddim yn gallu symud na copïo eitemau am ffolderi o'r +fath." +03020208="Mae'r gweithrediad ddim wedi'i ategu." + +03020210="Cadarnhau Dileu Ffeil" +03020211="Cadarnhau Dileu Ffolder" +03020212="Cadarnhau Dileu Ffeiliau Amryfal" +03020213="Ydych chi'n siŵr eich bod am dileu '{0}'?" +03020214="Ydych chi'n siŵr eich bod am dileu y ffolder '{0}' ac ei holl +cynnwys?" +03020215="Ydych chi'n siŵr eich bod am dileu yr eitemau hyn {0}?" +03020216="Dileu..." +03020217="Gwall Dileu Ffeil neu Ffolder" + +03020220="Ailenwi..." +03020221="Gwall wrth Ailenwi Ffeil neu Ffolder" +03020222="Cadarnhau Copi Ffeil" +03020223="Ydych chi'n siŵr eich bod am copïo'r ffeiliau i'r archif" + +03020230="Creu Ffolder" +03020231="Enw Ffolder:" +03020232="Ffolder Newydd" +03020233="Gwall wrth Creu Ffolder" + +03020240="Creu Ffeil" +03020241="Enw Ffeil:" +03020242="Ffeil Newydd" +03020243="Gwall wrth Creu Ffeil" + +03020250="Dewis" +03020251="Dad-ddewis" +03020252="Mwgwd:" + +03020260="Hanes Ffolderi" + +03020280="Roedd ffeil '{0}' wedi'i addasu.\nWyt ti moen ei diweddaru yn yr +archif?" +03020281="Ddim yn gallu diweddaru ffeil\n'{0}'" +03020282="Ddim yn gallu dechrau golygydd." +03020283="Agor..." + +03020290="Sylwad" +03020291="&Sylwad:" + +030202A0="System" + +03020300="Cyfrifiadur" +03020301="Rhyngrwyd" + +03020400="Ychwanegu" +03020401="Echdynnu" +03020402="Profi" + +03020420="Copïo" +03020421="Symud" +03020422="Dileu" +03020423="Gwybodaeth" + +03020500="Hollti Ffeil" +03020501="&Hollti i:" +03020510="Hollti..." + +03020600="Cyfuno Ffeiliau" +03020601="&Cyfuno i:" +03020610="Cyfuno..." + +03020710="Cyfrifo swm-gwirio..." +03020720="Gwybodaeth swm-gwirio" +03020721="Swm-gwirio CRC am data:" +03020722="Swm-gwirio CRC am data ac enwau:" + +03020800="Sganio..." + +; Computer +03031100="Cyfanswm Maint" +03031101="Lle Rhydd" +03031102="Maint Clwstwr" +03031103="Label" + +; Network +03031200="Enw Lleol" +03031201="Darparwr" + +; Benchmark Dialog + +03080000="Meincnod" +03080001="Defnyddiad cof:" +03080002="Cywasgu" +03080003="Datgywasgu" +03080004="Cyflymdra" +03080005="Amcangyfrif" +03080006="Amcangyfrif llwyr" +03080007="Presennol" +03080008="Canlyniad" +03080009="Pasio:" +0308000A="Gwallau:" + +;!@LangEnd@! + diff --git a/GUI/Lang/da.txt b/GUI/Lang/da.txt new file mode 100644 index 0000000..f441157 --- /dev/null +++ b/GUI/Lang/da.txt @@ -0,0 +1,545 @@ +;!@Lang@!UTF-8! +; 7-Zip 9.07 +; Originaly Translated by Jakob Schmidt. +; Updated by Kian Andersen, Jørgen Rasmussen +; +; +; + +00000000="Danish" +00000001="Dansk" +00000002="6" + +; 7-Zip Configuration + +; Title +01000000="7-Zip Indstillinger" + +; Info Page +01000100="Om 7-Zip" +01000103="7-Zip er gratis software, men hvis du kan og vil hjælpe fremtidige udvikling, så vær venlig at registrer." +01000104="Support" +01000105="Registrer" + +; Folders Page +01000200="Mappe" +01000210="&Arbejdsmappe" +01000211="&Systemets temp-mappe" +01000212="&Nuværende" +01000213="&Specificeret:" +01000214="Brug kun til flytbare drev." + +01000281="Angiv adresse til midlertidige filer.." + +; System Page +01000300="System" +01000301="Flet 7-Zip ind i Windows" +01000302="Vis 7-zip ved højreklik" +01000310="Punkter i genvejsmenuen:" + +; Language Page +01000400="Sprog" +01000401="Sprog:" + + +; 7-Zip Explorer extension + +; Context menu +02000101="7-Zip" +02000102="7-Zip kommandoer" +02000103="Åbn" +02000104="Åbner det valgte arkiv." +02000105="Udpak filer..." +02000106="Udpak filer fra det valgte arkiv." +02000107="Føj til arkiv..." +02000108="Føj de valgte filer til arkiv." +02000109="Undersøg arkiv" +0200010A="Undersøger integriteten af valgte arkiv." +0200010B="Udpak her" +0200010C="Udpak filer fra det valgte arkiv her." +0200010D="Udpak til {0}" +0200010E="Udpak filer til undermappe." +0200010F="Føj til {0}" +02000110="Føj det valgte til arkiv." +02000111="Pak og e-mail..." +02000112="Pak det valgte til arkiv og send via e-mail." +02000113="Pak til {0} og e-mail" +02000114="Pak det valgte til arkiv og send via e-mail." + +02000140="" +02000141="" + +; Properties +02000203="Sti" +02000204="Navn" +02000205="Filtypenavn" +02000206="Mappe" +02000207="Størrelse" +02000208="Nedpakket størrelse" +02000209="Egenskaber" +0200020A="Oprettet" +0200020B="Åbnet" +0200020C="Ændret" +0200020D="Solid" +0200020E="Kommentar" +0200020F="Krypteret" +02000210="Opdeling før" +02000211="Opdeling efter" +02000212="Leksikon" +02000213="CRC" +02000214="Type" +02000215="Anti" +02000216="Metode" +02000217="Vært OS" +02000218="Filsystem" +02000219="Bruger" +0200021A="Gruppe" +0200021B="Blok" +0200021C="Kommentar" +0200021D="Position" +0200021E="Sti præfiks" +0200021F="Mapper" +02000220="Filer" +02000221="Version" +02000222="Bind" +02000223="Flerbindsarkiv" +02000224="Offset" +02000225="Links" +02000226="Blokke" +02000227="Bind" + +02000229="64-bit" +0200022A="Big-endian" +0200022B="CPU" +0200022C="Fysisk størrelse" +0200022D="Headerstørrelse" +0200022E="Checksum" +0200022F="Karakteristika" +02000230="Virtuel adresse" +02000231="ID" +02000232="Kort navn" +02000233="Oprettende program" +02000234="Sektorstørrelse" +02000235="Tilstand" +02000236="Link" + +; Status bar +02000301="{0} objekt(er) valgt" +02000302="{0} objekt(er)" + +02000320="Filer:" +02000321="Mapper:" +02000322="Størrelse:" +02000323="Komprimeret størrelse:" +02000324="Arkiver:" + +; List Context Menu +02000401="&Kolonner..." + +02000411="&Åbn" +02000412="&Udpak..." + +; ToolBar +02000501="Udpak" + +; Messages +02000601="Opdater operationer er ikke understøttet for dette arkiv." +02000602="Kan ikke opdatere arkiv {0}" +02000603="Kan ikke oprette mappe '{0}'" +02000604="Filen er ikke et understøttet arkiv." +02000605="Fejl" +02000606="For mange objekter" +02000607="Der er ingen programmer tilknyttet dette filtypenavn" +02000608="Der er ingen fejl" +02000609="Kan ikke åbne filen '{0}' som et arkiv" +0200060A="Kan ikke åbne det krypterede arkiv '{0}'. Forkert adgangskode?" +0200060B="Systemet kan ikke allokere den nødvendige mængde hukommelse" +0200060C="Ukendt fejl" +0200060D="Arkivtypen er ikke understøttet" + +; Dialogs +02000702="OK" +02000705="&Ja" +02000707="Ja &til alle" +02000709="&Nej" +0200070B="N&ej til alle" + +02000710="Annuller" +02000711="&Annuller" +02000713="&Luk" +02000714="Stop" +02000715="Genstart" + +02000720="Hjælp" + +; Extract dialog +02000800="Udpak" +02000801="U&dpak til:" +02000802="&Adgangskode" + +02000810="Stitype" +02000811="&Komplette stinavne" +02000812="&Nuværende stinavne" +02000813="&Ingen stinavne" + +02000820="Erstatningsmåde" +02000821="&Spørg før erstatning" +02000822="&Erstat uden advarsel" +02000823="S&pring nuværende filer over" +02000824="A&utomatisk omdøbning" +02000825="&Omdøb automatisk eksisterende filer" + +02000830="Filer" +02000831="&Valgte filer" +02000832="&Alle filer" + +02000881="Vælg en sti for de udpakkede filer." + +02000890="Udpakker" + +; Overwrite dialog +02000900="Bekræft filerstatning" +02000901="Destinationsmappen indeholder allerede behandlede filer." +02000902="Ønsker du at udskifte den eksisterende fil" +02000903="med denne?" + +02000911="A&utomatisk omdøbning af alle" + +02000982="{0} bytes" +02000983="Ændret den" + +; Messages dialog +02000A00="Diagnostiske beskeder" + +02000A80="Besked" + +02000A91="Ikke understøttet pakkemetode for '{0}'." +02000A92="Datafejl i '{0}'. Filen er ødelagt." +02000A93="CRC mislykkedes i '{0}'. Filen er ødelagt." +02000A94="Datafejl i den krypterede fil '{0}'. Forkert adgangskode?" +02000A95="CRC mislykkedes i den krypterede fil '{0}'. Forkert adgangskode?" + +; Password dialog +02000B00="Indtast adgangskode" +02000B01="&Indtast adgangskode:" +02000B02="&Vis adgangskode" +02000B03="Genindtast adgangskode:" +02000B10="Adgangskoderne stemmer ikke overens" +02000B11="Brug kun engelske bogstaver, numre og specialtegn (!, #, $, ...) til adgangskode" +02000B12="Adgangskoden er for lang" + +; Progress dialog +02000C00="Proces" +02000C01="Brugt tid:" +02000C02="Tid tilbage:" +02000C03="Størrelse:" +02000C04="Hastighed:" +02000C05="Behandlet:" +02000C06="Komprimeringsforhold:" + +02000C10="&Baggrund" +02000C11="&Forgrund" +02000C12="&Pause" +02000C13="&Fortsæt" + +02000C20="Pauset" + +02000C30="Er du sikker på du vil annullere?" + +; Compress dialog +02000D00="Føj til arkiv" +02000D01="&Arkiv:" +02000D02="O&pdateringstilstand:" +02000D03="Arkiv&format:" +02000D04="Pakke&metode:" +02000D05="Opret &solid arkiv" +02000D06="Pa&rameter:" +02000D07="Funktioner" +02000D08="Opret selv&udpakkende arkiv (sfx)" +02000D09="Multi-threading" +02000D0A="Kr&ypter filnavne" +02000D0B="Nedpaknings&niveau:" +02000D0C="Ord&bogsstørrelse:" +02000D0D="&Ordstørrelse:" +02000D0E="Hukommelsesbrug for nedpakning:" +02000D0F="Hukommelsesbrug for udpakning:" +02000D10="Kryptering" +02000D11="Krypterin&gsmetode:" +02000D12="Antal &CPU tråde:" +02000D13="&Solid blokstørrelse:" +02000D14="Ikke-solid" +02000D15="Solid" +02000D16="&Komprimer delte filer" + +02000D40="Op&del i bind, bytes:" +02000D41="Ukorrekt bindstørrelse" +02000D42="Specificer bindstørrelse: {0} bytes.\nEr du sikker på du ønsker, at opdele arkivet i sådanne bind?" + +02000D81="Kun gem" +02000D82="Normal" +02000D83="Bedste" +02000D84="Hurtig" +02000D85="Hurtigste" +02000D86="Ultra" + +02000D90="Gennemse" + +02000DA1="Tilføj og erstat filer" +02000DA2="Opdater og tilføj filer" +02000DA3="Opdater eksisterende filer" +02000DA4="Synkroniser filer" + +02000DB1="Alle filer" + +02000DC0="Nedpakker" + +; Columns dialog +02000E00="Kolonner" +02000E01="Tjek kolonnerne som du vil have synlige i denne mappe. Brug pil-op og pil-ned knapperne til at ændre kolonnerne." +02000E02="Den valgte kolonne burde være" +02000E03="pixler &bred." + +02000E10="Flyt &op" +02000E11="Flyt &ned" +02000E12="&Vis" +02000E13="&Skjul" +02000E14="Sæt" + +02000E81="Titel" +02000E82="Bredde" + +; Testing +02000F90="Undersøger" + + +; File Manager + +03000000="7-Zip File Manager" + +; Menu +03000102="&Fil" +03000103="&Rediger" +03000104="&Vis" +03000105="F&unktioner" +03000106="&Hjælp" +03000107="F&avoriter" + +; File +03000210="&Åbn" +03000211="Å&bn indeni" +03000212="Åbn &udenfor" +03000220="&Vis" +03000221="&Rediger" +03000230="O&mdøb" +03000231="&Kopier til..." +03000232="&Flyt til..." +03000233="S&let" +03000240="&Egenskaber" +03000241="Komme&ntar" +03000242="Udregn &checksum" +03000243="&Sammenlign" +03000250="Opret mappe" +03000251="Opret fil" +03000260="&Afslut" +03000270="&Opdel fil..." +03000271="Kom&biner filer..." + +; Edit +03000310="&Fortryd" +03000311="&Gendan" +03000320="&Klip" +03000321="K&opier" +03000322="Sæt &ind" +03000323="&Slet" +03000330="&Vælg alle" +03000331="&Fravælg alle" +03000332="&Omvendt markering" +03000333="V&ælg..." +03000334="F&ravælg..." +03000335="Vælg &efter type" +03000336="Fravælg efter &type" + +; View +03000410="Sto&re ikoner" +03000411="S&må ikoner" +03000412="&Liste" +03000413="&Detaljer" +03000420="&Usorteret" +03000430="Åbn rodmappe" +03000431="Et niveau op" +03000432="Mappehistorik..." +03000440="&Opdater" +03000449="&Flad visning" +03000450="&2 paneler" +03000451="&Værktøjslinjer" +03000460="Arkivlinje" +03000461="Standardlinje" +03000462="Store knapper" +03000463="Vis knaptekst" + +; Tools +03000510="&Indstillinger..." +03000511="&Benchmark" + +; Help +03000610="&Indhold..." +03000620="&Om 7-Zip..." + +; Favorites +03000710="&Føj mappe til Favoritter som" +03000720="Bogmærke" + +; Options Dialog + +03010000="Indstillinger" + +; Plugins +03010100="Tilføjelser" +03010101="&Tilføjelser:" +03010110="Indstillinger..." + +; Edit +03010200="Editor" +03010201="&Teksteditor:" +03010202="&Sammenligningsværktøj:" + +; System +03010300="System" +03010302="Associer 7-Zip med:" +03010310="Tilføjelse" + +; Settings +03010400="Indstillinger" +03010401="Vis \"..\" element" +03010402="Vis rigtige filikoner" +03010410="Vis systemmenu" +03010420="&Markér hele rækken" +03010421="Vis &gitter" +03010422="Enkeltklik for at åbne et element" +03010430="&Alternativ markeringsmetode" +03010440="Benyt &store hukommelsessider" + +; Strings + +03020201="Kopier" +03020202="Flyt" +03020203="Kopier til:" +03020204="Flyt til:" +03020205="Kopierer..." +03020206="Flytter..." +03020207="Du kan ikke flytte eller kopierer elementer for sådan en mappe." +03020208="Opgaven er ikke understøttet." +03020209="Vælg destinationsmappen." + +03020210="Godkend sletning af fil" +03020211="Godkend sletning af mappe" +03020212="Godkend sletning af flere filer" +03020213="Er du sikker på du vil slette '{0}'?" +03020214="Er du sikker på du vil slette mappen '{0}' og alt indhold?" +03020215="Er du sikker på du vil slette disse {0} elementer?" +03020216="Sletter..." +03020217="Fejl da en fil eller mappe skulle slettes" +03020218="Systemet kan ikke flytte en fil med lang filsti til Papirkurven" + +03020220="Omdøber..." +03020221="Fejl da en fil eller mappe skulle omdøbes" +03020222="Bekræft filkopiering" +03020223="Er du sikker du vil kopiere filer til arkiv?" + +03020230="Opret mappe" +03020231="Mappenavn:" +03020232="Ny mappe" +03020233="Fejl under oprettelse af mappe" + +03020240="Opret fil" +03020241="Filnavn:" +03020242="Ny fil" +03020243="Fejl under oprettelse af fil" + +03020250="Vælg" +03020251="Fravælg" +03020252="Masker:" + +03020260="Mappehistorik" + +03020280="Filen '{0}' er blevet ændret.\nVil du opdatere den i arkivet?" +03020281="Kan ikke opdatere filen\n'{0}'" +03020282="Kan ikke starte tekstbehandler." +03020283="Åbner..." +03020284="Filen ligner en virus (filnavnet indeholder lange mellemrum i navn)." + +03020290="Kommentar" +03020291="&Kommentar:" + +030202A0="System" + +03020300="Computer" +03020301="Netværk" +03020302="Dokumenter" + +03020400="Tilføj" +03020401="Udpak" +03020402="Test" + +03020420="Kopier" +03020421="Flyt" +03020422="Slet" +03020423="Info" + +03020500="Opdel fil" +03020501="&Opdel til:" +03020510="Opdeler..." +03020520="Godkend opdeling" +03020521="Er du sikker på du vil opdele filen i {0} bind?" +03020522="Bindstørrelsen skal være mindre end størrelsen på den oprindelige fil" + +03020600="Kombiner filer" +03020601="&Kombiner til:" +03020610="Kombinerer..." +03020620="Vælg kun første del af opdelt fil" +03020621="Kan ikke genkende fil, som en del af opdelt fil" +03020622="Kan ikke finde mere end én del af opdelt fil" + +03020710="Beregner checksum.." +03020720="Checksum information" +03020721="CRC checksum for data:" +03020722="CRC checksum for data og navne:" + +03020800="Skanner..." + +03020900="Egenskaber" + +03020A01="Handlingen kan ikke kaldes fra en mappe der har en lang sti." +03020A02="Du skal vælge en fil" +03020A03="Du skal vælge en eller flere filer" +03020A04="Filen {0} findes allerede" + +; Computer +03031100="Total størrelse" +03031101="Fri plads" +03031102="Clusterstørrelse" +03031103="Etiket" + +; Network +03031200="Lokalt navn" +03031201="Udbyder" + +; Benchmark Dialog + +03080000="Benchmark" +03080001="Hukommelsesbrug:" +03080002="Komprimering" +03080003="Dekomprimering" +03080004="Hastighed" +03080005="Bedømmelse" +03080006="Total bedømmelse" +03080007="Nuværende" +03080008="Resultat" +03080009="Forsøg:" +0308000A="Fejl:" +0308000B="CPU forbrug" +0308000C="Bedømmelse / Forbrug" + +;!@LangEnd@! + + diff --git a/GUI/Lang/de.txt b/GUI/Lang/de.txt new file mode 100644 index 0000000..a88d1df --- /dev/null +++ b/GUI/Lang/de.txt @@ -0,0 +1,543 @@ +;!@Lang@!UTF-8! +; 7-Zip 2.30 Beta 22 +; Translated by Soeren Finster +; 7-Zip 4.07 beta +; Updated by JAK-Software.DE +; 7-Zip 9.07 beta +; Maintained by Joachim Henke (since 4.12 beta) + +00000000="German" +00000001="Deutsch" +00000002="7" + +; 7-Zip Configuration + +; Title +01000000="7-Zip Einstellungen" + +; Info Page +01000100="Info über 7-Zip" +01000103="7-Zip ist freie Software. Sie können jedoch das Projekt durch eine Registrierung unterstützen." +01000104="techn. Unterstützung" +01000105="Registrieren" + +; Folders Page +01000200="Ordner" +01000210="&Arbeitsverzeichnis" +01000211="&TEMP-Ordner des Systems" +01000212="Aktueller &Ordner" +01000213="&Benutzerdefiniert:" +01000214="Nur bei &Wechselmedien benutzen" + +01000281="Wählen Sie einen Ordner für temporäre Archivdateien:" + +; System Page +01000300="System" +01000301="7-Zip in Kontextmenü integrieren" +01000302="Kontextmenü kaskadieren" +01000310="Einträge im Kontextmenü:" + +; Language Page +01000400="Sprache" +01000401="Sprache:" + + +; 7-Zip Explorer extension + +; Context menu +02000101="7-Zip" +02000102="7-Zip Befehle" +02000103="Öffnen" +02000104="Ausgewähltes Archiv öffnen" +02000105="Dateien entpacken..." +02000106="Dateien aus dem gewählten Archiv entpacken" +02000107="Zu einem Archiv hinzufügen..." +02000108="Fügt die markierten Objekte einem Archiv hinzu." +02000109="Archiv überprüfen" +0200010A="Prüft die Integrität des ausgewählten Archivs." +0200010B="Hier entpacken" +0200010C="Entpackt das gewählte Archiv in den aktuellen Ordner." +0200010D="Entpacken nach {0}" +0200010E="Entpackt Dateien in ein Unterverzeichnis." +0200010F="Hinzufügen zu {0}" +02000110="Fügt die markierten Objekte dem Archiv hinzu." +02000111="Archivieren und versenden..." +02000112="Packt die markierten Objekte und verschickt das Archiv per E-Mail." +02000113="Archivieren in {0} und versenden" +02000114="Packt die markierten Objekte und verschickt das Archiv per E-Mail." + +02000140="" +02000141="" + +; Properties +02000203="Pfad" +02000204="Name" +02000205="Erweiterung" +02000206="Ordner" +02000207="Größe" +02000208="Gepackte Größe" +02000209="Attribute" +0200020A="Erstellt am" +0200020B="Letzter Zugriff" +0200020C="Geändert am" +0200020D="Kompakt (solid)" +0200020E="Kommentiert" +0200020F="Verschlüsselt" +02000210="Vorher geteilt" +02000211="Danach geteilt" +02000212="Wörterbuch" +02000213="CRC" +02000214="Typ" +02000215="Anti" +02000216="Verfahren" +02000217="Herkunft" +02000218="Dateisystem" +02000219="Besitzer" +0200021A="Gruppe" +0200021B="Block" +0200021C="Kommentar" +0200021D="Position" +0200021E="Pfad" +0200021F="Ordner" +02000220="Dateien" +02000221="Version" +02000222="Teilarchiv" +02000223="Mehrteiliges Archiv" +02000224="Offset" +02000225="Verknüpfungen" +02000226="Blöcke" +02000227="Teilarchive" + +02000229="64 Bit" +0200022A="Big-Endian" +0200022B="CPU" +0200022C="Gesamtgröße" +0200022D="Header-Größe" +0200022E="Prüfsumme" +0200022F="Kenndaten" +02000230="Virtuelle Adresse" +02000231="ID" +02000232="Kurzname" +02000233="Erstellt durch" +02000234="Sektorgröße" +02000235="Zugriffsrechte" +02000236="Link" + +; Status bar +02000301="{0} Objekt(e) markiert" +02000302="{0} Objekt(e)" + +02000320="Dateien:" +02000321="Ordner:" +02000322="Größe:" +02000323="Komprimierte Größe:" +02000324="Archive:" + +; List Context Menu +02000401="&Spalten..." + +02000411="Ö&ffnen" +02000412="&Entpacken..." + +; ToolBar +02000501="Entpacken" + +; Messages +02000601="Aktualisierungen werden für dieses Archiv nicht unterstützt." +02000602="Kann das Archiv \"{0}\" nicht aktualisieren." +02000603="Kann den Ordner \"{0}\" nicht erstellen." +02000604="Diese Datei ist kein unterstütztes Archiv." +02000605="Fehler" +02000606="Zu viele Objekte" +02000607="Mit dieser Erweiterung ist kein Programm verknüpft." +02000608="Es sind keine Fehler aufgetreten." +02000609="Die Datei \"{0}\" kann nicht als Archiv geöffnet werden." +0200060A="Das verschlüsselte Archiv \"{0}\" kann nicht geöffnet werden. Falsches Passwort?" +0200060B="Das System kann die benötigte Speichermenge nicht bereit stellen." +0200060C="Unbekannter Fehler" +0200060D="Typ des Archives wird nicht unterstützt" + +; Dialogs +02000702="OK" +02000705="&Ja" +02000707="Ja für &alle" +02000709="&Nein" +0200070B="Nein für a&lle" + +02000710="Abbrechen" +02000711="&Abbrechen" +02000713="&Schließen" +02000714="Stopp" +02000715="Neustart" + +02000720="Hilfe" + +; Extract dialog +02000800="Entpacken" +02000801="&Entpacken nach:" +02000802="Passwort" + +02000810="Verzeichnisstruktur wiederherstellen" +02000811="Komplette Pfadangaben" +02000812="Relative Pfadangaben" +02000813="Keine Pfadangaben" + +02000820="Dateien überschreiben" +02000821="Nur mit Bestätigung" +02000822="Ohne Bestätigung" +02000823="Vorhandene Dateien überspringen" +02000824="Automatisch umbenennen" +02000825="Vorhandene Dateien umbenennen" + +02000830="Dateien" +02000831="&Markierte Dateien" +02000832="&Alle Dateien" + +02000881="Wählen Sie einen Ordner für die entpackten Dateien:" + +02000890="Entpacken" + +; Overwrite dialog +02000900="Überschreiben bestätigen" +02000901="Der Zielordner beinhaltet bereits eine Datei diesen Namens." +02000902="Wollen Sie diese Datei" +02000903="durch diese ersetzen?" + +02000911="A&utomatisch umbenennen" + +02000982="{0} Bytes" +02000983="geändert am" + +; Messages dialog +02000A00="Diagnosemeldungen" + +02000A80="Meldung" + +02000A91="Das Kompressionsverfahren in \"{0}\" wird nicht unterstützt." +02000A92="Datenfehler in \"{0}\". Die Datei ist beschädigt." +02000A93="CRC-Prüfsummenfehler. Die Datei \"{0}\" ist beschädigt." +02000A94="Datenfehler in der verschlüsselten Datei \"{0}\". Falsches Passwort?" +02000A95="CRC-Prüfsummenfehler bei verschlüsselter Datei \"{0}\". Falsches Passwort?" + +; Password dialog +02000B00="Kennworteingabe" +02000B01="Passwort eingeben:" +02000B02="Passwort an&zeigen" +02000B03="Passwort bestätigen:" +02000B10="Die Passwörter stimmen nicht überein." +02000B11="Bitte nur Buchstaben des englischen Alphabets, Ziffern und Sonderzeichen (!, #, $, ...) im Passwort verwenden!" +02000B12="Das Passwort ist zu lang." + +; Progress dialog +02000C00="Fortschritt" +02000C01="Verstrichene Zeit:" +02000C02="Verbleibende Zeit:" +02000C03="Gesamtdatenmenge:" +02000C04="Geschwindigkeit:" +02000C05="Verarbeitet:" +02000C06="Kompressionsrate:" + +02000C10="&Hintergrund" +02000C11="&Vordergrund" +02000C12="&Pause" +02000C13="&Fortsetzen" + +02000C20="Pause" + +02000C30="Möchten Sie wirklich abbrechen?" + +; Compress dialog +02000D00="Zu Archiv hinzufügen" +02000D01="&Archiv:" +02000D02="Art der Akt&ualisierung:" +02000D03="Archiv&format:" +02000D04="Kompressions&verfahren:" +02000D05="Kompaktes Archiv erstellen (solid)" +02000D06="&Parameter:" +02000D07="Optionen" +02000D08="Selbstentpackendes Archiv (SF&X) erstellen" +02000D09="Multithreading" +02000D0A="Datei&namen verschlüsseln" +02000D0B="&Kompressionsstärke:" +02000D0C="Wörter&buchgröße:" +02000D0D="&Wortgröße:" +02000D0E="Speicherbedarf beim Komprimieren:" +02000D0F="Speicherbedarf beim Entpacken:" +02000D10="Verschlüsselung" +02000D11="Verfahren:" +02000D12="Anzahl &CPU-Threads:" +02000D13="Größe &solider Blöcke:" +02000D14="Nicht solide" +02000D15="Solide" +02000D16="Zum Schreiben &geöffnete Dateien einbeziehen" + +02000D40="In &Teildateien aufsplitten (Bytes):" +02000D41="Ungültiger Wert für Dateigrößen" +02000D42="Angegebene Größe für Teildateien: {0} Bytes.\nSind Sie sicher, dass das Archiv dementsprechend aufgesplittet werden soll?" + +02000D81="Speichern" +02000D82="Normal" +02000D83="Maximum" +02000D84="Schnell" +02000D85="Schnellste" +02000D86="Ultra" + +02000D90="Durchsuchen" + +02000DA1="Hinzufügen und Ersetzen" +02000DA2="Aktualisieren und Hinzufügen" +02000DA3="Vorhandene Dateien aktualisieren" +02000DA4="Synchronisieren" + +02000DB1="Alle Dateien" + +02000DC0="Komprimiere" + +; Columns dialog +02000E00="Spalten" +02000E01="Markieren Sie die Spalten, die Sie in dieser Ansicht sehen wollen. Benutzen Sie die Aufwärts- und Abwärts-Schaltflächen, um die Spalten wie gewünscht anzuordnen." +02000E02="Die markierte Spalte soll" +02000E03="Pixel &breit sein." + +02000E10="&Aufwärts" +02000E11="Ab&wärts" +02000E12="&Zeigen" +02000E13="&Verstecken" +02000E14="Speichern" + +02000E81="Titel" +02000E82="Breite" + +; Testing +02000F90="Überprüfen" + + +; File Manager + +03000000="7-Zip Dateimanager" + +; Menu +03000102="&Datei" +03000103="&Bearbeiten" +03000104="&Ansicht" +03000105="&Extras" +03000106="&?" +03000107="&Favoriten" + +; File +03000210="Ö&ffnen" +03000211="I&ntern öffnen" +03000212="E&xtern öffnen" +03000220="&Ansehen" +03000221="&Bearbeiten" +03000230="&Umbenennen" +03000231="&Kopieren nach..." +03000232="&Verschieben nach..." +03000233="&Löschen" +03000240="E&igenschaften" +03000241="K&ommentieren" +03000242="&Prüfsumme berechnen" +03000243="Ver&gleichen" +03000250="Ordner erstellen" +03000251="Datei erstellen" +03000260="Be&enden" +03000270="Datei auf&splitten..." +03000271="Dateien &zusammenfügen..." + +; Edit +03000310="&Rückgängig" +03000311="&Wiederherstellen" +03000320="&Ausschneiden" +03000321="&Kopieren" +03000322="&Einfügen" +03000323="&Löschen" +03000330="Alles &markieren" +03000331="Alles abwählen" +03000332="Markierung &umkehren" +03000333="Auswählen..." +03000334="Auswahl aufheben..." +03000335="Nach Typ auswählen" +03000336="Nach Typ abwählen" + +; View +03000410="&Große Symbole" +03000411="&Kleine Symbole" +03000412="&Liste" +03000413="&Details" +03000420="Unsortiert" +03000430="Wurzelverzeichnis" +03000431="Übergeordneter Ordner" +03000432="Ordnerverlauf..." +03000440="&Aktualisieren" +03000449="Alles in einer &Ebene" +03000450="&Zweigeteiltes Fenster" +03000451="&Symbolleisten" +03000460="Archivfunktionen" +03000461="Standardfunktionen" +03000462="Große Schaltflächen" +03000463="Schaltflächenbeschriftung" + +; Tools +03000510="&Optionen..." +03000511="&Benchmark" + +; Help +03000610="&Hilfethemen" +03000620="Ü&ber 7-Zip..." + +; Favorites +03000710="&Ordner hinzufügen als" +03000720="Favorit" + +; Options Dialog + +03010000="Optionen" + +; Plugins +03010100="Plugins" +03010101="&Plugins:" +03010110="Optionen..." + +; Edit +03010200="Editor" +03010201="&Editor:" +03010202="Programm zum &Vergleichen:" + +; System +03010300="System" +03010302="7-Zip verknüpfen mit:" +03010310="Plugin" + +; Settings +03010400="Einstellungen" +03010401="&Verzeichniseintrag \"..\" anzeigen" +03010402="Symbole aus &Dateien laden und anzeigen" +03010410="System-Kontext&menü im Dateimenü anzeigen" +03010420="Dateiauswahl markiert ganze &Zeile" +03010421="&Gitternetzlinien anzeigen" +03010422="Einfacher &Klick zum Öffnen" +03010430="&Alternativer Dateiauswahl-Modus" +03010440="Große &Speicherseiten verwenden" + +; Strings + +03020201="Kopieren" +03020202="Verschieben" +03020203="Kopieren nach:" +03020204="Verschieben nach:" +03020205="Kopiere..." +03020206="Verschiebe..." +03020207="Verschieben und Kopieren ist für diesen Ordner nicht möglich." +03020208="Die Operation wird für diesen Ordner nicht unterstützt." +03020209="Zielordner auswählen" + +03020210="Löschen von Datei bestätigen" +03020211="Löschen von Ordner bestätigen" +03020212="Löschen von mehreren Dateien bestätigen" +03020213="Soll \"{0}\" wirklich gelöscht werden?" +03020214="Soll der Ordner \"{0}\" und sein gesamter Inhalt wirklich gelöscht werden?" +03020215="Sollen diese {0} Objekte wirklich gelöscht werden?" +03020216="Lösche..." +03020217="Fehler beim Löschen von Datei oder Ordner" +03020218="Das System kann Dateien mit langem Pfad nicht in den Papierkorb verschieben." + +03020220="Umbenennen..." +03020221="Fehler beim Umbenennen von Datei oder Ordner" +03020222="Kopieren bestätigen" +03020223="Sollen die Dateien wirklich in dieses Archiv kopiert werden:" + +03020230="Ordner erstellen" +03020231="Ordnername:" +03020232="Neuer Ordner" +03020233="Fehler beim Erstellen des Ordners" + +03020240="Datei erstellen" +03020241="Dateiname:" +03020242="Neue Datei" +03020243="Fehler beim Erstellen der Datei" + +03020250="Auswählen" +03020251="Auswahl aufheben" +03020252="Filter:" + +03020260="Ordnerverlauf" + +03020280="Die Datei \"{0}\" wurde geändert.\nSoll sie im Archiv aktualisiert werden?" +03020281="Die Datei konnte nicht aktualisiert werden.\n\"{0}\"" +03020282="Kann Editor nicht starten" +03020283="Öffne..." +03020284="Die Datei scheint ein Virus zu sein (Dateiname enthält lange Reihen von Leerzeichen)." + +03020290="Kommentar" +03020291="&Kommentar:" + +030202A0="System" + +03020300="Arbeitsplatz" +03020301="Netzwerk" +03020302="Dokumente" + +03020400="Hinzufügen" +03020401="Entpacken" +03020402="Überprüfen" + +03020420="Kopieren" +03020421="Verschieben" +03020422="Löschen" +03020423="Eigenschaften" + +03020500="Datei aufsplitten" +03020501="Teildateien &nach:" +03020510="Aufsplitten..." +03020520="Aufsplitten bestätigen" +03020521="Sind Sie sicher, die Datei in {0} Teildateien aufsplitten zu wollen?" +03020522="Die Größe der Teildateien muss kleiner sein als die der ursprünglichen Datei." + +03020600="Dateien zusammenfügen" +03020601="Zieldatei &nach:" +03020610="Zusammenfügen..." +03020620="Bitte nur den ersten Teil der Datei auswählen." +03020621="Datei nicht als Teil einer aufgesplitteten Datei erkannt" +03020622="Kann nicht mehr als eine Teildatei finden." + +03020710="Berechne Prüfsumme..." +03020720="Prüfsummen-Information" +03020721="CRC-Prüfsumme über die Daten:" +03020722="Prüfsumme über Daten und Namen:" + +03020800="Durchsuche..." + +03020900="Eigenschaften" + +03020A01="Die Operation kann nicht aus einem Ordner mit langem Pfad aufgerufen werden." +03020A02="Bitte genau eine Datei auswählen." +03020A03="Bitte mindestens eine Datei auswählen." +03020A04="Die Datei {0} existiert bereits." + +; Computer +03031100="Gesamtgröße" +03031101="Freier Speicherplatz" +03031102="Cluster-Größe" +03031103="Name" + +; Network +03031200="Lokaler Name" +03031201="Provider" + +; Benchmark Dialog + +03080000="Benchmark" +03080001="Speichernutzung:" +03080002="Komprimierung" +03080003="Dekomprimierung" +03080004="Geschwindigkeit" +03080005="Bewertung" +03080006="Gesamtwertung" +03080007="Aktuell" +03080008="Ergebnis" +03080009="Durchläufe:" +0308000A="Fehler:" +0308000B="CPU-Nutzung" +0308000C="Bewert./Nutzung" + +;!@LangEnd@! diff --git a/GUI/Lang/el.txt b/GUI/Lang/el.txt new file mode 100644 index 0000000..d5ccffa --- /dev/null +++ b/GUI/Lang/el.txt @@ -0,0 +1,492 @@ +;!@Lang@!UTF-8! +; 7-Zip 9.07 +; Translated by SkyHi [HDManiacs Team] +; + +00000000="Greek" +00000001="Ελληνική" +00000002="8" + +; 7-Zip Configuration + +; Title +01000000="Ρυθμίσεις 7-Zip" + +; Info Page +01000100="Πληροφορίες για το 7-Zip" +01000103="Το 7-Zip είναι ελεύθερο λογισμικό. Ωστόσο μπορείτε να υποστηρίξετε την περαιτέρω ανάπτυξη του με την εγγραφή σας." +01000104="Υποστήριξη" +01000105="Εγγραφή" + +; Folders Page +01000200="Φάκελοι" +01000210="&Φάκελος εργασίας" +01000211="&Προσωρινός φάκελος συστήματος" +01000212="&Τρέχων φάκελος" +01000213="&Καθορισμένος:" +01000214="Χρήση μόνο για αφαιρούμενες μονάδες δίσκου" +01000281="Καθορίστε μια τοποθεσία για τα προσωρινά αρχεία συμπίεσης." + +; System Page +01000300="Σύστημα" +01000301="Ενσωμάτωση του 7-Zip στο λειτουργικό" +01000302="Με ομαδοποίηση των επιλογών" +01000310="Στοιχεία του πίνακα επιλογών:" + +; Language Page +01000400="Γλώσσα" +01000401="Γλώσσα:" + + +; 7-Zip Explorer extension + +; Context menu +02000101="7-Zip" +02000102="Εντολές 7-Zip" +02000103="Άνοιγμα" +02000104="Άνοιγμα επιλεγμένου αρχείου συμπίεσης." +02000105="Αποσυμπίεση αρχείων..." +02000106="Αποσυμπίεση επιλεγμένου αρχείου συμπίεσης" +02000107="Προσθήκη σε αρχείο συμπίεσης..." +02000108="Προσθήκη επιλεγμένων στοιχείων σε αρχείο συμπίεσης" +02000109="Έλεγχος αρχείου συμπίεσης" +0200010A="Έλεγχος εγκυρότητας επιλεγμένου αρχείου συμπίεσης" +0200010B="Αποσυμπίεση εδώ" +0200010C="Αποσυμπίεση αρχείων στον τρέχοντα φάκελο" +0200010D="Αποσυμπίεση στο φάκελο {0}" +0200010E="Αποσυμπίεση αρχείων σε υποφάκελο." +0200010F="Προσθήκη στο {0}" +02000110="Προσθήκη επιλεγμένων στοιχείων σε αρχείο συμπίεσης." +02000111="Συμπίεση και αποστολή με e-mail..." +02000112="Συμπίεση επιλεγμένων στοιχείων και αποστολή με e-mail." +02000113="Συμπίεση στο {0} και αποστολή με e-mail" +02000114="Συμπίεση επιλεγμένων στοιχείων και αποστολή με e-mail." +02000140="<Φάκελος>" +02000141="<Αρχείο Συμπίεσης>" + +; Properties +02000203="Θέση" +02000204="Όνομα" +02000205="Τύπος" +02000206="Φάκελος" +02000207="Μέγεθος" +02000208="Συμπιεσμένο μέγεθος" +02000209="Ιδιότητες" +0200020A="Δημιουργήθηκε" +0200020B="Προσπελάστηκε" +0200020C="Τροποποιήθηκε" +0200020D="Συμπαγές" +0200020E="Σχόλιο" +0200020F="Κωδικοποιημένο" +02000210="Τεμαχισμός πριν" +02000211="Τεμαχισμός μετά" +02000212="Λεξικό" +02000213="CRC" +02000214="Τύπος" +02000215="Αντί" +02000216="Μέθοδος" +02000217="Λειτουργικό" +02000218="Σύστημα αρχείων" +02000219="Χρήστης" +0200021A="Ομάδα" +0200021B="Μπλοκ" +0200021C="Σχόλιο" +0200021D="Θέση" +0200021E="Προκαθορισμένη διαδρομή" +0200021F="Φάκελοι" +02000220="Αρχεία" +02000221="Έκδοση" +02000222="Τόμος" +02000223="Πολυτόμος" +02000224="Offset" +02000225="Σύνδεσμοι" +02000226="Μπλοκ" +02000227="Τόμοι" +02000229="64-bit" +0200022A="Big-endian" +0200022B="CPU" +0200022C="Φυσικό μέγεθος" +0200022D="Μέγεθος headers" +0200022E="Άθροισμα ελέγχου" +0200022F="Χαρακτηριστικά" +02000230="Εικονική διεύθυνση" +02000231="ID" +02000232="Σύντομο όνομα" +02000233="Εφαρμογή δημιουργίας" +02000234="Μέγεθος τομέα" +02000235="Κατάσταση λειτουργίας" +02000236="Σύνδεσμος" + +; Status bar +02000301="{0} επιλεγμένα στοιχεία" +02000302="{0} στοιχεία" +02000320="Αρχεία:" +02000321="Φάκελοι:" +02000322="Μέγεθος:" +02000323="Συμπιεσμένο μέγεθος:" +02000324="Αρχεία συμπίεσης:" + +; List Context Menu +02000401="&Στήλες..." +02000411="Άν&οιγμα" +02000412="&Αποσυμπίεση..." + +; ToolBar +02000501="Αποσυμπίεση" + +; Messages +02000601="Οι λειτουργίες ενημέρωσης δεν είναι διαθέσιμες για αυτόν τον τύπο συμπιεσμένου αρχείου." +02000602="Αδυνατή η ενημέρωση του αρχείου συμπίεσης {0}" +02000603="Αδύνατη η δημιουργία του φακέλου '{0}'" +02000604="Η μέθοδος συμπίεσης του αρχείου δεν υποστηρίζεται." +02000605="Σφάλμα" +02000606="Πάρα πολλά στοιχεία" +02000607="Δεν υπάρχει εφαρμογή που να σχετίζεται με τον τύπο του αρχείου." +02000608="Δεν υπάρχουν σφάλματα" +02000609="Δεν μπορεί να ανοιχθεί το αρχείο '{0}' σαν αρχείο συμπίεσης" +0200060A="Δεν μπορεί να ανοιχθεί το κρυπτογραφημένο αρχείο '{0}'. Λάθος κωδικός;" +0200060B="Το σύστημα δεν μπορεί να διαθέσει την απαιτούμενη ποσότητα μνήμης." +0200060C="Άγνωστο σφάλμα" +0200060D="Μη υποστηριζόμενο αρχείο συμπίεσης." + +; Dialogs +02000702="OK" +02000705="&Ναι" +02000707="Ναι σε &όλα" +02000709="Ό&χι" +0200070B="Όχι σε ό&λα" +02000710="Άκυρο" +02000711="&Άκυρο" +02000713="&Κλείσιμο" +02000714="&Διακοπή" +02000715="Επανεκκίνηση" +02000720="Βοήθεια" + +; Extract dialog +02000800="Αποσυμπίεση" +02000801="&Αποσυμπίεση στο φάκελο:" +02000802="Κωδικός πρόσβασης" +02000810="Επιλογές διαδρομών φακέλων " +02000811="Πλήρεις διαδρομές φακέλων" +02000812="Τρέχουσες διαδρομές φακέλων " +02000813="Χωρίς διαδρομές φακέλων" +02000820="Επιλογές αντικατάστασης αρχείων" +02000821="Αντικατάσταση με ερώτηση" +02000822="Αντικατάσταση χωρίς ερώτηση" +02000823="Παράβλεψη των υπαρχόντων αρχείων" +02000824="Αυτόματη μετονομασία" +02000825="Αυτόματη μετονομασία των υπαρχόντων αρχείων" +02000830="Αρχεία" +02000831="&Επιλεγμένα αρχεία" +02000832="&Όλα τα αρχεία" +02000881="Καθορίστε τον φάκελο αποσυμπίεσης." +02000890="Αποσυμπίεση" + +; Overwrite dialog +02000900="Επιβεβαίωση αντικατάστασης του αρχείου" +02000901="Ο φάκελος προορισμού περιέχει ήδη ένα αρχείο με το ίδιο όνομα." +02000902="Θέλετε να αντικαταστήσετε το υπάρχον αρχείο" +02000903="με αυτό;" +02000911="Αυτόματη &μετονομασία" +02000982="{0} bytes" +02000983="τροποποιήθηκε" + +; Messages dialog +02000A00="Διαγνωστικά μηνύματα" +02000A80="Μήνυμα" +02000A91="Μη υποστηριζόμενη μέθοδος συμπίεσης για το '{0}'." +02000A92="Λάθος δεδομένων στο {0}. Το αρχείο είναι φθαρμένο." +02000A93="Ο έλεγχος CRC απέτυχε στο '{0}'. Το αρχείο είναι φθαρμένο." +02000A94="Λάθος δεδομένων στο κρυπτογραφημένο αρχείο '{0}'. Λάθος κωδικός;" +02000A95="Ο έλεγχος CRC απέτυχε στο κρυπτογραφημένο αρχείο '{0}'. Λάθος κωδικός;" + +; Password dialog +02000B00="Εισαγωγή κωδικού πρόσβασης" +02000B01="Κωδικός πρόσβασης:" +02000B02="&Εμφάνιση κωδικού" +02000B03="Επανεισάγετε τον κωδικό πρόσβασης:" +02000B10="Οι κωδικοί δεν ταιριάζουν." +02000B11="Χρησιμοποιήστε μόνο Αγγλικά γράμματα, αριθμούς και ειδικούς χαρακτήρες (!, #, ...) για κωδικό." +02000B12="Ο κωδικός είναι πολύ μεγάλος." + +; Progress dialog +02000C00="Διεργασία" +02000C01="Διανύθηκε:" +02000C02="Απομένει:" +02000C03="Μέγεθος:" +02000C04="Ταχύτητα:" +02000C05="Επεξεργάσθηκαν:" +02000C06="Αναλογία συμπίεσης" +02000C10="Στο &παρασκήνιο" +02000C11="Στο &προσκήνιο" +02000C12="&Διακοπή" +02000C13="&Συνέχεια" +02000C20="Διακόπηκε" +02000C30="Είστε σίγουροι ότι θέλετε να ακυρώσετε;" + +; Compress dialog +02000D00="Προσθήκη σε συμπιεσμένο αρχείο" +02000D01="&Όνομα αρχείου συμπίεσης:" +02000D02="&Τρόπος ενημέρωσης:" +02000D03="Συμπίεση στη μορ&φή:" +02000D04="&Μέθοδος συμπίεσης:" +02000D05="Δημιουργία &συμπαγούς αρχείου" +02000D06="&Παράμετροι:" +02000D07="Επιλογές συμπίεσης" +02000D08="Με αυτόματη αποσυμπίεση (SF&X)" +02000D09="Πολύ-νηματική επεξεργασία" +02000D0A="Κρυπτογράφηση των &ονομάτων" +02000D0B="Επίπεδο συμπίεσης:" +02000D0C="Μέγεθος &λεξικού:" +02000D0D="Μέγεθος &λέξης:" +02000D0E="Χρήση μνήμης για συμπίεση:" +02000D0F="Χρήση μνήμης για αποσυμπίεση:" +02000D10="Κρυπτογράφηση" +02000D11="Μέθοδος κρυπτογράφησης" +02000D12="Αριθμός νημάτων CPU" +02000D13="Μέγεθος συμπαγούς μπλοκ:" +02000D14="Μη-συμπαγές" +02000D15="Συμπαγές" +02000D16="Συμπίεση κοινών αρχείων" +02000D40="Τεμαχισμός σε τόμους:" +02000D41="Λάθος μέγεθος τόμου" +02000D42="Καθορισμένο μέγεθος τόμου: {0} bytes.\nΕίστε σίγουρος ότι θέλετε να χωρίσετε το αρχείο σε τέτοιους τόμους;" +02000D81="Αποθήκευση" +02000D82="Κανονική" +02000D83="Μέγιστη" +02000D84="Γρήγορη" +02000D85="Πολύ γρήγορη" +02000D86="Υπερσυμπίεση" +02000D90="Αναζήτηση" +02000DA1="Προσθήκη και αντικατάσταση αρχείων" +02000DA2="Προσθήκη και ενημέρωση αρχείων" +02000DA3="Ενημέρωση των υπαρχόντων αρχείων" +02000DA4="Συγχρονισμός αρχείων" +02000DB1="Όλα τα αρχεία" +02000DC0="Συμπίεση" + +; Columns dialog +02000E00="Στήλες" +02000E01="Επιλέξτε τις στήλες που θέλετε να φαίνονται σε αυτό το φάκελο. Χρησιμοποιήστε τα πλήκτρα 'πάνω' και 'κάτω' για να επαναδιατάξετε τις στήλες." +02000E02="Η επιλεγμένη στήλη πρέπει να έχει" +02000E03="pixels &πλάτος." +02000E10="Μετακίνηση &πάνω" +02000E11="Μετακίνηση &κάτω" +02000E12="&Εμφάνιση" +02000E13="&Απόκρυψη" +02000E14="Ενεργοποίηση" +02000E81="Τίτλος" +02000E82="Πλάτος" + +; Testing +02000F90="Έλεγχος" + + +; File Manager +03000000="Διαχειριστής αρχείων 7-Zip" + +; Menu +03000102="&Αρχείο" +03000103="&Επεξεργασία" +03000104="Π&ροβολή" +03000105="Εργα&λεία" +03000106="&Βοήθεια" +03000107="Αγα&πημένα" + +; File +03000210="Άν&οιγμα" +03000211="Άνοιγμα στο &ίδιο παράθυρο" +03000212="Άνοιγμα σε &νέο παράθυρο" +03000220="Π&ροβολή" +03000221="Επε&ξεργασία" +03000230="Με&τονομασία" +03000231="Αντι&γραφή..." +03000232="Μετα&κίνηση..." +03000233="Διαγρα&φή" +03000240="&Ιδιότητες" +03000241="Σχόλιο" +03000242="Υπολογισμός αθροίσματος ελέγχου" +03000243="Diff" +03000250="Δημιουργία φακέλου" +03000251="Δημιουργία αρχείου" +03000260="Έ&ξοδος" +03000270="&Τεμαχισμός αρχείου..." +03000271="&Συνένωση αρχείων..." + +; Edit +03000310="Αναίρεσ&η" +03000311="Επανάλη&ψη" +03000320="Απο&κοπή" +03000321="Αντι&γραφή" +03000322="&Επικόλληση" +03000323="Διαγρα&φή" +03000330="Ε&πιλογή όλων" +03000331="Αποεπιλογή όλων" +03000332="Αντιστροφή επιλογής" +03000333="Επιλογή..." +03000334="Αποεπιλογή..." +03000335="Επιλογή σύμφωνα με τον τύπο αρχείου" +03000336="Αποεπιλογή σύμφωνα με τον τύπο αρχείου" + +; View +03000410="Μεγάλα εικονί&δια" +03000411="&Μικρά εικονίδια" +03000412="&Λίστα" +03000413="Λε&πτομέρειες " +03000420="Χωρίς ταξινόμηση" +03000430="Άνοιγμα κεντρικού φακέλου" +03000431="Μετάβαση ένα επίπεδο πάνω" +03000432="&Ιστορικό φακέλων..." +03000440="Α&νανέωση" +03000449="Επίπεδη προβολή" +03000450="Σε &2 τμήματα" +03000451="&Γραμμές εργαλείων" +03000460="Συμπίεσης" +03000461="Βασική" +03000462="Μεγάλα εικονίδια" +03000463="Προβολή κειμένου" + +; Tools +03000510="&Ρυθμίσεις..." +03000511="&Benchmark" + +; Help +03000610="&Περιεχόμενα..." +03000620="Π&ερί του 7-Zip..." + +; Favorites +03000710="&Προσθήκη στα Αγαπημένα ως" +03000720="Σελιδοδείκτης" + +; Options Dialog +03010000="Ρυθμίσεις" + +; Plugins +03010100="Πρόσθετα" +03010101="&Πρόσθετα:" +03010110="Ρυθμίσεις..." + +; Edit +03010200="Πρόγραμμα επεξεργασίας" +03010201="&Πρόγραμμα επεξεργασίας:" +03010202="&Diff:" + +; System +03010300="Σύστημα" +03010302="Συσχέτιση του 7-Zip με τα αρχεία:" +03010310="Πρόσθετο" + +; Settings +03010400="Επιλογές" +03010401="Εμφάνιση αντικειμένου \"..\"" +03010402="Εμφάνιση των κανονικών εικονιδίων των αρχείων" +03010410="Εμφάνιση μενού συστήματος" +03010420="&Επιλογή ολόκληρης διαδρομής" +03010421="Εμφάνιση γραμμών πλέγματος" +03010422="Άνοιγμα αντικειμένου με μονό κλικ" +03010430="Εναλλακτική κατάσταση επιλογής" +03010440="Χρήση μεγάλων &σελίδων μνήμης" + +; Strings +03020201="Αντιγραφή" +03020202="Μετακίνηση" +03020203="Αντιγραφή στο:" +03020204="Μετακίνηση στο:" +03020205="Αντιγραφή..." +03020206="Μετακίνηση..." +03020207="Δεν μπορείτε να μετακινήσετε ή να αντιγράψετε σε τέτοιους φακέλους." +03020208="Η λειτουργία δεν υποστηρίζεται." +03020209="Επιλέξτε φάκελο προορισμού." +03020210="Επιβεβαίωση διαγραφής του αρχείου" +03020211="Επιβεβαίωση διαγραφής του φακέλου" +03020212="Επιβεβαίωση διαγραφής πολλών αρχείων" +03020213="Είστε βέβαιοι ότι θέλετε να διαγράψετε το '{0}' ;" +03020214="Είστε βέβαιοι ότι θέλετε να διαγράψετε το φάκελο '{0}' και όλα τα περιεχόμενα του;" +03020215="Είστε βέβαιοι ότι θέλετε να διαγράψετε αυτά τα {0} στοιχεία;" +03020216="Διαγραφή..." +03020217="Παρουσιάστηκε σφάλμα κατά τη διαγραφή." +03020218="Το σύστημα δεν μπορεί να μετακινήσει ένα αρχείο με μεγάλη διαδρομή στον Κάδο Ανακύκλωσης." +03020220="Μετονομασία..." +03020221="Παρουσιάστηκε σφάλμα κατά τη μετονομασία." +03020222="Επιβεβαίωση αντιγραφής αρχείων" +03020223="Είστε βέβαιος ότι θέλετε να αντιγράψετε τα αρχεία στο αρχείο συμπίεσης;" +03020230="Δημιουργία φακέλου" +03020231="Όνομα φακέλου:" +03020232="Νέος φάκελος" +03020233="Σφάλμα κατά την δημιουργία φακέλου." +03020240="Δημιουργία αρχείου" +03020241="Όνομα αρχείου:" +03020242="Νέο αρχείο" +03020243="Σφάλμα κατά την δημιουργία αρχείου." +03020250="Επιλογή" +03020251="Αποεπιλογή" +03020252="Με όνομα:" +03020260="Ιστορικό φακέλων" +03020280="Το αρχείο '{0}' τροποποιήθηκε.\nΘέλετε να ενημερώσετε το αρχείο συμπίεσης;" +03020281="Αδυνατή η ενημέρωση του αρχείου\n'{0}'" +03020282="Δεν είναι δυνατή η εκκίνηση του προγράμματος επεξεργασίας." +03020283="Άνοιγμα..." +03020284="Το αρχείο μοιάζει με ιό (το όνομα του περιέχει μεγάλα κενά)." +03020290="Σχόλιο" +03020291="&Σχόλιο:" +030202A0="Σύστημα" +03020300="Υπολογιστής" +03020301="Δικτύο" +03020302="Έγγραφα" +03020400="Προσθήκη" +03020401="Αποσυμπίεση" +03020402="Έλεγχος" +03020420="Αντιγραφή" +03020421="Μετακίνηση" +03020422="Διαγραφή" +03020423="Πληροφορίες" +03020500="Τεμαχισμός αρχείου" +03020501="&Τεμαχισμός σε:" +03020510="Τεμαχισμός..." +03020520="Επιβεβαίωση τεμαχισμού" +03020521="Είστε βέβαιος ότι θέλετε να τεμαχίσετε το αρχείο σε {0} τόμους;" +03020522="Το μέγεθος του τόμου πρέπει να είναι μικρότερο από αυτό του αρχικού αρχείου." +03020600="Συνένωση αρχείων" +03020601="&Συνένωση σε:" +03020610="Συνένωση..." +03020620="Επιλέξτε μόνο το πρώτο αρχείο" +03020621="Το αρχείο δεν μπορεί να ανιχνευθεί ως μέρος τεμαχισμένου αρχείου." +03020622="Δεν μπορούν να βρεθούν πάνω από ένα μέρη τεμαχισμένου αρχείου." +03020710="Υπολογισμός αθροίσματος ελέγχου..." +03020720="Πληροφορίες αθροίσματος ελέγχου" +03020721="Άθροισμα ελέγχου CRC για δεδομένα:" +03020722="Άθροισμα ελέγχου CRC για δεδομένα και ονόματα:" +03020800="Σάρωση..." +03020900="Ιδιότητες" +03020A01="Η λειτουργία δεν μπορεί να κληθεί από ένα φάκελο που έχει μεγάλη διαδρομή." +03020A02="Πρέπει να επιλέξετε ένα αρχείο." +03020A03="Πρέπει να επιλέξετε ένα ή περισσότερα αρχεία." +03020A04="Το αρχείο {0} ήδη υπάρχει." + + +; Computer +03031100="Συνολικό μέγεθος" +03031101="Ελεύθερος χώρος" +03031102="Μέγεθος συμπλέγματος" +03031103="Ετικέτα" + +; Network +03031200="Τοπικό όνομα" +03031201="Παροχέας" + +; Benchmark Dialog +03080000="Benchmark" +03080001="Χρήση μνήμης:" +03080002="Συμπίεση" +03080003="Αποσυμπίεση" +03080004="Ταχύτητα" +03080005="Εκτίμηση" +03080006="Συνολ. εκτίμηση" +03080007="Τρέχων πέρασμα" +03080008="Αποτέλεσμα" +03080009="Περάσματα:" +0308000A="Σφάλματα:" +0308000B="Χρήση CPU" +0308000C="Ταξ/μιση/Χρήση" + +;!@LangEnd@! diff --git a/GUI/Lang/en.ttt b/GUI/Lang/en.ttt new file mode 100644 index 0000000..29cc869 --- /dev/null +++ b/GUI/Lang/en.ttt @@ -0,0 +1,543 @@ +;!@Lang@!UTF-8! +; 7-Zip 9.07 +; Translated by Igor Pavlov +; +; +; +; + +00000000="English" +00000001="English" +00000002="9" + +; 7-Zip Configuration + +; Title +01000000="7-Zip Configuration" + +; Info Page +01000100="About 7-Zip" +01000103="7-Zip is free software" +01000104="Support" +01000105="Register" + +; Folders Page +01000200="Folders" +01000210="&Working folder" +01000211="&System temp folder" +01000212="&Current" +01000213="&Specified:" +01000214="Use for removable drives only" + +01000281="Specify a location for temporary archive files." + +; System Page +01000300="System" +01000301="Integrate 7-Zip to shell context menu" +01000302="Cascaded context menu" +01000310="Context menu items:" + +; Language Page +01000400="Language" +01000401="Language:" + + +; 7-Zip Explorer extension + +; Context menu +02000101="7-Zip" +02000102="7-Zip commands" +02000103="Open archive" +02000104="Opens the selected archive." +02000105="Extract files..." +02000106="Extracts files from the selected archive." +02000107="Add to archive..." +02000108="Adds the selected items to archive." +02000109="Test archive" +0200010A="Tests integrity of the selected archive." +0200010B="Extract Here" +0200010C="Extracts files from the selected archive to current folder." +0200010D="Extract to {0}" +0200010E="Extracts files to subfolder." +0200010F="Add to {0}" +02000110="Adds the selected items to archive." +02000111="Compress and email..." +02000112="Compresses the selected items to archive and sends archive via email." +02000113="Compress to {0} and email" +02000114="Compresses the selected items to archive and sends archive via email." + +02000140="" +02000141="" + +; Properties +02000203="Path" +02000204="Name" +02000205="Extension" +02000206="Folder" +02000207="Size" +02000208="Packed Size" +02000209="Attributes" +0200020A="Created" +0200020B="Accessed" +0200020C="Modified" +0200020D="Solid" +0200020E="Commented" +0200020F="Encrypted" +02000210="Split Before" +02000211="Split After" +02000212="Dictionary" +02000213="CRC" +02000214="Type" +02000215="Anti" +02000216="Method" +02000217="Host OS" +02000218="File System" +02000219="User" +0200021A="Group" +0200021B="Block" +0200021C="Comment" +0200021D="Position" +0200021E="Path Prefix" +0200021F="Folders" +02000220="Files" +02000221="Version" +02000222="Volume" +02000223="Multivolume" +02000224="Offset" +02000225="Links" +02000226="Blocks" +02000227="Volumes" + +02000229="64-bit" +0200022A="Big-endian" +0200022B="CPU" +0200022C="Physical Size" +0200022D="Headers Size" +0200022E="Checksum" +0200022F="Characteristics" +02000230="Virtual Address" +02000231="ID" +02000232="Short Name" +02000233="Creator Application" +02000234="Sector Size" +02000235="Mode" +02000236="Link" + +; Status bar +02000301="{0} object(s) selected" +02000302="{0} object(s)" + +02000320="Files:" +02000321="Folders:" +02000322="Size:" +02000323="Compressed size:" +02000324="Archives:" + +; List Context Menu +02000401="&Columns..." + +02000411="&Open" +02000412="&Extract..." + +; ToolBar +02000501="Extract" + +; Messages +02000601="Update operations are not supported for this archive." +02000602="Cannot update archive {0}" +02000603="Cannot create folder '{0}'" +02000604="File is not supported archive." +02000605="Error" +02000606="Too many items" +02000607="There is no application associated with the given file name extension" +02000608="There are no errors" +02000609="Can not open file '{0}' as archive" +0200060A="Can not open encrypted archive '{0}'. Wrong password?" +0200060B="The system cannot allocate the required amount of memory" +0200060C="Unknown error" +0200060D="Unsupported archive type" + +; Dialogs +02000702="OK" +02000705="&Yes" +02000707="Yes to &All" +02000709="&No" +0200070B="No to A&ll" + +02000710="Cancel" +02000711="&Cancel" +02000713="&Close" +02000714="Stop" +02000715="Restart" + +02000720="Help" + +; Extract dialog +02000800="Extract" +02000801="E&xtract to:" +02000802="Password" + +02000810="Path mode" +02000811="Full pathnames" +02000812="Current pathnames" +02000813="No pathnames" + +02000820="Overwrite mode" +02000821="Ask before overwrite" +02000822="Overwrite without prompt" +02000823="Skip existing files" +02000824="Auto rename" +02000825="Auto rename existing files" + +02000830="Files" +02000831="&Selected files" +02000832="&All files" + +02000881="Specify a location for extracted files." + +02000890="Extracting" + +; Overwrite dialog +02000900="Confirm File Replace" +02000901="Destination folder already contains processed file." +02000902="Would you like to replace the existing file" +02000903="with this one?" + +02000911="A&uto Rename" + +02000982="{0} bytes" +02000983="modified on" + +; Messages dialog +02000A00="Diagnostic messages" + +02000A80="Message" + +02000A91="Unsupported compression method for '{0}'." +02000A92="Data error in '{0}'. File is broken." +02000A93="CRC failed in '{0}'. File is broken." +02000A94="Data error in encrypted file '{0}'. Wrong password?" +02000A95="CRC failed in encrypted file '{0}'. Wrong password?" + +; Password dialog +02000B00="Enter password" +02000B01="Enter password:" +02000B02="&Show password" +02000B03="Reenter password:" +02000B10="Passwords do not match" +02000B11="Use only English letters, numbers and special characters (!, #, $, ...) for password" +02000B12="Password is too long" + +; Progress dialog +02000C00="Process" +02000C01="Elapsed time:" +02000C02="Remaining time:" +02000C03="Total size:" +02000C04="Speed:" +02000C05="Processed:" +02000C06="Compression ratio:" + +02000C10="&Background" +02000C11="&Foreground" +02000C12="&Pause" +02000C13="&Continue" + +02000C20="Paused" + +02000C30="Are you sure you want to cancel?" + +; Compress dialog +02000D00="Add to archive" +02000D01="&Archive:" +02000D02="&Update mode:" +02000D03="Archive &format:" +02000D04="Compression &method:" +02000D05="Create &Solid archive" +02000D06="&Parameters:" +02000D07="Options" +02000D08="Create SF&X archive" +02000D09="Multi-threading" +02000D0A="Encrypt file &names" +02000D0B="Compression &level:" +02000D0C="&Dictionary size:" +02000D0D="&Word size:" +02000D0E="Memory usage for Compressing:" +02000D0F="Memory usage for Decompressing:" +02000D10="Encryption" +02000D11="Encryption method:" +02000D12="Number of CPU threads:" +02000D13="Solid block size:" +02000D14="Non-solid" +02000D15="Solid" +02000D16="Compress shared files" + +02000D40="Split to &volumes, bytes:" +02000D41="Incorrect volume size" +02000D42="Specified volume size: {0} bytes.\nAre you sure you want to split archive into such volumes?" + +02000D81="Store" +02000D82="Normal" +02000D83="Maximum" +02000D84="Fast" +02000D85="Fastest" +02000D86="Ultra" + +02000D90="Browse" + +02000DA1="Add and replace files" +02000DA2="Update and add files" +02000DA3="Freshen existing files" +02000DA4="Synchronize files" + +02000DB1="All Files" + +02000DC0="Compressing" + +; Columns dialog +02000E00="Columns" +02000E01="Check the columns that you would like to make visible in this folder. Use the Move Up and Move Down buttons to reorder the columns." +02000E02="The selected column should be" +02000E03="pixels &wide." + +02000E10="Move &Up" +02000E11="Move &Down" +02000E12="&Show" +02000E13="&Hide" +02000E14="Set" + +02000E81="Title" +02000E82="Width" + +; Testing +02000F90="Testing" + + +; File Manager + +03000000="7-Zip File Manager" + +; Menu +03000102="&File" +03000103="&Edit" +03000104="&View" +03000105="&Tools" +03000106="&Help" +03000107="F&avorites" + +; File +03000210="&Open" +03000211="Open &Inside" +03000212="Open O&utside" +03000220="&View" +03000221="&Edit" +03000230="Rena&me" +03000231="&Copy To..." +03000232="&Move To..." +03000233="&Delete" +03000240="P&roperties" +03000241="Comme&nt..." +03000242="Calculate checksum" +03000243="Diff" +03000250="Create Folder" +03000251="Create File" +03000260="E&xit" +03000270="&Split file..." +03000271="Com&bine files..." + +; Edit +03000310="&Undo" +03000311="&Redo" +03000320="Cu&t" +03000321="&Copy" +03000322="&Paste" +03000323="&Delete" +03000330="Select &All" +03000331="Deselect All" +03000332="&Invert Selection" +03000333="Select..." +03000334="Deselect..." +03000335="Select by Type" +03000336="Deselect by Type" + +; View +03000410="Lar&ge Icons" +03000411="S&mall Icons" +03000412="&List" +03000413="&Details" +03000420="Unsorted" +03000430="Open Root Folder" +03000431="Up One Level" +03000432="Folders History..." +03000440="&Refresh" +03000449="Flat View" +03000450="&2 Panels" +03000451="&Toolbars" +03000460="Archive Toolbar" +03000461="Standard Toolbar" +03000462="Large Buttons" +03000463="Show Buttons Text" + +; Tools +03000510="&Options..." +03000511="&Benchmark" + +; Help +03000610="&Contents..." +03000620="&About 7-Zip..." + +; Favorites +03000710="&Add folder to Favorites as" +03000720="Bookmark" + +; Options Dialog + +03010000="Options" + +; Plugins +03010100="Plugins" +03010101="&Plugins:" +03010110="Options..." + +; Edit +03010200="Editor" +03010201="&Editor:" +03010202="&Diff:" + +; System +03010300="System" +03010302="Associate 7-Zip with:" +03010310="Plugin" + +; Settings +03010400="Settings" +03010401="Show \"..\" item" +03010402="Show real file icons" +03010410="Show system menu" +03010420="&Full row select" +03010421="Show &grid lines" +03010422="Single-click to open an item" +03010430="&Alternative selection mode" +03010440="Use &large memory pages" + +; Strings + +03020201="Copy" +03020202="Move" +03020203="Copy to:" +03020204="Move to:" +03020205="Copying..." +03020206="Moving..." +03020207="You cannot move or copy items for such folders." +03020208="The operation is not supported for this folder." +03020209="Select destination folder." + +03020210="Confirm File Delete" +03020211="Confirm Folder Delete" +03020212="Confirm Multiple File Delete" +03020213="Are you sure you want to delete '{0}'?" +03020214="Are you sure you want to delete the folder '{0}' and all its contents?" +03020215="Are you sure you want to delete these {0} items?" +03020216="Deleting..." +03020217="Error Deleting File or Folder" +03020218="The system cannot move a file with long path to the Recycle Bin" + +03020220="Renaming..." +03020221="Error Renaming File or Folder" +03020222="Confirm File Copy" +03020223="Are you sure you want to copy files to archive" + +03020230="Create Folder" +03020231="Folder name:" +03020232="New Folder" +03020233="Error Creating Folder" + +03020240="Create File" +03020241="File Name:" +03020242="New File" +03020243="Error Creating File" + +03020250="Select" +03020251="Deselect" +03020252="Mask:" + +03020260="Folders History" + +03020280="File '{0}' was modified.\nDo you want to update it in the archive?" +03020281="Can not update file\n'{0}'" +03020282="Cannot start editor." +03020283="Opening..." +03020284="The file looks like a virus (the file name contains long spaces in name)." + +03020290="Comment" +03020291="&Comment:" + +030202A0="System" + +03020300="Computer" +03020301="Network" +03020302="Documents" + +03020400="Add" +03020401="Extract" +03020402="Test" + +03020420="Copy" +03020421="Move" +03020422="Delete" +03020423="Info" + +03020500="Split File" +03020501="&Split to:" +03020510="Splitting..." +03020520="Confirm Splitting" +03020521="Are you sure you want to split file into {0} volumes?" +03020522="Volume size must be smaller than size of original file" + +03020600="Combine Files" +03020601="&Combine to:" +03020610="Combining..." +03020620="Select only first part of split file" +03020621="Can not detect file as part of split file" +03020622="Can not find more than one part of split file" + +03020710="Checksum calculating..." +03020720="Checksum information" +03020721="CRC checksum for data:" +03020722="CRC checksum for data and names:" + +03020800="Scanning..." + +03020900="Properties" + +03020A01="The operation cannot be called from a folder that has a long path." +03020A02="You must select one file" +03020A03="You must select one or more files" +03020A04="File {0} is already exist" + +; Computer +03031100="Total Size" +03031101="Free Space" +03031102="Cluster Size" +03031103="Label" + +; Network +03031200="Local Name" +03031201="Provider" + +; Benchmark Dialog + +03080000="Benchmark" +03080001="Memory usage:" +03080002="Compressing" +03080003="Decompressing" +03080004="Speed" +03080005="Rating" +03080006="Total Rating" +03080007="Current" +03080008="Resulting" +03080009="Passes:" +0308000A="Errors:" +0308000B="CPU Usage" +0308000C="Rating / Usage" + +;!@LangEnd@! diff --git a/GUI/Lang/eo.txt b/GUI/Lang/eo.txt new file mode 100644 index 0000000..3ada843 --- /dev/null +++ b/GUI/Lang/eo.txt @@ -0,0 +1,473 @@ +;!@Lang@!UTF-8! +; 7-Zip 4.37 +; Translated by Dmitri Gabinski +; +; +; +; + +00000000="Esperanto" +00000001="Esperanto" +00000002="" + +; 7-Zip Configuration + +; Title +01000000="7-Zip-Konfiguro" + +; Info Page +01000100="Informo" +01000103="7-Zip estas senpaga programo. Tamen, vi povas subteni evoluadon de 7-Zip per enregistriĝo." +01000104="Subteno" +01000105="Enregistriĝo" + +; Folders Page +01000200="Dosierujoj" +01000210="&Kuranta dosierujo" +01000211="&Sistema labora dosierujo" +01000212="&Ĉi tiu" +01000213="&Specifu:" +01000214="&Uzi nur por demeteblaj datumportiloj" + +01000281="Specifu ujon por laboraj dosieroj." + +; System Page +01000300="Sistemo" +01000301="Metu 7-Zip'on en kuntekstan menuon de ŝelo" +01000302="Kaskada kunteksta menuo" +01000310="Punktoj de kunteksta menuo:" + +; Language Page +01000400="Lingvo" +01000401="Lingvo:" + + +; 7-Zip Explorer extension + +; Context menu +02000101="7-Zip" +02000102="Komandoj de 7-Zip" +02000103="Malfermu" +02000104="Malfermu markitan dosieron." +02000105="Elarĥivigu dosierojn..." +02000106="Elarĥivigo de dosieroj el markita arĥivo." +02000107="Enarĥivigu..." +02000108="Enarĥivigu markitajn objektojn." +02000109="Testu arĥivon" +0200010A="Testo de kohero de markita arĥivo." +0200010B="Elarĥivigu ĉi-tien" +0200010C="Elarĥivigo de dosieroj el markita arĥivo en kurantan dosierujon." +0200010D="Elarĥivigu en {0}" +0200010E="Elarĥvigas dosierojn en subdosierujon." +0200010F="Aldonu al {0}" +02000110="Aldonu markitajn aĵojn al arĥivo." +02000111="Enarĥivigu kaj enretpoŝtigu..." +02000112="Enarĥivigu la markitajn aĵojn kaj enretpoŝtigu la arĥivon." +02000113="Enarĥivigu en {0} kaj enretpoŝtigu..." +02000113="Enarĥivigu la markitajn aĵojn kaj enretpoŝtigu la arĥivon." + +02000140="" +02000141="" + +; Properties +02000203="Dosierindiko" +02000204="Nomo" +02000205="Dosiernoma sufikso" +02000206="Dosierujo" +02000207="Grando" +02000208="Enarĥiva grando" +02000209="Atributoj" +0200020A="Kreita" +0200020B="Malfermita" +0200020C="Ŝanĝita" +0200020D="Solida" +0200020E="Komento" +0200020F="Ĉifra" +02000210="Disigita antaŭ" +02000211="Disigita post" +02000212="Vortaro" +02000213="CRC" +02000214="Tipo" +02000215="Kontraŭ" +02000216="Metodo" +02000217="Gastiga operaciumo" +02000218="Dosiersistemo" +02000219="Uzulo" +0200021A="Grupo" +0200021B="Bloko" +0200021C="Komento" +0200021D="Pozicio" +0200021E="Vojprefikso" + +; Status bar +02000301="{0} objekto(j) markita(j)" +02000302="{0} objekto(j)" + +02000320="Dosieroj:" +02000321="Dosierujoj:" +02000322="Grando:" + +; List Context Menu +02000401="&Kolumnoj..." + +02000411="&Malfermu" +02000412="&Elarĥivigu..." + +; ToolBar +02000501="Elarĥivigu" + +; Messages +02000601="Ĝisdatigoperacioj ne estas subtenataj por ĉi-tiu arĥivo." +02000602="Fiaskis ĝisdatigi arĥivon {0}" +02000603="Fiaskis krei dosierujon '{0}'" +02000604="Dosiero ne estas subtenata arĥivo." +02000605="Eraro" +02000606="Troaj elementoj" +02000607="Mankas kunligita programo" +02000608="Eraroj ne trovitaj" + +; Dialogs +02000702="B&one" +02000705="&Jes" +02000707="Jes por ĉ&iuj" +02000709="&Ne" +0200070B="Ne por ĉi&uj" + +02000710="Nuligu" +02000711="&Nuligu" +02000713="&Fermu" +02000714="&Haltu" +02000715="Restartigu" + +02000720="Helpo" + +; Extract dialog +02000800="&Elarĥivigu" +02000801="E&larĥivigu en:" +02000802="&Pasvorto" + +02000810="Dosierindikoj" +02000811="&Absolutaj dosierindikoj" +02000812="&Relativaj dosierindikoj" +02000813="&Sen dosierindikoj" + +02000820="Anstataŭiga skribreĝimo" +02000821="&Kun konfirmo" +02000822="&Sen konfirmo" +02000823="&Preterlasu estantaj dosieroj" +02000824="Aŭtonomŝanĝo" +02000825="Aŭtonomŝanĝo de ekzistantaj dosieroj" + +02000830="Dosieroj" +02000831="&Markitaj dosieroj" +02000832="Ĉ&iuj dosieroj" + +02000881="Specifu ujon por elarĥivendaj dosieroj." + +02000890="Elarĥivigo" + +; Overwrite dialog +02000900="Konfirmo de nomŝanĝo" +02000901="Dosierujo jam enhavas prilaboratan dosieron." +02000902="Anstataŭigu estantan dosieron" +02000903="per ĉi-tiu?" + +02000911="&Aŭtonomŝanĝo." + +02000982="{0} bajtoj" +02000983="anstataŭigitaj per" + +; Messages dialog +02000A00="Diagnozaj mesaĝoj" + +02000A80="Mesaĝo" + +02000A91="Ne estas subtenata densigmetodo por dosiero '{0}'." +02000A92="Datumeraro en '{0}'. Difektiĝinta dosiero." +02000A93="CRC-eraro en '{0}'. Difektiĝinta dosiero." + +; Password dialog +02000B00="Pasvorto" +02000B01="Enigu pasvorton:" +02000B02="&Montru pasvorton" + +; Progress dialog +02000C00="Procezo" +02000C01="Pasinta tempo:" +02000C02="Restanta tempo:" +02000C03="Grando:" +02000C04="Rapideco:" + +02000C10="&Fono" +02000C11="&Malfono" +02000C12="&Paŭzo" +02000C13="&Daŭrigu" + +02000C20="Paŭzita" + +02000C30="Ĉu vi vere volas nuligi?" + +; Compress dialog +02000D00="Enarĥivigu" +02000D01="&Arĥivo:" +02000D02="A&nstataŭigreĝimo:" +02000D03="A&rĥivformato:" +02000D04="&Densigmetodo:" +02000D05="Kreu &solidan arĥivon" +02000D06="&Parametroj:" +02000D07="Agordoj" +02000D08="Kreu SF&X-arĥivon" +02000D09="Disfadenigo" +02000D0A="Ĉifru dosier&nomojn" +02000D0B="Densigo&nivelo" +02000D0C="&Vortarogrando:" +02000D0D="Vo&rtogrando:" +02000D0E="Memoruzo por densigo:" +02000D0F="Memoruzo por maldensigo:" + +02000D40="&Plurvolumigu, bajtoj:" + +02000D81="Sen densigo" +02000D82="Normala densigo" +02000D83="Maksimuma densigo" +02000D84="Rapide" +02000D85="Plej rapide" +02000D86="Ultra" + +02000D90="Foliumu" + +02000DA1="Aldonu kaj anstataŭigu dosierojn" +02000DA2="Ĝisdatigu kaj aldonu dosierojn" +02000DA3="Refreŝigu estantajn dosierojn" +02000DA4="Sinkronigu dosierojn" + +02000DB1="Ĉiuj dosieroj" + +02000DC0="Densigo" + +; Columns dialog +02000E00="Kolumnoj" +02000E01="Marku kolumnojn, enarĥivendaj en ĉi-tiu dosierujo. Per butonoj Supren kaj Suben eblas difini sekvordo de kolumnoj." +02000E02="Markita kolumno devas havi &larĝecon de" +02000E03="rastumeroj." + +02000E10="&Supren" +02000E11="S&uben" +02000E12="&Montru" +02000E13="&Kaŝu" +02000E14="Difinu" + +02000E81="Nomo" +02000E82="Larĝeco" + +; Testing +02000F90="Testado" + + +; File Manager + +03000000="7-Zip-dosieradministrilo" + +; Menu +03000102="&Dosiero" +03000103="&Redakto" +03000104="&Vido" +03000105="&Agordoj" +03000106="&Helpo" +03000107="&Favoritaj" + +; File +03000210="&Malfermu" +03000211="Malfermu &ene" +03000212="Malfermu ek&stere" +03000220="&Vidigu" +03000221="&Redaktu" +03000230="Ŝ&anĝu nomon" +03000231="&Kopiu en..." +03000232="M&ovu en..." +03000233="&Forigu" +03000240="A&tributoj" +03000241="Ko&mentu" +03000242="Kalkulu kontrolsumon" +03000250="Kreu &dosierujon" +03000251="Kre&u dos&ieron" +03000260="E&liru" +03000270="&Erigu dosierojn..." +03000271="Komb&inu dosierojn..." + +; Edit +03000310="&Malfaru" +03000311="&Refaru" +03000320="&Tondu" +03000321="&Kopiu" +03000322="Al&gluu" +03000323="&Forigu" +03000330="M&arku ĉiun" +03000331="Ma&lmarku ĉiun" +03000332="&Inversigu markon" +03000333="Marku..." +03000334="Malmarku..." +03000335="Marku laŭ tipo" +03000336="Malmarku laŭ tipo" + +; View +03000410="&Grandaj bildetoj" +03000411="&Malgrandaj bildetoj" +03000412="&Listo" +03000413="&Detale" +03000420="&Neordigite" +03000430="Malfermu radikan dosierujon" +03000431="Supren je unu nivelo" +03000432="Dosierujhistorio..." +03000440="Ĝ&isdatigu" +03000449="Ununivela vido" +03000450="&2 paneloj" +03000451="&Ilobretoj" +03000460="Arĥivo-ilobreto" +03000461="Norma ilobreto" +03000462="Grandaj bildetoj" +03000463="Montru butontekston" + +; Tools +03000510="&Agordoj..." +03000511="&Etalono" + +; Help +03000610="&Enhavo..." +03000620="&Pri 7-Zip..." + +; Favorites +03000710="&Aldonu dosierujon al favorataj kiel" +03000720="Legosigno" + +; Options Dialog + +03010000="Agordoj" + +; Plugins +03010100="Kromaĵoj" +03010101="&Kromaĵoj:" +03010110="Agordoj" + +; Edit +03010200="Redaktilo" +03010201="&Redaktilo:" + +; System +03010300="Sistemo" +03010302="Asociu 7-Zip-on kun dosieroj:" +03010310="Kromaĵo" + +; Settings +03010400="Agordoj" +03010401="Montru \"..\"-elementon" +03010402="Montru realajn dosierbildetojn" +03010410="Montru sisteman menuon" +03010420="Marku &tutan linion" +03010421="Montru &kradliniojn" +03010430="&Alternativa markreĝimo" +03010440="Uzu &grandajn memorpaĝojn" + +; Strings + +03020201="Kopiu" +03020202="Movu" +03020203="Kopiu en:" +03020204="Movu en:" +03020205="Kopio..." +03020206="Movo..." +03020207="Maleblas kopii objektojn por tiaj dosieroj." +03020208="Operacio ne estas subtenata." + +03020210="Konfirmo de forigo de dosiero" +03020211="Konfirmo de forigo de dosierujo" +03020212="Konfirmo de forigo de dosieraro" +03020213="Ĉu vi vere volas forigi '{0}'?" +03020214="Ĉu vi vere volas forigi dosierujon \"{0}\" kaj tutan ĝian enhavon?" +03020215="Ĉu vi vere volas forigi ĉi tiajn {0} objektojn?" +03020216="Forigo..." +03020217="Eraro dum forigo de dosiero aŭ dosierujo" + +03020220="Nomŝanĝo..." +03020221="Eraro dum nomŝanĝo de dosiero aŭ dosierujo" +03020222="Konfirmu dosierkopion" +03020223="Ĉu vere kopii dosierojn enarĥiven" + +03020230="Kreu dosierujon" +03020231="Dosierujnomo:" +03020232="Nova dosierujo" +03020233="Eraro dum dosierujkreo" + +03020240="Kreu dosieron" +03020241="Dosiernomo:" +03020242="Nova dosiero" +03020243="Eraro dum dosierkreo" + +03020250="Marku" +03020251="Malmarku" +03020252="Masko:" + +03020260="Dosierujhistorio" + +03020280="Dosiero '{0}' ŝanĝiĝis.\nĈu vi volas ĝistadigi ĝin enraĥive?" +03020281="Fiaskis ĝisdatigi dosieron\n'{0}''" +03020282="Fiaskis startigi redaktilon." +03020283="Malfermo..." + +03020290="Komento" +03020291="&Komento:" + +030202A0="Sistemo" + +03020300="Komputilo" +03020301="Reto" + +03020400="Enarĥivigu" +03020401="Elarĥivigu" +03020402="Testu" + +03020420="Kopiu" +03020421="Movu" +03020422="Forigu" +03020423="Informo" + +03020500="Erigu dosieron" +03020501="&Erigu en:" +03020510="Erigo..." + +03020600="Kombinu dosierojn" +03020601="&Kombinu en:" +03020610="Kombino..." + +03020710="Kalkulante kontrolsumon..." +03020720="Informo pri kontrolsumo" +03020721="CRC-kontrolsumo por datumoj:" +03020722="CRC-kontrolsumo por datumoj kaj nomoj:" + +03020800="Analizante..." + +; Computer +03031100="Kapacito" +03031101="Libera" +03031102="Faskogrando" +03031103="Marko" + +; Network +03031200="Loka nomo" +03031201="Provizanto" + +; Benchmark Dialog + +03080000="Etalono" +03080001="Memoruzo:" +03080002="Densigo" +03080003="Maldensigo" +03080004="Rapideco" +03080005="Takso" +03080006="Tuta takso" +03080007="Kuranta" +03080008="Rezulta" +03080009="Pasoj:" +0308000A="Eraroj:" + +;!@LangEnd@! diff --git a/GUI/Lang/es.txt b/GUI/Lang/es.txt new file mode 100644 index 0000000..272b309 --- /dev/null +++ b/GUI/Lang/es.txt @@ -0,0 +1,544 @@ +;!@Lang@!UTF-8! +; 7-Zip 3.08 Beta +; Translated by Jbc25 based in original file of Igor Pavlov +; 7-Zip 4.54 Beta (en.ttt 4.53) +; Updated by Guillermo Gabrielli - 05/09/2007 +; 7-Zip 9.07 +; Updated by Purgossu - 10/06/2010 +; Corrected by Sergi Medina - 2010/10/23 + +00000000="Spanish" +00000001="Español" +00000002="10" + +; 7-Zip Configuration + +; Title +01000000="Configuración de 7-Zip" + +; Info Page +01000100="Acerca de 7-Zip" +01000103="7-Zip es un programa excelente; además, es libre y gratuito. Tú puedes apoyar el desarrollo de 7-Zip registrándote para contribuir a mejorar el programa." +01000104="Asistencia" +01000105="Registro" + +; Folders Page +01000200="Directorios" +01000210="Directorio de &trabajo" +01000211="Directorio temporal del &sistema" +01000212="Directorio &actual" +01000213="&Especificar directorio:" +01000214="Usar solo para dispositivos extraíbles" + +01000281="Especificar un directorio para archivos temporales." + +; System Page +01000300="Sistema" +01000301="Integrar 7-Zip en el menú contextual de Windows" +01000302="Menú contextual en cascada" +01000310="Elementos en el menú contextual:" + +; Language Page +01000400="Lengua" +01000401="Lengua:" + + +; 7-Zip Explorer extension + +; Context menu +02000101="7-Zip" +02000102="Comandos de 7-Zip" +02000103="Abrir comprimido" +02000104="Abre el archivo seleccionado." +02000105="Extraer ficheros..." +02000106="Extrae los ficheros del archivo seleccionado." +02000107="Añadir al archivo..." +02000108="Añade los ficheros seleccionados al archivo." +02000109="Comprobar archivo" +0200010A="Comprueba la integridad del archivo seleccionado." +0200010B="Extraer aquí" +0200010C="Extrae los ficheros del archivo seleccionado a la carpeta actual." +0200010D="Extraer en {0}" +0200010E="Extrae ficheros a una subcarpeta." +0200010F="Añadir a {0}" +02000110="Añade los elementos seleccionados al archivo." +02000111="Comprimir y enviar por correo..." +02000112="Comprimir los elementos selecionados a un archivo y enviarlos por correo." +02000113="Comprimir a {0} y enviar por correo" +02000114="Comprimir los elementos selecionados a un archivo y enviarlos por correo." + +02000140="" +02000141="" + +; Properties +02000203="Ruta" +02000204="Nombre" +02000205="Tipo de archivo" +02000206="Directorio" +02000207="Tamaño" +02000208="Tamaño comprimido" +02000209="Atributos" +0200020A="Creado" +0200020B="Acceso" +0200020C="Modificado" +0200020D="Compacto" +0200020E="Comentado" +0200020F="Encriptado" +02000210="expandido antes" +02000211="expandido después" +02000212="Diccionario" +02000213="CRC" +02000214="Tipo" +02000215="Anti" +02000216="Método" +02000217="SO de origen" +02000218="Sistema de archivos" +02000219="Usuario" +0200021A="Grupo" +0200021B="Bloque" +0200021C="Comentario" +0200021D="Posición" +0200021E="Ruta" +0200021F="Directorios" +02000220="Ficheros" +02000221="Versión" +02000222="Volumen" +02000223="Multivolumen" +02000224="Desplazamiento" +02000225="Vínculos" +02000226="Bloques" +02000227="Volúmenes" + +02000229="64-bit" +0200022A="Big-endian" +0200022B="CPU" +0200022C="Tamaño físico" +0200022D="Tamaño de las cabeceras" +0200022E="Verificación de suma" +0200022F="Características" +02000230="Dirección virtual" +02000231="ID" +02000232="Nombre corto" +02000233="Aplicación de creación" +02000234="Tamaño de sector" +02000235="Modo" +02000236="Enlace" + +; Status bar +02000301="{0} elemento(s) seleccionado(s)" +02000302="{0} elemento(s)" + +02000320="Ficheros:" +02000321="Directorios:" +02000322="Tamaño:" +02000323="Tamaño comprimido:" +02000324="Archivos:" + +; List Context Menu +02000401="&Columnas..." + +02000411="&Abrir" +02000412="&Extraer..." + +; ToolBar +02000501="Extraer" + +; Messages +02000601="Este tipo de archivo no permite actualización." +02000602="No se puede actualizar el archivo {0}" +02000603="No se puede crear el directorio '{0}'" +02000604="Tipo de archivo no reconocible." +02000605="Error" +02000606="Demasiados elementos" +02000607="No hay ningún programa asociado a esta extensión de archivo" +02000608="No hay errores" +02000609="No se puede abrir '{0}' como un archivo comprimido" +0200060A="No se puede abrir el archivo encriptado '{0}'. Verifique la contraseña." +0200060B="El sistema no ha podido asignar la cantidad necesaria de memoria" +0200060C="Error desconocido" +0200060D="Tipo de archivo no soportado" + +; Dialogs +02000702="Aceptar" +02000705="&Sí" +02000707="Sí a &todo" +02000709="&No" +0200070B="No a t&odo" + +02000710="Cancelar" +02000711="&Cancelar" +02000713="&Cerrar" +02000714="Parar" +02000715="Volver a empezar" + +02000720="Ayuda" + +; Extract dialog +02000800="Extraer" +02000801="E&xtraer a:" +02000802="Contraseña" + +02000810="Modo de directorio" +02000811="Directorio completo" +02000812="Directorio relativo" +02000813="Sin directorio" + +02000820="Sobreescribir" +02000821="Con confirmación" +02000822="Sin confirmación" +02000823="Conservar archivos existentes" +02000824="Renombrar automáticamente" +02000825="Autorrenombrar archivos existentes" + +02000830="Archivos" +02000831="Archivos &seleccionados" +02000832="&Todos los archivos" + +02000881="Selecciona destino para los archivos extraídos." + +02000890="extrayendo" + +; Overwrite dialog +02000900="Confirmar sustitución de archivos" +02000901="El directorio ya contiene un archivo con el mismo nombre." +02000902="¿Deseas sustituir el archivo existente" +02000903="por este otro?" + +02000911="Renombrar a&utomáticamente" + +02000982="{0} bytes" +02000983="modificado el" + +; Messages dialog +02000A00="Mensajes de diagnóstico" + +02000A80="Mensaje" + +02000A91="Método de compresión no válido para '{0}'." +02000A92="Error de datos en '{0}'. El archivo está corrupto." +02000A93="CRC ha fallado en '{0}'. El archivo está corrupto." +02000A94="Error de datos en el archivo encriptado '{0}'. Verifica la contraseña." +02000A95="Fallo de CRC en el archivo encriptado '{0}'. Verifica la contraseña." + +; Password dialog +02000B00="Introduce la contraseña" +02000B01="E&scribe la contraseña:" +02000B02="&Mostrar la contraseña" +02000B03="Escribe nue&vamente la contraseña:" +02000B10="Las contraseñas son diferentes. Por favor, vuelve a escribirlas." +02000B11="Usa en la contraseña solamente letras del alfabeto inglés, números y caracteres especiales (!, #, $, ...)" +02000B12="La contraseña es demasiado larga." + +; Progress dialog +02000C00="Progreso" +02000C01="Tiempo transcurrido:" +02000C02="Tiempo pendiente:" +02000C03="Tamaño:" +02000C04="Velocidad:" +02000C05="Procesado:" +02000C06="Razón de compresión:" + +02000C10="Se&gundo plano" +02000C11="P&rimer plano" +02000C12="&Pausa" +02000C13="&Continuar" + +02000C20="Pausado" + +02000C30="¿Estás seguro de que deseas cancelar?" + +; Compress dialog +02000D00="Añadir al archivo" +02000D01="&Archivo:" +02000D02="M&odo de actualización:" +02000D03="&Formato de archivo:" +02000D04="&Tipo de compresión:" +02000D05="Crear archivo &compacto" +02000D06="&Parámetros:" +02000D07="Opciones" +02000D08="Crear archivo SF&X (autoextraíble)" +02000D09="Multi&hilo" +02000D0A="Encriptar &nombres de fichero" +02000D0B="Nive&l de compresión:" +02000D0C="Tamaño de &diccionario:" +02000D0D="Tama&ño de la palabra:" +02000D0E="Memoria usada para comprimir:" +02000D0F="Memoria usada para descomprimir:" +02000D10="Encriptación" +02000D11="Método de &encriptación:" +02000D12="Número de hilos de la CPU:" +02000D13="Tamaño de bloque compacto:" +02000D14="No compacto" +02000D15="Sin límite" +02000D16="Comprimir archivos abiertos para escritura" + +02000D40="Dividir en fra&gmentos (bytes):" +02000D41="Tamaño de fragmento incorrecto" +02000D42="Tamaño de fragmento especificado: {0} bytes.\n¿Estás seguro de que deseas dividir el archivo en fragmentos de ese tamaño?" + +02000D81="Sin compresión" +02000D82="Normal" +02000D83="Máxima" +02000D84="Rápida" +02000D85="La más rápida" +02000D86="Ultra" + +02000D90="Explorar" + +02000DA1="Añadir y sustituir archivos" +02000DA2="Actualizar y añadir archivos" +02000DA3="Solo actualizar archivos" +02000DA4="Sincronizar archivos" + +02000DB1="Todos los archivos" + +02000DC0="comprimiendo" + +; Columns dialog +02000E00="Columnas" +02000E01="Selecciona las columnas que quieres que estén visibles en este modo. Usa las teclas AvPág y RePág para organizar las columnas como quieras." +02000E02="La columna elegida debe tener" +02000E03="píxeles." + +02000E10="Mover hacia &arriba" +02000E11="Mover hacia a&bajo" +02000E12="&Mostrar" +02000E13="&Esconder" +02000E14="Fijar" + +02000E81="Título" +02000E82="Ancho" + +; Testing +02000F90="probando" + + +; File Manager + +03000000="7-Zip File Manager" + +; Menu +03000102="&Archivo" +03000103="&Editar" +03000104="&Ver" +03000105="&Herramientas" +03000106="Ay&uda" +03000107="&Favoritos" + +; File +03000210="&Abrir" +03000211="Abrir &dentro" +03000212="Abrir &fuera" +03000220="&Ver" +03000221="&Editar" +03000230="Re&nombrar" +03000231="&Copiar a..." +03000232="&Mover a..." +03000233="&Borrar" +03000240="&Propiedades" +03000241="Comen&tario" +03000242="Suma de verificación" +03000243="Diff" +03000250="Crear carpeta" +03000251="Crear archivo" +03000260="&Salir" +03000270="Di&vidir archivo..." +03000271="C&ombinar archivos..." + +; Edit +03000310="&Deshacer" +03000311="&Rehacer" +03000320="Cor&tar" +03000321="&Copiar" +03000322="&Pegar" +03000323="&Borrar" +03000330="Seleccionar &todo" +03000331="Deseleccionar todo" +03000332="&Invertir selección" +03000333="Seleccionar..." +03000334="Deseleccionar..." +03000335="Seleccionar por tipo" +03000336="Deseleccionar por tipo" + +; View +03000410="Iconos g&randes" +03000411="&Iconos pequeños" +03000412="&Lista" +03000413="&Detalles" +03000420="Desordenado" +03000430="Abrir directorio raíz" +03000431="Subir un directorio" +03000432="Historia de carpetas..." +03000440="&Actualizar" +03000449="Vista plana (flat view)" +03000450="&2 paneles" +03000451="&Barras de herramientas" +03000460="Barra de herramientas Archivo" +03000461="Barras de herramientas estándar" +03000462="Botones grandes" +03000463="Mostrar texto en los botones" + +; Tools +03000510="&Opciones..." +03000511="&Pruebas (benchmark)" + +; Help +03000610="&Contenido..." +03000620="&Acerca de 7-Zip..." + +; Favorites +03000710="&Añadir carpeta a favoritos como" +03000720="Agregar a favoritos" + +; Options Dialog + +03010000="Opciones" + +; Plugins +03010100="Plugins" +03010101="&Plugins:" +03010110="Opciones..." + +; Edit +03010200="Editor" +03010201="&Editor:" +03010202="&Diff:" + +; System +03010300="Sistema" +03010302="Asociar 7-Zip con:" +03010310="Plugin" + +; Settings +03010400="Propiedades" +03010401="Mostrar el elemento \"..\"" +03010402="Mostrar iconos propios" +03010410="Mostrar menú del sistema" +03010420="&Seleccionar fila(s) entera(s)" +03010421="Mostrar &cuadrícula" +03010422="Clicar una vez para abrir elemento" +03010430="Modo de selección &alternativo" +03010440="Usar páginas &grandes de memoria" + +; Strings + +03020201="Copiar" +03020202="Mover" +03020203="Copiar a:" +03020204="Mover a:" +03020205="copiado..." +03020206="movido..." +03020207="No pueden moverse o copiarse elementos de este tipo de carpetas." +03020208="Operación no permitida." +03020209="Selecciona la carpeta de destino" + +03020210="Confirmar borrado de archivo" +03020211="Confirmar borrado de carpeta" +03020212="Confirmar borrado de numerosos ficheros" +03020213="¿Estás seguro de querer borrar '{0}'?" +03020214="¿Estás seguro de querer borrar la carpeta '{0}' y todo su contenido?" +03020215="¿Estás seguro de querer borrar estos {0} elementos?" +03020216="Borrando..." +03020217="Error borrando fichero o carpeta" +03020218="El sistema no puede mover un fichero con ruta larga a la Papelera de Reciclaje" + +03020220="Renombrando..." +03020221="Error renombrando fichero o carpeta" +03020222="Confirmar copia de ficheros" +03020223="¿Estás seguro de que deseas copiar los ficheros al archivo" + +03020230="Crear carpeta" +03020231="Nombre de carpeta:" +03020232="Carpeta nueva" +03020233="Error creando carpeta" + +03020240="Crear archivo" +03020241="Nombre de archivo:" +03020242="Archivo nuevo" +03020243="Error creando archivo" + +03020250="Seleccionar" +03020251="Deseleccionar" +03020252="Máscara:" + +03020260="Historial de carpetas" + +03020280="El fichero '{0}' ha sido modificado.\n¿Quieres actualizarlo en el archivo?" +03020281="No puede actualizarse el fichero\n'{0}'" +03020282="No puede ejecutarse el editor." +03020283="abriendo..." +03020284="El fichero parece un virus (el nombre del fichero contiene espacios largos)." + +03020290="Comentario" +03020291="&Comentario:" + +030202A0="Sistema" + +03020300="Mi PC" +03020301="Entorno de red" +03020302="Documentos" + +03020400="Agregar" +03020401="Extraer" +03020402="Probar" + +03020420="Copiar" +03020421="Mover" +03020422="Borrar" +03020423="Información" + +03020500="Dividir archivo" +03020501="Di&vidir a:" +03020510="Dividiendo..." +03020520="Confirmar división" +03020521="¿Estás seguro de que deseas dividir el archivo en {0} partes?" +03020522="El tamaño de los fragmentos debe ser menor que el del archivo original" + +03020600="Combinar archivos" +03020601="&Combinar a:" +03020610="Combinando..." +03020620="Selecciona solamente el primer archivo" +03020621="No se ha podido detectar el fichero como parte de un fichero por volúmenes" +03020622="No se ha podido encontrar más que un fragmento del fichero por volúmenes" + +03020710="Calculando suma de verificación..." +03020720="Suma de verificación (CRC)" +03020721="CRC de los datos:" +03020722="CRC de los datos y nombres:" + +03020800="Buscando..." + +03020900="Propiedades" + +03020A01="No puede realizarse la operación desde una carpeta que tenga una ruta larga." +03020A02="Debes seleccionar un fichero" +03020A03="Debes seleccionar uno o más ficheros" +03020A04="El fichero {0} ya existe" + +; Computer +03031100="Espacio total" +03031101="Espacio libre" +03031102="Tamaño de clúster" +03031103="Etiqueta" + +; Network +03031200="Nombre local" +03031201="Proveedor" + +; Benchmark Dialog + +03080000="Pruebas (benchmark)" +03080001="Uso de memoria:" +03080002="Compresión" +03080003="Descompresión" +03080004="Velocidad" +03080005="Tasa" +03080006="Tasa total" +03080007="Actual" +03080008="Resultante" +03080009="Pasos:" +0308000A="Errores:" +0308000B="Uso de CPU" +0308000C="Resultante/uso" + +;!@LangEnd@! diff --git a/GUI/Lang/et.txt b/GUI/Lang/et.txt new file mode 100644 index 0000000..5e682be --- /dev/null +++ b/GUI/Lang/et.txt @@ -0,0 +1,545 @@ +;!@Lang@!UTF-8! +; 7-Zip 9.07 +; Eesti keelde on tõlkinud Kaupo Suviste +; Täiendas Mihkel Tõnnov +; +; +; + +00000000="Estonian" +00000001="eesti keel" +00000002="37" + +; 7-Zip Configuration + +; Title +01000000="7-Zipi suvandid" + +; Info Page +01000100="Teave 7-Zipi kohta" +01000103="7-Zip on vaba tarkvara. Kuid kui soovite toetada 7-Zipi arendamist, siis saate programmi registreerida.\n\n7-Zipi Eesti koduleht:\nhttp://www.hot.ee/somberg/7zip.html" +01000104="Tugi" +01000105="Registreeri" + +; Folders Page +01000200="Kaustad" +01000210="&Töökaust" +01000211="&Süsteemi ajutiste failide kaust" +01000212="&Praegune kaust" +01000213="&Kasutaja määratud:" +01000214="Kasuta ainult irddraivide puhul" + +01000281="Määrake ajutiste arhiivifailide asukoht." + +; System Page +01000300="Süsteem" +01000301="Integreeri 7-Zip kesta hüpikmenüüsse" +01000302="Kaskaad-hüpikmenüü" +01000310="Hüpikmenüü käsud:" + +; Language Page +01000400="Keel" +01000401="Keel:" + + +; 7-Zip Explorer extension + +; Context menu +02000101="7-Zip" +02000102="7-Zipi käsud" +02000103="Ava arhiiv" +02000104="Avab valitud arhiivi." +02000105="Eralda failid..." +02000106="Eraldab failid valitud arhiivist välja." +02000107="Lisa arhiivi..." +02000108="Lisab valitud üksused arhiivi." +02000109="Testi arhiivi" +0200010A="Testib valitud arhiivi terviklust." +0200010B="Eralda siia" +0200010C="Eraldab failid valitud arhiivist välja praegusesse kausta." +0200010D="Eralda kausta {0}" +0200010E="Eraldab failid välja alamkausta." +0200010F="Lisa arhiivi {0}" +02000110="Lisab valitud üksused arhiivi." +02000111="Tihenda ja meili..." +02000112="Tihendab valitud üksused arhiiviks ja saadab arhiivi e-postiga." +02000113="Tihenda arhiiviks {0} ja meili" +02000114="Tihendab valitud üksused arhiiviks ja saadab arhiivi e-postiga." + +02000140="" +02000141="" + +; Properties +02000203="Tee" +02000204="Nimi" +02000205="Laiend" +02000206="Kaust" +02000207="Maht" +02000208="Maht tihendatult" +02000209="Atribuudid" +0200020A="Loodud" +0200020B="Avatud" +0200020C="Muudetud" +0200020D="Ühtne" +0200020E="Kommenteeritud" +0200020F="Krüptitud" +02000210="Tükeldatud enne" +02000211="Tükeldatud pärast" +02000212="Sõnastik" +02000213="CRC" +02000214="Tüüp" +02000215="Anti" +02000216="Meetod" +02000217="Opsüsteem" +02000218="Failisüsteem" +02000219="Kasutaja" +0200021A="Rühm" +0200021B="Plokk" +0200021C="Kommentaar" +0200021D="Koht" +0200021E="Tee prefiks" +0200021F="Kaustu" +02000220="Faile" +02000221="Versioon" +02000222="Köide" +02000223="Mitmeköiteline" +02000224="Nihe" +02000225="Linke" +02000226="Plokke" +02000227="Köiteid" + +02000229="64-bitine" +0200022A="Big-Endian" +0200022B="Protsessor" +0200022C="Füüsiline maht" +0200022D="Päiste maht" +0200022E="Kontrollsumma" +0200022F="Karakteristikud" +02000230="Virtuaalaadress" +02000231="ID" +02000232="Lühinimi" +02000233="Loomisrakendus" +02000234="Sektori maht" +02000235="Režiim" +02000236="Link" + +; Status bar +02000301="{0} üksus(t) valitud" +02000302="{0} üksus(t)" + +02000320="Faile:" +02000321="Kaustu:" +02000322="Maht:" +02000323="Maht tihendatult:" +02000324="Arhiive:" + +; List Context Menu +02000401="&Veerud..." + +02000411="&Ava" +02000412="&Eralda välja..." + +; ToolBar +02000501="Eralda välja" + +; Messages +02000601="Selle arhiivi värskendamistoiminguid ei toetata." +02000602="Ei saa värskendada arhiivi {0}" +02000603="Ei saa luua kausta {0}" +02000604="Programm ei toeta faili vormingut." +02000605="Tõrge" +02000606="Liiga palju üksusi." +02000607="Selle failinime laiendiga pole seostatud ühtki rakendust." +02000608="Vigu ei leitud." +02000609="Ei saa avada faili {0} arhiivina." +0200060A="Ei saa avada krüptitud arhiivi {0}. Kas vale parool?" +0200060B="Süsteem ei saa eraldada nõutavat mälumahtu." +0200060C="Tundmatu tõrge" +0200060D="Toetamata arhiivitüüp." + +; Dialogs +02000702="OK" +02000705="&Jah" +02000707="Kõigile j&ah" +02000709="&Ei" +0200070B="Kõigile e&i" + +02000710="Loobu" +02000711="&Loobu" +02000713="&Sulge" +02000714="Seiska" +02000715="Restardi" + +02000720="Abi" + +; Extract dialog +02000800="Väljaeraldamine" +02000801="&Eralda välja kausta:" +02000802="&Parool" + +02000810="Teed" +02000811="&Täielikud teenimed" +02000812="Su&htelised teenimed" +02000813="Teenime&deta" + +02000820="Ülekirjutus" +02000821="Küsi e&nne ülekirjutamist" +02000822="Ki&rjuta küsimata üle" +02000823="&Jäta olemasolevad failid vahele" +02000824="Nimeta a&utomaatselt ümber" +02000825="Nimeta &olemasolevad f. autom. ümber" + +02000830="Failid" +02000831="&Valitud failid" +02000832="&Kõik failid" + +02000881="Määrake väljaeraldatud failide asukoht." + +02000890="välja eraldatud" + +; Overwrite dialog +02000900="Failiasenduse kinnitamine" +02000901="Sihtkaust juba sisaldab töödeldavat faili." +02000902="Kas soovite asendada olemasoleva faili" +02000903="selle failiga?" + +02000911="Nimeta a&utomaatselt ümber" + +02000982="{0} baiti" +02000983="muudetud" + +; Messages dialog +02000A00="Diagnostikateated" + +02000A80="Teade" + +02000A91="Toetuseta tihendusmeetod failile {0}." +02000A92="Andmeviga failis {0}. Fail on rikutud." +02000A93="Tsükkelkoodkontroll (CRC) failis {0} nurjus. Fail on rikutud." +02000A94="Andmeviga krüptitud failis {0}. Kas vale parool?" +02000A95="Tsükkelkoodkontroll (CRC) krüptitud failis {0} nurjus. Kas vale parool?" + +; Password dialog +02000B00="Parooli sisestamine" +02000B01="Sisestage parool:" +02000B02="&Kuva parool" +02000B03="Parooli kordus:" +02000B10="Paroolid ei kattu." +02000B11="Kasutage paroolis ainult inglise keele tähti, numbreid ja erimärke (!, #, $, ...)." +02000B12="Parool on liiga pikk." + +; Progress dialog +02000C00="Töötlemine" +02000C01="Kulunud aeg:" +02000C02="Järelejäänud aeg:" +02000C03="Kogumaht:" +02000C04="Kiirus:" +02000C05="Töödeldud:" +02000C06="Tihendussuhe:" + +02000C10="&Taustal" +02000C11="&Esiplaanile" +02000C12="&Paus" +02000C13="&Jätka" + +02000C20="Pausiks peatatud" + +02000C30="Kas soovite kindlasti loobuda?" + +; Compress dialog +02000D00="Arhiivi lisamine" +02000D01="&Arhiiv:" +02000D02="Värskend&usrežiim:" +02000D03="Arhiivi&vorming:" +02000D04="Tihendus&meetod:" +02000D05="&Loo ühtne arhiiv" +02000D06="Pa&rameetrid:" +02000D07="Suvandid" +02000D08="Loo is&eavanev arhiiv" +02000D09="Lõimtöötlus" +02000D0A="Krüpti faili&nimed" +02000D0B="&Tihendusaste:" +02000D0C="Sõnaraamatu ma&ht:" +02000D0D="&Sõna maht:" +02000D0E="Mälu hõivatus tihendamisel:" +02000D0F="Mälu hõivatus hõrendamisel:" +02000D10="Krüptimine" +02000D11="Krüptimismeetod:" +02000D12="Protsessorilõimede arv:" +02000D13="Ühtse ploki maht:" +02000D14="Mitteühtne" +02000D15="Ühtne" +02000D16="Tihenda kirjutuseks avatud failid" + +02000D40="&Tükelda köideteks (baitides):" +02000D41="Sobimatu köitemaht." +02000D42="Määratud köitemaht: {0} baiti.\nKas soovite kindlasti tükeldada arhiivi niisugusteks köideteks?" + +02000D81="Tihenduseta" +02000D82="Normaaltihendus" +02000D83="Maksimaaltihendus" +02000D84="Kiirtihendus" +02000D85="Kiireim tihendus" +02000D86="Ultratihendus" + +02000D90="Sirvi" + +02000DA1="Lisa ja asenda failid" +02000DA2="Värskenda ja lisa failid" +02000DA3="Värskenda olemasolevad failid" +02000DA4="Sünkrooni failid" + +02000DB1="Kõik failid" + +02000DC0="tihendatud" + +; Columns dialog +02000E00="Veerud" +02000E01="Märkige veerud, mida soovite selles kaustas kuvada. Soovitud järjestusse saate veerud seada nuppude Nihuta üles ja Nihuta alla abil." +02000E02="Valitud veerg peaks olema" +02000E03="pi&kslit lai." + +02000E10="Ni&huta üles" +02000E11="Nihuta &alla" +02000E12="K&uva" +02000E13="&Peida" +02000E14="Sea" + +02000E81="Tiitel" +02000E82="Laius" + +; Testing +02000F90="Testimine" + + +; File Manager + +03000000="7-Zipi failihaldur" + +; Menu +03000102="&Fail" +03000103="&Redigeeri" +03000104="&Vaade" +03000105="&Tööriistad" +03000106="&Abi" +03000107="&Lemmikud" + +; File +03000210="&Ava" +03000211="Ava s&ees" +03000212="Ava väljasp&ool" +03000220="Vaat&ur" +03000221="&Redigeeri" +03000230="&Nimeta ümber" +03000231="&Kopeeri asukohta..." +03000232="&Teisalda asukohta..." +03000233="Ku&stuta" +03000240="Atri&buudid" +03000241="Ko&mmentaar..." +03000242="Arvuta kontrollsumma" +03000243="Võrdle" +03000250="Loo kaust" +03000251="Loo fail" +03000260="&Välju" +03000270="Tükel&da fail..." +03000271="Ü&henda failid..." + +; Edit +03000310="&Võta tagasi" +03000311="&Tee uuesti" +03000320="&Lõika" +03000321="&Kopeeri" +03000322="Klee&bi" +03000323="Ku&stuta" +03000330="V&ali kõik" +03000331="Tühista kõik valikud" +03000332="&Pööra valik" +03000333="Vali..." +03000334="Tühista valik..." +03000335="Vali tüübi järgi" +03000336="Tühista tüübi järgi valik" + +; View +03000410="&Suured ikoonid" +03000411="Väik&esed ikoonid" +03000412="&Loend" +03000413="Üksikasja&d" +03000420="Sortimata" +03000430="Ava juurkaust" +03000431="Taseme võrra üles" +03000432="Kaustaajalugu..." +03000440="&Värskenda" +03000449="Lame vaade" +03000450="&Kaks paani" +03000451="&Tööriistaribad" +03000460="Arhiiviriistariba" +03000461="Standardnupuriba" +03000462="Suured nupud" +03000463="Kuva nupusildid" + +; Tools +03000510="&Häälestus..." +03000511="&Jõudlustest" + +; Help +03000610="&Sisukord..." +03000620="&Teave 7-Zipi kohta..." + +; Favorites +03000710="&Lisa kaust lemmikute hulka järjehoidjana" +03000720="Järjehoidja" + +; Options Dialog + +03010000="Häälestus" + +; Plugins +03010100="Pluginad" +03010101="&Pluginad:" +03010110="Suvandid..." + +; Edit +03010200="Redaktor" +03010201="&Redaktor:" +03010202="&Võrdlusprogramm:" + +; System +03010300="Süsteem" +03010302="Seosta 7-Zip laienditega:" +03010310="Plugin" + +; Settings +03010400="Sätted" +03010401="Kuva element \"..\"" +03010402="Kuva tegelikud failiikoonid" +03010410="Kuva süsteemimenüü" +03010420="&Vali terve rida" +03010421="Kuva &ruudujooned" +03010422="Ava üksus ühe klõpsuga" +03010430="&Alternatiivne valikurežiim" +03010440="Kasuta &suuri mälulehekülgi" + +; Strings + +03020201="Kopeerimine" +03020202="Teisaldamine" +03020203="Kopeeri asukohta:" +03020204="Teisalda asukohta:" +03020205="Kopeerimine..." +03020206="Teisaldamine..." +03020207="Te ei saa teisaldada või kopeerida üksusi niisugustesse kaustadesse." +03020208="See toiming pole selles kaustas toetatud." +03020209="Valige sihtkaust." + +03020210="Failikustutuse kinnitamine" +03020211="Kaustakustutuse kinnitamine" +03020212="Mitme faili kustutamise kinnitamine" +03020213="Kas soovite kindlasti kustutada faili {0}?" +03020214="Kas soovite kindlasti kustutada kausta {0} ja kogu selle sisu?" +03020215="Kas soovite kindlasti kustutada need {0} üksust?" +03020216="Kustutamine..." +03020217="Tõrge faili või kausta kustutamisel" +03020218="Süsteem ei saa teisaldada prügikasti pika teega faili." + +03020220="Ümbernimetamine..." +03020221="Tõrge faili või kausta ümbernimetamisel" +03020222="Failikopeerimise kinnitamine" +03020223="Kas soovite kindlasti kopeerida arhiivi järgmised failid:" + +03020230="Kausta loomine" +03020231="Kausta nimi:" +03020232="Uus kaust" +03020233="Tõrge kausta loomisel" + +03020240="Faili loomine" +03020241="Faili nimi:" +03020242="Uus fail" +03020243="Tõrge faili loomisel" + +03020250="Valimine" +03020251="Valiku tühistamine" +03020252="Mask:" + +03020260="Kaustaajalugu" + +03020280="Faili {0} on muudetud.\nKas soovite selle arhiivis värskendada?" +03020281="Ei saa värskendada faili\n{0}" +03020282="Ei saa käivitada redaktorit." +03020283="Avamine..." +03020284="See fail sarnaneb viirusega (faili nimi sisaldab pikka tühikute jada)." + +03020290="- kommentaar" +03020291="&Kommentaar:" + +030202A0="Süsteem" + +03020300="Arvuti" +03020301="Võrk" +03020302="Dokumendid" + +03020400="Lisa" +03020401="Eralda välja" +03020402="Testi" + +03020420="Kopeeri" +03020421="Teisalda" +03020422="Kustuta" +03020423="Teave" + +03020500="Faili tükeldamine:" +03020501="&Tükelda asukohta:" +03020510="Tükeldamine..." +03020520="Tükeldamise kinnitamine" +03020521="Kas soovite kindlasti tükeldada faili {0} köiteks?" +03020522="Köite maht peab olema algfaili mahust väiksem." + +03020600="Failide ühendamine:" +03020601="Ü&henda asukohta:" +03020610="Ühendamine..." +03020620="Valige ainult tükeldatud faili esimene osa." +03020621="Ei õnnestu tuvastada, et see fail oleks tükeldatud faili osa." +03020622="Ei leia rohkem kui ühte tükeldatud faili osa." + +03020710="Kontrollsumma arvutamine..." +03020720="Kontrollsumma" +03020721="Andmete CRC-kontrollsumma:" +03020722="Andmete ja nimede CRC-kontrollsumma:" + +03020800="Läbivaatamine..." + +03020900="Atribuudid" + +03020A01="Toimingut ei saa käivitada kaustast, millel on pikk tee." +03020A02="Te peate valima ühe faili." +03020A03="Te peate valima ühe või mitu faili." +03020A04="Fail {0} on juba olemas." + +; Computer +03031100="Kogumaht" +03031101="Vaba ruum" +03031102="Klastri suurus" +03031103="Silt" + +; Network +03031200="Kohalik nimi" +03031201="Teenusepakkuja" + +; Benchmark Dialog + +03080000="Jõudlustest" +03080001="Mälu hõivatus:" +03080002="Tihendamine" +03080003="Hõrendamine" +03080004="Kiirus" +03080005="Hinnang" +03080006="Üldine jõudlushinnang" +03080007="Praegune:" +03080008="Lõpptulemus:" +03080009="Töötiire:" +0308000A="Vigu:" +0308000B="CPU hõivatus" +0308000C="Hinnang/hõivatus" + +;!@LangEnd@! + + diff --git a/GUI/Lang/eu.txt b/GUI/Lang/eu.txt new file mode 100644 index 0000000..83b6242 --- /dev/null +++ b/GUI/Lang/eu.txt @@ -0,0 +1,513 @@ +;!@Lang@!UTF-8! +; 7-Zip 4.53 +; Translated by Iñigo Salvador Azurmendi +; +; +; +; + +00000000="Basque" +00000001="Euskara" +00000002="45" + +; 7-Zip Configuration + +; Title +01000000="7-Zip Konfiguraketa" + +; Info Page +01000100="7-Zip-eri buruz" +01000103="7-Zip software askea da. Hala ere, erregistratuz, 7-Zip garatzen lagundu dezakezu." +01000104="Euskarria" +01000105="Erregistratu" + +; Folders Page +01000200="Karpetak" +01000210="Laneko &Karpetak" +01000211="&Sistemaren aldiuneko karpeta" +01000212="&Unekoa" +01000213="&Zehaztutakoa:" +01000214="Erabili unitate eramangarriekin soilik" + +01000281="Zehaztu kokaleku bat aldiuneko artxibu fitxategientzako." + +; System Page +01000300="Sistema" +01000301="Bateratu 7-Zip maskorraren testuinguru menura" +01000302="Testuinguru menua turrustan" +01000310="Testuinguru menuaren zerrenda:" + +; Language Page +01000400="Hizkuntza" +01000401="Hizkuntza:" + + +; 7-Zip Explorer extension + +; Context menu +02000101="7-Zip" +02000102="7-Zip aginduak" +02000103="Artxibua ireki" +02000104="Aukeratutako artxiboa irekitzen du." +02000105="Fitxategiak atera..." +02000106="Aukeratutako artxibuko fitxategiak ateratzen ditu." +02000107="Artxibura erantsi..." +02000108="Aukeratutako gaiak artxibura eransten ditu." +02000109="Artxibua egiaztatu" +0200010A="Aukeratutako artxibuaren osotasuan egiaztatzen du." +0200010B="Atera hona" +0200010C="Fitxategiak aukeratutako artxibutik uneko karpetara ateratzen ditu." +0200010D="Atera {0}-(e)ra" +0200010E="Atera fitxategiak azpikarpetara." +0200010F="Erantsi {0}-(e)ra" +02000110="Aukeratutako gaiak artxibura eransten ditu." +02000111="Konprimatu eta post@z bidali..." +02000112="Aukeratutako gaiak artxibura konprimatu eta post@ bitartez bidaltzen du." +02000113="Konprimatu {0}-(e)ra eta post@z bidali" +02000114="Aukeratutako gaiak artxibura konprimatu eta post@ bitartez bidaltzen du." + +02000140="" +02000141="" + +; Properties +02000203="Bidea" +02000204="Izena" +02000205="Luzapena" +02000206="Karpeta" +02000207="Neurria" +02000208="Neurria konprimatuta" +02000209="Ezaugarriak" +0200020A="Sortu" +0200020B="Atzitua" +0200020C="Aldatu" +0200020D="Trinko" +0200020E="Azalpena" +0200020F="Zifratuta" +02000210="Banatu Lehenago" +02000211="Banatu Ondoren" +02000212="Hiztegia" +02000213="CRC" +02000214="Mota" +02000215="Anti" +02000216="Metodoa" +02000217="Ostalariaren SE" +02000218="Fitxategi Sistema" +02000219="Erabiltzailea" +0200021A="Taldea" +0200021B="Blokeatu" +0200021C="Aipamena" +0200021D="Kokapena" +0200021E="Bide Aurrizkia" +0200021F="Karpetak" +02000220="Fitxategiak" +02000221="Bertsioa" +02000222="Bolumena" +02000223="Bolumen anizkoitza" +02000224="Kokapen zuzenketa" +02000225="Estekak" +02000226="Blokeak" +02000227="Bolumenak" + +; Status bar +02000301="{0} objektu aukeratuta" +02000302="{0} objektu" + +02000320="Fitxategiak:" +02000321="Karpetak:" +02000322="Neurria:" +02000323="Neurria trinkotuta:" +02000324="Artxibuak:" + +; List Context Menu +02000401="&Zutabeak..." + +02000411="&Ireki" +02000412="&Atera..." + +; ToolBar +02000501="Atera" + +; Messages +02000601="Eguneraketa eragiketak ez dira onartzen artxibu honekin." +02000602="Ezin da {0} artxibua eguneratu" +02000603="Ezin da '{0}' artxibua sortu" +02000604="Fitxategia ez da onartutako artxibua." +02000605="Akatsa" +02000606="Gai gehiegi" +02000607="Ez dago fitxategi luzapen horrekin elkartutako aplikaziorik" +02000608="Ez dago akatsik" +02000609="Ezin da '{0}' fitxategia artxibu bezala ireki" +0200060A="Ezin da da '{0}' zifratutako artxibua ireki. Pasahitz okerra?" + +; Dialogs +02000702="Ados" +02000705="&Bai" +02000707="&Guztiari Bai" +02000709="&Ez" +0200070B="G&uztiari Ez" + +02000710="Uzi" +02000711="&Utzi" +02000713="&Itxi" +02000714="Gelditu" +02000715="Berrasi" + +02000720="Laguntza" + +; Extract dialog +02000800="Atera" +02000801="Atera &Hona:" +02000802="Pasahitza" + +02000810="Bide modua" +02000811="Bideizen osoak" +02000812="Uneko bideizenak" +02000813="Bideizenik ez" + +02000820="Gainidatzi modua" +02000821="Galdetu gainidatzi aurretik" +02000822="Gainidatzi abisatu gabe" +02000823="Jauzi existitzen diren fitxategiak" +02000824="Berez berrizendatu" +02000825="Berez berrizendatu existitzen diren fitxategiak" + +02000830="Fitxategiak" +02000831="&Aukeratutako fitxategiak" +02000832="Fitxategi &Guztiak" + +02000881="Zehaztu fitxategiak ateratzeko lekua." + +02000890="Ateratzen" + +; Overwrite dialog +02000900="Onetsi Fitxategi Ordezkapena" +02000901="Helburu karpetak prozesatutako fitxategia dauka dagoeneko." +02000902="Existitzen den fitxategia ordezkatu nahi duzu" +02000903="beste honekin?" + +02000911="&Berez Berrizedatu" + +02000982="{0} byte" +02000983="aldatua" + +; Messages dialog +02000A00="Diagnosi mezuak" + +02000A80="Mezua" + +02000A91="'{0}'-rentzako onartugabeko konpresio metodoa ." +02000A92="Datuen akatsa '{0}'-n. Fitxategia hondatuta dago." +02000A93="CRC akatsa '{0}'-n. Fitxategia hondatuta dago." +02000A94="Datuen akatsa zifratutako '{0}' fitxategian. Pasahitz okerra?" +02000A95="CRC okerra zifratutako '{0}' fitxategian. Pasahitz okerra?" + +; Password dialog +02000B00="Sartu pasahitza" +02000B01="Sartu pasahitza:" +02000B02="&Erakutsi pasahitza" +02000B03="Pasahitza berriz sartu:" +02000B10="Pasahitzak ez datoz bat" +02000B11="Erabili soilik hizki ingelesak, zenbakiak eta karaktere bereziak (!, #, $, ...) pasahitzetan" +02000B12="Pasahitza luzeegia da" + +; Progress dialog +02000C00="Prozesua" +02000C01="Irangandako denbora:" +02000C02="Falta den denbora:" +02000C03="Neurria:" +02000C04="Abiadura:" +02000C05="Prozesatuta:" +02000C06="Trinkoketa ratioa:" + +02000C10="&Atzealdean" +02000C11="&Aurrealdean" +02000C12="&Eten" +02000C13="&Jarraitu" + +02000C20="Etenda" + +02000C30="Ziur zaude galarazi nahi duzula?" + +; Compress dialog +02000D00="Erantsi artxibura" +02000D01="&Artxibua:" +02000D02="&Eguneratzeko modua:" +02000D03="Artxibu &formatua:" +02000D04="Konpresio &metodoa:" +02000D05="Sortu artxibu &Trinkoak" +02000D06="&Parametroak:" +02000D07="Aukerak" +02000D08="Sortu SF&X artxibua" +02000D09="Harilkatze-anitza" +02000D0A="Zifratu fitxategi &izenak" +02000D0B="Konpresio &maila:" +02000D0C="&Hiztegi neurria:" +02000D0D="&Hitz neurria:" +02000D0E="Konpresiorako Memoria erabilera:" +02000D0F="Deskonpresiorako Memoria erabilera:" +02000D10="Zifraketa" +02000D11="Zifraketa metodoa:" +02000D12="PUZ hari kopurua:" +02000D13="Bloke solidoaren neurria:" +02000D14="Ez-solidoa" +02000D15="Solidoa" +02000D16="Trinkotu partekatutako fitxategiak" + +02000D40="Zatitu &bolumenetan, byte-ak:" +02000D41="Bolumen zati baliogabea" +02000D42="Zehaztutako bolumen neurria: {0} byte.\nZiur zaude artxibua holako bolumenetan zatitu nahi duzula?" + +02000D81="Gorde" +02000D82="Arrunta" +02000D83="Gehienezkoa" +02000D84="Azkarra" +02000D85="Azkarrena" +02000D86="Ultra" + +02000D90="Arakatu" + +02000DA1="Erantsi eta ordezkatu fitxategiak" +02000DA2="Eguneratu eta erantsi fitxategiak" +02000DA3="Berritu existitzen diren fitxategiak" +02000DA4="Fitxategiak sinkronizatu" + +02000DB1="Fitxategi Guztiak" + +02000DC0="Konprimatzen" + +; Columns dialog +02000E00="Zutabeak" +02000E01="Egiaztatu karpeta honetan ikusgarri egin nahi zenituzkeen zutabeak. Erabili Mugitu Gora eta Mugitu Behera botoiak zutabeak berrantolatzeko." +02000E02="Aukeratutako zutabeak izan behar lituzke" +02000E03="pixel &zabalera." + +02000E10="Mugitu &Gora" +02000E11="Mugitu &Behera" +02000E12="&Erakuts" +02000E13="&Ezkutatu" +02000E14="Ezarri" + +02000E81="Izenburua" +02000E82="Zabalera" + +; Testing +02000F90="Egiaztatzen" + + +; File Manager + +03000000="7-Zip Fitxategi Kudeatzailea" + +; Menu +03000102="&Fitxategia" +03000103="&Editatu" +03000104="&Ikusi" +03000105="&Tresnak" +03000106="&Laguntza" +03000107="&Gogokoak" + +; File +03000210="&Ireki" +03000211="Ireki &Barruan" +03000212="Ireki &Kanpoaldean" +03000220="&Ikusi" +03000221="&Editatu" +03000230="&Berrizendatu" +03000231="&Kopiatu Hona..." +03000232="&Mugitu Hona..." +03000233="&Ezabatu" +03000240="&Propietateak" +03000241="&Azalpena" +03000242="Kontroleko batura kalkulatu" +03000250="Karpeta Sortu" +03000251="Fitxategia Sortu" +03000260="&Irten" +03000270="Fitxategia &zatitu..." +03000271="Fitxategiak E&lkartu..." + +; Edit +03000310="&Desegin" +03000311="&Berregin" +03000320="&Ebaki" +03000321="&Kopiatu" +03000322="&Itsatsi" +03000323="E&zabatu" +03000330="&Guztia Aukeratu" +03000331="Guztia Ezaukeratu" +03000332="Aukeraketa &Alderantzikatu" +03000333="Aukeratu..." +03000334="Ezaukeratu..." +03000335="Aukeratu Motaren arabera" +03000336="Ezaukeratu Motaren arabera" + +; View +03000410="Ikono &Haundiak" +03000411="Ikono &Txikiak" +03000412="&Zerrenda" +03000413="&Xehetasunak" +03000420="Antolatugabe" +03000430="Ireki Erroko Karpeta" +03000431="Maila Bat Gora" +03000432="Karpeten Historia..." +03000440="&Freskatu" +03000449="Ikuspegi laua" +03000450="&2 Panel" +03000451="&Tresnabarrak" +03000460="Fitxategi Tresnabarra" +03000461="Tresnabarra Estandarra" +03000462="Botoi Haundiak" +03000463="Erakutsi Testua Botoietan" + +; Tools +03000510="&Aukerak..." +03000511="&Erreferentzi puntua (Benchmark)" + +; Help +03000610="&Edukia..." +03000620="&7-Zip-eri Buruz..." + +; Favorites +03000710="&Erantsi karpeta Gogokoetara honela" +03000720="Liburumarka" + +; Options Dialog + +03010000="Aukerak" + +; Plugins +03010100="Pluginak" +03010101="&Pluginak:" +03010110="Aukerak..." + +; Edit +03010200="Editorea" +03010201="&Editorea:" + +; System +03010300="Sistema" +03010302="Elkartu 7-Zip hauekin:" +03010310="Plugin" + +; Settings +03010400="Ezarpenak" +03010401="Erakutsi \"..\" gaia" +03010402="Erakutsi benetako fitxategi ikonoak" +03010410="Erakutsi sistemaren menua" +03010420="&Lerro oso aukeraketa" +03010421="Erakutsi &saretaren lerroak" +03010430="&Ordezko aukeraketa modua" +03010440="Memoria orrialde &luzeak erabili" + +; Strings + +03020201="Kopiatu" +03020202="Mugitu" +03020203="Kopiatu hona:" +03020204="Mugitu hona:" +03020205="Kopiatzen..." +03020206="Mugitzen..." +03020207="Ezin dituzu mugitu edo kopiatu gaiak horrelako karpetetan." +03020208="Eragiketa ez da onartzen." +03020209="Hautatu helburu karpeta." + +03020210="Onetsi Fitxategi Ezabaketa" +03020211="Onetsi Karpeta Ezabaketa" +03020212="Onetsi Fitxategi Anitzen Ezabaketa" +03020213="Ziur zaude '{0}' ezabatu nahi duzula?" +03020214="Ziur zaude '{0}' karpeta eta bere eduki guztia ezabatu nahi duzula?" +03020215="Ziur zaude {0} gai hauek ezabatu nahi dituzula?" +03020216="Ezabatzen..." +03020217="Akatsa Fitxategia edo Karpeta Ezabatzerakoan" + +03020220="Berrizendatzen..." +03020221="Akatsa Fitxategia edo Karpeta Berrizendatzerakoan" +03020222="Onetsi Fitxategi Kopiaketa" +03020223="Ziur zaude fitxategiak artxibura kopiatu nahi dituzula" + +03020230="Karpeta Sortu" +03020231="Karpeta izena:" +03020232="Karpeta Berria" +03020233="Akatsa Karpeta Sortzerakoan" + +03020240="Fitxategia Sortu" +03020241="Fitxategi Izena:" +03020242="Fitxategi Berria" +03020243="Akatsa Fitxategia Sortzerakoan" + +03020250="Aukeratu" +03020251="Ezaukeratu" +03020252="Maskara:" + +03020260="Karpeten Historia" + +03020280="'{0}' fitxategia aldatu egin da.\nArtxibuan eguneratu nahi duzu?" +03020281="Ezin da fitxategia eguneratu\n'{0}'" +03020282="Ezin da editorea abiatu." +03020283="Irekitzen..." + +03020290="Azalpena" +03020291="&Azalpena:" + +030202A0="Sistema" + +03020300="Konputagailua" +03020301="Sarea" + +03020400="Erantsi" +03020401="Atera" +03020402="Egiaztatu" + +03020420="Kopiatu" +03020421="Mugitu" +03020422="Ezabatu" +03020423="Info" + +03020500="Fitxategia Zatitu" +03020501="&Zatitu hona:" +03020510="Zatitzen..." +03020520="Zatiketa berretsi" +03020521="Ziur zaude fitxategia {0} bolumenetan zatitau nahi duzula?" +03020522="Bolumen neurria jatorrizko fitxategiarena baino txikiago izan behar da" + +03020600="Fitxategiak Elkartu" +03020601="&Elkartu honekin:" +03020610="Elkartzen..." +03020620="Hautau soilik lehenengo fitxategia" + +03020710="Kontroleko batura kalkulatzen..." +03020720="Kontroleko baturaren gaineko informazioa" +03020721="Datuentzako CRC kontroleko batura:" +03020722="Datuak eta izenentzako CRC kontroleko batura:" + +03020800="Aztertzen..." + +03020900="Propietateak" + +; Computer +03031100="Neurri Osoa" +03031101="Leku Askea" +03031102="Cluster Neurria" +03031103="Etiketa" + +; Network +03031200="Bertako Izena" +03031201="Hornitzailea" + +; Benchmark Dialog + +03080000="Erreferentzi puntua (Benchmark)" +03080001="Memoria erabilera:" +03080002="Konprimatzen" +03080003="Deskonprimatzen" +03080004="Abiadura" +03080005="Balorazioa" +03080006="Balorazio Osoa" +03080007="Unekoa" +03080008="Emaitza" +03080009="Zuzenak:" +0308000A="Akatsak:" +0308000B="PUZ erabilera" +0308000C="Balioztatze / Erabilera" + + +;!@LangEnd@! diff --git a/GUI/Lang/ext.txt b/GUI/Lang/ext.txt new file mode 100644 index 0000000..2f50614 --- /dev/null +++ b/GUI/Lang/ext.txt @@ -0,0 +1,543 @@ +;!@Lang@!UTF-8! +; 7-Zip 9.07 +; Translated by Purgossu (based in original file of Igor Pavlov) +; +; +; +; + +00000000="Extremaduran" +00000001="Estremeñu" +00000002="" + +; 7-Zip Configuration + +; Title +01000000="Configuración de 7-Zip" + +; Info Page +01000100="About 7-Zip" +01000103="7-Zip es una apricación libri i a gastus pagus. Peru puei apoyal el desarrollu e 7-Zip meyanti'l rehistru el pograma." +01000104="Soporti" +01000105="Rehistral" + +; Folders Page +01000200="Diretórius" +01000210="Diretóriu e labu&tu" +01000211="Diretóriu temporal del &sistema" +01000212="Diretóriu &ahtual" +01000213="&Especifical:" +01000214="Usal sólu pa dispositivus estrayíbris" + +01000281="Especifical ruta pa ficherus d'archivus temporalis." + +; System Page +01000300="Sistema" +01000301="Integral 7-Zip nel menú contestual" +01000302="Menú contestual en cascá" +01000310="Elementus del menú contestual:" + +; Language Page +01000400="Palra" +01000401="Palra:" + + +; 7-Zip Explorer extension + +; Context menu +02000101="7-Zip" +02000102="Comandus de 7-Zip" +02000103="Abril archivu" +02000104="Abril archivu selecionau." +02000105="Estrayel ficherus..." +02000106="Estrayel ficherus del archivu selecionau." +02000107="Añíl al archivu..." +02000108="Añiil lus elementus selecionaus al archivu." +02000109="Comprebal archivu" +0200010A="Comprebal l'integriá l'archivu selecionau." +0200010B="Estrayel aquina" +0200010C="Estrayel ficherus del archivu selecionau nel diretóriu atual." +0200010D="Estrayel en {0}" +0200010E="Estrayel ficherus nun sudirehtoriu." +0200010F="Añiil a {0}" +02000110="Añiil lus elementus selecionaus al archivu." +02000111="Comprimil i envial pol correu-e..." +02000112="Comprimil archivus selecionaus nel ficheru i envialu pol correu-e." +02000113="Comprimil en {0} i envial pol correu" +02000114="Comprimil elementus selecionaus nel ficheru i envialu pol correu-e." + +02000140="" +02000141="" + +; Properties +02000203="Ruta" +02000204="Nombri" +02000205="Estensión" +02000206="Diretóriu" +02000207="Tamañu" +02000208="Tamañu comprimiu" +02000209="Atributus" +0200020A="Creau'l" +0200020B="Úrtimu acesu" +0200020C="Escambiau'l" +0200020D="Sóliu" +0200020E="Comentau" +0200020F="Encrihtau" +02000210="Desapartau enantis" +02000211="Desapartau endispués" +02000212="Izionáriu" +02000213="CRC" +02000214="Tipu" +02000215="Anti" +02000216="Métou" +02000217="S.O. orihin" +02000218="Sistema d'archivus" +02000219="Usuariu" +0200021A="Grupu" +0200021B="Broqui" +0200021C="Comentariu" +0200021D="Posición" +0200021E="Prefihu la ruta" +0200021F="Diretórius" +02000220="Ficherus" +02000221="Velsión" +02000222="Volumin" +02000223="Murtivolumin" +02000224="Desprazamientu" +02000225="Enlacis" +02000226="Broquis" +02000227="Volúmenis" + +02000229="64-bit" +0200022A="Big-endian" +0200022B="UCP" +0200022C="Tamañu físicu" +0200022D="Tamañu las cabiceras" +0200022E="Suma e cumprebación" +0200022F="Caraterísticas" +02000230="Direción virtual" +02000231="ID" +02000232="Nombri cortu" +02000233="Apricación criaora" +02000234="Tamañu el setol" +02000235="Mou" +02000236="Enlaci" + +; Status bar +02000301="{0} elementu(s) selecionaus" +02000302="{0} elementu(s)" + +02000320="Ficherus:" +02000321="Diretórius:" +02000322="Tamañu:" +02000323="Tamañu comprimíu:" +02000324="Archivus:" + +; List Context Menu +02000401="&Colunas..." + +02000411="&Abril" +02000412="&Estrayel..." + +; ToolBar +02000501="Estrayel" + +; Messages +02000601="Nu se puei atualizal esti tipu d'archivu." +02000602="Nu s'á puiu atualizal l'archivu {0}" +02000603="Nu s'á puiu crial el diretóriu '{0}'" +02000604="Tipu d'archivu nu soportau." +02000605="Yerru" +02000606="Ai elementus en demasía" +02000607="Nu ai nengún pograma asociau con esta estensión d'archivu" +02000608="Sin yerrus" +02000609="Nu s'á puiu abril '{0}' comu archivu" +0200060A="Nu s'a puiu abril l'archivu encritau '{0}'. Conseña yerronia?" +0200060B="El sistema nu á síu escapás d'asinal la cantiá prehisa de memoria" +0200060C="Yerru andarríu" +0200060D="Tipu archivu nu suportau" + +; Dialogs +02000702="Acetal" +02000705="&Sí" +02000707="Sí &a tó" +02000709="&Nu" +0200070B="Nu a &tó" + +02000710="Cancelal" +02000711="&Cancelal" +02000713="&Fechal" +02000714="Paral" +02000715="Reinicial" + +02000720="Ayua" + +; Extract dialog +02000800="Estrayel" +02000801="E&strayel a:" +02000802="Conseña" + +02000810="Mou e ruta" +02000811="Ruta compreta" +02000812="Ruta relativa" +02000813="Sin ruta" + +02000820="Mou e sobrescrebil" +02000821="Preguntal enantis" +02000822="Sobrescrebil sin preguntal" +02000823="Conserval ficherus esistentis" +02000824="Renombral de horma automática" +02000825="Autu-renombral ficherus esistentis" + +02000830="Ficherus" +02000831="Ficherus &selecionaus" +02000832="&Tolos ficherus" + +02000881="Especifical destinu palus ficherus estrayíus." + +02000890="Estrayendu" + +; Overwrite dialog +02000900="Confirmal remprazu de ficherus" +02000901="El diretóriu ya contieni un ficheru el mesmu nombri." +02000902="Escambial el ficheru esistenti" +02000903="pol esti otru?" + +02000911="Escambial nombri a&utomáticamenti" + +02000982="{0} bytes" +02000983="moificau'l" + +; Messages dialog +02000A00="Mensahis de dianósticu" + +02000A80="Mensahi" + +02000A91="Métou e compresión nu soportau pa '{0}'." +02000A92="Yerru datus en '{0}'. El ficheru está changarrau." +02000A93="Yerru e CRC '{0}'. El ficheru está changarrau." +02000A94="Yerru e datus nel ficheru encritau '{0}'. Conseña yerrónia?" +02000A95="Yerru e CRC nel ficheru encritau '{0}'. Conseña yerrónia?" + +; Password dialog +02000B00="Introuzil conseña" +02000B01="Introuzil conseña:" +02000B02="Mue&stral conseña" +02000B03="Repitil conseña:" +02000B10="Las cunseñas nu coinciín" +02000B11="Usi sólu letras ingresas, númirus i caráteris especialis (!, #, $, ...) pala conseña" +02000B12="La conseña tieni largura'n demasía" + +; Progress dialog +02000C00="Pogresu" +02000C01="Tiempu trascurríu:" +02000C02="Tiempu restanti:" +02000C03="Tamañu total:" +02000C04="Velociá:" +02000C05="Procesau:" +02000C06="Tasa e compresión:" + +02000C10="Se&gundu pranu" +02000C11="&Primel pranu" +02000C12="&Paral" +02000C13="A&continal" + +02000C20="Parau" + +02000C30="De siguru que quieri cancelal la operación?" + +; Compress dialog +02000D00="Añiil a archivu" +02000D01="&Archivu:" +02000D02="&Mou d'atualización:" +02000D03="&Hormatu d'archivu:" +02000D04="Mé&tou e compresión:" +02000D05="&Creal archivu sóliu" +02000D06="&Parámetrus:" +02000D07="Ocionis" +02000D08="Creal archivu 'SF&X'" +02000D09="Multi-hilu" +02000D0A="Encrital &nombris de ficheru" +02000D0B="Nive&l de compresión:" +02000D0C="Tamañu el i&zionariu:" +02000D0D="Tama&ñu e parabra:" +02000D0E="Usu e memoria pa compresión:" +02000D0F="Usu e memoria pa decompresión:" +02000D10="Encritación" +02000D11="Métou encritación:" +02000D12="Númiru hilus e la UCP:" +02000D13="Tamañu el bloqui sóliu:" +02000D14="Nu sóliu" +02000D15="Sóliu" +02000D16="Comprimil ficherus compartíus" + +02000D40="Desapartal en &balandronis, 'bytes':" +02000D41="Tamañu el volumin nu váliu" +02000D42="Introuza'l tamañu el volumin: {0} 'bytes'.\nDe siguru que quieri desapartal l'archivu'n tantus volúmenis?" + +02000D81="Almacenal" +02000D82="Normal" +02000D83="Másima" +02000D84="Respahila" +02000D85="La más respahila" +02000D86="Ultra" + +02000D90="Esproral" + +02000DA1="Añiil i remprazal ficherus" +02000DA2="Atualizal i añiil ficherus" +02000DA3="Atualizal sólu ficherus esistentis" +02000DA4="Sincronizal ficherus" + +02000DB1="Tolos ficherus" + +02000DC0="Comprimiendu" + +; Columns dialog +02000E00="Colunas" +02000E01="Selecioni las colunas que quiera muestral n'esti diretóriu. Pa reordinal las colunas usi las tecras AvPág o RePág." +02000E02="La coluna selecioná debi e tenel una &anchura e" +02000E03="'pixels'." + +02000E10="Movel pa &cimará" +02000E11="Movel pa em&bahu" +02000E12="Mue&stral" +02000E13="&Escuendel" +02000E14="Fihal" + +02000E81="Títulu" +02000E82="Anchura" + +; Testing +02000F90="Comprebandu" + + +; File Manager + +03000000="7-Zip - hestol de ficherus" + +; Menu +03000102="&Archivu" +03000103="&Eital" +03000104="&Vel" +03000105="&Herramientas" +03000106="A&yua" +03000107="A&tihus" + +; File +03000210="&Abril" +03000211="Abril &dentru" +03000212="Abril &huera" +03000220="&Vel" +03000221="&Eital" +03000230="Renom&bral" +03000231="&Copial a..." +03000232="&Movel pa..." +03000233="&Eliminal" +03000240="P&ropieais" +03000241="Come&ntariu" +03000242="Calculal suma e verificación" +03000243="Diff" +03000250="Creal diretóriu" +03000251="Creal ficheru" +03000260="&Salil" +03000270="De&sapartal ficheru..." +03000271="Com&binal ficherus..." + +; Edit +03000310="&Deshadel" +03000311="&Rehadel" +03000320="Cor&tal" +03000321="&Copial" +03000322="&Pegal" +03000323="&Eliminal" +03000330="Selecional &tó" +03000331="Deselecional tó" +03000332="&Invertil seleción" +03000333="Selecional..." +03000334="Deselecional..." +03000335="Selecional pol tipu" +03000336="Deselecional pol tipu" + +; View +03000410="Iconus g&randis" +03000411="Iconus caquerus" +03000412="&Listau" +03000413="&Detallis" +03000420="Nu soportau" +03000430="Abril diretóriu raí" +03000431="Subil un nivel" +03000432="Estorial de diretórius..." +03000440="&Atualizal" +03000449="Vista prana" +03000450="&2 panelis" +03000451="Barra e herramien&tas" +03000460="Barra e herramientas 'archivu'" +03000461="Barra e herramientas estándal" +03000462="Botonis grandis" +03000463="Muestral testu enus botonis" + +; Tools +03000510="&Ocionis..." +03000511="&Prebas ('benchmark')" + +; Help +03000610="&Contenius..." +03000620="&Al tentu 7-Zip..." + +; Favorites +03000710="&Añíl diretóriu a Atihus comu" +03000720="Atihu" + +; Options Dialog + +03010000="Ocionis" + +; Plugins +03010100="'Plugins'" +03010101="'&Plugins':" +03010110="Ocionis..." + +; Edit +03010200="Eitol" +03010201="&Eitol:" +03010202="&Diff:" + +; System +03010300="Sistema" +03010302="Asocial 7-Zip a hormatus:" +03010310="'Plugin'" + +; Settings +03010400="Configuración" +03010401="Muestral l'elementu \..\"" +03010402="Muestral icunus propius del ficheru" +03010410="Muestral menú el sistema" +03010420="&Selecional fila(s) enteriza(s)" +03010421="Muestral línias e la &cuairícula" +03010422="'Click' únicu p'abril un elementu" +03010430="Móu e seleción &alternativu" +03010440="Usa&l páhinas de memoria grandis" + +; Strings + +03020201="Copial" +03020202="Movel" +03020203="Copial a:" +03020204="Movel pa:" +03020205="Copiandu..." +03020206="Moviendu..." +03020207="Nu se puein movel u copial elementus pa esti tipu e diretórius." +03020208="Operación nu soportá." +03020209="Selecional diretóriu destinu." + +03020210="Confirmal eliminación del ficheru" +03020211="Confirmal eliminación del direhtoriu" +03020212="Confirmal eliminación de varius ficherus" +03020213="De siguru que quieri eliminal '{0}'?" +03020214="De siguru que quieri eliminal el diretóriu '{0}' i tol su conteniu?" +03020215="De siguru que quieri eliminal estus {0} elementus?" +03020216="Eliminandu..." +03020217="S'alcuentrau'n yerru al eliminal el ficheru u diretóriu" +03020218="El sistema nu puei movel un ficheru con ruta larga a la Papelera Recicrahi" + +03020220="Renombrandu..." +03020221="S'alcuentrau'n yerru al renombral el ficheru u diretóriu" +03020222="Confirmal copia el ficheru" +03020223="De siguru que quieri copiar estus ficherus al archivu?" + +03020230="Creal diretóriu" +03020231="Nombri e diretóriu:" +03020232="Nuevu diretóriu" +03020233="S'alcuentrau'n yerru al creal el diretóriu" + +03020240="Creal ficheru" +03020241="Nombri el ficheru:" +03020242="Nuevu ficheru" +03020243="S'alcuentrau'n yerru al creal el ficheru" + +03020250="Selecional" +03020251="Deselecional" +03020252="Máscara:" + +03020260="Estorial de diretórius" + +03020280="El ficheru '{0}' á síu moificau.\nAtualizalu nel archivu?" +03020281="Nu s'á puíu atualizal l'archivu\n'{0}'" +03020282="Nu s'á puíu ehecutal el eitol." +03020283="Abriendu..." +03020284="El ficheru pahi un virus (el nombri'l ficheru contieni espacius largus nel nombri)." + +03020290="Comentáriu" +03020291="&Comentáriu:" + +030202A0="Sistema" + +03020300="Mi PC" +03020301="Entorno de red" +03020302="Documentos" + +03020400="Añiil" +03020401="Estrayel" +03020402="Comprebal" + +03020420="Copial" +03020421="Movel" +03020422="Eliminal" +03020423="Inhormazión" + +03020500="Desapartal ficheru" +03020501="&Desapartal a:" +03020510="Desapartandu..." +03020520="Confirmal desapartamientu" +03020521="De siguru que quieri desapartal el ficheru'n {0} volúmenis?" +03020522="El tamañu lus volúmenis debi sel mas caqueru que'l del ficheru orihinal" + +03020600="Uñil ficherus" +03020601="&Uñil en:" +03020610="Uñiendu..." +03020620="Selecional sólu'l primel ficheru" +03020621="Nu s'á puíu detetal el ficheru comu parti d'un ficheru desapartau" +03020622="Nu s'á puíu alcuentral más d'un balandrón del ficheru desapartau" + +03020710="Calculandu la suma e verificación..." +03020720="Inhormazión de suma e verificación" +03020721="Suma e verificación de 'CRC' pala inhormazión:" +03020722="Suma e verificación de 'CRC' pala inhormazión i lus nombris:" + +03020800="Escaneandu..." + +03020900="Propieais" + +03020A01="Nu puei realizasi la operación dendi un diretóriu que tenga una ruta larga." +03020A02="You must select one file" +03020A03="You must select one or more files" +03020A04="File {0} is already exist" + +; Computer +03031100="Tamañu total" +03031101="Espaciu dispunibri" +03031102="Tamañu el 'cluster'" +03031103="Etiqueta" + +; Network +03031200="Nombri local" +03031201="Proveol" + +; Benchmark Dialog + +03080000="Prebas ('benchmark')" +03080001="Usu e memoria:" +03080002="Comprimiendu" +03080003="Comprimiendu" +03080004="Velociá" +03080005="Razón" +03080006="Razón total" +03080007="Atual" +03080008="Resurtau" +03080009="Pasis:" +0308000A="Yerrus:" +0308000B="Usu e CPU" +0308000C="Razón / Usu" + +;!@LangEnd@! diff --git a/GUI/Lang/fa.txt b/GUI/Lang/fa.txt new file mode 100644 index 0000000..01c126d --- /dev/null +++ b/GUI/Lang/fa.txt @@ -0,0 +1,512 @@ +;!@Lang@!UTF-8! +; 7-Zip 4.53 +; Translated by Edris Naderan +; Changed and updated by Mehdi Farhadi (since 4.30) +; +; +; + +00000000="Farsi" +00000001="فارسی" +00000002="41" + +; 7-Zip Configuration + +; Title +01000000="پیکربندی ‎7-Zip" + +; Info Page +01000100="درباره ‎7-Zip" +01000103="برنامه‌ای که در پیش رو دارید یک برنامه مجانی است، اما شما می توانید با پرداخت مبلغی جزئی به توسعه این نرم‌افزار کمک کنید." +01000104="پشتيباني" +01000105="ثبت کردن" + +; Folders Page +01000200="پوشه‌ها" +01000210="پوشه در حال کار" +01000211="پوشه موقت سیستم" +01000212="جاری" +01000213="تعیین:" +01000214="فقط برای درایوهای قابل جابجایی استفاده شود" + +01000281="جهت ذخیره فایل‌های موقتی مکانی را تعیین کنید." + +; System Page +01000300="سیستم" +01000301="نمایش گزینه‌های مربوط به فشرده‌سازی در منوی ویندوز" +01000302="نمایش همه گزینه‌ها در یک زیرمنو" +01000310="گزینه‌های منو:" + +; Language Page +01000400="زبان" +01000401="زبان:" + + +; 7-Zip Explorer extension + +; Context menu +02000101="7-Zip" +02000102="فرمان‌های ‎7-Zip" +02000103="بازکردن آرشیو" +02000104="آرشیو انتخاب شده را باز می‌کند." +02000105="استخراج فایل‌ها..." +02000106="فایل‌ها را از آرشیو انتخاب شده استخراج می‌کند." +02000107="افزودن به آرشیو..." +02000108="گزینه‌های انتخاب شده را به آرشیو اضافه می‌کند." +02000109="بررسی آرشیو" +0200010A="جامعیت آرشیو انتخاب شده را بررسی می‌کند." +0200010B="استخراج در اینجا" +0200010C="فایل‌ها را از آرشیو انتخاب شده به پوشه جاری استخراج می‌کند." +0200010D="استخراج به {0}" +0200010E="فایل‌ها را به زیرپوشه استخراج می‌کند." +0200010F="افزودن به {0}" +02000110="گزینه‌های انتخاب شده را به آرشیو اضافه می‌کند." +02000111="فشرده‌سازی و ارسال با ایمیل..." +02000112="گزینه‌های انتخاب شده را فشرده‌ می‌سازد و آرشیو را توسط ایمیل ارسال می‌کند." +02000113="فشرده‌سازی در {0} و ارسال با ایمیل" +02000114="گزینه‌های انتخاب شده را فشرده‌ می‌سازد و آرشیو را توسط ایمیل ارسال می‌کند." + +02000140="<پوشه>" +02000141="<آرشیو>" + +; Properties +02000203="مسیر" +02000204="نام" +02000205="Extension" +02000206="پوشه" +02000207="اندازه" +02000208="اندازه فشرده" +02000209="صفات" +0200020A="ساخته شده" +0200020B="دستیابی شده" +0200020C="تغییر یافته" +0200020D="Solid" +0200020E="توضیح‌دار" +0200020F="رمزگذاری شده" +02000210="قسمت قبلی" +02000211="قسمت بعدی" +02000212="لغت‌نامه" +02000213="CRC" +02000214="نوع" +02000215="Anti" +02000216="روش" +02000217="سیستم میزبان" +02000218="سیستم فایل" +02000219="کاربر" +0200021A="گروه" +0200021B="قطعه" +0200021C="توضيح‌" +0200021D="مکان" +0200021E="پيشوند مسير" +0200021F="پوشه‌ها" +02000220="فایل‌ها" +02000221="Version" +02000222="Volume" +02000223="Multivolume" +02000224="Offset" +02000225="Links" +02000226="قطعات" +02000227="Volumes" + +; Status bar +02000301="{0} گزینه انتخاب شده" +02000302="{0} گزینه" + +02000320="فایل‌ها:" +02000321="پوشه‌ها:" +02000322="اندازه:" +02000323="اندازه فشرده:" +02000324="آرشیو‌ها:" + +; List Context Menu +02000401="ستون‌ها..." + +02000411="بازکردن" +02000412="استخراج..." + +; ToolBar +02000501="استخراج" + +; Messages +02000601="عملیات بروزرسانی برای این آرشیو پشتیبانی نمی‌شود." +02000602="بروز رسانی آرشیو {0} ممکن نیست" +02000603="ایجاد پوشه '{0}' ممکن نیست" +02000604="اين فایل یک آرشیو پشتیبانی شده نيست." +02000605="خطا" +02000606="تعداد گزینه‌ها بسیار زیاد است" +02000607="هیچ برنامه‌ای برای باز کردن این فایل منتسب نشده است" +02000608="خطایی وجود ندارد" +02000609="فايل '{0}' يك آرشيو شناخته شده نيست" +0200060A="برنامه قادر به بازكردن آرشيو رمزگذارى شده '{0}' نيست. كلمه عبور اشتباه است؟" + +; Dialogs +02000702="تایید" +02000705="&بلی" +02000707="بلی همه را" +02000709="&خیر" +0200070B="خیر هیچ کدام" + +02000710="انصراف" +02000711="انصراف" +02000713="بستن" +02000714="توقف" +02000715="اجرای مجدد" + +02000720="راهنما" + +; Extract dialog +02000800="استخراج" +02000801="استخراج به:" +02000802="کلمه عبور" + +02000810="نوع مسیر" +02000811="نام کامل مسیر" +02000812="نام مسیر جاری" +02000813="بدون نام مسیر" + +02000820="شيوه جایگزینی" +02000821="قبل از جایگزینی سوال شود" +02000822="جایگزینی بدون اخطار" +02000823="نادیده گرفتن فایل‌های موجود" +02000824="تغییر نام خودکار" +02000825="تغییر نام خودکار فایل‌های موجود" + +02000830="فایل‌ها" +02000831="فایل‌های انتخاب شده" +02000832="همه فایل‌ها" + +02000881="مکانی را جهت استخراج فایل‌ها تعیین کنيد." + +02000890="در حال استخراج" + +; Overwrite dialog +02000900="تایید جایگزینی فایل" +02000901="پوشه مقصد حاوی فایلی با نام فایل در حال پردازش می‌باشد." +02000902="آیا شما مایل به جایگزینی این فایل" +02000903="با این فایل هستید؟" + +02000911="تغییر نام خودکار" + +02000982="{0} بایت" +02000983="تغییر کرده در" + +; Messages dialog +02000A00="پیغام‌های تشخيصی" + +02000A80="پیغام" + +02000A91="روش فشرده‌سازی پشتیبانی نشده برای '{0}'." +02000A92="خطای داده‌ها در '{0}'. اين فايل دچار مشكل است." +02000A93="خطای CRC در '{0}'. اين فايل دچار مشكل است." +02000A94="خطای داده‌ها در فايل رمزگذارى شده '{0}'. كلمه عبور اشتباه است؟" +02000A95="خطای CRC در فايل رمزگذارى شده '{0}'. كلمه عبور اشتباه است؟" + +; Password dialog +02000B00="کلمه عبور" +02000B01="کلمه عبور:" +02000B02="نمایش کلمه عبور" +02000B03="تكرار كلمه عبور:" +02000B10="دو كلمه عبور يكسان نيستند" +02000B11="فقط از حروف انگليسى، اعداد و علامت‌هاى خاص (!، #، $، ...) در كلمه عبور استفاده كنيد" +02000B12="كلمه عبور خيلی بلند است" + +; Progress dialog +02000C00="پردازش" +02000C01="زمان سپری شده:" +02000C02="زمان باقی مانده:" +02000C03="اندازه:" +02000C04="سرعت:" +02000C05="پردازش شده:" +02000C06="نسبت فشردگى:" + +02000C10="پس زمینه" +02000C11="پیش زمینه" +02000C12="توقف" +02000C13="ادامه" + +02000C20="متوقف" + +02000C30="آیا شما قصد لغو عملیات را دارید؟" + +; Compress dialog +02000D00="افزودن به آرشیو" +02000D01="آرشیو:" +02000D02="شيوه بروزرسانی:" +02000D03="قالب آرشیو:" +02000D04="روش فشرده‌سازی:" +02000D05="ایجاد آرشیو يکپارچه (&Solid)" +02000D06="پارامترها" +02000D07="تنظیمات" +02000D08="ایجاد آرشیو قابل اجرا (SF&X)" +02000D09="Multi-threading" +02000D0A="رمزگذاری نام فایل‌ها" +02000D0B="ميزان فشرده‌سازی:" +02000D0C="اندازه لغت‌نامه:" +02000D0D="اندازه کلمه:" +02000D0E="مقدار حافظه لازم جهت فشرده‌سازی:" +02000D0F="مقدار حافظه لازم جهت استخراج:" +02000D10="رمزگذاری" +02000D11="شيوه رمزگذاری:" +02000D12="Number of CPU threads:" +02000D13="Solid block size:" +02000D14="Non-solid" +02000D15="Solid" +02000D16="فشرده‌سازی فایل‌هاى در حال استفاده ديگر برنامه‌ها" + +02000D40="تقسیم به چندين قسمت، بر حسب بايت:" +02000D41="اندازه تقسیم نادرست است" +02000D42="اندازه تقسیم تعيين شده: {0} بايت.\nآیا شما قصد دارید آرشيو را به قسمتهاى به اين اندازه تقسيم كنيد؟" + +02000D81="ذخیره" +02000D82="متوسط" +02000D83="حداکثر" +02000D84="سریع" +02000D85="خیلی سریع" +02000D86="مافوق" + +02000D90="آدرس‌دهی" + +02000DA1="افزودن و جایگزینی فایل‌ها" +02000DA2="بروزرسانی و افزودن فایل‌ها" +02000DA3="تازه کردن فایل‌های موجود" +02000DA4="سنکرون کردن فایل‌ها" + +02000DB1="همه فایل‌ها" + +02000DC0="فشرده‌سازی" + +; Columns dialog +02000E00="ستون‌ها" +02000E01="ستون‌هایی را که می‌خواهید نمایش داده شوند انتخاب کنید. از کليدهای انتقال به بالا و پایین برای جابجایی ستون‌ها استفاده کنيد." +02000E02="ستون‌ انتخاب شده باید" +02000E03="پیکسل عرض داشته باشد." + +02000E10="انتقال به بالا" +02000E11="انتقال به پایین" +02000E12="نمایش" +02000E13="مخفی" +02000E14="Set" + +02000E81="عنوان" +02000E82="عرض" + +; Testing +02000F90="بررسی" + + +; File Manager + +03000000="برنامه مدیریت فایل ‎7-Zip" + +; Menu +03000102="فایل" +03000103="ویرایش" +03000104="نمایش" +03000105="ابزارها" +03000106="راهنما" +03000107="برگزیده‌ها" + +; File +03000210="باز کردن" +03000211="باز کردن درونی" +03000212="باز کردن بیرونی" +03000220="نمایش" +03000221="ویرایش" +03000230="تغییر نام" +03000231="کپی به..." +03000232="انتقال به..." +03000233="حذف" +03000240="اطلاعات" +03000241="توضيح" +03000242="محاسبه checksum" +03000250="ایجاد پوشه" +03000251="ایجاد فایل" +03000260="خروج" +03000270="تقسیم فایل..." +03000271="ترکیب فایل‌ها..." + +; Edit +03000310="عقب" +03000311="جلو" +03000320="بریدن" +03000321="کپی" +03000322="چسباندن" +03000323="حذف" +03000330="انتخاب همه" +03000331="لغو انتخاب‌ها" +03000332="معکوس كردن انتخاب‌ها" +03000333="انتخاب..." +03000334="لغو انتخاب..." +03000335="انتخاب بر حسب نوع" +03000336="لغو انتخاب بر حسب نوع" + +; View +03000410="آیکون‌های بزرگ" +03000411="آیکون‌های کوچک" +03000412="فهرست‌وار" +03000413="با جزئیات" +03000420="نامرتب" +03000430="باز کردن شاخه اصلی" +03000431="یک مرحله به بالا" +03000432="تاریخچه پوشه‌ها..." +03000440="از نو چیدن" +03000449="Flat View" +03000450="2 پانل" +03000451="منوهای ابزار" +03000460="منوی ابزار آرشیو" +03000461="منوی ابزار استانداد" +03000462="کلید‌های بزرگ" +03000463="نمایش برچسب کلید‌ها" + +; Tools +03000510="تنظیمات..." +03000511="سنجش" + +; Help +03000610="محتویات..." +03000620="درباره ‎7-Zip..." + +; Favorites +03000710="افزودن پوشه به برگزیده‌ها به عنوان" +03000720="علامت" + +; Options Dialog + +03010000="تنظیمات" + +; Plugins +03010100="ماژول‌ها" +03010101="ماژول‌ها:" +03010110="تنظیمات..." + +; Edit +03010200="ویرایشگر" +03010201="ویرایشگر:" + +; System +03010300="سیستم" +03010302="انتساب ‎7-Zip با:" +03010310="مودول" + +; Settings +03010400="تنظیمات" +03010401="نمایش گزینه \"..\"" +03010402="نمایش آیکون واقعی فایل‌ها" +03010410="نمایش منوی سیستم" +03010420="انتخاب سطر به صورت کامل" +03010421="نمایش خطوط جدولی" +03010430="شيوه انتخاب جايگزين" +03010440="استفاده از شیوه حافظه هنگفت" + +; Strings + +03020201="کپی" +03020202="انتقال" +03020203="کپی به:" +03020204="انتقال به:" +03020205="در حال کپی..." +03020206="در حال انتقال..." +03020207="شما نمی‌توانید گزینه‌هایی را در پوشه خودشان کپی کنید یا انتقال دهید." +03020208="عملیات پشتیبانی نمی‌شود." +03020209="پوشه مقصد را انتخاب كنيد." + +03020210="تایید حذف فایل" +03020211="تایید حذف پوشه" +03020212="تایید حذف فایل‌ها" +03020213="آیا شما قصد دارید '{0}' را حذف کنید؟" +03020214="آیا شما قصد دارید پوشه '{0}' و تمام محتویات آن را حذف کنید؟" +03020215="آیا شما قصد دارید اين '{0}' گزینه را حذف کنید؟" +03020216="در حال حذف..." +03020217="خطا هنگام حذف فایل یا پوشه" + +03020220="تغییر نام..." +03020221="خطای تغییر نام فایل یا پوشه" +03020222="تایید کپی فایل" +03020223="آیا شما قصد دارید فایل‌ها را به آرشیو کپی کنید" + +03020230="ایجاد پوشه" +03020231="نام پوشه:" +03020232="پوشه جدید" +03020233="خطای ایجاد پوشه" + +03020240="ایجاد فایل" +03020241="نام فایل:" +03020242="فایل جدید" +03020243="خطای ایجاد فایل" + +03020250="انتخاب" +03020251="لغو انتخاب" +03020252="ماسك:" + +03020260="تاریخچه پوشه‌ها" + +03020280="فایل '{0}' تغییر کرده است.\n آیا میل دارید فایل مذکور در آرشیو بروزرسانی شود؟" +03020281="این فایل قابل بروزرسانی نمی‌باشد\n'{0}'" +03020282="ویرایشگر اجرا نمی‌شود." +03020283="در حال باز کردن..." + +03020290="توضيح" +03020291="توضيح:" + +030202A0="سیستم" + +03020300="کامپیوتر" +03020301="شبکه" + +03020400="افزودن" +03020401="استخراج" +03020402="بررسی" + +03020420="کپی" +03020421="انتقال" +03020422="حذف" +03020423="اطلاعات" + +03020500="تقسیم فایل" +03020501="تقسیم درون:" +03020510="در حال تقسیم..." +03020520="تاييد تقسیم فایل" +03020521="آیا شما قصد دارید اين فايل را به {0} قسمت تقسيم كنيد؟" +03020522="اندازه قسمت‌ها بايد كوچكتر از اندازه فايل اصلى باشد" + +03020600="ترکیب فایل‌ها" +03020601="ترکیب درون:" +03020610="در حال ترکیب..." +03020620="فقط اولين فايل را انتخاب كنيد" + +03020710="در حال محاسبه Checksum..." +03020720="اطلاعات Checksum" +03020721="CRC checksum for data:" +03020722="CRC checksum for data and names:" + +03020800="در حال پويش..." + +03020900="مشخصات" + +; Computer +03031100="اندازه کل" +03031101="فضای خالی" +03031102="سایز کلاستر" +03031103="برچسب" + +; Network +03031200="نام محلی" +03031201="مهياكننده" + +; Benchmark Dialog + +03080000="سنجش" +03080001="حافظه مصرفی:" +03080002="فشرده‌سازی" +03080003="استخراج" +03080004="سرعت" +03080005="درجه‌بندی" +03080006="درجه‌بندی کلی" +03080007="جاری" +03080008="دستاورد" +03080009="تعداد عبور:" +0308000A="خطاها:" +0308000B="CPU Usage" +0308000C="Rating / Usage" + +;!@LangEnd@! diff --git a/GUI/Lang/fi.txt b/GUI/Lang/fi.txt new file mode 100644 index 0000000..fef30c4 --- /dev/null +++ b/GUI/Lang/fi.txt @@ -0,0 +1,544 @@ +;!@Lang@!UTF-8! +; 7-Zip 4.57 +; Translated by Ari Ryynanen +; Updated by Jarko P. (3.08.04 beta -->4.30) +; Updated by Juhani Valtasalmi (4.30 --> 4.42) +; Updated with light modifications by T.Sakkara (4.42 --> 9.07 beta) 1.9.2009 +; + +00000000="Finnish" +00000001="Suomi" +00000002="11" + +; 7-Zip Asetukset + +; Title +01000000="Lisäsetukset" + +; Info Page; Tietoja Ohjelmasta +01000100="Tietoja" +01000103="7-Zip on ilmainen ohjelmisto. Halutessasi voit kuitenkin tukea kehitystyötä rekisteröitymällä." +01000104="Tuki (engl.)" +01000105="Rekisteröidy (engl.)" + +; Folders Page; Asetukset/Kansiot +01000200="Kansiot" +01000210="&Työkansio" +01000211="&Järjestelmän väliaikaiskansio" +01000212="&Nykyinen kansio" +01000213="&Valittu kansio:" +01000214="Käytä vain siirrettäville tietovälineille" + +01000281="Määritä väliaikaistiedostojen sijainti." + +; System Page; Asetukset/Järjestelmäliitännät +01000300="Järjestelmä" +01000301="Liitä 7-Zip järjestelmän valikoihin." +01000302="Ryhmitetty järjestelmävalikko" +01000310="Järjestelmävalikon sisältö:" + +; Language Page; Asetukset/Kieli +01000400="Kieli" +01000401="Kieli:" + + +; 7-Zip Explorer extension; 7-Zip Järjestelmäkytkennät + +; Context menu; Järjestelmämenu +02000101="7-Zip" +02000102="7-Zip komennot" +02000103="Avaa" +02000104="Avaa valittu paketti." +02000105="Purkaa..." +02000106="Purkaa valitun paketin." +02000107="Lisää pakettiin..." +02000108="Lisää tiedostot valittuun pakettiin." +02000109="Eheystarkastus" +0200010A="Tarkistaa valitun paketin eheyden." +0200010B="Purkaa tänne" +0200010C="Purkaa tiedostot valitusta paketista nykyiseen kansioon." +0200010D="Purkaa kansioon {0}" +0200010E="Purkaa tiedostot alikansioon." +0200010F="Lisää pakettiin {0}" +02000110="Lisää valitut tiedostot pakettiin." +02000111="Pakkaa tiedostot ja lähetä..." +02000112="Pakkaa valitut ja lähetä sähköpostilla." +02000113="Lisää pakettiin {0} ja lähetä" +02000114="Lisää valitut tiedostot pakettiin ja lähetä sähköpostilla." + +02000140="" +02000141="" + +; Properties; Ominaisuudet +02000203="Polku" +02000204="Nimi" +02000205="Tiedostomuoto" +02000206="Kansio" +02000207="Koko" +02000208="Pakattu koko" +02000209="Määritteet" +0200020A="Luotu" +0200020B="Käytetty" +0200020C="Muokattu" +0200020D="Kiinteä" +0200020E="Kommentoitu" +0200020F="Suojaus" +02000210="Pilko ennen" +02000211="Pilko jälkeen" +02000212="Sanakirja" +02000213="CRC" +02000214="Tyyppi" +02000215="Anti" +02000216="Menetelmä" +02000217="Isäntäjärjestelmä" +02000218="Tiedostojärjestelmä" +02000219="Käyttäjä" +0200021A="Ryhmä" +0200021B="Lohko" +0200021C="Kuvaus" +0200021D="Kohta" +0200021E="Polun etuliite" +0200021F="Kansioita" +02000220="Tiedostoja" +02000221="Versio" +02000222="Nimi" +02000223="Pilkottu" +02000224="Siirtymä" +02000225="Linkit" +02000226="Lohkot" +02000227="Nimet" + +02000229="64-bittinen" +0200022A="Koodaus: UCS Big-endian" +0200022B="Suoritin" +0200022C="Fyysinen koko" +0200022D="Otsikon koko" +0200022E="Tarkistussumma" +0200022F="Ominaisuudet" +02000230="Virtuaaliosoite" +02000231="ID" +02000232="Lyhytnimi" +02000233="Creator Application" +02000234="Sektorikoko" +02000235="Moodi" +02000236="Linkki" + +; Status bar; Tilarivi +02000301="{0} tiedosto(a) valittu" +02000302="{0} tiedosto(a)" + +02000320="Tiedostoja:" +02000321="Kansioita:" +02000322="Koko:" +02000323="Pakattu koko:" +02000324="Paketteja:" + +; List Context Menu +02000401="&Sarakkeet..." + +02000411="&Avaa" +02000412="&Purkaa..." + +; ToolBar; Työkalut +02000501="Purkaa" + +; Messages; Viestit +02000601="Tätä pakettia ei voi päivittää." +02000602="Pakettia '{0}' ei voida päivittää." +02000603="Ei voida luoda kansioita '{0}.'" +02000604="Tiedoston pakkaustapaa ei tueta." +02000605="Virhe!" +02000606="Liian monta kohdetta." +02000607="Tiedostotyyppiin ei ole liitetty mitään ohjelmaa." +02000608="Ei virheitä." +02000609="Tiedoston '{0}' pakkausta ei voi purkaa." +0200060A="Ei voi avata suojattua pakettia '{0}'. Onko salasana oikea?" +0200060B="Ei riittävästi muistia toimintoa varten" +0200060C="Tuntematon virhe" +0200060D="Pakkaustapaa ei tueta" + +; Dialogs; Ikkunat +02000702="OK" +02000705="&Kyllä" +02000707="Kyllä k&aikkiin" +02000709="&Ei" +0200070B="E&i kaikkiin" + +02000710="Peruuta" +02000711="&Peruuta" +02000713="&Sulje" +02000714="Pysäytä" +02000715="Aloita uudelleen" + +02000720="Ohje" + +; Extract dialog; Purkuikkuna +02000800="Purkaa" +02000801="&Purkaa kansioon" +02000802="Salasana" + +02000810="Polkujen sisällytys:" +02000811="Sisällytä koko polku" +02000812="Nykyiset nimet" +02000813="Älä sisällytä polkuja" + +02000820="Samannimiset tiedostot:" +02000821="Kysy tapauskohtaisesti" +02000822="Korvaa" +02000823="Ohita" +02000824="Uudelleennimeä" +02000825="Uudelleennimeä aiemmat" + +02000830="Tiedostot" +02000831="&Valitut" +02000832="&Kaikki" + +02000881="Purkaa kansioon" + +02000890="Puretaan paketti" + +; Overwrite dialog; Korvausikkuna +02000900="Vahvista tiedoston korvaus" +02000901="Tämä kansio sisältää jo samannimisen tiedoston." +02000902="Haluatko korvata tiedoston" +02000903="tällä tiedostolla?" + +02000911="&Uudelleennimeä automaattisesti" + +02000982="{0} tavua" +02000983="muokattu" + +; Viesti-ikkuna +02000A00="Tietoja" + +02000A80="Viesti" + +02000A91="Tukematon pakkausmenetelmä tiedostolle '{0}'." +02000A92="Tietovirhe tiedostossa '{0}'. Tiedosto on viottunut." +02000A93="Tiedoston '{0}' eheystarkistus epäonnistui. Tiedosto on vioittunut." +02000A94="Virhe avattaessa suojattua pakettia '{0}'. Onko salasana oikea?" +02000A95="CRC-virhe avattaessa suojattua pakettia '{0}'. Onko salasana oikea?" + +; Salasanaikkuna +02000B00="Anna salasana" +02000B01="Anna salasana:" +02000B02="Näytä &salasana" +02000B03="Toista salasana:" +02000B10="Salasanat eivät täsmää" +02000B11="Salasanassa voi käyttää numeroita ja erikoismerkkejä, mutta EI skandinaavisia kirjaimia." +02000B12="Liian pitkä salasana" + +; Progress dialog; Edistymisikkuna +02000C00="Käsitellään" +02000C01="Aikaa kulunut:" +02000C02="Aikaa jäljellä:" +02000C03="Koko:" +02000C04="Nopeus:" +02000C05="Käsitelty:" +02000C06="Pakkaussuhde:" + +02000C10="&Tausta-ajona" +02000C11="&Normaali prioriteetti" +02000C12="&Pysäytä" +02000C13="&Jatka" + +02000C20="Pysäytetty" + +02000C30="Keskeytetäänkö toiminto?" + +; Compress dialog; Pakkausikkuna +02000D00="Lisää pakettiin" +02000D01="&Paketti:" +02000D02="&Päivitystapa:" +02000D03="Pakkaus&:" +02000D04="Pakkaus&menetelmä:" +02000D05="Luo Kiinte&ä paketti" +02000D06="&Parametrit:" +02000D07="Asetukset" +02000D08="Luo itsepurkautuva paketti" +02000D09="Prosessorisäikeet" +02000D0A="Tiedosto&nimien suojaus" +02000D0B="Pakkauksen &taso:" +02000D0C="&Sanakirjan koko:" +02000D0D="&Sanan koko:" +02000D0E="Pakkauksessa tarvittava muistimäärä:" +02000D0F="Purkauksessa tarvittava muistimäärä:" +02000D10="Suojaus" +02000D11="Salausalgoritmi" +02000D12="Prosessorisäikeet" +02000D13="Kiinteä lohkokoko" +02000D14="Muuttuva" +02000D15="Kiinteä" +02000D16="Pakkaa yhteiset tiedostot" + +02000D40="&Osien koko pilkottaessa:" +02000D41="Pilkotun osan koko epäkelpo" +02000D42="Pilkottavien osien koko: {0} tavua.\nPilkotaanko paketti edellämainitun kokoisiin osiin?" + +02000D81="Ei pakkausta" +02000D82="Normaali" +02000D83="Täysi" +02000D84="Nopea" +02000D85="Nopein" +02000D86="Ultra" + +02000D90="Selaa" + +02000DA1="Lisää ja korvaa tiedostoja" +02000DA2="Päivitä ja lisää tiedostoja" +02000DA3="Päivitä olemassaolevat tiedostot" +02000DA4="Synkronoi tiedostot" + +02000DB1="Kaikki tiedostot" + +02000DC0="Lisätään pakettiin" + +; Columns dialog; Sarakeikkuna +02000E00="Sarakkeet" +02000E01="Valitse tässä kansiossa näytettävät sarakkeet. Käytä uudelleenjärjestelyyn painikkeita 'Siirrä ylös' ja 'Siirrä alas'" +02000E02="Aseta valitun sarakkeen &leveydeksi" +02000E03="pikseliä." + +02000E10="Siirrä &ylös" +02000E11="Siirrä &alas" +02000E12="&Näytä" +02000E13="&Piilota" +02000E14="Aseta" + +02000E81="Otsikko" +02000E82="Leveys" + +; Tarkistus +02000F90="Eheystarkistus" + + +; File Manager; Tiedostonhallinta + +03000000="7-Zip Tiedostonhallinta" + +; Menu; Päävalikko +03000102="&Tiedosto" +03000103="&Muokkaa" +03000104="&Näytä" +03000105="Työ&kalut" +03000106="&Ohje" +03000107="&Suosikit" + +; File; Tiedosto-valikko +03000210="&Avaa" +03000211="Avaa sisäisesti" +03000212="Avaa &ulkoisesti" +03000220="&Näytä" +03000221="&Muokkaa" +03000230="Nim&eä uudelleen" +03000231="&Kopioi..." +03000232="&Siirrä..." +03000233="&Poista" +03000240="Ominais&uudet" +03000241="Ku&vaus" +03000242="Laske tarkistussummat" +03000243="Eroavaisuudet" +03000250="Luo kansio" +03000251="Luo tiedosto" +03000260="&Lopeta" +03000270="&Pilko tiedosto..." +03000271="&Yhdistä pilkotut..." + +; Edit; Muokkaa-valikko +03000310="&Kumoa" +03000311="&Toista" +03000320="&Leikkaa" +03000321="K&opioi" +03000322="L&iitä" +03000323="&Poista" +03000330="V&alitse kaikki" +03000331="Poista &valinnat" +03000332="&Käänteinen valinta" +03000333="Valitse..." +03000334="Poista valinta..." +03000335="Valitse tyypin mukaan" +03000336="Poista valinnat tyypin mukaan" + +; View; Näytä-valikko +03000410="Suu&ret kuvakkeet" +03000411="&Pienet kuvakkeet" +03000412="&Luettelo" +03000413="&Tiedot" +03000420="Alkuperäinen järjestys" +03000430="Avaa pääkansio" +03000431="Avaa yläkansio" +03000432="Kansiohistoria..." +03000440="P&äivitä" +03000449="Kansioiden sisältö luetteloituna" +03000450="&Kaksi panelia" +03000451="&Työkalupalkki" +03000460="Pakettipalkki" +03000461="Vakiopalkki" +03000462="Suuret painikkeet" +03000463="Näytä painikkeiden tekstit" + +; Tools; Työkalut-valikko +03000510="&Asetukset..." +03000511="&Nopeustesti" + +; Help; Ohje-valikko +03000610="&Sisältö..." +03000620="&Tietoja ohjelmasta" + +; Favorites; Suosikit +03000710="&Lisää Suosikit-kansioon" +03000720="Kirjanmerkki" + +; Options Dialog; Asetukset-ikkuna + +03010000="Asetukset" + +; Plugins; Lisäosat +03010100="Lisäosat" +03010101="&Lisäosat:" +03010110="Lisäsetukset..." + +; Edit; Muokkaus +03010200="Muokkausohjelmat" +03010201="&Tekstieditori:" +03010202="&Eroavaisuuksien etsintä:" + +; System; Järjestelmäliitännät +03010300="Järjestelmäliitännät" +03010302="Liitä 7-Zip seuraaviin tiedostotyypeihin:" +03010310="Lisäosa" + +; Settings; Asetukset +03010400="Tiedostoikkuna" +03010401="Näytä &yläkansion symboli" +03010402="Näytä &aidot tiedostokuvakkeet" +03010410="Näytä &järjestelmävalikko" +03010420="&Valitse koko rivi" +03010421="Näytä &ruudukko" +03010422="Avaa &kertanapsautuksella" +03010430="Vaihtoehtoinen valintojen &esitystapa" +03010440="Käytä &suuria muistisivuja" + +; Strings; Merkkijonot + +03020201="Kopioi" +03020202="Siirrä" +03020203="Kopioi kansioon:" +03020204="Siirrä kansioon:" +03020205="Kopioidaan..." +03020206="Siirretään..." +03020207="Ei voida siirtää tai kopioida tiedostoja kyseiseen kansioon." +03020208="Toiminto ei ole tuettu." +03020209="Valitse kohdekansio." + +03020210="Vahvista tiedoston poisto" +03020211="Vahvista kansion poisto" +03020212="Vahvista useiden kohteiden poisto" +03020213="Poistetaanko tiedosto '{0}'?" +03020214="Poistetaanko kansio '{0}' ja kaiken sen sisällön?" +03020215="Poistetaanko nämä {0} kohdetta?" +03020216="Poistetaan..." +03020217="Virhe poistettaessa tiedostoa tai kansiota" +03020218="Roskakoriin ei voida siirtää tiedostoa, jolla on pitkä nimi" + +03020220="Nimetään uudelleen..." +03020221="Virhe uudelleennimettäessä tiedostoa tai kansiota" +03020222="Vahvista tiedoston kopioiminen" +03020223="Kopioidaanko tiedostot pakettiin?" + +03020230="Luo uusi kansio" +03020231="Kansion nimi:" +03020232="Uusi kansio" +03020233="Virhe luotaessa kansiota" + +03020240="Luo uusi tiedosto" +03020241="Tiedostonimi:" +03020242="Uusi tiedosto" +03020243="Virhe luotaessa tiedostoa" + +03020250="Valitse" +03020251="Poista valinta" +03020252="Maski:" + +03020260="Kansiohistoria" + +03020280="Tiedostoa '{0}' on muutettu.\nHaluatko päivittää paketin?" +03020281="Ei voida päivittää tiedostoa \n'{0}'." +03020282="Editoria ei voida käynnistää." +03020283="Avataan..." +03020284="Tiedosto vaikuttaa haittaohjelmalta, sillä sen nimi sisältää peräkkäisiä välilyöntejä." + +03020290="" +03020291="&Kuvaus:" + +030202A0="Järjestelmä" + +03020300="Tietokone" +03020301="Verkko" +03020302="Dokumentit" + +03020400="Lisää" +03020401="Purkaa" +03020402="Tarkista eheys" + +03020420="Kopioi" +03020421="Siirrä" +03020422="Poista" +03020423="Ominaisuudet" + +03020500="Pilko tiedosto" +03020501="&Pilko kansioon:" +03020510="Pilkotaan..." +03020520="Vahvista pilkkominen" +03020521="Pilkotaanko tiedosto {0} osaan?" +03020522="Pilkotun osan koon pitää olla pienempi kuin alkuperäisen tiedoston." + +03020600="Yhdistä pilkotut tiedostot" +03020601="&Yhdistä kansioon:" +03020610="Yhdistetään..." +03020620="Valitse vain ensimmäinen tiedosto" +03020621="Tiedostoa ei tunnisteta pilkotuksi" +03020622="Vain yksi pilkottu osatiedosto löytyi" + +03020710="Laskee tarkistussummaa..." +03020720="Tarkistussummat" +03020721="Sisällön CRC-tarkistussumma:" +03020722="Sisällön ja tiedostonimien CRC-tarkistussumma:" + +03020800="Etsitään..." + +03020900="Ominaisuudet" + +03020A01="Toimintoa ei voi suorittaa kansiosta, jonka nimi on pitkä." +03020A02="Valitse yksi tiedosto" +03020A03="Valitse vähintään yksi tiedosto" +03020A04="Tiedosto {0} on jo olemassa" + +; Computer; Tietokone +03031100="Aseman koko" +03031101="Vapaata tilaa" +03031102="Varausyksikön koko" +03031103="Nimi" + +; Network; Verkko +03031200="Paikallinen nimi" +03031201="Palveluntarjoja" + +; Benchmark Dialog; Nopeustesti + +03080000="Nopeustesti" +03080001="Muistin käyttö:" +03080002="Pakkaaminen" +03080003="Purkaminen" +03080004="Nopeus" +03080005="Teho" +03080006="Teho yhteensä" +03080007="Tämänhetkinen" +03080008="Tulos" +03080009="Läpäisyt:" +0308000A="Virheitä:" +0308000B="Suoritinkäyttö" +0308000C="Teho / käyttö" + +;!@LangEnd@! + diff --git a/GUI/Lang/fr.txt b/GUI/Lang/fr.txt new file mode 100644 index 0000000..c7d8f7c --- /dev/null +++ b/GUI/Lang/fr.txt @@ -0,0 +1,543 @@ +;!@Lang@!UTF-8! +; 7-Zip 9.07 +; Translated by Nicolas Sierro +; Updated to 7-Zip 9.07 by Philippe Berthault +; +; +; + +00000000="French" +00000001="Français" +00000002="12" + +; 7-Zip Configuration + +; Title +01000000="Configuration de 7-Zip" + +; Info Page +01000100="A propos de 7-Zip" +01000103="7-Zip est un logiciel libre. Cependant vous pouvez soutenir son développement en vous enregistrant." +01000104="Support" +01000105="S'enregistrer" + +; Folders Page +01000200="Dossiers" +01000210="Dossier de &travail" +01000211="Dossier temporaire du &système" +01000212="Dossier &courant" +01000213="Dossier s&pécifié:" +01000214="N'utiliser que pour les médias amovibles" + +01000281="Spécifiez un dossier pour les fichiers d'archive temporaires." + +; System Page +01000300="Système" +01000301="Intégrer 7-Zip au menu contextuel" +01000302="Menu contextuel en cascade" +01000310="Eléments du menu contextuel :" + +; Language Page +01000400="Langue" +01000401="Langue :" + + +; 7-Zip Explorer extension + +; Context menu +02000101="7-Zip" +02000102="Commandes 7-Zip" +02000103="Ouvrir" +02000104="Ouvrir l'archive sélectionnée." +02000105="Extraire les fichiers..." +02000106="Extraire les fichiers de l'archive sélectionnée." +02000107="Ajouter à l'archive..." +02000108="Ajouter les objets sélectionnés à l'archive." +02000109="Contrôler l'archive" +0200010A="Contrôler l'intégrité de l'archive sélectionnée." +0200010B="Extraire ici" +0200010C="Extraire les fichiers de l'archive sélectionnée dans le dossier actuel." +0200010D="Extraire vers {0}" +0200010E="Extraire dans un sous dossier." +0200010F="Ajouter à {0}" +02000110="Ajouter les éléments sélectionnés à l'archive." +02000111="Compresser et envoyer par mail..." +02000112="Compresser les éléments sélectionnés à l'archive et l'envoyer par mail." +02000113="Compresser vers {0} et envoyer par mail." +02000114="Compresser les éléments sélectionnés à l'archive et l'envoyer par mail." + +02000140="" +02000141="" + +; Properties +02000203="Chemin" +02000204="Nom" +02000205="Extension" +02000206="Dossier" +02000207="Taille" +02000208="Compressé" +02000209="Attributs" +0200020A="Créé le" +0200020B="Accédé le" +0200020C="Modifié le" +0200020D="Solide" +0200020E="Commentaire" +0200020F="Crypté" +02000210="Diviser avant" +02000211="Diviser après" +02000212="Dictionnaire" +02000213="CRC" +02000214="Type" +02000215="Anti" +02000216="Méthode" +02000217="OS hôte" +02000218="Système de fichiers" +02000219="Utilisateur" +0200021A="Groupe" +0200021B="Bloc" +0200021C="Commentaire" +0200021D="Position" +0200021E="Préfixe" +0200021F="Dossiers" +02000220="Fichiers" +02000221="Version" +02000222="Volume" +02000223="Multivolume" +02000224="Offset" +02000225="Liens" +02000226="Blocs" +02000227="Volumes" + +02000229="64 bits" +0200022A="Big-endian" +0200022B="CPU" +0200022C="Taille physique" +0200022D="Taille des en-têtes" +0200022E="Somme de contrôle" +0200022F="Caractéristiques" +02000230="Adresse virtuelle" +02000231="ID" +02000232="Nom court" +02000233="Application créatrice" +02000234="Taille de secteur" +02000235="Mode" +02000236="Lien" + +; Status bar +02000301="{0} objet(s) sélectionné(s)" +02000302="{0} objet(s)" + +02000320="Fichiers:" +02000321="Dossiers:" +02000322="Taille:" +02000323="Taille compressée:" +02000324="Archives:" + +; List Context Menu +02000401="&Colonnes..." + +02000411="&Ouvrir" +02000412="&Extraire..." + +; ToolBar +02000501="Extraire" + +; Messages +02000601="Les opérations de mise à jour ne sont pas disponibles pour cette archive." +02000602="L'archive '{0}' ne peut pas être mise à jour" +02000603="Le dossier '{0}' ne peut pas être créé" +02000604="Le fichier n'est pas une archive valide." +02000605="Erreur à l'invocation de la commande" +02000606="Trop d'objets" +02000607="Aucune application n'est associée avec ce type de fichier" +02000608="Il n'y a pas d'erreurs" +02000609="Le fichier '{0}' ne peut être ouvert comme une archive" +0200060A="L'archive cryptée '{0}' ne peut être ouverte. Mauvais mot de passe?" +0200060B="Le système ne peut allouer la quantité de mémoire nécessaire" +0200060C="Erreur d'origine inconnue" +0200060D="Ce type d'archive n'est pas supporté" + +; Dialogs +02000702="OK" +02000705="&Oui" +02000707="Oui pour tous" +02000709="&Non" +0200070B="Non pour tous" + +02000710="Annuler" +02000711="&Annuler" +02000713="&Fermer" +02000714="Stop" +02000715="Redémarrer" + +02000720="Aide" + +; Extract dialog +02000800="Extraire" +02000801="E&xtraire vers:" +02000802="Mot de passe" + +02000810="Chemins" +02000811="Chemins complets" +02000812="Chemins relatifs" +02000813="Pas de chemin" + +02000820="Mode de remplacement" +02000821="Confirmer avant de remplacer" +02000822="Remplacer sans demander" +02000823="Ignorer les fichiers existants" +02000824="Renommer automatiquement" +02000825="Renommer les fichiers existants" + +02000830="Fichiers" +02000831="&Fichiers sélectionnés" +02000832="&Tous les fichiers" + +02000881="Choisissez un dossier pour l'extraction des fichiers." + +02000890="Extraction" + +; Overwrite dialog +02000900="Confirmer le remplacement de fichier" +02000901="Le dossier de destination contient déjà un fichier avec ce nom." +02000902="Voulez-vous remplacer le fichier existant" +02000903="par celui-ci ?" + +02000911="Renommer &automatiquement" + +02000982="{0} octets" +02000983="modifié le" + +; Messages dialog +02000A00="Messages de diagnostic" + +02000A80="Message" + +02000A91="Méthode de compression non valide pour '{0}'." +02000A92="Donnée erronée dans le fichier '{0}'. Le fichier est corrompu." +02000A93="Échec du contrôle CRC dans le fichier '{0}'. Le fichier est corrompu." +02000A94="Donnée erronée dans le fichier crypté '{0}'. Mauvais mot de passe?" +02000A95="Échec du contrôle CRC dans le fichier crypté '{0}'. Mauvais mot de passe?" + +; Password dialog +02000B00="Entrez le mot de passe" +02000B01="Entrez le mot de passe:" +02000B02="&Afficher le mot de passe" +02000B03="Entrez le mot de passe à nouveau:" +02000B10="Les mots de passe ne correspondent pas" +02000B11="Pour le mot de passe, n'utilisez que des lettres non accentuées, des chiffres et des caractères spéciaux (!, #, $, ...)" +02000B12="Le mot de passe est trop long" + +; Progress dialog +02000C00="Procède" +02000C01="Temps écoulé:" +02000C02="Temps restant:" +02000C03="Taille:" +02000C04="Vitesse:" +02000C05="Traité:" +02000C06="Taux de compression:" + +02000C10="&Arrière plan" +02000C11="&Avant plan" +02000C12="&Pause" +02000C13="&Continuer" + +02000C20="En pause" + +02000C30="Etes vous sur de vouloir annuler ?" + +; Compress dialog +02000D00="Ajouter à l'archive" +02000D01="&Archive:" +02000D02="&Mode de mise à jour:" +02000D03="&Format de l'archive:" +02000D04="Type de &compression:" +02000D05="Créer une archive &solide" +02000D06="&Paramètres:" +02000D07="Options" +02000D08="Créer une archive SF&X" +02000D09="Multi-threading" +02000D0A="Crypter les &noms de fichiers" +02000D0B="N&iveau de compression :" +02000D0C="&Taille du dictionnaire :" +02000D0D="Tai&lle des mots :" +02000D0E="Mémoire pour la compression :" +02000D0F="Mémoire pour la décompression :" +02000D10="Cryptage" +02000D11="Méthode de cryptage:" +02000D12="Nombre de threads CPU:" +02000D13="Taille de bloc solide:" +02000D14="Non-solide" +02000D15="Solide" +02000D16="Compresser des fichiers partagés" + +02000D40="Découper en &volumes, octets:" +02000D41="Taille de volume incorrecte" +02000D42="Taille de volume spécifiée: {0} octets.\nÊtes vous sûr de vouloir découper l'archive dans de tels volumes?" + +02000D81="Aucune" +02000D82="Normale" +02000D83="Maximum" +02000D84="Rapide" +02000D85="Le plus rapide" +02000D86="Ultra" + +02000D90="Choisir" + +02000DA1="Ajouter et remplacer les fichiers" +02000DA2="Mettre à jour et ajouter les fichiers" +02000DA3="Rafraîchir les fichiers existants" +02000DA4="Synchroniser les fichiers" + +02000DB1="Tous les fichiers" + +02000DC0="Compression" + +; Columns dialog +02000E00="Colonnes" +02000E01="Marquez les colonnes que vous désirez afficher. Utilisez les boutons Monter et Descendre pour modifier leur ordre." +02000E02="La colonne sélectionnée doit faire" +02000E03="pixels de &large." + +02000E10="Mon&ter" +02000E11="&Descendre" +02000E12="&Afficher" +02000E13="&Masquer" +02000E14="Sauver" + +02000E81="Titre" +02000E82="Largeur" + +; Testing +02000F90="Contrôle" + + +; File Manager + +03000000="Gestionnaire de fichier de 7-Zip" + +; Menu +03000102="&Fichier" +03000103="&Edition" +03000104="Affic&hage" +03000105="&Outils" +03000106="&Aide" +03000107="Fa&voris" + +; File +03000210="&Ouvrir" +03000211="Ouvrir à l'&intérieur" +03000212="Ouvrir à l'e&xtérieur" +03000220="&Voir" +03000221="&Edition" +03000230="Reno&mmer" +03000231="&Copier vers..." +03000232="&Déplacer vers..." +03000233="S&upprimer" +03000240="P&ropriétés" +03000241="Comme&ntaire" +03000242="Somme de contrôle" +03000243="Diff" +03000250="Créer un dossier" +03000251="Créer un fichier" +03000260="&Quitter" +03000270="Diviser le &fichier ..." +03000271="Combiner les fic&hiers ..." + +; Edit +03000310="&Annuler" +03000311="&Refaire" +03000320="&Couper" +03000321="Co&pier" +03000322="C&oller" +03000323="S&upprimer" +03000330="Sélectionner &tout" +03000331="Désélectionner tout" +03000332="&Inverser la sélection" +03000333="Sélectionner..." +03000334="Désélectionner..." +03000335="Sélectionner par type" +03000336="Désélectionner par type" + +; View +03000410="&Grandes icônes" +03000411="&Petites icônes" +03000412="&Liste" +03000413="&Détails" +03000420="Non trié" +03000430="Ouvrir le dossier racine" +03000431="Dossier parent" +03000432="Historique des dossiers..." +03000440="Actualis&er" +03000449="Vue à plat" +03000450="&2 Fenêtres" +03000451="&Barres d'outils" +03000460="Barre d'archive" +03000461="Barre standard" +03000462="Grands boutons" +03000463="Montrer le texte" + +; Tools +03000510="&Options..." +03000511="Test de performance" + +; Help +03000610="&Contenu..." +03000620="À &propos de 7-Zip..." + +; Favorites +03000710="&Ajouter le répertoire aux favoris" +03000720="Signet" + +; Options Dialog + +03010000="Options" + +; Plugins +03010100="Plugins" +03010101="&Plugins:" +03010110="Options..." + +; Edit +03010200="Editeur" +03010201="&Editeur:" +03010202="&Diff:" + +; System +03010300="Système" +03010302="Associer 7-Zip avec:" +03010310="Plugin" + +; Settings +03010400="Paramètres" +03010401="Afficher l'élément \"..\"" +03010402="Afficher les icônes réelles des fichiers" +03010410="Afficher le menu système" +03010420="Sélectionner toute la ligne" +03010421="Afficher la grille" +03010422="Simple clic pour ouvrir un item" +03010430="Utiliser la sélection alternative" +03010440="Utiliser des grosses pages mémoire" + +; Strings + +03020201="Copier" +03020202="Déplacer" +03020203="Copier dans:" +03020204="Déplacer vers:" +03020205="Copie..." +03020206="Déplacement..." +03020207="Vous ne pouvez pas déplacer ou copier des objets pour de tels dossiers." +03020208="L'opération n'est pas possible." +03020209="Sélectionnez le dossier de destination." + +03020210="Confirmer la suppression du fichier" +03020211="Confirmer la suppression du dossier" +03020212="Confirmer la suppression de tous les fichiers" +03020213="Êtes-vous sûr de vouloir supprimer '{0}'?" +03020214="Êtes-vous sûr de vouloir supprimer le dossier '{0}' et tout ce qu'il contient ?" +03020215="Êtes-vous sûr de vouloir supprimer ces {0} objets ?" +03020216="Suppression..." +03020217="Erreur durant la suppression du fichier ou du dossier" +03020218="Le système ne peut mettre à la corbeille un fichier avec un trop long chemin d'accès" + +03020220="Renommage..." +03020221="Erreur durant le renommage du fichier ou du dossier" +03020222="Confirmation de la copie de fichiers" +03020223="Confirmer la copie du(des) fichier(s)" + +03020230="Créer un dossier" +03020231="Nom du dossier:" +03020232="Nouveau dossier" +03020233="Erreur durant la création du dossier" + +03020240="Créer un fichier" +03020241="Nom du fichier:" +03020242="Nouveau fichier" +03020243="Erreur durant la création du fichier" + +03020250="Sélectionner" +03020251="Désélectionner" +03020252="Masque:" + +03020260="Historique des dossiers" + +03020280="Le fichier '{0}' a été modifié.\nVoulez-vous le mettre à jour dans l'archive ?" +03020281="Impossible de mettre à jour\n'{0}'" +03020282="Impossible de démarrer l'éditeur." +03020283="Ouverture..." +03020284="Le fichier est peut-être un virus (le nom contient des grands espacements pour masquer l'extension)." + +03020290="Commentaire" +03020291="&Commentaire:" + +030202A0="Système" + +03020300="Ordinateur" +03020301="Réseau" +03020302="Documents" + +03020400="Ajouter" +03020401="Extraire" +03020402="Tester" + +03020420="Copier" +03020421="Déplacer" +03020422="Supprimer" +03020423="Informations" + +03020500="Diviser le fichier" +03020501="&Diviser en :" +03020510="Division..." +03020520="Confirmez le découpage" +03020521="Êtes vous sûr de vouloir découper le fichier en {0} volumes?" +03020522="La taille de volume doit être inférieure à la taille du fichier d'origine" + +03020600="Combiner les fichiers" +03020601="&Combiner en :" +03020610="Combinaison..." +03020620="Ne sélectionnez que le premier fichier" +03020621="Ne trouve aucun fichier faisant partie d'une archive divisée" +03020622="Ne trouve qu'un seul fichier faisant partie d'une archive divisée" + +03020710="Calcul de la somme de contrôle..." +03020720="Informations sur la somme de contrôle" +03020721="Somme de contrôle des données" +03020722="Somme de contrôle des données et des noms" + +03020800="Exploration..." + +03020900="Propriétés" + +03020A01="Cette opération ne peut être effectuée depuis un dossier ayant un trop long chemin d'accès" +03020A02="Vous devez sélectionner un fichier" +03020A03="Vous devez sélectionner un ou plusieurs fichiers" +03020A04="Le fichier {0} existe déjà" + +; Computer +03031100="Taille totale" +03031101="Espace libre" +03031102="Taille des clusters" +03031103="Nom de volume" + +; Network +03031200="Nom local" +03031201="Fournisseur" + +; Benchmark Dialog + +03080000="Test de performance" +03080001="Utilisation de la mémoire :" +03080002="Compression" +03080003="Décompression" +03080004="Vitesse" +03080005="Taux" +03080006="Taux total" +03080007="Actuel" +03080008="Résultant" +03080009="Passes:" +0308000A="Erreurs:" +0308000B="Utilisation CPU" +0308000C="Estim.. / Usage" + +;!@LangEnd@! diff --git a/GUI/Lang/fur.txt b/GUI/Lang/fur.txt new file mode 100644 index 0000000..b81c64f --- /dev/null +++ b/GUI/Lang/fur.txt @@ -0,0 +1,534 @@ +;!@Lang@!UTF-8! +; 7-Zip 4.60 beta +; Translated by Andrea Decorte (Klenje) +; http://softfurlan.altervista.org +; secont l'ortografie uficiâl de Provincie di Udin +; +; + +00000000="Friulian" +00000001="Furlan" +00000002="" + +; 7-Zip Configuration + +; Title +01000000="Configurazion di 7-Zip" + +; Info Page +01000100="Informazions su 7-Zip" +01000103="7-Zip al è un program libar. Purpûr, tu puedis supuartâ il disvilup di 7-Zip cu la regjistrazion. I utents regjistrâts a podaran otignî supuart tecnic." +01000104="Supuart tecnic" +01000105="Regjistre" + +; Folders Page +01000200="Cartelis" +01000210="Cartele di &vore" +01000211="Cartele &provisorie dal sisteme" +01000212="&Corinte" +01000213="&Specificade:" +01000214="Dopre dome pai drives che si puedin gjavâ" + +01000281="Specifiche une posizion pai files provisoris di un archivi." + +; System Page +01000300="Sisteme" +01000301="Integre 7-Zip intal menù contestuâl de shell" +01000302="Menù contestuâl in discjadude" +01000310="Elements dal menù contestuâl:" + +; Language Page +01000400="Lenghe" +01000401="Lenghe:" + + +; 7-Zip Explorer extension + +; Context menu +02000101="7-Zip" +02000102="Comants di 7-Zip" +02000103="Viarç archivi" +02000104="Viarç l'archivi selezionât." +02000105="Tire fûr files..." +02000106="Tire fûr files dal archivi selezionât." +02000107="Zonte a un archivi..." +02000108="Zonte i elements selezionâts a un archivi." +02000109="Prove archivi" +0200010A="Prove l'integritât dal archivi selezionât." +0200010B="Tire fûr ca" +0200010C="Tire fûr files dal archivi selezionât inte cartele corinte." +0200010D="Tire fûr in {0}" +0200010E="Tire fûr i files intune sotcartele." +0200010F="Zonte a {0}" +02000110="Zonte i elements selezionâts a un archivi." +02000111="Comprim e mande par email..." +02000112="Comprim i elements selezionâts e mande l'archivi par email." +02000113="Comprim in {0} e mande par email" +02000114="Comprim i elements selezionâts e mande l'archivi par email." + +02000140="" +02000141="" + +; Properties +02000203="Percors" +02000204="Non" +02000205="Estension" +02000206="Cartele" +02000207="Dimension" +02000208="Dimension comprimude" +02000209="Atribûts" +0200020A="Creât" +0200020B="Ultin acès" +0200020C="Modificât" +0200020D="Solit" +0200020E="Comentât" +0200020F="Cifrât" +02000210="Divît prin di" +02000211="Divît daspò di" +02000212="Dizionari" +02000213="CRC" +02000214="Gjenar" +02000215="Anti" +02000216="Metodi" +02000217="SO di origjin" +02000218="Sisteme dai files" +02000219="Utent" +0200021A="Grup" +0200021B="Bloc" +0200021C="Coment" +0200021D="Posizion" +0200021E="Prefìs dal troi" +0200021F="Cartelis" +02000220="Files" +02000221="Version" +02000222="Volum" +02000223="Multivolum" +02000224="Offset" +02000225="Leams" +02000226="Blocs" +02000227="Volums" + +02000229="64-bit" +0200022A="Big-endian" +0200022B="CPU" +0200022C="Dimension fisiche" +0200022D="Dimension intestazions" +0200022E="Some di control" +0200022F="Caracteristichis" +02000230="Direzion virtuâl" + +; Status bar +02000301="{0} ogjet(s) selezionât(s)" +02000302="{0} ogjet(s)" + +02000320="Files:" +02000321="Cartelis:" +02000322="Dimension:" +02000323="Dimension comprimude:" +02000324="Archivis:" + +; List Context Menu +02000401="&Colonis..." + +02000411="&Viarç" +02000412="&Tire fûr..." + +; ToolBar +02000501="Tire fûr" + +; Messages +02000601="Lis operazions di atualizazion no son supuartadis par chest archivi." +02000602="No si pues atualizâ l'archivi {0}" +02000603="No si pues creâ la cartele '{0}'" +02000604="Il file nol è un archivi supuartât." +02000605="Erôr" +02000606="Masse elements" +02000607="Nissune aplicazion e je associade cu la estension di chest file" +02000608="Nissun erôr cjatât" +02000609="No si pues viarzi il file '{0}' come archivi" +0200060A="No si pues viarzi l'archivi cifrât '{0}'. Ise sbaliade la peraule clâf?" +0200060B="Il sisteme nol rive a cjoli la cuantitât di memorie che e covente" +0200060C="Erôr no cognossût" +0200060D="Gjenar di archivi no supuartât" + +; Dialogs +02000702="Va ben" +02000705="&Sì" +02000707="Sì &a ducj" +02000709="&No" +0200070B="No a &ducj" + +02000710="Scancele" +02000711="S&cancele" +02000713="&Siare" +02000714="Ferme" +02000715="Torne a inviâ" + +02000720="&Jutori" + +; Extract dialog +02000800="Tire fûr" +02000801="Tir&e fûr in:" +02000802="Peraule clâf" + +02000810="Struture des cartelis" +02000811="Percors intîrs" +02000812="Percors corints" +02000813="Nissun percors" + +02000820="Sore scriture" +02000821="Domande prin di scrivi parsore" +02000822="Scrîf parsore cence domandâ" +02000823="Salte i files che esistin" +02000824="Gambie nons in automatic" +02000825="Gambie nons in automatic se a esistin" + +02000830="Files" +02000831="Files &selezionâts" +02000832="Duc&j i files" + +02000881="Specifiche une posizion pai files tirâts fûr." + +02000890="Daûr a tirâ fûr..." + +; Overwrite dialog +02000900="Conferme de sostituzion dal file" +02000901="Inte cartele di destinazion al è za il file processât." +02000902="Vuelistu sostituî il file esistint" +02000903="cun chest file?" + +02000911="&Gambie non in automatic" + +02000982="{0} bytes" +02000983="modificât ai" + +; Messages dialog +02000A00="Messaçs diagnostics" + +02000A80="Messaç" + +02000A91="Il metodi di compression nol è supuartât par '{0}'." +02000A92="Erôr di dâts in '{0}'. Il file al è corot." +02000A93="CRC falît in '{0}'. Il file al è corot." +02000A94="Erôr di dâts tal file cifrât '{0}'. Peraule clâf sbaliade?" +02000A95="CRC falît tal file cifrât '{0}'. Peraule clâf sbaliade?" + +; Password dialog +02000B00="Scrîf peraule clâf" +02000B01="Scrîf la peraule clâf:" +02000B02="&Mostre la peraule clâf" +02000B03="Torne a inserî la peraule clâf:" +02000B10="Lis peraulis clâfs no son compagnis" +02000B11="Dopre dome lis letaris inglesis (no acentadis), i numars e i caratars speciâi (!, #, $, ...) inte peraule clâf" +02000B12="La peraule clâf e je masse lungje" + +; Progress dialog +02000C00="Procès" +02000C01="Timp passât:" +02000C02="Timp restant:" +02000C03="Dimension:" +02000C04="Sveltece:" +02000C05="Elaborât:" +02000C06="Tas di compression:" + +02000C10="&Sfont" +02000C11="P&rin plan" +02000C12="&Pause" +02000C13="&Continue" + +02000C20="In pause" + +02000C30="Sêstu sigûr di volê scancelâ?" + +; Compress dialog +02000D00="Zonte a un archivi" +02000D01="&Archivi:" +02000D02="Mût di at&ualizazion:" +02000D03="&Formât archivi:" +02000D04="&Metodi di compression:" +02000D05="Cree archivi &solit" +02000D06="&Parametris:" +02000D07="Opzions" +02000D08="Cree archivi SF&X" +02000D09="Multi-threading" +02000D0A="Cifre i &nons dai files" +02000D0B="Nive&l di compression:" +02000D0C="&Dimension dizionari:" +02000D0D="Dimension &peraule:" +02000D0E="Utilizazion memorie comprimint:" +02000D0F="Utilizazion memorie decomprimint:" +02000D10="Ciframent" +02000D11="Metodi di ciframent:" +02000D12="Numar di threads de CPU:" +02000D13="Dimension bloc solit:" +02000D14="No-solit" +02000D15="Solit" +02000D16="Comprim i files condividûts" + +02000D40="Divît in &volums, grandece in bytes:" +02000D41="Dimension dai volums sbaliade" +02000D42="Dimension dai volums volude: {0} bytes.\nSêstu sigûr di volê dividi l'archivi in tocs di cheste dimension?" + +02000D81="Cence compression" +02000D82="Normâl" +02000D83="Massim" +02000D84="Svelt" +02000D85="Il pi svelt" +02000D86="Super" + +02000D90="Sgarfe" + +02000DA1="Zonte e sostituìs files" +02000DA2="Atualize e zonte files" +02000DA3="Atualize i files che esistin" +02000DA4="Sincronize i files" + +02000DB1="Ducj i files" + +02000DC0="Daûr a comprimi" + +; Columns dialog +02000E00="Colonis" +02000E01="Selezione lis colonis che tu vuelis rindi visibilis in cheste cartele. Dopre i botons Pare sù e Pare jù par gambiâ l'ordin des colonis." +02000E02="La colone selezionade e à di jessi" +02000E03="pixels &largje." + +02000E10="Par&e sù" +02000E11="Pare &jù" +02000E12="&Mostre" +02000E13="&Plate" +02000E14="Configure" + +02000E81="Titul" +02000E82="Largjece" + +; Testing +02000F90="Daûr a provâ" + + +; File Manager + +03000000="7-Zip - Aministradôr di files" + +; Menu +03000102="&File" +03000103="&Modifiche" +03000104="&Viodude" +03000105="&Imprescj" +03000106="&Jutori" +03000107="&Preferîts" + +; File +03000210="&Viarç" +03000211="Viarç dentri 7-&Zip" +03000212="V&iarç fûr di 7-Zip" +03000220="&Mostre" +03000221="M&odifiche" +03000230="Gambie &non" +03000231="&Copie in..." +03000232="Mô&f in..." +03000233="&Elimine" +03000240="P&ropietâts" +03000241="Comen&t" +03000242="Calcole so&me di control" +03000250="Cree cartele" +03000251="Cree file" +03000260="V&a fûr" +03000270="&Divît file..." +03000271="Torne a &unî files..." + +; Edit +03000310="&Anule" +03000311="Torne a &fâ" +03000320="&Taie" +03000321="&Copie" +03000322="Tac&he" +03000323="&Elimine" +03000330="Selezione d&ut" +03000331="&Deselezione dut" +03000332="&Invertìs selezion" +03000333="Selezione..." +03000334="Deselezione..." +03000335="Selezione par gjenar" +03000336="Deselezione par gjenar" + +; View +03000410="Iconis &grandis" +03000411="Iconis &piçulis" +03000412="&Liste" +03000413="&Detais" +03000420="Cence ordin" +03000430="Viarç cartele principâl" +03000431="Parsore di un nivel" +03000432="Storic des cartelis..." +03000440="&Atualize" +03000449="Viodude plane" +03000450="&2 panei" +03000451="Sbaris dai impresc&j" +03000460="Sbare dai imprescj par l'archivi" +03000461="Sbare dai imprescj standard" +03000462="Botons larcs" +03000463="Mostre test dai botons" + +; Tools +03000510="&Opzions..." +03000511="&Banc di prove" + +; Help +03000610="&Argoments..." +03000620="&Informazions su 7-Zip..." + +; Favorites +03000710="&Zonte cartele ai Preferîts sicu" +03000720="Preferît" + +; Options Dialog + +03010000="Opzions" + +; Plugins +03010100="Plugins" +03010101="&Plugins:" +03010110="Opzions..." + +; Edit +03010200="Editôr" +03010201="&Editôr:" + +; System +03010300="Sisteme" +03010302="Associe 7-Zip cun:" +03010310="Plugin" + +; Settings +03010400="Configurazion" +03010401="Mostre l'element \"..\"" +03010402="Mostre lis veris iconis dai files" +03010410="Mostre il menù dal sisteme" +03010420="&Selezione la rie intire" +03010421="Mostre les liniis de &gridele sot" +03010430="Mût di selezion &alternatîf" +03010440="Dopre pagjinis di memorie &largjis" + +; Strings + +03020201="Copie" +03020202="Môf" +03020203="Copie in:" +03020204="Môf in:" +03020205="Daûr a copiâ..." +03020206="Daûr a movi..." +03020207="No si pues movi o copiâ elements di chest gjenar di cartelis." +03020208="L'operazion no je supuartade." +03020209="Sielç la cartele di destinazion." + +03020210="Conferme de eliminazion dal file" +03020211="Conferme de eliminazion de cartele" +03020212="Conferme de eliminazion di plui files" +03020213="Sêstu sigûr di volê eliminâ '{0}'?" +03020214="Sêstu sigûr di volê eliminâ la cartele '{0}' e dut ce ch'al è lì dentri?" +03020215="Sêstu sigûr di volê eliminâ chescj {0} elements?" +03020216="Daûr a eliminâ..." +03020217="Erôr eliminant un file o une cartele" +03020218="Il sisteme nol pues movi un file cuntun troi lunc te Scovacere" + +03020220="Daûr a gambiâ non..." +03020221="Erôr gambiant non a un file o une cartele" +03020222="Conferme de copie dai files" +03020223="Sêstu sigûr di volê copiâ i files tal archivi" + +03020230="Cree cartele" +03020231="Non de cartele:" +03020232="Gnove cartele" +03020233="Erôr inte creazion de cartele" + +03020240="Cree file" +03020241="Non dal file:" +03020242="Gnûf file" +03020243="Erôr inte creazion dal file" + +03020250="Selezione" +03020251="Deselezione" +03020252="Filtri:" + +03020260="Storic des cartelis" + +03020280="Il file '{0}' al è stât modificât.\nVuelistu atualizâlu intal archivi?" +03020281="No si pues atualizâ il file\n'{0}'" +03020282="No si pues inviâ l'editôr." +03020283="Daûr a viarzi..." +03020284="Il file al samee un virus (il non al à dentri un grum di spazis)." + +03020290="Coment" +03020291="&Coment:" + +030202A0="Sisteme" + +03020300="Ordenadôr" +03020301="Rêt" +03020302="Documents" + +03020400="Zonte" +03020401="Tire fûr" +03020402="Prove" + +03020420="Copie" +03020421="Môf" +03020422="Elimine" +03020423="Info" + +03020500="Divît file" +03020501="&Divît in:" +03020510="Daûr a dividi..." +03020520="Conferme de division" +03020521="Sêstu sigûr di volê dividi il file in {0} tocs?" +03020522="La dimension di un volum e à di jessi plui piçule di chê dal file origjinâl" + +03020600="Torne a unî files" +03020601="&Torne a unî in:" +03020610="Daûr a tornâ a unî..." +03020620="Sielç dome il prin file" +03020621="No si pues rilevâ il file come toc di un file dividût" +03020622="No son stâts cjatâts plui tocs di file dividûts" + +03020710="Daûr a calcolâ la some di control..." +03020720="Informazions su la some di control" +03020721="Some di control CRC pai dâts:" +03020722="Some di control CRC pai dâts e i nons:" + +03020800="Daûr a scandaiâ..." + +03020900="Propietâts" + +03020A01="Cheste operazion no pues jessi clamade di une cartele cuntun troi lunc." +03020A02="Tu scugnis sielzi un file" +03020A03="Tu scugnis sielzi un o plui files" +03020A04="Il file {0} al esist za" + +; Computer +03031100="Dimension totâl" +03031101="Puest libar" +03031102="Dimension setôr" +03031103="Etichete" + +; Network +03031200="Non locâl" +03031201="Furnidôr" + +; Benchmark Dialog + +03080000="Banc di prove" +03080001="Utilizazion memorie:" +03080002="Comprimint" +03080003="Decomprimint" +03080004="Sveltece" +03080005="Valutazion" +03080006="Valutazion totâl" +03080007="Corint" +03080008="Risultant" +03080009="Passaçs:" +0308000A="Erôrs:" +0308000B="Utilizazion CPU" +0308000C="Judizi / Utilizazion" + +;!@LangEnd@! diff --git a/GUI/Lang/fy.txt b/GUI/Lang/fy.txt new file mode 100644 index 0000000..54b09c4 --- /dev/null +++ b/GUI/Lang/fy.txt @@ -0,0 +1,514 @@ +;!@Lang@!UTF-8! +; 7-Zip 4.53 +; Translated by Berend Ytsma +; +; +; + +00000000="Frisian" +00000001="Frysk" +00000002="98" + +; 7-Zip Configuration + +; Title +01000000="7-Zip Konfiguraasje" + +; Info Page +01000100="7-Zip it hoe en het" +01000103="7-Zip is fergees. Mar, jo kinne de ûntwikkeling stypje troch jo te registrearjen." +01000104="Stipe" +01000105="Registrearje" + +; Folders Page +01000200="Mappen" +01000210="&Wurkmap" +01000211="&Tydlikesysteemmap" +01000212="&Aktive" +01000213="&Oantsjutte:" +01000214="Allinnich brûke foar útnimbere skiven" + +01000281="ynfiere fan de lokaasje foar tydlike argyftriemmen." + +; System Page +01000300="Systeem" +01000301="Yntegraasje fan 7-Zip yn ferbânmenu" +01000302="Ferbânmenu yn trepfoarm" +01000310="Ferbânmenu-items:" + +; Language Page +01000400="Taal" +01000401="Taal:" + + +; 7-Zip Explorer extension + +; Context menu +02000101="7-Zip" +02000102="7-Zip kommando" +02000103="Argyf iepenje" +02000104="Iepenet it selektearre argyf." +02000105="Triemmen útpakke..." +02000106="Triemmen út it selektearre argyf útpakke." +02000107="Oan argyf taheakje..." +02000108="De selektearre items wurde oan argyf taheakke." +02000109="Argyf teste" +0200010A="Besjocht de yntegriteit fan it selektearre argyf." +0200010B="Hjir útpakke" +0200010C="Triemmen út it selektearre argyf yn de aktive map útpakke." +0200010D="Utpakke yn {0}" +0200010E="Utpakke fan triemmen yn ûndermap." +0200010F="Oan {0} taheakje" +02000110="Foeget de selektearre items ta oan argyf." +02000111="komprimearje en ferstjoere..." +02000112="Komprimearret de selektearre items nei argyf en stjoerd argyf fuort mei e-post." +02000113="Komprimearje nei {0} en poste" +02000114="komprimearret de selektearre items nei argyf en stjoerd argyf fuort mei e-post." + +02000140="" +02000141="" + +; Properties +02000203="Paad" +02000204="Namme" +02000205="Taheaksel" +02000206="Map" +02000207="Grutte" +02000208="Ynpakte grutte" +02000209="Skaaimerk" +0200020A="Makke" +0200020B="Lêste tagong" +0200020C="Feroare" +0200020D="Kompakt" +0200020E="Kommentaar" +0200020F="Fersifere" +02000210="Spjalt foar" +02000211="Spjalt efter" +02000212="Wurdboek" +02000213="CRC" +02000214="Type" +02000215="Anty" +02000216="Metoade" +02000217="Host OS" +02000218="Triemsysteem" +02000219="Brûker" +0200021A="Keppel" +0200021B="Blok" +0200021C="Kommentaar" +0200021D="Posysje" +0200021E="Paad foarheaksel" +0200021F="Mappen" +02000220="Triemmen" +02000221="Ferzje" +02000222="Folume" +02000223="Multifolume" +02000224="Offset" +02000225="Links" +02000226="Blokken" +02000227="Folumes" + +; Status bar +02000301="{0} objekt(en) selektearre" +02000302="{0} objekt(en)" + +02000320="Triemmen:" +02000321="Mappen:" +02000322="Grutte:" +02000323="Komprimearregrutte:" +02000324="Argiven:" + +; List Context Menu +02000401="&Kolommen..." + +02000411="&Iepenje" +02000412="&Utpakke..." + +; ToolBar +02000501="Utpakke" + +; Messages +02000601="Bywurk operaasje waard net stipe troch dit argyf." +02000602="Kin argyf {0} net bywurkje" +02000603="Kin map '{0}' net meitsje " +02000604="Triem is in net stipe argyf." +02000605="Flater" +02000606="Tefolle items" +02000607="Der is gjin applikaasje ferbûn oan dit triem taheaksel" +02000608="Der binne gjin flaters" +02000609="Kin triem '{0} net as argyf iepenje" +0200060A="Kin fersifere argyf '{0}' net iepenje. Ferkeard wachtwurd?" + +; Dialogs +02000702="Okee" +02000705="&Jawis" +02000707="Jawis foar &Alles" +02000709="&Nee" +0200070B="Nee foar A&lles" + +02000710="Ofbrekke" +02000711="&Ofbrekke" +02000713="&Slute" +02000714="Stopje" +02000715="Opnij begjinne" + +02000720="Help" + +; Extract dialog +02000800="Utpakke" +02000801="U&tpakke nei:" +02000802="Wachtwurd" + +02000810="Paad modus" +02000811="Folsleine paadnammen" +02000812="Aktive paadnammen" +02000813="Gjin paadnammen" + +02000820="Oerskriuw modus" +02000821="Freegje foardat jo oerskriuwe" +02000822="Oerskriuwe sûnder pront" +02000823="Besteande triemmen oerslaan" +02000824="Automatysk omneame" +02000825="Automatysk ek by besteande triemmen" + +02000830="Triemmen" +02000831="&Selektearre triemmen" +02000832="&Alle triemmen" + +02000881="De lokaasje om nei út te pakken oantsjutte." + +02000890="Utpakke" + +; Overwrite dialog +02000900="It ferfangen fan de triem befêstigje" +02000901="Bestimmingsmap befettet al in triem mei dizze namme." +02000902="Wolle jo de triem ferfange" +02000903="Mei dizze?" + +02000911="A&utomatysk omneame" + +02000982="{0} bytes" +02000983="Feroare op" + +; Messages dialog +02000A00="Diagnostyk berjocht" + +02000A80="Berjocht" + +02000A91="Net stipe kompresjemetoade foar '{0}'." +02000A92="Data flater yn '{0}'. Triem is beskeadige." +02000A93="CRC mislearre yn '{0}'. Triem is beskeadige." +02000A94="Data flater yn fersifere triem '{0}'. Ferkeard wachtwurd?" +02000A95="CRC mislearre yn fersifere triem '{0}'. Ferkeard wachtwurd?" + +; Password dialog +02000B00="Wachtwurd ynfiere" +02000B01="Wachtwurd ynfiere:" +02000B02="Wachtwurd &sjen litte" +02000B03="Wachwurd opnij ynfiere:" +02000B10="Wachtwurden komme net oerien" +02000B11="Brûk allinne ingelske letters, nûmers en spesjale karakters (!, #, $, ...) foar it wachtwurd" +02000B12="Wachtwurd is te lang" + +; Progress dialog +02000C00="Proses" +02000C01="Ferstrutsen tiid:" +02000C02="Tiid noch te gean:" +02000C03="Totale grutte:" +02000C04="Fluggens:" +02000C05="Ferwurke:" +02000C06="Kompresje nivo:" + +02000C10="&Eftergrûn" +02000C11="&Foargrûn" +02000C12="&Skoftsje" +02000C13="&Ferfetsje" + +02000C20="Skoft" + +02000C30="Binne jo wis dat jo ôfbrekke wolle?" + +; Compress dialog +02000D00="Oan argyf taheakje" +02000D01="&Argyf:" +02000D02="&Bywurkmodus:" +02000D03="Argyf &formaat:" +02000D04="Kompresje&metoade:" +02000D05="&Kompakt argyf meitsje" +02000D06="&Parameters:" +02000D07="Opsjes" +02000D08="Meitsje SF&X-argyf" +02000D09="Meardere streamen" +02000D0A="Fersiferje triem&nammen" +02000D0B="Kompresje&nivo:" +02000D0C="&Wurdboekgrutte:" +02000D0D="&Wurdgrutte:" +02000D0E="Unthâld gebrûk by komprimearjen:" +02000D0F="Unthâld gebrûk by ûntkomprimearjen:" +02000D10="Fersifering" +02000D11="Fersiferingmetoade:" +02000D12="Tal CPU trieden:" +02000D13="Kompakte blokgrutte:" +02000D14="net-kompakt" +02000D15="Kompakt" +02000D16="Dielde triemmen komprimearje" + +02000D40="Spjalte nei &folumes, bytes:" +02000D41="Net juste folumegrutte" +02000D42="Oantsjutte folumegrutte: {0} bytes.\nWolle jo it argyf yn sokke folumes spjalte?" + + +02000D81="Bewarje" +02000D82="Normaal" +02000D83="Maksimum" +02000D84="Fluch" +02000D85="Fluchst" +02000D86="Ultra" + +02000D90="Blêdzje" + +02000DA1="Triemmen taheakje en ferfange" +02000DA2="Triemmen taheakje en bywurkje" +02000DA3="Besteande triemmen ferfarskje" +02000DA4="Triemmen lyk rinne litte" + +02000DB1="Alle triemmen" + +02000DC0="Oan it komprimearjen" + +; Columns dialog +02000E00="Kolommen" +02000E01="Kontrolearje de kolommen dy't jo yn dizze map sichtber meitsje wolle. Brûk de omheech en omleech knoppen om de kolommen te oarderjen." +02000E02="De selektearre kolom soe" +02000E03="Piksels &breed wêze moatte." + +02000E10="Om&heech ferpleatse" +02000E11="Om&leech ferpleatse" +02000E12="&Sjen litte" +02000E13="&Fertopje" +02000E14="Set" + +02000E81="Titel" +02000E82="Breedte" + +; Testing +02000F90="Oan it Testen" + + +; File Manager + +03000000="7-Zip Triembehearder" + +; Menu +03000102="&Triem" +03000103="&Bewurkje" +03000104="&Byld" +03000105="&Ark" +03000106="&Help" +03000107="B&lêdwizers" + +; File +03000210="&Iepenje" +03000211="Iepenje &yn" +03000212="Iepenje bû&ten" +03000220="&Byld" +03000221="&Bewurkje" +03000230="Omne&ame" +03000231="&Kopiearje nei..." +03000232="&Ferpleats nei..." +03000233="&Wiskje" +03000240="E&igenskippen" +03000241="Komme&ntaar" +03000242="Kontrôlesom berekenje" +03000250="Map meitsje" +03000251="Triem meitsje" +03000260="U&tgong" +03000270="Triemmen &spjalte..." +03000271="Triemmen Kom&binearje..." + +; Edit +03000310="&Ungedien meitsje" +03000311="&Opnij" +03000320="Kni&ppe" +03000321="&Kopiearje" +03000322="&Plakke" +03000323="&Wiskje" +03000330="&Alles selektearje" +03000331="Alles net selektearje" +03000332="&Seleksje omdraaien" +03000333="Selektearje..." +03000334="Net selektearje..." +03000335="Selektearje neffens type" +03000336="Net selektearje neffens type" + +; View +03000410="Gru&tte Ikoanen" +03000411="L&ytse Ikoanen" +03000412="&List" +03000413="&Details" +03000420="Net Sortearre" +03000430="Haadmap iepenje" +03000431="Ien nivo omheech" +03000432="Maphistoarje..." +03000440="&Ferfarskje" +03000449="Platte werjefte" +03000450="&2 Panielen" +03000451="&Arkbalke" +03000460="Argyf arkbalke" +03000461="Standert arkbalke" +03000462="Grutte knoppen" +03000463="Knoptekst sjen litte" + +; Tools +03000510="&Opsjes..." +03000511="&Ykpunt" + +; Help +03000610="&Ynhâld..." +03000620="&7-Zip it hoe en het..." + +; Favorites +03000710="Map oan blêdwizers &taheakje as" +03000720="Blêdwizer meitsje" + +; Options Dialog + +03010000="Opsjes" + +; Plugins +03010100="Plugins" +03010101="&Plugins:" +03010110="Opsjes..." + +; Edit +03010200="Bewurker" +03010201="&Bewurker:" + +; System +03010300="Systeem" +03010302="Ferbyn 7-Zip Mei:" +03010310="Plugin" + +; Settings +03010400="Ynstellings" +03010401="\"..\" item sjen litte" +03010402="Echte triem ikoanen sjen litte" +03010410="Systeemmenu sjen litte" +03010420="&Folsleine rige selektearje" +03010421="&Roaster sjen litte" +03010430="&Alternative seleksje modus" +03010440="Brûk &grut ûnthâld siden" + +; Strings + +03020201="Kopiearje" +03020202="Ferpleatse" +03020203="Kopiearje nei:" +03020204="Ferpleats nei:" +03020205="Oan it kopiearren..." +03020206="Oan it ferpleatsen..." +03020207="Jo kinne net foar sokke mappen items kopiearje of ferpleatse" +03020208="Operaasje wurdt net stipe." +03020209="Bestimmingsmap selektearje." + +03020210="It wiskjen fan de triem befêstigje" +03020211="It wiskjen fan de map befêstigje" +03020212="It wiskjen fan meardere triemmen befêstigje" +03020213="Binne jo wis dat jo '{0}' wiskje wolle?" +03020214="Binne jo wis dat jo de map '{0}' en al syn ynhâld wiskje wolle?" +03020215="Binne jo wis dat jo {0} items wiskje wolle?" +03020216="Oan it wiskjen" +03020217="Flater by it wiskjen fan triem of map" + +03020220="Omneame..." +03020221="Flater by it omneamen fan triem of map" +03020222="Triem kopiearje befêstigje" +03020223="Binne jo wis dat jo de triemmen nei it argyf kopiearje wolle?" + +03020230="Map meitsje" +03020231="Mapnamme:" +03020232="Nije map" +03020233="Flater by it meitsjen fan map" + +03020240="Triem meitsje" +03020241="Triem namme:" +03020242="Nije triem" +03020243="Flater by’t meitsjen fan triem" + +03020250="Selektearje" +03020251="Net Selektearje" +03020252="Masker:" + +03020260="Maphistoarje" + +03020280="Triem '{0}' is wizige.\nWolle jo it bywurkje yn it argyf?" +03020281="Kin triem '{0}'\nnet bywurkje" +03020282="Kin bewurker net starte." +03020283="Oan it iepenjen..." + +03020290="Kommentaar" +03020291="&Kommentaar:" + +030202A0="Systeem" + +03020300="Kompjûter" +03020301="Netwurk" + +03020400="Taheakje" +03020401="Utpakke" +03020402="Test" + +03020420="Kopiearje" +03020421="Ferpleatse" +03020422="Wiskje" +03020423="Ynformaasje" + +03020500="Triem spjalte" +03020501="&Spjalt nei:" +03020510="Oan it Spjalten..." +03020520="Spjalte befêstigje" +03020521="Wolle jo de triem spjalte yn {0} dielen?" +03020522="Folumegrutte moat lytser wêze dan de grutte fan it orizjineel" + + +03020600="Triemmen kombinearje" +03020601="&Kombinearje nei:" +03020610="Oan it kombinearjen..." +03020620="Allinne earste triem selektearje" + +03020710="Kontrôlesom oan it berekenjen..." +03020720="Kontrôlesom ynformaasje" +03020721="CRC kontrôlesom foar data:" +03020722="CRC kontrôlesom foar data en nammen:" + +03020800="Oan it skennen..." + +03020900="Eigenskippen" + +; Computer +03031100="Totale grutte" +03031101="Frije romte" +03031102="Kluster grutte" +03031103="Kaartsje" + + +; Network +03031200="Lokale namme" +03031201="Ferskaffer" + +; Benchmark Dialog + +03080000="Benchmark" +03080001="Unthâld gebrûk:" +03080002="Oan it komprimearren" +03080003="Oan it ûntkomprimearren" +03080004="Fluggens" +03080005="Wurdearring" +03080006="Totale Wurdearring" +03080007="Hjoeddeiske" +03080008="Resultaat" +03080009="Kear foarbei:" +0308000A="Flaters:" +0308000B="CPU brûkens" +0308000C="Beoardieling / Brûkens" + +;!@LangEnd@! diff --git a/GUI/Lang/gl.txt b/GUI/Lang/gl.txt new file mode 100644 index 0000000..15d5e4c --- /dev/null +++ b/GUI/Lang/gl.txt @@ -0,0 +1,440 @@ +;!@Lang@!UTF-8! +; 7-Zip 3.12 +; Translated by Xosé Calvo +; +; +; +; + +00000000="Galician" +00000001="Galego" +00000002="101" + +; 7-Zip Configuration + +; Title +01000000="Configuración do 7-Zip" + +; Info Page +01000100="Sobre o 7-Zip" +01000103="7-Zip é un programa gratuito. Contodo, pode contribuir co seu desenvolvimento rexistrándose. Se se rexistrar, terá direito a receber apoio técnico." +01000105="Rexistrar" + +; Folders Page +01000200="Cartafois" +01000210="&cartafol de traballo" +01000211="Cartafol &temporario do sistema" +01000212="Cartafol a&ctual" +01000213="&Especificar:" +01000214="Usar só discos removíveis" + +01000281="Especificar unha localización para os ficheiros de arquivo temporarios." + +; System Page +01000300="Sistema" +01000301="Integratar 7-Zip no menú de contexto" +01000302="Menú de contexto en cascata" +01000310="Elementos do Menú de contexto:" + +; Language Page +01000400="Idioma" +01000401="Idioma:" + + +; 7-Zip Explorer extension + +; Context menu +02000101="7-Zip" +02000102="Comandos do 7-Zip" +02000103="Abrir arquivo" +02000104="Abre o arquivo seleccionado." +02000105="Extrair ficheiros..." +02000106="Extrae ficheiros do arquivo seleccionado." +02000107="Adicionar ao arquivo..." +02000108="Engade os elementos seleccionados ao arquivo." +02000109="Comprobar arquivo" +0200010A="Comproba a integridade do arquivo seleccionado." +0200010B="Extrair Aquí" +0200010C="Extrae ficheiros do arquivo seleccionado para o cartafol actual." +0200010D="Extrair para {0}" +0200010E="Extrae ficheiros para o sub-cartafol." +0200010F="Adicionar a {0}" +02000110="Engade os elementos seleccionados ao arquivo." +02000111="Comprimir e enviar por correo..." +02000112="Comprime os elementos seleccionados para un arquivo e envía o arquivo mediante correo electrónico." +02000113="Comprimir a {0} e enviar por correo" +02000114="Comprime os elementos seleccionados para ese arquivo e envía o arquivo mediante correo electrónico." + +02000140="" +02000141="" + +; Properties +02000203="Camiño" +02000204="Nome" +02000205="Extensión" +02000206="Cartafol" +02000207="Tamaño" +02000208="Tamaño comprimido" +02000209="Atributos" +0200020A="Creado" +0200020B="Último acceso" +0200020C="Modificado" +0200020D="Sólido" +0200020E="Comentado" +0200020F="Encriptado" +02000210="Partir Antes" +02000211="Partir Depois" +02000212="Dicionario" +02000213="CRC" +02000214="Tipo" +02000215="Anti" +02000216="Método" +02000217="OS do Servidor" +02000218="Sistema de Ficheiros" +02000219="Usario" +0200021A="Grupo" +0200021B="Bloco" +0200021C="Comentario" + +; Status bar +02000301="{0} obxecto(s) seleccionados" +02000302="{0} obxecto(s)" + +; List Context Menu +02000401="&Columnas..." + +02000411="&Abrir" +02000412="&Extrair..." + +; ToolBar +02000501="Extrair" + +; Messages +02000601="Este tipo de arquivo non permite actualizacións." +02000602="Non é posíbel actualizar o arquivo {0}" +02000603="Non é posíbel crear o cartafol '{0}'" +02000604="Formato de ficheiro descoñecido." +02000605="Erro" +02000606="Demasiados elementos" +02000607="Non existe nengunha apliación asociada con esta extensión de ficheiro" +02000608="Non se produciron erross" + +; Dialogs +02000702="Dacordo" +02000705="&Si" +02000707="Si a &Todo" +02000709="&Non" +0200070B="Non a T&odo" + +02000710="Cancelar" +02000711="&Cancelar" +02000713="&Fechar" +02000714="Parar" +02000715="Reiniciar" + +02000720="Axuda" + +; Extract dialog +02000800="Extrair" +02000801="E&xtrair para:" +02000802="Contrasinal" + +02000810="Modo nome de cartafol" +02000811="Camiños completos" +02000812="Camiños actuais" +02000813="Sen camiños" + +02000820="Modo sobreposición" +02000821="Con confirmación" +02000822="Sen confirmación" +02000823="Manter os ficheiros existentes" +02000824="Renomear automaticamente" + +02000830="Ficheiros" +02000831="&Ficheiros seleccionados" +02000832="&Todos os ficheiros" + +02000881="Especificar unha localización de destino para os ficheiros extraídos." + +02000890="Extraindo" + +; Overwrite dialog +02000900="Confirmar a Substitución dos Ficheiros" +02000901="O cartafol de destino xa contén un ficheiro co mesmo nome." +02000902="Desexa substituir o ficheiro co mesmo nome" +02000903="por este?" + +02000911="Renomear &automaticamente" + +02000982="{0} bytes" +02000983="modificado en" + +; Messages dialog +02000A00="mensaxes de diagnóstico" + +02000A80="Mensaxe" + +02000A91="Método de compresión non válido para '{0}'." +02000A92="Erro de datos en '{0}'. O ficheiro está mal." +02000A93="CRC fallou en '{0}'. O ficheiro está mal." + +; Password dialog +02000B00="Introduza o contrasinal" +02000B01="Introduza o contrasinal:" +02000B02="&Mostrar o contrasinal" + +; Progress dialog +02000C00="Procesamento" +02000C01="Tempo pasado:" +02000C02="Tempo restante:" +02000C03="Tamaño:" +02000C04="Velocidade:" + +02000C10="&Fondo" +02000C11="&Letras" +02000C12="&Pausa" +02000C13="&Continuar" + +02000C20="Parado" + +02000C30="Ten a certeza de que quer cancelar?" + +; Compress dialog +02000D00="Adicionar ao arquivo" +02000D01="&Arquivo:" +02000D02="&Modo de actualización:" +02000D03="&Format do arquivo:" +02000D04="&Tipo de compresión:" +02000D05="Crar arquvivo &Sólido" +02000D06="&Parámetros:" +02000D07="Opcións" +02000D08="Crear un arquivo SF&X" +02000D09="Múltiples fíos" +02000D0A="Encriptar os &nomes dos ficheiros" +02000D0B="&Nível de compresión:" +02000D0C="Tamaño do &dicionario:" +02000D0D="Tamaño das &palabras:" +02000D0E="Uso da memoria para a Compresión:" +02000D0F="Uso da memoria para a Decompresión:" + +02000D40="Partir en &volumes, bytes:" + +02000D81="Sen compresión" +02000D82="Normal" +02000D83="Máxima" +02000D84="Rápida" +02000D85="Máis rápida" +02000D86="Ultra" + +02000D90="Ver" + +02000DA1="Adicionar e substituir os ficheiros" +02000DA2="Actualizar e adicionar os ficheiros" +02000DA3="Só actualizar os ficheiros existentes" +02000DA4="Sincronizar os ficheiros" + +02000DB1="Todos os ficheiros" + +02000DC0="Comprimir" + +; Columns dialog +02000E00="Columnas" +02000E01="Seleccione as columnas que pretende facer visíbeis neste modo. Use as teclas RePág e AvPág para reordenar as columnas ao seu gosto." +02000E02="A columna seleccionada debería ter" +02000E03="pixeis de &ancho." + +02000E10="Mover para &Arriba" +02000E11="Mover para &Baixo" +02000E12="&Mostrar" +02000E13="&Ocultar" +02000E14="Fixar" + +02000E81="Título" +02000E82="Lonxitude" + +; Testing +02000F90="Proba" + + +; File Manager + +03000000="Xestor de Ficheiros do 7-Zip" + +; Menu +03000102="&Ficheiro" +03000103="&Modificar" +03000104="&Ver" +03000105="&Ferramentas" +03000106="&Axuda" +03000107="F&avoritos" + +; File +03000210="&Abrir" +03000211="Abrir &Dentro" +03000212="Abrir &Fora" +03000220="&Ver" +03000221="&Modificar" +03000230="Reno&mear" +03000231="&Copiar Para..." +03000232="&Mover Para..." +03000233="&Eliminar" +03000240="&Propriedades" +03000241="Come&ntario" +03000250="Crear Cartafol" +03000251="Crear Ficheiro" +03000260="Sa&ir" + +; Edit +03000310="&Desfacer" +03000311="&Refacer" +03000320="Cor&tar" +03000321="&Copiar" +03000322="&Pegar" +03000323="&Eliminar" +03000330="Seleccionar &Todo" +03000331="De-seleccionar Todo" +03000332="&Inverter a Selección" +03000333="Seleccionar..." +03000334="De-seleccionar..." +03000335="Seleccionar por Tipo" +03000336="De-select por Tipo" + +; View +03000410="Icones &Grandes" +03000411="Icones &Pequenos" +03000412="&Lista" +03000413="&Detalles" +03000420="Sen Orde" +03000430="Abrir o Cartafol Raíz" +03000431="Subir un Nível" +03000432="Histórico de Cartafois..." +03000440="&Refrescar" +03000450="&Dous Paineis" +03000451="&Barras de Ferramentas" +03000460="Barra de Ferramentas de arquivos" +03000461="Barra de Ferramentas normal" +03000462="Botóns grandes" +03000463="Mostrar o Texto dos Botóns" + +; Tools +03000510="&Opcións..." +03000511="&Análise" + +; Help +03000610="&Contido..." +03000620="&Acerca do 7-Zip..." + +; Favorites +03000710="&Adicionar o cartafol aos Favoritos como" +03000720="Marcador" + +; Options Dialog + +03010000="Opciós" + +; Plugins +03010100="Extensións" +03010101="&Extensións:" +03010110="Opcións..." + +; Edit +03010200="Editor" +03010201="&Editor:" + +; System +03010300="Sistema" +03010302="Asociar 7-Zip con:" +03010310="Extensión" + +; Settings +03010400="Axustes" +03010401="Mostrar o elemento \"..\"" +03010402="Mostrar os icones reais dos ficheiros" +03010410="Mostrar o menú do sistema" + +; Strings + +03020201="Copiar" +03020202="Mover" +03020203="Copiar para:" +03020204="Mover para:" +03020205="A copiar..." +03020206="a mover..." +03020207="Non é posíbel mover ou copiar os elementos para eses cartafois." +03020208="Non é posíbel efectuar esta operación." + +03020210="Confirmar Eliminar Ficheiro" +03020211="Confirmar Eliminar Cartafol" +03020212="Confirmar Eliminar Múltiplos Ficheiros" +03020213="Ten a certeza de que desexa eliminar '{0}'?" +03020214="Ten a certeza de que desexa eliminar o cartafol '{0}' e todo o seu contido?" +03020215="Ten a certeza de que desexa eliminar estes {0} elementos?" +03020216="A eliminar..." +03020217="Erro ao eliminar Ficheiro ou Cartafol" + +03020220="A renomear..." +03020221="Erro ao Renomear Ficheiro ou Cartafol" + +03020230="Crear Cartafol" +03020231="Nome do cartafol:" +03020232="Novo Cartafol" +03020233="Erro ao crear o Cartafol" + +03020240="Crear Ficheiro" +03020241="Nome do Ficheiro:" +03020242="Novo Ficheiro" +03020243="Erro ao crear o Ficheiro" + +03020250="Seleccionar" +03020251="De-seleccionar" +03020252="Máscara:" + +03020260="Histórico dos Cartafois" + +03020280="Modificouse o Ficheiro '{0}'.\nQuéreo actualizar no arquivo?" +03020281="Non é posíbel actualizar o ficheiro\n'{0}'" +03020282="Non se pode iniciar o editor." +03020283="Abrindo..." + +03020290="Comentario" +03020291="&Comentario:" + +030202A0="Sistema" + +03020300="Computador" +03020301="Rede" + +03020400="Adicionar" +03020401="Extrair" +03020402="Probar" + +03020420="Copiar" +03020421="Mover" +03020422="Eliminar" +03020423="Información" + +; Computer +03031100="Tamaño total" +03031101="Tamaño disponíbel" +03031102="Tamaño co cluster" +03031103="Etiqueta" + +; Network +03031200="Nome local" +03031201="Fornecedor" + +; Benchmark Dialog + +03080000="Análise" +03080001="Uso da memoria:" +03080002="Compresión" +03080003="Decompresión" +03080004="Rapidez" +03080005="Relación" +03080006="Relación total" +03080007="Actual" +03080008="Resultante" +03080009="Pases:" +0308000A="Erros:" + +;!@LangEnd@! diff --git a/GUI/Lang/gu.txt b/GUI/Lang/gu.txt new file mode 100644 index 0000000..cfe2d18 --- /dev/null +++ b/GUI/Lang/gu.txt @@ -0,0 +1,547 @@ +;!@Lang@!UTF-8! +; 7-Zip ૯.૦૭ +; Translated by Vinayy Sharrma, વિનય શર્મા દ્વારા અનુવાદિત +;મેહનત કરેલી છે તો પોતાનું નામ લખવામાં કાંઇ બુરાઈ નથી. +;હિન્દ પર ગર્વ કરો, જય હિન્દ ! જય હિન્દી ! જય ગરવી ગુજરાત ! જય ગુજરાતી +; +; + +00000000="Gujarati, Indian, હિન્દુસ્તાન" +00000001="ગુજરાતી" +00000002="71" + +; 7-Zip Configuration + +; Title +01000000="7-જિપ સંરચના" + +; Info Page +01000100="7-જિપ ના વિશે" +01000103="7-જિપ એ નિઃશુલ્ક સૉફ઼્ટવેયર છે. તો પણ, આપ પંજીકૃત(રજિસ્ટર્ડ) થઈને ૭-જ઼િપ ના વિકાસમાં સહયોગ કરી શકો છો." +01000104="સહયોગ" +01000105="પંજીકરણ" + +; Folders Page +01000200="ફોલ્ડર્સ" +01000210="&કાર્યરત ફોલ્ડર" +01000211="&પ્રણાલીનું અસ્થાયી(ટેમ્પરરી) ફોલ્ડર" +01000212="&ચાલુ" +01000213="&નિર્દિષ્ટ:" +01000214="ફક્ત હટાવવા યોગ્ય(રિમૂવેબલ) ડ્રાઈવ માટે જ પ્રયોગ કરો" + +01000281="અસ્થાયી સંગ્રહ ફાઇલ માટે સ્થાન નિર્દિષ્ટ કરો(બતાવો)." + +; System Page +01000300="પ્રણાલી કે તંત્ર" +01000301="૭-જિપ ના શેલ (કવચ) પ્રસંગ મેનુ માં જોડો" +01000302="સોપાનીકૃત(કેસ્કેડેડ) પ્રસંગ મેનુ" +01000310="પ્રસંગ(કોન્ટેક્સ્ટ) મેનુ વસ્તુએઁ:" + +; Language Page +01000400="ભાષા" +01000401="ભાષા:" + + +; 7-Zip Explorer extension + + +; Context menu +02000101="૭-જિપ" +02000102="૭-જિપ આદેશ (કમાંડ્સ)" +02000103="સંગ્રહ ખોલો" +02000104="ચયનિત સંગ્રહ ખોલતા હૈ." +02000105="ફ઼ાઇલ્સ બાહર કાઢો..." +02000106="ચયનિત સંગ્રહમાંથી ફાઇલો બાહર કાઢો ." +02000107="સંગ્રહમાં જોડો..." +02000108="ચયનિત વસ્તુઓંને સંગ્રહમાં જોડે છે." +02000109="સંગ્રહની જાઁચ કરો" +0200010A="ચયનિત સંગ્રહની એકસૂત્રતા તપાસે છે." +0200010B="અહિયાં બાહર કાઢો" +0200010C="ચયનિત સંગ્રહમાં થી વર્તમાન ફોલ્ડરમાં ફાઇલો બાહર કાઢો." +0200010D="{0} માં બાહર કાઢો" +0200010E="ઉપ-ફ઼ોલ્ડર માં ફ઼ાઇલ્સ ને બાહર કાઢો." +0200010F="{0} માં જોડો" +02000110="ચયનિત વસ્તુ ને સંગ્રહ માં જોડો." +02000111="દબાવો(સંકુચન) અને ઇમેલ કરો..." +02000112="ચયનિત વસ્તુઓંને સંકુચિત કરી સંગ્રહમાં જોડે છે અને સંગ્રહ ઈ-મેલ દ્વારા મોકલે છે." +02000113=" {0} માં દબાવો અને ઈમેલ કરો" +02000114="ચયનિત વસ્તુઓંને સંકુચિત કરી સંગ્રહમાં જોડે છે અને સંગ્રહ ઈ-મેલ દ્વારા મોકલે છે." + + +02000140="<ફોલ્ડર>" +02000141="<સંગ્રહ(આર્ચિવ)>" + +; Properties +02000203="માર્ગ" +02000204="નામ" +02000205="વિસ્તાર" +02000206="ફ઼ોલ્ડર" +02000207="આકાર" +02000208="કુલ આકાર" +02000209="વિશેષતા યા ગુણધર્મ" +0200020A="સર્જિત" +0200020B="ચલાવેલી" +0200020C="પરિવર્ધિત" +0200020D="ઠોસ" +0200020E="ટિપ્પણી" +0200020F="ગુપ્તિકૃત" +02000210="ના પૂર્વે વિભાજન(ટુકડે) કરો " +02000211="ના બાદ વિભાજન(ટુકડે) કરો" +02000212="શબ્દકોશ" +02000213="સીઆરસી" +02000214="પ્રકાર" +02000215="વિરોધી" +02000216="પદ્ધતિ" +02000217="યજમાન આજ્ઞાવલી(ઓપરેટિંગ સિસ્ટમ)" +02000218="ફ઼ાઇલ પ્રણાલી" +02000219="પ્રયોગકર્તા" +0200021A="સમૂહ" +0200021B="રોક કે ટુકડાઓ" +0200021C="પ્રતિક્રિયા" +0200021D="સ્થાન" +0200021E="માર્ગ પ્રત્યય" +0200021F="ફોલ્ડરસ" +02000220="ફાઇલ્સ" +02000221="સંસ્કરણ" +02000222="જત્થા" +02000223="અનેક જત્થાઓ" +02000224="ઓફસેટ" +02000225="કડિયાઁ" +02000226="ટુકડ઼ે" +02000227="જત્થે" + +02000229="૬૪-બિટ" +0200022A="મોટું-એન્ડિયન" +0200022B="સીપીયૂ" +0200022C="ભૌતિક આકાર" +0200022D="શીર્ષકોંના આકાર" +0200022E="જાઁચયોગ" +0200022F="ચરિત્રતાઓ" +02000230="આભાસી પત્તો" +02000231="આઈડી" +02000232="સંક્ષિપ્ત નામ" +02000233="સર્જક અનુપ્રયોગ" +02000234="સેક્ટરનો આકાર" +02000235="સ્થિતિ" +02000236="કડ઼ી" + +; Status bar +02000301="{0} ચયનિત વસ્તુ(ઓ)" +02000302="{0} વસ્તુ(ઓ)" + +02000320="ફ઼ાઇલો:" +02000321="ફ઼ોલ્ડર્સ:" +02000322="આકાર:" +02000323="સંકુચિત કરેલું આકાર:" +02000324="સંગ્રહ:" + +; List Context Menu +02000401="&સ્તંભ..." + +02000411="&ખોલો" +02000412="&બાહર કાઢો..." + +; ToolBar +02000501="બાહર કાઢો" + +; Messages +02000601="આ સંગ્રહ માટે અદ્યતનીકૃત સંચાલન સમર્થિત નથી." +02000602="{0} સંગ્રહ ને અદ્યતનીકૃત નથી કરી શકતું" +02000603=" '{0}' ફ઼ોલ્ડર સર્જિત નથી કરી શકતું" +02000604="ફાઇલ સમર્થિત સંગ્રહ નથી." +02000605="ત્રુટિ" +02000606="બહુ વધારે વસ્તુઓ" +02000607="આપેલી ફાઇલના નામના વિસ્તારની સાથે કોઈ પણ સમ્બન્ધિત અનુપ્રયોગ(પ્રોગ્રામ) નથી" +02000608="આમાં કોઈ પણ ત્રુટિ નથી" +02000609="'{0}' ફાઇલને સંગ્રહનાં રૂપમાં નથી ખોલી શકતું" +0200060A="'{0}' ગુપ્તિકૃત સંગ્રહને નથી ખોલી શકતુ. ગલત કૂટશબ્દ?" +0200060B="તંત્ર જરૂરી માત્રામાં મેમોરી(સ્મૃતિ) વિતરિત નથી કરી શકતું" +0200060C="અજ્ઞાત ત્રુટિ" +0200060D="અસમર્થિત સંગ્રહ પ્રકાર" + +; Dialogs +02000702="સારું" +02000705="&હાઁ" +02000707="&બધા માટે હાઁ" +02000709="&ના" +0200070B="&બધા માટે ના" + +02000710="રદ્દ" +02000711="&રદ્દ" +02000713="&બંદ કરો" +02000714="રૂકો" +02000715="પુનઃ શુરુ કરો" + +02000720="મદદ" + +; Extract dialog +02000800="બાહર કાઢો" +02000801="&બાહર કાઢો:" +02000802="કૂટશબ્દ(પાસવર્ડ)" + +02000810="માર્ગ સ્થિતિ" +02000811="આખો માર્ગનામ" +02000812="વર્તમાન માર્ગનામ" +02000813="કોઈ માર્ગ નામ નથી" + +02000820="અધિલેખન રીત" +02000821="અધિલેખન કરતાં પહલાં પૂછો" +02000822="વગર પૂછે અધિલેખન(જુનું મટાવવું) કરો" +02000823="પહેલાથી હયાત ફ઼ાઇલસને છોડો" +02000824="સ્વચાલિત પુન: નામકરણ" +02000825="પહેલાથી હયાત ફ઼ાઇલસનો સ્વચાલિત(ઓટોમેટિક) પુન: નામકરણ કરો" + +02000830="ફ઼ાઇલો" +02000831="&ચયનિત ફ઼ાઇલો" +02000832="&બધા ફ઼ાઇલો" + +02000881="બાહર કાઢેલી ફ઼ાઇલોં માટે સ્થાન નિર્દિષ્ટ કરો." + +02000890="બાહર કાઢી રહ્યું છે" + +; Overwrite dialog +02000900="ફ઼ાઇલ પ્રતિસ્થાપન ને પાક્કુ કરો" +02000901="ગન્તવ્ય ફોલ્ડરમાં પહેલાથી જ પ્રક્રિયા થએલી ફ઼ાઇલ છે." +02000902="શું આપ પહેલાથી હયાત ફ઼ાઇલ ને બદલવું પસંદ કરશો?" +02000903="આની જોડે?" + +02000911="સ્વચાલિત પુન: નામકરણ" + +02000982="{0} બાઇટ્સ" +02000983="ને પરિવર્ધિત" + +; Messages dialog +02000A00="નિદાનાત્મક સંદેશ" + +02000A80="સંદેશ" + +02000A91="'{0}' ના માટે અસહાયક દબાવાવાની પદ્ધતિ." +02000A92="ડેટા ત્રુટિ’{0}' માં. ફ઼ાઇલ તૂટેલી છે." +02000A93="'{0}' માં સીઆરસી અસફલ. ફ઼ાઇલ તૂટેલી છે." +02000A94=" '{0}' ગુપ્તિકૃત(એનક્રિપ્ટેડ) ફાઇલ માં ડેટા ત્રુટિ. ગલત કૂટશબ્દ?" +02000A95=" '{0}' ગુપ્તિકૃત(એનક્રિપ્ટેડ) ફાઇલ માં સીઆરસી અસફલ. ગલત કૂટશબ્દ?" + +; Password dialog +02000B00="કૂટશબ્દ(પાસવર્ડ) ડાલે" +02000B01="કૂટશબ્દ(પાસવર્ડ) ડાલે:" +02000B02="&કૂટશબ્દ(પાસવર્ડ) દિખાવો" +02000B03="કૂટશબ્દ પુનઃ નાખો:" +02000B10="કૂટશબ્દ સહેજેલાંથી જુદૂં છે" +02000B11="કૂટશબ્દ માટે ફક્ત ઇંગ્લિશ વર્ણમાલા, અંકો અને વિશેષ અક્ષરોં (!, #, $, ...) નો જ ઉપયોગ કરો" +02000B12="કૂટશબ્દ ખૂબ જ મોટું છે" + +; Progress dialog +02000C00="પ્રક્રિયા" +02000C01="વ્યતીત સમય:" +02000C02="શેષ બચેલું સમય:" +02000C03="કુલ આકાર:" +02000C04="ગતિ:" +02000C05="પ્રક્રિયા કરેલું:" +02000C06="દબાવાનું(આકાર છોટા કરવાનું)અનુપાત:" + +02000C10="&પૄષ્ઠ્ભૂમિ" +02000C11="&અગ્રભૂમિ(ડેસ્ક્ટોપ)" +02000C12="&વિશ્રામ" +02000C13="&જારી રાખો" + +02000C20="થોભેલું" + +02000C30="તુમે રદ્દ કરવા ચાહો છો. શું તમને યકીન છે?" + +; Compress dialog +02000D00="સંગ્રહમાં જોડો" +02000D01="&સંગ્રહ:" +02000D02="&અદ્યતનીકરણ સ્થિતિ(મોડ):" +02000D03="સંગ્રહ &ઢાઁચા:" +02000D04="&સંકુચન વિધિ:" +02000D05="&ઠોસ સંગ્રહ તૈયાર કરો" +02000D06="&પરિમાપ:" +02000D07="વિકલ્પ" +02000D08="&એસએફ઼એક્સ(SFX) સંગ્રહ તૈયાર કરો" +02000D09="અનેક-સૂત્રી" +02000D0A="ફ઼ાઇલ &નામ ગુપ્તિકરણ કરો" +02000D0B="&સંકુચન સ્તર:" +02000D0C="&શબ્દકોશ આકાર:" +02000D0D="&શબ્દ આકાર:" +02000D0E="સંકુચન માટે સ્મૃતિ પ્રયોગ:" +02000D0F="પ્રસારણ માટે સ્મૃતિ પ્રયોગ:" +02000D10="ગુપ્તિકરણ" +02000D11="ગુપ્તિકરણ પદ્ધતિ:" +02000D12="સીપીયૂ સૂત્ર સંખ્યા:" +02000D13="ઠોસ ટુકડાનો આકાર:" +02000D14="અ-ઠોસ" +02000D15="ઠોસ" +02000D16="સાઝી ફાઇલો સંકુચિત કરો" + +02000D40="જત્થાઓમાં વિભાજન, બાઇટ્સ:" +02000D41="જત્થાનો આકાર ખોટું છે" +02000D42="નિર્દેશિત જત્થા આકાર: {0} બાઇટસ.\n આપ સંગ્રહને એવા જત્થાઓમાં વિભાજિત કરવા ચાહો છો, શું તમને યકીન છે?" + +02000D81="ભંડારણ" +02000D82="સાધારણ" +02000D83="અધિકતમ" +02000D84="તેજ" +02000D85="સર્વાધિક તેજ" +02000D86="અત્યન્ત" + +02000D90="બ્રાઉજ યા ઘૂમો" + +02000DA1="ફ઼ાઇલેં જોડો અને પ્રતિસ્થાપિત કરો" +02000DA2="ફાઇલો અદ્યતનીકૃત કરો અને જોડો" +02000DA3="અવસ્થિત ફાઇલોં તાજા કરો" +02000DA4="ફાઇલોં સમક્રમણ(સિંક્રોનાઈજ઼) કરો" + +02000DB1="બધા ફાઇલોં" + +02000DC0="સંકુચન કરી રહ્યું છે" + +; Columns dialog +02000E00="સ્તંભ" +02000E01="આ ફોલ્ડરમાં જો સ્તંભ, તમને દિખાઈ દે એવા બનાવવા ચાહો છો તેમને ટિક(ચયન) કરો. સ્તંભો નો ક્રમ બદલવા માટે ઊપર લે જાઓ અને નીચે લે જાઓ બટન(ખટકા)નો ઉપયોગ કરો" +02000E02="ચયનિત સ્તંભ" +02000E03="&પિક્સેલ(બૂઁદ) ચૌડ઼ે." + +02000E10="&ઊપર લઈ જાઓ" +02000E11="&નીચે લઈ જાઓ" +02000E12="&દિખાવો" +02000E13="&છુપાવો" +02000E14="સેટ(સ્થિર)" + +02000E81="શીર્ષક" +02000E82="ચૌડ઼ાઈ" + +; Testing +02000F90="પરીક્ષણ" + + +; file Manager + +03000000="૭-જિપ ફ઼ાઇલ પ્રબન્ધક" + +; Menu +03000102="&ફ઼ાઇલ" +03000103="&સંપાદન" +03000104="&દર્શન" +03000105="&ઔજાર" +03000106="&મદદ" +03000107="&મનપસંદ" + +; file +03000210="&ખોલો" +03000211="&અંદર ખોલો" +03000212="&બાહર ખોલો" +03000220="&દૃશ્ય" +03000221="&સંપાદન" +03000230="&પુન: નામકરણ" +03000231="&માં નકલ બનાવો..." +03000232="&માં લઇ જાઓ..." +03000233="&મિટાવો" +03000240="&સંપત્તિયાઁ યા ગુણ" +03000241="&ટિપ્પણી" +03000242="&જાઁચ યોગની ગણના કરો" +03000243="&અન્તર" +03000250="&ફ઼ોલ્ડર તૈયાર કરો" +03000251="&ફ઼ાઇલ તૈયાર કરો" +03000260="&નિર્ગમન" +03000270="&ફ઼ાઇલનો વિભાજન કરો..." +03000271="&ફ઼ાઇલનો સંયોજન કરો..." + +; Edit +03000310="&પુર્વસ્થિતી(પહેલા જેવું)" +03000311="&પુનઃ કરો" +03000320="&કાપો" +03000321="&નકલ કરો" +03000322="&ચિપકાવો" +03000323="&મિટાવો" +03000330="&બધા ચયન કરો" +03000331="&બધા અચયનિત કરો" +03000332="&ચયન ઊંધું કરો" +03000333="ચયન કરો..." +03000334="અચયન કરો..." +03000335="પ્રકાર દ્વારા ચયન" +03000336="પ્રકાર દ્વારા અચયન" + +; View +03000410="મોટાં પ્રતીક" +03000411="લઘુ પ્રતીક" +03000412="&સૂચી" +03000413="&વર્ણન" +03000420="અવિતરિત" +03000430="મૂલ ફ઼ોલ્ડર ખોલો" +03000431="એક સ્તર ઊપર ચઢ઼ો" +03000432="ફ઼ોલ્ડરો નો ઇતિહાસ..." +03000440="&તાજા કરો" +03000449="ચૌડ઼ા દૃશ્ય" +03000450="&૨ ફ઼લક" +03000451="&ઔજાર પટ્ટીઓ" +03000460="સંગ્રહ ઔજાર પટ્ટી" +03000461="માનક ઔજાર પટ્ટી" +03000462="મોટા ખટકા(બટન)" +03000463="ખટકા(બટન)ના શબ્દ દિખાવો" + +; Tools +03000510="&વિકલ્પ..." +03000511="&બેઞ્ચમાર્ક(પ્રામાણિક તુલના)" + +; Help +03000610="&સામગ્રી..." +03000620="૭-જિપ ના વિશેમાં..." + +; Favorites +03000710="&ફ઼ોલ્ડર મનપસંદમાં એવી રીતે જોડો..." +03000720="પુસ્તચિન્હ" + +; Options Dialog + +03010000="વિકલ્પ" + +; Plugins +03010100="પ્લગઇન(શક્તિદાયક)" +03010101="&પ્લગઇન(શક્તિદાયક):" +03010110="વિકલ્પ..." + +; Edit +03010200="સંપાદક" +03010201="&સંપાદક:" +03010202="&અન્તર:" + +; System +03010300="પ્રણાલી કે તંત્ર" +03010302="સંબધિત કરો ૭-જિપ ના સાથે:" +03010310="પ્લગઇન(શક્તિદાયક)" + +; Settings +03010400="વ્યવસ્થાઓ" +03010401="દિખાવો \"..\"વસ્તુ" +03010402="વાસ્તવિક ફ઼ાઇલ પ્રતીક બતાવો" +03010410="તંત્ર નો મેનુ બતાવો" +03010420="&આખી પન્ક્તિનું ચયન" +03010421=" &ગ્રિડ(જાલ) રેખા દિખાવો" +03010422="વસ્તુ ખોલવા માટે એક જ(સિંગલ)-ક્લિક" +03010430="&વૈકલ્પિક ચયન સ્થિતિ" +03010440="&મોટા સ્મૃતિ પૃષ્ઠનો પ્રયોગ કરો" + +; Strings + +03020201="નકલ" +03020202="લઇ જાઓ" +03020203="માં નકલ:" +03020204="માં લઇ જાઓ:" +03020205="નકલ..." +03020206="લઇ જાઇ રહ્યુ છે..." +03020207="આવા ફોલ્ડરો માટે તમે વસ્તુઓં ને હટાવવું કે નકલ કરવું નથી કરી શકતા." +03020208="આ ફોલ્ડર માટે આ સઞ્ચાલન ક્રિયા સમર્થિત નથી." +03020209="ગન્તવ્ય ફોલ્ડર ચયનિત કરો." + +03020210="ફ઼ાઇલ મિટાવો આ પાક્કું કરો" +03020211="ફ઼ોલ્ડર મિટાવો પાક્કું કરો" +03020212="અનેક ફ઼ાઇલ મિટાવો પાક્કું કરો" +03020213="શું તમને યકીન છે કે તમે મેટવવા ચાહો છો '{0}'?" +03020214="શું તમને યકીન છે કે તમે ફ઼ોલ્ડર મિટાવવા માંગો છો ’{0}' અને આની બધી સામગ્રી પણ?" +03020215="શું તમને યકીન છે કે તમે મિટાવવા માંગો છો આ {0} વસ્તુઓં ને?" +03020216="મેટવી રહ્યુ છે..." +03020217="ફ઼ાઇલ કિંવા ફ઼ોલ્ડર મિટાવામાં ત્રુટિ" +03020218="તંત્ર લાંબા માર્ગ વાલી ફાઇલને પુનઃચક્રણ પેટી(રિસાઈકલ બિન)માં નથી લઇ જાઇ શકતુ." + +03020220="પુનઃ નામકરણ..." +03020221="ફ઼ાઇલ કે ફ઼ોલ્ડરના પુનઃ નામકરણ માં ત્રુટિ" +03020222="ફ઼ાઇલની નકલ કરવુ પાક્કું કરો" +03020223="તમે સંગ્રહમાં ફાઇલ ની પ્રતિલિપિ કરવા ચાહો છો શું તમને યકીન છે" + +03020230="ફ઼ોલ્ડર તૈયાર કરો" +03020231="ફ઼ોલ્ડર નામ:" +03020232="નવુ ફ઼ોલ્ડર" +03020233="ફ઼ોલ્ડર તૈયાર કરવામાં ત્રુટિ" + +03020240="ફ઼ાઇલ તૈયાર કરો" +03020241="ફ઼ાઇલ નામ:" +03020242="નવી ફ઼ાઇલ" +03020243="ફ઼ાઇલ તૈયાર કરવામાં ત્રુટિ" + +03020250="ચયન" +03020251="ચયન રદ્દ" +03020252="મુખૌટો:" + +03020260="ફ઼ોલ્ડરોંનો ઇતિહાસ" + +03020280=" '{0}' ફ઼ાઇલ પરિવર્ધિત થઈ છે.\nશું તમે સંગ્રહમાં આને અદ્યતનીકૃત કરવા માગો છો?" +03020281="ફ઼ાઇલ ને અદ્યતનીકૃત નથી કરી શકતું\n'{0}'" +03020282="સંપાદકને શરૂ નથી કરી શકતું." +03020283="ખોલી રહ્યુ છે..." +03020284="આ ફાઇલ એક વિષાણુ(વાયરસ) જેવી લાગે છે (ફાઇલ નામ લાંબી ખાલી જગહ નામમાં રાખતો છે)." + +03020290="ટિપ્પણી" +03020291="&ટિપ્પણી:" + +030202A0="પ્રણાલી" + +03020300="સંગણક" +03020301="સઞ્જાલ" +03020302="દસ્તાવેજ" + +03020400="જોડો" +03020401="બાહર કાઢો" +03020402="પરીક્ષણ" + +03020420="નકલ" +03020421="લઈ જાઓ" +03020422="મિટાવો" +03020423="સૂચના" + +03020500="ફ઼ાઇલનું વિભાજન કરો" +03020501="&માં વિભાજન:" +03020510="વિભાજન કરી રહ્યુ છે..." +03020520="વિભાજન કરવાનું પાક્કું કરો" +03020521="શું તમને યકીન છે કે તમે ફાઇલ ને {0} જત્થાઓમાં વિભાજિત કરવા માગો છો?" +03020522="મૂલ ફાઇલના આકારની તુલનામાં જત્થાનું આકાર નાનો જ હોવો જોઇએ" + +03020600="ફાઇલો સંયોજિત કરો" +03020601="&માં સંયોજન કરો:" +03020610="સંયોજન થઇ રહ્યુ છે..." +03020620="વિભાજિત ફાઇલનો ફક્ત પ્રથમ ભાગ જ ચયનિત કરો" +03020621="ફાઇલ ને વિભાજિત ફાઇલના ભાગના રૂપમાં ઓળખી નથી શકતુ" +03020622="વિભાજિત ફાઇલના એક થી વધારે ભાગ શોધી નથી શકતુ" + +03020710="જાઁચયોગ(ચેકસમ)ની ગણના કરી રહ્યુ છે..." +03020720="જાઁચયોગ(ચેકસમ) માહિતી" +03020721="સીઆરસી જાઁચયોગ(ચેકસમ) આઁકડ઼ોં માટે :" +03020722="સીઆરસી જાઁચયોગ(ચેકસમ) આઁકડ઼ોં અને નામોં માટે :" + +03020800="તલાશી(સ્કૈનિંગ) કરી રહ્યુ છે..." + +03020900="ગુણ યા સંપત્તિયાઁ" + +03020A01="જે ફોલ્ડરનો લાંબો માર્ગ છે તેનાથી સઞ્ચાલન ક્રિયા બોલાવી નથી શકાતી." +03020A02="તમારે એક ફાઇલનો ચયન તો કરવો જ પડશે" +03020A03="તમારે એક કે જ્યાદા ફાઇલોંનો ચયન તો કરવો જ પડશે" +03020A04="ફાઇલ {0} પહેલાથી હયાત છે" + +; Computer +03031100="કુલ આકાર" +03031101="સ્વતન્ત્ર રિક્તસ્થાન(ખાલી જગહ)" +03031102="ક્લસ્ટર(સમૂહ) આકાર" +03031103="ધ્યાનાકર્ષક(લેબલ)" + +; Network +03031200="સ્થાનિક નામ" +03031201="પ્રદાયક" + +; Benchmark Dialog + +03080000="(કસૌટી ચિન્હ)બેઞ્ચમાર્ક" +03080001="સ્મૃતિ ઉપયોગ:" +03080002="સંકુચન કરી રહ્યું છે" +03080003="પ્રસારણ કરી રહ્યું છે" +03080004="ગતિ(વેગ)" +03080005="ક્રમાંકન" +03080006="કુલ ક્રમાંકન" +03080007="વર્તમાન" +03080008="પરિણામ" +03080009="પાસ:" +0308000A="ત્રુટિયાઁ:" +0308000B="સીપીયૂ ઉપયોગ" +0308000C="ક્રમાંકન / ઉપયોગ" + +;!@LangEnd@! + + diff --git a/GUI/Lang/he.txt b/GUI/Lang/he.txt new file mode 100644 index 0000000..613217e --- /dev/null +++ b/GUI/Lang/he.txt @@ -0,0 +1,543 @@ +;!@Lang@!UTF-8! +; 7-Zip 9.13 Beta +; Translated by Jonathan Lahav, updated by peterg (last update: 6 February 2009) +; Updated by Jonathan Lahav (30 April 2010) +; +; +; + +00000000="Hebrew" +00000001="עברית" +00000002="13" + +; 7-Zip Configuration + +; Title +01000000="7-Zip תצורת" + +; Info Page +01000100="7-Zip אודות" +01000103="זו היא תוכנה חופשית. עם זאת, ביכולתך לתמוך בפיתוח התוכנה על ידי הרשמה" +01000104="תמיכה" +01000105="הרשמה" + +; Folders Page +01000200="תיקיות" +01000210="&תיקיית עבודה" +01000211="של המ&ערכת \"Temp\" תיקיית ה" +01000212="&נוכחית" +01000213="&בחר תיקייה:" +01000214="השתמש בהגדרות אלו עבור כוננים ניידים בלבד" + +01000281=".בחר מיקום לקבצי ארכיון זמניים" + +; System Page +01000300="מערכת" +01000301="שלב את התוכנה בתפריט-ההקשר הכללי" +01000302="תפריט מדורג" +01000310="פריטי תפריט:" + +; Language Page +01000400="Language / שפה" +01000401="Language / שפה:" + + +; 7-Zip Explorer extension + +; Context menu +02000101="7-Zip" +02000102="7-Zip פקודות" +02000103="פתח ארכיון" +02000104=".פותח את הארכיון שנבחר" +02000105="...חלץ קבצים" +02000106=".מחלץ קבצים מהארכיון שנבחר" +02000107="...הוסף לארכיון" +02000108=".מוסיף את הקבצים שנבחרו לארכיון" +02000109="בדוק ארכיון" +0200010A=".בודק את תקינות הארכיון שנבחר" +0200010B="חלץ לכאן" +0200010C=".מחלץ קבצים מהארכיון שנבחר לתיקייה הנוכחית" +0200010D="{0} -חלץ ל" +0200010E=".מחלץ קבצים לתיקיות משנה" +0200010F="{0} -הוסף ל" +02000110=".מוסיף את הפריטים שנבחרו לארכיון" +02000111="כווץ ושלח בדואר אלקטרוני" +02000112=".כווץ את הפריטים שנבחרו לארכיון ושולח בדואר אלקטרוני" +02000113="כווץ ל- {0} ושלח בדואר אלקטרוני" +02000114=".מכווץ את הפריטים שנבחרו לארכיון ושולח בדואר אלקטרוני" + +02000140="<תיקייה>" +02000141="<ארכיון>" + +; Properties +02000203="נתיב" +02000204="שם" +02000205="סיומת" +02000206="תיקייה" +02000207="גודל" +02000208="גודל מכווץ" +02000209="תכונות" +0200020A="נוצר" +0200020B="נצפה" +0200020C="השתנה" +0200020D="רצוף" +0200020E="נרשמה הערה" +0200020F="הוצפן" +02000210="פצל לפני" +02000211="פצל אחרי" +02000212="מילון" +02000213="CRC" +02000214="סוג" +02000215="אנטי" +02000216="שיטה" +02000217="מערכת הפעלה" +02000218="מערכת קבצים" +02000219="משתמש" +0200021A="קבוצה" +0200021B="קטע" +0200021C="הערה" +0200021D="מיקום" +0200021E="תחילית נתיב" +0200021F="תיקיות" +02000220="קבצים" +02000221="גירסה" +02000222="חלק" +02000223="ריבוי חלקים" +02000224="קיזוז" +02000225="קישורים" +02000226="קטעים" +02000227="חלקים" + +02000229="64ביט" +0200022A="אחסון בסדר חשיבות יורד" +0200022B="משאבי מערכת/מעבד" +0200022C="גודל פיזי" +0200022D="גודל כותרת עליונה" +0200022E="בדיקת סיכום" +0200022F="מאפיינים" +02000230="כתובת וירטואלית" +02000231="מס' זיהוי" +02000232="שם קצר" +02000233="תוכנה יוצרת" +02000234="גודל סקטור" +02000235="מצב" +02000236="קישור" + +; Status bar +02000301="(נבחרו {0} פריט(ים" +02000302="{פריטים: {0" + +02000320="קבצים:" +02000321="תיקיות:" +02000322="גודל:" +02000323="גודל מכווץ:" +02000324="ארכיונים:" + +; List Context Menu +02000401="&...טורים" + +02000411="&פתח" +02000412="&...חלץ" + +; ToolBar +02000501="חלץ" + +; Messages +02000601=".פעולות עדכון לא נתמכות עבור ארכיון זה" +02000602="'{0} אין אפשרות לעדכן את הארכיון" +02000603="'{0}' אין אפשרות ליצור את התיקייה" +02000604=".הקובץ אינו ארכיון הנתמך ע\"י התוכנה" +02000605="שגיאה" +02000606="יותר מדי פריטים" +02000607="סיומת שם הקובץ הנתון לא משוייכת לאף תוכנה" +02000608="אין שגיאות" +02000609="'לא היה ניתן לפתוח את הקובץ '{0}' כארכיון" +0200060A="'?לא היה ניתן לפתוח את הארכיון המקודד '{0}'. סיסמא שגוייה" +0200060B="המערכת אינה יכולה להקצוות את כמות הזיכרון הדרושה" +0200060C="שגיאה לא ידועה" +0200060D="סוג ארכיון אינו נתמך" + +; Dialogs +02000702="אישור" +02000705="&כן" +02000707="כן ל&הכל" +02000709="&לא" +0200070B="ל&א להכל" + +02000710="ביטול" +02000711="&ביטול" +02000713="&סגור" +02000714="עצור" +02000715="התחל מחדש" + +02000720="עזרה" + +; Extract dialog +02000800="חלץ" +02000801="&חלץ ל:" +02000802="סיסמא" + +02000810="שיטת הנתיבים" +02000811="נתיבים מלאים" +02000812="נתיבים נוכחיים" +02000813="ללא נתיבים" + +02000820="מצב שכתוב קבצים" +02000821="שאל לפני שכתוב" +02000822="שכתב בלי לשאול" +02000823="דלג על קבצים קיימים" +02000824="שינוי שם אוטומטי" +02000825="שינוי שם אוטומטי לקבצים קיימים" + +02000830="קבצים" +02000831="קבצים שנ&בחרו" +02000832="&כל הקבצים" + +02000881=".ציין יעד לחילוץ הקבצים" + +02000890="מחלץ" + +; Overwrite dialog +02000900="אשר החלפת קובץ" +02000901=".תיקיית היעד מכילה כבר קובץ בשם זה" +02000902="האם ברצונך להחליף את הקובץ הקיים" +02000903="?בקובץ הזה" + +02000911="שינוי שם &אוטומטי" + +02000982="{בתים: {0" +02000983="השתנה ב" + +; Messages dialog +02000A00="הודעות איבחון" + +02000A80="הודעה" + +02000A91=".'{0}' שיטת הדחיסה אינה נתמכת עבור" +02000A92=".שגיאת מידע ב '{0}'. הקובץ אינו תקין" +02000A93=".בדיקת סכום הנתונים נכשלה ב '{0}'. הקובץ אינו תקין" +02000A94="'?שגיאת נתון בקובץ המקודד '{0}'. סיסמא שגוייה" +02000A95="'?שגיאה בבדיקת סכום הנתונים בקובץ המקודד '{0}'. סיסמא שגוייה" + +; Password dialog +02000B00="הכנס סיסמא" +02000B01="הכנס סיסמא:" +02000B02="&הצג סיסמא" +02000B03="הכנס שנית את הסיסמא:" +02000B10="הסיסמאות אינן תואמות" +02000B11="(!, #, $, ...) ליצירת הסיסמא השתמש רק באותיות אנגליות, מספרים או תווים מיוחדים" +02000B12="הסיסמא ארוכה מידי" + +; Progress dialog +02000C00="תהליך" +02000C01="הזמן שעבר:" +02000C02="הזמן שנותר:" +02000C03="גודל כולל:" +02000C04="מהירות:" +02000C05="התקדמות:" +02000C06="יחס כיווץ:" + +02000C10="&רקע" +02000C11="&קדמה" +02000C12="ה&שהה" +02000C13="ה&משך" + +02000C20="מושהה" + +02000C30="?האם את/ה בטוח/ה שברצונך לבטל" + +; Compress dialog +02000D00="הוסף לארכיון" +02000D01="&ארכיון:" +02000D02="מצב &עדכון:" +02000D03="&פורמט הארכיון:" +02000D04="&שיטת דחיסה:" +02000D05="צור קובץ &רצוף" +02000D06="&פרמטרים:" +02000D07="אפשרויות" +02000D08="צור ארכיון &חילוץ-עצמי" +02000D09="ריבוי תהליכים" +02000D0A="&קדד שמות קבצים" +02000D0B="רמת &דחיסה:" +02000D0C="גודל מי&לון:" +02000D0D="גודל &מילה:" +02000D0E="זיכרון הדרוש לדחיסה:" +02000D0F="זיכרון הדרוש לחילוץ:" +02000D10="הצפנה" +02000D11="שיטת הצפנה:" +02000D12="כמות הליכי מעבד/מערכת:" +02000D13="גודל קטע רצוף:" +02000D14="לא רצוף" +02000D15="רצוף" +02000D16="דחוס קבצים שבשיתוף" + +02000D40="פצל לחלקים, בתים:" +02000D41="גודל חלק שגוי" +02000D42="?האם את/ה בטוח/ה שברצונך לפצל את הארכיון לחלקים אלה\nגודל החלק המוגדר: {0} בתים " + +02000D81="אחסון" +02000D82="רגילה" +02000D83="מקסימאלית" +02000D84="מהירה" +02000D85="הכי מהירה" +02000D86="אולטרה" + +02000D90="עיון" + +02000DA1="הוסף והחלף קבצים" +02000DA2="עדכן והוסף קבצים" +02000DA3="רענן קבצים קיימים" +02000DA4="סנכרן קבצים" + +02000DB1="כל הקבצים" + +02000DC0="מכווץ" + +; Columns dialog +02000E00="עמודות" +02000E01="סמן את העמודות שברצונך שיופיעו בתיקייה זו. השתמש בלחצנים הזז למעלה/למטה כדי לסדר מחדש את העמודות" +02000E02="העמודה שנבחרה תהיה ברוחב" +02000E03=".&פיקסלים" + +02000E10="הזז &למעלה" +02000E11="הזז &למטה" +02000E12="ה&צג" +02000E13="ה&סתר" +02000E14="קבע" + +02000E81="כותרת" +02000E82="רוחב" + +; Testing +02000F90="בודק" + + +; File Manager + +03000000="7-Zip מנהל הקבצים של" + +; Menu +03000102="&קובץ" +03000103="&עריכה" +03000104="&תצוגה" +03000105="&כלים" +03000106="ע&זרה" +03000107="&מועדפים" + +; File +03000210="&פתח" +03000211="פתח ב&תוכנה" +03000212="פתח ב&חלון" +03000220="&הצג" +03000221="&ערוך" +03000230="&שנה שם" +03000231="...העתק ל&" +03000232="...העבר ל&" +03000233="&מחק" +03000240="מ&אפיינים" +03000241="הערה" +03000242="חשב סיכום ביקורת" +03000243="הבדל" +03000250="צור תיקייה" +03000251="צור קובץ" +03000260="י&ציאה" +03000270="...פצל קובץ&" +03000271="...מזג קבצים&" + +; Edit +03000310="&בטל" +03000311="ב&צע מחדש" +03000320="&גזור" +03000321="&העתק" +03000322="&הדבק" +03000323="&מחק" +03000330="בח&ר הכל" +03000331="בטל בחירה" +03000332="ה&פוך בחירה" +03000333="...בחר" +03000334="...בטל בחירה" +03000335="בחר לפי סוג" +03000336="בטל בחירה לפי סוג" + +; View +03000410="סמלים &גדולים" +03000411="סמלים &קטנים" +03000412="&רשימה" +03000413="&פרטים" +03000420="לא מסודר" +03000430="פתח תיקיית שורש" +03000431="חזור שלב אחד" +03000432="...היסטוריית תיקיות" +03000440="ר&ענן" +03000449="תצוגה בפריסה מלאה" +03000450="&שני חלונות" +03000451="&סרגלי כלים" +03000460="סרגל ארכיון" +03000461="סרגל רגיל" +03000462="כפתורים גדולים" +03000463="הצג את פעולת הכפתור מתחתיו" + +; Tools +03000510="&...אפשרויות" +03000511="&מבחן ביצועים" + +; Help +03000610="&...תוכן" +03000620="&...7-Zip אודות" + +; Favorites +03000710="&הוסף תיקייה למועדפים כ" +03000720="סימנייה" + +; Options Dialog + +03010000="אפשרויות" + +; Plugins +03010100="תוספים" +03010101="&תוספים:" +03010110="...אפשרויות" + +; Edit +03010200="עורך" +03010201="&עורך:" +03010202="&הבדל:" + +; System +03010300="מערכת" +03010302="7-Zip שייך ל :" +03010310="תוסף" + +; Settings +03010400="הגדרות" +03010401="\"..\" הצג את הפריט" +03010402="הצג סמלי קבצים אמיתיים" +03010410="הצג את תפריט המערכת" +03010420="בחר את כל ה&שורה" +03010421="הצג קווי &טבלה" +03010422="לחיצה אחת לפתיחת פריט" +03010430="שיטת &בחירה חלופית" +03010440="השתמש בקטעי זיכרון &גדולים יותר" + +; Strings + +03020201="העתק" +03020202="העבר" +03020203="העתק ל:" +03020204="העבר ל:" +03020205="...מעתיק" +03020206="...מעביר" +03020207=".אין אפשרות להעתיק/להעביר פריטים לתיקיות כאלה" +03020208="הפעולה אינה נתמכת עבור תיקייה זו " +03020209="בחר תיקיית יעד." + +03020210="אשר מחיקת קובץ" +03020211="אשר מחיקת תיקייה" +03020212="אשר מחיקת מספר קבצים" +03020213="?'{0}' האם את/ה בטוח/ה שברצונך למחוק את" +03020214="?האם את/ה בטוח/ה שברצונך למחוק את התיקייה '{0}' ואת כל תוכנה" +03020215="?האם את/ה בטוח/ה שברצונך למחוק את {0} הפריטים האלה" +03020216="...מוחק" +03020217="אירעה שגיאה במהלך מחיקת קובץ או תיקייה" +03020218="המערכת אינה יכולה להעביר קובץ עם נתיב ארוך לפח המחזור" + +03020220="...משנה שם" +03020221="אירעה שגיאה בשינוי שם של קובץ או תיקייה" +03020222="אשר העתקת קובץ" +03020223="?האם את/ה בטוח/ה שברצונך להעתיק קבצים לארכיון" + +03020230="צור תיקייה" +03020231="שם התיקייה:" +03020232="תיקייה חדשה" +03020233="שגיאה ביצירת תיקייה" + +03020240="צור קובץ" +03020241="שם הקובץ:" +03020242="קובץ חדש" +03020243="שגיאה ביצירת קובץ" + +03020250="בחר" +03020251="בטל בחירה" +03020252="מיסוך:" + +03020260="היסטוריית תיקיות" + +03020280="?האם ברצונך לעדכן אותו בארכיון\n.הקובץ '{0}' שונה" +03020281="'{0}'\nאין אפשרות לעדכן את הקובץ" +03020282=".אין אפשרות להפעיל את העורך" +03020283="...פותח" +03020284="(ייתכן והקובץ היינו וירוס (ישנם רווחים גדולים בשם הקובץ" + +03020290="הערה" +03020291="&הערה:" + +030202A0="מערכת" + +03020300="מחשב" +03020301="רשת" +03020302="מסמכים" + +03020400="הוסף" +03020401="חלץ" +03020402="בדוק" + +03020420="העתק" +03020421="העבר" +03020422="מחק" +03020423="מידע" + +03020500="פצל קובץ" +03020501="&פצל ל:" +03020510="...מפצל" +03020520="אשר פיצול" +03020521=" ? האם את/ה בטוח/ה שברצונך לפצל את הקובץ ל{0} חלקים" +03020522="גודל החלק חייב להיות קטן יותר מהקובץ המקורי" + +03020600="מזג קבצים" +03020601="&מזג ל:" +03020610="...מבצע מיזוג" +03020620="בחר רק את החלק הראשון של הקובץ המפוצל" +03020621="לא היה ניתן למצוא קובץ שהוא חלק מהקובץ המפוצל" +03020622="לא ניתן למצוא יותר מחלק אחד של הקובץ המפוצל" + +03020710="...מחשב סיכום ביקורת" +03020720="תוצאות סיכום ביקורת" +03020721="עבור הנתונים CRC בדיקת סיכום ביקורת :" +03020722="עבור הנתונים ושמות CRC בדיקת סיכום ביקורת :" + +03020800="...סורק" + +03020900="מאפיינים" + +03020A01=".הפעולה אינה יכולה להתבצע מתיקייה בעלת נתיב ארוך" +03020A02="הינך חייב/ת לבחור קובץ אחד" +03020A03="הינך חייב לבחור קובץ אחד או יותר" +03020A04="הקובץ {0} כבר קיים" + +; Computer +03031100="גודל כללי" +03031101="שטח פנוי" +03031102="גודל קלסטר/יחידת אחסון " +03031103="תווית" + +; Network +03031200="שם מקומי" +03031201="ספק" + +; Benchmark Dialog + +03080000="מבחן ביצועים" +03080001="זיכרון בשימוש:" +03080002="מכווץ" +03080003="מחלץ" +03080004="מהירות" +03080005="קצב" +03080006="סיכום הקצב" +03080007="נוכחי" +03080008="סופי" +03080009="הצלחות:" +0308000A="שגיאות:" +0308000B="משאבי מערכת/מעבד" +0308000C="קצב / שימוש" + +;!@LangEnd@! diff --git a/GUI/Lang/hi.txt b/GUI/Lang/hi.txt new file mode 100644 index 0000000..cffa3c5 --- /dev/null +++ b/GUI/Lang/hi.txt @@ -0,0 +1,547 @@ +;!@Lang@!UTF-8! +; 7-Zip 9.07 +; Translated by Vinayy Sharrma, अनुवाद विनय शर्मा +;मेहनत की है तो अपना नाम लिखने मे कोई बुराई तो है नही. +;हिन्दी पर गर्व करो, जय हिन्द ! जय हिन्दी ! +; +; + +00000000="Hindi, Indian, हिन्दुस्तान" +00000001="हिन्दी" +00000002="57" + +; 7-Zip Configuration + +; Title +01000000="7-जिप संरचना" + +; Info Page +01000100="7-जिप के बारे में" +01000103="7-जिप यह निःशुल्क सॉफ़्टवेयर है. फिर भी, आप पंजीकृत(रजिस्टर्ड) होकर७-ज़िप के विकास में सहयोग कर सकते हैं." +01000104="सहयोग" +01000105="पंजीकरण" + +; Folders Page +01000200="फ़ोल्डर्स" +01000210="&कार्यरत फ़ोल्डर" +01000211="&प्रणाली का अस्थायी(टेम्पररी) फोल्डर" +01000212="&चालू" +01000213="&निर्दिष्ट:" +01000214="सिर्फ हटाने योग्य(रिमूवेबल) ड्राईव के लिये ही प्रयोग करें" + +01000281="अस्थायी संग्रह फाइल के लिये स्थान निर्दिष्ट करें(बतायें)." + +; System Page +01000300="प्रणाली या तंत्र" +01000301="7-जिप के शेल (कवच) प्रसंग मेनु में जोडें" +01000302="सोपानीकृत(केस्केडेड) प्रसंग मेनु" +01000310="प्रसंग(कोन्टेक्स्ट) मेनु वस्तुएँ:" + +; Language Page +01000400="भाषा" +01000401="भाषा:" + + +; 7-Zip Explorer extension + + +; Context menu +02000101="7-जिप" +02000102="7-जिप आदेश (कमांड्स)" +02000103="संग्रह खोले" +02000104="चयनित संग्रह खोलता है." +02000105="फ़ाइल्स बाहर निकाले..." +02000106="चयनित संग्रह में से फाइले बाहर निकाले ." +02000107="संग्रह में जोड़े..." +02000108="चयनित वस्तुओं को संग्रह में जोड़ता है." +02000109="संग्रह की जाँच करे" +0200010A="चयनित संग्रह की एकसूत्रता जाँचता है." +0200010B="यहीं बाहर निकाले" +0200010C="चयनित संग्रह में से वर्तमान फोल्डर में फाइले बाहर निकाले." +0200010D="{0} में बाहर निकाले" +0200010E="उप-फ़ोल्डर में फ़ाइल्स को बाहर निकाले." +0200010F="{0} में जोड़े" +02000110="चयनित वस्तु को संग्रह में जोड़े." +02000111="दबायें(संकुचन) ओर इमेल करें..." +02000112="चयनित वस्तुओं को संकुचित कर संग्रह में जोड़ता है और संग्रह ई-मेल द्वारा भेजता है." +02000113=" {0} में दबायें ओर ईमेल करें" +02000114="चयनित वस्तुओं को संकुचित कर संग्रह में जोड़ता है और संग्रह ई-मेल द्वारा भेजता है." + + +02000140="<फोल्डर>" +02000141="<संग्रह(आर्चिव)>" + +; Properties +02000203="मार्ग" +02000204="नाम" +02000205="विस्तार" +02000206="फ़ोल्डर" +02000207="आकार" +02000208="कुल आकार" +02000209="विशेषता या गुणधर्म" +0200020A="सर्जित" +0200020B="चलायी गई" +0200020C="परिवर्धित" +0200020D="ठोस" +0200020E="टिप्पणी" +0200020F="गुप्तिकृत" +02000210="के पूर्व विभाजन(टुकडे) करें " +02000211="के बाद विभाजन(टुकडे) करें" +02000212="शब्दकोश" +02000213="सीआरसी" +02000214="प्रकार" +02000215="विरोधी" +02000216="पद्धति" +02000217="यजमान आज्ञावली(ओपरेटिंग सिस्टम)" +02000218="फ़ाइल प्रणाली" +02000219="प्रयोगकर्ता" +0200021A="समूह" +0200021B="रोक या टुकड़े" +0200021C="प्रतिक्रिया" +0200021D="स्थान" +0200021E="मार्ग प्रत्यय" +0200021F="फोल्डर्स" +02000220="फाइल्स" +02000221="संस्करण" +02000222="जत्था" +02000223="अनेक जत्थे" +02000224="ओफसेट" +02000225="कडियाँ" +02000226="टुकड़े" +02000227="जत्थे" + +02000229="64-बिट" +0200022A="बड़ा-एन्डियन" +0200022B="सीपीयू" +0200022C="भौतिक आकार" +0200022D="शीर्षकों के आकार" +0200022E="जाँचयोग" +0200022F="चरित्रताऎं" +02000230="आभासी पता" +02000231="आईडी" +02000232="संक्षिप्त नाम" +02000233="सर्जक अनुप्रयोग" +02000234="सेक्टर का आकार" +02000235="स्थिति" +02000236="कड़ी" + +; Status bar +02000301="{0} चयनित वस्तु(एँ)" +02000302="{0} वस्तु(एँ)" + +02000320="फ़ाइलें:" +02000321="फ़ोल्डर्स:" +02000322="आकार:" +02000323="संकुचित किया आकार:" +02000324="संग्रह:" + +; List Context Menu +02000401="&स्तंभ..." + +02000411="&खोले" +02000412="&बाहर निकाले..." + +; ToolBar +02000501="बाहर निकाले" + +; Messages +02000601="इस संग्रह के लिये अद्यतनीकृत संचालन समर्थित नहीं हैं." +02000602="{0} संग्रह को अद्यतनीकृत नहीं कर सकता" +02000603=" '{0}' फ़ोल्डर सर्जित नहीं कर सकता" +02000604="फाइल समर्थित संग्रह नही है." +02000605="त्रुटि" +02000606="बहुत ज्यादा वस्तुएँ" +02000607="दिये हुए फाइल के नाम के विस्तार के साथ कोई भी सम्बन्धित अनुप्रयोग(प्रोग्राम) नहीं है" +02000608="इनमे कोई भी त्रुटि नहीं है" +02000609="'{0}' फाइल को संग्रह के रूप में नही खोल सकता" +0200060A="'{0}' गुप्तिकृत संग्रह को नही खोल सकता. गलत कूटशब्द?" +0200060B="तंत्र जरूरी मात्रा में मेमोरी(स्मृति) वितरित नही कर सकता है" +0200060C="अज्ञात त्रुटि" +0200060D="असमर्थित संग्रह प्रकार" + +; Dialogs +02000702="ठीक है" +02000705="&हाँ" +02000707="&सभी के लिये हाँ" +02000709="&नहीं" +0200070B="&सभी के लिये नहीं" + +02000710="रद्द" +02000711="&रद्द" +02000713="&बंद करो" +02000714="रूको" +02000715="पुनः शुरु करें" + +02000720="मदद" + +; Extract dialog +02000800="बाहर निकाले" +02000801="&बाहर निकाले:" +02000802="कूटशब्द(पासवर्ड)" + +02000810="मार्ग स्थिति" +02000811="पूरा मार्गनाम" +02000812="वर्तमान मार्गनाम" +02000813="कोई मार्ग नाम नहीं है" + +02000820="अधिलेखन रीत" +02000821="अधिलेखन करने से पहले पूछे" +02000822="बिना पूछे अधिलेखन(पुराने को मिटाना) करें" +02000823="पहले से मौजूद फ़ाइलस को छोड़े" +02000824="स्वचालित पुन: नामकरण" +02000825="पहले से मौजूद फ़ाइलस का स्वचालित(ओटोमेटिक) पुन: नामकरण करे" + +02000830="फ़ाइलें" +02000831="&चयनित फ़ाइलें" +02000832="&सभी फ़ाइलें" + +02000881="बाहर निकाली हुई फ़ाइलों के लिये स्थान निर्दिष्ट करें." + +02000890="बाहर निकाल रहा है" + +; Overwrite dialog +02000900="फ़ाइल प्रतिस्थापन को पक्का करें" +02000901="गन्तव्य फोल्डर में पहले से ही प्रक्रिया हुई फ़ाइल है." +02000902="क्या आप पहले से मौजूद फ़ाइल को बदलना पसंद करेंगे?" +02000903="इसके साथ?" + +02000911="स्वचालित पुन: नामकरण" + +02000982="{0} बाइट्स" +02000983="को परिवर्धित" + +; Messages dialog +02000A00="निदानात्मक संदेश" + +02000A80="संदेश" + +02000A91="'{0}' के लिए असहायक दबाने की पद्धति." +02000A92="डेटा त्रुटि'{0}' में. फ़ाइल टूटी हुई है." +02000A93="'{0}' में सीआरसी असफल. फ़ाइल टूटी हुई है." +02000A94=" '{0}' गुप्तिकृत(एनक्रिप्टेड) फाइल में डेटा त्रुटि. गलत कूटशब्द?" +02000A95=" '{0}'गुप्तिकृत(एनक्रिप्टेड) फाइल में सीआरसी असफल. गलत कूटशब्द?" + +; Password dialog +02000B00="कूटशब्द(पासवर्ड) डाले" +02000B01="कूटशब्द(पासवर्ड) डाले:" +02000B02="&कूटशब्द(पासवर्ड) दिखाओ" +02000B03="कूटशब्द पुनः डाले:" +02000B10="कूटशब्द सहेजे हुए से अलग है" +02000B11="कूटशब्द के लिये सिर्फ़ इंग्लिश वर्णमाला, अंको और विशेष अक्षरों (!, #, $, ...) का ही उपयोग करें" +02000B12="कूटशब्द बहुत ज्यादा बड़ा है" + +; Progress dialog +02000C00="प्रक्रिया" +02000C01="व्यतीत समय:" +02000C02="बाकी बचा समय:" +02000C03="कुल आकार:" +02000C04="गति:" +02000C05="प्रक्रिया किया हुआ:" +02000C06="दबाने(आकार छोटा करने) का अनुपात:" + +02000C10="&पॄष्ठ्भूमि" +02000C11="&अग्रभूमि(डेस्क्टोप)" +02000C12="&विश्राम" +02000C13="&जारी रखे" + +02000C20="विश्रामित" + +02000C30="तुम रद्द करना चाहते हो. तुम्हें यकीन है क्या?" + +; Compress dialog +02000D00="संग्रह में जोड़े" +02000D01="&संग्रह:" +02000D02="&अद्यतनीकरण स्थिति(मोड):" +02000D03="संग्रह &ढाँचा:" +02000D04="&संकुचन विधि:" +02000D05="&ठोस संग्रह तैयार करें" +02000D06="&परिमाप:" +02000D07="विकल्प" +02000D08="&एसएफ़एक्स(SFX) संग्रह तैयार करें" +02000D09="अनेक-सूत्री" +02000D0A="फ़ाइल &नाम गुप्तिकरण करें" +02000D0B="&संकुचन स्तर:" +02000D0C="&शब्दकोश आकार:" +02000D0D="&शब्द आकार:" +02000D0E="संकुचन के लिये स्मृति प्रयोग:" +02000D0F="प्रसारण के लिये स्मृति प्रयोग:" +02000D10="गुप्तिकरण" +02000D11="गुप्तिकरण पद्धति:" +02000D12="सीपीयू सूत्र संख्या:" +02000D13="ठोस टुकडे का आकार:" +02000D14="अ-ठोस" +02000D15="ठोस" +02000D16="साझी फाइलें संकुचित करें" + +02000D40="जत्थों में विभाजन, बाइट्स:" +02000D41="जत्थे का आकार गलत है" +02000D42="निर्देशित जत्था आकार: {0} बाइटस.\n आप संग्रह को ऎसे जत्थों में विभाजित करना चाहते है, क्या आपको यकीन है?" + +02000D81="भण्डारण" +02000D82="साधारण" +02000D83="अधिकतम" +02000D84="तेज" +02000D85="सर्वाधिक तेज" +02000D86="अत्यन्त" + +02000D90="ब्राउज या घूमे" + +02000DA1="फ़ाइलें जोड़े और प्रतिस्थापित करे" +02000DA2="फ़ाइले अद्यतनीकृत करें और जोड़े" +02000DA3="अवस्थित फ़ाइलें ताजा करें" +02000DA4="फाइलें समक्रमण(सिंक्रोनाईज़) करें" + +02000DB1="सभी फ़ाइलें" + +02000DC0="संकुचन कर रहा है" + +; Columns dialog +02000E00="स्तंभ" +02000E01="इस फोल्डर में जो स्तंभ, तुम दिखाई दें ऎसे बनाना चाहते हो उन्हें टिक(चयन) करें. स्तंभो का क्रम बदलने के लिये ऊपर ले जाओ और नीचे ले जाओ बटन(खटके) का उपयोग करें" +02000E02="चयनित स्तंभ" +02000E03="&पिक्सेल(बूँद) चौड़े." + +02000E10="&ऊपर ले जाएँ" +02000E11="&नीचे ले जाएँ" +02000E12="&दिखाये" +02000E13="&छुपाये" +02000E14="सेट(स्थिर)" + +02000E81="शीर्षक" +02000E82="चौड़ाई" + +; Testing +02000F90="परीक्षण" + + +; file Manager + +03000000="7-जिप फ़ाइल प्रबन्धक" + +; Menu +03000102="&फ़ाइल" +03000103="&संपादन" +03000104="&दर्शन" +03000105="&औजार" +03000106="&मदद" +03000107="&मनपसंद" + +; file +03000210="&खोले" +03000211="&अंदर खोले" +03000212="&बाहर खोले" +03000220="&दृश्य" +03000221="&संपादन" +03000230="&पुन: नामकरण" +03000231="&में नकल बनाये..." +03000232="&में ले जायें..." +03000233="&मिटायें" +03000240="&संपत्तियाँ या गुण" +03000241="&टिप्पणी" +03000242="&जाँच योग की गणना करें" +03000243="&अन्तर" +03000250="&फ़ोल्डर तैयार करें" +03000251="&फ़ाइल तैयार करें" +03000260="&निर्गमन" +03000270="&फ़ाइल का विभाजन करें..." +03000271="&फ़ाइल का संयोजन करें..." + +; Edit +03000310="&पुर्वस्थिती(पहले जैसा)" +03000311="&पुनः करें" +03000320="&काटे" +03000321="&नकल करें" +03000322="&चिपकायें" +03000323="&मिटायें" +03000330="&सभी चयन करे" +03000331="&सभी अचयनित करें" +03000332="&चयन उलटा करें" +03000333="चयन करें..." +03000334="अचयन करे..." +03000335="प्रकार द्वारा चयन" +03000336="प्रकार द्वारा अचयन" + +; View +03000410="बड़ी प्रतीक" +03000411="लघु प्रतीक" +03000412="&सूची" +03000413="&वर्णन" +03000420="अवितरित" +03000430="मूल फ़ोल्डर खोले" +03000431="एक स्तर ऊपर चढ़े" +03000432="फ़ोल्डरो का इतिहास..." +03000440="&ताजा करें" +03000449="चौड़ा दृश्य" +03000450="&२ फ़लक" +03000451="&औजार पट्टीयाँ" +03000460="संग्रह उपकरणपट्टी" +03000461="मानक औजार पट्टी" +03000462="बड़े खटके(बटन)" +03000463="खटके(बटन) के शब्द दिखायें" + +; Tools +03000510="&विकल्प..." +03000511="&बेञ्चमार्क(प्रामाणिक तुलना)" + +; Help +03000610="&सामग्री..." +03000620="7-जिप के बारे में..." + +; Favorites +03000710="&फ़ोल्डर मनपसंद में ऎसे जोड़े..." +03000720="पुस्तचिन्ह" + +; Options Dialog + +03010000="विकल्प" + +; Plugins +03010100="प्लगइन(शक्तिदायक)" +03010101="&प्लगइन(शक्तिदायक):" +03010110="विकल्प..." + +; Edit +03010200="संपादक" +03010201="&संपादक:" +03010202="&अन्तर:" + +; System +03010300="प्रणाली या तंत्र" +03010302="संबधित करें 7-जिप के साथ:" +03010310="प्लगइन(शक्तिदायक)" + +; Settings +03010400="व्यवस्थाएँ" +03010401="दिखाओ \"..\"वस्तु" +03010402="वास्तविक फ़ाइल प्रतिमायें दिखाओ" +03010410="तंत्र का मेनु दिखाओ" +03010420="&पूरी पन्क्ति का चयन" +03010421=" &ग्रिड(जाल) रेखा दिखाओ" +03010422="वस्तु खोलने के लिये एक ही(सिंगल)-क्लिक" +03010430="&वैकल्पिक चयन स्थिति" +03010440="&बड़े स्मृति पृष्ठ का प्रयोग करे" + +; Strings + +03020201="नकल" +03020202="ले जायें" +03020203="में नकल:" +03020204="में ले जायें:" +03020205="नकल..." +03020206="ले जा रहा है..." +03020207="ऎसे फोल्डरों के लिये तुम वस्तुओं को हटाना या नकल करना नही कर सकते." +03020208="इस फोल्डर के लिये यह सञ्चालन क्रिया समर्थित नहीं है." +03020209="गन्तव्य फोल्डर चयनित करें." + +03020210="फ़ाइल मिटाये यह पक्का करो" +03020211="फ़ोल्डर मिटायें पक्का करो" +03020212="अनेक फ़ाइल मिटायें पक्का करो" +03020213="क्या तुम्हे यकीन है कि तुम मिटाना चाहते हो '{0}'?" +03020214="क्या तुम्हे यकीन है कि तुम फ़ोल्डर मिटाना चाहते हो '{0}' और इसकी सब सामग्री भी?" +03020215="क्या तुम्हे यकीन है कि तुम मिटाना चाहते हो इन {0} वस्तुओं को?" +03020216="मिटा रहा है..." +03020217="फ़ाइल किंवा फ़ोल्डर मिटाने में त्रुटि" +03020218="तंत्र लंबे मार्ग वाली फाइल को पुनःचक्रण पेटी(रिसाईकल बिन) में नही ले जा सकता है." + +03020220="पुन: नामकरण..." +03020221="फ़ाइल या फ़ोल्डर के पुन: नामकरण में त्रुटि" +03020222="फ़ाइल की नकल करना पक्का करो" +03020223="तुम संग्रह में फाइल की प्रतिलिपि करना चाहते हो क्या तुम्हे यकीन है" + +03020230="फ़ॊल्डर तैयार करें" +03020231="फ़ोल्डर नाम:" +03020232="नया फ़ॊल्डर" +03020233="फ़ोल्डर तैयार करने में त्रुटि" + +03020240="फ़ाइल तैयार करें" +03020241="फ़ाइल नाम:" +03020242="नया फ़ाइल" +03020243="फ़ाइल तैयार करने में त्रुटि" + +03020250="चयन" +03020251="चयन रद्द" +03020252="मुखौटा:" + +03020260="फ़ोल्डरों का इतिहास" + +03020280=" '{0}' फ़ाइल परिवर्धित हुई है.\nक्या तुम संग्रह में इसे अद्यतनीकृत करना चाहते हो?" +03020281="फ़ाइल को अद्यतनीकृत नही कर सकता\n'{0}'" +03020282="संपादक को शुरू नही कर सकता." +03020283="खोल रहा है..." +03020284="यह फाइल एक विषाणु(वायरस) जैसी लगती है(फाइल नाम लंबी खाली जगह नाम में रखता है)." + +03020290="टिप्पणी" +03020291="&टिप्पणी:" + +030202A0="प्रणाली" + +03020300="संगणक" +03020301="सञ्जाल" +03020302="दस्तावेज" + +03020400="जोड़े" +03020401="बाहर निकाले" +03020402="परीक्षण" + +03020420="नकल" +03020421="ले जायें" +03020422="मिटायें" +03020423="सूचना" + +03020500="फ़ाइल का विभाजन करें" +03020501="&में विभाजन:" +03020510="विभाजन कर रहा है..." +03020520="विभाजन करना पक्का करे" +03020521="क्या तुम्हे यकीन है कि तुम फाइल को {0} जत्थों में विभाजित करना चाहते हो?" +03020522="मूल फाइल के आकार की तुलना में जत्थे का आकार छोटा ही होना चाहिए" + +03020600="फ़ाइले संयोजित करें" +03020601="&मेंसंयोजन करे:" +03020610="संयोजन हो रहा है..." +03020620="विभाजित फाइल का सिर्फ़ प्रथम भाग ही चयनित करे" +03020621="फाइल को विभाजित फाइल के भाग के रूप में पहचान नही सकता" +03020622="विभाजित फाइल का एक से ज्यादा भाग नही ढूँढ सकता" + +03020710="जाँचयोग(चेकसम) की गणना कर रहा है..." +03020720="जाँचयोग(चेकसम) माहिती" +03020721="सीआरसी जाँचयोग(चेकसम) आँकड़ों के लिये :" +03020722="सीआरसी जाँचयोग(चेकसम) आँकड़ों और नामों के लिये :" + +03020800="तलाशी(स्कैनिंग) कर रहा है..." + +03020900="गुण या संपत्तियाँ" + +03020A01="जिस फोल्डर का लंबा मार्ग है उससे सञ्चालन क्रिया नही बुलाई जा सकती." +03020A02="तुम्हे एक फाइल का चयन तो करना ही होगा" +03020A03="तुम्हे एक या ज्यादा फाइलों को चुनना ही होगा" +03020A04="फाइल {0} पहले से मौजूद है" + +; Computer +03031100="कुल आकार" +03031101="स्वतन्त्र रिक्तस्थान(खाली जगह)" +03031102="क्लस्टर(समूह) आकार" +03031103="ध्यानाकर्षक(लेबल)" + +; Network +03031200="स्थानिय नाम" +03031201="प्रदायक" + +; Benchmark Dialog + +03080000="(कसौटी चिन्ह)बेञ्चमार्क" +03080001="स्मृति उपयोग:" +03080002="संकुचन कर रहा है" +03080003="प्रसारण हो रहा है" +03080004="गति(वेग)" +03080005="क्रमांकन" +03080006="कुल क्रमांकन" +03080007="वर्तमान" +03080008="परिणाम" +03080009="पास:" +0308000A="त्रुटियाँ:" +0308000B="सीपीयू उपयोग" +0308000C="क्रमांकन / उपयोग" + +;!@LangEnd@! + + diff --git a/GUI/Lang/hr.txt b/GUI/Lang/hr.txt new file mode 100644 index 0000000..75ae6f4 --- /dev/null +++ b/GUI/Lang/hr.txt @@ -0,0 +1,545 @@ +;!@Lang@!UTF-8! +; 7-Zip 3.12 +; Translated by Alan Šimek +; 7-Zip 4.53 +; Corrected and updated by Hasan Osmanagić +; 7-Zip 9.07 beta +; Corrected and updated by Stjepan Treger + +00000000="Croatian" +00000001="Hrvatski" +00000002="26-1" + +; 7-Zip Configuration + +; Title +01000000="7-Zip postavke" + +; Info Page +01000100="O 7-Zip-u" +01000103="7-Zip je besplatan. Međutim, možete podržati daljnji razvoj 7-Zipa registriranjem. Kao registriranom korisniku biti će Vam omogućena tehnička podrška." +01000104="Podrška" +01000105="Registriraj se" + +; Folders Page +01000200="Mape" +01000210="&Radna mapa" +01000211="&Privremena sistemska mapa" +01000212="&Trenutna" +01000213="&Navedena:" +01000214="Koristi samo za izmjenjive diskove" + +01000281="Lokaciju za smještaj privremenih datoteka." + +; System Page +01000300="Sustav" +01000301="Integriraj 7-Zip u padajući kontekstni izbornik" +01000302="Padajući kontekstni izbornik" +01000310="Stavke kontekstnog izbornika:" + +; Language Page +01000400="Jezik" +01000401="Jezik:" + + +; 7-Zip Explorer extension + +; Context menu +02000101="7-Zip" +02000102="7-Zip naredbe" +02000103="Otvori arhiv" +02000104="Otvori izabranu arhiv" +02000105="Raspakiraj datoteke..." +02000106="Raspakiraj datoteke odabrane arhive" +02000107="Dodaj u arhiv..." +02000108="Dodaj izabrane stavke u arhiv" +02000109="Testiraj arhiv" +0200010A="Testiraj integritet odabrane arhive" +0200010B="Raspakiraj ovdje" +0200010C="Raspakiraj podatke iz odabrane arhive u trenutnu mapu" +0200010D="Raspakiraj u {0}" +0200010E="Raspakiraj podatke u pod-mapu" +0200010F="Dodaj u {0}" +02000110="Dodaj odabrane podatke u arhiv" +02000111="Sažimanje i slanje e-poštom" +02000112="Sažimanje odabranih podataka u arhiv i slanje e-poštom" +02000113="Sažimanje u {0} i slanje e-poštom" +02000114="Sažimanje odabranih podataka u arhiv i slanje e-poštom" + +02000140="" +02000141="" + +; Properties +02000203="Putanja" +02000204="Prema nazivu" +02000205="Tip" +02000206="Mapa" +02000207="Prema veličini" +02000208="Sažeta veličina" +02000209="Atributi" +0200020A="Kreirano" +0200020B="Pristupano" +0200020C="Prema mijenjanju" +0200020D="Zbijeno" +0200020E="Komentar" +0200020F="Enkripcija" +02000210="Podjeli prije" +02000211="Podjeli poslije" +02000212="Rječnik" +02000213="CRC" +02000214="Prema tipu" +02000215="Anti" +02000216="Način" +02000217="Glavni OS" +02000218="Sustav datoteka" +02000219="Korisnik" +0200021A="Grupa" +0200021B="Zbijeno" +0200021C="Komentar" +0200021D="Pozicija" +0200021E="U datoteci" +0200021F="Mape" +02000220="Datoteke" +02000221="Inačica" +02000222="Dio" +02000223="Višedijelni" +02000224="Razmak" +02000225="Veza" +02000226="Blokovi" +02000227="Dijelova" + +02000229="64-bitno" +0200022A="Big-endian" +0200022B="CPU" +0200022C="Fizička veličina" +0200022D="Veličina zaglavlja" +0200022E="Kontrolni zbroj" +0200022F="Karakteristike" +02000230="Virtualna adresa" +02000231="Jedinstvena oznaka" +02000232="Kratko ime" +02000233="Aplikacija stvaranja" +02000234="Veličina sektora" +02000235="Način" +02000236="Poveznica" + +; Status bar +02000301="{0} objekt(a) izabrano" +02000302="{0} objekt(a)" + +02000320="Datoteka(e):" +02000321="Mapa(e):" +02000322="Veličina:" +02000323="Sažeta veličina:" +02000324="Arhive:" + +; List Context Menu +02000401="&Stupci..." + +02000411="&Otvori" +02000412="&Raspakiraj..." + +; ToolBar +02000501="Raspakiraj" + +; Messages +02000601="Obnova nije podržana za ovaj arhiv." +02000602="Ne mogu obnoviti arhiv {0}" +02000603="Ne mogu kreirati mapu '{0}'" +02000604="Datoteka nije podržan arhiv." +02000605="Greška" +02000606="Previše stavki" +02000607="Ni jedan program nije vezan uz navedeni tip" +02000608="Nema grešaka" +02000609="Nemoguće otvoriti datoteku '{0}' kao arhiv" +0200060A="Nemoguće otvoriti kriptiranu arhivu '{0}'. Kriva lozinka?" +0200060B="Sustav ne može pripremiti potrebnu količinu memorije" +0200060C="Nepoznata greška" +0200060D="Tip arhive nije podržan" + +; Dialogs +02000702="U redu" +02000705="&Da" +02000707="Da za &Sve" +02000709="&Ne" +0200070B="Ne za Sv&e" + +02000710="Odustajem" +02000711="&Odustajem" +02000713="&Zatvori" +02000714="&Stani" +02000715="Ponovi" + +02000720="Pomoć" + +; Extract dialog +02000800="Raspakiraj" +02000801="&Raspakiraj u:" +02000802="&Lozinka" + +02000810="Putanja mapa" +02000811="Potpuni tokovi" +02000812="Trenutni tokovi" +02000813="Bez tokova" + +02000820="Natpiši postojeće" +02000821="Pitaj prije natpisivanja postojećeg" +02000822="Natpiši postojeće bez upozorenja" +02000823="Preskoči postojeće datoteke" +02000824="Automatska promjena naziva" +02000825="Automatska promjena naziva postojećih datoteka" + +02000830="Datoteke" +02000831="&Izabrane datoteke" +02000832="&Sve datoteke" + +02000881="Lokacija za raspakiranje datoteka." + +02000890="Raspakiranje" + +; Overwrite dialog +02000900="Potvrdite zamjenu datoteka" +02000901="Ciljana mapa već sadrži datoteku koja se trenutno obrađuje." +02000902="Zamijeniti postojeću" +02000903="datoteku s ovom?" + +02000911="A&utomatska promjena naziva" + +02000982="{0} bajte" +02000983="Izmijenjeno" + +; Messages dialog +02000A00="Dijagnostičke poruke" + +02000A80="Poruka" + +02000A91="Nije podržan način sažimanja za '{0}'." +02000A92="Podatkovna greška u '{0}'. Datoteka je neispravna." +02000A93="CRC greška u '{0}'. Datoteka je neispravna." +02000A94="Greška u kriptiranoj datoteci '{0}'. Kriva lozinka?" +02000A95="CRC greška u kriptiranoj datoteci '{0}'. Kriva lozinka?" + +; Password dialog +02000B00="Unesite lozinku" +02000B01="Unesite lozinku:" +02000B02="&Prikaži lozinku" +02000B03="Ponovite lozinku:" +02000B10="Lozinka nije jednaka" +02000B11="Koristite samo engleska slova, brojeve i specijalne znake (!, #, $, ...) za lozinku" +02000B12="Lozinka je preduga" + +; Progress dialog +02000C00="Obrada" +02000C01="Utrošeno vrijeme:" +02000C02="Preostalo vrijeme:" +02000C03="Veličina:" +02000C04="Brzina:" +02000C05="Obrađeno:" +02000C06="Omjer kompresije:" + +02000C10="U pozadini" +02000C11="U prvom planu" +02000C20="&Pauza" +02000C13="Nastavi" + +02000C20="Pauza" + +02000C30="Poništiti?" + +; Compress dialog +02000D00="Dodavanje u arhiv ili stvaranje novog arhiva" +02000D01="&Arhiv:" +02000D02="&Način obnove:" +02000D03="&Format arhiva:" +02000D04="&Metoda sažimanja:" +02000D05="Kreiraj &zbijeni arhiv" +02000D06="&Parametri:" +02000D07="&Mogućnosti" +02000D08="Kreiraj E&XE arhiv" +02000D09="Višenitnost" +02000D0A="Enkripcija naziva datoteka" +02000D0B="Stupanj sažimanja" +02000D0D="Veličina rječnika:" +02000D0D="&Veličina riječi:" +02000D0E="Korištenje memorije za sažimanje:" +02000D0F="Korištenje memorije za raspakiranje:" +02000D10="Kriptiranje" +02000D11="Metoda kriptiranja:" +02000D12="Broj niti u CPU:" +02000D13="Veličina bloka u zbijenom:" +02000D14="Bez-zbijanja" +02000D15="Zbijeno" +02000D16="Sažmi i datoteke u upotrebi" + +02000D40="Razdvajanje na dijelove, bajta:" +02000D41="Netočna veličina bloka" +02000D42="Veličina bloka: {0} bajtova.\nJeste li sigurni da želite podijeliti u takve dijelove?" + +02000D81="Bez sažimanja" +02000D82="Uobičajeno" +02000D83="Najjače" +02000D84="Brzo" +02000D85="Vrlo brzo" +02000D86="Ultra" + +02000D90="Traži" + +02000DA1="Dodaj i zamjeni datoteke" +02000DA2="Obnovi i dodaj datoteke" +02000DA3="Osvježi postojeće datoteke" +02000DA4="Sinkroniziraj datoteke" + +02000DB1="Sve datoteke" + +02000DC0="Sažimanje u arhiv" + +; Columns dialog +02000E00="Stupci" +02000E01="Označavanje vidljivih stupaca u ovom pogledu. Koristite tipke Page UP i Page Down za uređivanje stupaca po vlastitom izboru." +02000E02="Odabrani stupac treba biti" +02000E03="točaka širo&k." + +02000E10="Pomakni &Gore" +02000E11="Pomakni &Dolje" +02000E12="&Prikaži" +02000E13="&Skriveno" +02000E14="Postavi" + +02000E81="Naslov" +02000E82="Širina" + +; Testing +02000F90="Testiranje" + + +; File Manager + +03000000="7-Zip upravljač datoteka" + +; Menu +03000102="&Datoteke" +03000103="&Uređivanje" +03000104="&Izgled" +03000105="&Alati" +03000106="&Pomoć" +03000107="Omiljene mape" + +; File +03000210="&Otvori" +03000211="Ot&vori mapu" +03000212="Otvori u &sustavu" +03000220="Iz&gled" +03000221="&Uređivanje" +03000230="Prei&menuj" +03000231="&Kopiraj u..." +03000232="Premje&sti u..." +03000233="O&briši" +03000240="Svojs&tva" +03000241="Komentar" +03000242="Izračun kontrolnog zbroja" +03000243="Uspoređivanje" +03000250="Stvo&ri mapu" +03000251="Stvori &datoteku" +03000260="&Izlaz" +03000270="Podije&li datoteku..." +03000271="Spo&ji datoteke..." + +; Edit +03000310="&Poništi" +03000311="Po&novi" +03000320="Od&reži" +03000321="&Kopiraj" +03000322="&Zalijepi" +03000323="O&briši" +03000330="Odaberi &sve" +03000331="Poništi odabir" +03000332="&Obrni odabir" +03000333="Odaberi..." +03000334="Poništi odabir..." +03000335="Odabir po tipu" +03000336="Poništi odabir tipa" + +; View +03000410="&Velike ikone" +03000411="&Male ikone" +03000412="&Popis" +03000413="&Detalji" +03000420="Neso&rtirano" +03000430="&Korijen" +03000431="&Nadmapa" +03000432="Proš&le mape..." +03000440="O&svježi" +03000449="Sadržaj mapa" +03000450="&2 okna" +03000451="Alatne &trake" +03000460="Alatna traka arhiva" +03000461="Standardna alatna traka" +03000462="Velike tipke" +03000463="Prikaži tekst" + +; Tools +03000510="&Mogućnosti..." +03000511="M&jerenje" + +; Help +03000610="&7-Zip pomoć..." +03000620="&O programu..." + +; Favorites +03000710="Dodaj u popis omiljenih uz" +03000720="prečicu" + +; Options Dialog + +03010000="Mogućnosti" + +; Plugins +03010100="Dodaci" +03010101="&Dodaci:" +03010110="Mogućnosti..." + +; Edit +03010200="Uređivač" +03010201="&Program za uređivanje:" +03010202="Program za uspoređivanje:" + +; System +03010300="Sustav" +03010302="Poveži 7-Zip sa:" +03010310="Dodatak" + +; Settings +03010400="Postavke" +03010401="Nadmapa \"..\" " +03010402="Prikaži prave ikone datoteka" +03010410="Prikaži sistemski izbornik" +03010420="&Označi cijeli redak" +03010421="Prikaži &linije mreže" +03010422="Jedan klik za otvaranje stavke" +03010430="Drugi n&ačin označavanja" +03010440="Koristi raspo&loživu memoriju" + +; Strings + +03020201="Kopiraj" +03020202="Premjesti" +03020203="Kopiraj u:" +03020204="Premjesti u:" +03020205="Kopiranje u tijeku..." +03020206="Premještanje u tijeku..." +03020207="Nije moguće pomaknuti ili kopirati podatke ove mape." +03020208="Operacija nije podržana." +03020209="Odabir odredišne mape." + +03020210="Potvrdite brisanje datoteke" +03020211="Potvrdite brisanje mape" +03020212="Potvrdite višestruko brisanje datoteka" +03020213="Obrisati '{0}'?" +03020214="Obrisati mapu '{0}' i sav njezin sadržaj?" +03020215="Obrisati ove {0} podatke?" +03020216="Brisanje u tijeku..." +03020217="Greška pri brisanju datoteke ili mape" +03020218="Sustav ne može premjestiti datoteku sa dugačkom putanjom u Kantu za recikliranje" + +03020220="Preimenovanje u tijeku..." +03020221="Greška pri preimenovanju datoteke ili mape" +03020222="Potvrdite kopiranje datoteka" +03020223="Kopiranje datoteka u arhiv?" + +03020230="Kreiraj mapu" +03020231="Naziv mape:" +03020232="Nova mapa" +03020233="Greška pri kreiranju mape" + +03020240="Kreiraj datoteku" +03020241="Naziv datoteke:" +03020242="Nova datoteka" +03020243="Greška pri kreiranju datoteka" + +03020250="Odaberi" +03020251="Poništi odabir" +03020252="Maska:" + +03020260="Kronologija mapa" + +03020280="Datoteka '{0}' je izmijenjena.\nObnoviti arhiv?" +03020281="Nije moguće obnoviti datoteku\n'{0}'" +03020282="Nije moguće započeti uređivanje." +03020283="Otvaranje u tijeku..." +03020284="Datoteka izgleda kao virus (naziv datoteke sadrži dugačke razmake)." + +03020291="Komentar" +03020291="&Komentar:" + +030202A0="Sustav" + +03020300="Računalo" +03020301="Mreža" +03020302="Dokumenti" + +03020400="Dodaj" +03020401="Raspakiraj" +03020402="Testiraj" + +03020420="Kopiraj" +03020421="Premjesti" +03020422="Obriši" +03020423="Svojstva" + +03020500="Podijeli datoteku" +03020501="&Podijeli u:" +03020510="Dioba..." +03020520="Potvrdite diobu" +03020521="Podijeliti datoteku u {0} dijelova?" +03020522="Veličina diobenog dijela mora biti manja od izvorne datoteke" + +03020600="Spoji datoteke" +03020601="&Spoji u:" +03020610="Spajanje..." +03020620="Označite samo prvu datoteku" +03020621="Nije pronađena datoteka koja je dio razdijeljenih datoteka" +03020622="Pronađena samo jedna datoteka od razdijeljenih datoteka" + +03020710="Izračunavanje kontrolnog zbroja..." +03020720="Info kontrolni zbroj" +03020721="CRC kontrolni zbroj za podatke:" +03020722="CRC kontrolni zbroj za podatke i nazive:" + +03020800="Skeniram..." + +03020900="Svojstva" + +03020A01="Operaciju nemoguće pozvati iz mape koja ima dugačku putanju." +03020A02="Morate obilježiti jednu datoteku" +03020A03="Morate obilježiti jednu ili više datoteka" +03020A04="Datoteka {0} već postoji" + +; Computer +03031100="Ukupni kapacitet" +03031101="Slobodni prostor" +03031102="Veličina klastera" +03031103="Naziv" + +; Network +03031200="Lokalni naziv" +03031201="Pružatelj" + +; Benchmark Dialog + +03080000="Mjerenje" +03080001="Korištenje memorije:" +03080002="Sažimanje" +03080003="Raspakiranje" +03080004="Brzina" +03080005="Ocjena" +03080006="Ukupna ocjena" +03080007="Trenutno" +03080008="Rezultat" +03080009="Prolazi:" +0308000A="Greške:" +0308000B="CPU zauzeće" +0308000C="Ocjena / Zauzeće" + +;!@LangEnd@! + + diff --git a/GUI/Lang/hu.txt b/GUI/Lang/hu.txt new file mode 100644 index 0000000..a690610 --- /dev/null +++ b/GUI/Lang/hu.txt @@ -0,0 +1,543 @@ +;!@Lang@!UTF-8! +; 7-Zip 9.16 beta +; Translated by Nyilas MISY +; +; +; +; + +00000000="Hungarian" +00000001="Magyar" +00000002="14" + +; 7-Zip Configuration + +; Title +01000000="7-Zip beállítása" + +; Info Page +01000100="A 7-Zip névjegye" +01000103="A 7-Zip ingyenes szoftver. Ha elnyerte a tetszését, s mégis szeretné támogatni a további fejlesztését, regisztrálja 20 USD áron, fizethet hitelkártyával vagy más módon." +01000104="Támogatás" +01000105="Regisztráció" + +; Folders Page +01000200="Mappák" +01000210="&Munkamappa" +01000211="A &rendszer ideiglenes mappája" +01000212="&Jelenlegi" +01000213="&Meghatározott:" +01000214="Csak cserélhető meghajtókhoz" + +01000281="Válassza ki az ideiglenes archív fájlok mappáját." + +; System Page +01000300="Rendszer" +01000301="7-Zip hozzáadása a parancsértelmező helyi menüjéhez" +01000302="Lépcsőzetes helyi menü" +01000310="Helyi menü elemek:" + +; Language Page +01000400="Nyelv" +01000401="Nyelv:" + + +; 7-Zip Explorer extension + +; Context menu +02000101="7-Zip" +02000102="7-Zip parancsok" +02000103="Archívum megnyitása" +02000104="Megnyitja a kijelölt archívumot." +02000105="Fájlok kibontása..." +02000106="Kibontja a fájlokat a kijelölt archívumból." +02000107="Hozzáad az archívumhoz..." +02000108="Behelyezi a kijelölt elem(ek)et az archívumba." +02000109="Archívum tesztelése" +0200010A="Ellenőrzi a kijelölt archívum állapotát." +0200010B="Kibontás ide" +0200010C="Fájlok kibontása a kijelölt archívumból a jelenlegi mappába." +0200010D="Kibontás ide: {0}" +0200010E="A fájlok kibontása almappába." +0200010F="Hozzáadás: {0}" +02000110="Archívumba helyezi a kijelölt elemeket." +02000111="Tömörítés és küldés..." +02000112="Archívumba tömöríti a kijelölt elemeket és e-mailben elküldi az archívumot." +02000113="Tömörítés {0} archívumba és küldés" +02000114="Archívumba tömöríti a kijelölt elemeket és e-mailben elküldi az archívumot." + +02000140="" +02000141="" + +; Properties +02000203="Útvonal" +02000204="Név" +02000205="Kiterjesztés" +02000206="Mappa" +02000207="Méret" +02000208="Tömörített méret" +02000209="Attribútumok" +0200020A="Létrehozva" +0200020B="Hozzáférés" +0200020C="Módosítva" +0200020D="Tömör" +0200020E="Megjegyzés" +0200020F="Titkosított" +02000210="Feldarabolás előtt" +02000211="Feldarabolás után" +02000212="Szótár" +02000213="CRC" +02000214="Típus" +02000215="Anti" +02000216="Módszer" +02000217="Gazda OS" +02000218="Fájlrendszer" +02000219="Felhasználó" +0200021A="Csoport" +0200021B="Blokk" +0200021C="Megjegyzés" +0200021D="Pozíció" +0200021E="Útvonal előtag" +0200021F="Mappák" +02000220="Fájlok" +02000221="Verzió" +02000222="Kötet" +02000223="Többkötet" +02000224="Eltolás" +02000225="Linkek" +02000226="Blokkok" +02000227="Kötetek" + +02000229="64-bit" +0200022A="Big-endian" +0200022B="CPU" +0200022C="Fizikai méret" +0200022D="Fejlécek mérete" +0200022E="Checksum" +0200022F="Karakterisztika" +02000230="Virtuális cím" +02000231="ID" +02000232="Név rendezése" +02000233="Alkalmazás készítője" +02000234="Szakasz mérete" +02000235="Mód" +02000236="Link" + +; Status bar +02000301="{0} objektum kijelölve" +02000302="{0} objektum" + +02000320="Fájlok:" +02000321="Mappák:" +02000322="Méret:" +02000323="Tömörített méret:" +02000324="Archívumok:" + +; List Context Menu +02000401="&Oszlopok..." + +02000411="M&egnyitás" +02000412="&Kibontás..." + +; ToolBar +02000501="Kibontás" + +; Messages +02000601="Az aktualizálás ennél az archívumtípusnál nem támogatott." +02000602="A(z) {0} archívum nem aktualizálható" +02000603="A(z) '{0}' mappát nem lehet létrehozni" +02000604="A fájl nem támogatott archívum." +02000605="Hiba" +02000606="Túl sok elem" +02000607="Nem társított alkalmazást az adott fájlkiterjesztéshez" +02000608="Az archívum hibamentes" +02000609="A(z) '{0}' fájl nem nyitható meg archívként" +0200060A="A(z) '{0}' titkosított archívum nem megnyitható. Hibás a jelszó?" +0200060B="A rendszer nem tudja lefoglalni a szükséges memóriát" +0200060C="Ismeretlen hiba" +0200060D="Nem támogatott archívum típus" + +; Dialogs +02000702="OK" +02000705="&Igen" +02000707="I&gen, mindre" +02000709="&Nem" +0200070B="N&em, mindre" + +02000710="Mégsem" +02000711="&Mégsem" +02000713="&Bezárás" +02000714="Leállítás" +02000715="Újraindítás" + +02000720="Súgó" + +; Extract dialog +02000800="Kibontás" +02000801="&Kibontás ide:" +02000802="Jelszó" + +02000810="Útvonal" +02000811="Teljes útvonal" +02000812="Jelenlegi útvonal" +02000813="Nincs útvonal" + +02000820="Felülírás" +02000821="Rákérdezés felülírás előtt" +02000822="Felülírás rákérdezés nélkül" +02000823="A létező fájlok kihagyása" +02000824="Automatikus átnevezés" +02000825="A létező fájlok automatikus átnevezése" + +02000830="Fájlok" +02000831="&Kijelölt fájlok" +02000832="&Minden fájl" + +02000881="Határozza meg a kibontott fájlok tárolómappáját." + +02000890="Kibontás" + +; Overwrite dialog +02000900="Fájlcsere megerősítése" +02000901="A célmappa már tartalmazza a feldolgozott fájlt." +02000902="Kívánja lecserélni a létező fájlt" +02000903="ezzel a fájllal?" + +02000911="A&utomatikus átnevezés" + +02000982="{0} bájt" +02000983="módosítva" + +; Messages dialog +02000A00="Diagnosztikai üzenetek" + +02000A80="Üzenet" + +02000A91="A(z) '{0}' tömörítési módja nem támogatott." +02000A92="Adathiba a következőben: '{0}'. A fájl sérült." +02000A93="CRC-hiba a következőben: '{0}'. A fájl sérült." +02000A94="Adathiba a titkosított fájlban: '{0}'. Hibás a jelszó?" +02000A95="CRC-hiba a titkosított fájlban: '{0}'. Hibás a jelszó?" + +; Password dialog +02000B00="Jelszó beírása" +02000B01="Írja be a jelszót:" +02000B02="A &jelszó megjelenítése" +02000B03="Jelszó újbóli beírása:" +02000B10="Jelszavak nem egyeznek" +02000B11="Csak ékezetmentes karaktereket, számokat és speciális karaktereket (!, #, $, ...) használjon a jelszavaknak" +02000B12="A jelszó túl hosszú" + +; Progress dialog +02000C00="Folyamat" +02000C01="Eltelt idő:" +02000C02="Hátralévő idő:" +02000C03="Méret:" +02000C04="Sebesség:" +02000C05="Feldolgozott:" +02000C06="Tömörítési arány:" + +02000C10="&Háttérben" +02000C11="&Előtérben" +02000C12="&Szünet" +02000C13="&Folytatás" + +02000C20="Szünet" + +02000C30="Biztos, hogy megszakítja a folyamatot?" + +; Compress dialog +02000D00="Behelyezés archívumba" +02000D01="&Archívum:" +02000D02="Akt&ualizálás módja:" +02000D03="Arcíhvum &formátuma:" +02000D04="Tömörítés &módja:" +02000D05="&Tömör archívum létrehozása" +02000D06="&Tulajdonságok:" +02000D07="Beállítások" +02000D08="SF&X archívum létrehozása" +02000D09="Többszálas" +02000D0A="Fájlnevek &titkosítása" +02000D0B="Tömörítés &foka:" +02000D0C="&Címtár mérete:" +02000D0D="&Szó mérete:" +02000D0E="A tömörítés memóriahasználata:" +02000D0F="A kitömörítés memóriahasználata:" +02000D10="Titkosítás" +02000D11="Titkosítási eljárás:" +02000D12="CPU számok:" +02000D13="Tömör blokk méret:" +02000D14="Nem tömör" +02000D15="Tömör" +02000D16="Megosztott fájlok tömörítése" + +02000D40="Darabolás &kötetekre, bájt:" +02000D41="Hibás kötet méret" +02000D42="A megadott kötet mérete: {0} byte.\nBiztos fel akarja darabolni az archívumot ilyen kötetre?" + +02000D81="Raktár" +02000D82="Normál" +02000D83="Legnagyobb" +02000D84="Gyors" +02000D85="Leggyorsabb" +02000D86="Ultra" + +02000D90="Tallózás" + +02000DA1="Fájlok behelyezése és cseréje" +02000DA2="Fájlok aktualizálása és behelyezése" +02000DA3="Létező fájlok frissítése" +02000DA4="Fájlok szinkronizálása" + +02000DB1="Minden fájl" + +02000DC0="Tömörítés" + +; Columns dialog +02000E00="Oszlopok" +02000E01="Jelölje be azokat az oszlopokat melyeket ebben a nézetben megjeleníteni kíván. A Fel és a Le gombbal tetszés szerint átrendezheti az oszlopokat." +02000E02="A kijelölt oszlop legyen " +02000E03="képpont &széles." + +02000E10="&Fel" +02000E11="&Le" +02000E12="&Megjelenítés" +02000E13="&Elrejtés" +02000E14="Beállítás" + +02000E81="Cím" +02000E82="Széles" + +; Testing +02000F90="Tesztelés" + + +; File Manager + +03000000="7-Zip fájlkezelő" + +; Menu +03000102="&Fájl" +03000103="S&zerkesztés" +03000104="&Nézet" +03000105="&Eszközök" +03000106="&Súgó" +03000107="Ked&vencek" + +; File +03000210="M&egnyitás" +03000211="Megnyitás &belül" +03000212="Megnyitás kí&vül" +03000220="&Nézet" +03000221="S&zerkesztés" +03000230="Átn&evezés" +03000231="Más&olás mappába..." +03000232="Át&helyezés mappába..." +03000233="&Törlés" +03000240="T&ulajdonságok" +03000241="&Megjegyzés" +03000242="Checksum számolása" +03000243="Különbség" +03000250="Mappa létrehozása" +03000251="Fájl létrehozása" +03000260="&Kilépés" +03000270="Fájl&darabolás..." +03000271="Fájl&egyesítés..." + +; Edit +03000310="&Visszavonás" +03000311="&Ismét" +03000320="&Kivágás" +03000321="&Másolás" +03000322="&Beillesztés" +03000323="&Törlés" +03000330="Min&d kijelölése" +03000331="Kijelölés megszüntetése" +03000332="Kijelölés &megfordítása" +03000333="Kijelölés..." +03000334="Megszüntetés..." +03000335="Kijelölés típus alapján" +03000336="Megszüntetés típus alapján" + +; View +03000410="&Nagy ikonok" +03000411="&Kis ikonok" +03000412="&Lista" +03000413="&Részletek" +03000420="Rendezetlen" +03000430="Gyökérmappa megnyitása" +03000431="Egy szinttel feljebb" +03000432="Mappa előzmények..." +03000440="&Frissítés" +03000449="Lapos ikonok" +03000450="&2 panel" +03000451="&Eszköztárak" +03000460="Archiválás eszköztár" +03000461="Szokásos eszköztár" +03000462="Nagy gombok" +03000463="Szövegcímkék megjelenítése" + +; Tools +03000510="&Beállítások..." +03000511="&Teljesítménymérés" + +; Help +03000610="&Tartalomjegyzék..." +03000620="7-Zip &névjegye..." + +; Favorites +03000710="Mappa &hozzáadása a Kedvencekhez mint" +03000720="Könyvjelző" + +; Options Dialog + +03010000="Beállítások" + +; Plugins +03010100="Beépülő modulok" +03010101="&Beépülő modulok:" +03010110="Beállítások..." + +; Edit +03010200="Szerkesztő" +03010201="&Szerkesztő:" +03010202="&Különbség:" + +; System +03010300="Rendszer" +03010302="7-Zip társítása:" +03010310="Beépülő modul" + +; Settings +03010400="Beállítások" +03010401="A \"..\" elem látható" +03010402="Az eredeti fájlikonok láthatók" +03010410="Látható a rendszermenü" +03010420="&Teljes soros kijelölés" +03010421="&Rácsvonalak kijelzése" +03010422="Elem megnyitása egyszeres kattintással" +03010430="&Alternativ kiválasztási mód" +03010440="&Nagy memória haszálata" + +; Strings + +03020201="Másolás" +03020202="Áthelyezés" +03020203="Másolás ide:" +03020204="Áthelyezés ide:" +03020205="Másolás..." +03020206="Áthelyezés..." +03020207="Ilyen mappák esetén az elemek nem helyezhetők át vagy másolhatók." +03020208="A művelet nem támogatott." +03020209="Válassza ki a cél mappát." + +03020210="Fájltörlés megerősítése" +03020211="Mappatörlés megerősítése" +03020212="Több fájltörlés megerősítése" +03020213="Biztos, hogy törölni akarja a következőt: '{0}'?" +03020214="Biztos, hogy törölni akarja a(z) '{0}' mappát és annak teljes tartalmát?" +03020215="Biztos, hogy törölni akarja ezt a(z) {0} elemet?" +03020216="Törlés..." +03020217="Hiba történt a fájl vagy a mappa törlésekor" +03020218="A rendszer nembírja mozgatni a fájlt a hosszú útvonallal a Lomtárba" + +03020220="Átnevezés..." +03020221="Hiba történt a fájl vagy a mappa átnevezésekor" +03020222="Fájl másolásának megerősítése" +03020223="Biztos, hogy fájl(oka)t akar másolni az archívumba?" + +03020230="Mappa létrehozása" +03020231="Mappa neve:" +03020232="Új mappa" +03020233="Hiba történt a mappa létrehozásakor" + +03020240="Fájl létrehozása" +03020241="Fájlnév:" +03020242="Új fájl" +03020243="Hiba történt a fájl létrehozásakor" + +03020250="Kijelölés" +03020251="Megszüntetés" +03020252="Maszk:" + +03020260="Mappa előzmények" + +03020280="'{0}'\nA fájl tartalma megváltozott.\nKívánja aktualizálni az archívumban?" +03020281="A fájl nem aktualizálható:\n'{0}'" +03020282="A szerkesztő nem indítható." +03020283="Megnyitás..." +03020284="A fájl vírusnak néz ki (a fájlnév hosszú szóközt tartalmaz a nevében)." + +03020290="Megjegyzés" +03020291="&Megjegyzés:" + +030202A0="Rendszer" + +03020300="Sajátgép" +03020301="Hálózati helyek" +03020302="Dokumentumok" + +03020400="Hozzáadás" +03020401="Kibontás" +03020402="Teszt" + +03020420="Másolás" +03020421="Áthelyezés" +03020422="Törlés" +03020423="Tulajdonságok" + +03020500="Fájldarabolás" +03020501="&Darabolás ide:" +03020510="Darabolás..." +03020520="Darabolás megerősítése" +03020521="Biztos szét akarja darabolni a fájlt {0} kötetre?" +03020522="Kötet méretének kissebbnek kell lennie, mint az eredeti fájl mérete" + +03020600="Fájlegyesítés" +03020601="&Egyesítés ide:" +03020610="Egyesítés..." +03020620="Csak az első rész kiválasztása a darabolt fájlból" +03020621="Nem ismeri fel a fájlt, mint darabolt fájl része" +03020622="Nem talál egynél több részt a darabolt fájlból" + +03020710="Leírás számolása..." +03020720="Leírás információ" +03020721="CRC leírás az adathoz:" +03020722="CRC leírás az adathoz és névhez:" + +03020800="Vizsgálat..." + +03020900="Tulajdonságok" + +03020A01="A művelet nem hívható meg abból a mappából amelynek hosszú az elérési útvonala." +03020A02="Egy fájlt ki kell jelölnie!" +03020A03="Egy vagy több fájlt ki kell jelölnie" +03020A04="A(z) {0} fájl már létezik" + +; Computer +03031100="Teljes méret" +03031101="Szabad terület" +03031102="Kluszterméret" +03031103="Címke" + +; Network +03031200="Helyi név" +03031201="Szolgáltató" + +; Benchmark Dialog + +03080000="Teljesítménymérés" +03080001="Memóriahasználat:" +03080002="Tömörítés" +03080003="Kitömörítés" +03080004="Sebesség" +03080005="Értékelés" +03080006="Összértékelés" +03080007="Jelenlegi" +03080008="Eredmény" +03080009="Menetek:" +0308000A="Hibák:" +0308000B="CPU használata" +0308000C="Becslés / Használat" + +;!@LangEnd@! diff --git a/GUI/Lang/hy.txt b/GUI/Lang/hy.txt new file mode 100644 index 0000000..7d0238c --- /dev/null +++ b/GUI/Lang/hy.txt @@ -0,0 +1,534 @@ +;!@Lang@!UTF-8! +; 7-Zip 4.65 +; Translated by Hrant Ohanyan http://www.heyerensoft.narod.ru +; +; +; +; + +00000000="Armenian" +00000001="Հայերեն" +00000002="43" + +; 7-Zip Configuration + +; Title +01000000="7-Zip - Կազմաձևում" + +; Info Page +01000100="7-Zip ծրագրի մասին" +01000103="7-Zip հանդիսանում է ազատ տարածվող ծրագիր: Սակայն եթե գանկանում եք աջակցել 7-Zip-ի զարգացմանը Դուք կարող եք գրանցել ծրագիրը:" +01000104="Աջակցել" +01000105="Գրանցել" + +; Folders Page +01000200="Թղթապանակներ" +01000210="&Աշխատանքային թղթապանակ" +01000211="&Համակարգային ժամանակավոր թղթապանակ" +01000212="&Ընթացիկ" +01000213="&Նշանակել." +01000214="Օգտագործել միայն շարժական կրիչների համար" + +01000281="Նշեք ժամանակավոր արխիվների համար տեղ" + +; System Page +01000300="Համակարգ" +01000301="Ներդնել 7-Zip-ը համատեքստային ընտրացանկում" +01000302="Կասկադային համատեքստային ընտրացանկ" +01000310="Համատեքստային ընտրացանկի բաղադրիչները" + +; Language Page +01000400="Լեզուն" +01000401="Լեզուն." + + +; 7-Zip Explorer extension + +; Context menu +02000101="7-Zip" +02000102="7-Zip-ի հրամանները" +02000103="Բացել արխիվը" +02000104="Բացել նշված արխիվը" +02000105="Բացել" +02000106="Նշված արխիվից ֆայլերի հանում" +02000107="Ավելացնել արխիվին..." +02000108="Ընդգրկել ընտրված ֆայլերը արխիվում" +02000109="Թեսթավորում" +0200010A="Թեսթավորել ընտրված արխիվը" +0200010B="Բացել այստեղ" +0200010C="Ընտրված արխիվից ֆայլերը բացել տվյալ թղթապանակում:" +0200010D="Բացել{0}-ում" +0200010E="Բացել ֆայլերը ենթամատյանում" +0200010F="Ավելացնել {0}-ին" +02000110="Ավելացնել ընտրված ֆայլերը արխիվին" +02000111="Սեղմել և ուղարկել email-ով..." +02000112="Սեղմել ընտրված ֆայլերը և ուղարկել արխիվը email-ով" +02000113="Սեղմել {0}-ում և ուղարկել email-ով" +02000114="Սեղմել ընտրված ֆայլերը և ուղարկել email-ով:" + +02000140="«Թղթապանակ»" +02000141="«Արխիվ»" + +; Properties +02000203="Ճանապարհը" +02000204="Անունը" +02000205="Ընդլայնումը" +02000206="Թղթապանակ" +02000207="Չափը" +02000208="Սեղմված" +02000209="Հատկություններ" +0200020A="Ստեղծվել է " +0200020B="Բացել" +0200020C="Փոփոխվել է" +0200020D="Անընդհատ" +0200020E="Մեկնաբանություններ" +0200020F="Կոդավորված է" +02000210="Բաժանված է մինչ" +02000211="Բաժանված է" +02000212="Բառարան" +02000213="CRC" +02000214="Տեսակը" +02000215="Հակա" +02000216="Մեթոդը" +02000217="Համակարգը" +02000218="Ֆայլային համակարգ" +02000219="Օգտագործող" +0200021A="Խումբ" +0200021B="Կողփում" +0200021C="Մեկնաբանություններ" +0200021D="Դիրքը" +0200021E="Ճանապարհը" +0200021F="Թղթապանակներ" +02000220="Ֆայլեր" +02000221="Տարբերակը" +02000222="Չափը" +02000223="Բազմահատոր" +02000224="Տեղափոխում" +02000225="Հղումներ" +02000226="Հատվածներ" +02000227="Հատորներ" + +02000229="64-bit" +0200022A="Big-endian" +0200022B="CPU" +0200022C="Ֆիզիկական չափը" +0200022D="Գլխագրերի չափը" +0200022E="Գումարը" +0200022F="Բնութագրություններ" +02000230="Վիրտուալ հասցեն" + +; Status bar +02000301="Ընտրված են {0} ֆայլեր" +02000302="{0} ֆայլ(եր)" + +02000320="Ֆայլեր." +02000321="Թղթապանակներ." +02000322="Չափը." +02000323="Սեղմված չափը." +02000324="Արխիվներ." + +; List Context Menu +02000401="&Սյուներ..." + +02000411="&Բացել" +02000412="&Հանել..." + +; ToolBar +02000501="Հանել" + +; Messages +02000601="Փոփոխման գործողությունը այս արխիվը չի աջակցում:" +02000602="Հնարավոր չեղավ փոփոխել {0} արխիվը" +02000603="Հնարավոր չէ ստեղծել '{0}' թղթապանակը:" +02000604="Տվյալ ֆայլը արխիվ չէ" +02000605="Սխալ" +02000606="Շատ են էլեմենտները" +02000607="Չկա ասոցացված ծրագիր" +02000608="Սխալներ չկան" +02000609="Հնարավոր չէ բացել '{0}' ֆայլը որպես արխիվ" +0200060A="Հնարավոր չէ բացել '{0}' կողփված արխիվը:Մուտքագրեք գաղտնաբառը:" +0200060B="Բավարար չէ ազատ տեղը" +0200060C="Անհայտ սխալ" +0200060D="Արխիվի չաջակցվող ձևաչափ" + +; Dialogs +02000702="ԼԱՎ" +02000705="&Այո" +02000707="Այո բոլորի &համար" +02000709="&Ոչ" +0200070B="Ոչ բոլորի &համա" + +02000710="Մերժել" +02000711="&Մերժել" +02000713="&Փակել" +02000714="Կանգնեցնել" +02000715="Վերաբեռնել" + +02000720="Օգնություն" + +; Extract dialog +02000800="Հանել" +02000801="&Բացել." +02000802="&Գաղտնագիրը." + +02000810="Ճանապարհ" +02000811="Ամբողջական& ճանապարհ" +02000812="Հա&րաբերական ճանապարհ" +02000813="&Առանց ճանապարհների" + +02000820="Վերագրանցում" +02000821="&Հաստատմամբ" +02000822="Ա&ռանց հաստատման" +02000823="Բաց &թողնել" +02000824="Անվանափոխել" +02000825="Անվանափոխել ինքնուրույնաբար" + +02000830="Ֆայլեր" +02000831="Ընտրված ֆայլեր" +02000832="Բոլոր ֆայլերը" + +02000881="Նշեք հանվող ֆայլերի տեղադրությունը:" + +02000890="Բացվում է" + +; Overwrite dialog +02000900="Հաստատեք ֆայլի փոխարինումը" +02000901="Թղթապանակում արդեն կա մշակված ֆայլ:" +02000902="Փոխարինե՞լ ֆայլը" +02000903="տվյալ ֆայլով:" + +02000911="Անվանափոխել ինքն." + +02000982="{0} բայթ" +02000983="փոփոխված" + +; Messages dialog +02000A00="Հաղորդագրություն" + +02000A80="Հաղորդագրություն" + +02000A91="'{0}' ֆայլի համար սեղման մեթոդը չի աջակցվում" +02000A92="Տվյալների սխալ'{0}'-ում: Ֆայլը վնասված է:" +02000A93="CRC սխալ'{0}'-ում: Ֆայլը վնասված է:" +02000A94="Սխալ '{0}' ֆայլի կոդավորման տվյալներում:Գաղտնագիրը սխա՞լ է:" +02000A95="CRC սխալ '{0}' կոդավորված ֆայլի համար: Գաղտնագիրը սխա՞լ է:" + +; Password dialog +02000B00="Գրեք գաղտնագիրը" +02000B01="&Գրեք գաղտնագիրը." +02000B02="&Ցույց տալ գաղտնագիրը" +02000B03="&Ցույց տալ գաղտնագիրը." +02000B10="Գաղտնագիրը չի համապատասխանում" +02000B11="Գաղտնագրի համար օգտագործեք միայն լատինական այբուբենը, թվեր և հատուկ նշաններ (!, #, $, ...)" +02000B12="Գաղտնագիրը չափազանց երկար է" + +; Progress dialog +02000C00="Գործողությունը" +02000C01="Անցել է." +02000C02="Մնացել է." +02000C03="Չափը." +02000C04="Արագությունը." +02000C05="Ընթացքը." +02000C06="Սեղղման հաճախականությունը" + +02000C10="&Հետևում" +02000C11="&Առջևում" +02000C12="&Դադար" +02000C13="&Շարունակել" + +02000C20="Դադարի մեջ է" + +02000C30="Ընդհատե՞լ գործողությունը:" + +; Compress dialog +02000D00="Ավելացնել արխիվին" +02000D01="&Արխիվը." +02000D02="&Փոփոխման կարգը." +02000D03="&Արխիվի ձևաչափը." +02000D04="&Սեղման մեթոդը." +02000D05="Ստեղծել &Solid արխիվ" +02000D06="&Չափանիշները." +02000D07="&Ընտրանքներ" +02000D08="Ստեղծել SF&X արխիվ" +02000D09="Բ&ազմաշարան" +02000D0A="&Կոդավորել ֆայլերի անունները" +02000D0B="&Սեղման աստիճանը." +02000D0C="Բառարանի &չափը." +02000D0D="Բառի չ&ափը." +02000D0E="Հիշողության ծավալը սեղման համար." +02000D0F="Հիշողության ծավալը բացելու համար." +02000D10="Կոդավորում" +02000D11="Կոդավորման եղանակը." +02000D12="CPU հոսանքների քանակը." +02000D13="Չափը." +02000D14="Ֆայլի չափով" +02000D15="Անդադար" +02000D16="Սեղմել բացված ֆայլերը" + +02000D40="Բաժանել &մասերի` (բայթերով)." +02000D41="Սխալ գործողությունը կատարելիս" +02000D42="Հատորի նշված չափը. {0} բայթ:\nԲաժանե˚լ արխիվը նշված հատորների:" + +02000D81="Առանց սեղման" +02000D82="Նորմալ" +02000D83="Մաքսիմալ" +02000D84="Արագ" +02000D85="Արագ" +02000D86="Ուլտրա" + +02000D90="Դիտել" + +02000DA1="Ավելացնել և սեղմել" +02000DA2="Թարմացնել և ավելացնել" +02000DA3="Թարմացնել" +02000DA4="Սինխրոնիզացնել" + +02000DB1="Բոլոր ֆայլերը" + +02000DC0="Սեղմվում է" + +; Columns dialog +02000E00="Սյուներ" +02000E01="Նշեք սյուները, որոնք պետք է երևան այս թղթապանակում:Կոճակներով` \"Վերև\" և \"Ներքև\" կարող եք նշել սյուների տրման հաջորդականությունը:" +02000E02="Ընտրված սյունները կարող են ունենալ լայնություն" +02000E03="կետեր:" + +02000E10="&Վերև" +02000E11="Ն&երքև" +02000E12="Ցույց &տալ" +02000E13="&Թաքցնել" +02000E14="Տեղակայել" + +02000E81="Անունը" +02000E82="Լայոնւթյունը" + +; Testing +02000F90="Թեսթավորում" + + +; File Manager + +03000000="7-Zip File Manager" + +; Menu +03000102="&Ֆայլ" +03000103="&Խմբագրել" +03000104="&Տեսքը" +03000105="Գ&ործիքներ" +03000106="&Օգնություն" +03000107="&Ընտրյալները" + +; File +03000210="&Բացել" +03000211="Բացել &ներսում" +03000212="Բացել դրս&ում" +03000220="Դիտել" +03000221="&Խմբագրել" +03000230="Անվա&նափոխել" +03000231="&Պատճենել..." +03000232="&Տեղափոխել..." +03000233="&Ջնջել" +03000240="Հատկու&թյուններ" +03000241="Մեկնաբա&նություններ" +03000242="Արդյունքը" +03000250="&Ստեղծել թղթապանակ" +03000251="Ստեղծել &ֆայլ" +03000260="Դուրս &գալ" +03000270="Բաժանել& ֆայլը..." +03000271="Միացնել& ֆայլը..." + +; Edit +03000310="&Հրաժարվել" +03000311="&Վերադարձնել" +03000320="&Կտրել" +03000321="&Պատճենել" +03000322="Տեղա&դրել" +03000323="&Ջնջել" +03000330="Ընտրել &բոլորը" +03000331="Հանել ընտրումը" +03000332="&Ետարկել &ընտրումը" +03000333="Ընտրել..." +03000334="Հանել ընտրումը..." +03000335="Ընտրել ըստ տեսակի" +03000336="Հանել ըստ տեսակի ընտրումը " + +; View +03000410="&Մեծ նշաններ" +03000411="&Փոքր նշաններ" +03000412="Ցուց&ակ" +03000413="&Աղյուսակ" +03000420="Առանց դասավորման" +03000430="Բոլոր գործող պնակները" +03000431="Անցնել մեկ մակարդակ վերև" +03000432="Թղթապանակների պատմությունը..." +03000440="Թ&արմացնել" +03000449="Հարթ եղանակ" +03000450="&2 վահանակ" +03000451="&Գործիքների վահանակ" +03000460="Ծրագրի կոճակների վահանակ" +03000461="Կոճակների ստանդարտ վահանակ" +03000462="Մեծ կոճակներ" +03000463="Կոճակների անունը" + +; Tools +03000510="Կարգավորումներ..." +03000511="Արտադրողականության թեսթավորում" + +; Help +03000610="&Բովանդակությունը..." +03000620="Ծրագրի &մասին..." + +; Favorites +03000710="Ավելացնել թղթապանակը &ընտրյալներին որպես" +03000720="Էջանիշ" + +; Options Dialog + +03010000="Կարգավորումներ" + +; Plugins +03010100="Ընդլայնումներ" +03010101="&Ընդլայնումներ." +03010110="Հատկու&թյուններ" + +; Edit +03010200="Խմբագիր" +03010201="&Խմբագիր" + +; System +03010300="Համակարգը" +03010302="Ասոցացնել 7-Zip-ի հետ" +03010310="Ընդլայնումներ" + +; Settings +03010400="Կարգավորումներ" +03010401="Ցույց տալ \"..\"" +03010402="Ցույց տալ ֆայլերի իրական պատկերները" +03010410="Ցույց տալ համակարգային ընտրացանկը" +03010420="Կուրսորը ամբողջ տողով" +03010421="Ցույց տալ բաժանարարները" +03010430="Նշման այլընտրանքային եղանակ" +03010440="Օգտագործել հիշողության մեծ ծավալներ" + +; Strings + +03020201="Պատճենել" +03020202="Տեղափոխել" +03020203="Պատճենել." +03020204="Տեղափոխել." +03020205="Պատճենում...." +03020206="Տեղափոխում..." +03020207="Հնարավոր չէ պատճենել ֆայլեր տվյալ թղթապանակների համար" +03020208="Գործողությունը չի աջակցվում" +03020209="Ընտրեք թղթապանակը" + +03020210="Հաստատեք ֆայլի ջնջումը" +03020211="Հաստատեք թղթապանակի ջնջումը" +03020212="Հաստատեք ֆայլերի ջնջումը" +03020213="Իրո՞ք ցանկանում եք ջնջել \"{0}\" " +03020214="Իրո՞ք ցանկանում եք ջնջել \"{0}\" թղթապանակը և նրա պարունակությունը:" +03020215="Իրո՞ք ցանկանում եք ջնջել ({0} հատ) ֆայլերը:" +03020216="Ջնջվում է..." +03020217="Սխալ` ֆայլը կամ թղթապանակը ջնջելիս:" +03020218="Հնարավոր չէ Աղբարկղ տեղափոխել երկար անուններով ֆայլեր:" + +03020220="Անվանափոխում..." +03020221="Սխալ` ֆայլը կամ թղթապանակը անվանափոխելիս:" +03020222="Հաստատեք ֆայլերի պատճենումը" +03020223="Պատճենե՞լ այս ֆայլերը արխիվի մեջ:" + +03020230="Ստեղծել թղթապանակ" +03020231="Թղթապանակի անունը." +03020232="Նոր թղթապանակ" +03020233="Սխալ` թղթապանակ ստեղծելիս" + +03020240="Ստեղծել ֆայլ" +03020241="Ֆայլի անունը." +03020242="Նոր ֆայլ" +03020243="Սխալ` ֆայլի ստեղծման ժամանակ" + +03020250="Ընտրել" +03020251="Հանել ընտրումը" +03020252="Դիմակ." + +03020260="Թղթապանակների պատմությունը" + +03020280="'{0}' ֆայլը փոփոխվել է:\n Թարմացնե՞լ այն արխիվում:" +03020281="Հնարավոր չէ թարմացնել ֆայլը \n'{0}' արխիվում:" +03020282="Հնարավոր չէ բացել խմբագիրը:" +03020283="Բացվում է..." +03020284="Ֆայլը նման է վիրուսի:" + +03020290="Մեկնաբանություններ" +03020291="&Մեկնաբանություններ" + +030202A0="Համակարգը" + +03020300="Համակարգիչը" +03020301="Ցանցը" +03020302="Documents" + +03020400="Ավելացնել" +03020401="Հանել" +03020402="Թեսթավորում" + +03020420="Պատճենել" +03020421="Տեղափոխել" +03020422="Ջնջել" +03020423="Տեղեկություն" + +03020500="Բաժանել ֆայլը" +03020501="&Բաժանել." +03020510="Բաժանվում է..." +03020520="Հաստատեք բաժանումը" +03020521="Իրո˚ք բաժանել ֆայլը {0} հատորների" +03020522="Հատորի չափը պետք է փոքր լինի բաժանվող ֆայլի չափից" + +03020600="Միացնել ֆայլը" +03020601="&Միացնել." +03020610="Միացում..." +03020620="Ընտրեք բաժանված ֆայլի միայն առաջին մասը" +03020621="Հնարավոր չեղավ ճանաչել բաժանված ֆայլը" +03020622="Հնարավոր չեղավ գտնել բաժանված ֆայլի մասերը" + +03020710="Վերջնական գումարի հաշվում..." +03020720="Վերջնական արդյունքը" +03020721="CRC Վերջնական արդյունքը ֆայլերի համար. " +03020722="CRC Վերջնական արդյունքը ֆայլերի և անունների համար." + +03020800="Սկանավորում..." + +03020900="Հատկություններ" + +03020A01="Գործողությունը չի կարող կատարվել այն թղթապանակից, որը ունի երկար ճանապարհ:" +03020A02="Ընտրեք մեկ ֆայլ" +03020A03="Ընտրեք մեկ կամ մի քանի ֆայլեր" +03020A04="{0} ֆայլը արդեն գոյություն ունի" + +; Computer +03031100="Ծավալը" +03031101="Ազատ է" +03031102="Կլաստերի չափը" +03031103="Նշանը" + +; Network +03031200="Լոկալ անունը" +03031201="Սպասարկողը" + +; Benchmark Dialog + +03080000="Արտադրողականության թեսթավորում" +03080001="Հիշողության ծավալը." +03080002="Սեղմվում է" +03080003="Բացում" +03080004="Արագությունը" +03080005="Վարկանիշը" +03080006="Ընդհանուր վարկանիշը" +03080007="Տվյալ" +03080008="Արդյունքում" +03080009="Անցումներ." +0308000A="Սխալներ." +0308000B="CPU Usage" +0308000C="Վարկանիշը / Օգտ." + +;!@LangEnd@! diff --git a/GUI/Lang/id.txt b/GUI/Lang/id.txt new file mode 100644 index 0000000..b26cf5e --- /dev/null +++ b/GUI/Lang/id.txt @@ -0,0 +1,543 @@ +;!@Lang@!UTF-8! +; 7-Zip 9.10 beta +; Diterjemahkan oleh Frans Liando +; +; Sumber: http://ikc.dinus.ac.id/bukuputih/istilah-ti-indonesia.txt +; +; + +00000000="Indonesian" +00000001="Bahasa Indonesia" +00000002="33" + +; 7-Zip Configuration + +; Title +01000000="Konfigurasi 7-Zip" + +; Info Page +01000100="Mengenai 7-Zip" +01000103="7-Zip merupakan perangkat lunak gratis. Bagaimanapun, Anda bisa mendukung pengembangan 7-Zip dengan mendaftar.\n\nTerjemahan oleh Frans Liando." +01000104="Dukung" +01000105="Daftar" + +; Folders Page +01000200="Pelipat" +01000210="&Pelipat kerja" +01000211="Pelipat temporer &sistem" +01000212="S&ekarang" +01000213="&Ditentukan:" +01000214="Hanya untuk penggerak bisa pindah" + +01000281="Tetapkan lokasi untuk berkas arsip temporer." + +; System Page +01000300="Sistem" +01000301="Integrasikan 7-Zip ke cangkang menu konteks" +01000302="Menu konteks dikaskade" +01000310="Butir-butir pada menu konteks:" + +; Language Page +01000400="Bahasa" +01000401="Bahasa:" + + +; 7-Zip Explorer extension + +; Context menu +02000101="7-Zip" +02000102="Perintah-perintah 7-Zip" +02000103="Buka arsip" +02000104="Buka arsip terpilih." +02000105="Ekstrak berkas..." +02000106="Ekstrak berkas arsip terpilih." +02000107="Tambah ke arsip..." +02000108="Tambah butir terpilih ke arsip." +02000109="Uji arsip" +0200010A="Uji integritas dari arsip terpilih." +0200010B="Ekstrak di sini" +0200010C="Ekstrak berkas arsip terpilih ke pelipat ini." +0200010D="Ekstrak ke {0}" +0200010E="Ekstrak berkas ke sub pelipat." +0200010F="Tambah ke {0}" +02000110="Tambah butir terpilih ke arsip." +02000111="Mampat dan surat kawat..." +02000112="Mampat butir terpilih ke arsip dan kirim via surat kawat." +02000113="Mampat ke {0} dan surat kawat" +02000114="Mampat butir terpilih ke arsip dan kirim via surat kawat." + +02000140="" +02000141="" + +; Properties +02000203="Lintasan" +02000204="Nama" +02000205="Ekstensi" +02000206="Pelipat" +02000207="Ukuran" +02000208="Ukuran Dikemas" +02000209="Atribut" +0200020A="Dibuat" +0200020B="Diakses" +0200020C="Dimodifikasi" +0200020D="Padat" +0200020E="Komentar" +0200020F="Terenkripsi" +02000210="Belah Sebelum" +02000211="Belah Setelah" +02000212="Kamus" +02000213="CRC" +02000214="Tipe" +02000215="Anti" +02000216="Metode" +02000217="SO Host" +02000218="Sistem Berkas" +02000219="Pengguna" +0200021A="Grup" +0200021B="Blok" +0200021C="Komentar" +0200021D="Posisi" +0200021E="Awalan Lintasan" +0200021F="Pelipat" +02000220="Berkas" +02000221="Versi" +02000222="Volume" +02000223="Multivolume" +02000224="Ofset" +02000225="Tautan" +02000226="Blok" +02000227="Volume" + +02000229="64-bit" +0200022A="Big-endian" +0200022B="CPU" +0200022C="Ukuran Fisik" +0200022D="Ukuran Tajuk" +0200022E="Ceksum" +0200022F="Karakteristik" +02000230="Alamat Maya" +02000231="ID" +02000232="Nama Singkat" +02000233="Aplikasi Pembuat" +02000234="Ukuran Sektor" +02000235="Ragam" +02000236="Taut" + +; Status bar +02000301="{0} objek terpilih" +02000302="{0} objek" + +02000320="Berkas:" +02000321="Pelipat:" +02000322="Ukuran:" +02000323="Ukuran terkompres:" +02000324="Arsip:" + +; List Context Menu +02000401="&Kolom..." + +02000411="&Buka" +02000412="&Ekstrak..." + +; ToolBar +02000501="Ekstrak" + +; Messages +02000601="Operasi pembaruan tidaklah didukung untuk arsip ini." +02000602="Tak bisa perbarui arsip {0}" +02000603="Tak bisa membuat pelipat '{0}'" +02000604="Berkas arsip tak didukung." +02000605="Kesalahan" +02000606="Terlalu banyak butir" +02000607="Tak ada aplikasi yang diasosiasikan dengan ekstensi dari nama berkas yang diberikan" +02000608="Tidak ada kesalahan" +02000609="Tak bisa membuka berkas arsip '{0}'" +0200060A="Tak bisa membuka arsip terenkripsi '{0}'. Salah kata sandi?" +0200060B="Sistem tak bisa mengalokasikan jumlah memori yang diperlukan" +0200060C="Kesalahan tak dikenal" +0200060D="Tipe arsip tak didukung" + +; Dialogs +02000702="Oke" +02000705="&Ya" +02000707="Ya untuk &semua" +02000709="&Tidak" +0200070B="Tidak untuk s&emua" + +02000710="Batal" +02000711="&Batal" +02000713="&Tutup" +02000714="Henti" +02000715="Start Ulang" + +02000720="Bantuan" + +; Extract dialog +02000800="Ekstrak" +02000801="E&kstrak ke:" +02000802="Kata sandi" + +02000810="Ragam lintasan" +02000811="Nama lengkap lintasan" +02000812="Nama lintasan sekarang" +02000813="Tidak ada nama lintasan" + +02000820="Ragam tulis timpa" +02000821="Konfirmasikan sebelum tulis timpa" +02000822="Tulis timpa tanpa konfirmasi" +02000823="Lewati berkas yang ada" +02000824="Penamaan ulang automatis" +02000825="Penamaan ulang automatis terhadap berkas yang ada" + +02000830="Berkas" +02000831="&Berkas terpilih" +02000832="&Semua berkas" + +02000881="Tetapkan lokasi untuk berkas yang diekstrak." + +02000890="Mengekstrak" + +; Overwrite dialog +02000900="Konfirmasi Penggantian Berkas" +02000901="Pelipat tujuan telah berisi berkas yang terproses." +02000902="Maukah Anda mengganti berkas yang ada" +02000903="dengan yang satu ini?" + +02000911="Nama &Ulang Automatis" + +02000982="{0} bita" +02000983="dimodifikasi pada" + +; Messages dialog +02000A00="Pesan Diagnosa" + +02000A80="Pesan" + +02000A91="Metode kompresi untuk '{0}' tak didukung." +02000A92="Kesalahan data di '{0}'. Berkas ini rusak." +02000A93="CRC gagal di '{0}'. Berkas ini rusak." +02000A94="Kesalahan data di berkas terenkripsi '{0}'. Salah kata sandi?" +02000A95="CRC gagal di berkas terenkripsi '{0}'. Salah kata sandi?" + +; Password dialog +02000B00="Masukkan kata sandi" +02000B01="Masukkan kata sandi:" +02000B02="&Perlihatkan kata sandi" +02000B03="Konfirmasi kata sandi:" +02000B10="Kata sandi tidak cocok" +02000B11="Gunakanlah hanya huruf Indonesia, nomor dan karakter khusus (!, #, $, ...) untuk kata sandi" +02000B12="Kata sandi terlalu panjang" + +; Progress dialog +02000C00="Proses" +02000C01="Waktu terpakai:" +02000C02="Sisa waktu:" +02000C03="Jumlah ukuran:" +02000C04="Kecepatan:" +02000C05="Terproses:" +02000C06="Rasio kompresi:" + +02000C10="Latar &Belakang" +02000C11="Latar &Depan" +02000C12="&Jeda" +02000C13="&Lanjut" + +02000C20="Jeda" + +02000C30="Anda yakin ingin membatalkannya?" + +; Compress dialog +02000D00="Tambah ke arsip" +02000D01="&Arsip:" +02000D02="Ragam perbar&u:" +02000D03="&Format arsip:" +02000D04="&Metode kompresi:" +02000D05="Buat ar&sip padat" +02000D06="&Parameter:" +02000D07="Pilihan" +02000D08="Buat arsip SF&X" +02000D09="Multi-rangkaian" +02000D0A="Enkripsi &nama berkas" +02000D0B="&Level kompresi:" +02000D0C="Ukuran &kamus:" +02000D0D="Ukuran ka&ta:" +02000D0E="Pemakaian memori untuk Pemampatan:" +02000D0F="Pemakaian memori untuk Pengawamampatan:" +02000D10="Enkripsi" +02000D11="Metode enkripsi:" +02000D12="Jumlah CPU:" +02000D13="Ukuran blok padat:" +02000D14="Non-padat" +02000D15="Padat" +02000D16="Kompres berkas bersama" + +02000D40="Belah ke &volume, bita:" +02000D41="Ukuran volume salah" +02000D42="Tentukan ukuran volume: {0} bita.\nAnda Yakin ingin membelah arsip menjadi volume demikian?" + +02000D81="Simpan" +02000D82="Normal" +02000D83="Maksimum" +02000D84="Cepat" +02000D85="Tercepat" +02000D86="Ultra" + +02000D90="Ramban" + +02000DA1="Tambah dan ganti berkas" +02000DA2="Perbarui dan tambah berkas" +02000DA3="Segarkan ulang berkas yang ada" +02000DA4="Sinkronisasikan berkas" + +02000DB1="Semua Berkas" + +02000DC0="Pemampatan" + +; Columns dialog +02000E00="Kolom" +02000E01="Cek kolom yang ingin ditampakkan dalam pelipat ini. Gunakan tombol Pindah ke Atas dan Pindah ke Bawah untuk mengurutkan kolom." +02000E02="Kolom yang terpilih harus" +02000E03="ber-piksel &lebar." + +02000E10="Pindah ke &Atas" +02000E11="Pindah ke &Bawah" +02000E12="Per&lihatkan" +02000E13="&Sembunyikan" +02000E14="Set" + +02000E81="Judul" +02000E82="Lebar" + +; Testing +02000F90="Pengujian" + + +; File Manager + +03000000="Manager Berkas 7-Zip" + +; Menu +03000102="&Berkas" +03000103="&Sunting" +03000104="Tam&pilan" +03000105="P&eralatan" +03000106="Ban&tuan" +03000107="&Kesukaan" + +; File +03000210="&Buka" +03000211="Buka Sisi &Dalam" +03000212="Buka Sisi L&uar" +03000220="&Pandangan" +03000221="&Sunting" +03000230="&Nama Ulang" +03000231="S&alin Ke..." +03000232="P&indahkan Ke..." +03000233="&Hapus" +03000240="P&roperti" +03000241="K&omentari" +03000242="Hitung Ceksum" +03000243="Beda" +03000250="Buat Pelipat" +03000251="Buat Berkas" +03000260="&Keluar" +03000270="Be&lah Berkas..." +03000271="Gabun&g Berkas..." + +; Edit +03000310="&Ulangi" +03000311="&Batalkan" +03000320="Po&tong" +03000321="S&alin" +03000322="Tem&pel" +03000323="&Hapus" +03000330="Pi&lih Semua" +03000331="Tak Memilih Semua" +03000332="Pilih Kebal&ikannya" +03000333="Pilih..." +03000334="Tak Memilih..." +03000335="Pilih Berdasarkan Tipe" +03000336="Tak Memilih Berdasarkan Tipe" + +; View +03000410="Ikon &Besar" +03000411="Ikon &Kecil" +03000412="&Daftar" +03000413="&Rincian" +03000420="Tak Beraturan" +03000430="Buka Akar Pelipat" +03000431="Naik Satu Tingkat" +03000432="Histori Pelipat..." +03000440="&Segarkan Ulang" +03000449="Pandangan Datar" +03000450="&2 Panel" +03000451="Ba&tang Peralatan" +03000460="Batang Peralatan Arsip" +03000461="Ba&tang Peralatan Standar" +03000462="Tombol Besar" +03000463="Perlihatkan Teks Tombol" + +; Tools +03000510="&Pilihan..." +03000511="&Tolok" + +; Help +03000610="Petun&juk..." +03000620="Mengen&ai 7-Zip..." + +; Favorites +03000710="Tambah pelipat ke Kesukaan sebagai" +03000720="Marka Buku" + +; Options Dialog + +03010000="Pilihan" + +; Plugins +03010100="Tambahan" +03010101="&Tambahan:" +03010110="Pilihan..." + +; Edit +03010200="Penyunting" +03010201="P&enyunting:" +03010202="Be&da:" + +; System +03010300="Sistem" +03010302="Asosiasikan 7-Zip dengan:" +03010310="Tambahan" + +; Settings +03010400="Setelan" +03010401="Perlihatkan butir \"..\"" +03010402="Perlihatkan ikon asli berkas" +03010410="Perlihatkan menu sistem" +03010420="&Memilih baris penuh" +03010421="Perlihatkan &garis kisi-kisi" +03010422="Sekali klik untuk membuka" +03010430="Ragam pemilihan &alternatif" +03010440="Gunakan halaman memori &besar" + +; Strings + +03020201="Salin" +03020202="Pindah" +03020203="Salin ke:" +03020204="Pindah ke:" +03020205="Menyalin..." +03020206="Memindah..." +03020207="Anda tak bisa memindah atau menyalin butir untuk pelipat demikian." +03020208="Pengoperasian tak didukung untuk pelipat demikian." +03020209="Pilih pelipat tujuan." + +03020210="Konfirmasi Hapus Berkas" +03020211="Konfirmasi Hapus Pelipat" +03020212="Konfirmasi Hapus Berkas-berkas" +03020213="Anda yakin ingin hapus '{0}'?" +03020214="Anda yakin ingin hapus pelipat '{0}' dan semua isinya?" +03020215="Anda yakin ingin hapus {0} butir?" +03020216="Menghapus..." +03020217="Kesalahan Ketika Menghapus Berkas atau Pelipat" +03020218="Sistem tak bisa memindah suatu berkas yang berlintasan panjang ke Recycle Bin" + +03020220="Nama Ulang..." +03020221="Kesalahan Ketika Penamaan Ulang Berkas atau Pelipat" +03020222="Konfirmasi Salin Berkas" +03020223="Anda yakin ingin menyalin berkas ke arsip?" + +03020230="Buat Pelipat" +03020231="Nama pelipat:" +03020232="Pelipat Baru" +03020233="Kesalahan Membuat Pelipat" + +03020240="Buat Berkas" +03020241="Nama berkas:" +03020242="Berkas Baru" +03020243="Kesalahan Pembuatan Berkas" + +03020250="Pilih" +03020251="Tak Memilih" +03020252="Masker:" + +03020260="Histori Pelipat" + +03020280="Berkas '{0}' telah termodifikasi.\nApakah Anda ingin perbarui berkas dalam arsip?" +03020281="Tak bisa perbarui berkas\n'{0}'" +03020282="Tak bisa memulai penyunting." +03020283="Membuka..." +03020284="Berkas ini tampaknya seperti virus (pada nama berkas berisi spasi yang panjang)." + +03020290="Komentar" +03020291="&Komentari:" + +030202A0="Sistem" + +03020300="Komputer" +03020301="Jaringan" +03020302="Dokumen" + +03020400="Tambah" +03020401="Ekstrak" +03020402="Uji" + +03020420="Salin" +03020421="Pindah" +03020422="Hapus" +03020423="Info" + +03020500="Belah Berkas" +03020501="&Belah ke:" +03020510="Membelah..." +03020520="Konfirmasi Membelah" +03020521="Anda yakin ingin membelah berkas menjadi {0} volume?" +03020522="Ukuran volume seharusnya lebih kecil dari pada ukuran asli berkas" + +03020600="Gabung Berkas" +03020601="&Gabung ke:" +03020610="Menggabung..." +03020620="Pilih bagian pertama saja dari berkas belahan" +03020621="Tak bisa mendeteksi berkas sebagai bagian berkas belahan" +03020622="Tak bisa menemukan lebih dari satu bagian berkas belahan" + +03020710="Hitung ceksum..." +03020720="Informasi ceksum" +03020721="Ceksum CRC untuk data:" +03020722="Ceksum CRC untuk data dan nama:" + +03020800="Memindai..." + +03020900="Properti" + +03020A01="Pengoperasian tak bisa memanggil dari pelipat yang berlintasan panjang." +03020A02="Anda harus memilih satu berkas" +03020A03="Anda harus memilih satu atau lebih berkas" +03020A04="Berkas {0} telah ada" + +; Computer +03031100="Ukuran Total" +03031101="Ruang Kosong" +03031102="Ukuran Gugus" +03031103="Label" + +; Network +03031200="Nama Lokal" +03031201="Penyelenggara" + +; Benchmark Dialog + +03080000="Tolok" +03080001="Pemakaian memori:" +03080002="Pemampatan" +03080003="Pengawamampatan" +03080004="Kecepatan" +03080005="Penilaian" +03080006="Jumlah Penilaian" +03080007="Sekarang" +03080008="Hasil" +03080009="Lewat:" +0308000A="Kesalahan:" +0308000B="Pemakaian CPU" +0308000C="Penilaian/Pemakaian" + +;!@LangEnd@! diff --git a/GUI/Lang/io.txt b/GUI/Lang/io.txt new file mode 100644 index 0000000..b7b05e5 --- /dev/null +++ b/GUI/Lang/io.txt @@ -0,0 +1,453 @@ +;!@Lang@!UTF-8! +; 7-Zip 4.08 beta8 +; Translated by iZoom +; +; +; +; + +00000000="Ido" +00000001="Ido" + +; 7-Zip Configuration + +; Title +01000000="7-Zip-Ajusto" + +; Info Page +01000100="Pri progamo..." +01000103="7-Zip esas gratuita programo. Tamen, vu povas mantenar developado di 7-Zip per enregistrigesar." +01000105="Enregistrigesar" + +; Folders Page +01000200="Dosieruyi" +01000210="&Laborala dosieruyo" +01000211="&Sistemala provizora dosieruyo" +01000212="&Nuna" +01000213="&Definez:" +01000214="&Uzar nur por deprenebla datumportili" + +01000281="Definar loko por provizora arkiva dosieri." + +; System Page +01000300="Sistemo" +01000301="Pozar 7-Zip'o en kuntexta menuo di shelo" +01000302="Kaskada kuntexta menuo" +01000310="Elementi di kuntexta menuo:" + +; Language Page +01000400="Linguo" +01000401="Linguo:" + + +; 7-Zip Explorer extension + +; Context menu +02000101="7-Zip" +02000102="Komandi di 7-Zip" +02000103="Apertar" +02000104="Apertar merkita dosiero." +02000105="Extraktar dosieri..." +02000106="Extraktar dosieri ek merkita arkivo." +02000107="Adjuntar ad arkivo..." +02000108="Adjuntar merkita objekti." +02000109="Verifikar arkivo" +0200010A="Verifiko di integreso di merkita arkivo." +0200010B="Extraktez hike" +0200010C="Extraktar dosieri ek merkita arkivo aden nuna dosieruyo." +0200010D="Extraktez aden {0}" +0200010E="Extraktar dosieri aden subdosieruyo." +0200010F="Adjuntar ad {0}" +02000110="Adjuntar merkita objekti ad arkivo." +02000111="Enarkivigar ed sendar elk-posto..." +02000112="Enarkivigar la merkita objekti e sendar la arkivo." +02000113="Enarkivigar aden {0} e sendar elk-posto..." +02000113="Enarkivigar la merkita objekti e sendar la arkivo." + +02000140="" +02000141="" + +; Properties +02000203="Dosiervoyo" +02000204="Nomo" +02000205="Dosiernoma sufixo" +02000206="Dosieruyo" +02000207="Grandeso" +02000208="Enarkiva grandeso" +02000209="Atributi" +0200020A="Kreita" +0200020B="Acesita" +0200020C="Chanjita" +0200020D="Solida" +0200020E="Komentita" +0200020F="Chifrita" +02000210="Fendita ante" +02000211="Fendita pos" +02000212="Vortaro" +02000213="CRC" +02000214="Tipo" +02000215="Kontre" +02000216="Metodo" +02000217="Operacala sistemo" +02000218="Dosiersistemo" +02000219="Uzero" +0200021A="Grupo" +0200021B="Bloko" +0200021C="Komenturo" +0200021D="Poziciono" + +; Status bar +02000301="{0} objekt(o|i) merkita" +02000302="{0} objekt(o|i)" + +; List Context Menu +02000401="&Kolumni..." + +02000411="&Apertar" +02000412="&Extraktez..." + +; ToolBar +02000501="Extraktar" + +; Messages +02000601="Rinovigo ne suportesas por ica arkivo." +02000602="Rinovigo dil arkivo {0} faliis" +02000603="Krear dosieruyo '{0}' neposiblesis" +02000604="Dosiero ne esas suportata arkivo." +02000605="Eroro" +02000606="Tro multa objekti" +02000607="Programo asociita kun tala tipo dosierala mankas" +02000608="Erori ne es trovita" + +; Dialogs +02000702="B&one" +02000705="&Yes" +02000707="Yes por &omni" +02000709="&No" +0200070B="No por o&mni" + +02000710="Abandonar" +02000711="&Abandonez" +02000713="&Klozez" +02000714="Haltez" +02000715="Ristartez" + +02000720="Helpo" + +; Extract dialog +02000800="&Extraktar" +02000801="E&xtraktar aden:" +02000802="&Pasovorto" + +02000810="Dosiervoyi" +02000811="&Absoluta dosiervoyi" +02000812="&Relativa dosiervoyi" +02000813="&Sen dosiervoyi" + +02000820="Remplasala skribmodo" +02000821="&Kun konfirmo" +02000822="&Sen konfirmo" +02000823="&Omisar existanta dosieri" +02000824="Automata nomchanjo" +02000825="Automata nomchanjo de existanta dosieri" + +02000830="Dosieri" +02000831="&Merkita dosieri" +02000832="&Omna dosieri" + +02000881="Definez loko por dosieri extraktenda." + +02000890="Extrakto" + +; Overwrite dialog +02000900="Konfirmo di nomchanjo" +02000901="Dosieruyo ja kontenas operacata dosiero." +02000902="Kad remplasor esanta dosiero" +02000903="per la ica?" + +02000911="&Automata nomchanjo." + +02000982="{0} bayti*" +02000983="chanjita per" + +; Messages dialog +02000A00="Diagnozala mesaji" + +02000A80="Mesajo" + +02000A91="Kompresmetodo ne esas suportata por dosiero '{0}'." +02000A92="Datumeroro en '{0}'. Dosiero es fushita." +02000A93="CRC-eroro en '{0}'. Dosiero es fushita." + +; Password dialog +02000B00="Pasovorto" +02000B01="Sugestez pasovorto:" +02000B02="&Montrar pasovorto" + +; Progress dialog +02000C00="Proceso" +02000C01="Pasinta tempo:" +02000C02="Restanta tempo:" +02000C03="Grandeso:" +02000C04="Rapideso:" + +02000C10="&Fono" +02000C11="&Avanajo" +02000C12="&Pauzo" +02000C13="&Durez" + +02000C20="Pauzita" + +02000C30="Kad vu ya volas abortar?" + +; Compress dialog +02000D00="Adjuntar aden arkivo" +02000D01="&Arkivo:" +02000D02="R&emplasomodo:" +02000D03="A&rkiva formato:" +02000D04="&Kompresometodo:" +02000D05="Kreor &solida arkivo" +02000D06="&Parametri:" +02000D07="Ajustaji" +02000D08="Krear SF&X-arkivo" +02000D09="Disfiligo" +02000D0A="Chifrar dosier&nomi" +02000D0B="Kompreso&grado" +02000D0C="&Vortarograndeso:" +02000D0D="Vo&rtograndeso:" +02000D0E="Memoruzo por kompresar:" +02000D0F="Memoruzo por extraktar:" + +02000D40="&Fendar por volumini, bayti:" + +02000D81="Sen kompresar" +02000D82="Normala kompreso" +02000D83="Maxim granda kompreso" +02000D84="Rapide" +02000D85="Maxim rapide" +02000D86="Extreme" + +02000D90="Inspektar" + +02000DA1="Adjuntar e remplasar dosieri" +02000DA2="Rinovigar e adjuntar dosieri" +02000DA3="Rifreshigar existanta dosieri" +02000DA4="Sinkronizar dosieri" + +02000DB1="Omna dosieri" + +02000DC0="Kompreso" + +; Columns dialog +02000E00="Kolumni" +02000E01="Merkez kolumni qui es spektenda en ca dosieruyo. Per butoni \"Ad-Supre\" ed \"Ad-Infre\" es posibla riaranjar sekquordino dil kolumni." +02000E02="Merkita kolumno devas havar &larjeso di" +02000E03="punti." + +02000E10="Ad-&Supre" +02000E11="Ad-&Infre" +02000E12="&Montrez" +02000E13="&Celez" +02000E14="Definez" + +02000E81="Nomo" +02000E82="Larjeso" + +; Testing +02000F90="Probado" + + +; File Manager + +03000000="7-Zip-dosieradministrilo" + +; Menu +03000102="&Dosiero" +03000103="&Redakto" +03000104="&Aspekto" +03000105="&Utensili" +03000106="&Helpo" +03000107="&Favoraji" + +; File +03000210="&Apertigar" +03000211="Apertigar int&erne" +03000212="Apertigar e&xter" +03000220="&Vidigar" +03000221="&Redaktar" +03000230="Ch&anjar nomo" +03000231="Ko&piar aden..." +03000232="Transp&ozar aden..." +03000233="E&facar" +03000240="In&heraji" +03000241="Ko&mentar" +03000250="Krear &dosieruyo" +03000251="Krear dos&iero" +03000260="E&kirar" +03000270="F&endar dosiero..." +03000271="Komb&inar dosieri..." + +; Edit +03000310="&Abolisar" +03000311="&Rifacar" +03000320="&Tranchar" +03000321="&Kopiar" +03000322="In&sertar" +03000323="E&facar" +03000330="Merk&ar omno" +03000331="Des&merkar omno" +03000332="&Inversigar merko" +03000333="Merkar..." +03000334="Desmerkar..." +03000335="Merkar segun tipo" +03000336="Desmerkar segun tipo" + +; View +03000410="&Granda ikoneti" +03000411="&Mikra ikoneti" +03000412="&Listo" +03000413="&Tabelo" +03000420="&Nearanjite" +03000430="Apertigar radika dosieruyo" +03000431="Ad-supre ye un nivelo" +03000432="Dosieruya historio..." +03000440="R&inovigar" +03000450="&2 paneli" +03000451="Utens&ila paneli" +03000460="Utensila panelo di arkivo" +03000461="Norma utensila panelo" +03000462="Granda ikoneti" +03000463="Videbla butontexto" + +; Tools +03000510="&Ajusti..." +03000511="&Experienco dil rapideso" + +; Help +03000610="&Konteno..." +03000620="&Pri 7-Zip..." + +; Favorites +03000710="&Adjuntar dosieruyo ad la favorata quale" +03000720="Lektomerkajo" + +; Options Dialog + +03010000="Ajusti" + +; Plugins +03010100="Extraji" +03010101="&Extraji:" +03010110="Ajusti" + +; Edit +03010200="Redaktilo" +03010201="&Redaktilo:" + +; System +03010300="Sistemo" +03010302="Asociar 7-Zip-o kun dosieru:" +03010310="Extrajo" + +; Settings +03010400="Ajusti" +03010401="Montrar \"..\"-elemento" +03010402="Montrar reala dosier-ikoneti" +03010410="Montrar sistemala menuo" +03010420="Merkar &tota lineo" +03010421="Montrar &streki separanta" + +; Strings + +03020201="Kopiar" +03020202="Transpozar" +03020203="Kopiez aden:" +03020204="Transpozez aden:" +03020205="Kopio..." +03020206="Transpozo..." +03020207="Onu ne povas kopiar objekti por tala dosieruyi." +03020208="Operaco ne suportesas." + +03020210="Konfirmo dil efaco di dosiero" +03020211="Konfirmo dil efaco di dosieruyo" +03020212="Konfirmo dil efaco di dosieraro" +03020213="Ka vu ya volas efacar '{0}'?" +03020214="Ka vu ya volas efacar dosieruyo \"{0}\" e omna lua kontenaji?" +03020215="Ka vu ya volas efacar ita {0} objekti?" +03020216="Efaco..." +03020217="Eroro dum efacar di dosiero o dosieruyo" + +03020220="Nomchanjo..." +03020221="Eroro dum nomchanjo di dosiero o dosieruyo" + +03020230="Krear dosieruyo" +03020231="Dosieruynomo:" +03020232="Nova dosieruyo" +03020233="Eroro dum dosieruykreo" + +03020240="Krear dosiero" +03020241="Dosiernomo:" +03020242="Nova dosiero" +03020243="Eroro dum dosierkreo" + +03020250="Merkar" +03020251="Desmerkar" +03020252="Masko:" + +03020260="Dosieruyhistorio" + +03020280="Dosiero '{0}' chanjesis.\nKa vu volas rinovigar lu enarkive?" +03020281="Rinovigo dil dosiero\n'{0}' faliis" +03020282="Startigo dil redaktilo." +03020283="Aperto..." + +03020290="Komento" +03020291="&Komento:" + +030202A0="Sistemo" + +03020300="Komputilo" +03020301="Reto" + +03020400="Adjuntar" +03020401="Extraktar" +03020402="Verifikar" + +03020420="Kopiar" +03020421="Transpozar" +03020422="Efacar" +03020423="Informo" + +03020500="Fendar dosiero" +03020501="&Fendez aden:" +03020510="Fendo..." + +03020600="Kombinar dosieri" +03020601="&Kombinar aden:" +03020610="Kombino..." + +; Computer +03031100="Tota kapacivo" +03031101="Vakanta" +03031102="Faskogrando" +03031103="Etiketo" + +; Network +03031200="Lokala nomo" +03031201="Provizanto" + +; Benchmark Dialog + +03080000="Experienco dil rapideso" +03080001="Memoruzo:" +03080002="Kompresado" +03080003="Extraktado" +03080004="Rapideso" +03080005="Aprecuro" +03080006="Tota aprecuro" +03080007="Kuranta" +03080008="Rezulta" +03080009="Pasi:" +0308000A="Erori:" + +;!@LangEnd@! diff --git a/GUI/Lang/is.txt b/GUI/Lang/is.txt new file mode 100644 index 0000000..5246d47 --- /dev/null +++ b/GUI/Lang/is.txt @@ -0,0 +1,514 @@ +;!@Lang@!UTF-8! +; 7-Zip 4.53 +; Translated by bjossi +; +; +; +; + +00000000="Icelandic" +00000001="Íslenska" +00000002="15" + +; 7-Zip Configuration + +; Title +01000000="7-Zip Stillingar" + +; Info Page +01000100="Um 7-Zip" +01000103="7-Zip er ókeypis forrit. En þú getur stutt þróun 7-Zip með því að skrá þig." +01000104="Aðstoð" +01000105="Skráning" + +; Folders Page +01000200="Möppur" +01000210="&Mappa notuð til vinnslu:" +01000211="&Tímabundin kerfismappa" +01000212="&Núverandi mappa" +01000213="&Skilgreindu möppu:" +01000214="Nota aðeins með flash drifum" + +01000281="Skilgreindu staðsetningu fyir tímabundin gagnasöfn." + +; System Page +01000300="Kerfi" +01000301="Innleiða 7-Zip í flýtivalmynd" +01000302="Lagskipt flýtivalmynd" +01000310="Hlutir í flýtivalmynd:" + +; Language Page +01000400="Tungumál" +01000401="Tungumál:" + + +; 7-Zip Explorer extension + +; Context menu +02000101="7-Zip" +02000102="7-Zip skipanir" +02000103="Opna gagnasafn" +02000104="Opnar valið gagnasafn." +02000105="Afþjappa gögn..." +02000106="Afþjappar gögnum frá völdu gagnasafni." +02000107="Bæta við gagnasafn..." +02000108="Bætir skjölum í gagnasafn." +02000109="Prófa gagnasafn" +0200010A="Prófar stöðugleika gagnasafns." +0200010B="Afþjappa hér" +0200010C="Afþjappar gögnum frá gagnasafni í núverandi möppu." +0200010D="Afþjappa í {0}" +0200010E="Afþjappar gögn í hliðar-möppur." +0200010F="Bæta við {0}" +02000110="Bætir gögnum við gagnasafn." +02000111="Þjappa og senda..." +02000112="Þjappar saman gögnum í gagnasafn og sendir það með tölvupósti." +02000113="Þjappa til {0} og senda" +02000114="Þjappar saman gögnum í gagnasafn og sendir það með tölvupósti." + +02000140="" +02000141="" + +; Properties +02000203="Slóð" +02000204="Nafn" +02000205="Tegund skráar" +02000206="Mappa" +02000207="Stærð" +02000208="Þjöppuð stærð" +02000209="Eiginleikar" +0200020A="Búið til" +0200020B="Opnað" +0200020C="Breytt" +0200020D="Þétt" +0200020E="Umsögn" +0200020F="Lykilorð" +02000210="Bútuð niður fyrir" +02000211="Bútuð niður eftir" +02000212="Orðasafn" +02000213="CRC" +02000214="Tegund" +02000215="Anti" +02000216="Aðferð" +02000217="Stýrikerfi" +02000218="Gagnakerfi" +02000219="Notandi" +0200021A="Hópur" +0200021B="Kubbur" +0200021C="Umsögn" +0200021D="Staðsetning" +0200021E="Prefix slóðar" +0200021F="Möppur" +02000220="Skrár" +02000221="Útgáfa" +02000222="Kerfi" +02000223="Fjölkerfi" +02000224="Staðsetning" +02000225="Slóðar" +02000226="Kubbar" +02000227="Kerfi" + +; Status bar +02000301="{0} hlutir valdir" +02000302="{0} hlutir" + +02000320="Skrár:" +02000321="Möppur:" +02000322="Stærð:" +02000323="Þjöppuð stærð:" +02000324="Gagnasöfn:" + +; List Context Menu +02000401="&Runur..." + +02000411="&Opna" +02000412="&Afþjappa..." + +; ToolBar +02000501="Afþjappa" + +; Messages +02000601="Þessi tegund gagnasafns styður ekki uppfærsluskipanir." +02000602="Get ekki uppfært gagnasafn {0}" +02000603="Get ekki búið til möppu '{0}'" +02000604="Viðkomandi skrá er ekki gagnasafn." +02000605="Villa" +02000606="Of margar skrár" +02000607="Það er ekkert forrit í boði fyrir viðkomandi tegund skráar" +02000608="Það eru engar villur" +02000609="Get ekki opnað skrá '{0}' sem gagnasafn" +0200060A="Get ekki opnað læst gagnasafn '{0}'. Rangt lykilorð?" + +; Dialogs +02000702="OK" +02000705="&Já" +02000707="Já við &Öllu" +02000709="&Nei" +0200070B="Nei við &Öllu" + +02000710="Hætta við" +02000711="&Hætta við" +02000713="&Loka" +02000714="Hætta" +02000715="Endurræsa" + +02000720="Hjálp" + +; Extract dialog +02000800="Afþjappa" +02000801="&Afþjappa í:" +02000802="Lykilorð" + +02000810="Slóðar" +02000811="Full slóða-nöfn" +02000812="Núverandi slóða-nöfn" +02000813="Engin slóða-nöfn" + +02000820="Yfirfærsla" +02000821="Spyrja fyrir yfirfærslu" +02000822="Yfirfæra án viðvörunar" +02000823="Sleppa öðrum skrám" +02000824="Endurnefna sjálfkrafa" +02000825="Endurnefna aðrar skrár" + +02000830="Skrár" +02000831="&Valdar skrár" +02000832="&Allar skrár" + +02000881="Skilgreindu staðsetningu fyrir afþjappaðar skrár." + +02000890="Afþjappa" + +; Overwrite dialog +02000900="Staðfesta Yfirfærslu Skráar" +02000901="Skilgreind mappa inniheldur unna skrá nú þegar." +02000902="Vilt þú yfirfæra fyrrverandi skrá" +02000903="með þessari?" + +02000911="&Endurnefna Sjálfkrafa" + +02000982="{0} bæti" +02000983="Breytt þann" + +; Messages dialog +02000A00="Prufuskilaboð" + +02000A80="Skilaboð" + +02000A91="Óstutt samþjöppunaraðferð fyrir '{0}'." +02000A92="Gagnavilla í '{0}'. Skrá er biluð." +02000A93="CRC gekk ekki í '{0}'. Skrá er biluð." +02000A94="Gagnavilla í læstu skjali '{0}'. Rangt lykilorð?" +02000A95="CRC gekk ekki í læstu skjali '{0}'. Rangt lykilorð?" + +; Password dialog +02000B00="Skrifaðu lykilorð" +02000B01="Skrifaðu lykilorð:" +02000B02="&Sýna lykilorð" +02000B03="Skrifaðu lykilorð aftur:" +02000B10="Lykilorðin eru ekki eins" +02000B11="Notaðu aðeins enska stafi, tölur og sérstaka stafi (!, #, $, ...) í lykilorðum" +02000B12="Lykilorðið er of langt" + +; Progress dialog +02000C00="Vinna" +02000C01="Áætlaður tími:" +02000C02="Tími eftir:" +02000C03="Heildarstærð:" +02000C04="Hraði:" +02000C05="Unnið:" +02000C06="Samþjöppunarstuðull:" + +02000C10="&Bakgrunnur" +02000C11="&Fyrirgrunnur" +02000C12="&Bíða" +02000C13="&Halda áfram" + +02000C20="Bíður" + +02000C30="Ertu viss um að þú viljir hætta við?" + +; Compress dialog +02000D00="Bæta við gagnasafn" +02000D01="&Gagnasafn:" +02000D02="&Uppfærsla:" +02000D03="&Tegund gagnasafns:" +02000D04="&Styrkur samþjöppunar:" +02000D05="Gera &þétt gagnasafn" +02000D06="&Skipanir:" +02000D07="Stillingar" +02000D08="Gera &SFX gagnasafn" +02000D09="Fjölvinnsla" +02000D0A="Rugla &skráarnöfn" +02000D0B="Samþjöppun &stig:" +02000D0C="&Stærð orðasafns:" +02000D0D="&Orðastærð:" +02000D0E="Vinnsluminnisnotkun fyrir samþjöppun:" +02000D0F="Vinnsluminnisnotkun fyrir afþjöppun:" +02000D10="Læsing" +02000D11="Aðferð læsingar:" +02000D12="Fjöldi örgjörvakjarna:" +02000D13="Stærð þétts kubbs:" +02000D14="Óþétt" +02000D15="Þétt" +02000D16="Þjappa deildum skrám" + +02000D40="Skipta skráarsafni í &hluta, bæti:" +02000D41="Vitlaus stærð hluts" +02000D42="Skilgreind stærð hluta: {0} bæti.\nErtu viss um að þú viljir skipta gagnasafni í þessa hluta?" + +02000D81="Geyma" +02000D82="Meðallag" +02000D83="Hámark" +02000D84="Hratt" +02000D85="Hraðast" +02000D86="Ultra" + +02000D90="Skoða" + +02000DA1="Bæta við og yfirfæra skrár" +02000DA2="Uppfæra og bæta við skrám" +02000DA3="Lífga upp á núverandi skrár" +02000DA4="Samrýma skrár" + +02000DB1="Allar Skrár" + +02000DC0="Samþjappa" + +; Columns dialog +02000E00="Runur" +02000E01="Veldu runurnar sem þú vilt gera sýnilegar í þessari möppu. Notaðu Fara Upp og Fara Niður takkana til að endurraða rununum." +02000E02="Valda runan ætti að vera" +02000E03="pixlar &vítt." + +02000E10="Fara &Upp" +02000E11="Fara &Niður" +02000E12="&Sýna" +02000E13="&Fela" +02000E14="Setja" + +02000E81="Titill" +02000E82="Vídd" + +; Testing +02000F90="Prófa" + + +; File Manager + +03000000="7-Zip File Manager" + +; Menu +03000102="&Skrá" +03000103="&Skipanir" +03000104="&Útlit" +03000105="&Tól" +03000106="&Hjálp" +03000107="&Uppáhald" + +; File +03000210="&Opna" +03000211="Opna &inni" +03000212="Opna &úti" +03000220="&Skoða" +03000221="&Breyta" +03000230="&Endurnefna" +03000231="&Afrita í..." +03000232="&Færa til..." +03000233="&Eyða" +03000240="&Stillingar" +03000241="&Umsögn" +03000242="Reikna út checksummu" +03000250="Búa til möppu" +03000251="Búa til skrá" +03000260="&Hætta" +03000270="&Búta niður skrá..." +03000271="&Sameina skrár..." + +; Edit +03000310="&Bakka" +03000311="&Gera aftur" +03000320="&Klippa" +03000321="&Afrita" +03000322="&Líma" +03000323="&Eyða" +03000330="Velja &allt" +03000331="Afvelja allt" +03000332="&Öfugsnúið val" +03000333="Velja..." +03000334="Afvelja..." +03000335="Velja eftir tegund" +03000336="Afvelja eftir tegund" + +; View +03000410="&Stórar myndir" +03000411="&Smáar myndir" +03000412="&Listi" +03000413="&Smáatriði" +03000420="Óflokkað" +03000430="Opna aðalmöppu" +03000431="Til baka" +03000432="Yfirlit yfir notkun" +03000440="&Uppfæra" +03000449="Birta heildarinnihald möppu" +03000450="&2 Vinnsluborð" +03000451="&Tólaröð" +03000460="Tólaröð gagnasafns" +03000461="Eðlileg tólaröð" +03000462="Stórir Takkar" +03000463="Sýna texta á tökkum" + +; Tools +03000510="&Stillingar" +03000511="&Hraðaprufa" + +; Help +03000610="&Leiðarvísir" +03000620="&Um 7-Zip..." + +; Favorites +03000710="&Bæta möppu við uppáhald sem" +03000720="Bókarmerki" + +; Options Dialog + +03010000="Stillingar" + +; Plugins +03010100="Viðbætur" +03010101="&Viðbætur:" +03010110="Stillingar..." + +; Edit +03010200="Breytir" +03010201="&Breytir:" + +; System +03010300="Stýrikerfi" +03010302="Innleiða 7-Zip í:" +03010310="Viðbót" + +; Settings +03010400="Stillingar" +03010401="Sýna \"..\" hluti" +03010402="Sýna réttar skráarmyndir" +03010410="Sýna kerfisvalmynd" +03010420="&Fullt raðaval" +03010421="Sýna &hnitalínur" +03010430="&Öðruvísi valstilling" +03010440="Nota &stórar minnissíður" + +; Strings + +03020201="Afrita" +03020202="Færa" +03020203="Afrita í:" +03020204="Færa skrá/möppu til:" +03020205="Afrita..." +03020206="Færa..." +03020207="Þú getur ekki fært eða afritað svona skrár fyrir þessar möppur." +03020208="Skipun er ekki studd." +03020209="Veldu staðsetningarmöppu." + +03020210="Staðfestu Eyðingu Skráar" +03020211="Staðfestu Eyðingu Möppu" +03020212="Staðfestu Fjöldaeyðingu Skráa" +03020213="Ertu viss um að þú viljir eyða '{0}'?" +03020214="Ertu viss um að þú viljir eyða möppunni '{0}' og öllu innihaldi hennar?" +03020215="Ertu viss um að þú viljir eyða þessum {0} skrám?" +03020216="Eyða..." +03020217="Ekki tókst að eyða Skrá eða Möppu" + +03020220="Endurnefna..." +03020221="Villa við endurnafn Skráar eða Möppu" +03020222="Staðfestu Afritun Skráar" +03020223="Ertu viss um að þú viljir afrita þessa skrá í gagnasafn?" + +03020230="Gera Möppu" +03020231="Nafn möppu:" +03020232="Ný Mappa" +03020233="Villa við gerð möppu" + +03020240="Gera Skrá" +03020241="Nafn Skráar:" +03020242="Ný Skrá" +03020243="Villa við gerð skráar" + +03020250="Velja" +03020251="Afvelja" +03020252="Skyggja:" + +03020260="Yfirlit yfir notkun" + +03020280="Skrá '{0}' var breytt.\nViltu uppfæra hana í gagnasafninu?" +03020281="Get ekki uppfært skrá\n'{0}'" +03020282="Get ekki opnað breyti." +03020283="Opna..." + +03020290="Umsögn" +03020291="&Umsögn:" + +030202A0="Kerfi" + +03020300="Tölva" +03020301="Internet" + +03020400="Bæta við" +03020401="Afþjappa" +03020402="Prófa" + +03020420="Afrita" +03020421="Færa" +03020422="Eyða" +03020423="Upplýsingar" + +03020500="Skipta Skrá" +03020501="&Skipta í:" +03020510="Skipta..." +03020520="Staðfestu skiptingu" +03020521="Ertu viss um að þú viljir skipta skránni í {0} hluta?" +03020522="Stærð hluta verður að vera smærri en stærð upprunalegu skrárinnar" + +03020600="Sameina skrár" +03020601="&Sameina í:" +03020610="Sameina..." +03020620="Veldu aðeins fyrstu skránna" + +03020710="Checksumma í vinnslu..." +03020720="Upplýsingar um checksummu" +03020721="CRC checksumma fyrir gögn:" +03020722="CRC checksumma fyrir gögn og nöfn:" + +03020800="Skanna..." + +03020900="Stillingar" + +; Computer +03031100="Heildarstærð" +03031101="Laust pláss" +03031102="Stærð hóps" +03031103="Titill" + +; Network +03031200="Nafn Hér" +03031201="Þjónustugjafi" + +; Benchmark Dialog + +03080000="Hraðaprufa" +03080001="Vinnsluminnisnotkun:" +03080002="Samþjöppun" +03080003="Afþjöppun" +03080004="Hraði" +03080005="Útkoma" +03080006="Heildarútkoma" +03080007="Núverandi" +03080008="Niðurstaða" +03080009="Fjöldi prufa:" +0308000A="Villur:" +0308000B="Örgjörvanotkun" +0308000C="Útkoma / Notkun" + +;!@LangEnd@! + + diff --git a/GUI/Lang/it.txt b/GUI/Lang/it.txt new file mode 100644 index 0000000..e88a87d --- /dev/null +++ b/GUI/Lang/it.txt @@ -0,0 +1,544 @@ +;!@Lang@!UTF-8! +; 7-Zip 4.07 Beta +; Translated by Leandro Spagnol +; +; Updated to 7-Zip v9.15 +; by TJL73 +; Some corrections by Vincenzo Reale +; + +00000000="Italian" +00000001="Italiano" +00000002="16" + +; 7-Zip Configuration + +; Title +01000000="Configurazione di 7-Zip" + +; Info Page +01000100="Informazioni" +01000103="7-Zip è un software libero.\n\nLocalizzazione italiana a cura di:\nTJL73 " +01000104="Supporto tecnico" +01000105="Registra" + +; Folders Page +01000200="Cartelle" +01000210="Cartella di lavoro" +01000211="Cartella &TEMP di sistema" +01000212="&Corrente" +01000213="&Specificata:" +01000214="&Utilizza solo per dischi rimovibili" + +01000281="Specifica una cartella per i file temporanei." + +; System Page +01000300="Shell di sistema" +01000301="Integra 7-Zip nel menu contestuale della shell" +01000302="Menu contestuale a cascata" +01000310="Elementi del menu contestuale:" + +; Language Page +01000400="Lingua" +01000401="Lingua:" + + +; 7-Zip Explorer extension + +; Context menu +02000101="7-Zip" +02000102="Comandi 7-Zip" +02000103="Apri" +02000104="Apre l'archivio selezionato." +02000105="Estrai i file..." +02000106="Estrae i file dall'archivio selezionato." +02000107="Aggiungi all'archivio..." +02000108="Aggiunge i file selezionati all'archivio." +02000109="Verifica l'archivio" +0200010A="Verifica l'integrità dell'archivio selezionato." +0200010B="Estrai qui" +0200010C="Estrae i file dall'archivio selezionato, nella cartella corrente." +0200010D="Estrai in {0}" +0200010E="Estrae i file nella sottocartella specificata." +0200010F="Aggiungi a {0}" +02000110="Aggiunge gli elementi selezionati all'archivio specificato." +02000111="Comprimi ed invia per email..." +02000112="Comprime i file selezionati in un archivio e lo invia per email." +02000113="Comprimi in {0} ed invia per email" +02000114="Comprime i file selezionati nell'archivio specificato e lo invia per email." + +02000140="" +02000141="" + +; Properties +02000203="Percorso" +02000204="Nome" +02000205="Estensione" +02000206="Cartella" +02000207="Dimensione" +02000208="Dimensione compressa" +02000209="Attributi" +0200020A="Creato" +0200020B="Ultimo accesso" +0200020C="Ultima modifica" +0200020D="Solido" +0200020E="Commentato" +0200020F="Cifrato" +02000210="Dividi prima" +02000211="Dividi dopo" +02000212="Dizionario" +02000213="CRC" +02000214="Tipo" +02000215="Anti" +02000216="Metodo" +02000217="OS destinatario" +02000218="File system" +02000219="Utente" +0200021A="Gruppo" +0200021B="Blocco" +0200021C="Commento" +0200021D="Posizione" +0200021E="Percorso completo" +0200021F="Cartelle" +02000220="File" +02000221="Versione" +02000222="Unità" +02000223="Unità multiple" +02000224="Offset" +02000225="Collegamenti" +02000226="Blocchi" +02000227="Unità" + +02000229="64-bit" +0200022A="Big-endian" +0200022B="CPU" +0200022C="Dimensione fisica" +0200022D="Dimensione intestazioni" +0200022E="Checksum" +0200022F="Caratteristiche" +02000230="Indirizzo virtuale" +02000231="ID" +02000232="Nome breve" +02000233="Applicativo origine" +02000234="Dimensione settore" +02000235="Modalità" +02000236="Collegamento" + +; Status bar +02000301="Oggetti selezionati: {0}" +02000302="{0} oggetti" + +02000320="File:" +02000321="Cartelle:" +02000322="Dimensione:" +02000323="Dimensione compressa:" +02000324="Archivi:" + +; List Context Menu +02000401="&Colonne..." + +02000411="&Apri" +02000412="&Estrai..." + +; ToolBar +02000501="Estrai" + +; Messages +02000601="Non è possibile effettuare aggiornamenti su questo archivio." +02000602="Impossibile aggiornare l'archivio {0}" +02000603="Impossibile creare la cartella '{0}'" +02000604="Questo file non è un archivio supportato." +02000605="Errore" +02000606="Troppi elementi" +02000607="L'estensione del file scelto non è associata a nessun programma." +02000608="Nessun errore." +02000609="Impossibile aprire il file '{0}' come archivio." +0200060A="Impossibile aprire l'archivio cifrato '{0}'. Password errata?" +0200060B="Non è possibile allocare la quantità di memoria richiesta" +0200060C="Errore sconosciuto" +0200060D="Archivio non supportato" + +; Dialogs +02000702="OK" +02000705="&Sì" +02000707="Sì per &tutti" +02000709="&No" +0200070B="No per t&utti" + +02000710="Annulla" +02000711="&Annulla" +02000713="&Chiudi" +02000714="Ferma" +02000715="Riavvia" + +02000720="Aiuto" + +; Extract dialog +02000800="Estrai" +02000801="E&strai in:" +02000802="Password" + +02000810="Struttura delle cartelle" +02000811="Percorsi completi" +02000812="Percorsi attuali" +02000813="Nessun percorso" + +02000820="Sovrascrittura" +02000821="Chiedi prima di sovrascrivere" +02000822="Sovrascrivi senza chiedere" +02000823="Non sovrascrivere i file esistenti" +02000824="Rinomina automaticamente" +02000825="Rinomina autom. i file esistenti" + +02000830="File" +02000831="File &selezionati" +02000832="&Tutti i file" + +02000881="Specifica una cartella in cui estrarre i file." + +02000890="Estrazione in corso..." + +; Overwrite dialog +02000900="Conferma la sovrascrittura del file" +02000901="File già esistente nella cartella di destinazione." +02000902="Vuoi sostituire il file esistente" +02000903="con questo?" + +02000911="&Rinomina automaticamente" + +02000982="{0} byte" +02000983="modificato il" + +; Messages dialog +02000A00="Messaggi di diagnostica" + +02000A80="Messaggio" + +02000A91="Metodo di compressione non supportato per '{0}'." +02000A92="Errore nei dati in '{0}'. Il file è danneggiato." +02000A93="CRC non corretto in '{0}'. Il file è danneggiato." +02000A94="Errore nel file cifrato '{0}'. Password errata?" +02000A95="CRC errato nel file cifrato '{0}'. Password errata?" + +; Password dialog +02000B00="Inserisci password" +02000B01="&Inserisci password:" +02000B02="Mostra pass&word" +02000B03="&Reinserisci password:" +02000B10="Password differenti" +02000B11="Per la password, utilizzare solo lettere ASCII, numeri e caratteri speciali (!, #, $, ...)" +02000B12="La password è troppo lunga" + +; Progress dialog +02000C00="Processo" +02000C01="Tempo trascorso:" +02000C02="Tempo rimanente:" +02000C03="Dimensione totale:" +02000C04="Velocità:" +02000C05="Elaborato:" +02000C06="Rapporto compressione:" + +02000C10="&In background" +02000C11="&In primo piano" +02000C12="&Pausa" +02000C13="&Riprendi" + +02000C20="In pausa" + +02000C30="Sei sicuro di voler annullare?" + +; Compress dialog +02000D00="Aggiungi all'archivio" +02000D01="Nome &archivio:" +02000D02="Modalità a&ggiornamento:" +02000D03="&Formato dell'archivio:" +02000D04="&Metodo di compressione:" +02000D05="Crea archivio &solido" +02000D06="Parametri &opzionali:" +02000D07="Opzioni" +02000D08="Crea archivio auto-&estraente" +02000D09="Usa multi-threading" +02000D0A="Cifra anche il &nome dei file" +02000D0B="&Livello di compressione:" +02000D0C="Dimensione &Dizionario:" +02000D0D="Dimensioni &Parola:" +02000D0E="Quantità memoria per compressione:" +02000D0F="Quantità memoria per decompressione:" +02000D10="Cifratura" +02000D11="Metodo &cifratura:" +02000D12="N&umero di flussi (thread) CPU:" +02000D13="Dimensione del &blocco solido:" +02000D14="Non-solido" +02000D15="Solido" +02000D16="Comprimi file condivisi" + +02000D40="Di&vidi in più file (dimensione in byte):" +02000D41="Dimensione non corretta" +02000D42="Dimensione specificata: {0} byte.\nSicuro di voler dividere l'archivio in questo modo?" + +02000D81="Nessuna" +02000D82="Normale" +02000D83="Massima" +02000D84="Veloce" +02000D85="Velocissima" +02000D86="Ultra" + +02000D90="Sfoglia" + +02000DA1="Aggiungi e sostituisci i file" +02000DA2="Aggiorna e aggiungi i file" +02000DA3="Aggiorna i file esistenti" +02000DA4="Sincronizza i file" + +02000DB1="Tutti i file" + +02000DC0="Compressione in corso..." + +; Columns dialog +02000E00="Colonne" +02000E01="Segna le colonne che vuoi rendere visibili in questa cartella. Usa i pulsanti Sposta in alto ed in basso per riordinare le colonne." +02000E02="Le colonne selezionate dovrebbero essere larghe" +02000E03="pixel." + +02000E10="Sposta in &alto" +02000E11="Sposta in &basso" +02000E12="&Mostra" +02000E13="&Nascondi" +02000E14="Imposta" + +02000E81="Titolo" +02000E82="Larghezza" + +; Testing +02000F90="Verifica archivio..." + + +; File Manager + +03000000="7-Zip File Manager" + +; Menu +03000102="&File" +03000103="&Modifica" +03000104="&Visualizza" +03000105="&Strumenti" +03000106="&Aiuto" +03000107="&Preferiti" + +; File +03000210="&Apri" +03000211="Apri in &7-Zip File Manager" +03000212="Apri in E&xplorer" +03000220="&Visualizza" +03000221="Apri con l'&editor predefinito" +03000230="Rino&mina" +03000231="&Copia in..." +03000232="&Sposta in..." +03000233="&Elimina" +03000240="&Proprietà" +03000241="Comme&nto..." +03000242="Calcola chec&ksum" +03000243="Comparazione differenze (Diff)" +03000250="Crea cartella" +03000251="Crea file" +03000260="E&sci" +03000270="&Dividi il file..." +03000271="&Unisci i file..." + +; Edit +03000310="&Annulla" +03000311="&Ripeti" +03000320="Tag&lia" +03000321="&Copia" +03000322="&Incolla" +03000323="&Elimina" +03000330="&Seleziona tutto" +03000331="&Deseleziona tutto" +03000332="In&verti selezione" +03000333="Seleziona..." +03000334="Deseleziona..." +03000335="Seleziona per tipo" +03000336="Deseleziona per tipo" + +; View +03000410="Icone &grandi" +03000411="Icone &piccole" +03000412="&Elenco" +03000413="&Dettagli" +03000420="Nessun ordine" +03000430="Apri cartella principale" +03000431="Livello superiore" +03000432="Cronologia..." +03000440="&Aggiorna" +03000449="Vista non strutturata" +03000450="Interfaccia a &2 pannelli" +03000451="Barre degli &strumenti" +03000460="Barra archivio" +03000461="Barra standard" +03000462="Icone grandi" +03000463="Mostra etichette di testo" + +; Tools +03000510="&Opzioni..." +03000511="&Benchmark" + +; Help +03000610="&Guida..." +03000620="&Informazioni su 7-Zip..." + +; Favorites +03000710="&Aggiungi la cartella ai Preferiti come" +03000720="Collegamento" + +; Options Dialog + +03010000="Opzioni" + +; Plugins +03010100="Plugin" +03010101="Plugin:" +03010110="&Opzioni..." + +; Edit +03010200="Editor" +03010201="&Editor predefinito:" +03010202="Comparatore &differenze (Diff):" + +; System +03010300="Sistema" +03010302="Associa 7-Zip a:" +03010310="Plugin" + +; Settings +03010400="Impostazioni" +03010401="Mostra l'elemento \"..\"" +03010402="Mostra le icone dei file" +03010410="Mostra le icone di sistema" +03010420="Selezione a &riga intera" +03010421="Mostra &griglia" +03010422="Click singolo per aprire una voce" +03010430="Modalità di selezione &alternativa" +03010440="Utilizza pagine &larghe di memoria" + +; Strings + +03020201="Copia" +03020202="Sposta" +03020203="Copia in:" +03020204="Sposta in:" +03020205="Copia in corso..." +03020206="Spostamento in corso..." +03020207="Non è possibile spostare o copiare file in queste cartelle." +03020208="Operazione non supportata per questa cartella." +03020209="Selezionare la cartella di destinazione." + +03020210="Conferma l'eliminazione del file" +03020211="Conferma l'eliminazione della cartella" +03020212="Conferma l'eliminazione di più elementi" +03020213="Sei certo di voler eliminare '{0}'?" +03020214="Sei certo di voler eliminare la cartella '{0}' e tutto il suo contenuto?" +03020215="Sei certo di voler eliminare questi {0} elementi?" +03020216="Eliminazione in corso..." +03020217="Errore nell'eliminazione del file o della cartella" +03020218="Impossibile spostare un file con percorso lungo nel Cestino" + +03020220="Rinomina in corso..." +03020221="Errore nella rinomina del file o cartella" +03020222="Conferma copia" +03020223="Sei sicuro di voler copiare questi file nell'archivio" + +03020230="Crea cartella" +03020231="Nome cartella:" +03020232="Nuova cartella" +03020233="Errore nella creazione della cartella" + +03020240="Crea file" +03020241="Nome file:" +03020242="Nuovo file" +03020243="Errore nella creazione del file" + +03020250="Seleziona" +03020251="Deseleziona" +03020252="Filtro:" + +03020260="Cronologia" + +03020280="Il file '{0}' è stato modificato.\nVuoi aggiornare l'archivio?" +03020281="Impossibile aggiornare il file\n'{0}'" +03020282="Impossibile avviare l'editor." +03020283="Apertura in corso... " +03020284="Il file sembra essere un virus (contiene molti spazi nel nome)." + +03020290="Commento" +03020291="&Commento:" + +030202A0="Sistema" + +03020300="Computer" +03020301="Rete" +03020302="Documenti" + +03020400="Aggiungi" +03020401="Estrai" +03020402="Verifica" + +03020420="Copia" +03020421="Sposta" +03020422="Elimina" +03020423="Proprietà" + +03020500="Dividi file" +03020501="&Dividi in:" +03020510="Dividi in..." +03020520="Conferma divisione" +03020521="Sicuro di voler dividere l'archivio in {0} porzioni?" +03020522="La dimensione di ciascuna porzione deve essere più piccola della dimensione totale dell'archivio originale" + +03020600="Unisci i file" +03020601="&Unisci in:" +03020610="Unisci..." +03020620="Seleziona solo la prima parte del file diviso" +03020621="Impossibile riconoscere il file come archivio diviso" +03020622="Impossibile trovare più di una parte dell'archivio diviso" + +03020710="Calcolo del checksum..." +03020720="Informazioni sul checksum" +03020721="CRC checksum sui dati:" +03020722="CRC checksum su dati e nomi:" + +03020800="Scansione..." + +03020900="Proprietà" + +03020A01="L'operazione non può essere richiamata da una cartella con percorso lungo." +03020A02="Devi selezionare un file" +03020A03="Devi selezionare almeno un file" +03020A04="Il file {0} è già presente" + +; Computer +03031100="Capacità" +03031101="Disponibili" +03031102="Dimensione dei cluster" +03031103="Etichetta" + +; Network +03031200="Nome locale" +03031201="Rete" + +; Benchmark Dialog + +03080000="Benchmark" +03080001="Utilizzo memoria:" +03080002="Compressione in corso" +03080003="Decompressione in corso" +03080004="Velocità" +03080005="Valutazione" +03080006="Valutazione totale" +03080007="Attuale" +03080008="Risultante" +03080009="Passaggi:" +0308000A="Errori:" +0308000B="Utilizzo CPU" +0308000C="Stima / Utilizzo" + +;!@LangEnd@! diff --git a/GUI/Lang/ja.txt b/GUI/Lang/ja.txt new file mode 100644 index 0000000..e7c93af --- /dev/null +++ b/GUI/Lang/ja.txt @@ -0,0 +1,543 @@ +;!@Lang@!UTF-8! +; 7-Zip 9.07 beta +; Translated by Komuro, Mick, 2chBBS-software +; Additions and minor fixes by Stepanushkin Dmitry +; Some fixes by Crus Mitsuaki +; +; + +00000000="Japanese" +00000001="日本語" +00000002="17" + +; 7-Zip Configuration + +; Title +01000000="7-Zipの設定" + +; Info Page +01000100="7-Zipについて" +01000103="7-Zipはフリーソフトウェアです。しかしながら、登録(寄付)することで7-Zipの開発を支援できます。" +01000104="サポート" +01000105="登録" + +; Folders Page +01000200="フォルダ" +01000210="作業フォルダ(&W)" +01000211="システム一時フォルダ(&S)" +01000212="カレントフォルダ(&C)" +01000213="フォルダ指定(&P):" +01000214="リムーバブルドライブのみ使用する" + +01000281="一時ファイルのための場所を指定してください" + +; System Page +01000300="システム" +01000301="シェルコンテキスト(右クリック)メニューに7-Zipを登録" +01000302="7-Zipをサブメニュー化する" +01000310="メニュー項目:" + +; Language Page +01000400="言語" +01000401="言語設定:" + + +; 7-Zip Explorer extension + +; Context menu +02000101="7-Zip" +02000102="7-Zipコマンド" +02000103="開く" +02000104="選択した書庫を開く" +02000105="展開..." +02000106="選択した書庫を展開..." +02000107="圧縮..." +02000108="選択したファイルを圧縮" +02000109="書庫をテスト" +0200010A="選択した書庫をテスト" +0200010B="ここに展開" +0200010C="選択した書庫をここに展開" +0200010D="{0}に展開" +0200010E="サブフォルダに展開" +0200010F="{0}に圧縮" +02000110="選択したファイルを圧縮..." +02000111="圧縮して電子メール送信..." +02000112="選択したファイルを圧縮して電子メール送信..." +02000113="{0}に圧縮して電子メール送信" +02000114="選択したファイルを圧縮して電子メール送信..." + +02000140="<フォルダ>" +02000141="<書庫>" + +; Properties +02000203="パス" +02000204="名前" +02000205="拡張子" +02000206="フォルダ" +02000207="サイズ" +02000208="圧縮後サイズ" +02000209="属性" +0200020A="作成日時" +0200020B="アクセス日時" +0200020C="更新日時" +0200020D="ソリッド" +0200020E="コメント済み" +0200020F="暗号化" +02000210="分割前" +02000211="分割後" +02000212="辞書" +02000213="CRC" +02000214="種類" +02000215="逆" +02000216="圧縮方法" +02000217="ホストOS" +02000218="ファイルシステム" +02000219="ユーザー" +0200021A="グループ" +0200021B="ブロック" +0200021C="コメント" +0200021D="ポジション" +0200021E="パスプレフィックス" +0200021F="フォルダ数" +02000220="ファイル数" +02000221="バージョン" +02000222="ボリューム" +02000223="多重ボリューム書庫" +02000224="オフセット" +02000225="リンク数" +02000226="使用ブロック数" +02000227="ボリューム数" + +02000229="64ビット" +0200022A="ビッグエンディアン" +0200022B="CPU" +0200022C="物理サイズ" +0200022D="ヘッダーサイズ" +0200022E="チェックサム" +0200022F="特性" +02000230="仮想アドレス" +02000231="ID" +02000232="省略名" +02000233="作成アプリケーション" +02000234="セクターサイズ" +02000235="モード" +02000236="リンク" + +; Status bar +02000301="{0}個のオブジェクトを選択" +02000302="{0}個のオブジェクト" + +02000320="ファイル数:" +02000321="フォルダ数:" +02000322="サイズ:" +02000323="圧縮済みサイズ:" +02000324="書庫数:" + +; List Context Menu +02000401="項目(&C)" + +02000411="開く(&O)" +02000412="展開(&E)" + +; ToolBar +02000501="展開" + +; Messages +02000601="この書庫は更新機能がサポートされていません" +02000602="書庫{0}の更新ができません" +02000603="'{0}'フォルダが作成できません" +02000604="対応してない圧縮形式です" +02000605="エラー" +02000606="アイテムが多過ぎます" +02000607="与えられたファイルに関連付けられたアプリケーションはありません" +02000608="正常です" +02000609="ファイル'{0}'は書庫として開くことができません" +0200060A="暗号化された書庫'{0}'を開くことができません。パスワードが間違っていませんか?" +0200060B="要求された量のメモリを割り当てることができません" +0200060C="不明なエラー" +0200060D="未対応の書庫形式です" + +; Dialogs +02000702="OK" +02000705="はい(&Y)" +02000707="全てに はい(&A)" +02000709="いいえ(&N)" +0200070B="全てに いいえ(&L)" + +02000710="キャンセル" +02000711="キャンセル(&C)" +02000713="閉じる(&C)" +02000714="停止" +02000715="再開" + +02000720="ヘルプ" + +; Extract dialog +02000800="展開" +02000801="展開先(&X):" +02000802="パスワード" + +02000810="パス名出力方法" +02000811="絶対パス" +02000812="相対パス" +02000813="パスなし" + +02000820="上書き方法" +02000821="上書きするときは確認する" +02000822="常に上書き" +02000823="ファイルが存在するときはスキップ" +02000824="自動的にリネーム" +02000825="ファイルが存在するときは自動リネーム" + +02000830="ファイル" +02000831="選択したファイル(&S)" +02000832="全てのファイル(&A)" + +02000881="展開先指定" + +02000890="展開中" + +; Overwrite dialog +02000900="ファイル上書き確認" +02000901="このフォルダには既に以下の同じファイルが存在します" +02000902="現在のファイル" +02000903="に次の新しいファイルを上書きしますか?" + +02000911="自動的にリネーム(&U)" + +02000982="{0}バイト" +02000983="更新日時:" + +; Messages dialog +02000A00="診断結果" + +02000A80="メッセージ" + +02000A91="'{0}'はサポートされていない圧縮形式です" +02000A92="'{0}'でデータエラーが発生しました。ファイルは壊れています" +02000A93="'{0}'のCRCが違います。ファイルは壊れています" +02000A94="暗号化されたファイル'{0}'でデータエラーが発生しました。パスワードが間違っていませんか?" +02000A95="暗号化されたファイル'{0}'のCRCが違います。パスワードが間違っていませんか?" + +; Password dialog +02000B00="パスワード入力" +02000B01="パスワード入力:" +02000B02="パスワードを表示する(&S)" +02000B03="パスワード再入力:" +02000B10="パスワードが一致しません" +02000B11="パスワードには半角英数記号(!, #, $, ...)のみを使用してください。" +02000B12="パスワードがあまりに長過ぎます" + +; Progress dialog +02000C00="処理" +02000C01="経過時間:" +02000C02="残り時間:" +02000C03="サイズ:" +02000C04="速度:" +02000C05="処理済み:" +02000C06="圧縮率:" + +02000C10="バックグラウンド(&B)" +02000C11="フォアグラウンド(&F)" +02000C12="一時停止(&P)" +02000C13="続行(&C)" + +02000C20="一時停止" + +02000C30="本当に圧縮を取りやめますか?" + +; Compress dialog +02000D00="ファイル圧縮" +02000D01="圧縮先(&A):" +02000D02="更新方法(&U):" +02000D03="書庫形式(&F):" +02000D04="圧縮メソッド(&M):" +02000D05="ソリッド書庫作成(&S)" +02000D06="パラメータ(&P):" +02000D07="オプション" +02000D08="自己展開書庫作成(&X)" +02000D09="マルチスレッド利用" +02000D0A="ファイル名を暗号化(&N)" +02000D0B="圧縮レベル(&L):" +02000D0C="辞書サイズ(&D):" +02000D0D="ワードサイズ(&W):" +02000D0E="圧縮に必要なメモリ:" +02000D0F="展開に必要なメモリ:" +02000D10="暗号化" +02000D11="暗号化メソッド:" +02000D12="CPUスレッド数:" +02000D13="ソリッドブロックサイズ:" +02000D14="ソリッドなし" +02000D15="無制限" +02000D16="共有されたファイル圧縮" + +02000D40="書庫を分割(&V):" +02000D41="不正なボリュームサイズ" +02000D42="選択されたボリュームサイズ:{0}バイト\nこのサイズに書庫を分割しますか?" + +02000D81="無圧縮" +02000D82="標準" +02000D83="最高" +02000D84="高速" +02000D85="最速" +02000D86="超圧縮" + +02000D90="閲覧" + +02000DA1="全てのファイル上書き" +02000DA2="ファイル追加と更新" +02000DA3="変更したファイルのみ更新" +02000DA4="ファイルを同期させる" + +02000DB1="全てのファイル" + +02000DC0="圧縮" + +; Columns dialog +02000E00="項目" +02000E01="表示したい項目をチェックしてください。表示したい項目の順番を変えるには移動ボタンで変えます。" +02000E02="選択した項目の表示幅を設定します" +02000E03="ピクセル幅(&W)" + +02000E10="上に移動(&U)" +02000E11="下に移動(&D)" +02000E12="表示(&S)" +02000E13="隠す(&H)" +02000E14="設定" + +02000E81="タイトル" +02000E82="幅" + +; Testing +02000F90="テスト中" + + +; File Manager + +03000000="7-Zipファイルマネージャ" + +; Menu +03000102="ファイル(&F)" +03000103="編集(&E)" +03000104="表示(&V)" +03000105="ツール(&T)" +03000106="ヘルプ(&H)" +03000107="お気に入り(&A)" + +; File +03000210="開く(&O)" +03000211="このフォルダ内で開く(&I)" +03000212="別ウィンドウで開く(&U)" +03000220="表示(&V)" +03000221="編集(&E)" +03000230="名前の変更(&M)" +03000231="コピー(&C)..." +03000232="移動(&M)..." +03000233="削除(&D)" +03000240="プロパティ(&R)" +03000241="コメント(&N)" +03000242="チェックサムの計算" +03000243="比較" +03000250="フォルダ作成" +03000251="ファイル作成" +03000260="閉じる(&X)" +03000270="ファイル分割(&S)..." +03000271="ファイル結合(&B)..." + +; Edit +03000310="元に戻す(&U)" +03000311="やり直す(&R)" +03000320="切り取り(&T)" +03000321="コピー(&C)" +03000322="貼り付け(&P)" +03000323="削除(&D)" +03000330="全て選択(&A)" +03000331="全て選択解除" +03000332="反転選択(&I)" +03000333="選択..." +03000334="選択解除..." +03000335="同一形式選択" +03000336="同一形式選択解除" + +; View +03000410="大きいアイコン(&G)" +03000411="小さいアイコン(&M)" +03000412="一覧(&L)" +03000413="詳細(&D)" +03000420="並べ替え解除" +03000430="ルートフォルダを開く" +03000431="1つ上の階層へ" +03000432="フォルダ履歴..." +03000440="リフレッシュ(&R)" +03000449="フラットビュー" +03000450="&2分割画面" +03000451="ツールバー(&T)" +03000460="書庫ツールバー" +03000461="標準ツールバー" +03000462="大きなボタン" +03000463="テキスト表示" + +; Tools +03000510="オプション(&O)..." +03000511="ベンチマーク(&B)" + +; Help +03000610="ヘルプの表示(&C)..." +03000620="7-Zipについて(&A)..." + +; Favorites +03000710="フォルダをお気に入りに追加(&A)" +03000720="ブックマーク" + +; Options Dialog + +03010000="オプション" + +; Plugins +03010100="プラグイン" +03010101="プラグイン(&P):" +03010110="オプション..." + +; Edit +03010200="外部ツール" +03010201="エディタ(&E):" +03010202="ファイル比較(diff)(&D):" + +; System +03010300="システム" +03010302="7-Zipに関連付けるファイル:" +03010310="プラグイン" + +; Settings +03010400="設定" +03010401="'..'を表示する" +03010402="各ファイルの実際のアイコンを表示する" +03010410="システム(エクスプローラ)のメニューも表示する" +03010420="行単位(列アイテムを一括)で選択する(&F)" +03010421="グリッド線を表示する(&G)" +03010422="シングルクリックで開く" +03010430="選択的な選択モードにする(&A)" +03010440="大きなメモリページを使用する(&L)" + +; Strings + +03020201="コピー" +03020202="移動" +03020203="フォルダへコピー:" +03020204="フォルダへ移動:" +03020205="コピーしています..." +03020206="移動しています..." +03020207="そのフォルダにはコピーもしくは移動ができません。" +03020208="この操作はサポートされていません。" +03020209="対象のフォルダを選択してください。" + +03020210="ファイル削除の確認" +03020211="フォルダ削除の確認" +03020212="複数ファイル削除の確認" +03020213="'{0}'を本当に削除しますか?" +03020214="'{0}'フォルダとその中身のすべてを削除しますか?" +03020215="これらの{0}個の項目を本当に削除しますか?" +03020216="削除中..." +03020217="ファイルまたはフォルダの削除エラー" +03020218="ファイルのパスが長すぎるため、ファイルをごみ箱に移動できません" + +03020220="リネームしています..." +03020221="ファイルまたはフォルダのリネームエラー" +03020222="ファイルコピーの確認" +03020223="本当にファイルを書庫に追加しますか?" + +03020230="フォルダ作成" +03020231="フォルダ名:" +03020232="新しいフォルダ" +03020233="フォルダ作成エラー" + +03020240="ファイル作成" +03020241="ファイル名:" +03020242="新しいファイル" +03020243="ファイル作成エラー" + +03020250="選択" +03020251="選択解除" +03020252="マスク:" + +03020260="フォルダ履歴" + +03020280="'{0}'ファイルが変更されています。\n書庫を更新しますか?" +03020281="ファイルを更新できません。\n'{0}'" +03020282="エディタを起動できません。" +03020283="開いています..." +03020284="このファイルは、ウイルスのように見えます(ファイル名に大量のスペースを含んでいる)。" + +03020290="コメント" +03020291="コメント(&C):" + +030202A0="システム" + +03020300="コンピュータ" +03020301="ネットワーク" +03020302="ドキュメント" + +03020400="追加" +03020401="展開" +03020402="テスト" + +03020420="コピー" +03020421="移動" +03020422="削除" +03020423="情報" + +03020500="ファイル分割" +03020501="分割先(&S):" +03020510="分割中..." +03020520="分割の確認" +03020521="{0}個にファイルを分割してもよろしいですか?" +03020522="分割後のサイズは元のファイルサイズより小さいサイズを指定してください" + +03020600="ファイル結合" +03020601="結合先(&C):" +03020610="結合中..." +03020620="分割ファイルの先頭のファイルだけ選択してください" +03020621="分割ファイルが見つかりません" +03020622="分割ファイルの一部しか見つかりません" + +03020710="チェックサム計算中..." +03020720="チェックサム情報" +03020721="データのCRCチェックサム:" +03020722="データと名前のCRCチェックサム:" + +03020800="スキャン中..." + +03020900="プロパティ" + +03020A01="パスが長いフォルダではこの操作を実行できません。" +03020A02="1つのファイルを選択してください" +03020A03="1つ以上のファイルを選択してください" +03020A04="{0}ファイルは既に存在しています" + +; Computer +03031100="合計サイズ" +03031101="空き領域" +03031102="クラスタサイズ" +03031103="ラベル" + +; Network +03031200="ローカル名" +03031201="プロバイダ" + +; Benchmark Dialog + +03080000="ベンチマーク" +03080001="必要メモリ:" +03080002="圧縮中" +03080003="展開中" +03080004="スピード" +03080005="評価" +03080006="総合評価" +03080007="現在" +03080008="結果" +03080009="テスト回数:" +0308000A="エラー:" +0308000B="CPU使用率" +0308000C="評価 / 使用率" + +;!@LangEnd@! diff --git a/GUI/Lang/ka.txt b/GUI/Lang/ka.txt new file mode 100644 index 0000000..9b82472 --- /dev/null +++ b/GUI/Lang/ka.txt @@ -0,0 +1,454 @@ +;!@Lang@!UTF-8! +; 7-Zip 4.07 beta +; Translated by Dimitri Gogelia +; +; +; +; + +00000000="Georgian" +00000001="ქართული" +00000002="55" + +; 7-Zip Configuration + +; Title +01000000="7-Zip-ის კონფიგურირება " + +; Info Page +01000100="7-Zip-ის შესახებ" +01000103="7-Zip თავისუფალად გავრცელებადი პროგრამული უზრუნველყოფაა. თუ გსურთ, რომ მხარი დაუჭიროთ 7-Zip-ის შექმნას, შეგიძლიათ დაარეგისტრიროთ პროგრამა. როგორც რეგისტრირებულ მომხმარებელს, თქვენ გექნებათ ტექნიკური მხარდაჭერა." +01000105="რეგისტრაცია" + +; Folders Page +01000200="საქაღალდეები" +01000210="მუშა საქაღალდე" +01000211="სისტემური დროებითი საქაღალდე" +01000212="მიმდინარე" +01000213="ამორჩევა:" +01000214="გამოიყენება მხოლოდ ცვლადი მატარებლებისათვის" + +01000281="მიუთითეთ ადგილმდებარეობა დროებითი არქივებისათვის." + +; System Page +01000300="სისტემა" +01000301="7-Zip-ის გარსის კონტექსტურ მენიუში ჩადგმა" +01000302="კასკადური კონტექსტური მენიუ" +01000310="კონტექსტური მენიუს ელემენტები:" + +; Language Page +01000400="ენა" +01000401="ენა:" + + +; 7-Zip Explorer extension + +; Context menu +02000101="7-Zip" +02000102="7-Zip-ის ბრძანებები" +02000103="არქივის გახსნა" +02000104="მონიშნული არქივის გახსნა." +02000105="გახსნა..." +02000106="ფაილების გახსნა მონიშნული არქივიდან." +02000107="არქივში დამატება..." +02000108="მონიშნული ობიექტების არქივში დამატება." +02000109="ტესტირება" +0200010A="მონიშნული არქივის ტესტირება." +0200010B="გახსნა აქ" +0200010C="ფაილების გახსნა მონიშნული არქივიდან მიმდინარე საქაღალდეში." +0200010D="გახსნა {0}-ში" +0200010E="ფაილების გახსნა ქვე-საქაღალდეში." +0200010F="{0}-ში დამატება" +02000110="მონიშნული ობიექტების არქივში დამატება." +02000111="შეიკუმშოს და გაიგზავნოს ელ-ფოსტით..." +02000112="შეიკუმშოს მონიშნული ობიექტები არქივში და გაიგზავნოს ელ-ფოსტით." +02000113="შეიკუმშოს {0} და გაიგზავნოს ელ-ფოსტით" +02000114="შეიკუმშოს მონიშნული ობიექტები არქივში და გაიგზავნოს ელ-ფოსტით." + +02000140="<საქაღალდე>" +02000141="<არქივი>" + +; Properties +02000203="გზა" +02000204="სახელი" +02000205="გაფართოება" +02000206="საქაღალდე" +02000207="ზომა" +02000208="შეკუმშულის ზომა" +02000209="ატრიბუტები" +0200020A="შექმნილია" +0200020B="გახსნილია" +0200020C="მოდიფიცირებულია" +0200020D="უწყვეტი" +0200020E="კომენტარი" +0200020F="დაშიფრულია" +02000210="Split Before" +02000211="Split After" +02000212="ლექსიკონი" +02000213="CRC" +02000214="ტიპი" +02000215="ანტი" +02000216="მეთოდი" +02000217="სისტემა" +02000218="ფაილური სისტემა" +02000219="მომხმარებელი" +0200021A="ჯგუფი" +0200021B="ბლოკი" +0200021C="კომენტარი" +0200021D="პოზიცია" + +; Status bar +02000301="მონიშნულია {0} ობიექტი" +02000302="{0} ობიექტი" + +; List Context Menu +02000401="სვეტები..." + +02000411="გახსნა" +02000412="ამოღება..." + +; ToolBar +02000501="ამოღება" + +; Messages +02000601="ამ ტიპის არქივისათვის ცვლილების ოპერაცია ხელმიუწვდომელია." +02000602="ვერ შევცვალე არქივი {0}" +02000603="ვერ შევქმენი საქაღალდე '{0}'" +02000604="ფაილი არ წარმოადგენს არქივს." +02000605="შეცდომა" +02000606="ძალზე ბევრი ელემენტი" +02000607="ასეთი ტიპის ფაილის გაფართოებასთან არ არის ასოცირებული არცერთი პროგრამა" +02000608="შეცდომები არ არის ნაპოვნი" + +; Dialogs +02000702="OK" +02000705="დიახ" +02000707="დიახ ყველასათვის" +02000709="არა" +0200070B="არა ყველასათვის" + +02000710="გაუქმება" +02000711="გაუქმება" +02000713="დახურვა" +02000714="სტოპ" +02000715="გადატვირთვა" + +02000720="ცნობარი" + +; Extract dialog +02000800="ამოღება" +02000801="ამოღება:" +02000802="პაროლი" + +02000810="გზა" +02000811="სრული გზა" +02000812="შეფარდებითი გზა" +02000813="გზის გარეშე" + +02000820="თავზე გადაწერის მეთოდი" +02000821="თავზე გადაწერა თანხმობით" +02000822="თავზე გადაწერა თანხმობის გარეშე" +02000823="გამოტოვება" +02000824="ავტონ. გადარქმევა" +02000825="გახსნილი ფაილების ავტონ. გადარქმევა" + +02000830="ფაილები" +02000831="მონიშნული ფაილები" +02000832="ყველა ფაილი" + +02000881="მიუთითეთ ადგილი ამოსაღები ფაილებისათვის." + +02000890="ამოღება" + +; Overwrite dialog +02000900="ფაილის შეცვლის დასტური" +02000901="საქაღალდე უკვე შეიცავს დამუშავებად ფაილს." +02000902="შეიცვალოს მიმდინარე ფაილი" +02000903="შემდეგი ფაილით?" + +02000911="ავტონ. გადარქმევა" + +02000982="{0} ბაიტი" +02000983="შეცვლილია" + +; Messages dialog +02000A00="დიაგნოსტიკური შეტყობინება" + +02000A80="შეტყობინება" + +02000A91="შეკუმშვის შეუთავსებადი მეთოდი '{0}'-თვის." +02000A92="მონაცემების შეცდომა '{0}'-ში. ფაილი დაზიანებულია." +02000A93="CRC-ის შეცდომა '{0}'-ში. ფაილი დაზიანებულია." + +; Password dialog +02000B00="პაროლის შეტანა" +02000B01="შეიყვანეთ პაროლი:" +02000B02="პაროლის ჩვენება" + +; Progress dialog +02000C00="პროცესი" +02000C01="გასული დრო:" +02000C02="დარჩენილი დრო:" +02000C03="ზომა:" +02000C04="სიჩქარე:" + +02000C10="ფონურად" +02000C11="წინა პლანზე" +02000C12="პაუზა" +02000C13="გაგრძელება" + +02000C20="დაპაუზებულია" + +02000C30="დარწმუნებული ხართ, რომ გინდათ შეწყვიტოთ ოპერაცია?" + +; Compress dialog +02000D00="არქივში დამატება" +02000D01="არქივი:" +02000D02="განახლების რეჟიმი:" +02000D03="არქივის ფორმატი:" +02000D04="შეკუმშვის მეთოდი:" +02000D05="შეიქმნას უწყვეტი არქივი" +02000D06="პარამეტრები:" +02000D07="ოფციები" +02000D08="შეიქმნას SFX-არქივი" +02000D09="მრავალნაკადიანი" +02000D0A="ფაილების სახელების დაშიფვრა" +02000D0B="შეკუმშვის დონე:" +02000D0C="ლექსიკონის ზომა:" +02000D0D="სიტყვის ზომა:" +02000D0E="მეხსიერების ზომა შეკუმშვისათვის:" +02000D0F="მეხსიერების ზომა გახსნისათვის:" + +02000D40="დაიყოს ტომებად:" + +02000D81="შეკუმშვის გარეშე" +02000D82="ნორმალური" +02000D83="მაქსიმუმი" +02000D84="სწრაფი" +02000D85="უსწრაფესი" +02000D86="ულტრა" + +02000D90="ნახვა" + +02000DA1="დამატება და შეცვლა" +02000DA2="განახლება და დამატება" +02000DA3="განახლება" +02000DA4="ფაილების სინქრონიზაცია" + +02000DB1="ყველა ფაილი" + +02000DC0="შეკუმშვა" + +; Columns dialog +02000E00="სვეტები" +02000E01="მონიშნეთ სვეტები, რომლებიც უნდა გამოჩნდეს ამ საქაღალდეში. ღილაკებით ”ზევით” და ”ქვევით” შეიძლება დაყენდეს სვეტების მსველობის თანმიმდევრობა." +02000E02="მონიშნული სვეტების სიგანე უნდა იყოს" +02000E03="წერტილი." + +02000E10="ზევით" +02000E11="ქვევით" +02000E12="ჩვენება" +02000E13="დამალვა" +02000E14="დაყენება" + +02000E81="სახელი" +02000E82="სიგანე" + +; Testing +02000F90="ტესტირება" + + +; File Manager + +03000000="7-Zip ფაილების მმართველი" + +; Menu +03000102="ფაილი" +03000103="რედაქტირება" +03000104="ნახვა" +03000105="სერვისი" +03000106="ცნობარი" +03000107="სანიშნეები" + +; File +03000210="გახსნა" +03000211="გაიხსნას შიგნით" +03000212="გაიხსნას გარეთ" +03000220="დათვალიერება" +03000221="რედაქტირება" +03000230="სახელის გადარქმევა" +03000231="ასლი..." +03000232="გადატანა..." +03000233="წაშლა" +03000240="თვისებები" +03000241="კომენტარი" +03000250="საქაღალდის შექმნა" +03000251="ფაილის შექმნა" +03000260="გამოსვლა" +03000270="ფაილის დაშლა..." +03000271="ფაილების გაერთიანება..." + +; Edit +03000310="გაუქმება" +03000311="აღდგენა" +03000320="ამოჭრა" +03000321="ასლი" +03000322="ჩასმა" +03000323="წაშლა" +03000330="სრული მონიშვნა" +03000331="მონიშვნის გაუქმება" +03000332="მონიშვნის უკუცვლა" +03000333="მოინიშნოს..." +03000334="მოიხსნას მონიშვნა..." +03000335="მოინიშნოს ტიპის მიხედვით" +03000336="მონიშვნის მოხსნა ტიპის მიხედვით" + +; View +03000410="მსხვილი პიქტოგრამები" +03000411="პატარა პიქტოგრამები" +03000412="სია" +03000413="ცხრილი" +03000420="არასორტირებული" +03000430="ძირეული საქაღალდის გახსნა" +03000431="ერთი დონით ზევით" +03000432="საქაღალდეების ისტორია..." +03000440="განახლება" +03000450="2 პანელი" +03000451="ინსტრუმენტების პანელი" +03000460="არქივირების პანელი" +03000461="ძირითადი პანელი" +03000462="მსხვილი პანელები" +03000463="წარწერები ღილაკებზე" + +; Tools +03000510="აწყობა..." +03000511="წარმადობის ტესტირება" + +; Help +03000610="თავფურცელი..." +03000620="7-Zip-ის შესახებ..." + +; Favorites +03000710="დაემატოს საქაღალდე სანიშნეებში როგორც" +03000720="სანიშნე" + +; Options Dialog + +03010000="აწყობა" + +; Plugins +03010100="ჩადგმები" +03010101="ჩადგმები:" +03010110="თვისებები..." + +; Edit +03010200="რედაქტორი" +03010201="რედაქტორი:" + +; System +03010300="სისტემა" +03010302="ასოციაცია 7-Zip-თან:" +03010310="ჩადგმა" + +; Settings +03010400="აწყობა" +03010401="\"..\" ელემენტის ჩვენება" +03010402="ფაილების რეალური პიქტოგრამების ჩვენება" +03010410="სისტემური მენიუს ჩვენება" +03010420="კურსორი მთელ სტრიქონზე" +03010421="გამყოფის ჩვენება" + +; Strings + +03020201="ასლის აღება" +03020202="გადატანა" +03020203="ასლი:" +03020204="გადატანა:" +03020205="ასლის აღება..." +03020206="გადატანა..." +03020207="ამ საქაღალდეებისათვის ობიექტების ასლირება დაუშვებელია." +03020208="ოპერაცია არ ხორციელდება." + +03020210="ფაილის წაშლის თანხმობა" +03020211="საქაღალდის წაშლის თანხმობა" +03020212="რამდენიმე ფაილის წაშლის თანხმობა" +03020213="დარწმუნებული ხართ, რომ გინდათ წაშალოთ '{0}'?" +03020214="დარწმუნებული ხართ, რომ გინდათ წაშალოთ '{0}' საქაღალდე და მთელი მისი შიგთავსი?" +03020215="დარწმუნებული ხართ, რომ გინდათ წაშალოთ {0} ელემენტები?" +03020216="იშლება..." +03020217="ფაილის ან საქაღალდის წაშლის შეცდომა" + +03020220="გადარქმევა..." +03020221="ფაილის ან საქაღალდის გადარქმევის შეცდომა" + +03020230="საქაღალდის შექმნა" +03020231="საქაღალდის სახელი:" +03020232="ახალი საქაღალდე" +03020233="შეცდომა საქაღალდის შექმნისას" + +03020240="ფაილის შექმნა" +03020241="ფაილის სახელი:" +03020242="ახალი ფაილი" +03020243="ფაილის შექმნის შეცდომა" + +03020250="მონიშვნა" +03020251="მონიშვნის გაუქმება" +03020252="ნიღაბი:" + +03020260="საქაღალდეების ისტორია" + +03020280="ფაილი '{0}' შეიცვალა.\nგნებავთ მისი არქივში განახლება?" +03020281="შეუძლებელია \n'{0}'-ის განახლება" +03020282="შეუძლებელია რედაქტორის გაშვება." +03020283="იხსნება..." + +03020290="კომენტარი" +03020291="კომენტარი:" + +030202A0="სისტემა" + +03020300="კომპიუტერი" +03020301="ქსელი" + +03020400="დამატება" +03020401="ამოღება" +03020402="ტესტირება" + +03020420="ასლი" +03020421="გადაადგილება" +03020422="წაშლა" +03020423="ინფორმაცია" + +03020500="ფაილის დაშლა" +03020501="დაიშალოს:" +03020510="დაშლა..." + +03020600="Combine Files" +03020601="&Combine to:" +03020610="Combining..." + +; Computer +03031100="მოცულობა" +03031101="თავისუფალი სივრცე" +03031102="კლასტერის ზომა" +03031103="ჭდე" + +; Network +03031200="ლოკალური სახელი" +03031201="პროვაიდერი" + +; Benchmark Dialog + +03080000="წარმადობის ტესტირება" +03080001="გამოყენებული მეხსიერების ზომა:" +03080002="შეკუმშვა" +03080003="გაშლა" +03080004="სიჩქარე" +03080005="რეიტინგი" +03080006="საერთო რეიტინგი" +03080007="მიმდინარე" +03080008="შემაჯამებელი" +03080009="გატარება:" +0308000A="შეცდომა:" + +;!@LangEnd@! diff --git a/GUI/Lang/kk.txt b/GUI/Lang/kk.txt new file mode 100644 index 0000000..cddbe5b --- /dev/null +++ b/GUI/Lang/kk.txt @@ -0,0 +1,543 @@ +;!@Lang@!UTF-8! +; 7-Zip 9.07 +; Translated by Arslan, Arman Beisenov's +; +; +; +; + +00000000="Kazakh" +00000001="Қазақша" +00000002="63" + +; 7-Zip Configuration + +; Title +01000000="7-Zip - Конфигурациясы" + +; Info Page +01000100="7-Zip туралы" +01000103="7-Zip - тегін таратылатын бағдарлама." +01000104="Қолдау" +01000105="Тіркелу" + +; Folders Page +01000200="Қалта" +01000210="&Жұмыс қалтасы" +01000211="&Жүйелік уақытша қалта" +01000212="&Ағымдық" +01000213="&Сұрау:" +01000214="Тек алмалы тасығыштарға ғана пайдалану" + +01000281="Уақытша мұрағаттардың орнын нұсқаңыз." + +; System Page +01000300="Жүйе" +01000301="Мұқабаның мәтінміндің мәзіріне 7-Zip қою" +01000302="Каскадты мәтінмәндік мәзір" +01000310="Мәтінміндік мәзірдің элементтері:" + +; Language Page +01000400="Тіл" +01000401="Тіл:" + + +; 7-Zip Explorer extension + +; Context menu +02000101="7-Zip" +02000102="7-Zip әмірлері." +02000103="Мұрағат ашу" +02000104="Ерекшеленген мұрағатты ашу." +02000105="Бумадан шешу" +02000106="Файлды ерекшеленген мұрағатан шығару." +02000107="Мұрағатқа үстеу..." +02000108="Ерекшеленген нысанды мұрағатқа үстеу." +02000109="Тестілеу" +0200010A="Ерекшеленген мұрағатты тестілеу." +0200010B="Мұнда шешу" +0200010C="Ерекшеленген мұрағаттағы файлды ағымдық қалтаға шығару." +0200010D="{0} дегенде шешу" +0200010E="Файлды каталог астында шығару." +0200010F="{0} дегенге үстеу" +02000110="Ерекшеленген нысандарды мұрағатқа үстеу." +02000111="Сығып э-поштамен жіберу..." +02000112="Ерекшеленген нысанды сығып, мұрағатты э-поштамен жіберу." +02000113="{0} дегенде сығып, э-поштамен жіберу" +02000114="Ерекшеленген нысанды сығып, мұрағатты э-поштамен жіберу." + +02000140="<Қалта>" +02000141="<Мұрағат>" + +; Properties +02000203="Жол" +02000204="Аты" +02000205="Кеңейтімі" +02000206="Қалта" +02000207="Көлем" +02000208="Сығылған" +02000209="Атрибут" +0200020A="Жасалған" +0200020B="Ашылған" +0200020C="Өзгерген" +0200020D="Үзіліссіз" +0200020E="Комментарий" +0200020F="Шифрланған" +02000210="дейін бөлінген" +02000211="кейін бөлінген" +02000212="Сөздік" +02000213="CRC" +02000214="Түрі" +02000215="Анти" +02000216="Тәсіл" +02000217="Жүйе" +02000218="Файлдық жүйе" +02000219="Пайдаланушы" +0200021A="Топ" +0200021B="Блок" +0200021C="Комментарий" +0200021D="Орны" +0200021E="Жолы" +0200021F="Қалта" +02000220="Файл" +02000221="Нұсқа" +02000222="Том" +02000223="Көп томды" +02000224="Жылжу" +02000225="Сілтеме" +02000226="Блок" +02000227="Том" + +02000229="64-bit" +0200022A="Big-endian" +0200022B="Процессор" +0200022C="Физикалық көлемі" +0200022D="Тақырып көлемі" +0200022E="Бақылау сомасы" +0200022F="Характеристика" +02000230="Виртуальды мекен-жай" +02000231="ID" +02000232="Қысқа аты" +02000233="Жасаушы" +02000234="Сектор көлемі" +02000235="Режим" +02000236="Сілтеме" + +; Status bar +02000301="Ерекшеленген нысан: {0}" +02000302="{0} нысан" + +02000320="Файл:" +02000321="Қалта:" +02000322="Көлем:" +02000323="Сығылған:" +02000324="Мұрағат:" + +; List Context Menu +02000401="&Баған..." + +02000411="&Ашу" +02000412="&Шығару..." + +; ToolBar +02000501="Шығару" + +; Messages +02000601="Көтермейтін мұрағат үшін операция өзгертіледі." +02000602="{0} мұрағатын өзгерту мүмкін емес" +02000603="'{0}' қалтасын жасау мүмкін емес" +02000604="Файл көтеретін мұрағат емес" +02000605="Қателік" +02000606="Өте көп элемент" +02000607="Бағдарлама ассоцирациясы жоқ" +02000608="Қателік табылған жоқ" +02000609="'{0}' файлды мұрағат ретінде ашу мүмкін емес" +0200060A="Шифрланған '{0}' мұрағатты ашу мүмкін емес. Кілтсөз дұрыс емес пе?" +0200060B="Бос жад жоқ" +0200060C="Белгісіз қателік" +0200060D="Көтермейтін мұрағат түрі" + +; Dialogs +02000702="Жарайды" +02000705="&Иә" +02000707="Бәріне &ия" +02000709="&Жоқ" +0200070B="Бәріне &жоқ" + +02000710="Болдырмау" +02000711="&Болдырмау" +02000713="&Жабу" +02000714="Тоқтату" +02000715="Қайта іске қосу" + +02000720="Анықтама" + +; Extract dialog +02000800="Шығару" +02000801="&Мұнда шешу:" +02000802="&Кілтсөз" + +02000810="Жолдар" +02000811="&Толық жол" +02000812="&Қатысы бар жол" +02000813="&Жолсыз" + +02000820="Қайта жазу" +02000821="&Растаумен" +02000822="&Растаусыз" +02000823="Өткізіп &жіберу" +02000824="Автоматты қайта атау." +02000825="Бар файлды автом. қайта атау" + +02000830="Файл" +02000831="Таңдалған файл" +02000832="Барлық файл" + +02000881="Шығарылатын файл орнын нұсқаңыз." + +02000890="Шешу" + +; Overwrite dialog +02000900="Файлды ауыстыру растау" +02000901="Қалтада іс жүргізілетін файл бар." +02000902="Файлды ауыстыру" +02000903="келесі файлмен ба?" + +02000911="Автоматты қайта атау" + +02000982="{0} байт" +02000983="өзгерген" + +; Messages dialog +02000A00="Хабарлама" + +02000A80="Хабарлама" + +02000A91="'{0}' файлы үшін сығу әдісін көтермейді." +02000A92="'{0}' мәліметінде қателік. Файл зақымдалған." +02000A93="'{0}' CRC қателік. Файл зақымдалған." +02000A94="Шифрланған '{0}' файлында мәліміт қате. Кілтсөз дұрыс емес пе?" +02000A95="Шифрланған '{0}' файлында CRС қате. Кілтсөз дұрыс емес пе?" + +; Password dialog +02000B00="Кілтсөзді енгізу" +02000B01="&Кілтсөзді енгізіңіз:" +02000B02="&Кілтсөзді көрсету" +02000B03="&Кілтсөзді қайталаңыз:" +02000B10="Кілтсөздер сәйкес емес" +02000B11="Кілтсөзге тек ағылшын әліпбиін пайдаланыңыз, сандар және арнайы нышандар (!, #, $, ...)" +02000B12="Кілтсөз өте ұзақ" + +; Progress dialog +02000C00="Процесс" +02000C01="Өтті:" +02000C02="Қалды:" +02000C03="Барлығы:" +02000C04="Жылд.:" +02000C05="Көлем:" +02000C06="Сығу дәрежесі:" + +02000C10="&Фонды" +02000C11="&Алдыңғы жоспарға" +02000C12="&Үізілс" +02000C13="&Жалғастыру" + +02000C20="Үзілісте" + +02000C30="Операцияны тоқтату керек пе?" + +; Compress dialog +02000D00="Мұрағатқа үстеу" +02000D01="&Мұрағат:" +02000D02="&Өзгерту режимі:" +02000D03="&Мұрағат пішімі:" +02000D04="&Сығу тәсілі:" +02000D05="&Solid мұрағат жасау" +02000D06="&Параметр:" +02000D07="&Баптау" +02000D08="SF&X-мұрағат жасау" +02000D09="&Көп ағымды" +02000D0A="&Файлдың атын шифрлау" +02000D0B="&Сығу деңгейі:" +02000D0C="Сөздік &көлемі:" +02000D0D="Сөз &көлемі:" +02000D0E="Бууға арналған көлем:" +02000D0F="Шешуге арналған көлем:" +02000D10="Шифрлау" +02000D11="Шифрлау тәсілі:" +02000D12="Ағым саны:" +02000D13="Блог көлемі:" +02000D14="Файл көлемі б-ша" +02000D15="Үзіліссіз" +02000D16="Ашылған файд жазу үшін сығу" + +02000D40="Томға бөлшектеу (байтқа):" +02000D41="Томның көлемін енгізу қате" +02000D42="Томның орнатылған көлемі: {0} байт.\nМұрағатты томға бөлшектеу керек пе?" + +02000D81="Сығусыз" +02000D82="Кәдімгі" +02000D83="Ең жоғарғы" +02000D84="Шапшаң" +02000D85="Жылдам" +02000D86="Ультра" + +02000D90="Сапыру" + +02000DA1="Үстеу, ауыстыру" +02000DA2="Жаңарту, үстеу" +02000DA3="Жаңату" +02000DA4="Теңестіру" + +02000DB1="Барлық файл" + +02000DC0="Компрессия" + +; Columns dialog +02000E00="Бағандар" +02000E01="Осы қалтада көрсетілетін бағандарды белгілеңіз. \"Жоғары\" және \"Төмен\" пернелерімен бағандардың орнын реттеуге болады." +02000E02="Таңдалған бағандарда ен болуы керек" +02000E03="нүкте." + +02000E10="Жоғары" +02000E11="Төмен" +02000E12="Көрсету" +02000E13="Жасыру" +02000E14="Орнату" + +02000E81="Аты" +02000E82="Ені" + +; Testing +02000F90="Тестілеу" + + +; File Manager + +03000000="7-Zip File Manager" + +; Menu +03000102="&Файл" +03000103="&Өңдеу" +03000104="&Көрініс" +03000105="С&ервис" +03000106="&Анықтама" +03000107="&Таңдаулы" + +; File +03000210="&Ашу" +03000211="Ішінен &ашу" +03000212="Сыртынан ашу" +03000220="Қарау" +03000221="&Өңдеу" +03000230="Қайта атау" +03000231="&Көшіру..." +03000232="&Жылжыту..." +03000233="&Жою" +03000240="Сипаттар" +03000241="Комме&нтарий..." +03000242="Бақылау сомасы" +03000243="Diff" +03000250="&Қалта жасау" +03000251="Файл жасау" +03000260="Шығу" +03000270="Файлды бөлшектеу..." +03000271="Файлды біріктіру..." + +; Edit +03000310="&Болдырмау" +03000311="&Қайтару" +03000320="&Қиып алу" +03000321="&Көшіру" +03000322="Қою" +03000323="&Жою" +03000330="Бәрін ерекшелеу" +03000331="Ерекшелеуді аластау" +03000332="&Ерекшелеуді көрсету" +03000333="Ерекшелеу..." +03000334="Ерекшедеужі аластау..." +03000335="Түрі б-ша ерекшелеу" +03000336="Түрі б-ша ерекшелеуді аластау" + +; View +03000410="&Үлкен таңбаша" +03000411="&Кішк. таңбаша" +03000412="Тізім" +03000413="&Кесте" +03000420="Сұрыптаусыз" +03000430="Негізгі қалтады ашу" +03000431="Бір деңгей жоғары өту" +03000432="Қалта тарихы..." +03000440="Жаңарту" +03000449="Жалпақ режим" +03000450="&2 тақта" +03000451="&Құралдар тақтасы" +03000460="Мұрағаттауыш батырма тақтасы" +03000461="Батырманың кәдімгі тақтасы" +03000462="Үлкен батырмалар" +03000463="Батырмада жазулар" + +; Tools +03000510="Баптау..." +03000511="Өнімді тестілеу" + +; Help +03000610="&Басты..." +03000620="Бағдарламада..." + +; Favorites +03000710="Қалтаны таңдаулыға басқаша үстеу" +03000720="Таңдаулы" + +; Options Dialog + +03010000="Баптау" + +; Plugins +03010100="Плагин" +03010101="&Плагин:" +03010110="Сипаттар" + +; Edit +03010200="Өңдегіш" +03010201="&Өңдегіш:" +03010202="&Diff:" + +; System +03010300="Жүйе" +03010302="7-Zip файлмен ассорциялау:" +03010310="Плагин" + +; Settings +03010400="Баптау" +03010401="\"..\" элементті көрсету" +03010402="Файлдың шынайы таңбашасын көрсету" +03010410="Жүйелік мәзірді көрсету" +03010420="Барлық жолаққа меңзер" +03010421="Бөлгіштерді көрсету" +03010422="Бір шерткеннен ашу" +03010430="Белгілеудің альтернативті режимі" +03010440="Жадтың үлкен беттерін пайдалану" + +; Strings + +03020201="Көшіру" +03020202="Жылжыту" +03020203="Мұнда көшіру:" +03020204="Мұнда жылжыту:" +03020205="Көшіру..." +03020206="Жылжыту..." +03020207="Мұндай қалтаға нысандарыд көшіруге болмайды" +03020208="Бұл қалтаға операция көтермейді." +03020209="Қалтаны нұсқаңыз" + +03020210="Файлды жоюды растау" +03020211="Қалтаны жоюды растау" +03020212="Бірнеше файлды жоюды растау" +03020213="\"{0}\" дегенді жою керек пе?" +03020214="\"{0}\" қалтасын және оның ішіндегілерін жою керек пе?" +03020215="({0} дана) нысандарды жою керек пе?" +03020216="Жойылу..." +03020217="Файл не қалтаны жою қате" +03020218="Ұзақ жолды файлдарды себетке жоюды жүйе көтермейді" + +03020220="Атын өзгерту..." +03020221="Файл не қалтаның атын өзгерту мүмкін емес" +03020222="Файлды көшіруді растау" +03020223="Мына файлдарды мұрағатқа көшіру керек пе" + +03020230="Қалта жасау" +03020231="Қалта аты:" +03020232="Жаңа қалта" +03020233="Қалтаны жасау қате" + +03020240="Файл жасау" +03020241="Файл аты:" +03020242="Жаңа файл" +03020243="Файлды жасау кезінде қателік болды" + +03020250="Ерекшелеу" +03020251="Аластау" +03020252="Маска:" + +03020260="Қалта тарихы" + +03020280="'{0}' файлы өзгерді.\nОны мұрағатта жаңарту керек пе?" +03020281="\n'{0}' файлды жаңарту мүмкін емес" +03020282="Өңдегішті ашу мүмкін емес" +03020283="Ашылу..." +03020284="Файл вирусқа ұқсайды (файл аты ұзақ жолды мәселені құрайды)." + +03020290="Комментарий" +03020291="&Комментарий:" + +030202A0="Жүйе" + +03020300="Компьютер" +03020301="Желі" +03020302="Құжаттар" + +03020400="Үстеу" +03020401="Шығару" +03020402="Тестілеу" + +03020420="Көшіру" +03020421="Жылжыту" +03020422="Жою" +03020423="Ақпарат" + +03020500="Файлды бөлшектеу" +03020501="&Бөлшектеу:" +03020510="Бөлшектеу..." +03020520="Бөлшектеуді растау" +03020521="Файлд {0} бөлікке бөлшектеу керек пе?" +03020522="Том көлемі файлдың кіріс көлемінен аз болу керек" + +03020600="Файлдарды біріктіру" +03020601="&Мұнда біріктіру:" +03020610="Біріктіру..." +03020620="Бөлшектенген файлдың бірінші бөлігін таңдау керек" +03020621="Бөлшектенген файлды тану мүмкін емес" +03020622="Бөлшектенген файлдың бөліктерін табу мүмкін емес" + +03020710="Бақылау сомасын есептеу..." +03020720="Бақылау сомасы" +03020721="Мәлімет үшін CRC бақылау сомасы:" +03020722="Мәлімет және атау үшін CRC бақылау сомасы:" + +03020800="Сканерлеу..." + +03020900="Сипаттар" + +03020A01="Операция қалтаға жолдың ұзақтығынан орындалмайды" +03020A02="Сізге бір файл таңдау керек" +03020A03="Сізге бір не бірнеше файл таңдау керек" +03020A04="{0} деген файл бар" + +; Computer +03031100="Сыйымы" +03031101="Бос" +03031102="Кластер көлемі" +03031103="Белгі" + +; Network +03031200="Жергілікті аты" +03031201="Провайдер" + +; Benchmark Dialog + +03080000="Өнімділікке тестілеу" +03080001="Жад көлемі:" +03080002="Буу" +03080003="Шешу" +03080004="Жылдамдық" +03080005="Рейтинг" +03080006="Жалпы рейтинг" +03080007="Ағымдық" +03080008="Нәтижесі" +03080009="Өтулер:" +0308000A="Қате:" +0308000B="Ауырлық" +0308000C="Рейтинг / Жеңіс." + +;!@LangEnd@! diff --git a/GUI/Lang/ko.txt b/GUI/Lang/ko.txt new file mode 100644 index 0000000..493cc8e --- /dev/null +++ b/GUI/Lang/ko.txt @@ -0,0 +1,545 @@ +;!@Lang@!UTF-8! +; 7-Zip 9.07 +; Translated by +; 4.53~ : Dong-yoon Han (한동윤) +; ~4.52 beta : Hyeong il Kim (kurt Sawyer) +; Orignal : ZannyLim (임재형) +; + +00000000="Korean" +00000001="한국어" +00000002="18" + +; 7-Zip Configuration + +; Title +01000000="7-Zip 환경설정" + +; Info Page +01000100="7-Zip 정보" +01000103="7-Zip 은 무료 소프트웨어입니다. 원하신다면, 등록을 통해 7-Zip 개발을 지원하실 수 있습니다." +01000104="기술지원" +01000105="등록" + +; Folders Page +01000200="폴더" +01000210="작업 폴더(&W)" +01000211="시스템 임시 폴더(&S)" +01000212="현재 폴더(&C)" +01000213="지정 폴더(&S):" +01000214="이동식 드라이브에서만 사용" + +01000281="압축에 관계된 파일이 임시적으로 사용할 위치 지정." + +; System Page +01000300="시스템" +01000301="7-Zip 을 쉘 컨텍스트 메뉴에 통합" +01000302="계단식 컨텍스트 메뉴" +01000310="컨텍스트 메뉴 항목:" + +; Language Page +01000400="언어" +01000401="언어:" + + +; 7-Zip Explorer extension + +; Context menu +02000101="7-Zip" +02000102="7-Zip 명령" +02000103="압축파일 열기" +02000104="선택한 압축파일을 엽니다." +02000105="압축 풀기..." +02000106="선택한 압축파일의 압축을 풉니다." +02000107="압축파일에 추가..." +02000108="선택한 항목을 압축파일에 추가합니다." +02000109="압축파일 테스트" +0200010A="선택한 압축파일의 무결성을 테스트합니다." +0200010B="여기에 압축 풀기" +0200010C="선택한 압축파일을 현재 폴더에 풉니다." +0200010D="{0}에 풀기" +0200010E="하위 폴더에 파일을 풉니다." +0200010F="{0}에 추가" +02000110="선택한 항목을 압축파일에 추가합니다." +02000111="압축해서 이메일 보내기" +02000112="선택한 항목을 압축파일로 만들어 이메일을 통해 보냅니다." +02000113="{0}로 압축해서 이메일 보내기" +02000114="선택한 항목을 압축파일로 만들어 이메일을 통해 보냅니다." + +02000140="<폴더>" +02000141="<압축파일>" + +; Properties +02000203="경로" +02000204="이름" +02000205="확장자" +02000206="폴더" +02000207="크기" +02000208="압축된 크기" +02000209="속성" +0200020A="만든 날짜" +0200020B="액세스한 날짜" +0200020C="수정한 날짜" +0200020D="솔리드" +0200020E="설명" +0200020F="암호화" +02000210="나누기 이전" +02000211="나누기 후" +02000212="사전" +02000213="CRC" +02000214="형식" +02000215="안티" +02000216="압축 방식" +02000217="생성한 OS" +02000218="파일 시스템" +02000219="사용자" +0200021A="그룹" +0200021B="블럭" +0200021C="설명" +0200021D="위치" +0200021E="경로 접두" +0200021F="폴더" +02000220="파일" +02000221="버전" +02000222="볼륨" +02000223="다중볼륨" +02000224="오프셋" +02000225="링크" +02000226="블록" +02000227="볼륨" + +02000229="64-bit" +0200022A="Big-endian" +0200022B="CPU" +0200022C="물리적 크기" +0200022D="해더 크기" +0200022E="체크섬" +0200022F="특성" +02000230="가상 주소" +02000231="ID" +02000232="짧은 이름" +02000233="생성자 응용프로그램" +02000234="섹터 크기" +02000235="모드" +02000236="연결" + +; Status bar +02000301="{0} 항목이 선택됨" +02000302="{0} 항목" + +02000320="파일:" +02000321="폴더:" +02000322="크기:" +02000323="압축된 크기:" +02000324="압축파일:" + +; List Context Menu +02000401="열(&C)..." + +02000411="열기(&O)" +02000412="압축 풀기(&E)..." + +; ToolBar +02000501="압축 풀기" + +; Messages +02000601="업데이트 작업이 이 압축파일에서는 지원되지 않습니다." +02000602="압축파일 {0}을(를) 업데이트 할 수 없음" +02000603="'{0}' 폴더를 생성할 수 없음" +02000604="파일이 지원되지 않는 압축파일 입니다." +02000605="오류" +02000606="항목이 너무 많음" +02000607="주어진 파일 이름 확장자에 연결된 프로그램이 없음" +02000608="오류 없음" +02000609="파일 '{0}'을(를) 압축파일로 열 수 없음" +0200060A="암호화된 압축파일 '{0}'을(를) 열 수 없습니다. 암호가 틀리나요?" +0200060B="시스템이 필요한 양의 메모리를 할당할 수 없음" +0200060C="알 수 없는 오류" +0200060D="지원되지 않는 압축파일 유형" + +; Dialogs +02000702="확인" +02000705="예(&Y)" +02000707="모두 예(&A)" +02000709="아니오(&N)" +0200070B="모두 아니오(&L)" + +02000710="취소" +02000711="취소(&C)" +02000713="닫기(&C)" +02000714="중지" +02000715="다시 시작" + +02000720="도움말" + +; Extract dialog +02000800="압축 풀기" +02000801="압축 풀기(&X):" +02000802="암호" + +02000810="경로 모드" +02000811="전체 경로명" +02000812="현재 경로명" +02000813="경로명 없음" + +02000820="덮어쓰기 모드" +02000821="덮어쓰기 전에 물어봄" +02000822="물어보지 않고 덮어쓰기" +02000823="존재하는 파일 건너뛰기" +02000824="자동으로 이름 바꾸기" +02000825="존재하는 파일 이름 바꾸기" + +02000830="파일" +02000831="선택된 파일(&S)" +02000832="모든 파일(&A)" + +02000881="압축 풀린 파일의 위치를 지정합니다." + +02000890="압축 푸는 중" + +; Overwrite dialog +02000900="파일 교체시 확인" +02000901="대상 폴더에 이미 파일이 존재합니다." +02000902="존재하는 파일을" +02000903="이것으로 교체하시겠습니까?" + +02000911="자동으로 이름 바꾸기(&U)" + +02000982="{0} 바이트" +02000983="수정한 날짜" + +; Messages dialog +02000A00="진단 메시지" + +02000A80="메시지" + +02000A91="'{0}'은 지원하지 않는 압축 방식입니다." +02000A92="'{0}'에 데이터 오류가 있습니다. 파일이 손상되었습니다." +02000A93="'{0}'의 CRC 검사를 실패했습니다. 파일이 손상되었습니다." +02000A94="암호화 파일 '{0}'에 데이터 오류가 있습니다. 암호가 틀리나요?" +02000A95="암호화 파일 '{0}'의 CRC 검사를 실패했습니다. 암호가 틀리나요?" + +; Password dialog +02000B00="암호 입력" +02000B01="암호 입력:" +02000B02="암호 보여주기(&S)" +02000B03="암호 다시 입력:" +02000B10="암호가 일치하지 않음" +02000B11="암호로는 영문자, 숫자 그리고 특수 문자 (!, #, $, ...)만 사용" +02000B12="패스워드가 너무 김" + +; Progress dialog +02000C00="처리" +02000C01="경과 시간:" +02000C02="남은 시간:" +02000C03="전체 크기:" +02000C04="속도:" +02000C05="처리됨:" +02000C06="압축 효율:" + +02000C10="낮은 순위로(&B)" +02000C11="우선 순위로(&F)" +02000C12="일시정지(&P)" +02000C13="계속(&C)" + +02000C20="일시정지 됨" + +02000C30="정말로 취소하시겠습니까?" + +; Compress dialog +02000D00="압축파일에 추가" +02000D01="압축파일(&A):" +02000D02="업데이트 모드(&U):" +02000D03="압축파일 형식(&F):" +02000D04="압축 방식(&M):" +02000D05="솔리드 압축 파일 만들기(&S)" +02000D06="매개변수(&P):" +02000D07="옵션" +02000D08="자동(SFX) 압축파일 생성(&X)" +02000D09="다중 스레딩" +02000D0A="파일 이름 암호화(&N)" +02000D0B="압축 레벨(&L):" +02000D0C="사전 크기(&D):" +02000D0D="단어(word) 크기(&W):" +02000D0E="압축시 사용 메모리:" +02000D0F="압축 풀기시 사용 메모리:" +02000D10="암호화" +02000D11="암호화 방식:" +02000D12="CPU 스레드 수:" +02000D13="솔리드 블록 크기:" +02000D14="솔리드 사용 않함" +02000D15="솔리드" +02000D16="공유하고있는 파일 압축" + +02000D40="볼륨 나누기, 바이트(&V):" +02000D41="볼륨 크기가 부적절합니다." +02000D42="지정된 볼륨 크기: {0} 바이트.\n이 볼륨 크기로 분할 하시겠습니까?" + +02000D81="저장" +02000D82="보통" +02000D83="최고" +02000D84="빠름" +02000D85="가장 빠름" +02000D86="극한" + +02000D90="찾아보기" + +02000DA1="파일을 추가하고 교체" +02000DA2="파일을 업데이트하고 추가" +02000DA3="존재하는 파일만 새롭게 하기" +02000DA4="압축파일 내용을 동기화" + +02000DB1="모든 파일" + +02000DC0="압축하는 중" + +; Columns dialog +02000E00="열" +02000E01="이 폴더에서 보고 싶은 열을 체크하세요. 열의 순서를 바꾸려면 위로 그리고 아래로 버튼을 사용하세요." +02000E02="선택한 열은 반드시 넓이는" +02000E03="픽셀이 되어야 합니다. (&W)" + +02000E10="위로 이동(&U)" +02000E11="아래로 이동(&D)" +02000E12="보여주기(&S)" +02000E13="숨기기(&H)" +02000E14="설정" + +02000E81="제목" +02000E82="폭" + +; Testing +02000F90="검사 중" + + +; File Manager + +03000000="7-Zip 파일 매니저" + +; Menu +03000102="파일(&F)" +03000103="편집(&E)" +03000104="보기(&V)" +03000105="도구(&T)" +03000106="도움말(&H)" +03000107="즐겨찾기(&A)" + +; File +03000210="열기(&O)" +03000211="내부 열기(&I)" +03000212="외부 열기(&U)" +03000220="보기(&V)" +03000221="편집(&E)" +03000230="새 이름(&M)" +03000231="복사(&C)..." +03000232="이동(&M)..." +03000233="삭제(&D)" +03000240="속성(&R)" +03000241="설명(&N)" +03000242="체크섬 계산" +03000243="Diff" +03000250="폴더 만들기" +03000251="파일 만들기" +03000260="끝내기(&X)" +03000270="파일 나누기(&S)" +03000271="파일 합치기(&B)" + +; Edit +03000310="실행 취소(&U)" +03000311="다시 실행(&R)" +03000320="잘라내기(&T)" +03000321="복사(&C)" +03000322="붙여넣기(&P)" +03000323="삭제(&D)" +03000330="모두 선택(&A)" +03000331="모두 선택 취소" +03000332="선택 항목 반전(&I)" +03000333="선택..." +03000334="선택 취소..." +03000335="파일 형식으로 선택" +03000336="파일 형식으로 선택 취소" + +; View +03000410="큰 아이콘(&G)" +03000411="작은 아이콘(&M)" +03000412="목록(&L)" +03000413="자세히(&S)" +03000420="정렬 안함" +03000430="최상위 폴더 열기" +03000431="한단계 위로" +03000432="폴더 히스토리..." +03000440="새로 고침(&R)" +03000449="펼쳐 보기" +03000450="2 패널(&2)" +03000451="도구 모음(&T)" +03000460="압축 도구 모음" +03000461="표준 도구 모음" +03000462="큰 버튼" +03000463="버튼 텍스트 보여주기" + +; Tools +03000510="옵션(&P)..." +03000511="벤치마크(&B)..." + +; Help +03000610="도움말 항목(&C)..." +03000620="7-Zip 정보(&A)..." + +; Favorites +03000710="즐겨찾기에 폴더 추가(&A)" +03000720="북마크" + +; Options Dialog + +03010000="옵션" + +; Plugins +03010100="플러그인" +03010101="플러그인(&P):" +03010110="옵션" + +; Edit +03010200="편집기" +03010201="편집기(&E):" +03010202="Diff(&D):" + +; System +03010300="시스템" +03010302="7-Zip으로 연결:" +03010310="플러그 인" + +; Settings +03010400="설정" +03010401="\"..\" 항목 보여주기" +03010402="실재 파일 아이콘 보여주기" +03010410="시스템 메뉴 보여주기" +03010420="행 전체 선택(&F)" +03010421="눈금선 보여주기(&G)" +03010422="한 번 클릭으로 항목 열기" +03010430="대체 선택 모드" +03010440="큰 메모리 페이지 사용" + +; Strings + +03020201="복사" +03020202="이동" +03020203="폴더로 복사:" +03020204="폴더로 이동:" +03020205="복사 중..." +03020206="이동 중..." +03020207="해당 폴더에 항목을 이동 또는 복사할 수 없습니다." +03020208="지원되지 않는 작업입니다." +03020209="대상 폴더를 선택하세요." + +03020210="파일 삭제 확인" +03020211="폴더 삭제 확인" +03020212="여러 파일 지우기 확인" +03020213="'{0}'을(를) 삭제하시겠습니까?" +03020214="폴더 '{0}'와 그 모든 내용을 삭제하시겠습니까?" +03020215="이 {0} 항목들을 삭제하시겠습니까?" +03020216="삭제 중..." +03020217="파일 또는 폴더 삭제 실패" +03020218="시스템이 긴 경로의 파일을 휴지통으로 이동할 수 없음" + +03020220="이름 바꾸는 중..." +03020221="파일 또는 폴더 이름 바꾸기 실패" +03020222="파일 복사 확인" +03020223="파일을 압축파일로 복사 하시겠습니까?" + +03020230="폴더 만들기" +03020231="폴더 이름:" +03020232="새 폴더" +03020233="폴더 만들기 오류" + +03020240="파일 만들기" +03020241="파일 이름:" +03020242="새 파일" +03020243="파일 만들기 오류" + +03020250="선택" +03020251="선택 취소" +03020252="마스크:" + +03020260="폴더 히스토리" + +03020280="파일 '{0}'이 수정되었습니다.\n압축파일에 업데이트 하시겠습니까?" +03020281="'{0}' 파일을 업데이트 할 수 없습니다." +03020282="편집기를 시작할 수 없습니다." +03020283="여는 중..." +03020284="해당 파일이 바이러스 같습니다 (파일 이름에 길다란 공백이 들어있음)." + +03020290="설명" +03020291="설명(&C):" + +030202A0="시스템" + +03020300="컴퓨터" +03020301="네트워크" +03020302="문서" + +03020400="추가" +03020401="압축 풀기" +03020402="테스트" + +03020420="복사" +03020421="이동" +03020422="삭제" +03020423="정보" + +03020500="파일 분할하기" +03020501="분할하기(&S):" +03020510="분할하는 중..." +03020520="분할 확인" +03020521="정말 {0} 볼륨들로 분할 하시겠습니까?" +03020522="볼륨 크기가 원본 파일보다 작아야만 합니다." + +03020600="파일 합치기" +03020601="합치기(&B):" +03020610="파일 합치는 중..." +03020620="첫번째 파일만 선택하시오" +03020621="분할한 파일의 한 부분으로 인식할 수 없음" +03020622="분할 파일의 한 부분 이상을 찾을 수 없음" + +03020710="체크섬 계산중..." +03020720="체크섬 정보" +03020721="데이터용 CRC 체크섬:" +03020722="데이터와 이름용 CRC 체크섬:" + +03020800="검색 중..." + +03020900="속성" + +03020A01="긴 경로로된 폴더에서 해당 작업을 호출할 수 없습니다." +03020A02="반드시 한 개의 파일을 선택해야함" +03020A03="반드시 한 개 이상의 파일을 선택해야 함" +03020A04="{0} 파일은 이미 존재함" + +; Computer +03031100="전체 크기" +03031101="여유 공간" +03031102="클러스터 크기" +03031103="라벨" + +; Network +03031200="로컬 이름" +03031201="제공자" + +; Benchmark Dialog + +03080000="벤치마크" +03080001="메모리 사용량:" +03080002="압축 중" +03080003="압축 푸는 중" +03080004="속도" +03080005="평가" +03080006="전체 평가" +03080007="현재" +03080008="결과" +03080009="통과:" +0308000A="오류:" +0308000B="CPU 사용량" +0308000C="평가 / 사용량" + +;!@LangEnd@! + + diff --git a/GUI/Lang/ku-ckb.txt b/GUI/Lang/ku-ckb.txt new file mode 100644 index 0000000..60cb491 --- /dev/null +++ b/GUI/Lang/ku-ckb.txt @@ -0,0 +1,536 @@ +;!@Lang@!UTF-8! +; 7-Zip 4.66 +; Translated by Ara Qadir. +; http://www.chawg.org +; +; +; + +00000000="Kurdish - Sorani" +00000001="کوردی" +00000002="" + +; 7-Zip Configuration + +; Title +01000000="سازدانی 7-Zip" + +; Info Page +01000100="7-Zip دەربارەی" +01000103="7-Zip پڕۆگرامێکی خۆڕایە. لەگەڵ ئەوەشدا، ئەتوانی پاڵپشت بیت لە پەرەپێدانی 7-Zip." +01000104="پاڵپشتی" +01000105="تۆمارکردن" + +; Folders Page +01000200="بوخچەکان" +01000210="بوخچەی &کارکردن" +01000211="بوخچەی کاتی &سیستەم" +01000212="&ئێستایی" +01000213="&دیاریکراو:" +01000214="تەنها بۆ ئەو وەگەڕخەرانە بەکاری بهێنە کە توانای لابردنیان هەیە (removable disk)" + +01000281="شوێنێک دیاری بکە بۆ پەڕگە کاتییەکانی ئەرشیڤ." + +; System Page +01000300="سیستەم" +01000301="7-Zip بکە نێو لیستەی مێنیوەوە" +01000302="مێنیو بکە بە یەک هاوپۆل" +01000310="کەرەستەکانی نێو مێنیو:" + +; Language Page +01000400="زمان" +01000401="زمان:" + + +; 7-Zip Explorer extension + +; Context menu +02000101="7-Zip" +02000102="فرمانەکانی 7-Zip" +02000103="کردنەوەی ئەشیڤ" +02000104="ئەرشیڤە دیاریکراوەکان ئەکاتەوە." +02000105="دەرکێشانی پەڕگەکان" +02000106="پەڕگەکان دەرئەکێشێت لە ئەرشیڤە دیاریکراوەکەدا." +02000107="زیادکردن بۆ ئەرشیڤ" +02000108="دیاریکراوەکان بۆ ئەرشیڤ زیاد بکە" +02000109="تاقیکردنەوەی ئەرشیڤ" +0200010A= "گشت ئەرشیڤە دیاریکراوەکە تاقیدەکاتەوە" +0200010B="لێرە دەریبکێشە" +0200010C="پەڕگەکانی ئەرشیڤی دیاریکراو دەردەکێشێ بۆ بوخچەی ئێستایی." +0200010D="دەرکێشان بۆ {0}" +0200010E="پەڕگەکان دەردەکێشێ بۆ ژێربوخچە." +0200010F="زیادکردنی بۆ {0}" +02000110="دیاریکراوەکان زیاد دەکات بۆ ئەرشیڤ." +02000111="پەستاندن و پەیامی ئەلیکترۆنی..." +02000112="پەڕگە دیاریکراوەکان بپەستێنە بۆ ئەرشیڤ و ئەرشیڤەکەش بە پەیامی ئەلیکترۆنی بنێرە." +02000113="بیپەستێنە بۆ {0} و بە پەیامی ئەلیکترۆنی بینێرە" +02000114="پەڕگە دیاریکراوەکان بپەستێنە بۆ ئەرشیڤ و ئەرشیڤەکەش بە پەیامی ئەلیکترۆنی بنێرە." + +02000140="<بوخچە>" +02000141="<ئەرشیڤ>" + +; Properties +02000203="ڕێڕەو" +02000204="ناو" +02000205="پاشگر" +02000206="بوخچە" +02000207="قەبارە" +02000208="قەبارەی پێچراو" +02000209="تایبەتمەندی" +0200020A="دروستکراوە" +0200020B="بینراوە" +0200020C="دەستکاریکراوە" +0200020D="ڕەق" +0200020E="لێدوانی لەسەر دراوە" +0200020F="پارێزراو" +02000210="لەتکردن پێش" +02000211="لەتکردن پاش" +02000212="فەرهەنگ" +02000213="CRC" +02000214="جۆر" +02000215="دژ" +02000216="ڕێباز" +02000217="سیستەمی خانەخوێ" +02000218="سیستەمی پەڕگە" +02000219="بەکارهێنەر" +0200021A="گوروپ" +0200021B="بلۆک" +0200021C="لێدوان" +0200021D="جێگە" +0200021E="ـی ڕێڕەو Prefix" +0200021F="بوخچەکان" +02000220="پەڕگەکان" +02000221="وەشان" +02000222="قەبارەکان" +02000223="فرە قەبارە" +02000224="Offset" +02000225="بەستەرەکان" +02000226="بلۆکەکان" +02000227="قەبارەکان" + +02000229="٦٤-بت" +0200022A="Big-endian" +0200022B="CPU" +0200022C="قەبارەی فیزیکی" +0200022D="قەبارەی سەر" +0200022E="کۆپشکنین" +0200022F="تایبەتمەندی" +02000230="ناونیشانی ڕاستی" + +; Status bar +02000301="{0} شت دیاریکراوە" +02000302="{0} شت" + +02000320="پەڕگەکان:" +02000321="بوخچەکان:" +02000322="قەبارە" +02000323="قەبارەی پەستێنراو:" +02000324="ئەرشیڤەکان:" + +; List Context Menu +02000401="&ستوونەکان..." + +02000411="&کردنەوە" +02000412="&دەرکێشان..." + +; ToolBar +02000501="دەرکێشان" + +; Messages +02000601="کارپێکردنی نوێکاری پاڵپشت نەکراوە بۆ ئەم ئەرشیڤە." +02000602="ناتوانرێ ئەرشیڤی {0} نوێبکرێتەوە" +02000603="ناتوانرێ بوخچەی '{0}' دروستبکرێت." +02000604="پەڕگە ئەرشیڤێکی پاڵپشتیکراو نییە." +02000605="هەڵە" +02000606="شتی(item) زۆر هەن" +02000607="هیچ پەڕگەیەک نییە پەیوەست بێت بە پاشگری پەڕگەی دراوەوە." +02000608="هیچ هەڵەیەک نییە" +02000609="ناتوانرێت پەڕگەی '{0}' بکرێتەوە وەک ئەرشیڤ." +0200060A="ناتوانرێت ئەرشیڤی پارێزراوی '{0}' بکرێتەوە. ئایا تێپەڕەوشە هەڵەیە؟" +0200060B="سیستەم ناتوانێت بڕی پێویست لە بیرگە دابین بکات" +0200060C="هەڵەیەکی نەزانراو" +0200060D="جۆری ئەرشیڤ پاڵپشتی نەکراوە" + +; Dialogs +02000702="باشە" +02000705="&بەڵێ" +02000707="بەڵێ بۆ &هەموو" +02000709="&نەخێر" +0200070B="نەخێر بۆ هە&موو" + +02000710="پاشگەزبوونەوە" +02000711="&پاشگەزبوونەوە" +02000713="&داخستن" +02000714="وەستاندن" +02000715="دەستپێکردنەوە" + +02000720="یارمەتی" + +; Extract dialog +02000800="دەرکێشان" +02000801="&دەرکێشان بۆ:" +02000802="تێپەڕەوشە" + +02000810="جۆری ڕێڕەو" +02000811="ناوی ڕێڕەوی تەواوەتی" +02000812="ناوی ڕێڕەوە هەنووکەییەکان" +02000813="ناوی ڕێڕەو نییە" + +02000820="جۆری بەسەردا نووسینەوە" +02000821="بپرسە پێش بەسەردا نووسینەوە" +02000822="بەسەردا بنووسەوە بەبێ ڕەزامەندی" +02000823="پەڕگە هەبووەکان بپەڕێنە" +02000824="خۆکار ناوگۆڕین" +02000825="خۆکار ناوگۆڕینی پەڕگە هەبووەکان" + +02000830="پەڕگەکان" +02000831="پەڕگە &دیاریکراوەکان" +02000832="&هەموو پەڕگەکان" + +02000881="شوێنێک دیاری بکە بۆ پەڕگە دەرکێشراوەکان" + +02000890="دەری دەکێشێ" + +; Overwrite dialog +02000900="دڵنیابە لە جێگرتنەوەی پەڕگە" +02000901="بوخچەی مەبەست پەڕگەیەکی تیادایە بە هەمان ناو." +02000902="ئەتەوێت پەڕگە هەبووەکان جێبگیردرێتەوە؟" +02000903="لەگەڵ ئەم دانەیە؟" + +02000911="ناوگۆڕینی &خۆکار" + +02000982="{0} بایت" +02000983="دەستکاریکراوە لە" + +; Messages dialog +02000A00="پەیامی لێکۆڵینەوە/ پشکنین" + +02000A80="پەیام" + +02000A91="ڕێبازێکی پاڵپشتی نەکراوی پەستاندن بۆ '{0}'. " +02000A92="زانیاری '{0}' هەڵەیە. پەڕگە تێکشکاوە." +02000A93="CRC سەرکەوتوو نەبوو. پەڕگە تێکشکاوە." +02000A94="زانیاری هەڵەیە لە پەڕگەی پارێزراودا '{0}'. ئایا تێپەڕەوشە هەڵەیە؟" +02000A95="CRC هەڵەیە لە پەڕگەی پارێزراودا '{0}'. ئایا تێپەڕەوشە هەڵەیە؟" + +; Password dialog +02000B00="نووسینی تێپەڕەوشە:" +02000B01="تێپەڕەوشە بنووسە:" +02000B02="&پیشاندانی تێپەڕەوشە" +02000B03="تێپەڕەوشە بنووسەوە:" +02000B10="تێپەڕەوشەکان وەک یەک نین" +02000B11="تەنها پیتە ئینگلیزییەکان، ژمارە و نووسە تیبەتییەکان ($، %، #) بۆ تێپەڕەوشە بەکاربهێنە" +02000B12="تێپەڕەوشە زۆر درێژە" + +; Progress dialog +02000C00="جێبەجێکردن" +02000C01="ک. دەستپێکردوو:" +02000C02="کاتی ماوە:" +02000C03="سەرجەمی قەبارە:" +02000C04="خێرایی:" +02000C05="جێبەجێکراوە:" +02000C06="ڕێژەی پەستاندن:" + +02000C10="&پاشەبنەما" +02000C11="پ&ێشەبنەما" +02000C12="&ڕاگرتن" +02000C13="&بەردەوامبوون" + +02000C20="ڕاگیردرا" + +02000C30="دڵنیایت لە پاشگەزبوونەوە؟" + +; Compress dialog +02000D00="زیادکردن بۆ ئەرشیڤ" +02000D01="&ئەرشیڤ:" +02000D02="&جۆری نوێکاری:" +02000D03="&فۆڕماتی ئەرشیڤ:" +02000D04="&ڕێبازی پەستاندن:" +02000D05="دروستکردنی ئەرشیڤی &ڕەق/ پتەو" +02000D06="&هاوکۆڵکەکان:" +02000D07="هەڵبژاردنەکان" +02000D08="دروستکردنی ئەرشیڤی SF&X" +02000D09="فرەدەزوو" +02000D0A="&ناوی پەڕگەکان بپارێزە (encrypt)" +02000D0B="&ئاستی پەستاندن:" +02000D0C="قەبارەی &فەرەەنگ:" +02000D0D="قەبارەی &وشە:" +02000D0E="ڕێژەی بەکارهێنانی بیرگە بۆ پەستاندان:" +02000D0F="ڕێژەی بەکارهێنانی بیرگە بۆ کردنەوەی پەستێنراو:" +02000D10="پاراستن" +02000D11="ڕێبازی پاراستن" +02000D12="ژمارەی دەزووەکانی CPU:" +02000D13="قەبارەی بلۆکی ڕەق:" +02000D14="نا-ڕەق" +02000D15="ڕەق" +02000D16="پەستاندنی پەڕگە ئاڵوگۆڕکراوەکان" + +02000D40="لەتی بکە بۆ &قەبارە و بایت:‌" +02000D41="قەبارەی لەتکراوەکە هەڵەیە" +02000D42="قەبارەی دیاریکراوی لەتکراوەکە: {0} بایت.\nدڵنیایت لە لەتکردنی ئەرشیڤەکە بۆ ئەو قەبارانە؟" + +02000D81="پاشەکەوت" +02000D82="ئاسایی" +02000D83="زۆرترین" +02000D84="خێرا" +02000D85="خێراترین" +02000D86="سەروو" + +02000D90="هەڵدەوە/ Browse" + +02000DA1="زیادکردن و جێگرتنەوەی پەڕگەکان" +02000DA2="نوێکردنەوە و زیادکردنی پەڕگە" +02000DA3="بووژاندنەوەی پەڕگە هەبووەکان" +02000DA4="ـکردنی پەڕگەکان Synchronize" + +02000DB1="هەموو پەڕگەکان" + +02000DC0="دەی پەستێنێ..." + +; Columns dialog +02000E00="ستوونەکان" +02000E01="ئەو ستوونەکان بپشکنە کە ئەتەوێت دیاربن لەم بوخچەیەدا. دوگمەی جوڵان بۆ سەرەوە و جوڵان بۆ خوارەوە بەکارببە بۆ پێش و پاشخستنی ستوونەکان." +02000E02="ستوونی دیاریکراو پێویستە" +02000E03="خاڵ &پان بێت." + +02000E10="جوڵان بۆ &خوارەوە" +02000E11="جوڵان بۆ &سەرەوە" +02000E12="&پیشاندان" +02000E13="&شاردنەوە" +02000E14="ڕێکبخە" + +02000E81="ناونیشان" +02000E82="پانی" + +; Testing +02000F90="تاقیدەکاتەوە" + + +; File Manager + +03000000="7-Zip بەڕێوەبەرایەتی پەڕگەی" + +; Menu +03000102="&فایل" +03000103="&دەستکاری" +03000104="&بینین" +03000105="&ئامڕازەکان" +03000106="&یارمەتی" +03000107="د&ڵخوازەکان" + +; File +03000210="&کردنەوە" +03000211="کردنەوە لە&ناو خۆدا" +03000212="کردنەوە لە &دەرەوە" +03000220="&بینین" +03000221="&دەستکاری" +03000230="&ناوگۆڕین" +03000231="&لەبەرگرتنەوە بۆ..." +03000232="&گواستنەوە بۆ..." +03000233="&سڕینەوە" +03000240="&تایبەتمەندییەکان" +03000241="ل&ێدوان" +03000242="ژماردنی checksum" +03000250="دروستکردنی بوخچە" +03000251="دروستکردنی پەڕگە" +03000260="دەر&چوون" +03000270="&لەتکردنی پەڕگە..." +03000271="&پێکەوە لکاندنی پەڕگەکان..." + +; Edit +03000310="&پاشگەزبوونەوە" +03000311="&کردن-ەوە" +03000320="&بڕین" +03000321="&لەبەرگرتنەوە" +03000322="&لکا&ندن" +03000323="&سڕینەوە" +03000330="هەمووی دیاری بکە" +03000331="هەموو دیاریکراوەکان لاببە" +03000332="%پێچەوانەکردنەوەی دیاریکراو" +03000333="دیاری بکە..." +03000334="دیاری مەکە..." +03000335="بە پێی جۆر دیاری بکە" +03000336="لابردنی دیاریکراوەکان بەپێ جۆر" + +; View +03000410="ئایکۆنی &گەورە" +03000411="ئایکۆنی &بچوک" +03000412="&لیست" +03000413="&وردەکاری" +03000420="ڕیزنەکراو" +03000430="کردنەوەی بوخچەی ڕەگ" +03000431="یەک ئاست بۆ سەرەوە" +03000432="مێژووی بوخچەکان..." +03000440="&بووژاندنەوە" +03000449="بینین بەشێوەی فلات" +03000450="&2 پانێڵ" +03000451="&جێ ئامڕاز" +03000460="جێ ئامڕازی ئەرشیڤ" +03000461="جی ئامڕازی بنچینە" +03000462="دوگمەی گەورە" +03000463="پیشاندانی دەقی دوگمەکان" + +; Tools +03000510="&هەڵبژاردنەکان" +03000511="&نیشانەی پێوان" + +; Help +03000610="&ناوەڕۆکەکان..." +03000620="&دەربارەی 7-Zip..." + +; Favorites +03000710="&زیادکردنی بوخچە بۆ دڵخوازەکان وەک" +03000720="دڵخوازی" + +; Options Dialog + +03010000="ەەڵبژاردنەکان" + +; Plugins +03010100="پێوەکراوەکان" +03010101="&پێوەکراوەکان:" +03010110="هەڵبژاردنەکان" + +; Edit +03010200="دەستکاریکەر" +03010201="&دەستکاریکەر:" + +; System +03010300="سیستەم" +03010302="7-Zip پەیوەست بکە بە:" +03010310="پێوەکراوە" + +; Settings +03010400="ڕێکخستەکان" +03010401="شتەکانی \"..\" پیشانبدە" +03010402="ئایکۆنی ڕاستەقینەی پەڕگەکان پیشانبدە" +03010410="مێنیوی سیستەم پیشانبدە" +03010420="دیاریکردنی هەموو &ڕیزەکە" +03010421="پیشاندانی هێڵە &grid ـەکان" +03010430="جۆری دیاریکردنی &جێگرەوە/ ئەڵتەرناتیڤ" +03010440="پەڕەی بیرگەی &گەورە بەکارببە" + +; Strings + +03020201="لەبەرگرتنەوە" +03020202="گواستنەوە" +03020203="لەبەرگتنەوە بۆ:" +03020204="گواستنەوە بۆ:" +03020205="لەبەری دەگرێتەوە..." +03020206="دەیگوازێتەوە بۆ..." +03020207="ناتوانی شتەکان لەبەربگریتەوە یان بگوازیتەوە بۆ ئەو بوخچانە." +03020208="ئەو کارە پاڵپشتی نەکراوە" +03020209="بوخچەی مەبەست دیاری بکە." + +03020210="دڵنیابە لە سڕینەوەی پەڕگە" +03020211="دڵنیابە لە سڕینەوەی بوخچە" +03020212="دڵنیابە لە سڕینەوەی هەموو پەڕگەکان" +03020213="دڵنیایت لە سڕینەوەی '{0}'؟" +03020214="دڵنیایت لە سڕینەوەی بوخچەی '{0}' و هەموو ناوەڕۆکەکانی؟" +03020215="دڵنیایت لە سڕینەوەی ئەم {0} شتە؟" +03020216="دەی سڕێتەوە..." +03020217="هەڵە هەیە لە سڕینەوەی پەڕگەکان یا بوخچەکان" +03020218="سیستەم ناتوانێت پەڕگەیەک بگوێزێتەوە بۆ تەنەکەی خۆڵ بە ڕێڕەوی درێژەوە" + +03020220="ناوی دەگۆڕێ..." +03020221="هەڵە هەیە لە ناو گۆڕینی پەڕگە یان بوخچەکان. " +03020222="دڵنیابە لە لەبەرگرتنەوەی پەڕگە" +03020223="دڵنیایت لە لەبەرگرتنەوەی پەڕگەکان بۆ ئەرشیڤ؟" + +03020230="دروستکردنی بوخچە" +03020231="ناوی بوخچە:" +03020232="بەخچەی نوێ" +03020233="هەڵە هەیە لە دروستکردنی بوخچە " + +03020240="دروستکردنی پەڕگە" +03020241="ناوی پەڕگە:" +03020242="پەڕگەی نوێ" +03020243="هەڵە هەیە لە دروستکردنی پەڕگەدا" + +03020250="دیاری بکە" +03020251="دیاری مەکە" +03020252="دەمامک:" + +03020260="مێژووی بوخچەکان" + +03020280="پەڕگەی '{0}' دەستکاریکراوە. ئەتەوێت لە ئەرشیڤەکەدا نوێی بکەیتەوە؟" +03020281="ناتوانرێ پەڕگەی \n'{0}' نوێبکرێتەوە" +03020282="ناتوانرێ دەستکاریکەر دەستپێبکرێت." +03020283="دەیکاتەوە..." +03020284="پەڕگەکە لە ڤایرۆس دەچێت (ناوی پەڕگەکە بۆشایی زۆری تیادایە)." + +03020290="لێدوان" +03020291="&لێدوان:" + +030202A0="سیستەم" + +03020300="کۆمپیوتەر" +03020301="ڕایەڵە" +03020302="بەڵگەنامەکان" + +03020400="زیادکردن" +03020401="دەرکێشان" +03020402="تاقیکردنەوە" + +03020420="لەبەرگرتنەوە" +03020421="گواستنەوە" +03020422="سڕینەوە" +03020423="زانیاری" + +03020500="لەتکردنی پەڕگە" +03020501="&لەتی بکە بۆ:" +03020510="لەتی دەکات..." +03020520="دڵنیابە لە لەتکردن" +03020521="دڵنیایت لە لەتکردنی پەڕگەی {0} بۆ دوو قەبارە؟" +03020522="پێویستە قەبارەی هەر یەک لە لەتەکان بچوکتربێت لە قەبارەی پەڕگە لەتکراوەکە" + +03020600="پێکەوەلکاندنی پەڕگەکان" +03020601="%پێکەوەی بلکێنە بۆ:" +03020610="پێکەوەی دەلکێنێت..." +03020620="تەنها پەڕگەی یەکەم دیاری بکە" +03020621="ناتوانێت پەڕگە بدۆزێتەوە وەک بەشێک لە پەڕگە لەتکراوەکە" +03020622="ناتوانێت لە بەشێک زیاتر بدۆزێتەوە لە پەڕگە لەتکراوەکە" + +03020710="ژماردنی کۆپشکنین..." +03020720="زانیاری کۆپشکنین" +03020721="کۆپشکنینی CRC بۆ دراوە:" +03020722="کۆپشکنینی CRC بۆ دراوە و ناوەکان:" + +03020800="دەی پشکنێت..." + +03020900="تایبەتمەندییەکان" + +03020A01="ناتوانرێت ئەو کردارە بانگبکرێت لە بوخچەیەکەوە کە ڕێڕەوێکی درێژی ەەیە." +03020A02="پێویستە پەڕگەیەک دیاریبکەیت" +03020A03="پێویستە پەڕگەیەک یان زیاتر دیاریبکەیت" +03020A04="پەڕگەی {0} پێشتر ەەیە" + +; Computer +03031100="سەرجەمی قەبارە" +03031101="بۆشایی بەتاڵ" +03031102="قەبارەی کۆمەڵەکە" +03031103="نیشان" + +; Network +03031200="ناوی ناوخۆیی" +03031201="دابینکەر" + +; Benchmark Dialog + +03080000="نیشانەی پێوان" +03080001="ڕێژەی بەکارهێنراوی بیرگە:" +03080002="پەستاندن" +03080003="کردنەوەی پەستێنراو" +03080004="خێرایی" +03080005="هەڵسەنگاندن" +03080006="سەرجەمی هەڵسەنگاندن" +03080007="ئێستایی" +03080008="ئەنجام" +03080009="دەرچوونەکان:" +0308000A="هەڵەکان:" +0308000B="CPU ڕێژەی بەکارهێنراوی" +0308000C="ڕێژەی بەکارەێنراو / هەڵسەنگاندن" + +;!@LangEnd@! + + diff --git a/GUI/Lang/ku.txt b/GUI/Lang/ku.txt new file mode 100644 index 0000000..5a99c71 --- /dev/null +++ b/GUI/Lang/ku.txt @@ -0,0 +1,473 @@ +;!@Lang@!UTF-8! +; 7-Zip 4.37 +; Translated by Rizoyê Xerzî +; +; +; +; + +00000000="Kurdish" +00000001="Kurdî" +00000002="" + +; 7-Zip Configuration + +; Title +01000000="7-Zip Sazkirin" + +; Info Page +01000100="Der barê 7-Zip de" +01000103="7-Zip nivîsbariyeke azad e. Lê, tu dikarî wekî tomarkirin desteka pêşxistina 7-zip bibî." +01000104="Destek" +01000105="Tomarkirin" + +; Folders Page +01000200="Peldank" +01000210="Peldanka &Xebatê" +01000211="&Peldanka TEMP a Pergalê" +01000212="P&eldanka Derbasdar" +01000213="Pe&ldanka Navborî:" +01000214="Bi tenê ji bo ajokarên derketî bi kar bîne" + +01000281="Ji bo dosiyên demdemî yên arşîvê cih belî bike." + +; System Page +01000300="Pergal" +01000301="Bila di pêşekên naverokê de 7-Zip bixuye" +01000302="Pêşeka naverokê ya sûlavî" +01000310="Hêmanên peşeka naverokê:" + +; Language Page +01000400="Ziman" +01000401="Ziman:" + + +; 7-Zip Explorer extension + +; Context menu +02000101="7-Zip" +02000102="Fermanên 7-Zip" +02000103="Arşîvê veke" +02000104="Arşîva hilbijartî vedike." +02000105="Dosiyan derxe..." +02000106="Dosiyan ji arşîva hilbijartî derdixe." +02000107="Bike Arşîv..." +02000108="Hêmanên hilbijartî dixe arşîvê." +02000109="Arşîvê bihêçîne" +0200010A="Tevahiya arşîva hilbijartî diceribîne." +0200010B="Valake vir" +0200010C="Dosiyên arşîva hilbijartî derdixe peldanka derbasdar." +0200010D="Peldanka {0} derxe" +0200010E="Derdixe bin-peldankê." +0200010F="Wekî {0} bike arşîv" +02000110="Hêmanên hilbijartî dike arşîv." +02000111="Bişidîne û bişîne..." +02000112="Hêman hilbijartî dişidîne û arşîvê bi e-peyamê re dişîne." +02000113="Wekî {0} bişidîne û bişîne" +02000114="Hêmanên hilbijartî dişidîne û dike arşîv û arşîvê bi e-peyamê re dişîne." + +02000140="" +02000141="" + +; Properties +02000203="Rê" +02000204="Nav" +02000205="Cure" +02000206="Peldank" +02000207="Mezinahî" +02000208="Mezinahiya di arşîvê de" +02000209="Taybetiyên xweser" +0200020A="Çêbûyî" +0200020B="Gihaştî" +0200020C="Guhertî" +0200020D="Hişk" +0200020E="Daxuyankirî" +0200020F="Şîfrekirî" +02000210="Parçeyê borî" +02000211="Parçeyê piştre" +02000212="Ferheng" +02000213="CRC" +02000214="Cure" +02000215="Dij" +02000216="Awayê şidandinê" +02000217="Platform" +02000218="Pergala Dosiyê" +02000219="Bikarhêner" +0200021A="Kom" +0200021B="Stûn" +0200021C="Daxuyanî" +0200021D="Cih" +0200021E="Path Prefix" + +; Status bar +02000301="{0} heb hêman hilbijartî ne" +02000302="{0} heb hêman" + +02000320="Pel:" +02000321="Peldank:" +02000322="Mezinahî:" + +; List Context Menu +02000401="&Stûn..." + +02000411="&Veke" +02000412="&Derxe..." + +; ToolBar +02000501="Derxe" + +; Messages +02000601="Tu nikarî vê arşîvê rojane bikî." +02000602="Arşîva {0} nayê rojanekirin" +02000603="Peldanka '{0}' nayê çêkirin" +02000604="Ev dosya ne arşîveke naskirî ye." +02000605="Çewtî" +02000606="Hêman zêde ne" +02000607="Sepaneke têkildarî vî cureyê dosiyê nîn e" +02000608="Çewtî nîn e." + +; Dialogs +02000702="Temam" +02000705="&Erê" +02000707="&Ji Bo Hemûyî Erê" +02000709="&Na" +0200070B="Ji &Bo Hemûyî Na" + +02000710="Betal" +02000711="B&etal" +02000713="Bi&gire" +02000714="Raweste" +02000715="Dîsa Destpêke" + +02000720="Alîkarî" + +; Extract dialog +02000800="Derxe" +02000801="&Cihê Dê Derkevê:" +02000802="Şîfre" + +02000810="Navê Rê" +02000811="Navê tevahî yên rê" +02000812="Navê derbasdar ên rê" +02000813="Bila navên rê tune bin" + +02000820="Dosiyên heyî" +02000821="Ji bo li ser binivîse bipirse" +02000822="Bê pirs li ser binivîse" +02000823="Derxistin" +02000824="Navekî nû li yên di arşîvê de bike" +02000825="Navekî nû li yên heyî bike" + +02000830="Dosya" +02000831="D&osiyên hilbijartî" +02000832="He&mû Dosya" + +02000881="Ji bo dosya derkevinê cihekî belî bike." + +02000890="Tên derxistin" + +; Overwrite dialog +02000900="Rewla Lisernivîsandinê" +02000901="Di dosiya armanckirî de bi vî navî dosiyek heye. Bila li ser bête nivîsîn?" +02000902="Dosiya heyî:" +02000903="Dosiya tê derxistin:" + +02000911="Na&vekî nû lê bike" + +02000982="{0} bayt" +02000983="guhertina dawî " + +; Messages dialog +02000A00="Peyamên haydariyê" + +02000A80="Peyam" + +02000A91="Ji bo '{0}' awayê şidandinê nehate nasîn." +02000A92="'{0}' xerabe ye. (Çewtiya daneyê)" +02000A93="'{0}' xerabe ye. (Çewtiya CRC)" + +; Password dialog +02000B00="Têketina Şîfreyê" +02000B01="Şîfreyê binivîse:" +02000B02="Bi&la şîfre bixuye" + +; Progress dialog +02000C00="bixebite" +02000C01="Dema borî:" +02000C02="Dema mayî:" +02000C03="Mezinahî:" +02000C04="Lez:" + +02000C10="L%i Pişt" +02000C11="Li &Pêş" +02000C12="&Rawestîne" +02000C13="Bi&domîne" + +02000C20="Rawestiya - " + +02000C30="Ma bila betal bibe?" + +; Compress dialog +02000D00="Bike Arşîv" +02000D01="&Arşîv:" +02000D02="A&wayê rojanekirinê:" +02000D03="Awa&yê arşîvê:" +02000D04="Awayê şi&dandinê:" +02000D05="Bila &hişk be" +02000D06="&Parametre:" +02000D07="Vebijêrk" +02000D08="Bila ew bixwe derxe (SFX)" +02000D09="Pir&girêkî" +02000D0A="Navên dosiyê bike şîfre" +02000D0B="A&sta şidandinê:" +02000D0C="Me&zinahiya ferhengê:" +02000D0D="M&ezinahiya bêjeyê:" +02000D0E="Bikaranîna bîrê (Şidandin):" +02000D0F="Bikaranîna bîrê (Vekirin):" + +02000D40="Wekî Bayt/&cilt bike parçe:" + +02000D81="Bêyî şidandin" +02000D82="Asayî" +02000D83="Herî Pir" +02000D84="Bi Lez" +02000D85="Leztirîn" +02000D86="Ultra" + +02000D90="Bibîne" + +02000DA1="Dosiyan têxê, yên heyî derxe" +02000DA2="Dosiyan têxê, yên kevin rojane bike" +02000DA3="Bi tenê yên kevin rojane bike" +02000DA4="Dosiyan bike wekî hev" + +02000DB1="Hemû dosya" + +02000DC0="tên şidandin" + +; Columns dialog +02000E00="Stûn" +02000E01="Stûnên tu dixwazî di vê peldankê de xuya bibin nîşan bike. Ji bo rêzkirina stûnan bişkojkên berjor-berjêr bi kar bîne." +02000E02="Firehiya stûna hilbijartî" +02000E03="Bila &piksel be." + +02000E10="B&erjor" +02000E11="&Berjêr" +02000E12="&Nîşan Bide" +02000E13="&Veşêre" +02000E14="Peywirdar bike" + +02000E81="Sernivîs" +02000E82="Firehî" + +; Testing +02000F90="tê hêçandin" + + +; File Manager + +03000000="7-Zip Gerînendeyê Dosiyan" + +; Menu +03000102="&Dosya" +03000103="&Bipergalîne" +03000104="&Nîşan Bide" +03000105="&Amûr" +03000106="A&lîkarî" +03000107="Bi&jare" + +; File +03000210="&Veke" +03000211="&Di Panelê De Veke" +03000212="Di &Paceyê De Veke" +03000220="&Nîşan Bide" +03000221="&Sererast bike" +03000230="&Navekî Nû Bidê" +03000231="&Ji Ber Bigire" +03000232="B&ar Bike" +03000233="Jê B&ibe" +03000240="&Taybetî" +03000241="Da&xuyanî" +03000242="checksum heseb bike" +03000250="Pe&ldankeke Nû" +03000251="Do&siyeke Nû" +03000260="De&rkeve" +03000270="Parçe Bi&ke..." +03000271="Bike &Yek..." + +; Edit +03000310="&Vegere" +03000311="&Nû Bike" +03000320="&Bibire" +03000321="&Ji Ber Bigire" +03000322="&Pêveke" +03000323="Jê Bib&e" +03000330="&Hemûyî hilbijêre" +03000331="He&mû hilijartinê rake" +03000332="Be&revajî wê hilbijêre" +03000333="&Hilbijêre..." +03000334="Hilbijarti&nê Rake..." +03000335="Vî cureyî hilbijêre" +03000336="Hilbijartina cure rake" + +; View +03000410="&Dawêrên Mezin" +03000411="D&awêrên Biçûk" +03000412="&Lîste" +03000413="&Hûragahî" +03000420="Bê Dor" +03000430="Peldanka Kok Veke" +03000431="Astekê Berjor" +03000432="Dîroka Peldankê..." +03000440="&Nû Bike" +03000449="xuyakirina sade" +03000450="&2 Panelan veke" +03000451="Da&rikê amûran" +03000460="Darikê arşîvê" +03000461="Darikê standart" +03000462="Bişkojkên mezin" +03000463="Bila nivîsa bişkojkan bixuye" + +; Tools +03000510="&Vebijêrk..." +03000511="&Pîvana Çalakbûnê" + +; Help +03000610="&Naverok..." +03000620="D&er barê 7-Zip de..." + +; Favorites +03000710="Pe&ldanka derbasdar veke" +03000720="Cih" + +; Options Dialog + +03010000="Vebijêrk" + +; Plugins +03010100="Leqêq" +03010101="&Hemû Lehêq:" +03010110="Mîheng..." + +; Edit +03010200="Per&galker" +03010201="Pergalkerê De&qê:" + +; System +03010300="Pergal" +03010302="Bi 7-Zip re têkildar bike:" +03010310="Leqêq" + +; Settings +03010400="Mîheng" +03010401="Bila hêmana \"..\" xuya bike" +03010402="Bila dawêrên dosiyên rastî xuya bikin" +03010410="Bila pêşeka pergalê xuya bike" +03010420="Bila &hemû rêzikê bibore" +03010421="Bila &xêzên tabloyê xuya bike" +03010430="&Kipa hilbijartina alternatîf" +03010440="bîra berfireh bikar bîne" + +; Strings + +03020201="Ji Ber Bigire" +03020202="Bar Bike" +03020203="Cihê Dê Were Jibergirtin:" +03020204="Cihê Dê Were Barkirin:" +03020205="tê jibergirtin..." +03020206="tê barkirin..." +03020207="Jibergirtin û barkirin ji bo vê peldankê nabe." +03020208="Kirin ne pêkan e." + +03020210="Erêkirina jêbirina dosiyê" +03020211="Erêkirina jêbirina peldankê" +03020212="Erêkirina jêbirina gelek dosiyan" +03020213="Ma bila dosiya '{0}' bête jêbirin?" +03020214="Ma bila peldanka '{0}' û yên tê de bên jêbirin?" +03020215="Ma bila hêmana {0} bête jêbirin?" +03020216="tê jêbirin..." +03020217="Çewtiya Jêbirinê" + +03020220="navekî nû tê lêkirin..." +03020221="Çewtiya Navlêkirinê" +03020222="Erêkirina Jibergirtinê" +03020223="Ma bila dosî ji bo arşîvê bên jibergirtin" + +03020230="Peldankeke nû" +03020231="Navê peldankê:" +03020232="Peldankeke Nû" +03020233="Çewtiya Çêkirina peldankê" + +03020240="Dosiyeke Nû" +03020241="Navê Dosiyê:" +03020242="Dosiyeke Nû" +03020243="Çewtiya çêkirina Dosiyê" + +03020250="Hilbijêre" +03020251="Hilbijartinê rake" +03020252="Derbirîna hilbijartinê:" + +03020260="Rabirdûya Peldankê" + +03020280="Dosiya '{0}' hatiye guhartin.\nMa bila di arşîvê bête rojanekirin?" +03020281="Dosiya '{0}' nehate rojanekirin" +03020282="Pergalkerê deqê nehate destpêkirin." +03020283="vedibe..." + +03020290="Daxuyanî" +03020291="&Daxuyanî:" + +030202A0="Pergal" + +03020300="Komputer" +03020301="Tor" + +03020400="Bike Arşîv" +03020401="Derxe" +03020402="Bihêçîne" + +03020420="Ji Ber Bigire" +03020421="Bar Bike" +03020422="Jê Bibe" +03020423="Agahî" + +03020500="Bike Parçe" +03020501="Di &vê peldankê de parçe bike:" +03020510="tê parçekirin..." + +03020600="Bike Yek" +03020601="Di vê &peldankê de bike yek:" +03020610="tê yekirin..." + +03020710="Hesabê sererastkirî..." +03020720="Agahiyên hesabê sererast" +03020721="CRC hesabê sererast bo data:" +03020722="CRC hesabê sererast bo data û nav:" + +03020800="Tê raguhestin" + +; Computer +03031100="Hemû Mezinahî" +03031101="Cihê Vala" +03031102="Mezinahiya telpikî" +03031103="Etîket" + +; Network +03031200="Navê Herêmî" +03031201="Derfetkar" + +; Benchmark Dialog + +03080000="Çalakiya komputerê" +03080001="Bikaranîna birê:" +03080002="Şidandin" +03080003="Vekirin" +03080004="Lez" +03080005="Puan" +03080006="bi guloverî puanan" +03080007="Carî" +03080008="Encam" +03080009="Serkeftî:" +0308000A="Çewt:" + +;!@LangEnd@! diff --git a/GUI/Lang/lt.txt b/GUI/Lang/lt.txt new file mode 100644 index 0000000..42b6568 --- /dev/null +++ b/GUI/Lang/lt.txt @@ -0,0 +1,512 @@ +;!@Lang@!UTF-8! +; 7-Zip 4.57 +; Translated by Marius Navickas edited by Domas Jokubauskis +; +; +; +; + +00000000="Lithuanian" +00000001="Lietuvių" +00000002="39" + +; 7-Zip Configuration + +; Title +01000000="7-Zip nustatymai" + +; Info Page +01000100="Apie 7-Zip" +01000103="7-Zip yra nemokama programa. Vis dėlto, jeigu jums patinka 7-Zip ir jūs norėtumėte paremti jos tolesnį vystymą, prašome pinigais paremti 7-Zip projektą." +01000104="Techninis palaikymas" +01000105="Paremti" + +; Folders Page +01000200="Aplankai" +01000210="&Darbinis aplankas" +01000211="&Sisteminis laikinas aplankas" +01000212="D&abartinis" +01000213="Nurodyta&s:" +01000214="Naudoti tik išimamiems diskams" + +01000281="Nurodyti vietą laikinoms archyvinėms byloms." + +; System Page +01000300="Sistema" +01000301="Integruoti 7-Zip į kontekstinį meniu " +01000302="Pakopinis kontekstinis meniu" +01000310="Kontekstinio meniu įrašai:" + +; Language Page +01000400="Kalba" +01000401="Kalba:" + + +; 7-Zip Explorer extension + +; Context menu +02000101="7-Zip" +02000102="7-Zip komandos" +02000103="Atverti archyvą" +02000104="Atveria pasirinktą archyvą." +02000105="Išskleisti failus..." +02000106="Išskleidžia failus iš pasirinkto archyvo." +02000107="Įtraukti į archyvą..." +02000108="Įtraukia pasirinktus elementus į archyvą." +02000109="Patikrinti archyvą" +0200010A="Patikrina pasirinkto archyvo vientisumą." +0200010B="Išskleisti čia" +0200010C="Išskleidžia pasirinkto archyvo failus šiame aplanke." +0200010D="Išskleisti į {0}" +0200010E="Išskleidžia failus į paaplankį." +0200010F="Įtraukti į {0}" +02000110="Įtraukia pasirinktus elementus į archyvą." +02000111="Suglaudinti ir išsiųsti el. paštu..." +02000112="Suglaudina pasirinktus failus į archyvą ir išsiunčia jį el. paštu." +02000113="Suglaudinti į {0} ir išsiųsti el. paštu" +02000114="Suglaudina pasirinktus failus į archyvą ir išsiunčia jį el. paštu." + +02000140="" +02000141="" + +; Properties +02000203="Kelias" +02000204="Pavadinimas" +02000205="Plėtinys" +02000206="Aplankas" +02000207="Dydis" +02000208="Dydis archyve" +02000209="Atributai" +0200020A="Sukurta" +0200020B="Naudota" +0200020C="Pakeista" +0200020D="Vientisas" +0200020E="Komentaras" +0200020F="Šifruotas" +02000210="Perskyra prieš" +02000211="Perskyra paskui" +02000212="Žodynas" +02000213="CRC" +02000214="Tipas" +02000215="Anti" +02000216="Būdas" +02000217="Kompiuterio OS" +02000218="Bylų sistema" +02000219="Vartotojas" +0200021A="Grupė" +0200021B="Blokas" +0200021C="Komentaras" +0200021D="Pozicija" +0200021E="Aplankas" +0200021F="Aplankai" +02000220="Vylos" +02000221="Versija" +02000222="Dalis" +02000223="!!Multivolume" +02000224="!!Offset" +02000225="Nuorodos" +02000226="Blokai" +02000227="Dalys" + +; Status bar +02000301="Pasirinkta {0} objektų: " +02000302="{0} objektų" + +02000320="Failai:" +02000321="Aplankai:" +02000322="Dydis:" +02000323="Dydis suglaudinus:" +02000324="Archyvai:" + +; List Context Menu +02000401="&Stulpelių..." + +02000411="&Atverti" +02000412="&Išskleisti..." + +; ToolBar +02000501="Išskleisti" + +; Messages +02000601="Šio archyvo negalima atnaujinti." +02000602="Negalima atnaujinti archyvo „{0}“" +02000603="Negalima sukurti aplanko „{0}“" +02000604="Failas nėra palaikomas archyvas." +02000605="Klaida" +02000606="Per daug elementų" +02000607="Nėra programų, kurios būtų susietos su pateikto failo plėtiniu" +02000608="Klaidų nerasta" +02000609="Negalima atverti „{0}“ failo kaip archyvo" +0200060A="Negalima atverti šifruoto archyvo „{0}“. Neteisingas slaptažodis?" + +; Dialogs +02000702="Gerai" +02000705="&Taip" +02000707="T&aip Visiems" +02000709="&Ne" +0200070B="Ne v&isiems" + +02000710="Atšaukti" +02000711="&Atšaukti" +02000713="&Uždaryti" +02000714="Sustabdyti" +02000715="Iš naujo" + +02000720="Elektroninis žinynas" + +; Extract dialog +02000800="Išskleisti" +02000801="Iš&skleisti į:" +02000802="Slaptažodis" + +02000810="Kelio režimas" +02000811="Pilni keliai" +02000812="Dabartiniai keliai" +02000813="Jokių kelių" + +02000820="Perrašymo režimas" +02000821="Paklausti prieš perrašant" +02000822="Perrašyti neįspėjant" +02000823="Praleisti esančius failus" +02000824="Automatiškai pervadinti" +02000825="Automatiškai pervadinti esančius failus" + +02000830="Failai" +02000831="Pa&sirinktus failus" +02000832="Visus f&ailus" + +02000881="Nurodyti vietą išskleidžiamiesiems failams." + +02000890="Išskleidžiama" + +; Overwrite dialog +02000900="Failų pakeitimo patvirtinimas" +02000901="Paskirtame aplanke jau yra apdorojamas failas." +02000902="Ar norėtumėte pakeisti esančią failą" +02000903="šia failu?" + +02000911="A&utomatinis pervadinimas" + +02000982="{0} baitų" +02000983="pakeista" + +; Messages dialog +02000A00="Diagnostiniai pranešimai" + +02000A80="Pranešimas" + +02000A91="Nepalaikomas suglaudinimo metodas failui „{0}“." +02000A92="Duomenų klaida „{0}“. Failas pažeistas." +02000A93="CRC klaida „{0}“. Failas pažeistas." +02000A94="Duomenų klaida šifruotame faile „{0}“. Neteisingas slaptažodis?" +02000A95="CRC neatitikimas šifruotame faile „{0}“. Neteisingas slaptažodis?" + +; Password dialog +02000B00="Slaptažodžio įvedimas" +02000B01="Įveskite slaptažodį:" +02000B02="&Rodyti slaptažodį" +02000B03="Pakartokite slaptažodį:" +02000B10="Slaptažodžiai nesutampa" +02000B11="Slaptažodžiui naudokite tik lotyniškas raides, numerius bei specialiuosius simbolius (!, #, $, ...)" +02000B12="Slaptažodis yra per ilgas" + +; Progress dialog +02000C00="Vykdymas" +02000C01="Praėjęs laikas:" +02000C02="Likęs laikas:" +02000C03="Dydis:" +02000C04="Sparta:" +02000C05="Apdorota:" +02000C06="Suglaudinimo laipsnis:" + +02000C10="&Fone" +02000C11="&Pirminis procesas" +02000C12="&Laikinai sustabdyti" +02000C13="&Tęsti" + +02000C20="Laikinai sustabdyta" + +02000C30="Ar jūs esate tikri, kad norite atšaukti?" + +; Compress dialog +02000D00="Įtraukti į archyvą" +02000D01="&Archyvas:" +02000D02="Atna&ujinimo režimas:" +02000D03="Archyvo &formatas:" +02000D04="Glaudini&mo būdas:" +02000D05="Sukurti &vientisą archyvą" +02000D06="&Parametrai:" +02000D07="Nustatymai" +02000D08="Iš&sipakuojantis archyvas" +02000D09="Daugiagijiškumas" +02000D0A="Už&šifruoti failų pavadinimus" +02000D0B="Suglaudinimo &lygis:" +02000D0C="Žo&dyno dydis:" +02000D0D="Ž&odžio dydis:" +02000D0E="Atmintinės naudojimas suglaudinimui:" +02000D0F="Atmintinės naudojimas išskleidimui:" +02000D10="Šifravimas" +02000D11="Šifravimo metodas:" +02000D12="CPU gijų skaičius:" +02000D13="Vientiso bloko dydis:" +02000D14="Ne vientisas" +02000D15="Vientisas archyvas" +02000D16="Glaudinti dalijamus failus" + +02000D40="Skaidyti į dalis bai&tais:" +02000D41="Neteisingas dalies dydis" +02000D42="Nurodytas dalies dydis: {0} baitai.\nAr jūs esate įsitikinę, jog norite archyvą skaidyti į tokias dalis?" + +02000D81="Mažiausias" +02000D82="Normalus" +02000D83="Didžiausias" +02000D84="Greitas" +02000D85="Greitesnis" +02000D86="Smarkiausias" + +02000D90="Naršyti" + +02000DA1="Įtraukti ir pakeisti failus" +02000DA2="Atnaujinti ir įtraukti failus" +02000DA3="Atnaujinti esančius failus" +02000DA4="Sinchronizuoti failus" + +02000DB1="Visus failus" + +02000DC0="Glaudinama" + +; Columns dialog +02000E00="Stulpeliai" +02000E01="Pasirinkite stulpelius, kuriuos norėtumėte matyti aplanke. Naudokite mygtukus Aukštyn ir Žemyn keisdami stulpelių tvarką." +02000E02="Pasirinktas stulpelis turėtų būti" +02000E03="taškų &pločio." + +02000E10="&Aukštyn" +02000E11="Žemyn(&Z)" +02000E12="&Rodyti" +02000E13="&Slėpti" +02000E14="Nustatyti" + +02000E81="Antraštė" +02000E82="Plotis" + +; Testing +02000F90="tikrinama" + + +; File Manager + +03000000="7-Zip failų tvarkyklė" + +; Menu +03000102="&Failas" +03000103="K&eisti" +03000104="&Rodyti" +03000105="Įran&kiai" +03000106="&Elektroninis žinynas" +03000107="Mėgi&amiausi" + +; Failas +03000210="&Atverti" +03000211="Atverti v&iduje" +03000212="Atverti iš&orėje" +03000220="&Rodyti" +03000221="K&eisti" +03000230="Pervadi&nti" +03000231="&Kopijuoti į..." +03000232="&Perkelti į..." +03000233="Šalin&ti" +03000240="Savy&bės" +03000241="Kome&ntuoti" +03000242="Skaičiuoti kontrolinę sumą" +03000250="Sukurti aplanką" +03000251="Sukurti failą" +03000260="Išei&ti" +03000270="&Skaidyti failą..." +03000271="Jungti &failus..." + +; Edit +03000310="Atša&ukti" +03000311="Paka&rtoti" +03000320="Iškirp&ti" +03000321="&Kopijuoti" +03000322="Į&dėti" +03000323="Išt&rinti" +03000330="Pažymėti &viską" +03000331="Nužymėti viską" +03000332="Atv&irkštinis žymėjimas" +03000333="Pasirikti..." +03000334="Atžymėti..." +03000335="Pasirinkti pagal tipą" +03000336="Atžymėti pagal tipą" + +; View +03000410="Did&elės piktogramos" +03000411="&Mažos piktogramos" +03000412="&Sąrašas" +03000413="&Išsamiai" +03000420="Nerūšiuotos" +03000430="Atverti pagrindinį aplanką" +03000431="Lygiu aukščiau" +03000432="Aplankų istorija..." +03000440="&Atnaujinti" +03000449="Nepaisyti aplankų" +03000450="&2 skydeliai" +03000451="&Parankinės" +03000460="Archyvo parankinė" +03000461="Standartinė parankinė" +03000462="Dideli mygtukai" +03000463="Rodyti mygtukų tekstą" + +; Tools +03000510="&Nuostatos..." +03000511="&Spartos bandymas" + +; Help +03000610="&Turinys..." +03000620="&Apie 7-Zip..." + +; Favorites +03000710="&Pridėti katalogą prie mėgiamiausiųjų kaip" +03000720="Mėgiamiausias" + +; Options Dialog + +03010000="Nustatymai" + +; Plugins +03010100="Įskiepiai" +03010101="Įskie&piai:" +03010110="Nuostatos..." + +; Edit +03010200="Redaktorius" +03010201="R&edaktorius:" + +; System +03010300="Sistema" +03010302="Susieti 7-Zip su:" +03010310="Įskiepis" + +; Settings +03010400="Nustatos" +03010401="Rodyti „..“ failų sąraše" +03010402="Rodyti tikras failų piktogramas" +03010410="Rodyti sisteminį meniu" +03010420="&Žymėti visą eilutę" +03010421="Rodyti tinklelio linija&s" +03010430="&Kitoks žymėjimo būdas" +03010440="Naudoti didžiu&lius atmintinės puslapius" + +; Strings + +03020201="Kopijuoti" +03020202="Perkelti" +03020203="Kopijuoti į:" +03020204="Perkelti į:" +03020205="kopijuojama..." +03020206="perkeliama..." +03020207="Jūs negalite perkelti arba kopijuoti elementų šiuose aplankuose." +03020208="Veiksmas nepalaikomas." +03020209="Pasirinkite paskirties aplanką." + +03020210="Patvirtinkite failo šalinimą" +03020211="Patvirtinkite aplanko šalinimą" +03020212="Patvirtinkite kelių failų šalinimą" +03020213="Ar esate įsitikinę, jog norite pašalinti „{0}“?" +03020214="Ar esate įsitikinę, jog norite pašalinti „{0}“ aplanką ir visą jo turinį?" +03020215="Ar esate įsitikinę, jog norite pašalinti šiuos {0} elementus?" +03020216="šalinama..." +03020217="Klaida trinant failą ar aplanką" + +03020220="pervadinama..." +03020221="Klaida pervadinant failą ar aplanką" +03020222="Failų kopijavimo patvirtinimas" +03020223="Ar jūs esate įsitikinę, jog norite kopijuoti failus į archyvą?" + +03020230="Sukurti aplanką" +03020231="Aplanko pavadinimas:" +03020232="Naujas aplankas" +03020233="Klaida kuriant aplanką" + +03020240="Sukurti failą" +03020241="Failo pavadinimas:" +03020242="Naujas failas" +03020243="Klaida kuriant failą" + +03020250="Pasirinkti" +03020251="Nesirinkti" +03020252="Šablonas:" + +03020260="Aplankų istorija" + +03020280="Failas „{0}“ buvo pakeistas.\nAr norite ją atnaujinti archyve?" +03020281="Negalima atnaujinti failo\n„{0}“" +03020282="Negalima paleisti redaktoriaus." +03020283="Atidaroma..." + +03020290="Komentaras" +03020291="&Komentaras:" + +030202A0="Sistema" + +03020300="Kompiuteris" +03020301="Tinklas" + +03020400="Glaudinti" +03020401="Išskleisti" +03020402="Bandyti" + +03020420="Kopijuoti" +03020421="Perkelti" +03020422="Šalinti" +03020423="Informacija" + +03020500="Skaidyti failą" +03020501="&Skaidyti į:" +03020510="skaidoma..." +03020520="Skaidymo patvirtinimas" +03020521="Ar jūs esate įsitikinę, jog norite failą skaidyti į {0} dalis?" +03020522="Dalies dydis privalo būti mažesnis už dalijamo failo dydį" + +03020600="Sujungti failus" +03020601="&Sujungti į:" +03020610="sujungiami failai..." +03020620="Pažymėkite tik pirmą failą" + +03020710="kontrolinės sumos skaičiavimas..." +03020720="Kontrolinės sumos informacija" +03020721="Duomenų CRC kontrolinė suma:" +03020722="Duomenų ir failų pavadinimų CRC kontrolinė suma:" + +03020800="skenuojama..." + +03020900="Nuostatos" + +; Computer +03031100="Visas dydis" +03031101="Laisva vieta" +03031102="Blokinio dydis" +03031103="Pavadinimas" + +; Network +03031200="Vietinis pavadinimas" +03031201="Tiekėjas" + +; Benchmark Dialog + +03080000="Spartos bandymas" +03080001="Atmintinės naudojimas:" +03080002="Suglaudinama" +03080003="Išskleidžiama" +03080004="Sparta" +03080005="Vertinimas" +03080006="Galutinis vertinimas" +03080007="Dabartinis" +03080008="Vidutinis" +03080009="Kartai:" +0308000A="Klaidos:" +0308000B="CPU naudojimas" +0308000C="Reitingas / naudojimas" + +;!@LangEnd@! diff --git a/GUI/Lang/lv.txt b/GUI/Lang/lv.txt new file mode 100644 index 0000000..aada3c9 --- /dev/null +++ b/GUI/Lang/lv.txt @@ -0,0 +1,454 @@ +;!@Lang@!UTF-8! +; 7-Zip 4.10 beta +; Translated by Armands Radzuška +; +; +; +; + +00000000="Latvian" +00000001="Latviešu" +00000002="38" + +; 7-Zip Configuration + +; Title +01000000="7-Zip konfigurācija" + +; Info Page +01000100="Par 7-Zip" +01000103="7-Zip ir bezmaksas programma, tomēr, reģistrējoties jūs varat 7-Zip izstrādāšanu atbalstīt." +01000105="&Reģistrēties" + +; Folders Page +01000200="Mapes" +01000210="&Darba mape" +01000211="&Sistēmas pagaidfailu mape" +01000212="&Tekošā" +01000213="&Noteikt:" +01000214="&Izmantot tikai maināmajiem nesējiem" + +01000281="Norādiet vietu arhīvu pagaidfailiem." + +; System Page +01000300="Sistēma" +01000301="&Integrēt 7-Zip Windows vides kontekstizvēlē" +01000302="&Kaskādveida kontekstizvēle" +01000310="Kontekstizvēles elementi:" + +; Language Page +01000400="Valoda" +01000401="Valoda:" + + +; 7-Zip Explorer extension + +; Context menu +02000101="7-Zip" +02000102="7-Zip komandas" +02000103="Atvērt arhīvu" +02000104="Atver izvēlēto arhīvu." +02000105="Izvilkt failus..." +02000106="Izvelk failus no izvēlētā arhīva." +02000107="Ielikt arhīvā..." +02000108="Pievieno izvēlētās vienības arhīvam." +02000109="Pārbaudīt arhīvu" +0200010A="Pārbauda izvēlētā arhīva veselumu." +0200010B="Izvilkt šeit" +0200010C="Failus no izvēlētā arhīva izvelk patreizējā mapē." +0200010D="Izvilkt {0} mapē" +0200010E="Izvelk failus apakšmapē." +0200010F="Ielikt {0}" +02000110="Ieliek izvēlētos elementus arhīvā." +02000111="Saspiest, sūtīt pa e-pastu..." +02000112="Ieliek izvēlētās vienības arhīvā un sūta arhīvu pa e-pastu." +02000113="Saspiest {0}, sūtīt pa e-pastu" +02000114=" Ieliek izvēlētās vienības arhīvā un sūta arhīvu pa e-pastu." + +02000140="" +02000141="" + +; Properties +02000203="Ceļš" +02000204="Nosaukums" +02000205="Paplašinājums" +02000206="Mape" +02000207="Lielums" +02000208="Saspiests" +02000209="Atribūti" +0200020A="Izveidots" +0200020B="Atvērts" +0200020C="Pārveidots" +0200020D="Blīvs" +0200020E="Piezīmes" +0200020F="Šifrēts" +02000210="Dalīts pirms" +02000211="Dalīts pēc" +02000212="Vārdnīca" +02000213="CRC" +02000214="Veids" +02000215="Anti" +02000216="Paņēmiens" +02000217="Sistēma" +02000218="Failu sistēma" +02000219="Lietotājs" +0200021A="Grupa" +0200021B="Bloks" +0200021C="Piezīmes" +0200021D="Pozīcija" + +; Status bar +02000301="Iezīmēts(i) {0} objekts(i)" +02000302="{0} objekts(i)" + +; List Context Menu +02000401="&Stabiņi..." + +02000411="&Atvērt" +02000412="&Izvilkt..." + +; ToolBar +02000501="Izvilkšana" + +; Messages +02000601="Šis arhīvs neatbalsta pārveidošanu." +02000602="Arhīvu {0} neizdevās pārveidot." +02000603="Mapi '{0}' neizdevās izveidot." +02000604="Fails nav atbalstīts arhīvs." +02000605="Kļūda" +02000606="Par daudz vienību." +02000607="Ar doto faila paplašinājumu neviena programma nav saistīta." +02000608="Kļūdu nav." + +; Dialogs +02000702="&Labi" +02000705="&Jā" +02000707="Jā &visiem" +02000709="&Nē" +0200070B="Nē v&isiem" + +02000710="&Atcelt" +02000711="&Atcelt" +02000713="Aiz&vērt" +02000714="Stop" +02000715="Pārstartēt" + +02000720="&Rokasgrāmata" + +; Extract dialog +02000800="Izvilkšana" +02000801="&Izvilkt uz:" +02000802="&Parole" + +02000810="Ceļi" +02000811="Pilni &ceļu nosaukumi" +02000812="Patreizējie ceļu &nosaukumi" +02000813="&Bez ceļu nosaukumiem" + +02000820="Pārrakstīšana" +02000821="&Jautāt pirms pārrakstīšanas" +02000822="Pārra&kstīt bez jautāšanas" +02000823="I&zlaist esošos failus" +02000824="A&utopārdēvēšana" +02000825="Automātiski pārdēvēt esošos failu" + +02000830="Faili" +02000831="&Iezīmētie faili" +02000832="&Visi faili" + +02000881="Norādiet vietu izvelkamiem failiem." + +02000890="Izvilkšana" + +; Overwrite dialog +02000900="Apstipriniet faila aizvietošanu" +02000901="Mērķa mape jau satur apstrādājamo failu." +02000902="Vai vēlaties aizvietot esošo failu" +02000903="ar šo?" + +02000911="Autopārdēvēšana" + +02000982="{0} baiti" +02000983="pārveidots" + +; Messages dialog +02000A00="Diagnostikas paziņojumi" + +02000A80="Paziņojums" + +02000A91="Neatbalstīts saspiešanas paņēmiens '{0}' failam." +02000A92="Datu kļūda '{0}'. Fails ir bojāts." +02000A93="CRC kļūda '{0}'. Fails ir bojāts." + +; Password dialog +02000B00="Paroles ievadīšana" +02000B01="Ievadiet paroli:" +02000B02="Par&ole redzama" + +; Progress dialog +02000C00="Process" +02000C01="Pagājušais laiks:" +02000C02="Atlikušais laiks:" +02000C03="Lielums:" +02000C04="Ātrums:" + +02000C10="&Fonā" +02000C11="&Priekšplānā" +02000C12="Pa&uze" +02000C13="&Turpināt" + +02000C20="Pauzēts" + +02000C30="Vai piekrītat pārtraukt šo darbību?" + +; Compress dialog +02000D00="Pievienošana arhīvam" +02000D01="Ar&hīvs:" +02000D02="Pār&veidošanas režīms:" +02000D03="Arhīva &formāts:" +02000D04="&Saspiešanas paņēmiens:" +02000D05="Izveidot &blīvo arhīvu" +02000D06="Parame&tri:" +02000D07="&Uzstādījumi" +02000D08="Izveidot SF&X arhīvu" +02000D09="&Multiplūsmas" +02000D0A="Šifrēt failu &nosaukumus" +02000D0B="&Saspiešanas līmenis:" +02000D0C="&Vārdnīcas lielums:" +02000D0D="Vār&da lielums:" +02000D0E="Atmiņa arhivēšanai:" +02000D0F="Atmiņa atarhivēšanai:" + +02000D40="&Dalīt sējumos, baitos:" + +02000D81="Uzkrāšana nesaspiežot" +02000D82="Parastais" +02000D83="Maksimālā saspiešana" +02000D84="Ātrais" +02000D85="Ātrākais" +02000D86="Ultra" + +02000D90="Pārlūkošana" + +02000DA1="Pievienot un aizvietot failus" +02000DA2="Atjaunināt un pievienot failus" +02000DA3="Atjaunināt esošos failus" +02000DA4="Sinhronizēt failus" + +02000DB1="Visi faili" + +02000DC0="saspiešana" + +; Columns dialog +02000E00="Stabiņi" +02000E01="Atzīmējiet stabiņus, ko Jūs vēlaties redzēt šai skatā. Izmantojiet pogas „Uz augšu” un „Uz leju” stabiņu pārkārtošanai pēc savas gaumes." +02000E02="Iezīmētajiem stabiņiem jābūt" +02000E03="pikseļus &platiem." + +02000E10="Uz a&ugšu" +02000E11="Uz &leju" +02000E12="Pa&rādīt" +02000E13="Pa&slēpt" +02000E14="Uzstādīt" + +000E81="Nosaukums" +02000E82="Platums" + +; Testing +02000F90="Pārbaude" + + +; File Manager + +03000000="7-Zip failu pārzinis" + +; Menu +03000102="&Fails" +03000103="&Labošana" +03000104="&Izskats" +03000105="&Rīki" +03000106="&Palīdzība" +03000107="Ie&cienītās" + +; File +03000210="&Atvērt" +03000211="Atvērt &iekšpusē" +03000212="Atvērt ārp&usē" +03000220="Ap&skate" +03000221="&Labot" +03000230="Pā&rdēvēt" +03000231="&Kopēt uz..." +03000232="Pār&vietot uz..." +03000233="&Dzēst" +03000240="Īpašī&bas" +03000241="&Piezīmes" +03000250="Izveidot &mapi" +03000251="Izveidot &failu" +03000260="&Beigt" +03000270="&Sadalīt failu..." +03000271="Ap&vienot failus..." + +; Edit +03000310="&Atcelt" +03000311="At&jaunot" +03000320="&Izgriezt" +03000321="&Kopēt" +03000322="Ieviet&ot" +03000323="&Dzēst" +03000330="Iezīmēt &visu" +03000331="Atcelt vis&u" +03000332="I&nvertēt iezīmējumu" +03000333="Ie&zīmēt..." +03000334="&Atcelt..." +03000335="I&ezīmēt pēc tipa" +03000336="A&tcelt pēc tipa" + +; View +03000410="&Lielas ikonas" +03000411="&Mazas ikonas" +03000412="&Saraksts" +03000413="Sī&kāk" +03000420="&Nešķirot" +03000430="&Atvērt saknes mapi" +03000431="Līmeni &uz augšu" +03000432="Mapju &vēsture..." +03000440="&Pārlasīt" +03000450="&2 paneļi" +03000451="&Rīku joslas" +03000460="Arhīva rīku josla" +03000461="Standarta rīku josla" +03000462="Lielas pogas" +03000463="Parādīt pogu tekstu" + +; Tools +03000510="&Uzstādījumi..." +03000511="&Darbspējas pārbaude" + +; Help +03000610="&Rokasgrāmatas saturs..." +03000620="&Par 7-Zip..." + +; Favorites +03000710="&Pievienot mapi iecienītajām kā" +03000720="Iecienītās" + +; Options Dialog + +03010000="Uzstādījumi" + +; Plugins +03010100="Iespraudņi" +03010101="Iespraudņi:" +03010110="&Uzstādījumi..." + +; Edit +03010200="Labošana" +03010201="&Labošanas programma:" + +; System +03010300="Sistēma" +03010302="Piesaistīt 7-Zip pie:" +03010310="Iespraudnis" + +; Settings +03010400="Uzstādījumi" +03010401="Parādīt \"..\" &vienību" +03010402="Parādīt īstās &failu ikonas" +03010410="Parādīt &sistēmas izvēli" +03010420="&Pilnas rindas iezīmēšana" +03010421="Parādīt at&dalošās līnijas" + +; Strings + +03020201="Kopēt" +03020202="Pārvietot" +03020203="Kopēt uz:" +03020204="Pārvietot uz:" +03020205="Kopēšana..." +03020206="Pārvietošana..." +03020207="Vienības uz šīm mapēm nevar kopēt vai pārvietot." +03020208="Darbība nav atbalstīta." + +03020210="Faila dzēšanas apstiprinājums" +03020211="Mapes dzēšanas apstiprinājums" +03020212="Vairāku failu dzēšanas apstiprinājums" +03020213="Vai piekrītat '{0}' dzēšanai?" +03020214="Vai piekrītat mapes '{0}' un visa tās satura dzēšanai?" +03020215="Vai piekrītat šo {0} vienību dzēšanai?" +03020216="Dzēšana..." +03020217="Faila vai mapes dzēšanas kļūda" + +03020220="Pārdēvēšana..." +03020221="Faila vai mapes pārdēvēšanas kļūda" + +03020230="Mapes izveidošana" +03020231="Mapes nosaukums:" +03020232="Jauna mape" +03020233="Mapes izveidošanas kļūda" + +03020240="Faila izveidošana" +03020241="Faila nosaukums:" +03020242="Jauns fails" +03020243="Faila izveidošanas kļūda" + +03020250="Iezīmēšana" +03020251="Iezīmējuma atcelšana" +03020252="Šablons:" + +03020260="Mapju vēsture" + +03020280="Fails '{0}' ir pārveidots.\nVai vēlaties to atjaunināt arī arhīvā?" +03020281="Failu nav iespējams uzlabot\n'{0}'" +03020282="Nav iespējams palaist labošanas programmu." +03020283="Atvēršana..." + +03020290="Piezīmes" +03020291="&Piezīmes:" + +030202A0="Sistēma" + +03020300="Dators" +03020301="Tīkls" + +03020400="Ievietot" +03020401="Izvilkt" +03020402="Pārbaude" + +03020420="Kopēt" +03020421="Ppārvietot" +03020422="Dzēst" +03020423="Info" + +03020500="Sadalīt failu" +03020501="&Dalīt uz:" +03020510="Dalīšana..." + +03020600="Apvienot failus" +03020601="&Apvienot uz:" +03020610="Apvienošana..." + +; Computer +03031100="Tilpums" +03031101="Brīvā vieta" +03031102="Klāstera lielums" +03031103="Nosaukums" + +; Network +03031200="Lokālais nosaukums" +03031201="Provaiders" + +; Benchmark Dialog + +03080000="Darpspējības pārbaude" +03080001="Atmiņas pielietojums:" +03080002="Arhivēšana" +03080003="Atarhivēšana" +03080004="Ātrums" +03080005="Vērtējums" +03080006="Kopējais vērtējums" +03080007="Patreizējais" +03080008="Rezultējošais" +03080009="Izdošanās:" +0308000A="Kļūdas:" + +;!@LangEnd@! diff --git a/GUI/Lang/mk.txt b/GUI/Lang/mk.txt new file mode 100644 index 0000000..f0c6525 --- /dev/null +++ b/GUI/Lang/mk.txt @@ -0,0 +1,454 @@ +;!@Lang@!UTF-8! +; 7-Zip 4.09 beta +; Translated by Gabriel Stojanoski +; Преведено од Габриел Стојаноски +; +; +; + +00000000="Macedonian" +00000001="Македонски" +00000002="47" + +; 7-Zip Подесување + +; Title +01000000="7-Zip Подесување" + +; Info Page +01000100="За 7-Zip" +01000103="7-Zip е бесплатен архивер. Меѓутоа, вие можете да дадете поддршка на понатамошното развивање на 7-Zip со вашето регистрирање." +01000105="Регистрирај" + +; Folders Page +01000200="Директориуми" +01000210="&Работен директориум" +01000211="&Системски привремен директориум" +01000212="&Моментален" +01000213="&Одреди:" +01000214="Само за преносни уреди" + +01000281="Одреди локација за привремените архивски датотеки." + +; System Page +01000300="Систем" +01000301="Интегрирај го 7-Zip во додатно мени" +01000302="Каскадно додатно мени" +01000310="Во додатното мени:" + +; Language Page +01000400="Јазик" +01000401="Јазик:" + + +; 7-Zip Explorer extension + +; Context menu +02000101="7-Zip" +02000102="7-Zip команди" +02000103="Отвори архива" +02000104="Ја отвора селектираната архива." +02000105="Отпакувај датотеки..." +02000106="Отпакува датотеки од селектираната архива." +02000107="Додади во Архива..." +02000108="Ги додава селектираните датотеки во архива." +02000109="Тестирај архива" +0200010A="Ја тестира селектираната архива." +0200010B="Отпакувај овде" +0200010C="Отпакува датотеки од избраната архива во моменталниот директориум." +0200010D="Отпакувај во {0}" +0200010E="Отпакува датотеки во поддиректориум." +0200010F="Додади во {0}" +02000110="Ги додава одредените датотеки во архива." +02000111="Компресирај и прати на e-mail..." +02000112="Ги компресира датотеките во архива и архивата ја испраќа преку e-mail." +02000113="Компресирај во {0} и испрати" +02000114="Ги компресира датотеките во архива и архивата ја испраќа преку e-mail." + +02000140="<Директориум>" +02000141="<Архива>" + +; Properties +02000203="Патека" +02000204="Име" +02000205="Екстензија" +02000206="Директориум" +02000207="Големина" +02000208="Пакувана Големина" +02000209="Атрибути" +0200020A="Креирано" +0200020B="Пристапено" +0200020C="Променето" +0200020D="Целосна" +0200020E="Објаснета" +0200020F="Енкриптирана" +02000210="Подели Пред" +02000211="Подели После" +02000212="Речник" +02000213="CRC" +02000214="Тип" +02000215="Анти" +02000216="Метод" +02000217="Оперативен Систем" +02000218="Датотечен Систем" +02000219="Корисник" +0200021A="Група" +0200021B="Блок" +0200021C="Коментар" +0200021D="Позиција" + +; Status bar +02000301="{0} објект(и) избрано" +02000302="{0} објект(и)" + +; List Context Menu +02000401="&Колони..." + +02000411="&Отвори" +02000412="От&пакувај..." + +; ToolBar +02000501="Отпакувај" + +; Messages +02000601="Оваа операција не е поддржана за овој тип на архива." +02000602="Не е можно обновување на архивата {0}" +02000603="Не е можно креирање на директориумот '{0}'" +02000604="Датотеката не е поддржана архива." +02000605="Грешка" +02000606="Премногу објекти" +02000607="Нема програма придружена со оваа екстензија" +02000608="Нема грешки" + +; Dialogs +02000702="Ок" +02000705="&Да" +02000707="Да &Сите" +02000709="&Не" +0200070B="Не Н&иедна" + +02000710="Откажи" +02000711="&Откажи" +02000713="&Затвори" +02000714="Стоп" +02000715="Рестартирај" + +02000720="Помош" + +; Extract dialog +02000800="Отпакувај" +02000801="Отпакувај &во:" +02000802="Лозинка" + +02000810="Патеки" +02000811="Целосна патека" +02000812="Моментална патека" +02000813="Без патека" + +02000820="Презапишување" +02000821="Прашај пред да презапишеш" +02000822="Презапиши без прашување" +02000823="Изостави постоечки датотеки" +02000824="Автоматски преименувај" +02000825="Автоматски преименувај постоечки датотеки" + +02000830="Датотеки" +02000831="&Избрани датотеки" +02000832="&Сите датотеки" + +02000881="Одреди локација за отпакуваните датотеки." + +02000890="Отпакување" + +; Overwrite dialog +02000900="Потврди Замена на Датотеки" +02000901="Конечниот директориум веќе ја содржи датотеката." +02000902="Дали сакате да ја замените постоечката датотека" +02000903="со оваа?" + +02000911="&Автоматски преименувај" + +02000982="{0} бајти" +02000983="променета на" + +; Messages dialog +02000A00="Дијагноза" + +02000A80="Порака" + +02000A91="Неподдржан метод за компресија за '{0}'." +02000A92="Грешка во податоците во '{0}'. Датотеката е оштетена." +02000A93="CRC грешка во '{0}'. Датотеката е оштетена." + +; Password dialog +02000B00="Внеси лозинка" +02000B01="Внеси лозинка:" +02000B02="&Прикажи ја лозинката" + +; Progress dialog +02000C00="Процесирај" +02000C01="Поминато време:" +02000C02="Преостанато време:" +02000C03="Големина:" +02000C04="Брзина:" + +02000C10="По&задина" +02000C11="&Напред" +02000C12="&Пауза" +02000C13="П&родолжи" + +02000C20="Паузирано" + +02000C30="Дали сигурно сакате да откажете?" + +; Compress dialog +02000D00="Додади во архива" +02000D01="&Архива:" +02000D02="&Додавање:" +02000D03="&Формат на Архива:" +02000D04="&Метод на компресија:" +02000D05="Креирај &Целосна архива" +02000D06="&Параметри:" +02000D07="Опции" +02000D08="Креирај SFX ар&хива" +02000D09="Multi-threading" +02000D0A="&Енкриптирај ги имињата" +02000D0B="&Ниво на компресија:" +02000D0C="Големина на &речникот:" +02000D0D="Големина на &зборот:" +02000D0E="Искорист мемор за компрес:" +02000D0F="Искорист мемор за декомпрес:" + +02000D40="&Подели на делови, бајти:" + +02000D81="Спакувај" +02000D82="Нормално" +02000D83="Максимално" +02000D84="Брзо" +02000D85="Најбрзо" +02000D86="Ултра" + +02000D90="Барај" + +02000DA1="Додади и замени датотеки" +02000DA2="Обнови и додади датотеки" +02000DA3="Обнови ги постоечките датотеки" +02000DA4="Синхронизирај ги датотеките" + +02000DB1="Сите Датотеки" + +02000DC0="Компресирање" + +; Columns dialog +02000E00="Колони" +02000E01="Селектирај ги колоните што сакаш да бидат видливи во овој директориум. Употреби ги Нагоре и Надолу копчињата за да ги преуредиш колоните." +02000E02="Избраната колона треба да биде" +02000E03="пиксели &широка." + +02000E10="На&горе" +02000E11="На&долу" +02000E12="&Прикажи" +02000E13="&Сокриј" +02000E14="Стави" + +02000E81="Име" +02000E82="Ширина" + +; Testing +02000F90="Тестирање" + + +; File Manager + +03000000="7-Zip Менаџер" + +; Menu +03000102="&Датотека" +03000103="&Уреди" +03000104="&Изглед" +03000105="&Алатки" +03000106="&Помош" +03000107="&Омилени" + +; File +03000210="&Отвори" +03000211="Отвори &Внатре" +03000212="Отвори &Надвор" +03000220="&Поглед" +03000221="&Уреди" +03000230="&Преименувај" +03000231="&Копирај Во..." +03000232="&Премести Во..." +03000233="&Избриши" +03000240="&Карактеристики" +03000241="К&оментар" +03000250="Креирај Директориум" +03000251="Креирај Датотека" +03000260="&Излези" +03000270="&Подели датотека..." +03000271="Ком&бинирај датотеки..." + +; Edit +03000310="&Undo" +03000311="&Redo" +03000320="Пре&сечи" +03000321="&Копирај" +03000322="&Залепи" +03000323="&Избриши" +03000330="Селектирај &Се" +03000331="Деселектирај Се" +03000332="&Обратна Селекција" +03000333="Селектирај..." +03000334="Деселектирај..." +03000335="Селектирај по Тип" +03000336="Деселектирај по Тип" + +; View +03000410="&Големи Икони" +03000411="&Мали Икони" +03000412="&Листа" +03000413="&Детали" +03000420="Неподредени" +03000430="Отвори го основниот директориум" +03000431="Едно Ниво Нагоре" +03000432="Историја на Директориумите..." +03000440="&Обнови" +03000450="&2 Панели" +03000451="&Алатници" +03000460="Алатница на Архивата" +03000461="Стандардна Алатница" +03000462="Големи Копчиња" +03000463="Текст На Копчињата" + +; Tools +03000510="&Опции..." +03000511="&Тест" + +; Help +03000610="&Содржина..." +03000620="&За 7-Zip..." + +; Favorites +03000710="&Додади го директориумот во Омилени" +03000720="Забелешки" + +; Options Dialog + +03010000="Опции" + +; Plugins +03010100="Плагини" +03010101="&Плагини:" +03010110="Опции..." + +; Edit +03010200="Едитор" +03010201="&Едитор:" + +; System +03010300="Систем" +03010302="Придружи го 7-Zip со:" +03010310="Плагин" + +; Settings +03010400="Подесувања" +03010401="Прикажи \"..\" предмет" +03010402="Прикажи вистински икони" +03010410="Прикажи системско мени" +03010420="&Селектирај &цел ред" +03010421="Прикажи &мрежа" + +; Strings + +03020201="Копирај" +03020202="Премести" +03020203="Копирај Во:" +03020204="Премести Во:" +03020205="Копирање..." +03020206="Преместување..." +03020207="Не е можно преместување или копирање на предмети од вакви директориуми." +03020208="Постапката не е поддржана." + +03020210="Потврдете го Бришењето на Датотеката" +03020211="Потврдете го Бришењето на Директориумот" +03020212="Потврдете го бришењето на повеќе датотеки" +03020213="Дали сте сигурни за бришењето на '{0}'?" +03020214="Дали сте сигурни за бришењето на директориумот '{0}' и неговата содржина?" +03020215="Дали сте сигурни за бришењето на овие {0} датотеки?" +03020216="Бришење..." +03020217="Грешка при бришењето на Датотеката или Директориумот" + +03020220="Преименување..." +03020221="Грешка при преименувањето на Датотеката или Директориумот" + +03020230="Креирај Директориум" +03020231="Име на Директориумот:" +03020232="Нов Директориум" +03020233="Грешка при креирањето на Директориумот" + +03020240="Креирај датотека" +03020241="Име на Датотеката:" +03020242="Нова датотека" +03020243="Грешка при креирањето на датотеката" + +03020250="Селектирај" +03020251="Деселектитај" +03020252="Маскирај:" + +03020260="Историја на Директориумите" + +03020280="Датотеката '{0}' е модифицирана.\nДали сакате да ја обновите во архивата?" +03020281="Не е можно обновување на датотеката\n'{0}'" +03020282="Грешка при стартување на Едиторот." +03020283="Отворање..." + +03020290="Коментар" +03020291="&Коментар:" + +030202A0="Систем" + +03020300="Компјутер" +03020301="Мрежа" + +03020400="Додади" +03020401="Отпакувај" +03020402="Тестирај" + +03020420="Копирај" +03020421="Премести" +03020422="Избриши" +03020423="Инфо" + +03020500="Подели датотека" +03020501="&Подели на:" +03020510="Делење..." + +03020600="Состави Датотеки" +03020601="&Состави на:" +03020610="Составување..." + +; Computer +03031100="Вкупна Големина" +03031101="Слободен Простор" +03031102="Голем на Кластерите" +03031103="Етикета" + +; Network +03031200="Име" +03031201="Провајдер" + +; Benchmark Dialog + +03080000="Тест" +03080001="Искорист Меморија:" +03080002="Компресирање" +03080003="Декомпресирање" +03080004="Брзина" +03080005="Проценка" +03080006="Вкупна Проценка" +03080007="Моментално" +03080008="Резултат" +03080009="Поминато:" +0308000A="Грешки:" + +;!@LangEnd@! diff --git a/GUI/Lang/mn.txt b/GUI/Lang/mn.txt new file mode 100644 index 0000000..c459520 --- /dev/null +++ b/GUI/Lang/mn.txt @@ -0,0 +1,459 @@ +;!@Lang@!UTF-8! +; 7-Zip 3.12 +; Translated by Bayar +; Update and Spelling corrected Bayarsaikhan +; +; +; + +00000000="Mongolian" +00000001="Монгол хэл" +00000002="80" + +; 7-Zip Configuration + +; Title +01000000="7-Zip тохируулга" + +; Info Page +01000100="7-Zip-ийн тухай" +01000103="7-Zip бол үнэгүй програм. Гэлээ ч та 7-Зип-д бүртгүүлэн хөгжүүлэгчдийг дэмжиж болно. Бүртгүүлсэн хэрэглэгчид техникийн дэмжлэг авах болно." +01000104="Дэмжлэг" +01000105="Бүртгүүлэх" + +; Folders Page +01000200="Хавтсууд" +01000210="&Ажлын хавтас" +01000211="&Систем\завсрын хавтас" +01000212="&Одоогийн" +01000213="&Тодорхойлсон:" +01000214="Зөвхөн зөөврийн төхөөрөмж хэрэглэх" + +01000281="Завсрын архив файл үүсгэх байрлалыг тодорхойл." + +; System Page +01000300="Систем" +01000301="7-Зип-ийг шелл контекст цэстэй нийлүүлэх" +01000302="Контекст цэсийг цувуулан харуул" +01000310="Контекст цэсийн төрлүүд:" + +; Language Page +01000400="Хэл" +01000401="Хэл:" + + +; 7-Zip Explorer extension + +; Context menu +02000101="7-Зип" +02000102="7-Зип тушаалууд" +02000103="Архив нээх" +02000104="Сонгосон архив нээх." +02000105="Файлуудыг задал..." +02000106="Сонгосон архиваас файлыг задал." +02000107="Архивт нэм..." +02000108="Сонгосон зүйлүүдээ архивт нэм." +02000109="Архивийн шалгалт" +0200010A="Сонгогдсон архивийн бүтэн байдлыг шалгах." +0200010B="Энд задал" +0200010C="Сонгогдсон архиваас одооны хавтаст файлыг задал." +0200010D="{0} руу задал" +0200010E="Ерөнхий хавтаст файлыг задлах." +0200010F="{0} рүү нэм" +02000110="Сонгосон зүйлүүдээ архивт нэм." +02000111="Шахах ба Шуудандах..." +02000112="Сонгогдсон зүйлүүдийг шахаад Шуудангаар илгээх" +02000113="{0} рүү шахах ба Шууданд" +02000114="Сонгогдсон зүйлүүдийг шахаад архивийг Шуудангаар илгээх" + +02000140="<Хавтас>" +02000141="" + +; Properties +02000203="Зам" +02000204="Нэр" +02000205="Өргөтгөл" +02000206="Хавтас" +02000207="Хэмжээ" +02000208="Багцалсан хэмжээ" +02000209="Чанар" +0200020A="Үүсгэсэн" +0200020B="Хандсан" +0200020C="Өөрчилсөн" +0200020D="Баталгаатай" +0200020E="Тайлбар хийгдсэн" +0200020F="Нууцлагдсан" +02000210="Өмнө хуваасан" +02000211="Дараа хуваасан" +02000212="Толь бичиг" +02000213="CRC" +02000214="Төрөл" +02000215="Эсрэг" +02000216="Арга" +02000217="Хост ҮС" +02000218="Файл систем" +02000219="Хэрэглэгч" +0200021A="Бүлэг" +0200021B="Түгжих" +0200021C="Тайлбар" +0200021D="Байрлал" + +; Status bar +02000301="{0} зүйл(үүд) сонгогдсон байна" +02000302="{0} зүйл(үүд)" + +; List Context Menu +02000401="&Баганууд..." + +02000411="&Нээх" +02000412="&Задлах..." + +; ToolBar +02000501="Задлах" + +; Messages +02000601="Дэмжигдээгүй архивийг задлах шинэчлэлт хийх." +02000602="Архив шинэчилж чадсангүй {0}" +02000603="Хавтас үүсгэж чадахгүй '{0}'" +02000604="Дэмжигдээгүй файлын архив байна." +02000605="Алдаа" +02000606="Дэндүү их юм байна" +02000607="Файлын нэрийн өргөтгөлтөй холдбогдсон програм байхгүй байна даа" +02000608="Алдаа алга байна" + +; Dialogs +02000702="За" +02000705="&Тийм" +02000707="Бүг&д тийм" +02000709="&Үгүй" +0200070B="Бүгд ү&гүй" + +02000710="Болих" +02000711="&Болих" +02000713="&Хаах" +02000714="Зогс" +02000715="Дахин ачаалла" + +02000720="Тусламж" + +; Extract dialog +02000800="Задал" +02000801="З&адлах газар:" +02000802="Нууц үг" + +02000810="Замын горим" +02000811="Бүтэн замын нэр" +02000812="Одоогийн замын нэр" +02000813="Параметр алга" + +02000820="Давхарлаж бичих горим" +02000821="Давхарлаж бичхээсээ өмнө асуух" +02000822="Асуултгүй давхарлаж бичих" +02000823="Байгаа файлыг алгасах" +02000824="Автоматаар нэр солих" +02000825="Байвал нэрийг нь солих" + +02000830="Файлууд" +02000831="&Сонгогдсон файлууд" +02000832="&Бүх файлууд" + +02000881="Задалсан файлуудын байрлалыг тодорхойл." + +02000890="Задалж байна..." + +; Overwrite dialog +02000900="Файл дахин байрлуулахыг батлах" +02000901="Хавтас файлыг агуулсан байна." +02000902="Байгаа файлуудыг дахин байрлуулах уу" +02000903="Энүүнтэй юу?" + +02000911="A&втомат нэр солих" + +02000982="{0} битүүд" +02000983="Өөрчлөлт идэвхжилттэй" + +; Messages dialog +02000A00="Шинжилгээний зурвас" + +02000A80="Зурвас" + +02000A91="Дараах файлд шахалтын арга дэмжигдээгүй байна '{0}'." +02000A92="'{0}'өгөгдлийн алдаа. Файл эвдэрсэн байна." +02000A93="'{0}'CRC бүтсэнгүй. Файл эвдэрсэн байна." + +; Password dialog +02000B00="Нууц үгээ оруулах" +02000B01="Нууц үгээ оруулах:" +02000B02="&Нууц үг харуулах" + +; Progress dialog +02000C00="Үйл явц" +02000C01="Өнгөрсөн хугацаа:" +02000C02="Үлдсэн хугацаа:" +02000C03="Хэмжээ:" +02000C04="Хурд:" + +02000C10="&Ар талд" +02000C11="&Өмнө тал" +02000C12="&Түр зогс" +02000C13="&Үргэлжлүүл" + +02000C20="Түр зогслоо" + +02000C30="Та үнэхээр болих гэж байна уу?" + +; Compress dialog +02000D00="Архивт нэм" +02000D01="&Aрхив:" +02000D02="&Шинэчлэх горим:" +02000D03="Архив &өргөтгөл:" +02000D04="Шахах &арга:" +02000D05="Баталгаатай архив үүсгэх" +02000D06="&Параметерүүд:" +02000D07="Сонголтууд" +02000D08="SF&X архив үүсгэх" +02000D09="Олон-Бодлогын" +02000D0A="&Файлын нэрүүдийг нууцал" +02000D0B="Шахалтын &төвшин:" +02000D0C="&Толь бичгийн хэмжээ:" +02000D0D="&Үгийн хэмжээ:" +02000D0E="Шахаж байгаа санах ойн хэрэглээ:" +02000D0F="Задалж байгаа санах ойн хэрэглээ:" + +02000D40="Эзлэхүүн рүү хуваах, битүүд:" + +02000D81="Хадгалах" +02000D82="Энгийн" +02000D83="Дээд хэмжээгээр" +02000D84="Хурдан" +02000D85="Дээд хурданаар" +02000D86="Ултра" + +02000D90="Нэгжих" + +02000DA1="Нэмэх ба дахин байрлуулах" +02000DA2="Шинэчлэх ба дахин байрлуулах" +02000DA3="Байгаа файлуудыг дахин унших" +02000DA4="Файлуудыг тааруулах" + +02000DB1="Бүх файлууд" + +02000DC0="Шахаж байна" + +; Columns dialog +02000E00="Баганууд" +02000E01="Энэ хавтаст хийх багануудаа шалгана уу. Дээш оч доош оч товчлуураар та багануудаа янзалж болно." +02000E02="Сонгосон багана чинь ийм байх ёстой" +02000E03="Цэгийн &өргөн." + +02000E10="Дээш &оч" +02000E11="Доош &оч" +02000E12="&Үзүүлэх" +02000E13="&Нуух" +02000E14="Оруулах" + +02000E81="Гарчиг" +02000E82="Өргөн" + +; Testing +02000F90="Шалгаж байна" + + +; File Manager + +03000000="7-Зип файл Менежер" + +; Menu +03000102="&Файл" +03000103="&Засах" +03000104="&Үзүүлэх" +03000105="&Хэрэгслүүд" +03000106="&Тусламж" +03000107="Д&уртай зүйл" + +; File +03000210="&Нээх" +03000211="Дотор &нээх" +03000212="Гадна &нээх" +03000220="&Харах" +03000221="&Засварлах" +03000230="Нэр с&олих" +03000231="...рүү &Хуулах..." +03000232="...руу &Зөөх..." +03000233="&Устгах" +03000240="&Мэдээлэл үзэх" +03000241="Тай&лбар" +03000250="Хавтас үүсгэх" +03000251="Файл үүсгэх" +03000260="Га&рах" +03000270="&Файл хуваах..." +03000271="Файлуудыг нэгтгэх..." + +; Edit +03000310="&Цуцлах" +03000311="&Сэргээх" +03000320="Хайч&лах" +03000321="&Хуулах" +03000322="&Тавих" +03000323="&Устгах" +03000330="Бүгдийг со&нгох" +03000331="Сонгохоо болих" +03000332="&Сонголтоо эргүүл" +03000333="Сонгох..." +03000334="Сонгохгүй..." +03000335="Төрлөөр нь сонгох" +03000336="Төрлөөр нь сонгохгүй" + +; View +03000410="Том& дүрсүүд" +03000411="Жи&жиг дүрсүүд" +03000412="&Жагсаалт" +03000413="&Дэлгэрэнгүй" +03000420="Ангилаагүй" +03000430="Гол хавтсыг нээх" +03000431="Нэг төвшин дээш" +03000432="Хавтасны түүх..." +03000440="&Сэргээ" +03000450="&2 самбарууд" +03000451="&Багажны самбар" +03000460="Aрхив багажны самбар" +03000461="Стандарт багажны самбар" +03000462="Том товчлуурууд" +03000463="Товчлуурын текстийг үзүүл" + +; Tools +03000510="&Сонголтууд..." +03000511="&Бэнчмарк" + +; Help +03000610="&Агуулгууд..." +03000620="&7-Зип-ийн тухай..." + +; Favorites +03000710="&Хавтсыг дуртайдаа нэмэх үү" +03000720="Хавчуурга" + +; Options Dialog + +03010000="Сонголтууд" + +; Plugins +03010100="Плаг-инууд" +03010101="&Плаг-инууд:" +03010110="Сонголтууд..." + +; Edit +03010200="Засварлагч" +03010201="&Засварлагч:" + +; System +03010300="Систем" +03010302="7-Зипийг дараахтай нэгтгэх:" +03010310="Плаг-ин" + +; Settings +03010400="Тохируулгууд" +03010401="Зүйл \"..\" үзүүлэх" +03010402="Жинхэнэ файл дүрсийг харуулах" +03010410="Системийн цэс харуул" +03010420="&Бүтэн мөр сонгох" +03010421="&Мөрийн дундах зураас харуулах" +03010430="&Сайжруулсан Сонгох горим" +03010440="&Том санах ойн хуудас хэрэглэх" + +; Strings + +03020201="Хуулах" +03020202="Зөөх" +03020203="хуулахдаа:" +03020204="Зөөхдөө:" +03020205="Хуулж байна..." +03020206="Зөөж байна..." +03020207="Та файл ба хавтсыг зөөх буюу хуулж чадахгүй." +03020208="Үйлдэл дэмжигдээгүй байна." + +03020210="Файл устгахыг батал" +03020211="Хавтас устгахыг батал" +03020212="Олон файл устгахыг батал" +03020213="Та'{0}'-ийг устгах гэж байна уу?" +03020214="'{0}' хавтас болон бүх агуулгыг устгах гэж байна уу?" +03020215="{0} зүйлүүдийг устгах гэж байна уу?" +03020216="Устгаж байна..." +03020217="Файл болон хавтсыг устгахад алдаатай" + +03020220="Нэр солиж байна..." +03020221="Файл болон хавтсын нэрийг солиход алдаатай" +03020222="Файл хуулахыг магадлах" +03020223="Та үнэхээр файлуудыг архив руу хуулахыг хүсэж байна уу" + +03020230="Хавтас үүсгэх" +03020231="Хавтас нэр:" +03020232="Шинэ хавтас" +03020233="Хавтас үүсгэхэд алдаа гарав" + +03020240="Файл үүсгэх" +03020241="Файл нэр:" +03020242="Шинэ файл" +03020243="Файл үүсгэхэд алдаа гарав" + +03020250="Сонгох" +03020251="Сонгохгүй" +03020252="Maск:" + +03020260="Хавтсын түүх" + +03020280="Файл '{0}' өөрчлөгдлөө.\nТа архивт шинэчлэлт хиймээр байна уу?" +03020281="Файлыг шинэчилж чадсангүй\n'{0}" +03020282="Засварлагчийг нээж чадсангүй." +03020283="Нээж байна..." + +03020290="Тайлбар" +03020291="&Тайлбар:" + +030202A0="Систем" + +03020300="Компьютер" +03020301="Сүлжээ" + +03020400="Нэм" +03020401="Задал" +03020402="Шалгах" + +03020420="Хуулах" +03020421="Зөөх" +03020422="Устгах" +03020423="Шинж..." + +03020500="Хуваах файл:" +03020501="&Файл хуваах газар:" +03020510="Хувааж байна..." + +03020600="Нэгтгэх файлууд:" +03020601="&Нэгтгэх газар:" +03020610="Нэгтгэж байна..." + +; Computer +03031100="Нийт хэмжээ" +03031101="Хоосон зай" +03031102="Кластерын зай" +03031103="Нэр" + +; Network +03031200="Локаль Нэр" +03031201="Хангагч" + +; Benchmark Dialog + +03080000="Бэнчмарк" +03080001="Санах ойн хэрэглээ:" +03080002="Шахаж байна" +03080003="Задалж байна" +03080004="Хурд" +03080005="Үнэлж байна" +03080006="Нийт үнэлгээ" +03080007="Одоогийн" +03080008="Хариуг гаргаж байна" +03080009="Өнгөрсөн:" +0308000A="Алдаанууд:" + +;!@LangEnd@! diff --git a/GUI/Lang/mr.txt b/GUI/Lang/mr.txt new file mode 100644 index 0000000..c111e42 --- /dev/null +++ b/GUI/Lang/mr.txt @@ -0,0 +1,474 @@ +;!@Lang@!UTF-8! +; 7-Zip 4.42 +; अनुवाद सुबोध गायकवाड +; +; +; +; + +00000000="Marathi" +00000001="मराठी" +00000002="78" + +; 7-Zip Configuration + +; Title +01000000="7-Zip संरचना" + +; Info Page +01000100="7-Zip बद्दल माहिती" +01000103="7-Zip हे मोफ़त सॉफ़्टवेअर आहे. तरिही, तुम्ही नोंद करुन याच्या प्रगतीला सहाय्य करू शकता." +01000104="सहाय्यता" +01000105="नोंद" + +; Folders Page +01000200="फ़ोल्डर" +01000210="&चलित फ़ोल्डर" +01000211="&प्रणालीचे तात्पुरते फ़ोल्डर" +01000212="&सध्या" +01000213="&नमुद:" +01000214="फक्त काढता येणाय्रा ड्रॉईव्हकरता वापरा" + +01000281="तात्पुरत्या दफ़तर करिता मार्ग दर्शवा." + +; System Page +01000300="प्रणाली" +01000301="7-Zip ला shell context मेनुशी जोडा" +01000302="Cascaded context menu" +01000310="Context मेनु वस्तू:" + +; Language Page +01000400="भाषा" +01000401="भाषा:" + + +; 7-Zip Explorer extension + + +; Context menu +02000101="7-Zip" +02000102="7-Zip कमांड्स" +02000103="दफ़तर उघडा" +02000104="निवडलेले दफ़तर उघडा." +02000105="फ़ाइल्स बाहेर काढा..." +02000106="निवडलेल्या दफ़तर मधुन फाइल बाहेर काढा ." +02000107="दफ़तरात टाका..." +02000108="निवडलेल्या वस्तू दफ़तरात टाका." +02000109="दफ़तर तपासा" +0200010A="दफ़तराची पुर्णता तपासा." +0200010B="येथे बाहेर काढा" +0200010C="सध्याच्या फ़ोल्डरमध्ये निवडलेल्या दफ़तर मधुन फाइल बाहेर काढा." +0200010D="बाहेर {0}" +0200010E="फ़ाइल्स उप-फ़ोल्डरमध्ये काढा." +0200010F="{0} येथे टाका" +02000110="निवडलेल्या वस्तू दफ़तरात टाका." +02000111="दाबा आणि इमेल करा..." +02000112="निवडलेल्या वस्तू दफ़तरात दाबुन टाका आणि दफ़तर इमेलद्वारे पाठवा." +02000113=" {0} येथे दाबा आणि इमेल करा" +02000114="निवडलेल्या वस्तू दफ़तरात दाबुन टाका आणि दफ़तर इमेलद्वारे पाठवा." + + +02000140="" +02000141="" + +; Properties +02000203="मार्ग" +02000204="नाव" +02000205="शेपुट" +02000206="फ़ोल्डर" +02000207="आकार" +02000208="दबलेला आकार" +02000209="गुणधर्म" +0200020A="तयार" +0200020B="वापर" +0200020C="बदल" +0200020D="ठोस" +0200020E="भाष्य" +0200020F="बंधिस्त" +02000210="या पुर्व तुकडे करा " +02000211="या नंतर तुकडे करा" +02000212="शब्दावली" +02000213="CRC" +02000214="प्रकार" +02000215="विरुद्ध" +02000216="पद्धत" +02000217="यजमान आज्ञावली" +02000218="फ़ाइल प्रणाली" +02000219="उपयोगकर्ता" +0200021A="गट" +0200021B="गठ्ठा" +0200021C="प्रतिक्रिया" +0200021D="स्थिती" +0200021E="मार्गाची सुरुवात" + +; Status bar +02000301="निवडलेल्या वस्तू{0}" +02000302="{0} वस्तू(s)" + +02000320="फ़ाइल:" +02000321="फ़ोल्डर:" +02000322="आकार:" + +; List Context Menu +02000401="&स्तंभ..." + +02000411="&उघडा" +02000412="&बाहेर..." + +; ToolBar +02000501="बाहेर" + +; Messages +02000601="या दफ़तरासाठी नुतनीकरण शक्य नाही." +02000602="{0} दफ़तराचे नुतनीकरण होऊ शकले नाही" +02000603=" '{0}' फ़ोल्डर तयार होऊ शकले नाही" +02000604="हा दफ़तर वेगळा आहे." +02000605="चुक" +02000606="खूपच जास्त वस्तू" +02000607="या फ़ाइलला उघडण्याकरता एकही संबधित प्रोग्राम नाही" +02000608="येथे एकही चूक नाही" + +; Dialogs +02000702="ठीक" +02000705="&हो" +02000707="&सर्व ला हो" +02000709="&नाही" +0200070B="&सर्व ला नाही" + +02000710="रद्द" +02000711="&रद्द" +02000713="&बंद" +02000714="थांबा" +02000715="पुन्हा सुरु करा" + +02000720="मदत" + +; Extract dialog +02000800="बाहेर" +02000801="&बाहेर:" +02000802="परवलिचा शब्द" + +02000810="मार्ग रित" +02000811="पूर्ण पत्ता" +02000812="सध्याचा पत्ता" +02000813="पत्ता नाही" + +02000820="Overwrite रीत" +02000821="overwrite करण्यापुर्वी विचारा" +02000822="Overwrite न विचारता करा" +02000823="अस्तित्वात असलेल्या फ़ाइल सोडा" +02000824="स्वयंचलित नाव बदलवा" +02000825="अस्तित्वात असलेल्या फ़ाइलचे आपोआप नाव बदलवा" + +02000830="फ़ाइल" +02000831="&निवडलेल्या फ़ाइल" +02000832="&सर्व फ़ाइल" + +02000881="फ़ाइल बाहेर काढण्यासाठी मार्ग नमूद करा." + +02000890="बाहेर" + +; Overwrite dialog +02000900="फ़ाइल बदलवीणे खात्री" +02000901="त्या फ़ोल्डरमध्ये अगोदरच कार्यान्वीत फ़ाइल आहे." +02000902="अस्तित्वात असलेली फ़ाइल बदलवायची आहे का?" +02000903="यानी?" + +02000911="स्वयंचलित नाव बदलवा" + +02000982="{0} बाइट्स" +02000983="बदल" + +; Messages dialog +02000A00="उपचार संदेश" + +02000A80="संदेश" + +02000A91="असहाय्यक दाब पद्धत'{0}'." +02000A92="डेटा चूक'{0}'. फ़ाइल तुटलेली आहे." +02000A93="CRC अयशस्वी '{0}'. फ़ाइल तुटलेली आहे." + +; Password dialog +02000B00="परवलिचा शब्द टाका" +02000B01="परवलिचा शब्द टाका:" +02000B02="परवलिचा शब्द दाखवा" + +; Progress dialog +02000C00="कार्य" +02000C01="झालेला वेळ:" +02000C02="निघुन गेलेला वॆळ:" +02000C03="आकार:" +02000C04="वेग:" + +02000C10="&मागे लपवा" +02000C11="&समोर आणा" +02000C12="&विश्राम" +02000C13="&सुरु" + +02000C20="विश्राम" + +02000C30="तुम्हाला रद्द करण्याबाबत खात्री आहे का?" + +; Compress dialog +02000D00="दफ़तरात टाका" +02000D01="&दफ़तर:" +02000D02="&नुतनीकरन रित:" +02000D03="दफ़तर &प्रकार:" +02000D04="दाब &पद्धत:" +02000D05="&ठोस दफ़तर तयार करा" +02000D06="&Parameters:" +02000D07="पर्याय" +02000D08="SF&X दफ़तर तयार करा" +02000D09="Multi-threading" +02000D0A="फ़ाइल &नाव बंधिस्त करा" +02000D0B="दाब &level:" +02000D0C="&शब्द्कोश आकार:" +02000D0D="&शब्द आकार:" +02000D0E="दाबण्यासाठी स्मरणशक्तीचा वापर:" +02000D0F="प्रसरण पावण्यासाठी स्मरणशक्तीचा वापर:" + +02000D40="तुकडे, बाइट्स:" + +02000D81="साठा" +02000D82="साधारण" +02000D83="जास्तीत जास्त" +02000D84="वेगवान" +02000D85="अतिशय वेगवान" +02000D86="एकदमच" + +02000D90="ब्राउझ" + +02000DA1="फ़ाइल टाका आणि ठेवा" +02000DA2="फ़ाइल टाका आणि नुतन करा" +02000DA3="अस्तित्वातील फ़ाइल ताजे करा" +02000DA4="Synchronize फ़ाइल" + +02000DB1="सर्व फ़ाइल" + +02000DC0="दाब" + +; Columns dialog +02000E00="स्तंभ" +02000E01="जे स्तंभ तुम्हाला या फ़ोल्डरमध्ये दृश्य करायचे आहे ते निवडा. वर आणि खाली कळचा उपयोग करा.." +02000E02="निवडलेला स्तंभ " +02000E03="पिक्सेल पसरलेला." + +02000E10="&वर" +02000E11="&खाली" +02000E12="&दृश्य" +02000E13="&लपवा" +02000E14="बसवा" + +02000E81="शिर्षक" +02000E82="रुंद" + +; Testing +02000F90="तपासणी" + + +; File Manager + +03000000="7-Zip फ़ाइल व्यवस्थापक" + +; Menu +03000102="&फ़ाइल" +03000103="&संपादन" +03000104="&दर्शन" +03000105="&अवजार" +03000106="&मदत" +03000107="आ&वडते" + +; File +03000210="&उघडा" +03000211="&अंदर उघडा" +03000212="&बाहेर उघडा" +03000220="&दृश्य" +03000221="&संपादक" +03000230="नाव बदल" +03000231="&प्रतिलिपी..." +03000232="&हलवा..." +03000233="&मिटवा" +03000240="लक्षणं" +03000241="प्रतिक्रिया" +03000250="फ़ोल्डर तयार करा" +03000251="फ़ाइल तयार करा" +03000260="गमन" +03000270="&फ़ाइल तुकडे करा..." +03000271="फ़ाइल जोडा..." + +; Edit +03000310="&पुर्वस्थिती" +03000311="&पुन्हा करा" +03000320="कापा" +03000321="&प्रतिलिपी" +03000322="&चिकटवा" +03000323="&मिटवा" +03000330="सर्व निवडा" +03000331="सर्वांना अनिवडित करा" +03000332="&निवड उलटी करा" +03000333="निवडा..." +03000334="अनिवडा..." +03000335="प्रकारेद्वारा निवडा" +03000336="प्रकारेद्वारे अनिवडा" + +; View +03000410="मोठे Icons" +03000411="लहान Icons" +03000412="&सुची" +03000413="&माहिती" +03000420="अव्यवस्थित" +03000430="Root फ़ोल्डर उघडा" +03000431="एक वरती चढा" +03000432="फ़ोल्डर इतिहास..." +03000440="&टवटवीत करा" +03000449="Flat दृश्य" +03000450="&२ फ़लक" +03000451="&अवजार कप्पाs" +03000460="दफ़तर अवजार कप्पा" +03000461="प्रमाण अवजार कप्पा" +03000462="मोठे कळ" +03000463="कळ शब्द दाखवा" + +; Tools +03000510="&पर्याय..." +03000511="&Benchmark" + +; Help +03000610="&माहिती..." +03000620="7-Zip बद्दल..." + +; Favorites +03000710="&फ़ोल्डर आवडते मध्ये टाका..." +03000720="पृष्ठ" + +; Options Dialog + +03010000="पर्याय" + +; Plugins +03010100="Plugins" +03010101="&Plugins:" +03010110="पर्याय..." + +; Edit +03010200="संपादक" +03010201="&संपादक:" + +; System +03010300="प्रणाली" +03010302="7-Zip संबधित करा:" +03010310="Plugin" + +; Settings +03010400="स्थिती" +03010401="वस्तू \"..\" दाखवा" +03010402="फ़ाइलचे खरे icon दाखवा" +03010410="प्रणालीचे मेनु दाखवा" +03010420="&सर्व ओळ निवडा" +03010421=" &grid रेघा दाखवा" +03010430="&अतिरिक्त निवड पद्धती" +03010440="मोठे स्मरणशक्ती पृष्ठ वापरा" + +; Strings + +03020201="प्रतिलिपी" +03020202="हलवा" +03020203="प्रतिलिपी:" +03020204="हलवा:" +03020205="प्रतिलिपी..." +03020206="हलवल्या जात आहे..." +03020207="तुम्ही अश्या फ़ोल्डरसाठी वस्तू हलवू किंवा प्रतिलिपी तयार करू शकत नाही." +03020208="क्रिया करता येणार नाही." + +03020210="फ़ाइल मिटवायची खात्री" +03020211="फ़ोल्डर मिटवायची खात्री" +03020212="अनेक फ़ाइल मिटवायची खात्री" +03020213="तुम्हाला '{0}' मिटवायची खात्री आहे का?" +03020214="तुम्हाला '{0}' फ़ोल्डर आणि त्यातील सर्व वस्तु मिटवायची खात्री आहे का?" +03020215="तुम्हाला {0} वस्तु मिटवायची खात्री आहे का?" +03020216="मिटत आहे..." +03020217="फ़ाइल किंवा फ़ोल्डर मिटवता येत नाही आहे" + +03020220="नविन नाव दिल्या जात आहे..." +03020221="फ़ाइल किंवा फ़ोल्डरला नविन नाव देता येत नाही आहे" +03020222="फ़ाइलची प्रतिलिपी करण्यास तुमची खात्री आहे का" +03020223="दफ़्तरात फ़ाइलची प्रतिलिपी करण्यास तुमची खात्री आहे का" + +03020230="फ़ॊल्डर तयार करा" +03020231="फ़ोल्डर नाव:" +03020232="नविन फ़ॊल्डर" +03020233="फ़ोल्डर तयार करता येत नाही आहे" + +03020240="फ़ाइल तयार करा" +03020241="फ़ाइलचे नाव:" +03020242="नविन फ़ाइल" +03020243="फ़ाइल तयार करता येत नाही आहे" + +03020250="निवडा" +03020251="निवड रद्द" +03020252="मुखवटा:" + +03020260="फ़ोल्डरचा इतिहास" + +03020280=" '{0}' ही फ़ाइल बदलली आहे.\nतुम्हाला हे दफ़तरात नुतन करायचे आहे का?" +03020281="फ़ाइल नुतन करता येत नाही\n'{0}'" +03020282="संपादक सुरु होत नाही." +03020283="उघडत आहे..." + +03020290="प्रतिक्रिया" +03020291="&प्रतिक्रिया:" + +030202A0="प्रणाली" + +03020300="संगणक" +03020301="नेटवर्क" + +03020400="टाका" +03020401="बाहेर" +03020402="तपासा" + +03020420="प्रतिलिपी" +03020421="हलवा" +03020422="मिटवा" +03020423="माहिती" + +03020500="फ़ाइलचे तुकडे करा" +03020501="&येथे तुकडे:" +03020510="तुकडे होत आहे..." + +03020600="फ़ाइल जोडा" +03020601="&येथे फ़ाइल जोडा:" +03020610="फ़ाइल जुडत आहे..." + +03020710="Checksum मोजत आहे..." +03020720="Checksum माहिती" +03020721="डेटाकरिता CRC checksum :" +03020722="नाव आणि डेटाकरिता CRC checksum :" + +03020800="बारकाईने पाहत आहे..." + +; Computer +03031100="एकूण आकार" +03031101="खाली जागा" +03031102="क्लस्टर आकार" +03031103="शिर्षक" + +; Network +03031200="लोकल नाव" +03031201="देणारा" + +; Benchmark Dialog + +03080000="Benchmark" +03080001="स्मरणशक्ती वापर:" +03080002="दाबत आहे" +03080003="प्रसरण होत आहे" +03080004="वेग" +03080005="क्रमांकन" +03080006="एकुण क्रमांकन" +03080007="सध्या" +03080008="परिणाम" +03080009="Passes:" +0308000A="चूक:" + +;!@LangEnd@! diff --git a/GUI/Lang/ms.txt b/GUI/Lang/ms.txt new file mode 100644 index 0000000..a4a96ab --- /dev/null +++ b/GUI/Lang/ms.txt @@ -0,0 +1,459 @@ +;!@Lang@!UTF-8! +; 7-Zip 4.30 +; Diterjemahkan oleh Khairul Ridhwan Bin Omar +; +; +; +; + +00000000="Malay" +00000001="Bahasa Melayu" +00000002="62" + +; 7-Zip Configuration + +; Title +01000000="Konfigurasi 7-Zip" + +; Info Page +01000100="Perihal 7-Zip" +01000103="7-Zip adalah perisian percuma. Sokong pembangunan 7-Zip dengan melakukan pendaftaran." +01000105="Pendaftaran" + +; Folders Page +01000200="Folder" +01000210="&Folder kerja" +01000211="&Folder sementara sistem" +01000212="&Sekarang" +01000213="&Ditentukan:" +01000214="Hanya untuk pemacu mudah alih" + +01000281="Tentukan lokasi untuk arkib fail sementara." + +; System Page +01000300="Sistem" +01000301="Integrasikan 7-Zip ke shell konteks menu" +01000302="Cascaded konteks menu" +01000310="Item pada konteks menu:" + +; Language Page +01000400="Bahasa" +01000401="Bahasa:" + + +; 7-Zip Explorer extension + +; Context menu +02000101="7-Zip" +02000102="Arahan dalam 7-Zip" +02000103="Buka arkib" +02000104="Buka arkib terpilih." +02000105="Ekstrak fail..." +02000106="Ekstrak fail dari arkib terpilih." +02000107="Tambahkan ke arkib..." +02000108="Tambahkan item yang terpilih ke arkib." +02000109="Uji arkib" +0200010A="Uji integriti dari arkib terpilih." +0200010B="Ekstrak di sini" +0200010C="Ekstrak fail arkib yang terpilih ke folder ini." +0200010D="Ekstrak ke {0}" +0200010E="Ekstrak fail ke subfolder." +0200010F="Tambahkan ke {0}" +02000110="Tambahkan item terpilih ke arkib." +02000111="Padatkan dan kirimkan melalui email..." +02000112="Padatkan item yang terpilih ke arkib dan kirimkan melalui email." +02000113="Padatkan ke {0} dan kirimkan melalui email" +02000114="Padatkan item yang terpilih ke arkib dan kirimkan melalui email." + +02000140="" +02000141="" + +; Properties +02000203="Bahagian" +02000204="Nama" +02000205="Sambungan" +02000206="Folder" +02000207="Saiz" +02000208="Saiz Paket" +02000209="Atribut" +0200020A="Dibuat" +0200020B="Diakses" +0200020C="Diubah Suai" +0200020D="Solid" +0200020E="Komen" +0200020F="Terenkripsi" +02000210="Terpisah Sebelum" +02000211="Terpisah Selepas" +02000212="Kamus" +02000213="CRC" +02000214="Jenis" +02000215="Anti" +02000216="Kaedah" +02000217="Sistem Operasi" +02000218="Sistem Fail" +02000219="Pengguna" +0200021A="Kumpulan" +0200021B="Blok" +0200021C="Komen" +0200021D="Posisi" + +; Status bar +02000301="{0} buah objek telah terpilih" +02000302="{0} buah objek" + +; List Context Menu +02000401="&Kolum..." + +02000411="&Buka" +02000412="&Ekstrak..." + +; ToolBar +02000501="Ekstrak" + +; Messages +02000601="Tidak menyokong pengemaskinian untuk arkib ini." +02000602="Tidak dapat mengemaskini arkib {0}" +02000603="Tidak dapat membuat folder '{0}'" +02000604="Tidak dapat menyokong fail arkib jenis ini." +02000605="Ralat" +02000606="Terlalu banyak item" +02000607="Tidak ada aplikasi yang dikongsikan dengan sambungan dari nama fail yang diberikan" +02000608="Tidak ada ralat" + +; Dialogs +02000702="OK" +02000705="&Ya" +02000707="Ya untuk Semua" +02000709="&Tidak" +0200070B="Tidak untuk Semua" + +02000710="Batal" +02000711="&Batal" +02000713="&Tutup" +02000714="Henti" +02000715="Mula Semula" + +02000720="Bantuan" + +; Extract dialog +02000800="Ekstrak" +02000801="Ekstrak ke:" +02000802="Kata laluan" + +02000810="Mod laluan" +02000811="Laluan nama penuh" +02000812="Nama laluan sekarang" +02000813="Tidak pakai nama laluan" + +02000820="Mod tulis semula" +02000821="Tanya sebelum menulis semula" +02000822="Tulis semula tanpa perlu diberitahu" +02000823="Abaikan fail yang ada" +02000824="Namakan semula automatik" +02000825="Namakan automatik fail yang ada" + +02000830="Fail" +02000831="&Fail yang terpilih" +02000832="&Semua fail" + +02000881="Tentukan lokasi untuk pengekstrakan fail." + +02000890="Sedang mengekstrak" + +; Overwrite dialog +02000900="Pastikan penggantian fail" +02000901="Folder tujuan telah berisi fail yang telah terproses." +02000902="Mahukah anda menggantikan fail yang ada" +02000903="dengan yang ini?" + +02000911="N&amakan semula Automatik" + +02000982="{0} baits" +02000983="diubah suai pada" + +; Messages dialog +02000A00="Mesej diagnostik" + +02000A80="Mesej" + +02000A91="Kaedah pemampatan untuk '{0}' tidak disokong." +02000A92="Data ralat di '{0}'. Fail ini rosak." +02000A93="CRC gagal di '{0}'. Fail ini rosak." + +; Password dialog +02000B00="Masukkan kata laluan" +02000B01="Masukkan kata laluan:" +02000B02="&Perlihatkan kata laluan" + +; Progress dialog +02000C00="Proses" +02000C01="Telah berlalu:" +02000C02="Selesai dalam:" +02000C03="Saiz:" +02000C04="Kecepatan:" + +02000C10="&Latar belakang" +02000C11="&Latar depan" +02000C12="&Berehat" +02000C13="&Teruskan" + +02000C20="Berehat" + +02000C30="Anda yakin untuk membatalkannya?" + +; Compress dialog +02000D00="Tambahkan ke arkib" +02000D01="&Arkib:" +02000D02="&Mod kemaskini:" +02000D03="Format arkib:" +02000D04="Kaedah mampatan:" +02000D05="Buat arkib solid" +02000D06="&Parameter:" +02000D07="Opsyen" +02000D08="Buat arkib SF&X" +02000D09="Multi-threading" +02000D0A="Enkripsi nama &fail" +02000D0B="Aras &mampatan:" +02000D0C="&Saiz kamus:" +02000D0D="&Saiz perkataan:" +02000D0E="Penggunaan memori untuk Memampatkan:" +02000D0F="Penggunaan memori untuk Menyah-mampatkan:" + +02000D40="Bahagi/belah ke &nilai, baits:" + +02000D81="Untuk Penyimpanan" +02000D82="Normal" +02000D83="Maksimum" +02000D84="Cepat" +02000D85="Lebih cepat" +02000D86="Ultra" + +02000D90="Selusur..." + +02000DA1="Tambah dan gantikan fail" +02000DA2="Kemaskini dan tambahkan fail" +02000DA3="Perbaharui fail yang ada" +02000DA4="Menyesuaikan fail" + +02000DB1="Semua Fail" + +02000DC0="Memampatkan" + +; Columns dialog +02000E00="Kolum" +02000E01="Semak kolum yang anda ingin lihat untuk folder ini. Gunakan bebutang Ke Atas dan Ke Bawah untuk menyusun kolum." +02000E02="Kolum yang sepatutnya dipilih" +02000E03="piksel &lebar." + +02000E10="Pindah ke &Atas" +02000E11="Pindah ke &Bawah" +02000E12="&Perlihatkan" +02000E13="&Sembunyikan" +02000E14="Set" + +02000E81="Judul" +02000E82="Lebar" + +; Testing +02000F90="Pengujian" + + +; File Manager + +03000000="Pengurusan Fail 7-Zip" + +; Menu +03000102="&Fail" +03000103="&Edit" +03000104="&Paparan" +03000105="&Alat" +03000106="&Bantuan" +03000107="K&egemaran" + +; File +03000210="&Buka" +03000211="Buka di D&alam" +03000212="Buka di L&uar" +03000220="&Paparan" +03000221="&Edit" +03000230="Nam&akan semula" +03000231="&Salin ke..." +03000232="&Pindahkan ke..." +03000233="Hapus" +03000240="P&roperti" +03000241="Kom&en" +03000250="Buat Folder" +03000251="Buat Fail" +03000260="K&eluar" +03000270="&Bahagi/belah Fail..." +03000271="Gab&ung Fail..." + +; Edit +03000310="&Buat Asal" +03000311="&Buat Semula" +03000320="Poton&g" +03000321="&Salin" +03000322="&Tampal" +03000323="&Hapus" +03000330="Pilih &Semua" +03000331="Jangan Pilih Semua" +03000332="&Sonsangkan Pilihan " +03000333="Pilih..." +03000334="Tidak Memilih..." +03000335="Pilih Berdasarkan Jenis" +03000336="Tidak Memilih Berdasarkan Jenis" + +; View +03000410="Ikon B&esar" +03000411="Ikon K&ecil" +03000412="&Senarai" +03000413="&Butiran" +03000420="Tidak Tersusun" +03000430="Buka Root Folder" +03000431="Ke atas Satu Aras" +03000432="Folder Sejarah..." +03000440="&Segarkan Semula" +03000450="&2 Panel" +03000451="&Toolbar" +03000460="Toolbar Arkib" +03000461="Toolbar Standard" +03000462="Bebutang Besar" +03000463="Perlihatkan Teks Bebutang" + +; Tools +03000510="&Opsyen..." +03000511="&Tanda Aras" + +; Help +03000610="&Kandungan..." +03000620="&Perihal 7-Zip..." + +; Favorites +03000710="&Tambah folder pada Kegemaran sebagai" +03000720="Penanda Buku" + +; Options Dialog + +03010000="Opsyen" + +; Plugins +03010100="Plugin" +03010101="&Plugin:" +03010110="Opsyen..." + +; Edit +03010200="Editor" +03010201="&Editor:" + +; System +03010300="Sistem" +03010302="Kongsikan 7-Zip dengan:" +03010310="Plugin" + +; Settings +03010400="Seting" +03010401="Perlihatkan \"..\" item" +03010402="Perlihatkan ikon asli dari fail" +03010410="Perlihatkan menu sistem" +03010420="&Pilih barisan penuh " +03010421="Perlihatkan garisan grid" +03010430="&Mod Pilihan Alternatif" +03010440="Gunakan muka surat memori yang &besar" + +; Strings + +03020201="Salin" +03020202="Pindah" +03020203="Salin ke:" +03020204="Pindah ke:" +03020205="Sedang menyalin..." +03020206="Sedang memindah..." +03020207="Anda tidak boleh memindah atau menyalin item untuk folder yang demikian." +03020208="Operasi tidak disokong." + +03020210="Pasti penghapusan fail" +03020211="Pasti penghapusan folder" +03020212="Pasti penghapusan fail-fail" +03020213="Anda yakin untuk menghapus '{0}'?" +03020214="Anda yakin untuk menghapus folder '{0}' dan semua isi kandungannya?" +03020215="Anda yakin untuk menghapus item {0}?" +03020216="Penghapusan..." +03020217="Ralat ketika menghapuskan Fail atau Folder" + +03020220="Namakan semula..." +03020221="Ralat, ketika namakan semula Fail atau Folder" +03020222="Pasti salinkan fail" +03020223="Anda yakin untuk menyalinkan fail kepada arkib" + + +03020230="Buat Folder" +03020231="Nama Folder:" +03020232="Folder Baru" +03020233="Ralat, tidak dapat Membuat Folder" + +03020240="Buat Fail" +03020241="Nama Fail:" +03020242="Fail Baru" +03020243="Ralat, tidak dapat Membuat Fail" + +03020250="Pilih" +03020251="Tidak Memilih" +03020252="Topeng:" + +03020260="Folder Sejarah" + +03020280="Fail '{0}' telah terubah suai.\nApakah anda ingin mengemaskininya pada arkib?" +03020281="Tidak dapat mengemaskini fail\n'{0}'" +03020282="Tidak dapat membuka editor." +03020283="Membuka..." + +03020290="Komen" +03020291="&Komen:" + +030202A0="Sistem" + +03020300="Komputer" +03020301="Rangkaian" + +03020400="Tambah" +03020401="Ekstrak" +03020402="Uji" + +03020420="Salin" +03020421="Pindah" +03020422="Hapus" +03020423="Maklumat" + +03020500="Pisahkan Fail" +03020501="&Pisahkan ke:" +03020510="Pembelahan ..." + +03020600="Gabungan Fail" +03020601="&Gabung ke:" +03020610="Penggabungan ..." + +; Computer +03031100="Saiz Keseluruhan" +03031101="Ruang Kosong" +03031102="Saiz Kluster" +03031103="Label" + +; Network +03031200="Nama Tempatan" +03031201="Penyedia" + +; Benchmark Dialog + +03080000="Tanda Aras" +03080001="Penggunaan memori:" +03080002="Pemampatan" +03080003="Penyah-mampatan" +03080004="Kecepatan" +03080005="Rating" +03080006="Total Rating" +03080007="Sekarang" +03080008="Keputusan" +03080009="Lulus:" +0308000A="Ralat:" + +;!@LangEnd@! diff --git a/GUI/Lang/nb.txt b/GUI/Lang/nb.txt new file mode 100644 index 0000000..de6c8f8 --- /dev/null +++ b/GUI/Lang/nb.txt @@ -0,0 +1,496 @@ +;!@Lang@!UTF-8! +; 7-Zip 4.45 +; Translated by Jostein Christoffer Andersen +; Maintained by Kjetil Hjartnes +; Maintained by Robert Grønning +; +; + +00000000="Norwegian Bokmal" +00000001="Norsk Bokmål" +00000002="20-1" + +; 7-Zip Configuration + +; Title +01000000="7-Zip innstillinger" + +; Info Page +01000100="Om 7-Zip" +01000103="7-Zip er gratis programvare, men du kan støtte utviklingen av 7-Zip ved å registrere deg." +01000104="Brukerstøtte" +01000105="Registrering" + +; Folders Page +01000200="Mapper" +01000210="&Arbeidsmappe" +01000211="Systemets &midlertidige mappe" +01000212="&Nåværende" +01000213="&Egendefinert:" +01000214="Kun for flyttbare stasjoner" + +01000281="Angi plassering for midlertidige filer." + +; System Page +01000300="System" +01000301="Integrer 7-Zip i programmenyen" +01000302="Forgrenet programmeny" +01000310="Valg i programmenyen:" + +; Language Page +01000400="Språk" +01000401="Språk:" + + +; 7-Zip Explorer extension + +; Context menu +02000101="7-Zip" +02000102="7-Zip-kommandoer" +02000103="Åpne arkiv" +02000104="Åpner det merkede arkivet." +02000105="Pakk ut …" +02000106="Pakk ut filer fra det merkede arkivet." +02000107="Legg til arkiv …" +02000108="Legger merkede filer til arkivet." +02000109="Test arkiv" +0200010A="Test integriteten til det merkede arkivet." +0200010B="Pakk ut internt" +0200010C="Pakk ut filer fra det merkede arkivet til gjeldende mappe." +0200010D="Pakk ut til {0}" +0200010E="Pakker ut filer til undermappe." +0200010F="Legg til {0}" +02000110="Legger merkede elementer til arkivet." +02000111="Komprimer og send med e-post …" +02000112="Komprimerer merkede elementer til et arkiv og sender det med e-post." +02000113="Komprimer til {0} og send med e-post" +02000114="Komprimerer merkede elementer til et arkiv og sender det med e-post." + +02000140="" +02000141="" + +; Properties +02000203="Plassering" +02000204="Navn" +02000205="Filetternavn" +02000206="Mappe" +02000207="Størrelse" +02000208="Komprimert størrelse" +02000209="Attributter" +0200020A="Opprettet" +0200020B="Åpnet" +0200020C="Endret" +0200020D="Kompakt" +0200020E="Kommentert" +0200020F="Kryptert" +02000210="Oppdeling før" +02000211="Oppdeling etter" +02000212="Ordbok" +02000213="CRC" +02000214="Type" +02000215="Anti" +02000216="Metode" +02000217="Vert-OS" +02000218="Filsystem" +02000219="Bruker" +0200021A="Gruppe" +0200021B="Blokk" +0200021C="Kommentar" +0200021D="Posisjon" +0200021E="Stiprefiks" + +; Status bar +02000301="{0} element(er) merket" +02000302="{0} element(er)" + +02000320="Filer:" +02000321="Mapper:" +02000322="Størrelse:" + +; List Context Menu +02000401="&Kolonner …" + +02000411="&Åpne" +02000412="&Pakk ut …" + +; ToolBar +02000501="Pakk ut" + +; Messages +02000601="Oppdateringsfunksjoner støttes ikke for dette arkivet." +02000602="Klarte ikke oppdatere arkivet «{0}»" +02000603="Klarte ikke opprette mappen «{0}»" +02000604="Filen er ikke et støttet arkivformat." +02000605="Feil" +02000606="For mange elementer" +02000607="Ingen programmer er knyttet til dette filetternavnet" +02000608="Fant ingen feil." +02000609="Kan ikke åpne filen «{0}» som arkiv" +0200060A="Kan ikke åpne det krypterte arkivet «{0}». Sjekk at du har riktig passord." + +; Dialogs +02000702="OK" +02000705="&Ja" +02000707="Ja til &alt" +02000709="&Nei" +0200070B="Nei til a<" + +02000710="Avbryt" +02000711="&Avbryt" +02000713="&Lukk" +02000714="Stopp" +02000715="Start på nytt" + +02000720="Hjelp" + +; Extract dialog +02000800="Pakk ut" +02000801="&Pakk ut til:" +02000802="Passord" + +02000810="Filstier" +02000811="Fullstendige filstier" +02000812="Gjeldende filstier" +02000813="Ingen filstier" + +02000820="Overskrivelse" +02000821="Bekreft før overskrivelse" +02000822="Overskriv uten bekreftelse" +02000823="Hopp over filer som finnes allerede" +02000824="Navngi nye filer automatisk" +02000825="Navngi filer som finnes automatisk" + +02000830="Filer" +02000831="&Merkede filer" +02000832="&Alle filer" + +02000881="Angi plassering for filer som skal pakkes ut." + +02000890="Pakker ut" + +; Overwrite dialog +02000900="Bekreft filoverskrivelse" +02000901="Den behandlede filen finnes i målmappen allerede." +02000902="Vil du overskrive filen" +02000903="med denne?" + +02000911="Navngi a&utomatisk" + +02000982="{0} byte" +02000983="Endret" + +; Messages dialog +02000A00="Diagnosemeldinger" + +02000A80="Melding" + +02000A91="Komprimeringsmetoden støttes ikke for «{0}»." +02000A92="Datafeil i «{0}». Filen er ødelagt." +02000A93="CRC-feil i «{0}». Filen er ødelagt." +02000A94="Datafeil i den krypterte filen «{0}». Sjekk at du har riktig passord." +02000A95="CRC feilet i den krypterte filen «{0}». Sjekk at du har riktig passord." + +; Password dialog +02000B00="Angi passord" +02000B01="Angi passord:" +02000B02="&Vis passord" +02000B03="Bekreft passord:" +02000B10="Passordene er ikke like" +02000B11="Du kan bare bruke engelske bokstaver, tall eller spesialtegn (!, #, $, …) i passordet" +02000B12="Passordet er for langt" + +; Progress dialog +02000C00="Prosess" +02000C01="Tidsforbruk:" +02000C02="Gjenværende tid:" +02000C03="Størrelse:" +02000C04="Hastighet:" + +02000C10="&Bakgrunn" +02000C11="&Forgrunn" +02000C12="&Stopp" +02000C13="&Fortsett" + +02000C20="Stoppet" + +02000C30="Vil du avbryte?" + +; Compress dialog +02000D00="Legg til arkiv" +02000D01="Filn&avn:" +02000D02="&Oppdateringsmetode:" +02000D03="&Format:" +02000D04="Komprimerings&metode:" +02000D05="&Kompakt arkiv" +02000D06="&Parametre:" +02000D07="&Innstillinger" +02000D08="Selvutpakkende arkiv («SF&X»)" +02000D09="Fler&trådet" +02000D0A="Kr&ypter filnavn" +02000D0B="Komprimerings&nivå:" +02000D0C="Ord&bokstørrelse:" +02000D0D="&Ordstørrelse:" +02000D0E="Minnebruk ved komprimering:" +02000D0F="Minnebruk ved dekomprimering:" +02000D10="Kryptering" +02000D11="Krypteringsmetode:" +02000D12="Antall CPU tråder:" +02000D13="Solid blokk størrelse:" +02000D14="Ikkje-solid" +02000D15="Solid" + +02000D40="&Del opp til flere delarkiv i størrelsen:" +02000D41="Ugyldig delarkivstørrelse" +02000D42="Valgt delarkivstørrelse: {0} byte.\nEr du sikker på at du vil dele arkivet med denne størrelsen?" + +02000D81="Ukomprimert" +02000D82="Normal" +02000D83="Maksimum" +02000D84="Rask" +02000D85="Raskest" +02000D86="Ultra" + +02000D90="Bla gjennom" + +02000DA1="Legg til og overskriv filer" +02000DA2="Oppdater og legg til filer" +02000DA3="Oppdater filer" +02000DA4="Synkroniser filer" + +02000DB1="Alle filer" + +02000DC0="Komprimerer" + +; Columns dialog +02000E00="Kolonner" +02000E01="Merk av kolonnene som skal være synlige i denne mappen. Trykk «Flytt opp» og «Flytt ned» for å endre rekkefølgen." +02000E02="Den merkede kolonnen bør være" +02000E03="piksler &bred." + +02000E10="Flytt &opp" +02000E11="Flytt &ned" +02000E12="&Vis" +02000E13="&Skjul" +02000E14="Angi" + +02000E81="Tittel" +02000E82="Bredde" + +; Testing +02000F90="Testing" + + +; File Manager + +03000000="7-Zip filbehandler" + +; Menu +03000102="&Fil" +03000103="&Rediger" +03000104="&Vis" +03000105="Verk&tøy" +03000106="&Hjelp" +03000107="&Bokmerker" + +; File +03000210="&Åpne" +03000211="Åpne &internt" +03000212="Åpne &eksternt" +03000220="&Vis" +03000221="&Rediger" +03000230="Gi nytt &navn" +03000231="&Kopier til …" +03000232="&Flytt til …" +03000233="S&lett" +03000240="E&genskaper" +03000241="&Kommentar …" +03000242="Beregn sjekksum" +03000250="Ny &mappe …" +03000251="Ny f&il …" +03000260="&Avslutt" +03000270="&Del opp arkiv …" +03000271="&Sett sammen arkiv …" + +; Edit +03000310="&Angre" +03000311="&Gjør om" +03000320="Klipp &ut" +03000321="&Kopier" +03000322="&Lim inn" +03000323="&Slett" +03000330="Merk &alle" +03000331="Merk i&ngen" +03000332="Merk &omvendt" +03000333="Merk …" +03000334="Merk &ikke …" +03000335="Merk &valgt type" +03000336="Merk i&kke valgt type" + +; View +03000410="&Store ikoner" +03000411="S&må ikoner" +03000412="&Liste" +03000413="&Detaljer" +03000420="Usortert" +03000430="Rotmappe" +03000431="Gå opp et nivå" +03000432="Mappelogg …" +03000440="&Oppdater" +03000449="&Flat visning" +03000450="&To felt" +03000451="&Verktøylinjer" +03000460="Arkivverktøylinje" +03000461="Standardverktøylinje" +03000462="Store knapper" +03000463="Knappetekst" + +; Tools +03000510="&Innstillinger …" +03000511="&Yteprøve …" + +; Help +03000610="&Innhold" +03000620="&Om 7-Zip" + +; Favorites +03000710="&Bokmerk denne mappen som" +03000720="Bokmerke" + +; Options Dialog + +03010000="Innstillinger" + +; Plugins +03010100="Tillegg" +03010101="&Tillegg:" +03010110="Innstillinger …" + +; Edit +03010200="Redigering" +03010201="&Redigeringsprogram:" + +; System +03010300="System" +03010302="Assosier 7-Zip med:" +03010310="Utvidelse" + +; Settings +03010400="Innstillinger" +03010401="Vis element for å gå opp et &nivå" +03010402="Vis egentlige fil&ikoner" +03010410="Vis system&meny" +03010420="Merk &hele rader" +03010421="Vis &rutenett" +03010430="&Alternativ merking" +03010440="Bruk &store minnesider" + +; Strings + +03020201="Kopier" +03020202="Flytt" +03020203="Kopier til:" +03020204="Flytt til:" +03020205="Kopierer …" +03020206="Flytter …" +03020207="Du kan ikke flytte eller kopiere elementer i slike mapper." +03020208="Operasjonen støttes ikke." +03020209="Velg målmappe." + +03020210="Bekreft at fil skal slettes" +03020211="Bekreft at mappe skal slettes" +03020212="Bekreft at flere filer skal slettes" +03020213="Vil du slette «{0}»?" +03020214="Vil du slette mappen «{0}» med alt innhold?" +03020215="Vil du slette disse {0} elementene?" +03020216="Sletter …" +03020217="Det oppstod en feil da filen eller mappen skulle slettes" + +03020220="Navngir …" +03020221="Det oppstod en feil da filen eller mappen skulle navngis" +03020222="Bekreft at fil skal kopieres" +03020223="Vil du kopiere filene til arkivet" + +03020230="Ny mappe" +03020231="Mappenavn:" +03020232="Ny mappe" +03020233="Det oppstod en feil da mappen skulle opprettes" + +03020240="Ny fil" +03020241="Filnavn:" +03020242="Ny fil" +03020243="Det oppstod en feil da filen skulle opprettes" + +03020250="Merk" +03020251="Merk ikke" +03020252="Filter:" + +03020260="Mappelogg" + +03020280="Filen «{0}» har blitt endret.\nVil du oppdatere den i arkivet?" +03020281="Klarte ikke oppdatere filen\n«{0}»" +03020282="Klarte ikke starte redigeringsprogram." +03020283="Åpner …" + +03020290="kommentar" +03020291="&Kommentar:" + +030202A0="System" + +03020300="Datamaskin" +03020301="Nettverk" + +03020400="Legg til" +03020401="Pakk ut" +03020402="Prøv" + +03020420="Kopier" +03020421="Flytt" +03020422="Slett" +03020423="Egenskaper" + +03020500="Del opp arkiv" +03020501="&Del opp som:" +03020510="Deler opp …" +03020520="Bekreft deling" +03020521="Er du sikker på at du vil dele arkivet i {0} delarkiv?" +03020522="Delarkivene må være mindre enn originalarkivet" + +03020600="Sett sammen arkiv" +03020601="&Sett sammen som:" +03020610="Setter sammen …" +03020620="Velg bare det første delarkivet" + +03020710="Beregner sjekksum …" +03020720="Sjekksuminformasjon" +03020721="CRC-sjekksum for data:" +03020722="CRC-sjekksum for data og filnavn:" + +03020800="Skanner …" + +; Computer +03031100="Total plass" +03031101="Ledig plass" +03031102="Sektorgruppestørrelse" +03031103="Etikett" + +; Network +03031200="Lokalt navn" +03031201="Forsyner" + +; Benchmark Dialog + +03080000="Yteprøve" +03080001="Minnebruk:" +03080002="Komprimering" +03080003="Dekomprimering" +03080004="Hastighet" +03080005="Ytelse" +03080006="Samlet ytelse" +03080007="Nåværende" +03080008="Resultat" +03080009="Bestått:" +0308000A="Feilet:" +0308000B="CPU bruk" +0308000C="Ytelse / Bruk" + +;!@LangEnd@! diff --git a/GUI/Lang/ne.txt b/GUI/Lang/ne.txt new file mode 100644 index 0000000..8543154 --- /dev/null +++ b/GUI/Lang/ne.txt @@ -0,0 +1,473 @@ +;!@Lang@!UTF-8! +; 7-Zip 4.37 +; Translated by Shiva Pokharel, Mahesh Subedi +; +; +; +; + +00000000="Nepali" +00000001="नेपाली" +00000002="97" + +; 7-Zip Configuration + +; Title +01000000="7-जिप कन्फिगरेसन" + +; Info Page +01000100="7-जिपका बारेमा" +01000103="7-जिप निशुल्क सफ्टवेयर हो। यद्यपी,तपाईँले दर्ता गरेर 7-जिपलाई सहयोग गर्न सक्नुहुन्छ ।" +01000104="सहयोग" +01000105="दर्ता" + +; Folders Page +01000200="फोल्डर" +01000210="&कार्य फोल्डर" +01000211="&प्रणाली टेम्प(अस्थायी) फोल्डर" +01000212="&चालू" +01000213="&निर्दिष्ट:" +01000214="हटाउन योग्य ड्राइभहरूका लागि मात्र प्रयोग गर्नुहोस्" + +01000281="अस्थायी सङ्ग्रह फाइलका लागि स्थान तोक्नुहोस् ।" + +; System Page +01000300="प्रणाली" +01000301="शेल प्रसङ्ग मेनुमा 7-जिप लाई सम्मिलन गर्नुहोस् " +01000302="सोपानी प्रसङ्ग मेनु" +01000310="प्रसङ्ग मेनु वस्तु:" + +; Language Page +01000400="भाषा" +01000401="भाषा:" + + +; 7-Zip Explorer extension + +; Context menu +02000101="7-जिप" +02000102="7-जिप आदेश" +02000103="सङ्ग्रह खोल्नुहोस्" +02000104="चयन गरिएको सङ्ग्रह खोल्नुहोस्" +02000105="फाइलहरू निकाल्नुहोस्..." +02000106="चयन गरिएको सङ्ग्रहबाट फाइलहरू निकाल्नुहोस्" +02000107="सङ्ग्रहमा थप्नुहोस्..." +02000108="चयन गरिएका वस्तुहरूलाई सङ्ग्रहमा थप्दछ" +02000109="सङ्ग्रह जाँच्नुहोस्" +0200010A="चयन गरिएको सङ्ग्रहको समेङ्कन जाँच्दछ" +0200010B="यहाँ निकाल्नुहोस्" +0200010C="हालको फोल्डरमा चयन गरिएको सङ्ग्रहबाट फाइलहरू निकाल्नुहोस्" +0200010D="{0} मा निकाल्नुहोस्" +0200010E="सहायक फोल्डरमा फाइलहरू निकाल्दछ" +0200010F="{0} मा थप्नुहोस्" +02000110="चयन गरिएका वस्तुहरू सङ्ग्रह थप्दछ" +02000111="सङ्कुचन गरेर इमेल गर्नुहोस्..." +02000112="चयन गरिएका वस्तुलाई सङ्ग्रहमा सङ्कुचन गर्दछ र इमेल मार्फत सङ्ग्रहमा पठाउदछ" +02000113="{0} मा सङ्कुचन गर्नुहोस् र इमेल गर्नुहोस्" +02000114="चयन गरिएका वस्तुलाई सङ्ग्रहमा सङ्कुचन गर्दछ र इमेल मार्फत सङ्ग्रहमा पठाउदछ" + +02000140="" +02000141="" + +; Properties +02000203="मार्ग" +02000204="नाम" +02000205="विस्तार" +02000206="फोल्डर" +02000207="साइज" +02000208="प्याक गरिएको साइज" +02000209="विशेषता" +0200020A="सिर्जित" +0200020B="पहुँच" +0200020C="परिमार्जित" +0200020D="ठोस" +0200020E="टिप्पणी" +0200020F="गुप्तिकृत" +02000210="यस पहिले विभाजन गर्नुहोस्" +02000211="यस पछि विभाजन गर्नुहोस्" +02000212="शब्दकोश" +02000213="CRC" +02000214="प्रकार" +02000215="बिरोधि" +02000216="विधि" +02000217="होस्ट OS" +02000218="फाइल प्रणाली" +02000219="प्रयोगकर्ता" +0200021A="समूह" +0200021B="रोक" +0200021C="टिप्पणी" +0200021D="स्थान" +0200021E="मार्ग प्रत्यय" + +; वस्तुस्थिति पट्टी +02000301="{0} वस्तु(हरू) चयन गरियो" +02000302="{0} वस्तु(हरू)" + +02000320="फाइल:" +02000321="फोल्डर:" +02000322="साइज:" + +; प्रसङ्ग मेनु सूची +02000401="&स्तम्भ..." + +02000411="&खोल्नुहोस्" +02000412="&निकाल्नुहोस्..." + +; उपकरणपट्टी +02000501="निकाल्नुहोस्" + +; सन्देश +02000601="यो सङ्ग्रहका लागि अद्यावधिक सञ्चालन समर्थन गर्दैन" +02000602="सङ्ग्रह {0} अद्यावधिक गर्न सकिदैन" +02000603="'{0}'फोल्डर सिर्जना गर्न सकिदैन" +02000604="फाइलले सङ्ग्रह समर्थन गर्दैन" +02000605="त्रुटि" +02000606="धेरै वस्तु" +02000607="त्यहाँ दिइएको फाइल नाम विस्तारसँग सम्बन्धित अनुप्रयोग छैन" +02000608="त्यहाँ त्रुटि छैन" + +; संवाद +02000702="ठीक छ" +02000705="&हो" +02000707="&सबैलाई हो" +02000709="&होइन" +0200070B="&कसैलाई होइन" + +02000710="रद्द गर्नुहोस्" +02000711="&रद्द गर्नुहोस्" +02000713="&बन्द गर्नुहोस्" +02000714="रोक्नुहोस्" +02000715="पुन: सुरु गर्नुहोस्" + +02000720="मद्दत" + +; संवाद निकाल्नुहोस् +02000800="निकाल्नुहोस्" +02000801="यसलाई निकाल्नुहोस्:" +02000802="पासवर्ड" + +02000810="मार्ग मोड" +02000811="पूरा मार्गनाम" +02000812="हालको मार्गनामहरू" +02000813="मार्गनामहरू छैन" + +02000820="अधिलेखन मोड" +02000821="अधिलेखन गर्नु अगाडि सोध्नुहोस्" +02000822="प्रोम्टबिना अधिलेखन गर्नुहोस्" +02000823="अवस्थित फाइलहरू फड्काउनुहोस्" +02000824="स्वचालित पुन: नामकरण" +02000825="स्वचालित पुन: नामकरण अवस्थित फाइलहरू" + +02000830="फाइल" +02000831="&चयन गरिएको फाइल" +02000832="&सबै फाइल" + +02000881="निकालिएको फाइलका लागि स्थान निर्दिष्ट गर्नुहोस्" + +02000890="निकाल्दैछ" + +; अधिलेखन संवाद +02000900="फाइल प्रतिस्थापन यकिन गर्नुहोस्" +02000901="गन्तव्य फोल्डरले पहिले नै प्रक्रिया गरिएको फाइल समावेश गर्दछ" +02000902="अवस्थित फाइलमा प्रतिस्थापन गर्न चाहनुहुन्छ" +02000903="योसँग?" + +02000911="स्वचालित पुन: नामकरण" + +02000982="{0} बाइट" +02000983="यसमा परिमार्जित" + +; सन्देश संवाद +02000A00="निदानात्मक सन्देश" + +02000A80="सन्देश" + +02000A91="'{0}'का लागि असमर्थित सङ्कुचन विधि " +02000A92="'{0}'लगत त्रुटि । फाइल बिग्रेको छ" +02000A93="'{0}' मा CRC असफल । फाइल बिग्रेको छ" + +; पासवर्ड संवाद +02000B00="पासवर्ड प्रविष्ट गर्नुहोस्" +02000B01="पासवर्ड प्रविष्ट गर्नुहोस्:" +02000B02="&पासवर्ड देखाउनुहोस्" + +; प्रगित संवाद +02000C00="प्रक्रिया" +02000C01="व्यतीत समय:" +02000C02="पुन: नामकरण समय:" +02000C03="साइज:" +02000C04="गति:" + +02000C10="&पृष्ठभुमि" +02000C11="&अग्रभुमि" +02000C12="&पज गर्नुहोस्" +02000C13="&जारी राख्नुहोस्" + +02000C20="पज गरिएको" + +02000C30="तपाईँ रद्द गर्न यकिन हुनुहुन्छ ?" + +; सङ्कुचन संवाद +02000D00="सङ्ग्रहमा थप्नुहोस्" +02000D01="&सङ्ग्रह:" +02000D02="&अद्यावधिक मोड:" +02000D03="सङ्ग्रह ढाँचा:" +02000D04="सङ्कुचन विधि:" +02000D05="ठोस सङ्ग्रह सिर्जना गर्नुहोस्" +02000D06="&परिमिति:" +02000D07="विकल्प" +02000D08="SF&X सङ्ग्रह सिर्जना गर्नुहोस्" +02000D09="मल्टि-थ्रेडिङ" +02000D0A="फाइलनाम गुप्तिकरण गर्नुहोस्" +02000D0B="सङ्कुचन स्तर:" +02000D0C="&शब्दकोश साइज:" +02000D0D="&शब्द साइज:" +02000D0E="सङ्कुचनका लागि स्मृति प्रयोग:" +02000D0F="असङ्कुचनका लागि स्मृति प्रयोग:" + +02000D40="भोल्युम, बाइटमा विभाजन गर्नुहोस्:" + +02000D81="भण्डार गर्नुहोस्" +02000D82="साधारण" +02000D83="अधिकतम" +02000D84="छिटो" +02000D85="सब भन्दा छिटो" +02000D86="अत्यन्त" + +02000D90="ब्राउज गर्नुहोस्" + +02000DA1="फाइल थपेर प्रतिस्थापन गर्नुहोस्" +02000DA2="फाइलहरू अद्यावधिक गरेर थप्नुहोस्" +02000DA3="अवस्थित फाइल ताजा गर्नुहोस्" +02000DA4="फाइल समक्रमण गर्नुहोस्" + +02000DB1="सबै फाइल" + +02000DC0="सङ्कुचन" + +; स्तम्भ संवाद +02000E00="स्तम्भ" +02000E01="यो फोल्डरमा देखिने बनाउन चाहनु भएको स्तम्भ जाँच गर्नुहोस् । स्तम्भलाई पुन: क्रमबद्ध गर्न 'माथि सार्नुहोस्' र 'तल सार्नुहोस्' बटनको प्रयोग गर्नुहोस् " +02000E02="चयन गरिएको स्तम्भ हुनुपर्दछ" +02000E03="फराकिलो पिक्सेल" + +02000E10="माथि सार्नुहोस्" +02000E11="तल सार्नुहोस्" +02000E12="&देखाउनुहोस्" +02000E13="&लुकाउनुहोस्" +02000E14="सेट गर्नुहोस्" + +02000E81="शीर्षक" +02000E82="चौडाइ" + +; परीक्षण +02000F90="परीक्षण" + + +; फाइल प्रबन्धक + +03000000="7-जिप फाइल प्रबन्धक" + +; मेनु +03000102="&फाइल" +03000103="&सम्पादन गर्नुहोस्" +03000104="&हेर्नुहोस्" +03000105="&उपकरण" +03000106="&मद्दत" +03000107="&रुचाइएको" + +; फाइल +03000210="&खोल्नुहोस्" +03000211="भित्रपट्टि खोल्नुहोस्" +03000212="बाहरिपट्टि खोल्नुहोस्" +03000220="&हेर्नुहोस्" +03000221="&सम्पादन गर्नुहोस्" +03000230="पुन: नामकरण गर्नुहोस्" +03000231="&यसमा प्रतिलिपि बनाउनुहोस्..." +03000232="&यसमा सार्नुहोस्..." +03000233="&मेट्नुहोस्" +03000240="&गुण" +03000241="टिप्पणी" +03000242="checksum गणना गर्नुहोस्" +03000250="फोल्डर सिर्जना गर्नुहोस्" +03000251="फाइल सिर्जना गर्नुहोस्" +03000260="निस्कनुहोस्" +03000270="&फाइल विभाजन गर्नुहोस्..." +03000271="फाइलहरू संयोजन गर्नुहोस्..." + +; सम्पादन +03000310="&पूर्वस्थितिमा फर्काउनुहोस्" +03000311="&रिडु गर्नुहोस्" +03000320="काँट्नुहोस्" +03000321="&प्रतिलिपि बनाउनुहोस्" +03000322="&टाँस्नुहोस्" +03000323="&मेट्नुहोस्" +03000330="सबै चयन गर्नुहोस्" +03000331="सबै मेट्नुहोस्" +03000332="&चयन उल्टाउनुहोस्" +03000333="चयन गर्नुहोस्..." +03000334="चयन हटाउनुहोस्..." +03000335="प्रकार अनुसार चयन गर्नुहोस्" +03000336="प्रकार अनुसार चयन हटाउनुहोस्" + +; दृश्य +03000410="ठूलो प्रतिमा" +03000411="सानो प्रतिमा" +03000412="&सूची" +03000413="&वर्णन" +03000420="क्रमबद्ध नगरिएको" +03000430="प्रमूल फोल्डर खोल्नुहोस्" +03000431="एक स्तर माथि" +03000432="फोल्डरको इतिहार..." +03000440="&ताजा गर्नुहोस्" +03000449="फ्ल्याट दृश्य" +03000450="&२ प्यानल" +03000451="&उपकरणपट्टी" +03000460="सङ्ग्रह उपकरणपट्टी" +03000461="मानक उपकरणपट्टी" +03000462="ठूलो बटन" +03000463="बटनको पाठ देखाउनुहोस्" + +; उपकरण +03000510="&विकल्प..." +03000511="&बेञ्चमार्क" + +; मद्दत +03000610="&सामग्री..." +03000620="&7-जिपका बारेमा..." + +; रूचाइएको +03000710="&यस रूपमा रूचाइएकोमा फोल्डर थप्नुहोस्" +03000720="पुस्तकचिनो" + +; विकल्प संवाद + +03010000="विकल्प" + +; प्लगइन +03010100="प्लगइन" +03010101="&प्लगइन:" +03010110="विकल्प..." + +; सम्पादन +03010200="सम्पादक" +03010201="&सम्पादक:" + +; प्रणाली +03010300="प्रणाली" +03010302="यससँग 7-जिप सम्बन्धित:" +03010310="प्लगइन" + +; सेटिङ +03010400="सेटिङ" +03010401="\"..\" वस्तु देखाउनुहोस्" +03010402="वास्तविक फाइल प्रतिमा देखाउनुहोस्" +03010410="प्रणाली मेनु देखाउनुहोस्" +03010420="&पूरा पङ्क्ति चयन" +03010421="ग्रिड रेखा देखाउनुहोस्" +03010430="&वैकल्पिक चयन मोड" +03010440="ठूलो स्मृति पृष्ठ प्रयोग गर्नुहोस्" + +; सेटिङ + +03020201="प्रतिलिपि गर्नुहोस्" +03020202="सार्नुहोस्" +03020203="यसमा प्रतिलिपि गर्नुहोस्:" +03020204="यसमा सार्नुहोस्:" +03020205="प्रतिलिपि गर्दैछ..." +03020206="सार्दैछ..." +03020207="यस्तो फोल्डरकाल लागि तपाईँले वस्तुहरू सार्न र प्रतिलिपि गर्न सक्नुहुदैन" +03020208="सञ्चालन समर्थन गर्दैन" + +03020210="फाइल मेट्न यकिन गर्नुहोस्" +03020211="फोल्ड मेट्न यकिन गर्नुहोस्" +03020212="बहुविध फाइल मेट्न यकिन गर्नुहोस्" +03020213="तपाईँ '{0}'मेट्न निश्चित हुनुहुन्छ ?" +03020214="तपाईँ '{0}' फोल्डर यसको सबै सामग्री मेट्न निश्चित हुनुहुन्छ ?" +03020215="तपाईँ {0} वस्तुहरू मेट्न निश्चित हुनुहुन्छ ?" +03020216="मेट्दैछ..." +03020217="फाइल वा फोल्डर मेट्दा त्रुटि" + +03020220="पुन: नामकरण..." +03020221="फाइल वा फोल्डर पुन: नामकरण गर्दा त्रुटि" +03020222="फाइल प्रतिलिपि गर्न यकिन गर्नुहोस्" +03020223="तपाईँ फाइलहरू सङ्ग्रहमा प्रतिलिपि गर्न निश्चित हुनुहुन्छ" + +03020230="फोल्डर सिर्जना गर्नुहोस्" +03020231="फोल्डर नाम:" +03020232="नयाँ फोल्डर" +03020233="फोल्डर सिर्जना गर्दा त्रुटि" + +03020240="फाइल सिर्जना गर्नुहोस्" +03020241="फाइल नाम:" +03020242="नयाँ फाइल" +03020243="फाइल सिर्जना गर्दा त्रुटि" + +03020250="चयन गर्नुहोस्" +03020251="चयन हटाउनुहोस्" +03020252="मास्क:" + +03020260="फोल्डर इतिहार" + +03020280="'{0}'फाइल परिमार्जन गरिएको छ ।\nतपाईँले यसलाई सङ्ग्रहमा अद्यावधिक गर्न चाहनुहुन्छ ?" +03020281="फाइल अद्यावधिक गर्न सकिदैन\n'{0}'" +03020282="सम्पादक सुरु गर्न सकिदैन" +03020283="खोल्दैछ..." + +03020290="टिप्पणी" +03020291="&टिप्पणी:" + +030202A0="प्रणाली" + +03020300="कम्प्युटर" +03020301="सञ्जाल" + +03020400="थप्नुहोस्" +03020401="निकाल्नुहोस्" +03020402="परीक्षण गर्नुहोस्" + +03020420="प्रतिलिपि गर्नुहोस्" +03020421="सार्नुहोस्" +03020422="मेट्नुहोस्" +03020423="सूचना" + +03020500="फाइल विभाजन गर्नुहोस्" +03020501="&यसमा विभाजन गर्नुहोस्:" +03020510="विभाजन गर्दैछ..." + +03020600="फाइल संयोजन गर्नुहोस्" +03020601="&यसमा संयोजन गर्नुहोस्:" +03020610="संयोजन गर्दैछ..." + +03020710="Checksum गणना गर्दैछ..." +03020720="Checksum सूचना" +03020721="लगतका लागि CRC checksum:" +03020722="लगत र नामहरूका लागि CRC checksum:" + +03020800="स्क्यानिङ..." + +; कम्प्युटर +03031100="जम्मा साइज" +03031101="स्वतन्त्र रिक्तस्थान" +03031102="समूह साइज" +03031103="लेबुल" + +; सञ्जाल +03031200="स्थानिय नाम" +03031201="प्रदायक" + +; बेञ्चमार्क संवाद + +03080000="बेञ्चमार्क" +03080001="स्मृति उपयोग:" +03080002="सङ्कुचन" +03080003="असङ्कुचन" +03080004="गति" +03080005="दर" +03080006="जम्मा दर" +03080007="हालको" +03080008="नतिजा" +03080009="पास:" +0308000A="त्रुटि:" + +;!@LangEnd@! diff --git a/GUI/Lang/nl.txt b/GUI/Lang/nl.txt new file mode 100644 index 0000000..d00b470 --- /dev/null +++ b/GUI/Lang/nl.txt @@ -0,0 +1,545 @@ +;!@Lang@!UTF-8! +; 7-Zip 9.07 +; Translated by Jeroen Tulp - Vertaald door Jeroen Tulp +; +; Changed and updated translations as done for 7-Zip 4.26 Beta by Jeroen van der Weijde. +; +; Special thanks to Fuss! and r00n for their support in perfecting these translations. + +00000000="Dutch" +00000001="Nederlands" +00000002="19" + +; 7-Zip Configuration + +; Title +01000000="7-Zip Configuratie" + +; Info Page +01000100="Over 7-Zip" +01000103="7-Zip is gratis software. Echter, u kunt de ontwikkeling van 7-Zip ondersteunen door u te registreren." +01000104="&Ondersteuning" +01000105="&Registreren" + +; Folders Page +01000200="Mappen" +01000210="&Werkmap" +01000211="&Tijdelijke systeemmap" +01000212="&Huidige" +01000213="&Gespecificeerd:" +01000214="Alleen voor verwisselbare schijven gebruiken." + +01000281="Specificeer een locatie voor tijdelijke archiefbestanden." + +; System Page +01000300="Systeem" +01000301="7-Zip in het contextmenu integreren." +01000302="Trapsgewijs contextmenu" +01000310="Contextmenu items:" + +; Language Page +01000400="Taal" +01000401="Taal:" + + +; 7-Zip Explorer extension + +; Context menu +02000101="7-Zip" +02000102="7-Zip opdrachten" +02000103="Open archief" +02000104="Opent het geselecteerde archief." +02000105="Bestanden uitpakken..." +02000106="Bestanden uitpakken voor het geselecteerde archief." +02000107="Toevoegen aan archief..." +02000108="Toevoegen van de geselecteerde items aan een archief." +02000109="Archief testen" +0200010A="Integriteit van het geselecteerde archief testen." +0200010B="Pak hier uit" +0200010C="Pakt bestanden in het archief uit naar de huidige map." +0200010D="Pak uit naar {0}" +0200010E="Pakt bestanden in het archief uit naar een submap." +0200010F="Toevoegen aan {0}" +02000110="Toevoegen van geselecteerde items aan het archief." +02000111="Comprimeer en verstuur..." +02000112="Comprimeert de geselecteerde items in een archief en verstuur het via e-mail." +02000113="Comprimeer naar {0} en verstuur" +02000114="Comprimeert de geselecteerde items in het archief en verstuur het via e-mail." + +02000140="" +02000141="" + +; Properties +02000203="Pad" +02000204="Naam" +02000205="Extensie" +02000206="Map" +02000207="Grootte" +02000208="Ingepakte grootte" +02000209="Kenmerken" +0200020A="Aangemaakt" +0200020B="Laatst geopend" +0200020C="Gewijzigd" +0200020D="Compact" +0200020E="Commentaar" +0200020F="Gecodeerd" +02000210="Gesplitst voor" +02000211="Gesplitst na" +02000212="Woordenboek" +02000213="CRC" +02000214="Type" +02000215="Anti" +02000216="Methode" +02000217="Gastheer OS" +02000218="Bestandssysteem" +02000219="Gebruiker" +0200021A="Groep" +0200021B="Blok" +0200021C="Opmerking" +0200021D="Positie" +0200021E="Pad Prefix" +0200021F="Mappen" +02000220="Bestanden" +02000221="Versie" +02000222="Volume" +02000223="Multivolume" +02000224="Offset" +02000225="Koppelingen" +02000226="Blokken" +02000227="Volumes" + +02000229="64-bit" +0200022A="Big-endian" +0200022B="CPU" +0200022C="Fysieke grootte" +0200022D="Kop grootte" +0200022E="Checksum" +0200022F="Karakteristieken" +02000230="Virtueel Adres" +02000231="ID" +02000232="Korte Naam" +02000233="Aanmaak Applicatie" +02000234="Sector Grootte" +02000235="Modus" +02000236="Link" + +; Status bar +02000301="{0} item(s) geselecteerd" +02000302="{0} item(s)" + +02000320="Bestanden:" +02000321="Mappen:" +02000322="Grootte:" +02000323="Gecomprimeerde grootte:" +02000324="Archieven:" + +; List Context Menu +02000401="&Kolommen..." + +02000411="&Openen" +02000412="&Uitpakken..." + +; ToolBar +02000501="Uitpakken" + +; Messages +02000601="Bijwerkfuncties niet ondersteund voor dit archief." +02000602="Kan archief {0} niet bijwerken." +02000603="Kan map '{0}' niet aanmaken." +02000604="Dit bestand is geen ondersteund archief." +02000605="Fout" +02000606="Te veel items" +02000607="Er is geen programma geassocieerd met deze bestandsextensie." +02000608="Er zijn geen fouten." +02000609="Kan bestand '{0}' niet openen als archief." +0200060A="Kan het gecodeerde archief '{0}' niet openen. Verkeerd wachtwoord?" +0200060B="Het systeem kan de benodigde hoeveelheid geheugen niet alloceren" +0200060C="Onbekende fout" +0200060D="Niet ondersteund archief type" + +; Dialogs +02000702="OK" +02000705="&Ja" +02000707="Ja op &alles" +02000709="&Nee" +0200070B="Nee op a&lles" + +02000710="Annuleren" +02000711="&Annuleren" +02000713="A&fsluiten" +02000714="Stop" +02000715="Herstarten" + +02000720="Help" + +; Extract dialog +02000800="&Uitpakken" +02000801="U&itpakken naar:" +02000802="&Wachtwoord" + +02000810="Padmethode" +02000811="Volledige padnamen" +02000812="Huidige padnamen" +02000813="Geen padnamen" + +02000820="Overschrijfmethode" +02000821="Vraag voor overschrijven" +02000822="Overschrijven zonder bevestiging" +02000823="Bestaande bestanden overslaan" +02000824="Automatisch hernoemen" +02000825="Automatisch hernoemen van bestaande bestanden" + +02000830="Bestanden" +02000831="&Geselecteerde bestanden" +02000832="&Alle bestanden" + +02000881="Geef een locatie op voor de uitgepakte bestanden." + +02000890="Bezig met uitpakken..." + +; Overwrite dialog +02000900="Bevestig vervangen bestand" +02000901="Doelmap bevat reeds het verwerkte bestand." +02000902="Wilt u het bestaande bestand vervangen" +02000903="door dit bestand?" + +02000911="A&utomatisch hernoemen" + +02000982="{0} bytes" +02000983="gewijzigd op" + +; Messages dialog +02000A00="Diagnostische berichten" + +02000A80="Bericht" + +02000A91="Niet ondersteunde compressiemethode voor '{0}'." +02000A92="Gegevensfout in '{0}'. Bestand is beschadigd." +02000A93="CRC mislukt in '{0}'. Bestand is beschadigd." +02000A94="Gegevensfout in het gecodeerde bestand '{0}'. Verkeerd wachtwoord?" +02000A95="CRC mislukt in het gecodeerde bestand '{0}'. Verkeerd wachtwoord?" + +; Password dialog +02000B00="Wachtwoord ingeven" +02000B01="Wachtwoord &ingeven:" +02000B02="Wachtwoord &tonen" +02000B03="Wachtwoord bevestigen:" +02000B10="Wachtwoorden komen niet overeen." +02000B11="Gebruik alleen alfanumerieke en speciale karakters (!, #, $, ...) voor het wachtwoord." +02000B12="Wachtwoord is te lang." + +; Progress dialog +02000C00="Verwerking" +02000C01="Verstreken tijd:" +02000C02="Overgebleven tijd:" +02000C03="Grootte:" +02000C04="Snelheid:" +02000C05="Verwerkt:" +02000C06="Compressie verhouding:" + +02000C10="&Achtergrond" +02000C11="&Voorgrond" +02000C12="&Pauzeren" +02000C13="&Hervatten" + +02000C20="Gepauzeerd" + +02000C30="Weet u zeker dat u wilt annuleren?" + +; Compress dialog +02000D00="Toevoegen aan archief" +02000D01="&Archief:" +02000D02="&Bijwerkmethode:" +02000D03="Archief &formaat:" +02000D04="Compressie&methode:" +02000D05="&Compact archief maken" +02000D06="&Parameters:" +02000D07="Opties" +02000D08="SF&X archief maken" +02000D09="Multi-threading" +02000D0A="Codee&r bestandsnamen" +02000D0B="Compressie&niveau:" +02000D0C="&Woordenboekgrootte:" +02000D0D="W&oordgrootte:" +02000D0E="Geheugengebruik bij het inpakken:" +02000D0F="Geheugengebruik bij het uitpakken:" +02000D10="Codering" +02000D11="Cod&eermethode:" +02000D12="Aantal CP&U-threads:" +02000D13="Compacte b&lokgrootte:" +02000D14="Niet compact" +02000D15="Compact" +02000D16="Comprimeer &gedeelde bestanden" + +02000D40="Opsplitsen in &volumes (grootte in bytes):" +02000D41="Verkeerde volumegrootte" +02000D42="Gespecificeerde volumegrootte: {0} bytes.\nWeet u zeker dat u het archief zo wilt splitsen?" + +02000D81="Opslaan" +02000D82="Normaal" +02000D83="Maximum" +02000D84="Snel" +02000D85="Snelst" +02000D86="Ultra" + +02000D90="Bladeren" + +02000DA1="Bestanden toevoegen en vervangen" +02000DA2="Bestanden bijwerken en toevoegen" +02000DA3="Bestaande bestanden opfrissen" +02000DA4="Bestanden synchroniseren" + +02000DB1="Alle bestanden" + +02000DC0="Bezig met comprimeren..." + +; Columns dialog +02000E00="Kolommen" +02000E01="Markeer de kolommen die u zichtbar wilt maken in deze map. Gebruik de omhoog en omlaag knoppen om de kolommen te rangschikken." +02000E02="De gemarkeerde kolom moet" +02000E03="pixels &breed zijn." + +02000E10="Om&hoog verplaatsen" +02000E11="Om&laag verplaatsen" +02000E12="&Tonen" +02000E13="&Verbergen" +02000E14="Instellen" + +02000E81="Titel" +02000E82="Breedte" + +; Testing +02000F90="Bezig met testen..." + + +; File Manager + +03000000="7-Zip Bestandsbeheer" + +; Menu +03000102="&Bestand" +03000103="Be&werken" +03000104="Bee&ld" +03000105="E&xtra" +03000106="&Help" +03000107="&Favorieten" + +; File +03000210="&Openen" +03000211="Open B&innen" +03000212="Open B&uiten" +03000220="Bee&ld" +03000221="&Bewerken" +03000230="Naam wi&jzigen" +03000231="Kopiëren &naar..." +03000232="&Verplaatsen naar..." +03000233="Verwij&deren" +03000240="Ei&genschappen" +03000241="O&pmerking" +03000242="&Checksum berekenen" +03000243="Vergelijken" +03000250="Nieuwe &map" +03000251="Nieuw b&estand" +03000260="&Sluiten" +03000270="Bestand opspli&tsen..." +03000271="Bestanden s&amenvoegen..." + +; Edit +03000310="&Ongedaan maken" +03000311="&Opnieuw" +03000320="Kn&ippen" +03000321="&Kopiëren" +03000322="P&lakken" +03000323="Verwij&deren" +03000330="&Alles selecteren" +03000331="All&es de-selecteren" +03000332="Sele&ctie omkeren" +03000333="&Selecteer..." +03000334="&De-selecteer..." +03000335="&Selecteer op type" +03000336="&De-selecteer op type" + +; View +03000410="&Grote pictogrammen" +03000411="&Kleine pictogrammen" +03000412="&Lijst" +03000413="&Details" +03000420="&Ongesorteerd" +03000430="&Root map openen" +03000431="Één &niveau omhoog" +03000432="&Mappen Geschiedenis..." +03000440="&Vernieuwen" +03000449="&Platte weergave" +03000450="&2 Panelen" +03000451="&Werkbalken" +03000460="&Archief werkbalk" +03000461="&Standaard werkbalk" +03000462="Grote kn&oppen" +03000463="Knop&tekst weergeven" + +; Tools +03000510="&Opties..." +03000511="&Benchmark" + +; Help +03000610="&Inhoud..." +03000620="&Over 7-Zip..." + +; Favorites +03000710="&Map toevoegen aan favorieten" +03000720="Toevoegen als" + +; Options Dialog + +03010000="Opties" + +; Plugins +03010100="Plugins" +03010101="&Plugins:" +03010110="&Opties..." + +; Edit +03010200="Editor" +03010201="&Editor:" +03010202="&Vergelijken:" + +; System +03010300="Systeem" +03010302="Associeer 7-Zip met:" +03010310="Plugin" + +; Settings +03010400="Instellingen" +03010401="Toon \"..\" &item" +03010402="Toon &echte bestandspictogrammen" +03010410="Toon &systeem contextmenu" +03010420="&Selecteer gehele rij" +03010421="Toon &rasterlijnen" +03010422="Enkele klik om een item te openen" +03010430="&Alternatieve selectiemodus" +03010440="&Gebruik grote geheugenpagina's" + +; Strings + +03020201="Kopiëren" +03020202="Verplaatsen" +03020203="Kopiëren naar:" +03020204="Verplaatsen naar:" +03020205="Bezig met kopiëren..." +03020206="Bezig met verplaatsen..." +03020207="U kunt items niet verplaatsen of kopiëren voor dergelijke mappen." +03020208="Functie wordt niet ondersteund." +03020209="Selecteer een doelmap." + +03020210="Verwijdering bestand bevestigen" +03020211="Verwijdering map bevestigen" +03020212="Verwijdering van meerdere bestanden bevestigen" +03020213="Weet u zeker dat u '{0}' wilt verwijderen?" +03020214="Weet u zeker dat u de map '{0}' en alle onderliggende items wilt verwijderen?" +03020215="Weet u zeker dat u deze {0} items wilt verwijderen?" +03020216="Bezig met verwijderen..." +03020217="Fout bij het verwijderen van een bestand of map" +03020218="Het systeem kan een bestand met een lang pad niet verplaatsen naar de Prullenbak" + +03020220="Bezig met hernoemen..." +03020221="Fout bij het hernoemen van een bestand of map" +03020222="Bevestig kopiëren van bestand" +03020223="Weet u zeker dat u deze bestanden naar het archief wilt kopiëren" + +03020230="Map maken" +03020231="Naam van de map:" +03020232="Nieuwe map" +03020233="Fout bij het maken van de map" + +03020240="Bestand maken" +03020241="Bestandsnaam:" +03020242="Nieuw bestand" +03020243="Fout bij het maken van het bestand." + +03020250="Selecteren" +03020251="De-selecteren" +03020252="Masker:" + +03020260="Mappen Geschiedenis" + +03020280="Bestand '{0}' is gewijzigd.\nWilt u het bijwerken in het archief?" +03020281="Kan bestand\n'{0}' niet bijwerken." +03020282="Kan de editor niet starten." +03020283="Bezig met openen..." +03020284="Het bestand lijkt op een virus (het bevat veel opeenvolgende spaties in de naam)." + +03020290="Opmerking" +03020291="&Opmerking:" + +030202A0="Systeem" + +03020300="Computer" +03020301="Netwerk" +03020302="Documenten" + +03020400="Toevoegen" +03020401="Uitpakken" +03020402="Testen" + +03020420="Kopiëren" +03020421="Verplaatsen" +03020422="Verwijderen" +03020423="Info" + +03020500="Opsplitsen bestand" +03020501="&Opsplitsen naar:" +03020510="Bezig met opsplitsen..." +03020520="Bevestigen opsplitsen" +03020521="Weet u zeker dat u het bestand wilt opsplitsen in {0} volumes?" +03020522="De volumegrootte moet kleiner zijn dan de grootte van het oorspronkelijke bestand." + +03020600="Bestanden samenvoegen" +03020601="&Samenvoegen naar:" +03020610="Bezig met samenvoegen..." +03020620="Selecteer alleen het eerste bestand." +03020621="Kan het bestand niet herkennen als onderdeel van een gesplitst bestand" +03020622="Kan niet meer dan 1 deel van een gesplitst bestand" + +03020710="Bezig met checksum berekenen..." +03020720="Checksum informatie" +03020721="CRC checksum voor gegevens:" +03020722="CRC checksum voor gegevens en namen:" + +03020800="Bezig met scannen..." + +03020900="Eigenschappen" + +03020A01="De actie kan niet worden uitgevoerd vanuit een folder met een dermate lang pad." +03020A02="U moet 1 bestand selecteren" +03020A03="U moet 1 of meerdere bestanden selecteren" +03020A04="Bestand {0} bestaat reeds" + +; Computer +03031100="Capaciteit" +03031101="Beschikbaar" +03031102="Clustergrootte" +03031103="Label" + +; Network +03031200="Lokale naam" +03031201="Provider" + +; Benchmark Dialog + +03080000="Benchmark" +03080001="Geheugengebruik:" +03080002="Inpakken" +03080003="Uitpakken" +03080004="Snelheid" +03080005="Waarde" +03080006="Totale waarde" +03080007="Huidig" +03080008="Resultaat" +03080009="Doorgangen:" +0308000A="Fouten:" +0308000B="CPU-gebruik" +0308000C="Waarde / gebruik" + +;!@LangEnd@! + + diff --git a/GUI/Lang/nn.txt b/GUI/Lang/nn.txt new file mode 100644 index 0000000..a3993b4 --- /dev/null +++ b/GUI/Lang/nn.txt @@ -0,0 +1,496 @@ +;!@Lang@!UTF-8! +; 7-Zip 4.45 +; Translated by Robert Grønning +; +; +; +; + +00000000="Norwegian Nynorsk" +00000001="Norsk Nynorsk" +00000002="20-2" + +; 7-Zip Configuration + +; Title +01000000="7-Zip innstillingar" + +; Info Page +01000100="Om 7-Zip" +01000103="7-Zip er fri programvare. Du kan støtta utviklinga av 7-Zip ved å registrere deg." +01000104="Brukarstøtte" +01000105="Registrering" + +; Folders Page +01000200="Mapper" +01000210="&Arbeidsmappe" +01000211="&Midlertidig mappe" +01000212="&Noverande" +01000213="&Eigendefinert:" +01000214="Berre for flyttbare stasjonar" + +01000281="Oppgje plassering for midlertidige arkiv filer." + +; System Page +01000300="System" +01000301="Legg inn 7-Zip i programmenyen" +01000302="Forgreina programmeny" +01000310="Programmeny val:" + +; Language Page +01000400="Språk" +01000401="Språk:" + + +; 7-Zip Explorer extension + +; Context menu +02000101="7-Zip" +02000102="7-Zip kommandoar" +02000103="Opna arkiv" +02000104="Opna valt arkiv." +02000105="Pakk ut filer..." +02000106="Pakk ut filer frå valt arkiv." +02000107="Legg til i arkiv..." +02000108="Legg til utval i arkiv." +02000109="Test arkiv" +0200010A="Testar integriteten til valt arkiv." +0200010B="Pakk ut her" +0200010C="Pakkar ut filer frå valt arkiv til denne mappa." +0200010D="Pakk ut til {0}" +0200010E="Pakkar ut filer til undermappe." +0200010F="Legg til i {0}" +02000110="Legg utval til i arkiv." +02000111="Komprimere og send som epost..." +02000112="Komprimere utval til et arkiv og send det som epost." +02000113="Komprimere til {0} og send som epost" +02000114="Komprimere utval til et arkiv og send det som epost." + +02000140="" +02000141="" + +; Properties +02000203="Bane" +02000204="Namn" +02000205="Fil etternamn" +02000206="Mappe" +02000207="Størrelse" +02000208="Komprimert Størrelse" +02000209="Eigenskapar" +0200020A="Oppretta" +0200020B="Opna" +0200020C="Endra" +0200020D="Solid" +0200020E="Kommentert" +0200020F="Kryptert" +02000210="Delt før" +02000211="Delt etter" +02000212="Ordbok" +02000213="CRC" +02000214="Type" +02000215="Anti" +02000216="Metode" +02000217="Vert OS" +02000218="Filsystem" +02000219="Brukar" +0200021A="Gruppe" +0200021B="Blokkering" +0200021C="Kommentar" +0200021D="Posisjon" +0200021E="Bane prefiks" + +; Status bar +02000301="{0} objekt(ar) valt" +02000302="{0} objekt(ar)" + +02000320="Filer:" +02000321="Mapper:" +02000322="Størrelse:" + +; List Context Menu +02000401="&Kolonner..." + +02000411="&Opna" +02000412="&Pakk ut..." + +; ToolBar +02000501="Pakk ut" + +; Messages +02000601="Dette arkivet manglar støtte for å kunne oppdaterast." +02000602="Kan ikkje oppdatere arkiv {0}" +02000603="Kan ikkje oppretta mappe '{0}'" +02000604="Fila er ikkje eit støtta arkiv." +02000605="Feil" +02000606="For mange gonger" +02000607="Ingen program er tilknytt dette fil etternamnet" +02000608="Ingen feil" +02000609="Kan ikkje opna fila '{0}' som eit arkiv" +0200060A="Kan ikkje opna det krypterte arkivet '{0}'. Feil passord?" + +; Dialogs +02000702="OK" +02000705="&Ja" +02000707="Ja til &alt" +02000709="&Nei" +0200070B="N&ei til alt" + +02000710="Avbryt" +02000711="&Avbryt" +02000713="&Lukke" +02000714="Stopp" +02000715="Start på nytt" + +02000720="Hjelp" + +; Extract dialog +02000800="Pakk ut" +02000801="Pakk ut &til:" +02000802="Passord" + +02000810="Bane modus" +02000811="Fulstendig banenamn" +02000812="Noverande banenamn" +02000813="Ingen banenamn" + +02000820="Overskriving modus" +02000821="Bekrefta før overskriving" +02000822="Skriv over utan bekrefting" +02000823="Hopp over eksisterande filer" +02000824="Endra filnamn automatisk" +02000825="Endra filnamn automatisk for eksisterande filer" + +02000830="Filer" +02000831="&Valte filer" +02000832="&Alle filer" + +02000881="Vel ei mappe for ut-pakka filer." + +02000890="Pakkar ut" + +; Overwrite dialog +02000900="Bekrefta overskriving av fil" +02000901="Målmappa inneheld allereie ei behandla fil." +02000902="Vil du overskriva den eksisterande fila" +02000903="med denne?" + +02000911="&Skift filnamn automatisk" + +02000982="{0} byte" +02000983="endra på" + +; Messages dialog +02000A00="Diagnose meldingar" + +02000A80="Melding" + +02000A91="Kompresjonsmetoden er ikkje støtta for '{0}'." +02000A92="Data feil i '{0}'. Fila er øydelagt." +02000A93="CRC feila på '{0}'. Fila er øydelagt." +02000A94="Data feil i den krypterte fila '{0}'. Feil passord?" +02000A95="CRC feila i den krypterte fila '{0}'. Feil passord?" + +; Password dialog +02000B00="Skriv inn passord" +02000B01="Skriv inn passord:" +02000B02="&Vis passord" +02000B03="Skriv inn passordet på nytt:" +02000B10="Passorda er ikkje like" +02000B11="Bruk berre Engelske bokstavar, tal og spesielle teikn (!, #, $, ...) i passordet" +02000B12="Passordet er for langt" + +; Progress dialog +02000C00="Prosess" +02000C01="Tid brukt:" +02000C02="Tid gjenstår:" +02000C03="Størrelse:" +02000C04="Fart:" + +02000C10="&Bakgrunn" +02000C11="&Forgrunn" +02000C12="&Pause" +02000C13="&Hald fram" + +02000C20="Sett på pause" + +02000C30="Er du sikker på du vil avbryte?" + +; Compress dialog +02000D00="Legg til i arkiv" +02000D01="&Arkiv:" +02000D02="&Oppdaterings modus:" +02000D03="Arkiv &format:" +02000D04="Kompresjons &metode:" +02000D05="Opprett eit &Solid arkiv" +02000D06="&Parameter:" +02000D07="Val" +02000D08="Opprett SF&X arkiv" +02000D09="Fleirtråda" +02000D0A="&Krypter filnamn" +02000D0B="Kompresjons &nivå:" +02000D0C="O&rdbok størrelse:" +02000D0D="Or&d størrelse:" +02000D0E="Minnebruk ved kompresjon:" +02000D0F="Minnebruk ved ut-pakking:" +02000D10="Krypter" +02000D11="Krypter metode:" +02000D12="Anntal CPU tråder:" +02000D13="Solid blokk størrelse:" +02000D14="Ikkje-solid" +02000D15="Solid" + +02000D40="Splitt opp i deler, byte:" +02000D41="Feil del-størrelse" +02000D42="Oppgitt del-størrelse: {0} byte.\nEr du sikker på du vil dele arkivet opp i slike deler?" + +02000D81="Lagre" +02000D82="Normal" +02000D83="Maksimum" +02000D84="Rask" +02000D85="Raskast" +02000D86="Ekstrem" + +02000D90="Bla igjennom" + +02000DA1="Legg til og skriv over filer" +02000DA2="Oppdatere og legg til filer" +02000DA3="Frisk opp eksisterande filer" +02000DA4="Synkroniser filer" + +02000DB1="Alle filer" + +02000DC0="Komprimerer" + +; Columns dialog +02000E00="Kolonner" +02000E01="Merk kolonnene du vil visa i denne mappa. Bruk Flytt opp og Flytt ned knappane for å endra plassringen på kolonnene." +02000E02="Den valte kolonna skal vera" +02000E03="punkter &brei." + +02000E10="Flytt &Opp" +02000E11="Flytt &Ned" +02000E12="&Vis" +02000E13="&Gøym" +02000E14="Bruk" + +02000E81="Tittel" +02000E82="Breidde" + +; Testing +02000F90="Testing" + + +; File Manager + +03000000="7-Zip Fil behandlar" + +; Menu +03000102="&Fil" +03000103="&Redigere" +03000104="&Vis" +03000105="Verk&tøy" +03000106="&Hjelp" +03000107="F&avorittar" + +; File +03000210="&Opna" +03000211="Opna &Inni" +03000212="Opna &Utanfor" +03000220="&Vis" +03000221="&Redigere" +03000230="Endra &namn" +03000231="&Kopiere til..." +03000232="&Flytt til..." +03000233="&Slett" +03000240="&Eigenskapar" +03000241="Ko&mmentar" +03000242="Rekna ut kontrollnummer" +03000250="Opprett mappe" +03000251="Opprett fil" +03000260="&Avslutta" +03000270="&Del opp fil..." +03000271="Set saman filer..." + +; Edit +03000310="&Angre" +03000311="&Gjer om" +03000320="Klipp &ut" +03000321="&Kopiere" +03000322="Lim &inn" +03000323="&Slett" +03000330="&Merk alle" +03000331="Fjern alle markeringar" +03000332="&Omvendt markering" +03000333="Marker..." +03000334="Fjern markering..." +03000335="Merk etter type" +03000336="Fjern markering etter type" + +; View +03000410="S&tore ikon" +03000411="S&må ikon" +03000412="&Lista" +03000413="&Detaljar" +03000420="Assortert" +03000430="Opna kjeldemappa" +03000431="Opp eit nivå" +03000432="Mappelogg..." +03000440="&Oppdatere" +03000449="Flat vising" +03000450="&2 felt" +03000451="&Verktøylinjer" +03000460="Arkiv verktøylinje" +03000461="Standard verktøylinjer" +03000462="Store knappar" +03000463="Vis knappetekst" + +; Tools +03000510="&Val..." +03000511="&Yting test" + +; Help +03000610="&Innhold..." +03000620="&Om 7-Zip..." + +; Favorites +03000710="&Legg mappe til i favorittar som" +03000720="Bokmerke" + +; Options Dialog + +03010000="Val" + +; Plugins +03010100="Tillegg" +03010101="&Tillegg:" +03010110="Val..." + +; Edit +03010200="Redigeringsprogram" +03010201="&Redigeringsprogram:" + +; System +03010300="System" +03010302="Forbind 7-Zip med:" +03010310="Tillegg" + +; Settings +03010400="Innstillingar" +03010401="Vis \"..\" element" +03010402="Vis dei ordentlege fil ikona" +03010410="Vis system meny" +03010420="&Merk heile rader" +03010421="Vis &rutenett" +03010430="&Alternativ markerings modus" +03010440="Bruk &store minnesider" + +; Strings + +03020201="Kopiere" +03020202="Flytt" +03020203="Kopiere til:" +03020204="Flytt til:" +03020205="Kopierer..." +03020206="Flyttar..." +03020207="Du kan ikkje flytta eller kopiere element i slike mapper." +03020208="Støttar ikkje handlinga." +03020209="Vel målmappe." + +03020210="Godkjenne sletting av fil" +03020211="Godkjenne sletting av mappe" +03020212="Godkjenne sletting av fleire filer" +03020213="Er du sikker på at du vil sletta '{0}'?" +03020214="Er du sikker på at du vil sletta mappa '{0}' og alt innhold i den?" +03020215="Er du sikker på at du vil sletta desse {0} elementa?" +03020216="Slettar..." +03020217="Feil ved sletting av fil eller mappe" + +03020220="Endrar namn..." +03020221="Feil ved endring av namn på fil eller mappe" +03020222="Godkjenne filkopiering" +03020223="Er du sikker på at du vil kopiere filer til arkiv" + +03020230="Opprett mappe" +03020231="Mappe namn:" +03020232="Ny mappe" +03020233="Feil ved oppretting av mappe" + +03020240="Opprett fil" +03020241="Filnamn:" +03020242="Ny fil" +03020243="Feil ved oppretting av fil" + +03020250="Marker" +03020251="Fjern markering" +03020252="Maske:" + +03020260="Mappe logg" + +03020280="Fila '{0}' blei endra.\nVil du oppdatere den i arkivet?" +03020281="Kan ikkje oppdatere fil\n'{0}'" +03020282="Kan ikkje starta redigeringsprogram." +03020283="Opnar..." + +03020290="Kommentar" +03020291="&Kommentar:" + +030202A0="System" + +03020300="Datamaskin" +03020301="Nettverk" + +03020400="Legg til" +03020401="Pakk ut" +03020402="Test" + +03020420="Kopiere" +03020421="Flytt" +03020422="Slett" +03020423="Informasjon" + +03020500="Del opp fil" +03020501="&Del opp til:" +03020510="Delar opp..." +03020520="Godkjenne oppdeling" +03020521="Er du sikker på at du vil dele opp fila i {0} delar?" +03020522="Størrelsen på delane må vera mindre enn størrelsen på originalfila" + +03020600="Slå saman filer" +03020601="&Slå saman til:" +03020610="Slår saman..." +03020620="Berre vel den første fila" + +03020710="Reknar ut kontrollnummer..." +03020720="Informasjon om kontrollnummer" +03020721="CRC kontrollnummer for data:" +03020722="CRC kontrollnummer for data og namn:" + +03020800="Undersøkjer..." + +; Computer +03031100="Total størrelse" +03031101="Ledig plass" +03031102="Klyngje størrelse" +03031103="Etikett" + +; Network +03031200="Lokalt namn" +03031201="Leverandør" + +; Benchmark Dialog + +03080000="Yting test" +03080001="Minnebruk:" +03080002="Kompresjon" +03080003="Ut-pakking" +03080004="Fart" +03080005="Yting" +03080006="Total yting" +03080007="Noverande" +03080008="Resultat" +03080009="Gonger:" +0308000A="Feil:" +0308000B="CPU bruk" +0308000C="Yting / Bruk" + +;!@LangEnd@! diff --git a/GUI/Lang/pa-in.txt b/GUI/Lang/pa-in.txt new file mode 100644 index 0000000..8214cc9 --- /dev/null +++ b/GUI/Lang/pa-in.txt @@ -0,0 +1,512 @@ +;!@Lang@!UTF-8! +; 7-Zip 4.53 +; Translated by Gurmeet Singh Kochar +; +; +; +; + +00000000="Punjabi, Indian" +00000001="ਪੰਜਾਬੀ" +00000002="70-1" + +; 7-Zip Configuration + +; Title +01000000="7-ਜ਼ਿੱਪ ਸਰੰਚਨਾ" + +; Info Page +01000100="7-ਜ਼ਿੱਪ ਬਾਰੇ" +01000103="7-ਜ਼ਿੱਪ ਇੱਕ ਮੁਫ਼ਤ ਸਾਫ਼ਟਵੇਅਰ ਹੈ। ਪਰ ਫੇਰ ਵੀ, ਤੁਸੀਂ ਰਜਿਸਟਰ ਕਰਕੇ 7-ਜ਼ਿੱਪ ਦੇ ਵਿਕਾਸ ਵਿੱਚ ਸਮਰਥਨ ਪਾ ਸੱਕਦੇ ਹੋ।\n\nਪੰਜਾਬੀ ਵਿੱਚ ਅਨੁਵਾਦ ਕੀਤਾ (Translation Done By):\nGurmeet Singh Kochar (ਗੁਰਮੀਤ ਸਿੰਘ ਕੋਚਰ)\n" +01000104="ਸਮਰਥਨ" +01000105="ਰਜਿਸਟਰ" + +; Folders Page +01000200="ਫੋਲਡਰ" +01000210="ਵਰਕਿੰਗ ਫੋਲਡਰ (&W)" +01000211="ਸਿਸਟਮ ਆਰਜ਼ੀ (temp) ਫੋਲਡਰ (&S)" +01000212="ਇਸ ਸਮੇਂ ਚੁਣਿਆ (&C)" +01000213="ਹੇਠਾਂ ਦਿੱਤਾ ਗਿਆ (&S):" +01000214="ਸਿਰਫ਼ ਹਟਾਈ ਜਾ ਸੱਕਨ ਵਾਲੀਆਂ ਡਰਾਈਵ ਲਈ ਵਰਤੋਂ ਕਰੋ" + +01000281="ਆਰਜ਼ੀ ਆਕਾਈਵ ਫਾਇਲਾਂ ਲਈ ਟਿਕਾਣਾ ਦੱਸੋ।" + +; System Page +01000300="ਸਿਸਟਮ" +01000301="ਸ਼ੈੱਲ ਕੰਨਟੈਕਸਟ ਮੇਨੂੰ ਨਾਲ 7-ਜ਼ਿੱਪ ਨੂੰ ਏਕੀਕਿਰਤ ਕਰੋ" +01000302="ਕੈਸਕੇਡਡ ਕੰਨਟੈਕਸਟ ਮੇਨੂੰ" +01000310="ਕੰਨਟੈਕਸਟ ਮੇਨੂੰ ਆਈਟਮਾਂ:" + +; Language Page +01000400="ਭਾਸ਼ਾ" +01000401="ਭਾਸ਼ਾ:" + + +; 7-Zip Explorer extension + +; Context menu +02000101="7-ਜ਼ਿੱਪ" +02000102="7-ਜ਼ਿੱਪ ਕਮਾਂਡਾਂ" +02000103="ਆਕਾਈਵ ਖੋਲੋ" +02000104="ਚੁਣੇ ਆਕਾਈਵ ਨੂੰ ਖੋਲੇਣ ਲਈ।" +02000105="ਫਾਇਲਾਂ ਕੱਡੋ..." +02000106="ਚੁਣੇ ਆਕਾਈਵ ਵਿੱਚੋਂ ਫਾਇਲਾਂ ਕੱਡਣ ਲਈ।" +02000107="ਆਕਾਈਵ ਵਿੱਚ ਸ਼ਾਮਲ ਕਰੋ..." +02000108="ਚੁਣੀਆਂ ਆਈਟਮਾਂ ਆਕਾਈਵ ਵਿੱਚ ਸ਼ਾਮਲ ਕਰਨ ਲਈ।" +02000109="ਆਕਾਈਵ ਪਰਖੋ" +0200010A="ਚੁਣੇ ਆਕਾਈਵ ਦੀ ਅਖੰਡਤਾ ਪਰਖਨ ਲਈ।" +0200010B="ਫਾਇਲਾਂ ਇੱਥੇ ਕੱਡੋ" +0200010C="ਇਸ ਵੇਲੇ ਦੇ ਫੋਲਡਰ ਵਿੱਚ ਚੁਣੇ ਆਕਾਈਵ ਵਿੱਚੋਂ ਫਾਇਲਾਂ ਕੱਡਣ ਲਈ।" +0200010D="{0} ਵਿੱਚ ਕੱਡੋ" +0200010E="ਉਪ-ਫੋਲਡਰ ਵਿੱਚ ਫਾਇਲਾਂ ਕੱਡਣ ਲਈ।" +0200010F="{0} ਵਿੱਚ ਸ਼ਾਮਲ ਕਰੋ" +02000110="ਚੁਣੀਆਂ ਆਈਟਮਾਂ ਨੂੰ ਆਕਾਈਵ ਵਿੱਚ ਸ਼ਾਮਲ ਕਰਨ ਲਈ।" +02000111="ਨਪੀੜੋ ਅਤੇ ਈਮੇਲ ਕਰੋ..." +02000112="ਚੁਣੀਆਂ ਆਈਟਮਾਂ ਨੂੰ ਆਕਾਈਵ ਵਿੱਚ ਨਪੀੜਨ ਅਤੇ ਆਕਾਈਵ ਨੂੰ ਈਮੇਲ ਰਾਂਹੀ ਭੇਜਨ ਲਈ।" +02000113="{0} ਵਿੱਚ ਨਪੀੜੋ ਅਤੇ ਈਮੇਲ ਕਰੋ" +02000114="ਚੁਣੀਆਂ ਆਈਟਮਾਂ ਨੂੰ ਆਕਾਈਵ ਵਿੱਚ ਨਪੀੜਨ ਅਤੇ ਆਕਾਈਵ ਨੂੰ ਈਮੇਲ ਰਾਂਹੀ ਭੇਜਨ ਲਈ।" + +02000140="<ਫੋਲਡਰ>" +02000141="<ਆਕਾਈਵ>" + +; Properties +02000203="ਮਾਰਗ" +02000204="ਨਾਂ" +02000205="ਐਕਸਟੈਂਸ਼ਨ" +02000206="ਫੋਲਡਰ" +02000207="ਸਾਈਜ਼" +02000208="ਪੈਕਡ ਸਾਈਜ਼" +02000209="ਲੱਛਨ" +0200020A="ਬਣਤਰ ਸਮਾਂ" +0200020B="ਪਹੁੰਚ ਸਮਾਂ" +0200020C="ਸੋਧ ਸਮਾਂ" +0200020D="ਠੋਸ" +0200020E="ਟਿੱਪਣੀ" +0200020F="ਐਨਕ੍ਰਿਪਟਡ" +02000210="Split Before" +02000211="Split After" +02000212="ਡਿਕਸ਼ਨਰੀ" +02000213="ਸੀ-ਆਰ-ਸੀ (CRC)" +02000214="ਕਿਸਮ" +02000215="ਐਂਟੀ (Anti)" +02000216="ਢੰਗ" +02000217="ਮੇਜ਼ਬਾਨ ਔ-ਐੱਸ" +02000218="ਫਾਇਲ ਸਿਸਟਮ" +02000219="ਯੂਜ਼ਰ" +0200021A="ਸਮੂਹ" +0200021B="ਬਲੋਕ" +0200021C="ਟਿੱਪਣੀ" +0200021D="ਸਥਿੱਤੀ" +0200021E="ਮਾਰਗ ਅਗੇਤਰ" +0200021F="ਫੋਲਡਰ" +02000220="ਫਾਇਲਾਂ" +02000221="ਵਰਜਨ" +02000222="ਵੋਲੁੱਮ" +02000223="ਮਲਟੀਵੋਲੁੱਮ" +02000224="ਔਫ਼ਸੈਟ" +02000225="ਲਿੰਕ" +02000226="ਬਲੋਕ" +02000227="ਵੋਲੁੱਮ" + +; Status bar +02000301="ਚੁਣੇ ਪਦਾਰਥ: {0}" +02000302="{0} ਪਦਾਰਥ" + +02000320="ਫਾਇਲਾਂ:" +02000321="ਫੋਲਡਰ:" +02000322="ਸਾਈਜ਼:" +02000323="ਨਪੀੜਤ ਸਾਈਜ਼:" +02000324="ਆਕਾਈਵਾਂ:" + +; List Context Menu +02000401="ਕਾਲਮ (&C)..." + +02000411="ਖੋਲੋ (&O)" +02000412="ਕੱਡੋ (&E)..." + +; ToolBar +02000501="ਕੱਡੋ" + +; Messages +02000601="ਅੱਪਡੇਟ ਔਪਰੇਸ਼ਨ ਇਸ ਆਕਾਈਵ ਲਈ ਸਹਿਯੋਗੀ ਨਹੀਂ ਹਨ।" +02000602="{0} ਆਕਾਈਵ ਅੱਪਡੇਟ ਨਹੀਂ ਕੀਤੀ ਜਾ ਸੱਕੀ" +02000603="'{0}' ਫੋਲਡਰ ਨਹੀਂ ਬਣਾਇਆ ਜਾ ਸੱਕਿਆ" +02000604="ਫਾਇਲ ਇੱਕ ਸਹਿਯੋਗੀ ਆਕਾਈਵ ਨਹੀਂ ਹੈ।" +02000605="ਸਮੱਸਿਆ" +02000606="ਬਹੁੱਤ ਸਾਰੀਆਂ ਆਈਟਮਾਂ" +02000607="ਦਿੱਤੀ ਗਈ ਫਾਇਲ ਐਕਸਟੈਂਸ਼ਨ ਨਾਲ ਕੋਈ ਵੀ ਕਾਰਜ ਨਹੀਂ ਜੁੜਿਆ ਹੋਇਆ ਹੈ।" +02000608="ਕੋਈ ਸਮੱਸਿਆਵਾਂ ਨਹੀਂ ਹਨ" +02000609="'{0}' ਫਾਇਲ ਨੂੰ ਆਕਾਈਵ ਤਰ੍ਹਾਂ ਨਹੀਂ ਖੋਲਿਆ ਜਾ ਸੱਕਿਆ" +0200060A="'{0}' ਐਨਕ੍ਰਿਪਟਡ ਆਕਾਈਵ ਨਹੀਂ ਖੋਲਿਆ ਜਾ ਸੱਕਿਆ। ਗਲ਼ਤ ਪਾਸਵਰਡ?" + +; Dialogs +02000702="ਠੀਕ ਹੈ" +02000705="ਹਾਂ (&Y)" +02000707="ਸਾਰਿਆਂ ਲਈ ਹਾਂ (&A)" +02000709="ਨਹੀਂ (&N)" +0200070B="ਸਾਰਿਆਂ ਲਈ ਨਹੀਂ (&l)" + +02000710="ਰੱਦ ਕਰੋ" +02000711="ਰੱਦ ਕਰੋ (&C)" +02000713="ਬੰਦ ਕਰੋ (&C)" +02000714="ਰੁਕੋ" +02000715="ਮੁੜ ਚਾਲੂ ਕਰੋ" + +02000720="ਮੱਦਦ" + +; Extract dialog +02000800="ਕੱਡੋ" +02000801="ਇੱਥੇ ਕੱਡੋ (&x):" +02000802="ਪਾਸਵਰਡ" + +02000810="ਮਾਰਗ ਢੰਗ" +02000811="ਪੂਰੇ ਮਾਰਗ ਨਾਂ" +02000812="ਇਸ ਵੇਲੇ ਦੇ ਮਾਰਗ ਨਾਂ" +02000813="ਕੋਈ ਮਾਰਗ ਨਾਂ ਨਹੀਂ" + +02000820="ਉਪਰੀਲੇਖਨ ਢੰਗ" +02000821="ਉਪਰੀਲੇਖਨ ਤੋਂ ਪਹਿਲਾਂ ਤਸਦੀਕ" +02000822="ਬਿਨ੍ਹਾਂ ਤਸਦੀਕ ਉਪਰੀਲੇਖਨ" +02000823="ਮੌਜੂਦਾ ਫਾਇਲਾਂ ਨਾਂ ਕੱਡੋ" +02000824="ਆਪੇ ਨਾਂ ਬਦਲ ਦਿਓ" +02000825="ਮੌਜੂਦਾ ਫਾਇਲਾਂ ਦਾ ਆਪੇ ਨਾਂ ਬਦਲ ਦਿਓ" + +02000830="ਫਾਇਲਾਂ" +02000831="ਚੁਣੀਆਂ ਫਾਇਲਾਂ (&S)" +02000832="ਸਾਰੀਆਂ ਫਾਇਲਾਂ (&A)" + +02000881="ਕੱਡੀਆਂ ਜਾਉਣ ਵਾਲੀਆਂ ਫਾਇਲਾਂ ਲਈ ਟਿਕਾਣਾ ਦੱਸੋ।" + +02000890="ਕੱਡੀਆਂ ਜਾ ਰਹੀਆਂ ਹਨ" + +; Overwrite dialog +02000900="ਫਾਇਲ ਬਦਲਨ ਦੀ ਤਸਦੀਕ" +02000901="ਕਾਰਵਾਈ ਕੀਤੀ ਜਾਉਂਦੀ ਫਾਇਲ ਨਿਯਤ ਫੋਲਡਰ ਵਿੱਚ ਪਹਿਲਾਂ ਹੀ ਮੌਜੂਦ ਹੈ।" +02000902="ਕੀ ਤੁਸੀਂ ਮੌਜੂਦਾ ਫਾਇਲ ਨੂੰ" +02000903="ਇਸ ਫਾਇਲ ਨਾਲ ਬਦਲਨਾ ਚਾਹੋਗੇ?" + +02000911="ਆਪੇ ਨਾਂ ਬਦਲੀ ਕਰੋ (&u)" + +02000982="{0} ਬਾਈਟ" +02000983="ਸੋਧ ਸਮਾਂ" + +; Messages dialog +02000A00="ਡਾਈਗਨੋਸਟਿੱਕ ਸੰਦੇਸ਼" + +02000A80="ਸੰਦੇਸ਼" + +02000A91="'{0}' ਲਈ ਨਪੀੜਨ ਢੰਗ ਸਹਿਯੋਗੀ ਨਹੀਂ।" +02000A92="'{0}' ਵਿੱਚ ਡਾਟਾ ਸਮੱਸਿਆ। ਫਾਇਲ ਟੁੱਟੀ ਹੋਈ ਹੈ।" +02000A93="'{0}' ਵਿੱਚ ਸੀ-ਆਰ-ਸੀ ਅਸਫ਼ਲ ਰਿਹਾ। ਫਾਇਲ ਟੁੱਟੀ ਹੋਈ ਹੈ।" +02000A94="'{0}' ਐਨਕ੍ਰਿਪਟਡ ਫਾਇਲ ਵਿੱਚ ਡਾਟਾ ਸਮੱਸਿਆ। ਗਲ਼ਤ ਪਾਸਵਰਡ?" +02000A95="'{0}' ਐਨਕ੍ਰਿਪਟਡ ਫਾਇਲ ਵਿੱਚ ਸੀ-ਆਰ-ਸੀ ਅਸਫ਼ਲ ਰਿਹਾ। ਗਲ਼ਤ ਪਾਸਵਰਡ?" + +; Password dialog +02000B00="ਪਾਸਵਰਡ ਭਰੋ" +02000B01="ਪਾਸਵਰਡ ਭਰੋ:" +02000B02="ਪਾਸਵਰਡ ਵਿਖਾਓ (&S)" +02000B03="ਪਾਸਵਰਡ ਮੁੜ ਭਰੋ:" +02000B10="ਪਾਸਵਰਡ ਮੇਲ ਨਹੀਂ ਖਾਂਦੇ" +02000B11="ਪਾਸਵਰਡ ਲਈ ਸਿਰਫ਼ ਅੰਗ੍ਰੇਜ਼ੀ ਅੱਖਰ, ਅੰਕ, ਅਤੇ ਖ਼ਾਸ ਅੱਖਰਾਂ (!, #, $, ...) ਦੀ ਹੀ ਵਰਤੋਂ ਕਰੋ" +02000B12="ਪਾਸਵਰਡ ਬਹੁੱਤ ਲੰਬਾ ਹੈ" + +; Progress dialog +02000C00="ਕਾਰਜ" +02000C01="ਬੀਤਿਆ ਸਮਾਂ:" +02000C02="ਰਹਿੰਦਾ ਸਮਾਂ:" +02000C03="ਕੁੱਲ ਸਾਈਜ਼:" +02000C04="ਗਤੀ:" +02000C05="ਨਿਬੇੜੀਆਂ ਬਾਈਟ:" +02000C06="ਨਪੀੜਨ ਅਨੁਪਾਤ:" + +02000C10="ਬੈਕਗਰਾਉਂਡ (&B)" +02000C11="ਫੋਰਗਰਾਉਂਡ (&F)" +02000C12="ਪੋਜ਼ (&P)" +02000C13="ਜਾਰੀ ਕਰੋ (&C)" + +02000C20="ਪੋਜ਼ ਹੋਇਆ" + +02000C30="ਕੀ ਤੁਸੀਂ ਨਿਸ਼ਚਿੱਤ ਹੀ ਰੱਦ ਕਰਨਾ ਚਾਹੁੰਦੇ ਹੋ?" + +; Compress dialog +02000D00="ਆਕਾਈਵ ਵਿੱਚ ਸ਼ਾਮਲ ਕਰੋ" +02000D01="ਆਕਾਈਵ (&A):" +02000D02="ਅੱਪਡੇਟ ਢੰਗ (&U):" +02000D03="ਆਕਾਈਵ ਫੌਰਮੈਟ (&f):" +02000D04="ਨਪੀੜਨ ਢੰਗ (&m):" +02000D05="ਠੋਸ ਆਕਾਈਵ ਬਣਾਓ (&S)" +02000D06="ਪੈਰਾਮੀਟਰ (&P):" +02000D07="ਚੋਣਾਂ" +02000D08="SF&X ਆਕਾਈਵ ਬਣਾਓ" +02000D09="ਮਲਟੀ-ਥਰੈਡਿੰਗ" +02000D0A="ਫਾਇਲਾਂ ਦੇ ਨਾਂ ਐਨਕ੍ਰਿਪਟ ਕਰੋ (&n)" +02000D0B="ਨਪੀੜਨ ਪੱਧਰ (&l):" +02000D0C="ਡਿਕਸ਼ਨਰੀ ਸਾਈਜ਼ (&D):" +02000D0D="ਵਰਡ ਸਾਈਜ਼(&W):" +02000D0E="ਨਪੀੜਨ ਲਈ ਮੈਮੋਰੀ ਦੀ ਵਰਤੋਂ:" +02000D0F="ਆਕਾਈਵ ਖੋਲਨ ਲਈ ਮੈਮੋਰੀ ਦੀ ਵਰਤੋਂ:" +02000D10="ਐਨਕ੍ਰਿਪਸ਼ਨ" +02000D11="ਐਨਕ੍ਰਿਪਸ਼ਨ ਢੰਗ:" +02000D12="ਸੀ-ਪੀ-ਯੂ ਥਰੈੱਡ ਗਿਣਤੀ:" +02000D13="ਠੋਸ ਬਲੋਕ ਸਾਈਜ਼:" +02000D14="ਨਾ-ਠੋਸ" +02000D15="ਠੋਸ" +02000D16="ਵਰਤੀਆਂ ਜਾਉਂਦੀਆਂ ਫਾਇਲਾਂ ਨੂੰ ਵੀ ਨਪੀੜੋ" + +02000D40="ਵੋਲੁੱਮਾਂ ਵਿੱਚ ਵੰਡੋ, ਬਾਈਟ (&v):" +02000D41="ਵੋਲੁੱਮ ਸਾਈਜ਼ ਗਲ਼ਤ ਹੈ" +02000D42="ਦਿੱਤਾ ਗਿਆ ਵੋਲੁੱਮ ਸਾਈਜ਼: {0} ਬਾਈਟ।\nਕੀ ਤੁਸੀਂ ਨਿਸ਼ਚਿੱਤ ਆਕਾਈਵ ਨੂੰ ਦਿੱਤੇ ਗਏ ਵੋਲੁੱਮਾਂ ਵਿੱਚ ਵੰਡਣਾ ਚਾਹੁੰਦੇ ਹੋ?" + +02000D81="ਸਿਰਫ਼ ਇਕੱਤਰਤਾ" +02000D82="ਆਮ" +02000D83="ਵੱਧੋਂ ਵੱਧ" +02000D84="ਤੇਜ਼" +02000D85="ਬਹੁੱਤ ਤੇਜ਼" +02000D86="ਸਭ ਤੋਂ ਵੱਧ" + +02000D90="ਬਰਾਊਜ਼" + +02000DA1="ਫਾਇਲਾਂ ਸ਼ਾਮਲ ਕਰੋ ਅਤੇ ਬਦਲੋ" +02000DA2="ਫਾਇਲਾਂ ਸ਼ਾਮਲ ਅਤੇ ਅੱਪਡੇਟ ਕਰੋ" +02000DA3="ਮੌਜੂਦਾ ਫਾਇਲਾਂ ਤਾਜ਼ਾ ਕਰੋ" +02000DA4="ਫਾਇਲਾਂ ਸਮਕਾਲਵਰਤੀ ਕਰੋ" + +02000DB1="ਸਾਰੀਆਂ ਫਾਇਲਾਂ" + +02000DC0="ਨਪੀੜਨ ਕਾਰਜ ਚੱਲ ਰਿਹਾ ਹੈ" + +; Columns dialog +02000E00="ਕਾਲਮ" +02000E01="ਉਹ ਕਾਲਮ ਚੁਣੋ ਜਿਹੜੇ ਤੁਸੀਂ ਇਸ ਫੋਲਡਰ ਵਿੱਚ ਵੇਖਣਾ ਚਾਹੁੰਦੇ ਹੋ। 'ਇੱਕ ਉੱਪਰ ਕਰੋ' ਅਤੇ 'ਇੱਕ ਨੀਚੇ ਕਰੋ' ਬਟਨਾਂ ਦੀ ਵਰਤੋਂ ਕਰਕੇ ਕਾਲਮ ਮੁੜ ਵਿਵੱਸਥਾ ਕਰ ਸੱਕਦੇ ਹੋ।" +02000E02="ਚੁਣਿਆ ਗਿਆ ਕਾਲਮ" +02000E03="ਪਿਕਸਲ ਚੌੜਾ ਹੋਏਗਾ (&w)।" + +02000E10="ਇੱਕ ਉੱਪਰ ਕਰੋ (&U)" +02000E11="ਇੱਕ ਨੀਚੇ ਕਰੋ (&D)" +02000E12="ਵਿਖਾਓ (&S)" +02000E13="ਛੁਪਾਓ (&H)" +02000E14="ਸੈਟ" + +02000E81="ਸ਼ੀਰਸ਼ਕ" +02000E82="ਚੁੜਾਈ" + +; Testing +02000F90="ਪਰਖ ਚੱਲ ਰਹੀ ਹੈ" + + +; File Manager + +03000000="7-ਜ਼ਿੱਪ ਫਾਇਲ ਮਨੇਜਰ" + +; Menu +03000102="ਫਾਇਲ (&F)" +03000103="ਸੋਧ (&E)" +03000104="ਵੇਖੋ (&V)" +03000105="ਸੰਧ (&T)" +03000106="ਮੱਦਦ (&H)" +03000107="ਪਸੰਦੀਦਾ (&a)" + +; File +03000210="ਖੋਲੋ (&O)" +03000211="ਅੰਦਰ ਖੋਲੋ (&I)" +03000212="ਬਾਹਰ ਖੋਲੋ (&u)" +03000220="ਵਿਖਾਓ (&V)" +03000221="ਸੋਧ ਕਰੋ (&E)" +03000230="ਨਾਂ ਬਦਲੋ (&m)" +03000231="ਨਵੇਂ ਟਿਕਾਣੇ ਤੇ ਨਕਲ ਉਤਾਰੋ (&C)..." +03000232="ਨਵੇਂ ਟਿਕਾਣੇ ਤੇ ਭੇਜੋ (&M)..." +03000233="ਹਟਾਓ (&D)" +03000240="ਵਿਸ਼ੇਸ਼ਤਾਵਾਂ (&r)" +03000241="ਟਿੱਪਣੀ (&n)" +03000242="ਚੈਕਸੱਮ ਗਣਨਾ ਕਰੋ" +03000250="ਫੋਲਡਰ ਬਣਾਓ" +03000251="ਫਾਇਲ ਬਣਾਓ" +03000260="ਬਾਹਰ ਨਿਕਲੋ (&x)" +03000270="ਫਾਇਲ ਹਿੱਸਿਆਂ ਵਿੱਚ ਵੰਡੋ (&S)..." +03000271="ਫਾਇਲ ਦੇ ਹਿੱਸੇ ਜੋੜੋ (&b)..." + +; Edit +03000310="ਆਖਿਰੀ ਕਾਰਵਾਈ ਨਕਾਰੋ (&U)" +03000311="ਨਕਾਰੀ ਕਾਰਵਾਈ ਮੁੜ ਕਰੋ (&R)" +03000320="ਕੱਟੋ (&t)" +03000321="ਨਕਲ ਉਤਾਰੋ (&C)" +03000322="ਚੇਪੋ (&P)" +03000323="ਹਟਾਓ (&D)" +03000330="ਸਭ ਚੁਣੋ (&A)" +03000331="ਸਭ ਚੋਣ ਰੱਦ ਕਰੋ" +03000332="ਉਲਟ ਚੋਣ ਕਰੋ (&I)" +03000333="ਚੁਣੋ..." +03000334="ਚੋਣ ਰੱਦ ਕਰੋ..." +03000335="ਕਿਸਮ ਨਾਲ ਚੁਣੋ ਕਰੋ" +03000336="ਕਿਸਮ ਨਾਲ ਚੋਣ ਰੱਦ ਕਰੋ" + +; View +03000410="ਵੱਡੇ ਆਈਕਾਨ (&g)" +03000411="ਛੋਟੇ ਆਈਕਾਨ (&m)" +03000412="ਸੂਚੀ (&L)" +03000413="ਵੇਰਵੇ ਸਹਿਤ (&D)" +03000420="ਨਾ ਕ੍ਰਮ-ਬੱਧ" +03000430="ਰੂਟ ਫੋਲਡਰ ਖੋਲੋ" +03000431="ਇੱਕ ਪੱਧਰ ਉੱਤੇ" +03000432="ਫੋਲਡਰ ਅਤੀਤ..." +03000440="ਤਾਜ਼ਾ ਕਰੋ(&R)" +03000449="ਫਲੈਟ ਦ੍ਰਿਸ਼" +03000450="&2 ਪੈਨਲ" +03000451="ਟੂਲਬਾਰ (&T)" +03000460="ਆਕਾਈਵ ਟੂਲਬਾਰ" +03000461="ਸਧਾਰਨ ਟੂਲਬਾਰ" +03000462="ਵੱਡੇ ਬਟਨ" +03000463="ਬਟਨ ਟੈਕਸਟ ਵਿਖਾਓ" + +; Tools +03000510="ਚੋਣਾਂ (&O)..." +03000511="ਬੈਂਚਮਾਰਕ (&B)" + +; Help +03000610="ਵਿਸ਼ਾ ਸੂਚੀ (&C)..." +03000620="7-ਜ਼ਿੱਪ ਬਾਰੇ (&A)..." + +; Favorites +03000710="ਫੋਲਡਰ ਪਸੰਦੀਦਾ ਵਿੱਚ ਸ਼ਾਮਲ ਕਰੋ (&A)" +03000720="ਬੁੱਕਮਾਰਕ" + +; Options Dialog + +03010000="ਚੋਣਾਂ" + +; Plugins +03010100="ਪਲੱਗ-ਇੰਨ" +03010101="ਪਲੱਗ-ਇੰਨ (&P):" +03010110="ਚੋਣਾਂ..." + +; Edit +03010200="ਐਡੀਟਰ" +03010201="ਟੈਕਸਟ ਐਡੀਟਰ (&E):" + +; System +03010300="ਸਿਸਟਮ" +03010302="7-ਜ਼ਿੱਪ ਨਾਲ ਹੇਠਾਂ ਦਿੱਤੇ ਫਾਇਲ ਐਕਸਟੈਂਸ਼ਨ ਜੋੜੋ:" +03010310="ਪਲੱਗ-ਇੰਨ" + +; Settings +03010400="ਸੈਟਿੰਗ" +03010401="\"..\" ਆਈਟਮ ਵਿਖਾਓ" +03010402="ਅਸਲੀ ਫਾਇਲ ਆਈਕਾਨ ਵਿਖਾਓ" +03010410="ਸਿਸਟਮ ਮੇਨੂੰ ਵਿਖਾਓ" +03010420="ਪੂਰੀ ਕਤਾਰ ਚੁਣੋ (&F)" +03010421="ਗ੍ਰਿਡ ਲਾਈਨਾਂ ਵਿਖਾਓ (&g)" +03010430="ਵਿਕਲਪਕ ਚੁਣਾਓ ਢੰਗ (&A)" +03010440="ਵੱਡੇ ਮੈਮੋਰੀ ਪੇਜ ਵਰਤੋ (&l)" + +; Strings + +03020201="ਨਵੇਂ ਟਿਕਾਣੇ ਤੇ ਨਕਲ ਉਤਾਰੋ" +03020202="ਨਵੇਂ ਟਿਕਾਣੇ ਤੇ ਭੇਜੋ" +03020203="ਹੇਠਾਂ ਦਿੱਤੇ ਟਿਕਾਣੇ ਤੇ ਨਕਲ ਉਤਾਰੋ:" +03020204="ਹੇਠਾਂ ਦਿੱਤੇ ਟਿਕਾਣੇ ਤੇ ਭੇਜੋ:" +03020205="ਨਕਲ ਉਤਾਰੀ ਜਾ ਰਹੀ ਹੈ..." +03020206="ਭੇਜਿਆ ਜਾ ਰਿਹਾ ਹੈ..." +03020207="ਇਹੋ ਜਿਹੇ ਫੋਲਡਰਾਂ ਲਈ ਤੁਸੀਂ ਆਈਟਮਾਂ ਨੂੰ ਨਵੇਂ ਟਿਕਾਣੇ ਤੇ ਨਾਂ ਹੀ ਭੇਜ ਸੱਕਦੇ ਹੋ ਨਾਂ ਨਕਲ ਉਤਾਰ ਸੱਕਦੇ ਹੋ।" +03020208="ਕਾਰਵਾਈ ਸਹਿਯੋਗੀ ਨਹੀਂ ਹੈ।" +03020209="ਨਿਯਤ ਫੋਲਡਰ ਚੁਣੋ" + +03020210="ਫਾਇਲ ਹਟਾਉਣ ਦੀ ਤਸਦੀਕ" +03020211="ਫੋਲਡਰ ਹਟਾਉਣ ਦੀ ਤਸਦੀਕ" +03020212="ਬਹੁ-ਫਾਈਲਾਂ ਹਟਾਉਣ ਦੀ ਤਸਦੀਕ" +03020213="'{0}' ਨੂੰ ਹਟਾਉਣਾ ਚਾਹੁੰਦੇ ਹੋ?" +03020214="ਕੀ ਤੁਸੀਂ ਨਿਸ਼ਚਿੱਤ ਫੋਲਡਰ '{0}' ਅਤੇ ਉਸਦੇ ਵਿੱਚਲੀਆਂ ਆਈਟਮਾਂ ਨੂੰ ਹਟਾਉਣਾ ਚਾਹੁੰਦੇ ਹੋ?" +03020215="ਕੀ ਤੁਸੀਂ ਨਿਸ਼ਚਿੱਤ ਇਨ੍ਹਾਂ {0} ਆਈਟਮਾਂ ਨੂੰ ਹਟਾਉਣਾ ਚਾਹੁੰਦੇ ਹੋ?" +03020216="ਹਟਾਉਣ ਦੀ ਕਾਰਵਾਈ ਚੱਲ ਰਹੀ ਹੈ..." +03020217="ਫਾਇਲ ਜਾਂ ਫੋਲਡਰ ਹਟਾਉਣ ਵਿੱਚ ਸਮੱਸਿਆ" + +03020220="ਨਾਂ ਬਦਲਿਆ ਜਾ ਰਿਹਾ ਹੈ..." +03020221="ਫਾਇਲ ਜਾਂ ਫੋਲਡਰ ਦਾ ਨਾਂ ਬਦਲਣ ਵਿੱਚ ਸਮੱਸਿਆ" +03020222="ਫਾਇਲ ਦੀ ਨਕਲ ਉਤਾਰਣ ਦੀ ਤਸਦੀਕ" +03020223="ਕੀ ਤੁਸੀਂ ਨਿਸ਼ਚਿੱਤ ਫਾਇਲਾਂ ਦੀ ਆਕਾਈਵ ਵਿੱਚ ਨਕਲ ਉਤਾਰਨਾ ਚਾਹੁੰਦੇ ਹੋ" + +03020230="ਫੋਲਡਰ ਬਣਾਓ" +03020231="ਫੋਲਡਰ ਨਾਂ:" +03020232="ਨਵਾਂ ਫੋਲਡਰ" +03020233="ਫੋਲਡਰ ਬਨਾਉਣ ਵਿੱਚ ਸਮੱਸਿਆ" + +03020240="ਫਾਇਲ ਬਣਾਓ" +03020241="ਫਾਇਲ ਨਾਂ:" +03020242="ਨਵੀਂ ਫਾਇਲ" +03020243="ਫਾਇਲ ਬਨਾਉਣ ਵਿੱਚ ਸਮੱਸਿਆ" + +03020250="ਚੁਣੋ" +03020251="ਚੋਣ ਰੱਦ ਕਰੋ" +03020252="ਮਾਸਕ:" + +03020260="ਫੋਲਡਰ ਅਤੀਤ" + +03020280="'{0}' ਫਾਇਲ ਸੋਧ ਦਿੱਤੀ ਗਈ ਹੈ।\nਕੀ ਤੁਸੀਂ ਉਸਨੂੰ ਆਕਾਈਵ ਵਿੱਚ ਅੱਪਡੇਟ ਕਰਨਾ ਚਾਹੁੰਦੇ ਹੋ?" +03020281="ਫਾਇਲ ਅੱਪਡੇਟ ਨਹੀਂ ਕੀਤੀ ਜਾ ਸੱਕੀ\n'{0}'" +03020282="ਐਡੀਟਰ ਚਾਲੂ ਨਹੀਂ ਕੀਤਾ ਜਾ ਸੱਕਿਆ।" +03020283="ਖੋਲੀ ਜਾ ਰਹੀ ਹੈ..." + +03020290="ਟਿੱਪਣੀ" +03020291="ਟਿੱਪਣੀ (&C):" + +030202A0="ਸਿਸਟਮ" + +03020300="ਕੰਪਿਊਟਰ" +03020301="ਨੈੱਟਵਰਕ" + +03020400="ਸ਼ਾਮਲ ਕਰੋ" +03020401="ਕੱਡੋ" +03020402="ਪਰਖ ਕਰੋ" + +03020420="ਨਕਲ ਉਤਾਰੋ" +03020421="ਨਵੇਂ ਟਿਕਾਣੇ ਤੇ ਭੇਜੋ" +03020422="ਹਟਾਓ" +03020423="ਜਾਣਕਾਰੀ" + +03020500="ਫਾਇਲ ਹਿੱਸਿਆਂ ਵਿੱਚ ਵੰਡੋ" +03020501="ਹੇਠਾਂ ਦਿੱਤੇ ਟਿਕਾਣੇ ਉੱਤੇ ਹਿੱਸੇ ਕਰੋ (&S):" +03020510="ਫਾਇਲ ਹਿੱਸਿਆਂ ਵਿੱਚ ਵੰਡੀ ਜਾ ਰਹੀ ਹੈ..." +03020520="ਹਿੱਸੇ ਕਰਨ ਦੀ ਤਸਦੀਕ" +03020521="ਕੀ ਤੁਸੀਂ ਨਿਸ਼ਚਿੱਤ ਫਾਇਲ ਦੇ {0} ਵੋਲੁੱਮਾਂ ਵਿੱਚ ਹਿੱਸੇ ਕਰਨਾ ਚਾਹੁੰਦੇ ਹੋ?" +03020522="ਵੋਲੁੱਮ ਸਾਈਜ਼ ਅਸਲੀ ਫਾਇਲ ਦੇ ਸਾਈਜ਼ ਤੋਂ ਛੋਟਾ ਹੋਣਾ ਚਾਹੀਦਾ ਹੈ" + +03020600="ਫਾਇਲ ਦੇ ਹਿੱਸੇ ਜੋੜੋ" +03020601="ਹੇਠਾਂ ਦਿੱਤੇ ਟਿਕਾਣੇ ਉੱਤੇ ਹਿੱਸੇ ਜੋੜੋ(&C):" +03020610="ਹਿੱਸੇ ਜੋੜੇ ਜਾ ਰਹੇ ਹਨ..." +03020620="ਸਿਰਫ਼ ਪਹਿਲੀ ਫਾਇਲ ਚੁਣੋ" + +03020710="ਚੈਕਸੱਮ ਗਣਨਾ ਕੀਤੀ ਜਾ ਰਹੀ ਹੈ..." +03020720="ਚੈਕਸੱਮ ਜਾਣਕਾਰੀ" +03020721="ਡਾਟਾ ਲਈ ਸੀ-ਆਰ-ਸੀ ਚੈਕਸੱਮ:" +03020722="ਡਾਟਾ ਅਤੇ ਨਾਮਾਂ ਲਈ ਸੀ-ਆਰ-ਸੀ ਚੈਕਸੱਮ:" + +03020800="ਸਕੈਨ ਕੀਤਾ ਜਾ ਰਿਹਾ ਹੈ..." + +03020900="ਵਿਸ਼ੇਸ਼ਤਾਵਾਂ" + +; Computer +03031100="ਕੁੱਲ ਸਾਈਜ਼" +03031101="ਖ਼ਾਲੀ ਥਾਂ" +03031102="ਕਲੱਸਟਰ ਸਾਈਜ਼" +03031103="ਲੇਬਲ" + +; Network +03031200="ਸਥਾਨਕ ਨਾਂ" +03031201="ਉਪਲੱਬਧ ਕਰਤਾ" + +; Benchmark Dialog + +03080000="ਬੈਂਚਮਾਰਕ" +03080001="ਮੈਮੋਰੀ ਵਰਤੋਂ:" +03080002="ਨਪੀੜਨ ਕਾਰਜ" +03080003="ਖੋਲਣ ਕਾਰਜ" +03080004="ਗਤੀ" +03080005="ਦਰਜ਼ਾ" +03080006="ਕੁੱਲ ਦਰਜ਼ਾ" +03080007="ਇਸ ਸਮੇਂ" +03080008="ਰੀਸੱਲਟਿੰਗ" +03080009="ਪਾਸ:" +0308000A="ਸਮੱਸਿਆਵਾਂ:" +0308000B="ਸੀ-ਪੀ-ਯੂ ਵਰਤੋਂ" +0308000C="ਦਰਜ਼ਾ / ਵਰਤੋਂ" + +;!@LangEnd@! diff --git a/GUI/Lang/pl.txt b/GUI/Lang/pl.txt new file mode 100644 index 0000000..4cbf438 --- /dev/null +++ b/GUI/Lang/pl.txt @@ -0,0 +1,543 @@ +;!@Lang@!UTF-8! +; 7-Zip 9.07 +; Translated by cienislaw, corrected by pixel +; Last versions translated by F1xat +; Corrected and updated by Łukasz Maria P. Pastuszczak +; +; + +00000000="Polish" +00000001="Polski" +00000002="21" + +; 7-Zip Configuration + +; Title +01000000="Konfiguracja programu 7-Zip" + +; Info Page +01000100="7-Zip - informacje" +01000103="7-Zip jest programem darmowym. Możesz jednak wspomóc jego rozwój poprzez rejestrację." +01000104="Wsparcie" +01000105="Rejestracja" + +; Folders Page +01000200="Foldery" +01000210="Folder roboczy" +01000211="&Systemowy folder tymczasowy" +01000212="&Bieżący" +01000213="&Wskazany:" +01000214="Użyj tylko dla dysków wymiennych" + +01000281="Wskaż lokalizację dla tymczasowych plików archiwów." + +; System Page +01000300="System" +01000301="Zintegruj program 7-Zip z menu kontekstowym powłoki" +01000302="Kaskadowe menu kontekstowe" +01000310="Elementy menu kontekstowego:" + +; Language Page +01000400="Język" +01000401="Język:" + + +; 7-Zip Explorer extension + +; Context menu +02000101="7-Zip" +02000102="Polecenia programu 7-Zip" +02000103="Otwórz archiwum" +02000104="Otwiera zaznaczone archiwum." +02000105="Wypakuj pliki..." +02000106="Wypakowuje pliki z zaznaczonego archiwum." +02000107="Dodaj do archiwum..." +02000108="Dodaje zaznaczone elementy do archiwum." +02000109="Testuj archiwum" +0200010A="Testuje integralność zaznaczonego archiwum." +0200010B="Wypakuj tutaj" +0200010C="Wypakowuje pliki z zaznaczonego archiwum do bieżącego folderu." +0200010D="Wypakuj do {0}" +0200010E="Wypakowuje pliki do podfolderu." +0200010F="Dodaj do {0}" +02000110="Dodaje zaznaczone elementy do archiwum." +02000111="Skompresuj i wyślij e-mailem..." +02000112="Kompresuje zaznaczone elementy do archiwum i wysyła je pocztą e-mail." +02000113="Skompresuj do {0} i wyślij e-mailem" +02000114="Kompresuje zaznaczone elementy do archiwum i wysyła je pocztą e-mail." + +02000140="" +02000141="" + +; Properties +02000203="Ścieżka" +02000204="Nazwa" +02000205="Rozszerzenie" +02000206="Folder" +02000207="Rozmiar" +02000208="Rozmiar po spakowaniu" +02000209="Atrybuty" +0200020A="Utworzony" +0200020B="Ostatnio otwarty" +0200020C="Zmodyfikowany" +0200020D="Ciągły" +0200020E="Z komentarzem" +0200020F="Zaszyfrowany" +02000210="Podzielony przed" +02000211="Podzielony po" +02000212="Słownik" +02000213="CRC" +02000214="Typ" +02000215="Anty" +02000216="Metoda" +02000217="Pochodzenie" +02000218="System plików" +02000219="Użytkownik" +0200021A="Grupa" +0200021B="Blok" +0200021C="Komentarz" +0200021D="Pozycja" +0200021E="Prefiks ścieżki" +0200021F="Foldery" +02000220="Pliki" +02000221="Wersja" +02000222="Wolumin" +02000223="Wielowoluminowy" +02000224="Przesunięcie" +02000225="Dowiązania" +02000226="Bloki" +02000227="Woluminy" + +02000229="64-bitowy" +0200022A="Big-endian" +0200022B="Procesor" +0200022C="Rozmiar fizyczny" +0200022D="Rozmiar nagłówków" +0200022E="Suma kontrolna" +0200022F="Charakterystyki" +02000230="Adres wirtualny" +02000231="Numer seryjny woluminu" +02000232="Krótka nazwa" +02000233="Generator" +02000234="Rozmiar sektora" +02000235="Tryb" +02000236="Dowiązanie" + +; Status bar +02000301="Zaznaczono {0} obiekt(ów)" +02000302="{0} obiekt(ów)" + +02000320="Plików:" +02000321="Folderów:" +02000322="Rozmiar:" +02000323="Rozmiar po kompresji:" +02000324="Archiwów:" + +; List Context Menu +02000401="&Kolumny..." + +02000411="&Otwórz" +02000412="&Wypakuj..." + +; ToolBar +02000501="Wypakuj" + +; Messages +02000601="Operacje aktualizacji nie są obsługiwane dla tego archiwum." +02000602="Nie można zaktualizować archiwum {0}" +02000603="Nie można utworzyć folderu „{0}”" +02000604="Plik nie jest obsługiwanym archiwum." +02000605="Błąd" +02000606="Zbyt dużo elementów" +02000607="Z określonym plikiem nie skojarzono żadnej aplikacji" +02000608="Nie wykryto błędów" +02000609="Nie można otworzyć pliku „{0}” jako archiwum" +0200060A="Nie można otworzyć zaszyfrowanego archiwum „{0}”. Nieprawidłowe hasło?" +0200060B="System nie może przydzielić wymaganej ilości pamięci" +0200060C="Nieznany błąd" +0200060D="Nieobsługiwany typ archiwum" + +; Dialogs +02000702="OK" +02000705="&Tak" +02000707="Ta&k na wszystkie" +02000709="&Nie" +0200070B="Ni&e na wszystkie" + +02000710="Anuluj" +02000711="&Anuluj" +02000713="&Zamknij" +02000714="Zatrzymaj" +02000715="Ponów" + +02000720="Pomoc" + +; Extract dialog +02000800="Wypakuj" +02000801="&Wypakuj do:" +02000802="Hasło" + +02000810="Tryb ścieżek" +02000811="Pełne ścieżki" +02000812="Względne ścieżki" +02000813="Bez ścieżek" + +02000820="Tryb nadpisywania" +02000821="Monituj przed nadpisaniem" +02000822="Nadpisuj bez monitowania" +02000823="Pomiń istniejące pliki" +02000824="Automatycznie zmień nazwy" +02000825="Aut. zmień nazwy istniejących plików" + +02000830="Pliki" +02000831="&Zaznaczone pliki" +02000832="Wszystkie &pliki" + +02000881="Wskaż lokalizację dla wypakowanych plików." + +02000890="Wypakowywanie" + +; Overwrite dialog +02000900="Potwierdź zamianę pliku" +02000901="Folder docelowy zawiera już przetwarzany plik." +02000902="Czy chcesz zamienić istniejący plik" +02000903="na następujący?" + +02000911="Automatycznie &zmień nazwy" + +02000982="{0} bajtów" +02000983="zmodyfikowany" + +; Messages dialog +02000A00="Komunikaty diagnostyczne" + +02000A80="Komunikat" + +02000A91="Nieobsługiwana metoda kompresji pliku „{0}”." +02000A92="Błąd danych w „{0}”. Plik jest uszkodzony." +02000A93="CRC nie powiodła się dla „{0}”. Plik jest uszkodzony." +02000A94="Błąd danych w zaszyfrowanym pliku „{0}”. Nieprawidłowe hasło?" +02000A95="CRC nie powiodła się dla zaszyfrowanego pliku „{0}”. Nieprawidłowe hasło?" + +; Password dialog +02000B00="Wprowadź hasło" +02000B01="Wprowadź hasło:" +02000B02="Pokaż &hasło" +02000B03="Wprowadź ponownie hasło:" +02000B10="Hasła nie zgadzają się" +02000B11="W haśle używaj tylko liter alfabetu angielskiego, cyfr i znaków specjalnych (!, #, $, ...)" +02000B12="Hasło jest zbyt długie" + +; Progress dialog +02000C00="Przetwarzanie" +02000C01="Upłynęło czasu:" +02000C02="Pozostało czasu:" +02000C03="Całkowity rozmiar:" +02000C04="Szybkość:" +02000C05="Przetworzono:" +02000C06="Współczynnik kompresji:" + +02000C10="&Tło" +02000C11="&Pierwszy plan" +02000C12="&Wstrzymaj" +02000C13="&Kontynuuj" + +02000C20="Wstrzymano" + +02000C30="Czy na pewno chcesz anulować?" + +; Compress dialog +02000D00="Dodaj do archiwum" +02000D01="&Archiwum:" +02000D02="&Tryb aktualizacji:" +02000D03="&Format archiwum:" +02000D04="&Metoda kompresji:" +02000D05="Utwórz &ciągłe archiwum" +02000D06="&Parametry:" +02000D07="Opcje" +02000D08="&Utwórz archiwum SFX" +02000D09="Wielowątkowość" +02000D0A="&Zaszyfruj nazwy plików" +02000D0B="Stopień &kompresji:" +02000D0C="&Rozmiar słownika:" +02000D0D="Rozmiar &słowa:" +02000D0E="Użycie pamięci dla kompresji:" +02000D0F="Użycie pamięci dla dekompresji:" +02000D10="Szyfrowanie" +02000D11="Metoda szyfrowania:" +02000D12="Liczba wątków:" +02000D13="Rozmiar bloku ciągłego:" +02000D14="Nieciągły" +02000D15="Ciągły" +02000D16="Kompresuj pliki współdzielone" + +02000D40="Rozmiar &woluminów (bajty):" +02000D41="Nieprawidłowy rozmiar woluminu" +02000D42="Określony rozmiar woluminu: {0} bajtów.\nCzy na pewno chcesz podzielić archiwum na takie woluminy?" + +02000D81="Bez kompresji" +02000D82="Normalna" +02000D83="Maksymalna" +02000D84="Szybka" +02000D85="Najszybsza" +02000D86="Ultra" + +02000D90="Przeglądaj" + +02000DA1="Dodaj i zamień pliki" +02000DA2="Aktualizuj i dodaj pliki" +02000DA3="Odśwież istniejące pliki" +02000DA4="Synchronizuj pliki" + +02000DB1="Wszystkie pliki" + +02000DC0="Kompresowanie" + +; Columns dialog +02000E00="Kolumny" +02000E01="Wybierz kolumny, które mają być wyświetlane w tym folderze. Do zmiany kolejności kolumn możesz użyć przycisków Przenieś w górę i Przenieś w dół." +02000E02="Wybrana kolumna powinna mieć" +02000E03="&pikseli szerokości." + +02000E10="Przenieś w &górę" +02000E11="Przenieś w &dół" +02000E12="P&okaż" +02000E13="&Ukryj" +02000E14="Ustaw" + +02000E81="Nagłówek" +02000E82="Szerokość" + +; Testing +02000F90="Testowanie" + + +; File Manager + +03000000="Menedżer plików 7-Zip" + +; Menu +03000102="&Plik" +03000103="&Edycja" +03000104="&Widok" +03000105="&Narzędzia" +03000106="Pomo&c" +03000107="&Ulubione" + +; File +03000210="&Otwórz" +03000211="Otwórz &wewnątrz" +03000212="Otwórz na &zewnątrz" +03000220="Pod&gląd" +03000221="&Edytuj" +03000230="Zmień &nazwę" +03000231="Kopiuj &do..." +03000232="&Przenieś do..." +03000233="&Usuń" +03000240="Wł&aściwości" +03000241="Ko&mentarz" +03000242="Oblicz sumę kontrolną" +03000243="Diff" +03000250="Utwórz &folder" +03000251="U&twórz plik" +03000260="Za&kończ" +03000270="Podzie&l plik..." +03000271="Złą&cz pliki..." + +; Edit +03000310="&Cofnij" +03000311="&Powtórz" +03000320="&Wytnij" +03000321="&Kopiuj" +03000322="Wkl&ej" +03000323="&Usuń" +03000330="Z&aznacz wszystko" +03000331="&Odznacz wszystko" +03000332="Odwróć &zaznaczenie" +03000333="Zaznacz..." +03000334="Odznacz..." +03000335="Zaznacz według typu" +03000336="Odznacz według typu" + +; View +03000410="&Duże ikony" +03000411="&Małe ikony" +03000412="&Lista" +03000413="&Szczegóły" +03000420="Nieposortowane" +03000430="Otwórz folder główny" +03000431="Do góry o jeden poziom" +03000432="Historia folderów..." +03000440="&Odśwież" +03000449="Widok płaski" +03000450="&2 panele" +03000451="&Paski narzędzi" +03000460="Pasek archiwum" +03000461="Pasek standardowy" +03000462="Duże przyciski" +03000463="Pokaż etykiety tekstowe" + +; Tools +03000510="&Opcje..." +03000511="&Test wydajności" + +; Help +03000610="&Zawartość" +03000620="7-Zip - i&nformacje" + +; Favorites +03000710="&Dodaj folder do ulubionych jako" +03000720="Zakładka" + +; Options Dialog + +03010000="Opcje" + +; Plugins +03010100="Wtyczki" +03010101="&Wtyczki:" +03010110="Opcje..." + +; Edit +03010200="Edytor" +03010201="&Edytor:" +03010202="&Diff:" + +; System +03010300="System" +03010302="Skojarz program 7-Zip z:" +03010310="Wtyczka" + +; Settings +03010400="Ustawienia" +03010401="Pokaż element „..”" +03010402="Pokaż prawdziwe ikony plików" +03010410="Pokaż menu systemowe" +03010420="Zaznaczaj &cały rząd" +03010421="&Pokaż linie siatki" +03010422="Pojedyncze kliknięcie otwiera element" +03010430="&Alternatywny tryb zaznaczania" +03010440="&Użyj dużych stron pamięci" + +; Strings + +03020201="Kopiuj" +03020202="Przenieś" +03020203="Kopiuj do:" +03020204="Przenieś do:" +03020205="Kopiowanie..." +03020206="Przenoszenie..." +03020207="Nie możesz kopiować ani przenosić elementów do tego folderu." +03020208="Operacja nie jest obsługiwana dla tego folderu." +03020209="Wybierz folder docelowy." + +03020210="Potwierdź usunięcie pliku" +03020211="Potwierdź usunięcie folderu" +03020212="Potwierdź usunięcie wielu plików" +03020213="Czy na pewno chcesz usunąć plik „{0}”?" +03020214="Czy na pewno chcesz usunąć folder „{0}” i całą zawartość?" +03020215="Elementów: {0} - czy na pewno chcesz je usunąć?" +03020216="Usuwanie..." +03020217="Błąd podczas usuwania pliku lub folderu" +03020218="System nie może przenieść pliku o długiej ścieżce do Kosza" + +03020220="Zmienianie nazwy..." +03020221="Błąd podczas zmiany nazwy pliku lub folderu" +03020222="Potwierdź kopiowanie plików" +03020223="Czy na pewno chcesz skopiować pliki do archiwum?" + +03020230="Utwórz folder" +03020231="Nazwa folderu:" +03020232="Nowy folder" +03020233="Błąd podczas tworzenia folderu" + +03020240="Utwórz plik" +03020241="Nazwa pliku:" +03020242="Nowy plik" +03020243="Błąd podczas tworzenia pliku" + +03020250="Zaznacz" +03020251="Odznacz" +03020252="Maska:" + +03020260="Historia folderów" + +03020280="Plik „{0}” został zmodyfikowany.\nCzy chcesz zaktualizować go w archiwum?" +03020281="Nie można zaktualizować pliku\n„{0}”" +03020282="Nie można uruchomić edytora." +03020283="Otwieranie..." +03020284="Plik wygląda na wirusa (nazwa pliku zawiera długi ciąg spacji)." + +03020290="- komentarz" +03020291="&Komentarz:" + +030202A0="System" + +03020300="Komputer" +03020301="Sieć" +03020302="Dokumenty" + +03020400="Dodaj" +03020401="Wypakuj" +03020402="Testuj" + +03020420="Kopiuj" +03020421="Przenieś" +03020422="Usuń" +03020423="Informacje" + +03020500="Podziel plik" +03020501="&Podziel do:" +03020510="Dzielenie..." +03020520="Potwierdź podział" +03020521="Czy na pewno chcesz podzielić plik na {0} woluminów?" +03020522="Rozmiar woluminu musi być mniejszy od rozmiaru oryginalnego pliku" + +03020600="Złącz pliki" +03020601="&Złącz do:" +03020610="Łączenie..." +03020620="Zaznacz tylko pierwszą część podzielonego pliku" +03020621="To nie jest poprawna część podzielonego pliku" +03020622="Nie można odnaleźć co najmniej jednej części podzielonego pliku" + +03020710="Obliczanie sumy kontrolnej..." +03020720="Informacja o sumie kontrolnej" +03020721="Suma kontrolna CRC dla danych:" +03020722="Suma kontrolna CRC dla danych i nazw:" + +03020800="Skanowanie..." + +03020900="Właściwości" + +03020A01="Operacja nie może być wywołana z folderu, który ma długą ścieżkę." +03020A02="Musisz zaznaczyć jeden plik" +03020A03="Musisz zaznaczyć jeden lub więcej plików" +03020A04="Plik {0} już istnieje" + +; Computer +03031100="Całkowity rozmiar" +03031101="Wolne miejsce" +03031102="Rozmiar klastra" +03031103="Etykieta" + +; Network +03031200="Nazwa lokalna" +03031201="Dostawca" + +; Benchmark Dialog + +03080000="Test wydajności" +03080001="Użycie pamięci:" +03080002="Kompresja" +03080003="Dekompresja" +03080004="Szybkość" +03080005="Ocena" +03080006="Całkowita ocena" +03080007="Aktualnie" +03080008="Wynik" +03080009="Przebiegi:" +0308000A="Błędy:" +0308000B="Użycie CPU" +0308000C="Ocena / Użycie" + +;!@LangEnd@! diff --git a/GUI/Lang/ps.txt b/GUI/Lang/ps.txt new file mode 100644 index 0000000..e1901bb --- /dev/null +++ b/GUI/Lang/ps.txt @@ -0,0 +1,511 @@ +;!@Lang@!UTF-8! +; 7-Zip 4.53 +; Translated by the Pathanisation Project +; pathanisation.pakhtosoft.com +; 20071226 +; + +00000000="Pashto" +00000001="پښتو" +00000002="99" + +; 7-Zip Configuration + +; Title +01000000="۷‏-زېپ سازونه" + +; Info Page +01000100="۷‏-زېپ په اړه" +01000103=".دا يو وړيا ساوتری دی. خو، په نومکښلو سره د ساوتري د پرمختګ ملاتړ کولی شئ" +01000104="ملاتړ" +01000105="نومکښل" + +; Folders Page +01000200="پوښۍ" +01000210="&کارنه پوښۍ" +01000211="&لنډمهاله غونډال پوښۍ" +01000212="&اوسنۍ" +01000213="&څانګړې" +01000214="يوازې له لېرېدونکو چليځونو لپاره کارول" + +01000281=".د لنډمهاله ارشيو دوتنو لپاره ځای وټاکئ" + +; System Page +01000300="غونډال" +01000301="۷‏-زېپ سيپۍ تړاو غورنۍ کښې زياتول" +01000302="ځړبهيزه تړاو غورنۍ" +01000310=":تړاو غورنۍ توکي" + +; Language Page +01000400="ژبه" +01000401=":ژبه" + + +; 7-Zip Explorer extension + +; Context menu +02000101="۷‏-زېپ" +02000102="۷‏-زېپ بولۍ" +02000103="ارشيو پرانيستل" +02000104=".ټاکل شوی ارشيو پرانيزي" +02000105="...دوتنې ويستل" +02000106=".د ټاکل شوي ارشيو نه دوتنې وباسي" +02000107="...ارشيو ته زياتول" +02000108=".ټاکل شوي توکي ارشيو ته زياتوي" +02000109="ارشيو ازمويل" +0200010A=".د ټاکل شوي ارشيو بشپړتيا ازمويي" +0200010B="دلته ويستل" +0200010C=".د ټاکل شوي ارشيو نه اوسنۍ پوښۍ ته دوتنې وباسي" +0200010D="ته ويستل {0}‏" +0200010E=".څېرمه پوښۍ ته دوتنې وباسي" +0200010F="ته زياتول {0}" +02000110=".ټاکل شوي توکي ارشيو ته زياتوي" +02000111="...زېرل او برېښل" +02000112=".ټاکل شوي توکي ارشيو ته زېري او د برېښلېک له لارې يې ليږي" +02000113="ته زياتول او برېښل {0}" +02000114=".ټاکل شوي توکي ارشيو ته زېري او د برېښلېک له لارې يې ليږي" + +02000140="<پوښۍ>" +02000141="<ارشيو>" + +; Properties +02000203="يونلور" +02000204="نوم" +02000205="شاتاړی" +02000206="پوښۍ" +02000207="کچ" +02000208="بنډل شوی کچ" +02000209="څانتياوې" +0200020A="جوړشوی" +0200020B="رسی" +0200020C="بدلون" +0200020D="کلک" +0200020E="څرګندون" +0200020F="کوډييز" +02000210="چول مخکښې" +02000211="چول وروسته" +02000212="ويېپانګه" +02000213="CRC" +02000214="ډول" +02000215="مخالف" +02000216="لېله" +02000217="کوربه چغ" +02000218="دوتنه غونډال" +02000219="کارن" +0200021A="ډله" +0200021B="غونډ" +0200021C="څرګندون" +0200021D="ځای" +0200021E="يونلور مختاړی" +0200021F="پوښۍ" +02000220="دوتنې" +02000221="نسخه" +02000222="ډکون" +02000223="ګڼډکون" +02000224="افسېټ" +02000225="پېوندونه" +02000226="غوڼدونه" +02000227="ډکونونه" + +; Status bar +02000301="ټاکل شوي څيزونه {0}" +02000302="څيز(ونه) '{0}'" + +02000320="دوتنې:" +02000321="پوښۍ:" +02000322=":کچ" +02000323=":زېرلی کچ" +02000324=":ارشيونه" + +; List Context Menu +02000401="...ستنې&" + +02000411="پرانيستل&" +02000412="...ويستل&" + +; ToolBar +02000501="ويستل" + +; Messages +02000601=".اوسمهاله چلښتونه دې ارشيو لپاره منلي نه دي" +02000602="ارشيو اوسمهالولی نه شي '{0}'" +02000603="پوښۍ جوړولی نه شي '{0}'" +02000604=".دوتنه منلی ارشيو نه دی" +02000605="تېروتنه" +02000606="ډېر زيات توکي" +02000607="د ورکړل شوي دوتنې نوم شاتاړي سره هېڅ کاريال مل نه دی" +02000608="هېڅ تېروتنه نشته" +02000609="'{0}' دوتنه لکه د ارشيو نه شي پرانيستلی" +0200060A="کوډييز ارشيو پرانيستلی نه شي '{0}'. ناسمه تېرنويې؟" + +; Dialogs +02000702="هوکې" +02000705="هو&" +02000707="ټولو ته هو&" +02000709="نه&" +0200070B="ټ&ولو ته نه" + +02000710="بندول" +02000711="بندول&" +02000713="بندول&" +02000714="تمول" +02000715="بياپېلول" + +02000720="مرسته" + +; Extract dialog +02000800="ويستل" +02000801=":ته و&يستل" +02000802="تېرنويې" + +02000810="يونلور اکر" +02000811="بشپړ يونلورنومونه" +02000812="اوسني يونلورنومونه" +02000813="هېڅ يونلورنومونه" + +02000820="سرليکلو اکر" +02000821="سرليکلو نه مخکښې پوښتل" +02000822="بې له پارليکې سرليکل" +02000823="شته دوتنې پرېښودل" +02000824="خپله بيانومول" +02000825="شته دوتنې خپله بيانومول" + +02000830="دوتنې" +02000831="ټاکلې دوتنې&" +02000832="ټولې دوتنې&" + +02000881=".د ويستلو دوتنو لپاره يو ځای وټاکئ" + +02000890="وباسي" + +; Overwrite dialog +02000900="دوتنه ځاېناستی باورييل" +02000901=".موخه پوښۍ دمخه بهيرلې دوتنې لري" +02000902="غواړئ چې شته دوتنه ځاېناستې کړئ" +02000903="له دې سره؟" + +02000911="خپله ب&يانومول" + +02000982="باېټه {0}" +02000983="بدل شوی په" + +; Messages dialog +02000A00="رنځ نومېرنې استوزه" + +02000A80="استوزه" + +02000A91=".لپاره نامنلې زېرنې لېله '{0}'" +02000A92=".کښې اومتوک ستونزه '{0}' دوتنه ماته ده" +02000A93=".کښې سرس پاتې راغی '{0}' دوتنه ماته ده" +02000A94="کوډييزې دوتنې '{0}' کښې اومتوک ستونزه. ناسمه تېرنويې؟" +02000A95="په کوډييزې دوتنې '{0}' کښې سرس پاتې راغی. ناسمه تېرنويې؟" + +; Password dialog +02000B00="تېرنويې وليکئ" +02000B01=":تېرنويې وليکئ" +02000B02="تېرنويې ښودل&" +02000B03=":تېرنويې بيا وليکئ" +02000B10="تېرنويې سمون نه خوري" +02000B11="تېرنويې لپاره يوازې انګريزي توري، شمېرې او ځانګړي لوښې (!, #, $, ...) وکاروئ" +02000B12="تېرنويې ډېره اوږده ده" + +; Progress dialog +02000C00="بهير" +02000C01=":تېر مهال" +02000C02=":پاتې مهال" +02000C03=":بشپړ کچ" +02000C04=":چټکتیا" +02000C05=":بهيرلی" +02000C06=":زېرلو نسبت" + +02000C10="شاليد&" +02000C11="پاسليد&" +02000C12="ځنډول&" +02000C13="پرمختلل&" + +02000C20="څنډېدلی" + +02000C30="په ډاډمنه توګه غواړئ چې بند يې کړئ؟" + +; Compress dialog +02000D00="ارشيو ته زياتول" +02000D01=":ارشيو&" +02000D02=":اوسمهاليز اکر&" +02000D03=":ارشيو بڼه&" +02000D04=":زېرنې &لېله" +02000D05="کلک ارشيو جوړول&" +02000D06=":ارزښتمني&" +02000D07="غوراوي" +02000D08="ارشيو جوړول SF&X" +02000D09="ګڼ-مزيول" +02000D0A="دوتنه &نومونه کوډييزول" +02000D0B=":زېرنې &کچه" +02000D0C=":ويېپانګې کچه&" +02000D0D=":ويې کچ&" +02000D0E=":زېرلو لپاره ياد کارونه" +02000D0F=":نازېرلو لپاره ياد کارونه" +02000D10="کوډییزونه" +02000D11=":کوډییزونې لېله" +02000D12=":د مبي مزيو شمېر" +02000D13=":کلک غونډ کچ" +02000D14="نا-کلک" +02000D15="کلک" +02000D16="ونډولې دوتنې زېرل" + +02000D40=":ډکونونو، باېټونو ته چول&" +02000D41="ناسم ډکون کچ" +02000D42=".باېټه {0} :ټاکلی ډکون کچ\nپه ډاډمنه توګه غواړئ چې ارشيو په داسې ډکونونو وويشئ؟" + +02000D81="زېرمل" +02000D82="ليوی" +02000D83="زيات" +02000D84="چټک" +02000D85="ډېر چټک" +02000D86="ډېر زيات چټک" + +02000D90="لټول" + +02000DA1="دوتنې زياتول او ځاېناستول" +02000DA2="دوتنې اوسمهالول او زياتول" +02000DA3="شته دوتنې تاندول" +02000DA4="دوتنې هممهالول" + +02000DB1="ټولې دوتنې" + +02000DC0="زېرل کيږي" + +; Columns dialog +02000E00="ستنې" +02000E01=".هغه ستنې چې په دې پوښۍ کښې يې ښکاره کول غواړئ، ټک وهئ. د ستنو بيا اوډونولو لپاره د لاندې خوځول او پورته خوځول تڼيو څخه کار واخلئ" +02000E02="ټاکل شوې ستن بايد" +02000E03=".پکسله &پلنه وي" + +02000E10="پورته& خوځول" +02000E11="لاندې خوځول&" +02000E12="ښودل&" +02000E13="پټول&" +02000E14="ټاکل" + +02000E81="سرليک" +02000E82="پلنوالی" + +; Testing +02000F90="ازموينه" + + +; File Manager + +03000000="۷‏-زېپ دوتنه سمبالګر" + +; Menu +03000102="دوتنه&" +03000103="سمون&" +03000104="ليد&" +03000105="توکي&" +03000106="مرسته&" +03000107="خ&واپوري" + +; File +03000210="پرانيستل&" +03000211="دننه& پرانيستل" +03000212="بهر پ&رانيستل" +03000220="ليد&" +03000221="سمون&" +03000230="بي&انومول" +03000231="...ته لمېسل&" +03000232="...ته خوځول&" +03000233="ړنګول&" +03000240="ځانتياوې" +03000241="څرګند&ون" +03000242="چېکسم شمېرل" +03000250="پوښۍ جوړول" +03000251="دوتنه جوړول" +03000260="و&تون" +03000270="...دوتنه چول&" +03000271="...دوتنې يوځ&ايول" + +; Edit +03000310="ناکړ&" +03000311="بياکړ&" +03000320="سکڼ&ل" +03000321="لمېسل&" +03000322="سرېښل&" +03000323="ړنګول&" +03000330="ټول ټاکل&" +03000331="ټول ناټاکل" +03000332="ټاکنه نسکورول&" +03000333="...ټاکل" +03000334="...ناټاکل" +03000335="پر ډول ټاکل" +03000336="پر ډول ناټاکل" + +; View +03000410="لو&ی انځورنونه" +03000411="و&اړه انځورنونه" +03000412="لړ&" +03000413="خبرتياوې&" +03000420="ناڼلي" +03000430="ولۍ پوښۍ پرانيستل" +03000431="يو کچه برول" +03000432="...پوښيو مخينه" +03000440="تاندول&" +03000449="پوړ ليد" +03000450="۲‏ چوکاټه&" +03000451="توکپټې&" +03000460="ارشيو توکپټه" +03000461="کره توکپټه" +03000462="لویې تڼۍ" +03000463="د تڼيو ليکنې ښودل" + +; Tools +03000510="...غوراوي&" +03000511="بنچمارک&" + +; Help +03000610="...منځپانګه&" +03000620="...۷‏-زېپ په اړه&" + +; Favorites +03000710="پوښۍ خواپورو ته زياتول لکه&" +03000720="نښه" + +; Options Dialog + +03010000="غوراوي" + +; Plugins +03010100="لګونونه" +03010101=":لګونونه&" +03010110="...غوراوي" + +; Edit +03010200="سمونګر" +03010201=":سمونګر&" + +; System +03010300="غونډال" +03010302=":له ۷‏-زېپ سره ملول" +03010310="لګون" + +; Settings +03010400="امستنې" +03010401="توکي ښودل \"..\"" +03010402="د دوتنو ريښتيني انځورنونه ښودل" +03010410="غونډال غورنۍ ښودل" +03010420="ټول کيل ټاکل&" +03010421="کرښې ښودل" +03010430="انډوليز ټاکنې اکر&" +03010440="لوی ياد مخونه کارول&" + +; Strings + +03020201="لمېسل" +03020202="خوځول" +03020203=":ته لمېسل" +03020204=":ته خوځول" +03020205="...لميسل کيږي" +03020206="...خوځيږي" +03020207=".له داسې پوښۍ لپاره توکي نه شئ خوځولی يا لمېسلی" +03020208=".چلښت منلی نه دی" +03020209=".موخه پوښۍ وټاکئ" + +03020210="دوتنې ړنګونه باورييل" +03020211="پوښۍ ړنګونه باورييل" +03020212="ګڼو دوتنو ړنګونه باورييل" +03020213="په ډاډمنه توګه '{0}' ړنګول غواړئ؟" +03020214="په ډاډمنه توګه '{0}' پوښۍ او د دې ټوله منځپانګه ړنګول غواړئ؟" +03020215="په ډاډمنه توګه دا {0} توکي ړنګول غواړئ؟" +03020216="...ړنګيږي" +03020217="دوتنې يا پوښۍ ړنګولو ستونزه" + +03020220="بيانوميږي" +03020221="دوتنې يا پوښۍ بيانومولو ستونزه" +03020222="دوتنې لمېسل باورييل" +03020223="په ډاډمنه توګه دوتنې ارشيو ته لمېسل غواړئ؟" + +03020230="پوښۍ جوړول" +03020231=":پوښۍ نوم" +03020232="نوې پوښۍ" +03020233="پوښۍ جوړولو ستونزه" + +03020240="دوتنه جوړول" +03020241=":دوتنه نوم" +03020242="نوې دوتنه" +03020243="دوتنې جوړولو ستونزه" + +03020250="ټاکل" +03020251="ناټاکل" +03020252=":وربوزۍ" + +03020260="پوښيو مخينه" + +03020280=".'{0}' دوتنه کښې بدلون راغلی\nپه ارشيو کښې يې اوسمهالول غواړئ؟" +03020281="'{0}'\nدوتنه اوسمهالولی نه شي" +03020282="سمونګر پېلولی نه شي" +03020283="...پرانيستل کيږي" + +03020290="څرګندون" +03020291=":څرګندون&" + +030202A0="غونډال" + +03020300="سولګر" +03020301="جال" + +03020400="زياتول" +03020401="ويستل" +03020402="ازمويل" + +03020420="لمېسل" +03020421="خوځول" +03020422="ړنګول" +03020423="خبرتياوې" + +03020500="دوتنه چول" +03020501=":ته چول&" +03020510="...چول کيږي" +03020520="چونه باورييل" +03020521="په ډاډمنه توګه دوتنه په {0} ډکونونو وېشل غواړئ؟" +03020522="ډکون کچ بايد د دوتنې ار کچ نه وړوکی وي" + +03020600="دوتنې يوځايول" +03020601=":ته يوځايول&" +03020610="...يوځايږي" +03020620="يوازې لمړۍ دوتنه ټاکل" + +03020710="...چېکسم شمېريږي" +03020720="چېکسم خبرتياوې" +03020721=":چېکسم CRC اومتوک لپاره" +03020722=":چېکسم CRC اومتوک او نومونو لپاره" + +03020800="...ځیريږي" + +03020900="ځانتياوې" + +; Computer +03031100="بشپړ کچ" +03031101="پاتې تشه" +03031102="ځومبک کچ" +03031103="نښکه" + +; Network +03031200="ځایي نوم" +03031201="برابروونى" + +; Benchmark Dialog + +03080000="بنچمارک" +03080001=":ياد کارونه" +03080002="زېريږي" +03080003="نازېريږي" +03080004="چټکتيا" +03080005="کچونه" +03080006="بشپړه کچونه" +03080007="اوسنی" +03080008="پايليز" +03080009=":تيريږي" +0308000A=":تېروتنه" +0308000B="مبي کارونه" +0308000C="کچونه / کارونه" + +;!@LangEnd@! diff --git a/GUI/Lang/pt-br.txt b/GUI/Lang/pt-br.txt new file mode 100644 index 0000000..894ab7c --- /dev/null +++ b/GUI/Lang/pt-br.txt @@ -0,0 +1,534 @@ +;!@Lang@!UTF-8! +; 7-Zip 4.59 +; Translated by Fabricio Biazzotto - Atualizado por Felipe +; +; +; +; + +00000000="Portuguese Brazil" +00000001="Português (Brasil)" +00000002="22-1" + +; 7-Zip Configuration + +; Title +01000000="Configuração do 7-Zip" + +; Info Page +01000100="Sobre o 7-Zip" +01000103="7-Zip é um software livre. Contudo, você pode ajudar com o seu desenvolvimento registrando-o." +01000104="Suporte" +01000105="Registrar" + +; Folders Page +01000200="Pastas" +01000210="&Pasta de trabalho" +01000211="&Pasta temporária do sistema" +01000212="&Atual" +01000213="&Especificada:" +01000214="Usar apenas para drives removíveis" + +01000281="Especifique um local para os arquivos temporários." + +; System Page +01000300="Sistema" +01000301="Integrar o 7-Zip ao menu de contexto" +01000302="Menu de contexto em cascata" +01000310="Itens do menu de contexto:" + +; Language Page +01000400="Idioma" +01000401="Idioma:" + + +; 7-Zip Explorer extension + +; Context menu +02000101="7-Zip" +02000102="Comandos do 7-Zip" +02000103="Abrir arquivo" +02000104="Abre o arquivo selecionado." +02000105="Extrair arquivos..." +02000106="Extrai o conteúdo do arquivo selecionado." +02000107="Adicionar ao arquivo..." +02000108="Adiciona os itens selecionados ao arquivo." +02000109="Testar o arquivo" +0200010A="Testa a integridade do arquivo selecionado." +0200010B="Extrair aqui" +0200010C="Extrai o conteúdo do arquivo selecionado na pasta atual." +0200010D="Extrair para {0}" +0200010E="Extrai os arquivos para uma sub-pasta." +0200010F="Adicionar para {0}" +02000110="Adiciona os itens selecionados ao arquivo." +02000111="Comprimir e enviar por email..." +02000112="Comprime os itens selecionados e envia o arquivo por e-mail." +02000113="Comprimir para {0} e enviar por email" +02000114="Comprime os itens selecionados e envia o arquivo por e-mail." + +02000140="" +02000141="" + +; Properties +02000203="Caminho" +02000204="Nome" +02000205="Extensão" +02000206="Pasta" +02000207="Tamanho" +02000208="Tamanho Compactado" +02000209="Atributos" +0200020A="Criado" +0200020B="Acessado" +0200020C="Modificado" +0200020D="Sólido" +0200020E="Comentado" +0200020F="Criptografado" +02000210="Dividir Antes" +02000211="Dividir Depois" +02000212="Dicionário" +02000213="CRC" +02000214="Tipo" +02000215="Anti" +02000216="Método" +02000217="Sistema Operacional" +02000218="Sistema de Arquivos" +02000219="Usuário" +0200021A="Grupo" +0200021B="Bloco" +0200021C="Comentário" +0200021D="Posição" +0200021E="Prefixo do Caminho" +0200021F="Pastas" +02000220="Arquivos" +02000221="Versão" +02000222="Volume" +02000223="Multivolume" +02000224="Offset" +02000225="Links" +02000226="Blocos" +02000227="Volumes" + +02000229="64 bits" +0200022A="Big-endian" +0200022B="CPU" +0200022C="Tamanho Físico" +0200022D="Tamanho dos Cabeçalhos" +0200022E="Checksum" +0200022F="Características" +02000230="Endereço Virtual" + +; Status bar +02000301="{0} objeto(s) selecionado(s)" +02000302="{0} objeto(s)" + +02000320="Arquivos:" +02000321="Pastas:" +02000322="Tamanho:" +02000323="Tamanho comprimido:" +02000324="Arquivos:" + +; List Context Menu +02000401="&Colunas..." + +02000411="&Abrir" +02000412="&Extrair..." + +; ToolBar +02000501="Extrair" + +; Messages +02000601="Operações de atualização não são suportadas por este arquivo." +02000602="Não pôde atualizar o arquivo {0}" +02000603="Não pôde criar a pasta '{0}'" +02000604="O arquivo não é suportado." +02000605="Erro" +02000606="Itens demais" +02000607="Não há nenhuma aplicação associada com o nome da extensão dado a este arquivo" +02000608="Não há erros" +02000609="Não pôde abrir o arquivo '{0}' como arquivo" +0200060A="Não pôde abrir o arquivo encriptado '{0}'. Senha errada?" +0200060B="O sistema não pôde alocar a quantidade requerida de memória" +0200060C="Erro desconhecido" +0200060D="Tipo de arquivo não suportado" + +; Dialogs +02000702="OK" +02000705="&Sim" +02000707="Sim para &Todos" +02000709="&Não" +0200070B="Não para To&dos" + +02000710="Cancelar" +02000711="&Cancelar" +02000713="&Fechar" +02000714="Parar" +02000715="Reiniciar" + +02000720="Ajuda" + +; Extract dialog +02000800="Extrair" +02000801="E&xtrair para:" +02000802="Senha" + +02000810="Modo de caminho" +02000811="Nomes dos caminhos completos" +02000812="Nomes dos caminhos atuais" +02000813="Sem nomes de caminhos" + +02000820="Modo de substituição" +02000821="Perguntar antes de sobrescrever" +02000822="Sobrescrever sem perguntar" +02000823="Pular os arquivos existentes" +02000824="Auto-renomear" +02000825="Auto-renomear os arquivos existentes" + +02000830="Arquivos" +02000831="&Arquivos selecionados" +02000832="&Todos os arquivos" + +02000881="Especifique um local para os arquivos extraídos." + +02000890="Extraindo" + +; Overwrite dialog +02000900="Confirmar a substituição dos arquivos" +02000901="A pasta destino já contém o arquivo processado." +02000902="Você gostaria de substituir o arquivo existente" +02000903="por este?" + +02000911="A&uto-Renomear" + +02000982="{0} bytes" +02000983="modificado em" + +; Messages dialog +02000A00="Mensagens de diagnóstico" + +02000A80="Mensagem" + +02000A91="Método de compressão não suportado por '{0}'." +02000A92="Erro nos dados de '{0}'. O arquivo está danificado." +02000A93="Falha no CRC de '{0}'. O arquivo está danificado." +02000A94="Erros nos dados do arquivo encriptado '{0}'. Senha errada?" +02000A95="Falha de CRC no arquivo encriptado '{0}'. Senha errada?" + +; Password dialog +02000B00="Inserir senha" +02000B01="Inserir senha:" +02000B02="&Mostrar senha" +02000B03="Re-inserir a senha:" +02000B10="As senhas não combinam" +02000B11="Usar apenas letras em Inglês, números e caracteres especiais (!, #, $, ...) para a senha" +02000B12="A senha é muito longa" + +; Progress dialog +02000C00="Processo" +02000C01="Tempo decorrido:" +02000C02="Tempo restante:" +02000C03="Tamanho total:" +02000C04="Velocidade:" +02000C05="Processado:" +02000C06="Taxa de compressão:" + +02000C10="&Em segundo plano" +02000C11="&Em primeiro plano" +02000C12="&Pausar" +02000C13="&Continuar" + +02000C20="Pausado" + +02000C30="Você tem certeza que você quer cancelar?" + +; Compress dialog +02000D00="Adicionar ao arquivo" +02000D01="&Arquivo:" +02000D02="&Modo de atualização:" +02000D03="Formato do &arquivo:" +02000D04="Método de &compressão:" +02000D05="Criar &arquivo sólido" +02000D06="&Parâmetros:" +02000D07="Opções" +02000D08="Criar ar&quivo SFX" +02000D09="Multi-processamento" +02000D0A="Criptografar os &nomes dos arquivos" +02000D0B="Nível da &compressão:" +02000D0C="&Tamanho do dicionário:" +02000D0D="&Tamanho da palavra:" +02000D0E="Uso de memória para compressão:" +02000D0F="Uso de memória para descompressão:" +02000D10="Encriptação" +02000D11="Método de encriptação:" +02000D12="Número de threads da CPU:" +02000D13="Tamanho do bloco sólido:" +02000D14="Não-sólido" +02000D15="Sólido" +02000D16="Comprimir arquivos compartilhados" + +02000D40="Dividir em &volumes, bytes:" +02000D41="Tamanho do volume incorreto" +02000D42="Tamanho do volume especificado: {0} bytes.\nVocê tem certeza que você quer dividir o arquivo em tais volumes?" + +02000D81="Armazenar" +02000D82="Normal" +02000D83="Máximo" +02000D84="Rápida" +02000D85="Mais rápida" +02000D86="Ultra" + +02000D90="Navegar" + +02000DA1="Adicionar e substituir arquivos" +02000DA2="Atualizar e adicionar arquivos" +02000DA3="Atualizar arquivos existentes" +02000DA4="Sincronizar arquivos" + +02000DB1="Todos os Arquivos" + +02000DC0="Comprimindo" + +; Columns dialog +02000E00="Colunas" +02000E01="Marque as colunas que você gostaria de tornar visíveis nesta pasta. Use os botões Mover para cima e Mover para baixo para re-ordernar as colunas." +02000E02="A coluna selecionada deve ter" +02000E03="pixels de &largura." + +02000E10="Mover para &cima" +02000E11="Mover para &baixo" +02000E12="&Mostrar" +02000E13="&Esconder" +02000E14="Definir" + +02000E81="Título" +02000E82="Largura" + +; Testing +02000F90="Testando" + + +; File Manager + +03000000="Gerenciador de Arquivos do 7-Zip" + +; Menu +03000102="&Arquivo" +03000103="&Editar" +03000104="&Ver" +03000105="&Ferramentas" +03000106="&Ajuda" +03000107="F&avoritos" + +; File +03000210="&Abrir" +03000211="Abrir &por dentro" +03000212="Abrir ex&ternamente" +03000220="&Ver" +03000221="&Editar" +03000230="Re&nomear" +03000231="&Copiar para..." +03000232="&Mover para..." +03000233="&Apagar" +03000240="P&ropriedades" +03000241="Comen&tário" +03000242="Calcular checksum" +03000250="Criar Pasta" +03000251="Criar Arquivo" +03000260="Sai&r" +03000270="&Dividir arquivo..." +03000271="Com&binar arquivos..." + +; Edit +03000310="&Desfazer" +03000311="&Refazer" +03000320="Co&rtar" +03000321="&Copiar" +03000322="&Colar" +03000323="&Apagar" +03000330="Selecionar &tudo" +03000331="Desfazer seleção" +03000332="&Inverter seleção" +03000333="Selecionar..." +03000334="Desfazer seleção..." +03000335="Selecionar por tipo" +03000336="Desfazer seleção por tipo" + +; View +03000410="Íco&nes grandes" +03000411="Íco&nes pequenos" +03000412="&Lista" +03000413="&Detalhes" +03000420="Desordenado" +03000430="Abrir a Pasta Raiz" +03000431="Subir um nível" +03000432="Histórico das Pastas..." +03000440="&Atualizar" +03000449="Visão Plana" +03000450="&2 Painéis" +03000451="&Barra de Ferramentas" +03000460="Barra de Ferramentas do Arquivo" +03000461="Barra de Ferramentas Padrão" +03000462="Botões Grandes" +03000463="Mostrar o Texto dos Botões" + +; Tools +03000510="&Opções..." +03000511="&Benchmark" + +; Help +03000610="&Conteúdo..." +03000620="&Sobre o 7-Zip..." + +; Favorites +03000710="&Adicionar a pasta aos favoritos como" +03000720="Bookmark" + +; Options Dialog + +03010000="Opções" + +; Plugins +03010100="Plugins" +03010101="&Plugins:" +03010110="Opções..." + +; Edit +03010200="Editor" +03010201="&Editor:" + +; System +03010300="Sistema" +03010302="Associar o 7-Zip com:" +03010310="Plugin" + +; Settings +03010400="Configurações" +03010401="Mostrar o item \"..\" " +03010402="Mostrar os ícones reais dos arquivos" +03010410="Mostrar o menu do sistema" +03010420="&Selecionar a linha inteira" +03010421="Mostrar as &linhas de grade" +03010430="&Modo de seleção alternativo" +03010440="Usar &grandes páginas de memória" + +; Strings + +03020201="Copiar" +03020202="Mover" +03020203="Copiar para:" +03020204="Mover para:" +03020205="Copiando..." +03020206="Movendo..." +03020207="Você não pode mover ou copiar itens para tais pastas." +03020208="A operação não é suportada." +03020209="Selecionar a pasta destino." + +03020210="Confirmar a exclusão do arquivo" +03020211="Confirmar a exclusão da pasta" +03020212="Confirmar a exclusão de múltiplos arquivos" +03020213="Você tem certeza que você quer apagar '{0}'?" +03020214="Você tem certeza que você quer apagar a pasta '{0}' e todo o seu conteúdo?" +03020215="Você tem certeza que você quer apagar estes {0} itens?" +03020216="Apagando..." +03020217="Erro ao apagar o arquivo ou pasta" +03020218="O sistema não pode mover um arquivo com caminho longo para o Recycle Bin" + +03020220="Renomeando..." +03020221="Erro ao renomear o arquivo ou pasta" +03020222="Confirmar a cópia do arquivo" +03020223="Você tem certeza que você quer copiar os arquivos para dentro do arquivo compactado?" + +03020230="Criar Pasta" +03020231="Nome da pasta:" +03020232="Nova Pasta" +03020233="Erro na Criação da Pasta" + +03020240="Criar Arquivo" +03020241="Nome do Arquivo:" +03020242="Novo Arquivo" +03020243="Erro na Criação do Arquivo" + +03020250="Selecionar" +03020251="Desfazer seleção" +03020252="Máscara:" + +03020260="Histórico das Pastas" + +03020280="O arquivo '{0}' foi modificado.\nVocê quer atualizá-lo no arquivo compactado?" +03020281="Não pôde atualizar o arquivo\n'{0}'" +03020282="Não pôde iniciar o editor." +03020283="Abrindo..." +03020284="O arquivo parece um vírus (o nome do arquivo contém espaços longos no nome)." + +03020290="Comentário" +03020291="&Comentário:" + +030202A0="Sistema" + +03020300="Computador" +03020301="Rede" +03020302="Documentos" + +03020400="Adicionar" +03020401="Extrair" +03020402="Testar" + +03020420="Copiar" +03020421="Mover" +03020422="Apagar" +03020423="Info" + +03020500="Dividir Arquivo" +03020501="&Dividir para:" +03020510="Dividindo..." +03020520="Confirmar a Divisão" +03020521="Você tem certeza de quer você dividir o arquivo em {0} volumes?" +03020522="O tamanho do volume deve ser menor do que o tamanho do arquivo original" + +03020600="Combinar Arquivos" +03020601="&Combinar para:" +03020610="Combinando..." +03020620="Selecionar apenas o primeiro arquivo" +03020621="Não pôde detectar o arquivo como parte do arquivo dividido" +03020622="Não pôde achar mais do que uma parte do arquivo dividido" + +03020710="Calculando checksum..." +03020720="Informação de checksum" +03020721="CRC checksum para dados:" +03020722="CRC checksum para dados e nomes:" + +03020800="Escaneando..." + +03020900="Propriedades" + +03020A01="A operação não pode ser chamada de uma pasta que tem um caminho longo." +03020A02="Você deve selecionar um arquivo" +03020A03="Você deve selecionar um ou mais arquivos" +03020A04="O arquivo {0} já existe" + +; Computer +03031100="Tamanho Total" +03031101="Espaço Livre" +03031102="Tamanho do Cluster" +03031103="Rótulo" + +; Network +03031200="Nome Local" +03031201="Provedor" + +; Benchmark Dialog + +03080000="Benchmark" +03080001="Uso de memória:" +03080002="Comprimindo" +03080003="Descomprimindo" +03080004="Velocidade" +03080005="Avaliação" +03080006="Total da Avaliação" +03080007="Atual" +03080008="Resultado" +03080009="Passos:" +0308000A="Erros:" +0308000B="Uso da CPU" +0308000C="Avaliação / Uso" + +;!@LangEnd@! diff --git a/GUI/Lang/pt.txt b/GUI/Lang/pt.txt new file mode 100644 index 0000000..495967a --- /dev/null +++ b/GUI/Lang/pt.txt @@ -0,0 +1,543 @@ +;!@Lang@!UTF-8! +; 7-Zip 4.46 +; Translated by Rui Costa +; 7-Zip 9.17 +; Traduzido por Sérgio Marques +; This file is distributed under the terms of LGPL V 2 +; + +00000000="Portuguese Standard" +00000001="Português" +00000002="22" + +; 7-Zip Configuration + +; Title +01000000="Configuração 7-Zip" + +; Info Page +01000100="Acerca do 7-Zip" +01000103="O 7-Zip é um programa livre." +01000104="Apoio" +01000105="Registar" + +; Folders Page +01000200="Pastas" +01000210="&Pasta de trabalho" +01000211="Pasta &temporária" +01000212="&Atual" +01000213="&Especificada:" +01000214="Utilizar só para discos amovíveis" + +01000281="Especifique a pasta para os ficheiros temporários." + +; System Page +01000300="Sistema" +01000301="Integrar 7-Zip no menu de contexto" +01000302="Menu de contexto em cascata" +01000310="Itens do menu de contexto:" + +; Language Page +01000400="Idioma" +01000401="Idioma:" + + +; 7-Zip Explorer extension + +; Context menu +02000101="7-Zip" +02000102="Comandos 7-Zip" +02000103="Abrir arquivo" +02000104="Abre o arquivo selecionado." +02000105="Extrair ficheiros..." +02000106="Extrai os ficheiros do arquivo selecionado." +02000107="Adicionar ao arquivo..." +02000108="Adiciona ao arquivo os itens selecionados." +02000109="Testar arquivo" +0200010A="Testa a integridade do arquivo selecionado." +0200010B="Extrair para aqui" +0200010C="Extrai para a pasta atual os ficheiros do arquivo selecionado." +0200010D="Extrair para {0}" +0200010E="Extrai os ficheiros para uma subpasta." +0200010F="Adicionar a {0}" +02000110="Adiciona ao arquivo os itens selecionados." +02000111="Comprimir e enviar por e-mail..." +02000112="Comprime os itens selecionados para o arquivo e envia-o por e-mail." +02000113="Comprimir para {0} e enviar por e-mail" +02000114="Comprime os itens selecionados para o arquivo e envia-o por e-mail." + +02000140="" +02000141="" + +; Properties +02000203="Destino" +02000204="Nome" +02000205="Extensão" +02000206="Pasta" +02000207="Tamanho" +02000208="Tamanho comprimido" +02000209="Atributos" +0200020A="Criado" +0200020B="Acedido" +0200020C="Modificado" +0200020D="Sólido" +0200020E="Comentado" +0200020F="Encriptado" +02000210="Separar antes" +02000211="Separar depois" +02000212="Dicionário" +02000213="CRC" +02000214="Tipo" +02000215="Anti" +02000216="Método" +02000217="Sistema operativo" +02000218="Sistema de ficheiros" +02000219="Utilizador" +0200021A="Grupo" +0200021B="Bloco" +0200021C="Comentário" +0200021D="Posição" +0200021E="Prefixo do destino" +0200021F="Pastas" +02000220="Ficheiros" +02000221="Versão" +02000222="Volume" +02000223="Multivolume" +02000224="Não definido" +02000225="Ligações" +02000226="Blocos" +02000227="Volumes" + +02000229="64-bit" +0200022A="Big-endian" +0200022B="CPU" +0200022C="Tamanho físico" +0200022D="Tamanho dos cabeçalhos" +0200022E="Checksum" +0200022F="Características" +02000230="Endereço virtual" +02000231="ID" +02000232="Abreviatura" +02000233="Criador da aplicação" +02000234="Tamanho do setor" +02000235="Modo" +02000236="Ligação" + +; Status bar +02000301="{0} objeto(s) selecionado(s)" +02000302="{0} objeto(s)" + +02000320="Ficheiros:" +02000321="Pastas:" +02000322="Tamanho:" +02000323="Tamanho do pacote:" +02000324="Arquivos:" + +; List Context Menu +02000401="&Colunas..." + +02000411="&Abrir" +02000412="&Extrair..." + +; ToolBar +02000501="Extrair" + +; Messages +02000601="Este tipo de arquivo não permite atualizações." +02000602="Não é possível atualizar {0}" +02000603="Não é possível criar a pasta '{0}'" +02000604="O ficheiro não é suportado." +02000605="Erro" +02000606="Demasiados itens" +02000607="Não existe nenhuma aplicação associada a esta extensão de ficheiro" +02000608="Não existem erros" +02000609="Não é possível abrir o ficheiro '{0}' como arquivo" +0200060A="Não é possível abrir o arquivo encriptado '{0}'. Senha errada?" +0200060B="O sistema não consegue alocar a memória necessária" +0200060C="Erro desconhecido" +0200060D="O arquivo não é suportado" + +; Dialogs +02000702="OK" +02000705="&Sim" +02000707="Sim a &tudo" +02000709="&Não" +0200070B="Não a t&udo" + +02000710="Cancelar" +02000711="&Cancelar" +02000713="&Fechar" +02000714="Parar" +02000715="Reiniciar" + +02000720="Ajuda" + +; Extract dialog +02000800="Extrair" +02000801="E&xtrair para:" +02000802="Senha" + +02000810="Modo de nome de pasta" +02000811="Nome de pastas completo" +02000812="Nome de pastas atual" +02000813="Sem nome de pastas" + +02000820="Modo de sobrescrever" +02000821="Com confirmação" +02000822="Sem confirmação" +02000823="Ignorar os ficheiros existentes" +02000824="Renomear automaticamente." +02000825="Renomear automomaticamente os ficheiros existentes" + +02000830="Ficheiros" +02000831="Ficheiros &selecionados" +02000832="&Todos os ficheiros" + +02000881="Especifique o destino para os ficheiros extraídos." + +02000890="A extrair" + +; Overwrite dialog +02000900="Confirmar a substituição do ficheiro" +02000901="A pasta já possui um ficheiro com o mesmo nome." +02000902="Deseja substituir o ficheiro existente" +02000903="por este?" + +02000911="Renomear a&utomaticamente" + +02000982="{0} bytes" +02000983="modificado em" + +; Messages dialog +02000A00="Mensagens de diagnóstico" + +02000A80="Mensagem" + +02000A91="O método de compressão é inválido para '{0}'." +02000A92="Erro de dados em '{0}'. O arquivo está danificado." +02000A93="CRC falhou em '{0}'. O arquivo está danificado." +02000A94="Erro de dados no ficheiro encriptado '{0}'. Senha errada?" +02000A95="CRC falhou no ficheiro encriptado '{0}'. Senha errada?" + +; Password dialog +02000B00="Introduza a senha" +02000B01="Introduza a senha:" +02000B02="&Mostrar senha" +02000B03="Reintroduza a senha:" +02000B10="As senhas não coincidem" +02000B11="Para a senha, utilize apenas letras Inglesas, números e os caracteres especiais (!, #, $, ...)" +02000B12="A senha é muito comprida" + +; Progress dialog +02000C00="Evolução" +02000C01="Tempo decorrido:" +02000C02="Tempo restante:" +02000C03="Tamanho:" +02000C04="Velocidade:" +02000C05="Processado:" +02000C06="Rácio de compressão:" + +02000C10="&Segundo plano" +02000C11="P&rimeiro plano" +02000C12="&Pausar" +02000C13="&Continuar" + +02000C20="Pausado" + +02000C30="Tem a certeza que quer cancelar?" + +; Compress dialog +02000D00="Adicionar ao arquivo" +02000D01="&Arquivo:" +02000D02="&Modo de atualização:" +02000D03="&Formato do arquivo:" +02000D04="Método de &compressão:" +02000D05="Criar arquivo &sólido" +02000D06="&Parâmetros:" +02000D07="Opções" +02000D08="Criar arquivo SF&X" +02000D09="Multi-processamento" +02000D0A="Encriptar &nomes de ficheiro" +02000D0B="Níve&l de compressão:" +02000D0C="Tamanho do &dicionário:" +02000D0D="&Tamanho da &alavra:" +02000D0E="Utilização de memória para compressão:" +02000D0F="Utilização de memória para descompressão:" +02000D10="Encriptação" +02000D11="Método de encriptação:" +02000D12="Nº de processos do CPU:" +02000D13="Tamanho dos blocos sólidos:" +02000D14="Não sólido" +02000D15="Sólido" +02000D16="Comprimir ficheiros partilhados" + +02000D40="Separar por &volumes, bytes:" +02000D41="Tamanho do volume incorreto" +02000D42="Tamanho do volume especificado: {0} bytes.\nTem a certeza que quer separar o arquivo em tais volumes?" + +02000D81="Sem compressão" +02000D82="Normal" +02000D83="Máxima" +02000D84="Rápida" +02000D85="A mais rápida" +02000D86="Ultra" + +02000D90="Procurar" + +02000DA1="Adicionar e substituir ficheiros" +02000DA2="Atualizar e adicionar ficheiros" +02000DA3="Atualizar ficheiros" +02000DA4="Sincronizar ficheiros" + +02000DB1="Todos os ficheiros" + +02000DC0="A comprimir" + +; Columns dialog +02000E00="Colunas" +02000E01="Selecione as colunas que pretende visíveis nesta pasta. Utilize os botões Subir e Baixar para organizar as colunas." +02000E02="A coluna seleccionada deve ter" +02000E03="&pixeis de largura." + +02000E10="&Subir" +02000E11="&Baixar" +02000E12="&Mostrar" +02000E13="&Ocultar" +02000E14="Fixar" + +02000E81="Título" +02000E82="Largura" + +; Testing +02000F90="A testar" + + +; File Manager + +03000000="Gestor de ficheiros 7-Zip" + +; Menu +03000102="&Ficheiro" +03000103="&Editar" +03000104="&Ver" +03000105="Ferramen&tas" +03000106="A&juda" +03000107="F&avoritos" + +; File +03000210="&Abrir" +03000211="Abrir &dentro" +03000212="Abrir &fora" +03000220="&Ver" +03000221="&Editar" +03000230="Reno&mear" +03000231="&Copiar para..." +03000232="&Mover para..." +03000233="Apa&gar" +03000240="P&ropriedades" +03000241="Come&ntário" +03000242="Calcular checksum" +03000243="Diff" +03000250="Criar pasta" +03000251="Criar ficheiro" +03000260="Sa&ir" +03000270="&Separar ficheiro..." +03000271="Com&binar ficheiros..." +; Edit +03000310="&Desfazer" +03000311="&Refazer" +03000320="Cor&tar" +03000321="&Copiar" +03000322="C&olar" +03000323="&Apagar" +03000330="Selecionar &tudo" +03000331="Desselecionar tudo" +03000332="&Inverter seleção" +03000333="Selecionar..." +03000334="Desselecionar..." +03000335="Selecionar por tipo" +03000336="Desselecionar por tipo" + +; View +03000410="Ícones &grandes" +03000411="Ícones &pequenos" +03000412="&Lista" +03000413="&Detalhes" +03000420="Sem ordem" +03000430="Abrir pasta root" +03000431="Subir um nível" +03000432="Histórico de pastas..." +03000440="&Atualizar" +03000449="Vista plana" +03000450="&2 painéis" +03000451="&Barras de ferramentas" +03000460="Barra de ferramentas do arquivo" +03000461="Barra de ferramentas padrão" +03000462="Botões grandes" +03000463="Mostrar legenda dos botões" + +; Tools +03000510="&Opções..." +03000511="&Avaliação" + +; Help +03000610="&Conteúdo..." +03000620="&Acerca do 7-Zip..." + +; Favorites +03000710="&Adicionar pasta aos favoritos como" +03000720="Marcador" + +; Options Dialog + +03010000="Opções" + +; Plugins +03010100="Plug-ins" +03010101="&Plug-ins:" +03010110="Opções..." + +; Edit +03010200="Editor" +03010201="&Editor:" +03010202="&Diff:" + +; System +03010300="Sistema" +03010302="Associar 7-Zip com:" +03010310="Plug-in" + +; Settings +03010400="Definições" +03010401="Mostrar item \"..\" " +03010402="Mostrar ícones reais dos ficheiros" +03010410="Mostrar menu do sistema" +03010420="Seleção de linha &completa" +03010421="Mostrar linhas da &grelha" +03010422="Clique único para abrir um item" +03010430="Modo de seleção &alternativo" +03010440="Utilizar páginas de &memória grandes" + +; Strings + +03020201="Copiar" +03020202="Mover" +03020203="Copiar para:" +03020204="Mover para:" +03020205="Copiando..." +03020206="Movendo..." +03020207="Não pode copiar ou mover ficheiros para essas pastas." +03020208="Operação não suportada." +03020209="Selecione a pasta de destino." + +03020210="Confirmar a eliminação de ficheiro" +03020211="Confirmar a eliminação de pasta" +03020212="Confirmar a eliminação de múltiplos ficheiros" +03020213="Tem a certeza que quer eliminar '{0}'?" +03020214="Tem a certeza que quer eliminar a pasta '{0}' e todo o seu conteúdo?" +03020215="Tem a certeza que quer eliminar {0} itens?" +03020216="A eliminar..." +03020217="Erro ao eliminar ficheiro ou pasta" +03020218="O sistema não consegue mover para a reciclagem um ficheiro com um caminho longo" + +03020220="A renomear..." +03020221="Erro ao renomear ficheiro ou pasta" +03020222="Confirmar a cópia de ficheiros" +03020223="Tem a certeza que quer copiar os ficheiros para o arquivo?" + +03020230="Criar pasta" +03020231="Nome da pasta:" +03020232="Nova pasta" +03020233="Erro ao criar pasta" + +03020240="Criar ficheiro" +03020241="Nome do ficheiro:" +03020242="Novo ficheiro" +03020243="Erro ao criar ficheiro" + +03020250="Selecionar" +03020251="Desselecionar" +03020252="Máscara:" + +03020260="Histórico de pastas" + +03020280="O ficheiro '{0}' foi modificado.\nDeseja atualizá-lo no arquivo?" +03020281="Não foi possível atualizar o ficheiro\n'{0}'" +03020282="Não foi possível iniciar o editor." +03020283="A abrir..." +03020284="Dá a sensação que o ficheiro possa ser um vírus (o nome do ficheiro contém muitos espaços em branco)." + +03020290="Comentário" +03020291="&Comentário:" + +030202A0="Sistema" + +03020300="Computador" +03020301="Rede" +03020302="Documentos" + +03020400="Adicionar" +03020401="Extrair" +03020402="Testar" + +03020420="Copiar" +03020421="Mover" +03020422="Apagar" +03020423="Info" + +03020500="Separar ficheiro" +03020501="&Separar para:" +03020510="A separar..." +03020520="Confirmar separação" +03020521="Tem a certeza que quer separar o ficheiro em {0} volumes?" +03020522="O tamanho do volume tem de ser inferior ao tamanho do ficheiro original" + +03020600="Combinar ficheiros" +03020601="&Combinar para:" +03020610="A combinar..." +03020620="Selecione apenas o primeiro ficheiro" +03020621="Não foi possivel detetar o ficheiro como parte do ficheiro dividido" +03020622="Não foi possível encontrar mais que uma parte do ficheiro dividido" + +03020710="A calcular o checksum..." +03020720="Informação do checksum" +03020721="CRC checksum para dados:" +03020722="CRC checksum para dados e nome:" + +03020800="A pesquisar..." + +03020900="Propriedades" + +03020A01="A operação não pode ser invocada a partir de uma pasta com um longo caminho." +03020A02="Tem que selecionar um ficheiro" +03020A03="Tem que selecionar um ou mais ficheiros" +03020A04="Já existe o ficheiro {0}" +; Computer +03031100="Tamanho total" +03031101="Espaço livre" +03031102="Tamanho do cluster" +03031103="Etiqueta" + +; Network +03031200="Nome local" +03031201="Fornecedor" + +; Benchmark Dialog + +03080000="Avaliação" +03080001="Utilização de memória:" +03080002="Comprimindo" +03080003="Descomprimindo" +03080004="Velocidade" +03080005="Avaliação" +03080006="Avaliação global" +03080007="Atual" +03080008="Resultante" +03080009="Passagens:" +0308000A="Erros:" +0308000B="Utilização do CPU" +0308000C="Avaliação/Utilização" + +;!@LangEnd@! + + diff --git a/GUI/Lang/ro.txt b/GUI/Lang/ro.txt new file mode 100644 index 0000000..c13bca4 --- /dev/null +++ b/GUI/Lang/ro.txt @@ -0,0 +1,534 @@ +;!@Lang@!UTF-8! +; 7-Zip 4.59 +; Translated by Lucian Nan ( http://www.prizeeinternational.com) +; +; +; +; + +00000000="Romanian" +00000001="Română" +00000002="24" + +; 7-Zip Configuration + +; Title +01000000="Configuraţia 7-Zip" + +; Info Page +01000100="Despre 7-Zip" +01000103="7-Zip este un program gratuit. Oricum, poţi contribui la dezvoltarea 7-Zip înregistrându-te." +01000104="Suport tehnic" +01000105="Înregistrează" + +; Folders Page +01000200="Directoare" +01000210="&Directorul de lucru" +01000211="Directorul &tempotar al sistemului" +01000212="&Actual" +01000213="&Specificat:" +01000214="Utilizează numai pentru discurile detaşabile" + +01000281="Specifică o destinaţie pentru arhivele temporare." + +; System Page +01000300="Sistem" +01000301="Integrează 7-Zip în contextul meniului shell" +01000302="Contextul meniului în cascadă" +01000310="Obiectele meniului:" + +; Language Page +01000400="Limba" +01000401="Limba:" + + +; 7-Zip Explorer extension + +; Context menu +02000101="7-Zip" +02000102="Comenzi 7-Zip" +02000103="Deschide arhiva" +02000104="Deschide arhivele selectate." +02000105="Dezarhivează fişierele..." +02000106="Dezarhivează fişierele din arhiva selectată." +02000107="Adaugă într-o arhivă..." +02000108="Adaugă obiectele selectate într-o arhivă." +02000109="Testează arhiva" +0200010A="Testează integritatea arhivei selectate." +0200010B="Dezarhivează aici" +0200010C="Dezarhivează fişierele din arhiva selectată în directorul actual." +0200010D="Dezarhivează în {0}" +0200010E="Dezarhivează fişierele în subdirector." +0200010F="Adaugă în {0}" +02000110="Adaugă obiectele selectate într-o arhivă." +02000111="Arhivează şi trimite email..." +02000112="Arhivează obiectele selectate într-o arhivă şi trimite-o prin email." +02000113="Arhivează în {0} şi trimite email" +02000114="Arhivează obiectele selectate într-o arhiva şi trimite-o prin email." + +02000140="" +02000141="" + +; Properties +02000203="Calea" +02000204="Nume" +02000205="Extensie" +02000206="Director" +02000207="Mărime" +02000208="Mărimea pachetului" +02000209="Atribute" +0200020A="Creată" +0200020B="Accesată" +0200020C="Modificată" +0200020D="Solidă" +0200020E="Comentat" +0200020F="Criptat" +02000210="Împarte înainte" +02000211="Împarte după" +02000212="Dicţionar" +02000213="CRC" +02000214="Tip" +02000215="Anti" +02000216="Metoda" +02000217="SO gazdă" +02000218="Fişier de sistem" +02000219="Utilizator" +0200021A="Grup" +0200021B="Blochează" +0200021C="Comentariu" +0200021D="Poziţia" +0200021E="Prefixul destinaţiei" +0200021F="Directoare" +02000220="Fişiere" +02000221="Versiunea" +02000222="Volum" +02000223="Multivolume" +02000224="Ofset" +02000225="Legături" +02000226="Blocuri" +02000227="Volume" + +02000229="64-bit" +0200022A="Big-endian" +0200022B="CPU" +0200022C="Mărime fizică" +0200022D="Mărimea antetelor" +0200022E="Checksum" +0200022F="Caracteristici" +02000230="Adresa virtuală" + +; Status bar +02000301="{0} obiect(e) selectat(e)" +02000302="{0} obiect(e)" + +02000320="Fişiere:" +02000321="Directoare:" +02000322="Mărime:" +02000323="Mărimea comprimată:" +02000324="Arhive:" + +; List Context Menu +02000401="&Coloane..." + +02000411="&Deschide" +02000412="De&zarhivează..." + +; ToolBar +02000501="Dezarhivează" + +; Messages +02000601="Operaţiile de actualizare nu sunt suportate pentru această arhivă." +02000602="Nu pot actualiza arhiva {0}" +02000603="Nu pot crea directorul '{0}'" +02000604="Fişierul nu este o arhivă suportată." +02000605="Eroare" +02000606="Prea multe obiecte" +02000607="Nu este nici o aplicaţie asociată cu extensia fişierului dat" +02000608="Nu sunt erori" +02000609="Nu pot deschide fişierul '{0}' ca arhivă" +0200060A="Nu pot deschide arhiva criptată '{0}'. Parola greşită?" +0200060B="Sistemul nu poate aloca memoria necesară" +0200060C="Eroare necunoscută" +0200060D="Tip de arhivă nesuportat" + +; Dialogs +02000702="Bine" +02000705="&Da" +02000707="Da, pe &toate" +02000709="&Nu" +0200070B="N&ici unul" + +02000710="Anulare" +02000711="&Anulare" +02000713="&Închide" +02000714="Opreşte" +02000715="Restartează" + +02000720="Ajutor" + +; Extract dialog +02000800="Dezarhivează" +02000801="Dezarhivează în:" +02000802="Parola" + +02000810="Modul destinaţie" +02000811="Numele întreg al destinaţiei" +02000812="Destinaţia actuală" +02000813="Fără locaţie" + +02000820="Modul de înlocuire" +02000821="Întreabă înainte de a înlocui" +02000822="Înlocuieşte fară a întreba" +02000823="Sări peste fişierele existente" +02000824="Auto redenumire" +02000825="Auto redenumeşte fişierele existente" + +02000830="Fişiere" +02000831="Fişierele &selectate" +02000832="&Toate fişierele" + +02000881="Specifică o destinaţie pentru fişierele dezarhivate." + +02000890="Dezarhivez" + +; Overwrite dialog +02000900="Aprobă înlocuirea fişierului" +02000901="Fişierul există deja în directorul destinaţie." +02000902="Doriţi să înlocuiţi fişierul existent" +02000903="cu acesta?" + +02000911="A&uto redenumire" + +02000982="{0} octeţi" +02000983="modifcat pe" + +; Messages dialog +02000A00="Mesaje de diagnosticare" + +02000A80="Mesaj" + +02000A91="Metodă de arhivare nesuportată pentru '{0}'." +02000A92="Eroare de date la '{0}'. Fişierul este corupt." +02000A93="Verificarea CRC a eşuat pentru '{0}'. Fişierul este corupt." +02000A94="Erori de date la fişierul criptat '{0}'. Parolă greşită?" +02000A95="Verificarea CRC a eşuat pentru fişierul criptat '{0}'. Parolă greşită?" + +; Password dialog +02000B00="Introdu parola" +02000B01="Introdu parola:" +02000B02="&Arată parola" +02000B03="Reintrodu parola:" +02000B10="Parolele nu sunt identice" +02000B11="Utilizaţi numai litere, cifre şi caracterele speciale (!, #, $, ...) pentru parolă" +02000B12="Parola este prea lungă" + +; Progress dialog +02000C00="Procesare" +02000C01="Timp trecut:" +02000C02="Timp rămas:" +02000C03="Mărimea:" +02000C04="Viteza:" +02000C05="Procesat:" +02000C06="Rata de comprimare:" + +02000C10="În &fundal" +02000C11="La &suprafaţă" +02000C12="&Pauză" +02000C13="&Continuă" + +02000C20="În pauză" + +02000C30="Eşti sigur că vrei să anulezi?" + +; Compress dialog +02000D00="Adaugă într-o arhivă" +02000D01="&Arhivează:" +02000D02="Modul de a&ctualizare:" +02000D03="&Formatul arhivei:" +02000D04="&Metoda de arhivare:" +02000D05="Crează arhivă &solidă" +02000D06="&Parametri:" +02000D07="Opţiuni" +02000D08="Crează arhivă SF&X" +02000D09="Mai multe fire de execuţie" +02000D0A="Criptează &numele fişierului" +02000D0B="&Nivel de arhivare:" +02000D0C="Mărimea &dicţionarului:" +02000D0D="Mărimea &cuvântului:" +02000D0E="Memorie utilizată pentru arhivare:" +02000D0F="Memorie utilizată pentru dezarhivare:" +02000D10="Criptare" +02000D11="Metoda de criptare:" +02000D12="Numărul de procesoare utilizate:" +02000D13="Mărimea blocului solid:" +02000D14="NEsolid" +02000D15="Solid" +02000D16="Arhivează fişierele partajate" + +02000D40="Împarte în &volume, octeţi:" +02000D41="Dimensiunea volumului este incorectă" +02000D42="Dimensiunea volumului specificat: {0} octeţi.\nEşti sigur că vrei să împarţi arhiva în mai multe volume (părţi)?" + +02000D81="Stochează" +02000D82="Normală" +02000D83="Maximă" +02000D84="Rapidă" +02000D85="Imediată" +02000D86="Ultra" + +02000D90="Caută" + +02000DA1="Adaugă şi înlocuieşte fişierele" +02000DA2="Actualizează şi adaugă fişierele" +02000DA3="Actualizează fişierele existente" +02000DA4="Sincronizează fişierele" + +02000DB1="Toate fişierele" + +02000DC0="Arhivare" + +; Columns dialog +02000E00="Coloane" +02000E01="Bifează coloanele pe care vrei să le faci vizibile în acest director. Utilizează butoanele Mută sus şi Mută jos pentru a reordona coloanele." +02000E02="Coloana selectată poate fi" +02000E03="puncte &mari." + +02000E10="Mută &sus" +02000E11="Mută &jos" +02000E12="&Arată" +02000E13="As&cunde" +02000E14="S&etează" + +02000E81="Titlu" +02000E82="Lăţime" + +; Testing +02000F90="Testez" + + +; File Manager + +03000000="Managerul de fişiere 7-Zip" + +; Menu +03000102="&Fişier" +03000103="&Editează" +03000104="&Vizualizează" +03000105="&Unelte" +03000106="&Ajutor" +03000107="F&avorite" + +; File +03000210="&Deschide" +03000211="Deschide î&n" +03000212="Deschide în &afară" +03000220="&Vizualizeză" +03000221="&Editează" +03000230="&Redenumeşte" +03000231="&Copiază la..." +03000232="&Mută la..." +03000233="Şter&ge" +03000240="&Proprietăţi" +03000241="Comen&tariu" +03000242="Calculează suma de verificare" +03000250="Crează director" +03000251="Crează fişier" +03000260="&Ieşire" +03000270="Împarte &fişierul..." +03000271="&Uneşte fişierele..." + +; Edit +03000310="Ca anterior (&Undo)" +03000311="&Repetă (Redo)" +03000320="&Taie" +03000321="&Copiază" +03000322="&Lipeşte" +03000323="Şter&ge" +03000330="&Selectează tot" +03000331="&Deselectează tot" +03000332="&Inversează selecţia" +03000333="Selectează..." +03000334="Deselectează..." +03000335="Selectează după tip" +03000336="Deselectează după tip" + +; View +03000410="Iconiţe m&ari" +03000411="Iconiţe m&ici" +03000412="&Listă" +03000413="&Detalii" +03000420="Nesortat" +03000430="Deschide directorul rădăcină" +03000431="Un nivel mai sus" +03000432="Istoria directoarelor..." +03000440="&Împrospătează" +03000449="Vedere plană" +03000450="&2 panouri" +03000451="Bare de &unelte" +03000460="Bara de arhivare" +03000461="Bara de unelte standard" +03000462="Butoane mari" +03000463="Arată textul butoanelor" + +; Tools +03000510="&Opţiuni..." +03000511="&Banc de încercare" + +; Help +03000610="&Conţinut..." +03000620="&Despre 7-Zip..." + +; Favorites +03000710="&Adaugă directorul în Favorite ca" +03000720="Semn de carte" + +; Options Dialog + +03010000="Opţiuni" + +; Plugins +03010100="Plugin-uri" +03010101="&Plugin-uri:" +03010110="Opţiuni..." + +; Edit +03010200="Editor" +03010201="&Editor:" + +; System +03010300="Sistem" +03010302="Asociază 7-Zip cu:" +03010310="Plugin" + +; Settings +03010400="Setări" +03010401="Arată \"..\" obiect" +03010402="Arată iconiţele reale ale fişierului" +03010410="Arată meniul sistemului" +03010420="Selectează &tot rândul" +03010421="Arată liniile de ghidare" +03010430="Mod de selectare &alternativă" +03010440="Utilizează pagini &mari de memorie" + +; Strings + +03020201="Copiază" +03020202="Mută" +03020203="Copiază la:" +03020204="Mută la:" +03020205="Copiez..." +03020206="Mut..." +03020207="Nu poţi muta sau copia obiectele în aceleaşi directoare." +03020208="Operaţia nu este suportată." +03020209="Alege directorul destinaţie." + +03020210="Aprobă ştergerea fişierului" +03020211="Aprobă ştergerea directorului" +03020212="Aprobă ştergerea mai multor fişiere" +03020213="Eşti sigur că vrei să ştergi '{0}'?" +03020214="Eşti sigur că vrei să ştergi directorul '{0}' şi tot conţinutul lui?" +03020215="Eşti sigur că vrei să ştergi aceste {0} obiecte?" +03020216="Şterg..." +03020217="Eroare la ştergerea fişierului sau directorului" +03020218="Sistemul nu poate muta un fişier cu cale lungă la Coşul de gunoi" + +03020220="Redenumesc..." +03020221="Eroare la redenumirea fişierului sau directorului" +03020222="Aprobă copierea fişierului" +03020223="Eşti sigur că vrei să copiezi fişierele în arhivă" + +03020230="Crează director" +03020231="Numele directorului:" +03020232="Director nou" +03020233="Eroare la crearea directorului" + +03020240="Crează fişier" +03020241="Numele fişierului:" +03020242="Fişier nou" +03020243="Eroare la crearea fişierului" + +03020250="Selectează" +03020251="Deselectează" +03020252="Masca:" + +03020260="Istoria directoarelor" + +03020280="Fişierul '{0}' a fost modificat.\nDoreşti să îl actualizez în arhivă?" +03020281="Nu pot actualiza fişierul\n'{0}'" +03020282="Nu pot porni editorul." +03020283="Deschid..." +03020284="The file looks like a virus (the file name contains long spaces in name)." + +03020290="Comentariu" +03020291="&Comentariu:" + +030202A0="Sistem" + +03020300="Computer" +03020301="Reţea" +03020302="Documente" + +03020400="Arhivează" +03020401="Dezarhivează" +03020402="Testează" + +03020420="Copiază" +03020421="Mută" +03020422="Şterge" +03020423="Info" + +03020500="Împarte fişierul" +03020501="Î&mparte în:" +03020510="Împart..." +03020520="Confirmă împărţirea" +03020521="Eşti sigur că vrei să imparţi arhiva în {0} volume (părţi)?" +03020522="Dimensiunea volumului trebuie să fie mai mică decât dimensiunea fişierului original" + +03020600="Uneşte fişierele" +03020601="&Uneşte în:" +03020610="Unesc..." +03020620="Alege doar prima parte din fişierul împărțit" +03020621="Nu pot detecta fișierul ca parte a fișierului împărțit" +03020622="Nu găsesc mai mult de o parte din fișierul împărțit" + +03020710="Calculez suma de control..." +03020720="Informaţii despre suma de control" +03020721="Suma de control CRC pentru conţinut:" +03020722="Suma de control CRC pentru conţinut şi nume:" + +03020800="Citesc..." + +03020900="Proprietăţi" + +03020A01="Operația nu poate fi apelată dintr-un director cu cale lungă." +03020A02="Trebuie să alegi un fișier" +03020A03="Trebuie să alegi unul sau mai multe fișiere" +03020A04="Fișierul {0} există deja" + +; Computer +03031100="Mărimea totală" +03031101="Spaţiu liber" +03031102="Mărimea grupului" +03031103="Etichetă" + +; Network +03031200="Nume local" +03031201="Distribuitor" + +; Benchmark Dialog + +03080000="Banc de încercare" +03080001="Memorie utilizată:" +03080002="Arhivez" +03080003="Dezarhivez" +03080004="Viteza" +03080005="Rata" +03080006="Rata totală" +03080007="Actual" +03080008="Rezultate" +03080009="Trecute:" +0308000A="Erori:" +0308000B="Utilizarea procesorului" +0308000C="Rata / Utilizare" + +;!@LangEnd@! diff --git a/GUI/Lang/ru.txt b/GUI/Lang/ru.txt new file mode 100644 index 0000000..506f917 --- /dev/null +++ b/GUI/Lang/ru.txt @@ -0,0 +1,543 @@ +;!@Lang@!UTF-8! +; 7-Zip 9.07 +; Translated by Igor Pavlov +; +; +; +; + +00000000="Russian" +00000001="Русский" +00000002="25" + +; 7-Zip Configuration + +; Title +01000000="7-Zip - Конфигурация" + +; Info Page +01000100="О программе 7-Zip" +01000103="7-Zip является свободно распространяемой программой." +01000104="Поддержка" +01000105="Зарегистрировать" + +; Folders Page +01000200="Папки" +01000210="&Рабочая папка" +01000211="&Системная временная папка" +01000212="&Текущая" +01000213="&Задать:" +01000214="Использовать только для сменных носителей" + +01000281="Укажите положение для временных архивов." + +; System Page +01000300="Система" +01000301="Встроить 7-Zip в контекстное меню оболочки" +01000302="Каскадное контекстное меню" +01000310="Элементы контекстного меню:" + +; Language Page +01000400="Язык" +01000401="Язык:" + + +; 7-Zip Explorer extension + +; Context menu +02000101="7-Zip" +02000102="Команды 7-Zip." +02000103="Открыть архив" +02000104="Открытие выделенного архива." +02000105="Распаковать" +02000106="Извлечение файлов из выделенного архива." +02000107="Добавить к архиву..." +02000108="Добавить выделенные объекты к архиву." +02000109="Тестировать" +0200010A="Тестирование выделенного архива." +0200010B="Распаковать здесь" +0200010C="Извлечение файлов из выделенного архива в текущую папку." +0200010D="Распаковать в {0}" +0200010E="Извлечение файлов в подкаталог." +0200010F="Добавить к {0}" +02000110="Добавить выделенные объекты к архиву." +02000111="Сжать и отправить по email..." +02000112="Сжать выделенные объекты и отправить архив по email." +02000113="Сжать в {0} и отправить по email" +02000114="Сжать выделенные объекты и отправить архив по email." + +02000140="<Папка>" +02000141="<Архив>" + +; Properties +02000203="Путь" +02000204="Имя" +02000205="Расширение" +02000206="Папка" +02000207="Размер" +02000208="Сжатый" +02000209="Атрибуты" +0200020A="Создан" +0200020B="Открыт" +0200020C="Изменен" +0200020D="Непрерывный" +0200020E="Комментарий" +0200020F="Зашифрован" +02000210="Разбит До" +02000211="Разбит После" +02000212="Словарь" +02000213="CRC" +02000214="Тип" +02000215="Анти" +02000216="Метод" +02000217="Система" +02000218="Файловая Система" +02000219="Пользователь" +0200021A="Группа" +0200021B="Блок" +0200021C="Комментарий" +0200021D="Позиция" +0200021E="Путь" +0200021F="Папок" +02000220="Файлов" +02000221="Версия" +02000222="Том" +02000223="Многотомный" +02000224="Смещение" +02000225="Ссылок" +02000226="Блоков" +02000227="Томов" + +02000229="64-bit" +0200022A="Big-endian" +0200022B="Процессор" +0200022C="Физический Размер" +0200022D="Размер Заголовков" +0200022E="Контрольная Сумма" +0200022F="Характеристики" +02000230="Виртуальный Адрес" +02000231="ID" +02000232="Короткое Имя" +02000233="Создатель" +02000234="Размер Сектора" +02000235="Режим" +02000236="Ссылка" + +; Status bar +02000301="Выделено объектов: {0}" +02000302="{0} объект(ов)" + +02000320="Файлов:" +02000321="Папок:" +02000322="Размер:" +02000323="Сжатый:" +02000324="Архивов:" + +; List Context Menu +02000401="&Столбцы..." + +02000411="&Открыть" +02000412="&Извлечь..." + +; ToolBar +02000501="Извлечь" + +; Messages +02000601="Операции изменения не поддерживаются для этого архива." +02000602="Не удалось изменить архив {0}" +02000603="Не удалось создать папку '{0}'" +02000604="Файл не является поддерживаемым архивом." +02000605="Ошибка" +02000606="Слишком много элементов" +02000607="Нет ассоциированного приложения" +02000608="Ошибок не найдено" +02000609="Не удалось открыть файл '{0}' как архив" +0200060A="Не удалось открыть зашифрованный архив '{0}'. Неверный пароль?" +0200060B="Недостаточно свободной памяти" +0200060C="Неизвестная ошибка" +0200060D="Неподдерживаемый тип архива" + +; Dialogs +02000702="OK" +02000705="&Да" +02000707="Да для &всех" +02000709="&Нет" +0200070B="Нет для в&сех" + +02000710="Отмена" +02000711="&Отмена" +02000713="&Закрыть" +02000714="Стоп" +02000715="Перезапуск" + +02000720="Помощь" + +; Extract dialog +02000800="Извлечь" +02000801="&Распаковать в:" +02000802="&Пароль" + +02000810="Пути" +02000811="По&лные пути" +02000812="О&тносительные пути" +02000813="&Без путей" + +02000820="Перезапись" +02000821="&С подтверждением" +02000822="Б&ез подтверждения" +02000823="Проп&ускать" +02000824="Переименовать автом." +02000825="Переим. автом. существ." + +02000830="Файлы" +02000831="Выбранные файлы" +02000832="Все файлы" + +02000881="Укажите положение для извлекаемых файлов." + +02000890="Распаковка" + +; Overwrite dialog +02000900="Подтверждение замены файла" +02000901="Папка уже содержит обрабатываемый файл." +02000902="Заменить существующий файл" +02000903="следующим файлом?" + +02000911="Переименовать автом." + +02000982="{0} байтов" +02000983="изменен" + +; Messages dialog +02000A00="Сообщения" + +02000A80="Сообщение" + +02000A91="Неподдерживаемый метод сжатия для файла '{0}'." +02000A92="Ошибка в данных в '{0}'. Файл испорчен." +02000A93="Ошибка CRC в '{0}'. Файл испорчен." +02000A94="Ошибка в данных зашифрованного файла '{0}'. Неверный пароль?" +02000A95="Ошибка CRC для зашифрованного файла '{0}'. Неверный пароль?" + +; Password dialog +02000B00="Ввод пароля" +02000B01="&Введите пароль:" +02000B02="&Показать пароль" +02000B03="&Повторите пароль:" +02000B10="Пароли не совпадают" +02000B11="Для пароля используйте только символы латинского алфавита, цифры и специальные символы (!, #, $, ...)" +02000B12="Пароль слишком длинный" + +; Progress dialog +02000C00="Процесс" +02000C01="Прошло:" +02000C02="Осталось:" +02000C03="Всего:" +02000C04="Скорость:" +02000C05="Размер:" +02000C06="Степень сжатия:" + +02000C10="&Фоном" +02000C11="&На передний план" +02000C12="&Пауза" +02000C13="&Продолжить" + +02000C20="На паузе" + +02000C30="Вы действительно хотите прервать операцию?" + +; Compress dialog +02000D00="Добавить к архиву" +02000D01="&Архив:" +02000D02="&Режим изменения:" +02000D03="&Формат архива:" +02000D04="&Метод сжатия:" +02000D05="Создать &Solid архив" +02000D06="&Параметры:" +02000D07="&Опции" +02000D08="Создать SF&X-архив" +02000D09="М&ногопоточность" +02000D0A="&Шифровать имена файлов" +02000D0B="&Уровень сжатия:" +02000D0C="Размер &словаря:" +02000D0D="Размер с&лова:" +02000D0E="Объем памяти для упаковки:" +02000D0F="Объем памяти для распаковки:" +02000D10="Шифрование" +02000D11="Метод шифрования:" +02000D12="Число потоков:" +02000D13="Размер блока:" +02000D14="По размеру файла" +02000D15="Непрерывный" +02000D16="Сжимать открытые для записи файлы" + +02000D40="Разбить на &тома размером (в байтах):" +02000D41="Ошибка в поле для задания размера томов" +02000D42="Установленный размер тома: {0} байтов.\nВы действительно хотите разбить архив на такие тома?" + +02000D81="Без сжатия" +02000D82="Нормальный" +02000D83="Максимальный" +02000D84="Быстрый" +02000D85="Скоростной" +02000D86="Ультра" + +02000D90="Пролистать" + +02000DA1="Добавить и заменить" +02000DA2="Обновить и добавить" +02000DA3="Обновить" +02000DA4="Синхронизировать" + +02000DB1="Все файлы" + +02000DC0="Компрессия" + +; Columns dialog +02000E00="Столбцы" +02000E01="Пометьте столбцы, которые следует отображать в этой папке. Кнопками \"Вверх\" и \"Вниз\" можно задать порядок следования столбцов." +02000E02="Выбранные столбцы должны иметь ширину" +02000E03="точек." + +02000E10="&Вверх" +02000E11="В&низ" +02000E12="П&оказать" +02000E13="&Скрыть" +02000E14="Установить" + +02000E81="Имя" +02000E82="Ширина" + +; Testing +02000F90="Тестирование" + + +; File Manager + +03000000="7-Zip File Manager" + +; Menu +03000102="&Файл" +03000103="&Правка" +03000104="&Вид" +03000105="С&ервис" +03000106="&Справка" +03000107="&Избранное" + +; File +03000210="&Открыть" +03000211="Открыть &внутри" +03000212="Открыть снару&жи" +03000220="Просмотр" +03000221="&Редактировать" +03000230="Переи&меновать" +03000231="&Копировать в..." +03000232="&Переместить в..." +03000233="&Удалить" +03000240="Сво&йства" +03000241="Комме&нтарий..." +03000242="Контрольная сумма" +03000243="Diff" +03000250="&Создать Папку" +03000251="Созд&ать Файл" +03000260="В&ыход" +03000270="Ра&збить файл..." +03000271="О&бъединить файлы..." + +; Edit +03000310="&Отменить" +03000311="&Вернуть" +03000320="&Вырезать" +03000321="&Копировать" +03000322="Вст&авить" +03000323="&Удалить" +03000330="Выделить в&се" +03000331="Убрать выделение" +03000332="&Обратить в&ыделение" +03000333="Выделить..." +03000334="Убрать выделение..." +03000335="Выделить по типу" +03000336="Убрать выделение по типу" + +; View +03000410="&Крупные значки" +03000411="&Мелкие значки" +03000412="Спис&ок" +03000413="&Таблица" +03000420="Без сортировки" +03000430="Открыть корневую папку" +03000431="Переход на один уровень вверх" +03000432="История папок..." +03000440="О&бновить" +03000449="Плоский режим" +03000450="&2 Панели" +03000451="&Панели инструментов" +03000460="Панель кнопок архиватора" +03000461="Стандартная панель кнопок" +03000462="Большие кнопки" +03000463="Надписи на кнопках" + +; Tools +03000510="Настройки..." +03000511="Тестирование производительности" + +; Help +03000610="&Оглавление..." +03000620="О &программе..." + +; Favorites +03000710="Добавить папку в &избранное как" +03000720="Закладка" + +; Options Dialog + +03010000="Настройки" + +; Plugins +03010100="Плагины" +03010101="&Плагины:" +03010110="Сво&йства" + +; Edit +03010200="Редактор" +03010201="&Редактор:" +03010202="&Diff:" + +; System +03010300="Система" +03010302="Ассоциировать 7-Zip с файлами:" +03010310="Плагин" + +; Settings +03010400="Настройки" +03010401="Показывать элемент \"..\"" +03010402="Показывать реальные иконки файлов" +03010410="Показывать системное меню" +03010420="Курсор на всю строку" +03010421="Показывать разделители" +03010422="Открывать одним щелчком" +03010430="Альтернативный режим пометки" +03010440="Использовать большие страницы памяти" + +; Strings + +03020201="Копировать" +03020202="Переместить" +03020203="Копировать в:" +03020204="Переместить в:" +03020205="Копирование..." +03020206="Перемещение..." +03020207="Нельзя скопировать объекты для таких папок" +03020208="Операция не поддерживается для этой папки." +03020209="Укажите папку." + +03020210="Подтверждение удаления файла" +03020211="Подтверждение удаления папки" +03020212="Подтверждение удаления группы файлов" +03020213="Вы действительно хотите удалить \"{0}\"?" +03020214="Вы действительно хотите удалить папку \"{0}\" и все ее содержимое?" +03020215="Вы действительно хотите удалить эти объекты ({0} шт.)?" +03020216="Удаление..." +03020217="Ошибка при удалении файла или папки" +03020218="Система не поддерживает операцию удаления файлов с длинными путями в корзину" + +03020220="Переименование..." +03020221="Ошибка при переименовании файла или папки" +03020222="Подтверждение копирования файлов" +03020223="Вы действительно хотите скопировать эти файлы в архив" + +03020230="Создать папку" +03020231="Имя папки:" +03020232="Новая папка" +03020233="Ошибка при создании папки" + +03020240="Создать файл" +03020241="Имя файла:" +03020242="Новый файл" +03020243="Ошибка при создании файла" + +03020250="Выделить" +03020251="Убрать выделение" +03020252="Маска:" + +03020260="История папок" + +03020280="Файл '{0}' был изменен.\nВы хотите обновить его в архиве?" +03020281="Не удалось обновить файл\n'{0}'" +03020282="Не удалось запустить редактор" +03020283="Открытие..." +03020284="Файл похож на вирус (имя файла содержит длинную последовательность пробелов)." + +03020290="Комментарий" +03020291="&Комментарий:" + +030202A0="Система" + +03020300="Компьютер" +03020301="Сеть" +03020302="Документы" + +03020400="Добавить" +03020401="Извлечь" +03020402="Тестировать" + +03020420="Копировать" +03020421="Переместить" +03020422="Удалить" +03020423="Информация" + +03020500="Разбить файл" +03020501="&Разбить в:" +03020510="Разбиение..." +03020520="Подтверждение разбиения" +03020521="Вы действительно хотите разбить файл на {0} частей?" +03020522="Размер тома должен быть меньше размера исходного файла" + +03020600="Объединить файлы" +03020601="&Объединить в:" +03020610="Объединение..." +03020620="Необходимо выделить только первую часть разбитого файла" +03020621="Не удалось распознать разбитый файл" +03020622="Не удалось найти более одной части разбитого файла" + +03020710="Вычисление контрольной суммы..." +03020720="Контрольная сумма" +03020721="Контрольная сумма CRC для данных:" +03020722="Контрольная сумма CRC для данных и имен:" + +03020800="Сканирование..." + +03020900="Свойства" + +03020A01="Операция не может быть исполнена из папки, которая имеет длинный путь." +03020A02="Вы должны выделить один файл" +03020A03="Вы должны выделить один или несколько файлов" +03020A04="Файл {0} уже существует" + +; Computer +03031100="Емкость" +03031101="Свободно" +03031102="Размер кластера" +03031103="Метка" + +; Network +03031200="Локальное имя" +03031201="Провайдер" + +; Benchmark Dialog + +03080000="Тестирование производительности" +03080001="Объем памяти:" +03080002="Упаковка" +03080003="Распаковка" +03080004="Скорость" +03080005="Рейтинг" +03080006="Общий рейтинг" +03080007="Текущий" +03080008="Итоговый" +03080009="Проходов:" +0308000A="Ошибок:" +0308000B="Нагрузка" +0308000C="Рейтинг / Нагр." + +;!@LangEnd@! diff --git a/GUI/Lang/sa.txt b/GUI/Lang/sa.txt new file mode 100644 index 0000000..d0b9dfd --- /dev/null +++ b/GUI/Lang/sa.txt @@ -0,0 +1,547 @@ +;!@Lang@!UTF-8! +; 7-Zip 9.07 +; Translated by Vinayy Sharrma, अनुवादं विनय शर्मा +;संस्कृतम् गर्व कुरु, जय हिन्दं ! जय संस्कृतम्! +;एतत् साधारण अनुवादं अस्ति +; +; + +00000000="Sanskrit, Indian, हिन्दुस्तानं" +00000001="संस्कृत" +00000002="79" + +; 7-Zip Configuration + +; Title +01000000="7-जिप संरचना" + +; Info Page +01000100="7-जिप विषय" +01000103="7-जिपं एतत निःशुल्क सॉफ़्टवेयर अस्ति. तथापि, भवान् पंजीकृतं(रजिस्टर्ड) होकर७-ज़िपस्य विकास में सहयोग कर सकते अस्ति." +01000104="सहयोग" +01000105="पंजीकरणम्" + +; Folders Page +01000200="फ़ोल्डर्स" +01000210="&कार्यरत फोल्डरं" +01000211="&प्रणालयास्य अस्थायी(टेम्पररी) फोल्डरं" +01000212="&चालू" +01000213="&निर्दिष्ट:" +01000214="मात्र हटाने योग्य(रिमूवेबल) ड्राईवाय ही प्रयोगं कुरु" + +01000281="अस्थायी संग्रहम् फाइलाय स्थानं निर्दिष्टं कुरु(बतायें)." + +; System Page +01000300="प्रणाली वा तंत्रम्" +01000301="7-जिपस्य शेल(कवच) प्रसंग मेनु में जोडें" +01000302="सोपानीकृत(केस्केडेड) प्रसंग मेनु" +01000310="प्रसंग(कोन्टेक्स्ट) मेनु वस्तुएँ:" + +; Language Page +01000400="भाषा" +01000401="भाषा:" + + +; 7-Zip Explorer extension + + +; Context menu +02000101="7-जिप" +02000102="7-जिप आदेशाः(कमांड्स)" +02000103="संग्रहम् अनावृतं" +02000104="चयनित संग्रहम् खोलता अस्ति." +02000105="फ़ाइल्स बहिः निकाले..." +02000106="चयनितं संग्रहम् में से फाइले बहिः निकाले ." +02000107="संग्रहम् में जोड़े..." +02000108="चयनित वस्तुओं को संग्रहम् में जोड़ता अस्ति." +02000109="संग्रहमस्य जाँच कुरु" +0200010A="चयनित संग्रहमस्य एकसूत्रता जाँचता अस्ति." +0200010B="यहीं बहिः निकाले" +0200010C="चयनित संग्रहम् में से वर्तमानं फोल्डरं में फाइले बहिः निकाले." +0200010D="{0} में बहिः निकाले" +0200010E="उप-फोल्डरं में फ़ाइल्स को बहिः निकाले." +0200010F="{0} में जोड़े" +02000110="चयनित वस्तुं को संग्रहम् में जोड़े." +02000111="संकुचनं एवम् ईमेलम् कुरु..." +02000112="चयनित वस्तुओं को संकुचित कर संग्रहम् में जोड़ता अस्ति एवम् संग्रहम् ई-मेल द्वारा भेजता अस्ति." +02000113=" {0} में दबायें एवम् ईमेलं कुरु" +02000114="चयनित वस्तुओं को संकुचित कर संग्रहम् में जोड़ता अस्ति एवम् संग्रहम् ई-मेलम् द्वारा भेजता अस्ति." + + +02000140="<फोल्डरं>" +02000141="<संग्रहम्(आर्चिव)>" + +; Properties +02000203="मार्ग" +02000204="नाम" +02000205="विस्तारं" +02000206="फोल्डरं" +02000207="आकारं" +02000208="कुल आकारं" +02000209="विशेषता वा गुणधर्म" +0200020A="सर्जितं" +0200020B="चालितम्" +0200020C="परिवर्धितं" +0200020D="ठोस" +0200020E="टिप्पणी" +0200020F="गुप्तिकृतम्" +02000210="के पूर्व विभाजनं(टुकडे) कुरु " +02000211="के पश्चात विभाजनं(टुकडे) कुरु" +02000212="शब्दकोशं" +02000213="सीआरसी" +02000214="प्रकारं" +02000215="विरोधी" +02000216="पद्धति" +02000217="ओपरेटिंग सिस्टम" +02000218="फ़ाइलं प्रणाली" +02000219="प्रयोगकर्ता" +0200021A="समूहम्" +0200021B="रोक वा टुकड़े" +0200021C="प्रतिक्रिया" +0200021D="स्थानं" +0200021E="मार्ग प्रत्ययं" +0200021F="फोल्डर्स" +02000220="फाइल्स" +02000221="संस्करणम्" +02000222="जत्था" +02000223="अनेक जत्थे" +02000224="ओफसेट" +02000225="कडियाँ" +02000226="टुकड़े" +02000227="जत्थे" + +02000229="64-बिट" +0200022A="विशाल-एन्डियन" +0200022B="सीपीयू" +0200022C="भौतिक आकारं" +0200022D="शीर्षकाः आकारं" +0200022E="जाँचयोग" +0200022F="चरित्रताऎं" +02000230="आभासी पता" +02000231="आईडी" +02000232="संक्षिप्तः नामं" +02000233="सर्जक अनुप्रयोगं" +02000234="सेक्टरस्य आकारं" +02000235="स्थिति" +02000236="कड़ी" + +; Status bar +02000301="{0} चयनित वस्तु(एँ)" +02000302="{0} वस्तु(एँ)" + +02000320="फ़ाइलें:" +02000321="फ़ोल्डर्स:" +02000322="आकारं:" +02000323="संकुचित किया आकारं:" +02000324="संग्रहम्:" + +; List Context Menu +02000401="&स्तंभ..." + +02000411="&अनावृतं" +02000412="&बहिः निकाले..." + +; ToolBar +02000501="बहिः निकाले" + +; Messages +02000601="एतत् संग्रहमस्य अद्यतनीकृत संचालन समर्थित ना अस्ति." +02000602="{0} संग्रहम् को अद्यतनीकृतं ना कर सकता" +02000603=" '{0}' फोल्डरं सर्जित ना कर सकता" +02000604="फाइलं समर्थित संग्रहम् ना अस्ति." +02000605="त्रुटि" +02000606="अत्यधिक वस्तुएँ" +02000607="दिये हुए फाइलं के नाम के विस्तार के साथ कोई भी सम्बन्धित अनुप्रयोगं(प्रोग्रामं) ना अस्ति" +02000608="इनमे कोई भी त्रुटि ना अस्ति" +02000609="'{0}' फाइल को संग्रहम् के रूप में ना खोल सकता" +0200060A="'{0}' गुप्तिकृतम् संग्रहम् को ना खोल सकता. मिथ्या कूटशब्दम्?" +0200060B="तंत्रम् आवश्यक मात्रा में मेमोरी(स्मृति) वितरितं ना कर सकता अस्ति" +0200060C="अज्ञात त्रुटिम्" +0200060D="असमर्थित संग्रहम् प्रकारं" + +; Dialogs +02000702="ठीक अस्ति" +02000705="&हाँ" +02000707="&सर्वस्य हाँ" +02000709="&ना" +0200070B="&सर्वस्य ना" + +02000710="रद्द" +02000711="&रद्द" +02000713="&बंद कुरु" +02000714="रूको" +02000715="पुनः शुरु कुरु" + +02000720="मददं" + +; Extract dialog +02000800="बहिः निकाले" +02000801="&बहिः निकाले:" +02000802="कूटशब्दम्(पासवर्ड)" + +02000810="मार्ग स्थिति" +02000811="पूर्ण मार्गनामं" +02000812="वर्तमानं मार्गनामं" +02000813="कोई मार्ग नामं ना अस्ति" + +02000820="अधिलेखन रीत" +02000821="अधिलेखन करने से पहले पृच्छाः" +02000822="बिना पृच्छाः अधिलेखनं(पुराने को मिटाना) कुरु" +02000823="पहले से मौजूद फ़ाइलस को छोड़े" +02000824="स्वचालित पुन: नामकरणं" +02000825="पहले से मौजूद फ़ाइलस का स्वचालितं(ओटोमेटिक) पुन: नामकरणं कुरु" + +02000830="फ़ाइलें" +02000831="&चयनित फ़ाइलें" +02000832="&सर्व फ़ाइलें" + +02000881="बहिः निकाली हुई फ़ाइलों के लिये स्थानं निर्दिष्टं कुरु." + +02000890="बहिः निकाल रहा अस्ति" + +; Overwrite dialog +02000900="फ़ाइलं प्रतिस्थापनं को पक्का कुरु" +02000901="गन्तव्य फोल्डरं में पहले से ही प्रक्रिया हुई फ़ाइलं अस्ति." +02000902="क्या भवान् पहले से मौजूद फ़ाइल को बदलना पसंद करेंगे?" +02000903="इसके साथ?" + +02000911="स्वचालित पुन: नामकरणम्" + +02000982="{0} बाइट्स" +02000983="को परिवर्धितं" + +; Messages dialog +02000A00="निदानात्मकं संदेश" + +02000A80="संदेशं" + +02000A91="'{0}' के लिए असहायक दबाने की पद्धति." +02000A92="डेटा त्रुटि'{0}' में. फ़ाइलं टूटी हुई अस्ति." +02000A93="'{0}' में सीआरसी असफल. फ़ाइलं टूटी हुई अस्ति." +02000A94=" '{0}' गुप्तिकृतम्(एनक्रिप्टेड) फाइलं में डेटा त्रुटि. मिथ्या कूटशब्दम्?" +02000A95=" '{0}'गुप्तिकृतम्(एनक्रिप्टेड) फाइलं में सीआरसी असफल. मिथ्या कूटशब्दम्?" + +; Password dialog +02000B00="कूटशब्दम्(पासवर्ड) डाले" +02000B01="कूटशब्दम्(पासवर्ड) डाले:" +02000B02="&कूटशब्दम्(पासवर्ड) दिखाओ" +02000B03="कूटशब्दम् पुनः डाले:" +02000B10="कूटशब्दम् सहेजे हुए से अलग अस्ति" +02000B11="कूटशब्दम् के लिये मात्र इंग्लिश वर्णमाला, अंकाः और विशेष अक्षरों (!, #, $, ...) का ही उपयोग कुरु" +02000B12="कूटशब्दम् अत्यधिक विशाल अस्ति" + +; Progress dialog +02000C00="प्रक्रिया" +02000C01="व्यतीत समय:" +02000C02="शेष बचा समय:" +02000C03="कुल आकारं:" +02000C04="गति:" +02000C05="प्रक्रिया किया हुआ:" +02000C06="दबाने(आकारं छोटा करने) का अनुपातं:" + +02000C10="&पॄष्ठ्भूमि" +02000C11="&अग्रभूमि(डेस्क्टोप)" +02000C12="&विश्राम" +02000C13="&जारी रखे" + +02000C20="विश्रामितं" + +02000C30="त्वम रद्द करना चाहते हो. तुम्हें यकीन अस्ति क्या?" + +; Compress dialog +02000D00="संग्रहम् में जोड़े" +02000D01="&संग्रहम्:" +02000D02="&अद्यतनीकरणं स्थिति(मोड):" +02000D03="संग्रहम् &ढाँचा:" +02000D04="&संकुचनम् विधि:" +02000D05="&ठोस संग्रहम् निर्माणम् कुरु" +02000D06="&परिमाप:" +02000D07="विकल्प" +02000D08="&एसएफ़एक्स(SFX) संग्रहम् निर्माणम् कुरु" +02000D09="अनेक-सूत्री" +02000D0A="फ़ाइल &नाम गुप्तिकरणम् कुरु" +02000D0B="&संकुचनम् स्तर:" +02000D0C="&शब्दकोशम् आकारं:" +02000D0D="&शब्द आकारं:" +02000D0E="संकुचनस्य स्मृति प्रयोग:" +02000D0F="प्रसारणस्य स्मृति प्रयोग:" +02000D10="गुप्तिकरणम्" +02000D11="गुप्तिकरणम् पद्धति:" +02000D12="सीपीयू सूत्र संख्या:" +02000D13="ठोस टुकडे का आकारं:" +02000D14="अ-ठोसं" +02000D15="ठोसं" +02000D16="साझी फाइलें संकुचितं कुरु" + +02000D40="जत्थों में विभाजनं, बाइट्स:" +02000D41="जत्थे का आकारं मिथ्या अस्ति" +02000D42="निर्देशित जत्था आकारं: {0} बाइटस.\n भवान् संग्रहम् को ऎसे जत्थों में विभाजितं करना चाहते अस्ति, क्या आपको यकीन अस्ति?" + +02000D81="भण्डारणम्" +02000D82="साधारणम्" +02000D83="अधिकतम" +02000D84="तेज" +02000D85="सर्वाधिक तेज" +02000D86="अत्यन्त" + +02000D90="ब्राउजम् वा घूमे" + +02000DA1="फ़ाइलें जोड़े एवम् प्रतिस्थापित कुरु" +02000DA2="फ़ाइले अद्यतनीकृतं कुरु एवम् जोड़े" +02000DA3="अवस्थितं फ़ाइलें ताजा कुरु" +02000DA4="फाइलें समक्रमण(सिंक्रोनाईज़) कुरु" + +02000DB1="सर्वाः फ़ाइलें" + +02000DC0="संकुचनं कर रहा अस्ति" + +; Columns dialog +02000E00="स्तंभ" +02000E01="इस फोल्डरं में जो स्तंभ, तुम दिखाई दें ऎसे बनाना चाहते हो उन्हें टिक(चयन) कुरु. स्तंभो का क्रम बदलने के लिये उर्ध्वं ले जाओ एवम् अधः ले जाओ बटनस्य(खटके) उपयोगं कुरु" +02000E02="चयनित स्तंभम्" +02000E03="&पिक्सेल(बूँद) चौड़े." + +02000E10="&उर्ध्वं ले जाएँ" +02000E11="&अधः ले जाएँ" +02000E12="&दिखाये" +02000E13="&छुपाये" +02000E14="सेट(स्थिर)" + +02000E81="शीर्षक" +02000E82="चौड़ाई" + +; Testing +02000F90="परीक्षणम्" + + +; file Manager + +03000000="7-जिप फ़ाइल प्रबन्धकम्" + +; Menu +03000102="&फ़ाइलम्" +03000103="&संपादनम्" +03000104="&दर्शनम्" +03000105="&औजारम्" +03000106="&मददम्" +03000107="&मनपसंदम्" + +; file +03000210="&अनावृतं" +03000211="&अंदर अनावृतं" +03000212="&बहिः अनावृतं" +03000220="&दृश्यम्" +03000221="&संपादनम्" +03000230="&पुन: नामकरणम्" +03000231="&में नकल बनाये..." +03000232="&में ले जायें..." +03000233="&मिटायें" +03000240="&संपत्तियाँ वा गुणं" +03000241="&टिप्पणी" +03000242="&जाँच योगस्य गणनां कुरु" +03000243="&अन्तर" +03000250="&फोल्डरं निर्माणम् कुरु" +03000251="&फ़ाइलं निर्माणम् कुरु" +03000260="&निर्गमन" +03000270="&फ़ाइलस्य विभाजनं कुरु..." +03000271="&फ़ाइलस्य संयोजनं कुरु..." + +; Edit +03000310="&पुर्वस्थिती(पहले जैसा)" +03000311="&पुनः कुरु" +03000320="&काटे" +03000321="&नकल कुरु" +03000322="&चिपकायें" +03000323="&मिटायें" +03000330="&सर्व चयनं कुरु" +03000331="&सर्व अचयनितं कुरु" +03000332="&चयन उलटा कुरु" +03000333="चयनं कुरु..." +03000334="अचयनं कुरु..." +03000335="प्रकार द्वारा चयनम्" +03000336="प्रकार द्वारा अचयनम्" + +; View +03000410="विशाल प्रतीकं" +03000411="लघु प्रतीकं" +03000412="&सूची" +03000413="&वर्णनं" +03000420="अवितरितम्" +03000430="मूल फोल्डरं अनावृतं" +03000431="एक स्तर उर्ध्व चढ़े" +03000432="फ़ोल्डरो का इतिहास..." +03000440="&ताजा कुरु" +03000449="चौड़ा दृश्य" +03000450="&२ फ़लक" +03000451="&औजार पट्टीयाँ" +03000460="संग्रहम् उपकरणपट्टी" +03000461="मानक औजार पट्टी" +03000462="विशाल खटके(बटन)" +03000463="खटके(बटन) के शब्द दिखायें" + +; Tools +03000510="&विकल्पम्..." +03000511="&बेञ्चमार्कम्(प्रामाणिक तुलना)" + +; Help +03000610="&सामग्री..." +03000620="7-जिप विषय..." + +; Favorites +03000710="&फोल्डरं मनपसंद में ऎसे जोड़े..." +03000720="पुस्तचिन्हम्" + +; Options Dialog + +03010000="विकल्पम्" + +; Plugins +03010100="प्लगइन(शक्तिदायक)" +03010101="&प्लगइन(शक्तिदायक):" +03010110="विकल्पम्..." + +; Edit +03010200="संपादकम्" +03010201="&संपादक:" +03010202="&अन्तर:" + +; System +03010300="प्रणाली वा तंत्रम्" +03010302="संबधित कुरु 7-जिप के साथ:" +03010310="प्लगइन(शक्तिदायक)" + +; Settings +03010400="व्यवस्थाएँ" +03010401="दिखाओ \"..\"वस्तु" +03010402="वास्तविक फ़ाइल प्रतिमायें दिखाओ" +03010410="तंत्रस्य मेनु दिखाओ" +03010420="&पूर्ण पन्क्तिस्य चयनं" +03010421=" &ग्रिड(जाल) रेखा दिखाओ" +03010422="वस्तु अनावृताय एकं ही(सिंगल)-क्लिकम्" +03010430="&वैकल्पिक चयनं स्थिति" +03010440="&विशाल् स्मृति पृष्ठस्य प्रयोगं कुरु" + +; Strings + +03020201="नकल" +03020202="ले जायें" +03020203="में नकल:" +03020204="में ले जायें:" +03020205="नकल..." +03020206="ले जा रहा अस्ति..." +03020207="ऎसे फोल्डरों के लिये तुम वस्तुओं को हटाना वा नकल करना ना कर सकते." +03020208="एतत् फोल्डरं के लिये यह सञ्चालनं क्रिया समर्थितं ना अस्ति." +03020209="गन्तव्य फोल्डरं चयनित कुरु." + +03020210="फ़ाइल मिटाये यह पक्का कुरु" +03020211="फोल्डरं मिटायें पक्का कुरु" +03020212="अनेक फ़ाइल मिटायें पक्का कुरु" +03020213="क्या तुम्हे यकीन अस्ति कि तुम मिटाना चाहते हो '{0}'?" +03020214="क्या तुम्हे यकीन अस्ति कि तुम फोल्डरं मिटाना चाहते हो '{0}' और इसकी सर्वाः सामग्री भी?" +03020215="क्या तुम्हे यकीन अस्ति कि तुम मिटाना चाहते हो इन {0} वस्तुओं को?" +03020216="मिटा रहा अस्ति..." +03020217="फ़ाइलं किंवा फोल्डरं मिटाने में त्रुटि" +03020218="तंत्र लंबे मार्ग वाली फाइलं को पुनःचक्रण पेटी(रिसाईकल बिन) में ना ले जा सकता अस्ति." + +03020220="पुन: नामकरणं..." +03020221="फ़ाइल वा फोल्डरं के पुन: नामकरणं में त्रुटि" +03020222="फ़ाइल की नकल करना पक्का कुरु" +03020223="तुम संग्रहम् में फाइलं की प्रतिलिपि करना चाहते हो क्या तुम्हे यकीन अस्ति" + +03020230="फ़ॊल्डर निर्माणम् कुरु" +03020231="फोल्डरं नाम:" +03020232="नवीन फ़ॊल्डर" +03020233="फोल्डरं निर्माणम् करने में त्रुटि" + +03020240="फ़ाइल निर्माणम् कुरु" +03020241="फ़ाइल नाम:" +03020242="नवीन फ़ाइलं" +03020243="फ़ाइल निर्माणम् करने में त्रुटि" + +03020250="चयनम्" +03020251="चयन रद्द" +03020252="मुखौटा:" + +03020260="फ़ोल्डरों का इतिहास" + +03020280=" '{0}' फ़ाइल परिवर्धितं हुई अस्ति.\nक्या तुम संग्रहम् में इसे अद्यतनीकृतं करना चाहते हो?" +03020281="फ़ाइल को अद्यतनीकृतं ना कर सकता\n'{0}'" +03020282="संपादक को शुरू ना कर सकता." +03020283="अनावृतं कर रहा अस्ति..." +03020284="यह फाइलं एक विषाणु(वायरस) जैसी लगती अस्ति(फाइलं नाम लंबी खाली जगह नाम में रखता अस्ति)." + +03020290="टिप्पणी" +03020291="&टिप्पणी:" + +030202A0="प्रणाली" + +03020300="संगणकम्" +03020301="सञ्जालम्" +03020302="दस्तावेजम्" + +03020400="जोड़े" +03020401="बहिः निकाले" +03020402="परीक्षणम्" + +03020420="नकल" +03020421="ले जायें" +03020422="मिटायें" +03020423="सूचना" + +03020500="फ़ाइलस्य विभाजनं कुरु" +03020501="&में विभाजनं:" +03020510="विभाजनं कर रहा अस्ति..." +03020520="विभाजनं करना पक्का कुरु" +03020521="क्या तुम्हे यकीन अस्ति कि तुम फाइलं को {0} जत्थों में विभाजित करना चाहते हो?" +03020522="मूल फाइलं के आकारं की तुलना में जत्थे का आकारं छोटा ही होना चाहिए" + +03020600="फ़ाइले संयोजितं कुरु" +03020601="&में संयोजनं कुरु:" +03020610="संयोजनं हो रहा अस्ति..." +03020620="विभाजितं फाइल का मात्र प्रथम भागं ही चयनितं कुरु" +03020621="फाइलं को विभाजित फाइलं के भाग के रूप में पहचान ना सकता" +03020622="विभाजित फाइलं का एक से ज्यादा भाग ना ढूँढ सकता" + +03020710="जाँचयोगस्य(चेकसम) गणनां कर रहा अस्ति..." +03020720="जाँचयोग(चेकसम) माहिती" +03020721="सीआरसी जाँचयोग(चेकसम) आँकड़ों के लिये :" +03020722="सीआरसी जाँचयोग(चेकसम) आँकड़ों और नामों के लिये :" + +03020800="तलाशी(स्कैनिंग) कर रहा अस्ति..." + +03020900="गुणम् वा संपत्तियाँ" + +03020A01="जिस फोल्डरं का लंबा मार्ग अस्ति उससे सञ्चालनं क्रिया ना बुलाई जा सकती." +03020A02="तुम्हे एक फाइलं का चयन तो करना ही होगा" +03020A03="तुम्हे एक वा अधिक फाइलों को चुनना ही होगा" +03020A04="फाइलं {0} पहले से मौजूद अस्ति" + +; Computer +03031100="कुल आकारं" +03031101="स्वतन्त्र रिक्तस्थानं(खाली जगह)" +03031102="क्लस्टर(समूह) आकारं" +03031103="ध्यानाकर्षकं(लेबलम्)" + +; Network +03031200="स्थानिय नामम्" +03031201="प्रदायकम्" + +; Benchmark Dialog + +03080000="(कसौटी चिन्हं)बेञ्चमार्कम्" +03080001="स्मृति उपयोग:" +03080002="संकुचनं कर रहा अस्ति" +03080003="प्रसारणं हो रहा अस्ति" +03080004="गति(वेग)" +03080005="क्रमांकन" +03080006="कुल क्रमांकन" +03080007="वर्तमानम्" +03080008="परिणामम्" +03080009="पास:" +0308000A="त्रुटियाँ:" +0308000B="सीपीयू उपयोग" +0308000C="क्रमांकन / उपयोग" + +;!@LangEnd@! + + diff --git a/GUI/Lang/si.txt b/GUI/Lang/si.txt new file mode 100644 index 0000000..0da3753 --- /dev/null +++ b/GUI/Lang/si.txt @@ -0,0 +1,534 @@ +;!@Lang@!UTF-8! +; 7-Zip 4.59 +; Translated by සුපුන් බුධාජීව (Supun Budhajeewa) +; +; +; +; + +00000000="Sinhala" +00000001="සිංහල" +00000002="91" + +; 7-Zip Configuration + +; Title +01000000="7-Zip වින්‍යාසගත කිරීම්" + +; Info Page +01000100="7-Zip පිළිබඳව" +01000103="7-Zip නිදහස් මෘදුකාංගයක් වුවත්, ලියාපදිංචි වීම මගින් 7-Zip හි වැඩි දියුණුව සඳහා ඔබට දායක විය හැකිය.\n\nමෙම සිංහල භාෂා පරිවර්තනය G.S.N. සුපුන් බුධාජීව (budhajeewa@gmail.com) විසින් සිදු කරන ලදී." +01000104="සහය දෙන්න" +01000105="ලියාපදිංචි වෙන්න" + +; Folders Page +01000200="බහාලුම්" +01000210="සක්‍රීය බහාලුම් (&W)" +01000211="පද්ධති තාවකාලික දෑ (Temp) බහාලුම (&S)" +01000212="වත්මන් (&C)" +01000213="තෝරන්න (&S):" +01000214="ඉවත් කළ හැකි ධාවක සඳහා පමණක් භාවිතා කරන්න" + +01000281="තාවකාලික හැකිළුම් ගොනු සඳහා ස්ථානයක් දෙන්න." + +; System Page‍ +01000300="පද්ධතිය" +01000301="Shell context මෙනුව වෙත 7-Zip අන්තර්ගත කරන්න" +01000302="Context menu අංග එක් අංගයක් යටතේ සඳහන් කරන්න‍‍‍" +01000310="Context මෙනු අංග:" + +; Language Page +01000400="භාෂාව" +01000401="භාෂාව:" + +; 7-Zip Explorer extension + +; Context menu +02000101="7-Zip" +02000102="7-Zip විධාන" +02000103="හැකිළුම විවෘත කරන්න" +02000104="තෝරා ඇති හැකිළුම විවෘත කරයි." +02000105="ගොනු ලිහන්න..." +02000106="තෝරා ඇති හැකිළුමෙන් ගොනු ලිහයි." +02000107="හැකිළුමකට ඇතුල් කරන්න..." +02000108="තෝරා ඇති වස්තු හැකිළුමකට ඇතුල් කරයි." +02000109="හැකිළුම පරීක්ෂා කරන්න" +0200010A="තෝරා ඇති හැකිළුම පරීක්ෂා කරයි." +0200010B="මෙතැනට ලිහන්න" +0200010C="තෝරා ඇති හැකිළුම ලිහා, එහි ගොනු වත්මන් බහාලුමට එක් කරයි." +0200010D="{0} වෙත ලිහන්න" +0200010E="හැකිළුම ලිහා, එහි ගොනු උප බහාලුමකට එක් කරයි." +0200010F="{0} වෙත එක් කරන්න" +02000110="තෝරාගත් වස්තු දැනටමත් නිර්මිත හැකිළුමකට එක් කරයි." +02000111="හකුළා විදුලි තැපැල් කරන්න..." +02000112="තෝරා ඇති වස්තු හකුළා විදුලි තැපෑල හරහා යවයි." +02000113="{0} වෙත හකුළා විදුලි තැපැල් කරන්න" +02000114="තෝරාගත් වස්තු දැනටමත් නිර්මිත හැකිළුමකට එක් කර විදුලි තැපෑල හරහා යවයි." + +02000140="<බහාලුම>" +02000141="<හැකිළුම>" + +; Properties +02000203="මංපෙත" +02000204="නම" +02000205="දිගුව" +02000206="බහාලුම" +02000207="විශාලත්වය" +02000208="හැකිළුමෙන් පසු විශාලත්වය" +02000209="ලක්ෂණ" +0200020A="නිර්මාණය කළ දිනය" +0200020B="ප්‍රවේශ වූ දිනය" +0200020C="අළුත් කළ දිනය" +0200020D="සවි" +0200020E="ටීකා කොට ඇත" +0200020F="සුරක්ෂිතය" +02000210="Split Before" +02000211="Split After" +02000212="Dictionary" +02000213="CRC" +02000214="වර්ගය" +02000215="Anti" +02000216="ක්‍රමය" +02000217="ධාරක මෙහෙයුම් පද්ධතිය" +02000218="ගොනු පද්ධතිය" +02000219="පරිශිලක" +0200021A="සමූහය" +0200021B="Block" +0200021C="ටීකාව" +0200021D="පිහිටීම" +0200021E="Path Prefix" +0200021F="බහාලුම්" +02000220="ගොනු" +02000221="සංස්කරණය" +02000222="Volume" +02000223="Multivolume" +02000224="Offset" +02000225="සබැඳීන්" +02000226="Blocks" +02000227="Volumes" + +02000229="බිට්-64" +0200022A="Big-endian" +0200022B="මධ්‍යම සැකසුම් පද්ධතිය (CPU)" +0200022C="භෞතික විශාලත්වය" +0200022D="ශීර්ෂ විශාලත්වය" +0200022E="Checksum" +0200022F="මුහුණුවර" +02000230="Virtual Address" + +; Status bar +02000301="වස්තු {0}ක් තෝරා ඇත" +02000302="වස්තු {0}" + +02000320="ගොනු:" +02000321="බහාලුම්:" +02000322="ප්‍රමාණය:" +02000323="හැකිළු පසු ප්‍රමාණය:" +02000324="හැකිළුම්:" + +; List Context Menu +02000401="කොලමයන් (&C)..." + +02000411="විවෘත කරන්න (&O)" +02000412="ලිහන්න (&Ex)..." + +; ToolBar +02000501="ලිහන්න" + +; Messages +02000601="මෙම හැකිළුම සඳහා යාවත්කාල කිරීම් සහයෝගය නොදක්වයි." +02000602="{0} හැකිළුම යාවත්කාල කල නොහැක" +02000603="'{0}' බහාලුම තැනිය නොහැක" +02000604="ගොනුව සහයෝගී හැකිළුමක් නොවේ." +02000605="දෝෂයක්" +02000606="අංග ඉතා අධිකය" +02000607="දෙන ලද ගොනු නාම දිගුව හා ආශ්‍රිත යෙදවුමක් නැත" +02000608="දෝෂ නොමැත" +02000609="'{0}' ගොනුව හැකිළුමක් ලෙස විවෘත කළ නොහැක" +0200060A="සුරක්ෂිත '{0}' හැකිළුම විවෘත කළ නොහැක. මුරපදය වැරදි ද ?" +0200060B="අවශ්‍ය මතක ප්‍රමාණය පද්ධතියට වෙන් කර ගත නොහැක" +0200060C="හඳුනා නොගත් දෝෂයක්" +0200060D="සහයෝගී නොවන හැකිළුම් ක්‍රමයක්" + +; Dialogs +02000702="හරි" +02000705="ඔවු (&Y)" +02000707="සියල්ලටම ඔවු (&A)" +02000709="නැහැ (&N)" +0200070B="සියල්ලටම නැහැ(&L)" + +02000710="එපා" +02000711="එපා (&C)" +02000713="වසන්න (&C)" +02000714="නවතන්න" +02000715="ප්‍රත්‍යාරම්භ කරන්න" + +02000720="උදව්" + +; Extract dialog +02000800="ලිහන්න" +02000801="ලිහීමට තැනක් (&X) :" +02000802="මුරපදය" + +02000810="මංපෙත් ස්වභාවය" +02000811="සම්පූර්ණ මංපෙත් නම්" +02000812="වර්තමාන මංපෙත් නම්" +02000813="මංපෙත් නම් අවශ්‍ය නැත" + +02000820="උඩින් ලිවීමේ ස්වභාවය" +02000821="උඩින් ලියන්නට පෙර විමසන්න" +02000822="විමසීමෙන් තොරව උඩින් ලියන්න" +02000823="දැනටමත් ඇති ගොනු මගහරින්න" +02000824="ගොනු ස්වයංක්‍රියව ප්‍රතිනම් කරන්න" +02000825="දැනටමත් ඇති ගොනු‍ ප්‍රතිනම් කරන්න" + +02000830="ගොනු" +02000831="තෝරාගත් ගොනු (&S)" +02000832="සියළු ගොනු (&A)" + +02000881="ලිහන ලද ගොනු සඳහා ස්ථානයක් තෝරන්න." + +02000890="ලිහමින් පවතී‍" + +; Overwrite dialog +02000900="ගොනු ප්‍රතිස්ථාපනය තහවුරු කර ගැනීම" +02000901="ගමනාන්ත බහාලුමේ දැනටමත් නිර්මිත ගොනුවක් ඇත." +02000902="දැනටම පවතින පහත ගොනුව," +02000903="මෙය සමග ප්‍රතිස්ථාපනය කරන්න ද ?" + +02000911="ස්වයංක්‍රියව ප්‍රතිනම් කරන්න (&U)" + +02000982="{0} බයිට (Bytes)" +02000983="නව්‍ය කළේ" + +; Messages dialog +02000A00="විනිශ්චීය පණිවුඩ" + +02000A80="පණිවිඩය" + +02000A91="'{0}' සඳහා සහයෝගය නොදක්වන හැකිළුම් ක්‍රමයක්." +02000A92="'{0}' හි දත්ත දෝෂයකි. ගොනුව බිඳී ඇත." +02000A93="'{0}' හි CRC අසමත් විනි. ගොනුව බිඳී ඇත." +02000A94="සුරක්ෂිත '{0}' ගොනුවේ දත්ත දෝෂයකි. වැරදි මුරපදයක් ද ?" +02000A95="සුරක්ෂිත '{0}' ගොනුවේ CRC අසමත් විනි. වැරදි මුරපදයක් ද ?" + +; Password dialog +02000B00="මුරපදය ඇතුල් කරන්න" +02000B01="මුරපදය ඇතුල් කරන්න:" +02000B02="මුරපදය පෙන්වන්න (&S)" +02000B03="මුරපදය නැවත ඇතුල් කරන්න:" +02000B10="මුරපද නොගැලපේ" +02000B11="මුරපද සඳහා ඉංග්‍රිසි අකුරු, ඉලක්කම් සහ විශේෂිත සංකේත පමණක් භාවිතා කරන්න (!, #, $, ...)" +02000B12="මුරපදය දිග වැඩිය" + +; Progress dialog +02000C00="ක්‍රියාවලිය" +02000C01="ගතවූ කාලය:" +02000C02="ඉතිරි කාලය:" +02000C03="සම්පූර්ණ විශාලත්වය:" +02000C04="වේගය:" +02000C05="ක්‍රියාවලියට භාජනය වූ ප්‍රමාණය:" +02000C06="හැකිළුම් අනුපාතය:" + +02000C10="පසුබිමින් (&B)" +02000C11="පෙරබිමින් (&F)" +02000C12="මදකට නවතන්න (&P)" +02000C13="නැවත අරඹන්න (&C)" + +02000C20="මදකට නවතා ඇත" + +02000C30="ඉවත්වීමට අවශ්‍ය බව විශ්වාස ද ?" + +; Compress dialog +02000D00="හැකිළුමකට එක් කරන්න" +02000D01="හැකිළුම (&A):" +02000D02="යාවත්කාල කිරීමේ ස්වභාවය (&U):" +02000D03="හැකිළුම් රටාව (&F):" +02000D04="හැකිළුම් ක්‍රමය (&M):" +02000D05="සවි හැකිළුමක් තනන්න (&S)" +02000D06="පරාමිති (&P):" +02000D07="විකල්ප" +02000D08="SF&X හැකිළුමක් තනන්න" +02000D09="Multi-threading" +02000D0A="ගොනු නාම සුරකින්න (&S)" +02000D0B="හැකිළුම් මට්ටම (&L):" +02000D0C="&Dictionary size:" +02000D0D="&Word size:" +02000D0E="හැකිලීම සඳහා මතක භාවිතය:" +02000D0F="ලිහීම ක්‍රියාව සඳහා මතක භාවිතය:" +02000D10="සුරැකුම්" +02000D11="සුරැකුම් ක්‍රමය:" +02000D12="Number of CPU threads:" +02000D13="Solid block size:" +02000D14="සවි-නොමැති" +02000D15="සවි" +02000D16="හවුල්කාර ගොනු ද හකුළන්න" + +02000D40="කොටස් වලට බෙදන්න, බයිට (bytes):" +02000D41="වැරදි කොටස් විශාලත්වයකි" +02000D42="සඳහන් කරන ලද කොටස් විශාලත්වය බයිට {0} කි.\nහැකිළුම මෙවන් කොටස් වලට බෙදියයුතු බව විශ්වාස ද ?" + +02000D81="තැන්පත් කරන්න" +02000D82="සාමාන්‍ය" +02000D83="උපරිම" +02000D84="වේගවත්" +02000D85="ඉතා වේගවත්" +02000D86="අධි හැකිළුම්‍" + +02000D90="සොයන්න" + +02000DA1="ගොනු එක් කර ප්‍රතිස්ථාපනය කරන්න" +02000DA2="ගොනු යාවත්කාල කර එක් කරන්න" +02000DA3="දැනටමත් ඇති ගොනු නැවුම් කරන්න" +02000DA4="ගොනු සමකාලී කරන්න" + +02000DB1="සියළු ගොනු" + +02000DC0="හකුළමින් පවතී" + +; Columns dialog +02000E00="කොලම" +02000E01="මෙම බහාලුමේ දිස්වනවාට ඔබ කැමති කොලමයන් තෝරන්න. කොලමයන් පිලිවෙල කිරීම සඳහා ඉහළට සහ පහළට යන බොත්තම් භාවිත කරන්න." +02000E02="තෝරාගත් කොලමයන්," +02000E03="පික්සල් පළල (&W)." + +02000E10="ඉහළට (&U)" +02000E11="පහළට (&D)" +02000E12="පෙන්වන්න (&S)" +02000E13="සඟවන්න (&H)" +02000E14="පිහිටුවන්න" + +02000E81="නාමය" +02000E82="පළල" + +; Testing +02000F90="පරීක්ෂා කිරීම" + +; File Manager + +03000000="7-Zip ගොනු කළමනාකරු" + +; Menu +03000102="ගොනුව (&F)" +03000103="සැකසුම් (&E)" +03000104="දසුන (&V)" +03000105="මෙවලම් (&T)" +03000106="උදව් (&H)" +03000107="කැමතිම (&A)" + +; File +03000210="විවෘත කරන්න (&O)" +03000211="මෙහිම විවෘත කරන්න (&I)" +03000212="පිටතින් විවෘත කරන්න (&U)" +03000220="දසුන (&V)" +03000221="සංස්කරණය කරන්න (&E)" +03000230="නැවත නම් කරන්න (&M)" +03000231="වෙනත් තැනකට පිටපත් කරන්න (&C)..." +03000232="වෙනත් තැනකට ගෙනය‍න්න (&M)..." +03000233="මකන්න (&D)" +03000240="වත්කම් (&R)" +03000241="ටීකා (&N)" +03000242="checksum ගණනය කරන්න" +03000250="බහාලුමක් තනන්න" +03000251="ගොනුවක් තනන්න" +03000260="ඉවත් වන්න (&X)" +03000270="ගොනුව බෙදන්න (&S)..." +03000271="ගොනු එකතු කරන්න (&B)..." + +; Edit +03000310="අහෝසි කරන්න (&U)" +03000311="යළි කරන්න (&R)" +03000320="කපන්න (&T)" +03000321="පිටපත් කරන්න (&C)" +03000322="අලවන්න (&P)" +03000323="මකන්න (&D)" +03000330="සියල්ල තෝරන්න (&A)" +03000331="තෝරන ලද සියල්ල ඉන් ඉවත් කරන්න" +03000332="අනෙක් පැත්තට තෝරන්න (&I)" +03000333="තෝරන්න..." +03000334="තේරීම ඉවත් කරන්න..." +03000335="වර්ගයෙන් තෝරන්න" +03000336="වර්ගයෙන් තේරීම ඉවත් කරන්න" + +; View +03000410="විශාල මූර්ති (&G)" +03000411="කුඩා මූර්ති (&M)" +03000412="ලයිස්තුව (&L)" +03000413="සවිස්තර (&D)" +03000420="අසුරන නොලද" +03000430="ප්‍රධාන බහාලුම විවෘත කරන්න" +03000431="ඉහළට එක් ස්ථරයක්" +03000432="බහාලුම් අතීතය..." +03000440="ප්‍රතිපූරණය කරන්න(&R)" +03000449="පැතලි දසුන" +03000450="පැනල &2" +03000451="මෙවලම් තීරු (&T)" +03000460="හැකිළුම් මෙවලම් තීරුව" +03000461="සම්මත මෙවලම් තීරුව" +03000462="විශාල බොත්තම්" +03000463="බොත්තම් පෙළ දක්වන්න" + +; Tools +03000510="විකල්ප (&O)..." +03000511="&Benchmark" + +; Help +03000610="අන්තර්ගතය (&C)..." +03000620="7-Zip පිළිබඳව (&A)..." + +; Favorites +03000710="බහාලුම කැමතිම අංග වලට එකතු කරන අයුර (&A)" +03000720="පොත් සලකුණ - අංක" + +; Options Dialog + +03010000 = "විකල්ප" + +; Plugins +03010100 = "ප්ලගින" +03010101 = "ප්ලගින (&P):" +03010110 = "විකල්ප..." + +; Edit +03010200 = "සංස්කාරකය" +03010201 = "සංස්කාරකය (&E):" + +; System +03010300 = "පද්ධතිය" +03010302 = "7-Zip සමග හවුල් කරන්න:" +03010310 = "ප්ලගින" + +; Settings +03010400 = "සෙටිංග්ස්" +03010401 = "\"..\" අංගය පෙන්වන්න" +03010402 = "ගොනු වල සත්‍ය මූර්තිය පෙන්වන්න" +03010410 = "පද්ධති මෙනුව පෙන්වන්න" +03010420 = "සම්පූර්ණ තීරු තේරීම (&F)" +03010421 = "වගු රේභා පෙන්වන්න (&G)" +03010430 = "වෛකල්පිත තේරීම් ස්වභාවය (&A)" +03010440 = "විශාල මතක පිටු භාවිතා කරන්න (&L)" + +; Strings + +03020201 = "පිටපත් කරන්න" +03020202 = "ගෙනයන්න" +03020203 = "වෙනත් තැනකට පිටපත් කරන්න:" +03020204 = "වෙනත් තැනකට ගෙනයන්න:" +03020205 = "පිටපත් කරමින් පවතී..." +03020206 = "ගෙනයමින් පවතී..." +03020207 = "මෙවන් බහාලුම් වලට ගොනු පිටපත් හෝ ගෙනයාම කළ නොහැක." +03020208 = "ක්‍රියාව කල නොහැක." +03020209 = "ගමනාන්ත බහාලුම තෝරන්න." + +03020210 = "ගොනු මැකීම තහවුරු කිරීම" +03020211 = "බහාලුම් මැකීම තහවුරු කිරීම" +03020212 = "බහු ගොනු මැකීම තහවුරු කිරීම" +03020213 = "ඔබට '{0}' මැකීමට අවශ්‍ය බව විශ්වාස ද ?" +03020214 = "ඔබට '{0}' බහාලුම හා එහි අන්තර්ගතය මැකීමට අවශ්‍ය බව විශ්වාස ද ?" +03020215 = "ඔබට {0} යන වස්තු මැකීමට අවශ්‍ය බව විශ්වාස ද ?" +03020216 = "මකමින් පවතී..." +03020217 = "ගොනුව හෝ බහාලුම මැකීමේ දී දෝෂයක් මතු විය" +03020218="දිගු මංපෙතක් ඇති ගොනුවක් කුණු බඳුනට යැවීම පද්ධතියට කල නොහැක." + +03020220 = "ප්‍රතිනම් කරමින් පවතී..." +03020221 = "ගොනුව හෝ බහාලුම මැකීමේදී දෝෂයක් මතු විය" +03020222 = "ගොනු පිටපත් කිරීම තහවුරු කිරීම" +03020223 = "ගො‍නුව හැකිළුම වෙත පිටපත් කළ යුතු බව ඔබට විශ්වාස ද" + +03020230 = "බහාලුමක් තනන්න" +03020231 = "බහාලුම් නාමය:" +03020232 = "නව බහාලුමක්" +03020233 = "බහාලුම තැනීමේදී දෝෂයක් මතුවිය" + +03020240 = "ගොනුවක් තනන්න" +03020241 = "ගොනු නාමය:" +03020242 = "නව ගොනුවක්" +03020243 = "ගොනුව තැනීමේදී දෝෂයක් මතුවිය" + +03020250 = "තෝරන්න" +03020251 = "තේරීම ඉවත් කරන්න" +03020252 = "ගොනුවේ හෝ බහාලුමේ නම හෝ කොටසක්:" + +03020260 = "බහාලුම් අතීතය" + +03020280 = "'{0}' ගොනුව නව්‍ය කෙරිනි.\nහැකිළුමෙහි එය යාවත්කාල කිරීමට ඔබට අවශ්‍ය ද ?" +03020281 = "ගොනුව යාවත්කාල කල නොහැක\n'{0}'" +03020282 = "සංස්කාරකය විවෘත කළ නොහැක." +03020283 = "විවෘත කරමින් පවතී..." +03020284="ගොනුව වෛරසයක් වැනිය (ගොනු නාමයේ දිගු හිස් තැන් ඇත)." + +03020290 = "ටීකාව" +03020291 = "ටීකාව (&C):" + +030202A0 = "පද්ධතිය" + +03020300 = "පරිගණකය" +03020301 = "ජාලය" +03020302="ලියකියවිලි" + +03020400 = "හකුළන්න" +03020401 = "ලිහන්න" +03020402 = "පරීක්ෂා කරන්න" + +03020420 = "පිටපත් කරන්න" +03020421 = "ගෙන යන්න" +03020422 = "මකන්න" +03020423 = "තොරතුරු" + +03020500 = "ගොනුව බෙදන්න" +03020501 = "ගොනුව බෙදා කොටස් මෙහි තැන්පත් කරන්න (&S):" +03020510 = "ගොනුව බෙදමින් පවතී..." +03020520 = "ගොනුව බෙදීම තහවුරු කරන්න" +03020521 = "ගොනුව කොටස් {0} කට බෙදීමට අවශ්‍ය බව ඔබට විශ්වාස ද ?" +03020522 = "බෙදූ කොටසක විශාලත්වය, මුල් ගොනුවේ විශාලත්වයට වඩා අඩු විය යුතුය" + +03020600 = "බෙදූ ගොනු එක් කරන්න" +03020601 = "බෙදූ ගොනු එක් කර මෙහි තැනපත් කරන්න (&C):" +03020610 = "බෙදූ ගොන එක් කරමින් පවතී..." +03020620 = "පළමු ගොනුව පමණක් තෝරන්න" +03020621="ගොනුව, බෙදන ලද ගොනුවක කොටසක් ලෙස හඳුනාගත නොහැක." +03020622="බෙදන ලද ගොනුවේ කොටස් වලින් එකකට වඩා සොයාගත නොහැක." + +03020710 = "Checksum calculating..." +03020720 = "Checksum information" +03020721 = "CRC checksum for data:" +03020722 = "CRC checksum for data and names:" + +03020800 = "සුපිරික්සමින් පවතී..." + +03020900 = "වත්කම්" + +03020A01="දිගු මංපෙතක් ඇති බහාලුමකින් ක්‍රියාකාරීත්වය කැඳවිය නොහැක." +03020A02="එක් ගොනුවක් පමණක් තේරිය යුතුය." +03020A03="ගොනු එකක් හෝ වැඩි ගණනක් තේරිය යුතුය." +03020A04="{0} ගොනුව දැනටමත් ඇත" + +; Computer +03031100 = "සම්පූර්ණ විශාලත්වය" +03031101 = "නිදහස් ඉඩ" +03031102 = "Cluster විශාලත්වය" +03031103 = "නම් à¶´à¶­" + +; Network +03031200 = "Local Name" +03031201 = "සපයන්නා" + +; Benchmark Dialog + +03080000 = "Benchmark" +03080001 = "මතක භාවිතය:" +03080002 = "හැකිළුම්" +03080003 = "ලිහුම්" +03080004 = "වේගය" +03080005 = "ඇගයුම" +03080006 = "සම්පූර්ණ ඇගයුම" +03080007 = "වත්මන්" +03080008 = "ප්‍රතිඵලිත" +03080009 = "Passes:" +0308000A = "දෝෂ:" +0308000B = "CPU භාවිතාව" +0308000C = "ඇගයුම / භාවිතාව‍" + +;!@LangEnd@! + + diff --git a/GUI/Lang/sk.txt b/GUI/Lang/sk.txt new file mode 100644 index 0000000..b123d82 --- /dev/null +++ b/GUI/Lang/sk.txt @@ -0,0 +1,543 @@ +;!@Lang@!UTF-8! +; 7-Zip 9.07 beta +; Translated by Pavel Devečka +; +; +; +; + +00000000="Slovak" +00000001="Slovenčina" +00000002="27" + +; 7-Zip Configuration + +; Title +01000000="Nastavenia 7-Zip" + +; Info Page +01000100="O programe 7-Zip" +01000103="7-Zip je voľne šíriteľný program. Jeho vývoj môžete podporiÅ¥ tým, že sa zaregistrujete." +01000104="PodporiÅ¥" +01000105="ZaregistrovaÅ¥" + +; Folders Page +01000200="Adresáre" +01000210="&Pracovný adresár" +01000211="&Systémový adresár pre dočasné súbory" +01000212="&Aktuálny adresár" +01000213="&Manuálne vybraný adresár:" +01000214="Po&užiÅ¥ len pre vymeniteľné jednotky" + +01000281="Vyberte adresár pre dočasné súbory." + +; System Page +01000300="Systém" +01000301="IntegrovaÅ¥ 7-Zip do kontextového menu" +01000302="Kaskádové kontextové menu" +01000310="Položky kontextového menu:" + +; Language Page +01000400="Jazyk" +01000401="Jazyk:" + + +; 7-Zip Explorer extension + +; Context menu +02000101="7-Zip" +02000102="Príkazy 7-Zip" +02000103="OtvoriÅ¥ archív" +02000104="Otvorí vybraný archív." +02000105="RozbaliÅ¥ súbory..." +02000106="Rozbalí súbory z vybraného archívu." +02000107="PridaÅ¥ do archívu..." +02000108="Pridá vybrané položky do archívu." +02000109="OtestovaÅ¥ archív" +0200010A="Otestuje integritu vybraného archívu." +0200010B="RozbaliÅ¥ tu" +0200010C="Rozbalí súbory z vybraného archívu do aktuálneho adresára." +0200010D="RozbaliÅ¥ do {0}" +0200010E="Rozbalí súbory do podadresára." +0200010F="PridaÅ¥ do {0}" +02000110="Pridá vybrané položky do archívu." +02000111="SkomprimovaÅ¥ a poslaÅ¥ emailom..." +02000112="Skomprimuje vybrané položky do archívu a poÅ¡le archív emailom." +02000113="SkomprimovaÅ¥ do {0} a poslaÅ¥ emailom" +02000114="Skomprimuje vybrané položky do archívu a poÅ¡le archív emailom." + +02000140="" +02000141="" + +; Properties +02000203="Cesta" +02000204="Meno" +02000205="Prípona" +02000206="Adresár" +02000207="VeľkosÅ¥" +02000208="VeľkosÅ¥ po kompresii" +02000209="Atribúty" +0200020A="Vytvorený" +0200020B="Sprístupnený" +0200020C="Zmenený" +0200020D="Jednoliaty" +0200020E="Komentovaný" +0200020F="ZaÅ¡ifrovaný" +02000210="Rozdelený predtým" +02000211="Rozdelený potom" +02000212="Slovník" +02000213="CRC" +02000214="Typ" +02000215="Anti" +02000216="Metóda" +02000217="Hostiteľský OS" +02000218="Súborový systém" +02000219="Užívateľ" +0200021A="Skupina" +0200021B="Blok" +0200021C="Komentár" +0200021D="Pozícia" +0200021E="Predpona cesty" +0200021F="Adresáre" +02000220="Súbory" +02000221="Verzia" +02000222="Zväzok" +02000223="Multizväzok" +02000224="Ofset" +02000225="Väzby" +02000226="Bloky" +02000227="Zväzky" + +02000229="64-bitov" +0200022A="Big-endian" +0200022B="CPU" +0200022C="Fyzická veľkosÅ¥" +0200022D="VeľkosÅ¥ hlavičiek" +0200022E="Kontrolný súčet" +0200022F="Charakteristiky" +02000230="Virtuálna adresa" +02000231="ID" +02000232="Skrátený názov" +02000233="Aplikácia" +02000234="VeľkosÅ¥ sektoru" +02000235="Režim" +02000236="Odkaz" + +; Status bar +02000301="{0} objekt(ov) vybraných" +02000302="{0} objekt(ov)" + +02000320="Súbory:" +02000321="Adresáre:" +02000322="VeľkosÅ¥:" +02000323="VeľkosÅ¥ po kompresii:" +02000324="Archívy:" + +; List Context Menu +02000401="&Stĺpce..." + +02000411="&OtvoriÅ¥" +02000412="&RozbaliÅ¥..." + +; ToolBar +02000501="RozbaliÅ¥" + +; Messages +02000601="Aktualizačné operácie nie sú v tomto archíve podporované." +02000602="Nemožno aktualizovaÅ¥ archív {0}" +02000603="Nemožno vytvoriÅ¥ adresár '{0}'." +02000604="Súbor nie je podporovaný archív." +02000605="Chyba" +02000606="Priveľa položiek" +02000607="Žiadna aplikácia nie je priradená k súborom s touto príponou." +02000608="V archíve sa nenaÅ¡li žiadne chyby." +02000609="Súbor '{0}' nemožno otvoriÅ¥ ako archív." +0200060A="Nemožno otvoriÅ¥ Å¡ifrovaný archív '{0}'. Nesprávne heslo?" +0200060B="Systém nemôže alokovaÅ¥ požadované množstvo pamäte." +0200060C="Neznáma chyba" +0200060D="Nepodporovaný typ archívu" + +; Dialogs +02000702="OK" +02000705="&Áno" +02000707="Áno na &vÅ¡etko" +02000709="&Nie" +0200070B="Nie na vÅ¡&etko" + +02000710="Storno" +02000711="&Storno" +02000713="&ZatvoriÅ¥" +02000714="ZastaviÅ¥" +02000715="ReÅ¡tartovaÅ¥" + +02000720="Nápoveda" + +; Extract dialog +02000800="RozbaliÅ¥" +02000801="RozbaliÅ¥ do:" +02000802="Heslo" + +02000810="Nastavenie názvov ciest" +02000811="Plné názvy ciest" +02000812="Aktuálne názvy ciest" +02000813="Žiadne názvy ciest" + +02000820="Nastavenie prepísania" +02000821="SpýtaÅ¥ sa pred prepísaním" +02000822="PrepísaÅ¥ bez výzvy" +02000823="PreskočiÅ¥ existujúce súbory" +02000824="Automaticky premenovaÅ¥" +02000825="Auto. premenovaÅ¥ existujúce súbory" + +02000830="Súbory" +02000831="&Vybrané súbory" +02000832="VÅ¡&etky súbory" + +02000881="Å pecifikujte adresár pre rozbalené súbory." + +02000890="Rozbaľovanie" + +; Overwrite dialog +02000900="Potvrdenie nahradenia súboru" +02000901="Cieľový adresár už obsahuje rozbaľovaný súbor." +02000902="Chcete nahradiÅ¥ existujúci súbor" +02000903="týmto?" + +02000911="&Automaticky premenovaÅ¥" + +02000982="{0} bajtov" +02000983="upravených" + +; Messages dialog +02000A00="Diagnostické správy" + +02000A80="Správa" + +02000A91="Nepodporovaná kompresná metóda pre '{0}'." +02000A92="Dátová chyba v '{0}'. Súbor je poruÅ¡ený." +02000A93="CRC zlyhalo v '{0}'. Súbor je poruÅ¡ený." +02000A94="Dátová chyba v Å¡ifrovanom súbore '{0}'. Nesprávne heslo?" +02000A95="CRC zlyhalo v Å¡ifrovanom súbore '{0}'. Nesprávne heslo?" + +; Password dialog +02000B00="Zadajte heslo" +02000B01="Zadajte heslo:" +02000B02="UkázaÅ¥ heslo" +02000B03="Zopakujte heslo:" +02000B10="Heslá nie sú zhodné!" +02000B11="Používajte len písmená bez diakritiky, čísla a Å¡peciálne znaky (!, #, $, ...)!" +02000B12="Heslo je príliÅ¡ dlhé!" + +; Progress dialog +02000C00="Priebeh" +02000C01="Uplynutý čas:" +02000C02="Zostávajúci čas:" +02000C03="VeľkosÅ¥:" +02000C04="RýchlosÅ¥:" +02000C05="Spracované:" +02000C06="Úroveň kompresie:" + +02000C10="&Pozadie" +02000C11="P&opredie" +02000C12="Po&zastaviÅ¥" +02000C13="Po&kračovaÅ¥" + +02000C20="Pozastavené" + +02000C30="Ste si istý, že chcete akciu zruÅ¡iÅ¥?" + +; Compress dialog +02000D00="PridaÅ¥ do archívu" +02000D01="&Archív:" +02000D02="&Nastavenie aktualizácie súborov v existujúcich archívoch:" +02000D03="&Formát archívu:" +02000D04="&Kompresná metóda:" +02000D05="V&ytvoriÅ¥ jednoliaty archív" +02000D06="&Parametre:" +02000D07="Možnosti" +02000D08="VytvoriÅ¥ samorozbaľovací archív" +02000D09="Multi-threading" +02000D0A="ZaÅ¡ifrovaÅ¥ mená súborov" +02000D0B="Ú&roveň kompresie:" +02000D0C="&VeľkosÅ¥ slovníka:" +02000D0D="V&eľkosÅ¥ slova:" +02000D0E="Pamäť potrebná na kompresiu:" +02000D0F="Pamäť potrebná na dekompresiu:" +02000D10="Å ifrovanie" +02000D11="Metóda Å¡ifrovania:" +02000D12="Poče&t CPU vlákien:" +02000D13="Veľk&osÅ¥ jednoliateho bloku:" +02000D14="Nejednoliaty" +02000D15="Jednoliaty" +02000D16="KomprimovaÅ¥ zdieľané súbory" + +02000D40="Roz&deliÅ¥ na časti, bajtov:" +02000D41="Nesprávna veľkosÅ¥ časti" +02000D42="Vybraná veľkosÅ¥ časti: {0} bytov.\nSte si istý, že chcete rozdeliÅ¥ archív na také časti?" + +02000D81="Bez kompresie" +02000D82="Normálna" +02000D83="Maximálna" +02000D84="Rýchla" +02000D85="NajrýchlejÅ¡ia" +02000D86="Ultra" + +02000D90="PrechádzaÅ¥" + +02000DA1="PridaÅ¥ a nahradiÅ¥ súbory" +02000DA2="AktualizovaÅ¥ a pridaÅ¥ súbory" +02000DA3="AktualizovaÅ¥ existujúce súbory" +02000DA4="SynchronizovaÅ¥ súbory" + +02000DB1="VÅ¡etky súbory" + +02000DC0="Komprimovanie" + +; Columns dialog +02000E00="Stĺpce" +02000E01="ZaÅ¡krtnite stĺpce, ktoré by ste radi zviditeľnili v tomto adresári. Použite tlačítka Posunúť hore a Posunúť dole na usporiadanie stĺpcov." +02000E02="Vybraný stĺpec by mal byÅ¥" +02000E03="pixelov &Å¡iroký." + +02000E10="Posunúť &hore" +02000E11="Posunúť &dole" +02000E12="&UkázaÅ¥" +02000E13="&SkryÅ¥" +02000E14="NastaviÅ¥" + +02000E81="Titulok" +02000E82="Šírka" + +; Testing +02000F90="Výsledok testovania" + + +; File Manager + +03000000="7-Zip File Manager" + +; Menu +03000102="&Súbor" +03000103="&UpraviÅ¥" +03000104="&ZobraziÅ¥" +03000105="&Nástroje" +03000106="Ná&poveda" +03000107="&Obľúbené" + +; File +03000210="&OtvoriÅ¥" +03000211="O&tvoriÅ¥ vnútri" +03000212="Ot&voriÅ¥ externe" +03000220="&ZobraziÅ¥" +03000221="&UpraviÅ¥" +03000230="&PremenovaÅ¥" +03000231="&KopírovaÅ¥ do..." +03000232="P&resunúť do..." +03000233="O&dstrániÅ¥" +03000240="V&lastnosti" +03000241="Ko&mentár" +03000242="VypočítaÅ¥ kontrolný súčet" +03000243="Rozdiel (Diff)" +03000250="VytvoriÅ¥ adresár" +03000251="VytvoriÅ¥ súbor" +03000260="Uko&nčiÅ¥" +03000270="Ro&zdeliÅ¥ súbor..." +03000271="Zlúč&iÅ¥ súbory..." + +; Edit +03000310="&Späť" +03000311="&Znovu" +03000320="&Vystrihnúť" +03000321="&KopírovaÅ¥" +03000322="V&ložiÅ¥" +03000323="&VymazaÅ¥" +03000330="OznačiÅ¥ vÅ¡etko" +03000331="OdznačiÅ¥ vÅ¡etko" +03000332="InvertovaÅ¥ označenie" +03000333="OznačiÅ¥..." +03000334="OdznačiÅ¥..." +03000335="OznačiÅ¥ podľa typu" +03000336="OdznačiÅ¥ podľa typu" + +; View +03000410="&Veľké ikony" +03000411="&Malé ikony" +03000412="&Zoznam" +03000413="&Podrobnosti" +03000420="NetriediÅ¥" +03000430="OtvoriÅ¥ koreňový adresár" +03000431="O úroveň vyššie" +03000432="História adresárov..." +03000440="&ObnoviÅ¥" +03000449="Plochý pohľad" +03000450="&2 Panely" +03000451="P&anely nástrojov" +03000460="Archív" +03000461="Å tandard" +03000462="Veľké ikony" +03000463="Textový popis pod ikonami" + +; Tools +03000510="N&astavenia" +03000511="&Skúšobný test" + +; Help +03000610="&Obsah nápovedy" +03000620="O p&rograme 7-Zip" + +; Favorites +03000710="PridaÅ¥ adresár medzi Obľúbené ako" +03000720="Záložka" + +; Options Dialog + +03010000="Nastavenia" + +; Plugins +03010100="Zásuvné moduly" +03010101="Zásuvné moduly:" +03010110="Konfigurácia" + +; Edit +03010200="Editor" +03010201="Editor:" +03010202="Vyhľadávač rozdielov (Diff):" + +; System +03010300="Systém" +03010302="AsociovaÅ¥ 7-Zip s vybranými typmi súborov:" +03010310="Zásuvný modul" + +; Settings +03010400="Nastavenia" +03010401="UkázaÅ¥ \"..\" položku" +03010402="UkázaÅ¥ skutočné ikony súborov" +03010410="UkázaÅ¥ systémové menu" +03010420="OznačiÅ¥ celý riadok" +03010421="ZobraziÅ¥ čiary mriežky" +03010422="OtvoriÅ¥ položku jednoduchým kliknutím" +03010430="Alternatívny mód výberu" +03010440="Použitie veľkých stránok pamäti" + +; Strings + +03020201="KopírovaÅ¥" +03020202="Presunúť" +03020203="KopírovaÅ¥ do:" +03020204="Presunúť do:" +03020205="Kopírovanie..." +03020206="Presúvanie..." +03020207="Nemôžete presunúť alebo kopírovaÅ¥ položky smerom do takých adresárov." +03020208="Operácia nie je podporovaná." +03020209="Vyberte cieľový adresár." + +03020210="Potvrdenie odstránenia súboru" +03020211="Potvrdenie odstránenia adresára" +03020212="Potvrdenie odstránenia viacerých položiek" +03020213="Ste si istý, že chcete odstrániÅ¥ súbor '{0}'?" +03020214="Ste si istý, že chcete odstrániÅ¥ adresár '{0}' a celý jeho obsah?" +03020215="Ste si istý, že chcete odstrániÅ¥ týchto {0} položiek?" +03020216="Odstraňovanie..." +03020217="Chyba pri odstraňovaní súboru alebo adresáru" +03020218="Systém nemôže do koÅ¡a presunúť súbor s dlhou cestou" + +03020220="Premenovanie..." +03020221="Chyba pri premenovaní súboru alebo adresáru" +03020222="PotvrdiÅ¥ kopírovanie súboru/súborov" +03020223="Ste si istý, že chcete kopírovaÅ¥ súbor/súbory do archívu?" + +03020230="VytvoriÅ¥ adresár" +03020231="Meno adresáru:" +03020232="Nový adresár" +03020233="Chyba pri vytváraní adresáru" + +03020240="VytvoriÅ¥ súbor" +03020241="Meno súboru:" +03020242="Nový súbor" +03020243="Chyba pri vytváraní súboru" + +03020250="OznačiÅ¥" +03020251="OdznačiÅ¥" +03020252="Maska:" + +03020260="História adresárov" + +03020280="Súbor '{0}' bol zmenený.\nChcete ho aktualizovaÅ¥ v archíve?" +03020281="Nemožno aktualizovaÅ¥ súbor\n'{0}'" +03020282="Nemožno spustiÅ¥ editor." +03020283="Otváranie..." +03020284="Súbor vyzerá ako vírus. (Meno súboru obsahuje veľa medzier.)" + +03020290="Komentár" +03020291="&Komentár:" + +030202A0="Systém" + +03020300="Počítač" +03020301="SieÅ¥" +03020302="Dokumenty" + +03020400="PridaÅ¥" +03020401="RozbaliÅ¥" +03020402="OtestovaÅ¥" + +03020420="KopírovaÅ¥" +03020421="Presunúť" +03020422="OdstrániÅ¥" +03020423="Vlastnosti" + +03020500="RozdeliÅ¥ súbor" +03020501="&RozdeliÅ¥ do:" +03020510="Rozdeľovanie..." +03020520="Potvrďte rozdeľovanie." +03020521="Ste si istý, že chcete rozdeliÅ¥ súbor na {0} častí?" +03020522="VeľkosÅ¥ časti musí byÅ¥ menÅ¡ia, než veľkosÅ¥ pôvodného súboru." + +03020600="ZlúčiÅ¥ súbory" +03020601="&ZlúčiÅ¥ do:" +03020610="Zlučovanie..." +03020620="Vyberte len prvý súbor." +03020621="Nie je možné detekovaÅ¥ súbor ako časÅ¥ rozdeleného súboru." +03020622="Nie je možné nájsÅ¥ viac ako jednu časÅ¥ rozdeleného súboru." + +03020710="Výpočet CRC..." +03020720="Informácie o CRC" +03020721="CRC pre dáta:" +03020722="CRC pre dáta a názvy:" + +03020800="Prehľadávanie..." + +03020900="Vlastnosti" + +03020A01="Operácia nemôže byÅ¥ volaná z adresára, ktorý má dlhú cestu." +03020A02="Musíte si vybraÅ¥ jeden súbor." +03020A03="Musíte si vybraÅ¥ jeden alebo viac súborov." +03020A04="Súbor {0} už existuje." + +; Computer +03031100="Celková veľkosÅ¥" +03031101="Voľné miesto" +03031102="VeľkosÅ¥ klastra" +03031103="Menovka" + +; Network +03031200="Lokálny názov" +03031201="Prevádzkovateľ" + +; Benchmark Dialog + +03080000="Skúšobný test" +03080001="Použitá pamäť:" +03080002="Komprimovanie" +03080003="Rozbaľovanie" +03080004="RýchlosÅ¥" +03080005="Hodnotenie" +03080006="Celkové hodnotenie" +03080007="Aktuálne:" +03080008="Výsledné:" +03080009="Testov bez chýb:" +0308000A="Chyby:" +0308000B="Využitie CPU" +0308000C="Hodn. / Využitie" + +;!@LangEnd@! diff --git a/GUI/Lang/sl.txt b/GUI/Lang/sl.txt new file mode 100644 index 0000000..9a2fe2c --- /dev/null +++ b/GUI/Lang/sl.txt @@ -0,0 +1,512 @@ +;!@Lang@!UTF-8! +; 7-Zip 4.55 +; First translation by tomazek +; All further translations and edits by miles +; +; +; + +00000000="Slovenian" +00000001="Slovenski" +00000002="36" + +; 7-Zip Configuration + +; Title +01000000="Konfiguracija 7-Zip" + +; Info Page +01000100="O programu 7-Zip" +01000103="7-Zip je brezplačen. Njegov razvoj podprete s tem, da se registrirate." +01000104="Podpora" +01000105="Registracija" + +; Folders Page +01000200="Mape" +01000210="&Delovna mapa" +01000211="&Sistemska začasna mapa" +01000212="&Trenutna mapa" +01000213="&Navedeno:" +01000214="Uporabi le za izmenljive pogone" + +01000281="Navedite mesto za začasne arhivske datoteke." + +; System Page +01000300="Sistem" +01000301="Integracija 7-Zip v kontekstni meni lupine" +01000302="Kaskadni kontekstni meni" +01000310="Izbire kontekstnega menija:" + +; Language Page +01000400="Jezik" +01000401="Jezik:" + + +; 7-Zip Explorer extension + +; Context menu +02000101="7-Zip" +02000102="Ukazi 7-Zip" +02000103="Odpri arhiv" +02000104="Odpre izbrani arhiv." +02000105="RazÅ¡iri datoteke ..." +02000106="RazÅ¡iri datoteke iz izbranega arhiva." +02000107="Stisni v arhiv ..." +02000108="Stisne izbrane datoteke ali mape v arhiv." +02000109="Preizkusi arhiv" +0200010A="Preveri integriteto izbranega arhiva." +0200010B="RazÅ¡iri semkaj" +0200010C="RazÅ¡iri datoteke izbranega arhiva v trenutno mapo." +0200010D="RazÅ¡iri v {0}" +0200010E="RazÅ¡iri datoteke v podmapo." +0200010F="Dodaj v {0}" +02000110="Stisne izbrane datoteke ali mape v arhiv." +02000111="Stisni in poÅ¡lji ..." +02000112="Stisne izbrane datoteke v arhiv in ga poÅ¡lje po elektronski poÅ¡ti." +02000113="Stisni v {0} in poÅ¡lji po e-poÅ¡ti" +02000114="Stisne izbrane datoteke v arhiv in ga poÅ¡lje po elektronski poÅ¡ti." + +02000140="" +02000141="" + +; Properties +02000203="Pot" +02000204="Ime" +02000205="Pripona" +02000206="Mapa" +02000207="Velikost" +02000208="Stisnjena velikost" +02000209="Atributi" +0200020A="Izdelano" +0200020B="Uporabljeno" +0200020C="Spremenjeno" +0200020D="Trdno" +0200020E="Komentirano" +0200020F="Å ifrirano" +02000210="Razdeli pred" +02000211="Razdeli po" +02000212="Slovar" +02000213="CRC" +02000214="Vrsta" +02000215="Anti" +02000216="Metoda" +02000217="Gostiteljski OS" +02000218="Datotečni sistem" +02000219="Uporabnik" +0200021A="Skupina" +0200021B="Blok" +0200021C="Opomba" +0200021D="Položaj" +0200021E="Predpona poti" +0200021F="Mape" +02000220="Datoteke" +02000221="Različica" +02000222="Nosilec" +02000223="Več nosilcev" +02000224="Zamik" +02000225="Povezave" +02000226="Bloki" +02000227="Nosilcev" + +; Status bar +02000301="Izbran(ih) {0} objekt(ov)" +02000302="{0} objekt(ov)" + +02000320="Datoteke:" +02000321="Mape:" +02000322="Velikost:" +02000323="Stisnjena velikost:" +02000324="Arhivi:" + +; List Context Menu +02000401="&Stolpci ..." + +02000411="&Odpri" +02000412="&RazÅ¡iri ..." + +; ToolBar +02000501="RazÅ¡iri" + +; Messages +02000601="Za ta arhiv operacije osveževanja niso podprte." +02000602="Arhiva {0} ni mogoče osvežiti" +02000603="Mape '{0}' ni mogoče ustvariti" +02000604="Datoteka ni podprti arhiv." +02000605="Napaka" +02000606="Preveč izbir" +02000607="S podano vrsto datoteke ni povezana nobena aplikacija" +02000608="Brez napak" +02000609="Datoteke '{0}' ni mogoče odpreti kot arhiv" +0200060A="Å ifriranega arhiva '{0}' ni mogoče odpreti. Je morda geslo napačno?" + +; Dialogs +02000702="V redu" +02000705="&Da" +02000707="Da za &vse" +02000709="&Ne" +0200070B="Ne za v&se" + +02000710="Prekliči" +02000711="P&rekliči" +02000713="&Zapri" +02000714="Zaustavi" +02000715="Ponovno zaženi" + +02000720="Pomoč" + +; Extract dialog +02000800="RazÅ¡iri" +02000801="R&azÅ¡iri v:" +02000802="Geslo" + +02000810="Poti" +02000811="Polne poti" +02000812="Trenutne poti" +02000813="Brez poti" + +02000820="Prepisovalni način" +02000821="Zahtevaj potrditev" +02000822="PrepiÅ¡i brez potrditve" +02000823="Preskoči obstoječe datoteke" +02000824="Samodejno preimenuj" +02000825="Samodejno preimenuj obstoječe datoteke" + +02000830="Datoteke" +02000831="Samo &izbrane" +02000832="&Vse datoteke" + +02000881="Določite mesto razÅ¡irjanja datotek." + +02000890="RazÅ¡irjanje" + +; Overwrite dialog +02000900="Potrditev zamenjave datoteke" +02000901="Ciljna mapa že vsebuje obdelovano datoteko." +02000902="Želite zamenjati obstoječo datoteko" +02000903="s to datoteko?" + +02000911="Samodejno &preimenuj" + +02000982="{0} bajtov" +02000983="spremenjena" + +; Messages dialog +02000A00="Diagnostična sporočila" + +02000A80="Sporočilo" + +02000A91="Nepodprta metoda stiskanja za '{0}'." +02000A92="Podatkovna napaka v '{0}'. Datoteka je poÅ¡kodovana." +02000A93="Napaka CRC v '{0}'. Datoteka je poÅ¡kodovana." +02000A94="Podatkovna napaka v Å¡ifrirani datoteki '{0}'. Je geslo pravilno?" +02000A95="Napaka CRC v Å¡ifrirani datoteki '{0}'. Je geslo pravilno?" + +; Password dialog +02000B00="Vnos gesla" +02000B01="Vnesite geslo:" +02000B02="&Pokaži geslo" +02000B03="Ponovno vnesite geslo:" +02000B10="Gesli se ne ujemata" +02000B11="Za geslo uporabite le črke, Å¡tevilke in posebne znake angleÅ¡ke abecede (!, #, $, ...)" +02000B12="Geslo je predolgo" + +; Progress dialog +02000C00="Obdelovanje" +02000C01="Pretečeni čas:" +02000C02="Preostali čas:" +02000C03="Velikost:" +02000C04="Hitrost:" +02000C05="Obdelano:" +02000C06="Razmerje stiskanja:" + +02000C10="&Ozadje" +02000C11="O&spredje" +02000C12="&Začasno zaustavi" +02000C13="&Nadaljuj" + +02000C20="Zaustavljen" + +02000C30="Ste prepričani, da želite preklicati?" + +; Compress dialog +02000D00="Dodaj v arhiv" +02000D01="&Arhiv:" +02000D02="&Način osveževanja:" +02000D03="&Vrsta arhiva:" +02000D04="&Metoda stiskanja:" +02000D05="Izdelaj &trdni arhiv" +02000D06="&Parametri:" +02000D07="Možnosti" +02000D08="Izdelaj arhiv SF&X" +02000D09="Večnitnost" +02000D0A="Å ifriraj &imena datotek" +02000D0B="Raven &stiskanja:" +02000D0C="&Velikost slovarja:" +02000D0D="Velikost &besede:" +02000D0E="Poraba pomnilnika za stiskanje:" +02000D0F="Poraba pomnilnika za razÅ¡irjanje:" +02000D10="Å ifriranje" +02000D11="Metoda Å¡ifriranja:" +02000D12="Å tevilo niti CPE:" +02000D13="Velikost trdnega bloka:" +02000D14="Ne-trdno" +02000D15="Trdno" +02000D16="Stisni skupne datoteke" + +02000D40="Razdeli na &nosilce velikosti (v bajtih):" +02000D41="Neveljavna velikost nosilca" +02000D42="Navedena velikost nosilca: {0} bajtov.\nSte prepričani, da želite razdeliti arhiv na takÅ¡ne nosilce?" + +02000D81="Brez stiskanja" +02000D82="Običajno" +02000D83="Največje stiskanje" +02000D84="Hitro" +02000D85="NajhitrejÅ¡e" +02000D86="Ultra" + +02000D90="Prebrskaj" + +02000DA1="Dodaj in zamenjaj datoteke" +02000DA2="Osveži in dodaj datoteke" +02000DA3="Osveži obstoječe datoteke" +02000DA4="Sinhroniziraj datoteke" + +02000DB1="Vse datoteke" + +02000DC0="Stiskanje" + +; Columns dialog +02000E00="Stolpci" +02000E01="Preverite stolpce, ki bi jih radi naredili vidne v tej mapi. Za preureditev njihovega vrstnega reda uporabite gumba Premakni gor in Premakni dol." +02000E02="Izbrani stolpec naj bo Å¡irok" +02000E03="&slikovnih točk." + +02000E10="Premakni &gor" +02000E11="Premakni &dol" +02000E12="&Prikaži" +02000E13="&Skrij" +02000E14="Nastavi" + +02000E81="Naslov" +02000E82="Å irina" + +; Testing +02000F90="PreizkuÅ¡anje" + + +; File Manager + +03000000="Upravitelj datotek 7-Zip" + +; Menu +03000102="&Datoteka" +03000103="&Urejanje" +03000104="&Pogled" +03000105="O&rodja" +03000106="Po&moč" +03000107="Pr&iljubljene" + +; File +03000210="&Odpri" +03000211="Odpri &znotraj" +03000212="Odpri zu&naj" +03000220="P&rikaz" +03000221="&Urejanje" +03000230="Prei&menuj" +03000231="&Kopiraj ..." +03000232="&Premakni ..." +03000233="Iz&briÅ¡i" +03000240="L&astnosti" +03000241="Opomb&e" +03000242="Izračunaj preskusno vsoto" +03000250="Ustvari mapo" +03000251="Ustvari datoteko" +03000260="&Izhod" +03000270="&Razdeli datoteko ..." +03000271="&Združi datoteke ..." + +; Edit +03000310="Ra&zveljavi" +03000311="P&onovi" +03000320="&Izreži" +03000321="&Kopiraj" +03000322="Prile&pi" +03000323="Iz&briÅ¡i" +03000330="Izberi &vse" +03000331="Razveljavi izbiro vseh" +03000332="&Preobrni izbor" +03000333="Izberi ..." +03000334="Razveljavi izbiro ..." +03000335="Izberi glede na vrsto" +03000336="Razveljavi izbiro glede na vrsto" + +; View +03000410="&Velike ikone" +03000411="&Majhne ikone" +03000412="&Seznam" +03000413="&Podrobnosti" +03000420="Nerazvrščeno" +03000430="Odpri korensko mapo" +03000431="Nadrejena raven" +03000432="Zgodovina mape ..." +03000440="&Osveži" +03000449="SploÅ¡en pogled" +03000450="&Dve podokni" +03000451="&Orodne vrstice" +03000460="Orodna vrstica arhiva" +03000461="Navadna orodna vrstica" +03000462="Veliki gumbi" +03000463="Pokaži besedilo gumbov" + +; Tools +03000510="&Možnosti ..." +03000511="Me&ritev" + +; Help +03000610="&Vsebina pomoči ..." +03000620="&O programu 7-Zip ..." + +; Favorites +03000710="&Dodaj mapo med Priljubljene kot" +03000720="Zaznamek" + +; Options Dialog + +03010000="Možnosti" + +; Plugins +03010100="Dodatki" +03010101="&Dodatki:" +03010110="Možnosti ..." + +; Edit +03010200="Urejevalnik" +03010201="&Urejevalnik:" + +; System +03010300="Sistem" +03010302="Poveži 7-Zip z:" +03010310="Dodatek" + +; Settings +03010400="Nastavitve" +03010401="Pokaži postavko \"..\"" +03010402="Pokaži prave ikone datotek" +03010410="Pokaži sistemski meni" +03010420="&Izbor celotne vrstice" +03010421="Pokaži &mrežne črte" +03010430="&Alternativni način izbiranja" +03010440="Uporabi &velike spominske strani" + +; Strings + +03020201="Kopiraj" +03020202="Premakni" +03020203="Kopiraj v:" +03020204="Premakni v:" +03020205="Kopiranje ..." +03020206="Premikanje ..." +03020207="Ne morete premakniti ali prekopirati elementov take mape." +03020208="Operacija ni podprta." +03020209="Izberite ciljno mapo." + +03020210="Potrditev brisanja datoteke" +03020211="Potrditev brisanja mape" +03020212="Potrditev brisanja več datotek" +03020213="Ste prepričani, da želite zbrisati '{0}'?" +03020214="Ste prepričani, da želite zbrisati mapo '{0}' in celotno njeno vsebino?" +03020215="Ste prepričani, da želite zbrisati teh {0} postavk?" +03020216="Brisanje ..." +03020217="Napaka pri brisanju datoteke ali mape" + +03020220="Preimenovanje ..." +03020221="Napaka pri preimenovanju datoteke ali mape" +03020222="Potrditev kopiranja datoteke" +03020223="Ste prepričani, da želite kopirati datoteke v arhiv?" + +03020230="Izdelava mape" +03020231="Ime mape:" +03020232="Nova mapa" +03020233="Napaka pri ustvarjanju mape" + +03020240="Ustvarjanje datoteke" +03020241="Ime datoteke:" +03020242="Nova datoteka" +03020243="Napaka pri ustvarjanju datoteke" + +03020250="Izberi" +03020251="Razveljavi izbiro" +03020252="Maska:" + +03020260="Zgodovina map" + +03020280="Datoteka '{0}' je bila spremenjena.\nJo želite osvežiti v arhivu?" +03020281="Datoteke ni mogoče osvežiti\n'{0}'" +03020282="Urejevalnika ni mogoče pognati." +03020283="Odpiranje ..." + +03020290="Opomba" +03020291="&Opomba:" + +030202A0="Sistem" + +03020300="Računalnik" +03020301="Omrežje" + +03020400="Dodaj" +03020401="RazÅ¡iri" +03020402="Preizkusi" + +03020420="Kopiraj" +03020421="Premakni" +03020422="IzbriÅ¡i" +03020423="Informacije" + +03020500="Razdeli datoteko" +03020501="&Razdeli na:" +03020510="Razdeljevanje ..." +03020520="Potrditev razdelitve" +03020521="Ste prepričani, da želite razdeliti datoteko na {0} nosilcev?" +03020522="Velikost nosilca mora biti manjÅ¡a kot velikost izvorne datoteke" + +03020600="Združi datoteke" +03020601="&Združi v:" +03020610="Združevanje ..." +03020620="Izberite samo prvo datoteko" + +03020710="Izračun preskusne vsote ..." +03020720="Podatki o preskusni vsoti" +03020721="Preskusna vsota za podatke:" +03020722="Preskusna vsota za podatke in imena:" + +03020800="Pregledovanje ..." + +03020900="Properties" + +; Computer +03031100="Skupna velikost" +03031101="Prostega prostora" +03031102="Velikost gruče" +03031103="Oznaka" + +; Network +03031200="Krajevno ime" +03031201="Ponudnik" + +; Benchmark Dialog + +03080000="Meritev" +03080001="Poraba pomnilnika:" +03080002="Stiskanje" +03080003="RazÅ¡irjanje" +03080004="Hitrost" +03080005="Ocena" +03080006="Skupna ocena" +03080007="Trenutno" +03080008="Končno" +03080009="Prehodi:" +0308000A="Napake:" +0308000B="Uporaba CPE" +0308000C="Ocena / uporaba" + +;!@LangEnd@! diff --git a/GUI/Lang/sq.txt b/GUI/Lang/sq.txt new file mode 100644 index 0000000..cf4f9c6 --- /dev/null +++ b/GUI/Lang/sq.txt @@ -0,0 +1,473 @@ +;!@Lang@!UTF-8! +; 7-Zip 4.37 +; Translated by Mikel Hasko +; +; +; +; + +00000000="Albanian" +00000001="Shqip" +00000002="28" + +; 7-Zip Configuration + +; Title +01000000="Konfigurimi i 7-Zip" + +; Info Page +01000100="Për 7-Zip" +01000103="7-Zip është softuer falas. Megjithatë, ju mund të përkrahni në zhvillimin e 7-Zip duke e regjistruar atë." +01000104="Përkrahja" +01000105="Regjistrimi" + +; Folders Page +01000200="Dosje" +01000210="&Dosja e punës" +01000211="Dosja e përkohshme e &sistemit" +01000212="Dosja &aktuale" +01000213="I sp&ecifikuar:" +01000214="Përdor vetëm për njësi të largueshme" + +01000281="Specifikoni një vendndodhje për skedarët e përkohshëm të arkivit." + +; System Page +01000300="Sistemi" +01000301="Integro 7-Zip në kontekst meny" +01000302="Kaskado kontekst menynë" +01000310="Elementë të kontekst menysë:" + +; Language Page +01000400="Gjuha" +01000401="Gjuha:" + + +; 7-Zip Explorer extension + +; Context menu +02000101="7-Zip" +02000102="Komanda të 7-Zip" +02000103="Hap arkivin" +02000104="Hap arkivin e selektuar." +02000105="Zbërthe skedarët..." +02000106="Zbërthen skedarët na arkivi i selektuar." +02000107="Shto në arkiv..." +02000108="Shton artikujt e zgjedhur në arkiv." +02000109="Testo arkivin" +0200010A="Teston integritetin e arkivit të selektuar." +0200010B="Zbërthe këtu" +0200010C="Zbërthen skedarët nga arkivi i zgjedhur në dosjen aktuale." +0200010D="Zbërthe në {0}" +0200010E="Zbërthen skedarët tek nëndosja." +0200010F="Shto tek {0}" +02000110="Shton artikujt e zgjedhur në arkiv." +02000111="Kompreso dhe dërgo me e-mail..." +02000112="Kompreson artikujt e zgjedhur në arkiv dhe e dërgon këtë të fundit me e-mail." +02000113="Kompreso në {0} dhe dërgo me e-mail" +02000114="Kompreson artikujt e zgjedhur në arkiv dhe e dërgon këtë të fundit me e-mail." + +02000140="" +02000141="" + +; Properties +02000203="Shtegu" +02000204="Emri" +02000205="Prapashtesa" +02000206="Dosja" +02000207="Madhësia" +02000208="Madhësia e mbërthimit" +02000209="Atributet" +0200020A="Krijuar më" +0200020B="Hyrë së fundi më" +0200020C="Modifikuar më" +0200020D="I qëndrueshëm" +0200020E="I komentuar" +0200020F="I shifruar" +02000210="Ndaj para" +02000211="Ndaj pas" +02000212="Fjalori" +02000213="CRC" +02000214="Tipi" +02000215="Anti" +02000216="Metoda" +02000217="Pronari i sistemit" +02000218="Sistemi i skedarit" +02000219="Përdoruesi" +0200021A="Grupi" +0200021B="Blloku" +0200021C="Komenti" +0200021D="Pozicioni" +0200021E="Prefiksi i shtegut" + +; Status bar +02000301="Selektuar {0} objekt(e)" +02000302="{0} objekt(e)" + +02000320="Skedarë:" +02000321="Dosje:" +02000322="Madhësia:" + +; List Context Menu +02000401="&Kolona..." + +02000411="&Hap" +02000412="&Zbërthe..." + +; ToolBar +02000501="Zbërthe" + +; Messages +02000601="Operacionet e azhurnimit për këtë arkiv s'përkrahen." +02000602="S'mund të azhurnojë arkivin {0}" +02000603="S'mund të krijojë dosjen '{0}'" +02000604="Skedari është një arkiv i papërkrahur." +02000605="Gabim" +02000606="Tepër shumë artikuj" +02000607="S'ka aplikim të lidhur me prapashtesën e dhënë të emrit të skedarit" +02000608="S'ka gabime" + +; Dialogs +02000702="Në rregull" +02000705="&Po" +02000707="Po për të gjith&a" +02000709="&Jo" +0200070B="Jo për të gjit&ha" + +02000710="Anulim" +02000711="&Anulim" +02000713="&Mbyll" +02000714="Ndalo" +02000715="Rinis" + +02000720="Ndihmë" + +; Extract dialog +02000800="Zbërthe" +02000801="Z&bërthe në:" +02000802="Fjalëkalimi" + +02000810="Mënyra e Shtegut" +02000811="Emra të plotë Shtigjesh" +02000812="Emrat aktualë të Shtigjeve" +02000813="Pa emra shtigjesh" + +02000820="Mënyra e mbishkrimit" +02000821="Pyet para se të mbishkruaj" +02000822="Mbishkruaj pa nxitje" +02000823="Mbikalo skedarët ekzistues" +02000824="Riemërto automatikisht" +02000825="Riemërto auto. skedarët ekzistues" + +02000830="Skedarët" +02000831="Skedarët e &selektuar" +02000832="&Të gjithë skedarët" + +02000881="Specifikoni një vendndodhje për skedarët e zbërthyer." + +02000890="Duke zbërthyer" + +; Overwrite dialog +02000900="Konfirmo zëvendësimin e skedarëve" +02000901="Dosja e destinacionit e përmban një herë skedarin e përpunuar." +02000902="Dëshironi ta zëvendësoni skedarin ekzistues" +02000903="me këtë?" + +02000911="R&iemërtim automatik" + +02000982="{0} bajt" +02000983="modifikuar më" + +; Messages dialog +02000A00="Mesazhe diagnostikues" + +02000A80="Mesazhi" + +02000A91="Metodë e papërkrahshme kompresimi për '{0}'." +02000A92="Gabim të dhënash në '{0}'. Skedari është i prishur." +02000A93="CRC dështoi '{0}'. Skedari është i prishur." + +; Password dialog +02000B00="Fusni fjalëkalimin" +02000B01="Fusni fjalëkalimin:" +02000B02="&Trego fjalëkalimin" + +; Progress dialog +02000C00="Procesi" +02000C01="Koha e kaluar:" +02000C02="Koha e mbetur:" +02000C03="Madhësia:" +02000C04="Shpejtësia:" + +02000C10="Në &sfond" +02000C11="Në pla&n të parë" +02000C12="&Pushim" +02000C13="&Vazhdim" + +02000C20="Në pushim" + +02000C30="Jeni të sigurt se dëshironi ta anuloni?" + +; Compress dialog +02000D00="Shto në arkiv" +02000D01="&Arkivi:" +02000D02="&Mënyra e azhurnimit:" +02000D03="&Formati i arkivit:" +02000D04="Metoda e kompr&esimit:" +02000D05="&Krijo një arkiv të qëndrueshëm" +02000D06="&Parametrat:" +02000D07="Opsionet" +02000D08="Krijo një arkiv SF&X" +02000D09="Multifillesë" +02000D0A="Shifro em&rat e skedarëve" +02000D0B="&Niveli i kompresimit:" +02000D0C="Ma&dhësia e fjalorit:" +02000D0D="Mad&hësia e fjalës:" +02000D0E="Shfrytëzimi i memo. për kompresimin:" +02000D0F="Shfrytëzimi i memo. për dekompresimin:" + +02000D40="Ndaj në &volume (madhësia jepet në bajt):" + +02000D81="Ruaj" +02000D82="Normal" +02000D83="Maksimal" +02000D84="I shpejtë" +02000D85="Më i shpejtë" +02000D86="Ultra" + +02000D90="Shfleto" + +02000DA1="Shto dhe zëvendëso skedarët" +02000DA2="Azhurno dhe shto skedarët" +02000DA3="Azhurno skedarët ekzistues" +02000DA4="Sinkronizo skedarët" + +02000DB1="Të gjithë skedarët" + +02000DC0="Duke kompresuar" + +; Columns dialog +02000E00="Kolonat" +02000E01="Verifikoni kolonat që dëshironi të jenë të dukshme në këtë dosje. Përdorni tastet \"Lëviz lartë\" & \"Lëviz poshtë\" për të rirenditur kolonat." +02000E02="Kolonat e zgjedhura duhet të jenë" +02000E03="piksel &të gjera." + +02000E10="Lëviz &lartë" +02000E11="Lëviz p&oshtë" +02000E12="&Shfaq" +02000E13="&Fshih" +02000E14="Cakto" + +02000E81="Titulli" +02000E82="Gjerësia" + +; Testing +02000F90="Duke testuar" + + +; File Manager + +03000000="Menaxheri i skedarëve 7-Zip" + +; Menu +03000102="&Skedari" +03000103="&Redaktimi" +03000104="&Pamja" +03000105="&Veglat" +03000106="&Ndihma" +03000107="&Të parapëlqyerit" + +; File +03000210="&Hap" +03000211="Hap përbre&nda" +03000212="Hap përjas&hta" +03000220="&Pamja" +03000221="&Redakto" +03000230="Ri&emërto" +03000231="&Kopjo tek..." +03000232="&Zhvendos tek..." +03000233="&Fshi" +03000240="&Vetitë" +03000241="Ko&menti" +03000242="Llogarit shumën e verifikimit" +03000250="Krijo një dosje" +03000251="Krijo një skedar" +03000260="&Dil" +03000270="N&daj skedarin..." +03000271="Kom&bino skedarët..." + +; Edit +03000310="&Zhbëj" +03000311="&Ribëj" +03000320="&Prit" +03000321="&Kopjo" +03000322="&Ngjit" +03000323="&Fshi" +03000330="S&elekto të gjithë" +03000331="Çse&lekto të gjithë" +03000332="Anasill selekti&min" +03000333="Selekto..." +03000334="Çselekto..." +03000335="Selekto sipas tipit" +03000336="Çselekto sipas tipit" + +; View +03000410="Ikona të &mëdha" +03000411="Ikona të &vogla" +03000412="&Listë" +03000413="&Detaje" +03000420="&Të parenditur" +03000430="Hap dosjen rrënjë" +03000431="Një nivel më lartë" +03000432="Historiku i dosjes..." +03000440="&Rifresko" +03000449="Pamje e rrafshtë" +03000450="&2 panele" +03000451="&Shiritat e veglave" +03000460="Shiriti i veglave i arkivit" +03000461="Shiriti standard i veglave" +03000462="Butona të mëdhenj" +03000463="Shfaq tekstin e butonave" + +; Tools +03000510="&Opsionet..." +03000511="&Etapa" + +; Help +03000610="&Përmbajtjet..." +03000620="&Për 7-Zip..." + +; Favorites +03000710="&Shto dosjen tek të parapëlqyerit si" +03000720="Shënuesi" + +; Options Dialog + +03010000="Opsionet" + +; Plugins +03010100="Plugins" +03010101="&Plugins:" +03010110="Opsionet..." + +; Edit +03010200="Redaktuesi" +03010201="&Redaktuesi:" + +; System +03010300="Sistemi" +03010302="Lidh 7-Zip me:" +03010310="Plugin" + +; Settings +03010400="Rregullimet" +03010401="Shfaq &artikullin \"..\"" +03010402="Shfaq &ikonat e vërteta të skedarëve" +03010410="Shfaq &menynë e sistemit" +03010420="Selekto të tërë &rreshtin" +03010421="Shfaq &vijat e rrjetit" +03010430="Mënyrë alternative &selektimi" +03010440="Përdor &faqe të mëdha të memories" + +; Strings + +03020201="Kopjo" +03020202="Zhvendos" +03020203="Kopjo tek:" +03020204="Zhvendos tek:" +03020205="Duke kopjuar..." +03020206="Duke zhvendosur..." +03020207="Ju s'mund të zhvendosni ose kopjoni artikuj për dosje të atilla." +03020208="Operacioni s'përkrahet." + +03020210="Konfirmo fshirjen e skedarit" +03020211="Konfirmo fshirjen e dosjes" +03020212="Konfirmo fshirjen e shumëfishtë të skedarëve" +03020213="Jeni të sigurt që doni të fshini '{0}'?" +03020214="Jeni të sigurt që doni të fshini dosjen '{0}' dhe tërë përmbajtjen e saj?" +03020215="Jeni të sigurt që doni t'i fshini këto {0} artikuj?" +03020216="Duke fshirë..." +03020217="Gabim gjatë fshirjes së skedarit apo dosjes" + +03020220="Duke riemërtuar..." +03020221="Gabim gjatë riemërtimit të skedarit apo dosjes" +03020222="Konfirmim për kopjimin e skedarëve" +03020223="Jeni të sigurt që doni të kopjoni skedarë në arkiv" + +03020230="Krijo një dosje" +03020231="Emri i dosjes:" +03020232="Dosje e re" +03020233="Gabim gjatë krijimit të dosjes" + +03020240="Krijo një skedar" +03020241="Emri i skedarit:" +03020242="Skedar i ri" +03020243="Gabim gjatë krijimit të skedarit" + +03020250="Selekto" +03020251="Çselekto" +03020252="Maska:" + +03020260="Historiku i dosjes" + +03020280="Skedari '{0}' u modifikua.\nDoni ta azhurnoni atë edhe në arkiv?" +03020281="S'mund të azhurnojë skedarin\n'{0}'" +03020282="S'mund të hap redaktuesin." +03020283="Duke hapur..." + +03020290="Komenti" +03020291="&Komenti:" + +030202A0="Sistemi" + +03020300="Kompjuteri" +03020301="Rrejti" + +03020400="Shto" +03020401="Zbërthe" +03020402="Testo" + +03020420="Kopjo" +03020421="Zhvendos" +03020422="Fshi" +03020423="Info" + +03020500="Ndaj skedarin" +03020501="&Ndaj në:" +03020510="Duke ndarë..." + +03020600="Kombino skedarët" +03020601="&Kombino në:" +03020610="Duke kombinuar..." + +03020710="Duke llogaritur shumën e verifikimit..." +03020720="Informacionet e shumës së verifikimit" +03020721="Shuma e verifikimit CRC për të dhënat:" +03020722="Shuma e verifikimit CRC për të dhënat dhe emrat:" + +03020800="Duke skanuar..." + +; Computer +03031100="Madhësia totale" +03031101="Hapësira e lirë" +03031102="Madhësia e cluster-it" +03031103="Etiketa" + +; Network +03031200="Emri lokal" +03031201="Kujdestari" + +; Benchmark Dialog + +03080000="Etapa" +03080001="Shfrytëzimi i memories:" +03080002="Kompresimi" +03080003="Dekompresimi" +03080004="Shpejtësia" +03080005="Vlerësimi" +03080006="Vlerësimi total" +03080007="Aktualisht" +03080008="Rezultati" +03080009="Kalime:" +0308000A="Gabime:" + +;!@LangEnd@! \ No newline at end of file diff --git a/GUI/Lang/sr-spc.txt b/GUI/Lang/sr-spc.txt new file mode 100644 index 0000000..ed6b38e --- /dev/null +++ b/GUI/Lang/sr-spc.txt @@ -0,0 +1,543 @@ +;!@Lang@!UTF-8! +; 7-Zip 9.07 +; Translated by Lazar update Ozzii +; +; +; +; + +00000000="Serbian - Cyrillic" +00000001="Српски - ћирилица" +00000002="26-3" + +; 7-Zip Configuration + +; Title +01000000="Подешавање 7-Zip-a" + +; Info Page +01000100="О програму" +01000103="7-Zip је бесплатан програм." +01000104="Подршка" +01000105="Регистрација" + +; Folders Page +01000200="Фасцикле" +01000210="Радна фасцикла" +01000211="Користи Windows-ову привремену фасциклу" +01000212="Тренутна" +01000213="Наведена:" +01000214="Користи само за измењиве медије" + +01000281="Наведите локацију за смештање привремених датотека." + +; System Page +01000300="Систем" +01000301="Убаци 7-Zip у системски мени" +01000302="Каскадни системски мени" +01000310="Ставке системског менија:" + +; Language Page +01000400="Језик" +01000401="Језик:" + + +; 7-Zip Explorer extension + +; Context menu +02000101="7-Zip" +02000102="7-Zip команде" +02000103="Отвори архиву" +02000104="Отвори изабрану архиву." +02000105="Издвој датотеке..." +02000106="Издвој датотеке из изабране архиве." +02000107="Додај у архиву..." +02000108="Додај изабране ставке у архиву." +02000109="Тестирај архиву" +0200010A="Тестирај интегритет изабране архиве." +0200010B="Издвој овде" +0200010C="Издвој датотеке из изабране архиве у тренутну фасциклу." +0200010D="Издвој у {0}" +0200010E="Издвој датотеке у подфасциклу." +0200010F="Додај у {0}" +02000110="Додај изабране датотеке у архиву." +02000111="Додај и направи e-mail..." +02000112="Додај обележене датотеке и направи e-mail." +02000113="Додај у {0} и направи e-mail" +02000114="Додај обележене датотеке и направи e-mail." + +02000140="" +02000141="" + +; Properties +02000203="Путања" +02000204="Назив" +02000205="Тип" +02000206="Фасцикла" +02000207="Величина" +02000208="Величина у запакованом стању" +02000209="Атрибути" +0200020A="Креирана" +0200020B="Приступано" +0200020C="Промењено" +0200020D="Солидно" +0200020E="Коментар" +0200020F="Шифровано" +02000210="Подели пре" +02000211="Подели после" +02000212="Речник" +02000213="ЦРЦ" +02000214="Тип" +02000215="Анти" +02000216="Метод" +02000217="Оперативни систем" +02000218="Систем датотека" +02000219="Корисник" +0200021A="Група" +0200021B="Блок" +0200021C="Коментар" +0200021D="Положај" +0200021E="Префикс путање" +0200021F="Фасцикле" +02000220="Датотеке" +02000221="Верзија" +02000222="Волумен" +02000223="ВишеВолумена" +02000224="Офсет" +02000225="Линкови" +02000226="Блокови" +02000227="Волумени" + +02000229="64-бит" +0200022A="Big-endian" +0200022B="Процесор" +0200022C="Физичка величина" +0200022D="Величина заглавља" +0200022E="Провера резултата" +0200022F="Карактеристике" +02000230="Виртуелна адреса" +02000231="ИД" +02000232="Кратко име" +02000233="Креатор апликације" +02000234="Величина сектора" +02000235="Начин" +02000236="Линк" + +; Status bar +02000301="{0} објекат(а) изабрано" +02000302="{0} објекат(а)" + +02000320="Датотеке:" +02000321="Фасцикле" +02000322="Величина:" +02000323="Компримована величина:" +02000324="Архиве:" + +; List Context Menu +02000401="Колона..." + +02000411="Отвори" +02000412="Издвој..." + +; ToolBar +02000501="Издвој" + +; Messages +02000601="Операција освежавања није дозвољена за ову архиву." +02000602="Не могу да освежим архиву {0}" +02000603="Не могу да креирам Фасциклу '{0}'" +02000604="Датотека није једна од подржаних архива." +02000605="Грешка" +02000606="Исувише ставки" +02000607="Ни једна апликација није додељена наведеној екстензији" +02000608="Није било никаквих грешака" +02000609="Не могу да отворим датотеку '(0)' као архива" +0200060A="Не могу да отворим шифровану архиву '(0)'. Погрешна лозинка?" +0200060B="Систем не може да издвоји потребну количину меморије" +0200060C="Непозната грешка" +0200060D="Неподржан тип архиве" + +; Dialogs +02000702="У реду" +02000705="Да" +02000707="Да за све" +02000709="Не" +0200070B="Не за све" + +02000710="Откажи" +02000711="Откажи" +02000713="Затвори" +02000714="Стани" +02000715="Поново" + +02000720="Помоћ" + +; Extract dialog +02000800="Издвој" +02000801="Издвој у:" +02000802="Шифра" + +02000810="Путање" +02000811="Пуна путања" +02000812="Тренутне путање" +02000813="Без путање" + +02000820="Замена" +02000821="Питај пре него што замениш" +02000822="Замени без запиткивања" +02000823="Прескочи постојеће датотеке" +02000824="Аутоматска промена назива" +02000825="Аутоматска промена назива постојећих датотека" + +02000830="Датотеке" +02000831="Изабрани датотеке" +02000832="Све датотеке" + +02000881="Наведи локацију где ће се издвајати датотеке из архива." + +02000890="Издвајање" + +; Overwrite dialog +02000900="Потврди замену датотеке" +02000901="Циљна фасцикла већ садржи датотеку која се тренутно обрађује." +02000902="Да ли желите да замените постојећу датотеку" +02000903="са овом?" + +02000911="Аутоматска промена назива" + +02000982="{0} бајтова" +02000983="модификовано" + +; Messages dialog +02000A00="Дијагностичке поруке" + +02000A80="Поруке" + +02000A91="Неподржани метод компресије за '{0}'." +02000A92="Грешка у '{0}'. Датотека је неисправана." +02000A93="CRC грешка у '{0}'. Датотека је неисправана." +02000A94="Грешке у кодирану датотеку '(0)' Погрешна лозинка." +02000A95="ЦРЦ грешка у шифроване датотеке '(0)' Погрешна лозинка." + +; Password dialog +02000B00="Унесите лозинку" +02000B01="Унесите лозинку:" +02000B02="Прикажи лозинку" +02000B03="Поново унесите лозинку:" +02000B10="Лозинке се не поклапају" +02000B11="Користи само енглеска слова, бројева и специјалних знакова (!, #, $, ...) За лозинке" +02000B12="Лозинка је предугачка" + +; Progress dialog +02000C00="Обрађујем" +02000C01="Протекло време:" +02000C02="Преостало време:" +02000C03="Величина:" +02000C04="Брзина:" +02000C05="Обрађено:" +02000C06="Компресиони однос:" + +02000C10="Позадина" +02000C11="На врху" +02000C12="Пауза" +02000C13="Настави" + +02000C20="Пауза" + +02000C30="Да ли сте сигурни да желите да прекинете?" + +; Compress dialog +02000D00="Додај у архиву" +02000D01="Архива:" +02000D02="Надоградња архива:" +02000D03="Формат архиве:" +02000D04="Тип компресије:" +02000D05="Креирај Solid архиву" +02000D06="Параметри:" +02000D07="Опције" +02000D08="Креирај SFX архиву" +02000D09="Више нити" +02000D0A="Шифруј називе датотека" +02000D0B="Ниво компресије:" +02000D0C="Dictionary size:" +02000D0D="Word size:" +02000D0E="Потребна меморија - компресија:" +02000D0F="Потребна меморија - декомпресија:" +02000D10="Шифровање" +02000D11="Метода шифровања:" +02000D12="Број низа процесора:" +02000D13="Величина чврстог блока:" +02000D14="Не-чврсте" +02000D15="Чврсто" +02000D16="Компресија дељене датотека" + +02000D40="Подели на делове, бајти:" +02000D41="Неисправна величина волумена" +02000D42="Одређена величина волумена: {0} бајтова.\nДа ли сте сигурни да желите да поделите архиву у тих волумена?" + +02000D81="Без компресије" +02000D82="Нормално" +02000D83="Максимално" +02000D84="Брзо" +02000D85="Брже" +02000D86="Најбрже" + +02000D90="Прегледај" + +02000DA1="Додај и замени датотеке" +02000DA2="Освежи и додај датотеке" +02000DA3="Озвежи постојеће датотеке" +02000DA4="Синхронизуј датотеке" + +02000DB1="Све датотеке" + +02000DC0="Додајем" + +; Columns dialog +02000E00="Колоне" +02000E01="Обележите колоне које бисте желели да буду видљиве у овом прегледу. Користите PageUp и PageDown тастере како бисте преуредили колоне по сопственом избору." +02000E02="Изабране колоне би требале бити" +02000E03="тачака широке." + +02000E10="Помери горе" +02000E11="Помери доле" +02000E12="Прикажи" +02000E13="Сакриј" +02000E14="Постави" + +02000E81="Наслов" +02000E82="Ширина" + +; Testing +02000F90="Тестирање" + + +; File Manager + +03000000="7-Zip" + +; Menu +03000102="Датотека" +03000103="Уређивање" +03000104="Преглед" +03000105="Алати" +03000106="Помоћ" +03000107="Омиљено" + +; File +03000210="Погледај" +03000211="Отвори са 7-Zip-ом" +03000212="Отвори са придруженом програмом" +03000220="Прегледај" +03000221="Промени" +03000230="Преименуј" +03000231="Копирај у..." +03000232="Премести у..." +03000233="Обриши" +03000240="Својства" +03000241="Коментар" +03000242="Израчунајте проверну величину" +03000243="разлика" +03000250="Нова фасцикла" +03000251="Нова датотека" +03000260="Излаз" +03000270="Подели фајл..." +03000271="Спој делове..." + +; Edit +03000310="Опозови" +03000311="Понови" +03000320="Исеци" +03000321="Копирај" +03000322="Налепи" +03000323="Избриши" +03000330="Изабери све" +03000331="Поништи избор свега" +03000332="Обрнути избор" +03000333="Изабери..." +03000334="Поништи избор..." +03000335="Изабери по типу" +03000336="Поништи избор по типу" + +; View +03000410="Иконе" +03000411="Напоредно слагање" +03000412="Списак" +03000413="Детаљи" +03000420="Без сортирања" +03000430="Отвори почетну фасциклу" +03000431="Горе за један ниво" +03000432="Хронологија..." +03000440="Освежавање" +03000449="Раван преглед" +03000450="2 Прозора" +03000451="Траке са алаткама" +03000460="Рад са архивама" +03000461="Рад са датотекама" +03000462="Велика дугмад" +03000463="Прикажи текст испод дугмади" + +; Tools +03000510="Опције..." +03000511="Benchmark" + +; Help +03000610="Помоћ..." +03000620="О програму..." + +; Favorites +03000710="Додај" +03000720="Изабери" + +; Options Dialog + +03010000="Опције" + +; Plugins +03010100="Plug-ins" +03010101="Plug-ins:" +03010110="Опције..." + +; Edit +03010200="Промене у датотекама" +03010201="Програм:" +03010202="Разлика:" + +; System +03010300="Систем" +03010302="7-Zip отвара следеће типове датотека:" +03010310="Plug-in" + +; Settings +03010400="Подешавања" +03010401="Прикажи \"..\"" +03010402="Прикажи праве сличице датотека" +03010410="Прикажи системски мени" +03010420="Обележи цео ред" +03010421="Прикажи линије мреже" +03010422="Један клик за отварање ставке" +03010430="Алтернативни начин за бирање" +03010440="Користи велике меморијске блокове" + +; Strings + +03020201="Копирај" +03020202="Исеци" +03020203="Копирај у:" +03020204="Премести у:" +03020205="Копирање у току..." +03020206="Премештање у току..." +03020207="Није могуће преместити или копирати садржај ове Фасцикле." +03020208="Операција није подржана." +03020209="Изаберите одредишну фасциклу." + +03020210="Потврдите брисање датотеке" +03020211="Потврдите брисање фасцикле" +03020212="Потврдите вишеструко брисање датотека" +03020213="Јесте ли сигурни да желите да обришете '{0}'?" +03020214="Јесте ли сигурни да желите да обришете фасциклу '{0}' и сав њен садржај?" +03020215="Јесте ли сигурни да желите да обришете ове {0} податке?" +03020216="Брисање у току..." +03020217="Грешка при брисању датотеке или фасцикле" +03020218="Систем не може да премести датотеку са дугом путу у корпу за отпатке" + +03020220="Преименовање у току..." +03020221="Грешка при преименовању датотеке или фасцикле" +03020222="Потврди копирање датотеке" +03020223="Да ли сте сигурни да желите да копирате датотеке у архиву" + +03020230="Креирај фасциклу" +03020231="Име фасцикле:" +03020232="Нова фасцикла" +03020233="Грешка при креирању фасцикли" + +03020240="Креирај датотеку" +03020241="Име датотеке:" +03020242="Нова датотека" +03020243="Грешка при креирању датотека" + +03020250="Одабери" +03020251="Поништи избор" +03020252="Маска:" + +03020260="Хронологија" + +03020280="Датотека '{0}' је измјењена.\nДа ли желите ажурирати архиву?" +03020281="Није могуће ажурирати датотеку\n'{0}'" +03020282="Није могуће започети уређивање." +03020283="Отварање у току..." +03020284="Датотека изгледа као вирус (име датотеке садржи пуно размака у имену)." + +03020290="Коментар" +03020291="Коментар:" + +030202A0="Систем" + +03020300="Рачунар" +03020301="Мрежа" +03020302="Документи" + +03020400="Додај" +03020401="Издвој" +03020402="Тестирај" + +03020420="Копирај" +03020421="Премести" +03020422="Избриши" +03020423="Својства" + +03020500="Подели датотеку" +03020501="Подели на:" +03020510="Подела..." +03020520="Потврда поделе" +03020521="Да ли сте сигурни да желите да поделите датотеку на (0) дела?" +03020522="Величине дела мора бити мањи од величине оригиналне датотеке" + +03020600="Састави датотеке" +03020601="Састави у:" +03020610="Спајање..." +03020620="Изаберите само први део поделе датотеке" +03020621="Не могу да откријем датотеку као део поделе" +03020622="Не може се наћи више од једног дела поделе" + +03020710="Израчунавање проверне величине..." +03020720="Информација о проверне величине" +03020721="ЦРЦ порвера за податак:" +03020722="ЦРЦ провера за податак и имена:" + +03020800="Скенирање..." + +03020900="Особине" + +03020A01="Операција не може бити позвана из фасцикле која има дугу путању." +03020A02="Морате да изаберете неку датотеку" +03020A03="Морате да изаберете једну или више датотека" +03020A04="Датотека {0} већ постоји" + +; Computer +03031100="Укупни капацитет" +03031101="Слободни простор" +03031102="Величинa cluster-а" +03031103="Назив" + +; Network +03031200="Локално име" +03031201="Провајдер" + +; Benchmark Dialog + +03080000="Benchmark" +03080001="Коришћење меморије:" +03080002="Компресија" +03080003="Декомпресија" +03080004="Брзина" +03080005="Оцена" +03080006="Потпуна оцена" +03080007="Тренутно" +03080008="Резултат" +03080009="Пролази:" +0308000A="Грешке:" +0308000B="Употреба процесора" +0308000C="Рејтинг/Употреба" + +;!@LangEnd@! \ No newline at end of file diff --git a/GUI/Lang/sr-spl.txt b/GUI/Lang/sr-spl.txt new file mode 100644 index 0000000..8333dac --- /dev/null +++ b/GUI/Lang/sr-spl.txt @@ -0,0 +1,543 @@ +;!@Lang@!UTF-8! +; 7-Zip 9.07 +; Translated by Lazar update Ozzii +; +; +; +; + +00000000="Serbian - Latin" +00000001="Srpski - latinica" +00000002="26-2" + +; 7-Zip Configuration + +; Title +01000000="PodeÅ¡avanje 7-Zip-a" + +; Info Page +01000100="O programu" +01000103="7-Zip je besplatan program." +01000104="PodrÅ¡ka" +01000105="Registracija" + +; Folders Page +01000200="Fascikle" +01000210="Radna fascikla" +01000211="Koristi Windows-ovu privremenu fasciklu" +01000212="Trenutna" +01000213="Navedena:" +01000214="Koristi samo za izmenjive medije" + +01000281="Navedite lokaciju za smeÅ¡tanje privremenih datoteka." + +; System Page +01000300="Sistem" +01000301="Ubaci 7-Zip u sistemski meni" +01000302="Kaskadni sistemski meni" +01000310="Stavke sistemskog menija:" + +; Language Page +01000400="Jezik" +01000401="Jezik:" + + +; 7-Zip Explorer extension + +; Context menu +02000101="7-Zip" +02000102="7-Zip komande" +02000103="Otvori arhivu" +02000104="Otvori izabranu arhivu." +02000105="Izdvoj datoteke..." +02000106="Izdvoj datoteke iz izabrane arhive." +02000107="Dodaj u arhivu..." +02000108="Dodaj izabrane stavke u arhivu." +02000109="Testiraj arhivu" +0200010A="Testiraj integritet izabrane arhive." +0200010B="Izdvoj ovde" +0200010C="Izdvoj datoteke iz izabrane arhive u trenutnu fasciklu." +0200010D="Izdvoj u {0}" +0200010E="Izdvoj datoteke u podfasciklu." +0200010F="Dodaj u {0}" +02000110="Dodaj izabrane datoteke u arhivu." +02000111="Dodaj i napravi e-mail..." +02000112="Dodaj obeležene datoteke i napravi e-mail." +02000113="Dodaj u {0} i napravi e-mail" +02000114="Dodaj obeležene datoteke i napravi e-mail." + +02000140="" +02000141="" + +; Properties +02000203="Putanja" +02000204="Naziv" +02000205="Tip" +02000206="Fascikla" +02000207="Veličina" +02000208="Veličina u zapakovanom stanju" +02000209="Atributi" +0200020A="Kreirana" +0200020B="Pristupano" +0200020C="Promenjeno" +0200020D="Solidno" +0200020E="Komentar" +0200020F="Å ifrovano" +02000210="Podeli pre" +02000211="Podeli posle" +02000212="Rečnik" +02000213="CRC" +02000214="Tip" +02000215="Anti" +02000216="Metod" +02000217="Operativni sistem" +02000218="Sistem datoteka" +02000219="Korisnik" +0200021A="Grupa" +0200021B="Blok" +0200021C="Komentar" +0200021D="Položaj" +0200021E="Prefiks putanje" +0200021F="Fascikle" +02000220="Datoteke" +02000221="Verzija" +02000222="Volumen" +02000223="ViÅ¡eVolumena" +02000224="Ofset" +02000225="Linkovi" +02000226="Blokovi" +02000227="Volumeni" + +02000229="64-bit" +0200022A="Big-endian" +0200022B="Procesor" +0200022C="Fizička veličina" +0200022D="Veličina zaglavlja" +0200022E="Provera rezultata" +0200022F="Karakteristike" +02000230="Virtuelna adresa" +02000231="ID" +02000232="Kratko ime" +02000233="Kreator aplikacije" +02000234="Veličina sektora" +02000235="Način" +02000236="Link" + +; Status bar +02000301="{0} objekat(a) izabrano" +02000302="{0} objekat(a)" + +02000320="Datoteke:" +02000321="Fascikle" +02000322="Veličina:" +02000323="Komprimovana veličina:" +02000324="Arhive:" + +; List Context Menu +02000401="Kolona..." + +02000411="Otvori" +02000412="Izdvoj..." + +; ToolBar +02000501="Izdvoj" + +; Messages +02000601="Operacija osvežavanja nije dozvoljena za ovu arhivu." +02000602="Ne mogu da osvežim arhivu {0}" +02000603="Ne mogu da kreiram Fasciklu '{0}'" +02000604="Datoteka nije jedna od podržanih arhiva." +02000605="GreÅ¡ka" +02000606="IsuviÅ¡e stavki" +02000607="Ni jedna aplikacija nije dodeljena navedenoj ekstenziji" +02000608="Nije bilo nikakvih greÅ¡aka" +02000609="Ne mogu da otvorim datoteku '(0)' kao arhiva" +0200060A="Ne mogu da otvorim Å¡ifrovanu arhivu '(0)'. PogreÅ¡na lozinka?" +0200060B="Sistem ne može da izdvoji potrebnu količinu memorije" +0200060C="Nepoznata greÅ¡ka" +0200060D="Nepodržan tip arhive" + +; Dialogs +02000702="U redu" +02000705="Da" +02000707="Da za sve" +02000709="Ne" +0200070B="Ne za sve" + +02000710="Otkaži" +02000711="Otkaži" +02000713="Zatvori" +02000714="Stani" +02000715="Ponovo" + +02000720="Pomoć" + +; Extract dialog +02000800="Izdvoj" +02000801="Izdvoj u:" +02000802="Å ifra" + +02000810="Putanje" +02000811="Puna putanja" +02000812="Trenutne putanje" +02000813="Bez putanje" + +02000820="Zamena" +02000821="Pitaj pre nego Å¡to zameniÅ¡" +02000822="Zameni bez zapitkivanja" +02000823="Preskoči postojeće datoteke" +02000824="Automatska promena naziva" +02000825="Automatska promena naziva postojećih datoteka" + +02000830="Datoteke" +02000831="Izabrani datoteke" +02000832="Sve datoteke" + +02000881="Navedi lokaciju gde će se izdvajati datoteke iz arhiva." + +02000890="Izdvajanje" + +; Overwrite dialog +02000900="Potvrdi zamenu datoteke" +02000901="Ciljna fascikla već sadrži datoteku koja se trenutno obrađuje." +02000902="Da li želite da zamenite postojeću datoteku" +02000903="sa ovom?" + +02000911="Automatska promena naziva" + +02000982="{0} bajtova" +02000983="modifikovano" + +; Messages dialog +02000A00="Dijagnostičke poruke" + +02000A80="Poruke" + +02000A91="Nepodržani metod kompresije za '{0}'." +02000A92="GreÅ¡ka u '{0}'. Datoteka je neispravana." +02000A93="CRC greÅ¡ka u '{0}'. Datoteka je neispravana." +02000A94="GreÅ¡ke u kodiranu datoteku '(0)' PogreÅ¡na lozinka." +02000A95="CRC greÅ¡ka u Å¡ifrovane datoteke '(0)' PogreÅ¡na lozinka." + +; Password dialog +02000B00="Unesite lozinku" +02000B01="Unesite lozinku:" +02000B02="Prikaži lozinku" +02000B03="Ponovo unesite lozinku:" +02000B10="Lozinke se ne poklapaju" +02000B11="Koristi samo engleska slova, brojeva i specijalnih znakova (!, #, $, ...) Za lozinke" +02000B12="Lozinka je predugačka" + +; Progress dialog +02000C00="Obrađujem" +02000C01="Proteklo vreme:" +02000C02="Preostalo vreme:" +02000C03="Veličina:" +02000C04="Brzina:" +02000C05="Obrađeno:" +02000C06="Kompresioni odnos:" + +02000C10="Pozadina" +02000C11="Na vrhu" +02000C12="Pauza" +02000C13="Nastavi" + +02000C20="Pauza" + +02000C30="Da li ste sigurni da želite da prekinete?" + +; Compress dialog +02000D00="Dodaj u arhivu" +02000D01="Arhiva:" +02000D02="Nadogradnja arhiva:" +02000D03="Format arhive:" +02000D04="Tip kompresije:" +02000D05="Kreiraj Solid arhivu" +02000D06="Parametri:" +02000D07="Opcije" +02000D08="Kreiraj SFX arhivu" +02000D09="ViÅ¡e niti" +02000D0A="Å ifruj nazive datoteka" +02000D0B="Nivo kompresije:" +02000D0C="Dictionary size:" +02000D0D="Word size:" +02000D0E="Potrebna memorija - kompresija:" +02000D0F="Potrebna memorija - dekompresija:" +02000D10="Å ifrovanje" +02000D11="Metoda Å¡ifrovanja:" +02000D12="Broj niza procesora:" +02000D13="Veličina čvrstog bloka:" +02000D14="Ne-čvrste" +02000D15="Čvrsto" +02000D16="Kompresija deljene datoteka" + +02000D40="Podeli na delove, bajti:" +02000D41="Neispravna veličina volumena" +02000D42="Određena veličina volumena: {0} bajtova.\nDa li ste sigurni da želite da podelite arhivu u tih volumena?" + +02000D81="Bez kompresije" +02000D82="Normalno" +02000D83="Maksimalno" +02000D84="Brzo" +02000D85="Brže" +02000D86="Najbrže" + +02000D90="Pregledaj" + +02000DA1="Dodaj i zameni datoteke" +02000DA2="Osveži i dodaj datoteke" +02000DA3="Ozveži postojeće datoteke" +02000DA4="Sinhronizuj datoteke" + +02000DB1="Sve datoteke" + +02000DC0="Dodajem" + +; Columns dialog +02000E00="Kolone" +02000E01="Obeležite kolone koje biste želeli da budu vidljive u ovom pregledu. Koristite PageUp i PageDown tastere kako biste preuredili kolone po sopstvenom izboru." +02000E02="Izabrane kolone bi trebale biti" +02000E03="tačaka Å¡iroke." + +02000E10="Pomeri gore" +02000E11="Pomeri dole" +02000E12="Prikaži" +02000E13="Sakrij" +02000E14="Postavi" + +02000E81="Naslov" +02000E82="Å irina" + +; Testing +02000F90="Testiranje" + + +; File Manager + +03000000="7-Zip" + +; Menu +03000102="Datoteka" +03000103="Uređivanje" +03000104="Pregled" +03000105="Alati" +03000106="Pomoć" +03000107="Omiljeno" + +; File +03000210="Pogledaj" +03000211="Otvori sa 7-Zip-om" +03000212="Otvori sa pridruženom programom" +03000220="Pregledaj" +03000221="Promeni" +03000230="Preimenuj" +03000231="Kopiraj u..." +03000232="Premesti u..." +03000233="ObriÅ¡i" +03000240="Svojstva" +03000241="Komentar" +03000242="Izračunajte provernu veličinu" +03000243="razlika" +03000250="Nova fascikla" +03000251="Nova datoteka" +03000260="Izlaz" +03000270="Podeli fajl..." +03000271="Spoj delove..." + +; Edit +03000310="Opozovi" +03000311="Ponovi" +03000320="Iseci" +03000321="Kopiraj" +03000322="Nalepi" +03000323="IzbriÅ¡i" +03000330="Izaberi sve" +03000331="PoniÅ¡ti izbor svega" +03000332="Obrnuti izbor" +03000333="Izaberi..." +03000334="PoniÅ¡ti izbor..." +03000335="Izaberi po tipu" +03000336="PoniÅ¡ti izbor po tipu" + +; View +03000410="Ikone" +03000411="Naporedno slaganje" +03000412="Spisak" +03000413="Detalji" +03000420="Bez sortiranja" +03000430="Otvori početnu fasciklu" +03000431="Gore za jedan nivo" +03000432="Hronologija..." +03000440="Osvežavanje" +03000449="Ravan pregled" +03000450="2 Prozora" +03000451="Trake sa alatkama" +03000460="Rad sa arhivama" +03000461="Rad sa datotekama" +03000462="Velika dugmad" +03000463="Prikaži tekst ispod dugmadi" + +; Tools +03000510="Opcije..." +03000511="Benchmark" + +; Help +03000610="Pomoć..." +03000620="O programu..." + +; Favorites +03000710="Dodaj" +03000720="Izaberi" + +; Options Dialog + +03010000="Opcije" + +; Plugins +03010100="Plug-ins" +03010101="Plug-ins:" +03010110="Opcije..." + +; Edit +03010200="Promene u datotekama" +03010201="Program:" +03010202="Razlika:" + +; System +03010300="Sistem" +03010302="7-Zip otvara sledeće tipove datoteka:" +03010310="Plug-in" + +; Settings +03010400="PodeÅ¡avanja" +03010401="Prikaži \"..\"" +03010402="Prikaži prave sličice datoteka" +03010410="Prikaži sistemski meni" +03010420="Obeleži ceo red" +03010421="Prikaži linije mreže" +03010422="Jedan klik za otvaranje stavke" +03010430="Alternativni način za biranje" +03010440="Koristi velike memorijske blokove" + +; Strings + +03020201="Kopiraj" +03020202="Iseci" +03020203="Kopiraj u:" +03020204="Premesti u:" +03020205="Kopiranje u toku..." +03020206="PremeÅ¡tanje u toku..." +03020207="Nije moguće premestiti ili kopirati sadržaj ove Fascikle." +03020208="Operacija nije podržana." +03020209="Izaberite odrediÅ¡nu fasciklu." + +03020210="Potvrdite brisanje datoteke" +03020211="Potvrdite brisanje fascikle" +03020212="Potvrdite viÅ¡estruko brisanje datoteka" +03020213="Jeste li sigurni da želite da obriÅ¡ete '{0}'?" +03020214="Jeste li sigurni da želite da obriÅ¡ete fasciklu '{0}' i sav njen sadržaj?" +03020215="Jeste li sigurni da želite da obriÅ¡ete ove {0} podatke?" +03020216="Brisanje u toku..." +03020217="GreÅ¡ka pri brisanju datoteke ili fascikle" +03020218="Sistem ne može da premesti datoteku sa dugom putu u korpu za otpatke" + +03020220="Preimenovanje u toku..." +03020221="GreÅ¡ka pri preimenovanju datoteke ili fascikle" +03020222="Potvrdi kopiranje datoteke" +03020223="Da li ste sigurni da želite da kopirate datoteke u arhivu" + +03020230="Kreiraj fasciklu" +03020231="Ime fascikle:" +03020232="Nova fascikla" +03020233="GreÅ¡ka pri kreiranju fascikli" + +03020240="Kreiraj datoteku" +03020241="Ime datoteke:" +03020242="Nova datoteka" +03020243="GreÅ¡ka pri kreiranju datoteka" + +03020250="Odaberi" +03020251="PoniÅ¡ti izbor" +03020252="Maska:" + +03020260="Hronologija" + +03020280="Datoteka '{0}' je izmjenjena.\nDa li želite ažurirati arhivu?" +03020281="Nije moguće ažurirati datoteku\n'{0}'" +03020282="Nije moguće započeti uređivanje." +03020283="Otvaranje u toku..." +03020284="Datoteka izgleda kao virus (ime datoteke sadrži puno razmaka u imenu)." + +03020290="Komentar" +03020291="Komentar:" + +030202A0="Sistem" + +03020300="Računar" +03020301="Mreža" +03020302="Dokumenti" + +03020400="Dodaj" +03020401="Izdvoj" +03020402="Testiraj" + +03020420="Kopiraj" +03020421="Premesti" +03020422="IzbriÅ¡i" +03020423="Svojstva" + +03020500="Podeli datoteku" +03020501="Podeli na:" +03020510="Podela..." +03020520="Potvrda podele" +03020521="Da li ste sigurni da želite da podelite datoteku na (0) dela?" +03020522="Veličine dela mora biti manji od veličine originalne datoteke" + +03020600="Sastavi datoteke" +03020601="Sastavi u:" +03020610="Spajanje..." +03020620="Izaberite samo prvi deo podele datoteke" +03020621="Ne mogu da otkrijem datoteku kao deo podele" +03020622="Ne može se naći viÅ¡e od jednog dela podele" + +03020710="Izračunavanje proverne veličine..." +03020720="Informacija o proverne veličine" +03020721="CRC porvera za podatak:" +03020722="CRC provera za podatak i imena:" + +03020800="Skeniranje..." + +03020900="Osobine" + +03020A01="Operacija ne može biti pozvana iz fascikle koja ima dugu putanju." +03020A02="Morate da izaberete neku datoteku" +03020A03="Morate da izaberete jednu ili viÅ¡e datoteka" +03020A04="Datoteka {0} već postoji" + +; Computer +03031100="Ukupni kapacitet" +03031101="Slobodni prostor" +03031102="Veličina cluster-a" +03031103="Naziv" + +; Network +03031200="Lokalno ime" +03031201="Provajder" + +; Benchmark Dialog + +03080000="Benchmark" +03080001="Korišćenje memorije:" +03080002="Kompresija" +03080003="Dekompresija" +03080004="Brzina" +03080005="Ocena" +03080006="Potpuna ocena" +03080007="Trenutno" +03080008="Rezultat" +03080009="Prolazi:" +0308000A="GreÅ¡ke:" +0308000B="Upotreba procesora" +0308000C="Rejting/Upotreba" + +;!@LangEnd@! diff --git a/GUI/Lang/sv.txt b/GUI/Lang/sv.txt new file mode 100644 index 0000000..60ea811 --- /dev/null +++ b/GUI/Lang/sv.txt @@ -0,0 +1,536 @@ +;!@Lang@!UTF-8! +; 7-Zip 4.59 +; Original translation by Andreas M Nilsson and Christoffer Enqvist +; Maintained since '7-Zip 4.07 beta' by Andreas M Nilsson +; Updated for '7-Zip 4.42' by Bernhard Eriksson, Wermlandsdata, Sweden +; Incorpororated changes made by Andreas M Nilsson for 4.44 +; Updated for 4.53 and 4.59 by Bernhard Eriksson, Wermlandsdata, Sweden + +00000000="Swedish" +00000001="Svenska" +00000002="29" + +; 7-Zip Configuration + +; Title +01000000="7-Zip konfiguration" + +; Info Page +01000100="Om 7-Zip" +01000103="7-Zip är fri programvara. Du kan emellertid stödja den fortsatta utvecklingen av 7-Zip genom att donera. Den aktuella översättningen pÃ¥ svenska är gjord av Wermlandsdata, baserad pÃ¥ arbete utfört av Andreas M Nilsson och Christoffer Enqvist." +01000104="Support" +01000105="Donera" + +; Folders Page +01000200="Mappar" +01000210="&Arbetsmapp" +01000211="&Systemets temp-mapp" +01000212="A&ktuell" +01000213="Spe&cificerad:" +01000214="Använd enbart för &flyttbara enheter" + +01000281="Ange plats där temporära arkivfiler ska sparas." + +; System Page +01000300="System" +01000301="Lägg till 7-Zip som alternativ i Utforskarens högerklicksmenyn" +01000302="Placera 7-Zip som en undermeny" +01000310="Objekt i högerklicksmenyn:" + +; Language Page +01000400="SprÃ¥k" +01000401="SprÃ¥k:" + + +; 7-Zip Explorer extension + +; Context menu +02000101="7-Zip" +02000102="7-Zip kommandon" +02000103="Öppna" +02000104="Öppna det markerade arkivet." +02000105="Packa upp filer..." +02000106="Packar upp filer frÃ¥n det markerade arkivet." +02000107="Lägg till arkiv..." +02000108="Lägger till de markerade filerna till ett arkiv." +02000109="Kontrollera arkivet" +0200010A="Kontrollerar om arkivet är korrupt." +0200010B="Packa upp här" +0200010C="Packar upp filer frÃ¥n det markerade arkivet till den aktuella mappen." +0200010D="Packa upp till {0}" +0200010E="Packar upp filer till en undermapp." +0200010F="Lägg till {0}" +02000110="Lägger till de markerade filerna till ett arkiv." +02000111="Komprimera och skicka som e-post..." +02000112="Komprimerar de markerade filerna till ett arkiv och skickar arkivet via e-post." +02000113="Komprimera till {0} och skicka som e-post" +02000114="Komprimerar de markerade filerna till ett arkiv och skickar arkivet via e-post." + +02000140="" +02000141="" + +; Properties +02000203="Sökväg" +02000204="Namn" +02000205="Filändelse" +02000206="Mapp" +02000207="Storlek" +02000208="Storlek komprimerad" +02000209="Attribut" +0200020A="Skapad" +0200020B="Använd" +0200020C="Ändrad" +0200020D="Sammanhängande (Solid)" +0200020E="Kommenterad" +0200020F="Krypterad" +02000210="Delad före" +02000211="Delad efter" +02000212="Ordlista" +02000213="CRC" +02000214="Typ" +02000215="Anti" +02000216="Metod" +02000217="Värd OS" +02000218="Filsystem" +02000219="Användare" +0200021A="Grupp" +0200021B="Block" +0200021C="Kommentar" +0200021D="Position" +0200021E="Sökvägs prefix" +0200021F="Kataloger" +02000220="Filer" +02000221="Version" +02000222="Volym" +02000223="Multivolym" +02000224="Offset" +02000225="Länkar" +02000226="Block" +02000227="Volymer" + +02000229="64-bitars" +0200022A="Big-endian" +0200022B="CPU" +0200022C="Fysisk storlek" +0200022D="Storlek pÃ¥ header" +0200022E="Checksumma" +0200022F="Karakteristisk" +02000230="Virtuell adress" + +; Status bar +02000301="{0} objekt markerade" +02000302="{0} objekt" + +02000320="Filer:" +02000321="Mappar:" +02000322="Storlek:" +02000323="Komprimerad storlek:" +02000324="Arkiv:" + +; List Context Menu +02000401="&Kolumner..." + +02000411="&Öppna" +02000412="&Packa upp..." + +; ToolBar +02000501="Packa upp" + +; Messages +02000601="Uppdatering stöds inte för det här arkivet." +02000602="Kan inte uppdatera arkiv {0}" +02000603="Kan inte skapa mapp '{0}'" +02000604="Arkivformatet stöds inte." +02000605="Fel" +02000606="För mÃ¥nga objekt" +02000607="Filändelsen är inte associerad till nÃ¥got program" +02000608="Inga fel pÃ¥träffades" +02000609="Kan inte öppna filen '{0}' som ett arkiv" +0200060A="Kan inte öppna det krypterade arkivet '{0}'. Fel lösenord?" +0200060B="Systemet kan inte allokera den begärda minnesmängden" +0200060C="Okänt fel" +0200060D="Arkiv typen stöds ej" + +; Dialogs +02000702="OK" +02000705="&Ja" +02000707="Ja till &Alla" +02000709="&Nej" +0200070B="Nej till A&lla" + +02000710="Avbryt" +02000711="A&vbryt" +02000713="&Stäng" +02000714="Stopp" +02000715="Starta om" + +02000720="Hjälp" + +; Extract dialog +02000800="Packa upp" +02000801="&Packa upp till:" +02000802="&Lösenord" + +02000810="&Sökvägstyp" +02000811="Kompletta sökvägar" +02000812="Aktuella sökvägar" +02000813="Inga sökvägar" + +02000820="&Överskrivning" +02000821="FrÃ¥ga före överskrivning" +02000822="Skriv över befintliga filer" +02000823="Hoppa över befintliga filer" +02000824="Automatisk omdöpning" +02000825="Automatisk omdöpning av befintliga filer" + +02000830="Filer" +02000831="&Markerade filer" +02000832="&Alla filer" + +02000881="Ange sökväg för uppackade filer." + +02000890="Packar upp" + +; Overwrite dialog +02000900="Bekräfta överskrivning av fil" +02000901="MÃ¥lmappen innehÃ¥ller redan den behandlade filen." +02000902="Vill du skriva över den befintliga filen" +02000903="med den här?" + +02000911="A&utomatisk omdöpning" + +02000982="{0} bytes" +02000983="ändrad den" + +; Messages dialog +02000A00="Diagnostiska meddelanden" + +02000A80="Meddelande" + +02000A91="Komprimeringsmetoden stöds inte för '{0}'." +02000A92="Datafel i '{0}'. Filen är korrupt." +02000A93="CRC-fel i '{0}'. Filen är korrupt." +02000A94="Datafel i den krypterade filen '{0}'. Fel lösenord?" +02000A95="CRC-fel i den krypterade filen '{0}'. Fel lösenord?" + +; Password dialog +02000B00="Ange lösenord" +02000B01="Ange lösenord:" +02000B02="&Visa lösenord" +02000B03="Upprepa lösenord:" +02000B10="Lösenorden stämmer inte överens." +02000B11="Använd endast engelska tecken, siffror och special tecken (!, #, $, ...) till lösenord" +02000B12="Lösenordet är för lÃ¥ngt." + +; Progress dialog +02000C00="Förlopp" +02000C01="Förfluten tid:" +02000C02="ÅterstÃ¥ende tid:" +02000C03="Storlek:" +02000C04="Hastighet:" +02000C05="Bearbetat:" +02000C06="Komprimeringsgrad:" + +02000C10="&Bakgrunden" +02000C11="&Förgrunden" +02000C12="&Pausa" +02000C13="F&ortsätt" + +02000C20="Pausad" + +02000C30="Är du säker pÃ¥ att du vill avbryta?" + +; Compress dialog +02000D00="Lägg till arkiv" +02000D01="&Arkiv:" +02000D02="&Uppdateringsmetod:" +02000D03="Arkiv&format:" +02000D04="&Komprimeringsmetod:" +02000D05="Skapa ett &sammanhängande (eng. solid) arkiv" +02000D06="&Parametrar:" +02000D07="Alternativ" +02000D08="Skapa sj&älvuppackande arkiv" +02000D09="Använd flera trÃ¥dar" +02000D0A="Kryptera fil&namn" +02000D0B="Komprimeringsniv&Ã¥:" +02000D0C="Storlek pÃ¥ &ordlista:" +02000D0D="Storlek pÃ¥ o&rd:" +02000D0E="Minne behövt vid komprimering:" +02000D0F="Minne behövt vid dekomprimering:" +02000D10="Kryptering" +02000D11="Krypteringsmetod:" +02000D12="Antal trÃ¥dar:" +02000D13="Solit block storlek:" +02000D14="Icke-solit" +02000D15="Solit" +02000D16="Komprimera delade filer" + +02000D40="Dela upp i &delar (volymer), bytes:" +02000D41="Felaktig volymstorlek." +02000D42="Specificerad volymstorlek: {0} byte.\nÄr du säker du vill dela arkivet i sÃ¥dana delar?" + +02000D81="Okomprimerat" +02000D82="Normal" +02000D83="Maximal" +02000D84="Snabb" +02000D85="Snabbaste" +02000D86="Ultra" + +02000D90="Bläddra" + +02000DA1="Lägg till och ersätt filer" +02000DA2="Lägg till och uppdatera befintliga filer" +02000DA3="Uppdatera enbart befintliga filer" +02000DA4="Synkronisera filer" + +02000DB1="Alla filer" + +02000DC0="Komprimerar" + +; Columns dialog +02000E00="Kolumner" +02000E01="Markera de kolumner du vill ska vara synliga i den här mappen. Använd \"Flytta Upp\" och \"Flytta Ner\" knapparna för att ordna om kolumnerna." +02000E02="Den valda kolumnen ska vara" +02000E03="pixlar &bred." + +02000E10="Flytta &Upp" +02000E11="Flytta &Ner" +02000E12="&Visa" +02000E13="&Dölj" +02000E14="Bestäm" + +02000E81="Titel" +02000E82="Bredd" + +; Testing +02000F90="Kontrollerar" + + +; File Manager + +03000000="7-Zip Filhanterare" + +; Menu +03000102="&Arkiv" +03000103="&Redigera" +03000104="&Visa" +03000105="Verkt&yg" +03000106="&Hjälp" +03000107="&Favoriter" + +; File +03000210="&Öppna" +03000211="Öppna &internt" +03000212="Öppna &externt" +03000220="&Visa" +03000221="&Redigera" +03000230="&Byt namn" +03000231="&Kopiera till..." +03000232="&Flytta till..." +03000233="&Ta bort" +03000240="E&genskaper" +03000241="Komme&ntera" +03000242="Beräkna checksumma" +03000250="Skapa mapp" +03000251="Skapa fil" +03000260="&Avsluta" +03000270="&Dela upp fil..." +03000271="&Sätt ihop filer..." + +; Edit +03000310="&Ångra" +03000311="&Gör om" +03000320="&Klipp ut" +03000321="K&opiera" +03000322="K&listra in" +03000323="&Ta bort" +03000330="Markera &alla" +03000331="Avmarkera alla" +03000332="&Invertera markering" +03000333="Markera..." +03000334="Avmarkera..." +03000335="Markera efter typ" +03000336="Avmarkera efter typ" + +; View +03000410="St&ora ikoner" +03000411="Sm&Ã¥ ikoner" +03000412="&Lista" +03000413="&Detaljerad lista" +03000420="Osorterade" +03000430="Öppna rotmappen" +03000431="Upp en nivÃ¥" +03000432="Mapphistorik..." +03000440="&Uppdatera" +03000449="Platt vy" +03000450="&2 Paneler" +03000451="&Verktygsfält" +03000460="Verktygsfältet Arkiv" +03000461="Verktygsfältet Standard" +03000462="Stora Knappar" +03000463="Visa Knapptext" + +; Tools +03000510="&Alternativ..." +03000511="&Benchmark" + +; Help +03000610="&InnehÃ¥ll..." +03000620="&Om 7-Zip..." + +; Favorites +03000710="&Lägg mappen till Favoriter som" +03000720="Bokmärke" + +; Options Dialog + +03010000="Alternativ" + +; Plugins +03010100="Insticksmoduler" +03010101="&Insticksmoduler:" +03010110="Alternativ..." + +; Edit +03010200="Redigerare" +03010201="&Redigerare:" + +; System +03010300="System" +03010302="Associera med 7-Zip:" +03010310="Insticksmodul" + +; Settings +03010400="Inställningar" +03010401="Visa \"..\" objektet" +03010402="Visa riktiga ikoner, för filer innehÃ¥llande ikoner (el. länkade)" +03010410="Visa system-menyn" +03010420="Markera &hel rad" +03010421="Visa &rutnät" +03010430="&Alternativt markeringsläge" +03010440="Använd &stora minnessidor" + +; Strings + +03020201="Kopiera" +03020202="Flytta" +03020203="Kopiera till:" +03020204="Flytta till:" +03020205="Kopierar..." +03020206="Flyttar..." +03020207="Du kan inte flytta eller kopiera objekt till sÃ¥dan mapp." +03020208="Funktionen stöds inte." +03020209="Välj mÃ¥lmapp." + +03020210="Bekräfta borttagning av fil" +03020211="Bekräfta borttagning av mapp" +03020212="Bekräfta borttagning av flera filer" +03020213="Är du säker pÃ¥ att du vill ta bort '{0}'?" +03020214="Är du säker pÃ¥ att du vill ta bort mappen '{0}' och allt dess innehÃ¥ll?" +03020215="Är du säker pÃ¥ att du vill ta bort de här {0} objekten?" +03020216="Tar bort..." +03020217="Ett fel uppstod under borttagning av fil eller mapp" +03020218="Systemet kan inte flytta en fil med s lng skvg till papperskorgen" + +03020220="Döper om..." +03020221="Ett fel uppstod under omdöpning av fil eller mapp" +03020222="Bekräfta kopiering av fil" +03020223="Är du säker pÃ¥ att du vill kopiera filerna till arkivet" + +03020230="Skapa mapp" +03020231="Mappnamn:" +03020232="Ny mapp" +03020233="Fel vid skapande av mapp" + +03020240="Skapa fil" +03020241="Filnamn:" +03020242="Ny fil" +03020243="Fel vid skapande av fil" + +03020250="Markera" +03020251="Avmarkera" +03020252="Filter:" + +03020260="Mapphistorik" + +03020280="Filen '{0}' har blivit ändrad.\nVill du uppdatera den i arkivet?" +03020281="Kan inte uppdatera filen\n'{0}'" +03020282="Kan inte starta redigeraren." +03020283="Öppnar..." +03020284="Filen verkar vara ett virus (filnamnet innehÃ¥ller 'lÃ¥nga' mellanslag)." + +03020290="Kommentar" +03020291="&Kommentar:" + +030202A0="System" + +03020300="Dator" +03020301="Nätverk" +03020302="Dokument" + +03020400="Lägg till" +03020401="Packa upp" +03020402="Testa" + +03020420="Kopiera" +03020421="Flytta" +03020422="Radera" +03020423="Info" + +03020500="Dela Upp Fil" +03020501="&Dela upp till:" +03020510="Delar upp..." +03020520="Bekräfta uppdelning" +03020521="Är det säkert du vill dela upp filen i {0} volymer?" +03020522="Volymstorleken mÃ¥ste vara mindre än storleken pÃ¥ originalfilen." + +03020600="Sätt Ihop Filer" +03020601="&Sätt ihop till:" +03020610="Sätter ihop..." +03020620="Markera bara första filen" +03020621="Kan inte upptäcka att filen är en del av en uppdelad fil" +03020622="Kan inte hitta mer än en del av en uppdelad fil" + +03020710="Beräknar checksumma..." +03020720="Checksumma information" +03020721="CRC checksumma för data:" +03020722="CRC checksumma för data och namn:" + +03020800="Skannar..." + +03020900="Egenskaper" + +03020A01="Operation kan inte utföras frÃ¥n en katalog med en sÃ¥ lÃ¥ng sökväg." +03020A02="Du mÃ¥ste välja en fil" +03020A03="Du mÃ¥ste välja en eller flera filer" +03020A04="Filen {0} existerar redan" + +; Computer +03031100="Total Storlek" +03031101="Ledigt utrymme" +03031102="Kluster storlek" +03031103="Etikett" + +; Network +03031200="Datornamn" +03031201="Nätverkstyp" + +; Benchmark Dialog + +03080000="Benchmark" +03080001="Minnesanvändning:" +03080002="Komprimering" +03080003="Dekomprimering" +03080004="Hastighet" +03080005="Prestanda" +03080006="Total prestanda" +03080007="Aktuellt" +03080008="Resultat" +03080009="OmgÃ¥ngar:" +0308000A="Fel:" +0308000B="CPU Användning" +0308000C="Rate / Användning" + +;!@LangEnd@! + + diff --git a/GUI/Lang/ta.txt b/GUI/Lang/ta.txt new file mode 100644 index 0000000..e8631ed --- /dev/null +++ b/GUI/Lang/ta.txt @@ -0,0 +1,440 @@ +;!@Lang@!UTF-8! +; 7-Zip 3.13 +; Translated by Ve Elanjelian, lead coordinator of ThamiZha! team. See: www.thamizha.com +; +; +; +; + +00000000="Tamil" +00000001="தமிழ்" +00000002="73" + +; 7-Zip Configuration + +; Title +01000000="7-ஜிப் தகவமைப்பு" + +; Info Page +01000100="7-ஜிப்பைப் பற்றி" +01000103="தமிழாக்கம் (c) 2004 தமிழா! குழு - www.thamizha.com/\n\n7-ஜிப் ஒரு பரிநிரல் ஆகும். ஆனால், நீங்கள் 7-ஜிப்பின் மேம்பாட்டை ஆதரிக்க விரும்பினால், பதிவுபெற்றுங்கள். பதிவுபெற்ற பயனராக, நீங்கள் தொழில்நுட்ப உதவியும் பெறலாம்." +01000105="பதிவுபெறுங்கள்" + +; Folders Page +01000200="அடைவுகள்" +01000210="பணியிலுள்ள அடைவு" +01000211="மண்டல தற்காலிக அடைவு" +01000212="நடப்பு" +01000213="குறிப்பிட்ட:" +01000214="கழற்று இயக்கிகளை மட்டும் பயன்படுத்து" + +01000281="கோப்புகளைத் தற்காலிக காப்பகப்படுத்தும் இடத்தைக் குறிப்பிடுக." + +; System Page +01000300="மண்டலம்" +01000301="7-ஜிப்பை வெற்று சூழல்பட்டியலுடன் ஒருங்கிணை" +01000302="விழுதொடரும் சூழல் பட்டியல்" +01000310="சூழல் பட்டியல் உருப்படிகள்:" + +; Language Page +01000400="மொழி" +01000401="மொழி:" + + +; 7-Zip Explorer extension + +; Context menu +02000101="7-ஜிப்" +02000102="7-ஜிப் ஆணைகள்" +02000103="காப்பகத்தைத் திற" +02000104="தேரிவிக்கப்பட்ட காப்பகத்தைத் திறக்கும்." +02000105="கோப்புகளை வெளிக்கொணர்..." +02000106="தெரிவுசெய்யப்பட்ட காப்பக கோப்புகளை வெளிக்கொணரும்." +02000107="காப்பகத்தில் இணை..." +02000108="தெரிவிக்கப்பட்ட உருப்படிகளைக் காப்பகத்திலிணைக்கும்." +02000109="காப்பகத்தைச் சோதனைசெய்" +0200010A="தெரிவுசெய்யப்பட்ட காப்பக சீர்மையைச் சோதிக்கும்." +0200010B="இங்கு வெளிக்கொணர்" +0200010C="தெரிவுசெய்யப்பட்ட காப்பகக் கோப்புகளை நடப்பு அடைவில் வெளிக்கொணரும்." +0200010D="{0}-ல் வெளிக்கொணர்" +0200010E="துணைஅடைவில் கோப்புகளை வெளிக்கொணர்." +0200010F="{0}-ல் இணை" +02000110="தெரிவிக்கப்பட்ட உருப்படிகளைக் காப்பகத்திலிணைக்கும்." +02000111="இறுக்கி மின்னஞ்சலனுப்பு..." +02000112="தெரிவான உருப்படிகளை காப்பகத்தில் இறுக்கிய பின் காப்பகத்தை மின்னஞ்சல் வழி அனுப்பும்." +02000113="{0}-க்கு இறுக்கி அஞ்சலனுப்பு" +02000114="தெரிவான உருப்படிகளை காப்பகத்தில் இறுக்கிய பின் காப்பகத்தை மின்னஞ்சல் வழி அனுப்பும்." + +02000140="<அடைவு>" +02000141="<காப்பகம்>" + +; Properties +02000203="பாதை" +02000204="பெயர்" +02000205="நீட்டிப்பு" +02000206="அடைவு" +02000207="அளவு" +02000208="கட்டப்பட்ட அளவு" +02000209="பண்புக்கூறு" +0200020A="உருவாக்கப்பட்டது" +0200020B="அனுகப்பட்டது" +0200020C="மாற்றப்பட்டது" +0200020D="திண்மம்" +0200020E="கருத்துரைக்கப்பட்ட" +0200020F="மறைக்குறியீட்டப்பட்டது" +02000210="முன் பிரி" +02000211="பின் பிரி" +02000212="அகராதி" +02000213="CRC" +02000214="வகை" +02000215="தடுப்பு" +02000216="வழி" +02000217="புரவலரின் OS" +02000218="கோப்பு மண்டலம்" +02000219="பயனர்" +0200021A="குழு" +0200021B="கட்டம்" +0200021C="குறிப்பு" + +; Status bar +02000301="{0} பொருள் தெரிவானது" +02000302="{0} பொருள்(கள்)" + +; List Context Menu +02000401="பத்திகள்..." + +02000411="திற" +02000412="வெளிக்கொணர்..." + +; ToolBar +02000501="வெளிக்கொணர்" + +; Messages +02000601="இக்காப்பகத்தில் புதுப்பிக்கும் செயல்களுக்கு ஆதரவில்லை." +02000602="{0} காப்பகத்தைப் புதுப்பிக்க முடியவில்லை" +02000603="'{0}' அடைவை உருவாக்க இயலவில்லை" +02000604="கோப்பு ஒரு ஆதரிக்கப்படாத காப்பகம்." +02000605="தவறு" +02000606="மிகவும் அதிகமான உருப்படிகள்" +02000607="கொடுக்கப்பட்ட கோப்புப் பெயர் நீட்டிப்புடன் தொடர்பான எப்பயன்பாடும் இல்லை." +02000608="தவறுகளேதுமில்லை" + +; Dialogs +02000702="சரி" +02000705="ஆம்" +02000707="அனைத்திற்கும் ஆம்" +02000709="வேண்டாம்" +0200070B="அனைத்திற்கும் இல்லை" + +02000710="இரத்து" +02000711="இரத்து" +02000713="மூடு" +02000714="நிறுத்து" +02000715="மீள்துவங்கு" + +02000720="உதவி" + +; Extract dialog +02000800="வெளிக்கொணர்" +02000801="இங்கு வெளிக்கொணர்:" +02000802="கடவுச்சொல்" + +02000810="பாதை முறைமை" +02000811="முழு பாதைப்பெயர்கள்" +02000812="நடப்பு பாதைப்பெயர்கள்" +02000813="பாதைப்பெயர்களில்லை" + +02000820="மேலெழுதல் முறைமை" +02000821="மேலெழுதுவதற்கு முன் கேள்" +02000822="கேட்காமல் மேலெழுது" +02000823="தற்பொழுதுள்ள கோப்புகளைத் தவிர்" +02000824="தானாக மாற்றுப்பெயரிடு" + +02000830="கோப்புகள்" +02000831="தேரிவான கோப்புகள்" +02000832="அனைத்து கோப்புகளும்" + +02000881="வெளிக்கொணர்ந்த கோப்புகளுக்கான இடத்தைக் குறிப்பிடு." + +02000890="வெளிக்கொணரப்படுகின்றது" + +; Overwrite dialog +02000900="கோப்பு மாற்றத்தை உறுதிசெய்" +02000901="சேரிட அடைவு ஏற்கனவே செயல்படுத்தப்பட்ட கோப்பைக் கொண்டுள்ளது." +02000902="தற்பொழுதுள்ள கோப்பை" +02000903="இதக்கொண்டு மாற்ற விரும்புகிறீர்களா?" + +02000911="தானாக மாற்றுப்பெயரிடு" + +02000982="{0} பைட்கள்" +02000983="மாற்றப்பட்ட காலம்" + +; Messages dialog +02000A00="அறிவழிச் செய்திகள்" + +02000A80="செய்தி" + +02000A91="'{0}'-ல் ஆதரவில்லாத இறுக்கல் முறை." +02000A92="'{0}'-ல் தரவுத் தவறு. கோப்பு முறிந்துள்ளது." +02000A93="'{0}'-ல் CRC தோல்வியுற்றது. கோப்பு முறிந்துள்ளது." + +; Password dialog +02000B00="கடவுச்சொல்லை உள்ளிடுக" +02000B01="கடவுச்சொல்லை உள்ளிடுக:" +02000B02="கடவுச்சொல்லை காட்டு" + +; Progress dialog +02000C00="செயலாக்கம்" +02000C01="மீதமுள்ள நேரம்:" +02000C02="மீதமுள்ள நேரம்:" +02000C03="அளவு:" +02000C04="வேகம்:" + +02000C10="பின்புலம்" +02000C11="முன்புலம்" +02000C12="தற்காலிகமாக நிறுத்து" +02000C13="தொடரவும்" + +02000C20="தற்காலிக நிறுத்தல்" + +02000C30="உறுதியாகவே இரத்து செய்ய விரும்புகிறீர்களா?" + +; Compress dialog +02000D00="காப்பகத்திலிணை" +02000D01="காப்பகம்:" +02000D02="புதுபிக்கும் முறைமை:" +02000D03="காப்பக வடிவம்:" +02000D04="இறுக்கும் வழி:" +02000D05="திண்ம காப்பகத்தை உருவாக்கு" +02000D06="அளபுருகள்:" +02000D07="விருப்பத்தேர்வுகள்" +02000D08="SFX காப்பகம் உறுவாக்கு" +02000D09="பல இழையாக்கம்" +02000D0A="பெயரை மறைக்குறியீடாக்கு" +02000D0B="இறுக்க வகை:" +02000D0C="அகராதி அளவு:" +02000D0D="வார்த்தை அளவு:" +02000D0E="இறுக்க நினைவக பயன்பாடு:" +02000D0F="பெருக்க நினைவக பயன்பாடு:" + +02000D40="கனவளவுகளுக்கு, பைட்களுக்குப் பிரி:" + +02000D81="தேக்கு" +02000D82="சாதாரண" +02000D83="அதிகமான" +02000D84="விரைவான" +02000D85="அதிவிரைவான" +02000D86="சிறப்பான" + +02000D90="உலாவு" + +02000DA1="சேர்த்து கோப்புகளை மாற்று" +02000DA2="புதிப்பித்து கோப்புகளை சேர்" +02000DA3="உள்ள கோப்புகளைப் புதுப்பி" +02000DA4="கோப்புகளை ஒத்தியக்கு" + +02000DB1="அனைத்து கோப்புகளும்" + +02000DC0="இறுக்கப்படுகின்றது" + +; Columns dialog +02000E00="பத்திகள்" +02000E01="இவ்வடைவில் தெரிய வேண்டியவற்றின் பத்திகளைத் தெரிவுசெய். மேல் நகர்த்து மற்றும் கீழ் நகர்த்து பொத்தான்களக் கொண்டு பத்திகளை ஒழுங்காக்கு." +02000E02="தெரிவுசெய்யப்பட்ட பத்தி" +02000E03="படத்துணுக்கு அகலம் இருக்கவேண்டும்." + +02000E10="மேல் நகர்த்து" +02000E11="கீழ் நகர்த்து" +02000E12="காட்டு" +02000E13="மறை" +02000E14="அமை" + +02000E81="தலைப்பு" +02000E82="அகலம்" + +; Testing +02000F90="சோதனை..." + + +; File Manager + +03000000="7-ஜிப் கோப்பு மேலாளர்" + +; Menu +03000102="கோப்பு" +03000103="பதிப்பு" +03000104="பார்வை" +03000105="கருவிகள்" +03000106="உதவி" +03000107="விருப்பங்கள்" + +; File +03000210="திற" +03000211="உள்ளே திற" +03000212="வெளியே திற" +03000220="பார்வை" +03000221="பதிப்பு" +03000230="மாற்றுப்பெயரிடு" +03000231="இங்கு நகலெடு..." +03000232="இங்கு நகர்த்து..." +03000233="அழி" +03000240="தன்மைகள்" +03000241="கருத்துரை" +03000250="கோப்பை உருவாக்கு" +03000251="கோப்பு உருவாக்கு" +03000260="வெளியேறு" + +; Edit +03000310="செயல்நீக்கு" +03000311="செயல்மீள்" +03000320="வெட்டு" +03000321="நகல்" +03000322="ஒட்டு" +03000323="அழி" +03000330="அனைத்தும் தேர்ந்தெடு" +03000331="அனைத்தும் நீக்கு" +03000332="தெரிவை புரட்டு" +03000333="தேர்ந்தெடு..." +03000334="நீக்கு..." +03000335="வகைப்படி தெரிவுசெய்" +03000336="வகைப்படி நீக்கு" + +; View +03000410="பெரிய உருபிகள்" +03000411="சிறிய உருபிகள்" +03000412="பட்டியல்" +03000413="தகவல்கள்" +03000420="வரிசைப்படுத்தப்படாதது" +03000430="வேர் அடைவைத் திற" +03000431="ஒரு படி மேல்" +03000432="அடைவுகளின் வரலாறு..." +03000440="புதுக்கல்" +03000450="2 பலகங்கள்" +03000451="கருவிப்பட்டைகள்" +03000460="காப்பக கருவிப்பட்டை" +03000461="பொதுவான கருவிப்பட்டை" +03000462="பெரிய பொத்தான்கள்" +03000463="பொத்தான்களின் உரையைக் காட்டு" + +; Tools +03000510="விருப்பத்தேர்வு..." +03000511="மதிப்பீட்டு அளவை" + +; Help +03000610="பொருளடக்கம்..." +03000620="7-ஜிப்பைப் பற்றி..." + +; Favorites +03000710="அடைவை விரும்பியவற்றுள் இப்படி இணை" +03000720="புத்தகக்குறி" + +; Options Dialog + +03010000="தேர்வுகள்" + +; Plugins +03010100="செருகுநிரல்கள்" +03010101="செருகுநிரல்கள்:" +03010110="தேர்வுகள்..." + +; Edit +03010200="பதிப்பாளன்" +03010201="பதிப்பாளன்:" + +; System +03010300="மண்டலம்" +03010302="7-ஜிப்பை இதனுடன் தொடர்புப்படுத்து:" +03010310="செருகுநிரல்" + +; Settings +03010400="அமைவுகள்" +03010401="\"..\" உருப்படியைக் காட்டு" +03010402="கோப்பு உருபிகளைக் காட்டு" +03010410="மண்டல பட்டியலைக் காட்டு" + +; Strings + +03020201="நகல்" +03020202="நகர்த்து" +03020203="இங்கு நகலெடு:" +03020204="இங்கு நகர்த்து:" +03020205="நகலெடுக்கப்படுகிறது..." +03020206="நகர்த்தப்படுகிறது..." +03020207="அத்தகைய அடைவுகளுக்கு நீங்கள் நகர்த்தவோ நகலெடுக்கவோ முடியாது." +03020208="அத்தகைய செயலுக்கு ஆதரவில்லை." + +03020210="கோப்பு அழிப்பை உறுதிசெய்" +03020211="அடைவு அழிப்பை உறுதிசெய்" +03020212="பல கோப்பு அழிப்பை உறுதிசெய்" +03020213="'{0}'-ஐ உறுதியாக அழிக்க விரும்புகிறீர்களா?" +03020214="'{0}' அடைவையும் அதிலுள்ளவற்றயும் உறுதியாகவே அழிக்க விரும்புகிறீர்களா?" +03020215="இந்த {0} உருப்படிகளை உறுதியாக அழிக்க விரும்புகிறீர்களா?" +03020216="அழிக்கப்படுகிறது..." +03020217="கோப்பையோ அடைவையோ அழிக்கும்போது தவறு" + +03020220="பெயர்மாற்றப்படுகிறது..." +03020221="கோப்பையோ அடைவையோ பெயர்மாற்றும்போது தவறு" + +03020230="அடைவு உருவாக்கு" +03020231="அடைவின் பெயர்:" +03020232="புதிய அடைவு" +03020233="அடைவு உருவாக்கும்போது தவறு" + +03020240="கோப்பு உருவாக்கு" +03020241="கோப்பின் பெயர்:" +03020242="புதிய கோப்பு" +03020243="கோப்பு உருவாக்கையில் தவறேற்பட்டது" + +03020250="தெரிவுசெய்" +03020251="நீக்கு" +03020252="முகமுடி:" + +03020260="அடைவுகளின் வரலாறு" + +03020280="'{0}' கோப்பு மாற்றப்பட்டது.\nஇதனை காப்பகத்தில் புதுப்பிக்க வேண்டுமா?" +03020281="பின்வரும் கோப்பை புதுப்பிக்க இயலவில்லை\n'{0}'" +03020282="பதிப்பாளனைத் துவக்க இயலவில்லை." +03020283="திறக்கப்படுகின்றது..." + +03020290="கருத்துரை" +03020291="கருத்துரை:" + +030202A0="மண்டலம்" + +03020300="கணினி" +03020301="பிணையம்" + +03020400="இணை" +03020401="வெளிக்கொணர்" +03020402="பரிசோதி" + +03020420="நகல்" +03020421="நகர்த்து" +03020422="அழி" +03020423="தகவல்" + +; Computer +03031100="மொத்த அளவு" +03031101="காளி இடம்" +03031102="கொத்தணியின் அளவு" +03031103="வில்லை" + +; Network +03031200="இடத்துரி பெயர்" +03031201="வழங்குபவர்" + +; Benchmark Dialog + +03080000="மதிப்பீட்டு அளவை" +03080001="நினைவக பயன்:" +03080002="இறுக்கப்படுகையில்" +03080003="பெருக்கப்படுகையில்" +03080004="வேகம்" +03080005="புள்ளிகள்" +03080006="மொத்த புள்ளிகள்" +03080007="நடப்பு" +03080008="முடிவில்" +03080009="சரியானவை:" +0308000A="தவறுகள்:" + +;!@LangEnd@! diff --git a/GUI/Lang/th.txt b/GUI/Lang/th.txt new file mode 100644 index 0000000..dddc57c --- /dev/null +++ b/GUI/Lang/th.txt @@ -0,0 +1,542 @@ +;!@Lang@!UTF-8! +; +; Translated by Zafire06 (ver 3.13) +; Updated by Kom10 in 2010 For ver 9.13 +; +; +; + +00000000="Thai" +00000001="ไทย" +00000002="30" + +; 7-Zip Configuration + +; Title +01000000="โครงแบบ 7-Zip" + +; Info Page +01000100="เกี่ยวกับ 7-Zip" +01000103="7-Zip เป็นฟรีแวร์ อย่างไรก็ตาม คุณสามารถสนับสนุนการพัฒนาของ 7-Zip ได้โดยการลงทะเบียน เมื่อคุณเป็นผู้ใช้ที่ลงทะเบียนแล้ว คุณจะได้รับการสนับสนุนทางเทคนิคจากเรา" +01000104="สนับสนุน" +01000105="ลงทะเบียน" + +; Folders Page +01000200="โฟลเดอร์" +01000210="&โฟลเดอร์ที่ทำงานอยู่" +01000211="&โฟลเดอร์ต่างๆของระบบ" +01000212="&โฟลเดอร์ปัจจุบัน" +01000213="&ระบุ:" +01000214="ใช้สำหรับไดรฟ์แบบถอดได้เท่านั้น" + +01000281="ระบุที่ตั้งสำหรับไฟล์เอกสารชั่วคราว" + +; System Page +01000300="ระบบ" +01000301="รวบรวมคำสั่ง 7-Zip ไปที่แถบเมนูลัด" +01000302="แยกเป็นแถบคำสั่ง 7-Zip" +01000310="วัตถุที่ปรากฏบนเมนูลัด:" + +; Language Page +01000400="ภาษา" +01000401="ภาษา:" + + +; 7-Zip Explorer extension + +; Context menu +02000101="7-Zip" +02000102="คำสั่ง 7-Zip" +02000103="เปิดเอกสาร" +02000104="เปิดเอกสารที่เลือกไว้" +02000105="แยกไฟล์..." +02000106="แยกไฟล์จากเอกสารที่เลือกไว้" +02000107="เพิ่มเข้าเอกสาร..." +02000108="เพิ่มวัตถุที่เลือกไว้เข้าเอกสาร" +02000109="ทดสอบเอกสาร" +0200010A="ทดสอบความน่าเชื่อถือของเอกสารที่เลือกไว้" +0200010B="แยกไฟล์ที่นี่" +0200010C="แยกไฟล์จากเอกสารที่เลือกไว้ไปที่โฟลเดอร์เดิม" +0200010D="แยกไฟล์ไปที่ {0}" +0200010E="แยกไฟล์ไปที่โฟลเดอร์ย่อย." +0200010F="เพิ่มเข้า {0}" +02000110="เพิ่มวัตถุที่เลือกไว้เข้าเอกสาร" +02000111="บีบอัดแล้วส่งอีเมลล์..." +02000112="บีบอัดวัตถุที่เลือกไว้แล้วส่งไปทางอีเมลล์" +02000113="บีบอัดเป็น {0} แล้วส่งอีเมลล์" +02000114="บีบอัดวัตถุที่เลือกไว้แล้วส่งไปทางอีเมลล์" + +02000140="<โฟลเดอร์>" +02000141="<เอกสาร>" + +; Properties +02000203="ที่ตั้ง" +02000204="ชื่อ" +02000205="ชนิด" +02000206="โฟลเดอร์" +02000207="ขนาด" +02000208="ขนาดเมื่อถูกจัดเก็บ" +02000209="ลักษณะประจำ" +0200020A="สร้างเมื่อ" +0200020B="เข้าถึงเมื่อ" +0200020C="ดัดแปรเมื่อ" +0200020D="ต่อเนื่อง" +0200020E="หมายเหตุ" +0200020F="การเข้ารหัสลับ" +02000210="ก่อนแบ่ง" +02000211="หลังแบ่ง" +02000212="ดิคชันนารี" +02000213="ซีอาร์ซี" +02000214="แบบชนิด" +02000215="ต่อต้าน" +02000216="วิธีการ" +02000217="OS ที่ใช้" +02000218="ไฟล์ระบบ" +02000219="ผู้ใช้" +0200021A="กลุ่ม" +0200021B="บล็อก" +0200021C="หมายเหตุ" +0200021D="ตำแหน่ง" +0200021E="คำนำหน้าที่ตั้ง" +0200021F="โฟลเดอร์" +02000220="ไฟล์" +02000221="เวอร์ชั่น" +02000222="วอลลุ่ม" +02000223="มัลติวอลลุ่ม" +02000224="ออฟเซ็ท" +02000225="ลิ้งค์" +02000226="บล็อค" +02000227="Volumes" + +02000229="64-บิท" +0200022A="Big-endian" +0200022B="CPU" +0200022C="ขนาดทางกายภาพ" +0200022D="ขนาดเฮดเดอร์" +0200022E="Checksum" +0200022F="คุณลักษณะ" +02000230="Virtual Address" +02000231="ID" +02000232="ชื่อย่อ" +02000233="ผู้สร้างโปรแกรม" +02000234="ขนาด Sector" +02000235="โหมด" +02000236="ลิงค์" + +; Status bar +02000301="{0} วัตถุที่เลือกไว้" +02000302="{0} วัตถุ" + +02000320="ไฟล์:" +02000321="โฟลเดอร์:" +02000322="ขนาด:" +02000323="ขนาดที่ถูกบีบอัด:" +02000324="เอกสาร:" + +; List Context Menu +02000401="&สดมภ์..." + +02000411="&เปิด" +02000412="&แยกไฟล์..." + +; ToolBar +02000501="แยกไฟล์" + +; Messages +02000601="ปรับปรุงการทำงานไม่สนับสนุนสำหรับเอกสาร" +02000602="ไม่สามารถปรับปรุงเอกสาร {0}" +02000603="ไม่สามารถสร้างโฟลเดอร์ '{0}'" +02000604="ไฟล์ไม่สนับสนุนเอกสาร" +02000605="เกิดข้อผิดพลาด" +02000606="มีวัตถุมากเกินไป" +02000607="ไม่มีโปรแกรมที่เปิดชนิดไฟล์ที่ให้มาได้" +02000608="ไม่มีข้อผิดพลาด" +02000609="ไม่สามารถเปิดไฟล์ '{0}' เป็นเอกสารได้" +0200060A="ไม่สามารถเปิดไฟล์ที่เข้ารหัสได้ '{0}' พาสเวิร์ดผิดหรือไม่?" +0200060B="ระบบไม่สามารถใช้หน่วยความจำตามที่ระบุได้" +0200060C="เกิดความผิดพลาดที่ไม่ทราบสาเหตุ" +0200060D="ชนิดของไฟล์บีบอัดไม่รองรับ" + +; Dialogs +02000702="ตกลง" +02000705="&ใช่" +02000707="ใช่ทั้งหมด" +02000709="&ไม่" +0200070B="ไม่ทั้งหมด" + +02000710="ยกเลิก" +02000711="&ยกเลิก" +02000713="&ออก" +02000714="หยุด" +02000715="ฟื้นฟู" + +02000720="ช่วยเหลือ" + +; Extract dialog +02000800="แยกไฟล์" +02000801="แยกไฟล์ไปที่:" +02000802="รหัสผ่าน" + +02000810="ที่ตั้ง" +02000811="ชื่อที่ตั้งแบบเต็ม" +02000812="ชื่อตั้งเดิม" +02000813="ไม่มีชื่อที่ตั้ง" + +02000820="การบันทึกทับ" +02000821="ถามก่อนมีการบันทึกทับ" +02000822="บันทึกทับโดยไม่มีข้อความพร้อมรับ" +02000823="ข้ามไฟล์ที่มีอยู่" +02000824="เปลี่ยนชื่ออัตโนมัติ" +02000825="เปลี่ยนชื่อไฟล์ที่มีอยู่อัตโนมัติ" + +02000830="ไฟล์" +02000831="&ไฟล์ที่เลือกไว้" +02000832="&ไฟล์ทั้งหมด" + +02000881="ระบุที่ตั้งสำหรับไฟล์ที่แยกออกมา" + +02000890="กำลังแยกไฟล์" + +; Overwrite dialog +02000900="ยืนยันการแทนที่ไฟล์" +02000901="โฟลเดอร์ปลายทางมีไฟล์ที่ได้ประมวลผลแล้ว" +02000902="คุณต้องการแทนที่ไฟล์ที่มีอยู่หรือไม่" +02000903="ด้วย" + +02000911="เปลี่ยนชื่ออัตโนมัติ" + +02000982="{0} ไบต์" +02000983="ดัดแปลงบน" + +; Messages dialog +02000A00="ข้อความวินิจฉัย" + +02000A80="ข้อความ" + +02000A91="ไม่รองรับวิธีการบีบอัดนี้สำหรับ '{0}'" +02000A92="ข้อมูลใน '{0}' ผิดพลาด ไฟล์ชำรุด" +02000A93="ซีอาร์ซีใน '{0}' ไม่สามารถใช้การได้ ไฟล์ชำรุด" +02000A94="ข้อมูลในไฟล์บีบอัด '{0}' ผิดพลาด รหัสผ่านไม่ถูกต้อง?" + +; Password dialog +02000B00="ใส่รหัสผ่าน" +02000B01="ใส่รหัสผ่าน:" +02000B02="&แสดงรหัสผ่าน" +02000B03="ใส่รหัสผ่านอีกครั้ง:" +02000B10="รหัสผผ่านไม่ตรง" +02000B11="ตั้งรหัสผ่านด้วยอักษรภาษาอังกฤษ หรืออักขระ (!, #, $, ...) " +02000B12="รห้สผ่านยาวเกินไป" + +; Progress dialog +02000C00="กระบวนการ" +02000C01="ใช้เวลาไปแล้ว:" +02000C02="ต้องใช้เวลาอีก:" +02000C03="ขนาด:" +02000C04="ความเร็ว:" +02000C05="ดำเนินการแล้ว:" +02000C06="อัตราส่วนการบีบอัด:" + +02000C10="&ทำงานเป็นพื้นหลัง" +02000C11="&ทำงานเป็นพื้นหน้า" +02000C12="&หยุดชั่วคราว" +02000C13="&ดำเนินการต่อ" + +02000C20="หยุดชั่วคราว" + +02000C30="คุณแน่ใจหรือว่าจะยกเลิก" + +; Compress dialog +02000D00="เพิ่มเข้าเอกสาร" +02000D01="&เอกสาร:" +02000D02="&การปรับปรุง:" +02000D03="รูปแบบการบีบอัดที่ต้องการใช้:" +02000D04="&วิธีการบีบอัด:" +02000D05="สร้างเอกสารแบบต่อเนื่อง" +02000D06="&พารามิเตอร์:" +02000D07="ตัวเลือก" +02000D08="สร้างเอกสาร SFX" +02000D09="มัลติเทรดดิ้ง" +02000D0A="สร้างรหัสผ่าน" +02000D0B="อัตราการบีบอัด:" +02000D0C="&ขนาดดิคชันนารี:" +02000D0D="&ขนาดอักษร:" +02000D0E="หน่วยความจำที่ใช้ในการบีบอัด:" +02000D0F="หน่วยความจำที่ใช้ในการแตกออก:" +02000D10="การเข้ารหัส" +02000D11="วิธีการเข้ารหัส:" +02000D12="จำนวน CPU threads:" +02000D13="ขนาด Solid block:" +02000D14="Non-solid" +02000D15="Solid" +02000D16="บีบอัดแชร์ไฟล์" + +02000D40="ขนาดไฟล์ที่ต้องการแบ่ง, ไบต์:" +02000D41="ขนาด volume ไม่ถูกต้อง" +02000D42="ระบุขนาด volume: {0} ไบท์.\nท่านมั่นใจว่าต้องการแบ่งไฟล์เป็น volumes ดังกล่าว?" + +02000D81="เก็บเฉยๆ" +02000D82="ปกติ" +02000D83="ดี" +02000D84="เร็ว" +02000D85="เร็วที่สุด" +02000D86="ดีที่สุด" + +02000D90="ค้นดู" + +02000DA1="เพิ่มและแทนที่ไฟล์" +02000DA2="ปรับปรุงและเพิ่ม" +02000DA3="ทำให้ไฟล์ที่มีอยู่ใช้การได้ดีขึ้น" +02000DA4="ทำให้ไฟล์ประสานกัน" + +02000DB1="ไฟล์ทั้งหมด" + +02000DC0="กำลังบีบอัด" + +; Columns dialog +02000E00="สดมภ์" +02000E01="ตรวจสอบสดมภ์ซึ่งจะทำให้คุณรู้รายละเอียดของไฟล์ได้มากขึ้น ใช้ปุ่มย้ายขึ้นและย้ายลงเพื่อเรียงลำดับสดมภ์อีกครั้ง" +02000E02="สดมภ์ที่เลือกไว้จะเป็น" +02000E03="ความกว้าง (พิกเซล)" + +02000E10="ย้ายขึ้น" +02000E11="ย้ายลง" +02000E12="&แสดง" +02000E13="&ซ่อน" +02000E14="เซ็ต" + +02000E81="หัวเรื่อง" +02000E82="ความกว้าง" + +; Testing +02000F90="กำลังทดสอบ" + + +; File Manager + +03000000="ตัวจัดการไฟล์ 7-Zip" + +; Menu +03000102="&แฟ้ม" +03000103="&แก้ไข" +03000104="&มุมมอง" +03000105="&เครื่องมือ" +03000106="&ช่วยเหลือ" +03000107="&รายการโปรด" + +; File +03000210="&เปิด" +03000211="เปิดในหน้าต่างเดิม" +03000212="เปิดในหน้าต่างใหม่" +03000220="&มุมมอง" +03000221="&แก้ไข" +03000230="&เปลี่ยนชื่อ" +03000231="&คัดลอกไปที่..." +03000232="&วางที่..." +03000233="&ลบ" +03000240="&คุณสมบัติ" +03000241="&หมายเหตุ" +03000242="คำนวณ checksum" +03000243="Diff" +03000250="สร้างโฟลเดอร์" +03000251="สร้างไฟล์" +03000260="ออก" +03000270="&แยกไฟล์..." +03000271="รวมไฟล์..." + +; Edit +03000310="&ทำกลับ" +03000311="&ทำซ้ำ" +03000320="&ตัด" +03000321="&คัดลอก" +03000322="&วาง" +03000323="&ลบ" +03000330="เลือกทั้งหมด" +03000331="ยกเลิกการเลือกทั้งหมด" +03000332="&สลับการเลือกให้เป็นตรงกันข้าม" +03000333="เลือก..." +03000334="ยกเลิกการเลือก..." +03000335="เลือกด้วยแบบชนิด" +03000336="ยกเลิกการเลือกด้วยแบบชนิด" + +; View +03000410="&ไอคอนขนาดใหญ่" +03000411="&ไอคอนขนาดเล็ก" +03000412="&แสดงเป็นรายการ" +03000413="&แสดงแบบละเอียด" +03000420="ไม่เลือก" +03000430="เปิดรากโฟลเดอร์" +03000431="เลื่อนขึ้นหนึ่งระดับ" +03000432="ประวัติโฟลเดอร์..." +03000440="&ฟื้นฟู" +03000449="แสดงไฟล์และโฟลด์เดอร์ทั้งหมด" +03000450="&แสดง 2 แผง" +03000451="&แถบเครื่องมือ" +03000460="แถบเครื่องมือเอกสาร" +03000461="แถบเครื่องมือธรรมดา" +03000462="ปุ่มขนาดใหญ่" +03000463="แสดงข้อความบนปุ่ม" + +; Tools +03000510="&ตัวเลือก..." +03000511="&เกณฑ์เปรียบเทียบสมรรถนะ" + +; Help +03000610="&เนื้อหาและดัชนี..." +03000620="&เกี่ยวกับ 7-Zip..." + +; Favorites +03000710="&เพิ่มโฟลเดอร์เข้ารายการโปรด" +03000720="คั่นหน้าที่" + +; Options Dialog + +03010000="ตัวเลือก" + +; Plugins +03010100="ปลั๊กอิน" +03010101="&ปลั๊กอิน:" +03010110="ตัวเลือก..." + +; Edit +03010200="บรรณาธิกรณ์" +03010201="&บรรณาธิกรณ์:" +03010202="&Diff:" + +; System +03010300="ระบบ" +03010302="ทำให้ 7-Zip ทำงานร่วมกับ:" +03010310="ปลั๊กอิน" + +; Settings +03010400="กำหนด" +03010401="แสดงวัตถุ \"..\"" +03010402="แสดงไอคอนไฟล์ที่แท้จริง" +03010410="แสดงเมนูระบบ" +03010420="&เลือกเต็มแถว" +03010421="แสดง &เส้นกริด" +03010422="คลิกครั้งเดียวเพื่อเปิดไฟล์" +03010430="&โหมดการเลือกอื่น" +03010440="ใช้ &เพจความจำขนาดใหญ่" + +; Strings + +03020201="คัดลอก" +03020202="ย้าย" +03020203="คัดลอกไปที่:" +03020204="ย้ายที่:" +03020205="กำลังคัดลอก..." +03020206="กำลังวาง..." +03020207="คุณไม่สามารถย้ายหรือคัดลอกวัตถุในโฟลเดอร์เช่นนี้" +03020208="การปฏิบัติการไม่สนับสนุน" +03020209="เลือกโฟลเดอร์ที่ตั้ง" + +03020210="ยืนยันการลบไฟล์" +03020211="ยืนยันการลบโฟลเดอร์" +03020212="ยืนยันการลบไฟล์แบบควบซ้อน" +03020213="คุณแน่ใจหรือว่าคุณต้องการจะลบไฟล์ '{0}'?" +03020214="คุณแน่ใจหรือว่าคุณต้องการจะลบโฟลเดอร์ '{0}' และข้อมูลของมันทั้งหมด" +03020215="คุณแน่ใจหรือว่าจะลบวัตถุ {0} เหล่านี้" +03020216="กำลังลบ..." +03020217="เกิดข้อผิดพลาดในการลบไฟล์หรือโฟลเดอร์" +03020218="ระบบไม่สามารถย้ายไฟล์ที่ชื่อที่ตั้งยาวไปยังถังขยะได้" + +03020220="กำลังเปลี่ยนชื่อ..." +03020221="เกิดข้อผิดพลาดในการเปลี่ยนชื่อไฟล์หรือโฟลเดอร์" +03020222="ยืนยันการคัดลอกไฟล์" +03020223="ท่านมั่นใจที่จะคัดลอกไฟล์ไปยังเอกสารหรือไม่" + +03020230="สร้างโฟลเดอร์" +03020231="ชื่อโฟลเดอร์:" +03020232="โฟลเดอร์ใหม่" +03020233="เกิดข้อผิดพลาดในการสร้างโฟลเดอร์" + +03020240="สร้างไฟล์" +03020241="ชื่อไฟล์:" +03020242="ไฟล์ใหม่" +03020243="เหิดข้อผิดพลาดในการสร้างไฟล์" + +03020250="เลือก" +03020251="ยกเลิกการเลือก" +03020252="ตัวพราง:" + +03020260="ประวัติโฟลเดอร์" + +03020280="ไฟล์ '{0}' ได้ถูกดัดแปรแล้ว\nคุณต้องการจะปรับปรุงเอกสารหรือไม่" +03020281="ไม่สามารถปรับปรุงไฟล์\n'{0}'" +03020282="ไม่สามารถเปิดตัวแก้ไขได้" +03020283="กำลังเปิด..." +03020284="ไฟล์อาจเป็นไวรัส (ชื่อไฟล์มีช่องว่างยาว)" + +03020290="หมายเหตุ" +03020291="&หมายเหตุ:" + +030202A0="ระบบ" + +03020300="คอมพิวเตอร์" +03020301="เครือข่าย" +03020302="เอกสาร" + +03020400="เพิ่มเข้า" +03020401="แยกไฟล์" +03020402="ทดสอบ" + +03020420="คัดลอก" +03020421="ย้าย" +03020422="ลบ" +03020423="เกี่ยวกับ" + +03020500="แยกไฟล์" +03020501="&แยกไปยัง:" +03020510="กำลังแยก..." +03020520="ยืนยันการแยก" +03020521="ท่านมั่นใจว่าต้องการแยกไฟล์เป็น {0} volumes?" +03020522="ขนาด Volume ต้องเล็กกว่าขนาดไฟล์ต้นฉบับ" + +03020600="รวมไฟล์" +03020601="&รวมไปยัง:" +03020610="กำลังรวม..." +03020620="เลือกเฉพาะส่วนแรกของไฟล์แยก" +03020621="ไม่สามารถตรวจพบไฟล์ว่าเป็นส่วนหนึ่งของไฟล์แยก" +03020622="ไม่สามารถหาไฟล์แยกได้มากหนึ่ง" + +03020710="กำลังคำนวณ Checksum..." +03020720="ข้อมูล Checksum" +03020721="CRC checksum ของข้อมูล:" +03020722="CRC checksum ของข้อมูลและชื่อ:" + +03020800="กำลังสแกน..." + +03020900="คุณสมบัติ" + +03020A01="ไม่สามารถดำเเนินการได้จากโฟลเดอร์ที่มีที่ตั้งยาว" +03020A02="ท่านต้องเลือกไฟล์" +03020A03="ท่านต้องเลือกไฟล์หนึ่งไฟล์หรือมากว่า" +03020A04="ไฟล์ {0} มีอยู่แล้ว" + +; Computer +03031100="ขนาดทั้งหมด" +03031101="ช่องว่างที่เหลืออยู่" +03031102="ขนาดกลุ่ม" +03031103="ป้าย" + +; Network +03031200="ชื่อเฉพาะ" +03031201="ผู้ให้บริการ" + +; Benchmark Dialog + +03080000="เกณฑ์เปรียบเทียบสมรรถนะ" +03080001="หน่วยความจำที่ใช้:" +03080002="การบีบอัด" +03080003="การยกเลิกบีบอัด" +03080004="ความเร็ว" +03080005="เกณฑ์ความสามารถ" +03080006="เกณฑ์ความสามารถทั้งหมด" +03080007="ปัจจุบัน" +03080008="ผลการประเมิน" +03080009="ข้อความ:" +0308000A="ความผิดพลาด:" +0308000B="การใช้งาน CPU" +0308000C="ประสิทธิภาพ /การใช้งาน" + +;!@LangEnd@! diff --git a/GUI/Lang/tr.txt b/GUI/Lang/tr.txt new file mode 100644 index 0000000..f7bb62b --- /dev/null +++ b/GUI/Lang/tr.txt @@ -0,0 +1,545 @@ +;!@Lang@!UTF-8! +; 7-Zip 9.07 +; Translated by X-FoRcE 22.09.2009 +; +; X-FoRcE +; Turkiye +; + +00000000="Turkish" +00000001="Türkçe" +00000002="31" + +; 7-Zip Configuration + +; Title +01000000="7-Zip Yapılandırma" + +; Info Page +01000100="7-Zip hakkında" +01000103="7-Zip özgür bir yazılımdır. Ancak, kayıt olarak 7-zip geliştirme faaliyetine destek olabilirsiniz." +01000104="Destek" +01000105="Kayıt ol" + +; Folders Page +01000200="Klasörler" +01000210="Ça&lışma klasörü" +01000211="&Sistem TEMP klasörü" +01000212="&Geçerli klasör" +01000213="&Belirtilen klasör:" +01000214="Sadece çıkarılabilen sürücüler için kullan" + +01000281="Geçici arşiv dosyaları için bir yer belirleyin." + +; System Page +01000300="Sistem" +01000301="İçerik menülerinde 7-Zip görünsün" +01000302="Kademeli içerik menüsü" +01000310="İçerik menü öğeleri:" + +; Language Page +01000400="Dil" +01000401="Dil:" + + +; 7-Zip Explorer extension + +; Context menu +02000101="7-Zip" +02000102="7-Zip komutları" +02000103="Arşivi aç" +02000104="Seçili arşivi açar." +02000105="Dosyaları çıkart..." +02000106="Seçili arşivden dosyaları çıkartır." +02000107="Arşivle..." +02000108="Seçili öğeleri arşive ekler." +02000109="Arşivi sına" +0200010A="Seçili arşivin bütünlüğünü test eder." +0200010B="Burada çıkart" +0200010C="Seçili arşivdeki dosyaları geçerli klasöre çıkartır." +0200010D="{0} klasörüne çıkart" +0200010E="Alt klasöre çıkartır." +0200010F="{0} olarak arşivle" +02000110="Seçili öğeleri arşive ekler." +02000111="Sıkıştırıp postala..." +02000112="Seçili öğeleri sıkıştırıp arşivler ve arşivi e-posta ile gönderir." +02000113="{0} olarak sıkıştır ve postala" +02000114="Seçili öğeleri sıkıştırıp arşivler ve arşivi e-posta ile gönderir." + +02000140="" +02000141="" + +; Properties +02000203="Yol" +02000204="Ad" +02000205="Uzantı" +02000206="Klasör" +02000207="Boyut" +02000208="Arşivde boyutu" +02000209="Öznitelikler" +0200020A="Oluşturma" +0200020B="Erişim" +0200020C="Değiştirme" +0200020D="Katı" +0200020E="Açıklanmış" +0200020F="Şifrelenmiş" +02000210="Önceki parça" +02000211="Sonraki parça" +02000212="Sözlük" +02000213="CRC" +02000214="Tür" +02000215="Anti" +02000216="Sıkıştırma şekli" +02000217="İşletim sistemi" +02000218="Dosya Sistemi" +02000219="Kullanıcı" +0200021A="Grup" +0200021B="Blok" +0200021C="Açıklama" +0200021D="Konum" +0200021E="Yol Öneki" +0200021F="Klasörler" +02000220="Dosyalar" +02000221="Sürüm" +02000222="Cilt" +02000223="Çoklu Cilt" +02000224="Konum" +02000225="Bağlantılar" +02000226="Bloklar" +02000227="Ciltler" + +02000229="64-bit" +0200022A="Big-endian" +0200022B="İşlemci" +0200022C="Fiziksel Boyut" +0200022D="Başlık Boyutu" +0200022E="Checksum" +0200022F="Karakteristik" +02000230="Sanal Adres" +02000231="ID" +02000232="Kısa İsim" +02000233="Oluşturan Yazılım" +02000234="Kesim Boyutu" +02000235="Biçim" +02000236="Bağlantı" + +; Status bar +02000301="{0} adet öğe seçili" +02000302="{0} adet öğe" + +02000320="Dosyalar:" +02000321="Klasörler:" +02000322="Boyut:" +02000323="Sıkıştırılmış Boyut:" +02000324="Arşivler:" + +; List Context Menu +02000401="&Sütunlar..." + +02000411="&Aç" +02000412="&Çıkart..." + +; ToolBar +02000501="Çıkart" + +; Messages +02000601="Bu arşiv üzerinde güncelleme yapamazsınız." +02000602="{0} arşivi güncellenemiyor" +02000603="'{0}' klasörü oluşturulamıyor" +02000604="Bu dosya bilinen bir arşiv değil." +02000605="Hata" +02000606="Çok fazla öğe" +02000607="Bu dosya uzantısı ile ilişkili bir uygulama yok" +02000608="Hata yok." +02000609="'{0}' arşiv dosyası olarak açılamıyor." +0200060A="'{0}' dosyası açılamıyor. Şifreniz yanlış olabilir mi?" +0200060B="Sistem gerekli belleği ayarlayamadı" +0200060C="Bilinmeyen hata" +0200060D="Desteklenmeyen arşiv tipi" + +; Dialogs +02000702="Tamam" +02000705="&Evet" +02000707="Tümüne E&vet" +02000709="&Hayır" +0200070B="Tümüne Ha&yır" + +02000710="İptal" +02000711="İ&ptal" +02000713="&Kapat" +02000714="Dur" +02000715="Tekrar başlat" + +02000720="Yardım" + +; Extract dialog +02000800="Çıkart" +02000801="&Çıkartılacak yer:" +02000802="Parola" + +02000810="Yol adları" +02000811="Tam yol adları" +02000812="Geçerli yol adları" +02000813="Yol adları olmasın" + +02000820="Olan dosyalar" +02000821="Üzerine yazmak için sor" +02000822="Sormadan üzerine yaz" +02000823="Çıkartma" +02000824="Arşivdekilere yeni ad ver" +02000825="Olanlara yeni ad ver" + +02000830="Dosyalar" +02000831="&Seçili dosyalar" +02000832="&Tüm dosyalar" + +02000881="Çıkartılacak dosyalar için bir yer belirleyin." + +02000890="çıkartılıyor" + +; Overwrite dialog +02000900="Üzerine Yazma Durumu" +02000901="Hedef klasörde bu adla bir dosya var. Üzerine yazılsın mı?" +02000902="Mevcut dosya:" +02000903="Çıkartılan dosya:" + +02000911="&Yeni ad ver" + +02000982="{0} bayt" +02000983="son değişimi " + +; Messages dialog +02000A00="Tanılayıcı iletiler" + +02000A80="İleti" + +02000A91="'{0}' için sıkıştırma şekli tanınamadı." +02000A92="'{0}' bozuk. (Veri hatası)" +02000A93="'{0}' bozuk. (CRC hatası)" +02000A94="Şifrelenmiş '{0}' dosyası hatalı. Şifreniz yanlış olabilir mi?" +02000A95="'{0}' dosyasında CRC hatası. Şifreniz yanlış olabilir mi?" + +; Password dialog +02000B00="Parola Girişi" +02000B01="Parolayı girin:" +02000B02="Par&ola görünsün" +02000B03="Şifre tekrarı:" +02000B10="Şifreler birbiriyle uyuşmuyor." +02000B11="Şifre için İngilizce harfler, sayılar ve özel karekterden (!, #, $, ...) kullanabilirsiniz." +02000B12="Şifre çok uzun" + +; Progress dialog +02000C00="işle" +02000C01="Geçen süre:" +02000C02="Kalan süre:" +02000C03="Boyut:" +02000C04="Hız:" +02000C05="İşlenen:" +02000C06="Sıkıştırma oranı:" + +02000C10="&Arka planda" +02000C11="Ö&nde" +02000C12="&Duraklat" +02000C13="De&vam et" + +02000C20="Duraklatıldı - " + +02000C30="İptal edilsin mi?" + +; Compress dialog +02000D00="Arşivle" +02000D01="&Arşiv:" +02000D02="&Güncelleme şekli:" +02000D03="Arşiv &biçimi:" +02000D04="Sı&kıştırma şekli:" +02000D05="Ka&tı olsun" +02000D06="&Parametreler:" +02000D07="Seçenekler" +02000D08="Ke&ndi çıkartsın (SFX)" +02000D09="Ç&ok ilmekli" +02000D0A="Dosya adlarını şi&frele" +02000D0B="Sıkıştırma dü&zeyi:" +02000D0C="&Sözlük boyutu:" +02000D0D="Ke&lime boyutu:" +02000D0E="Bellek kullanımı (Sıkıştırma):" +02000D0F="Bellek kullanımı (Çözme):" +02000D10="Şifreleme" +02000D11="Şifreleme metodu:" +02000D12="İşlemci iş parçası sayısı:" +02000D13="Aralıksız blok boyutu:" +02000D14="Aralıklı" +02000D15="Aralıksız" +02000D16="Paylaşılan dosyaları sıkıştır" + +02000D40="Bayt/&cilt olarak parçala:" +02000D41="Yanlış cilt boyutu" +02000D42="Belirtilen cilt boyutu: {0} bayt.\nBu boyutta ciltlere ayırmak istediğinize emin misiniz?" + +02000D81="Sıkıştırmasız" +02000D82="Normal" +02000D83="Maksimum" +02000D84="Hızlı" +02000D85="En hızlı" +02000D86="Ultra" + +02000D90="Gözat" + +02000DA1="Dosyaları ekle, olanları çıkart" +02000DA2="Dosyaları ekle, eskileri güncelle" +02000DA3="Sadece eskileri güncelle" +02000DA4="Dosyaları eşitle" + +02000DB1="Tüm dosyalar" + +02000DC0="sıkıştırılıyor" + +; Columns dialog +02000E00="Sütunlar" +02000E01="Bu klasörde görülebilir olmasını istediğiniz sütunları işaretleyin. Sütunları sıralamak için yukarı-aşağı düğmelerini kullanın." +02000E02="Seçili sütun genişliği" +02000E03="&piksel olsun." + +02000E10="&Yukarı" +02000E11="&Aşağı" +02000E12="&Göster" +02000E13="Gi&zle" +02000E14="Tayin et" + +02000E81="Başlık" +02000E82="Genişlik" + +; Testing +02000F90="Sınanıyor" + + +; File Manager + +03000000="7-Zip Dosya Yöneticisi" + +; Menu +03000102="&Dosya" +03000103="Dü&zenle" +03000104="Gö&rüntüle" +03000105="&Araçlar" +03000106="&Yardım" +03000107="Sı&k Kullanılanlar" + +; File +03000210="&Aç" +03000211="Pa&nelde Aç" +03000212="Pence&rede Aç" +03000220="&Görüntüle" +03000221="Dü&zenle" +03000230="Yeni a&d ver" +03000231="K&opyala" +03000232="&Taşı" +03000233="&Sil" +03000240="Öz&ellikler" +03000241="Açıkla&ma" +03000242="Toplam checksum hesapla" +03000243="Fark" +03000250="Yeni k&lasör" +03000251="Yeni dos&ya" +03000260="Çı&k" +03000270="&Parçala..." +03000271="&Birleştir..." + +; Edit +03000310="&Geri al" +03000311="&Yinele" +03000320="&Kes" +03000321="K&opyala" +03000322="Ya&pıştır" +03000323="&Sil" +03000330="&Tümünü seç" +03000331="Tüm seçimi ka&ldır" +03000332="&Aksini seç" +03000333="Seç..." +03000334="Seçimi kaldır..." +03000335="Bu uzantıyı seç" +03000336="Uzantılı seçimi kaldır" + +; View +03000410="&Büyük Simgeler" +03000411="&Küçük Simgeler" +03000412="&Liste" +03000413="&Detaylar" +03000420="Sırasız" +03000430="Kök Klasörü Aç" +03000431="Bir Seviye Yukarı" +03000432="Klasör Geçmişi..." +03000440="&Yenile" +03000449="Düz Görünüm" +03000450="&2 Panel aç" +03000451="&Araç çubukları" +03000460="Arşiv çubuğu" +03000461="Standart çubuk" +03000462="Büyük düğmeler" +03000463="Düğme metinleri görünsün" + +; Tools +03000510="&Seçenekler..." +03000511="&Performans ölçümü" + +; Help +03000610="İç&indekiler..." +03000620="7-Zip &Hakkında..." + +; Favorites +03000710="Geçerli &klasörü ekle" +03000720="Yer" + +; Options Dialog + +03010000="Seçenekler" + +; Plugins +03010100="Eklentiler" +03010101="&Eklentiler:" +03010110="Ayarlar..." + +; Edit +03010200="Düzenleyici" +03010201="Metin &düzenleyici:" +03010202="&Fark:" + +; System +03010300="Sistem" +03010302="7-Zip ile ilişkilendir:" +03010310="Eklenti" + +; Settings +03010400="Ayarlar" +03010401="\"..\" öğesi görünsün" +03010402="Gerçek dosya simgeleri görünsün" +03010410="Sistem menüsü görünsün" +03010420="&Tüm satır seçilsin" +03010421="Tabl&o çizgileri görünsün" +03010422="Öğeyi açmak için tek tıkla" +03010430="&Alternatif seçim kipi" +03010440="Geniş &bellek sayfaları kullan" + +; Strings + +03020201="Kopyala" +03020202="Taşı" +03020203="Kopyalanacak yer:" +03020204="Taşınacak yer:" +03020205="Kopyalanıyor..." +03020206="Taşınıyor..." +03020207="Öğelerin kopyalanması veya taşınması bu klasör için mümkün değil." +03020208="Bu klasör için istenen işlem desteklenmiyor." +03020209="Hedef klasörü seçiniz." + +03020210="Dosya Silme Onayı" +03020211="Klasör Silme Onayı" +03020212="Birden Fazla Dosya Silme Onayı" +03020213="'{0}' silinsin mi?" +03020214="'{0}' klasörü ve içindekiler silinsin mi?" +03020215="{0} silinsin mi?" +03020216="Siliniyor..." +03020217="Dosya veya Klasör Silme Hatası" +03020218="Dosya yolu uzun olduğundan Geri Dönüşüm Kutusuna taşınamıyor" + +03020220="Dosya Adı Değiştiriliyor..." +03020221="Dosya veya Klasör Adlandırma Hatası" +03020222="Kopyalama Onayı" +03020223="Dosyalar arşive kopyalansın mı" + +03020230="Yeni klasör" +03020231="Klasör adı:" +03020232="Yeni Klasör" +03020233="Klasör Oluşturma Hatası" + +03020240="Yeni dosya" +03020241="Dosya Adı:" +03020242="Yeni Dosya" +03020243="Dosya Oluşturma Hatası" + +03020250="Seç" +03020251="Seçimi kaldır" +03020252="Seçim ifadesi:" + +03020260="Klasör Geçmişi" + +03020280="'{0}' dosyası değişmiş.\nArşivde güncellensin mi?" +03020281="'{0}' dosyası güncellenemedi" +03020282="Metin düzenleyici başlatılamadı." +03020283="açılıyor..." +03020284="Bu dosya virüs gibi görünüyor.(Dosya ismi uzun boşluk içeriyor)." + +03020290="Açıklama" +03020291="&Açıklama:" + +030202A0="Sistem" + +03020300="Bilgisayar" +03020301="Ağ" +03020302="Belgeler" + +03020400="Arşivle" +03020401="Çıkart" +03020402="Sına" + +03020420="Kopyala" +03020421="Taşı" +03020422="Sil" +03020423="Bilgi" + +03020500="Parçala" +03020501="Şu &klasörde parçala:" +03020510="Parçalanıyor..." +03020520="Silmeyi onaylayın" +03020521="Dosyayı {0} parçaya ayırmak istediğinizden emin misiniz?" +03020522="Parça büyüklüğü, orjinal dosya boyutundan küçük olmalıdır" + +03020600="Birleştir" +03020601="Şu &klasörde birleştir:" +03020610="Birleştiriliyor..." +03020620="Sadece ilk parçayı seçiniz" +03020621="Parçalanan dosya tespit edilemedi" +03020622="Parçalanmış dosyanın bir parçadan fazlası bulunamadı" + +03020710="Checksum değeri hesaplanıyor..." +03020720="Checksum bilgisi" +03020721="Verinin CRC değeri:" +03020722="Verinin CRC değeri ve isimler:" + +03020800="Taranıyor..." + +03020900="Özellikler" + +03020A01="The operation cannot be called from a folder that has a long path." +03020A02="Bir dosya seçmelisiniz" +03020A03="Bir veya daha fazla dosya seçmelisiniz" +03020A04="Dosya {0} zaten mevcut" + +; Computer +03031100="Toplam Boyut" +03031101="Boş Alan" +03031102="Küme Boyutu" +03031103="Etiket" + +; Network +03031200="Yerel Ad" +03031201="Sağlayıcı" + +; Benchmark Dialog + +03080000="Bilgisayar performansı" +03080001="Bellek kullanımı:" +03080002="Sıkıştırılıyor" +03080003="Çözülüyor" +03080004="Hız" +03080005="Puan" +03080006="Toplam Puan" +03080007="Mevcut" +03080008="Sonuç" +03080009="Başarılı:" +0308000A="Hatalı:" +0308000B="İşlemci kullanımı" +0308000C="Puan / Kullanım" + +;!@LangEnd@! + + \ No newline at end of file diff --git a/GUI/Lang/tt.txt b/GUI/Lang/tt.txt new file mode 100644 index 0000000..ece8894 --- /dev/null +++ b/GUI/Lang/tt.txt @@ -0,0 +1,544 @@ +;!@Lang@!UTF-8! +; 7-Zip 9.16 beta +; Translated by Amychok (Ne laÅ­diĝu ke vi scias multajn lingvojn, +; hontu ke vi ne scias patran lingvon) +; +; based on russian translation by Igor Pavlov (7-Zip 9.07) +; + +00000000="Tatar" +00000001="Татарча" +00000002="68" + +; 7-Zip Configuration + +; Title +01000000="7-Zip Конфигурациясы" + +; Info Page +01000100="7-Zip программа турында" +01000103="Программа 7-Zip тараттылыра бушлай" +01000104="Ярдәм" +01000105="Язылу" + +; Folders Page +01000200="Папкалар" +01000210="&Эш папка" +01000211="&Системаның вакытлы папкасы" +01000212="&Агымдагы" +01000213="&Күрсәтергә:" +01000214="Файдаланырга алмаш таратучылар өчен генә" + +01000281="Сайлагыз урыны вакытлы архивларга" + +; System Page +01000300="Система" +01000301="Тыгарга 7-Zip'ны ярының контекст менюга " +01000302="Каскадлы контекст меню" +01000310="Баглам меню гонсырлар:" + +; Language Page +01000400="Тел" +01000401="Тел:" + + +; 7-Zip Explorer extension + +; Context menu +02000101="7-Zip" +02000102="7-Zip Командалар" +02000103="Архив ачу" +02000104="Сайлаган архивны ачу." +02000105="Чишү" +02000106="Файлларны чыгару сайлаган архивтан." +02000107="Архивка өстәрге" +02000108="Сайлаган объектларны архивка өстәрге." +02000109="Сынарга" +0200010A="Сынау cайлаган архивны." +0200010B="Чишенергә монда" +0200010C="Файлларны чыгару сайлаган архивтан агымдагы папкага." +0200010D="Чишенергә: {0}' папкага" +0200010E="Файлларны чыгару эчке каталогка." +0200010F="Өстәрге: {0}ка" +02000110="Сайлаган объектларны архивка өстәрге." +02000111="Кысып җибәрергә e-mail аша..." +02000112="Сайлаган объектларны кысып, архив e-mail аша җибәрергә." +02000113="Кысып {0}ка, җибәрергә e-mail аша" +02000114="Сайлаган объектларны кысып, архив e-mail аша җибәрергә." + +02000140="<Папка>" +02000141="<Архив>" + +; Properties +02000203="Юл" +02000204="Исем" +02000205="Киңәеш" +02000206="Папка" +02000207="Зурлык" +02000208="Кысык" +02000209="Үзенчәлекләр" +0200020A="Ясалган" +0200020B="Ачылган" +0200020C="Үзгәртелгән" +0200020D="Бөтен" +0200020E="Аңлатма" +0200020F="Шифрланган" +02000210="Ватылган моңа кадәр" +02000211="Аннан соң ватылган" +02000212="Сүзлек" +02000213="CRC" +02000214="Төр" +02000215="Каршы" +02000216="Ысул" +02000217="Система" +02000218="Файл система" +02000219="Кулланучы" +0200021A="төркем" +0200021B="Блок" +0200021C="Тәфсир" +0200021D="Торыш" +0200021E="Юл" +0200021F="Папка" +02000220="Файл" +02000221="Сүрүм" +02000222="Том" +02000223="Күп томлы" +02000224="Күченү" +02000225="Сылтамалар" +02000226="Блок" +02000227="Том" + +02000229="64-бит" +0200022A="Big-endian" +0200022B="Барыштыручы" +0200022C="Физик Зурлыгы" +0200022D="Сәрләүхәрнең зурлыгы" +0200022E="тикшерү җыелма" +0200022F="Сыйфатламалар" +02000230="Санал Адресы" +02000231="ID" +02000232="Кыска Исеме" +02000233="Ясаучы" +02000234="Бүлемтекнең Зурлыгы" +02000235="Тарыз" +02000236="Сылтама" + +; Status bar +02000301="{0} объект сайлаган" +02000302="{0} объект" + +02000320="Файл:" +02000321="Папка:" +02000322="Зурлыгы:" +02000323="Кысык:" +02000324="Архив:" + +; List Context Menu +02000401="&Баганалар..." + +02000411="&Ачырга" +02000412="&Чыгарырга..." + +; ToolBar +02000501="Чыгарырга" + +; Messages +02000601="Бу архив өчен үзгәртү операцияләр эшләмилер." +02000602="Архив үзгәртеп булмады: {0}" +02000603="Архив ясап булмады: {0}" +02000604="Программа бу архив белән эшләми." +02000605="Ялгыш" +02000606="Гонсырлар артык күп" +02000607="Бәйләнгән программа юк" +02000608="Ялгышлар юк" +02000609="Файл ачып булмады '{0}' архив кебек" +0200060A="Шифрлы архив ацып булмады '{0}'. Пароль туры килмәде?" +0200060B="Буш исе җитми" +0200060C="Билгесез ялгыш" +0200060D="Программа бу архив төрә белән эшләми" + +; Dialogs +02000702="Ярый" +02000705="&Әйе" +02000707="&Барысынга әйе" +02000709="Юк&" +0200070B="Барысынга юк" + +02000710="Юкка чыгару" +02000711="&Юкка чыгару" +02000713="&Ябырга" +02000714="Стоп" +02000715="Яңадан" + +02000720="Ярдәм" + +; Extract dialog +02000800="Чыгарырга" +02000801="Чишенергә монда:" +02000802="Пароль" + +02000810="Юллар" +02000811="&Тулы юллар" +02000812="&Нисби юллар" +02000813="Юлларсыз" + +02000820="Алмаш" +02000821="Раслау белән" +02000822="Раслаусыз" +02000823="Үткәрергә" +02000824="Исем үзгәрү автом." +02000825="Исем. үзгәр. автом." + +02000830="Файллар" +02000831="&Сайлаган файллар" +02000832="&Бөтен файллар" + +02000881="Күрсәтегәз чыгара торган файлларга урынны." + +02000890="Чишү" + +; Overwrite dialog +02000900="Файл алмаштыруга раслау" +02000901="Эшкертү торган файл папкада бар инде." +02000902="Алмаштырырга бар файлны" +02000903="бу файл белән?" + +02000911="Исем үзгәрү автом." + +02000982="{0} байт" +02000983="Үзгәртелгән" + +; Messages dialog +02000A00="Игъланнар" + +02000A80="Игълан" + +02000A91="Бу кысу ысулы файл өчен кулланылмы '{0}'." +02000A92="Ялгыш мәгълүмәтләрдә '{0}'. Файл бозылган." +02000A93="Ялгыш CRC'да '{0}'. Файл бозылган." +02000A94="Ялгыш шифрлы файл мәгълүмәтләрдә '{0}'. Пароль дөресме?" +02000A95="Ялгыш шифрлы файл CRC'да '{0}'. Пароль дөресме?" + +; Password dialog +02000B00="Пароль язу" +02000B01="&Языгыз пароль:" +02000B02="&Күрсәтергә пароль" +02000B03="&Кабатлагыз парольны:" +02000B10="Парольлар тиңсез" +02000B11="Парольга языгыз латин әлифбасын галәмәтләрне гына, саннар һәм махсус галәмәтләрне (!, #, $, ...)" +02000B12="Пароль бик озын" + +; Progress dialog +02000C00="Барыш" +02000C01="Узган:" +02000C02="Калган:" +02000C03="Барлыгы:" +02000C04="Тизлек:" +02000C05="Зурлыгы:" +02000C06="Кысу катылыгы:" + +02000C10="&Җирлектә" +02000C11="&Алга" +02000C12="&Тыныш" +02000C13="&Бару" + +02000C20="Тынышта" + +02000C30="Сезгә чынлап киләме операцияне өзәргә?" + +; Compress dialog +02000D00="Архивка өстәрге" +02000D01="&Архив:" +02000D02="&Үзгәртү тарызы:" +02000D03="Архив форматы:" +02000D04="&Кысу ысулы:" +02000D05="Ясарга &Solid архив" +02000D06="&Параметрлар:" +02000D07="Опцияләр" +02000D08="Ясарга SF&X-архив" +02000D09="Күп агымлык" +02000D0A="&Шифрларга файллар исемнәрне" +02000D0B="&Кысу дәрәҗәсе:" +02000D0C="&Лөгать зурлыгы:" +02000D0D="&Cүз зурлыгы:" +02000D0E="Иснең күләме урау өчен:" +02000D0F="Иснең күләме Чишү өчен:" +02000D10="Шифрлау" +02000D11="Шифрлау ысулы:" +02000D12="Агымнарның исәбе:" +02000D13="Блок зурлыгы:" +02000D14="Файл зурлыгына сайларга" +02000D15="Өзлексез" +02000D16="Кысарга яздыруга ачкан файлларны" + +02000D40="&Ватырга томларга, шундый зурлыгы бөлән, байт:" +02000D41="Ялгыш томлар зурлыкны күрсәтү кырда" +02000D42="Тәгаенле том зурлыгы: {0} байт.\nСезгә чын киләме архив өзергә шундый томларга?" + +02000D81="Кысмаска" +02000D82="Гадәти" +02000D83="Иң зур" +02000D84="Тиз" +02000D85="Бик тиз" +02000D86="Ультра" + +02000D90="Актарырга" + +02000DA1="Өстәрге һәм алмаштырырга" +02000DA2="Яңартырга һәм өстәрге" +02000DA3="Яңартырга" +02000DA4="Синхронлаштыру" + +02000DB1="Бөтен файллар" + +02000DC0="Кысу бара" + +; Columns dialog +02000E00="Баганалар" +02000E01="Тамгалагыз баганаларны, ниндиләрне киряк күрсәтергә бу папкада. Кнопкалар бөлән \"Өске\" һәм \"Аска\" ярый сайларга баганаларның тәртипне." +02000E02="Сайлаган баганалар шундый киңлектә булырга тиешләр" +02000E03="&нокта." + +02000E10="&Өске" +02000E11="&Аска" +02000E12="&Күрсәтергә" +02000E13="&Качырырга" +02000E14="Тәгаенләргә" + +02000E81="Исем" +02000E82="Киңлек" + +; Testing +02000F90="Сынау" + + +; File Manager + +03000000="7-Zip Файл Менеджер" + +; Menu +03000102="&Файл" +03000103="&Төзәтү" +03000104="&Кыяфәт" +03000105="&Кораллар" +03000106="&Белешмә" +03000107="&Сайланма" + +; File +03000210="&Ачырга" +03000211="&Ачырга эчендә" +03000212="&Ачырга тышында" +03000220="&Карау" +03000221="&Редакцияләү" +03000230="Исе&м үзгәрү" +03000231="&Кабатларга монда..." +03000232="&Күчәрергә монда..." +03000233="&Бетерергә" +03000240="&Үзлекләр" +03000241="&Аңлатма" +03000242="Тикшерү җыелма" +03000243="Diff" +03000250="&Ясарга папканы..." +03000251="&Ясарга файлны..." +03000260="&Чыгу" +03000270="&Ватырга файлны..." +03000271="Берләштерергә &файлларны..." + +; Edit +03000310="Юкка &чыгарырга" +03000311="&Кайтарырга" +03000320="&Кисеп алырга" +03000321="&Кабатларга" +03000322="&Куярга" +03000323="&Бетерергә" +03000330="&Сайларга бөтенесене" +03000331="Сайлануны алырга" +03000332="&Сайлануны әйләндерергә" +03000333="Сайларга" +03000334="Сайлануны алырга" +03000335="Сайларга төр буенча" +03000336="Алырга сайлануны төр буенча" + +; View +03000410="&Зур галәмәтләр" +03000411="&Вак галәмәтләр" +03000412="&Исемлек" +03000413="&Җәдвәл" +03000420="Сортлаусыз" +03000430="Ачырга тамыр папканы" +03000431="Бер дәрәҗәгә өскәрәк" +03000432="Элеккеге папкалар..." +03000440="&Яңартырга" +03000449="Яссы тарыз" +03000450="&2 тәрәзә" +03000451="&Кораллар тактасы" +03000460="Архивчының кнопкалар тактасы" +03000461="Кнопкаларның стандарт тактасы" +03000462="Зур кнопкалар" +03000463="Язмалар кнопкаларда" + +; Tools +03000510="&Көйләр..." +03000511="&Җитештерүчәнлекне cыналу" + +; Help +03000610="&Эчтәлек..." +03000620="7-Zip &турында..." + +; Favorites +03000710="&Өстәрге папканы сайланмага, көбәк:" +03000720="Китап битбилге" + +; Options Dialog + +03010000="Көйләр" + +; Plugins +03010100="Плагиннар" +03010101="&Плагиннар:" +03010110="Үзл&екләр..." + +; Edit +03010200="Мөхәрир" +03010201="&Мөхәрир:" +03010202="&Diff:" + +; System +03010300="Система" +03010302="7-Zip бәйләргә:" +03010310="Плагин" + +; Settings +03010400="Көйләр" +03010401="Күрсәтергә гонсырны\"..\"" +03010402="Күрсәтергә чынбарлык файлларның сынчыкларны" +03010410="Күрсәтергә систем меню" +03010420="Күрсәткечне бөтен юлга" +03010421="Күрсәтергә бүлгечләрне" +03010422="Ачырга чиртү белән" +03010430="Альтернатив билге тарызы" +03010440="Файдаланырга иснең зур битләр белән" + +; Strings + +03020201="Кабатларга" +03020202="Күчәрергә" +03020203="Кабатларга монда:" +03020204="Күчәрергә монда:" +03020205="Кабатлану..." +03020206="Күчү..." +03020207="Шундый папкаларга кабатларга объектларны ярамый." +03020208="Бу папка өчен операция кулланылмы." +03020209="Күрсәтегәз папканы." + +03020210="Файл бетерүгә раслау" +03020211="Папка бетерүгә раслау" +03020212="Файллар төркемне бетерүгә раслау" +03020213="Сезгә чын киләме бетерергә \"{0}\"?" +03020214="Сезгә чын киләме бетерергә папканы \"{0}\" һәм өчендәге файлларны?" +03020215="Сезгә чын киләме бетерергә бу объектларны ({0} данә)?" +03020216="Бетерү..." +03020217="Ялгыш файлны/папканы бетерүдә" +03020218="Файллар бетерүне озын юллар белән кәрзингә система кулланылмы" + +03020220="Исем үзгәрү..." +03020221="Ялгыш файлның\папканың исем үзгәрү чакта" +03020222="Файлларны кабатларга раслау" +03020223="Сезгә чын киләме кабатларга бу файлларны архивка" + +03020230="Ясарга папканы" +03020231="Папка исеме:" +03020232="Яңа папка" +03020233="Ялгыш папка ясаганда" + +03020240="Ясарга файл" +03020241="Файл исеме:" +03020242="Яңа файл" +03020243="Ялгыш файл ясаганда" + +03020250="Сайларга" +03020251="Алырга сайлануны" +03020252="Үрнәк:" + +03020260="Элеккеге папкалар" + +03020280="Файл '{0}' үзгәргән иде.\nСезгә килә яңартырга аны архивта?" +03020281="Файл яңартып булмады\n'{0}'" +03020282="Мөхәрирне җибәреп булмады." +03020283="Ачу..." +03020284="Файл вируска охшаган (файл исемендә озын аралар эзлеклелеге бар)." + +03020290="Аңлатма" +03020291="&Аңлатма:" + +030202A0="Система" + +03020300="Санак" +03020301="Челтәр" +03020302="Кәгазләр" + +03020400="Өстәрге" +03020401="Чыгарырга" +03020402="Сынарга" + +03020420="Кабатларга" +03020421="Күчәрергә" +03020422="Бетерергә" +03020423="Хәбәр" + +03020500="Өзергә файлны" +03020501="&Өзергә монда:" +03020510="Өзелү..." +03020520="Өзелүгә раслау" +03020521="Сезгә чын киләме өзергә файл {0} бүләккә?" +03020522="Том зурлыгы чыгыш файлдан азрак булырга тиеш" + +03020600="Берләштерергә файлларны" +03020601="&Берләштерергә монда:" +03020610="Берләштерү..." +03020620="Кирәк сайларга өзелгән файлның беренче бүләкне гына" +03020621="Өзелгән файлны белеп булмады" +03020622="Өзелгән файлның табылган бер бүләк гәне" + +03020710="Хисаплау тикшерү җыелманы..." +03020720="Тикшерү җыелма" +03020721="CRC'ның тикшерү җыелмасы мәгълүматлар өчән:" +03020722="CRC'ның тикшерү җыелмасы мәгълүматлар һәм исемнәр өчән:" + +03020800="Тарау..." + +03020900="Үзлекләр" + +03020A01="Операция башкарылганга булдыралмы папкадан озын юл бөлән." +03020A02="Сез бер файл сайларга тиеш" +03020A03="Сез бер я берничә файл сайларга тиеш" +03020A04="Файл {0} бар инде" + +; Computer +03031100="Сыемлык" +03031101="Буш" +03031102="Күмәк зурлыгы" +03031103="Тамга" + +; Network +03031200="Урындагы исеме" +03031201="Җибәрүче" + +; Benchmark Dialog + +03080000="Җитештерүчәнлекне cыналу" +03080001="Иснең күләме:" +03080002="Урау" +03080003="Чишү" +03080004="Тизлек" +03080005="Шөһрәтлелек" +03080006="Гомуми шөһрәтлелек" +03080007="Агымдагы" +03080008="Нәтиҗәле" +03080009="Узу:" +0308000A="Ялгыш:" +0308000B="Куллану" +0308000C="Шөһрәтлелек / Куллану." + +;!@LangEnd@! + diff --git a/GUI/Lang/ug.txt b/GUI/Lang/ug.txt new file mode 100644 index 0000000..e34521a --- /dev/null +++ b/GUI/Lang/ug.txt @@ -0,0 +1,536 @@ +;!@Lang@!UTF-8! +; 7-Zip 4.59 +; Translated by Sahran +; +; +; +; + +00000000="Uyghur" +00000001= "ئۇيغۇرچە" +00000002= "128" + +; 7-Zip Configuration + +; Title +01000000= "‏7-Zip تەڭشەك" + +; Info Page +01000100= "‎7-Zip‏ ھەققىدە" +01000103= "‏7-Zip ‏ھەقسىز دېتال. ئەمما تىزىملىتىش ئارقىلىق ئۇنى ئېچىشنى قوللىسىڭىز بولىدۇ." +01000104= "تېخنىكىلىق قوللاش" +01000105= "خەتلەت" + +; Folders Page +01000200= "قىسقۇچ" +01000210= "خىزمەت مۇندەرىجىسى(&W)" +01000211= "(&S)سىستېما ۋاقىتلىق قىسقۇچ" +01000212= "(&C)نۆۋەتتىكى" +01000213= "(&S)بەلگىلەنگەن قىسقۇچ:" +01000214= "يان دىسكىغىلا ئىشلىتىلىدۇ" + +01000281= "پرىس ھۆججىتىنى يېشىدىغان ۋاقىتلىق ئورۇندىن بىرنى بەلگىلەڭ." + +; System Page +01000300= "سىستېما" +01000301= "7-Zip نى ئوڭ كۇنۇپكا تىزىملىكىگە قوش" +01000302= "ئوڭ تىزىملىكنى دەستىلە" +01000310= "ئوڭ تىزىملىكتە كۆرۈنىدىغان تۈرنى تاللاش" + +; Language Page +01000400= "تىل" +01000401= "تىل:" + + +; 7-Zip Explorer extension + +; Context menu +02000101= "7-Zip" +02000102= "7-Zip بۇيرۇقى" +02000103= "پرىس ئاچ" +02000104= "تاللىغان پرىسنى ئاچ" +02000105= "ھۆججەت يەش…" +02000106= "تاللىغان پرىستىن ھۆججەت يەش" +02000107= "پرىسقا قوش" +02000108= "تاللىغان تۈرنى پرىسقا قوش" +02000109= "پرىس سىنا" +0200010A= "تاللىغان پرىسنىڭ مۇكەممەللىكىنى تەكشۈر" +0200010B= "مۇشۇ يەرگە يەش" +0200010C= "تاللىغان پرىستىن ھۆججەتنى نۆۋتتىكى مۇندەرىجىگە يەش" +0200010D= "{0} غا يەش‪‬" +0200010E= "تارماق قىسقۇچقا يەش" +0200010F= "{0}‬ غا قوش ‪" +02000110= "تاللىغان تۈرنى پرىسقا قوش" +02000111= "پرىس ۋە ئېلخەت…" +02000112= "تاللىغان تۈرنى پرىسقا قوشۇپ ئېلخەتتە يوللا." +02000113= "‬ غا پرىسلاپ ئېلخەتتە يوللا" +02000114= "تاللىغان تۈرنى پرىسقا قوشۇپ ئېلخەتتە يوللا" + +02000140= "<قىسقۇچ>" +02000141= "<پرىس>" + +; Properties +02000203= "يول" +02000204= "ئاتى" +02000205= "كېڭەيتىلگەن ئاتى" +02000206= "قىسقۇچ" +02000207= "چوڭلۇقى" +02000208= "بوغچا چوڭلۇقى" +02000209= "خاسلىق" +0200020A= "قۇرغان ۋاقىت" +0200020B= "زىيارەت ۋاقتى" +0200020C= "ئۆزگەرتكەن ۋاقىت" +0200020D= "پۇختا" +0200020E= "ئىزاھات" +0200020F= "شىفىرلانغان" +02000210= "ئاۋال پارچىلا" +02000211= "كېيىن پارچىلا" +02000212= "لۇغەت" +02000213= "CRC" +02000214= "تىپى" +02000215= "قارشى" +02000216= "ئۇسۇل" +02000217= "ئاساسىي مەشغۇلات سىستېمىسى" +02000218= "ھۆججەت سىستېمىسى" +02000219= "ئىشلەتكۈچى" +0200021A= "گۇرۇپپا" +0200021B= "بۆلەك" +0200021C= "ئىزاھات" +0200021D= "ئورۇن" +0200021E= "يول ئالدى قوشۇلغۇچى" +0200021F= "قىسقۇچ" +02000220= "ھۆججەت" +02000221= "نەشرى" +02000222= "ئەن" +02000223= "كۆپ ئەن" +02000224= "ئورۇن ھالقىش" +02000225= "ئۇلانما" +02000226= "بۆلەك" +02000227= "ئەنلەش" + +02000229="64-bit" +0200022A="Big-endian" +0200022B="CPU" +0200022C="فىزىكىلىق چوڭلۇقى" +0200022D="ھۆججەت باشى چوڭلۇقى" +0200022E="يىغىندا تەكشۈر" +0200022F="ئالاھىدىلىك" +02000230="مەۋھۇم ئادرېس" + +; Status bar +02000301= "{0} تۈر تاللاندى" +02000302= "{0} تۈر" + +02000320= "ھۆججەت:" +02000321= "قىسقۇچ:" +02000322= "چوڭلۇقى:" +02000323= "پرىس چوڭلۇقى:" +02000324= "پرىس:" + +; List Context Menu +02000401= "ستۇن(&C)…" + +02000411= "ئاچ(&O)" +02000412= "يەش(&E)…" + +; ToolBar +02000501= "يەش" + +; Messages +02000601= "بۇ پرىس يېڭىلاش مەشغۇلاتىنى قوللىمايدۇ" +02000602= "{0} پرىسنى يېڭىلىيالمايدۇ" +02000603= "“{0}” قىسقۇچ قۇرالمايدۇ" +02000604= "ھۆججەت پرىسنى قوللىمايدۇ" +02000605= "خاتالىق" +02000606= "تۈر بەك كۆپ" +02000607= "بېرىلگەن ھۆججەتنىڭ كېڭەيتىلگەن ئاتى ھېچقانداق قوللىنىشچان پروگراممىغا باغلانمىغان" +02000608= "خاتالىق يوق" +02000609= "'{0}' ھۆججەتنى پرىس سۈپىتىدە ئاچالمايدۇ" +0200060A= "'{0}' شىفىرلانغان پرىسنى ئاچالمايدۇ. ئىم خاتا " +0200060B="سىستېما لازىملىق ئەسلەكنى تەقسىملىيەلمەيدۇ" +0200060C="نامەلۇم خاتالىق" +0200060D="قوللىمايدىغان پرىس تېپى" + +; Dialogs +02000702= "جەزملە" +02000705= "(&Y)ھەئە" +02000707= "ھەممىسى ھەئە(&A)" +02000709= "ياق(&N)" +0200070B= "ھەممىسى ياق(&L)" + +02000710= "ۋاز كەچ" +02000711= "ۋاز كەچ(&C)" +02000713= "ياپ(&C)" +02000714= "توختا" +02000715= "قايتا باشلا" + +02000720= "ياردەم" + +; Extract dialog +02000800= "يەش" +02000801= "يېشىش ئورنى(&X):" +02000802= "ئىم" + +02000810= "يول مودېلى" +02000811= "تولۇق يول ئاتى" +02000812= "نۆۋەتتىكى يول ئاتى" +02000813= "يول ئاتى يوق" + +02000820= "قاپلاش مودېلى" +02000821= "قاپلاشتىن بۇرۇن سورا" +02000822= "ئەسكەرتمەي قاپلا" +02000823= "مەۋجۇد ھۆججەتتىن ئاتلا" +02000824= "ئۆزلۈكىدىن ئاتىنى ئۆزگەرت" +02000825= "مەۋجۇد ھۆججەت ئاتىنى ئۆزگەرت" + +02000830= "ھۆججەتلەر" +02000831= "تاللانغان ھۆججەتلەر(&S)" +02000832= "ھەممە ھۆججەت(&A)" + +02000881= "ھۆججەت يېشىدىغان جايدىن بىرنى كۆرسىتىڭ" + +02000890= "يېشىۋاتىدۇ" + +; Overwrite dialog +02000900= "ھۆججەت ئالماشتۇرۇشنى جەزملە" +02000901= "بۇ قىسقۇچ ئوخشاش ئاتلىق ھۆججەتتىن بىرنى ئۆز ئىچىگە ئالغان" +02000902= "بۇنىڭغا مەۋجۇد ھۆججەتنى " +02000903= " ئالماشتۇرامسىز؟" + +02000911= "ئۆزلۈكىدىن ئات ئۆزگەرت(&U)" + +02000982= "{0} بايت" +02000983= "ئۆزگەرتكەن" + +; Messages dialog +02000A00= "دىئاگنوز ئۇچۇرى" + +02000A80= "ئۇچۇر" + +02000A91= "{0} قوللىمايدىغان پرىسلاش مودېلى" +02000A92= "“{0}” سانلىق مەلۇمات خاتا. ھۆججەت بۇزۇلغان" +02000A93= "“{0}” ئورۇندىكى CRC تەكشۈرۈش مەغلۇپ بولدى، ھۆججەت بۇزۇلغان" +02000A94= "»{0}« شىفىرلانغان ھۆججەت سانلىق مەلۇماتىدا خاتالىق بار، ئىم خاتا." +02000A95= "“{0}” شىفىرلانغان ھۆججەت CRC سانلىق مەلۇمات دەلىللەشتە خاتالىق بار، ئىم خاتا." + +; Password dialog +02000B00= "ئىم كىرگۈزۈڭ" +02000B01= "ئىم كىرگۈزۈڭ:" +02000B02= "ئىم كۆرسەت(&S)" +02000B03= "ئىمنى قايتا كىرگۈزۈڭ " +02000B10= "ئىم ماس كەلمىدى" +02000B11= "(!、#、$...)ئىمغا ئىنگلىزچە ھەرپ، سان ۋە ئالاھىدە ھەرپ-بەلگىلەرلا ئىشلىتىلىدۇ" +02000B12= "ئىم بەك ئۇزۇن" + +; Progress dialog +02000C00= "جەريان" +02000C01= "كەتكەن ۋاقىت:" +02000C02= "قالغان ۋاقىت:" +02000C03= "ئومۇمىي چوڭلۇقى:" +02000C04= "سۈرئىتى:" +02000C05= "بىر تەرەپ قىلىندى:" +02000C06= "پرىس نىسبىتى:" + +02000C10= "ئارقا سۇپا(&B)" +02000C11= "ئالدى سۇپا(&F)" +02000C12= "ۋاقىتلىق توختا(&P)" +02000C13= "داۋاملاشتۇر(&C)" + +02000C20= "ۋاقىتلىق توختىتىلدى" + +02000C30= "راستىنلا ۋاز كېچەمسىز؟" + +; Compress dialog +02000D00= "پرىسقا قوش" +02000D01= "پرىس(&A):" +02000D02= "يېڭىلاش مودېلى(&U):" +02000D03= "پرىسلاش شەكلى(&F):" +02000D04= "پرىسلاش مودېلى(&M):" +02000D05= "مۇقىم پرىس ياسا(&S)" +02000D06= "پارامېتىر(&P):" +02000D07= "تاللانما" +02000D08= "ئۆزى يېشىلىدىغان پرىس ياسا(&X)" +02000D09= "كۆپ ئېقىملىق" +02000D0A= "شىفىرلىق ھۆججەت ئاتى(&N)" +02000D0B= "پرىسلاش دەرىجىسى(&L):" +02000D0C= "لۇغەت چوڭلۇقى(&D):" +02000D0D= "سۆز چوڭلۇقى(&W):" +02000D0E= "پرىسلاشقا كېرەكلىك ئەسلەك:" +02000D0F= "يېشىشكە كېرەكلىك ئەسلەك:" +02000D10= "شىفىرلاش" +02000D11= "شىفىرلاش ئۇسۇلى:" +02000D12= "CPU ئېقىم سانى :" +02000D13= "مۇقىم سانلىق مەلۇمات چوڭلۇقى:" +02000D14= "مۇقىمسىز" +02000D15= "مۇقىم" +02000D16= "ھەمبەھىر ھۆججەت پرىسلا" + +02000D40= "پارچە چوڭلۇقى، بايت(&V):" +02000D41= "پارچە چوڭلۇقى خاتا" +02000D42= "بايت{0} بەلگىلەنگەن پارچە چوڭلۇقى\nنۆۋەتتىكى ھۆججەتنى پارچىلامسىز؟" + +02000D81= "ساقلا" +02000D82= "نورمال" +02000D83= "ئەڭ چوڭ" +02000D84= "تېز" +02000D85= "ئەڭ تېز" +02000D86= "ئەڭ زور چەكتە" + +02000D90= "كۆز يۈگۈرت" + +02000DA1= "ھۆججەت قوش ۋە ئالماشتۇر" +02000DA2= "ھۆججەت يېڭىلا ۋە قوش" +02000DA3= "مەۋجۇد ھۆججەتنى يېڭىلا" +02000DA4= "ھۆججەت قەدەمداشلا" + +02000DB1= "ھەممە ھۆججەت" + +02000DC0= "پرىسلاۋاتىدۇ" + +; Columns dialog +02000E00= "ستون" +02000E01= "بۇ قىسقۇچتا كۆرمەكچى بولغان ستوننى تاللاڭ. يۇقىرىغا ياكى تۆۋەنگە كۇنۇپكىسى بىلەن بۇ ستونلارنىڭ تەرتىپىنى قايتا ئورۇنلاشتۇرالايسىز." +02000E02= "تاللىغان ستون" +02000E03= "تاللىغان ستون كەڭلىكى(&W)(پىكسېل)" + +02000E10= "يۇقىرىغا يۆتكە(&U)" +02000E11= "تۆۋەنگە يۆتكە(&D)" +02000E12= "كۆرسەت(&S)" +02000E13= "يوشۇر(&H)" +02000E14= "تەڭشەك" + +02000E81= "ماۋزۇ" +02000E82= "كەڭلىك" + +; Testing +02000F90= "سىناۋاتىدۇ" + + +; File Manager + +03000000= "7-Zip ھۆججەت باشقۇرغۇچ" + +; Menu +03000102= "ھۆججەت(&F)" +03000103= "تەھرىر(&E)" +03000104= "كۆرۈنۈش(&V)" +03000105= "قورال(&T)" +03000106= "ياردەم(&H)" +03000107= "يىغقۇچ(&A)" + +; File +03000210= "ئاچ(&O)" +03000211= "نۆۋەتتىكى كۆزنەكتە ئاچ(&I)" +03000212= "يېڭى كۆزنەكتە ئاچ(&U)" +03000220= "كۆرۈنۈش(&V)" +03000221= "تەھرىر(&E)" +03000230= "ئات ئۆزگەرت(&M)" +03000231= "كۆچۈرۈش ئورنى(&C)…" +03000232= "يۆتكەش ئورنى(&M)…" +03000233= "ئۆچۈر(&D)" +03000240= "خاسلىق(&R)" +03000241= "ئىزاھات(&N)" +03000242= "ھۆججەت دەلىللە" +03000250= "يېڭى قىسقۇچ" +03000251= "يېڭى ھۆججەت" +03000260= "چېكىن(&X)" +03000270= "ھۆججەت پارچىلا(&S)…" +03000271= "ھۆججەت بىرلەشتۈر(&B)…" + +; Edit +03000310= "يېنىۋال(&U)" +03000311= "قايتىلا(&R)" +03000320= "كەس(&T)" +03000321= "كۆچۈر(&C)" +03000322= "چاپلا(&P)" +03000323= "ئۆچۈر(&D)" +03000330= "ھەممىنى تاللا(&A)" +03000331= "ھەممىنى تاللىما" +03000332= "ئەكسىچە تاللا(&I)" +03000333= "تاللا…" +03000334= "ئەكسىچە تاللا…" +03000335= "ئوخشاش تۈردىكى ھۆججەتنى تاللا" +03000336= "ئوخشاش تۈردىكى ھۆججەتنى ئەكسىچە تاللا" + +; View +03000410= "چوڭ سىنبەلگە(&G)" +03000411= "كىچىك سىنبەلگە(&M)" +03000412= "تىزىملىك(&L)" +03000413= "تەپسىلىي(&D)" +03000420= "تەرتىپلەنمىگەن" +03000430= "غول قىسقۇچنى ئاچ" +03000431= "يۇقىرىغا" +03000432= "قىسقۇچ تارىخى…" +03000440= "يېڭىلا(&R)" +03000449= "تەكشىلىك كۆرۈنۈش" +03000450= "&2 يۈز" +03000451= "قورال ستونى(&T)" +03000460= "پرىس قورال ستونى" +03000461= "ئۆلچەملىك قورال ستونى" +03000462= "چوڭ كۇنۇپكا" +03000463= "كۇنۇپكا خېتىنى كۆرسەت" + +; Tools +03000510= "تاللانما(&O)…" +03000511= "ئۆلچەملىك سىناش(&B)" + +; Help +03000610= "مۇندەرىجە(&C)…" +03000620= " 7-Zip (&A)ھەققىدە " + +; Favorites +03000710= "يىغقۇچقا قوش(&A)" +03000720= "خەتكۈچ" + +; Options Dialog + +03010000= "تاللانما" + +; Plugins +03010100= "قىستۇرما دېتال" +03010101= "قىستۇرما دېتال(&P):" +03010110= "تاللانما…" + +; Edit +03010200= "تەھرىرلىگۈچ" +03010201= "تەھرىرلىگۈچ(&E):" + +; System +03010300= "سىستېما" +03010302= "7-Zip بىلەن باغلانغان ھۆججەت تىپى:" +03010310= "قىستۇرما دېتال" + +; Settings +03010400= "تەڭشەك" +03010401= "كۆرسەت“..”تۈر" +03010402= "ھەقىقىي ھۆججەت سىنبەلگىسى كۆرسەت" +03010410= "سىستېما تىزىملىكىنى كۆرسەت" +03010420= "پۈتۈن قۇر تاللا(&F)" +03010421= "سېتكا كۆرسەت(&G)" +03010430= "شەيئى تاللاش مودىلى(&A)" +03010440= "چوڭ ئەسلەك بېتى ئىشلەت(&L)" + +; Strings + +03020201= "كۆچۈر" +03020202= "يۆتكە" +03020203= "كۆچۈرۈش ئورنى:" +03020204= "يۆتكەش ئورنى:" +03020205= "كۆچۈرۈۋاتىدۇ…" +03020206= "يۆتكەۋاتىدۇ…" +03020207= "سىز ھۆججەت(قىسقۇچ)نى بۇنداق يۆتكەپ ياكى كۆچۈرەلمەيسىز" +03020208= "نۆۋەتتىكى مەشغۇلاتنى قوللىمايدۇ" +03020209= "نىشان قىسقۇچ تاللاڭ" + +03020210= "ھۆججەت ئۆچۈرۈشنى جەزملە" +03020211= "قىسقۇچ ئۆچۈرۈشنى جەزملە" +03020212= "كۆپ ھۆججەت ئۆچۈرۈشنى جەزملە" +03020213= "“{0}” راستىنلا ئۆچۈرەمسىز؟" +03020214= "“{0}” قىسقۇچ ۋە مەزمۇننى راستىنلا ئۆچۈرەمسىز؟" +03020215= "{0} تۈرنى راستىنلا ئۆچۈرەمسىز؟ " +03020216= "ئۆچۈرۈۋاتىدۇ…" +03020217= "قىسقۇچ ياكى ھۆججەت ئۆچۈرۈش خاتالىقى" +03020218="سىستېما يولى ئۇزۇن بولغان ھۆججەتنى ئەخلەتخاناغا يۆتكىيەلمەيدۇ" + +03020220= "ئاتىنى ئۆزگەرتىۋاتىدۇ…" +03020221= "ھۆججەت ياكى قىسقۇچ ئاتىنى ئۆزگەرتىش خاتالىقى" +03020222= "ھۆججەت كۆچۈرۈشنى جەزملە" +03020223= "ھۆججەتنى پرىسقا راستىنلا كۆچۈرەمسىز؟" + +03020230= " قىسقۇچ قۇر" +03020231= "قىسقۇچ ئاتى" +03020232= "يېڭى قىسقۇچ" +03020233= "قىسقۇچ قۇرۇش خاتالىقى" + +03020240= "ھۆججەت قۇر" +03020241= "ھۆججەت ئاتى" +03020242= "يېڭى ھۆججەت" +03020243= "ھۆججەت قۇرۇش خاتالىقى" + +03020250= "تاللاش" +03020251= "ئەكسىچە تاللا" +03020252= "ماسكا:" + +03020260= "قىسقۇچ تارىخى" + +03020280= "“{0}”ئۆزگەرتىلدى\nپرىس ھۆججىتىدە يېڭىلامسىز؟" +03020281= "“{0}”ھۆججەتنى يېڭىلىيالمىدى\n" +03020282= "تەھرىرلىگۈچنى قوزغىتالمىدى" +03020283= "ئېچىۋاتىدۇ…" +03020284="بۇ ھۆججەت ۋىرۇستەك تۇرىدۇ (ھۆججەت ئاتىدا كۆپ بوشلۇق بار)" + +03020290= "ئىزاھات" +03020291= "ئىزاھات(&C)" + +030202A0= "سىستېما" + +03020300= "كومپيۇتېر" +03020301= "تور قوشنا" +03020302="پۈتۈكلەر" + +03020400= "قوش" +03020401= "يەش" +03020402= "سىنا" + +03020420= "كۆچۈر" +03020421= "يۆتكە" +03020422= "ئۆچۈر" +03020423= "ئۇچۇر" + +03020500= "ھۆججەت پارچىلا" +03020501= "پارچىلاش سانى(&S):" +03020510= "پارچىلاۋاتىدۇ…" +03020520= "پارچىلاشنى جەزملە" +03020521= "ھۆججەتنى {0} پارچىغا بۆلەمسىز؟ " +03020522= "پارچە چوڭلۇقى چوقۇم ئەسلى ھۆججەتتىن كىچىك بولۇشى لازىم" + +03020600= "ھۆججەت بىرلەشتۈر" +03020601= "بىرلەشتۈرۈش(&C):" +03020610= "بىرلەشتۈرۈۋاتىدۇ…" +03020620= "بىرىنچى ھۆججەتنىلا تاللا" +03020621="بۆلەكلەنگەن ھۆججەت پارچىسى ئىكەنلىكىنى بايقىيالمىدى" +03020622="باشقا ھۆججەت پارچىسىنى بايقىيالمىدى" + +03020710= "تەكشۈرۈۋاتىدۇ…" +03020720= "تەكشۈرۈش ئۇچۇرى" +03020721= "CRC سانلىق مەلۇمات تەكشۈرۈش:" +03020722= "CRC سانلىق مەلۇمات ۋە ھۆججەت ئاتى تەكشۈرۈش:" + +03020800= "ئىزدەۋاتىدۇ…" + +03020900= "خاسلىق" + +03020A01="يولى ئۇزۇن قىسقۇچقا بۇ مەشغۇلاتنى ئېلىپ بارالمايدۇ." +03020A02="چوقۇم ھۆججەتتىن بىرنى تاللاڭ" +03020A03="چوقۇم بىر ياكى بىر قانچە ھۆججەت تاللاڭ" +03020A04=" {0} ھۆججەت مەۋجۇد" + +; Computer +03031100= "ئومۇمى سىغىمى" +03031101= "ئىشلىتىلىشچان بوشلۇق" +03031102= "توپلاشتۇرغۇچ چوڭلۇقى" +03031103= "ئەن" + +; Network +03031200= "يەرلىك ئاتى" +03031201= "تەمىنلىگۈچى" + +; Benchmark Dialog + +03080000= "ئاساسىي تەكشۈرۈش" +03080001= "ئىشلىتىلگەن ئەسلەك:" +03080002= "پرىسلاۋاتىدۇ" +03080003= "يېشىۋاتىدۇ" +03080004= "سۈرئەت" +03080005= "سۈرئىتى" +03080006= "ئوتتۇرىچە سۈرئىتى" +03080007= "نۆۋەتتە" +03080008= "نەتىجە" +03080009= "يوللاش:" +0308000A= "خاتالىق:" +0308000B= "CPU ئىشلىتىلىشى" +0308000C= "ئىشلىتىش سۈرئىتى" + +;!@LangEnd@! + + diff --git a/GUI/Lang/uk.txt b/GUI/Lang/uk.txt new file mode 100644 index 0000000..1370c5d --- /dev/null +++ b/GUI/Lang/uk.txt @@ -0,0 +1,543 @@ +;!@Lang@!UTF-8! +; 7-Zip 9.17 beta +; Translated by Misha Padalka +; Corrected by Yurii Petrashko (YuriPet) +; +; +; + +00000000="Ukrainian" +00000001="Українська" +00000002="34" + +; 7-Zip Configuration + +; Title +01000000="Налаштування 7-Zip" + +; Info Page +01000100="Про 7-Zip" +01000103="7-Zip є вільним програмним забезпеченням" +01000104="Підтримка" +01000105="Зареєструвати" + +; Folders Page +01000200="Папки" +01000210="&Робоча папка" +01000211="&Системна тимчасова папка" +01000212="&Поточна" +01000213="&Задати:" +01000214="Використовувати тільки для змінних носіїв" + +01000281="Вкажіть розташування тимчасових архівних файлів." + +; System Page +01000300="Система" +01000301="Інтегрувати 7-Zip до контекстного меню оболонки" +01000302="Каскадне контекстне меню" +01000310="Пункти контекстного меню:" + +; Language Page +01000400="Мова" +01000401="Мова:" + + +; 7-Zip Explorer extension + +; Context menu +02000101="7-Zip" +02000102="Команди 7-Zip" +02000103="Відкрити архів" +02000104="Відкриття вибраного архіву." +02000105="Видобути файли..." +02000106="Видобування файлів з вибраного архіву." +02000107="Додати до архіву..." +02000108="Додавання вибраних елементів до архіву." +02000109="Перевірити архів" +0200010A="Перевірка цілісності вибраного архіву." +0200010B="Видобути тут" +0200010C="Видобування файлів з вибраного архіву до поточної папки." +0200010D="Видобути до {0}" +0200010E="Видобування файлів до папки." +0200010F="Додати до {0}" +02000110="Додавання вибраних елементів до архіву." +02000111="Стиснути та надіслати..." +02000112="Стискання вибраних елементів та надсилання архіву електронною поштою." +02000113="Стиснути до {0} та надіслати" +02000114="Стискання вибраних елементів та надсилання архіву електронною поштою." + +02000140="<Папка>" +02000141="<Архів>" + +; Properties +02000203="Шлях" +02000204="Ім'я" +02000205="Розширення" +02000206="Папка" +02000207="Розмір" +02000208="Розмір в архіві" +02000209="Атрибути" +0200020A="Створений" +0200020B="Відкритий" +0200020C="Змінений" +0200020D="Неперервний" +0200020E="З коментарем" +0200020F="Зашифрований" +02000210="Розбитий до" +02000211="Розбитий після" +02000212="Словник" +02000213="CRC" +02000214="Тип" +02000215="Анти" +02000216="Метод" +02000217="Операційна система" +02000218="Файлова система" +02000219="Користувач" +0200021A="Група" +0200021B="Блок" +0200021C="Коментар" +0200021D="Позиція" +0200021E="Префікс шляху" +0200021F="Папок" +02000220="Файлів" +02000221="Версія" +02000222="Том" +02000223="Багатотомний" +02000224="Зміщення" +02000225="Посилань" +02000226="Блоків" +02000227="Частин" + +02000229="64-біт" +0200022A="Big-endian" +0200022B="Процесор" +0200022C="Фізичний розмір" +0200022D="Розмір заголовків" +0200022E="Контрольна сума" +0200022F="Властивості" +02000230="Віртуальна адреса" +02000231="ID" +02000232="Коротке ім'я" +02000233="Створений програмою" +02000234="Розмір сектора" +02000235="Режим" +02000236="Посилання" + +; Status bar +02000301="{0} об'єкт(ів) вибрано" +02000302="{0} об'єкт(ів)" + +02000320="Файлів:" +02000321="Папок:" +02000322="Розмір:" +02000323="Розмір після стиснення:" +02000324="Архівів:" + +; List Context Menu +02000401="&Стовпці..." + +02000411="&Відкрити" +02000412="&Видобути..." + +; ToolBar +02000501="Видобути" + +; Messages +02000601="Операція оновлення не підтримується для даного архіву." +02000602="Не вдається оновити архів {0}" +02000603="Не вдається створити папку '{0}'" +02000604="Файл не є підтримуваним архівом." +02000605="Помилка" +02000606="Забагато елементів" +02000607="Немає програми, пов'язаної з даним розширенням" +02000608="Без помилок" +02000609="Не вдається відкрити файл '{0}' як архів" +0200060A="Не вдається відкрити зашифрований архів '{0}'. Хибний пароль?" +0200060B="Система не може виділити необхідний обсяг пам'яті" +0200060C="Невідома помилка" +0200060D="Непідтримуватий тип архіву" + +; Dialogs +02000702="OK" +02000705="&Так" +02000707="Так для &всіх" +02000709="&Ні" +0200070B="Ні для вс&іх" + +02000710="Скасувати" +02000711="&Скасувати" +02000713="&Закрити" +02000714="Зупинити" +02000715="Перезапустити" + +02000720="Довідка" + +; Extract dialog +02000800="Видобути" +02000801="В&идобути до:" +02000802="Пароль" + +02000810="Обробка шляхів" +02000811="Повні шляхи" +02000812="Відносні шляхи" +02000813="Без шляхів" + +02000820="Режим перезапису" +02000821="Запитувати перед перезаписом" +02000822="Перезаписувати без запиту" +02000823="Пропускати існуючі файли" +02000824="Автоматично перейменовувати" +02000825="Автоматично перейменовувати існуючі файли" + +02000830="Файли" +02000831="&Вибрані файли" +02000832="&Усі файли" + +02000881="Вкажіть розташування для видобуваних файлів." + +02000890="Видобування" + +; Overwrite dialog +02000900="Підтвердіть заміну файлу" +02000901="Папка призначення вже містить оброблюваний файл." +02000902="Ви бажаєте замінити існуючий файл" +02000903="цим?" + +02000911="&Автоматично перейменовувати" + +02000982="{0} байт" +02000983="змінений" + +; Messages dialog +02000A00="Діагностичні повідомлення" + +02000A80="Повідомлення" + +02000A91="Непідтривуваний метод стиску для '{0}'." +02000A92="Помилка даних у '{0}'. Файл пошкоджений." +02000A93="Помилка CRC у '{0}'. Файл пошкоджений." +02000A94="Помилка даних у зашифрованому файлі '{0}'. Хибний пароль?" +02000A95="Помилка CRC у зашифрованому файлі '{0}'. Хибний пароль?" + +; Password dialog +02000B00="Уведіть пароль" +02000B01="Уведіть пароль:" +02000B02="&Відображати пароль" +02000B03="Повторіть пароль:" +02000B10="Паролі не співпадають" +02000B11="Для паролю використовуйте лише англійські літери, цифри та спеціальні символи (!, #, $, ...)" +02000B12="Пароль занадто довгий" + +; Progress dialog +02000C00="Процес" +02000C01="Минуло часу:" +02000C02="Залишилося:" +02000C03="Загалом:" +02000C04="Швидкість:" +02000C05="Оброблено:" +02000C06="Ступінь стиснення:" + +02000C10="&На задньому плані" +02000C11="&На передньому плані" +02000C12="&Пауза" +02000C13="&Продовжити" + +02000C20="Призупинено" + +02000C30="Ви впевнені, що бажаєте скасувати?" + +; Compress dialog +02000D00="Додати до архіву" +02000D01="&Архів:" +02000D02="&Режим оновлення:" +02000D03="&Формат архіву:" +02000D04="&Метод стискання:" +02000D05="Створити &неперервний архів" +02000D06="&Параметри:" +02000D07="Налаштування" +02000D08="&Створити SFX архів" +02000D09="Багатопоточність" +02000D0A="Шифрувати &імена файлів" +02000D0B="С&тупінь стиснення:" +02000D0C="&Розмір словника:" +02000D0D="Р&озмір слова:" +02000D0E="Необхідно пам'яті для стискання:" +02000D0F="Необхідно пам'яті для видобування:" +02000D10="Шифрування" +02000D11="Метод шифрування:" +02000D12="Кількість потоків:" +02000D13="Розмір блоку:" +02000D14="За розміром файлу" +02000D15="Неперервний" +02000D16="Стискати спільні файли" + +02000D40="Розбити на &томи, байт:" +02000D41="Неправильний розмір тому" +02000D42="Заданий розмір тому: {0} байт.\nВи впевнені, що бажаєте розбити архів на такі томи?" + +02000D81="Без стиснення" +02000D82="Нормальне" +02000D83="Максимальне" +02000D84="Швидке" +02000D85="Найшвидше" +02000D86="Ультра" + +02000D90="Переглянути" + +02000DA1="Додати та замінити файли" +02000DA2="Оновити та замінити файли" +02000DA3="Оновити існуючі файли" +02000DA4="Синхронізувати файли" + +02000DB1="Усі файли" + +02000DC0="Стиснення" + +; Columns dialog +02000E00="Стовпці" +02000E01="Позначте стовпці, які ви хотіли б зробити видимими в цій папці. Використовуйте кнопки \"Догори\" та \"Донизу\" для зміни порядку стовпців." +02000E02="Вибраний стовпець має бути &шириною" +02000E03="пікселів." + +02000E10="Змістити до&гори" +02000E11="Змістити до&низу" +02000E12="&Відобразити" +02000E13="&Приховати" +02000E14="Встановити" + +02000E81="Заголовок" +02000E82="Ширина" + +; Testing +02000F90="Тестування" + + +; File Manager + +03000000="Менеджер файлів 7-Zip" + +; Menu +03000102="&Файл" +03000103="&Редагування" +03000104="&Вигляд" +03000105="&Інструменти" +03000106="&Допомога" +03000107="&Уподобання" + +; File +03000210="&Відкрити" +03000211="Відкрити в&середині" +03000212="Відкрити &зовні" +03000220="&Переглянути" +03000221="&Редагувати" +03000230="Пере&йменувати" +03000231="&Копіювати до..." +03000232="Пере&містити до..." +03000233="Ви&далити" +03000240="В&ластивості" +03000241="Комент&ар" +03000242="Обчислити контрольну суму" +03000243="Порівнювач" +03000250="Створити папку" +03000251="Створити файл" +03000260="Ви&хід" +03000270="Роз&бити файл..." +03000271="Об'&єднати файли..." + +; Edit +03000310="&Скасувати" +03000311="&Повернути" +03000320="Ви&різати" +03000321="&Копіювати" +03000322="&Вставити" +03000323="Ви&далити" +03000330="Ви&брати всі" +03000331="Зняти вибір" +03000332="&Інвертувати вибір" +03000333="Вибрати..." +03000334="Зняти вибір..." +03000335="Вибрати за типом" +03000336="Зняти вибір за типом" + +; View +03000410="Вели&кі значки" +03000411="&Маленькі значки" +03000412="&Список" +03000413="&Таблиця" +03000420="Без сортування" +03000430="Відкрити кореневу папку" +03000431="Вище на один рівень" +03000432="Історія папок..." +03000440="&Оновити" +03000449="Плоский вигляд" +03000450="&2 панелі" +03000451="&Панелі інструментів" +03000460="Панель архіву" +03000461="Стандартна панель" +03000462="Великі кнопки" +03000463="Текст на кнопках" + +; Tools +03000510="&Налаштування..." +03000511="&Тестування продуктивності" + +; Help +03000610="&Зміст..." +03000620="&Про 7-Zip..." + +; Favorites +03000710="&Додати папку до уподобань як" +03000720="Закладка" + +; Options Dialog + +03010000="Опції" + +; Plugins +03010100="Модулі" +03010101="&Модулі:" +03010110="Параметри..." + +; Edit +03010200="Редагування" +03010201="&Редактор:" +03010202="&Порівнювач:" + +; System +03010300="Система" +03010302="Асоціювати 7-Zip з:" +03010310="Плаґін" + +; Settings +03010400="Налаштування" +03010401="Відображати елемент \"..\"" +03010402="Відображати справжні піктограми файлів" +03010410="Відображати системне меню" +03010420="Вибір &цілого рядка" +03010421="Відображати &сітку" +03010422="Відкривати об'єкти одним кліком" +03010430="&Альтернативний режим виділення" +03010440="Використовувати &великі сторінки пам'яті" + +; Strings + +03020201="Копіювати" +03020202="Перемістити" +03020203="Копіювати до:" +03020204="Перемістити до:" +03020205="Копіювання..." +03020206="Переміщення..." +03020207="Ви не можете переміщувати чи копіювати елементи для таких папок." +03020208="Операція не підтримується для цієї папки." +03020209="Виберіть папку призначення." + +03020210="Підтвердіть видалення файлу" +03020211="Підтвердіть видалення папки" +03020212="Підтвердіть видалення декількох файлів" +03020213="Ви впевнені, що хочете видалити '{0}'?" +03020214="Ви впевнені, що хочете видалити папку '{0}' і весь її вміст?" +03020215="Ви впевнені, що хочете видалити ці {0} елементів?" +03020216="Видалення..." +03020217="Помилка при видаленні файлу або папки" +03020218="Система не може перемістити файл із довгим шляхом до Кошика" + +03020220="Перейменування..." +03020221="Помилка перейменування файлу або папки" +03020222="Підтвердіть копіювання файлу" +03020223="Ви впевнені, що хочете скопіювати файли до архіву" + +03020230="Створити папку" +03020231="Ім'я папки:" +03020232="Нова папка" +03020233="Помилка при створенні папки" + +03020240="Створити файл" +03020241="Ім'я файлу:" +03020242="Новий файл" +03020243="Помилка при створенні файлу" + +03020250="Вибрати" +03020251="Зняти вибір" +03020252="Маска:" + +03020260="Історія папок" + +03020280="Файл '{0}' був змінений.\nВи бажаєте оновити його в архіві?" +03020281="Неможливо оновити файл\n'{0}'" +03020282="Не вдається запустити редактор." +03020283="Відкриття..." +03020284="Файл виглядає як вірус (ім'я файлу містить довгу послідовність пробілів)." + +03020290="Коментар" +03020291="&Коментар:" + +030202A0="Система" + +03020300="Комп'ютер" +03020301="Мережа" +03020302="Документи" + +03020400="Додати" +03020401="Видобути" +03020402="Тестувати" + +03020420="Копіювати" +03020421="Перемістити" +03020422="Видалити" +03020423="Інформація" + +03020500="Розбити файл" +03020501="&Розбити до:" +03020510="Розбиття..." +03020520="Підтвердіть розбиття" +03020521="Ви впевнені, що бажаєте розбити архів на {0} томів?" +03020522="Розмір тому має бути меншим за розмір вихідного файлу" + +03020600="Об'єднати файли" +03020601="&Об'єднати до:" +03020610="Об'єднання..." +03020620="Виберіть тільки першу частину розбитого файлу" +03020621="Не вдалося визначити файл, як частину розбитог файлу" +03020622="Не вдалося знайти більше однієї частини розбитого файлу" + +03020710="Обчислення контрольної суми..." +03020720="Інформація про контрольну суму" +03020721="Контрольна сума CRC для даних:" +03020722="Контрольна сума CRC для даних та імен:" + +03020800="Сканування..." + +03020900="Властивості" + +03020A01="Операція не може бути викликана з папки, яка має довгий шлях." +03020A02="Ви повинні вибрати один файл" +03020A03="Ви повинні вибрати один або декілька файлів" +03020A04="Файл {0} вже існує" + +; Computer +03031100="Загальний обсяг" +03031101="Вільний простір" +03031102="Розмір кластеру" +03031103="Мітка" + +; Network +03031200="Локальне ім'я" +03031201="Провайдер" + +; Benchmark Dialog + +03080000="Тестування продуктивності" +03080001="Використано пам'яті:" +03080002="Стискання" +03080003="Видобування" +03080004="Швидкість" +03080005="Рейтинг" +03080006="Загальний рейтинг" +03080007="Поточні знач." +03080008="Підсумкові знач." +03080009="Проходів:" +0308000A="Помилок:" +0308000B="Завант. ЦП" +0308000C="Рейт./Завант." + +;!@LangEnd@! diff --git a/GUI/Lang/uz.txt b/GUI/Lang/uz.txt new file mode 100644 index 0000000..e2e0024 --- /dev/null +++ b/GUI/Lang/uz.txt @@ -0,0 +1,459 @@ +;!@Lang@!UTF-8! +; 7-Zip 4.30 +; Translated by Sherzod Mamatkulov +; +; +; +; + +00000000="Uzbek" +00000001="O'zbek" +00000002="67" + +; 7-Zip Configuration + +; Title +01000000="7-Zip tanlovlari" + +; Info Page +01000100="7-Zip haqida" +01000103="7-Zip bepul dasturiy ta'minot. Binobarin, siz uni qayd qildirish orqali qo'llab-quvvatlashingiz mumkin." +01000104="Yordam" +01000105="Qayd qilish" + +; Folders Page +01000200="Papkalar" +01000210="&Ish papkasi" +01000211="Tizim &vaqtinchalik papkasi" +01000212="&Joriy papka" +01000213="&Tayinlangan:" +01000214="Faqat olinadigan drayvlar uchun ishlat" + +01000281="Vaqtinchalik arxiv fayllari uchun manzilni tayinlang." + +; System Page +01000300="Tizim" +01000301="7-Zipni qobiq kontekst menyusiga qo'sh" +01000302="Kontekst menyusi pog'onali" +01000310="Kontekst menyu bandlari:" + +; Language Page +01000400="Til" +01000401="Til:" + + +; 7-Zip Explorer extension + +; Context menu +02000101="7-Zip" +02000102="7-Zip buyruqlari" +02000103="Arxivni och" +02000104="Tanlangan arxivni ochadi." +02000105="Fayllarni ajrat..." +02000106="Tanlangan arxivdan fayllarni ajratadi." +02000107="Arxivga qo'sh..." +02000108="Tanlangan qismlarni arxivga qo'shadi." +02000109="Arxivni sina" +0200010A="Tanlangan arxivning butunligini tekshiradi." +0200010B="Shu joyga ajrat" +0200010C="Tanlangan arxivdagi fayllarni joriy papkaga ajratadi." +0200010D="{0}ga ajrat" +0200010E="Fayllarni nimpapkaga ajratadi." +0200010F="{0}ga qo'sh" +02000110="Tanlangan qismlarni arxivga qo'shadi." +02000111="Siq va emailda jo'nat..." +02000112="Tanlangan qismlarni arxivga siqib, email orqali jo'natadi." +02000113="{0}ga siq va emailda jo'nat" +02000114="Tanlangan qismlarni arxivga siqib, email orqali jo'natadi." + +02000140="" +02000141="" + +; Properties +02000203="Yo'lak" +02000204="Nomi" +02000205="Kengaytma" +02000206="Papka" +02000207="Hajmi" +02000208="Siqilgan hajmi" +02000209="Atributlari" +0200020A="Yaratilgan" +0200020B="Ochilgan" +0200020C="O'zgartirilgan" +0200020D="Yaxlit" +0200020E="Sharhlangan" +0200020F="Tilsimlangan" +02000210="Bundan oldin bo'laklangan" +02000211="Bundan keyin bo'laklangan" +02000212="Lug'at" +02000213="CRC" +02000214="Turi" +02000215="Anti" +02000216="Uslub" +02000217="Mezbon OS" +02000218="Fayl tizimi" +02000219="Foydalanuvchi" +0200021A="Guruh" +0200021B="Block" +0200021C="Sharh" +0200021D="Joylashuv" + +; Status bar +02000301="{0} ta qism tanlangan" +02000302="{0} ta qism" + +; List Context Menu +02000401="&Ustunlar..." + +02000411="&Ochish" +02000412="&Ajrat..." + +; ToolBar +02000501="Ajrat" + +; Messages +02000601="Bu arxivga nisbatan yangilash amallari bajarilmaydi." +02000602="{0} arxivini yagilay olmadim" +02000603="'{0}' papkasini yarata olmadim" +02000604="Ushbu fayl tushunarli arxiv emas." +02000605="Xato" +02000606="Qismlar o'ta ko'p" +02000607="Berilgan fayl nomi kengaytmasi bilan hechqanday dastur biriktirilmagan" +02000608="Hechqanday xato yo'q" + +; Dialogs +02000702="OK" +02000705="&Ha" +02000707="H&ammasiga ha" +02000709="&Yo'q" +0200070B="Hammasiga y&o'q" + +02000710="Bekor" +02000711="&Bekor" +02000713="&Yopish" +02000714="To'xta" +02000715="Qayta boshla" + +02000720="Yordam" + +; Extract dialog +02000800="Ajratish" +02000801="&Buyerga ajrat:" +02000802="Parol" + +02000810="Yo'lak uslubi" +02000811="To'liq yo'lak nomlari" +02000812="Joriy yo'lak nomlari" +02000813="Yo'lak nomi yo'q" + +02000820="Ustidan yozish uslubi" +02000821="Yozib yuborishdan oldin so'ra" +02000822="So'ramasdan yozib yubor" +02000823="Oldindan mavjud fayllarni tashlab ket" +02000824="Avtomatik tarzda qayta nomla" +02000825="Mavjud fayllarni avto qayta nomla" + +02000830="Fayllar" +02000831="&Tanlangan fayllar" +02000832="&Barcha fayllar" + +02000881="Ajratilgan fayllar uchun manzil tayinlang." + +02000890="Ajratilmoqda" + +; Overwrite dialog +02000900="Fayl ustidan yozishni tasdiqlash" +02000901="Manziliy papkada ishlangan fayl oldindan mavjud." +02000902="Mavjud faylni" +02000903="bunisi bilan almashtirasizmi?" + +02000911="A&vtomatik tarzda qayta nomla" + +02000982="{0} bayt" +02000983="o'zgargan sanasi" + +; Messages dialog +02000A00="Diagnostik xabarlar" + +02000A80="Xabar" + +02000A91="'{0}'dagi siquv metodi notanish." +02000A92="'{0}'da data xatosi yuz berdi. Fayl zararlangan." +02000A93="'{0}'da CRC amalga oshmadi. Fayl zararlangan." + +; Password dialog +02000B00="Parolni kiritish" +02000B01="Parolni kiriting:" +02000B02="&Parolni ko'rsat" + +; Progress dialog +02000C00="Jarayon" +02000C01="O'tgan vaqt:" +02000C02="Qolgan vaqt:" +02000C03="Hajm:" +02000C04="Tezlik:" + +02000C10="&Orqa fon" +02000C11="Ol&di fon" +02000C12="&Pauza" +02000C13="&Davom et" + +02000C20="Pauza qilingan" + +02000C30="Rostdan ham bekor qilishni istaysizmi?" + +; Compress dialog +02000D00="Arxivga qo'shish" +02000D01="&Arxiv:" +02000D02="&Yangilash uslubi:" +02000D03="Arxiv &formati:" +02000D04="&Siquv metodi:" +02000D05="&Yaxlit arxiv yarat" +02000D06="&Parametrlar:" +02000D07="Tanlovlar" +02000D08="SF&X arxiv yarat" +02000D09="Ko'p-bo'limda" +02000D0A="Fayl &nomlarini tilsimla" +02000D0B="Siq&uv bosqichi:" +02000D0C="&Lug'at hajmi:" +02000D0D="So'z haj&mi:" +02000D0E="Siquvda ishlatiladigan xotira:" +02000D0F="Ajratuvda ishlatiladigan xotira:" + +02000D40="&Tomlarga bo'lakla, bayt:" + +02000D81="Saqlash" +02000D82="O'rtacha" +02000D83="Eng zo'r" +02000D84="Tez" +02000D85="Eng tez" +02000D86="Ultra" + +02000D90="Belgila" + +02000DA1="Fayllarni qo'sh va almashtir" +02000DA2="Fayllarni yangila va qo'sh" +02000DA3="Mavjud fayllarni yangila" +02000DA4="Fayllarni sinxronla" + +02000DB1="Barcha fayllar" + +02000DC0="Siquv ketmoqda" + +; Columns dialog +02000E00="Ustunlar" +02000E01="Ushbu papkada ko'rinadigan ustunlarni belgilang. Ustunlarni tartibini o'zgartirish uchun Yuqoriga va Pastga tugmalaridan foydalaning." +02000E02="Tanlangan ustun kengligi" +02000E03="pi&xel bo'lsin." + +02000E10="&Yuqoriga" +02000E11="&Pastga" +02000E12="&Ko'rsat" +02000E13="Y&ashir" +02000E14="Tayinla" + +02000E81="Sarlavha" +02000E82="Kengligi" + +; Testing +02000F90="sinaldi" + + +; File Manager + +03000000="7-Zip fayl boshqaruvchisi" + +; Menu +03000102="&Fayl" +03000103="&Tahrir" +03000104="&Ko'rish" +03000105="&Asboblar" +03000106="&Yordam" +03000107="Fa&voritlar" + +; File +03000210="&Ochish" +03000211="&Ichkarida ochish" +03000212="&Tashqarida ochish" +03000220="&Ko'rish" +03000221="Ta&hrirla" +03000230="&Qayta nomla" +03000231="Buyerga &nusxala..." +03000232="B&uyerga ko'chir..." +03000233="O'chir" +03000240="&Xossalari" +03000241="&Sharh" +03000250="Papka yarat" +03000251="Fayl yarat" +03000260="&Chiqish" +03000270="&Faylni bo'lakla..." +03000271="Fayllarni &birlashtir..." + +; Edit +03000310="&Qaytar" +03000311="Qayta &bajar" +03000320="Q&irqish" +03000321="&Nusxala" +03000322="Qo'yis&h" +03000323="&O'chir" +03000330="H&ammasini tanla" +03000331="Hammasini tashla" +03000332="&Tanlanishni teskarila" +03000333="Tanlash..." +03000334="Tashlash..." +03000335="Turi bo'yicha tanla" +03000336="Turi bo'yicha tashla" + +; View +03000410="&Yirik ikonlar" +03000411="&Mitti ikonlar" +03000412="&Ro'yxat" +03000413="&Tafsilotlar" +03000420="Saralanmagan" +03000430="Ildiz papkasini och" +03000431="Bir bosqich yuqoriga" +03000432="Papkalar tarixi..." +03000440="&Qayta och" +03000450="&2 ta panel" +03000451="&Uskunalar majmuasi" +03000460="Arxiv toolbari" +03000461="Standart toolbar" +03000462="Yirik tugmalar" +03000463="Tugmalar matnini ko'rsat" + +; Tools +03000510="Tanl&ovlar..." +03000511="&Baholash" + +; Help +03000610="&Tarkibi..." +03000620="&7-Zip haqida..." + +; Favorites +03000710="&Papkani ushbu xatcho'p qo'sh" +03000720="Xatcho'p" + +; Options Dialog + +03010000="Tanlovlar" + +; Plugins +03010100="Plaginlar" +03010101="&Plaginlar:" +03010110="Tanlovlar..." + +; Edit +03010200="Muharrir" +03010201="&Muharrir:" + +; System +03010300="Tizim" +03010302="Ushbu arxivlarni 7-Zip bilan biriktir:" +03010310="Plagin" + +; Settings +03010400="Sharoit" +03010401="\"..\" qismini ko'rsat" +03010402="Fayllarning haqiqiy ikonlarini ko'rsat" +03010410="Tizim menyusini ko'rsat" +03010420="&To'liq yo'lakni tanlash" +03010421="&Panjara chiziqlarini ko'rsat" +03010430="&Muqobil tanlash uslubini qo'lla" +03010440="&Yirik xotira pageini ishlat" + +; Strings + +03020201="Nusxalash" +03020202="Ko'chirish" +03020203="Ushbu katalogga nusxala:" +03020204="Ushbu katalogga ko'chir:" +03020205="Nusxalanmoqda..." +03020206="Ko'chirilmoqda..." +03020207="Bunaqangi papkalar uchun qismlarni ko'chirish yoki nusxalashning iloji yo'q." +03020208="Ushbu operatsiya qo'llanmaydi." + +03020210="Faylni o'chirishni tasdiqlang" +03020211="Papkani o'chirishni tasdiqlang" +03020212="Ko'plab fayllarni o'chirishni tasdiqlang" +03020213="Rostdan ham '{0}'ni o'chirib tashlamoqchimisiz?" +03020214="Rostdan ham '{0}' papkasini butun tarkibi bilan o'chirib tashlamoqchimisiz?" +03020215="Rostdan ham ushbu {0} ta qismni o'chirib tashlamoqchimisiz?" +03020216="O'chirilmoqda..." +03020217="Fayl yoki papkani o'chirishda xato yuz berdi" + +03020220="Qayta nomlanmoqda..." +03020221="Fayl yoki papkani qayta nomlashda xato yuz berdi" +03020222="Faylni nusxalashni tasdiqlang" +03020223="Rostdan ham fayllarni arxivga nusxalashni xohlaysizmi" + +03020230="Papka yaratish" +03020231="Papka nomi:" +03020232="Yangi papka" +03020233="Papka yaratishda xato yuz berdi" + +03020240="Fayl yaratish" +03020241="Fayl nomi:" +03020242="Yangi fayl" +03020243="Fayl yaratishda xatolik yuz berdi" + +03020250="Tanlash" +03020251="Tashlash" +03020252="Maska:" + +03020260="Papkalar tarixi" + +03020280="'{0}' fayli o'zgartirildi.\nUni arxiv ichida yangilashni xohlaysizmi?" +03020281="Ushbu faylni yangilay olmadim\n'{0}'" +03020282="Muharrirni ocha olmadim." +03020283="Ochilmoqda..." + +03020290="sharhi" +03020291="&Sharh:" + +030202A0="Tizim" + +03020300="Kompyuter" +03020301="Tarmoq" + +03020400="Qo'sh" +03020401="Ajrat" +03020402="Sina" + +03020420="Nusxala" +03020421="Ko'chir" +03020422="O'chir" +03020423="Info" + +03020500="Faylni bo'laklash" +03020501="&Ushbu katalogga bo'lakla:" +03020510="Bo'laklanmoqda..." + +03020600="Fayllarni birlashtirish" +03020601="&Ushbu katalogga birlashtir:" +03020610="Birlashtirilmoqda..." + +; Computer +03031100="Umumiy hajmi" +03031101="Bo'sh joy" +03031102="Klaster hajmi" +03031103="Yorliq" + +; Network +03031200="Lokal nomi" +03031201="Provayder" + +; Benchmark Dialog + +03080000="Baholash" +03080001="Xotira ishlatilishi:" +03080002="Siqish" +03080003="Ajratish" +03080004="Tezlik" +03080005="Reyting" +03080006="Umumiy reyting" +03080007="Joriy" +03080008="Natijaviy" +03080009="O'tganlar:" +0308000A="Xatolar:" + +;!@LangEnd@! \ No newline at end of file diff --git a/GUI/Lang/va.txt b/GUI/Lang/va.txt new file mode 100644 index 0000000..c70199a --- /dev/null +++ b/GUI/Lang/va.txt @@ -0,0 +1,493 @@ +;!@Lang@!UTF-8! +; 7-Zip 4.44 +; Translated by Fernando Verdú +; +; +; +; + +00000000="Valencian" +00000001="Valencià" +00000002="" + +; 7-Zip Configuration + +; Title +01000000="Configuració del 7-Zip" + +; Info Page +01000100="Sobre 7-Zip" +01000103="7-Zip és un programa lliure (GNU LGPL). Pot col·laborar en el desenvolupament del 7-zip registrant-lo, com a usuari registrat podrà rebre suport tècnic." +01000104="Suport" +01000105="Registrar" + +; Folders Page +01000200="Directoris" +01000210="Directori de &treball" +01000211="Directori temporal del &sistema" +01000212="Directori a&ctual" +01000213="E&specificar directori:" +01000214="Utilitzar només per a discs extraibles" + +01000281="Especificar un directori per als arxius temporals." + +; System Page +01000300="Sistema" +01000301="Integrar 7-Zip dins el menu contextual de Windows" +01000302="Menu contextual en cascada" +01000310="Objectes del menu contextual:" + +; Language Page +01000400="Idioma" +01000401="Idioma:" + + +; 7-Zip Explorer extension + +; Context menu +02000101="7-Zip" +02000102="Comandaments 7-Zip" +02000103="Obrir arxiu" +02000104="Obri l'arxiu seleccionat." +02000105="Extraure fitxers..." +02000106="Extraure els fitxers de l'arxiu seleccionat." +02000107="Afegir a l'arxiu..." +02000108="Afegir els objectes seleccionats a l'arxiu." +02000109="Comprovar arxiu" +0200010A="Comprova la integritat del fitxer seleccionat." +0200010B="Extraure ací" +0200010C="Extrau els fitxers de l'arxiu triat al directori actual." +0200010D="Extraure a {0}" +0200010E="Extrau fitxers al subdirectori." +0200010F="Afegir a {0}" +02000110="Afegix els fitxers triats a l'arxiu." +02000111="Comprimir i enviar per correu electrònic..." +02000112="Comprimir els objectes triats a l'arxiu i enviar l'arxiu per correu electrònic." +02000113="Comprimir a {0} i enviar per correu electrònic" +02000114="Comprimir els objectes triats a l'arxiu i enviar l'arxiu per correu electrònic.." + +02000140="" +02000141="" + +; Properties +02000203="Adreça" +02000204="Nom" +02000205="Tipus d'arxiu" +02000206="Directori" +02000207="Tamany" +02000208="Tamany comprimit" +02000209="Atributs" +0200020A="Creat" +0200020B="ültim accés" +0200020C="Última modificació" +0200020D="Compacte" +0200020E="Comentari" +0200020F="Xifrat" +02000210="Expandit abans" +02000211="Expandit després" +02000212="Diccionari" +02000213="CRC" +02000214="Tipus" +02000215="Anti" +02000216="Mètode" +02000217="SO d'origen" +02000218="Sistema de fitxers" +02000219="Usuari" +0200021A="Grup" +0200021B="Bloc" +0200021C="Comentari" +0200021D="Posició" +0200021E="Prefix de ruta" + +; Status bar +02000301="{0} objecte(s) seleccionat(s)" +02000302="{0} objecte(s)" + +02000320="Fitxers:" +02000321="Directoris:" +02000322="Mida:" + +; List Context Menu +02000401="&Columnes..." + +02000411="&Obrir" +02000412="&Extraure..." + +; ToolBar +02000501="Extraure" + +; Messages +02000601="Les operacions d'actualització d'este arxiu no estan suportades." +02000602="No es pot actualitzar l'arxiu {0}" +02000603="No es pot crear el directori '{0}'" +02000604="Tipus d'arxiu desconegut." +02000605="Error" +02000606="Massa objectes" +02000607="No hi ha cap programa associat amb este tipus de fitxer" +02000608="No hi ha errors" +02000609="No es pot obrir el fitxer '{0}' com arxiu" +0200060A="No es pot obrir l'arxiu xifrat '{0}'. contrasenya incorrecta?" + +; Dialogs +02000702="Acceptar" +02000705="&Si" +02000707="Si a &tot" +02000709="&No" +0200070B="No a t&ot" + +02000710="Cancel·lar" +02000711="&Cancel·lar" +02000713="Tan&car" +02000714="Parar" +02000715="Reiniciar" + +02000720="Ajuda" + +; Extract dialog +02000800="Extraure" +02000801="E&xtraure a:" +02000802="Contrasenya" + +02000810="Mode d'adreça" +02000811="Adreça sencera" +02000812="Adreça actual" +02000813="Sense adreça" + +02000820="Sobreescriu" +02000821="Pregunta abans de sobreescriure" +02000822="Sobreescriu sense confirmació" +02000823="Conserva arxius ja existents" +02000824="Reanomena automàticament" +02000825="Reanomena automàticament arxius ja existents" + +02000830="Fitxers" +02000831="Fitxers &seleccionats" +02000832="Tots els fitxers" + +02000881="Seleccione destinació per als fitxers extrets." + +02000890="Extraent" + +; Overwrite dialog +02000900="Confirmar substitució de fitxers" +02000901="El directori de destinació conté un fitxer amb el mateix nom." +02000902="Vol substituir el fitxer existent" +02000903="per este altre?" + +02000911="Renomenar a&utomàticament" + +02000982="{0} bytes" +02000983="modificat el" + +; Messages dialog +02000A00="Missatges de diagnosi" + +02000A80="Missatge" + +02000A91="Mètode de compressió no vàlid per a '{0}'." +02000A92="Error de dades en '{0}'. L'arxiu està corrupte." +02000A93="CRC ha fallat en '{0}'. L'arxiu està corrupte." +02000A94="Errors de dades en l'arxiu xifrat '{0}'. Contrasenya incorrecta?" +02000A95="CRC incorrecte en l'arxiu xifrat '{0}'. Contrasenya incorrecta?" + +; Password dialog +02000B00="Introduir contrasenya" +02000B01="Introduir contrasenya:" +02000B02="Mo&strar contrasenya" +02000B03="Reintroduir contrasenya:" +02000B10="Les contrasenyes no coincideixen" +02000B11="Useu només lletres de l'alfabet anglès, números i caràcters especials (!, #, $, ...) per a la contrasenya" +02000B12="Contrasenya massa llarga" + +; Progress dialog +02000C00="Procés" +02000C01="Temps transcorregut:" +02000C02="Temps restant:" +02000C03="Mida:" +02000C04="Velocitat:" + +02000C10="Segon pla" +02000C11="Primer pla" +02000C12="&Pausa" +02000C13="&Continuar" + +02000C20="Parat" + +02000C30="Està segur que vol cancel·lar?" + +; Compress dialog +02000D00="Afegir a l'arxiu" +02000D01="&Arxiu:" +02000D02="Mode d'act&ualització:" +02000D03="&Format de l'arxiu:" +02000D04="Tipus de co&mpressió:" +02000D05="Crear arxiu compacte" +02000D06="&Paràmetres:" +02000D07="Opcions" +02000D08="Crear arxiu SF&X" +02000D09="Multi-threading" +02000D0A="Encriptar el nom dels fitxers" +02000D0B="&Nivell de compressió:" +02000D0C="Tamany &diccionari:" +02000D0D="Tamany ¶ula:" +02000D0E="Us de memòria Comprimint:" +02000D0F="Us de memòria Descomprimint:" +02000D10="Xifrat" +02000D11="Métode de xifrat:" + +02000D40="Separar en &volums, bytes:" +02000D41="Mida incorrecta de volum" +02000D42="Mida del volum especificada: {0} bytes.\nEsteu segurs que voleu dividir l'arxiu en volums?" + +02000D81="Sense compressió" +02000D82="Normal" +02000D83="Màxima" +02000D84="Ràpida" +02000D85="La més ràpida" +02000D86="Ultra" + +02000D90="Visualitzar" + +02000DA1="Afegir i substituir fitxers" +02000DA2="Actualitzar i afegir fitxers" +02000DA3="Actualitzar fitxers existents" +02000DA4="Sincronitzar fitxers" + +02000DB1="Tots els fitxers" + +02000DC0="Comprimint" + +; Columns dialog +02000E00="Columnes" +02000E01="Seleccione les columnes que vol que siguen visibles en este mode. Faça servir les tecles AvPg i RePg per a organitzar les columnes." +02000E02="La columna triada ha de tindre" +02000E03="píxels d'amplària." + +02000E10="Moure cap am&unt" +02000E11="Moure cap avall" +02000E12="Mo&strar" +02000E13="Amagar" +02000E14="Fixar" + +02000E81="Títol" +02000E82="Ample" + +; Testing +02000F90="Provant" + + +; File Manager + +03000000="Gestor d'Arxius 7-Zip" + +; Menu +03000102="&Arxiu" +03000103="&Editar" +03000104="&Visualitzar" +03000105="Ferramentes" +03000106="Ajuda" +03000107="Favorits" + +; File +03000210="&Obrir" +03000211="Obrir d&ins" +03000212="Obrir fora" +03000220="&Visualitzar" +03000221="&Editar" +03000230="Renom&enar" +03000231="&Copiar a..." +03000232="&Moure a..." +03000233="&Suprimir" +03000240="P&ropietats" +03000241="Come&ntari" +03000242="Calcular checksum" +03000250="Crear directori" +03000251="Crear fitxer" +03000260="Eixir" +03000270="&Separar fitxer..." +03000271="Com&binar fitxers..." + +; Edit +03000310="&Desfer" +03000311="&Refer" +03000320="Re&tallar" +03000321="&Copiar" +03000322="&Pegar" +03000323="&Suprimir" +03000330="Seleccion&ar-ho tot" +03000331="Deseleccionar-ho tot" +03000332="&Invertir selecció" +03000333="Seleccionar..." +03000334="No seleccionar..." +03000335="Seleccionar per tipus" +03000336="No seleccionar per tipus" + +; View +03000410="Icones g&rans" +03000411="Icones menudes" +03000412="&Llista" +03000413="&Detalls" +03000420="No ordenat" +03000430="Obrir directori arrel" +03000431="Directori pare" +03000432="Historial de carpetes..." +03000440="Actualitza&r" +03000449="Vista plana" +03000450="&2 Taules" +03000451="&Barres de ferramentes" +03000460="Arxiu" +03000461="Estàndard" +03000462="Botons grans" +03000463="Mostrar text dels botons" + +; Tools +03000510="&Opcions..." +03000511="&Banc de proves" + +; Help +03000610="&Contingut..." +03000620="Sobre 7-Zip..." + +; Favorites +03000710="&Afegir el directori als Favorits com a" +03000720="Personal" + +; Options Dialog + +03010000="Opcions" + +; Plugins +03010100="Plugins" +03010101="&Plugins:" +03010110="Opcions..." + +; Edit +03010200="Editor" +03010201="&Editor:" + +; System +03010300="Sistema" +03010302="Associar 7-Zip amb:" +03010310="Plugin" + +; Settings +03010400="Ajusts" +03010401="Mostrar l'objecte \"..\"" +03010402="Mostrar icones reals dels fitxers" +03010410="Mostrar el menú del sistema" +03010420="Seleccionar &tota la la fila" +03010421="Mostrar &línies de la taula" +03010430="Mode de selecció &alternatiu" +03010440="Utilitzar pàgines de memòria &grans" + +; Strings + +03020201="Copiar" +03020202="Moure" +03020203="Copiar a:" +03020204="Moure a:" +03020205="Copiant..." +03020206="Movent..." +03020207="No es poden moure o copiar elements d'este tipus de carpetes." +03020208="Operació no permesa." +03020209="Seleccioneu carpeta de destinació." + +03020210="Confirmar supressió del fitxer" +03020211="Confirmar supressió del directori" +03020212="Confirmar supressió m�ltiple de fitxers" +03020213="Està segur de voler suprimir '{0}'?" +03020214="Està segur de voler suprimir la carpeta '{0}' i tot el seu contingut?" +03020215="Està segur de voler esborrar estos {0} elements?" +03020216="Suprimint..." +03020217="Error esborrant fitxer o carpeta" + +03020220="Renomenant..." +03020221="Error renomenant fitxer o carpeta" +03020222="Confirmar copia de fitxer" +03020223="Està segur que vol copiar els fitxers a l'arxiu" + +03020230="Crear carpeta" +03020231="Nom de carpeta:" +03020232="Carpeta nova" +03020233="Error creant carpeta" + +03020240="Crear fitxer" +03020241="Nom de fitxer:" +03020242="Fitxer nou" +03020243="Error creant el fitxer" + +03020250="Seleccionar" +03020251="No seleccionar" +03020252="Màscara:" + +03020260="Historial de directoris" + +03020280="El fitxer '{0}' ha sigut modificat.\nVol actualitzar-lo a l'arxiu?" +03020281="No es pot actualitzar el fitxer\n'{0}'" +03020282="No es pot executar l'editor." +03020283="Obrint..." + +03020290="Comentari" +03020291="&Comentari:" + +030202A0="Sistema" + +03020300="El meu ordinador" +03020301="Entorn de xarxa" + +03020400="Afegir" +03020401="Extraure" +03020402="Provar" + +03020420="Copiar" +03020421="Moure" +03020422="Esborrar" +03020423="Info" + +03020500="Separar fitxer" +03020501="&Separar a:" +03020510="Separant..." +03020520="Confirma divissió" +03020521="Esteu segurs que voleu dividir el fitxer en {0} volums?" +03020522="La mida del volum ha de ser menor que la mida original del fitxer" + +03020600="Combinar fitxers" +03020601="&Combinar a:" +03020610="Combinant..." +03020620="Seleccioneu només el primer fitxer" + +03020710="Calculant checksum..." +03020720="Informació checksum" +03020721="CRC checksum per a les dades:" +03020722="CRC checksum per a dades i noms:" + +03020800="Escanejant..." + +; Computer +03031100="Tamany total" +03031101="Espai lliure" +03031102="Tamany sector" +03031103="Etiqueta" + +; Network +03031200="Nom local" +03031201="Proveïdor" + +; Benchmark Dialog + +03080000="Banc de proves" +03080001="Us de memoria:" +03080002="Comprimint" +03080003="Descomprimint" +03080004="Velocitat" +03080005="Taxa" +03080006="Taxa total" +03080007="Actual" +03080008="Resultant" +03080009="Passades:" +0308000A="Errors:" + +;!@LangEnd@! + + + diff --git a/GUI/Lang/vi.txt b/GUI/Lang/vi.txt new file mode 100644 index 0000000..4e1d08a --- /dev/null +++ b/GUI/Lang/vi.txt @@ -0,0 +1,497 @@ +;!@Lang@!UTF-8! +; 7-Zip 4.48 beta +; Translated by Nguyễn Hồng Quân +; +; +; +; + +00000000="Vietnamese" +00000001="Tiếng Việt" +00000002="42" + +; 7-Zip Configuration + +; Title +01000000="Cấu hình 7-Zip" + +; Info Page +01000100="Giới thiệu 7-Zip" +01000103="7-Zip là một phần mềm miễn phí. Tuy nhiên, bạn vui lòng á»§ng hộ nhóm phát triển 7-Zip bằng cách đăng ký." +01000104="Ủng hộ" +01000105="Đăng ký" + +; Folders Page +01000200="Thư mục" +01000210="&Thư mục làm việc" +01000211="&Thư mục tạm cá»§a hệ thống" +01000212="&Hiện hành" +01000213="&Đặc biệt:" +01000214="Chỉ sá»­ dụng cho ổ đĩa tháo lắp" + +01000281="Chỉ định nÆ¡i chứa tập tin lưu tạm." + +; System Page +01000300="Hệ thống" +01000301="Tích hợp 7-Zip vào menu ngữ cảnh" +01000302="Xếp tầng menu ngữ cảnh" +01000310="Menu ngữ cảnh:" + +; Language Page +01000400="Ngôn ngữ" +01000401="Ngôn ngữ:" + + +; 7-Zip Explorer extension + +; Context menu +02000101="7-Zip" +02000102="Các lệnh cá»§a 7-Zip" +02000103="Mở tập tin đã nén" +02000104="Mở tập tin đã nén." +02000105="Giải nén tập tin..." +02000106="Giải nén từ tập tin nén đã chọn." +02000107="Thêm vào tập tin nén..." +02000108="Thêm những tập tin đã chọn vào tập tin nén." +02000109="Kiểm tra tập tin nén" +0200010A="Kiểm tra tính toàn vẹn cá»§a tập tin đã nén." +0200010B="Giải nén tại đây" +0200010C="Giải nén vào thư mục hiện hành." +0200010D="Giải nén vào {0}" +0200010E="Giải nén vào thư mục con." +0200010F="Thêm vào {0}" +02000110="Thêm những tập tin đã chọn vào tập tin nén." +02000111="Nén và gởi email..." +02000112="Nén những tập tin đã chọn thành tập tin nén rồi gởi email." +02000113="Nén thành {0} rồi gởi email" +02000114="Nén những tập tin đã chọn vào tập tin nén rồi gởi email." + +02000140="" +02000141="" + +; Properties +02000203="Đường dẫn" +02000204="Tên" +02000205="Phần mở rộng" +02000206="Thư mục" +02000207="Trước khi nén" +02000208="Sau khi nén" +02000209="Thuộc tính" +0200020A="Thời điểm tạo thành" +0200020B="Thời điểm truy xuất" +0200020C="Thời điểm sá»­a đổi" +0200020D="Đặc" +0200020E="Ghi chú" +0200020F="Đã được mã hoá" +02000210="Chia nhỏ trước" +02000211="Chia nhỏ sau" +02000212="Từ điển" +02000213="CRC" +02000214="Loại" +02000215="Anti" +02000216="Phương pháp" +02000217="Host OS" +02000218="Hệ thống tập tin" +02000219="Người dùng" +0200021A="Nhóm" +0200021B="Đóng khối" +0200021C="Chú thích" +0200021D="Vị trí" +0200021E="Đầu ngữ đường dẫn" + +; Status bar +02000301="{0} đối tượng đã được chọn" +02000302="{0} đối tượng" + +02000320="Tập tin:" +02000321="Thư mục:" +02000322="Kích cỡ:" + +; List Context Menu +02000401="&Cột..." + +02000411="&Mở" +02000412="&Giải nén..." + +; ToolBar +02000501="Giải nén" + +; Messages +02000601="Thao tác cập nhật không được hỗ trợ cho tập tin này." +02000602="Không thể cập nhật tập tin {0}" +02000603="Không thể tạo thư mục '{0}'" +02000604="Dạng tập tin này không được hỗ trợ." +02000605="Lỗi" +02000606="Quá nhiều mục" +02000607="Không có ứng dụng tương ứng với phần mở rộng cá»§a tập tin này" +02000608="Không xuất hiện lỗi" +02000609="Không thể mở '{0}' như là tập tin nén" +0200060A="Không thể mở tập tin nén bị mã hóa '{0}'. Mật khẩu sai?" + +; Dialogs +02000702="Đồng ý" +02000705="&Có" +02000707="Có &tất" +02000709="&Không" +0200070B="Khôn&g tất" + +02000710="Huá»· bỏ" +02000711="&Huá»· bỏ" +02000713="&Đóng" +02000714="Dừng" +02000715="Làm lại" + +02000720="Giúp đỡ" + +; Extract dialog +02000800="Giải nén" +02000801="&Giải nén vào:" +02000802="Mật mã" + +02000810="Chế độ đường dẫn" +02000811="Đường dẫn đầy đủ" +02000812="Đường dẫn hiện thời" +02000813="Không có đường dẫn" + +02000820="Chế độ ghi đè" +02000821="Hỏi trước khi ghi đè" +02000822="Ghi đè không cần hỏi" +02000823="Bỏ qua tập tin đã có" +02000824="Tá»± động đổi tên" +02000825="Tá»± động đổi tên tập tin đã có" + +02000830="Tập tin" +02000831="Tập tin đã &chọn" +02000832="&Tất cả tập tin" + +02000881="Chọn nÆ¡i để giải nén tập tin." + +02000890="Đang giải nén" + +; Overwrite dialog +02000900="Xác nhận thay thế tập tin" +02000901="Thư mục đích đã có tập tin cần xá»­ lý." +02000902="Bạn có muốn thay thế tập tin đã có" +02000903="bằng tập tin mới?" + +02000911="&Tá»± đổi tên" + +02000982="{0} bytes" +02000983="chỉnh sá»­a ngày" + +; Messages dialog +02000A00="Thông điệp chẩn đoán" + +02000A80="Thông điệp" + +02000A91="Phương pháp nén không được hỗ trợ cho '{0}'." +02000A92="Lỗi về dữ liệu trong '{0}'. Tập tin đã bị hỏng." +02000A93="Lỗi chẵn/lẻ (CRC) trong '{0}'. Tập tin đã bị hỏng." +02000A94="Lỗi dữ liệu trong tập tin nén bị mã hóa '{0}'. Mật khẩu sai?" +02000A95="CRC không thành trong tập tin nén bị mã hóa '{0}'. Mật khẩu sai?" + +; Password dialog +02000B00="Nhập mật khẩu" +02000B01="Nhập mật khẩu:" +02000B02="&Hiển thị mật khẩu" +02000B03="Nhập lại mật khẩu:" +02000B10="Các mật khẩu không khớp nhau" +02000B11="Chỉ dùng những chữ cái tiếng Anh, số và những kí tá»± đặc biệt (!, #, $, ...) cho mật khẩu" +02000B12="Mật khẩu quá dài đi" + +; Progress dialog +02000C00="Xá»­ lý" +02000C01="Thời gian đã qua:" +02000C02="Thời gian còn lại:" +02000C03="Kích thước:" +02000C04="Tốc độ:" + +02000C10="&Chạy nền" +02000C11="&Chạy ưu tiên" +02000C12="&Dừng" +02000C13="&Tiếp tục" + +02000C20="Đã dừng" + +02000C30="Bạn có muốn chấm dứt?" + +; Compress dialog +02000D00="Thêm vào tập tin nén" +02000D01="&Tập tin nén:" +02000D02="&Chế độ cập nhật:" +02000D03="&Dạng tập tin nén:" +02000D04="&Phương thức nén:" +02000D05="Chỉ tạo thành &một tập tin nén" +02000D06="Tham &số:" +02000D07="Tuỳ chọn" +02000D08="Tạo tập tin &tá»± giải nén" +02000D09="Đa luồng" +02000D0A="Mã hoá &tên tập tin" +02000D0B="&Cấp độ nén:" +02000D0C="&Kích thước thư mục:" +02000D0D="&Kích thước từ:" +02000D0E="Bộ nhớ sá»­ dụng cho việc nén:" +02000D0F="Bộ nhớ sá»­ dụng cho việc giải nén:" +02000D10="Mã hóa" +02000D11="Phương pháp mã hóa:" +02000D12="Số luồng xá»­ lý CPU:" +02000D13="Kích cỡ khối đặc:" +02000D14="Không đặc" +02000D15="Đặc" +02000D16="Nén những tập tin chia sẻ" + +02000D40="Chia thành &nhiều phần, bytes:" +02000D41="Kích cỡ phần chia chưa đúng" +02000D42="Kích cỡ phần chia đã định là: {0} bytes.\nĐúng là bạn muốn chia nhỏ tập tin nén thành những phần như thế?" + +02000D81="Lưu trữ" +02000D82="Thường" +02000D83="Tối đa" +02000D84="Nhanh" +02000D85="Nhanh nhất" +02000D86="Siêu nhanh" + +02000D90="Tìm chọn" + +02000DA1="Thêm và thay thế tập tin" +02000DA2="Cập nhật và thêm tập tin" +02000DA3="Cập nhật tập tin đã có" +02000DA4="Đồng bộ tập tin" + +02000DB1="Tất cả tập tin" + +02000DC0="Đang nén, chờ tí" + +; Columns dialog +02000E00="Cột" +02000E01="Đánh dấu chọn các cột mà bạn muốn xuất hiện trong thư mục này. Dùng các nút LÊN/XUỐNG để thay đổi thứ tá»± các cột." +02000E02="Cột đã chọn nên có" +02000E03="độ &rộng theo điểm ảnh." + +02000E10="Chuyển &Lên" +02000E11="Chuyển &Xuống" +02000E12="&Hiển thị" +02000E13="&Ẩn" +02000E14="Đặt" + +02000E81="Tiêu đề" +02000E82="Độ rộng" + +; Testing +02000F90="Kiểm tra" + + +; File Manager + +03000000="Chương trình quản lý tập tin 7-Zip" + +; Menu +03000102="&Tập tin" +03000103="&Biên tập" +03000104="&Xem" +03000105="&Công cụ" +03000106="&Giúp đỡ" +03000107="Ư&a thích" + +; File +03000210="&Mở" +03000211="Mở &tại đây" +03000212="Mở trong cá»­a sổ &khác" +03000220="&Xem" +03000221="&Biên tập" +03000230="Đổ&i tên" +03000231="&Sao chép đến..." +03000232="&Di chuyển đến..." +03000233="&Xoá" +03000240="Th&uộc tính" +03000241="C&hú thích" +03000242="Tính checksum" +03000250="Tạo thư mục" +03000251="Tạo tập tin" +03000260="Th&oát" +03000270="&Cắt tập tin..." +03000271="&Nối tập tin..." + +; Edit +03000310="Như &cÅ©" +03000311="Làm &lại" +03000320="&Cắt" +03000321="&Sao chép" +03000322="&Dán" +03000323="&Xoá" +03000330="Chọn &tất cả" +03000331="Bỏ chọn tất cả" +03000332="Chọn &ngược lại" +03000333="Chọn..." +03000334="Bỏ chọn..." +03000335="Chọn theo loại" +03000336="Bỏ chọn theo loại" + +; View +03000410="Biểu tượng &lớn" +03000411="Biểu tượng &nhỏ" +03000412="&Danh sách" +03000413="&Chi tiết" +03000420="Không sắp xếp" +03000430="Mở thư mục gốc" +03000431="Lên một cấp" +03000432="Lịch sá»­ thư mục..." +03000440="&Rà soát lại" +03000450="&2 bảng" +03000449="Xem dàn trải" +03000451="&Thanh công cụ" +03000460="Thanh công cụ nén" +03000461="Thanh công cụ chuẩn" +03000462="Sá»­ dụng nút lớn" +03000463="Hiển thị chữ trên nút" + +; Tools +03000510="&Tuỳ chọn..." +03000511="Đo tốc độ" + +; Help +03000610="&Nội dung..." +03000620="&Giới thiệu 7-Zip..." + +; Favorites +03000710="&Thêm thư mục vào 'Ưa thích' như là" +03000720="Đánh dấu" + +; Options Dialog + +03010000="Các tùy chọn" + +; Plugins +03010100="Plugins" +03010101="&Plugins:" +03010110="Tuỳ chọn..." + +; Edit +03010200="Biên tập" +03010201="&Biên tập:" + +; System +03010300="Hệ thống" +03010302="Liên kết 7-Zip với:" +03010310="Plugin" + +; Settings +03010400="Sắp đặt" +03010401="Hiển thị \"..\"" +03010402="Hiển thị biểu tượng thá»±c cá»§a tập tin" +03010410="Hiển thị menu hệ thống" +03010420="Chọn cả &dòng" +03010421="Hiển thị &lưới" +03010430="Chế độ chọn luân &phiên" +03010440="Sá»­ dụng bộ &nhớ lớn" + +; Strings + +03020201="Sao chép" +03020202="Di chuyển" +03020203="Sao chép đến:" +03020204="Di chuyển đến:" +03020205="Đang sao chép..." +03020206="Đang di chuyển..." +03020207="Bạn không thể di chuyển hoặc sao chép vào thư mục đó." +03020208="Thao tác không được hỗ trợ." +03020209="Chọn thư mục đến." + +03020210="Xác nhận xoá tập tin" +03020211="Xác nhận xoá thư mục" +03020212="Xác nhận xoá nhiều tập tin" +03020213="Bạn có chắc là bạn có muốn xoá '{0}'?" +03020214="Bạn có chắc là bạn muốn xoá thư mục '{0}' và tất cả tập tin trong nó?" +03020215="Bạn có chắc là bạn muốn xoá {0} ?" +03020216="Đang xoá..." +03020217="Lỗi khi đang xoá tập tin hoặc thư mục" + +03020220="Đang đổi tên..." +03020221="Lỗi khi đổi tên tập tin hoặc thư mục" +03020222="Xác nhận sao chép tập tin" +03020223="Bạn chắc chắn muốn sao chép vào tập tin nén chứ" + +03020230="Tạo thư mục" +03020231="Tên thư mục:" +03020232="Thư mục mới" +03020233="Lỗi khi tạo thư mục" + +03020240="Tạo tập tin" +03020241="Tên tập tin:" +03020242="Tập tin mới" +03020243="Lỗi khi tạo tập tin" + +03020250="Chọn" +03020251="Bỏ chọn" +03020252="Mặt nạ:" + +03020260="Lịch sá»­ thư mục" + +03020280="Tập tin '{0}' đã bị thay đổi.\nBạn có muốn cập nhật vào tập tin nén?" +03020281="Không thể cập nhật tập tin\n'{0}'" +03020282="Không thể khởi động trình biên tập." +03020283="Đang mở..." + +03020290="Chú thích" +03020291="&Chú thích:" + +030202A0="Hệ thống" + +03020300="Máy tính" +03020301="Mạng" + +03020400="Thêm" +03020401="Giải nén" +03020402="Kiểm tra" + +03020420="Sao chép" +03020421="Di chuyển" +03020422="Xoá" +03020423="Thông tin" + +03020500="Chia nhỏ tập tin" +03020501="&Chia nhỏ thành:" +03020510="Đang chia nhỏ..." +03020520="Xác nhận việc chia nhỏ" +03020521="Bạn có chắc là muốn chia nhỏ tập tin nén thành {0} phần?" +03020522="Kích cỡ phần chia phải nhỏ hÆ¡n tập tin gốc à nha!" + +03020600="Nối tập tin" +03020601="&Nối thành:" +03020610="Đang nối..." +03020620="Chỉ chọn tập tin đầu thôi" + +03020710="Đang tính checksum..." +03020720="Thông tin checksum" +03020721="CRC checksum cho dữ liệu:" +03020722="CRC checksum cho dữ liệu và tên:" + +03020800="Đang quét..." + +; Computer +03031100="Tổng kích thước" +03031101="Kích thước trống" +03031102="Kích thước cluster" +03031103="Nhãn" + +; Network +03031200="Tên cục bộ" +03031201="Nhà cung cấp" + +; Benchmark Dialog + +03080000="Đo tốc độ" +03080001="Bộ nhớ sá»­ dụng:" +03080002="Nén" +03080003="Giải nén" +03080004="Tốc độ" +03080005="Đánh giá" +03080006="Tổng đánh giá" +03080007="Hiện thời" +03080008="Kết quả" +03080009="Đã qua:" +0308000A="Lỗi:" +0308000B="Mức dùng CPU" +0308000C="Tốc độ / Mức dùng" + +;!@LangEnd@! diff --git a/GUI/Lang/zh-cn.txt b/GUI/Lang/zh-cn.txt new file mode 100644 index 0000000..926aa95 --- /dev/null +++ b/GUI/Lang/zh-cn.txt @@ -0,0 +1,545 @@ +;!@Lang@!UTF-8! +; 7-Zip 9.08 +; translated by Sparanoid +; http://7z.sparanoid.com/ +; last updated: 2009-12-07 +; revision: 2119 +; + +00000000="Chinese Simplified" +00000001="简体中文" +00000002="4-2" + +; 7-Zip Configuration + +; Title +01000000="7-Zip 配置" + +; Info Page +01000100="关于 7-Zip" +01000103="7-Zip 是一款免费软件。您可以通过捐赠的方式来支持 7-Zip 的开发。" +01000104="技术支持" +01000105="注册" + +; Folders Page +01000200="文件夹" +01000210="工作文件夹(&W)" +01000211="系统临时文件夹(&S)" +01000212="当前文件夹(&C)" +01000213="指定位置(&S)" +01000214="仅用于可移动设备" + +01000281="指定一个存放临时压缩包的位置。" + +; System Page +01000300="系统" +01000301="添加 7-Zip 到右键菜单" +01000302="层叠右键菜单" +01000310="选择在右键菜单中显示的项目" + +; Language Page +01000400="语言" +01000401="选择语言:" + + +; 7-Zip Explorer extension + +; Context menu +02000101="7-Zip" +02000102="7-Zip 指令" +02000103="打开压缩包" +02000104="打开选定的压缩包" +02000105="提取文件..." +02000106="从选定的压缩文件中提取文件" +02000107="添加到压缩包..." +02000108="添加选定项目到压缩包" +02000109="测试压缩包" +0200010A="完整测试已选中的档案" +0200010B="提取到当前目录" +0200010C="从选定的压缩包中提取文件到当前目录。" +0200010D="提取到 {0}" +0200010E="提取文件到子文件夹" +0200010F="添加到 {0}" +02000110="添加选定项目到压缩包" +02000111="压缩并邮寄..." +02000112="将选定的项目添加到压缩包并使用电子邮件发送。" +02000113="压缩 {0} 并邮寄" +02000114="将选定的项目添加到压缩包并使用电子邮件发送。" + +02000140="<文件夹>" +02000141="<档案>" + +; Properties +02000203="路径" +02000204="名称" +02000205="扩展名" +02000206="文件夹" +02000207="大小" +02000208="压缩后大小" +02000209="属性" +0200020A="创建时间" +0200020B="访问时间" +0200020C="修改时间" +0200020D="固实" +0200020E="注释" +0200020F="加密" +02000210="之前分割" +02000211="之后分割" +02000212="字典大小" +02000213="CRC" +02000214="类型" +02000215="剔除项" +02000216="算法" +02000217="主操作系统" +02000218="文件系统" +02000219="用户" +0200021A="组" +0200021B="字块" +0200021C="注释" +0200021D="定位" +0200021E="路径前缀" +0200021F="文件夹" +02000220="文件" +02000221="版本" +02000222="卷" +02000223="多卷压缩" +02000224="偏移" +02000225="链接" +02000226="字块" +02000227="分卷" + +02000229="64 位" +0200022A="大字节序" +0200022B="CPU" +0200022C="物理大小" +0200022D="文件头大小" +0200022E="校验和" +0200022F="特征" +02000230="虚拟地址" +02000231="ID" +02000232="短文件名" +02000233="创建程序" +02000234="扇区大小" +02000235="模式" +02000236="链接" + +; Status bar +02000301="选定 {0} 个项目" +02000302="{0} 个项目" + +02000320="文件:" +02000321="文件夹:" +02000322="大小:" +02000323="处理后大小:" +02000324="压缩包:" + +; List Context Menu +02000401="栏目(&C)..." + +02000411="打开(&O)" +02000412="提取(&E)..." + +; ToolBar +02000501="提取" + +; Messages +02000601="不支持此压缩包的更新操作。" +02000602="无法更新压缩包 {0}" +02000603="无法创建文件夹“{0}”" +02000604="文件不支持压缩包。" +02000605="错误" +02000606="项目太多" +02000607="没有应用程序和下面给出的文件扩展名相关联。" +02000608="未发现错误" +02000609="无法作为压缩包打开文件“{0}”" +0200060A="无法打开加密压缩包“{0}”。密码错误?" +0200060B="系统无法分配所需内存" +0200060C="未知错误" +0200060D="不支持的压缩包格式" + +; Dialogs +02000702="确定" +02000705="是(&Y)" +02000707="全是(&A)" +02000709="否(&N)" +0200070B="全否(&L)" + +02000710="取消" +02000711="取消(&C)" +02000713="关闭(&C)" +02000714="停止" +02000715="重新开始" + +02000720="帮助" + +; Extract dialog +02000800="提取" +02000801="提取到(&X):" +02000802="密码" + +02000810="路径模式" +02000811="完整路径" +02000812="当前路径" +02000813="无路径" + +02000820="覆盖模式" +02000821="在覆盖前询问" +02000822="不提示自动覆盖" +02000823="跳过已经存在的文件" +02000824="自动重命名" +02000825="重命名现有文件" + +02000830="文件" +02000831="选定的文件(&S)" +02000832="全部文件(&A)" + +02000881="指定一个提取文件的位置。" + +02000890="正在提取" + +; Overwrite dialog +02000900="确认文件替换" +02000901="此文件夹已包含一个相同名称的文件。" +02000902="是否将现有文件" +02000903="替换为" + +02000911="自动重新命名(&U)" + +02000982="{0} 字节" +02000983="修改于" + +; Messages dialog +02000A00="诊断信息" + +02000A80="信息" + +02000A91="不支持的压缩算法“{0}”。" +02000A92="数据“{0}”发生错误,文件已损坏。" +02000A93="CRC 校验“{0}”失败,文件已损坏。" +02000A94="加密文件“{0}”数据有误,密码错误?" +02000A95="加密文件“{0}”CRC 数据效验有误,密码错误?" + +; Password dialog +02000B00="输入密码" +02000B01="输入密码:" +02000B02="显示密码(&S)" +02000B03="重新输入:" +02000B10="密码不匹配" +02000B11="密码只允许英文字符,数字,以及特殊字符 (!、#、$...)" +02000B12="密码过长" + +; Progress dialog +02000C00="进程" +02000C01="已用时间:" +02000C02="剩余时间:" +02000C03="总大小:" +02000C04="速度:" +02000C05="已处理:" +02000C06="压缩率:" + +02000C10="后台(&B)" +02000C11="前台(&F)" +02000C12="暂停(&P)" +02000C13="ç»§ç»­(&C)" + +02000C20="已暂停" + +02000C30="您真的要取消吗?" + +; Compress dialog +02000D00="添加到压缩包" +02000D01="压缩包(&A):" +02000D02="更新方式(&U):" +02000D03="压缩格式(&F):" +02000D04="压缩方法(&M):" +02000D05="创建固实压缩包(&S)" +02000D06="参数(&P):" +02000D07="选项" +02000D08="创建自释放程序(&X)" +02000D09="多线程支持(Pentium 4 HT 或多处理器)" +02000D0A="加密文件名(&N)" +02000D0B="压缩等级(&L):" +02000D0C="字典大小(&D):" +02000D0D="单词大小(&W):" +02000D0E="压缩所需内存:" +02000D0F="解压缩所需内存:" +02000D10="加密" +02000D11="加密算法:" +02000D12="CPU 线程数:" +02000D13="固实数据大小:" +02000D14="非固实" +02000D15="固实" +02000D16="压缩共享文件" + +02000D40="分卷大小,字节(&V):" +02000D41="分卷大小错误" +02000D42="指定分卷大小:{0} 字节。\n您确定要分割当前文件吗?" + +02000D81="仅存储" +02000D82="标准压缩" +02000D83="最大压缩" +02000D84="快速压缩" +02000D85="极速压缩" +02000D86="极限压缩" + +02000D90="浏览" + +02000DA1="添加并替换文件" +02000DA2="更新并添加文件" +02000DA3="只刷新已存在的文件" +02000DA4="同步压缩包内容" + +02000DB1="所有文件" + +02000DC0="压缩" + +; Columns dialog +02000E00="栏目" +02000E01="选中您愿意在这个文件夹中可见的栏目。使用上移或者下移按钮来重新安排该栏目的顺序。" +02000E02="选定栏目将会被" +02000E03="所选栏的宽度(像素)(&W)" + +02000E10="上移(&U)" +02000E11="下移(&D)" +02000E12="显示(&S)" +02000E13="隐藏(&H)" +02000E14="设置" + +02000E81="标题" +02000E82="宽度" + +; Testing +02000F90="测试" + + +; File Manager + +03000000="7-Zip 文件管理器" + +; Menu +03000102="文件(&F)" +03000103="编辑(&E)" +03000104="查看(&V)" +03000105="工具(&T)" +03000106="帮助(&H)" +03000107="收藏(&A)" + +; File +03000210="打开(&O)" +03000211="当前窗口打开(&I)" +03000212="新建窗口打开(&U)" +03000220="视图(&V)" +03000221="编辑(&E)" +03000230="重命名(&M)" +03000231="复制到(&C)..." +03000232="移动到(&M)..." +03000233="删除(&D)" +03000240="属性(&R)" +03000241="注释(&N)" +03000242="文件效验" +03000243="文件比较" +03000250="新建文件夹" +03000251="新建文件" +03000260="退出(&X)" +03000270="分割文件(&S)..." +03000271="合并文件(&B)..." + +; Edit +03000310="撤消(&U)" +03000311="重做(&R)" +03000320="剪切(&T)" +03000321="复制(&C)" +03000322="粘贴(&P)" +03000323="删除(&D)" +03000330="全选(&A)" +03000331="全部取消" +03000332="反选(&I)" +03000333="选择..." +03000334="取消选择..." +03000335="选择相同类型的文件" +03000336="取消选择相同类型的文件" + +; View +03000410="大图标(&G)" +03000411="小图标(&M)" +03000412="列表(&L)" +03000413="详细信息(&D)" +03000420="不排序" +03000430="打开根文件夹" +03000431="向上" +03000432="文件夹历史..." +03000440="刷新(&R)" +03000449="平板模式" +03000450="双版面(&2)" +03000451="工具栏(&T)" +03000460="档案工具栏" +03000461="标准工具栏" +03000462="大按钮" +03000463="显示按钮文字" + +; Tools +03000510="选项(&O)" +03000511="基准测试(&B)" + +; Help +03000610="查看帮助(&C)" +03000620="关于 7-Zip (&A)" + +; Favorites +03000710="添加到收藏夹(&A)" +03000720="书签" + +; Options Dialog + +03010000="选项" + +; Plugins +03010100="插件" +03010101="插件(&P):" +03010110="插件选项..." + +; Edit +03010200="编辑器" +03010201="指定编辑器(&E):" +03010202="指定文件比较程序(&D):" + +; System +03010300="系统" +03010302="使用 7-Zip 关联的文件类型:" +03010310="插件" + +; Settings +03010400="显示" +03010401="显示“..”项 (双击向上)" +03010402="显示真实图标" +03010410="显示系统菜单" +03010420="整行选择(&F)" +03010421="显示网格线(&G)" +03010422="单击打开项目" +03010430="7-Zip 传统选择模式(&A)" +03010440="使用大内存页(&L)" + +; Strings + +03020201="复制" +03020202="移动" +03020203="复制到:" +03020204="移动到:" +03020205="正在复制..." +03020206="正在移动..." +03020207="你不能这样移动或复制文件(夹)。" +03020208="不支持当前操作" +03020209="选择目标文件夹。" + +03020210="确认文件删除" +03020211="确认文件夹删除" +03020212="确认删除多个文件" +03020213="确实要删除 “{0}”吗?" +03020214="确实要删除文件夹“{0}”以及全部内容吗?" +03020215="确实要删除这 {0} 项?" +03020216="正在删除..." +03020217="无法删除文件或文件夹." +03020218="系统无法将过长路径的文件移动到回收站" + +03020220="正在重新命名..." +03020221="无法重命名文件或文件夹。" +03020222="确认文件复制" +03020223="您确定复制文件到压缩包" + +03020230="新建文件夹" +03020231="文件夹名称:" +03020232="新建文件夹" +03020233="无法创建文件夹" + +03020240="新建文件" +03020241="文件名:" +03020242="新建文件.txt" +03020243="无法新建文件" + +03020250="选择" +03020251="取消选定" +03020252="掩码:" + +03020260="文件夹历史" + +03020280="文件“{0}”已修改。\n你想在压缩文件中更新它?" +03020281="无法更新文件\n“{0}”,有可能该压缩包是固实的。" +03020282="无法运行外部编辑。" +03020283="正在打开..." +03020284="此文件似乎是病毒文件(文件名中包含多个空格)。" + +03020290="注释" +03020291="注释(&C):" + +030202A0="系统" + +03020300="我的电脑" +03020301="网上邻居" +03020302="我的文档" + +03020400=" 添加 " +03020401=" 提取 " +03020402=" 测试 " + +03020420=" 复制 " +03020421=" 移动 " +03020422=" 删除 " +03020423=" 信息 " + +03020500="分割文件" +03020501="分割文件到(&S):" +03020510="正在分割..." +03020520="确认分割" +03020521="您确认要将文件分割为 {0} 个分卷?" +03020522="分卷大小必须小于原文件大小" + +03020600="合并文件" +03020601="合并文件到(&S):" +03020610="正在合并..." +03020620="请选择分卷的首个文件" +03020621="无法识别文件为压缩分卷" +03020622="无法找到其他压缩分卷" + +03020710="正在效验..." +03020720="效验信息" +03020721="CRC 数据效验:" +03020722="CRC 数据及文件名效验:" + +03020800="正在搜索..." + +03020900="属性" + +03020A01="无法为过长的路径完成该操作。" +03020A02="您必须选择一个文件" +03020A03="您至少要选择一个文件" +03020A04="文件 {0} 已存在" + +; Computer +03031100="总大小" +03031101="可用空间" +03031102="簇大小" +03031103="卷标" + +; Network +03031200="本地名称" +03031201="供应者" + +; Benchmark Dialog + +03080000="基准测试" +03080001="内存使用:" +03080002="压缩" +03080003="解压缩" +03080004="速度" +03080005="评分" +03080006="总体评分" +03080007="当前" +03080008="结果" +03080009="已通过:" +0308000A="发生错误:" +0308000B="CPU 使用率" +0308000C="使用率评分" + +;!@LangEnd@! + + diff --git a/GUI/Lang/zh-tw.txt b/GUI/Lang/zh-tw.txt new file mode 100644 index 0000000..8db15ba --- /dev/null +++ b/GUI/Lang/zh-tw.txt @@ -0,0 +1,543 @@ +;!@Lang@!UTF-8! +; 7-Zip 9.07 +; Translated by Jack Pang at Developer's Home +; http://www.developershome.com/7-zip/ +; +; 7-Zip 4.59 +; Translated by Leon Tseng, sec2, 琥珀 + +00000000="Chinese Traditional" +00000001="繁體中文" +00000002="4-1" + +; 7-Zip Configuration + +; Title +01000000="7-Zip 組態設定" + +; Info Page +01000100="關於 7-Zip" +01000103="7-Zip 為自由軟體" +01000104="支援" +01000105="註冊" + +; Folders Page +01000200="資料夾" +01000210="工作資料夾(&W)" +01000211="系統暫存資料夾(&S)" +01000212="目前的資料夾(&C)" +01000213="指定的資料夾(&S):" +01000214="僅用於卸除式磁碟機" + +01000281="請指定存放暫存壓縮檔的位置。" + +; System Page +01000300="系統" +01000301="將 7-Zip 整合到快顯功能表中" +01000302="串聯式快顯功能表" +01000310="快顯功能表項目:" + +; Language Page +01000400="語言" +01000401="介面語言:" + + +; 7-Zip Explorer extension + +; Context menu +02000101="7-Zip" +02000102="7-Zip 指令" +02000103="開啟壓縮檔" +02000104="開啟選取的壓縮檔。" +02000105="解壓縮檔案..." +02000106="從選取的壓縮檔中解壓縮檔案。" +02000107="加入壓縮檔..." +02000108="將選取的項目加入壓縮檔中。" +02000109="測試壓縮檔" +0200010A="測試選取壓縮檔的完整性。" +0200010B="解壓縮至此" +0200010C="從選取的壓縮檔解壓縮檔案至目前的資料夾中。" +0200010D="解壓縮至 {0}" +0200010E="將檔案解壓縮到子資料夾。" +0200010F="加入 {0}" +02000110="將選取的項目加入壓縮檔中。" +02000111="壓縮並郵寄..." +02000112="將選取的項目壓縮為壓縮檔並經由電子郵件傳送此壓縮檔。" +02000113="壓縮成 {0} 並郵寄" +02000114="將選取的項目壓縮為壓縮檔並經由電子郵件傳送此壓縮檔。" + +02000140="<資料夾>" +02000141="<壓縮檔>" + +; Properties +02000203="路徑" +02000204="名稱" +02000205="副檔名" +02000206="資料夾" +02000207="大小" +02000208="封裝後大小" +02000209="屬性" +0200020A="建立日期" +0200020B="存取日期" +0200020C="修改日期" +0200020D="緊密" +0200020E="註解" +0200020F="加密" +02000210="分割前" +02000211="分割後" +02000212="字典大小" +02000213="CRC" +02000214="類型" +02000215="防護" +02000216="方式" +02000217="主機作業系統" +02000218="檔案系統" +02000219="使用者" +0200021A="群組" +0200021B="區塊" +0200021C="註解" +0200021D="位置" +0200021E="路徑前綴" +0200021F="資料夾" +02000220="檔案" +02000221="版本" +02000222="卷" +02000223="多卷" +02000224="偏移" +02000225="連結" +02000226="區塊" +02000227="分卷" + +02000229="64 位" +0200022A="大端序" +0200022B="CPU" +0200022C="物理大小" +0200022D="文件頭大小" +0200022E="驗證值" +0200022F="特徵" +02000230="虛擬地址" +02000231="ID" +02000232="簡短名稱" +02000233="創建程式" +02000234="扇區大小" +02000235="模式" +02000236="鏈接" + +; Status bar +02000301="已選取 {0} 個物件" +02000302="{0} 個物件" + +02000320="檔案:" +02000321="資料夾:" +02000322="大小:" +02000323="壓縮大小:" +02000324="壓縮檔:" + +; List Context Menu +02000401="欄位(&C)..." + +02000411="開啟(&O)" +02000412="解壓縮(&E)..." + +; ToolBar +02000501="解壓縮" + +; Messages +02000601="此壓縮檔未支援更新操作。" +02000602="無法更新壓縮檔 {0}" +02000603="無法建立資料夾 '{0}'" +02000604="非支援的壓縮檔。" +02000605="錯誤" +02000606="項目過多" +02000607="沒有任何應用程式與特定的檔案副檔名有所關聯。" +02000608="沒有任何錯誤" +02000609="無法開啟壓縮檔 '{0}'" +0200060A="無法開啟加密的壓縮檔 '{0}'。錯誤的密碼?" +0200060B="系統未能提供所需記憶體空間" +0200060C="未知的錯誤" +0200060D="不支援的壓縮檔類型" + +; Dialogs +02000702="確定" +02000705="是(&Y)" +02000707="全部皆是(&A)" +02000709="否(&N)" +0200070B="全部皆否(&L)" + +02000710="取消" +02000711="取消(&C)" +02000713="關閉(&C)" +02000714="停止" +02000715="重新開始" + +02000720="說明" + +; Extract dialog +02000800="解壓縮" +02000801="解壓縮至(&X):" +02000802="密碼" + +02000810="路徑模式" +02000811="完整的路徑名稱" +02000812="目前的路徑名稱" +02000813="不要路徑名稱" + +02000820="覆寫模式" +02000821="覆寫前先詢問我" +02000822="覆寫時不詢問" +02000823="略過現有的檔案" +02000824="自動重新命名" +02000825="自動重新命名現有的檔案" + +02000830="檔案" +02000831="選取的檔案(&S)" +02000832="所有檔案(&A)" + +02000881="請指定存放暫存壓縮檔的位置。" + +02000890="正在解壓縮" + +; Overwrite dialog +02000900="確認取代檔案" +02000901="目的資料夾已包含要處理的檔案。" +02000902="您要取代現有的檔案" +02000903="而改用這個檔案嗎?" + +02000911="自動重新命名(&U)" + +02000982="{0} 位元組" +02000983="修改日期" + +; Messages dialog +02000A00="診斷訊息" + +02000A80="訊息" + +02000A91="'{0}' 未支援此壓縮方式。" +02000A92="'{0}' 中的資料含有錯誤。檔案已損壞。" +02000A93="'{0}' 的 CRC 驗證失敗。檔案已損壞。" +02000A94="資料錯誤於加密的檔案 '{0}'。錯誤的密碼?" +02000A95="CRC 失敗於加密的檔案 '{0}'。錯誤的密碼?" + +; Password dialog +02000B00="輸入密碼" +02000B01="輸入密碼:" +02000B02="顯示密碼(&S)" +02000B03="重新輸入密碼:" +02000B10="密碼不一致" +02000B11="僅能使用英文字母、數字和特殊字元 (!, #, $, ...) 當作密碼" +02000B12="密碼太長" + +; Progress dialog +02000C00="進度" +02000C01="經過時間:" +02000C02="剩餘時間:" +02000C03="大小:" +02000C04="速度:" +02000C05="已處理:" +02000C06="壓縮率:" + +02000C10="背景作業(&B)" +02000C11="前景作業(&F)" +02000C12="暫停(&P)" +02000C13="繼續(&C)" + +02000C20="暫停" + +02000C30="您確定要取消嗎?" + +; Compress dialog +02000D00="加入壓縮檔" +02000D01="壓縮檔(&A):" +02000D02="更新模式(&U):" +02000D03="壓縮檔格式(&F):" +02000D04="壓縮方式(&M):" +02000D05="建立結實壓縮檔(&S)" +02000D06="參數(&P):" +02000D07="選項" +02000D08="建立自解壓縮檔(&X)" +02000D09="多執行緒" +02000D0A="加密檔名(&N)" +02000D0B="壓縮層級(&L):" +02000D0C="字典大小(&D):" +02000D0D="字組大小(&W):" +02000D0E="壓縮時記憶體使用:" +02000D0F="解壓縮時記憶體使用:" +02000D10="加密" +02000D11="加密方法:" +02000D12="CPU 線程數:" +02000D13="結實區塊大小:" +02000D14="非結實" +02000D15="結實" +02000D16="壓縮共用檔案" + +02000D40="分割壓縮檔,位元組(&V):" +02000D41="不正確的分割大小" +02000D42="指定的分割大小: {0} 位元組。\n您確定要分割為這些壓縮檔嗎?" + +02000D81="封存" +02000D82="一般壓縮" +02000D83="最大壓縮" +02000D84="快速壓縮" +02000D85="最快速壓縮" +02000D86="極致壓縮" + +02000D90="瀏覽" + +02000DA1="加入並取代檔案" +02000DA2="更新並加入檔案" +02000DA3="更新現有的檔案" +02000DA4="同步處理檔案" + +02000DB1="所有檔案" + +02000DC0="正在壓縮" + +; Columns dialog +02000E00="欄位" +02000E01="核取您想在此資料夾中所要顯示的欄位。請使用 [上移] 和 [下移] 按鈕重新排列欄位的順序。" +02000E02="選取的欄位應該是" +02000E03="像素寬度(&W)" + +02000E10="上移(&U)" +02000E11="下移(&D)" +02000E12="顯示(&S)" +02000E13="隱藏(&H)" +02000E14="設定" + +02000E81="標題" +02000E82="寬度" + +; Testing +02000F90="測試" + + +; File Manager + +03000000="7-Zip 檔案管理員" + +; Menu +03000102="檔案(&F)" +03000103="編輯(&E)" +03000104="檢視(&V)" +03000105="工具(&T)" +03000106="說明(&H)" +03000107="我的最愛(&A)" + +; File +03000210="開啟(&O)" +03000211="在內部開啟(&I)" +03000212="在外部開啟(&U)" +03000220="檢視(&V)" +03000221="編輯(&E)" +03000230="重新命名(&M)" +03000231="複製到(&C)..." +03000232="移動到(&M)..." +03000233="刪除(&D)" +03000240="內容(&R)" +03000241="註解(&N)" +03000242="計算驗證值" +03000243="比較檔案" +03000250="建立資料夾" +03000251="建立檔案" +03000260="結束(&X)" +03000270="分割檔案(&S)..." +03000271="合併檔案(&B)..." + +; Edit +03000310="還原(&U)" +03000311="重做(&R)" +03000320="剪下(&T)" +03000321="複製(&C)" +03000322="貼上(&P)" +03000323="刪除(&D)" +03000330="全選(&A)" +03000331="全不選" +03000332="反向選擇(&I)" +03000333="選取..." +03000334="取消選取..." +03000335="依類型選取" +03000336="依類型不選取" + +; View +03000410="大圖示(&G)" +03000411="小圖示(&M)" +03000412="清單(&L)" +03000413="詳細資料(&D)" +03000420="不排序" +03000430="開啟根目錄" +03000431="上移一層" +03000432="資料夾歷程記錄..." +03000440="重新整理(&R)" +03000449="攤開檢視" +03000450="雙窗格(&2)" +03000451="工具列(&T)" +03000460="壓縮檔工具列" +03000461="標準工具列" +03000462="大型按鈕" +03000463="顯示按鈕文字" + +; Tools +03000510="選項(&O)..." +03000511="效能測試(&B)" + +; Help +03000610="內容(&C)..." +03000620="關於 7-Zip(&A)..." + +; Favorites +03000710="將資料夾加入我的最愛為(&A)" +03000720="書籤" + +; Options Dialog + +03010000="選項" + +; Plugins +03010100="外掛程式" +03010101="外掛程式(&P):" +03010110="選項..." + +; Edit +03010200="編輯器" +03010201="編輯器(&E):" +03010202="檔案比較程式(&D):" + +; System +03010300="系統" +03010302="使 7-Zip 與之產生關聯:" +03010310="外掛程式" + +; Settings +03010400="設定" +03010401="顯示 \"..\" 項目" +03010402="顯示實際檔案圖示" +03010410="顯示系統選單" +03010420="整列選取(&F)" +03010421="顯示格線(&G)" +03010422="單擊開啟項目" +03010430="使用替代選擇模式(&A)" +03010440="使用大量記憶體分頁(&L)" + +; Strings + +03020201="複製" +03020202="移動" +03020203="複製到:" +03020204="移動到:" +03020205="正在複製..." +03020206="正在移動..." +03020207="您不能在這類資料夾中移動或複製項目。" +03020208="未支援的操作。" +03020209="選擇目標資料夾。" + +03020210="確認刪除檔案" +03020211="確認刪除資料夾" +03020212="確認刪除多個檔案" +03020213="您確定要刪除 '{0}' 嗎?" +03020214="您確定要刪除資料夾 '{0}' 以及它所有的內容嗎?" +03020215="您確定要刪除這 {0} 個項目嗎? " +03020216="正在刪除..." +03020217="刪除檔案或資料夾時發生錯誤" +03020218="系統不能移動路徑過長的檔案到資源回收筒" + +03020220="正在重新命名..." +03020221="重新命名檔案或資料夾時發生錯誤" +03020222="確認複製檔案" +03020223="您確定要複製檔案至壓縮檔?" + +03020230="建立資料夾" +03020231="資料夾名稱:" +03020232="新增資料夾" +03020233="建立資料夾時發生錯誤" + +03020240="建立檔案" +03020241="檔案名稱:" +03020242="新增檔案" +03020243="建立檔案時發生錯誤" + +03020250="選取" +03020251="取消選取" +03020252="遮罩:" + +03020260="資料夾歷程記錄" + +03020280="檔案 '{0}' 已被修改過。\n您是否要在此壓縮檔內更新檔案?" +03020281="無法更新檔案\n'{0}'" +03020282="無法啟動編輯器。" +03020283="正在開啟..." +03020284="檔案似是病毒(檔案名稱含有很多空格)。" + +03020290="註解" +03020291="註解(&C):" + +030202A0="系統" + +03020300="電腦" +03020301="網路" +03020302="文件" + +03020400="加入" +03020401="解壓縮" +03020402="測試" + +03020420="複製" +03020421="移動" +03020422="刪除" +03020423="資訊" + +03020500="分割檔案" +03020501="分割到(&S):" +03020510="正在分割..." +03020520="確認分割" +03020521="您確定要分割檔案為 {0} 個?" +03020522="分割大小必須小於原始檔案大小" + +03020600="合併檔案" +03020601="合併到(&C):" +03020610="正在合併..." +03020620="僅選取第一個檔案" +03020621="未能確認此檔案為完整檔案分割出來的一部分" +03020622="找不到完整檔案的其他部分" + +03020710="正在計算驗證值..." +03020720="驗證值資訊" +03020721="資料的 CRC 驗證值:" +03020722="資料及名稱的 CRC 驗證值:" + +03020800="正在掃瞄..." + +03020900="內容" + +03020A01="不能完成操作,因資料夾路徑過長。" +03020A02="您必須選擇一個檔案" +03020A03="您必須選擇最少一個檔案" +03020A04="檔案 {0} 已存在" + +; Computer +03031100="全部大小" +03031101="可用空間" +03031102="叢集大小" +03031103="標籤" + +; Network +03031200="本機名稱" +03031201="提供者" + +; Benchmark Dialog + +03080000="效能測試" +03080001="記憶體使用:" +03080002="壓縮" +03080003="解壓縮" +03080004="速度" +03080005="評等" +03080006="整體評等" +03080007="目前" +03080008="結果" +03080009="通過數:" +0308000A="錯誤數:" +0308000B="CPU 使用" +0308000C="評等 / 使用" + +;!@LangEnd@! diff --git a/GUI/help/7zip.hhc b/GUI/help/7zip.hhc new file mode 100644 index 0000000..776487a --- /dev/null +++ b/GUI/help/7zip.hhc @@ -0,0 +1,258 @@ + + + + + + + + + +
    +
  • + + + +
  • + + + + +
      +
    • + + + +
    • + + + +
    • + + + +
    • + + + +
    • + + + +
    • + + + +
    +
  • + + + + +
      +
    • + + + +
    • + + + +
    • + + + +
    • + + + +
    • + + + + +
        +
      • + + + + +
          +
        • + + + +
        • + + + +
        +
      +
    + +
  • + + + + +
      +
    • + + + +
    • + + + +
    • + + + + +
        +
      • + + + +
      • + + + +
      • + + + +
      • + + + +
      • + + + +
      • + + + +
      • + + + +
      • + + + +
      +
    • + + + + +
        +
      • + + + +
      • + + + +
      • + + + +
      • + + + +
      • + + + +
      • + + + +
      • + + + +
      • + + + +
      • + + + +
      • + + + +
      • + + + +
      • + + + +
      • + + + +
      • + + + +
      • + + + +
      • + + + +
      • + + + +
      • + + + +
      • + + + +
      • + + + +
      • + + + +
      • + + + +
      • + + + +
      • + + + +
      • + + + +
      • + + + +
      +
    +
+ diff --git a/GUI/help/7zip.hhk b/GUI/help/7zip.hhk new file mode 100644 index 0000000..536b65a --- /dev/null +++ b/GUI/help/7zip.hhk @@ -0,0 +1,232 @@ + + + + + + +
    +
  • + + + +
  • + + + +
  • + + + +
  • + + + +
  • + + + +
  • + + + +
  • + + + +
  • + + + + +
  • + + + +
  • + + + +
  • + + + +
  • + + + +
  • + + + +
  • + + + +
  • + + + +
  • + + + +
  • + + + +
  • + + + +
  • + + + + +
  • + + + +
  • + + + +
  • + + + +
  • + + + +
  • + + + +
  • + + + +
  • + + + +
  • + + + +
  • + + + + +
  • + + + +
  • + + + +
  • + + + +
  • + + + +
  • + + + +
  • + + + +
  • + + + +
  • + + + +
  • + + + +
  • + + + +
  • + + + +
  • + + + +
  • + + + +
  • + + + +
  • + + + +
  • + + + +
  • + + + +
  • + + + +
  • + + + +
  • + + + +
  • + + + +
  • + + + +
  • + + + +
  • + + + +
  • + + + +
  • + + + +
  • + + + +
+ diff --git a/GUI/help/cmdline/commands/add.htm b/GUI/help/cmdline/commands/add.htm new file mode 100644 index 0000000..7bc5ea2 --- /dev/null +++ b/GUI/help/cmdline/commands/add.htm @@ -0,0 +1,87 @@ + + + + + a (Add) command + + + + + +

a (Add) command

+ +

Adds files to archive.

+ +

Examples

+ +
+7z a archive1.zip subdir\
+
+ +

adds all files and subfolders from folder subdir to archive + archive1.zip. + The filenames in archive will contain subdir\ prefix.

+ +
+7z a archive2.zip .\subdir\*
+
+ +

adds all files and subfolders from folder subdir to archive + archive2.zip. + The filenames in archive will not contain subdir\ prefix.

+ + +
+cd /D c:\dir1\
+7z a c:\archive3.zip dir2\dir3\ 
+
+ +The filenames in archive c:\archive3.zip +will contain dir2\dir3\ prefix, +but they will not contain c:\dir1\ prefix. + +
+7z a Files.7z *.txt -r
+
+ +

adds all *.txt files from current folder and its subfolders to archive + Files.7z.

+ + +

Notes

+ +

7-Zip doesn't uses the system wildcard parser. 7-Zip doesn't +follow the archaic rule by which *.* means any file. 7-Zip treats +*.* as matching the name of any file that has an extension. To process +all files, you must use a * wildcard.

+ + +

Switches that can be used with this command

+ +

+ -i (Include)
+ -m (Method)
+ -p (Set Password)
+ -r (Recurse)
+ -sfx (create SFX)
+ -si (use StdIn)
+ -so (use StdOut)
+ -t (Type of archive)
+ -u (Update)
+ -v (Volumes)
+ -w (Working Dir)
+ -x (Exclude) +

+ +

See also

+ +

+ Commands: + d (Delete), + u (Update)
+ Switches: + -u (Update) +

+ + + diff --git a/GUI/help/cmdline/commands/bench.htm b/GUI/help/cmdline/commands/bench.htm new file mode 100644 index 0000000..14f456c --- /dev/null +++ b/GUI/help/cmdline/commands/bench.htm @@ -0,0 +1,79 @@ + + + + + b (Benchmark) command + + + + + +

b (Benchmark) command

+ +

Measures speed of the CPU and checks RAM for errors.

+ +

Syntax

+ +
+b [number_of_iterations] [-mmt{N}] [-md{N}] [-mm={Method}]
+
+ +

There are two tests:

+

    +
  1. Compressing with LZMA method +
  2. Decompressing with LZMA method +
+ +

The benchmark shows a rating in MIPS (million instructions per second). +The rating value is calculated from the measured CPU speed and it +is normalized with results of Intel Core 2 CPU with multi-threading option +switched off. So if you have Intel Core 2 Duo, +rating values must be close to real CPU frequency.

+ +

You can change the upper dictionary size to increase memory usage by -md{N} switch. +Also, you can change the number of threads by -mmt{N} switch.

+ +

The Dict column shows dictionary size. For example, 21 means 2^21 = 2 MB.

+ +

The Usage column shows the percentage of time the processor is working. +It's normalized for a one-thread load. For example, 180% CPU Usage for 2 threads +can mean that average CPU usage is about 90% for each thread.

+ +

The R / U column shows the rating normalized for 100% of CPU usage. +That column shows the performance of one average CPU thread.

+ +

Avr shows averages for different dictionary sizes.

+

Tot shows averages of the compression and decompression ratings.

+ +

Compression speed and rating strongly depend on memory (RAM) latency. + +

Decompression speed and rating strongly depend on the integer performance of the CPU. +For example, the Intel Pentium 4 has big branch +misprediction penalty (which is an effect of its long pipeline) and pretty slow +multiply and shift operations. So, the Pentium 4 has pretty low decompressing ratings.

+ +

You can run a CRC calculation benchmark by specifying -mm=crc. +That test shows the speed of CRC calculation in MB/s. The first column shows the size of the block. +The next column shows the speed of CRC calculation for one thread. The other columns are results +for multi-threaded CRC calculation.

+ + +

Examples

+ +
+7z b
+
+runs benchmarking. + +
+7z b -mmt1 -md26
+
+runs benchmarking with one thread and 64 MB dictionary. + +
+7z b 30
+
+

runs benchmarking with default settings for 30 iterations.

+ + + diff --git a/GUI/help/cmdline/commands/delete.htm b/GUI/help/cmdline/commands/delete.htm new file mode 100644 index 0000000..845b8d8 --- /dev/null +++ b/GUI/help/cmdline/commands/delete.htm @@ -0,0 +1,59 @@ + + + + + d (Delete) command + + + + + +

d (Delete) command

+ +

Deletes files from archive.

+ +

Example

+ +
+7z d archive.zip *.bak -r
+
+ +

deletes *.bak files from archive + archive.zip.

+ + +

Notes

+ +

7-Zip doesn't uses the system wildcard parser. 7-Zip doesn't +follow the archaic rule by which *.* means any file. 7-Zip treats +*.* as matching the name of any file that has an extension. To process +all files, you must use a * wildcard.

+ + +

Switches that can be used with this command

+ +

+ -i (Include)
+ -m (Method)
+ -p (Set Password)
+ -r (Recurse)
+ -u (Update)
+ -w (Working Dir)
+ -x (Exclude) +

+ +

See also

+ +

+ Commands: + a (Add), + u (Update) +

+ +

+ Switches: + -u (Update) +

+ + + diff --git a/GUI/help/cmdline/commands/extract.htm b/GUI/help/cmdline/commands/extract.htm new file mode 100644 index 0000000..dad6b2b --- /dev/null +++ b/GUI/help/cmdline/commands/extract.htm @@ -0,0 +1,91 @@ + + + + + e (Extract) command + + + + + +

e (Extract) command

+ +

Extracts files from an archive to the current +directory or to the output directory. The output directory can be specified by +-o (Set Output Directory) switch.

+ +

This command copies all extracted files to one directory. +If you want extract files with full paths, you must use +x (Extract with full paths) command. + +

7-Zip will prompt the user before overwriting existing files unless +the user specifies the -y (Assume Yes on all queries) +switch. If the user gives a no answer, 7-Zip will prompt for the file to be +extracted to a new filename. Then a no answer skips that file; or, yes +prompts for new filename.

+ +

7-Zip accepts the following responses:

+ + + + + + + + + +
Answer Abbr. Action
Yes y  
No n  
Always a Assume YES for ALL subsequent queries of the same class
Skip s Assume NO for ALL subsequent queries of the same class
Quit q Quit the program
+ +

Abbreviated responses are allowed.

+ +

Examples

+ +
+7z e archive.zip
+
+ +

extracts all files from archive + archive.zip to the current directory.

+ +
+7z e archive.zip -oc:\soft *.cpp -r
+
+ +

extracts all *.cpp files from archive + archive.zip to c:\soft folder.

+ + +

Notes

+ +

7-Zip doesn't uses the system wildcard parser. 7-Zip doesn't +follow the archaic rule by which *.* means any file. 7-Zip treats +*.* as matching the name of any file that has an extension. To process +all files, you must use a * wildcard.

+ + +

Switches that can be used with this command

+ +

+ -ai (Include archives)
+ -an (Disable parsing of archive_name)
+ -ao (Overwrite mode)
+ -ax (Exclude archives)
+ -i (Include)
+ -o (Set Output Directory)
+ -p (Set Password)
+ -r (Recurse)
+ -so (use StdOut)
+ -t (Type of archive)
+ -x (Exclude)
+ -y (Assume Yes on all queries) +

+ +

See also

+ +

+ Commands: + x (Extract with full paths) +

+ + + diff --git a/GUI/help/cmdline/commands/extract_full.htm b/GUI/help/cmdline/commands/extract_full.htm new file mode 100644 index 0000000..3f857a6 --- /dev/null +++ b/GUI/help/cmdline/commands/extract_full.htm @@ -0,0 +1,68 @@ + + + + + x (Extract with full paths) command + + + + + +

x (Extract with full paths) command

+ +

Extracts files from an archive with their full +paths in the current directory, or in an output directory if specified.

+ +

See the e (Extract) command description for more details.

+ +

Examples

+ +
+7z x archive.zip
+
+ +

extracts all files from the archive + archive.zip to the current directory.

+ +
+7z x archive.zip -oc:\soft *.cpp -r
+
+ +

extracts all *.cpp files from the archive + archive.zip to c:\soft folder.

+ + +

Notes

+ +

7-Zip doesn't uses the system wildcard parser. 7-Zip doesn't +follow the archaic rule by which *.* means any file. 7-Zip treats +*.* as matching the name of any file that has an extension. To process +all files, you must use a * wildcard.

+ + +

Switches that can be used with this command

+ +

+ -ai (Include archives)
+ -an (Disable parsing of archive_name)
+ -ao (Overwrite mode)
+ -ax (Exclude archives)
+ -i (Include)
+ -o (Set Output Directory)
+ -p (Set Password)
+ -r (Recurse)
+ -so (use StdOut)
+ -t (Type of archive)
+ -x (Exclude)
+ -y (Assume Yes on all queries) +

+ +

See also

+ +

+ Commands: + e (Extract) +

+ + + diff --git a/GUI/help/cmdline/commands/index.htm b/GUI/help/cmdline/commands/index.htm new file mode 100644 index 0000000..579ea29 --- /dev/null +++ b/GUI/help/cmdline/commands/index.htm @@ -0,0 +1,33 @@ + + + + + Command Line Commands + + + + + +

Command Line Commands

+ +

The command is the first non-switch argument on the command line.

+

Command names are not case sensitive.

+

See also Command Line Syntax for more details about using the command line.

+ +

Commands quick reference

+ + + + + + + + + + + +
CommandDescription
a Add
b Benchmark
d Delete
e Extract
l List
t Test
u Update
x eXtract with full paths
+ + + + diff --git a/GUI/help/cmdline/commands/list.htm b/GUI/help/cmdline/commands/list.htm new file mode 100644 index 0000000..1eba758 --- /dev/null +++ b/GUI/help/cmdline/commands/list.htm @@ -0,0 +1,77 @@ + + + + + l (List contents of archive) command + + + + + +

l (List contents of archive) command

+ + + + + +

Lists contents of archive.

+ + + + +

Examples

+ +
+7z l archive.zip
+
+ +

lists all files from archive archive.zip.

+ + + + +

Notes

+ +

7-Zip doesn't uses the system wildcard parser. 7-Zip doesn't +follow the archaic rule by which *.* means any file. 7-Zip treats +*.* as matching the name of any file that has an extension. To process +all files, you must use a * wildcard.

+ + +

Switches that can be used with this command

+ +

+ -ai (Include archives)
+ -an (Disable parsing of archive_name)
+ -ax (Exclude archives)
+ -i (Include)
+ -slt (Show technical information)
+ -p (Set Password)
+ -r (Recurse)
+ -t (Type of archive)
+ -x (Exclude) +

+ + + diff --git a/GUI/help/cmdline/commands/style.css b/GUI/help/cmdline/commands/style.css new file mode 100644 index 0000000..13ebb79 --- /dev/null +++ b/GUI/help/cmdline/commands/style.css @@ -0,0 +1,232 @@ +body + { + padding: 0px 0px 0px 26px; + background: #ffffff; + color: #000000; + font-family: Verdana, Arial, Helvetica, sans-serif; + font-size: 80%; + } + +div + { + width: 90%; + border: 2px solid #999999; + padding: 4px 8px; + background: #cccccc; + } + +h1, h2, h3, h4 + { + font-family: Verdana, Arial, Helvetica, sans-serif; + margin-left: -26px; + } + +h1 + { + font-size: 145%; + margin-top: .5em; + margin-bottom: 1em; + } + +h2 + { + font-size: 130%; + margin-top: 1.5em; + margin-bottom: .6em; + } + +h3 + { + font-size: 115%; + margin-top: 1.5em; + margin-bottom: .6em; + } + +h4 + { + font-size: 100%; + margin-top: 1.5em; + margin-bottom: .6em; + } + +ul p, ol p, dl p + { + margin-left: 0em; + } + +p + { + margin-top: .6em; + margin-bottom: .6em; + } + +dl + { + /*margin-top: 0em; */ + } + +dt + { + margin-top: .76em; + margin-bottom: .5em; + font-weight: bold; + } + +dd + { + margin-top: .5em; + margin-bottom: .5em; + margin-left: 1.9em; + } + + +ul, ol + { + margin-top: .6em; + margin-bottom: 0em; + } + +ol + { + margin-left: 3.6em; + } + +ul + { + list-style-type: disc; + margin-left: 1.9em; + } + +li + { + margin-bottom: .6em; + } + +ul ol, ol ol + { + list-style-type: lower-alpha; + { + + /* +pre + { + margin-top: .6em; + margin-bottom: .6em; + } + */ + +pre,code + { + font: 100% Courier New, Courier, mono; + color: #000000; + cursor: text; + } + +pre.syntax + { + background: #dddddd; + padding: 2pt,4pt + } + +pre.syntax + { + color: #000000; + } + +pre.example + { + margin-left: 2.0em; + /*margin-top: 12.0em;*/ + /*margin-bottom: 1.0em;*/ + color: #C00000; + /*padding: 10pt,20pt*/ + } + +table + { + /* width: 90%; */ + background: #999999; + margin-top: .6em; + margin-bottom: .3em; + } + +th + { + padding: 4px 8px; + background: #cccccc; + text-align: left; + font-size: 80%; + vertical-align: bottom; + } + +th.cc + { + text-align: center; + vertical-align: middle; + } + +td + { + padding: 4px 8px; + background: #ffffff; + vertical-align: top; + font-size: 80%; + } + +td.cc + { + text-align: center; + vertical-align: middle; + } + + +blockquote + { + margin-left: 3.8em; + margin-right: 3.8em; + margin-top: .6em; + margin-bottom: .6em; + } + +a:link + { + color: #0066ff; + } + +a:visited + { + color: #996600; + } + +a:hover + { + color: #cc9900; + } + +a.parameter:link + { + color: #0066ff; + text-decoration:none; + } + +a.parameter:visited + { + text-decoration:none; + } + +div.footer + { + width: 100%; + border: none; + background: #ffffff; + margin-top: 18pt; + padding-bottom: 12pt; + color: #228B22; + text-align: center; + font-size: 70%; + } + +span.filename +{ + color: #F00000; +} diff --git a/GUI/help/cmdline/commands/test.htm b/GUI/help/cmdline/commands/test.htm new file mode 100644 index 0000000..b09f8a4 --- /dev/null +++ b/GUI/help/cmdline/commands/test.htm @@ -0,0 +1,46 @@ + + + + + t (Test integrity of archive) command + + + + + +

t (Test integrity of archive) command

+ +

Tests archive files.

+ +

Example

+ +
+7z t archive.zip *.doc -r
+
+ +

tests *.doc files in archive + archive.zip.

+ + +

Notes

+ +

7-Zip doesn't uses the system wildcard parser. 7-Zip doesn't +follow the archaic rule by which *.* means any file. 7-Zip treats +*.* as matching the name of any file that has an extension. To process +all files, you must use a * wildcard.

+ + +

Switches that can be used with this command

+ +

+ -ai (Include archives)
+ -an (Disable parsing of archive_name)
+ -ax (Exclude archives)
+ -i (Include)
+ -p (Set Password)
+ -r (Recurse)
+ -x (Exclude) +

+ + + diff --git a/GUI/help/cmdline/commands/update.htm b/GUI/help/cmdline/commands/update.htm new file mode 100644 index 0000000..8600801 --- /dev/null +++ b/GUI/help/cmdline/commands/update.htm @@ -0,0 +1,66 @@ + + + + + u (Update) command + + + + + +

u (Update) command

+ +

Update older files in the archive and add files that are not already in the archive.

+ +

Note: the updating of solid .7z archives can be slow, since it +can require some recompression.

+ +

Example

+ +
+7z u archive.zip *.doc
+
+ +

updates *.doc files to archive + archive.zip.

+ + +

Notes

+ +

7-Zip doesn't uses the system wildcard parser. 7-Zip doesn't +follow the archaic rule by which *.* means any file. 7-Zip treats +*.* as matching the name of any file that has an extension. To process +all files, you must use a * wildcard.

+ + +

Switches that can be used with this command

+ +

+ -i (Include)
+ -m (Method)
+ -p (Set Password)
+ -r (Recurse)
+ -sfx (create SFX)
+ -si (use StdIn)
+ -so (use StdOut)
+ -t (Type of archive)
+ -u (Update)
+ -w (Working Dir)
+ -x (Exclude) +

+ +

See also

+ +

+ Commands: + a (Add), + d (Delete), +

+ +

+ Switches: + -u (Update) +

+ + + diff --git a/GUI/help/cmdline/exit_codes.htm b/GUI/help/cmdline/exit_codes.htm new file mode 100644 index 0000000..4cdc74a --- /dev/null +++ b/GUI/help/cmdline/exit_codes.htm @@ -0,0 +1,27 @@ + + + + + Exit Codes from 7-Zip + + + + + +

Exit Codes from 7-Zip

+ +

7-Zip returns the following exit codes:

+ + + + + + + + + +
CodeMeaning
0No error
1Warning (Non fatal error(s)). For example, one or more files were + locked by some other application, so they were not compressed.
2Fatal error
7Command line error
8Not enough memory for operation
255User stopped the process
+ + + diff --git a/GUI/help/cmdline/index.htm b/GUI/help/cmdline/index.htm new file mode 100644 index 0000000..5bf8aae --- /dev/null +++ b/GUI/help/cmdline/index.htm @@ -0,0 +1,29 @@ + + + + + Command Line Version User's Guide + + + + + +

Command Line Version User's Guide

+ + +

7z.exe is the command line version of 7-Zip. 7z.exe uses 7z.dll +from the 7-Zip package. 7z.dll is used by the 7-Zip File Manager also. + +

7za.exe (a = alone) is a standalone version of 7-Zip. +7za.exe supports only 7z, lzma, cab, zip, gzip, bzip2, Z and tar formats. +7za.exe doesn't use external modules. + +

+ + + diff --git a/GUI/help/cmdline/style.css b/GUI/help/cmdline/style.css new file mode 100644 index 0000000..13ebb79 --- /dev/null +++ b/GUI/help/cmdline/style.css @@ -0,0 +1,232 @@ +body + { + padding: 0px 0px 0px 26px; + background: #ffffff; + color: #000000; + font-family: Verdana, Arial, Helvetica, sans-serif; + font-size: 80%; + } + +div + { + width: 90%; + border: 2px solid #999999; + padding: 4px 8px; + background: #cccccc; + } + +h1, h2, h3, h4 + { + font-family: Verdana, Arial, Helvetica, sans-serif; + margin-left: -26px; + } + +h1 + { + font-size: 145%; + margin-top: .5em; + margin-bottom: 1em; + } + +h2 + { + font-size: 130%; + margin-top: 1.5em; + margin-bottom: .6em; + } + +h3 + { + font-size: 115%; + margin-top: 1.5em; + margin-bottom: .6em; + } + +h4 + { + font-size: 100%; + margin-top: 1.5em; + margin-bottom: .6em; + } + +ul p, ol p, dl p + { + margin-left: 0em; + } + +p + { + margin-top: .6em; + margin-bottom: .6em; + } + +dl + { + /*margin-top: 0em; */ + } + +dt + { + margin-top: .76em; + margin-bottom: .5em; + font-weight: bold; + } + +dd + { + margin-top: .5em; + margin-bottom: .5em; + margin-left: 1.9em; + } + + +ul, ol + { + margin-top: .6em; + margin-bottom: 0em; + } + +ol + { + margin-left: 3.6em; + } + +ul + { + list-style-type: disc; + margin-left: 1.9em; + } + +li + { + margin-bottom: .6em; + } + +ul ol, ol ol + { + list-style-type: lower-alpha; + { + + /* +pre + { + margin-top: .6em; + margin-bottom: .6em; + } + */ + +pre,code + { + font: 100% Courier New, Courier, mono; + color: #000000; + cursor: text; + } + +pre.syntax + { + background: #dddddd; + padding: 2pt,4pt + } + +pre.syntax + { + color: #000000; + } + +pre.example + { + margin-left: 2.0em; + /*margin-top: 12.0em;*/ + /*margin-bottom: 1.0em;*/ + color: #C00000; + /*padding: 10pt,20pt*/ + } + +table + { + /* width: 90%; */ + background: #999999; + margin-top: .6em; + margin-bottom: .3em; + } + +th + { + padding: 4px 8px; + background: #cccccc; + text-align: left; + font-size: 80%; + vertical-align: bottom; + } + +th.cc + { + text-align: center; + vertical-align: middle; + } + +td + { + padding: 4px 8px; + background: #ffffff; + vertical-align: top; + font-size: 80%; + } + +td.cc + { + text-align: center; + vertical-align: middle; + } + + +blockquote + { + margin-left: 3.8em; + margin-right: 3.8em; + margin-top: .6em; + margin-bottom: .6em; + } + +a:link + { + color: #0066ff; + } + +a:visited + { + color: #996600; + } + +a:hover + { + color: #cc9900; + } + +a.parameter:link + { + color: #0066ff; + text-decoration:none; + } + +a.parameter:visited + { + text-decoration:none; + } + +div.footer + { + width: 100%; + border: none; + background: #ffffff; + margin-top: 18pt; + padding-bottom: 12pt; + color: #228B22; + text-align: center; + font-size: 70%; + } + +span.filename +{ + color: #F00000; +} diff --git a/GUI/help/cmdline/switches/ar_exclude.htm b/GUI/help/cmdline/switches/ar_exclude.htm new file mode 100644 index 0000000..6978918 --- /dev/null +++ b/GUI/help/cmdline/switches/ar_exclude.htm @@ -0,0 +1,56 @@ + + + + + -ax (Exclude archive filenames) switch + + + + + +

-ax (Exclude archive filenames) switch

+ +

Specifies archives to be excluded from the operation.

+

Multiple exclude archive switches are supported.

+ +

Syntax

+ +
+-ax[<recurse_type>]<file_ref>
+
+<recurse_type> ::= r[- | 0]
+<file_ref> ::= @{listfile} | !{wildcard}
+
+ +

See -xi (Include archive filenames) switch description +for information about option parameters.

+ + +

Examples

+ +
+7z t -an -ai!*.7z -ax!a*.7z
+
+ +

tests all *.7z archives, + except a*.7z archives.

+ +

Commands that can be used with this switch

+ +

+ e (Extract), + l (List), + t (Test), + x (Extract with full paths) +

+ +

See also

+ +

+ Switches: + -ai (Include archives) + -an (Disable parsing of archive_name) +

+ + + diff --git a/GUI/help/cmdline/switches/ar_include.htm b/GUI/help/cmdline/switches/ar_include.htm new file mode 100644 index 0000000..30a5a9b --- /dev/null +++ b/GUI/help/cmdline/switches/ar_include.htm @@ -0,0 +1,83 @@ + + + + + -ai (Include archive filenames) switch + + + + + +

-ai (Include archive filenames) switch

+ +

Specifies additional include archive filenames and wildcards.

+

Multiple include switches are supported.

+ +

Syntax

+ +
+-ai[<recurse_type>]<file_ref>
+
+<recurse_type> ::= r[- | 0]
+<file_ref> ::= @{listfile} | !{wildcard}
+
+ +

Parameters

+ +
+
<recurse_type>
+

Specifies how wildcards and file names in this switch must + be used. If this option is not given, recursion will be not used. + For more details see specification of the + -r (Recurse) switch.

+
+<recurse_type> ::= r[- | 0]
+
+ +
+
<file_ref>
+
+

Specifies filenames and wildcards or list file that specify processed files.

+
+<file_ref> ::= @{listfile} | !{wildcard}
+
+ + + + +
Option Description
{listfile} Specifies name of list file. See + List file description.
{wildcard} Specifies wildcard or filename.
+
+
+ +

Examples

+ +
+7z t -an -air!*.7z
+
+ +

tests *.7z archives in current directory and all it's +subdirectories.

+ +

Commands that can be used with this switch

+ +

+ a (Add), + d (Delete), + e (Extract), + l (List), + t (Test), + u (Update), + x (Extract with full paths) +

+ +

See also

+ +

+ Switches: + -ax (Exclude archives) + -an (Disable parsing of archive_name) +

+ + + diff --git a/GUI/help/cmdline/switches/ar_no.htm b/GUI/help/cmdline/switches/ar_no.htm new file mode 100644 index 0000000..d925f13 --- /dev/null +++ b/GUI/help/cmdline/switches/ar_no.htm @@ -0,0 +1,52 @@ + + + + + -an (Disable parsing of archive_name) switch + + + + + +

-an (Disable parsing of archive_name) switch

+ +

Disables parsing of the archive_name field on the command line. +This switch must be used with the +-ai (Include archives) switch. +If you use a file list for your archives, you specify it with the -ai switch, +so you need to disable parsing of archive_name field from command line. + +

Syntax

+ +
+-an
+
+ +

Examples

+ +
+7z t -an -ai!*.7z -ax!a*.7z
+
+ +

tests all *.7z archives, + except a*.7z archives.

+ +

Commands that can be used with this switch

+ +

+ e (Extract), + l (List), + t (Test), + x (Extract with full paths) +

+ +

See also

+ +

+ Switches: + -ai (Include archives) + -ax (Exclude archives) +

+ + + diff --git a/GUI/help/cmdline/switches/charset.htm b/GUI/help/cmdline/switches/charset.htm new file mode 100644 index 0000000..e308026 --- /dev/null +++ b/GUI/help/cmdline/switches/charset.htm @@ -0,0 +1,49 @@ + + + + + -scs (Set charset for list files) switch + + + + + +

-scs (Set charset for list files) switch

+ +

Sets charset for list files.

+ +

Syntax

+ +
+-scs{UTF-8 | WIN | DOS}
+
+ +

Default charset is UTF-8.

+ +
+
UTF-8
+
Unicode UTF-8 character set.
+
WIN
+
Default character set of Windows.
+
DOS
+
Default DOS (OEM) character set of Windows.
+
+ +

Example

+ +
+7z a archive.7z @listfile.txt -scsWIN
+
+ +

compresses files from listfile.txt list, that contains +list of files in default character set of Windows.

+ +

Commands that can be used with this switch

+ +

+ a (Add), + u (Update) +

+ + + diff --git a/GUI/help/cmdline/switches/exclude.htm b/GUI/help/cmdline/switches/exclude.htm new file mode 100644 index 0000000..faf8768 --- /dev/null +++ b/GUI/help/cmdline/switches/exclude.htm @@ -0,0 +1,60 @@ + + + + + -x (Exclude filenames) switch + + + + + +

-x (Exclude filenames) switch

+ +

Specifies which filenames or wildcarded names must be excluded from the operation.

+

Multiple exclude switches are supported.

+ +

Syntax

+ +
+-x[<recurse_type>]<file_ref>
+
+<recurse_type> ::= r[- | 0]
+<file_ref> ::= @{listfile} | !{wildcard}
+
+ +

See -i (Include) switch description for information about + option parameters.

+ + +

Examples

+ +
+7z a -tzip archive.zip *.txt -x!temp.*
+
+ +

adds to the archive archive.zip all + *.txt files, + except temp.* files.

+ +

Commands that can be used with this switch

+ +

+ a (Add), + d (Delete), + e (Extract), + l (List), + t (Test), + u (Update), + x (Extract with full paths) +

+ +

See also

+ +

+ Switches: + -r (Recurse), + -i (Include) +

+ + + diff --git a/GUI/help/cmdline/switches/include.htm b/GUI/help/cmdline/switches/include.htm new file mode 100644 index 0000000..009f5ef --- /dev/null +++ b/GUI/help/cmdline/switches/include.htm @@ -0,0 +1,87 @@ + + + + + -i (Include filenames) switch + + + + + +

-i (Include filenames) switch

+ +

Specifies additional include filenames and wildcards.

+

Multiple include switches are supported.

+ +

Syntax

+ +
+-i[<recurse_type>]<file_ref>
+
+<recurse_type> ::= r[- | 0]
+<file_ref> ::= @{listfile} | !{wildcard}
+
+ +

Parameters

+ +
+
<recurse_type>
+

Specifies how wildcards and file names in this switch must + be used. If this option is not given, then the global value, assigned + by the -r (Recurse) switch will be used. For + more details see specification of the + -r (Recurse) switch.

+
+<recurse_type> ::= r[- | 0]
+
+ +
+
<file_ref>
+
+

Specifies filenames and wildcards, or a list file, for files to be processed.

+
+<file_ref> ::= @{listfile} | !{wildcard}
+
+ + + + +
Option Description
{listfile} Specifies name of list file. See + List file description.
{wildcard} Specifies wildcard or filename.
+
+
+ +

Examples

+ +
+7z a -tzip src.zip *.txt -ir!DIR1\*.cpp
+
+ +

adds to src.zip archive all + *.txt files from current directory + and all *.cpp + files from directory DIR1 + and from all it's subdirectories.

+ +

Commands that can be used with this switch

+ +

+ a (Add), + d (Delete), + e (Extract), + l (List), + t (Test), + u (Update), + x (Extract with full paths) +

+ +

See also

+ +

+ Switches: + -r (Recurse), + -x (Exclude) +

+ + + diff --git a/GUI/help/cmdline/switches/index.htm b/GUI/help/cmdline/switches/index.htm new file mode 100644 index 0000000..65e335d --- /dev/null +++ b/GUI/help/cmdline/switches/index.htm @@ -0,0 +1,64 @@ + + + + + Command Line Switches + + + + + +

Command Line Switches

+ +

Syntax

+ +
+<switch>::= <switch_symbol><switch_characters>[<option>]
+<switch_symbol> ::= '/' | '-' 
+
+
+

On the command line, a switch consists of a switch specifier, +either a dash (-) or a forward slash (/), followed by the name of +the switch. Switch names cannot be abbreviated.

+ +

Some switches take an argument after the switch name. +No spaces or tabs are allowed within a switch specification. +Switch names are not case sensitive, but arguments can be case sensitive. +

+ +

Switch can be used in any place in command line. + +

See also Command Line Syntax for more details + about using the command line.

+ +

Switch quick reference

+ + + + + + + + + + + + + + + + + + + + + + + + + + +
SwitchDescription
-- Stop switches parsing
-ai Include archive filenames
-an Disable parsing of archive_name
-ao Overwrite mode
-ax Exclude archive filenames
-i Include filenames
-m Set Compression Method
-o Set Output directory
-p Set Password
-r Recurse subdirectories
-scs Set charset for list files
-slp Set Large Pages mode
-slt Show technical information
-sfx Create SFX archive
-si Read data from StdIn
-so Write data to StdOut
-ssc Set Sensitive Case mode
-t Type of archive
-u Update options
-v Create Volumes
-w Set Working directory
-x Exclude filenames
-y Assume Yes on all queries
+ + + diff --git a/GUI/help/cmdline/switches/large_pages.htm b/GUI/help/cmdline/switches/large_pages.htm new file mode 100644 index 0000000..82fd5b7 --- /dev/null +++ b/GUI/help/cmdline/switches/large_pages.htm @@ -0,0 +1,50 @@ + + + + + -slp (Set Large Pages mode) switch + + + + + +

-slp (Set Large Pages mode) switch

+ +

Sets Large Pages mode.

+ +

Syntax

+ +
+-slp[-]
+
+ + + + + + +
Switch Description
-slp Enables Large Pages mode.
-slp- Disables Large Pages mode. This option is default for all commands.
+ +

Large Pages mode increases the speed of compression. +However, there is a pause at the start of compression while 7-Zip allocates the large pages in memory. +If 7-Zip can't allocate large pages, it allocates usual small pages. +Also, the Windows Task Manager doesn't show the real memory usage of the program, if 7-Zip uses large pages. +This feature works only on Windows 2003 / XP x64. +Also, it requires administrator's rights for your system. +The recommended size of RAM for this feature is 1 GB or more. +To install this feature, you must run the 7-Zip File Manager at least once, +close it, and then reboot the system.

+

Your system can hang for several seconds at compressing starting, if you use -slp mode. +So it's not recommended to use -slp mode to compress small data sets (less than 100 MB).

+ + +

Example

+ +
+7z a archive.7z -slp a.iso
+
+ +

compresses a.iso file with Large Pages mode switched on.

+ + + diff --git a/GUI/help/cmdline/switches/list_tech.htm b/GUI/help/cmdline/switches/list_tech.htm new file mode 100644 index 0000000..aa8e522 --- /dev/null +++ b/GUI/help/cmdline/switches/list_tech.htm @@ -0,0 +1,36 @@ + + + + + -slt (Show technical information) switch + + + + + +

-slt (Show technical information) switch

+ +

Sets technical mode for l (List) command.

+ +

Syntax

+ +
+-slt
+
+ +

Example

+ +
+7z l -slt archive.7z
+
+ +

shows detailed technical information for the files in archive.7z.

+ +

Commands that can be used with this switch

+ +

+ l (List) +

+ + + diff --git a/GUI/help/cmdline/switches/method.htm b/GUI/help/cmdline/switches/method.htm new file mode 100644 index 0000000..448dbdf --- /dev/null +++ b/GUI/help/cmdline/switches/method.htm @@ -0,0 +1,625 @@ + + + + + -m (Set compression Method) switch + + + + + +

-m (Set compression Method) switch

+ +

Specifies the compression method.

+ +

Syntax

+ +
+-m<method_parameters>
+
+
+ +

The format for this switch depends on the archive type.

+ + + +

Zip

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterDefaultDescription
x=[0 | 1 | 3 | 5 | 7 | 9 ]5Sets level of compression.
m={MethodID}DeflateSets a method: Copy, Deflate, Deflate64, BZip2, LZMA, PPMd.
fb={NumFastBytes}32Sets number of Fast Bytes for Deflate encoder.
pass={NumPasses}1Sets number of Passes for Deflate encoder.
d={Size}[b|k|m]900000Sets Dictionary size for BZip2
mem={Size}[b|k|m]24 Sets size of used memory for PPMd.
o={Size}8 Sets model order for PPMd.
mt=[off | on | {N}]onSets multithreading mode.
em={EncryptionMethodID}ZipCryptoSets a encryption method: ZipCrypto, AES128, AES192, AES256
tc=[off | on]off Stores NTFS timestamps for files: Modification time, Creation time, Last access time.
cl=[off | on]off 7-Zip always uses local code page for file names.
cu=[off | on]off 7-Zip uses UTF-8 for file names that contain non-ASCII symbols.
+ +

By default (if cl and cu switches are not specified), 7-Zip uses UTF-8 encoding +only for file names that contain symbols unsupported by local code page.

+ +
+
x=[0 | 1 | 3 | 5 | 7 | 9 ]
+
+

Sets level of compression. x=0 means Copy mode (no compression).

+

Deflate / Deflate64 settings:

+ + + + + + + +
Level NumFastBytes NumPasses Description
1 32 1 Fastest
3 Fast
5 Normal
7 64 3 Maximum
9 128 10 Ultra
+ +

x=1 and x=3 with Deflate method set fast mode for compression.

+ +

BZip2 settings:

+ + + + + + + +
Level Dictionary NumPasses Description
1 100000 1 Fastest
3 500000 Fast
5 900000 Normal
7 2 Maximum
9 7 Ultra
+
+ +
fb={NumFastBytes}
+
+

Sets the number of fast bytes for the Deflate/Deflate64 encoder. + It can be in the range from 3 to 258 (257 for Deflate64). + Usually, a big number gives a little bit better + compression ratio and a slower compression process. + A large fast bytes parameter can significantly increase the compression ratio + for files which contain long identical sequences of bytes.

+
+
pass={NumPasses}
+
+

Sets number of passes for Deflate encoder. It can be in the range from 1 to 15 for Deflate and + from 1 to 10 for BZip2. Usually, a big number gives a little bit better + compression ratio and a slower compression process. +

+
+
d={Size}[b|k|m]
+
+

Sets the Dictionary size for BZip2. You must specify the size in bytes, kilobytes, or megabytes. + The maximum value for the Dictionary size is 900000b. If you do not specify any symbol + from set [b|k|m], dictionary size will be calculated as DictionarySize = 2^Size bytes.

+
+ +
mem={Size}[b|k|m]
+
+

Sets the size of memory used for PPMd. You must specify the size in bytes, kilobytes, or megabytes. + The maximum value is 256 MB = 2^28 bytes. The default value + is 24 (16MB). If you do not specify any symbol from the set [b|k|m], the + memory size will be calculated as (2^Size) bytes. PPMd uses the same + amount of memory for compression and decompression.

+
+ +
o={Size}
+
+

Sets the model order for PPMd. The size must be in the range [2,16]. The default value is 8.

+
+ +
mt=[off | on | {N}]
+
+

Sets multithread mode. If you have a multiprocessor or multicore system, + you can get a speed increase with + this switch. This option affects only compression (with any method) and + decompression of BZip2 streams. + Each thread in the multithread mode uses 32 MB of RAM for buffering. + If you specify {N}, 7-Zip tries to use N threads.

+
+
+ +

GZip

+GZip uses the same parameters as Zip, but GZip compresses only with Deflate method. +So GZip supports only the following parameters: x, fb, pass. + +

BZip2

+ + + + + + + + + + + + + + + + + + + + + +
ParameterDefaultDescription
x=[1 | 3 | 5 | 7 | 9 ]5Sets level of compression.
pass={NumPasses}1Sets number of Passes for Bzip2 encoder.
d={Size}[b|k|m]900000Sets Dictionary size for BZip2
mt=[off | on | {N}]onSets multithreading mode.
+ +
+
x=[1 | 3 | 5 | 7 | 9 ]
+
+

Sets level of compression

+ + + + + + + +
Level Dictionary NumPasses Description
1 100000 1 Fastest
3 500000 Fast
5 900000 Normal
7 2 Maximum
9 7 Ultra
+
+ +
d={Size}[b|k|m]
+
+

Sets the Dictionary size for BZip2. You must specify the size in bytes, kilobytes, or megabytes. + The maximum value for the Dictionary size is 900000b. If you do not specify any symbol + from set [b|k|m], dictionary size will be calculated as DictionarySize = 2^Size bytes.

+
+ +
pass={NumPasses}
+
+

Sets the number of passes. It can be in the range from 1 to 10. + The default value is 1 for normal mode, 2 for maximum mode and 7 for ultra mode. + A bigger number can give a little bit better compression ratio and a slower compression process. +

+
+
mt=[off | on | {N}]
+
+

Sets multithread mode. If you have a multiprocessor or multicore system, + you can get a speed increase with + this switch. If you specify {N}, for example mt=4, 7-Zip tries to use 4 threads.

+
+
+ +

7z

+ + + + + + + + + + + + + + + + + + + + +
Parameter Default Description
x=[0 | 1 | 3 | 5 | 7 | 9 ]5Sets level of compression.
s=[off | on | [e] [{N}f] [{N}b | {N}k | {N}m | {N}g]on Sets solid mode.
f=[off | on]on Enables or disables compression filters for executable files.
hc=[off | on]on Enables or disables archive header compressing.
he=[off | on]off Enables or disables archive header encryption.
b{C1}[s{S1}]:{C2}[s{S2}] Sets binding beetwen coders.
{N}={MethodID}[:param1][:param2][..]LZMA Sets a method: LZMA, LZMA2, PPMd, BZip2, Deflate, Delta, BCJ, BCJ2, Copy.
mt=[off | on | {N}]on Sets multithreading mode.
tc=[off | on]off Stores file creation timestamps.
+ +
+
x=[0 | 1 | 3 | 5 | 7 | 9 ]
+
+

Sets level of compression

+ + + + + + + + +
Level Method Dictionary FastBytes MatchFinder Filter Description
0 Copy No compression.
1 LZMA 64 KB 32 HC4 BCJ Fastest compressing
3 LZMA 1 MB 32 HC4 BCJ Fast compressing
5 LZMA 16 MB 32 BT4 BCJ Normal compressing
7 LZMA 32 MB 64 BT4 BCJ Maximum compressing
9 LZMA 64 MB 64 BT4 BCJ2Ultra compressing
+

Note: "x" works as "x=9".

+
+ +
s=[off | on | [e] [{N}f] [{N}b | {N}k | {N}m | {N}g)]
+
+

Enables or disables solid mode. The default mode is s=on. + In solid mode, files are grouped together. Usually, compressing in + solid mode improves the compression ratio.

+ + + + + +
e Use a separate solid block for each new file extension
{N}f Set the limit for number of files in one solid block
{N}b | {N}k | {N}m | {N}g Set a limit for the total size of a solid block in bytes
+ +

These are the default limits for the solid block size:

+ + + + + + + + + +
Compression Level Solid block size
Store 0 B
Fastest 16 MB
Fast 128 MB
Normal 2 GB
Maximum 4 GB
Ultra 4 GB
+ + +

Limitation of the solid block size usually decreases compression ratio but gives the following advantages:

+
    +
  • Decreases losses in case of future archive damage. +
  • Decreases extraction time of a group of files (or just one + file), so long as the group doesn't contain the entire archive.
  • +
+

The updating of solid .7z archives can be slow, since it + can require some recompression.

+ +

Example:

+
+        s=100f10m
+      
+

set solid mode with 100 files & 10 MB limits per one solid block.

+ +
f=[off | on]
+
+

Enables or disables compression filters for executable files: + dll, exe, ocx, sfx, sys. It uses BCJ2 filter in Ultra mode and BCJ + filter in other modes. The default mode is f=on. +

+
hc=[off | on]
+
+

Enables or disables archive header compressing. The default mode is hc=on. + If archive header compressing is enabled, some parts of archive header will + be compressed with LZMA method. +

+
he=[off | on]
+
+

Enables or disables archive header encryption. The default mode is he=off. +

+
{N}
+
+

Sets order of methods. It is used also to associate parameters with + methods. Numbers must begin from 0. Methods that have smaller numbers will be used + before others.

+
+ +
b{C1}[s{S1}]:{C2}[s{S2}]
+
+

Binds output stream S1 in coder C1 with input stream S2 in coder C2. + If stream number is not specified, stream with number 0 will be used. +

+

Usally coder has one input stream and + one output stream. In 7z some coders can have multiple input and output streams.

+ +

For example, BCJ2 encoder has one + input stream and four output streams.

+
+ +
mt=[off | on | {N}]
+
+

Sets multithread mode. If you have a multiprocessor or multicore system, + you can get a increase with this switch. + 7-Zip supports multithread mode only for LZMA / LZMA2 compression and + BZip2 compression / decompression. If you specify {N}, for example mt=4, + 7-Zip tries to use 4 threads. LZMA compression uses only 2 threads. +

+
+ +
{N}={MethodID}[:param1][:param2] ... [:paramN]
+
+

Sets compression method. You can use any number of methods. + The default method is LZMA.

+

Parameters must be in one of the following forms:

+
    +
  • {ParamName}={ParamValue}. +
  • {ParamName}{ParamValue}, if {ParamValue} + is number and {ParamName} doesn't contain numbers. +
+ +

Supported methods:

+ + + + + + + + +
MethodID Description
LZMA LZ-based algorithm
LZMA2 LZMA-based algorithm
PPMd Dmitry Shkarin's PPMdH with small changes
BZip2 BWT algorithm
Deflate LZ+Huffman
Copy No compression
+ +

Supported filters:

+ + + + + + + + + + +
MethodID Description
Delta Delta filter
BCJ converter for x86 executables
BCJ2 converter for x86 executables (version 2)
ARM converter for ARM (little endian) executables
ARMT converter for ARM Thumb (little endian) executables
IA64 converter for IA-64 executables
PPC converter for PowerPC (big endian) executables
SPARC converter for SPARC executables
+

Filters increase the compression ratio for some types of files. Filters + must be used with one of the compression method (for example, BCJ + LZMA).

+
+ +

LZMA

+

LZMA is an algorithm based on Lempel-Ziv algorithm. + It provides very fast decompression (about 10-20 times faster than compression). + Memory requirements for compression and decompression also are different (see + d={Size}[b|k|m] switch for details).

+ + + + + + + + + + + + + + + + + + + + +
Parameter Default Description
a=[0|1]1 Sets compressing mode
d={Size}[b|k|m]24 Sets Dictionary size
mf={MF_ID}bt4 Sets Match Finder
fb={N}32 Sets number of Fast Bytes
mc={N}32Sets Number of Cycles for Match Finder
lc={N}3 Sets number of Literal Context bits - [0, 8]
lp={N}0 Sets number of Literal Pos bits - [0, 4]
pb={N}2 Set number of Pos Bits - [0, 4]
+ + +
+
a=[0|1]
+
+

Sets compression mode: 0 = fast, 1 = normal. + Default value is 1.

+
+
d={Size}[b|k|m]
+
+

Sets Dictionary size for LZMA. You must specify the size in bytes, kilobytes, or megabytes. + The maximum value for dictionary size is 1 GB = 2^30 bytes. Default values for LZMA + are 24 (16 MB) in normal mode, 25 (32 MB) in maximum mode (-mx=7) + and 26 (64 MB) in ultra mode (-mx=9). + If you do not specify any symbol from the set [b|k|m], the + dictionary size will be calculated as DictionarySize = 2^Size bytes. + For decompressing a file compressed by LZMA method with dictionary size N, you need + about N bytes of memory (RAM) available. +

+
+
mf={MF_ID}
+
+

Sets Match Finder for LZMA. Default method is bt4. + Algorithms from hc* group don't provide a good compression ratio, + but they often work pretty fast in combination with fast mode (a=0). + Memory requirements depend on dictionary size (parameter "d" in table below). +

+ + + + + + + + +
MF_ID Dictionary Memory Usage Description
bt2 9.5 * d + 4 MB Binary Tree 2 bytes hashing
bt3 11.5 * d 3 bytes hashing
bt4 64 KB ... 48 MB 11.5 * d 4 bytes hashing
64 MB ... 1024 MB 10.5 * d
hc4 64 KB ... 48 MB 7.5 * d Hash Chain
64 MB ... 1024 MB 6.5 * d
+

Note: Your operation system also needs some amount of physical memory for internal purposes. + So keep at least 32MB of physical memory unused.

+
+ +
fb={N}
+
+

Sets number of fast bytes for LZMA. It can be in the range from 5 to 273. + The default value is 32 for normal mode and 64 for maximum and ultra modes. + Usually, a big number gives a little bit better + compression ratio and slower compression process. +

+
+
mc={N}
+
+

Sets number of cycles (passes) for match finder. It can be in range from 0 to 1000000000. + Default value is (16 + number_of_fast_bytes / 2) for BT* match finders and + (8 + number_of_fast_bytes / 4) for HC4 match finder. + If you specify mc=0, LZMA will use default value. + Usually, a big number gives a little bit better compression ratio and slower + compression process. For example, mf=HC4 and mc=10000 can provide almost the same + compression ratio as mf=BT4.

+
+
lc={N}
+
+

Sets the number of literal context bits (high bits of previous literal). + It can be in range from 0 to 8. + Default value is 3. Sometimes lc=4 gives gain for big files.

+
+
lp={N}
+
+

Sets the number of literal pos bits (low bits of current position for literals). + It can be in the range from 0 to 4. + The default value is 0. The lp switch is intended for periodical data when the + period is equal to 2^value (where lp=value). For example, for 32-bit (4 bytes) + periodical data you can use lp=2. Often it's better to set lc=0, + if you change lp switch.

+
+
pb={N}
+
+

Sets the number of pos bits (low bits of current position). + It can be in the range from 0 to 4. + The default value is 2. The pb switch is intended for periodical data when the + period is equal 2^value (where lp=value).

+
+ +
+ +

LZMA2

+

LZMA2 is modified version of LZMA. it provides the following advantages over LZMA:

+
    +
  • Better compression ratio for data than can't be compressed. LZMA2 can store such + blocks of data in uncompressed form. Also it decompresses such data faster. +
  • Better multithreading support. If you compress big file, LZMA2 can split + that file to chunks and compress these chunks in multiple threads. +
+ + + + + + +
Parameter Default Description
c={Size}[b|k|m]dictSize * 4 Sets Chunk size
+ +

If you don't specify ChunkSize, LZMA2 sets it to DictionarySize * 4.

+ +

LZMA2 also supports all LZMA parameters, but lp+lc cannot be larger than 4.

+ +

LZMA2 uses: 1 thread for each chunk in x1 and x3 modes; and + 2 threads for each chunk in x5, x7 and x9 modes. + If LZMA2 is set to use only such number of threads required for one chunk, + it doesn't split stream to chunks. So you can get different compression + ratio for different number of threads. You can get the best compression + ratio, when you use 1 or 2 threads.

+ +

PPMd

+

PPMd is a PPM-based algorithm. This algorithm is mostly based + on Dmitry Shkarin's PPMdH source code. PPMd provides very good compression ratio for + plain text files. There is no difference between compression speed and + decompression speed. Memory requirements for compression and decompression + also are the same.

+ + + + + + +
Parameter Default Description
mem={Size}[b|k|m]24 Sets size of used memory for PPMd.
o={Size}6 Sets model order for PPMd.
+
+
mem={Size}[b|k|m]
+
+

Sets the size of memory used for PPMd. You must specify the size in bytes, kilobytes, or megabytes. + The maximum value is 2GB = 2^31 bytes. The default value + is 24 (16MB). If you do not specify any symbol from the set [b|k|m], the + memory size will be calculated as (2^Size) bytes. PPMd uses the same + amount of memory for compression and decompression.

+
+ +
o={Size}
+
+

Sets the model order for PPMd. The size must be in the range [2,32]. The default value is 6.

+
+
+ +

BCJ2

+

BCJ2 is a Branch converter for 32-bit x86 executables (version 2). + It converts some branch instructions for increasing further compression.

+

A BCJ2 encoder has one input stream and four output streams:

+
    +
  • s0: main stream. It requires further compression.
  • +
  • s1: stream for converted CALL values. It requires further compression.
  • +
  • s2: stream for converted JUMP values. It requires further compression.
  • +
  • s3: service stream. It is already compressed.
  • +
+

If LZMA is used, the size of the dictionary for streams + s1 and s2 can be much smaller (512 KB is enough for most cases) + than the dictionary size for stream s0.

+ +

Delta

+

It's possible to set delta offset in bytes. For example, to compress 16-bit stereo + WAV files, you can set "0=Delta:4". Default delta offset is 1.

+
+ +

XZ

+XZ supports only LZMA2 codec now. The switches are similar to switches for 7z format. + +

Examples

+ +
+7z a -tzip archive.zip *.jpg -mx0
+
+ +

adds *.jpg files to + archive.zip archive without compression.

+ +
+7z a -t7z archive.7z *.exe *.dll -m0=BCJ -m1=LZMA:d=21 -ms -mmt
+
+ +

adds *.exe and *.dll +files to solid archive archive.7z using LZMA method with +2 MB dictionary and BCJ converter. Compression will use multithreading optimization.

+ +
+7z a -t7z archive.7z *.exe *.dll -m0=BCJ2 -m1=LZMA:d23 -m2=LZMA:d19 -m3=LZMA:d19 
+     -mb0:1 -mb0s1:2 -mb0s2:3
+
+ +

adds *.exe and *.dll + files to archive archive.7z using BCJ2 converter, + LZMA with 8 MB dictionary for main output stream (s0), + and LZMA with 512 KB dictionary for s1 and s2 output streams of BCJ2.

+ + +
+7z a -t7z archive.7z *.txt -m0=PPMd
+
+ +

adds *.txt files to archive +archive.7z using PPMd method.

+ + + + +

Commands that can be used with this switch

+ +

+ a (Add), + d (Delete), + u (Update), +

+ +

See also

+ +

+ Switches: + -t (set Type of archive), +

+ + + diff --git a/GUI/help/cmdline/switches/output_dir.htm b/GUI/help/cmdline/switches/output_dir.htm new file mode 100644 index 0000000..b452349 --- /dev/null +++ b/GUI/help/cmdline/switches/output_dir.htm @@ -0,0 +1,53 @@ + + + + + -o (set Output directory) switch + + + + + +

-o (set Output directory) switch

+ +

Specifies a destination directory where files are to be extracted.

+

This switch can be used only with extraction commands.

+ +

Syntax

+ +
+-o{dir_path}
+
+ +
+
{dir_path}
+
This is the destination directory path. It's not required to end with a backslash. + If you specify * in {dir_path}, 7-Zip substitutes that * character to archive name.
+
+ + +

Example

+ +
+7z x archive.zip -oc:\Doc
+
+ +

extracts all files from the archive.zip archive +to the c:\Doc directory.

+ +
+7z x *.zip -o*
+
+ +

extracts all *.zip archives to subfolders +with names of these archives.

+ +

Commands that can be used with this switch

+ +

+ e (Extract), + x (Extract with full paths) +

+ + + diff --git a/GUI/help/cmdline/switches/overwrite.htm b/GUI/help/cmdline/switches/overwrite.htm new file mode 100644 index 0000000..c71ae40 --- /dev/null +++ b/GUI/help/cmdline/switches/overwrite.htm @@ -0,0 +1,56 @@ + + + + + -ao (Overwrite mode) switch + + + + + +

-ao (Overwrite mode) switch

+ +

Specifies the overwrite mode during extraction, to overwrite files already present on disk.

+ +

Syntax

+ +
+-ao[a | s | t | u ]
+
+ + + + + + + + +
Switch Description
-aoa Overwrite All existing files without prompt.
-aos Skip extracting of existing files.
-aou aUto rename extracting file (for example, name.txt will + be renamed to name_1.txt).
-aot auto rename existing file (for example, name.txt will + be renamed to name_1.txt).
+ +

Examples

+ +
+7z x test.zip -aoa
+
+ +

extracts all files from test.zip archive and overwrites +existing files without any prompt.

+ +

Commands that can be used with this switch

+ +

+ e (Extract), + x (Extract with full paths) +

+ +

See also

+ +

+ Switches: + -y (assume Yes on all queries), +

+ + + diff --git a/GUI/help/cmdline/switches/password.htm b/GUI/help/cmdline/switches/password.htm new file mode 100644 index 0000000..733dfc4 --- /dev/null +++ b/GUI/help/cmdline/switches/password.htm @@ -0,0 +1,54 @@ + + + + + -p (set Password) switch + + + + + +

-p (set Password) switch

+ +

Specifies password.

+ +

Syntax

+ +
+-p{password}
+
+ +
+
{password}
+
Specifies password.
+
+ + +

Examples

+ +
+7z a archive.7z -psecret -mhe *.txt
+
+

compresses *.txt files to archive.7z using password +"secret". Also it encrypts archive headers (-mhe switch), so filenames will be encrypted. +

+ +
+7z x archive.zip -psecret
+
+

extracts all files from archive.zip using password +"secret".

+ +

Commands that can be used with this switch

+ +

+ a (Add), + d (Delete), + e (Extract), + t (Test), + u (Update), + x (Extract with full paths) +

+ + + diff --git a/GUI/help/cmdline/switches/recurse.htm b/GUI/help/cmdline/switches/recurse.htm new file mode 100644 index 0000000..08dba2a --- /dev/null +++ b/GUI/help/cmdline/switches/recurse.htm @@ -0,0 +1,83 @@ + + + + + -r (Recurse subdirectories) switch + + + + + +

-r (Recurse subdirectories) switch

+ +

Specifies the method of treating wildcards and filenames on the command line.

+ +

Syntax

+ +
+-r[- | 0]
+
+ + + + + + + +
Switch Description
-r Enable recurse subdirectories.
-r- Disable recurse subdirectories. This option is default for all commands.
-r0 Enable recurse subdirectories only for wildcard names.
+ +

Examples

+ +
+7z l archive.zip *.doc -r-
+
+ +

lists all *.doc files + that belong to the archived root directory + in the archive.zip archive. +

+ +
+7z a -tzip archive.zip -r src\*.cpp src\*.h
+
+ +

adds all *.cpp and *.h + files from directory src and all it's subdirectories + to the archive.zip archive.

+ +
+7z a archive.7z folder1\
+
+ +

adds all files from directory folder1 and all it's subdirectories + to the archive.7z archive.

+ +
+7z a archive.7z -r folder2\
+
+ +

searches all folder2 directories in all subdirectories, + and adds them (including all subdirectories) to the archive.7z archive.

+ +

Commands that can be used with this switch

+ +

+ a (Add), + d (Delete), + e (Extract), + l (List), + t (Test), + u (Update), + x (Extract with full paths) +

+ +

See also

+ +

+ Switches: + -i (Include), + -x (Exclude) +

+ + + diff --git a/GUI/help/cmdline/switches/sfx.htm b/GUI/help/cmdline/switches/sfx.htm new file mode 100644 index 0000000..1260289 --- /dev/null +++ b/GUI/help/cmdline/switches/sfx.htm @@ -0,0 +1,156 @@ + + + + + -sfx (Create SFX archive) switch + + + + + +

-sfx (Create SFX archive) switch

+ +

Creates self extracting archive.

+ +

Syntax

+ +
+-sfx[{SFX_Module}]
+
+ +
+
{SFX_Module}
+
+

Specifies the SFX module that will be combined with the archive. + This module must be placed in the same directory as the 7z.exe. + If {SFX_Module} is not assigned, 7-Zip will use standard console + SFX module 7zCon.sfx.

+ + + + + + +
SFX_Module Description
7z.sfx Windows version.
7zCon.sfx Console version.
7zS.sfx Windows version for installers.
7zSD.sfx Windows version for installers (uses MSVCRT.dll).
+
+
+ +

+All SFX modules are uncompressed. You can use UPX program +(http://upx.sourceforge.net) +to compresss such modules. After compressing by the UPX program, the size of the +sfx module will be reduced to 40-50% of its original size. +

+ +

SFX modules for installers

+

SFX modules for installers are included in an external package (7z_extra). You can download +these modules from www.7-zip.org. SFX modules for installers (7zS.sfx and 7zSD.sfx) +allow you to create your own installation program. +Such a module extracts the archive to the user's temp folder, and runs a specified program, +and removes the temp files after the program finishes. +A self-extracting archive for installers must be created as joining 3 files: +SFX_Module, Installer_Config, 7z_Archive. +In addition, an optional file, Installer_Config, is allowed. You can use the following command to +create an installer self-extracting archive:

+
+copy /b 7zS.sfx + config.txt + archive.7z archive.exe
+
+ +

An optimally small installation package size can be achieved, +if the installation files are uncompressed before including them in the 7z archive.

+ +

-y switch for installer module specifies quiet mode extraction.

+ +

Installer Config file format

+

+This config file contains commands for the Installer. The file begins with the string +;!@Install@!UTF-8! and ends with ;!@InstallEnd@!. +The file must be written in UTF-8 encoding. +The file contains any or all these string pairs: +

ID_String="Value"

+

+ + + + + + + + + +
ID_String Description
Title Title for messages
BeginPrompt Begin Prompt message
Progress Value can be "yes" or "no". Default value is "yes".
RunProgram Command for executing. Default value is "setup.exe". Substring %%T + will be replaced with path to temporary folder, where files were extracted
Directory Directory prefix for "RunProgram". Default value is ".\\"
ExecuteFile Name of file for executing
ExecuteParameters Parameters for "ExecuteFile"
+

+

You may omit any pair.

+ +

There are two ways to run a installation program: RunProgram and ExecuteFile. +Use RunProgram, if you want to run a program from the .7z archive. +Use ExecuteFile, if you want to open a document from the .7z archive, or +if you want to execute a command from Windows.

+ +

If you use RunProgram, and if you specify empty directory prefix: Directory="", +the system searches for the executable file in the following sequence:

+
    +
  1. The directory from which the application (installer) loaded. +
  2. The temporary folder, where files were extracted. +
  3. The Windows system directory. +
+ +

Config file Examples

+ +
+;!@Install@!UTF-8!
+Title="7-Zip 4.00"
+BeginPrompt="Do you want to install the 7-Zip 4.00?"
+RunProgram="setup.exe"
+;!@InstallEnd@!
+
+ +
+ + +
+;!@Install@!UTF-8!
+Title="7-Zip 4.00"
+BeginPrompt="Do you want to install the 7-Zip 4.00?"
+ExecuteFile="7zip.msi"
+;!@InstallEnd@!
+
+ +
+ +
+;!@Install@!UTF-8!
+Title="7-Zip 4.01 Update"
+BeginPrompt="Do you want to install the 7-Zip 4.01 Update?"
+ExecuteFile="msiexec.exe"
+ExecuteParameters="/i 7zip.msi REINSTALL=ALL REINSTALLMODE=vomus"
+;!@InstallEnd@!
+
+ +

Examples

+ +
+7z a -sfx a.exe *.txt
+
+ +

adds *.txt files to self extracting + archive a.exe using the default console SFX module.

+ +
+7z a -sfx7z.sfx a.exe *
+
+ +

adds all files to self extracting archive a.exe +with module 7z.sfx using windows version of SFX mudule.

+ +

Commands that can be used with this switch

+ +

+ a (Add), + d (Delete), + u (Update), +

+ + + diff --git a/GUI/help/cmdline/switches/ssc.htm b/GUI/help/cmdline/switches/ssc.htm new file mode 100644 index 0000000..023dbf8 --- /dev/null +++ b/GUI/help/cmdline/switches/ssc.htm @@ -0,0 +1,50 @@ + + + + + -ssc (Set Sensitive Case mode) switch + + + + + +

-ssc (Set Sensitive Case mode) switch

+ +

Sets sensitive case mode for file names.

+ +

Syntax

+ +
+-scs[-]
+
+ + + + + +
Switch Description
-ssc Set case-sensitive mode. It's default for Posix/Linux systems.
-ssc- Set case-insensitive mode. It's default for Windows systems.
+ +

Example

+ +
+7z a archive.7z A*.txt -ssc -r
+
+ +

compresses all A*.txt files + from current directory and all it's subdirectories. That command doesn't compress + a*.txt files. + +

Commands that can be used with this switch

+ +

+ a (Add), + d (Delete), + e (Extract), + l (List), + t (Test), + u (Update), + x (Extract with full paths) +

+ + + diff --git a/GUI/help/cmdline/switches/stdin.htm b/GUI/help/cmdline/switches/stdin.htm new file mode 100644 index 0000000..f16b4eb --- /dev/null +++ b/GUI/help/cmdline/switches/stdin.htm @@ -0,0 +1,55 @@ + + + + + -si (read data from stdin) switch + + + + + +

-si (read data from stdin) switch

+ +

Causes 7-Zip to read data from stdin (standard input) instead of from disc files.

+ +

Syntax

+ +
+-si{file_name}
+
+ +
+
{file_name}
+
Specifies a name that will be stored in the archive for the compressed data. + If file_name is not specified, data will be stored without a name.
+
+ +

Note: The current version of 7-Zip support reading of archives from stdin only for xz, lzma, tar, gzip and bzip2 archives.

+ +

Examples

+ +
+7z a archive.gz -tgzip -siDoc2.txt < Doc.txt
+
+ +

compresses input stream from file Doc.txt to +archive.gz archive +using Doc2.txt file name.

+ +
+7z x 7z905.tar.gz -so | 7z x -si -ttar
+
+ +

decompresses tar.gz archive.

+ +

Commands that can be used with this switch

+ +

+ a (Add), + e (Extract), + u (Update), + x (Extract with full paths) +

+ + + diff --git a/GUI/help/cmdline/switches/stdout.htm b/GUI/help/cmdline/switches/stdout.htm new file mode 100644 index 0000000..62e5a66 --- /dev/null +++ b/GUI/help/cmdline/switches/stdout.htm @@ -0,0 +1,50 @@ + + + + + -so (write data to stdout) switch + + + + + +

-so (write data to stdout) switch

+ +

Causes 7-Zip to write output data to stdout (standard output stream).

+ +

Syntax

+ +
+-so
+
+ +

Examples

+ +
+7z x archive.gz -so > Doc.txt
+
+ +

decompresses archive.gz +archive to output stream and then redirects that stream to +Doc.txt file.

+ + +
+7z a dummy -tgzip -so Doc.txt > archive.gz
+
+ +

compresses the Doc.txt file to the 7-Zip standard +output stream and writes that stream to +archive.gz file.

+ +

Commands that can be used with this switch

+ +

+ a (Add), + e (Extract), + u (Update), + x (Extract with full paths) +

+ + + diff --git a/GUI/help/cmdline/switches/stop_switch.htm b/GUI/help/cmdline/switches/stop_switch.htm new file mode 100644 index 0000000..12383e5 --- /dev/null +++ b/GUI/help/cmdline/switches/stop_switch.htm @@ -0,0 +1,31 @@ + + + + + -- (Stop switches parsing) switch + + + + + +

-- (Stop switches parsing) switch

+ +

Disables switch parsing after "--" on the command line. +This is to allow 7-Zip to use file names that start with "-". + +

Syntax

+ +
+--
+
+ +

Examples

+ +
+7z t -- -ArchiveName.7z
+
+ +

tests -ArchiveName.7z archive.

+ + + diff --git a/GUI/help/cmdline/switches/style.css b/GUI/help/cmdline/switches/style.css new file mode 100644 index 0000000..13ebb79 --- /dev/null +++ b/GUI/help/cmdline/switches/style.css @@ -0,0 +1,232 @@ +body + { + padding: 0px 0px 0px 26px; + background: #ffffff; + color: #000000; + font-family: Verdana, Arial, Helvetica, sans-serif; + font-size: 80%; + } + +div + { + width: 90%; + border: 2px solid #999999; + padding: 4px 8px; + background: #cccccc; + } + +h1, h2, h3, h4 + { + font-family: Verdana, Arial, Helvetica, sans-serif; + margin-left: -26px; + } + +h1 + { + font-size: 145%; + margin-top: .5em; + margin-bottom: 1em; + } + +h2 + { + font-size: 130%; + margin-top: 1.5em; + margin-bottom: .6em; + } + +h3 + { + font-size: 115%; + margin-top: 1.5em; + margin-bottom: .6em; + } + +h4 + { + font-size: 100%; + margin-top: 1.5em; + margin-bottom: .6em; + } + +ul p, ol p, dl p + { + margin-left: 0em; + } + +p + { + margin-top: .6em; + margin-bottom: .6em; + } + +dl + { + /*margin-top: 0em; */ + } + +dt + { + margin-top: .76em; + margin-bottom: .5em; + font-weight: bold; + } + +dd + { + margin-top: .5em; + margin-bottom: .5em; + margin-left: 1.9em; + } + + +ul, ol + { + margin-top: .6em; + margin-bottom: 0em; + } + +ol + { + margin-left: 3.6em; + } + +ul + { + list-style-type: disc; + margin-left: 1.9em; + } + +li + { + margin-bottom: .6em; + } + +ul ol, ol ol + { + list-style-type: lower-alpha; + { + + /* +pre + { + margin-top: .6em; + margin-bottom: .6em; + } + */ + +pre,code + { + font: 100% Courier New, Courier, mono; + color: #000000; + cursor: text; + } + +pre.syntax + { + background: #dddddd; + padding: 2pt,4pt + } + +pre.syntax + { + color: #000000; + } + +pre.example + { + margin-left: 2.0em; + /*margin-top: 12.0em;*/ + /*margin-bottom: 1.0em;*/ + color: #C00000; + /*padding: 10pt,20pt*/ + } + +table + { + /* width: 90%; */ + background: #999999; + margin-top: .6em; + margin-bottom: .3em; + } + +th + { + padding: 4px 8px; + background: #cccccc; + text-align: left; + font-size: 80%; + vertical-align: bottom; + } + +th.cc + { + text-align: center; + vertical-align: middle; + } + +td + { + padding: 4px 8px; + background: #ffffff; + vertical-align: top; + font-size: 80%; + } + +td.cc + { + text-align: center; + vertical-align: middle; + } + + +blockquote + { + margin-left: 3.8em; + margin-right: 3.8em; + margin-top: .6em; + margin-bottom: .6em; + } + +a:link + { + color: #0066ff; + } + +a:visited + { + color: #996600; + } + +a:hover + { + color: #cc9900; + } + +a.parameter:link + { + color: #0066ff; + text-decoration:none; + } + +a.parameter:visited + { + text-decoration:none; + } + +div.footer + { + width: 100%; + border: none; + background: #ffffff; + margin-top: 18pt; + padding-bottom: 12pt; + color: #228B22; + text-align: center; + font-size: 70%; + } + +span.filename +{ + color: #F00000; +} diff --git a/GUI/help/cmdline/switches/type.htm b/GUI/help/cmdline/switches/type.htm new file mode 100644 index 0000000..73af4e1 --- /dev/null +++ b/GUI/help/cmdline/switches/type.htm @@ -0,0 +1,83 @@ + + + + + -o (set Output directory) switch + + + + + +

-t (set Type of archive) switch

+ +

Specifies the type of archive.

+ +

Syntax

+ +
+-t{archive_type}
+
+ +
+
{archive_type}
+
Specifies the type of archive. It can be: *, 7z, split, zip, gzip, bzip2, tar, ... , or + combination of them, like: mbr.vhd +
+
+ +

If -t{archive_type} switch is not specified, 7-Zip uses extension of archive filename to + detect the type of archive. If you create new archive, -t{archive_type} switch is not + specified and there is no extension of archive, 7-Zip will create .7z archive.

+ +

When you extract archive of some types that contains another +archive without compression (for example, MBR in VHD), 7-Zip can open both +levels in one step. If you want to open/extract just top +level archive, use -t* switch.

+ +

Note: gzip or bzip2 formats support only one file per archive. +If you want to compress more than one file to these formats, +create a tar archive first, and then compress it with your selected format.

+ +

Example

+ +
+7z a -tzip archive.zip *.txt
+
+ +

adds all *.txt files from current directory +to zip archive archive.zip.

+ +
+7z t -t7z.split archive.7z.001
+
+ +

tests all files in archive.7z.001. It also checks +that archive is multivolume .7z archive.

+ +
+7z x -tiso archive.iso
+
+ +

extracts files from archive.iso open as ISO archive. + +

+7z x -tudf archive.iso
+
+ +

extracts files from archive.iso open as UDF archive. + + +

Commands that can be used with this switch

+ +

+ a (Add), + d (Delete), + e (Extract), + l (List), + t (Test), + u (Update), + x (Extract with full paths) +

+ + + diff --git a/GUI/help/cmdline/switches/update.htm b/GUI/help/cmdline/switches/update.htm new file mode 100644 index 0000000..3c707a7 --- /dev/null +++ b/GUI/help/cmdline/switches/update.htm @@ -0,0 +1,176 @@ + + + + + -u (Update options) switch + + + + + +

-u (Update options) switch

+ +

Specifies how to update files in an archive and (or) how to create new archives.

+ +

Syntax

+ +
+-u[-]<action_set>[!{new_archive_name}]
+
+  <action_set> ::= <state_action>...
+
+    <state_action> ::= <state><action>
+
+      <state> ::= p | q | r | x | y | z | w
+
+      <action> ::= 0 | 1 | 2 | 3
+
+ + +

Parameters

+ +
+
dash (-)
+

Disables any updates in the base archive.

+ +

The term base archive means the archive assigned by "base_archive_name" + on the command line. See Command line syntax + for more details.

+
+
{new_archive_name}
+

Specifies the path name of the new archive to be created. + All options in this switch will refer to this new archive.

+

If not assigned, then all options in this switch will + refer to the base archive of the command.

+
+
<state>
+

Specifies the state of a particular file to be processed.

+
<state> ::= p | q | r | x | y | z | w
+

For each unique filename there are 6 variants of state:

+ + + + + + + + + + + + + + + + + + + + + + + + +
<state> State conditionFile on Disk File in Archive
p File exists in archive, but is not matched with wildcard.  Exists, but is not matched
q File exists in archive, but doesn't exist on disk.Doesn't exist Exists
r File doesn't exist in archive, but exists on disk.Exists Doesn't exist
x File in archive is newer than the file on disk.Older Newer
y File in archive is older than the file on disk.Newer Older
z File in archive is same as the file on diskSame Same
w Can not be detected what file is newer + (times are the same, sizes are different)? ?
+
+ +
<action>
+

Specifies the action for a given <state>.

+
<action> ::= 0 | 1 | 2 | 3
+

For each state you can specify one of the three variants of actions:

+ + + + + + +
<action> Description
0 Ignore file (don't create item in new archive for this file)
1 Copy file (copy from old archive to new)
2 Compress (compress file from disk to new archive)
3 Create Anti-item (item that will delete file or directory during extracting). This feature is supported only in 7z format.
+
+
+ + +

Remarks

+ +

Any update command (such as a (Add), + d (Delete), + u (Update)) can be assigned in these terms.

+

The following table shows action sets for update commands.

+ + + + + + + + + +
command \ <state>p q r x y z w
d (Delete) 1 0 0 0 0 0 0
a (Add) 1 1 2 2 2 2 2
u (Update) 1 1 2 1 2 1 2
Freshen 1 1 0 1 2 1 2
Synchronize 1 0 2 1 2 1 2
+ + +

If you don't specify a +!{new_archive_name} option, then +all options will refer to the main archive (the archive assigned on the command line after the 7z command). +If you specify !{new_archive_name} +option, then 7-Zip also will create a new archive with the specified name and all options +will refer to that new archive.

+ +

Multiple update switches are supported. +7-Zip can create any number of new archives during one operation.

+ +

By default, the action set for each new archive is assigned +as the action set of the main command. There are 3 different +action sets for commands: a (Add), + d (Delete), + u (Update). +You can overload any <state_action> pair.

+ +

Time zone notes

+

If you change time zone (when you move your computer to another time zone +or if there are clock changes for daylight saving in your zone), you can have some problems +with update commands that depend from file's modification time. It's strongly recommended to use only +file system that uses Coordinated Universal Time (UTC) and archive format that also uses UTC. +In that case you will have no problems with time zone changes. +Also it's recommended to use only UTC formats in other cases, for example, if you send files to +someone in another time zone.

+ +

Also in some cases there are no problems, if both file system and archive format use local time, for example, FAT file system and ZIP format.

+
    +
  • UTC file systems: NTFS +
  • UTC archive formats: .zip with -mtc switch, 7z, tar, gzip2, iso, wim +
  • Local time file systems : FAT, FAT32 +
  • Local time archive formats : rar, zip, cab +
+ +

Examples

+ +
+7z u c:\1\exist.7z -u- -up0q3x2z0!c:\1\update.7z *
+
+ +

creates a new archive update.7z and +writes to this archive all files from current directory which differ from +files in exist.7z archive. +exist.7z archive will not be changed.

+ +
+7z u c:\1\exist.7z -up0q3x2z0!c:\1\update.7z * -ms=off
+
+ +

creates a new archive update.7z and +writes to this archive all files from the current directory which differ from +files in exist.7z archive. + +

Note: the updating of solid .7z archives can be slow, since it +can require some recompression.

+ +

Commands that can be used with this switch

+ +

+ a (Add), + d (Delete), + u (Update), +

+ + + diff --git a/GUI/help/cmdline/switches/volume.htm b/GUI/help/cmdline/switches/volume.htm new file mode 100644 index 0000000..91ddc29 --- /dev/null +++ b/GUI/help/cmdline/switches/volume.htm @@ -0,0 +1,49 @@ + + + + + -v (Create Volumes) switch + + + + + +

-v (Create Volumes) switch

+ +

Specifies volume sizes.

+ +

Syntax

+ +
+-v{Size}[b | k | m | g]
+
+
+
+
{Size}[b | k | m | g]
+
Specifies volume size in Bytes, Kilobytes (1 Kilobyte = 1024 bytes), + Megabytes (1 Megabyte = 1024 Kilobytes) or Gigabytes (1 Gigabyte = 1024 Megabytes). + if you specify only {Size}, 7-zip will treat it as bytes.
+
+ +

It's possible to specify several -v switches.

+ +

NOTE: Please don't use volumes (and don't copy volumes) before finishing archiving. +7-Zip can change any volume (including first volume) at the end of archiving operation.

+ +

Examples

+ +
+7z a a.7z *.txt -v10k -v15k -v2m
+
+ +

creates multivolume a.7z archive. +First volume will be 10 KB, second will be 15 KB, and all others will be 2 MB.

+ +

Commands that can be used with this switch

+ +

+ a (Add), +

+ + + diff --git a/GUI/help/cmdline/switches/working_dir.htm b/GUI/help/cmdline/switches/working_dir.htm new file mode 100644 index 0000000..415c397 --- /dev/null +++ b/GUI/help/cmdline/switches/working_dir.htm @@ -0,0 +1,55 @@ + + + + + -w (set Working directory) switch + + + + + +

-w (set Working directory) switch

+ +

Sets the working directory for the temporary base archive. By +default, 7-Zip builds a new base archive file in the same directory as the +old base archive file. By specifying this switch, you can set the +working directory where the temporary base archive file will be built. +After the temporary base archive file is built, it is copied over the +original archive; then, the temporary file is deleted.

+ +

Syntax

+ +
+-w[{dir_path}]
+
+ +
+
{dir_path}
+
+

Specifies the destination directory path. It's not required that + a path end with a backslash.

+

If <dir_path> is not assigned, then 7-Zip will use the Windows temporary directory.

+
+
+ + +

Example

+ +
+7z a -tzip archive.zip *.cpp -wc:\temp
+
+ +

adds *.cpp files to the +archive.zip archive, creating a temporary archive +in c:\temp folder.

+ +

Commands that can be used with this switch

+ +

+ a (Add), + d (Delete), + u (Update), +

+ + + diff --git a/GUI/help/cmdline/switches/yes.htm b/GUI/help/cmdline/switches/yes.htm new file mode 100644 index 0000000..142ffd2 --- /dev/null +++ b/GUI/help/cmdline/switches/yes.htm @@ -0,0 +1,48 @@ + + + + + -y (assume Yes on all queries) switch + + + + + +

-y (assume Yes on all queries) switch

+ +

Disables most of the normal user queries during 7-Zip +execution. You can use this switch to suppress overwrite queries in the +e (Extract) and +x (Extract with full paths) commands.

+ +

Syntax

+ +
-y
+ +

Examples

+ +
+7z x src.zip -y
+
+ +

extracts all files from + src.zip archive. All overwrite queries will be +suppressed and files on disk with same filenames as in archive will be +overwritten.

+ +

Commands that can be used with this switch

+ +

+ e (Extract), + x (Extract with full paths) +

+ +

See also

+ +

+ Switches: + -ao (Overwrite mode), +

+ + + diff --git a/GUI/help/cmdline/syntax.htm b/GUI/help/cmdline/syntax.htm new file mode 100644 index 0000000..63822e0 --- /dev/null +++ b/GUI/help/cmdline/syntax.htm @@ -0,0 +1,120 @@ + + + + + Command Line Syntax + + + + + +

Command Line Syntax

+ +
+7z <command> [<switch>...] <base_archive_name> [<arguments>...]
+
+
+<arguments> ::= <switch> | <wildcard> | <filename> | <list_file>
+<switch>::= <switch_symbol><switch_characters>[<option>]
+<switch_symbol> ::= '/' | '-' 
+<list_file> ::= @{filename}
+
+ + +

Expressions in square brackets (between '[' and ']') are optional.

+ +

Expressions in curly braces ('{' and '}') mean that instead of that +Expression (including braces), the user must substitute some string.

+ +

Expression

+ +
+expression1 | expression2 | ... | expressionN
+
+ +

+means that any (but only one) from these expressions must be specified. + +

Commands and +switches can be entered in upper or lower case.

+ +

Command is the first non-switch argument.

+ +

The "base_archive_name" must be the first filename on the command line +after the command.

+ +

The switches and other filenames can be in any order.

+ +

Wildcards or filenames with spaces must be quoted:

+ +
+    "Dir\Program files\*"
+    Dir\"Program files"\*
+
+ +

Switch options can be combined to save command line length. However, some +switch options take optional string arguments and therefore, must be the +last option in a combined argument token string because 7-Zip accepts the +rest of the argument token as the optional argument.

+ +

7-Zip uses wild name matching similar to Windows 95:

+
    +
  • '*' means a sequence of arbitrary characters.
  • +
  • '?' means any character.
  • +
+ +

+7-Zip doesn't uses the system wildcard parser. 7-Zip doesn't +follow the archaic rule by which *.* means any file. 7-Zip treats +*.* as matching the name of any file that has an extension. To process all files, you must +use a * wildcard.

+ +

Examples:

+ + + + + +
*.txtmeans all files with an extension of ".txt"
?a*means all files with a second character of "a"
*1*means all names that contains character "1"
*.*.*means all names that contain two at least "." characters
+ + +

The default wildcard "*" will be used if there is no filename/wildcard in the +command line.

+ +

Slash ('\') at the end of a path means a directory. Without a Slash ('\') at +the end of the path, the path can refer either to a file or a directory. + + +

List file

+ +

You can supply one or more filenames or wildcards for special list files +(files containing lists of files). The filenames in such list file must be +separated by new line symbol(s).

+ +

For list files, 7-Zip uses UTF-8 encoding by default. You can change encoding +using -scs switch.

+ +

Multiple list files are supported.

+ +

For example, if the file "listfile.txt" contains the following:

+ +
+    My programs\*.cpp
+    Src\*.cpp
+
+

then the command

+ +
+    7z a -tzip archive.zip @listfile.txt
+
+ +

adds to the archive "archive.zip" all "*.cpp" files from directories "My +programs" and "Src".

+ +

Short and Long File Names

+ +

7-Zip supports short file names (like FILENA~1.TXT) in some cases. +However, it's strongly recommended to use only the real (long) file names.

+ + + diff --git a/GUI/help/fm/about.htm b/GUI/help/fm/about.htm new file mode 100644 index 0000000..fc55af4 --- /dev/null +++ b/GUI/help/fm/about.htm @@ -0,0 +1,21 @@ + + + + + About Dialog Box + + + + + +

About Dialog Box

+ +

The About dialog box provides information about 7-Zip. This dialog box is available +from the Help menu.

+ +
    +
  • Press www.7-zip.org button for opening 7-Zip Home Page.
  • +
+ + + diff --git a/GUI/help/fm/benchmark.htm b/GUI/help/fm/benchmark.htm new file mode 100644 index 0000000..ede3b65 --- /dev/null +++ b/GUI/help/fm/benchmark.htm @@ -0,0 +1,56 @@ + + + + + Benchmark + + + + + +

Benchmark

+ +

This form allows you to measure the performance of your computer.

+ +

There are two tests:

+

    +
  1. Compression with LZMA method +
  2. Decompression with LZMA method +
+ +

The benchmark shows a rating in MIPS (million instructions per second). +The rating value is calculated from the measured speed, and it +is normalized with results of Intel Core 2 CPU with multi-threading option switched off. +So if you have modern CPU from Intel or AMD, rating values in single-thread mode +must be close to real CPU frequency.

+ +

You can change the dictionary size to increase memory usage. +Also you can change the number of threads.

+ +

The CPU Usage column shows the percentage of time the processor is working. +It's normalized for a one-thread load. For example, 180% CPU Usage for 2 threads +can mean that average CPU usage is about 90% for each thread.

+ +

The Rating / Usage column shows rating normalized for 100% of CPU usage. +That column shows performance of the one CPU thread. It must be close to real CPU frequency, +if you have modern CPU.

+ +

The Total rating shows averages of the compressing and decompression ratings.

+ + +

Compression speed and rating strongly depend from memory (RAM) latency. + +

Decompression speed and rating strongly depend on CPU integer operations. +For example, an Intel Pentium 4 has big branch +misprediction penalty (which is effect of long pipeline) and pretty slow +multiply and shift operations. So, the Pentium 4 has pretty low decompressing +ratings.

+ + +

Also the program checks possible errors. +If the program shows some error message, in most cases it means that +your RAM is defective. If so, don't use 7-Zip for +compressing data, since such errors can lead to data losses.

+ + + diff --git a/GUI/help/fm/index.htm b/GUI/help/fm/index.htm new file mode 100644 index 0000000..30c22ff --- /dev/null +++ b/GUI/help/fm/index.htm @@ -0,0 +1,55 @@ + + + + + 7-Zip File Manager + + + + + +

7-Zip File Manager

+ +

The 7-Zip File Manager is a program for manipulating files and folders.

+ +

The 7-Zip File Manager can work with two panels. You can switch between +panels by pressing the Tab button. Most of the operations can be +executed using keyboard shortcuts or by right-clicking on items +and selecting the appropriate command from menu.

+ + +

In This Section

+ +
+
Menu Items and Shortcut Keys
+
Describes the menu items and keyboard shortcut.
+
Options Dialog Box
+
Describes what settings you can change that affect the 7-Zip File Manager.
+
Benchmark
+
Describes a 7-Zip Benchmark for measuring CPU performance.
+
About Dialog Box
+
Provides information about 7-Zip.
+
Plugins
+
Describes plugins for the 7-Zip File Manager.
+
+ +
+

You have access to the following items from root folder in 7-Zip File Manager:

+
    +
  • Computer: computer's disks +
  • Documents: My Documents folder of current user +
  • Network +
  • \\. : the folder for low-level access to disks. + You must have administrator's rights to use that folder. + You can +
      +
    • copy .iso images from CD/DVD to file. +
    • view NTFS/FAT partitions via 7-Zip parser. It provides read-only access to + files including recently deleted files in NTFS partition via [DELETED] folder. +
    +
+

+ + + + diff --git a/GUI/help/fm/menu.htm b/GUI/help/fm/menu.htm new file mode 100644 index 0000000..9d900d3 --- /dev/null +++ b/GUI/help/fm/menu.htm @@ -0,0 +1,148 @@ + + + + + Menu Items and Shortcut Keys + + + + + +

Menu Items

+ +

Note: 'Grey' refers to the numeric keypad.

+ +

File

+ + + + + + + + + + + + + + + + + + + + +
Menu item Shortcut Description
System Submenu with menu commands from system shell
Open Enter Open current item
Open Inside Ctrl+PgDn Open current item as folder inside 7-Zip
Open Outside Shift+Enter Open current item in new window
Edit F4 Open selected item with editor
Rename F2 Rename selected item
Copy To... F5 Copy selected items
Move To... F6 Move selected items
Delete Delete Delete selected items
Split file... Split file to parts
Combine files... Combine files to one file
Properties Alt+Enter Show Properties of file
Comment Ctrl+Z Set comment for file
Calculate checksum Calculates CRC checksum for files
Diff Show the differences between two files
Create Folder F7 Create new folder
Create File Shift+F4 Creates new file
Exit Alt+F4 Closes the program.
+ +

Edit

+ + + + + + + + + +
Menu Item Shortcut Description
Select All Shift+[Grey +] Select all items
Deselect All Shift+[Grey -] Select all items
Invert Selection [Grey *] Select / Deselect all items
Select... [Grey +] Select specified items
Deselect... [Grey -] Deselect specified items
Select by Type Alt+[Grey +] Select all items with the same extension as current item
Deselect by Type Alt+[Grey -] Deselect all items with the same extension as current item
+ +

View

+ + + + + + + + + + + + + + + + + + + + + + +
Menu Item Shortcut Description
Large IconsCtrl+1 Displays items by using large icons
Small IconsCtrl+2 Displays items by using small icons
List Ctrl+3Displays items in a list
Details Ctrl+4Displays items in a list with detailed information about each item
Name Ctrl+F3 Sort items by Name
Type Ctrl+F4 Sort items by Type
Date Ctrl+F5 Sort items by Date
Size Ctrl+F6 Sort items by Size
Unsorted Ctrl+F7 Do not sort items
Flat View Switch Flat view mode for list of files
2 Panels F9 Switch On/Off second panel
Toolbars Menu items for toolbars handling
Open Root Folder \ Open root computer folder
Up One Level Backspace Open the folder one level up
Folders History... Alt+F12 Open folders history
Refresh Ctrl+R Refresh items list
+ +

Tools

+ + + + +
Menu Item Shortcut Description
Options... Open Options dialog box
Benchmark Measure the performance of your computer with 7-Zip LZMA benchmark
+ +

Favorites

+ + + +
Menu Item Shortcut Description
Add folder to Favorites as Adds folder to favorities
+ +

Help

+ + + + +
Menu Item Shortcut Description
Contents... F1 Opens 7-Zip Help
About 7-Zip... Opens About dialog box
+ + +

Miscellaneous commands

+ + + + + + + + + + + + +
Shortcut Description
Tab Switch between panels
Insert Select / Deselect current item
Shift+F10 Display the shortcut menu for the selected items
RightCtrl+0
Alt+0
...
RightCtrl+9
Alt+9
Open folder bookmark
Shift+RightCtrl+0
Shift+Alt+0
...
Shift+RightCtrl+9
Shift+Alt+9
Creates folder bookmark
Alt+F1 Edit the Folder Address on left panel
Alt+F2 Edit the Folder Address on right panel
Ctrl+[Grey +] Adjust optimal column width for items
Alt+Up Open same folder in other panel
Alt+Left,
Alt+Right
Open current folder in other panel
+ +

Keyboard Shortcuts

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Key Normal Ctrl Alt Shift
Tab Switch panel
F1 Help Left Path
F2 Rename Right Path
F3 View Sort by Name
F4 Edit Sort by Type Exit Create File
F5 Copy Sort by Date
F6 Move Sort by Size
F7 Create Folder Unsorted
F9 1/2 Panels
F10 Menu Shortcut Menu
F12 Folders History
0-9 R: Folder BookmarkFolder Bookmark
A Select All
N Create File
R Refresh
Z Comment
Backspace Up One Level
Enter Open Properties Open outside
Insert Select Item
Delete Delete Item
Page Down Open Inside
Page Up Up One Level
Up Open same folder
Left Open current folder
Right Open current folder
\ Open root
Grey / Open root
Grey * Select All
Grey + Select Adjust columns Select by Type Select All
Grey - Deselect Deselect by Type Deselect All
+ + + diff --git a/GUI/help/fm/options.htm b/GUI/help/fm/options.htm new file mode 100644 index 0000000..a6f9450 --- /dev/null +++ b/GUI/help/fm/options.htm @@ -0,0 +1,132 @@ + + + + + Options Dialog Box + + + + + +

Options Dialog Box

+ + +

You can change many of the settings that affect the 7-Zip File Manager +in the Options dialog box. To access this dialog box select Options +from the Tools menu.

+ +

The options dialog box contains the following pages:

+ + +

System Page

+

Allows you to specify the behavior of 7-Zip in the filing system.

+
+
Associate 7-Zip with
+
Lists the file name extensions and associated plugins that are currently + registered with 7-Zip. If file name extension is checked, + 7-Zip will be used to open file with that extension. + In any case you can always open all archives with + 7-Zip via your right-click context menu.
+
+ +

7-Zip Page

+

Allows you to specify behavior of 7-Zip in Windows Shell.

+
+
Integrate 7-Zip to shell context menu
+
Select this check box to add 7-Zip commands to Shell Context Menu.
+
Cascaded context menu
+
Select this check box to group 7-Zip context menu items to one 7-Zip submenu.
+
Context menu items
+
Lists the optional context menu items. If an item is checked, + 7-Zip will add this item to the context menu.
+
+ + +

Folders Page

+

Allows you to set the folders which 7-Zip will use for internal purposes.

+ +

Working folder

+ +

The working folder section allows you to specify a folder which will be used +for temporary archive files:

+ +
+
System temp folder
+
7-Zip will use the Windows temp folder.
+
Current
+
7-Zip will use the folder containing the target archive.
+
Specified
+
7-Zip will use the folder specified in the following edit control.
+
+ +
+
Use for removable drives only
+
Specifies whether 7-Zip should use the specified folder settings + only for removable drives; for other drives, 7-Zip will create + temporary archives in the folder containing the target archive. + If you clear this check box, 7-Zip always will use the specified folder + settings mode always. +
+
+ +

7-Zip uses temporary archive files for all update operations. +So, for speed reasons, it is recommended that you select the +System temp folder option and select +Use for removable drives only check box. +

+ +

Editor Page

+

Allows you to specify settings for the editor.

+
+
Editor
+
Specifies the path to the editor that will be used for "Edit" command (F4).
+
Diff
+
Specifies the path to a file comparison utility that shows the + differences between two files.
+
+ +

Settings Page

+

Allows you to specify some settings.

+
+
Show .. item
+
Shows .. item in file list.
+
Show real file icons
+
Shows real file icons in file list. If this option is enabled, + listing updates can be slower.
+
Show system menu
+
Shows a system context sub-menu in the File menu.
+
Full row select
+
When an item is selected, the item and all its subitems are highlighted.
+
Show grid lines
+
Displays gridlines around items and subitems.
+
Single-click to open an item
+
If enabled, File Manager opens files and folders by single-clicking them. +
Alternative selection mode
+
If enabled, File Manager keeps selection mark when you move cursor.
+
Use large memory pages
+
If enabled, 7-Zip will try to use large pages. This feature allows an increase in speed of compression. + This may cause 7-Zip to pause when starting compression, because of allocation of the large pages. + Also, the Windows Task Manager doesn't show the real memory usage of the program, if 7-Zip uses large pages. + This feature works only on Windows 2003 / XP x64. + Also you must have administrator's rights for your system. + Recommended size of RAM: 1 GB or more. + To install this feature you must run 7-Zip File Manager at least once, + close it and reboot the system.
+
+ +

Language Page

+

Allows you to change the default language.

+
+
Language
+
Lists the available languages.
+
+ + + diff --git a/GUI/help/fm/plugins/7-zip/add.htm b/GUI/help/fm/plugins/7-zip/add.htm new file mode 100644 index 0000000..f52680c --- /dev/null +++ b/GUI/help/fm/plugins/7-zip/add.htm @@ -0,0 +1,305 @@ + + + + + Add to Archive Dialog Box + + + + + +

Add to Archive Dialog Box

+ +

Allows you to specify options for creating or updating an archive.

+ +

How to call this dialog box

+
    +
  1. In Windows Explorer or in 7-Zip, right-click the file(s) or folder(s) you want to compress.
  2. +
  3. Point to 7-Zip, and then click the Add to archive... command item.
  4. +
+ +

Parameters

+
+
Archive
+
Provides a space for you to specify a destination archive name. + You can click "..." button to display "Open" dialog box + that you can use to locate archive.
+ +
Archive format
+
Specifies a format of created archive. Some formats (gzip and bzip2) + do not support compressing more the one file per archive.
+ +
Compression level
+
+

Specifies compression level. There are 6 levels of compression:

+ + + + + + + + +
Value Meaning
Store Files will be copied to archive without compression.
Fastest Fastest compression.
Fast Fast compression.
Normal Compression with balanced settings.
Maximum Can give a higher compression ratio than Normal level. + But it can be slower, and it can require more memory.
Ultra Can give a higher compression ratio than Maximum level. + But it can be slower, and it can require more memory.
+
+ +
Compression method
+
+

Specifies compression method. Each archive format can have its own compression methods:

+ + + + + + + + +
Method Description
LZMA Default compression method of 7z format. It provides high + compression ratio and very fast decompression.
LZMA2 LZMA-based compression method. + It provides better multithreading support than LZMA. But compression ratio + can be worse in some cases. For best compression ratio with LZMA2 use 1 + or 2 CPU threads. If you use LZMA2 with more than 2 threads, 7-zip splits data + to chunks and compresses these chunks independently (2 threads per each chunk).
PPMd Dmitry Shkarin's PPMdH algorithm with small changes. + Usually it provides high compression ratio and high speed + for text files.
BZip2 Standard compression method based on BWT algorithm. + Usually it provides high speed and pretty good + compression ratio for text files.
Deflate Standard compression method of ZIP and GZip formats. + Compression ratio is not too high. But it provides pretty fast + compressing and decompressing. Deflate method supports only + 32 KB dictionary.
Deflate64 Modified version of Deflate algorithm with + bigger dictionary (64KB).
+

Estimated 7-Zip performance and memory requirements for AMD Athlon 64 X2 3800+:

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
MethodLevelDictionary SizeCompressing SpeedDecompressing SpeedMemory for CompressingMemory for Decompressing
LZMAfastest64 KB4.5 MB/s15 MB/s3 MB3 MB
fast1 MB3 MB/s10 MB3 MB
normal16 MB2 MB/s186 MB18 MB
maximum32 MB1.8 MB/s376 MB34 MB
ultra64 MB1.6 MB/s709 MB66 MB
PPMDfast4 MB1.4 MB/s6 MB
normal24MB1.2 MB/s26 MB
maximum64 MB1.0 MB/s66 MB
ultra192 MB0.9 MB/s194 MB
Deflatefast32 KB15 MB/s40 MB/s3 MB2 MB
normal3.5 MB/s
maximum1.5 MB/s4MB
ultra0.4 MB/s
BZip2normal900 KB3 MB/s16 MB/s20 MB7 MB
maximum1.2 MB/s
ultra0.4 MB/s
+
+ +
Dictionary size
+
+

Specifies Dictionary size for compression method.

+

Usually, a higher Dictionary size gives a higher compression ratio. + But compressing can be slower and it can require more memory.

+

+ Memory (RAM) usage for LZMA compressing is about 11 times more than dictionary size. + Memory usage for LZMA decompressing is close to value of dictionary size. + Memory usage for PPMd compressing and decompressing is almost equal + to dictionary size.

+
+ +
Word size
+
+

Specifies the length of words, which will be used to find identical + sequences of bytes for compression.

+

Usually for LZMA and Deflate, big Word size gives a little bit better + compression ratio and slower compression process. + A big Word size parameter can significantly increase compression ratio + for files which contain long identical sequences of bytes. For PPMd, + the Word size strongly affects both compression ratio and + compression/decompression speed.

+
+ + +
Solid Block size
+
+

Specifies the size of a solid block. You can also disable solid mode. + In solid mode all files will be compressed as continuous data blocks. + Usually compressing to a solid archive improves the compression ratio. + You can use this option only for 7z archives. The updating of solid .7z + archives can be slow, since it can require some recompression.

+.

+
+ +
Number of CPU threads
+
+

Specifies the number of threads for compressing. + A big number of threads can speed up compression speed on Multi-Processor systems. + Sometimes it can increase speed even on single-core CPU.

+
+ +
Split to volumes
+
+
+    {Size}[b | k | m | g]
+    
+ +

Specifies volume sizes in Bytes, Kilobytes (1 Kilobyte = 1024 bytes), + Megabytes (1 Megabyte = 1024 Kilobytes) or Gigabytes (1 Gigabyte = 1024 Megabytes). + If you specify only {Size}, 7-zip will treat it as bytes. It's possible to specify + several values. Example:

+ +
+    10k 15k 2m
+    
+ +

The first volume will be 10 KB, the second will be 15 KB, and all others will be 2 MB.

+ +
+ +
Parameters
+
+

Allows you to specify parameters for compression. See the + -m (Method) switch description for + more details. Omit the -m prefix (as in -m switch) when using this dialog box.

+

Examples

+
+      0=PPMd
+

uses PPMd method for compressing files.

+ +
+      0=bcj2 1=lzma:d23 2=lzma 3=lzma b0:1 b0s1:2 b0s2:3
+

uses BCJ2 filter (for x86 executables) and LZMA.

+ +
+ +
Update mode
+
+

Specifies update mode:

+ + + + + + +
Value Meaning
Add and replace files Add all specified files to the archive.
Update and add files Update older files in the archive and add + files that are new to the archive.
Freshen existing files Update specified files in the + archive that are older than the selected disk files.
Synchronize files Replace specified files only if + added files are newer. Always add those files, which are not + present in the archive. Delete from archive those files, + which are not present on the disk.
+
+ +
Options
+
+

Specifies compression options:

+ + + + +
Option Meaning
Create SFX archive Create self-extracting archive. You can use this option only + for 7z archives. Look to + -sfx (Create SFX archive) switch description for + more details about SFX modules.
Compress shared files Compress files open for writing by another applications.
+
+ +
Encryption
+
+

Specifies password and encryption options.

+
+
Enter password
+
Specify password here
+
Reenter password
+
Reenter password here for verification
+
Show Password
+
Shows Password
+
Encryption method
+
Specifies the encryption method. For 7z format, it can be only AES-256. + For ZIP format you can select ZipCrypto or AES-256. + Use ZipCrypto, if you want to get archive compatible with most of the ZIP archivers. + AES-256 provides stronger encryption, but now AES-256 is supported only + by 7-Zip, WinZip and some other ZIP archivers. +
Encrypt file names
+
Enables or disables archive header encryption, including file name encryption.
+
+
+ + +
+
    + + + diff --git a/GUI/help/fm/plugins/7-zip/extract.htm b/GUI/help/fm/plugins/7-zip/extract.htm new file mode 100644 index 0000000..5fb79c9 --- /dev/null +++ b/GUI/help/fm/plugins/7-zip/extract.htm @@ -0,0 +1,85 @@ + + + + + Extract Dialog Box + + + + + +

    Extract Dialog Box

    + +

    Allows you to specify options for extracting files from archive.

    + +

    How to run this dialog box

    +

    There are two ways to run this dialog

    +
      +
    • To extract all files from an archive: +
        +
      1. In Windows Explorer or in 7-Zip, right-click the archive file.
      2. +
      3. Point to 7-Zip, and then click Extract files....
      4. +
      +
    • + +
    • To extract specified files from an archive opened in the browsing window: +
        +
      1. Open archive with 7-Zip.
      2. +
      3. Select items to extract.
      4. +
      5. Right-click items and then click Copy To....
      6. +
      +
    • +
    + + +

    Parameters

    +
    +
    Extract to
    +
    Provides a space for you to specify an output folder. + You can click "..." button to display "Browse for folder" + dialog box that you can use to locate output folder.
    + +
    Path mode
    +
    +

    Specify extract mode:

    + + + + +
    Value Meaning
    Full pathnames Extract files with full pathnames.
    No pathnmes Extract files without folder paths.
    +
    + +
    Overwrite mode
    +
    +

    Specify overwrite mode for files that already present on disk:

    + + + + + + + +
    Value Meaning
    Ask before overwrite Ask before overwriting existing files.
    Overwrite without prompt Overwrite existing files without prompt.
    Skip existing files Skip extracting of existing files.
    Auto rename Rename extracted files, if a file with the same name already exists. + For example, file document.txt will be renamed to document_1.txt.
    Auto rename existing files Rename existing files, if a file with the same name already exists. + For example, file document.txt will be renamed to document_1.txt.
    +
    + +
    Files
    +
    +

    Specifies files for extracting:

    + + + + +
    Value Meaning
    Selected files Extract only files that are selected in the main window.
    All files Extract all files.
    +
    + +
    Password
    +
    +

    Specifies a password for encrypted archives.

    +
    +
    +
      + + + diff --git a/GUI/help/fm/plugins/7-zip/index.htm b/GUI/help/fm/plugins/7-zip/index.htm new file mode 100644 index 0000000..c0b6e5e --- /dev/null +++ b/GUI/help/fm/plugins/7-zip/index.htm @@ -0,0 +1,63 @@ + + + + + 7-Zip Plugin + + + + + +

      7-Zip Plugin

      + +

      7-Zip is a plugin for manipulating archives. It makes all archive files +look like usual folders in File Manager.

      + +

      Most of the operations with compressed files can be initiated by +right-clicking on files in the File Manager (or in Windows Explorer) and +selecting the appropriate command from a menu.

      + +

      Using 7-Zip

      + +
      +
      Opening archive
      +
      +

      There are two ways to open an archive file:

      +
        +
      • If you have the file type associated with 7-Zip, then you can open the + file with 7-Zip by double-clicking the file or by right-clicking and selecting + the Open command.
      • +
      • You can right-click the archive file, point to 7-Zip, + and then click the Open command item.
      • +
      +
      +
      Extracting archive
      +
      +

      There are two ways to extract files from an archive:

      +
        +
      • To extract all files from an archive right-click the archive file, + point to 7-Zip, and then click the Extract files... + command item.
      • +
      • To extract specific files from an archive, open it by + Open archive with 7-Zip, + select the items to extract, and run the Copy To... command.
      • +
      +

      Extract Dialog will appear.

      +
      +
      Testing archive
      +
      +

      To test an archive, right-click the archive file, + point to 7-Zip, and then click the Test archive + command item.

      +
      +
      Creating and updating files in an archive
      +
      +

      For creating or updating an archive file, right-click the file(s) or folder(s) you want to compress, + point to 7-Zip, and then click the Add to archive... command item. + Add to Archive Dialog will appear.

      +
      +
      + + + + diff --git a/GUI/help/fm/plugins/7-zip/style.css b/GUI/help/fm/plugins/7-zip/style.css new file mode 100644 index 0000000..13ebb79 --- /dev/null +++ b/GUI/help/fm/plugins/7-zip/style.css @@ -0,0 +1,232 @@ +body + { + padding: 0px 0px 0px 26px; + background: #ffffff; + color: #000000; + font-family: Verdana, Arial, Helvetica, sans-serif; + font-size: 80%; + } + +div + { + width: 90%; + border: 2px solid #999999; + padding: 4px 8px; + background: #cccccc; + } + +h1, h2, h3, h4 + { + font-family: Verdana, Arial, Helvetica, sans-serif; + margin-left: -26px; + } + +h1 + { + font-size: 145%; + margin-top: .5em; + margin-bottom: 1em; + } + +h2 + { + font-size: 130%; + margin-top: 1.5em; + margin-bottom: .6em; + } + +h3 + { + font-size: 115%; + margin-top: 1.5em; + margin-bottom: .6em; + } + +h4 + { + font-size: 100%; + margin-top: 1.5em; + margin-bottom: .6em; + } + +ul p, ol p, dl p + { + margin-left: 0em; + } + +p + { + margin-top: .6em; + margin-bottom: .6em; + } + +dl + { + /*margin-top: 0em; */ + } + +dt + { + margin-top: .76em; + margin-bottom: .5em; + font-weight: bold; + } + +dd + { + margin-top: .5em; + margin-bottom: .5em; + margin-left: 1.9em; + } + + +ul, ol + { + margin-top: .6em; + margin-bottom: 0em; + } + +ol + { + margin-left: 3.6em; + } + +ul + { + list-style-type: disc; + margin-left: 1.9em; + } + +li + { + margin-bottom: .6em; + } + +ul ol, ol ol + { + list-style-type: lower-alpha; + { + + /* +pre + { + margin-top: .6em; + margin-bottom: .6em; + } + */ + +pre,code + { + font: 100% Courier New, Courier, mono; + color: #000000; + cursor: text; + } + +pre.syntax + { + background: #dddddd; + padding: 2pt,4pt + } + +pre.syntax + { + color: #000000; + } + +pre.example + { + margin-left: 2.0em; + /*margin-top: 12.0em;*/ + /*margin-bottom: 1.0em;*/ + color: #C00000; + /*padding: 10pt,20pt*/ + } + +table + { + /* width: 90%; */ + background: #999999; + margin-top: .6em; + margin-bottom: .3em; + } + +th + { + padding: 4px 8px; + background: #cccccc; + text-align: left; + font-size: 80%; + vertical-align: bottom; + } + +th.cc + { + text-align: center; + vertical-align: middle; + } + +td + { + padding: 4px 8px; + background: #ffffff; + vertical-align: top; + font-size: 80%; + } + +td.cc + { + text-align: center; + vertical-align: middle; + } + + +blockquote + { + margin-left: 3.8em; + margin-right: 3.8em; + margin-top: .6em; + margin-bottom: .6em; + } + +a:link + { + color: #0066ff; + } + +a:visited + { + color: #996600; + } + +a:hover + { + color: #cc9900; + } + +a.parameter:link + { + color: #0066ff; + text-decoration:none; + } + +a.parameter:visited + { + text-decoration:none; + } + +div.footer + { + width: 100%; + border: none; + background: #ffffff; + margin-top: 18pt; + padding-bottom: 12pt; + color: #228B22; + text-align: center; + font-size: 70%; + } + +span.filename +{ + color: #F00000; +} diff --git a/GUI/help/fm/plugins/index.htm b/GUI/help/fm/plugins/index.htm new file mode 100644 index 0000000..3037d29 --- /dev/null +++ b/GUI/help/fm/plugins/index.htm @@ -0,0 +1,22 @@ + + + + + Plugins + + + + + +

      Plugins

      + +

      The 7-Zip File Manager can use internal and external plugins.

      + +

      Currently 7-Zip uses the following plugins:

      +
      +
      7-Zip
      +
      Plugin for manipulating archives.
      +
      + + + diff --git a/GUI/help/fm/plugins/style.css b/GUI/help/fm/plugins/style.css new file mode 100644 index 0000000..13ebb79 --- /dev/null +++ b/GUI/help/fm/plugins/style.css @@ -0,0 +1,232 @@ +body + { + padding: 0px 0px 0px 26px; + background: #ffffff; + color: #000000; + font-family: Verdana, Arial, Helvetica, sans-serif; + font-size: 80%; + } + +div + { + width: 90%; + border: 2px solid #999999; + padding: 4px 8px; + background: #cccccc; + } + +h1, h2, h3, h4 + { + font-family: Verdana, Arial, Helvetica, sans-serif; + margin-left: -26px; + } + +h1 + { + font-size: 145%; + margin-top: .5em; + margin-bottom: 1em; + } + +h2 + { + font-size: 130%; + margin-top: 1.5em; + margin-bottom: .6em; + } + +h3 + { + font-size: 115%; + margin-top: 1.5em; + margin-bottom: .6em; + } + +h4 + { + font-size: 100%; + margin-top: 1.5em; + margin-bottom: .6em; + } + +ul p, ol p, dl p + { + margin-left: 0em; + } + +p + { + margin-top: .6em; + margin-bottom: .6em; + } + +dl + { + /*margin-top: 0em; */ + } + +dt + { + margin-top: .76em; + margin-bottom: .5em; + font-weight: bold; + } + +dd + { + margin-top: .5em; + margin-bottom: .5em; + margin-left: 1.9em; + } + + +ul, ol + { + margin-top: .6em; + margin-bottom: 0em; + } + +ol + { + margin-left: 3.6em; + } + +ul + { + list-style-type: disc; + margin-left: 1.9em; + } + +li + { + margin-bottom: .6em; + } + +ul ol, ol ol + { + list-style-type: lower-alpha; + { + + /* +pre + { + margin-top: .6em; + margin-bottom: .6em; + } + */ + +pre,code + { + font: 100% Courier New, Courier, mono; + color: #000000; + cursor: text; + } + +pre.syntax + { + background: #dddddd; + padding: 2pt,4pt + } + +pre.syntax + { + color: #000000; + } + +pre.example + { + margin-left: 2.0em; + /*margin-top: 12.0em;*/ + /*margin-bottom: 1.0em;*/ + color: #C00000; + /*padding: 10pt,20pt*/ + } + +table + { + /* width: 90%; */ + background: #999999; + margin-top: .6em; + margin-bottom: .3em; + } + +th + { + padding: 4px 8px; + background: #cccccc; + text-align: left; + font-size: 80%; + vertical-align: bottom; + } + +th.cc + { + text-align: center; + vertical-align: middle; + } + +td + { + padding: 4px 8px; + background: #ffffff; + vertical-align: top; + font-size: 80%; + } + +td.cc + { + text-align: center; + vertical-align: middle; + } + + +blockquote + { + margin-left: 3.8em; + margin-right: 3.8em; + margin-top: .6em; + margin-bottom: .6em; + } + +a:link + { + color: #0066ff; + } + +a:visited + { + color: #996600; + } + +a:hover + { + color: #cc9900; + } + +a.parameter:link + { + color: #0066ff; + text-decoration:none; + } + +a.parameter:visited + { + text-decoration:none; + } + +div.footer + { + width: 100%; + border: none; + background: #ffffff; + margin-top: 18pt; + padding-bottom: 12pt; + color: #228B22; + text-align: center; + font-size: 70%; + } + +span.filename +{ + color: #F00000; +} diff --git a/GUI/help/fm/style.css b/GUI/help/fm/style.css new file mode 100644 index 0000000..13ebb79 --- /dev/null +++ b/GUI/help/fm/style.css @@ -0,0 +1,232 @@ +body + { + padding: 0px 0px 0px 26px; + background: #ffffff; + color: #000000; + font-family: Verdana, Arial, Helvetica, sans-serif; + font-size: 80%; + } + +div + { + width: 90%; + border: 2px solid #999999; + padding: 4px 8px; + background: #cccccc; + } + +h1, h2, h3, h4 + { + font-family: Verdana, Arial, Helvetica, sans-serif; + margin-left: -26px; + } + +h1 + { + font-size: 145%; + margin-top: .5em; + margin-bottom: 1em; + } + +h2 + { + font-size: 130%; + margin-top: 1.5em; + margin-bottom: .6em; + } + +h3 + { + font-size: 115%; + margin-top: 1.5em; + margin-bottom: .6em; + } + +h4 + { + font-size: 100%; + margin-top: 1.5em; + margin-bottom: .6em; + } + +ul p, ol p, dl p + { + margin-left: 0em; + } + +p + { + margin-top: .6em; + margin-bottom: .6em; + } + +dl + { + /*margin-top: 0em; */ + } + +dt + { + margin-top: .76em; + margin-bottom: .5em; + font-weight: bold; + } + +dd + { + margin-top: .5em; + margin-bottom: .5em; + margin-left: 1.9em; + } + + +ul, ol + { + margin-top: .6em; + margin-bottom: 0em; + } + +ol + { + margin-left: 3.6em; + } + +ul + { + list-style-type: disc; + margin-left: 1.9em; + } + +li + { + margin-bottom: .6em; + } + +ul ol, ol ol + { + list-style-type: lower-alpha; + { + + /* +pre + { + margin-top: .6em; + margin-bottom: .6em; + } + */ + +pre,code + { + font: 100% Courier New, Courier, mono; + color: #000000; + cursor: text; + } + +pre.syntax + { + background: #dddddd; + padding: 2pt,4pt + } + +pre.syntax + { + color: #000000; + } + +pre.example + { + margin-left: 2.0em; + /*margin-top: 12.0em;*/ + /*margin-bottom: 1.0em;*/ + color: #C00000; + /*padding: 10pt,20pt*/ + } + +table + { + /* width: 90%; */ + background: #999999; + margin-top: .6em; + margin-bottom: .3em; + } + +th + { + padding: 4px 8px; + background: #cccccc; + text-align: left; + font-size: 80%; + vertical-align: bottom; + } + +th.cc + { + text-align: center; + vertical-align: middle; + } + +td + { + padding: 4px 8px; + background: #ffffff; + vertical-align: top; + font-size: 80%; + } + +td.cc + { + text-align: center; + vertical-align: middle; + } + + +blockquote + { + margin-left: 3.8em; + margin-right: 3.8em; + margin-top: .6em; + margin-bottom: .6em; + } + +a:link + { + color: #0066ff; + } + +a:visited + { + color: #996600; + } + +a:hover + { + color: #cc9900; + } + +a.parameter:link + { + color: #0066ff; + text-decoration:none; + } + +a.parameter:visited + { + text-decoration:none; + } + +div.footer + { + width: 100%; + border: none; + background: #ffffff; + margin-top: 18pt; + padding-bottom: 12pt; + color: #228B22; + text-align: center; + font-size: 70%; + } + +span.filename +{ + color: #F00000; +} diff --git a/GUI/help/general/7z.htm b/GUI/help/general/7z.htm new file mode 100644 index 0000000..09bf30b --- /dev/null +++ b/GUI/help/general/7z.htm @@ -0,0 +1,175 @@ + + + + + 7z Format + + + + + +

      7z Format

      + +

      7z is a new archive format, providing a high compression ratio.

      + +

      The main features of the 7z format:

      +
        +
      • Open architecture +
      • High compression ratio +
      • Strong AES-256 encryption +
      • Ability to use any compression, conversion or encryption method +
      • Supports files with sizes up to 16000000000 GB +
      • Unicode file names +
      • Solid compression +
      • Archive headers compression +
      + +

      7z has an open architecture, so it can support any new compression methods.

      +The following methods currently are integrated into 7z:

      + + + + + + + + + + +
      Method Description
      LZMA Improved and optimized version of LZ77 algorithm
      LZMA2 LZMA-based compression method. It provides better multithreading support than LZMA
      PPMD Dmitry Shkarin's PPMdH with small changes
      BCJ Converter for 32-bit x86 executables
      BCJ2 Converter for 32-bit x86 executables
      BZip2 Standard BWT algorithm
      Deflate Standard LZ77-based algorithm
      + +

      LZMA is the default and general compression method of 7z format. +The main features of the LZMA method:

      +
        +
      • High compression ratio +
      • Variable dictionary size (up to 4 GB) +
      • Compression speed: about 1 MB/s on 2 GHz CPU +
      • Decompression speed: about 10-20 MB/s on 2 GHz CPU +
      • Small memory requirement for decompression (depends from dictionary size) +
      • Small code size for decompression: about 5 KB +
      • Supports multi-threading and P4's hyper-threading +
      + +

      The LZMA compression algorithm is very suitable for embedded applications. +If you want to use LZMA code, you can ask for consultation, custom code programming, +and required developer licenses at +

      www.7-zip.org/support.html

      +

      + +

      7-Zip also supports encryption with the AES-256 algorithm. +This algorithm uses a cipher key with length of 256 bits. To create the key, 7-Zip +uses a derivation function based on an SHA-256 hash algorithm. +A key derivation function produces a derived key from a text password defined by the user. +To increase the cost of an exhaustive search for passwords, 7-Zip uses a big number +of iterations to produce the cipher key from the text password.

      + +

      Tips for selecting password length

      + +

      Here is an estimate of the time required for an exhaustive +password search attack, when the password is a random +sequence of lowercase Latin letters.

      + +

      We suppose that one user can check 10 passwords per second and an +organization with a budget of about $1 billion can check 10 billion +passwords per second. We also +suppose that the processor in use doubles its performance every two years; +so, each additional Latin letter of a long password adds about +9 years to an exhaustive key search attack.

      + +

      The result is this estimate of the time to succeed in an attack:

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      Password LengthSingle User AttackOrganization Attack
      12 s1 s
      21 min1 s
      330 min1 s
      412 hours1 s
      514 days1 s
      61 year1 s
      710 years1 s
      819 years20 s
      926 years9 min
      1037 years4 hours
      1146 years4 days
      1255 years4 months
      1364 years4 years
      1473 years13 years
      1582 years22 years
      1691 years31 years
      17100 years40 years
      + + + diff --git a/GUI/help/general/faq.htm b/GUI/help/general/faq.htm new file mode 100644 index 0000000..0d88081 --- /dev/null +++ b/GUI/help/general/faq.htm @@ -0,0 +1,33 @@ + + + + + Frequently Asked Questions (FAQ) + + + + + +

      Frequently Asked Questions (FAQ)

      + +

      Can I use 7-Zip in a commercial organization?

      + +

      Yes, 7-Zip is free software. You can use it on any computer. You don't need to +register or pay for 7-Zip.

      + +

      Why doesn't the command line version add files that do not have any extension?

      + +

      You probably used a *.* wildcard. +7-Zip doesn't use the Windows system wildcard parser; so, 7-Zip doesn't follow +the archaic rule by which *.* matches every file name. +7-Zip treats *.* as matching only a file name with an extension. +To process all files, you must use a * wildcard or just omit the wildcard entirely.

      + +

      What about support for ACE archives?

      + +

      Support for ACE can be implemented, if the source code +of that format is made available, and if the source code license +will allow using that code.

      + + + diff --git a/GUI/help/general/formats.htm b/GUI/help/general/formats.htm new file mode 100644 index 0000000..6900ea2 --- /dev/null +++ b/GUI/help/general/formats.htm @@ -0,0 +1,241 @@ + + + + + Supported formats + + + + + +

      Supported formats

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      FormatCompressingDecompressingFilename Extensions
      7zXX7z
      XZXXxz
      ZIPXXzip
      GZIPXXgz gzip tgz
      BZIP2XXbz2 bzip2 tbz2 tbz
      TARXXtar
      WIMXXwim swm
      LZMAXlzma
      RARXrar
      CABXcab
      ARJXarj
      ZXz taz
      CPIOXcpio
      RPMXrpm
      DEBXdeb
      LZHXlzh lha
      SPLITX001 002 ...
      CHMXchm chw hxs
      ISOXiso
      UDFXiso
      COMPOUNDXmsi doc xls ppt
      DMGXdmg
      XARXxar
      HFSXhfs
      NSISXexe
      NTFSXntfs
      FATXfat
      VHDXvhd
      MBRXmbr
      SquashFSXsquashfs
      CramFSXcramfs
      + +

      ZIP

      + +

      7-Zip creates ZIP compatible archives. +7-Zip supports the following ZIP compression methods:

      +
        +
      • 0 - Store
      • +
      • 8 - Deflate
      • +
      • 9 - Deflate64
      • +
      • 12 - BZip2
      • +
      • 14 - LZMA
      • +
      • 98 - PPMd
      • +
      • 1 - Shrink (decompression only)
      • +
      • 6 - Implode (decompression only)
      • +
      + +

      Files compressed with other ZIP compression methods +can't be extracted by the current version of the 7-Zip. +But these supported methods are the most popular today, +and therefore 7-Zip can decompress most ZIP archives. +To extract files compressed with non-supported methods you must use some +other ZIP utility.

      + +

      7-Zip supports the Zip64 extension of ZIP format.

      + +

      The current version of 7-Zip doesn't support Zip multivolume archives.

      + +

      LZH

      + +

      7-Zip supports LZH archives only for listing, browsing and decompressing. +7-Zip supports -lh0-, -lh4-, -lh5-, -lh6- and -lh7- methods.

      + + + + diff --git a/GUI/help/general/index.htm b/GUI/help/general/index.htm new file mode 100644 index 0000000..a2089a5 --- /dev/null +++ b/GUI/help/general/index.htm @@ -0,0 +1,28 @@ + + + + + General Information + + + + + +

      General Information

      + +

      The main features of 7-Zip

      + + + +

      See Also

      + + + + diff --git a/GUI/help/general/license.htm b/GUI/help/general/license.htm new file mode 100644 index 0000000..35b4f9a --- /dev/null +++ b/GUI/help/general/license.htm @@ -0,0 +1,30 @@ + + + + + License for use and distribution + + + + + +

      License

      + +

      7-Zip Copyright (C) 1999-2010 Igor Pavlov.

      + +

      Licenses for files are:

      + +
    • 7z.dll: GNU LGPL + unRAR restriction +
    • All other files: GNU LGPL + + +

      The GNU LGPL + unRAR restriction means that you must follow both + GNU LGPL rules and unRAR restriction rules.

      + +

      Note: You can use 7-Zip on any computer, including a computer in a commercial + organization. You don't need to register or pay for 7-Zip.

      + +

      Read file License.txt for full information about license.

      + + + diff --git a/GUI/help/general/performance.htm b/GUI/help/general/performance.htm new file mode 100644 index 0000000..3476ce7 --- /dev/null +++ b/GUI/help/general/performance.htm @@ -0,0 +1,98 @@ + + + + + Performance + + + + + +

      Performance

      + +

      ZIP Format

      +

      Compression ratio results are very dependent upon the data used for +the tests. We compared 7-Zip with some of the leading +commercial archivers: PKZIP 2.04g, WinZip 7.0.

      + +

      FILE SET: The Canterbury Corpus (11 files totaling 2,810,784 bytes, +popular file set used to compression rates).

      + + + + + + + + + + + + + + + + + + + + + + +
      ArchiverCompressed sizeRatio
      7-Zip (zip format)676284100%
      PKZIP 2.04g -ex726047107%
      WinZip 7.0 (Max)731499108%
      + + +

      7z Format

      + +

      7z is the new archive format, providing a high compression ratio.

      + +

      FILE SET: The GIMP 1.2.4 for Windows after full installation +(127 subfolders, 1304 files totaling 27,128,826 bytes). +The GIMP is the GNU Image Manipulation Program. It can be downloaded from +www.gimp.org.

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      ArchiverCompressed sizeRatio
      7-Zip (7z format)5445402100%
      WinRAR 3.106004155110%
      WinAce 2.36242424115%
      CABARC 1.06455327119%
      7-Zip (zip format)9461621174%
      PKZIP 2.509842800181%
      + +

      GZIP Format

      + +

      7-Zip provides the best compression ratio for GZIP format. The compression ratio +is equal to its compression ratio for ZIP format (above).

      + + + diff --git a/GUI/help/general/style.css b/GUI/help/general/style.css new file mode 100644 index 0000000..13ebb79 --- /dev/null +++ b/GUI/help/general/style.css @@ -0,0 +1,232 @@ +body + { + padding: 0px 0px 0px 26px; + background: #ffffff; + color: #000000; + font-family: Verdana, Arial, Helvetica, sans-serif; + font-size: 80%; + } + +div + { + width: 90%; + border: 2px solid #999999; + padding: 4px 8px; + background: #cccccc; + } + +h1, h2, h3, h4 + { + font-family: Verdana, Arial, Helvetica, sans-serif; + margin-left: -26px; + } + +h1 + { + font-size: 145%; + margin-top: .5em; + margin-bottom: 1em; + } + +h2 + { + font-size: 130%; + margin-top: 1.5em; + margin-bottom: .6em; + } + +h3 + { + font-size: 115%; + margin-top: 1.5em; + margin-bottom: .6em; + } + +h4 + { + font-size: 100%; + margin-top: 1.5em; + margin-bottom: .6em; + } + +ul p, ol p, dl p + { + margin-left: 0em; + } + +p + { + margin-top: .6em; + margin-bottom: .6em; + } + +dl + { + /*margin-top: 0em; */ + } + +dt + { + margin-top: .76em; + margin-bottom: .5em; + font-weight: bold; + } + +dd + { + margin-top: .5em; + margin-bottom: .5em; + margin-left: 1.9em; + } + + +ul, ol + { + margin-top: .6em; + margin-bottom: 0em; + } + +ol + { + margin-left: 3.6em; + } + +ul + { + list-style-type: disc; + margin-left: 1.9em; + } + +li + { + margin-bottom: .6em; + } + +ul ol, ol ol + { + list-style-type: lower-alpha; + { + + /* +pre + { + margin-top: .6em; + margin-bottom: .6em; + } + */ + +pre,code + { + font: 100% Courier New, Courier, mono; + color: #000000; + cursor: text; + } + +pre.syntax + { + background: #dddddd; + padding: 2pt,4pt + } + +pre.syntax + { + color: #000000; + } + +pre.example + { + margin-left: 2.0em; + /*margin-top: 12.0em;*/ + /*margin-bottom: 1.0em;*/ + color: #C00000; + /*padding: 10pt,20pt*/ + } + +table + { + /* width: 90%; */ + background: #999999; + margin-top: .6em; + margin-bottom: .3em; + } + +th + { + padding: 4px 8px; + background: #cccccc; + text-align: left; + font-size: 80%; + vertical-align: bottom; + } + +th.cc + { + text-align: center; + vertical-align: middle; + } + +td + { + padding: 4px 8px; + background: #ffffff; + vertical-align: top; + font-size: 80%; + } + +td.cc + { + text-align: center; + vertical-align: middle; + } + + +blockquote + { + margin-left: 3.8em; + margin-right: 3.8em; + margin-top: .6em; + margin-bottom: .6em; + } + +a:link + { + color: #0066ff; + } + +a:visited + { + color: #996600; + } + +a:hover + { + color: #cc9900; + } + +a.parameter:link + { + color: #0066ff; + text-decoration:none; + } + +a.parameter:visited + { + text-decoration:none; + } + +div.footer + { + width: 100%; + border: none; + background: #ffffff; + margin-top: 18pt; + padding-bottom: 12pt; + color: #228B22; + text-align: center; + font-size: 70%; + } + +span.filename +{ + color: #F00000; +} diff --git a/GUI/help/general/thanks.htm b/GUI/help/general/thanks.htm new file mode 100644 index 0000000..8132138 --- /dev/null +++ b/GUI/help/general/thanks.htm @@ -0,0 +1,122 @@ + + + + + Thanks + + + + + +

      Thanks

      + +

      I would like to thank:

      +
        +
      • myspace from sf.net - for porting to Unix/Linux (p7zip), testing, bug fixing and more +
      • ARJ Software - for ARJ. +
      • Wei Dai - for SHA-256 code and Crypto++ Library +
      • Jeff Gilchrist - for compressing tests +
      • Brian Gladman - for AES code in previous versions of 7-Zip +
      • Szymon Grabowski - for some ideas +
      • Microsoft Corporation - for CAB/WIM formats descriptions, and WiX (Windows Installer XML) +
      • Nullsoft, Inc. and NSIS team - for NSIS (Nullsoft Scriptable Install System) +
      • Robert Martinez - 7-Zip Logo +
      • Markus Oberhumer and Laszlo Molnar - for UPX program +
      • Alexander Ratushnyak - for compressing tests +
      • Eugene Roshal - for RAR +
      • Matthew Russotto - for CHM/CAB format description +
      • Julian Seward - for BZip2 +
      • Eugene Shelwien - for some ideas and algorithms +
      • Dmitry Shkarin - for PPMd algorithm +
      • Yoshioka Tsuneo - for TAR32 program +
      • Vadim Yoockin - for compressing tests +
      • Bulat Ziganshin - for some ideas +
      • John Michael Williams - for help file corrections +
      • Apple Inc. - for HFS +
      • vu1tur(DMG2IMG) - for .DMG +
      • Yutaka Sawada - for hints to ZIP Strong Encryption format. +
      • NTFS-3G team - for NTFS. +
      • Phillip Lougher - for SquashFS. +
      + +

      Localization team:

      +
        +
      • Afrikaans - Petri Jooste +
      • Albanian - MIkel Hasko +
      • Arabic - Mohammad Deeb, Awadh A Al-Ghaamdi, Ahmad Gharbeia +
      • Armenian - Gevorg Papikyan, Hrant Ohanyan +
      • Asturian - Dinamiteru +
      • Azeri - F@rhad +
      • Basque - Inigo Salvador Azurmendi +
      • Belarusian - Kirill Gulyakevitch, Drive DRKA +
      • Breton - KAD-Korvigellou An Drouizig +
      • Bulgarian - Chavv, icobgr, Vassia Atanassova +
      • Catalan - Josep Casals, Gaizka Boleko, Marc Folch +
      • Chinese Simplified - Modern Tiger, kaZek, Hutu Li, Junior.Spirit +
      • Chinese Traditional - Leon Tseng, sec2, Jack Pang +
      • Croatian - Alan Simek, Hasan Osmanagic, Stjepan Treger +
      • Czech - Jaromir Veber, Milan Hruby, Michal Molhanec, Jiri Malak +
      • Danish - Jakob Schmidt, Kian Andersen, Jorgen Rasmussen +
      • Dutch - Bert van Velsen, Jeroen van der Weijde, Harm Hilvers, Jeroen Tulp +
      • Esperanto - Dmitri Gabinski +
      • Estonian - Kaupo Suviste +
      • Extremaduran - Miguel Angel +
      • Farsi - Edris Naderan, Mehdi Farhadi +
      • Finnish - Ari Ryynanen, Jarko P., Juhani Valtasalmi, T.Sakkara +
      • French - Nicolas Sierro, Philippe Berthault +
      • Friulian - Andrea Decorte +
      • Frisian - Berend Ytsma +
      • Galician - Xose Calvo +
      • Georgian - Dimitri Gogelia +
      • German - Soeren Finster, JAK-Software, Joachim Henke +
      • Greek - Vasileios Karakoidas, Jacaranda Bill, Vasilis Kosmidis +
      • Hebrew - Gal Brill, Jonathan Lahav, Peter G +
      • Hindi, Gujarati, Sanskrit - Vinayy Sharrma +
      • Hungarian - Jozsef Tamas Herczeg, Misy Nyilas +
      • Icelandic - bjossi +
      • Ido - iZoom +
      • Indonesian - M. Rofiq Setiawan, Frans Liando +
      • Italian - Leandro Spagnol, TJL73 +
      • Japanese - Komuro, Mick, 2chBBS-software, Stepanushkin Dmitry, Crus Mitsuaki +
      • Kazakh - Arslan & Arman Beisenov +
      • Korean - bzImage, ZannyLim, Hyeongil Kim (kurt Sawyer), Dong-yoon Han +
      • Kurdish - Rizyoye Xerzi +
      • Kurdish Sorani - Ara Bakhtiar, Ara Qadir +
      • Latvian - Armands Radzushka +
      • Lithuanian - Marius Navickas +
      • Macedonian - Gabriel Stojanoski +
      • Malay - Khairul Ridhwan Omar +
      • Marathi - Subodh Gaikwad +
      • Mongolian - Bayar +
      • Norwegian Bokmal - Christoffer Andersen, Kjetil Hjartnes, Robert Gronning +
      • Norwegian Nynorsk - Robert Gronning +
      • Pashto - Zabeeh khan +
      • Polish - Cienislaw, Pixel, F1xat, Lukasz Pastuszczak +
      • Portuguese Brazil - Francisco Jr, Fabricio Biazzotto, Atualizado por Felipe +
      • Portuguese Standard - Carlos Macao, Joao Alves, Rui Costa, Sergio Marques +
      • Punjabi Indian - Gurmeet Singh Kochar +
      • Romanian - Lucian Nan +
      • Serbian - Lazar, Ozzii +
      • Serbo-Croatian - Miodrag Jevremovicc +
      • Slovak - Tomas Tomasek, Pavel Devecka +
      • Slovenian - Jernej Simoncic, miles +
      • Spanish - Pablo Rodriguez, Jbc25, Guillermo Gabrielli, Miguel Angel, Sergi Medina +
      • Swedish - Andreas Nilsson, Christoffer Enqvist, Bernhard Eriksson +
      • Sinhala - G.S.N. Supun Budhajeewa +
      • Tamil - Ve Elanjelian +
      • Tatar - Amychok +
      • Tatarish - Albert Fazli +
      • Thai - Chayanon Ruamcharoen, Kom10 +
      • Turkish - X-FoRcE +
      • Ukrainian - Andrij Ilechko, Mokiy Mazaylo, Sergiy Gontaruk, Misha Padalka, Yurii Petrashko (YuriPet) +
      • Uyghur - Sahran +
      • Uzbek - Sherzod Mamatkulov +
      • Valencian - Tomas Miralles, Fernando Verdu +
      • Vietnamese - Tran Hong Ha, Le Vu Hoang +
      • Voro - Valdis Laan +
      • Welsh - Owain Lewis +
      + + + + diff --git a/GUI/help/start.htm b/GUI/help/start.htm new file mode 100644 index 0000000..bd82f23 --- /dev/null +++ b/GUI/help/start.htm @@ -0,0 +1,38 @@ + + + + + 7-Zip Start Page + + + + + +

      7-Zip

      + +

      Welcome to 7-Zip 9.20!

      +

      7-Zip is a file archiver with a high compression ratio.

      + +

      The documentation for 7-Zip includes:

      + + + +

      See Also

      + + + +
      + +

      Copyright (c) 1999-2010 Igor Pavlov

      +

      Web site: www.7-zip.org

      +

      Support: www.7-zip.org/support.html

      + + + diff --git a/GUI/help/style.css b/GUI/help/style.css new file mode 100644 index 0000000..13ebb79 --- /dev/null +++ b/GUI/help/style.css @@ -0,0 +1,232 @@ +body + { + padding: 0px 0px 0px 26px; + background: #ffffff; + color: #000000; + font-family: Verdana, Arial, Helvetica, sans-serif; + font-size: 80%; + } + +div + { + width: 90%; + border: 2px solid #999999; + padding: 4px 8px; + background: #cccccc; + } + +h1, h2, h3, h4 + { + font-family: Verdana, Arial, Helvetica, sans-serif; + margin-left: -26px; + } + +h1 + { + font-size: 145%; + margin-top: .5em; + margin-bottom: 1em; + } + +h2 + { + font-size: 130%; + margin-top: 1.5em; + margin-bottom: .6em; + } + +h3 + { + font-size: 115%; + margin-top: 1.5em; + margin-bottom: .6em; + } + +h4 + { + font-size: 100%; + margin-top: 1.5em; + margin-bottom: .6em; + } + +ul p, ol p, dl p + { + margin-left: 0em; + } + +p + { + margin-top: .6em; + margin-bottom: .6em; + } + +dl + { + /*margin-top: 0em; */ + } + +dt + { + margin-top: .76em; + margin-bottom: .5em; + font-weight: bold; + } + +dd + { + margin-top: .5em; + margin-bottom: .5em; + margin-left: 1.9em; + } + + +ul, ol + { + margin-top: .6em; + margin-bottom: 0em; + } + +ol + { + margin-left: 3.6em; + } + +ul + { + list-style-type: disc; + margin-left: 1.9em; + } + +li + { + margin-bottom: .6em; + } + +ul ol, ol ol + { + list-style-type: lower-alpha; + { + + /* +pre + { + margin-top: .6em; + margin-bottom: .6em; + } + */ + +pre,code + { + font: 100% Courier New, Courier, mono; + color: #000000; + cursor: text; + } + +pre.syntax + { + background: #dddddd; + padding: 2pt,4pt + } + +pre.syntax + { + color: #000000; + } + +pre.example + { + margin-left: 2.0em; + /*margin-top: 12.0em;*/ + /*margin-bottom: 1.0em;*/ + color: #C00000; + /*padding: 10pt,20pt*/ + } + +table + { + /* width: 90%; */ + background: #999999; + margin-top: .6em; + margin-bottom: .3em; + } + +th + { + padding: 4px 8px; + background: #cccccc; + text-align: left; + font-size: 80%; + vertical-align: bottom; + } + +th.cc + { + text-align: center; + vertical-align: middle; + } + +td + { + padding: 4px 8px; + background: #ffffff; + vertical-align: top; + font-size: 80%; + } + +td.cc + { + text-align: center; + vertical-align: middle; + } + + +blockquote + { + margin-left: 3.8em; + margin-right: 3.8em; + margin-top: .6em; + margin-bottom: .6em; + } + +a:link + { + color: #0066ff; + } + +a:visited + { + color: #996600; + } + +a:hover + { + color: #cc9900; + } + +a.parameter:link + { + color: #0066ff; + text-decoration:none; + } + +a.parameter:visited + { + text-decoration:none; + } + +div.footer + { + width: 100%; + border: none; + background: #ffffff; + margin-top: 18pt; + padding-bottom: 12pt; + color: #228B22; + text-align: center; + font-size: 70%; + } + +span.filename +{ + color: #F00000; +} diff --git a/GUI/kde3/p7zip_compress.desktop b/GUI/kde3/p7zip_compress.desktop new file mode 100644 index 0000000..9010fbd --- /dev/null +++ b/GUI/kde3/p7zip_compress.desktop @@ -0,0 +1,47 @@ +[Desktop Entry] +ServiceTypes=inode/directory +Actions=CompressDialog;Compress7z;CompressZip;extractHere;ExtractSubdir;ExtractTo;test;Benchmark +X-KDE-Priority=TopLevel +X-KDE-Submenu=7-Zip +X-KDE-Icon=p7zip + +[Desktop Action CompressDialog] +Name=Add to Archive ... +Icon=p7zip +Exec=p7zipForFilemanager ad -t7z %U + +[Desktop Action Compress7z] +Name=Add to 7z Archive +Icon=p7zip +Exec=p7zipForFilemanager a -t7z %U + +[Desktop Action CompressZip] +Name=Add to Zip Archive +Icon=p7zip +Exec=p7zipForFilemanager a -tzip %U + +[Desktop Action extractHere] +Name=Extract Here +Exec=p7zipForFilemanager x %U +Icon=p7zip + +[Desktop Action ExtractSubdir] +Name=Extract to subdirectory +Icon=p7zip +Exec=p7zipForFilemanager xs %U + +[Desktop Action ExtractTo] +Name=Extract to ... +Icon=p7zip +Exec=p7zipForFilemanager xd %U + +[Desktop Action test] +Name=Test Archive +Exec=p7zipForFilemanager t %U +Icon=p7zip + +[Desktop Action Benchmark] +Name=Benchmark +Icon=p7zip +Exec=p7zipForFilemanager b + diff --git a/GUI/kde3/p7zip_compress2.desktop b/GUI/kde3/p7zip_compress2.desktop new file mode 100644 index 0000000..f8ae99e --- /dev/null +++ b/GUI/kde3/p7zip_compress2.desktop @@ -0,0 +1,47 @@ +[Desktop Entry] +ServiceTypes=all/allfiles +Actions=CompressDialog;Compress7z;CompressZip;extractHere;ExtractSubdir;ExtractTo;test;Benchmark +X-KDE-Priority=TopLevel +X-KDE-Submenu=7-Zip +X-KDE-Icon=p7zip + +[Desktop Action CompressDialog] +Name=Add to Archive ... +Icon=p7zip +Exec=p7zipForFilemanager ad -t7z %U + +[Desktop Action Compress7z] +Name=Add to 7z Archive +Icon=p7zip +Exec=p7zipForFilemanager a -t7z %U + +[Desktop Action CompressZip] +Name=Add to Zip Archive +Icon=p7zip +Exec=p7zipForFilemanager a -tzip %U + +[Desktop Action extractHere] +Name=Extract Here +Exec=p7zipForFilemanager x %U +Icon=p7zip + +[Desktop Action ExtractSubdir] +Name=Extract to subdirectory +Icon=p7zip +Exec=p7zipForFilemanager xs %U + +[Desktop Action ExtractTo] +Name=Extract to ... +Icon=p7zip +Exec=p7zipForFilemanager xd %U + +[Desktop Action test] +Name=Test Archive +Exec=p7zipForFilemanager t %U +Icon=p7zip + +[Desktop Action Benchmark] +Name=Benchmark +Icon=p7zip +Exec=p7zipForFilemanager b + diff --git a/GUI/kde3/p7zip_extract.desktop b/GUI/kde3/p7zip_extract.desktop new file mode 100644 index 0000000..9038c76 --- /dev/null +++ b/GUI/kde3/p7zip_extract.desktop @@ -0,0 +1,10 @@ +[Desktop Entry] +X-SuSE-translate=true +Encoding=UTF-8 +ServiceTypes=application/x-gzip,application/x-lha,application/x-tar,application/x-tgz,application/x-tbz,application/x-tbz2,application/x-zip,application/x-bzip,application/x-tzo,application/x-lzop,application/x-rar,application/x-rar-compressed,application/x-zoo,application/x-tarz,application/x-archive,application/x-bzip2,application/x-jar,application/x-deb,application/x-ace,application/x-7z,application/x-arc,application/x-arj,application/x-compress,application/x-cpio,application/x-pak +Actions=extractHere + +[Desktop Action extractHere] +Name=Extract Here with 7-zip +Exec=p7zipForFilemanager x %U +Icon=p7zip diff --git a/GUI/kde3/p7zip_extract_subdir.desktop b/GUI/kde3/p7zip_extract_subdir.desktop new file mode 100644 index 0000000..1800fa0 --- /dev/null +++ b/GUI/kde3/p7zip_extract_subdir.desktop @@ -0,0 +1,10 @@ +[Desktop Entry] +X-SuSE-translate=true +Encoding=UTF-8 +ServiceTypes=application/x-gzip,application/x-lha,application/x-tar,application/x-tgz,application/x-tbz,application/x-tbz2,application/x-zip,application/x-bzip,application/x-tzo,application/x-lzop,application/x-rar,application/x-rar-compressed,application/x-zoo,application/x-tarz,application/x-archive,application/x-bzip2,application/x-jar,application/x-deb,application/x-ace,application/x-7z,application/x-arc,application/x-arj,application/x-compress,application/x-cpio,application/x-pak +Actions=ExtractSubdir + +[Desktop Action ExtractSubdir] +Name=Extract to subdirectory with 7-Zip +Icon=p7zip +Exec=p7zipForFilemanager xs %U diff --git a/GUI/kde3/p7zip_extract_to.desktop b/GUI/kde3/p7zip_extract_to.desktop new file mode 100644 index 0000000..bf13ec0 --- /dev/null +++ b/GUI/kde3/p7zip_extract_to.desktop @@ -0,0 +1,10 @@ +[Desktop Entry] +X-SuSE-translate=true +Encoding=UTF-8 +ServiceTypes=application/x-gzip,application/x-lha,application/x-tar,application/x-tgz,application/x-tbz,application/x-tbz2,application/x-zip,application/x-bzip,application/x-tzo,application/x-lzop,application/x-rar,application/x-rar-compressed,application/x-zoo,application/x-tarz,application/x-archive,application/x-bzip2,application/x-jar,application/x-deb,application/x-ace,application/x-7z,application/x-arc,application/x-arj,application/x-compress,application/x-cpio,application/x-pak +Actions=ExtractTo + +[Desktop Action ExtractTo] +Name=Extract to ... with 7-Zip +Icon=p7zip +Exec=p7zipForFilemanager xd %U diff --git a/GUI/kde3/p7zip_test.desktop b/GUI/kde3/p7zip_test.desktop new file mode 100644 index 0000000..2c17acb --- /dev/null +++ b/GUI/kde3/p7zip_test.desktop @@ -0,0 +1,10 @@ +[Desktop Entry] +X-SuSE-translate=true +Encoding=UTF-8 +ServiceTypes=application/x-gzip,application/x-lha,application/x-tar,application/x-tgz,application/x-tbz,application/x-tbz2,application/x-zip,application/x-bzip,application/x-tzo,application/x-lzop,application/x-rar,application/x-rar-compressed,application/x-zoo,application/x-tarz,application/x-archive,application/x-bzip2,application/x-jar,application/x-deb,application/x-ace,application/x-7z,application/x-arc,application/x-arj,application/x-compress,application/x-cpio,application/x-pak +Actions=test + +[Desktop Action test] +Name=Test with 7-zip +Exec=p7zipForFilemanager t %U +Icon=p7zip diff --git a/GUI/kde3/readme.txt b/GUI/kde3/readme.txt new file mode 100755 index 0000000..4d56ce1 --- /dev/null +++ b/GUI/kde3/readme.txt @@ -0,0 +1,75 @@ + + 7zG + === + + + +1) building +----------- + + make test_7zG : build bin/7zG and make some tests + + +2) installing 7zG (tested on Ubuntu 8.04) +----------------- + + copy the method used for 7z ! + + - find where 7z is installed + type 7z + + - copy the 7z shell + cp /usr/bin/7z /usr/bin/7zG + + - edit /usr/bin/7zG to replace 7z with 7zG + + - chmod 555 /usr/bin/7zG + + - copy bin/7zG according to what is written in /usr/bin/7zG + cp bin/7zG /usr/lib/p7zip/7zG + chmod 555 /usr/lib/p7zip/7zG + + - To have access to the Lang files, copy Lang + cp -r GUI/Lang /usr/lib/p7zip/Lang + find /usr/lib/p7zip/Lang -type d -exec chmod 555 {} \; + find /usr/lib/p7zip/Lang -type f -exec chmod 444 {} \; + + + - To have access to the help, copy help + cp -r GUI/help /usr/lib/p7zip/help + find /usr/lib/p7zip/help -type d -exec chmod 555 {} \; + find /usr/lib/p7zip/help -type f -exec chmod 444 {} \; + + - copy p7zipForFilemanager + cp GUI/p7zipForFilemanager /usr/bin/p7zipForFilemanager + chmod 555 /usr/bin/p7zipForFilemanager + + - copy the 7-zip icon + cp GUI/p7zip_16_ok.png /usr/share/icons/hicolor/16x16/apps/p7zip.png + chmod 444 /usr/share/icons/hicolor/16x16/apps/p7zip.png + +3) installing the context menu for KDE (dolphin) (tested on Ubuntu 8.04) +-------------------------------------------------- + only for the user : + mkdir -p ~/.kde/share/apps/d3lphin/servicemenus/ + cp GUI/kde/*.desktop ~/.kde/share/apps/d3lphin/servicemenus/ + + + for all: + cp GUI/kde/*.desktop /usr/share/apps/d3lphin/servicemenus/ + + +4) installing the context menu for KDE (konqueror) (tested on Ubuntu 8.04) +---------------------------------------------------- + only for the user : + mkdir -p ~/.kde/share/apps/konqueror/servicemenus/ + cp GUI/kde/*.desktop ~/.kde/share/apps/konqueror/servicemenus/ + + for all: + cp GUI/kde/*.desktop /usr/share/apps/konqueror/servicemenus/ + + +5) installing the context menu for gnome (nautilus) +----------------------------------------------------- + don't know how to add a context menu in nautilus :( + diff --git a/GUI/kde4/p7zip_compress.desktop b/GUI/kde4/p7zip_compress.desktop new file mode 100644 index 0000000..e7e06c8 --- /dev/null +++ b/GUI/kde4/p7zip_compress.desktop @@ -0,0 +1,50 @@ +[Desktop Entry] +Type=Service +ServiceTypes=inode/directory +MimeType=all/all; +Actions=CompressDialog;Compress7z;CompressZip;extractHere;ExtractSubdir;ExtractTo;test;Benchmark; +X-KDE-Priority=TopLevel +X-KDE-Submenu=7-Zip +X-KDE-Icon=p7zip +X-KDE-ServiceTypes=KonqPopupMenu/Plugin,inode/directory + +[Desktop Action CompressDialog] +Name=Add to Archive ... +Icon=p7zip +Exec=p7zipForFilemanager ad -t7z %U + +[Desktop Action Compress7z] +Name=Add to 7z Archive +Icon=p7zip +Exec=p7zipForFilemanager a -t7z %U + +[Desktop Action CompressZip] +Name=Add to Zip Archive +Icon=p7zip +Exec=p7zipForFilemanager a -tzip %U + +[Desktop Action extractHere] +Name=Extract Here +Exec=p7zipForFilemanager x %U +Icon=p7zip + +[Desktop Action ExtractSubdir] +Name=Extract to subdirectory +Icon=p7zip +Exec=p7zipForFilemanager xs %U + +[Desktop Action ExtractTo] +Name=Extract to ... +Icon=p7zip +Exec=p7zipForFilemanager xd %U + +[Desktop Action test] +Name=Test Archive +Exec=p7zipForFilemanager t %U +Icon=p7zip + +[Desktop Action Benchmark] +Name=Benchmark +Icon=p7zip +Exec=p7zipForFilemanager b + diff --git a/GUI/kde4/p7zip_compress2.desktop b/GUI/kde4/p7zip_compress2.desktop new file mode 100644 index 0000000..ea6104a --- /dev/null +++ b/GUI/kde4/p7zip_compress2.desktop @@ -0,0 +1,50 @@ +[Desktop Entry] +Type=Service +ServiceTypes=all/allfiles +MimeType=all/all; +Actions=CompressDialog;Compress7z;CompressZip;extractHere;ExtractSubdir;ExtractTo;test;Benchmark; +X-KDE-Priority=TopLevel +X-KDE-Submenu=7-Zip +X-KDE-Icon=p7zip +X-KDE-ServiceTypes=KonqPopupMenu/Plugin + +[Desktop Action CompressDialog] +Name=Add to Archive ... +Icon=p7zip +Exec=p7zipForFilemanager ad -t7z %U + +[Desktop Action Compress7z] +Name=Add to 7z Archive +Icon=p7zip +Exec=p7zipForFilemanager a -t7z %U + +[Desktop Action CompressZip] +Name=Add to Zip Archive +Icon=p7zip +Exec=p7zipForFilemanager a -tzip %U + +[Desktop Action extractHere] +Name=Extract Here +Exec=p7zipForFilemanager x %U +Icon=p7zip + +[Desktop Action ExtractSubdir] +Name=Extract to subdirectory +Icon=p7zip +Exec=p7zipForFilemanager xs %U + +[Desktop Action ExtractTo] +Name=Extract to ... +Icon=p7zip +Exec=p7zipForFilemanager xd %U + +[Desktop Action test] +Name=Test Archive +Exec=p7zipForFilemanager t %U +Icon=p7zip + +[Desktop Action Benchmark] +Name=Benchmark +Icon=p7zip +Exec=p7zipForFilemanager b + diff --git a/GUI/kde4/p7zip_extract.desktop b/GUI/kde4/p7zip_extract.desktop new file mode 100644 index 0000000..6ab742c --- /dev/null +++ b/GUI/kde4/p7zip_extract.desktop @@ -0,0 +1,10 @@ +[Desktop Entry] +ServiceTypes=application/x-gzip,application/x-lha,application/x-tar,application/x-tgz,application/x-tbz,application/x-tbz2,application/x-zip,application/x-bzip,application/x-tzo,application/x-lzop,application/x-rar,application/x-rar-compressed,application/x-zoo,application/x-tarz,application/x-archive,application/x-bzip2,application/x-jar,application/x-deb,application/x-ace,application/x-7z,application/x-arc,application/x-arj,application/x-compress,application/x-cpio,application/x-pak +Actions=extractHere; +Type=Service +X-KDE-ServiceTypes=KonqPopupMenu/Plugin + +[Desktop Action extractHere] +Name=Extract Here with 7-zip +Exec=p7zipForFilemanager x %U +Icon=p7zip diff --git a/GUI/kde4/p7zip_extract_subdir.desktop b/GUI/kde4/p7zip_extract_subdir.desktop new file mode 100644 index 0000000..6408fe3 --- /dev/null +++ b/GUI/kde4/p7zip_extract_subdir.desktop @@ -0,0 +1,10 @@ +[Desktop Entry] +ServiceTypes=application/x-gzip,application/x-lha,application/x-tar,application/x-tgz,application/x-tbz,application/x-tbz2,application/x-zip,application/x-bzip,application/x-tzo,application/x-lzop,application/x-rar,application/x-rar-compressed,application/x-zoo,application/x-tarz,application/x-archive,application/x-bzip2,application/x-jar,application/x-deb,application/x-ace,application/x-7z,application/x-arc,application/x-arj,application/x-compress,application/x-cpio,application/x-pak +Actions=ExtractSubdir; +Type=Service +X-KDE-ServiceTypes=KonqPopupMenu/Plugin + +[Desktop Action ExtractSubdir] +Name=Extract to subdirectory with 7-Zip +Icon=p7zip +Exec=p7zipForFilemanager xs %U diff --git a/GUI/kde4/p7zip_extract_to.desktop b/GUI/kde4/p7zip_extract_to.desktop new file mode 100644 index 0000000..8f441df --- /dev/null +++ b/GUI/kde4/p7zip_extract_to.desktop @@ -0,0 +1,10 @@ +[Desktop Entry] +ServiceTypes=application/x-gzip,application/x-lha,application/x-tar,application/x-tgz,application/x-tbz,application/x-tbz2,application/x-zip,application/x-bzip,application/x-tzo,application/x-lzop,application/x-rar,application/x-rar-compressed,application/x-zoo,application/x-tarz,application/x-archive,application/x-bzip2,application/x-jar,application/x-deb,application/x-ace,application/x-7z,application/x-arc,application/x-arj,application/x-compress,application/x-cpio,application/x-pak +Actions=ExtractTo; +Type=Service +X-KDE-ServiceTypes=KonqPopupMenu/Plugin + +[Desktop Action ExtractTo] +Name=Extract to ... with 7-Zip +Icon=p7zip +Exec=p7zipForFilemanager xd %U diff --git a/GUI/kde4/p7zip_test.desktop b/GUI/kde4/p7zip_test.desktop new file mode 100644 index 0000000..cfb3f38 --- /dev/null +++ b/GUI/kde4/p7zip_test.desktop @@ -0,0 +1,10 @@ +[Desktop Entry] +ServiceTypes=application/x-gzip,application/x-lha,application/x-tar,application/x-tgz,application/x-tbz,application/x-tbz2,application/x-zip,application/x-bzip,application/x-tzo,application/x-lzop,application/x-rar,application/x-rar-compressed,application/x-zoo,application/x-tarz,application/x-archive,application/x-bzip2,application/x-jar,application/x-deb,application/x-ace,application/x-7z,application/x-arc,application/x-arj,application/x-compress,application/x-cpio,application/x-pak +Actions=test; +Type=Service +X-KDE-ServiceTypes=KonqPopupMenu/Plugin + +[Desktop Action test] +Name=Test with 7-zip +Exec=p7zipForFilemanager t %U +Icon=p7zip diff --git a/GUI/kde4/readme.txt b/GUI/kde4/readme.txt new file mode 100755 index 0000000..ad25ee4 --- /dev/null +++ b/GUI/kde4/readme.txt @@ -0,0 +1,60 @@ + + 7zG + === + + + +1) building +----------- + + make test_7zG : build bin/7zG and make some tests + + +2) installing 7zG (tested on Ubuntu 10.10) +----------------- + + copy the method used for 7z ! + + - find where 7z is installed + type 7z + + - copy the 7z shell + cp /usr/bin/7z /usr/bin/7zG + + - edit /usr/bin/7zG to replace 7z with 7zG + + - chmod 555 /usr/bin/7zG + + - copy bin/7zG according to what is written in /usr/bin/7zG + cp bin/7zG /usr/lib/p7zip/7zG + chmod 555 /usr/lib/p7zip/7zG + + - To have access to the Lang files, copy Lang + cp -r GUI/Lang /usr/lib/p7zip/Lang + find /usr/lib/p7zip/Lang -type d -exec chmod 555 {} \; + find /usr/lib/p7zip/Lang -type f -exec chmod 444 {} \; + + + - To have access to the help, copy help + cp -r GUI/help /usr/lib/p7zip/help + find /usr/lib/p7zip/help -type d -exec chmod 555 {} \; + find /usr/lib/p7zip/help -type f -exec chmod 444 {} \; + + - copy p7zipForFilemanager + cp GUI/p7zipForFilemanager /usr/bin/p7zipForFilemanager + chmod 555 /usr/bin/p7zipForFilemanager + + - copy the 7-zip icon + cp GUI/p7zip_16_ok.png /usr/share/icons/hicolor/16x16/apps/p7zip.png + chmod 444 /usr/share/icons/hicolor/16x16/apps/p7zip.png + +3) installing the context menu for KDE (dolphin or konqueror) (tested on Ubuntu 10.10) +-------------------------------------------------- + for all: + cp GUI/kde4/*.desktop /usr/share/kde4/services/ServiceMenus/ + + +5) installing the context menu for gnome (nautilus) +----------------------------------------------------- + don't know how to add a context menu in nautilus :( + diff --git a/GUI/p7zipForFilemanager b/GUI/p7zipForFilemanager new file mode 100755 index 0000000..39e308f --- /dev/null +++ b/GUI/p7zipForFilemanager @@ -0,0 +1,108 @@ +#! /bin/sh + +# program t archive1.7z ... archiveN.7z +# program x directory_out archive1.7z ... archiveN.7z +# program xd directory_out archive1.7z ... archiveN.7z +# program a -t7z current_directory file1 ... fileN +# program ad -tzip current_directory file1 ... fileN + +P7ZIP="7zG" + +list=/tmp/p7zip.list.$$ +rm -f ${list} + +trace=/tmp/7zG1.txt +rm -f ${trace} + +for file in "$@" +do + echo "arg=${file}" >> ${trace} +done + +cmd="$1" +shift + +flag_ad="" +flag_type="" + +case "${cmd}" in +b|t) + ;; +x|xs) + ;; +xd) + flag_ad="-ad" + ;; +a) + flag_type="$1" + shift + ;; +ad) + flag_type="$1" + shift + flag_ad="-ad" + ;; +*) + echo "Unknown command \"${cmd}\"" + exit 1 + ;; +esac + +#ext=".7z" +#if [ "${flag_type}" = "-tzip" ] +#then +# ext=".zip" +#fi + +argn="$#" +file1="$1" +dir1=`dirname "${file1}"` +file2="$2" +echo "argn=${argn}" >> ${trace} +echo "flag_type=${flag_type}" >> ${trace} +echo "file1=${file1}" >> ${trace} +echo "dir1=${dir1}" >> ${trace} +echo "file2=${file2}" >> ${trace} + +if [ "a${dir1}" != "a" ] +then + cd "${dir1}" +fi + +for file in "$@" +do + file=`basename "${file}"` + echo ${file} >> ${list} + echo "list=${file}" >> ${trace} +done + +case "${cmd}" in +b) + ${P7ZIP} b + ;; +t) + ${P7ZIP} t -an -ai@${list} + ;; +x|xd) + ${P7ZIP} x ${flag_ad} -an -ai@${list} + ;; +xs) + dir_out=`dirname "${file1}"` + ${P7ZIP} x ${flag_ad} -o"*" -an -ai@${list} + ;; +a|ad) + if [ ${argn} -eq "1" ] + then + file=`basename "${file1}"`${ext} + echo "archive_out=${file}" >> ${trace} + ${P7ZIP} a ${flag_ad} ${flag_type} -i@${list} ${flag} -- "${file}" + else + file=`basename "${dir1}"`${ext} + echo "archive_out=${file}" >> ${trace} + ${P7ZIP} a ${flag_ad} ${flag_type} -i@${list} ${flag} -- "${file}" + fi + ;; +esac + +rm -f ${list} + diff --git a/GUI/p7zip_16.icns b/GUI/p7zip_16.icns new file mode 100644 index 0000000..bb977fc Binary files /dev/null and b/GUI/p7zip_16.icns differ diff --git a/GUI/p7zip_16.png b/GUI/p7zip_16.png new file mode 100644 index 0000000..3ecad48 Binary files /dev/null and b/GUI/p7zip_16.png differ diff --git a/GUI/p7zip_16_ok.png b/GUI/p7zip_16_ok.png new file mode 100644 index 0000000..4960e67 Binary files /dev/null and b/GUI/p7zip_16_ok.png differ diff --git a/GUI/p7zip_32.png b/GUI/p7zip_32.png new file mode 100644 index 0000000..a7a7a12 Binary files /dev/null and b/GUI/p7zip_32.png differ diff --git a/GUI/p7zip_32.xpm b/GUI/p7zip_32.xpm new file mode 100644 index 0000000..3a3213c --- /dev/null +++ b/GUI/p7zip_32.xpm @@ -0,0 +1,38 @@ +/* XPM */ +static char * p7zip_32_xpm[] = { +"32 32 3 1", +" c None", +". c #000000", +"+ c #FFFFFF", +" ", +" ", +" ", +" ", +"................................", +"................................", +"..++++++++++++++++++++++++++++..", +"..++++++++++++++++++++++++++++..", +"..++++++++++++++++++++++++++++..", +"..+++.............++++++++++++..", +"..+++.............++++++++++++..", +"..+++.............++++++++++++..", +"..+++..+++++++++..++++++++++++..", +"..+++..+++++++++..++++++++++++..", +"..+++........+++..++.......+++..", +"..+++.......+++...++.......+++..", +"..+++......+++....++++++...+++..", +"..+++.....+++.....+++++...++++..", +"..+++.....+++.....++++...+++++..", +"..+++.....+++.....+++...++++++..", +"..+++.....+++.....++...+++++++..", +"..+++.....+++.....++...+++++++..", +"..+++.............++.......+++..", +"..+++.............++.......+++..", +"..++++++++++++++++++++++++++++..", +"..++++++++++++++++++++++++++++..", +"..++++++++++++++++++++++++++++..", +"................................", +"................................", +" ", +" ", +" "}; diff --git a/README b/README new file mode 100644 index 0000000..f5cb312 --- /dev/null +++ b/README @@ -0,0 +1,358 @@ + p7zip 9.20 + ========== + +Homepage : http://p7zip.sourceforge.net/ + +p7zip is a port of the Windows programs 7z.exe and 7za.exe provided by 7-zip. + +7-zip is a file archiver with the highest compression ratio. +Homepage : www.7-zip.org + + 7z uses plugins (7z.so and Codecs/Rar29.so) to handle archives. + 7za is a stand-alone executable. + 7za handles less archive formats than 7z.exe. + 7zr is a light stand-alone executable that supports only 7z/LZMA/BCJ/BCJ2. + +NEW: + 7zG : see GUI/readme.txt + +CAUTION : +--------- + +- FIRST : DO NOT USE the 7-zip format for backup purpose on Linux/Unix because : + - 7-zip does not store the owner/group of the file + + On Linux/Unix, in order to backup directories you must use tar ! + to backup a directory : tar cf - directory | 7za a -si directory.tar.7z + to restore your backup : 7za x -so directory.tar.7z | tar xf - + +- if you want to send files and directories (not the owner of file) + to others Unix/MacOS/Windows users, you can use the 7-zip format. + + example : 7za a directory.7z directory + + do not use "-r" because this flag does not do what you think + do not use directory/* because of ".*" files + (example : "directory/*" does not match "directory/.profile") + + +BUILD : +------- + + If you have downloaded the "bin" package, + use directly the program bin/7za. + (tested on Redhat 9.0, Fedora 2, Mandrake 10.0, Debian 3.0) + As the program is statically linked, its should run on many x86 or amd64 linux. + + If you have downloaded the "source" package, + + According to your OS, copy makefile.linux, + makefile.freebsd, makefile.cygwin, ... + over makefile.machine + + Example : building 7za, 7z (with its plugins), 7zr and Client7z and passing the internal tests + cp makefile.linux_x86_asm_gcc_4 makefile.linux + make all_test + + + If you want to make a parallel build on a 4 cpu machine : make -j 4 TARGET + + If you have trouble, try : make -f makefile.oldmake TARGET + + make depend : to rebuild the makefile.depend + make clean : to clean all directories + make : to build bin/7za + make sfx : to build bin/7zCon.sfx (7za can now create SFX archive) + make 7z : to build bin/7z and its plugins : + - "bin/7z.so" (GNU LGPL + AES code license) + - "bin/Codecs/Rar29.so" (GNU LGPL + unRAR restriction) + make 7zr : to build bin/7zr + make all : to build bin/7za and bin/7zCon.sfx + make all2 : to build bin/7za, bin/7z (with its plugins) and bin/7zCon.sfx + make all3 : to build bin/7za, bin/7z (with its plugins), bin/7zr and bin/7zCon.sfx + make test : to test bin/7za (extracting, archiving, password ...) + make test_7z : to test bin/7z (extracting, archiving, password ...) + make test_7zr : to test bin/7zr (extracting, archiving, ...) + + make 7zG : to build bin/7zG and its plugins : + - "bin/7z.so" (GNU LGPL + AES code license) + - "bin/Codecs/Rar29.so" (GNU LGPL + unRAR restriction) + make test_7zG : to test bin/7zG (extracting, archiving, ...) + + + this procedure has been tested on : + - x86 CPU : + Linux - Debian 3.0 Stable + Linux - Ubuntu 10.10 + MacOS 10.6.6 + + - AMD64 CPU : + Linux - Ubuntu 10.10 + MacOS 10.6.6 + + - sparc CPU : + Solaris 8 (sparc) with gcc 2.95.2 + + - powerpc CPU : + MacOS X 10.4 (ppc) + + Some older versions of p7zip were tested : + - x86 CPU : + DOS - (built with DJGPP, see http://blairdude.googlepages.com/p7zip ) + Linux - Redhat 9.0 Standart + Linux - Fedora 2 (Redhat) (gcc 3.3.3 and gcc-3.4.1 with + stack-smashing protector from www.trl.ibm.com/projects/security/ssp/) + Linux - Mandrake 10.0 Official + Linux - Ubuntu 8.04 + FreeBSD 5.2.1 (gcc 3.3.3) + MacOS 10.4.8 + NetBSD + CYGWIN_NT-5.1 1.5.9(0.112/4/2) 2004-03-18 23:05 i686 Cygwin + Solaris 9 (x86) with gcc 3.3.2 + Solaris 10 (x86) + + - alpha CPU : + Linux - Debian 3.0 (alpha) with gcc 2.95.4 + + - AMD64 CPU : + Linux - SuSE 8 ES (AMD64 Opteron) with gcc 3.2.2 + Linux - Fedora 4 (AMD64 Turion) with gcc 4.0.1 + Linux - Ubuntu 8.10 + + - Itanium CPU : + HP-UX B.11.31 U ia64 with aCC (HP C/aC++ B3910B A.06.14 [Feb 22 2007]) + + - s390x CPU : + Linux - SUSE Enterprise Linux 10 - with gcc 4.1.2 + ( only the 32bits built works, the 64bits built does not pass the tests ) + + - sparc CPU : + Solaris 9 (sparc) with gcc 3.3.2 + + - powerpc CPU : + MacOS X 10.1/darwin 5.5 with gcc 932.1 (gcc 2.95.2) + MacOS X 10.3 with XCode 1.5 + + - openpower CPU : + Linux openpower-linux1 2.6.5-7.97-pseries64 (ppc64) with gcc 3.3.3 + + - IBM : + AIX 5.3 with gcc 4.1.0 + + - Tru64 : + OSF 5.1 with gcc 3.4.2 + + - PA-RISC : + HP-UX 11.11 with aCC (HP ANSI C++ B3910B A.03.73) + HP-UX 11.11 with gcc 3.4.2 (7za and 7zr : OK, 7z : failed because of a buggy gcc for HP-UX, + plugins don't work because C++ constructors are not called !) + + +BUILD with cmake +---------------- + You can only build 7za. + + cd CPP/7zip/CMAKE + + edit generate.sh to choose your target + + ./generate.sh + + the cmake project for the target is in "CPP/7zip/CMAKE/Alone". + + For the target "Unix Makefiles", use "make" to compile + + For others target, use the IDE (CodeBlocks, KDevelop3, Eclipse CDT4) + +INSTALL : +--------- + + method 1 + -------- + - edit install.sh to change DEST_HOME + - ./install.sh : to install + Remark : you must be "root" to install 7za in the directory "/usr/local" + + method 2 + -------- + - 7za is a stand-alone program, you can put this program where you want. + example : cp bin/7za /usr/local/bin/7za + + - 7z needs its plugins. You must copy the file 7z, 7z.so + and the directory Codecs in the same destination directory. + + - if you want to be able to create SFX archive, copy bin/7zCon.sfx + to the directory where 7za or 7z can be found. + + +USAGE: +------ + Remark : you can replace 7za with 7z. + + 7za t archive.7z : tests files in the archive archive.7z + 7za l archive.7z : lists all files from archive archive.7z + 7za x archive.7z : extracts all files from archive archive.7z + to the current directory + + 7za a archive.7z file1 fileN : add files to the archive archive.7z + + 7za a archive.7z dir1 : add all files and subdirectories from directory "dir1" to archive archive.7z + + CAUTION : do not use the flag "-r" unless you know what you are doing ... + + 7za a -sfx archive.exe dir1 : add all files from directory "dir1" to SFX archive archive.exe + (Remark : SFX archive MUST end with ".exe") + + You can also add or extract files to/from .zip or .tar archives. + You can also compress/uncompress .gz or .bz2 files. + + 7za a -tzip archive.zip file file2 file3 + 7za a -ttar archive.tar file + 7za a -tgzip file.gz file + 7za a -tbzip2 archive.bz2 file + + You can use password for archives: + 7za a -pmy_password archive.7z dir1 + + For .7z archive only, you can enable archive header encryption with "-mhe" + 7za a -mhe=on -pmy_password archive.7z dir1 + + For more, see the documentation of 7za.exe in DOCS/MANUAL directory + 7za a -t7z -m0=lzma -mx=9 -mfb=64 -md=32m -ms=on archive.7z dir1 + adds all files from directory "dir1" to archive archive.7z + using "ultra settings". + -t7z : 7z archive + -m0=lzma : lzma method + -mx=9 : level of compression = 9 (Ultra) + -mfb=64 : number of fast bytes for LZMA = 64 + -md=32m : dictionary size = 32 megabytes + -ms=on : solid archive = on + + To use the new codec "lzma2" + 7za a -m0=lzma2 archive.7z directory + + +BENCHMARKS : +------------ + 7za b : bench LZMA codec + 7z b -mm=crc : make internal crc check. + + +hugetlbfs (large pages) +------------ + + Using huges pages in Linux requires some preparations. + First, make sure your running kernel has support for hugetlbfs compiled in: + + ~$ grep hugetlbfs /proc/filesystems + nodev hugetlbfs + + You can view your current huge page configuration like this: + + ~$ grep Huge /proc/meminfo + HugePages_Total: 0 + HugePages_Free: 0 + HugePages_Rsvd: 0 + HugePages_Surp: 0 + Hugepagesize: 2048 kB + + In this case the size of a huge page is 2 MiB. + So, if you have 2 GiB of RAM and want to reserve 512 MiB for huge pages, + you would need 256 pages. + + Do the following as root: + + ~# echo 296 >/proc/sys/vm/nr_hugepages + ~# grep Huge /proc/meminfo + HugePages_Total: 296 + HugePages_Free: 296 + HugePages_Rsvd: 0 + HugePages_Surp: 0 + Hugepagesize: 2048 kB + + Finally, make access from user space possible: + + ~# mkdir /hugepages + ~# mount -t hugetlbfs -o rw,nosuid,nodev,noexec,noatime none /hugepages + ~# chmod 1777 /hugepages + + Option 1 : Now huge pages are configured. + In your shell, set the environment variable HUGETLB_PATH to the mount point: + ~$ export HUGETLB_PATH=/hugepages + or + + Option 2 : Let p7zip find out the first directory with the type "hugetlbfs" + + + To enable huge page use in p7zip, pass the '-slp' switch to it. + Ex: 7za -slp a t.7z dir + + + + If you want this to be a permanent setup : + - mkdir /hugepages + + - add an entry to your /etc/fstab so that when you reboot your computer, + your hugetlbfs will mount automatically : + hugetlbfs /hugepages hugetlbfs rw,nosuid,nodev,noexec,noatime 0 0 + + - add this in your /etc/rc.local : + chmod 1777 /hugepages + echo 296 > /proc/sys/vm/nr_hugepages + + optional : export HUGETLB_PATH=/hugepages + + To enable huge page use in p7zip, pass the '-slp' switch to it : 7za -slp b + + + Remark : with current CPU : "7za -slp b" is not faster than "7za b". + If you want to see some speedup, compress at least 300MB + Ex : 7za -slp -mx=9 -a big_file.tar.7z big_file.tar + + +LICENSE : +--------- + please read DOCS/License.txt. + +LIMITATIONS from 7-zip : +------------------------ + + - does not support uid/gid for the .tar format (so, use tar on Unix) + +LIMITATIONS for Unix version only : +----------------------------------- + + - can handle properly UNICODE filenames only if the environment is UTF-8. + Example : export LANG=en_US.UTF-8 ; unset LC_CTYPE + Remark : see the possible values for LANG in the directory + - /usr/lib/locale : Fedora 2 / Solaris 8 + - /usr/share/locale : OpenBSD / Debian / FreeBSD / MacOS X / Mandrake 10.1 / NetBSD + + On Linux, to display the available locales : locale -a + + p7zip relies on LC_CTYPE and then on LANG to convert name to/from UNICODE. + the command "locale" should display these environment variables. + you can also do "echo $LC_CTYPE" and "echo $LANG". + + If you do not plan to export your archive, you can use the flag "-no-utf16". + Usage : + 7za a -no-utf16 archive.7z dirOrFile1 ... dirOrFileN + 7za t -no-utf16 archive.7z + 7za l -no-utf16 archive.7z + 7za x -no-utf16 archive.7z + + - ignores Windows file access permissions (files are created with default permissions) + + see also TODO file. + +DEVELOPPER CORNER: +------------------ + + - WaitForMultipleObject has no equivalence on Unix. + - Events don't exist. + - sizeof(wchar_t) = 4 with GCC (2 with MS VC++) + - "FIXME" in source code indicates that you should add codes to better handle all cases. + + - "FIXED" in source code indicates that the original code has been changed to work in Unix environment. + + see also TODO file. diff --git a/TODO b/TODO new file mode 100644 index 0000000..82f87d6 --- /dev/null +++ b/TODO @@ -0,0 +1,39 @@ + +7za/7z +====== +- auto-generate config.h (use a configure script ...) + +- suppress all exit(EXIT_FAILURE), FIXME, ... + +- no chmod for TAR (should restore the rights set) + +- no chown(uid,gid) for TAR + +- Use a more portable "String.h" + +- UTF16 : try to test with Complex Unicode filenames + +- KNOWN BUGS + + - date (format arj/rar/chm) ? + + - absolute path ? + +- zip format : better support of symbolic links + +7zG / 7zFM +========================== + +- better help displaying + +- better support for space in filenames + + +7zG : + - sfx: wants 7z.sfx instead of 7zCon.sfx ? + - the dialogs are not on top of other windows => not visible ... + + +7zFM : + - the path "/" does not work (on OSX ?) + - strange behaviour : selected/unselected items diff --git a/check/check.sh b/check/check.sh new file mode 100755 index 0000000..1ec6825 --- /dev/null +++ b/check/check.sh @@ -0,0 +1,163 @@ +#! /bin/sh + +sure() +{ + eval $* + if [ "$?" != "0" ] + then + echo "ERROR during : $*" + echo "ERROR during : $*" > last_error + exit 1 + fi +} + +PZIP7=`pwd`"/$1" + +REP=TMP_$$ +echo "REP=${REP}" + +chmod -R 777 ${REP} 2> /dev/null +rm -fr ${REP} +mkdir -p ${REP} + +cd ${REP} + +# sure rm -fr 7za433_ref 7za433_7zip_bzip2 7za433_7zip_lzma 7za433_7zip_lzma_crypto 7za433_7zip_ppmd 7za433_tar +# sure rm -fr 7za433_7zip_bzip2.7z 7za433_7zip_lzma.7z 7za433_7zip_lzma_crypto.7z 7za433_7zip_ppmd.7z 7za433_tar.tar + +echo "" +echo "# TESTING ..." +echo "#############" + +sure ${PZIP7} t ../test/7za433_tar.tar +sure ${PZIP7} t ../test/7za433_7zip_lzma.7z +sure ${PZIP7} t -pqwerty ../test/7za433_7zip_lzma_crypto.7z +sure ${PZIP7} t ../test/7za433_7zip_ppmd.7z +sure ${PZIP7} t ../test/7za433_7zip_bzip2.7z + +echo "" +echo "# EXTRACTING ..." +echo "################" + +sure tar xf ../test/7za433_tar.tar +sure mv 7za433_tar 7za433_ref + +sure ${PZIP7} x ../test/7za433_tar.tar +sure diff -r 7za433_ref 7za433_tar + +sure ${PZIP7} x ../test/7za433_7zip_lzma.7z +sure diff -r 7za433_ref 7za433_7zip_lzma + +sure ${PZIP7} x ../test/7za433_7zip_lzma_bcj2.7z +sure diff -r 7za433_ref 7za433_7zip_lzma_bcj2 + +sure ${PZIP7} x -pqwerty ../test/7za433_7zip_lzma_crypto.7z +sure diff -r 7za433_ref 7za433_7zip_lzma_crypto + +sure ${PZIP7} x ../test/7za433_7zip_ppmd.7z +sure diff -r 7za433_ref 7za433_7zip_ppmd + +sure ${PZIP7} x ../test/7za433_7zip_ppmd_bcj2.7z +sure diff -r 7za433_ref 7za433_7zip_ppmd_bcj2 + +sure ${PZIP7} x ../test/7za433_7zip_bzip2.7z +sure diff -r 7za433_ref 7za433_7zip_bzip2 + +sure ${PZIP7} x ../test/7za433_7zip_lzma2.7z +sure diff -r 7za433_ref 7za433_7zip_lzma2 + +sure ${PZIP7} x ../test/7za433_7zip_lzma2_bcj2.7z +sure diff -r 7za433_ref 7za433_7zip_lzma2_bcj2 + +sure ${PZIP7} x -pqwerty ../test/7za433_7zip_lzma2_crypto.7z +sure diff -r 7za433_ref 7za433_7zip_lzma2_crypto + +echo "" +echo "# Archiving ..." +echo "###############" + +sure ${PZIP7} a -ttar 7za433_tar.tar 7za433_tar +sure tar tvf 7za433_tar.tar + +sure ${PZIP7} a 7za433_7zip_lzma.7z 7za433_7zip_lzma + +sure ${PZIP7} a -sfx7zCon.sfx 7za433_7zip_lzma.x 7za433_7zip_lzma + +sure ${PZIP7} a -pqwerty -mhc=on -mhe=on 7za433_7zip_lzma_crypto.7z 7za433_7zip_lzma_crypto + +sure ${PZIP7} a -mx=9 -m0=ppmd:mem=64m:o=32 7za433_7zip_ppmd.7z 7za433_7zip_ppmd + +sure ${PZIP7} a -m0=bzip2 7za433_7zip_bzip2.7z 7za433_7zip_bzip2 + +echo "" +echo "# EXTRACTING (PASS 2) ..." +echo "#########################" + +sure rm -fr 7za433_7zip_bzip2 7za433_7zip_lzma 7za433_7zip_lzma_crypto 7za433_7zip_ppmd 7za433_tar + +sure ${PZIP7} x 7za433_tar.tar +sure diff -r 7za433_ref 7za433_tar + +sure ${PZIP7} x 7za433_7zip_lzma.7z +sure diff -r 7za433_ref 7za433_7zip_lzma + +sure rm -fr 7za433_7zip_lzma +# FIXME - only for 7zG +sure chmod +x ./7za433_7zip_lzma.x +sure ./7za433_7zip_lzma.x +sure diff -r 7za433_ref 7za433_7zip_lzma + +sure ${PZIP7} x -pqwerty 7za433_7zip_lzma_crypto.7z +sure diff -r 7za433_ref 7za433_7zip_lzma_crypto + +sure ${PZIP7} x 7za433_7zip_ppmd.7z +sure diff -r 7za433_ref 7za433_7zip_ppmd + +sure ${PZIP7} x 7za433_7zip_bzip2.7z +sure diff -r 7za433_ref 7za433_7zip_bzip2 + +echo "" +echo "# EXTRACTING (LZMA) ..." +echo "#######################" + +rm -f 7za.exe + +sure ${PZIP7} x ../test/7za.exe.lzma +sure diff 7za.exe 7za433_ref/bin/7za.exe +sure rm -f 7za.exe + +sure ${PZIP7} x ../test/7za.exe.lzma86 +sure diff 7za.exe 7za433_ref/bin/7za.exe +sure rm -f 7za.exe + +sure ${PZIP7} x ../test/7za.exe.lzma_eos +sure diff 7za.exe 7za433_ref/bin/7za.exe +sure rm -f 7za.exe + +echo "" +echo "# TESTING (XZ) ..." +echo "#######################" +sure ${PZIP7} x ../test/7za.exe.xz +sure diff 7za.exe 7za433_ref/bin/7za.exe + +chmod +x 7za.exe +sure ${PZIP7} -txz a 7za.exe.xz 7za.exe +sure rm -f 7za.exe + +sure ${PZIP7} x 7za.exe.xz +sure diff 7za.exe 7za433_ref/bin/7za.exe +sure rm -f 7za.exe + +##################################### + +cd .. + +# ./clean_all.sh +chmod -R 777 ${REP} 2> /dev/null +rm -fr ${REP} + +echo "" +echo "========" +echo "ALL DONE" +echo "========" +echo "" diff --git a/check/check_7zr.sh b/check/check_7zr.sh new file mode 100755 index 0000000..c01dfa0 --- /dev/null +++ b/check/check_7zr.sh @@ -0,0 +1,108 @@ +#! /bin/sh + +sure() +{ + eval $* + if [ "$?" != "0" ] + then + echo "ERROR during : $*" + echo "ERROR during : $*" > last_error + exit 1 + fi +} + +PZIP7=`pwd`"/$1" + +REP=TMP_$$ +echo "REP=${REP}" + +chmod -R 777 ${REP} 2> /dev/null +rm -fr ${REP} +mkdir -p ${REP} + +cd ${REP} + +# sure rm -fr 7za433_ref 7za433_7zip_bzip2 7za433_7zip_lzma 7za433_7zip_lzma_crypto 7za433_7zip_ppmd 7za433_tar +# sure rm -fr 7za433_7zip_bzip2.7z 7za433_7zip_lzma.7z 7za433_7zip_lzma_crypto.7z 7za433_7zip_ppmd.7z 7za433_tar.tar + +echo "" +echo "# TESTING ..." +echo "#############" + +sure ${PZIP7} t ../test/7za433_7zip_lzma.7z + + +echo "" +echo "# EXTRACTING ..." +echo "################" + +sure tar xf ../test/7za433_tar.tar +sure mv 7za433_tar 7za433_ref + +sure ${PZIP7} x ../test/7za433_7zip_lzma.7z +sure diff -r 7za433_ref 7za433_7zip_lzma + +sure ${PZIP7} x ../test/7za433_7zip_lzma_bcj2.7z +sure diff -r 7za433_ref 7za433_7zip_lzma_bcj2 + +echo "" +echo "# Archiving ..." +echo "###############" + +sure ${PZIP7} a 7za433_7zip_lzma.7z 7za433_7zip_lzma + +echo "" +echo "# EXTRACTING (PASS 2) ..." +echo "#########################" + +sure rm -fr 7za433_7zip_lzma + +sure ${PZIP7} x 7za433_7zip_lzma.7z +sure diff -r 7za433_ref 7za433_7zip_lzma + +echo "" +echo "# EXTRACTING (LZMA) ..." +echo "#######################" + +rm -f 7za.exe + +sure ${PZIP7} x ../test/7za.exe.lzma +sure diff 7za.exe 7za433_ref/bin/7za.exe +sure rm -f 7za.exe + +sure ${PZIP7} x ../test/7za.exe.lzma86 +sure diff 7za.exe 7za433_ref/bin/7za.exe +sure rm -f 7za.exe + +sure ${PZIP7} x ../test/7za.exe.lzma_eos +sure diff 7za.exe 7za433_ref/bin/7za.exe +sure rm -f 7za.exe + +echo "" +echo "# TESTING (XZ) ..." +echo "#######################" +sure ${PZIP7} x ../test/7za.exe.xz +sure diff 7za.exe 7za433_ref/bin/7za.exe + +chmod +x 7za.exe +sure ${PZIP7} -txz a 7za.exe.xz 7za.exe +sure rm -f 7za.exe + +sure ${PZIP7} x 7za.exe.xz +sure diff 7za.exe 7za433_ref/bin/7za.exe +sure rm -f 7za.exe + +##################################### + +cd .. + +# ./clean_all.sh +chmod -R 777 ${REP} 2> /dev/null +rm -fr ${REP} + + +echo "" +echo "========" +echo "ALL DONE" +echo "========" +echo "" diff --git a/check/check_Client7z.sh b/check/check_Client7z.sh new file mode 100755 index 0000000..f0dc71d --- /dev/null +++ b/check/check_Client7z.sh @@ -0,0 +1,90 @@ +#! /bin/sh + +sure() +{ + eval $* + if [ "$?" != "0" ] + then + echo "ERROR during : $*" + echo "ERROR during : $*" > last_error + exit 1 + fi +} + +LD_LIBRARY_PATH=`cd ../bin ; pwd`:${LD_LIBRARY_PATH} +export LD_LIBRARY_PATH +echo "LD_LIBRARY_PATH=${LD_LIBRARY_PATH}" + +PZIP7=`pwd`"/$1" + +REP=TMP_$$ +echo "REP=${REP}" + +chmod -R 777 ${REP} 2> /dev/null +rm -fr ${REP} +mkdir -p ${REP} + +cd ${REP} + +# sure rm -fr 7za433_ref 7za433_7zip_bzip2 7za433_7zip_lzma 7za433_7zip_lzma_crypto 7za433_7zip_ppmd 7za433_tar +# sure rm -fr 7za433_7zip_bzip2.7z 7za433_7zip_lzma.7z 7za433_7zip_lzma_crypto.7z 7za433_7zip_ppmd.7z 7za433_tar.tar + +# for Beos or MacOSX +ln -s ../../bin/7z.so . + +echo "" +echo "# TESTING ..." +echo "#############" + +sure ${PZIP7} l ../test/7za433_7zip_lzma.7z +# sure ${PZIP7} t -pqwerty ../test/7za433_7zip_lzma_crypto.7z +sure ${PZIP7} l ../test/7za433_7zip_ppmd.7z +sure ${PZIP7} l ../test/7za433_7zip_bzip2.7z + + + +echo "" +echo "# EXTRACTING ..." +echo "################" + +sure tar xf ../test/7za433_tar.tar +sure mv 7za433_tar 7za433_ref + +sure ${PZIP7} x ../test/7za433_7zip_lzma.7z +sure diff -r 7za433_ref 7za433_7zip_lzma + +# sure ${PZIP7} x -pqwerty ../test/7za433_7zip_lzma_crypto.7z +# sure diff -r 7za433_ref 7za433_7zip_lzma_crypto + +sure ${PZIP7} x ../test/7za433_7zip_ppmd.7z +sure diff -r 7za433_ref 7za433_7zip_ppmd + +sure ${PZIP7} x ../test/7za433_7zip_bzip2.7z +sure diff -r 7za433_ref 7za433_7zip_bzip2 + +echo "" +echo "# Archiving ..." +echo "###############" + +sure ${PZIP7} a 7za433_7zip_lzma.7z 7za433_7zip_lzma/bin/7za.exe 7za433_7zip_lzma/readme.txt 7za433_7zip_lzma/doc/copying.txt + +echo "" +echo "# EXTRACTING (PASS 2) ..." +echo "#########################" + +sure rm -fr 7za433_7zip_bzip2 7za433_7zip_lzma 7za433_7zip_lzma_crypto 7za433_7zip_ppmd 7za433_tar + +sure ${PZIP7} x 7za433_7zip_lzma.7z +sure diff -r 7za433_ref 7za433_7zip_lzma + +cd .. + +# ./clean_all.sh +chmod -R 777 ${REP} 2> /dev/null +rm -fr ${REP} + +echo "" +echo "========" +echo "ALL DONE" +echo "========" +echo "" diff --git a/check/check_install.sh b/check/check_install.sh new file mode 100755 index 0000000..ffebaa8 --- /dev/null +++ b/check/check_install.sh @@ -0,0 +1,158 @@ +#! /bin/sh + +cd .. + +DEST_HOME=${HOME}/INSTALL_FOR_P7ZIP/local +DEST_HOME_SPACE="${HOME}/INSTALL_FOR_P7ZIP/lo cal" + +##########################################################################################" + +echo "## PASS 1 - no files " + +chmod -R 777 ${HOME}/INSTALL_FOR_P7ZIP +rm -fr ${HOME}/INSTALL_FOR_P7ZIP + +./install.sh "${DEST_HOME}/usr/bin" "${DEST_HOME}/usr/lib/p7zip" "${DEST_HOME}/usr/man" "${DEST_HOME}/usr/share/doc/p7zip" + + +echo "## PASS 2 - overwrite files " +./install.sh "${DEST_HOME}/usr/bin" "${DEST_HOME}/usr/lib/p7zip" "${DEST_HOME}/usr/man" "${DEST_HOME}/usr/share/doc/p7zip" + +mv "${DEST_HOME}" "${DEST_HOME}_REF" + +echo "## PASS 3 - with DEST_DIR" + +./install.sh "/usr/bin" "/usr/lib/p7zip" "/usr/man" "/usr/share/doc/p7zip" "${DEST_HOME}/" + +diff -r "${DEST_HOME}/usr/bin" "${DEST_HOME}_REF/usr/bin" > /dev/null + if [ "$?" = "0" ] + then + echo "#####" + echo "ERROR (bin)" + echo "#####" + exit 1 + fi + +diff -r "${DEST_HOME}/usr/man" "${DEST_HOME}_REF/usr/man" > /dev/null + if [ "$?" = "0" ] + then + echo "#####" + echo "ERROR (man)" + echo "#####" + exit 1 + fi + +diff -r "${DEST_HOME}/usr/lib" "${DEST_HOME}_REF/usr/lib" > /dev/null + if [ "$?" != "0" ] + then + echo "#####" + echo "ERROR (lib)" + echo "#####" + exit 1 + fi + +diff -r "${DEST_HOME}/usr/share" "${DEST_HOME}_REF/usr/share" > /dev/null + if [ "$?" != "0" ] + then + echo "#####" + echo "ERROR (share)" + echo "#####" + exit 1 + fi + +##########################################################################################" + +echo "## PASS 4 - no files " + +chmod -R 777 ${HOME}/INSTALL_FOR_P7ZIP +rm -fr ${HOME}/INSTALL_FOR_P7ZIP + +./install.sh "${DEST_HOME_SPACE}/usr/bin" "${DEST_HOME_SPACE}/usr/lib/p7zip" "${DEST_HOME_SPACE}/usr/man" "${DEST_HOME_SPACE}/usr/share/doc/p7zip" + + +echo "## PASS 5 - overwrite files " +./install.sh "${DEST_HOME_SPACE}/usr/bin" "${DEST_HOME_SPACE}/usr/lib/p7zip" "${DEST_HOME_SPACE}/usr/man" "${DEST_HOME_SPACE}/usr/share/doc/p7zip" + +# test each programs +echo "## PASS 6 - programs testing" + +"${DEST_HOME_SPACE}/usr/bin/7za" t check/test/7za433_7zip_lzma.7z > /dev/null + if [ "$?" != "0" ] + then + echo "#####" + echo "ERROR 7za" + echo "#####" + exit 1 + fi + +"${DEST_HOME_SPACE}/usr/bin/7z" t check/test/7za433_7zip_lzma.7z > /dev/null + if [ "$?" != "0" ] + then + echo "#####" + echo "ERROR 7z" + echo "#####" + exit 1 + fi + +"${DEST_HOME_SPACE}/usr/bin/7zr" t check/test/7za433_7zip_lzma.7z > /dev/null + if [ "$?" != "0" ] + then + echo "#####" + echo "ERROR 7zr" + echo "#####" + exit 1 + fi + + +mv "${DEST_HOME_SPACE}" "${DEST_HOME_SPACE}_REF" + +echo "## PASS 7 - with DEST_DIR" + +./install.sh "/usr/bin" "/usr/lib/p7zip" "/usr/man" "/usr/share/doc/p7zip" "${DEST_HOME_SPACE}/" + +diff -r "${DEST_HOME_SPACE}/usr/bin" "${DEST_HOME_SPACE}_REF/usr/bin" > /dev/null + if [ "$?" = "0" ] + then + echo "#####" + echo "ERROR (bin)" + echo "#####" + exit 1 + fi + +diff -r "${DEST_HOME_SPACE}/usr/man" "${DEST_HOME_SPACE}_REF/usr/man" > /dev/null + if [ "$?" = "0" ] + then + echo "#####" + echo "ERROR (man)" + echo "#####" + exit 1 + fi + +diff -r "${DEST_HOME_SPACE}/usr/lib" "${DEST_HOME_SPACE}_REF/usr/lib" > /dev/null + if [ "$?" != "0" ] + then + echo "#####" + echo "ERROR (lib)" + echo "#####" + exit 1 + fi + +diff -r "${DEST_HOME_SPACE}/usr/share" "${DEST_HOME_SPACE}_REF/usr/share" > /dev/null + if [ "$?" != "0" ] + then + echo "#####" + echo "ERROR (share)" + echo "#####" + exit 1 + fi + + +##########################################################################################" + +chmod -R 777 ${HOME}/INSTALL_FOR_P7ZIP +rm -fr ${HOME}/INSTALL_FOR_P7ZIP + + echo "########" + echo "All Done" + echo "########" + diff --git a/check/clean_all.sh b/check/clean_all.sh new file mode 100755 index 0000000..006ffd8 --- /dev/null +++ b/check/clean_all.sh @@ -0,0 +1,6 @@ +#! /bin/sh + +rm -fr 7za433_ref 7za433_7zip_bzip2 7za433_7zip_lzma 7za433_7zip_lzma_crypto 7za433_7zip_ppmd 7za433_tar +rm -fr 7za433_7zip_bzip2.7z 7za433_7zip_lzma.7z 7za433_7zip_lzma_crypto.7z 7za433_7zip_ppmd.7z 7za433_tar.tar +rm -fr last_error TMP_* + diff --git a/check/my_86_filter/makefile b/check/my_86_filter/makefile new file mode 100644 index 0000000..252ae50 --- /dev/null +++ b/check/my_86_filter/makefile @@ -0,0 +1,13 @@ +PROG=my_86_filter + +LOCAL_FLAGS=-I../../C + +include ../../makefile.crc32 +include ../../makefile.machine + +LIBS=$(LOCAL_LIBS) + +OBJS=my_86_filter.o + +include ../../makefile.glb + diff --git a/check/my_86_filter/makefile.depend b/check/my_86_filter/makefile.depend new file mode 100644 index 0000000..2484a9e --- /dev/null +++ b/check/my_86_filter/makefile.depend @@ -0,0 +1 @@ +my_86_filter.o: my_86_filter.cpp ../../C/CpuArch.h ../../C/Types.h diff --git a/check/my_86_filter/makefile.list b/check/my_86_filter/makefile.list new file mode 100644 index 0000000..451b2bd --- /dev/null +++ b/check/my_86_filter/makefile.list @@ -0,0 +1,4 @@ +SRCS=my_86_filter.cpp + +my_86_filter.o : my_86_filter.cpp + $(CXX) $(CXXFLAGS) my_86_filter.cpp diff --git a/check/my_86_filter/my_86_filter.cpp b/check/my_86_filter/my_86_filter.cpp new file mode 100644 index 0000000..2fb4842 --- /dev/null +++ b/check/my_86_filter/my_86_filter.cpp @@ -0,0 +1,20 @@ +#include +#include + +/* test if 7-zip uses 86 filter on this machine */ + + +#include "CpuArch.h" + +int main(int argc,char *argv[]) +{ + int ret = 0; + +#ifdef MY_CPU_X86_OR_AMD64 + ret = 1; +#endif + + + return ret; +} + diff --git a/check/test/7za.exe.lzma b/check/test/7za.exe.lzma new file mode 100644 index 0000000..26338a4 Binary files /dev/null and b/check/test/7za.exe.lzma differ diff --git a/check/test/7za.exe.lzma86 b/check/test/7za.exe.lzma86 new file mode 100644 index 0000000..b5de6b3 Binary files /dev/null and b/check/test/7za.exe.lzma86 differ diff --git a/check/test/7za.exe.lzma_eos b/check/test/7za.exe.lzma_eos new file mode 100644 index 0000000..d42c848 Binary files /dev/null and b/check/test/7za.exe.lzma_eos differ diff --git a/check/test/7za.exe.xz b/check/test/7za.exe.xz new file mode 100644 index 0000000..5cc6aa7 Binary files /dev/null and b/check/test/7za.exe.xz differ diff --git a/check/test/7za433_7zip_bzip2.7z b/check/test/7za433_7zip_bzip2.7z new file mode 100644 index 0000000..20a51cd Binary files /dev/null and b/check/test/7za433_7zip_bzip2.7z differ diff --git a/check/test/7za433_7zip_lzma.7z b/check/test/7za433_7zip_lzma.7z new file mode 100644 index 0000000..a5e7eec Binary files /dev/null and b/check/test/7za433_7zip_lzma.7z differ diff --git a/check/test/7za433_7zip_lzma2.7z b/check/test/7za433_7zip_lzma2.7z new file mode 100644 index 0000000..0064bdd Binary files /dev/null and b/check/test/7za433_7zip_lzma2.7z differ diff --git a/check/test/7za433_7zip_lzma2_bcj2.7z b/check/test/7za433_7zip_lzma2_bcj2.7z new file mode 100644 index 0000000..02cfbe9 Binary files /dev/null and b/check/test/7za433_7zip_lzma2_bcj2.7z differ diff --git a/check/test/7za433_7zip_lzma2_crypto.7z b/check/test/7za433_7zip_lzma2_crypto.7z new file mode 100644 index 0000000..a10f0bc Binary files /dev/null and b/check/test/7za433_7zip_lzma2_crypto.7z differ diff --git a/check/test/7za433_7zip_lzma_bcj2.7z b/check/test/7za433_7zip_lzma_bcj2.7z new file mode 100644 index 0000000..5ecb122 Binary files /dev/null and b/check/test/7za433_7zip_lzma_bcj2.7z differ diff --git a/check/test/7za433_7zip_lzma_crypto.7z b/check/test/7za433_7zip_lzma_crypto.7z new file mode 100644 index 0000000..73ef482 Binary files /dev/null and b/check/test/7za433_7zip_lzma_crypto.7z differ diff --git a/check/test/7za433_7zip_ppmd.7z b/check/test/7za433_7zip_ppmd.7z new file mode 100644 index 0000000..819699c Binary files /dev/null and b/check/test/7za433_7zip_ppmd.7z differ diff --git a/check/test/7za433_7zip_ppmd_bcj2.7z b/check/test/7za433_7zip_ppmd_bcj2.7z new file mode 100644 index 0000000..2633fd8 Binary files /dev/null and b/check/test/7za433_7zip_ppmd_bcj2.7z differ diff --git a/check/test/7za433_tar.tar b/check/test/7za433_tar.tar new file mode 100644 index 0000000..0629b24 Binary files /dev/null and b/check/test/7za433_tar.tar differ diff --git a/contrib/VirtualFileSystemForMidnightCommander/ChangeLog b/contrib/VirtualFileSystemForMidnightCommander/ChangeLog new file mode 100644 index 0000000..d078ebf --- /dev/null +++ b/contrib/VirtualFileSystemForMidnightCommander/ChangeLog @@ -0,0 +1,41 @@ +=-=-=-= 4.29 +* Code optimization for using less temporary files as possible (may not work with p7zip + versions oldest than 4.29) + +=-=-=-= 4.16beta +* Changed internal date representation, because old date format may not work with + some mc versions. (thanks to Valery Koval for patch) +* Aligned with p7zip 4.16 beta (for properly handle old type archives with "./" prefix in + archive root, and deletion error from solid archives handle) + +=-=-=-= 4.14.2beta +* extract files with same name from different archive subdirs was not a bug, but feature, + so I made code cleanup. (thanks to myspace and Igor Pavlov) + +=-=-=-= 4.14.1beta +Aligned with p7zip 4.14.01 beta (may work with v 4.x) Not work with oldest versions! +* workaround p7zip bug for extract files with same name from different archive subdirs + +=-=-=-= 4.12.2beta +* incorrect show small text files in internal (mc) viewer = fixed + +=-=-=-= 4.12.1beta +Aligned with p7zip 4.12 beta (may work with v 4.10) Not work with oldest versions! +* many workarounds to aligning with 4.12 + +=-=-=-= 0.3.2beta +Aligned with p7zip 0.91 cause version 4.10beta is buggy +* incorrect handle files inside subdirs of archive without prefix "./" = fixed + +=-=-=-= 0.3.1beta +Aligned with p7zip 0.91 cause version 4.10beta is buggy +* incorrect handle filenames inside archive with length little than 12 symbols = fixed +* p7zip trying extract all files with same name in top dir and other dirs of archive = workaround +* some workarounds to align with version 0.91 + +=-=-=-= 0.3beta +Aligned with p7zip 0.90 cause version 4.10beta is buggy +* incorrect handle filenames with spaces = fixed + +=-=-=-= 0.2beta +first version, full of bugs... \ No newline at end of file diff --git a/contrib/VirtualFileSystemForMidnightCommander/readme b/contrib/VirtualFileSystemForMidnightCommander/readme new file mode 100644 index 0000000..7d486a0 --- /dev/null +++ b/contrib/VirtualFileSystemForMidnightCommander/readme @@ -0,0 +1,21 @@ + +The official site of u7z is : http://sgh-punk.narod.ru/files/u7z/ + +INSTALL +======= +- edit /usr/share/mc/extfs/extfs.ini to add "u7z" after urar. + +- edit /usr/share/mc/mc.ext to add : +=-=-=-=-=-= Cut -=-=-=-=-=- +regex/\.(7z|7Z)$ + View=%view{ascii} 7za l %f + Open=%cd %p#u7z +=-=-=-=-=-= Cut -=-=-=-=-=- + +This must be added before Manual pages Lines to prevent handle 7z archive +like man page + +- copy u7z to /usr/share/mc/extfs + +- launch mc to try ;) + diff --git a/contrib/VirtualFileSystemForMidnightCommander/readme.u7z b/contrib/VirtualFileSystemForMidnightCommander/readme.u7z new file mode 100644 index 0000000..9c86559 --- /dev/null +++ b/contrib/VirtualFileSystemForMidnightCommander/readme.u7z @@ -0,0 +1,30 @@ +For use u7z you must add following line to extfs.ini + +=-=-=-=-=-= Cut -=-=-=-=-=- +u7z +=-=-=-=-=-= Cut -=-=-=-=-=- + +And add somthing like this to extension file + +REMARK: 7z may be replaced with 7za + +=-=-=-=-=-= Cut -=-=-=-=-=- +regex/\.(7z|7Z)$ + View=%view{ascii} 7z l %f + Open=%cd %p#u7z +=-=-=-=-=-= Cut -=-=-=-=-=- + +This must be added before Manual pages Lines to prevent handle 7z archive +like man page + + +If you have installed 7z with plugins, you can view and unpack .cab and other +(if there is plugin) archive types with u7z, just add + +=-=-=-=-=-= Cut -=-=-=-=-=- +regex/\.(cab|CAB)$ + View=%view{ascii} 7z l %f + Open=%cd %p#u7z +=-=-=-=-=-= Cut -=-=-=-=-=- + +to extension file, and somthing like this for other supported archives. diff --git a/contrib/VirtualFileSystemForMidnightCommander/u7z b/contrib/VirtualFileSystemForMidnightCommander/u7z new file mode 100755 index 0000000..3d41cd9 --- /dev/null +++ b/contrib/VirtualFileSystemForMidnightCommander/u7z @@ -0,0 +1,133 @@ +#! /bin/sh +# +# u7z - 7zip file archive Virtual File System for Midnight Commander ( ftp://ftp.ibiblio.org/pub/Linux/utils/file/managers/mc/ ) +# +# Copyright (C) 2004 Sergiy Niskorodov (sgh at mail dot zp dot ua) + +# Written by Sergiy Niskorodov aka SGh +# +# version 4.29 (12 Nov 2005) +# +# 7z for linux can be found on http://sourceforge.net/projects/p7zip/ + + +# Thanks to urar VFS authors andrey joukov 2:5020/337.13@fidonet.org, +# christian.gennerat@alcatel.fr, Andrew V. Samoilov +# I use this script like example + + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + + +SEVENZ=`which 7z` || SEVENZ=`which 7za` + + +mc7zfs_list () +{ + $SEVENZ l "$1" 2> /dev/null | gawk -v uid=${UID-0} ' +BEGIN { flag=0; arr_of_month="JanFebMarAprMayJunJulAugSepOctNovDec" } + /^-------/ { flag++; if (flag > 1) exit 0; next } +{ +if (flag == 0) next + +year=substr($1, 1, 4) +month=substr($1, 6, 2) +day=substr($1, 9, 2) + +month_name=substr(arr_of_month, (month-1)*3+1, 3) + +time=substr($2, 1, 5) + +if (index($3, "D") != 0) + attr="drwxr-xr-x" +else +if (index($3, ".") != 0) + attr="-rw-r--r--" + +size=$4 + +$0=substr($0, 54) +if (NF > 1) + name=$0 +else + name=$1 + +gsub(/\\/, "/", name) + +printf "%s 1 %-8d %-8d %8d %3s %2d %4d %s %s\n", attr, uid, 0, size, month_name, day, year, time, name +}' +} + +mc7zfs_copyin () +{ +# preserve pwd. + pwd=`pwd` +# Create a directory and copy in it the tmp file with the random name + dir="$3".dir + mkdir "$dir" + cd "$dir" + di="${2%/*}" +# if file is to be written upper in the archive tree, make fake dir + if test "$di" != "${2##*/}" ; then + mkdir -p "$di" + fi + cp -fp "$3" "$dir/$2" + $SEVENZ a "$1" "$2" >/dev/null 2> /dev/null + cd $pwd + rm -rf "$3.dir" +} + +mc7zfs_copyout () +{ + $SEVENZ l "$1" | grep -q "[.][/].*$2" &> /dev/null && EXFNAME=*./"$2" || EXFNAME="$2" + $SEVENZ e -r- -so "$1" "$EXFNAME" > "$3" 2> /dev/null +} + +mc7zfs_mkdir () +{ +# preserve pwd. + pwd=`pwd` +# Create a directory and create in it a tmp directory with the good name + dir=tmpdir.${RANDOM} + mkdir $dir + cd $dir + mkdir -p "$2" + $SEVENZ a -r "$1" "$2" >/dev/null 2>/dev/null + cd $pwd + rm -rf $dir +} + +mc7zfs_rm () +{ + $SEVENZ l "$1" | grep -q "[.][/].*$2" &> /dev/null && EXFNAME=*./"$2" || EXFNAME="$2" + $SEVENZ d "$1" "$EXFNAME" 2>&1 | grep -q E_NOTIMPL &> /dev/null && { echo -e "Function not implemented...\n7z cannot delete files from solid archive." >&2 ; exit 1 ; } +} + +umask 077 + +cmd="$1" +shift + +case "$cmd" in + list) mc7zfs_list "$@" ;; + rm) mc7zfs_rm "$@" ;; + rmdir) mc7zfs_rm "$@" ;; + mkdir) mc7zfs_mkdir "$@" ;; + copyin) mc7zfs_copyin "$@" ;; + copyout) mc7zfs_copyout "$@" ;; + *) exit 1 ;; +esac +exit 0 diff --git a/contrib/gzip-like_CLI_wrapper_for_7z/README b/contrib/gzip-like_CLI_wrapper_for_7z/README new file mode 100644 index 0000000..3898820 --- /dev/null +++ b/contrib/gzip-like_CLI_wrapper_for_7z/README @@ -0,0 +1,21 @@ +gzip-like CLI wrapper (for 7z) +============================== + +The official site of the script p7zip provided in this directory +is http://packages.debian.org/unstable/utils/p7zip. + + +The script p7zip provides a CLI similar to that of +gzip/bzip2/etc Un*x utilities for 7z. + +When necessary, it emulates streaming by using +temporary files in /tmp. This is all transparent to +the application using it, which can use the same +semantincs than with gzip or bzip2. + +For example, you can do: + +tar --use-compress-program=p7zip -cf file.tar.7z dir/ + +to generate a 7zipped tarball. + diff --git a/contrib/gzip-like_CLI_wrapper_for_7z/check/check.sh b/contrib/gzip-like_CLI_wrapper_for_7z/check/check.sh new file mode 100755 index 0000000..f9003fc --- /dev/null +++ b/contrib/gzip-like_CLI_wrapper_for_7z/check/check.sh @@ -0,0 +1,117 @@ +# ! /bin/sh + +# remove the strange filenames ... +rm -f -- "--" "bar" "-c" "-d" "-foo" "foo bar" "foo (bar) - ABCD" "-h" "-help" +if [ "$?" != "0" ] ; then + echo "error during rm" + exit 1 +fi + +# pipe +out=`echo "foobar" | ../p7zip | ../p7zip -d` + +if [ "${out}" != "foobar" ] ; then + echo "error in ../p7zip | ../p7zip -d" + exit 1 +fi + +# path with "./" +echo "foobar content" > foobar +../p7zip ./foobar +if [ "$?" != "0" ] ; then + echo "error p7zip ./foobar" + exit 1 +fi + +if [ ! -f ./foobar.7z ] ; then + echo "error ./foobar.7z not found" + exit 1 +fi + +../p7zip -d ./foobar.7z +if [ "$?" != "0" ] ; then + echo "error p7zip -d ./foobar.7z" + exit 1 +fi + +if [ ! -f ./foobar ] ; then + echo "error ./foobar not found" + exit 1 +fi + +content=`cat foobar` +if [ "${content}" != "foobar content" ] ; then + echo "error content of foobar" + exit 1 +fi + +rm -f foobar + +# the strange filenames are in the tar ... +tar xf files.tar +if [ "$?" != "0" ] ; then + echo "error in tar xf files.tar" + exit 1 +fi + +../p7zip -- "--" "bar" "-c" "-d" "-foo" "foo bar" "foo (bar) - ABCD" "-h" "-help" +if [ "$?" != "0" ] ; then + echo "error in p7zip" + exit 1 +fi + +for f in "--" "bar" "-c" "-d" "-foo" "foo bar" "foo (bar) - ABCD" "-h" "-help" +do + 7za -- t "${f}.7z" > /dev/null + if [ "$?" != 0 ] ; then + echo error in "${f}.7z" + exit 1 + fi +done + +../p7zip -d -- *.7z +if [ "$?" != "0" ] ; then + echo "error in p7zip -d" + exit 1 +fi + +for f in "--" "bar" "-c" "-d" "-foo" "foo bar" "foo (bar) - ABCD" "-h" "-help" +do + if [ ! -f "${f}" ] ; then + echo error "${f}" not found + exit 1 + fi +done + +# remove the strange filenames ... +rm -f -- "--" "bar" "-c" "-d" "-foo" "foo bar" "foo (bar) - ABCD" "-h" "-help" +if [ "$?" != "0" ] ; then + echo "error during rm" + exit 1 +fi + +# test errors + +../p7zip no_file +if [ "$?" = "0" ] ; then + echo "error p7zip no_file" + exit 1 +fi + +../p7zip -d no_file +if [ "$?" = "0" ] ; then + echo "error p7zip -d no_file" + exit 1 +fi + +../p7zip -d no_file.7z +if [ "$?" = "0" ] ; then + echo "error p7zip -d no_file.7z" + exit 1 +fi + +echo +echo "########" +echo "All Done" +echo "########" + diff --git a/contrib/gzip-like_CLI_wrapper_for_7z/check/files.tar b/contrib/gzip-like_CLI_wrapper_for_7z/check/files.tar new file mode 100644 index 0000000..eb56def Binary files /dev/null and b/contrib/gzip-like_CLI_wrapper_for_7z/check/files.tar differ diff --git a/contrib/gzip-like_CLI_wrapper_for_7z/man1/p7zip.1 b/contrib/gzip-like_CLI_wrapper_for_7z/man1/p7zip.1 new file mode 100644 index 0000000..8519106 --- /dev/null +++ b/contrib/gzip-like_CLI_wrapper_for_7z/man1/p7zip.1 @@ -0,0 +1,33 @@ +.TH p7zip 1 "October 31 2004" "Mohammed Adnene Trojette" +.SH NAME +p7zip \- Wrapper on 7za, a 7-zip file archiver with high compression ratio +.SH SYNOPSIS +.B p7zip +.BR [-d] +.BR [-h|--help] +.BR [--] +.BR [file ... ] + \-h print this help + \-d decompress file + \-- treats all subsequent arguments as file names, even if they start with a dash +.SH DESCRIPTION +7-Zip is a file archiver with the highest compression ratio. The program supports 7z (that implements LZMA compression algorithm), ZIP, CAB, ARJ, GZIP, BZIP2, TAR, CPIO, RPM and DEB formats. Compression ratio in the new 7z format is 30-50% better than ratio in ZIP format. +.TP +p7zip is a gzip-like CLI wrapper script for 7zip +.PP +.SH FUNCTION LETTERS +.TP +.B \-d +Decompress file +.TP +.B \-h, \--help +Print usage +.TP +.B \-- +Treats all subsequent arguments as file names, even if they start with a dash +.SH "SEE ALSO" +7z(1), 7za(1), 7zr(1), bzip2(1), gzip(1), zip(1) +.PP +.SH AUTHOR +.TP +Written for Debian by Mohammed Adnene Trojette. diff --git a/contrib/gzip-like_CLI_wrapper_for_7z/p7zip b/contrib/gzip-like_CLI_wrapper_for_7z/p7zip new file mode 100755 index 0000000..0b9f19b --- /dev/null +++ b/contrib/gzip-like_CLI_wrapper_for_7z/p7zip @@ -0,0 +1,144 @@ +#!/bin/sh +# gzip-like CLI wrapper for p7zip +# version 2.0 +# +# History +# 2.0 : +# - support for -filename, "file name" +# - p7zip file1 file2 ... + +set -e + +usage () + { + echo "Usage: $0 [-d] [-h|--help] [--] [ name ... ]" + echo "" + echo " -h print this help" + echo " -d decompress file" + echo " -- treats all subsequent arguments as file names, even if they start with a dash" + echo "" + exit 1 + } + +doit() +{ + compress=$1 + file="$2" + + if [ "${file}" != "" ] ; then + if ${compress} ; then + if [ -f "${file}" ] ; then + rm -f -- "${file}.7z" + 7za a -- "${file}.7z" "${file}" + if [ "$?" != "0" ] ; then + rm -f -- "${file}.7z" + exit 1 + fi + rm -- "${file}" + else + exit 1 + fi + else + case "${file}" in + *.7z) + if [ -f "${file}" ] ; then + 7za x -- "${file}" + if [ "$?" != "0" ] ; then + exit 1 + fi + rm -- "${file}" + else + exit 1 + fi + ;; + *) + echo "$0: ${file}: unknown suffix" + exit 1 + ;; + esac + fi + return 0 + fi + + P7ZIPTMP=${TMP:-/tmp} + tmp=`mktemp ${P7ZIPTMP}/p7zip.XXXXXXXX` + trap "rm -f -- ${tmp}" 0 + + if ${compress} ; then + if tty > /dev/null ; then + echo "$0: compressed data not written to a terminal." + echo "For help, type: $0 -h" + exit 1 + fi + rm -f -- ${tmp} + 7za a -si -- ${tmp} >/dev/null + if [ "$?" != "0" ] ; then + exit 1 + fi + cat ${tmp} + else + cat > ${tmp} + 7za x -so -- ${tmp} 2>/dev/null | cat + if [ "$?" != "0" ] ; then + exit 1 + fi + fi + + rm -f -- ${tmp} + return 0 +} + + +## MAIN + +compress=true +flag=true +file="" + +# make sure they're present, before we screw up +for i in mktemp 7za rm cat tty ; do + if ! which $i > /dev/null ; then + echo "$0: $i: command not found" + exit 1 + fi +done + +# files and flags +while [ "$#" != "0" ] ; do + case "$1" in + -d) + compress=false # decompressing + ;; + -c) + echo "$0: ignoring $1 option (not yet implemented)" + ;; + -h|--help) + usage + ;; + --) + flag=false + shift + break + ;; + *) + doit ${compress} "$1" + file="$1" + ;; + esac + shift +done + +# only files now +while [ "$#" != "0" ] ; do + doit ${compress} "$1" + file="$1" + shift +done + +if [ "${file}" = "" ] ; then + # compressing/decompressing using standart I/O + doit ${compress} +fi + +exit 0 + diff --git a/contrib/qnx630sp3/qnx630sp3-shared b/contrib/qnx630sp3/qnx630sp3-shared new file mode 100755 index 0000000..887cdbb --- /dev/null +++ b/contrib/qnx630sp3/qnx630sp3-shared @@ -0,0 +1,14 @@ +BIN="p7zip-4.47-x86-qnx6.shared" +cd ../../ && mkdir -p ../${BIN}/Codecs && \ +make clean && \ +mv makefile.machine makefile.machine.bak && \ +cp makefile.qnx_shared.bin makefile.machine && \ +make 7z && make 7za && make 7zr && make sfx && \ +mv ./bin/7z ../${BIN} && mv ./bin/7za ../${BIN} && mv ./bin/7zr ../${BIN} && mv ./bin/7zCon.sfx ../${BIN} && \ +make clean && \ +cp makefile.qnx_shared.so makefile.machine && \ +make 7z && \ +mv ./bin/7z.so ../${BIN} && mv ./bin/Codecs/Rar29.so ../${BIN}/Codecs && \ +make clean && \ +mv makefile.machine.bak makefile.machine +echo "All done - look for binaries in ../${BIN}" diff --git a/contrib/qnx630sp3/qnx630sp3-static b/contrib/qnx630sp3/qnx630sp3-static new file mode 100755 index 0000000..aee9213 --- /dev/null +++ b/contrib/qnx630sp3/qnx630sp3-static @@ -0,0 +1,10 @@ +BIN="p7zip-4.47-x86-qnx6.static" +cd ../../ && mkdir ../${BIN} && \ +make clean && \ +mv makefile.machine makefile.machine.bak && \ +cp makefile.qnx_static makefile.machine && \ +make 7za && make 7zr && make sfx && \ +mv ./bin/7za ../${BIN} && mv ./bin/7zr ../${BIN} && mv ./bin/7zCon.sfx ../${BIN} ; \ +make clean && \ +mv makefile.machine.bak makefile.machine +echo "All done - look for binaries in ../${BIN}" diff --git a/install.sh b/install.sh new file mode 100755 index 0000000..1e30071 --- /dev/null +++ b/install.sh @@ -0,0 +1,206 @@ +#! /bin/sh + +installShared() +{ + prg=$1 + if [ -x bin/${prg} ] + then + echo "- installing ${DEST_DIR}${DEST_BIN}/${prg}" + cp bin/${prg} "${DEST_DIR}${DEST_SHARE}/${prg}" + chmod 777 "${DEST_DIR}${DEST_SHARE}/${prg}" + strip "${DEST_DIR}${DEST_SHARE}/${prg}" + chmod 555 "${DEST_DIR}${DEST_SHARE}/${prg}" + echo "#! /bin/sh" > "${DEST_DIR}${DEST_BIN}/${prg}" + echo "\"${DEST_SHARE}/${prg}\" \"\$@\"" >> "${DEST_DIR}${DEST_BIN}/${prg}" + chmod 555 "${DEST_DIR}${DEST_BIN}/${prg}" + fi +} + +# global install +DEST_HOME=/usr/local +# for testing +# DEST_HOME=${HOME}/INSTALL/usr/local +DEST_BIN=${DEST_HOME}/bin +DEST_SHARE=${DEST_HOME}/lib/p7zip +DEST_MAN=${DEST_HOME}/man +DEST_SHARE_DOC=${DEST_HOME}/share/doc/p7zip +DEST_DIR= +[ "$1" ] && DEST_BIN="$1" +[ "$2" ] && DEST_SHARE="$2" +[ "$3" ] && DEST_MAN="$3" +[ "$4" ] && DEST_SHARE_DOC="$4" +[ "$5" ] && DEST_DIR="$5" + +use_share="n" + +if [ -x bin/7zCon.sfx ] +then + use_share="o" +fi + +if [ -x bin/7z ] +then + use_share="o" +fi + +if [ -x bin/7zG ] +then + use_share="o" +fi + +if [ -x bin/7zFM ] +then + use_share="o" +fi + +# cleaning previous install +rm -f "${DEST_DIR}${DEST_BIN}/7z" +rm -f "${DEST_DIR}${DEST_BIN}/7za" +rm -f "${DEST_DIR}${DEST_BIN}/7zr" +rm -f "${DEST_DIR}${DEST_BIN}/7zG" +rm -f "${DEST_DIR}${DEST_BIN}/p7zipForFilemanager" +rm -f "${DEST_DIR}${DEST_BIN}/7zFM" +rm -f "${DEST_DIR}${DEST_SHARE}/7z" +rm -f "${DEST_DIR}${DEST_SHARE}/7za" +rm -f "${DEST_DIR}${DEST_SHARE}/7zCon.sfx" +rm -f "${DEST_DIR}${DEST_SHARE}/7zr" +rm -f "${DEST_DIR}${DEST_SHARE}/7zG" +rm -f "${DEST_DIR}${DEST_SHARE}/7zFM" +rm -f "${DEST_DIR}${DEST_SHARE}/7z.so" +chmod -R 777 "${DEST_DIR}${DEST_SHARE}/Codecs" 2> /dev/null +chmod -R 777 "${DEST_DIR}${DEST_SHARE}/Formats" 2> /dev/null +rm -fr "${DEST_DIR}${DEST_SHARE}/Codecs" +rm -fr "${DEST_DIR}${DEST_SHARE}/Formats" +rm -fr "${DEST_DIR}${DEST_SHARE}/Lang" +rm -f "${DEST_DIR}${DEST_MAN}/man1/7z.1" +rm -f "${DEST_DIR}${DEST_MAN}/man1/7za.1" +rm -f "${DEST_DIR}${DEST_MAN}/man1/7zr.1" +chmod -R 777 "${DEST_DIR}${DEST_SHARE_DOC}" 2> /dev/null +rm -fr "${DEST_DIR}${DEST_SHARE_DOC}" + +if [ "${use_share}" = "o" ] +then + mkdir -p "${DEST_DIR}${DEST_BIN}" + mkdir -p "${DEST_DIR}${DEST_SHARE}" + installShared 7za + installShared 7zr + installShared 7z + installShared 7zG + installShared 7zFM + + if [ -x bin/7zCon.sfx ] + then + echo "- installing ${DEST_DIR}${DEST_SHARE}/7zCon.sfx" + cp bin/7zCon.sfx "${DEST_DIR}${DEST_SHARE}/7zCon.sfx" + chmod 777 "${DEST_DIR}${DEST_SHARE}/7zCon.sfx" + strip "${DEST_DIR}${DEST_SHARE}/7zCon.sfx" + chmod 555 "${DEST_DIR}${DEST_SHARE}/7zCon.sfx" + fi + + if [ -x bin/7z.so ] + then + echo "- installing ${DEST_DIR}${DEST_SHARE}/7z.so" + cp bin/7z.so "${DEST_DIR}${DEST_SHARE}/7z.so" + chmod 555 "${DEST_DIR}${DEST_SHARE}/7z.so" + fi + + if [ -d bin/Codecs ] + then + echo "- installing ${DEST_DIR}${DEST_SHARE}/Codecs" + cp -r bin/Codecs "${DEST_DIR}${DEST_SHARE}/" + chmod 555 "${DEST_DIR}${DEST_SHARE}"/*/* + fi + +else + if [ -x bin/7za ] + then + echo "- installing ${DEST_DIR}${DEST_BIN}/7za" + mkdir -p "${DEST_DIR}${DEST_BIN}" + cp bin/7za "${DEST_DIR}${DEST_BIN}/7za" + chmod 555 "${DEST_DIR}${DEST_BIN}/7za" + fi + + if [ -x bin/7zr ] + then + echo "- installing ${DEST_DIR}${DEST_BIN}/7zr" + mkdir -p "${DEST_DIR}${DEST_BIN}" + cp bin/7zr "${DEST_DIR}${DEST_BIN}/7zr" + chmod 555 "${DEST_DIR}${DEST_BIN}/7zr" + fi +fi + +mkdir -p "${DEST_DIR}${DEST_MAN}/man1" +if [ -d DOCS ] +then + echo "- installing ${DEST_DIR}${DEST_MAN}/man1/7z.1" + sed -e s?"{DEST_SHARE_DOC}"?"${DEST_SHARE_DOC}/DOCS"?g man1/7z.1 > "${DEST_DIR}${DEST_MAN}/man1/7z.1" + chmod 444 "${DEST_DIR}${DEST_MAN}/man1/7z.1" + + echo "- installing ${DEST_DIR}${DEST_MAN}/man1/7za.1" + sed -e s?"{DEST_SHARE_DOC}"?"${DEST_SHARE_DOC}/DOCS"?g man1/7za.1 > "${DEST_DIR}${DEST_MAN}/man1/7za.1" + chmod 444 "${DEST_DIR}${DEST_MAN}/man1/7za.1" + + echo "- installing ${DEST_DIR}${DEST_MAN}/man1/7zr.1" + sed -e s?"{DEST_SHARE_DOC}"?"${DEST_SHARE_DOC}/DOCS"?g man1/7zr.1 > "${DEST_DIR}${DEST_MAN}/man1/7zr.1" + chmod 444 "${DEST_DIR}${DEST_MAN}/man1/7zr.1" +else + echo "- installing ${DEST_DIR}${DEST_MAN}/man1/7z.1" + grep -v "{DEST_SHARE_DOC}" man1/7z.1 > "${DEST_DIR}${DEST_MAN}/man1/7z.1" + chmod 444 "${DEST_DIR}${DEST_MAN}/man1/7z.1" + + echo "- installing ${DEST_DIR}${DEST_MAN}/man1/7za.1" + grep -v "{DEST_SHARE_DOC}" man1/7za.1 > "${DEST_DIR}${DEST_MAN}/man1/7za.1" + chmod 444 "${DEST_DIR}${DEST_MAN}/man1/7za.1" + + echo "- installing ${DEST_DIR}${DEST_MAN}/man1/7zr.1" + grep -v "{DEST_SHARE_DOC}" man1/7zr.1 > "${DEST_DIR}${DEST_MAN}/man1/7zr.1" + chmod 444 "${DEST_DIR}${DEST_MAN}/man1/7zr.1" +fi + +if [ -f README ] +then + echo "- installing ${DEST_DIR}${DEST_SHARE_DOC}/README" + mkdir -p "${DEST_DIR}${DEST_SHARE_DOC}" + cp README "${DEST_DIR}${DEST_SHARE_DOC}/README" + chmod 444 "${DEST_DIR}${DEST_SHARE_DOC}/README" +fi + +if [ -f ChangeLog ] +then + echo "- installing ${DEST_DIR}${DEST_SHARE_DOC}/ChangeLog" + mkdir -p "${DEST_DIR}${DEST_SHARE_DOC}" + cp ChangeLog "${DEST_DIR}${DEST_SHARE_DOC}/ChangeLog" + chmod 444 "${DEST_DIR}${DEST_SHARE_DOC}/ChangeLog" +fi + +if [ -d DOCS ] +then + echo "- installing HTML help in ${DEST_DIR}${DEST_SHARE_DOC}/DOCS" + mkdir -p "${DEST_DIR}${DEST_SHARE_DOC}" + cp -r DOCS "${DEST_DIR}${DEST_SHARE_DOC}/DOCS" + find "${DEST_DIR}${DEST_SHARE_DOC}/DOCS" -type d -exec chmod 555 {} \; + find "${DEST_DIR}${DEST_SHARE_DOC}/DOCS" -type f -exec chmod 444 {} \; +fi + +use_lang="n" + +if [ -x bin/7zG ] +then + use_lang="o" + cp GUI/p7zipForFilemanager "${DEST_DIR}${DEST_BIN}/" + chmod 555 "${DEST_DIR}${DEST_BIN}/" +fi + +if [ -x bin/7zFM ] +then + use_lang="o" +fi + +if [ "${use_lang}" = "o" ] +then + echo "- installing Lang in ${DEST_DIR}${DEST_SHARE}" + cp -r GUI/Lang "${DEST_DIR}${DEST_SHARE}/" + find "${DEST_DIR}${DEST_SHARE}/Lang" -type d -exec chmod 555 {} \; + find "${DEST_DIR}${DEST_SHARE}/Lang" -type f -exec chmod 444 {} \; +fi + diff --git a/install_local_context_menu.sh b/install_local_context_menu.sh new file mode 100755 index 0000000..e1fc233 --- /dev/null +++ b/install_local_context_menu.sh @@ -0,0 +1,18 @@ +#! /bin/sh + +tryInstall() +{ + prg=$1 + + if [ -d ${HOME}/.kde/share/apps/${prg} ] + then + echo "Installing menus for ${prg} ..." + mkdir -p ${HOME}/.kde/share/apps/${prg}/servicemenus + cp GUI/kde/*.desktop ${HOME}/.kde/share/apps/${prg}/servicemenus/ + fi +} + +tryInstall d3lphin +tryInstall dolphin +tryInstall konqueror + diff --git a/integration_context_menu.txt b/integration_context_menu.txt new file mode 100644 index 0000000..393851b --- /dev/null +++ b/integration_context_menu.txt @@ -0,0 +1,51 @@ + + +/usr/share/apps/d3lphin/servicemenus/compress.desktop + +/usr/share/apps/d3lphin/servicemenus/ark_compress.desktop +/usr/share/apps/d3lphin/servicemenus/ark_extract.desktop +/usr/share/apps/d3lphin/servicemenus/ark_extract_subdir.desktop +/usr/share/icons/hicolor/128x128/apps/d3lphin.png +/usr/share/icons/hicolor/22x22/apps/d3lphin.png +/usr/share/icons/hicolor/64x64/apps/d3lphin.png +/usr/share/icons/hicolor/48x48/apps/d3lphin.png +/usr/share/icons/hicolor/32x32/apps/d3lphin.png +/usr/share/icons/hicolor/16x16/apps/d3lphin.png +/usr/share/applications/kde/d3lphin.desktop + + +/usr/share/applications/kde/Home.desktop +/usr/share/icons/hicolor/128x128/apps/konqueror.png +/usr/share/icons/hicolor/16x16/apps/konqueror.png +/usr/share/doc/konqueror/SERVICEMENUS + + +/usr/share/applications/nautilus.desktop + + +/usr/share/file-roller/icons/hicolor/16x16/actions/add-files-to-archive.png +/usr/share/file-roller/icons/hicolor/16x16/actions/add-folder-to-archive.png +/usr/share/file-roller/icons/hicolor/16x16/actions/extract-archive.png +/usr/share/icons/hicolor/16x16/apps/file-roller.png + +/usr/share/applications/file-roller.desktop + +/usr/lib/mime/packages/file-roller + + +/usr/share/menu/ark +/usr/share/applications/kde/ark.desktop +/usr/share/icons/hicolor/16x16/apps/ark.png +... +/usr/share/icons/hicolor/128x128/apps/ark.png +/usr/share/icons/hicolor/scalable/apps/ark.svgz +/usr/share/apps/ark/ark_part.rc +/usr/share/apps/ark/ark_part_readonly.rc +/usr/share/apps/ark/arkui.rc +/usr/share/config.kcfg/ark.kcfg +/usr/share/services/ark_part.desktop +/usr/share/pixmaps/ark.xpm + + + + diff --git a/makefile b/makefile new file mode 100644 index 0000000..e12d711 --- /dev/null +++ b/makefile @@ -0,0 +1,174 @@ +MKDIR = mkdir -p + +DEST_HOME=/usr/local +DEST_BIN=$(DEST_HOME)/bin +DEST_SHARE=$(DEST_HOME)/lib/p7zip +DEST_SHARE_DOC=$(DEST_HOME)/share/doc/p7zip +DEST_MAN=$(DEST_HOME)/man + +.PHONY: default all all2 7za 7zG 7zFM sfx 7z 7zr Client7z common common7z clean tar_bin depend test test_7z test_7zr test_7zG test_Client7z all_test app + +default:7za + +all:7za sfx + +all2: 7za sfx 7z + +all3: 7za sfx 7z 7zr + +all4: 7za sfx 7z 7zr Client7z 7zG 7zFM + +all_test : test test_7z test_7zr test_Client7z + $(MAKE) -C CPP/7zip/Compress/LZMA_Alone test + +common: + $(MKDIR) bin + +7za: common + $(MAKE) -C CPP/7zip/Bundles/Alone all + $(MAKE) -C check/my_86_filter all + +7zr: common + $(MAKE) -C CPP/7zip/Bundles/Alone7z all + +Client7z: common + $(MKDIR) bin/Codecs + $(MAKE) -C CPP/7zip/Bundles/Format7zFree all + $(MAKE) -C CPP/7zip/UI/Client7z all + +app: common 7zFM 7zG 7z sfx + rm -fr p7zip.app + $(MKDIR) p7zip.app + cp -rp GUI/Contents p7zip.app/ + $(MKDIR) p7zip.app/Contents/MacOS + cp bin/7zFM p7zip.app/Contents/MacOS/ + cp bin/7zG p7zip.app/Contents/MacOS/ + cp bin/7z.so p7zip.app/Contents/MacOS/ + cp bin/7zCon.sfx p7zip.app/Contents/MacOS/ + cp -rp bin/Codecs p7zip.app/Contents/MacOS/ + cp -rp GUI/Lang p7zip.app/Contents/MacOS/ + cp -rp GUI/help p7zip.app/Contents/MacOS/ + +depend: + $(MAKE) -C CPP/7zip/Bundles/Alone depend + $(MAKE) -C CPP/7zip/Bundles/Alone7z depend + $(MAKE) -C CPP/7zip/Bundles/SFXCon depend + $(MAKE) -C CPP/7zip/UI/Client7z depend + $(MAKE) -C CPP/7zip/UI/Console depend + $(MAKE) -C CPP/7zip/Bundles/Format7zFree depend + $(MAKE) -C CPP/7zip/Compress/Rar depend + $(MAKE) -C CPP/7zip/UI/GUI depend + $(MAKE) -C CPP/7zip/UI/FileManager depend + $(MAKE) -C check/my_86_filter depend + +sfx: common + $(MKDIR) bin + $(MAKE) -C CPP/7zip/Bundles/SFXCon all + +common7z:common + $(MKDIR) bin/Codecs + $(MAKE) -C CPP/7zip/Bundles/Format7zFree all + $(MAKE) -C CPP/7zip/Compress/Rar all + +7z: common7z + $(MAKE) -C CPP/7zip/UI/Console all + +7zG: common7z + cd bin ; rm -f Lang ; ln -s ../GUI/Lang . + cd bin ; rm -f help ; ln -s ../GUI/help . + $(MAKE) -C CPP/7zip/UI/GUI all + +7zFM: common7z + cd bin ; rm -f Lang ; ln -s ../GUI/Lang . + cd bin ; rm -f help ; ln -s ../GUI/help . + $(MAKE) -C CPP/7zip/UI/FileManager all + +clean: + $(MAKE) -C CPP/myWindows clean + $(MAKE) -C CPP/7zip/Bundles/Alone clean + $(MAKE) -C CPP/7zip/Bundles/Alone7z clean + $(MAKE) -C CPP/7zip/Bundles/SFXCon clean + $(MAKE) -C CPP/7zip/UI/Client7z clean + $(MAKE) -C CPP/7zip/UI/Console clean + $(MAKE) -C CPP/7zip/UI/FileManager clean + $(MAKE) -C CPP/7zip/UI/GUI clean + $(MAKE) -C CPP/7zip/Bundles/Format7zFree clean + $(MAKE) -C CPP/7zip/Compress/Rar clean + $(MAKE) -C CPP/7zip/Compress/LZMA_Alone clean + $(MAKE) -C CPP/7zip/Bundles/AloneGCOV clean + $(MAKE) -C CPP/7zip/TEST/TestUI clean + $(MAKE) -C check/my_86_filter clean + rm -fr bin + rm -fr p7zip.app + rm -fr CPP/7zip/P7ZIP.* + rm -fr CPP/7zip/CMAKE/P7ZIP.* + rm -fr CPP/7zip/PREMAKE/P7ZIP.* + rm -f CPP/7zip/QMAKE/*/*.o + rm -f CPP/7zip/QMAKE/*/Makefile + rm -f CPP/7zip/QMAKE/*/*.pro.user + rm -f CPP/7zip/QMAKE/*/*.x + rm -f make.log 1 2 + rm -f check/7z.so + rm -fr p7zip.app/Contents/MacOS + find . -name "*~" -exec rm -f {} \; + find . -name "*.orig" -exec rm -fr {} \; + find . -name ".*.swp" -exec rm -f {} \; + find . -name "*.[ch]" -exec chmod -x {} \; + find . -name "*.cpp" -exec chmod -x {} \; + find . -name "*.asm" -exec chmod -x {} \; + find . -name "makefile*" -exec chmod -x {} \; + find . -name ".DS_Store" -exec rm -f {} \; + find . -name "._*" -exec rm -f {} \; + chmod -x ChangeLog README TODO man1/* DOCS/*.txt + chmod +x contrib/VirtualFileSystemForMidnightCommander/u7z + chmod +x contrib/gzip-like_CLI_wrapper_for_7z/p7zip + chmod +x install.sh check/check.sh check/clean_all.sh check/check_7zr.sh + cd check ; ./clean_all.sh + +test: 7za sfx + cd check ; ./check.sh ../bin/7za + +test_7z: 7z sfx + cd check ; ./check.sh ../bin/7z + +test_7zr: 7zr sfx + cd check ; ./check_7zr.sh ../bin/7zr + +test_7zG: 7zG sfx + cd check ; ./check.sh ../bin/7zG + +test_Client7z: Client7z + cd check ; ./check_Client7z.sh ../bin/Client7z + +install: + ./install.sh $(DEST_BIN) $(DEST_SHARE) $(DEST_MAN) $(DEST_SHARE_DOC) $(DEST_DIR) + +REP=$(shell pwd) +ARCHIVE=$(shell basename $(REP)) + +.PHONY: tar_all tar_all2 src_7z tar_bin tar_bin2 + +tar_all : clean + rm -f ../$(ARCHIVE)_src_all.tar.bz2 + cp makefile.linux_any_cpu makefile.machine + cd .. ; (tar cf - $(ARCHIVE) | bzip2 -9 > $(ARCHIVE)_src_all.tar.bz2) + +tar_all2 : clean + rm -f ../$(ARCHIVE)_src_all.tar.bz2 + cp makefile.linux_any_cpu makefile.machine + cd .. ; (tar cf - $(ARCHIVE) | 7za a -mx=9 -tbzip2 -si $(ARCHIVE)_src_all.tar.bz2 ) + +src_7z : clean + rm -f ../$(ARCHIVE)_src.7z + cd .. ; 7za a -mx=9 -m0=ppmd:mem=128m:o=32 $(ARCHIVE)_src.7z $(ARCHIVE) + +tar_bin: + rm -f ../$(ARCHIVE)_x86_linux_bin.tar.bz2 + chmod +x install.sh contrib/VirtualFileSystemForMidnightCommander/u7z contrib/gzip-like_CLI_wrapper_for_7z/p7zip + cd .. ; (tar cf - $(ARCHIVE)/bin $(ARCHIVE)/contrib $(ARCHIVE)/man1 $(ARCHIVE)/install.sh $(ARCHIVE)/ChangeLog $(ARCHIVE)/DOCS $(ARCHIVE)/README $(ARCHIVE)/TODO | bzip2 -9 > $(ARCHIVE)_x86_linux_bin.tar.bz2) + +tar_bin2: + rm -f ../$(ARCHIVE)_x86_linux_bin.tar.bz2 + chmod +x install.sh contrib/VirtualFileSystemForMidnightCommander/u7z contrib/gzip-like_CLI_wrapper_for_7z/p7zip + cd .. ; (tar cf - $(ARCHIVE)/bin $(ARCHIVE)/contrib $(ARCHIVE)/man1 $(ARCHIVE)/install.sh $(ARCHIVE)/ChangeLog $(ARCHIVE)/DOCS $(ARCHIVE)/README $(ARCHIVE)/TODO | 7za a -mx=9 -tbzip2 -si $(ARCHIVE)_x86_linux_bin.tar.bz2) + diff --git a/makefile.aix_gcc b/makefile.aix_gcc new file mode 100644 index 0000000..36ea981 --- /dev/null +++ b/makefile.aix_gcc @@ -0,0 +1,22 @@ +# +# makefile for AIX +# tested with AIX 5.3 and g++ 4.1.0 +# + +OPTFLAGS=-O + +ALLFLAGS=${OPTFLAGS} -s \ + -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGE_FILES \ + -DNDEBUG -D_REENTRANT -DENV_UNIX \ + $(LOCAL_FLAGS) + +CXX=g++ $(ALLFLAGS) +CC=gcc $(ALLFLAGS) +CC_SHARED=-fPIC +LINK_SHARED=-fPIC -shared + +LOCAL_LIBS=-lpthread +LOCAL_LIBS_DLL=$(LOCAL_LIBS) -ldl + +OBJ_CRC32=$(OBJ_CRC32_C) + diff --git a/makefile.beos b/makefile.beos new file mode 100644 index 0000000..a1ff16d --- /dev/null +++ b/makefile.beos @@ -0,0 +1,18 @@ + +OPTFLAGS=-O + +ALLFLAGS=${OPTFLAGS} -s \ + -DENV_BEOS \ + -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE \ + -DNDEBUG -D_REENTRANT -DENV_UNIX \ + $(LOCAL_FLAGS) + +CXX=g++ $(ALLFLAGS) +CC=gcc $(ALLFLAGS) +LINK_SHARED=-nostart + +LOCAL_LIBS=-lbe +LOCAL_LIBS_DLL=$(LOCAL_LIBS) + +OBJ_CRC32=$(OBJ_CRC32_C) + diff --git a/makefile.crc32 b/makefile.crc32 new file mode 100644 index 0000000..d04f0d6 --- /dev/null +++ b/makefile.crc32 @@ -0,0 +1,8 @@ + +# CRC32, C version +OBJ_CRC32_C=7zCrc.o 7zCrcOpt.o + +# CRC32, ASM version +OBJ_CRC32_x86=7zCrcT8.o 7zCrcT8U.o +OBJ_CRC32_x86_64=7zCrcT8.o 7zCrcT8U.o + diff --git a/makefile.cygwin b/makefile.cygwin new file mode 100644 index 0000000..c6edc3b --- /dev/null +++ b/makefile.cygwin @@ -0,0 +1,20 @@ + +OPTFLAGS=-O + +ALLFLAGS=${OPTFLAGS} -s \ + -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE \ + -DNDEBUG -D_REENTRANT \ + -DENV_UNIX \ + $(LOCAL_FLAGS) + +CXX=g++ $(ALLFLAGS) +CC=gcc $(ALLFLAGS) +CC_SHARED= +LINK_SHARED=-shared + +# Cygwin does not need -ldl +LOCAL_LIBS=-lpthread +LOCAL_LIBS_DLL=$(LOCAL_LIBS) + +OBJ_CRC32=$(OBJ_CRC32_C) + diff --git a/makefile.cygwin_asm b/makefile.cygwin_asm new file mode 100644 index 0000000..59175fd --- /dev/null +++ b/makefile.cygwin_asm @@ -0,0 +1,21 @@ + +OPTFLAGS=-O + +ALLFLAGS=${OPTFLAGS} -s \ + -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE \ + -DNDEBUG -D_REENTRANT \ + -DENV_UNIX \ + $(LOCAL_FLAGS) + +CXX=g++ $(ALLFLAGS) +CC=gcc $(ALLFLAGS) +LINK_SHARED=-shared +ASM=nasm -f gnuwin32 + +# Cygwin does not need -ldl +LOCAL_LIBS=-lpthread +LOCAL_LIBS_DLL=$(LOCAL_LIBS) + +CPU=x86 +OBJ_CRC32=$(OBJ_CRC32_x86) + diff --git a/makefile.djgpp_old b/makefile.djgpp_old new file mode 100644 index 0000000..f07e52b --- /dev/null +++ b/makefile.djgpp_old @@ -0,0 +1,21 @@ +# +# makefile for DJGPP +# (available targets for DJGPP : all test clean) +# + +OPTFLAGS=-O + +ALLFLAGS=${OPTFLAGS} -s \ + -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE \ + -DNDEBUG -D_REENTRANT -DENV_UNIX \ + $(LOCAL_FLAGS) + +CXX=gpp $(ALLFLAGS) +CC=gcc $(ALLFLAGS) +LINK_SHARED=-shared + +LOCAL_LIBS=-lpthread -lsocket +LOCAL_LIBS_DLL=$(LOCAL_LIBS) + +OBJ_CRC32=$(OBJ_CRC32_C) + diff --git a/makefile.djgpp_watt b/makefile.djgpp_watt new file mode 100644 index 0000000..0c60a14 --- /dev/null +++ b/makefile.djgpp_watt @@ -0,0 +1,47 @@ +# makefile.djgpp (using DJDEV 2.04, GCC/G++ 4.3.2, BinUtils 2.19, Make 3.81) +# Tested with p7zip 4.61 at http://sourceforge.net/projects/p7zip +# +# Add this via REGEDIT.EXE to Vista SP1 registry (dword, e.g. "128000000"): +# HKLM\System\CurrentControlSet\Control\Wow\DpmiLimit +# +# Needs two libs (N.B. Note that /beta/PTH207B.ZIP is 686+ only !!): +# 1). ftp://ftp.delorie.com/pub/djgpp/current/v2gnu/pth207[bs].zip (297k,728k) +# http://gd.tuwien.ac.at/pc/dos/djgpp/current/v2gnu/ (faster URL) +# 2). http://www.bgnett.no/~giva/watt32s-2.2-dev.10.zip (2.3 MB) +# +# How to build: "cp makefile.djgpp makefile.machine ; make" +# Available targets (.EXEs) for DJGPP: 7za 7zr sfx +# +# P.S. "upx --best --lzma --all-filters bin/*" +# http://rugxulo.googlepages.com/upx303c.txt (how to compile UPX-UCL) + +ifeq ($(WATT_ROOT),) +$(error Please set WATT_ROOT env. var. first!) +endif + +#OPTFLAGS=-O +OPTIMIZE=-Os -mtune=i686 -fomit-frame-pointer +OPTFLAGS=$(OPTIMIZE) -I$(WATT_ROOT)/inc -L$(WATT_ROOT)/lib + +ALLFLAGS=$(OPTFLAGS) -s \ + -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE \ + -DNDEBUG -D_REENTRANT -DENV_UNIX \ + $(LOCAL_FLAGS) + +CXX=gpp $(ALLFLAGS) +CC=gcc $(ALLFLAGS) +#LINK_SHARED=-shared +LINK_SHARED= + +LOCAL_LIBS_DLL=$(LOCAL_LIBS) + +#LOCAL_LIBS=-lpthread -lsocket +LOCAL_LIBS=-lpthread -lwatt + +#OBJ_CRC32=$(OBJ_CRC32_C) + +ASM=yasm -f coff +#ASM=nasm -f coff +CPU=x86 +OBJ_CRC32=$(OBJ_CRC32_x86) + diff --git a/makefile.freebsd5 b/makefile.freebsd5 new file mode 100644 index 0000000..aa141c2 --- /dev/null +++ b/makefile.freebsd5 @@ -0,0 +1,20 @@ +# +# makefile for FreeBSD 5 (x86, PPC, alpha ...) +# + +OPTFLAGS=-O + +ALLFLAGS=${OPTFLAGS} -s \ + -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE \ + -DNDEBUG -D_REENTRANT -DENV_UNIX \ + $(LOCAL_FLAGS) + +CXX=g++ $(ALLFLAGS) +CC=gcc $(ALLFLAGS) +LINK_SHARED=-shared + +LOCAL_LIBS=-lc_r +LOCAL_LIBS_DLL=$(LOCAL_LIBS) + +OBJ_CRC32=$(OBJ_CRC32_C) + diff --git a/makefile.freebsd6 b/makefile.freebsd6 new file mode 100644 index 0000000..626bff7 --- /dev/null +++ b/makefile.freebsd6 @@ -0,0 +1,20 @@ +# +# makefile for FreeBSD 6 (x86, PPC, alpha ...) +# + +OPTFLAGS=-O + +ALLFLAGS=${OPTFLAGS} -s \ + -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE \ + -DNDEBUG -D_REENTRANT -DENV_UNIX \ + $(LOCAL_FLAGS) + +CXX=g++ $(ALLFLAGS) +CC=gcc $(ALLFLAGS) +LINK_SHARED=-shared + +LOCAL_LIBS=-lpthread +LOCAL_LIBS_DLL=$(LOCAL_LIBS) + +OBJ_CRC32=$(OBJ_CRC32_C) + diff --git a/makefile.glb b/makefile.glb new file mode 100644 index 0000000..30bd8a1 --- /dev/null +++ b/makefile.glb @@ -0,0 +1,39 @@ + +RM=rm -f +CFLAGS=-c -I. \ +-I../../../../C \ +-I../../../myWindows \ +-I../../../include_windows \ +-I../../.. + +CXXFLAGS=-c -I. \ +-I../../../myWindows \ +-I../../../ \ +-I../../../include_windows + +DFLAGS=-MM -I. \ +-I../../../myWindows \ +-I../../../ \ +-I../../../include_windows + +all: $(PCH_NAME) $(PROG) + +$(PROG): $(OBJS) + $(CXX) $(LOCAL_SHARED) -o $(PROG) $(LDFLAGS) $(OBJS) $(LIBS) + +include makefile.list +include makefile.depend + +depend: + rm -f makefile.depend + $(CXX) $(DFLAGS) $(SRCS) > makefile.depend + +clean: + -@$(RM) $(PROG) core *.exe *.o *~ .*.swp *.orig *.gch $(PROGS) + -@$(RM) -fr SunWS_cache/ + -@$(RM) -r .inslog2 pchdir/ tca.map ir.out + -@$(RM) make.log tags 1 2 + +# CRC32, ASM version +7zCrcT8U.o : ../../../../Asm/$(CPU)/7zCrcT8U.asm + $(ASM) ../../../../Asm/$(CPU)/7zCrcT8U.asm -o 7zCrcT8U.o diff --git a/makefile.gprof b/makefile.gprof new file mode 100644 index 0000000..8a1047d --- /dev/null +++ b/makefile.gprof @@ -0,0 +1,18 @@ + +OPTFLAGS=-O -g -pg +ALLFLAGS=${OPTFLAGS} \ + -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE \ + -DNDEBUG -D_REENTRANT -DENV_UNIX \ + $(LOCAL_FLAGS) + +CXX=g++ $(ALLFLAGS) +CC=gcc $(ALLFLAGS) +LINK_SHARED=-shared + +LOCAL_LIBS=-lpthread +LOCAL_LIBS_DLL=$(LOCAL_LIBS) -ldl +# static linkage +# LOCAL_LIBS=-static -lpthread + +OBJ_CRC32=$(OBJ_CRC32_C) + diff --git a/makefile.hpux-acc b/makefile.hpux-acc new file mode 100644 index 0000000..b8d53d1 --- /dev/null +++ b/makefile.hpux-acc @@ -0,0 +1,17 @@ + +OPTFLAGS=-O + +ALLFLAGS=${OPTFLAGS} -mt -DD64 +Z +Ww2101 \ +-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE \ +-DNDEBUG -D_REENTRANT -DENV_UNIX \ +$(LOCAL_FLAGS) + +CXX=aCC -AA $(ALLFLAGS) +CC=aCC -Ae $(ALLFLAGS) + +LINK_SHARED=-b +LOCAL_LIBS= +LOCAL_LIBS_DLL=$(LOCAL_LIBS) + +OBJ_CRC32=$(OBJ_CRC32_C) + diff --git a/makefile.hpux-acc_64 b/makefile.hpux-acc_64 new file mode 100644 index 0000000..ae98f21 --- /dev/null +++ b/makefile.hpux-acc_64 @@ -0,0 +1,19 @@ + +# build 64 bits program (Tested on HPUX with Itanium CPU) + +OPTFLAGS=-O + +ALLFLAGS=${OPTFLAGS} -mt +DD64 +Z +Ww2101 \ +-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE \ +-DNDEBUG -D_REENTRANT -DENV_UNIX \ +$(LOCAL_FLAGS) + +CXX=aCC -AA $(ALLFLAGS) +CC=aCC -Ae $(ALLFLAGS) + +LINK_SHARED=-b +LOCAL_LIBS= +LOCAL_LIBS_DLL=$(LOCAL_LIBS) + +OBJ_CRC32=$(OBJ_CRC32_C) + diff --git a/makefile.hpux-gcc b/makefile.hpux-gcc new file mode 100644 index 0000000..6760e1b --- /dev/null +++ b/makefile.hpux-gcc @@ -0,0 +1,21 @@ +# +# makefile for HP-UX 11 +# + +OPTFLAGS=-O + +ALLFLAGS=${OPTFLAGS} -s \ + -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE \ + -DNDEBUG -D_REENTRANT -DENV_UNIX \ + $(LOCAL_FLAGS) + +CXX=g++ $(ALLFLAGS) +CC=gcc $(ALLFLAGS) +CC_SHARED=-fPIC +LINK_SHARED=-fPIC -shared + +LOCAL_LIBS=-lpthread +LOCAL_LIBS_DLL=$(LOCAL_LIBS) + +OBJ_CRC32=$(OBJ_CRC32_C) + diff --git a/makefile.linux_amd64 b/makefile.linux_amd64 new file mode 100644 index 0000000..1d494d3 --- /dev/null +++ b/makefile.linux_amd64 @@ -0,0 +1,22 @@ + +OPTFLAGS=-O + +# use "-m32" to have a 32bits executable +ALLFLAGS=-m64 ${OPTFLAGS} -pipe -s \ + -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE \ + -DNDEBUG -D_REENTRANT -DENV_UNIX \ + -D_7ZIP_LARGE_PAGES \ + $(LOCAL_FLAGS) + +CXX=g++ $(ALLFLAGS) +CC=gcc $(ALLFLAGS) +CC_SHARED=-fPIC +LINK_SHARED=-fPIC -shared + +PRE_COMPILED_HEADER=StdAfx.h.gch + +LOCAL_LIBS=-lpthread +LOCAL_LIBS_DLL=$(LOCAL_LIBS) -ldl + +OBJ_CRC32=$(OBJ_CRC32_C) + diff --git a/makefile.linux_amd64_asm b/makefile.linux_amd64_asm new file mode 100644 index 0000000..87e0f8d --- /dev/null +++ b/makefile.linux_amd64_asm @@ -0,0 +1,24 @@ + +OPTFLAGS=-O + +# use "-m32" to have a 32bits executable +ALLFLAGS=-m64 ${OPTFLAGS} -pipe -s \ + -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE \ + -DNDEBUG -D_REENTRANT -DENV_UNIX \ + -D_7ZIP_LARGE_PAGES \ + $(LOCAL_FLAGS) + +CXX=g++ $(ALLFLAGS) +CC=gcc $(ALLFLAGS) +CC_SHARED=-fPIC +LINK_SHARED=-fPIC -shared +ASM=yasm -f elf -m amd64 + +PRE_COMPILED_HEADER=StdAfx.h.gch + +LOCAL_LIBS=-lpthread +LOCAL_LIBS_DLL=$(LOCAL_LIBS) -ldl + +CPU=x64 +OBJ_CRC32=$(OBJ_CRC32_x86_64) + diff --git a/makefile.linux_amd64_asm_icc b/makefile.linux_amd64_asm_icc new file mode 100644 index 0000000..2823e07 --- /dev/null +++ b/makefile.linux_amd64_asm_icc @@ -0,0 +1,27 @@ +# +# makefile for Linux (x86_64) +# + +# OPTFLAGS=-fast -msse3 -s +OPTFLAGS=-m64 -O2 -march=core2 # -ipo # -no-gcc + +ALLFLAGS=${OPTFLAGS} \ + -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE \ + -DNDEBUG -D_REENTRANT -DENV_UNIX \ + -D_7ZIP_LARGE_PAGES \ + $(LOCAL_FLAGS) + +CXX=icpc -i-static $(ALLFLAGS) +CC=icc $(ALLFLAGS) +CC_SHARED=-fPIC +LINK_SHARED=-fPIC -shared +ASM=yasm -f elf -m amd64 + +PRE_COMPILED_HEADER=StdAfx.h.gch + +LOCAL_LIBS=-lpthread +LOCAL_LIBS_DLL=$(LOCAL_LIBS) -ldl + +CPU=x64 +OBJ_CRC32=$(OBJ_CRC32_x86_64) + diff --git a/makefile.linux_any_cpu b/makefile.linux_any_cpu new file mode 100644 index 0000000..05731d8 --- /dev/null +++ b/makefile.linux_any_cpu @@ -0,0 +1,22 @@ +# +# makefile for Linux (x86, PPC, alpha ...) +# + +OPTFLAGS=-O + +ALLFLAGS=${OPTFLAGS} -pipe -s \ + -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE \ + -DNDEBUG -D_REENTRANT -DENV_UNIX \ + -D_7ZIP_LARGE_PAGES \ + $(LOCAL_FLAGS) + +CXX=g++ $(ALLFLAGS) +CC=gcc $(ALLFLAGS) +CC_SHARED=-fPIC +LINK_SHARED=-fPIC -shared + +LOCAL_LIBS=-lpthread +LOCAL_LIBS_DLL=$(LOCAL_LIBS) -ldl + +OBJ_CRC32=$(OBJ_CRC32_C) + diff --git a/makefile.linux_any_cpu_gcc_4.X b/makefile.linux_any_cpu_gcc_4.X new file mode 100644 index 0000000..03e69e9 --- /dev/null +++ b/makefile.linux_any_cpu_gcc_4.X @@ -0,0 +1,24 @@ +# +# makefile for Linux (x86, PPC, alpha ...) +# + +OPTFLAGS=-O + +ALLFLAGS=${OPTFLAGS} -pipe -s \ + -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE \ + -DNDEBUG -D_REENTRANT -DENV_UNIX \ + -D_7ZIP_LARGE_PAGES \ + $(LOCAL_FLAGS) + +CXX=g++ $(ALLFLAGS) -DENV_HAVE_GCCVISIBILITYPATCH -fvisibility=hidden -fvisibility-inlines-hidden +CC=gcc $(ALLFLAGS) +CC_SHARED=-fPIC +LINK_SHARED=-fPIC -shared + +PRE_COMPILED_HEADER=StdAfx.h.gch + +LOCAL_LIBS=-lpthread +LOCAL_LIBS_DLL=$(LOCAL_LIBS) -ldl + +OBJ_CRC32=$(OBJ_CRC32_C) + diff --git a/makefile.linux_clang_amd64 b/makefile.linux_clang_amd64 new file mode 100644 index 0000000..aff5fb1 --- /dev/null +++ b/makefile.linux_clang_amd64 @@ -0,0 +1,22 @@ + +OPTFLAGS=-O3 + +# use "-m32" to have a 32bits executable +ALLFLAGS=-m64 ${OPTFLAGS} -pipe \ + -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE \ + -DNDEBUG -D_REENTRANT -DENV_UNIX \ + -D_7ZIP_LARGE_PAGES \ + $(LOCAL_FLAGS) + +CXX=clang++ $(ALLFLAGS) +CC=clang $(ALLFLAGS) +CC_SHARED=-fPIC +LINK_SHARED=-fPIC -shared + +PRE_COMPILED_HEADER=StdAfx.h.gch + +LOCAL_LIBS=-s -lpthread +LOCAL_LIBS_DLL=$(LOCAL_LIBS) -ldl + +OBJ_CRC32=$(OBJ_CRC32_C) + diff --git a/makefile.linux_cross_arm b/makefile.linux_cross_arm new file mode 100644 index 0000000..22982dc --- /dev/null +++ b/makefile.linux_cross_arm @@ -0,0 +1,22 @@ +# +# makefile for Linux (CROSS ARM) +# + +OPTFLAGS=-O + +ALLFLAGS=${OPTFLAGS} -pipe -s \ + -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE \ + -DNDEBUG -D_REENTRANT -DENV_UNIX \ + -D_7ZIP_LARGE_PAGES \ + $(LOCAL_FLAGS) + +CXX=/usr/bin/arm-linux-gnueabi-g++ $(ALLFLAGS) +CC=/usr/bin/arm-linux-gnueabi-gcc $(ALLFLAGS) +CC_SHARED=-fPIC -DPIC +LINK_SHARED=-fPIC -DPIC -shared + +LOCAL_LIBS=-lpthread +LOCAL_LIBS_DLL=$(LOCAL_LIBS) -ldl + +OBJ_CRC32=$(OBJ_CRC32_C) + diff --git a/makefile.linux_gcc_2.95_no_need_for_libstdc b/makefile.linux_gcc_2.95_no_need_for_libstdc new file mode 100644 index 0000000..5eca6c1 --- /dev/null +++ b/makefile.linux_gcc_2.95_no_need_for_libstdc @@ -0,0 +1,20 @@ + +OPTFLAGS=-O2 + +ALLFLAGS=${OPTFLAGS} -pipe -s \ + -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE \ + -DNDEBUG -D_REENTRANT -DENV_UNIX \ + -D_7ZIP_LARGE_PAGES \ + $(LOCAL_FLAGS) + +CXX=gcc $(ALLFLAGS) +CC=gcc $(ALLFLAGS) +LINK_SHARED=-shared +ASM=nasm -f elf + +LOCAL_LIBS=-lpthread +LOCAL_LIBS_DLL=$(LOCAL_LIBS) -ldl + +CPU=x86 +OBJ_CRC32=$(OBJ_CRC32_x86) + diff --git a/makefile.linux_other b/makefile.linux_other new file mode 100644 index 0000000..873313e --- /dev/null +++ b/makefile.linux_other @@ -0,0 +1,23 @@ +# +# makefile for Linux (x86, PPC, alpha ...) +# + +OPTFLAGS=-O + +ALLFLAGS=${OPTFLAGS} -pipe -s \ + -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE \ + -DNDEBUG -D_REENTRANT -DENV_UNIX \ + -D_7ZIP_LARGE_PAGES \ + $(LOCAL_FLAGS) + +CXX=/home/me/BUILDROOT/buildroot-2010.11/output/staging/usr/bin/i386-unknown-linux-uclibc-g++ $(ALLFLAGS) +CC=/home/me/BUILDROOT/buildroot-2010.11/output/staging/usr/bin/i386-unknown-linux-uclibc-gcc $(ALLFLAGS) +CC_SHARED=-fPIC +LINK_SHARED=-fPIC -shared + +#LOCAL_LIBS=-L,/home/me/BUILDROOT/buildroot-2010.11/output/staging/usr/lib -Wl,-rpath,/home/me/BUILDROOT/buildroot-2010.11/output/staging/usr/lib -lpthread +LOCAL_LIBS=-lpthread +LOCAL_LIBS_DLL=$(LOCAL_LIBS) -ldl + +OBJ_CRC32=$(OBJ_CRC32_C) + diff --git a/makefile.linux_s390x b/makefile.linux_s390x new file mode 100644 index 0000000..f8dd8c2 --- /dev/null +++ b/makefile.linux_s390x @@ -0,0 +1,23 @@ +# +# makefile for Linux (IBM z/Series Mainframe with s390x CPU) +# +# tested under SUSE Enterprise Linux 10 + +OPTFLAGS=-O -m31 + +ALLFLAGS=${OPTFLAGS} -pipe -s \ + -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE \ + -DNDEBUG -D_REENTRANT -DENV_UNIX \ + -D_7ZIP_LARGE_PAGES \ + $(LOCAL_FLAGS) + +CXX=g++ $(ALLFLAGS) +CC=gcc $(ALLFLAGS) +CC_SHARED=-fPIC +LINK_SHARED=-fPIC -shared + +LOCAL_LIBS=-lpthread +LOCAL_LIBS_DLL=$(LOCAL_LIBS) -ldl + +OBJ_CRC32=$(OBJ_CRC32_C) + diff --git a/makefile.linux_x86_asm_gcc_4.X b/makefile.linux_x86_asm_gcc_4.X new file mode 100644 index 0000000..c835d74 --- /dev/null +++ b/makefile.linux_x86_asm_gcc_4.X @@ -0,0 +1,26 @@ +# +# makefile for Linux (x86, PPC, alpha ...) +# + +OPTFLAGS=-O + +ALLFLAGS=${OPTFLAGS} -pipe -m32 -s \ + -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE \ + -DNDEBUG -D_REENTRANT -DENV_UNIX \ + -D_7ZIP_LARGE_PAGES \ + $(LOCAL_FLAGS) + +CXX=g++ $(ALLFLAGS) -DENV_HAVE_GCCVISIBILITYPATCH -fvisibility=hidden -fvisibility-inlines-hidden +CC=gcc $(ALLFLAGS) +CC_SHARED=-fPIC +LINK_SHARED=-fPIC -shared +ASM=nasm -f elf + +PRE_COMPILED_HEADER=StdAfx.h.gch + +LOCAL_LIBS=-lpthread +LOCAL_LIBS_DLL=$(LOCAL_LIBS) -ldl + +CPU=x86 +OBJ_CRC32=$(OBJ_CRC32_x86) + diff --git a/makefile.linux_x86_asm_gcc_4.X_fltk b/makefile.linux_x86_asm_gcc_4.X_fltk new file mode 100644 index 0000000..7dec2f5 --- /dev/null +++ b/makefile.linux_x86_asm_gcc_4.X_fltk @@ -0,0 +1,26 @@ +# +# makefile for Linux (x86, PPC, alpha ...) +# + +OPTFLAGS=-O + +ALLFLAGS=${OPTFLAGS} -m32 -pipe -s \ + -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE \ + -DNDEBUG -D_REENTRANT -DENV_UNIX -DUSE_FLTK \ + -D_7ZIP_LARGE_PAGES \ + $(LOCAL_FLAGS) + +CXX=g++ $(ALLFLAGS) -DENV_HAVE_GCCVISIBILITYPATCH -fvisibility=hidden -fvisibility-inlines-hidden `fltk-config --cxxflags` +CC=gcc $(ALLFLAGS) +CC_SHARED=-fPIC +LINK_SHARED=-fPIC -shared +ASM=nasm -f elf + +PRE_COMPILED_HEADER=StdAfx.h.gch + +LOCAL_LIBS=-lpthread `fltk-config --ldflags` +LOCAL_LIBS_DLL=$(LOCAL_LIBS) -ldl + +CPU=x86 +OBJ_CRC32=$(OBJ_CRC32_x86) + diff --git a/makefile.linux_x86_asm_gcc_mudflap_4.X b/makefile.linux_x86_asm_gcc_mudflap_4.X new file mode 100644 index 0000000..c774cb2 --- /dev/null +++ b/makefile.linux_x86_asm_gcc_mudflap_4.X @@ -0,0 +1,26 @@ +# +# makefile for Linux (x86, PPC, alpha ...) +# + +OPTFLAGS=-g2 + +ALLFLAGS=${OPTFLAGS} -m32 -pipe -pthread -fmudflapth \ + -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE \ + -DNDEBUG -DENV_UNIX \ + -D_7ZIP_LARGE_PAGES \ + $(LOCAL_FLAGS) + +CXX=g++ $(ALLFLAGS) +CC=gcc $(ALLFLAGS) +CC_SHARED=-fPIC +LINK_SHARED=-fPIC -shared +ASM=nasm -f elf + +PRE_COMPILED_HEADER=StdAfx.h.gch + +LOCAL_LIBS=-lmudflapth +LOCAL_LIBS_DLL=$(LOCAL_LIBS) -ldl + +CPU=x86 +OBJ_CRC32=$(OBJ_CRC32_x86) + diff --git a/makefile.linux_x86_asm_icc b/makefile.linux_x86_asm_icc new file mode 100644 index 0000000..d5d6603 --- /dev/null +++ b/makefile.linux_x86_asm_icc @@ -0,0 +1,25 @@ +# +# makefile for Linux (x86, PPC, alpha ...) +# + +# OPTFLAGS=-fast -msse3 -s +OPTFLAGS=-O2 -msse2 -s -Wcheck -fstack-security-check + +ALLFLAGS=${OPTFLAGS} \ + -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE \ + -DNDEBUG -D_REENTRANT -DENV_UNIX \ + -D_7ZIP_LARGE_PAGES \ + $(LOCAL_FLAGS) + +CXX=icpc -i-static $(ALLFLAGS) +CC=icc $(ALLFLAGS) +CC_SHARED=-fPIC +LINK_SHARED=-fPIC -shared +ASM=nasm -f elf + +LOCAL_LIBS=-lpthread +LOCAL_LIBS_DLL=$(LOCAL_LIBS) -ldl + +CPU=x86 +OBJ_CRC32=$(OBJ_CRC32_x86) + diff --git a/makefile.linux_x86_icc b/makefile.linux_x86_icc new file mode 100644 index 0000000..76319ed --- /dev/null +++ b/makefile.linux_x86_icc @@ -0,0 +1,24 @@ +# +# makefile for Linux (x86, PPC, alpha ...) +# + +# OPTFLAGS=-fast -msse3 -s +OPTFLAGS=-O2 -msse2 -s -Wcheck -fstack-security-check + +ALLFLAGS=${OPTFLAGS} \ + -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE \ + -DNDEBUG -D_REENTRANT -DENV_UNIX \ + -D_7ZIP_LARGE_PAGES \ + $(LOCAL_FLAGS) + +CXX=icpc -i-static $(ALLFLAGS) +CC=icc $(ALLFLAGS) +CC_SHARED=-fPIC +LINK_SHARED=-fPIC -shared +ASM=nasm -f elf + +LOCAL_LIBS=-lpthread +LOCAL_LIBS_DLL=$(LOCAL_LIBS) -ldl + +OBJ_CRC32=$(OBJ_CRC32_C) + diff --git a/makefile.machine b/makefile.machine new file mode 100644 index 0000000..05731d8 --- /dev/null +++ b/makefile.machine @@ -0,0 +1,22 @@ +# +# makefile for Linux (x86, PPC, alpha ...) +# + +OPTFLAGS=-O + +ALLFLAGS=${OPTFLAGS} -pipe -s \ + -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE \ + -DNDEBUG -D_REENTRANT -DENV_UNIX \ + -D_7ZIP_LARGE_PAGES \ + $(LOCAL_FLAGS) + +CXX=g++ $(ALLFLAGS) +CC=gcc $(ALLFLAGS) +CC_SHARED=-fPIC +LINK_SHARED=-fPIC -shared + +LOCAL_LIBS=-lpthread +LOCAL_LIBS_DLL=$(LOCAL_LIBS) -ldl + +OBJ_CRC32=$(OBJ_CRC32_C) + diff --git a/makefile.macosx_32bits b/makefile.macosx_32bits new file mode 100644 index 0000000..cc665d8 --- /dev/null +++ b/makefile.macosx_32bits @@ -0,0 +1,20 @@ + +OPTFLAGS=-O + +# don't use -DNDEBUG in order to use MacOSX wxWidgets + +ALLFLAGS=-m32 ${OPTFLAGS} \ + -DENV_MACOSX \ + -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE \ + -D_REENTRANT -DENV_UNIX \ + $(LOCAL_FLAGS) + +CXX=c++ $(ALLFLAGS) +CC=cc $(ALLFLAGS) +LINK_SHARED=-bundle + +LOCAL_LIBS=-framework CoreFoundation +LOCAL_LIBS_DLL=$(LOCAL_LIBS) + +OBJ_CRC32=$(OBJ_CRC32_C) + diff --git a/makefile.macosx_32bits_asm b/makefile.macosx_32bits_asm new file mode 100644 index 0000000..672e121 --- /dev/null +++ b/makefile.macosx_32bits_asm @@ -0,0 +1,23 @@ + +OPTFLAGS=-O + +# don't use -DNDEBUG in order to use MacOSX wxWidgets + +ALLFLAGS=${OPTFLAGS} \ + -mmacosx-version-min=10.4 -arch i386 \ + -DENV_MACOSX \ + -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE \ + -D_REENTRANT -DENV_UNIX \ + $(LOCAL_FLAGS) + +CXX=c++ $(ALLFLAGS) +CC=cc $(ALLFLAGS) +LINK_SHARED=-bundle +ASM=nasm -f macho + +LOCAL_LIBS=-framework CoreFoundation +LOCAL_LIBS_DLL=$(LOCAL_LIBS) + +CPU=x86 +OBJ_CRC32=$(OBJ_CRC32_x86) + diff --git a/makefile.macosx_32bits_ppc b/makefile.macosx_32bits_ppc new file mode 100644 index 0000000..6cfd959 --- /dev/null +++ b/makefile.macosx_32bits_ppc @@ -0,0 +1,21 @@ + +OPTFLAGS=-O + +# don't use -DNDEBUG in order to use MacOSX wxWidgets + +ALLFLAGS= ${OPTFLAGS} \ + -mmacosx-version-min=10.4 -arch ppc \ + -DENV_MACOSX \ + -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE \ + -D_REENTRANT -DENV_UNIX \ + $(LOCAL_FLAGS) + +CXX=c++ $(ALLFLAGS) +CC=cc $(ALLFLAGS) +LINK_SHARED=-bundle + +LOCAL_LIBS=-framework CoreFoundation +LOCAL_LIBS_DLL=$(LOCAL_LIBS) + +OBJ_CRC32=$(OBJ_CRC32_C) + diff --git a/makefile.macosx_64bits b/makefile.macosx_64bits new file mode 100644 index 0000000..582e89b --- /dev/null +++ b/makefile.macosx_64bits @@ -0,0 +1,20 @@ + +OPTFLAGS=-O + +# don't use -DNDEBUG in order to use MacOSX wxWidgets + +ALLFLAGS=-m64 ${OPTFLAGS} \ + -DENV_MACOSX \ + -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE \ + -D_REENTRANT -DENV_UNIX \ + $(LOCAL_FLAGS) + +CXX=c++ $(ALLFLAGS) +CC=cc $(ALLFLAGS) +LINK_SHARED=-bundle + +LOCAL_LIBS=-framework CoreFoundation +LOCAL_LIBS_DLL=$(LOCAL_LIBS) + +OBJ_CRC32=$(OBJ_CRC32_C) + diff --git a/makefile.macosx_llvm_64bits b/makefile.macosx_llvm_64bits new file mode 100644 index 0000000..f5c869a --- /dev/null +++ b/makefile.macosx_llvm_64bits @@ -0,0 +1,20 @@ + +OPTFLAGS=-O + +# don't use -DNDEBUG in order to use MacOSX wxWidgets + +ALLFLAGS=-m64 ${OPTFLAGS} \ + -DENV_MACOSX \ + -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE \ + -D_REENTRANT -DENV_UNIX \ + $(LOCAL_FLAGS) + +CXX=/Developer/usr/bin/llvm-g++ $(ALLFLAGS) +CC=/Developer/usr/bin/llvm-gcc $(ALLFLAGS) +LINK_SHARED=-bundle + +LOCAL_LIBS=-framework CoreFoundation +LOCAL_LIBS_DLL=$(LOCAL_LIBS) + +OBJ_CRC32=$(OBJ_CRC32_C) + diff --git a/makefile.netbsd b/makefile.netbsd new file mode 100644 index 0000000..1836471 --- /dev/null +++ b/makefile.netbsd @@ -0,0 +1,21 @@ +# +# NetBSD >= 1.5.2 (which has no libc_r -- use libpthread) +# makefile for NetBSD (x86, PPC, alpha ...) +# + +OPTFLAGS=-O + +ALLFLAGS=${OPTFLAGS} -s \ + -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE \ + -DNDEBUG -D_REENTRANT -DENV_UNIX \ + $(LOCAL_FLAGS) + +CXX=g++ $(ALLFLAGS) +CC=gcc $(ALLFLAGS) +LINK_SHARED=-shared + +LOCAL_LIBS=-lpthread +LOCAL_LIBS_DLL=$(LOCAL_LIBS) + +OBJ_CRC32=$(OBJ_CRC32_C) + diff --git a/makefile.netware_asm_gcc_3.X b/makefile.netware_asm_gcc_3.X new file mode 100644 index 0000000..ca2fa54 --- /dev/null +++ b/makefile.netware_asm_gcc_3.X @@ -0,0 +1,41 @@ +# +# makefile for NetWare cross-gcc (x86) +# + +CROSSPREFIX=i586-netware- +BINSUFFIX=.nlm + +OPTFLAGS=-O + +ALLFLAGS=${OPTFLAGS} -s \ + -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE \ + -DNDEBUG -D_REENTRANT -DENV_UNIX -D__NETWARE__ -D_POSIX_SOURCE \ + -fpcc-struct-return \ + $(LOCAL_FLAGS) + +CXX=$(CROSSPREFIX)g++ $(ALLFLAGS) +CC=$(CROSSPREFIX)gcc $(ALLFLAGS) +# LINK_SHARED=-shared +ASM=nasm -f elf +AWK=gawk + +LOCAL_LIBS= +LOCAL_LIBS_DLL=$(LOCAL_LIBS) + +CPU=x86 +OBJ_CRC32=$(OBJ_CRC32_x86) + +VERSION_INPUT=../../../7zip/MyVersion.h +P7ZIP_VERSION_AWK='/^\#define MY_VERSION /{gsub("\"","",$$3);print $$3}' +P7ZIP_VERSION=$(shell $(AWK) $(P7ZIP_VERSION_AWK) $(VERSION_INPUT)) +P7ZIP_COPYRIGHT_AWK='/^\#define MY_COPYRIGHT/{gsub($$1" "$$2" ","",$$0);print $$0}' +P7ZIP_COPYRIGHT=$(shell $(AWK) $(P7ZIP_COPYRIGHT_AWK) $(VERSION_INPUT)) + +LDFLAGS=-Wl,--nlm-description="7-Zip $(P7ZIP_VERSION) File Archiver (gcc build)" +LDFLAGS+=-Wl,--nlm-copyright=$(P7ZIP_COPYRIGHT) +LDFLAGS+=-Wl,--nlm-version=$(P7ZIP_VERSION) +LDFLAGS+=-Wl,--nlm-kernelspace +# LDFLAGS+=-Wl,--nlm-posixflag +LDFLAGS+=-Wl,--nlm-flag-off=2 + + diff --git a/makefile.oldmake b/makefile.oldmake new file mode 100644 index 0000000..ba1dc4d --- /dev/null +++ b/makefile.oldmake @@ -0,0 +1,174 @@ +MKDIR = mkdir -p + +DEST_HOME=/usr/local +DEST_BIN=$(DEST_HOME)/bin +DEST_SHARE=$(DEST_HOME)/lib/p7zip +DEST_SHARE_DOC=$(DEST_HOME)/share/doc/p7zip +DEST_MAN=$(DEST_HOME)/man + +.PHONY: default all all2 7za 7zG 7zFM sfx 7z 7zr Client7z common common7z clean tar_bin depend test test_7z test_7zr test_7zG test_Client7z all_test app + +default:7za + +all:7za sfx + +all2: 7za sfx 7z + +all3: 7za sfx 7z 7zr + +all4: 7za sfx 7z 7zr Client7z 7zG 7zFM + +all_test : test test_7z test_7zr test_Client7z + cd CPP/7zip/Compress/LZMA_Alone ; $(MAKE) test + +common: + $(MKDIR) bin + +7za: common + cd CPP/7zip/Bundles/Alone ; $(MAKE) all + cd check/my_86_filter ; $(MAKE) all + +7zr: common + cd CPP/7zip/Bundles/Alone7z ; $(MAKE) all + +Client7z: common + $(MKDIR) bin/Codecs + cd CPP/7zip/Bundles/Format7zFree ; $(MAKE) all + cd CPP/7zip/UI/Client7z ; $(MAKE) all + +app: common 7zFM 7zG 7z sfx + rm -fr p7zip.app + $(MKDIR) p7zip.app + cp -rp GUI/Contents p7zip.app/ + $(MKDIR) p7zip.app/Contents/MacOS + cp bin/7zFM p7zip.app/Contents/MacOS/ + cp bin/7zG p7zip.app/Contents/MacOS/ + cp bin/7z.so p7zip.app/Contents/MacOS/ + cp bin/7zCon.sfx p7zip.app/Contents/MacOS/ + cp -rp bin/Codecs p7zip.app/Contents/MacOS/ + cp -rp GUI/Lang p7zip.app/Contents/MacOS/ + cp -rp GUI/help p7zip.app/Contents/MacOS/ + +depend: + cd CPP/7zip/Bundles/Alone ; $(MAKE) depend + cd CPP/7zip/Bundles/Alone7z ; $(MAKE) depend + cd CPP/7zip/Bundles/SFXCon ; $(MAKE) depend + cd CPP/7zip/UI/Client7z ; $(MAKE) depend + cd CPP/7zip/UI/Console ; $(MAKE) depend + cd CPP/7zip/Bundles/Format7zFree ; $(MAKE) depend + cd CPP/7zip/Compress/Rar ; $(MAKE) depend + cd CPP/7zip/UI/GUI ; $(MAKE) depend + cd CPP/7zip/UI/FileManager ; $(MAKE) depend + cd check/my_86_filter ; $(MAKE) depend + +sfx: common + $(MKDIR) bin + cd CPP/7zip/Bundles/SFXCon ; $(MAKE) all + +common7z:common + $(MKDIR) bin/Codecs + cd CPP/7zip/Bundles/Format7zFree ; $(MAKE) all + cd CPP/7zip/Compress/Rar ; $(MAKE) all + +7z: common7z + cd CPP/7zip/UI/Console ; $(MAKE) all + +7zG: common7z + cd bin ; rm -f Lang ; ln -s ../GUI/Lang . + cd bin ; rm -f help ; ln -s ../GUI/help . + cd CPP/7zip/UI/GUI ; $(MAKE) all + +7zFM: common7z + cd bin ; rm -f Lang ; ln -s ../GUI/Lang . + cd bin ; rm -f help ; ln -s ../GUI/help . + cd CPP/7zip/UI/FileManager ; $(MAKE) all + +clean: + cd CPP/myWindows ; $(MAKE) clean + cd CPP/7zip/Bundles/Alone ; $(MAKE) clean + cd CPP/7zip/Bundles/Alone7z ; $(MAKE) clean + cd CPP/7zip/Bundles/SFXCon ; $(MAKE) clean + cd CPP/7zip/UI/Client7z ; $(MAKE) clean + cd CPP/7zip/UI/Console ; $(MAKE) clean + cd CPP/7zip/UI/FileManager ; $(MAKE) clean + cd CPP/7zip/UI/GUI ; $(MAKE) clean + cd CPP/7zip/Bundles/Format7zFree ; $(MAKE) clean + cd CPP/7zip/Compress/Rar ; $(MAKE) clean + cd CPP/7zip/Compress/LZMA_Alone ; $(MAKE) clean + cd CPP/7zip/Bundles/AloneGCOV ; $(MAKE) clean + cd CPP/7zip/TEST/TestUI ; $(MAKE) clean + cd check/my_86_filter ; $(MAKE) clean + rm -fr bin + rm -fr p7zip.app + rm -fr CPP/7zip/P7ZIP.* + rm -fr CPP/7zip/CMAKE/P7ZIP.* + rm -fr CPP/7zip/PREMAKE/P7ZIP.* + rm -f CPP/7zip/QMAKE/*/*.o + rm -f CPP/7zip/QMAKE/*/Makefile + rm -f CPP/7zip/QMAKE/*/*.pro.user + rm -f CPP/7zip/QMAKE/*/*.x + rm -f make.log 1 2 + rm -f check/7z.so + rm -fr p7zip.app/Contents/MacOS + find . -name "*~" -exec rm -f {} \; + find . -name "*.orig" -exec rm -fr {} \; + find . -name ".*.swp" -exec rm -f {} \; + find . -name "*.[ch]" -exec chmod -x {} \; + find . -name "*.cpp" -exec chmod -x {} \; + find . -name "*.asm" -exec chmod -x {} \; + find . -name "makefile*" -exec chmod -x {} \; + find . -name ".DS_Store" -exec rm -f {} \; + find . -name "._*" -exec rm -f {} \; + chmod -x ChangeLog README TODO man1/* DOCS/*.txt + chmod +x contrib/VirtualFileSystemForMidnightCommander/u7z + chmod +x contrib/gzip-like_CLI_wrapper_for_7z/p7zip + chmod +x install.sh check/check.sh check/clean_all.sh check/check_7zr.sh + cd check ; ./clean_all.sh + +test: 7za sfx + cd check ; ./check.sh ../bin/7za + +test_7z: 7z sfx + cd check ; ./check.sh ../bin/7z + +test_7zr: 7zr sfx + cd check ; ./check_7zr.sh ../bin/7zr + +test_7zG: 7zG sfx + cd check ; ./check.sh ../bin/7zG + +test_Client7z: Client7z + cd check ; ./check_Client7z.sh ../bin/Client7z + +install: + ./install.sh $(DEST_BIN) $(DEST_SHARE) $(DEST_MAN) $(DEST_SHARE_DOC) $(DEST_DIR) + +REP=$(shell pwd) +ARCHIVE=$(shell basename $(REP)) + +.PHONY: tar_all tar_all2 src_7z tar_bin tar_bin2 + +tar_all : clean + rm -f ../$(ARCHIVE)_src_all.tar.bz2 + cp makefile.linux_any_cpu makefile.machine + cd .. ; (tar cf - $(ARCHIVE) | bzip2 -9 > $(ARCHIVE)_src_all.tar.bz2) + +tar_all2 : clean + rm -f ../$(ARCHIVE)_src_all.tar.bz2 + cp makefile.linux_any_cpu makefile.machine + cd .. ; (tar cf - $(ARCHIVE) | 7za a -mx=9 -tbzip2 -si $(ARCHIVE)_src_all.tar.bz2 ) + +src_7z : clean + rm -f ../$(ARCHIVE)_src.7z + cd .. ; 7za a -mx=9 -m0=ppmd:mem=128m:o=32 $(ARCHIVE)_src.7z $(ARCHIVE) + +tar_bin: + rm -f ../$(ARCHIVE)_x86_linux_bin.tar.bz2 + chmod +x install.sh contrib/VirtualFileSystemForMidnightCommander/u7z contrib/gzip-like_CLI_wrapper_for_7z/p7zip + cd .. ; (tar cf - $(ARCHIVE)/bin $(ARCHIVE)/contrib $(ARCHIVE)/man1 $(ARCHIVE)/install.sh $(ARCHIVE)/ChangeLog $(ARCHIVE)/DOCS $(ARCHIVE)/README $(ARCHIVE)/TODO | bzip2 -9 > $(ARCHIVE)_x86_linux_bin.tar.bz2) + +tar_bin2: + rm -f ../$(ARCHIVE)_x86_linux_bin.tar.bz2 + chmod +x install.sh contrib/VirtualFileSystemForMidnightCommander/u7z contrib/gzip-like_CLI_wrapper_for_7z/p7zip + cd .. ; (tar cf - $(ARCHIVE)/bin $(ARCHIVE)/contrib $(ARCHIVE)/man1 $(ARCHIVE)/install.sh $(ARCHIVE)/ChangeLog $(ARCHIVE)/DOCS $(ARCHIVE)/README $(ARCHIVE)/TODO | 7za a -mx=9 -tbzip2 -si $(ARCHIVE)_x86_linux_bin.tar.bz2) + diff --git a/makefile.openbsd b/makefile.openbsd new file mode 100644 index 0000000..1c8fd4c --- /dev/null +++ b/makefile.openbsd @@ -0,0 +1,20 @@ +# +# makefile for OpenBSD (x86, PPC, alpha ...) +# + +MYCFLAGS?=-O +MYCXXFLAGS?=-O + +ALLFLAGS=-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE \ + -DNDEBUG -D_REENTRANT -DENV_UNIX -fPIC \ + $(LOCAL_FLAGS) + +CXX=$(MYCXX) $(ALLFLAGS) $(MYCXXFLAGS) +CC=$(MYCC) $(ALLFLAGS) $(MYCFLAGS) +LINK_SHARED=-shared + +LOCAL_LIBS=-lpthread +LOCAL_LIBS_DLL=$(LOCAL_LIBS) + +OBJ_CRC32=$(OBJ_CRC32_C) + diff --git a/makefile.openbsd_no_port b/makefile.openbsd_no_port new file mode 100644 index 0000000..879dc2c --- /dev/null +++ b/makefile.openbsd_no_port @@ -0,0 +1,20 @@ +# +# makefile for OpenBSD (x86, PPC, alpha ...) +# + +OPTFLAGS=-O + +ALLFLAGS=${OPTFLAGS} -s \ + -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE \ + -DNDEBUG -D_REENTRANT -DENV_UNIX \ + $(LOCAL_FLAGS) + +CXX=g++ $(ALLFLAGS) +CC=gcc $(ALLFLAGS) +LINK_SHARED=-shared + +LOCAL_LIBS=-lpthread +LOCAL_LIBS_DLL=$(LOCAL_LIBS) + +OBJ_CRC32=$(OBJ_CRC32_C) + diff --git a/makefile.qnx_shared.bin b/makefile.qnx_shared.bin new file mode 100644 index 0000000..9a28b06 --- /dev/null +++ b/makefile.qnx_shared.bin @@ -0,0 +1,21 @@ +################################################### +# makefile.machine for "7z , 7za , 7zr , 7zCon.sfx " : +# tested with p7zip-4.47_beta on qnx-6.3.0 sp3 x86 target + +OPTFLAGS=-O + +ALLFLAGS=${OPTFLAGS} -s \ + -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE \ + -DNDEBUG -D_REENTRANT -DENV_UNIX \ + $(LOCAL_FLAGS) + +CXX=QCC -V3.3.5,gcc_ntox86 $(ALLFLAGS) +CC=qcc -V3.3.5,gcc_ntox86 $(ALLFLAGS) +LINK_SHARED=-shared + +#LOCAL_LIBS=-lpthread +#LOCAL_LIBS_DLL=$(LOCAL_LIBS) -ldl +LOCAL_LIBS_DLL=$(LOCAL_LIBS) + +OBJ_CRC32=$(OBJ_CRC32_C) + diff --git a/makefile.qnx_shared.so b/makefile.qnx_shared.so new file mode 100644 index 0000000..28e04d0 --- /dev/null +++ b/makefile.qnx_shared.so @@ -0,0 +1,22 @@ +################################################### +# makefile.machine for "7z.so , Codecs/Rar29.so" : +# tested with p7zip-4.47_beta on qnx-6.3.0 sp3 x86 target + +OPTFLAGS=-O + +ALLFLAGS=${OPTFLAGS} -s \ + -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE \ + -DNDEBUG -D_REENTRANT -DENV_UNIX \ + $(LOCAL_FLAGS) + +CXX=QCC -V3.3.5,gcc_ntox86 $(ALLFLAGS) +CC=qcc -V3.3.5,gcc_ntox86 $(ALLFLAGS) +CC_SHARED=-fPIC +LINK_SHARED=-fPIC -shared + +#LOCAL_LIBS=-lpthread +#LOCAL_LIBS_DLL=$(LOCAL_LIBS) -ldl +LOCAL_LIBS_DLL=$(LOCAL_LIBS) + +OBJ_CRC32=$(OBJ_CRC32_C) + diff --git a/makefile.qnx_static b/makefile.qnx_static new file mode 100644 index 0000000..49c75fb --- /dev/null +++ b/makefile.qnx_static @@ -0,0 +1,21 @@ +################################################## +# makefile.machine for "static 7za 7zr 7zCon.sfx" : +# tested with p7zip-4.47_beta on qnx-6.3.0 sp3 x86 target + +OPTFLAGS=-O + +ALLFLAGS=${OPTFLAGS} -s \ + -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE \ + -DNDEBUG -D_REENTRANT -DENV_UNIX \ + $(LOCAL_FLAGS) -Bstatic + +CXX=QCC -V3.3.5,gcc_ntox86 $(ALLFLAGS) +CC=qcc -V3.3.5,gcc_ntox86 $(ALLFLAGS) +LINK_SHARED=-Bstatic + +#LOCAL_LIBS=-lpthread +#LOCAL_LIBS_DLL=$(LOCAL_LIBS) -ldl +LOCAL_LIBS_DLL=$(LOCAL_LIBS) + +OBJ_CRC32=$(OBJ_CRC32_C) + diff --git a/makefile.rules b/makefile.rules new file mode 100644 index 0000000..b71d5ad --- /dev/null +++ b/makefile.rules @@ -0,0 +1,661 @@ + +myGetTickCount.o : ../../../myWindows/myGetTickCount.cpp + $(CXX) $(CXXFLAGS) ../../../myWindows/myGetTickCount.cpp +myAddExeFlag.o : ../../../myWindows/myAddExeFlag.cpp + $(CXX) $(CXXFLAGS) ../../../myWindows/myAddExeFlag.cpp +mySplitCommandLine.o : ../../../myWindows/mySplitCommandLine.cpp + $(CXX) $(CXXFLAGS) ../../../myWindows/mySplitCommandLine.cpp +wine_date_and_time.o : ../../../myWindows/wine_date_and_time.cpp + $(CXX) $(CXXFLAGS) ../../../myWindows/wine_date_and_time.cpp +wine_GetXXXDefaultLangID.o : ../../../myWindows/wine_GetXXXDefaultLangID.cpp + $(CXX) $(CXXFLAGS) ../../../myWindows/wine_GetXXXDefaultLangID.cpp + +StdAfx.h.gch : ../../../myWindows/StdAfx.h + rm -f StdAfx.h.gch + $(CXX) $(CXXFLAGS) ../../../myWindows/StdAfx.h -o StdAfx.h.gch + +BenchCon.o : ../../UI/Console/BenchCon.cpp + $(CXX) $(CXXFLAGS) ../../UI/Console/BenchCon.cpp +ConsoleClose.o : ../../UI/Console/ConsoleClose.cpp + $(CXX) $(CXXFLAGS) ../../UI/Console/ConsoleClose.cpp +ExtractCallbackConsole.o : ../../UI/Console/ExtractCallbackConsole.cpp + $(CXX) $(CXXFLAGS) ../../UI/Console/ExtractCallbackConsole.cpp +List.o : ../../UI/Console/List.cpp + $(CXX) $(CXXFLAGS) ../../UI/Console/List.cpp +MainAr.o : ../../UI/Console/MainAr.cpp + $(CXX) $(CXXFLAGS) ../../UI/Console/MainAr.cpp +OpenCallbackConsole.o : ../../UI/Console/OpenCallbackConsole.cpp + $(CXX) $(CXXFLAGS) ../../UI/Console/OpenCallbackConsole.cpp +PercentPrinter.o : ../../UI/Console/PercentPrinter.cpp + $(CXX) $(CXXFLAGS) ../../UI/Console/PercentPrinter.cpp +UpdateCallbackConsole.o : ../../UI/Console/UpdateCallbackConsole.cpp + $(CXX) $(CXXFLAGS) ../../UI/Console/UpdateCallbackConsole.cpp +UserInputUtils.o : ../../UI/Console/UserInputUtils.cpp + $(CXX) $(CXXFLAGS) ../../UI/Console/UserInputUtils.cpp +AlignedBuffer.o : ../../../Common/AlignedBuffer.cpp + $(CXX) $(CXXFLAGS) ../../../Common/AlignedBuffer.cpp +CommandLineParser.o : ../../../Common/CommandLineParser.cpp + $(CXX) $(CXXFLAGS) ../../../Common/CommandLineParser.cpp +CRC.o : ../../../Common/CRC.cpp + $(CXX) $(CXXFLAGS) ../../../Common/CRC.cpp +IntToString.o : ../../../Common/IntToString.cpp + $(CXX) $(CXXFLAGS) ../../../Common/IntToString.cpp +MyMap.o : ../../../Common/MyMap.cpp + $(CXX) $(CXXFLAGS) ../../../Common/MyMap.cpp +MyXml.o : ../../../Common/MyXml.cpp + $(CXX) $(CXXFLAGS) ../../../Common/MyXml.cpp +MyWindows.o : ../../../Common/MyWindows.cpp + $(CXX) $(CXXFLAGS) ../../../Common/MyWindows.cpp +Random.o : ../../../Common/Random.cpp + $(CXX) $(CXXFLAGS) ../../../Common/Random.cpp +StdInStream.o : ../../../Common/StdInStream.cpp + $(CXX) $(CXXFLAGS) ../../../Common/StdInStream.cpp +StdOutStream.o : ../../../Common/StdOutStream.cpp + $(CXX) $(CXXFLAGS) ../../../Common/StdOutStream.cpp +MyString.o : ../../../Common/MyString.cpp + $(CXX) $(CXXFLAGS) ../../../Common/MyString.cpp +StringConvert.o : ../../../Common/StringConvert.cpp + $(CXX) $(CXXFLAGS) ../../../Common/StringConvert.cpp +StringToInt.o : ../../../Common/StringToInt.cpp + $(CXX) $(CXXFLAGS) ../../../Common/StringToInt.cpp +TextConfig.o : ../../../Common/TextConfig.cpp + $(CXX) $(CXXFLAGS) ../../../Common/TextConfig.cpp +UTFConvert.o : ../../../Common/UTFConvert.cpp + $(CXX) $(CXXFLAGS) ../../../Common/UTFConvert.cpp +MyVector.o : ../../../Common/MyVector.cpp + $(CXX) $(CXXFLAGS) ../../../Common/MyVector.cpp +Wildcard.o : ../../../Common/Wildcard.cpp + $(CXX) $(CXXFLAGS) ../../../Common/Wildcard.cpp +Clipboard.o : ../../../Windows/Clipboard.cpp + $(CXX) $(CXXFLAGS) ../../../Windows/Clipboard.cpp +DLL.o : ../../../Windows/DLL.cpp + $(CXX) $(CXXFLAGS) ../../../Windows/DLL.cpp +Error.o : ../../../Windows/Error.cpp + $(CXX) $(CXXFLAGS) ../../../Windows/Error.cpp +FileDir.o : ../../../Windows/FileDir.cpp + $(CXX) $(CXXFLAGS) ../../../Windows/FileDir.cpp +FileFind.o : ../../../Windows/FileFind.cpp + $(CXX) $(CXXFLAGS) ../../../Windows/FileFind.cpp +FileIO.o : ../../../Windows/FileIO.cpp + $(CXX) $(CXXFLAGS) ../../../Windows/FileIO.cpp +FileName.o : ../../../Windows/FileName.cpp + $(CXX) $(CXXFLAGS) ../../../Windows/FileName.cpp +MemoryLock.o : ../../../Windows/MemoryLock.cpp + $(CXX) $(CXXFLAGS) ../../../Windows/MemoryLock.cpp +PropVariant.o : ../../../Windows/PropVariant.cpp + $(CXX) $(CXXFLAGS) ../../../Windows/PropVariant.cpp +PropVariantConversions.o : ../../../Windows/PropVariantConversions.cpp + $(CXX) $(CXXFLAGS) ../../../Windows/PropVariantConversions.cpp +PropVariantUtils.o : ../../../Windows/PropVariantUtils.cpp + $(CXX) $(CXXFLAGS) ../../../Windows/PropVariantUtils.cpp +Registry.o : ../../../Windows/Registry.cpp + $(CXX) $(CXXFLAGS) ../../../Windows/Registry.cpp +Synchronization.o : ../../../Windows/Synchronization.cpp + $(CXX) $(CXXFLAGS) ../../../Windows/Synchronization.cpp +Time.o : ../../../Windows/Time.cpp + $(CXX) $(CXXFLAGS) ../../../Windows/Time.cpp +System.o : ../../../Windows/System.cpp + $(CXX) $(CXXFLAGS) ../../../Windows/System.cpp +Window.o : ../../../Windows/Window.cpp + $(CXX) $(CXXFLAGS) ../../../Windows/Window.cpp +Dialog.o : ../../../Windows/Control/Dialog.cpp + $(CXX) $(CXXFLAGS) ../../../Windows/Control/Dialog.cpp +Controls.o : ../../../Windows/Control/Controls.cpp + $(CXX) $(CXXFLAGS) ../../../Windows/Control/Controls.cpp +Window2.o : ../../../Windows/Control/Window2.cpp + $(CXX) $(CXXFLAGS) ../../../Windows/Control/Window2.cpp + +CreateCoder.o : ../../Common/CreateCoder.cpp + $(CXX) $(CXXFLAGS) ../../Common/CreateCoder.cpp +CWrappers.o : ../../Common/CWrappers.cpp + $(CXX) $(CXXFLAGS) ../../Common/CWrappers.cpp +CrossThreadProgress.o : ../../Archive/Common/CrossThreadProgress.cpp + $(CXX) $(CXXFLAGS) ../../Archive/Common/CrossThreadProgress.cpp +FilePathAutoRename.o : ../../Common/FilePathAutoRename.cpp + $(CXX) $(CXXFLAGS) ../../Common/FilePathAutoRename.cpp +FileStreams.o : ../../Common/FileStreams.cpp + $(CXX) $(CXXFLAGS) ../../Common/FileStreams.cpp +FilterCoder.o : ../../Common/FilterCoder.cpp + $(CXX) $(CXXFLAGS) ../../Common/FilterCoder.cpp +InBuffer.o : ../../Common/InBuffer.cpp + $(CXX) $(CXXFLAGS) ../../Common/InBuffer.cpp +InOutTempBuffer.o : ../../Common/InOutTempBuffer.cpp + $(CXX) $(CXXFLAGS) ../../Common/InOutTempBuffer.cpp +Lang.o : ../../../Common/Lang.cpp + $(CXX) $(CXXFLAGS) ../../../Common/Lang.cpp +ListFileUtils.o : ../../../Common/ListFileUtils.cpp + $(CXX) $(CXXFLAGS) ../../../Common/ListFileUtils.cpp +LimitedStreams.o : ../../Common/LimitedStreams.cpp + $(CXX) $(CXXFLAGS) ../../Common/LimitedStreams.cpp +LockedStream.o : ../../Common/LockedStream.cpp + $(CXX) $(CXXFLAGS) ../../Common/LockedStream.cpp +MemBlocks.o : ../../Common/MemBlocks.cpp + $(CXX) $(CXXFLAGS) ../../Common/MemBlocks.cpp +VirtThread.o : ../../Common/VirtThread.cpp + $(CXX) $(CXXFLAGS) ../../Common/VirtThread.cpp +MethodId.o : ../../Common/MethodId.cpp + $(CXX) $(CXXFLAGS) ../../Common/MethodId.cpp +MethodProps.o : ../../Common/MethodProps.cpp + $(CXX) $(CXXFLAGS) ../../Common/MethodProps.cpp +OffsetStream.o : ../../Common/OffsetStream.cpp + $(CXX) $(CXXFLAGS) ../../Common/OffsetStream.cpp +OutBuffer.o : ../../Common/OutBuffer.cpp + $(CXX) $(CXXFLAGS) ../../Common/OutBuffer.cpp +OutMemStream.o : ../../Common/OutMemStream.cpp + $(CXX) $(CXXFLAGS) ../../Common/OutMemStream.cpp +ProgressMt.o : ../../Common/ProgressMt.cpp + $(CXX) $(CXXFLAGS) ../../Common/ProgressMt.cpp +ProgressUtils.o : ../../Common/ProgressUtils.cpp + $(CXX) $(CXXFLAGS) ../../Common/ProgressUtils.cpp +StreamBinder.o : ../../Common/StreamBinder.cpp + $(CXX) $(CXXFLAGS) ../../Common/StreamBinder.cpp +StreamObjects.o : ../../Common/StreamObjects.cpp + $(CXX) $(CXXFLAGS) ../../Common/StreamObjects.cpp +StreamUtils.o : ../../Common/StreamUtils.cpp + $(CXX) $(CXXFLAGS) ../../Common/StreamUtils.cpp + + +CodecExports.o : ../../Compress/CodecExports.cpp + $(CXX) $(CXXFLAGS) ../../Compress/CodecExports.cpp +ArjDecoder1.o : ../../Compress/ArjDecoder1.cpp + $(CXX) $(CXXFLAGS) ../../Compress/ArjDecoder1.cpp +ArjDecoder2.o : ../../Compress/ArjDecoder2.cpp + $(CXX) $(CXXFLAGS) ../../Compress/ArjDecoder2.cpp +Bcj2Coder.o : ../../Compress/Bcj2Coder.cpp + $(CXX) $(CXXFLAGS) ../../Compress/Bcj2Coder.cpp +Bcj2Register.o : ../../Compress/Bcj2Register.cpp + $(CXX) $(CXXFLAGS) ../../Compress/Bcj2Register.cpp +BcjCoder.o : ../../Compress/BcjCoder.cpp + $(CXX) $(CXXFLAGS) ../../Compress/BcjCoder.cpp +BcjRegister.o : ../../Compress/BcjRegister.cpp + $(CXX) $(CXXFLAGS) ../../Compress/BcjRegister.cpp +BitlDecoder.o : ../../Compress/BitlDecoder.cpp + $(CXX) $(CXXFLAGS) ../../Compress/BitlDecoder.cpp +BranchCoder.o : ../../Compress/BranchCoder.cpp + $(CXX) $(CXXFLAGS) ../../Compress/BranchCoder.cpp +BranchMisc.o : ../../Compress/BranchMisc.cpp + $(CXX) $(CXXFLAGS) ../../Compress/BranchMisc.cpp +BranchRegister.o : ../../Compress/BranchRegister.cpp + $(CXX) $(CXXFLAGS) ../../Compress/BranchRegister.cpp +ByteSwap.o : ../../Compress/ByteSwap.cpp + $(CXX) $(CXXFLAGS) ../../Compress/ByteSwap.cpp +BZip2Crc.o : ../../Compress/BZip2Crc.cpp + $(CXX) $(CXXFLAGS) ../../Compress/BZip2Crc.cpp +BZip2Decoder.o : ../../Compress/BZip2Decoder.cpp + $(CXX) $(CXXFLAGS) ../../Compress/BZip2Decoder.cpp +BZip2Encoder.o : ../../Compress/BZip2Encoder.cpp + $(CXX) $(CXXFLAGS) ../../Compress/BZip2Encoder.cpp +BZip2Register.o : ../../Compress/BZip2Register.cpp + $(CXX) $(CXXFLAGS) ../../Compress/BZip2Register.cpp +CopyCoder.o : ../../Compress/CopyCoder.cpp + $(CXX) $(CXXFLAGS) ../../Compress/CopyCoder.cpp +CopyRegister.o : ../../Compress/CopyRegister.cpp + $(CXX) $(CXXFLAGS) ../../Compress/CopyRegister.cpp +Deflate64Register.o : ../../Compress/Deflate64Register.cpp + $(CXX) $(CXXFLAGS) ../../Compress/Deflate64Register.cpp +DeflateDecoder.o : ../../Compress/DeflateDecoder.cpp + $(CXX) $(CXXFLAGS) ../../Compress/DeflateDecoder.cpp +DeflateEncoder.o : ../../Compress/DeflateEncoder.cpp + $(CXX) $(CXXFLAGS) ../../Compress/DeflateEncoder.cpp +DeflateRegister.o : ../../Compress/DeflateRegister.cpp + $(CXX) $(CXXFLAGS) ../../Compress/DeflateRegister.cpp +DeltaFilter.o : ../../Compress/DeltaFilter.cpp + $(CXX) $(CXXFLAGS) ../../Compress/DeltaFilter.cpp +ImplodeDecoder.o : ../../Compress/ImplodeDecoder.cpp + $(CXX) $(CXXFLAGS) ../../Compress/ImplodeDecoder.cpp +ImplodeHuffmanDecoder.o : ../../Compress/ImplodeHuffmanDecoder.cpp + $(CXX) $(CXXFLAGS) ../../Compress/ImplodeHuffmanDecoder.cpp +LzhDecoder.o : ../../Compress/LzhDecoder.cpp + $(CXX) $(CXXFLAGS) ../../Compress/LzhDecoder.cpp +LzOutWindow.o : ../../Compress/LzOutWindow.cpp + $(CXX) $(CXXFLAGS) ../../Compress/LzOutWindow.cpp +Lzma2Decoder.o : ../../Compress/Lzma2Decoder.cpp + $(CXX) $(CXXFLAGS) ../../Compress/Lzma2Decoder.cpp +Lzma2Encoder.o : ../../Compress/Lzma2Encoder.cpp + $(CXX) $(CXXFLAGS) ../../Compress/Lzma2Encoder.cpp +Lzma2Register.o : ../../Compress/Lzma2Register.cpp + $(CXX) $(CXXFLAGS) ../../Compress/Lzma2Register.cpp +LzmaDecoder.o : ../../Compress/LzmaDecoder.cpp + $(CXX) $(CXXFLAGS) ../../Compress/LzmaDecoder.cpp +LzmaEncoder.o : ../../Compress/LzmaEncoder.cpp + $(CXX) $(CXXFLAGS) ../../Compress/LzmaEncoder.cpp +LzmaRegister.o : ../../Compress/LzmaRegister.cpp + $(CXX) $(CXXFLAGS) ../../Compress/LzmaRegister.cpp +PpmdDecoder.o : ../../Compress/PpmdDecoder.cpp + $(CXX) $(CXXFLAGS) ../../Compress/PpmdDecoder.cpp +PpmdEncoder.o : ../../Compress/PpmdEncoder.cpp + $(CXX) $(CXXFLAGS) ../../Compress/PpmdEncoder.cpp +PpmdRegister.o : ../../Compress/PpmdRegister.cpp + $(CXX) $(CXXFLAGS) ../../Compress/PpmdRegister.cpp +ShrinkDecoder.o : ../../Compress/ShrinkDecoder.cpp + $(CXX) $(CXXFLAGS) ../../Compress/ShrinkDecoder.cpp +ZDecoder.o : ../../Compress/ZDecoder.cpp + $(CXX) $(CXXFLAGS) ../../Compress/ZDecoder.cpp +Lzx86Converter.o : ../../Compress/Lzx86Converter.cpp + $(CXX) $(CXXFLAGS) ../../Compress/Lzx86Converter.cpp +LzxDecoder.o : ../../Compress/LzxDecoder.cpp + $(CXX) $(CXXFLAGS) ../../Compress/LzxDecoder.cpp +PpmdZip.o : ../../Compress/PpmdZip.cpp + $(CXX) $(CXXFLAGS) ../../Compress/PpmdZip.cpp +QuantumDecoder.o : ../../Compress/QuantumDecoder.cpp + $(CXX) $(CXXFLAGS) ../../Compress/QuantumDecoder.cpp +ZlibDecoder.o : ../../Compress/ZlibDecoder.cpp + $(CXX) $(CXXFLAGS) ../../Compress/ZlibDecoder.cpp +ZlibEncoder.o : ../../Compress/ZlibEncoder.cpp + $(CXX) $(CXXFLAGS) ../../Compress/ZlibEncoder.cpp +7zCompressionMode.o : ../../Archive/7z/7zCompressionMode.cpp + $(CXX) $(CXXFLAGS) ../../Archive/7z/7zCompressionMode.cpp +7zDecode.o : ../../Archive/7z/7zDecode.cpp + $(CXX) $(CXXFLAGS) ../../Archive/7z/7zDecode.cpp +7zEncode.o : ../../Archive/7z/7zEncode.cpp + $(CXX) $(CXXFLAGS) ../../Archive/7z/7zEncode.cpp +7zExtract.o : ../../Archive/7z/7zExtract.cpp + $(CXX) $(CXXFLAGS) ../../Archive/7z/7zExtract.cpp +7zFolderInStream.o : ../../Archive/7z/7zFolderInStream.cpp + $(CXX) $(CXXFLAGS) ../../Archive/7z/7zFolderInStream.cpp +7zFolderOutStream.o : ../../Archive/7z/7zFolderOutStream.cpp + $(CXX) $(CXXFLAGS) ../../Archive/7z/7zFolderOutStream.cpp +7zHandler.o : ../../Archive/7z/7zHandler.cpp + $(CXX) $(CXXFLAGS) ../../Archive/7z/7zHandler.cpp +7zHandlerOut.o : ../../Archive/7z/7zHandlerOut.cpp + $(CXX) $(CXXFLAGS) ../../Archive/7z/7zHandlerOut.cpp +7zHeader.o : ../../Archive/7z/7zHeader.cpp + $(CXX) $(CXXFLAGS) ../../Archive/7z/7zHeader.cpp +7zIn.o : ../../Archive/7z/7zIn.cpp + $(CXX) $(CXXFLAGS) ../../Archive/7z/7zIn.cpp +7zOut.o : ../../Archive/7z/7zOut.cpp + $(CXX) $(CXXFLAGS) ../../Archive/7z/7zOut.cpp +7zProperties.o : ../../Archive/7z/7zProperties.cpp + $(CXX) $(CXXFLAGS) ../../Archive/7z/7zProperties.cpp +7zRegister.o : ../../Archive/7z/7zRegister.cpp + $(CXX) $(CXXFLAGS) ../../Archive/7z/7zRegister.cpp +7zSpecStream.o : ../../Archive/7z/7zSpecStream.cpp + $(CXX) $(CXXFLAGS) ../../Archive/7z/7zSpecStream.cpp +7zUpdate.o : ../../Archive/7z/7zUpdate.cpp + $(CXX) $(CXXFLAGS) ../../Archive/7z/7zUpdate.cpp + +TarHandler.o : ../../Archive/Tar/TarHandler.cpp + $(CXX) $(CXXFLAGS) ../../Archive/Tar/TarHandler.cpp +TarHandlerOut.o : ../../Archive/Tar/TarHandlerOut.cpp + $(CXX) $(CXXFLAGS) ../../Archive/Tar/TarHandlerOut.cpp +TarHeader.o : ../../Archive/Tar/TarHeader.cpp + $(CXX) $(CXXFLAGS) ../../Archive/Tar/TarHeader.cpp +TarIn.o : ../../Archive/Tar/TarIn.cpp + $(CXX) $(CXXFLAGS) ../../Archive/Tar/TarIn.cpp +TarOut.o : ../../Archive/Tar/TarOut.cpp + $(CXX) $(CXXFLAGS) ../../Archive/Tar/TarOut.cpp +TarRegister.o : ../../Archive/Tar/TarRegister.cpp + $(CXX) $(CXXFLAGS) ../../Archive/Tar/TarRegister.cpp +TarUpdate.o : ../../Archive/Tar/TarUpdate.cpp + $(CXX) $(CXXFLAGS) ../../Archive/Tar/TarUpdate.cpp +ZipAddCommon.o : ../../Archive/Zip/ZipAddCommon.cpp + $(CXX) $(CXXFLAGS) ../../Archive/Zip/ZipAddCommon.cpp +ZipHandler.o : ../../Archive/Zip/ZipHandler.cpp + $(CXX) $(CXXFLAGS) ../../Archive/Zip/ZipHandler.cpp +ZipHandlerOut.o : ../../Archive/Zip/ZipHandlerOut.cpp + $(CXX) $(CXXFLAGS) ../../Archive/Zip/ZipHandlerOut.cpp +ZipHeader.o : ../../Archive/Zip/ZipHeader.cpp + $(CXX) $(CXXFLAGS) ../../Archive/Zip/ZipHeader.cpp +ZipIn.o : ../../Archive/Zip/ZipIn.cpp + $(CXX) $(CXXFLAGS) ../../Archive/Zip/ZipIn.cpp +ZipItem.o : ../../Archive/Zip/ZipItem.cpp + $(CXX) $(CXXFLAGS) ../../Archive/Zip/ZipItem.cpp +ZipOut.o : ../../Archive/Zip/ZipOut.cpp + $(CXX) $(CXXFLAGS) ../../Archive/Zip/ZipOut.cpp +ZipRegister.o : ../../Archive/Zip/ZipRegister.cpp + $(CXX) $(CXXFLAGS) ../../Archive/Zip/ZipRegister.cpp +ZipUpdate.o : ../../Archive/Zip/ZipUpdate.cpp + $(CXX) $(CXXFLAGS) ../../Archive/Zip/ZipUpdate.cpp +CoderMixer2.o : ../../Archive/Common/CoderMixer2.cpp + $(CXX) $(CXXFLAGS) ../../Archive/Common/CoderMixer2.cpp +CoderMixer2MT.o : ../../Archive/Common/CoderMixer2MT.cpp + $(CXX) $(CXXFLAGS) ../../Archive/Common/CoderMixer2MT.cpp +DummyOutStream.o : ../../Archive/Common/DummyOutStream.cpp + $(CXX) $(CXXFLAGS) ../../Archive/Common/DummyOutStream.cpp +FindSignature.o : ../../Archive/Common/FindSignature.cpp + $(CXX) $(CXXFLAGS) ../../Archive/Common/FindSignature.cpp +InStreamWithCRC.o : ../../Archive/Common/InStreamWithCRC.cpp + $(CXX) $(CXXFLAGS) ../../Archive/Common/InStreamWithCRC.cpp +HandlerOut.o : ../../Archive/Common/HandlerOut.cpp + $(CXX) $(CXXFLAGS) ../../Archive/Common/HandlerOut.cpp +ItemNameUtils.o : ../../Archive/Common/ItemNameUtils.cpp + $(CXX) $(CXXFLAGS) ../../Archive/Common/ItemNameUtils.cpp +MultiStream.o : ../../Archive/Common/MultiStream.cpp + $(CXX) $(CXXFLAGS) ../../Archive/Common/MultiStream.cpp +OutStreamWithCRC.o : ../../Archive/Common/OutStreamWithCRC.cpp + $(CXX) $(CXXFLAGS) ../../Archive/Common/OutStreamWithCRC.cpp +OutStreamWithSha1.o : ../../Archive/Common/OutStreamWithSha1.cpp + $(CXX) $(CXXFLAGS) ../../Archive/Common/OutStreamWithSha1.cpp +ParseProperties.o : ../../Archive/Common/ParseProperties.cpp + $(CXX) $(CXXFLAGS) ../../Archive/Common/ParseProperties.cpp + +ArchiveExports.o : ../../Archive/ArchiveExports.cpp + $(CXX) $(CXXFLAGS) ../../Archive/ArchiveExports.cpp +DllExports2.o : ../../Archive/DllExports2.cpp + $(CXX) $(CXXFLAGS) ../../Archive/DllExports2.cpp +ApmHandler.o : ../../Archive/ApmHandler.cpp + $(CXX) $(CXXFLAGS) ../../Archive/ApmHandler.cpp +ArjHandler.o : ../../Archive/ArjHandler.cpp + $(CXX) $(CXXFLAGS) ../../Archive/ArjHandler.cpp +DebHandler.o : ../../Archive/DebHandler.cpp + $(CXX) $(CXXFLAGS) ../../Archive/DebHandler.cpp +DmgHandler.o : ../../Archive/DmgHandler.cpp + $(CXX) $(CXXFLAGS) ../../Archive/DmgHandler.cpp +ElfHandler.o : ../../Archive/ElfHandler.cpp + $(CXX) $(CXXFLAGS) ../../Archive/ElfHandler.cpp +FatHandler.o : ../../Archive/FatHandler.cpp + $(CXX) $(CXXFLAGS) ../../Archive/FatHandler.cpp +FlvHandler.o : ../../Archive/FlvHandler.cpp + $(CXX) $(CXXFLAGS) ../../Archive/FlvHandler.cpp +MachoHandler.o : ../../Archive/MachoHandler.cpp + $(CXX) $(CXXFLAGS) ../../Archive/MachoHandler.cpp +MbrHandler.o : ../../Archive/MbrHandler.cpp + $(CXX) $(CXXFLAGS) ../../Archive/MbrHandler.cpp +MslzHandler.o : ../../Archive/MslzHandler.cpp + $(CXX) $(CXXFLAGS) ../../Archive/MslzHandler.cpp +MubHandler.o : ../../Archive/MubHandler.cpp + $(CXX) $(CXXFLAGS) ../../Archive/MubHandler.cpp +NtfsHandler.o : ../../Archive/NtfsHandler.cpp + $(CXX) $(CXXFLAGS) ../../Archive/NtfsHandler.cpp +PeHandler.o : ../../Archive/PeHandler.cpp + $(CXX) $(CXXFLAGS) ../../Archive/PeHandler.cpp +RpmHandler.o : ../../Archive/RpmHandler.cpp + $(CXX) $(CXXFLAGS) ../../Archive/RpmHandler.cpp +SwfHandler.o : ../../Archive/SwfHandler.cpp + $(CXX) $(CXXFLAGS) ../../Archive/SwfHandler.cpp +SquashfsHandler.o : ../../Archive/SquashfsHandler.cpp + $(CXX) $(CXXFLAGS) ../../Archive/SquashfsHandler.cpp +VhdHandler.o : ../../Archive/VhdHandler.cpp + $(CXX) $(CXXFLAGS) ../../Archive/VhdHandler.cpp +XarHandler.o : ../../Archive/XarHandler.cpp + $(CXX) $(CXXFLAGS) ../../Archive/XarHandler.cpp +XzHandler.o : ../../Archive/XzHandler.cpp + $(CXX) $(CXXFLAGS) ../../Archive/XzHandler.cpp +ZHandler.o : ../../Archive/ZHandler.cpp + $(CXX) $(CXXFLAGS) ../../Archive/ZHandler.cpp + +Bz2Handler.o : ../../Archive/Bz2Handler.cpp + $(CXX) $(CXXFLAGS) ../../Archive/Bz2Handler.cpp +DeflateProps.o : ../../Archive/DeflateProps.cpp + $(CXX) $(CXXFLAGS) ../../Archive/DeflateProps.cpp +CpioHandler.o : ../../Archive/CpioHandler.cpp + $(CXX) $(CXXFLAGS) ../../Archive/CpioHandler.cpp +CramfsHandler.o : ../../Archive/CramfsHandler.cpp + $(CXX) $(CXXFLAGS) ../../Archive/CramfsHandler.cpp +GzHandler.o : ../../Archive/GzHandler.cpp + $(CXX) $(CXXFLAGS) ../../Archive/GzHandler.cpp +LzhHandler.o : ../../Archive/LzhHandler.cpp + $(CXX) $(CXXFLAGS) ../../Archive/LzhHandler.cpp +LzmaHandler.o : ../../Archive/LzmaHandler.cpp + $(CXX) $(CXXFLAGS) ../../Archive/LzmaHandler.cpp +PpmdHandler.o : ../../Archive/PpmdHandler.cpp + $(CXX) $(CXXFLAGS) ../../Archive/PpmdHandler.cpp +SplitHandler.o : ../../Archive/SplitHandler.cpp + $(CXX) $(CXXFLAGS) ../../Archive/SplitHandler.cpp + +ZRegister.o : ../../Archive/Z/ZRegister.cpp + $(CXX) $(CXXFLAGS) ../../Archive/Z/ZRegister.cpp + +CabBlockInStream.o : ../../Archive/Cab/CabBlockInStream.cpp + $(CXX) $(CXXFLAGS) ../../Archive/Cab/CabBlockInStream.cpp +CabHandler.o : ../../Archive/Cab/CabHandler.cpp + $(CXX) $(CXXFLAGS) ../../Archive/Cab/CabHandler.cpp +CabHeader.o : ../../Archive/Cab/CabHeader.cpp + $(CXX) $(CXXFLAGS) ../../Archive/Cab/CabHeader.cpp +CabIn.o : ../../Archive/Cab/CabIn.cpp + $(CXX) $(CXXFLAGS) ../../Archive/Cab/CabIn.cpp +CabRegister.o : ../../Archive/Cab/CabRegister.cpp + $(CXX) $(CXXFLAGS) ../../Archive/Cab/CabRegister.cpp + +ChmHandler.o : ../../Archive/Chm/ChmHandler.cpp + $(CXX) $(CXXFLAGS) ../../Archive/Chm/ChmHandler.cpp +ChmHeader.o : ../../Archive/Chm/ChmHeader.cpp + $(CXX) $(CXXFLAGS) ../../Archive/Chm/ChmHeader.cpp +ChmIn.o : ../../Archive/Chm/ChmIn.cpp + $(CXX) $(CXXFLAGS) ../../Archive/Chm/ChmIn.cpp +ChmRegister.o : ../../Archive/Chm/ChmRegister.cpp + $(CXX) $(CXXFLAGS) ../../Archive/Chm/ChmRegister.cpp + +ComHandler.o : ../../Archive/Com/ComHandler.cpp + $(CXX) $(CXXFLAGS) ../../Archive/Com/ComHandler.cpp +ComIn.o : ../../Archive/Com/ComIn.cpp + $(CXX) $(CXXFLAGS) ../../Archive/Com/ComIn.cpp +ComRegister.o : ../../Archive/Com/ComRegister.cpp + $(CXX) $(CXXFLAGS) ../../Archive/Com/ComRegister.cpp + +HfsHandler.o : ../../Archive/Hfs/HfsHandler.cpp + $(CXX) $(CXXFLAGS) ../../Archive/Hfs/HfsHandler.cpp +HfsIn.o : ../../Archive/Hfs/HfsIn.cpp + $(CXX) $(CXXFLAGS) ../../Archive/Hfs/HfsIn.cpp +HfsRegister.o : ../../Archive/Hfs/HfsRegister.cpp + $(CXX) $(CXXFLAGS) ../../Archive/Hfs/HfsRegister.cpp + +IsoHandler.o : ../../Archive/Iso/IsoHandler.cpp + $(CXX) $(CXXFLAGS) ../../Archive/Iso/IsoHandler.cpp +IsoHeader.o : ../../Archive/Iso/IsoHeader.cpp + $(CXX) $(CXXFLAGS) ../../Archive/Iso/IsoHeader.cpp +IsoIn.o : ../../Archive/Iso/IsoIn.cpp + $(CXX) $(CXXFLAGS) ../../Archive/Iso/IsoIn.cpp +IsoRegister.o : ../../Archive/Iso/IsoRegister.cpp + $(CXX) $(CXXFLAGS) ../../Archive/Iso/IsoRegister.cpp + +NsisDecode.o : ../../Archive/Nsis/NsisDecode.cpp + $(CXX) $(CXXFLAGS) ../../Archive/Nsis/NsisDecode.cpp +NsisHandler.o : ../../Archive/Nsis/NsisHandler.cpp + $(CXX) $(CXXFLAGS) ../../Archive/Nsis/NsisHandler.cpp +NsisIn.o : ../../Archive/Nsis/NsisIn.cpp + $(CXX) $(CXXFLAGS) ../../Archive/Nsis/NsisIn.cpp +NsisRegister.o : ../../Archive/Nsis/NsisRegister.cpp + $(CXX) $(CXXFLAGS) ../../Archive/Nsis/NsisRegister.cpp + +RarHandler.o : ../../Archive/Rar/RarHandler.cpp + $(CXX) $(CXXFLAGS) ../../Archive/Rar/RarHandler.cpp +RarHeader.o : ../../Archive/Rar/RarHeader.cpp + $(CXX) $(CXXFLAGS) ../../Archive/Rar/RarHeader.cpp +RarIn.o : ../../Archive/Rar/RarIn.cpp + $(CXX) $(CXXFLAGS) ../../Archive/Rar/RarIn.cpp +RarItem.o : ../../Archive/Rar/RarItem.cpp + $(CXX) $(CXXFLAGS) ../../Archive/Rar/RarItem.cpp +RarVolumeInStream.o : ../../Archive/Rar/RarVolumeInStream.cpp + $(CXX) $(CXXFLAGS) ../../Archive/Rar/RarVolumeInStream.cpp +RarRegister.o : ../../Archive/Rar/RarRegister.cpp + $(CXX) $(CXXFLAGS) ../../Archive/Rar/RarRegister.cpp + +UdfHandler.o : ../../Archive/Udf/UdfHandler.cpp + $(CXX) $(CXXFLAGS) ../../Archive/Udf/UdfHandler.cpp +UdfIn.o : ../../Archive/Udf/UdfIn.cpp + $(CXX) $(CXXFLAGS) ../../Archive/Udf/UdfIn.cpp +UdfRegister.o : ../../Archive/Udf/UdfRegister.cpp + $(CXX) $(CXXFLAGS) ../../Archive/Udf/UdfRegister.cpp + +WimHandler.o : ../../Archive/Wim/WimHandler.cpp + $(CXX) $(CXXFLAGS) ../../Archive/Wim/WimHandler.cpp +WimHandlerOut.o : ../../Archive/Wim/WimHandlerOut.cpp + $(CXX) $(CXXFLAGS) ../../Archive/Wim/WimHandlerOut.cpp +WimIn.o : ../../Archive/Wim/WimIn.cpp + $(CXX) $(CXXFLAGS) ../../Archive/Wim/WimIn.cpp +WimRegister.o : ../../Archive/Wim/WimRegister.cpp + $(CXX) $(CXXFLAGS) ../../Archive/Wim/WimRegister.cpp + +ArchiveCommandLine.o : ../../UI/Common/ArchiveCommandLine.cpp + $(CXX) $(CXXFLAGS) ../../UI/Common/ArchiveCommandLine.cpp +ArchiveName.o : ../../UI/Common/ArchiveName.cpp + $(CXX) $(CXXFLAGS) ../../UI/Common/ArchiveName.cpp +ArchiveExtractCallback.o : ../../UI/Common/ArchiveExtractCallback.cpp + $(CXX) $(CXXFLAGS) ../../UI/Common/ArchiveExtractCallback.cpp +ArchiveOpenCallback.o : ../../UI/Common/ArchiveOpenCallback.cpp + $(CXX) $(CXXFLAGS) ../../UI/Common/ArchiveOpenCallback.cpp +CompressCall.o : ../../UI/Common/CompressCall.cpp + $(CXX) $(CXXFLAGS) ../../UI/Common/CompressCall.cpp +Bench.o : ../../UI/Common/Bench.cpp + $(CXX) $(CXXFLAGS) ../../UI/Common/Bench.cpp +DefaultName.o : ../../UI/Common/DefaultName.cpp + $(CXX) $(CXXFLAGS) ../../UI/Common/DefaultName.cpp +EnumDirItems.o : ../../UI/Common/EnumDirItems.cpp + $(CXX) $(CXXFLAGS) ../../UI/Common/EnumDirItems.cpp +Extract.o : ../../UI/Common/Extract.cpp + $(CXX) $(CXXFLAGS) ../../UI/Common/Extract.cpp +ExtractingFilePath.o : ../../UI/Common/ExtractingFilePath.cpp + $(CXX) $(CXXFLAGS) ../../UI/Common/ExtractingFilePath.cpp +LoadCodecs.o : ../../UI/Common/LoadCodecs.cpp + $(CXX) $(CXXFLAGS) ../../UI/Common/LoadCodecs.cpp +OpenArchive.o : ../../UI/Common/OpenArchive.cpp + $(CXX) $(CXXFLAGS) ../../UI/Common/OpenArchive.cpp +PropIDUtils.o : ../../UI/Common/PropIDUtils.cpp + $(CXX) $(CXXFLAGS) ../../UI/Common/PropIDUtils.cpp +SetProperties.o : ../../UI/Common/SetProperties.cpp + $(CXX) $(CXXFLAGS) ../../UI/Common/SetProperties.cpp +SortUtils.o : ../../UI/Common/SortUtils.cpp + $(CXX) $(CXXFLAGS) ../../UI/Common/SortUtils.cpp +TempFiles.o : ../../UI/Common/TempFiles.cpp + $(CXX) $(CXXFLAGS) ../../UI/Common/TempFiles.cpp +Update.o : ../../UI/Common/Update.cpp + $(CXX) $(CXXFLAGS) ../../UI/Common/Update.cpp +UpdateAction.o : ../../UI/Common/UpdateAction.cpp + $(CXX) $(CXXFLAGS) ../../UI/Common/UpdateAction.cpp +UpdateCallback.o : ../../UI/Common/UpdateCallback.cpp + $(CXX) $(CXXFLAGS) ../../UI/Common/UpdateCallback.cpp +UpdatePair.o : ../../UI/Common/UpdatePair.cpp + $(CXX) $(CXXFLAGS) ../../UI/Common/UpdatePair.cpp +UpdateProduce.o : ../../UI/Common/UpdateProduce.cpp + $(CXX) $(CXXFLAGS) ../../UI/Common/UpdateProduce.cpp +WorkDir.o : ../../UI/Common/WorkDir.cpp + $(CXX) $(CXXFLAGS) ../../UI/Common/WorkDir.cpp +ZipRegistry.o : ../Common/ZipRegistry.cpp + $(CXX) $(CXXFLAGS) ../Common/ZipRegistry.cpp +ZipCrypto.o : ../../Crypto/ZipCrypto.cpp + $(CXX) $(CXXFLAGS) ../../Crypto/ZipCrypto.cpp +ZipStrong.o : ../../Crypto/ZipStrong.cpp + $(CXX) $(CXXFLAGS) ../../Crypto/ZipStrong.cpp +MyAes.o : ../../Crypto/MyAes.cpp + $(CXX) $(CXXFLAGS) ../../Crypto/MyAes.cpp +7zAes.o : ../../Crypto/7zAes.cpp + $(CXX) $(CXXFLAGS) ../../Crypto/7zAes.cpp +7zAesRegister.o : ../../Crypto/7zAesRegister.cpp + $(CXX) $(CXXFLAGS) ../../Crypto/7zAesRegister.cpp +WzAes.o : ../../Crypto/WzAes.cpp + $(CXX) $(CXXFLAGS) ../../Crypto/WzAes.cpp +Rar20Crypto.o : ../../Crypto/Rar20Crypto.cpp + $(CXX) $(CXXFLAGS) ../../Crypto/Rar20Crypto.cpp +RarAes.o : ../../Crypto/RarAes.cpp + $(CXX) $(CXXFLAGS) ../../Crypto/RarAes.cpp +HmacSha1.o : ../../Crypto/HmacSha1.cpp + $(CXX) $(CXXFLAGS) ../../Crypto/HmacSha1.cpp +Pbkdf2HmacSha1.o : ../../Crypto/Pbkdf2HmacSha1.cpp + $(CXX) $(CXXFLAGS) ../../Crypto/Pbkdf2HmacSha1.cpp +RandGen.o : ../../Crypto/RandGen.cpp + $(CXX) $(CXXFLAGS) ../../Crypto/RandGen.cpp +Sha1.o : ../../Crypto/Sha1.cpp + $(CXX) $(CXXFLAGS) ../../Crypto/Sha1.cpp + +Sort.o : ../../../../C/Sort.c + $(CC) $(CFLAGS) ../../../../C/Sort.c +Threads.o : ../../../../C/Threads.c + $(CC) $(CFLAGS) ../../../../C/Threads.c + +Lzma2Dec.o : ../../../../C/Lzma2Dec.c + $(CC) $(CFLAGS) ../../../../C/Lzma2Dec.c +Lzma2Enc.o : ../../../../C/Lzma2Enc.c + $(CC) $(CFLAGS) ../../../../C/Lzma2Enc.c +LzmaEnc.o : ../../../../C/LzmaEnc.c + $(CC) $(CFLAGS) ../../../../C/LzmaEnc.c +LzmaDec.o : ../../../../C/LzmaDec.c + $(CC) $(CFLAGS) ../../../../C/LzmaDec.c + + +7zBuf2.o : ../../../../C/7zBuf2.c + $(CC) $(CFLAGS) ../../../../C/7zBuf2.c +7zStream.o : ../../../../C/7zStream.c + $(CC) $(CFLAGS) ../../../../C/7zStream.c +Aes.o : ../../../../C/Aes.c + $(CC) $(CFLAGS) ../../../../C/Aes.c +Bra.o : ../../../../C/Bra.c + $(CC) $(CFLAGS) ../../../../C/Bra.c +Bra86.o : ../../../../C/Bra86.c + $(CC) $(CFLAGS) ../../../../C/Bra86.c +BraIA64.o : ../../../../C/BraIA64.c + $(CC) $(CFLAGS) ../../../../C/BraIA64.c +BwtSort.o : ../../../../C/BwtSort.c + $(CC) $(CFLAGS) ../../../../C/BwtSort.c +Alloc.o : ../../../../C/Alloc.c + $(CC) $(CFLAGS) ../../../../C/Alloc.c +Delta.o : ../../../../C/Delta.c + $(CC) $(CFLAGS) ../../../../C/Delta.c +LzFind.o : ../../../../C/LzFind.c + $(CC) $(CFLAGS) ../../../../C/LzFind.c +LzFindMt.o : ../../../../C/LzFindMt.c + $(CC) $(CFLAGS) ../../../../C/LzFindMt.c +HuffEnc.o : ../../../../C/HuffEnc.c + $(CC) $(CFLAGS) ../../../../C/HuffEnc.c +MtCoder.o : ../../../../C/MtCoder.c + $(CC) $(CFLAGS) ../../../../C/MtCoder.c + +Ppmd7.o : ../../../../C/Ppmd7.c + $(CC) $(CFLAGS) ../../../../C/Ppmd7.c +Ppmd7Dec.o : ../../../../C/Ppmd7Dec.c + $(CC) $(CFLAGS) ../../../../C/Ppmd7Dec.c +Ppmd7Enc.o : ../../../../C/Ppmd7Enc.c + $(CC) $(CFLAGS) ../../../../C/Ppmd7Enc.c + +Ppmd8.o : ../../../../C/Ppmd8.c + $(CC) $(CFLAGS) ../../../../C/Ppmd8.c +Ppmd8Dec.o : ../../../../C/Ppmd8Dec.c + $(CC) $(CFLAGS) ../../../../C/Ppmd8Dec.c +Ppmd8Enc.o : ../../../../C/Ppmd8Enc.c + $(CC) $(CFLAGS) ../../../../C/Ppmd8Enc.c + +Sha256.o : ../../../../C/Sha256.c + $(CC) $(CFLAGS) ../../../../C/Sha256.c + +Xz.o : ../../../../C/Xz.c + $(CC) $(CFLAGS) ../../../../C/Xz.c +XzCrc64.o : ../../../../C/XzCrc64.c + $(CC) $(CFLAGS) ../../../../C/XzCrc64.c +XzDec.o : ../../../../C/XzDec.c + $(CC) $(CFLAGS) ../../../../C/XzDec.c +XzEnc.o : ../../../../C/XzEnc.c + $(CC) $(CFLAGS) ../../../../C/XzEnc.c +XzIn.o : ../../../../C/XzIn.c + $(CC) $(CFLAGS) ../../../../C/XzIn.c + +# CRC32, C version +7zCrc.o : ../../../../C/7zCrc.c + $(CC) $(CFLAGS) ../../../../C/7zCrc.c +7zCrcOpt.o : ../../../../C/7zCrcOpt.c + $(CC) $(CFLAGS) ../../../../C/7zCrcOpt.c +# CRC32, ASM version +7zCrcT8.o : ../../../../C/7zCrcT8.c + $(CC) $(CFLAGS) ../../../../C/7zCrcT8.c + + + +# +FormatUtils.o : ../../UI/FileManager/FormatUtils.cpp + $(CXX) $(CXXFLAGS) ../../UI/FileManager/FormatUtils.cpp +ProgramLocation.o : ../../UI/FileManager/ProgramLocation.cpp + $(CXX) $(CXXFLAGS) ../../UI/FileManager/ProgramLocation.cpp +ProgressDialog2.o : ../../UI/FileManager/ProgressDialog2.cpp + $(CXX) $(CXXFLAGS) ../../UI/FileManager/ProgressDialog2.cpp +ProgressDialog2_rc.o : ../../UI/FileManager/ProgressDialog2_rc.cpp + $(CXX) $(CXXFLAGS) ../../UI/FileManager/ProgressDialog2_rc.cpp +MessagesDialog.o : ../../UI/FileManager/MessagesDialog.cpp + $(CXX) $(CXXFLAGS) ../../UI/FileManager/MessagesDialog.cpp +MessagesDialog_rc.o : ../../UI/FileManager/MessagesDialog_rc.cpp + $(CXX) $(CXXFLAGS) ../../UI/FileManager/MessagesDialog_rc.cpp +OverwriteDialog.o : ../../UI/FileManager/OverwriteDialog.cpp + $(CXX) $(CXXFLAGS) ../../UI/FileManager/OverwriteDialog.cpp +OverwriteDialog_rc.o : ../../UI/FileManager/OverwriteDialog_rc.cpp + $(CXX) $(CXXFLAGS) ../../UI/FileManager/OverwriteDialog_rc.cpp +PasswordDialog.o : ../../UI/FileManager/PasswordDialog.cpp + $(CXX) $(CXXFLAGS) ../../UI/FileManager/PasswordDialog.cpp +PasswordDialog_rc.o : ../../UI/FileManager/PasswordDialog_rc.cpp + $(CXX) $(CXXFLAGS) ../../UI/FileManager/PasswordDialog_rc.cpp +ExtractCallback.o : ../../UI/FileManager/ExtractCallback.cpp + $(CXX) $(CXXFLAGS) ../../UI/FileManager/ExtractCallback.cpp +SplitUtils.o : ../../UI/FileManager/SplitUtils.cpp + $(CXX) $(CXXFLAGS) ../../UI/FileManager/SplitUtils.cpp +StringUtils.o : ../../UI/FileManager/StringUtils.cpp + $(CXX) $(CXXFLAGS) ../../UI/FileManager/StringUtils.cpp +LangUtils.o : ../../UI/FileManager/LangUtils.cpp + $(CXX) $(CXXFLAGS) ../../UI/FileManager/LangUtils.cpp + diff --git a/makefile.solaris_sparc_CC_32 b/makefile.solaris_sparc_CC_32 new file mode 100644 index 0000000..16c9f45 --- /dev/null +++ b/makefile.solaris_sparc_CC_32 @@ -0,0 +1,21 @@ + +OPTFLAGS=-fast + +ALLFLAGS=${OPTFLAGS} -s -mt \ + -DHAVE_LONG_LONG \ + -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE \ + -DENV_UNIX \ + -DNDEBUG -D_REENTRANT \ + $(LOCAL_FLAGS) + +CXX=CC $(ALLFLAGS) +CC=cc $(ALLFLAGS) +CC_SHARED=-KPIC +LINK_SHARED=-KPIC -G + +# -lCrun : standard C++ library (for new/delete) +LOCAL_LIBS=-lpthread -lCrun +LOCAL_LIBS_DLL=$(LOCAL_LIBS) -ldl + +OBJ_CRC32=$(OBJ_CRC32_C) + diff --git a/makefile.solaris_sparc_CC_64 b/makefile.solaris_sparc_CC_64 new file mode 100644 index 0000000..e7d2184 --- /dev/null +++ b/makefile.solaris_sparc_CC_64 @@ -0,0 +1,23 @@ + +#-fast -xarch=v9 => 64 bits +# use "isainfo -v" to set the flag "-xarch" + +OPTFLAGS=-fast -xarch=v9 +ALLFLAGS=${OPTFLAGS} -s -mt \ + -DHAVE_LONG_LONG \ + -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE \ + -DENV_UNIX \ + -DNDEBUG -D_REENTRANT \ + $(LOCAL_FLAGS) + +CXX=CC $(ALLFLAGS) +CC=cc $(ALLFLAGS) +CC_SHARED=-KPIC +LINK_SHARED=-KPIC -G + +# -lCrun : standard C++ library (for new/delete) +LOCAL_LIBS=-lpthread -lCrun +LOCAL_LIBS_DLL=$(LOCAL_LIBS) -ldl + +OBJ_CRC32=$(OBJ_CRC32_C) + diff --git a/makefile.solaris_sparc_gcc b/makefile.solaris_sparc_gcc new file mode 100644 index 0000000..c845879 --- /dev/null +++ b/makefile.solaris_sparc_gcc @@ -0,0 +1,21 @@ + +OPTFLAGS=-O + +ALLFLAGS=${OPTFLAGS} -s \ + -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE \ + -DENV_UNIX \ + -DNDEBUG -D_REENTRANT \ + $(LOCAL_FLAGS) + +#CXX=/opt/sfw/bin/g++ $(ALLFLAGS) +#CC=/opt/sfw/bin/gcc $(ALLFLAGS) +CXX=g++ $(ALLFLAGS) +CC=gcc $(ALLFLAGS) +CC_SHARED=-fPIC +LINK_SHARED=-fPIC -shared + +LOCAL_LIBS=-lpthread -lrt +LOCAL_LIBS_DLL=$(LOCAL_LIBS) -ldl + +OBJ_CRC32=$(OBJ_CRC32_C) + diff --git a/makefile.solaris_x86 b/makefile.solaris_x86 new file mode 100644 index 0000000..89b6e7f --- /dev/null +++ b/makefile.solaris_x86 @@ -0,0 +1,19 @@ + +OPTFLAGS=-O + +ALLFLAGS=${OPTFLAGS} -s \ + -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE \ + -DENV_UNIX \ + -DNDEBUG -D_REENTRANT \ + $(LOCAL_FLAGS) + +CXX=g++ $(ALLFLAGS) +CC=gcc $(ALLFLAGS) +CC_SHARED=-fPIC +LINK_SHARED=-fPIC -shared + +LOCAL_LIBS=-lpthread -lrt +LOCAL_LIBS_DLL=$(LOCAL_LIBS) -ldl + +OBJ_CRC32=$(OBJ_CRC32_C) + diff --git a/makefile.tru64 b/makefile.tru64 new file mode 100644 index 0000000..374fe03 --- /dev/null +++ b/makefile.tru64 @@ -0,0 +1,22 @@ +# +# makefile for Tru64 +# tested with OSF 5.1 and g++ 3.4.2 +# + +OPTFLAGS=-O + +ALLFLAGS=${OPTFLAGS} -s \ + -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE \ + -DNDEBUG -D_REENTRANT -DENV_UNIX \ + $(LOCAL_FLAGS) + +CXX=g++ $(ALLFLAGS) +CC=gcc $(ALLFLAGS) +CC_SHARED=-fPIC +LINK_SHARED=-fPIC -shared + +LOCAL_LIBS=-lpthread +LOCAL_LIBS_DLL=$(LOCAL_LIBS) -ldl + +OBJ_CRC32=$(OBJ_CRC32_C) + diff --git a/man1/7z.1 b/man1/7z.1 new file mode 100644 index 0000000..cdb3c7c --- /dev/null +++ b/man1/7z.1 @@ -0,0 +1,174 @@ +.TH 7z 1 "September 1 2006" "Mohammed Adnene Trojette" +.SH NAME +7z \- A file archiver with highest compression ratio +.SH SYNOPSIS +.B 7z +.BR [adeltux] +.BR [\-] +.BR [SWITCH] +.BR +.BR ... +.PP +.SH DESCRIPTION +7-Zip is a file archiver with the highest compression ratio. The program supports 7z (that implements LZMA compression algorithm), ZIP, CAB, ARJ, GZIP, BZIP2, TAR, CPIO, RPM and DEB formats. Compression ratio in the new 7z format is 30-50% better than ratio in ZIP format. +.TP +7z uses plugins to handle archives. +.PP +.SH FUNCTION LETTERS +.TP +.B a +Add +.TP +.B d +Delete +.TP +.B e +Extract +.TP +.B l +List +.TP +.B t +Test +.TP +.B u +Update +.TP +.B x +eXtract with full paths +.PP +.SH SWITCHES +.TP +.B \-ai[r[\-|0]]{@listfile|!wildcard} +Include archives +.TP +.B \-ax[r[\-|0]]{@listfile|!wildcard} +eXclude archives +.TP +.B \-bd +Disable percentage indicator +.TP +.B \-i[r[\-|0]]{@listfile|!wildcard} +Include filenames +.TP +.B \-l +don't store symlinks; store the files/directories they point to (CAUTION : the scanning stage can never end because of recursive symlinks like 'ln \-s .. ldir') +.TP +.B \-m{Parameters} +Set Compression Method (see {DEST_SHARE_DOC}/MANUAL/switches/method.htm for a list of methods) +.TP +.B \-mhe=on|off +7z format only : enables or disables archive header encryption (Default : off) +.TP +.B \-o{Directory} +Set Output directory +.TP +.B \-p{Password} +Set Password +.TP +.B \-r[\-|0] +Recurse subdirectories (CAUTION: this flag does not do what you think, avoid using it) +.TP +.B \-sfx[{name}] +Create SFX archive +.TP +.B \-si +Read data from StdIn (eg: tar cf \- directory | 7z a \-si directory.tar.7z) +.TP +.B \-so +Write data to StdOut (eg: % echo foo | 7z a dummy \-tgzip \-si \-so > /dev/null) +.TP +.B \-slt +Sets technical mode for l (list) command +.TP +.B \-t{Type} +Type of archive (7z, zip, gzip, bzip2 or tar. 7z format is default) +.TP +.B \-v{Size}[b|k|m|g] +Create volumes +.TP +.B \-u[\-][p#][q#][r#][x#][y#][z#][!newArchiveName] +Update options +.TP +.B \-w[path] +Set Working directory +.TP +.B \-x[r[\-|0]]]{@listfile|!wildcard} +Exclude filenames +.TP +.B \-y +Assume Yes on all queries +.PP +.SH DIAGNOSTICS +7-Zip returns the following exit codes: +.RS +.IP 0 +Normal (no errors or warnings detected) +.IP 1 +Warning (Non fatal error(s)). For example, some files cannot be read during compressing. So they were not compressed +.IP 2 +Fatal error +.IP 7 +Bad command line parameters +.IP 8 +Not enough memory for operation +.IP 255 +User stopped the process with control-C (or similar) +.SH Backup and limitations +DO NOT USE the 7-zip format for backup purpose on Linux/Unix because : + \- 7-zip does not store the owner/group of the file. + +.LP +On Linux/Unix, in order to backup directories you must use tar : + \- to backup a directory : tar cf \- directory | 7za a \-si directory.tar.7z + \- to restore your backup : 7za x \-so directory.tar.7z | tar xf \- + +If you want to send files and directories (not the owner of file) +to others Unix/MacOS/Windows users, you can use the 7-zip format. + + example : 7za a directory.7z directory + +.LP +Do not use "\-r" because this flag does not do what you think. +.LP +Do not use directory/* because of ".*" files (example : "directory/*" does not match "directory/.profile") +.SH EXAMPLE 1 +.TP +.B 7z a \-t7z \-m0=lzma \-mx=9 \-mfb=64 \-md=32m \-ms=on archive.7z dir1 +adds all files from directory "dir1" to archive archive.7z using "ultra settings" +.TP +.B \-t7z +7z archive +.TP +.B \-m0=lzma +lzma method +.TP +.B \-mx=9 +level of compression = 9 (Ultra) +.TP +.B \-mfb=64 +number of fast bytes for LZMA = 64 +.TP +.B \-md=32m +dictionary size = 32 megabytes +.TP +.B \-ms=on +solid archive = on +.SH EXAMPLE 2 +.TP +.B +7z a \-sfx archive.exe dir1 +add all files from directory "dir1" to SFX archive archive.exe (Remark : SFX archive MUST end with ".exe") +.SH EXAMPLE 3 +.TP +.B +7z a \-mhe=on \-pmy_password archive.7z a_directory +add all files from directory "a_directory" to the archive "archive.7z" (with data and header archive encryption on) +.SH "SEE ALSO" +7za(1), 7zr(1), bzip2(1), gzip(1), zip(1) +.PP +.SH "HTML Documentation" +{DEST_SHARE_DOC}/MANUAL/index.htm +.SH AUTHOR +.TP +Written for Debian by Mohammed Adnene Trojette. diff --git a/man1/7za.1 b/man1/7za.1 new file mode 100644 index 0000000..15f0fe4 --- /dev/null +++ b/man1/7za.1 @@ -0,0 +1,174 @@ +.TH 7za 1 "September 1 2006" "Mohammed Adnene Trojette" +.SH NAME +7za \- A file archiver with highest compression ratio +.SH SYNOPSIS +.B 7za +.BR [adeltux] +.BR [-] +.BR [SWITCH] +.BR +.BR ... +.PP +.SH DESCRIPTION +7-Zip is a file archiver with the highest compression ratio. The program supports 7z (that implements LZMA compression algorithm), ZIP, CAB, ARJ, GZIP, BZIP2, TAR, CPIO, RPM and DEB formats. Compression ratio in the new 7z format is 30-50% better than ratio in ZIP format. +.TP +7za is a stand-alone executable. 7za handles less archive formats than 7z, but does not need any others. +.PP +.SH FUNCTION LETTERS +.TP +.B a +Add +.TP +.B d +Delete +.TP +.B e +Extract +.TP +.B l +List +.TP +.B t +Test +.TP +.B u +Update +.TP +.B x +eXtract with full paths +.PP +.SH SWITCHES +.TP +.B \-ai[r[-|0]]{@listfile|!wildcard} +Include archives +.TP +.B \-ax[r[-|0]]{@listfile|!wildcard} +eXclude archives +.TP +.B \-bd +Disable percentage indicator +.TP +.B \-i[r[-|0]]{@listfile|!wildcard} +Include filenames +.TP +.B \-l +don't store symlinks; store the files/directories they point to (CAUTION : the scanning stage can never end because of recursive symlinks like 'ln \-s .. ldir') +.TP +.B \-m{Parameters} +Set Compression Method (see {DEST_SHARE_DOC}/MANUAL/switches/method.htm for a list of methods) +.TP +.B \-mhe=on|off +7z format only : enables or disables archive header encryption (Default : off) +.TP +.B \-o{Directory} +Set Output directory +.TP +.B \-p{Password} +Set Password +.TP +.B \-r[-|0] +Recurse subdirectories (CAUTION: this flag does not do what you think, avoid using it) +.TP +.B \-sfx[{name}] +Create SFX archive +.TP +.B \-si +Read data from StdIn (eg: tar cf \- directory | 7za a \-si directory.tar.7z) +.TP +.B \-so +Write data to StdOut (eg: % echo foo | 7z a dummy \-tgzip \-si \-so > /dev/null) +.TP +.B \-slt +Sets technical mode for l (list) command +.TP +.B \-t{Type} +Type of archive (7z, zip, gzip, bzip2 or tar. 7z format is default) +.TP +.B \-v{Size}[b|k|m|g] +Create volumes +.TP +.B \-u[-][p#][q#][r#][x#][y#][z#][!newArchiveName] +Update options +.TP +.B \-w[path] +Set Working directory +.TP +.B \-x[r[-|0]]]{@listfile|!wildcard} +Exclude filenames +.TP +.B \-y +Assume Yes on all queries +.PP +.SH DIAGNOSTICS +7-Zip returns the following exit codes: +.RS +.IP 0 +Normal (no errors or warnings detected) +.IP 1 +Warning (Non fatal error(s)). For example, some files cannot be read during compressing. So they were not compressed +.IP 2 +Fatal error +.IP 7 +Bad command line parameters +.IP 8 +Not enough memory for operation +.IP 255 +User stopped the process with control-C (or similar) +.SH Backup and limitations +DO NOT USE the 7-zip format for backup purpose on Linux/Unix because : + \- 7-zip does not store the owner/group of the file. + +.LP +On Linux/Unix, in order to backup directories you must use tar : + \- to backup a directory : tar cf \- directory | 7za a \-si directory.tar.7z + \- to restore your backup : 7za x \-so directory.tar.7z | tar xf \- + +If you want to send files and directories (not the owner of file) +to others Unix/MacOS/Windows users, you can use the 7-zip format. + + example : 7za a directory.7z directory + +.LP +Do not use "\-r" because this flag does not do what you think. +.LP +Do not use directory/* because of ".*" files (example : "directory/*" does not match "directory/.profile") +.SH EXAMPLE 1 +.TP +.B 7za a \-t7z \-m0=lzma \-mx=9 \-mfb=64 \-md=32m \-ms=on archive.7z dir1 +adds all files from directory "dir1" to archive archive.7z using "ultra settings" +.TP +.B \-t7z +7z archive +.TP +.B \-m0=lzma +lzma method +.TP +.B \-mx=9 +level of compression = 9 (Ultra) +.TP +.B \-mfb=64 +number of fast bytes for LZMA = 64 +.TP +.B \-md=32m +dictionary size = 32 megabytes +.TP +.B \-ms=on +solid archive = on +.SH EXAMPLE 2 +.TP +.B +7za a \-sfx archive.exe dir1 +add all files from directory "dir1" to SFX archive archive.exe (Remark : SFX archive MUST end with ".exe") +.SH EXAMPLE 3 +.TP +.B +7za a \-mhe=on \-pmy_password archive.7z a_directory +add all files from directory "a_directory" to the archive "archive.7z" (with data and header archive encryption on) +.SH "SEE ALSO" +7z(1), 7zr(1), bzip2(1), gzip(1), zip(1) +.PP +.SH "HTML Documentation" +{DEST_SHARE_DOC}/MANUAL/index.htm +.SH AUTHOR +.TP +Written for Debian by Mohammed Adnene Trojette. diff --git a/man1/7zr.1 b/man1/7zr.1 new file mode 100644 index 0000000..f81d61c --- /dev/null +++ b/man1/7zr.1 @@ -0,0 +1,171 @@ +.TH 7zr 1 "September 1 2006" "Mohammed Adnene Trojette" +.SH NAME +7zr \- A file archiver with highest compression ratio +.SH SYNOPSIS +.B 7zr +.BR [adeltux] +.BR [-] +.BR [SWITCH] +.BR +.BR ... +.PP +.SH DESCRIPTION +7-Zip is a file archiver with the highest compression ratio. The program supports 7z (that implements LZMA compression algorithm), ZIP, CAB, ARJ, GZIP, BZIP2, TAR, CPIO, RPM and DEB formats. Compression ratio in the new 7z format is 30-50% better than ratio in ZIP format. +.TP +7zr is a stand-alone executable. 7zr handles less archive formats than 7z, but does not need any others. 7zr is a "light-version" of 7za that only handles 7z archives. +.PP +.SH FUNCTION LETTERS +.TP +.B a +Add +.TP +.B d +Delete +.TP +.B e +Extract +.TP +.B l +List +.TP +.B t +Test +.TP +.B u +Update +.TP +.B x +eXtract with full paths +.PP +.SH SWITCHES +.TP +.B \-ai[r[-|0]]{@listfile|!wildcard} +Include archives +.TP +.B \-ax[r[-|0]]{@listfile|!wildcard} +eXclude archives +.TP +.B \-bd +Disable percentage indicator +.TP +.B \-i[r[-|0]]{@listfile|!wildcard} +Include filenames +.TP +.B \-l +don't store symlinks; store the files/directories they point to (CAUTION : the scanning stage can never end because of recursive symlinks like 'ln \-s .. ldir') +.TP +.B \-m{Parameters} +Set Compression Method (see {DEST_SHARE_DOC}/MANUAL/switches/method.htm for a list of methods) +.TP +.B \-mhe=on|off +7z format only : enables or disables archive header encryption (Default : off) +.TP +.B \-o{Directory} +Set Output directory +.TP +.B \-p{Password} +Set Password +.TP +.B \-r[-|0] +Recurse subdirectories (CAUTION: this flag does not do what you think, avoid using it) +.TP +.B \-sfx[{name}] +Create SFX archive +.TP +.B \-si +Read data from StdIn (eg: tar cf \- directory | 7zr a \-si directory.tar.7z) +.TP +.B \-so +Write data to StdOut (eg: 7zr x \-so directory.tar.7z | tar xf \-) +.TP +.B \-slt +Sets technical mode for l (list) command +.TP +.B \-v{Size}[b|k|m|g] +Create volumes +.TP +.B \-u[-][p#][q#][r#][x#][y#][z#][!newArchiveName] +Update options +.TP +.B \-w[path] +Set Working directory +.TP +.B \-x[r[-|0]]]{@listfile|!wildcard} +Exclude filenames +.TP +.B \-y +Assume Yes on all queries +.PP +.SH DIAGNOSTICS +7-Zip returns the following exit codes: +.RS +.IP 0 +Normal (no errors or warnings detected) +.IP 1 +Warning (Non fatal error(s)). For example, some files cannot be read during compressing. So they were not compressed +.IP 2 +Fatal error +.IP 7 +Bad command line parameters +.IP 8 +Not enough memory for operation +.IP 255 +User stopped the process with control-C (or similar) +.SH Backup and limitations +DO NOT USE the 7-zip format for backup purpose on Linux/Unix because : + \- 7-zip does not store the owner/group of the file. + +.LP +On Linux/Unix, in order to backup directories you must use tar : + \- to backup a directory : tar cf - directory | 7zr a -si directory.tar.7z + \- to restore your backup : 7zr x -so directory.tar.7z | tar xf - + +If you want to send files and directories (not the owner of file) +to others Unix/MacOS/Windows users, you can use the 7-zip format. + + example : 7zr a directory.7z directory + +.LP +Do not use "\-r" because this flag does not do what you think. +.LP +Do not use directory/* because of ".*" files (example : "directory/*" does not match "directory/.profile") +.SH EXAMPLE 1 +.TP +.B 7zr a \-t7z \-m0=lzma \-mx=9 \-mfb=64 \-md=32m \-ms=on archive.7z dir1 +adds all files from directory "dir1" to archive archive.7z using "ultra settings" +.TP +.B \-t7z +7z archive +.TP +.B \-m0=lzma +lzma method +.TP +.B \-mx=9 +level of compression = 9 (Ultra) +.TP +.B \-mfb=64 +number of fast bytes for LZMA = 64 +.TP +.B \-md=32m +dictionary size = 32 megabytes +.TP +.B \-ms=on +solid archive = on +.SH EXAMPLE 2 +.TP +.B +7zr a \-sfx archive.exe dir1 +add all files from directory "dir1" to SFX archive archive.exe (Remark : SFX archive MUST end with ".exe") +.SH EXAMPLE 3 +.TP +.B +7zr a \-mhe=on \-pmy_password archive.7z a_directory +add all files from directory "a_directory" to the archive "archive.7z" (with data and header archive encryption on) +.SH "SEE ALSO" +7z(1), 7za(1), bzip2(1), gzip(1), zip(1) +.PP +.SH "HTML Documentation" +{DEST_SHARE_DOC}/MANUAL/index.htm +.SH AUTHOR +.TP +Written for Debian by Mohammed Adnene Trojette.