Cross-Platform build scripts for audio plugins
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.

103 lines
3.2KB

  1. #!/bin/bash
  2. set -e
  3. if [ -z "${BOOTSTRAP_VERSION}" ]; then
  4. echo "Script only intended for github/CI use"
  5. exit 1
  6. fi
  7. TARGET="${1}"
  8. if [ -z "${TARGET}" ]; then
  9. echo "TARGET is not set"
  10. exit 1
  11. fi
  12. # ---------------------------------------------------------------------------------------------------------------------
  13. # check build step
  14. PAWPAW_DIR="${HOME}/PawPawBuilds"
  15. PAWPAW_BUILDDIR="${PAWPAW_DIR}/builds/${TARGET}"
  16. if [ -e ${PAWPAW_BUILDDIR}/.last-bootstrap-version ]; then
  17. LAST_BOOTSTRAP_VERSION=$(cat ${PAWPAW_BUILDDIR}/.last-bootstrap-version)
  18. else
  19. LAST_BOOTSTRAP_VERSION=0
  20. fi
  21. if [ ${LAST_BOOTSTRAP_VERSION} -eq ${BOOTSTRAP_VERSION} ] && [ -e ${PAWPAW_BUILDDIR}/.last-build-version ]; then
  22. LAST_BUILD_VERSION=$(cat ${PAWPAW_BUILDDIR}/.last-build-version)
  23. else
  24. LAST_BUILD_VERSION=0
  25. fi
  26. BUILD_VERSION=$((${LAST_BUILD_VERSION} + 1))
  27. echo "PawPaw build v${BUILD_VERSION}"
  28. # ---------------------------------------------------------------------------------------------------------------------
  29. # build plugins according to version/step, caching files along the way
  30. # TODO
  31. # ninjas2: need to put http://kxstudio.sf.net/ns/lv2ext/props#NonAutomable spec somewhere
  32. PLUGINS_BASE="abgate artyfx caps die-plugins fomp mda"
  33. PLUGINS_CROSS="blop dpf-plugins"
  34. PLUGINS_DISTRHO=""
  35. if [ ${BUILD_VERSION} -ge 2 ]; then
  36. PLUGINS_DISTRHO+=" distrho-ports-arctican"
  37. PLUGINS_DISTRHO+=" distrho-ports-drowaudio"
  38. PLUGINS_DISTRHO+=" distrho-ports-tal-plugins"
  39. fi
  40. if [ ${BUILD_VERSION} -ge 3 ]; then
  41. PLUGINS_DISTRHO+=" distrho-ports-dexed"
  42. PLUGINS_DISTRHO+=" distrho-ports-klangfalter"
  43. PLUGINS_DISTRHO+=" distrho-ports-luftikus"
  44. PLUGINS_DISTRHO+=" distrho-ports-obxd"
  45. PLUGINS_DISTRHO+=" distrho-ports-pitched-delay"
  46. PLUGINS_DISTRHO+=" distrho-ports-refine"
  47. fi
  48. if [ ${BUILD_VERSION} -ge 4 ]; then
  49. PLUGINS_DISTRHO+=" distrho-ports-swankyamp"
  50. PLUGINS_DISTRHO+=" distrho-ports-temper"
  51. PLUGINS_DISTRHO+=" distrho-ports-vex"
  52. PLUGINS_DISTRHO+=" distrho-ports-vitalium"
  53. PLUGINS_DISTRHO+=" distrho-ports-wolpertinger"
  54. fi
  55. # ---------------------------------------------------------------------------------------------------------------------
  56. # build plugins according to target
  57. if [ "${TARGET}" = "linux" ]; then
  58. PLUGINS="${PLUGINS_BASE} ${PLUGINS_CROSS}"
  59. elif [ "${TARGET}" = "macos-old" ]; then
  60. PLUGINS="${PLUGINS_BASE}"
  61. else
  62. PLUGINS="${PLUGINS_BASE} ${PLUGINS_CROSS} ${PLUGINS_DISTRHO}"
  63. fi
  64. ./build-plugins.sh ${TARGET} ${PLUGINS}
  65. ./.cleanup.sh ${TARGET}
  66. # ---------------------------------------------------------------------------------------------------------------------
  67. # packaging, only be done when doing a full build
  68. if [ ${BUILD_VERSION} -ge 4 ]; then
  69. ./pack-plugins.sh ${TARGET} ${PLUGINS}
  70. fi
  71. # ---------------------------------------------------------------------------------------------------------------------
  72. # set env for next builds
  73. echo ${BOOTSTRAP_VERSION} > ${PAWPAW_BUILDDIR}/.last-bootstrap-version
  74. if [ ${BUILD_VERSION} -le 4 ]; then
  75. echo ${BUILD_VERSION} > ${PAWPAW_BUILDDIR}/.last-build-version
  76. fi
  77. # ---------------------------------------------------------------------------------------------------------------------