Skip to content

Commit

Permalink
[NEW] Xmo'd running under Snow Leopard 10.6.1 + Xcode 3.2.1. Dropping…
Browse files Browse the repository at this point in the history
… ppc support for now, may revisit.
  • Loading branch information
rentzsch committed Oct 9, 2009
1 parent ddfc55e commit c6d0ef3
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 25 deletions.
2 changes: 1 addition & 1 deletion Xmod/Autocustomize Entity Classes.applescript
Original file line number Diff line number Diff line change
@@ -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
Expand Down
10 changes: 6 additions & 4 deletions Xmod/Xmod.applescript
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down
4 changes: 3 additions & 1 deletion Xmod/Xmod.m
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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);
Expand Down
28 changes: 9 additions & 19 deletions Xmod/Xmod.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -213,9 +213,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ARCHS = (
ppc64,
i386,
ppc,
x86_64,
);
COPY_PHASE_STRIP = NO;
Expand All @@ -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;
Expand All @@ -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;
};
Expand Down

0 comments on commit c6d0ef3

Please sign in to comment.