Update to 7-Zip Version 21.02

This commit is contained in:
Tino Reichardt
2021-05-13 16:39:14 +02:00
parent 3724ecfedc
commit 48fa49f76c
620 changed files with 35032 additions and 10925 deletions

View File

@@ -44,7 +44,7 @@ RSC=rc.exe
# 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 /MT /W4 /WX /GX /O1 /I "..\..\..\\" /D "NDEBUG" /D "_MBCS" /D "WIN32" /D "_CONSOLE" /D "_7ZIP_LARGE_PAGES" /D "SUPPORT_DEVICE_FILE" /Yu"StdAfx.h" /FD /c
# ADD CPP /nologo /Gz /MT /W4 /WX /GX /O1 /I "..\..\..\\" /D "NDEBUG" /D "_MBCS" /D "WIN32" /D "_CONSOLE" /D "WIN_LONG_PATH" /D "_7ZIP_LARGE_PAGES" /D "SUPPORT_DEVICE_FILE" /Yu"StdAfx.h" /FD /c
# ADD BASE RSC /l 0x419 /d "NDEBUG"
# ADD RSC /l 0x419 /d "NDEBUG"
BSC32=bscmake.exe
@@ -69,7 +69,7 @@ LINK32=link.exe
# 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 /MDd /W4 /Gm /GX /ZI /Od /I "..\..\..\\" /D "_DEBUG" /D "_MBCS" /D "WIN32" /D "_CONSOLE" /D "_7ZIP_LARGE_PAGES" /D "SUPPORT_DEVICE_FILE" /Yu"StdAfx.h" /FD /GZ /c
# ADD CPP /nologo /Gz /MDd /W4 /Gm /GX /ZI /Od /I "..\..\..\\" /D "_DEBUG" /D "_MBCS" /D "WIN32" /D "_CONSOLE" /D "WIN_LONG_PATH" /D "_7ZIP_LARGE_PAGES" /D "SUPPORT_DEVICE_FILE" /Yu"StdAfx.h" /FD /GZ /c
# SUBTRACT CPP /WX
# ADD BASE RSC /l 0x419 /d "_DEBUG"
# ADD RSC /l 0x419 /d "_DEBUG"
@@ -95,7 +95,7 @@ LINK32=link.exe
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MD /W3 /GX /O2 /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "EXCLUDE_COM" /D "NO_REGISTRY" /Yu"StdAfx.h" /FD /c
# ADD CPP /nologo /Gz /MD /W4 /WX /GX /O1 /I "..\..\..\\" /D "NDEBUG" /D "UNICODE" /D "_UNICODE" /D "WIN32" /D "_CONSOLE" /D "_7ZIP_LARGE_PAGES" /D "SUPPORT_DEVICE_FILE" /Yu"StdAfx.h" /FD /c
# ADD CPP /nologo /Gz /MD /W4 /WX /GX /O1 /I "..\..\..\\" /D "NDEBUG" /D "UNICODE" /D "_UNICODE" /D "WIN32" /D "_CONSOLE" /D "WIN_LONG_PATH" /D "_7ZIP_LARGE_PAGES" /D "SUPPORT_DEVICE_FILE" /Yu"StdAfx.h" /FD /c
# ADD BASE RSC /l 0x419 /d "NDEBUG"
# ADD RSC /l 0x419 /d "NDEBUG"
BSC32=bscmake.exe
@@ -122,7 +122,7 @@ LINK32=link.exe
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "EXCLUDE_COM" /D "NO_REGISTRY" /D "_MBCS" /Yu"StdAfx.h" /FD /GZ /c
# ADD CPP /nologo /Gz /MDd /W4 /WX /Gm /GX /ZI /Od /I "..\..\..\\" /D "_DEBUG" /D "_UNICODE" /D "UNICODE" /D "WIN32" /D "_CONSOLE" /D "_7ZIP_LARGE_PAGES" /D "SUPPORT_DEVICE_FILE" /Yu"StdAfx.h" /FD /GZ /c
# ADD CPP /nologo /Gz /MDd /W4 /WX /Gm /GX /ZI /Od /I "..\..\..\\" /D "_DEBUG" /D "_UNICODE" /D "UNICODE" /D "WIN32" /D "_CONSOLE" /D "WIN_LONG_PATH" /D "_7ZIP_LARGE_PAGES" /D "SUPPORT_DEVICE_FILE" /Yu"StdAfx.h" /FD /GZ /c
# ADD BASE RSC /l 0x419 /d "_DEBUG"
# ADD RSC /l 0x419 /d "_DEBUG"
BSC32=bscmake.exe
@@ -350,10 +350,18 @@ SOURCE=..\..\..\Common\NewHandler.h
# End Source File
# Begin Source File
SOURCE=..\..\..\Common\Sha1Prepare.cpp
# End Source File
# Begin Source File
SOURCE=..\..\..\Common\Sha1Reg.cpp
# End Source File
# Begin Source File
SOURCE=..\..\..\Common\Sha256Prepare.cpp
# End Source File
# Begin Source File
SOURCE=..\..\..\Common\Sha256Reg.cpp
# End Source File
# Begin Source File
@@ -390,10 +398,6 @@ SOURCE=..\..\..\Common\StringToInt.h
# End Source File
# Begin Source File
SOURCE=..\..\..\Common\Types.h
# End Source File
# Begin Source File
SOURCE=..\..\..\Common\UTFConvert.cpp
# End Source File
# Begin Source File
@@ -526,6 +530,14 @@ SOURCE=..\..\..\Windows\PropVariantUtils.h
# End Source File
# Begin Source File
SOURCE=..\..\..\Windows\Registry.cpp
# End Source File
# Begin Source File
SOURCE=..\..\..\Windows\Registry.h
# End Source File
# Begin Source File
SOURCE=..\..\..\Windows\Synchronization.cpp
# End Source File
# Begin Source File
@@ -542,6 +554,14 @@ SOURCE=..\..\..\Windows\System.h
# End Source File
# Begin Source File
SOURCE=..\..\..\Windows\SystemInfo.cpp
# End Source File
# Begin Source File
SOURCE=..\..\..\Windows\SystemInfo.h
# End Source File
# Begin Source File
SOURCE=..\..\..\Windows\Thread.h
# End Source File
# Begin Source File
@@ -999,14 +1019,6 @@ SOURCE=..\..\Compress\LzmaRegister.cpp
# PROP Default_Filter ""
# Begin Source File
SOURCE=..\..\Compress\PpmdContext.h
# End Source File
# Begin Source File
SOURCE=..\..\Compress\PpmdDecode.h
# End Source File
# Begin Source File
SOURCE=..\..\Compress\PpmdDecoder.cpp
!IF "$(CFG)" == "Alone - Win32 Release"
@@ -1032,10 +1044,6 @@ SOURCE=..\..\Compress\PpmdDecoder.h
# End Source File
# Begin Source File
SOURCE=..\..\Compress\PpmdEncode.h
# End Source File
# Begin Source File
SOURCE=..\..\Compress\PpmdEncoder.cpp
!IF "$(CFG)" == "Alone - Win32 Release"
@@ -1065,14 +1073,6 @@ SOURCE=..\..\Compress\PpmdRegister.cpp
# End Source File
# Begin Source File
SOURCE=..\..\Compress\PpmdSubAlloc.h
# End Source File
# Begin Source File
SOURCE=..\..\Compress\PpmdType.h
# End Source File
# Begin Source File
SOURCE=..\..\Compress\PpmdZip.cpp
# End Source File
# Begin Source File
@@ -1457,10 +1457,6 @@ SOURCE=..\..\Archive\Zip\ZipItem.h
# End Source File
# Begin Source File
SOURCE=..\..\Archive\Zip\ZipItemEx.h
# End Source File
# Begin Source File
SOURCE=..\..\Archive\Zip\ZipOut.cpp
# End Source File
# Begin Source File
@@ -2227,6 +2223,10 @@ SOURCE=..\..\..\..\C\7zStream.c
# End Source File
# Begin Source File
SOURCE=..\..\..\..\C\7zTypes.h
# End Source File
# Begin Source File
SOURCE=..\..\..\..\C\Aes.c
!IF "$(CFG)" == "Alone - Win32 Release"
@@ -2985,6 +2985,11 @@ SOURCE=..\..\..\..\C\Sha1.h
# End Source File
# Begin Source File
SOURCE=..\..\..\..\C\Sha1Opt.c
# SUBTRACT CPP /YX /Yc /Yu
# End Source File
# Begin Source File
SOURCE=..\..\..\..\C\Sha256.c
!IF "$(CFG)" == "Alone - Win32 Release"
@@ -3013,6 +3018,11 @@ SOURCE=..\..\..\..\C\Sha256.h
# End Source File
# Begin Source File
SOURCE=..\..\..\..\C\Sha256Opt.c
# SUBTRACT CPP /YX /Yc /Yu
# End Source File
# Begin Source File
SOURCE=..\..\..\..\C\Sort.c
!IF "$(CFG)" == "Alone - Win32 Release"
@@ -3067,10 +3077,6 @@ SOURCE=..\..\..\..\C\Threads.c
SOURCE=..\..\..\..\C\Threads.h
# End Source File
# Begin Source File
SOURCE=..\..\..\..\C\Types.h
# End Source File
# End Group
# End Target
# End Project

View File

@@ -1,4 +1,7 @@
PROG = 7za.exe
# USE_C_AES = 1
# USE_C_SHA = 1
MY_CONSOLE = 1
CFLAGS = $(CFLAGS) -DZSTD_MULTITHREAD
@@ -39,8 +42,10 @@ WIN_OBJS = \
$O\PropVariant.obj \
$O\PropVariantConv.obj \
$O\PropVariantUtils.obj \
$O\Registry.obj \
$O\Synchronization.obj \
$O\System.obj \
$O\SystemInfo.obj \
$O\TimeUtils.obj \
7ZIP_COMMON_OBJS = \
@@ -140,7 +145,7 @@ COMPRESS_OBJS = \
$O\BranchMisc.obj \
$O\BranchRegister.obj \
$O\ByteSwap.obj \
$O\BZip2CRC.obj \
$O\BZip2Crc.obj \
$O\BZip2Decoder.obj \
$O\BZip2Encoder.obj \
$O\BZip2Register.obj \
@@ -208,8 +213,6 @@ C_OBJS = \
$O\Ppmd8.obj \
$O\Ppmd8Dec.obj \
$O\Ppmd8Enc.obj \
$O\Sha1.obj \
$O\Sha256.obj \
$O\Sort.obj \
$O\Threads.obj \
$O\Xz.obj \
@@ -350,5 +353,7 @@ FASTLZMA2_OBJS = \
!include "../../Crc.mak"
!include "../../Crc64.mak"
!include "../../LzmaDec.mak"
!include "../../Sha1.mak"
!include "../../Sha256.mak"
!include "../../7zip.mak"

View File

