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