4.44 beta

This commit is contained in:
Igor Pavlov
2007-01-20 00:00:00 +00:00
committed by Kornel Lesiński
parent 804edc5756
commit d9666cf046
1331 changed files with 10535 additions and 13791 deletions

2301
CPP/7zip/Bundles/Alone/Alone.dsp Executable file
View File

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,29 @@
Microsoft Developer Studio Workspace File, Format Version 6.00
# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
###############################################################################
Project: "Alone"=.\Alone.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
}}}
###############################################################################
Global:
Package=<5>
{{{
}}}
Package=<3>
{{{
}}}
###############################################################################

View File

@@ -0,0 +1,3 @@
// StdAfx.cpp
#include "StdAfx.h"

View File

@@ -0,0 +1,9 @@
// StdAfx.h
#ifndef __STDAFX_H
#define __STDAFX_H
#include "../../../Common/MyWindows.h"
#include "../../../Common/NewHandler.h"
#endif

View File

@@ -0,0 +1 @@
#include <winresrc.h>

390
CPP/7zip/Bundles/Alone/makefile Executable file
View File

@@ -0,0 +1,390 @@
PROG = 7za.exe
LIBS = $(LIBS) user32.lib oleaut32.lib Advapi32.lib
CFLAGS = $(CFLAGS) -I ../../../ \
-DEXCLUDE_COM \
-DNO_REGISTRY \
-DWIN_LONG_PATH \
-DFORMAT_7Z \
-DFORMAT_BZIP2 \
-DFORMAT_CAB \
-DFORMAT_GZIP \
-DFORMAT_SPLIT \
-DFORMAT_TAR \
-DFORMAT_Z \
-DFORMAT_ZIP \
-DCOMPRESS_MT \
-DCOMPRESS_BCJ_X86 \
-DCOMPRESS_BCJ2 \
-DCOMPRESS_BZIP2 \
-DCOMPRESS_BZIP2_MT \
-DCOMPRESS_COPY \
-DCOMPRESS_DEFLATE \
-DCOMPRESS_DEFLATE64 \
-DCOMPRESS_IMPLODE \
-DCOMPRESS_LZMA \
-DCOMPRESS_MF_MT \
-DCOMPRESS_PPMD \
-DCRYPTO_7ZAES \
-DCRYPTO_AES \
-DCRYPTO_ZIP \
CONSOLE_OBJS = \
$O\ConsoleClose.obj \
$O\ExtractCallbackConsole.obj \
$O\List.obj \
$O\Main.obj \
$O\MainAr.obj \
$O\OpenCallbackConsole.obj \
$O\PercentPrinter.obj \
$O\UpdateCallbackConsole.obj \
$O\UserInputUtils.obj \
COMMON_OBJS = \
$O\Alloc.obj \
$O\CommandLineParser.obj \
$O\CRC.obj \
$O\IntToString.obj \
$O\ListFileUtils.obj \
$O\NewHandler.obj \
$O\StdInStream.obj \
$O\StdOutStream.obj \
$O\String.obj \
$O\StringConvert.obj \
$O\StringToInt.obj \
$O\UTFConvert.obj \
$O\Vector.obj \
$O\Wildcard.obj \
WIN_OBJS = \
$O\DLL.obj \
$O\Error.obj \
$O\FileDir.obj \
$O\FileFind.obj \
$O\FileIO.obj \
$O\FileName.obj \
$O\MemoryLock.obj \
$O\PropVariant.obj \
$O\PropVariantConversions.obj \
$O\Synchronization.obj
7ZIP_COMMON_OBJS = \
$O\FilePathAutoRename.obj \
$O\FileStreams.obj \
$O\InBuffer.obj \
$O\InOutTempBuffer.obj \
$O\LimitedStreams.obj \
$O\LockedStream.obj \
$O\LSBFDecoder.obj \
$O\LSBFEncoder.obj \
$O\MemBlocks.obj \
$O\OffsetStream.obj \
$O\OutBuffer.obj \
$O\OutMemStream.obj \
$O\ProgressMt.obj \
$O\ProgressUtils.obj \
$O\StreamBinder.obj \
$O\StreamObjects.obj \
$O\StreamUtils.obj \
UI_COMMON_OBJS = \
$O\ArchiveCommandLine.obj \
$O\ArchiveExtractCallback.obj \
$O\ArchiveOpenCallback.obj \
$O\ArchiverInfo.obj \
$O\DefaultName.obj \
$O\EnumDirItems.obj \
$O\Extract.obj \
$O\ExtractingFilePath.obj \
$O\OpenArchive.obj \
$O\PropIDUtils.obj \
$O\SetProperties.obj \
$O\SortUtils.obj \
$O\TempFiles.obj \
$O\Update.obj \
$O\UpdateAction.obj \
$O\UpdateCallback.obj \
$O\UpdatePair.obj \
$O\UpdateProduce.obj \
$O\WorkDir.obj \
AR_COMMON_OBJS = \
$O\CoderMixer2.obj \
$O\CoderMixer2MT.obj \
$O\CrossThreadProgress.obj \
$O\DummyOutStream.obj \
$O\FilterCoder.obj \
$O\InStreamWithCRC.obj \
$O\ItemNameUtils.obj \
$O\MultiStream.obj \
$O\OutStreamWithCRC.obj \
$O\ParseProperties.obj \
7Z_OBJS = \
$O\7zCompressionMode.obj \
$O\7zDecode.obj \
$O\7zEncode.obj \
$O\7zExtract.obj \
$O\7zFolderInStream.obj \
$O\7zFolderOutStream.obj \
$O\7zHandler.obj \
$O\7zHandlerOut.obj \
$O\7zHeader.obj \
$O\7zIn.obj \
$O\7zMethodID.obj \
$O\7zOut.obj \
$O\7zProperties.obj \
$O\7zSpecStream.obj \
$O\7zUpdate.obj \
BZ2_OBJS = \
$O\BZip2Handler.obj \
$O\BZip2HandlerOut.obj \
$O\BZip2Update.obj \
CAB_OBJS = \
$O\CabBlockInStream.obj \
$O\CabHandler.obj \
$O\CabHeader.obj \
$O\CabIn.obj \
GZ_OBJS = \
$O\GZipHandler.obj \
$O\GZipHandlerOut.obj \
$O\GZipHeader.obj \
$O\GZipIn.obj \
$O\GZipOut.obj \
$O\GZipUpdate.obj \
SPLIT_OBJS = \
$O\SplitHandler.obj \
$O\SplitHandlerOut.obj \
TAR_OBJS = \
$O\TarHandler.obj \
$O\TarHandlerOut.obj \
$O\TarHeader.obj \
$O\TarIn.obj \
$O\TarOut.obj \
$O\TarUpdate.obj \
Z_OBJS = \
$O\ZHandler.obj \
ZIP_OBJS = \
$O\ZipAddCommon.obj \
$O\ZipHandler.obj \
$O\ZipHandlerOut.obj \
$O\ZipHeader.obj \
$O\ZipIn.obj \
$O\ZipItem.obj \
$O\ZipOut.obj \
$O\ZipUpdate.obj \
BRANCH_OPT_OBJS = \
$O\BranchCoder.obj \
$O\x86.obj \
$O\x86_2.obj \
BZIP2_OBJS = \
$O\BZip2CRC.obj \
BZIP2_OPT_OBJS = \
$O\BZip2Decoder.obj \
$O\BZip2Encoder.obj \
DEFLATE_OPT_OBJS = \
$O\DeflateDecoder.obj \
$O\DeflateEncoder.obj \
LZ_OBJS = \
$O\LzOutWindow.obj \
LZMA_OPT_OBJS = \
$O\LZMADecoder.obj \
$O\LZMAEncoder.obj \
LZX_OBJS = \
$O\LzxDecoder.obj \
$O\Lzx86Converter.obj \
IMPLODE_OBJS = \
$O\ImplodeDecoder.obj \
$O\ImplodeHuffmanDecoder.obj \
PPMD_OPT_OBJS = \
$O\PPMDDecoder.obj \
$O\PPMDEncoder.obj \
SHRINK_OBJS = \
$O\ShrinkDecoder.obj \
COMPRESS_Z_OBJS = \
$O\ZDecoder.obj \
7ZAES_OPT_OBJS = \
$O\7zAES.obj \
AES_OPT_OBJS = \
$O\MyAES.obj \
AES_ORIG_OBJS = \
$O\aescrypt.obj \
$O\aeskey.obj \
$O\aestab.obj \
CRYPTO_HASH_OBJS = \
$O\HmacSha1.obj \
$O\Pbkdf2HmacSha1.obj \
$O\RandGen.obj \
$O\Sha1.obj \
$O\Sha256.obj \
CRYPTO_WZAES_OBJS = \
$O\WzAES.obj \
CRYPTO_ZIP_OBJS = \
$O\ZipCipher.obj \
$O\ZipCrypto.obj \
C_OBJS = \
$O\7zCrc.obj \
$O\Sort.obj \
$O\Threads.obj \
C_LZ_OBJS = \
$O\MatchFinder.obj \
$O\MatchFinderMt.obj \
OBJS = \
$O\StdAfx.obj \
$(CONSOLE_OBJS) \
$(COMMON_OBJS) \
$(WIN_OBJS) \
$(7ZIP_COMMON_OBJS) \
$(UI_COMMON_OBJS) \
$(AR_COMMON_OBJS) \
$(7Z_OBJS) \
$(BZ2_OBJS) \
$(CAB_OBJS) \
$(GZ_OBJS) \
$(SPLIT_OBJS) \
$(TAR_OBJS) \
$(Z_OBJS) \
$(ZIP_OBJS) \
$(BZIP2_OBJS) \
$(BZIP2_OPT_OBJS) \
$(BRANCH_OPT_OBJS) \
$(DEFLATE_OPT_OBJS) \
$(IMPLODE_OBJS) \
$(LZ_OBJS) \
$(LZMA_OPT_OBJS) \
$(LZX_OBJS) \
$(PPMD_OPT_OBJS) \
$(SHRINK_OBJS) \
$(COMPRESS_Z_OBJS) \
$(C_OBJS) \
$(C_LZ_OBJS) \
$O\BlockSort.obj \
$O\CopyCoder.obj \
$O\HuffmanEncode.obj \
$O\RangeCoderBit.obj \
$(7ZAES_OPT_OBJS) \
$(AES_OPT_OBJS) \
$(AES_ORIG_OBJS) \
$(CRYPTO_HASH_OBJS) \
$(CRYPTO_ZIP_OBJS) \
$(CRYPTO_WZAES_OBJS) \
$O\QuantumDecoder.obj \
$O\resource.res
!include "../../../Build.mak"
$(CONSOLE_OBJS): ../../UI/Console/$(*B).cpp
$(COMPL)
$(COMMON_OBJS): ../../../Common/$(*B).cpp
$(COMPL)
$(WIN_OBJS): ../../../Windows/$(*B).cpp
$(COMPL)
$(7ZIP_COMMON_OBJS): ../../Common/$(*B).cpp
$(COMPL)
$(UI_COMMON_OBJS): ../../UI/Common/$(*B).cpp
$(COMPL)
$(AR_COMMON_OBJS): ../../Archive/Common/$(*B).cpp
$(COMPL)
$(7Z_OBJS): ../../Archive/7z/$(*B).cpp
$(COMPL)
$(BZ2_OBJS): ../../Archive/BZip2/$(*B).cpp
$(COMPL)
$(CAB_OBJS): ../../Archive/Cab/$(*B).cpp
$(COMPL)
$(GZ_OBJS): ../../Archive/GZip/$(*B).cpp
$(COMPL)
$(SPLIT_OBJS): ../../Archive/Split/$(*B).cpp
$(COMPL)
$(TAR_OBJS): ../../Archive/Tar/$(*B).cpp
$(COMPL)
$(Z_OBJS): ../../Archive/Z/$(*B).cpp
$(COMPL)
$(ZIP_OBJS): ../../Archive/Zip/$(*B).cpp
$(COMPL)
$(BRANCH_OPT_OBJS): ../../Compress/Branch/$(*B).cpp
$(COMPL_O2)
$(BZIP2_OBJS): ../../Compress/BZip2/$(*B).cpp
$(COMPL)
$(BZIP2_OPT_OBJS): ../../Compress/BZip2/$(*B).cpp
$(COMPL_O2)
$(DEFLATE_OPT_OBJS): ../../Compress/Deflate/$(*B).cpp
$(COMPL_O2)
$(IMPLODE_OBJS): ../../Compress/Implode/$(*B).cpp
$(COMPL)
$(LZ_OBJS): ../../Compress/LZ/$(*B).cpp
$(COMPL_O2)
$(LZMA_OPT_OBJS): ../../Compress/LZMA/$(*B).cpp
$(COMPL_O2)
$(LZX_OBJS): ../../Compress/Lzx/$(*B).cpp
$(COMPL_O2)
$(PPMD_OPT_OBJS): ../../Compress/PPMD/$(*B).cpp
$(COMPL_O2)
$(SHRINK_OBJS): ../../Compress/Shrink/$(*B).cpp
$(COMPL)
$(COMPRESS_Z_OBJS): ../../Compress/Z/$(*B).cpp
$(COMPL)
$O\BlockSort.obj: ../../Compress/BWT/$(*B).cpp
$(COMPL_O2)
$O\CopyCoder.obj: ../../Compress/Copy/$(*B).cpp
$(COMPL)
$O\RangeCoderBit.obj: ../../Compress/RangeCoder/$(*B).cpp
$(COMPL)
$O\QuantumDecoder.obj: ../../Compress/Quantum/$(*B).cpp
$(COMPL)
$(AES_OPT_OBJS): ../../Crypto/AES/$(*B).cpp
$(COMPL_O2)
$(AES_ORIG_OBJS): ../../Crypto/AES/$(*B).c
$(COMPL_O2_W3)
$(7ZAES_OPT_OBJS): ../../Crypto/7zAES/$(*B).cpp
$(COMPL_O2)
$(CRYPTO_HASH_OBJS): ../../Crypto/Hash/$(*B).cpp
$(COMPL_O2)
$(CRYPTO_ZIP_OBJS): ../../Crypto/Zip/$(*B).cpp
$(COMPL)
$(CRYPTO_WZAES_OBJS): ../../Crypto/WzAES/$(*B).cpp
$(COMPL_O2)
$(C_OBJS): ../../../../C/$(*B).c
$(COMPL_O2)
$(C_LZ_OBJS): ../../../../C/Compress/Lz/$(*B).c
$(COMPL_O2)
$O\HuffmanEncode.obj: ../../../../C/Compress/Huffman/$(*B).c
$(COMPL_O2)

View File

@@ -0,0 +1,3 @@
#include "../../MyVersionInfo.rc"
MY_VERSION_INFO_APP("7-Zip Standalone Console", "7za")

1358
CPP/7zip/Bundles/Alone7z/Alone.dsp Executable file
View File

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,29 @@
Microsoft Developer Studio Workspace File, Format Version 6.00
# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
###############################################################################
Project: "Alone"=.\Alone.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
}}}
###############################################################################
Global:
Package=<5>
{{{
}}}
Package=<3>
{{{
}}}
###############################################################################

View File

@@ -0,0 +1,3 @@
// StdAfx.cpp
#include "StdAfx.h"

View File

@@ -0,0 +1,9 @@
// StdAfx.h
#ifndef __STDAFX_H
#define __STDAFX_H
#include "../../../Common/MyWindows.h"
#include "../../../Common/NewHandler.h"
#endif

196
CPP/7zip/Bundles/Alone7z/makefile Executable file
View File

@@ -0,0 +1,196 @@
PROG = 7za.exe
LIBS = $(LIBS) user32.lib oleaut32.lib Advapi32.lib
CFLAGS = $(CFLAGS) -I ../../../ \
-DEXCLUDE_COM \
-DNO_REGISTRY \
-D_NO_CRYPTO \
-DWIN_LONG_PATH \
-DFORMAT_7Z \
-DCOMPRESS_MT \
-DCOMPRESS_BCJ_X86 \
-DCOMPRESS_BCJ2 \
-DCOMPRESS_COPY \
-DCOMPRESS_LZMA \
-DCOMPRESS_MF_MT \
-D_NO_CRYPTO
CONSOLE_OBJS = \
$O\ConsoleClose.obj \
$O\ExtractCallbackConsole.obj \
$O\List.obj \
$O\Main.obj \
$O\MainAr.obj \
$O\OpenCallbackConsole.obj \
$O\PercentPrinter.obj \
$O\UpdateCallbackConsole.obj \
$O\UserInputUtils.obj \
COMMON_OBJS = \
$O\Alloc.obj \
$O\CommandLineParser.obj \
$O\CRC.obj \
$O\IntToString.obj \
$O\ListFileUtils.obj \
$O\NewHandler.obj \
$O\StdInStream.obj \
$O\StdOutStream.obj \
$O\String.obj \
$O\StringConvert.obj \
$O\StringToInt.obj \
$O\UTFConvert.obj \
$O\Vector.obj \
$O\Wildcard.obj \
WIN_OBJS = \
$O\DLL.obj \
$O\Error.obj \
$O\FileDir.obj \
$O\FileFind.obj \
$O\FileIO.obj \
$O\FileName.obj \
$O\MemoryLock.obj \
$O\PropVariant.obj \
$O\PropVariantConversions.obj \
$O\Synchronization.obj
7ZIP_COMMON_OBJS = \
$O\FilePathAutoRename.obj \
$O\FileStreams.obj \
$O\InBuffer.obj \
$O\InOutTempBuffer.obj \
$O\LimitedStreams.obj \
$O\LockedStream.obj \
$O\OffsetStream.obj \
$O\OutBuffer.obj \
$O\ProgressUtils.obj \
$O\StreamBinder.obj \
$O\StreamObjects.obj \
$O\StreamUtils.obj \
UI_COMMON_OBJS = \
$O\ArchiveCommandLine.obj \
$O\ArchiveExtractCallback.obj \
$O\ArchiveOpenCallback.obj \
$O\ArchiverInfo.obj \
$O\DefaultName.obj \
$O\EnumDirItems.obj \
$O\Extract.obj \
$O\ExtractingFilePath.obj \
$O\OpenArchive.obj \
$O\PropIDUtils.obj \
$O\SetProperties.obj \
$O\SortUtils.obj \
$O\TempFiles.obj \
$O\Update.obj \
$O\UpdateAction.obj \
$O\UpdateCallback.obj \
$O\UpdatePair.obj \
$O\UpdateProduce.obj \
$O\WorkDir.obj \
AR_COMMON_OBJS = \
$O\CoderMixer2.obj \
$O\CoderMixer2MT.obj \
$O\CrossThreadProgress.obj \
$O\DummyOutStream.obj \
$O\FilterCoder.obj \
$O\InStreamWithCRC.obj \
$O\ItemNameUtils.obj \
$O\MultiStream.obj \
$O\OutStreamWithCRC.obj \
$O\ParseProperties.obj \
7Z_OBJS = \
$O\7zCompressionMode.obj \
$O\7zDecode.obj \
$O\7zEncode.obj \
$O\7zExtract.obj \
$O\7zFolderInStream.obj \
$O\7zFolderOutStream.obj \
$O\7zHandler.obj \
$O\7zHandlerOut.obj \
$O\7zHeader.obj \
$O\7zIn.obj \
$O\7zMethodID.obj \
$O\7zOut.obj \
$O\7zProperties.obj \
$O\7zSpecStream.obj \
$O\7zUpdate.obj \
BRANCH_OPT_OBJS = \
$O\BranchCoder.obj \
$O\x86.obj \
$O\x86_2.obj \
LZ_OBJS = \
$O\LZOutWindow.obj \
LZMA_OPT_OBJS = \
$O\LZMADecoder.obj \
$O\LZMAEncoder.obj \
C_OBJS = \
$O\7zCrc.obj \
$O\Sort.obj \
$O\Threads.obj \
C_LZ_OBJS = \
$O\MatchFinder.obj \
$O\MatchFinderMt.obj \
OBJS = \
$O\StdAfx.obj \
$(CONSOLE_OBJS) \
$(COMMON_OBJS) \
$(WIN_OBJS) \
$(7ZIP_COMMON_OBJS) \
$(UI_COMMON_OBJS) \
$(AR_COMMON_OBJS) \
$(7Z_OBJS) \
$(BRANCH_OPT_OBJS) \
$(LZ_OBJS) \
$(LZMA_OPT_OBJS) \
$(C_OBJS) \
$(C_LZ_OBJS) \
$O\CopyCoder.obj \
$O\RangeCoderBit.obj \
$O\resource.res
!include "../../../Build.mak"
$(CONSOLE_OBJS): ../../UI/Console/$(*B).cpp
$(COMPL)
$(COMMON_OBJS): ../../../Common/$(*B).cpp
$(COMPL)
$(WIN_OBJS): ../../../Windows/$(*B).cpp
$(COMPL)
$(7ZIP_COMMON_OBJS): ../../Common/$(*B).cpp
$(COMPL)
$(UI_COMMON_OBJS): ../../UI/Common/$(*B).cpp
$(COMPL)
$(AR_COMMON_OBJS): ../../Archive/Common/$(*B).cpp
$(COMPL)
$(7Z_OBJS): ../../Archive/7z/$(*B).cpp
$(COMPL)
$(BRANCH_OPT_OBJS): ../../Compress/Branch/$(*B).cpp
$(COMPL_O2)
$(LZ_OBJS): ../../Compress/LZ/$(*B).cpp
$(COMPL)
$(LZMA_OPT_OBJS): ../../Compress/LZMA/$(*B).cpp
$(COMPL_O2)
$O\CopyCoder.obj: ../../Compress/Copy/$(*B).cpp
$(COMPL)
$O\RangeCoderBit.obj: ../../Compress/RangeCoder/$(*B).cpp
$(COMPL)
$(C_OBJS): ../../../../C/$(*B).c
$(COMPL_O2)
$(C_LZ_OBJS): ../../../../C/Compress/Lz/$(*B).c
$(COMPL_O2)

View File

@@ -0,0 +1,3 @@
#include "../../MyVersionInfo.rc"
MY_VERSION_INFO_APP("7-Zip Standalone Console", "7za")

View File

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,29 @@
Microsoft Developer Studio Workspace File, Format Version 6.00
# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
###############################################################################
Project: "7z"=.\Format7z.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
}}}
###############################################################################
Global:
Package=<5>
{{{
}}}
Package=<3>
{{{
}}}
###############################################################################

View File

@@ -0,0 +1,3 @@
// StdAfx.cpp
#include "StdAfx.h"

View File

@@ -0,0 +1,9 @@
// StdAfx.h
#ifndef __STDAFX_H
#define __STDAFX_H
#include "../../../Common/MyWindows.h"
#include "../../../Common/NewHandler.h"
#endif

View File

