mirror of
https://github.com/Xevion/easy7zip.git
synced 2025-12-08 08:07:06 -06:00
New feature as requested in #97 is ready
This commit is contained in:
@@ -17,6 +17,7 @@
|
||||
#include "../../../Windows/ProcessUtils.h"
|
||||
#include "../../../Windows/Synchronization.h"
|
||||
|
||||
#include "../FileManager/StringUtils.h"
|
||||
#include "../FileManager/RegistryUtils.h"
|
||||
|
||||
#include "ZipRegistry.h"
|
||||
@@ -229,7 +230,7 @@ HRESULT CompressFiles(
|
||||
index = FindRegistryFormatAlways(arcType);
|
||||
if (index >= 0)
|
||||
{
|
||||
char temp[256];
|
||||
char temp[64];
|
||||
const NCompression::CFormatOptions &fo = m_RegistryInfo.Formats[index];
|
||||
|
||||
if (!fo.Method.IsEmpty())
|
||||
@@ -241,31 +242,43 @@ HRESULT CompressFiles(
|
||||
if (fo.Level)
|
||||
{
|
||||
params += " -mx=";
|
||||
ConvertUInt64ToString(fo.Level, temp);
|
||||
ConvertUInt32ToString(fo.Level, temp);
|
||||
params += temp;
|
||||
}
|
||||
|
||||
if (fo.Dictionary)
|
||||
{
|
||||
params += " -md=";
|
||||
ConvertUInt32ToString(fo.Dictionary, temp);
|
||||
params += temp;
|
||||
params += "b";
|
||||
}
|
||||
|
||||
if (fo.BlockLogSize)
|
||||
{
|
||||
params += " -ms=";
|
||||
ConvertUInt32ToString(1 << fo.BlockLogSize, temp);
|
||||
params += temp;
|
||||
params += "b";
|
||||
}
|
||||
|
||||
if (fo.NumThreads)
|
||||
{
|
||||
params += " -mmt=";
|
||||
ConvertUInt64ToString(fo.NumThreads, temp);
|
||||
ConvertUInt32ToString(fo.NumThreads, temp);
|
||||
params += temp;
|
||||
}
|
||||
|
||||
#if 0
|
||||
// need to split the extra Options /TR 2020-04-10
|
||||
if (!fo.Options.IsEmpty())
|
||||
{
|
||||
params += " -m";
|
||||
params += fo.Options;
|
||||
UStringVector strings;
|
||||
SplitString(fo.Options, strings);
|
||||
FOR_VECTOR (i, strings)
|
||||
{
|
||||
params += " -m";
|
||||
params += strings[i];
|
||||
}
|
||||
}
|
||||
|
||||
if (!fo.SplitVolume.IsEmpty())
|
||||
{
|
||||
params += " -v";
|
||||
params += fo.SplitVolume;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
@@ -297,7 +310,6 @@ HRESULT CompressFiles(
|
||||
arcName);
|
||||
}
|
||||
|
||||
// for testing current params, /TR 2017-05-18
|
||||
// ErrorMessage(params);
|
||||
return Call7zGui(params,
|
||||
// (arcPathPrefix.IsEmpty()? 0: (LPCWSTR)arcPathPrefix),
|
||||
|
||||
Reference in New Issue
Block a user