@@ -0,0 +1,334 @@
PROG = 7za
# IS_X64 = 1
# USE_ASM = 1
# ST_MODE = 1
include ../../LzmaDec_gcc.mak
LOCAL_FLAGS_ST =
MT_OBJS =
ifdef ST_MODE
LOCAL_FLAGS_ST = -D_7ZIP_ST
ifdef SystemDrive
MT_OBJS = \
$O/Threads.o \
endif
else
MT_OBJS = \
$O/LzFindMt.o \
$O/StreamBinder.o \
$O/Synchronization.o \
$O/VirtThread.o \
$O/MemBlocks.o \
$O/OutMemStream.o \
$O/ProgressMt.o \
$O/Threads.o \
endif
LOCAL_FLAGS_SYS =
ifdef SystemDrive
LOCAL_FLAGS_SYS = \
-D_7ZIP_LARGE_PAGES \
-DWIN_LONG_PATH \
-DSUPPORT_DEVICE_FILE \
SYS_OBJS = \
$O/FileSystem.o \
$O/Registry.o \
$O/MemoryLock.o \
$O/DLL.o \
$O/DllSecur.o \
$O/resource.o \
else
SYS_OBJS = \
$O/MyWindows.o \
endif
LOCAL_FLAGS = \
$(LOCAL_FLAGS_ST) \
$(LOCAL_FLAGS_SYS) \
CONSOLE_OBJS = \
$O/BenchCon.o \
$O/ConsoleClose.o \
$O/ExtractCallbackConsole.o \
$O/HashCon.o \
$O/List.o \
$O/Main.o \
$O/MainAr.o \
$O/OpenCallbackConsole.o \
$O/PercentPrinter.o \
$O/UpdateCallbackConsole.o \
$O/UserInputUtils.o \
UI_COMMON_OBJS = \
$O/ArchiveCommandLine.o \
$O/ArchiveExtractCallback.o \
$O/ArchiveOpenCallback.o \
$O/Bench.o \
$O/DefaultName.o \
$O/EnumDirItems.o \
$O/Extract.o \
$O/ExtractingFilePath.o \
$O/HashCalc.o \
$O/LoadCodecs.o \
$O/OpenArchive.o \
$O/PropIDUtils.o \
$O/SetProperties.o \
$O/SortUtils.o \
$O/TempFiles.o \
$O/Update.o \
$O/UpdateAction.o \
$O/UpdateCallback.o \
$O/UpdatePair.o \
$O/UpdateProduce.o \
COMMON_OBJS = \
$O/CommandLineParser.o \
$O/CRC.o \
$O/CrcReg.o \
$O/IntToString.o \
$O/ListFileUtils.o \
$O/MyString.o \
$O/NewHandler.o \
$O/StdInStream.o \
$O/StdOutStream.o \
$O/Sha1Prepare.o \
$O/Sha1Reg.o \
$O/Sha256Prepare.o \
$O/Sha256Reg.o \
$O/StringConvert.o \
$O/StringToInt.o \
$O/UTFConvert.o \
$O/MyVector.o \
$O/Wildcard.o \
$O/XzCrc64Init.o \
$O/XzCrc64Reg.o \
WIN_OBJS = \
$O/ErrorMsg.o \
$O/FileDir.o \
$O/FileFind.o \
$O/FileIO.o \
$O/FileLink.o \
$O/FileName.o \
$O/PropVariant.o \
$O/PropVariantConv.o \
$O/PropVariantUtils.o \
$O/System.o \
$O/SystemInfo.o \
$O/TimeUtils.o \
7ZIP_COMMON_OBJS = \
$O/CreateCoder.o \
$O/CWrappers.o \
$O/FilePathAutoRename.o \
$O/FileStreams.o \
$O/InBuffer.o \
$O/InOutTempBuffer.o \
$O/FilterCoder.o \
$O/LimitedStreams.o \
$O/MethodId.o \
$O/MethodProps.o \
$O/OffsetStream.o \
$O/OutBuffer.o \
$O/ProgressUtils.o \
$O/PropId.o \
$O/StreamObjects.o \
$O/StreamUtils.o \
$O/UniqBlocks.o \
AR_OBJS = \
$O/Bz2Handler.o \
$O/GzHandler.o \
$O/LzmaHandler.o \
$O/SplitHandler.o \
$O/XzHandler.o \
AR_COMMON_OBJS = \
$O/CoderMixer2.o \
$O/DummyOutStream.o \
$O/HandlerOut.o \
$O/InStreamWithCRC.o \
$O/ItemNameUtils.o \
$O/MultiStream.o \
$O/OutStreamWithCRC.o \
$O/ParseProperties.o \
7Z_OBJS = \
$O/7zCompressionMode.o \
$O/7zDecode.o \
$O/7zEncode.o \
$O/7zExtract.o \
$O/7zFolderInStream.o \
$O/7zHandler.o \
$O/7zHandlerOut.o \
$O/7zHeader.o \
$O/7zIn.o \
$O/7zOut.o \
$O/7zProperties.o \
$O/7zRegister.o \
$O/7zSpecStream.o \
$O/7zUpdate.o \
CAB_OBJS = \
$O/CabBlockInStream.o \
$O/CabHandler.o \
$O/CabHeader.o \
$O/CabIn.o \
$O/CabRegister.o \
TAR_OBJS = \
$O/TarHandler.o \
$O/TarHandlerOut.o \
$O/TarHeader.o \
$O/TarIn.o \
$O/TarOut.o \
$O/TarUpdate.o \
$O/TarRegister.o \
ZIP_OBJS = \
$O/ZipAddCommon.o \
$O/ZipHandler.o \
$O/ZipHandlerOut.o \
$O/ZipIn.o \
$O/ZipItem.o \
$O/ZipOut.o \
$O/ZipUpdate.o \
$O/ZipRegister.o \
COMPRESS_OBJS = \
$O/Bcj2Coder.o \
$O/Bcj2Register.o \
$O/BcjCoder.o \
$O/BcjRegister.o \
$O/BitlDecoder.o \
$O/BranchMisc.o \
$O/BranchRegister.o \
$O/ByteSwap.o \
$O/BZip2Crc.o \
$O/BZip2Decoder.o \
$O/BZip2Encoder.o \
$O/BZip2Register.o \
$O/CopyCoder.o \
$O/CopyRegister.o \
$O/Deflate64Register.o \
$O/DeflateDecoder.o \
$O/DeflateEncoder.o \
$O/DeflateRegister.o \
$O/DeltaFilter.o \
$O/ImplodeDecoder.o \
$O/Lzma2Decoder.o \
$O/Lzma2Encoder.o \
$O/Lzma2Register.o \
$O/LzmaDecoder.o \
$O/LzmaEncoder.o \
$O/LzmaRegister.o \
$O/LzOutWindow.o \
$O/LzxDecoder.o \
$O/PpmdDecoder.o \
$O/PpmdEncoder.o \
$O/PpmdRegister.o \
$O/PpmdZip.o \
$O/QuantumDecoder.o \
$O/ShrinkDecoder.o \
$O/XzDecoder.o \
$O/XzEncoder.o \
CRYPTO_OBJS = \
$O/7zAes.o \
$O/7zAesRegister.o \
$O/HmacSha1.o \
$O/MyAes.o \
$O/MyAesReg.o \
$O/Pbkdf2HmacSha1.o \
$O/RandGen.o \
$O/WzAes.o \
$O/ZipCrypto.o \
$O/ZipStrong.o \
C_OBJS = \
$O/7zStream.o \
$O/Alloc.o \
$O/Bcj2.o \
$O/Bcj2Enc.o \
$O/Bra.o \
$O/Bra86.o \
$O/BraIA64.o \
$O/BwtSort.o \
$O/CpuArch.o \
$O/Delta.o \
$O/HuffEnc.o \
$O/LzFind.o \
$O/Lzma2Dec.o \
$O/Lzma2DecMt.o \
$O/Lzma2Enc.o \
$O/LzmaDec.o \
$O/LzmaEnc.o \
$O/MtCoder.o \
$O/MtDec.o \
$O/Ppmd7.o \
$O/Ppmd7Dec.o \
$O/Ppmd7Enc.o \
$O/Ppmd8.o \
$O/Ppmd8Dec.o \
$O/Ppmd8Enc.o \
$O/Sort.o \
$O/Xz.o \
$O/XzDec.o \
$O/XzEnc.o \
$O/XzIn.o \
$O/XzCrc64.o \
$O/XzCrc64Opt.o \
$O/7zCrc.o \
$O/7zCrcOpt.o \
$O/Aes.o \
$O/AesOpt.o \
$O/Sha256.o \
$O/Sha256Opt.o \
$O/Sha1.o \
$O/Sha1Opt.o \
OBJS = \
$(LZMA_DEC_OPT_OBJS) \
$(C_OBJS) \
$(MT_OBJS) \
$(SYS_OBJS) \
$(COMMON_OBJS) \
$(WIN_OBJS) \
$(COMPRESS_OBJS) \
$(CRYPTO_OBJS) \
$(7ZIP_COMMON_OBJS) \
$(AR_OBJS) \
$(AR_COMMON_OBJS) \
$(7Z_OBJS) \
$(CAB_OBJS) \
$(TAR_OBJS) \
$(ZIP_OBJS) \
$(UI_COMMON_OBJS) \
$(CONSOLE_OBJS) \
include ../../7zip_gcc.mak

View File

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

View File

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

View File

@@ -0,0 +1,29 @@
PROG = 7zz.exe
# USE_C_AES = 1
# USE_C_SHA = 1
CFLAGS = $(CFLAGS) -DPROG_VARIANT_Z
!include "../Format7zF/Arc.mak"
!include "../../UI/Console/Console.mak"
COMMON_OBJS = $(COMMON_OBJS) \
$O\CommandLineParser.obj \
$O\ListFileUtils.obj \
$O\StdInStream.obj \
$O\StdOutStream.obj \
WIN_OBJS = $(WIN_OBJS) \
$O\DLL.obj \
$O\ErrorMsg.obj \
$O\FileLink.obj \
$O\FileSystem.obj \
$O\MemoryLock.obj \
$O\PropVariantConv.obj \
$O\Registry.obj \
$O\SystemInfo.obj \
7ZIP_COMMON_OBJS = $(7ZIP_COMMON_OBJS) \
$O\FilePathAutoRename.obj \
$O\FileStreams.obj \
!include "../../7zip.mak"

View File

@@ -0,0 +1,100 @@
PROG = 7zz
# IS_X64 = 1
# USE_ASM = 1
# ST_MODE = 1
CONSOLE_VARIANT_FLAGS=-DPROG_VARIANT_Z
include ../Format7zF/Arc_gcc.mak
ifdef SystemDrive
LOCAL_FLAGS_SYS = \
-D_7ZIP_LARGE_PAGES \
-DWIN_LONG_PATH \
-DSUPPORT_DEVICE_FILE \
SYS_OBJS = \
$O/FileSystem.o \
$O/Registry.o \
$O/MemoryLock.o \
$O/DLL.o \
$O/DllSecur.o \
$O/resource.o \
else
SYS_OBJS = \
$O/MyWindows.o \
endif
LOCAL_FLAGS = \
$(LOCAL_FLAGS_SYS) \
$(LOCAL_FLAGS_ST) \
UI_COMMON_OBJS = \
$O/ArchiveCommandLine.o \
$O/ArchiveExtractCallback.o \
$O/ArchiveOpenCallback.o \
$O/Bench.o \
$O/DefaultName.o \
$O/EnumDirItems.o \
$O/Extract.o \
$O/ExtractingFilePath.o \
$O/HashCalc.o \
$O/LoadCodecs.o \
$O/OpenArchive.o \
$O/PropIDUtils.o \
$O/SetProperties.o \
$O/SortUtils.o \
$O/TempFiles.o \
$O/Update.o \
$O/UpdateAction.o \
$O/UpdateCallback.o \
$O/UpdatePair.o \
$O/UpdateProduce.o \
CONSOLE_OBJS = \
$O/BenchCon.o \
$O/ConsoleClose.o \
$O/ExtractCallbackConsole.o \
$O/HashCon.o \
$O/List.o \
$O/Main.o \
$O/MainAr.o \
$O/OpenCallbackConsole.o \
$O/PercentPrinter.o \
$O/UpdateCallbackConsole.o \
$O/UserInputUtils.o \
COMMON_OBJS_2 = \
$O/CommandLineParser.o \
$O/ListFileUtils.o \
$O/StdInStream.o \
$O/StdOutStream.o \
WIN_OBJS_2 = \
$O/ErrorMsg.o \
$O/FileLink.o \
$O/PropVariantConv.o \
$O/SystemInfo.o \
7ZIP_COMMON_OBJS_2 = \
$O/FilePathAutoRename.o \
$O/FileStreams.o \
OBJS = \
$(ARC_OBJS) \
$(SYS_OBJS) \
$(COMMON_OBJS_2) \
$(WIN_OBJS_2) \
$(7ZIP_COMMON_OBJS_2) \
$(UI_COMMON_OBJS) \
$(CONSOLE_OBJS) \
include ../../7zip_gcc.mak

View File

@@ -0,0 +1,7 @@
#include "../../MyVersionInfo.rc"
MY_VERSION_INFO_APP("7-Zip Standalone 2 Console", "7zz")
#ifndef UNDER_CE
1 24 MOVEABLE PURE "../../UI/Console/Console.manifest"
#endif

View File