@@ -0,0 +1,201 @@
PROG = 7za.dll
DEF_FILE = ../../Archive/Archive.def
LIBS = $(LIBS) user32.lib oleaut32.lib
CFLAGS = $(CFLAGS) -I ../../../ \
-DEXCLUDE_COM \
-DNO_REGISTRY \
-DFORMAT_7Z \
-DCOMPRESS_MT \
-DCOMPRESS_BCJ_X86 \
-DCOMPRESS_BCJ2 \
-DCOMPRESS_BZIP2_DECODER \
-DCOMPRESS_BZIP2_MT \
-DCOMPRESS_COPY \
-DCOMPRESS_DEFLATE_DECODER \
-DCOMPRESS_LZMA \
-DCOMPRESS_MF_MT \
-DCOMPRESS_PPMD \
-DCRYPTO_7ZAES \
-DCRYPTO_AES \
COMMON_OBJS = \
$O\Alloc.obj \
$O\CRC.obj \
$O\IntToString.obj \
$O\NewHandler.obj \
$O\String.obj \
$O\StringConvert.obj \
$O\StringToInt.obj \
$O\Vector.obj \
$O\Wildcard.obj \
WIN_OBJS = \
$O\FileDir.obj \
$O\FileFind.obj \
$O\FileIO.obj \
$O\PropVariant.obj \
$O\Synchronization.obj
7ZIP_COMMON_OBJS = \
$O\InBuffer.obj \
$O\InOutTempBuffer.obj \
$O\LimitedStreams.obj \
$O\LockedStream.obj \
$O\LSBFDecoder.obj \
$O\OutBuffer.obj \
$O\ProgressUtils.obj \
$O\StreamBinder.obj \
$O\StreamObjects.obj \
$O\StreamUtils.obj \
AR_COMMON_OBJS = \
$O\CoderMixer2.obj \
$O\CoderMixer2MT.obj \
$O\CrossThreadProgress.obj \
$O\FilterCoder.obj \
$O\InStreamWithCRC.obj \
$O\ItemNameUtils.obj \
$O\OutStreamWithCRC.obj \
$O\ParseProperties.obj \
7Z_OBJS = \
$O\DllExports.obj \
$O\7zCompressionMode.obj \
$O\7zDecode.obj \
$O\7zEncode.obj \
$O\7zExtract.obj \
$O\7zFolderInStream.obj \
$O\7zFolderOutStream.obj \
$O\7zHandler.obj \
$O\7zHandlerOut.obj \
$O\7zHeader.obj \
$O\7zIn.obj \
$O\7zMethodID.obj \
$O\7zOut.obj \
$O\7zProperties.obj \
$O\7zSpecStream.obj \
$O\7zUpdate.obj \
BRANCH_OPT_OBJS = \
$O\BranchCoder.obj \
$O\x86.obj \
$O\x86_2.obj \
BZIP2_OBJS = \
$O\BZip2CRC.obj \
BZIP2_OPT_OBJS = \
$O\BZip2Decoder.obj \
DEFLATE_OPT_OBJS = \
$O\DeflateDecoder.obj \
LZ_OBJS = \
$O\LZOutWindow.obj \
LZMA_OPT_OBJS = \
$O\LZMADecoder.obj \
$O\LZMAEncoder.obj \
PPMD_OPT_OBJS = \
$O\PPMDDecoder.obj \
$O\PPMDEncoder.obj \
7ZAES_OPT_OBJS = \
$O\7zAES.obj \
AES_OPT_OBJS = \
$O\MyAES.obj \
AES_ORIG_OBJS = \
$O\aescrypt.obj \
$O\aeskey.obj \
$O\aestab.obj \
CRYPTO_HASH_OBJS = \
$O\Sha256.obj \
C_OBJS = \
$O\7zCrc.obj \
$O\Threads.obj \
C_LZ_OBJS = \
$O\MatchFinder.obj \
$O\MatchFinderMt.obj \
OBJS = \
$O\StdAfx.obj \
$(CONSOLE_OBJS) \
$(COMMON_OBJS) \
$(WIN_OBJS) \
$(7ZIP_COMMON_OBJS) \
$(AR_COMMON_OBJS) \
$(7Z_OBJS) \
$(BZIP2_OBJS) \
$(BZIP2_OPT_OBJS) \
$(BRANCH_OPT_OBJS) \
$(DEFLATE_OPT_OBJS) \
$(LZ_OBJS) \
$(LZMA_OPT_OBJS) \
$(PPMD_OPT_OBJS) \
$(C_OBJS) \
$(C_LZ_OBJS) \
$O\CopyCoder.obj \
$O\RangeCoderBit.obj \
$(7ZAES_OPT_OBJS) \
$(AES_OPT_OBJS) \
$(AES_ORIG_OBJS) \
$(CRYPTO_HASH_OBJS) \
$O\resource.res
!include "../../../Build.mak"
$(COMMON_OBJS): ../../../Common/$(*B).cpp
$(COMPL)
$(WIN_OBJS): ../../../Windows/$(*B).cpp
$(COMPL)
$(7ZIP_COMMON_OBJS): ../../Common/$(*B).cpp
$(COMPL)
$(AR_COMMON_OBJS): ../../Archive/Common/$(*B).cpp
$(COMPL)
$(7Z_OBJS): ../../Archive/7z/$(*B).cpp
$(COMPL)
$(BRANCH_OPT_OBJS): ../../Compress/Branch/$(*B).cpp
$(COMPL_O2)
$(BZIP2_OBJS): ../../Compress/BZip2/$(*B).cpp
$(COMPL)
$(BZIP2_OPT_OBJS): ../../Compress/BZip2/$(*B).cpp
$(COMPL_O2)
$(DEFLATE_OPT_OBJS): ../../Compress/Deflate/$(*B).cpp
$(COMPL_O2)
$(LZ_OBJS): ../../Compress/LZ/$(*B).cpp
$(COMPL)
$(LZMA_OPT_OBJS): ../../Compress/LZMA/$(*B).cpp
$(COMPL_O2)
$(PPMD_OPT_OBJS): ../../Compress/PPMD/$(*B).cpp
$(COMPL_O2)
$O\CopyCoder.obj: ../../Compress/Copy/$(*B).cpp
$(COMPL)
$O\RangeCoderBit.obj: ../../Compress/RangeCoder/$(*B).cpp
$(COMPL)
$(AES_OPT_OBJS): ../../Crypto/AES/$(*B).cpp
$(COMPL_O2)
$(AES_ORIG_OBJS): ../../Crypto/AES/$(*B).c
$(COMPL_O2_W3)
$(7ZAES_OPT_OBJS): ../../Crypto/7zAES/$(*B).cpp
$(COMPL_O2)
$(CRYPTO_HASH_OBJS): ../../Crypto/Hash/$(*B).cpp
$(COMPL_O2)
$(C_OBJS): ../../../../C/$(*B).c
$(COMPL_O2)
$(C_LZ_OBJS): ../../../../C/Compress/Lz/$(*B).c
$(COMPL_O2)

View File

@@ -0,0 +1,5 @@
#include "../../MyVersionInfo.rc"
MY_VERSION_INFO_DLL("7z Standalone Plugin", "7za")
101 ICON "../../Archive/7z/7z.ico"

View File

@@ -0,0 +1,813 @@
# Microsoft Developer Studio Project File - Name="7z" - Package Owner=<4>
# Microsoft Developer Studio Generated Build File, Format Version 6.00
# ** DO NOT EDIT **
# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
CFG=7z - Win32 Debug
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
!MESSAGE use the Export Makefile command and run
!MESSAGE
!MESSAGE NMAKE /f "Format7z.mak".
!MESSAGE
!MESSAGE You can specify a configuration when running NMAKE
!MESSAGE by defining the macro CFG on the command line. For example:
!MESSAGE
!MESSAGE NMAKE /f "Format7z.mak" CFG="7z - Win32 Debug"
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
!MESSAGE "7z - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
!MESSAGE "7z - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
!MESSAGE
# Begin Project
# PROP AllowPerConfigDependencies 0
# PROP Scc_ProjName ""
# PROP Scc_LocalPath ""
CPP=cl.exe
MTL=midl.exe
RSC=rc.exe
!IF "$(CFG)" == "7z - Win32 Release"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 0
# PROP BASE Output_Dir "Release"
# PROP BASE Intermediate_Dir "Release"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
# PROP Output_Dir "Release"
# PROP Intermediate_Dir "Release"
# PROP Ignore_Export_Lib 1
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "MY7Z_EXPORTS" /YX /FD /c
# ADD CPP /nologo /Gz /MT /W3 /GX /O1 /I "..\..\..\\" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "MY7Z_EXPORTS" /D "EXCLUDE_COM" /D "NO_REGISTRY" /D "EXTRACT_ONLY" /D "FORMAT_7Z" /D "COMPRESS_LZMA" /D "COMPRESS_BCJ_X86" /D "COMPRESS_BCJ2" /D "COMPRESS_COPY" /D "COMPRESS_MF_MT" /D "COMPRESS_PPMD" /D "COMPRESS_DEFLATE_DECODER" /D "COMPRESS_BZIP2_DECODER" /D "CRYPTO_7ZAES" /D "CRYPTO_AES" /D "COMPRESS_MT" /D "COMPRESS_BZIP2_MT" /Yu"StdAfx.h" /FD /c
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0x419 /d "NDEBUG"
# ADD RSC /l 0x419 /d "NDEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 /out:"C:\Program Files\7-Zip\Formats\7zxa.dll" /opt:NOWIN98
# SUBTRACT LINK32 /pdb:none /debug
!ELSEIF "$(CFG)" == "7z - Win32 Debug"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 1
# PROP BASE Output_Dir "Debug"
# PROP BASE Intermediate_Dir "Debug"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 1
# PROP Output_Dir "Debug"
# PROP Intermediate_Dir "Debug"
# PROP Ignore_Export_Lib 1
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "MY7Z_EXPORTS" /YX /FD /GZ /c
# ADD CPP /nologo /Gz /MTd /W3 /Gm /GX /ZI /Od /I "..\..\..\..\SDK" /I "..\..\..\\" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "MY7Z_EXPORTS" /D "EXCLUDE_COM" /D "NO_REGISTRY" /D "EXTRACT_ONLY" /D "FORMAT_7Z" /D "COMPRESS_LZMA" /D "COMPRESS_BCJ_X86" /D "COMPRESS_BCJ2" /D "COMPRESS_COPY" /D "COMPRESS_MF_MT" /D "COMPRESS_PPMD" /D "COMPRESS_DEFLATE_DECODER" /D "COMPRESS_BZIP2_DECODER" /D "CRYPTO_7ZAES" /D "CRYPTO_AES" /D "COMPRESS_MT" /D "COMPRESS_BZIP2_MT" /Yu"StdAfx.h" /FD /GZ /c
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0x419 /d "_DEBUG"
# ADD RSC /l 0x419 /d "_DEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /out:"C:\Program Files\7-Zip\Formats\7zxa.dll" /pdbtype:sept
!ENDIF
# Begin Target
# Name "7z - Win32 Release"
# Name "7z - Win32 Debug"
# Begin Group "Spec"
# PROP Default_Filter ""
# Begin Source File
SOURCE=..\..\Archive\7z\7z.ico
# End Source File
# Begin Source File
SOURCE=..\..\Archive\Archive.def
# End Source File
# Begin Source File
SOURCE=..\..\Archive\7z\DllExports.cpp
# End Source File
# Begin Source File
SOURCE=.\resource.rc
# End Source File
# Begin Source File
SOURCE=.\StdAfx.cpp
# ADD CPP /Yc"StdAfx.h"
# End Source File
# Begin Source File
SOURCE=.\StdAfx.h
# End Source File
# End Group
# Begin Group "Common"
# PROP Default_Filter ""
# Begin Source File
SOURCE=..\..\..\Common\Alloc.cpp
# End Source File
# Begin Source File
SOURCE=..\..\..\Common\Alloc.h
# End Source File
# Begin Source File
SOURCE=..\..\..\Common\CRC.cpp
# End Source File
# Begin Source File
SOURCE=..\..\..\Common\CRC.h
# End Source File
# Begin Source File
SOURCE=..\..\..\Common\IntToString.cpp
# End Source File
# Begin Source File
SOURCE=..\..\..\Common\IntToString.h
# End Source File
# Begin Source File
SOURCE=..\..\..\Common\NewHandler.cpp
# End Source File
# Begin Source File
SOURCE=..\..\..\Common\NewHandler.h
# End Source File
# Begin Source File
SOURCE=..\..\..\Common\String.cpp
# End Source File
# Begin Source File
SOURCE=..\..\..\Common\String.h
# End Source File
# Begin Source File
SOURCE=..\..\..\Common\StringConvert.cpp
# End Source File
# Begin Source File
SOURCE=..\..\..\Common\StringConvert.h
# End Source File
# Begin Source File
SOURCE=..\..\..\Common\StringToInt.cpp
# End Source File
# Begin Source File
SOURCE=..\..\..\Common\StringToInt.h
# End Source File
# Begin Source File
SOURCE=..\..\..\Common\Vector.cpp
# End Source File
# Begin Source File
SOURCE=..\..\..\Common\Vector.h
# End Source File
# Begin Source File
SOURCE=..\..\..\Common\Wildcard.cpp
# End Source File
# Begin Source File
SOURCE=..\..\..\Common\Wildcard.h
# End Source File
# End Group
# Begin Group "Windows"
# PROP Default_Filter ""
# Begin Source File
SOURCE=..\..\..\Windows\FileDir.cpp
# End Source File
# Begin Source File
SOURCE=..\..\..\Windows\FileDir.h
# End Source File
# Begin Source File
SOURCE=..\..\..\Windows\FileFind.cpp
# End Source File
# Begin Source File
SOURCE=..\..\..\Windows\FileFind.h
# End Source File
# Begin Source File
SOURCE=..\..\..\Windows\FileIO.cpp
# End Source File
# Begin Source File
SOURCE=..\..\..\Windows\FileIO.h
# End Source File
# Begin Source File
SOURCE=..\..\..\Windows\PropVariant.cpp
# End Source File
# Begin Source File
SOURCE=..\..\..\Windows\PropVariant.h
# End Source File
# Begin Source File
SOURCE=..\..\..\Windows\Synchronization.cpp
# End Source File
# Begin Source File
SOURCE=..\..\..\Windows\Synchronization.h
# End Source File
# End Group
# Begin Group "Archive common"
# PROP Default_Filter ""
# Begin Source File
SOURCE=..\..\Archive\Common\CoderMixer2.cpp
# End Source File
# Begin Source File
SOURCE=..\..\Archive\Common\CoderMixer2.h
# End Source File
# Begin Source File
SOURCE=..\..\Archive\Common\CoderMixer2MT.cpp
# End Source File
# Begin Source File
SOURCE=..\..\Archive\Common\CoderMixer2MT.h
# End Source File
# Begin Source File
SOURCE=..\..\Archive\Common\CrossThreadProgress.cpp
# End Source File
# Begin Source File
SOURCE=..\..\Archive\Common\CrossThreadProgress.h
# End Source File
# Begin Source File
SOURCE=..\..\Archive\Common\FilterCoder.cpp
# End Source File
# Begin Source File
SOURCE=..\..\Archive\Common\FilterCoder.h
# End Source File
# Begin Source File
SOURCE=..\..\Archive\Common\ItemNameUtils.cpp
# End Source File
# Begin Source File
SOURCE=..\..\Archive\Common\ItemNameUtils.h
# End Source File
# Begin Source File
SOURCE=..\..\Archive\Common\OutStreamWithCRC.cpp
# End Source File
# Begin Source File
SOURCE=..\..\Archive\Common\OutStreamWithCRC.h
# End Source File
# Begin Source File
SOURCE=..\..\Archive\Common\ParseProperties.cpp
# End Source File
# Begin Source File
SOURCE=..\..\Archive\Common\ParseProperties.h
# End Source File
# End Group
# Begin Group "Compress"
# PROP Default_Filter ""
# Begin Group "LZ"
# PROP Default_Filter ""
# Begin Source File
SOURCE=..\..\Compress\LZ\LZOutWindow.cpp
# End Source File
# Begin Source File
SOURCE=..\..\Compress\LZ\LZOutWindow.h
# End Source File
# End Group
# Begin Group "PPMD"
# PROP Default_Filter ""
# Begin Source File
SOURCE=..\..\Compress\PPMD\PPMDContext.h
# End Source File
# Begin Source File
SOURCE=..\..\Compress\PPMD\PPMDDecode.h
# End Source File
# Begin Source File
SOURCE=..\..\Compress\PPMD\PPMDDecoder.cpp
!IF "$(CFG)" == "7z - Win32 Release"
# ADD CPP /O2
# SUBTRACT CPP /YX /Yc /Yu
!ELSEIF "$(CFG)" == "7z - Win32 Debug"
# SUBTRACT CPP /YX /Yc /Yu
!ENDIF
# End Source File
# Begin Source File
SOURCE=..\..\Compress\PPMD\PPMDDecoder.h
# End Source File
# Begin Source File
SOURCE=..\..\Compress\PPMD\PPMDSubAlloc.h
# End Source File
# Begin Source File
SOURCE=..\..\Compress\PPMD\PPMDType.h
# End Source File
# End Group
# Begin Group "Branch"
# PROP Default_Filter ""
# Begin Source File
SOURCE=..\..\Compress\Branch\BranchCoder.cpp
# End Source File
# Begin Source File
SOURCE=..\..\Compress\Branch\BranchCoder.h
# End Source File
# Begin Source File
SOURCE=..\..\Compress\Branch\x86.cpp
!IF "$(CFG)" == "7z - Win32 Release"
# ADD CPP /O2
# SUBTRACT CPP /YX /Yc /Yu
!ELSEIF "$(CFG)" == "7z - Win32 Debug"
# SUBTRACT CPP /YX /Yc /Yu
!ENDIF
# End Source File
# Begin Source File
SOURCE=..\..\Compress\Branch\x86.h
# End Source File
# Begin Source File
SOURCE=..\..\Compress\Branch\x86_2.cpp
!IF "$(CFG)" == "7z - Win32 Release"
# ADD CPP /O2
# SUBTRACT CPP /YX /Yc /Yu
!ELSEIF "$(CFG)" == "7z - Win32 Debug"
# SUBTRACT CPP /YX /Yc /Yu
!ENDIF
# End Source File
# Begin Source File
SOURCE=..\..\Compress\Branch\x86_2.h
# End Source File
# End Group
# Begin Group "LZMA"
# PROP Default_Filter ""
# Begin Source File
SOURCE=..\..\Compress\LZMA\LZMA.h
# End Source File
# Begin Source File
SOURCE=..\..\Compress\LZMA\LZMADecoder.cpp
!IF "$(CFG)" == "7z - Win32 Release"
# ADD CPP /O2
# SUBTRACT CPP /YX /Yc /Yu
!ELSEIF "$(CFG)" == "7z - Win32 Debug"
# SUBTRACT CPP /YX /Yc /Yu
!ENDIF
# End Source File
# Begin Source File
SOURCE=..\..\Compress\LZMA\LZMADecoder.h
# End Source File
# End Group
# Begin Group "Copy"
# PROP Default_Filter ""
# Begin Source File
SOURCE=..\..\Compress\Copy\CopyCoder.cpp
# End Source File
# Begin Source File
SOURCE=..\..\Compress\Copy\CopyCoder.h
# End Source File
# End Group
# Begin Group "RangeCoder"
# PROP Default_Filter ""
# Begin Source File
SOURCE=..\..\Compress\RangeCoder\RangeCoder.h
# End Source File
# Begin Source File
SOURCE=..\..\Compress\RangeCoder\RangeCoderBit.cpp
# End Source File
# Begin Source File
SOURCE=..\..\Compress\RangeCoder\RangeCoderBit.h
# End Source File
# Begin Source File
SOURCE=..\..\Compress\RangeCoder\RangeCoderBitTree.h
# End Source File
# Begin Source File
SOURCE=..\..\Compress\RangeCoder\RangeCoderOpt.h
# End Source File
# End Group
# Begin Group "Deflate"
# PROP Default_Filter ""
# Begin Source File
SOURCE=..\..\Compress\Deflate\DeflateConst.h
# End Source File
# Begin Source File
SOURCE=..\..\Compress\Deflate\DeflateDecoder.cpp
!IF "$(CFG)" == "7z - Win32 Release"
# ADD CPP /O2
# SUBTRACT CPP /YX /Yc /Yu
!ELSEIF "$(CFG)" == "7z - Win32 Debug"
!ENDIF
# End Source File
# Begin Source File
SOURCE=..\..\Compress\Deflate\DeflateDecoder.h
# End Source File
# Begin Source File
SOURCE=..\..\Compress\Deflate\DeflateExtConst.h
# End Source File
# End Group
# Begin Group "BZip2"
# PROP Default_Filter ""
# Begin Source File
SOURCE=..\..\Compress\BZip2\BZip2Const.h
# End Source File
# Begin Source File
SOURCE=..\..\Compress\BZip2\BZip2CRC.cpp
# End Source File
# Begin Source File
SOURCE=..\..\Compress\BZip2\BZip2CRC.h
# End Source File
# Begin Source File
SOURCE=..\..\Compress\BZip2\BZip2Decoder.cpp
!IF "$(CFG)" == "7z - Win32 Release"
# ADD CPP /O2
# SUBTRACT CPP /YX /Yc /Yu
!ELSEIF "$(CFG)" == "7z - Win32 Debug"
!ENDIF
# End Source File
# Begin Source File
SOURCE=..\..\Compress\BZip2\BZip2Decoder.h
# End Source File
# End Group
# End Group
# Begin Group "Crypto"
# PROP Default_Filter ""
# Begin Group "AES"
# PROP Default_Filter ""
# Begin Source File
SOURCE=..\..\Crypto\AES\aes.h
# End Source File
# Begin Source File
SOURCE=..\..\Crypto\AES\AES_CBC.h
# End Source File
# Begin Source File
SOURCE=..\..\Crypto\AES\aescpp.h
# End Source File
# Begin Source File
SOURCE=..\..\Crypto\AES\aescrypt.c
!IF "$(CFG)" == "7z - Win32 Release"
# ADD CPP /O2
# SUBTRACT CPP /YX /Yc /Yu
!ELSEIF "$(CFG)" == "7z - Win32 Debug"
# SUBTRACT CPP /YX /Yc /Yu
!ENDIF
# End Source File
# Begin Source File
SOURCE=..\..\Crypto\AES\aeskey.c
!IF "$(CFG)" == "7z - Win32 Release"
# ADD CPP /O2
# SUBTRACT CPP /YX /Yc /Yu
!ELSEIF "$(CFG)" == "7z - Win32 Debug"
# SUBTRACT CPP /YX /Yc /Yu
!ENDIF
# End Source File
# Begin Source File
SOURCE=..\..\Crypto\AES\aesopt.h
# End Source File
# Begin Source File
SOURCE=..\..\Crypto\AES\aestab.c
!IF "$(CFG)" == "7z - Win32 Release"
# ADD CPP /O2
# SUBTRACT CPP /YX /Yc /Yu
!ELSEIF "$(CFG)" == "7z - Win32 Debug"
# SUBTRACT CPP /YX /Yc /Yu
!ENDIF
# End Source File
# Begin Source File
SOURCE=..\..\Crypto\AES\MyAES.cpp
!IF "$(CFG)" == "7z - Win32 Release"
# ADD CPP /O2
# SUBTRACT CPP /YX /Yc /Yu
!ELSEIF "$(CFG)" == "7z - Win32 Debug"
# SUBTRACT CPP /YX /Yc /Yu
!ENDIF
# End Source File
# Begin Source File
SOURCE=..\..\Crypto\AES\MyAES.h
# End Source File
# End Group
# Begin Group "7zAES"
# PROP Default_Filter ""
# Begin Source File
SOURCE=..\..\Crypto\7zAES\7zAES.cpp
!IF "$(CFG)" == "7z - Win32 Release"
# ADD CPP /O2
# SUBTRACT CPP /YX /Yc /Yu
!ELSEIF "$(CFG)" == "7z - Win32 Debug"
# SUBTRACT CPP /YX /Yc /Yu
!ENDIF
# End Source File
# Begin Source File
SOURCE=..\..\Crypto\7zAES\7zAES.h
# End Source File
# End Group
# Begin Group "Hash"
# PROP Default_Filter ""
# Begin Source File
SOURCE=..\..\Crypto\Hash\Sha256.cpp
# End Source File
# Begin Source File
SOURCE=..\..\Crypto\Hash\Sha256.h
# End Source File
# End Group
# End Group
# Begin Group "7z"
# PROP Default_Filter ""
# Begin Source File
SOURCE=..\..\Archive\7z\7zDecode.cpp
# End Source File
# Begin Source File
SOURCE=..\..\Archive\7z\7zDecode.h
# End Source File
# Begin Source File
SOURCE=..\..\Archive\7z\7zExtract.cpp
# End Source File
# Begin Source File
SOURCE=..\..\Archive\7z\7zFolderOutStream.cpp
# End Source File
# Begin Source File
SOURCE=..\..\Archive\7z\7zFolderOutStream.h
# End Source File
# Begin Source File
SOURCE=..\..\Archive\7z\7zHandler.cpp
# End Source File
# Begin Source File
SOURCE=..\..\Archive\7z\7zHandler.h
# End Source File
# Begin Source File
SOURCE=..\..\Archive\7z\7zHeader.cpp
# End Source File
# Begin Source File
SOURCE=..\..\Archive\7z\7zHeader.h
# End Source File
# Begin Source File
SOURCE=..\..\Archive\7z\7zIn.cpp
# End Source File
# Begin Source File
SOURCE=..\..\Archive\7z\7zIn.h
# End Source File
# Begin Source File
SOURCE=..\..\Archive\7z\7zItem.h
# End Source File
# Begin Source File
SOURCE=..\..\Archive\7z\7zMethodID.cpp
# End Source File
# Begin Source File
SOURCE=..\..\Archive\7z\7zMethodID.h
# End Source File
# Begin Source File
SOURCE=..\..\Archive\7z\7zMethods.h
# End Source File
# Begin Source File
SOURCE=..\..\Archive\7z\7zProperties.cpp
# End Source File
# Begin Source File
SOURCE=..\..\Archive\7z\7zProperties.h
# End Source File
# End Group
# Begin Group "7zip Common"
# PROP Default_Filter ""
# Begin Source File
SOURCE=..\..\Common\InBuffer.cpp
# End Source File
# Begin Source File
SOURCE=..\..\Common\InBuffer.h
# End Source File
# Begin Source File
SOURCE=..\..\Common\LimitedStreams.cpp
# End Source File
# Begin Source File
SOURCE=..\..\Common\LimitedStreams.h
# End Source File
# Begin Source File
SOURCE=..\..\Common\LockedStream.cpp
# End Source File
# Begin Source File
SOURCE=..\..\Common\LockedStream.h
# End Source File
# Begin Source File
SOURCE=..\..\Common\LSBFDecoder.cpp
# End Source File
# Begin Source File
SOURCE=..\..\Common\LSBFDecoder.h
# End Source File
# Begin Source File
SOURCE=..\..\Common\OutBuffer.cpp
# End Source File
# Begin Source File
SOURCE=..\..\Common\OutBuffer.h
# End Source File
# Begin Source File
SOURCE=..\..\Common\ProgressUtils.cpp
# End Source File
# Begin Source File
SOURCE=..\..\Common\ProgressUtils.h
# End Source File
# Begin Source File
SOURCE=..\..\Common\StreamBinder.cpp
# End Source File
# Begin Source File
SOURCE=..\..\Common\StreamBinder.h
# End Source File
# Begin Source File
SOURCE=..\..\Common\StreamObjects.cpp
# End Source File
# Begin Source File
SOURCE=..\..\Common\StreamObjects.h
# End Source File
# Begin Source File
SOURCE=..\..\Common\StreamUtils.cpp
# End Source File
# Begin Source File
SOURCE=..\..\Common\StreamUtils.h
# End Source File
# End Group
# End Target
# End Project

