[Lazarus] Cross-platform using TRegistry - how to?

Bo Berglund bo.berglund at gmail.com
Mon May 4 00:40:53 CEST 2020


I am porting a Windows service application to Linux ARM (RPi4).
The Windows version is a service and as such its config data resides
in the Registry below HKLM.
The Linux version will be a Daemon and I would like as much of the
code stay unaltered to avoid conversion bugs.

Now I have read that the FPC TRegistry class is able to use the
original commands for reading/writing the data by instead using some
form of ini- or xml-file store on UNIX.

The existing system written in Delphi2007 uses the following key
structure:
HKLM\SOFTWARE\Companyname\Applicationname\Server\(named values)
HKLM\SOFTWARE\Companyname\Applicationname\Configuration\(named values)

But how does this work and where/how are the data actually stored in a
Linux file system?

I have tried to google this but my search skills are not good enough
so I came up empty-handed....

Any insight on this very much appreciated.

-- 
Bo Berglund
Developer in Sweden



More information about the lazarus mailing list