Permalink
Browse files

[NEW] Xmo'd running under Snow Leopard 10.6.1 + Xcode 3.2.1. Dropping…

… ppc support for now, may revisit.
  • Loading branch information...
1 parent ddfc55e commit c6d0ef3fa308c7b1095daaa5364e1c944a772d2e @rentzsch committed Oct 9, 2009
Showing with 19 additions and 25 deletions.
  1. +1 −1 Xmod/Autocustomize Entity Classes.applescript
  2. +6 −4 Xmod/Xmod.applescript
  3. +3 −1 Xmod/Xmod.m
  4. +9 −19 Xmod/Xmod.xcodeproj/project.pbxproj
@@ -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 tellend tellactivate
+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 tellend tellactivate
View
@@ -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}
View
@@ -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);
@@ -213,9 +213,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ARCHS = (
- ppc64,
i386,
- ppc,
x86_64,
);
COPY_PHASE_STRIP = NO;
@@ -229,19 +227,17 @@
INSTALL_PATH = "$(HOME)/Library/Bundles";
PRODUCT_NAME = Xmod;
WRAPPER_EXTENSION = pbplugin;
- ZERO_LINK = YES;
};
name = Debug;
};
1DEB913C08733D840010E9CD /* Release */ = {
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;
};

0 comments on commit c6d0ef3

Please sign in to comment.