diff options
author | Graeme Geldenhuys <graeme@mastermaths.co.za> | 2011-09-13 13:10:48 +0200 |
---|---|---|
committer | Graeme Geldenhuys <graeme@mastermaths.co.za> | 2011-09-13 13:10:48 +0200 |
commit | 9923c52d841ae8af0edb4608736e6622852e157d (patch) | |
tree | 4fc3caafb175584a790121e6533d5dffc3209601 /src | |
parent | cd0b93599315e0f61db65dd5d5a6c91344d3cfc1 (diff) | |
download | fpGUI-9923c52d841ae8af0edb4608736e6622852e157d.tar.xz |
new utility function to get the current executable name
Diffstat (limited to 'src')
-rw-r--r-- | src/corelib/fpg_utils.pas | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/corelib/fpg_utils.pas b/src/corelib/fpg_utils.pas index 97adb7db..2f20e1dc 100644 --- a/src/corelib/fpg_utils.pas +++ b/src/corelib/fpg_utils.pas @@ -67,6 +67,7 @@ function fpgForceDirectories(const ADirectory: TfpgString): Boolean; function fpgChangeFileExt(const FileName, Extension: TfpgString): TfpgString; function fpgGetAppConfigDir(const Global: Boolean): TfpgString; function fpgGetAppConfigFile(const Global: Boolean; const SubDir: Boolean): TfpgString; +function fpgGetExecutableName: TfpgString; implementation @@ -182,6 +183,11 @@ begin Result := fpgFromOSEncoding(GetAppConfigFile(Global, SubDir)); end; +function fpgGetExecutableName: TfpgString; +begin + Result := fpgChangeFileExt(fpgExtractFileName(Paramstr(0)), ''); +end; + function fpgAppendPathDelim(const Path: TfpgString): TfpgString; begin if (Path <> '') and (Path[length(Path)] <> PathDelim) then |