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.

build-win.sh 2.5KB

10 years ago
10 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  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. 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. if [ x"${ARCH}" != x"32" ]; then
  28. CPUARCH="x86_64"
  29. else
  30. CPUARCH="i686"
  31. fi
  32. MINGW_PREFIX="${CPUARCH}-w64-mingw32"
  33. export PREFIX=${TARGETDIR}/carla-w${ARCH_PREFIX}
  34. export PATH=/opt/mingw${ARCH}/bin:${PREFIX}/bin/usr/sbin:/usr/bin:/sbin:/bin
  35. export PKG_CONFIG_PATH=${PREFIX}/lib/pkgconfig
  36. export AR=${MINGW_PREFIX}-ar
  37. export CC=${MINGW_PREFIX}-gcc
  38. export CXX=${MINGW_PREFIX}-g++
  39. export STRIP=${MINGW_PREFIX}-strip
  40. export WINDRES=${MINGW_PREFIX}-windres
  41. export CFLAGS="-DPTW32_STATIC_LIB -DFLUIDSYNTH_NOT_A_DLL"
  42. export CFLAGS="${CFLAGS} -I${PREFIX}/include -I/opt/mingw${ARCH}/include -I/opt/mingw${ARCH}/${MINGW_PREFIX}/include"
  43. export CXXFLAGS="${CFLAGS}"
  44. export LDFLAGS="-L${PREFIX}/lib -L/opt/mingw${ARCH}/lib -L/opt/mingw${ARCH}/${MINGW_PREFIX}/lib"
  45. export WIN32=true
  46. if [ x"${ARCH}" != x"32" ]; then
  47. export WIN64=true
  48. fi
  49. export WINEARCH=win${ARCH}
  50. export WINEDEBUG=-all
  51. export WINEPREFIX=~/.winepy3_x${ARCH}
  52. export PYTHON_EXE="wine C:\\\\Python34\\\\python.exe"
  53. export CXFREEZE="$PYTHON_EXE C:\\\\Python34\\\\Scripts\\\\cxfreeze"
  54. export PYUIC="$PYTHON_EXE -m PyQt5.uic.pyuic"
  55. export PYRCC="wine C:\\\\Python34\\\\Lib\\\\site-packages\\\\PyQt5\\\\pyrcc5.exe"
  56. make ${MAKE_ARGS}
  57. if [ x"${ARCH}" != x"32" ]; then
  58. make ${MAKE_ARGS} \
  59. AR="i686-w64-mingw32-ar" \
  60. CC="i686-w64-mingw32-gcc" \
  61. CXX="i686-w64-mingw32-g++" \
  62. LDFLAGS="-L${TARGETDIR}/carla-w32/lib -L/opt/mingw32/lib -L/opt/mingw32/i686-w64-mingw32/lib" \
  63. win32
  64. fi
  65. # Testing:
  66. echo "export WINEPREFIX=~/.winepy3_x${ARCH}"
  67. echo "$PYTHON_EXE ./source/carla"