Wednesday, December 15, 2010

XCode template instructions archived

After I posted a link to the instructions I found on the web for getting Ronald Oussoren's XCode templates into XCode 3.25 (my post here), I went back for another look today. But I found that the page has been "disappeared" off the web. Luckily, Google still had a cache of it (I'm not sure how long that will last?). Anyway, here is what I did:

svn co http://svn.red-bean.com/pyobjc/trunk/pyobjc/pyobjc-xcode

cd pyobjc-xcode/Project\ Templates/

./project-tool.py -k -v --template Cocoa-Python\ Application/CocoaApp.xcodeproj/TemplateInfo.plist Cocoa-Python\ Application ~/Library/Application\ Support/Developer/Shared/Xcode/Project\ Templates/CocoaPython/Cocoa-Python\ Application

./project-tool.py -k -v --template Cocoa-Python\ Document-based\ Application/CocoaDocApp.xcodeproj/TemplateInfo.plist Cocoa-Python\ Document-based\ Application/ ~/Library/Application\ Support/Developer/Shared/Xcode/Project\ Templates/CocoaPython/Cocoa-Python\ Document-based\ Application

./project-tool.py -k -v --template Cocoa-Python\ Core\ Data\ Application/CocoaApp.xcodeproj/TemplateInfo.plist Cocoa-Python\ Core\ Data\ Application/ ~/Library/Application\ Support/Developer/Shared/Xcode/Project\ Templates/CocoaPython/Cocoa-Python\ Core\ Data\ Application

./project-tool.py -k -v --template Cocoa-Python\ Core\ Data\ Document-based\ Application/CocoaDocApp.xcodeproj/TemplateInfo.plist Cocoa-Python\ Core\ Data\ Document-based\ Application/ ~/Library/Application\ Support/Developer/Shared/Xcode/Project\ Templates/CocoaPython/Cocoa-Python\ Core\ Data\ Document-based\ Application

(I put some newlines in at the forward slashes, and tested one, if I screwed it up let me know).

[ UPDATE: Turns out I did screw it up, and no one let me know! The internet is a tough world---no second chances! ]

As the instructions said, once you restart XCode, you should see the four Cocoa-Python templates appear under “User Templates” like this:



Now do this:

cd ../File\ Templates/Cocoa/

And if it doesn’t already exist, create a File Templates directory in the current user’s library folder as follows:

mkdir ~/Library/Application\ Support/Developer/Shared/Xcode/File\ Templates

cp -r * ~/Library/Application\ Support/Developer/Shared/Xcode/File\

That's it.