On 09/04/2024 19:39, Gabriele Cappelletto via lazarus wrote:
Done, I'm missing this, I can't find how to do this in the handbook

BMOptions: TBuildMatrixOption;

  BMOptions := TProject(AProject).BuildModes.SharedMatrixOptions.Add(bmotIDEMacro);
  BMOptions.Modes := 'Default';
  BMOptions.MacroName := 'LCLWidgetType';
  BMOptions.Value := 'nogui';

 I think it needs to be transformed into

  CompOpts : TLazCompilerOptions;

Does anyone know how to do this or how to use projectintf?


Not my main area of expertise, but I did some digging and found

function TBaseCompilerOptions.GetEffectiveLCLWidgetType: string;
...
  Vars:=GetBuildMacroValues(Self,true);
  if Vars<>nil then
    Result:=Vars.Values['LCLWidgetType'];


BuildMacros are available via

TLazProject(project).LazBuildModes.LazBuildModes[n].LazCompilerOptions.BuildMacros

I hope that works...
--
_______________________________________________
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus

Reply via email to