mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-22 10:59:29 +02:00
lazbuild: made debugln more consistent and easier to distinguish from FPC messages
git-svn-id: trunk@48420 -
This commit is contained in:
parent
b5fe30e1bb
commit
505992f5e4
@ -998,9 +998,9 @@ function MakeRelativeFileList(Files: TStrings; out BaseDir: string): TStringList
|
||||
function Compress1FileList(Files: TStrings): TStringList; // thread-safe
|
||||
function Decompress1FileList(Files: TStrings): TStringList; // thread-safe
|
||||
function RunTool(const Filename: string; Params: TStrings;
|
||||
WorkingDirectory: string = ''): TStringList; // thread-safe
|
||||
WorkingDirectory: string = ''; Quiet: boolean = false): TStringList; // thread-safe
|
||||
function RunTool(const Filename, Params: string;
|
||||
WorkingDirectory: string = ''): TStringList; // thread-safe
|
||||
WorkingDirectory: string = ''; Quiet: boolean = false): TStringList; // thread-safe
|
||||
|
||||
type
|
||||
// fpc parameter effecting search for compiler
|
||||
@ -1296,7 +1296,7 @@ begin
|
||||
end;
|
||||
|
||||
function RunTool(const Filename: string; Params: TStrings;
|
||||
WorkingDirectory: string): TStringList;
|
||||
WorkingDirectory: string; Quiet: boolean): TStringList;
|
||||
var
|
||||
buf: string;
|
||||
TheProcess: TProcessUTF8;
|
||||
@ -1312,7 +1312,7 @@ begin
|
||||
Result:=TStringList.Create;
|
||||
try
|
||||
buf:='';
|
||||
if MainThreadID=GetCurrentThreadId then begin
|
||||
if (MainThreadID=GetCurrentThreadId) and not Quiet then begin
|
||||
DbgOut(['RunTool ',Filename]);
|
||||
for i:=0 to Params.Count-1 do
|
||||
dbgout(' "',Params[i],'"');
|
||||
@ -1362,15 +1362,15 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
function RunTool(const Filename, Params: string;
|
||||
WorkingDirectory: string): TStringList;
|
||||
function RunTool(const Filename, Params: string; WorkingDirectory: string;
|
||||
Quiet: boolean): TStringList;
|
||||
var
|
||||
ParamList: TStringList;
|
||||
begin
|
||||
ParamList:=TStringList.Create;
|
||||
try
|
||||
SplitCmdLineParams(Params,ParamList);
|
||||
Result:=RunTool(Filename,ParamList,WorkingDirectory);
|
||||
Result:=RunTool(Filename,ParamList,WorkingDirectory,Quiet);
|
||||
finally
|
||||
ParamList.Free;
|
||||
end;
|
||||
|
@ -59,7 +59,7 @@ uses
|
||||
LazarusIDEStrConsts, TransferMacros, LazConf, IDEProcs, DialogProcs,
|
||||
MainBar, ExtToolEditDlg, EnvironmentOpts,
|
||||
ApplicationBundle, CompilerOptions, BuildProfileManager,
|
||||
GenericListEditor, GenericCheckList, PackageSystem, PackageDefs;
|
||||
GenericListEditor, GenericCheckList, IDECmdLine, PackageSystem, PackageDefs;
|
||||
|
||||
type
|
||||
|
||||
@ -292,7 +292,7 @@ begin
|
||||
Ext:=LowerCase(ExtractFileExt(FileInfo.Name));
|
||||
if (Ext='.ppu') or (Ext='.o') or (Ext='.rst') or (Ext='.rsj') then begin
|
||||
if not DeleteFileUTF8(Filename) then
|
||||
debugln(['CleanLazarusSrcDir failed to delete file "',Filename,'"']);
|
||||
debugln(['Error : (lazarus) Clean directory: failed to delete file "',Filename,'"']);
|
||||
end;
|
||||
end;
|
||||
until FindNextUTF8(FileInfo)<>0;
|
||||
@ -336,7 +336,7 @@ var
|
||||
begin
|
||||
RevisionIncFile:=AppendPathDelim(EnvironmentOptions.GetParsedLazarusDirectory)+'ide'+PathDelim+'revision.inc';
|
||||
if not FileExistsUTF8(RevisionIncFile) then begin
|
||||
debugln(['Note: revision.inc file missing: ',RevisionIncFile]);
|
||||
debugln(['Note: (lazarus) revision.inc file missing: ',RevisionIncFile]);
|
||||
sl:=TStringList.Create;
|
||||
sl.Add('// Created by lazbuild');
|
||||
sl.Add('const RevisionStr = '''+LazarusVersionStr+''';');
|
||||
@ -344,7 +344,7 @@ begin
|
||||
sl.SaveToFile(RevisionIncFile);
|
||||
except
|
||||
on E: Exception do begin
|
||||
debugln(['Note: can not write ',RevisionIncFile,': ',E.Message]);
|
||||
debugln(['Warning: (lazarus) unable to write ',RevisionIncFile,': ',E.Message]);
|
||||
end;
|
||||
end;
|
||||
sl.Free;
|
||||
@ -357,14 +357,14 @@ var
|
||||
begin
|
||||
if FileExistsUTF8(fTargetFilename) then begin
|
||||
if not DeleteFileUTF8(fTargetFilename) then begin
|
||||
debugln(['Building IDE failed. Can not delete "',fTargetFilename,'"']);
|
||||
debugln(['Error: (lazarus) Building IDE failed. Unable to delete "',fTargetFilename,'"']);
|
||||
exit;
|
||||
end;
|
||||
end;
|
||||
BackupFilename:=GetBackupExeFilename(fTargetFilename);
|
||||
if FileExistsUTF8(BackupFilename) then begin
|
||||
if not RenameFileUTF8(BackupFilename,fTargetFilename) then begin
|
||||
debugln(['Building IDE failed. Can not restore backup file "',BackupFilename,'" to "',fTargetFilename,'"']);
|
||||
debugln(['Error: (lazarus) Building IDE failed. Unable to restore backup file "',BackupFilename,'" to "',fTargetFilename,'"']);
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
@ -614,12 +614,12 @@ begin
|
||||
// Case 1. the user has set a target directory
|
||||
fTargetDir:=fProfile.GetParsedTargetDirectory(fMacros);
|
||||
if fTargetDir='' then begin
|
||||
debugln('CalcTargets macro aborted Options.TargetDirectory=',fProfile.TargetDirectory);
|
||||
debugln('Error: (lazarus) [CalcTargets] error resolving macros in TargetDirectory=',fProfile.TargetDirectory);
|
||||
Exit(mrAbort);
|
||||
end;
|
||||
fUnitOutDir:=AppendPathDelim(fTargetDir)+'units';
|
||||
debugln('CalcTargets TargetDirectory=',fTargetDir);
|
||||
debugln('CalcTargets UnitsTargetDirectory=',fUnitOutDir);
|
||||
debugln('Hint: (lazarus) [CalcTargets] TargetDirectory=',fTargetDir);
|
||||
debugln('Hint: (lazarus) [CalcTargets] UnitsTargetDirectory=',fUnitOutDir);
|
||||
end else begin
|
||||
// no user defined target directory
|
||||
// => find it automatically
|
||||
@ -645,7 +645,7 @@ begin
|
||||
// ppu files to <primary config dir>/units/<fTargetCPU>-<fTargetOS>/<LCLWidgetType>
|
||||
fUnitOutDir:=AppendPathDelim(GetPrimaryConfigPath)+'units'
|
||||
+PathDelim+fTargetCPU+'-'+fTargetOS+PathDelim+TargetLCLPlatform;
|
||||
debugln('CalcTargets Options.TargetOS=',fProfile.FPCTargetOS,' Options.TargetCPU=',
|
||||
debugln('Hint: (lazarus) [CalcTargets] Cross Compiling TargetOS=',fProfile.FPCTargetOS,' TargetCPU=',
|
||||
fProfile.FPCTargetCPU,' CompilerDefaultOS=',fCompilerTargetOS,' CompilerDefaultCPU=',fCompilerTargetCPU);
|
||||
end else begin
|
||||
// -> normal compile for this platform
|
||||
@ -660,7 +660,7 @@ begin
|
||||
// ppu files to <primary config dir>/units/<fTargetCPU>-<fTargetOS>/<LCLWidgetType>
|
||||
fUpdateRevInc:=false;
|
||||
fTargetDir:=AppendPathDelim(GetPrimaryConfigPath)+'bin';
|
||||
debugln('CalcTargets LazDir readonly NewTargetDirectory=',fTargetDir);
|
||||
debugln('Hint: (lazarus) [CalcTargets] Lazarus directory is readonly, using fallback target directory: ',fTargetDir);
|
||||
fUnitOutDir:=AppendPathDelim(GetPrimaryConfigPath)+'units'
|
||||
+PathDelim+fTargetCPU+'-'+fTargetOS+PathDelim+TargetLCLPlatform;
|
||||
end else begin
|
||||
@ -740,38 +740,38 @@ begin
|
||||
// confused which one is the newest
|
||||
if FileExistsUTF8(AltFilename) then begin
|
||||
if DeleteFileUTF8(AltFilename) then
|
||||
debugln(['Note: deleted file "',AltFilename,'"'])
|
||||
debugln(['Note: (lazarus) deleted file "',AltFilename,'"'])
|
||||
else
|
||||
debugln(['WARNING: unable to delete file "',AltFilename,'"']);
|
||||
debugln(['Warning: (lazarus) unable to delete file "',AltFilename,'"']);
|
||||
end;
|
||||
|
||||
// try to rename the old exe
|
||||
BackupFilename:=GetBackupExeFilename(fTargetFilename);
|
||||
if FileExistsUTF8(BackupFilename) then
|
||||
if DeleteFileUTF8(BackupFilename) then begin
|
||||
debugln(['Note: deleted backup "',BackupFilename,'"']);
|
||||
debugln(['Note: (lazarus) deleted backup "',BackupFilename,'"']);
|
||||
end else begin
|
||||
// unable to delete old backup file, maybe an old IDE is still running
|
||||
// => try to backup the backup
|
||||
Backup2Filename:=LeftStr(fTargetFilename,length(fTargetFilename)-length(Ext))+'.old2'+Ext;
|
||||
if FileExistsUTF8(Backup2Filename) then begin
|
||||
if DeleteFileUTF8(Backup2Filename) then
|
||||
debugln(['Note: deleted backup "',Backup2Filename,'"'])
|
||||
debugln(['Note: (lazarus) deleted backup "',Backup2Filename,'"'])
|
||||
else
|
||||
debugln(['WARNING: unable to delete old backup file "'+Backup2Filename+'"']);
|
||||
debugln(['Warning: (lazarus) unable to delete old backup file "'+Backup2Filename+'"']);
|
||||
end;
|
||||
if not FileExistsUTF8(Backup2Filename) then begin
|
||||
if RenameFileUTF8(BackupFilename,Backup2Filename) then
|
||||
debugln(['Note: renamed old backup file "'+BackupFilename+'" to "',Backup2Filename,'"'])
|
||||
debugln(['Note: (lazarus) renamed old backup file "'+BackupFilename+'" to "',Backup2Filename,'"'])
|
||||
else
|
||||
debugln(['WARNING: unable to rename old backup file "'+BackupFilename+'" to "',Backup2Filename,'"']);
|
||||
debugln(['Warning: (lazarus) unable to rename old backup file "'+BackupFilename+'" to "',Backup2Filename,'"']);
|
||||
end;
|
||||
end;
|
||||
if not FileExistsUTF8(BackupFilename) then begin
|
||||
if RenameFileUTF8(fTargetFilename,BackupFilename) then
|
||||
debugln(['Note: renamed file "'+fTargetFilename+'" to "',BackupFilename,'"'])
|
||||
debugln(['Note: (lazarus) renamed file "'+fTargetFilename+'" to "',BackupFilename,'"'])
|
||||
else
|
||||
debugln(['WARNING: unable to rename file "'+fTargetFilename+'" to "',BackupFilename,'"']);
|
||||
debugln(['Warning: (lazarus) unable to rename file "'+fTargetFilename+'" to "',BackupFilename,'"']);
|
||||
end;
|
||||
end;
|
||||
if (not (blfReplaceExe in Flags)) and FileExistsUTF8(fTargetFilename) then
|
||||
@ -789,14 +789,14 @@ begin
|
||||
//debugln(['CreateAppleBundle TargetFile=',fTargetFilename]);
|
||||
Result:=CreateApplicationBundle(fTargetFilename, 'Lazarus');
|
||||
if not (Result in [mrOk,mrIgnore]) then begin
|
||||
debugln(['CreateAppleBundle CreateApplicationBundle failed']);
|
||||
debugln(['Error: (lazarus) unable to create application bundle']);
|
||||
if IDEMessagesWindow<>nil then
|
||||
IDEMessagesWindow.AddCustomMessage(mluError,'to create application bundle '+BundleDir);
|
||||
exit;
|
||||
end;
|
||||
Result:=CreateAppBundleSymbolicLink(fTargetFilename);
|
||||
if not (Result in [mrOk,mrIgnore]) then begin
|
||||
debugln(['CreateAppleBundle CreateAppBundleSymbolicLink failed']);
|
||||
debugln(['Error: (lazarus) unable to create symlink in application bundle: ',fTargetFilename]);
|
||||
if IDEMessagesWindow<>nil then
|
||||
IDEMessagesWindow.AddCustomMessage(mluError,'failed to create application bundle symlink to '+fTargetFilename);
|
||||
exit;
|
||||
@ -1386,7 +1386,7 @@ end;
|
||||
procedure TConfigureBuildLazarusDlg.CleanRadioButtonClick(Sender: TObject);
|
||||
begin
|
||||
CleanCommonCheckBox.Checked:=CleanAllRadioButton.Checked;
|
||||
DebugLn(['TConfigureBuildLazarusDlg.CleanRadioButtonClick: set CleanCommonCheckBox to ', CleanCommonRadioButton.Checked]);
|
||||
//DebugLn(['TConfigureBuildLazarusDlg.CleanRadioButtonClick: set CleanCommonCheckBox to ', CleanCommonRadioButton.Checked]);
|
||||
end;
|
||||
|
||||
procedure TConfigureBuildLazarusDlg.CleanCommonCheckBoxClick(Sender: TObject);
|
||||
@ -1395,7 +1395,7 @@ begin
|
||||
CleanAllRadioButton.Checked:=True
|
||||
else
|
||||
CleanAutoRadioButton.Checked:=True;
|
||||
DebugLn(['TConfigureBuildLazarusDlg.CleanCommonCheckBoxClick: set CleanCommonRadioButton to ', CleanCommonCheckBox.Checked]);
|
||||
//DebugLn(['TConfigureBuildLazarusDlg.CleanCommonCheckBoxClick: set CleanCommonRadioButton to ', CleanCommonCheckBox.Checked]);
|
||||
end;
|
||||
|
||||
end.
|
||||
|
@ -282,7 +282,7 @@ procedure TBuildManager.OnMacroSubstitution(TheMacro: TTransferMacro;
|
||||
begin
|
||||
if TheMacro=nil then begin
|
||||
if ConsoleVerbosity>=0 then
|
||||
DebugLn('WARNING: Macro not defined: "'+MacroName+'".');
|
||||
DebugLn('Warning: (lazarus) Macro not defined: "'+MacroName+'".');
|
||||
{$IFDEF VerboseMacroNotDefined}
|
||||
DumpStack;
|
||||
{$ENDIF}
|
||||
@ -648,12 +648,12 @@ begin
|
||||
if s<>'' then
|
||||
Result:=s;
|
||||
end else begin
|
||||
debugln(['WARNING: [GetFPCFrontEndOptions] ignoring invalid macros in custom options for fpc frontend: "',ExtractFPCFrontEndParameters(FBuildTarget.CompilerOptions.CustomOptions),'"']);
|
||||
debugln(['Warning: (lazarus) [GetFPCFrontEndOptions] ignoring invalid macros in custom options for fpc frontend: "',ExtractFPCFrontEndParameters(FBuildTarget.CompilerOptions.CustomOptions),'"']);
|
||||
end;
|
||||
end;
|
||||
if LazarusIDE<>nil then
|
||||
if not LazarusIDE.CallHandlerGetFPCFrontEndParams(Self,Result) then begin
|
||||
debugln(['WARNING: TBuildManager.GetFPCFrontEndOptions: LazarusIDE.CallHandlerGetFPCFrontEndParams failed Result="',Result,'"']);
|
||||
debugln(['Warning: TBuildManager.GetFPCFrontEndOptions: LazarusIDE.CallHandlerGetFPCFrontEndParams failed Result="',Result,'"']);
|
||||
end;
|
||||
Result:=UTF8Trim(Result);
|
||||
end;
|
||||
@ -786,7 +786,7 @@ procedure TBuildManager.RescanCompilerDefines(ResetBuildTarget,
|
||||
if Cfg=nil then exit(true);
|
||||
if Cfg.RealCompiler='' then begin
|
||||
if ConsoleVerbosity>=0 then
|
||||
debugln(['PPUFilesAndCompilerMatch Compiler=',Cfg.Compiler,' RealComp=',Cfg.RealCompiler,' InPath=',Cfg.RealCompilerInPath]);
|
||||
debugln(['Error: (lazarus) [PPUFilesAndCompilerMatch] Compiler=',Cfg.Compiler,' RealComp=',Cfg.RealCompiler,' InPath=',Cfg.RealCompilerInPath]);
|
||||
IDEMessageDialog(lisCCOErrorCaption, Format(
|
||||
lisCompilerDoesNotSupportTarget, [Cfg.Compiler, Cfg.TargetCPU, Cfg.TargetOS]),
|
||||
mtError,[mbOk]);
|
||||
@ -878,7 +878,7 @@ begin
|
||||
if not IsFPCExecutable(CompilerFilename,FPCExecMsg) then begin
|
||||
Msg+='Environment compiler: "'+CompilerFilename+'": '+FPCExecMsg+#13;
|
||||
end;
|
||||
debugln('WARNING: TBuildManager.RescanCompilerDefines: invalid compiler:');
|
||||
debugln('Warning: (lazarus) [TBuildManager.RescanCompilerDefines]: invalid compiler:');
|
||||
debugln(Msg);
|
||||
if not Quiet then begin
|
||||
IDEMessageDialog('Error','There is no Free Pascal Compiler'
|
||||
@ -1057,7 +1057,7 @@ begin
|
||||
except
|
||||
on E: Exception do begin
|
||||
if ConsoleVerbosity>=0 then
|
||||
debugln(['LoadFPCDefinesCaches Error loadinf file '+aFilename+':'+E.Message]);
|
||||
debugln(['Error: (lazarus) [LoadFPCDefinesCaches] Error reading file '+aFilename+':'+E.Message]);
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
@ -1083,7 +1083,7 @@ begin
|
||||
except
|
||||
on E: Exception do begin
|
||||
if ConsoleVerbosity>=0 then
|
||||
debugln(['LoadFPCDefinesCaches Error loading file '+aFilename+':'+E.Message]);
|
||||
debugln(['Error: (lazarus) [SaveFPCDefinesCaches] Error writing file '+aFilename+':'+E.Message]);
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
@ -1137,7 +1137,7 @@ var
|
||||
|
||||
begin
|
||||
NeedBuildAllFlag:=false;
|
||||
DbgCap:='Project needs building: ';
|
||||
DbgCap:='Hint: (lazarus) Project needs building: ';
|
||||
|
||||
// get main source filename
|
||||
if not AProject.IsVirtual then begin
|
||||
@ -1322,7 +1322,7 @@ begin
|
||||
end;
|
||||
|
||||
if not HasGUI then
|
||||
debugln(['lazbuild: Build Project: nothing to do.']);
|
||||
debugln(['Hint: (lazarus) Build Project: nothing to do.']);
|
||||
Result:=mrNo;
|
||||
end;
|
||||
|
||||
@ -1566,7 +1566,7 @@ begin
|
||||
TListSortCompare(@CompareUnitNameAndUnitFile));
|
||||
if (ANode<>nil) and (not IgnoreAll) then begin
|
||||
if ConsoleVerbosity>=0 then
|
||||
DebugLn(['TBuildManager.CheckUnitPathForAmbiguousPascalFiles CurUnitName="',CurUnitName,'" CurFilename="',CurFilename,'" OtherUnitName="',PUnitFile(ANode.Data)^.FileUnitName,'" OtherFilename="',PUnitFile(ANode.Data)^.Filename,'"']);
|
||||
DebugLn(['Note: (lazarus) [TBuildManager.CheckUnitPathForAmbiguousPascalFiles] CurUnitName="',CurUnitName,'" CurFilename="',CurFilename,'" OtherUnitName="',PUnitFile(ANode.Data)^.FileUnitName,'" OtherFilename="',PUnitFile(ANode.Data)^.Filename,'"']);
|
||||
// pascal unit exists twice
|
||||
Result:=IDEQuestionDialog(lisAmbiguousUnitFound,
|
||||
Format(lisTheUnitExistsTwiceInTheUnitPathOfThe,[CurUnitName,ContextDescription])
|
||||
@ -1855,11 +1855,11 @@ begin
|
||||
Code:=AnUnitInfo.Source;
|
||||
if (Code<>nil) and (Code.DiskEncoding<>EncodingUTF8) then begin
|
||||
if ConsoleVerbosity>=0 then
|
||||
DebugLn(['TBuildManager.UpdateProjectAutomaticFiles fixing encoding of ',Code.Filename,' from ',Code.DiskEncoding,' to ',EncodingUTF8]);
|
||||
DebugLn(['Note: (lazarus) fixing encoding of ',Code.Filename,' from ',Code.DiskEncoding,' to ',EncodingUTF8]);
|
||||
Code.DiskEncoding:=EncodingUTF8;
|
||||
if not Code.Save then begin
|
||||
if ConsoleVerbosity>=0 then
|
||||
DebugLn(['TBuildManager.UpdateProjectAutomaticFiles failed to save file ',Code.Filename]);
|
||||
DebugLn(['Note: (lazarus) [TBuildManager.UpdateProjectAutomaticFiles] failed to save file ',Code.Filename]);
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
@ -1914,20 +1914,20 @@ begin
|
||||
List:=nil;
|
||||
try
|
||||
if ConsoleVerbosity>=0 then
|
||||
debugln(['TBuildManager.MacroFuncInstantFPCCache ',Prog]);
|
||||
List:=RunTool(Prog,'--get-cache');
|
||||
debugln(['Hint: (lazarus) TBuildManager.MacroFuncInstantFPCCache ',Prog]);
|
||||
List:=RunTool(Prog,'--get-cache','',ConsoleVerbosity<0);
|
||||
if (List<>nil) and (List.Count>0) then
|
||||
FMacroInstantFPCCache:=List[0];
|
||||
List.Free;
|
||||
except
|
||||
on E: Exception do begin
|
||||
if ConsoleVerbosity>=0 then
|
||||
debugln(['TBuildManager.MacroFuncInstantFPCCache error running '+Prog+': '+E.Message]);
|
||||
debugln(['Warning: (lazarus) [TBuildManager.MacroFuncInstantFPCCache] error running '+Prog+': '+E.Message]);
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
if ConsoleVerbosity>=0 then
|
||||
debugln(['TBuildManager.MacroFuncInstantFPCCache ',FMacroInstantFPCCache]);
|
||||
debugln(['Hint: (lazarus) [TBuildManager.MacroFuncInstantFPCCache] ',FMacroInstantFPCCache]);
|
||||
end;
|
||||
Result:=FMacroInstantFPCCache;
|
||||
end;
|
||||
@ -1949,7 +1949,7 @@ begin
|
||||
else begin
|
||||
Result:='<Invalid parameter for macro Project:'+Param+'>';
|
||||
if ConsoleVerbosity>=0 then
|
||||
debugln('WARNING: TMainIDE.MacroFuncProject: ',Result);
|
||||
debugln('Warning: (lazarus) [TMainIDE.MacroFuncProject]: ',Result);
|
||||
end;
|
||||
end else begin
|
||||
Result:='';
|
||||
@ -2433,7 +2433,7 @@ begin
|
||||
|
||||
if ParseOpts.MacroValuesParsing then begin
|
||||
if ConsoleVerbosity>=-1 then
|
||||
debugln(['TBuildManager.OnGetBuildMacroValues cycle computing macros of ',dbgsname(Options.Owner)]);
|
||||
debugln(['Warning: (lazarus) [TBuildManager.OnGetBuildMacroValues] cycle computing macros of ',dbgsname(Options.Owner)]);
|
||||
exit;
|
||||
end;
|
||||
|
||||
@ -2449,17 +2449,17 @@ begin
|
||||
Result.Assign(Values);
|
||||
{$IF defined(VerboseBuildMacros) or defined(DebugLCLBaseConditionals)}
|
||||
if (Options.Owner is TLazPackage) and (TLazPackage(Options.Owner).Name='LCLBase') then
|
||||
Result.WriteDebugReport('TPkgManager.OnGetBuildMacroValues before execute: Conditionals="'+dbgstr(Options.Conditionals),'"');
|
||||
Result.WriteDebugReport('TBuildManager.OnGetBuildMacroValues before execute: Conditionals="'+dbgstr(Options.Conditionals),'"');
|
||||
{$ENDIF}
|
||||
if not ParseOpts.MacroValues.Execute(Options.Conditionals) then begin
|
||||
if ConsoleVerbosity>=0 then
|
||||
debugln(['TPkgManager.OnGetBuildMacroValues Error: ',ParseOpts.MacroValues.GetErrorStr(0)]);
|
||||
debugln(['Error: (lazarus) [TBuildManager.OnGetBuildMacroValues] Error: ',ParseOpts.MacroValues.GetErrorStr(0)]);
|
||||
debugln(Options.Conditionals);
|
||||
end;
|
||||
|
||||
{$IFDEF VerboseBuildMacros}
|
||||
if (Options.Owner is TLazPackage) and (TLazPackage(Options.Owner).Name='LCL') then
|
||||
Result.WriteDebugReport('TPkgManager.OnGetBuildMacroValues executed: '+dbgstr(Options.Conditionals),' ');
|
||||
Result.WriteDebugReport('TBuildManager.OnGetBuildMacroValues executed: '+dbgstr(Options.Conditionals),' ');
|
||||
{$ENDIF}
|
||||
|
||||
// the macro values of the active project take precedence
|
||||
@ -2476,7 +2476,7 @@ begin
|
||||
// compute inherited values
|
||||
if ParseOpts.InheritedMacroValuesParsing then begin
|
||||
if ConsoleVerbosity>=0 then
|
||||
debugln(['TPkgManager.OnGetBuildMacroValues circle computing inherited macros of ',dbgsname(Options.Owner)]);
|
||||
debugln(['Error: (lazarus) [TBuildManager.OnGetBuildMacroValues] cycle detected computing inherited macros of ',dbgsname(Options.Owner)]);
|
||||
exit;
|
||||
end;
|
||||
ParseOpts.InheritedMacroValuesParsing:=true;
|
||||
@ -2654,7 +2654,7 @@ begin
|
||||
// => invalidate macros so they now use the actual values
|
||||
IncreaseBuildMacroChangeStamp;
|
||||
if ConsoleVerbosity>0 then
|
||||
debugln(['TBuildManager.SetBuildTarget OS=',fTargetOS,' CPU=',fTargetCPU,' CompQueryOptions=',CompQueryOptions,' DefaultOS=',CompilerTargetOS,' DefaultCPU=',CompilerTargetCPU]);
|
||||
debugln(['Hint: (lazarus) [TBuildManager.SetBuildTarget] OS=',fTargetOS,' CPU=',fTargetCPU,' CompQueryOptions=',CompQueryOptions,' DefaultOS=',CompilerTargetOS,' DefaultCPU=',CompilerTargetCPU]);
|
||||
end;
|
||||
|
||||
fTargetOS:=GetFPCTargetOS(fTargetOS);
|
||||
@ -2676,7 +2676,7 @@ begin
|
||||
|
||||
if FPCTargetChanged or LCLTargetChanged then begin
|
||||
if ConsoleVerbosity>=0 then
|
||||
DebugLn(['TBuildManager.SetBuildTarget Old=',OldTargetCPU,'-',OldTargetOS,'-',OldLCLWidgetType,' New=',fTargetCPU,'-',fTargetOS,'-',fLCLWidgetType,' FPC=',FPCTargetChanged,' LCL=',LCLTargetChanged]);
|
||||
DebugLn(['Hint: (lazarus) [TBuildManager.SetBuildTarget] Old=',OldTargetCPU,'-',OldTargetOS,'-',OldLCLWidgetType,' New=',fTargetCPU,'-',fTargetOS,'-',fLCLWidgetType,' FPC=',FPCTargetChanged,' LCL=',LCLTargetChanged]);
|
||||
end;
|
||||
if LCLTargetChanged then
|
||||
CodeToolBoss.SetGlobalValue(ExternalMacroStart+'LCLWidgetType',fLCLWidgetType);
|
||||
@ -2714,7 +2714,7 @@ begin
|
||||
NewLCLWidgetSet:=LCLPlatformDirNames[BuildLazOpts.TargetPlatform];
|
||||
end;
|
||||
if ConsoleVerbosity>=1 then
|
||||
debugln(['TBuildManager.SetBuildTargetIDE OS=',NewTargetOS,' CPU=',NewTargetCPU,' WS=',NewLCLWidgetSet]);
|
||||
debugln(['Hint: (lazarus) [TBuildManager.SetBuildTargetIDE] OS=',NewTargetOS,' CPU=',NewTargetCPU,' WS=',NewLCLWidgetSet]);
|
||||
SetBuildTarget(NewTargetOS,NewTargetCPU,NewLCLWidgetSet,smsfsBackground,false);
|
||||
end;
|
||||
|
||||
|
@ -272,7 +272,7 @@ begin
|
||||
if Backup then begin
|
||||
Result:=BackupFileInteractive(Filename);
|
||||
if Result<>mrOk then begin
|
||||
debugln(['SaveCodeBufferToFile backup failed: "',Filename,'"']);
|
||||
debugln(['Error: (lazarus) unable to backup file: "',Filename,'"']);
|
||||
exit;
|
||||
end;
|
||||
end else
|
||||
@ -702,6 +702,8 @@ begin
|
||||
{$IFNDEF DisableChecks}
|
||||
DebugLn('LFMtoLRSstream ',E.Message);
|
||||
{$ENDIF}
|
||||
debugln(['Error: (lazarus) [ConvertLFMToLRSFileInteractive] unable to convert '+LFMFilename+' to '+LRSFilename+':'+LineEnding
|
||||
+E.Message]);
|
||||
Result:=IDEMessageDialogAb('Error',
|
||||
'Error while converting '+LFMFilename+' to '+LRSFilename+':'+LineEnding
|
||||
+E.Message,mtError,[mbCancel,mbIgnore],ShowAbort);
|
||||
@ -716,7 +718,7 @@ begin
|
||||
Result:=SaveCodeBuffer(LRSBuffer);
|
||||
end else begin
|
||||
Result:=mrCancel;
|
||||
debugln('ConvertLFMToLRSFileInteractive unable to create codebuffer ',LRSFilename);
|
||||
debugln('Error: (lazarus) [ConvertLFMToLRSFileInteractive] unable to create codebuffer ',LRSFilename);
|
||||
end;
|
||||
finally
|
||||
LFMMemStream.Free;
|
||||
|
@ -285,13 +285,13 @@ begin
|
||||
inherited ToolExited;
|
||||
if Tool.Terminated then begin
|
||||
ToolState:=lmvtsFailed;
|
||||
debugln(Caption,': terminated');
|
||||
debugln('Error: (lazarus) ',Caption,': terminated');
|
||||
end else if (ExitStatus<>0) then begin
|
||||
ToolState:=lmvtsFailed;
|
||||
debugln(Caption,': stopped with exit code '+IntToStr(ExitStatus));
|
||||
debugln('Error: (lazarus) ',Caption,': stopped with exit code '+IntToStr(ExitStatus));
|
||||
end else if Tool.ErrorMessage<>'' then begin
|
||||
ToolState:=lmvtsFailed;
|
||||
debugln(Caption,': ERROR: ',Tool.ErrorMessage);
|
||||
debugln('Error: (lazarus) ',Caption,': ',Tool.ErrorMessage);
|
||||
end else begin
|
||||
ToolState:=lmvtsSuccess;
|
||||
end;
|
||||
@ -643,7 +643,7 @@ procedure TExternalTool.DoExecute;
|
||||
begin
|
||||
if (FStage>=etsStopped) then exit(true);
|
||||
if (ErrorMessage='') then exit(false);
|
||||
debugln(['TExternalTool.DoExecute.CheckError Error=',ErrorMessage]);
|
||||
debugln(['Error: (lazarus) [TExternalTool.DoExecute.CheckError] Error=',ErrorMessage]);
|
||||
EnterCriticalSection;
|
||||
try
|
||||
if FStage>=etsStopped then exit(true);
|
||||
@ -759,6 +759,8 @@ begin
|
||||
end;
|
||||
|
||||
procedure TExternalTool.DoStart;
|
||||
var
|
||||
s: String;
|
||||
begin
|
||||
// set Stage to etsStarting
|
||||
EnterCriticalSection;
|
||||
@ -782,9 +784,14 @@ begin
|
||||
Thread.Tool:=Self;
|
||||
FThread.FreeOnTerminate:=true;
|
||||
end;
|
||||
if ConsoleVerbosity>=0 then begin
|
||||
debugln(['TExternalTool.DoExecute Title="',Title,'" Process.CurrentDirectory="',Process.CurrentDirectory,'" Executable="',Process.Executable,'" Params:']);
|
||||
debugln(Process.Parameters.Text);
|
||||
if ConsoleVerbosity>=-1 then begin
|
||||
if ExtToolConsole=nil then
|
||||
s:=''
|
||||
else
|
||||
s:='"'+CmdLineParams+'"';
|
||||
debugln(['Hint: (lazarus) Execute Title="',Title,'", Working Directory="',Process.CurrentDirectory,'", Executable="',Process.Executable,'" Params:',s]);
|
||||
if ExtToolConsole=nil then
|
||||
debugln(Process.Parameters.Text);
|
||||
end;
|
||||
Thread.Start;
|
||||
end;
|
||||
@ -1105,13 +1112,13 @@ begin
|
||||
s:=ToolOptions.WorkingDirectory;
|
||||
if ToolOptions.ResolveMacros then begin
|
||||
if not GlobalMacroList.SubstituteStr(s) then begin
|
||||
debugln(['TExternalTools.OnRunExternalTool ',ToolOptions.Title,' failed: macros of WorkerDirectory: "',ToolOptions.WorkingDirectory,'"']);
|
||||
debugln(['Error: (lazarus) [TExternalTools.OnRunExternalTool] ',ToolOptions.Title,' failed: macros of WorkerDirectory: "',ToolOptions.WorkingDirectory,'"']);
|
||||
exit;
|
||||
end;
|
||||
end;
|
||||
s:=ChompPathDelim(CleanAndExpandDirectory(s));
|
||||
if not DirectoryExistsUTF8(s) then begin
|
||||
debugln(['TExternalTools.OnRunExternalTool ',ToolOptions.Title,' failed: missing directory "',s,'"']);
|
||||
debugln(['Error: (lazarus) [TExternalTools.OnRunExternalTool] ',ToolOptions.Title,' failed: missing directory "',s,'"']);
|
||||
exit;
|
||||
end;
|
||||
Proc.CurrentDirectory:=s;
|
||||
@ -1123,7 +1130,7 @@ begin
|
||||
for i:=0 to Proc.Environment.Count-1 do begin
|
||||
s:=Proc.Environment[i];
|
||||
if not GlobalMacroList.SubstituteStr(s) then begin
|
||||
debugln(['TExternalTools.OnRunExternalTool ',ToolOptions.Title,' failed: environment override "',Proc.Environment,'"']);
|
||||
debugln(['Error: (lazarus) [TExternalTools.OnRunExternalTool] ',ToolOptions.Title,' failed: environment override "',Proc.Environment,'"']);
|
||||
exit;
|
||||
end;
|
||||
Proc.Environment[i]:=s;
|
||||
@ -1134,7 +1141,7 @@ begin
|
||||
s:=ToolOptions.Executable;
|
||||
if ToolOptions.ResolveMacros then begin
|
||||
if not GlobalMacroList.SubstituteStr(s) then begin
|
||||
debugln(['TExternalTools.OnRunExternalTool ',ToolOptions.Title,' failed: macros of Executable: "',ToolOptions.Executable,'"']);
|
||||
debugln(['Error: (lazarus) [TExternalTools.OnRunExternalTool] ',ToolOptions.Title,' failed: macros of Executable: "',ToolOptions.Executable,'"']);
|
||||
exit;
|
||||
end;
|
||||
end;
|
||||
@ -1155,21 +1162,21 @@ begin
|
||||
end;
|
||||
{$ENDIF}
|
||||
if s='' then begin
|
||||
debugln(['TExternalTools.OnRunExternalTool ',ToolOptions.Title,' failed: missing executable "',ToolOptions.Executable,'"']);
|
||||
debugln(['Error: (lazarus) [TExternalTools.OnRunExternalTool] ',ToolOptions.Title,' failed: missing executable "',ToolOptions.Executable,'"']);
|
||||
exit;
|
||||
end;
|
||||
end;
|
||||
if (not FilenameIsAbsolute(s))
|
||||
or (not FileExistsUTF8(s)) then begin
|
||||
debugln(['TExternalTools.OnRunExternalTool ',ToolOptions.Title,' failed: missing executable: "',s,'"']);
|
||||
debugln(['Error: (lazarus) [TExternalTools.OnRunExternalTool] ',ToolOptions.Title,' failed: missing executable: "',s,'"']);
|
||||
exit;
|
||||
end;
|
||||
if DirectoryExistsUTF8(s) then begin
|
||||
debugln(['TExternalTools.OnRunExternalTool ',ToolOptions.Title,' failed: executable is a directory: "',s,'"']);
|
||||
debugln(['Error: (lazarus) [TExternalTools.OnRunExternalTool] ',ToolOptions.Title,' failed: executable is a directory: "',s,'"']);
|
||||
exit;
|
||||
end;
|
||||
if not FileIsExecutable(s) then begin
|
||||
debugln(['TExternalTools.OnRunExternalTool ',ToolOptions.Title,' failed: executable lacks permission to run: "',s,'"']);
|
||||
debugln(['Error: (lazarus) [TExternalTools.OnRunExternalTool] ',ToolOptions.Title,' failed: executable lacks permission to run: "',s,'"']);
|
||||
exit;
|
||||
end;
|
||||
Proc.Executable:=s;
|
||||
@ -1178,7 +1185,7 @@ begin
|
||||
s:=ToolOptions.CmdLineParams;
|
||||
if ToolOptions.ResolveMacros then begin
|
||||
if not GlobalMacroList.SubstituteStr(s) then begin
|
||||
debugln(['TExternalTools.OnRunExternalTool ',ToolOptions.Title,' failed: macros in cmd line params "',ToolOptions.CmdLineParams,'"']);
|
||||
debugln(['Error: (lazarus) [TExternalTools.OnRunExternalTool] ',ToolOptions.Title,' failed: macros in cmd line params "',ToolOptions.CmdLineParams,'"']);
|
||||
exit;
|
||||
end;
|
||||
end;
|
||||
@ -1220,7 +1227,7 @@ begin
|
||||
Tool.AddParsers(ToolOptions.Scanners[i]);
|
||||
if ToolOptions.ResolveMacros then begin
|
||||
if not Tool.ResolveMacros then begin
|
||||
debugln(['TExternalTools.OnRunExternalTool failed to resolve macros']);
|
||||
debugln(['Error: (lazarus) [TExternalTools.OnRunExternalTool] failed to resolve macros']);
|
||||
exit;
|
||||
end;
|
||||
end;
|
||||
|
@ -923,7 +923,7 @@ var
|
||||
if IDEMessagesWindow<>nil then
|
||||
IDEMessagesWindow.AddCustomMessage(mluNote,Msg)
|
||||
else
|
||||
debugln('Warning: ',Msg);
|
||||
debugln('Warning: (lazarus) ',Msg);
|
||||
end;
|
||||
end;
|
||||
|
||||
@ -989,7 +989,7 @@ var
|
||||
if IDEMessagesWindow<>nil then
|
||||
IDEMessagesWindow.AddCustomMessage(mluWarning,Msg)
|
||||
else
|
||||
debugln('Warning: ',Msg);
|
||||
debugln('Warning: (lazarus) ',Msg);
|
||||
end;
|
||||
end;
|
||||
|
||||
|
@ -780,7 +780,7 @@ begin
|
||||
AFilename:=PkgLink.GetEffectiveFilename;
|
||||
//debugln(['TLazPackageGraph.OpenDependencyWithPackageLink AFilename=',AFilename,' ',PkgLink.Origin=ploGlobal]);
|
||||
if not FileExistsUTF8(AFilename) then begin
|
||||
DebugLn('invalid Package Link: file "'+AFilename+'" does not exist.');
|
||||
DebugLn('Note: (lazarus) Invalid Package Link: file "'+AFilename+'" does not exist.');
|
||||
PkgLink.LPKFileDateValid:=false;
|
||||
exit(mrCancel);
|
||||
end;
|
||||
@ -797,13 +797,13 @@ begin
|
||||
NewPackage.LPKSource:=Code;
|
||||
except
|
||||
on E: Exception do begin
|
||||
DebugLn('unable to read file "'+AFilename+'" ',E.Message);
|
||||
DebugLn('Error: (lazarus) unable to read file "'+AFilename+'" ',E.Message);
|
||||
Result:=mrCancel;
|
||||
exit;
|
||||
end;
|
||||
end;
|
||||
if not NewPackage.MakeSense then begin
|
||||
DebugLn('invalid Package file "'+AFilename+'".');
|
||||
DebugLn('Error: (lazarus) invalid package file "'+AFilename+'".');
|
||||
exit(mrCancel);
|
||||
end;
|
||||
if SysUtils.CompareText(PkgLink.Name,NewPackage.Name)<>0 then exit;
|
||||
@ -839,7 +839,7 @@ begin
|
||||
if Assigned(IDEMessagesWindow) then
|
||||
IDEMessagesWindow.AddCustomMessage(TheUrgency,Msg,Filename)
|
||||
else
|
||||
DebugLn(['TLazPackageGraph.AddMessage ',MessageLineUrgencyNames[TheUrgency],' Msg="',Msg,'" Filename="',Filename,'"']);
|
||||
DebugLn([MessageLineUrgencyNames[TheUrgency],': (lazarus) ',Msg,' Filename="',Filename,'"']);
|
||||
end;
|
||||
|
||||
function TLazPackageGraph.OutputDirectoryIsWritable(APackage: TLazPackage;
|
||||
@ -859,7 +859,7 @@ begin
|
||||
[Directory, LineEnding, APackage.IDAsString]),
|
||||
mtError,[mbCancel]);
|
||||
end;
|
||||
debugln(['TLazPackageGraph.OutputDirectoryIsWritable unable to create directory "',Directory,'"']);
|
||||
debugln(['Error: (lazarus) unable to create package output directory "',Directory,'" of package "',APackage.IDAsString,'"']);
|
||||
exit;
|
||||
end;
|
||||
Result:=true;
|
||||
@ -1106,11 +1106,11 @@ begin
|
||||
if PkgID.StringToID(TheID) then begin
|
||||
APackage:=FindPackageWithIDMask(PkgID);
|
||||
if APackage=nil then begin
|
||||
DebugLn('WARNING: TLazPackageGraph.GetPackageFromMacroParameter unknown package id "',TheID,'" PkgID.IDAsString="',PkgID.IDAsString,'"');
|
||||
DebugLn('Warning: (lazarus) unknown macro package id "',TheID,'"');
|
||||
end;
|
||||
end else begin
|
||||
APackage:=nil;
|
||||
DebugLn('WARNING: TLazPackageGraph.GetPackageFromMacroParameter invalid package id "',TheID,'"');
|
||||
DebugLn('Warning: (lazarus) invalid macro package id "',TheID,'"');
|
||||
end;
|
||||
PkgID.Free;
|
||||
Result:=APackage<>nil;
|
||||
@ -1730,7 +1730,7 @@ begin
|
||||
// append message
|
||||
if Msg<>'' then
|
||||
ErrorMsg:=ErrorMsg+LineEnding+LineEnding+Msg;
|
||||
debugln(['TLazPackageGraph.RegistrationError ',dbgstr(ErrorMsg)]);
|
||||
debugln(['Error: (lazarus) register failed: ',dbgstr(ErrorMsg)]);
|
||||
|
||||
if AbortRegistration or QuietRegistration then exit;
|
||||
|
||||
@ -1768,7 +1768,7 @@ begin
|
||||
if MsgResult<>mrOk then begin
|
||||
Data.ErrorMessage:='SavePackageCompiledState failed';
|
||||
PkgCompileTool.ErrorMessage:=Data.ErrorMessage;
|
||||
DebugLn(['TLazPackageGraph.OnExtToolBuildStopped SavePackageCompiledState failed: ',APackage.IDAsString]);
|
||||
DebugLn(['Error: (lazarus) failed to write package .compiled file: ',APackage.IDAsString,' File=',aPackage.GetStateFilename]);
|
||||
exit;
|
||||
end;
|
||||
Data.ErrorMessage:=PkgCompileTool.ErrorMessage;
|
||||
@ -1781,7 +1781,7 @@ begin
|
||||
if MsgResult<>mrOk then begin
|
||||
Data.ErrorMessage:='ConvertPackageRSTFiles failed';
|
||||
PkgCompileTool.ErrorMessage:=Data.ErrorMessage;
|
||||
DebugLn('TLazPackageGraph.CompilePackage ConvertPackageRSTFiles failed: ',APackage.IDAsString);
|
||||
DebugLn('Error: (lazarus) failed to update .po files: ',APackage.IDAsString);
|
||||
IDEMessagesWindow.AddCustomMessage(mluError,
|
||||
Format(lisUpdatingPoFilesFailedForPackage, [APackage.IDAsString]));
|
||||
exit;
|
||||
@ -2821,7 +2821,8 @@ begin
|
||||
MarkNeededPackages;
|
||||
for i:=FItems.Count-1 downto 0 do
|
||||
if not (lpfNeeded in Packages[i].Flags) then begin
|
||||
debugln(['TLazPackageGraph.CloseUnneededPackages Pkg=',Packages[i].Name]);
|
||||
if ConsoleVerbosity>=0 then
|
||||
debugln(['Hint: closing unneeded package "',Packages[i].Name,'"']);
|
||||
Delete(i);
|
||||
end;
|
||||
EndUpdate;
|
||||
@ -3008,7 +3009,7 @@ begin
|
||||
except
|
||||
on E: EXMLReadError do begin
|
||||
// invalid XML
|
||||
debugln(['TLazPackageGraph.LoadPackageCompiledState syntax error in ',StateFile,' => need clean build.']);
|
||||
debugln(['Warning: (lazarus) package "',APackage.IDAsString,'": syntax error in ',StateFile,' => need clean build.']);
|
||||
stats^.Complete:=false;
|
||||
stats^.CompilerFilename:='';
|
||||
stats^.StateFileName:=StateFile;
|
||||
@ -3097,7 +3098,8 @@ begin
|
||||
continue;
|
||||
end;
|
||||
if FileAgeCached(Filename)>StateFileAge then begin
|
||||
debugln(['TLazPackageGraph.CheckCompileNeedDueToFPCUnits global unit "',Filename,'" is newer than state file of ',ID]);
|
||||
if ConsoleVerbosity>=-1 then
|
||||
debugln(['Hint: (lazarus) global unit "',Filename,'" is newer than state file of package ',ID]);
|
||||
Note+='Global unit "'+Filename+'" is newer than state file of '+ID+':'+LineEnding
|
||||
+' Unit age='+FileAgeToStr(FileAgeCached(Filename))+LineEnding
|
||||
+' State file age='+FileAgeToStr(StateFileAge)+LineEnding;
|
||||
@ -3159,13 +3161,12 @@ begin
|
||||
Result:=mrYes;
|
||||
o:=RequiredPackage.GetOutputDirType;
|
||||
if not RequiredPackage.LastCompile[o].StateFileLoaded then begin
|
||||
DebugLn('TPkgManager.CheckCompileNeedDueToDependencies Missing state file for ',RequiredPackage.IDAsString,': ',RequiredPackage.GetStateFilename);
|
||||
DebugLn('Hint: (lazarus) Missing state file for ',RequiredPackage.IDAsString,': ',RequiredPackage.GetStateFilename);
|
||||
Note+='Package '+RequiredPackage.IDAsString+' has no state file "'+RequiredPackage.GetStateFilename+'".'+LineEnding;
|
||||
exit;
|
||||
end;
|
||||
if StateFileAge<RequiredPackage.LastCompile[o].StateFileDate then begin
|
||||
DebugLn('TPkgManager.CheckCompileNeedDueToDependencies ',
|
||||
' State file of ',RequiredPackage.IDAsString,' is newer than state file of ',GetOwnerID);
|
||||
DebugLn('Hint: (lazarus) State file of ',RequiredPackage.IDAsString,' is newer than state file of ',GetOwnerID);
|
||||
Note+='State file of '+RequiredPackage.IDAsString+' is newer than state file of '+GetOwnerID+LineEnding
|
||||
+' '+RequiredPackage.IDAsString+'='+FileAgeToStr(RequiredPackage.LastCompile[o].StateFileDate)+LineEnding
|
||||
+' '+GetOwnerID+'='+FileAgeToStr(StateFileAge)+LineEnding;
|
||||
@ -3180,8 +3181,7 @@ begin
|
||||
if FilenameIsAbsolute(OtherStateFile)
|
||||
and FileExistsCached(OtherStateFile)
|
||||
and (FileAgeCached(OtherStateFile)>StateFileAge) then begin
|
||||
DebugLn('TPkgManager.CheckCompileNeedDueToDependencies ',
|
||||
' State file of ',RequiredPackage.IDAsString,' "',OtherStateFile,'" (',
|
||||
DebugLn('Hint: (lazarus) State file of ',RequiredPackage.IDAsString,' "',OtherStateFile,'" (',
|
||||
FileAgeToStr(FileAgeCached(OtherStateFile)),')'
|
||||
,' is newer than state file ',GetOwnerID,'(',FileAgeToStr(StateFileAge),')');
|
||||
Note+='State file of used package is newer than state file:'+LineEnding
|
||||
@ -3240,7 +3240,7 @@ begin
|
||||
// the normal output directory is writable => keep using it
|
||||
exit;
|
||||
end;
|
||||
debugln(['TLazPackageGraph.CheckIfPackageNeedsCompilation normal output dir is not writable: ',OutputDir]);
|
||||
debugln(['Hint: (lazarus) normal output directory of package ',APackage.IDAsString,' is not writable: "',OutputDir,'"']);
|
||||
// the normal output directory is not writable
|
||||
// => try the fallback directory
|
||||
NewOutputDir:=GetFallbackOutputDir(APackage);
|
||||
@ -3276,7 +3276,7 @@ begin
|
||||
NeedBuildAllFlag,ConfigChanged,DependenciesChanged,Note);
|
||||
if DefResult=mrNo then begin
|
||||
// switching back to the not writable output directory requires no compile
|
||||
debugln(['TLazPackageGraph.CheckIfPackageNeedsCompilation switching back to the normal output directory: ',APackage.GetOutputDirectory]);
|
||||
debugln(['Hint: (lazarus) switching back to the normal output directory: "',APackage.GetOutputDirectory,'" Package ',APackage.IDAsString]);
|
||||
Note+='Switching back to not writable output directory.'+LineEnding;
|
||||
exit(mrNo);
|
||||
end;
|
||||
@ -3336,7 +3336,7 @@ begin
|
||||
if Result<>mrOk then exit; // read error and user aborted
|
||||
if not Stats^.StateFileLoaded then begin
|
||||
// package was not compiled via Lazarus nor via Makefile/fpmake
|
||||
DebugLn('TLazPackageGraph.CheckIfCurPkgOutDirNeedsCompile Missing state file for ',APackage.IDAsString,': ',StateFilename);
|
||||
DebugLn('Hint: (lazarus) Missing state file of ',APackage.IDAsString,': ',StateFilename);
|
||||
Note+='Missing state file "'+StateFilename+'".'+LineEnding;
|
||||
NeedBuildAllFlag:=true;
|
||||
ConfigChanged:=true;
|
||||
@ -3368,7 +3368,8 @@ begin
|
||||
LastParams:=APackage.GetLastCompilerParams(o);
|
||||
if Stats^.ViaMakefile then begin
|
||||
// the package was compiled via Makefile/fpmake
|
||||
debugln(['TLazPackageGraph.CheckIfCurPkgOutDirNeedsCompile Last=',LastParams]);
|
||||
if ConsoleVerbosity>=1 then
|
||||
debugln(['Hint: (lazarus) package ',APackage.IDAsString,' was compiled via "make" with parameters "',LastParams,'"']);
|
||||
|
||||
CurPaths:=nil;
|
||||
LastPaths:=nil;
|
||||
@ -3381,7 +3382,7 @@ begin
|
||||
OldValue:=LastPaths.Values['Reduced'];
|
||||
NewValue:=CurPaths.Values['Reduced'];
|
||||
if NewValue<>OldValue then begin
|
||||
DebugLn('TLazPackageGraph.CheckIfCurPkgOutDirNeedsCompile Compiler custom params changed for ',APackage.IDAsString);
|
||||
DebugLn('Hint: (lazarus) Compiler custom params changed for ',APackage.IDAsString);
|
||||
DebugLn(' Old="',OldValue,'"');
|
||||
DebugLn(' Now="',NewValue,'"');
|
||||
DebugLn(' State file="',Stats^.StateFileName,'"');
|
||||
@ -3396,7 +3397,7 @@ begin
|
||||
OldValue:=TrimSearchPath(LastPaths.Values['UnitPath'],APackage.Directory,true);
|
||||
NewValue:=TrimSearchPath(CurPaths.Values['UnitPath'],APackage.Directory,true);
|
||||
if NewValue<>OldValue then begin
|
||||
DebugLn('TLazPackageGraph.CheckIfCurPkgOutDirNeedsCompile Compiler unit paths changed for ',APackage.IDAsString);
|
||||
DebugLn('Hint: (lazarus) Compiler unit paths changed for ',APackage.IDAsString);
|
||||
DebugLn(' Old="',OldValue,'"');
|
||||
DebugLn(' Now="',NewValue,'"');
|
||||
DebugLn(' State file="',Stats^.StateFileName,'"');
|
||||
@ -3411,7 +3412,7 @@ begin
|
||||
OldValue:=TrimSearchPath(LastPaths.Values['IncPath'],APackage.Directory,true);
|
||||
NewValue:=TrimSearchPath(CurPaths.Values['IncPath'],APackage.Directory,true);
|
||||
if NewValue<>OldValue then begin
|
||||
DebugLn('TLazPackageGraph.CheckIfCurPkgOutDirNeedsCompile Compiler include paths changed for ',APackage.IDAsString);
|
||||
DebugLn('Hint: (lazarus) Compiler include paths changed for ',APackage.IDAsString);
|
||||
DebugLn(' Old="',OldValue,'"');
|
||||
DebugLn(' Now="',NewValue,'"');
|
||||
DebugLn(' State file="',Stats^.StateFileName,'"');
|
||||
@ -3431,7 +3432,7 @@ begin
|
||||
ReducedLastParams:=RemoveFPCVerbosityParams(LastParams);
|
||||
if ReducedParams<>ReducedLastParams then begin
|
||||
// package was compiled by Lazarus
|
||||
DebugLn('TLazPackageGraph.CheckIfCurPkgOutDirNeedsCompile Compiler params changed for ',APackage.IDAsString);
|
||||
DebugLn('Hint: (lazarus) Compiler params changed for ',APackage.IDAsString);
|
||||
DebugLn(' Old="',dbgstr(ReducedLastParams),'"');
|
||||
DebugLn(' Now="',dbgstr(ReducedParams),'"');
|
||||
DebugLn(' State file="',Stats^.StateFileName,'"');
|
||||
@ -3445,7 +3446,7 @@ begin
|
||||
end;
|
||||
if (not Stats^.ViaMakefile)
|
||||
and (CompilerFilename<>Stats^.CompilerFilename) then begin
|
||||
DebugLn('TLazPackageGraph.CheckIfCurPkgOutDirNeedsCompile Compiler filename changed for ',APackage.IDAsString);
|
||||
DebugLn('Hint: (lazarus) Compiler filename changed for ',APackage.IDAsString);
|
||||
DebugLn(' Old="',Stats^.CompilerFilename,'"');
|
||||
DebugLn(' Now="',CompilerFilename,'"');
|
||||
DebugLn(' State file="',Stats^.StateFileName,'"');
|
||||
@ -3456,7 +3457,7 @@ begin
|
||||
exit(mrYes);
|
||||
end;
|
||||
if not FileExistsCached(CompilerFilename) then begin
|
||||
DebugLn('TLazPackageGraph.CheckIfCurPkgOutDirNeedsCompile Compiler filename not found for ',APackage.IDAsString);
|
||||
DebugLn('Hint: (lazarus) Compiler filename not found for ',APackage.IDAsString);
|
||||
DebugLn(' File="',CompilerFilename,'"');
|
||||
DebugLn(' State file="',Stats^.StateFileName,'"');
|
||||
Note+='Compiler file "'+CompilerFilename+'" not found.'+LineEnding
|
||||
@ -3465,7 +3466,7 @@ begin
|
||||
end;
|
||||
if (not Stats^.ViaMakefile)
|
||||
and (FileAgeCached(CompilerFilename)<>Stats^.CompilerFileDate) then begin
|
||||
DebugLn('TLazPackageGraph.CheckIfCurPkgOutDirNeedsCompile Compiler file changed for ',APackage.IDAsString);
|
||||
DebugLn('Hint: (lazarus) Compiler file changed for ',APackage.IDAsString);
|
||||
DebugLn(' File="',CompilerFilename,'"');
|
||||
DebugLn(' State file="',Stats^.StateFileName,'"');
|
||||
Note+='Compiler file "'+CompilerFilename+'" changed:'+LineEnding
|
||||
@ -3479,12 +3480,12 @@ begin
|
||||
if (SrcFilename<>'') then
|
||||
begin
|
||||
if not FileExistsCached(SrcFilename) then begin
|
||||
DebugLn('TLazPackageGraph.CheckIfCurPkgOutDirNeedsCompile SrcFile missing of ',APackage.IDAsString,': ',SrcFilename);
|
||||
DebugLn('Hint: (lazarus) source file missing of ',APackage.IDAsString,': ',SrcFilename);
|
||||
Note+='Source file "'+SrcFilename+'" missing.'+LineEnding;
|
||||
exit(mrYes);
|
||||
end;
|
||||
if StateFileAge<FileAgeCached(SrcFilename) then begin
|
||||
DebugLn('TLazPackageGraph.CheckIfCurPkgOutDirNeedsCompile SrcFile outdated of ',APackage.IDAsString,': ',SrcFilename);
|
||||
DebugLn('Hint: (lazarus) source file outdated of ',APackage.IDAsString,': ',SrcFilename);
|
||||
Note+='Source file "'+SrcFilename+'" outdated:'+LineEnding
|
||||
+' Source file age='+FileAgeToStr(FileAgeCached(SrcFilename))+LineEnding
|
||||
+' State file="'+Stats^.StateFileName+'"'+LineEnding
|
||||
@ -3495,7 +3496,7 @@ begin
|
||||
if Stats^.MainPPUExists then begin
|
||||
SrcPPUFile:=APackage.GetSrcPPUFilename;
|
||||
if not FileExistsCached(SrcPPUFile) then begin
|
||||
DebugLn('TLazPackageGraph.CheckIfCurPkgOutDirNeedsCompile main ppu file missing of ',APackage.IDAsString,': ',SrcPPUFile);
|
||||
DebugLn('Hint: (lazarus) main ppu file missing of ',APackage.IDAsString,': ',SrcPPUFile);
|
||||
Note+='Main ppu file "'+SrcPPUFile+'" missing.'+LineEnding;
|
||||
exit(mrYes);
|
||||
end;
|
||||
@ -3510,7 +3511,7 @@ begin
|
||||
NeedBuildAllFlag:=false;
|
||||
|
||||
if not Stats^.Complete then begin
|
||||
DebugLn('TLazPackageGraph.CheckIfCurPkgOutDirNeedsCompile Compile was incomplete for ',APackage.IDAsString);
|
||||
DebugLn('Hint: (lazarus) Last compile was incomplete for ',APackage.IDAsString);
|
||||
DebugLn(' State file="',Stats^.StateFileName,'"');
|
||||
Note+='Last compile was incomplete.'+LineEnding
|
||||
+' State file="'+Stats^.StateFileName+'"'+LineEnding;
|
||||
@ -3530,7 +3531,7 @@ begin
|
||||
|
||||
// check package files
|
||||
if StateFileAge<FileAgeCached(APackage.Filename) then begin
|
||||
DebugLn('TLazPackageGraph.CheckIfCurPkgOutDirNeedsCompile StateFile older than lpk ',APackage.IDAsString);
|
||||
DebugLn('Hint: (lazarus) State file older than lpk ',APackage.IDAsString);
|
||||
DebugLn(' State file="',Stats^.StateFileName,'"');
|
||||
Note+='State file older than lpk:'+LineEnding
|
||||
+' State file age='+FileAgeToStr(StateFileAge)+LineEnding
|
||||
@ -3544,7 +3545,7 @@ begin
|
||||
AFilename:=CurFile.GetFullFilename;
|
||||
if FileExistsCached(AFilename)
|
||||
and (StateFileAge<FileAgeCached(AFilename)) then begin
|
||||
DebugLn('TLazPackageGraph.CheckIfCurPkgOutDirNeedsCompile Src has changed ',APackage.IDAsString,' ',CurFile.Filename);
|
||||
DebugLn('Hint: (lazarus) Source file has changed ',APackage.IDAsString,' ',CurFile.Filename);
|
||||
DebugLn(' State file="',Stats^.StateFileName,'"');
|
||||
Note+='State file older than source "'+AFilename+'"'+LineEnding
|
||||
+' State file age='+FileAgeToStr(StateFileAge)+LineEnding
|
||||
@ -3556,7 +3557,7 @@ begin
|
||||
LFMFilename:=ChangeFileExt(AFilename,'.lfm');
|
||||
if FileExistsCached(LFMFilename)
|
||||
and (StateFileAge<FileAgeCached(LFMFilename)) then begin
|
||||
DebugLn('TLazPackageGraph.CheckIfCurPkgOutDirNeedsCompile LFM has changed ',APackage.IDAsString,' ',LFMFilename);
|
||||
DebugLn('Hint: (lazarus) LFM has changed ',APackage.IDAsString,' ',LFMFilename);
|
||||
DebugLn(' State file="',Stats^.StateFileName,'"');
|
||||
Note+='State file older than resource "'+LFMFilename+'"'+LineEnding
|
||||
+' State file age='+FileAgeToStr(StateFileAge)+LineEnding
|
||||
@ -3718,7 +3719,7 @@ begin
|
||||
ToolGroup.Execute;
|
||||
ToolGroup.WaitForExit;
|
||||
if ToolGroup.ErrorMessage<>'' then begin
|
||||
debugln(['TLazPackageGraph.CompileRequiredPackages ERROR="',ToolGroup.ErrorMessage,'"']);
|
||||
debugln(['Error: (lazarus) [TLazPackageGraph.CompileRequiredPackages] "',ToolGroup.ErrorMessage,'"']);
|
||||
exit(mrCancel);
|
||||
end;
|
||||
finally
|
||||
@ -3777,7 +3778,7 @@ begin
|
||||
//DebugLn('TLazPackageGraph.CompilePackage A ',APackage.IDAsString,' Flags=',PkgCompileFlagsToString(Flags));
|
||||
|
||||
if APackage.IsVirtual then begin
|
||||
DebugLn(['TLazPackageGraph.CompilePackage failed because virtual: ',APackage.Filename]);
|
||||
DebugLn(['Error: (lazarus) compile failed because virtual: ',APackage.Filename]);
|
||||
exit;
|
||||
end;
|
||||
|
||||
@ -3792,7 +3793,7 @@ begin
|
||||
Result:=CompileRequiredPackages(APackage,nil,
|
||||
pcfSkipDesignTimePackages in Flags,CompilePolicy);
|
||||
if Result<>mrOk then begin
|
||||
DebugLn(['TLazPackageGraph.CompilePackage CompileRequiredPackages failed: ',APackage.IDAsString]);
|
||||
DebugLn(['Error: (lazarus) Compile required packages failed: ',APackage.IDAsString]);
|
||||
exit;
|
||||
end;
|
||||
end;
|
||||
@ -3819,7 +3820,7 @@ begin
|
||||
exit;
|
||||
end;
|
||||
if Result<>mrYes then begin
|
||||
DebugLn(['TLazPackageGraph.CompilePackage CheckIfPackageNeedsCompilation failed: ',APackage.IDAsString]);
|
||||
DebugLn(['Error: (lazarus) [CheckIfPackageNeedsCompilation] failed: ',APackage.IDAsString]);
|
||||
exit;
|
||||
end;
|
||||
end;
|
||||
@ -3836,21 +3837,21 @@ begin
|
||||
|
||||
Result:=PreparePackageOutputDirectory(APackage,pcfCleanCompile in Flags);
|
||||
if Result<>mrOk then begin
|
||||
DebugLn('TLazPackageGraph.CompilePackage PreparePackageOutputDirectory failed: ',APackage.IDAsString);
|
||||
DebugLn('Error: (lazarus) [TLazPackageGraph.CompilePackage] PreparePackageOutputDirectory failed: ',APackage.IDAsString);
|
||||
exit;
|
||||
end;
|
||||
|
||||
// create package main source file
|
||||
Result:=SavePackageMainSource(APackage,Flags,ShowAbort);
|
||||
if Result<>mrOk then begin
|
||||
DebugLn('TLazPackageGraph.CompilePackage SavePackageMainSource failed: ',APackage.IDAsString);
|
||||
DebugLn('Error: (lazarus) [TLazPackageGraph.CompilePackage] SavePackageMainSource failed: ',APackage.IDAsString);
|
||||
exit;
|
||||
end;
|
||||
|
||||
// check ambiguous units
|
||||
Result:=CheckAmbiguousPackageUnits(APackage);
|
||||
if Result<>mrOk then begin
|
||||
DebugLn('TLazPackageGraph.CompilePackage CheckAmbiguousPackageUnits failed: ',APackage.IDAsString);
|
||||
DebugLn('Error: (lazarus) [TLazPackageGraph.CompilePackage} CheckAmbiguousPackageUnits failed: ',APackage.IDAsString);
|
||||
exit;
|
||||
end;
|
||||
|
||||
@ -3859,7 +3860,7 @@ begin
|
||||
or (APackage.CompilerOptions.CreateMakefileOnBuild)) then begin
|
||||
Result:=WriteMakeFile(APackage);
|
||||
if Result<>mrOk then begin
|
||||
DebugLn('TLazPackageGraph.CompilePackage DoWriteMakefile failed: ',APackage.IDAsString);
|
||||
DebugLn('Error: (lazarus) [TLazPackageGraph.CompilePackage] DoWriteMakefile failed: ',APackage.IDAsString);
|
||||
exit;
|
||||
end;
|
||||
end;
|
||||
@ -3869,7 +3870,7 @@ begin
|
||||
or (APackage.CompilerOptions.CreateMakefileOnBuild)) then begin
|
||||
Result:=WriteFpmake(APackage);
|
||||
if Result<>mrOk then begin
|
||||
DebugLn('TLazPackageGraph.CompilePackage DoWriteFpmakeFile failed: ',APackage.IDAsString);
|
||||
DebugLn('Error: (lazarus) [TLazPackageGraph.CompilePackage] DoWriteFpmakeFile failed: ',APackage.IDAsString);
|
||||
exit;
|
||||
end;
|
||||
end;
|
||||
@ -3888,7 +3889,7 @@ begin
|
||||
Result:=APackage.CompilerOptions.ExecuteBefore.Execute(WorkingDir,
|
||||
ToolTitle,Note);
|
||||
if Result<>mrOk then begin
|
||||
DebugLn(['TLazPackageGraph.CompilePackage ExecuteBefore failed: ',APackage.IDAsString]);
|
||||
DebugLn(['Error: (lazarus) [TLazPackageGraph.CompilePackage] ExecuteBefore failed: ',APackage.IDAsString]);
|
||||
exit;
|
||||
end;
|
||||
end;
|
||||
@ -3970,7 +3971,7 @@ begin
|
||||
Result:=APackage.CompilerOptions.ExecuteAfter.Execute(WorkingDir,
|
||||
ToolTitle,Note);
|
||||
if Result<>mrOk then begin
|
||||
DebugLn(['TLazPackageGraph.CompilePackage ExecuteAfter failed: ',APackage.IDAsString]);
|
||||
DebugLn(['Error: (lazarus) [TLazPackageGraph.CompilePackage] ExecuteAfter failed: ',APackage.IDAsString]);
|
||||
// Note: messages window already contains error message
|
||||
exit;
|
||||
end;
|
||||
@ -4001,7 +4002,7 @@ begin
|
||||
Result:=ForceDirectoryInteractive(POOutputDirectory,[mbRetry,mbIgnore]);
|
||||
if Result<>mrOk then begin
|
||||
if Result=mrIgnore then Result:=mrOk;
|
||||
DebugLn(['TLazPackageGraph.ConvertPackageRSTFiles unable to create directory ',POOutputDirectory]);
|
||||
DebugLn(['Note: (lazarus) [TLazPackageGraph.ConvertPackageRSTFiles] unable to create directory ',POOutputDirectory]);
|
||||
exit;
|
||||
end;
|
||||
end;
|
||||
@ -4009,13 +4010,13 @@ begin
|
||||
// find all .rst files in package output directory
|
||||
if not DirectoryIsWritableCached(POOutputDirectory) then begin
|
||||
// this package is read only
|
||||
DebugLn(['TLazPackageGraph.ConvertPackageRSTFiles skipping read only directory '+POOutputDirectory]);
|
||||
DebugLn(['Warning: (lazarus) [TLazPackageGraph.ConvertPackageRSTFiles] skipping read only directory '+POOutputDirectory]);
|
||||
exit(mrOK);
|
||||
end;
|
||||
|
||||
PkgOutputDirectory:=AppendPathDelim(APackage.GetOutputDirectory);
|
||||
if not ConvertRSTFiles(PkgOutputDirectory,POOutputDirectory) then begin
|
||||
DebugLn(['TLazPackageGraph.ConvertPackageRSTFiles FAILED: PkgOutputDirectory=',PkgOutputDirectory,' RSTOutputDirectory=',POOutputDirectory]);
|
||||
DebugLn(['Error: (lazarus) [TLazPackageGraph.ConvertPackageRSTFiles] unable to update .po files PkgOutputDirectory=',PkgOutputDirectory,' RSTOutputDirectory=',POOutputDirectory]);
|
||||
exit(mrCancel);
|
||||
end;
|
||||
Result:=mrOK;
|
||||
@ -4042,7 +4043,7 @@ begin
|
||||
// it is not needed because it is the location of the Makefile.compiled
|
||||
s:=s+' '+SwitchPathDelims(CreateRelativePath(APackage.GetSrcFilename,APackage.Directory),pdsUnix);
|
||||
if ConsoleVerbosity>1 then
|
||||
debugln(['TLazPackageGraph.WriteMakefileCompiled IncPath="',IncPath,'" UnitPath="',UnitPath,'" Custom="',OtherOptions,'" Makefile.compiled="',TargetCompiledFile,'"']);
|
||||
debugln(['Hint: (lazarus) writing Makefile.compiled IncPath="',IncPath,'" UnitPath="',UnitPath,'" Custom="',OtherOptions,'" Makefile.compiled="',TargetCompiledFile,'"']);
|
||||
XMLConfig.SetValue('Params/Value',s);
|
||||
if XMLConfig.Modified then begin
|
||||
InvalidateFileStateCache;
|
||||
@ -4146,7 +4147,7 @@ begin
|
||||
// If the package directory is not writable, then the user does not want to
|
||||
// custom build
|
||||
// => silently skip
|
||||
DebugLn(['TPkgManager.DoWriteMakefile Skipping, because package directory is not writable: ',APackage.Directory]);
|
||||
DebugLn(['Error: (lazarus) Skipping writing Makefile, because package directory is not writable: ',APackage.Directory]);
|
||||
Result:=mrOk;
|
||||
exit;
|
||||
end;
|
||||
@ -4193,13 +4194,15 @@ begin
|
||||
MainSrcFile:=CreateRelativePath(SrcFilename,APackage.Directory);
|
||||
CustomOptions:=ConvertLazarusOptionsToMakefileOptions(CustomOptions);
|
||||
OtherOptions:=ConvertLazarusOptionsToMakefileOptions(OtherOptions);
|
||||
debugln(['TLazPackageGraph.WriteMakeFile Custom="',CustomOptions,'" Other="',OtherOptions,'"']);
|
||||
if ConsoleVerbosity>0 then
|
||||
debugln(['Hint: (lazarus) [TLazPackageGraph.WriteMakeFile] Custom="',CustomOptions,'" Other="',OtherOptions,'"']);
|
||||
if CustomOptions<>'' then
|
||||
if OtherOptions<>'' then
|
||||
OtherOptions:=OtherOptions+' '+CustomOptions
|
||||
else
|
||||
OtherOptions:=CustomOptions;
|
||||
debugln(['TLazPackageGraph.WriteMakeFile Other="',OtherOptions,'"']);
|
||||
if ConsoleVerbosity>0 then
|
||||
debugln(['Hint: (lazarus) [TLazPackageGraph.WriteMakeFile] Other="',OtherOptions,'"']);
|
||||
|
||||
// ---- Makefile.compiled ----------------------------------------------------
|
||||
|
||||
@ -4297,7 +4300,7 @@ begin
|
||||
// the package source is read only => ignore
|
||||
exit(mrOk);
|
||||
end;
|
||||
debugln(['TLazPackageGraph.WriteMakeFile unable to create file '+MakefileFPCFilename]);
|
||||
debugln(['Error: (lazarus) [TLazPackageGraph.WriteMakeFile] unable to create file '+MakefileFPCFilename]);
|
||||
exit(mrCancel);
|
||||
end;
|
||||
end;
|
||||
@ -4415,7 +4418,7 @@ begin
|
||||
// If the package directory is not writable, then the user does not want to
|
||||
// custom build
|
||||
// => silently skip
|
||||
DebugLn(['TPkgManager.DoWriteFpmake Skipping, because package directory is not writable: ',APackage.Directory]);
|
||||
DebugLn(['Note: (lazarus) Skipping writing fpmake.pp, because package directory is not writable: ',APackage.Directory]);
|
||||
Result:=mrOk;
|
||||
exit;
|
||||
end;
|
||||
@ -4432,10 +4435,12 @@ begin
|
||||
coptParsedPlatformIndependent,false);
|
||||
CustomOptions:=APackage.CompilerOptions.GetCustomOptions(
|
||||
coptParsedPlatformIndependent);
|
||||
debugln('CustomOptions (orig): ',CustomOptions);
|
||||
if ConsoleVerbosity>0 then
|
||||
debugln('Hint: (lazarus) Writing fpmake.pp: CustomOptions (orig): ',CustomOptions);
|
||||
OtherOptions:=APackage.CompilerOptions.MakeOptionsString(
|
||||
[ccloDoNotAppendOutFileOption,ccloNoMacroParams]);
|
||||
debugln('OtherOptions (orig): ',OtherOptions);
|
||||
if ConsoleVerbosity>0 then
|
||||
debugln('Hint: (lazarus) Writing fpmake.pp: OtherOptions (orig): ',OtherOptions);
|
||||
|
||||
// write compiled file
|
||||
Result:=WriteMakefileCompiled(APackage,FPmakeCompiledFilename,UnitPath,
|
||||
@ -4448,10 +4453,12 @@ begin
|
||||
// remove path delimiter at the end, or else it will fail on windows
|
||||
MainSrcFile:=CreateRelativePath(SrcFilename,APackage.Directory);
|
||||
CustomOptions:=ConvertLazarusOptionsToFpmakeOptions(CustomOptions);
|
||||
debugln('CustomOptions (fpmake format): ',CustomOptions);
|
||||
if ConsoleVerbosity>0 then
|
||||
debugln('Hint: (lazarus) Writing fpmake.pp: CustomOptions (fpmake format): ',CustomOptions);
|
||||
|
||||
OtherOptions:=ConvertLazarusOptionsToFpmakeOptions(OtherOptions);
|
||||
debugln('OtherOptions (fpmake format): ',OtherOptions);
|
||||
if ConsoleVerbosity>0 then
|
||||
debugln('Hint: (lazarus) Writing fpmake.pp: OtherOptions (fpmake format): ',OtherOptions);
|
||||
|
||||
e:=LineEnding;
|
||||
s:='';
|
||||
@ -4542,7 +4549,7 @@ begin
|
||||
// the package source is read only => ignore
|
||||
exit(mrOk);
|
||||
end;
|
||||
debugln(['TLazPackageGraph.WriteFpmake unable to create file '+FpmakeFPCFilename]);
|
||||
debugln(['Error: (lazarus) unable to create fpmake.pp file '+FpmakeFPCFilename]);
|
||||
exit(mrCancel);
|
||||
end;
|
||||
end;
|
||||
@ -4565,7 +4572,8 @@ begin
|
||||
end;
|
||||
exit;
|
||||
end;
|
||||
debugln(['TLazPackageGraph.WriteFpmake wrote: ',FpmakeFPCFilename]);
|
||||
if ConsoleVerbosity>0 then
|
||||
debugln(['Hint: (lazarus) wrote fpmake.pp: ',FpmakeFPCFilename]);
|
||||
|
||||
Result:=mrOk;
|
||||
end;
|
||||
@ -4595,14 +4603,14 @@ begin
|
||||
// => use the fallback directory
|
||||
NewOutputDir:=GetFallbackOutputDir(APackage);
|
||||
if (NewOutputDir=OutputDir) or (NewOutputDir='') then begin
|
||||
debugln(['TLazPackageGraph.PreparePackageOutputDirectory failed to create writable directory: ',OutputDir]);
|
||||
debugln(['Error: (lazarus) [TLazPackageGraph.PreparePackageOutputDirectory] failed to create writable directory: ',OutputDir]);
|
||||
exit(mrCancel);
|
||||
end;
|
||||
APackage.CompilerOptions.ParsedOpts.OutputDirectoryOverride:=NewOutputDir;
|
||||
OutputDir:=APackage.GetOutputDirectory;
|
||||
if not OutputDirectoryIsWritable(APackage,OutputDir,true) then
|
||||
begin
|
||||
debugln(['TLazPackageGraph.PreparePackageOutputDirectory failed to create writable directory: ',OutputDir]);
|
||||
debugln(['Error: (lazarus) [TLazPackageGraph.PreparePackageOutputDirectory] failed to create writable directory: ',OutputDir]);
|
||||
Result:=mrCancel;
|
||||
end;
|
||||
DeleteAllFilesInOutputDir:=true;
|
||||
@ -4652,7 +4660,7 @@ begin
|
||||
for i:=0 to CleanFiles.Count-1 do begin
|
||||
OutputFileName:=AppendPathDelim(OutputDir)+CleanFiles[i];
|
||||
if ConsoleVerbosity>1 then
|
||||
debugln(['clean up '+APackage.IDAsString+': '+OutputFileName]);
|
||||
debugln(['Hint: (lazarus) cleaning up package output directory of '+APackage.IDAsString+': '+OutputFileName]);
|
||||
Result:=DeleteFileInteractive(OutputFileName,[mbIgnore,mbAbort]);
|
||||
if Result in [mrCancel,mrAbort] then exit;
|
||||
end;
|
||||
@ -4667,12 +4675,12 @@ begin
|
||||
if not (CurFile.FileType in PkgFileUnitTypes) then continue;
|
||||
OutputFileName:=AppendPathDelim(OutputDir)+CurFile.Unit_Name+'.ppu';
|
||||
if ConsoleVerbosity>1 then
|
||||
debugln(['clean up '+APackage.IDAsString+': '+OutputFileName]);
|
||||
debugln(['Hint: (lazarus) cleaning up package output directory of '+APackage.IDAsString+': '+OutputFileName]);
|
||||
Result:=DeleteFileInteractive(OutputFileName,[mbIgnore,mbAbort]);
|
||||
if Result in [mrCancel,mrAbort] then exit;
|
||||
OutputFileName:=ChangeFileExt(OutputFileName,'.o');
|
||||
if ConsoleVerbosity>1 then
|
||||
debugln(['clean up '+APackage.IDAsString+': '+OutputFileName]);
|
||||
debugln(['Hint: (lazarus) cleaning up package output directory of '+APackage.IDAsString+': '+OutputFileName]);
|
||||
Result:=DeleteFileInteractive(OutputFileName,[mbIgnore,mbAbort]);
|
||||
if Result in [mrCancel,mrAbort] then exit;
|
||||
end;
|
||||
@ -4698,7 +4706,8 @@ begin
|
||||
Dir:='$(FallbackOutputRoot)'+PathDelim+APackage.Name+PathDelim+Dir;
|
||||
GlobalMacroList.SubstituteStr(Dir);
|
||||
Dir:=TrimFilename(Dir);
|
||||
debugln(['TLazPackageGraph.GetFallbackOutputDir ',APackage.Name,': ',Dir]);
|
||||
if ConsoleVerbosity>=0 then
|
||||
debugln(['Hint: (lazarus) Fallback output directory of ',APackage.Name,': ',Dir]);
|
||||
Result:=Dir;
|
||||
end;
|
||||
|
||||
@ -4811,7 +4820,7 @@ begin
|
||||
// delete ambiguous files
|
||||
Result:=DeleteAmbiguousFiles(SrcFilename);
|
||||
if Result=mrAbort then begin
|
||||
DebugLn('TLazPackageGraph.SavePackageMainSource DoDeleteAmbiguousFiles failed');
|
||||
DebugLn('Error: (lazarus) [TLazPackageGraph.SavePackageMainSource} DoDeleteAmbiguousFiles failed');
|
||||
exit;
|
||||
end;
|
||||
|
||||
@ -4922,7 +4931,7 @@ begin
|
||||
Result:=LoadCodeBuffer(CodeBuffer,SrcFilename,[lbfQuiet,lbfCheckIfText,
|
||||
lbfUpdateFromDisk,lbfCreateClearOnError],ShowAbort);
|
||||
if Result<>mrOk then begin
|
||||
DebugLn('TLazPackageGraph.SavePackageMainSource LoadCodeBuffer ',SrcFilename,' failed');
|
||||
DebugLn('Error: (lazarus) [TLazPackageGraph.SavePackageMainSource] LoadCodeBuffer ',SrcFilename,' failed');
|
||||
exit;
|
||||
end;
|
||||
// ignore comments
|
||||
@ -4943,7 +4952,7 @@ begin
|
||||
// save source
|
||||
Result:=SaveStringToFile(SrcFilename,Src,[],lisPkgMangpackageMainSourceFile);
|
||||
if Result<>mrOk then begin
|
||||
DebugLn('TLazPackageGraph.SavePackageMainSource SaveStringToFile ',SrcFilename,' failed');
|
||||
DebugLn('Error: (lazarus) [TLazPackageGraph.SavePackageMainSource] SaveStringToFile ',SrcFilename,' failed');
|
||||
exit;
|
||||
end;
|
||||
|
||||
@ -5396,7 +5405,7 @@ begin
|
||||
end else begin
|
||||
// there is already a package with this name, but wrong version open
|
||||
// -> unable to load this dependency due to conflict
|
||||
debugln('TLazPackageGraph.OpenDependency:');
|
||||
debugln('Error: (lazarus) [TLazPackageGraph.OpenDependency}:');
|
||||
if IsStaticBasePackage(APackage.Name) then
|
||||
begin
|
||||
debugln([' LazarusDir="',EnvironmentOptions.GetParsedLazarusDirectory,'"']);
|
||||
@ -5462,7 +5471,7 @@ var
|
||||
end;
|
||||
except
|
||||
on E: Exception do begin
|
||||
debugln(['ParseLPK "'+LPKFilename+'": '+E.Message]);
|
||||
debugln(['Error: (lazarus) error reading "'+LPKFilename+'": '+E.Message]);
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
@ -741,7 +741,7 @@ begin
|
||||
IconLRSFilename:=ChangeFileExt(Params.UnitFilename,'')+'_icon.lrs';
|
||||
CodeBuf:=CodeToolBoss.CreateFile(IconLRSFilename);
|
||||
if CodeBuf=nil then begin
|
||||
debugln(['TPkgManager.OnPackageEditorCreateFile file create failed: ',IconLRSFilename]);
|
||||
debugln(['Error: (lazarus) [TPkgManager.OnPackageEditorCreateFile] file create failed: ',IconLRSFilename]);
|
||||
exit;
|
||||
end;
|
||||
try
|
||||
@ -1542,14 +1542,14 @@ begin
|
||||
// check package name
|
||||
if (StaticPackage^.Name='') or (not IsValidUnitName(StaticPackage^.Name))
|
||||
then begin
|
||||
DebugLn('TPkgManager.LoadStaticCustomPackages Invalid Package Name: "',
|
||||
DebugLn('Warning: (lazarus) [TPkgManager.LoadStaticCustomPackages] Invalid Package Name: "',
|
||||
BinaryStrToText(StaticPackage^.Name),'"');
|
||||
continue;
|
||||
end;
|
||||
|
||||
// check register procedure
|
||||
if (StaticPackage^.RegisterProc=nil) then begin
|
||||
DebugLn('TPkgManager.LoadStaticCustomPackages',
|
||||
DebugLn('Warning: (lazarus) [TPkgManager.LoadStaticCustomPackages]',
|
||||
' Package "',StaticPackage^.Name,'" has no register procedure.');
|
||||
continue;
|
||||
end;
|
||||
@ -2514,7 +2514,7 @@ var
|
||||
r:=CopyFileWithErrorDialogs(OldFilename,NewFilename,[mbAbort,mbIgnore]);
|
||||
end;
|
||||
if not (r in [mrIgnore,mrOK]) then begin
|
||||
debugln(['MoveOrCopyFile ERROR: rename/copy failed: "',OldFilename,'" to "',NewFilename,'"']);
|
||||
debugln(['Error: MoveOrCopyFile: rename/copy failed: "',OldFilename,'" to "',NewFilename,'"']);
|
||||
exit;
|
||||
end;
|
||||
end else begin
|
||||
@ -3311,7 +3311,7 @@ begin
|
||||
ConflictDependency:=PackageGraph.FindConflictRecursively(
|
||||
AProject.FirstRequiredDependency,APackage);
|
||||
if ConflictDependency<>nil then begin
|
||||
DebugLn(['TPkgManager.AddProjectDependency ',APackage.IDAsString,' conflicts with ',ConflictDependency.AsString]);
|
||||
DebugLn(['Error: (lazarus) [TPkgManager.AddProjectDependency] ',APackage.IDAsString,' conflicts with ',ConflictDependency.AsString]);
|
||||
Result:=mrCancel;
|
||||
exit;
|
||||
end;
|
||||
@ -3330,7 +3330,7 @@ begin
|
||||
if ProvidingAPackage<>nil then
|
||||
begin
|
||||
// package is already provided by another package
|
||||
DebugLn(['TPkgManager.AddProjectDependency ',APackage.Name,' is already provided by ',ProvidingAPackage.IDAsString]);
|
||||
DebugLn(['Error: (lazarus) [TPkgManager.AddProjectDependency] ',APackage.Name,' is already provided by ',ProvidingAPackage.IDAsString]);
|
||||
Result:=mrOk;
|
||||
exit;
|
||||
end;
|
||||
@ -3397,7 +3397,7 @@ begin
|
||||
if (PkgName='') or (not IsValidUnitName(PkgName)) then continue;
|
||||
APackage:=PackageGraph.FindPackageWithName(PkgName,nil);
|
||||
if APackage=nil then begin
|
||||
DebugLn(['TPkgManager.AddProjectDependencies package not found: ',PkgName]);
|
||||
DebugLn(['Error: (lazarus) [TPkgManager.AddProjectDependencies] package not found: ',PkgName]);
|
||||
if OnlyTestIfPossible then
|
||||
exit(mrCancel);
|
||||
continue;
|
||||
@ -3895,7 +3895,7 @@ var
|
||||
// search path contains source directory of another package
|
||||
if Option=pcosIncludePath then;
|
||||
s:=aType+' of "'+aCompilerOptions.GetOwnerName+'" contains "'+Dir+'", which belongs to package "'+OtherPackage.Name+'"';
|
||||
debugln(['TPkgManager.CheckUserSearchPaths WARNING: ',s]);
|
||||
debugln(['Warning: (lazarus) [TPkgManager.CheckUserSearchPaths]: ',s]);
|
||||
{ ToDo: find out
|
||||
- which path it is in the unparsed path
|
||||
- if there is already the dependency
|
||||
@ -3928,7 +3928,7 @@ var
|
||||
if FilenameIsPascalUnit(aFilename) then begin
|
||||
// warning: packages output path contain unit source
|
||||
s:='output directory of '+aCompilerOptions.GetOwnerName+' contains Pascal unit source "'+aFilename+'"';
|
||||
debugln(['CheckOutPathContainsSources WARNING: ',s]);
|
||||
debugln(['Warning: (lazarus) [CheckOutPathContainsSources]: ',s]);
|
||||
{ ToDo: if the OutPath is not the default: ask user and change it }
|
||||
IDEMessagesWindow.AddCustomMessage(mluWarning,s);
|
||||
exit;
|
||||
@ -3959,7 +3959,7 @@ var
|
||||
// Note: when changing this, update TQuickFixSrcPathOfPkgContains_OpenPkg
|
||||
s:=Format(lisOtherSourcesPathOfPackageContainsDirectoryWhichIsA, [
|
||||
aCompilerOptions.GetOwnerName, Dir]);
|
||||
debugln(['CheckSrcPathIsInUnitPath WARNING: ',s]);
|
||||
debugln(['Warning: (lazarus) [CheckSrcPathIsInUnitPath]: ',s]);
|
||||
{ ToDo: ask user and remove dir from unit path }
|
||||
IDEMessagesWindow.AddCustomMessage(mluWarning,s);
|
||||
exit;
|
||||
@ -4066,7 +4066,7 @@ var
|
||||
if FileIsInPath(Filename,NewLazarusSrcDir)
|
||||
and FileExistsUTF8(Filename) then
|
||||
begin
|
||||
DebugLn(['TPkgManager.LazarusSrcDirChanged load: ',Filename]);
|
||||
DebugLn(['Hint: (lazarus) [TPkgManager.LazarusSrcDirChanged] load: ',Filename]);
|
||||
// open package in new lazarus source directory
|
||||
MsgResult:=DoOpenPackageFile(Filename,[pofDoNotOpenEditor,pofRevert],true);
|
||||
if MsgResult=mrAbort then exit(false);
|
||||
@ -4082,9 +4082,9 @@ begin
|
||||
NewLazarusSrcDir:=EnvironmentOptions.GetParsedLazarusDirectory;
|
||||
FLastLazarusSrcDir:=NewLazarusSrcDir;
|
||||
if CompareFilenames(OldLazarusSrcDir,NewLazarusSrcDir)=0 then exit;
|
||||
debugln(['TPkgManager.LazarusSrcDirChanged loading new lpl files from ',PkgLinks.GetGlobalLinkDirectory]);
|
||||
debugln(['Hint: (lazarus) [TPkgManager.LazarusSrcDirChanged] loading new lpl files from ',PkgLinks.GetGlobalLinkDirectory]);
|
||||
if PkgLinks.IsUpdating then
|
||||
debugln(['TPkgManager.LazarusSrcDirChanged inconsistency: pkglinks are locked']);
|
||||
debugln(['Warning: (lazarus) [TPkgManager.LazarusSrcDirChanged] inconsistency: pkglinks are locked']);
|
||||
PkgLinks.UpdateGlobalLinks;
|
||||
|
||||
VisitedPkgs:=TStringToStringTree.Create(false);
|
||||
@ -4176,8 +4176,8 @@ function TPkgManager.DoCompilePackage(APackage: TLazPackage;
|
||||
Flags: TPkgCompileFlags; ShowAbort: boolean): TModalResult;
|
||||
begin
|
||||
Result:=mrCancel;
|
||||
|
||||
DebugLn('TPkgManager.DoCompilePackage A ',APackage.IDAsString,' Flags=',PkgCompileFlagsToString(Flags));
|
||||
|
||||
DebugLn('Hint: (lazarus) compile package ',APackage.IDAsString,' Flags=',PkgCompileFlagsToString(Flags));
|
||||
|
||||
if APackage.IsVirtual then exit;
|
||||
|
||||
@ -4236,7 +4236,7 @@ begin
|
||||
if (OldPkgFile=nil) or (OldPkgFile.LazPackage.ReadOnly) then
|
||||
exit;
|
||||
OldPackage:=OldPkgFile.LazPackage;
|
||||
debugln('TPkgManager.OnRenameFile A OldPackage="',OldPackage.Name);
|
||||
debugln('Hint: (lazarus) [TPkgManager.OnRenameFile] OldPackage="',OldPackage.Name);
|
||||
NewPkgFile:=PackageGraph.FindFileInAllPackages(NewFilename,true,false);
|
||||
if (NewPkgFile<>nil) and (OldPackage<>NewPkgFile.LazPackage) then exit;
|
||||
|
||||
@ -4438,10 +4438,10 @@ var
|
||||
RequiredPackage:=TLazPackage(MissingDependencies.Objects[i]);
|
||||
RequiredPackage:=TLazPackage(RedirectPackageDependency(RequiredPackage));
|
||||
if UnitOwner is TProject then begin
|
||||
DebugLn('TPkgManager.AddUnitDependenciesForComponentClasses Adding Project Dependency ',TProject(UnitOwner).GetTitle,' -> ',RequiredPackage.Name);
|
||||
DebugLn('Hint: (lazarus) [TPkgManager.AddUnitDependenciesForComponentClasses] Adding Project Dependency ',TProject(UnitOwner).GetTitle,' -> ',RequiredPackage.Name);
|
||||
AddProjectDependency(TProject(UnitOwner),RequiredPackage);
|
||||
end else if UnitOwner is TLazPackage then begin
|
||||
DebugLn('TPkgManager.AddUnitDependenciesForComponentClasses Adding Package Dependency ',TLazPackage(UnitOwner).Name,' -> ',RequiredPackage.Name);
|
||||
DebugLn('Hint: (lazarus) [TPkgManager.AddUnitDependenciesForComponentClasses] Adding Package Dependency ',TLazPackage(UnitOwner).Name,' -> ',RequiredPackage.Name);
|
||||
AddPackageDependency(TLazPackage(UnitOwner),RequiredPackage.Name);
|
||||
end;
|
||||
end;
|
||||
@ -4456,7 +4456,7 @@ var
|
||||
Result:=LoadAndParseUnitBuf;
|
||||
if Result<>mrOk then exit;
|
||||
for i:=0 to UnitNames.Count-1 do begin
|
||||
DebugLn('TPkgManager.AddUnitDependenciesForComponentClasses Extending Uses ',UnitBuf.Filename,' ',UnitNames[i]);
|
||||
DebugLn('Hint: (lazarus) [TPkgManager.AddUnitDependenciesForComponentClasses] Extending Uses ',UnitBuf.Filename,' ',UnitNames[i]);
|
||||
if not CodeToolBoss.AddUnitToMainUsesSection(UnitBuf,UnitNames[i],'') then
|
||||
MainIDE.DoJumpToCodeToolBossError;
|
||||
end;
|
||||
@ -4569,7 +4569,7 @@ begin
|
||||
end;
|
||||
UnitOwners.Free;
|
||||
end else begin
|
||||
DebugLn(['TPkgManager.GetMissingDependenciesForUnit WARNING: unit has no owner: ',UnitFilename]);
|
||||
DebugLn(['Warning: (lazarus) [TPkgManager.GetMissingDependenciesForUnit] unit has no owner: ',UnitFilename]);
|
||||
end;
|
||||
Result:=mrOk;
|
||||
end;
|
||||
@ -4971,7 +4971,7 @@ begin
|
||||
// find needed package
|
||||
RequiredPkgFile:=SearchUnitInDesigntimePackages(RequiredUnitName,nil);
|
||||
if RequiredPkgFile=nil then begin
|
||||
DebugLn(['TPkgManager.AddDependencyToUnitOwners unit not in designtime package: ',RequiredUnitName]);
|
||||
DebugLn(['Note: (lazarus) [TPkgManager.AddDependencyToUnitOwners] unit not in designtime package: ',RequiredUnitName]);
|
||||
exit;
|
||||
end;
|
||||
RequiredPkg:=RequiredPkgFile.LazPackage;
|
||||
@ -4980,7 +4980,7 @@ begin
|
||||
OwnersList:=GetOwnersOfUnit(OwnedFilename);
|
||||
try
|
||||
if (OwnersList=nil) or (OwnersList.Count=0) then begin
|
||||
DebugLn(['TPkgManager.AddDependencyToUnitOwners Owner not found of unit ',OwnedFilename]);
|
||||
DebugLn(['Note: (lazarus) TPkgManager.AddDependencyToUnitOwners Owner not found of unit ',OwnedFilename]);
|
||||
exit;
|
||||
end;
|
||||
// add package dependency
|
||||
@ -5010,14 +5010,14 @@ begin
|
||||
Filename:=APackageList[i];
|
||||
if Filename='' then
|
||||
Filename:=APackage.Filename;
|
||||
debugln(['TPkgManager.RevertPackages BEFORE Old=',APackage.Filename,' New=',Filename,' ',FileExistsCached(Filename)]);
|
||||
debugln(['Hint: (lazarus) [TPkgManager.RevertPackages] BEFORE Old=',APackage.Filename,' New=',Filename,' ',FileExistsCached(Filename)]);
|
||||
if FileExistsCached(Filename) then
|
||||
Result:=DoOpenPackageFile(Filename,[pofRevert],true)
|
||||
else begin
|
||||
APackage.LPKSource:=nil;
|
||||
APackage.Missing:=true;
|
||||
end;
|
||||
debugln(['TPkgManager.RevertPackages AFTER ',PackageGraph.FindPackageWithFilename(Filename)<>nil]);
|
||||
debugln(['Hint: (lazarus) [TPkgManager.RevertPackages] AFTER ',PackageGraph.FindPackageWithFilename(Filename)<>nil]);
|
||||
if Result=mrAbort then exit;
|
||||
end;
|
||||
Result:=mrOk;
|
||||
@ -5067,7 +5067,7 @@ begin
|
||||
if FilenameIsPascalUnit(Filename) then begin
|
||||
Result:=DoGetUnitRegisterInfo(Filename,TheUnitName,HasRegisterProc,false);
|
||||
if Result<>mrOk then begin
|
||||
debugln(['TPkgManager.DoAddActiveUnitToAPackage DoGetUnitRegisterInfo failed']);
|
||||
debugln(['Error: (lazarus) [TPkgManager.DoAddActiveUnitToAPackage] DoGetUnitRegisterInfo failed']);
|
||||
exit;
|
||||
end;
|
||||
end;
|
||||
@ -5135,7 +5135,7 @@ begin
|
||||
SaveFlags:=[sfCanAbort];
|
||||
if not FilenameIsAbsolute(AFilename) then
|
||||
SaveFlags:=[sfSaveAs];
|
||||
debugln(['TPkgManager.SavePackageFiles saving ',AFilename]);
|
||||
debugln(['Error: (lazarus) [TPkgManager.SavePackageFiles] failed writing "',AFilename,'"']);
|
||||
Result:=LazarusIDE.DoSaveEditorFile(SrcEdit,SaveFlags);
|
||||
if Result=mrIgnore then Result:=mrOk;
|
||||
if Result<>mrOk then exit;
|
||||
@ -5855,7 +5855,7 @@ begin
|
||||
EnvironmentOptions.GetParsedLazarusDirectory,false);
|
||||
if Result<>mrOk then begin
|
||||
if ConsoleVerbosity>0 then
|
||||
debugln(['TPkgManager.DoCompileAutoInstallPackages CheckPackageGraphForCompilation failed']);
|
||||
debugln(['Error: (lazarus) [TPkgManager.DoCompileAutoInstallPackages] CheckPackageGraphForCompilation failed']);
|
||||
exit;
|
||||
end;
|
||||
//DebugLn(['TPkgManager.DoCompileAutoInstallPackages LCLUnitPath=',PackageGraph.LCLPackage.CompilerOptions.GetUnitPath(true)]);
|
||||
@ -5865,7 +5865,7 @@ begin
|
||||
Result:=MainIDE.DoSaveForBuild(crCompile);
|
||||
if Result<>mrOk then begin
|
||||
if ConsoleVerbosity>0 then
|
||||
debugln(['TPkgManager.DoCompileAutoInstallPackages MainIDE.DoSaveForBuild failed']);
|
||||
debugln(['Error: (lazarus) [TPkgManager.DoCompileAutoInstallPackages] MainIDE.DoSaveForBuild failed']);
|
||||
exit;
|
||||
end;
|
||||
end;
|
||||
@ -5878,7 +5878,7 @@ begin
|
||||
CompilePolicy);
|
||||
if Result<>mrOk then begin
|
||||
if ConsoleVerbosity>0 then
|
||||
debugln(['TPkgManager.DoCompileAutoInstallPackages PackageGraph.CompileRequiredPackages failed']);
|
||||
debugln(['Error: (lazarus) [TPkgManager.DoCompileAutoInstallPackages] PackageGraph.CompileRequiredPackages failed']);
|
||||
exit;
|
||||
end;
|
||||
|
||||
@ -6105,7 +6105,7 @@ begin
|
||||
for i := 0 to UnitList.Count - 1 do
|
||||
begin
|
||||
ARoot := TUnitInfo(UnitList[i]).Component;
|
||||
DebugLn(['TPkgManager.FindReferencedRootComponent Root=',dbgsName(CurRoot),' Searched="',ComponentName,'" other root=',dbgsName(ARoot)]);
|
||||
DebugLn(['Hint: (lazarus) [TPkgManager.FindReferencedRootComponent] Root=',dbgsName(CurRoot),' Searched="',ComponentName,'" other root=',dbgsName(ARoot)]);
|
||||
if (ARoot <> nil) and (SysUtils.CompareText(ComponentName, ARoot.Name) = 0) then
|
||||
begin
|
||||
Result := ARoot;
|
||||
|
Loading…
Reference in New Issue
Block a user