Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/kornelski/7z.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIgor Pavlov <ipavlov@users.sourceforge.net>2008-08-13 04:00:00 +0400
committerKornel LesiƄski <kornel@geekhood.net>2016-05-28 02:15:56 +0300
commit173c07e166fdf6fcd20f18ea73008f1b628945df (patch)
tree13ebea85cdc4c16ae93714ff0627ee9f91ad7e08 /CPP/7zip/Bundles
parent3901bf0ab88106a5b031cba7bc18d60cdebf7eef (diff)
4.59 beta
Diffstat (limited to 'CPP/7zip/Bundles')
-rwxr-xr-xCPP/7zip/Bundles/Alone/Alone.dsp32
-rwxr-xr-xCPP/7zip/Bundles/Alone/makefile15
-rwxr-xr-xCPP/7zip/Bundles/Alone7z/makefile1
-rwxr-xr-xCPP/7zip/Bundles/Format7z/resource.rc2
-rwxr-xr-xCPP/7zip/Bundles/Format7zExtract/resource.rc2
-rwxr-xr-xCPP/7zip/Bundles/Format7zExtractR/resource.rc2
-rwxr-xr-xCPP/7zip/Bundles/Format7zF/Format7z.dsp314
-rwxr-xr-xCPP/7zip/Bundles/Format7zF/makefile64
-rwxr-xr-xCPP/7zip/Bundles/Format7zF/resource.rc42
-rwxr-xr-xCPP/7zip/Bundles/Format7zR/resource.rc2
-rwxr-xr-xCPP/7zip/Bundles/SFXCon/Main.cpp58
-rwxr-xr-xCPP/7zip/Bundles/SFXSetup/ExtractCallback.cpp121
-rwxr-xr-xCPP/7zip/Bundles/SFXSetup/ExtractCallback.h37
-rwxr-xr-xCPP/7zip/Bundles/SFXSetup/ExtractEngine.cpp156
-rwxr-xr-xCPP/7zip/Bundles/SFXSetup/ExtractEngine.h11
-rwxr-xr-xCPP/7zip/Bundles/SFXSetup/Main.cpp30
-rwxr-xr-xCPP/7zip/Bundles/SFXSetup/SFXSetup.dsp12
-rwxr-xr-xCPP/7zip/Bundles/SFXSetup/makefile6
-rwxr-xr-xCPP/7zip/Bundles/SFXWin/Main.cpp61
-rwxr-xr-xCPP/7zip/Bundles/SFXWin/SFXWin.dsp16
-rwxr-xr-xCPP/7zip/Bundles/SFXWin/makefile2
21 files changed, 502 insertions, 484 deletions
diff --git a/CPP/7zip/Bundles/Alone/Alone.dsp b/CPP/7zip/Bundles/Alone/Alone.dsp
index d50fb15e..22930d9e 100755
--- a/CPP/7zip/Bundles/Alone/Alone.dsp
+++ b/CPP/7zip/Bundles/Alone/Alone.dsp
@@ -505,6 +505,10 @@ SOURCE=..\..\..\Windows\Thread.h
# End Source File
# Begin Source File
+SOURCE=..\..\..\Windows\Time.cpp
+# End Source File
+# Begin Source File
+
SOURCE=..\..\..\Windows\Time.h
# End Source File
# End Group
@@ -1672,6 +1676,14 @@ SOURCE=..\..\Archive\Common\DummyOutStream.h
# End Source File
# Begin Source File
+SOURCE=..\..\Archive\Common\FindSignature.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\Archive\Common\FindSignature.h
+# End Source File
+# Begin Source File
+
SOURCE=..\..\Archive\Common\HandlerOut.cpp
# End Source File
# Begin Source File
@@ -1735,22 +1747,6 @@ SOURCE=..\..\Archive\Split\SplitHandler.h
SOURCE=..\..\Archive\Split\SplitRegister.cpp
# End Source File
# End Group
-# Begin Group "Z Format"
-
-# PROP Default_Filter ""
-# Begin Source File
-
-SOURCE=..\..\Archive\Z\ZHandler.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\Archive\Z\ZHandler.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\Archive\Z\ZRegister.cpp
-# End Source File
-# End Group
# Begin Group "cab"
# PROP Default_Filter ""
@@ -1831,6 +1827,10 @@ SOURCE=..\..\Archive\Lzma\LzmaIn.h
SOURCE=..\..\Archive\Lzma\LzmaItem.h
# End Source File
# End Group
+# Begin Source File
+
+SOURCE=..\..\Archive\ZHandler.cpp
+# End Source File
# End Group
# Begin Group "UI Common"
diff --git a/CPP/7zip/Bundles/Alone/makefile b/CPP/7zip/Bundles/Alone/makefile
index e3dc8e5e..234153b3 100755
--- a/CPP/7zip/Bundles/Alone/makefile
+++ b/CPP/7zip/Bundles/Alone/makefile
@@ -47,6 +47,7 @@ WIN_OBJS = \
$O\PropVariantConversions.obj \
$O\Synchronization.obj \
$O\System.obj \
+ $O\Time.obj \
7ZIP_COMMON_OBJS = \
$O\CreateCoder.obj \
@@ -93,11 +94,15 @@ UI_COMMON_OBJS = \
$O\UpdateProduce.obj \
$O\WorkDir.obj \
+AR_OBJS = \
+ $O\ZHandler.obj \
+
AR_COMMON_OBJS = \
$O\CoderMixer2.obj \
$O\CoderMixer2MT.obj \
$O\CrossThreadProgress.obj \
$O\DummyOutStream.obj \
+ $O\FindSignature.obj \
$O\HandlerOut.obj \
$O\InStreamWithCRC.obj \
$O\ItemNameUtils.obj \
@@ -165,10 +170,6 @@ TAR_OBJS = \
$O\TarUpdate.obj \
$O\TarRegister.obj \
-Z_OBJS = \
- $O\ZHandler.obj \
- $O\ZRegister.obj \
-
ZIP_OBJS = \
$O\ZipAddCommon.obj \
$O\ZipHandler.obj \
@@ -290,6 +291,7 @@ OBJS = \
$(WIN_OBJS) \
$(7ZIP_COMMON_OBJS) \
$(UI_COMMON_OBJS) \
+ $(AR_OBJS) \
$(AR_COMMON_OBJS) \
$(7Z_OBJS) \
$(BZ2_OBJS) \
@@ -298,7 +300,6 @@ OBJS = \
$(LZM_OBJS) \
$(SPLIT_OBJS) \
$(TAR_OBJS) \
- $(Z_OBJS) \
$(ZIP_OBJS) \
$(BZIP2_OBJS) \
$(BZIP2_OPT_OBJS) \
@@ -339,6 +340,8 @@ $(7ZIP_COMMON_OBJS): ../../Common/$(*B).cpp
$(COMPL)
$(UI_COMMON_OBJS): ../../UI/Common/$(*B).cpp
$(COMPL)
+$(AR_OBJS): ../../Archive/$(*B).cpp
+ $(COMPL)
$(AR_COMMON_OBJS): ../../Archive/Common/$(*B).cpp
$(COMPL)
@@ -356,8 +359,6 @@ $(SPLIT_OBJS): ../../Archive/Split/$(*B).cpp
$(COMPL)
$(TAR_OBJS): ../../Archive/Tar/$(*B).cpp
$(COMPL)
-$(Z_OBJS): ../../Archive/Z/$(*B).cpp
- $(COMPL)
$(ZIP_OBJS): ../../Archive/Zip/$(*B).cpp
$(COMPL)
diff --git a/CPP/7zip/Bundles/Alone7z/makefile b/CPP/7zip/Bundles/Alone7z/makefile
index 53b94c1d..404c813d 100755
--- a/CPP/7zip/Bundles/Alone7z/makefile
+++ b/CPP/7zip/Bundles/Alone7z/makefile
@@ -49,6 +49,7 @@ WIN_OBJS = \
$O\PropVariantConversions.obj \
$O\Synchronization.obj \
$O\System.obj \
+ $O\Time.obj \
7ZIP_COMMON_OBJS = \
$O\CreateCoder.obj \
diff --git a/CPP/7zip/Bundles/Format7z/resource.rc b/CPP/7zip/Bundles/Format7z/resource.rc
index 5b3f363e..2f2b42ae 100755
--- a/CPP/7zip/Bundles/Format7z/resource.rc
+++ b/CPP/7zip/Bundles/Format7z/resource.rc
@@ -2,4 +2,4 @@
MY_VERSION_INFO_DLL("7z Standalone Plugin", "7za")
-101 ICON "../../Archive/7z/7z.ico"
+101 ICON "../../Archive/Icons/7z.ico"
diff --git a/CPP/7zip/Bundles/Format7zExtract/resource.rc b/CPP/7zip/Bundles/Format7zExtract/resource.rc
index 56e6b5d7..6a654615 100755
--- a/CPP/7zip/Bundles/Format7zExtract/resource.rc
+++ b/CPP/7zip/Bundles/Format7zExtract/resource.rc
@@ -2,4 +2,4 @@
MY_VERSION_INFO_DLL("7z Standalone Extracting Plugin", "7zxa")
-101 ICON "../../Archive/7z/7z.ico"
+101 ICON "../../Archive/Icons/7z.ico"
diff --git a/CPP/7zip/Bundles/Format7zExtractR/resource.rc b/CPP/7zip/Bundles/Format7zExtractR/resource.rc
index 09708cff..eb636986 100755
--- a/CPP/7zip/Bundles/Format7zExtractR/resource.rc
+++ b/CPP/7zip/Bundles/Format7zExtractR/resource.rc
@@ -2,4 +2,4 @@
MY_VERSION_INFO_DLL("7z Standalone Extracting Plugin", "7zxr")
-101 ICON "../../Archive/7z/7z.ico"
+101 ICON "../../Archive/Icons/7z.ico"
diff --git a/CPP/7zip/Bundles/Format7zF/Format7z.dsp b/CPP/7zip/Bundles/Format7zF/Format7z.dsp
index 7a41a82a..16d89635 100755
--- a/CPP/7zip/Bundles/Format7zF/Format7z.dsp
+++ b/CPP/7zip/Bundles/Format7zF/Format7z.dsp
@@ -91,102 +91,118 @@ LINK32=link.exe
# Begin Group "Spec"
# PROP Default_Filter ""
+# Begin Group "Icons"
+
+# PROP Default_Filter ""
# Begin Source File
-SOURCE=..\..\Archive\7z\7z.ico
+SOURCE=..\..\Archive\Icons\7z.ico
# End Source File
# Begin Source File
-SOURCE=..\..\Archive\Archive2.def
+SOURCE=..\..\Archive\Icons\arj.ico
# End Source File
# Begin Source File
-SOURCE=..\..\Archive\ArchiveExports.cpp
+SOURCE=..\..\Archive\Icons\bz2.ico
# End Source File
# Begin Source File
-SOURCE=..\..\Archive\Arj\arj.ico
+SOURCE=..\..\Archive\Icons\cab.ico
# End Source File
# Begin Source File
-SOURCE=..\..\Archive\BZip2\bz2.ico
+SOURCE=..\..\Archive\Icons\cpio.ico
# End Source File
# Begin Source File
-SOURCE=..\..\Archive\Cab\cab.ico
+SOURCE=..\..\Archive\Icons\deb.ico
# End Source File
# Begin Source File
-SOURCE=..\..\Compress\CodecExports.cpp
+SOURCE=..\..\Archive\Icons\dmg.ico
# End Source File
# Begin Source File
-SOURCE=..\..\Archive\Cpio\cpio.ico
+SOURCE=..\..\Archive\Icons\gz.ico
# End Source File
# Begin Source File
-SOURCE=..\..\Archive\Deb\deb.ico
+SOURCE=..\..\Archive\Icons\hfs.ico
# End Source File
# Begin Source File
-SOURCE=..\..\Archive\DllExports2.cpp
+SOURCE=..\..\Archive\Icons\iso.ico
# End Source File
# Begin Source File
-SOURCE=..\..\Archive\GZip\gz.ico
+SOURCE=..\..\Archive\Icons\lzh.ico
# End Source File
# Begin Source File
-SOURCE=..\..\Archive\Iso\Iso.ico
+SOURCE=..\..\Archive\Icons\lzma.ico
# End Source File
# Begin Source File
-SOURCE=..\..\Archive\Lzh\lzh.ico
+SOURCE=..\..\Archive\Icons\rar.ico
# End Source File
# Begin Source File
-SOURCE=..\..\Archive\Lzma\lzma.ico
+SOURCE=..\..\Archive\Icons\rpm.ico
# End Source File
# Begin Source File
-SOURCE=..\..\Archive\Rar\rar.ico
+SOURCE=..\..\Archive\Icons\split.ico
# End Source File
# Begin Source File
-SOURCE=.\resource.rc
+SOURCE=..\..\Archive\Icons\tar.ico
# End Source File
# Begin Source File
-SOURCE=..\..\Archive\RPM\rpm.ico
+SOURCE=..\..\Archive\Icons\wim.ico
# End Source File
# Begin Source File
-SOURCE=..\..\Archive\Split\Split.ico
+SOURCE=..\..\Archive\Icons\xar.ico
# End Source File
# Begin Source File
-SOURCE=.\StdAfx.cpp
-# ADD CPP /Yc"StdAfx.h"
+SOURCE=..\..\Archive\Icons\z.ico
# End Source File
# Begin Source File
-SOURCE=.\StdAfx.h
+SOURCE=..\..\Archive\Icons\zip.ico
# End Source File
+# End Group
# Begin Source File
-SOURCE=..\..\Archive\Tar\tar.ico
+SOURCE=..\..\Archive\Archive2.def
# End Source File
# Begin Source File
-SOURCE=..\..\Archive\Wim\wim.ico
+SOURCE=..\..\Archive\ArchiveExports.cpp
# End Source File
# Begin Source File
-SOURCE=..\..\Archive\Z\Z.ico
+SOURCE=..\..\Compress\CodecExports.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\Archive\DllExports2.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\resource.rc
+# End Source File
+# Begin Source File
+
+SOURCE=.\StdAfx.cpp
+# ADD CPP /Yc"StdAfx.h"
# End Source File
# Begin Source File
-SOURCE=..\..\Archive\Zip\zip.ico
+SOURCE=.\StdAfx.h
# End Source File
# End Group
# Begin Group "Common"
@@ -222,6 +238,14 @@ SOURCE=..\..\..\Common\MyInitGuid.h
# End Source File
# Begin Source File
+SOURCE=..\..\..\Common\MyMap.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\Common\MyMap.h
+# End Source File
+# Begin Source File
+
SOURCE=..\..\..\Common\MyString.cpp
# End Source File
# Begin Source File
@@ -246,6 +270,14 @@ SOURCE=..\..\..\Common\MyWindows.h
# End Source File
# Begin Source File
+SOURCE=..\..\..\Common\MyXml.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\Common\MyXml.h
+# End Source File
+# Begin Source File
+
SOURCE=..\..\..\Common\NewHandler.cpp
# End Source File
# Begin Source File
@@ -591,6 +623,14 @@ SOURCE=..\..\Compress\Deflate\DeflateNsisRegister.cpp
SOURCE=..\..\Compress\Deflate\DeflateRegister.cpp
# End Source File
+# Begin Source File
+
+SOURCE=..\..\Compress\Deflate\ZlibDecoder.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\Compress\Deflate\ZlibDecoder.h
+# End Source File
# End Group
# Begin Group "BZip2"
@@ -1670,38 +1710,6 @@ SOURCE=..\..\Archive\Rar\RarVolumeInStream.cpp
SOURCE=..\..\Archive\Rar\RarVolumeInStream.h
# End Source File
# End Group
-# Begin Group "Arj"
-
-# PROP Default_Filter ""
-# Begin Source File
-
-SOURCE=..\..\Archive\Arj\ArjHandler.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\Archive\Arj\ArjHandler.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\Archive\Arj\ArjHeader.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\Archive\Arj\ArjIn.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\Archive\Arj\ArjIn.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\Archive\Arj\ArjItem.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\Archive\Arj\ArjRegister.cpp
-# End Source File
-# End Group
# Begin Group "bz2"
# PROP Default_Filter ""
@@ -1839,6 +1847,14 @@ SOURCE=..\..\Archive\Common\DummyOutStream.h
# End Source File
# Begin Source File
+SOURCE=..\..\Archive\Common\FindSignature.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\Archive\Common\FindSignature.h
+# End Source File
+# Begin Source File
+
SOURCE=..\..\Archive\Common\HandlerOut.cpp
# End Source File
# Begin Source File
@@ -1930,42 +1946,6 @@ SOURCE=..\..\Archive\Cpio\CpioItem.h
SOURCE=..\..\Archive\Cpio\CpioRegister.cpp
# End Source File
# End Group
-# Begin Group "Deb"
-
-# PROP Default_Filter ""
-# Begin Source File
-
-SOURCE=..\..\Archive\Deb\DebHandler.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\Archive\Deb\DebHandler.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\Archive\Deb\DebHeader.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\Archive\Deb\DebHeader.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\Archive\Deb\DebIn.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\Archive\Deb\DebIn.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\Archive\Deb\DebItem.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\Archive\Deb\DebRegister.cpp
-# End Source File
-# End Group
# Begin Group "GZip"
# PROP Default_Filter ""
@@ -2141,30 +2121,6 @@ SOURCE=..\..\Archive\Nsis\NsisRegister.cpp
# Begin Group "RPM"
# PROP Default_Filter ""
-# Begin Source File
-
-SOURCE=..\..\Archive\RPM\RpmHandler.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\Archive\RPM\RpmHandler.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\Archive\RPM\RpmHeader.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\Archive\RPM\RpmIn.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\Archive\RPM\RpmIn.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\Archive\RPM\RpmRegister.cpp
-# End Source File
# End Group
# Begin Group "Split"
@@ -2242,22 +2198,6 @@ SOURCE=..\..\Archive\Tar\TarUpdate.cpp
SOURCE=..\..\Archive\Tar\TarUpdate.h
# End Source File
# End Group
-# Begin Group "Z"
-
-# PROP Default_Filter ""
-# Begin Source File
-
-SOURCE=..\..\Archive\Z\ZHandler.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\Archive\Z\ZHandler.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\Archive\Z\ZRegister.cpp
-# End Source File
-# End Group
# Begin Group "Zip"
# PROP Default_Filter ""
@@ -2418,10 +2358,98 @@ SOURCE=..\..\Archive\Lzma\LzmaIn.h
SOURCE=..\..\Archive\Lzma\LzmaItem.h
# End Source File
# End Group
+# Begin Group "Hfs"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=..\..\Archive\Hfs\HfsHandler.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\Archive\Hfs\HfsHandler.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\Archive\Hfs\HfsIn.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\Archive\Hfs\HfsIn.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\Archive\Hfs\HfsRegister.cpp
+# End Source File
+# End Group
+# Begin Group "Udf"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=..\..\Archive\Udf\UdfHandler.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\Archive\Udf\UdfHandler.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\Archive\Udf\UdfIn.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\Archive\Udf\UdfIn.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\Archive\Udf\UdfRegister.cpp
+# End Source File
+# End Group
+# Begin Source File
+
+SOURCE=..\..\Archive\ArjHandler.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\Archive\DebHandler.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\Archive\DmgHandler.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\Archive\ElfHandler.cpp
+# End Source File
# Begin Source File
SOURCE=..\..\Archive\IArchive.h
# End Source File
+# Begin Source File
+
+SOURCE=..\..\Archive\MachoHandler.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\Archive\MubHandler.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\Archive\PeHandler.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\Archive\RpmHandler.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\Archive\XarHandler.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\Archive\ZHandler.cpp
+# End Source File
# End Group
# Begin Group "7zip"
@@ -2446,6 +2474,10 @@ SOURCE=..\..\IProgress.h
SOURCE=..\..\IStream.h
# End Source File
+# Begin Source File
+
+SOURCE=..\..\PropID.h
+# End Source File
# End Group
# Begin Group "Windows"
@@ -2484,6 +2516,14 @@ SOURCE=..\..\..\Windows\PropVariant.h
# End Source File
# Begin Source File
+SOURCE=..\..\..\Windows\PropVariantUtils.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\Windows\PropVariantUtils.h
+# End Source File
+# Begin Source File
+
SOURCE=..\..\..\Windows\Synchronization.cpp
# End Source File
# Begin Source File
@@ -2502,6 +2542,14 @@ SOURCE=..\..\..\Windows\System.h
SOURCE=..\..\..\Windows\Thread.h
# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\Windows\Time.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\Windows\Time.h
+# End Source File
# End Group
# End Target
# End Project
diff --git a/CPP/7zip/Bundles/Format7zF/makefile b/CPP/7zip/Bundles/Format7zF/makefile
index 328f8ab6..fb2a1f91 100755
--- a/CPP/7zip/Bundles/Format7zF/makefile
+++ b/CPP/7zip/Bundles/Format7zF/makefile
@@ -12,7 +12,9 @@ COMMON_OBJS = \
$O\CRC.obj \
$O\IntToString.obj \
$O\NewHandler.obj \
+ $O\MyMap.obj \
$O\MyString.obj \
+ $O\MyXml.obj \
$O\StringConvert.obj \
$O\StringToInt.obj \
$O\MyVector.obj \
@@ -24,8 +26,10 @@ WIN_OBJS = \
$O\FileFind.obj \
$O\FileIO.obj \
$O\PropVariant.obj \
+ $O\PropVariantUtils.obj \
$O\Synchronization.obj \
$O\System.obj \
+ $O\Time.obj \
7ZIP_COMMON_OBJS = \
$O\InBuffer.obj \
@@ -52,12 +56,23 @@ WIN_OBJS = \
AR_OBJS = \
$O\ArchiveExports.obj \
$O\DllExports2.obj \
+ $O\ArjHandler.obj \
+ $O\DebHandler.obj \
+ $O\DmgHandler.obj \
+ $O\ElfHandler.obj \
+ $O\MachoHandler.obj \
+ $O\MubHandler.obj \
+ $O\PeHandler.obj \
+ $O\RpmHandler.obj \
+ $O\XarHandler.obj \
+ $O\ZHandler.obj \
AR_COMMON_OBJS = \
$O\CoderMixer2.obj \
$O\CoderMixer2MT.obj \
$O\CrossThreadProgress.obj \
$O\DummyOutStream.obj \
+ $O\FindSignature.obj \
$O\InStreamWithCRC.obj \
$O\ItemNameUtils.obj \
$O\MultiStream.obj \
@@ -84,11 +99,6 @@ AR_COMMON_OBJS = \
$O\7zUpdate.obj \
$O\7zRegister.obj \
-ARJ_OBJS = \
- $O\ArjHandler.obj \
- $O\ArjIn.obj \
- $O\ArjRegister.obj \
-
BZ2_OBJS = \
$O\BZip2Handler.obj \
$O\BZip2HandlerOut.obj \
@@ -119,12 +129,6 @@ CPIO_OBJS = \
$O\CpioIn.obj \
$O\CpioRegister.obj \
-DEB_OBJS = \
- $O\DebHandler.obj \
- $O\DebHeader.obj \
- $O\DebIn.obj \
- $O\DebRegister.obj \
-
GZ_OBJS = \
$O\GZipHandler.obj \
$O\GZipHandlerOut.obj \
@@ -134,6 +138,11 @@ GZ_OBJS = \
$O\GZipUpdate.obj \
$O\GZipRegister.obj \
+HFS_OBJS = \
+ $O\HfsHandler.obj \
+ $O\HfsIn.obj \
+ $O\HfsRegister.obj \
+
ISO_OBJS = \
$O\IsoHandler.obj \
$O\IsoHeader.obj \
@@ -167,11 +176,6 @@ RAR_OBJS = \
$O\RarVolumeInStream.obj \
$O\RarRegister.obj \
-RPM_OBJS = \
- $O\RpmHandler.obj \
- $O\RpmIn.obj \
- $O\RpmRegister.obj \
-
SPLIT_OBJS = \
$O\SplitHandler.obj \
$O\SplitHandlerOut.obj \
@@ -186,15 +190,16 @@ TAR_OBJS = \
$O\TarUpdate.obj \
$O\TarRegister.obj \
+UDF_OBJS = \
+ $O\UdfHandler.obj \
+ $O\UdfIn.obj \
+ $O\UdfRegister.obj \
+
WIM_OBJS = \
$O\WimHandler.obj \
$O\WimIn.obj \
$O\WimRegister.obj \
-Z_OBJS = \
- $O\ZHandler.obj \
- $O\ZRegister.obj \
-
ZIP_OBJS = \
$O\ZipAddCommon.obj \
$O\ZipHandler.obj \
@@ -240,6 +245,7 @@ DEFLATE_OPT_OBJS = \
$O\DeflateRegister.obj \
$O\Deflate64Register.obj \
$O\DeflateNsisRegister.obj \
+ $O\ZlibDecoder.obj \
IMPLODE_OBJS = \
$O\ImplodeDecoder.obj \
@@ -337,24 +343,22 @@ OBJS = \
$(AR_OBJS) \
$(AR_COMMON_OBJS) \
$(7Z_OBJS) \
- $(ARJ_OBJS) \
$(BZ2_OBJS) \
$(CAB_OBJS) \
$(CHM_OBJS) \
$(COM_OBJS) \
$(CPIO_OBJS) \
- $(DEB_OBJS) \
$(GZ_OBJS) \
+ $(HFS_OBJS) \
$(ISO_OBJS) \
$(LZH_OBJS) \
$(LZM_OBJS) \
$(NSIS_OBJS) \
$(RAR_OBJS) \
- $(RPM_OBJS) \
$(SPLIT_OBJS) \
$(TAR_OBJS) \
+ $(UDF_OBJS) \
$(WIM_OBJS) \
- $(Z_OBJS) \
$(ZIP_OBJS) \
$(BZIP2_OBJS) \
$(BZIP2_OPT_OBJS) \
@@ -402,8 +406,6 @@ $(AR_COMMON_OBJS): ../../Archive/Common/$(*B).cpp
$(7Z_OBJS): ../../Archive/7z/$(*B).cpp
$(COMPL)
-$(ARJ_OBJS): ../../Archive/Arj/$(*B).cpp
- $(COMPL)
$(BZ2_OBJS): ../../Archive/BZip2/$(*B).cpp
$(COMPL)
$(CAB_OBJS): ../../Archive/Cab/$(*B).cpp
@@ -414,10 +416,10 @@ $(COM_OBJS): ../../Archive/Com/$(*B).cpp
$(COMPL)
$(CPIO_OBJS): ../../Archive/Cpio/$(*B).cpp
$(COMPL)
-$(DEB_OBJS): ../../Archive/Deb/$(*B).cpp
- $(COMPL)
$(GZ_OBJS): ../../Archive/GZip/$(*B).cpp
$(COMPL)
+$(HFS_OBJS): ../../Archive/Hfs/$(*B).cpp
+ $(COMPL)
$(ISO_OBJS): ../../Archive/Iso/$(*B).cpp
$(COMPL)
$(LZH_OBJS): ../../Archive/Lzh/$(*B).cpp
@@ -428,15 +430,13 @@ $(NSIS_OBJS): ../../Archive/Nsis/$(*B).cpp
$(COMPL)
$(RAR_OBJS): ../../Archive/Rar/$(*B).cpp
$(COMPL)
-$(RPM_OBJS): ../../Archive/Rpm/$(*B).cpp
- $(COMPL)
$(SPLIT_OBJS): ../../Archive/Split/$(*B).cpp
$(COMPL)
$(TAR_OBJS): ../../Archive/Tar/$(*B).cpp
$(COMPL)
-$(WIM_OBJS): ../../Archive/Wim/$(*B).cpp
+$(UDF_OBJS): ../../Archive/Udf/$(*B).cpp
$(COMPL)
-$(Z_OBJS): ../../Archive/Z/$(*B).cpp
+$(WIM_OBJS): ../../Archive/Wim/$(*B).cpp
$(COMPL)
$(ZIP_OBJS): ../../Archive/Zip/$(*B).cpp
$(COMPL)
diff --git a/CPP/7zip/Bundles/Format7zF/resource.rc b/CPP/7zip/Bundles/Format7zF/resource.rc
index 18ec9549..79ef2950 100755
--- a/CPP/7zip/Bundles/Format7zF/resource.rc
+++ b/CPP/7zip/Bundles/Format7zF/resource.rc
@@ -3,26 +3,30 @@
MY_VERSION_INFO_DLL("7z Standalone Plugin", "7za")
-0 ICON "../../Archive/7z/7z.ico"
-1 ICON "../../Archive/Zip/zip.ico"
-2 ICON "../../Archive/BZip2/bz2.ico"
-3 ICON "../../Archive/Rar/rar.ico"
-4 ICON "../../Archive/Arj/arj.ico"
-5 ICON "../../Archive/Z/z.ico"
-6 ICON "../../Archive/Lzh/lzh.ico"
-7 ICON "../../Archive/Cab/cab.ico"
-8 ICON "../../Archive/Iso/iso.ico"
-9 ICON "../../Archive/Split/split.ico"
-10 ICON "../../Archive/RPM/rpm.ico"
-11 ICON "../../Archive/Deb/deb.ico"
-12 ICON "../../Archive/Cpio/cpio.ico"
-13 ICON "../../Archive/Tar/tar.ico"
-14 ICON "../../Archive/GZip/gz.ico"
-15 ICON "../../Archive/Wim/wim.ico"
-16 ICON "../../Archive/Lzma/lzma.ico"
+0 ICON "../../Archive/Icons/7z.ico"
+1 ICON "../../Archive/Icons/zip.ico"
+2 ICON "../../Archive/Icons/bz2.ico"
+3 ICON "../../Archive/Icons/rar.ico"
+4 ICON "../../Archive/Icons/arj.ico"
+5 ICON "../../Archive/Icons/z.ico"
+6 ICON "../../Archive/Icons/lzh.ico"
+7 ICON "../../Archive/Icons/cab.ico"
+8 ICON "../../Archive/Icons/iso.ico"
+9 ICON "../../Archive/Icons/split.ico"
+10 ICON "../../Archive/Icons/rpm.ico"
+11 ICON "../../Archive/Icons/deb.ico"
+12 ICON "../../Archive/Icons/cpio.ico"
+13 ICON "../../Archive/Icons/tar.ico"
+14 ICON "../../Archive/Icons/gz.ico"
+15 ICON "../../Archive/Icons/wim.ico"
+16 ICON "../../Archive/Icons/lzma.ico"
+17 ICON "../../Archive/Icons/dmg.ico"
+18 ICON "../../Archive/Icons/hfs.ico"
+19 ICON "../../Archive/Icons/xar.ico"
-STRINGTABLE
+
+STRINGTABLE
BEGIN
- 100 "7z:0 zip:1 bz2:2 bzip2:2 tbz2:2 tbz:2 rar:3 arj:4 z:5 taz:5 lzh:6 lha:6 cab:7 iso:8 split:9 rpm:10 deb:11 cpio:12 tar:13 gz:14 gzip:14 tgz:14 tpz:14 wim:15 swm:15 lzma:16"
+ 100 "7z:0 zip:1 bz2:2 bzip2:2 tbz2:2 tbz:2 rar:3 arj:4 z:5 taz:5 lzh:6 lha:6 cab:7 iso:8 split:9 rpm:10 deb:11 cpio:12 tar:13 gz:14 gzip:14 tgz:14 tpz:14 wim:15 swm:15 lzma:16 dmg:17 hfs:18 xar:19"
END
diff --git a/CPP/7zip/Bundles/Format7zR/resource.rc b/CPP/7zip/Bundles/Format7zR/resource.rc
index 60a17fe8..f9c17683 100755
--- a/CPP/7zip/Bundles/Format7zR/resource.rc
+++ b/CPP/7zip/Bundles/Format7zR/resource.rc
@@ -2,4 +2,4 @@
MY_VERSION_INFO_DLL("7z Standalone Plugin", "7zr")
-101 ICON "../../Archive/7z/7z.ico"
+101 ICON "../../Archive/Icons/7z.ico"
diff --git a/CPP/7zip/Bundles/SFXCon/Main.cpp b/CPP/7zip/Bundles/SFXCon/Main.cpp
index 79dabdec..5ae6878d 100755
--- a/CPP/7zip/Bundles/SFXCon/Main.cpp
+++ b/CPP/7zip/Bundles/SFXCon/Main.cpp
@@ -35,7 +35,7 @@ using namespace NCommandLineParser;
extern CStdOutStream *g_StdStream;
-static const char *kCopyrightString =
+static const char *kCopyrightString =
"\n7-Zip SFX " MY_VERSION_COPYRIGHT_DATE "\n";
static const int kNumSwitches = 6;
@@ -63,17 +63,17 @@ enum EEnum
{
kRecursed,
kWildCardOnlyRecursed,
- kNonRecursed,
+ kNonRecursed
};
}
-/*
+/*
static const char kRecursedIDChar = 'R';
static const wchar_t *kRecursedPostCharSet = L"0-";
namespace NRecursedPostCharIndex {
- enum EEnum
+ enum EEnum
{
- kWildCardRecursionOnly = 0,
+ kWildCardRecursionOnly = 0,
kNoRecursion = 1
};
}
@@ -84,7 +84,7 @@ static const char kImmediateNameID = '!';
static const char kSomeCludePostStringMinSize = 2; // at least <@|!><N>ame must be
static const char kSomeCludeAfterRecursedPostStringMinSize = 2; // at least <@|!><N>ame must be
*/
-static const CSwitchForm kSwitchForms[kNumSwitches] =
+static const CSwitchForm kSwitchForms[kNumSwitches] =
{
{ L"?", NSwitchType::kSimple, false },
{ L"H", NSwitchType::kSimple, false },
@@ -107,7 +107,7 @@ enum EEnum
}
-static const CCommandForm commandForms[kNumCommandForms] =
+static const CCommandForm commandForms[kNumCommandForms] =
{
{ L"T", false },
// { "E", false },
@@ -115,7 +115,7 @@ static const CCommandForm commandForms[kNumCommandForms] =
{ L"L", false }
};
-static const NRecursedType::EEnum kCommandRecursedDefault[kNumCommandForms] =
+static const NRecursedType::EEnum kCommandRecursedDefault[kNumCommandForms] =
{
NRecursedType::kRecursed
};
@@ -126,7 +126,7 @@ static const NRecursedType::EEnum kCommandRecursedDefault[kNumCommandForms] =
static const wchar_t *kUniversalWildcard = L"*";
static const int kCommandIndex = 0;
-static const char *kHelpString =
+static const char *kHelpString =
"\nUsage: 7zSFX [<command>] [<switches>...]\n"
"\n"
"<Commands>\n"
@@ -188,7 +188,7 @@ bool ParseArchiveCommand(const UString &commandString, CArchiveCommand &command)
UString commandStringUpper = commandString;
commandStringUpper.MakeUpper();
UString postString;
- int commandIndex = ParseCommand(kNumCommandForms, commandForms, commandStringUpper,
+ int commandIndex = ParseCommand(kNumCommandForms, commandForms, commandStringUpper,
postString) ;
if (commandIndex < 0)
return false;
@@ -199,7 +199,7 @@ bool ParseArchiveCommand(const UString &commandString, CArchiveCommand &command)
// ------------------------------------------------------------------
// filenames functions
-static bool AddNameToCensor(NWildcard::CCensor &wildcardCensor,
+static bool AddNameToCensor(NWildcard::CCensor &wildcardCensor,
const UString &name, bool include, NRecursedType::EEnum type)
{
/*
@@ -225,15 +225,15 @@ static bool AddNameToCensor(NWildcard::CCensor &wildcardCensor,
return true;
}
-void AddCommandLineWildCardToCensor(NWildcard::CCensor &wildcardCensor,
+void AddCommandLineWildCardToCensor(NWildcard::CCensor &wildcardCensor,
const UString &name, bool include, NRecursedType::EEnum type)
{
if (!AddNameToCensor(wildcardCensor, name, include, type))
ShowMessageAndThrowException(kIncorrectWildCardInCommandLine, NExitCode::kUserError);
}
-void AddToCensorFromNonSwitchesStrings(NWildcard::CCensor &wildcardCensor,
- const UStringVector & /* nonSwitchStrings */, NRecursedType::EEnum type,
+void AddToCensorFromNonSwitchesStrings(NWildcard::CCensor &wildcardCensor,
+ const UStringVector & /* nonSwitchStrings */, NRecursedType::EEnum type,
bool /* thereAreSwitchIncludeWildCards */)
{
AddCommandLineWildCardToCensor(wildcardCensor, kUniversalWildcard, true, type);
@@ -253,19 +253,19 @@ static void GetArguments(int numArguments, const char *arguments[], UStringVecto
#endif
int Main2(
- #ifndef _WIN32
+ #ifndef _WIN32
int numArguments, const char *arguments[]
#endif
)
{
- #ifdef _WIN32
+ #ifdef _WIN32
SetFileApisToOEM();
#endif
g_StdOut << kCopyrightString;
UStringVector commandStrings;
- #ifdef _WIN32
+ #ifdef _WIN32
NCommandLineParser::SplitCommandLine(GetCommandLineW(), commandStrings);
#else
GetArguments(numArguments, arguments, commandStrings);
@@ -280,7 +280,7 @@ int Main2(
{
parser.ParseStrings(kSwitchForms, commandStrings);
}
- catch(...)
+ catch(...)
{
PrintHelpAndExit();
}
@@ -297,7 +297,7 @@ int Main2(
CArchiveCommand command;
if (numNonSwitchStrings == 0)
command.CommandType = NCommandType::kFullExtract;
- else
+ else
{
if (numNonSwitchStrings > 1)
PrintHelpAndExit();
@@ -335,7 +335,7 @@ int Main2(
NFind::CFileInfoW archiveFileInfo;
if (!NFind::FindFile(archiveName, archiveFileInfo))
throw kCantFindSFX;
- if (archiveFileInfo.IsDirectory())
+ if (archiveFileInfo.IsDir())
throw kCantFindSFX;
UString outputDir;
@@ -349,7 +349,7 @@ int Main2(
UStringVector v1, v2;
v1.Add(archiveName);
v2.Add(archiveName);
- const NWildcard::CCensorNode &wildcardCensorHead =
+ const NWildcard::CCensorNode &wildcardCensorHead =
wildcardCensor.Pairs.Front().Head;
CCodecs *codecs = new CCodecs;
@@ -382,8 +382,8 @@ int Main2(
eo.StdOutMode = false;
eo.PathMode = NExtract::NPathMode::kFullPathnames;
eo.TestMode = command.CommandType == NCommandType::kTest;
- eo.OverwriteMode = yesToAll ?
- NExtract::NOverwriteMode::kWithoutPrompt :
+ eo.OverwriteMode = yesToAll ?
+ NExtract::NOverwriteMode::kWithoutPrompt :
NExtract::NOverwriteMode::kAskBefore;
eo.OutputDir = outputDir;
eo.YesToAll = yesToAll;
@@ -391,9 +391,9 @@ int Main2(
UString errorMessage;
CDecompressStat stat;
HRESULT result = DecompressArchives(
- codecs,
+ codecs, CIntVector(),
v1, v2,
- wildcardCensorHead,
+ wildcardCensorHead,
eo, &openCallback, ecs, errorMessage, stat);
if (!errorMessage.IsEmpty())
{
@@ -417,11 +417,11 @@ int Main2(
{
UInt64 numErrors = 0;
HRESULT result = ListArchives(
- codecs,
+ codecs, CIntVector(),
v1, v2,
- wildcardCensorHead,
- true, false,
- passwordEnabled,
+ wildcardCensorHead,
+ true, false,
+ passwordEnabled,
password, numErrors);
if (numErrors > 0)
{
diff --git a/CPP/7zip/Bundles/SFXSetup/ExtractCallback.cpp b/CPP/7zip/Bundles/SFXSetup/ExtractCallback.cpp
index 5d56a9e7..f2af88e6 100755
--- a/CPP/7zip/Bundles/SFXSetup/ExtractCallback.cpp
+++ b/CPP/7zip/Bundles/SFXSetup/ExtractCallback.cpp
@@ -5,44 +5,57 @@
#include "ExtractCallback.h"
#include "Common/Wildcard.h"
-#include "Common/StringConvert.h"
-#include "Windows/COM.h"
#include "Windows/FileDir.h"
#include "Windows/FileFind.h"
-#include "Windows/Time.h"
-#include "Windows/Defs.h"
#include "Windows/PropVariant.h"
-#include "Windows/PropVariantConversions.h"
-
using namespace NWindows;
using namespace NFile;
-// static LPCWSTR kErrorTitle = L"7-Zip";
static LPCWSTR kCantDeleteFile = L"Can not delete output file";
static LPCWSTR kCantOpenFile = L"Can not open output file";
static LPCWSTR kUnsupportedMethod = L"Unsupported Method";
-// static LPCWSTR kCRCFailed = L"CRC Failed";
-// static LPCWSTR kDataError = L"Data Error";
-// static LPCWSTR kUnknownError = L""Unknown Error";
void CExtractCallbackImp::Init(IInArchive *archiveHandler,
- const UString &directoryPath,
+ const UString &directoryPath,
const UString &itemDefaultName,
- const FILETIME &utcLastWriteTimeDefault,
- UInt32 attributesDefault)
+ const FILETIME &defaultMTime,
+ UInt32 defaultAttributes)
{
_message.Empty();
_isCorrupt = false;
_itemDefaultName = itemDefaultName;
- _utcLastWriteTimeDefault = utcLastWriteTimeDefault;
- _attributesDefault = attributesDefault;
+ _defaultMTime = defaultMTime;
+ _defaultAttributes = defaultAttributes;
_archiveHandler = archiveHandler;
_directoryPath = directoryPath;
NName::NormalizeDirPathPrefix(_directoryPath);
}
+HRESULT CExtractCallbackImp::Open_CheckBreak()
+{
+ #ifndef _NO_PROGRESS
+ return ProgressDialog.ProgressSynch.ProcessStopAndPause();
+ #else
+ return S_OK;
+ #endif
+}
+
+HRESULT CExtractCallbackImp::Open_SetTotal(const UInt64 * /* numFiles */, const UInt64 * /* numBytes */)
+{
+ return S_OK;
+}
+
+HRESULT CExtractCallbackImp::Open_SetCompleted(const UInt64 * /* numFiles */, const UInt64 * /* numBytes */)
+{
+ #ifndef _NO_PROGRESS
+ return ProgressDialog.ProgressSynch.ProcessStopAndPause();
+ #else
+ return S_OK;
+ #endif
+}
+
STDMETHODIMP CExtractCallbackImp::SetTotal(UInt64 size)
{
#ifndef _NO_PROGRESS
@@ -54,14 +67,7 @@ STDMETHODIMP CExtractCallbackImp::SetTotal(UInt64 size)
STDMETHODIMP CExtractCallbackImp::SetCompleted(const UInt64 *completeValue)
{
#ifndef _NO_PROGRESS
- for (;;)
- {
- if(ProgressDialog.ProgressSynch.GetStopped())
- return E_ABORT;
- if(!ProgressDialog.ProgressSynch.GetPaused())
- break;
- ::Sleep(100);
- }
+ RINOK(ProgressDialog.ProgressSynch.ProcessStopAndPause());
if (completeValue != NULL)
ProgressDialog.ProgressSynch.SetPos(*completeValue);
#endif
@@ -83,18 +89,18 @@ STDMETHODIMP CExtractCallbackImp::GetStream(UInt32 index,
ISequentialOutStream **outStream, Int32 askExtractMode)
{
#ifndef _NO_PROGRESS
- if(ProgressDialog.ProgressSynch.GetStopped())
+ if (ProgressDialog.ProgressSynch.GetStopped())
return E_ABORT;
#endif
_outFileStream.Release();
NCOM::CPropVariant propVariantName;
RINOK(_archiveHandler->GetProperty(index, kpidPath, &propVariantName));
UString fullPath;
- if(propVariantName.vt == VT_EMPTY)
+ if (propVariantName.vt == VT_EMPTY)
fullPath = _itemDefaultName;
- else
+ else
{
- if(propVariantName.vt != VT_BSTR)
+ if (propVariantName.vt != VT_BSTR)
return E_FAIL;
fullPath = propVariantName.bstrVal;
}
@@ -102,52 +108,51 @@ STDMETHODIMP CExtractCallbackImp::GetStream(UInt32 index,
// m_CurrentFilePath = GetSystemString(fullPath, _codePage);
- if(askExtractMode == NArchive::NExtract::NAskMode::kExtract)
+ if (askExtractMode == NArchive::NExtract::NAskMode::kExtract)
{
- NCOM::CPropVariant propVariant;
- RINOK(_archiveHandler->GetProperty(index, kpidAttributes, &propVariant));
- if (propVariant.vt == VT_EMPTY)
- _processedFileInfo.Attributes = _attributesDefault;
+ NCOM::CPropVariant prop;
+ RINOK(_archiveHandler->GetProperty(index, kpidAttrib, &prop));
+ if (prop.vt == VT_EMPTY)
+ _processedFileInfo.Attributes = _defaultAttributes;
else
{
- if (propVariant.vt != VT_UI4)
+ if (prop.vt != VT_UI4)
return E_FAIL;
- _processedFileInfo.Attributes = propVariant.ulVal;
+ _processedFileInfo.Attributes = prop.ulVal;
}
- RINOK(_archiveHandler->GetProperty(index, kpidIsFolder, &propVariant));
- _processedFileInfo.IsDirectory = VARIANT_BOOLToBool(propVariant.boolVal);
+ RINOK(_archiveHandler->GetProperty(index, kpidIsDir, &prop));
+ _processedFileInfo.IsDir = VARIANT_BOOLToBool(prop.boolVal);
bool isAnti = false;
{
- NCOM::CPropVariant propVariantTemp;
- RINOK(_archiveHandler->GetProperty(index, kpidIsAnti,
- &propVariantTemp));
- if (propVariantTemp.vt == VT_BOOL)
- isAnti = VARIANT_BOOLToBool(propVariantTemp.boolVal);
+ NCOM::CPropVariant propTemp;
+ RINOK(_archiveHandler->GetProperty(index, kpidIsAnti, &propTemp));
+ if (propTemp.vt == VT_BOOL)
+ isAnti = VARIANT_BOOLToBool(propTemp.boolVal);
}
- RINOK(_archiveHandler->GetProperty(index, kpidLastWriteTime, &propVariant));
- switch(propVariant.vt)
+ RINOK(_archiveHandler->GetProperty(index, kpidMTime, &prop));
+ switch(prop.vt)
{
case VT_EMPTY:
- _processedFileInfo.UTCLastWriteTime = _utcLastWriteTimeDefault;
+ _processedFileInfo.MTime = _defaultMTime;
break;
case VT_FILETIME:
- _processedFileInfo.UTCLastWriteTime = propVariant.filetime;
+ _processedFileInfo.MTime = prop.filetime;
break;
default:
return E_FAIL;
}
- UStringVector pathParts;
+ UStringVector pathParts;
SplitPathToParts(fullPath, pathParts);
- if(pathParts.IsEmpty())
+ if (pathParts.IsEmpty())
return E_FAIL;
UString processedPath = fullPath;
- if(!_processedFileInfo.IsDirectory)
+ if (!_processedFileInfo.IsDir)
pathParts.DeleteBack();
if (!pathParts.IsEmpty())
{
@@ -157,7 +162,7 @@ STDMETHODIMP CExtractCallbackImp::GetStream(UInt32 index,
UString fullProcessedPath = _directoryPath + processedPath;
- if(_processedFileInfo.IsDirectory)
+ if (_processedFileInfo.IsDir)
{
_diskFilePath = fullProcessedPath;
@@ -167,7 +172,7 @@ STDMETHODIMP CExtractCallbackImp::GetStream(UInt32 index,
}
NFind::CFileInfoW fileInfo;
- if(NFind::FindFile(fullProcessedPath, fileInfo))
+ if (NFind::FindFile(fullProcessedPath, fileInfo))
{
if (!NDirectory::DeleteFileAlways(fullProcessedPath))
{
@@ -214,9 +219,8 @@ STDMETHODIMP CExtractCallbackImp::SetOperationResult(Int32 resultEOperationResul
switch(resultEOperationResult)
{
case NArchive::NExtract::NOperationResult::kOK:
- {
break;
- }
+
default:
{
_outFileStream.Release();
@@ -225,23 +229,15 @@ STDMETHODIMP CExtractCallbackImp::SetOperationResult(Int32 resultEOperationResul
case NArchive::NExtract::NOperationResult::kUnSupportedMethod:
_message = kUnsupportedMethod;
break;
- case NArchive::NExtract::NOperationResult::kCRCError:
- _isCorrupt = true;
- // _message = kCRCFailed;
- break;
- case NArchive::NExtract::NOperationResult::kDataError:
- _isCorrupt = true;
- // _message = kDataError;
- break;
default:
_isCorrupt = true;
}
return E_FAIL;
}
}
- if(_outFileStream != NULL)
+ if (_outFileStream != NULL)
{
- _outFileStreamSpec->SetLastWriteTime(&_processedFileInfo.UTCLastWriteTime);
+ _outFileStreamSpec->SetMTime(&_processedFileInfo.MTime);
RINOK(_outFileStreamSpec->Close());
}
_outFileStream.Release();
@@ -249,4 +245,3 @@ STDMETHODIMP CExtractCallbackImp::SetOperationResult(Int32 resultEOperationResul
NDirectory::MySetFileAttributes(_diskFilePath, _processedFileInfo.Attributes);
return S_OK;
}
-
diff --git a/CPP/7zip/Bundles/SFXSetup/ExtractCallback.h b/CPP/7zip/Bundles/SFXSetup/ExtractCallback.h
index 01427394..4f4258bc 100755
--- a/CPP/7zip/Bundles/SFXSetup/ExtractCallback.h
+++ b/CPP/7zip/Bundles/SFXSetup/ExtractCallback.h
@@ -15,38 +15,31 @@
#ifndef _NO_PROGRESS
#include "../../UI/FileManager/ProgressDialog.h"
#endif
+#include "../../UI/Common/ArchiveOpenCallback.h"
-class CExtractCallbackImp:
+class CExtractCallbackImp:
public IArchiveExtractCallback,
+ public IOpenCallbackUI,
public CMyUnknownImp
{
public:
MY_UNKNOWN_IMP
- // IProgress
- STDMETHOD(SetTotal)(UInt64 size);
- STDMETHOD(SetCompleted)(const UInt64 *completeValue);
-
- // IExtractCallback
- STDMETHOD(GetStream)(UInt32 index, ISequentialOutStream **outStream,
- Int32 askExtractMode);
- STDMETHOD(PrepareOperation)(Int32 askExtractMode);
- STDMETHOD(SetOperationResult)(Int32 resultEOperationResult);
+ INTERFACE_IArchiveExtractCallback(;)
+ INTERFACE_IOpenCallbackUI(;)
private:
CMyComPtr<IInArchive> _archiveHandler;
UString _directoryPath;
-
UString _filePath;
-
UString _diskFilePath;
bool _extractMode;
struct CProcessedFileInfo
{
- FILETIME UTCLastWriteTime;
- bool IsDirectory;
+ FILETIME MTime;
+ bool IsDir;
UInt32 Attributes;
} _processedFileInfo;
@@ -54,8 +47,8 @@ private:
CMyComPtr<ISequentialOutStream> _outFileStream;
UString _itemDefaultName;
- FILETIME _utcLastWriteTimeDefault;
- UInt32 _attributesDefault;
+ FILETIME _defaultMTime;
+ UInt32 _defaultAttributes;
void CreateComplexDirectory(const UStringVector &dirPathParts);
public:
@@ -66,25 +59,25 @@ public:
bool _isCorrupt;
UString _message;
- void Init(IInArchive *archiveHandler,
- const UString &directoryPath,
+ void Init(IInArchive *archiveHandler,
+ const UString &directoryPath,
const UString &itemDefaultName,
- const FILETIME &utcLastWriteTimeDefault,
- UInt32 attributesDefault);
+ const FILETIME &defaultMTime,
+ UInt32 defaultAttributes);
#ifndef _NO_PROGRESS
HRESULT StartProgressDialog(const UString &title)
{
ProgressDialog.Create(title, 0);
{
- #ifdef LANG
+ #ifdef LANG
ProgressDialog.SetText(LangLoadString(IDS_PROGRESS_EXTRACTING, 0x02000890));
#else
ProgressDialog.SetText(NWindows::MyLoadStringW(IDS_PROGRESS_EXTRACTING));
#endif
}
- ProgressDialog.Show(SW_SHOWNORMAL);
+ ProgressDialog.Show(SW_SHOWNORMAL);
return S_OK;
}
virtual ~CExtractCallbackImp() { ProgressDialog.Destroy(); }
diff --git a/CPP/7zip/Bundles/SFXSetup/ExtractEngine.cpp b/CPP/7zip/Bundles/SFXSetup/ExtractEngine.cpp
index 04c9af18..d867b74a 100755
--- a/CPP/7zip/Bundles/SFXSetup/ExtractEngine.cpp
+++ b/CPP/7zip/Bundles/SFXSetup/ExtractEngine.cpp
@@ -12,128 +12,122 @@
#include "../../UI/Common/OpenArchive.h"
-#include "../../UI/Explorer/MyMessages.h"
#include "../../UI/FileManager/FormatUtils.h"
#include "ExtractCallback.h"
using namespace NWindows;
+static LPCWSTR kCantFindArchive = L"Can not find archive file";
+static LPCWSTR kCantOpenArchive = L"Can not open the file as archive";
+
struct CThreadExtracting
{
- CArchiveLink ArchiveLink;
+ #ifndef _NO_PROGRESS
+ bool ShowProgress;
+ #endif
+ CCodecs *Codecs;
+ UString FileName;
+ UString DestFolder;
CExtractCallbackImp *ExtractCallbackSpec;
CMyComPtr<IArchiveExtractCallback> ExtractCallback;
- #ifndef _NO_PROGRESS
+ CArchiveLink ArchiveLink;
HRESULT Result;
+ UString ErrorMessage;
- HRESULT Extract()
+ void Process()
{
- return ArchiveLink.GetArchive()->Extract(0, (UInt32)-1 , BoolToInt(false), ExtractCallback);
- }
- DWORD Process()
- {
- ExtractCallbackSpec->ProgressDialog.WaitCreating();
- Result = Extract();
- ExtractCallbackSpec->ProgressDialog.MyClose();
- return 0;
+ NFile::NFind::CFileInfoW fi;
+ if (!NFile::NFind::FindFile(FileName, fi))
+ {
+ ErrorMessage = kCantFindArchive;
+ Result = E_FAIL;
+ return;
+ }
+
+ Result = MyOpenArchive(Codecs, CIntVector(), FileName, ArchiveLink, ExtractCallbackSpec);
+ if (Result != S_OK)
+ {
+ if (Result != S_OK)
+ ErrorMessage = kCantOpenArchive;
+ return;
+ }
+
+ UString dirPath = DestFolder;
+ NFile::NName::NormalizeDirPathPrefix(dirPath);
+
+ if (!NFile::NDirectory::CreateComplexDirectory(dirPath))
+ {
+ ErrorMessage = MyFormatNew(IDS_CANNOT_CREATE_FOLDER,
+ #ifdef LANG
+ 0x02000603,
+ #endif
+ dirPath);
+ Result = E_FAIL;
+ return;
+ }
+
+ ExtractCallbackSpec->Init(ArchiveLink.GetArchive(), dirPath, L"Default", fi.MTime, 0);
+
+ #ifndef _NO_PROGRESS
+ if (ShowProgress)
+ ExtractCallbackSpec->ProgressDialog.WaitCreating();
+ #endif
+ Result = ArchiveLink.GetArchive()->Extract(0, (UInt32)-1 , BoolToInt(false), ExtractCallback);
+ #ifndef _NO_PROGRESS
+ if (ShowProgress)
+ ExtractCallbackSpec->ProgressDialog.MyClose();
+ #endif
}
+
static THREAD_FUNC_DECL MyThreadFunction(void *param)
{
- return ((CThreadExtracting *)param)->Process();
+ ((CThreadExtracting *)param)->Process();
+ return 0;
}
- #endif
};
-static const LPCWSTR kCantFindArchive = L"Can not find archive file";
-static const LPCWSTR kCantOpenArchive = L"File is not correct archive";
-
-HRESULT ExtractArchive(
- CCodecs *codecs,
- const UString &fileName,
- const UString &folderName,
- COpenCallbackGUI *openCallback,
- bool showProgress,
- bool &isCorrupt,
- UString &errorMessage)
+HRESULT ExtractArchive(CCodecs *codecs,const UString &fileName, const UString &destFolder,
+ bool showProgress, bool &isCorrupt, UString &errorMessage)
{
isCorrupt = false;
- NFile::NFind::CFileInfoW archiveFileInfo;
- if (!NFile::NFind::FindFile(fileName, archiveFileInfo))
- {
- errorMessage = kCantFindArchive;
- return E_FAIL;
- }
-
- CThreadExtracting extracter;
-
- HRESULT result = MyOpenArchive(codecs, fileName, extracter.ArchiveLink, openCallback);
-
- if (result != S_OK)
- {
- errorMessage = kCantOpenArchive;
- return result;
- }
+ CThreadExtracting t;
- UString directoryPath = folderName;
- NFile::NName::NormalizeDirPathPrefix(directoryPath);
+ t.Codecs = codecs;
+ t.FileName = fileName;
+ t.DestFolder = destFolder;
- /*
- UString directoryPath;
- {
- UString fullPath;
- int fileNamePartStartIndex;
- if (!NWindows::NFile::NDirectory::MyGetFullPathName(fileName, fullPath, fileNamePartStartIndex))
- {
- MessageBox(NULL, "Error 1329484", "7-Zip", 0);
- return E_FAIL;
- }
- directoryPath = fullPath.Left(fileNamePartStartIndex);
- }
- */
-
- if(!NFile::NDirectory::CreateComplexDirectory(directoryPath))
- {
- errorMessage = MyFormatNew(IDS_CANNOT_CREATE_FOLDER,
- #ifdef LANG
- 0x02000603,
- #endif
- directoryPath);
- return E_FAIL;
- }
-
- extracter.ExtractCallbackSpec = new CExtractCallbackImp;
- extracter.ExtractCallback = extracter.ExtractCallbackSpec;
+ t.ExtractCallbackSpec = new CExtractCallbackImp;
+ t.ExtractCallback = t.ExtractCallbackSpec;
- extracter.ExtractCallbackSpec->Init(
- extracter.ArchiveLink.GetArchive(),
- directoryPath, L"Default", archiveFileInfo.LastWriteTime, 0);
-
#ifndef _NO_PROGRESS
+ t.ShowProgress = showProgress;
if (showProgress)
{
NWindows::CThread thread;
- RINOK(thread.Create(CThreadExtracting::MyThreadFunction, &extracter));
+ RINOK(thread.Create(CThreadExtracting::MyThreadFunction, &t));
UString title;
- #ifdef LANG
+ #ifdef LANG
title = LangLoadString(IDS_PROGRESS_EXTRACTING, 0x02000890);
#else
title = NWindows::MyLoadStringW(IDS_PROGRESS_EXTRACTING);
#endif
- extracter.ExtractCallbackSpec->StartProgressDialog(title);
- result = extracter.Result;
+ t.ExtractCallbackSpec->StartProgressDialog(title);
}
else
#endif
{
- result = extracter.Extract();
+ t.Process();
}
- errorMessage = extracter.ExtractCallbackSpec->_message;
- isCorrupt = extracter.ExtractCallbackSpec->_isCorrupt;
- return result;
+
+ errorMessage = t.ErrorMessage;
+ if (errorMessage.IsEmpty())
+ errorMessage = t.ExtractCallbackSpec->_message;
+ isCorrupt = t.ExtractCallbackSpec->_isCorrupt;
+ return t.Result;
}
diff --git a/CPP/7zip/Bundles/SFXSetup/ExtractEngine.h b/CPP/7zip/Bundles/SFXSetup/ExtractEngine.h
index e2f7518b..56d69686 100755
--- a/CPP/7zip/Bundles/SFXSetup/ExtractEngine.h
+++ b/CPP/7zip/Bundles/SFXSetup/ExtractEngine.h
@@ -3,16 +3,9 @@
#ifndef __EXTRACTENGINE_H
#define __EXTRACTENGINE_H
-#include "../../UI/GUI/OpenCallbackGUI.h"
#include "../../UI/Common/LoadCodecs.h"
-HRESULT ExtractArchive(
- CCodecs *codecs,
- const UString &fileName,
- const UString &folderName,
- COpenCallbackGUI *openCallback,
- bool showProgress,
- bool &isCorrupt,
- UString &errorMessage);
+HRESULT ExtractArchive(CCodecs *codecs, const UString &fileName, const UString &destFolder,
+ bool showProgress, bool &isCorrupt, UString &errorMessage);
#endif
diff --git a/CPP/7zip/Bundles/SFXSetup/Main.cpp b/CPP/7zip/Bundles/SFXSetup/Main.cpp
index ff20b304..64f0eab1 100755
--- a/CPP/7zip/Bundles/SFXSetup/Main.cpp
+++ b/CPP/7zip/Bundles/SFXSetup/Main.cpp
@@ -31,11 +31,11 @@ using namespace NWindows;
HINSTANCE g_hInstance;
-static LPCTSTR kTempDirPrefix = TEXT("7zS");
+static LPCTSTR kTempDirPrefix = TEXT("7zS");
#define _SHELL_EXECUTE
-static bool ReadDataString(LPCWSTR fileName, LPCSTR startID,
+static bool ReadDataString(LPCWSTR fileName, LPCSTR startID,
LPCSTR endID, AString &stringResult)
{
stringResult.Empty();
@@ -64,7 +64,7 @@ static bool ReadDataString(LPCWSTR fileName, LPCSTR startID,
UInt32 numBytesInBuffer = numBytesPrev + processedSize;
UInt32 pos = 0;
for (;;)
- {
+ {
if (writeMode)
{
if (pos > numBytesInBuffer - signatureEndSize)
@@ -128,7 +128,7 @@ static inline bool IsItWindowsNT()
{
OSVERSIONINFO versionInfo;
versionInfo.dwOSVersionInfoSize = sizeof(versionInfo);
- if (!::GetVersionEx(&versionInfo))
+ if (!::GetVersionEx(&versionInfo))
return false;
return (versionInfo.dwPlatformId == VER_PLATFORM_WIN32_NT);
}
@@ -164,7 +164,7 @@ int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE /* hPrevInstance */, LPSTR /
if (!ReadDataString(fullPath, kStartID, kEndID, config))
{
if (!assumeYes)
- MyMessageBox(L"Can't load config info");
+ ShowErrorMessage(L"Can't load config info");
return 1;
}
@@ -177,7 +177,7 @@ int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE /* hPrevInstance */, LPSTR /
if (!GetTextConfig(config, pairs))
{
if (!assumeYes)
- MyMessageBox(L"Config failed");
+ ShowErrorMessage(L"Config failed");
return 1;
}
UString friendlyName = GetTextConfigValue(pairs, L"Title");
@@ -190,7 +190,7 @@ int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE /* hPrevInstance */, LPSTR /
dirPrefix = pairs[index].String;
if (!installPrompt.IsEmpty() && !assumeYes)
{
- if (MessageBoxW(0, installPrompt, friendlyName, MB_YESNO |
+ if (MessageBoxW(0, installPrompt, friendlyName, MB_YESNO |
MB_ICONQUESTION) != IDYES)
return 0;
}
@@ -206,7 +206,7 @@ int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE /* hPrevInstance */, LPSTR /
if (!tempDir.Create(kTempDirPrefix))
{
if (!assumeYes)
- MyMessageBox(L"Can not create temp folder archive");
+ ShowErrorMessage(L"Can not create temp folder archive");
return 1;
}
@@ -215,17 +215,15 @@ int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE /* hPrevInstance */, LPSTR /
HRESULT result = codecs->Load();
if (result != S_OK)
{
- MyMessageBox(L"Can not load codecs");
+ ShowErrorMessage(L"Can not load codecs");
return 1;
}
- COpenCallbackGUI openCallback;
-
UString tempDirPath = GetUnicodeString(tempDir.GetPath());
{
bool isCorrupt = false;
UString errorMessage;
- HRESULT result = ExtractArchive(codecs, fullPath, tempDirPath, &openCallback, showProgress,
+ HRESULT result = ExtractArchive(codecs, fullPath, tempDirPath, showProgress,
isCorrupt, errorMessage);
if (result != S_OK)
@@ -278,7 +276,7 @@ int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE /* hPrevInstance */, LPSTR /
if(result <= 32)
{
if (!assumeYes)
- MyMessageBox(L"Can not open file");
+ ShowErrorMessage(L"Can not open file");
return 1;
}
hProcess = execInfo.hProcess;
@@ -292,7 +290,7 @@ int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE /* hPrevInstance */, LPSTR /
if (!NFile::NFind::DoesFileExist(GetSystemString(appLaunched)))
{
if (!assumeYes)
- MyMessageBox(L"Can not find setup.exe");
+ ShowErrorMessage(L"Can not find setup.exe");
return 1;
}
}
@@ -323,8 +321,8 @@ int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE /* hPrevInstance */, LPSTR /
CSysString appLaunchedSys = GetSystemString(dirPrefix + appLaunched);
- BOOL createResult = CreateProcess(NULL, (LPTSTR)(LPCTSTR)appLaunchedSys,
- NULL, NULL, FALSE, 0, NULL, NULL /*tempDir.GetPath() */,
+ BOOL createResult = CreateProcess(NULL, (LPTSTR)(LPCTSTR)appLaunchedSys,
+ NULL, NULL, FALSE, 0, NULL, NULL /*tempDir.GetPath() */,
&startupInfo, &processInformation);
if (createResult == 0)
{
diff --git a/CPP/7zip/Bundles/SFXSetup/SFXSetup.dsp b/CPP/7zip/Bundles/SFXSetup/SFXSetup.dsp
index 3b0117a1..6a493519 100755
--- a/CPP/7zip/Bundles/SFXSetup/SFXSetup.dsp
+++ b/CPP/7zip/Bundles/SFXSetup/SFXSetup.dsp
@@ -647,18 +647,6 @@ SOURCE=..\..\UI\Common\OpenArchive.cpp
SOURCE=..\..\UI\Common\OpenArchive.h
# End Source File
# End Group
-# Begin Group "GUI"
-
-# PROP Default_Filter ""
-# Begin Source File
-
-SOURCE=..\..\UI\GUI\OpenCallbackGUI.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\UI\GUI\OpenCallbackGUI.h
-# End Source File
-# End Group
# End Group
# Begin Group "File Manager"
diff --git a/CPP/7zip/Bundles/SFXSetup/makefile b/CPP/7zip/Bundles/SFXSetup/makefile
index 274730cd..0d4255d1 100755
--- a/CPP/7zip/Bundles/SFXSetup/makefile
+++ b/CPP/7zip/Bundles/SFXSetup/makefile
@@ -12,9 +12,6 @@ SFX_WIN_OBJS = \
$O\ExtractCallback.obj \
$O\ExtractEngine.obj \
-GUI_OBJS = \
- $O\OpenCallbackGUI.obj \
-
COMMON_OBJS = \
$O\CommandLineParser.obj \
$O\CRC.obj \
@@ -111,7 +108,6 @@ C_OBJS = \
OBJS = \
$O\StdAfx.obj \
$(SFX_WIN_OBJS) \
- $(GUI_OBJS) \
$(COMMON_OBJS) \
$(WIN_OBJS) \
$(WIN_CTRL_OBJS) \
@@ -135,8 +131,6 @@ OBJS = \
$(SFX_WIN_OBJS): $(*B).cpp
$(COMPL)
-$(GUI_OBJS): ../../UI/GUI/$(*B).cpp
- $(COMPL)
$(COMMON_OBJS): ../../../Common/$(*B).cpp
$(COMPL)
$(WIN_OBJS): ../../../Windows/$(*B).cpp
diff --git a/CPP/7zip/Bundles/SFXWin/Main.cpp b/CPP/7zip/Bundles/SFXWin/Main.cpp
index 44f37560..7cc70882 100755
--- a/CPP/7zip/Bundles/SFXWin/Main.cpp
+++ b/CPP/7zip/Bundles/SFXWin/Main.cpp
@@ -4,12 +4,14 @@
#include <initguid.h>
-#include "Common/StringConvert.h"
#include "Common/CommandLineParser.h"
+#include "Common/StringConvert.h"
+#include "Windows/DLL.h"
+#include "Windows/Error.h"
#include "Windows/FileDir.h"
#include "Windows/FileName.h"
-#include "Windows/DLL.h"
+#include "Windows/ResourceString.h"
#include "../../ICoder.h"
#include "../../IPassword.h"
@@ -18,6 +20,7 @@
#include "../../UI/Common/ExitCode.h"
#include "../../UI/Explorer/MyMessages.h"
#include "../../UI/GUI/ExtractGUI.h"
+#include "../../UI/GUI/ExtractRes.h"
HINSTANCE g_hInstance;
#ifndef _UNICODE
@@ -26,15 +29,24 @@ static inline bool IsItWindowsNT()
{
OSVERSIONINFO versionInfo;
versionInfo.dwOSVersionInfoSize = sizeof(versionInfo);
- if (!::GetVersionEx(&versionInfo))
+ if (!::GetVersionEx(&versionInfo))
return false;
return (versionInfo.dwPlatformId == VER_PLATFORM_WIN32_NT);
}
#endif
-static const wchar_t *kMemoryExceptionMessage = L"ERROR: Can't allocate required memory!";
static const wchar_t *kUnknownExceptionMessage = L"ERROR: Unknown Error!";
+void ErrorMessageForHRESULT(HRESULT res)
+{
+ UString s;
+ if (res == E_OUTOFMEMORY)
+ s = NWindows::MyLoadStringW(IDS_MEM_ERROR);
+ else
+ s = NWindows::NError::MyFormatMessageW(res);
+ ShowErrorMessage(s);
+}
+
int APIENTRY WinMain2()
{
UString password;
@@ -67,7 +79,7 @@ int APIENTRY WinMain2()
int fileNamePartStartIndex;
if (!NWindows::NFile::NDirectory::MyGetFullPathName(path, fullPath, fileNamePartStartIndex))
{
- MyMessageBox(L"Error 1329484");
+ ShowErrorMessage(L"Error 1329484");
return 1;
}
@@ -76,14 +88,14 @@ int APIENTRY WinMain2()
HRESULT result = codecs->Load();
if (result != S_OK)
{
- ShowErrorMessage(0, result);
- return S_OK;
+ ErrorMessageForHRESULT(result);
+ return 1;
}
- COpenCallbackGUI openCallback;
+ // COpenCallbackGUI openCallback;
- openCallback.PasswordIsDefined = !password.IsEmpty();
- openCallback.Password = password;
+ // openCallback.PasswordIsDefined = !password.IsEmpty();
+ // openCallback.Password = password;
CExtractCallbackImp *ecs = new CExtractCallbackImp;
CMyComPtr<IFolderArchiveExtractCallback> extractCallback = ecs;
@@ -92,11 +104,11 @@ int APIENTRY WinMain2()
ecs->Password = password;
CExtractOptions eo;
- eo.OutputDir = outputFolderDefined ? outputFolder :
+ eo.OutputDir = outputFolderDefined ? outputFolder :
fullPath.Left(fileNamePartStartIndex);
eo.YesToAll = assumeYes;
- eo.OverwriteMode = assumeYes ?
- NExtract::NOverwriteMode::kWithoutPrompt :
+ eo.OverwriteMode = assumeYes ?
+ NExtract::NOverwriteMode::kWithoutPrompt :
NExtract::NOverwriteMode::kAskBefore;
eo.PathMode = NExtract::NPathMode::kFullPathnames;
eo.TestMode = false;
@@ -107,26 +119,23 @@ int APIENTRY WinMain2()
NWildcard::CCensorNode wildcardCensor;
wildcardCensor.AddItem(true, L"*", true, true, true);
- result = ExtractGUI(codecs, v1, v2,
- wildcardCensor, eo, (assumeYes ? false: true), &openCallback, ecs);
+ result = ExtractGUI(codecs, CIntVector(), v1, v2,
+ wildcardCensor, eo, (assumeYes ? false: true), ecs);
- /*
- HRESULT result = ExtractArchive(NULL, path, assumeYes, !assumeYes,
- outputFolderDefined ? outputFolder :
- fullPath.Left(fileNamePartStartIndex));
- */
if (result == S_OK)
{
if (ecs->Messages.Size() > 0 || ecs->NumArchiveErrors != 0)
- return NExitCode::kFatalError;
+ return NExitCode::kFatalError;
return 0;
}
if (result == E_ABORT)
return NExitCode::kUserBreak;
if (result == S_FALSE)
- MyMessageBox(L"Error in archive");
+ ShowErrorMessage(L"Error in archive");
else
- ShowErrorMessage(0, result);
+ ErrorMessageForHRESULT(result);
+ if (result == E_OUTOFMEMORY)
+ return NExitCode::kMemoryError;
return NExitCode::kFatalError;
}
@@ -142,12 +151,12 @@ int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE /* hPrevInstance */, LPSTR /
}
catch(const CNewException &)
{
- MyMessageBox(kMemoryExceptionMessage);
- return (NExitCode::kMemoryError);
+ ErrorMessageForHRESULT(E_OUTOFMEMORY);
+ return NExitCode::kMemoryError;
}
catch(...)
{
- MyMessageBox(kUnknownExceptionMessage);
+ ShowErrorMessage(kUnknownExceptionMessage);
return NExitCode::kFatalError;
}
}
diff --git a/CPP/7zip/Bundles/SFXWin/SFXWin.dsp b/CPP/7zip/Bundles/SFXWin/SFXWin.dsp
index 0a78fe4d..a6c7a6fd 100755
--- a/CPP/7zip/Bundles/SFXWin/SFXWin.dsp
+++ b/CPP/7zip/Bundles/SFXWin/SFXWin.dsp
@@ -554,6 +554,14 @@ SOURCE=..\..\..\Windows\Control\Dialog.cpp
SOURCE=..\..\..\Windows\Control\Dialog.h
# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\Windows\Control\ListView.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\Windows\Control\ListView.h
+# End Source File
# End Group
# Begin Source File
@@ -802,14 +810,6 @@ SOURCE=..\..\UI\GUI\ExtractGUI.cpp
SOURCE=..\..\UI\GUI\ExtractGUI.h
# End Source File
-# Begin Source File
-
-SOURCE=..\..\UI\GUI\OpenCallbackGUI.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\UI\GUI\OpenCallbackGUI.h
-# End Source File
# End Group
# Begin Group "Explorer"
diff --git a/CPP/7zip/Bundles/SFXWin/makefile b/CPP/7zip/Bundles/SFXWin/makefile
index a5f39559..80c7528e 100755
--- a/CPP/7zip/Bundles/SFXWin/makefile
+++ b/CPP/7zip/Bundles/SFXWin/makefile
@@ -12,7 +12,6 @@ SFX_WIN_OBJS = \
GUI_OBJS = \
$O\ExtractDialog.obj \
$O\ExtractGUI.obj \
- $O\OpenCallbackGUI.obj \
COMMON_OBJS = \
$O\CRC.obj \
@@ -40,6 +39,7 @@ WIN_OBJS = \
WIN_CTRL_OBJS = \
$O\Dialog.obj \
+ $O\ListView.obj \
7ZIP_COMMON_OBJS = \
$O\CreateCoder.obj \