|
@@ -3,7 +3,7 @@
|
|
-------------------------------------------------------------------------
|
|
-------------------------------------------------------------------------
|
|
File packing window
|
|
File packing window
|
|
|
|
|
|
- Copyright (C) 2007-2020 Alexander Koblov ([email protected])
|
|
|
|
|
|
+ Copyright (C) 2007-2022 Alexander Koblov ([email protected])
|
|
|
|
|
|
This program is free software; you can redistribute it and/or modify
|
|
This program is free software; you can redistribute it and/or modify
|
|
it under the terms of the GNU General Public License as published by
|
|
it under the terms of the GNU General Public License as published by
|
|
@@ -70,6 +70,9 @@ type
|
|
FExistsArchive : Boolean;
|
|
FExistsArchive : Boolean;
|
|
FSourceFileSource: IFileSource;
|
|
FSourceFileSource: IFileSource;
|
|
FTargetFileSource: IArchiveFileSource;
|
|
FTargetFileSource: IArchiveFileSource;
|
|
|
|
+ FPlugin: Boolean;
|
|
|
|
+ FPassword: String;
|
|
|
|
+ FVolumeSize: String;
|
|
FCustomParams: String;
|
|
FCustomParams: String;
|
|
FTargetPathInArchive: String;
|
|
FTargetPathInArchive: String;
|
|
procedure SwitchOptions(ArcTypeChange: Boolean);
|
|
procedure SwitchOptions(ArcTypeChange: Boolean);
|
|
@@ -366,9 +369,11 @@ begin
|
|
EnableControl(cbPutInTarFirst, not ((sCmd = 'tar') or StrBegins(sCmd, 'tar.')));
|
|
EnableControl(cbPutInTarFirst, not ((sCmd = 'tar') or StrBegins(sCmd, 'tar.')));
|
|
cbCreateSeparateArchives.Checked:= False;
|
|
cbCreateSeparateArchives.Checked:= False;
|
|
end;
|
|
end;
|
|
|
|
+ FPlugin:= True;
|
|
// Options that supported by plugins
|
|
// Options that supported by plugins
|
|
EnableControl(cbStoreDir, True);
|
|
EnableControl(cbStoreDir, True);
|
|
// Options that don't supported by plugins
|
|
// Options that don't supported by plugins
|
|
|
|
+ cbMultivolume.Checked:= False;
|
|
EnableControl(cbMultivolume, False);
|
|
EnableControl(cbMultivolume, False);
|
|
Exit;
|
|
Exit;
|
|
end;
|
|
end;
|
|
@@ -415,7 +420,7 @@ begin
|
|
EnableControl(cbPutInTarFirst, not ((sCmd = 'tar') or StrBegins(sCmd, 'tar.')));
|
|
EnableControl(cbPutInTarFirst, not ((sCmd = 'tar') or StrBegins(sCmd, 'tar.')));
|
|
cbCreateSeparateArchives.Checked:= False;
|
|
cbCreateSeparateArchives.Checked:= False;
|
|
end;
|
|
end;
|
|
-
|
|
|
|
|
|
+ FPlugin:= False;
|
|
// Options that don't supported by addons
|
|
// Options that don't supported by addons
|
|
cbStoreDir.Checked:= True;
|
|
cbStoreDir.Checked:= True;
|
|
EnableControl(cbStoreDir, False);
|
|
EnableControl(cbStoreDir, False);
|
|
@@ -514,9 +519,6 @@ var
|
|
NewTargetFileSource: IArchiveFileSource = nil;
|
|
NewTargetFileSource: IArchiveFileSource = nil;
|
|
|
|
|
|
procedure Pack(var FilesToPack: TFiles; QueueId: TOperationsManagerQueueIdentifier);
|
|
procedure Pack(var FilesToPack: TFiles; QueueId: TOperationsManagerQueueIdentifier);
|
|
- var
|
|
|
|
- sPassword,
|
|
|
|
- sPasswordTmp: String;
|
|
|
|
begin
|
|
begin
|
|
if Assigned(NewTargetFileSource) then
|
|
if Assigned(NewTargetFileSource) then
|
|
begin
|
|
begin
|
|
@@ -547,23 +549,9 @@ var
|
|
with Operation as TMultiArchiveCopyInOperation do
|
|
with Operation as TMultiArchiveCopyInOperation do
|
|
begin
|
|
begin
|
|
if cbEncrypt.Checked then
|
|
if cbEncrypt.Checked then
|
|
- repeat
|
|
|
|
- if not InputQuery(Caption, rsMsgPasswordEnter, True, sPassword) then
|
|
|
|
- Exit;
|
|
|
|
- if gRepeatPassword then
|
|
|
|
- begin
|
|
|
|
- if not InputQuery(Caption, rsMsgPasswordVerify, True, sPasswordTmp) then
|
|
|
|
- Exit;
|
|
|
|
- end
|
|
|
|
- else
|
|
|
|
- sPasswordTmp:= sPassword;
|
|
|
|
- if sPassword <> sPasswordTmp then
|
|
|
|
- ShowMessage(rsMsgPasswordDiff)
|
|
|
|
- else
|
|
|
|
- Password:= sPassword;
|
|
|
|
- until sPassword = sPasswordTmp;
|
|
|
|
|
|
+ Password:= FPassword;
|
|
if cbMultivolume.Checked then
|
|
if cbMultivolume.Checked then
|
|
- VolumeSize:= InputBox(Caption, rsMsgVolumeSizeEnter, EmptyStr);
|
|
|
|
|
|
+ VolumeSize:= FVolumeSize;
|
|
PackingFlags := aFlags;
|
|
PackingFlags := aFlags;
|
|
CreateNew:= FNewArchive;
|
|
CreateNew:= FNewArchive;
|
|
CustomParams:= FCustomParams;
|
|
CustomParams:= FCustomParams;
|
|
@@ -578,6 +566,7 @@ var
|
|
end;
|
|
end;
|
|
|
|
|
|
var
|
|
var
|
|
|
|
+ sPassword, sPasswordTmp: String;
|
|
QueueId: TOperationsManagerQueueIdentifier;
|
|
QueueId: TOperationsManagerQueueIdentifier;
|
|
begin
|
|
begin
|
|
if Assigned(FTargetFileSource) then
|
|
if Assigned(FTargetFileSource) then
|
|
@@ -591,6 +580,33 @@ begin
|
|
end
|
|
end
|
|
else // Create a new target file source.
|
|
else // Create a new target file source.
|
|
begin
|
|
begin
|
|
|
|
+ if not FPlugin then
|
|
|
|
+ begin
|
|
|
|
+ if cbEncrypt.Checked then
|
|
|
|
+ begin
|
|
|
|
+ sPassword:= EmptyStr;
|
|
|
|
+ sPasswordTmp:= EmptyStr;
|
|
|
|
+ repeat
|
|
|
|
+ if not InputQuery(Caption, rsMsgPasswordEnter, True, sPassword) then
|
|
|
|
+ Exit;
|
|
|
|
+ if gRepeatPassword then
|
|
|
|
+ begin
|
|
|
|
+ if not InputQuery(Caption, rsMsgPasswordVerify, True, sPasswordTmp) then
|
|
|
|
+ Exit;
|
|
|
|
+ end
|
|
|
|
+ else
|
|
|
|
+ sPasswordTmp:= sPassword;
|
|
|
|
+ if sPassword <> sPasswordTmp then
|
|
|
|
+ ShowMessage(rsMsgPasswordDiff)
|
|
|
|
+ else
|
|
|
|
+ FPassword:= sPassword;
|
|
|
|
+ until sPassword = sPasswordTmp;
|
|
|
|
+ end;
|
|
|
|
+
|
|
|
|
+ if cbMultivolume.Checked then
|
|
|
|
+ FVolumeSize:= InputBox(Caption, rsMsgVolumeSizeEnter, EmptyStr);
|
|
|
|
+ end;
|
|
|
|
+
|
|
// If create separate archives, one per selected file/dir
|
|
// If create separate archives, one per selected file/dir
|
|
if cbCreateSeparateArchives.Checked then
|
|
if cbCreateSeparateArchives.Checked then
|
|
begin
|
|
begin
|