1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/src/cocoaui/paths_osx.m Thu Jan 15 07:21:34 2009 +0000
1.5 + * $Id: cocoaui.c 863 2008-09-06 05:21:57Z nkeynes $
1.7 + * Cocoa builds need to use different paths from ordinary builds, since
1.8 + * the message catalogs, default config, etc are all bundle-relative.
1.9 + * Otherwise paths use the standard unix install paths
1.11 + * Copyright (c) 2008 Nathan Keynes.
1.13 + * This program is free software; you can redistribute it and/or modify
1.14 + * it under the terms of the GNU General Public License as published by
1.15 + * the Free Software Foundation; either version 2 of the License, or
1.16 + * (at your option) any later version.
1.18 + * This program is distributed in the hope that it will be useful,
1.19 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
1.20 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1.21 + * GNU General Public License for more details.
1.24 +#include <string.h>
1.26 +#include "lxdream.h"
1.28 +#include <AppKit/AppKit.h>
1.30 +static char *bundle_resource_path = NULL;
1.32 +static char *get_bundle_resource_path()
1.34 + if( bundle_resource_path == NULL ) {
1.35 + NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
1.36 + NSString *resourcePath = [[NSBundle mainBundle] resourcePath];
1.37 + bundle_resource_path = strdup([resourcePath UTF8String]);
1.40 + return bundle_resource_path;
1.43 +const char *get_sysconf_path()
1.45 + return get_bundle_resource_path();
1.48 +const char *get_locale_path()
1.50 + return get_bundle_resource_path();