Using ICS under Free Pascal

What is ICS?

ICS (Internet Component Suite), is a set Delphi classes for TCP/IP based communications using the usual internet protocols. There is also a version for Kylix.

ICS and the middleware suite Midware are available on the Overbyte site (click the logo in the top left of this page)

FPC Compiler version

I use (and you'll need) FPC compiler: 1.9.8. Maybe 1.9.6 works too. This is for Windows. Other OSes (most notably Linux and FreeBSD) and FPC versions (1.0.x) are not yet supported.

The above compiler date is not fixed, if compability issues are found and fixed, it might increase.

The 1.9.x series is used because that minimizes the changes to ICS. All changes at this point have been absorbed into the ICS distribution by Francois.

It might be possible to do a different port of ICS to 1.0.10, but I don't think it is wise to merge these fixes in to Francois' main distribution.

Noforms

Quite some of the changes for FPC were actually patches to the console application (non forms.application event loop) support of ICS. Francois made a nice unit for this, called conapp that eases this.

ICS version

Currently I use Francois releases of early march 2005. No modifications on the FPC runtime were needed, and the ICS distribution con* applications should compile directly with FPC 1.9.8.

Types

The main units can be divided into five categories:
  1. units that compile right away with FPC 1.9.8, with only the "general" changes described belowand maybe a few very small detail fixes (see "per file") and can be tested using one of the con files
  2. same 1, but can't be tested because there is no console demo yet
  3. units that use forms, but only for (de)allocatehwnd and/or the application object. (see "dummy forms" paragraph) (tncnx, pop3prot, nntpcli and ftpsrv )
  4. Heavily VCL using units that define controls. (tnoptfrm emulvt, wait and pop3cli use forms heavily. tnemulvt uses emulvt)

As said category 1 and 2 only need the "general" fixes listed below, and a few "per unit" fixes.

Category 3 could also work, but needs some things adapted in the eventflow. It turned out that Francois was already working on this (wsocket.allocatehwnd), and pop3prot and ftpsrv are working. nttpcli was fixed, but there is no demo for it yet.

Category 4 Maybe (partially?) portable to lazarus in say a year time, but I don't touch them for now. See separate lazarus section

General changes needed

Note: these changes are already merged by Francois. They are only reproduced as a reminder for other ICS developers

These more intrusive changes are needed in every unit (and a lot of the relevant demoes). Most involve preprocessor or uses clause fixes. The only units that don't qualify are units that really _use_ the visual part of the VCL, and have nothing else, (tnoptfrm, emulvt, wait and pop3cli. tnemulvt is based on emulvt. Most demoes)

unit specific changes

(These changes only have a few occurances)

Status

Main units

  1. conapp
  2. dnsquery
  3. fingcli
  4. ftpcli
  5. ftpsrvc ftpsrvt and ftpsrv
  6. httpprot and httpsrv
  7. icmp