Cocoa Framework (patch included)

Discuss new features and future development.

Cocoa Framework (patch included)

Postby Michael Buckley » Wed Mar 12, 2008 3:05 pm

So I've been using a Cocoa framework for my project for a while, and I finally got around to changing the current svn (revision 212) .xcodeproj file to build a cocoa framework which links against the ruby library built into OS X. Patch is as follows (I tried to upload it but the board rejected both diff and txt extensions):

Code: Select all
Index: Chipmunk/macosx/Chipmunk.xcodeproj/project.pbxproj
===================================================================
--- Chipmunk/macosx/Chipmunk.xcodeproj/project.pbxproj   (revision 212)
+++ Chipmunk/macosx/Chipmunk.xcodeproj/project.pbxproj   (working copy)
@@ -16,6 +16,7 @@
          dependencies = (
             D3781F910C39C95A00BF66C6 /* PBXTargetDependency */,
             D3781F930C39C95A00BF66C6 /* PBXTargetDependency */,
+            FF8172700D8865640052FCC8 /* PBXTargetDependency */,
          );
          name = "Build Release";
          productName = "Build Release";
@@ -60,6 +61,33 @@
       D3BC99C10AB381EE0025A2C0 /* main.c in Sources */ = {isa = PBXBuildFile; fileRef = D3BC99C00AB381EE0025A2C0 /* main.c */; };
       D3E5F0550AA3303F004E361B /* GLUT.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D3E5F0530AA3303F004E361B /* GLUT.framework */; };
       D3E5F0560AA3303F004E361B /* OpenGL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D3E5F0540AA3303F004E361B /* OpenGL.framework */; };
