From 7ab4a1c5265a8dbc1883f533d137b6b94b0875dc Mon Sep 17 00:00:00 2001 From: mattias Date: Wed, 11 Mar 2015 23:53:07 +0000 Subject: [PATCH] IDE: resourcestring git-svn-id: trunk@48277 - --- ide/initialsetupproc.pas | 24 ++++++++++++++---------- ide/lazarusidestrconsts.pas | 2 +- 2 files changed, 15 insertions(+), 11 deletions(-) diff --git a/ide/initialsetupproc.pas b/ide/initialsetupproc.pas index f66f69d361..52c359a1b0 100644 --- a/ide/initialsetupproc.pas +++ b/ide/initialsetupproc.pas @@ -308,6 +308,18 @@ function CheckCompilerQuality(AFilename: string; out Note: string; TestSrcFilename: string): TSDFilenameQuality; var CfgCache: TFPCTargetConfigCache; + + function CheckPPU(const AnUnitName: string): boolean; + begin + if CompareFileExt(CfgCache.Units[AnUnitName],'ppu',false)<>0 then + begin + Note:=Format(lisPpuNotFoundCheckYourFpcCfg, [AnUnitName]); + Result:=false; + end else + Result:=true; + end; + +var i: LongInt; ShortFilename: String; begin @@ -357,17 +369,9 @@ begin end; if (CfgCache.RealTargetCPU='jvm') then begin - if (CompareFileExt(CfgCache.Units['uuchar'],'ppu',false)<>0) then - begin - Note:= 'uuchar.ppu not found. Check your fpc.cfg.'; - exit; - end; + if not CheckPPU('uuchar') then exit; end else begin - if (CompareFileExt(CfgCache.Units['classes'],'ppu',false)<>0) then - begin - Note:=lisClassesPpuNotFoundCheckYourFpcCfg; - exit; - end; + if not CheckPPU('classes') then exit; end; end; diff --git a/ide/lazarusidestrconsts.pas b/ide/lazarusidestrconsts.pas index bf899869ae..f9c8a781d2 100644 --- a/ide/lazarusidestrconsts.pas +++ b/ide/lazarusidestrconsts.pas @@ -5658,13 +5658,13 @@ resourcestring +'file name. Usually it starts with fpc, ppc or ppcross.'; lisFpcCfgIsMissing = 'fpc.cfg is missing.'; lisSystemPpuNotFoundCheckYourFpcCfg = 'system.ppu not found. Check your fpc.cfg.'; - lisClassesPpuNotFoundCheckYourFpcCfg = 'classes.ppu not found. Check your fpc.cfg.'; lisWelcomeToLazarusIDE = 'Welcome to Lazarus IDE %s'; lisStartIDE = 'Start IDE'; lisUnableToLoadFile2 = 'unable to load file %s: %s'; lisDirectoryNotFound2 = 'directory %s not found'; lisFileNotFound3 = 'file %s not found'; lisFileNotFound4 = 'file not found'; + lisPpuNotFoundCheckYourFpcCfg = '%s.ppu not found. Check your fpc.cfg.'; lisISDDirectoryNotFound = 'directory not found'; lisDebuggerFeedbackInformation = 'Debugger Information'; lisDebuggerFeedbackWarning = 'Debugger Warning';