@@ -44,7 +44,7 @@ RSC=rc.exe
# 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 /Gr /MT /W3 /GX /O1 /I "..\..\..\\" /D "NDEBUG" /D "_MBCS" /D "WIN32" /D "_CONSOLE" /D "_7ZIP_LARGE_PAGES" /D "SUPPORT_DEVICE_FILE" /FAc /Yu"StdAfx.h" /FD /c
# ADD CPP /nologo /Gr /MT /W4 /WX /GX /O1 /I "..\..\..\\" /D "NDEBUG" /D "_MBCS" /D "WIN32" /D "_CONSOLE" /D "_7ZIP_LARGE_PAGES" /D "SUPPORT_DEVICE_FILE" /FAc /Yu"StdAfx.h" /FD /c
# ADD BASE RSC /l 0x419 /d "NDEBUG"
# ADD RSC /l 0x419 /d "NDEBUG"
BSC32=bscmake.exe
@@ -69,7 +69,7 @@ LINK32=link.exe
# 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 /Gr /MDd /W3 /Gm /GX /ZI /Od /I "..\..\..\\" /D "_DEBUG" /D "_MBCS" /D "WIN32" /D "_CONSOLE" /D "_7ZIP_LARGE_PAGES" /D "SUPPORT_DEVICE_FILE" /Yu"StdAfx.h" /FD /GZ /c
# ADD CPP /nologo /Gr /MDd /W4 /WX /Gm /GX /ZI /Od /I "..\..\..\\" /D "_DEBUG" /D "_MBCS" /D "WIN32" /D "_CONSOLE" /D "_7ZIP_LARGE_PAGES" /D "SUPPORT_DEVICE_FILE" /Yu"StdAfx.h" /FD /GZ /c
# ADD BASE RSC /l 0x419 /d "_DEBUG"
# ADD RSC /l 0x419 /d "_DEBUG"
BSC32=bscmake.exe
@@ -342,6 +342,14 @@ SOURCE=..\..\..\Common\MyVector.h
# End Source File
# Begin Source File
SOURCE=..\..\..\Common\MyWindows.cpp
# End Source File
# Begin Source File
SOURCE=..\..\..\Common\MyWindows.h
# End Source File
# Begin Source File
SOURCE=..\..\..\Common\NewHandler.cpp
# End Source File
# Begin Source File
@@ -350,6 +358,10 @@ SOURCE=..\..\..\Common\NewHandler.h
# End Source File
# Begin Source File
SOURCE=..\..\..\Common\Sha256Prepare.cpp
# End Source File
# Begin Source File
SOURCE=..\..\..\Common\Sha256Reg.cpp
# End Source File
# Begin Source File
@@ -518,6 +530,14 @@ SOURCE=..\..\..\Windows\PropVariantConv.h
# End Source File
# Begin Source File
SOURCE=..\..\..\Windows\Registry.cpp
# End Source File
# Begin Source File
SOURCE=..\..\..\Windows\Registry.h
# End Source File
# Begin Source File
SOURCE=..\..\..\Windows\Synchronization.cpp
# End Source File
# Begin Source File
@@ -534,6 +554,14 @@ SOURCE=..\..\..\Windows\System.h
# End Source File
# Begin Source File
SOURCE=..\..\..\Windows\SystemInfo.cpp
# End Source File
# Begin Source File
SOURCE=..\..\..\Windows\SystemInfo.h
# End Source File
# Begin Source File
SOURCE=..\..\..\Windows\Thread.h
# End Source File
# Begin Source File
@@ -1233,34 +1261,6 @@ SOURCE=..\..\PropID.h
# PROP Default_Filter ""
# Begin Source File
SOURCE=..\..\..\..\C\Sha256.c
!IF "$(CFG)" == "Alone - Win32 Release"
# ADD CPP /O2
# SUBTRACT CPP /YX /Yc /Yu
!ELSEIF "$(CFG)" == "Alone - Win32 Debug"
# SUBTRACT CPP /YX /Yc /Yu
!ELSEIF "$(CFG)" == "Alone - Win32 ReleaseU"
# SUBTRACT CPP /YX /Yc /Yu
!ELSEIF "$(CFG)" == "Alone - Win32 DebugU"
# SUBTRACT CPP /YX /Yc /Yu
!ENDIF
# End Source File
# Begin Source File
SOURCE=..\..\..\..\C\Sha256.h
# End Source File
# Begin Source File
SOURCE=..\..\..\..\C\Xz.c
!IF "$(CFG)" == "Alone - Win32 Release"
@@ -1457,6 +1457,10 @@ SOURCE=..\..\..\..\C\7zStream.c
# End Source File
# Begin Source File
SOURCE=..\..\..\..\C\7zTypes.h
# End Source File
# Begin Source File
SOURCE=..\..\..\..\C\Aes.c
!IF "$(CFG)" == "Alone - Win32 Release"
@@ -1862,6 +1866,39 @@ SOURCE=..\..\..\..\C\MtDec.h
# End Source File
# Begin Source File
SOURCE=..\..\..\..\C\Sha256.c
!IF "$(CFG)" == "Alone - Win32 Release"
# ADD CPP /O2
# SUBTRACT CPP /YX /Yc /Yu
!ELSEIF "$(CFG)" == "Alone - Win32 Debug"
# SUBTRACT CPP /YX /Yc /Yu
!ELSEIF "$(CFG)" == "Alone - Win32 ReleaseU"
# SUBTRACT CPP /YX /Yc /Yu
!ELSEIF "$(CFG)" == "Alone - Win32 DebugU"
# SUBTRACT CPP /YX /Yc /Yu
!ENDIF
# End Source File
# Begin Source File
SOURCE=..\..\..\..\C\Sha256.h
# End Source File
# Begin Source File
SOURCE=..\..\..\..\C\Sha256Opt.c
# SUBTRACT CPP /YX /Yc /Yu
# End Source File
# Begin Source File
SOURCE=..\..\..\..\C\Threads.c
# SUBTRACT CPP /YX /Yc /Yu
# End Source File
@@ -1899,6 +1936,10 @@ SOURCE=..\..\Crypto\MyAes.h
# End Source File
# Begin Source File
SOURCE=..\..\Crypto\MyAesReg.cpp
# End Source File
# Begin Source File
SOURCE=..\..\Crypto\RandGen.cpp
# End Source File
# Begin Source File

View File

@@ -1,6 +1,8 @@
PROG = 7zr.exe
CFLAGS = $(CFLAGS) \
-DPROG_VARIANT_R \
# USE_C_AES = 1
CFLAGS = $(CFLAGS) -DPROG_VARIANT_R
COMMON_OBJS = \
$O\CommandLineParser.obj \
@@ -33,8 +35,10 @@ WIN_OBJS = \
$O\MemoryLock.obj \
$O\PropVariant.obj \
$O\PropVariantConv.obj \
$O\Registry.obj \
$O\Synchronization.obj \
$O\System.obj \
$O\SystemInfo.obj \
$O\TimeUtils.obj \
7ZIP_COMMON_OBJS = \
@@ -136,7 +140,6 @@ C_OBJS = \
$O\LzmaEnc.obj \
$O\MtCoder.obj \
$O\MtDec.obj \
$O\Sha256.obj \
$O\Sort.obj \
$O\Threads.obj \
$O\Xz.obj \
@@ -150,5 +153,6 @@ C_OBJS = \
!include "../../Crc.mak"
!include "../../Crc64.mak"
!include "../../LzmaDec.mak"
!include "../../Sha256.mak"
!include "../../7zip.mak"

View File

@@ -0,0 +1,266 @@
PROG = 7zr
CONSOLE_VARIANT_FLAGS=-DPROG_VARIANT_R
# IS_X64 = 1
# USE_ASM = 1
# ST_MODE = 1
include ../../LzmaDec_gcc.mak
LOCAL_FLAGS_ST =
MT_OBJS =
ifdef ST_MODE
LOCAL_FLAGS_ST = -D_7ZIP_ST
ifdef SystemDrive
MT_OBJS = \
$O/Threads.o \
endif
else
MT_OBJS = \
$O/LzFindMt.o \
$O/StreamBinder.o \
$O/Synchronization.o \
$O/VirtThread.o \
$O/Threads.o \
endif
LOCAL_FLAGS_SYS =
ifdef SystemDrive
LOCAL_FLAGS_SYS = \
-D_7ZIP_LARGE_PAGES \
-DWIN_LONG_PATH \
-DSUPPORT_DEVICE_FILE \
SYS_OBJS = \
$O/FileSystem.o \
$O/Registry.o \
$O/MemoryLock.o \
$O/DLL.o \
$O/DllSecur.o \
$O/resource.o \
else
SYS_OBJS = \
$O/MyWindows.o \
endif
LOCAL_FLAGS = \
$(LOCAL_FLAGS_ST) \
$(LOCAL_FLAGS_SYS) \
# -D_LZMA_PROB32
CONSOLE_OBJS = \
$O/BenchCon.o \
$O/ConsoleClose.o \
$O/ExtractCallbackConsole.o \
$O/HashCon.o \
$O/List.o \
$O/Main.o \
$O/MainAr.o \
$O/OpenCallbackConsole.o \
$O/PercentPrinter.o \
$O/UpdateCallbackConsole.o \
$O/UserInputUtils.o \
UI_COMMON_OBJS = \
$O/ArchiveCommandLine.o \
$O/ArchiveExtractCallback.o \
$O/ArchiveOpenCallback.o \
$O/Bench.o \
$O/DefaultName.o \
$O/EnumDirItems.o \
$O/Extract.o \
$O/ExtractingFilePath.o \
$O/HashCalc.o \
$O/LoadCodecs.o \
$O/OpenArchive.o \
$O/PropIDUtils.o \
$O/SetProperties.o \
$O/SortUtils.o \
$O/TempFiles.o \
$O/Update.o \
$O/UpdateAction.o \
$O/UpdateCallback.o \
$O/UpdatePair.o \
$O/UpdateProduce.o \
COMMON_OBJS = \
$O/CommandLineParser.o \
$O/CRC.o \
$O/CrcReg.o \
$O/IntToString.o \
$O/ListFileUtils.o \
$O/MyString.o \
$O/MyVector.o \
$O/NewHandler.o \
$O/Sha256Prepare.o \
$O/Sha256Reg.o \
$O/StringConvert.o \
$O/StringToInt.o \
$O/StdInStream.o \
$O/StdOutStream.o \
$O/UTFConvert.o \
$O/Wildcard.o \
$O/XzCrc64Init.o \
$O/XzCrc64Reg.o \
WIN_OBJS = \
$O/ErrorMsg.o \
$O/FileDir.o \
$O/FileFind.o \
$O/FileIO.o \
$O/FileLink.o \
$O/FileName.o \
$O/PropVariant.o \
$O/PropVariantConv.o \
$O/System.o \
$O/SystemInfo.o \
$O/TimeUtils.o \
7ZIP_COMMON_OBJS = \
$O/CreateCoder.o \
$O/CWrappers.o \
$O/FilePathAutoRename.o \
$O/FileStreams.o \
$O/InBuffer.o \
$O/InOutTempBuffer.o \
$O/FilterCoder.o \
$O/LimitedStreams.o \
$O/MethodId.o \
$O/MethodProps.o \
$O/OffsetStream.o \
$O/OutBuffer.o \
$O/ProgressUtils.o \
$O/PropId.o \
$O/StreamObjects.o \
$O/StreamUtils.o \
$O/UniqBlocks.o \
AR_OBJS = \
$O/LzmaHandler.o \
$O/SplitHandler.o \
$O/XzHandler.o \
AR_COMMON_OBJS = \
$O/CoderMixer2.o \
$O/DummyOutStream.o \
$O/HandlerOut.o \
$O/InStreamWithCRC.o \
$O/ItemNameUtils.o \
$O/MultiStream.o \
$O/OutStreamWithCRC.o \
$O/ParseProperties.o \
7Z_OBJS = \
$O/7zCompressionMode.o \
$O/7zDecode.o \
$O/7zEncode.o \
$O/7zExtract.o \
$O/7zFolderInStream.o \
$O/7zHandler.o \
$O/7zHandlerOut.o \
$O/7zHeader.o \
$O/7zIn.o \
$O/7zOut.o \
$O/7zProperties.o \
$O/7zRegister.o \
$O/7zSpecStream.o \
$O/7zUpdate.o \
COMPRESS_OBJS = \
$O/Bcj2Coder.o \
$O/Bcj2Register.o \
$O/BcjCoder.o \
$O/BcjRegister.o \
$O/BranchMisc.o \
$O/BranchRegister.o \
$O/ByteSwap.o \
$O/CopyCoder.o \
$O/CopyRegister.o \
$O/DeltaFilter.o \
$O/Lzma2Decoder.o \
$O/Lzma2Encoder.o \
$O/Lzma2Register.o \
$O/LzmaDecoder.o \
$O/LzmaEncoder.o \
$O/LzmaRegister.o \
$O/XzDecoder.o \
$O/XzEncoder.o \
CRYPTO_OBJS = \
$O/7zAes.o \
$O/7zAesRegister.o \
$O/MyAes.o \
$O/MyAesReg.o \
$O/RandGen.o \
C_OBJS = \
$O/7zStream.o \
$O/Alloc.o \
$O/Bcj2.o \
$O/Bcj2Enc.o \
$O/Bra.o \
$O/Bra86.o \
$O/BraIA64.o \
$O/CpuArch.o \
$O/Delta.o \
$O/LzFind.o \
$O/Lzma2Dec.o \
$O/Lzma2DecMt.o \
$O/Lzma2Enc.o \
$O/LzmaDec.o \
$O/LzmaEnc.o \
$O/MtCoder.o \
$O/MtDec.o \
$O/Sha256.o \
$O/Sha256Opt.o \
$O/Sort.o \
$O/Xz.o \
$O/XzDec.o \
$O/XzEnc.o \
$O/XzIn.o \
$O/XzCrc64.o \
$O/XzCrc64Opt.o \
$O/7zCrc.o \
$O/7zCrcOpt.o \
$O/Aes.o \
$O/AesOpt.o \
OBJS = \
$(LZMA_DEC_OPT_OBJS) \
$(C_OBJS) \
$(MT_OBJS) \
$(SYS_OBJS) \
$(COMMON_OBJS) \
$(WIN_OBJS) \
$(COMPRESS_OBJS) \
$(CRYPTO_OBJS) \
$(7ZIP_COMMON_OBJS) \
$(AR_OBJS) \
$(AR_COMMON_OBJS) \
$(7Z_OBJS) \
$(UI_COMMON_OBJS) \
$(CONSOLE_OBJS) \
include ../../7zip_gcc.mak

