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.0KB

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
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  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. env SCRIPT_NAME=Carla python3 ./data/macos/bundle.py bdist_mac --bundle-name=Carla
  45. env SCRIPT_NAME=carla-plugin python3 ./data/macos/bundle.py bdist_mac --bundle-name=carla-plugin
  46. env SCRIPT_NAME=bigmeter-ui python3 ./data/macos/bundle.py bdist_mac --bundle-name=bigmeter-ui
  47. env SCRIPT_NAME=notes-ui python3 ./data/macos/bundle.py bdist_mac --bundle-name=notes-ui
  48. rm ./source/*.pyw
  49. mkdir -p build/Carla.app/Contents/MacOS/resources
  50. mkdir -p build/Carla.app/Contents/MacOS/styles
  51. cp bin/*.dylib build/Carla.app/Contents/MacOS/
  52. cp bin/carla-bridge-* build/Carla.app/Contents/MacOS/
  53. cp bin/carla-discovery-* build/Carla.app/Contents/MacOS/
  54. cp -LR bin/resources/* build/Carla.app/Contents/MacOS/resources/
  55. cp bin/styles/* build/Carla.app/Contents/MacOS/styles/
  56. find build/ -type f -name "*.py" -delete
  57. rm build/Carla.app/Contents/MacOS/resources/carla-plugin
  58. rm build/Carla.app/Contents/MacOS/resources/*-ui
  59. cd build/Carla.app/Contents/MacOS/resources/
  60. ln -sf ../*.so* ../Qt* ../imageformats ../platforms .
  61. cd ../../../../..
  62. cd build/Carla.app/Contents/MacOS/styles
  63. install_name_tool -change "/opt/carla/lib/QtCore.framework/Versions/5/QtCore" @executable_path/QtCore carlastyle.dylib
  64. install_name_tool -change "/opt/carla/lib/QtGui.framework/Versions/5/QtGui" @executable_path/QtGui carlastyle.dylib
  65. install_name_tool -change "/opt/carla/lib/QtWidgets.framework/Versions/5/QtWidgets" @executable_path/QtWidgets carlastyle.dylib
  66. cd ../../../../..
  67. cp build/carla-plugin.app/Contents/MacOS/carla-plugin build/Carla.app/Contents/MacOS/resources/
  68. cp build/carla-plugin.app/Contents/MacOS/fcntl.so build/Carla.app/Contents/MacOS/resources/
  69. cp build/bigmeter-ui.app/Contents/MacOS/bigmeter-ui build/Carla.app/Contents/MacOS/resources/
  70. cp build/notes-ui.app/Contents/MacOS/notes-ui build/Carla.app/Contents/MacOS/resources/
  71. rm -rf build/carla-plugin.app build/bigmeter-ui.app build/notes-ui.app
  72. mkdir build-lv2
  73. mkdir build-lv2/carla-native.lv2
  74. mkdir build-lv2/carla-native.lv2/resources
  75. mkdir build-lv2/carla-native.lv2/styles
  76. cp bin/carla-native.lv2/*.* build-lv2/carla-native.lv2/
  77. cp bin/carla-bridge-* build-lv2/carla-native.lv2/
  78. cp bin/carla-discovery-* build-lv2/carla-native.lv2/
  79. cp -LR build/Carla.app/Contents/MacOS/resources/* build-lv2/carla-native.lv2/resources/
  80. cp build/Carla.app/Contents/MacOS/styles/* build-lv2/carla-native.lv2/styles/
  81. ##############################################################################################