views:

110

answers:

2

My purpose is to deploy user configuration files under:

  • $HOME/.appname for Unix/Linux.
  • \Documents and Settings\(user)\Application Data\AppName for Windows.

What are the API's or group of functions that I can use, with the appropriate {$IFDEF}'s, so I can deploy my config files on the appropriate places?

+1  A: 

You'll likely end up using the GetEnvironmentVariable function. Under Unix-like OSs, you will use the HOME environment variable. Under Windows, you'll use the APPDATA environment variable.

Wesley
Thanks mate. It's good to know that it works fine, and the same way, under both Windows and *NIX systems.
Gustavo Carreno
+1  A: 

Better use the correct function:

http://www.freepascal.org/docs-html/rtl/sysutils/getappconfigdir.html

result:=getappconfigdir(false)

Marco van de Voort
As usual, you da man !!! eheheheh
Gustavo Carreno