View File

@@ -55,7 +55,7 @@ BSC32=bscmake.exe
# 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 comctl32.lib Mpr.lib htmlhelp.lib Urlmon.lib /nologo /subsystem:windows /machine:I386 /out:"C:\Program Files\7-ZIP\7zFM.exe" /opt:NOWIN98
# 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 Mpr.lib htmlhelp.lib Urlmon.lib /nologo /subsystem:windows /machine:I386 /out:"C:\Util\7zFM.exe" /opt:NOWIN98
# SUBTRACT LINK32 /pdb:none
!ELSEIF "$(CFG)" == "FM - Win32 Debug"
@@ -82,7 +82,7 @@ BSC32=bscmake.exe
# 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 Mpr.lib htmlhelp.lib Urlmon.lib /nologo /subsystem:windows /debug /machine:I386 /out:"C:\Program Files\7-ZIP\7zFM.exe" /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 Mpr.lib htmlhelp.lib Urlmon.lib /nologo /subsystem:windows /debug /machine:I386 /out:"C:\Util\7zFM.exe" /pdbtype:sept
!ELSEIF "$(CFG)" == "FM - Win32 ReleaseU"
@@ -109,7 +109,7 @@ BSC32=bscmake.exe
# 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 comctl32.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 comctl32.lib Mpr.lib htmlhelp.lib Urlmon.lib /nologo /subsystem:windows /machine:I386 /out:"C:\Program Files\7-ZIP\7zFM.exe" /opt:NOWIN98
# 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 Mpr.lib htmlhelp.lib Urlmon.lib /nologo /subsystem:windows /machine:I386 /out:"C:\Util\7zFM.exe" /opt:NOWIN98
# SUBTRACT LINK32 /pdb:none
!ELSEIF "$(CFG)" == "FM - Win32 DebugU"
@@ -137,7 +137,7 @@ BSC32=bscmake.exe
# 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 comctl32.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 Mpr.lib htmlhelp.lib Urlmon.lib /nologo /subsystem:windows /debug /machine:I386 /out:"C:\Program Files\7-ZIP\7zFM.exe" /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 Mpr.lib htmlhelp.lib Urlmon.lib /nologo /subsystem:windows /debug /machine:I386 /out:"C:\Util\7zFM.exe" /pdbtype:sept
!ENDIF
@@ -579,6 +579,10 @@ SOURCE=..\..\UI\FileManager\PanelSort.cpp
SOURCE=..\..\UI\FileManager\PanelSplitFile.cpp
# End Source File
# Begin Source File
SOURCE=..\..\UI\FileManager\VerCtrl.cpp
# End Source File
# End Group
# Begin Group "Dialog"
@@ -1103,6 +1107,11 @@ SOURCE=..\..\..\..\C\Sha256.h
# End Source File
# Begin Source File
SOURCE=..\..\..\..\C\Sha256Opt.c
# SUBTRACT CPP /YX /Yc /Yu
# End Source File
# Begin Source File
SOURCE=..\..\..\..\C\Sort.c
# SUBTRACT CPP /YX /Yc /Yu
# End Source File
@@ -1405,6 +1414,14 @@ SOURCE=..\..\..\Windows\System.h
# End Source File
# Begin Source File
SOURCE=..\..\..\Windows\SystemInfo.cpp
# End Source File
# Begin Source File
SOURCE=..\..\..\Windows\SystemInfo.h
# End Source File
# Begin Source File
SOURCE=..\..\..\Windows\Thread.h
# End Source File
# Begin Source File
@@ -1537,7 +1554,7 @@ SOURCE=..\..\..\Common\Random.h
# End Source File
# Begin Source File
SOURCE=..\..\..\Common\Sha256Reg.cpp
SOURCE=..\..\..\Common\Sha256Prepare.cpp
# End Source File
# Begin Source File

View File

@@ -9,8 +9,8 @@
#include "../../../Common/Common.h"
#include <commctrl.h>
#include <CommCtrl.h>
#include <ShlObj.h>
#include <shlwapi.h>
#include <Shlwapi.h>
#endif

View File

@@ -23,6 +23,7 @@ WIN_OBJS = $(WIN_OBJS) \
$O\PropVariantConv.obj \
$O\Registry.obj \
$O\ResourceString.obj \
$O\SystemInfo.obj \
$O\Shell.obj \
$O\Window.obj \

View File

@@ -3,5 +3,5 @@
STRINGTABLE
BEGIN
100 "7z zip rar 001 cab iso xz txz lzma tar cpio bz2 bzip2 tbz2 tbz gz gzip tgz tpz z taz lz tlz lz4 tlz4 lz5 tlz5 lzh lha rpm deb arj vhd wim swm fat ntfs dmg hfs xar squashfs zst"
100 "7z zip rar 001 cab iso xz txz lzma tar cpio bz2 bzip2 tbz2 tbz gz gzip tgz tpz z taz lz tlz lz4 tlz4 lz5 tlz5 lzh lha rpm deb arj vhd wim swm esd fat ntfs dmg hfs xar squashfs zst"
END

View File

@@ -132,13 +132,13 @@ C_OBJS = \
$O\Ppmd7.obj \
$O\Ppmd7Dec.obj \
$O\Ppmd7Enc.obj \
$O\Sha256.obj \
$O\Sort.obj \
$O\Threads.obj \
!include "../../Aes.mak"
!include "../../Crc.mak"
!include "../../LzmaDec.mak"
!include "../../Sha256.mak"
COMPRESS_OBJS = $(COMPRESS_OBJS) \
$O\BrotliDecoder.obj \

View File

@@ -103,7 +103,6 @@ C_OBJS = \
$O\MtDec.obj \
$O\Ppmd7.obj \
$O\Ppmd7Dec.obj \
$O\Sha256.obj \
$O\Threads.obj \
COMPRESS_OBJS = $(COMPRESS_OBJS) \
@@ -213,5 +212,6 @@ ZSTDMT_OBJS = \
!include "../../Aes.mak"
!include "../../Crc.mak"
!include "../../LzmaDec.mak"
!include "../../Sha256.mak"
!include "../../7zip.mak"

View File

@@ -63,6 +63,7 @@ AR_OBJS = \
$O\ApmHandler.obj \
$O\ArHandler.obj \
$O\ArjHandler.obj \
$O\Base64Handler.obj \
$O\Bz2Handler.obj \
$O\ComHandler.obj \
$O\CpioHandler.obj \
@@ -289,12 +290,11 @@ C_OBJS = \
$O\MtDec.obj \
$O\Ppmd7.obj \
$O\Ppmd7Dec.obj \
$O\Ppmd7aDec.obj \
$O\Ppmd7Enc.obj \
$O\Ppmd8.obj \
$O\Ppmd8Dec.obj \
$O\Ppmd8Enc.obj \
$O\Sha1.obj \
$O\Sha256.obj \
$O\Sort.obj \
$O\Threads.obj \
$O\Xz.obj \
@@ -306,3 +306,5 @@ C_OBJS = \
!include "../../Crc.mak"
!include "../../Crc64.mak"
!include "../../LzmaDec.mak"
!include "../../Sha1.mak"
!include "../../Sha256.mak"

View File

