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?
From stackoverflow
-
You'll likely end up using the
GetEnvironmentVariablefunction. Under Unix-like OSs, you will use theHOMEenvironment variable. Under Windows, you'll use theAPPDATAenvironment variable.Gustavo Carreno : Thanks mate. It's good to know that it works fine, and the same way, under both Windows and *NIX systems. -
Better use the correct function:
http://www.freepascal.org/docs-html/rtl/sysutils/getappconfigdir.html
result:=getappconfigdir(false)
Gustavo Carreno : As usual, you da man !!! eheheheh
0 comments:
Post a Comment