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.

102 lines
3.4KB

  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 --include-modules=re,sip,subprocess,inspect"
  11. ##############################################################################################
  12. # Complete 64bit build
  13. export CFLAGS=-m64
  14. export CXXFLAGS=-m64
  15. export LDLAGS=-m64
  16. export PATH=/opt/carla/bin:/opt/carla64/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin
  17. export PKG_CONFIG_PATH=/opt/carla/lib/pkgconfig:/opt/carla64/lib/pkgconfig
  18. make clean
  19. make $JOBS
  20. ##############################################################################################
  21. # Build 32bit bridges
  22. export CFLAGS=-m32
  23. export CXXFLAGS=-m32
  24. export LDLAGS=-m32
  25. export PATH=/opt/carla32/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin
  26. export PKG_CONFIG_PATH=/opt/carla32/lib/pkgconfig
  27. # make posix32 $JOBS
  28. ##############################################################################################
  29. # Build Mac App
  30. export PATH=/opt/carla/bin:/opt/carla64/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin
  31. export PYTHONPATH=`pwd`/source
  32. unset CFLAGS
  33. unset CXXFLAGS
  34. unset LDLAGS
  35. unset PKG_CONFIG_PATH
  36. rm -rf ./build ./build-lv2
  37. rm -f bin/carla-bridge-lv2-cocoa # TODO
  38. rm -f bin/carla-bridge-lv2-qt5
  39. mkdir build
  40. cp ./source/carla ./source/Carla.pyw
  41. cp ./bin/resources/carla-plugin ./source/carla-plugin.pyw
  42. cp ./bin/resources/bigmeter-ui ./source/bigmeter-ui.pyw
  43. cp ./bin/resources/notes-ui ./source/notes-ui.pyw
  44. python3 ./data/macos/bundle.py bdist_mac --bundle-name=Carla
  45. $CXFREEZE --target-dir=./build/plugin/ ./source/carla-plugin.pyw
  46. $CXFREEZE --target-dir=./build/plugin/ ./source/bigmeter-ui.pyw
  47. $CXFREEZE --target-dir=./build/plugin/ ./source/notes-ui.pyw
  48. rm ./source/*.pyw
  49. mkdir -p build/Carla.app/Contents/MacOS
  50. mkdir -p build/Carla.app/Contents/MacOS/resources
  51. mkdir -p build/Carla.app/Contents/MacOS/styles
  52. cp bin/*.dylib build/Carla.app/Contents/MacOS/
  53. cp bin/carla-bridge-* build/Carla.app/Contents/MacOS/
  54. cp bin/carla-discovery-* build/Carla.app/Contents/MacOS/
  55. cp -r bin/resources/* build/Carla.app/Contents/MacOS/resources/
  56. cp bin/styles/* build/Carla.app/Contents/MacOS/styles/
  57. find build/ -type f -name "*.py" -delete
  58. mv build/plugin/* build/Carla.app/Contents/MacOS/resources/
  59. rmdir build/plugin
  60. cd build/Carla.app/Contents/MacOS/resources/
  61. ln -s ../styles styles
  62. cd ../../../../..
  63. cd build/Carla.app/Contents/MacOS/styles
  64. install_name_tool -change "/opt/carla/lib/QtCore.framework/Versions/5/QtCore" @executable_path/QtCore carlastyle.dylib
  65. install_name_tool -change "/opt/carla/lib/QtGui.framework/Versions/5/QtGui" @executable_path/QtGui carlastyle.dylib
  66. install_name_tool -change "/opt/carla/lib/QtWidgets.framework/Versions/5/QtWidgets" @executable_path/QtWidgets carlastyle.dylib
  67. cd ../../../../..
  68. mkdir build-lv2
  69. mkdir build-lv2/carla-native.lv2
  70. mkdir build-lv2/carla-native.lv2/resources
  71. mkdir build-lv2/carla-native.lv2/styles
  72. cp bin/carla-native.lv2/*.* build-lv2/carla-native.lv2/
  73. cp bin/carla-bridge-* build-lv2/carla-native.lv2/
  74. cp bin/carla-discovery-* build-lv2/carla-native.lv2/
  75. cp -r build/Carla.app/Contents/MacOS/resources/* build-lv2/carla-native.lv2/resources/
  76. cp build/Carla.app/Contents/MacOS/styles/* build-lv2/carla-native.lv2/styles/
  77. ##############################################################################################