And for those people who will search answer without using ZenGL, here the source code:
Code:
uses
MacOSAll;
//
var
appBundle : CFBundleRef;
appCFURLRef : CFURLRef;
appCFString : CFStringRef;
appPath : array[ 0..8191 ] of AnsiChar;
begin
appBundle := CFBundleGetMainBundle();
appCFURLRef := CFBundleCopyBundleURL( appBundle );
appCFString := CFURLCopyFileSystemPath( appCFURLRef, kCFURLPOSIXPathStyle );
CFStringGetFileSystemRepresentation( appCFString, @appPath[ 0 ], 8192 );
appWorkDir := appPath + '/';
But if I remember right, ParamString(0) also will return something...
Bookmarks