mirror of
https://github.com/Xevion/easy7zip.git
synced 2025-12-11 06:07:12 -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/ProcessUtils.h"
|
||||||
#include "../../../Windows/Synchronization.h"
|
#include "../../../Windows/Synchronization.h"
|
||||||
|
|
||||||
|
#include "../FileManager/StringUtils.h"
|
||||||
#include "../FileManager/RegistryUtils.h"
|
#include "../FileManager/RegistryUtils.h"
|
||||||
|
|
||||||
#include "ZipRegistry.h"
|
#include "ZipRegistry.h"
|
||||||
@@ -229,7 +230,7 @@ HRESULT CompressFiles(
|
|||||||
index = FindRegistryFormatAlways(arcType);
|
index = FindRegistryFormatAlways(arcType);
|
||||||
if (index >= 0)
|
if (index >= 0)
|
||||||
{
|
{
|
||||||
char temp[256];
|
char temp[64];
|
||||||
const NCompression::CFormatOptions &fo = m_RegistryInfo.Formats[index];
|
const NCompression::CFormatOptions &fo = m_RegistryInfo.Formats[index];
|
||||||
|
|
||||||
if (!fo.Method.IsEmpty())
|
if (!fo.Method.IsEmpty())
|
||||||
@@ -241,31 +242,43 @@ HRESULT CompressFiles(
|
|||||||
if (fo.Level)
|
if (fo.Level)
|
||||||
{
|
{
|
||||||
params += " -mx=";
|
params += " -mx=";
|
||||||
ConvertUInt64ToString(fo.Level, temp);
|
ConvertUInt32ToString(fo.Level, temp);
|
||||||
params += 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)
|
if (fo.NumThreads)
|
||||||
{
|
{
|
||||||
params += " -mmt=";
|
params += " -mmt=";
|
||||||
ConvertUInt64ToString(fo.NumThreads, temp);
|
ConvertUInt32ToString(fo.NumThreads, temp);
|
||||||
params += temp;
|
params += temp;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 0
|
|
||||||
// need to split the extra Options /TR 2020-04-10
|
|
||||||
if (!fo.Options.IsEmpty())
|
if (!fo.Options.IsEmpty())
|
||||||
{
|
{
|
||||||
params += " -m";
|
UStringVector strings;
|
||||||
params += fo.Options;
|
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);
|
arcName);
|
||||||
}
|
}
|
||||||
|
|
||||||
// for testing current params, /TR 2017-05-18
|
|
||||||
// ErrorMessage(params);
|
// ErrorMessage(params);
|
||||||
return Call7zGui(params,
|
return Call7zGui(params,
|
||||||
// (arcPathPrefix.IsEmpty()? 0: (LPCWSTR)arcPathPrefix),
|
// (arcPathPrefix.IsEmpty()? 0: (LPCWSTR)arcPathPrefix),
|
||||||
|
|||||||
@@ -66,6 +66,7 @@ FM_OBJS = \
|
|||||||
$O\LangUtils.obj \
|
$O\LangUtils.obj \
|
||||||
$O\ProgramLocation.obj \
|
$O\ProgramLocation.obj \
|
||||||
$O\RegistryUtils.obj \
|
$O\RegistryUtils.obj \
|
||||||
|
$O\StringUtils.obj \
|
||||||
|
|
||||||
C_OBJS = \
|
C_OBJS = \
|
||||||
$O\CpuArch.obj \
|
$O\CpuArch.obj \
|
||||||
|
|||||||
Reference in New Issue
Block a user