View File

@@ -0,0 +1,29 @@
Microsoft Developer Studio Workspace File, Format Version 6.00
# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
###############################################################################
Project: "7z"=.\Format7z.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
}}}
###############################################################################
Global:
Package=<5>
{{{
}}}
Package=<3>
{{{
}}}
###############################################################################

View File

@@ -0,0 +1,3 @@
// StdAfx.cpp
#include "StdAfx.h"

View File

@@ -0,0 +1,9 @@
// StdAfx.h
#ifndef __STDAFX_H
#define __STDAFX_H
#include "../../../Common/MyWindows.h"
#include "../../../Common/NewHandler.h"
#endif

View File

@@ -0,0 +1,174 @@
PROG = 7zxa.dll
DEF_FILE = ../../Archive/Archive.def
LIBS = $(LIBS) user32.lib oleaut32.lib
CFLAGS = $(CFLAGS) -I ../../../ \
-DEXCLUDE_COM \
-DNO_REGISTRY \
-DEXTRACT_ONLY \
-DFORMAT_7Z \
-DCOMPRESS_MT \
-DCOMPRESS_BCJ_X86 \
-DCOMPRESS_BCJ2 \
-DCOMPRESS_BZIP2_DECODER \
-DCOMPRESS_BZIP2_MT \
-DCOMPRESS_COPY \
-DCOMPRESS_DEFLATE_DECODER \
-DCOMPRESS_LZMA \
-DCOMPRESS_PPMD \
-DCRYPTO_7ZAES \
-DCRYPTO_AES \
COMMON_OBJS = \
$O\Alloc.obj \
$O\CRC.obj \
$O\IntToString.obj \
$O\NewHandler.obj \
$O\String.obj \
$O\StringConvert.obj \
$O\StringToInt.obj \
$O\Vector.obj \
$O\Wildcard.obj \
WIN_OBJS = \
$O\FileDir.obj \
$O\FileFind.obj \
$O\FileIO.obj \
$O\PropVariant.obj \
$O\Synchronization.obj
7ZIP_COMMON_OBJS = \
$O\InBuffer.obj \
$O\InOutTempBuffer.obj \
$O\LimitedStreams.obj \
$O\LockedStream.obj \
$O\LSBFDecoder.obj \
$O\OutBuffer.obj \
$O\ProgressUtils.obj \
$O\StreamBinder.obj \
$O\StreamObjects.obj \
$O\StreamUtils.obj \
AR_COMMON_OBJS = \
$O\CoderMixer2.obj \
$O\CoderMixer2MT.obj \
$O\CrossThreadProgress.obj \
$O\FilterCoder.obj \
$O\ItemNameUtils.obj \
$O\OutStreamWithCRC.obj \
$O\ParseProperties.obj \
7Z_OBJS = \
$O\DllExports.obj \
$O\7zCompressionMode.obj \
$O\7zDecode.obj \
$O\7zExtract.obj \
$O\7zFolderOutStream.obj \
$O\7zHandler.obj \
$O\7zHeader.obj \
$O\7zIn.obj \
$O\7zMethodID.obj \
$O\7zProperties.obj \
BRANCH_OPT_OBJS = \
$O\BranchCoder.obj \
$O\x86.obj \
$O\x86_2.obj \
BZIP2_OBJS = \
$O\BZip2CRC.obj \
BZIP2_OPT_OBJS = \
$O\BZip2Decoder.obj \
DEFLATE_OPT_OBJS = \
$O\DeflateDecoder.obj \
LZ_OBJS = \
$O\LZOutWindow.obj \
LZMA_OPT_OBJS = \
$O\LZMADecoder.obj \
PPMD_OPT_OBJS = \
$O\PPMDDecoder.obj \
7ZAES_OPT_OBJS = \
$O\7zAES.obj \
AES_OPT_OBJS = \
$O\MyAES.obj \
AES_ORIG_OBJS = \
$O\aescrypt.obj \
$O\aeskey.obj \
$O\aestab.obj \
CRYPTO_HASH_OBJS = \
$O\Sha256.obj \
OBJS = \
$O\StdAfx.obj \
$(CONSOLE_OBJS) \
$(COMMON_OBJS) \
$(WIN_OBJS) \
$(7ZIP_COMMON_OBJS) \
$(AR_COMMON_OBJS) \
$(7Z_OBJS) \
$(BZIP2_OBJS) \
$(BZIP2_OPT_OBJS) \
$(BRANCH_OPT_OBJS) \
$(DEFLATE_OPT_OBJS) \
$(LZ_OBJS) \
$(LZMA_OPT_OBJS) \
$(PPMD_OPT_OBJS) \
$O\CopyCoder.obj \
$(7ZAES_OPT_OBJS) \
$(AES_OPT_OBJS) \
$(AES_ORIG_OBJS) \
$(CRYPTO_HASH_OBJS) \
$O\resource.res
!include "../../../Build.mak"
$(COMMON_OBJS): ../../../Common/$(*B).cpp
$(COMPL)
$(WIN_OBJS): ../../../Windows/$(*B).cpp
$(COMPL)
$(7ZIP_COMMON_OBJS): ../../Common/$(*B).cpp
$(COMPL)
$(AR_COMMON_OBJS): ../../Archive/Common/$(*B).cpp
$(COMPL)
$(7Z_OBJS): ../../Archive/7z/$(*B).cpp
$(COMPL)
$(BRANCH_OPT_OBJS): ../../Compress/Branch/$(*B).cpp
$(COMPL_O2)
$(BZIP2_OBJS): ../../Compress/BZip2/$(*B).cpp
$(COMPL)
$(BZIP2_OPT_OBJS): ../../Compress/BZip2/$(*B).cpp
$(COMPL_O2)
$(DEFLATE_OPT_OBJS): ../../Compress/Deflate/$(*B).cpp
$(COMPL_O2)
$(LZ_OBJS): ../../Compress/LZ/$(*B).cpp
$(COMPL)
$(LZMA_OPT_OBJS): ../../Compress/LZMA/$(*B).cpp
$(COMPL_O2)
$(PPMD_OPT_OBJS): ../../Compress/PPMD/$(*B).cpp
$(COMPL_O2)
$O\CopyCoder.obj: ../../Compress/Copy/$(*B).cpp
$(COMPL)
$(AES_OPT_OBJS): ../../Crypto/AES/$(*B).cpp
$(COMPL_O2)
$(AES_ORIG_OBJS): ../../Crypto/AES/$(*B).c
$(COMPL_O2_W3)
$(7ZAES_OPT_OBJS): ../../Crypto/7zAES/$(*B).cpp
$(COMPL_O2)
$(CRYPTO_HASH_OBJS): ../../Crypto/Hash/$(*B).cpp
$(COMPL_O2)

View File

@@ -0,0 +1,5 @@
#include "../../MyVersionInfo.rc"
MY_VERSION_INFO_DLL("7z Standalone Extracting Plugin", "7zxa")
101 ICON "../../Archive/7z/7z.ico"

View File

@@ -0,0 +1,3 @@
// StdAfx.cpp
#include "StdAfx.h"

View File

@@ -0,0 +1,9 @@
// StdAfx.h
#ifndef __STDAFX_H
#define __STDAFX_H
#include "../../../Common/MyWindows.h"
#include "../../../Common/NewHandler.h"
#endif

View File

@@ -0,0 +1,117 @@
PROG = 7zxr.dll
DEF_FILE = ../../Archive/Archive.def
LIBS = $(LIBS) user32.lib oleaut32.lib
CFLAGS = $(CFLAGS) -I ../../../ \
-DEXCLUDE_COM \
-DNO_REGISTRY \
-DEXTRACT_ONLY \
-DFORMAT_7Z \
-DCOMPRESS_MT \
-DCOMPRESS_BCJ_X86 \
-DCOMPRESS_BCJ2 \
-DCOMPRESS_COPY \
-DCOMPRESS_LZMA \
-D_NO_CRYPTO
COMMON_OBJS = \
$O\Alloc.obj \
$O\CRC.obj \
$O\IntToString.obj \
$O\NewHandler.obj \
$O\String.obj \
$O\StringConvert.obj \
$O\StringToInt.obj \
$O\Vector.obj \
$O\Wildcard.obj \
WIN_OBJS = \
$O\FileDir.obj \
$O\FileFind.obj \
$O\FileIO.obj \
$O\PropVariant.obj \
$O\Synchronization.obj
7ZIP_COMMON_OBJS = \
$O\InBuffer.obj \
$O\InOutTempBuffer.obj \
$O\LimitedStreams.obj \
$O\LockedStream.obj \
$O\OutBuffer.obj \
$O\ProgressUtils.obj \
$O\StreamBinder.obj \
$O\StreamObjects.obj \
$O\StreamUtils.obj \
AR_COMMON_OBJS = \
$O\CoderMixer2.obj \
$O\CoderMixer2MT.obj \
$O\CrossThreadProgress.obj \
$O\FilterCoder.obj \
$O\ItemNameUtils.obj \
$O\OutStreamWithCRC.obj \
$O\ParseProperties.obj \
7Z_OBJS = \
$O\DllExports.obj \
$O\7zCompressionMode.obj \
$O\7zDecode.obj \
$O\7zExtract.obj \
$O\7zFolderOutStream.obj \
$O\7zHandler.obj \
$O\7zHeader.obj \
$O\7zIn.obj \
$O\7zMethodID.obj \
$O\7zProperties.obj \
BRANCH_OPT_OBJS = \
$O\BranchCoder.obj \
$O\x86.obj \
$O\x86_2.obj \
LZ_OBJS = \
$O\LZOutWindow.obj \
LZMA_OPT_OBJS = \
$O\LZMADecoder.obj \
OBJS = \
$O\StdAfx.obj \
$(CONSOLE_OBJS) \
$(COMMON_OBJS) \
$(WIN_OBJS) \
$(7ZIP_COMMON_OBJS) \
$(AR_COMMON_OBJS) \
$(7Z_OBJS) \
$(BRANCH_OPT_OBJS) \
$(LZ_OBJS) \
$(LZMA_OPT_OBJS) \
$O\CopyCoder.obj \
$O\resource.res
!include "../../../Build.mak"
$(COMMON_OBJS): ../../../Common/$(*B).cpp
$(COMPL)
$(WIN_OBJS): ../../../Windows/$(*B).cpp
$(COMPL)
$(7ZIP_COMMON_OBJS): ../../Common/$(*B).cpp
$(COMPL)
$(AR_COMMON_OBJS): ../../Archive/Common/$(*B).cpp
$(COMPL)
$(7Z_OBJS): ../../Archive/7z/$(*B).cpp
$(COMPL)
$(BRANCH_OPT_OBJS): ../../Compress/Branch/$(*B).cpp
$(COMPL_O2)
$(LZ_OBJS): ../../Compress/LZ/$(*B).cpp
$(COMPL)
$(LZMA_OPT_OBJS): ../../Compress/LZMA/$(*B).cpp
$(COMPL_O2)
$O\CopyCoder.obj: ../../Compress/Copy/$(*B).cpp
$(COMPL)

View File

@@ -0,0 +1,5 @@
#include "../../MyVersionInfo.rc"
MY_VERSION_INFO_DLL("7z Standalone Extracting Plugin", "7zxr")
101 ICON "../../Archive/7z/7z.ico"

View File

@@ -0,0 +1,3 @@
// StdAfx.cpp
#include "StdAfx.h"

View File

@@ -0,0 +1,9 @@
// StdAfx.h
#ifndef __STDAFX_H
#define __STDAFX_H
#include "../../../Common/MyWindows.h"
#include "../../../Common/NewHandler.h"
#endif

View File

@@ -0,0 +1,150 @@
PROG = 7zra.dll
DEF_FILE = ../../Archive/Archive.def
LIBS = $(LIBS) user32.lib oleaut32.lib
CFLAGS = $(CFLAGS) -I ../../../ \
-DEXCLUDE_COM \
-DNO_REGISTRY \
-DFORMAT_7Z \
-DCOMPRESS_MT \
-DCOMPRESS_BCJ_X86 \
-DCOMPRESS_BCJ2 \
-DCOMPRESS_COPY \
-DCOMPRESS_LZMA \
-DCOMPRESS_MF_MT \
-D_NO_CRYPTO
COMMON_OBJS = \
$O\Alloc.obj \
$O\CRC.obj \
$O\IntToString.obj \
$O\NewHandler.obj \
$O\String.obj \
$O\StringConvert.obj \
$O\StringToInt.obj \
$O\Vector.obj \
$O\Wildcard.obj \
WIN_OBJS = \
$O\FileDir.obj \
$O\FileFind.obj \
$O\FileIO.obj \
$O\PropVariant.obj \
$O\Synchronization.obj
7ZIP_COMMON_OBJS = \
$O\InBuffer.obj \
$O\InOutTempBuffer.obj \
$O\LimitedStreams.obj \
$O\LockedStream.obj \
$O\OutBuffer.obj \
$O\ProgressUtils.obj \
$O\StreamBinder.obj \
$O\StreamObjects.obj \
$O\StreamUtils.obj \
AR_COMMON_OBJS = \
$O\CoderMixer2.obj \
$O\CoderMixer2MT.obj \
$O\CrossThreadProgress.obj \
$O\FilterCoder.obj \
$O\InStreamWithCRC.obj \
$O\ItemNameUtils.obj \
$O\OutStreamWithCRC.obj \
$O\ParseProperties.obj \
7Z_OBJS = \
$O\DllExports.obj \
$O\7zCompressionMode.obj \
$O\7zDecode.obj \
$O\7zEncode.obj \
$O\7zExtract.obj \
$O\7zFolderInStream.obj \
$O\7zFolderOutStream.obj \
$O\7zHandler.obj \
$O\7zHandlerOut.obj \
$O\7zHeader.obj \
$O\7zIn.obj \
$O\7zMethodID.obj \
$O\7zOut.obj \
$O\7zProperties.obj \
$O\7zSpecStream.obj \
$O\7zUpdate.obj \
BRANCH_OPT_OBJS = \
$O\BranchCoder.obj \
$O\x86.obj \
$O\x86_2.obj \
LZ_OBJS = \
$O\LZOutWindow.obj \
LZMA_OPT_OBJS = \
$O\LZMADecoder.obj \
$O\LZMAEncoder.obj \
C_OBJS = \
$O\7zCrc.obj \
$O\Sort.obj \
$O\Threads.obj \
C_LZ_OBJS = \
$O\MatchFinder.obj \
$O\MatchFinderMt.obj \
OBJS = \
$O\StdAfx.obj \
$(CONSOLE_OBJS) \
$(COMMON_OBJS) \
$(WIN_OBJS) \
$(7ZIP_COMMON_OBJS) \
$(AR_COMMON_OBJS) \
$(7Z_OBJS) \
$(BZIP2_OBJS) \
$(BZIP2_OPT_OBJS) \
$(BRANCH_OPT_OBJS) \
$(DEFLATE_OPT_OBJS) \
$(LZ_OBJS) \
$(LZMA_OPT_OBJS) \
$(PPMD_OPT_OBJS) \
$(C_OBJS) \
$(C_LZ_OBJS) \
$O\CopyCoder.obj \
$O\RangeCoderBit.obj \
$(7ZAES_OPT_OBJS) \
$(AES_OPT_OBJS) \
$(AES_ORIG_OBJS) \
$(CRYPTO_HASH_OBJS) \
$O\resource.res
!include "../../../Build.mak"
$(COMMON_OBJS): ../../../Common/$(*B).cpp
$(COMPL)
$(WIN_OBJS): ../../../Windows/$(*B).cpp
$(COMPL)
$(7ZIP_COMMON_OBJS): ../../Common/$(*B).cpp
$(COMPL)
$(AR_COMMON_OBJS): ../../Archive/Common/$(*B).cpp
$(COMPL)
$(7Z_OBJS): ../../Archive/7z/$(*B).cpp
$(COMPL)
$(BRANCH_OPT_OBJS): ../../Compress/Branch/$(*B).cpp
$(COMPL_O2)
$(LZ_OBJS): ../../Compress/LZ/$(*B).cpp
$(COMPL)
$(LZMA_OPT_OBJS): ../../Compress/LZMA/$(*B).cpp
$(COMPL_O2)
$O\CopyCoder.obj: ../../Compress/Copy/$(*B).cpp
$(COMPL)
$O\RangeCoderBit.obj: ../../Compress/RangeCoder/$(*B).cpp
$(COMPL)
$(C_OBJS): ../../../../C/$(*B).c
$(COMPL_O2)
$(C_LZ_OBJS): ../../../../C/Compress/Lz/$(*B).c
$(COMPL_O2)

View File

@@ -0,0 +1,5 @@
#include "../../MyVersionInfo.rc"
MY_VERSION_INFO_DLL("7z Standalone Plugin", "7zr")
101 ICON "../../Archive/7z/7z.ico"

BIN
CPP/7zip/Bundles/SFXCon/7z.ico Executable file
View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

416
CPP/7zip/Bundles/SFXCon/Main.cpp Executable file
View File

