summaryrefslogtreecommitdiffstatshomepage
path: root/3rdparty/lzma/CPP/7zip/UI/GUI
diff options
context:
space:
mode:
Diffstat (limited to '3rdparty/lzma/CPP/7zip/UI/GUI')
-rw-r--r--3rdparty/lzma/CPP/7zip/UI/GUI/7zG.exe.manifest23
-rw-r--r--3rdparty/lzma/CPP/7zip/UI/GUI/Extract.rc8
-rw-r--r--3rdparty/lzma/CPP/7zip/UI/GUI/ExtractDialog.cpp75
-rw-r--r--3rdparty/lzma/CPP/7zip/UI/GUI/ExtractDialog.h30
-rw-r--r--3rdparty/lzma/CPP/7zip/UI/GUI/ExtractGUI.cpp135
-rw-r--r--3rdparty/lzma/CPP/7zip/UI/GUI/ExtractGUI.h7
-rw-r--r--3rdparty/lzma/CPP/7zip/UI/GUI/HashGUI.h17
7 files changed, 179 insertions, 116 deletions
diff --git a/3rdparty/lzma/CPP/7zip/UI/GUI/7zG.exe.manifest b/3rdparty/lzma/CPP/7zip/UI/GUI/7zG.exe.manifest
new file mode 100644
index 00000000000..ae964d82036
--- /dev/null
+++ b/3rdparty/lzma/CPP/7zip/UI/GUI/7zG.exe.manifest
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0" xmlns:asmv3="urn:schemas-microsoft-com:asm.v3">
+ <assemblyIdentity version="1.0.0.0" processorArchitecture="*" name="7-Zip.7-Zip.7zG" type="win32"/>
+ <description>7-Zip GUI.</description>
+ <dependency>
+ <dependentAssembly><assemblyIdentity type="win32" name="Microsoft.Windows.Common-Controls" version="6.0.0.0" processorArchitecture="*" publicKeyToken="6595b64144ccf1df" language="*"/></dependentAssembly>
+ </dependency>
+<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1"><application>
+<!-- Vista --> <supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}"/>
+<!-- Win 7 --> <supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/>
+<!-- Win 8 --> <supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}"/>
+<!-- Win 8.1 --> <supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}"/>
+<!-- Win 10 --> <supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}"/>
+</application></compatibility>
+ <asmv3:application>
+ <asmv3:windowsSettings xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">
+ <dpiAware>true</dpiAware>
+ </asmv3:windowsSettings>
+ </asmv3:application>
+<application xmlns="urn:schemas-microsoft-com:asm.v3">
+<windowsSettings xmlns:ws2="http://schemas.microsoft.com/SMI/2016/WindowsSettings">
+<ws2:longPathAware>true</ws2:longPathAware></windowsSettings></application>
+</assembly>
diff --git a/3rdparty/lzma/CPP/7zip/UI/GUI/Extract.rc b/3rdparty/lzma/CPP/7zip/UI/GUI/Extract.rc
index f75b2e6fcb3..36bfb00945e 100644
--- a/3rdparty/lzma/CPP/7zip/UI/GUI/Extract.rc
+++ b/3rdparty/lzma/CPP/7zip/UI/GUI/Extract.rc
@@ -7,11 +7,11 @@ BEGIN
IDS_MEM_ERROR "The system cannot allocate the required amount of memory"
IDS_CANNOT_CREATE_FOLDER "Cannot create folder '{0}'"
IDS_UPDATE_NOT_SUPPORTED "Update operations are not supported for this archive."
- IDS_CANT_OPEN_ARCHIVE "Can not open file '{0}' as archive"
- IDS_CANT_OPEN_ENCRYPTED_ARCHIVE "Can not open encrypted archive '{0}'. Wrong password?"
+ IDS_CANT_OPEN_ARCHIVE "Cannot open file '{0}' as archive"
+ IDS_CANT_OPEN_ENCRYPTED_ARCHIVE "Cannot open encrypted archive '{0}'. Wrong password?"
IDS_UNSUPPORTED_ARCHIVE_TYPE "Unsupported archive type"
- IDS_CANT_OPEN_AS_TYPE "Can not open the file as {0} archive"
+ IDS_CANT_OPEN_AS_TYPE "Cannot open the file as {0} archive"
IDS_IS_OPEN_AS_TYPE "The file is open as {0} archive"
IDS_IS_OPEN_WITH_OFFSET "The archive is open with offset"
@@ -45,7 +45,7 @@ BEGIN
IDS_EXTRACT_MSG_DATA_ERROR "Data error"
IDS_EXTRACT_MSG_CRC_ERROR "CRC failed"
IDS_EXTRACT_MSG_UNAVAILABLE_DATA "Unavailable data"
- IDS_EXTRACT_MSG_UEXPECTED_END "Unexpected end of data";
+ IDS_EXTRACT_MSG_UEXPECTED_END "Unexpected end of data"
IDS_EXTRACT_MSG_DATA_AFTER_END "There are some data after the end of the payload data"
IDS_EXTRACT_MSG_IS_NOT_ARC "Is not archive"
IDS_EXTRACT_MSG_HEADERS_ERROR "Headers Error"
diff --git a/3rdparty/lzma/CPP/7zip/UI/GUI/ExtractDialog.cpp b/3rdparty/lzma/CPP/7zip/UI/GUI/ExtractDialog.cpp
index af47fc2d205..46284820392 100644
--- a/3rdparty/lzma/CPP/7zip/UI/GUI/ExtractDialog.cpp
+++ b/3rdparty/lzma/CPP/7zip/UI/GUI/ExtractDialog.cpp
@@ -9,7 +9,7 @@
#include "../../../Windows/FileDir.h"
#include "../../../Windows/ResourceString.h"
-#ifndef NO_REGISTRY
+#ifndef Z7_NO_REGISTRY
#include "../FileManager/HelpUtils.h"
#endif
@@ -28,6 +28,8 @@ using namespace NName;
extern HINSTANCE g_hInstance;
+#ifndef Z7_SFX
+
static const UInt32 kPathMode_IDs[] =
{
IDS_EXTRACT_PATHS_FULL,
@@ -44,8 +46,6 @@ static const UInt32 kOverwriteMode_IDs[] =
IDS_EXTRACT_OVERWRITE_RENAME_EXISTING
};
-#ifndef _SFX
-
static const
// NExtract::NPathMode::EEnum
int
@@ -70,7 +70,7 @@ static const
#endif
-#ifdef LANG
+#ifdef Z7_LANG
static const UInt32 kLangIDs[] =
{
@@ -87,22 +87,23 @@ static const UInt32 kLangIDs[] =
// static const int kWildcardsButtonIndex = 2;
-#ifndef NO_REGISTRY
+#ifndef Z7_NO_REGISTRY
static const unsigned kHistorySize = 16;
#endif
-#ifndef _SFX
+#ifndef Z7_SFX
// it's used in CompressDialog also
+void AddComboItems(NControl::CComboBox &combo, const UInt32 *langIDs, unsigned numItems, const int *values, int curVal);
void AddComboItems(NControl::CComboBox &combo, const UInt32 *langIDs, unsigned numItems, const int *values, int curVal)
{
- int curSel = 0;
+ unsigned curSel = 0;
for (unsigned i = 0; i < numItems; i++)
{
UString s = LangString(langIDs[i]);
s.RemoveChar(L'&');
- int index = (int)combo.AddString(s);
- combo.SetItemData(index, i);
+ const int index = (int)combo.AddString(s);
+ combo.SetItemData(index, (LPARAM)i);
if (values[i] == curVal)
curSel = i;
}
@@ -110,6 +111,7 @@ void AddComboItems(NControl::CComboBox &combo, const UInt32 *langIDs, unsigned n
}
// it's used in CompressDialog also
+bool GetBoolsVal(const CBoolPair &b1, const CBoolPair &b2);
bool GetBoolsVal(const CBoolPair &b1, const CBoolPair &b2)
{
if (b1.Def) return b1.Val;
@@ -124,8 +126,8 @@ void CExtractDialog::CheckButton_TwoBools(UINT id, const CBoolPair &b1, const CB
void CExtractDialog::GetButton_Bools(UINT id, CBoolPair &b1, CBoolPair &b2)
{
- bool val = IsButtonCheckedBool(id);
- bool oldVal = GetBoolsVal(b1, b2);
+ const bool val = IsButtonCheckedBool(id);
+ const bool oldVal = GetBoolsVal(b1, b2);
if (val != oldVal)
b1.Def = b2.Def = true;
b1.Val = b2.Val = val;
@@ -135,7 +137,7 @@ void CExtractDialog::GetButton_Bools(UINT id, CBoolPair &b1, CBoolPair &b2)
bool CExtractDialog::OnInit()
{
- #ifdef LANG
+ #ifdef Z7_LANG
{
UString s;
LangString_OnlyFromLangFile(IDD_EXTRACT, s);
@@ -143,23 +145,23 @@ bool CExtractDialog::OnInit()
GetText(s);
if (!ArcPath.IsEmpty())
{
- s.AddAscii(" : ");
+ s += " : ";
s += ArcPath;
}
SetText(s);
// LangSetWindowText(*this, IDD_EXTRACT);
- LangSetDlgItems(*this, kLangIDs, ARRAY_SIZE(kLangIDs));
+ LangSetDlgItems(*this, kLangIDs, Z7_ARRAY_SIZE(kLangIDs));
}
#endif
- #ifndef _SFX
+ #ifndef Z7_SFX
_passwordControl.Attach(GetItem(IDE_EXTRACT_PASSWORD));
_passwordControl.SetText(Password);
_passwordControl.SetPasswordChar(TEXT('*'));
_pathName.Attach(GetItem(IDE_EXTRACT_NAME));
#endif
- #ifdef NO_REGISTRY
+ #ifdef Z7_NO_REGISTRY
PathMode = NExtract::NPathMode::kFullPaths;
OverwriteMode = NExtract::NOverwriteMode::kAsk;
@@ -189,7 +191,7 @@ bool CExtractDialog::OnInit()
UString pathPrefix = DirPath;
- #ifndef _SFX
+ #ifndef Z7_SFX
if (_info.SplitDest.Val)
{
@@ -208,7 +210,7 @@ bool CExtractDialog::OnInit()
_path.SetText(pathPrefix);
- #ifndef NO_REGISTRY
+ #ifndef Z7_NO_REGISTRY
for (unsigned i = 0; i < _info.Paths.Size() && i < kHistorySize; i++)
_path.AddString(_info.Paths[i]);
#endif
@@ -220,13 +222,13 @@ bool CExtractDialog::OnInit()
_path.SetCurSel(-1);
*/
- #ifndef _SFX
+ #ifndef Z7_SFX
_pathMode.Attach(GetItem(IDC_EXTRACT_PATH_MODE));
_overwriteMode.Attach(GetItem(IDC_EXTRACT_OVERWRITE_MODE));
- AddComboItems(_pathMode, kPathMode_IDs, ARRAY_SIZE(kPathMode_IDs), kPathModeButtonsVals, PathMode);
- AddComboItems(_overwriteMode, kOverwriteMode_IDs, ARRAY_SIZE(kOverwriteMode_IDs), kOverwriteButtonsVals, OverwriteMode);
+ AddComboItems(_pathMode, kPathMode_IDs, Z7_ARRAY_SIZE(kPathMode_IDs), kPathModeButtonsVals, PathMode);
+ AddComboItems(_overwriteMode, kOverwriteMode_IDs, Z7_ARRAY_SIZE(kOverwriteMode_IDs), kOverwriteButtonsVals, OverwriteMode);
#endif
@@ -241,7 +243,7 @@ bool CExtractDialog::OnInit()
return CModalDialog::OnInit();
}
-#ifndef _SFX
+#ifndef Z7_SFX
void CExtractDialog::UpdatePasswordControl()
{
_passwordControl.SetPasswordChar(IsShowPasswordChecked() ? 0 : TEXT('*'));
@@ -251,14 +253,14 @@ void CExtractDialog::UpdatePasswordControl()
}
#endif
-bool CExtractDialog::OnButtonClicked(int buttonID, HWND buttonHWND)
+bool CExtractDialog::OnButtonClicked(unsigned buttonID, HWND buttonHWND)
{
switch (buttonID)
{
case IDB_EXTRACT_SET_PATH:
OnButtonSetPath();
return true;
- #ifndef _SFX
+ #ifndef Z7_SFX
case IDX_EXTRACT_NAME_ENABLE:
ShowItem_Bool(IDE_EXTRACT_NAME, IsButtonCheckedBool(IDX_EXTRACT_NAME_ENABLE));
return true;
@@ -280,12 +282,13 @@ void CExtractDialog::OnButtonSetPath()
UString resultPath;
if (!MyBrowseForFolder(*this, title, currentPath, resultPath))
return;
- #ifndef NO_REGISTRY
+ #ifndef Z7_NO_REGISTRY
_path.SetCurSel(-1);
#endif
_path.SetText(resultPath);
}
+void AddUniqueString(UStringVector &list, const UString &s);
void AddUniqueString(UStringVector &list, const UString &s)
{
FOR_VECTOR (i, list)
@@ -296,7 +299,7 @@ void AddUniqueString(UStringVector &list, const UString &s)
void CExtractDialog::OnOK()
{
- #ifndef _SFX
+ #ifndef Z7_SFX
int pathMode2 = kPathModeButtonsVals[_pathMode.GetCurSel()];
if (PathMode != NExtract::NPathMode::kCurPaths ||
pathMode2 != NExtract::NPathMode::kFullPaths)
@@ -310,7 +313,7 @@ void CExtractDialog::OnOK()
#endif
- #ifndef NO_REGISTRY
+ #ifndef Z7_NO_REGISTRY
// GetButton_Bools(IDX_EXTRACT_ALT_STREAMS, AltStreams, _info.AltStreams);
GetButton_Bools(IDX_EXTRACT_NT_SECUR, NtSecurity, _info.NtSecurity);
@@ -347,7 +350,7 @@ void CExtractDialog::OnOK()
UString s;
- #ifdef NO_REGISTRY
+ #ifdef Z7_NO_REGISTRY
_path.GetText(s);
@@ -357,7 +360,7 @@ void CExtractDialog::OnOK()
if (currentItem == CB_ERR)
{
_path.GetText(s);
- if (_path.GetCount() >= kHistorySize)
+ if (_path.GetCount() >= (int)kHistorySize)
currentItem = _path.GetCount() - 1;
}
else
@@ -368,9 +371,9 @@ void CExtractDialog::OnOK()
s.Trim();
NName::NormalizeDirPathPrefix(s);
- #ifndef _SFX
+ #ifndef Z7_SFX
- bool splitDest = IsButtonCheckedBool(IDX_EXTRACT_NAME_ENABLE);
+ const bool splitDest = IsButtonCheckedBool(IDX_EXTRACT_NAME_ENABLE);
if (splitDest)
{
UString pathName;
@@ -389,9 +392,9 @@ void CExtractDialog::OnOK()
DirPath = s;
- #ifndef NO_REGISTRY
+ #ifndef Z7_NO_REGISTRY
_info.Paths.Clear();
- #ifndef _SFX
+ #ifndef Z7_SFX
AddUniqueString(_info.Paths, s);
#endif
for (int i = 0; i < _path.GetCount(); i++)
@@ -408,11 +411,11 @@ void CExtractDialog::OnOK()
CModalDialog::OnOK();
}
-#ifndef NO_REGISTRY
-static LPCWSTR kHelpTopic = L"fm/plugins/7-zip/extract.htm";
+#ifndef Z7_NO_REGISTRY
+#define kHelpTopic "fm/plugins/7-zip/extract.htm"
void CExtractDialog::OnHelp()
{
- ShowHelpWindow(NULL, kHelpTopic);
+ ShowHelpWindow(kHelpTopic);
CModalDialog::OnHelp();
}
#endif
diff --git a/3rdparty/lzma/CPP/7zip/UI/GUI/ExtractDialog.h b/3rdparty/lzma/CPP/7zip/UI/GUI/ExtractDialog.h
index 33349ffc615..1565fb8ab4d 100644
--- a/3rdparty/lzma/CPP/7zip/UI/GUI/ExtractDialog.h
+++ b/3rdparty/lzma/CPP/7zip/UI/GUI/ExtractDialog.h
@@ -1,7 +1,7 @@
// ExtractDialog.h
-#ifndef __EXTRACT_DIALOG_H
-#define __EXTRACT_DIALOG_H
+#ifndef ZIP7_INC_EXTRACT_DIALOG_H
+#define ZIP7_INC_EXTRACT_DIALOG_H
#include "ExtractDialogRes.h"
@@ -12,7 +12,7 @@
#include "../FileManager/DialogSize.h"
-#ifndef NO_REGISTRY
+#ifndef Z7_NO_REGISTRY
#include "../Common/ZipRegistry.h"
#endif
@@ -33,20 +33,20 @@ namespace NExtractionDialog
class CExtractDialog: public NWindows::NControl::CModalDialog
{
- #ifdef NO_REGISTRY
+ #ifdef Z7_NO_REGISTRY
NWindows::NControl::CDialogChildControl _path;
#else
NWindows::NControl::CComboBox _path;
#endif
- #ifndef _SFX
+ #ifndef Z7_SFX
NWindows::NControl::CEdit _pathName;
NWindows::NControl::CEdit _passwordControl;
NWindows::NControl::CComboBox _pathMode;
NWindows::NControl::CComboBox _overwriteMode;
#endif
- #ifndef _SFX
+ #ifndef Z7_SFX
// int GetFilesMode() const;
void UpdatePasswordControl();
#endif
@@ -55,13 +55,13 @@ class CExtractDialog: public NWindows::NControl::CModalDialog
void CheckButton_TwoBools(UINT id, const CBoolPair &b1, const CBoolPair &b2);
void GetButton_Bools(UINT id, CBoolPair &b1, CBoolPair &b2);
- virtual bool OnInit();
- virtual bool OnButtonClicked(int buttonID, HWND buttonHWND);
- virtual void OnOK();
+ virtual bool OnInit() Z7_override;
+ virtual bool OnButtonClicked(unsigned buttonID, HWND buttonHWND) Z7_override;
+ virtual void OnOK() Z7_override;
- #ifndef NO_REGISTRY
+ #ifndef Z7_NO_REGISTRY
- virtual void OnHelp();
+ virtual void OnHelp() Z7_override;
NExtract::CInfo _info;
@@ -76,7 +76,7 @@ public:
UString DirPath;
UString ArcPath;
- #ifndef _SFX
+ #ifndef Z7_SFX
UString Password;
#endif
bool PathMode_Force;
@@ -84,16 +84,16 @@ public:
NExtract::NPathMode::EEnum PathMode;
NExtract::NOverwriteMode::EEnum OverwriteMode;
- #ifndef _SFX
+ #ifndef Z7_SFX
// CBoolPair AltStreams;
CBoolPair NtSecurity;
#endif
CBoolPair ElimDup;
- INT_PTR Create(HWND aWndParent = 0)
+ INT_PTR Create(HWND aWndParent = NULL)
{
- #ifdef _SFX
+ #ifdef Z7_SFX
BIG_DIALOG_SIZE(240, 64);
#else
BIG_DIALOG_SIZE(300, 160);
diff --git a/3rdparty/lzma/CPP/7zip/UI/GUI/ExtractGUI.cpp b/3rdparty/lzma/CPP/7zip/UI/GUI/ExtractGUI.cpp
index 7fb843a15fc..fdf3cc78a50 100644
--- a/3rdparty/lzma/CPP/7zip/UI/GUI/ExtractGUI.cpp
+++ b/3rdparty/lzma/CPP/7zip/UI/GUI/ExtractGUI.cpp
@@ -34,37 +34,25 @@ using namespace NWindows;
using namespace NFile;
using namespace NDir;
-static const wchar_t *kIncorrectOutDir = L"Incorrect output directory path";
+static const wchar_t * const kIncorrectOutDir = L"Incorrect output directory path";
-#ifndef _SFX
+#ifndef Z7_SFX
static void AddValuePair(UString &s, UINT resourceID, UInt64 value, bool addColon = true)
{
AddLangString(s, resourceID);
if (addColon)
- s += L':';
+ s += ':';
s.Add_Space();
- char sz[32];
- ConvertUInt64ToString(value, sz);
- s.AddAscii(sz);
+ s.Add_UInt64(value);
s.Add_LF();
}
static void AddSizePair(UString &s, UINT resourceID, UInt64 value)
{
- wchar_t sz[32];
AddLangString(s, resourceID);
- s += L": ";
- ConvertUInt64ToString(value, sz);
- s += MyFormatNew(IDS_FILE_SIZE, sz);
- // s += sz;
- if (value >= (1 << 20))
- {
- ConvertUInt64ToString(value >> 20, sz);
- s += L" (";
- s += sz;
- s += L" MB)";
- }
+ s += ": ";
+ AddSizeValue(s, value);
s.Add_LF();
}
@@ -72,8 +60,14 @@ static void AddSizePair(UString &s, UINT resourceID, UInt64 value)
class CThreadExtracting: public CProgressThreadVirt
{
- HRESULT ProcessVirt();
+ HRESULT ProcessVirt() Z7_override;
public:
+ /*
+ #ifdef Z7_EXTERNAL_CODECS
+ const CExternalCodecs *externalCodecs;
+ #endif
+ */
+
CCodecs *codecs;
CExtractCallbackImp *ExtractCallbackSpec;
const CObjectVector<COpenType> *FormatIndices;
@@ -83,39 +77,70 @@ public:
UStringVector *ArchivePathsFull;
const NWildcard::CCensorNode *WildcardCensor;
const CExtractOptions *Options;
- #ifndef _SFX
+
+ #ifndef Z7_SFX
CHashBundle *HashBundle;
+ virtual void ProcessWasFinished_GuiVirt() Z7_override;
#endif
- CMyComPtr<IExtractCallbackUI> ExtractCallback;
+
+ CMyComPtr<IFolderArchiveExtractCallback> FolderArchiveExtractCallback;
UString Title;
+
+ CPropNameValPairs Pairs;
};
+
+#ifndef Z7_SFX
+void CThreadExtracting::ProcessWasFinished_GuiVirt()
+{
+ if (HashBundle && !Pairs.IsEmpty())
+ ShowHashResults(Pairs, *this);
+}
+#endif
+
HRESULT CThreadExtracting::ProcessVirt()
{
CDecompressStat Stat;
- #ifndef _SFX
+
+ #ifndef Z7_SFX
+ /*
if (HashBundle)
HashBundle->Init();
+ */
#endif
- HRESULT res = Extract(codecs,
+ HRESULT res = Extract(
+ /*
+ #ifdef Z7_EXTERNAL_CODECS
+ externalCodecs,
+ #endif
+ */
+ codecs,
*FormatIndices, *ExcludedFormatIndices,
*ArchivePaths, *ArchivePathsFull,
- *WildcardCensor, *Options, ExtractCallbackSpec, ExtractCallback,
- #ifndef _SFX
+ *WildcardCensor, *Options,
+ ExtractCallbackSpec, ExtractCallbackSpec, FolderArchiveExtractCallback,
+ #ifndef Z7_SFX
HashBundle,
#endif
FinalMessage.ErrorMessage.Message, Stat);
- #ifndef _SFX
- if (res == S_OK && Options->TestMode && ExtractCallbackSpec->IsOK())
+
+ #ifndef Z7_SFX
+ if (res == S_OK && ExtractCallbackSpec->IsOK())
{
- UString s;
+ if (HashBundle)
+ {
+ AddValuePair(Pairs, IDS_ARCHIVES_COLON, Stat.NumArchives);
+ AddSizeValuePair(Pairs, IDS_PROP_PACKED_SIZE, Stat.PackSize);
+ AddHashBundleRes(Pairs, *HashBundle);
+ }
+ else if (Options->TestMode)
+ {
+ UString s;
- AddValuePair(s, IDS_ARCHIVES_COLON, Stat.NumArchives, false);
- AddSizePair(s, IDS_PROP_PACKED_SIZE, Stat.PackSize);
+ AddValuePair(s, IDS_ARCHIVES_COLON, Stat.NumArchives, false);
+ AddSizePair(s, IDS_PROP_PACKED_SIZE, Stat.PackSize);
- if (!HashBundle)
- {
if (Stat.NumFolders != 0)
AddValuePair(s, IDS_PROP_FOLDERS, Stat.NumFolders);
AddValuePair(s, IDS_PROP_FILES, Stat.NumFiles);
@@ -126,25 +151,21 @@ HRESULT CThreadExtracting::ProcessVirt()
AddValuePair(s, IDS_PROP_NUM_ALT_STREAMS, Stat.NumAltStreams);
AddSizePair(s, IDS_PROP_ALT_STREAMS_SIZE, Stat.AltStreams_UnpackSize);
}
- }
-
- if (HashBundle)
- {
s.Add_LF();
- AddHashBundleRes(s, *HashBundle, UString());
+ AddLangString(s, IDS_MESSAGE_NO_ERRORS);
+ FinalMessage.OkMessage.Title = Title;
+ FinalMessage.OkMessage.Message = s;
}
-
- s.Add_LF();
- AddLangString(s, IDS_MESSAGE_NO_ERRORS);
-
- FinalMessage.OkMessage.Title = Title;
- FinalMessage.OkMessage.Message = s;
}
#endif
+
return res;
}
+
+
HRESULT ExtractGUI(
+ // DECL_EXTERNAL_CODECS_LOC_VARS
CCodecs *codecs,
const CObjectVector<COpenType> &formatIndices,
const CIntVector &excludedFormatIndices,
@@ -152,7 +173,7 @@ HRESULT ExtractGUI(
UStringVector &archivePathsFull,
const NWildcard::CCensorNode &wildcardCensor,
CExtractOptions &options,
- #ifndef _SFX
+ #ifndef Z7_SFX
CHashBundle *hb,
#endif
bool showDialog,
@@ -163,6 +184,11 @@ HRESULT ExtractGUI(
messageWasDisplayed = false;
CThreadExtracting extracter;
+ /*
+ #ifdef Z7_EXTERNAL_CODECS
+ extracter.externalCodecs = _externalCodecs;
+ #endif
+ */
extracter.codecs = codecs;
extracter.FormatIndices = &formatIndices;
extracter.ExcludedFormatIndices = &excludedFormatIndices;
@@ -197,7 +223,7 @@ HRESULT ExtractGUI(
if (archivePathsFull.Size() == 1)
dialog.ArcPath = archivePathsFull[0];
- #ifndef _SFX
+ #ifndef Z7_SFX
// dialog.AltStreams = options.NtOptions.AltStreams;
dialog.NtSecurity = options.NtOptions.NtSecurity;
if (extractCallback->PasswordIsDefined)
@@ -213,7 +239,7 @@ HRESULT ExtractGUI(
options.PathMode = dialog.PathMode;
options.ElimDup = dialog.ElimDup;
- #ifndef _SFX
+ #ifndef Z7_SFX
// options.NtOptions.AltStreams = dialog.AltStreams;
options.NtOptions.NtSecurity = dialog.NtSecurity;
extractCallback->Password = dialog.Password;
@@ -233,7 +259,7 @@ HRESULT ExtractGUI(
{
UString s = GetUnicodeString(NError::MyFormatMessage(GetLastError()));
UString s2 = MyFormatNew(IDS_CANNOT_CREATE_FOLDER,
- #ifdef LANG
+ #ifdef Z7_LANG
0x02000603,
#endif
options.OutputDir);
@@ -249,24 +275,23 @@ HRESULT ExtractGUI(
extracter.Title = title;
extracter.ExtractCallbackSpec = extractCallback;
- extracter.ExtractCallbackSpec->ProgressDialog = &extracter.ProgressDialog;
- extracter.ExtractCallback = extractCallback;
+ extracter.ExtractCallbackSpec->ProgressDialog = &extracter;
+ extracter.FolderArchiveExtractCallback = extractCallback;
extracter.ExtractCallbackSpec->Init();
- extracter.ProgressDialog.CompressingMode = false;
+ extracter.CompressingMode = false;
extracter.ArchivePaths = &archivePaths;
extracter.ArchivePathsFull = &archivePathsFull;
extracter.WildcardCensor = &wildcardCensor;
extracter.Options = &options;
- #ifndef _SFX
+ #ifndef Z7_SFX
extracter.HashBundle = hb;
#endif
- extracter.ProgressDialog.IconID = IDI_ICON;
+ extracter.IconID = IDI_ICON;
- RINOK(extracter.Create(title, hwndParent));
- messageWasDisplayed = extracter.ThreadFinishedOK &
- extracter.ProgressDialog.MessagesDisplayed;
+ RINOK(extracter.Create(title, hwndParent))
+ messageWasDisplayed = extracter.ThreadFinishedOK && extracter.MessagesDisplayed;
return extracter.Result;
}
diff --git a/3rdparty/lzma/CPP/7zip/UI/GUI/ExtractGUI.h b/3rdparty/lzma/CPP/7zip/UI/GUI/ExtractGUI.h
index d55b30de15c..13ca6abf89f 100644
--- a/3rdparty/lzma/CPP/7zip/UI/GUI/ExtractGUI.h
+++ b/3rdparty/lzma/CPP/7zip/UI/GUI/ExtractGUI.h
@@ -1,7 +1,7 @@
// GUI/ExtractGUI.h
-#ifndef __EXTRACT_GUI_H
-#define __EXTRACT_GUI_H
+#ifndef ZIP7_INC_EXTRACT_GUI_H
+#define ZIP7_INC_EXTRACT_GUI_H
#include "../Common/Extract.h"
@@ -20,6 +20,7 @@
*/
HRESULT ExtractGUI(
+ // DECL_EXTERNAL_CODECS_LOC_VARS
CCodecs *codecs,
const CObjectVector<COpenType> &formatIndices,
const CIntVector &excludedFormatIndices,
@@ -27,7 +28,7 @@ HRESULT ExtractGUI(
UStringVector &archivePathsFull,
const NWildcard::CCensorNode &wildcardCensor,
CExtractOptions &options,
- #ifndef _SFX
+ #ifndef Z7_SFX
CHashBundle *hb,
#endif
bool showDialog,
diff --git a/3rdparty/lzma/CPP/7zip/UI/GUI/HashGUI.h b/3rdparty/lzma/CPP/7zip/UI/GUI/HashGUI.h
index 40340365abe..1ec9c47564e 100644
--- a/3rdparty/lzma/CPP/7zip/UI/GUI/HashGUI.h
+++ b/3rdparty/lzma/CPP/7zip/UI/GUI/HashGUI.h
@@ -1,9 +1,10 @@
// HashGUI.h
-#ifndef __HASH_GUI_H
-#define __HASH_GUI_H
+#ifndef ZIP7_INC_HASH_GUI_H
+#define ZIP7_INC_HASH_GUI_H
#include "../Common/HashCalc.h"
+#include "../Common/Property.h"
HRESULT HashCalcGUI(
DECL_EXTERNAL_CODECS_LOC_VARS
@@ -11,6 +12,16 @@ HRESULT HashCalcGUI(
const CHashOptions &options,
bool &messageWasDisplayed);
-void AddHashBundleRes(UString &s, const CHashBundle &hb, const UString &firstFileName);
+typedef CObjectVector<CProperty> CPropNameValPairs;
+
+void AddValuePair(CPropNameValPairs &pairs, UINT resourceID, UInt64 value);
+void AddSizeValue(UString &s, UInt64 value);
+void AddSizeValuePair(CPropNameValPairs &pairs, UINT resourceID, UInt64 value);
+
+void AddHashBundleRes(CPropNameValPairs &s, const CHashBundle &hb);
+void AddHashBundleRes(UString &s, const CHashBundle &hb);
+
+void ShowHashResults(const CPropNameValPairs &propPairs, HWND hwnd);
+void ShowHashResults(const CHashBundle &hb, HWND hwnd);
#endif