Difference between revisions of "Indy with Lazarus"

From Free Pascal wiki
Jump to navigationJump to search
Line 70: Line 70:
  
 
=== How to install ===
 
=== How to install ===
[user::Matthijs] So it is not perfect yet, but you want to try it. Here is how you install it in Lazarus.
+
[[user::Matthijs]] So it is not perfect yet, but you want to try it. Here is how you install it in Lazarus.
* Open and compile {LazDir}/components/Indy10FPC/Lib/System/indysystemlaz.lpk
+
* Open and compile indysystemlaz.lpk
* Open and compile {LazDir}/components/Indy10FPC/Lib/Core/indycorelaz.lpk
+
* Open and compile indycorelaz.lpk
* Open and compile {LazDir}/components/Indy10FPC/Lib/Protocols/indyprotocolslaz.lpk
+
* Open and compile indyprotocolslaz.lpk
 +
* Open, compile and install dclindycorelaz.lpk
 +
* Open, compile and install dclindyprotocolslaz.lpk

Revision as of 19:18, 6 January 2006

Indy for Lazarus

A new attempt at converting Indy is being undertaken by the Indy core team. FPC developer Marco van de Voort is working with Indy core to get Indy fully working with FPC/Lazarus. Specially Indy's JP Mugaas did a lot of good work in getting Indy10 to work with FPC. The native unixrtl backend is mostly his work too.

Currently a lot of Indy is working, but the trouble is that it needs a lot of Lazarus and FPC experience to set up everything correctly, and to solve encountered problems. End-user packaging of Indy is in its infancy, the amount of tested demoes is low.

This page is a first attempt at initial documenting for these issues for experienced users.

Hint: I'm not very interested in support the Kylix side of Indy. (anything that uses unit libc). I ported it only as step up to native Unix RTL using Indy apps.

Requirements

Currently, FPC 2.0.2 is very close to being able to use indy in all its facets. However patches are required to get servers working for Indy10, and also one for Indy9.

For Indy10, the tthread.destroy of Unix targets should look like this:

destructor TThread.Destroy;
begin
 if (FThreadID = GetCurrentThreadID) and not(FFreeOnTerminate)
     and not ffinished then    // if exited via threadfunc, this is probably ok. In case some idiotic tthread
                               // descendant modifies freeonterminate in a destroy method.
   raise EThreadDestroyCalled.Create('A thread cannot destroy itself except by setting FreeOnTerminate and leaving!');

Note the "and not ffinished" part.

For indy9, remove the overriding of tmemorystream.setsize method (Marcov: ???) to get telnet components working.

Downloads / Links

Current snapshots (for die hards only) are at

What works, what not

Indy9:

  • Windows should largely work. Lots of demoes ported.
  • Linux not or barely. No hope at non Linux/x86 (non-Kylix) targets.

Indy10: (Indy10ForFPC branch)

  • Windows and Unix: clients work, servers sometimes have problems. Haven't found a pattern in that yet.
  • The main work for native Unix RTL done. Clients seem to work with FreeBSD.

All: secure versions not tested yet.

Short term plans

  • Convert demoes to demonstrate/test workings.
  • Fix bugs and enter them back into FPC or Indy RCS.

Problems

  • Indy9 and Indy10 are mutually exclusive, which causes problems for deployment, even the default is a problem:
    • Indy9 is more used and proven in the industry.
    • Indy10 is more portable, and better long term. However uptake seems to be low.
  • How to deploy? Parts belong to Lazarus, parts to FPC.
  • Lot of pkgs and demoes have paths in them. How to centrally fix them so that unexperienced users can build them?
  • Lazarus problems
    • Transparancy problems of icons
    • component tabs don't scroll, if you put a lot of components in one tab, they are not selectable. workaround implemented: JP Mugaas separated them into Indy clients A-M and N-Z etc.
  • Indy demoes (specially Indy10's) are not very suitable for multiplatform usage. Their setup is awfully windows specific, with spaces in paths, deep nested dirs, and useless baggage (C# code). A short working set of demoes will have to be created.

Bugs

  • Indy10 servers didn't work before due to an exception occuring during startup, which shut everything down. Can't reproduce this with current snapshot though.
  • During demo conversion, the bindings property is often wrongly converted. This can result in strange errors, specially because Indy seems to bind to the same port using both IPV4 and IPV6 from time to time. Not fully debugged yet.

How to install

[[user::Matthijs]] So it is not perfect yet, but you want to try it. Here is how you install it in Lazarus.

  • Open and compile indysystemlaz.lpk
  • Open and compile indycorelaz.lpk
  • Open and compile indyprotocolslaz.lpk
  • Open, compile and install dclindycorelaz.lpk
  • Open, compile and install dclindyprotocolslaz.lpk