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.

84 lines
2.4KB

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