summaryrefslogtreecommitdiffstatshomepage
path: root/3rdparty/lzma/CPP/7zip/Bundles
diff options
context:
space:
mode:
Diffstat (limited to '3rdparty/lzma/CPP/7zip/Bundles')
-rw-r--r--3rdparty/lzma/CPP/7zip/Bundles/Alone7z/Alone.dsp320
-rw-r--r--3rdparty/lzma/CPP/7zip/Bundles/Alone7z/StdAfx.h7
-rw-r--r--3rdparty/lzma/CPP/7zip/Bundles/Alone7z/makefile26
-rw-r--r--3rdparty/lzma/CPP/7zip/Bundles/Alone7z/makefile.gcc276
-rw-r--r--3rdparty/lzma/CPP/7zip/Bundles/Alone7z/resource.rc4
-rw-r--r--3rdparty/lzma/CPP/7zip/Bundles/Format7zExtractR/StdAfx.h7
-rw-r--r--3rdparty/lzma/CPP/7zip/Bundles/Format7zExtractR/makefile9
-rw-r--r--3rdparty/lzma/CPP/7zip/Bundles/Format7zR/StdAfx.h7
-rw-r--r--3rdparty/lzma/CPP/7zip/Bundles/Format7zR/makefile9
-rw-r--r--3rdparty/lzma/CPP/7zip/Bundles/LzmaCon/LzmaAlone.cpp140
-rw-r--r--3rdparty/lzma/CPP/7zip/Bundles/LzmaCon/LzmaCon.dsp103
-rw-r--r--3rdparty/lzma/CPP/7zip/Bundles/LzmaCon/StdAfx.h7
-rw-r--r--3rdparty/lzma/CPP/7zip/Bundles/LzmaCon/makefile18
-rw-r--r--3rdparty/lzma/CPP/7zip/Bundles/LzmaCon/makefile.gcc269
-rw-r--r--3rdparty/lzma/CPP/7zip/Bundles/SFXCon/SFXCon.dsp139
-rw-r--r--3rdparty/lzma/CPP/7zip/Bundles/SFXCon/SfxCon.cpp129
-rw-r--r--3rdparty/lzma/CPP/7zip/Bundles/SFXCon/StdAfx.h7
-rw-r--r--3rdparty/lzma/CPP/7zip/Bundles/SFXCon/makefile21
-rw-r--r--3rdparty/lzma/CPP/7zip/Bundles/SFXCon/makefile.gcc213
-rw-r--r--3rdparty/lzma/CPP/7zip/Bundles/SFXCon/resource.rc6
-rw-r--r--3rdparty/lzma/CPP/7zip/Bundles/SFXSetup/ExtractCallbackSfx.cpp32
-rw-r--r--3rdparty/lzma/CPP/7zip/Bundles/SFXSetup/ExtractCallbackSfx.h21
-rw-r--r--3rdparty/lzma/CPP/7zip/Bundles/SFXSetup/ExtractEngine.cpp18
-rw-r--r--3rdparty/lzma/CPP/7zip/Bundles/SFXSetup/ExtractEngine.h4
-rw-r--r--3rdparty/lzma/CPP/7zip/Bundles/SFXSetup/SFXSetup.dsp105
-rw-r--r--3rdparty/lzma/CPP/7zip/Bundles/SFXSetup/SfxSetup.cpp114
-rw-r--r--3rdparty/lzma/CPP/7zip/Bundles/SFXSetup/StdAfx.h13
-rw-r--r--3rdparty/lzma/CPP/7zip/Bundles/SFXSetup/makefile18
-rw-r--r--3rdparty/lzma/CPP/7zip/Bundles/SFXWin/SFXWin.dsp116
-rw-r--r--3rdparty/lzma/CPP/7zip/Bundles/SFXWin/SfxWin.cpp39
-rw-r--r--3rdparty/lzma/CPP/7zip/Bundles/SFXWin/StdAfx.h14
-rw-r--r--3rdparty/lzma/CPP/7zip/Bundles/SFXWin/makefile19
-rw-r--r--3rdparty/lzma/CPP/7zip/Bundles/SFXWin/resource.rc5
33 files changed, 1713 insertions, 522 deletions
diff --git a/3rdparty/lzma/CPP/7zip/Bundles/Alone7z/Alone.dsp b/3rdparty/lzma/CPP/7zip/Bundles/Alone7z/Alone.dsp
index d220b198b37..ef4ec6055b0 100644
--- a/3rdparty/lzma/CPP/7zip/Bundles/Alone7z/Alone.dsp
+++ b/3rdparty/lzma/CPP/7zip/Bundles/Alone7z/Alone.dsp
@@ -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" /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 "Z7_LARGE_PAGES" /D "Z7_DEVICE_FILE" /FAcs /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" /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 "Z7_LARGE_PAGES" /D "Z7_DEVICE_FILE" /Yu"StdAfx.h" /FD /GZ /c
# ADD BASE RSC /l 0x419 /d "_DEBUG"
# ADD RSC /l 0x419 /d "_DEBUG"
BSC32=bscmake.exe
@@ -93,8 +93,8 @@ LINK32=link.exe
# PROP Intermediate_Dir "ReleaseU"
# 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 /Gr /MD /W4 /GX /O1 /I "..\..\..\\" /D "NDEBUG" /D "UNICODE" /D "_UNICODE" /D "WIN32" /D "_CONSOLE" /Yu"StdAfx.h" /FD /c
+# ADD BASE CPP /nologo /MD /W3 /GX /O2 /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /Yu"StdAfx.h" /FD /c
+# ADD CPP /nologo /Gr /MD /W4 /GX /O1 /I "..\..\..\\" /D "NDEBUG" /D "UNICODE" /D "_UNICODE" /D "WIN32" /D "_CONSOLE" /D "Z7_LARGE_PAGES" /D "Z7_DEVICE_FILE" /Yu"StdAfx.h" /FD /c
# ADD BASE RSC /l 0x419 /d "NDEBUG"
# ADD RSC /l 0x419 /d "NDEBUG"
BSC32=bscmake.exe
@@ -120,8 +120,8 @@ LINK32=link.exe
# PROP Intermediate_Dir "DebugU"
# 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 /Gr /MDd /W4 /Gm /GX /ZI /Od /I "..\..\..\\" /D "_DEBUG" /D "_UNICODE" /D "UNICODE" /D "WIN32" /D "_CONSOLE" /Yu"StdAfx.h" /FD /GZ /c
+# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /Yu"StdAfx.h" /FD /GZ /c
+# ADD CPP /nologo /Gr /MDd /W4 /Gm /GX /ZI /Od /I "..\..\..\\" /D "_DEBUG" /D "_UNICODE" /D "UNICODE" /D "WIN32" /D "_CONSOLE" /D "Z7_LARGE_PAGES" /D "Z7_DEVICE_FILE" /Yu"StdAfx.h" /FD /GZ /c
# ADD BASE RSC /l 0x419 /d "_DEBUG"
# ADD RSC /l 0x419 /d "_DEBUG"
BSC32=bscmake.exe
@@ -144,10 +144,6 @@ LINK32=link.exe
# PROP Default_Filter ""
# Begin Source File
-SOURCE=..\..\UI\Console\ArError.h
-# End Source File
-# Begin Source File
-
SOURCE=..\..\UI\Console\BenchCon.cpp
# End Source File
# Begin Source File
@@ -270,6 +266,10 @@ SOURCE=..\..\..\Common\CommandLineParser.h
# End Source File
# Begin Source File
+SOURCE=..\..\..\Common\Common.h
+# End Source File
+# Begin Source File
+
SOURCE=..\..\..\Common\ComTry.h
# End Source File
# Begin Source File
@@ -290,6 +290,14 @@ SOURCE=..\..\..\Common\DynamicBuffer.h
# End Source File
# Begin Source File
+SOURCE=..\..\..\Common\DynLimBuf.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\Common\DynLimBuf.h
+# End Source File
+# Begin Source File
+
SOURCE=..\..\..\Common\IntToString.cpp
# End Source File
# Begin Source File
@@ -306,6 +314,18 @@ SOURCE=..\..\..\Common\ListFileUtils.h
# End Source File
# Begin Source File
+SOURCE=..\..\..\Common\LzFindPrepare.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\Common\MyBuffer.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\Common\MyBuffer2.h
+# End Source File
+# Begin Source File
+
SOURCE=..\..\..\Common\MyCom.h
# End Source File
# Begin Source File
@@ -330,6 +350,10 @@ SOURCE=..\..\..\Common\MyString.h
# End Source File
# Begin Source File
+SOURCE=..\..\..\Common\MyTypes.h
+# End Source File
+# Begin Source File
+
SOURCE=..\..\..\Common\MyUnknown.h
# End Source File
# Begin Source File
@@ -342,6 +366,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 +382,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
@@ -406,6 +442,10 @@ SOURCE=..\..\..\Common\Wildcard.h
# End Source File
# Begin Source File
+SOURCE=..\..\..\Common\XzCrc64Init.cpp
+# End Source File
+# Begin Source File
+
SOURCE=..\..\..\Common\XzCrc64Reg.cpp
# End Source File
# End Group
@@ -478,6 +518,14 @@ SOURCE=..\..\..\Windows\FileName.h
# End Source File
# Begin Source File
+SOURCE=..\..\..\Windows\FileSystem.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\Windows\FileSystem.h
+# End Source File
+# Begin Source File
+
SOURCE=..\..\..\Windows\Handle.h
# End Source File
# Begin Source File
@@ -490,6 +538,10 @@ SOURCE=..\..\..\Windows\MemoryLock.h
# End Source File
# Begin Source File
+SOURCE=..\..\..\Windows\NtCheck.h
+# End Source File
+# Begin Source File
+
SOURCE=..\..\..\Windows\PropVariant.cpp
# End Source File
# Begin Source File
@@ -506,7 +558,11 @@ SOURCE=..\..\..\Windows\PropVariantConv.h
# End Source File
# Begin Source File
-SOURCE=..\..\..\Windows\Synchronization.cpp
+SOURCE=..\..\..\Windows\Registry.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\Windows\Registry.h
# End Source File
# Begin Source File
@@ -522,6 +578,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
@@ -626,6 +690,14 @@ SOURCE=..\..\Common\MethodProps.h
# End Source File
# Begin Source File
+SOURCE=..\..\Common\MultiOutStream.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\Common\MultiOutStream.h
+# End Source File
+# Begin Source File
+
SOURCE=..\..\Common\OffsetStream.cpp
# End Source File
# Begin Source File
@@ -746,10 +818,6 @@ SOURCE=..\..\Compress\ByteSwap.cpp
# End Source File
# Begin Source File
-SOURCE=..\..\Compress\ByteSwap.h
-# End Source File
-# Begin Source File
-
SOURCE=..\..\Compress\CopyCoder.cpp
# End Source File
# Begin Source File
@@ -804,6 +872,22 @@ SOURCE=..\..\Compress\LzmaEncoder.h
SOURCE=..\..\Compress\LzmaRegister.cpp
# End Source File
+# Begin Source File
+
+SOURCE=..\..\Compress\XzDecoder.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\Compress\XzDecoder.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\Compress\XzEncoder.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\Compress\XzEncoder.h
+# End Source File
# End Group
# Begin Group "Archive"
@@ -1054,6 +1138,10 @@ SOURCE=..\..\UI\Common\EnumDirItems.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
@@ -1178,7 +1266,7 @@ SOURCE=..\..\ICoder.h
# End Source File
# Begin Source File
-SOURCE=..\..\IMyUnknown.h
+SOURCE=..\..\IDecl.h
# End Source File
# Begin Source File
@@ -1205,34 +1293,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"
@@ -1429,6 +1489,14 @@ SOURCE=..\..\..\..\C\7zStream.c
# End Source File
# Begin Source File
+SOURCE=..\..\..\..\C\7zTypes.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\C\7zWindows.h
+# End Source File
+# Begin Source File
+
SOURCE=..\..\..\..\C\Aes.c
!IF "$(CFG)" == "Alone - Win32 Release"
@@ -1561,6 +1629,10 @@ SOURCE=..\..\..\..\C\BraIA64.c
# End Source File
# Begin Source File
+SOURCE=..\..\..\..\C\Compiler.h
+# End Source File
+# Begin Source File
+
SOURCE=..\..\..\..\C\CpuArch.c
!IF "$(CFG)" == "Alone - Win32 Release"
@@ -1618,6 +1690,15 @@ SOURCE=..\..\..\..\C\Delta.h
# End Source File
# Begin Source File
+SOURCE=..\..\..\..\C\DllSecur.c
+# SUBTRACT CPP /YX /Yc /Yu
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\C\DllSecur.h
+# End Source File
+# Begin Source File
+
SOURCE=..\..\..\..\C\IStream.h
# End Source File
# Begin Source File
@@ -1640,6 +1721,30 @@ SOURCE=..\..\..\..\C\LzFindMt.h
# End Source File
# Begin Source File
+SOURCE=..\..\..\..\C\LzFindOpt.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\Compress\Lz\LzHash.h
# End Source File
# Begin Source File
@@ -1676,6 +1781,34 @@ SOURCE=..\..\..\..\C\Lzma2Dec.h
# End Source File
# Begin Source File
+SOURCE=..\..\..\..\C\Lzma2DecMt.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\Lzma2DecMt.h
+# End Source File
+# Begin Source File
+
SOURCE=..\..\..\..\C\Lzma2Enc.c
!IF "$(CFG)" == "Alone - Win32 Release"
@@ -1769,16 +1902,105 @@ SOURCE=..\..\..\..\C\MtCoder.h
# End Source File
# Begin Source File
-SOURCE=..\..\..\..\C\Threads.c
+SOURCE=..\..\..\..\C\MtDec.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\Threads.h
+SOURCE=..\..\..\..\C\MtDec.h
# End Source File
# Begin Source File
-SOURCE=..\..\..\..\C\Types.h
+SOURCE=..\..\..\..\C\RotateDefs.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\SwapBytes.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\SwapBytes.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\C\Threads.c
+# SUBTRACT CPP /YX /Yc /Yu
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\C\Threads.h
# End Source File
# End Group
# Begin Group "Crypto"
@@ -1806,6 +2028,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
diff --git a/3rdparty/lzma/CPP/7zip/Bundles/Alone7z/StdAfx.h b/3rdparty/lzma/CPP/7zip/Bundles/Alone7z/StdAfx.h
index 2854ff3e935..035267ccd02 100644
--- a/3rdparty/lzma/CPP/7zip/Bundles/Alone7z/StdAfx.h
+++ b/3rdparty/lzma/CPP/7zip/Bundles/Alone7z/StdAfx.h
@@ -1,8 +1,11 @@
// StdAfx.h
-#ifndef __STDAFX_H
-#define __STDAFX_H
+#ifndef ZIP7_INC_STDAFX_H
+#define ZIP7_INC_STDAFX_H
+#if defined(_MSC_VER) && _MSC_VER >= 1800
+#pragma warning(disable : 4464) // relative include path contains '..'
+#endif
#include "../../../Common/Common.h"
#endif
diff --git a/3rdparty/lzma/CPP/7zip/Bundles/Alone7z/makefile b/3rdparty/lzma/CPP/7zip/Bundles/Alone7z/makefile
index 15c51f91987..1f857c541ad 100644
--- a/3rdparty/lzma/CPP/7zip/Bundles/Alone7z/makefile
+++ b/3rdparty/lzma/CPP/7zip/Bundles/Alone7z/makefile
@@ -1,17 +1,18 @@
PROG = 7zr.exe
-MY_CONSOLE = 1
-CFLAGS = $(CFLAGS) -DPROG_VARIANT_R
-!IFNDEF UNDER_CE
-CFLAGS = $(CFLAGS) -DWIN_LONG_PATH
-!ENDIF
+# USE_C_AES = 1
+# USE_C_SHA = 1
+
+CFLAGS = $(CFLAGS) -DZ7_PROG_VARIANT_R
COMMON_OBJS = \
$O\CommandLineParser.obj \
$O\CRC.obj \
$O\CrcReg.obj \
+ $O\DynLimBuf.obj \
$O\IntToString.obj \
$O\ListFileUtils.obj \
+ $O\LzFindPrepare.obj \
$O\NewHandler.obj \
$O\StdInStream.obj \
$O\StdOutStream.obj \
@@ -22,6 +23,7 @@ COMMON_OBJS = \
$O\UTFConvert.obj \
$O\MyVector.obj \
$O\Wildcard.obj \
+ $O\XzCrc64Init.obj \
$O\XzCrc64Reg.obj \
WIN_OBJS = \
@@ -32,11 +34,13 @@ WIN_OBJS = \
$O\FileIO.obj \
$O\FileLink.obj \
$O\FileName.obj \
+ $O\FileSystem.obj \
$O\MemoryLock.obj \
$O\PropVariant.obj \
$O\PropVariantConv.obj \
- $O\Synchronization.obj \
+ $O\Registry.obj \
$O\System.obj \
+ $O\SystemInfo.obj \
$O\TimeUtils.obj \
7ZIP_COMMON_OBJS = \
@@ -50,6 +54,7 @@ WIN_OBJS = \
$O\LimitedStreams.obj \
$O\MethodId.obj \
$O\MethodProps.obj \
+ $O\MultiOutStream.obj \
$O\OffsetStream.obj \
$O\OutBuffer.obj \
$O\ProgressUtils.obj \
@@ -109,6 +114,8 @@ COMPRESS_OBJS = \
$O\LzmaDecoder.obj \
$O\LzmaEncoder.obj \
$O\LzmaRegister.obj \
+ $O\XzDecoder.obj \
+ $O\XzEncoder.obj \
CRYPTO_OBJS = \
$O\7zAes.obj \
@@ -130,12 +137,14 @@ C_OBJS = \
$O\LzFind.obj \
$O\LzFindMt.obj \
$O\Lzma2Dec.obj \
+ $O\Lzma2DecMt.obj \
$O\Lzma2Enc.obj \
$O\LzmaDec.obj \
$O\LzmaEnc.obj \
$O\MtCoder.obj \
- $O\Sha256.obj \
+ $O\MtDec.obj \
$O\Sort.obj \
+ $O\SwapBytes.obj \
$O\Threads.obj \
$O\Xz.obj \
$O\XzDec.obj \
@@ -147,5 +156,8 @@ C_OBJS = \
!include "../../Aes.mak"
!include "../../Crc.mak"
!include "../../Crc64.mak"
+!include "../../LzFindOpt.mak"
+!include "../../LzmaDec.mak"
+!include "../../Sha256.mak"
!include "../../7zip.mak"
diff --git a/3rdparty/lzma/CPP/7zip/Bundles/Alone7z/makefile.gcc b/3rdparty/lzma/CPP/7zip/Bundles/Alone7z/makefile.gcc
new file mode 100644
index 00000000000..6d92c19bfbd
--- /dev/null
+++ b/3rdparty/lzma/CPP/7zip/Bundles/Alone7z/makefile.gcc
@@ -0,0 +1,276 @@
+PROG = 7zr
+
+CONSOLE_VARIANT_FLAGS=-DZ7_PROG_VARIANT_R
+
+# IS_X64 = 1
+# USE_ASM = 1
+# ST_MODE = 1
+
+ifdef SystemDrive
+IS_MINGW = 1
+else
+ifdef SYSTEMDRIVE
+# ifdef OS
+IS_MINGW = 1
+endif
+endif
+
+include ../../LzmaDec_gcc.mak
+
+
+LOCAL_FLAGS_ST =
+MT_OBJS =
+
+
+ifdef ST_MODE
+
+LOCAL_FLAGS_ST = -DZ7_ST
+
+ifdef IS_MINGW
+MT_OBJS = \
+ $O/Threads.o \
+
+endif
+
+else
+
+MT_OBJS = \
+ $O/LzFindMt.o \
+ $O/LzFindOpt.o \
+ $O/StreamBinder.o \
+ $O/VirtThread.o \
+ $O/Threads.o \
+
+
+
+endif
+
+
+
+LOCAL_FLAGS_SYS =
+
+ifdef IS_MINGW
+
+LOCAL_FLAGS_SYS = \
+ -DZ7_LARGE_PAGES \
+ -DZ7_LONG_PATH \
+ -DZ7_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/DynLimBuf.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/LzFindPrepare.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/MultiOutStream.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/SwapBytes.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
diff --git a/3rdparty/lzma/CPP/7zip/Bundles/Alone7z/resource.rc b/3rdparty/lzma/CPP/7zip/Bundles/Alone7z/resource.rc
index b3fb079a630..593785007a0 100644
--- a/3rdparty/lzma/CPP/7zip/Bundles/Alone7z/resource.rc
+++ b/3rdparty/lzma/CPP/7zip/Bundles/Alone7z/resource.rc
@@ -1,3 +1,7 @@
#include "../../../../C/7zVersion.rc"
MY_VERSION_INFO_APP("7-Zip Reduced Standalone Console", "7zr")
+
+#ifndef UNDER_CE
+1 24 MOVEABLE PURE "../../UI/Console/Console.manifest"
+#endif
diff --git a/3rdparty/lzma/CPP/7zip/Bundles/Format7zExtractR/StdAfx.h b/3rdparty/lzma/CPP/7zip/Bundles/Format7zExtractR/StdAfx.h
index 2854ff3e935..035267ccd02 100644
--- a/3rdparty/lzma/CPP/7zip/Bundles/Format7zExtractR/StdAfx.h
+++ b/3rdparty/lzma/CPP/7zip/Bundles/Format7zExtractR/StdAfx.h
@@ -1,8 +1,11 @@
// StdAfx.h
-#ifndef __STDAFX_H
-#define __STDAFX_H
+#ifndef ZIP7_INC_STDAFX_H
+#define ZIP7_INC_STDAFX_H
+#if defined(_MSC_VER) && _MSC_VER >= 1800
+#pragma warning(disable : 4464) // relative include path contains '..'
+#endif
#include "../../../Common/Common.h"
#endif
diff --git a/3rdparty/lzma/CPP/7zip/Bundles/Format7zExtractR/makefile b/3rdparty/lzma/CPP/7zip/Bundles/Format7zExtractR/makefile
index 724477e9493..50b84d879a2 100644
--- a/3rdparty/lzma/CPP/7zip/Bundles/Format7zExtractR/makefile
+++ b/3rdparty/lzma/CPP/7zip/Bundles/Format7zExtractR/makefile
@@ -1,8 +1,8 @@
PROG = 7zxr.dll
DEF_FILE = ../../Archive/Archive2.def
CFLAGS = $(CFLAGS) \
- -DEXTRACT_ONLY \
- -D_NO_CRYPTO
+ -DZ7_EXTRACT_ONLY \
+ -DZ7_NO_CRYPTO
COMMON_OBJS = \
$O\CRC.obj \
@@ -77,6 +77,7 @@ COMPRESS_OBJS = \
$O\LzmaRegister.obj \
C_OBJS = \
+ $O\7zStream.obj \
$O\Alloc.obj \
$O\Bcj2.obj \
$O\Bra.obj \
@@ -85,9 +86,13 @@ C_OBJS = \
$O\CpuArch.obj \
$O\Delta.obj \
$O\Lzma2Dec.obj \
+ $O\Lzma2DecMt.obj \
$O\LzmaDec.obj \
+ $O\MtDec.obj \
+ $O\SwapBytes.obj \
$O\Threads.obj \
!include "../../Crc.mak"
+!include "../../LzmaDec.mak"
!include "../../7zip.mak"
diff --git a/3rdparty/lzma/CPP/7zip/Bundles/Format7zR/StdAfx.h b/3rdparty/lzma/CPP/7zip/Bundles/Format7zR/StdAfx.h
index 2854ff3e935..035267ccd02 100644
--- a/3rdparty/lzma/CPP/7zip/Bundles/Format7zR/StdAfx.h
+++ b/3rdparty/lzma/CPP/7zip/Bundles/Format7zR/StdAfx.h
@@ -1,8 +1,11 @@
// StdAfx.h
-#ifndef __STDAFX_H
-#define __STDAFX_H
+#ifndef ZIP7_INC_STDAFX_H
+#define ZIP7_INC_STDAFX_H
+#if defined(_MSC_VER) && _MSC_VER >= 1800
+#pragma warning(disable : 4464) // relative include path contains '..'
+#endif
#include "../../../Common/Common.h"
#endif
diff --git a/3rdparty/lzma/CPP/7zip/Bundles/Format7zR/makefile b/3rdparty/lzma/CPP/7zip/Bundles/Format7zR/makefile
index 916dc568c38..24497550475 100644
--- a/3rdparty/lzma/CPP/7zip/Bundles/Format7zR/makefile
+++ b/3rdparty/lzma/CPP/7zip/Bundles/Format7zR/makefile
@@ -1,12 +1,13 @@
PROG = 7zra.dll
DEF_FILE = ../../Archive/Archive2.def
CFLAGS = $(CFLAGS) \
- -D_NO_CRYPTO
+ -DZ7_NO_CRYPTO
COMMON_OBJS = \
$O\CRC.obj \
$O\CrcReg.obj \
$O\IntToString.obj \
+ $O\LzFindPrepare.obj \
$O\NewHandler.obj \
$O\MyString.obj \
$O\StringConvert.obj \
@@ -91,6 +92,7 @@ COMPRESS_OBJS = \
$O\LzmaRegister.obj \
C_OBJS = \
+ $O\7zStream.obj \
$O\Alloc.obj \
$O\Bcj2.obj \
$O\Bcj2Enc.obj \
@@ -102,12 +104,17 @@ C_OBJS = \
$O\LzFind.obj \
$O\LzFindMt.obj \
$O\Lzma2Dec.obj \
+ $O\Lzma2DecMt.obj \
$O\Lzma2Enc.obj \
$O\LzmaDec.obj \
$O\LzmaEnc.obj \
$O\MtCoder.obj \
+ $O\MtDec.obj \
+ $O\SwapBytes.obj \
$O\Threads.obj \
!include "../../Crc.mak"
+!include "../../LzFindOpt.mak"
+!include "../../LzmaDec.mak"
!include "../../7zip.mak"
diff --git a/3rdparty/lzma/CPP/7zip/Bundles/LzmaCon/LzmaAlone.cpp b/3rdparty/lzma/CPP/7zip/Bundles/LzmaCon/LzmaAlone.cpp
index 178753e5373..ac1334f4358 100644
--- a/3rdparty/lzma/CPP/7zip/Bundles/LzmaCon/LzmaAlone.cpp
+++ b/3rdparty/lzma/CPP/7zip/Bundles/LzmaCon/LzmaAlone.cpp
@@ -1,8 +1,8 @@
-// LzmaAlone.cpp
+ // LzmaAlone.cpp
#include "StdAfx.h"
-#include <stdio.h>
+// #include <stdio.h>
#if (defined(_WIN32) || defined(OS2) || defined(MSDOS)) && !defined(UNDER_CE)
#include <fcntl.h>
@@ -12,16 +12,17 @@
#define MY_SET_BINARY_MODE(file)
#endif
-#include "../../../Common/MyWindows.h"
-#include "../../../Common/MyInitGuid.h"
-
+#include "../../../../C/CpuArch.h"
#include "../../../../C/7zVersion.h"
#include "../../../../C/Alloc.h"
#include "../../../../C/Lzma86.h"
+#include "../../../Common/MyWindows.h"
+#include "../../../Common/MyInitGuid.h"
+
#include "../../../Windows/NtCheck.h"
-#ifndef _7ZIP_ST
+#ifndef Z7_ST
#include "../../../Windows/System.h"
#endif
@@ -39,14 +40,18 @@
#include "../../UI/Console/BenchCon.h"
#include "../../UI/Console/ConsoleClose.h"
+extern
+bool g_LargePagesMode;
+bool g_LargePagesMode = false;
+
using namespace NCommandLineParser;
static const unsigned kDictSizeLog = 24;
-static const char *kCopyrightString = "\nLZMA " MY_VERSION_COPYRIGHT_DATE "\n\n";
+#define kCopyrightString "\nLZMA " MY_VERSION_CPU " : " MY_COPYRIGHT_DATE "\n\n"
-static const char *kHelpString =
- "Usage: LZMA <command> [inputFile] [outputFile] [<switches>...]\n"
+static const char * const kHelpString =
+ "Usage: lzma <command> [inputFile] [outputFile] [<switches>...]\n"
"\n"
"<command>\n"
" e : Encode file\n"
@@ -67,9 +72,9 @@ static const char *kHelpString =
" -so : write data to stdout\n";
-static const char *kCantAllocate = "Can not allocate memory";
-static const char *kReadError = "Read error";
-static const char *kWriteError = "Write error";
+static const char * const kCantAllocate = "Cannot allocate memory";
+static const char * const kReadError = "Read error";
+static const char * const kWriteError = "Write error";
namespace NKey {
@@ -95,28 +100,51 @@ 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, "+" }
};
+static void Convert_UString_to_AString(const UString &s, AString &temp)
+{
+ int codePage = CP_OEMCP;
+ /*
+ int g_CodePage = -1;
+ int codePage = g_CodePage;
+ if (codePage == -1)
+ codePage = CP_OEMCP;
+ if (codePage == CP_UTF8)
+ ConvertUnicodeToUTF8(s, temp);
+ else
+ */
+ UnicodeStringToMultiByte2(temp, s, (UINT)codePage);
+}
+
static void PrintErr(const char *s)
{
fputs(s, stderr);
@@ -135,10 +163,12 @@ static void PrintError(const char *s)
PrintErr_LF(s);
}
-static void PrintError2(const char *s1, const wchar_t *s2)
+static void PrintError2(const char *s1, const UString &s2)
{
PrintError(s1);
- PrintErr_LF(GetOemString(s2));
+ AString a;
+ Convert_UString_to_AString(s2, a);
+ PrintErr_LF(a);
}
static void PrintError_int(const char *s, int code)
@@ -190,25 +220,22 @@ static void PrintHelp()
Print(kHelpString);
}
-class CProgressPrint:
- public ICompressProgressInfo,
- public CMyUnknownImp
-{
+
+Z7_CLASS_IMP_COM_1(
+ CProgressPrint,
+ ICompressProgressInfo
+)
UInt64 _size1;
UInt64 _size2;
public:
CProgressPrint(): _size1(0), _size2(0) {}
void ClosePrint();
-
- MY_UNKNOWN_IMP1(ICompressProgressInfo)
-
- STDMETHOD(SetRatioInfo)(const UInt64 *inSize, const UInt64 *outSize);
};
#define BACK_STR \
"\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b"
-static const char *kBackSpaces =
+static const char * const kBackSpaces =
BACK_STR
" "
BACK_STR;
@@ -219,7 +246,7 @@ void CProgressPrint::ClosePrint()
Print(kBackSpaces);
}
-STDMETHODIMP CProgressPrint::SetRatioInfo(const UInt64 *inSize, const UInt64 *outSize)
+Z7_COM7F_IMF(CProgressPrint::SetRatioInfo(const UInt64 *inSize, const UInt64 *outSize))
{
if (NConsoleClose::TestBreakSignal())
return E_ABORT;
@@ -243,6 +270,7 @@ STDMETHODIMP CProgressPrint::SetRatioInfo(const UInt64 *inSize, const UInt64 *ou
}
+Z7_ATTR_NORETURN
static void IncorrectCommand()
{
throw "Incorrect command";
@@ -286,19 +314,21 @@ static int Error_HRESULT(const char *s, HRESULT res)
else
{
char temp[32];
- ConvertUInt32ToHex(res, temp);
+ ConvertUInt32ToHex((UInt32)res, temp);
PrintErr("Error code = 0x");
PrintErr_LF(temp);
}
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)
{
CProperty &prop = props2.AddNew();
- prop.Name.SetFromAscii(name);
+ prop.Name = name;
prop.Value = val;
}
@@ -322,10 +352,10 @@ static int main2(int numArgs, const char *args[])
for (int i = 1; i < numArgs; i++)
commandStrings.Add(MultiByteToUnicodeString(args[i]));
- CParser parser(ARRAY_SIZE(kSwitchForms));
+ CParser parser;
try
{
- if (!parser.ParseStrings(kSwitchForms, commandStrings))
+ if (!parser.ParseStrings(kSwitchForms, Z7_ARRAY_SIZE(kSwitchForms), commandStrings))
{
PrintError2(parser.ErrorMessage, parser.ErrorLine);
return 1;
@@ -376,13 +406,13 @@ static int main2(int numArgs, const char *args[])
AddProp(props2, "x", s);
}
- UString mf = L"BT4";
+ UString mf ("BT4");
if (parser[NKey::kMatchFinder].ThereIs)
mf = parser[NKey::kMatchFinder].PostStrings[0];
UInt32 numThreads = (UInt32)(Int32)-1;
- #ifndef _7ZIP_ST
+ #ifndef Z7_ST
if (parser[NKey::kMultiThread].ThereIs)
{
@@ -453,7 +483,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;
}
}
@@ -473,7 +503,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;
}
}
@@ -483,8 +513,8 @@ static int main2(int numArgs, const char *args[])
if (inStreamSpec)
{
- if (!inStreamSpec->File.GetLength(fileSize))
- throw "Can not get file length";
+ if (!inStreamSpec->GetLength(fileSize))
+ throw "Cannot get file length";
fileSizeDefined = true;
if (!stdOutMode)
Print_Size("Input size: ", fileSize);
@@ -511,7 +541,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;
@@ -528,7 +558,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;
@@ -644,7 +674,7 @@ static int main2(int numArgs, const char *args[])
NCoderPropID::kMatchFinderCycles,
};
- const unsigned kNumPropsMax = ARRAY_SIZE(propIDs);
+ const unsigned kNumPropsMax = Z7_ARRAY_SIZE(propIDs);
PROPVARIANT props[kNumPropsMax];
for (int p = 0; p < 6; p++)
@@ -725,7 +755,7 @@ static int main2(int numArgs, const char *args[])
throw "SetDecoderProperties error";
UInt64 unpackSize = 0;
- for (int i = 0; i < 8; i++)
+ for (unsigned i = 0; i < 8; i++)
unpackSize |= ((UInt64)header[kPropertiesSize + i]) << (8 * i);
bool unpackSizeDefined = (unpackSize != (UInt64)(Int64)-1);
@@ -760,7 +790,7 @@ static int main2(int numArgs, const char *args[])
return 0;
}
-int MY_CDECL main(int numArgs, const char *args[])
+int Z7_CDECL main(int numArgs, const char *args[])
{
NConsoleClose::CCtrlHandlerSetter ctrlHandlerSetter;
diff --git a/3rdparty/lzma/CPP/7zip/Bundles/LzmaCon/LzmaCon.dsp b/3rdparty/lzma/CPP/7zip/Bundles/LzmaCon/LzmaCon.dsp
index f8267a11f24..5a8911b25c2 100644
--- a/3rdparty/lzma/CPP/7zip/Bundles/LzmaCon/LzmaCon.dsp
+++ b/3rdparty/lzma/CPP/7zip/Bundles/LzmaCon/LzmaCon.dsp
@@ -132,6 +132,10 @@ SOURCE=..\..\..\Windows\FileIO.h
# End Source File
# Begin Source File
+SOURCE=..\..\..\Windows\NtCheck.h
+# End Source File
+# Begin Source File
+
SOURCE=..\..\..\Windows\PropVariant.cpp
# End Source File
# Begin Source File
@@ -140,11 +144,11 @@ SOURCE=..\..\..\Windows\PropVariant.h
# End Source File
# Begin Source File
-SOURCE=..\..\..\Windows\Synchronization.cpp
+SOURCE=..\..\..\Windows\Registry.cpp
# End Source File
# Begin Source File
-SOURCE=..\..\..\Windows\Synchronization.h
+SOURCE=..\..\..\Windows\Registry.h
# End Source File
# Begin Source File
@@ -156,6 +160,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
@@ -172,6 +184,10 @@ SOURCE=..\..\..\Common\CommandLineParser.h
# End Source File
# Begin Source File
+SOURCE=..\..\..\Common\Common.h
+# End Source File
+# Begin Source File
+
SOURCE=..\..\..\Common\ComTry.h
# End Source File
# Begin Source File
@@ -196,10 +212,30 @@ SOURCE=..\..\..\Common\IntToString.h
# End Source File
# Begin Source File
+SOURCE=..\..\..\Common\LzFindPrepare.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\Common\MyBuffer.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\Common\MyBuffer2.h
+# End Source File
+# Begin Source File
+
SOURCE=..\..\..\Common\MyCom.h
# End Source File
# Begin Source File
+SOURCE=..\..\..\Common\MyInitGuid.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\Common\MyLinux.h
+# End Source File
+# Begin Source File
+
SOURCE=..\..\..\Common\MyString.cpp
# End Source File
# Begin Source File
@@ -208,6 +244,10 @@ SOURCE=..\..\..\Common\MyString.h
# End Source File
# Begin Source File
+SOURCE=..\..\..\Common\MyTypes.h
+# End Source File
+# Begin Source File
+
SOURCE=..\..\..\Common\MyUnknown.h
# End Source File
# Begin Source File
@@ -254,6 +294,14 @@ SOURCE=..\..\..\Common\StringToInt.h
SOURCE=..\..\..\Common\Types.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"
@@ -300,6 +348,14 @@ SOURCE=..\..\Common\MethodProps.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
@@ -318,14 +374,6 @@ SOURCE=..\..\UI\Common\Bench.cpp
SOURCE=..\..\UI\Common\Bench.h
# End Source File
-# Begin Source File
-
-SOURCE=..\..\UI\Common\LoadCodecs.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\UI\Common\LoadCodecs.h
-# End Source File
# End Group
# Begin Group "Console"
@@ -370,21 +418,16 @@ SOURCE=..\..\..\..\C\7zTypes.h
# End Source File
# Begin Source File
-SOURCE=..\..\..\..\C\Alloc.c
-# SUBTRACT CPP /YX /Yc /Yu
+SOURCE=..\..\..\..\C\7zWindows.h
# End Source File
# Begin Source File
-SOURCE=..\..\..\..\C\Alloc.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\..\..\C\Bra.c
+SOURCE=..\..\..\..\C\Alloc.c
# SUBTRACT CPP /YX /Yc /Yu
# End Source File
# Begin Source File
-SOURCE=..\..\..\..\C\Bra.h
+SOURCE=..\..\..\..\C\Alloc.h
# End Source File
# Begin Source File
@@ -393,8 +436,7 @@ SOURCE=..\..\..\..\C\Bra86.c
# End Source File
# Begin Source File
-SOURCE=..\..\..\..\C\BraIA64.c
-# SUBTRACT CPP /YX /Yc /Yu
+SOURCE=..\..\..\..\C\Compiler.h
# End Source File
# Begin Source File
@@ -425,6 +467,11 @@ SOURCE=..\..\..\..\C\LzFindMt.h
# End Source File
# Begin Source File
+SOURCE=..\..\..\..\C\LzFindOpt.c
+# SUBTRACT CPP /YX /Yc /Yu
+# End Source File
+# Begin Source File
+
SOURCE=..\..\..\..\C\LzHash.h
# End Source File
# Begin Source File
@@ -469,6 +516,22 @@ SOURCE=..\..\..\..\C\Threads.c
SOURCE=..\..\..\..\C\Threads.h
# End Source File
# End Group
+# Begin Group "7zip"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=..\..\ICoder.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\IDecl.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\IProgress.h
+# End Source File
+# End Group
# Begin Source File
SOURCE=.\LzmaAlone.cpp
diff --git a/3rdparty/lzma/CPP/7zip/Bundles/LzmaCon/StdAfx.h b/3rdparty/lzma/CPP/7zip/Bundles/LzmaCon/StdAfx.h
index 2854ff3e935..035267ccd02 100644
--- a/3rdparty/lzma/CPP/7zip/Bundles/LzmaCon/StdAfx.h
+++ b/3rdparty/lzma/CPP/7zip/Bundles/LzmaCon/StdAfx.h
@@ -1,8 +1,11 @@
// StdAfx.h
-#ifndef __STDAFX_H
-#define __STDAFX_H
+#ifndef ZIP7_INC_STDAFX_H
+#define ZIP7_INC_STDAFX_H
+#if defined(_MSC_VER) && _MSC_VER >= 1800
+#pragma warning(disable : 4464) // relative include path contains '..'
+#endif
#include "../../../Common/Common.h"
#endif
diff --git a/3rdparty/lzma/CPP/7zip/Bundles/LzmaCon/makefile b/3rdparty/lzma/CPP/7zip/Bundles/LzmaCon/makefile
index 54919f73374..f303c31fd10 100644
--- a/3rdparty/lzma/CPP/7zip/Bundles/LzmaCon/makefile
+++ b/3rdparty/lzma/CPP/7zip/Bundles/LzmaCon/makefile
@@ -1,6 +1,8 @@
PROG = lzma.exe
MY_CONSOLE = 1
-CFLAGS = $(CFLAGS)
+
+# CFLAGS = $(CFLAGS) -DZ7_ST
+
CURRENT_OBJS = \
$O\LzmaAlone.obj \
@@ -15,24 +17,28 @@ COMMON_OBJS = \
$O\CRC.obj \
$O\CrcReg.obj \
$O\IntToString.obj \
+ $O\LzFindPrepare.obj \
$O\MyString.obj \
+ $O\MyVector.obj \
$O\NewHandler.obj \
$O\StringConvert.obj \
$O\StringToInt.obj \
- $O\MyVector.obj
+ $O\Wildcard.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\StreamObjects.obj \
$O\StreamUtils.obj \
UI_COMMON_OBJS = \
@@ -55,5 +61,7 @@ C_OBJS = \
$O\Threads.obj \
!include "../../Crc.mak"
+!include "../../LzFindOpt.mak"
+!include "../../LzmaDec.mak"
!include "../../7zip.mak"
diff --git a/3rdparty/lzma/CPP/7zip/Bundles/LzmaCon/makefile.gcc b/3rdparty/lzma/CPP/7zip/Bundles/LzmaCon/makefile.gcc
index 97fe450841f..dd19a0e6a56 100644
--- a/3rdparty/lzma/CPP/7zip/Bundles/LzmaCon/makefile.gcc
+++ b/3rdparty/lzma/CPP/7zip/Bundles/LzmaCon/makefile.gcc
@@ -1,195 +1,126 @@
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
-
-RM = del
-CFLAGS = -c
-LIB2 = -loleaut32 -luuid
-LDFLAGS = -s
+include ../../LzmaDec_gcc.mak
-FILE_IO =FileIO
-FILE_IO_2 =Windows/$(FILE_IO)
+LOCAL_FLAGS_ST =
+MT_OBJS =
-MT_FILES = \
- LzFindMt.o \
- Threads.o \
+ifdef SystemDrive
+IS_MINGW = 1
else
-
-RM = rm -f
-CFLAGS = -c -D_7ZIP_ST
-
-FILE_IO =C_FileIO
-FILE_IO_2 =Common/$(FILE_IO)
-
-
+ifdef SYSTEMDRIVE
+# ifdef OS
+IS_MINGW = 1
+endif
endif
+ifdef ST_MODE
-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 \
-
-
-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
+LOCAL_FLAGS_ST = -DZ7_ST
-MyWindows.o: ../../../Common/MyWindows.cpp
- $(CXX) $(CFLAGS) ../../../Common/MyWindows.cpp
+else
-StringConvert.o: ../../../Common/StringConvert.cpp
- $(CXX) $(CFLAGS) ../../../Common/StringConvert.cpp
+MT_OBJS = \
+ $O/LzFindMt.o \
+ $O/LzFindOpt.o \
+ $O/Synchronization.o \
+ $O/Threads.o \
-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
+endif
-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
+LOCAL_FLAGS_SYS =
-Bra86.o: ../../../../C/Bra86.c
- $(CXX_C) $(CFLAGS) ../../../../C/Bra86.c
+ifdef IS_MINGW
-CpuArch.o: ../../../../C/CpuArch.c
- $(CXX_C) $(CFLAGS) ../../../../C/CpuArch.c
+SYS_OBJS = \
+ $O/Registry.o \
+ $O/resource.o \
-LzFind.o: ../../../../C/LzFind.c
- $(CXX_C) $(CFLAGS) ../../../../C/LzFind.c
+else
-ifdef MT_FILES
-LzFindMt.o: ../../../../C/LzFindMt.c
- $(CXX_C) $(CFLAGS) ../../../../C/LzFindMt.c
+SYS_OBJS = \
+ $O/FileDir.o \
+ $O/FileFind.o \
+ $O/FileName.o \
+ $O/MyWindows.o \
+ $O/TimeUtils.o \
-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
+LOCAL_FLAGS = \
+ $(LOCAL_FLAGS_ST) \
+
+
+COMMON_OBJS = \
+ $O/CommandLineParser.o \
+ $O/CRC.o \
+ $O/CrcReg.o \
+ $O/IntToString.o \
+ $O/LzFindPrepare.o \
+ $O/MyString.o \
+ $O/MyVector.o \
+ $O/NewHandler.o \
+ $O/StringConvert.o \
+ $O/StringToInt.o \
+ $O/UTFConvert.o \
+ $O/Wildcard.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/StreamObjects.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 \
-Lzma86Enc.o: ../../../../C/Lzma86Enc.c
- $(CXX_C) $(CFLAGS) ../../../../C/Lzma86Enc.c
-
-clean:
- -$(RM) $(PROG) $(OBJS)
+OBJS = \
+ $(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 \
+
+include ../../7zip_gcc.mak
diff --git a/3rdparty/lzma/CPP/7zip/Bundles/SFXCon/SFXCon.dsp b/3rdparty/lzma/CPP/7zip/Bundles/SFXCon/SFXCon.dsp
index b21b9e841e5..1bb063dbc04 100644
--- a/3rdparty/lzma/CPP/7zip/Bundles/SFXCon/SFXCon.dsp
+++ b/3rdparty/lzma/CPP/7zip/Bundles/SFXCon/SFXCon.dsp
@@ -42,7 +42,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 /MD /W4 /WX /GX /O1 /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "EXTRACT_ONLY" /D "_SFX" /D "NO_READ_FROM_CODER" /Yu"StdAfx.h" /FD /c
+# ADD CPP /nologo /Gr /MD /W4 /WX /GX /O1 /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "Z7_EXTRACT_ONLY" /D "Z7_SFX" /D "Z7_NO_READ_FROM_CODER" /FAcs /Yu"StdAfx.h" /FD /c
# ADD BASE RSC /l 0x419 /d "NDEBUG"
# ADD RSC /l 0x419 /d "NDEBUG"
BSC32=bscmake.exe
@@ -67,7 +67,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 /MTd /W4 /WX /Gm /GX /ZI /Od /I "..\..\..\..\\" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "EXTRACT_ONLY" /D "_SFX" /D "NO_READ_FROM_CODER" /Yu"StdAfx.h" /FD /GZ /c
+# ADD CPP /nologo /Gz /MTd /W4 /WX /Gm /GX /ZI /Od /I "..\..\..\..\\" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "Z7_EXTRACT_ONLY" /D "Z7_SFX" /D "Z7_NO_READ_FROM_CODER" /Yu"StdAfx.h" /FD /GZ /c
# ADD BASE RSC /l 0x419 /d "_DEBUG"
# ADD RSC /l 0x419 /d "_DEBUG"
BSC32=bscmake.exe
@@ -117,6 +117,10 @@ SOURCE=..\..\Archive\Common\CoderMixer2.h
# End Source File
# Begin Source File
+SOURCE=..\..\Archive\Common\HandlerOut.h
+# End Source File
+# Begin Source File
+
SOURCE=..\..\Archive\Common\ItemNameUtils.cpp
# End Source File
# Begin Source File
@@ -253,6 +257,10 @@ SOURCE=..\..\Compress\Bcj2Coder.cpp
# End Source File
# Begin Source File
+SOURCE=..\..\Compress\Bcj2Coder.h
+# End Source File
+# Begin Source File
+
SOURCE=..\..\Compress\Bcj2Register.cpp
# End Source File
# Begin Source File
@@ -261,6 +269,10 @@ SOURCE=..\..\Compress\BcjCoder.cpp
# End Source File
# Begin Source File
+SOURCE=..\..\Compress\BcjCoder.h
+# End Source File
+# Begin Source File
+
SOURCE=..\..\Compress\BcjRegister.cpp
# End Source File
# Begin Source File
@@ -281,6 +293,10 @@ SOURCE=..\..\Compress\CopyCoder.cpp
# End Source File
# Begin Source File
+SOURCE=..\..\Compress\CopyCoder.h
+# End Source File
+# Begin Source File
+
SOURCE=..\..\Compress\CopyRegister.cpp
# End Source File
# Begin Source File
@@ -293,6 +309,10 @@ SOURCE=..\..\Compress\Lzma2Decoder.cpp
# End Source File
# Begin Source File
+SOURCE=..\..\Compress\Lzma2Decoder.h
+# End Source File
+# Begin Source File
+
SOURCE=..\..\Compress\Lzma2Register.cpp
# End Source File
# Begin Source File
@@ -301,6 +321,10 @@ SOURCE=..\..\Compress\LzmaDecoder.cpp
# End Source File
# Begin Source File
+SOURCE=..\..\Compress\LzmaDecoder.h
+# End Source File
+# Begin Source File
+
SOURCE=..\..\Compress\LzmaRegister.cpp
# End Source File
# Begin Source File
@@ -309,6 +333,10 @@ SOURCE=..\..\Compress\PpmdDecoder.cpp
# End Source File
# Begin Source File
+SOURCE=..\..\Compress\PpmdDecoder.h
+# End Source File
+# Begin Source File
+
SOURCE=..\..\Compress\PpmdRegister.cpp
# End Source File
# End Group
@@ -411,6 +439,14 @@ SOURCE=..\..\..\Windows\Synchronization.cpp
SOURCE=..\..\..\Windows\Synchronization.h
# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\Windows\System.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\Windows\System.h
+# End Source File
# End Group
# Begin Group "Common"
@@ -425,6 +461,10 @@ SOURCE=..\..\..\Common\CommandLineParser.h
# End Source File
# Begin Source File
+SOURCE=..\..\..\Common\Common.h
+# End Source File
+# Begin Source File
+
SOURCE=..\..\..\Common\CRC.cpp
# End Source File
# Begin Source File
@@ -441,6 +481,18 @@ SOURCE=..\..\..\Common\IntToString.h
# End Source File
# Begin Source File
+SOURCE=..\..\..\Common\MyBuffer.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\Common\MyBuffer2.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\Common\MyCom.h
+# End Source File
+# Begin Source File
+
SOURCE=..\..\..\Common\MyString.cpp
# End Source File
# Begin Source File
@@ -465,6 +517,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
@@ -739,6 +795,19 @@ SOURCE=..\..\..\..\C\7zCrcOpt.c
# End Source File
# Begin Source File
+SOURCE=..\..\..\..\C\7zStream.c
+# SUBTRACT CPP /YX /Yc /Yu
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\C\7zTypes.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\C\7zWindows.h
+# End Source File
+# Begin Source File
+
SOURCE=..\..\..\..\C\Aes.c
# SUBTRACT CPP /YX /Yc /Yu
# End Source File
@@ -790,11 +859,19 @@ SOURCE=..\..\..\..\C\BraIA64.c
# End Source File
# Begin Source File
+SOURCE=..\..\..\..\C\Compiler.h
+# End Source File
+# Begin Source File
+
SOURCE=..\..\..\..\C\CpuArch.c
# SUBTRACT CPP /YX /Yc /Yu
# End Source File
# Begin Source File
+SOURCE=..\..\..\..\C\CpuArch.h
+# End Source File
+# Begin Source File
+
SOURCE=..\..\..\..\C\Delta.c
# SUBTRACT CPP /YX /Yc /Yu
# End Source File
@@ -805,7 +882,18 @@ SOURCE=..\..\..\..\C\Delta.h
# Begin Source File
SOURCE=..\..\..\..\C\DllSecur.c
+
+!IF "$(CFG)" == "SFXCon - Win32 Release"
+
+# ADD CPP /O2
+# SUBTRACT CPP /YX /Yc /Yu
+
+!ELSEIF "$(CFG)" == "SFXCon - Win32 Debug"
+
# SUBTRACT CPP /YX /Yc /Yu
+
+!ENDIF
+
# End Source File
# Begin Source File
@@ -822,6 +910,15 @@ SOURCE=..\..\..\..\C\Lzma2Dec.h
# End Source File
# Begin Source File
+SOURCE=..\..\..\..\C\Lzma2DecMt.c
+# SUBTRACT CPP /YX /Yc /Yu
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\C\Lzma2DecMt.h
+# End Source File
+# Begin Source File
+
SOURCE=..\..\..\..\C\LzmaDec.c
# SUBTRACT CPP /YX /Yc /Yu
# End Source File
@@ -831,6 +928,15 @@ SOURCE=..\..\..\..\C\LzmaDec.h
# End Source File
# Begin Source File
+SOURCE=..\..\..\..\C\MtDec.c
+# SUBTRACT CPP /YX /Yc /Yu
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\C\MtDec.h
+# End Source File
+# Begin Source File
+
SOURCE=..\..\..\..\C\Ppmd7.c
# SUBTRACT CPP /YX /Yc /Yu
# End Source File
@@ -854,6 +960,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
@@ -862,13 +973,33 @@ SOURCE=..\..\..\..\C\Threads.c
SOURCE=..\..\..\..\C\Threads.h
# End Source File
# End Group
+# Begin Group "7zip"
+
+# PROP Default_Filter ""
# Begin Source File
-SOURCE=.\7z.ico
+SOURCE=..\..\Archive\IArchive.h
# End Source File
# Begin Source File
-SOURCE=..\..\Archive\IArchive.h
+SOURCE=..\..\ICoder.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\IDecl.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\IPassword.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\IProgress.h
+# End Source File
+# End Group
+# Begin Source File
+
+SOURCE=.\7z.ico
# End Source File
# Begin Source File
diff --git a/3rdparty/lzma/CPP/7zip/Bundles/SFXCon/SfxCon.cpp b/3rdparty/lzma/CPP/7zip/Bundles/SFXCon/SfxCon.cpp
index d828922f314..cfce24d95f9 100644
--- a/3rdparty/lzma/CPP/7zip/Bundles/SFXCon/SfxCon.cpp
+++ b/3rdparty/lzma/CPP/7zip/Bundles/SFXCon/SfxCon.cpp
@@ -2,8 +2,10 @@
#include "StdAfx.h"
-#include "../../../Common/MyWindows.h"
+#include "../../../../C/CpuArch.h"
+#include "../../../../C/DllSecur.h"
+#include "../../../Common/MyWindows.h"
#include "../../../Common/MyInitGuid.h"
#include "../../../Common/CommandLineParser.h"
@@ -11,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"
@@ -24,7 +28,6 @@
#include "../../MyVersion.h"
-#include "../../../../C/DllSecur.h"
using namespace NWindows;
using namespace NFile;
@@ -32,13 +35,17 @@ using namespace NDir;
using namespace NCommandLineParser;
#ifdef _WIN32
-HINSTANCE g_hInstance = 0;
+extern
+HINSTANCE g_hInstance;
+HINSTANCE g_hInstance = NULL;
#endif
+extern
+int g_CodePage;
int g_CodePage = -1;
extern CStdOutStream *g_StdStream;
-static const char *kCopyrightString =
-"\n7-Zip SFX " MY_VERSION_COPYRIGHT_DATE "\n";
+static const char * const kCopyrightString =
+"\n7-Zip SFX " MY_VERSION_CPU " : " MY_COPYRIGHT_DATE "\n";
static const int kNumSwitches = 6;
@@ -65,7 +72,6 @@ enum EEnum
}
/*
static const char kRecursedIDChar = 'R';
-static const wchar_t *kRecursedPostCharSet = L"0-";
namespace NRecursedPostCharIndex {
enum EEnum
@@ -81,14 +87,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;
@@ -101,10 +113,9 @@ static const NRecursedType::EEnum kCommandRecursedDefault[kNumCommandForms] =
// static const bool kTestExtractRecursedDefault = true;
// static const bool kAddRecursedDefault = false;
-static const wchar_t *kUniversalWildcard = L"*";
-static const int kCommandIndex = 0;
+static const char * const kUniversalWildcard = "*";
-static const char *kHelpString =
+static const char * const kHelpString =
"\nUsage: 7zSFX [<command>] [<switches>...] [<file_name>...]\n"
"\n"
"<Commands>\n"
@@ -121,16 +132,16 @@ static const char *kHelpString =
// ---------------------------
// 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 char * const kUserErrorMessage = "Incorrect command line"; // NExitCode::kUserError
+// static const char * const kIncorrectListFile = "Incorrect wildcard in listfile";
+static const char * const 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 * const kProcessArchiveMessage = " archive: ";
-static const char *kCantFindSFX = " cannot find sfx";
+static const char * const kCantFindSFX = " cannot find sfx";
namespace NCommandType
{
@@ -151,7 +162,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();
@@ -171,17 +182,19 @@ NRecursedType::EEnum CArchiveCommand::DefaultRecursedType() const
return kCommandRecursedDefault[CommandType];
}
-void PrintHelp(void)
+static void PrintHelp(void)
{
g_StdOut << kHelpString;
}
+Z7_ATTR_NORETURN
static void ShowMessageAndThrowException(const char *message, NExitCode::EEnum code)
{
g_StdOut << message << endl;
throw code;
}
+Z7_ATTR_NORETURN
static void PrintHelpAndExit() // yyy
{
PrintHelp();
@@ -198,7 +211,7 @@ static bool AddNameToCensor(NWildcard::CCensor &wildcardCensor,
if (!IsWildcardFilePathLegal(name))
return false;
*/
- bool isWildcard = DoesNameContainWildcard(name);
+ const bool isWildcard = DoesNameContainWildcard(name);
bool recursed = false;
switch (type)
@@ -213,11 +226,14 @@ static bool AddNameToCensor(NWildcard::CCensor &wildcardCensor,
recursed = false;
break;
}
- wildcardCensor.AddPreItem(include, name, recursed, true);
+
+ NWildcard::CCensorPathProps props;
+ props.Recursive = recursed;
+ wildcardCensor.AddPreItem(include, name, props);
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))
@@ -226,7 +242,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++)
@@ -237,9 +253,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
)
{
@@ -252,6 +274,10 @@ int Main2(
SetFileApisToOEM();
#endif
+ #ifdef ENV_HAVE_LOCALE
+ MY_SetLocale();
+ #endif
+
g_StdOut << kCopyrightString;
UStringVector commandStrings;
@@ -276,17 +302,23 @@ int Main2(
#else
- UString arcPath = commandStrings.Front();
+ if (commandStrings.IsEmpty())
+ return NExitCode::kFatalError;
+
+ const FString arcPath = us2fs(commandStrings.Front());
#endif
- commandStrings.Delete(0);
+ #ifndef UNDER_CE
+ if (commandStrings.Size() > 0)
+ commandStrings.Delete(0);
+ #endif
- NCommandLineParser::CParser parser(kNumSwitches);
+ NCommandLineParser::CParser parser;
try
{
- if (!parser.ParseStrings(kSwitchForms, commandStrings))
+ if (!parser.ParseStrings(kSwitchForms, kNumSwitches, commandStrings))
{
g_StdOut << "Command line error:" << endl
<< parser.ErrorMessage << endl
@@ -331,7 +363,7 @@ int Main2(
{
if (nonSwitchStrings.Size() == curCommandIndex)
- AddCommandLineWildcardToCensor(wildcardCensor, kUniversalWildcard, true, recursedType);
+ AddCommandLineWildcardToCensor(wildcardCensor, (UString)kUniversalWildcard, true, recursedType);
for (; curCommandIndex < nonSwitchStrings.Size(); curCommandIndex++)
{
const UString &s = nonSwitchStrings[curCommandIndex];
@@ -341,18 +373,18 @@ int Main2(
}
}
- bool yesToAll = parser[NKey::kYes].ThereIs;
+ const bool yesToAll = parser[NKey::kYes].ThereIs;
// NExtractMode::EEnum extractMode;
// bool isExtractGroupCommand = command.IsFromExtractGroup(extractMode);
- bool passwordEnabled = parser[NKey::kPassword].ThereIs;
+ const bool passwordEnabled = parser[NKey::kPassword].ThereIs;
UString password;
if (passwordEnabled)
password = parser[NKey::kPassword].PostStrings[0];
- if (!NFind::DoesFileExist(arcPath))
+ if (!NFind::DoesFileExist_FollowLink(arcPath))
throw kCantFindSFX;
FString outputDir;
@@ -374,7 +406,7 @@ int Main2(
CCodecs *codecs = new CCodecs;
CMyComPtr<
- #ifdef EXTERNAL_CODECS
+ #ifdef Z7_EXTERNAL_CODECS
ICompressCodecsInfo
#else
IUnknown
@@ -392,7 +424,7 @@ int Main2(
CMyComPtr<IFolderArchiveExtractCallback> extractCallback = ecs;
ecs->Init(g_StdStream, &g_StdErr, g_StdStream);
- #ifndef _NO_CRYPTO
+ #ifndef Z7_NO_CRYPTO
ecs->PasswordIsDefined = passwordEnabled;
ecs->Password = password;
#endif
@@ -401,7 +433,7 @@ int Main2(
COpenCallbackConsole openCallback;
openCallback.Init(g_StdStream, g_StdStream);
- #ifndef _NO_CRYPTO
+ #ifndef Z7_NO_CRYPTO
openCallback.PasswordIsDefined = passwordEnabled;
openCallback.Password = password;
#endif
@@ -423,22 +455,33 @@ int Main2(
codecs, CObjectVector<COpenType>(), CIntVector(),
v1, v2,
wildcardCensorHead,
- eo, ecs, ecs,
+ eo,
+ ecs, ecs, ecs,
// NULL, // hash
errorMessage, stat);
+
+ ecs->ClosePercents();
+
if (!errorMessage.IsEmpty())
{
- (*g_StdStream) << endl << "Error: " << errorMessage;;
+ (*g_StdStream) << endl << "Error: " << errorMessage;
if (result == S_OK)
result = E_FAIL;
}
- if (ecs->NumArcsWithError != 0 || ecs->NumFileErrors != 0)
+ if ( 0 != ecs->NumCantOpenArcs
+ || 0 != ecs->NumArcsWithError
+ || 0 != ecs->NumFileErrors
+ || 0 != ecs->NumOpenArcErrors)
{
+ if (ecs->NumCantOpenArcs != 0)
+ (*g_StdStream) << endl << "Can't open as archive" << endl;
if (ecs->NumArcsWithError != 0)
(*g_StdStream) << endl << "Archive Errors" << endl;
if (ecs->NumFileErrors != 0)
(*g_StdStream) << endl << "Sub items Errors: " << ecs->NumFileErrors << endl;
+ if (ecs->NumOpenArcErrors != 0)
+ (*g_StdStream) << endl << "Open Errors: " << ecs->NumOpenArcErrors << endl;
return NExitCode::kFatalError;
}
if (result != S_OK)
@@ -460,7 +503,7 @@ int Main2(
wildcardCensorHead,
true, // enableHeaders
false, // techMode
- #ifndef _NO_CRYPTO
+ #ifndef Z7_NO_CRYPTO
passwordEnabled, password,
#endif
numErrors, numWarnings);
diff --git a/3rdparty/lzma/CPP/7zip/Bundles/SFXCon/StdAfx.h b/3rdparty/lzma/CPP/7zip/Bundles/SFXCon/StdAfx.h
index 2854ff3e935..035267ccd02 100644
--- a/3rdparty/lzma/CPP/7zip/Bundles/SFXCon/StdAfx.h
+++ b/3rdparty/lzma/CPP/7zip/Bundles/SFXCon/StdAfx.h
@@ -1,8 +1,11 @@
// StdAfx.h
-#ifndef __STDAFX_H
-#define __STDAFX_H
+#ifndef ZIP7_INC_STDAFX_H
+#define ZIP7_INC_STDAFX_H
+#if defined(_MSC_VER) && _MSC_VER >= 1800
+#pragma warning(disable : 4464) // relative include path contains '..'
+#endif
#include "../../../Common/Common.h"
#endif
diff --git a/3rdparty/lzma/CPP/7zip/Bundles/SFXCon/makefile b/3rdparty/lzma/CPP/7zip/Bundles/SFXCon/makefile
index 4c201c00a70..51aaf51658d 100644
--- a/3rdparty/lzma/CPP/7zip/Bundles/SFXCon/makefile
+++ b/3rdparty/lzma/CPP/7zip/Bundles/SFXCon/makefile
@@ -1,10 +1,11 @@
PROG = 7zCon.sfx
MY_CONSOLE = 1
+MY_FIXED = 1
+
CFLAGS = $(CFLAGS) \
- -DEXTRACT_ONLY \
- -DNO_READ_FROM_CODER \
- -D_SFX \
- -D_CONSOLE \
+ -DZ7_EXTRACT_ONLY \
+ -DZ7_NO_READ_FROM_CODER \
+ -DZ7_SFX \
CURRENT_OBJS = \
$O\SfxCon.obj \
@@ -28,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 \
@@ -41,6 +42,7 @@ WIN_OBJS = \
$O\PropVariant.obj \
$O\PropVariantConv.obj \
$O\Synchronization.obj \
+ $O\System.obj \
7ZIP_COMMON_OBJS = \
$O\CreateCoder.obj \
@@ -62,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 \
@@ -77,7 +79,6 @@ AR_COMMON_OBJS = \
$O\MultiStream.obj \
$O\OutStreamWithCRC.obj \
-
7Z_OBJS = \
$O\7zDecode.obj \
$O\7zExtract.obj \
@@ -108,6 +109,7 @@ CRYPTO_OBJS = \
$O\MyAes.obj \
C_OBJS = \
+ $O\7zStream.obj \
$O\Alloc.obj \
$O\Bcj2.obj \
$O\Bra.obj \
@@ -117,13 +119,16 @@ C_OBJS = \
$O\Delta.obj \
$O\DllSecur.obj \
$O\Lzma2Dec.obj \
+ $O\Lzma2DecMt.obj \
$O\LzmaDec.obj \
+ $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"
!include "../../7zip.mak"
diff --git a/3rdparty/lzma/CPP/7zip/Bundles/SFXCon/makefile.gcc b/3rdparty/lzma/CPP/7zip/Bundles/SFXCon/makefile.gcc
new file mode 100644
index 00000000000..9278502d9c3
--- /dev/null
+++ b/3rdparty/lzma/CPP/7zip/Bundles/SFXCon/makefile.gcc
@@ -0,0 +1,213 @@
+PROG = 7zCon
+
+# IS_X64 = 1
+# USE_ASM = 1
+# ST_MODE = 1
+
+include ../../LzmaDec_gcc.mak
+
+
+LOCAL_FLAGS_ST =
+MT_OBJS =
+
+
+ifdef SystemDrive
+IS_MINGW = 1
+else
+ifdef SYSTEMDRIVE
+# ifdef OS
+IS_MINGW = 1
+endif
+endif
+
+ifdef ST_MODE
+
+LOCAL_FLAGS_ST = -DZ7_ST
+
+ifdef IS_MINGW
+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 IS_MINGW
+
+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) \
+ -DZ7_EXTRACT_ONLY \
+ -DZ7_NO_READ_FROM_CODER \
+ -DZ7_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/7zStream.o \
+ $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
diff --git a/3rdparty/lzma/CPP/7zip/Bundles/SFXCon/resource.rc b/3rdparty/lzma/CPP/7zip/Bundles/SFXCon/resource.rc
index 58331b81f8f..65762125a25 100644
--- a/3rdparty/lzma/CPP/7zip/Bundles/SFXCon/resource.rc
+++ b/3rdparty/lzma/CPP/7zip/Bundles/SFXCon/resource.rc
@@ -2,4 +2,8 @@
MY_VERSION_INFO_APP("7z Console SFX", "7z.sfx")
-101 ICON "7z.ico" \ No newline at end of file
+101 ICON "7z.ico"
+
+#ifndef UNDER_CE
+1 24 MOVEABLE PURE "../../UI/Console/Console.manifest"
+#endif
diff --git a/3rdparty/lzma/CPP/7zip/Bundles/SFXSetup/ExtractCallbackSfx.cpp b/3rdparty/lzma/CPP/7zip/Bundles/SFXSetup/ExtractCallbackSfx.cpp
index 793306303c5..9d632ee04f3 100644
--- a/3rdparty/lzma/CPP/7zip/Bundles/SFXSetup/ExtractCallbackSfx.cpp
+++ b/3rdparty/lzma/CPP/7zip/Bundles/SFXSetup/ExtractCallbackSfx.cpp
@@ -15,9 +15,9 @@ using namespace NWindows;
using namespace NFile;
using namespace NDir;
-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 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,
const FString &directoryPath,
@@ -63,7 +63,7 @@ HRESULT CExtractCallbackImp::Open_Finished()
return S_OK;
}
-STDMETHODIMP CExtractCallbackImp::SetTotal(UInt64 size)
+Z7_COM7F_IMF(CExtractCallbackImp::SetTotal(UInt64 size))
{
#ifndef _NO_PROGRESS
ProgressDialog.Sync.SetProgress(size, 0);
@@ -71,10 +71,10 @@ STDMETHODIMP CExtractCallbackImp::SetTotal(UInt64 size)
return S_OK;
}
-STDMETHODIMP CExtractCallbackImp::SetCompleted(const UInt64 *completeValue)
+Z7_COM7F_IMF(CExtractCallbackImp::SetCompleted(const UInt64 *completeValue))
{
#ifndef _NO_PROGRESS
- RINOK(ProgressDialog.Sync.ProcessStopAndPause());
+ RINOK(ProgressDialog.Sync.ProcessStopAndPause())
if (completeValue != NULL)
ProgressDialog.Sync.SetPos(*completeValue);
#endif
@@ -92,8 +92,8 @@ void CExtractCallbackImp::CreateComplexDirectory(const UStringVector &dirPathPar
}
}
-STDMETHODIMP CExtractCallbackImp::GetStream(UInt32 index,
- ISequentialOutStream **outStream, Int32 askExtractMode)
+Z7_COM7F_IMF(CExtractCallbackImp::GetStream(UInt32 index,
+ ISequentialOutStream **outStream, Int32 askExtractMode))
{
#ifndef _NO_PROGRESS
if (ProgressDialog.Sync.GetStopped())
@@ -104,7 +104,7 @@ STDMETHODIMP CExtractCallbackImp::GetStream(UInt32 index,
UString fullPath;
{
NCOM::CPropVariant prop;
- RINOK(_archiveHandler->GetProperty(index, kpidPath, &prop));
+ RINOK(_archiveHandler->GetProperty(index, kpidPath, &prop))
if (prop.vt == VT_EMPTY)
fullPath = _itemDefaultName;
else
@@ -119,7 +119,7 @@ STDMETHODIMP CExtractCallbackImp::GetStream(UInt32 index,
if (askExtractMode == NArchive::NExtract::NAskMode::kExtract)
{
NCOM::CPropVariant prop;
- RINOK(_archiveHandler->GetProperty(index, kpidAttrib, &prop));
+ RINOK(_archiveHandler->GetProperty(index, kpidAttrib, &prop))
if (prop.vt == VT_EMPTY)
_processedFileInfo.Attributes = _defaultAttributes;
else
@@ -129,18 +129,18 @@ STDMETHODIMP CExtractCallbackImp::GetStream(UInt32 index,
_processedFileInfo.Attributes = prop.ulVal;
}
- RINOK(_archiveHandler->GetProperty(index, kpidIsDir, &prop));
+ RINOK(_archiveHandler->GetProperty(index, kpidIsDir, &prop))
_processedFileInfo.IsDir = VARIANT_BOOLToBool(prop.boolVal);
bool isAnti = false;
{
NCOM::CPropVariant propTemp;
- RINOK(_archiveHandler->GetProperty(index, kpidIsAnti, &propTemp));
+ RINOK(_archiveHandler->GetProperty(index, kpidIsAnti, &propTemp))
if (propTemp.vt == VT_BOOL)
isAnti = VARIANT_BOOLToBool(propTemp.boolVal);
}
- RINOK(_archiveHandler->GetProperty(index, kpidMTime, &prop));
+ RINOK(_archiveHandler->GetProperty(index, kpidMTime, &prop))
switch (prop.vt)
{
case VT_EMPTY: _processedFileInfo.MTime = _defaultMTime; break;
@@ -207,13 +207,13 @@ STDMETHODIMP CExtractCallbackImp::GetStream(UInt32 index,
return S_OK;
}
-STDMETHODIMP CExtractCallbackImp::PrepareOperation(Int32 askExtractMode)
+Z7_COM7F_IMF(CExtractCallbackImp::PrepareOperation(Int32 askExtractMode))
{
_extractMode = (askExtractMode == NArchive::NExtract::NAskMode::kExtract);
return S_OK;
}
-STDMETHODIMP CExtractCallbackImp::SetOperationResult(Int32 resultEOperationResult)
+Z7_COM7F_IMF(CExtractCallbackImp::SetOperationResult(Int32 resultEOperationResult))
{
switch (resultEOperationResult)
{
@@ -237,7 +237,7 @@ STDMETHODIMP CExtractCallbackImp::SetOperationResult(Int32 resultEOperationResul
if (_outFileStream != NULL)
{
_outFileStreamSpec->SetMTime(&_processedFileInfo.MTime);
- RINOK(_outFileStreamSpec->Close());
+ RINOK(_outFileStreamSpec->Close())
}
_outFileStream.Release();
if (_extractMode)
diff --git a/3rdparty/lzma/CPP/7zip/Bundles/SFXSetup/ExtractCallbackSfx.h b/3rdparty/lzma/CPP/7zip/Bundles/SFXSetup/ExtractCallbackSfx.h
index cfbc5c07aa0..b9377ae6551 100644
--- a/3rdparty/lzma/CPP/7zip/Bundles/SFXSetup/ExtractCallbackSfx.h
+++ b/3rdparty/lzma/CPP/7zip/Bundles/SFXSetup/ExtractCallbackSfx.h
@@ -1,7 +1,7 @@
// ExtractCallbackSfx.h
-#ifndef __EXTRACT_CALLBACK_SFX_H
-#define __EXTRACT_CALLBACK_SFX_H
+#ifndef ZIP7_INC_EXTRACT_CALLBACK_SFX_H
+#define ZIP7_INC_EXTRACT_CALLBACK_SFX_H
#include "resource.h"
@@ -19,19 +19,16 @@
#endif
#include "../../UI/Common/ArchiveOpenCallback.h"
-class CExtractCallbackImp:
+class CExtractCallbackImp Z7_final:
public IArchiveExtractCallback,
public IOpenCallbackUI,
public CMyUnknownImp
{
-public:
-
- MY_UNKNOWN_IMP
-
- INTERFACE_IArchiveExtractCallback(;)
- INTERFACE_IOpenCallbackUI(;)
+ Z7_COM_UNKNOWN_IMP_0
+ Z7_IFACE_COM7_IMP(IProgress)
+ Z7_IFACE_COM7_IMP(IArchiveExtractCallback)
+ Z7_IFACE_IMP(IOpenCallbackUI)
-private:
CMyComPtr<IInArchive> _archiveHandler;
FString _directoryPath;
UString _filePath;
@@ -70,7 +67,7 @@ public:
#ifndef _NO_PROGRESS
HRESULT StartProgressDialog(const UString &title, NWindows::CThread &thread)
{
- ProgressDialog.Create(title, thread, 0);
+ ProgressDialog.Create(title, thread, NULL);
{
ProgressDialog.SetText(LangString(IDS_PROGRESS_EXTRACTING));
}
@@ -78,7 +75,7 @@ public:
ProgressDialog.Show(SW_SHOWNORMAL);
return S_OK;
}
- virtual ~CExtractCallbackImp() { ProgressDialog.Destroy(); }
+ ~CExtractCallbackImp() { ProgressDialog.Destroy(); }
#endif
};
diff --git a/3rdparty/lzma/CPP/7zip/Bundles/SFXSetup/ExtractEngine.cpp b/3rdparty/lzma/CPP/7zip/Bundles/SFXSetup/ExtractEngine.cpp
index b1592993857..73ccff1b7d4 100644
--- a/3rdparty/lzma/CPP/7zip/Bundles/SFXSetup/ExtractEngine.cpp
+++ b/3rdparty/lzma/CPP/7zip/Bundles/SFXSetup/ExtractEngine.cpp
@@ -18,8 +18,8 @@ using namespace NWindows;
using namespace NFile;
using namespace NDir;
-static LPCWSTR kCantFindArchive = L"Can not find archive file";
-static LPCWSTR kCantOpenArchive = L"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
{
@@ -64,18 +64,14 @@ struct CThreadExtracting
if (!CreateComplexDir(dirPath))
{
- ErrorMessage = MyFormatNew(IDS_CANNOT_CREATE_FOLDER,
- #ifdef LANG
- 0x02000603,
- #endif
- fs2us(dirPath));
+ ErrorMessage = MyFormatNew(IDS_CANNOT_CREATE_FOLDER, fs2us(dirPath));
Result = E_FAIL;
return;
}
- ExtractCallbackSpec->Init(ArchiveLink.GetArchive(), dirPath, L"Default", fi.MTime, 0);
+ ExtractCallbackSpec->Init(ArchiveLink.GetArchive(), dirPath, (UString)"Default", fi.MTime, 0);
- Result = ArchiveLink.GetArchive()->Extract(0, (UInt32)(Int32)-1 , BoolToInt(false), ExtractCallback);
+ Result = ArchiveLink.GetArchive()->Extract(NULL, (UInt32)(Int32)-1 , BoolToInt(false), ExtractCallback);
}
void Process()
@@ -116,7 +112,9 @@ HRESULT ExtractArchive(CCodecs *codecs, const FString &fileName, const FString &
{
t.ExtractCallbackSpec->ProgressDialog.IconID = IDI_ICON;
NWindows::CThread thread;
- RINOK(thread.Create(CThreadExtracting::MyThreadFunction, &t));
+ const WRes wres = thread.Create(CThreadExtracting::MyThreadFunction, &t);
+ if (wres != 0)
+ return HRESULT_FROM_WIN32(wres);
UString title;
LangString(IDS_PROGRESS_EXTRACTING, title);
diff --git a/3rdparty/lzma/CPP/7zip/Bundles/SFXSetup/ExtractEngine.h b/3rdparty/lzma/CPP/7zip/Bundles/SFXSetup/ExtractEngine.h
index 295d77b9957..b7f79657903 100644
--- a/3rdparty/lzma/CPP/7zip/Bundles/SFXSetup/ExtractEngine.h
+++ b/3rdparty/lzma/CPP/7zip/Bundles/SFXSetup/ExtractEngine.h
@@ -1,7 +1,7 @@
// ExtractEngine.h
-#ifndef __EXTRACT_ENGINE_H
-#define __EXTRACT_ENGINE_H
+#ifndef ZIP7_INC_EXTRACT_ENGINE_H
+#define ZIP7_INC_EXTRACT_ENGINE_H
#include "../../UI/Common/LoadCodecs.h"
diff --git a/3rdparty/lzma/CPP/7zip/Bundles/SFXSetup/SFXSetup.dsp b/3rdparty/lzma/CPP/7zip/Bundles/SFXSetup/SFXSetup.dsp
index 787c1bdefc5..cf96460fcc5 100644
--- a/3rdparty/lzma/CPP/7zip/Bundles/SFXSetup/SFXSetup.dsp
+++ b/3rdparty/lzma/CPP/7zip/Bundles/SFXSetup/SFXSetup.dsp
@@ -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 "_WINDOWS" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /Gz /MT /W4 /WX /GX /O1 /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "EXTRACT_ONLY" /D "NO_REGISTRY" /D "_SFX" /D "_NO_CRYPTO" /Yu"StdAfx.h" /FD /c
+# ADD CPP /nologo /Gz /MT /W4 /WX /GX /O1 /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "Z7_EXTRACT_ONLY" /D "Z7_NO_REGISTRY" /D "Z7_SFX" /D "Z7_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"
@@ -71,7 +71,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 "_WINDOWS" /D "_MBCS" /YX /FD /GZ /c
-# ADD CPP /nologo /Gz /MTd /W4 /WX /Gm /GX /ZI /Od /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "EXTRACT_ONLY" /D "NO_REGISTRY" /D "_SFX" /D "_NO_CRYPTO" /Yu"StdAfx.h" /FD /GZ /c
+# ADD CPP /nologo /Gz /MTd /W4 /WX /Gm /GX /ZI /Od /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "Z7_EXTRACT_ONLY" /D "Z7_NO_REGISTRY" /D "Z7_SFX" /D "Z7_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"
@@ -97,8 +97,8 @@ LINK32=link.exe
# 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 "_SFX" /Yu"StdAfx.h" /FD /c
-# ADD CPP /nologo /Gz /MD /W4 /WX /GX /O1 /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "EXTRACT_ONLY" /D "NO_REGISTRY" /D "_SFX" /D "_NO_CRYPTO" /Yu"StdAfx.h" /FD /c
+# ADD BASE CPP /nologo /MD /W3 /GX /O1 /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "Z7_EXTRACT_ONLY" /D "Z7_NO_REGISTRY" /D "Z7_SFX" /Yu"StdAfx.h" /FD /c
+# ADD CPP /nologo /Gz /MD /W4 /WX /GX /O1 /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "Z7_EXTRACT_ONLY" /D "Z7_NO_REGISTRY" /D "Z7_SFX" /D "Z7_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"
@@ -221,6 +221,10 @@ SOURCE=..\..\Compress\Bcj2Coder.cpp
# End Source File
# Begin Source File
+SOURCE=..\..\Compress\Bcj2Coder.h
+# End Source File
+# Begin Source File
+
SOURCE=..\..\Compress\Bcj2Register.cpp
# End Source File
# Begin Source File
@@ -229,6 +233,10 @@ SOURCE=..\..\Compress\BcjCoder.cpp
# End Source File
# Begin Source File
+SOURCE=..\..\Compress\BcjCoder.h
+# End Source File
+# Begin Source File
+
SOURCE=..\..\Compress\BcjRegister.cpp
# End Source File
# Begin Source File
@@ -249,6 +257,10 @@ SOURCE=..\..\Compress\CopyCoder.cpp
# End Source File
# Begin Source File
+SOURCE=..\..\Compress\CopyCoder.h
+# End Source File
+# Begin Source File
+
SOURCE=..\..\Compress\CopyRegister.cpp
# End Source File
# Begin Source File
@@ -289,6 +301,10 @@ SOURCE=..\..\..\Common\CommandLineParser.h
# End Source File
# Begin Source File
+SOURCE=..\..\..\Common\Common.h
+# End Source File
+# Begin Source File
+
SOURCE=..\..\..\Common\CRC.cpp
# End Source File
# Begin Source File
@@ -305,6 +321,10 @@ SOURCE=..\..\..\Common\IntToString.h
# End Source File
# Begin Source File
+SOURCE=..\..\..\Common\MyCom.h
+# End Source File
+# Begin Source File
+
SOURCE=..\..\..\Common\MyString.cpp
# End Source File
# Begin Source File
@@ -449,6 +469,14 @@ SOURCE=..\..\..\Windows\Synchronization.h
# End Source File
# Begin Source File
+SOURCE=..\..\..\Windows\System.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\Windows\System.h
+# End Source File
+# Begin Source File
+
SOURCE=..\..\..\Windows\Window.cpp
# End Source File
# Begin Source File
@@ -456,7 +484,7 @@ SOURCE=..\..\..\Windows\Window.cpp
SOURCE=..\..\..\Windows\Window.h
# End Source File
# End Group
-# Begin Group "7z Common"
+# Begin Group "7zip Common"
# PROP Default_Filter ""
# Begin Source File
@@ -469,6 +497,14 @@ SOURCE=..\..\Common\CreateCoder.h
# End Source File
# Begin Source File
+SOURCE=..\..\Common\CWrappers.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\Common\CWrappers.h
+# End Source File
+# Begin Source File
+
SOURCE=..\..\Common\FileStreams.cpp
# End Source File
# Begin Source File
@@ -651,6 +687,19 @@ SOURCE=..\..\..\..\C\7zCrcOpt.c
# End Source File
# Begin Source File
+SOURCE=..\..\..\..\C\7zStream.c
+# SUBTRACT CPP /YX /Yc /Yu
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\C\7zTypes.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\C\7zWindows.h
+# End Source File
+# Begin Source File
+
SOURCE=..\..\..\..\C\Alloc.c
# SUBTRACT CPP /YX /Yc /Yu
# End Source File
@@ -688,6 +737,10 @@ SOURCE=..\..\..\..\C\BraIA64.c
# End Source File
# Begin Source File
+SOURCE=..\..\..\..\C\Compiler.h
+# End Source File
+# Begin Source File
+
SOURCE=..\..\..\..\C\CpuArch.c
# SUBTRACT CPP /YX /Yc /Yu
# End Source File
@@ -724,6 +777,15 @@ SOURCE=..\..\..\..\C\Lzma2Dec.h
# End Source File
# Begin Source File
+SOURCE=..\..\..\..\C\Lzma2DecMt.c
+# SUBTRACT CPP /YX /Yc /Yu
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\C\Lzma2DecMt.h
+# End Source File
+# Begin Source File
+
SOURCE=..\..\..\..\C\LzmaDec.c
# SUBTRACT CPP /YX /Yc /Yu
# End Source File
@@ -733,6 +795,15 @@ SOURCE=..\..\..\..\C\LzmaDec.h
# End Source File
# Begin Source File
+SOURCE=..\..\..\..\C\MtDec.c
+# SUBTRACT CPP /YX /Yc /Yu
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\C\MtDec.h
+# End Source File
+# Begin Source File
+
SOURCE=..\..\..\..\C\Threads.c
# SUBTRACT CPP /YX /Yc /Yu
# End Source File
@@ -741,6 +812,30 @@ SOURCE=..\..\..\..\C\Threads.c
SOURCE=..\..\..\..\C\Threads.h
# End Source File
# End Group
+# Begin Group "7zip"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=..\..\Archive\IArchive.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\ICoder.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\IDecl.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\IPassword.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\IProgress.h
+# End Source File
+# End Group
# Begin Source File
SOURCE=.\ExtractCallbackSfx.cpp
diff --git a/3rdparty/lzma/CPP/7zip/Bundles/SFXSetup/SfxSetup.cpp b/3rdparty/lzma/CPP/7zip/Bundles/SFXSetup/SfxSetup.cpp
index aef2e1969c9..47d7966d771 100644
--- a/3rdparty/lzma/CPP/7zip/Bundles/SFXSetup/SfxSetup.cpp
+++ b/3rdparty/lzma/CPP/7zip/Bundles/SFXSetup/SfxSetup.cpp
@@ -2,8 +2,9 @@
#include "StdAfx.h"
-#include "../../../Common/MyWindows.h"
+#include "../../../../C/DllSecur.h"
+#include "../../../Common/MyWindows.h"
#include "../../../Common/MyInitGuid.h"
#include "../../../Common/CommandLineParser.h"
@@ -23,19 +24,19 @@
#include "ExtractEngine.h"
-#include "../../../../C/DllSecur.h"
-
#include "resource.h"
using namespace NWindows;
using namespace NFile;
using namespace NDir;
+extern
+HINSTANCE g_hInstance;
HINSTANCE g_hInstance;
-static CFSTR kTempDirPrefix = FTEXT("7zS");
+static CFSTR const kTempDirPrefix = FTEXT("7zS");
-#define _SHELL_EXECUTE
+#define MY_SHELL_EXECUTE
static bool ReadDataString(CFSTR fileName, LPCSTR startID,
LPCSTR endID, AString &stringResult)
@@ -44,44 +45,44 @@ 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;
- char b = buffer[pos];
+ const Byte b = buffer[pos];
if (b == 0)
return false;
- stringResult += b;
+ stringResult += (char)b;
pos++;
}
else
{
- if (pos > numBytesInBuffer - signatureStartSize)
+ if (pos + signatureStartSize > numBytesInBuffer)
break;
if (memcmp(buffer + pos, startID, signatureStartSize) == 0)
{
@@ -101,26 +102,28 @@ static bool ReadDataString(CFSTR fileName, LPCSTR startID,
static char kStartID[] = { ',','!','@','I','n','s','t','a','l','l','@','!','U','T','F','-','8','!', 0 };
static char kEndID[] = { ',','!','@','I','n','s','t','a','l','l','E','n','d','@','!', 0 };
-struct CInstallIDInit
+static struct CInstallIDInit
{
CInstallIDInit()
{
kStartID[0] = ';';
kEndID[0] = ';';
- };
+ }
} 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)
{
UString message = NError::MyFormatMessage(::GetLastError());
- int pos = message.Find(L"%1");
+ const int pos = message.Find(L"%1");
if (pos >= 0)
{
- message.Delete(pos, 2);
- message.Insert(pos, name);
+ message.Delete((unsigned)pos, 2);
+ message.Insert((unsigned)pos, name);
}
ShowErrorMessage(NULL, message);
}
@@ -144,7 +147,7 @@ int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE /* hPrevInstance */,
// InitCommonControls();
UString archiveName, switches;
- #ifdef _SHELL_EXECUTE
+ #ifdef MY_SHELL_EXECUTE
UString executeFile, executeParameters;
#endif
NCommandLineParser::SplitCommandLine(GetCommandLineW(), archiveName, switches);
@@ -169,7 +172,7 @@ int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE /* hPrevInstance */,
return 1;
}
- UString dirPrefix = L"." WSTRING_PATH_SEPARATOR;
+ UString dirPrefix ("." STRING_PATH_SEPARATOR);
UString appLaunched;
bool showProgress = true;
if (!config.IsEmpty())
@@ -181,25 +184,25 @@ int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE /* hPrevInstance */,
ShowErrorMessage(L"Config failed");
return 1;
}
- UString friendlyName = GetTextConfigValue(pairs, L"Title");
- UString installPrompt = GetTextConfigValue(pairs, L"BeginPrompt");
- UString progress = GetTextConfigValue(pairs, L"Progress");
+ const UString friendlyName = GetTextConfigValue(pairs, "Title");
+ const UString installPrompt = GetTextConfigValue(pairs, "BeginPrompt");
+ const UString progress = GetTextConfigValue(pairs, "Progress");
if (progress.IsEqualTo_Ascii_NoCase("no"))
showProgress = false;
- int index = FindTextConfigItem(pairs, L"Directory");
+ const int index = FindTextConfigItem(pairs, "Directory");
if (index >= 0)
dirPrefix = pairs[index].String;
if (!installPrompt.IsEmpty() && !assumeYes)
{
- if (MessageBoxW(0, installPrompt, friendlyName, MB_YESNO |
+ if (MessageBoxW(NULL, installPrompt, friendlyName, MB_YESNO |
MB_ICONQUESTION) != IDYES)
return 0;
}
- appLaunched = GetTextConfigValue(pairs, L"RunProgram");
+ appLaunched = GetTextConfigValue(pairs, "RunProgram");
- #ifdef _SHELL_EXECUTE
- executeFile = GetTextConfigValue(pairs, L"ExecuteFile");
- executeParameters = GetTextConfigValue(pairs, L"ExecuteParameters");
+ #ifdef MY_SHELL_EXECUTE
+ executeFile = GetTextConfigValue(pairs, "ExecuteFile");
+ executeParameters = GetTextConfigValue(pairs, "ExecuteParameters");
#endif
}
@@ -207,17 +210,17 @@ 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;
}
CCodecs *codecs = new CCodecs;
CMyComPtr<IUnknown> compressCodecsInfo = codecs;
{
- HRESULT result = codecs->Load();
+ const HRESULT result = codecs->Load();
if (result != S_OK)
{
- ShowErrorMessage(L"Can not load codecs");
+ ShowErrorMessage(L"Cannot load codecs");
return 1;
}
}
@@ -243,7 +246,7 @@ int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE /* hPrevInstance */,
{
if (errorMessage.IsEmpty())
errorMessage = NError::MyFormatMessage(result);
- ::MessageBoxW(0, errorMessage, NWindows::MyLoadString(IDS_EXTRACTION_ERROR_TITLE), MB_ICONERROR);
+ ::MessageBoxW(NULL, errorMessage, NWindows::MyLoadString(IDS_EXTRACTION_ERROR_TITLE), MB_ICONERROR);
}
}
return 1;
@@ -256,11 +259,11 @@ int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE /* hPrevInstance */,
return 1;
#endif
- HANDLE hProcess = 0;
-#ifdef _SHELL_EXECUTE
+ HANDLE hProcess = NULL;
+#ifdef MY_SHELL_EXECUTE
if (!executeFile.IsEmpty())
{
- CSysString filePath = GetSystemString(executeFile);
+ CSysString filePath (GetSystemString(executeFile));
SHELLEXECUTEINFO execInfo;
execInfo.cbSize = sizeof(execInfo);
execInfo.fMask = SEE_MASK_NOCLOSEPROCESS
@@ -278,7 +281,7 @@ int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE /* hPrevInstance */,
executeParameters += switches;
}
- CSysString parametersSys = GetSystemString(executeParameters);
+ const CSysString parametersSys (GetSystemString(executeParameters));
if (parametersSys.IsEmpty())
execInfo.lpParameters = NULL;
else
@@ -286,13 +289,13 @@ int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE /* hPrevInstance */,
execInfo.lpDirectory = NULL;
execInfo.nShow = SW_SHOWNORMAL;
- execInfo.hProcess = 0;
+ execInfo.hProcess = NULL;
/* BOOL success = */ ::ShellExecuteEx(&execInfo);
UINT32 result = (UINT32)(UINT_PTR)execInfo.hInstApp;
if (result <= 32)
{
if (!assumeYes)
- ShowErrorMessage(L"Can not open file");
+ ShowErrorMessage(L"Cannot open file");
return 1;
}
hProcess = execInfo.hProcess;
@@ -303,10 +306,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;
}
}
@@ -317,7 +320,7 @@ int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE /* hPrevInstance */,
appLaunched.Replace(L"%%T" WSTRING_PATH_SEPARATOR, fs2us(s2));
}
- UString appNameForError = appLaunched; // actually we need to rtemove parameters also
+ const UString appNameForError = appLaunched; // actually we need to rtemove parameters also
appLaunched.Replace(L"%%T", fs2us(tempDirPath));
@@ -328,20 +331,21 @@ int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE /* hPrevInstance */,
}
STARTUPINFO startupInfo;
startupInfo.cb = sizeof(startupInfo);
- startupInfo.lpReserved = 0;
- startupInfo.lpDesktop = 0;
- startupInfo.lpTitle = 0;
+ startupInfo.lpReserved = NULL;
+ startupInfo.lpDesktop = NULL;
+ startupInfo.lpTitle = NULL;
startupInfo.dwFlags = 0;
startupInfo.cbReserved2 = 0;
- startupInfo.lpReserved2 = 0;
+ startupInfo.lpReserved2 = NULL;
PROCESS_INFORMATION processInformation;
- CSysString appLaunchedSys = GetSystemString(dirPrefix + appLaunched);
+ const CSysString appLaunchedSys (GetSystemString(dirPrefix + appLaunched));
- BOOL createResult = CreateProcess(NULL, (LPTSTR)(LPCTSTR)appLaunchedSys,
- NULL, NULL, FALSE, 0, NULL, NULL /*tempDir.GetPath() */,
- &startupInfo, &processInformation);
+ const BOOL createResult = CreateProcess(NULL,
+ appLaunchedSys.Ptr_non_const(),
+ NULL, NULL, FALSE, 0, NULL, NULL /*tempDir.GetPath() */,
+ &startupInfo, &processInformation);
if (createResult == 0)
{
if (!assumeYes)
@@ -355,7 +359,7 @@ int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE /* hPrevInstance */,
::CloseHandle(processInformation.hThread);
hProcess = processInformation.hProcess;
}
- if (hProcess != 0)
+ if (hProcess)
{
WaitForSingleObject(hProcess, INFINITE);
::CloseHandle(hProcess);
diff --git a/3rdparty/lzma/CPP/7zip/Bundles/SFXSetup/StdAfx.h b/3rdparty/lzma/CPP/7zip/Bundles/SFXSetup/StdAfx.h
index 37bbd0c33b7..4f27255c6a2 100644
--- a/3rdparty/lzma/CPP/7zip/Bundles/SFXSetup/StdAfx.h
+++ b/3rdparty/lzma/CPP/7zip/Bundles/SFXSetup/StdAfx.h
@@ -1,13 +1,6 @@
// StdAfx.h
-#ifndef __STDAFX_H
-#define __STDAFX_H
-
-#include "../../../Common/Common.h"
-
-#include <commctrl.h>
-
-// #define printf(x) NO_PRINTF_(x)
-// #define sprintf(x) NO_SPRINTF_(x)
-
+#if _MSC_VER >= 1800
+#pragma warning(disable : 4464) // relative include path contains '..'
#endif
+#include "../../UI/FileManager/StdAfx.h"
diff --git a/3rdparty/lzma/CPP/7zip/Bundles/SFXSetup/makefile b/3rdparty/lzma/CPP/7zip/Bundles/SFXSetup/makefile
index 5849cf36907..ea0ece23a79 100644
--- a/3rdparty/lzma/CPP/7zip/Bundles/SFXSetup/makefile
+++ b/3rdparty/lzma/CPP/7zip/Bundles/SFXSetup/makefile
@@ -1,10 +1,12 @@
PROG = 7zS.sfx
+MY_FIXED = 1
+
CFLAGS = $(CFLAGS) \
- -DNO_REGISTRY \
- -DEXTRACT_ONLY \
- -DNO_READ_FROM_CODER \
- -D_SFX \
- -D_NO_CRYPTO \
+ -DZ7_NO_REGISTRY \
+ -DZ7_EXTRACT_ONLY \
+ -DZ7_NO_READ_FROM_CODER \
+ -DZ7_SFX \
+ -DZ7_NO_CRYPTO \
CURRENT_OBJS = \
$O\SfxSetup.obj \
@@ -33,6 +35,7 @@ WIN_OBJS = \
$O\PropVariant.obj \
$O\ResourceString.obj \
$O\Synchronization.obj \
+ $O\System.obj \
$O\Window.obj \
WIN_CTRL_OBJS = \
@@ -40,6 +43,7 @@ WIN_CTRL_OBJS = \
7ZIP_COMMON_OBJS = \
$O\CreateCoder.obj \
+ $O\CWrappers.obj \
$O\FileStreams.obj \
$O\InBuffer.obj \
$O\FilterCoder.obj \
@@ -93,6 +97,7 @@ COMPRESS_OBJS = \
$O\LzmaRegister.obj \
C_OBJS = \
+ $O\7zStream.obj \
$O\Alloc.obj \
$O\Bcj2.obj \
$O\Bra.obj \
@@ -102,9 +107,12 @@ C_OBJS = \
$O\Delta.obj \
$O\DllSecur.obj \
$O\Lzma2Dec.obj \
+ $O\Lzma2DecMt.obj \
$O\LzmaDec.obj \
+ $O\MtDec.obj \
$O\Threads.obj \
!include "../../Crc.mak"
+!include "../../LzmaDec.mak"
!include "../../7zip.mak"
diff --git a/3rdparty/lzma/CPP/7zip/Bundles/SFXWin/SFXWin.dsp b/3rdparty/lzma/CPP/7zip/Bundles/SFXWin/SFXWin.dsp
index 301a6c5c756..65cf0bf0b2a 100644
--- a/3rdparty/lzma/CPP/7zip/Bundles/SFXWin/SFXWin.dsp
+++ b/3rdparty/lzma/CPP/7zip/Bundles/SFXWin/SFXWin.dsp
@@ -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 "_WINDOWS" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /Gz /MD /W4 /WX /GX /O1 /D "NDEBUG" /D "_SFXWIN32" /D "_WINDOWS" /D "_MBCS" /D "EXTRACT_ONLY" /D "NO_REGISTRY" /D "NO_READ_FROM_CODER" /D "_SFX" /Yu"StdAfx.h" /FD /c
+# ADD CPP /nologo /Gz /MD /W4 /WX /GX /O1 /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "Z7_EXTRACT_ONLY" /D "Z7_NO_REGISTRY" /D "Z7_NO_READ_FROM_CODER" /D "Z7_SFX" /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"
@@ -71,7 +71,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 "_WINDOWS" /D "_MBCS" /YX /FD /GZ /c
-# ADD CPP /nologo /Gz /MTd /W4 /WX /Gm /GX /ZI /Od /D "_DEBUG" /D "_SFXWIN32" /D "_WINDOWS" /D "_MBCS" /D "EXTRACT_ONLY" /D "NO_REGISTRY" /D "NO_READ_FROM_CODER" /D "_SFX" /Yu"StdAfx.h" /FD /GZ /c
+# ADD CPP /nologo /Gz /MTd /W4 /WX /Gm /GX /ZI /Od /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "Z7_EXTRACT_ONLY" /D "Z7_NO_REGISTRY" /D "Z7_NO_READ_FROM_CODER" /D "Z7_SFX" /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"
@@ -97,8 +97,8 @@ LINK32=link.exe
# 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 "_SFX" /Yu"StdAfx.h" /FD /c
-# ADD CPP /nologo /Gz /MD /W4 /WX /GX /O1 /D "NDEBUG" /D "_SFXWIN32" /D "_WINDOWS" /D "_MBCS" /D "EXTRACT_ONLY" /D "NO_REGISTRY" /D "NO_READ_FROM_CODER" /D "_SFX" /Yu"StdAfx.h" /FD /c
+# ADD BASE CPP /nologo /Gz /MT /W3 /GX /O1 /I "..\..\..\\" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "Z7_EXTRACT_ONLY" /D "Z7_NO_REGISTRY" /D "Z7_SFX" /Yu"StdAfx.h" /FD /c
+# ADD CPP /nologo /Gz /MD /W4 /WX /GX /O1 /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "Z7_EXTRACT_ONLY" /D "Z7_NO_REGISTRY" /D "Z7_NO_READ_FROM_CODER" /D "Z7_SFX" /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"
@@ -221,6 +221,10 @@ SOURCE=..\..\Compress\Bcj2Coder.cpp
# End Source File
# Begin Source File
+SOURCE=..\..\Compress\Bcj2Coder.h
+# End Source File
+# Begin Source File
+
SOURCE=..\..\Compress\Bcj2Register.cpp
# End Source File
# Begin Source File
@@ -229,6 +233,10 @@ SOURCE=..\..\Compress\BcjCoder.cpp
# End Source File
# Begin Source File
+SOURCE=..\..\Compress\BcjCoder.h
+# End Source File
+# Begin Source File
+
SOURCE=..\..\Compress\BcjRegister.cpp
# End Source File
# Begin Source File
@@ -249,6 +257,10 @@ SOURCE=..\..\Compress\CopyCoder.cpp
# End Source File
# Begin Source File
+SOURCE=..\..\Compress\CopyCoder.h
+# End Source File
+# Begin Source File
+
SOURCE=..\..\Compress\CopyRegister.cpp
# End Source File
# Begin Source File
@@ -277,6 +289,10 @@ SOURCE=..\..\Compress\PpmdDecoder.cpp
# End Source File
# Begin Source File
+SOURCE=..\..\Compress\PpmdDecoder.h
+# End Source File
+# Begin Source File
+
SOURCE=..\..\Compress\PpmdRegister.cpp
# End Source File
# End Group
@@ -537,6 +553,14 @@ SOURCE=..\..\..\Windows\Control\ListView.h
# End Group
# Begin Source File
+SOURCE=..\..\..\Windows\Clipboard.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\Windows\Clipboard.h
+# End Source File
+# Begin Source File
+
SOURCE=..\..\..\Windows\CommonDialog.cpp
# End Source File
# Begin Source File
@@ -593,6 +617,14 @@ SOURCE=..\..\..\Windows\FileName.h
# End Source File
# Begin Source File
+SOURCE=..\..\..\Windows\MemoryGlobal.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\Windows\MemoryGlobal.h
+# End Source File
+# Begin Source File
+
SOURCE=..\..\..\Windows\PropVariant.cpp
# End Source File
# Begin Source File
@@ -633,6 +665,14 @@ SOURCE=..\..\..\Windows\Synchronization.h
# End Source File
# Begin Source File
+SOURCE=..\..\..\Windows\System.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\Windows\System.h
+# End Source File
+# Begin Source File
+
SOURCE=..\..\..\Windows\Window.cpp
# End Source File
# Begin Source File
@@ -653,6 +693,10 @@ SOURCE=..\..\..\Common\CommandLineParser.h
# End Source File
# Begin Source File
+SOURCE=..\..\..\Common\Common.h
+# End Source File
+# Begin Source File
+
SOURCE=..\..\..\Common\CRC.cpp
# End Source File
# Begin Source File
@@ -693,6 +737,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
@@ -823,6 +871,15 @@ SOURCE=..\..\..\..\C\7zCrcOpt.c
# End Source File
# Begin Source File
+SOURCE=..\..\..\..\C\7zStream.c
+# SUBTRACT CPP /YX /Yc /Yu
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\C\7zWindows.h
+# End Source File
+# Begin Source File
+
SOURCE=..\..\..\..\C\Aes.c
# SUBTRACT CPP /YX /Yc /Yu
# End Source File
@@ -874,6 +931,10 @@ SOURCE=..\..\..\..\C\BraIA64.c
# End Source File
# Begin Source File
+SOURCE=..\..\..\..\C\Compiler.h
+# End Source File
+# Begin Source File
+
SOURCE=..\..\..\..\C\CpuArch.c
# SUBTRACT CPP /YX /Yc /Yu
# End Source File
@@ -906,6 +967,15 @@ SOURCE=..\..\..\..\C\Lzma2Dec.h
# End Source File
# Begin Source File
+SOURCE=..\..\..\..\C\Lzma2DecMt.c
+# SUBTRACT CPP /YX /Yc /Yu
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\C\Lzma2DecMt.h
+# End Source File
+# Begin Source File
+
SOURCE=..\..\..\..\C\LzmaDec.c
# SUBTRACT CPP /YX /Yc /Yu
# End Source File
@@ -915,6 +985,15 @@ SOURCE=..\..\..\..\C\LzmaDec.h
# End Source File
# Begin Source File
+SOURCE=..\..\..\..\C\MtDec.c
+# SUBTRACT CPP /YX /Yc /Yu
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\C\MtDec.h
+# End Source File
+# Begin Source File
+
SOURCE=..\..\..\..\C\Ppmd7.c
# SUBTRACT CPP /YX /Yc /Yu
# End Source File
@@ -934,6 +1013,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
@@ -942,13 +1026,33 @@ SOURCE=..\..\..\..\C\Threads.c
SOURCE=..\..\..\..\C\Threads.h
# End Source File
# End Group
+# Begin Group "7zip"
+
+# PROP Default_Filter ""
# Begin Source File
-SOURCE=.\7z.ico
+SOURCE=..\..\Archive\IArchive.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\ICoder.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\IDecl.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\IPassword.h
# End Source File
# Begin Source File
-SOURCE=.\7z1.ico
+SOURCE=..\..\IProgress.h
+# End Source File
+# End Group
+# Begin Source File
+
+SOURCE=.\7z.ico
# End Source File
# Begin Source File
diff --git a/3rdparty/lzma/CPP/7zip/Bundles/SFXWin/SfxWin.cpp b/3rdparty/lzma/CPP/7zip/Bundles/SFXWin/SfxWin.cpp
index db7acfef7c8..3e1880edffa 100644
--- a/3rdparty/lzma/CPP/7zip/Bundles/SFXWin/SfxWin.cpp
+++ b/3rdparty/lzma/CPP/7zip/Bundles/SFXWin/SfxWin.cpp
@@ -4,7 +4,13 @@
#include "../../../Common/MyWindows.h"
+#if defined(__MINGW32__) || defined(__MINGW64__)
+#include <shlwapi.h>
+#else
#include <Shlwapi.h>
+#endif
+
+#include "../../../../C/DllSecur.h"
#include "../../../Common/MyInitGuid.h"
@@ -28,33 +34,36 @@
#include "../../UI/GUI/ExtractGUI.h"
#include "../../UI/GUI/ExtractRes.h"
-#include "../../../../C/DllSecur.h"
-
using namespace NWindows;
using namespace NFile;
using namespace NDir;
+extern
+HINSTANCE g_hInstance;
HINSTANCE g_hInstance;
#ifndef UNDER_CE
+static
DWORD g_ComCtl32Version;
static DWORD GetDllVersion(LPCTSTR dllName)
{
DWORD dwVersion = 0;
- HINSTANCE hinstDll = LoadLibrary(dllName);
+ const HINSTANCE hinstDll = LoadLibrary(dllName);
if (hinstDll)
{
- DLLGETVERSIONPROC pDllGetVersion = (DLLGETVERSIONPROC)GetProcAddress(hinstDll, "DllGetVersion");
- if (pDllGetVersion)
+ const
+ DLLGETVERSIONPROC func_DllGetVersion = Z7_GET_PROC_ADDRESS(
+ DLLGETVERSIONPROC, hinstDll, "DllGetVersion");
+ if (func_DllGetVersion)
{
DLLVERSIONINFO dvi;
ZeroMemory(&dvi, sizeof(dvi));
dvi.cbSize = sizeof(dvi);
- HRESULT hr = (*pDllGetVersion)(&dvi);
+ const HRESULT hr = func_DllGetVersion(&dvi);
if (SUCCEEDED(hr))
- dwVersion = MAKELONG(dvi.dwMinorVersion, dvi.dwMajorVersion);
+ dwVersion = (DWORD)MAKELONG(dvi.dwMinorVersion, dvi.dwMajorVersion);
}
FreeLibrary(hinstDll);
}
@@ -63,16 +72,18 @@ static DWORD GetDllVersion(LPCTSTR dllName)
#endif
+extern
+bool g_LVN_ITEMACTIVATE_Support;
bool g_LVN_ITEMACTIVATE_Support = true;
-static const wchar_t *kUnknownExceptionMessage = L"ERROR: Unknown Error!";
+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
@@ -101,7 +112,7 @@ int APIENTRY WinMain2()
const UString &s = commandStrings[i];
if (s.Len() > 1 && s[0] == '-')
{
- wchar_t c = MyCharLower_Ascii(s[1]);
+ const wchar_t c = MyCharLower_Ascii(s[1]);
if (c == 'y')
{
assumeYes = true;
@@ -152,7 +163,7 @@ int APIENTRY WinMain2()
CMyComPtr<IFolderArchiveExtractCallback> extractCallback = ecs;
ecs->Init();
- #ifndef _NO_CRYPTO
+ #ifndef Z7_NO_CRYPTO
ecs->PasswordIsDefined = !password.IsEmpty();
ecs->Password = password;
#endif
@@ -178,7 +189,7 @@ int APIENTRY WinMain2()
v1.Add(fs2us(fullPath));
v2.Add(fs2us(fullPath));
NWildcard::CCensorNode wildcardCensor;
- wildcardCensor.AddItem(true, L"*", true, true, true, true);
+ wildcardCensor.Add_Wildcard();
bool messageWasDisplayed = false;
result = ExtractGUI(codecs,
@@ -206,7 +217,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
diff --git a/3rdparty/lzma/CPP/7zip/Bundles/SFXWin/StdAfx.h b/3rdparty/lzma/CPP/7zip/Bundles/SFXWin/StdAfx.h
index 975a17e8bf7..4f27255c6a2 100644
--- a/3rdparty/lzma/CPP/7zip/Bundles/SFXWin/StdAfx.h
+++ b/3rdparty/lzma/CPP/7zip/Bundles/SFXWin/StdAfx.h
@@ -1,14 +1,6 @@
// StdAfx.h
-#ifndef __STDAFX_H
-#define __STDAFX_H
-
-#include "../../../Common/Common.h"
-
-#include <commctrl.h>
-#include <ShlObj.h>
-
-// #define printf(x) NO_PRINTF_(x)
-// #define sprintf(x) NO_SPRINTF_(x)
-
+#if _MSC_VER >= 1800
+#pragma warning(disable : 4464) // relative include path contains '..'
#endif
+#include "../../UI/FileManager/StdAfx.h"
diff --git a/3rdparty/lzma/CPP/7zip/Bundles/SFXWin/makefile b/3rdparty/lzma/CPP/7zip/Bundles/SFXWin/makefile
index dc48ae88a78..69a8553cf61 100644
--- a/3rdparty/lzma/CPP/7zip/Bundles/SFXWin/makefile
+++ b/3rdparty/lzma/CPP/7zip/Bundles/SFXWin/makefile
@@ -1,9 +1,11 @@
PROG = 7z.sfx
+MY_FIXED = 1
+
CFLAGS = $(CFLAGS) \
- -DNO_REGISTRY \
- -DEXTRACT_ONLY \
- -DNO_READ_FROM_CODER \
- -D_SFX \
+ -DZ7_NO_REGISTRY \
+ -DZ7_EXTRACT_ONLY \
+ -DZ7_NO_READ_FROM_CODER \
+ -DZ7_SFX \
!IFDEF UNDER_CE
LIBS = $(LIBS) ceshell.lib Commctrl.lib
@@ -29,6 +31,7 @@ COMMON_OBJS = \
$O\Wildcard.obj \
WIN_OBJS = \
+ $O\Clipboard.obj \
$O\CommonDialog.obj \
$O\DLL.obj \
$O\ErrorMsg.obj \
@@ -36,11 +39,13 @@ WIN_OBJS = \
$O\FileFind.obj \
$O\FileIO.obj \
$O\FileName.obj \
+ $O\MemoryGlobal.obj \
$O\PropVariant.obj \
$O\PropVariantConv.obj \
$O\ResourceString.obj \
$O\Shell.obj \
$O\Synchronization.obj \
+ $O\System.obj \
$O\Window.obj \
WIN_CTRL_OBJS = \
@@ -126,6 +131,7 @@ CRYPTO_OBJS = \
$O\MyAes.obj \
C_OBJS = \
+ $O\7zStream.obj \
$O\Alloc.obj \
$O\Bcj2.obj \
$O\Bra.obj \
@@ -135,13 +141,16 @@ C_OBJS = \
$O\Delta.obj \
$O\DllSecur.obj \
$O\Lzma2Dec.obj \
+ $O\Lzma2DecMt.obj \
$O\LzmaDec.obj \
+ $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"
!include "../../7zip.mak"
diff --git a/3rdparty/lzma/CPP/7zip/Bundles/SFXWin/resource.rc b/3rdparty/lzma/CPP/7zip/Bundles/SFXWin/resource.rc
index 91292b2f11a..3b2217a58b6 100644
--- a/3rdparty/lzma/CPP/7zip/Bundles/SFXWin/resource.rc
+++ b/3rdparty/lzma/CPP/7zip/Bundles/SFXWin/resource.rc
@@ -48,3 +48,8 @@ STRINGTABLE DISCARDABLE
BEGIN
IDS_PROP_MTIME "Modified"
END
+
+
+#ifndef UNDER_CE
+1 24 MOVEABLE PURE "../../UI/GUI/7zG.exe.manifest"
+#endif