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.

89 lines
2.3KB

  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. --install-location "/Applications/" \
  31. --root "${PWD}/jack/" \
  32. ../dpf-cardinal-jack.pkg
  33. pkgbuild \
  34. --identifier "studio.kx.distrho.plugins.cardinal.native" \
  35. --install-location "/Applications/" \
  36. --root "${PWD}/native/" \
  37. ../dpf-cardinal-native.pkg
  38. pkgbuild \
  39. --identifier "studio.kx.distrho.plugins.cardinal.components" \
  40. --install-location "/Library/Audio/Plug-Ins/Components/" \
  41. --root "${PWD}/au/" \
  42. ../dpf-cardinal-components.pkg
  43. pkgbuild \
  44. --identifier "studio.kx.distrho.plugins.cardinal.lv2bundles" \
  45. --install-location "/Library/Audio/Plug-Ins/LV2/" \
  46. --root "${PWD}/lv2/" \
  47. ../dpf-cardinal-lv2bundles.pkg
  48. pkgbuild \
  49. --identifier "studio.kx.distrho.plugins.cardinal.vst2bundles" \
  50. --install-location "/Library/Audio/Plug-Ins/VST/" \
  51. --root "${PWD}/vst2/" \
  52. ../dpf-cardinal-vst2bundles.pkg
  53. pkgbuild \
  54. --identifier "studio.kx.distrho.plugins.cardinal.vst3bundles" \
  55. --install-location "/Library/Audio/Plug-Ins/VST3/" \
  56. --root "${PWD}/vst3/" \
  57. ../dpf-cardinal-vst3bundles.pkg
  58. pkgbuild \
  59. --identifier "studio.kx.distrho.plugins.cardinal.clapbundles" \
  60. --install-location "/Library/Audio/Plug-Ins/CLAP/" \
  61. --root "${PWD}/clap/" \
  62. ../dpf-cardinal-clapbundles.pkg
  63. cd ..
  64. sed -e "s|@builddir@|${PWD}/build|" \
  65. -e "s|@buildarchs@|${MACOS_ARCHS}|" \
  66. utils/macOS/package.xml.in > build/package.xml
  67. productbuild \
  68. --distribution build/package.xml \
  69. --identifier "studio.kx.distrho.cardinal" \
  70. --package-path "${PWD}" \
  71. --version 0 \
  72. Cardinal-macOS.pkg