@@ -0,0 +1,345 @@
include ../../LzmaDec_gcc.mak
LOCAL_FLAGS_ST =
MT_OBJS =
ifdef ST_MODE
LOCAL_FLAGS_ST = -D_7ZIP_ST
ifdef SystemDrive
MT_OBJS = \
$O/Threads.o \
endif
else
MT_OBJS = \
$O/LzFindMt.o \
$O/StreamBinder.o \
$O/Synchronization.o \
$O/VirtThread.o \
$O/MemBlocks.o \
$O/OutMemStream.o \
$O/ProgressMt.o \
$O/Threads.o \
endif
COMMON_OBJS = \
$O/CRC.o \
$O/CrcReg.o \
$O/DynLimBuf.o \
$O/IntToString.o \
$O/MyMap.o \
$O/MyString.o \
$O/MyVector.o \
$O/MyXml.o \
$O/NewHandler.o \
$O/Sha1Prepare.o \
$O/Sha1Reg.o \
$O/Sha256Prepare.o \
$O/Sha256Reg.o \
$O/StringConvert.o \
$O/StringToInt.o \
$O/UTFConvert.o \
$O/Wildcard.o \
$O/XzCrc64Init.o \
$O/XzCrc64Reg.o \
WIN_OBJS = \
$O/FileDir.o \
$O/FileFind.o \
$O/FileIO.o \
$O/FileName.o \
$O/PropVariant.o \
$O/PropVariantUtils.o \
$O/System.o \
$O/TimeUtils.o \
7ZIP_COMMON_OBJS = \
$O/CreateCoder.o \
$O/CWrappers.o \
$O/InBuffer.o \
$O/InOutTempBuffer.o \
$O/FilterCoder.o \
$O/LimitedStreams.o \
$O/LockedStream.o \
$O/MethodId.o \
$O/MethodProps.o \
$O/OffsetStream.o \
$O/OutBuffer.o \
$O/ProgressUtils.o \
$O/PropId.o \
$O/StreamObjects.o \
$O/StreamUtils.o \
$O/UniqBlocks.o \
AR_OBJS = \
$O/ApmHandler.o \
$O/ArHandler.o \
$O/ArjHandler.o \
$O/Base64Handler.o \
$O/Bz2Handler.o \
$O/ComHandler.o \
$O/CpioHandler.o \
$O/CramfsHandler.o \
$O/DeflateProps.o \
$O/DmgHandler.o \
$O/ElfHandler.o \
$O/ExtHandler.o \
$O/FatHandler.o \
$O/FlvHandler.o \
$O/GzHandler.o \
$O/GptHandler.o \
$O/HandlerCont.o \
$O/HfsHandler.o \
$O/IhexHandler.o \
$O/LzhHandler.o \
$O/LzmaHandler.o \
$O/MachoHandler.o \
$O/MbrHandler.o \
$O/MslzHandler.o \
$O/MubHandler.o \
$O/NtfsHandler.o \
$O/PeHandler.o \
$O/PpmdHandler.o \
$O/QcowHandler.o \
$O/RpmHandler.o \
$O/SplitHandler.o \
$O/SquashfsHandler.o \
$O/SwfHandler.o \
$O/UefiHandler.o \
$O/VdiHandler.o \
$O/VhdHandler.o \
$O/VmdkHandler.o \
$O/XarHandler.o \
$O/XzHandler.o \
$O/ZHandler.o \
AR_COMMON_OBJS = \
$O/CoderMixer2.o \
$O/DummyOutStream.o \
$O/FindSignature.o \
$O/InStreamWithCRC.o \
$O/ItemNameUtils.o \
$O/MultiStream.o \
$O/OutStreamWithCRC.o \
$O/OutStreamWithSha1.o \
$O/HandlerOut.o \
$O/ParseProperties.o \
7Z_OBJS = \
$O/7zCompressionMode.o \
$O/7zDecode.o \
$O/7zEncode.o \
$O/7zExtract.o \
$O/7zFolderInStream.o \
$O/7zHandler.o \
$O/7zHandlerOut.o \
$O/7zHeader.o \
$O/7zIn.o \
$O/7zOut.o \
$O/7zProperties.o \
$O/7zSpecStream.o \
$O/7zUpdate.o \
$O/7zRegister.o \
CAB_OBJS = \
$O/CabBlockInStream.o \
$O/CabHandler.o \
$O/CabHeader.o \
$O/CabIn.o \
$O/CabRegister.o \
CHM_OBJS = \
$O/ChmHandler.o \
$O/ChmIn.o \
ISO_OBJS = \
$O/IsoHandler.o \
$O/IsoHeader.o \
$O/IsoIn.o \
$O/IsoRegister.o \
NSIS_OBJS = \
$O/NsisDecode.o \
$O/NsisHandler.o \
$O/NsisIn.o \
$O/NsisRegister.o \
RAR_OBJS = \
$O/RarHandler.o \
$O/Rar5Handler.o \
TAR_OBJS = \
$O/TarHandler.o \
$O/TarHandlerOut.o \
$O/TarHeader.o \
$O/TarIn.o \
$O/TarOut.o \
$O/TarUpdate.o \
$O/TarRegister.o \
UDF_OBJS = \
$O/UdfHandler.o \
$O/UdfIn.o \
WIM_OBJS = \
$O/WimHandler.o \
$O/WimHandlerOut.o \
$O/WimIn.o \
$O/WimRegister.o \
ZIP_OBJS = \
$O/ZipAddCommon.o \
$O/ZipHandler.o \
$O/ZipHandlerOut.o \
$O/ZipIn.o \
$O/ZipItem.o \
$O/ZipOut.o \
$O/ZipUpdate.o \
$O/ZipRegister.o \
COMPRESS_OBJS = \
$O/Bcj2Coder.o \
$O/Bcj2Register.o \
$O/BcjCoder.o \
$O/BcjRegister.o \
$O/BitlDecoder.o \
$O/BranchMisc.o \
$O/BranchRegister.o \
$O/ByteSwap.o \
$O/BZip2Crc.o \
$O/BZip2Decoder.o \
$O/BZip2Encoder.o \
$O/BZip2Register.o \
$O/CopyCoder.o \
$O/CopyRegister.o \
$O/Deflate64Register.o \
$O/DeflateDecoder.o \
$O/DeflateEncoder.o \
$O/DeflateRegister.o \
$O/DeltaFilter.o \
$O/ImplodeDecoder.o \
$O/LzfseDecoder.o \
$O/LzhDecoder.o \
$O/Lzma2Decoder.o \
$O/Lzma2Encoder.o \
$O/Lzma2Register.o \
$O/LzmaDecoder.o \
$O/LzmaEncoder.o \
$O/LzmaRegister.o \
$O/LzmsDecoder.o \
$O/LzOutWindow.o \
$O/LzxDecoder.o \
$O/PpmdDecoder.o \
$O/PpmdEncoder.o \
$O/PpmdRegister.o \
$O/PpmdZip.o \
$O/QuantumDecoder.o \
$O/Rar1Decoder.o \
$O/Rar2Decoder.o \
$O/Rar3Decoder.o \
$O/Rar3Vm.o \
$O/Rar5Decoder.o \
$O/RarCodecsRegister.o \
$O/ShrinkDecoder.o \
$O/XpressDecoder.o \
$O/XzDecoder.o \
$O/XzEncoder.o \
$O/ZlibDecoder.o \
$O/ZlibEncoder.o \
$O/ZDecoder.o \
CRYPTO_OBJS = \
$O/7zAes.o \
$O/7zAesRegister.o \
$O/HmacSha1.o \
$O/HmacSha256.o \
$O/MyAes.o \
$O/MyAesReg.o \
$O/Pbkdf2HmacSha1.o \
$O/RandGen.o \
$O/Rar20Crypto.o \
$O/Rar5Aes.o \
$O/RarAes.o \
$O/WzAes.o \
$O/ZipCrypto.o \
$O/ZipStrong.o \
C_OBJS = \
$O/7zBuf2.o \
$O/7zStream.o \
$O/Alloc.o \
$O/Bcj2.o \
$O/Bcj2Enc.o \
$O/Blake2s.o \
$O/Bra.o \
$O/Bra86.o \
$O/BraIA64.o \
$O/BwtSort.o \
$O/CpuArch.o \
$O/Delta.o \
$O/HuffEnc.o \
$O/LzFind.o \
$O/Lzma2Dec.o \
$O/Lzma2DecMt.o \
$O/Lzma2Enc.o \
$O/LzmaDec.o \
$O/LzmaEnc.o \
$O/MtCoder.o \
$O/MtDec.o \
$O/Ppmd7.o \
$O/Ppmd7Dec.o \
$O/Ppmd7aDec.o \
$O/Ppmd7Enc.o \
$O/Ppmd8.o \
$O/Ppmd8Dec.o \
$O/Ppmd8Enc.o \
$O/Sort.o \
$O/Xz.o \
$O/XzDec.o \
$O/XzEnc.o \
$O/XzIn.o \
$O/XzCrc64.o \
$O/XzCrc64Opt.o \
$O/7zCrc.o \
$O/7zCrcOpt.o \
$O/Aes.o \
$O/AesOpt.o \
$O/Sha256.o \
$O/Sha256Opt.o \
$O/Sha1.o \
$O/Sha1Opt.o \
ARC_OBJS = \
$(LZMA_DEC_OPT_OBJS) \
$(C_OBJS) \
$(MT_OBJS) \
$(COMMON_OBJS) \
$(WIN_OBJS) \
$(AR_OBJS) \
$(AR_COMMON_OBJS) \
$(7Z_OBJS) \
$(CAB_OBJS) \
$(CHM_OBJS) \
$(COM_OBJS) \
$(ISO_OBJS) \
$(NSIS_OBJS) \
$(RAR_OBJS) \
$(TAR_OBJS) \
$(UDF_OBJS) \
$(WIM_OBJS) \
$(ZIP_OBJS) \
$(COMPRESS_OBJS) \
$(CRYPTO_OBJS) \
$(7ZIP_COMMON_OBJS) \

View File

@@ -53,7 +53,7 @@ BSC32=bscmake.exe
# 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\7z.dll" /opt:NOWIN98
# 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:\Util\7z.dll" /opt:NOWIN98
# SUBTRACT LINK32 /pdb:none /debug
!ELSEIF "$(CFG)" == "7z - Win32 Debug"
@@ -80,7 +80,7 @@ BSC32=bscmake.exe
# 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\7z.dll" /pdbtype:sept /ignore:4033
# 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:\Util\7z.dll" /pdbtype:sept /ignore:4033
# SUBTRACT LINK32 /pdb:none
!ENDIF
@@ -347,10 +347,18 @@ SOURCE=..\..\..\Common\NewHandler.h
# End Source File
# Begin Source File
SOURCE=..\..\..\Common\Sha1Prepare.cpp
# End Source File
# Begin Source File
SOURCE=..\..\..\Common\Sha1Reg.cpp
# End Source File
# Begin Source File
SOURCE=..\..\..\Common\Sha256Prepare.cpp
# End Source File
# Begin Source File
SOURCE=..\..\..\Common\Sha256Reg.cpp
# End Source File
# Begin Source File
@@ -1060,6 +1068,16 @@ SOURCE=..\..\Compress\ZDecoder.h
# Begin Source File
SOURCE=..\..\Crypto\7zAes.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
@@ -1068,6 +1086,16 @@ SOURCE=..\..\Crypto\7zAes.h
# Begin Source File
SOURCE=..\..\Crypto\7zAesRegister.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
@@ -1090,6 +1118,16 @@ SOURCE=..\..\Crypto\HmacSha1.h
# Begin Source File
SOURCE=..\..\Crypto\HmacSha256.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
@@ -1098,6 +1136,16 @@ SOURCE=..\..\Crypto\HmacSha256.h
# Begin Source File
SOURCE=..\..\Crypto\MyAes.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
@@ -1106,6 +1154,16 @@ SOURCE=..\..\Crypto\MyAes.h
# Begin Source File
SOURCE=..\..\Crypto\MyAesReg.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
@@ -1164,6 +1222,16 @@ SOURCE=..\..\Crypto\Rar20Crypto.h
# Begin Source File
SOURCE=..\..\Crypto\Rar5Aes.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
@@ -1172,6 +1240,16 @@ SOURCE=..\..\Crypto\Rar5Aes.h
# Begin Source File
SOURCE=..\..\Crypto\RarAes.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
@@ -1184,6 +1262,16 @@ SOURCE=..\..\Crypto\Sha1Cls.h
# Begin Source File
SOURCE=..\..\Crypto\WzAes.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
@@ -1938,6 +2026,22 @@ SOURCE=..\..\..\..\C\Ppmd7.h
# End Source File
# Begin Source File
SOURCE=..\..\..\..\C\Ppmd7aDec.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=..\..\..\..\C\Ppmd7Dec.c
!IF "$(CFG)" == "7z - Win32 Release"
@@ -2651,6 +2755,10 @@ SOURCE=..\..\Archive\ArjHandler.cpp
# End Source File
# Begin Source File
SOURCE=..\..\Archive\Base64Handler.cpp
# End Source File
# Begin Source File
SOURCE=..\..\Archive\Bz2Handler.cpp
# End Source File
# Begin Source File
@@ -3002,6 +3110,68 @@ InputName=AesOpt
!ENDIF
# End Source File
# Begin Source File
SOURCE=..\..\..\..\Asm\x86\Sha1Opt.asm
!IF "$(CFG)" == "7z - Win32 Release"
# Begin Custom Build
OutDir=.\Release
InputPath=..\..\..\..\Asm\x86\Sha1Opt.asm
InputName=Sha1Opt
"$(OutDir)\$(InputName).obj" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
ml.exe -c -Fo$(OutDir)\$(InputName).obj $(InputPath)
# End Custom Build
!ELSEIF "$(CFG)" == "7z - Win32 Debug"
# Begin Custom Build
OutDir=.\Debug
InputPath=..\..\..\..\Asm\x86\Sha1Opt.asm
InputName=Sha1Opt
"$(OutDir)\$(InputName).obj" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
ml.exe -c -omf -Fo$(OutDir)\$(InputName).obj $(InputPath)
# End Custom Build
!ENDIF
# End Source File
# Begin Source File
SOURCE=..\..\..\..\Asm\x86\Sha256Opt.asm
!IF "$(CFG)" == "7z - Win32 Release"
# Begin Custom Build
OutDir=.\Release
InputPath=..\..\..\..\Asm\x86\Sha256Opt.asm
InputName=Sha256Opt
"$(OutDir)\$(InputName).obj" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
ml.exe -c -Fo$(OutDir)\$(InputName).obj $(InputPath)
# End Custom Build
!ELSEIF "$(CFG)" == "7z - Win32 Debug"
# Begin Custom Build
OutDir=.\Debug
InputPath=..\..\..\..\Asm\x86\Sha256Opt.asm
InputName=Sha256Opt
"$(OutDir)\$(InputName).obj" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
ml.exe -c -omf -Fo$(OutDir)\$(InputName).obj $(InputPath)
# End Custom Build
!ENDIF
# End Source File
# End Group
# End Target

View File

