|
@@ -40,6 +40,7 @@ type
|
|
NumBlockThreads: Integer;
|
|
NumBlockThreads: Integer;
|
|
NumFastBytes: Integer;
|
|
NumFastBytes: Integer;
|
|
NumThreads: Integer;
|
|
NumThreads: Integer;
|
|
|
|
+ WorkerProcessCheckTrust: Boolean;
|
|
WorkerProcessFilename: String;
|
|
WorkerProcessFilename: String;
|
|
constructor Create;
|
|
constructor Create;
|
|
end;
|
|
end;
|
|
@@ -882,7 +883,6 @@ const
|
|
var
|
|
var
|
|
EncProps: TLZMAEncoderProps;
|
|
EncProps: TLZMAEncoderProps;
|
|
Props: TLZMACompressorProps;
|
|
Props: TLZMACompressorProps;
|
|
- WorkerProcessFilename: String;
|
|
|
|
begin
|
|
begin
|
|
if (CompressionLevel < Low(algorithm)) or (CompressionLevel > High(algorithm)) then
|
|
if (CompressionLevel < Low(algorithm)) or (CompressionLevel > High(algorithm)) then
|
|
LZMAInternalError('TLZMACompressor.Create got invalid CompressionLevel ' + IntToStr(CompressionLevel));
|
|
LZMAInternalError('TLZMACompressor.Create got invalid CompressionLevel ' + IntToStr(CompressionLevel));
|
|
@@ -895,6 +895,9 @@ begin
|
|
EncProps.NumFastBytes := numFastBytes[CompressionLevel];
|
|
EncProps.NumFastBytes := numFastBytes[CompressionLevel];
|
|
EncProps.NumThreads := -1;
|
|
EncProps.NumThreads := -1;
|
|
|
|
|
|
|
|
+ var WorkerProcessCheckTrust := False;
|
|
|
|
+ var WorkerProcessFilename := '';
|
|
|
|
+
|
|
if ACompressorProps is TLZMACompressorProps then begin
|
|
if ACompressorProps is TLZMACompressorProps then begin
|
|
Props := (ACompressorProps as TLZMACompressorProps);
|
|
Props := (ACompressorProps as TLZMACompressorProps);
|
|
if Props.Algorithm <> -1 then
|
|
if Props.Algorithm <> -1 then
|
|
@@ -910,6 +913,7 @@ begin
|
|
EncProps.NumFastBytes := Props.NumFastBytes;
|
|
EncProps.NumFastBytes := Props.NumFastBytes;
|
|
if Props.NumThreads <> 0 then
|
|
if Props.NumThreads <> 0 then
|
|
EncProps.NumThreads := Props.NumThreads;
|
|
EncProps.NumThreads := Props.NumThreads;
|
|
|
|
+ WorkerProcessCheckTrust := Props.WorkerProcessCheckTrust;
|
|
WorkerProcessFilename := Props.WorkerProcessFilename;
|
|
WorkerProcessFilename := Props.WorkerProcessFilename;
|
|
end;
|
|
end;
|
|
|
|
|
|
@@ -917,7 +921,7 @@ begin
|
|
|
|
|
|
if WorkerProcessFilename <> '' then begin
|
|
if WorkerProcessFilename <> '' then begin
|
|
FWorker := TLZMAWorkerProcess.Create(@FEvents);
|
|
FWorker := TLZMAWorkerProcess.Create(@FEvents);
|
|
- (FWorker as TLZMAWorkerProcess).CheckTrust := True;
|
|
|
|
|
|
+ (FWorker as TLZMAWorkerProcess).CheckTrust := WorkerProcessCheckTrust;
|
|
(FWorker as TLZMAWorkerProcess).ExeFilename := WorkerProcessFilename;
|
|
(FWorker as TLZMAWorkerProcess).ExeFilename := WorkerProcessFilename;
|
|
end
|
|
end
|
|
else begin
|
|
else begin
|