@@ -0,0 +1,416 @@
// Main.cpp
#include "StdAfx.h"
#include "Common/MyInitGuid.h"
#include "Common/CommandLineParser.h"
#include "Common/StdOutStream.h"
#include "Common/Wildcard.h"
#include "Common/StringConvert.h"
#include "Common/MyCom.h"
#include "Common/Exception.h"
#include "Windows/FileDir.h"
#include "Windows/FileName.h"
#include "Windows/Defs.h"
#include "../../IPassword.h"
#include "../../ICoder.h"
#include "../../UI/Common/OpenArchive.h"
#include "../../UI/Common/DefaultName.h"
#include "../../UI/Common/ExitCode.h"
#include "../../UI/Common/Extract.h"
#include "../../UI/Console/List.h"
#include "../../UI/Console/OpenCallbackConsole.h"
#include "../../UI/Console/ExtractCallbackConsole.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";
static const int kNumSwitches = 6;
#ifdef _WIN32
static const wchar_t *kDefaultExt = L".exe";
static const int kDefaultExtLength = 4;
#endif
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 <@|!><N>ame must be
static const char kSomeCludeAfterRecursedPostStringMinSize = 2; // at least <@|!><N>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 int kMaxCmdLineSize = 1000;
static const wchar_t *kUniversalWildcard = L"*";
static const int kMinNonSwitchWords = 1;
static const int kCommandIndex = 0;
static const char *kHelpString =
"\nUsage: 7zSFX [<command>] [<switches>...]\n"
"\n"
"<Commands>\n"
" l: List contents of archive\n"
" t: Test integrity of archive\n"
" x: eXtract files with full pathname (default)\n"
"<Switches>\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 numArguments, const char *arguments[], UStringVector &parts)
{
parts.Clear();
for(int i = 0; i < numArguments; i++)
{
UString s = MultiByteToUnicodeString(arguments[i]);
parts.Add(s);
}
}
#endif
int Main2(
#ifndef _WIN32
int numArguments, const char *arguments[]
#endif
)
{
#ifdef _WIN32
SetFileApisToOEM();
#endif
g_StdOut << kCopyrightString;
UStringVector commandStrings;
#ifdef _WIN32
NCommandLineParser::SplitCommandLine(GetCommandLineW(), commandStrings);
#else
GetArguments(numArguments, arguments, commandStrings);
#endif
UString archiveName = 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;
#ifdef _WIN32
if (archiveName.Right(kDefaultExtLength).CompareNoCase(kDefaultExt) != 0)
archiveName += kDefaultExt;
#endif
// NExtractMode::EEnum extractMode;
// bool isExtractGroupCommand = command.IsFromExtractGroup(extractMode);
bool passwordEnabled = parser[NKey::kPassword].ThereIs;
UString password;
if(passwordEnabled)
password = parser[NKey::kPassword].PostStrings[0];
NFind::CFileInfoW archiveFileInfo;
if (!NFind::FindFile(archiveName, archiveFileInfo))
throw kCantFindSFX;
if (archiveFileInfo.IsDirectory())
throw kCantFindSFX;
UString outputDir;
if(parser[NKey::kOutputDir].ThereIs)
{
outputDir = parser[NKey::kOutputDir].PostStrings[0];
NName::NormalizeDirPathPrefix(outputDir);
}
{
UStringVector v1, v2;
v1.Add(archiveName);
v2.Add(archiveName);
const NWildcard::CCensorNode &wildcardCensorHead =
wildcardCensor.Pairs.Front().Head;
if(command.CommandType != NCommandType::kList)
{
CExtractCallbackConsole *ecs = new CExtractCallbackConsole;
CMyComPtr<IFolderArchiveExtractCallback> extractCallback = ecs;
ecs->OutStream = g_StdStream;
ecs->PasswordIsDefined = passwordEnabled;
ecs->Password = password;
ecs->Init();
COpenCallbackConsole openCallback;
openCallback.OutStream = g_StdStream;
openCallback.PasswordIsDefined = passwordEnabled;
openCallback.Password = password;
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;
HRESULT result = DecompressArchives(
v1, v2,
wildcardCensorHead,
eo, &openCallback, ecs, errorMessage);
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
{
HRESULT result = ListArchives(
v1, v2,
wildcardCensorHead,
true, false,
passwordEnabled,
password);
if (result != S_OK)
throw CSystemException(result);
}
}
return 0;
}

View File

@@ -0,0 +1,759 @@
# Microsoft Developer Studio Project File - Name="SFXCon" - Package Owner=<4>
# Microsoft Developer Studio Generated Build File, Format Version 6.00
# ** DO NOT EDIT **
# TARGTYPE "Win32 (x86) Console Application" 0x0103
CFG=SFXCon - Win32 Debug
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
!MESSAGE use the Export Makefile command and run
!MESSAGE
!MESSAGE NMAKE /f "SFXCon.mak".
!MESSAGE
!MESSAGE You can specify a configuration when running NMAKE
!MESSAGE by defining the macro CFG on the command line. For example:
!MESSAGE
!MESSAGE NMAKE /f "SFXCon.mak" CFG="SFXCon - Win32 Debug"
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
!MESSAGE "SFXCon - Win32 Release" (based on "Win32 (x86) Console Application")
!MESSAGE "SFXCon - Win32 Debug" (based on "Win32 (x86) Console Application")
!MESSAGE
# Begin Project
# PROP AllowPerConfigDependencies 0
# PROP Scc_ProjName ""
# PROP Scc_LocalPath ""
CPP=cl.exe
RSC=rc.exe
!IF "$(CFG)" == "SFXCon - Win32 Release"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 0
# PROP BASE Output_Dir "Release"
# PROP BASE Intermediate_Dir "Release"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
# PROP Output_Dir "Release"
# PROP Intermediate_Dir "Release"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
# ADD CPP /nologo /Gz /MD /W3 /GX /O1 /I "..\..\..\\" /D "NDEBUG" /D "COMPRESS_BCJ2" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "EXTRACT_ONLY" /D "EXCLUDE_COM" /D "NO_REGISTRY" /D "FORMAT_7Z" /D "COMPRESS_LZMA" /D "COMPRESS_BCJ_X86" /D "COMPRESS_COPY" /D "COMPRESS_PPMD" /D "_SFX" /D "CRYPTO_7ZAES" /D "CRYPTO_AES" /Yu"StdAfx.h" /FD /c
# ADD BASE RSC /l 0x419 /d "NDEBUG"
# ADD RSC /l 0x419 /d "NDEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /out:"C:\Util\7zCon.sfx" /opt:NOWIN98
# SUBTRACT LINK32 /pdb:none
!ELSEIF "$(CFG)" == "SFXCon - Win32 Debug"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 1
# PROP BASE Output_Dir "Debug"
# PROP BASE Intermediate_Dir "Debug"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 1
# PROP Output_Dir "Debug"
# PROP Intermediate_Dir "Debug"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
# ADD CPP /nologo /Gz /W3 /Gm /GX /ZI /Od /I "..\..\..\..\\" /I "..\..\..\\" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "EXTRACT_ONLY" /D "EXCLUDE_COM" /D "NO_REGISTRY" /D "FORMAT_7Z" /D "COMPRESS_LZMA" /D "COMPRESS_BCJ_X86" /D "COMPRESS_COPY" /D "COMPRESS_PPMD" /D "_SFX" /D "CRYPTO_7ZAES" /D "CRYPTO_AES" /Yu"StdAfx.h" /FD /GZ /c
# ADD BASE RSC /l 0x419 /d "_DEBUG"
# ADD RSC /l 0x419 /d "_DEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /out:"C:\Util\7zCon.sfx" /pdbtype:sept
!ENDIF
# Begin Target
# Name "SFXCon - Win32 Release"
# Name "SFXCon - Win32 Debug"
# Begin Group "Spec"
# PROP Default_Filter ""
# Begin Source File
SOURCE=.\resource.h
# End Source File
# Begin Source File
SOURCE=.\resource.rc
# End Source File
# Begin Source File
SOURCE=.\StdAfx.cpp
# ADD CPP /Yc"StdAfx.h"
# End Source File
# Begin Source File
SOURCE=.\StdAfx.h
# End Source File
# End Group
# Begin Group "Archive Common"
# PROP Default_Filter ""
# Begin Source File
SOURCE=..\..\Archive\Common\CoderMixer2.cpp
# End Source File
# Begin Source File
SOURCE=..\..\Archive\Common\CoderMixer2.h
# End Source File
# Begin Source File
SOURCE=..\..\Archive\Common\CoderMixer2MT.cpp
# End Source File
# Begin Source File
SOURCE=..\..\Archive\Common\CoderMixer2MT.h
# End Source File
# Begin Source File
SOURCE=..\..\Archive\Common\CoderMixer2ST.cpp
# End Source File
# Begin Source File
SOURCE=..\..\Archive\Common\CoderMixer2ST.h
# End Source File
# Begin Source File
SOURCE=..\..\Archive\Common\CrossThreadProgress.cpp
# End Source File
# Begin Source File
SOURCE=..\..\Archive\Common\CrossThreadProgress.h
# End Source File
# Begin Source File
SOURCE=..\..\Archive\Common\FilterCoder.cpp
# End Source File
# Begin Source File
SOURCE=..\..\Archive\Common\FilterCoder.h
# End Source File
# Begin Source File
SOURCE=..\..\Archive\Common\ItemNameUtils.cpp
# End Source File
# Begin Source File
SOURCE=..\..\Archive\Common\ItemNameUtils.h
# End Source File
# Begin Source File
SOURCE=..\..\Archive\Common\OutStreamWithCRC.cpp
# End Source File
# Begin Source File
SOURCE=..\..\Archive\Common\OutStreamWithCRC.h
# End Source File
# End Group
# Begin Group "Console"
# PROP Default_Filter ""
# Begin Source File
SOURCE=..\..\UI\Console\ConsoleClose.cpp
# End Source File
# Begin Source File
SOURCE=..\..\UI\Console\ConsoleClose.h
# End Source File
# Begin Source File
SOURCE=..\..\UI\Console\ExtractCallbackConsole.cpp
# End Source File
# Begin Source File
SOURCE=..\..\UI\Console\ExtractCallbackConsole.h
# End Source File
# Begin Source File
SOURCE=..\..\UI\Console\List.cpp
# End Source File
# Begin Source File
SOURCE=..\..\UI\Console\List.h
# End Source File
# Begin Source File
SOURCE=..\..\UI\Console\MainAr.cpp
# End Source File
# Begin Source File
SOURCE=..\..\UI\Console\OpenCallbackConsole.cpp
# End Source File
# Begin Source File
SOURCE=..\..\UI\Console\OpenCallbackConsole.h
# End Source File
# Begin Source File
SOURCE=..\..\UI\Console\UserInputUtils.cpp
# End Source File
# Begin Source File
SOURCE=..\..\UI\Console\UserInputUtils.h
# End Source File
# End Group
# Begin Group "7z"
# PROP Default_Filter ""
# Begin Source File
SOURCE=..\..\Archive\7z\7zDecode.cpp
# End Source File
# Begin Source File
SOURCE=..\..\Archive\7z\7zDecode.h
# End Source File
# Begin Source File
SOURCE=..\..\Archive\7z\7zExtract.cpp
# End Source File
# Begin Source File
SOURCE=..\..\Archive\7z\7zFolderOutStream.cpp
# End Source File
# Begin Source File
SOURCE=..\..\Archive\7z\7zFolderOutStream.h
# End Source File
# Begin Source File
SOURCE=..\..\Archive\7z\7zHandler.cpp
# End Source File
# Begin Source File
SOURCE=..\..\Archive\7z\7zHandler.h
# End Source File
# Begin Source File
SOURCE=..\..\Archive\7z\7zHeader.cpp
# End Source File
# Begin Source File
SOURCE=..\..\Archive\7z\7zHeader.h
# End Source File
# Begin Source File
SOURCE=..\..\Archive\7z\7zIn.cpp
# End Source File
# Begin Source File
SOURCE=..\..\Archive\7z\7zIn.h
# End Source File
# Begin Source File
SOURCE=..\..\Archive\7z\7zItem.h
# End Source File
# Begin Source File
SOURCE=..\..\Archive\7z\7zMethodID.cpp
# End Source File
# Begin Source File
SOURCE=..\..\Archive\7z\7zMethodID.h
# End Source File
# End Group
# Begin Group "Compress"
# PROP Default_Filter ""
# Begin Group "LZMA"
# PROP Default_Filter ""
# Begin Source File
SOURCE=..\..\Compress\LZMA\LZMADecoder.cpp
# End Source File
# End Group
# Begin Group "Branch"
# PROP Default_Filter ""
# Begin Source File
SOURCE=..\..\Compress\Branch\BranchCoder.cpp
# End Source File
# Begin Source File
SOURCE=..\..\Compress\Branch\BranchCoder.h
# End Source File
# Begin Source File
SOURCE=..\..\Compress\Branch\x86.cpp
# End Source File
# Begin Source File
SOURCE=..\..\Compress\Branch\x86_2.cpp
# End Source File
# End Group
# Begin Group "PPMD"
# PROP Default_Filter ""
# Begin Source File
SOURCE=..\..\Compress\PPMD\PPMDDecoder.cpp
# End Source File
# End Group
# Begin Group "LZ"
# PROP Default_Filter ""
# Begin Source File
SOURCE=..\..\Compress\LZ\LZOutWindow.cpp
# End Source File
# Begin Source File
SOURCE=..\..\Compress\LZ\LZOutWindow.h
# End Source File
# End Group
# Begin Group "Copy"
# PROP Default_Filter ""
# Begin Source File
SOURCE=..\..\Compress\Copy\CopyCoder.cpp
# End Source File
# Begin Source File
SOURCE=..\..\Compress\Copy\CopyCoder.h
# End Source File
# End Group
# End Group
# Begin Group "Crypto"
# PROP Default_Filter ""
# Begin Group "7zAES"
# PROP Default_Filter ""
# Begin Source File
SOURCE=..\..\Crypto\7zAES\7zAES.cpp
# End Source File
# Begin Source File
SOURCE=..\..\Crypto\7zAES\7zAES.h
# End Source File
# End Group
# Begin Group "AES"
# PROP Default_Filter ""
# Begin Source File
SOURCE=..\..\Crypto\AES\aes.h
# End Source File
# Begin Source File
SOURCE=..\..\Crypto\AES\AES_CBC.h
# End Source File
# Begin Source File
SOURCE=..\..\Crypto\AES\aescpp.h
# End Source File
# Begin Source File
SOURCE=..\..\Crypto\AES\aescrypt.c
# SUBTRACT CPP /YX /Yc /Yu
# End Source File
# Begin Source File
SOURCE=..\..\Crypto\AES\aeskey.c
# SUBTRACT CPP /YX /Yc /Yu
# End Source File
# Begin Source File
SOURCE=..\..\Crypto\AES\aesopt.h
# End Source File
# Begin Source File
SOURCE=..\..\Crypto\AES\aestab.c
# SUBTRACT CPP /YX /Yc /Yu
# End Source File
# Begin Source File
SOURCE=..\..\Crypto\AES\MyAES.cpp
# End Source File
# Begin Source File
SOURCE=..\..\Crypto\AES\MyAES.h
# End Source File
# End Group
# Begin Group "Hash"
# PROP Default_Filter ""
# Begin Source File
SOURCE=..\..\Crypto\Hash\RotateDefs.h
# End Source File
# Begin Source File
SOURCE=..\..\Crypto\Hash\Sha256.cpp
# End Source File
# Begin Source File
SOURCE=..\..\Crypto\Hash\Sha256.h
# End Source File
# End Group
# End Group
# Begin Group "SDK"
# PROP Default_Filter ""
# End Group
# Begin Group "Windows"
# PROP Default_Filter ""
# Begin Source File
SOURCE=..\..\..\Windows\Error.cpp
# End Source File
# Begin Source File
SOURCE=..\..\..\Windows\Error.h
# End Source File
# Begin Source File
SOURCE=..\..\..\Windows\FileDir.cpp
# End Source File
# Begin Source File
SOURCE=..\..\..\Windows\FileDir.h
# End Source File
# Begin Source File
SOURCE=..\..\..\Windows\FileFind.cpp
# End Source File
# Begin Source File
SOURCE=..\..\..\Windows\FileFind.h
# End Source File
# Begin Source File
SOURCE=..\..\..\Windows\FileIO.cpp
# End Source File
# Begin Source File
SOURCE=..\..\..\Windows\FileIO.h
# End Source File
# Begin Source File
SOURCE=..\..\..\Windows\FileName.cpp
# End Source File
# Begin Source File
SOURCE=..\..\..\Windows\FileName.h
# End Source File
# Begin Source File
SOURCE=..\..\..\Windows\PropVariant.cpp
# End Source File
# Begin Source File
SOURCE=..\..\..\Windows\PropVariant.h
# End Source File
# Begin Source File
SOURCE=..\..\..\Windows\PropVariantConversions.cpp
# End Source File
# Begin Source File
SOURCE=..\..\..\Windows\PropVariantConversions.h
# End Source File
# Begin Source File
SOURCE=..\..\..\Windows\Synchronization.cpp
# End Source File
# Begin Source File
SOURCE=..\..\..\Windows\Synchronization.h
# End Source File
# End Group
# Begin Group "Common"
# PROP Default_Filter ""
# Begin Source File
SOURCE=..\..\..\Common\Alloc.cpp
# End Source File
# Begin Source File
SOURCE=..\..\..\Common\Alloc.h
# End Source File
# Begin Source File
SOURCE=..\..\..\Common\CommandLineParser.cpp
# End Source File
# Begin Source File
SOURCE=..\..\..\Common\CommandLineParser.h
# End Source File
# Begin Source File
SOURCE=..\..\..\Common\CRC.cpp
# End Source File
# Begin Source File
SOURCE=..\..\..\Common\CRC.h
# End Source File
# Begin Source File
SOURCE=..\..\..\Common\IntToString.cpp
# End Source File
# Begin Source File
SOURCE=..\..\..\Common\IntToString.h
# End Source File
# Begin Source File
SOURCE=..\..\..\Common\NewHandler.cpp
# End Source File
# Begin Source File
SOURCE=..\..\..\Common\NewHandler.h
# End Source File
# Begin Source File
SOURCE=..\..\..\Common\StdInStream.cpp
# End Source File
# Begin Source File
SOURCE=..\..\..\Common\StdInStream.h
# End Source File
# Begin Source File
SOURCE=..\..\..\Common\StdOutStream.cpp
# End Source File
# Begin Source File
SOURCE=..\..\..\Common\StdOutStream.h
# End Source File
# Begin Source File
SOURCE=..\..\..\Common\String.cpp
# End Source File
# Begin Source File
SOURCE=..\..\..\Common\String.h
# End Source File
# Begin Source File
SOURCE=..\..\..\Common\StringConvert.cpp
# End Source File
# Begin Source File
SOURCE=..\..\..\Common\StringConvert.h
# End Source File
# Begin Source File
SOURCE=..\..\..\Common\Vector.cpp
# End Source File
# Begin Source File
SOURCE=..\..\..\Common\Vector.h
# End Source File
# Begin Source File
SOURCE=..\..\..\Common\Wildcard.cpp
# End Source File
# Begin Source File
SOURCE=..\..\..\Common\Wildcard.h
# End Source File
# End Group
# Begin Group "7zip Common"
# PROP Default_Filter ""
# Begin Source File
SOURCE=..\..\Common\FilePathAutoRename.cpp
# End Source File
# Begin Source File
SOURCE=..\..\Common\FilePathAutoRename.h
# End Source File
# Begin Source File
SOURCE=..\..\Common\FileStreams.cpp
# End Source File
# Begin Source File
SOURCE=..\..\Common\FileStreams.h
# End Source File
# Begin Source File
SOURCE=..\..\Common\InBuffer.cpp
# End Source File
# Begin Source File
SOURCE=..\..\Common\InBuffer.h
# End Source File
# Begin Source File
SOURCE=..\..\Common\LimitedStreams.cpp
# End Source File
# Begin Source File
SOURCE=..\..\Common\LimitedStreams.h
# End Source File
# Begin Source File
SOURCE=..\..\Common\LockedStream.cpp
# End Source File
# Begin Source File
SOURCE=..\..\Common\LockedStream.h
# End Source File
# Begin Source File
SOURCE=..\..\Common\OffsetStream.cpp
# End Source File
# Begin Source File
SOURCE=..\..\Common\OffsetStream.h
# End Source File
# Begin Source File
SOURCE=..\..\Common\OutBuffer.cpp
# End Source File
# Begin Source File
SOURCE=..\..\Common\OutBuffer.h
# End Source File
# Begin Source File
SOURCE=..\..\Common\ProgressUtils.cpp
# End Source File
# Begin Source File
SOURCE=..\..\Common\ProgressUtils.h
# End Source File
# Begin Source File
SOURCE=..\..\Common\StreamBinder.cpp
# End Source File
# Begin Source File
SOURCE=..\..\Common\StreamBinder.h
# End Source File
# Begin Source File
SOURCE=..\..\Common\StreamObjects.cpp
# End Source File
# Begin Source File
SOURCE=..\..\Common\StreamObjects.h
# End Source File
# Begin Source File
SOURCE=..\..\Common\StreamUtils.cpp
# End Source File
# Begin Source File
SOURCE=..\..\Common\StreamUtils.h
# End Source File
# End Group
# Begin Group "UI"
# PROP Default_Filter ""
# Begin Group "UI Common"
# PROP Default_Filter ""
# Begin Source File
SOURCE=..\..\UI\Common\ArchiveExtractCallback.cpp
# End Source File
# Begin Source File
SOURCE=..\..\UI\Common\ArchiveExtractCallback.h
# End Source File
# Begin Source File
SOURCE=..\..\UI\Common\ArchiveOpenCallback.cpp
# End Source File
# Begin Source File
SOURCE=..\..\UI\Common\ArchiveOpenCallback.h
# End Source File
# Begin Source File
SOURCE=..\..\UI\Common\ArchiverInfo.cpp
# End Source File
# Begin Source File
SOURCE=..\..\UI\Common\ArchiverInfo.h
# End Source File
# Begin Source File
SOURCE=..\..\UI\Common\DefaultName.cpp
# End Source File
# Begin Source File
SOURCE=..\..\UI\Common\DefaultName.h
# End Source File
# Begin Source File
SOURCE=..\..\UI\Common\ExitCode.h
# End Source File
# Begin Source File
SOURCE=..\..\UI\Common\Extract.cpp
# End Source File
# Begin Source File
SOURCE=..\..\UI\Common\Extract.h
# End Source File
# Begin Source File
SOURCE=..\..\UI\Common\ExtractingFilePath.cpp
# End Source File
# Begin Source File
SOURCE=..\..\UI\Common\ExtractingFilePath.h
# End Source File
# Begin Source File
SOURCE=..\..\UI\Common\ExtractMode.h
# End Source File
# Begin Source File
SOURCE=..\..\UI\Common\OpenArchive.cpp
# End Source File
# Begin Source File
SOURCE=..\..\UI\Common\OpenArchive.h
# End Source File
# Begin Source File
SOURCE=..\..\UI\Common\PropIDUtils.cpp
# End Source File
# Begin Source File
SOURCE=..\..\UI\Common\PropIDUtils.h
# End Source File
# End Group
# End Group
# Begin Source File
SOURCE=.\7z.ico
# End Source File
# Begin Source File
SOURCE=.\Main.cpp
# End Source File
# End Target
# End Project

View File

@@ -0,0 +1,29 @@
Microsoft Developer Studio Workspace File, Format Version 6.00
# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
###############################################################################
Project: "SFXCon"=.\SFXCon.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
}}}
###############################################################################
Global:
Package=<5>
{{{
}}}
Package=<3>
{{{
}}}
###############################################################################

View File

@@ -0,0 +1,3 @@
// StdAfx.cpp
#include "StdAfx.h"

View File

@@ -0,0 +1,9 @@
// StdAfx.h
#ifndef __STDAFX_H
#define __STDAFX_H
#include "../../../Common/MyWindows.h"
#include "../../../Common/NewHandler.h"
#endif

180
CPP/7zip/Bundles/SFXCon/makefile Executable file
View File

