"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "peach.pas" between
peazip-7.7.0.src.zip and peazip-7.7.1.src.zip

About: PeaZip is an OS-portable graphical file archiver, acting as frontend for various open source archiving utilities (incl. its native Pea archive format).

peach.pas  (peazip-7.7.0.src):peach.pas  (peazip-7.7.1.src)
skipping to change at line 167 skipping to change at line 167
1.40 20200505 G.Tani 7.2.2 1.40 20200505 G.Tani 7.2.2
1.41 20200514 G.Tani 7.3.0 1.41 20200514 G.Tani 7.3.0
1.42 20200531 G.Tani 7.3.1 1.42 20200531 G.Tani 7.3.1
1.43 20200618 G.Tani 7.3.2 1.43 20200618 G.Tani 7.3.2
1.44 20200820 G.Tani 7.4.0 1.44 20200820 G.Tani 7.4.0
1.45 20200905 G.Tani 7.4.1 1.45 20200905 G.Tani 7.4.1
1.46 20200929 G.Tani 7.4.2 1.46 20200929 G.Tani 7.4.2
1.47 20201110 G.Tani 7.5.0 1.47 20201110 G.Tani 7.5.0
1.48 20201212 G.Tani 7.6.0 1.48 20201212 G.Tani 7.6.0
1.49 20210105 G.Tani 7.7.0 1.49 20210105 G.Tani 7.7.0
1.50 20210210 G.Tani 7.7.1
BACKEND BACKEND
(Linux) Can now optionally use system p7zip, if installed, from Options > Settin Pea 0.76
gs, General tab
requires p7zip-full (or equivalent package) to be installed in order to have a
7z binary compatible with PeaZip's requirements in terms of syntax and features
CODE CODE
Command line -ext2simple and -ext2simplefolder can now accept also empthy output
path (extract to archive's path)
-ext2simplefolder as -ext2folder apply smart folder policy, while -ext2simple a
nd -ext2here ignores it
Updated web search (Ctrl+Alt+F3)
Updated Windows installers to work with recent versions of InnoSetup (.exe) and
MSIWrapper (.msi)
Various fixes Various fixes
CPUAARCH64 now disable Intel ASM to allow build on ARM64 architectures
fixed adding multiple .enc suffix
fixed various issues with non-English localizations
fixed issue with preview for special file types (bat, exe, html) resulting in e
xtraction instead of preview
improved handling special characters in password for arc, rar, and pea formats
(Linux) improved handling of special characters in filenames
(Linux) fixed issues with smart folder option
FILE MANAGER FILE MANAGER
Added shortcut Ctrl+W to close window, consistently with conventional use in Win
Rar and Windows file explorer
Improved control over temporary work folder, used when the archive is created or
edited, during drag and drop extraction (Windows), and content preview
Output: faster as no copy to destination is needed, more secure as no content i
s unpacked/decrypted outside of the intended destination path
Output, preview in user's temp
User's temp (as conventionally used by most applications): in case of failure f
or any reason, user's temp folder is the single place to look for orphaned data
and can be safely cleaned
None, user's temp if needed: allows exceptions to perform drag and drop extract
ion and preview using user's temp
None: no exceptions, no temporary work data is saved, this does not allow to pe
rform drag and drop extraction, nor preview as archive content can't be extracte
d to be opened with associated applications
EXTRACTION and ARCHIVING EXTRACTION and ARCHIVING
Added read support to .appxbundle format PEA compression and decompression can now be cancelled from the GUI
WINDOWS & LINUX INSTALLERS WINDOWS & LINUX INSTALLERS
211 file extensions supported 211 file extensions supported
Translations updated and replaced in the package Translations updated and replaced in the package
-------------------------------------------------------------------------------- --------------------------------------------------------------------------------
Status of Unicode support (tested on Lazarus 1.6.0) Status of Unicode support (tested on Lazarus 1.6.0)
1 - (cross-platform) Get Unicode paramstrings > natively supported 1 - (cross-platform) Get Unicode paramstrings > natively supported
skipping to change at line 4737 skipping to change at line 4741
procedure smartextclick; procedure smartextclick;
procedure load_presetsnames; procedure load_presetsnames;
procedure update_info; procedure update_info;
procedure testrarlocked; procedure testrarlocked;
function geticon(fullname,fulltype:ansistring; pc:boolean):integer; function geticon(fullname,fulltype:ansistring; pc:boolean):integer;
const const
MAX_CL = 31744; //most of modern OSes handle about up to 32KB command l ine, checked conservatively at 31KB MAX_CL = 31744; //most of modern OSes handle about up to 32KB command l ine, checked conservatively at 31KB
WS_EX_LAYERED = $80000; WS_EX_LAYERED = $80000;
LWA_ALPHA = $2; LWA_ALPHA = $2;
INTVERSION = '1.49'; INTVERSION = '1.50';
PEAZIPVERSION = '7.7'; PEAZIPVERSION = '7.7';
PEAZIPREVISION= '.0'; PEAZIPREVISION= '.1';
PEAZIPSINTVER = '770'; PEAZIPSINTVER = '771';
FIRSTDOM = 'https://peazip.github.io/'; FIRSTDOM = 'https://peazip.github.io/';
SECONDDOM = 'https://peazip.sourceforge.io/'; SECONDDOM = 'https://peazip.sourceforge.io/';
HLIBRE_DIR = 0; //hardcode "libre directive" 0 not hardcode, read from conf iguration; 1 hardcoded to allow only using Free Software components 2 hardcoded to allow only using Free Software components and open archive formats (not encum bered by patents for read nor write) HLIBRE_DIR = 0; //hardcode "libre directive" 0 not hardcode, read from conf iguration; 1 hardcoded to allow only using Free Software components 2 hardcoded to allow only using Free Software components and open archive formats (not encum bered by patents for read nor write)
HPRIVACY_MODE = 0; //hardcode privacy_mode directive 0 not hardcode, read from configuration 1,2 hardcoded skippable or non skippable password request at star tup, overriding configuration HPRIVACY_MODE = 0; //hardcode privacy_mode directive 0 not hardcode, read from configuration 1,2 hardcoded skippable or non skippable password request at star tup, overriding configuration
DEFAULT_THEME = 'ten-embedded'; DEFAULT_THEME = 'ten-embedded';
DLEFT = 64; DLEFT = 64;
DTOP = 64; DTOP = 64;
DWIDTH = 960; DWIDTH = 960;
DHEIGTH = 600; DHEIGTH = 600;
DGWLEFT = 92; DGWLEFT = 92;
skipping to change at line 4784 skipping to change at line 4788
ZSTRINGL = '------------------- ----- ------------ ------------ -------- ----------------'; ZSTRINGL = '------------------- ----- ------------ ------------ -------- ----------------';
{$IFDEF MSWINDOWS} {$IFDEF MSWINDOWS}
NDLINES = 3;//15.x+ NDLINES = 3;//15.x+
{$ELSE} {$ELSE}
NDLINES = 3;//15.x+ NDLINES = 3;//15.x+
{$ENDIF} {$ENDIF}
RAR5STRING = 'Details: RAR 5'; //check first 14 characters RAR5STRING = 'Details: RAR 5'; //check first 14 characters
READE_LIST = '7Z, ACE, ARC/WRC, ARJ, BR, BZ/TBZ, CAB, CHM/CHW/HXS, COMPOUND (MSI, DOC, XLS, PPT), CPIO, GZ/TGZ, ISO, Java (JAR, EAR, WAR), LZH/LHA, Linux ( DEB, PET/PUP, RPM, SLP), NSIS, OOo, PAK/PK3/PK4, PAQ/LPAQ/ZPAQ, PEA, QUAD/BALZ/B CM, RAR, TAR, WIM/SWM, XPI, Z/TZ, ZIP, ZST...'; READE_LIST = '7Z, ACE, ARC/WRC, ARJ, BR, BZ/TBZ, CAB, CHM/CHW/HXS, COMPOUND (MSI, DOC, XLS, PPT), CPIO, GZ/TGZ, ISO, Java (JAR, EAR, WAR), LZH/LHA, Linux ( DEB, PET/PUP, RPM, SLP), NSIS, OOo, PAK/PK3/PK4, PAQ/LPAQ/ZPAQ, PEA, QUAD/BALZ/B CM, RAR, TAR, WIM/SWM, XPI, Z/TZ, ZIP, ZST...';
WRITEE_LIST = '7Z, 7Z-sfx, ARC, ARC-sfx, BR, BZ2, GZ, *PAQ, PEA, QUAD/BALZ/B CM, split, TAR, UPX, WIM, XZ, ZIP, ZST'; WRITEE_LIST = '7Z, 7Z-sfx, ARC, ARC-sfx, BR, BZ2, GZ, *PAQ, PEA, QUAD/BALZ/B CM, split, TAR, UPX, WIM, XZ, ZIP, ZST';
APPMAIN = 'PeaZip'; APPMAIN = 'PeaZip';
APPLICATION1 = 'Pea 0.74 (LGPLv3, Giorgio Tani);'; APPLICATION1 = 'Pea 0.76 (LGPLv3, Giorgio Tani);';
STR_7Z = '7Z'; STR_7Z = '7Z';
STR_ARC = 'ARC'; STR_ARC = 'ARC';
STR_BROTLI = 'Brotli'; STR_BROTLI = 'Brotli';
STR_BZIP2 = 'BZip2'; STR_BZIP2 = 'BZip2';
STR_GZIP = 'GZip'; STR_GZIP = 'GZip';
STR_LPAQ = 'LPAQ'; STR_LPAQ = 'LPAQ';
STR_PAQ = 'PAQ'; STR_PAQ = 'PAQ';
STR_PEA = 'PEA'; STR_PEA = 'PEA';
STR_QUAD = 'QUAD/BALZ/BCM'; STR_QUAD = 'QUAD/BALZ/BCM';
STR_TAR = 'TAR'; STR_TAR = 'TAR';
skipping to change at line 6594 skipping to change at line 6598
readln(t,s); txt_type_description_zip:=copy(s,pos(':',s)+2,length(s)-pos(':',s)) ; readln(t,s); txt_type_description_zip:=copy(s,pos(':',s)+2,length(s)-pos(':',s)) ;
readln(t,s); txt_zipcrypto_hint:=copy(s,pos(':',s)+2,length(s)-pos(':',s)); readln(t,s); txt_zipcrypto_hint:=copy(s,pos(':',s)+2,length(s)-pos(':',s));
readln(t,s); readln(t,s);
readln(t,s); if s<>'=== end PeaZip text group ===' then exit; readln(t,s); if s<>'=== end PeaZip text group ===' then exit;
valorize_text:=0; valorize_text:=0;
except except
valorize_text:=-1; valorize_text:=-1;
end; end;
end; end;
{procedure get_fallback_text(s:ansistring);
begin
if copy(s,0,pos(':',s)-1)='txt_4_9_frame' then begin txt_4_9_frame:=copy(s,pos('
:',s)+2,length(s)-pos(':',s)); exit; end;
//removed, shown only as example
end;
function fallback_valorize_text:integer;
var
s:ansistring;
begin
fallback_valorize_text:=-1;
repeat
readln(t,s);
get_fallback_text(s);
until eof(t) or (s='=== end PeaZip text group ===');
if eof(t)=false then fallback_valorize_text:=0;
end;}
procedure psetbuttonwidth(var btt:TSpeedButton; rsize:integer; ontheleft:boolean ); procedure psetbuttonwidth(var btt:TSpeedButton; rsize:integer; ontheleft:boolean );
var w,h:integer; var w,h:integer;
begin begin
Form_peach.labelbsize.Caption:=btt.Caption; Form_peach.labelbsize.Caption:=btt.Caption;
Form_peach.labelbsize.GetPreferredSize(w,h,false,true); Form_peach.labelbsize.GetPreferredSize(w,h,false,true);
Form_peach.labelbsize.Caption:=''; Form_peach.labelbsize.Caption:='';
if ontheleft=true then w:=w+rsize*2+6 if ontheleft=true then w:=w+rsize*2+6
else w:=w+rsize+6; else w:=w+rsize+6;
if w<rsize*3 then w:=rsize*3; if w<rsize*3 then w:=rsize*3;
btt.Width:=w; btt.Width:=w;
skipping to change at line 7121 skipping to change at line 7107
settooltext; settooltext;
settoolbtnw(16,false); settoolbtnw(16,false);
end; end;
toolsize:=6; toolsize:=6;
ptoolsize:=toolsize; ptoolsize:=toolsize;
end; end;
procedure set_adveditcl(i:integer); procedure set_adveditcl(i:integer);
begin begin
case i of case i of
1: Form_peach.Labelcbsampleadvanced.caption:=advedit1before+delimiter+'%f'+de 1: Form_peach.Labelcbsampleadvanced.caption:=advedit1before+stringdelim('%f')
limiter+advedit1after; +advedit1after;
2: Form_peach.Labelcbsampleadvanced.caption:=advedit2before+delimiter+'%f'+de 2: Form_peach.Labelcbsampleadvanced.caption:=advedit2before+stringdelim('%f')
limiter+advedit2after; +advedit2after;
3: Form_peach.Labelcbsampleadvanced.caption:=advedit3before+delimiter+'%f'+de 3: Form_peach.Labelcbsampleadvanced.caption:=advedit3before+stringdelim('%f')
limiter+advedit3after; +advedit3after;
4: Form_peach.Labelcbsampleadvanced.caption:=advedit4before+delimiter+'%f'+de 4: Form_peach.Labelcbsampleadvanced.caption:=advedit4before+stringdelim('%f')
limiter+advedit4after; +advedit4after;
5: Form_peach.Labelcbsampleadvanced.caption:=advedit5before+delimiter+'%f'+de 5: Form_peach.Labelcbsampleadvanced.caption:=advedit5before+stringdelim('%f')
limiter+advedit5after; +advedit5after;
6: Form_peach.Labelcbsampleadvanced.caption:=advedit6before+delimiter+'%f'+de 6: Form_peach.Labelcbsampleadvanced.caption:=advedit6before+stringdelim('%f')
limiter+advedit6after; +advedit6after;
7: Form_peach.Labelcbsampleadvanced.caption:=advedit7before+delimiter+'%f'+de 7: Form_peach.Labelcbsampleadvanced.caption:=advedit7before+stringdelim('%f')
limiter+advedit7after; +advedit7after;
8: Form_peach.Labelcbsampleadvanced.caption:=advedit8before+delimiter+'%f'+de 8: Form_peach.Labelcbsampleadvanced.caption:=advedit8before+stringdelim('%f')
limiter+advedit8after; +advedit8after;
end; end;
end; end;
procedure setdescription_advcustedit; procedure setdescription_advcustedit;
var var
s:ansistring; s:ansistring;
sg:TStringGrid; sg:TStringGrid;
begin begin
sg:=Form_peach.StringGridCustedit1; sg:=Form_peach.StringGridCustedit1;
s:=sg.Cells[1,sg.Row]; s:=sg.Cells[1,sg.Row];
skipping to change at line 9728 skipping to change at line 9714
pmJumpArchive.Caption:=txt_openarchive; pmJumpArchive.Caption:=txt_openarchive;
mbNotes.Caption:=txt_note; mbNotes.Caption:=txt_note;
mbDelete.Caption:=txt_remove_bookmark; mbDelete.Caption:=txt_remove_bookmark;
mbAddPath.Caption:=txt_add_path; mbAddPath.Caption:=txt_add_path;
mbAddArchive.Caption:=txt_add_archive; mbAddArchive.Caption:=txt_add_archive;
cbUn7zaRecursive.Hint:=txt_search_hint; cbUn7zaRecursive.Hint:=txt_search_hint;
cbUn7zaRecursiveExclude.Hint:=txt_search_hint; cbUn7zaRecursiveExclude.Hint:=txt_search_hint;
ComboBoxOverwrite.Hint:=txt_naming; ComboBoxOverwrite.Hint:=txt_naming;
ComboBoxOverwriteARC.Hint:=txt_naming; ComboBoxOverwriteARC.Hint:=txt_naming;
EditOPcustom1.Hint:=txt_otherparams; EditOPcustom1.Hint:=txt_otherparams;
ComboBoxUPX.Text:=txt_best;
ComboBoxPEACompression1.Text:=txt_default_compression;
ComboBoxArchive7.Text:=txt_newarchive;
ComboBoxArchive8.Text:=txt_multithreading;
ComboBoxArchiveCustom.Text:=txt_pio;
ComboBoxArcSolid.Text:=txt_solid_auto;
ComboBoxARC2.Text:=txt_newarchive;
EditOpenIn.Text:=txt_none;
ComboBoxOverwrite.Text:=txt_ren_extracted;
ComboBoxArchiveCustom1.Text:=txt_pio;
OpenDialogLang.Title:=txt_open_file; OpenDialogLang.Title:=txt_open_file;
OpenDialogList.Title:=txt_open_files; OpenDialogList.Title:=txt_open_files;
OpenDialogArchive.Title:=txt_open_file; OpenDialogArchive.Title:=txt_open_file;
OpenDialogTheme.Title:=txt_open_file; OpenDialogTheme.Title:=txt_open_file;
SelectDirectoryDialog1.Title:=txt_selectdir; SelectDirectoryDialog1.Title:=txt_selectdir;
SelectDirectoryDialog2.Title:=txt_selectdir; SelectDirectoryDialog2.Title:=txt_selectdir;
SaveDialogPJ.Title:=txt_savejobdefinition; SaveDialogPJ.Title:=txt_savejobdefinition;
SaveDialog2.Title:=txt_saveas; SaveDialog2.Title:=txt_saveas;
po_convert.Caption:=txt_convert; po_convert.Caption:=txt_convert;
mextractarchive.caption:=txt_archive; mextractarchive.caption:=txt_archive;
skipping to change at line 9854 skipping to change at line 9830
ComboBoxArchiveCustom1.Items.Strings[1]:=txt_poi; ComboBoxArchiveCustom1.Items.Strings[1]:=txt_poi;
ComboBoxArchiveCustom1.Items.Strings[2]:=txt_ipo; ComboBoxArchiveCustom1.Items.Strings[2]:=txt_ipo;
ComboBoxArchiveCustom1.Items.Strings[3]:=txt_iop; ComboBoxArchiveCustom1.Items.Strings[3]:=txt_iop;
ComboBoxArchiveCustom1.Items.Strings[4]:=txt_opi; ComboBoxArchiveCustom1.Items.Strings[4]:=txt_opi;
ComboBoxArchiveCustom1.Items.Strings[5]:=txt_oip; ComboBoxArchiveCustom1.Items.Strings[5]:=txt_oip;
RadioGroup0.Items.Strings[4]:=txt_custom; RadioGroup0.Items.Strings[4]:=txt_custom;
RadioGroup0.Items[8]:=txt_sfx+' '+STR_7Z; RadioGroup0.Items[8]:=txt_sfx+' '+STR_7Z;
RadioGroup0.Items[9]:=txt_sfx+' '+STR_ARC; RadioGroup0.Items[9]:=txt_sfx+' '+STR_ARC;
RadioGroup0.Items.Strings[10]:=txt_split; RadioGroup0.Items.Strings[10]:=txt_split;
RadioGroup0.Items.Strings[18]:=txt_lastused; RadioGroup0.Items.Strings[18]:=txt_lastused;
ComboBoxPEACompression1.Text:=txt_default_compression;
ComboBoxUPX.Text:=txt_best;
ComboBoxArchive8.Text:=txt_multithreading;
ComboBoxArchiveCustom.Text:=txt_pio;
ComboBoxArcSolid.Text:=txt_solid_auto;
ComboBoxARC2.Text:=txt_newarchive;
EditOpenIn.Text:=txt_none;
ComboBoxOverwrite.Text:=txt_ren_extracted;
ComboBoxArchiveCustom1.Text:=txt_pio;
ComboBoxArchive7.Text:=txt_newarchive;
except end; except end;
end; end;
end; end;
function valorize_headers:integer; function valorize_headers:integer;
var var
s:ansistring; s:ansistring;
begin begin
valorize_headers:=-1; valorize_headers:=-1;
readln(t,s);//translator(s) readln(t,s);//translator(s)
skipping to change at line 11013 skipping to change at line 10999
procedure msg_not_accessible_list(s:ansistring); procedure msg_not_accessible_list(s:ansistring);
begin begin
end; end;
procedure msg_no_input; procedure msg_no_input;
begin begin
end; end;
procedure msg_pw_errorchar; procedure msg_pw_errorchar(s:ansistring);
var
errchar:ansistring;
begin begin
{$IFDEF MSWINDOWS} pMessageWarningOK(correctdelimiter(s)+' '+txt_2_3_pw_errorchar);
errchar:='"';
{$ELSE}
errchar:='''';
{$ENDIF}
pMessageWarningOK(errchar+' '+txt_2_3_pw_errorchar);
end; end;
{/////////////////////////////////////////////////////////////////////////////// {///////////////////////////////////////////////////////////////////////////////
configuration and theming configuration and theming
///////////////////////////////////////////////////////////////////////////////} ///////////////////////////////////////////////////////////////////////////////}
procedure getthemepath(var thpath:ansistring); procedure getthemepath(var thpath:ansistring);
var var
skipping to change at line 14349 skipping to change at line 14328
else owcustom_14.Caption:=custedit14; else owcustom_14.Caption:=custedit14;
if StringGridCustedit.Cells[1,15]<>'' then owcustom_15.Caption:=StringGridCusted it.Cells[1,15] if StringGridCustedit.Cells[1,15]<>'' then owcustom_15.Caption:=StringGridCusted it.Cells[1,15]
else else
if extractfilename(custedit15)<>'' then owcustom_15.Caption:=extractfilename( custedit15) if extractfilename(custedit15)<>'' then owcustom_15.Caption:=extractfilename( custedit15)
else owcustom_15.Caption:=custedit15; else owcustom_15.Caption:=custedit15;
if StringGridCustedit.Cells[1,16]<>'' then owcustom_16.Caption:=StringGridCusted it.Cells[1,16] if StringGridCustedit.Cells[1,16]<>'' then owcustom_16.Caption:=StringGridCusted it.Cells[1,16]
else else
if extractfilename(custedit16)<>'' then owcustom_16.Caption:=extractfilename( custedit16) if extractfilename(custedit16)<>'' then owcustom_16.Caption:=extractfilename( custedit16)
else owcustom_16.Caption:=custedit16; else owcustom_16.Caption:=custedit16;
if StringGridCustedit1.Cells[1,1]<>'' then owcustom9.Caption:=StringGridCustedit 1.Cells[1,1] if StringGridCustedit1.Cells[1,1]<>'' then owcustom9.Caption:=StringGridCustedit 1.Cells[1,1]
else owcustom9.Caption:=advedit1before+delimiter+'%f'+delimiter+advedit1after; else owcustom9.Caption:=advedit1before+stringdelim('%f')+advedit1after;
if StringGridCustedit1.Cells[1,2]<>'' then owcustom10.Caption:=StringGridCustedi t1.Cells[1,2] if StringGridCustedit1.Cells[1,2]<>'' then owcustom10.Caption:=StringGridCustedi t1.Cells[1,2]
else owcustom10.Caption:=advedit2before+delimiter+'%f'+delimiter+advedit2after; else owcustom10.Caption:=advedit2before+stringdelim('%f')+advedit2after;
if StringGridCustedit1.Cells[1,3]<>'' then owcustom11.Caption:=StringGridCustedi t1.Cells[1,3] if StringGridCustedit1.Cells[1,3]<>'' then owcustom11.Caption:=StringGridCustedi t1.Cells[1,3]
else owcustom11.Caption:=advedit3before+delimiter+'%f'+delimiter+advedit3after; else owcustom11.Caption:=advedit3before+stringdelim('%f')+advedit3after;
if StringGridCustedit1.Cells[1,4]<>'' then owcustom12.Caption:=StringGridCustedi t1.Cells[1,4] if StringGridCustedit1.Cells[1,4]<>'' then owcustom12.Caption:=StringGridCustedi t1.Cells[1,4]
else owcustom12.Caption:=advedit4before+delimiter+'%f'+delimiter+advedit4after; else owcustom12.Caption:=advedit4before+stringdelim('%f')+advedit4after;
if StringGridCustedit1.Cells[1,5]<>'' then owcustom13.Caption:=StringGridCustedi t1.Cells[1,5] if StringGridCustedit1.Cells[1,5]<>'' then owcustom13.Caption:=StringGridCustedi t1.Cells[1,5]
else owcustom13.Caption:=advedit5before+delimiter+'%f'+delimiter+advedit5after; else owcustom13.Caption:=advedit5before+stringdelim('%f')+advedit5after;
if StringGridCustedit1.Cells[1,6]<>'' then owcustom14.Caption:=StringGridCustedi t1.Cells[1,6] if StringGridCustedit1.Cells[1,6]<>'' then owcustom14.Caption:=StringGridCustedi t1.Cells[1,6]
else owcustom14.Caption:=advedit6before+delimiter+'%f'+delimiter+advedit6after; else owcustom14.Caption:=advedit6before+stringdelim('%f')+advedit6after;
if StringGridCustedit1.Cells[1,7]<>'' then owcustom15.Caption:=StringGridCustedi t1.Cells[1,7] if StringGridCustedit1.Cells[1,7]<>'' then owcustom15.Caption:=StringGridCustedi t1.Cells[1,7]
else owcustom15.Caption:=advedit7before+delimiter+'%f'+delimiter+advedit7after; else owcustom15.Caption:=advedit7before+stringdelim('%f')+advedit7after;
if StringGridCustedit1.Cells[1,8]<>'' then owcustom16.Caption:=StringGridCustedi t1.Cells[1,8] if StringGridCustedit1.Cells[1,8]<>'' then owcustom16.Caption:=StringGridCustedi t1.Cells[1,8]
else owcustom16.Caption:=advedit8before+delimiter+'%f'+delimiter+advedit8after; else owcustom16.Caption:=advedit8before+stringdelim('%f')+advedit8after;
if custedit1<>'' then owcustom1.visible:=true else owcustom1.visible:=false; if custedit1<>'' then owcustom1.visible:=true else owcustom1.visible:=false;
if custedit2<>'' then owcustom2.visible:=true else owcustom2.visible:=false; if custedit2<>'' then owcustom2.visible:=true else owcustom2.visible:=false;
if custedit3<>'' then owcustom3.visible:=true else owcustom3.visible:=false; if custedit3<>'' then owcustom3.visible:=true else owcustom3.visible:=false;
if custedit4<>'' then owcustom4.visible:=true else owcustom4.visible:=false; if custedit4<>'' then owcustom4.visible:=true else owcustom4.visible:=false;
if custedit5<>'' then owcustom5.visible:=true else owcustom5.visible:=false; if custedit5<>'' then owcustom5.visible:=true else owcustom5.visible:=false;
if custedit6<>'' then owcustom6.visible:=true else owcustom6.visible:=false; if custedit6<>'' then owcustom6.visible:=true else owcustom6.visible:=false;
if custedit7<>'' then owcustom7.visible:=true else owcustom7.visible:=false; if custedit7<>'' then owcustom7.visible:=true else owcustom7.visible:=false;
if custedit8<>'' then owcustom8.visible:=true else owcustom8.visible:=false; if custedit8<>'' then owcustom8.visible:=true else owcustom8.visible:=false;
if custedit9<>'' then owcustom_9.visible:=true else owcustom_9.visible:=false; if custedit9<>'' then owcustom_9.visible:=true else owcustom_9.visible:=false;
if custedit10<>'' then owcustom_10.visible:=true else owcustom_10.visible:=false ; if custedit10<>'' then owcustom_10.visible:=true else owcustom_10.visible:=false ;
skipping to change at line 14479 skipping to change at line 14458
else eowcustom_14.Caption:=custedit14; else eowcustom_14.Caption:=custedit14;
if StringGridCustedit.Cells[1,15]<>'' then eowcustom_15.Caption:=StringGridCuste dit.Cells[1,15] if StringGridCustedit.Cells[1,15]<>'' then eowcustom_15.Caption:=StringGridCuste dit.Cells[1,15]
else else
if extractfilename(custedit15)<>'' then eowcustom_15.Caption:=extractfilename (custedit15) if extractfilename(custedit15)<>'' then eowcustom_15.Caption:=extractfilename (custedit15)
else eowcustom_15.Caption:=custedit15; else eowcustom_15.Caption:=custedit15;
if StringGridCustedit.Cells[1,16]<>'' then eowcustom_16.Caption:=StringGridCuste dit.Cells[1,16] if StringGridCustedit.Cells[1,16]<>'' then eowcustom_16.Caption:=StringGridCuste dit.Cells[1,16]
else else
if extractfilename(custedit16)<>'' then eowcustom_16.Caption:=extractfilename (custedit16) if extractfilename(custedit16)<>'' then eowcustom_16.Caption:=extractfilename (custedit16)
else eowcustom_16.Caption:=custedit16; else eowcustom_16.Caption:=custedit16;
if StringGridCustedit1.Cells[1,1]<>'' then eowcustom9.Caption:=StringGridCustedi t1.Cells[1,1] if StringGridCustedit1.Cells[1,1]<>'' then eowcustom9.Caption:=StringGridCustedi t1.Cells[1,1]
else eowcustom9.Caption:=advedit1before+delimiter+'%f'+delimiter+advedit1after; else eowcustom9.Caption:=advedit1before+stringdelim('%f')+advedit1after;
if StringGridCustedit1.Cells[1,2]<>'' then eowcustom10.Caption:=StringGridCusted it1.Cells[1,2] if StringGridCustedit1.Cells[1,2]<>'' then eowcustom10.Caption:=StringGridCusted it1.Cells[1,2]
else eowcustom10.Caption:=advedit2before+delimiter+'%f'+delimiter+advedit2after; else eowcustom10.Caption:=advedit2before+stringdelim('%f')+advedit2after;
if StringGridCustedit1.Cells[1,3]<>'' then eowcustom11.Caption:=StringGridCusted it1.Cells[1,3] if StringGridCustedit1.Cells[1,3]<>'' then eowcustom11.Caption:=StringGridCusted it1.Cells[1,3]
else eowcustom11.Caption:=advedit3before+delimiter+'%f'+delimiter+advedit3after; else eowcustom11.Caption:=advedit3before+stringdelim('%f')+advedit3after;
if StringGridCustedit1.Cells[1,4]<>'' then eowcustom12.Caption:=StringGridCusted it1.Cells[1,4] if StringGridCustedit1.Cells[1,4]<>'' then eowcustom12.Caption:=StringGridCusted it1.Cells[1,4]
else eowcustom12.Caption:=advedit4before+delimiter+'%f'+delimiter+advedit4after; else eowcustom12.Caption:=advedit4before+stringdelim('%f')+advedit4after;
if StringGridCustedit1.Cells[1,5]<>'' then eowcustom13.Caption:=StringGridCusted it1.Cells[1,5] if StringGridCustedit1.Cells[1,5]<>'' then eowcustom13.Caption:=StringGridCusted it1.Cells[1,5]
else eowcustom13.Caption:=advedit5before+delimiter+'%f'+delimiter+advedit5after; else eowcustom13.Caption:=advedit5before+stringdelim('%f')+advedit5after;
if StringGridCustedit1.Cells[1,6]<>'' then eowcustom14.Caption:=StringGridCusted it1.Cells[1,6] if StringGridCustedit1.Cells[1,6]<>'' then eowcustom14.Caption:=StringGridCusted it1.Cells[1,6]
else eowcustom14.Caption:=advedit6before+delimiter+'%f'+delimiter+advedit6after; else eowcustom14.Caption:=advedit6before+stringdelim('%f')+advedit6after;
if StringGridCustedit1.Cells[1,7]<>'' then eowcustom15.Caption:=StringGridCusted it1.Cells[1,7] if StringGridCustedit1.Cells[1,7]<>'' then eowcustom15.Caption:=StringGridCusted it1.Cells[1,7]
else eowcustom15.Caption:=advedit7before+delimiter+'%f'+delimiter+advedit7after; else eowcustom15.Caption:=advedit7before+stringdelim('%f')+advedit7after;
if StringGridCustedit1.Cells[1,8]<>'' then eowcustom16.Caption:=StringGridCusted it1.Cells[1,8] if StringGridCustedit1.Cells[1,8]<>'' then eowcustom16.Caption:=StringGridCusted it1.Cells[1,8]
else eowcustom16.Caption:=advedit8before+delimiter+'%f'+delimiter+advedit8after; else eowcustom16.Caption:=advedit8before+stringdelim('%f')+advedit8after;
if custedit1<>'' then eowcustom1.visible:=true else eowcustom1.visible:=false; if custedit1<>'' then eowcustom1.visible:=true else eowcustom1.visible:=false;
if custedit2<>'' then eowcustom2.visible:=true else eowcustom2.visible:=false; if custedit2<>'' then eowcustom2.visible:=true else eowcustom2.visible:=false;
if custedit3<>'' then eowcustom3.visible:=true else eowcustom3.visible:=false; if custedit3<>'' then eowcustom3.visible:=true else eowcustom3.visible:=false;
if custedit4<>'' then eowcustom4.visible:=true else eowcustom4.visible:=false; if custedit4<>'' then eowcustom4.visible:=true else eowcustom4.visible:=false;
if custedit5<>'' then eowcustom5.visible:=true else eowcustom5.visible:=false; if custedit5<>'' then eowcustom5.visible:=true else eowcustom5.visible:=false;
if custedit6<>'' then eowcustom6.visible:=true else eowcustom6.visible:=false; if custedit6<>'' then eowcustom6.visible:=true else eowcustom6.visible:=false;
if custedit7<>'' then eowcustom7.visible:=true else eowcustom7.visible:=false; if custedit7<>'' then eowcustom7.visible:=true else eowcustom7.visible:=false;
if custedit8<>'' then eowcustom8.visible:=true else eowcustom8.visible:=false; if custedit8<>'' then eowcustom8.visible:=true else eowcustom8.visible:=false;
if custedit9<>'' then eowcustom_9.visible:=true else eowcustom_9.visible:=false; if custedit9<>'' then eowcustom_9.visible:=true else eowcustom_9.visible:=false;
if custedit10<>'' then eowcustom_10.visible:=true else eowcustom_10.visible:=fal se; if custedit10<>'' then eowcustom_10.visible:=true else eowcustom_10.visible:=fal se;
skipping to change at line 14593 skipping to change at line 14572
else powcustom_14.Caption:=custedit14; else powcustom_14.Caption:=custedit14;
if StringGridCustedit.Cells[1,15]<>'' then powcustom_15.Caption:=StringGridCuste dit.Cells[1,15] if StringGridCustedit.Cells[1,15]<>'' then powcustom_15.Caption:=StringGridCuste dit.Cells[1,15]
else else
if extractfilename(custedit15)<>'' then powcustom_15.Caption:=extractfilename (custedit15) if extractfilename(custedit15)<>'' then powcustom_15.Caption:=extractfilename (custedit15)
else powcustom_15.Caption:=custedit15; else powcustom_15.Caption:=custedit15;
if StringGridCustedit.Cells[1,16]<>'' then powcustom_16.Caption:=StringGridCuste dit.Cells[1,16] if StringGridCustedit.Cells[1,16]<>'' then powcustom_16.Caption:=StringGridCuste dit.Cells[1,16]
else else
if extractfilename(custedit16)<>'' then powcustom_16.Caption:=extractfilename (custedit16) if extractfilename(custedit16)<>'' then powcustom_16.Caption:=extractfilename (custedit16)
else powcustom_16.Caption:=custedit16; else powcustom_16.Caption:=custedit16;
if StringGridCustedit1.Cells[1,1]<>'' then powcustom9.Caption:=StringGridCustedi t1.Cells[1,1] if StringGridCustedit1.Cells[1,1]<>'' then powcustom9.Caption:=StringGridCustedi t1.Cells[1,1]
else powcustom9.Caption:=advedit1before+delimiter+'%f'+delimiter+advedit1after; else powcustom9.Caption:=advedit1before+stringdelim('%f')+advedit1after;
if StringGridCustedit1.Cells[1,2]<>'' then powcustom10.Caption:=StringGridCusted it1.Cells[1,2] if StringGridCustedit1.Cells[1,2]<>'' then powcustom10.Caption:=StringGridCusted it1.Cells[1,2]
else powcustom10.Caption:=advedit2before+delimiter+'%f'+delimiter+advedit2after; else powcustom10.Caption:=advedit2before+stringdelim('%f')+advedit2after;
if StringGridCustedit1.Cells[1,3]<>'' then powcustom11.Caption:=StringGridCusted it1.Cells[1,3] if StringGridCustedit1.Cells[1,3]<>'' then powcustom11.Caption:=StringGridCusted it1.Cells[1,3]
else powcustom11.Caption:=advedit3before+delimiter+'%f'+delimiter+advedit3after; else powcustom11.Caption:=advedit3before+stringdelim('%f')+advedit3after;
if StringGridCustedit1.Cells[1,4]<>'' then powcustom12.Caption:=StringGridCusted it1.Cells[1,4] if StringGridCustedit1.Cells[1,4]<>'' then powcustom12.Caption:=StringGridCusted it1.Cells[1,4]
else powcustom12.Caption:=advedit4before+delimiter+'%f'+delimiter+advedit4after; else powcustom12.Caption:=advedit4before+stringdelim('%f')+advedit4after;
if StringGridCustedit1.Cells[1,5]<>'' then powcustom13.Caption:=StringGridCusted it1.Cells[1,5] if StringGridCustedit1.Cells[1,5]<>'' then powcustom13.Caption:=StringGridCusted it1.Cells[1,5]
else powcustom13.Caption:=advedit5before+delimiter+'%f'+delimiter+advedit5after; else powcustom13.Caption:=advedit5before+stringdelim('%f')+advedit5after;
if StringGridCustedit1.Cells[1,6]<>'' then powcustom14.Caption:=StringGridCusted it1.Cells[1,6] if StringGridCustedit1.Cells[1,6]<>'' then powcustom14.Caption:=StringGridCusted it1.Cells[1,6]
else powcustom14.Caption:=advedit6before+delimiter+'%f'+delimiter+advedit6after; else powcustom14.Caption:=advedit6before+stringdelim('%f')+advedit6after;
if StringGridCustedit1.Cells[1,7]<>'' then powcustom15.Caption:=StringGridCusted it1.Cells[1,7] if StringGridCustedit1.Cells[1,7]<>'' then powcustom15.Caption:=StringGridCusted it1.Cells[1,7]
else powcustom15.Caption:=advedit7before+delimiter+'%f'+delimiter+advedit7after; else powcustom15.Caption:=advedit7before+stringdelim('%f')+advedit7after;
if StringGridCustedit1.Cells[1,8]<>'' then powcustom16.Caption:=StringGridCusted it1.Cells[1,8] if StringGridCustedit1.Cells[1,8]<>'' then powcustom16.Caption:=StringGridCusted it1.Cells[1,8]
else powcustom16.Caption:=advedit8before+delimiter+'%f'+delimiter+advedit8after; else powcustom16.Caption:=advedit8before+stringdelim('%f')+advedit8after;
if custedit1<>'' then powcustom1.visible:=true else powcustom1.visible:=false; if custedit1<>'' then powcustom1.visible:=true else powcustom1.visible:=false;
if custedit2<>'' then powcustom2.visible:=true else powcustom2.visible:=false; if custedit2<>'' then powcustom2.visible:=true else powcustom2.visible:=false;
if custedit3<>'' then powcustom3.visible:=true else powcustom3.visible:=false; if custedit3<>'' then powcustom3.visible:=true else powcustom3.visible:=false;
if custedit4<>'' then powcustom4.visible:=true else powcustom4.visible:=false; if custedit4<>'' then powcustom4.visible:=true else powcustom4.visible:=false;
if custedit5<>'' then powcustom5.visible:=true else powcustom5.visible:=false; if custedit5<>'' then powcustom5.visible:=true else powcustom5.visible:=false;
if custedit6<>'' then powcustom6.visible:=true else powcustom6.visible:=false; if custedit6<>'' then powcustom6.visible:=true else powcustom6.visible:=false;
if custedit7<>'' then powcustom7.visible:=true else powcustom7.visible:=false; if custedit7<>'' then powcustom7.visible:=true else powcustom7.visible:=false;
if custedit8<>'' then powcustom8.visible:=true else powcustom8.visible:=false; if custedit8<>'' then powcustom8.visible:=true else powcustom8.visible:=false;
if custedit9<>'' then powcustom_9.visible:=true else powcustom_9.visible:=false; if custedit9<>'' then powcustom_9.visible:=true else powcustom_9.visible:=false;
if custedit10<>'' then powcustom_10.visible:=true else powcustom_10.visible:=fal se; if custedit10<>'' then powcustom_10.visible:=true else powcustom_10.visible:=fal se;
skipping to change at line 14707 skipping to change at line 14686
else aowcustom_14.Caption:=custedit14; else aowcustom_14.Caption:=custedit14;
if StringGridCustedit.Cells[1,15]<>'' then aowcustom_15.Caption:=StringGridCuste dit.Cells[1,15] if StringGridCustedit.Cells[1,15]<>'' then aowcustom_15.Caption:=StringGridCuste dit.Cells[1,15]
else else
if extractfilename(custedit15)<>'' then aowcustom_15.Caption:=extractfilename (custedit15) if extractfilename(custedit15)<>'' then aowcustom_15.Caption:=extractfilename (custedit15)
else aowcustom_15.Caption:=custedit15; else aowcustom_15.Caption:=custedit15;
if StringGridCustedit.Cells[1,16]<>'' then aowcustom_16.Caption:=StringGridCuste dit.Cells[1,16] if StringGridCustedit.Cells[1,16]<>'' then aowcustom_16.Caption:=StringGridCuste dit.Cells[1,16]
else else
if extractfilename(custedit16)<>'' then aowcustom_16.Caption:=extractfilename (custedit16) if extractfilename(custedit16)<>'' then aowcustom_16.Caption:=extractfilename (custedit16)
else aowcustom_16.Caption:=custedit16; else aowcustom_16.Caption:=custedit16;
if StringGridCustedit1.Cells[1,1]<>'' then aowcustom9.Caption:=StringGridCustedi t1.Cells[1,1] if StringGridCustedit1.Cells[1,1]<>'' then aowcustom9.Caption:=StringGridCustedi t1.Cells[1,1]
else aowcustom9.Caption:=advedit1before+delimiter+'%f'+delimiter+advedit1after; else aowcustom9.Caption:=advedit1before+stringdelim('%f')+advedit1after;
if StringGridCustedit1.Cells[1,2]<>'' then aowcustom10.Caption:=StringGridCusted it1.Cells[1,2] if StringGridCustedit1.Cells[1,2]<>'' then aowcustom10.Caption:=StringGridCusted it1.Cells[1,2]
else aowcustom10.Caption:=advedit2before+delimiter+'%f'+delimiter+advedit2after; else aowcustom10.Caption:=advedit2before+stringdelim('%f')+advedit2after;
if StringGridCustedit1.Cells[1,3]<>'' then aowcustom11.Caption:=StringGridCusted it1.Cells[1,3] if StringGridCustedit1.Cells[1,3]<>'' then aowcustom11.Caption:=StringGridCusted it1.Cells[1,3]
else aowcustom11.Caption:=advedit3before+delimiter+'%f'+delimiter+advedit3after; else aowcustom11.Caption:=advedit3before+stringdelim('%f')+advedit3after;
if StringGridCustedit1.Cells[1,4]<>'' then aowcustom12.Caption:=StringGridCusted it1.Cells[1,4] if StringGridCustedit1.Cells[1,4]<>'' then aowcustom12.Caption:=StringGridCusted it1.Cells[1,4]
else aowcustom12.Caption:=advedit4before+delimiter+'%f'+delimiter+advedit4after; else aowcustom12.Caption:=advedit4before+stringdelim('%f')+advedit4after;
if StringGridCustedit1.Cells[1,5]<>'' then aowcustom13.Caption:=StringGridCusted it1.Cells[1,5] if StringGridCustedit1.Cells[1,5]<>'' then aowcustom13.Caption:=StringGridCusted it1.Cells[1,5]
else aowcustom13.Caption:=advedit5before+delimiter+'%f'+delimiter+advedit5after; else aowcustom13.Caption:=advedit5before+stringdelim('%f')+advedit5after;
if StringGridCustedit1.Cells[1,6]<>'' then aowcustom14.Caption:=StringGridCusted it1.Cells[1,6] if StringGridCustedit1.Cells[1,6]<>'' then aowcustom14.Caption:=StringGridCusted it1.Cells[1,6]
else aowcustom14.Caption:=advedit6before+delimiter+'%f'+delimiter+advedit6after; else aowcustom14.Caption:=advedit6before+stringdelim('%f')+advedit6after;
if StringGridCustedit1.Cells[1,7]<>'' then aowcustom15.Caption:=StringGridCusted it1.Cells[1,7] if StringGridCustedit1.Cells[1,7]<>'' then aowcustom15.Caption:=StringGridCusted it1.Cells[1,7]
else aowcustom15.Caption:=advedit7before+delimiter+'%f'+delimiter+advedit7after; else aowcustom15.Caption:=advedit7before+stringdelim('%f')+advedit7after;
if StringGridCustedit1.Cells[1,8]<>'' then aowcustom16.Caption:=StringGridCusted it1.Cells[1,8] if StringGridCustedit1.Cells[1,8]<>'' then aowcustom16.Caption:=StringGridCusted it1.Cells[1,8]
else aowcustom16.Caption:=advedit8before+delimiter+'%f'+delimiter+advedit8after; else aowcustom16.Caption:=advedit8before+stringdelim('%f')+advedit8after;
if custedit1<>'' then aowcustom1.visible:=true else aowcustom1.visible:=false; if custedit1<>'' then aowcustom1.visible:=true else aowcustom1.visible:=false;
if custedit2<>'' then aowcustom2.visible:=true else aowcustom2.visible:=false; if custedit2<>'' then aowcustom2.visible:=true else aowcustom2.visible:=false;
if custedit3<>'' then aowcustom3.visible:=true else aowcustom3.visible:=false; if custedit3<>'' then aowcustom3.visible:=true else aowcustom3.visible:=false;
if custedit4<>'' then aowcustom4.visible:=true else aowcustom4.visible:=false; if custedit4<>'' then aowcustom4.visible:=true else aowcustom4.visible:=false;
if custedit5<>'' then aowcustom5.visible:=true else aowcustom5.visible:=false; if custedit5<>'' then aowcustom5.visible:=true else aowcustom5.visible:=false;
if custedit6<>'' then aowcustom6.visible:=true else aowcustom6.visible:=false; if custedit6<>'' then aowcustom6.visible:=true else aowcustom6.visible:=false;
if custedit7<>'' then aowcustom7.visible:=true else aowcustom7.visible:=false; if custedit7<>'' then aowcustom7.visible:=true else aowcustom7.visible:=false;
if custedit8<>'' then aowcustom8.visible:=true else aowcustom8.visible:=false; if custedit8<>'' then aowcustom8.visible:=true else aowcustom8.visible:=false;
if custedit9<>'' then aowcustom_9.visible:=true else aowcustom_9.visible:=false; if custedit9<>'' then aowcustom_9.visible:=true else aowcustom_9.visible:=false;
if custedit10<>'' then aowcustom_10.visible:=true else aowcustom_10.visible:=fal se; if custedit10<>'' then aowcustom_10.visible:=true else aowcustom_10.visible:=fal se;
skipping to change at line 21681 skipping to change at line 21660
Form_peach.ImagePassword.Glyph:=blocker2; Form_peach.ImagePassword.Glyph:=blocker2;
Form_peach.ImagePassword.Hint:=txt_2_7_pwnotset; Form_peach.ImagePassword.Hint:=txt_2_7_pwnotset;
Form_peach.po_setpw.Bitmap:=Blocker2; Form_peach.po_setpw.Bitmap:=Blocker2;
Form_peach.po_setpw.Caption:=txt_2_7_setpw; Form_peach.po_setpw.Caption:=txt_2_7_setpw;
Form_peach.pmqesetpw.Bitmap:=Blocker2; Form_peach.pmqesetpw.Bitmap:=Blocker2;
Form_peach.pmqesetpw.Caption:=txt_2_7_setpw; Form_peach.pmqesetpw.Caption:=txt_2_7_setpw;
Form_peach.menuitempw.Bitmap:=Blocker2; Form_peach.menuitempw.Bitmap:=Blocker2;
Form_peach.menuitempw.Caption:=txt_2_7_setpw; Form_peach.menuitempw.Caption:=txt_2_7_setpw;
Form_peach.mpw2.Bitmap:=Blocker2; Form_peach.mpw2.Bitmap:=Blocker2;
Form_peach.mpw2.Caption:=txt_2_7_setpw; Form_peach.mpw2.Caption:=txt_2_7_setpw;
if (archive_type<>'7z') and (archive_type<>'zip') and (archive_type<>'arc') a nd (archive_type<>'zpaq') and (fun<>'PEA') and (fun<>upcase(txt_custom)) then if (archive_type<>'7z') and (archive_type<>'zip') and (archive_type<>'arc') a nd (archive_type<>'zpaq') and (fun<>'PEA') and (fun<>'CUSTOM') then
begin begin
Form_peach.ImagePassword1.Caption:=txt_2_7_setpw; Form_peach.ImagePassword1.Caption:=txt_2_7_setpw;
Form_peach.ImagePassword1.Hint:=txt_2_5_nopw; Form_peach.ImagePassword1.Hint:=txt_2_5_nopw;
Form_peach.ImagePassword1.Visible:=false; Form_peach.ImagePassword1.Visible:=false;
end end
else else
begin begin
Form_peach.ImagePassword1.Caption:=txt_2_7_setpw; Form_peach.ImagePassword1.Caption:=txt_2_7_setpw;
Form_peach.ImagePassword1.Hint:=txt_encryption; Form_peach.ImagePassword1.Hint:=txt_encryption;
Form_peach.ImagePassword1.Visible:=true; Form_peach.ImagePassword1.Visible:=true;
skipping to change at line 21712 skipping to change at line 21691
Form_peach.ImagePassword.Glyph:=blocker; Form_peach.ImagePassword.Glyph:=blocker;
Form_peach.ImagePassword.Hint:=txt_2_7_pwextset; Form_peach.ImagePassword.Hint:=txt_2_7_pwextset;
Form_peach.po_setpw.Bitmap:=Blocker; Form_peach.po_setpw.Bitmap:=Blocker;
Form_peach.po_setpw.Caption:=txt_2_7_setpw+' *'; Form_peach.po_setpw.Caption:=txt_2_7_setpw+' *';
Form_peach.pmqesetpw.Bitmap:=Blocker; Form_peach.pmqesetpw.Bitmap:=Blocker;
Form_peach.pmqesetpw.Caption:=txt_2_7_setpw+' *'; Form_peach.pmqesetpw.Caption:=txt_2_7_setpw+' *';
Form_peach.menuitempw.Bitmap:=Blocker; Form_peach.menuitempw.Bitmap:=Blocker;
Form_peach.menuitempw.Caption:=txt_2_7_setpw+' *'; Form_peach.menuitempw.Caption:=txt_2_7_setpw+' *';
Form_peach.mpw2.Bitmap:=Blocker; Form_peach.mpw2.Bitmap:=Blocker;
Form_peach.mpw2.Caption:=txt_2_7_setpw+' *'; Form_peach.mpw2.Caption:=txt_2_7_setpw+' *';
if (archive_type<>'7z') and (archive_type<>'zip') and (archive_type<>'arc') a nd (archive_type<>'zpaq') and (fun<>'PEA') and (fun<>upcase(txt_custom)) then if (archive_type<>'7z') and (archive_type<>'zip') and (archive_type<>'arc') a nd (archive_type<>'zpaq') and (fun<>'PEA') and (fun<>'CUSTOM') then
begin begin
Form_peach.ImagePassword1.Caption:=txt_2_7_setpw; Form_peach.ImagePassword1.Caption:=txt_2_7_setpw;
Form_peach.ImagePassword1.Hint:=txt_2_5_nopw; Form_peach.ImagePassword1.Hint:=txt_2_5_nopw;
Form_peach.ImagePassword1.Visible:=false; Form_peach.ImagePassword1.Visible:=false;
end end
else else
begin begin
Form_peach.ImagePassword1.Caption:=txt_2_7_setpw; Form_peach.ImagePassword1.Caption:=txt_2_7_setpw;
Form_peach.ImagePassword1.Hint:=txt_encryption; Form_peach.ImagePassword1.Hint:=txt_encryption;
Form_peach.ImagePassword1.Visible:=true; Form_peach.ImagePassword1.Visible:=true;
skipping to change at line 21736 skipping to change at line 21715
end; end;
except except
end; end;
end; end;
procedure setquickcompset(s:ansistring); procedure setquickcompset(s:ansistring);
var var
i:integer; i:integer;
begin begin
Form_peach.ComboBoxArchive9.Clear; Form_peach.ComboBoxArchive9.Clear;
if (s<>'7Z') and (s<>'ARC') and (s<>'BROTLI') and (s<>upcase(txt_custom)) and (s <>'ZSTD') then Form_peach.ComboBoxArchive9.Enabled:=false if (s<>'7Z') and (s<>'ARC') and (s<>'BROTLI') and (s<>'CUSTOM') and (s<>'ZSTD') then Form_peach.ComboBoxArchive9.Enabled:=false
else Form_peach.ComboBoxArchive9.Enabled:=true; else Form_peach.ComboBoxArchive9.Enabled:=true;
if s='7Z' then if s='7Z' then
begin begin
Form_peach.ComboBoxArchive9.DropDownCount:=Form_peach.ComboBoxArchive4.DropDo wnCount; Form_peach.ComboBoxArchive9.DropDownCount:=Form_peach.ComboBoxArchive4.DropDo wnCount;
for i:=0 to Form_peach.ComboBoxArchive4.Items.Count-1 do for i:=0 to Form_peach.ComboBoxArchive4.Items.Count-1 do
Form_peach.ComboBoxArchive9.Items.Append(Form_peach.ComboBoxArchive4.Items [i]); Form_peach.ComboBoxArchive9.Items.Append(Form_peach.ComboBoxArchive4.Items [i]);
Form_peach.ComboBoxArchive9.ItemIndex:=Form_peach.ComboBoxArchive4.ItemIndex; Form_peach.ComboBoxArchive9.ItemIndex:=Form_peach.ComboBoxArchive4.ItemIndex;
end; end;
if s=upcase(txt_custom) then if s='CUSTOM' then
if (havewinrar=true) and (userar=1) then if (havewinrar=true) and (userar=1) then
begin begin
Form_peach.ComboBoxArchive9.DropDownCount:=Form_peach.ComboBoxArchive4.DropDo wnCount; Form_peach.ComboBoxArchive9.DropDownCount:=Form_peach.ComboBoxArchive4.DropDo wnCount;
for i:=0 to Form_peach.ComboBoxArchive4.Items.Count-1 do for i:=0 to Form_peach.ComboBoxArchive4.Items.Count-1 do
Form_peach.ComboBoxArchive9.Items.Append(Form_peach.ComboBoxArchive4.Items [i]); Form_peach.ComboBoxArchive9.Items.Append(Form_peach.ComboBoxArchive4.Items [i]);
Form_peach.ComboBoxArchive9.ItemIndex:=level_rar; Form_peach.ComboBoxArchive9.ItemIndex:=level_rar;
end; end;
if s='ARC' then if s='ARC' then
begin begin
Form_peach.ComboBoxArchive9.DropDownCount:=Form_peach.ComboBoxARC.DropDownCou nt; Form_peach.ComboBoxArchive9.DropDownCount:=Form_peach.ComboBoxARC.DropDownCou nt;
skipping to change at line 23469 skipping to change at line 23448
begin begin
dodirseparators(tempstring); dodirseparators(tempstring);
i:=testinput(outname+tempstring,true); i:=testinput(outname+tempstring,true);
//if ((i>=0) and (i<>1000)) then //if ((i>=0) and (i<>1000)) then
if i>=0 then if i>=0 then
begin begin
save_conf; save_conf;
save_bookmarks; save_bookmarks;
P:=tprocessutf8.Create(nil); P:=tprocessutf8.Create(nil);
dodirseparators(tempstring); dodirseparators(tempstring);
outname:=delimiter+escapefilename(outname+tempstring,desk_env)+delimite outname:=stringdelim(escapefilename(outname+tempstring,desk_env));
r; bin_name:=stringdelim(escapefilename(executable_path+'peazip'+EXEEXT,de
bin_name:=delimiter+escapefilename(executable_path,desk_env)+'peazip'+E sk_env))+' -ext2openasarchive';//' -ext2open';
XEEXT+delimiter+' -ext2openasarchive';//' -ext2open';
{$IFDEF MSWINDOWS}P.Options := [poNoConsole];{$ELSE}P.Options := [poNoC onsole, poWaitOnExit];{$ENDIF} {$IFDEF MSWINDOWS}P.Options := [poNoConsole];{$ELSE}P.Options := [poNoC onsole, poWaitOnExit];{$ENDIF}
cl:=bin_name+' '+outname; cl:=bin_name+' '+outname;
P.CommandLine:=cl; P.CommandLine:=cl;
if Form_peach.Visible=true then Application.ProcessMessages; if Form_peach.Visible=true then Application.ProcessMessages;
if validatecl(cl)<>0 then begin pMessageWarningOK(txt_2_7_validatecl+' '+cl); exit; end; if validatecl(cl)<>0 then begin pMessageWarningOK(txt_2_7_validatecl+' '+cl); exit; end;
P.Execute; P.Execute;
execute_obj:=P.ExitStatus; execute_obj:=P.ExitStatus;
P.Free; P.Free;
end; end;
execute_obj:=0; execute_obj:=0;
skipping to change at line 23528 skipping to change at line 23507
begin begin
execute_obj:=0; execute_obj:=0;
tempstring:=''; tempstring:='';
exit; exit;
end; end;
end; end;
{$ENDIF} {$ENDIF}
save_conf; save_conf;
save_bookmarks; save_bookmarks;
dodirseparators(tempstring); dodirseparators(tempstring);
outname:=delimiter+escapefilename(outname+tempstring,desk_env)+delimite outname:=stringdelim(escapefilename(outname+tempstring,desk_env));
r; bin_name:=stringdelim(escapefilename(executable_path+'peazip'+EXEEXT,de
bin_name:=delimiter+escapefilename(executable_path,desk_env)+'peazip'+E sk_env));
XEEXT+delimiter;
{$IFDEF MSWINDOWS}P.Options := [poNoConsole];{$ELSE}P.Options := [poNoC onsole, poWaitOnExit];{$ENDIF} {$IFDEF MSWINDOWS}P.Options := [poNoConsole];{$ELSE}P.Options := [poNoC onsole, poWaitOnExit];{$ENDIF}
cl:=bin_name+' -ext2open '+outname; cl:=bin_name+' -ext2open '+outname;
P.CommandLine:=cl; P.CommandLine:=cl;
if Form_peach.Visible=true then Application.ProcessMessages; if Form_peach.Visible=true then Application.ProcessMessages;
if validatecl(cl)<>0 then begin pMessageWarningOK(txt_2_7_validatecl+' '+cl); exit; end; if validatecl(cl)<>0 then begin pMessageWarningOK(txt_2_7_validatecl+' '+cl); exit; end;
P.Execute; P.Execute;
execute_obj:=P.ExitStatus; execute_obj:=P.ExitStatus;
P.Free; P.Free;
end; end;
execute_obj:=0; execute_obj:=0;
skipping to change at line 23563 skipping to change at line 23542
var var
i:integer; i:integer;
s:ansistring; s:ansistring;
begin begin
extract_excludes:=''; extract_excludes:='';
for i:=0 to FormAdvf.MemoAdvExclude.Lines.Count-1 do for i:=0 to FormAdvf.MemoAdvExclude.Lines.Count-1 do
if FormAdvf.MemoAdvExclude.Lines[i]<>'' then if FormAdvf.MemoAdvExclude.Lines[i]<>'' then
begin begin
s:=FormAdvf.MemoAdvExclude.Lines[i]; s:=FormAdvf.MemoAdvExclude.Lines[i];
//if copy(s,1,1)='.' then s:='*'+copy(s,2,length(s)-1); //if copy(s,1,1)='.' then s:='*'+copy(s,2,length(s)-1);
if FormAdvf.CheckBoxAdvRecurse1.State=cbChecked then extract_excludes:=ext if FormAdvf.CheckBoxAdvRecurse1.State=cbChecked then extract_excludes:=ext
ract_excludes+' '+delimiter+'-xr!'+escapefilename(s,desk_env)+delimiter ract_excludes+' '+stringdelim('-xr!'+escapefilename(s,desk_env))
else extract_excludes:=extract_excludes+' '+delimiter+'-x!'+escapefilename else extract_excludes:=extract_excludes+' '+stringdelim('-x!'+escapefilena
(s,desk_env)+delimiter; me(s,desk_env));
end; end;
end; end;
function extract_excludes_rar5:ansistring; function extract_excludes_rar5:ansistring;
var var
i:integer; i:integer;
s:ansistring; s:ansistring;
begin begin
extract_excludes_rar5:=''; extract_excludes_rar5:='';
for i:=0 to FormAdvf.MemoAdvExclude.Lines.Count-1 do for i:=0 to FormAdvf.MemoAdvExclude.Lines.Count-1 do
if FormAdvf.MemoAdvExclude.Lines[i]<>'' then if FormAdvf.MemoAdvExclude.Lines[i]<>'' then
begin begin
s:=FormAdvf.MemoAdvExclude.Lines[i]; s:=FormAdvf.MemoAdvExclude.Lines[i];
//if copy(s,1,1)='.' then s:='*'+copy(s,2,length(s)-1); //if copy(s,1,1)='.' then s:='*'+copy(s,2,length(s)-1);
extract_excludes_rar5:=extract_excludes_rar5+' '+delimiter+'-x'+escapefile name(s,desk_env)+delimiter; extract_excludes_rar5:=extract_excludes_rar5+' '+stringdelim('-x'+escapefi lename(s,desk_env));
end; end;
end; end;
function extract_includes:ansistring; function extract_includes:ansistring;
var var
i:integer; i:integer;
s:ansistring; s:ansistring;
begin begin
extract_includes:=''; extract_includes:='';
for i:=0 to FormAdvf.MemoAdvInclude.Lines.Count-1 do for i:=0 to FormAdvf.MemoAdvInclude.Lines.Count-1 do
if FormAdvf.MemoAdvInclude.Lines[i]<>'' then if FormAdvf.MemoAdvInclude.Lines[i]<>'' then
begin begin
s:=FormAdvf.MemoAdvInclude.Lines[i]; s:=FormAdvf.MemoAdvInclude.Lines[i];
//if copy(s,1,1)='.' then s:='*'+copy(s,2,length(s)-1); //if copy(s,1,1)='.' then s:='*'+copy(s,2,length(s)-1);
extract_includes:=extract_includes+' '+delimiter+escapefilename(s,desk_env )+delimiter; extract_includes:=extract_includes+' '+stringdelim(escapefilename(s,desk_e nv));
end; end;
end; end;
function extract_includes_rar5:ansistring; function extract_includes_rar5:ansistring;
var var
i:integer; i:integer;
s:ansistring; s:ansistring;
begin begin
extract_includes_rar5:=''; extract_includes_rar5:='';
for i:=0 to FormAdvf.MemoAdvInclude.Lines.Count-1 do for i:=0 to FormAdvf.MemoAdvInclude.Lines.Count-1 do
if FormAdvf.MemoAdvInclude.Lines[i]<>'' then if FormAdvf.MemoAdvInclude.Lines[i]<>'' then
begin begin
s:=FormAdvf.MemoAdvInclude.Lines[i]; s:=FormAdvf.MemoAdvInclude.Lines[i];
//if copy(s,1,1)='.' then s:='*'+copy(s,2,length(s)-1); //if copy(s,1,1)='.' then s:='*'+copy(s,2,length(s)-1);
extract_includes_rar5:=extract_includes_rar5+' '+delimiter+escapefilename( s,desk_env)+delimiter; extract_includes_rar5:=extract_includes_rar5+' '+stringdelim(escapefilenam e(s,desk_env));
end; end;
end; end;
procedure adv_filters(var cl:ansistring); procedure adv_filters(var cl:ansistring);
begin begin
if FormAdvf.CheckBoxAdvFilters.State=cbChecked then if FormAdvf.CheckBoxAdvFilters.State=cbChecked then
begin begin
if extract_excludes<>'' then cl:=cl+extract_excludes; if extract_excludes<>'' then cl:=cl+extract_excludes;
if FormAdvf.CheckBoxAdvRecurse.State=cbChecked then cl:=cl+' -r' if FormAdvf.CheckBoxAdvRecurse.State=cbChecked then cl:=cl+' -r'
else cl:=cl+' -r-'; else cl:=cl+' -r-';
skipping to change at line 23643 skipping to change at line 23622
end; end;
procedure basic_filters(var cl:ansistring); procedure basic_filters(var cl:ansistring);
var var
s1,s2:ansistring; s1,s2:ansistring;
begin begin
s1:=Form_peach.EditUn7zaFilterExclude.Text; s1:=Form_peach.EditUn7zaFilterExclude.Text;
//if copy(s1,1,1)='.' then s1:='*'+copy(s1,2,length(s1)-1); //to allowing using paths beginning with "." that would otherwise result in 7z error "cannot use abs olute path" //if copy(s1,1,1)='.' then s1:='*'+copy(s1,2,length(s1)-1); //to allowing using paths beginning with "." that would otherwise result in 7z error "cannot use abs olute path"
s2:=Form_peach.EditUn7zaFilter.Text; s2:=Form_peach.EditUn7zaFilter.Text;
//if copy(s2,1,1)='.' then s2:='*'+copy(s2,2,length(s2)-1); //if copy(s2,1,1)='.' then s2:='*'+copy(s2,2,length(s2)-1);
if Form_peach.EditUn7zaFilterExclude.Text<>'' then cl:=cl+' '+delimiter+'-x!'+es if Form_peach.EditUn7zaFilterExclude.Text<>'' then cl:=cl+' '+stringdelim('-x!'+
capefilename(s1,desk_env)+delimiter; escapefilename(s1,desk_env));
if Form_peach.EditUn7zaFilter.Text<>'' then cl:=cl+' -r -- '+delimiter+escapefil if Form_peach.EditUn7zaFilter.Text<>'' then cl:=cl+' '+stringdelim('-ir!'+escape
ename(s2,desk_env)+delimiter; filename(s2,desk_env));
end; end;
procedure basic_filters_rar5(var cl:ansistring); procedure basic_filters_rar5(var cl:ansistring);
var var
s1,s2:ansistring; s1,s2:ansistring;
begin begin
s1:=Form_peach.EditUn7zaFilterExclude.Text; s1:=Form_peach.EditUn7zaFilterExclude.Text;
if pos('*'+directoryseparator+'*',s1)<>0 then s1:=copy(s1,1,pos('*'+directorysep arator+'*',s1)-2); if pos('*'+directoryseparator+'*',s1)<>0 then s1:=copy(s1,1,pos('*'+directorysep arator+'*',s1)-2);
s2:=Form_peach.EditUn7zaFilter.Text; s2:=Form_peach.EditUn7zaFilter.Text;
if Form_peach.EditUn7zaFilterExclude.Text<>'' then cl:=cl+' '+delimiter+'-x'+esc if Form_peach.EditUn7zaFilterExclude.Text<>'' then cl:=cl+' '+stringdelim('-x'+e
apefilename(s1,desk_env)+directoryseparator+'**'+directoryseparator+'**'+directo scapefilename(s1,desk_env)+directoryseparator+'**'+directoryseparator+'**'+direc
ryseparator+delimiter+' '+delimiter+'-x'+escapefilename(s1,desk_env)+directoryse toryseparator)+' '+stringdelim('-x'+escapefilename(s1,desk_env)+directoryseparat
parator+'**'+directoryseparator+'*'+delimiter; or+'**'+directoryseparator+'*');
if Form_peach.EditUn7zaFilter.Text<>'' then cl:=cl+' -- '+delimiter+escapefilena if Form_peach.EditUn7zaFilter.Text<>'' then cl:=cl+' -- '+stringdelim(escapefile
me(s2,desk_env)+delimiter; name(s2,desk_env));
end; end;
procedure reportnotsupported(sfo:ansistring); procedure reportnotsupported(sfo:ansistring);
var var
s:ansistring; s:ansistring;
begin begin
if restartingapp=true then exit; if restartingapp=true then exit;
restartingapp:=true; restartingapp:=true;
case libre_directive of case libre_directive of
1: s:=sfo+char($0D)+char($0A)+char($0D)+char($0A)+txt_5_8_fsr+' = 1'+char($0D )+char($0A)+char($0D)+char($0A)+txt_5_8_l1; 1: s:=sfo+char($0D)+char($0A)+char($0D)+char($0A)+txt_5_8_fsr+' = 1'+char($0D )+char($0A)+char($0D)+char($0A)+txt_5_8_l1;
skipping to change at line 23775 skipping to change at line 23754
result:=0; result:=0;
ext:=extractfileext(s); ext:=extractfileext(s);
if upcase(ext)='.RAR' then result:=1; if upcase(ext)='.RAR' then result:=1;
end; end;
function listun7z_do(mode:ansistring):integer; function listun7z_do(mode:ansistring):integer;
var var
cl,in_param,bin_name,exe_name,pw,mcu_option:ansistring; cl,in_param,bin_name,exe_name,pw,mcu_option:ansistring;
begin begin
result:=-1; result:=-1;
in_param:=delimiter+escapefilename((Form_peach.EditOpenIn.Text),desk_env)+delimi ter; in_param:=stringdelim(escapefilename((Form_peach.EditOpenIn.Text),desk_env));
if fun='UN7Z' then exe_name:='7z'; if fun='UN7Z' then exe_name:='7z';
bin_name:=delimiter+escapefilename((executable_path),desk_env)+'res'+DirectorySe parator+exe_name+DirectorySeparator+exe_name+EXEEXT+delimiter; bin_name:=stringdelim(escapefilename((executable_path),desk_env)+'res'+Directory Separator+exe_name+DirectorySeparator+exe_name+EXEEXT);
pw:=FormPW.EditUn7zaPW.Text; pw:=FormPW.EditUn7zaPW.Text;
if FormPW.EditName3.Text<>'' then if FormPW.EditName3.Text<>'' then
if prepend_keyfile(pw,FormPW.EditName3.Text)<>0 then if prepend_keyfile(pw,FormPW.EditName3.Text)<>0 then
begin begin
pMessageErrorOK(FormPW.EditName3.Text+' '+txt_keyfile_not_found); pMessageErrorOK(FormPW.EditName3.Text+' '+txt_keyfile_not_found);
exit; exit;
end; end;
if pw<>'' then if pw<>'' then
begin begin
if pw4cl('-p',pw)<>0 then if pw4cl('-p',pw)<>0 then
begin begin
msg_pw_errorchar; msg_pw_errorchar(pw);
exit; exit;
end; end;
end end
else pw:='-pdefault'; else pw:='-pdefault';
cl:=bin_name+' l'; cl:=bin_name+' l';
{$IFDEF MSWINDOWS} {$IFDEF MSWINDOWS}
case enc7zscc of case enc7zscc of
0: cl:=cl+' -sccUTF-8'; 0: cl:=cl+' -sccUTF-8';
1: cl:=cl+' -sccWIN'; 1: cl:=cl+' -sccWIN';
2: cl:=cl+' -sccDOS'; 2: cl:=cl+' -sccDOS';
skipping to change at line 23828 skipping to change at line 23807
basic_filters(cl); basic_filters(cl);
if Form_peach.EditUn7zaFilter.Text<>'*' then funflag:=false else funflag:=true; if Form_peach.EditUn7zaFilter.Text<>'*' then funflag:=false else funflag:=true;
result:=execute_cl(cl,mode); result:=execute_cl(cl,mode);
end; end;
function list_unrar5_do(mode:ansistring):integer; function list_unrar5_do(mode:ansistring):integer;
var var
cl,in_param,bin_name,exe_name,pw:ansistring; cl,in_param,bin_name,exe_name,pw:ansistring;
begin begin
result:=-1; result:=-1;
in_param:=delimiter+escapefilename(Form_peach.EditOpenIn.Text,desk_env)+delimite r; in_param:=stringdelim(escapefilename(Form_peach.EditOpenIn.Text,desk_env));
if fun='UN7Z' then exe_name:=UNRARNAME; if fun='UN7Z' then exe_name:=UNRARNAME;
bin_name:=delimiter+escapefilename(executable_path,desk_env)+'res'+DirectorySepa rator+'unrar'+DirectorySeparator+exe_name+EXEEXT+delimiter; bin_name:=stringdelim(escapefilename(executable_path,desk_env)+'res'+DirectorySe parator+'unrar'+DirectorySeparator+exe_name+EXEEXT);
pw:=FormPW.EditUn7zaPW.Text; pw:=FormPW.EditUn7zaPW.Text;
if FormPW.EditName3.Text<>'' then if FormPW.EditName3.Text<>'' then
if prepend_keyfile(pw,FormPW.EditName3.Text)<>0 then if prepend_keyfile(pw,FormPW.EditName3.Text)<>0 then
begin begin
pMessageErrorOK(FormPW.EditName3.Text+' '+txt_keyfile_not_found); pMessageErrorOK(FormPW.EditName3.Text+' '+txt_keyfile_not_found);
exit; exit;
end; end;
if pw<>'' then if pw<>'' then
begin begin
if pw4cl('-p',pw)<>0 then if pw4cl('-p',pw)<>0 then
begin begin
msg_pw_errorchar; msg_pw_errorchar(pw);
exit; exit;
end; end;
end end
else pw:='-p-'; else pw:='-p-';
cl:=bin_name+' lt'; cl:=bin_name+' lt';
browse_option:='rar5'; browse_option:='rar5';
cl:=cl+' '+pw+' '+in_param; cl:=cl+' '+pw+' '+in_param;
//filter(s) //filter(s)
if FormAdvf.CheckBoxAdvFilters.State=cbChecked then //use advanced filters, igno re basic filters if FormAdvf.CheckBoxAdvFilters.State=cbChecked then //use advanced filters, igno re basic filters
adv_filters_rar5(cl) adv_filters_rar5(cl)
skipping to change at line 26668 skipping to change at line 26647
if (fun='UNARC') then if (fun='UNARC') then
fres:=compose_unarc_cl(cl,jobcode,outname,true,'draganddrop','selected'); fres:=compose_unarc_cl(cl,jobcode,outname,true,'draganddrop','selected');
if (fun='UN7Z') then if (fun='UN7Z') then
fres:= compose_un7z_cl(cl,jobcode,outname,true,'draganddrop','selected'); fres:= compose_un7z_cl(cl,jobcode,outname,true,'draganddrop','selected');
end; end;
if fres=0 then if fres=0 then
begin begin
Form_peach.Visible:=false; Form_peach.Visible:=false;
P:=tprocessutf8.Create(nil); P:=tprocessutf8.Create(nil);
P.Options := [poNoConsole, poWaitOnExit]; P.Options := [poNoConsole, poWaitOnExit];
P.CommandLine:=delimiter+escapefilename(executable_path,desk_env)+'peazip'+EX P.CommandLine:=stringdelim(escapefilename(executable_path,desk_env)+'peazip'+
EEXT+delimiter+ EXEEXT)+
' -pdrop '+fun+' '+inttostr(pforceconsole)+' '+inttostr(tsize) ' -pdrop '+fun+' '+inttostr(pforceconsole)+' '+inttostr(tsize)
+' '+delimiter+Form_peach.EditOpenIn.Text+delimiter+' '+cl; +' '+stringdelim(Form_peach.EditOpenIn.Text)+' '+cl;
if (dragtargetprotect=1) or (dragtargetprotect=3) then if haddress<>0 then En ableWindow(haddress,false); if (dragtargetprotect=1) or (dragtargetprotect=3) then if haddress<>0 then En ableWindow(haddress,false);
' <span class="insert">'+stringdelim(Form_peach.EditOpenIn.Text)+'</span> '+cl;
if (dragtargetprotect=2) or (dragtargetprotect=3) then if haddress<>0 then Sh owWindow(haddress,6); if (dragtargetprotect=2) or (dragtargetprotect=3) then if haddress<>0 then Sh owWindow(haddress,6);
P.Execute; P.Execute;
P.Free; P.Free;
if status0=txt_list_browsing then if status0=txt_list_browsing then
begin begin
relpath:=StringReplace(Form_peach.StringGridList.Cells[8,Form_peach.String GridList.Row],':','_',[rfReplaceAll]); relpath:=StringReplace(Form_peach.StringGridList.Cells[8,Form_peach.String GridList.Row],':','_',[rfReplaceAll]);
relpath:=extractfilepath(relpath); relpath:=extractfilepath(relpath);
end end
else else
skipping to change at line 28844 skipping to change at line 28823
P:=tprocessutf8.Create(nil); P:=tprocessutf8.Create(nil);
P.Options := [poNoConsole, poWaitOnExit]; P.Options := [poNoConsole, poWaitOnExit];
cl:='cmd /c rmdir "'+s+'" /s /q'; cl:='cmd /c rmdir "'+s+'" /s /q';
P.CommandLine:=cl; P.CommandLine:=cl;
P.Execute; P.Execute;
cleardir:=P.ExitStatus; cleardir:=P.ExitStatus;
P.Free; P.Free;
{$ELSE} //system needs to support rm command {$ELSE} //system needs to support rm command
P:=tprocessutf8.Create(nil); P:=tprocessutf8.Create(nil);
P.Options := [poNoConsole, poWaitOnExit]; P.Options := [poNoConsole, poWaitOnExit];
cl:='rm -r '+''''+s+''''; cl:='rm -r '+stringdelim(s);
P.CommandLine:=cl; P.CommandLine:=cl;
P.Execute; P.Execute;
cleardir:=P.ExitStatus; cleardir:=P.ExitStatus;
P.Free; P.Free;
{$ENDIF} {$ENDIF}
if directoryexists(s) then if directoryexists(s) then
begin begin
if Form_peach.Visible=true then Application.ProcessMessages; if Form_peach.Visible=true then Application.ProcessMessages;
sleep(250+random(50)); sleep(250+random(50));
{$IFDEF MSWINDOWS} {$IFDEF MSWINDOWS}
skipping to change at line 28878 skipping to change at line 28857
P.Options := [poWaitOnExit]; P.Options := [poWaitOnExit];
cl:='powershell.exe Remove-Item -path "'+s+'" -recurse -force'; cl:='powershell.exe Remove-Item -path "'+s+'" -recurse -force';
P.CommandLine:=cl; P.CommandLine:=cl;
P.Execute; P.Execute;
cleardir:=P.ExitStatus; cleardir:=P.ExitStatus;
P.Free; P.Free;
end; end;
{$ELSE} //system needs to support rm command {$ELSE} //system needs to support rm command
P:=tprocessutf8.Create(nil); P:=tprocessutf8.Create(nil);
P.Options := [poNoConsole, poWaitOnExit]; P.Options := [poNoConsole, poWaitOnExit];
cl:='rm -r '+''''+s+''''; cl:='rm -r '+stringdelim(s);
P.CommandLine:=cl; P.CommandLine:=cl;
P.Execute; P.Execute;
cleardir:=P.ExitStatus; cleardir:=P.ExitStatus;
P.Free; P.Free;
{$ENDIF} {$ENDIF}
end; end;
if directoryexists(s) then cleardir:=-1 if directoryexists(s) then cleardir:=-1
else cleardir:=0; else cleardir:=0;
if ntry>1 then if ntry>1 then
begin begin
skipping to change at line 30619 skipping to change at line 30598
procedure prepare_FormWeb; procedure prepare_FormWeb;
begin begin
FormWeb.Caption:=txt_search_web; FormWeb.Caption:=txt_search_web;
FormWeb.CheckBox1.Caption:=txt_3_3_multi; FormWeb.CheckBox1.Caption:=txt_3_3_multi;
FormWeb.CheckGroup1.Caption:=txt_searchfor; FormWeb.CheckGroup1.Caption:=txt_searchfor;
FormWeb.buttonpanel1.OKButton.Glyph:=Btestall; FormWeb.buttonpanel1.OKButton.Glyph:=Btestall;
FormWeb.buttonpanel1.CancelButton.Glyph:=Bstop; FormWeb.buttonpanel1.CancelButton.Glyph:=Bstop;
FormWeb.buttonpanel1.OKButton.Caption:=txt_2_7_ok; FormWeb.buttonpanel1.OKButton.Caption:=txt_2_7_ok;
FormWeb.buttonpanel1.CancelButton.Caption:=txt_2_7_cancel; FormWeb.buttonpanel1.CancelButton.Caption:=txt_2_7_cancel;
FormWeb.CheckGroup1.Checked[9]:=true; FormWeb.CheckGroup1.Checked[7]:=true;
end; end;
procedure prepare_apps_panel; procedure prepare_apps_panel;
begin begin
with form_peach do with form_peach do
begin begin
LabelTitleApps1.Caption:=' '+txt_5_6_basic+' '; LabelTitleApps1.Caption:=' '+txt_5_6_basic+' ';
LabelTitleApps2.Caption:=' '+txt_2_6_advanced+' '; LabelTitleApps2.Caption:=' '+txt_2_6_advanced+' ';
activelabel_apps:=LabelTitleApps1; activelabel_apps:=LabelTitleApps1;
clicklabel_apps(LabelTitleApps1,ShapeTitleAppsb1); clicklabel_apps(LabelTitleApps1,ShapeTitleAppsb1);
skipping to change at line 30722 skipping to change at line 30701
if CheckBoxDeleteInput1.State=cbchecked then apdopt:=1 else apdopt:=0; if CheckBoxDeleteInput1.State=cbchecked then apdopt:=1 else apdopt:=0;
//7z //7z
vlevel_7z:=level_7z; vlevel_7z:=level_7z;
vlevel_xz:=level_xz; vlevel_xz:=level_xz;
vlevel_bzip2:=level_bzip2; vlevel_bzip2:=level_bzip2;
vlevel_gz:=level_gz; vlevel_gz:=level_gz;
vlevel_zip:=level_zip; vlevel_zip:=level_zip;
vmethod_7z:=method_7z; vmethod_7z:=method_7z;
vmethod_zip:=method_zip; vmethod_zip:=method_zip;
if fun='BROTLI' then v9b:=ComboboxArchive9.Itemindex else v9b:=level_brotli; if fun='BROTLI' then v9b:=ComboboxArchive9.Itemindex else v9b:=level_brotli;
if (fun=upcase(txt_custom)) and (havewinrar=true) and (userar=1) then v9r:=Combo boxArchive9.Itemindex else v9r:=level_rar; if (fun='CUSTOM') and (havewinrar=true) and (userar=1) then v9r:=ComboboxArchive 9.Itemindex else v9r:=level_rar;
if fun='ZSTD' then v9z:=ComboboxArchive9.Itemindex else v9z:=level_zstd; if fun='ZSTD' then v9z:=ComboboxArchive9.Itemindex else v9z:=level_zstd;
v7z1:=ComboboxArchive4.Itemindex; v7z1:=ComboboxArchive4.Itemindex;
v7z2:=ComboboxArchive3.Itemindex; v7z2:=ComboboxArchive3.Itemindex;
v7z3:=ComboboxArchive5.Itemindex; v7z3:=ComboboxArchive5.Itemindex;
v7z4:=ComboboxArchive6.Itemindex; v7z4:=ComboboxArchive6.Itemindex;
v7z5:=ComboboxArchivePasses.Itemindex; v7z5:=ComboboxArchivePasses.Itemindex;
v7z6:=ComboboxArchiveSolid.Itemindex; v7z6:=ComboboxArchiveSolid.Itemindex;
if CheckboxMQS.State=cbchecked then v7z7b:=1 else v7z7b:=0; if CheckboxMQS.State=cbchecked then v7z7b:=1 else v7z7b:=0;
if CheckboxArchiveOF.State=cbchecked then v7z7:=1 else v7z7:=0; if CheckboxArchiveOF.State=cbchecked then v7z7:=1 else v7z7:=0;
if CheckboxArchive6.State=cbchecked then v7z8:=1 else v7z8:=0; if CheckboxArchive6.State=cbchecked then v7z8:=1 else v7z8:=0;
skipping to change at line 32291 skipping to change at line 32270
if addencext=0 then exit; if addencext=0 then exit;
if checktar=1 then if checktar=1 then
if Form_peach.CheckBoxTarBefore.State=cbChecked then exit; if Form_peach.CheckBoxTarBefore.State=cbChecked then exit;
s0:=extractfilepath(s); s0:=extractfilepath(s);
s1:=extractfilename(s); s1:=extractfilename(s);
cutextension(s1); cutextension(s1);
s2:=extractfileext(s); s2:=extractfileext(s);
if ((Form_peach.cbType.Text=txt_sfx+' '+STR_ARC) or (Form_peach.cbType.Text=txt_ sfx+' '+STR_7Z)) and (FormPW.EditUn7zaPW.Text='') then if ((Form_peach.cbType.Text=txt_sfx+' '+STR_ARC) or (Form_peach.cbType.Text=txt_ sfx+' '+STR_7Z)) and (FormPW.EditUn7zaPW.Text='') then
else else
if (Form_peach.ImagePassword1.Visible=true) and ((FormPW.EditUn7zaPW.Text<>'' ) or (FormPW.EditName3.Text<>'')) then if (Form_peach.ImagePassword1.Visible=true) and ((FormPW.EditUn7zaPW.Text<>'' ) or (FormPW.EditName3.Text<>'')) then
s1:=s1+'.enc'; if pos('.enc',s1)=0 then
s1:=s1+'.enc';
s:=s0+s1+s2; s:=s0+s1+s2;
end; end;
procedure apply_timestamptoname(var s:ansistring; checktar,forceapply:integer; f mode:ansistring); procedure apply_timestamptoname(var s:ansistring; checktar,forceapply:integer; f mode:ansistring);
var var
dt_stamp,s0,s1,s2:ansistring; dt_stamp,s0,s1,s2:ansistring;
begin begin
if checktar=1 then if checktar=1 then
if Form_peach.CheckBoxTarBefore.State=cbChecked then exit; if Form_peach.CheckBoxTarBefore.State=cbChecked then exit;
case tsstyle of case tsstyle of
skipping to change at line 32398 skipping to change at line 32378
begin begin
if fun='ARC' then srec:='-n' if fun='ARC' then srec:='-n'
else else
if FormAdvf.CheckBoxAdvRecurse.State=cbChecked then srec:='-ir0!' if FormAdvf.CheckBoxAdvRecurse.State=cbChecked then srec:='-ir0!'
else srec:='-i!'; else srec:='-i!';
for j:=0 to FormAdvf.MemoAdvInclude.Lines.Count-1 do for j:=0 to FormAdvf.MemoAdvInclude.Lines.Count-1 do
begin begin
if sel='all' then if sel='all' then
begin begin
for i:=1 to Form_peach.StringGrid1.RowCount-1 do for i:=1 to Form_peach.StringGrid1.RowCount-1 do
if Form_peach.StringGrid1.Cells[2,i]=txt_list_isfolder then in_param:=i n_param+' '+delimiter+srec+escapefilename(Form_peach.StringGrid1.Cells[8,i],desk _env)+DirectorySeparator+FormAdvf.MemoAdvInclude.Lines[j]+delimiter+' '; if Form_peach.StringGrid1.Cells[2,i]=txt_list_isfolder then in_param:=i n_param+' '+stringdelim(srec+escapefilename(Form_peach.StringGrid1.Cells[8,i],de sk_env)+DirectorySeparator+FormAdvf.MemoAdvInclude.Lines[j])+' ';
end end
else else
begin begin
i:=strtoint(sel); i:=strtoint(sel);
if Form_peach.StringGrid1.Cells[2,i]=txt_list_isfolder then in_param:=deli miter+srec+escapefilename(Form_peach.StringGrid1.Cells[8,i],desk_env)+DirectoryS eparator+FormAdvf.MemoAdvInclude.Lines[j]+delimiter+' '; if Form_peach.StringGrid1.Cells[2,i]=txt_list_isfolder then in_param:=stri ngdelim(srec+escapefilename(Form_peach.StringGrid1.Cells[8,i],desk_env)+Director ySeparator+FormAdvf.MemoAdvInclude.Lines[j])+' ';
end; end;
end; end;
if sel='all' then if sel='all' then
begin begin
for i:=1 to Form_peach.StringGrid1.RowCount-1 do for i:=1 to Form_peach.StringGrid1.RowCount-1 do
if (Form_peach.StringGrid1.Cells[2,i]<>txt_list_isfolder) then if (Form_peach.StringGrid1.Cells[2,i]<>txt_list_isfolder) then
in_param:=in_param+delimiter+escapefilename(Form_peach.StringGrid1.Cell s[8,i],desk_env)+delimiter+' ' in_param:=in_param+stringdelim(escapefilename(Form_peach.StringGrid1.Ce lls[8,i],desk_env))+' '
else else
if (FormAdvf.MemoAdvInclude.Lines.Count=0) then if (FormAdvf.MemoAdvInclude.Lines.Count=0) then
in_param:=in_param+delimiter+escapefilename(Form_peach.StringGrid1.C ells[8,i],desk_env)+delimiter+' '; in_param:=in_param+stringdelim(escapefilename(Form_peach.StringGrid1 .Cells[8,i],desk_env))+' ';
end end
else else
begin begin
i:=strtoint(sel); i:=strtoint(sel);
if Form_peach.StringGrid1.Cells[2,i]<>txt_list_isfolder then if Form_peach.StringGrid1.Cells[2,i]<>txt_list_isfolder then
in_param:=delimiter+escapefilename(Form_peach.StringGrid1.Cells[8,i],desk_ env)+delimiter+' ' in_param:=stringdelim(escapefilename(Form_peach.StringGrid1.Cells[8,i],des k_env))+' '
else else
if (FormAdvf.MemoAdvInclude.Lines.Count=0) then if (FormAdvf.MemoAdvInclude.Lines.Count=0) then
in_param:=delimiter+escapefilename(Form_peach.StringGrid1.Cells[8,i],de sk_env)+delimiter+' '; in_param:=stringdelim(escapefilename(Form_peach.StringGrid1.Cells[8,i], desk_env))+' ';
end; end;
end; end;
procedure get_in_param(var in_param,sel:ansistring); procedure get_in_param(var in_param,sel:ansistring);
var var
i:integer; i:integer;
begin begin
//inclusion filters seem not reliably working in ARC; when fixed it needs to be implemented also in get_in_param_arc for ARC not full path mode //inclusion filters seem not reliably working in ARC; when fixed it needs to be implemented also in get_in_param_arc for ARC not full path mode
if (FormAdvf.CheckBoxAdvFilters.State=cbChecked) and (fun='7Z') then checkadvf(i n_param,sel) if (FormAdvf.CheckBoxAdvFilters.State=cbChecked) and (fun='7Z') then checkadvf(i n_param,sel)
else else
if sel='all' then if sel='all' then
for i:=1 to Form_peach.StringGrid1.RowCount-1 do in_param:=in_param+delimiter +escapefilename(Form_peach.StringGrid1.Cells[8,i],desk_env)+delimiter+' ' for i:=1 to Form_peach.StringGrid1.RowCount-1 do in_param:=in_param+stringdel im(escapefilename(Form_peach.StringGrid1.Cells[8,i],desk_env))+' '
else else
begin begin
i:=strtoint(sel); i:=strtoint(sel);
in_param:=delimiter+escapefilename(Form_peach.StringGrid1.Cells[8,i],desk_env )+delimiter+' '; in_param:=stringdelim(escapefilename(Form_peach.StringGrid1.Cells[8,i],desk_e nv))+' ';
end; end;
end; end;
procedure get_in_param_zpaq(var in_param,sel:ansistring); procedure get_in_param_zpaq(var in_param,sel:ansistring);
var var
i:integer; i:integer;
begin begin
if sel='all' then if sel='all' then
for i:=1 to Form_peach.StringGrid1.RowCount-1 do for i:=1 to Form_peach.StringGrid1.RowCount-1 do
begin begin
if Form_peach.StringGrid1.Cells[2,i]=txt_list_isfolder then if Form_peach.StringGrid1.Cells[2,i]=txt_list_isfolder then
{$IFDEF MSWINDOWS}in_param:=in_param+delimiter+escapefilename(Form_peach {$IFDEF MSWINDOWS}in_param:=in_param+stringdelim(escapefilename(Form_pea
.StringGrid1.Cells[8,i],desk_env)+DirectorySeparator+'*'+delimiter+' ' ch.StringGrid1.Cells[8,i],desk_env)+DirectorySeparator+'*')+' '
{$ELSE}in_param:=in_param+delimiter+escapefilename(Form_peach.StringGrid {$ELSE}in_param:=in_param+stringdelim(escapefilename(Form_peach.StringGr
1.Cells[8,i],desk_env)+DirectorySeparator+delimiter+' '{$ENDIF} id1.Cells[8,i],desk_env)+DirectorySeparator)+' '{$ENDIF}
else else
in_param:=in_param+delimiter+escapefilename(Form_peach.StringGrid1.Cells [8,i],desk_env)+delimiter+' '; in_param:=in_param+stringdelim(escapefilename(Form_peach.StringGrid1.Cel ls[8,i],desk_env))+' ';
end end
else else
begin begin
i:=strtoint(sel); i:=strtoint(sel);
if Form_peach.StringGrid1.Cells[2,i]=txt_list_isfolder then if Form_peach.StringGrid1.Cells[2,i]=txt_list_isfolder then
{$IFDEF MSWINDOWS}in_param:=delimiter+escapefilename(Form_peach.StringGrid {$IFDEF MSWINDOWS}in_param:=stringdelim(escapefilename(Form_peach.StringGr
1.Cells[8,i],desk_env)+DirectorySeparator+'*'+delimiter+' ' id1.Cells[8,i],desk_env)+DirectorySeparator+'*')+' '
{$ELSE}in_param:=delimiter+escapefilename(Form_peach.StringGrid1.Cells[8,i {$ELSE}in_param:=stringdelim(escapefilename(Form_peach.StringGrid1.Cells[8
],desk_env)+DirectorySeparator+delimiter+' '{$ENDIF} ,i],desk_env)+DirectorySeparator)+' '{$ENDIF}
else else
in_param:=delimiter+escapefilename(Form_peach.StringGrid1.Cells[8,i],desk_ env)+delimiter+' '; in_param:=stringdelim(escapefilename(Form_peach.StringGrid1.Cells[8,i],des k_env))+' ';
end; end;
end; end;
procedure setspecialtsize; procedure setspecialtsize;
begin begin
if Form_peach.CheckBoxSeparate.State=cbChecked then if Form_peach.CheckBoxSeparate.State=cbChecked then
try try
tsize:=strtoqword(Form_peach.StringGrid1.Cells[3,Form_peach.StringGrid1.Row]) ; tsize:=strtoqword(Form_peach.StringGrid1.Cells[3,Form_peach.StringGrid1.Row]) ;
except except
end; end;
end; end;
procedure get_in_param_arc(var in_param,sel:ansistring); procedure get_in_param_arc(var in_param,sel:ansistring);
var var
i:integer; i:integer;
ipath,iname:ansistring; ipath,iname:ansistring;
begin begin
ipath:=form_peach.editname3.Caption; ipath:=form_peach.editname3.Caption;
if ipath<>'' then if ipath<>'' then
if ipath[length(ipath)]=directoryseparator then setlength(ipath,length(ipath) -1);//ARC error if relative path ends with directory separator if ipath[length(ipath)]=directoryseparator then setlength(ipath,length(ipath) -1);//ARC error if relative path ends with directory separator
in_param:=delimiter+'-dp'+ipath+delimiter+' '; in_param:=stringdelim('-dp'+ipath)+' ';
ipath:=ipath+directoryseparator; ipath:=ipath+directoryseparator;
if sel='all' then if sel='all' then
for i:=1 to Form_peach.StringGrid1.RowCount-1 do for i:=1 to Form_peach.StringGrid1.RowCount-1 do
begin begin
iname:=extractrelativepath(ipath,extractfilepath(Form_peach.StringGrid1.Ce lls[8,i]))+extractfilename(Form_peach.StringGrid1.Cells[8,i]); iname:=extractrelativepath(ipath,extractfilepath(Form_peach.StringGrid1.Ce lls[8,i]))+extractfilename(Form_peach.StringGrid1.Cells[8,i]);
in_param:=in_param+delimiter+escapefilename(iname,desk_env)+delimiter+' '; in_param:=in_param+stringdelim(escapefilename(iname,desk_env))+' ';
end end
else else
begin begin
i:=strtoint(sel); i:=strtoint(sel);
iname:=extractrelativepath(ipath,extractfilepath(Form_peach.StringGrid1.Cells [8,i]))+extractfilename(Form_peach.StringGrid1.Cells[8,i]); iname:=extractrelativepath(ipath,extractfilepath(Form_peach.StringGrid1.Cells [8,i]))+extractfilename(Form_peach.StringGrid1.Cells[8,i]);
in_param:=in_param+delimiter+escapefilename(iname,desk_env)+delimiter+' '; in_param:=in_param+stringdelim(escapefilename(iname,desk_env))+' ';
end; end;
end; end;
procedure getarch_baseoutname(var s:ansistring); procedure getarch_baseoutname(var s:ansistring);
begin begin
if Form_peach.CheckBoxSameArc.State=cbChecked then if Form_peach.CheckBoxSameArc.State=cbChecked then
begin begin
s:=Form_peach.StringGrid1.Cells[8,Form_peach.StringGrid1.Row]; s:=Form_peach.StringGrid1.Cells[8,Form_peach.StringGrid1.Row];
cutextension(s); cutextension(s);
if length(s)>2 then if length(s)>2 then
skipping to change at line 32577 skipping to change at line 32557
begin begin
pw:=FormPW.EditUn7zapw.Text; pw:=FormPW.EditUn7zapw.Text;
if (disable_twofactor=false) and (FormPW.EditName3.Text<>'') then if (disable_twofactor=false) and (FormPW.EditName3.Text<>'') then
if prepend_keyfile(pw,FormPW.EditName3.Text)<>0 then if prepend_keyfile(pw,FormPW.EditName3.Text)<>0 then
begin begin
pMessageErrorOK(FormPW.EditName3.Text+' '+txt_keyfile_not_found); pMessageErrorOK(FormPW.EditName3.Text+' '+txt_keyfile_not_found);
exit; exit;
end; end;
if pw4cl(pw_option,pw)<>0 then if pw4cl(pw_option,pw)<>0 then
begin begin
msg_pw_errorchar; msg_pw_errorchar(pw);
pforceconsole:=1; pforceconsole:=1;
pw:=pw_option; pw:=pw_option;
//exit; //exit;
end; end;
end; end;
//encryption algorithm //encryption algorithm
if Form_peach.ComboBoxARCalgo.Visible=true then if Form_peach.ComboBoxARCalgo.Visible=true then
case Form_peach.ComboBoxARCalgo.Itemindex of case Form_peach.ComboBoxARCalgo.Itemindex of
0: encalgo:='-ae=aes'; 0: encalgo:='-ae=aes';
1: encalgo:='-ae=serpent'; 1: encalgo:='-ae=serpent';
2: encalgo:='-ae=twofish'; 2: encalgo:='-ae=twofish';
3: encalgo:='-ae=blowfish'; 3: encalgo:='-ae=blowfish';
end; end;
//arc uses -- as tag to distinguish a filename starting with - from a switch, ho wever since PeaZip uses absolute filenames it should never occur and filenames a re not checked for that condition //arc uses -- as tag to distinguish a filename starting with - from a switch, ho wever since PeaZip uses absolute filenames it should never occur and filenames a re not checked for that condition
outname:=out_param; outname:=out_param;
out_param:=delimiter+escapefilename(out_param,desk_env)+delimiter; out_param:=stringdelim(checkescapedoutname(escapefilename(out_param,desk_env)));
{$IFDEF MSWINDOWS} {$IFDEF MSWINDOWS}
if arcabspath=1 then get_in_param(in_param,sel) if arcabspath=1 then get_in_param(in_param,sel)
else get_in_param_arc(in_param,sel); else get_in_param_arc(in_param,sel);
{$ELSE} {$ELSE}
if arcabspath=1 then get_in_param(in_param,sel) if arcabspath=1 then get_in_param(in_param,sel)
else get_in_param_arc(in_param,sel); else get_in_param_arc(in_param,sel);
//with older versions of the compiler absolute path option in arc 0.666 was not working consistently in Linux due to parsing errors when the parameters are pass ed in a process //with older versions of the compiler absolute path option in arc 0.666 was not working consistently in Linux due to parsing errors when the parameters are pass ed in a process
{$ENDIF} {$ENDIF}
exclude_param:=''; exclude_param:='';
include_param:=''; include_param:='';
if FormAdvf.CheckBoxAdvFilters.State=cbChecked then if FormAdvf.CheckBoxAdvFilters.State=cbChecked then
begin begin
for i:=0 to FormAdvf.MemoAdvExclude.Lines.Count-1 do for i:=0 to FormAdvf.MemoAdvExclude.Lines.Count-1 do
begin begin
exclude_param:=exclude_param+' '+delimiter+'-x'+FormAdvf.MemoAdvExclude.Li nes[i]+delimiter+' '; exclude_param:=exclude_param+' '+stringdelim('-x'+FormAdvf.MemoAdvExclude. Lines[i])+' ';
end; end;
for i:=0 to FormAdvf.MemoAdvIncludeAlso.Lines.Count-1 do for i:=0 to FormAdvf.MemoAdvIncludeAlso.Lines.Count-1 do
if extractfilepath(FormAdvf.MemoAdvIncludeAlso.Lines[i])<>'' then if extractfilepath(FormAdvf.MemoAdvIncludeAlso.Lines[i])<>'' then
begin begin
include_param:=include_param+' '+delimiter+'-n'+FormAdvf.MemoAdvInclude Also.Lines[i]+delimiter+' '; include_param:=include_param+' '+stringdelim('-n'+FormAdvf.MemoAdvInclu deAlso.Lines[i])+' ';
end; end;
end; end;
bin_name:=delimiter+escapefilename(executable_path,desk_env)+'res'+DirectorySepa rator+'arc'+DirectorySeparator+'arc'+EXEEXT+delimiter; bin_name:=stringdelim(escapefilename(executable_path,desk_env)+'res'+DirectorySe parator+'arc'+DirectorySeparator+'arc'+EXEEXT);
cl:=bin_name+' '+archive_function+' '+compression_level; cl:=bin_name+' '+archive_function+' '+compression_level;
if solid_option<>'' then cl:=cl+' '+solid_option; if solid_option<>'' then cl:=cl+' '+solid_option;
if recovery_option<>'' then cl:=cl+' '+recovery_option; if recovery_option<>'' then cl:=cl+' '+recovery_option;
if sfx_option<>'' then cl:=cl+' '+sfx_option; if sfx_option<>'' then cl:=cl+' '+sfx_option;
if pforceconsole=0 then if zaout=2 then if (pw='-p') or (pw=delimiter+'-p'+delim iter) or (pw='-hp') or (pw=delimiter+'-hp'+delimiter) then pw:='';//never pass e mpty password to pipe mode if pforceconsole=0 then if zaout=2 then if (pw='-p') or (pw=stringdelim('-p')) o r (pw='-hp') or (pw=stringdelim('-hp')) then pw:='';//never pass empty password to pipe mode
if pw<>'' then cl:=cl+' '+pw; if pw<>'' then cl:=cl+' '+pw;
if encalgo<>'' then cl:=cl+' '+encalgo; if encalgo<>'' then cl:=cl+' '+encalgo;
if Form_peach.EditOParc.Text<>'' then cl:=cl+' '+Form_peach.EditOParc.Text; if Form_peach.EditOParc.Text<>'' then cl:=cl+' '+Form_peach.EditOParc.Text;
cl:=cl+' '+out_param+' '+in_param+' '+exclude_param;//+' '+include_param; cl:=cl+' '+out_param+' '+in_param+' '+exclude_param;//+' '+include_param;
jobcode:=formatdatetime('yyyymmdd_hh.nn.ss.ms_',now)+fun; jobcode:=formatdatetime('yyyymmdd_hh.nn.ss.ms_',now)+fun;
compose_arc_cl:=0; compose_arc_cl:=0;
end; end;
procedure set_outpath_preview(var out_param:ansistring); procedure set_outpath_preview(var out_param:ansistring);
var var
skipping to change at line 32962 skipping to change at line 32942
end end
else //check path to avoid extraction in peazip's temporary path, switch out of first temporary level (by default archive's path) else //check path to avoid extraction in peazip's temporary path, switch out of first temporary level (by default archive's path)
begin begin
if (mode='ext') or (mode='extandrun') or (mode='draganddrop') or ((mode='neut ral') and (Form_peach.RadioGroupActionARC.ItemIndex<2)) then if (mode='ext') or (mode='extandrun') or (mode='draganddrop') or ((mode='neut ral') and (Form_peach.RadioGroupActionARC.ItemIndex<2)) then
if control_outpath(out_param)<>0 then exit; if control_outpath(out_param)<>0 then exit;
end; end;
if out_param<>'' then if out_param<>'' then
if out_param[length(out_param)]<>directoryseparator then out_param:=out_param +directoryseparator; //needed for set_output_folder, removed later as arc doesn' t want directoryseparator as last character if out_param[length(out_param)]<>directoryseparator then out_param:=out_param +directoryseparator; //needed for set_output_folder, removed later as arc doesn' t want directoryseparator as last character
//in_param //in_param
if Form_peach.labelstatus2.Caption= txt_2_7_ext then if Form_peach.labelstatus2.Caption= txt_2_7_ext then
in_param:=delimiter+escapefilename(Form_peach.StringGrid2.Cells[8,Form_peach. StringGrid2.Row],desk_env)+delimiter in_param:=stringdelim(escapefilename(Form_peach.StringGrid2.Cells[8,Form_peac h.StringGrid2.Row],desk_env))
else else
in_param:=delimiter+escapefilename(Form_peach.EditOpenIn.Text,desk_env)+delim iter; in_param:=stringdelim(escapefilename(Form_peach.EditOpenIn.Text,desk_env));
//folder policy //folder policy
if mode<>'delete' then if mode<>'delete' then
if mode<>'draganddrop' then set_output_folder(out_param,in_param,real_extract ,Form_peach.RadioGroupActionARC.ItemIndex); if mode<>'draganddrop' then set_output_folder(out_param,in_param,real_extract ,Form_peach.RadioGroupActionARC.ItemIndex);
if out_param<>'' then if out_param<>'' then
if out_param[length(out_param)]=directoryseparator then setlength(out_param,l ength(out_param)-1); //arc doesn't want directoryseparator as last character if out_param[length(out_param)]=directoryseparator then setlength(out_param,l ength(out_param)-1); //arc doesn't want directoryseparator as last character
//overwrite policy //overwrite policy
case Form_peach.ComboBoxOverwriteARC.ItemIndex of case Form_peach.ComboBoxOverwriteARC.ItemIndex of
0: begin overwrite_policy:='-op'; if zaout=2 then zaout:=1; end;//ask auto sw itch to GUI+console mode if needed 0: begin overwrite_policy:='-op'; if zaout=2 then zaout:=1; end;//ask auto sw itch to GUI+console mode if needed
1: overwrite_policy:='-o+';//overwrite 1: overwrite_policy:='-o+';//overwrite
2: overwrite_policy:='-o-';//skip 2: overwrite_policy:='-o-';//skip
skipping to change at line 32989 skipping to change at line 32969
if prepend_keyfile(pw,FormPW.EditName3.Text)<>0 then if prepend_keyfile(pw,FormPW.EditName3.Text)<>0 then
begin begin
pMessageErrorOK(FormPW.EditName3.Text+' '+txt_keyfile_not_found); pMessageErrorOK(FormPW.EditName3.Text+' '+txt_keyfile_not_found);
exit; exit;
end; end;
pforceconsole:=0; pforceconsole:=0;
if pw<>'' then if pw<>'' then
begin begin
if pw4cl('-p',pw)<>0 then if pw4cl('-p',pw)<>0 then
begin begin
msg_pw_errorchar; msg_pw_errorchar(pw);
pforceconsole:=1; pforceconsole:=1;
pw:=''; pw:='';
//exit; //exit;
end; end;
end end
else if zaout>0 then pw:='-pdefault'; //workaround: pw is never left blank in pi pe mode; if archive is not encrypted the pw will not be checked by 7za, otherwis e the archive will not open but will not hang the application in pipe mode that is waiting for input else if zaout>0 then pw:='-pdefault'; //workaround: pw is never left blank in pi pe mode; if archive is not encrypted the pw will not be checked by 7za, otherwis e the archive will not open but will not hang the application in pipe mode that is waiting for input
//archive function //archive function
case mode of case mode of
'neutral' : 'neutral' :
case Form_peach.RadioGroupActionARC.ItemIndex of case Form_peach.RadioGroupActionARC.ItemIndex of
skipping to change at line 33106 skipping to change at line 33086
tempstring:=Form_peach.StringGridList.Cells[8,Form_peach.StringGridList.Row]; tempstring:=Form_peach.StringGridList.Cells[8,Form_peach.StringGridList.Row];
{$IFDEF MSWINDOWS}tempstring:=StringReplace(tempstring,':','_', [rfReplaceAll ]);{$ENDIF} {$IFDEF MSWINDOWS}tempstring:=StringReplace(tempstring,':','_', [rfReplaceAll ]);{$ENDIF}
overwrite_policy:='-o+'; overwrite_policy:='-o+';
end; end;
if (archive_function<>'x') and (archive_function<>'e') then //clear overwrite po licies for non extraction modes if (archive_function<>'x') and (archive_function<>'e') then //clear overwrite po licies for non extraction modes
begin begin
overwrite_policy:=''; overwrite_policy:='';
out_param:=''; out_param:='';
end; end;
//end archive function attribution //end archive function attribution
if out_param<>'' then out_param:=delimiter+'-dp'+escapefilename(out_param,desk_e if out_param<>'' then out_param:=stringdelim('-dp'+escapefilename(out_param,desk
nv)+delimiter; _env));
bin_name:=delimiter+escapefilename(executable_path,desk_env)+'res'+DirectorySepa bin_name:=stringdelim(escapefilename(executable_path,desk_env)+'res'+DirectorySe
rator+'arc'+DirectorySeparator+'arc'+EXEEXT+delimiter; parator+'arc'+DirectorySeparator+'arc'+EXEEXT);
cl:=bin_name+' '+archive_function; cl:=bin_name+' '+archive_function;
if overwrite_policy<>'' then cl:=cl+' '+overwrite_policy; if overwrite_policy<>'' then cl:=cl+' '+overwrite_policy;
cl:=cl+' '+in_param; cl:=cl+' '+in_param;
if pw<>'' then cl:=cl+' '+pw; if pw<>'' then cl:=cl+' '+pw;
if out_param<>'' then cl:=cl+' '+out_param; if out_param<>'' then cl:=cl+' '+out_param;
//filter(s) //filter(s)
if selection='all' then //apply only advanced filter(s), if used if selection='all' then //apply only advanced filter(s), if used
if FormAdvf.CheckBoxAdvFilters.State=cbChecked then adv_filters(cl); if FormAdvf.CheckBoxAdvFilters.State=cbChecked then adv_filters(cl);
if selection='displayed' then //apply advanced filters, if used, or basic filter s (but without excludes, in order to extract also all nested objects) if selection='displayed' then //apply advanced filters, if used, or basic filter s (but without excludes, in order to extract also all nested objects)
if FormAdvf.CheckBoxAdvFilters.State=cbChecked then adv_filters(cl) if FormAdvf.CheckBoxAdvFilters.State=cbChecked then adv_filters(cl)
else else
if Form_peach.EditUn7zaFilter.Text<>'' then if Form_peach.EditUn7zaFilter.Text<>'' then
begin begin
if Form_peach.cbUn7zaRecursive.State=cbChecked then cl:=cl+' -r'; if Form_peach.cbUn7zaRecursive.State=cbChecked then cl:=cl+' -r';
filter1:=Form_peach.EditUn7zaFilter.Text; filter1:=Form_peach.EditUn7zaFilter.Text;
//if copy(filter1,1,1)='.' then filter1:='*'+copy(filter1,2,length(filt er1)-1); //if copy(filter1,1,1)='.' then filter1:='*'+copy(filter1,2,length(filt er1)-1);
cl:=cl+' -- '+delimiter+escapefilename(filter1,desk_env)+delimiter; cl:=cl+' -- '+stringdelim(escapefilename(filter1,desk_env));
end; end;
if selection='selected' then //extract object in the range of selection if selection='selected' then //extract object in the range of selection
begin begin
cl:=cl+' --'; cl:=cl+' --';
checksel:=false; checksel:=false;
{$IFDEF MSWINDOWS}if Form_peach.PanelOpen.Visible=true{$ELSE}if Form_peach.Pa nelOpen.top=0{$ENDIF} then {$IFDEF MSWINDOWS}if Form_peach.PanelOpen.Visible=true{$ELSE}if Form_peach.Pa nelOpen.top=0{$ENDIF} then
begin begin
for i:=1 to Form_peach.StringGridList.RowCount-1 do for i:=1 to Form_peach.StringGridList.RowCount-1 do
if Form_peach.StringGridList.Cells[12,i]='1' then if Form_peach.StringGridList.Cells[12,i]='1' then
begin begin
if checkfiledirname(Form_peach.StringGridList.Cells[8,i])<>0 then begin pMessageWarningOK(txt_2_7_validatefn+' '+Form_peach.StringGridList.Cells[8,i]); exit; end; if checkfiledirname(Form_peach.StringGridList.Cells[8,i])<>0 then begin pMessageWarningOK(txt_2_7_validatefn+' '+Form_peach.StringGridList.Cells[8,i]); exit; end;
filter1:=Form_peach.StringGridList.Cells[8,i]; filter1:=Form_peach.StringGridList.Cells[8,i];
//if copy(filter1,1,1)='.' then filter1:='*'+copy(filter1,2,length(filt er1)-1); //if copy(filter1,1,1)='.' then filter1:='*'+copy(filter1,2,length(filt er1)-1);
cl:=cl+' '+delimiter+escapefilename(filter1,desk_env)+delimiter; cl:=cl+' '+stringdelim(escapefilename(filter1,desk_env));
checksel:=true; checksel:=true;
end; end;
end end
else else
for i:=1 to Form_peach.StringGrid2.RowCount-1 do for i:=1 to Form_peach.StringGrid2.RowCount-1 do
begin begin
if checkfiledirname(Form_peach.StringGrid2.Cells[8,i])<>0 then begin pMess ageWarningOK(txt_2_7_validatefn+' '+Form_peach.StringGrid2.Cells[8,i]); exit; en d; if checkfiledirname(Form_peach.StringGrid2.Cells[8,i])<>0 then begin pMess ageWarningOK(txt_2_7_validatefn+' '+Form_peach.StringGrid2.Cells[8,i]); exit; en d;
filter1:=Form_peach.StringGrid2.Cells[8,i]; filter1:=Form_peach.StringGrid2.Cells[8,i];
//if copy(filter1,1,1)='.' then filter1:='*'+copy(filter1,2,length(filter1 )-1); //if copy(filter1,1,1)='.' then filter1:='*'+copy(filter1,2,length(filter1 )-1);
cl:=cl+' '+delimiter+escapefilename(filter1,desk_env)+delimiter; cl:=cl+' '+stringdelim(escapefilename(filter1,desk_env));
checksel:=true; checksel:=true;
end; end;
if checksel=false then exit; if checksel=false then exit;
end; end;
if ((mode='extandrun') or (mode='preview')) and (selection='single') then //extr act a single object if ((mode='extandrun') or (mode='preview')) and (selection='single') then //extr act a single object
begin begin
if checkfiledirname(Form_peach.StringGridList.Cells[8,Form_peach.StringGridLi st.Row])<>0 then begin pMessageWarningOK(txt_2_7_validatefn+' '+Form_peach.Strin gGridList.Cells[8,Form_peach.StringGridList.Row]); exit; end; if checkfiledirname(Form_peach.StringGridList.Cells[8,Form_peach.StringGridLi st.Row])<>0 then begin pMessageWarningOK(txt_2_7_validatefn+' '+Form_peach.Strin gGridList.Cells[8,Form_peach.StringGridList.Row]); exit; end;
filter1:=Form_peach.StringGridList.Cells[8,Form_peach.StringGridList.Row]; filter1:=Form_peach.StringGridList.Cells[8,Form_peach.StringGridList.Row];
//if copy(filter1,1,1)='.' then filter1:='*'+copy(filter1,2,length(filter1)-1 ); //if copy(filter1,1,1)='.' then filter1:='*'+copy(filter1,2,length(filter1)-1 );
cl:=cl+' -- '+delimiter+escapefilename(filter1,desk_env)+delimiter; cl:=cl+' -- '+stringdelim(escapefilename(filter1,desk_env));
end; end;
jobcode:=formatdatetime('yyyymmdd_hh.nn.ss.ms_',now)+fun; jobcode:=formatdatetime('yyyymmdd_hh.nn.ss.ms_',now)+fun;
compose_unarc_cl:=0; compose_unarc_cl:=0;
end; end;
procedure getworkpath(var work_path:ansistring; out_param:ansistring); procedure getworkpath(var work_path:ansistring; out_param:ansistring);
begin begin
work_path:=''; work_path:='';
case work_dir of case work_dir of
0: work_path:=delimiter+'-w'+escapefilename(extractfilepath(out_param),desk_e 0: work_path:=stringdelim('-w'+escapefilename(extractfilepath(out_param),desk
nv)+delimiter; //output _env)); //output
1: work_path:=delimiter+'-w'+escapefilename(extractfilepath(out_param),desk_e 1: work_path:=stringdelim('-w'+escapefilename(extractfilepath(out_param),desk
nv)+delimiter; //output, preview in temp _env)); //output, preview in temp
2: work_path:='-w'; //let 7z determinating appropriated temp folder for all a ctions 2: work_path:='-w'; //let 7z determinating appropriated temp folder for all a ctions
3: work_path:=delimiter+'-w'+escapefilename(custom_work_path,desk_env)+delimi ter; //custom for all actions 3: work_path:=stringdelim('-w'+escapefilename(custom_work_path,desk_env)); // custom for all actions
//4: none, preview in temp //4: none, preview in temp
//5: none for all actions (can't perform preview) //5: none for all actions (can't perform preview)
end; end;
end; end;
function compose_custom_cl(var cl,jobcode,outname,sel:ansistring):integer; function compose_custom_cl(var cl,jobcode,outname,sel:ansistring):integer;
var var
s,out_param,in_param,param_param,bin_name,ext_param,pw_option,pw,archive_func tion,work_path:ansistring; s,out_param,in_param,param_param,bin_name,ext_param,pw_option,pw,archive_func tion,work_path:ansistring;
i:integer; i:integer;
vol_size:qword; vol_size:qword;
skipping to change at line 33206 skipping to change at line 33186
//check if input is suitable for chosen archive_type //check if input is suitable for chosen archive_type
if check_input<>0 then exit; if check_input<>0 then exit;
ext_param:=Form_peach.EditExtCustom.Text; ext_param:=Form_peach.EditExtCustom.Text;
//output name //output name
getarch_baseoutname(s); getarch_baseoutname(s);
if specialmoderar<>1 then out_param:=s+'.'+ext_param else out_param:=s; if specialmoderar<>1 then out_param:=s+'.'+ext_param else out_param:=s;
specialmoderar:=0; specialmoderar:=0;
apply_timestamptoname(out_param,1,0,'file'); apply_timestamptoname(out_param,1,0,'file');
outname:=out_param; outname:=out_param;
getworkpath(work_path,out_param); getworkpath(work_path,out_param);
bin_name:=delimiter+escapefilename(Form_peach.EditnameCustom.Text,desk_env)+deli miter; bin_name:=stringdelim(escapefilename(Form_peach.EditnameCustom.Text,desk_env));
//RAR parameters begin //RAR parameters begin
if (havewinrar=true) and (userar=1) then if (havewinrar=true) and (userar=1) then
begin begin
case Form_peach.ComboBoxArchiveAct.ItemIndex of case Form_peach.ComboBoxArchiveAct.ItemIndex of
0: begin 0: begin
archive_function:='a'; archive_function:='a';
if Form_peach.ComboBoxArchive1.ItemIndex=0 then get_new_archive_name(out_p aram)//single archive if Form_peach.ComboBoxArchive1.ItemIndex=0 then get_new_archive_name(out_p aram)//single archive
else //multi volume archive else //multi volume archive
begin begin
if (fileexists(out_param+'.001') or fileexists(out_param) or directorye xists(out_param+'.001') or directoryexists(out_param)) then if (fileexists(out_param+'.001') or fileexists(out_param) or directorye xists(out_param+'.001') or directoryexists(out_param)) then
skipping to change at line 33264 skipping to change at line 33244
begin begin
pw:=FormPW.EditUn7zaPW.Text; pw:=FormPW.EditUn7zaPW.Text;
if (disable_twofactor=false) and (FormPW.EditName3.Text<>'') then if (disable_twofactor=false) and (FormPW.EditName3.Text<>'') then
if prepend_keyfile(pw,FormPW.EditName3.Text)<>0 then if prepend_keyfile(pw,FormPW.EditName3.Text)<>0 then
begin begin
pMessageErrorOK(FormPW.EditName3.Text+' '+txt_keyfile_not_found); pMessageErrorOK(FormPW.EditName3.Text+' '+txt_keyfile_not_found);
exit; exit;
end; end;
if pw4cl(pw_option,pw)<>0 then if pw4cl(pw_option,pw)<>0 then
begin begin
msg_pw_errorchar; msg_pw_errorchar(pw);
pforceconsole:=1; pforceconsole:=1;
pw:=pw_option; pw:=pw_option;
//exit; //exit;
end; end;
end; end;
if pw<>'' then Form_peach.EditOPcustom.Caption:=Form_peach.EditOPcustom.Capti on+' '+pw; if pw<>'' then Form_peach.EditOPcustom.Caption:=Form_peach.EditOPcustom.Capti on+' '+pw;
//rar split //rar split
case Form_peach.ComboBoxArchive1.ItemIndex of case Form_peach.ComboBoxArchive1.ItemIndex of
0: vol_size:=0; //will trigger to not use -v(size) switch 0: vol_size:=0; //will trigger to not use -v(size) switch
1: begin 1: begin
skipping to change at line 33323 skipping to change at line 33303
if Form_peach.cbRARsaveopen.Checked=true then Form_peach.EditOPcustom.Caption :=Form_peach.EditOPcustom.Caption+' -dh'; if Form_peach.cbRARsaveopen.Checked=true then Form_peach.EditOPcustom.Caption :=Form_peach.EditOPcustom.Caption+' -dh';
if Form_peach.cbRARsavesecurity.Checked=true then Form_peach.EditOPcustom.Cap tion:=Form_peach.EditOPcustom.Caption+' -ow'; if Form_peach.cbRARsavesecurity.Checked=true then Form_peach.EditOPcustom.Cap tion:=Form_peach.EditOPcustom.Caption+' -ow';
if Form_peach.cbRARsavestreams.Checked=true then Form_peach.EditOPcustom.Capt ion:=Form_peach.EditOPcustom.Caption+' -os'; if Form_peach.cbRARsavestreams.Checked=true then Form_peach.EditOPcustom.Capt ion:=Form_peach.EditOPcustom.Caption+' -os';
case Form_peach.cbRARlastmodtime.ItemIndex of case Form_peach.cbRARlastmodtime.ItemIndex of
1: Form_peach.EditOPcustom.Caption:=Form_peach.EditOPcustom.Caption+' -tk' ; 1: Form_peach.EditOPcustom.Caption:=Form_peach.EditOPcustom.Caption+' -tk' ;
2: Form_peach.EditOPcustom.Caption:=Form_peach.EditOPcustom.Caption+' -tl' ; 2: Form_peach.EditOPcustom.Caption:=Form_peach.EditOPcustom.Caption+' -tl' ;
end; end;
if Form_peach.cbRARlock.Checked=true then Form_peach.EditOPcustom.Caption:=Fo rm_peach.EditOPcustom.Caption+' -k'; if Form_peach.cbRARlock.Checked=true then Form_peach.EditOPcustom.Caption:=Fo rm_peach.EditOPcustom.Caption+' -k';
end; end;
//RAR rar parameters end //RAR rar parameters end
out_param:=delimiter+escapefilename(out_param,desk_env)+delimiter; out_param:=stringdelim(checkescapedoutname(escapefilename(out_param,desk_env)));
get_in_param(in_param,sel); get_in_param(in_param,sel);
if length(in_param)>2 then if length(in_param)>2 then
if (in_param[length(in_param)-1]='*') or (in_param[length(in_param)-2]='*') t hen if (in_param[length(in_param)-1]='*') or (in_param[length(in_param)-2]='*') t hen
Form_peach.EditOPcustom.Caption:=Form_peach.EditOPcustom.Caption+' -r'; Form_peach.EditOPcustom.Caption:=Form_peach.EditOPcustom.Caption+' -r';
param_param:=Form_peach.EditOPCustom.Caption; param_param:=Form_peach.EditOPCustom.Caption;
if (havewinrar=true) and (userar=1) then if (havewinrar=true) and (userar=1) then
cl:=bin_name+' '+param_param+' -- '+out_param+' '+in_param //fixed syntax sty le for Rar.exe cl:=bin_name+' '+param_param+' -- '+out_param+' '+in_param //fixed syntax sty le for Rar.exe
else else
case Form_peach.ComboBoxArchiveCustom.ItemIndex of case Form_peach.ComboBoxArchiveCustom.ItemIndex of
0: cl:=bin_name+' '+param_param+' '+in_param+' '+out_param; 0: cl:=bin_name+' '+param_param+' '+in_param+' '+out_param;
skipping to change at line 33356 skipping to change at line 33336
filter1,out_param,in_param,param_param,bin_name,ext_param,pw_option,pw,archiv e_function,work_path:ansistring; filter1,out_param,in_param,param_param,bin_name,ext_param,pw_option,pw,archiv e_function,work_path:ansistring;
i:integer; i:integer;
begin begin
compose_rarspecfun_cl:=-1; compose_rarspecfun_cl:=-1;
if (havewinrar<>true) or (userar<>1) then exit; if (havewinrar<>true) or (userar<>1) then exit;
ext_param:='rar'; ext_param:='rar';
//output name //output name
out_param:=Form_peach.EditOpenIn.Text; out_param:=Form_peach.EditOpenIn.Text;
outname:=out_param; outname:=out_param;
getworkpath(work_path,out_param); getworkpath(work_path,out_param);
bin_name:=delimiter+escapefilename(Form_peach.EditnameCustom.Text,desk_env)+deli miter; bin_name:=stringdelim(escapefilename(Form_peach.EditnameCustom.Text,desk_env));
archive_function:=specfun; archive_function:=specfun;
Form_peach.EditOPcustom.Caption:=archive_function; Form_peach.EditOPcustom.Caption:=archive_function;
if archive_function='r' then Form_peach.EditOPcustom.Caption:=Form_peach.EditOPc ustom.Caption+' -y'; if archive_function='r' then Form_peach.EditOPcustom.Caption:=Form_peach.EditOPc ustom.Caption+' -y';
case Form_peach.cbRARlastmodtime.ItemIndex of case Form_peach.cbRARlastmodtime.ItemIndex of
1: Form_peach.EditOPcustom.Caption:=Form_peach.EditOPcustom.Caption+' -tk'; 1: Form_peach.EditOPcustom.Caption:=Form_peach.EditOPcustom.Caption+' -tk';
2: Form_peach.EditOPcustom.Caption:=Form_peach.EditOPcustom.Caption+' -tl'; 2: Form_peach.EditOPcustom.Caption:=Form_peach.EditOPcustom.Caption+' -tl';
end; end;
//encryption //encryption
if (FormPW.EditUn7zaPW.Text<>'') or (FormPW.EditName3.Text<>'') then if (FormPW.EditUn7zaPW.Text<>'') or (FormPW.EditName3.Text<>'') then
if FormPW.CheckBoxEncFn.State=cbChecked then pw_option:='-hp' if FormPW.CheckBoxEncFn.State=cbChecked then pw_option:='-hp'
skipping to change at line 33381 skipping to change at line 33361
begin begin
pw:=FormPW.EditUn7zaPW.Text; pw:=FormPW.EditUn7zaPW.Text;
if (disable_twofactor=false) and (FormPW.EditName3.Text<>'') then if (disable_twofactor=false) and (FormPW.EditName3.Text<>'') then
if prepend_keyfile(pw,FormPW.EditName3.Text)<>0 then if prepend_keyfile(pw,FormPW.EditName3.Text)<>0 then
begin begin
pMessageErrorOK(FormPW.EditName3.Text+' '+txt_keyfile_not_found); pMessageErrorOK(FormPW.EditName3.Text+' '+txt_keyfile_not_found);
exit; exit;
end; end;
if pw4cl(pw_option,pw)<>0 then if pw4cl(pw_option,pw)<>0 then
begin begin
msg_pw_errorchar; msg_pw_errorchar(pw);
exit; exit;
end; end;
end; end;
if pw<>'' then Form_peach.EditOPcustom.Caption:=Form_peach.EditOPcustom.Caption+ ' '+pw; if pw<>'' then Form_peach.EditOPcustom.Caption:=Form_peach.EditOPcustom.Caption+ ' '+pw;
//peazip's work path //peazip's work path
if work_path<>'' then Form_peach.EditOPcustom.Caption:=Form_peach.EditOPcustom.C aption+' '+work_path; if work_path<>'' then Form_peach.EditOPcustom.Caption:=Form_peach.EditOPcustom.C aption+' '+work_path;
out_param:=delimiter+escapefilename(out_param,desk_env)+delimiter; out_param:=stringdelim(checkescapedoutname(escapefilename(out_param,desk_env)));
param_param:=Form_peach.EditOPCustom.Caption; param_param:=Form_peach.EditOPCustom.Caption;
cl:=bin_name+' '+param_param+' -- '+out_param; cl:=bin_name+' '+param_param+' -- '+out_param;
if archive_function='r' then cl:=cl+' '+delimiter+escapefilename(extractfilepath (Form_peach.EditOpenIn.Text),desk_env)+delimiter; if archive_function='r' then cl:=cl+' '+stringdelim(escapefilename(extractfilepa th(Form_peach.EditOpenIn.Text),desk_env));
if archive_function='d' then if archive_function='d' then
{$IFDEF MSWINDOWS}if Form_peach.PanelOpen.Visible=true{$ELSE}if Form_peach.Panel Open.top=0{$ENDIF} then {$IFDEF MSWINDOWS}if Form_peach.PanelOpen.Visible=true{$ELSE}if Form_peach.Panel Open.top=0{$ENDIF} then
for i:=1 to Form_peach.StringGridList.RowCount-1 do for i:=1 to Form_peach.StringGridList.RowCount-1 do
if Form_peach.StringGridList.Cells[12,i]='1' then if Form_peach.StringGridList.Cells[12,i]='1' then
begin begin
if checkfiledirname(Form_peach.StringGridList.Cells[8,i])<>0 then begin pMessageWarningOK(txt_2_7_validatefn+' '+Form_peach.StringGridList.Cells[8,i]); exit; end; if checkfiledirname(Form_peach.StringGridList.Cells[8,i])<>0 then begin pMessageWarningOK(txt_2_7_validatefn+' '+Form_peach.StringGridList.Cells[8,i]); exit; end;
filter1:=Form_peach.StringGridList.Cells[8,i]; filter1:=Form_peach.StringGridList.Cells[8,i];
//if copy(filter1,1,1)='.' then filter1:='*'+copy(filter1,2,length(filt er1)-1); //if copy(filter1,1,1)='.' then filter1:='*'+copy(filter1,2,length(filt er1)-1);
cl:=cl+' '+delimiter+escapefilename(filter1,desk_env)+delimiter; cl:=cl+' '+stringdelim(escapefilename(filter1,desk_env));
end; end;
jobcode:=formatdatetime('yyyymmdd_hh.nn.ss.ms_',now)+fun; jobcode:=formatdatetime('yyyymmdd_hh.nn.ss.ms_',now)+fun;
compose_rarspecfun_cl:=0; compose_rarspecfun_cl:=0;
end; end;
function compose_arcspecfun_cl(var cl,jobcode,outname:ansistring; specfun:ansist ring):integer; function compose_arcspecfun_cl(var cl,jobcode,outname:ansistring; specfun:ansist ring):integer;
var var
out_param,in_param,bin_name,pw_option,pw,archive_function:ansistring; out_param,in_param,bin_name,pw_option,pw,archive_function:ansistring;
i:integer; i:integer;
begin begin
compose_arcspecfun_cl:=-1; compose_arcspecfun_cl:=-1;
//output name //output name
out_param:=Form_peach.EditOpenIn.Text; out_param:=Form_peach.EditOpenIn.Text;
outname:=out_param; outname:=out_param;
bin_name:=delimiter+escapefilename(executable_path,desk_env)+'res'+DirectorySepa rator+'arc'+DirectorySeparator+'arc'+EXEEXT+delimiter; bin_name:=stringdelim(escapefilename(executable_path,desk_env)+'res'+DirectorySe parator+'arc'+DirectorySeparator+'arc'+EXEEXT);
archive_function:=specfun; archive_function:=specfun;
if archive_function='r' then archive_function:=archive_function+' -y'; if archive_function='r' then archive_function:=archive_function+' -y';
cl:=bin_name+' '+archive_function; cl:=bin_name+' '+archive_function;
//encryption //encryption
if (FormPW.EditUn7zaPW.Text<>'') or (FormPW.EditName3.Text<>'') then if (FormPW.EditUn7zaPW.Text<>'') or (FormPW.EditName3.Text<>'') then
if FormPW.CheckBoxEncFn.State=cbChecked then pw_option:='-hp' if FormPW.CheckBoxEncFn.State=cbChecked then pw_option:='-hp'
else pw_option:='-p' else pw_option:='-p'
else else
pw_option:=''; pw_option:='';
if pw_option<>'' then if pw_option<>'' then
begin begin
pw:=FormPW.EditUn7zaPW.Text; pw:=FormPW.EditUn7zaPW.Text;
if (disable_twofactor=false) and (FormPW.EditName3.Text<>'') then if (disable_twofactor=false) and (FormPW.EditName3.Text<>'') then
if prepend_keyfile(pw,FormPW.EditName3.Text)<>0 then if prepend_keyfile(pw,FormPW.EditName3.Text)<>0 then
begin begin
pMessageErrorOK(FormPW.EditName3.Text+' '+txt_keyfile_not_found); pMessageErrorOK(FormPW.EditName3.Text+' '+txt_keyfile_not_found);
exit; exit;
end; end;
if pw4cl(pw_option,pw)<>0 then if pw4cl(pw_option,pw)<>0 then
begin begin
msg_pw_errorchar; msg_pw_errorchar(pw);
exit; exit;
end; end;
end; end;
if pw<>'' then cl:=cl+' '+pw; if pw<>'' then cl:=cl+' '+pw;
out_param:=delimiter+escapefilename(out_param,desk_env)+delimiter; out_param:=stringdelim(checkescapedoutname(escapefilename(out_param,desk_env)));
cl:=cl+' -- '+out_param; cl:=cl+' -- '+out_param;
//if archive_function='r' then cl:=cl+' '+delimiter+escapefilename(extractfilepa th(Form_peach.EditOpenIn.Text),desk_env)+delimiter;
jobcode:=formatdatetime('yyyymmdd_hh.nn.ss.ms_',now)+fun; jobcode:=formatdatetime('yyyymmdd_hh.nn.ss.ms_',now)+fun;
compose_arcspecfun_cl:=0; compose_arcspecfun_cl:=0;
end; end;
function compose_uncustom_cl(var cl,jobcode,outname:ansistring; real_extract:boo lean):integer; function compose_uncustom_cl(var cl,jobcode,outname:ansistring; real_extract:boo lean):integer;
var var
out_param,in_param,param_param,bin_name:ansistring; out_param,in_param,param_param,bin_name:ansistring;
begin begin
compose_uncustom_cl:=-1; compose_uncustom_cl:=-1;
//check for custom executable's name //check for custom executable's name
skipping to change at line 33467 skipping to change at line 33446
exit; exit;
end; end;
subfun:='extract'; subfun:='extract';
btfun:='uncustom'; btfun:='uncustom';
set_output_option(out_param); set_output_option(out_param);
if control_outpath(out_param)<>0 then exit; if control_outpath(out_param)<>0 then exit;
if out_param<>'' then if out_param<>'' then
if out_param[length(out_param)] <> directoryseparator then out_param:=out_par am+directoryseparator; if out_param[length(out_param)] <> directoryseparator then out_param:=out_par am+directoryseparator;
//in_param //in_param
if Form_peach.labelstatus2.Caption= txt_2_7_ext then if Form_peach.labelstatus2.Caption= txt_2_7_ext then
in_param:=delimiter+escapefilename(Form_peach.StringGrid2.Cells[8,Form_peach. StringGrid2.Row],desk_env)+delimiter in_param:=stringdelim(escapefilename(Form_peach.StringGrid2.Cells[8,Form_peac h.StringGrid2.Row],desk_env))
else else
in_param:=delimiter+escapefilename(Form_peach.EditOpenIn.Text,desk_env)+delim iter; in_param:=stringdelim(escapefilename(Form_peach.EditOpenIn.Text,desk_env));
//folder policy //folder policy
set_output_folder(out_param,in_param,real_extract,0); set_output_folder(out_param,in_param,real_extract,0);
if out_param<>'' then if out_param<>'' then
if out_param[length(out_param)]<>directoryseparator then out_param:=out_param +directoryseparator; if out_param[length(out_param)]<>directoryseparator then out_param:=out_param +directoryseparator;
outname:=out_param; outname:=out_param;
if fileexists((out_param)) then if fileexists((out_param)) then
if pMessageWarningYesNo(out_param+' '+txt_confirm_overwrite)<>6 then exit if pMessageWarningYesNo(out_param+' '+txt_confirm_overwrite)<>6 then exit
else else
if real_extract=true then clearfile(out_param); //avoid overwriting exi sting files since some programs will and return error exit code if real_extract=true then clearfile(out_param); //avoid overwriting exi sting files since some programs will and return error exit code
if out_param<>'' then out_param:=delimiter+escapefilename(out_param,desk_env)+de if out_param<>'' then out_param:=stringdelim(escapefilename(out_param,desk_env))
limiter; ;
bin_name:=delimiter+escapefilename(Form_peach.EditnameCustom1.Text,desk_env)+del bin_name:=stringdelim(escapefilename(Form_peach.EditnameCustom1.Text,desk_env));
imiter;
if Form_peach.EditOPCustom1.Text<>'' then param_param:=Form_peach.EditOPCustom1. Text else param_param:=''; if Form_peach.EditOPCustom1.Text<>'' then param_param:=Form_peach.EditOPCustom1. Text else param_param:='';
case Form_peach.ComboBoxArchiveCustom1.ItemIndex of case Form_peach.ComboBoxArchiveCustom1.ItemIndex of
0: cl:=bin_name+' '+param_param+' '+in_param+' '+out_param; 0: cl:=bin_name+' '+param_param+' '+in_param+' '+out_param;
1: cl:=bin_name+' '+param_param+' '+out_param+' '+in_param; 1: cl:=bin_name+' '+param_param+' '+out_param+' '+in_param;
2: cl:=bin_name+' '+in_param+' '+param_param+' '+out_param; 2: cl:=bin_name+' '+in_param+' '+param_param+' '+out_param;
3: cl:=bin_name+' '+in_param+' '+out_param+' '+param_param; 3: cl:=bin_name+' '+in_param+' '+out_param+' '+param_param;
4: cl:=bin_name+' '+out_param+' '+param_param+' '+in_param; 4: cl:=bin_name+' '+out_param+' '+param_param+' '+in_param;
5: cl:=bin_name+' '+out_param+' '+in_param+' '+param_param; 5: cl:=bin_name+' '+out_param+' '+in_param+' '+param_param;
end; end;
jobcode:=formatdatetime('yyyymmdd_hh.nn.ss.ms_',now)+fun; jobcode:=formatdatetime('yyyymmdd_hh.nn.ss.ms_',now)+fun;
skipping to change at line 33769 skipping to change at line 33748
begin begin
pw:=FormPW.EditUn7zaPW.Text; pw:=FormPW.EditUn7zaPW.Text;
if (disable_twofactor=false) and (FormPW.EditName3.Text<>'') then if (disable_twofactor=false) and (FormPW.EditName3.Text<>'') then
if prepend_keyfile(pw,FormPW.EditName3.Text)<>0 then if prepend_keyfile(pw,FormPW.EditName3.Text)<>0 then
begin begin
pMessageErrorOK(FormPW.EditName3.Text+' '+txt_keyfile_not_found); pMessageErrorOK(FormPW.EditName3.Text+' '+txt_keyfile_not_found);
exit; exit;
end; end;
if pw4cl('-p',pw)<>0 then if pw4cl('-p',pw)<>0 then
begin begin
msg_pw_errorchar; msg_pw_errorchar(pw);
pforceconsole:=1; pforceconsole:=1;
pw:='-p'; pw:='-p';
//exit; //exit;
end; end;
end; end;
//encryption algorithm //encryption algorithm
if Form_peach.ComboBox7zalgo.Visible=true then if Form_peach.ComboBox7zalgo.Visible=true then
if archive_type='zip' then if archive_type='zip' then
case Form_peach.ComboBox7zalgo.Itemindex of case Form_peach.ComboBox7zalgo.Itemindex of
0: encalgo:='-mem=AES256'; 0: encalgo:='-mem=AES256';
skipping to change at line 33926 skipping to change at line 33905
psns:=''; psns:='';
if archive_type='wim' then if archive_type='wim' then
begin begin
if sni7z=1 then psni:='-sni' else psni:=''; if sni7z=1 then psni:='-sni' else psni:='';
if sns7z=1 then psns:='-sns' else psns:='-sns-'; if sns7z=1 then psns:='-sns' else psns:='-sns-';
end; end;
//7za uses -- as tag to distinguish a filename starting with - from a switch, ho wever since PeaZip uses absolute filenames it should never occur and filenames a re not checked for that condition //7za uses -- as tag to distinguish a filename starting with - from a switch, ho wever since PeaZip uses absolute filenames it should never occur and filenames a re not checked for that condition
outname:=out_param; outname:=out_param;
if vol_size>0 then outname:=outname+'.001'; //give correct output name if archiv e is split if vol_size>0 then outname:=outname+'.001'; //give correct output name if archiv e is split
getworkpath(work_path,out_param); getworkpath(work_path,out_param);
out_param:=delimiter+escapefilename(out_param,desk_env)+delimiter; out_param:=stringdelim(checkescapedoutname(escapefilename(out_param,desk_env)));
get_in_param(in_param,sel); get_in_param(in_param,sel);
exclude_param:=''; exclude_param:='';
include_param:=''; include_param:='';
if FormAdvf.CheckBoxAdvFilters.State=cbChecked then if FormAdvf.CheckBoxAdvFilters.State=cbChecked then
begin begin
for i:=0 to FormAdvf.MemoAdvExclude.Lines.Count-1 do for i:=0 to FormAdvf.MemoAdvExclude.Lines.Count-1 do
begin begin
if FormAdvf.CheckBoxAdvRecurse1.State=cbChecked then if FormAdvf.CheckBoxAdvRecurse1.State=cbChecked then
exclude_param:=exclude_param+' '+delimiter+'-xr0!'+FormAdvf.MemoAdvExcl ude.Lines[i]+delimiter+' ' exclude_param:=exclude_param+' '+stringdelim('-xr0!'+FormAdvf.MemoAdvEx clude.Lines[i])+' '
else else
exclude_param:=exclude_param+' '+delimiter+'-x!'+FormAdvf.MemoAdvExclud e.Lines[i]+delimiter+' '; exclude_param:=exclude_param+' '+stringdelim('-x!'+FormAdvf.MemoAdvExcl ude.Lines[i])+' ';
end; end;
for i:=0 to FormAdvf.MemoAdvIncludeAlso.Lines.Count-1 do for i:=0 to FormAdvf.MemoAdvIncludeAlso.Lines.Count-1 do
begin begin
if extractfilepath(FormAdvf.MemoAdvIncludeAlso.Lines[i])<>'' then if extractfilepath(FormAdvf.MemoAdvIncludeAlso.Lines[i])<>'' then
if FormAdvf.CheckBoxAdvRecurseAlso.State=cbChecked then if FormAdvf.CheckBoxAdvRecurseAlso.State=cbChecked then
include_param:=include_param+' '+delimiter+'-ir0!'+FormAdvf.MemoAdvI ncludeAlso.Lines[i]+delimiter+' ' include_param:=include_param+' '+stringdelim('-ir0!'+FormAdvf.MemoAd vIncludeAlso.Lines[i])+' '
else else
include_param:=include_param+' '+delimiter+'-i!'+FormAdvf.MemoAdvInc ludeAlso.Lines[i]+delimiter+' '; include_param:=include_param+' '+stringdelim('-i!'+FormAdvf.MemoAdvI ncludeAlso.Lines[i])+' ';
end; end;
end; end;
bin_name:=delimiter+escapefilename(executable_path,desk_env)+'res'+DirectorySepa rator+'7z'+DirectorySeparator+'7z'+EXEEXT+delimiter; bin_name:=stringdelim(escapefilename(executable_path,desk_env)+'res'+DirectorySe parator+'7z'+DirectorySeparator+'7z'+EXEEXT);
{$IFDEF LINUX}if sys7zlin=1 then bin_name:='7z';{$ENDIF} {$IFDEF LINUX}if sys7zlin=1 then bin_name:='7z';{$ENDIF}
cl:=bin_name+' '+archive_function+' '+type_option; cl:=bin_name+' '+archive_function+' '+type_option;
if compressor_option<>'' then cl:=cl+' '+compressor_option; if compressor_option<>'' then cl:=cl+' '+compressor_option;
if thread_option<>'' then cl:=cl+' '+thread_option; if thread_option<>'' then cl:=cl+' '+thread_option;
if compression_level<>'' then cl:=cl+' '+compression_level; if compression_level<>'' then cl:=cl+' '+compression_level;
if dictionary_option<>'' then cl:=cl+' '+dictionary_option; if dictionary_option<>'' then cl:=cl+' '+dictionary_option;
if word_option<>'' then cl:=cl+' '+word_option; if word_option<>'' then cl:=cl+' '+word_option;
if passes_option<>'' then cl:=cl+' '+passes_option; if passes_option<>'' then cl:=cl+' '+passes_option;
if solid_option<>'' then cl:=cl+' '+solid_option; if solid_option<>'' then cl:=cl+' '+solid_option;
if openfiles_option<>'' then cl:=cl+' '+openfiles_option; if openfiles_option<>'' then cl:=cl+' '+openfiles_option;
if sccenc<>'' then cl:=cl+' '+sccenc; if sccenc<>'' then cl:=cl+' '+sccenc;
if mcu_option<>'' then cl:=cl+' '+mcu_option; if mcu_option<>'' then cl:=cl+' '+mcu_option;
if pforceconsole=0 then if zaout=2 then if (pw='-p') or (pw=delimiter+'-p'+delim iter) then pw:='';//never pass empty password to pipe mode if pforceconsole=0 then if zaout=2 then if (pw='-p') or (pw=stringdelim('-p')) t hen pw:='';//never pass empty password to pipe mode
if pw<>'' then if pw<>'' then
begin begin
cl:=cl+' '+pw; cl:=cl+' '+pw;
if pw2_option<>'' then cl:=cl+' '+pw2_option; if pw2_option<>'' then cl:=cl+' '+pw2_option;
end; end;
if encalgo<>'' then cl:=cl+' '+encalgo; if encalgo<>'' then cl:=cl+' '+encalgo;
if nonverboselog=1 then cl:=cl+' -bb0 -bse0 -bsp2' else cl:=cl+' -bb1 -bse1 -bsp 2';//requires v15.x if nonverboselog=1 then cl:=cl+' -bb0 -bse0 -bsp2' else cl:=cl+' -bb1 -bse1 -bsp 2';//requires v15.x
if mail_option<>'' then cl:=cl+' '+mail_option; if mail_option<>'' then cl:=cl+' '+mail_option;
if sfx_option<>'' then cl:=cl+' '+sfx_option; if sfx_option<>'' then cl:=cl+' '+sfx_option;
if vol_size<>0 then cl:=cl+' -v'+inttostr(vol_size); if vol_size<>0 then cl:=cl+' -v'+inttostr(vol_size);
skipping to change at line 34014 skipping to change at line 33993
end end
else //check path to avoid extraction in peazip's temporary path, switch out of first temporary level (by default archive's path) else //check path to avoid extraction in peazip's temporary path, switch out of first temporary level (by default archive's path)
begin begin
if (mode='ext') or (mode='extandrun') or (mode='draganddrop') or ((mode='neut ral') and (Form_peach.RadioGroupAction.ItemIndex<2)) then if (mode='ext') or (mode='extandrun') or (mode='draganddrop') or ((mode='neut ral') and (Form_peach.RadioGroupAction.ItemIndex<2)) then
if control_outpath(out_param)<>0 then exit; if control_outpath(out_param)<>0 then exit;
end; end;
if out_param<>'' then if out_param<>'' then
if out_param[length(out_param)]<>directoryseparator then out_param:=out_param +directoryseparator; if out_param[length(out_param)]<>directoryseparator then out_param:=out_param +directoryseparator;
//in_param //in_param
if Form_peach.labelstatus2.Caption= txt_2_7_ext then if Form_peach.labelstatus2.Caption= txt_2_7_ext then
in_param:=delimiter+escapefilename(Form_peach.StringGrid2.Cells[8,Form_peach. StringGrid2.Row],desk_env)+delimiter in_param:=stringdelim(escapefilename(Form_peach.StringGrid2.Cells[8,Form_peac h.StringGrid2.Row],desk_env))
else else
in_param:=delimiter+escapefilename(Form_peach.EditOpenIn.Text,desk_env)+delim iter; in_param:=stringdelim(escapefilename(Form_peach.EditOpenIn.Text,desk_env));
//folder policy //folder policy
if mode<>'draganddrop' then set_output_folder(out_param,in_param,real_extract,Fo rm_peach.RadioGroupAction.ItemIndex) if mode<>'draganddrop' then set_output_folder(out_param,in_param,real_extract,Fo rm_peach.RadioGroupAction.ItemIndex)
else else
if nffromdrag=true then set_output_folder(out_param,in_param,real_extract,For m_peach.RadioGroupAction.ItemIndex); if nffromdrag=true then set_output_folder(out_param,in_param,real_extract,For m_peach.RadioGroupAction.ItemIndex);
//overwrite policy //overwrite policy
case extopt7z of case extopt7z of
0: overwrite_policy:='-o-';//skip existing files 0: overwrite_policy:='-o-';//skip existing files
1: overwrite_policy:='-or';//auto rename extracting files 1: overwrite_policy:='-or';//auto rename extracting files
2: overwrite_policy:='-or';//auto rename existing files //unrar renames only file being extracted 2: overwrite_policy:='-or';//auto rename existing files //unrar renames only file being extracted
3: overwrite_policy:='-o+';//overwrite all existing files 3: overwrite_policy:='-o+';//overwrite all existing files
skipping to change at line 34041 skipping to change at line 34020
if FormPW.EditName3.Text<>'' then if FormPW.EditName3.Text<>'' then
if prepend_keyfile(pw,FormPW.EditName3.Text)<>0 then if prepend_keyfile(pw,FormPW.EditName3.Text)<>0 then
begin begin
pMessageErrorOK(FormPW.EditName3.Text+' '+txt_keyfile_not_found); pMessageErrorOK(FormPW.EditName3.Text+' '+txt_keyfile_not_found);
exit; exit;
end; end;
if pw<>'' then if pw<>'' then
begin begin
if pw4cl('-p',pw)<>0 then if pw4cl('-p',pw)<>0 then
begin begin
msg_pw_errorchar; msg_pw_errorchar(pw);
exit; exit;
end; end;
end end
else if zaout>0 then pw:='-p-'; else if zaout>0 then pw:='-p-';
//archive function //archive function
case mode of case mode of
'neutral' : 'neutral' :
case Form_peach.RadioGroupAction.ItemIndex of case Form_peach.RadioGroupAction.ItemIndex of
0: archive_function:='x'; 0: archive_function:='x';
1: archive_function:='e'; 1: archive_function:='e';
skipping to change at line 34148 skipping to change at line 34127
{$IFDEF MSWINDOWS}tempstring:=StringReplace(tempstring,':','_', [rfReplaceAll ]);{$ENDIF} {$IFDEF MSWINDOWS}tempstring:=StringReplace(tempstring,':','_', [rfReplaceAll ]);{$ENDIF}
overwrite_policy:='-o+'; overwrite_policy:='-o+';
end; end;
if (archive_function<>'x') and (archive_function<>'e') and (archive_function<>'d ') then if (archive_function<>'x') and (archive_function<>'e') and (archive_function<>'d ') then
//clear overwrite policies for list and test mode (no need for writing) //clear overwrite policies for list and test mode (no need for writing)
begin begin
overwrite_policy:=''; overwrite_policy:='';
out_param:=''; out_param:='';
end; end;
//end archive function attribution //end archive function attribution
if out_param<>'' then out_param:=delimiter+escapefilename(out_param,desk_env)+de if out_param<>'' then out_param:=stringdelim(escapefilename(out_param,desk_env))
limiter; ;
bin_name:=delimiter+escapefilename(executable_path,desk_env)+'res'+DirectorySepa bin_name:=stringdelim(escapefilename(executable_path,desk_env)+'res'+DirectorySe
rator+'unrar'+DirectorySeparator+UNRARNAME+EXEEXT+delimiter; parator+'unrar'+DirectorySeparator+UNRARNAME+EXEEXT);
cl:=bin_name+' '+archive_function; cl:=bin_name+' '+archive_function;
if overwrite_policy<>'' then cl:=cl+' '+overwrite_policy; if overwrite_policy<>'' then cl:=cl+' '+overwrite_policy;
if pw<>'' then cl:=cl+' '+pw; if pw<>'' then cl:=cl+' '+pw;
cl:=cl+' '+in_param; cl:=cl+' '+in_param;
//filter(s) //filter(s)
if selection='all' then //apply only advanced filter(s), if used if selection='all' then //apply only advanced filter(s), if used
if FormAdvf.CheckBoxAdvFilters.State=cbChecked then adv_filters_rar5(cl); if FormAdvf.CheckBoxAdvFilters.State=cbChecked then adv_filters_rar5(cl);
if selection='displayed' then //apply advanced filters, if used, or basic filter s (but without excludes, in order to extract also all nested objects) if selection='displayed' then //apply advanced filters, if used, or basic filter s (but without excludes, in order to extract also all nested objects)
if FormAdvf.CheckBoxAdvFilters.State=cbChecked then adv_filters_rar5(cl) if FormAdvf.CheckBoxAdvFilters.State=cbChecked then adv_filters_rar5(cl)
else else
if Form_peach.EditUn7zaFilter.Text<>'' then if Form_peach.EditUn7zaFilter.Text<>'' then
begin begin
if Form_peach.cbUn7zaRecursive.State=cbChecked then cl:=cl+' -r'; if Form_peach.cbUn7zaRecursive.State=cbChecked then cl:=cl+' -r';
filter1:=Form_peach.EditUn7zaFilter.Text; filter1:=Form_peach.EditUn7zaFilter.Text;
//if copy(filter1,1,1)='.' then filter1:='*'+copy(filter1,2,length(filt er1)-1); //if copy(filter1,1,1)='.' then filter1:='*'+copy(filter1,2,length(filt er1)-1);
cl:=cl+' -- '+delimiter+escapefilename(filter1,desk_env)+delimiter; cl:=cl+' -- '+stringdelim(escapefilename(filter1,desk_env));
end; end;
if selection='selected' then //extract object in the range of selection if selection='selected' then //extract object in the range of selection
begin begin
cl:=cl+' --'; cl:=cl+' --';
checksel:=false; checksel:=false;
{$IFDEF MSWINDOWS}if Form_peach.PanelOpen.Visible=true{$ELSE}if Form_peach.Pa nelOpen.top=0{$ENDIF} then {$IFDEF MSWINDOWS}if Form_peach.PanelOpen.Visible=true{$ELSE}if Form_peach.Pa nelOpen.top=0{$ENDIF} then
begin begin
for i:=1 to Form_peach.StringGridList.RowCount-1 do for i:=1 to Form_peach.StringGridList.RowCount-1 do
if Form_peach.StringGridList.Cells[12,i]='1' then if Form_peach.StringGridList.Cells[12,i]='1' then
begin begin
if checkfiledirname(Form_peach.StringGridList.Cells[8,i])<>0 then begin pMessageWarningOK(txt_2_7_validatefn+' '+Form_peach.StringGridList.Cells[8,i]); exit; end; if checkfiledirname(Form_peach.StringGridList.Cells[8,i])<>0 then begin pMessageWarningOK(txt_2_7_validatefn+' '+Form_peach.StringGridList.Cells[8,i]); exit; end;
filter1:=Form_peach.StringGridList.Cells[8,i]; filter1:=Form_peach.StringGridList.Cells[8,i];
//if copy(filter1,1,1)='.' then filter1:='*'+copy(filter1,2,length(filt er1)-1); //if copy(filter1,1,1)='.' then filter1:='*'+copy(filter1,2,length(filt er1)-1);
cl:=cl+' '+delimiter+escapefilename(filter1,desk_env)+delimiter; cl:=cl+' '+stringdelim(escapefilename(filter1,desk_env));
checksel:=true; checksel:=true;
end; end;
end end
else else
for i:=1 to Form_peach.StringGrid2.RowCount-1 do for i:=1 to Form_peach.StringGrid2.RowCount-1 do
begin begin
if checkfiledirname(Form_peach.StringGrid2.Cells[8,i])<>0 then begin pMess ageWarningOK(txt_2_7_validatefn+' '+Form_peach.StringGrid2.Cells[8,i]); exit; en d; if checkfiledirname(Form_peach.StringGrid2.Cells[8,i])<>0 then begin pMess ageWarningOK(txt_2_7_validatefn+' '+Form_peach.StringGrid2.Cells[8,i]); exit; en d;
filter1:=Form_peach.StringGrid2.Cells[8,i]; filter1:=Form_peach.StringGrid2.Cells[8,i];
//if copy(filter1,1,1)='.' then filter1:='*'+copy(filter1,2,length(filter1 )-1); //if copy(filter1,1,1)='.' then filter1:='*'+copy(filter1,2,length(filter1 )-1);
cl:=cl+' '+delimiter+escapefilename(filter1,desk_env)+delimiter; cl:=cl+' '+stringdelim(escapefilename(filter1,desk_env));
checksel:=true; checksel:=true;
end; end;
if checksel=false then exit; if checksel=false then exit;
end; end;
if ((mode='extandrun') or (mode='preview')) and (selection='single') then //extr act a single object if ((mode='extandrun') or (mode='preview')) and (selection='single') then //extr act a single object
begin begin
if checkfiledirname(Form_peach.StringGridList.Cells[8,Form_peach.StringGridLi st.Row])<>0 then begin pMessageWarningOK(txt_2_7_validatefn+' '+Form_peach.Strin gGridList.Cells[8,Form_peach.StringGridList.Row]); exit; end; if checkfiledirname(Form_peach.StringGridList.Cells[8,Form_peach.StringGridLi st.Row])<>0 then begin pMessageWarningOK(txt_2_7_validatefn+' '+Form_peach.Strin gGridList.Cells[8,Form_peach.StringGridList.Row]); exit; end;
filter1:=Form_peach.StringGridList.Cells[8,Form_peach.StringGridList.Row]; filter1:=Form_peach.StringGridList.Cells[8,Form_peach.StringGridList.Row];
//if copy(filter1,1,1)='.' then filter1:='*'+copy(filter1,2,length(filter1)-1 ); //if copy(filter1,1,1)='.' then filter1:='*'+copy(filter1,2,length(filter1)-1 );
cl:=cl+' -- '+delimiter+escapefilename(filter1,desk_env)+delimiter; cl:=cl+' -- '+stringdelim(escapefilename(filter1,desk_env));
end; end;
if out_param<>'' then cl:=cl+' '+out_param; if out_param<>'' then cl:=cl+' '+out_param;
jobcode:=formatdatetime('yyyymmdd_hh.nn.ss.ms_',now)+fun; jobcode:=formatdatetime('yyyymmdd_hh.nn.ss.ms_',now)+fun;
result:=0; result:=0;
end; end;
function compose_un7z_cl(var cl,jobcode,outname:ansistring; real_extract:boolean ; mode,selection:ansistring):integer; function compose_un7z_cl(var cl,jobcode,outname:ansistring; real_extract:boolean ; mode,selection:ansistring):integer;
//mode: neutral (read in options), ext, extandrun, list, info, test, (add is in compose_archive_cl only), delete, draganddrop //mode: neutral (read in options), ext, extandrun, list, info, test, (add is in compose_archive_cl only), delete, draganddrop
//selection: all, displayed (apply filters), selected (evaluate selected), singl e (single selected object) //selection: all, displayed (apply filters), selected (evaluate selected), singl e (single selected object)
var var
skipping to change at line 34239 skipping to change at line 34218
3: if Form_peach.EditEncoding.Caption<>'' then mcu_option:='-mcp='+Form_pe ach.EditEncoding.Caption; 3: if Form_peach.EditEncoding.Caption<>'' then mcu_option:='-mcp='+Form_pe ach.EditEncoding.Caption;
end; end;
//NT, NTFS options //NT, NTFS options
esni:=''; esni:='';
esns:=''; esns:='';
if (upcase(extractfileext(in_param))='.WIM') or (upcase(extractfileext(in_param) )='.SWM') then if (upcase(extractfileext(in_param))='.WIM') or (upcase(extractfileext(in_param) )='.SWM') then
begin begin
if sni7z=1 then esni:='-sni' else esni:=''; if sni7z=1 then esni:='-sni' else esni:='';
if sns7z=1 then esns:='-sns' else esns:='-sns-'; if sns7z=1 then esns:='-sns' else esns:='-sns-';
end; end;
in_param:=delimiter+in_param+delimiter; in_param:=stringdelim(in_param);
subfun:='extract'; subfun:='extract';
btfun:='un7z'; btfun:='un7z';
//out_param //out_param
set_output_option(out_param); set_output_option(out_param);
if mode='preview' then if mode='preview' then
begin begin
if work_dir=5 then exit;//exit if preview is disabled if work_dir=5 then exit;//exit if preview is disabled
set_outpath_preview(out_param); //on preview switch to user temp transparentl y if output path is read only set_outpath_preview(out_param); //on preview switch to user temp transparentl y if output path is read only
out_param:=out_param+ptmpcode;//directoryseparator is added in next step out_param:=out_param+ptmpcode;//directoryseparator is added in next step
ptmpdir:=out_param; ptmpdir:=out_param;
end end
else //check path to avoid extraction in peazip's temporary path, switch out of first temporary level (by default archive's path) else //check path to avoid extraction in peazip's temporary path, switch out of first temporary level (by default archive's path)
begin begin
if (mode='ext') or (mode='extandrun') or (mode='draganddrop') or ((mode='neut ral') and (Form_peach.RadioGroupAction.ItemIndex<2)) then if (mode='ext') or (mode='extandrun') or (mode='draganddrop') or ((mode='neut ral') and (Form_peach.RadioGroupAction.ItemIndex<2)) then
if control_outpath(out_param)<>0 then exit; if control_outpath(out_param)<>0 then exit;
end; end;
if out_param<>'' then if out_param<>'' then
if out_param[length(out_param)]<>directoryseparator then out_param:=out_param +directoryseparator; if out_param[length(out_param)]<>directoryseparator then out_param:=out_param +directoryseparator;
//folder policy //folder policy
if mode<>'delete' then if specialopen=false then
if mode<>'preview' then if mode<>'delete' then
if mode<>'preview' then
if mode<>'draganddrop' then set_output_folder(out_param,in_param,real_extract ,Form_peach.RadioGroupAction.ItemIndex) if mode<>'draganddrop' then set_output_folder(out_param,in_param,real_extract ,Form_peach.RadioGroupAction.ItemIndex)
else else
if nffromdrag=true then set_output_folder(out_param,in_param,real_extract, Form_peach.RadioGroupAction.ItemIndex); if nffromdrag=true then set_output_folder(out_param,in_param,real_extract, Form_peach.RadioGroupAction.ItemIndex);
if (mode='ext') and(specialopen=true) then //specialopen switches to extract ent ire directory for some file types (exe, bat, html...) if (mode='ext') and(specialopen=true) then //specialopen switches to extract ent ire directory for some file types (exe, bat, html...)
begin begin
alt_tempstring:=Form_peach.StringGridList.Cells[8,Form_peach.StringGridList.R ow]; alt_tempstring:=Form_peach.StringGridList.Cells[8,Form_peach.StringGridList.R ow];
{$IFDEF MSWINDOWS}alt_tempstring:=StringReplace(alt_tempstring,':','_', [rfRe placeAll]);{$ENDIF} {$IFDEF MSWINDOWS}alt_tempstring:=StringReplace(alt_tempstring,':','_', [rfRe placeAll]);{$ENDIF}
out_param:=out_param+STR_STMP+inttohex(random(16000000),6)+DirectorySeparator ; out_param:=out_param+STR_STMP+inttohex(random(16000000),6)+DirectorySeparator ;
pstmpdir:=out_param; pstmpdir:=out_param;
if pstmpdir<>'' then if DirectoryExists(pstmpdir) then else CreateDir(pstmpdi r); if pstmpdir<>'' then if DirectoryExists(pstmpdir) then else CreateDir(pstmpdi r);
skipping to change at line 34296 skipping to change at line 34276
if prepend_keyfile(pw,FormPW.EditName3.Text)<>0 then if prepend_keyfile(pw,FormPW.EditName3.Text)<>0 then
begin begin
pMessageErrorOK(FormPW.EditName3.Text+' '+txt_keyfile_not_found); pMessageErrorOK(FormPW.EditName3.Text+' '+txt_keyfile_not_found);
exit; exit;
end; end;
pforceconsole:=0; pforceconsole:=0;
if pw<>'' then if pw<>'' then
begin begin
if pw4cl('-p',pw)<>0 then if pw4cl('-p',pw)<>0 then
begin begin
msg_pw_errorchar; msg_pw_errorchar(pw);
pforceconsole:=1; pforceconsole:=1;
pw:=''; pw:='';
//exit; //exit;
end; end;
end end
else if zaout>0 then pw:='-pdefault'; //workaround: pw is never left blank in pi pe mode; if archive is not encrypted the pw will not be checked by 7za, otherwis e the archive will not open but will not hang the application in pipe mode that is waiting for input else if zaout>0 then pw:='-pdefault'; //workaround: pw is never left blank in pi pe mode; if archive is not encrypted the pw will not be checked by 7za, otherwis e the archive will not open but will not hang the application in pipe mode that is waiting for input
case enc7zscc of case enc7zscc of
0: sccenc:='-sccUTF-8'; 0: sccenc:='-sccUTF-8';
1: sccenc:='-sccWIN'; 1: sccenc:='-sccWIN';
2: sccenc:='-sccDOS'; 2: sccenc:='-sccDOS';
skipping to change at line 34434 skipping to change at line 34414
end; end;
if mode='delete' then getworkpath(work_path,out_param); if mode='delete' then getworkpath(work_path,out_param);
//end archive function attribution //end archive function attribution
//path option //path option
if (archive_function='x') or (archive_function='e') or (archive_function='d') th en if (archive_function='x') or (archive_function='e') or (archive_function='d') th en
case Form_peach.ComboBoxArchivePaths1.ItemIndex of case Form_peach.ComboBoxArchivePaths1.ItemIndex of
0: path_option:=''; 0: path_option:='';
1: path_option:='-spf2'; 1: path_option:='-spf2';
2: path_option:='-spf'; 2: path_option:='-spf';
end; end;
if out_param<>'' then out_param:=delimiter+'-o'+escapefilename(out_param,desk_en if out_param<>'' then out_param:=stringdelim('-o'+escapefilename(out_param,desk_
v)+delimiter; env));
bin_name:=delimiter+escapefilename(executable_path,desk_env)+'res'+DirectorySepa bin_name:=stringdelim(escapefilename(executable_path,desk_env)+'res'+DirectorySe
rator+'7z'+DirectorySeparator+'7z'+EXEEXT+delimiter; parator+'7z'+DirectorySeparator+'7z'+EXEEXT);
{$IFDEF LINUX}if sys7zlin=1 then bin_name:='7z';{$ENDIF} {$IFDEF LINUX}if sys7zlin=1 then bin_name:='7z';{$ENDIF}
cl:=bin_name+' '+archive_function; cl:=bin_name+' '+archive_function;
if delcase<>'' then cl:=cl+' '+delcase; if delcase<>'' then cl:=cl+' '+delcase;
if overwrite_policy<>'' then cl:=cl+' '+overwrite_policy; if overwrite_policy<>'' then cl:=cl+' '+overwrite_policy;
if out_param<>'' then cl:=cl+' '+out_param; if out_param<>'' then cl:=cl+' '+out_param;
if work_path<>'' then cl:=cl+' '+work_path; if work_path<>'' then cl:=cl+' '+work_path;
if (nonverboselog=1) and (mode<>'test') then cl:=cl+' -bb0 -bse0 -bsp2' else cl: =cl+' -bb1 -bse1 -bsp2'; if (nonverboselog=1) and (mode<>'test') then cl:=cl+' -bb0 -bse0 -bsp2' else cl: =cl+' -bb1 -bse1 -bsp2';
if deltime<>'' then cl:=cl+' '+deltime; if deltime<>'' then cl:=cl+' '+deltime;
if pw<>'' then cl:=cl+' '+pw; if pw<>'' then cl:=cl+' '+pw;
cl:=cl+' '+sccenc; cl:=cl+' '+sccenc;
skipping to change at line 34463 skipping to change at line 34443
if selection='all' then //apply only advanced filter(s), if used if selection='all' then //apply only advanced filter(s), if used
if FormAdvf.CheckBoxAdvFilters.State=cbChecked then adv_filters(cl); if FormAdvf.CheckBoxAdvFilters.State=cbChecked then adv_filters(cl);
if selection='displayed' then //apply advanced filters, if used, or basic filter s (but without excludes, in order to extract also all nested objects) if selection='displayed' then //apply advanced filters, if used, or basic filter s (but without excludes, in order to extract also all nested objects)
if FormAdvf.CheckBoxAdvFilters.State=cbChecked then adv_filters(cl) if FormAdvf.CheckBoxAdvFilters.State=cbChecked then adv_filters(cl)
else else
if Form_peach.EditUn7zaFilter.Text<>'' then if Form_peach.EditUn7zaFilter.Text<>'' then
begin begin
if Form_peach.cbUn7zaRecursive.State=cbChecked then cl:=cl+' -r'; if Form_peach.cbUn7zaRecursive.State=cbChecked then cl:=cl+' -r';
filter1:=Form_peach.EditUn7zaFilter.Text; filter1:=Form_peach.EditUn7zaFilter.Text;
//if copy(filter1,1,1)='.' then filter1:='*'+copy(filter1,2,length(filt er1)-1); //if copy(filter1,1,1)='.' then filter1:='*'+copy(filter1,2,length(filt er1)-1);
cl:=cl+' -- '+delimiter+escapefilename(filter1,desk_env)+delimiter; cl:=cl+' '+stringdelim('-i!'+escapefilename(filter1,desk_env));
end; end;
if selection='selected' then //extract object in the range of selection if selection='selected' then //extract object in the range of selection
begin begin
cl:=cl+' --';
checksel:=false; checksel:=false;
{$IFDEF MSWINDOWS}if Form_peach.PanelOpen.Visible=true{$ELSE}if Form_peach.Pa nelOpen.top=0{$ENDIF} then {$IFDEF MSWINDOWS}if Form_peach.PanelOpen.Visible=true{$ELSE}if Form_peach.Pa nelOpen.top=0{$ENDIF} then
begin begin
for i:=1 to Form_peach.StringGridList.RowCount-1 do for i:=1 to Form_peach.StringGridList.RowCount-1 do
if Form_peach.StringGridList.Cells[12,i]='1' then if Form_peach.StringGridList.Cells[12,i]='1' then
begin begin
if checkfiledirname(Form_peach.StringGridList.Cells[8,i])<>0 then begin pMessageWarningOK(txt_2_7_validatefn+' '+Form_peach.StringGridList.Cells[8,i]); exit; end; if checkfiledirname(Form_peach.StringGridList.Cells[8,i])<>0 then begin pMessageWarningOK(txt_2_7_validatefn+' '+Form_peach.StringGridList.Cells[8,i]); exit; end;
filter1:=Form_peach.StringGridList.Cells[8,i]; filter1:=Form_peach.StringGridList.Cells[8,i];
if archive_function='d' then if copy(filter1,1,1)='.' then filter1:='?' +copy(filter1,2,length(filter1)-1); if archive_function='d' then if copy(filter1,1,1)='.' then filter1:='?' +copy(filter1,2,length(filter1)-1);
if archive_function='d' then if copy(filter1,2,1)=':' then filter1:=cop y(filter1,1,1)+'?'+copy(filter1,3,length(filter1)-2); if archive_function='d' then if copy(filter1,2,1)=':' then filter1:=cop y(filter1,1,1)+'?'+copy(filter1,3,length(filter1)-2);
//if copy(filter1,1,1)='.' then filter1:='*'+copy(filter1,2,length(filt er1)-1); //if copy(filter1,1,1)='.' then filter1:='*'+copy(filter1,2,length(filt er1)-1);
cl:=cl+' '+delimiter+escapefilename(filter1,desk_env)+delimiter; cl:=cl+' '+stringdelim('-i!'+escapefilename(filter1,desk_env));
checksel:=true; checksel:=true;
end; end;
end end
else else
for i:=1 to Form_peach.StringGrid2.RowCount-1 do for i:=1 to Form_peach.StringGrid2.RowCount-1 do
begin begin
if checkfiledirname(Form_peach.StringGrid2.Cells[8,i])<>0 then begin pMess ageWarningOK(txt_2_7_validatefn+' '+Form_peach.StringGrid2.Cells[8,i]); exit; en d; if checkfiledirname(Form_peach.StringGrid2.Cells[8,i])<>0 then begin pMess ageWarningOK(txt_2_7_validatefn+' '+Form_peach.StringGrid2.Cells[8,i]); exit; en d;
filter1:=Form_peach.StringGrid2.Cells[8,i]; filter1:=Form_peach.StringGrid2.Cells[8,i];
//if copy(filter1,1,1)='.' then filter1:='*'+copy(filter1,2,length(filter1 )-1); //if copy(filter1,1,1)='.' then filter1:='*'+copy(filter1,2,length(filter1 )-1);
cl:=cl+' '+delimiter+escapefilename(filter1,desk_env)+delimiter; cl:=cl+' '+stringdelim('-i!'+escapefilename(filter1,desk_env));
checksel:=true; checksel:=true;
end; end;
if checksel=false then exit; if checksel=false then exit;
end; end;
if ((mode='extandrun') or (mode='preview')) and (selection='single') then //extr act a single object if ((mode='extandrun') or (mode='preview')) and (selection='single') then //extr act a single object
begin begin
if checkfiledirname(Form_peach.StringGridList.Cells[8,Form_peach.StringGridLi st.Row])<>0 then begin pMessageWarningOK(txt_2_7_validatefn+' '+Form_peach.Strin gGridList.Cells[8,Form_peach.StringGridList.Row]); exit; end; if checkfiledirname(Form_peach.StringGridList.Cells[8,Form_peach.StringGridLi st.Row])<>0 then begin pMessageWarningOK(txt_2_7_validatefn+' '+Form_peach.Strin gGridList.Cells[8,Form_peach.StringGridList.Row]); exit; end;
filter1:=Form_peach.StringGridList.Cells[8,Form_peach.StringGridList.Row]; filter1:=Form_peach.StringGridList.Cells[8,Form_peach.StringGridList.Row];
//if copy(filter1,1,1)='.' then filter1:='*'+copy(filter1,2,length(filter1)-1 ); //if copy(filter1,1,1)='.' then filter1:='*'+copy(filter1,2,length(filter1)-1 );
cl:=cl+' -- '+delimiter+escapefilename(filter1,desk_env)+delimiter; cl:=cl+' '+stringdelim('-i!'+escapefilename(filter1,desk_env));
end; end;
jobcode:=formatdatetime('yyyymmdd_hh.nn.ss.ms_',now)+fun; jobcode:=formatdatetime('yyyymmdd_hh.nn.ss.ms_',now)+fun;
compose_un7z_cl:=0; compose_un7z_cl:=0;
end; end;
function compose_pea_cl(var cl,jobcode,outname,sel:ansistring):integer; function compose_pea_cl(var cl,jobcode,outname,sel:ansistring):integer;
var var
i:integer; i:integer;
out_param,s,in_param,compr,vol_algo,obj_algo,strm_algo,bin_name,p_ext,pw:ansi string; out_param,s,in_param,compr,vol_algo,obj_algo,strm_algo,bin_name,p_ext,pw:ansi string;
vol_size:qword; vol_size:qword;
skipping to change at line 34587 skipping to change at line 34566
2: strm_algo:='TRISAT BATCH'; 2: strm_algo:='TRISAT BATCH';
3: strm_algo:='EAX256 BATCH'; 3: strm_algo:='EAX256 BATCH';
4: strm_algo:='TF256 BATCH'; 4: strm_algo:='TF256 BATCH';
5: strm_algo:='SP256 BATCH'; 5: strm_algo:='SP256 BATCH';
6: strm_algo:='EAX BATCH'; 6: strm_algo:='EAX BATCH';
7: strm_algo:='TF BATCH'; 7: strm_algo:='TF BATCH';
8: strm_algo:='SP BATCH'; 8: strm_algo:='SP BATCH';
9: strm_algo:='HMAC BATCH'; 9: strm_algo:='HMAC BATCH';
end; end;
if FormPW.EditUn7zaPW.Text<>'' then if FormPW.EditUn7zaPW.Text<>'' then
strm_algo:=strm_algo+' '+delimiter+FormPW.EditUn7zaPW.Text+delimiter strm_algo:=strm_algo+' '+stringdelim(FormPW.EditUn7zaPW.Text)
else else
strm_algo:=strm_algo+' default'; strm_algo:=strm_algo+' default';
if FormPW.EditName3.Text<>'' then if FormPW.EditName3.Text<>'' then
if prepend_keyfile(pw,FormPW.EditName3.Text)=0 then if prepend_keyfile(pw,FormPW.EditName3.Text)=0 then
strm_algo:=strm_algo+' '+delimiter+FormPW.EditName3.Text+delimiter strm_algo:=strm_algo+' '+stringdelim(FormPW.EditName3.Text)
else else
begin begin
pMessageErrorOK(FormPW.EditName3.Text+' '+txt_keyfile_not_found); pMessageErrorOK(FormPW.EditName3.Text+' '+txt_keyfile_not_found);
exit; exit;
end end
else strm_algo:=strm_algo+' NOKEYFILE'; else strm_algo:=strm_algo+' NOKEYFILE';
end end
else strm_algo:='RIPEMD160 BATCH'; else strm_algo:='RIPEMD160 BATCH';
if pw<>'' then if pw<>'' then
if pw4cl('',pw)<>0 then if pw4cl('',pw)<>0 then
begin begin
msg_pw_errorchar; msg_pw_errorchar(pw);
exit; exit;
end; end;
case Form_peach.ComboBoxPEA3.ItemIndex of //object check case Form_peach.ComboBoxPEA3.ItemIndex of //object check
0: obj_algo:='WHIRLPOOL'; 0: obj_algo:='WHIRLPOOL';
1: obj_algo:='SHA3_512'; 1: obj_algo:='SHA3_512';
2: obj_algo:='SHA512'; 2: obj_algo:='SHA512';
3: obj_algo:='BLAKE2B'; 3: obj_algo:='BLAKE2B';
4: obj_algo:='SHA3_256'; 4: obj_algo:='SHA3_256';
5: obj_algo:='SHA256'; 5: obj_algo:='SHA256';
6: obj_algo:='BLAKE2S'; 6: obj_algo:='BLAKE2S';
skipping to change at line 34639 skipping to change at line 34618
5: vol_algo:='SHA256'; 5: vol_algo:='SHA256';
6: vol_algo:='BLAKE2S'; 6: vol_algo:='BLAKE2S';
7: vol_algo:='RIPEMD160'; 7: vol_algo:='RIPEMD160';
8: vol_algo:='SHA1'; 8: vol_algo:='SHA1';
9: vol_algo:='MD5'; 9: vol_algo:='MD5';
10: vol_algo:='CRC64'; 10: vol_algo:='CRC64';
11: vol_algo:='CRC32'; 11: vol_algo:='CRC32';
12: vol_algo:='ADLER32'; 12: vol_algo:='ADLER32';
13: vol_algo:='NOALGO'; 13: vol_algo:='NOALGO';
end; end;
out_param:=delimiter+escapefilename(out_param,desk_env)+delimiter; out_param:=stringdelim(checkescapedoutname(escapefilename(out_param,desk_env) ));
get_in_param(in_param,sel); get_in_param(in_param,sel);
in_param:='FROMCL '+in_param; in_param:='FROMCL '+in_param;
bin_name:=delimiter+escapefilename(executable_path,desk_env)+'res'+DirectoryS eparator+'pea'+EXEEXT+delimiter; bin_name:=stringdelim(escapefilename(executable_path,desk_env)+'res'+Director ySeparator+'pea'+EXEEXT);
cl:=bin_name+' '+fun+' '+out_param+' '+inttostr(vol_size)+' '+compr+' '+vol_a lgo+' '+obj_algo+' '+strm_algo+' '+in_param; cl:=bin_name+' '+fun+' '+out_param+' '+inttostr(vol_size)+' '+compr+' '+vol_a lgo+' '+obj_algo+' '+strm_algo+' '+in_param;
jobcode:=formatdatetime('yyyymmdd_hh.nn.ss.ms',now)+fun; jobcode:=formatdatetime('yyyymmdd_hh.nn.ss.ms',now)+fun;
compose_pea_cl:=0; compose_pea_cl:=0;
end; end;
function compose_rfs_cl(var cl,jobcode,outname,sel:ansistring):integer; function compose_rfs_cl(var cl,jobcode,outname,sel:ansistring):integer;
var var
i:integer; i:integer;
out_param,s,in_param,vol_algo,bin_name:ansistring; out_param,s,in_param,vol_algo,bin_name:ansistring;
vol_size:qword; vol_size:qword;
skipping to change at line 34728 skipping to change at line 34707
5: vol_algo:='SHA256'; 5: vol_algo:='SHA256';
6: vol_algo:='BLAKE2S'; 6: vol_algo:='BLAKE2S';
7: vol_algo:='RIPEMD160'; 7: vol_algo:='RIPEMD160';
8: vol_algo:='SHA1'; 8: vol_algo:='SHA1';
9: vol_algo:='MD5'; 9: vol_algo:='MD5';
10: vol_algo:='CRC64'; 10: vol_algo:='CRC64';
11: vol_algo:='CRC32'; 11: vol_algo:='CRC32';
12: vol_algo:='ADLER32'; 12: vol_algo:='ADLER32';
13: vol_algo:='NOALGO'; 13: vol_algo:='NOALGO';
end; end;
out_param:=delimiter+escapefilename(out_param,desk_env)+delimiter; out_param:=stringdelim(checkescapedoutname(escapefilename(out_param,desk_env)
in_param:=delimiter+escapefilename(Form_peach.StringGrid1.Cells[8,1],desk_env ));
)+delimiter; in_param:=stringdelim(escapefilename(Form_peach.StringGrid1.Cells[8,1],desk_e
bin_name:=delimiter+escapefilename(executable_path,desk_env)+'res'+DirectoryS nv));
eparator+'pea'+EXEEXT+delimiter; bin_name:=stringdelim(escapefilename(executable_path,desk_env)+'res'+Director
ySeparator+'pea'+EXEEXT);
cl:=bin_name+' '+fun+' '+out_param+' '+inttostr(vol_size)+' '+vol_algo+' BATC H '+in_param; cl:=bin_name+' '+fun+' '+out_param+' '+inttostr(vol_size)+' '+vol_algo+' BATC H '+in_param;
jobcode:=formatdatetime('yyyymmdd_hh.nn.ss.ms',now)+fun; jobcode:=formatdatetime('yyyymmdd_hh.nn.ss.ms',now)+fun;
compose_rfs_cl:=0; compose_rfs_cl:=0;
end; end;
function compose_unpea_cl(var cl,jobcode,outname:ansistring):integer; function compose_unpea_cl(var cl,jobcode,outname:ansistring):integer;
var var
attr_param,out_param,in_param,bin_name,s,pw:ansistring; attr_param,out_param,in_param,bin_name,s,pw:ansistring;
begin begin
compose_unpea_cl:=-1; compose_unpea_cl:=-1;
skipping to change at line 34755 skipping to change at line 34734
if control_outpath(out_param)<>0 then exit; if control_outpath(out_param)<>0 then exit;
if out_param<>'' then if out_param<>'' then
if out_param[length(out_param)]<>directoryseparator then out_param:=out_param +directoryseparator; if out_param[length(out_param)]<>directoryseparator then out_param:=out_param +directoryseparator;
s:=extractfilename(Form_peach.EditOpenIn.Text); s:=extractfilename(Form_peach.EditOpenIn.Text);
if (s='') or (s='<none>') or (s=txt_none) then s:=Form_peach.StringGrid2.Cells[1 ,Form_peach.StringGrid2.Row]; if (s='') or (s='<none>') or (s=txt_none) then s:=Form_peach.StringGrid2.Cells[1 ,Form_peach.StringGrid2.Row];
if upcase(copy(s,length(s)-10,11))='.000001.PEA' then setlength(s,length(s)-11) if upcase(copy(s,length(s)-10,11))='.000001.PEA' then setlength(s,length(s)-11)
else setlength(s,length(s)-4); else setlength(s,length(s)-4);
out_param:=out_param+s; out_param:=out_param+s;
if Form_peach.CheckBoxUnPeaAttributes.State=cbChecked then attr_param:='SETATTR' if Form_peach.CheckBoxUnPeaAttributes.State=cbChecked then attr_param:='SETATTR'
else attr_param:='RESETATTR'; else attr_param:='RESETATTR';
out_param:=delimiter+escapefilename(out_param,desk_env)+delimiter; out_param:=stringdelim(escapefilename(out_param,desk_env));
if Form_peach.labelstatus2.Caption= txt_2_7_ext then if Form_peach.labelstatus2.Caption= txt_2_7_ext then
in_param:=delimiter+escapefilename(Form_peach.StringGrid2.Cells[8,Form_peach. StringGrid2.Row],desk_env)+delimiter in_param:=stringdelim(escapefilename(Form_peach.StringGrid2.Cells[8,Form_peac h.StringGrid2.Row],desk_env))
else else
in_param:=delimiter+escapefilename(Form_peach.EditOpenIn.Text,desk_env)+delim in_param:=stringdelim(escapefilename(Form_peach.EditOpenIn.Text,desk_env));
iter; bin_name:=stringdelim(escapefilename(executable_path,desk_env)+'res'+DirectorySe
bin_name:=delimiter+escapefilename(executable_path,desk_env)+'res'+DirectorySepa parator+'pea'+EXEEXT);
rator+'pea'+EXEEXT+delimiter;
if fun='UNPEA' then if fun='UNPEA' then
begin begin
pw:=FormPW.EditUn7zaPW.Text; pw:=FormPW.EditUn7zaPW.Text;
if (FormPW.EditUn7zaPW.Text<>'') or (FormPW.EditName3.Text<>'') then if (FormPW.EditUn7zaPW.Text<>'') or (FormPW.EditName3.Text<>'') then
begin begin
cl:=bin_name+' '+fun+' '+in_param+' '+out_param+' RESETDATE '+attr_param+' EXTRACT2DIR BATCH'; cl:=bin_name+' '+fun+' '+in_param+' '+out_param+' RESETDATE '+attr_param+' EXTRACT2DIR BATCH';
if FormPW.EditUn7zaPW.Text<>'' then if FormPW.EditUn7zaPW.Text<>'' then
cl:=cl+' '+delimiter+FormPW.EditUn7zaPW.Text+delimiter cl:=cl+' '+stringdelim(FormPW.EditUn7zaPW.Text)
else else
cl:=cl+' default'; cl:=cl+' default';
if FormPW.EditName3.Text<>'' then if FormPW.EditName3.Text<>'' then
if prepend_keyfile(pw,FormPW.EditName3.Text)=0 then if prepend_keyfile(pw,FormPW.EditName3.Text)=0 then
cl:=cl+' '+delimiter+FormPW.EditName3.Text+delimiter cl:=cl+' '+stringdelim(FormPW.EditName3.Text)
else else
begin begin
pMessageErrorOK(FormPW.EditName3.Text+' '+txt_keyfile_not_found); pMessageErrorOK(FormPW.EditName3.Text+' '+txt_keyfile_not_found);
exit; exit;
end end
else cl:=cl+' NOKEYFILE'; else cl:=cl+' NOKEYFILE';
end end
else cl:=bin_name+' '+fun+' '+in_param+' '+out_param+' RESETDATE '+attr_param +' EXTRACT2DIR INTERACTIVE'; else cl:=bin_name+' '+fun+' '+in_param+' '+out_param+' RESETDATE '+attr_param +' EXTRACT2DIR INTERACTIVE';
if pw<>'' then if pw<>'' then
if pw4cl('',pw)<>0 then if pw4cl('',pw)<>0 then
begin begin
msg_pw_errorchar; msg_pw_errorchar(pw);
exit; exit;
end; end;
end; end;
if fun='RFJ' then cl:=bin_name+' '+fun+' '+in_param+' BATCH '+out_param; if fun='RFJ' then cl:=bin_name+' '+fun+' '+in_param+' BATCH '+out_param;
if (fun<>'UNPEA') and (fun<>'RFJ') then if (fun<>'UNPEA') and (fun<>'RFJ') then
begin begin
pMessageErrorOK(txt_error_function); pMessageErrorOK(txt_error_function);
exit; exit;
end; end;
jobcode:=formatdatetime('yyyymmdd_hh.nn.ss.ms',now)+fun; jobcode:=formatdatetime('yyyymmdd_hh.nn.ss.ms',now)+fun;
skipping to change at line 34823 skipping to change at line 34802
if out_param<>'' then if DirectoryExists(out_param) then else CreateDir(out_p aram); if out_param<>'' then if DirectoryExists(out_param) then else CreateDir(out_p aram);
filesetattr(ptmpdir, faHidden); filesetattr(ptmpdir, faHidden);
end end
else //check path to avoid extraction in peazip's temporary path, switch out of first temporary level (by default archive's path) else //check path to avoid extraction in peazip's temporary path, switch out of first temporary level (by default archive's path)
if control_outpath(out_param)<>0 then exit; if control_outpath(out_param)<>0 then exit;
if out_param<>'' then if out_param<>'' then
if out_param[length(out_param)]<>directoryseparator then out_param:=out_param +directoryseparator; if out_param[length(out_param)]<>directoryseparator then out_param:=out_param +directoryseparator;
//in_param //in_param
if Form_peach.labelstatus2.Caption= txt_2_7_ext then if Form_peach.labelstatus2.Caption= txt_2_7_ext then
in_param:=delimiter+escapefilename(Form_peach.StringGrid2.Cells[8,Form_peach. StringGrid2.Row],desk_env)+delimiter in_param:=stringdelim(escapefilename(Form_peach.StringGrid2.Cells[8,Form_peac h.StringGrid2.Row],desk_env))
else else
in_param:=delimiter+escapefilename(Form_peach.EditOpenIn.Text,desk_env)+delim iter; in_param:=stringdelim(escapefilename(Form_peach.EditOpenIn.Text,desk_env));
//folder policy //folder policy
set_output_folder(out_param,in_param,real_extract,0); set_output_folder(out_param,in_param,real_extract,0);
if out_param<>'' then if out_param<>'' then
if out_param[length(out_param)]<>directoryseparator then out_param:=out_param +directoryseparator; if out_param[length(out_param)]<>directoryseparator then out_param:=out_param +directoryseparator;
if Form_peach.labelstatus2.Caption= txt_2_7_ext then if Form_peach.labelstatus2.Caption= txt_2_7_ext then
s1:=extractfilename(Form_peach.StringGrid2.Cells[8,Form_peach.StringGrid2.Row ]) s1:=extractfilename(Form_peach.StringGrid2.Cells[8,Form_peach.StringGrid2.Row ])
else else
s1:=extractfilename(Form_peach.EditOpenIn.Text); s1:=extractfilename(Form_peach.EditOpenIn.Text);
cutextension(s1); cutextension(s1);
out_param:=out_param+s1; out_param:=out_param+s1;
skipping to change at line 34848 skipping to change at line 34827
outname:=out_param; outname:=out_param;
if Form_peach.labelstatus2.Caption= txt_2_7_ext then if Form_peach.labelstatus2.Caption= txt_2_7_ext then
lpaq_ver:=copy(extractfileext(Form_peach.StringGrid2.Cells[8,Form_peach.Strin gGrid2.Row]),2,length(extractfileext(Form_peach.StringGrid2.Cells[8,Form_peach.S tringGrid2.Row]))-1) lpaq_ver:=copy(extractfileext(Form_peach.StringGrid2.Cells[8,Form_peach.Strin gGrid2.Row]),2,length(extractfileext(Form_peach.StringGrid2.Cells[8,Form_peach.S tringGrid2.Row]))-1)
else else
lpaq_ver:=copy(extractfileext(Form_peach.EditOpenIn.Text),2,length(extractfil eext(Form_peach.EditOpenIn.Text))-1); lpaq_ver:=copy(extractfileext(Form_peach.EditOpenIn.Text),2,length(extractfil eext(Form_peach.EditOpenIn.Text))-1);
if fileexists((out_param)) then if fileexists((out_param)) then
if pMessageWarningYesNo(out_param+' '+txt_confirm_overwrite)<>6 then exit if pMessageWarningYesNo(out_param+' '+txt_confirm_overwrite)<>6 then exit
else else
if real_extract=true then clearfile(out_param); if real_extract=true then clearfile(out_param);
if not(DirectoryExists(extractfilepath(out_param))) then CreateDir(extractfilepa th(out_param)); if not(DirectoryExists(extractfilepath(out_param))) then CreateDir(extractfilepa th(out_param));
if out_param<>'' then out_param:=delimiter+escapefilename(out_param,desk_env)+de if out_param<>'' then out_param:=stringdelim(escapefilename(out_param,desk_env))
limiter; ;
bin_name:=delimiter+escapefilename(executable_path,desk_env)+'res'+DirectorySepa bin_name:=stringdelim(escapefilename(executable_path,desk_env)+'res'+DirectorySe
rator+'lpaq'+DirectorySeparator+lpaq_ver+EXEEXT+delimiter; parator+'lpaq'+DirectorySeparator+lpaq_ver+EXEEXT);
cl:=bin_name+' d '+in_param+' '+out_param; cl:=bin_name+' d '+in_param+' '+out_param;
jobcode:=formatdatetime('yyyymmdd_hh.nn.ss.ms_',now)+fun; jobcode:=formatdatetime('yyyymmdd_hh.nn.ss.ms_',now)+fun;
compose_unlpaq_cl:=0; compose_unlpaq_cl:=0;
end; end;
function compose_unpaq_cl(var cl,jobcode,outname:ansistring; real_extract:boolea n):integer; function compose_unpaq_cl(var cl,jobcode,outname:ansistring; real_extract:boolea n):integer;
var var
out_param,in_param,bin_name,paq_ver:ansistring; out_param,in_param,bin_name,paq_ver:ansistring;
begin begin
compose_unpaq_cl:=-1; compose_unpaq_cl:=-1;
fun:='PAQ'; fun:='PAQ';
subfun:='extract'; subfun:='extract';
btfun:='unpaq'; btfun:='unpaq';
set_output_option(out_param); set_output_option(out_param);
if control_outpath(out_param)<>0 then exit; if control_outpath(out_param)<>0 then exit;
//in_param //in_param
if Form_peach.labelstatus2.Caption= txt_2_7_ext then if Form_peach.labelstatus2.Caption= txt_2_7_ext then
in_param:=delimiter+escapefilename(Form_peach.StringGrid2.Cells[8,Form_peach. StringGrid2.Row],desk_env)+delimiter in_param:=stringdelim(escapefilename(Form_peach.StringGrid2.Cells[8,Form_peac h.StringGrid2.Row],desk_env))
else else
in_param:=delimiter+escapefilename(Form_peach.EditOpenIn.Text,desk_env)+delim iter; in_param:=stringdelim(escapefilename(Form_peach.EditOpenIn.Text,desk_env));
//folder policy //folder policy
set_output_folder(out_param,in_param,real_extract,0); set_output_folder(out_param,in_param,real_extract,0);
if out_param<>'' then if out_param<>'' then
if out_param[length(out_param)]=directoryseparator then out_param:=copy(out_p aram,1,length(out_param)-1); if out_param[length(out_param)]=directoryseparator then out_param:=copy(out_p aram,1,length(out_param)-1);
outname:=out_param; //PAQ will skip extraction over existing object outname:=out_param; //PAQ will skip extraction over existing object
//PAQ version, by extension; supported versions, as PAQ8F, must use -d switch fo r extraction and must follow extension convention with extension=name of the exe cutable: .PAQ?* where ? is release level and * is the variant //PAQ version, by extension; supported versions, as PAQ8F, must use -d switch fo r extraction and must follow extension convention with extension=name of the exe cutable: .PAQ?* where ? is release level and * is the variant
if Form_peach.labelstatus2.Caption= txt_2_7_ext then if Form_peach.labelstatus2.Caption= txt_2_7_ext then
paq_ver:=copy(extractfileext(Form_peach.StringGrid2.Cells[8,Form_peach.String Grid2.Row]),2,length(extractfileext(Form_peach.StringGrid2.Cells[8,Form_peach.St ringGrid2.Row]))-1) paq_ver:=copy(extractfileext(Form_peach.StringGrid2.Cells[8,Form_peach.String Grid2.Row]),2,length(extractfileext(Form_peach.StringGrid2.Cells[8,Form_peach.St ringGrid2.Row]))-1)
else else
paq_ver:=copy(extractfileext(Form_peach.EditOpenIn.Text),2,length(extractfile ext(Form_peach.EditOpenIn.Text))-1); paq_ver:=copy(extractfileext(Form_peach.EditOpenIn.Text),2,length(extractfile ext(Form_peach.EditOpenIn.Text))-1);
if out_param<>'' then out_param:=delimiter+escapefilename(out_param,desk_env)+de if out_param<>'' then out_param:=stringdelim(escapefilename(out_param,desk_env))
limiter; ;
bin_name:=delimiter+escapefilename(executable_path,desk_env)+'res'+DirectorySepa bin_name:=stringdelim(escapefilename(executable_path,desk_env)+'res'+DirectorySe
rator+'paq'+DirectorySeparator+paq_ver+EXEEXT+delimiter; parator+'paq'+DirectorySeparator+paq_ver+EXEEXT);
cl:=bin_name+' -d '+in_param+' '+out_param; cl:=bin_name+' -d '+in_param+' '+out_param;
jobcode:=formatdatetime('yyyymmdd_hh.nn.ss.ms_',now)+fun; jobcode:=formatdatetime('yyyymmdd_hh.nn.ss.ms_',now)+fun;
compose_unpaq_cl:=0; compose_unpaq_cl:=0;
end; end;
function compose_zpaq_cl(var cl,jobcode,outname,sel:ansistring):integer; function compose_zpaq_cl(var cl,jobcode,outname,sel:ansistring):integer;
var var
s,out_param,in_param,bin_name,compression_level,paq_ver,pw:ansistring; s,out_param,in_param,bin_name,compression_level,paq_ver,pw:ansistring;
begin begin
compose_zpaq_cl:=-1; compose_zpaq_cl:=-1;
skipping to change at line 34921 skipping to change at line 34900
apply_timestamptoname(s,1,0,'file'); apply_timestamptoname(s,1,0,'file');
get_new_archive_name(s);//check if name, with extension, exists get_new_archive_name(s);//check if name, with extension, exists
out_param:=s; out_param:=s;
outname:=out_param; outname:=out_param;
case Form_peach.ComboBoxPAQ1.ItemIndex of case Form_peach.ComboBoxPAQ1.ItemIndex of
0: compression_level:='1'; 0: compression_level:='1';
1: compression_level:='3'; 1: compression_level:='3';
2: compression_level:='6'; 2: compression_level:='6';
3: compression_level:='9'; 3: compression_level:='9';
end; end;
out_param:=delimiter+escapefilename(out_param,desk_env)+delimiter; out_param:=stringdelim(checkescapedoutname(escapefilename(out_param,desk_e nv)));
get_in_param(in_param,sel); get_in_param(in_param,sel);
bin_name:=delimiter+escapefilename(executable_path,desk_env)+'res'+Directo rySeparator+'lpaq'+DirectorySeparator+paq_ver+EXEEXT+delimiter; bin_name:=stringdelim(escapefilename(executable_path,desk_env)+'res'+Direc torySeparator+'lpaq'+DirectorySeparator+paq_ver+EXEEXT);
cl:=bin_name+' '+compression_level+' '+in_param+' '+out_param; cl:=bin_name+' '+compression_level+' '+in_param+' '+out_param;
end; end;
1: begin 1: begin
paq_ver:='paq8o'; paq_ver:='paq8o';
subfun:='archive'; subfun:='archive';
updatecontent(Form_peach.StringGrid1,tvolumes,tdirs,tfiles,tsize,false); updatecontent(Form_peach.StringGrid1,tvolumes,tdirs,tfiles,tsize,false);
setspecialtsize; setspecialtsize;
//check if input is suitable for chosen archive_type //check if input is suitable for chosen archive_type
if check_input<>0 then exit; if check_input<>0 then exit;
//output name //output name
skipping to change at line 34949 skipping to change at line 34928
out_param:=s; out_param:=s;
//Compression level; PAQ versions supported uses -0..8 as PAQ8F //Compression level; PAQ versions supported uses -0..8 as PAQ8F
//compression_level:='-'+inttostr(Form_peach.ComboBoxPAQ1.ItemIndex); //compression_level:='-'+inttostr(Form_peach.ComboBoxPAQ1.ItemIndex);
case Form_peach.ComboBoxPAQ1.ItemIndex of case Form_peach.ComboBoxPAQ1.ItemIndex of
0: compression_level:='-1'; 0: compression_level:='-1';
1: compression_level:='-3'; 1: compression_level:='-3';
2: compression_level:='-5'; 2: compression_level:='-5';
3: compression_level:='-7'; 3: compression_level:='-7';
end; end;
outname:=out_param+'.'+paq_ver; outname:=out_param+'.'+paq_ver;
out_param:=delimiter+escapefilename(out_param,desk_env)+delimiter; out_param:=stringdelim(checkescapedoutname(escapefilename(out_param,desk_e nv)));
get_in_param(in_param,sel); get_in_param(in_param,sel);
bin_name:=delimiter+escapefilename(executable_path,desk_env)+'res'+Directo rySeparator+'paq'+DirectorySeparator+paq_ver+EXEEXT+delimiter; bin_name:=stringdelim(escapefilename(executable_path,desk_env)+'res'+Direc torySeparator+'paq'+DirectorySeparator+paq_ver+EXEEXT);
cl:=bin_name+' '+compression_level+' '+out_param; cl:=bin_name+' '+compression_level+' '+out_param;
if out_param<>trimright(in_param) then cl:=cl+' '+in_param; if out_param<>trimright(in_param) then cl:=cl+' '+in_param;
end; end;
2: begin 2: begin
paq_ver:='zpaq'; paq_ver:='zpaq';
subfun:='archive'; subfun:='archive';
updatecontent(Form_peach.StringGrid1,tvolumes,tdirs,tfiles,tsize,false); updatecontent(Form_peach.StringGrid1,tvolumes,tdirs,tfiles,tsize,false);
setspecialtsize; setspecialtsize;
//check if input is suitable for chosen archive_type //check if input is suitable for chosen archive_type
if check_input<>0 then exit; if check_input<>0 then exit;
skipping to change at line 34987 skipping to change at line 34966
if FormPW.EditName3.Text<>'' then if FormPW.EditName3.Text<>'' then
if prepend_keyfile(pw,FormPW.EditName3.Text)<>0 then if prepend_keyfile(pw,FormPW.EditName3.Text)<>0 then
begin begin
pMessageErrorOK(FormPW.EditName3.Text+' '+txt_keyfile_not_found); pMessageErrorOK(FormPW.EditName3.Text+' '+txt_keyfile_not_found);
exit; exit;
end; end;
if pw<>'' then if pw<>'' then
begin begin
if pw4cl('',pw)<>0 then if pw4cl('',pw)<>0 then
begin begin
msg_pw_errorchar; msg_pw_errorchar(pw);
exit; exit;
end; end;
pw:='-key '+pw; pw:='-key '+pw;
end; end;
outname:=out_param+'.zpaq'; outname:=out_param+'.zpaq';
out_param:=delimiter+escapefilename(out_param,desk_env)+'.zpaq'+delimiter; out_param:=stringdelim(checkescapedoutname(escapefilename(out_param,desk_e nv))+'.zpaq');
get_in_param_zpaq(in_param,sel); get_in_param_zpaq(in_param,sel);
bin_name:=delimiter+escapefilename(executable_path,desk_env)+'res'+Directo rySeparator+'zpaq'+DirectorySeparator+'zpaq'+EXEEXT+delimiter; bin_name:=stringdelim(escapefilename(executable_path,desk_env)+'res'+Direc torySeparator+'zpaq'+DirectorySeparator+'zpaq'+EXEEXT);
cl:=bin_name; cl:=bin_name;
if pw<>'' then cl:=cl+' '+pw; if pw<>'' then cl:=cl+' '+pw;
cl:=cl+' '+compression_level+' '+out_param+' '+in_param; cl:=cl+' '+compression_level+' '+out_param+' '+in_param;
end; end;
end; end;
jobcode:=formatdatetime('yyyymmdd_hh.nn.ss.ms_',now)+fun; jobcode:=formatdatetime('yyyymmdd_hh.nn.ss.ms_',now)+fun;
compose_zpaq_cl:=0; compose_zpaq_cl:=0;
end; end;
function compose_unzpaq_cl(var cl,jobcode,outname:ansistring; real_extract:boole an; mode,selection:ansistring):integer; function compose_unzpaq_cl(var cl,jobcode,outname:ansistring; real_extract:boole an; mode,selection:ansistring):integer;
var var
out_param,in_param,bin_name,modefun,pw:ansistring; out_param,in_param,bin_name,modefun,pw:ansistring;
begin begin
compose_unzpaq_cl:=-1; compose_unzpaq_cl:=-1;
subfun:='extract'; subfun:='extract';
btfun:='unzpaq'; btfun:='unzpaq';
set_output_option(out_param); set_output_option(out_param);
if control_outpath(out_param)<>0 then exit; if control_outpath(out_param)<>0 then exit;
//in_param //in_param
if Form_peach.labelstatus2.Caption= txt_2_7_ext then if Form_peach.labelstatus2.Caption= txt_2_7_ext then
in_param:=delimiter+escapefilename(Form_peach.StringGrid2.Cells[8,Form_peach. StringGrid2.Row],desk_env)+delimiter in_param:=stringdelim(escapefilename(Form_peach.StringGrid2.Cells[8,Form_peac h.StringGrid2.Row],desk_env))
else else
in_param:=delimiter+escapefilename(Form_peach.EditOpenIn.Text,desk_env)+delim iter; in_param:=stringdelim(escapefilename(Form_peach.EditOpenIn.Text,desk_env));
//folder policy //folder policy
if mode<>'draganddrop' then set_output_folder(out_param,in_param,real_extract,0) ; if mode<>'draganddrop' then set_output_folder(out_param,in_param,real_extract,0) ;
if out_param<>'' then if out_param<>'' then
if out_param[length(out_param)]=directoryseparator then out_param:=copy(out_p aram,1,length(out_param)-1); if out_param[length(out_param)]=directoryseparator then out_param:=copy(out_p aram,1,length(out_param)-1);
outname:=out_param; outname:=out_param;
if out_param<>'' then out_param:=delimiter+escapefilename(out_param,desk_env)+'/ if out_param<>'' then out_param:=stringdelim(escapefilename(out_param,desk_env)+
'+delimiter; //was needed by 4.04 '/'); //was needed by 4.04
bin_name:=delimiter+escapefilename(executable_path,desk_env)+'res'+DirectorySepa bin_name:=stringdelim(escapefilename(executable_path,desk_env)+'res'+DirectorySe
rator+'zpaq'+DirectorySeparator+'zpaq'+EXEEXT+delimiter; parator+'zpaq'+DirectorySeparator+'zpaq'+EXEEXT);
if mode='list' then modefun:='l' if mode='list' then modefun:='l'
else modefun:='x'; else modefun:='x';
pw:=FormPW.EditUn7zaPW.Text; pw:=FormPW.EditUn7zaPW.Text;
if FormPW.EditName3.Text<>'' then if FormPW.EditName3.Text<>'' then
if prepend_keyfile(pw,FormPW.EditName3.Text)<>0 then if prepend_keyfile(pw,FormPW.EditName3.Text)<>0 then
begin begin
pMessageErrorOK(FormPW.EditName3.Text+' '+txt_keyfile_not_found); pMessageErrorOK(FormPW.EditName3.Text+' '+txt_keyfile_not_found);
exit; exit;
end; end;
if pw<>'' then if pw<>'' then
begin begin
if pw4cl('',pw)<>0 then if pw4cl('',pw)<>0 then
begin begin
msg_pw_errorchar; msg_pw_errorchar(pw);
exit; exit;
end; end;
pw:='-key '+pw; pw:='-key '+pw;
end; end;
cl:=bin_name; cl:=bin_name;
if pw<>'' then cl:=cl+' '+pw; if pw<>'' then cl:=cl+' '+pw;
//partial selection is currently unsupported //partial selection is currently unsupported
case mode of case mode of
'list': 'list':
cl:=cl+' '+modefun+' '+in_param; cl:=cl+' '+modefun+' '+in_param;
skipping to change at line 35108 skipping to change at line 35087
end; end;
if (Form_peach.ComboBoxUPX.ItemIndex=0) and (Form_peach.CheckBoxUPX1.State=cbUnc hecked) then if (Form_peach.ComboBoxUPX.ItemIndex=0) and (Form_peach.CheckBoxUPX1.State=cbUnc hecked) then
begin begin
pMessageWarningOK(txt_upxorstrip); pMessageWarningOK(txt_upxorstrip);
exit; exit;
end; end;
if Form_peach.ComboBoxUPX.ItemIndex=10 then compression_level:='--best' if Form_peach.ComboBoxUPX.ItemIndex=10 then compression_level:='--best'
else compression_level:='-'+inttostr((Form_peach.ComboBoxUPX.ItemIndex)); else compression_level:='-'+inttostr((Form_peach.ComboBoxUPX.ItemIndex));
get_in_param(in_param,sel); get_in_param(in_param,sel);
outname:=escapefilename(Form_peach.StringGrid1.Cells[8,1],desk_env); outname:=escapefilename(Form_peach.StringGrid1.Cells[8,1],desk_env);
bin_name:=delimiter+escapefilename(executable_path,desk_env)+'res'+DirectorySepa rator+'upx'+DirectorySeparator+'upx'+EXEEXT+delimiter; bin_name:=stringdelim(escapefilename(executable_path,desk_env)+'res'+DirectorySe parator+'upx'+DirectorySeparator+'upx'+EXEEXT);
cl:=bin_name+' '+compression_level; cl:=bin_name+' '+compression_level;
cl:=cl+' '+in_param; cl:=cl+' '+in_param;
jobcode:=formatdatetime('yyyymmdd_hh.nn.ss.ms_',now)+fun; jobcode:=formatdatetime('yyyymmdd_hh.nn.ss.ms_',now)+fun;
//do backup (silent) before strip/upx //do backup (silent) before strip/upx
if Form_peach.CheckBoxUPX2.State=cbChecked then if Form_peach.CheckBoxUPX2.State=cbChecked then
begin begin
assignfile(fin,Form_peach.StringGrid1.Cells[8,1]); assignfile(fin,Form_peach.StringGrid1.Cells[8,1]);
filemode:=0; filemode:=0;
reset(fin); reset(fin);
assignfile(fout,Form_peach.StringGrid1.Cells[8,1]+'.backup'); assignfile(fout,Form_peach.StringGrid1.Cells[8,1]+'.backup');
skipping to change at line 35178 skipping to change at line 35157
exit; exit;
end; end;
//output name //output name
getarch_baseoutname(s); getarch_baseoutname(s);
apply_timestamptoname(s,1,0,'file'); apply_timestamptoname(s,1,0,'file');
//max Compression mode on/off //max Compression mode on/off
exetype:=Form_peach.RadioGroupQuad.Items[Form_peach.RadioGroupQuad.ItemIndex]; exetype:=Form_peach.RadioGroupQuad.Items[Form_peach.RadioGroupQuad.ItemIndex];
out_param:=s+'.br'; out_param:=s+'.br';
get_new_archive_name(out_param); get_new_archive_name(out_param);
outname:=out_param; outname:=out_param;
out_param:=delimiter+escapefilename(out_param,desk_env)+delimiter; out_param:=stringdelim(checkescapedoutname(escapefilename(out_param,desk_env)));
get_in_param(in_param,sel); get_in_param(in_param,sel);
bin_name:=delimiter+escapefilename(executable_path,desk_env)+'res'+DirectorySepa rator+'brotli'+DirectorySeparator+'brotli'+EXEEXT+delimiter; bin_name:=stringdelim(escapefilename(executable_path,desk_env)+'res'+DirectorySe parator+'brotli'+DirectorySeparator+'brotli'+EXEEXT);
cl:=bin_name; cl:=bin_name;
compression_level:='-'+Form_peach.ComboBoxArchive9.Text; compression_level:='-'+Form_peach.ComboBoxArchive9.Text;
cl:=cl+' '+compression_level; cl:=cl+' '+compression_level;
if Form_peach.CheckBoxBrotli.Checked=true then cl:=cl+' --large_window=27'; if Form_peach.CheckBoxBrotli.Checked=true then cl:=cl+' --large_window=27';
cl:=cl+' '+in_param+' -o '+out_param; cl:=cl+' '+in_param+' -o '+out_param;
jobcode:=formatdatetime('yyyymmdd_hh.nn.ss.ms_',now)+fun; jobcode:=formatdatetime('yyyymmdd_hh.nn.ss.ms_',now)+fun;
result:=0; result:=0;
end; end;
function compose_unbrotli_cl(var cl,jobcode,outname:ansistring; real_extract:boo lean; mode,selection:ansistring):integer; function compose_unbrotli_cl(var cl,jobcode,outname:ansistring; real_extract:boo lean; mode,selection:ansistring):integer;
skipping to change at line 35214 skipping to change at line 35193
if out_param<>'' then if DirectoryExists(out_param) then else CreateDir(out_p aram); if out_param<>'' then if DirectoryExists(out_param) then else CreateDir(out_p aram);
filesetattr(ptmpdir, faHidden); filesetattr(ptmpdir, faHidden);
end end
else //check path to avoid extraction in peazip's temporary path, switch out of first temporary level (by default archive's path) else //check path to avoid extraction in peazip's temporary path, switch out of first temporary level (by default archive's path)
if control_outpath(out_param)<>0 then exit; if control_outpath(out_param)<>0 then exit;
if out_param<>'' then if out_param<>'' then
if out_param[length(out_param)] <> directoryseparator then out_param:=out_par am+directoryseparator; if out_param[length(out_param)] <> directoryseparator then out_param:=out_par am+directoryseparator;
//in_param //in_param
if Form_peach.labelstatus2.Caption= txt_2_7_ext then if Form_peach.labelstatus2.Caption= txt_2_7_ext then
in_param:=delimiter+escapefilename(Form_peach.StringGrid2.Cells[8,Form_peach. StringGrid2.Row],desk_env)+delimiter in_param:=stringdelim(escapefilename(Form_peach.StringGrid2.Cells[8,Form_peac h.StringGrid2.Row],desk_env))
else else
in_param:=delimiter+escapefilename(Form_peach.EditOpenIn.Text,desk_env)+delim iter; in_param:=stringdelim(escapefilename(Form_peach.EditOpenIn.Text,desk_env));
//folder policy //folder policy
set_output_folder(out_param,in_param,real_extract,0); set_output_folder(out_param,in_param,real_extract,0);
if out_param<>'' then if out_param<>'' then
if out_param[length(out_param)]<>directoryseparator then out_param:=out_param +directoryseparator; if out_param[length(out_param)]<>directoryseparator then out_param:=out_param +directoryseparator;
if Form_peach.labelstatus2.Caption= txt_2_7_ext then if Form_peach.labelstatus2.Caption= txt_2_7_ext then
s1:=extractfilename(Form_peach.StringGrid2.Cells[8,Form_peach.StringGrid2.Row ]) s1:=extractfilename(Form_peach.StringGrid2.Cells[8,Form_peach.StringGrid2.Row ])
else else
s1:=extractfilename(Form_peach.EditOpenIn.Text); s1:=extractfilename(Form_peach.EditOpenIn.Text);
cutextension(s1); cutextension(s1);
out_param:=out_param+s1; out_param:=out_param+s1;
if out_param<>'' then if out_param<>'' then
if out_param[length(out_param)] = directoryseparator then setlength(out_param ,length(out_param)-1); if out_param[length(out_param)] = directoryseparator then setlength(out_param ,length(out_param)-1);
outname:=out_param; outname:=out_param;
if mode<>'test' then if mode<>'test' then
if fileexists((out_param)) then if fileexists((out_param)) then
if pMessageWarningYesNo(out_param+' '+txt_confirm_overwrite)<>6 then exit if pMessageWarningYesNo(out_param+' '+txt_confirm_overwrite)<>6 then exit
else else
if real_extract=true then clearfile(out_param); if real_extract=true then clearfile(out_param);
if not(DirectoryExists(extractfilepath(out_param))) then CreateDir(extractfilepa th(out_param)); if not(DirectoryExists(extractfilepath(out_param))) then CreateDir(extractfilepa th(out_param));
if out_param<>'' then out_param:=delimiter+escapefilename(out_param,desk_env)+de if out_param<>'' then out_param:=stringdelim(escapefilename(out_param,desk_env))
limiter; ;
bin_name:=delimiter+escapefilename(executable_path,desk_env)+'res'+DirectorySepa bin_name:=stringdelim(escapefilename(executable_path,desk_env)+'res'+DirectorySe
rator+'brotli'+DirectorySeparator+'brotli'+EXEEXT+delimiter; parator+'brotli'+DirectorySeparator+'brotli'+EXEEXT);
if mode<>'test' then cl:=bin_name+' -d '+in_param+' -o '+out_param if mode<>'test' then cl:=bin_name+' -d '+in_param+' -o '+out_param
else cl:=bin_name+' -t '+in_param; else cl:=bin_name+' -t '+in_param;
jobcode:=formatdatetime('yyyymmdd_hh.nn.ss.ms_',now)+fun; jobcode:=formatdatetime('yyyymmdd_hh.nn.ss.ms_',now)+fun;
result:=0; result:=0;
end; end;
function compose_zstd_cl(var cl,jobcode,outname,sel:ansistring):integer; function compose_zstd_cl(var cl,jobcode,outname,sel:ansistring):integer;
var var
s,out_param,in_param,bin_name,compression_level,exetype:ansistring; s,out_param,in_param,bin_name,compression_level,exetype:ansistring;
begin begin
skipping to change at line 35270 skipping to change at line 35249
exit; exit;
end; end;
//output name //output name
getarch_baseoutname(s); getarch_baseoutname(s);
apply_timestamptoname(s,1,0,'file'); apply_timestamptoname(s,1,0,'file');
//max Compression mode on/off //max Compression mode on/off
exetype:=Form_peach.RadioGroupQuad.Items[Form_peach.RadioGroupQuad.ItemIndex]; exetype:=Form_peach.RadioGroupQuad.Items[Form_peach.RadioGroupQuad.ItemIndex];
out_param:=s+'.zst'; out_param:=s+'.zst';
get_new_archive_name(out_param); get_new_archive_name(out_param);
outname:=out_param; outname:=out_param;
out_param:=delimiter+escapefilename(out_param,desk_env)+delimiter; out_param:=stringdelim(checkescapedoutname(escapefilename(out_param,desk_env)));
get_in_param(in_param,sel); get_in_param(in_param,sel);
bin_name:=delimiter+escapefilename(executable_path,desk_env)+'res'+DirectorySepa rator+'zstd'+DirectorySeparator+'zstd'+EXEEXT+delimiter; bin_name:=stringdelim(escapefilename(executable_path,desk_env)+'res'+DirectorySe parator+'zstd'+DirectorySeparator+'zstd'+EXEEXT);
cl:=bin_name; cl:=bin_name;
compression_level:='-'+Form_peach.ComboBoxArchive9.Text; compression_level:='-'+Form_peach.ComboBoxArchive9.Text;
cl:=cl+' -T0 -q '+compression_level; cl:=cl+' -T0 -q '+compression_level;
if Form_peach.CheckBoxZstd.Checked=true then cl:=cl+' --long=27'; if Form_peach.CheckBoxZstd.Checked=true then cl:=cl+' --long=27';
cl:=cl+' '+in_param+' -o '+out_param; cl:=cl+' '+in_param+' -o '+out_param;
jobcode:=formatdatetime('yyyymmdd_hh.nn.ss.ms_',now)+fun; jobcode:=formatdatetime('yyyymmdd_hh.nn.ss.ms_',now)+fun;
result:=0; result:=0;
end; end;
function compose_unzstd_cl(var cl,jobcode,outname:ansistring; real_extract:boole an; mode,selection:ansistring):integer; function compose_unzstd_cl(var cl,jobcode,outname:ansistring; real_extract:boole an; mode,selection:ansistring):integer;
skipping to change at line 35306 skipping to change at line 35285
if out_param<>'' then if DirectoryExists(out_param) then else CreateDir(out_p aram); if out_param<>'' then if DirectoryExists(out_param) then else CreateDir(out_p aram);
filesetattr(ptmpdir, faHidden); filesetattr(ptmpdir, faHidden);
end end
else //check path to avoid extraction in peazip's temporary path, switch out of first temporary level (by default archive's path) else //check path to avoid extraction in peazip's temporary path, switch out of first temporary level (by default archive's path)
if control_outpath(out_param)<>0 then exit; if control_outpath(out_param)<>0 then exit;
if out_param<>'' then if out_param<>'' then
if out_param[length(out_param)] <> directoryseparator then out_param:=out_par am+directoryseparator; if out_param[length(out_param)] <> directoryseparator then out_param:=out_par am+directoryseparator;
//in_param //in_param
if Form_peach.labelstatus2.Caption= txt_2_7_ext then if Form_peach.labelstatus2.Caption= txt_2_7_ext then
in_param:=delimiter+escapefilename(Form_peach.StringGrid2.Cells[8,Form_peach. StringGrid2.Row],desk_env)+delimiter in_param:=stringdelim(escapefilename(Form_peach.StringGrid2.Cells[8,Form_peac h.StringGrid2.Row],desk_env))
else else
in_param:=delimiter+escapefilename(Form_peach.EditOpenIn.Text,desk_env)+delim iter; in_param:=stringdelim(escapefilename(Form_peach.EditOpenIn.Text,desk_env));
//folder policy //folder policy
set_output_folder(out_param,in_param,real_extract,0); set_output_folder(out_param,in_param,real_extract,0);
if out_param<>'' then if out_param<>'' then
if out_param[length(out_param)]<>directoryseparator then out_param:=out_param +directoryseparator; if out_param[length(out_param)]<>directoryseparator then out_param:=out_param +directoryseparator;
if Form_peach.labelstatus2.Caption= txt_2_7_ext then if Form_peach.labelstatus2.Caption= txt_2_7_ext then
s1:=extractfilename(Form_peach.StringGrid2.Cells[8,Form_peach.StringGrid2.Row ]) s1:=extractfilename(Form_peach.StringGrid2.Cells[8,Form_peach.StringGrid2.Row ])
else else
s1:=extractfilename(Form_peach.EditOpenIn.Text); s1:=extractfilename(Form_peach.EditOpenIn.Text);
cutextension(s1); cutextension(s1);
out_param:=out_param+s1; out_param:=out_param+s1;
if out_param<>'' then if out_param<>'' then
if out_param[length(out_param)] = directoryseparator then setlength(out_param ,length(out_param)-1); if out_param[length(out_param)] = directoryseparator then setlength(out_param ,length(out_param)-1);
outname:=out_param; outname:=out_param;
if mode<>'test' then if mode<>'test' then
if fileexists((out_param)) then if fileexists((out_param)) then
if pMessageWarningYesNo(out_param+' '+txt_confirm_overwrite)<>6 then exit if pMessageWarningYesNo(out_param+' '+txt_confirm_overwrite)<>6 then exit
else else
if real_extract=true then clearfile(out_param); if real_extract=true then clearfile(out_param);
if not(DirectoryExists(extractfilepath(out_param))) then CreateDir(extractfilepa th(out_param)); if not(DirectoryExists(extractfilepath(out_param))) then CreateDir(extractfilepa th(out_param));
if out_param<>'' then out_param:=delimiter+escapefilename(out_param,desk_env)+de if out_param<>'' then out_param:=stringdelim(escapefilename(out_param,desk_env))
limiter; ;
bin_name:=delimiter+escapefilename(executable_path,desk_env)+'res'+DirectorySepa bin_name:=stringdelim(escapefilename(executable_path,desk_env)+'res'+DirectorySe
rator+'zstd'+DirectorySeparator+'zstd'+EXEEXT+delimiter; parator+'zstd'+DirectorySeparator+'zstd'+EXEEXT);
if mode<>'test' then cl:=bin_name+' -d '+in_param+' -o '+out_param if mode<>'test' then cl:=bin_name+' -d '+in_param+' -o '+out_param
else cl:=bin_name+' -t '+in_param; else cl:=bin_name+' -t '+in_param;
jobcode:=formatdatetime('yyyymmdd_hh.nn.ss.ms_',now)+fun; jobcode:=formatdatetime('yyyymmdd_hh.nn.ss.ms_',now)+fun;
result:=0; result:=0;
end; end;
function compose_quad_cl(var cl,jobcode,outname,sel:ansistring):integer; function compose_quad_cl(var cl,jobcode,outname,sel:ansistring):integer;
var var
s,out_param,in_param,bin_name,compression_level,exetype:ansistring; s,out_param,in_param,bin_name,compression_level,exetype:ansistring;
begin begin
skipping to change at line 35362 skipping to change at line 35341
end; end;
//output name //output name
getarch_baseoutname(s); getarch_baseoutname(s);
apply_timestamptoname(s,1,0,'file'); apply_timestamptoname(s,1,0,'file');
//max Compression mode on/off //max Compression mode on/off
exetype:=Form_peach.RadioGroupQuad.Items[Form_peach.RadioGroupQuad.ItemIndex]; exetype:=Form_peach.RadioGroupQuad.Items[Form_peach.RadioGroupQuad.ItemIndex];
btfun:=exetype; btfun:=exetype;
out_param:=s+'.'+exetype; out_param:=s+'.'+exetype;
get_new_archive_name(out_param);//issue: it adds progressive number after extens ion (it's however quite intuitive to remove) get_new_archive_name(out_param);//issue: it adds progressive number after extens ion (it's however quite intuitive to remove)
outname:=out_param; outname:=out_param;
out_param:=delimiter+escapefilename(out_param,desk_env)+delimiter; out_param:=stringdelim(checkescapedoutname(escapefilename(out_param,desk_env)));
get_in_param(in_param,sel); get_in_param(in_param,sel);
bin_name:=delimiter+escapefilename(executable_path,desk_env)+'res'+DirectorySepa rator+'quad'+DirectorySeparator+exetype+EXEEXT+delimiter; bin_name:=stringdelim(escapefilename(executable_path,desk_env)+'res'+DirectorySe parator+'quad'+DirectorySeparator+exetype+EXEEXT);
cl:=bin_name; cl:=bin_name;
case Form_peach.RadioGroupQuad.ItemIndex of case Form_peach.RadioGroupQuad.ItemIndex of
0: begin 0: begin
if Form_peach.CheckBoxQuadMax.State=cbChecked then compression_level:='-x' if Form_peach.CheckBoxQuadMax.State=cbChecked then compression_level:='-x'
else compression_level:=''; else compression_level:='';
if compression_level<>'' then cl:=cl+' '+compression_level; if compression_level<>'' then cl:=cl+' '+compression_level;
end; end;
1: begin 1: begin
cl:=cl+' e'; cl:=cl+' e';
if Form_peach.CheckBoxQuadMax.State=cbChecked then compression_level:='x' if Form_peach.CheckBoxQuadMax.State=cbChecked then compression_level:='x'
skipping to change at line 35416 skipping to change at line 35395
else //check path to avoid extraction in peazip's temporary path, switch out of first temporary level (by default archive's path) else //check path to avoid extraction in peazip's temporary path, switch out of first temporary level (by default archive's path)
if control_outpath(out_param)<>0 then exit; if control_outpath(out_param)<>0 then exit;
if out_param<>'' then if out_param<>'' then
if out_param[length(out_param)] <> directoryseparator then out_param:=out_par am+directoryseparator; if out_param[length(out_param)] <> directoryseparator then out_param:=out_par am+directoryseparator;
//in_param //in_param
if Form_peach.labelstatus2.Caption= txt_2_7_ext then if Form_peach.labelstatus2.Caption= txt_2_7_ext then
s_in:=Form_peach.StringGrid2.Cells[8,Form_peach.StringGrid2.Row] s_in:=Form_peach.StringGrid2.Cells[8,Form_peach.StringGrid2.Row]
else else
s_in:=Form_peach.EditOpenIn.Text; s_in:=Form_peach.EditOpenIn.Text;
in_param:=delimiter+escapefilename(s_in,desk_env)+delimiter; in_param:=stringdelim(escapefilename(s_in,desk_env));
//folder policy //folder policy
set_output_folder(out_param,in_param,real_extract,0); set_output_folder(out_param,in_param,real_extract,0);
if out_param<>'' then if out_param<>'' then
if out_param[length(out_param)]<>directoryseparator then out_param:=out_param +directoryseparator; if out_param[length(out_param)]<>directoryseparator then out_param:=out_param +directoryseparator;
if Form_peach.labelstatus2.Caption= txt_2_7_ext then if Form_peach.labelstatus2.Caption= txt_2_7_ext then
s1:=extractfilename(Form_peach.StringGrid2.Cells[8,Form_peach.StringGrid2.Row ]) s1:=extractfilename(Form_peach.StringGrid2.Cells[8,Form_peach.StringGrid2.Row ])
else else
s1:=extractfilename(Form_peach.EditOpenIn.Text); s1:=extractfilename(Form_peach.EditOpenIn.Text);
cutextension(s1); cutextension(s1);
out_param:=out_param+s1; out_param:=out_param+s1;
if out_param<>'' then if out_param<>'' then
if out_param[length(out_param)] = directoryseparator then setlength(out_param ,length(out_param)-1); if out_param[length(out_param)] = directoryseparator then setlength(out_param ,length(out_param)-1);
outname:=out_param; outname:=out_param;
if fileexists((out_param)) then if fileexists((out_param)) then
if pMessageWarningYesNo(out_param+' '+txt_confirm_overwrite)<>6 then exit if pMessageWarningYesNo(out_param+' '+txt_confirm_overwrite)<>6 then exit
else else
if real_extract=true then clearfile(out_param); //otherwise QUAD will not overwrite existing files and returns error exit code if real_extract=true then clearfile(out_param); //otherwise QUAD will not overwrite existing files and returns error exit code
if not(DirectoryExists(extractfilepath(out_param))) then CreateDir(extractfilepa th(out_param)); if not(DirectoryExists(extractfilepath(out_param))) then CreateDir(extractfilepa th(out_param));
if out_param<>'' then out_param:=delimiter+escapefilename(out_param,desk_env)+de limiter; if out_param<>'' then out_param:=stringdelim(escapefilename(out_param,desk_env)) ;
if extractfileext(s_in)='.quad' then if extractfileext(s_in)='.quad' then
begin begin
bin_name:=delimiter+escapefilename(executable_path,desk_env)+'res'+DirectoryS eparator+'quad'+DirectorySeparator+'quad'+EXEEXT+delimiter; bin_name:=stringdelim(escapefilename(executable_path,desk_env)+'res'+Director ySeparator+'quad'+DirectorySeparator+'quad'+EXEEXT);
cl:=bin_name+' -d '+in_param+' '+out_param; cl:=bin_name+' -d '+in_param+' '+out_param;
btfun:='unquad'; btfun:='unquad';
end; end;
if extractfileext(s_in)='.bcm' then if extractfileext(s_in)='.bcm' then
begin begin
bin_name:=delimiter+escapefilename(executable_path,desk_env)+'res'+DirectoryS eparator+'quad'+DirectorySeparator+'bcm'+EXEEXT+delimiter; bin_name:=stringdelim(escapefilename(executable_path,desk_env)+'res'+Director ySeparator+'quad'+DirectorySeparator+'bcm'+EXEEXT);
cl:=bin_name+' -d '+in_param+' '+out_param; cl:=bin_name+' -d '+in_param+' '+out_param;
btfun:='unbcm'; btfun:='unbcm';
end; end;
if extractfileext(s_in)='.balz' then if extractfileext(s_in)='.balz' then
begin begin
bin_name:=delimiter+escapefilename(executable_path,desk_env)+'res'+DirectoryS eparator+'quad'+DirectorySeparator+'balz'+EXEEXT+delimiter; bin_name:=stringdelim(escapefilename(executable_path,desk_env)+'res'+Director ySeparator+'quad'+DirectorySeparator+'balz'+EXEEXT);
cl:=bin_name+' d '+in_param+' '+out_param; cl:=bin_name+' d '+in_param+' '+out_param;
btfun:='unbalz'; btfun:='unbalz';
end; end;
jobcode:=formatdatetime('yyyymmdd_hh.nn.ss.ms_',now)+fun; jobcode:=formatdatetime('yyyymmdd_hh.nn.ss.ms_',now)+fun;
compose_unquad_cl:=0; compose_unquad_cl:=0;
end; end;
function compose_unace_cl(var cl,jobcode,outname:ansistring; real_extract:boolea n; mode,selection:ansistring):integer; function compose_unace_cl(var cl,jobcode,outname:ansistring; real_extract:boolea n; mode,selection:ansistring):integer;
var var
out_param,in_param,bin_name,archive_function:ansistring; out_param,in_param,bin_name,archive_function:ansistring;
skipping to change at line 35474 skipping to change at line 35453
if libre_directive>0 then begin reportnotsupported_info('ACE'); exit; end; if libre_directive>0 then begin reportnotsupported_info('ACE'); exit; end;
subfun:='extract'; subfun:='extract';
btfun:='unace'; btfun:='unace';
set_output_option(out_param); set_output_option(out_param);
if (mode='ext') or (mode='extandrun') or ((mode='neutral') and (Form_peach.Radio GroupAction1.ItemIndex<2)) then if (mode='ext') or (mode='extandrun') or ((mode='neutral') and (Form_peach.Radio GroupAction1.ItemIndex<2)) then
if control_outpath(out_param)<>0 then exit; if control_outpath(out_param)<>0 then exit;
if out_param<>'' then if out_param<>'' then
if out_param[length(out_param)] <> directoryseparator then out_param:=out_par am+directoryseparator; if out_param[length(out_param)] <> directoryseparator then out_param:=out_par am+directoryseparator;
//in_param //in_param
if Form_peach.labelstatus2.Caption= txt_2_7_ext then if Form_peach.labelstatus2.Caption= txt_2_7_ext then
in_param:=delimiter+escapefilename(Form_peach.StringGrid2.Cells[8,Form_peach. StringGrid2.Row],desk_env)+delimiter in_param:=stringdelim(escapefilename(Form_peach.StringGrid2.Cells[8,Form_peac h.StringGrid2.Row],desk_env))
else else
in_param:=delimiter+escapefilename(Form_peach.EditOpenIn.Text,desk_env)+delim iter; in_param:=stringdelim(escapefilename(Form_peach.EditOpenIn.Text,desk_env));
//folder policy //folder policy
if mode<>'draganddrop' then set_output_folder(out_param,in_param,real_extract,Fo rm_peach.RadioGroupAction1.ItemIndex); if mode<>'draganddrop' then set_output_folder(out_param,in_param,real_extract,Fo rm_peach.RadioGroupAction1.ItemIndex);
outname:=out_param; outname:=out_param;
//archive function //archive function
case mode of case mode of
'neutral' : 'neutral' :
case Form_peach.RadioGroupAction1.ItemIndex of case Form_peach.RadioGroupAction1.ItemIndex of
0: archive_function:='x'; 0: archive_function:='x';
1: archive_function:='e'; 1: archive_function:='e';
2: begin 2: begin
skipping to change at line 35530 skipping to change at line 35509
tempstring:=Form_peach.StringGridList.Cells[8,Form_peach.StringGridList.Ro w]; tempstring:=Form_peach.StringGridList.Cells[8,Form_peach.StringGridList.Ro w];
end; end;
if fileexists((out_param+tempstring)) then if fileexists((out_param+tempstring)) then
if pMessageWarningYesNo(out_param+tempstring+' '+txt_confirm_overwrite) <>6 then exit; if pMessageWarningYesNo(out_param+tempstring+' '+txt_confirm_overwrite) <>6 then exit;
end; end;
end; end;
if (archive_function<>'x') and (archive_function<>'e') then if (archive_function<>'x') and (archive_function<>'e') then
begin begin
out_param:=''; out_param:='';
end; end;
//if out_param<>'' then out_param:=delimiter+escapefilename(out_param)+delimiter bin_name:=stringdelim(escapefilename(executable_path,desk_env)+'res'+DirectorySe
; parator+'unace'+DirectorySeparator+'unace'+EXEEXT);
bin_name:=delimiter+escapefilename(executable_path,desk_env)+'res'+DirectorySepa
rator+'unace'+DirectorySeparator+'unace'+EXEEXT+delimiter;
cl:=bin_name+' '+archive_function; cl:=bin_name+' '+archive_function;
cl:=cl+' '+in_param; cl:=cl+' '+in_param;
//if out_param<>'' then cl:=cl+' '+out_param; changed the way to communicate out param; it's implicitly communicated setting working path since Win demo executa ble fails extracting to paths containing space //if out_param<>'' then cl:=cl+' '+out_param; changed the way to communicate out param; it's implicitly communicated setting working path since Win demo executa ble fails extracting to paths containing space
if out_param<>'' then if DirectoryExists(out_param) then else CreateDir(out_para m); if out_param<>'' then if DirectoryExists(out_param) then else CreateDir(out_para m);
if out_param<>'' then setcurrentdir((out_param)); if out_param<>'' then setcurrentdir((out_param));
jobcode:=formatdatetime('yyyymmdd_hh.nn.ss.ms_',now)+fun; jobcode:=formatdatetime('yyyymmdd_hh.nn.ss.ms_',now)+fun;
compose_unace_cl:=0; compose_unace_cl:=0;
end; end;
procedure check_files(var in_param,cl,oper:ansistring); procedure check_files(var in_param,cl,oper:ansistring);
var bin_name,disp_type,algo_list:ansistring; var bin_name,disp_type,algo_list:ansistring;
begin begin
bin_name:=delimiter+escapefilename(executable_path,desk_env)+'res'+DirectorySepa rator+'pea'+EXEEXT+delimiter; bin_name:=stringdelim(escapefilename(executable_path,desk_env)+'res'+DirectorySe parator+'pea'+EXEEXT);
case Form_peach.radiogroup1.ItemIndex of case Form_peach.radiogroup1.ItemIndex of
0: disp_type:='HEX'; 0: disp_type:='HEX';
1: disp_type:='BASE64'; 1: disp_type:='BASE64';
2: disp_type:='LSBHEX'; 2: disp_type:='LSBHEX';
end; end;
if oper='list' then algo_list:='LIST' if oper='list' then algo_list:='LIST'
else else
if oper='preview' then algo_list:='PREVIEW' if oper='preview' then algo_list:='PREVIEW'
else else
if Form_peach.cbcheckall.state=cbchecked then algo_list:='ALL' if Form_peach.cbcheckall.state=cbchecked then algo_list:='ALL'
skipping to change at line 35829 skipping to change at line 35807
out_param:=s+'.tar'; out_param:=s+'.tar';
apply_timestamptoname(out_param,0,0,'file'); apply_timestamptoname(out_param,0,0,'file');
//archive function //archive function
archive_function:='a'; archive_function:='a';
get_new_archive_name(out_param); get_new_archive_name(out_param);
//archive type //archive type
type_option:='-ttar'; type_option:='-ttar';
// 7za uses -- as tag to distinguish a filename starting with - from a switch, h owever since Peach uses absolute filenames it should never occur and filenames a re not checked for that condition // 7za uses -- as tag to distinguish a filename starting with - from a switch, h owever since Peach uses absolute filenames it should never occur and filenames a re not checked for that condition
outname:=out_param; outname:=out_param;
getworkpath(work_path,out_param); getworkpath(work_path,out_param);
out_param:=delimiter+escapefilename(out_param,desk_env)+delimiter; out_param:=stringdelim(escapefilename(out_param,desk_env));
get_in_param(in_param,sel); get_in_param(in_param,sel);
bin_name:=delimiter+escapefilename(executable_path,desk_env)+'res'+DirectorySepa rator+'7z'+DirectorySeparator+'7z'+EXEEXT+delimiter; bin_name:=stringdelim(escapefilename(executable_path,desk_env)+'res'+DirectorySe parator+'7z'+DirectorySeparator+'7z'+EXEEXT);
{$IFDEF LINUX}if sys7zlin=1 then bin_name:='7z';{$ENDIF} {$IFDEF LINUX}if sys7zlin=1 then bin_name:='7z';{$ENDIF}
cl:=bin_name+' '+archive_function+' '+type_option; cl:=bin_name+' '+archive_function+' '+type_option;
if work_path<>'' then cl:=cl+' '+work_path; if work_path<>'' then cl:=cl+' '+work_path;
if nonverboselog=1 then cl:=cl+' -bb0 -bse0 -bsp2' else cl:=cl+' -bb1 -bse1 -bsp 2';//requires v15.x if nonverboselog=1 then cl:=cl+' -bb0 -bse0 -bsp2' else cl:=cl+' -bb1 -bse1 -bsp 2';//requires v15.x
cl:=cl+' '+out_param+' '+in_param; cl:=cl+' '+out_param+' '+in_param;
Form_peach.StringGrid1.Cursor:=crHourGlass; Form_peach.StringGrid1.Cursor:=crHourGlass;
P:=tprocessutf8.Create(nil); P:=tprocessutf8.Create(nil);
P.CommandLine:=cl; P.CommandLine:=cl;
if Form_peach.Visible=true then Application.ProcessMessages; if Form_peach.Visible=true then Application.ProcessMessages;
P.Options := [poNoConsole, poWaitOnExit]; //wait for tar to be finished before s tarting compression P.Options := [poNoConsole, poWaitOnExit]; //wait for tar to be finished before s tarting compression
skipping to change at line 36318 skipping to change at line 36296
procedure add2multi; procedure add2multi;
var var
s,cl:ansistring; s,cl:ansistring;
P:tprocessutf8; P:tprocessutf8;
begin begin
{$IFDEF MSWINDOWS} {$IFDEF MSWINDOWS}
getmulti('add',s); getmulti('add',s);
if s='' then exit; if s='' then exit;
P:=tprocessutf8.Create(nil); P:=tprocessutf8.Create(nil);
cl:=delimiter+escapefilename(executable_path,desk_env)+'peazip'+EXEEXT+delimiter +' -add2archivemulti '+s; cl:=stringdelim(escapefilename(executable_path,desk_env)+'peazip'+EXEEXT)+' -add 2archivemulti '+s;
P.Options := [poNoConsole]; P.Options := [poNoConsole];
P.CommandLine:=cl; P.CommandLine:=cl;
if validatecl(cl)<>0 then begin pMessageWarningOK(txt_2_7_validatecl+' '+cl); ex it; end; if validatecl(cl)<>0 then begin pMessageWarningOK(txt_2_7_validatecl+' '+cl); ex it; end;
P.Execute; P.Execute;
P.Free; P.Free;
{$ENDIF} {$ENDIF}
end; end;
procedure add2multiconvert; procedure add2multiconvert;
var var
s,cl:ansistring; s,cl:ansistring;
P:tprocessutf8; P:tprocessutf8;
begin begin
{$IFDEF MSWINDOWS} {$IFDEF MSWINDOWS}
getmulti('add',s); getmulti('add',s);
if s='' then exit; if s='' then exit;
P:=tprocessutf8.Create(nil); P:=tprocessutf8.Create(nil);
cl:=delimiter+escapefilename(executable_path,desk_env)+'peazip'+EXEEXT+delimiter +' -add2archivemulticonvert '+s; cl:=stringdelim(escapefilename(executable_path,desk_env)+'peazip'+EXEEXT)+' -add 2archivemulticonvert '+s;
P.Options := [poNoConsole]; P.Options := [poNoConsole];
P.CommandLine:=cl; P.CommandLine:=cl;
if validatecl(cl)<>0 then begin pMessageWarningOK(txt_2_7_validatecl+' '+cl); ex it; end; if validatecl(cl)<>0 then begin pMessageWarningOK(txt_2_7_validatecl+' '+cl); ex it; end;
P.Execute; P.Execute;
P.Free; P.Free;
{$ENDIF} {$ENDIF}
end; end;
procedure add2multiseparate; procedure add2multiseparate;
var var
s,cl:ansistring; s,cl:ansistring;
P:tprocessutf8; P:tprocessutf8;
begin begin
{$IFDEF MSWINDOWS} {$IFDEF MSWINDOWS}
getmulti('addseparate',s); getmulti('addseparate',s);
if s='' then exit; if s='' then exit;
P:=tprocessutf8.Create(nil); P:=tprocessutf8.Create(nil);
cl:=delimiter+escapefilename(executable_path,desk_env)+'peazip'+EXEEXT+delimiter +' -add2archivemultiseparate '+s; cl:=stringdelim(escapefilename(executable_path,desk_env)+'peazip'+EXEEXT)+' -add 2archivemultiseparate '+s;
P.Options := [poNoConsole]; P.Options := [poNoConsole];
P.CommandLine:=cl; P.CommandLine:=cl;
if validatecl(cl)<>0 then begin pMessageWarningOK(txt_2_7_validatecl+' '+cl); ex it; end; if validatecl(cl)<>0 then begin pMessageWarningOK(txt_2_7_validatecl+' '+cl); ex it; end;
P.Execute; P.Execute;
P.Free; P.Free;
{$ENDIF} {$ENDIF}
end; end;
procedure add2multi7z(level:ansistring); procedure add2multi7z(level:ansistring);
var var
s,cl:ansistring; s,cl:ansistring;
P:tprocessutf8; P:tprocessutf8;
begin begin
{$IFDEF MSWINDOWS} {$IFDEF MSWINDOWS}
getmulti('add7z',s); getmulti('add7z',s);
if s='' then exit; if s='' then exit;
P:=tprocessutf8.Create(nil); P:=tprocessutf8.Create(nil);
cl:=delimiter+escapefilename(executable_path,desk_env)+'peazip'+EXEEXT+delimiter +' -add2archivemulti7z '+level+' '+s; cl:=stringdelim(escapefilename(executable_path,desk_env)+'peazip'+EXEEXT)+' -add 2archivemulti7z '+level+' '+s;
P.Options := [poNoConsole]; P.Options := [poNoConsole];
P.CommandLine:=cl; P.CommandLine:=cl;
if validatecl(cl)<>0 then begin pMessageWarningOK(txt_2_7_validatecl+' '+cl); ex it; end; if validatecl(cl)<>0 then begin pMessageWarningOK(txt_2_7_validatecl+' '+cl); ex it; end;
P.Execute; P.Execute;
P.Free; P.Free;
{$ENDIF} {$ENDIF}
end; end;
procedure add2multizip(level:ansistring); procedure add2multizip(level:ansistring);
var var
s,cl:ansistring; s,cl:ansistring;
P:tprocessutf8; P:tprocessutf8;
begin begin
{$IFDEF MSWINDOWS} {$IFDEF MSWINDOWS}
getmulti('addzip',s); getmulti('addzip',s);
if s='' then exit; if s='' then exit;
P:=tprocessutf8.Create(nil); P:=tprocessutf8.Create(nil);
cl:=delimiter+escapefilename(executable_path,desk_env)+'peazip'+EXEEXT+delimiter +' -add2archivemultizip '+level+' '+s; cl:=stringdelim(escapefilename(executable_path,desk_env)+'peazip'+EXEEXT)+' -add 2archivemultizip '+level+' '+s;
P.Options := [poNoConsole]; P.Options := [poNoConsole];
P.CommandLine:=cl; P.CommandLine:=cl;
if validatecl(cl)<>0 then begin pMessageWarningOK(txt_2_7_validatecl+' '+cl); ex it; end; if validatecl(cl)<>0 then begin pMessageWarningOK(txt_2_7_validatecl+' '+cl); ex it; end;
P.Execute; P.Execute;
P.Free; P.Free;
{$ENDIF} {$ENDIF}
end; end;
procedure add2multisplit; procedure add2multisplit;
var var
s,cl:ansistring; s,cl:ansistring;
P:tprocessutf8; P:tprocessutf8;
begin begin
{$IFDEF MSWINDOWS} {$IFDEF MSWINDOWS}
getmulti('addsplit',s); getmulti('addsplit',s);
if s='' then exit; if s='' then exit;
P:=tprocessutf8.Create(nil); P:=tprocessutf8.Create(nil);
cl:=delimiter+escapefilename(executable_path,desk_env)+'peazip'+EXEEXT+delimiter +' -add2archivemultisplit '+s; cl:=stringdelim(escapefilename(executable_path,desk_env)+'peazip'+EXEEXT)+' -add 2archivemultisplit '+s;
P.Options := [poNoConsole]; P.Options := [poNoConsole];
P.CommandLine:=cl; P.CommandLine:=cl;
if validatecl(cl)<>0 then begin pMessageWarningOK(txt_2_7_validatecl+' '+cl); ex it; end; if validatecl(cl)<>0 then begin pMessageWarningOK(txt_2_7_validatecl+' '+cl); ex it; end;
P.Execute; P.Execute;
P.Free; P.Free;
{$ENDIF} {$ENDIF}
end; end;
procedure add2multisfx; procedure add2multisfx;
var var
s,cl:ansistring; s,cl:ansistring;
P:tprocessutf8; P:tprocessutf8;
begin begin
{$IFDEF MSWINDOWS} {$IFDEF MSWINDOWS}
getmulti('addsfx',s); getmulti('addsfx',s);
if s='' then exit; if s='' then exit;
P:=tprocessutf8.Create(nil); P:=tprocessutf8.Create(nil);
cl:=delimiter+escapefilename(executable_path,desk_env)+'peazip'+EXEEXT+delimiter +' -add2archivemultisfx '+s; cl:=stringdelim(escapefilename(executable_path,desk_env)+'peazip'+EXEEXT)+' -add 2archivemultisfx '+s;
P.Options := [poNoConsole]; P.Options := [poNoConsole];
P.CommandLine:=cl; P.CommandLine:=cl;
if validatecl(cl)<>0 then begin pMessageWarningOK(txt_2_7_validatecl+' '+cl); ex it; end; if validatecl(cl)<>0 then begin pMessageWarningOK(txt_2_7_validatecl+' '+cl); ex it; end;
P.Execute; P.Execute;
P.Free; P.Free;
{$ENDIF} {$ENDIF}
end; end;
procedure ext2multi; procedure ext2multi;
var var
s,cl:ansistring; s,cl:ansistring;
P:tprocessutf8; P:tprocessutf8;
begin begin
{$IFDEF MSWINDOWS} {$IFDEF MSWINDOWS}
getmulti('neutral',s); getmulti('neutral',s);
if s='' then exit; if s='' then exit;
P:=tprocessutf8.Create(nil); P:=tprocessutf8.Create(nil);
cl:=delimiter+escapefilename(executable_path,desk_env)+'peazip'+EXEEXT+delimiter +' -ext2archivemulti '+s; cl:=stringdelim(escapefilename(executable_path,desk_env)+'peazip'+EXEEXT)+' -ext 2archivemulti '+s;
P.Options := [poNoConsole]; P.Options := [poNoConsole];
P.CommandLine:=cl; P.CommandLine:=cl;
if validatecl(cl)<>0 then begin pMessageWarningOK(txt_2_7_validatecl+' '+cl); ex it; end; if validatecl(cl)<>0 then begin pMessageWarningOK(txt_2_7_validatecl+' '+cl); ex it; end;
P.Execute; P.Execute;
P.Free; P.Free;
{$ENDIF} {$ENDIF}
end; end;
procedure ext2multidirect(dirdirective:ansistring); procedure ext2multidirect(dirdirective:ansistring);
var var
s,cl:ansistring; s,cl:ansistring;
P:tprocessutf8; P:tprocessutf8;
begin begin
{$IFDEF MSWINDOWS} {$IFDEF MSWINDOWS}
getmulti('neutral',s); getmulti('neutral',s);
if s='' then exit; if s='' then exit;
P:=tprocessutf8.Create(nil); P:=tprocessutf8.Create(nil);
//-ext2archivemultihere extract here //-ext2archivemultihere extract here
//-ext2archivemultismart extract to new folder, smart folder management //-ext2archivemultismart extract to new folder, smart folder management
//-ext2archivemultifolder extract to new folder //-ext2archivemultifolder extract to new folder
cl:=delimiter+escapefilename(executable_path,desk_env)+'peazip'+EXEEXT+delimiter +' '+dirdirective+' '+s; cl:=stringdelim(escapefilename(executable_path,desk_env)+'peazip'+EXEEXT)+' '+di rdirective+' '+s;
P.Options := [poNoConsole]; P.Options := [poNoConsole];
P.CommandLine:=cl; P.CommandLine:=cl;
if validatecl(cl)<>0 then begin pMessageWarningOK(txt_2_7_validatecl+' '+cl); ex it; end; if validatecl(cl)<>0 then begin pMessageWarningOK(txt_2_7_validatecl+' '+cl); ex it; end;
P.Execute; P.Execute;
P.Free; P.Free;
{$ENDIF} {$ENDIF}
end; end;
procedure add2pea(pmode,pbatch:ansistring); //directly create .pea archive with default parameters procedure add2pea(pmode,pbatch:ansistring); //directly create .pea archive with default parameters
//pmode "crypt" uses encryption, "standard" don't use encryption //pmode "crypt" uses encryption, "standard" don't use encryption
skipping to change at line 36507 skipping to change at line 36485
name_ok:=false; name_ok:=false;
s:=out_param; s:=out_param;
cutextension(s); cutextension(s);
repeat repeat
if fileexists(s+NAMEVARSTR+inttostr(i)+'.pea') or directoryexists(s+NAMEVA RSTR+inttostr(i)+'.pea') then inc(i,1) if fileexists(s+NAMEVARSTR+inttostr(i)+'.pea') or directoryexists(s+NAMEVA RSTR+inttostr(i)+'.pea') then inc(i,1)
else name_ok:=true; else name_ok:=true;
until name_ok = true; until name_ok = true;
out_param:=s+NAMEVARSTR+inttostr(i); out_param:=s+NAMEVARSTR+inttostr(i);
end; end;
in_param:=''; in_param:='';
out_param:=delimiter+escapefilename(out_param,desk_env)+delimiter; out_param:=stringdelim(escapefilename(out_param,desk_env));
for i:=2 to j+1 do in_param:=in_param+delimiter+escapefilename(ExpandFileName((p for i:=2 to j+1 do in_param:=in_param+stringdelim(escapefilename(ExpandFileName(
aramstr(i))),desk_env)+delimiter+' '; (paramstr(i))),desk_env))+' ';
bin_name:=delimiter+escapefilename(executable_path,desk_env)+'res'+DirectorySepa bin_name:=stringdelim(escapefilename(executable_path,desk_env)+'res'+DirectorySe
rator+'pea'+EXEEXT+delimiter; parator+'pea'+EXEEXT);
if pmode='crypt' then if pmode='crypt' then
cl:=bin_name+' '+fun+' '+out_param+' 0 PCOMPRESS2 SHA256 CRC64 TRIATS INTERAC TIVE FROMCL '+in_param cl:=bin_name+' '+fun+' '+out_param+' 0 PCOMPRESS2 SHA256 CRC64 TRIATS INTERAC TIVE FROMCL '+in_param
else else
cl:=bin_name+' '+fun+' '+out_param+' 0 PCOMPRESS2 SHA256 CRC64 NOALGO BATCH F ROMCL '+in_param; cl:=bin_name+' '+fun+' '+out_param+' 0 PCOMPRESS2 SHA256 CRC64 NOALGO BATCH F ROMCL '+in_param;
launch_cl(cl,jobcode,out_param); launch_cl(cl,jobcode,out_param);
if pbatch='complete' then erase_fromname('archive',in_param); if pbatch='complete' then erase_fromname('archive',in_param);
end; end;
procedure add2wipe; procedure add2wipe;
var var
i,j:integer; i,j:integer;
P:tprocessutf8; P:tprocessutf8;
cl,in_param,eraselevel,bin_name:ansistring; cl,in_param,eraselevel,bin_name:ansistring;
begin begin
in_param:=''; in_param:='';
if test_in_params(j)<>0 then begin exit_nosave; exit; end; if test_in_params(j)<>0 then begin exit_nosave; exit; end;
if pMessageWarningYesNo(txt_wipe)=6 then if pMessageWarningYesNo(txt_wipe)=6 then
begin begin
for i:=2 to j+1 do in_param:=in_param+delimiter+escapefilename(ExpandFileN for i:=2 to j+1 do in_param:=in_param+stringdelim(escapefilename(ExpandFil
ame((paramstr(i))),desk_env)+delimiter+' '; eName((paramstr(i))),desk_env))+' ';
bin_name:=delimiter+escapefilename(executable_path,desk_env)+'res'+directo bin_name:=stringdelim(escapefilename(executable_path,desk_env)+'res'+direc
ryseparator+'pea'+EXEEXT+delimiter; toryseparator+'pea'+EXEEXT);
case erasepasses of case erasepasses of
0: eraselevel:='VERY_FAST'; 0: eraselevel:='VERY_FAST';
1: eraselevel:='FAST'; 1: eraselevel:='FAST';
2: eraselevel:='MEDIUM'; 2: eraselevel:='MEDIUM';
3: eraselevel:='SLOW'; 3: eraselevel:='SLOW';
4: eraselevel:='VERY_SLOW'; 4: eraselevel:='VERY_SLOW';
end; end;
P:=tprocessutf8.Create(nil); P:=tprocessutf8.Create(nil);
{$IFDEF MSWINDOWS}P.Options := [poNoConsole];{$ELSE}P.Options := [poNoCons ole, poWaitOnExit];{$ENDIF} {$IFDEF MSWINDOWS}P.Options := [poNoConsole];{$ELSE}P.Options := [poNoCons ole, poWaitOnExit];{$ENDIF}
cl:=bin_name+' WIPE '+eraselevel+' '+in_param; cl:=bin_name+' WIPE '+eraselevel+' '+in_param;
skipping to change at line 36555 skipping to change at line 36533
end; end;
procedure add2compare; procedure add2compare;
var var
i,j:integer; i,j:integer;
P:tprocessutf8; P:tprocessutf8;
cl,in_param,bin_name:ansistring; cl,in_param,bin_name:ansistring;
begin begin
in_param:=''; in_param:='';
if test_in_params(j)<>0 then begin exit_nosave; exit; end; if test_in_params(j)<>0 then begin exit_nosave; exit; end;
for i:=2 to 3 do in_param:=in_param+delimiter+escapefilename(ExpandFileName((par for i:=2 to 3 do in_param:=in_param+stringdelim(escapefilename(ExpandFileName((p
amstr(i))),desk_env)+delimiter+' '; aramstr(i))),desk_env))+' ';
bin_name:=delimiter+escapefilename(executable_path,desk_env)+'res'+directorysepa bin_name:=stringdelim(escapefilename(executable_path,desk_env)+'res'+directoryse
rator+'pea'+EXEEXT+delimiter; parator+'pea'+EXEEXT);
P:=tprocessutf8.Create(nil); P:=tprocessutf8.Create(nil);
{$IFDEF MSWINDOWS}P.Options := [poNoConsole];{$ELSE}P.Options := [poNoConsole, p oWaitOnExit];{$ENDIF} {$IFDEF MSWINDOWS}P.Options := [poNoConsole];{$ELSE}P.Options := [poNoConsole, p oWaitOnExit];{$ENDIF}
cl:=bin_name+' COMPARE '+in_param; cl:=bin_name+' COMPARE '+in_param;
P.CommandLine:=cl; P.CommandLine:=cl;
if validatecl(cl)<>0 then begin pMessageWarningOK(txt_2_7_validatecl+' '+cl); ex it; end; if validatecl(cl)<>0 then begin pMessageWarningOK(txt_2_7_validatecl+' '+cl); ex it; end;
P.Execute; P.Execute;
P.Free; P.Free;
end; end;
procedure direct_join(var fname: ansistring); procedure direct_join(var fname: ansistring);
var var
cl,s,s1,jobcode,in_param,out_param,bin_name:ansistring; cl,s,s1,jobcode,in_param,out_param,bin_name:ansistring;
begin begin
s1:=fun; s1:=fun;
jobcode:=formatdatetime('yyyymmdd_hh.nn.ss.ms',now)+'RFS'; jobcode:=formatdatetime('yyyymmdd_hh.nn.ss.ms',now)+'RFS';
fun:='RFJ'; fun:='RFJ';
fun_status:='FILEBROWSER'; fun_status:='FILEBROWSER';
subfun:='extract'; subfun:='extract';
s:=escapefilename(ExpandFileName(fname),desk_env); s:=escapefilename(ExpandFileName(fname),desk_env);
in_param:=delimiter+s+delimiter; in_param:=stringdelim(s);
bin_name:=delimiter+escapefilename(executable_path,desk_env)+'res'+DirectorySepa bin_name:=stringdelim(escapefilename(executable_path,desk_env)+'res'+DirectorySe
rator+'pea'+EXEEXT+delimiter; parator+'pea'+EXEEXT);
out_param:=extractfilepath(s); out_param:=extractfilepath(s);
if control_outpath(out_param)<>0 then exit; if control_outpath(out_param)<>0 then exit;
if out_param<>'' then if out_param<>'' then
if out_param[length(out_param)]<>directoryseparator then out_param:=out_param +directoryseparator; if out_param[length(out_param)]<>directoryseparator then out_param:=out_param +directoryseparator;
s:=extractfilename(s); s:=extractfilename(s);
cutextension(s); cutextension(s);
out_param:=out_param+s; out_param:=out_param+s;
cl:=bin_name+' '+fun+' '+in_param+' BATCH '+delimiter+out_param+delimiter; cl:=bin_name+' '+fun+' '+in_param+' BATCH '+stringdelim(out_param);
launch_cl(cl,jobcode,in_param); launch_cl(cl,jobcode,in_param);
fun:=s1; fun:=s1;
fun_status:=fun; fun_status:=fun;
end; end;
procedure add27z(pmode,mailfun,pbatch:ansistring); //directly create archive usi ng 7z backend with default parameters procedure add27z(pmode,mailfun,pbatch:ansistring); //directly create archive usi ng 7z backend with default parameters
//pmode "7z" "zip" "sfz" sets archive format //pmode "7z" "zip" "sfz" sets archive format
//mailfun "mail" try to send archive as attachment from default mail application , "archive" simply creates the archive //mailfun "mail" try to send archive as attachment from default mail application , "archive" simply creates the archive
//pbatch "complete" parses advanced peazip setting (delete after archiving/extra ction), "ignore" ignores those directives //pbatch "complete" parses advanced peazip setting (delete after archiving/extra ction), "ignore" ignores those directives
var var
skipping to change at line 36632 skipping to change at line 36610
cutextension(s); cutextension(s);
repeat repeat
if fileexists(s+NAMEVARSTR+inttostr(i)+extractfileext(out_param)) or direc toryexists(s+NAMEVARSTR+inttostr(i)+extractfileext(out_param)) then inc(i,1) if fileexists(s+NAMEVARSTR+inttostr(i)+extractfileext(out_param)) or direc toryexists(s+NAMEVARSTR+inttostr(i)+extractfileext(out_param)) then inc(i,1)
else name_ok:=true; else name_ok:=true;
until name_ok = true; until name_ok = true;
out_param:=s+NAMEVARSTR+inttostr(i)+extractfileext(out_param); out_param:=s+NAMEVARSTR+inttostr(i)+extractfileext(out_param);
end; end;
in_param:=''; in_param:='';
outname:=out_param; outname:=out_param;
getworkpath(work_path,out_param); getworkpath(work_path,out_param);
out_param:=delimiter+escapefilename(out_param,desk_env)+delimiter; out_param:=stringdelim(escapefilename(out_param,desk_env));
for i:=2 to j+1 do in_param:=in_param+delimiter+escapefilename(ExpandFileName((p for i:=2 to j+1 do in_param:=in_param+stringdelim(escapefilename(ExpandFileName(
aramstr(i))),desk_env)+delimiter+' '; (paramstr(i))),desk_env))+' ';
bin_name:=delimiter+escapefilename(executable_path,desk_env)+'res'+DirectorySepa bin_name:=stringdelim(escapefilename(executable_path,desk_env)+'res'+DirectorySe
rator+'7z'+DirectorySeparator+'7z'+EXEEXT+delimiter; parator+'7z'+DirectorySeparator+'7z'+EXEEXT);
{$IFDEF LINUX}if sys7zlin=1 then bin_name:='7z';{$ENDIF} {$IFDEF LINUX}if sys7zlin=1 then bin_name:='7z';{$ENDIF}
if pmode='zip' then if pmode='zip' then
begin begin
case level_zip of case level_zip of
0: cl:=bin_name+' a -tzip -mm=Copy -mmt=on -mx0'; 0: cl:=bin_name+' a -tzip -mm=Copy -mmt=on -mx0';
1: cl:=bin_name+' a -tzip -mm='+method_zip+' -mmt=on -mx1'; 1: cl:=bin_name+' a -tzip -mm='+method_zip+' -mmt=on -mx1';
2: cl:=bin_name+' a -tzip -mm='+method_zip+' -mmt=on -mx3'; 2: cl:=bin_name+' a -tzip -mm='+method_zip+' -mmt=on -mx3';
3: cl:=bin_name+' a -tzip -mm='+method_zip+' -mmt=on -mx5'; 3: cl:=bin_name+' a -tzip -mm='+method_zip+' -mmt=on -mx5';
4: cl:=bin_name+' a -tzip -mm='+method_zip+' -mmt=on -mx7'; 4: cl:=bin_name+' a -tzip -mm='+method_zip+' -mmt=on -mx7';
5: cl:=bin_name+' a -tzip -mm='+method_zip+' -mmt=on -mx9'; 5: cl:=bin_name+' a -tzip -mm='+method_zip+' -mmt=on -mx9';
skipping to change at line 36712 skipping to change at line 36690
s:=out_param; s:=out_param;
cutextension(s); cutextension(s);
repeat repeat
if fileexists((s+NAMEVARSTR+inttostr(i)+extractfileext(out_param))) then inc(j,1) if fileexists((s+NAMEVARSTR+inttostr(i)+extractfileext(out_param))) then inc(j,1)
else name_ok:=true; else name_ok:=true;
until name_ok = true; until name_ok = true;
out_param:=s+NAMEVARSTR+inttostr(i)+extractfileext(out_param); out_param:=s+NAMEVARSTR+inttostr(i)+extractfileext(out_param);
end; end;
outname:=out_param; outname:=out_param;
getworkpath(work_path,out_param); getworkpath(work_path,out_param);
out_param:=delimiter+escapefilename(out_param,desk_env)+delimiter; out_param:=stringdelim(escapefilename(out_param,desk_env));
in_param:=delimiter+escapefilename(in_param,desk_env)+delimiter; in_param:=stringdelim(escapefilename(in_param,desk_env));
bin_name:=delimiter+escapefilename(executable_path,desk_env)+'res'+Directo bin_name:=stringdelim(escapefilename(executable_path,desk_env)+'res'+Direc
rySeparator+'7z'+DirectorySeparator+'7z'+EXEEXT+delimiter; torySeparator+'7z'+DirectorySeparator+'7z'+EXEEXT);
{$IFDEF LINUX}if sys7zlin=1 then bin_name:='7z';{$ENDIF} {$IFDEF LINUX}if sys7zlin=1 then bin_name:='7z';{$ENDIF}
if pmode='zip' then if pmode='zip' then
begin begin
case level_zip of case level_zip of
0: cl:=bin_name+' a -tzip -mm=Copy -mmt=on -mx0'; 0: cl:=bin_name+' a -tzip -mm=Copy -mmt=on -mx0';
1: cl:=bin_name+' a -tzip -mm='+method_zip+' -mmt=on -mx1'; 1: cl:=bin_name+' a -tzip -mm='+method_zip+' -mmt=on -mx1';
2: cl:=bin_name+' a -tzip -mm='+method_zip+' -mmt=on -mx3'; 2: cl:=bin_name+' a -tzip -mm='+method_zip+' -mmt=on -mx3';
3: cl:=bin_name+' a -tzip -mm='+method_zip+' -mmt=on -mx5'; 3: cl:=bin_name+' a -tzip -mm='+method_zip+' -mmt=on -mx5';
4: cl:=bin_name+' a -tzip -mm='+method_zip+' -mmt=on -mx7'; 4: cl:=bin_name+' a -tzip -mm='+method_zip+' -mmt=on -mx7';
5: cl:=bin_name+' a -tzip -mm='+method_zip+' -mmt=on -mx9'; 5: cl:=bin_name+' a -tzip -mm='+method_zip+' -mmt=on -mx9';
skipping to change at line 36771 skipping to change at line 36749
function directpw_pre_test(in_param:ansistring):integer; function directpw_pre_test(in_param:ansistring):integer;
//test archive for possible password protection simulating list operation, befor e direct extraction, list or test //test archive for possible password protection simulating list operation, befor e direct extraction, list or test
var var
P:tprocessutf8; P:tprocessutf8;
pwtotest,cl:ansistring; pwtotest,cl:ansistring;
begin begin
result:=-1; result:=-1;
P:=tprocessutf8.Create(nil); P:=tprocessutf8.Create(nil);
setpwtotest(pwtotest); setpwtotest(pwtotest);
P.Options := [poNoConsole, poWaitOnExit]; P.Options := [poNoConsole, poWaitOnExit];
cl:=delimiter+escapefilename(executable_path,desk_env)+'peazip'+EXEEXT+delimiter +' -ext2openpwtest '+delimiter+pwtotest+delimiter+' '+delimiter+escapefilename(i n_param,desk_env)+delimiter; cl:=stringdelim(escapefilename(executable_path,desk_env)+'peazip'+EXEEXT)+' -ext 2openpwtest '+stringdelim(pwtotest)+' '+stringdelim(escapefilename(in_param,desk _env));
P.CommandLine:=cl; P.CommandLine:=cl;
if validatecl(cl)<>0 then begin pMessageWarningOK(txt_2_7_validatecl+' '+cl); ex it; end; if validatecl(cl)<>0 then begin pMessageWarningOK(txt_2_7_validatecl+' '+cl); ex it; end;
P.Execute; P.Execute;
result:=P.exitstatus; result:=P.exitstatus;
P.Free; P.Free;
end; end;
procedure reopen_7z; procedure reopen_7z;
var var
s1,s2:ansistring; s1,s2:ansistring;
skipping to change at line 36915 skipping to change at line 36893
end; //mandatory ask for password when the dialog is invoked for operating on encrypted or unreadable file end; //mandatory ask for password when the dialog is invoked for operating on encrypted or unreadable file
if s2<>'' then if s2<>'' then
if prepend_keyfile(s1,s2)<>0 then if prepend_keyfile(s1,s2)<>0 then
begin begin
pMessageErrorOK(s2+' '+txt_keyfile_not_found); pMessageErrorOK(s2+' '+txt_keyfile_not_found);
ask_pwkeyfile_core:=-1; ask_pwkeyfile_core:=-1;
exit; exit;
end; end;
if pw4cl('-p',s1)<>0 then if pw4cl('-p',s1)<>0 then
begin begin
msg_pw_errorchar; msg_pw_errorchar(s1);
ask_pwkeyfile_core:=-1; ask_pwkeyfile_core:=-1;
exit; exit;
end; end;
end end
else else
begin begin
if showpwfield=0 then if showpwfield=0 then
if FormPW.EditUn7zaPW1.visible=true then if FormPW.EditUn7zaPW1.visible=true then
if FormPW.EditUn7zaPW.Text<>FormPW.EditUn7zaPW1.Text then if FormPW.EditUn7zaPW.Text<>FormPW.EditUn7zaPW1.Text then
begin begin
skipping to change at line 37033 skipping to change at line 37011
if FormPW.EditName3.Text<>'' then if FormPW.EditName3.Text<>'' then
if prepend_keyfile(pw,FormPW.EditName3.Text)<>0 then if prepend_keyfile(pw,FormPW.EditName3.Text)<>0 then
begin begin
pMessageErrorOK(FormPW.EditName3.Text+' '+txt_keyfile_not_found); pMessageErrorOK(FormPW.EditName3.Text+' '+txt_keyfile_not_found);
exit; exit;
end; end;
if pw<>'' then if pw<>'' then
begin begin
if pw4cl('-p',pw)<>0 then if pw4cl('-p',pw)<>0 then
begin begin
msg_pw_errorchar; msg_pw_errorchar(pw);
exit; exit;
end; end;
end end
else if zaout>0 then pw:='-pdefault'; else if zaout>0 then pw:='-pdefault';
directask_pwkeyfile_context:=0; directask_pwkeyfile_context:=0;
end; end;
procedure directextractfromname(var in_param,out_param:ansistring; optype:ansist ring; intitems:ansistring); procedure directextractfromname(var in_param,out_param:ansistring; optype:ansist ring; intitems:ansistring);
var var
j,ec:integer; j,ec:integer;
skipping to change at line 37056 skipping to change at line 37034
fsize:qword; fsize:qword;
begin begin
setpwtotest(pwtotest); setpwtotest(pwtotest);
inputfile:=in_param; inputfile:=in_param;
j:=testinput(in_param,true); j:=testinput(in_param,true);
if removeintdir=1 then if removeintdir=1 then
if Form_peach.CheckBoxFolder.state=cbChecked then needwaitupdating:=true; if Form_peach.CheckBoxFolder.state=cbChecked then needwaitupdating:=true;
case j of case j of
0: begin 0: begin
P:=tprocessutf8.Create(nil); P:=tprocessutf8.Create(nil);
in_param:=delimiter+escapefilename(in_param,desk_env)+delimiter; in_param:=stringdelim(escapefilename(in_param,desk_env));
bin_name:=delimiter+escapefilename(executable_path,desk_env)+'peazip bin_name:=stringdelim(escapefilename(executable_path,desk_env)+'peaz
'+EXEEXT+delimiter; ip'+EXEEXT);
{$IFDEF MSWINDOWS}P.Options := [poNoConsole];{$ELSE}P.Options := [po NoConsole, poWaitOnExit];{$ENDIF} {$IFDEF MSWINDOWS}P.Options := [poNoConsole];{$ELSE}P.Options := [po NoConsole, poWaitOnExit];{$ENDIF}
cl:=bin_name+' -ext2open '+in_param; //ext2open handles a single inp ut in open interface cl:=bin_name+' -ext2open '+in_param; //ext2open handles a single inp ut in open interface
P.CommandLine:=cl; P.CommandLine:=cl;
if validatecl(cl)<>0 then begin pMessageWarningOK(txt_2_7_validatecl +' '+cl); exit; end; if validatecl(cl)<>0 then begin pMessageWarningOK(txt_2_7_validatecl +' '+cl); exit; end;
P.Execute; P.Execute;
P.Free; P.Free;
exit; exit;
end; end;
1: begin 1: begin
out_param:=out_param+(extractfilename(in_param)); out_param:=out_param+(extractfilename(in_param));
cutextension(out_param); cutextension(out_param);
out_param:=delimiter+escapefilename(out_param,desk_env)+delimiter; out_param:=stringdelim(escapefilename(out_param,desk_env));
in_param:=delimiter+escapefilename(in_param,desk_env)+delimiter; in_param:=stringdelim(escapefilename(in_param,desk_env));
bin_name:=delimiter+escapefilename(executable_path,desk_env)+'res'+Dire bin_name:=stringdelim(escapefilename(executable_path,desk_env)+'res'+Di
ctorySeparator+'pea'+EXEEXT+delimiter; rectorySeparator+'pea'+EXEEXT);
cl:=bin_name+' UNPEA '+in_param+' '+out_param+' RESETDATE SETATTR EXTRA CT2DIR INTERACTIVE'; cl:=bin_name+' UNPEA '+in_param+' '+out_param+' RESETDATE SETATTR EXTRA CT2DIR INTERACTIVE';
fun:='UNPEA'; fun:='UNPEA';
fun_status:=fun; fun_status:=fun;
jobcode:=formatdatetime('yyyymmdd_hh.nn.ss.ms',now)+fun; jobcode:=formatdatetime('yyyymmdd_hh.nn.ss.ms',now)+fun;
launch_cl(cl,jobcode,out_param); launch_cl(cl,jobcode,out_param);
end; end;
2: begin 2: begin
if extractfilename(out_param)='' then out_param:='AUTONAME' if extractfilename(out_param)='' then out_param:='AUTONAME'
else out_param:=delimiter+escapefilename(out_param,desk_env)+delimiter; else out_param:=stringdelim(escapefilename(out_param,desk_env));
in_param:=delimiter+escapefilename(in_param,desk_env)+delimiter; in_param:=stringdelim(escapefilename(in_param,desk_env));
bin_name:=delimiter+escapefilename(executable_path,desk_env)+'res'+Dire bin_name:=stringdelim(escapefilename(executable_path,desk_env)+'res'+Di
ctorySeparator+'pea'+EXEEXT+delimiter; rectorySeparator+'pea'+EXEEXT);
cl:=bin_name+' RFJ '+in_param+' BATCH '+out_param; cl:=bin_name+' RFJ '+in_param+' BATCH '+out_param;
fun:='RFJ'; fun:='RFJ';
fun_status:=fun; fun_status:=fun;
jobcode:=formatdatetime('yyyymmdd_hh.nn.ss.ms',now)+fun; jobcode:=formatdatetime('yyyymmdd_hh.nn.ss.ms',now)+fun;
launch_cl(cl,jobcode,out_param); launch_cl(cl,jobcode,out_param);
end; end;
5: begin 5: begin
fun:='UNPAQ'; fun:='UNPAQ';
fun_status:=fun; fun_status:=fun;
jobcode:=formatdatetime('yyyymmdd_hh.nn.ss.ms',now)+fun; jobcode:=formatdatetime('yyyymmdd_hh.nn.ss.ms',now)+fun;
paq_ver:=copy(extractfileext(in_param),2,length(extractfileext(in_param ))-1); paq_ver:=copy(extractfileext(in_param),2,length(extractfileext(in_param ))-1);
outname:=out_param; outname:=out_param;
if out_param<>'' then if out_param<>'' then
if out_param[length(out_param)]=directoryseparator then setlength(ou t_param,length(out_param)-1); if out_param[length(out_param)]=directoryseparator then setlength(ou t_param,length(out_param)-1);
in_param:=delimiter+escapefilename(in_param,desk_env)+delimiter; in_param:=stringdelim(escapefilename(in_param,desk_env));
out_param:=delimiter+escapefilename(out_param,desk_env)+delimiter; out_param:=stringdelim(escapefilename(out_param,desk_env));
bin_name:=delimiter+escapefilename(executable_path,desk_env)+'res'+Dire bin_name:=stringdelim(escapefilename(executable_path,desk_env)+'res'+Di
ctorySeparator+'paq'+DirectorySeparator+paq_ver+EXEEXT+delimiter; rectorySeparator+'paq'+DirectorySeparator+paq_ver+EXEEXT);
cl:=bin_name+' -d '+in_param+' '+out_param; cl:=bin_name+' -d '+in_param+' '+out_param;
launch_cl(cl,jobcode,outname); launch_cl(cl,jobcode,outname);
end; end;
6: begin 6: begin
fun:='UNQUAD'; fun:='UNQUAD';
fun_status:=fun; fun_status:=fun;
jobcode:=formatdatetime('yyyymmdd_hh.nn.ss.ms',now)+fun; jobcode:=formatdatetime('yyyymmdd_hh.nn.ss.ms',now)+fun;
ext:=copy(extractfileext(in_param),2,length(extractfileext(in_param))-1 ); ext:=copy(extractfileext(in_param),2,length(extractfileext(in_param))-1 );
s:=extractfilename(in_param); s:=extractfilename(in_param);
cutextension(s); cutextension(s);
if out_param<>'' then if out_param<>'' then
if out_param[length(out_param)]<>directoryseparator then out_param:= out_param+directoryseparator; if out_param[length(out_param)]<>directoryseparator then out_param:= out_param+directoryseparator;
out_param:=out_param+s; out_param:=out_param+s;
outname:=out_param; outname:=out_param;
in_param:=delimiter+escapefilename(in_param,desk_env)+delimiter; in_param:=stringdelim(escapefilename(in_param,desk_env));
if fileexists((out_param)) then if fileexists((out_param)) then
if pMessageWarningYesNo(out_param+' '+txt_confirm_overwrite)<>6 then exit if pMessageWarningYesNo(out_param+' '+txt_confirm_overwrite)<>6 then exit
else clearfile(out_param); else clearfile(out_param);
out_param:=delimiter+escapefilename(out_param,desk_env)+delimiter; out_param:=stringdelim(escapefilename(out_param,desk_env));
bin_name:=delimiter+escapefilename(executable_path,desk_env)+'res'+Dire bin_name:=stringdelim(escapefilename(executable_path,desk_env)+'res'+Di
ctorySeparator+'quad'+DirectorySeparator+ext+EXEEXT+delimiter; rectorySeparator+'quad'+DirectorySeparator+ext+EXEEXT);
if (ext='quad') or (ext='bcm') then cl:=bin_name+' -d '+in_param+' '+ou t_param if (ext='quad') or (ext='bcm') then cl:=bin_name+' -d '+in_param+' '+ou t_param
else cl:=bin_name+' d '+in_param+' '+out_param; else cl:=bin_name+' d '+in_param+' '+out_param;
launch_cl(cl,jobcode,outname); launch_cl(cl,jobcode,outname);
end; end;
7: begin 7: begin
if not(fileexists((executable_path+'res'+directoryseparator+'unace'+dir ectoryseparator+'unace'+EXEEXT))) then if not(fileexists((executable_path+'res'+directoryseparator+'unace'+dir ectoryseparator+'unace'+EXEEXT))) then
begin begin
if libre_directive>0 then begin reportnotsupported('ACE'); exit; end if libre_directive>0 then begin reportnotsupported('ACE'); exit; end
else else
if unaceshown=false then if unaceshown=false then
skipping to change at line 37142 skipping to change at line 37120
unaceshown:=true; unaceshown:=true;
end; end;
Form_peach.Visible:=false; Form_peach.Visible:=false;
saverestartclosepeaapp; saverestartclosepeaapp;
exit; exit;
end; end;
fun:='UNACE'; fun:='UNACE';
fun_status:=fun; fun_status:=fun;
jobcode:=formatdatetime('yyyymmdd_hh.nn.ss.ms',now)+fun; jobcode:=formatdatetime('yyyymmdd_hh.nn.ss.ms',now)+fun;
outname:=out_param; outname:=out_param;
in_param:=delimiter+escapefilename(in_param,desk_env)+delimiter; in_param:=stringdelim(escapefilename(in_param,desk_env));
bin_name:=delimiter+escapefilename(executable_path,desk_env)+'res'+Dire bin_name:=stringdelim(escapefilename(executable_path,desk_env)+'res'+Di
ctorySeparator+'unace'+DirectorySeparator+'unace'+EXEEXT+delimiter; rectorySeparator+'unace'+DirectorySeparator+'unace'+EXEEXT);
cl:=bin_name+' x '+in_param; cl:=bin_name+' x '+in_param;
if out_param<>'' then setcurrentdir((out_param)); if out_param<>'' then setcurrentdir((out_param));
launch_cl(cl,jobcode,outname); launch_cl(cl,jobcode,outname);
end; end;
8: begin 8: begin
fun:='UNLPAQ'; fun:='UNLPAQ';
fun_status:=fun; fun_status:=fun;
jobcode:=formatdatetime('yyyymmdd_hh.nn.ss.ms',now)+fun; jobcode:=formatdatetime('yyyymmdd_hh.nn.ss.ms',now)+fun;
lpaq_ver:=copy(extractfileext(in_param),2,length(extractfileext(in_para m))-1); lpaq_ver:=copy(extractfileext(in_param),2,length(extractfileext(in_para m))-1);
s:=extractfilename(in_param); s:=extractfilename(in_param);
cutextension(s); cutextension(s);
if out_param<>'' then if out_param<>'' then
if out_param[length(out_param)]<>directoryseparator then out_param:= out_param+directoryseparator; if out_param[length(out_param)]<>directoryseparator then out_param:= out_param+directoryseparator;
out_param:=out_param+s; out_param:=out_param+s;
outname:=out_param; outname:=out_param;
in_param:=delimiter+escapefilename(in_param,desk_env)+delimiter; in_param:=stringdelim(escapefilename(in_param,desk_env));
if fileexists((out_param)) then if fileexists((out_param)) then
if pMessageWarningYesNo(out_param+' '+txt_confirm_overwrite)<>6 then exit if pMessageWarningYesNo(out_param+' '+txt_confirm_overwrite)<>6 then exit
else clearfile(out_param); else clearfile(out_param);
out_param:=delimiter+escapefilename(out_param,desk_env)+delimiter; out_param:=stringdelim(escapefilename(out_param,desk_env));
bin_name:=delimiter+escapefilename(executable_path,desk_env)+'res'+Dire bin_name:=stringdelim(escapefilename(executable_path,desk_env)+'res'+Di
ctorySeparator+'lpaq'+DirectorySeparator+lpaq_ver+EXEEXT+delimiter; rectorySeparator+'lpaq'+DirectorySeparator+lpaq_ver+EXEEXT);
cl:=bin_name+' d '+in_param+' '+out_param; cl:=bin_name+' d '+in_param+' '+out_param;
launch_cl(cl,jobcode,outname); launch_cl(cl,jobcode,outname);
end; end;
9: begin 9: begin
fun:='UNARC'; fun:='UNARC';
fun_status:=fun; fun_status:=fun;
pw:='-p'+pwtotest; pw:='-p'+pwtotest;
case extpw of case extpw of
1: begin 1: begin
try try
skipping to change at line 37219 skipping to change at line 37197
if out_param<>'' then if out_param<>'' then
if out_param[length(out_param)]=directoryseparator then setlength(ou t_param,length(out_param)-1); //arc doesn't want directoryseparator as last char acter if out_param[length(out_param)]=directoryseparator then setlength(ou t_param,length(out_param)-1); //arc doesn't want directoryseparator as last char acter
//overwrite policy //overwrite policy
case extoptarc of case extoptarc of
0: begin overwrite_policy:='-op'; if zaout=2 then zaout:=1; end;//a sk auto switch to GUI+console mode if needed 0: begin overwrite_policy:='-op'; if zaout=2 then zaout:=1; end;//a sk auto switch to GUI+console mode if needed
1: overwrite_policy:='-o+';//overwrite 1: overwrite_policy:='-o+';//overwrite
2: overwrite_policy:='-o-';//skip 2: overwrite_policy:='-o-';//skip
//else overwrite_policy:='-o-';//for avoid blocking out of console m ode, skip existing files replaces ask option //else overwrite_policy:='-o-';//for avoid blocking out of console m ode, skip existing files replaces ask option
end; end;
outname:=out_param; outname:=out_param;
in_param:=delimiter+escapefilename(in_param,desk_env)+delimiter; in_param:=stringdelim(escapefilename(in_param,desk_env));
out_param:=delimiter+'-dp'+escapefilename(out_param,desk_env)+delimiter out_param:=stringdelim('-dp'+escapefilename(out_param,desk_env));
; bin_name:=stringdelim(escapefilename(executable_path,desk_env)+'res'+Di
bin_name:=delimiter+escapefilename(executable_path,desk_env)+'res'+Dire rectorySeparator+'arc'+DirectorySeparator+'arc'+EXEEXT);
ctorySeparator+'arc'+DirectorySeparator+'arc'+EXEEXT+delimiter;
cl:=bin_name+' x '+overwrite_policy+' '+in_param; cl:=bin_name+' x '+overwrite_policy+' '+in_param;
if pw<>'' then cl:=cl+' '+pw; if pw<>'' then cl:=cl+' '+pw;
cl:=cl+' '+out_param; cl:=cl+' '+out_param;
launch_cl(cl,jobcode,outname); launch_cl(cl,jobcode,outname);
end; end;
10: begin 10: begin
fun:='UNZPAQ'; fun:='UNZPAQ';
fun_status:=fun; fun_status:=fun;
jobcode:=formatdatetime('yyyymmdd_hh.nn.ss.ms',now)+fun; jobcode:=formatdatetime('yyyymmdd_hh.nn.ss.ms',now)+fun;
outname:=out_param; outname:=out_param;
if out_param<>'' then if out_param<>'' then
if out_param[length(out_param)]=directoryseparator then setlength(ou t_param,length(out_param)-1); if out_param[length(out_param)]=directoryseparator then setlength(ou t_param,length(out_param)-1);
in_param:=delimiter+escapefilename(in_param,desk_env)+delimiter; in_param:=stringdelim(escapefilename(in_param,desk_env));
out_param:=delimiter+escapefilename(out_param,desk_env)+delimiter; out_param:=stringdelim(escapefilename(out_param,desk_env));
bin_name:=delimiter+escapefilename(executable_path,desk_env)+'res'+Dire bin_name:=stringdelim(escapefilename(executable_path,desk_env)+'res'+Di
ctorySeparator+'zpaq'+DirectorySeparator+'zpaq'+EXEEXT+delimiter; rectorySeparator+'zpaq'+DirectorySeparator+'zpaq'+EXEEXT);
cl:=bin_name+' x '+in_param; cl:=bin_name+' x '+in_param;
launch_cl(cl,jobcode,outname); launch_cl(cl,jobcode,outname);
end; end;
11: begin 11: begin
fun:='UNBROTLI'; fun:='UNBROTLI';
fun_status:=fun; fun_status:=fun;
jobcode:=formatdatetime('yyyymmdd_hh.nn.ss.ms',now)+fun; jobcode:=formatdatetime('yyyymmdd_hh.nn.ss.ms',now)+fun;
s:=extractfilename(in_param); s:=extractfilename(in_param);
cutextension(s); cutextension(s);
if out_param<>'' then if out_param<>'' then
if out_param[length(out_param)]<>directoryseparator then out_param:= out_param+directoryseparator; if out_param[length(out_param)]<>directoryseparator then out_param:= out_param+directoryseparator;
out_param:=out_param+s; out_param:=out_param+s;
outname:=out_param; outname:=out_param;
in_param:=delimiter+escapefilename(in_param,desk_env)+delimiter; in_param:=stringdelim(escapefilename(in_param,desk_env));
if fileexists((out_param)) then if fileexists((out_param)) then
if pMessageWarningYesNo(out_param+' '+txt_confirm_overwrite)<>6 then exit if pMessageWarningYesNo(out_param+' '+txt_confirm_overwrite)<>6 then exit
else clearfile(out_param); else clearfile(out_param);
out_param:=delimiter+escapefilename(out_param,desk_env)+delimiter; out_param:=stringdelim(escapefilename(out_param,desk_env));
bin_name:=delimiter+escapefilename(executable_path,desk_env)+'res'+Dire bin_name:=stringdelim(escapefilename(executable_path,desk_env)+'res'+Di
ctorySeparator+'brotli'+DirectorySeparator+'brotli'+EXEEXT+delimiter; rectorySeparator+'brotli'+DirectorySeparator+'brotli'+EXEEXT);
cl:=bin_name+' -d '+in_param+' -o '+out_param; cl:=bin_name+' -d '+in_param+' -o '+out_param;
launch_cl(cl,jobcode,outname); launch_cl(cl,jobcode,outname);
end; end;
12: begin 12: begin
fun:='UNZSTD'; fun:='UNZSTD';
fun_status:=fun; fun_status:=fun;
jobcode:=formatdatetime('yyyymmdd_hh.nn.ss.ms',now)+fun; jobcode:=formatdatetime('yyyymmdd_hh.nn.ss.ms',now)+fun;
s:=extractfilename(in_param); s:=extractfilename(in_param);
cutextension(s); cutextension(s);
if out_param<>'' then if out_param<>'' then
if out_param[length(out_param)]<>directoryseparator then out_param:= out_param+directoryseparator; if out_param[length(out_param)]<>directoryseparator then out_param:= out_param+directoryseparator;
out_param:=out_param+s; out_param:=out_param+s;
outname:=out_param; outname:=out_param;
in_param:=delimiter+escapefilename(in_param,desk_env)+delimiter; in_param:=stringdelim(escapefilename(in_param,desk_env));
if fileexists((out_param)) then if fileexists((out_param)) then
if pMessageWarningYesNo(out_param+' '+txt_confirm_overwrite)<>6 then exit if pMessageWarningYesNo(out_param+' '+txt_confirm_overwrite)<>6 then exit
else clearfile(out_param); else clearfile(out_param);
out_param:=delimiter+escapefilename(out_param,desk_env)+delimiter; out_param:=stringdelim(escapefilename(out_param,desk_env));
bin_name:=delimiter+escapefilename(executable_path,desk_env)+'res'+Dire bin_name:=stringdelim(escapefilename(executable_path,desk_env)+'res'+Di
ctorySeparator+'zstd'+DirectorySeparator+'zstd'+EXEEXT+delimiter; rectorySeparator+'zstd'+DirectorySeparator+'zstd'+EXEEXT);
cl:=bin_name+' -d '+in_param+' -o '+out_param; cl:=bin_name+' -d '+in_param+' -o '+out_param;
launch_cl(cl,jobcode,outname); launch_cl(cl,jobcode,outname);
end; end;
else else
begin begin
if libre_directive=2 then if testifrar(in_param)=1 then begin reportnot supported_info('RAR'); exit; end; if libre_directive=2 then if testifrar(in_param)=1 then begin reportnot supported_info('RAR'); exit; end;
fun:='UN7Z'; fun:='UN7Z';
fun_status:=fun; fun_status:=fun;
if testifrar5(in_param)=1 then israr5:='rar5' else israr5:=''; //rar5 t est, if rar5 switch to appropriate procedure to call unrar (if allowed by libre_ directive=0) if testifrar5(in_param)=1 then israr5:='rar5' else israr5:=''; //rar5 t est, if rar5 switch to appropriate procedure to call unrar (if allowed by libre_ directive=0)
if israr5='rar5' then if israr5='rar5' then
skipping to change at line 37337 skipping to change at line 37315
set_output_folder(out_param,in_param,true,0); set_output_folder(out_param,in_param,true,0);
//overwrite policy //overwrite policy
case extopt7z of case extopt7z of
0: overwrite_policy:='-o-';//skip existing files 0: overwrite_policy:='-o-';//skip existing files
1: overwrite_policy:='-or';//auto rename extracting files 1: overwrite_policy:='-or';//auto rename extracting files
2: overwrite_policy:='-or';//auto rename existing files //not suppor ted by unrar, fall back in renaming extracted files 2: overwrite_policy:='-or';//auto rename existing files //not suppor ted by unrar, fall back in renaming extracted files
3: overwrite_policy:='-o+';//overwrite all existing files 3: overwrite_policy:='-o+';//overwrite all existing files
4: begin overwrite_policy:=''; if zaout=2 then zaout:=1; end;//ask a uto switch to GUI+console mode if needed 4: begin overwrite_policy:=''; if zaout=2 then zaout:=1; end;//ask a uto switch to GUI+console mode if needed
end; end;
outname:=out_param; outname:=out_param;
out_param:=delimiter+escapefilename(out_param,desk_env)+delimiter; out_param:=stringdelim(escapefilename(out_param,desk_env));
in_param:=delimiter+escapefilename(in_param,desk_env)+delimiter; in_param:=stringdelim(escapefilename(in_param,desk_env));
bin_name:=delimiter+escapefilename(executable_path,desk_env)+'res'+D bin_name:=stringdelim(escapefilename(executable_path,desk_env)+'res'
irectorySeparator+'unrar'+DirectorySeparator+UNRARNAME+EXEEXT+delimiter; +DirectorySeparator+'unrar'+DirectorySeparator+UNRARNAME+EXEEXT);
archive_function:='x'; archive_function:='x';
cl:=bin_name+' '+archive_function; cl:=bin_name+' '+archive_function;
cl:=cl+' '+in_param; cl:=cl+' '+in_param;
if overwrite_policy<>'' then cl:=cl+' '+overwrite_policy; if overwrite_policy<>'' then cl:=cl+' '+overwrite_policy;
cl:=cl+' '+pw; cl:=cl+' '+pw;
cl:=cl+' '+out_param; cl:=cl+' '+out_param;
launch_cl(cl,jobcode,outname); launch_cl(cl,jobcode,outname);
end end
else else
begin begin
skipping to change at line 37409 skipping to change at line 37387
set_output_folder(out_param,in_param,true,0); set_output_folder(out_param,in_param,true,0);
//overwrite policy //overwrite policy
case extopt7z of case extopt7z of
0: overwrite_policy:='-aos';//skip existing files 0: overwrite_policy:='-aos';//skip existing files
1: overwrite_policy:='-aou';//auto rename extracting files 1: overwrite_policy:='-aou';//auto rename extracting files
2: overwrite_policy:='-aot';//auto rename existing files 2: overwrite_policy:='-aot';//auto rename existing files
3: overwrite_policy:='-aoa';//overwrite all existing files 3: overwrite_policy:='-aoa';//overwrite all existing files
4: begin overwrite_policy:=''; if zaout=2 then zaout:=1; end;//ask a uto switch to GUI+console mode if needed 4: begin overwrite_policy:=''; if zaout=2 then zaout:=1; end;//ask a uto switch to GUI+console mode if needed
end; end;
outname:=out_param; outname:=out_param;
out_param:=delimiter+'-o'+escapefilename(out_param,desk_env)+delimit out_param:=stringdelim('-o'+escapefilename(out_param,desk_env));
er; in_param:=stringdelim(escapefilename(in_param,desk_env));
in_param:=delimiter+escapefilename(in_param,desk_env)+delimiter; bin_name:=stringdelim(escapefilename(executable_path,desk_env)+'res'
bin_name:=delimiter+escapefilename(executable_path,desk_env)+'res'+D +DirectorySeparator+'7z'+DirectorySeparator+'7z'+EXEEXT);
irectorySeparator+'7z'+DirectorySeparator+'7z'+EXEEXT+delimiter;
{$IFDEF LINUX}if sys7zlin=1 then bin_name:='7z';{$ENDIF} {$IFDEF LINUX}if sys7zlin=1 then bin_name:='7z';{$ENDIF}
archive_function:='x'; archive_function:='x';
cl:=bin_name+' '+archive_function; cl:=bin_name+' '+archive_function;
if overwrite_policy<>'' then cl:=cl+' '+overwrite_policy; if overwrite_policy<>'' then cl:=cl+' '+overwrite_policy;
if nonverboselog=1 then cl:=cl+' -bb0 -bse0 -bsp2' else cl:=cl+' -bb 1 -bse1 -bsp2';//requires v15.x if nonverboselog=1 then cl:=cl+' -bb0 -bse0 -bsp2' else cl:=cl+' -bb 1 -bse1 -bsp2';//requires v15.x
cl:=cl+' '+out_param; cl:=cl+' '+out_param;
cl:=cl+' '+pw; cl:=cl+' '+pw;
{$IFDEF MSWINDOWS} {$IFDEF MSWINDOWS}
case enc7zscc of case enc7zscc of
0: cl:=cl+' -sccUTF-8'; 0: cl:=cl+' -sccUTF-8';
skipping to change at line 37495 skipping to change at line 37473
else //jump to handling custom file types else //jump to handling custom file types
begin begin
directextractfromname(in_param,out_param,'extract',''); directextractfromname(in_param,out_param,'extract','');
if pbatch='complete' then erase_fromname('extract',in_param); if pbatch='complete' then erase_fromname('extract',in_param);
exit; exit;
end; end;
end; end;
'simple': 'simple':
begin begin
out_param:=paramstr(3); out_param:=paramstr(3);
if out_param='' then out_param:=extractfilepath(in_param);
if i=3 then if i=3 then
begin begin
if control_outpath(out_param)<>0 then exit; if control_outpath(out_param)<>0 then exit;
continue; continue;
end;//output; end;//output;
end; end;
else else
begin begin
out_param:=extractfilepath(in_param); out_param:=extractfilepath(in_param);
if control_outpath(out_param)<>0 then exit; if control_outpath(out_param)<>0 then exit;
skipping to change at line 37594 skipping to change at line 37573
Form_peach.Visible:=false; Form_peach.Visible:=false;
saverestartclosepeaapp; saverestartclosepeaapp;
exit; exit;
end; end;
fun:='UNACE'; fun:='UNACE';
fun_status:=fun; fun_status:=fun;
if ltfun='l' then subfun:='list' if ltfun='l' then subfun:='list'
else subfun:='test'; else subfun:='test';
jobcode:=formatdatetime('yyyymmdd_hh.nn.ss.ms',now)+fun; jobcode:=formatdatetime('yyyymmdd_hh.nn.ss.ms',now)+fun;
out_param:=extractfilepath(in_param); out_param:=extractfilepath(in_param);
in_param:=delimiter+escapefilename(in_param,desk_env)+delimiter; in_param:=stringdelim(escapefilename(in_param,desk_env));
bin_name:=delimiter+escapefilename(executable_path,desk_env)+'res'+Dire bin_name:=stringdelim(escapefilename(executable_path,desk_env)+'res'+Di
ctorySeparator+'unace'+DirectorySeparator+'unace'+EXEEXT+delimiter; rectorySeparator+'unace'+DirectorySeparator+'unace'+EXEEXT);
//archive function //archive function
archive_function:=ltfun; archive_function:=ltfun;
cl:=bin_name+' '+archive_function; cl:=bin_name+' '+archive_function;
cl:=cl+' '+in_param; cl:=cl+' '+in_param;
launch_cl(cl,jobcode,out_param); launch_cl(cl,jobcode,out_param);
end; end;
8: begin 8: begin
pMessageWarningOK('LPAQ: '+txt_listtest); pMessageWarningOK('LPAQ: '+txt_listtest);
break; break;
end; end;
skipping to change at line 37648 skipping to change at line 37627
if directask_pwkeyfile_context(pw,ec)<>0 then exit; if directask_pwkeyfile_context(pw,ec)<>0 then exit;
end; end;
4: begin 4: begin
if directask_pwkeyfile_context(pw,0)<>0 then exit; if directask_pwkeyfile_context(pw,0)<>0 then exit;
end; end;
end; end;
if ltfun='l' then subfun:='list' if ltfun='l' then subfun:='list'
else subfun:='test'; else subfun:='test';
jobcode:=formatdatetime('yyyymmdd_hh.nn.ss.ms',now)+fun; jobcode:=formatdatetime('yyyymmdd_hh.nn.ss.ms',now)+fun;
out_param:=extractfilepath(in_param); out_param:=extractfilepath(in_param);
in_param:=delimiter+escapefilename(in_param,desk_env)+delimiter; in_param:=stringdelim(escapefilename(in_param,desk_env));
bin_name:=delimiter+escapefilename(executable_path,desk_env)+'res'+Dire bin_name:=stringdelim(escapefilename(executable_path,desk_env)+'res'+Di
ctorySeparator+'arc'+DirectorySeparator+'arc'+EXEEXT+delimiter; rectorySeparator+'arc'+DirectorySeparator+'arc'+EXEEXT);
//archive function //archive function
archive_function:=ltfun; archive_function:=ltfun;
cl:=bin_name+' '+archive_function; cl:=bin_name+' '+archive_function;
cl:=cl+' '+in_param; cl:=cl+' '+in_param;
cl:=cl+' '+pw; cl:=cl+' '+pw;
launch_cl(cl,jobcode,out_param); launch_cl(cl,jobcode,out_param);
end; end;
else else
begin begin
if libre_directive=2 then if testifrar(in_param)=1 then begin reportnot supported_info('RAR'); exit; end; if libre_directive=2 then if testifrar(in_param)=1 then begin reportnot supported_info('RAR'); exit; end;
skipping to change at line 37708 skipping to change at line 37687
end; end;
end; end;
if ltfun='l' then subfun:='list' if ltfun='l' then subfun:='list'
else subfun:='test'; else subfun:='test';
jobcode:=formatdatetime('yyyymmdd_hh.nn.ss.ms',now)+fun; jobcode:=formatdatetime('yyyymmdd_hh.nn.ss.ms',now)+fun;
try try
srcfilesize_multipart(in_param,tsize); //expressed in B srcfilesize_multipart(in_param,tsize); //expressed in B
except except
end; end;
out_param:=extractfilepath(in_param); out_param:=extractfilepath(in_param);
in_param:=delimiter+escapefilename(in_param,desk_env)+delimiter; in_param:=stringdelim(escapefilename(in_param,desk_env));
bin_name:=delimiter+escapefilename(executable_path,desk_env)+'res'+D bin_name:=stringdelim(escapefilename(executable_path,desk_env)+'res'
irectorySeparator+'unrar'+DirectorySeparator+UNRARNAME+EXEEXT+delimiter; +DirectorySeparator+'unrar'+DirectorySeparator+UNRARNAME+EXEEXT);
//archive function //archive function
if ltfun='l' then archive_function:='lb' if ltfun='l' then archive_function:='lb'
else archive_function:='t'; else archive_function:='t';
cl:=bin_name+' '+archive_function; cl:=bin_name+' '+archive_function;
cl:=cl+' '+pw; cl:=cl+' '+pw;
cl:=cl+' '+in_param; cl:=cl+' '+in_param;
launch_cl(cl,jobcode,out_param); launch_cl(cl,jobcode,out_param);
end end
else else
begin begin
skipping to change at line 37763 skipping to change at line 37742
end; end;
end; end;
if ltfun='l' then subfun:='list' if ltfun='l' then subfun:='list'
else subfun:='test'; else subfun:='test';
jobcode:=formatdatetime('yyyymmdd_hh.nn.ss.ms',now)+fun; jobcode:=formatdatetime('yyyymmdd_hh.nn.ss.ms',now)+fun;
try try
srcfilesize_multipart(in_param,tsize); //expressed in B srcfilesize_multipart(in_param,tsize); //expressed in B
except except
end; end;
out_param:=extractfilepath(in_param); out_param:=extractfilepath(in_param);
in_param:=delimiter+escapefilename(in_param,desk_env)+delimiter; in_param:=stringdelim(escapefilename(in_param,desk_env));
bin_name:=delimiter+escapefilename(executable_path,desk_env)+'res'+D bin_name:=stringdelim(escapefilename(executable_path,desk_env)+'res'
irectorySeparator+'7z'+DirectorySeparator+'7z'+EXEEXT+delimiter; +DirectorySeparator+'7z'+DirectorySeparator+'7z'+EXEEXT);
{$IFDEF LINUX}if sys7zlin=1 then bin_name:='7z';{$ENDIF} {$IFDEF LINUX}if sys7zlin=1 then bin_name:='7z';{$ENDIF}
//archive function //archive function
archive_function:=ltfun; archive_function:=ltfun;
cl:=bin_name+' '+archive_function; cl:=bin_name+' '+archive_function;
if nonverboselog=1 then cl:=cl+' -bb0 -bse0 -bsp2' else cl:=cl+' -bb 1 -bse1 -bsp2';//requires v15.x if nonverboselog=1 then cl:=cl+' -bb0 -bse0 -bsp2' else cl:=cl+' -bb 1 -bse1 -bsp2';//requires v15.x
cl:=cl+' '+pw; cl:=cl+' '+pw;
cl:=cl+' '+in_param; cl:=cl+' '+in_param;
launch_cl(cl,jobcode,out_param); launch_cl(cl,jobcode,out_param);
end; end;
end; end;
skipping to change at line 37804 skipping to change at line 37783
begin begin
msg_not_accessible(i); msg_not_accessible(i);
break; break;
end; end;
in_param:=ExpandFileName((paramstr(i))); in_param:=ExpandFileName((paramstr(i)));
j:=testinput(in_param,true); j:=testinput(in_param,true);
case j of case j of
0: if pMessageInfoYesNo((paramstr(i))+' '+txt_2_8_custom)=7 then break; 0: if pMessageInfoYesNo((paramstr(i))+' '+txt_2_8_custom)=7 then break;
end; end;
P:=tprocessutf8.Create(nil); P:=tprocessutf8.Create(nil);
in_param:=delimiter+escapefilename(in_param,desk_env)+delimiter; in_param:=stringdelim(escapefilename(in_param,desk_env));
bin_name:=delimiter+escapefilename(executable_path,desk_env)+'peazip'+EXEEXT+ bin_name:=stringdelim(escapefilename(executable_path,desk_env)+'peazip'+EXEEX
delimiter; T);
{$IFDEF MSWINDOWS}P.Options := [poNoConsole];{$ELSE}P.Options := [poNoConsole , poWaitOnExit];{$ENDIF} {$IFDEF MSWINDOWS}P.Options := [poNoConsole];{$ELSE}P.Options := [poNoConsole , poWaitOnExit];{$ENDIF}
cl:=bin_name+' -ext2open '+in_param; //ext2open handles a single input in ope n interface cl:=bin_name+' -ext2open '+in_param; //ext2open handles a single input in ope n interface
P.CommandLine:=cl; P.CommandLine:=cl;
if validatecl(cl)<>0 then begin pMessageWarningOK(txt_2_7_validatecl+' '+cl); exit; end; if validatecl(cl)<>0 then begin pMessageWarningOK(txt_2_7_validatecl+' '+cl); exit; end;
P.Execute; P.Execute;
P.Free; P.Free;
end; end;
end; end;
procedure ext2browseasarchive; //take multiple objects as input; if they are sup ported archive types each one is opened in a new PeaZip instance procedure ext2browseasarchive; //take multiple objects as input; if they are sup ported archive types each one is opened in a new PeaZip instance
skipping to change at line 37836 skipping to change at line 37815
for i:=2 to paramcount do for i:=2 to paramcount do
begin begin
if filegetattr((paramstr(i))) > 0 then if filegetattr((paramstr(i))) > 0 then
else else
begin begin
msg_not_accessible(i); msg_not_accessible(i);
break; break;
end; end;
in_param:=ExpandFileName((paramstr(i))); in_param:=ExpandFileName((paramstr(i)));
P:=tprocessutf8.Create(nil); P:=tprocessutf8.Create(nil);
in_param:=delimiter+escapefilename(in_param,desk_env)+delimiter; in_param:=stringdelim(escapefilename(in_param,desk_env));
bin_name:=delimiter+escapefilename(executable_path,desk_env)+'peazip'+EXEEXT+ bin_name:=stringdelim(escapefilename(executable_path,desk_env)+'peazip'+EXEEX
delimiter; T);
{$IFDEF MSWINDOWS}P.Options := [poNoConsole];{$ELSE}P.Options := [poNoConsole , poWaitOnExit];{$ENDIF} {$IFDEF MSWINDOWS}P.Options := [poNoConsole];{$ELSE}P.Options := [poNoConsole , poWaitOnExit];{$ENDIF}
cl:=bin_name+' -ext2openasarchive '+in_param; //ext2openasarchive handles a s ingle input in open interface with forceopenasarchive set true cl:=bin_name+' -ext2openasarchive '+in_param; //ext2openasarchive handles a s ingle input in open interface with forceopenasarchive set true
P.CommandLine:=cl; P.CommandLine:=cl;
if validatecl(cl)<>0 then begin pMessageWarningOK(txt_2_7_validatecl+' '+cl); exit; end; if validatecl(cl)<>0 then begin pMessageWarningOK(txt_2_7_validatecl+' '+cl); exit; end;
P.Execute; P.Execute;
P.Free; P.Free;
end; end;
end; end;
procedure ext2browsepath; //take multiple objects as input, each one is opened i n a new PeaZip instance procedure ext2browsepath; //take multiple objects as input, each one is opened i n a new PeaZip instance
skipping to change at line 37870 skipping to change at line 37849
if filegetattr((paramstr(i))) > 0 then if filegetattr((paramstr(i))) > 0 then
else else
begin begin
msg_not_accessible(i); msg_not_accessible(i);
break; break;
end; end;
in_param:=ExpandFileName((paramstr(i))); in_param:=ExpandFileName((paramstr(i)));
if directoryexists(in_param) then if directoryexists(in_param) then
else in_param:=extractfilepath(in_param); else in_param:=extractfilepath(in_param);
P:=tprocessutf8.Create(nil); P:=tprocessutf8.Create(nil);
in_param:=delimiter+escapefilename(in_param,desk_env)+delimiter; in_param:=stringdelim(escapefilename(in_param,desk_env));
bin_name:=delimiter+escapefilename(executable_path,desk_env)+'peazip'+EXEE bin_name:=stringdelim(escapefilename(executable_path,desk_env)+'peazip'+EX
XT+delimiter; EEXT);
{$IFDEF MSWINDOWS}P.Options := [poNoConsole];{$ELSE}P.Options := [poNoCons ole, poWaitOnExit];{$ENDIF} {$IFDEF MSWINDOWS}P.Options := [poNoConsole];{$ELSE}P.Options := [poNoCons ole, poWaitOnExit];{$ENDIF}
cl:=bin_name+' -ext2open '+in_param; //ext2open handles a single input in open interface cl:=bin_name+' -ext2open '+in_param; //ext2open handles a single input in open interface
P.CommandLine:=cl; P.CommandLine:=cl;
if validatecl(cl)<>0 then begin pMessageWarningOK(txt_2_7_validatecl+' '+c l); exit; end; if validatecl(cl)<>0 then begin pMessageWarningOK(txt_2_7_validatecl+' '+c l); exit; end;
P.Execute; P.Execute;
P.Free; P.Free;
end; end;
end; end;
procedure open_cp(s:ansistring); procedure open_cp(s:ansistring);
skipping to change at line 38004 skipping to change at line 37983
//save_custedit; not needed, apps are saved exiting from the modal dialog //save_custedit; not needed, apps are saved exiting from the modal dialog
except except
end; end;
end; end;
procedure restartpeaapp; procedure restartpeaapp;
var var
P:tprocessutf8; P:tprocessutf8;
cl:ansistring; cl:ansistring;
begin begin
{$IFDEF MSWINDOWS} cl:=stringdelim(executable_path+'peazip'+EXEEXT);
cl:=delimiter+executable_path+'peazip'+EXEEXT+delimiter;
{$ELSE}
cl:=executable_path+'peazip'+EXEEXT;
{$ENDIF}
if validatecl(cl)<>0 then begin pMessageWarningOK(txt_2_7_validatecl+' '+cl); ex it; end; if validatecl(cl)<>0 then begin pMessageWarningOK(txt_2_7_validatecl+' '+cl); ex it; end;
P:=tprocessutf8.Create(nil); P:=tprocessutf8.Create(nil);
P.Executable:=cl; P.Executable:=cl;
P.Execute; P.Execute;
P.Free; P.Free;
end; end;
procedure exit_nosave; procedure exit_nosave;
begin begin
needsave:=false; needsave:=false;
skipping to change at line 38117 skipping to change at line 38092
12: ShellExecuteW(Form_peach.Handle, PWideChar ('open'), PWideChar('"'+utf8de code(custedit12)+'"'), PWideChar (''), PWideChar (''), SW_SHOWNORMAL); 12: ShellExecuteW(Form_peach.Handle, PWideChar ('open'), PWideChar('"'+utf8de code(custedit12)+'"'), PWideChar (''), PWideChar (''), SW_SHOWNORMAL);
13: ShellExecuteW(Form_peach.Handle, PWideChar ('open'), PWideChar('"'+utf8de code(custedit13)+'"'), PWideChar (''), PWideChar (''), SW_SHOWNORMAL); 13: ShellExecuteW(Form_peach.Handle, PWideChar ('open'), PWideChar('"'+utf8de code(custedit13)+'"'), PWideChar (''), PWideChar (''), SW_SHOWNORMAL);
14: ShellExecuteW(Form_peach.Handle, PWideChar ('open'), PWideChar('"'+utf8de code(custedit14)+'"'), PWideChar (''), PWideChar (''), SW_SHOWNORMAL); 14: ShellExecuteW(Form_peach.Handle, PWideChar ('open'), PWideChar('"'+utf8de code(custedit14)+'"'), PWideChar (''), PWideChar (''), SW_SHOWNORMAL);
15: ShellExecuteW(Form_peach.Handle, PWideChar ('open'), PWideChar('"'+utf8de code(custedit15)+'"'), PWideChar (''), PWideChar (''), SW_SHOWNORMAL); 15: ShellExecuteW(Form_peach.Handle, PWideChar ('open'), PWideChar('"'+utf8de code(custedit15)+'"'), PWideChar (''), PWideChar (''), SW_SHOWNORMAL);
16: ShellExecuteW(Form_peach.Handle, PWideChar ('open'), PWideChar('"'+utf8de code(custedit16)+'"'), PWideChar (''), PWideChar (''), SW_SHOWNORMAL); 16: ShellExecuteW(Form_peach.Handle, PWideChar ('open'), PWideChar('"'+utf8de code(custedit16)+'"'), PWideChar (''), PWideChar (''), SW_SHOWNORMAL);
end; end;
{$ELSE} {$ELSE}
try try
P:=tprocessutf8.Create(nil); P:=tprocessutf8.Create(nil);
case i of case i of
1: cl:=delimiter+custedit1+delimiter; 1: cl:=stringdelim(custedit1);
2: cl:=delimiter+custedit2+delimiter; 2: cl:=stringdelim(custedit2);
3: cl:=delimiter+custedit3+delimiter; 3: cl:=stringdelim(custedit3);
4: cl:=delimiter+custedit4+delimiter; 4: cl:=stringdelim(custedit4);
5: cl:=delimiter+custedit5+delimiter; 5: cl:=stringdelim(custedit5);
6: cl:=delimiter+custedit6+delimiter; 6: cl:=stringdelim(custedit6);
7: cl:=delimiter+custedit7+delimiter; 7: cl:=stringdelim(custedit7);
8: cl:=delimiter+custedit8+delimiter; 8: cl:=stringdelim(custedit8);
9: cl:=delimiter+custedit9+delimiter; 9: cl:=stringdelim(custedit9);
10: cl:=delimiter+custedit10+delimiter; 10: cl:=stringdelim(custedit10);
11: cl:=delimiter+custedit11+delimiter; 11: cl:=stringdelim(custedit11);
12: cl:=delimiter+custedit12+delimiter; 12: cl:=stringdelim(custedit12);
13: cl:=delimiter+custedit13+delimiter; 13: cl:=stringdelim(custedit13);
14: cl:=delimiter+custedit14+delimiter; 14: cl:=stringdelim(custedit14);
15: cl:=delimiter+custedit15+delimiter; 15: cl:=stringdelim(custedit15);
16: cl:=delimiter+custedit16+delimiter; 16: cl:=stringdelim(custedit16);
end; end;
P.CommandLine:=cl; P.CommandLine:=cl;
if validatecl(cl)<>0 then begin pMessageWarningOK(txt_2_7_validatecl+' '+cl); ex it; end; if validatecl(cl)<>0 then begin pMessageWarningOK(txt_2_7_validatecl+' '+cl); ex it; end;
P.Execute; P.Execute;
P.Free; P.Free;
except except
end; end;
{$ENDIF} {$ENDIF}
end; end;
skipping to change at line 38251 skipping to change at line 38226
16: if isawebservice(custedit16) then 16: if isawebservice(custedit16) then
ShellExecuteW(Form_peach.Handle, PWideChar ('open'), PWideChar('"'+utf8 decode(custedit16)+w1+'"'), PWideChar (''), PWideChar (''), SW_SHOWNORMAL) ShellExecuteW(Form_peach.Handle, PWideChar ('open'), PWideChar('"'+utf8 decode(custedit16)+w1+'"'), PWideChar (''), PWideChar (''), SW_SHOWNORMAL)
else else
ShellExecuteW(Form_peach.Handle, PWideChar ('open'), PWideChar('"'+utf8 decode(custedit16)+'"'), PWideChar ('"'+w+'"'), PWideChar (''), SW_SHOWNORMAL); ShellExecuteW(Form_peach.Handle, PWideChar ('open'), PWideChar('"'+utf8 decode(custedit16)+'"'), PWideChar ('"'+w+'"'), PWideChar (''), SW_SHOWNORMAL);
end; end;
{$ELSE} {$ELSE}
try try
P:=tprocessutf8.Create(nil); P:=tprocessutf8.Create(nil);
case i of case i of
1: if isawebservice(custedit1) then 1: if isawebservice(custedit1) then
cl:=delimiter+custedit1+extractfilename(s)+delimiter cl:=stringdelim(custedit1+extractfilename(s))
else else
cl:=delimiter+custedit1+delimiter+' '+delimiter+s+delimiter; cl:=stringdelim(custedit1)+' '+stringdelim(s);
2: if isawebservice(custedit2) then 2: if isawebservice(custedit2) then
cl:=delimiter+custedit2+extractfilename(s)+delimiter cl:=stringdelim(custedit2+extractfilename(s))
else else
cl:=delimiter+custedit2+delimiter+' '+delimiter+s+delimiter; cl:=stringdelim(custedit2)+' '+stringdelim(s);
3: if isawebservice(custedit3) then 3: if isawebservice(custedit3) then
cl:=delimiter+custedit3+extractfilename(s)+delimiter cl:=stringdelim(custedit3+extractfilename(s))
else else
cl:=delimiter+custedit3+delimiter+' '+delimiter+s+delimiter; cl:=stringdelim(custedit3)+' '+stringdelim(s);
4: if isawebservice(custedit4) then 4: if isawebservice(custedit4) then
cl:=delimiter+custedit4+extractfilename(s)+delimiter cl:=stringdelim(custedit4+extractfilename(s))
else else
cl:=delimiter+custedit4+delimiter+' '+delimiter+s+delimiter; cl:=stringdelim(custedit4)+' '+stringdelim(s);
5: if isawebservice(custedit5) then 5: if isawebservice(custedit5) then
cl:=delimiter+custedit5+extractfilename(s)+delimiter cl:=stringdelim(custedit5+extractfilename(s))
else else
cl:=delimiter+custedit5+delimiter+' '+delimiter+s+delimiter; cl:=stringdelim(custedit5)+' '+stringdelim(s);
6: if isawebservice(custedit6) then 6: if isawebservice(custedit6) then
cl:=delimiter+custedit6+extractfilename(s)+delimiter cl:=stringdelim(custedit6+extractfilename(s))
else else
cl:=delimiter+custedit6+delimiter+' '+delimiter+s+delimiter; cl:=stringdelim(custedit6)+' '+stringdelim(s);
7: if isawebservice(custedit7) then 7: if isawebservice(custedit7) then
cl:=delimiter+custedit7+extractfilename(s)+delimiter cl:=stringdelim(custedit7+extractfilename(s))
else else
cl:=delimiter+custedit7+delimiter+' '+delimiter+s+delimiter; cl:=stringdelim(custedit7)+' '+stringdelim(s);
8: if isawebservice(custedit8) then 8: if isawebservice(custedit8) then
cl:=delimiter+custedit8+extractfilename(s)+delimiter cl:=stringdelim(custedit8+extractfilename(s))
else else
cl:=delimiter+custedit8+delimiter+' '+delimiter+s+delimiter; cl:=stringdelim(custedit8)+' '+stringdelim(s);
9: if isawebservice(custedit9) then 9: if isawebservice(custedit9) then
cl:=delimiter+custedit9+extractfilename(s)+delimiter cl:=stringdelim(custedit9+extractfilename(s))
else else
cl:=delimiter+custedit9+delimiter+' '+delimiter+s+delimiter; cl:=stringdelim(custedit9)+' '+stringdelim(s);
10: if isawebservice(custedit10) then 10: if isawebservice(custedit10) then
cl:=delimiter+custedit10+extractfilename(s)+delimiter cl:=stringdelim(custedit10+extractfilename(s))
else else
cl:=delimiter+custedit10+delimiter+' '+delimiter+s+delimiter; cl:=stringdelim(custedit10)+' '+stringdelim(s);
11: if isawebservice(custedit11) then 11: if isawebservice(custedit11) then
cl:=delimiter+custedit11+extractfilename(s)+delimiter cl:=stringdelim(custedit11+extractfilename(s))
else else
cl:=delimiter+custedit11+delimiter+' '+delimiter+s+delimiter; cl:=stringdelim(custedit11)+' '+stringdelim(s);
12: if isawebservice(custedit12) then 12: if isawebservice(custedit12) then
cl:=delimiter+custedit12+extractfilename(s)+delimiter cl:=stringdelim(custedit12+extractfilename(s))
else else
cl:=delimiter+custedit12+delimiter+' '+delimiter+s+delimiter; cl:=stringdelim(custedit12)+' '+stringdelim(s);
13: if isawebservice(custedit13) then 13: if isawebservice(custedit13) then
cl:=delimiter+custedit13+extractfilename(s)+delimiter cl:=stringdelim(custedit13+extractfilename(s))
else else
cl:=delimiter+custedit13+delimiter+' '+delimiter+s+delimiter; cl:=stringdelim(custedit13)+' '+stringdelim(s);
14: if isawebservice(custedit14) then 14: if isawebservice(custedit14) then
cl:=delimiter+custedit14+extractfilename(s)+delimiter cl:=stringdelim(custedit14+extractfilename(s))
else else
cl:=delimiter+custedit14+delimiter+' '+delimiter+s+delimiter; cl:=stringdelim(custedit14)+' '+stringdelim(s);
15: if isawebservice(custedit15) then 15: if isawebservice(custedit15) then
cl:=delimiter+custedit15+extractfilename(s)+delimiter cl:=stringdelim(custedit15+extractfilename(s))
else else
cl:=delimiter+custedit15+delimiter+' '+delimiter+s+delimiter; cl:=stringdelim(custedit15)+' '+stringdelim(s);
16: if isawebservice(custedit16) then 16: if isawebservice(custedit16) then
cl:=delimiter+custedit16+extractfilename(s)+delimiter cl:=stringdelim(custedit16+extractfilename(s))
else else
cl:=delimiter+custedit16+delimiter+' '+delimiter+s+delimiter; cl:=stringdelim(custedit16)+' '+stringdelim(s);
end; end;
P.CommandLine:=cl; P.CommandLine:=cl;
if validatecl(cl)<>0 then begin pMessageWarningOK(txt_2_7_validatecl+' '+cl); ex it; end; if validatecl(cl)<>0 then begin pMessageWarningOK(txt_2_7_validatecl+' '+cl); ex it; end;
P.Execute; P.Execute;
P.Free; P.Free;
except except
end; end;
{$ENDIF} {$ENDIF}
end; end;
skipping to change at line 38347 skipping to change at line 38322
2: cl:=advedit2alt; 2: cl:=advedit2alt;
3: cl:=advedit3alt; 3: cl:=advedit3alt;
4: cl:=advedit4alt; 4: cl:=advedit4alt;
5: cl:=advedit5alt; 5: cl:=advedit5alt;
6: cl:=advedit6alt; 6: cl:=advedit6alt;
7: cl:=advedit7alt; 7: cl:=advedit7alt;
8: cl:=advedit8alt; 8: cl:=advedit8alt;
end end
else else
case i of case i of
1: cl:=advedit1before+delimiter+s+delimiter+advedit1after; 1: cl:=advedit1before+stringdelim(s)+advedit1after;
2: cl:=advedit2before+delimiter+s+delimiter+advedit2after; 2: cl:=advedit2before+stringdelim(s)+advedit2after;
3: cl:=advedit3before+delimiter+s+delimiter+advedit3after; 3: cl:=advedit3before+stringdelim(s)+advedit3after;
4: cl:=advedit4before+delimiter+s+delimiter+advedit4after; 4: cl:=advedit4before+stringdelim(s)+advedit4after;
5: cl:=advedit5before+delimiter+s+delimiter+advedit5after; 5: cl:=advedit5before+stringdelim(s)+advedit5after;
6: cl:=advedit6before+delimiter+s+delimiter+advedit6after; 6: cl:=advedit6before+stringdelim(s)+advedit6after;
7: cl:=advedit7before+delimiter+s+delimiter+advedit7after; 7: cl:=advedit7before+stringdelim(s)+advedit7after;
8: cl:=advedit8before+delimiter+s+delimiter+advedit8after; 8: cl:=advedit8before+stringdelim(s)+advedit8after;
end; end;
P.CommandLine:=cl; P.CommandLine:=cl;
if validatecl(cl)<>0 then begin pMessageWarningOK(txt_2_7_validatecl+' '+cl); ex it; end; if validatecl(cl)<>0 then begin pMessageWarningOK(txt_2_7_validatecl+' '+cl); ex it; end;
P.Execute; P.Execute;
P.Free; P.Free;
except except
pMessageWarningOK(txt_2_5_cannotrun+' '+(cl)); pMessageWarningOK(txt_2_5_cannotrun+' '+(cl));
end; end;
end; end;
skipping to change at line 39294 skipping to change at line 39269
on_ComboBoxARCChange; on_ComboBoxARCChange;
end; end;
'7Z': '7Z':
begin begin
Form_peach.ComboBoxArchive4.ItemIndex:=Form_peach.ComboBoxArchive9.ItemIndex; Form_peach.ComboBoxArchive4.ItemIndex:=Form_peach.ComboBoxArchive9.ItemIndex;
ComboBoxArchive4_onchange; ComboBoxArchive4_onchange;
end; end;
'BROTLI': level_brotli:=Form_peach.ComboBoxArchive9.ItemIndex; 'BROTLI': level_brotli:=Form_peach.ComboBoxArchive9.ItemIndex;
'ZSTD': level_zstd:=Form_peach.ComboBoxArchive9.ItemIndex; 'ZSTD': level_zstd:=Form_peach.ComboBoxArchive9.ItemIndex;
end; end;
if (fun=upcase(txt_custom)) and (havewinrar=true) and (userar=1) then level_rar: =Form_peach.ComboBoxArchive9.ItemIndex; if (fun='CUSTOM') and (havewinrar=true) and (userar=1) then level_rar:=Form_peac h.ComboBoxArchive9.ItemIndex;
end; end;
procedure TForm_peach.ComboBoxArchive9Change(Sender: TObject); procedure TForm_peach.ComboBoxArchive9Change(Sender: TObject);
begin begin
on_ComboBoxArchive9Change; on_ComboBoxArchive9Change;
end; end;
procedure TForm_peach.ComboBoxArchiveAct1Change(Sender: TObject); procedure TForm_peach.ComboBoxArchiveAct1Change(Sender: TObject);
begin begin
ComboBoxArchive7.ItemIndex:=ComboBoxArchiveAct1.ItemIndex; ComboBoxArchive7.ItemIndex:=ComboBoxArchiveAct1.ItemIndex;
skipping to change at line 40851 skipping to change at line 40826
procedure erase_fromname(ptype:ansistring; var in_param:ansistring); procedure erase_fromname(ptype:ansistring; var in_param:ansistring);
//ptype "archive" get erase mode from archiving parameters, "extract" from extra ction parameters //ptype "archive" get erase mode from archiving parameters, "extract" from extra ction parameters
//erase modes: 0 quick, 1 secure (get erase passes from global variable set in s ettings), 2 overwrite with zero, 3 send to recycle bin (Windows only) //erase modes: 0 quick, 1 secure (get erase passes from global variable set in s ettings), 2 overwrite with zero, 3 send to recycle bin (Windows only)
var var
P:tprocessutf8; P:tprocessutf8;
bin_name,eraselevel,pstr,cl:ansistring; bin_name,eraselevel,pstr,cl:ansistring;
erasemode:integer; erasemode:integer;
begin begin
if in_param='' then exit; //input parameter must be already set from the calling procedure if in_param='' then exit; //input parameter must be already set from the calling procedure
bin_name:=delimiter+escapefilename(executable_path,desk_env)+'res'+directorysepa rator+'pea'+EXEEXT+delimiter; bin_name:=stringdelim(escapefilename(executable_path,desk_env)+'res'+directoryse parator+'pea'+EXEEXT);
if ptype='archive' then if ptype='archive' then
begin begin
if doptadd=0 then exit; if doptadd=0 then exit;
pstr:=Form_peach.cbdeleteinputmode1.Caption; pstr:=Form_peach.cbdeleteinputmode1.Caption;
{$IFDEF MSWINDOWS} {$IFDEF MSWINDOWS}
case Form_peach.cbdeleteinputmode1.ItemIndex of case Form_peach.cbdeleteinputmode1.ItemIndex of
0: erasemode:=3; 0: erasemode:=3;
1: erasemode:=0; 1: erasemode:=0;
2: erasemode:=2; 2: erasemode:=2;
3: erasemode:=1; 3: erasemode:=1;
skipping to change at line 40922 skipping to change at line 40897
procedure erase_fromarchiving(erasemode:integer; executemode:integer; var cl:ans istring);//0: quick delete 1: secure delete 2: zero delete 3: recycle (Windows) procedure erase_fromarchiving(erasemode:integer; executemode:integer; var cl:ans istring);//0: quick delete 1: secure delete 2: zero delete 3: recycle (Windows)
var var
P:tprocessutf8; P:tprocessutf8;
bin_name,in_param,eraselevel,s:ansistring; bin_name,in_param,eraselevel,s:ansistring;
i:integer; i:integer;
begin begin
in_param:=''; in_param:='';
if Form_peach.StringGrid1.Row=0 then exit; if Form_peach.StringGrid1.Row=0 then exit;
if Form_peach.StringGrid1.Cells[1,1]='' then exit; if Form_peach.StringGrid1.Cells[1,1]='' then exit;
P:=tprocessutf8.Create(nil); P:=tprocessutf8.Create(nil);
bin_name:=delimiter+escapefilename(executable_path,desk_env)+'res'+directorysepa rator+'pea'+EXEEXT+delimiter; bin_name:=stringdelim(escapefilename(executable_path,desk_env)+'res'+directoryse parator+'pea'+EXEEXT);
for i:=1 to Form_peach.StringGrid1.Rowcount-1 do for i:=1 to Form_peach.StringGrid1.Rowcount-1 do
begin begin
s:=Form_peach.StringGrid1.Cells[8,i]; s:=Form_peach.StringGrid1.Cells[8,i];
if Form_peach.CheckBoxConvert.State=cbChecked then if Form_peach.CheckBoxConvert.State=cbChecked then
begin begin
if s<>'' then if s<>'' then
if s[length(s)]='*' then setlength(s,length(s)-1); if s[length(s)]='*' then setlength(s,length(s)-1);
if s<>'' then if s<>'' then
if s[length(s)]=DirectorySeparator then setlength(s,length(s)-1); if s[length(s)]=DirectorySeparator then setlength(s,length(s)-1);
s:=ExtractFilePath(s)+Form_peach.StringGrid1.Cells[1,i]; s:=ExtractFilePath(s)+Form_peach.StringGrid1.Cells[1,i];
end; end;
if checkfiledirname(s)<>0 then begin pMessageWarningOK(txt_2_7_validatefn+' ' +s); exit; end; if checkfiledirname(s)<>0 then begin pMessageWarningOK(txt_2_7_validatefn+' ' +s); exit; end;
in_param:=in_param+delimiter+escapefilename(s,desk_env)+delimiter+' '; in_param:=in_param+stringdelim(escapefilename(s,desk_env))+' ';
end; end;
if s<>'' then if s<>'' then
if s[length(s)]='*' then exit;//additional security against unexpected errors : input must be a file if s[length(s)]='*' then exit;//additional security against unexpected errors : input must be a file
if s<>'' then if s<>'' then
if s[length(s)]=DirectorySeparator then exit;//additional security against un expected errors: input must be a file if s[length(s)]=DirectorySeparator then exit;//additional security against un expected errors: input must be a file
case erasepasses of case erasepasses of
0: eraselevel:='VERY_FAST'; 0: eraselevel:='VERY_FAST';
1: eraselevel:='FAST'; 1: eraselevel:='FAST';
2: eraselevel:='MEDIUM'; 2: eraselevel:='MEDIUM';
3: eraselevel:='SLOW'; 3: eraselevel:='SLOW';
skipping to change at line 42013 skipping to change at line 41988
case fun of case fun of
'UN7Z': if compose_un7z_cl(cl,jobcode,outname,false,funct,'all')=0 then launc h_cl(cl,jobcode,outname); 'UN7Z': if compose_un7z_cl(cl,jobcode,outname,false,funct,'all')=0 then launc h_cl(cl,jobcode,outname);
'UNARC': if compose_unarc_cl(cl,jobcode,outname,false,funct,'all')=0 then lau nch_cl(cl,jobcode,outname); 'UNARC': if compose_unarc_cl(cl,jobcode,outname,false,funct,'all')=0 then lau nch_cl(cl,jobcode,outname);
'UNBROTLI': if compose_unbrotli_cl(cl,jobcode,outname,false,funct,'all')=0 th en launch_cl(cl,jobcode,outname); 'UNBROTLI': if compose_unbrotli_cl(cl,jobcode,outname,false,funct,'all')=0 th en launch_cl(cl,jobcode,outname);
'UNZPAQ': if compose_unzpaq_cl(cl,jobcode,outname,false,funct,'all')=0 then l aunch_cl(cl,jobcode,outname); 'UNZPAQ': if compose_unzpaq_cl(cl,jobcode,outname,false,funct,'all')=0 then l aunch_cl(cl,jobcode,outname);
'UNZSTD': if compose_unzstd_cl(cl,jobcode,outname,false,funct,'all')=0 then l aunch_cl(cl,jobcode,outname); 'UNZSTD': if compose_unzstd_cl(cl,jobcode,outname,false,funct,'all')=0 then l aunch_cl(cl,jobcode,outname);
else else
if (funct1='details') then if (funct1='details') then
begin begin
P:=tprocessutf8.Create(nil); P:=tprocessutf8.Create(nil);
cl:=delimiter+escapefilename(executable_path,desk_env)+'res'+DirectoryS eparator+'pea'+EXEEXT+delimiter+' list info '+delimiter+Form_peach.EditOpenIn.Te xt+delimiter; cl:=stringdelim(escapefilename(executable_path,desk_env)+'res'+Director ySeparator+'pea'+EXEEXT)+' list info '+stringdelim(Form_peach.EditOpenIn.Text);
P.CommandLine:=cl; P.CommandLine:=cl;
if Form_peach.Visible=true then Application.ProcessMessages; if Form_peach.Visible=true then Application.ProcessMessages;
if validatecl(cl)<>0 then begin pMessageWarningOK(txt_2_7_validatecl+' '+cl); exit; end; if validatecl(cl)<>0 then begin pMessageWarningOK(txt_2_7_validatecl+' '+cl); exit; end;
P.Execute; P.Execute;
P.Free; P.Free;
end; end;
end; end;
if checkstopsequencefile=true then break; if checkstopsequencefile=true then break;
end; end;
setlength(scheduleclip,0); setlength(scheduleclip,0);
skipping to change at line 42353 skipping to change at line 42328
procedure getmultiname(var s,in_param:ansistring); procedure getmultiname(var s,in_param:ansistring);
var var
r:TSearchRec; r:TSearchRec;
s_ext,sh_ext,s_name,sh_name,s_path:ansistring; s_ext,sh_ext,s_name,sh_name,s_path:ansistring;
j,k,sh_len:integer; j,k,sh_len:integer;
begin begin
s_ext := lowercase(extractfileext(s)); s_ext := lowercase(extractfileext(s));
s_name := extractfilename(s); s_name := extractfilename(s);
setlength(s_name, length(s_name) - length(s_ext)); setlength(s_name, length(s_name) - length(s_ext));
s_path := extractfilepath(s); s_path := extractfilepath(s);
in_param:=in_param+delimiter+escapefilename(s,desk_env)+delimiter+' ';//base fil ename in_param:=in_param+stringdelim(escapefilename(s,desk_env))+' ';//base filename
case s_ext of case s_ext of
'.001': //multipart .xxx '.001': //multipart .xxx
begin begin
j:=1; j:=1;
repeat repeat
j := j + 1; j := j + 1;
if j < 10 then s_ext := '.00' + IntToStr(j) if j < 10 then s_ext := '.00' + IntToStr(j)
else else
if j < 100 then s_ext := '.0' + IntToStr(j) if j < 100 then s_ext := '.0' + IntToStr(j)
else s_ext := '.' + IntToStr(j); else s_ext := '.' + IntToStr(j);
k := FindFirst(s_path + s_name + s_ext, faAnyFile, r); k := FindFirst(s_path + s_name + s_ext, faAnyFile, r);
if k = 0 then if k = 0 then
in_param:=in_param+delimiter+escapefilename(s_path + s_name + s_ext,des k_env)+delimiter+' '; in_param:=in_param+stringdelim(escapefilename(s_path + s_name + s_ext,d esk_env))+' ';
FindClose(r); FindClose(r);
until k <> 0; until k <> 0;
end; end;
'.zip': '.zip':
begin begin
s_ext:='.z01'; s_ext:='.z01';
j:=0; j:=0;
if FindFirst(s_path + s_name + s_ext, faAnyFile, r)=0 then //multipart zip .z xx if FindFirst(s_path + s_name + s_ext, faAnyFile, r)=0 then //multipart zip .z xx
repeat repeat
j := j + 1; j := j + 1;
if j < 10 then s_ext := '.z0' + IntToStr(j) if j < 10 then s_ext := '.z0' + IntToStr(j)
else s_ext := '.z' + IntToStr(j); else s_ext := '.z' + IntToStr(j);
k := FindFirst(s_path + s_name + s_ext, faAnyFile, r); k := FindFirst(s_path + s_name + s_ext, faAnyFile, r);
if k = 0 then if k = 0 then
in_param:=in_param+delimiter+escapefilename(s_path + s_name + s_ext, desk_env)+delimiter+' '; in_param:=in_param+stringdelim(escapefilename(s_path + s_name + s_ex t,desk_env))+' ';
FindClose(r); FindClose(r);
until k <> 0; until k <> 0;
end; end;
'.zipx': '.zipx':
begin begin
s_ext:='.zx01'; s_ext:='.zx01';
j:=0; j:=0;
if FindFirst(s_path + s_name + s_ext, faAnyFile, r)=0 then //multipart zipx . zxyy if FindFirst(s_path + s_name + s_ext, faAnyFile, r)=0 then //multipart zipx . zxyy
repeat repeat
j := j + 1; j := j + 1;
if j < 10 then s_ext := '.zx0' + IntToStr(j) if j < 10 then s_ext := '.zx0' + IntToStr(j)
else s_ext := '.zx' + IntToStr(j); else s_ext := '.zx' + IntToStr(j);
k := FindFirst(s_path + s_name + s_ext, faAnyFile, r); k := FindFirst(s_path + s_name + s_ext, faAnyFile, r);
if k = 0 then if k = 0 then
in_param:=in_param+delimiter+escapefilename(s_path + s_name + s_ext, desk_env)+delimiter+' '; in_param:=in_param+stringdelim(escapefilename(s_path + s_name + s_ex t,desk_env))+' ';
FindClose(r); FindClose(r);
until k <> 0; until k <> 0;
end; end;
'.rar': '.rar':
begin begin
s_ext:='.r01'; s_ext:='.r01';
j:=0; j:=0;
if FindFirst(s_path + s_name + s_ext, faAnyFile, r)=0 then //multipart rar .r xx if FindFirst(s_path + s_name + s_ext, faAnyFile, r)=0 then //multipart rar .r xx
repeat repeat
j := j + 1; j := j + 1;
if j < 10 then s_ext := '.r0' + IntToStr(j) if j < 10 then s_ext := '.r0' + IntToStr(j)
else s_ext := '.r' + IntToStr(j); else s_ext := '.r' + IntToStr(j);
k := FindFirst(s_path + s_name + s_ext, faAnyFile, r); k := FindFirst(s_path + s_name + s_ext, faAnyFile, r);
if k = 0 then if k = 0 then
in_param:=in_param+delimiter+escapefilename(s_path + s_name + s_ext, desk_env)+delimiter+' '; in_param:=in_param+stringdelim(escapefilename(s_path + s_name + s_ex t,desk_env))+' ';
FindClose(r); FindClose(r);
until k <> 0 until k <> 0
else else
begin begin
s_ext:='.rar'; s_ext:='.rar';
if pos('.part',lowercase(extractfileext(s_name)))<>0 then //multipart rar .partx.rar if pos('.part',lowercase(extractfileext(s_name)))<>0 then //multipart rar .partx.rar
begin begin
sh_ext:=lowercase(extractfileext(s_name)); sh_ext:=lowercase(extractfileext(s_name));
sh_len:=length(sh_ext)-5; sh_len:=length(sh_ext)-5;
sh_name:=s_name; sh_name:=s_name;
setlength(sh_name, length(s_name) - length(sh_ext)); setlength(sh_name, length(s_name) - length(sh_ext));
repeat repeat
j := j + 1; j := j + 1;
sh_ext:='.part'+IntToStr(j).PadLeft(sh_len,'0'); sh_ext:='.part'+IntToStr(j).PadLeft(sh_len,'0');
k := FindFirst(s_path + sh_name + sh_ext + s_ext, faAnyFile, r); k := FindFirst(s_path + sh_name + sh_ext + s_ext, faAnyFile, r);
if k = 0 then if k = 0 then
in_param:=in_param+delimiter+escapefilename(s_path + sh_name + sh _ext + s_ext,desk_env)+delimiter+' '; in_param:=in_param+stringdelim(escapefilename(s_path + sh_name + sh_ext + s_ext,desk_env))+' ';
FindClose(r); FindClose(r);
until k <> 0; until k <> 0;
end; end;
end; end;
end; end;
end; end;
end; end;
procedure erase_fromextraction(erasemode:integer; executemode:integer; var cl:an sistring);//0: quick delete 1: secure delete 2: zero delete 3: recycle (Windows) procedure erase_fromextraction(erasemode:integer; executemode:integer; var cl:an sistring);//0: quick delete 1: secure delete 2: zero delete 3: recycle (Windows)
var var
P:tprocessutf8; P:tprocessutf8;
bin_name,in_param,eraselevel,s:ansistring; bin_name,in_param,eraselevel,s:ansistring;
i:integer; i:integer;
begin begin
in_param:=''; in_param:='';
if Form_peach.StringGrid2.Row=0 then exit; if Form_peach.StringGrid2.Row=0 then exit;
if Form_peach.StringGrid2.Cells[1,1]='' then exit; if Form_peach.StringGrid2.Cells[1,1]='' then exit;
P:=tprocessutf8.Create(nil); P:=tprocessutf8.Create(nil);
bin_name:=delimiter+escapefilename(executable_path,desk_env)+'res'+directorysepa rator+'pea'+EXEEXT+delimiter; bin_name:=stringdelim(escapefilename(executable_path,desk_env)+'res'+directoryse parator+'pea'+EXEEXT);
for i:=1 to Form_peach.StringGrid2.Rowcount-1 do for i:=1 to Form_peach.StringGrid2.Rowcount-1 do
begin begin
s:=Form_peach.StringGrid2.Cells[8,i]; s:=Form_peach.StringGrid2.Cells[8,i];
if checkfiledirname(s)<>0 then begin pMessageWarningOK(txt_2_7_validatefn+' ' +s); exit; end; if checkfiledirname(s)<>0 then begin pMessageWarningOK(txt_2_7_validatefn+' ' +s); exit; end;
getmultiname(s,in_param); getmultiname(s,in_param);
end; end;
case erasepasses of case erasepasses of
0: eraselevel:='VERY_FAST'; 0: eraselevel:='VERY_FAST';
1: eraselevel:='FAST'; 1: eraselevel:='FAST';
2: eraselevel:='MEDIUM'; 2: eraselevel:='MEDIUM';
skipping to change at line 42479 skipping to change at line 42454
P.Free; P.Free;
end; end;
procedure erase_fromextractarc(erasemode:integer; executemode:integer; var cl:an sistring);//0: quick delete 1: secure delete 2: zero delete 3: recycle (Windows) procedure erase_fromextractarc(erasemode:integer; executemode:integer; var cl:an sistring);//0: quick delete 1: secure delete 2: zero delete 3: recycle (Windows)
var var
P:tprocessutf8; P:tprocessutf8;
bin_name,in_param,eraselevel,s:ansistring; bin_name,in_param,eraselevel,s:ansistring;
begin begin
in_param:=''; in_param:='';
P:=tprocessutf8.Create(nil); P:=tprocessutf8.Create(nil);
bin_name:=delimiter+escapefilename(executable_path,desk_env)+'res'+directorysepa rator+'pea'+EXEEXT+delimiter; bin_name:=stringdelim(escapefilename(executable_path,desk_env)+'res'+directoryse parator+'pea'+EXEEXT);
s:=Form_peach.EditOpenIn.Text; s:=Form_peach.EditOpenIn.Text;
if checkfiledirname(s)<>0 then begin pMessageWarningOK(txt_2_7_validatefn+' '+s) ; exit; end; if checkfiledirname(s)<>0 then begin pMessageWarningOK(txt_2_7_validatefn+' '+s) ; exit; end;
getmultiname(s,in_param); getmultiname(s,in_param);
case erasepasses of case erasepasses of
0: eraselevel:='VERY_FAST'; 0: eraselevel:='VERY_FAST';
1: eraselevel:='FAST'; 1: eraselevel:='FAST';
2: eraselevel:='MEDIUM'; 2: eraselevel:='MEDIUM';
3: eraselevel:='SLOW'; 3: eraselevel:='SLOW';
4: eraselevel:='VERY_SLOW'; 4: eraselevel:='VERY_SLOW';
end; end;
skipping to change at line 44420 skipping to change at line 44395
cp_open(LabelConf.Caption,desk_env); cp_open(LabelConf.Caption,desk_env);
end; end;
procedure configure_systemintegration(pwait:boolean); procedure configure_systemintegration(pwait:boolean);
var var
P:tprocessutf8; P:tprocessutf8;
cl:ansistring; cl:ansistring;
begin begin
{$IFDEF MSWINDOWS} {$IFDEF MSWINDOWS}
P:=tprocessutf8.Create(nil); P:=tprocessutf8.Create(nil);
cl:=delimiter+escapefilename(executable_path,desk_env)+'res'+directoryseparator+ 'peazip-configuration'+EXEEXT+delimiter+' /DIR='+delimiter+escapefilename(execut able_path,desk_env)+delimiter; cl:=stringdelim(escapefilename(executable_path,desk_env)+'res'+directoryseparato r+'peazip-configuration'+EXEEXT)+' /DIR='+stringdelim(escapefilename(executable_ path,desk_env));
if pwait=true then P.Options := [poNoConsole, poWaitOnExit] if pwait=true then P.Options := [poNoConsole, poWaitOnExit]
else P.Options := [poNoConsole]; else P.Options := [poNoConsole];
P.CommandLine:=cl; P.CommandLine:=cl;
if Form_peach.Visible=true then Application.ProcessMessages; if Form_peach.Visible=true then Application.ProcessMessages;
if validatecl(cl)<>0 then begin pMessageWarningOK(txt_2_7_validatecl+' '+cl); ex it; end; if validatecl(cl)<>0 then begin pMessageWarningOK(txt_2_7_validatecl+' '+cl); ex it; end;
P.Execute; P.Execute;
P.Free; P.Free;
{$ENDIF} {$ENDIF}
end; end;
skipping to change at line 47104 skipping to change at line 47079
checkdom(dom,s); checkdom(dom,s);
cp_open(dom+'peazip-help.html',desk_env); cp_open(dom+'peazip-help.html',desk_env);
end; end;
procedure TForm_peach.mpeautilsClick(Sender: TObject); procedure TForm_peach.mpeautilsClick(Sender: TObject);
var var
P:tprocessutf8; P:tprocessutf8;
cl:ansistring; cl:ansistring;
begin begin
P:=tprocessutf8.Create(nil); P:=tprocessutf8.Create(nil);
cl:=delimiter+escapefilename(executable_path,desk_env)+'res'+DirectorySeparator+ 'pea'+EXEEXT+delimiter; cl:=stringdelim(escapefilename(executable_path,desk_env)+'res'+DirectorySeparato r+'pea'+EXEEXT);
P.CommandLine:=cl; P.CommandLine:=cl;
if Form_peach.Visible=true then Application.ProcessMessages; if Form_peach.Visible=true then Application.ProcessMessages;
if validatecl(cl)<>0 then begin pMessageWarningOK(txt_2_7_validatecl+' '+cl); ex it; end; if validatecl(cl)<>0 then begin pMessageWarningOK(txt_2_7_validatecl+' '+cl); ex it; end;
P.Execute; P.Execute;
P.Free; P.Free;
end; end;
procedure togglestatusbar; procedure togglestatusbar;
begin begin
{$IFDEF MSWINDOWS}if Form_peach.PanelOpen.Visible=false{$ELSE}if Form_peach.Pane lOpen.top<>0{$ENDIF} then exit; {$IFDEF MSWINDOWS}if Form_peach.PanelOpen.Visible=false{$ELSE}if Form_peach.Pane lOpen.top<>0{$ENDIF} then exit;
skipping to change at line 48555 skipping to change at line 48530
@sn, mc, flags, @sn, mc, flags,
@bufFSName, sizeof(bufFSName)); @bufFSName, sizeof(bufFSName));
fstype:=bufFSName; fstype:=bufFSName;
if fstype<>'' then s0:=s+' ('+fstype+')' else s0:=s; if fstype<>'' then s0:=s+' ('+fstype+')' else s0:=s;
if Form_peach.visible=true then if Form_peach.visible=true then
if pMessageInfoYesNo(s0+char($0D)+char($0A)+char($0D)+char($0A)+s1+char($0D)+ char($0A)+char($0D)+char($0A)+txt_5_2_free)=6 then if pMessageInfoYesNo(s0+char($0D)+char($0A)+char($0D)+char($0A)+s1+char($0D)+ char($0A)+char($0D)+char($0A)+txt_5_2_free)=6 then
begin begin
P:=tprocessutf8.Create(nil); P:=tprocessutf8.Create(nil);
bin_name:=delimiter+escapefilename(executable_path,desk_env)+'res'+directo ryseparator+'pea'+EXEEXT+delimiter; bin_name:=stringdelim(escapefilename(executable_path,desk_env)+'res'+direc toryseparator+'pea'+EXEEXT);
case erasepasses of case erasepasses of
0: eraselevel:='VERY_FAST'; 0: eraselevel:='VERY_FAST';
1: eraselevel:='FAST'; 1: eraselevel:='FAST';
2: eraselevel:='MEDIUM'; 2: eraselevel:='MEDIUM';
3: eraselevel:='SLOW'; 3: eraselevel:='SLOW';
4: eraselevel:='VERY_SLOW'; 4: eraselevel:='VERY_SLOW';
end; end;
if smode=2 then eraselevel:='ZERO'; if smode=2 then eraselevel:='ZERO';
P.Options := [poNoConsole]; P.Options := [poNoConsole];
cl:=bin_name+' SANITIZE '+eraselevel+' '+s; cl:=bin_name+' SANITIZE '+eraselevel+' '+s;
skipping to change at line 50392 skipping to change at line 50367
procedure hexpselected; procedure hexpselected;
var var
cl,in_param:ansistring; cl,in_param:ansistring;
P:tprocessutf8; P:tprocessutf8;
sg:TStringGrid; sg:TStringGrid;
begin begin
{$IFDEF MSWINDOWS}if Form_peach.PanelArchiveMain.Visible=true{$ELSE}if Form_peac h.PanelArchiveMain.top=0{$ENDIF} then sg:=Form_peach.StringGrid1 {$IFDEF MSWINDOWS}if Form_peach.PanelArchiveMain.Visible=true{$ELSE}if Form_peac h.PanelArchiveMain.top=0{$ENDIF} then sg:=Form_peach.StringGrid1
else sg:=Form_peach.StringGrid2; else sg:=Form_peach.StringGrid2;
if sg.Row=0 then exit; if sg.Row=0 then exit;
in_param:=delimiter+escapefilename(sg.Cells[8,sg.Row],desk_env)+delimiter; in_param:=stringdelim(escapefilename(sg.Cells[8,sg.Row],desk_env));
cl:=delimiter+escapefilename(executable_path,desk_env)+'res'+directoryseparator+ cl:=stringdelim(escapefilename(executable_path,desk_env)+'res'+directoryseparato
'pea'+EXEEXT+delimiter+' HEXPREVIEW '+in_param; r+'pea'+EXEEXT)+' HEXPREVIEW '+in_param;
P:=tprocessutf8.Create(nil); P:=tprocessutf8.Create(nil);
{$IFDEF MSWINDOWS}P.Options := [poNoConsole];{$ELSE}P.Options := [poNoConsole, p oWaitOnExit];{$ENDIF} {$IFDEF MSWINDOWS}P.Options := [poNoConsole];{$ELSE}P.Options := [poNoConsole, p oWaitOnExit];{$ENDIF}
P.CommandLine:=cl; P.CommandLine:=cl;
if validatecl(cl)<>0 then begin pMessageWarningOK(txt_2_7_validatecl+' '+cl); ex it; end; if validatecl(cl)<>0 then begin pMessageWarningOK(txt_2_7_validatecl+' '+cl); ex it; end;
P.Execute; P.Execute;
P.Free; P.Free;
end; end;
procedure TForm_peach.MenuItemToolhexpClick(Sender: TObject); procedure TForm_peach.MenuItemToolhexpClick(Sender: TObject);
begin begin
hexpselected; hexpselected;
end; end;
procedure TForm_peach.mEnvstrClick(Sender: TObject); procedure TForm_peach.mEnvstrClick(Sender: TObject);
var var
P:tprocessutf8; P:tprocessutf8;
cl:ansistring; cl:ansistring;
begin begin
P:=tprocessutf8.Create(nil); P:=tprocessutf8.Create(nil);
cl:=delimiter+escapefilename(executable_path,desk_env)+'res'+DirectorySeparator+ 'pea'+EXEEXT+delimiter+' envstr'; cl:=stringdelim(escapefilename(executable_path,desk_env)+'res'+DirectorySeparato r+'pea'+EXEEXT)+' envstr';
P.CommandLine:=cl; P.CommandLine:=cl;
if Form_peach.Visible=true then Application.ProcessMessages; if Form_peach.Visible=true then Application.ProcessMessages;
if validatecl(cl)<>0 then begin pMessageWarningOK(txt_2_7_validatecl+' '+cl); ex it; end; if validatecl(cl)<>0 then begin pMessageWarningOK(txt_2_7_validatecl+' '+cl); ex it; end;
P.Execute; P.Execute;
P.Free; P.Free;
end; end;
procedure TForm_peach.MenuItemBookmarksClick(Sender: TObject); procedure TForm_peach.MenuItemBookmarksClick(Sender: TObject);
begin begin
{$IFDEF MSWINDOWS}if Form_peach.PanelArchiveMain.Visible=true{$ELSE}if Form_peac h.PanelArchiveMain.Top=0{$ENDIF} then {$IFDEF MSWINDOWS}if Form_peach.PanelArchiveMain.Visible=true{$ELSE}if Form_peac h.PanelArchiveMain.Top=0{$ENDIF} then
skipping to change at line 50621 skipping to change at line 50596
var var
cl,in_param:ansistring; cl,in_param:ansistring;
i:integer; i:integer;
P:tprocessutf8; P:tprocessutf8;
begin begin
if Form_peach.StringGridList.RowCount<2 then exit; if Form_peach.StringGridList.RowCount<2 then exit;
if Form_peach.StringGridList.Cells[1,1]='' then exit; if Form_peach.StringGridList.Cells[1,1]='' then exit;
if fun<>'FILEBROWSER' then if fun<>'FILEBROWSER' then
begin begin
if checkfiledirname(Form_peach.EditOpenIn.Text)<>0 then begin pMessageWarning OK(txt_2_7_validatefn+' '+Form_peach.EditOpenIn.Text); exit; end; if checkfiledirname(Form_peach.EditOpenIn.Text)<>0 then begin pMessageWarning OK(txt_2_7_validatefn+' '+Form_peach.EditOpenIn.Text); exit; end;
in_param:=delimiter+escapefilename(Form_peach.EditOpenIn.Text,desk_env)+delim in_param:=stringdelim(escapefilename(Form_peach.EditOpenIn.Text,desk_env));
iter; cl:=stringdelim(escapefilename(executable_path,desk_env)+'res'+directorysepar
cl:=delimiter+escapefilename(executable_path,desk_env)+'res'+directoryseparat ator+'pea'+EXEEXT)+' HEXPREVIEW '+in_param;
or+'pea'+EXEEXT+delimiter+' HEXPREVIEW '+in_param;
P:=tprocessutf8.Create(nil); P:=tprocessutf8.Create(nil);
{$IFDEF MSWINDOWS}P.Options := [poNoConsole];{$ELSE}P.Options := [poNoConsole , poWaitOnExit];{$ENDIF} {$IFDEF MSWINDOWS}P.Options := [poNoConsole];{$ELSE}P.Options := [poNoConsole , poWaitOnExit];{$ENDIF}
P.CommandLine:=cl; P.CommandLine:=cl;
if validatecl(cl)<>0 then begin pMessageWarningOK(txt_2_7_validatecl+' '+cl); exit; end; if validatecl(cl)<>0 then begin pMessageWarningOK(txt_2_7_validatecl+' '+cl); exit; end;
P.Execute; P.Execute;
P.Free; P.Free;
exit; exit;
end; end;
if checklistanysel<>0 then exit; if checklistanysel<>0 then exit;
for i:=1 to Form_peach.StringGridList.RowCount-1 do for i:=1 to Form_peach.StringGridList.RowCount-1 do
if Form_peach.StringGridList.Cells[12,i]='1' then if Form_peach.StringGridList.Cells[12,i]='1' then
begin begin
if checkfiledirname(Form_peach.StringGridList.Cells[8,i])<>0 then begin pM essageWarningOK(txt_2_7_validatefn+' '+Form_peach.StringGridList.Cells[8,Form_pe ach.StringGridList.Row]); exit; end; if checkfiledirname(Form_peach.StringGridList.Cells[8,i])<>0 then begin pM essageWarningOK(txt_2_7_validatefn+' '+Form_peach.StringGridList.Cells[8,Form_pe ach.StringGridList.Row]); exit; end;
in_param:=delimiter+escapefilename(Form_peach.StringGridList.Cells[8,i],de in_param:=stringdelim(escapefilename(Form_peach.StringGridList.Cells[8,i],
sk_env)+delimiter; desk_env));
cl:=delimiter+escapefilename(executable_path,desk_env)+'res'+directorysepa cl:=stringdelim(escapefilename(executable_path,desk_env)+'res'+directoryse
rator+'pea'+EXEEXT+delimiter+' HEXPREVIEW '+in_param; parator+'pea'+EXEEXT)+' HEXPREVIEW '+in_param;
P:=tprocessutf8.Create(nil); P:=tprocessutf8.Create(nil);
{$IFDEF MSWINDOWS}P.Options := [poNoConsole];{$ELSE}P.Options := [poNoCons ole, poWaitOnExit];{$ENDIF} {$IFDEF MSWINDOWS}P.Options := [poNoConsole];{$ELSE}P.Options := [poNoCons ole, poWaitOnExit];{$ENDIF}
P.CommandLine:=cl; P.CommandLine:=cl;
if validatecl(cl)<>0 then begin pMessageWarningOK(txt_2_7_validatecl+' '+c l); exit; end; if validatecl(cl)<>0 then begin pMessageWarningOK(txt_2_7_validatecl+' '+c l); exit; end;
P.Execute; P.Execute;
P.Free; P.Free;
end; end;
end; end;
procedure TForm_peach.pmmstatus_bookmarksClick(Sender: TObject); procedure TForm_peach.pmmstatus_bookmarksClick(Sender: TObject);
skipping to change at line 51315 skipping to change at line 51290
select_all('0'); select_all('0');
if open_archive<>1 then exit; if open_archive<>1 then exit;
do_extract; do_extract;
end; end;
procedure TForm_peach.mv5bClick(Sender: TObject); procedure TForm_peach.mv5bClick(Sender: TObject);
begin begin
showbar('sessionrecent'); showbar('sessionrecent');
end; end;
procedure TForm_peach.mwebsClick(Sender: TObject); procedure addextwebsearch;
var var
s:ansistring; s:ansistring;
sg:TStringGrid; sg:TStringGrid;
begin begin
{$IFDEF MSWINDOWS}if PanelArchiveMain.Visible=true{$ELSE}if PanelArchiveMain.Top {$IFDEF MSWINDOWS}if Form_peach.PanelArchiveMain.Visible=true{$ELSE}if Form_peac
=0{$ENDIF} then sg:=StringGrid1 h.PanelArchiveMain.Top=0{$ENDIF} then sg:=Form_peach.StringGrid1
else sg:=StringGrid2; else sg:=Form_peach.StringGrid2;
if sg.Rowcount=1 then exit; if sg.Rowcount=1 then exit;
s:=sg.Cells[1,sg.Row]; s:=sg.Cells[1,sg.Row];
if s<>'' then run_websearch(s); if s<>'' then run_websearch(s);
end; end;
procedure TForm_peach.mwebsClick(Sender: TObject);
begin
addextwebsearch;
end;
procedure getscheduledtaskname(stype:integer); procedure getscheduledtaskname(stype:integer);
var var
s,s1:ansistring; s,s1:ansistring;
begin begin
with form_peach do with form_peach do
begin begin
if stype=0 then if stype=0 then
begin begin
s:=txt_archive; s:=txt_archive;
s1:=extractfilename(Edit5.Text); s1:=extractfilename(Edit5.Text);
skipping to change at line 51613 skipping to change at line 51593
showbar('recent'); showbar('recent');
end; end;
procedure TForm_peach.mv6Click(Sender: TObject); procedure TForm_peach.mv6Click(Sender: TObject);
begin begin
showbar('clip'); showbar('clip');
end; end;
procedure TForm_peach.mwebsearchClick(Sender: TObject); procedure TForm_peach.mwebsearchClick(Sender: TObject);
begin begin
{$IFDEF MSWINDOWS}if PanelOpen.Visible=true{$ELSE}if PanelOpen.top=0{$ENDIF} the
n begin websearch_sel; exit; end;
{$IFDEF MSWINDOWS}if PanelArchiveMain.Visible=true{$ELSE}if PanelArchiveMain.Top
=0{$ENDIF} then begin addextwebsearch; exit; end;
{$IFDEF MSWINDOWS}if PanelExtract.Visible=true{$ELSE}if PanelExtract.Top=0{$ENDI
F} then begin addextwebsearch; exit; end;
run_websearch(''); run_websearch('');
end; end;
procedure openadvappn(n:integer); procedure openadvappn(n:integer);
var var
i:integer; i:integer;
begin begin
if Form_peach.StringGridList.RowCount<2 then exit; if Form_peach.StringGridList.RowCount<2 then exit;
if Form_peach.StringGridList.Cells[1,1]='' then exit; if Form_peach.StringGridList.Cells[1,1]='' then exit;
if checklistanysel<>0 then if checklistanysel<>0 then
skipping to change at line 52193 skipping to change at line 52176
if fun='FILEBROWSER' then filebrowser_funall('details') if fun='FILEBROWSER' then filebrowser_funall('details')
else archive_funsel('details','all'); else archive_funsel('details','all');
end; end;
procedure TForm_peach.po_envstrClick(Sender: TObject); procedure TForm_peach.po_envstrClick(Sender: TObject);
var var
P:tprocessutf8; P:tprocessutf8;
cl:ansistring; cl:ansistring;
begin begin
P:=tprocessutf8.Create(nil); P:=tprocessutf8.Create(nil);
cl:=delimiter+escapefilename(executable_path,desk_env)+'res'+DirectorySeparator+ 'pea'+EXEEXT+delimiter+' envstr'; cl:=stringdelim(escapefilename(executable_path,desk_env)+'res'+DirectorySeparato r+'pea'+EXEEXT)+' envstr';
P.CommandLine:=cl; P.CommandLine:=cl;
if Form_peach.Visible=true then Application.ProcessMessages; if Form_peach.Visible=true then Application.ProcessMessages;
if validatecl(cl)<>0 then begin pMessageWarningOK(txt_2_7_validatecl+' '+cl); ex it; end; if validatecl(cl)<>0 then begin pMessageWarningOK(txt_2_7_validatecl+' '+cl); ex it; end;
P.Execute; P.Execute;
P.Free; P.Free;
end; end;
procedure TForm_peach.po_flatClick(Sender: TObject); procedure TForm_peach.po_flatClick(Sender: TObject);
begin begin
{$IFDEF MSWINDOWS}if PanelOpen.Visible=true{$ELSE}if PanelOpen.top=0{$ENDIF} the n {$IFDEF MSWINDOWS}if PanelOpen.Visible=true{$ELSE}if PanelOpen.top=0{$ENDIF} the n
skipping to change at line 52852 skipping to change at line 52835
if i>0 then s[pos(' ',s)]:='+'; if i>0 then s[pos(' ',s)]:='+';
until i=0; until i=0;
end; end;
//if checklistsel=0 then s:=Form_peach.StringGridList.Cells[1,Form_peach.S tringGridList.Row]; //if checklistsel=0 then s:=Form_peach.StringGridList.Cells[1,Form_peach.S tringGridList.Row];
if s<>'' then if s<>'' then
begin begin
if FormWeb.CheckGroup1.Checked[0]=true then webopen('https://www.amazon .com/s/field-keywords='+s); if FormWeb.CheckGroup1.Checked[0]=true then webopen('https://www.amazon .com/s/field-keywords='+s);
if FormWeb.CheckGroup1.Checked[1]=true then webopen('https://www.apple. com/search/?q='+s); if FormWeb.CheckGroup1.Checked[1]=true then webopen('https://www.apple. com/search/?q='+s);
if FormWeb.CheckGroup1.Checked[2]=true then webopen('https://www.bing.c om/search?q='+s); if FormWeb.CheckGroup1.Checked[2]=true then webopen('https://www.bing.c om/search?q='+s);
if FormWeb.CheckGroup1.Checked[3]=true then webopen('https://www.britan nica.com/bps/search?query='+s); if FormWeb.CheckGroup1.Checked[3]=true then webopen('https://www.britan nica.com/bps/search?query='+s);
if FormWeb.CheckGroup1.Checked[4]=true then webopen('https://download.c if FormWeb.CheckGroup1.Checked[4]=true then webopen('https://duckduckgo
net.com/1770-20_4-0.html?query='+s+'&tag=srch&searchtype=downloads'); .com/?q='+s+'&ia=web');
if FormWeb.CheckGroup1.Checked[5]=true then webopen('https://duckduckgo if FormWeb.CheckGroup1.Checked[5]=true then webopen('https://shop.ebay.
.com/?q='+s+'&ia=web'); com/?_nkw='+s);
if FormWeb.CheckGroup1.Checked[6]=true then webopen('https://shop.ebay. if FormWeb.CheckGroup1.Checked[6]=true then webopen('https://www.facebo
com/?_nkw='+s); ok.com/search/?q='+s);
if FormWeb.CheckGroup1.Checked[7]=true then webopen('https://www.facebo if FormWeb.CheckGroup1.Checked[7]=true then webopen('https://www.google
ok.com/search/?q='+s); .com/search?q='+s);
if FormWeb.CheckGroup1.Checked[8]=true then webopen('https://www.flickr if FormWeb.CheckGroup1.Checked[8]=true then webopen('https://maps.googl
.com/search/?q='+s); e.com/maps?q='+s);
if FormWeb.CheckGroup1.Checked[9]=true then webopen('https://www.google if FormWeb.CheckGroup1.Checked[9]=true then webopen('https://www.google
.com/search?q='+s); .com/search?q='+s+'&tbs=nws:1');
if FormWeb.CheckGroup1.Checked[10]=true then webopen('https://maps.goog if FormWeb.CheckGroup1.Checked[10]=true then webopen('https://translate
le.com/maps?q='+s); .google.com/#es|en|'+s);
if FormWeb.CheckGroup1.Checked[11]=true then webopen('https://www.googl if FormWeb.CheckGroup1.Checked[11]=true then webopen('https://www.imdb.
e.com/search?q='+s+'&tbs=nws:1'); com/find?s=all&q='+s);
if FormWeb.CheckGroup1.Checked[12]=true then webopen('https://translate if FormWeb.CheckGroup1.Checked[12]=true then webopen('https://www.insta
.google.com/#es|en|'+s); gram.com/explore/tags/'+s+'/');
if FormWeb.CheckGroup1.Checked[13]=true then webopen('https://www.imdb. if FormWeb.CheckGroup1.Checked[13]=true then webopen('https://www.linke
com/find?s=all&q='+s); din.com/vsearch/f?keywords='+s);
if FormWeb.CheckGroup1.Checked[14]=true then webopen('https://www.insta if FormWeb.CheckGroup1.Checked[14]=true then webopen('https://osdn.net/
gram.com/explore/tags/'+s+'/'); search/?type_of_search=soft&words='+s);
if FormWeb.CheckGroup1.Checked[15]=true then webopen('https://www.linke if FormWeb.CheckGroup1.Checked[15]=true then webopen('https://pinterest
din.com/vsearch/f?keywords='+s); .com/search/pins/?q='+s);
if FormWeb.CheckGroup1.Checked[16]=true then webopen('https://osdn.net/ if FormWeb.CheckGroup1.Checked[16]=true then webopen('https://www.reddi
search/?type_of_search=soft&words='+s); t.com/search?q='+s);
if FormWeb.CheckGroup1.Checked[17]=true then webopen('https://pinterest if FormWeb.CheckGroup1.Checked[17]=true then webopen('https://sourcefor
.com/search/pins/?q='+s); ge.net/directory/os:windows/?q='+s);
if FormWeb.CheckGroup1.Checked[18]=true then webopen('https://www.reddi if FormWeb.CheckGroup1.Checked[18]=true then webopen('https://stackover
t.com/search?q='+s); flow.com/search?q='+s);
if FormWeb.CheckGroup1.Checked[19]=true then webopen('https://sourcefor if FormWeb.CheckGroup1.Checked[19]=true then webopen('https://twitter.c
ge.net/directory/os:windows/?q='+s); om/search?q='+s);
if FormWeb.CheckGroup1.Checked[20]=true then webopen('https://twitter.c if FormWeb.CheckGroup1.Checked[20]=true then webopen('https://www.wikip
om/search?q='+s); edia.org/wiki/Special:Search?search='+s+'&fulltext=Search');
if FormWeb.CheckGroup1.Checked[21]=true then webopen('https://www.wikip if FormWeb.CheckGroup1.Checked[21]=true then webopen('https://www.wikti
edia.org/wiki/Special:Search?search='+s+'&fulltext=Search'); onary.org/wiki/Special:Search?search='+s+'&fulltext=Search');
if FormWeb.CheckGroup1.Checked[22]=true then webopen('https://www.wikti if FormWeb.CheckGroup1.Checked[22]=true then webopen('https://search.ya
onary.org/wiki/Special:Search?search='+s+'&fulltext=Search'); hoo.com/search?p='+s);
if FormWeb.CheckGroup1.Checked[23]=true then webopen('https://www.youtu be.com/results?search_query='+s); if FormWeb.CheckGroup1.Checked[23]=true then webopen('https://www.youtu be.com/results?search_query='+s);
end end
else else
begin begin
if FormWeb.CheckGroup1.Checked[0]=true then webopen('https://www.amazon .com'); if FormWeb.CheckGroup1.Checked[0]=true then webopen('https://www.amazon .com');
if FormWeb.CheckGroup1.Checked[1]=true then webopen('https://www.apple. com/search/?q='); if FormWeb.CheckGroup1.Checked[1]=true then webopen('https://www.apple. com/search/?q=');
if FormWeb.CheckGroup1.Checked[2]=true then webopen('https://www.bing.c om'); if FormWeb.CheckGroup1.Checked[2]=true then webopen('https://www.bing.c om');
if FormWeb.CheckGroup1.Checked[3]=true then webopen('https://www.britan nica.com'); if FormWeb.CheckGroup1.Checked[3]=true then webopen('https://www.britan nica.com');
if FormWeb.CheckGroup1.Checked[4]=true then webopen('https://download.c if FormWeb.CheckGroup1.Checked[4]=true then webopen('https://duckduckgo
net.com'); .com/');
if FormWeb.CheckGroup1.Checked[5]=true then webopen('https://duckduckgo if FormWeb.CheckGroup1.Checked[5]=true then webopen('https://www.ebay.c
.com/'); om');
if FormWeb.CheckGroup1.Checked[6]=true then webopen('https://www.ebay.c if FormWeb.CheckGroup1.Checked[6]=true then webopen('https://www.facebo
om'); ok.com');
if FormWeb.CheckGroup1.Checked[7]=true then webopen('https://www.facebo if FormWeb.CheckGroup1.Checked[7]=true then webopen('https://www.google
ok.com'); .com');
if FormWeb.CheckGroup1.Checked[8]=true then webopen('https://www.flickr if FormWeb.CheckGroup1.Checked[8]=true then webopen('https://maps.googl
.com'); e.com');
if FormWeb.CheckGroup1.Checked[9]=true then webopen('https://www.google if FormWeb.CheckGroup1.Checked[9]=true then webopen('https://news.googl
.com'); e.com');
if FormWeb.CheckGroup1.Checked[10]=true then webopen('https://maps.goog if FormWeb.CheckGroup1.Checked[10]=true then webopen('https://translate
le.com'); .google.com');
if FormWeb.CheckGroup1.Checked[11]=true then webopen('https://news.goog if FormWeb.CheckGroup1.Checked[11]=true then webopen('https://www.imdb.
le.com'); com');
if FormWeb.CheckGroup1.Checked[12]=true then webopen('https://translate if FormWeb.CheckGroup1.Checked[12]=true then webopen('https://www.insta
.google.com'); gram.com');
if FormWeb.CheckGroup1.Checked[13]=true then webopen('https://www.imdb. if FormWeb.CheckGroup1.Checked[13]=true then webopen('https://www.linke
com'); din.com');
if FormWeb.CheckGroup1.Checked[14]=true then webopen('https://www.insta if FormWeb.CheckGroup1.Checked[14]=true then webopen('https://osdn.net/
gram.com'); search/');
if FormWeb.CheckGroup1.Checked[15]=true then webopen('https://www.linke if FormWeb.CheckGroup1.Checked[15]=true then webopen('https://pinterest
din.com'); .com');
if FormWeb.CheckGroup1.Checked[16]=true then webopen('https://osdn.net/ if FormWeb.CheckGroup1.Checked[16]=true then webopen('https://www.reddi
search/'); t.com');
if FormWeb.CheckGroup1.Checked[17]=true then webopen('https://pinterest if FormWeb.CheckGroup1.Checked[17]=true then webopen('https://sourcefor
.com'); ge.net');
if FormWeb.CheckGroup1.Checked[18]=true then webopen('https://www.reddi if FormWeb.CheckGroup1.Checked[18]=true then webopen('https://stackover
t.com'); flow.com');
if FormWeb.CheckGroup1.Checked[19]=true then webopen('https://sourcefor if FormWeb.CheckGroup1.Checked[19]=true then webopen('https://twitter.c
ge.net'); om');
if FormWeb.CheckGroup1.Checked[20]=true then webopen('https://twitter.c if FormWeb.CheckGroup1.Checked[20]=true then webopen('https://www.wikip
om'); edia.org');
if FormWeb.CheckGroup1.Checked[21]=true then webopen('https://www.wikip if FormWeb.CheckGroup1.Checked[21]=true then webopen('https://www.wikti
edia.org'); onary.org');
if FormWeb.CheckGroup1.Checked[22]=true then webopen('https://www.wikti if FormWeb.CheckGroup1.Checked[22]=true then webopen('https://yahoo.com
onary.org'); .com');
if FormWeb.CheckGroup1.Checked[23]=true then webopen('https://www.youtu be.com'); if FormWeb.CheckGroup1.Checked[23]=true then webopen('https://www.youtu be.com');
end; end;
end; end;
mrCancel: mrCancel:
begin begin
end; end;
end; end;
end; end;
procedure websearch_sel; procedure websearch_sel;
skipping to change at line 52943 skipping to change at line 52926
if not pInputQuery(txt_3_3_run, txt_3_3_runexp, '', tmpprevrun, false) then exit ; if not pInputQuery(txt_3_3_run, txt_3_3_runexp, '', tmpprevrun, false) then exit ;
s:=tmpprevrun; s:=tmpprevrun;
if s='' then exit; if s='' then exit;
{$IFDEF MSWINDOWS} {$IFDEF MSWINDOWS}
if validatecl(s)<>0 then begin pMessageWarningOK(txt_2_7_validatecl+' '+s); exit ; end; if validatecl(s)<>0 then begin pMessageWarningOK(txt_2_7_validatecl+' '+s); exit ; end;
w:=utf8decode(s); w:=utf8decode(s);
ShellExecuteW(Form_peach.Handle, PWideChar ('open'), PWideChar('"'+w+'"'), PWide Char (''), PWideChar (''), SW_SHOWNORMAL); ShellExecuteW(Form_peach.Handle, PWideChar ('open'), PWideChar('"'+w+'"'), PWide Char (''), PWideChar (''), SW_SHOWNORMAL);
{$ELSE} {$ELSE}
try try
P:=tprocessutf8.Create(nil); P:=tprocessutf8.Create(nil);
cl:=delimiter+s+delimiter; cl:=stringdelim(s);
P.CommandLine:=cl; P.CommandLine:=cl;
if validatecl(cl)<>0 then begin pMessageWarningOK(txt_2_7_validatecl+' '+cl); ex it; end; if validatecl(cl)<>0 then begin pMessageWarningOK(txt_2_7_validatecl+' '+cl); ex it; end;
P.Execute; P.Execute;
P.Free; P.Free;
except except
end; end;
{$ENDIF} {$ENDIF}
if s<>Form_peach.StringGridList.Cells[8,Form_peach.StringGridList.Row] then prev run:=s; if s<>Form_peach.StringGridList.Cells[8,Form_peach.StringGridList.Row] then prev run:=s;
end; end;
skipping to change at line 53981 skipping to change at line 53964
procedure extracttheme(var s:ansistring); procedure extracttheme(var s:ansistring);
var var
cl,in_param,out_param,bin_name:ansistring; cl,in_param,out_param,bin_name:ansistring;
P:tprocessutf8; P:tprocessutf8;
begin begin
if s<>'' then if s<>'' then
begin begin
P:=tprocessutf8.Create(nil); P:=tprocessutf8.Create(nil);
P.Options := [poNoConsole,poWaitOnExit]; P.Options := [poNoConsole,poWaitOnExit];
if libre_directive=2 then if testifrar(escapefilename(s,desk_env))=1 then exi t; if libre_directive=2 then if testifrar(escapefilename(s,desk_env))=1 then exi t;
in_param:=delimiter+escapefilename(s,desk_env)+delimiter; in_param:=stringdelim(escapefilename(s,desk_env));
out_param:=delimiter+'-o'+escapefilename(confpath+'themes'+directoryseparator out_param:=stringdelim('-o'+escapefilename(confpath+'themes'+directoryseparat
,desk_env)+delimiter; or,desk_env));
bin_name:=delimiter+escapefilename(executable_path,desk_env)+'res'+DirectoryS bin_name:=stringdelim(escapefilename(executable_path,desk_env)+'res'+Director
eparator+'7z'+DirectorySeparator+'7z'+EXEEXT+delimiter; ySeparator+'7z'+DirectorySeparator+'7z'+EXEEXT);
{$IFDEF LINUX}if sys7zlin=1 then bin_name:='7z';{$ENDIF} {$IFDEF LINUX}if sys7zlin=1 then bin_name:='7z';{$ENDIF}
cl:=bin_name+' x -aoa '+out_param+' '+in_param; cl:=bin_name+' x -aoa '+out_param+' '+in_param;
P.CommandLine:=cl; P.CommandLine:=cl;
if Form_peach.Visible=true then Application.ProcessMessages; if Form_peach.Visible=true then Application.ProcessMessages;
if validatecl(cl)<>0 then begin pMessageWarningOK(txt_2_7_validatecl+' '+cl); exit; end; if validatecl(cl)<>0 then begin pMessageWarningOK(txt_2_7_validatecl+' '+cl); exit; end;
P.Execute; P.Execute;
P.Free; P.Free;
cutextension(s); cutextension(s);
s:=s+directoryseparator+'theme.txt'; s:=s+directoryseparator+'theme.txt';
end; end;
skipping to change at line 54857 skipping to change at line 54840
case lowercase(paramstr(1)) of case lowercase(paramstr(1)) of
'-pdrop' : '-pdrop' :
begin begin
subfun:='extract'; subfun:='extract';
fun:=paramstr(2); fun:=paramstr(2);
try pforceconsole:=strtoint(paramstr(3)); except pforceconsole:=0; end; try pforceconsole:=strtoint(paramstr(3)); except pforceconsole:=0; end;
try tsize:=strtoint(paramstr(4)); except tsize:=0; end; try tsize:=strtoint(paramstr(4)); except tsize:=0; end;
inputfile:=paramstr(5); inputfile:=paramstr(5);
outname:=''; outname:='';
unit_gwrap.pfromnativedrag:=true; unit_gwrap.pfromnativedrag:=true;
for i:=6 to paramcount do cl:=cl+delimiter+paramstr(i)+delimiter+' '; for i:=6 to paramcount do cl:=cl+stringdelim(paramstr(i))+' ';
launch_cl(cl,jobcode,outname); launch_cl(cl,jobcode,outname);
halt; halt;
end; end;
//direct archive //direct archive
'-add2pea' : '-add2pea' :
begin begin
Form_peach.Windowstate:=wsMinimized; Form_peach.Windowstate:=wsMinimized;
Form_peach.Visible:=false; Form_peach.Visible:=false;
add2pea('standard','complete'); add2pea('standard','complete');
end; end;
skipping to change at line 58213 skipping to change at line 58196
begin begin
select_by('attributes','neutralsel'); select_by('attributes','neutralsel');
end; end;
procedure TForm_peach.mBenchClick(Sender: TObject); procedure TForm_peach.mBenchClick(Sender: TObject);
var var
s,cl,jobcode:ansistring; s,cl,jobcode:ansistring;
begin begin
if pMessageInfoYesNo(txt_benchmark)=7 then exit; if pMessageInfoYesNo(txt_benchmark)=7 then exit;
s:=fun; s:=fun;
cl:=delimiter+escapefilename(executable_path,desk_env)+'res'+DirectorySeparator+ '7z'+DirectorySeparator+'7z'+EXEEXT+delimiter+' b'; cl:=stringdelim(escapefilename(executable_path,desk_env)+'res'+DirectorySeparato r+'7z'+DirectorySeparator+'7z'+EXEEXT)+' b';
{$IFDEF LINUX}if sys7zlin=1 then cl:='7z b';{$ENDIF} {$IFDEF LINUX}if sys7zlin=1 then cl:='7z b';{$ENDIF}
fun:='7Z'; fun:='7Z';
fun_status:=fun; fun_status:=fun;
subfun:='bench'; subfun:='bench';
jobcode:=formatdatetime('yyyymmdd_hh.nn.ss.ms_',now)+fun; jobcode:=formatdatetime('yyyymmdd_hh.nn.ss.ms_',now)+fun;
launch_cl(cl,jobcode,''); launch_cl(cl,jobcode,'');
fun:=s; fun:=s;
fun_status:=fun; fun_status:=fun;
end; end;
skipping to change at line 58816 skipping to change at line 58799
cl,in_param:ansistring; cl,in_param:ansistring;
P:tprocessutf8; P:tprocessutf8;
i:integer; i:integer;
sg:TStringGrid; sg:TStringGrid;
begin begin
in_param:=''; in_param:='';
{$IFDEF MSWINDOWS}if Form_peach.PanelArchiveMain.Visible=true{$ELSE}if Form_peac h.PanelArchiveMain.top=0{$ENDIF} then sg:=Form_peach.StringGrid1 {$IFDEF MSWINDOWS}if Form_peach.PanelArchiveMain.Visible=true{$ELSE}if Form_peac h.PanelArchiveMain.top=0{$ENDIF} then sg:=Form_peach.StringGrid1
else sg:=Form_peach.StringGrid2; else sg:=Form_peach.StringGrid2;
if sg.Row=0 then exit; if sg.Row=0 then exit;
for i:=1 to sg.Rowcount-1 do for i:=1 to sg.Rowcount-1 do
if sg.Cells[11,i]='1' then in_param:=in_param+delimiter+escapefilename(sg.Cel ls[8,i],desk_env)+delimiter+' '; if sg.Cells[11,i]='1' then in_param:=in_param+stringdelim(escapefilename(sg.C ells[8,i],desk_env))+' ';
check_files(in_param,cl,oper); check_files(in_param,cl,oper);
P:=tprocessutf8.Create(nil); P:=tprocessutf8.Create(nil);
{$IFDEF MSWINDOWS}P.Options := [poNoConsole];{$ELSE}P.Options := [poNoConsole, p oWaitOnExit];{$ENDIF} {$IFDEF MSWINDOWS}P.Options := [poNoConsole];{$ELSE}P.Options := [poNoConsole, p oWaitOnExit];{$ENDIF}
P.CommandLine:=cl; P.CommandLine:=cl;
if validatecl(cl)<>0 then begin pMessageWarningOK(txt_2_7_validatecl+' '+cl); ex it; end; if validatecl(cl)<>0 then begin pMessageWarningOK(txt_2_7_validatecl+' '+cl); ex it; end;
P.Execute; P.Execute;
P.Free; P.Free;
end; end;
procedure checkselected_list(oper:ansistring); procedure checkselected_list(oper:ansistring);
skipping to change at line 58838 skipping to change at line 58821
cl,in_param:ansistring; cl,in_param:ansistring;
P:tprocessutf8; P:tprocessutf8;
i:integer; i:integer;
begin begin
in_param:=''; in_param:='';
if Form_peach.StringGridList.RowCount<2 then exit; if Form_peach.StringGridList.RowCount<2 then exit;
if Form_peach.StringGridList.Cells[1,1]='' then exit; if Form_peach.StringGridList.Cells[1,1]='' then exit;
if fun<>'FILEBROWSER' then if fun<>'FILEBROWSER' then
begin begin
if checkfiledirname(Form_peach.EditOpenIn.Text)<>0 then begin pMessageWarning OK(txt_2_7_validatefn+' '+Form_peach.EditOpenIn.Text); exit; end; if checkfiledirname(Form_peach.EditOpenIn.Text)<>0 then begin pMessageWarning OK(txt_2_7_validatefn+' '+Form_peach.EditOpenIn.Text); exit; end;
in_param:=delimiter+escapefilename(Form_peach.EditOpenIn.Text,desk_env)+delim iter; in_param:=stringdelim(escapefilename(Form_peach.EditOpenIn.Text,desk_env));
check_files(in_param,cl,oper); check_files(in_param,cl,oper);
P:=tprocessutf8.Create(nil); P:=tprocessutf8.Create(nil);
{$IFDEF MSWINDOWS}P.Options := [poNoConsole];{$ELSE}P.Options := [poNoConsole , poWaitOnExit];{$ENDIF} {$IFDEF MSWINDOWS}P.Options := [poNoConsole];{$ELSE}P.Options := [poNoConsole , poWaitOnExit];{$ENDIF}
P.CommandLine:=cl; P.CommandLine:=cl;
if validatecl(cl)<>0 then begin pMessageWarningOK(txt_2_7_validatecl+' '+cl); exit; end; if validatecl(cl)<>0 then begin pMessageWarningOK(txt_2_7_validatecl+' '+cl); exit; end;
P.Execute; P.Execute;
P.Free; P.Free;
exit; exit;
end; end;
if checklistanysel<>0 then exit; if checklistanysel<>0 then exit;
for i:=1 to Form_peach.StringGridList.Rowcount-1 do for i:=1 to Form_peach.StringGridList.Rowcount-1 do
if Form_peach.StringGridList.Cells[12,i]='1' then if Form_peach.StringGridList.Cells[12,i]='1' then
begin begin
if checkfiledirname(Form_peach.StringGridList.Cells[8,i])<>0 then begin pM essageWarningOK(txt_2_7_validatefn+' '+Form_peach.StringGridList.Cells[8,i]); ex it; end; if checkfiledirname(Form_peach.StringGridList.Cells[8,i])<>0 then begin pM essageWarningOK(txt_2_7_validatefn+' '+Form_peach.StringGridList.Cells[8,i]); ex it; end;
in_param:=in_param+delimiter+escapefilename(Form_peach.StringGridList.Cell s[8,i],desk_env)+delimiter+' '; in_param:=in_param+stringdelim(escapefilename(Form_peach.StringGridList.Ce lls[8,i],desk_env))+' ';
end; end;
check_files(in_param,cl,oper); check_files(in_param,cl,oper);
P:=tprocessutf8.Create(nil); P:=tprocessutf8.Create(nil);
{$IFDEF MSWINDOWS}P.Options := [poNoConsole];{$ELSE}P.Options := [poNoConsole, p oWaitOnExit];{$ENDIF} {$IFDEF MSWINDOWS}P.Options := [poNoConsole];{$ELSE}P.Options := [poNoConsole, p oWaitOnExit];{$ENDIF}
P.CommandLine:=cl; P.CommandLine:=cl;
if validatecl(cl)<>0 then begin pMessageWarningOK(txt_2_7_validatecl+' '+cl); ex it; end; if validatecl(cl)<>0 then begin pMessageWarningOK(txt_2_7_validatecl+' '+cl); ex it; end;
P.Execute; P.Execute;
P.Free; P.Free;
end; end;
skipping to change at line 58931 skipping to change at line 58914
P:tprocessutf8; P:tprocessutf8;
sg:TStringGrid; sg:TStringGrid;
begin begin
{$IFDEF MSWINDOWS}if Form_peach.PanelArchiveMain.Visible=true{$ELSE}if Form_peac h.PanelArchiveMain.top=0{$ENDIF} then sg:=Form_peach.StringGrid1 {$IFDEF MSWINDOWS}if Form_peach.PanelArchiveMain.Visible=true{$ELSE}if Form_peac h.PanelArchiveMain.top=0{$ENDIF} then sg:=Form_peach.StringGrid1
else sg:=Form_peach.StringGrid2; else sg:=Form_peach.StringGrid2;
if sg.Row=0 then exit; if sg.Row=0 then exit;
if sg.Cells[8,sg.Row]='' then exit; if sg.Cells[8,sg.Row]='' then exit;
if Form_peach.OpenDialogArchive.Execute then if Form_peach.OpenDialogArchive.Execute then
if Form_peach.OpenDialogArchive.FileName<>'' then if Form_peach.OpenDialogArchive.FileName<>'' then
begin begin
filea:=delimiter+escapefilename(sg.Cells[8,sg.Row],desk_env)+delimiter; filea:=stringdelim(escapefilename(sg.Cells[8,sg.Row],desk_env));
fileb:=delimiter+escapefilename(Form_peach.OpenDialogArchive.Filename,desk fileb:=stringdelim(escapefilename(Form_peach.OpenDialogArchive.Filename,de
_env)+delimiter; sk_env));
P:=tprocessutf8.Create(nil); P:=tprocessutf8.Create(nil);
bin_name:=delimiter+escapefilename(executable_path,desk_env)+'res'+directo ryseparator+'pea'+EXEEXT+delimiter; bin_name:=stringdelim(escapefilename(executable_path,desk_env)+'res'+direc toryseparator+'pea'+EXEEXT);
{$IFDEF MSWINDOWS}P.Options := [poNoConsole];{$ELSE}P.Options := [poNoCons ole, poWaitOnExit];{$ENDIF} {$IFDEF MSWINDOWS}P.Options := [poNoConsole];{$ELSE}P.Options := [poNoCons ole, poWaitOnExit];{$ENDIF}
cl:=bin_name+' COMPARE '+filea+' '+fileb; cl:=bin_name+' COMPARE '+filea+' '+fileb;
P.CommandLine:=cl; P.CommandLine:=cl;
if validatecl(cl)<>0 then begin pMessageWarningOK(txt_2_7_validatecl+' '+c l); exit; end; if validatecl(cl)<>0 then begin pMessageWarningOK(txt_2_7_validatecl+' '+c l); exit; end;
P.Execute; P.Execute;
P.Free; P.Free;
end; end;
end; end;
procedure compareselected_list; procedure compareselected_list;
skipping to change at line 58956 skipping to change at line 58939
cl,bin_name,filea,fileb:ansistring; cl,bin_name,filea,fileb:ansistring;
P:tprocessutf8; P:tprocessutf8;
begin begin
if Form_peach.StringGridList.Row=0 then exit; if Form_peach.StringGridList.Row=0 then exit;
if Form_peach.StringGridList.Cells[8,Form_peach.StringGridList.Row]='' then exit ; if Form_peach.StringGridList.Cells[8,Form_peach.StringGridList.Row]='' then exit ;
if checklistsel<>0 then exit; if checklistsel<>0 then exit;
if checkfiledirname(Form_peach.StringGridList.Cells[8,Form_peach.StringGridList. Row])<>0 then begin pMessageWarningOK(txt_2_7_validatefn+' '+Form_peach.StringGr idList.Cells[8,Form_peach.StringGridList.Row]); exit; end; if checkfiledirname(Form_peach.StringGridList.Cells[8,Form_peach.StringGridList. Row])<>0 then begin pMessageWarningOK(txt_2_7_validatefn+' '+Form_peach.StringGr idList.Cells[8,Form_peach.StringGridList.Row]); exit; end;
if Form_peach.OpenDialogArchive.Execute then if Form_peach.OpenDialogArchive.Execute then
if Form_peach.OpenDialogArchive.FileName<>'' then if Form_peach.OpenDialogArchive.FileName<>'' then
begin begin
filea:=delimiter+escapefilename(Form_peach.StringGridList.Cells[8,Form_pea filea:=stringdelim(escapefilename(Form_peach.StringGridList.Cells[8,Form_p
ch.StringGridList.Row],desk_env)+delimiter; each.StringGridList.Row],desk_env));
fileb:=delimiter+escapefilename(Form_peach.OpenDialogArchive.Filename,desk fileb:=stringdelim(escapefilename(Form_peach.OpenDialogArchive.Filename,de
_env)+delimiter; sk_env));
P:=tprocessutf8.Create(nil); P:=tprocessutf8.Create(nil);
bin_name:=delimiter+escapefilename(executable_path,desk_env)+'res'+directo ryseparator+'pea'+EXEEXT+delimiter; bin_name:=stringdelim(escapefilename(executable_path,desk_env)+'res'+direc toryseparator+'pea'+EXEEXT);
{$IFDEF MSWINDOWS}P.Options := [poNoConsole];{$ELSE}P.Options := [poNoCons ole, poWaitOnExit];{$ENDIF} {$IFDEF MSWINDOWS}P.Options := [poNoConsole];{$ELSE}P.Options := [poNoCons ole, poWaitOnExit];{$ENDIF}
cl:=bin_name+' COMPARE '+filea+' '+fileb; cl:=bin_name+' COMPARE '+filea+' '+fileb;
P.CommandLine:=cl; P.CommandLine:=cl;
if validatecl(cl)<>0 then begin pMessageWarningOK(txt_2_7_validatecl+' '+c l); exit; end; if validatecl(cl)<>0 then begin pMessageWarningOK(txt_2_7_validatecl+' '+c l); exit; end;
P.Execute; P.Execute;
P.Free; P.Free;
end; end;
end; end;
procedure TForm_peach.MenuItemToolCompareClick(Sender: TObject); procedure TForm_peach.MenuItemToolCompareClick(Sender: TObject);
skipping to change at line 58995 skipping to change at line 58978
{$IFDEF MSWINDOWS}if Form_peach.EditOpenIn.Text=txt_mypc then exit;{$ENDIF} {$IFDEF MSWINDOWS}if Form_peach.EditOpenIn.Text=txt_mypc then exit;{$ENDIF}
case erasemode of case erasemode of
0: s:=txt_delete; 0: s:=txt_delete;
1: s:=txt_wipe; 1: s:=txt_wipe;
2: s:=txt_5_2_zerodelete; 2: s:=txt_5_2_zerodelete;
end; end;
if Form_peach.visible=true then if Form_peach.visible=true then
if pMessageWarningYesNo(s+char($0D)+char($0A)+char($0D)+char($0A)+inttostr(ns el)+' '+txt_displayed_obj+':'+char($0D)+char($0A)+char($0D)+char($0A)+strsel)=6 then if pMessageWarningYesNo(s+char($0D)+char($0A)+char($0D)+char($0A)+inttostr(ns el)+' '+txt_displayed_obj+':'+char($0D)+char($0A)+char($0D)+char($0A)+strsel)=6 then
begin begin
P:=tprocessutf8.Create(nil); P:=tprocessutf8.Create(nil);
bin_name:=delimiter+escapefilename(executable_path,desk_env)+'res'+directorys eparator+'pea'+EXEEXT+delimiter; bin_name:=stringdelim(escapefilename(executable_path,desk_env)+'res'+director yseparator+'pea'+EXEEXT);
for i:=1 to Form_peach.StringGridList.Rowcount-1 do for i:=1 to Form_peach.StringGridList.Rowcount-1 do
if Form_peach.StringGridList.Cells[12,i]='1' then if Form_peach.StringGridList.Cells[12,i]='1' then
begin begin
if checkfiledirname(Form_peach.StringGridList.Cells[8,i])<>0 then begin pMessageWarningOK(txt_2_7_validatefn+' '+Form_peach.StringGridList.Cells[8,i]); exit; end; if checkfiledirname(Form_peach.StringGridList.Cells[8,i])<>0 then begin pMessageWarningOK(txt_2_7_validatefn+' '+Form_peach.StringGridList.Cells[8,i]); exit; end;
in_param:=in_param+delimiter+escapefilename((Form_peach.StringGridList. Cells[8,i]),desk_env)+delimiter+' '; in_param:=in_param+stringdelim(escapefilename((Form_peach.StringGridLis t.Cells[8,i]),desk_env))+' ';
end; end;
case erasepasses of case erasepasses of
0: eraselevel:='VERY_FAST'; 0: eraselevel:='VERY_FAST';
1: eraselevel:='FAST'; 1: eraselevel:='FAST';
2: eraselevel:='MEDIUM'; 2: eraselevel:='MEDIUM';
3: eraselevel:='SLOW'; 3: eraselevel:='SLOW';
4: eraselevel:='VERY_SLOW'; 4: eraselevel:='VERY_SLOW';
end; end;
if erasemode=0 then eraselevel:='NONE'; if erasemode=0 then eraselevel:='NONE';
if erasemode=2 then eraselevel:='ZERO'; if erasemode=2 then eraselevel:='ZERO';
skipping to change at line 59036 skipping to change at line 59019
{$IFDEF MSWINDOWS}if Form_peach.EditOpenIn.Text=txt_mypc then exit;{$ENDIF} {$IFDEF MSWINDOWS}if Form_peach.EditOpenIn.Text=txt_mypc then exit;{$ENDIF}
case erasemode of case erasemode of
0: s:=txt_delete; 0: s:=txt_delete;
1: s:=txt_wipe; 1: s:=txt_wipe;
2: s:=txt_5_2_zerodelete; 2: s:=txt_5_2_zerodelete;
end; end;
if Form_peach.visible=true then if Form_peach.visible=true then
if pMessageWarningYesNo(s+char($0D)+char($0A)+char($0D)+char($0A)+s_in)=6 the n if pMessageWarningYesNo(s+char($0D)+char($0A)+char($0D)+char($0A)+s_in)=6 the n
begin begin
P:=tprocessutf8.Create(nil); P:=tprocessutf8.Create(nil);
bin_name:=delimiter+escapefilename(executable_path,desk_env)+'res'+directorys eparator+'pea'+EXEEXT+delimiter; bin_name:=stringdelim(escapefilename(executable_path,desk_env)+'res'+director yseparator+'pea'+EXEEXT);
if checkfiledirname(s_in)<>0 then begin pMessageWarningOK(txt_2_7_validatefn+ ' '+s_in); exit; end; if checkfiledirname(s_in)<>0 then begin pMessageWarningOK(txt_2_7_validatefn+ ' '+s_in); exit; end;
in_param:=delimiter+escapefilename((s_in),desk_env)+delimiter; in_param:=stringdelim(escapefilename((s_in),desk_env));
case erasepasses of case erasepasses of
0: eraselevel:='VERY_FAST'; 0: eraselevel:='VERY_FAST';
1: eraselevel:='FAST'; 1: eraselevel:='FAST';
2: eraselevel:='MEDIUM'; 2: eraselevel:='MEDIUM';
3: eraselevel:='SLOW'; 3: eraselevel:='SLOW';
4: eraselevel:='VERY_SLOW'; 4: eraselevel:='VERY_SLOW';
end; end;
if erasemode=0 then eraselevel:='NONE'; if erasemode=0 then eraselevel:='NONE';
if erasemode=2 then eraselevel:='ZERO'; if erasemode=2 then eraselevel:='ZERO';
{$IFDEF MSWINDOWS}P.Options := [poNoConsole];{$ELSE}P.Options := [poNoConsole , poWaitOnExit];{$ENDIF} {$IFDEF MSWINDOWS}P.Options := [poNoConsole];{$ELSE}P.Options := [poNoConsole , poWaitOnExit];{$ENDIF}
skipping to change at line 59953 skipping to change at line 59936
i:=sg.Row; i:=sg.Row;
if i>0 then if i>0 then
begin begin
j:=testinput(sg.Cells[8,i],true); j:=testinput(sg.Cells[8,i],true);
if (j>=0) then //and (j<>1000) then if (j>=0) then //and (j<>1000) then
begin begin
save_conf; save_conf;
save_bookmarks; save_bookmarks;
P:=tprocessutf8.Create(nil); P:=tprocessutf8.Create(nil);
{$IFDEF MSWINDOWS}P.Options := [poNoConsole];{$ELSE}P.Options := [poNoCons ole, poWaitOnExit];{$ENDIF} {$IFDEF MSWINDOWS}P.Options := [poNoConsole];{$ELSE}P.Options := [poNoCons ole, poWaitOnExit];{$ENDIF}
P.CommandLine:=(delimiter+escapefilename(executable_path,desk_env)+'peazip '+EXEEXT+delimiter+' -ext2open '+delimiter+escapefilename(sg.Cells[8,i],desk_env )+delimiter); P.CommandLine:=(stringdelim(escapefilename(executable_path,desk_env)+'peaz ip'+EXEEXT)+' -ext2open '+stringdelim(escapefilename(sg.Cells[8,i],desk_env)));
if Form_peach.Visible=true then Application.ProcessMessages; if Form_peach.Visible=true then Application.ProcessMessages;
cl:=P.CommandLine; cl:=P.CommandLine;
if validatecl(cl)<>0 then begin pMessageWarningOK(txt_2_7_validatecl+' '+c l); exit; end; if validatecl(cl)<>0 then begin pMessageWarningOK(txt_2_7_validatecl+' '+c l); exit; end;
P.Execute; P.Execute;
P.Free; P.Free;
end; end;
end; end;
end; end;
procedure clickcustom(s:ansistring); procedure clickcustom(s:ansistring);
skipping to change at line 60642 skipping to change at line 60625
if clipcontent[i,3]=txt_caption_extract then if clipcontent[i,3]=txt_caption_extract then
begin begin
psource:=tsource; psource:=tsource;
tsource:=clipcontent[i,4]; tsource:=clipcontent[i,4];
tdest:=destdir; tdest:=destdir;
if (tsource<>psource) and (psource<>'') then if (tsource<>psource) and (psource<>'') then
begin begin
dsource:=psource; dsource:=psource;
ddest:=tdest; ddest:=tdest;
directextractfromname(dsource,ddest,'extract',tcontent); directextractfromname(dsource,ddest,'extract',tcontent);
tcontent:=delimiter+clipcontent[i,0]+delimiter+' '; tcontent:=stringdelim(clipcontent[i,0])+' ';
fun:='FILEBROWSER'; fun:='FILEBROWSER';
end end
else tcontent:=tcontent+delimiter+clipcontent[i,0]+delimiter+' '; else tcontent:=tcontent+stringdelim(clipcontent[i,0])+' ';
end; end;
end; end;
if (tsource<>'') and (tcontent<>'') then if (tsource<>'') and (tcontent<>'') then
begin begin
directextractfromname(tsource,tdest,'extract',tcontent); directextractfromname(tsource,tdest,'extract',tcontent);
fun:='FILEBROWSER'; fun:='FILEBROWSER';
end; end;
{$IFDEF MSWINDOWS} {$IFDEF MSWINDOWS}
j:=0; j:=0;
skipping to change at line 60721 skipping to change at line 60704
begin begin
filecopying:=false; filecopying:=false;
exit_busy_status; exit_busy_status;
exit; exit;
end; end;
if directoryexists((dest)) then if directoryexists((dest)) then
if overall=true then if overall=true then
else else
case pMessageInfoAllYesNoCancel('"'+extractfilename(dest)+'" ' +txt_overwrite) of case pMessageInfoAllYesNoCancel('"'+extractfilename(dest)+'" ' +txt_overwrite) of
2: goto 1; 2: goto 1;
6: cl:=opcommand+'-f '+delimiter+src+delimiter+' '+delimite 6: cl:=opcommand+'-f '+stringdelim(src)+' '+stringdelim(des
r+dest+delimiter; t);
7: cl:=opcommand+delimiter+src+delimiter+' '+delimiter+dest 7: cl:=opcommand+stringdelim(src)+' '+stringdelim(dest);
+delimiter; 10: begin overall:=true; cl:=opcommand+'-f '+stringdelim(sr
10: begin overall:=true; cl:=opcommand+'-f '+delimiter+src+ c)+' '+stringdelim(dest); end;
delimiter+' '+delimiter+dest+delimiter; end;
end; end;
if cl='' then cl:=opcommand+'-f '+delimiter+src+delimiter+' '+delimiter +dest+delimiter; if cl='' then cl:=opcommand+'-f '+stringdelim(src)+' '+stringdelim(dest );
end end
else else
begin begin
dest:=destdir; dest:=destdir;
if dest<>'' then if dest<>'' then
if dest[length(dest)]<>directoryseparator then dest:=dest+directorys eparator; if dest[length(dest)]<>directoryseparator then dest:=dest+directorys eparator;
destf:=dest+clipcontent[i,1]; destf:=dest+clipcontent[i,1];
if src=destf then if src=destf then
if getnewdestname(destf)<>0 then if getnewdestname(destf)<>0 then
begin begin
skipping to change at line 60749 skipping to change at line 60732
end; end;
if fileexists((destf)) then if fileexists((destf)) then
if overall=true then clearfile(destf) if overall=true then clearfile(destf)
else else
case pMessageInfoAllYesNoCancel('"'+extractfilename(destf)+'" '+txt_overwrite) of case pMessageInfoAllYesNoCancel('"'+extractfilename(destf)+'" '+txt_overwrite) of
2: goto 1; 2: goto 1;
6: clearfile(destf); 6: clearfile(destf);
7: goto 1; 7: goto 1;
10: begin clearfile(destf); overall:=true; end; 10: begin clearfile(destf); overall:=true; end;
end; end;
cl:=opcommand+'-f '+delimiter+src+delimiter+' '+delimiter+destf+delimit er; cl:=opcommand+'-f '+stringdelim(src)+' '+stringdelim(destf);
end; end;
if cl='' then goto 1; if cl='' then goto 1;
P.CommandLine:=cl; P.CommandLine:=cl;
if validatecl(cl)<>0 then if validatecl(cl)<>0 then
begin begin
pMessageWarningOK(txt_2_7_validatecl+' '+cl); pMessageWarningOK(txt_2_7_validatecl+' '+cl);
exit_busy_status; exit_busy_status;
filecopying:=false; filecopying:=false;
exit; exit;
end; end;
skipping to change at line 60918 skipping to change at line 60901
begin begin
fextl:=upcase(extractfileext(Form_peach.EditOpenIn.Caption)); fextl:=upcase(extractfileext(Form_peach.EditOpenIn.Caption));
//remove existing item with new destination name //remove existing item with new destination name
if cleardestname=true then if cleardestname=true then
if not ((upcase(namenew)=upcase(nameold)) and (fextl='.RAR') and (havewinrar=tru e) and (userar=1)) then if not ((upcase(namenew)=upcase(nameold)) and (fextl='.RAR') and (havewinrar=tru e) and (userar=1)) then
begin begin
P:=tprocessutf8.Create(nil); P:=tprocessutf8.Create(nil);
P.Options := [poNoConsole, poWaitOnExit]; P.Options := [poNoConsole, poWaitOnExit];
if (fextl='.RAR') and (havewinrar=true) and (userar=1) then if (fextl='.RAR') and (havewinrar=true) and (userar=1) then
begin begin
bin_name:=delimiter+escapefilename(Form_peach.EditnameCustom.Text,desk_env)+d elimiter+' d -y'; bin_name:=stringdelim(escapefilename(Form_peach.EditnameCustom.Text,desk_env) )+' d -y';
case Form_peach.cbRARlastmodtime.ItemIndex of case Form_peach.cbRARlastmodtime.ItemIndex of
1: bin_name:=bin_name+' -tk'; 1: bin_name:=bin_name+' -tk';
2: bin_name:=bin_name+' -tl'; 2: bin_name:=bin_name+' -tl';
end; end;
end end
else else
begin begin
bin_name:=delimiter+escapefilename(executable_path,desk_env)+'res'+DirectoryS eparator+'7z'+DirectorySeparator+'7z'+EXEEXT+delimiter+' d -y -ssc'; bin_name:=stringdelim(escapefilename(executable_path,desk_env)+'res'+Director ySeparator+'7z'+DirectorySeparator+'7z'+EXEEXT)+' d -y -ssc';
{$IFDEF LINUX}if sys7zlin=1 then bin_name:='7z d -y -ssc';{$ENDIF} {$IFDEF LINUX}if sys7zlin=1 then bin_name:='7z d -y -ssc';{$ENDIF}
if stl7z=1 then bin_name:=bin_name+' -stl'; if stl7z=1 then bin_name:=bin_name+' -stl';
end; end;
cl:=bin_name+' -- '+delimiter+Form_peach.EditOpenIn.Caption+delimiter+' '+delimi ter+namenew+delimiter; cl:=bin_name+' -- '+stringdelim(Form_peach.EditOpenIn.Caption)+' '+stringdelim(n amenew);
P.CommandLine:=cl; P.CommandLine:=cl;
if validatecl(cl)<>0 then if validatecl(cl)<>0 then
begin begin
pMessageWarningOK(txt_2_7_validatecl+' '+cl); pMessageWarningOK(txt_2_7_validatecl+' '+cl);
exit; exit;
end; end;
if length(namenew)>1 then if length(namenew)>1 then
if (namenew[1]+namenew[2]<>'\\') and (namenew[2]<>':') then P.Execute if (namenew[1]+namenew[2]<>'\\') and (namenew[2]<>':') then P.Execute
else else
else P.Execute; else P.Execute;
P.Free; P.Free;
end; end;
//rename item from old name to new name //rename item from old name to new name
P:=tprocessutf8.Create(nil); P:=tprocessutf8.Create(nil);
P.Options := [poNoConsole, poWaitOnExit]; P.Options := [poNoConsole, poWaitOnExit];
if (fextl='.RAR') and (havewinrar=true) and (userar=1) then if (fextl='.RAR') and (havewinrar=true) and (userar=1) then
begin begin
bin_name:=delimiter+escapefilename(Form_peach.EditnameCustom.Text,desk_env)+d elimiter+' rn'; bin_name:=stringdelim(escapefilename(Form_peach.EditnameCustom.Text,desk_env) )+' rn';
case Form_peach.cbRARlastmodtime.ItemIndex of case Form_peach.cbRARlastmodtime.ItemIndex of
1: bin_name:=bin_name+' -tk'; 1: bin_name:=bin_name+' -tk';
2: bin_name:=bin_name+' -tl'; 2: bin_name:=bin_name+' -tl';
end; end;
//rar encryption //rar encryption
if (FormPW.EditUn7zaPW.Text<>'') or (FormPW.EditName3.Text<>'') then if (FormPW.EditUn7zaPW.Text<>'') or (FormPW.EditName3.Text<>'') then
if FormPW.CheckBoxEncFn.State=cbChecked then pw_option:='-hp' if FormPW.CheckBoxEncFn.State=cbChecked then pw_option:='-hp'
else pw_option:='-p' else pw_option:='-p'
else else
pw_option:=''; pw_option:='';
skipping to change at line 60971 skipping to change at line 60954
begin begin
pw:=FormPW.EditUn7zaPW.Text; pw:=FormPW.EditUn7zaPW.Text;
if (disable_twofactor=false) and (FormPW.EditName3.Text<>'') then if (disable_twofactor=false) and (FormPW.EditName3.Text<>'') then
if prepend_keyfile(pw,FormPW.EditName3.Text)<>0 then if prepend_keyfile(pw,FormPW.EditName3.Text)<>0 then
begin begin
pMessageErrorOK(FormPW.EditName3.Text+' '+txt_keyfile_not_found); pMessageErrorOK(FormPW.EditName3.Text+' '+txt_keyfile_not_found);
exit; exit;
end; end;
if pw4cl(pw_option,pw)<>0 then if pw4cl(pw_option,pw)<>0 then
begin begin
msg_pw_errorchar; msg_pw_errorchar(pw);
pforceconsole:=1; pforceconsole:=1;
pw:=pw_option; pw:=pw_option;
//exit; //exit;
end; end;
end; end;
if pw<>'' then bin_name:=bin_name+' '+pw; if pw<>'' then bin_name:=bin_name+' '+pw;
end end
else else
begin begin
bin_name:=delimiter+escapefilename(executable_path,desk_env)+'res'+DirectoryS eparator+'7z'+DirectorySeparator+'7z'+EXEEXT+delimiter+' rn'; bin_name:=stringdelim(escapefilename(executable_path,desk_env)+'res'+Director ySeparator+'7z'+DirectorySeparator+'7z'+EXEEXT)+' rn';
{$IFDEF LINUX}if sys7zlin=1 then bin_name:='7z rn';{$ENDIF} {$IFDEF LINUX}if sys7zlin=1 then bin_name:='7z rn';{$ENDIF}
if stl7z=1 then bin_name:=bin_name+' -stl'; if stl7z=1 then bin_name:=bin_name+' -stl';
//encryption //encryption
if (FormPW.EditUn7zaPW.Text<>'') or (FormPW.EditName3.Text<>'') then if (FormPW.EditUn7zaPW.Text<>'') or (FormPW.EditName3.Text<>'') then
if (FormPW.CheckBoxEncFn.State= cbChecked) and (archive_type='7z') then if (FormPW.CheckBoxEncFn.State= cbChecked) and (archive_type='7z') then
begin begin
pw_option:='-p'; pw_option:='-p';
pw2_option:='-mhe=on'; pw2_option:='-mhe=on';
end end
else else
skipping to change at line 61013 skipping to change at line 60996
begin begin
pw:=FormPW.EditUn7zaPW.Text; pw:=FormPW.EditUn7zaPW.Text;
if (disable_twofactor=false) and (FormPW.EditName3.Text<>'') then if (disable_twofactor=false) and (FormPW.EditName3.Text<>'') then
if prepend_keyfile(pw,FormPW.EditName3.Text)<>0 then if prepend_keyfile(pw,FormPW.EditName3.Text)<>0 then
begin begin
pMessageErrorOK(FormPW.EditName3.Text+' '+txt_keyfile_not_found); pMessageErrorOK(FormPW.EditName3.Text+' '+txt_keyfile_not_found);
exit; exit;
end; end;
if pw4cl('-p',pw)<>0 then if pw4cl('-p',pw)<>0 then
begin begin
msg_pw_errorchar; msg_pw_errorchar(pw);
pforceconsole:=1; pforceconsole:=1;
pw:='-p'; pw:='-p';
end; end;
end; end;
if pw<>'' then if pw<>'' then
begin begin
bin_name:=bin_name+' '+pw; bin_name:=bin_name+' '+pw;
if pw2_option<>'' then bin_name:=bin_name+' '+pw2_option; if pw2_option<>'' then bin_name:=bin_name+' '+pw2_option;
end; end;
end; end;
cl:=bin_name+' -- '+delimiter+Form_peach.EditOpenIn.Caption+delimiter+' '+delimi ter+nameold+delimiter+' '+delimiter+namenew+delimiter; cl:=bin_name+' -- '+stringdelim(Form_peach.EditOpenIn.Caption)+' '+stringdelim(n ameold)+' '+stringdelim(namenew);
P.CommandLine:=cl; P.CommandLine:=cl;
if validatecl(cl)<>0 then if validatecl(cl)<>0 then
begin begin
pMessageWarningOK(txt_2_7_validatecl+' '+cl); pMessageWarningOK(txt_2_7_validatecl+' '+cl);
exit; exit;
end; end;
if extractfilepath(namenew)<>'\\' then P.Execute; if extractfilepath(namenew)<>'\\' then P.Execute;
P.Free; P.Free;
end; end;
skipping to change at line 63852 skipping to change at line 63835
if not(directoryexists(confpath+themedir)) then if not(directoryexists(confpath+themedir)) then
forcedirectories(confpath+themedir) forcedirectories(confpath+themedir)
else else
begin begin
pMessageErrorOK(confpath+themedir+' '+txt_theme_exists); pMessageErrorOK(confpath+themedir+' '+txt_theme_exists);
exit; exit;
end; end;
P:=tprocessutf8.Create(nil); P:=tprocessutf8.Create(nil);
P.Options := [poWaitOnExit]; P.Options := [poWaitOnExit];
{$IFDEF MSWINDOWS} {$IFDEF MSWINDOWS}
cl:=wincomspec+' /c xcopy '+delimiter+Form_peach.theme_label.caption+'*.*'+delim iter+' '+delimiter+confpath+themedir+delimiter+' /S /Y'; cl:=wincomspec+' /c xcopy '+stringdelim(Form_peach.theme_label.caption+'*.*')+' '+stringdelim(confpath+themedir)+' /S /Y';
{$ELSE} {$ELSE}
cl:='cp -p -r -f '+delimiter+Form_peach.theme_label.caption+'.'+delimiter+' '+de limiter+confpath+themedir+delimiter; cl:='cp -p -r -f '+stringdelim(Form_peach.theme_label.caption+'.')+' '+stringdel im(confpath+themedir);
{$ENDIF} {$ENDIF}
P.CommandLine:=cl; P.CommandLine:=cl;
if validatecl(cl)<>0 then if validatecl(cl)<>0 then
begin begin
pMessageWarningOK(txt_2_7_validatecl+' '+cl); pMessageWarningOK(txt_2_7_validatecl+' '+cl);
exit; exit;
end; end;
P.Execute; P.Execute;
P.Free; P.Free;
assignfile(conf,(confpath+theme_path)); assignfile(conf,(confpath+theme_path));
skipping to change at line 63876 skipping to change at line 63859
write_header(conf); write_header(conf);
writeln(conf,Form_peach.Edit1.text); writeln(conf,Form_peach.Edit1.text);
writeln(conf,Form_peach.Edit2.text); writeln(conf,Form_peach.Edit2.text);
if Form_peach.Edit3.text='' then Form_peach.Edit3.text:='LGPLv3'; if Form_peach.Edit3.text='' then Form_peach.Edit3.text:='LGPLv3';
writeln(conf,Form_peach.Edit3.text); writeln(conf,Form_peach.Edit3.text);
writeconf_colors; writeconf_colors;
closefile(conf); closefile(conf);
Form_peach.theme_label.caption:=confpath+themedir; Form_peach.theme_label.caption:=confpath+themedir;
P:=tprocessutf8.Create(nil); P:=tprocessutf8.Create(nil);
P.Options := [poWaitOnExit]; P.Options := [poWaitOnExit];
in_param:=delimiter+escapefilename(confpath+themedir,desk_env)+delimiter; in_param:=stringdelim(escapefilename(confpath+themedir,desk_env));
out_param:=local_desktop+Form_peach.Edit1.text+'.theme.7z'; out_param:=local_desktop+Form_peach.Edit1.text+'.theme.7z';
getworkpath(work_path,out_param); getworkpath(work_path,out_param);
out_param:=delimiter+escapefilename(out_param,desk_env)+delimiter; out_param:=stringdelim(escapefilename(out_param,desk_env));
bin_name:=delimiter+escapefilename(executable_path,desk_env)+'res'+DirectorySepa bin_name:=stringdelim(escapefilename(executable_path,desk_env)+'res'+DirectorySe
rator+'7z'+DirectorySeparator+'7z'+EXEEXT+delimiter+' a -t7z -m0=LZMA -mmt=on -m parator+'7z'+DirectorySeparator+'7z'+EXEEXT)+' a -t7z -m0=LZMA -mmt=on -mx5 -md=
x5 -md=16m -mfb=32 -ms=2g'; 16m -mfb=32 -ms=2g';
{$IFDEF LINUX}if sys7zlin=1 then bin_name:='7z a -t7z -m0=LZMA -mmt=on -mx5 -md= 16m -mfb=32 -ms=2g';{$ENDIF} {$IFDEF LINUX}if sys7zlin=1 then bin_name:='7z a -t7z -m0=LZMA -mmt=on -mx5 -md= 16m -mfb=32 -ms=2g';{$ENDIF}
if work_path<>'' then cl:=cl+' '+work_path; if work_path<>'' then cl:=cl+' '+work_path;
cl:=bin_name+' '+out_param+' '+in_param; cl:=bin_name+' '+out_param+' '+in_param;
P.CommandLine:=cl; P.CommandLine:=cl;
if validatecl(cl)<>0 then if validatecl(cl)<>0 then
begin begin
pMessageWarningOK(txt_2_7_validatecl+' '+cl); pMessageWarningOK(txt_2_7_validatecl+' '+cl);
exit; exit;
end; end;
P.Execute; P.Execute;
 End of changes. 335 change blocks. 
656 lines changed or deleted 628 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)