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.

92 lines
2.7KB

  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. fi
  22. if [ $copyVST -gt 0 ]; then
  23. echo "Copying to VST folder..."
  24. VSTDir=~/Library/Audio/Plug-Ins/VST
  25. mkdir -p "$VSTDir"
  26. VST=$VSTDir/$PRODUCT_NAME.vst
  27. if [ -d "$VST" ]; then
  28. rm -r "$VST"
  29. fi
  30. cp -r "$original" "$VST"
  31. sed -i "" -e 's/TDMwPTul/BNDLPTul/g' "$VST/Contents/PkgInfo"
  32. sed -i "" -e 's/TDMw/BNDL/g' "$VST/Contents/$INFOPLIST_FILE"
  33. fi
  34. if [ $copyVST3 -gt 0 ]; then
  35. echo "Copying to VST3 folder..."
  36. VST3Dir=~/Library/Audio/Plug-Ins/VST3
  37. mkdir -p "$VST3Dir"
  38. VST3=$VST3Dir/$PRODUCT_NAME.vst3
  39. if [ -d "$VST3" ]; then
  40. rm -r "$VST3"
  41. fi
  42. cp -r "$original" "$VST3"
  43. sed -i "" -e 's/TDMwPTul/BNDLPTul/g' "$VST3/Contents/PkgInfo"
  44. sed -i "" -e 's/TDMw/BNDL/g' "$VST3/Contents/$INFOPLIST_FILE"
  45. fi
  46. if [ $copyRTAS -gt 0 ]; then
  47. echo "Copying to RTAS folder..."
  48. RTASDir=/Library/Application\ Support/Digidesign/Plug-Ins
  49. if [ -d "$RTASDir" ]; then
  50. RTAS=$RTASDir/$PRODUCT_NAME.dpm
  51. if [ -d "$RTAS" ]; then
  52. rm -r "$RTAS"
  53. fi
  54. cp -r "$original" "$RTAS"
  55. fi
  56. fi
  57. if [ $copyAAX -gt 0 ]; then
  58. echo "Copying to AAX folder..."
  59. if [ -d "/Applications/ProTools_3PDev/Plug-Ins" ]; then
  60. AAX1="/Applications/ProTools_3PDev/Plug-Ins/$PRODUCT_NAME.aaxplugin"
  61. if [ -d "$AAX1" ]; then
  62. rm -r "$AAX1"
  63. fi
  64. cp -R -H "$original" "$AAX1"
  65. fi
  66. if [ -d "/Library/Application Support/Avid/Audio/Plug-Ins" ]; then
  67. AAX2="/Library/Application Support/Avid/Audio/Plug-Ins/$PRODUCT_NAME.aaxplugin"
  68. if [ -d "$AAX2" ]; then
  69. rm -r "$AAX2"
  70. fi
  71. cp -R -H "$original" "$AAX2"
  72. fi
  73. fi