From 6c8f081d969315ae82d62d6f59fac1ca30c4abd1 Mon Sep 17 00:00:00 2001 From: juha Date: Tue, 20 Dec 2016 00:09:19 +0000 Subject: [PATCH] LazBuild: Remove SynEdit dependency completely. git-svn-id: trunk@53730 - --- ide/buildmanager.pas | 1 - ide/environmentopts.pp | 9 ++++-- ide/lazbuild.lpi | 72 ++++++++++++++++++++++++++++++++++-------- ide/lazbuild.lpr | 8 ++--- ide/main.pp | 1 + 5 files changed, 70 insertions(+), 21 deletions(-) diff --git a/ide/buildmanager.pas b/ide/buildmanager.pas index c5987d11f0..8c029bb1b8 100644 --- a/ide/buildmanager.pas +++ b/ide/buildmanager.pas @@ -50,7 +50,6 @@ uses IDECmdLine, LazarusIDEStrConsts, DialogProcs, IDEProcs, InputHistory, EditDefineTree, ProjectResources, MiscOptions, LazConf, EnvironmentOpts, TransferMacros, CompilerOptions, - ExtToolEditDlg{needed for environment options ExternalUserTools}, ExtTools, etMakeMsgParser, etFPCMsgParser, Compiler, FPCSrcScan, PackageDefs, PackageSystem, Project, ProjectIcon, ModeMatrixOpts, BaseBuildManager, ApplicationBundle; diff --git a/ide/environmentopts.pp b/ide/environmentopts.pp index e913d7e3d9..1c83c770c0 100644 --- a/ide/environmentopts.pp +++ b/ide/environmentopts.pp @@ -1443,7 +1443,8 @@ begin end; // external tools - fExternalUserTools:=ExternalUserToolsClass.Create; + if Assigned(ExternalUserToolsClass) then + fExternalUserTools:=ExternalUserToolsClass.Create; FMaxExtToolsInParallel:=0; // naming @@ -1871,7 +1872,8 @@ begin end; // external tools - fExternalUserTools.Load(FConfigStore,Path+'ExternalTools/'); + if Assigned(fExternalUserTools) then + fExternalUserTools.Load(FConfigStore,Path+'ExternalTools/'); FMaxExtToolsInParallel:=FXMLCfg.GetValue(Path+'ExternalTools/MaxInParallel',0); // naming @@ -2209,7 +2211,8 @@ begin FXMLCfg.SetDeleteValue(Path+'Recent/UseUnitDlg/AddToImplementation',FUseUnitDlgOptions.AddToImplementation,False); // external tools - fExternalUserTools.Save(FConfigStore,Path+'ExternalTools/'); + if Assigned(fExternalUserTools) then + fExternalUserTools.Save(FConfigStore,Path+'ExternalTools/'); FXMLCfg.SetDeleteValue(Path+'ExternalTools/MaxInParallel',FMaxExtToolsInParallel,0); // naming diff --git a/ide/lazbuild.lpi b/ide/lazbuild.lpi index d68c3fc7ec..aefdaae9f0 100644 --- a/ide/lazbuild.lpi +++ b/ide/lazbuild.lpi @@ -9,13 +9,35 @@ - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + - + @@ -30,7 +52,7 @@ - + @@ -38,13 +60,10 @@ - - - - + - + @@ -64,6 +83,11 @@ + + + + + @@ -73,8 +97,30 @@ - + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ide/lazbuild.lpr b/ide/lazbuild.lpr index 6a7fbb1365..be0a1d6290 100644 --- a/ide/lazbuild.lpr +++ b/ide/lazbuild.lpr @@ -31,7 +31,7 @@ uses Classes, SysUtils, math, CustApp, Interfaces, // this includes the NoGUI widgetset // LCL - LCLPlatformDef, {InterfaceBase,} LCLProc, Dialogs, Forms, Controls, + LCLPlatformDef, LCLProc, Controls, Dialogs, Forms, // codetools CodeCache, CodeToolManager, DefineTemplates, FileProcs, // IDEIntf @@ -45,7 +45,9 @@ uses IDECmdLine, MiscOptions, Project, LazConf, PackageDefs, PackageLinks, PackageSystem, InterPkgConflictFiles, BuildLazDialog, BuildProfileManager, BuildManager, BaseBuildManager, ModeMatrixOpts; - + // Hack: The project refers directly to SynRegExpr in SynEdit directory + // without pulling the whole package with it. Must be solved properly later. + type TPkgAction = ( lpaBuild, // build package, default @@ -1303,10 +1305,8 @@ Var NeedArg: Boolean; Function FindLongOpt(S : String) : boolean; - Var I : integer; - begin If CaseSensitiveOptions then begin diff --git a/ide/main.pp b/ide/main.pp index 00be8bafef..02c3c0e363 100644 --- a/ide/main.pp +++ b/ide/main.pp @@ -1334,6 +1334,7 @@ begin EditorOpts.Load; ExternalUserTools:=TExternalUserTools(EnvironmentOptions.ExternalToolMenuItems); + Assert(Assigned(ExternalUserTools), 'TMainIDE.LoadGlobalOptions: ExternalUserTools=Nil.'); ExternalUserTools.LoadShortCuts(EditorOpts.KeyMap); MiscellaneousOptions := TMiscellaneousOptions.Create;