@@ -0,0 +1,180 @@
PROG = 7zCon.sfx
LIBS = $(LIBS) user32.lib oleaut32.lib
CFLAGS = $(CFLAGS) -I ../../../ \
-DEXCLUDE_COM \
-DNO_REGISTRY \
-DEXTRACT_ONLY \
-D_SFX \
-DFORMAT_7Z \
-DCOMPRESS_BCJ_X86 \
-DCOMPRESS_BCJ2 \
-DCOMPRESS_COPY \
-DCOMPRESS_LZMA \
-DCOMPRESS_PPMD \
-DCRYPTO_7ZAES \
-DCRYPTO_AES \
SFX_CONSOLE_OBJS = \
$O\Main.obj \
CONSOLE_OBJS = \
$O\ConsoleClose.obj \
$O\ExtractCallbackConsole.obj \
$O\List.obj \
$O\MainAr.obj \
$O\OpenCallbackConsole.obj \
$O\UserInputUtils.obj \
COMMON_OBJS = \
$O\Alloc.obj \
$O\CommandLineParser.obj \
$O\CRC.obj \
$O\IntToString.obj \
$O\NewHandler.obj \
$O\StdInStream.obj \
$O\StdOutStream.obj \
$O\String.obj \
$O\StringConvert.obj \
$O\Vector.obj \
$O\Wildcard.obj \
WIN_OBJS = \
$O\Error.obj \
$O\FileDir.obj \
$O\FileFind.obj \
$O\FileIO.obj \
$O\FileName.obj \
$O\PropVariant.obj \
$O\PropVariantConversions.obj \
$O\Synchronization.obj
7ZIP_COMMON_OBJS = \
$O\FilePathAutoRename.obj \
$O\FileStreams.obj \
$O\InBuffer.obj \
$O\LimitedStreams.obj \
$O\LockedStream.obj \
$O\OutBuffer.obj \
$O\ProgressUtils.obj \
$O\StreamBinder.obj \
$O\StreamObjects.obj \
$O\StreamUtils.obj \
UI_COMMON_OBJS = \
$O\ArchiveExtractCallback.obj \
$O\ArchiveOpenCallback.obj \
$O\ArchiverInfo.obj \
$O\DefaultName.obj \
$O\Extract.obj \
$O\ExtractingFilePath.obj \
$O\OpenArchive.obj \
$O\PropIDUtils.obj \
AR_COMMON_OBJS = \
$O\CoderMixer2.obj \
$O\CoderMixer2MT.obj \
$O\CrossThreadProgress.obj \
$O\FilterCoder.obj \
$O\ItemNameUtils.obj \
$O\OutStreamWithCRC.obj \
7Z_OBJS = \
$O\7zDecode.obj \
$O\7zExtract.obj \
$O\7zFolderOutStream.obj \
$O\7zHandler.obj \
$O\7zHeader.obj \
$O\7zIn.obj \
$O\7zMethodID.obj \
BRANCH_OPT_OBJS = \
$O\BranchCoder.obj \
$O\x86.obj \
$O\x86_2.obj \
LZ_OBJS = \
$O\LZOutWindow.obj \
LZMA_OPT_OBJS = \
$O\LZMADecoder.obj \
PPMD_OPT_OBJS = \
$O\PPMDDecoder.obj \
7ZAES_OPT_OBJS = \
$O\7zAES.obj \
AES_OPT_OBJS = \
$O\MyAES.obj \
AES_ORIG_OBJS = \
$O\aescrypt.obj \
$O\aeskey.obj \
$O\aestab.obj \
CRYPTO_HASH_OBJS = \
$O\Sha256.obj \
OBJS = \
$O\StdAfx.obj \
$(SFX_CONSOLE_OBJS) \
$(CONSOLE_OBJS) \
$(COMMON_OBJS) \
$(WIN_OBJS) \
$(7ZIP_COMMON_OBJS) \
$(UI_COMMON_OBJS) \
$(AR_COMMON_OBJS) \
$(7Z_OBJS) \
$(BRANCH_OPT_OBJS) \
$(LZ_OBJS) \
$(LZMA_OPT_OBJS) \
$(PPMD_OPT_OBJS) \
$O\CopyCoder.obj \
$(7ZAES_OPT_OBJS) \
$(AES_OPT_OBJS) \
$(AES_ORIG_OBJS) \
$(CRYPTO_HASH_OBJS) \
$O\resource.res
!include "../../../Build.mak"
$(SFX_CONSOLE_OBJS): $(*B).cpp
$(COMPL)
$(CONSOLE_OBJS): ../../UI/Console/$(*B).cpp
$(COMPL)
$(COMMON_OBJS): ../../../Common/$(*B).cpp
$(COMPL)
$(WIN_OBJS): ../../../Windows/$(*B).cpp
$(COMPL)
$(7ZIP_COMMON_OBJS): ../../Common/$(*B).cpp
$(COMPL)
$(UI_COMMON_OBJS): ../../UI/Common/$(*B).cpp
$(COMPL)
$(AR_COMMON_OBJS): ../../Archive/Common/$(*B).cpp
$(COMPL)
$(7Z_OBJS): ../../Archive/7z/$(*B).cpp
$(COMPL)
$(BRANCH_OPT_OBJS): ../../Compress/Branch/$(*B).cpp
$(COMPL)
$(LZ_OBJS): ../../Compress/LZ/$(*B).cpp
$(COMPL)
$(LZMA_OPT_OBJS): ../../Compress/LZMA/$(*B).cpp
$(COMPL)
$(PPMD_OPT_OBJS): ../../Compress/PPMD/$(*B).cpp
$(COMPL)
$O\CopyCoder.obj: ../../Compress/Copy/$(*B).cpp
$(COMPL)
$(AES_OPT_OBJS): ../../Crypto/AES/$(*B).cpp
$(COMPL)
$(AES_ORIG_OBJS): ../../Crypto/AES/$(*B).c
$(COMPL_O1_W3)
$(7ZAES_OPT_OBJS): ../../Crypto/7zAES/$(*B).cpp
$(COMPL)
$(CRYPTO_HASH_OBJS): ../../Crypto/Hash/$(*B).cpp
$(COMPL)

View File

@@ -0,0 +1,5 @@
#include "../../MyVersionInfo.rc"
MY_VERSION_INFO_APP("7z Console SFX", "7z.sfx")
101 ICON "7z.ico"

View File

@@ -0,0 +1,249 @@
// ExtractCallback.h
#include "StdAfx.h"
#include "ExtractCallback.h"
#include "Common/Wildcard.h"
#include "Common/StringConvert.h"
#include "Windows/COM.h"
#include "Windows/FileDir.h"
#include "Windows/FileFind.h"
#include "Windows/Time.h"
#include "Windows/Defs.h"
#include "Windows/PropVariant.h"
#include "Windows/PropVariantConversions.h"
using namespace NWindows;
using namespace NFile;
static LPCWSTR kErrorTitle = L"7-Zip";
static LPCWSTR kCantDeleteFile = L"Can not delete output file";
static LPCWSTR kCantOpenFile = L"Can not open output file";
static LPCWSTR kUnsupportedMethod = L"Unsupported Method";
// static LPCWSTR kCRCFailed = L"CRC Failed";
// static LPCWSTR kDataError = L"Data Error";
// static LPCWSTR kUnknownError = L""Unknown Error";
void CExtractCallbackImp::Init(IInArchive *archiveHandler,
const UString &directoryPath,
const UString &itemDefaultName,
const FILETIME &utcLastWriteTimeDefault,
UInt32 attributesDefault)
{
_message.Empty();
_isCorrupt = false;
_itemDefaultName = itemDefaultName;
_utcLastWriteTimeDefault = utcLastWriteTimeDefault;
_attributesDefault = attributesDefault;
_archiveHandler = archiveHandler;
_directoryPath = directoryPath;
NName::NormalizeDirPathPrefix(_directoryPath);
}
STDMETHODIMP CExtractCallbackImp::SetTotal(UInt64 size)
{
#ifndef _NO_PROGRESS
ProgressDialog.ProgressSynch.SetProgress(size, 0);
#endif
return S_OK;
}
STDMETHODIMP CExtractCallbackImp::SetCompleted(const UInt64 *completeValue)
{
#ifndef _NO_PROGRESS
for (;;)
{
if(ProgressDialog.ProgressSynch.GetStopped())
return E_ABORT;
if(!ProgressDialog.ProgressSynch.GetPaused())
break;
::Sleep(100);
}
if (completeValue != NULL)
ProgressDialog.ProgressSynch.SetPos(*completeValue);
#endif
return S_OK;
}
void CExtractCallbackImp::CreateComplexDirectory(const UStringVector &dirPathParts)
{
UString fullPath = _directoryPath;
for(int i = 0; i < dirPathParts.Size(); i++)
{
fullPath += dirPathParts[i];
NDirectory::MyCreateDirectory(fullPath);
fullPath += NName::kDirDelimiter;
}
}
STDMETHODIMP CExtractCallbackImp::GetStream(UInt32 index,
ISequentialOutStream **outStream, Int32 askExtractMode)
{
#ifndef _NO_PROGRESS
if(ProgressDialog.ProgressSynch.GetStopped())
return E_ABORT;
#endif
_outFileStream.Release();
NCOM::CPropVariant propVariantName;
RINOK(_archiveHandler->GetProperty(index, kpidPath, &propVariantName));
UString fullPath;
if(propVariantName.vt == VT_EMPTY)
fullPath = _itemDefaultName;
else
{
if(propVariantName.vt != VT_BSTR)
return E_FAIL;
fullPath = propVariantName.bstrVal;
}
_filePath = fullPath;
// m_CurrentFilePath = GetSystemString(fullPath, _codePage);
if(askExtractMode == NArchive::NExtract::NAskMode::kExtract)
{
NCOM::CPropVariant propVariant;
RINOK(_archiveHandler->GetProperty(index, kpidAttributes, &propVariant));
if (propVariant.vt == VT_EMPTY)
_processedFileInfo.Attributes = _attributesDefault;
else
{
if (propVariant.vt != VT_UI4)
return E_FAIL;
_processedFileInfo.Attributes = propVariant.ulVal;
}
RINOK(_archiveHandler->GetProperty(index, kpidIsFolder, &propVariant));
_processedFileInfo.IsDirectory = VARIANT_BOOLToBool(propVariant.boolVal);
bool isAnti = false;
{
NCOM::CPropVariant propVariantTemp;
RINOK(_archiveHandler->GetProperty(index, kpidIsAnti,
&propVariantTemp));
if (propVariantTemp.vt == VT_BOOL)
isAnti = VARIANT_BOOLToBool(propVariantTemp.boolVal);
}
RINOK(_archiveHandler->GetProperty(index, kpidLastWriteTime, &propVariant));
switch(propVariant.vt)
{
case VT_EMPTY:
_processedFileInfo.UTCLastWriteTime = _utcLastWriteTimeDefault;
break;
case VT_FILETIME:
_processedFileInfo.UTCLastWriteTime = propVariant.filetime;
break;
default:
return E_FAIL;
}
UStringVector pathParts;
SplitPathToParts(fullPath, pathParts);
if(pathParts.IsEmpty())
return E_FAIL;
UString processedPath = fullPath;
if(!_processedFileInfo.IsDirectory)
pathParts.DeleteBack();
if (!pathParts.IsEmpty())
{
if (!isAnti)
CreateComplexDirectory(pathParts);
}
UString fullProcessedPath = _directoryPath + processedPath;
if(_processedFileInfo.IsDirectory)
{
_diskFilePath = fullProcessedPath;
if (isAnti)
NDirectory::MyRemoveDirectory(_diskFilePath);
return S_OK;
}
NFind::CFileInfoW fileInfo;
if(NFind::FindFile(fullProcessedPath, fileInfo))
{
if (!NDirectory::DeleteFileAlways(fullProcessedPath))
{
_message = kCantDeleteFile;
return E_FAIL;
}
}
if (!isAnti)
{
_outFileStreamSpec = new COutFileStream;
CMyComPtr<ISequentialOutStream> outStreamLoc(_outFileStreamSpec);
if (!_outFileStreamSpec->Create(fullProcessedPath, true))
{
_message = kCantOpenFile;
return E_FAIL;
}
_outFileStream = outStreamLoc;
*outStream = outStreamLoc.Detach();
}
_diskFilePath = fullProcessedPath;
}
else
{
*outStream = NULL;
}
return S_OK;
}
STDMETHODIMP CExtractCallbackImp::PrepareOperation(Int32 askExtractMode)
{
_extractMode = false;
switch (askExtractMode)
{
case NArchive::NExtract::NAskMode::kExtract:
_extractMode = true;
break;
};
return S_OK;
}
STDMETHODIMP CExtractCallbackImp::SetOperationResult(Int32 resultEOperationResult)
{
switch(resultEOperationResult)
{
case NArchive::NExtract::NOperationResult::kOK:
{
break;
}
default:
{
_outFileStream.Release();
switch(resultEOperationResult)
{
case NArchive::NExtract::NOperationResult::kUnSupportedMethod:
_message = kUnsupportedMethod;
break;
case NArchive::NExtract::NOperationResult::kCRCError:
_isCorrupt = true;
// _message = kCRCFailed;
break;
case NArchive::NExtract::NOperationResult::kDataError:
_isCorrupt = true;
// _message = kDataError;
break;
default:
_isCorrupt = true;
}
return E_FAIL;
}
}
if(_outFileStream != NULL)
_outFileStreamSpec->File.SetLastWriteTime(&_processedFileInfo.UTCLastWriteTime);
_outFileStream.Release();
if (_extractMode)
NDirectory::MySetFileAttributes(_diskFilePath, _processedFileInfo.Attributes);
return S_OK;
}

View File

@@ -0,0 +1,96 @@
// ExtractCallback.h
#ifndef __EXTRACTCALLBACK_H
#define __EXTRACTCALLBACK_H
#include "resource.h"
#include "Common/String.h"
#include "Windows/ResourceString.h"
#include "../../Archive/IArchive.h"
#include "../../Common/FileStreams.h"
#include "../../ICoder.h"
#ifndef _NO_PROGRESS
#include "../../FileManager/Resource/ProgressDialog/ProgressDialog.h"
#endif
class CExtractCallbackImp:
public IArchiveExtractCallback,
public CMyUnknownImp
{
public:
MY_UNKNOWN_IMP
// IProgress
STDMETHOD(SetTotal)(UInt64 size);
STDMETHOD(SetCompleted)(const UInt64 *completeValue);
// IExtractCallback
STDMETHOD(GetStream)(UInt32 index, ISequentialOutStream **outStream,
Int32 askExtractMode);
STDMETHOD(PrepareOperation)(Int32 askExtractMode);
STDMETHOD(SetOperationResult)(Int32 resultEOperationResult);
private:
CMyComPtr<IInArchive> _archiveHandler;
UString _directoryPath;
UString _filePath;
UString _diskFilePath;
bool _extractMode;
struct CProcessedFileInfo
{
FILETIME UTCLastWriteTime;
bool IsDirectory;
UInt32 Attributes;
} _processedFileInfo;
COutFileStream *_outFileStreamSpec;
CMyComPtr<ISequentialOutStream> _outFileStream;
UString _itemDefaultName;
FILETIME _utcLastWriteTimeDefault;
UInt32 _attributesDefault;
void CreateComplexDirectory(const UStringVector &dirPathParts);
public:
#ifndef _NO_PROGRESS
CProgressDialog ProgressDialog;
#endif
bool _isCorrupt;
UString _message;
void Init(IInArchive *archiveHandler,
const UString &directoryPath,
const UString &itemDefaultName,
const FILETIME &utcLastWriteTimeDefault,
UInt32 attributesDefault);
#ifndef _NO_PROGRESS
HRESULT StartProgressDialog(const UString &title)
{
ProgressDialog.Create(title, 0);
{
#ifdef LANG
ProgressDialog.SetText(LangLoadString(IDS_PROGRESS_EXTRACTING, 0x02000890));
#else
ProgressDialog.SetText(NWindows::MyLoadStringW(IDS_PROGRESS_EXTRACTING));
#endif
}
ProgressDialog.Show(SW_SHOWNORMAL);
return S_OK;
}
virtual ~CExtractCallbackImp() { ProgressDialog.Destroy(); }
#endif
};
#endif

View File

@@ -0,0 +1,139 @@
// ExtractEngine.cpp
#include "StdAfx.h"
#include "ExtractEngine.h"
#include "Common/StringConvert.h"
#include "Windows/FileDir.h"
#include "Windows/FileFind.h"
#include "Windows/Thread.h"
#include "../../UI/Common/OpenArchive.h"
#include "../../UI/Explorer/MyMessages.h"
#include "../../FileManager/FormatUtils.h"
#include "ExtractCallback.h"
using namespace NWindows;
struct CThreadExtracting
{
CArchiveLink ArchiveLink;
CExtractCallbackImp *ExtractCallbackSpec;
CMyComPtr<IArchiveExtractCallback> ExtractCallback;
#ifndef _NO_PROGRESS
HRESULT Result;
HRESULT Extract()
{
return ArchiveLink.GetArchive()->Extract(0, (UInt32)-1 , BoolToInt(false), ExtractCallback);
}
DWORD Process()
{
ExtractCallbackSpec->ProgressDialog.WaitCreating();
Result = Extract();
ExtractCallbackSpec->ProgressDialog.MyClose();
return 0;
}
static DWORD WINAPI MyThreadFunction(void *param)
{
return ((CThreadExtracting *)param)->Process();
}
#endif
};
static const LPCWSTR kCantFindArchive = L"Can not find archive file";
static const LPCWSTR kCantOpenArchive = L"File is not correct archive";
HRESULT ExtractArchive(
const UString &fileName,
const UString &folderName,
COpenCallbackGUI *openCallback,
bool showProgress,
bool &isCorrupt,
UString &errorMessage)
{
isCorrupt = false;
NFile::NFind::CFileInfoW archiveFileInfo;
if (!NFile::NFind::FindFile(fileName, archiveFileInfo))
{
errorMessage = kCantFindArchive;
return E_FAIL;
}
CThreadExtracting extracter;
HRESULT result = MyOpenArchive(fileName, extracter.ArchiveLink, openCallback);
if (result != S_OK)
{
errorMessage = kCantOpenArchive;
return result;
}
UString directoryPath = folderName;
NFile::NName::NormalizeDirPathPrefix(directoryPath);
/*
UString directoryPath;
{
UString fullPath;
int fileNamePartStartIndex;
if (!NWindows::NFile::NDirectory::MyGetFullPathName(fileName, fullPath, fileNamePartStartIndex))
{
MessageBox(NULL, "Error 1329484", "7-Zip", 0);
return E_FAIL;
}
directoryPath = fullPath.Left(fileNamePartStartIndex);
}
*/
if(!NFile::NDirectory::CreateComplexDirectory(directoryPath))
{
errorMessage = MyFormatNew(IDS_CANNOT_CREATE_FOLDER,
#ifdef LANG
0x02000603,
#endif
directoryPath);
return E_FAIL;
}
extracter.ExtractCallbackSpec = new CExtractCallbackImp;
extracter.ExtractCallback = extracter.ExtractCallbackSpec;
extracter.ExtractCallbackSpec->Init(
extracter.ArchiveLink.GetArchive(),
directoryPath, L"Default", archiveFileInfo.LastWriteTime, 0);
#ifndef _NO_PROGRESS
if (showProgress)
{
CThread thread;
if (!thread.Create(CThreadExtracting::MyThreadFunction, &extracter))
throw 271824;
UString title;
#ifdef LANG
title = LangLoadString(IDS_PROGRESS_EXTRACTING, 0x02000890);
#else
title = NWindows::MyLoadStringW(IDS_PROGRESS_EXTRACTING);
#endif
extracter.ExtractCallbackSpec->StartProgressDialog(title);
result = extracter.Result;
}
else
#endif
{
result = extracter.Extract();
}
errorMessage = extracter.ExtractCallbackSpec->_message;
isCorrupt = extracter.ExtractCallbackSpec->_isCorrupt;
return result;
}

View File

@@ -0,0 +1,17 @@
// ExtractEngine.h
#ifndef __EXTRACTENGINE_H
#define __EXTRACTENGINE_H
#include "Common/String.h"
#include "../../UI/GUI/OpenCallbackGUI.h"
HRESULT ExtractArchive(
const UString &fileName,
const UString &folderName,
COpenCallbackGUI *openCallback,
bool showProgress,
bool &isCorrupt,
UString &errorMessage);
#endif

View File

