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.

70 lines
1.6KB

  1. #!/bin/bash
  2. set -e
  3. if [ -d bin ]; then
  4. cd bin
  5. else
  6. echo "Please run this script from the root folder"
  7. exit
  8. fi
  9. rm -rf res
  10. rm -rf au
  11. rm -rf lv2
  12. rm -rf vst2
  13. rm -rf vst3
  14. mkdir au lv2 vst2 vst3
  15. mv *.component au/
  16. mv *.lv2 lv2/
  17. mv *.vst vst2/
  18. mv *.vst3 vst3/
  19. cp -RL lv2/Cardinal.lv2/resources res
  20. rm -rf lv2/*.lv2/resources
  21. rm -rf vst2/*.vst/Contents/Resources
  22. rm -rf vst3/*.vst3/Contents/Resources
  23. pkgbuild \
  24. --identifier "studio.kx.distrho.cardinal.resources" \
  25. --install-location "/Library/Application Support/Cardinal/" \
  26. --root "${PWD}/res/" \
  27. ../dpf-cardinal-resources.pkg
  28. pkgbuild \
  29. --identifier "studio.kx.distrho.plugins.cardinal.components" \
  30. --install-location "/Library/Audio/Plug-Ins/Components/" \
  31. --root "${PWD}/au/" \
  32. ../dpf-cardinal-components.pkg
  33. pkgbuild \
  34. --identifier "studio.kx.distrho.plugins.cardinal.lv2bundles" \
  35. --install-location "/Library/Audio/Plug-Ins/LV2/" \
  36. --root "${PWD}/lv2/" \
  37. ../dpf-cardinal-lv2bundles.pkg
  38. pkgbuild \
  39. --identifier "studio.kx.distrho.plugins.cardinal.vst2bundles" \
  40. --install-location "/Library/Audio/Plug-Ins/VST/" \
  41. --root "${PWD}/vst2/" \
  42. ../dpf-cardinal-vst2bundles.pkg
  43. pkgbuild \
  44. --identifier "studio.kx.distrho.plugins.cardinal.vst3bundles" \
  45. --install-location "/Library/Audio/Plug-Ins/VST3/" \
  46. --root "${PWD}/vst3/" \
  47. ../dpf-cardinal-vst3bundles.pkg
  48. cd ..
  49. sed -e "s|@builddir@|${PWD}/build|" \
  50. -e "s|@buildarchs@|${MACOS_ARCHS}|" \
  51. utils/macOS/package.xml.in > build/package.xml
  52. productbuild \
  53. --distribution build/package.xml \
  54. --identifier "studio.kx.distrho.cardinal" \
  55. --package-path "${PWD}" \
  56. --version 0 \
  57. Cardinal-macOS.pkg