Lazarus

Miscellaneous => Suggestions => LCL => Topic started by: Rave on February 04, 2014, 10:16:40 am

Title: Bundling Indy with Lazarus
Post by: Rave on February 04, 2014, 10:16:40 am
I think Internet Direct components are very useful and IMO they should be bundled with Lazarus. Installation process of Indy is kinda hard, especially on Linux where you need root privileges to do so (recompiling lazarus...) and that would take burden out of it.
Title: Re: Bundling Indy with Lazarus
Post by: JD on February 04, 2014, 12:17:09 pm
It is bundled with Delphi by default BUT Lazarus is network component neutral and there are probably more Synapse users than Indy users who use Lazarus. A cursory reading of the posts on this forum will confirm that. Indy seems to have more features than Synapse & LNet (the other networking library) & it takes more time to learn than the other two. If you prefer Indy, great, welcome to the club.  :D
Title: Re: Bundling Indy with Lazarus
Post by: motaz on February 04, 2014, 12:32:06 pm
I moved to Synapse because it does not require recompiling Lazarus, it is a library
Title: Re: Bundling Indy with Lazarus
Post by: marcov on February 04, 2014, 01:13:44 pm
Neither does Indy if you don't use it designtime.

Anyway, for all those, I think there first should be some project that does building (and release engineering) for these components for a while. Like Lazarus-CCR.

The only thing worse than not having it with lazarus is having a defunct version package with Lazarus that you have to deinstall first.
Title: Re: Bundling Indy with Lazarus
Post by: JD on February 04, 2014, 02:02:42 pm
The only thing worse than not having it with lazarus is having a defunct version package with Lazarus that you have to deinstall first.

Given the pace at which Indy is updated, that is exactly what will happen! But then it is already that way with Delphi. The bundled Delphi version is always an old sometimes outdated version of Indy and most of us uninstall the bundled Delphi version in order to get the newest Indy features.
Title: Re: Bundling Indy with Lazarus
Post by: Rave on February 05, 2014, 12:12:48 pm
I disagree with updating thing. Even if version will be bit dated compared to what is in Indy, it is still useful library that can be used to do many cool things.
Title: Re: Bundling Indy with Lazarus
Post by: JD on February 07, 2014, 01:59:00 pm
I disagree with updating thing. Even if version will be bit dated compared to what is in Indy, it is still useful library that can be used to do many cool things.

Do you realize how many changes/bug fixes an SVN version of Indy differs from a default installation of Indy on < Delphi 2007? For instance Indy 9 is very useful BUT the class structure has undergone many changes in Indy 10. In the same vein the outdated Indy 10.2.03 package available for Lazarus is too far behind.
Title: Re: Bundling Indy with Lazarus
Post by: marcov on February 07, 2014, 08:18:10 pm
Do you realize how many changes/bug fixes an SVN version of Indy differs from a default installation of Indy on < Delphi 2007?

I meant to hint more that e.g. the D6 packaged version is unstable on systems with any form of SMP (even P4's with just a bit of hyperthreading)
Title: Re: Bundling Indy with Lazarus
Post by: Martin_fr on February 07, 2014, 10:00:39 pm
Going about off topic, or rather extended topic.

I think it would be better to look at the underlying issues (or the myth of such issues).
Indy is not the only component people may want to use. There are lots of, and I would be sure that more people have to rebuild the IDE due to the *SUM* of these others, than due to INDY (I would not not even be sure INDY was the biggest single reason for rebuilds.

1) not sure if an issue, but people need to be aware that: It exists, and where to get it.

2) Installation. This should be easy, including rebuild. If installing a package, and rebuilding (assuming a correct Lazarus install) is more than open and click install, then that needs to be solved.

I haven't tested that on linux, but each time someone says root, someone else says: no root needed.
So why do we get to opposing statements, and how can we make it that none root works for everyone?

