IDE: setup dialog: when changing compiler check the compiler again and update targetos/cpu/fpcver

git-svn-id: trunk@48279 -
This commit is contained in:
mattias 2015-03-12 00:32:26 +00:00
parent 7ab4a1c526
commit 76e7197049
2 changed files with 10 additions and 2 deletions

View File

@ -2094,7 +2094,7 @@ begin
Compute; Compute;
FFPCVerChangeStamp:=CompilerParseStamp; FFPCVerChangeStamp:=CompilerParseStamp;
{$IFDEF VerboseFPCSrcScan} {$IFDEF VerboseFPCSrcScan}
debugln(['TBuildManager.MacroFuncFPCVer FPCVer=',FFPCVer,' FPC_FULLVERSION=',FFPC_FULLVERSION]); debugln(['TBuildManager.MacroFuncFPCVer FPCVer=',FFPCVer,' FPC_FULLVERSION=',FFPC_FULLVERSION,' Stamp=',FFPCVerChangeStamp]);
{$ENDIF} {$ENDIF}
end; end;
Result:=FFPCVer; Result:=FFPCVer;

View File

@ -45,7 +45,7 @@ uses
LazLogger, Graphics, ComCtrls, ExtCtrls, StdCtrls, DefineTemplates, LazLogger, Graphics, ComCtrls, ExtCtrls, StdCtrls, DefineTemplates,
CodeToolManager, FileProcs, TransferMacros, MacroDefIntf, GDBMIDebugger, CodeToolManager, FileProcs, TransferMacros, MacroDefIntf, GDBMIDebugger,
DbgIntfDebuggerBase, LazarusIDEStrConsts, LazConf, EnvironmentOpts, IDEProcs, DbgIntfDebuggerBase, LazarusIDEStrConsts, LazConf, EnvironmentOpts, IDEProcs,
AboutFrm, IDETranslations, InitialSetupProc; AboutFrm, IDETranslations, BaseBuildManager, InitialSetupProc;
type type
TInitialSetupDialog = class; TInitialSetupDialog = class;
@ -964,6 +964,7 @@ var
Quality: TSDFilenameQuality; Quality: TSDFilenameQuality;
s: String; s: String;
ImageIndex: Integer; ImageIndex: Integer;
CfgCache: TFPCTargetConfigCache;
begin begin
if csDestroying in ComponentState then exit; if csDestroying in ComponentState then exit;
CurCaption:=CompilerComboBox.Text; CurCaption:=CompilerComboBox.Text;
@ -971,6 +972,13 @@ begin
if fLastParsedCompiler=EnvironmentOptions.GetParsedCompilerFilename then exit; if fLastParsedCompiler=EnvironmentOptions.GetParsedCompilerFilename then exit;
fLastParsedCompiler:=EnvironmentOptions.GetParsedCompilerFilename; fLastParsedCompiler:=EnvironmentOptions.GetParsedCompilerFilename;
//debugln(['TInitialSetupDialog.UpdateCompilerNote ',fLastParsedCompiler]); //debugln(['TInitialSetupDialog.UpdateCompilerNote ',fLastParsedCompiler]);
// check compiler again
CfgCache:=CodeToolBoss.FPCDefinesCache.ConfigCaches.Find(
fLastParsedCompiler,'','','',true);
CfgCache.Update(CodeToolBoss.FPCDefinesCache.TestFilename);
BuildBoss.SetBuildTargetIDE;
Quality:=CheckCompilerQuality(fLastParsedCompiler,Note, Quality:=CheckCompilerQuality(fLastParsedCompiler,Note,
CodeToolBoss.FPCDefinesCache.TestFilename); CodeToolBoss.FPCDefinesCache.TestFilename);
if Quality<>sddqInvalid then begin if Quality<>sddqInvalid then begin