Porting 10.4 patches to 10.5

smokris's picture

CoreMelt sponsored some research into porting over our 10.4 patches to 10.5, while maintaining composition compatibility (i.e., so you can write a composition using custom patches on 10.4 and open it on 10.5).

Simple 10.4 patches work basically as-is in Leopard. Some notes:

  • Custom patches should go in /Library/Graphics/Quartz Composer Patches/. (Not Patches as was the case in 10.4, nor the directory for documented-API 10.5 plugins, Quartz Composer Plug-Ins)
  • Instead of specifying the patch's category using <key>category</key> in the patch's xml file, you need to specify the key categories and make it an array of strings. Also, specifying both works. For example:
    <key>category</key>
    <string>Kineme</string>
    <key>categories</key>
    <array>
       <string>Kineme</string>
    </array>
    
  • The class methods defining patch properties are different --- only the ...WithIdentifier versions are called. So you should specify them like this:
    + (int)executionModeWithIdentifier:(id)fp8
    {
       return 2;
    }
    + (BOOL)allowsSubpatchesWithIdentifier:(id)fp8
    {
       return NO;
    }
    + (int)timeModeWithIdentifier:(id)fp8
    {
       return 0;
    }
    
    The above "WithIdentifer" methods also work on 10.4.
  • The QCGLImagePort is totally different (and is renamed QCImagePort in 10.5). More on this later.
  • The first parameter to the execute instance method is now a QCCGLContext, rather than QCGLContext.

Comment viewing options

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

cwright's picture
more portage

I've only been able to test 32bit binaries thus far, but building on Tiger with these new methods produces binaries that reportedly work in leopard. Can't link 64bit binaries on tiger though, so that might cause problems...

Also, 32bit binaries built on leopard seem to work on Tiger (using our template. Pretty sure the leopard one won't work like this)