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>2007-04-17 04:00:00 +0400
committerKornel LesiƄski <kornel@geekhood.net>2016-05-28 02:15:50 +0300
commita145bfc7cf17f7bbcfae8f0064333c8ea75b455c (patch)
tree4ea458c9f35956fe080562989a702ea8c9af4b90 /CPP/7zip/UI/GUI/GUI.cpp
parentd9666cf046a8453b33b3e2fbf4d82295a9f87df3 (diff)
4.45 beta
Diffstat (limited to 'CPP/7zip/UI/GUI/GUI.cpp')
-rwxr-xr-xCPP/7zip/UI/GUI/GUI.cpp30
1 files changed, 27 insertions, 3 deletions
diff --git a/CPP/7zip/UI/GUI/GUI.cpp b/CPP/7zip/UI/GUI/GUI.cpp
index fe956dbd..ad58a451 100755
--- a/CPP/7zip/UI/GUI/GUI.cpp
+++ b/CPP/7zip/UI/GUI/GUI.cpp
@@ -4,6 +4,11 @@
#include <initguid.h>
+extern "C"
+{
+ #include "../../../../C/Alloc.h"
+}
+
#include "Common/NewHandler.h"
#include "Common/StringConvert.h"
#include "Common/CommandLineParser.h"
@@ -17,7 +22,6 @@
#include "Windows/FileName.h"
#ifdef _WIN32
#include "Windows/MemoryLock.h"
-#include "Common/Alloc.h"
#endif
#include "../../IStream.h"
@@ -33,6 +37,7 @@
#include "ExtractGUI.h"
#include "UpdateGUI.h"
+#include "Resource/BenchmarkDialog/BenchmarkDialog.h"
using namespace NWindows;
@@ -83,10 +88,26 @@ int Main2()
if (options.LargePages)
NSecurity::EnableLockMemoryPrivilege();
#endif
+
+ CCodecs *codecs = new CCodecs;
+ CMyComPtr<IUnknown> compressCodecsInfo = codecs;
+ HRESULT result = codecs->Load();
+ if (result != S_OK)
+ throw CSystemException(result);
bool isExtractGroupCommand = options.Command.IsFromExtractGroup();
- if (isExtractGroupCommand)
+ if (options.Command.CommandType == NCommandType::kBenchmark)
+ {
+ HRESULT res = Benchmark(
+ #ifdef EXTERNAL_LZMA
+ codecs,
+ #endif
+ options.NumThreads, options.DictionarySize);
+ if (res != S_OK)
+ throw CSystemException(res);
+ }
+ else if (isExtractGroupCommand)
{
CExtractCallbackImp *ecs = new CExtractCallbackImp;
CMyComPtr<IFolderArchiveExtractCallback> extractCallback = ecs;
@@ -109,7 +130,7 @@ int Main2()
eo.Properties = options.ExtractProperties;
#endif
- HRESULT result = ExtractGUI(
+ HRESULT result = ExtractGUI(codecs,
options.ArchivePathsSorted,
options.ArchivePathsFullSorted,
options.WildcardCensor.Pairs.Front().Head,
@@ -138,7 +159,10 @@ int Main2()
CUpdateErrorInfo errorInfo;
+ if (!options.UpdateOptions.Init(codecs, options.ArchiveName, options.ArcType))
+ throw "Unsupported archive type";
HRESULT result = UpdateGUI(
+ codecs,
options.WildcardCensor, options.UpdateOptions,
options.ShowDialog,
errorInfo, &openCallback, &callback);