(svn r17706) -Codechange: [OSX] Rework the crash handling to use the common CrashLog infrastructure.

This commit is contained in:
michi_cc
2009-10-04 21:08:30 +00:00
parent 9e85c8da66
commit 83e1f7358f
10 changed files with 267 additions and 151 deletions

View File

@@ -218,21 +218,17 @@ void ShowInfo(const char *str)
fprintf(stderr, "%s\n", str);
}
#if !defined(__APPLE__)
void ShowOSErrorBox(const char *buf, bool system)
{
#if defined(__APPLE__)
/* this creates an NSAlertPanel with the contents of 'buf'
* this is the native and nicest way to do this on OSX */
ShowMacDialog( buf, "See readme for more info\nMost likely you are missing files from the original TTD", "Quit" );
#else
/* All unix systems, except OSX. Only use escape codes on a TTY. */
if (isatty(fileno(stderr))) {
fprintf(stderr, "\033[1;31mError: %s\033[0;39m\n", buf);
} else {
fprintf(stderr, "Error: %s\n", buf);
}
#endif
}
#endif
#ifdef WITH_COCOA
void cocoaSetupAutoreleasePool();