[Lazarus] Rebuilding IDE Gtk/Qt

Vojtěch Čihák vojtech.cihak at atlas.cz
Fri Jan 5 17:16:25 CET 2018


Hi,
 
I see now, FBuildTarget.CompilerOptions.GetEffectiveLCLWidgetType is never called. Result depends on parameter LCLWidgetType of function TBuildManager.SetBuildTarget().
This code:
procedure TMainIDE.mnuToolConfigBuildLazClicked(Sender: TObject);
var
  ...
begin
  //if ToolStatus<>itNone then exit;
  if fBuilder=Nil then
    fBuilder:=TLazarusBuilder.Create;    // Will be freed in the very end.
  MainBuildBoss.SetBuildTargetIDE;
  try
    DlgResult:=fBuilder.ShowConfigureBuildLazarusDlg(MiscellaneousOptions.BuildLazProfiles);
  finally
    MainBuildBoss.SetBuildTargetProject1(true);
  end;
 
SetBuildTargetIDE calls SetBuildTarget with correct parameters but in turn in finally section SetBuildTargetProject1 calls:
SetBuildTarget('','','',ScanFPCSrc,Quiet);   //note that empty strings
It later calls:
 
function GetDefaultLCLWidgetType: TLCLPlatform;
begin
  if (WidgetSet<>nil) and (WidgetSet.LCLPlatform<>lpNoGUI) then
    Result:=WidgetSet.LCLPlatform
  else
    Result:=BuildLCLWidgetType;
end;
 
where WidgetSet is always assigned and Result is always gtk2.
 
V.
______________________________________________________________
> Od: Mattias Gaertner via Lazarus <lazarus at lists.lazarus-ide.org>
> Komu: lazarus at lists.lazarus-ide.org
> Datum: 05.01.2018 13:11
> Předmět: Re: [Lazarus] Rebuilding IDE Gtk/Qt
>
On Fri, 05 Jan 2018 02:59:56 +0100
 Vojtěch Čihák via Lazarus <lazarus at lists.lazarus-ide.org> wrote:
 
 > I found the reason but to make a patch is beyond my powers.
 > When I used the steps described below, I got this in console:
 >[...]is unchangedThe changes come from method MainBuildBoss.SetBuildTargetProject1 which is called several times in main.pp, mainly in TMainIDE.mnuToolConfigBuildLazClicked at line 4595.
 
 Yes, these are the switches between project and IDE settings.
 
 > It calls TBuildManager.SetBuildTarget and nested function GetEffectiveLCLWidgetType where is line: Result:=FBuildTarget.CompilerOptions.GetEffectiveLCLWidgetTypeIt is probably the reason why combobox in "Configure Build Lazarus" is ignored and is replaced by value from Compiler Options.
 
 No, when building the IDE the FBuildTarget is nil.
 See TBuildManager.SetBuildTargetIDE.
 
 Please start the IDE with -v -v to get more output.
 
 Mattias
 
 
 -- 
 _______________________________________________
 Lazarus mailing list
 Lazarus at lists.lazarus-ide.org
 https://lists.lazarus-ide.org/listinfo/lazarus <https://lists.lazarus-ide.org/listinfo/lazarus>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20180105/78f96804/attachment.html>


More information about the Lazarus mailing list