IDEIntf: added HasGUI

git-svn-id: trunk@48413 -
This commit is contained in:
mattias 2015-03-18 17:11:43 +00:00
parent b962b0dc8a
commit 9ece157c2a
6 changed files with 9 additions and 8 deletions

View File

@ -313,6 +313,9 @@ const
GroupPkgCompiler = 200200;
var
HasGUI: boolean = true; // lazbuild sets this to false
implementation
var

View File

@ -40,12 +40,9 @@ type
{ TBaseBuildManager }
TBaseBuildManager = class(TComponent)
private
FHasGUI: boolean;
public
constructor Create(AOwner: TComponent); override;
destructor Destroy; override;
property HasGUI: boolean read FHasGUI write FHasGUI;
// methods for building IDE (will be changed when project groups are there)
procedure SetBuildTargetProject1; virtual; abstract;

View File

@ -42,7 +42,7 @@ uses
ExprEval, BasicCodeTools, CodeToolManager, DefineTemplates, CodeCache,
FileProcs, CodeToolsCfgScript, CodeToolsStructs,
// IDEIntf
ProjectIntf, MacroIntf, IDEDialogs, IDEExternToolIntf,
IDEOptionsIntf, ProjectIntf, MacroIntf, IDEDialogs, IDEExternToolIntf,
CompOptsIntf, LazIDEIntf, MacroDefIntf, IDEMsgIntf,
// IDE
IDECmdLine, LazarusIDEStrConsts, DialogProcs, IDEProcs, CodeToolsOptions,

View File

@ -53,6 +53,7 @@ uses
SysUtils,
Interfaces,
Forms, LCLProc,
IDEOptionsIntf,
LazConf, IDEGuiCmdLine,
Splash,
Main,
@ -78,6 +79,7 @@ uses
{$R ../images/laz_images.res}
begin
HasGUI:=true;
{$IFDEF IDE_MEM_CHECK}CheckHeapWrtMemCnt('lazarus.pp: begin');{$ENDIF}
RequireDerivedFormResource := True;

View File

@ -36,7 +36,7 @@ uses
CodeCache, CodeToolManager, DefineTemplates, Laz2_XMLCfg, LazUTF8,
// IDEIntf
MacroIntf, PackageIntf, IDEDialogs, ProjectIntf, IDEExternToolIntf,
CompOptsIntf, LazIDEIntf,
CompOptsIntf, IDEOptionsIntf, LazIDEIntf,
// IDE
IDEProcs, InitialSetupProc, ExtTools, CompilerOptions, ApplicationBundle,
TransferMacros, EnvironmentOpts, IDETranslations, LazarusIDEStrConsts,
@ -1076,7 +1076,6 @@ begin
CreatePrimaryConfigPath;
MainBuildBoss:=TBuildManager.Create(nil);
MainBuildBoss.HasGUI:=false;
SetupMacros;
LoadEnvironmentOptions;
if Terminated then exit(false);
@ -1662,6 +1661,7 @@ begin
{$IFDEF BuildWidgetSetCocoa} Result:=lpCocoa; {$ENDIF}
{$IFDEF BuildWidgetSetNoGui} Result:=lpNoGUI; {$ENDIF}
HasGUI:=false;
FilterConfigFileContent;
// free LCL Application to help debugging nogui issues
Application.Free;

View File

@ -1422,7 +1422,6 @@ begin
SetupDialogs;
MainBuildBoss:=TBuildManager.Create(nil);
MainBuildBoss.HasGUI:=true;
{$IFDEF IDE_MEM_CHECK}CheckHeapWrtMemCnt('TMainIDE.Create BUILD MANAGER');{$ENDIF}
// setup macros before loading options
MainBuildBoss.SetupTransferMacros;
@ -7338,7 +7337,7 @@ begin
ToolStatus:=itBuilder;
with MiscellaneousOptions do
try
if MainBuildBoss.HasGUI then begin
if HasGUI then begin
// Note: while the IDE is running the user might run another IDE,
// => save install list, so that starting the new IDE shows the right
// package list