Page 1 of 1
Forum

Welcome to the Tweaking4All community forums!
When participating, please keep the Forum Rules in mind!

Topics for particular software or systems: Start your topic link with the name of the application or system.
For example “MacOS X – Your question“, or “MS Word – Your Tip or Trick“.

Please note that switching to another language when reading a post will not bring you to the same post, in Dutch, as there is no translation for that post!



Share:
Notifications
Clear all

[Solved] Lazarus/MacOS X - Where to store your Config and Data files

1 Posts
1 Users
0 Reactions
2,219 Views
 Hans
(@hans)
Famed Member Admin
Joined: 12 years ago
Posts: 2870
Topic starter  

Apple has some guidelines where to store your configuration file and where to store application data, which is conflicting with the Lazarus GetAppConfigDir or GetAppConfigFile functies.

These functions assume:

~/.config/<appname>

Which is incorrect according to Apple guidelines ... and will result in errors that a file cannot be written etc.

Config files and data files (not documents!) should be stored in:

~/Library/Preferences/<your config file>

You can expand the full path with:

ExpandFileName('~/Library/Preferences/<your config file>'); 

Note that the config file should go here as well, which is typically an XML file with the .plist extension.
But you can of course also use your own format 


   
ReplyQuote
Share: