Changeset 263

Show
Ignore:
Timestamp:
11/15/07 16:51:18 (1 year ago)
Author:
rentzsch
Message:

[NEW] Make Xmo'd work with Xcode 2.5.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/cocoa/mogenerator/Xmod/Xmod.m

    r250 r263  
    3737         
    3838        //      Force loading of the Core Data XDesign plugin so we can find the class to swizzle its instance method. 
    39         NSBundle *coreDataPlugin = [NSBundle bundleWithPath:@"/Library/Application Support/Apple/Developer Tools/Plug-ins/XDCoreDataModel.xdplugin"]; 
     39#define Xcode24_XDCoreDataModelPlugin @"/Library/Application Support/Apple/Developer Tools/Plug-ins/XDCoreDataModel.xdplugin" 
     40#define Xcode25_XDCoreDataModelPlugin @"/Xcode2.5/Library/Xcode/Plug-ins/XDCoreDataModel.xdplugin" 
     41         
     42        NSBundle *coreDataPlugin = nil; 
     43        if ([[NSFileManager defaultManager] fileExistsAtPath:Xcode25_XDCoreDataModelPlugin]) { 
     44                coreDataPlugin = [NSBundle bundleWithPath:Xcode25_XDCoreDataModelPlugin]; 
     45        } else { 
     46                coreDataPlugin = [NSBundle bundleWithPath:Xcode24_XDCoreDataModelPlugin]; 
     47        }        
    4048        NSAssert(coreDataPlugin, @"failed to load XDCoreDataModel.xdplugin"); 
    4149        [coreDataPlugin load];