@@ -0,0 +1,45 @@
PROG = 7z
DEF_FILE = ../../Archive/Archive2.def
# IS_X64 = 1
# USE_ASM = 1
# ST_MODE = 1
include Arc_gcc.mak
ifdef SystemDrive
LOCAL_FLAGS_WIN = \
-D_7ZIP_LARGE_PAGES \
$(LOCAL_FLAGS_ST) \
SYS_OBJS = \
$O/resource.o \
else
SYS_OBJS = \
$O/MyWindows.o \
endif
LOCAL_FLAGS = \
-DEXTERNAL_CODECS \
$(LOCAL_FLAGS_WIN) \
$(LOCAL_FLAGS_ST) \
COMPRESS_OBJS_2 = \
$O/CodecExports.o \
AR_OBJS_2 = \
$O/ArchiveExports.o \
$O/DllExports2.o \
OBJS = \
$(ARC_OBJS) \
$(AR_OBJS_2) \
$(COMPRESS_OBJS_2) \
$(SYS_OBJS) \
include ../../7zip_gcc.mak

View File

@@ -36,5 +36,5 @@ MY_VERSION_INFO_DLL("7z Plugin" , "7z")
STRINGTABLE
BEGIN
100 "7z:0 zip:1 rar:3 001:9 cab:7 iso:8 xz:23 txz:23 lzma:16 tar:13 cpio:12 bz2:2 bzip2:2 tbz2:2 tbz:2 gz:14 gzip:14 tgz:14 tpz:14 z:5 taz:5 lz:16 tlz:16 liz:28 lz4:26 lz5:27 lzh:6 lha:6 rpm:10 deb:11 arj:4 vhd:20 wim:15 swm:15 fat:21 ntfs:22 dmg:17 hfs:18 xar:19 squashfs:24 zst:25"
100 "7z:0 zip:1 rar:3 001:9 cab:7 iso:8 xz:23 txz:23 lzma:16 tar:13 cpio:12 bz2:2 bzip2:2 tbz2:2 tbz:2 gz:14 gzip:14 tgz:14 tpz:14 z:5 taz:5 lz:16 tlz:16 liz:28 lz4:26 lz5:27 lzh:6 lha:6 rpm:10 deb:11 arj:4 vhd:20 wim:15 swm:15 esd:15 fat:21 ntfs:22 dmg:17 hfs:18 xar:19 squashfs:24 zst:25"
END

View File

@@ -2,7 +2,7 @@
#include "StdAfx.h"
#include <stdio.h>
// #include <stdio.h>
#include "../../../../C/CpuArch.h"
@@ -71,7 +71,7 @@ static const char * const kHelpString =
" -so : write data to stdout\n";
static const char * const kCantAllocate = "Can not allocate memory";
static const char * const kCantAllocate = "Cannot allocate memory";
static const char * const kReadError = "Read error";
static const char * const kWriteError = "Write error";
@@ -99,24 +99,32 @@ enum Enum
};
}
#define SWFRM_3(t, mu, mi) t, mu, mi, NULL
#define SWFRM_1(t) SWFRM_3(t, false, 0)
#define SWFRM_SIMPLE SWFRM_1(NSwitchType::kSimple)
#define SWFRM_STRING SWFRM_1(NSwitchType::kString)
#define SWFRM_STRING_SINGL(mi) SWFRM_3(NSwitchType::kString, false, mi)
static const CSwitchForm kSwitchForms[] =
{
{ "?", NSwitchType::kSimple, false },
{ "H", NSwitchType::kSimple, false },
{ "MM", NSwitchType::kString, false, 1 },
{ "X", NSwitchType::kString, false, 1 },
{ "A", NSwitchType::kString, false, 1 },
{ "D", NSwitchType::kString, false, 1 },
{ "FB", NSwitchType::kString, false, 1 },
{ "MC", NSwitchType::kString, false, 1 },
{ "LC", NSwitchType::kString, false, 1 },
{ "LP", NSwitchType::kString, false, 1 },
{ "PB", NSwitchType::kString, false, 1 },
{ "MF", NSwitchType::kString, false, 1 },
{ "MT", NSwitchType::kString, false, 0 },
{ "EOS", NSwitchType::kSimple, false },
{ "SI", NSwitchType::kSimple, false },
{ "SO", NSwitchType::kSimple, false },
{ "?", SWFRM_SIMPLE },
{ "H", SWFRM_SIMPLE },
{ "MM", SWFRM_STRING_SINGL(1) },
{ "X", SWFRM_STRING_SINGL(1) },
{ "A", SWFRM_STRING_SINGL(1) },
{ "D", SWFRM_STRING_SINGL(1) },
{ "FB", SWFRM_STRING_SINGL(1) },
{ "MC", SWFRM_STRING_SINGL(1) },
{ "LC", SWFRM_STRING_SINGL(1) },
{ "LP", SWFRM_STRING_SINGL(1) },
{ "PB", SWFRM_STRING_SINGL(1) },
{ "MF", SWFRM_STRING_SINGL(1) },
{ "MT", SWFRM_STRING },
{ "EOS", SWFRM_SIMPLE },
{ "SI", SWFRM_SIMPLE },
{ "SO", SWFRM_SIMPLE },
{ "F86", NSwitchType::kChar, false, 0, "+" }
};
@@ -264,6 +272,7 @@ STDMETHODIMP CProgressPrint::SetRatioInfo(const UInt64 *inSize, const UInt64 *ou
}
MY_ATTR_NORETURN
static void IncorrectCommand()
{
throw "Incorrect command";
@@ -314,7 +323,9 @@ static int Error_HRESULT(const char *s, HRESULT res)
return 1;
}
#if defined(_UNICODE) && !defined(_WIN64) && !defined(UNDER_CE)
#define NT_CHECK_FAIL_ACTION PrintError("Unsupported Windows version"); return 1;
#endif
static void AddProp(CObjectVector<CProperty> &props2, const char *name, const wchar_t *val)
{
@@ -474,7 +485,7 @@ static int main2(int numArgs, const char *args[])
inStream = inStreamSpec;
if (!inStreamSpec->Open(us2fs(inputName)))
{
PrintError2("can not open input file", inputName);
PrintError2("Cannot open input file", inputName);
return 1;
}
}
@@ -494,7 +505,7 @@ static int main2(int numArgs, const char *args[])
outStream = outStreamSpec;
if (!outStreamSpec->Create(us2fs(outputName), true))
{
PrintError2("can not open output file", outputName);
PrintError2("Cannot open output file", outputName);
return 1;
}
}
@@ -505,7 +516,7 @@ static int main2(int numArgs, const char *args[])
if (inStreamSpec)
{
if (!inStreamSpec->File.GetLength(fileSize))
throw "Can not get file length";
throw "Cannot get file length";
fileSizeDefined = true;
if (!stdOutMode)
Print_Size("Input size: ", fileSize);
@@ -532,7 +543,7 @@ static int main2(int numArgs, const char *args[])
You can use xz format instead, if you want to use filters */
if (parser[NKey::kEOS].ThereIs || stdInMode)
throw "Can not use stdin in this mode";
throw "Cannot use stdin in this mode";
size_t inSize = (size_t)fileSize;
@@ -549,7 +560,7 @@ static int main2(int numArgs, const char *args[])
}
if (ReadStream_FAIL(inStream, inBuffer, inSize) != S_OK)
throw "Can not read";
throw "Cannot read";
Byte *outBuffer = NULL;
size_t outSize;

View File

@@ -140,6 +140,14 @@ SOURCE=..\..\..\Windows\PropVariant.h
# End Source File
# Begin Source File
SOURCE=..\..\..\Windows\Registry.cpp
# End Source File
# Begin Source File
SOURCE=..\..\..\Windows\Registry.h
# End Source File
# Begin Source File
SOURCE=..\..\..\Windows\Synchronization.cpp
# End Source File
# Begin Source File
@@ -156,6 +164,14 @@ SOURCE=..\..\..\Windows\System.h
# End Source File
# Begin Source File
SOURCE=..\..\..\Windows\SystemInfo.cpp
# End Source File
# Begin Source File
SOURCE=..\..\..\Windows\SystemInfo.h
# End Source File
# Begin Source File
SOURCE=..\..\..\Windows\Thread.h
# End Source File
# End Group

View File

@@ -15,23 +15,24 @@ COMMON_OBJS = \
$O\CrcReg.obj \
$O\IntToString.obj \
$O\MyString.obj \
$O\MyVector.obj \
$O\NewHandler.obj \
$O\StringConvert.obj \
$O\StringToInt.obj \
$O\MyVector.obj
WIN_OBJS = \
$O\FileIO.obj \
$O\PropVariant.obj \
$O\System.obj
$O\Registry.obj \
$O\System.obj \
$O\SystemInfo.obj \
7ZIP_COMMON_OBJS = \
$O\CWrappers.obj \
$O\CreateCoder.obj \
$O\CWrappers.obj \
$O\FileStreams.obj \
$O\FilterCoder.obj \
$O\MethodProps.obj \
$O\OutBuffer.obj \
$O\StreamUtils.obj \
UI_COMMON_OBJS = \

View File

