From 9ece157c2a26e4b406bb1190bd2c63aec807d08b Mon Sep 17 00:00:00 2001 From: mattias Date: Wed, 18 Mar 2015 17:11:43 +0000 Subject: [PATCH] IDEIntf: added HasGUI git-svn-id: trunk@48413 - --- components/ideintf/ideoptionsintf.pas | 3 +++ ide/basebuildmanager.pas | 3 --- ide/buildmanager.pas | 2 +- ide/lazarus.pp | 2 ++ ide/lazbuild.lpr | 4 ++-- ide/main.pp | 3 +-- 6 files changed, 9 insertions(+), 8 deletions(-) diff --git a/components/ideintf/ideoptionsintf.pas b/components/ideintf/ideoptionsintf.pas index 8550fe19ca..d5e851223f 100644 --- a/components/ideintf/ideoptionsintf.pas +++ b/components/ideintf/ideoptionsintf.pas @@ -313,6 +313,9 @@ const GroupPkgCompiler = 200200; +var + HasGUI: boolean = true; // lazbuild sets this to false + implementation var diff --git a/ide/basebuildmanager.pas b/ide/basebuildmanager.pas index 31a6079a6e..e0d1848062 100644 --- a/ide/basebuildmanager.pas +++ b/ide/basebuildmanager.pas @@ -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; diff --git a/ide/buildmanager.pas b/ide/buildmanager.pas index 355b42c9dc..a89ac599e7 100644 --- a/ide/buildmanager.pas +++ b/ide/buildmanager.pas @@ -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, diff --git a/ide/lazarus.pp b/ide/lazarus.pp index 2339601744..4e84eacbb4 100644 --- a/ide/lazarus.pp +++ b/ide/lazarus.pp @@ -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; diff --git a/ide/lazbuild.lpr b/ide/lazbuild.lpr index 1a0a3aac36..8b8bf956a0 100644 --- a/ide/lazbuild.lpr +++ b/ide/lazbuild.lpr @@ -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; diff --git a/ide/main.pp b/ide/main.pp index 74d9c4469a..a8390af4f2 100644 --- a/ide/main.pp +++ b/ide/main.pp @@ -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