+      FF8172240D8863450052FCC8 /* chipmunk.c in Sources */ = {isa = PBXBuildFile; fileRef = D3B718E00AB2BC8900B500C9 /* chipmunk.c */; };
+      FF8172250D8863460052FCC8 /* chipmunk.h in Headers */ = {isa = PBXBuildFile; fileRef = D3E5F0C40AA75CC3004E361B /* chipmunk.h */; settings = {ATTRIBUTES = (Public, ); }; };
+      FF8172260D88634B0052FCC8 /* cpArbiter.c in Sources */ = {isa = PBXBuildFile; fileRef = D3E5F0C20AA75CA9004E361B /* cpArbiter.c */; };
+      FF8172270D88634D0052FCC8 /* cpArbiter.h in Headers */ = {isa = PBXBuildFile; fileRef = D3E5F0C10AA75CA9004E361B /* cpArbiter.h */; settings = {ATTRIBUTES = (Public, ); }; };
+      FF8172280D8863550052FCC8 /* cpArray.c in Sources */ = {isa = PBXBuildFile; fileRef = D3E5F2DD0AAA562B004E361B /* cpArray.c */; };
+      FF8172290D8863560052FCC8 /* cpArray.h in Headers */ = {isa = PBXBuildFile; fileRef = D3E5F2DC0AAA562B004E361B /* cpArray.h */; settings = {ATTRIBUTES = (Public, ); }; };
+      FF81722A0D88635C0052FCC8 /* cpBB.c in Sources */ = {isa = PBXBuildFile; fileRef = D3E5F2DA0AAA5622004E361B /* cpBB.c */; };
+      FF81722B0D88635D0052FCC8 /* cpBB.h in Headers */ = {isa = PBXBuildFile; fileRef = D3E5F2D90AAA5622004E361B /* cpBB.h */; settings = {ATTRIBUTES = (Public, ); }; };
+      FF81722C0D8863700052FCC8 /* cpBody.c in Sources */ = {isa = PBXBuildFile; fileRef = D3E5F0DE0AAA2273004E361B /* cpBody.c */; };
+      FF81722D0D8863710052FCC8 /* cpBody.h in Headers */ = {isa = PBXBuildFile; fileRef = D3E5F0DD0AAA2273004E361B /* cpBody.h */; settings = {ATTRIBUTES = (Public, ); }; };
+      FF81722E0D8863750052FCC8 /* cpCollision.c in Sources */ = {isa = PBXBuildFile; fileRef = D37E231F0AAA728A00BB4C50 /* cpCollision.c */; };
+      FF81722F0D8863760052FCC8 /* cpCollision.h in Headers */ = {isa = PBXBuildFile; fileRef = D37E231E0AAA728A00BB4C50 /* cpCollision.h */; settings = {ATTRIBUTES = (Public, ); }; };
+      FF8172300D88637C0052FCC8 /* cpHashSet.c in Sources */ = {isa = PBXBuildFile; fileRef = D30CE25D0B52535500427129 /* cpHashSet.c */; };
+      FF8172310D88637C0052FCC8 /* cpHashSet.h in Headers */ = {isa = PBXBuildFile; fileRef = D30CE25E0B52535500427129 /* cpHashSet.h */; settings = {ATTRIBUTES = (Public, ); }; };
+      FF8172320D8863810052FCC8 /* cpJoint.c in Sources */ = {isa = PBXBuildFile; fileRef = D310E21B0B69CFE9007E0B0C /* cpJoint.c */; };
+      FF8172330D8863810052FCC8 /* cpJoint.h in Headers */ = {isa = PBXBuildFile; fileRef = D310E2160B69CFDA007E0B0C /* cpJoint.h */; settings = {ATTRIBUTES = (Public, ); }; };
+      FF8172340D8863890052FCC8 /* cpPolyShape.c in Sources */ = {isa = PBXBuildFile; fileRef = D3BC99AB0AB381AF0025A2C0 /* cpPolyShape.c */; };
+      FF8172350D88638A0052FCC8 /* cpPolyShape.h in Headers */ = {isa = PBXBuildFile; fileRef = D3BC99AC0AB381AF0025A2C0 /* cpPolyShape.h */; settings = {ATTRIBUTES = (Public, ); }; };
+      FF8172360D88638E0052FCC8 /* cpShape.c in Sources */ = {isa = PBXBuildFile; fileRef = D37E22FD0AAA63B800BB4C50 /* cpShape.c */; };
+      FF8172370D88638E0052FCC8 /* cpShape.h in Headers */ = {isa = PBXBuildFile; fileRef = D37E22FC0AAA63B800BB4C50 /* cpShape.h */; settings = {ATTRIBUTES = (Public, ); }; };
+      FF8172380D8863940052FCC8 /* cpSpace.c in Sources */ = {isa = PBXBuildFile; fileRef = D3E5F2CF0AAA5589004E361B /* cpSpace.c */; };
+      FF8172390D8863960052FCC8 /* cpSpace.h in Headers */ = {isa = PBXBuildFile; fileRef = D3E5F2CE0AAA5589004E361B /* cpSpace.h */; settings = {ATTRIBUTES = (Public, ); }; };
+      FF81723A0D88639B0052FCC8 /* cpSpaceHash.c in Sources */ = {isa = PBXBuildFile; fileRef = D3E5F2DF0AAA562B004E361B /* cpSpaceHash.c */; };
+      FF81723B0D88639C0052FCC8 /* cpSpaceHash.h in Headers */ = {isa = PBXBuildFile; fileRef = D3E5F2DE0AAA562B004E361B /* cpSpaceHash.h */; settings = {ATTRIBUTES = (Public, ); }; };
+      FF81723C0D8863A60052FCC8 /* cpVect.c in Sources */ = {isa = PBXBuildFile; fileRef = D3E5F0260AA32F15004E361B /* cpVect.c */; };
+      FF81723D0D8863A70052FCC8 /* cpVect.h in Headers */ = {isa = PBXBuildFile; fileRef = D3E5F0270AA32F16004E361B /* cpVect.h */; settings = {ATTRIBUTES = (Public, ); }; };
+      FF8172400D8863D40052FCC8 /* prime.h in Headers */ = {isa = PBXBuildFile; fileRef = D353B6480B059C5F0038D274 /* prime.h */; settings = {ATTRIBUTES = (Public, ); }; };
 /* End PBXBuildFile section */
 
 /* Begin PBXContainerItemProxy section */
