mirror of
https://github.com/doublecmd/doublecmd.git
synced 2026-06-21 09:58:13 +00:00
Merge 71cbbeb71b into 9add69adef
This commit is contained in:
commit
cfd6d75d83
3 changed files with 224 additions and 134 deletions
|
|
@ -4,7 +4,7 @@ Description=7-Zip - www.7-zip.org
|
|||
ID=37 7A BC AF 27 1C
|
||||
IDPos=0
|
||||
Archiver=7zz
|
||||
FallBackArchivers=7zzs,7za,7z
|
||||
FallBackArchivers=7zz,7zzs,7za,7z
|
||||
Start=^-------------------
|
||||
End=^-------------------
|
||||
Format0=yyyy tt dd hh mm ss aaaaa zzzzzzzzzzzz pppppppppppp n+
|
||||
|
|
@ -23,7 +23,7 @@ Debug=0
|
|||
|
||||
[7Z (ro)]
|
||||
Archiver=7zz
|
||||
FallBackArchivers=7zzs,7z
|
||||
FallBackArchivers=7zz,7zzs,7z
|
||||
Description=7-Zip - www.7-zip.org (read-only addon)
|
||||
Extension=cab,z,taz,lzh,lha,iso,wim,swm,dmg,xar,hfs,ntfs,fat,vhd,mbr
|
||||
Start=^-------------------
|
||||
|
|
@ -45,7 +45,7 @@ Description=ACE v2.0.4
|
|||
Extension=ace
|
||||
Start=^Date
|
||||
End=^listed:
|
||||
Format0=dd.tt.yy│hh:mm│ppppppppppp│zzzzzzzzz│ │ n+
|
||||
Format0=dd tt yy hh mm ppppppppppp zzzzzzzzz n+
|
||||
List=%P v -y %AQ
|
||||
Extract=%P x -y {-p%W} {%S} %AQ @%LQA
|
||||
ExtractWithoutPath=%P e -y {-p%W} {%S} %AQ @%LQA
|
||||
|
|
@ -66,7 +66,7 @@ Extension=arj
|
|||
Start=^------------
|
||||
End=^------------
|
||||
Format0=* n+
|
||||
Format1=???????????? zzzzzzzzzz pppppppppp yy-tt-dd hh:mm:ss aaaaaa
|
||||
Format1=???????????? zzzzzzzzzz pppppppppp yy tt dd hh mm ss aaaaaa
|
||||
Format2=?
|
||||
Format3=?
|
||||
List=%P v %AQ
|
||||
|
|
@ -86,12 +86,12 @@ IDSeekRange=0
|
|||
Extension=zpaq
|
||||
Start=
|
||||
End=shown
|
||||
Format0=- yyyy-tt-dd hh:mm:ss$z+$aaaaa$n+
|
||||
Format0=? yyyy tt dd hh mm ss$z+$aaaaa$n+
|
||||
List=%P l %AQ
|
||||
Extract=%P x %AQ {%S} {-key %W}
|
||||
ExtractWithoutPath=
|
||||
Test=%P l %AQ -test
|
||||
Add=%P a %AQ %FQU {%S} {-key %W}
|
||||
Add=%P a %AQ %FQ {%S} {-key %W}
|
||||
FormMode=1
|
||||
Enabled=0
|
||||
Output=0
|
||||
|
|
@ -106,15 +106,15 @@ IDSeekRange=
|
|||
Extension=arc
|
||||
Start=^--
|
||||
End=^--
|
||||
Format0=yyyy tt dd hh mm ss aaaaaaa zzzzzzzzzzzzzzz ppppppppppppppp rrrrrrrr n+
|
||||
Format0=yyyy tt dd hh mm ss aaaaaaa zzzzzzzzzzzzzzz ppppppppppppppp ???????? n+
|
||||
List=%P v --noarcext -- %AQ
|
||||
Extract=%P x {-p%W} -y --noarcext -sclANSI -- %AQ @%LA
|
||||
ExtractWithoutPath=%P e {-p%W} -y --noarcext -sclANSI -- %AQ @%LA
|
||||
Test=%P t --noarcext -sclANSI -- %AQ
|
||||
Delete=%P d --noarcext -sclANSI -- %AQ @%LA
|
||||
Add=%P a {-p%W} {-ap%RQA} --noarcext -sclANSI {%S} -- %AQ @%LA
|
||||
AddSelfExtract=%P a {-p%W} {-ap%RQA} -sfx --noarcext -sclANSI {%S} -- %AQ @%LA
|
||||
PasswordQuery=
|
||||
Extract=%P x {-p%W} -y --noarcext -sclUTF8 -- %AQ @%LQU
|
||||
ExtractWithoutPath=%P e {-p%W} -y --noarcext -sclUTF8 -- %AQ @%LQU
|
||||
Test=%P t --noarcext -sclUTF8 -- %AQ
|
||||
Delete=%P d --noarcext -sclUTF8 -- %AQ @%LQU
|
||||
Add=%P a {-p%W} {-ap%RQ} --noarcext -sclUTF8 {%S} -- %AQ @%LQU
|
||||
AddSelfExtract=%P a {-p%W} {-ap%RQ} -sfx --noarcext -sclUTF8 {%S} -- %AQ @%LQU
|
||||
PasswordQuery=Enter decryption password:
|
||||
FormMode=0
|
||||
Enabled=0
|
||||
Output=0
|
||||
|
|
|
|||
|
|
@ -743,7 +743,7 @@ begin
|
|||
SaveArchiverDialog.FileName := rsOptArchiverDefaultExportFilename;
|
||||
if SaveArchiverDialog.Execute then
|
||||
begin
|
||||
ExportedMultiArcList.SaveToFile(SaveArchiverDialog.FileName);
|
||||
ExportedMultiArcList.SaveToFile(SaveArchiverDialog.FileName, True);
|
||||
msgOK(Format(rsOptArchiverExportDone, [ExportedMultiArcList.Count, SaveArchiverDialog.FileName]));
|
||||
end;
|
||||
end;
|
||||
|
|
@ -773,7 +773,7 @@ begin
|
|||
begin
|
||||
ImportedMultiArcList := TMultiArcList.Create;
|
||||
try
|
||||
ImportedMultiArcList.LoadFromFile(OpenArchiverDialog.FileName);
|
||||
ImportedMultiArcList.LoadFromFile(OpenArchiverDialog.FileName, True);
|
||||
if ImportedMultiArcList.Count > 0 then
|
||||
begin
|
||||
slValueList := TStringList.Create;
|
||||
|
|
|
|||
|
|
@ -39,6 +39,18 @@ const
|
|||
MAF_UNIX_ATTR = 4; // Use Unix file attributes
|
||||
MAF_WIN_ATTR = 8; // Use Windows file attributes
|
||||
|
||||
MA_CONF_VER = 1;
|
||||
{$IF DEFINED(MSWINDOWS)}
|
||||
MA_PLATFORM = 1;
|
||||
{$ELSEIF DEFINED(DARWIN)}
|
||||
MA_PLATFORM = 2;
|
||||
{$ELSEIF DEFINED(HAIKU)}
|
||||
MA_PLATFORM = 3;
|
||||
{$ELSEIF DEFINED(UNIX)}
|
||||
MA_PLATFORM = 4;
|
||||
{$ELSE}
|
||||
MA_PLATFORM = 0;
|
||||
{$ENDIF}
|
||||
type
|
||||
TMultiArcFlag = (mafFileNameList, mafHide);
|
||||
TMultiArcFlags = set of TMultiArcFlag;
|
||||
|
|
@ -165,8 +177,9 @@ type
|
|||
destructor Destroy; override;
|
||||
procedure AutoConfigure;
|
||||
procedure Clear;
|
||||
procedure LoadFromFile(const FileName: String);
|
||||
procedure SaveToFile(const FileName: String);
|
||||
procedure ConfigureItem(MultiArcItem: TMultiArcItem);
|
||||
procedure LoadFromFile(const FileName: String; Import: Boolean = False);
|
||||
procedure SaveToFile(const FileName: String; Export: Boolean = False);
|
||||
function Add(const S: String; aMultiArcItem: TMultiArcItem): Integer;
|
||||
function Insert(Index: integer; const S: string; aMultiArcItem: TMultiArcItem): integer;
|
||||
function Clone: TMultiArcList;
|
||||
|
|
@ -181,7 +194,7 @@ implementation
|
|||
|
||||
uses
|
||||
crc, LCLProc, StrUtils, Math, FileUtil, DCClassesUtf8, uDCUtils, DCOSUtils,
|
||||
DCStrUtils;
|
||||
DCStrUtils, uGlobs, uGlobsPaths;
|
||||
|
||||
{ TArchiveItem }
|
||||
|
||||
|
|
@ -238,36 +251,46 @@ begin
|
|||
inherited Destroy;
|
||||
end;
|
||||
|
||||
procedure TMultiArcList.AutoConfigure;
|
||||
procedure TMultiArcList.ConfigureItem(MultiArcItem: TMultiArcItem);
|
||||
var
|
||||
I, J: Integer;
|
||||
I: Integer;
|
||||
ExePath: String;
|
||||
AExeList: TStringArray;
|
||||
begin
|
||||
for I:= 0 to Count - 1 do
|
||||
with MultiArcItem do
|
||||
begin
|
||||
ExePath:= Items[I].FArchiver;
|
||||
ExePath:= FArchiver;
|
||||
if not mbFileExists(ReplaceEnvVars(ExePath)) then
|
||||
ExePath:= FindDefaultExecutablePath(ExePath);
|
||||
if (ExePath = EmptyStr) and (Items[I].FFallBack <> EmptyStr) then
|
||||
if (ExePath = EmptyStr) and (FFallBack <> EmptyStr) then
|
||||
begin
|
||||
AExeList:= SplitString(Items[I].FFallBack, ',');
|
||||
for J:= Low(AExeList) to High(AExeList) do
|
||||
AExeList:= SplitString(FFallBack, ',');
|
||||
for I:= Low(AExeList) to High(AExeList) do
|
||||
begin
|
||||
if not mbFileExists(FixExeExt(ReplaceEnvVars(AExeList[J]))) then
|
||||
ExePath:= FindDefaultExecutablePath(FixExeExt(AExeList[J]))
|
||||
if not mbFileExists(FixExeExt(ReplaceEnvVars(AExeList[I]))) then
|
||||
ExePath:= FindDefaultExecutablePath(FixExeExt(AExeList[I]))
|
||||
else
|
||||
ExePath:= FixExeExt(AExeList[J]);
|
||||
ExePath:= FixExeExt(AExeList[I]);
|
||||
if ExePath <> EmptyStr then break;
|
||||
end;
|
||||
end;
|
||||
if ExePath = EmptyStr then
|
||||
Items[I].FEnabled:= False
|
||||
FEnabled:= False
|
||||
else
|
||||
begin
|
||||
Items[I].FArchiver:= ExePath;
|
||||
Items[I].FEnabled:= True;
|
||||
end;
|
||||
begin
|
||||
FArchiver:= ExePath;
|
||||
FEnabled:= True;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TMultiArcList.AutoConfigure;
|
||||
var
|
||||
I: Integer;
|
||||
begin
|
||||
for I:= 0 to Count - 1 do
|
||||
begin
|
||||
ConfigureItem(Items[I]);
|
||||
end;
|
||||
end;
|
||||
|
||||
|
|
@ -284,98 +307,146 @@ begin
|
|||
end;
|
||||
end;
|
||||
|
||||
procedure TMultiArcList.LoadFromFile(const FileName: String);
|
||||
procedure TMultiArcList.LoadFromFile(const FileName: String; Import: Boolean = False);
|
||||
var
|
||||
I, J: Integer;
|
||||
IniFile: TIniFileEx = nil;
|
||||
Sections: TStringList = nil;
|
||||
Section,
|
||||
Format, CustomParams: String;
|
||||
ID, Version: Integer;
|
||||
FirstTime: Boolean = True;
|
||||
MultiArcItem: TMultiArcItem;
|
||||
procedure LoadAddons(FileName: String; Configure: Boolean = False);
|
||||
var
|
||||
I, J: Integer;
|
||||
IniFile: TIniFileEx = nil;
|
||||
Sections: TStringList = nil;
|
||||
Section,
|
||||
Format, CustomParams: String;
|
||||
begin
|
||||
IniFile:= TIniFileEx.Create(FileName, fmOpenRead);
|
||||
try
|
||||
Sections:= TStringList.Create;
|
||||
IniFile.ReadSections(Sections);
|
||||
for I:= 0 to Sections.Count - 1 do
|
||||
begin
|
||||
Section:= Sections[I];
|
||||
if SameText(Section, 'MultiArc') then
|
||||
begin
|
||||
FirstTime:= IniFile.ReadBool(Section, 'FirstTime', True);
|
||||
Version:= IniFile.ReadInteger(Section, 'Version', 0);
|
||||
ID:= IniFile.ReadInteger(Section, 'PlatformID', -1);
|
||||
Continue;
|
||||
end;
|
||||
MultiArcItem:= TMultiArcItem.Create;
|
||||
with MultiArcItem do
|
||||
begin
|
||||
FPacker:= Section;
|
||||
FArchiver:= FixExeExt(TrimQuotes(IniFile.ReadString(Section, 'Archiver', EmptyStr)));
|
||||
FDescription:= TrimQuotes(IniFile.ReadString(Section, 'Description', EmptyStr));
|
||||
FID:= TrimQuotes(IniFile.ReadString(Section, 'ID', EmptyStr));
|
||||
FIDPos:= TrimQuotes(IniFile.ReadString(Section, 'IDPos', EmptyStr));
|
||||
FIDSeekRange:= IniFile.ReadString(Section, 'IDSeekRange', EmptyStr);
|
||||
FExtension:= TrimQuotes(IniFile.ReadString(Section, 'Extension', EmptyStr));
|
||||
FStart:= TrimQuotes(IniFile.ReadString(Section, 'Start', EmptyStr));
|
||||
FEnd:= TrimQuotes(IniFile.ReadString(Section, 'End', EmptyStr));
|
||||
for J:= 0 to 50 do
|
||||
begin
|
||||
Format:= IniFile.ReadString(Section, 'Format' + IntToStr(J), EmptyStr);
|
||||
if Format <> EmptyStr then
|
||||
begin
|
||||
Format:= TrimQuotes(Format);
|
||||
if Import then
|
||||
begin
|
||||
// mvv build stuff
|
||||
Format:= ReplaceStr(Format, ' +', '$');
|
||||
Format:= ReplaceStr(Format, 'n++', 'n+');
|
||||
end;
|
||||
FFormat.Add(Format)
|
||||
end
|
||||
else
|
||||
Break;
|
||||
end;
|
||||
FList:= IniFile.ReadString(Section, 'List', EmptyStr);
|
||||
FExtract:= IniFile.ReadString(Section, 'ExtractWithPath', EmptyStr);
|
||||
if FExtract <> EmptyStr then
|
||||
// tc addon
|
||||
FExtractWithoutPath:= IniFile.ReadString(Section, 'Extract', EmptyStr)
|
||||
else
|
||||
begin
|
||||
FExtract:= IniFile.ReadString(Section, 'Extract', EmptyStr);
|
||||
FExtractWithoutPath:= IniFile.ReadString(Section, 'ExtractWithoutPath', EmptyStr);
|
||||
end;
|
||||
FTest:= IniFile.ReadString(Section, 'Test', EmptyStr);
|
||||
FDelete:= IniFile.ReadString(Section, 'Delete', EmptyStr);
|
||||
FAdd:= IniFile.ReadString(Section, 'Add', EmptyStr);
|
||||
FAddSelfExtract:= IniFile.ReadString(Section, 'AddSelfExtract', EmptyStr);
|
||||
FPasswordQuery:= TrimQuotes(IniFile.ReadString(Section, 'PasswordQuery', EmptyStr));
|
||||
// optional
|
||||
for J:= 0 to 50 do
|
||||
begin
|
||||
Format:= TrimQuotes(IniFile.ReadString(Section, 'IgnoreString' + IntToStr(J), EmptyStr));
|
||||
if Format <> EmptyStr then
|
||||
FIgnoreString.Add(Format)
|
||||
else
|
||||
Break;
|
||||
end;
|
||||
for J:= 0 to 50 do
|
||||
begin
|
||||
CustomParams:= TrimQuotes(IniFile.ReadString(Section, 'AskHistory' + IntToStr(J), EmptyStr));
|
||||
if CustomParams <> EmptyStr then
|
||||
FAskHistory.Add(CustomParams)
|
||||
else
|
||||
Break;
|
||||
end;
|
||||
FSizeStripChars:= TrimQuotes(IniFile.ReadString(Section, 'SizeStripChars', EmptyStr));
|
||||
FFlags:= TMultiArcFlags(IniFile.ReadInteger(Section, 'Flags', 0));
|
||||
FFormMode:= IniFile.ReadInteger(Section, 'FormMode', 0);
|
||||
FEnabled:= IniFile.ReadBool(Section, 'Enabled', True);
|
||||
FOutput:= IniFile.ReadBool(Section, 'Output', False);
|
||||
FDebug:= IniFile.ReadBool(Section, 'Debug', False);
|
||||
FFallBack:= IniFile.ReadString(Section, 'FallBackArchivers', EmptyStr);
|
||||
if Import then
|
||||
begin
|
||||
FList:= TrimQuotes(FList);
|
||||
FExtract:= TrimQuotes(FExtract);
|
||||
FExtractWithoutPath:= TrimQuotes(FExtractWithoutPath);
|
||||
FAdd:= TrimQuotes(FAdd);
|
||||
FAddSelfExtract:= TrimQuotes(FAddSelfExtract);
|
||||
FDelete:= TrimQuotes(FDelete);
|
||||
FTest:= TrimQuotes(FTest);
|
||||
if IniFile.ReadBool(Section, 'UnixPath', False) then
|
||||
FFormMode:= FFormMode or MAF_UNIX_PATH;
|
||||
end;
|
||||
end;
|
||||
if Configure then
|
||||
ConfigureItem(MultiArcItem);
|
||||
FList.AddObject(Section, MultiArcItem);
|
||||
end;
|
||||
finally
|
||||
FreeAndNil(IniFile);
|
||||
FreeAndNil(Sections);
|
||||
end;
|
||||
end;
|
||||
begin
|
||||
Self.Clear;
|
||||
IniFile:= TIniFileEx.Create(FileName, fmOpenRead);
|
||||
LoadAddons(FileName);
|
||||
try
|
||||
Sections:= TStringList.Create;
|
||||
IniFile.ReadSections(Sections);
|
||||
for I:= 0 to Sections.Count - 1 do
|
||||
if FirstTime or (ID <> MA_PLATFORM) then
|
||||
begin
|
||||
Section:= Sections[I];
|
||||
if SameText(Section, 'MultiArc') then
|
||||
begin
|
||||
FirstTime:= IniFile.ReadBool(Section, 'FirstTime', True);
|
||||
Continue;
|
||||
end;
|
||||
MultiArcItem:= TMultiArcItem.Create;
|
||||
with MultiArcItem do
|
||||
begin
|
||||
FPacker:= Section;
|
||||
FArchiver:= FixExeExt(TrimQuotes(IniFile.ReadString(Section, 'Archiver', EmptyStr)));
|
||||
FDescription:= TrimQuotes(IniFile.ReadString(Section, 'Description', EmptyStr));
|
||||
FID:= TrimQuotes(IniFile.ReadString(Section, 'ID', EmptyStr));
|
||||
FIDPos:= TrimQuotes(IniFile.ReadString(Section, 'IDPos', EmptyStr));
|
||||
FIDSeekRange:= IniFile.ReadString(Section, 'IDSeekRange', EmptyStr);
|
||||
FExtension:= TrimQuotes(IniFile.ReadString(Section, 'Extension', EmptyStr));
|
||||
FStart:= TrimQuotes(IniFile.ReadString(Section, 'Start', EmptyStr));
|
||||
FEnd:= TrimQuotes(IniFile.ReadString(Section, 'End', EmptyStr));
|
||||
for J:= 0 to 50 do
|
||||
begin
|
||||
Format:= TrimQuotes(IniFile.ReadString(Section, 'Format' + IntToStr(J), EmptyStr));
|
||||
if Format <> EmptyStr then
|
||||
FFormat.Add(Format)
|
||||
else
|
||||
Break;
|
||||
end;
|
||||
FList:= TrimQuotes(IniFile.ReadString(Section, 'List', EmptyStr));
|
||||
FExtract:= TrimQuotes(IniFile.ReadString(Section, 'Extract', EmptyStr));
|
||||
FExtractWithoutPath:= TrimQuotes(IniFile.ReadString(Section, 'ExtractWithoutPath', EmptyStr));
|
||||
FTest:= TrimQuotes(IniFile.ReadString(Section, 'Test', EmptyStr));
|
||||
FDelete:= TrimQuotes(IniFile.ReadString(Section, 'Delete', EmptyStr));
|
||||
FAdd:= TrimQuotes(IniFile.ReadString(Section, 'Add', EmptyStr));
|
||||
FAddSelfExtract:= TrimQuotes(IniFile.ReadString(Section, 'AddSelfExtract', EmptyStr));
|
||||
FPasswordQuery:= IniFile.ReadString(Section, 'PasswordQuery', EmptyStr);
|
||||
// optional
|
||||
for J:= 0 to 50 do
|
||||
begin
|
||||
Format:= IniFile.ReadString(Section, 'IgnoreString' + IntToStr(J), EmptyStr);
|
||||
if Format <> EmptyStr then
|
||||
FIgnoreString.Add(Format)
|
||||
else
|
||||
Break;
|
||||
end;
|
||||
for J:= 0 to 50 do
|
||||
begin
|
||||
CustomParams:= IniFile.ReadString(Section, 'AskHistory' + IntToStr(J), EmptyStr);
|
||||
if CustomParams <> EmptyStr then
|
||||
FAskHistory.Add(CustomParams)
|
||||
else
|
||||
Break;
|
||||
end;
|
||||
FFlags:= TMultiArcFlags(IniFile.ReadInteger(Section, 'Flags', 0));
|
||||
FSizeStripChars:= Trim(IniFile.ReadString(Section, 'SizeStripChars', EmptyStr));
|
||||
FFormMode:= IniFile.ReadInteger(Section, 'FormMode', 0);
|
||||
FEnabled:= IniFile.ReadBool(Section, 'Enabled', True);
|
||||
FOutput:= IniFile.ReadBool(Section, 'Output', False);
|
||||
FDebug:= IniFile.ReadBool(Section, 'Debug', False);
|
||||
FFallBack:= IniFile.ReadString(Section, 'FallBackArchivers', EmptyStr);
|
||||
end;
|
||||
FList.AddObject(Section, MultiArcItem);
|
||||
AutoConfigure;
|
||||
if not Import then SaveToFile(FileName);
|
||||
end;
|
||||
if FirstTime then
|
||||
try
|
||||
AutoConfigure;
|
||||
SaveToFile(FileName);
|
||||
except
|
||||
// Ignore
|
||||
if not Import and (MA_CONF_VER > Version) then
|
||||
begin
|
||||
SaveToFile(FileName + '.bak', True);
|
||||
LoadAddons(gpExePath + 'default' + PathDelim + sMULTIARC_FILENAME, True);
|
||||
SaveToFile(FileName); // just to replace duplicates
|
||||
Self.Clear;
|
||||
LoadAddons(FileName); // e - efficiency
|
||||
end;
|
||||
finally
|
||||
FreeAndNil(IniFile);
|
||||
FreeAndNil(Sections);
|
||||
except
|
||||
// Ignore
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TMultiArcList.SaveToFile(const FileName: String);
|
||||
procedure TMultiArcList.SaveToFile(const FileName: String; Export: Boolean = False);
|
||||
var
|
||||
I, J: Integer;
|
||||
IniFile: TIniFileEx;
|
||||
|
|
@ -392,42 +463,61 @@ begin
|
|||
begin
|
||||
IniFile.WriteString(Section, 'Archiver', FArchiver);
|
||||
IniFile.WriteString(Section, 'Description', FDescription);
|
||||
IniFile.WriteString(Section, 'ID', FID);
|
||||
IniFile.WriteString(Section, 'IDPos', FIDPos);
|
||||
IniFile.WriteString(Section, 'IDSeekRange', FIDSeekRange);
|
||||
if FID <> EmptyStr then
|
||||
IniFile.WriteString(Section, 'ID', FID);
|
||||
if FIDPos <> EmptyStr then
|
||||
IniFile.WriteString(Section, 'IDPos', FIDPos);
|
||||
if FIDSeekRange <> EmptyStr then
|
||||
IniFile.WriteString(Section, 'IDSeekRange', FIDSeekRange);
|
||||
IniFile.WriteString(Section, 'Extension', FExtension);
|
||||
IniFile.WriteString(Section, 'Start', FStart);
|
||||
IniFile.WriteString(Section, 'End', FEnd);
|
||||
if FStart <> EmptyStr then
|
||||
IniFile.WriteString(Section, 'Start', '"' + FStart + '"');
|
||||
if FEnd <> EmptyStr then
|
||||
IniFile.WriteString(Section, 'End', '"' + FEnd + '"');
|
||||
for J:= 0 to FFormat.Count - 1 do
|
||||
begin
|
||||
IniFile.WriteString(Section, 'Format' + IntToStr(J), FFormat[J]);
|
||||
IniFile.WriteString(Section, 'Format' + IntToStr(J), '"' + FFormat[J] + '"');
|
||||
end;
|
||||
IniFile.WriteString(Section, 'List', FList);
|
||||
IniFile.WriteString(Section, 'Extract', FExtract);
|
||||
IniFile.WriteString(Section, 'ExtractWithoutPath', FExtractWithoutPath);
|
||||
IniFile.WriteString(Section, 'Test', FTest);
|
||||
IniFile.WriteString(Section, 'Delete', FDelete);
|
||||
IniFile.WriteString(Section, 'Add', FAdd);
|
||||
IniFile.WriteString(Section, 'AddSelfExtract', FAddSelfExtract);
|
||||
IniFile.WriteString(Section, 'PasswordQuery', FPasswordQuery);
|
||||
if FList <> EmptyStr then
|
||||
IniFile.WriteString(Section, 'List', FList);
|
||||
if FExtract <> EmptyStr then
|
||||
IniFile.WriteString(Section, 'Extract', FExtract);
|
||||
if FExtractWithoutPath <> EmptyStr then
|
||||
IniFile.WriteString(Section, 'ExtractWithoutPath', FExtractWithoutPath);
|
||||
if FTest <> EmptyStr then
|
||||
IniFile.WriteString(Section, 'Test', FTest);
|
||||
if FDelete <> EmptyStr then
|
||||
IniFile.WriteString(Section, 'Delete', FDelete);
|
||||
if FAdd <> EmptyStr then
|
||||
IniFile.WriteString(Section, 'Add', FAdd);
|
||||
if FAddSelfExtract <> EmptyStr then
|
||||
IniFile.WriteString(Section, 'AddSelfExtract', FAddSelfExtract);
|
||||
if FPasswordQuery <> EmptyStr then
|
||||
IniFile.WriteString(Section, 'PasswordQuery', '"' + FPasswordQuery + '"');
|
||||
// optional
|
||||
for J:= 0 to FIgnoreString.Count - 1 do
|
||||
IniFile.WriteString(Section, 'IgnoreString' + IntToStr(J), FIgnoreString[J]);
|
||||
for J:= 0 to FAskHistory.Count - 1 do
|
||||
begin
|
||||
IniFile.WriteString(Section, 'AskHistory' + IntToStr(J), FAskHistory[J]);
|
||||
end;
|
||||
IniFile.WriteInteger(Section, 'Flags', Integer(FFlags));
|
||||
IniFile.WriteString(Section, 'SizeStripChars', FSizeStripChars);
|
||||
IniFile.WriteInteger(Section, 'FormMode', FFormMode);
|
||||
IniFile.WriteBool(Section, 'Enabled', FEnabled);
|
||||
IniFile.WriteBool(Section, 'Output', FOutput);
|
||||
IniFile.WriteBool(Section, 'Debug', FDebug);
|
||||
if FFallBack <> EmptyStr then
|
||||
IniFile.WriteString(Section, 'FallBackArchivers', FFallBack);
|
||||
for J:= 0 to FIgnoreString.Count - 1 do
|
||||
IniFile.WriteString(Section, 'IgnoreString' + IntToStr(J), '"' + FIgnoreString[J] + '"');
|
||||
for J:= 0 to FAskHistory.Count - 1 do
|
||||
IniFile.WriteString(Section, 'AskHistory' + IntToStr(J), FAskHistory[J]);
|
||||
if FSizeStripChars <> EmptyStr then
|
||||
IniFile.WriteString(Section, 'SizeStripChars', '"' + FSizeStripChars + '"');
|
||||
IniFile.WriteInteger(Section, 'Flags', Integer(FFlags));
|
||||
IniFile.WriteInteger(Section, 'FormMode', FFormMode);
|
||||
IniFile.WriteBool(Section, 'Enabled', FEnabled);
|
||||
if FOutput then
|
||||
IniFile.WriteBool(Section, 'Output', FOutput);
|
||||
if FDebug then
|
||||
IniFile.WriteBool(Section, 'Debug', FDebug);
|
||||
end;
|
||||
end;
|
||||
IniFile.WriteBool('MultiArc', 'FirstTime', False);
|
||||
if not Export then
|
||||
begin
|
||||
IniFile.WriteBool('MultiArc', 'FirstTime', False);
|
||||
IniFile.WriteInteger('MultiArc', 'Version', MA_CONF_VER);
|
||||
IniFile.WriteInteger('MultiArc', 'PlatformID', MA_PLATFORM);
|
||||
end;
|
||||
IniFile.UpdateFile;
|
||||
finally
|
||||
IniFile.Free;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue