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.

96 lines
2.7KB

  1. #!/bin/bash
  2. # ---------------------------------------------------------------------------------------------------------------------
  3. # check input
  4. ARCH="${1}"
  5. ARCH_PREFIX="${1}"
  6. if [ x"${ARCH}" != x"32" ] && [ x"${ARCH}" != x"32nosse" ] && [ x"${ARCH}" != x"64" ]; then
  7. echo "usage: $0 32|nonosse|64"
  8. exit 1
  9. fi
  10. if [ x"${ARCH}" = x"32nosse" ]; then
  11. ARCH="32"
  12. MAKE_ARGS="NOOPT=true"
  13. fi
  14. # ---------------------------------------------------------------------------------------------------------------------
  15. # stop on error
  16. set -e
  17. # ---------------------------------------------------------------------------------------------------------------------
  18. # cd to correct path
  19. if [ ! -f Makefile ]; then
  20. cd $(dirname $0)/../..
  21. fi
  22. # ---------------------------------------------------------------------------------------------------------------------
  23. # set variables
  24. source data/windows/common.env
  25. MAKE_ARGS="${MAKE_ARGS} HAVE_QT4=false HAVE_QT5=false HAVE_PYQT5=true HAVE_FFMPEG=false HAVE_PROJECTM=false"
  26. MAKE_ARGS="${MAKE_ARGS} BUILDING_FOR_WINDOWS=true"
  27. export WIN32=true
  28. if [ x"${ARCH}" != x"32" ]; then
  29. export WIN64=true
  30. CPUARCH="x86_64"
  31. else
  32. CPUARCH="i686"
  33. fi
  34. # ---------------------------------------------------------------------------------------------------------------------
  35. export_vars() {
  36. local _ARCH="${1}"
  37. local _ARCH_PREFIX="${2}"
  38. local _MINGW_PREFIX="${3}-w64-mingw32"
  39. export PREFIX=${TARGETDIR}/carla-w${_ARCH_PREFIX}
  40. export PATH=/opt/mingw${_ARCH}/bin:${PREFIX}/bin/usr/sbin:/usr/bin:/sbin:/bin
  41. export PKG_CONFIG_PATH=${PREFIX}/lib/pkgconfig
  42. export AR=${_MINGW_PREFIX}-ar
  43. export CC=${_MINGW_PREFIX}-gcc
  44. export CXX=${_MINGW_PREFIX}-g++
  45. export STRIP=${_MINGW_PREFIX}-strip
  46. export WINDRES=${_MINGW_PREFIX}-windres
  47. export CFLAGS="-DPTW32_STATIC_LIB -DFLUIDSYNTH_NOT_A_DLL"
  48. export CFLAGS="${CFLAGS} -I${PREFIX}/include -I/opt/mingw${_ARCH}/include -I/opt/mingw${_ARCH}/${_MINGW_PREFIX}/include"
  49. export CXXFLAGS="${CFLAGS}"
  50. export LDFLAGS="-L${PREFIX}/lib -L/opt/mingw${_ARCH}/lib -L/opt/mingw${_ARCH}/${_MINGW_PREFIX}/lib"
  51. }
  52. # ---------------------------------------------------------------------------------------------------------------------
  53. export_vars "${ARCH}" "${ARCH_PREFIX}" "${CPUARCH}"
  54. export WINEARCH=win${ARCH}
  55. export WINEDEBUG=-all
  56. export WINEPREFIX=~/.winepy3_x${ARCH}
  57. export PYTHON_EXE="wine C:\\\\Python34\\\\python.exe"
  58. export CXFREEZE="$PYTHON_EXE C:\\\\Python34\\\\Scripts\\\\cxfreeze"
  59. export PYUIC="$PYTHON_EXE -m PyQt5.uic.pyuic"
  60. export PYRCC="wine C:\\\\Python34\\\\Lib\\\\site-packages\\\\PyQt5\\\\pyrcc5.exe"
  61. make ${MAKE_ARGS}
  62. if [ x"${ARCH}" != x"32" ]; then
  63. export_vars "32" "32" "i686"
  64. make ${MAKE_ARGS} win32
  65. fi
  66. # Testing:
  67. echo "export WINEPREFIX=~/.winepy3_x${ARCH}"
  68. echo "$PYTHON_EXE ./source/frontend/carla"