@@ -84,6 +112,13 @@
          remoteGlobalIDString = D34963BA0B56CAA300CAD239;
          remoteInfo = ChipmunkStatic;
       };
+      FF81726F0D8865640052FCC8 /* PBXContainerItemProxy */ = {
+         isa = PBXContainerItemProxy;
+         containerPortal = D3E5F0190AA32EAC004E361B /* Project object */;
+         proxyType = 1;
+         remoteGlobalIDString = FF8172150D8862690052FCC8 /* ChipmunkFramework */;
+         remoteInfo = ChipmunkFramework;
+      };
 /* End PBXContainerItemProxy section */
 
 /* Begin PBXFileReference section */
@@ -122,7 +157,7 @@
       D3CCE2780AE4103C0080442F /* Demo3.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = Demo3.c; sourceTree = "<group>"; };
       D3E5F0260AA32F15004E361B /* cpVect.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = cpVect.c; sourceTree = "<group>"; };
       D3E5F0270AA32F16004E361B /* cpVect.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = cpVect.h; sourceTree = "<group>"; };
-      D3E5F0490AA32FDE004E361B /* ChipmunkDemo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = ChipmunkDemo.app; sourceTree = BUILT_PRODUCTS_DIR; };
+      D3E5F0490AA32FDE004E361B /* ChipmunkDemo.app */ = {isa = PBXFileReference; includeInIndex = 0; lastKnownFileType = wrapper.application; path = ChipmunkDemo.app; sourceTree = BUILT_PRODUCTS_DIR; };
       D3E5F04C0AA32FDE004E361B /* main-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.xml; path = "main-Info.plist"; sourceTree = "<group>"; };
       D3E5F0530AA3303F004E361B /* GLUT.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = GLUT.framework; path = /System/Library/Frameworks/GLUT.framework; sourceTree = "<absolute>"; };
       D3E5F0540AA3303F004E361B /* OpenGL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGL.framework; path = /System/Library/Frameworks/OpenGL.framework; sourceTree = "<absolute>"; };
@@ -139,6 +174,8 @@
       D3E5F2DD0AAA562B004E361B /* cpArray.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = cpArray.c; sourceTree = "<group>"; };
       D3E5F2DE0AAA562B004E361B /* cpSpaceHash.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = cpSpaceHash.h; sourceTree = "<group>"; };
       D3E5F2DF0AAA562B004E361B /* cpSpaceHash.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = cpSpaceHash.c; sourceTree = "<group>"; };
+      FF8172160D8862690052FCC8 /* Chipmunk.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Chipmunk.framework; sourceTree = BUILT_PRODUCTS_DIR; };
+      FF8172170D8862690052FCC8 /* ChipmunkFramework-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.xml; path = "ChipmunkFramework-Info.plist"; sourceTree = "<group>"; };
 /* End PBXFileReference section */
 
 /* Begin PBXFrameworksBuildPhase section */
@@ -159,6 +196,13 @@
          );
          runOnlyForDeploymentPostprocessing = 0;
       };
+      FF8172140D8862690052FCC8 /* Frameworks */ = {
+         isa = PBXFrameworksBuildPhase;
+         buildActionMask = 2147483647;
+         files = (
+         );
+         runOnlyForDeploymentPostprocessing = 0;
+      };
 /* End PBXFrameworksBuildPhase section */
 
 /* Begin PBXGroup section */
@@ -242,6 +286,7 @@
             D3E5F0520AA32FF5004E361B /* frameworks */,
             D3E5F04A0AA32FDE004E361B /* Products */,
             D3E5F04C0AA32FDE004E361B /* main-Info.plist */,
