// when started from Application file on Mac OS X...
char path[PATH_MAX];
CFBundleRef mainBundle = CFBundleGetMainBundle();
assert(mainBundle != 0);
CFURLRef mainBundleURL = CFBundleCopyBundleURL(mainBundle);
assert(mainBundleURL != 0);
// when started from Application file on Mac OS X...
char path[PATH_MAX];
CFBundleRef mainBundle = CFBundleGetMainBundle();
assert(mainBundle != 0);
CFURLRef mainBundleURL = CFBundleCopyBundleURL(mainBundle);
assert(mainBundleURL != 0);
assert(pathStr != 0);
CFStringGetCString(pathStr, path, PATH_MAX, kCFStringEncodingUTF8);
CFRelease(mainBundleURL);
assert(pathStr != 0);
CFStringGetCString(pathStr, path, PATH_MAX, kCFStringEncodingUTF8);
CFRelease(mainBundleURL);