Recent

Author Topic: LCL For Win32 GTK2 take 2  (Read 13618 times)

taazz

  • Hero Member
  • *****
  • Posts: 5368
LCL For Win32 GTK2 take 2
« on: June 24, 2012, 11:06:25 pm »
 :o :o

After fighting with the beast that is called lazarus all day long, I decided to give a second try on compiling lcl for win32/gtk2 widget, and low and behold, the beast wants a new round.

I'm not gone to even try and figure out wth it is going on, I'm gonna wait for a more experienced user to tell me why it fails.

I'm sorry but so far my experience with lazarus is 60~65% of the time fighting the tool 35~40% of the time "work done".

 %) %) %)

gonna try and get some rest for now. See attached screen shots with configuration dialog and message window.

EDIT: sorry forgot the most important part
Lazarus 0.9.30.4 r35940 FPC 2.6.0 i386-win32-win32/win64


Thank you for you time.
« Last Edit: June 24, 2012, 11:08:34 pm by taazz »
Good judgement is the result of experience … Experience is the result of bad judgement.

OS : Windows 7 64 bit
Laz: Lazarus 1.4.4 FPC 2.6.4 i386-win32-win32/win64

Leledumbo

  • Hero Member
  • *****
  • Posts: 8836
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: LCL For Win32 GTK2 take 2
« Reply #1 on: June 25, 2012, 12:21:44 am »
Probably a bug in 0.9.30.4, you should try daily snapshot / svn version, at least the one marked as fixes (that's where the bugfix only version goes to).

JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4718
  • I like bugs.
Re: LCL For Win32 GTK2 take 2
« Reply #2 on: June 25, 2012, 12:24:13 am »
First advice for anyone fighting with Lazarus is to use a more recent version. The "Build Lazarus" dialog in your screenshot is so old I had forgotten it existed. :)
(Yes I know, there should be releases more often.)
Both trunk and the new 1.0 branch are good.

Second thing, I don't know why you want to use GTK2 on Windows. Is there a real need or are you just experimenting?
I don't know if any developer is testing GTK2 on Windows. It is commonly used on Linux while Windows has its own API-binding.
Do you know of someone else using it on Windows? It is very possible it is broken and you are hitting your head to a wall for no reason.
If you are able to fix it and send patches, then it is a different thing of course.

Juha
Mostly Lazarus trunk and FPC 3.2 on Manjaro Linux 64-bit.

taazz

  • Hero Member
  • *****
  • Posts: 5368
Re: LCL For Win32 GTK2 take 2
« Reply #3 on: June 25, 2012, 02:06:29 am »
First advice for anyone fighting with Lazarus is to use a more recent version. The "Build Lazarus" dialog in your screenshot is so old I had forgotten it existed. :)
(Yes I know, there should be releases more often.)
Both trunk and the new 1.0 branch are good.

Second thing, I don't know why you want to use GTK2 on Windows. Is there a real need or are you just experimenting?
I don't know if any developer is testing GTK2 on Windows. It is commonly used on Linux while Windows has its own API-binding.
Do you know of someone else using it on Windows? It is very possible it is broken and you are hitting your head to a wall for no reason.
If you are able to fix it and send patches, then it is a different thing of course.

Juha

I hope you are joking, 2012/03/14 is the date that my version of lazarus was published according to sourceforge if that's old enough so you have forgot about the configuration dialog then it seems I'm on the wrong path.


I'm trying to port a component I use to lazarus at this point in time I haven't decided I will use lazarus as my development environment I'm evaluating its abilities and how well can cover my needs for easy of use, portability and speed. 

So far it lucks behind in speed and easy of use (thats more of a attitude problem I guess) I'm sure that there is something I can do to make it faster, then again lazarus it self is made by people that know the environment a lot better than me and it has a lot of speed and flickering problems. A few extra demos I tried seem to have the same problems (speed and flicker) mind you I am only talking about screen redraw issues here not the processing power (aka math and cpu intensive stuff) which is more of an fpc subject than an lcl one.

My main way of thinking is that if I can port some of my screen intensive components from delphi to LCL and I don't loose more than 15% of screen speed then I'm on my way for a cross platform solution.

Based on that, I don't want  to invest any time on secondary matters like installing operating systems, setting up virtual environments, dealing with company polices etc, on a laptop that barely supports win 7, I prefer to spend my time learning lazarus and how I can test my components from windows to as many widgets as possible.

