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.

100 lines
3.0KB

  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. AUDir=~/Library/Audio/Plug-Ins/Components
  13. mkdir -p "$AUDir"
  14. AU=$AUDir/$PRODUCT_NAME.component
  15. if [ -d "$AU" ]; then
  16. rm -r "$AU"
  17. fi
  18. cp -r "$original" "$AU"
  19. sed -i "" -e 's/TDMwPTul/BNDLPTul/g' "$AU/Contents/PkgInfo"
  20. sed -i "" -e 's/TDMw/BNDL/g' "$AU/Contents/$INFOPLIST_FILE"
  21. # Fix info.plist for AUs built with Xcode 3
  22. if [ -f "$DEVELOPER_DIR/Library/Developer/CoreAudio/AudioUnits/AUPublic/AUBase/AUPlugInDispatch.cpp" ]; then
  23. echo
  24. else
  25. echo "Removing AudioComponents entry from Info.plist because this is not a new-format AU"
  26. /usr/libexec/PlistBuddy -c "Delete AudioComponents" "$AU/Contents/Info.plist"
  27. fi
  28. fi
  29. if [ $copyVST -gt 0 ]; then
  30. echo "Copying to VST folder..."
  31. VSTDir=~/Library/Audio/Plug-Ins/VST
  32. mkdir -p "$VSTDir"
  33. VST=$VSTDir/$PRODUCT_NAME.vst
  34. if [ -d "$VST" ]; then
  35. rm -r "$VST"
  36. fi
  37. cp -r "$original" "$VST"
  38. sed -i "" -e 's/TDMwPTul/BNDLPTul/g' "$VST/Contents/PkgInfo"
  39. sed -i "" -e 's/TDMw/BNDL/g' "$VST/Contents/$INFOPLIST_FILE"
  40. fi
  41. if [ $copyVST3 -gt 0 ]; then
  42. echo "Copying to VST3 folder..."
  43. VST3Dir=~/Library/Audio/Plug-Ins/VST3
  44. mkdir -p "$VST3Dir"
  45. VST3=$VST3Dir/$PRODUCT_NAME.vst3
  46. if [ -d "$VST3" ]; then
  47. rm -r "$VST3"
  48. fi
  49. cp -r "$original" "$VST3"
  50. sed -i "" -e 's/TDMwPTul/BNDLPTul/g' "$VST3/Contents/PkgInfo"
  51. sed -i "" -e 's/TDMw/BNDL/g' "$VST3/Contents/$INFOPLIST_FILE"
  52. fi
  53. if [ $copyRTAS -gt 0 ]; then
  54. echo "Copying to RTAS folder..."
  55. RTASDir=/Library/Application\ Support/Digidesign/Plug-Ins
  56. if [ -d "$RTASDir" ]; then
  57. RTAS=$RTASDir/$PRODUCT_NAME.dpm
  58. if [ -d "$RTAS" ]; then
  59. rm -r "$RTAS"
  60. fi
  61. cp -r "$original" "$RTAS"
  62. fi
  63. fi
  64. if [ $copyAAX -gt 0 ]; then
  65. echo "Copying to AAX folder..."
  66. if [ -d "/Applications/ProTools_3PDev/Plug-Ins" ]; then
  67. AAX1="/Applications/ProTools_3PDev/Plug-Ins/$PRODUCT_NAME.aaxplugin"
  68. if [ -d "$AAX1" ]; then
  69. rm -r "$AAX1"
  70. fi
  71. cp -R -H "$original" "$AAX1"
  72. fi
  73. if [ -d "/Library/Application Support/Avid/Audio/Plug-Ins" ]; then
  74. AAX2="/Library/Application Support/Avid/Audio/Plug-Ins/$PRODUCT_NAME.aaxplugin"
  75. if [ -d "$AAX2" ]; then
  76. rm -r "$AAX2"
  77. fi
  78. cp -R -H "$original" "$AAX2"
  79. fi
  80. fi