summaryrefslogtreecommitdiffstats
path: root/base/mac/foundation_util.mm
diff options
context:
space:
mode:
Diffstat (limited to 'base/mac/foundation_util.mm')
-rw-r--r--base/mac/foundation_util.mm9
1 files changed, 9 insertions, 0 deletions
diff --git a/base/mac/foundation_util.mm b/base/mac/foundation_util.mm
index ad8a247..151d82f 100644
--- a/base/mac/foundation_util.mm
+++ b/base/mac/foundation_util.mm
@@ -80,6 +80,15 @@ FilePath MainAppBundlePath() {
return FilePath([[bundle bundlePath] fileSystemRepresentation]);
}
+FilePath PathForMainAppBundleResource(CFStringRef resourceName) {
+ NSBundle* bundle = MainAppBundle();
+ NSString* resourcePath = [bundle pathForResource:(NSString*)resourceName
+ ofType:nil];
+ if (!resourcePath)
+ return FilePath();
+ return FilePath([resourcePath fileSystemRepresentation]);
+}
+
void SetOverrideAppBundle(NSBundle* bundle) {
if (bundle != g_override_app_bundle) {
[g_override_app_bundle release];