Friday, August 31, 2007

Qt IDE

Not long (about 2-3 months) ago my attention was drawn to the lazarus Qt widgetset (child of Den - author of the bindings and Felipe - author of the lazarus widgetset). It is easy for me to develop the Qt widgetset, since I can run the Qt enviroment on my main platform - windows xp. Another developer - Zeljan (with qt on linux) worked hard on qt widgetset at that moment. My goal was to achieve a working Qt ide. Zeljan had another goal (as I know). He had a real application and tested the qt widgetset on that.

Step by step and day by day we fixed bugs and implemented missing features (of course, what else can we do?) :) There were problems with mouse, keyboard, painting, widget sizes and positions and so on (you can look at the changelog for more details). As far as I can see my goal is achieved now. Yes, ide is mostly functional: you can edit units, you can use form designer, you can play with lazarus dialogs (really I don't know what you can't do).


But please dont expect too much - the ide still has bugs. Some of them are known and fixing them is in progress (form designer has no rubber band, some controls have wrong size until parent resize, tool windows have no close button), but some are not known. So we need testers.




We'll have lazarus-qt snapshots soon. Stay tuned.

Thursday, August 30, 2007

Fixing Lazarus compilation with fpc 2.2.0

Last night FPC 2.2.0 was tagged. This means that the source code for the release is frozen, no more changes can be made. Now the release builders can start their job and create Windows installers, Linux rpms and debs and Mac OS X dmgs with installer packages. When they have finished their jobs, the FPC team will announce their release, probably in two weeks or so.

I am glad we have reached this point; the last critical bugs for Lazarus were fixed almost a month ago, all the Lazarus snapshots using fpc 2.1.5 were compiling fine and there had not been any reports about failures with fpc 2.1.5. So I was very surprised to get an email this morning from the debian builder, that Lazarus trunk could not be compiled with fpc 2.2.0.
Compiling memcheck.pasmemcheck.pas(211,17)
Error: Identifier not found "pptruint"memcheck.pas(211,17)
Error: Error in type definitionmemcheck.pas(222,33)
Error: Illegal qualifier memcheck.pas(1110,22)

The memcheck unit is a copy of the heaptrc unit from the RTL with some extras. Because there were no problems with fpc 2.1.5, I suspected it contained something like {$IFDEF VER2_1} which should be extended to version 2.2 too. But the source was clean of such version dependent ifdefs. I started to doubt if the snapshot were built with fpc 2.1.5 after all, the only difference between fpc 2.1.5 from yesterday and fpc 2.2.0 is the version number.

Then I got a idea, and looked in the build unit for the codetools allcodetoolunits.pp. It contained the following lines:
uses
{$IF defined(VER2_2) or defined(VER2_3)}
MemCheck,
{$ENDIF}

We changed this to:
uses
{$IFDEF VER2_3}
MemCheck,
{$ENDIF}

and now Lazarus is fpc 2.2.0 ready.

The memcheak unit depends on the heap manager and besides the use of unsigned integers the fpc 2.3 heap manager has some improvements for multithreaded programs, which make it incompatible with the fpc 2.2 heap manager.

Wednesday, August 29, 2007

Let's start the blogging

Theo suggested to start a blog to give people some insight in the development process of Lazarus. A bit of tips and tricks on improving Lazarus.

So I opened an account at blogger and created this blog. Let's see if I have something to tell.

I am still a bit sceptical about its use, but having a blogspot makes the threshold to write something down easier. The future will tell, if this was a good idea or not.