+            FF8172170D8862690052FCC8 /* ChipmunkFramework-Info.plist */,
          );
          sourceTree = "<group>";
       };
@@ -250,6 +295,7 @@
          children = (
             D3E5F0490AA32FDE004E361B /* ChipmunkDemo.app */,
             D34963BB0B56CAA300CAD239 /* libChipmunk.a */,
+            FF8172160D8862690052FCC8 /* Chipmunk.framework */,
          );
          name = Products;
          sourceTree = "<group>";
@@ -303,6 +349,27 @@
          );
          runOnlyForDeploymentPostprocessing = 0;
       };
+      FF8172110D8862690052FCC8 /* Headers */ = {
+         isa = PBXHeadersBuildPhase;
+         buildActionMask = 2147483647;
+         files = (
+            FF8172250D8863460052FCC8 /* chipmunk.h in Headers */,
+            FF8172270D88634D0052FCC8 /* cpArbiter.h in Headers */,
+            FF8172290D8863560052FCC8 /* cpArray.h in Headers */,
+            FF81722B0D88635D0052FCC8 /* cpBB.h in Headers */,
+            FF81722D0D8863710052FCC8 /* cpBody.h in Headers */,
+            FF81722F0D8863760052FCC8 /* cpCollision.h in Headers */,
+            FF8172310D88637C0052FCC8 /* cpHashSet.h in Headers */,
+            FF8172330D8863810052FCC8 /* cpJoint.h in Headers */,
+            FF8172350D88638A0052FCC8 /* cpPolyShape.h in Headers */,
+            FF8172370D88638E0052FCC8 /* cpShape.h in Headers */,
+            FF8172390D8863960052FCC8 /* cpSpace.h in Headers */,
+            FF81723B0D88639C0052FCC8 /* cpSpaceHash.h in Headers */,
+            FF81723D0D8863A70052FCC8 /* cpVect.h in Headers */,
+            FF8172400D8863D40052FCC8 /* prime.h in Headers */,
+         );
+         runOnlyForDeploymentPostprocessing = 0;
+      };
 /* End PBXHeadersBuildPhase section */
 
 /* Begin PBXNativeTarget section */
@@ -341,6 +408,24 @@
          productReference = D3E5F0490AA32FDE004E361B /* ChipmunkDemo.app */;
          productType = "com.apple.product-type.application";
       };
+      FF8172150D8862690052FCC8 /* ChipmunkFramework */ = {
+         isa = PBXNativeTarget;
+         buildConfigurationList = FF8172180D8862690052FCC8 /* Build configuration list for PBXNativeTarget "ChipmunkFramework" */;
+         buildPhases = (
+            FF8172110D8862690052FCC8 /* Headers */,
+            FF8172120D8862690052FCC8 /* Resources */,
+            FF8172130D8862690052FCC8 /* Sources */,
+            FF8172140D8862690052FCC8 /* Frameworks */,
+         );
+         buildRules = (
+         );
+         dependencies = (
+         );
+         name = ChipmunkFramework;
+         productName = ChipmunkFramework;
+         productReference = FF8172160D8862690052FCC8 /* Chipmunk.framework */;
+         productType = "com.apple.product-type.framework";
+      };
 /* End PBXNativeTarget section */
 
 /* Begin PBXProject section */
@@ -357,6 +442,7 @@
             D3E5F0480AA32FDE004E361B /* ChipmunkDemo */,
             D34963BA0B56CAA300CAD239 /* ChipmunkStatic */,
             D3781F8F0C39C95100BF66C6 /* Build Release */,
+            FF8172150D8862690052FCC8 /* ChipmunkFramework */,
          );
       };
 /* End PBXProject section */
@@ -369,6 +455,13 @@
          );
          runOnlyForDeploymentPostprocessing = 0;
       };
