On 5/27/06, Dale Welch <[EMAIL PROTECTED]> wrote:
1. Where is the Main application and it's installed files stored.
Main application can be found by user ParamStr(0) or Application.ExeName
2. Where is the user's "home" directory. are there any routines out there
which already will return these values regardless of platform?
I couldn't find one either. We created a utilities unit that has has
a function that could be called by all platforms and inside that
funtion, wrapped with IFDEF's we call the platform specific functions.
Our app only needs to run on Windows and Linux, so this is possible,
not sure if this is appropiate if you support all FPC supported
platforms.
example:
function tiGetUserName : string;
begin
{$IFDEF MSWINDOWS}
Result := tiWin32GetUserName;
{$ENDIF}
{$IFDEF UNIX} // works for Linux and FreeBSD, etc
Result := tiUnixGetUserName;
{$ENDIF}
end;
3. i need a directory in the user's home directory for my files...
The example in 2 can also be applied here, but the same limitation
applies for lots of platform.
Regards,
Graeme.
--
There's no place like 127.0.0.1
_________________________________________________________________
To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject
archives at http://www.lazarus.freepascal.org/mailarchives