@@ -1,195 +1,113 @@
PROG = lzma
CXX = g++ -O2
# -Wall -Werror -Wno-delete-non-virtual-dtor
CXX_C = gcc -O2 -Wall -Werror
ifdef SystemDrive
IS_MINGW = 1
endif
# IS_X64 = 1
# USE_ASM = 1
# ST_MODE = 1
ifdef IS_MINGW
include ../../LzmaDec_gcc.mak
RM = del
CFLAGS = -c
LIB2 = -loleaut32 -luuid
LDFLAGS = -s
LOCAL_FLAGS_ST =
MT_OBJS =
FILE_IO =FileIO
FILE_IO_2 =Windows/$(FILE_IO)
MT_FILES = \
LzFindMt.o \
Threads.o \
ifdef ST_MODE
LOCAL_FLAGS_ST = -D_7ZIP_ST
else
RM = rm -f
CFLAGS = -c -D_7ZIP_ST
MT_OBJS = \
$O/LzFindMt.o \
$O/Synchronization.o \
$O/Threads.o \
FILE_IO =C_FileIO
FILE_IO_2 =Common/$(FILE_IO)
endif
LOCAL_FLAGS_SYS =
ifdef SystemDrive
SYS_OBJS = \
$O/Registry.o \
$O/resource.o \
else
SYS_OBJS = \
$O/FileDir.o \
$O/FileFind.o \
$O/FileName.o \
$O/MyWindows.o \
$O/TimeUtils.o \
endif
LOCAL_FLAGS = \
$(LOCAL_FLAGS_ST) \
COMMON_OBJS = \
$O/CommandLineParser.o \
$O/CRC.o \
$O/CrcReg.o \
$O/IntToString.o \
$O/MyString.o \
$O/MyVector.o \
$O/NewHandler.o \
$O/StringConvert.o \
$O/StringToInt.o \
$O/UTFConvert.o \
WIN_OBJS = \
$O/FileIO.o \
$O/PropVariant.o \
$O/System.o \
$O/SystemInfo.o \
COMPRESS_OBJS = \
$O/LzmaDecoder.o \
$O/LzmaEncoder.o \
$O/LzmaRegister.o \
CONSOLE_OBJS = \
$O/BenchCon.o \
$O/ConsoleClose.o \
7ZIP_COMMON_OBJS = \
$O/CreateCoder.o \
$O/CWrappers.o \
$O/FileStreams.o \
$O/FilterCoder.o \
$O/MethodProps.o \
$O/StreamUtils.o \
C_OBJS = \
$O/7zCrc.o \
$O/7zCrcOpt.o \
$O/Alloc.o \
$O/Bra86.o \
$O/CpuArch.o \
$O/LzFind.o \
$O/LzmaDec.o \
$O/LzmaEnc.o \
$O/Lzma86Dec.o \
$O/Lzma86Enc.o \
OBJS = \
$(MT_FILES) \
$(FILE_IO).o \
LzmaAlone.o \
Bench.o \
BenchCon.o \
ConsoleClose.o \
LzmaDecoder.o \
LzmaEncoder.o \
LzmaRegister.o \
CreateCoder.o \
CWrappers.o \
FileStreams.o \
FilterCoder.o \
MethodProps.o \
StreamUtils.o \
CommandLineParser.o \
CRC.o \
CrcReg.o \
IntToString.o \
MyString.o \
MyVector.o \
MyWindows.o \
StringConvert.o \
StringToInt.o \
PropVariant.o \
System.o \
7zCrc.o \
7zCrcOpt.o \
Alloc.o \
Bra86.o \
CpuArch.o \
LzFind.o \
LzmaDec.o \
LzmaEnc.o \
Lzma86Dec.o \
Lzma86Enc.o \
$(LZMA_DEC_OPT_OBJS) \
$(C_OBJS) \
$(MT_OBJS) \
$(SYS_OBJS) \
$(COMMON_OBJS) \
$(WIN_OBJS) \
$(COMPRESS_OBJS) \
$(7ZIP_COMMON_OBJS) \
$(CONSOLE_OBJS) \
$O/LzmaAlone.o \
$O/Bench.o \
all: $(PROG)
$(PROG): $(OBJS)
$(CXX) -o $(PROG) $(LDFLAGS) $(OBJS) $(LIB2)
LzmaAlone.o: LzmaAlone.cpp
$(CXX) $(CFLAGS) LzmaAlone.cpp
Bench.o: ../../UI/Common/Bench.cpp
$(CXX) $(CFLAGS) ../../UI/Common/Bench.cpp
BenchCon.o: ../../UI/Console/BenchCon.cpp
$(CXX) $(CFLAGS) ../../UI/Console/BenchCon.cpp
ConsoleClose.o: ../../UI/Console/ConsoleClose.cpp
$(CXX) $(CFLAGS) ../../UI/Console/ConsoleClose.cpp
LzmaDecoder.o: ../../Compress/LzmaDecoder.cpp
$(CXX) $(CFLAGS) ../../Compress/LzmaDecoder.cpp
LzmaEncoder.o: ../../Compress/LzmaEncoder.cpp
$(CXX) $(CFLAGS) ../../Compress/LzmaEncoder.cpp
LzmaRegister.o: ../../Compress/LzmaRegister.cpp
$(CXX) $(CFLAGS) ../../Compress/LzmaRegister.cpp
CreateCoder.o: ../../Common/CreateCoder.cpp
$(CXX) $(CFLAGS) ../../Common/CreateCoder.cpp
CWrappers.o: ../../Common/CWrappers.cpp
$(CXX) $(CFLAGS) ../../Common/CWrappers.cpp
FileStreams.o: ../../Common/FileStreams.cpp
$(CXX) $(CFLAGS) ../../Common/FileStreams.cpp
FilterCoder.o: ../../Common/FilterCoder.cpp
$(CXX) $(CFLAGS) ../../Common/FilterCoder.cpp
MethodProps.o: ../../Common/MethodProps.cpp
$(CXX) $(CFLAGS) ../../Common/MethodProps.cpp
StreamUtils.o: ../../Common/StreamUtils.cpp
$(CXX) $(CFLAGS) ../../Common/StreamUtils.cpp
$(FILE_IO).o: ../../../$(FILE_IO_2).cpp
$(CXX) $(CFLAGS) ../../../$(FILE_IO_2).cpp
CommandLineParser.o: ../../../Common/CommandLineParser.cpp
$(CXX) $(CFLAGS) ../../../Common/CommandLineParser.cpp
CRC.o: ../../../Common/CRC.cpp
$(CXX) $(CFLAGS) ../../../Common/CRC.cpp
CrcReg.o: ../../../Common/CrcReg.cpp
$(CXX) $(CFLAGS) ../../../Common/CrcReg.cpp
IntToString.o: ../../../Common/IntToString.cpp
$(CXX) $(CFLAGS) ../../../Common/IntToString.cpp
MyString.o: ../../../Common/MyString.cpp
$(CXX) $(CFLAGS) ../../../Common/MyString.cpp
MyVector.o: ../../../Common/MyVector.cpp
$(CXX) $(CFLAGS) ../../../Common/MyVector.cpp
MyWindows.o: ../../../Common/MyWindows.cpp
$(CXX) $(CFLAGS) ../../../Common/MyWindows.cpp
StringConvert.o: ../../../Common/StringConvert.cpp
$(CXX) $(CFLAGS) ../../../Common/StringConvert.cpp
StringToInt.o: ../../../Common/StringToInt.cpp
$(CXX) $(CFLAGS) ../../../Common/StringToInt.cpp
PropVariant.o: ../../../Windows/PropVariant.cpp
$(CXX) $(CFLAGS) ../../../Windows/PropVariant.cpp
System.o: ../../../Windows/System.cpp
$(CXX) $(CFLAGS) ../../../Windows/System.cpp
7zCrc.o: ../../../../C/7zCrc.c
$(CXX_C) $(CFLAGS) ../../../../C/7zCrc.c
7zCrcOpt.o: ../../../../C/7zCrcOpt.c
$(CXX_C) $(CFLAGS) ../../../../C/7zCrcOpt.c
Alloc.o: ../../../../C/Alloc.c
$(CXX_C) $(CFLAGS) ../../../../C/Alloc.c
Bra86.o: ../../../../C/Bra86.c
$(CXX_C) $(CFLAGS) ../../../../C/Bra86.c
CpuArch.o: ../../../../C/CpuArch.c
$(CXX_C) $(CFLAGS) ../../../../C/CpuArch.c
LzFind.o: ../../../../C/LzFind.c
$(CXX_C) $(CFLAGS) ../../../../C/LzFind.c
ifdef MT_FILES
LzFindMt.o: ../../../../C/LzFindMt.c
$(CXX_C) $(CFLAGS) ../../../../C/LzFindMt.c
Threads.o: ../../../../C/Threads.c
$(CXX_C) $(CFLAGS) ../../../../C/Threads.c
endif
LzmaDec.o: ../../../../C/LzmaDec.c
$(CXX_C) $(CFLAGS) ../../../../C/LzmaDec.c
LzmaEnc.o: ../../../../C/LzmaEnc.c
$(CXX_C) $(CFLAGS) ../../../../C/LzmaEnc.c
Lzma86Dec.o: ../../../../C/Lzma86Dec.c
$(CXX_C) $(CFLAGS) ../../../../C/Lzma86Dec.c
Lzma86Enc.o: ../../../../C/Lzma86Enc.c
$(CXX_C) $(CFLAGS) ../../../../C/Lzma86Enc.c
clean:
-$(RM) $(PROG) $(OBJS)
include ../../7zip_gcc.mak

View File

@@ -481,6 +481,10 @@ SOURCE=..\..\..\Common\NewHandler.h
# End Source File
# Begin Source File
SOURCE=..\..\..\Common\Sha256Prepare.cpp
# End Source File
# Begin Source File
SOURCE=..\..\..\Common\StdInStream.cpp
# End Source File
# Begin Source File
@@ -888,6 +892,11 @@ SOURCE=..\..\..\..\C\Sha256.h
# End Source File
# Begin Source File
SOURCE=..\..\..\..\C\Sha256Opt.c
# SUBTRACT CPP /YX /Yc /Yu
# End Source File
# Begin Source File
SOURCE=..\..\..\..\C\Threads.c
# SUBTRACT CPP /YX /Yc /Yu
# End Source File

View File

