[fpc-pascal] Best practice porting a Windows service application to Linux?

Bo Berglund bo.berglund at gmail.com
Wed Apr 22 00:02:07 CEST 2020

I have this old (dev 2004-2008) service application for Win32, which I
hope to migrate/port to Linux.

It was written in Delphi7 on WinXP at the time and I want to move it
to a Debian based Linux.

Obviously stuff like handling control data via Windows Registry etc
has to be rewritten as well as implementing handling of serial port
communications, which used an external Delphi Windows-only component,
and TCP/IP socket comm which was done using TServerSocket at the time.
For TCP/IP I could probably use Indy.

But what about the general service framework?
The existing code uses a class inherited from TService, does this
exist on FPC for Windows and Linux?
So it can be crosscompiled for both platforms?

This question has popped up today since they want me to fix issues
that have appeared with the old service when running on Windows 10
I figured moving to Linux would make it more stable and less prone to
strange side effects.

In any case I have left Delphi for FPC/Lazarus nowadays...


Bo Berglund
Developer in Sweden

More information about the fpc-pascal mailing list