• 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: Building a Universal FxPlug
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Building a Universal FxPlug


  • Subject: Re: Building a Universal FxPlug
  • From: Patrick Sheffield <email@hidden>
  • Date: Mon, 27 Jun 2011 12:15:24 -0700

Thank you, Darrin.

On Jun 27, 2011, at 12:11 PM, Darrin Cardani wrote:

Sorry I didn't get this out sooner. It's been a busy couple of days. Here are the steps to make a universal 32/64-bit FxPlug.

To make a universal FxPlug from an existing 32-bit FxPlug:

1) Open your existing FxPlug

2) In Xcode's Files and Groups pane, select the 32-bit target, right or control click on it, and choose "Duplicate"

3) Rename the Original to something appropriate (like <PluginName>32bit or whatever)

4) Switch to the newly created target and make it 64-bit following the procedures outlined earlier (See <http://lists.apple.com/archives/Pro-apps-dev/2011/Jun/msg00069.html> for more details)

5) Create a new "Aggregate" style target by choosing "Aggregate" in the New Target dialog in Xcode. Switch to this target.

6) Make the 32-bit and 64-bit targets be dependencies of the Aggregate target

7) Add a "Run Script" build phase to the aggregate target and enter this as the text of the script, replacing <PLUG-IN_NAME> with the name of your plug-in:

# Remove the 32-bit variant if it exists or the next lipo call will fail
lipo ${BUILD_DIR}/${CONFIGURATION}/<PLUG-IN_NAME>.fxplug/Contents/MacOS/<PLUG-IN_NAME> -output ${BUILD_DIR}/${CONFIGURATION}/<PLUG-IN_NAME>.fxplug/Contents/MacOS/<PLUG-IN_NAME> -thin x86_64

# Add in the newly build 32-bit variant to the 64-bit variant
lipo ${BUILD_DIR}/${CONFIGURATION}/<PLUG-IN_NAME>.fxplug/Contents/MacOS/<PLUG-IN_NAME> ${BUILD_DIR}/${CONFIGURATION}/<PLUG-IN_NAME>32bit.fxplug/Contents/MacOS/<PLUG-IN_NAME>32bit -output ${BUILD_DIR}/${CONFIGURATION}/<PLUG-IN_NAME>.fxplug/Contents/MacOS/<PLUG-IN_NAME> -create

8) Build the Aggregate target and either copy the resulting FxPlug into the Plug-Ins folder or make a sym-link to the built binary as you normally would

Please try it out and let me know if it works for you. I suspect that there's some Xcode variable I could have set in step 7 so you don't have to type your plug-in's name 10 times, but I don't know it off the top of my head. Also, here's an example plug-in that shows it in action:

<UniversalFxPlug.zip>

Darrin
--
Darrin Cardani
email@hidden


Do not post admin requests to the list. They will be ignored. Pro-apps-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
References: 
 >Building a Universal FxPlug (From: Darrin Cardani <email@hidden>)

  • Prev by Date: Building a Universal FxPlug
  • Next by Date: Re: CGFxPlug example problem
  • Previous by thread: Building a Universal FxPlug
  • Next by thread: Re: Building a Universal FxPlug
  • Index(es):
    • Date
    • Thread