@@ -0,0 +1,335 @@
// Main.cpp
#include "StdAfx.h"
#include <initguid.h>
#include "Common/StringConvert.h"
#include "Common/Random.h"
#include "Common/TextConfig.h"
#include "Common/CommandLineParser.h"
#include "Windows/FileDir.h"
#include "Windows/FileIO.h"
#include "Windows/FileFind.h"
#include "Windows/FileName.h"
#include "Windows/DLL.h"
#include "Windows/ResourceString.h"
#include "../../IPassword.h"
#include "../../ICoder.h"
#include "../../Archive/IArchive.h"
#include "../../UI/Explorer/MyMessages.h"
// #include "../../UI/GUI/ExtractGUI.h"
#include "ExtractEngine.h"
#include "resource.h"
using namespace NWindows;
HINSTANCE g_hInstance;
static LPCTSTR kTempDirPrefix = TEXT("7zS");
#define _SHELL_EXECUTE
static bool ReadDataString(LPCWSTR fileName, LPCSTR startID,
LPCSTR endID, AString &stringResult)
{
stringResult.Empty();
NFile::NIO::CInFile inFile;
if (!inFile.Open(fileName))
return false;
const int kBufferSize = (1 << 12);
Byte buffer[kBufferSize];
int signatureStartSize = lstrlenA(startID);
int signatureEndSize = lstrlenA(endID);
UInt32 numBytesPrev = 0;
bool writeMode = false;
UInt64 posTotal = 0;
for (;;)
{
if (posTotal > (1 << 20))
return (stringResult.IsEmpty());
UInt32 numReadBytes = kBufferSize - numBytesPrev;
UInt32 processedSize;
if (!inFile.Read(buffer + numBytesPrev, numReadBytes, processedSize))
return false;
if (processedSize == 0)
return true;
UInt32 numBytesInBuffer = numBytesPrev + processedSize;
UInt32 pos = 0;
for (;;)
{
if (writeMode)
{
if (pos > numBytesInBuffer - signatureEndSize)
break;
if (memcmp(buffer + pos, endID, signatureEndSize) == 0)
return true;
char b = buffer[pos];
if (b == 0)
return false;
stringResult += b;
pos++;
}
else
{
if (pos > numBytesInBuffer - signatureStartSize)
break;
if (memcmp(buffer + pos, startID, signatureStartSize) == 0)
{
writeMode = true;
pos += signatureStartSize;
}
else
pos++;
}
}
numBytesPrev = numBytesInBuffer - pos;
posTotal += pos;
memmove(buffer, buffer + pos, numBytesPrev);
}
}
static char kStartID[] = ",!@Install@!UTF-8!";
static char kEndID[] = ",!@InstallEnd@!";
class CInstallIDInit
{
public:
CInstallIDInit()
{
kStartID[0] = ';';
kEndID[0] = ';';
};
} g_CInstallIDInit;
class CCurrentDirRestorer
{
CSysString m_CurrentDirectory;
public:
CCurrentDirRestorer()
{ NFile::NDirectory::MyGetCurrentDirectory(m_CurrentDirectory); }
~CCurrentDirRestorer()
{ RestoreDirectory();}
bool RestoreDirectory()
{ return BOOLToBool(::SetCurrentDirectory(m_CurrentDirectory)); }
};
#ifndef _UNICODE
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
int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE /* hPrevInstance */, LPSTR /* lpCmdLine */,int /* nCmdShow */)
{
g_hInstance = (HINSTANCE)hInstance;
#ifndef _UNICODE
g_IsNT = IsItWindowsNT();
#endif
InitCommonControls();
UString archiveName, switches;
#ifdef _SHELL_EXECUTE
UString executeFile, executeParameters;
#endif
NCommandLineParser::SplitCommandLine(GetCommandLineW(), archiveName, switches);
UString fullPath;
NDLL::MyGetModuleFileName(g_hInstance, fullPath);
switches.Trim();
bool assumeYes = false;
if (switches.Left(2).CompareNoCase(UString(L"-y")) == 0)
{
assumeYes = true;
switches = switches.Mid(2);
switches.Trim();
}
AString config;
if (!ReadDataString(fullPath, kStartID, kEndID, config))
{
if (!assumeYes)
MyMessageBox(L"Can't load config info");
return 1;
}
UString dirPrefix = L".\\";
UString appLaunched;
bool showProgress = true;
if (!config.IsEmpty())
{
CObjectVector<CTextConfigPair> pairs;
if (!GetTextConfig(config, pairs))
{
if (!assumeYes)
MyMessageBox(L"Config failed");
return 1;
}
UString friendlyName = GetTextConfigValue(pairs, L"Title");
UString installPrompt = GetTextConfigValue(pairs, L"BeginPrompt");
UString progress = GetTextConfigValue(pairs, L"Progress");
if (progress.CompareNoCase(L"no") == 0)
showProgress = false;
int index = FindTextConfigItem(pairs, L"Directory");
if (index >= 0)
dirPrefix = pairs[index].String;
if (!installPrompt.IsEmpty() && !assumeYes)
{
if (MessageBoxW(0, installPrompt, friendlyName, MB_YESNO |
MB_ICONQUESTION) != IDYES)
return 0;
}
appLaunched = GetTextConfigValue(pairs, L"RunProgram");
#ifdef _SHELL_EXECUTE
executeFile = GetTextConfigValue(pairs, L"ExecuteFile");
executeParameters = GetTextConfigValue(pairs, L"ExecuteParameters") + switches;
#endif
}
NFile::NDirectory::CTempDirectory tempDir;
if (!tempDir.Create(kTempDirPrefix))
{
if (!assumeYes)
MyMessageBox(L"Can not create temp folder archive");
return 1;
}
COpenCallbackGUI openCallback;
UString tempDirPath = GetUnicodeString(tempDir.GetPath());
{
bool isCorrupt = false;
UString errorMessage;
HRESULT result = ExtractArchive(fullPath, tempDirPath, &openCallback, showProgress,
isCorrupt, errorMessage);
if (result != S_OK)
{
if (!assumeYes)
{
if (result == S_FALSE || isCorrupt)
{
errorMessage = NWindows::MyLoadStringW(IDS_EXTRACTION_ERROR_MESSAGE);
result = E_FAIL;
}
if (result != E_ABORT && !errorMessage.IsEmpty())
::MessageBoxW(0, errorMessage, NWindows::MyLoadStringW(IDS_EXTRACTION_ERROR_TITLE), MB_ICONERROR);
}
return 1;
}
}
CCurrentDirRestorer currentDirRestorer;
if (!SetCurrentDirectory(tempDir.GetPath()))
return 1;
HANDLE hProcess = 0;
#ifdef _SHELL_EXECUTE
if (!executeFile.IsEmpty())
{
CSysString filePath = GetSystemString(executeFile);
SHELLEXECUTEINFO execInfo;
execInfo.cbSize = sizeof(execInfo);
execInfo.fMask = SEE_MASK_NOCLOSEPROCESS | SEE_MASK_FLAG_DDEWAIT;
execInfo.hwnd = NULL;
execInfo.lpVerb = NULL;
execInfo.lpFile = filePath;
if (!switches.IsEmpty())
executeParameters += switches;
CSysString parametersSys = GetSystemString(executeParameters);
if (parametersSys.IsEmpty())
execInfo.lpParameters = NULL;
else
execInfo.lpParameters = parametersSys;
execInfo.lpDirectory = NULL;
execInfo.nShow = SW_SHOWNORMAL;
execInfo.hProcess = 0;
/* BOOL success = */ ::ShellExecuteEx(&execInfo);
UINT32 result = (UINT32)(UINT_PTR)execInfo.hInstApp;
if(result <= 32)
{
if (!assumeYes)
MyMessageBox(L"Can not open file");
return 1;
}
hProcess = execInfo.hProcess;
}
else
#endif
{
if (appLaunched.IsEmpty())
{
appLaunched = L"setup.exe";
if (!NFile::NFind::DoesFileExist(GetSystemString(appLaunched)))
{
if (!assumeYes)
MyMessageBox(L"Can not find setup.exe");
return 1;
}
}
{
UString s2 = tempDirPath;
NFile::NName::NormalizeDirPathPrefix(s2);
appLaunched.Replace(L"%%T\\", s2);
}
appLaunched.Replace(L"%%T", tempDirPath);
if (!switches.IsEmpty())
{
appLaunched += L' ';
appLaunched += switches;
}
STARTUPINFO startupInfo;
startupInfo.cb = sizeof(startupInfo);
startupInfo.lpReserved = 0;
startupInfo.lpDesktop = 0;
startupInfo.lpTitle = 0;
startupInfo.dwFlags = 0;
startupInfo.cbReserved2 = 0;
startupInfo.lpReserved2 = 0;
PROCESS_INFORMATION processInformation;
CSysString appLaunchedSys = GetSystemString(dirPrefix + appLaunched);
BOOL createResult = CreateProcess(NULL, (LPTSTR)(LPCTSTR)appLaunchedSys,
NULL, NULL, FALSE, 0, NULL, NULL /*tempDir.GetPath() */,
&startupInfo, &processInformation);
if (createResult == 0)
{
if (!assumeYes)
ShowLastErrorMessage();
return 1;
}
::CloseHandle(processInformation.hThread);
hProcess = processInformation.hProcess;
}
if (hProcess != 0)
{
WaitForSingleObject(hProcess, INFINITE);
::CloseHandle(hProcess);
}
return 0;
}

View File

@@ -0,0 +1,696 @@
# Microsoft Developer Studio Project File - Name="SFXSetup" - Package Owner=<4>
# Microsoft Developer Studio Generated Build File, Format Version 6.00
# ** DO NOT EDIT **
# TARGTYPE "Win32 (x86) Application" 0x0101
CFG=SFXSetup - Win32 Debug
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
!MESSAGE use the Export Makefile command and run
!MESSAGE
!MESSAGE NMAKE /f "SFXSetup.mak".
!MESSAGE
!MESSAGE You can specify a configuration when running NMAKE
!MESSAGE by defining the macro CFG on the command line. For example:
!MESSAGE
!MESSAGE NMAKE /f "SFXSetup.mak" CFG="SFXSetup - Win32 Debug"
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
!MESSAGE "SFXSetup - Win32 Release" (based on "Win32 (x86) Application")
!MESSAGE "SFXSetup - Win32 Debug" (based on "Win32 (x86) Application")
!MESSAGE "SFXSetup - Win32 ReleaseD" (based on "Win32 (x86) Application")
!MESSAGE
# Begin Project
# PROP AllowPerConfigDependencies 0
# PROP Scc_ProjName ""
# PROP Scc_LocalPath ""
CPP=cl.exe
MTL=midl.exe
RSC=rc.exe
!IF "$(CFG)" == "SFXSetup - Win32 Release"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 0
# PROP BASE Output_Dir "Release"
# PROP BASE Intermediate_Dir "Release"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
# PROP Output_Dir "Release"
# PROP Intermediate_Dir "Release"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /c
# ADD CPP /nologo /Gz /MT /W3 /GX /O1 /I "..\..\..\\" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "EXTRACT_ONLY" /D "EXCLUDE_COM" /D "NO_REGISTRY" /D "FORMAT_7Z" /D "COMPRESS_LZMA" /D "COMPRESS_BCJ_X86" /D "COMPRESS_BCJ2" /D "COMPRESS_COPY" /D "_SFX" /D "_NO_CRYPTO" /Yu"StdAfx.h" /FD /c
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0x419 /d "NDEBUG"
# ADD RSC /l 0x419 /d "NDEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386
# ADD LINK32 comctl32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386 /out:"C:\Util\7zS.sfx" /opt:NOWIN98
# SUBTRACT LINK32 /pdb:none
!ELSEIF "$(CFG)" == "SFXSetup - Win32 Debug"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 1
# PROP BASE Output_Dir "Debug"
# PROP BASE Intermediate_Dir "Debug"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 1
# PROP Output_Dir "Debug"
# PROP Intermediate_Dir "Debug"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /GZ /c
# ADD CPP /nologo /Gz /MTd /W3 /Gm /GX /ZI /Od /I "..\..\..\\" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "EXTRACT_ONLY" /D "EXCLUDE_COM" /D "NO_REGISTRY" /D "FORMAT_7Z" /D "COMPRESS_LZMA" /D "COMPRESS_BCJ_X86" /D "COMPRESS_BCJ2" /D "COMPRESS_COPY" /D "_SFX" /D "_NO_CRYPTO" /Yu"StdAfx.h" /FD /GZ /c
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0x419 /d "_DEBUG"
# ADD RSC /l 0x419 /d "_DEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib /nologo /subsystem:windows /debug /machine:I386 /out:"C:\UTIL\7zSfxS.exe" /pdbtype:sept
!ELSEIF "$(CFG)" == "SFXSetup - Win32 ReleaseD"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 0
# PROP BASE Output_Dir "ReleaseD"
# PROP BASE Intermediate_Dir "ReleaseD"
# PROP BASE Ignore_Export_Lib 0
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
# PROP Output_Dir "ReleaseD"
# PROP Intermediate_Dir "ReleaseD"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MD /W3 /GX /O1 /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "EXTRACT_ONLY" /D "EXCLUDE_COM" /D "NO_REGISTRY" /D "FORMAT_7Z" /D "COMPRESS_LZMA" /D "COMPRESS_BCJ_X86" /D "COMPRESS_BCJ2" /D "COMPRESS_COPY" /D "_SFX" /Yu"StdAfx.h" /FD /c
# ADD CPP /nologo /Gz /MD /W3 /GX /O1 /I "..\..\..\\" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "EXTRACT_ONLY" /D "EXCLUDE_COM" /D "NO_REGISTRY" /D "FORMAT_7Z" /D "COMPRESS_LZMA" /D "COMPRESS_BCJ_X86" /D "COMPRESS_BCJ2" /D "COMPRESS_COPY" /D "_SFX" /D "_NO_CRYPTO" /Yu"StdAfx.h" /FD /c
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0x419 /d "NDEBUG"
# ADD RSC /l 0x419 /d "NDEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 comctl32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386 /out:"C:\UTIL\7zWinSR.exe"
# SUBTRACT BASE LINK32 /debug /nodefaultlib
# ADD LINK32 comctl32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386 /out:"C:\Util\7zSD.sfx" /opt:NOWIN98
# SUBTRACT LINK32 /pdb:none
!ENDIF
# Begin Target
# Name "SFXSetup - Win32 Release"
# Name "SFXSetup - Win32 Debug"
# Name "SFXSetup - Win32 ReleaseD"
# Begin Group "Spec"
# PROP Default_Filter ""
# Begin Source File
SOURCE=.\resource.rc
# End Source File
# Begin Source File
SOURCE=.\StdAfx.cpp
# ADD CPP /Yc"StdAfx.h"
# End Source File
# Begin Source File
SOURCE=.\StdAfx.h
# End Source File
# End Group
# Begin Group "Interface"
# PROP Default_Filter ""
# End Group
# Begin Group "7z"
# PROP Default_Filter ""
# Begin Source File
SOURCE=..\..\Archive\7z\7zDecode.cpp
# End Source File
# Begin Source File
SOURCE=..\..\Archive\7z\7zDecode.h
# End Source File
# Begin Source File
SOURCE=..\..\Archive\7z\7zExtract.cpp
# End Source File
# Begin Source File
SOURCE=..\..\Archive\7z\7zFolderOutStream.cpp
# End Source File
# Begin Source File
SOURCE=..\..\Archive\7z\7zFolderOutStream.h
# End Source File
# Begin Source File
SOURCE=..\..\Archive\7z\7zHandler.cpp
# End Source File
# Begin Source File
SOURCE=..\..\Archive\7z\7zHandler.h
# End Source File
# Begin Source File
SOURCE=..\..\Archive\7z\7zHeader.cpp
# End Source File
# Begin Source File
SOURCE=..\..\Archive\7z\7zHeader.h
# End Source File
# Begin Source File
SOURCE=..\..\Archive\7z\7zIn.cpp
# End Source File
# Begin Source File
SOURCE=..\..\Archive\7z\7zIn.h
# End Source File
# Begin Source File
SOURCE=..\..\Archive\7z\7zItem.h
# End Source File
# Begin Source File
SOURCE=..\..\Archive\7z\7zMethodID.cpp
# End Source File
# Begin Source File
SOURCE=..\..\Archive\7z\7zMethodID.h
# End Source File
# End Group
# Begin Group "Archive Common"
# PROP Default_Filter ""
# Begin Source File
SOURCE=..\..\Archive\Common\CoderMixer2.cpp
# End Source File
# Begin Source File
SOURCE=..\..\Archive\Common\CoderMixer2.h
# End Source File
# Begin Source File
SOURCE=..\..\Archive\Common\CoderMixer2MT.cpp
# End Source File
# Begin Source File
SOURCE=..\..\Archive\Common\CoderMixer2MT.h
# End Source File
# Begin Source File
SOURCE=..\..\Archive\Common\CrossThreadProgress.cpp
# End Source File
# Begin Source File
SOURCE=..\..\Archive\Common\CrossThreadProgress.h
# End Source File
# Begin Source File
SOURCE=..\..\Archive\Common\FilterCoder.cpp
# End Source File
# Begin Source File
SOURCE=..\..\Archive\Common\FilterCoder.h
# End Source File
# Begin Source File
SOURCE=..\..\Archive\Common\ItemNameUtils.cpp
# End Source File
# Begin Source File
SOURCE=..\..\Archive\Common\ItemNameUtils.h
# End Source File
# Begin Source File
SOURCE=..\..\Archive\Common\OutStreamWithCRC.cpp
# End Source File
# Begin Source File
SOURCE=..\..\Archive\Common\OutStreamWithCRC.h
# End Source File
# End Group
# Begin Group "Compress"
# PROP Default_Filter ""
# Begin Group "LZMA"
# PROP Default_Filter ""
# Begin Source File
SOURCE=..\..\Compress\LZMA\LZMADecoder.cpp
# End Source File
# End Group
# Begin Group "Branch"
# PROP Default_Filter ""
# Begin Source File
SOURCE=..\..\Compress\Branch\BranchCoder.cpp
# End Source File
# Begin Source File
SOURCE=..\..\Compress\Branch\BranchCoder.h
# End Source File
# Begin Source File
SOURCE=..\..\Compress\Branch\x86.cpp
# End Source File
# Begin Source File
SOURCE=..\..\Compress\Branch\x86_2.cpp
# End Source File
# End Group
# Begin Group "Copy"
# PROP Default_Filter ""
# Begin Source File
SOURCE=..\..\Compress\Copy\CopyCoder.cpp
# End Source File
# Begin Source File
SOURCE=..\..\Compress\Copy\CopyCoder.h
# End Source File
# End Group
# Begin Group "LZ"
# PROP Default_Filter ""
# Begin Source File
SOURCE=..\..\Compress\LZ\LZOutWindow.cpp
# End Source File
# Begin Source File
SOURCE=..\..\Compress\LZ\LZOutWindow.h
# End Source File
# End Group
# End Group
# Begin Group "SDK"
# PROP Default_Filter ""
# End Group
# Begin Group "Common"
# PROP Default_Filter ""
# Begin Source File
SOURCE=..\..\..\Common\Alloc.cpp
# End Source File
# Begin Source File
SOURCE=..\..\..\Common\Alloc.h
# End Source File
# Begin Source File
SOURCE=..\..\..\Common\CommandLineParser.cpp
# End Source File
# Begin Source File
SOURCE=..\..\..\Common\CommandLineParser.h
# End Source File
# Begin Source File
SOURCE=..\..\..\Common\CRC.cpp
# End Source File
# Begin Source File
SOURCE=..\..\..\Common\CRC.h
# End Source File
# Begin Source File
SOURCE=..\..\..\Common\IntToString.cpp
# End Source File
# Begin Source File
SOURCE=..\..\..\Common\IntToString.h
# End Source File
# Begin Source File
SOURCE=..\..\..\Common\NewHandler.cpp
# End Source File
# Begin Source File
SOURCE=..\..\..\Common\NewHandler.h
# End Source File
# Begin Source File
SOURCE=..\..\..\Common\String.cpp
# End Source File
# Begin Source File
SOURCE=..\..\..\Common\String.h
# End Source File
# Begin Source File
SOURCE=..\..\..\Common\StringConvert.cpp
# End Source File
# Begin Source File
SOURCE=..\..\..\Common\StringConvert.h
# End Source File
# Begin Source File
SOURCE=..\..\..\Common\TextConfig.cpp
# End Source File
# Begin Source File
SOURCE=..\..\..\Common\TextConfig.h
# End Source File
# Begin Source File
SOURCE=..\..\..\Common\UTFConvert.cpp
# End Source File
# Begin Source File
SOURCE=..\..\..\Common\UTFConvert.h
# End Source File
# Begin Source File
SOURCE=..\..\..\Common\Vector.cpp
# End Source File
# Begin Source File
SOURCE=..\..\..\Common\Vector.h
# End Source File
# Begin Source File
SOURCE=..\..\..\Common\Wildcard.cpp
# End Source File
# Begin Source File
SOURCE=..\..\..\Common\Wildcard.h
# End Source File
# End Group
# Begin Group "Windows"
# PROP Default_Filter ""
# Begin Group "Control"
# PROP Default_Filter ""
# Begin Source File
SOURCE=..\..\..\Windows\Control\Dialog.cpp
# End Source File
# Begin Source File
SOURCE=..\..\..\Windows\Control\Dialog.h
# End Source File
# End Group
# Begin Source File
SOURCE=..\..\..\Windows\DLL.cpp
# End Source File
# Begin Source File
SOURCE=..\..\..\Windows\DLL.h
# End Source File
# Begin Source File
SOURCE=..\..\..\Windows\Error.cpp
# End Source File
# Begin Source File
SOURCE=..\..\..\Windows\Error.h
# End Source File
# Begin Source File
SOURCE=..\..\..\Windows\FileDir.cpp
# End Source File
# Begin Source File
SOURCE=..\..\..\Windows\FileDir.h
# End Source File
# Begin Source File
SOURCE=..\..\..\Windows\FileFind.cpp
# End Source File
# Begin Source File
SOURCE=..\..\..\Windows\FileFind.h
# End Source File
# Begin Source File
SOURCE=..\..\..\Windows\FileIO.cpp
# End Source File
# Begin Source File
SOURCE=..\..\..\Windows\FileIO.h
# End Source File
# Begin Source File
SOURCE=..\..\..\Windows\FileName.cpp
# End Source File
# Begin Source File
SOURCE=..\..\..\Windows\FileName.h
# End Source File
# Begin Source File
SOURCE=..\..\..\Windows\PropVariant.cpp
# End Source File
# Begin Source File
SOURCE=..\..\..\Windows\PropVariant.h
# End Source File
# Begin Source File
SOURCE=..\..\..\Windows\ResourceString.cpp
# End Source File
# Begin Source File
SOURCE=..\..\..\Windows\ResourceString.h
# End Source File
# Begin Source File
SOURCE=..\..\..\Windows\Synchronization.cpp
# End Source File
# Begin Source File
SOURCE=..\..\..\Windows\Synchronization.h
# End Source File
# Begin Source File
SOURCE=..\..\..\Windows\Window.cpp
# End Source File
# Begin Source File
SOURCE=..\..\..\Windows\Window.h
# End Source File
# End Group
# Begin Group "7z Common"
# PROP Default_Filter ""
# Begin Source File
SOURCE=..\..\Common\FileStreams.cpp
# End Source File
# Begin Source File
SOURCE=..\..\Common\FileStreams.h
# End Source File
# Begin Source File
SOURCE=..\..\Common\InBuffer.cpp
# End Source File
# Begin Source File
SOURCE=..\..\Common\InBuffer.h
# End Source File
# Begin Source File
SOURCE=..\..\Common\LimitedStreams.cpp
# End Source File
# Begin Source File
SOURCE=..\..\Common\LimitedStreams.h
# End Source File
# Begin Source File
SOURCE=..\..\Common\LockedStream.cpp
# End Source File
# Begin Source File
SOURCE=..\..\Common\LockedStream.h
# End Source File
# Begin Source File
SOURCE=..\..\Common\OutBuffer.cpp
# End Source File
# Begin Source File
SOURCE=..\..\Common\OutBuffer.h
# End Source File
# Begin Source File
SOURCE=..\..\Common\ProgressUtils.cpp
# End Source File
# Begin Source File
SOURCE=..\..\Common\ProgressUtils.h
# End Source File
# Begin Source File
SOURCE=..\..\Common\StreamBinder.cpp
# End Source File
# Begin Source File
SOURCE=..\..\Common\StreamBinder.h
# End Source File
# Begin Source File
SOURCE=..\..\Common\StreamObjects.cpp
# End Source File
# Begin Source File
SOURCE=..\..\Common\StreamObjects.h
# End Source File
# Begin Source File
SOURCE=..\..\Common\StreamUtils.cpp
# End Source File
# Begin Source File
SOURCE=..\..\Common\StreamUtils.h
# End Source File
# End Group
# Begin Group "UI"
# PROP Default_Filter ""
# Begin Group "Explorer"
# PROP Default_Filter ""
# Begin Source File
SOURCE=..\..\UI\Explorer\MyMessages.cpp
# End Source File
# Begin Source File
SOURCE=..\..\UI\Explorer\MyMessages.h
# End Source File
# End Group
# Begin Group "UI Common"
# PROP Default_Filter ""
# Begin Source File
SOURCE=..\..\UI\Common\ArchiveOpenCallback.cpp
# End Source File
# Begin Source File
SOURCE=..\..\UI\Common\ArchiveOpenCallback.h
# End Source File
# Begin Source File
SOURCE=..\..\UI\Common\ArchiverInfo.cpp
# End Source File
# Begin Source File
SOURCE=..\..\UI\Common\ArchiverInfo.h
# End Source File
# Begin Source File
SOURCE=..\..\UI\Common\DefaultName.cpp
# End Source File
# Begin Source File
SOURCE=..\..\UI\Common\DefaultName.h
# End Source File
# Begin Source File
SOURCE=..\..\UI\Common\ExtractMode.h
# End Source File
# Begin Source File
SOURCE=..\..\UI\Common\OpenArchive.cpp
# End Source File
# Begin Source File
SOURCE=..\..\UI\Common\OpenArchive.h
# End Source File
# End Group
# Begin Group "GUI"
# PROP Default_Filter ""
# Begin Source File
SOURCE=..\..\UI\GUI\OpenCallbackGUI.cpp
# End Source File
# Begin Source File
SOURCE=..\..\UI\GUI\OpenCallbackGUI.h
# End Source File
# End Group
# End Group
# Begin Group "File Manager"
# PROP Default_Filter ""
# Begin Group "Dialog"
# PROP Default_Filter ""
# Begin Source File
SOURCE=..\..\FileManager\Resource\ProgressDialog\ProgressDialog.cpp
# End Source File
# Begin Source File
SOURCE=..\..\FileManager\Resource\ProgressDialog\ProgressDialog.h
# End Source File
# End Group
# Begin Source File
SOURCE=..\..\FileManager\FormatUtils.cpp
# End Source File
# Begin Source File
SOURCE=..\..\FileManager\FormatUtils.h
# End Source File
# End Group
# Begin Source File
SOURCE=.\ExtractCallback.cpp
# End Source File
# Begin Source File
SOURCE=.\ExtractCallback.h
# End Source File
# Begin Source File
SOURCE=.\ExtractEngine.cpp
# End Source File
# Begin Source File
SOURCE=.\ExtractEngine.h
# End Source File
# Begin Source File
SOURCE=.\Main.cpp
# End Source File
# Begin Source File
SOURCE=.\setup.ico
# End Source File
# End Target
# End Project

