Wednesday, July 18, 2007

Bundling and Installing a Plug-in

The easiest way to build a new FxPlug plug-in is to create a New
Project in Xcode and use one of the FxPlug templates in the Standard
Apple-Plug-ins category: FxPlug Filter, FxPlug Generator, or FxPlug
Transition.

For examples of complete FxPlug plug-ins, see the directory /Developer/Example/FxPlug.



Two Mac OS X folders are reserved for FxPlug installation. When
scanning for plug-ins, host applications recursively search the folder
hierarchy from these locations:

  • /Library/Plug-Ins/FxPlug/

  • ~/Library/Plug-Ins/FxPlug/


As you develop your plug-in and test it with the host application,
you may find it convenient to perform the installation via a Copy Files
build phase. Alternatively, you can create a symbolic link inside /Library/Plug-Ins/FxPlug/,
pointing to the build-product directory specified in Xcode’s
Project Preferences. Depending on your settings, you can create the
symbolic link in the Terminal application like this:

  • % ln -s ~/build/MyPlug.fxplug /Library/Plug-Ins/FxPlug/MyPlug.fxplug






In this section:









Packaging








Registration










Packaging


A completed FxPlug plug-in is packaged in a CFBundle. Each bundle contains one or more plug-ins. A bundle also contains an Info.plist
property-list file that describes the plug-ins in the bundle. This
description can be static or dynamic. With a static list, the plug-ins
are recognized and loaded automatically; for a dynamic list, the
bundle’s principal class is asked to register the plug-ins. The
distinction depends on the value of a Boolean tag ProPlugDynamicRegistration
in the property list. Dynamic registration incurs a plug-in scanning
performance hit. So you should ordinarily use static registration. You
can find more information about dynamic registration in <PluginManager/PROPlugInBundleRegistration.h>.


Registration


Before a host application can display a list of available plug-ins,
it recursively scans the plug-in folders for available CFBundles that
conform to the FxFilter, FxGenerator, or FxTransition protocol. Plug-in
properties such as name, group name, description, and so on are
specified in the bundle’s property list for statically registered
plug-ins. The host application can display the list of grouped plug-ins
in its UI, and allow the user to choose and apply particular plug-ins
to particular tracks.


--------------------------------------------------------------------------
Distributed by Hasan Shrek, independence blogger. Also run
online business , matrix, internet marketing solution , online store script .
Beside he is writing some others blogs for notebook computer , computer training , computer software and personal computer

--------------------------------------------------------------------------



Technorati Tags: , , , ,

No comments: