|
From: John M M. <jo...@us...> - 2004-09-03 00:20:28
|
Update of /cvsroot/squeak/squeak/platforms/Mac OS/vm In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32651/squeak/platforms/Mac OS/vm Modified Files: sqMacExternalPrims.c Log Message: 3.7.5b1 Search for frameworks in all framework domains, versus just System. Also search by posix pathname versus HFS pathname Index: sqMacExternalPrims.c =================================================================== RCS file: /cvsroot/squeak/squeak/platforms/Mac OS/vm/sqMacExternalPrims.c,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** sqMacExternalPrims.c 3 Aug 2004 02:39:59 -0000 1.7 --- sqMacExternalPrims.c 3 Sep 2004 00:20:19 -0000 1.8 *************** *** 13,16 **** --- 13,17 ---- * Oct 2nd, 2003, JMM bug in browser file name creation in os-x, rework how path is resolved 3.7.0bx Nov 24th, 2003 JMM gCurrentVMEncoding + 3.7.5b1 Aug 24th, 2004 JMM Joliet support for loading bundles? *****************************************************************************/ *************** *** 122,126 **** #if defined ( __APPLE__ ) && defined ( __MACH__ ) ! OSStatus LoadFrameworkBundle(CFStringRef framework, CFBundleRef *bundlePtr) { OSStatus err; --- 123,127 ---- #if defined ( __APPLE__ ) && defined ( __MACH__ ) ! OSStatus LoadFrameworkBundle(SInt16 folderLocation,CFStringRef framework, CFBundleRef *bundlePtr) { OSStatus err; *************** *** 134,138 **** bundleURL = nil; ! err = FSFindFolder(kOnAppropriateDisk, kFrameworksFolderType, true, &frameworksFolderRef); if (err == noErr) { baseURL = CFURLCreateFromFSRef(kCFAllocatorSystemDefault, &frameworksFolderRef); --- 135,139 ---- bundleURL = nil; ! err = FSFindFolder(folderLocation, kFrameworksFolderType, true, &frameworksFolderRef); if (err == noErr) { baseURL = CFURLCreateFromFSRef(kCFAllocatorSystemDefault, &frameworksFolderRef); *************** *** 205,212 **** CFragConnectionID LoadLibViaPath(char *libName, char *pluginDirPath) { char tempDirPath[1024]; ! CFragConnectionID libHandle = 0; CFURLRef theURLRef; CFBundleRef theBundle; - CFStringRef filePath; OSStatus err; --- 206,214 ---- CFragConnectionID LoadLibViaPath(char *libName, char *pluginDirPath) { char tempDirPath[1024]; ! char cFileName[1000]; ! CFragConnectionID libHandle = 0; ! CFStringRef filePath; CFURLRef theURLRef; CFBundleRef theBundle; OSStatus err; *************** *** 221,232 **** strcat(tempDirPath,".bundle"); //Watch out for the bundle suffix, not a normal thing in squeak plugins ! // We could do this, but it's expensive err =makeFSSpec(tempDirPath,strlen(tempDirPath),&fileSpec); ! // So go back to a cheaper call ! filePath = CFStringCreateWithCString(kCFAllocatorDefault, ! (UInt8 *) tempDirPath,gCurrentVMEncoding); ! if (filePath == nil) ! return nil; ! ! theURLRef = CFURLCreateWithFileSystemPath(kCFAllocatorDefault,filePath,kCFURLHFSPathStyle,false); CFRelease(filePath); if (theURLRef == nil) --- 223,232 ---- strcat(tempDirPath,".bundle"); //Watch out for the bundle suffix, not a normal thing in squeak plugins ! ! /* copy the file name into a null-terminated C string */ ! sqFilenameFromString(cFileName, tempDirPath, strlen(tempDirPath)); ! filePath = CFStringCreateWithBytes(kCFAllocatorDefault,(UInt8 *)cFileName,strlen(cFileName),gCurrentVMEncoding,false); ! ! theURLRef = CFURLCreateWithFileSystemPath(kCFAllocatorDefault,filePath,kCFURLPOSIXPathStyle,false); CFRelease(filePath); if (theURLRef == nil) *************** *** 239,243 **** CFStringRef libNameCFString; libNameCFString = CFStringCreateWithCString(kCFAllocatorDefault,libName,gCurrentVMEncoding); ! err = LoadFrameworkBundle(libNameCFString, &theBundle); CFRelease(libNameCFString); if (err != noErr) --- 239,250 ---- CFStringRef libNameCFString; libNameCFString = CFStringCreateWithCString(kCFAllocatorDefault,libName,gCurrentVMEncoding); ! err = LoadFrameworkBundle(kUserDomain,libNameCFString, &theBundle); ! if (err != noErr) ! err = LoadFrameworkBundle(kNetworkDomain,libNameCFString, &theBundle); ! if (err != noErr) ! err = LoadFrameworkBundle(kLocalDomain,libNameCFString, &theBundle); ! if (err != noErr) ! err = LoadFrameworkBundle(kSystemDomain,libNameCFString, &theBundle); ! CFRelease(libNameCFString); if (err != noErr) |