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

2020-05-06 Thread Salvatore Coppola via lazarus
I suppose is an hidden file in home or in .config Salvatore ⁣Ottieni BlueMail per Android ​ Il giorno 4 Mag 2020, 00:41, alle ore 00:41, Bo Berglund via lazarus ha scritto: >I am porting a Windows service application to Linux ARM (RPi4). >The Windows version is a service and as such its config

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

2020-05-04 Thread Tony Whyman via lazarus
On 04/05/2020 11:05, Bo Berglund via lazarus wrote: On Mon, 4 May 2020 10:25:42 +0100, Tony Whyman via lazarus wrote: As to the filename issue: the xml file location is determined from the Vendor Name and application name and relative to $HOME/.config - is that really a problem? First off:

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

2020-05-04 Thread Luca Olivetti via lazarus
El 4/5/20 a les 11:25, Tony Whyman via lazarus ha escrit: TRegistry is a very useful way of saving dynamic configuration data (e.g. mainform co-ordinates) in order to preserve them from one program session to another - and to do so in a cross-platform manner. IMHO. it would be a significant

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

2020-05-04 Thread Bo Berglund via lazarus
On Mon, 4 May 2020 10:25:42 +0100, Tony Whyman via lazarus wrote: >As to the filename issue: the xml file location is determined from the >Vendor Name and application name and relative to $HOME/.config - is that >really a problem? First off: I would NOT use the Registry ever for my new

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

2020-05-04 Thread Tony Whyman via lazarus
I often use TRegistry for cross-platform configuration data and you should be able to use it and avoid having to maintain different Linux and Windows versions. Under Linux, you are using TXMLRegistry and this saves registry data in an application specific XML file. There can be both a common

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

2020-05-04 Thread Michael Van Canneyt via lazarus
On Mon, 4 May 2020, Bart via lazarus wrote: On Mon, May 4, 2020 at 12:41 AM Bo Berglund via lazarus wrote: structure: HKLM\SOFTWARE\Companyname\Applicationname\Server\(named values) HKLM\SOFTWARE\Companyname\Applicationname\Configuration\(named values) The *nix way is to use .conf

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

2020-05-04 Thread Tony Whyman via lazarus
Firstly, the question is about TRegistry and not TRegIniFile. On a *nix platform TRegistry is implemented using TXMLRegistry and not TRegIniFile. You should only have a single instance of a TXMLRegistry in any one program no matter how many times you create a TRegistry object - they all point

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

2020-05-04 Thread Bart via lazarus
On Mon, May 4, 2020 at 12:41 AM Bo Berglund via lazarus wrote: > structure: > HKLM\SOFTWARE\Companyname\Applicationname\Server\(named values) > HKLM\SOFTWARE\Companyname\Applicationname\Configuration\(named values) The *nix way is to use .conf files (basically ini-files) for that. IIRC you have

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

2020-05-04 Thread Rolf Wetjen via lazarus
Hi Bo, looking into xregreg.inc: procedure TRegistry.SysRegCreate; var s : string; begin   s:=includetrailingpathdelimiter(GetAppConfigDir(GlobalXMLFile));   ForceDirectories(s);   FSysData:=TXMLRegistryInstance.GetXMLRegistry(s+XFileName);   TXmlRegistry(FSysData).AutoFlush:=False; end; It's

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

2020-05-03 Thread Bo Berglund via lazarus
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