Announcement: Polymorphic Plugins!


A second version of the script below. This one works with flat packages only and uses tar to extract the plugin from the pkg. I'm not sure this is future-proof at all :/. This one doesn't need extra zipping. I just added plugname.aaxplugin to the main package resources. The result for me is an even smaller installer. It relies on nameing the subprojects properly to detect where to install. The main remaining problem is that it always shows installation size: zero because there is no payload in the subprojects. Maybe this can somehow be overridden.

I'm still hoping for an easier solution.

​
#!/bin/sh
filename="plugname"
originalext="aaxplugin"
case "$INSTALL_PKG_SESSION_ID" in
    *AudioUnit)
        targetpath="/Library/Audio/Plug-Ins/Components"
        ext="component"
        ;;
    *VST)
        targetpath="/Library/Audio/Plug-Ins/VST"
        ext="vst"
        ;;
    *VST3)
        targetpath="/Library/Audio/Plug-Ins/VST3"
        ext="vst3"
        ;;
    *AAX)
        targetpath="/Library/Application Support/Avid/Audio/Plug-Ins"
        ext="aaxplugin"
        ;;
    *)
        exit 77
        ;;
esac
cd "$targetpath"
mkdir tmp
cd tmp
tar -xf "$PACKAGE_PATH" -C .
tar -xf "Scripts"
mv "$filename"".""$originalext" "../""$filename"".""$ext"
cd ..
rm -rf tmp
exit 0​

I have experimented with Packages as well, but without trying to use just one format for packaging... I haven't been able to do this in a way that AAX plugin signing did survive the packing/unpacking cycle though (worked on the computer where the package was built, but not when unpacking it on a different computer). Does your way of doing it leave the signature intact?

Thanks for bringing this up. I yet have to test with another machine (that can run PT11), but I can already tell now that using cp on an .aaxplug destroys the signing. However using ditto seems to work. And I figured out a much better way to do what I want. I now first install a package to /private/tmp containing the polymorphic plugin and then I use payload-less packages to copy and rename the plugin from there to the right spots using ditto. This works for both a flat package and a mpkg. Once I completed my testing I'll try to describe the whole process here, but right now I'm fighting with old OSXes combined with old Pro Tools versions :/.

I can confirm it is working on other machines as well. The key was using ditto instead of cp -rf. 

Thanks for checking this!

didn't know of ditto, but "cp -p -R -H" also works