Audio plugin host https://kx.studio/carla
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
3.0KB

  1. #!/bin/bash
  2. set -e
  3. JOBS="-j 2"
  4. if [ ! -f Makefile ]; then
  5. cd ../..
  6. fi
  7. export MACOS="true"
  8. export CC=clang
  9. export CXX=clang++
  10. export CXFREEZE=/opt/carla/bin/cxfreeze
  11. # Build python stuff
  12. export PATH=/opt/carla/bin:/opt/carla64/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin
  13. export PKG_CONFIG_PATH=/opt/carla/lib/pkgconfig:/opt/carla64/lib/pkgconfig
  14. # clean?
  15. # make clean
  16. # Build Py UI stuff
  17. make $JOBS UI RES WIDGETS
  18. # Build theme
  19. make $JOBS theme
  20. # Build everything else
  21. export PATH=/opt/carla64/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin
  22. export PKG_CONFIG_PATH=/opt/carla64/lib/pkgconfig
  23. make backend $JOBS
  24. make $JOBS
  25. # Build Mac App
  26. export PATH=/opt/carla/bin:/opt/carla64/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin
  27. export PYTHONPATH=`pwd`/source
  28. unset PKG_CONFIG_PATH
  29. # cd source
  30. rm -rf ./build ./build-lv2
  31. cp ./source/carla ./source/Carla.pyw
  32. python3 ./data/macos/bundle.py bdist_mac --bundle-name=Carla
  33. rm ./source/*.pyw
  34. cp ./source/carla-plugin ./source/carla-plugin.pyw
  35. cp ./source/modules/native-plugins/resources/bigmeter-ui ./source/bigmeter-ui.pyw
  36. cp ./source/modules/native-plugins/resources/notes-ui ./source/notes-ui.pyw
  37. $CXFREEZE --include-modules=re,sip,subprocess,inspect --target-dir=./build/plugin/ ./source/carla-plugin.pyw
  38. $CXFREEZE --include-modules=re,sip,subprocess,inspect --target-dir=./build/plugin/ ./source/bigmeter-ui.pyw
  39. $CXFREEZE --include-modules=re,sip,subprocess,inspect --target-dir=./build/plugin/ ./source/notes-ui.pyw
  40. rm ./source/*.pyw
  41. cd build
  42. mkdir Carla.app/Contents/MacOS/backend
  43. mkdir Carla.app/Contents/MacOS/bridges
  44. mkdir Carla.app/Contents/MacOS/discovery
  45. mkdir Carla.app/Contents/MacOS/styles
  46. cp ../source/backend/*.dylib Carla.app/Contents/MacOS/backend/
  47. cp ../source/bridges/carla-bridge-* Carla.app/Contents/MacOS/bridges/
  48. cp ../source/discovery/carla-discovery-* Carla.app/Contents/MacOS/discovery/
  49. cp ../source/modules/theme/styles/* Carla.app/Contents/MacOS/styles/
  50. cp -r ../source/modules/native-plugins/resources Carla.app/Contents/MacOS/
  51. find . -type f -name "*.py" -delete
  52. mv plugin/* Carla.app/Contents/MacOS/resources/
  53. rmdir plugin
  54. cd Carla.app/Contents/MacOS/styles
  55. install_name_tool -change "/opt/carla/lib/QtCore.framework/Versions/5/QtCore" @loader_path/../QtCore carlastyle.dylib
  56. install_name_tool -change "/opt/carla/lib/QtGui.framework/Versions/5/QtGui" @loader_path/../QtGui carlastyle.dylib
  57. install_name_tool -change "/opt/carla/lib/QtWidgets.framework/Versions/5/QtWidgets" @loader_path/../QtWidgets carlastyle.dylib
  58. cd ../../../..
  59. mkdir ../build-lv2
  60. cd ../build-lv2
  61. cp -r ../source/plugin/carla-native.lv2/ carla-native.lv2
  62. rm -r ./carla-native.lv2/resources
  63. cp -r ../build/Carla.app/Contents/MacOS/resources/ carla-native.lv2/resources
  64. mkdir carla-native.lv2/resources/styles
  65. cp ../source/bridges/carla-bridge-* carla-native.lv2/resources/
  66. cp ../source/discovery/carla-discovery-* carla-native.lv2/resources/
  67. cp ../build/Carla.app/Contents/MacOS/styles/* carla-native.lv2/resources/styles/
  68. cd ..