mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-16 10:19:25 +02:00
LazBuild: Support case-insensitive options, including contents of lazarus.cfg, like Lazarus does. Issue #40187.
This commit is contained in:
parent
7dc0983e3c
commit
238e4fb963
@ -194,17 +194,19 @@ procedure FilterConfigFileContent;
|
|||||||
var
|
var
|
||||||
l: TStrings;
|
l: TStrings;
|
||||||
i: Integer;
|
i: Integer;
|
||||||
|
LowerOpt: String;
|
||||||
begin
|
begin
|
||||||
ResetParamsAndCfg;
|
ResetParamsAndCfg;
|
||||||
l := GetCfgFileContent;
|
l := GetCfgFileContent;
|
||||||
if l = nil then exit;
|
if l = nil then exit;
|
||||||
i := l.Count - 1;
|
i := l.Count - 1;
|
||||||
while i >= 0 do begin
|
while i >= 0 do begin
|
||||||
|
LowerOpt := LowerCase(l[i]);
|
||||||
if not(
|
if not(
|
||||||
(copy(l[i], 1, 22) = '--primary-config-path=') or
|
LazStartsStr('--primary-config-path=', LowerOpt) or
|
||||||
(copy(l[i], 1, 24) = '--secondary-config-path=') or
|
LazStartsStr('--secondary-config-path=', LowerOpt) or
|
||||||
(copy(l[i], 1, 6) = '--pcp=') or
|
LazStartsStr('--pcp=', LowerOpt) or
|
||||||
(copy(l[i], 1, 6) = '--scp=')
|
LazStartsStr('--scp=', LowerOpt)
|
||||||
)
|
)
|
||||||
then
|
then
|
||||||
l.Delete(i);
|
l.Delete(i);
|
||||||
@ -1438,6 +1440,7 @@ end;
|
|||||||
constructor TLazBuildApplication.Create(TheOwner: TComponent);
|
constructor TLazBuildApplication.Create(TheOwner: TComponent);
|
||||||
begin
|
begin
|
||||||
inherited Create(TheOwner);
|
inherited Create(TheOwner);
|
||||||
|
CaseSensitiveOptions:=False;
|
||||||
SetupDialogs;
|
SetupDialogs;
|
||||||
Files:=TStringList.Create;
|
Files:=TStringList.Create;
|
||||||
fMaxProcessCount:=-1;
|
fMaxProcessCount:=-1;
|
||||||
|
Loading…
Reference in New Issue
Block a user