@@ -13,8 +13,10 @@
#ifdef _WIN32
#include "../../../Windows/DLL.h"
#include "../../../Windows/FileDir.h"
#else
#include "../../../Common/StringConvert.h"
#endif
#include "../../../Windows/FileDir.h"
#include "../../../Windows/FileName.h"
#include "../../UI/Common/ExitCode.h"
@@ -82,14 +84,20 @@ 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
*/
#define SWFRM_3(t, mu, mi) t, mu, mi, NULL
#define SWFRM_1(t) SWFRM_3(t, false, 0)
#define SWFRM_SIMPLE SWFRM_1(NSwitchType::kSimple)
#define SWFRM_STRING_SINGL(mi) SWFRM_3(NSwitchType::kString, false, mi)
static const CSwitchForm kSwitchForms[kNumSwitches] =
{
{ "?", NSwitchType::kSimple },
{ "H", NSwitchType::kSimple },
{ "BD", NSwitchType::kSimple },
{ "Y", NSwitchType::kSimple },
{ "P", NSwitchType::kString, false, 1 },
{ "O", NSwitchType::kString, false, 1 },
{ "?", SWFRM_SIMPLE },
{ "H", SWFRM_SIMPLE },
{ "BD", SWFRM_SIMPLE },
{ "Y", SWFRM_SIMPLE },
{ "P", SWFRM_STRING_SINGL(1) },
{ "O", SWFRM_STRING_SINGL(1) },
};
static const int kNumCommandForms = 3;
@@ -103,7 +111,6 @@ static const NRecursedType::EEnum kCommandRecursedDefault[kNumCommandForms] =
// static const bool kAddRecursedDefault = false;
static const char * const kUniversalWildcard = "*";
static const int kCommandIndex = 0;
static const char * const kHelpString =
"\nUsage: 7zSFX [<command>] [<switches>...] [<file_name>...]\n"
@@ -152,7 +159,7 @@ struct CArchiveCommand
NRecursedType::EEnum DefaultRecursedType() const;
};
bool ParseArchiveCommand(const UString &commandString, CArchiveCommand &command)
static bool ParseArchiveCommand(const UString &commandString, CArchiveCommand &command)
{
UString s = commandString;
s.MakeLower_Ascii();
@@ -172,17 +179,19 @@ NRecursedType::EEnum CArchiveCommand::DefaultRecursedType() const
return kCommandRecursedDefault[CommandType];
}
void PrintHelp(void)
static void PrintHelp(void)
{
g_StdOut << kHelpString;
}
MY_ATTR_NORETURN
static void ShowMessageAndThrowException(const char *message, NExitCode::EEnum code)
{
g_StdOut << message << endl;
throw code;
}
MY_ATTR_NORETURN
static void PrintHelpAndExit() // yyy
{
PrintHelp();
@@ -218,7 +227,7 @@ static bool AddNameToCensor(NWildcard::CCensor &wildcardCensor,
return true;
}
void AddCommandLineWildcardToCensor(NWildcard::CCensor &wildcardCensor,
static void AddCommandLineWildcardToCensor(NWildcard::CCensor &wildcardCensor,
const UString &name, bool include, NRecursedType::EEnum type)
{
if (!AddNameToCensor(wildcardCensor, name, include, type))
@@ -227,7 +236,7 @@ void AddCommandLineWildcardToCensor(NWildcard::CCensor &wildcardCensor,
#ifndef _WIN32
static void GetArguments(int numArgs, const char *args[], UStringVector &parts)
static void GetArguments(int numArgs, char *args[], UStringVector &parts)
{
parts.Clear();
for (int i = 0; i < numArgs; i++)
@@ -238,9 +247,15 @@ static void GetArguments(int numArgs, const char *args[], UStringVector &parts)
}
#endif
int Main2(
#ifndef _WIN32
int numArgs, const char *args[]
int numArgs, char *args[]
#endif
);
int Main2(
#ifndef _WIN32
int numArgs, char *args[]
#endif
)
{
@@ -253,6 +268,10 @@ int Main2(
SetFileApisToOEM();
#endif
#ifdef ENV_HAVE_LOCALE
MY_SetLocale();
#endif
g_StdOut << kCopyrightString;
UStringVector commandStrings;
@@ -277,7 +296,10 @@ int Main2(
#else
UString arcPath = commandStrings.Front();
if (commandStrings.IsEmpty())
return NExitCode::kFatalError;
const FString arcPath = us2fs(commandStrings.Front());
#endif
@@ -356,7 +378,7 @@ int Main2(
if (passwordEnabled)
password = parser[NKey::kPassword].PostStrings[0];
if (!NFind::DoesFileExist(arcPath))
if (!NFind::DoesFileExist_FollowLink(arcPath))
throw kCantFindSFX;
FString outputDir;

View File

@@ -29,8 +29,8 @@ COMMON_OBJS = \
$O\StdInStream.obj \
$O\StdOutStream.obj \
$O\StringConvert.obj \
$O\Wildcard.obj \
$O\UTFConvert.obj \
$O\Wildcard.obj \
WIN_OBJS = \
$O\DLL.obj \
@@ -64,9 +64,9 @@ UI_COMMON_OBJS = \
$O\ArchiveExtractCallback.obj \
$O\ArchiveOpenCallback.obj \
$O\DefaultName.obj \
$O\LoadCodecs.obj \
$O\Extract.obj \
$O\ExtractingFilePath.obj \
$O\LoadCodecs.obj \
$O\OpenArchive.obj \
$O\PropIDUtils.obj \
@@ -79,7 +79,6 @@ AR_COMMON_OBJS = \
$O\MultiStream.obj \
$O\OutStreamWithCRC.obj \
7Z_OBJS = \
$O\7zDecode.obj \
$O\7zExtract.obj \
@@ -124,12 +123,12 @@ C_OBJS = \
$O\MtDec.obj \
$O\Ppmd7.obj \
$O\Ppmd7Dec.obj \
$O\Sha256.obj \
$O\Threads.obj \
!include "../../Aes.mak"
!include "../../Crc.mak"
!include "../../LzmaDec.mak"
!include "../../Sha256.mak"
COMPRESS_OBJS = $(COMPRESS_OBJS) \
$O\ZstdDecoder.obj \

View File

@@ -0,0 +1,204 @@
PROG = 7zCon
# IS_X64 = 1
# USE_ASM = 1
# ST_MODE = 1
include ../../LzmaDec_gcc.mak
LOCAL_FLAGS_ST =
MT_OBJS =
ifdef ST_MODE
LOCAL_FLAGS_ST = -D_7ZIP_ST
ifdef SystemDrive
MT_OBJS = \
$O/Threads.o \
endif
else
MT_OBJS = \
$O/StreamBinder.o \
$O/Synchronization.o \
$O/VirtThread.o \
$O/Threads.o \
endif
LOCAL_FLAGS_SYS =
ifdef SystemDrive
LOCAL_FLAGS_SYS = \
SYS_OBJS = \
$O/DLL.o \
$O/DllSecur.o \
$O/resource.o \
else
SYS_OBJS = \
$O/MyWindows.o \
endif
LOCAL_FLAGS = \
$(LOCAL_FLAGS_ST) \
$(LOCAL_FLAGS_SYS) \
-DEXTRACT_ONLY \
-DNO_READ_FROM_CODER \
-D_SFX \
CURRENT_OBJS = \
$O/SfxCon.o \
CONSOLE_OBJS = \
$O/ConsoleClose.o \
$O/ExtractCallbackConsole.o \
$O/List.o \
$O/MainAr.o \
$O/OpenCallbackConsole.o \
$O/PercentPrinter.o \
$O/UserInputUtils.o \
COMMON_OBJS = \
$O/CommandLineParser.o \
$O/CRC.o \
$O/IntToString.o \
$O/MyString.o \
$O/MyVector.o \
$O/NewHandler.o \
$O/Sha256Prepare.o \
$O/StdInStream.o \
$O/StdOutStream.o \
$O/StringConvert.o \
$O/UTFConvert.o \
$O/Wildcard.o \
WIN_OBJS = \
\
$O/ErrorMsg.o \
$O/FileDir.o \
$O/FileFind.o \
$O/FileIO.o \
$O/FileName.o \
$O/PropVariant.o \
$O/PropVariantConv.o \
\
$O/System.o \
$O/TimeUtils.o \
7ZIP_COMMON_OBJS = \
$O/CreateCoder.o \
$O/CWrappers.o \
$O/FilePathAutoRename.o \
$O/FileStreams.o \
$O/InBuffer.o \
$O/FilterCoder.o \
$O/LimitedStreams.o \
$O/OutBuffer.o \
$O/ProgressUtils.o \
$O/PropId.o \
\
$O/StreamObjects.o \
$O/StreamUtils.o \
\
UI_COMMON_OBJS = \
$O/ArchiveExtractCallback.o \
$O/ArchiveOpenCallback.o \
$O/DefaultName.o \
$O/Extract.o \
$O/ExtractingFilePath.o \
$O/LoadCodecs.o \
$O/OpenArchive.o \
$O/PropIDUtils.o \
AR_OBJS = \
$O/SplitHandler.o \
AR_COMMON_OBJS = \
$O/CoderMixer2.o \
$O/ItemNameUtils.o \
$O/MultiStream.o \
$O/OutStreamWithCRC.o \
7Z_OBJS = \
$O/7zDecode.o \
$O/7zExtract.o \
$O/7zHandler.o \
$O/7zIn.o \
$O/7zRegister.o \
COMPRESS_OBJS = \
$O/Bcj2Coder.o \
$O/Bcj2Register.o \
$O/BcjCoder.o \
$O/BcjRegister.o \
$O/BranchMisc.o \
$O/BranchRegister.o \
$O/CopyCoder.o \
$O/CopyRegister.o \
$O/DeltaFilter.o \
$O/Lzma2Decoder.o \
$O/Lzma2Register.o \
$O/LzmaDecoder.o \
$O/LzmaRegister.o \
$O/PpmdDecoder.o \
$O/PpmdRegister.o \
CRYPTO_OBJS = \
$O/7zAes.o \
$O/7zAesRegister.o \
$O/MyAes.o \
C_OBJS = \
$O/Alloc.o \
$O/Bcj2.o \
$O/Bra.o \
$O/Bra86.o \
$O/BraIA64.o \
$O/CpuArch.o \
$O/Delta.o \
\
$O/Lzma2Dec.o \
$O/Lzma2DecMt.o \
$O/LzmaDec.o \
$O/MtDec.o \
$O/Ppmd7.o \
$O/Ppmd7Dec.o \
$O/Sha256.o \
$O/Sha256Opt.o \
$O/7zCrc.o \
$O/7zCrcOpt.o \
$O/Aes.o \
$O/AesOpt.o \
OBJS = \
$(LZMA_DEC_OPT_OBJS) \
$(C_OBJS) \
$(MT_OBJS) \
$(SYS_OBJS) \
$(COMMON_OBJS) \
$(WIN_OBJS) \
$(COMPRESS_OBJS) \
$(CRYPTO_OBJS) \
$(7ZIP_COMMON_OBJS) \
$(AR_OBJS) \
$(AR_COMMON_OBJS) \
$(7Z_OBJS) \
$(UI_COMMON_OBJS) \
$(CONSOLE_OBJS) \
$(CURRENT_OBJS) \
include ../../7zip_gcc.mak

View File

@@ -15,8 +15,8 @@ using namespace NWindows;
using namespace NFile;
using namespace NDir;
static LPCSTR const kCantDeleteFile = "Can not delete output file";
static LPCSTR const kCantOpenFile = "Can not open output file";
static LPCSTR const kCantDeleteFile = "Cannot delete output file";
static LPCSTR const kCantOpenFile = "Cannot open output file";
static LPCSTR const kUnsupportedMethod = "Unsupported Method";
void CExtractCallbackImp::Init(IInArchive *archiveHandler,

View File

@@ -18,8 +18,8 @@ using namespace NWindows;
using namespace NFile;
using namespace NDir;
static LPCSTR const kCantFindArchive = "Can not find archive file";
static LPCSTR const kCantOpenArchive = "Can not open the file as archive";
static LPCSTR const kCantFindArchive = "Cannot find archive file";
static LPCSTR const kCantOpenArchive = "Cannot open the file as archive";
struct CThreadExtracting
{

View File

@@ -44,32 +44,32 @@ static bool ReadDataString(CFSTR fileName, LPCSTR startID,
NIO::CInFile inFile;
if (!inFile.Open(fileName))
return false;
const int kBufferSize = (1 << 12);
const size_t kBufferSize = (1 << 12);
Byte buffer[kBufferSize];
int signatureStartSize = MyStringLen(startID);
int signatureEndSize = MyStringLen(endID);
const unsigned signatureStartSize = MyStringLen(startID);
const unsigned signatureEndSize = MyStringLen(endID);
UInt32 numBytesPrev = 0;
size_t 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))
const size_t numReadBytes = kBufferSize - numBytesPrev;
size_t processedSize;
if (!inFile.ReadFull(buffer + numBytesPrev, numReadBytes, processedSize))
return false;
if (processedSize == 0)
return true;
UInt32 numBytesInBuffer = numBytesPrev + processedSize;
const size_t numBytesInBuffer = numBytesPrev + processedSize;
UInt32 pos = 0;
for (;;)
{
if (writeMode)
{
if (pos > numBytesInBuffer - signatureEndSize)
if (pos + signatureEndSize > numBytesInBuffer)
break;
if (memcmp(buffer + pos, endID, signatureEndSize) == 0)
return true;
@@ -81,7 +81,7 @@ static bool ReadDataString(CFSTR fileName, LPCSTR startID,
}
else
{
if (pos > numBytesInBuffer - signatureStartSize)
if (pos + signatureStartSize > numBytesInBuffer)
break;
if (memcmp(buffer + pos, startID, signatureStartSize) == 0)
{
@@ -111,7 +111,9 @@ struct CInstallIDInit
} g_CInstallIDInit;
#if defined(_WIN32) && defined(_UNICODE) && !defined(_WIN64) && !defined(UNDER_CE)
#define NT_CHECK_FAIL_ACTION ShowErrorMessage(L"Unsupported Windows version"); return 1;
#endif
static void ShowErrorMessageSpec(const UString &name)
{
@@ -207,7 +209,7 @@ int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE /* hPrevInstance */,
if (!tempDir.Create(kTempDirPrefix))
{
if (!assumeYes)
ShowErrorMessage(L"Can not create temp folder archive");
ShowErrorMessage(L"Cannot create temp folder archive");
return 1;
}
@@ -217,7 +219,7 @@ int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE /* hPrevInstance */,
HRESULT result = codecs->Load();
if (result != S_OK)
{
ShowErrorMessage(L"Can not load codecs");
ShowErrorMessage(L"Cannot load codecs");
return 1;
}
}
@@ -292,7 +294,7 @@ int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE /* hPrevInstance */,
if (result <= 32)
{
if (!assumeYes)
ShowErrorMessage(L"Can not open file");
ShowErrorMessage(L"Cannot open file");
return 1;
}
hProcess = execInfo.hProcess;
@@ -303,10 +305,10 @@ int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE /* hPrevInstance */,
if (appLaunched.IsEmpty())
{
appLaunched = L"setup.exe";
if (!NFind::DoesFileExist(us2fs(appLaunched)))
if (!NFind::DoesFileExist_FollowLink(us2fs(appLaunched)))
{
if (!assumeYes)
ShowErrorMessage(L"Can not find setup.exe");
ShowErrorMessage(L"Cannot find setup.exe");
return 1;
}
}

View File

@@ -701,6 +701,10 @@ SOURCE=..\..\..\Common\NewHandler.h
# End Source File
# Begin Source File
SOURCE=..\..\..\Common\Sha256Prepare.cpp
# End Source File
# Begin Source File
SOURCE=..\..\..\Common\StringConvert.cpp
# End Source File
# Begin Source File
@@ -960,6 +964,11 @@ SOURCE=..\..\..\..\C\Sha256.c
# End Source File
# Begin Source File
SOURCE=..\..\..\..\C\Sha256Opt.c
# SUBTRACT CPP /YX /Yc /Yu
# End Source File
# Begin Source File
SOURCE=..\..\..\..\C\Threads.c
# SUBTRACT CPP /YX /Yc /Yu
# End Source File

View File

@@ -67,12 +67,12 @@ bool g_LVN_ITEMACTIVATE_Support = true;
static const wchar_t * const kUnknownExceptionMessage = L"ERROR: Unknown Error!";
void ErrorMessageForHRESULT(HRESULT res)
static void ErrorMessageForHRESULT(HRESULT res)
{
ShowErrorMessage(HResultToMessage(res));
}
int APIENTRY WinMain2()
static int APIENTRY WinMain2()
{
// OleInitialize is required for ProgressBar in TaskBar.
#ifndef UNDER_CE
@@ -206,7 +206,9 @@ int APIENTRY WinMain2()
return NExitCode::kFatalError;
}
#if defined(_WIN32) && defined(_UNICODE) && !defined(_WIN64) && !defined(UNDER_CE)
#define NT_CHECK_FAIL_ACTION ShowErrorMessage(L"Unsupported Windows version"); return NExitCode::kFatalError;
#endif
int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE /* hPrevInstance */,
#ifdef UNDER_CE

View File

@@ -143,12 +143,12 @@ C_OBJS = \
$O\MtDec.obj \
$O\Ppmd7.obj \
$O\Ppmd7Dec.obj \
$O\Sha256.obj \
$O\Threads.obj \
!include "../../Aes.mak"
!include "../../Crc.mak"
!include "../../LzmaDec.mak"
!include "../../Sha256.mak"
COMPRESS_OBJS = $(COMPRESS_OBJS) \
$O\ZstdDecoder.obj \

View File

@@ -1,5 +1,6 @@
DIRS = \
Alone\~ \
Alone2\~ \
Alone7z\~ \
Fm\~ \
Format7z\~ \