Commits

Bob Ippolito  committed bd6fac8

Reference bundles by identifier when linked in, not by path

  • Participants
  • Parent commits 366555e
  • Branches pyobjc-ancient

Comments (0)

Files changed (8)

File 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

File 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

File 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, 

File 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

File 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;

File 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,

File 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, 

File 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,