View File

@@ -0,0 +1,29 @@
Microsoft Developer Studio Workspace File, Format Version 6.00
# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
###############################################################################
Project: "SFXSetup"=.\SFXSetup.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
}}}
###############################################################################
Global:
Package=<5>
{{{
}}}
Package=<3>
{{{
}}}
###############################################################################

View File

@@ -0,0 +1,3 @@
// StdAfx.cpp
#include "StdAfx.h"

View File

@@ -0,0 +1,10 @@
// StdAfx.h
#ifndef __STDAFX_H
#define __STDAFX_H
#include "../../../Common/MyWindows.h"
#include "../../../Common/NewHandler.h"
#include <commctrl.h>
#endif

View File

@@ -0,0 +1,156 @@
PROG = 7zS.sfx
LIBS = $(LIBS) user32.lib oleaut32.lib shell32.lib ole32.lib comctl32.lib
CFLAGS = $(CFLAGS) -I ../../../ \
-DEXCLUDE_COM \
-DNO_REGISTRY \
-DEXTRACT_ONLY \
-D_SFX \
-DFORMAT_7Z \
-DCOMPRESS_BCJ_X86 \
-DCOMPRESS_BCJ2 \
-DCOMPRESS_COPY \
-DCOMPRESS_LZMA \
-D_NO_CRYPTO
SFX_WIN_OBJS = \
$O\Main.obj \
$O\ExtractCallback.obj \
$O\ExtractEngine.obj \
GUI_OBJS = \
$O\OpenCallbackGUI.obj \
COMMON_OBJS = \
$O\Alloc.obj \
$O\CommandLineParser.obj \
$O\CRC.obj \
$O\IntToString.obj \
$O\NewHandler.obj \
$O\String.obj \
$O\StringConvert.obj \
$O\TextConfig.obj \
$O\UTFConvert.obj \
$O\Vector.obj \
$O\Wildcard.obj \
WIN_OBJS = \
$O\DLL.obj \
$O\Error.obj \
$O\FileDir.obj \
$O\FileFind.obj \
$O\FileIO.obj \
$O\FileName.obj \
$O\PropVariant.obj \
$O\ResourceString.obj \
$O\Synchronization.obj \
$O\Window.obj \
WIN_CTRL_OBJS = \
$O\Dialog.obj \
7ZIP_COMMON_OBJS = \
$O\FileStreams.obj \
$O\InBuffer.obj \
$O\LimitedStreams.obj \
$O\LockedStream.obj \
$O\OutBuffer.obj \
$O\ProgressUtils.obj \
$O\StreamBinder.obj \
$O\StreamObjects.obj \
$O\StreamUtils.obj \
UI_COMMON_OBJS = \
$O\ArchiveOpenCallback.obj \
$O\ArchiverInfo.obj \
$O\DefaultName.obj \
$O\OpenArchive.obj \
FM_OBJS = \
$O\FormatUtils.obj \
AR_COMMON_OBJS = \
$O\CoderMixer2.obj \
$O\CoderMixer2MT.obj \
$O\CrossThreadProgress.obj \
$O\FilterCoder.obj \
$O\ItemNameUtils.obj \
$O\OutStreamWithCRC.obj \
7Z_OBJS = \
$O\7zDecode.obj \
$O\7zExtract.obj \
$O\7zFolderOutStream.obj \
$O\7zHandler.obj \
$O\7zHeader.obj \
$O\7zIn.obj \
$O\7zMethodID.obj \
BRANCH_OPT_OBJS = \
$O\BranchCoder.obj \
$O\x86.obj \
$O\x86_2.obj \
LZ_OBJS = \
$O\LZOutWindow.obj \
LZMA_OPT_OBJS = \
$O\LZMADecoder.obj \
OBJS = \
$O\StdAfx.obj \
$(SFX_WIN_OBJS) \
$(GUI_OBJS) \
$(COMMON_OBJS) \
$(WIN_OBJS) \
$(WIN_CTRL_OBJS) \
$(7ZIP_COMMON_OBJS) \
$(UI_COMMON_OBJS) \
$(FM_OBJS)\
$(AR_COMMON_OBJS) \
$(7Z_OBJS) \
$(BRANCH_OPT_OBJS) \
$(LZ_OBJS) \
$(LZMA_OPT_OBJS) \
$O\CopyCoder.obj \
$O\MyMessages.obj \
$O\ProgressDialog.obj \
$O\resource.res
!include "../../../Build.mak"
$(SFX_WIN_OBJS): $(*B).cpp
$(COMPL)
$(GUI_OBJS): ../../UI/GUI/$(*B).cpp
$(COMPL)
$(COMMON_OBJS): ../../../Common/$(*B).cpp
$(COMPL)
$(WIN_OBJS): ../../../Windows/$(*B).cpp
$(COMPL)
$(WIN_CTRL_OBJS): ../../../Windows/Control/$(*B).cpp
$(COMPL)
$(7ZIP_COMMON_OBJS): ../../Common/$(*B).cpp
$(COMPL)
$(UI_COMMON_OBJS): ../../UI/Common/$(*B).cpp
$(COMPL)
$(FM_OBJS): ../../FileManager/$(*B).cpp
$(COMPL)
$(AR_COMMON_OBJS): ../../Archive/Common/$(*B).cpp
$(COMPL)
$(7Z_OBJS): ../../Archive/7z/$(*B).cpp
$(COMPL)
$(BRANCH_OPT_OBJS): ../../Compress/Branch/$(*B).cpp
$(COMPL)
$(LZ_OBJS): ../../Compress/LZ/$(*B).cpp
$(COMPL)
$(LZMA_OPT_OBJS): ../../Compress/LZMA/$(*B).cpp
$(COMPL)
$O\CopyCoder.obj: ../../Compress/Copy/$(*B).cpp
$(COMPL)
$O\MyMessages.obj: ../../UI/Explorer/MyMessages.cpp
$(COMPL)
$O\ProgressDialog.obj: ../../FileManager/Resource/ProgressDialog/$(*B).cpp
$(COMPL)

View File

@@ -0,0 +1,6 @@
#define IDI_ICON3 159
#define IDS_EXTRACTION_ERROR_TITLE 7
#define IDS_EXTRACTION_ERROR_MESSAGE 8
#define IDS_CANNOT_CREATE_FOLDER 9
#define IDS_PROGRESS_EXTRACTING 69

View File

@@ -0,0 +1,16 @@
#include "../../MyVersionInfo.rc"
#include "resource.h"
MY_VERSION_INFO_APP("7z Setup SFX", "7zS.sfx")
IDI_ICON3 ICON "setup.ico"
STRINGTABLE
BEGIN
IDS_EXTRACTION_ERROR_TITLE "Extraction Failed"
IDS_EXTRACTION_ERROR_MESSAGE "File is corrupt"
IDS_CANNOT_CREATE_FOLDER "Cannot create folder '{0}'"
IDS_PROGRESS_EXTRACTING "Extracting"
END
#include "../../FileManager/Resource/ProgressDialog/resource.rc"

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

BIN
CPP/7zip/Bundles/SFXWin/7z.ico Executable file
View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

115
CPP/7zip/Bundles/SFXWin/Main.cpp Executable file
View File

@@ -0,0 +1,115 @@
// Main.cpp
#include "StdAfx.h"
#include <initguid.h>
#include "Common/StringConvert.h"
#include "Common/CommandLineParser.h"
#include "Windows/FileDir.h"
#include "Windows/FileName.h"
#include "Windows/DLL.h"
#include "../../ICoder.h"
#include "../../IPassword.h"
#include "../../Archive/IArchive.h"
#include "../../UI/Common/Extract.h"
#include "../../UI/Explorer/MyMessages.h"
#include "../../UI/GUI/ExtractGUI.h"
HINSTANCE g_hInstance;
#ifndef _UNICODE
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
int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE /* hPrevInstance */, LPSTR /* lpCmdLine */, int /* nCmdShow */)
{
g_hInstance = (HINSTANCE)hInstance;
#ifndef _UNICODE
g_IsNT = IsItWindowsNT();
#endif
UString password;
bool assumeYes = false;
bool outputFolderDefined = false;
UString outputFolder;
UStringVector subStrings;
NCommandLineParser::SplitCommandLine(GetCommandLineW(), subStrings);
for (int i = 1; i < subStrings.Size(); i++)
{
const UString &s = subStrings[i];
if (s.CompareNoCase(L"-y") == 0)
assumeYes = true;
else if (s.Left(2).CompareNoCase(L"-o") == 0)
{
outputFolder = s.Mid(2);
NWindows::NFile::NName::NormalizeDirPathPrefix(outputFolder);
outputFolderDefined = !outputFolder.IsEmpty();
}
else if (s.Left(2).CompareNoCase(L"-p") == 0)
{
password = s.Mid(2);
}
}
UString path;
NWindows::NDLL::MyGetModuleFileName(g_hInstance, path);
UString fullPath;
int fileNamePartStartIndex;
if (!NWindows::NFile::NDirectory::MyGetFullPathName(path, fullPath, fileNamePartStartIndex))
{
MyMessageBox(L"Error 1329484");
return 1;
}
COpenCallbackGUI openCallback;
openCallback.PasswordIsDefined = !password.IsEmpty();
openCallback.Password = password;
CExtractCallbackImp *ecs = new CExtractCallbackImp;
CMyComPtr<IFolderArchiveExtractCallback> extractCallback = ecs;
ecs->Init();
ecs->PasswordIsDefined = !password.IsEmpty();
ecs->Password = password;
CExtractOptions eo;
eo.OutputDir = outputFolderDefined ? outputFolder :
fullPath.Left(fileNamePartStartIndex);
eo.YesToAll = assumeYes;
eo.OverwriteMode = assumeYes ?
NExtract::NOverwriteMode::kWithoutPrompt :
NExtract::NOverwriteMode::kAskBefore;
eo.PathMode = NExtract::NPathMode::kFullPathnames;
eo.TestMode = false;
UStringVector v1, v2;
v1.Add(fullPath);
v2.Add(fullPath);
NWildcard::CCensorNode wildcardCensor;
wildcardCensor.AddItem(true, L"*", true, true, true);
HRESULT result = ExtractGUI(v1, v2,
wildcardCensor, eo, (assumeYes ? false: true), &openCallback, ecs);
/*
HRESULT result = ExtractArchive(NULL, path, assumeYes, !assumeYes,
outputFolderDefined ? outputFolder :
fullPath.Left(fileNamePartStartIndex));
*/
if (result == S_FALSE)
MyMessageBox(L"Archive is not supported");
else if (result != S_OK && result != E_ABORT)
ShowErrorMessage(0, result);
return 0;
}

View File

