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.

90 lines
2.4KB

  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 jack native au lv2 vst2 vst3 clap
  10. mkdir jack native au lv2 vst2 vst3 clap
  11. mv Cardinal.app jack/CardinalJACK.app
  12. mv CardinalNative.app native/CardinalNative.app
  13. mv *.component au/
  14. mv *.lv2 lv2/
  15. mv *.vst vst2/
  16. mv *.vst3 vst3/
  17. mv *.clap clap/
  18. cp -RL lv2/Cardinal.lv2/resources res
  19. rm -rf lv2/*.lv2/resources
  20. rm -rf vst2/*.vst/Contents/Resources
  21. rm -rf vst3/*.vst3/Contents/Resources
  22. rm -rf clap/*.clap/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.jack" \
  30. --component-plist "../utils/macOS/Build_JACK.plist" \
  31. --install-location "/Applications/" \
  32. --root "${PWD}/jack/" \
  33. ../dpf-cardinal-jack.pkg
  34. pkgbuild \
  35. --identifier "studio.kx.distrho.plugins.cardinal.native" \
  36. --component-plist "../utils/macOS/Build_Native.plist" \
  37. --install-location "/Applications/" \
  38. --root "${PWD}/native/" \
  39. ../dpf-cardinal-native.pkg
  40. pkgbuild \
  41. --identifier "studio.kx.distrho.plugins.cardinal.components" \
  42. --install-location "/Library/Audio/Plug-Ins/Components/" \
  43. --root "${PWD}/au/" \
  44. ../dpf-cardinal-components.pkg
  45. pkgbuild \
  46. --identifier "studio.kx.distrho.plugins.cardinal.lv2bundles" \
  47. --install-location "/Library/Audio/Plug-Ins/LV2/" \
  48. --root "${PWD}/lv2/" \
  49. ../dpf-cardinal-lv2bundles.pkg
  50. pkgbuild \
  51. --identifier "studio.kx.distrho.plugins.cardinal.vst2bundles" \
  52. --install-location "/Library/Audio/Plug-Ins/VST/" \
  53. --root "${PWD}/vst2/" \
  54. ../dpf-cardinal-vst2bundles.pkg
  55. pkgbuild \
  56. --identifier "studio.kx.distrho.plugins.cardinal.vst3bundles" \
  57. --install-location "/Library/Audio/Plug-Ins/VST3/" \
  58. --root "${PWD}/vst3/" \
  59. ../dpf-cardinal-vst3bundles.pkg
  60. pkgbuild \
  61. --identifier "studio.kx.distrho.plugins.cardinal.clapbundles" \
  62. --install-location "/Library/Audio/Plug-Ins/CLAP/" \
  63. --root "${PWD}/clap/" \
  64. ../dpf-cardinal-clapbundles.pkg
  65. cd ..
  66. sed -e "s|@builddir@|${PWD}/build|" \
  67. utils/macOS/package.xml.in > build/package.xml
  68. productbuild \
  69. --distribution build/package.xml \
  70. --identifier "studio.kx.distrho.cardinal" \
  71. --package-path "${PWD}" \
  72. --version 0 \
  73. Cardinal-macOS.pkg