From b67ffe691bddceb89b47dd09a60203b77a2b72ed Mon Sep 17 00:00:00 2001 From: Igor Pavlov Date: Wed, 5 Sep 2007 00:00:00 +0000 Subject: 4.55 beta --- CPP/7zip/Common/ProgressUtils.cpp | 6 ++++-- CPP/7zip/Common/ProgressUtils.h | 1 + CPP/7zip/MyVersion.h | 8 ++++---- CPP/7zip/UI/Agent/AgentOut.cpp | 6 ++++-- CPP/7zip/UI/Common/ArchiveExtractCallback.cpp | 5 +---- CPP/7zip/UI/Common/ArchiveExtractCallback.h | 1 - CPP/7zip/UI/Common/Extract.cpp | 11 ++++++++++- CPP/7zip/UI/Far/Far.dsp | 16 ++++++++-------- DOC/7zip.nsi | 2 +- DOC/7zip.wxs | 2 +- DOC/readme.txt | 2 +- 11 files changed, 35 insertions(+), 25 deletions(-) diff --git a/CPP/7zip/Common/ProgressUtils.cpp b/CPP/7zip/Common/ProgressUtils.cpp index 22dc60d1..f24ff6b6 100755 --- a/CPP/7zip/Common/ProgressUtils.cpp +++ b/CPP/7zip/Common/ProgressUtils.cpp @@ -7,7 +7,7 @@ CLocalProgress::CLocalProgress() { ProgressOffset = InSize = OutSize = 0; - SendRatio = true; + SendRatio = SendProgress = true; } void CLocalProgress::Init(IProgress *progress, bool inSizeIsMain) @@ -31,7 +31,9 @@ STDMETHODIMP CLocalProgress::SetRatioInfo(const UInt64 *inSize, const UInt64 *ou } inSizeNew += ProgressOffset; outSizeNew += ProgressOffset; - return _progress->SetCompleted(_inSizeIsMain ? &inSizeNew : &outSizeNew); + if (SendProgress) + return _progress->SetCompleted(_inSizeIsMain ? &inSizeNew : &outSizeNew); + return S_OK; } HRESULT CLocalProgress::SetCur() diff --git a/CPP/7zip/Common/ProgressUtils.h b/CPP/7zip/Common/ProgressUtils.h index 4d0eb20d..831c7366 100755 --- a/CPP/7zip/Common/ProgressUtils.h +++ b/CPP/7zip/Common/ProgressUtils.h @@ -20,6 +20,7 @@ public: UInt64 InSize; UInt64 OutSize; bool SendRatio; + bool SendProgress; CLocalProgress(); void Init(IProgress *progress, bool inSizeIsMain); diff --git a/CPP/7zip/MyVersion.h b/CPP/7zip/MyVersion.h index 742f6f98..3d5c5267 100755 --- a/CPP/7zip/MyVersion.h +++ b/CPP/7zip/MyVersion.h @@ -1,8 +1,8 @@ #define MY_VER_MAJOR 4 -#define MY_VER_MINOR 54 +#define MY_VER_MINOR 55 #define MY_VER_BUILD 0 -#define MY_VERSION "4.54 beta" -#define MY_7ZIP_VERSION "7-Zip 4.54 beta" -#define MY_DATE "2007-09-04" +#define MY_VERSION "4.55 beta" +#define MY_7ZIP_VERSION "7-Zip 4.55 beta" +#define MY_DATE "2007-09-05" #define MY_COPYRIGHT "Copyright (c) 1999-2007 Igor Pavlov" #define MY_VERSION_COPYRIGHT_DATE MY_VERSION " " MY_COPYRIGHT " " MY_DATE diff --git a/CPP/7zip/UI/Agent/AgentOut.cpp b/CPP/7zip/UI/Agent/AgentOut.cpp index f2750234..956b0bbd 100755 --- a/CPP/7zip/UI/Agent/AgentOut.cpp +++ b/CPP/7zip/UI/Agent/AgentOut.cpp @@ -226,8 +226,10 @@ STDMETHODIMP CAgent::DoOperation( if (updatePairs2[i].NewData) numFiles++; - RINOK(updateCallback100->SetNumFiles(numFiles)); - + if (updateCallback100) + { + RINOK(updateCallback100->SetNumFiles(numFiles)); + } CUpdateCallbackAgent updateCallbackAgent; updateCallbackAgent.SetCallback(updateCallback100); diff --git a/CPP/7zip/UI/Common/ArchiveExtractCallback.cpp b/CPP/7zip/UI/Common/ArchiveExtractCallback.cpp index 7e97b542..9e679e57 100755 --- a/CPP/7zip/UI/Common/ArchiveExtractCallback.cpp +++ b/CPP/7zip/UI/Common/ArchiveExtractCallback.cpp @@ -41,7 +41,6 @@ void CArchiveExtractCallback::Init( { _stdOutMode = stdOutMode; _numErrors = 0; - _ratioMode = false; _unpTotal = 1; _packTotal = packSize; @@ -50,6 +49,7 @@ void CArchiveExtractCallback::Init( _extractCallback2.QueryInterface(IID_ICompressProgressInfo, &_compressProgress); LocalProgressSpec->Init(extractCallback2, true); + LocalProgressSpec->SendProgress = false; _itemDefaultName = itemDefaultName; _utcLastWriteTimeDefault = utcLastWriteTimeDefault; @@ -97,8 +97,6 @@ STDMETHODIMP CArchiveExtractCallback::SetCompleted(const UInt64 *completeValue) if (_multiArchives) { - if (_ratioMode) - return S_OK; if (completeValue != NULL) { UInt64 packCur = LocalProgressSpec->InSize + MyMultDiv64(*completeValue, _unpTotal, _packTotal); @@ -112,7 +110,6 @@ STDMETHODIMP CArchiveExtractCallback::SetCompleted(const UInt64 *completeValue) STDMETHODIMP CArchiveExtractCallback::SetRatioInfo(const UInt64 *inSize, const UInt64 *outSize) { COM_TRY_BEGIN - _ratioMode = true; return _localProgress->SetRatioInfo(inSize, outSize); COM_TRY_END } diff --git a/CPP/7zip/UI/Common/ArchiveExtractCallback.h b/CPP/7zip/UI/Common/ArchiveExtractCallback.h index f24f5b87..fd30d64d 100755 --- a/CPP/7zip/UI/Common/ArchiveExtractCallback.h +++ b/CPP/7zip/UI/Common/ArchiveExtractCallback.h @@ -105,7 +105,6 @@ public: CLocalProgress *LocalProgressSpec; CMyComPtr _localProgress; - bool _ratioMode; UInt64 _packTotal; UInt64 _unpTotal; diff --git a/CPP/7zip/UI/Common/Extract.cpp b/CPP/7zip/UI/Common/Extract.cpp index faf0f727..0e56a08a 100755 --- a/CPP/7zip/UI/Common/Extract.cpp +++ b/CPP/7zip/UI/Common/Extract.cpp @@ -91,6 +91,7 @@ HRESULT DecompressArchives( CExtractOptions options = optionsSpec; int i; UInt64 totalPackSize = 0; + CRecordVector archiveSizes; for (i = 0; i < archivePaths.Size(); i++) { const UString &archivePath = archivePaths[i]; @@ -99,6 +100,7 @@ HRESULT DecompressArchives( throw "there is no such archive"; if (archiveFileInfo.IsDirectory()) throw "can't decompress folder"; + archiveSizes.Add(archiveFileInfo.Size); totalPackSize += archiveFileInfo.Size; } CArchiveExtractCallback *extractCallbackSpec = new CArchiveExtractCallback; @@ -145,8 +147,15 @@ HRESULT DecompressArchives( { archivePaths.Delete(index); archivePathsFull.Delete(index); + totalPackSize -= archiveSizes[index]; + archiveSizes.Delete(index); } } + if (archiveLink.VolumePaths.Size() != 0) + { + totalPackSize += archiveLink.VolumesSize; + RINOK(extractCallback->SetTotal(totalPackSize)); + } #ifndef _NO_CRYPTO UString password; @@ -160,7 +169,7 @@ HRESULT DecompressArchives( options.DefaultItemName = archiveLink.GetDefaultItemName(); RINOK(DecompressArchive( archiveLink.GetArchive(), - archiveFileInfo.Size, + archiveFileInfo.Size + archiveLink.VolumesSize, archiveLink.GetDefaultItemName(), wildcardCensor, options, extractCallback, extractCallbackSpec, errorMessage)); extractCallbackSpec->LocalProgressSpec->InSize += archiveFileInfo.Size + diff --git a/CPP/7zip/UI/Far/Far.dsp b/CPP/7zip/UI/Far/Far.dsp index 9856f41f..17392f74 100755 --- a/CPP/7zip/UI/Far/Far.dsp +++ b/CPP/7zip/UI/Far/Far.dsp @@ -410,14 +410,6 @@ SOURCE=..\Common\OpenArchive.h # End Source File # Begin Source File -SOURCE=..\..\Common\ProgressUtils.cpp -# End Source File -# Begin Source File - -SOURCE=..\..\Common\ProgressUtils.h -# End Source File -# Begin Source File - SOURCE=..\Common\PropIDUtils.cpp # End Source File # Begin Source File @@ -550,6 +542,14 @@ SOURCE=..\..\Common\FileStreams.h # End Source File # Begin Source File +SOURCE=..\..\Common\ProgressUtils.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\Common\ProgressUtils.h +# End Source File +# Begin Source File + SOURCE=..\..\Common\StreamUtils.cpp # End Source File # Begin Source File diff --git a/DOC/7zip.nsi b/DOC/7zip.nsi index 4129c1e9..cad0426c 100755 --- a/DOC/7zip.nsi +++ b/DOC/7zip.nsi @@ -2,7 +2,7 @@ ;Defines !define VERSION_MAJOR 4 -!define VERSION_MINOR 54 +!define VERSION_MINOR 55 !define VERSION_POSTFIX_FULL " beta" !ifdef WIN64 !ifdef IA64 diff --git a/DOC/7zip.wxs b/DOC/7zip.wxs index 08295ddc..00f37dce 100755 --- a/DOC/7zip.wxs +++ b/DOC/7zip.wxs @@ -1,7 +1,7 @@ - + diff --git a/DOC/readme.txt b/DOC/readme.txt index 0dd8c84a..995b3088 100755 --- a/DOC/readme.txt +++ b/DOC/readme.txt @@ -1,4 +1,4 @@ -7-Zip 4.54 Sources +7-Zip 4.55 Sources ------------------ 7-Zip is a file archiver for Windows 95/98/ME/NT/2000/2003/XP/Vista. -- cgit v1.2.3