The JUCE cross-platform C++ framework, with DISTRHO/KXStudio specific changes
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

91 lines
2.8KB

  1. # This script takes the build product and copies it to the AU, VST, VST3, RTAS and AAX folders, depending on
  2. # which plugin types you've built
  3. original=$CONFIGURATION_BUILD_DIR/$FULL_PRODUCT_NAME
  4. # this looks inside the binary to detect which platforms are needed..
  5. copyAU=`nm -g "$CONFIGURATION_BUILD_DIR/$EXECUTABLE_PATH" | grep -i 'AudioUnit' | wc -l`
  6. copyVST=`nm -g "$CONFIGURATION_BUILD_DIR/$EXECUTABLE_PATH" | grep -i 'VSTPlugin' | wc -l`
  7. copyVST3=`nm -g "$CONFIGURATION_BUILD_DIR/$EXECUTABLE_PATH" | grep -i 'GetPluginFactory' | wc -l`
  8. copyRTAS=`nm -g "$CONFIGURATION_BUILD_DIR/$EXECUTABLE_PATH" | grep -i 'CProcess' | wc -l`
  9. copyAAX=`nm -g "$CONFIGURATION_BUILD_DIR/$EXECUTABLE_PATH" | grep -i 'ACFStartup' | wc -l`
  10. if [ $copyAU -gt 0 ]; then
  11. echo "Copying to AudioUnit folder..."
  12. AU=~/Library/Audio/Plug-Ins/Components/$PRODUCT_NAME.component
  13. if [ -d "$AU" ]; then
  14. rm -r "$AU"
  15. fi
  16. cp -r "$original" "$AU"
  17. sed -i "" -e 's/TDMwPTul/BNDLPTul/g' "$AU/Contents/PkgInfo"
  18. sed -i "" -e 's/TDMw/BNDL/g' "$AU/Contents/$INFOPLIST_FILE"
  19. # Fix info.plist for AUs built with Xcode 3
  20. if [ -f "$DEVELOPER_DIR/Library/Developer/CoreAudio/AudioUnits/AUPublic/AUBase/AUPlugInDispatch.cpp" ]; then
  21. echo
  22. else
  23. echo "Removing AudioComponents entry from Info.plist because this is not a new-format AU"
  24. /usr/libexec/PlistBuddy -c "Delete AudioComponents" "$AU/Contents/Info.plist"
  25. fi
  26. fi
  27. if [ $copyVST -gt 0 ]; then
  28. echo "Copying to VST folder..."
  29. VST=~/Library/Audio/Plug-Ins/VST/$PRODUCT_NAME.vst
  30. if [ -d "$VST" ]; then
  31. rm -r "$VST"
  32. fi
  33. cp -r "$original" "$VST"
  34. sed -i "" -e 's/TDMwPTul/BNDLPTul/g' "$VST/Contents/PkgInfo"
  35. sed -i "" -e 's/TDMw/BNDL/g' "$VST/Contents/$INFOPLIST_FILE"
  36. fi
  37. if [ $copyVST3 -gt 0 ]; then
  38. echo "Copying to VST3 folder..."
  39. VST3=~/Library/Audio/Plug-Ins/VST3/$PRODUCT_NAME.vst3
  40. if [ -d "$VST3" ]; then
  41. rm -r "$VST3"
  42. fi
  43. cp -r "$original" "$VST3"
  44. sed -i "" -e 's/TDMwPTul/BNDLPTul/g' "$VST3/Contents/PkgInfo"
  45. sed -i "" -e 's/TDMw/BNDL/g' "$VST3/Contents/$INFOPLIST_FILE"
  46. fi
  47. if [ $copyRTAS -gt 0 ]; then
  48. echo "Copying to RTAS folder..."
  49. RTAS=/Library/Application\ Support/Digidesign/Plug-Ins/$PRODUCT_NAME.dpm
  50. if [ -d "$RTAS" ]; then
  51. rm -r "$RTAS"
  52. fi
  53. cp -r "$original" "$RTAS"
  54. fi
  55. if [ $copyAAX -gt 0 ]; then
  56. echo "Copying to AAX folder..."
  57. if [ -d "/Applications/ProTools_3PDev/Plug-Ins" ]; then
  58. AAX1="/Applications/ProTools_3PDev/Plug-Ins/$PRODUCT_NAME.aaxplugin"
  59. if [ -d "$AAX1" ]; then
  60. rm -r "$AAX1"
  61. fi
  62. cp -r "$original" "$AAX1"
  63. fi
  64. if [ -d "/Library/Application Support/Avid/Audio/Plug-Ins" ]; then
  65. AAX2="/Library/Application Support/Avid/Audio/Plug-Ins/$PRODUCT_NAME.aaxplugin"
  66. if [ -d "$AAX2" ]; then
  67. rm -r "$AAX2"
  68. fi
  69. cp -r "$original" "$AAX2"
  70. fi
  71. fi