But I wouldn't mind investing time to debugging a problem as long as I learn something about the environment and I can get support from the people in charge of the part I have problems with.

Probably a bug in 0.9.30.4, you should try daily snapshot / svn version, at least the one marked as fixes (that's where the bugfix only version goes to).

I'm not very familiar with lazarus and I don't have the confidence to download and build from svn. If it is a process I can avoid I will at any cost at this point in time.

That said I'll keep my head down and work on the windows version only for now and wait for a new release to continue my tests.

Going to check the issue tracker for any relative info if I can find any that is.

insomnia is becoming a real problem for me lately.

Edit:
I changed my mind I'm going to try and build from svn repository I need some info on which repositories should I look at keeping in mind that I prefer to work on a tested environment that has a known stability are there any releases that I should look at? I don't want to work with the latest trunk as this would make it impossible to keep a sane release cycle for my apps.
« Last Edit: June 25, 2012, 02:41:30 am by taazz »
Good judgement is the result of experience … Experience is the result of bad judgement.

OS : Windows 7 64 bit
Laz: Lazarus 1.4.4 FPC 2.6.4 i386-win32-win32/win64

felipemdc

  • Administrator
  • Hero Member
  • *
  • Posts: 3538
Re: LCL For Win32 GTK2 take 2
« Reply #4 on: June 25, 2012, 07:49:03 am »
I hope you are joking, 2012/03/14 is the date that my version of lazarus was published according to sourceforge if that's old enough so you have forgot about the configuration dialog then it seems I'm on the wrong path.

The build is new, but it is a build from a very old branch.

Quote
I'm not very familiar with lazarus and I don't have the confidence to download and build from svn. If it is a process I can avoid I will at any cost at this point in time.

You don't have to download the latest Lazarus from SVN, you can download a pre-compiled snapshot, see this page:

http://freepascal.dfmk.hu/test/lazarus/

You should use Lazarus + fpc 2.6.0   win32

felipemdc

  • Administrator
  • Hero Member
  • *
  • Posts: 3538
Re: LCL For Win32 GTK2 take 2
« Reply #5 on: June 25, 2012, 07:51:22 am »
By the way, why does it have to Gtk2 running in Win32? This is a very unusual combination. Lazarus has a native Win32 widgetset that 99,99% of people should use.

KpjComp

  • Hero Member
  • *****
  • Posts: 680
Re: LCL For Win32 GTK2 take 2
« Reply #6 on: June 25, 2012, 01:23:22 pm »
I'd agree that the default Lazarus installer setup is horrid, especially when it comes to cross-compiling etc.

In the end I used CodeTyphon, and that makes Lazarus into a product that it should have been in the first place.

In fact I'd go as far as saying, if there wasn't CodeTyphon I would have been long gone by now.

taazz

  • Hero Member
  • *****
  • Posts: 5368
Re: LCL For Win32 GTK2 take 2
« Reply #7 on: June 25, 2012, 02:16:58 pm »
By the way, why does it have to Gtk2 running in Win32? This is a very unusual combination. Lazarus has a native Win32 widgetset that 99,99% of people should use.

I don't want to run lazarus on GTK2 I want to have lcl and other packages compiled for GTK2 and QT so I can Compile and test my applications (more precisely my converted components) on those widgets from windows so no clean and build or anything along those lines just 3 distinct compiled paths from where I can build components and test them as much as I can before I ask for help from people with linux or MacOs installations.

I'd agree that the default Lazarus installer setup is horrid, especially when it comes to cross-compiling etc.

In the end I used CodeTyphon, and that makes Lazarus into a product that it should have been in the first place.

In fact I'd go as far as saying, if there wasn't CodeTyphon I would have been long gone by now.

I have downloaded codetyphon but hardware limitations do not allow me to compile a working version of it. so far I have used some of its components in the lazarus and compared to the other conversions(of the same components) they have done very good job.
Good judgement is the result of experience … Experience is the result of bad judgement.

OS : Windows 7 64 bit
Laz: Lazarus 1.4.4 FPC 2.6.4 i386-win32-win32/win64

taazz

  • Hero Member
  • *****
  • Posts: 5368
Re: LCL For Win32 GTK2 take 2
« Reply #8 on: June 25, 2012, 02:20:28 pm »
Quote
I'm not very familiar with lazarus and I don't have the confidence to download and build from svn. If it is a process I can avoid I will at any cost at this point in time.

You don't have to download the latest Lazarus from SVN, you can download a pre-compiled snapshot, see this page:

http://freepascal.dfmk.hu/test/lazarus/

You should use Lazarus + fpc 2.6.0   win32

OK lets assume I ignore the waring on the top of the page and download one of those nightly builds (those are from the trunk correct)?
is it possible to have 2 distinct installations so I can test before I move any of those to my main development path?
Good judgement is the result of experience … Experience is the result of bad judgement.

OS : Windows 7 64 bit
Laz: Lazarus 1.4.4 FPC 2.6.4 i386-win32-win32/win64

Leledumbo

  • Hero Member
  • *****
  • Posts: 8836
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: LCL For Win32 GTK2 take 2
« Reply #9 on: June 25, 2012, 02:30:30 pm »
Quote
is it possible to have 2 distinct installations so I can test before I move any of those to my main development path?
http://wiki.lazarus.freepascal.org/Multiple_Lazarus

taazz

  • Hero Member
  • *****
  • Posts: 5368
Re: LCL For Win32 GTK2 take 2
« Reply #10 on: June 25, 2012, 04:16:48 pm »
thank you for the link I'm going to set a second installation and see how things go alone.

One last question I have 2 observations noted down and I don't know if I should report them on issue tracker or not and if yes then under which category.

1) the erase background message that comes to wincontrols it comes after it has cleared the background so even if I choose to ignore it it creates a black background.