IMHO that is the real issue.
Title: Re: Bundling Indy with Lazarus
Post by: Rave on February 10, 2014, 01:54:31 pm
When you compiled Lazarus to the home directory or did some silly thing like that, then yes, no root needed indeed. But if you used rpm/deb packages, then you unfortunately need to have root.

Anyway the underlying issue is most likely "lazarus needs to rebuild itself when installing new components instead of dynamically link those like Delphi does".

To fix this following changes would be required:

- Populating component palette from a file instead of having it in lazarus' code when Lazarus is started.
- Such "component file" would contain meta data such as component's class name, tab on which it is located (if tab with that name does not exist in palette, it will be created, otherwise component will be added to tab with specified name) and the location of ppu file with code needed to link it to the program

Additionally, after those changes are made, we could make "component repository" that would work like repo in ordinary Linux distribution but would install components for Lazarus.
Title: Re: Bundling Indy with Lazarus
Post by: JuhaManninen on February 10, 2014, 05:31:34 pm
When you compiled Lazarus to the home directory or did some silly thing like that, then yes, no root needed indeed. But if you used rpm/deb packages, then you unfortunately need to have root.

Yes, you need root access when you actually install Lazarus from rpm/deb, but you don't need root access when installing packages for it.
There is apparenly lots of misinformation about this issue. Please see:
  http://wiki.lazarus.freepascal.org/startlazarus#Searching_the_right_executable
and
  http://wiki.lazarus.freepascal.org/Lazarus_directory_permissions_on_Linux_and_Unix
which Bart just rewrote.
There is one bug associated with the process, so don't click on "Clean all" with a standard installation.
  http://bugs.freepascal.org/view.php?id=25695
If you find more bugs, please report with steps to reproduce.
See also thread
  http://forum.lazarus.freepascal.org/index.php/topic,23534.0.html

Quote
Anyway the underlying issue is most likely "lazarus needs to rebuild itself when installing new components instead of dynamically link those like Delphi does".

It is not a big issue. Compilation is fast and you don't need root access.

Quote
To fix this following changes would be required:

- Populating component palette from a file instead of having it in lazarus' code when Lazarus is started.
- Such "component file" would contain meta data such as component's class name, tab on which it is located (if tab with that name does not exist in palette, it will be created, otherwise component will be added to tab with specified name) and the location of ppu file with code needed to link it to the program

Packages must be also in IDE for design-time. Component palette configuration does not help for that.

Quote
Additionally, after those changes are made, we could make "component repository" that would work like repo in ordinary Linux distribution but would install components for Lazarus.

Yes, there is such plan. The current static package system is not a hindrance, somebody just have to design and code the repository thingy.
Title: Re: Bundling Indy with Lazarus
Post by: Martin_fr on February 10, 2014, 06:13:30 pm
@Rave:

If rebuild does not work for you without root, then give the exact steps you used, and what error you get.

Then someone should be able to help.

With a normal Lazarus install (install is in /usr )

You MUST:
- always use "startlazarus" , never use "lazarus"
- have a home directory with sufficient disk space/quota
  (The IDE creates a .lazarus directory in your home)
- NOT edit any path by hand, let the IDE do that

You do NOT need write access to /usr to rebuild

This is supposed to work (as none root), if it does not, then a detailed bug description is needed to fix it.
Title: Re: Bundling Indy with Lazarus
Post by: Rave on February 11, 2014, 07:37:08 pm
Packages must be also in IDE for design-time. Component palette configuration does not help for that.

Somehow Delphi doesn't have issue with that. Dynamic linking, anyone?

@Martin_fr, I don't have access to Linux machine ATM, but last time I tried (LAZ 0.9.36, though I may be wrong), I did just this:

- Open package
- Click Install

Then observed in horror that it cannot write, then did same under root and it went fine. And yes, it was most definitely startlazarus as KDE shortcuts are set up this way.
Title: Re: Bundling Indy with Lazarus
Post by: JuhaManninen on February 12, 2014, 08:16:09 am
... last time I tried (LAZ 0.9.36, though I may be wrong) ...

