[Lazarus] Configure "Build Lazarus" was weird but no more...

Juha Manninen juha.manninen at phnet.fi
Sun Dec 13 11:40:18 CET 2009


On perjantai, 4. joulukuuta 2009 13:15:42 Mattias Gärtner wrote:
> You are welcome to improve the build dialog.
> But don't split the advanced page.

So... I was planning to make small changes there but it wouldn't be good with 
small changes. I made big changes instead. I didn't split the advanced page 
though.

Now I am waiting for feedback. This build dialog must be a "holy cow" for many 
Lazarus developers and now I changed it. Let's see...
Below is description for issue #0015336.

Juha Manninen

-------------------------------

I have implemented Build Profiles for Configure "Build Lazarus" dialog. There 
were 2 main ideas when doing it.

First, building for different targets is easier with configurable build 
profiles. All build-settings are stored in a profile and so it should fill 
every use case here. The profiles are saved in XML file and thus are 
persistent.

The other idea was to make the user interface more sane. It was stitched 
together from 2 different GUIs (Quick selections and Advanced page) and it was 
little weird in appearance and behavior.

Now the idea of Quick selections is extended to configurable profiles. Its 
user interface is mostly copied from External tools config dialog.
Advanced page is now called Detail page and it can be hidden if needed. It 
look about the same as before.

If someone really doesn't like such profiles, he could define just 1 profile 
and change that. The GUI doesn't even let you delete a single profile by 
accident.

The program's internal object structure was changed heavily to keep it logical 
and to avoid duplicate data. The code for the actual build process was not 
touched however. This gives high hopes that it still works in different 
situations although I tested only few simple build types.

One change for the internal build-option-objects is that they are created only 
outside (by caller) and just referenced in this code. Earlier they were 
created in two places and then copied and assigned back and forth, often 
assigning to itself. It worked but I changed the logic now.


*** Issues: ***

1. Visual forms editor. I copied all the controls from Advanced page but then 
had problems when aligning and moving them. It looks like the form designer 
works well in simple cases but with some complicated interaction it goes nuts.
For example I can't move OptionsLabel and OptionsEdit vertically even if I 
change anchors and alignments. The other labels move with identical anchors 
and alignment settings. And in the old form they behaved better with identical 
settings! Some Lazarus-guru could show how to do it.

2. QT related visual refresh problem. I experience a problem of an owner drawn 
Listbox for MakeModes but I am quite sure it is QT related. Radiobuttons in 
the listbox get updated visually only after moving the mouse pointer over the 
control. No need to click anything then.
I added commands like:
  BeginUpdate;
  EndUpdate;
  Repaint;
  Refresh;
  Invalidate;
and debugged that they are really called but it doesn't help. I can test for 
GTK2 later. The old version with QT works but there parent control was TPage, 
now TPanel.
However, after waving the mouse over the box it all works perfectly (!).

3. I did not put much effort in profiles' add / rename dialog. It has 
basically 1 label, 1 editbox and OK and Cancel buttons. There must be similar 
dialogs around, also in Lazarus code base. I didn't find any though.




More information about the Lazarus mailing list