2) the Control's Canvas that every wincontrol has does not paint on the buffered dc when double buffered is true making it impossible to avoid using the interface unit for painting and sticking to the canvas which should be the main painting object behind all controls.
Good judgement is the result of experience … Experience is the result of bad judgement.

OS : Windows 7 64 bit
Laz: Lazarus 1.4.4 FPC 2.6.4 i386-win32-win32/win64

JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4718
  • I like bugs.
Re: LCL For Win32 GTK2 take 2
« Reply #11 on: June 25, 2012, 06:27:46 pm »
I hope you are joking, 2012/03/14 is the date that my version of lazarus was published according to sourceforge if that's old enough so you have forgot about the configuration dialog then it seems I'm on the wrong path.

Yes you are on the wrong path. :)
It is the latest release of a very old branch as Felipe mentioned. A long release cycle is a problem indeed for Lazarus.
The "historical" Build-Lazarus dialog is truly old. It was changed in trunk already before 0.9.30 was released (IIRC), maybe 1.5 years ago.
The dialog is only a "tip of an iceberg". It reflects many changes in Lazarus build system.
Lazarus is advancing with good speed, the slow release cycle is deceptive.

Quote
I'm trying to port a component I use to lazarus at this point in time I haven't decided I will use lazarus as my development environment I'm evaluating its abilities and how well can cover my needs for easy of use, portability and speed. 

Especially for evaluation you should use a recent version.

Quote
I'm not very familiar with lazarus and I don't have the confidence to download and build from svn. If it is a process I can avoid I will at any cost at this point in time.

This sounds extremely weird to me. You are able to experiment with untested Win+GTK2 combinations, you are able to port a Delphi component (which can be difficult).
How can using SVN be difficult for you?
 $ svn co ...
then build with
 $ make all
and later
 $ svn up
or similar things with TortoiseSVN.
Based on other forum posts the snapshots give more problems to people than direct SVN usage does.
If you download only once then a snapshot is ok, but if you update even a single time then you should use SVN. It is designed for this kind of things.
So, my recommendation is:
1. Install FPC 2.6.x binaries.
2. Get Lazarus from SVN and build it.

Juha
Mostly Lazarus trunk and FPC 3.2 on Manjaro Linux 64-bit.

taazz

  • Hero Member
  • *****
  • Posts: 5368
Re: LCL For Win32 GTK2 take 2
« Reply #12 on: June 25, 2012, 08:28:18 pm »
I hope you are joking, 2012/03/14 is the date that my version of lazarus was published according to sourceforge if that's old enough so you have forgot about the configuration dialog then it seems I'm on the wrong path.

