Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Xcode Plugin API



On Feb 25, 2008, at 1:38 PM, Bill Royds wrote:

On 25-Feb-08, at 15:34 , Chris Hanson wrote:
Also, it might be worth telling the list what you'd like to do -- it's possible to do many things in Xcode by leveraging its built-in mechanisms for build rules, script build phases and the like, without the need to actually run in the same process and interface with Xcode's internals.

I would like a tool to convert Microsoft Resource files (.RC) to a close as possible NIB file. I was hoping that I could a least write an Xcode PlugIn to add it to Xcode if I developed on myself.

You can write such a tool and easily integrate it with Xcode today, without using reverse-engineered internals to do so.


It just needs to be a command-line tool that knows how to take Windows resource file and generates a nib/xib file, C/C++/Objective-C code, or whatever. Then you can create an entry in your target's Rules tab that runs any item in your target's Compile Sources build phase that matches the pattern "*.rc" through your tool, and generates a file in Derived Sources with an extension Xcode knows how to analyze for dependencies.

Xcode will then automatically use that rule to run your custom tool as appropriate, once per architecture being built. (That's a known issue for build rules; it's sometimes appropriate and sometimes not, after all. If you're generating C, it's definitely appropriate, if you're generating nibs it's just extra work.)

This is described here in the Xcode reference:

http://developer.apple.com/documentation/DeveloperTools/Conceptual/XcodeUserGuide/Contents/Resources/en.lproj/05_03_bs_build_phases/chapter_32_section_10.html

Fritz Anderson also explains how this works in his book "Step Into Xcode," in a sample chapter available online:

http://six.manoverboard.org/book.html

Hope this helps!

  -- Chris

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/xcode-users/email@hidden

This email sent to email@hidden
References: 
 >Xcode Plugin API (From: Dragan Stancevic <email@hidden>)
 >Re: Xcode Plugin API (From: Chris Hanson <email@hidden>)
 >Re: Xcode Plugin API (From: Bill Royds <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.