New compiler: Lazarus

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?

yes
I already have created some proof of concept test programs using the Lazarus compiler for linux and the Mac
(you use the same compiler and the same code on each PC (re compile on each PC )
:slight_smile:
once I get this windows version code compiled OK, I then need to add in the serial code that works with Yves comlibrary .so file (i.e copy the code from the kylix version)
:slight_smile:

Well, that’s EXCELLENT news!

i have it compiled OK now, no errors
but It wont run
(its a big .exe file size, a known thing with lazarus, as it contains the run time libraries, etc)
there is an exception error when running in the compiler
trying to find out what the story is
i might just need to add the lazarus form include file at the end of each form code maybe (its not there, but compiles without it)
(i will test a simple project to see if that matters)

or it could be a dll file used…which I dont have in the location where wd is running from…hummm

if I compress the .exe, it runs, but produces an error
I think I need to split out the program into separate modules