• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Xcode Plugin API
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Xcode Plugin API


  • Subject: Re: Xcode Plugin API
  • From: Chris Hanson <email@hidden>
  • Date: Mon, 25 Feb 2008 14:00:49 -0800

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:
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>)

  • Prev by Date: determine CPU type at runtime
  • Next by Date: Re: Xcode Plugin API
  • Previous by thread: Re: Xcode Plugin API
  • Next by thread: Re: Xcode Plugin API
  • Index(es):
    • Date
    • Thread