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-win32.sh 3.6KB

10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. #!/bin/bash
  2. ### fluidsynth.pc:
  3. # -lglib-2.0 -lgthread-2.0 -lsndfile -lFLAC -lvorbisenc -lvorbis -logg -lm -ldsound -lwinmm -lole32 -lws2_32
  4. ### linuxsampler.pc:
  5. # -L${prefix}/lib/libgig -llinuxsampler -lgig -lsndfile -lFLAC -lvorbisenc -lvorbis -logg -lm -lrpcrt4
  6. set -e
  7. MINGW=i686-w64-mingw32
  8. MINGW_PATH=/opt/mingw32
  9. JOBS="-j 2"
  10. if [ ! -f Makefile ]; then
  11. cd ../..
  12. fi
  13. export WIN32=true
  14. export PATH=$MINGW_PATH/bin:$MINGW_PATH/$MINGW/bin:$PATH
  15. export CC=$MINGW-gcc
  16. export CXX=$MINGW-g++
  17. export WINDRES=$MINGW-windres
  18. export CFLAGS="-DBUILDING_CARLA_FOR_WINDOWS -DPTW32_STATIC_LIB"
  19. export CXXFLAGS="$CFLAGS -DFLUIDSYNTH_NOT_A_DLL"
  20. unset CPPFLAGS
  21. unset LDFLAGS
  22. export WINEARCH=win32
  23. export WINEPREFIX=~/.winepy3_x86
  24. export PYTHON_EXE="wine C:\\\\Python34\\\\python.exe"
  25. export CXFREEZE="$PYTHON_EXE C:\\\\Python34\\\\Scripts\\\\cxfreeze"
  26. export PYUIC="$PYTHON_EXE -m PyQt5.uic.pyuic"
  27. export PYRCC="wine C:\\\\Python34\\\\Lib\\\\site-packages\\\\PyQt5\\\\pyrcc5.exe"
  28. export DEFAULT_QT=5
  29. # Clean build
  30. make clean
  31. # Build PyQt5 resources
  32. make $JOBS UI RES WIDGETS
  33. # Build discovery
  34. make $JOBS discovery
  35. rm -f bin/carla-discovery-win32.exe
  36. cp bin/carla-discovery-native.exe bin/carla-discovery-win32.exe
  37. # Build backend
  38. make $JOBS backend
  39. # Build Plugin bridges
  40. # make $JOBS bridges
  41. # Build UI bridges
  42. make $JOBS -C source/bridges-ui ui_lv2-windows
  43. export PYTHONPATH=`pwd`/source
  44. rm -rf ./data/windows/Carla
  45. cp ./source/carla ./source/Carla.pyw
  46. $PYTHON_EXE ./data/windows/app.py build_exe
  47. rm -f ./source/Carla.pyw
  48. mv build data/windows/Carla
  49. cd data/windows/
  50. cp ../../bin/*.dll Carla/
  51. cp ../../bin/*.exe Carla/
  52. mv Carla/exe.*/* Carla/
  53. rm Carla/carla-discovery-native.exe
  54. rmdir Carla/exe.*
  55. rm -f Carla/PyQt5.Qsci.pyd Carla/PyQt5.QtNetwork.pyd Carla/PyQt5.QtSql.pyd Carla/PyQt5.QtTest.pyd
  56. cp $WINEPREFIX/drive_c/Python34/python34.dll Carla/
  57. cp $WINEPREFIX/drive_c/Python34/Lib/site-packages/PyQt5/icudt49.dll Carla/
  58. cp $WINEPREFIX/drive_c/Python34/Lib/site-packages/PyQt5/icuin49.dll Carla/
  59. cp $WINEPREFIX/drive_c/Python34/Lib/site-packages/PyQt5/icuuc49.dll Carla/
  60. cp $WINEPREFIX/drive_c/Python34/Lib/site-packages/PyQt5/libEGL.dll Carla/
  61. cp $WINEPREFIX/drive_c/Python34/Lib/site-packages/PyQt5/libGLESv2.dll Carla/
  62. cp $WINEPREFIX/drive_c/Python34/Lib/site-packages/PyQt5/Qt5Core.dll Carla/
  63. cp $WINEPREFIX/drive_c/Python34/Lib/site-packages/PyQt5/Qt5Gui.dll Carla/
  64. cp $WINEPREFIX/drive_c/Python34/Lib/site-packages/PyQt5/Qt5Widgets.dll Carla/
  65. cp $WINEPREFIX/drive_c/Python34/Lib/site-packages/PyQt5/Qt5OpenGL.dll Carla/
  66. cp $WINEPREFIX/drive_c/Python34/Lib/site-packages/PyQt5/Qt5PrintSupport.dll Carla/
  67. cp $WINEPREFIX/drive_c/Python34/Lib/site-packages/PyQt5/Qt5Svg.dll Carla/
  68. # Build unzipfx
  69. make -C unzipfx-carla -f Makefile.win32
  70. # Create static build
  71. rm -f Carla.zip CarlaControl.zip
  72. zip -r -9 Carla.zip Carla
  73. rm -f Carla.exe CarlaControl.exe
  74. cat unzipfx-carla/unzipfx2cat.exe Carla.zip > Carla.exe
  75. chmod +x Carla.exe
  76. # Cleanup
  77. make -C unzipfx-carla -f Makefile.win32 clean
  78. make -C unzipfx-carla-control -f Makefile.win32 clean
  79. rm -f Carla.zip CarlaControl.zip
  80. rm -f unzipfx-*/*.exe
  81. rm -rf Carla-2.0beta3-win32
  82. mkdir Carla-2.0beta3-win32
  83. mkdir Carla-2.0beta3-win32/vcredist
  84. cp Carla.exe README.txt Carla-2.0beta3-win32
  85. cp ~/.cache/winetricks/vcrun2010/vcredist_x86.exe Carla-2.0beta3-win32/vcredist
  86. zip -r -9 Carla-2.0beta3-win32.zip Carla-2.0beta3-win32
  87. cd ../..
  88. # Testing:
  89. echo "export WINEPREFIX=~/.winepy3_x86"
  90. echo "$PYTHON_EXE ./source/carla -platformpluginpath \"C:\\\\Python34\\\\Lib\\\\site-packages\\\\PyQt5\\\\plugins\\\\platforms\""