diff --git a/Xmod/Autocustomize Entity Classes.applescript b/Xmod/Autocustomize Entity Classes.applescript index 34c9ddb8..e371047b 100644 --- a/Xmod/Autocustomize Entity Classes.applescript +++ b/Xmod/Autocustomize Entity Classes.applescript @@ -1 +1 @@ -tell application "Xcode" activate if not (exists active project document) then  error "No active project. Please open an Xcode project and re-run the script." set mainWindowFilePath to associated file name of main window if mainWindowFilePath does not end with ".xcdatamodel" then  error "Please open an .xcdatamodel file and re-run the script." tell item 1 of (every data model document whose path is mainWindowFilePath) (*using terms from application "Finder" display alert "Autocustomize Entity Classes" message "Automatically customize all generic entity classes based on their names? (This is undoable.)" buttons {"Cancel", "Auto-customize"} cancel button 1 end using terms from if button returned of result is "Auto-customize" then*) repeat with entityIt in (every entity) set object class of entityIt to name of entityIt & "MO" end repeat --end if end tell end tell activate \ No newline at end of file +tell application "Xcode" if version = "3.2" or version = "3.2.1" then display alert "Xcode Incompatiblity" message "Xcode 3.2 and 3.2.1 broke the AppleScript interface for manipulating entities, breaking this script. Dupe http://openradar.me/7289446 if you want it back." as warning return end if activate if not (exists active project document) then error "No active project. Please open an Xcode project and re-run the script." end if set mainWindowFilePath to associated file name of main window if mainWindowFilePath does not end with ".xcdatamodel" then error "Please open an .xcdatamodel file and re-run the script." end if tell item 1 of (every data model document whose path is mainWindowFilePath) using terms from application "Finder" display alert "Autocustomize Entity Classes" message "Automatically customize all generic entity classes based on their names? (This is undoable.)" buttons {"Cancel", "Auto-customize"} cancel button 1 end using terms from if button returned of result is "Auto-customize" then repeat with entityIt in (every entity) set object class of entityIt to name of entityIt & "MO" end repeat end if end tell end tell activate \ No newline at end of file diff --git a/Xmod/Xmod.applescript b/Xmod/Xmod.applescript index 1304c148..160b1599 100644 --- a/Xmod/Xmod.applescript +++ b/Xmod/Xmod.applescript @@ -67,11 +67,13 @@ on everyTargetWithBuildFilePath(_project, _buildFilePath) return theResult end everyTargetWithBuildFilePath -on modelSrcDirPath(modelFilePath) - set modelFilePath to POSIX file modelFilePath +on modelSrcDirPath(modelFileUnixPath) + set modelFilePosixRef to POSIX file modelFileUnixPath + set modelFileAlias to modelFilePosixRef as alias + tell application "Finder" - set modelFileFolder to folder of (modelFilePath as file) - set modelFileName to name of (modelFilePath as file) + set modelFileFolder to folder of modelFileAlias + set modelFileName to name of modelFileAlias set modelSrcFolderName to text 1 thru -13 of modelFileName -- pull off the .xcdatamodel extension if not (exists folder modelSrcFolderName of modelFileFolder) then make folder at modelFileFolder with properties {name:modelSrcFolderName} diff --git a/Xmod/Xmod.m b/Xmod/Xmod.m index 59186c81..35b22679 100644 --- a/Xmod/Xmod.m +++ b/Xmod/Xmod.m @@ -8,6 +8,8 @@ 10.5 SDK ppc, i386 Xcode 3.0 10.5 SDK ppc GC, ppc64 GC, i386 GC, x86_64 GC +Xcode 3.2 + 10.6 SDK i386 GC, x86_64 GC */ @interface NSObject (xmod_saveModelToFile) @@ -55,7 +57,7 @@ - (void)applicationDidFinishLaunching:(NSNotification*)notification_ { coreDataPlugin = [NSBundle bundleWithPath:@"/Library/Application Support/Apple/Developer Tools/Plug-ins/XDCoreDataModel.xdplugin"]; } else if ([xcodeVersion isEqualToString:@"2.5"]) { coreDataPlugin = [NSBundle bundleWithPath:@"/Xcode2.5/Library/Xcode/Plug-ins/XDCoreDataModel.xdplugin"]; - } else if ([xcodeVersion isEqualToString:@"3.0"] || [xcodeVersion hasPrefix:@"3.1"]) { + } else if ([xcodeVersion isEqualToString:@"3.0"] || [xcodeVersion hasPrefix:@"3.1"] || [xcodeVersion hasPrefix:@"3.2"]) { coreDataPlugin = [NSBundle bundleWithPath:@"/Developer/Library/Xcode/Plug-ins/XDCoreDataModel.xdplugin"]; } else { NSLog(@"Xmod: unknown Xcode version (%@), not loading.", xcodeVersion); diff --git a/Xmod/Xmod.xcodeproj/project.pbxproj b/Xmod/Xmod.xcodeproj/project.pbxproj index 1ab1223d..c209e69f 100644 --- a/Xmod/Xmod.xcodeproj/project.pbxproj +++ b/Xmod/Xmod.xcodeproj/project.pbxproj @@ -213,9 +213,7 @@ isa = XCBuildConfiguration; buildSettings = { ARCHS = ( - ppc64, i386, - ppc, x86_64, ); COPY_PHASE_STRIP = NO; @@ -229,7 +227,6 @@ INSTALL_PATH = "$(HOME)/Library/Bundles"; PRODUCT_NAME = Xmod; WRAPPER_EXTENSION = pbplugin; - ZERO_LINK = YES; }; name = Debug; }; @@ -237,11 +234,10 @@ isa = XCBuildConfiguration; buildSettings = { ARCHS = ( - ppc64, i386, - ppc, x86_64, ); + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; GCC_GENERATE_DEBUGGING_SYMBOLS = NO; GCC_MODEL_TUNING = G5; GCC_PRECOMPILE_PREFIX_HEADER = YES; @@ -256,34 +252,28 @@ 1DEB913F08733D840010E9CD /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { + ARCHS = "$(ONLY_ACTIVE_ARCH_PRE_XCODE_3_1)"; GCC_ENABLE_OBJC_GC = YES; + GCC_VERSION = ""; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNUSED_VARIABLE = YES; + ONLY_ACTIVE_ARCH_PRE_XCODE_3_1 = "$(NATIVE_ARCH_ACTUAL)"; PREBINDING = NO; - SDKROOT = "$(SDKROOT_$(CURRENT_ARCH))"; - SDKROOT_i386 = /Developer/SDKs/MacOSX10.4u.sdk; - SDKROOT_ppc = /Developer/SDKs/MacOSX10.4u.sdk; - SDKROOT_ppc64 = /Developer/SDKs/MacOSX10.5.sdk; - SDKROOT_ppc7400 = /Developer/SDKs/MacOSX10.4u.sdk; - SDKROOT_ppc970 = /Developer/SDKs/MacOSX10.4u.sdk; - SDKROOT_x86_64 = /Developer/SDKs/MacOSX10.5.sdk; + SDKROOT = "$(DEVELOPER_SDK_DIR)/MacOSX10.6.sdk"; }; name = Debug; }; 1DEB914008733D840010E9CD /* Release */ = { isa = XCBuildConfiguration; buildSettings = { + ARCHS = "$(ARCHS_STANDARD_32_64_BIT_PRE_XCODE_3_1)"; + ARCHS_STANDARD_32_64_BIT_PRE_XCODE_3_1 = "x86_64 i386 ppc"; GCC_ENABLE_OBJC_GC = YES; + GCC_VERSION = ""; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNUSED_VARIABLE = YES; PREBINDING = NO; - SDKROOT = "$(SDKROOT_$(CURRENT_ARCH))"; - SDKROOT_i386 = /Developer/SDKs/MacOSX10.4u.sdk; - SDKROOT_ppc = /Developer/SDKs/MacOSX10.4u.sdk; - SDKROOT_ppc64 = /Developer/SDKs/MacOSX10.5.sdk; - SDKROOT_ppc7400 = /Developer/SDKs/MacOSX10.4u.sdk; - SDKROOT_ppc970 = /Developer/SDKs/MacOSX10.4u.sdk; - SDKROOT_x86_64 = /Developer/SDKs/MacOSX10.5.sdk; + SDKROOT = "$(DEVELOPER_SDK_DIR)/MacOSX10.6.sdk"; }; name = Release; };