lazbuild: nicer error message on lpi file not found

git-svn-id: trunk@55541 -
This commit is contained in:
mattias 2017-07-19 11:34:52 +00:00
parent 37cd692b1f
commit 7da30e1cf2

View File

@ -313,7 +313,7 @@ end;
procedure TLazBuildApplication.PackageGraphAddPackage(Pkg: TLazPackage);
begin
if FileExists(Pkg.FileName) then LazPackageLinks.AddUserLink(Pkg);
if FileExistsUTF8(Pkg.FileName) then LazPackageLinks.AddUserLink(Pkg);
end;
function TLazBuildApplication.PackageGraphCheckInterPkgFiles(
@ -381,12 +381,15 @@ begin
// Initialize package graph with base packages etc:
if not Init then exit;
// Apparently not found, could be a known but not installed package
// Could be a known but not installed package
// so try and get package filename from all other known packages
Package:=TLazPackageLink(LazPackageLinks.FindLinkWithPkgName(OriginalFileName));
if Package=nil then begin
// Not found after everything we tried
Error(ErrorFileNotFound,'package not found: '+OriginalFilename);
if CompareFileExt(Filename,'.lpi')=0 then
Error(ErrorFileNotFound,'file not found: '+OriginalFilename)
else
Error(ErrorFileNotFound,'package not found: '+OriginalFilename);
end
else begin
// We found a package link