Yes you are on the wrong path. :)
It is the latest release of a very old branch as Felipe mentioned. A long release cycle is a problem indeed for Lazarus.
The "historical" Build-Lazarus dialog is truly old. It was changed in trunk already before 0.9.30 was released (IIRC), maybe 1.5 years ago.
The dialog is only a "tip of an iceberg". It reflects many changes in Lazarus build system.
Lazarus is advancing with good speed, the slow release cycle is deceptive.

That's a problem that the team needs to address as soon as possible.

I am not familiar with the needs of the project though so I can help on designing such a process I can help implementing parts of it though.


Quote
I'm trying to port a component I use to lazarus at this point in time I haven't decided I will use lazarus as my development environment I'm evaluating its abilities and how well can cover my needs for easy of use, portability and speed. 

Especially for evaluation you should use a recent version.

I can understand the need to develop for the current working environment as long as this environment is a stable one I'm against developing on a moving target and I wouldn't waste my time on such an endeavor.

Quote
I'm not very familiar with lazarus and I don't have the confidence to download and build from svn. If it is a process I can avoid I will at any cost at this point in time.

This sounds extremely weird to me. You are able to experiment with untested Win+GTK2 combinations,

yeah I'm able to select a widget target from a dialog, but as you can see I'm not able to continue with out some help from the people in the know how.



you are able to port a Delphi component (which can be difficult).

I have a working knowledge of component building this is my first time porting a component to a new environment and is a component I am familiar with I know how to break it up in to smaller pieces and port one piece at time I know what I need from it and I am learning how to test it. How can you compare that to building an entire suite of components most of which I have no idea what to expect let alone test.


How can using SVN be difficult for you?
 $ svn co ...
then build with
 $ make all
and later
 $ svn up
or similar things with TortoiseSVN.

yeah using tortoiseSVN to check out a branch from a server is not  the problem the make all part is if something goes wrong I wouldn't know where to start looking.

Based on other forum posts the snapshots give more problems to people than direct SVN usage does.
If you download only once then a snapshot is ok, but if you update even a single time then you should use SVN. It is designed for this kind of things.
So, my recommendation is:
1. Install FPC 2.6.x binaries.
2. Get Lazarus from SVN and build it.

Juha

Thank you that's a goal to work to I guess but it has to wait its turn and only through my free time.
Good judgement is the result of experience … Experience is the result of bad judgement.

OS : Windows 7 64 bit
Laz: Lazarus 1.4.4 FPC 2.6.4 i386-win32-win32/win64

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 12522
  • Debugger - SynEdit - and more
    • wiki
Re: LCL For Win32 GTK2 take 2
« Reply #13 on: June 25, 2012, 08:50:49 pm »
yeah using tortoiseSVN to check out a branch from a server is not  the problem the make all part is if something goes wrong I wouldn't know where to start looking.

On Windows, just get a lazarus.exe (either from the last release, or better a recent snapshot),
copy it into your svn checkout directory,
follow the steps for multiply installation if needed (primary-config-path),
and build via the Tools menu.

Using a snapshot, as one off starting point, also gives you fpc 2.6.0. Beware, if you move the fpc folder. Find the fpc.cfg, open it, and adapt all directories)


As for GTK 2 on windows. It requires a  recent gtk2 installed on windows. I have it running, including the IDE itself. There is a bug (but it can be my gtk2 version). I get an exception when starting the IDE. But then it works fine...



taazz

  • Hero Member
  • *****
  • Posts: 5368
Re: LCL For Win32 GTK2 take 2
« Reply #14 on: June 26, 2012, 07:44:48 am »
Thank you every one for your valuable information I now have a second installation of Lazarus 0.9.31 r37773 FPC 2.6.0 i386-win32-win32/win64 its one of the snapshots on the link provided by felipemdc and I'll probably install Lazarus-1.1-37782-fpc-2.6.1 for win32 as well.

1st impression :
The build configuration dialog is for advanced users only on this build, no easy way to select what you want remembering all those command line params isn't going to float well with me.
A few flicker problems are not present any more.

other than that I'll need to work a bit more with this version before I can comment farther,  one step closer to a svn based build, although I don't see my self using any non released version for production at this time at least.

One last question is there any lcl as well as fpc version define I can use in my code if needed?

thank you once more for your time.
Good judgement is the result of experience … Experience is the result of bad judgement.

OS : Windows 7 64 bit
Laz: Lazarus 1.4.4 FPC 2.6.4 i386-win32-win32/win64

 

TinyPortal © 2005-2018