Collection of DPF-based plugins for packaging
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.

78 lines
2.1KB

  1. #!/bin/bash
  2. # the realpath function is not available on some systems
  3. if ! which realpath &>/dev/null; then
  4. function realpath() {
  5. [[ $1 = /* ]] && echo "$1" || echo "$PWD/${1#./}"
  6. }
  7. fi
  8. set -e
  9. DPF_UTILS_DIR="$(dirname $(realpath ${0}))"
  10. if [ -d bin ]; then
  11. cd bin
  12. elif [ -d build/bin ]; then
  13. cd build/bin
  14. else
  15. echo "Please run this script from the root folder"
  16. exit
  17. fi
  18. if [ "$(uname -s)" = "Darwin" ]; then
  19. CLAP_PATH=~/Library/Audio/Plug-Ins/CLAP
  20. LV2_PATH=~/Library/Audio/Plug-Ins/LV2
  21. VST2_PATH=~/Library/Audio/Plug-Ins/VST
  22. VST3_PATH=~/Library/Audio/Plug-Ins/VST3
  23. else
  24. CLAP_PATH=~/.clap
  25. LV2_PATH=~/.lv2
  26. VST2_PATH=~/.vst
  27. VST3_PATH=~/.vst3
  28. fi
  29. export IFS=$'\n'
  30. # NOTE macOS ignores AU plugins installed in ~/Library/Audio/Plug-Ins/Components/
  31. # we **MUST** install AU plugins system-wide, so we need sudo/root here
  32. # they cannot be symlinks either, so we do a full copy
  33. for p in $(find . -maxdepth 1 -name '*.component' -print | grep '.component'); do
  34. basename=$(basename ${p})
  35. if [ ! -L /Library/Audio/Plug-Ins/Components/"${basename}" ]; then
  36. sudo cp -r $(pwd)/"${basename}" /Library/Audio/Plug-Ins/Components/
  37. fi
  38. done
  39. for p in $(find . -maxdepth 1 -name '*.clap' -print); do
  40. basename=$(basename ${p})
  41. mkdir -p ${CLAP_PATH}
  42. if [ ! -L ${CLAP_PATH}/"${basename}" ]; then
  43. ln -s $(pwd)/"${basename}" ${CLAP_PATH}/"${basename}"
  44. fi
  45. done
  46. for p in $(find . -maxdepth 1 -name '*.lv2' -print); do
  47. basename=$(basename ${p})
  48. mkdir -p ${LV2_PATH}
  49. if [ ! -L ${LV2_PATH}/"${basename}" ]; then
  50. ln -s $(pwd)/"${basename}" ${LV2_PATH}/"${basename}"
  51. fi
  52. done
  53. for p in $(find . -maxdepth 1 -name '*.vst' -print); do
  54. basename=$(basename ${p})
  55. mkdir -p ${VST2_PATH}
  56. if [ ! -L ${VST2_PATH}/"${basename}" ]; then
  57. ln -s $(pwd)/"${basename}" ${VST2_PATH}/"${basename}"
  58. fi
  59. done
  60. for p in $(find . -maxdepth 1 -name '*.vst3' -print); do
  61. basename=$(basename ${p})
  62. mkdir -p ${VST3_PATH}
  63. if [ ! -L ${VST3_PATH}/"${basename}" ]; then
  64. ln -s $(pwd)/"${basename}" ${VST3_PATH}/"${basename}"
  65. fi
  66. done