Commits

Bob Ippolito committed bd6fac8

Reference bundles by identifier when linked in, not by path

Comments (0)

Files changed (8)

Modules/AddressBook/_AddressBook.m

 	}
 
 #ifdef MACOSX 
-	bundle = CFBundleCreate(NULL,
-		(CFURLRef)[NSURL fileURLWithPath:@"/System/Library/Frameworks/AddressBook.framework"]);
+	bundle = CFBundleGetBundleWithIdentifier(CFSTR("com.apple.AddressBook.framework"));
 #else
 	bundle = nil;
 #endif

Modules/AppKit/_AppKit.m

 	}
 
 #ifdef MACOSX
-	bundle = CFBundleCreate(NULL,
-		(CFURLRef)[NSURL fileURLWithPath:@"/System/Library/Frameworks/AppKit.framework"]);
+	bundle = CFBundleGetBundleWithIdentifier(CFSTR("com.apple.AppKit"));
 #else
 	bundle = NULL;
 #endif

Modules/ExceptionHandling/_ExceptionHandling.m

 		return;
 	}
 
-	bundle = CFBundleCreate(NULL,
-		(CFURLRef)[NSURL fileURLWithPath:@"/System/Library/Frameworks/ExceptionHandling.framework"]);
+	bundle = CFBundleGetBundleWithIdentifier(CFSTR("com.apple.ExceptionHandling"));
 
 	if (register_ints(d, enum_table) < 0) return;
 	if (register_variableList(d, bundle, string_table, 

Modules/Foundation/_Foundation.m

 	}
 
 #ifdef MACOSX
-	bundle = CFBundleCreate(NULL,
-		(CFURLRef)[NSURL fileURLWithPath:@"/System/Library/Frameworks/Foundation.framework"]);
+	bundle = CFBundleGetBundleWithIdentifier(CFSTR("com.apple.Foundation"));
 #else
 	bundle = NULL;
 #endif

Modules/InterfaceBuilder/_InterfaceBuilder.m

 		return;
 	}
 
-	bundle = CFBundleCreate(NULL,
-		(CFURLRef)[NSURL fileURLWithPath:@"/System/Library/Frameworks/InterfaceBuilder.framework"]);
+	bundle = CFBundleGetBundleWithIdentifier(CFSTR("com.apple.InterfaceBuilderFramework"));
 
 	if (register_ints(d, enum_table) < 0) return;
 	if (register_variableList(d, bundle, string_table, (sizeof(string_table)/sizeof(string_table[0]))-1) < 0) return;

Modules/PreferencePanes/_PreferencePanes.m

 		return;
 	}
 
-	bundle = CFBundleCreate(NULL,
-		(CFURLRef)[NSURL fileURLWithPath:@"/System/Library/Frameworks/PreferencePanes.framework"]);
+	bundle = CFBundleGetBundleWithIdentifier(CFSTR("com.apple.frameworks.preferencepanes"));
 
 	if (register_ints(d, enum_table) < 0) return;
 	if (register_variableList(d, bundle, string_table,

Modules/SecurityInterface/_SecurityInterface.m

 		return;
 	}
 
-	bundle = CFBundleCreate(NULL,
-		(CFURLRef)[NSURL fileURLWithPath:@"/System/Library/Frameworks/SecurityInterface.framework"]);
-
+	/* SecurityFoundation.framework has no @constant values to bring in... */
+	bundle = CFBundleGetBundleWithIdentifier(CFSTR("com.apple.securityinterface"));
 
 	if (register_ints(d, enum_table) < 0) return;
 	if (register_variableList(d, bundle, string_table, 

Modules/WebKit/_WebKit.m

 		return;
 	}
 
-	bundle = CFBundleCreate(NULL,
-		(CFURLRef)[NSURL fileURLWithPath:@"/System/Library/Frameworks/WebKit.framework"]);
+	bundle = CFBundleGetBundleWithIdentifier(CFSTR("com.apple.WebKit"));
 
 	if (register_ints(d, enum_table) < 0) return;
 	if (register_variableList(d, bundle, string_table, 
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.