Total Newb: Bundle a QC patch in a xcode project

benjamin386's picture

Hi,

I started working with QC today and I'm stuck for hours now with one - I hope - simple problem (I searched the forum and found some hints, but I'm still not making any progress):

I use the Multitouch.plugin in a Xcode project with a QCView. When I put the plugin in /Library/Graphics/Quartz\ Composer\ Patches the app works fine. Now I want to give the app to a friend and I don't want him to install the plugin too (just because he sucks at such simple things). It would be nice if I could integrate the plugin into the Xcode project. Is there a way to do this?

Thanks for your help!

Benjamin

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

protarco's picture
Re: Total Newb: Bundle a QC patch in a xcode project

Try QuartzBuilder,

the Kineme program that allows you to export quartz compositions as apps. It's so simple to use, no coding needed and you can load the plugins and other files that your composition needs into your app.

benjamin386's picture
Re: Total Newb: Bundle a QC patch in a xcode project

Thanks protarco for your quick response :)

I noticed Quartzbuilder before and it really solves the problem I described. But perhaps I should have added that the QC will be part of a program written in Xcode. So I really need the Xcode environment to work with. I read something about loading plugins at program launch.

What if I drop the MultitouchPatch.plugin into the Resources folder and try to load it some how?

smokris's picture
Re: Total Newb: Bundle a QC patch in a xcode project

Using the Official API, there's currently no way to load plugins at a custom path --- plugins are only loaded from ~/Library, /Library, and /System/Library.

With the private API, you could do something like:

   [QCPatch loadPlugInsInFolder:[[NSBundle mainBundle] resourcePath]];

dust's picture
Re: Total Newb: Bundle a QC patch in a xcode project

i read some documentation stating that you can register a qc plugin by CFURL or something but have never been able to get it to work, although including a plugin by dependency that is part of your bundles pay load and gets installed to the library folder is another solution.. but then it is totally subject to the plugin authors licensing etc... there's a xcode utility that wraps up application bundles for you.

cwright's picture
Re: Total Newb: Bundle a QC patch in a xcode project

Using the official API, you can use

[QCPlugIn loadPlugInAtPath:(NSString*)pluginPath];

This will only work for official-api plugins, of course, but it's functionally similar to smokris' private api method. Between these two options, you should be able to load any kind of QC plugin with code.

destroythings's picture
Re: Total Newb: Bundle a QC patch in a xcode project

I have the same problem. I want the application to reference the plugins that are in the resources folder of my application and not the library/graphics.

Can anyone point me towards a doc that explains this process.

I have my application built and working fine but if the plugins are not in the graphics folder they will not load.

destroythings's picture
Re: Total Newb: Bundle a QC patch in a xcode project

I have also tried the method discussed here.

http://kineme.net/Discussion/GeneralDiscussion/HowimplementKinemePlugins...

I have edited the main.m file but im not sure how to correctly specify the path of the plugins in the resource folder.

Project file attached.

PreviewAttachmentSize
Triangle Twirl 1.02.zip620.67 KB

dust's picture
Re: Total Newb: Bundle a QC patch in a xcode project

this forum topic provides source project and various implementations of loading both official and un official plugins into a Xcode project. http://kineme.net/forum/DevelopingCompositions/InstallingtheSkankySDKon107