Can you please try with 1.2RC2.
Title: Re: Bundling Indy with Lazarus
Post by: Rave on February 12, 2014, 11:18:56 am
No, because
I don't have access to Linux machine ATM
Title: Re: Bundling Indy with Lazarus
Post by: Cyrax on February 13, 2014, 03:14:10 pm
Packages must be also in IDE for design-time. Component palette configuration does not help for that.

Somehow Delphi doesn't have issue with that. Dynamic linking, anyone?
...

Delphi supports dynamic packages, FPC does not (yet).
Title: Re: Bundling Indy with Lazarus
Post by: Rave on February 13, 2014, 07:15:18 pm
It's not FPC's goal to support dynamic packages, it's Lazarus'. FPC is just a compiler. It has to compile, support for LPKs is not needed here. However Lazarus should develop some way of dynamic package loading (if compiled). Perhaps even steal some coders from Borland/CodeGear/Embarcadero/whatever company makes Delphi now.
Title: Re: Bundling Indy with Lazarus
Post by: Cyrax on February 13, 2014, 07:29:03 pm
Lazarus is just RAD IDE, not a compiler. Dynamic package is just specialized dynamic library and FPC needs to be modified in order to add support for it.

Maybe in future when support for creating dynamic package is added to FPC, we may convert whole compiler into dynamic library and then embed it into Lazarus.
Title: Re: Bundling Indy with Lazarus
Post by: taazz on February 13, 2014, 07:46:48 pm
Lazarus is just RAD IDE, not a compiler. Dynamic package is just specialized dynamic library and FPC needs to be modified in order to add support for it.
that would be awesome, yes! Being able to use dynamic packages even as limited as the delphi ones is a plus.

Maybe in future when support for creating dynamic package is added to FPC, we may convert whole compiler into dynamic library and then embed it into Lazarus.

I don't see the link between the dynamic packages and converting the compiler to a dll for use in lazarus. there is nothing you will gain from a dynamic package instead of a dll for the compiler conversion from exe to dll.
Title: Re: Bundling Indy with Lazarus
Post by: Leledumbo on February 14, 2014, 02:41:06 am
Quote
However Lazarus should develop some way of dynamic package loading (if compiled). Perhaps even steal some coders from Borland/CodeGear/Embarcadero/whatever company makes Delphi now.
Nah, those coders only know Windows, well maybe a little Mac OS X. This feature requires great understanding of dynamic linking in the target platform and the compiler itself.
Title: Re: Bundling Indy with Lazarus
Post by: taazz on February 14, 2014, 02:47:35 am
Nah, those coders only know Windows, well maybe a little Mac OS X. This feature requires great understanding of dynamic linking in the target platform and the compiler itself.


those coders made kylix with package support on linux amongst other things, you don't really think that they do not understand dynamic linking on linux do you? In my book MACOS uses the same dynamic linking as linux so they have a very good understanding of it.
Title: Re: Bundling Indy with Lazarus
Post by: Leledumbo on February 14, 2014, 03:01:53 am
Quote
those coders made kylix with package support on linux amongst other things, you don't really think that they do not understand dynamic linking on linux do you? In my book MACOS uses the same dynamic linking as linux so they have a very good understanding of it.
Kylix IDE is written in Windows API, they run it through wine. So they use the same code as the Delphi IDE.
Title: Re: Bundling Indy with Lazarus
Post by: taazz on February 14, 2014, 03:15:06 am
Quote
those coders made kylix with package support on linux amongst other things, you don't really think that they do not understand dynamic linking on linux do you? In my book MACOS uses the same dynamic linking as linux so they have a very good understanding of it.
Kylix IDE is written in Windows API, they run it through wine. So they use the same code as the Delphi IDE.

Lets assume that what you say is true, no questions asked. where the programs compiled with kylix also use wine? As far as I remember I could compile my programs using run time packages if required.
TinyPortal © 2005-2018