lazbuild: fixed compile and fixed compile file.lpi, issue #35832

git-svn-id: trunk@61573 -
This commit is contained in:
mattias 2019-07-11 21:09:59 +00:00
parent f425014164
commit 9fc9ecc3a0
2 changed files with 36 additions and 35 deletions

View File

@ -49,7 +49,7 @@ uses
ProjectIntf, ObjectInspector, IDEWindowIntf, IDEOptionsIntf, IDEOptEditorIntf, ProjectIntf, ObjectInspector, IDEWindowIntf, IDEOptionsIntf, IDEOptEditorIntf,
ComponentReg, IDEExternToolIntf, MacroDefIntf, SrcEditorIntf, ComponentReg, IDEExternToolIntf, MacroDefIntf, SrcEditorIntf,
// DebuggerIntf // DebuggerIntf
DbgIntfDebuggerBase, GDBMIDebugger, DbgIntfDebuggerBase,
// IDE // IDE
IDEProcs, DialogProcs, LazarusIDEStrConsts, IDETranslations, LazConf, IDEProcs, DialogProcs, LazarusIDEStrConsts, IDETranslations, LazConf,
IDEOptionDefs, TransferMacros, ModeMatrixOpts, Debugger, IDEOptionDefs, TransferMacros, ModeMatrixOpts, Debugger,

View File

@ -368,8 +368,13 @@ begin
Result:=false; Result:=false;
OriginalFilename:=FileName; OriginalFilename:=FileName;
Filename:=CleanAndExpandFilename(Filename);
if not FileExistsUTF8(Filename) then
begin
// File doesn't exist.
// Check for packages if the specified name is a valid identifier // Check for packages if the specified name is a valid identifier
debugln(['TLazBuildApplication.BuildFile ',OriginalFilename]); //debugln(['TLazBuildApplication.BuildFile ',OriginalFilename]);
if IsValidPkgName(OriginalFileName) then begin if IsValidPkgName(OriginalFileName) then begin
if PackageAction=lpaAddPkgLinks then begin if PackageAction=lpaAddPkgLinks then begin
Error(ErrorFileNotFound,'lpk file expected, but '+OriginalFilename+' found'); Error(ErrorFileNotFound,'lpk file expected, but '+OriginalFilename+' found');
@ -401,10 +406,6 @@ begin
end; end;
end; end;
Filename:=CleanAndExpandFilename(Filename);
if not FileExistsUTF8(Filename) then
begin
// File is not an identifier and doesn't exist.
Error(ErrorFileNotFound, 'file not found: '+OriginalFilename); Error(ErrorFileNotFound, 'file not found: '+OriginalFilename);
Exit; Exit;
end end