mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-23 14:49:10 +02:00
Merged revision(s) 52692 #800f13923b from trunk:
Packager: Don't add unit or include search path '.' when adding a file to a package. ........ git-svn-id: branches/fixes_1_6@52720 -
This commit is contained in:
parent
a941137d15
commit
01f30a52b8
@ -3175,21 +3175,21 @@ var
|
||||
CurUnitPaths: String;
|
||||
r: TModalResult;
|
||||
begin
|
||||
Result:=True;
|
||||
CurUnitPaths:=CompilerOptions.ParsedOpts.GetParsedValue(pcosUnitPath);
|
||||
NewUnitPaths:=RemoveSearchPaths(NewUnitPaths,CurUnitPaths);
|
||||
if NewUnitPaths<>'' then begin
|
||||
NewUnitPaths:=CreateRelativeSearchPath(NewUnitPaths,Directory);
|
||||
r:=IDEMessageDialog(lisExtendUnitPath,
|
||||
Format(lisExtendUnitSearchPathOfPackageWith, [Name, #13,
|
||||
NewUnitPaths]), mtConfirmation, [mbYes, mbNo, mbCancel]);
|
||||
case r of
|
||||
if NewUnitPaths='' then Exit;
|
||||
NewUnitPaths:=CreateRelativeSearchPath(NewUnitPaths,Directory);
|
||||
if NewUnitPaths='.' then Exit;
|
||||
r:=IDEMessageDialog(lisExtendUnitPath,
|
||||
Format(lisExtendUnitSearchPathOfPackageWith, [Name, #13, NewUnitPaths]),
|
||||
mtConfirmation, [mbYes, mbNo, mbCancel]);
|
||||
case r of
|
||||
mrYes: CompilerOptions.OtherUnitFiles:=
|
||||
MergeSearchPaths(CompilerOptions.OtherUnitFiles,NewUnitPaths);
|
||||
mrNo: ;
|
||||
else exit(false);
|
||||
end;
|
||||
else exit(false);
|
||||
end;
|
||||
Result:=true;
|
||||
end;
|
||||
|
||||
function TLazPackage.ExtendIncSearchPath(NewIncPaths: string): boolean;
|
||||
@ -3197,21 +3197,21 @@ var
|
||||
CurIncPaths: String;
|
||||
r: TModalResult;
|
||||
begin
|
||||
Result:=True;
|
||||
CurIncPaths:=CompilerOptions.ParsedOpts.GetParsedValue(pcosIncludePath);
|
||||
NewIncPaths:=RemoveSearchPaths(NewIncPaths,CurIncPaths);
|
||||
if NewIncPaths<>'' then begin
|
||||
NewIncPaths:=CreateRelativeSearchPath(NewIncPaths,Directory);
|
||||
r:=IDEMessageDialog(lisExtendIncludePath,
|
||||
Format(lisExtendIncludeFileSearchPathOfPackageWith, [Name, #13,
|
||||
NewIncPaths]), mtConfirmation, [mbYes, mbNo, mbCancel]);
|
||||
case r of
|
||||
mrYes: CompilerOptions.IncludePath:=
|
||||
MergeSearchPaths(CompilerOptions.IncludePath,NewIncPaths);
|
||||
mrNo: ;
|
||||
else exit(false);
|
||||
end;
|
||||
if NewIncPaths='' then Exit;
|
||||
NewIncPaths:=CreateRelativeSearchPath(NewIncPaths,Directory);
|
||||
if NewIncPaths='.' then Exit;
|
||||
r:=IDEMessageDialog(lisExtendIncludePath,
|
||||
Format(lisExtendIncludeFileSearchPathOfPackageWith, [Name, #13, NewIncPaths]),
|
||||
mtConfirmation, [mbYes, mbNo, mbCancel]);
|
||||
case r of
|
||||
mrYes: CompilerOptions.IncludePath:=
|
||||
MergeSearchPaths(CompilerOptions.IncludePath,NewIncPaths);
|
||||
mrNo: ;
|
||||
else exit(false);
|
||||
end;
|
||||
Result:=true;
|
||||
end;
|
||||
|
||||
function TLazPackage.IndexOfPkgComponent(PkgComponent: TPkgComponent): integer;
|
||||
|
Loading…
Reference in New Issue
Block a user