• 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: Garrick Meeker <email@hidden>
  • Date: Mon, 27 Jun 2011 13:51:45 -0700

I forgot to add that you probably need to link the frameworks using the "Other Linker Flags" setting.  I think if you add the framework to xcode you might end up with both framework paths.  I'm not sure if you can do that with conditions because it wasn't an issue for AE, (just the header paths).

On Jun 27, 2011, at 1:28 PM, Darrin Cardani wrote:

OK, interesting point. I'll have to look into that as I'm not familiar with doing it that way.

It also points out something I forgot to call out. To do what I've written below, you need to add the 64-bit framework to the project, and make sure the 32-bit target links against the 32-bit framework and the 64-bit target links against the 64-bit framework. Maybe that was obvious in step 4, but it probably should have been made more clear.

Thanks,
Darrin

On Jun 27, 2011, at 12:22 PM, Garrick Meeker wrote:

I think an easier method would be to use condition settings in xcode (bottom left popup in the settings dialog) to change the framework path for the 64-bit target to /Developer/Examples/FxPlug.  AE has separate 32-bit and 64-bit SDKs as well, so we've already been through this.

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


--
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>)
 >Re: Building a Universal FxPlug (From: Garrick Meeker <email@hidden>)
 >Re: Building a Universal FxPlug (From: Darrin Cardani <email@hidden>)

  • Prev by Date: Re: Building a Universal FxPlug
  • Next by Date: Motion Effects - Keyframed parameters sending messages to behaviours?
  • Previous by thread: Re: Building a Universal FxPlug
  • Next by thread: Motion Effects - Keyframed parameters sending messages to behaviours?
  • Index(es):
    • Date
    • Thread