New compiler: Lazarus

Ok, I have the windows version installed and have compiled and run a simple “hello world” program :slight_smile:
this is good stuff
i can do the work on my windows laptop then copy the files to the linux pc and compile the program there and the same thing on my soon to be MAC as well!

Do not tell me Lazarus is already better than Kylix :smiley:

just looking at all the documents on porting code etc

there is a fair bit of code that will not work the same (but alot that will too)

i think I will need to build a new project from the ground up
I will be able to use some of my existing code OK (e.g dealing with the actual data from the weather station)
here is my chance though to write the program differently too (from what I have learned over the years!)

The good thing is that now you are not anymore handcuffed with a proprietary software. I do not really know why Borland gave up with the version of Delphi for linux.

Actually you also have a version of Lazarus that runs on MAC old fashion I guess.

Good luck developping the missing stuff.

oh, I found its very easy to grab a image of the window screen form in Lazarus,using
var
SnapShotBitmap: TBitmap;
begin
SnapShotBitmap:=TBitmap.Create;
SnapShotBitmap.LoadFromDevice(Canvas.Handle);
SnapShotBitmap.SaveToFile(‘c:\snapshot.bmp’);
SnapShotBitmap.Free;

but, same problem as with Kylix , if another window is over the top, that is captures as well

i managed to get imported the instrument component package I use in the windows version
(I had to purchase the source code, 30 euro)
the graphing part of the component has ported well
but some of the instruments dont look good
thats because the components used alot of windows specific drawing routines, and I had to make work arounds or bracket out that code (took me hours to do all that)

i will try and find some work arounds!

i managed to get this package installed into the linux lazarus compiler too…but with some hiccups…namely reference to the registry…which caused an access violation when the compiler started…took me a while to undo things!

How is it going with Lazarus? Any good stuff other than the Mac Intel test prog?

unfortunately have had a few issues to deal with on the windows version and a run of people to help there too
I have been looking at converting more components…

i am hoping to dedicating as much as possible of this coming week to the project

I have the LCD numbers component converted and installed in Lazarus (needed some changes in the code)
so thats another component converted
still more to go
these things all take time!

maybe I can help, you just have to give a piece of source and the component and I can try to convert it into lazarus?

good idea :slight_smile:
I have sent you a email :slight_smile:

I have come across a few problems
the instrument components I have used use windows clipping
which is not working
so things like the windspeed dial and temperature dial do not look good (big square!)
I cant find a way around that problem

next problem is with the compiler: its making things disepear when i add a graph component…weird things like that

i could get around that by making the graphs a separate window

so, with those problems, and not all components able to be ported, I will have to use only bits and pieces and build up a new version

hummmm
its OK if i use the graphing component from fresh, and setup it up again from default

I think it will be easier if you were creating separate windows, one for the dials, and on or more for the graphs.
About the dial that are ugly did you search the internet?
I am doing a search for the moon phases, becuase the one you have is delphi and hard to convert to FPC.

yes, I have asked for help on the Linux forum
answer was its not fully supported yet in lazarus
I am “windy” on the lazarus forum :wink:
i do have some simple BASIC code i have used in the kylix version
that moon tool had alot of other good functions
(but hard code to follow!)

getting there slowly step by step in building a new project by using the convert tools in lazarus and added one by one the forms needed , picking out of WD for windows

making progress
over half way now…hours and hours of work so far

Updates:
Just about there…after a week working on it!
(there must be 100 files to convert!)
The Lazarus compiler version I have has a bug where you get an internal error
I see there is a new version that fixes that (but then I would have to reload all the components)
the internal error does not happen each time
I have found a full build does not produce the error…but then it takes 5 minutes to compile!

just on the final round of compiles now…

then I have to get the components installed on the linux and Mac pc’s

I have not been able to ,yet, get the internet components I have used ported yet…as the source code (from the Kylix version) use a .so file…
I will ask the author if I can get the source code for the file maybe

I have been also working on the form grab routine
I have it where the background of the form is grabbed Ok , but yet to figure out how to get the controls on the form copied to the trect bitmap…
(there is a way to easily grab a form image, but then if a window is over the top of that, that window contents is grabbed)

So in theory, if Lazarus does cross platform correctly, it should only be a few mods and the linux and mac versions will be as feature rich as the win32 one?