Merge branch 'IdeConfig/GetSkipCheckByKey' into 'main'

IdeConfig: Always check the skcAll key in GetSkipCheckByKey function

See merge request freepascal.org/lazarus/lazarus!446
This commit is contained in:
Maxim Ganetsky 2025-03-05 22:40:24 +03:00
commit 83bb987de7
5 changed files with 12 additions and 18 deletions

View File

@ -31,7 +31,7 @@ begin
if not EMSSupported then {%H-}exit; if not EMSSupported then {%H-}exit;
if not (GetSkipCheckByKey('MacroScript') or GetSkipCheckByKey('All')) then begin if not GetSkipCheckByKey('MacroScript') then begin
conf := GetEMSConf; conf := GetEMSConf;
try try

View File

@ -743,7 +743,7 @@ var
I: Integer; I: Integer;
begin begin
FForceNewInstance := CheckParamsForForceNewInstanceOpt; FForceNewInstance := CheckParamsForForceNewInstanceOpt;
FSkipAllChecks := GetSkipCheck(skcUniqueInstance) or GetSkipCheck(skcAll); FSkipAllChecks := GetSkipCheck(skcUniqueInstance);
//get cmd line filenames //get cmd line filenames
FFilesToOpen := ExtractCmdLineFilenames; FFilesToOpen := ExtractCmdLineFilenames;

View File

@ -1301,7 +1301,7 @@ begin
end; end;
end end
else else
if (not (GetSkipCheck(skcLastCalled) or GetSkipCheck(skcAll)) ) and if (not GetSkipCheck(skcLastCalled)) and
(CompareFilenames(LastCalled,CurPrgName)<>0) and (CompareFilenames(LastCalled,CurPrgName)<>0) and
(CompareFilenames(LastCalled,AltPrgName)<>0) and (CompareFilenames(LastCalled,AltPrgName)<>0) and
(CompareFilenames(CurPrgName,AltPrgName)<>0) // we can NOT check, if we only have the path inside the PCP (CompareFilenames(CurPrgName,AltPrgName)<>0) // we can NOT check, if we only have the path inside the PCP
@ -1434,7 +1434,7 @@ begin
ShowSetupDialog:=true; ShowSetupDialog:=true;
{$ENDIF} {$ENDIF}
SkipAllTests := GetSkipCheck(skcSetup) or GetSkipCheck(skcAll); SkipAllTests := GetSkipCheck(skcSetup);
// check lazarus directory // check lazarus directory
if (not ShowSetupDialog) if (not ShowSetupDialog)

View File

@ -289,24 +289,18 @@ end;
function GetSkipCheckByKey(AKey: String): Boolean; function GetSkipCheckByKey(AKey: String): Boolean;
var var
i: integer; i: integer;
AValue: string; AAll, AValue: string;
begin begin
// return language specified in command line (empty string if no language specified) AAll := ','+UpperCase(SkipChecksKeys[skcAll])+',';
Result := False;
AKey := ','+UpperCase(AKey)+','; AKey := ','+UpperCase(AKey)+',';
AValue := ''; for i := 1 to ParamsAndCfgCount do
i := 1; if ParamIsOptionPlusValue(i, SkipChecksOptLong, AValue) then
while i <= ParamsAndCfgCount do
begin
if ParamIsOptionPlusValue(i, SkipChecksOptLong, AValue) = true then
begin begin
AValue := ','+UpperCase(AValue)+','; AValue := ','+UpperCase(AValue)+',';
Result := Pos(AKey, AValue) > 0; if Pos(AAll, AValue) > 0 then exit(true);
if Result then if Pos(AKey, AValue) > 0 then exit(true);
exit;
end;
inc(i);
end; end;
result := false;
end; end;
procedure ParseCommandLine(aCmdLineParams: TStrings; out IDEPid: Integer; out procedure ParseCommandLine(aCmdLineParams: TStrings; out IDEPid: Integer; out

View File

@ -1538,7 +1538,7 @@ var
begin begin
StaticPackages:=LazarusPackageIntf.RegisteredPackages; StaticPackages:=LazarusPackageIntf.RegisteredPackages;
if StaticPackages=nil then exit; if StaticPackages=nil then exit;
Quiet:=GetSkipCheck(skcMissingPackageFile) or GetSkipCheck(skcAll); Quiet:=GetSkipCheck(skcMissingPackageFile);
PackageGraph.AbortRegistration:=false; PackageGraph.AbortRegistration:=false;
// register components in Lazarus packages // register components in Lazarus packages
for i:=0 to StaticPackages.Count-1 do begin for i:=0 to StaticPackages.Count-1 do begin