+      FF8172120D8862690052FCC8 /* Resources */ = {
+         isa = PBXResourcesBuildPhase;
+         buildActionMask = 2147483647;
+         files = (
+         );
+         runOnlyForDeploymentPostprocessing = 0;
+      };
 /* End PBXResourcesBuildPhase section */
 
 /* Begin PBXShellScriptBuildPhase section */
@@ -383,7 +476,7 @@
          );
          runOnlyForDeploymentPostprocessing = 0;
          shellPath = /bin/sh;
-         shellScript = "mkdir -p ../macosx_products/chipmunk_static\ncp -r build/Release/ChipmunkDemo.app ../macosx_products\ncp build/Release/libChipmunk.a ../macosx_products/chipmunk_static\ncp ../src/cp*.h ../src/chipmunk.h ../macosx_products/chipmunk_static";
+         shellScript = "mkdir -p ../macosx_products/chipmunk_static\ncp -r build/Release/ChipmunkDemo.app ../macosx_products\ncp build/Release/libChipmunk.a ../macosx_products/chipmunk_static\ncp ../src/cp*.h ../src/chipmunk.h ../macosx_products/chipmunk_static\ncp -r build/Release/Chipmunk.framework ../macosx_products";
       };
 /* End PBXShellScriptBuildPhase section */
 
@@ -423,6 +516,26 @@
          );
          runOnlyForDeploymentPostprocessing = 0;
       };
+      FF8172130D8862690052FCC8 /* Sources */ = {
+         isa = PBXSourcesBuildPhase;
+         buildActionMask = 2147483647;
+         files = (
+            FF8172240D8863450052FCC8 /* chipmunk.c in Sources */,
+            FF8172260D88634B0052FCC8 /* cpArbiter.c in Sources */,
+            FF8172280D8863550052FCC8 /* cpArray.c in Sources */,
+            FF81722A0D88635C0052FCC8 /* cpBB.c in Sources */,
+            FF81722C0D8863700052FCC8 /* cpBody.c in Sources */,
+            FF81722E0D8863750052FCC8 /* cpCollision.c in Sources */,
+            FF8172300D88637C0052FCC8 /* cpHashSet.c in Sources */,
+            FF8172320D8863810052FCC8 /* cpJoint.c in Sources */,
+            FF8172340D8863890052FCC8 /* cpPolyShape.c in Sources */,
+            FF8172360D88638E0052FCC8 /* cpShape.c in Sources */,
+            FF8172380D8863940052FCC8 /* cpSpace.c in Sources */,
+            FF81723A0D88639B0052FCC8 /* cpSpaceHash.c in Sources */,
+            FF81723C0D8863A60052FCC8 /* cpVect.c in Sources */,
+         );
+         runOnlyForDeploymentPostprocessing = 0;
+      };
 /* End PBXSourcesBuildPhase section */
 
 /* Begin PBXTargetDependency section */
@@ -441,6 +554,11 @@
          target = D34963BA0B56CAA300CAD239 /* ChipmunkStatic */;
          targetProxy = D38687D10BAFC688008B7008 /* PBXContainerItemProxy */;
       };
+      FF8172700D8865640052FCC8 /* PBXTargetDependency */ = {
+         isa = PBXTargetDependency;
+         target = FF8172150D8862690052FCC8 /* ChipmunkFramework */;
+         targetProxy = FF81726F0D8865640052FCC8 /* PBXContainerItemProxy */;
+      };
 /* End PBXTargetDependency section */
 
 /* Begin XCBuildConfiguration section */
@@ -680,6 +798,69 @@
          };
          name = Release;
       };
