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-win64.sh 4.4KB

10 years ago
10 years ago
8 years ago
10 years ago
10 years ago
10 years ago
10 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  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 -lgig -lsndfile -lFLAC -lvorbisenc -lvorbis -logg -lm -lrpcrt4
  6. set -e
  7. MINGW=x86_64-w64-mingw32
  8. MINGW_PATH=/opt/mingw64
  9. JOBS="-j 8"
  10. if [ ! -f Makefile ]; then
  11. cd ../..
  12. fi
  13. export WIN32=true
  14. export WIN64=true
  15. export PATH=$MINGW_PATH/bin:$MINGW_PATH/$MINGW/bin:$PATH
  16. export CC=$MINGW-gcc
  17. export CXX=$MINGW-g++
  18. export WINDRES=$MINGW-windres
  19. export CFLAGS="-DBUILDING_CARLA_FOR_WINDOWS -DPTW32_STATIC_LIB"
  20. export CXXFLAGS="$CFLAGS -DFLUIDSYNTH_NOT_A_DLL"
  21. unset CPPFLAGS
  22. unset LDFLAGS
  23. export WINEARCH=win64
  24. export WINEPREFIX=~/.winepy3_x64
  25. export PYTHON_EXE="wine C:\\\\Python34\\\\python.exe"
  26. export CXFREEZE="$PYTHON_EXE C:\\\\Python34\\\\Scripts\\\\cxfreeze"
  27. export PYUIC="$PYTHON_EXE -m PyQt5.uic.pyuic"
  28. export PYRCC="wine C:\\\\Python34\\\\Lib\\\\site-packages\\\\PyQt5\\\\pyrcc5.exe"
  29. export DEFAULT_QT=5
  30. make BUILDING_FOR_WINDOWS=true $JOBS
  31. make BUILDING_FOR_WINDOWS=true LDFLAGS="-L/opt/mingw32/lib -L/opt/mingw32/i686-w64-mingw32/lib" win32 $JOBS
  32. export PYTHONPATH=`pwd`/source
  33. rm -rf ./data/windows/Carla
  34. mkdir -p ./data/windows/Carla/Debug
  35. cp ./source/carla ./source/Carla.pyw
  36. $PYTHON_EXE ./data/windows/app-console.py build_exe
  37. mv ./data/windows/Carla/carla.exe ./data/windows/Carla/Debug/Carla.exe
  38. $PYTHON_EXE ./data/windows/app-gui.py build_exe
  39. rm -f ./source/Carla.pyw
  40. cd data/windows/
  41. rm -rf dist
  42. $CXFREEZE ../../bin/resources/bigmeter-ui
  43. $CXFREEZE ../../bin/resources/midipattern-ui
  44. $CXFREEZE ../../bin/resources/notes-ui
  45. $CXFREEZE ../../bin/resources/carla-plugin
  46. $CXFREEZE ../../bin/resources/carla-plugin-patchbay
  47. cp ../../bin/*.dll Carla/
  48. cp ../../bin/*.exe Carla/
  49. rm Carla/carla-bridge-lv2-windows.exe
  50. rm Carla/carla-discovery-native.exe
  51. rm Carla/carla-lv2-export.exe
  52. rm -f Carla/PyQt5.Qsci.pyd Carla/PyQt5.QtNetwork.pyd Carla/PyQt5.QtSql.pyd Carla/PyQt5.QtTest.pyd Carla/PyQt5.QtXml.pyd
  53. rm -f dist/PyQt5.Qsci.pyd dist/PyQt5.QtNetwork.pyd dist/PyQt5.QtSql.pyd dist/PyQt5.QtTest.pyd dist/PyQt5.QtXml.pyd
  54. cp $WINEPREFIX/drive_c/Python34/python34.dll Carla/
  55. cp $WINEPREFIX/drive_c/Python34/Lib/site-packages/PyQt5/icu*.dll Carla/
  56. cp $WINEPREFIX/drive_c/Python34/Lib/site-packages/PyQt5/libEGL.dll Carla/
  57. cp $WINEPREFIX/drive_c/Python34/Lib/site-packages/PyQt5/libGLESv2.dll Carla/
  58. cp $WINEPREFIX/drive_c/Python34/Lib/site-packages/PyQt5/Qt5Core.dll Carla/
  59. cp $WINEPREFIX/drive_c/Python34/Lib/site-packages/PyQt5/Qt5Gui.dll Carla/
  60. cp $WINEPREFIX/drive_c/Python34/Lib/site-packages/PyQt5/Qt5Widgets.dll Carla/
  61. cp $WINEPREFIX/drive_c/Python34/Lib/site-packages/PyQt5/Qt5OpenGL.dll Carla/
  62. cp $WINEPREFIX/drive_c/Python34/Lib/site-packages/PyQt5/Qt5Svg.dll Carla/
  63. mv dist Carla/resources
  64. cp $WINEPREFIX/drive_c/Python34/python34.dll Carla/resources/
  65. cp $WINEPREFIX/drive_c/Python34/Lib/site-packages/PyQt5/icu*.dll Carla/resources/
  66. cp $WINEPREFIX/drive_c/Python34/Lib/site-packages/PyQt5/libEGL.dll Carla/resources/
  67. cp $WINEPREFIX/drive_c/Python34/Lib/site-packages/PyQt5/libGLESv2.dll Carla/resources/
  68. cp $WINEPREFIX/drive_c/Python34/Lib/site-packages/PyQt5/Qt5Core.dll Carla/resources/
  69. cp $WINEPREFIX/drive_c/Python34/Lib/site-packages/PyQt5/Qt5Gui.dll Carla/resources/
  70. cp $WINEPREFIX/drive_c/Python34/Lib/site-packages/PyQt5/Qt5Widgets.dll Carla/resources/
  71. cp $WINEPREFIX/drive_c/Python34/Lib/site-packages/PyQt5/Qt5OpenGL.dll Carla/resources/
  72. cp $WINEPREFIX/drive_c/Python34/Lib/site-packages/PyQt5/Qt5Svg.dll Carla/resources/
  73. # Build unzipfx
  74. make -C unzipfx-carla -f Makefile.win32 clean
  75. make -C unzipfx-carla -f Makefile.win32
  76. # Create zip of Carla
  77. rm -f Carla.zip CarlaControl.zip
  78. zip -r -9 Carla.zip Carla
  79. # Create static build
  80. rm -f Carla.exe CarlaControl.exe
  81. cat unzipfx-carla/unzipfx2cat.exe Carla.zip > Carla.exe
  82. chmod +x Carla.exe
  83. # Cleanup
  84. rm -f Carla.zip CarlaControl.zip
  85. # Create release zip
  86. rm -rf Carla-2.0beta5-win64
  87. mkdir Carla-2.0beta5-win64
  88. mkdir Carla-2.0beta5-win64/vcredist
  89. cp Carla.exe README.txt Carla-2.0beta5-win64
  90. cp ~/.cache/winetricks/vcrun2010/vcredist_x64.exe Carla-2.0beta5-win64/vcredist
  91. zip -r -9 Carla-2.0beta5-win64.zip Carla-2.0beta5-win64
  92. cd ../..
  93. # Testing:
  94. echo "export WINEPREFIX=~/.winepy3_x64"
  95. echo "$PYTHON_EXE ./source/carla"