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.

build.sh 4.2KB

10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  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. export DEFAULT_QT=5
  12. export PYUIC5=/opt/carla/bin/pyuic5
  13. unset CPPFLAGS
  14. ##############################################################################################
  15. # Complete 64bit build
  16. export CFLAGS=-m64
  17. export CXXFLAGS=-m64
  18. export LDLAGS=-m64
  19. export PATH=/opt/carla/bin:/opt/carla64/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin
  20. export PKG_CONFIG_PATH=/opt/carla/lib/pkgconfig:/opt/carla64/lib/pkgconfig
  21. make $JOBS
  22. ##############################################################################################
  23. # Build 32bit bridges
  24. export CFLAGS=-m32
  25. export CXXFLAGS=-m32
  26. export LDLAGS=-m32
  27. export PATH=/opt/carla32/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin
  28. export PKG_CONFIG_PATH=/opt/carla32/lib/pkgconfig
  29. make posix32 $JOBS
  30. ##############################################################################################
  31. # Build Mac App
  32. export PATH=/opt/carla/bin:/opt/carla64/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin
  33. export PYTHONPATH=`pwd`/source
  34. unset CFLAGS
  35. unset CXXFLAGS
  36. unset LDLAGS
  37. unset PKG_CONFIG_PATH
  38. rm -rf ./build/Carla
  39. rm -rf ./build/exe.*
  40. rm -rf ./build/*.lv2
  41. cp ./source/carla ./source/Carla.pyw
  42. cp ./bin/resources/carla-plugin ./source/carla-plugin.pyw
  43. cp ./bin/resources/bigmeter-ui ./source/bigmeter-ui.pyw
  44. cp ./bin/resources/notes-ui ./source/notes-ui.pyw
  45. env SCRIPT_NAME=Carla python3 ./data/macos/bundle.py bdist_mac --bundle-name=Carla
  46. env SCRIPT_NAME=carla-plugin python3 ./data/macos/bundle.py bdist_mac --bundle-name=carla-plugin
  47. env SCRIPT_NAME=bigmeter-ui python3 ./data/macos/bundle.py bdist_mac --bundle-name=bigmeter-ui
  48. env SCRIPT_NAME=notes-ui python3 ./data/macos/bundle.py bdist_mac --bundle-name=notes-ui
  49. rm ./source/*.pyw
  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 -LR bin/resources/* build/Carla.app/Contents/MacOS/resources/
  56. cp bin/styles/* build/Carla.app/Contents/MacOS/styles/
  57. rm -f build/Carla.app/Contents/MacOS/carla-bridge-lv2-modgui
  58. rm -f build/Carla.app/Contents/MacOS/carla-bridge-lv2-qt5
  59. find build/ -type f -name "*.py" -delete
  60. rm build/Carla.app/Contents/MacOS/resources/carla-plugin
  61. rm build/Carla.app/Contents/MacOS/resources/*-ui
  62. rm -rf build/Carla.app/Contents/MacOS/resources/__pycache__
  63. cd build/Carla.app/Contents/MacOS/resources/
  64. ln -sf ../*.so* ../Qt* ../imageformats ../platforms .
  65. cd ../../../../..
  66. cd build/Carla.app/Contents/MacOS/styles
  67. install_name_tool -change "/opt/carla/lib/QtCore.framework/Versions/5/QtCore" @executable_path/QtCore carlastyle.dylib
  68. install_name_tool -change "/opt/carla/lib/QtGui.framework/Versions/5/QtGui" @executable_path/QtGui carlastyle.dylib
  69. install_name_tool -change "/opt/carla/lib/QtWidgets.framework/Versions/5/QtWidgets" @executable_path/QtWidgets carlastyle.dylib
  70. cd ../../../../..
  71. cp build/carla-plugin.app/Contents/MacOS/carla-plugin build/Carla.app/Contents/MacOS/resources/
  72. cp build/carla-plugin.app/Contents/MacOS/fcntl.so build/Carla.app/Contents/MacOS/resources/ 2>/dev/null || true
  73. cp build/bigmeter-ui.app/Contents/MacOS/bigmeter-ui build/Carla.app/Contents/MacOS/resources/
  74. cp build/notes-ui.app/Contents/MacOS/notes-ui build/Carla.app/Contents/MacOS/resources/
  75. rm -rf build/carla-plugin.app build/bigmeter-ui.app build/notes-ui.app
  76. mkdir build/carla.lv2
  77. mkdir build/carla.lv2/resources
  78. mkdir build/carla.lv2/styles
  79. cp bin/carla.lv2/*.* build/carla.lv2/
  80. cp bin/carla-bridge-* build/carla.lv2/
  81. cp bin/carla-discovery-* build/carla.lv2/
  82. cp bin/libcarla_utils.dylib build/carla.lv2/
  83. rm -f build/carla.lv2/carla-bridge-lv2-modgui
  84. rm -f build/carla.lv2/carla-bridge-lv2-qt5
  85. cp -LR build/Carla.app/Contents/MacOS/resources/* build/carla.lv2/resources/
  86. cp build/Carla.app/Contents/MacOS/styles/* build/carla.lv2/styles/
  87. ##############################################################################################