+      FF8172190D8862690052FCC8 /* Debug */ = {
+         isa = XCBuildConfiguration;
+         buildSettings = {
+            COPY_PHASE_STRIP = NO;
+            DYLIB_COMPATIBILITY_VERSION = 1;
+            DYLIB_CURRENT_VERSION = 1;
+            FRAMEWORK_VERSION = A;
+            GCC_DYNAMIC_NO_PIC = NO;
+            GCC_ENABLE_FIX_AND_CONTINUE = YES;
+            GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
+            GCC_MODEL_TUNING = G5;
+            GCC_OPTIMIZATION_LEVEL = 0;
+            GCC_PRECOMPILE_PREFIX_HEADER = YES;
+            GCC_PREFIX_HEADER = "";
+            INFOPLIST_FILE = "ChipmunkFramework-Info.plist";
+            INSTALL_PATH = "$(HOME)/Library/Frameworks";
+            OTHER_LDFLAGS = "-lruby";
+            PREBINDING = NO;
+            PRODUCT_NAME = Chipmunk;
+            ZERO_LINK = YES;
+         };
+         name = Debug;
+      };
+      FF81721A0D8862690052FCC8 /* Release */ = {
+         isa = XCBuildConfiguration;
+         buildSettings = {
+            COPY_PHASE_STRIP = YES;
+            DYLIB_COMPATIBILITY_VERSION = 1;
+            DYLIB_CURRENT_VERSION = 1;
+            FRAMEWORK_VERSION = A;
+            GCC_ENABLE_FIX_AND_CONTINUE = NO;
+            GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
+            GCC_MODEL_TUNING = G5;
+            GCC_PRECOMPILE_PREFIX_HEADER = YES;
+            GCC_PREFIX_HEADER = "";
+            INFOPLIST_FILE = "ChipmunkFramework-Info.plist";
+            INSTALL_PATH = "$(HOME)/Library/Frameworks";
+            OTHER_LDFLAGS = "-lruby";
+            PREBINDING = NO;
+            PRODUCT_NAME = Chipmunk;
+            ZERO_LINK = NO;
+         };
+         name = Release;
+      };
+      FF81721B0D8862690052FCC8 /* Native Only */ = {
+         isa = XCBuildConfiguration;
+         buildSettings = {
+            DYLIB_COMPATIBILITY_VERSION = 1;
+            DYLIB_CURRENT_VERSION = 1;
+            FRAMEWORK_VERSION = A;
+            GCC_ENABLE_FIX_AND_CONTINUE = YES;
+            GCC_MODEL_TUNING = G5;
+            GCC_PRECOMPILE_PREFIX_HEADER = YES;
+            GCC_PREFIX_HEADER = "";
+            INFOPLIST_FILE = "ChipmunkFramework-Info.plist";
+            INSTALL_PATH = "$(HOME)/Library/Frameworks";
+            OTHER_LDFLAGS = "-lruby";
+            PREBINDING = NO;
+            PRODUCT_NAME = Chipmunk;
+            ZERO_LINK = YES;
+         };
+         name = "Native Only";
+      };
 /* End XCBuildConfiguration section */
 
 /* Begin XCConfigurationList section */
@@ -723,6 +904,16 @@
          defaultConfigurationIsVisible = 0;
          defaultConfigurationName = Release;
       };
+      FF8172180D8862690052FCC8 /* Build configuration list for PBXNativeTarget "ChipmunkFramework" */ = {
+         isa = XCConfigurationList;
+         buildConfigurations = (
+            FF8172190D8862690052FCC8 /* Debug */,
+            FF81721A0D8862690052FCC8 /* Release */,
+            FF81721B0D8862690052FCC8 /* Native Only */,
+         );
+         defaultConfigurationIsVisible = 0;
+         defaultConfigurationName = Release;
+      };
 /* End XCConfigurationList section */
    };
    rootObject = D3E5F0190AA32EAC004E361B /* Project object */;
Michael Buckley
 
Posts: 46
Joined: Tue Aug 21, 2007 10:30 am

Return to Features/Development

Who is online

Users browsing this forum: No registered users and 1 guest