On Sun, 2019-01-13 at 12:31 +0100, Abou Al Montacir wrote:... > The error messages current location is decided by FPC make file and not by our > scripts. And even it we are going to overwrite this we may want to move the > error files to either/usr/share/fpc/3.0.4/compiler/msg/errore.msgor > to/usr/share/fp-compiler-3.0.4/msg/errore.msgbut not > to/usr/share/fpcsrc/3..4/compiler/msg/errore.msg > For now I'll probably try to change Lazarus default search path. I've tried several attempts to fix that but failed to find a way to get "gnu" in "$(TargetCPU)-$(TargetOS)-gnu" in the attached patch. I now consider again using the upstream path: > /usr/share/fpcsrc/3..4/compiler/msg/errore.msg using either a move command in rules file or a symbolic link entry in the .link file. Can anyone advise what is better? -- Cheers, Abou Al Montacir
diff --git a/ide/etfpcmsgparser.pas b/ide/etfpcmsgparser.pas index 38da4adb..4d423b44 100644 --- a/ide/etfpcmsgparser.pas +++ b/ide/etfpcmsgparser.pas @@ -1013,6 +1013,13 @@ begin FPCVer:=CodeToolBoss.FPCDefinesCache.GetFPCVersion(CompilerFilename,TargetOS,TargetCPU,false) else FPCVer:=''; + aFileName := GetForcedPathDelims('/usr/lib/$(TargetCPU)-$(TargetOS)-gnu/fpc/$(FpcVer)/msg/errore.msg'); + if not GlobalMacroList.SubstituteStr(aFilename) then begin + debugln(['TFPCMsgFilePool.GetMsgFileNames failed for ',CompilerFilename,' TargetCPU="',TargetCpu,'"',' TargetOS="',TargetOs,'"']); + end; + if FileExistsCached(aFilename) then begin + fCurrentEnglishFile:=aFilename; + end else begin FPCSrcDir:=EnvironmentOptions.GetParsedFPCSourceDirectory(FPCVer); if FilenameIsAbsolute(FPCSrcDir) then begin // FPCSrcDir exists => use the errore.msg @@ -1020,6 +1027,7 @@ begin if FileExistsCached(aFilename) then fCurrentEnglishFile:=aFilename; end; + end; if not FileExistsCached(fCurrentEnglishFile) then begin // as fallback use the copy in the Codetools directory aFilename:=EnvironmentOptions.GetParsedLazarusDirectory;
signature.asc
Description: This is a digitally signed message part