[SOLVED] Audio plugin post-build script for OS X needs to be updated to include use of Plugin AU SDK path?


I'm using JUCE 3.2.0, and I _think_ the Audio-plugin post-build script for OS X  needs to be updated to include use of Plugin AU SDK path, since the tested path won't exist when the SDK-path option is used, and then AudioComponents will be removed from the Info.plist (and that section is where sandbox declarations need to be included).

Hopefully, I'm correct about this .. apologies if I'm not.


  # Fix info.plist for AUs built with Xcode 3

  if [ -f "$DEVELOPER_DIR/Library/Developer/CoreAudio/AudioUnits/AUPublic/AUBase/AUPlugInDispatch.cpp" ]; then



    echo "Removing AudioComponents entry from Info.plist because this is not a new-format AU"

    /usr/libexec/PlistBuddy -c "Delete AudioComponents" "$AU/Contents/Info.plist"


Well spotted!

So the problem is that this line:

  if [ -f "$DEVELOPER_DIR/Library/Developer/CoreAudio/AudioUnits/AUPublic/AUBase/AUPlugInDispatch.cpp" ];

should be something like

  if "this is Xcode version higher than 3"

and then everything would be fine. This check is simply broken at the moment.

Anybody knows a clean way to check for "is this Xcode 3?" in a shell script?

I couldn't find a way to implement this correctly in the post-build script, but then I realised that the post-build script is not the right place to do this plist stuff anyway.

So I just removed the offending lines (that you posted) from the post-build script that the Introjucer generates.

@gopher13: please update to the newest tip, re-save your project in the new Introjucer, and you should be fine.

If anybody is still using Xcode 3 to build AudioUnit plugins, and this change broke your code, please shout! For anybody else, the additional plist entries shouldn't hurt even if you use the old AU format, so there should be no need to remove them in the post-build step.