Quote Originally Posted by Mario Donick View Post
It is not the 100% solution and it forces the user to install the game into the Applications directory, but I think most users would do this anyway.
I know users who routinely don't do this, and drag instead applications to other places they like...

You should instead use CFBundle stuff to get the path of your resources in a proper bundle. For some example code, see "examples/trayicon/" in Lazarus examples. You can go to http://svn.freepascal.org/svn/lazaru...ples/trayicon/ , download frmtest.pas, and look for {$IFDEF Darwin} code inside.

Pasting here the relevant code:

Code:
uses
{$ifdef ver2_2_0}
  FPCMacOSAll;
{$else}
  MacOSAll;
{$endif}

const
  BundleResourceFolder = '/Contents/Resources/';

var
  pathRef: CFURLRef;
  pathCFStr: CFStringRef;
  pathStr: shortstring;
  pathMedia: string;
...

  pathRef := CFBundleCopyBundleURL(CFBundleGetMainBundle());
  pathCFStr := CFURLCopyFileSystemPath(pathRef, kCFURLPOSIXPathStyle);
  CFStringGetPascalString(pathCFStr, @pathStr, 255, CFStringGetSystemEncoding());
  CFRelease(pathRef);
  CFRelease(pathCFStr);

  pathMedia := pathStr + BundleResourceFolder;