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.

199 lines
7.8KB

  1. #!/bin/bash
  2. set -e
  3. do_once() {
  4. git clone --depth=1 git://github.com/falkTX/Carla
  5. cd Carla
  6. make distclean
  7. make uninstall EXPERIMENTAL_PLUGINS=true PREFIX=/usr
  8. make -C data/windows/unzipfx-carla/ -f Makefile.linux clean
  9. make -C data/windows/unzipfx-carla-control/ -f Makefile.linux clean
  10. rm -rf Carla CarlaControl *.zip Carla-2.0* *.xz
  11. rm -rf build-carla build-carla-control build-lv2 build-vst carla carla-control
  12. # extra
  13. apt-get install linuxsampler-static fluidsynth-static ntk-static fftw3-static mxml-static zlib-static liblo-static
  14. apt-get install libclthreads-static libclxclient-static zita-convolver-static zita-resampler-static
  15. apt-get install pyqt4-dev-tools python3 python3-liblo python3-pyqt4 python3-pyqt4.qtopengl python3-sip
  16. apt-get install libqt4-dev libasound2-dev libpulse-dev libmagic-dev libx11-dev libxft-dev
  17. apt-get install libgtk2.0-dev libgl1-mesa-dev libglu1-mesa-dev
  18. apt-get install cx-freeze-python3 zip
  19. # libgtk-3-dev
  20. export MOC_QT4=/usr/bin/moc-qt4
  21. export RCC_QT4=/usr/bin/rcc
  22. export UIC_QT4=/usr/bin/uic-qt4
  23. export PATH=/opt/kxstudio/bin:$PATH
  24. export PKG_CONFIG_PATH=/opt/kxstudio/lib/pkgconfig
  25. make features
  26. }
  27. if [ ! -f extra/files-downloaded ]; then
  28. mkdir -p extra
  29. cd extra
  30. if (dpkg --print-architecture | grep -q amd64); then
  31. wget https://launchpad.net/~kxstudio-debian/+archive/ubuntu/apps/+files/carla-git_1.9.7+git20170105_amd64.deb
  32. else
  33. wget https://launchpad.net/~kxstudio-debian/+archive/ubuntu/apps/+files/carla-git_1.9.7+git20170105_i386.deb
  34. fi
  35. dpkg -x carla-git_*.deb .
  36. wget https://launchpad.net/~kxstudio-debian/+archive/ubuntu/apps/+files/carla-bridge-wine32_1.9.7+git20170107_i386.deb
  37. dpkg -x carla-bridge-wine32_*.deb .
  38. wget https://launchpad.net/~kxstudio-debian/+archive/ubuntu/apps/+files/carla-bridge-win32_1.9.7+git20170105_i386.deb
  39. dpkg -x carla-bridge-win32_*.deb .
  40. if (dpkg --print-architecture | grep -q amd64); then
  41. wget https://github.com/KXStudio/Repository/releases/download/initial/carla-bridge-wine64_1.9.5.git20160114_amd64.deb
  42. dpkg -x carla-bridge-wine64_*.deb .
  43. wget https://launchpad.net/~kxstudio-debian/+archive/ubuntu/apps/+files/carla-bridge-win64_1.9.7+git20170105_amd64.deb
  44. dpkg -x carla-bridge-win64_*.deb .
  45. fi
  46. if (dpkg --print-architecture | grep -q amd64); then
  47. wget https://launchpad.net/~kxstudio-debian/+archive/ubuntu/testing/+files/unzipfx-carla_1.9.5-1kxstudio1_amd64.deb
  48. wget https://launchpad.net/~kxstudio-debian/+archive/ubuntu/testing/+files/unzipfx-carla-control_1.0.0-0kxstudio1_amd64.deb
  49. else
  50. wget https://launchpad.net/~kxstudio-debian/+archive/ubuntu/testing/+files/unzipfx-carla_1.9.5-1kxstudio1_i386.deb
  51. wget https://launchpad.net/~kxstudio-debian/+archive/ubuntu/testing/+files/unzipfx-carla-control_1.0.0-0kxstudio1_i386.deb
  52. fi
  53. dpkg -x unzipfx-carla_*.deb .
  54. dpkg -x unzipfx-carla-control_*.deb .
  55. rm *.deb
  56. touch files-downloaded
  57. cd ..
  58. fi
  59. make EXPERIMENTAL_PLUGINS=true -j 8
  60. # make -C data/windows/unzipfx-carla/ -f Makefile.linux -j 8
  61. # make -C data/windows/unzipfx-carla-control/ -f Makefile.linux -j 8
  62. if (dpkg --print-architecture | grep -q amd64); then
  63. LDFLAGS=-L/usr/lib32 make posix32 -j 8
  64. fi
  65. make install PREFIX=/usr EXPERIMENTAL_PLUGINS=true
  66. mkdir build-carla
  67. mkdir build-carla/resources
  68. mkdir build-carla/src
  69. cp extra/usr/lib/carla/*.dll build-carla/
  70. cp extra/usr/lib/carla/*.exe build-carla/
  71. cp extra/usr/lib/carla/*-gtk3 build-carla/
  72. cp extra/usr/lib/carla/*-qt5 build-carla/
  73. cp -r /usr/lib/carla/* build-carla/
  74. cp -LR /usr/share/carla/resources/* build-carla/resources/
  75. cp /usr/share/carla/carla build-carla/src/
  76. cp /usr/share/carla/carla-control build-carla/src/
  77. cp -r /usr/share/carla/*.py build-carla/src/
  78. mv build-carla/resources/carla-plugin build-carla/resources/carla-plugin.py
  79. mv build-carla/resources/bigmeter-ui build-carla/resources/bigmeter-ui.py
  80. mv build-carla/resources/midipattern-ui build-carla/resources/midipattern-ui.py
  81. mv build-carla/resources/notes-ui build-carla/resources/notes-ui.py
  82. rm build-carla/carla-bridge-lv2-modgui
  83. cxfreeze-python3 --include-modules=re,sip,subprocess,inspect build-carla/src/carla --target-dir=build-carla/
  84. cxfreeze-python3 --include-modules=re,sip,subprocess,inspect build-carla/src/carla-control --target-dir=build-carla-control/
  85. cxfreeze-python3 --include-modules=re,sip,subprocess,inspect build-carla/resources/carla-plugin.py --target-dir=build-carla/resources/
  86. cxfreeze-python3 --include-modules=re,sip,subprocess,inspect build-carla/resources/bigmeter-ui.py --target-dir=build-carla/resources/
  87. cxfreeze-python3 --include-modules=re,sip,subprocess,inspect build-carla/resources/midipattern-ui.py --target-dir=build-carla/resources/
  88. cxfreeze-python3 --include-modules=re,sip,subprocess,inspect build-carla/resources/notes-ui.py --target-dir=build-carla/resources/
  89. cp /usr/lib/libpython3.2mu.so.1.0 build-carla/
  90. cp /usr/lib/libffi.so.5 build-carla/
  91. cp /usr/lib/libmagic.so.1 build-carla/
  92. cp /usr/lib/libssl.so.0.9.8 build-carla/
  93. cp /usr/lib/libcrypto.so.0.9.8 build-carla/
  94. cp /lib/libbz2.so.1.0 build-carla/
  95. cp /lib/libselinux.so.1 build-carla/
  96. cp /usr/lib/libpython3.2mu.so.1.0 build-carla-control/
  97. cp /usr/lib/libmagic.so.1 build-carla-control/
  98. cp /usr/lib/libffi.so.5 build-carla-control/
  99. cp /usr/lib/libssl.so.0.9.8 build-carla-control/
  100. cp /usr/lib/libcrypto.so.0.9.8 build-carla-control/
  101. cp /lib/libbz2.so.1.0 build-carla-control/
  102. cp /lib/libselinux.so.1 build-carla-control/
  103. cp build-carla/libcarla_utils.so build-carla-control/
  104. cp -r build-carla/styles build-carla-control/
  105. find build-carla -name "*.py" -delete
  106. find build-carla -name PyQt4.QtAssistant.so -delete
  107. find build-carla -name PyQt4.QtNetwork.so -delete
  108. find build-carla -name PyQt4.QtScript.so -delete
  109. find build-carla -name PyQt4.QtTest.so -delete
  110. find build-carla -name PyQt4.QtXml.so -delete
  111. rm -rf build-carla/src
  112. rm -f build-carla/*.def
  113. find build-carla-control -name "*.py" -delete
  114. find build-carla-control -name PyQt4.QtAssistant.so -delete
  115. find build-carla-control -name PyQt4.QtNetwork.so -delete
  116. find build-carla-control -name PyQt4.QtScript.so -delete
  117. find build-carla-control -name PyQt4.QtTest.so -delete
  118. find build-carla-control -name PyQt4.QtXml.so -delete
  119. rm -rf build-carla-control/src
  120. rm -f build-carla-control/*.def
  121. cd build-carla/resources/ && \
  122. rm *.so* carla-plugin-patchbay && \
  123. ln -s ../*.so* . && \
  124. ln -s carla-plugin carla-plugin-patchbay && \
  125. cd ../..
  126. mv build-carla carla
  127. zip --symlinks -r -9 carla.zip carla
  128. cat extra/opt/carla/unzipfx2cat carla.zip > Carla
  129. chmod +x Carla
  130. mv carla build-carla
  131. mv build-carla-control carla-control
  132. zip --symlinks -r -9 carla-control.zip carla-control
  133. cat extra/opt/carla-control/unzipfx2cat carla-control.zip > CarlaControl
  134. chmod +x CarlaControl
  135. mv carla-control build-carla-control
  136. mkdir build-lv2
  137. cp -LR /usr/lib/lv2/carla.lv2 build-lv2/
  138. rm -r build-lv2/carla.lv2/resources
  139. cp -LR build-carla/resources build-lv2/carla.lv2/
  140. cp extra/usr/lib/carla/*.dll build-lv2/carla.lv2/
  141. cp extra/usr/lib/carla/*.exe build-lv2/carla.lv2/
  142. cp extra/usr/lib/carla/*-gtk3 build-lv2/carla.lv2/
  143. cp extra/usr/lib/carla/*-qt5 build-lv2/carla.lv2/
  144. mkdir build-vst
  145. cp -LR /usr/lib/vst/carla.vst build-vst/
  146. rm -r build-vst/carla.vst/resources
  147. cp -LR build-carla/resources build-vst/carla.vst/
  148. cp extra/usr/lib/carla/*.dll build-vst/carla.vst/
  149. cp extra/usr/lib/carla/*.exe build-vst/carla.vst/
  150. cp extra/usr/lib/carla/*-gtk3 build-vst/carla.vst/
  151. cp extra/usr/lib/carla/*-qt5 build-vst/carla.vst/
  152. if (dpkg --print-architecture | grep -q amd64); then
  153. FOLDER="Carla-2.0beta5-linux64"
  154. else
  155. FOLDER="Carla-2.0beta5-linux32"
  156. fi
  157. mkdir $FOLDER
  158. cp data/linux/README $FOLDER/
  159. mv Carla CarlaControl build-lv2/*.lv2 build-vst/*.vst $FOLDER/
  160. tar cJf $FOLDER.tar.xz $FOLDER