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.

79 lines
2.3KB

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