IDE: Cleanup, make the code more readable.

git-svn-id: trunk@28232 -
This commit is contained in:
juha 2010-11-14 22:44:39 +00:00
parent 6621b04689
commit e80c52f6f7

View File

@ -1854,10 +1854,12 @@ var
NewTargetCPU: String; NewTargetCPU: String;
NewLCLWidgetSet: String; NewLCLWidgetSet: String;
begin begin
MiscellaneousOptions.BuildLazProfiles.UpdateGlobals; with MiscellaneousOptions do begin
NewTargetOS:=MiscellaneousOptions.BuildLazOpts.TargetOS; BuildLazProfiles.UpdateGlobals;
NewTargetCPU:=MiscellaneousOptions.BuildLazOpts.TargetCPU; NewTargetOS:=BuildLazOpts.TargetOS;
NewLCLWidgetSet:=LCLPlatformDirNames[MiscellaneousOptions.BuildLazOpts.TargetPlatform]; NewTargetCPU:=BuildLazOpts.TargetCPU;
NewLCLWidgetSet:=LCLPlatformDirNames[BuildLazOpts.TargetPlatform];
end;
if (NewTargetOS='') or (NewTargetOS='default') then if (NewTargetOS='') or (NewTargetOS='default') then
NewTargetOS:=GetDefaultTargetOS; NewTargetOS:=GetDefaultTargetOS;
if (NewTargetCPU='') or (NewTargetCPU='default') then if (NewTargetCPU='') or (NewTargetCPU='default') then
@ -1873,11 +1875,13 @@ var
NewLCLWidgetSet: TLCLPlatform; NewLCLWidgetSet: TLCLPlatform;
BuildIDE: Boolean; BuildIDE: Boolean;
begin begin
MiscellaneousOptions.BuildLazProfiles.UpdateGlobals; with MiscellaneousOptions do begin
NewTargetOS:=LowerCase(MiscellaneousOptions.BuildLazProfiles.Current.TargetOS); BuildLazProfiles.UpdateGlobals;
NewTargetCPU:=LowerCase(MiscellaneousOptions.BuildLazProfiles.Current.TargetCPU); NewTargetOS:=LowerCase(BuildLazOpts.TargetOS);
NewLCLWidgetSet:=MiscellaneousOptions.BuildLazProfiles.Current.TargetPlatform; NewTargetCPU:=LowerCase(BuildLazOpts.TargetCPU);
BuildIDE:=MiscellaneousOptions.BuildLazProfiles.CurrentIdeMode in [mmBuild,mmCleanBuild]; NewLCLWidgetSet:=BuildLazOpts.TargetPlatform;
BuildIDE:=BuildLazProfiles.CurrentIdeMode in [mmBuild,mmCleanBuild];
end;
//debugln(['TBuildManager.BuildTargetIDEIsDefault NewTargetOS=',NewTargetOS,' Default=',GetDefaultTargetOS,' NewTargetCPU=',NewTargetCPU,' default=',GetDefaultTargetCPU,' ws=',LCLPlatformDisplayNames[NewLCLWidgetSet],' default=',LCLPlatformDisplayNames[GetDefaultLCLWidgetType]]); //debugln(['TBuildManager.BuildTargetIDEIsDefault NewTargetOS=',NewTargetOS,' Default=',GetDefaultTargetOS,' NewTargetCPU=',NewTargetCPU,' default=',GetDefaultTargetCPU,' ws=',LCLPlatformDisplayNames[NewLCLWidgetSet],' default=',LCLPlatformDisplayNames[GetDefaultLCLWidgetType]]);
Result:=BuildIDE and ((NewTargetOS='') or (NewTargetOS=GetDefaultTargetOS)) Result:=BuildIDE and ((NewTargetOS='') or (NewTargetOS=GetDefaultTargetOS))
and ((NewTargetCPU='') or (NewTargetCPU=GetDefaultTargetCPU)); and ((NewTargetCPU='') or (NewTargetCPU=GetDefaultTargetCPU));