@@ -0,0 +1,847 @@
# Microsoft Developer Studio Project File - Name="SFXWin" - Package Owner=<4>
# Microsoft Developer Studio Generated Build File, Format Version 6.00
# ** DO NOT EDIT **
# TARGTYPE "Win32 (x86) Application" 0x0101
CFG=SFXWin - Win32 Debug
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
!MESSAGE use the Export Makefile command and run
!MESSAGE
!MESSAGE NMAKE /f "SFXWin.mak".
!MESSAGE
!MESSAGE You can specify a configuration when running NMAKE
!MESSAGE by defining the macro CFG on the command line. For example:
!MESSAGE
!MESSAGE NMAKE /f "SFXWin.mak" CFG="SFXWin - Win32 Debug"
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
!MESSAGE "SFXWin - Win32 Release" (based on "Win32 (x86) Application")
!MESSAGE "SFXWin - Win32 Debug" (based on "Win32 (x86) Application")
!MESSAGE "SFXWin - Win32 ReleaseD" (based on "Win32 (x86) Application")
!MESSAGE
# Begin Project
# PROP AllowPerConfigDependencies 0
# PROP Scc_ProjName ""
# PROP Scc_LocalPath ""
CPP=cl.exe
MTL=midl.exe
RSC=rc.exe
!IF "$(CFG)" == "SFXWin - Win32 Release"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 0
# PROP BASE Output_Dir "Release"
# PROP BASE Intermediate_Dir "Release"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
# PROP Output_Dir "Release"
# PROP Intermediate_Dir "Release"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /c
# ADD CPP /nologo /Gz /MD /W3 /GX /O1 /I "..\..\..\\" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "EXTRACT_ONLY" /D "EXCLUDE_COM" /D "NO_REGISTRY" /D "FORMAT_7Z" /D "COMPRESS_LZMA" /D "COMPRESS_BCJ_X86" /D "COMPRESS_BCJ2" /D "COMPRESS_COPY" /D "COMPRESS_PPMD" /D "_SFX" /D "CRYPTO_7ZAES" /D "CRYPTO_AES" /Yu"StdAfx.h" /FD /c
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0x419 /d "NDEBUG"
# ADD RSC /l 0x419 /d "NDEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386 /out:"C:\Util\7z.sfx" /opt:NOWIN98
# SUBTRACT LINK32 /pdb:none
!ELSEIF "$(CFG)" == "SFXWin - Win32 Debug"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 1
# PROP BASE Output_Dir "Debug"
# PROP BASE Intermediate_Dir "Debug"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 1
# PROP Output_Dir "Debug"
# PROP Intermediate_Dir "Debug"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /GZ /c
# ADD CPP /nologo /Gz /W3 /Gm /GX /ZI /Od /I "..\..\..\\" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "EXTRACT_ONLY" /D "EXCLUDE_COM" /D "NO_REGISTRY" /D "FORMAT_7Z" /D "COMPRESS_LZMA" /D "COMPRESS_BCJ_X86" /D "COMPRESS_BCJ2" /D "COMPRESS_COPY" /D "COMPRESS_PPMD" /D "_SFX" /D "CRYPTO_7ZAES" /D "CRYPTO_AES" /Yu"StdAfx.h" /FD /GZ /c
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0x419 /d "_DEBUG"
# ADD RSC /l 0x419 /d "_DEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /debug /machine:I386 /out:"C:\Util\7z.sfx" /pdbtype:sept
!ELSEIF "$(CFG)" == "SFXWin - Win32 ReleaseD"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 0
# PROP BASE Output_Dir "SFXWin___Win32_ReleaseD"
# PROP BASE Intermediate_Dir "SFXWin___Win32_ReleaseD"
# PROP BASE Ignore_Export_Lib 0
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
# PROP Output_Dir "SFXWin___Win32_ReleaseD"
# PROP Intermediate_Dir "SFXWin___Win32_ReleaseD"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /Gz /MT /W3 /GX /O1 /I "..\..\..\\" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "EXTRACT_ONLY" /D "EXCLUDE_COM" /D "NO_REGISTRY" /D "FORMAT_7Z" /D "COMPRESS_LZMA" /D "COMPRESS_BCJ_X86" /D "COMPRESS_BCJ2" /D "COMPRESS_COPY" /D "COMPRESS_PPMD" /D "_SFX" /D "CRYPTO_7ZAES" /D "CRYPTO_AES" /Yu"StdAfx.h" /FD /c
# ADD CPP /nologo /Gz /MD /W3 /GX /O1 /I "..\..\..\\" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "EXTRACT_ONLY" /D "EXCLUDE_COM" /D "NO_REGISTRY" /D "FORMAT_7Z" /D "COMPRESS_LZMA" /D "COMPRESS_BCJ_X86" /D "COMPRESS_BCJ2" /D "COMPRESS_COPY" /D "COMPRESS_PPMD" /D "_SFX" /D "CRYPTO_7ZAES" /D "CRYPTO_AES" /Yu"StdAfx.h" /FD /c
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0x419 /d "NDEBUG"
# ADD RSC /l 0x419 /d "NDEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386 /out:"C:\Util\7z.sfx" /opt:NOWIN98
# SUBTRACT BASE LINK32 /pdb:none
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386 /out:"C:\Util\7zD.sfx" /opt:NOWIN98
# SUBTRACT LINK32 /pdb:none
!ENDIF
# Begin Target
# Name "SFXWin - Win32 Release"
# Name "SFXWin - Win32 Debug"
# Name "SFXWin - Win32 ReleaseD"
# Begin Group "Spec"
# PROP Default_Filter ""
# Begin Source File
SOURCE=.\StdAfx.cpp
# ADD CPP /Yc"StdAfx.h"
# End Source File
# Begin Source File
SOURCE=.\StdAfx.h
# End Source File
# End Group
# Begin Group "7z"
# PROP Default_Filter ""
# Begin Source File
SOURCE=..\..\Archive\7z\7zDecode.cpp
# End Source File
# Begin Source File
SOURCE=..\..\Archive\7z\7zDecode.h
# End Source File
# Begin Source File
SOURCE=..\..\Archive\7z\7zExtract.cpp
# End Source File
# Begin Source File
SOURCE=..\..\Archive\7z\7zFolderOutStream.cpp
# End Source File
# Begin Source File
SOURCE=..\..\Archive\7z\7zFolderOutStream.h
# End Source File
# Begin Source File
SOURCE=..\..\Archive\7z\7zHandler.cpp
# End Source File
# Begin Source File
SOURCE=..\..\Archive\7z\7zHandler.h
# End Source File
# Begin Source File
SOURCE=..\..\Archive\7z\7zHeader.cpp
# End Source File
# Begin Source File
SOURCE=..\..\Archive\7z\7zHeader.h
# End Source File
# Begin Source File
SOURCE=..\..\Archive\7z\7zIn.cpp
# End Source File
# Begin Source File
SOURCE=..\..\Archive\7z\7zIn.h
# End Source File
# Begin Source File
SOURCE=..\..\Archive\7z\7zMethodID.cpp
# End Source File
# Begin Source File
SOURCE=..\..\Archive\7z\7zMethodID.h
# End Source File
# End Group
# Begin Group "Archive Common"
# PROP Default_Filter ""
# Begin Source File
SOURCE=..\..\Archive\Common\CoderMixer2.cpp
# End Source File
# Begin Source File
SOURCE=..\..\Archive\Common\CoderMixer2.h
# End Source File
# Begin Source File
SOURCE=..\..\Archive\Common\CoderMixer2MT.cpp
# End Source File
# Begin Source File
SOURCE=..\..\Archive\Common\CoderMixer2MT.h
# End Source File
# Begin Source File
SOURCE=..\..\Archive\Common\CrossThreadProgress.cpp
# End Source File
# Begin Source File
SOURCE=..\..\Archive\Common\CrossThreadProgress.h
# End Source File
# Begin Source File
SOURCE=..\..\Archive\Common\FilterCoder.cpp
# End Source File
# Begin Source File
SOURCE=..\..\Archive\Common\FilterCoder.h
# End Source File
# Begin Source File
SOURCE=..\..\Archive\Common\ItemNameUtils.cpp
# End Source File
# Begin Source File
SOURCE=..\..\Archive\Common\ItemNameUtils.h
# End Source File
# Begin Source File
SOURCE=..\..\Archive\Common\OutStreamWithCRC.cpp
# End Source File
# Begin Source File
SOURCE=..\..\Archive\Common\OutStreamWithCRC.h
# End Source File
# End Group
# Begin Group "Compress"
# PROP Default_Filter ""
# Begin Group "LZMA"
# PROP Default_Filter ""
# Begin Source File
SOURCE=..\..\Compress\LZMA\LZMADecoder.cpp
# End Source File
# End Group
# Begin Group "Branch"
# PROP Default_Filter ""
# Begin Source File
SOURCE=..\..\Compress\Branch\BranchCoder.cpp
# End Source File
# Begin Source File
SOURCE=..\..\Compress\Branch\BranchCoder.h
# End Source File
# Begin Source File
SOURCE=..\..\Compress\Branch\x86.cpp
# End Source File
# Begin Source File
SOURCE=..\..\Compress\Branch\x86_2.cpp
# End Source File
# End Group
# Begin Group "PPMD"
# PROP Default_Filter ""
# Begin Source File
SOURCE=..\..\Compress\PPMD\PPMDContext.h
# End Source File
# Begin Source File
SOURCE=..\..\Compress\PPMD\PPMDDecode.h
# End Source File
# Begin Source File
SOURCE=..\..\Compress\PPMD\PPMDDecoder.cpp
# End Source File
# Begin Source File
SOURCE=..\..\Compress\PPMD\PPMDDecoder.h
# End Source File
# Begin Source File
SOURCE=..\..\Compress\PPMD\PPMDSubAlloc.h
# End Source File
# Begin Source File
SOURCE=..\..\Compress\PPMD\PPMDType.h
# End Source File
# End Group
# Begin Group "LZ"
# PROP Default_Filter ""
# Begin Source File
SOURCE=..\..\Compress\LZ\LZOutWindow.cpp
# End Source File
# Begin Source File
SOURCE=..\..\Compress\LZ\LZOutWindow.h
# End Source File
# End Group
# Begin Group "Copy"
# PROP Default_Filter ""
# Begin Source File
SOURCE=..\..\Compress\Copy\CopyCoder.cpp
# End Source File
# Begin Source File
SOURCE=..\..\Compress\Copy\CopyCoder.h
# End Source File
# End Group
# End Group
# Begin Group "Crypto"
# PROP Default_Filter ""
# Begin Group "AES"
# PROP Default_Filter ""
# Begin Source File
SOURCE=..\..\Crypto\AES\aes.h
# End Source File
# Begin Source File
SOURCE=..\..\Crypto\AES\AES_CBC.h
# End Source File
# Begin Source File
SOURCE=..\..\Crypto\AES\aescpp.h
# End Source File
# Begin Source File
SOURCE=..\..\Crypto\AES\aescrypt.c
# SUBTRACT CPP /YX /Yc /Yu
# End Source File
# Begin Source File
SOURCE=..\..\Crypto\AES\aeskey.c
# SUBTRACT CPP /YX /Yc /Yu
# End Source File
# Begin Source File
SOURCE=..\..\Crypto\AES\aesopt.h
# End Source File
# Begin Source File
SOURCE=..\..\Crypto\AES\aestab.c
# SUBTRACT CPP /YX /Yc /Yu
# End Source File
# Begin Source File
SOURCE=..\..\Crypto\AES\MyAES.cpp
# End Source File
# Begin Source File
SOURCE=..\..\Crypto\AES\MyAES.h
# End Source File
# End Group
# Begin Group "7zAES"
# PROP Default_Filter ""
# Begin Source File
SOURCE=..\..\Crypto\7zAES\7zAES.cpp
# End Source File
# Begin Source File
SOURCE=..\..\Crypto\7zAES\7zAES.h
# End Source File
# Begin Source File
SOURCE=..\..\Crypto\7zAES\MySHA256.h
# End Source File
# End Group
# Begin Group "Hash"
# PROP Default_Filter ""
# Begin Source File
SOURCE=..\..\Crypto\Hash\RotateDefs.h
# End Source File
# Begin Source File
SOURCE=..\..\Crypto\Hash\Sha256.cpp
# End Source File
# Begin Source File
SOURCE=..\..\Crypto\Hash\Sha256.h
# End Source File
# End Group
# End Group
# Begin Group "Dialogs"
# PROP Default_Filter ""
# Begin Source File
SOURCE=..\..\FileManager\Resource\MessagesDialog\MessagesDialog.cpp
# End Source File
# Begin Source File
SOURCE=..\..\FileManager\Resource\MessagesDialog\MessagesDialog.h
# End Source File
# Begin Source File
SOURCE=..\..\FileManager\Resource\OverwriteDialog\OverwriteDialog.cpp
# End Source File
# Begin Source File
SOURCE=..\..\FileManager\Resource\OverwriteDialog\OverwriteDialog.h
# End Source File
# Begin Source File
SOURCE=..\..\FileManager\Resource\PasswordDialog\PasswordDialog.cpp
# End Source File
# Begin Source File
SOURCE=..\..\FileManager\Resource\PasswordDialog\PasswordDialog.h
# End Source File
# Begin Source File
SOURCE=..\..\FileManager\Resource\ProgressDialog\ProgressDialog.cpp
# End Source File
# Begin Source File
SOURCE=..\..\FileManager\Resource\ProgressDialog\ProgressDialog.h
# End Source File
# End Group
# Begin Group "7zip Common"
# PROP Default_Filter ""
# Begin Source File
SOURCE=..\..\Common\FilePathAutoRename.cpp
# End Source File
# Begin Source File
SOURCE=..\..\Common\FilePathAutoRename.h
# End Source File
# Begin Source File
SOURCE=..\..\Common\FileStreams.cpp
# End Source File
# Begin Source File
SOURCE=..\..\Common\FileStreams.h
# End Source File
# Begin Source File
SOURCE=..\..\Common\InBuffer.cpp
# End Source File
# Begin Source File
SOURCE=..\..\Common\InBuffer.h
# End Source File
# Begin Source File
SOURCE=..\..\Common\LimitedStreams.cpp
# End Source File
# Begin Source File
SOURCE=..\..\Common\LimitedStreams.h
# End Source File
# Begin Source File
SOURCE=..\..\Common\LockedStream.cpp
# End Source File
# Begin Source File
SOURCE=..\..\Common\LockedStream.h
# End Source File
# Begin Source File
SOURCE=..\..\Common\OutBuffer.cpp
# End Source File
# Begin Source File
SOURCE=..\..\Common\OutBuffer.h
# End Source File
# Begin Source File
SOURCE=..\..\Common\ProgressUtils.cpp
# End Source File
# Begin Source File
SOURCE=..\..\Common\ProgressUtils.h
# End Source File
# Begin Source File
SOURCE=..\..\Common\StreamBinder.cpp
# End Source File
# Begin Source File
SOURCE=..\..\Common\StreamBinder.h
# End Source File
# Begin Source File
SOURCE=..\..\Common\StreamObjects.cpp
# End Source File
# Begin Source File
SOURCE=..\..\Common\StreamObjects.h
# End Source File
# Begin Source File
SOURCE=..\..\Common\StreamUtils.cpp
# End Source File
# Begin Source File
SOURCE=..\..\Common\StreamUtils.h
# End Source File
# End Group
# Begin Group "File Manager"
# PROP Default_Filter ""
# Begin Source File
SOURCE=..\..\FileManager\ExtractCallback.cpp
# End Source File
# Begin Source File
SOURCE=..\..\FileManager\ExtractCallback.h
# End Source File
# Begin Source File
SOURCE=..\..\FileManager\FormatUtils.cpp
# End Source File
# Begin Source File
SOURCE=..\..\FileManager\FormatUtils.h
# End Source File
# End Group
# Begin Group "Windows"
# PROP Default_Filter ""
# Begin Group "Control"
# PROP Default_Filter ""
# Begin Source File
SOURCE=..\..\..\Windows\Control\Dialog.cpp
# End Source File
# Begin Source File
SOURCE=..\..\..\Windows\Control\Dialog.h
# End Source File
# End Group
# Begin Source File
SOURCE=..\..\..\Windows\DLL.cpp
# End Source File
# Begin Source File
SOURCE=..\..\..\Windows\DLL.h
# End Source File
# Begin Source File
SOURCE=..\..\..\Windows\Error.cpp
# End Source File
# Begin Source File
SOURCE=..\..\..\Windows\Error.h
# End Source File
# Begin Source File
SOURCE=..\..\..\Windows\FileDir.cpp
# End Source File
# Begin Source File
SOURCE=..\..\..\Windows\FileDir.h
# End Source File
# Begin Source File
SOURCE=..\..\..\Windows\FileFind.cpp
# End Source File
# Begin Source File
SOURCE=..\..\..\Windows\FileFind.h
# End Source File
# Begin Source File
SOURCE=..\..\..\Windows\FileIO.cpp
# End Source File
# Begin Source File
SOURCE=..\..\..\Windows\FileIO.h
# End Source File
# Begin Source File
SOURCE=..\..\..\Windows\FileName.cpp
# End Source File
# Begin Source File
SOURCE=..\..\..\Windows\FileName.h
# End Source File
# Begin Source File
SOURCE=..\..\..\Windows\PropVariant.cpp
# End Source File
# Begin Source File
SOURCE=..\..\..\Windows\PropVariant.h
# End Source File
# Begin Source File
SOURCE=..\..\..\Windows\PropVariantConversions.cpp
# End Source File
# Begin Source File
SOURCE=..\..\..\Windows\PropVariantConversions.h
# End Source File
# Begin Source File
SOURCE=..\..\..\Windows\ResourceString.cpp
# End Source File
# Begin Source File
SOURCE=..\..\..\Windows\ResourceString.h
# End Source File
# Begin Source File
SOURCE=..\..\..\Windows\Shell.cpp
# End Source File
# Begin Source File
SOURCE=..\..\..\Windows\Shell.h
# End Source File
# Begin Source File
SOURCE=..\..\..\Windows\Synchronization.cpp
# End Source File
# Begin Source File
SOURCE=..\..\..\Windows\Synchronization.h
# End Source File
# Begin Source File
SOURCE=..\..\..\Windows\Window.cpp
# End Source File
# Begin Source File
SOURCE=..\..\..\Windows\Window.h
# End Source File
# End Group
# Begin Group "Common"
# PROP Default_Filter ""
# Begin Source File
SOURCE=..\..\..\Common\Alloc.cpp
# End Source File
# Begin Source File
SOURCE=..\..\..\Common\Alloc.h
# End Source File
# Begin Source File
SOURCE=..\..\..\Common\CommandLineParser.cpp
# End Source File
# Begin Source File
SOURCE=..\..\..\Common\CommandLineParser.h
# End Source File
# Begin Source File
SOURCE=..\..\..\Common\CRC.cpp
# End Source File
# Begin Source File
SOURCE=..\..\..\Common\CRC.h
# End Source File
# Begin Source File
SOURCE=..\..\..\Common\IntToString.cpp
# End Source File
# Begin Source File
SOURCE=..\..\..\Common\IntToString.h
# End Source File
# Begin Source File
SOURCE=..\..\..\Common\String.cpp
# End Source File
# Begin Source File
SOURCE=..\..\..\Common\String.h
# End Source File
# Begin Source File
SOURCE=..\..\..\Common\StringConvert.cpp
# End Source File
# Begin Source File
SOURCE=..\..\..\Common\StringConvert.h
# End Source File
# Begin Source File
SOURCE=..\..\..\Common\Vector.cpp
# End Source File
# Begin Source File
SOURCE=..\..\..\Common\Vector.h
# End Source File
# Begin Source File
SOURCE=..\..\..\Common\Wildcard.cpp
# End Source File
# Begin Source File
SOURCE=..\..\..\Common\Wildcard.h
# End Source File
# End Group
# Begin Group "UI"
# PROP Default_Filter ""
# Begin Group "UI Common"
# PROP Default_Filter ""
# Begin Source File
SOURCE=..\..\UI\Common\ArchiveExtractCallback.cpp
# End Source File
# Begin Source File
SOURCE=..\..\UI\Common\ArchiveExtractCallback.h
# End Source File
# Begin Source File
SOURCE=..\..\UI\Common\ArchiveOpenCallback.cpp
# End Source File
# Begin Source File
SOURCE=..\..\UI\Common\ArchiveOpenCallback.h
# End Source File
# Begin Source File
SOURCE=..\..\UI\Common\ArchiverInfo.cpp
# End Source File
# Begin Source File
SOURCE=..\..\UI\Common\ArchiverInfo.h
# End Source File
# Begin Source File
SOURCE=..\..\UI\Common\DefaultName.cpp
# End Source File
# Begin Source File
SOURCE=..\..\UI\Common\DefaultName.h
# End Source File
# Begin Source File
SOURCE=..\..\UI\Common\Extract.cpp
# End Source File
# Begin Source File
SOURCE=..\..\UI\Common\Extract.h
# End Source File
# Begin Source File
SOURCE=..\..\UI\Common\ExtractingFilePath.cpp
# End Source File
# Begin Source File
SOURCE=..\..\UI\Common\ExtractingFilePath.h
# End Source File
# Begin Source File
SOURCE=..\..\UI\Common\OpenArchive.cpp
# End Source File
# Begin Source File
SOURCE=..\..\UI\Common\OpenArchive.h
# End Source File
# End Group
# Begin Group "GUI"
# PROP Default_Filter ""
# Begin Source File
SOURCE=..\..\UI\GUI\ExtractDialog.cpp
# End Source File
# Begin Source File
SOURCE=..\..\UI\GUI\ExtractDialog.h
# End Source File
# Begin Source File
SOURCE=..\..\UI\GUI\ExtractGUI.cpp
# End Source File
# Begin Source File
SOURCE=..\..\UI\GUI\ExtractGUI.h
# End Source File
# Begin Source File
SOURCE=..\..\UI\GUI\OpenCallbackGUI.cpp
# End Source File
# Begin Source File
SOURCE=..\..\UI\GUI\OpenCallbackGUI.h
# End Source File
# End Group
# Begin Group "Explorer"
# PROP Default_Filter ""
# Begin Source File
SOURCE=..\..\UI\Explorer\MyMessages.cpp
# End Source File
# Begin Source File
SOURCE=..\..\UI\Explorer\MyMessages.h
# End Source File
# End Group
# End Group
# Begin Source File
SOURCE=.\7z.ico
# End Source File
# Begin Source File
SOURCE=.\7z1.ico
# End Source File
# Begin Source File
SOURCE=.\Main.cpp
# End Source File
# Begin Source File
SOURCE=.\resource.rc
# End Source File
# End Target
# End Project

View File

@@ -0,0 +1,29 @@
Microsoft Developer Studio Workspace File, Format Version 6.00
# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
###############################################################################
Project: "SFXWin"=.\SFXWin.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
}}}
###############################################################################
Global:
Package=<5>
{{{
}}}
Package=<3>
{{{
}}}
###############################################################################

View File

@@ -0,0 +1,3 @@
// StdAfx.cpp
#include "StdAfx.h"

View File

@@ -0,0 +1,12 @@
// StdAfx.h
#ifndef __STDAFX_H
#define __STDAFX_H
#include "../../../Common/MyWindows.h"
#include "../../../Common/NewHandler.h"
#include <commctrl.h>
#include <ShlObj.h>
#endif

207
CPP/7zip/Bundles/SFXWin/makefile Executable file
View File

@@ -0,0 +1,207 @@
PROG = 7z.sfx
LIBS = $(LIBS) user32.lib oleaut32.lib shell32.lib ole32.lib
CFLAGS = $(CFLAGS) -I ../../../ \
-DEXCLUDE_COM \
-DNO_REGISTRY \
-DEXTRACT_ONLY \
-D_SFX \
-DFORMAT_7Z \
-DCOMPRESS_BCJ_X86 \
-DCOMPRESS_BCJ2 \
-DCOMPRESS_COPY \
-DCOMPRESS_LZMA \
-DCOMPRESS_PPMD \
-DCRYPTO_AES \
-DCRYPTO_7ZAES \
SFX_WIN_OBJS = \
$O\Main.obj \
GUI_OBJS = \
$O\ExtractDialog.obj \
$O\ExtractGUI.obj \
$O\OpenCallbackGUI.obj \
COMMON_OBJS = \
$O\Alloc.obj \
$O\CommandLineParser.obj \
$O\CRC.obj \
$O\IntToString.obj \
$O\NewHandler.obj \
$O\String.obj \
$O\StringConvert.obj \
$O\Vector.obj \
$O\Wildcard.obj \
WIN_OBJS = \
$O\DLL.obj \
$O\Error.obj \
$O\FileDir.obj \
$O\FileFind.obj \
$O\FileIO.obj \
$O\FileName.obj \
$O\PropVariant.obj \
$O\PropVariantConversions.obj \
$O\ResourceString.obj \
$O\Shell.obj \
$O\Synchronization.obj \
$O\Window.obj \
WIN_CTRL_OBJS = \
$O\Dialog.obj \
7ZIP_COMMON_OBJS = \
$O\FilePathAutoRename.obj \
$O\FileStreams.obj \
$O\InBuffer.obj \
$O\LimitedStreams.obj \
$O\LockedStream.obj \
$O\OutBuffer.obj \
$O\ProgressUtils.obj \
$O\StreamBinder.obj \
$O\StreamObjects.obj \
$O\StreamUtils.obj \
UI_COMMON_OBJS = \
$O\ArchiveExtractCallback.obj \
$O\ArchiveOpenCallback.obj \
$O\ArchiverInfo.obj \
$O\DefaultName.obj \
$O\Extract.obj \
$O\ExtractingFilePath.obj \
$O\OpenArchive.obj \
FM_OBJS = \
$O\ExtractCallback.obj \
$O\FormatUtils.obj \
AR_COMMON_OBJS = \
$O\CoderMixer2.obj \
$O\CoderMixer2MT.obj \
$O\CrossThreadProgress.obj \
$O\FilterCoder.obj \
$O\ItemNameUtils.obj \
$O\OutStreamWithCRC.obj \
7Z_OBJS = \
$O\7zDecode.obj \
$O\7zExtract.obj \
$O\7zFolderOutStream.obj \
$O\7zHandler.obj \
$O\7zHeader.obj \
$O\7zIn.obj \
$O\7zMethodID.obj \
BRANCH_OPT_OBJS = \
$O\BranchCoder.obj \
$O\x86.obj \
$O\x86_2.obj \
LZ_OBJS = \
$O\LZOutWindow.obj \
LZMA_OPT_OBJS = \
$O\LZMADecoder.obj \
PPMD_OPT_OBJS = \
$O\PPMDDecoder.obj \
7ZAES_OPT_OBJS = \
$O\7zAES.obj \
AES_OPT_OBJS = \
$O\MyAES.obj \
AES_ORIG_OBJS = \
$O\aescrypt.obj \
$O\aeskey.obj \
$O\aestab.obj \
CRYPTO_HASH_OBJS = \
$O\Sha256.obj \
OBJS = \
$O\StdAfx.obj \
$(SFX_WIN_OBJS) \
$(GUI_OBJS) \
$(COMMON_OBJS) \
$(WIN_OBJS) \
$(WIN_CTRL_OBJS) \
$(7ZIP_COMMON_OBJS) \
$(UI_COMMON_OBJS) \
$(FM_OBJS)\
$(AR_COMMON_OBJS) \
$(7Z_OBJS) \
$(BRANCH_OPT_OBJS) \
$(LZ_OBJS) \
$(LZMA_OPT_OBJS) \
$(PPMD_OPT_OBJS) \
$O\CopyCoder.obj \
$(CRYPTO_HASH_OBJS) \
$(7ZAES_OPT_OBJS) \
$(AES_OPT_OBJS) \
$(AES_ORIG_OBJS) \
$O\MyMessages.obj \
$O\MessagesDialog.obj \
$O\OverwriteDialog.obj \
$O\PasswordDialog.obj \
$O\ProgressDialog.obj \
$O\resource.res
!include "../../../Build.mak"
$(SFX_WIN_OBJS): $(*B).cpp
$(COMPL)
$(GUI_OBJS): ../../UI/GUI/$(*B).cpp
$(COMPL)
$(COMMON_OBJS): ../../../Common/$(*B).cpp
$(COMPL)
$(WIN_OBJS): ../../../Windows/$(*B).cpp
$(COMPL)
$(WIN_CTRL_OBJS): ../../../Windows/Control/$(*B).cpp
$(COMPL)
$(7ZIP_COMMON_OBJS): ../../Common/$(*B).cpp
$(COMPL)
$(UI_COMMON_OBJS): ../../UI/Common/$(*B).cpp
$(COMPL)
$(FM_OBJS): ../../FileManager/$(*B).cpp
$(COMPL)
$(AR_COMMON_OBJS): ../../Archive/Common/$(*B).cpp
$(COMPL)
$(7Z_OBJS): ../../Archive/7z/$(*B).cpp
$(COMPL)
$(BRANCH_OPT_OBJS): ../../Compress/Branch/$(*B).cpp
$(COMPL)
$(LZ_OBJS): ../../Compress/LZ/$(*B).cpp
$(COMPL)
$(LZMA_OPT_OBJS): ../../Compress/LZMA/$(*B).cpp
$(COMPL)
$(PPMD_OPT_OBJS): ../../Compress/PPMD/$(*B).cpp
$(COMPL)
$O\CopyCoder.obj: ../../Compress/Copy/$(*B).cpp
$(COMPL)
$(CRYPTO_HASH_OBJS): ../../Crypto/Hash/$(*B).cpp
$(COMPL)
$(7ZAES_OPT_OBJS): ../../Crypto/7zAES/$(*B).cpp
$(COMPL)
$(AES_OPT_OBJS): ../../Crypto/AES/$(*B).cpp
$(COMPL)
$(AES_ORIG_OBJS): ../../Crypto/AES/$(*B).c
$(COMPL_O1_W3)
$O\MyMessages.obj: ../../UI/Explorer/MyMessages.cpp
$(COMPL)
$O\MessagesDialog.obj: ../../FileManager/Resource/MessagesDialog/$(*B).cpp
$(COMPL)
$O\OverwriteDialog.obj: ../../FileManager/Resource/OverwriteDialog./$(*B).cpp
$(COMPL)
$O\PasswordDialog.obj: ../../FileManager/Resource/PasswordDialog/$(*B).cpp
$(COMPL)
$O\ProgressDialog.obj: ../../FileManager/Resource/ProgressDialog/$(*B).cpp
$(COMPL)

View File

@@ -0,0 +1,7 @@
#define IDD_DIALOG_EXTRACT 137
#define IDI_ICON3 159
#define IDC_STATIC_EXTRACT_EXTRACT_TO 1020
#define IDC_EXTRACT_COMBO_PATH 1021
#define IDC_EXTRACT_BUTTON_SET_PATH 1022

View File

@@ -0,0 +1,34 @@
#include "../../MyVersionInfo.rc"
#include "../../GuiCommon.rc"
#include "resource.h"
MY_VERSION_INFO_APP("7z SFX", "7z.sfx")
#define xSize2 214
#define ySize2 64
#define xSize (xSize2 + marg + marg)
#define ySize (ySize2 + marg + marg)
#define bYPos (ySize - marg - bYSize)
#define bXPos1 (xSize - marg - bXSize)
#define bXPos2 (bXPos1 - 10 - bXSize)
IDI_ICON3 ICON "7z.ico"
IDD_DIALOG_EXTRACT DIALOG 0, 0, xSize, ySize MY_MODAL_DIALOG_STYLE
CAPTION "7-Zip self-extracting archive"
MY_FONT
BEGIN
LTEXT "E&xtract to:", IDC_STATIC_EXTRACT_EXTRACT_TO, marg, marg, xSize2, 8
EDITTEXT IDC_EXTRACT_COMBO_PATH, marg, 21, xSize2 - bDotsSize - 13, 14, ES_AUTOHSCROLL
PUSHBUTTON "...", IDC_EXTRACT_BUTTON_SET_PATH, xSize - marg - bDotsSize, 20, bDotsSize, bYSize, WS_GROUP
DEFPUSHBUTTON "Extract", IDOK, , bXPos2, bYPos, bXSize, bYSize, WS_GROUP
PUSHBUTTON "Cancel", IDCANCEL, bXPos1, bYPos, bXSize, bYSize
END
#include "../../FileManager/Resource/MessagesDialog/resource.rc"
#include "../../FileManager/Resource/OverwriteDialog/resource.rc"
#include "../../FileManager/Resource/PasswordDialog/resource.rc"
#include "../../FileManager/Resource/ProgressDialog/resource.rc"
#include "../../UI/Resource/Extract/resource.rc"

15
CPP/7zip/Bundles/makefile Executable file
View File

@@ -0,0 +1,15 @@
DIRS = \
Alone\~ \
Alone7z\~ \
Format7z\~ \
Format7zR\~ \
Format7zExtract\~ \
Format7zExtractR\~ \
SFXCon\~ \
SFXSetup\~ \
SFXWin\~ \
all: $(DIRS)
$(DIRS):
!include "../SubBuild.mak"