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.

109 lines
3.8KB

  1. #!/bin/bash
  2. set -e
  3. MINGW=i686-w64-mingw32
  4. MINGW_PATH=/opt/mingw32
  5. JOBS="-j 4"
  6. if [ ! -f Makefile ]; then
  7. cd ../..
  8. fi
  9. export WIN32=true
  10. export PATH=$MINGW_PATH/bin:$MINGW_PATH/$MINGW/bin:$PATH
  11. export AR=$MINGW-ar
  12. export CC=$MINGW-gcc
  13. export CXX=$MINGW-g++
  14. export MOC=$MINGW-moc
  15. export RCC=$MINGW-rcc
  16. export UIC=$MINGW-uic
  17. export STRIP=$MINGW-strip
  18. export WINDRES=$MINGW-windres
  19. export CFLAGS="-DPTW32_STATIC_LIB -I$MINGW_PATH/include"
  20. export CXXFLAGS="-DPTW32_STATIC_LIB -DFLUIDSYNTH_NOT_A_DLL -I$MINGW_PATH/include"
  21. export EXTRA_LIBS1="-lglib-2.0 -lgthread-2.0 -lgig -lsndfile -lFLAC -lvorbisenc -lvorbis -logg"
  22. export EXTRA_LIBS2="$MINGW_PATH/lib/qt4/plugins/imageformats/libqsvg.a"
  23. # Clean build
  24. # make clean
  25. # Build PyQt4 resources
  26. # make $JOBS UI RES WIDGETS
  27. # Build discovery
  28. make $JOBS discovery EXTRA_LIBS="$EXTRA_LIBS1"
  29. cp source/discovery/carla-discovery-native.exe source/discovery/carla-discovery-win32.exe
  30. # Build backend
  31. # make $JOBS -C source/backend/standalone ../libcarla_standalone.dll WIN32=true EXTRA_LIBS="$EXTRA_LIBS1 $EXTRA_LIBS2"
  32. # export WINEPREFIX=~/.winepy3
  33. #
  34. # export PYTHON_EXE="C:\\\\Python33\\\\python.exe"
  35. #
  36. # export CXFREEZE="wine $PYTHON_EXE C:\\\\Python33\\\\Scripts\\\\cxfreeze"
  37. # export PYUIC="wine $PYTHON_EXE C:\\\\Python33\\\\Lib\\\\site-packages\\\\PyQt4\\\\uic\\\\pyuic.py"
  38. # export PYRCC="wine C:\\\\Python33\\\\Lib\\\\site-packages\\\\PyQt4\\\\pyrcc4.exe -py3"
  39. # rm -rf ./data/windows/Carla
  40. # cp ./source/carla.py ./source/carla.pyw
  41. # $CXFREEZE --target-dir=".\\data\\windows\\Carla" ".\\source\\carla.pyw"
  42. # rm -f ./source/carla.pyw
  43. #
  44. # rm -rf ./data/windows/CarlaControl
  45. # cp ./source/carla_control.py ./source/carla_control.pyw
  46. # $CXFREEZE --target-dir=".\\data\\windows\\CarlaControl" ".\\source\\carla_control.pyw"
  47. # rm -f ./source/carla_control.pyw
  48. # cd data/windows
  49. # mkdir Carla/backend
  50. # mkdir Carla/bridges
  51. # mkdir Carla/discovery
  52. # cp ../../source/backend/*.dll Carla/backend/
  53. # cp ../../source/discovery/*.exe Carla/discovery/
  54. # mv CarlaControl/carla_control.exe CarlaControl/CarlaControl.exe
  55. #
  56. # cp $WINEPREFIX/drive_c/windows/syswow64/python33.dll Carla/
  57. # cp $WINEPREFIX/drive_c/Python33/Lib/site-packages/PyQt4/QtCore4.dll Carla/
  58. # cp $WINEPREFIX/drive_c/Python33/Lib/site-packages/PyQt4/QtGui4.dll Carla/
  59. # cp $WINEPREFIX/drive_c/Python33/Lib/site-packages/PyQt4/QtOpenGL4.dll Carla/
  60. # cp $WINEPREFIX/drive_c/Python33/Lib/site-packages/PyQt4/QtSvg4.dll Carla/
  61. # cp $WINEPREFIX/drive_c/Python33/Lib/site-packages/PyQt4/QtXml4.dll Carla/
  62. # cp -r $WINEPREFIX/drive_c/Python33/Lib/site-packages/PyQt4/plugins/imageformats/ Carla/
  63. # cp -r $WINEPREFIX/drive_c/Python33/Lib/site-packages/PyQt4/plugins/iconengines/ Carla/
  64. #
  65. # cp $WINEPREFIX/drive_c/windows/syswow64/python33.dll CarlaControl/
  66. # cp $WINEPREFIX/drive_c/Python33/Lib/site-packages/PyQt4/QtCore4.dll CarlaControl/
  67. # cp $WINEPREFIX/drive_c/Python33/Lib/site-packages/PyQt4/QtGui4.dll CarlaControl/
  68. # cp -r $WINEPREFIX/drive_c/Python33/Lib/site-packages/PyQt4/plugins/imageformats/ CarlaControl/
  69. # cp -r $WINEPREFIX/drive_c/Python33/Lib/site-packages/PyQt4/plugins/iconengines/ CarlaControl/
  70. # Build unzipfx
  71. # make -C unzipfx-carla -f Makefile.win32
  72. # make -C unzipfx-carla-control -f Makefile.win32
  73. # Create static build
  74. # rm -f Carla.zip CarlaControl.zip
  75. # zip -r -9 Carla.zip Carla
  76. # zip -r -9 CarlaControl.zip CarlaControl
  77. #
  78. # rm -f Carla.exe CarlaControl.exe
  79. # cat unzipfx-carla/unzipfx2cat.exe Carla.zip > Carla.exe
  80. # cat unzipfx-carla-control/unzipfx2cat.exe CarlaControl.zip > CarlaControl.exe
  81. # chmod +x Carla.exe
  82. # chmod +x CarlaControl.exe
  83. # Cleanup
  84. # make -C unzipfx-carla -f Makefile.win32 clean
  85. # make -C unzipfx-carla-control -f Makefile.win32 clean
  86. # rm -f Carla.zip CarlaControl.zip
  87. # rm -f unzipfx-*/*.exe
  88. # Testing:
  89. echo "export WINEPREFIX=~/.winepy3"
  90. echo "wine $PYTHON_EXE ../../source/carla.py"