From 936a4604db2fa550b621403025c2d7a8b79d632f Mon Sep 17 00:00:00 2001 From: falkTX Date: Tue, 1 Apr 2014 15:48:09 +0100 Subject: [PATCH] Windows build will use Qt5 --- data/windows/build-win32.sh | 100 ++++++++++++++-------------- data/windows/create-wineprefixes.sh | 20 ++++++ source/carla_style.py | 2 +- 3 files changed, 71 insertions(+), 51 deletions(-) create mode 100755 data/windows/create-wineprefixes.sh diff --git a/data/windows/build-win32.sh b/data/windows/build-win32.sh index 214e55b66..5a3804b41 100755 --- a/data/windows/build-win32.sh +++ b/data/windows/build-win32.sh @@ -28,15 +28,15 @@ export CXXFLAGS="-DPTW32_STATIC_LIB -DFLUIDSYNTH_NOT_A_DLL -I$MINGW_PATH/include export EXTRA_LIBS="-lglib-2.0 -lgthread-2.0 -lgig -lsndfile -lFLAC -lvorbisenc -lvorbis -logg -ldsound -lole32 -lrpcrt4 -lws2_32 -lwinmm" export WINEARCH=win32 -export WINEPREFIX=~/.winepy3 +export WINEPREFIX=~/.winepy3_x86 export PYTHON_EXE="C:\\\\Python33\\\\python.exe" export CXFREEZE="wine $PYTHON_EXE C:\\\\Python33\\\\Scripts\\\\cxfreeze" -export PYUIC="wine $PYTHON_EXE C:\\\\Python33\\\\Lib\\\\site-packages\\\\PyQt4\\\\uic\\\\pyuic.py" -export PYRCC="wine C:\\\\Python33\\\\Lib\\\\site-packages\\\\PyQt4\\\\pyrcc4.exe -py3" +export PYUIC="wine $PYTHON_EXE -m PyQt5.uic.pyuic" +export PYRCC="wine C:\\\\Python33\\\\Lib\\\\site-packages\\\\PyQt5\\\\pyrcc5.exe" # Clean build -make clean +# make clean # Build PyQt4 resources make $JOBS UI RES WIDGETS @@ -54,32 +54,32 @@ make $JOBS backend EXTRA_LIBS="$EXTRA_LIBS" # Build UI bridges # make $JOBS -C source/bridges ui_lv2-win32 ui_vst-hwnd -rm -rf ./data/windows/Carla -cp ./source/carla ./source/carla.pyw -$CXFREEZE --target-dir=".\\data\\windows\\Carla" ".\\source\\carla.pyw" -rm -f ./source/carla.pyw - -# rm -rf ./data/windows/CarlaControl -# cp ./source/carla_control.py ./source/carla_control.pyw -# $CXFREEZE --target-dir=".\\data\\windows\\CarlaControl" ".\\source\\carla_control.pyw" -# rm -f ./source/carla_control.pyw - -cd data/windows -mkdir Carla/backend -mkdir Carla/bridges -mkdir Carla/discovery -cp ../../source/backend/*.dll Carla/backend/ -cp ../../source/discovery/*.exe Carla/discovery/ -# mv CarlaControl/carla_control.exe CarlaControl/CarlaControl.exe - -cp $WINEPREFIX/drive_c/windows/system32/python33.dll Carla/ -cp $WINEPREFIX/drive_c/Python33/Lib/site-packages/PyQt4/QtCore4.dll Carla/ -cp $WINEPREFIX/drive_c/Python33/Lib/site-packages/PyQt4/QtGui4.dll Carla/ -cp $WINEPREFIX/drive_c/Python33/Lib/site-packages/PyQt4/QtOpenGL4.dll Carla/ -cp $WINEPREFIX/drive_c/Python33/Lib/site-packages/PyQt4/QtSvg4.dll Carla/ -cp $WINEPREFIX/drive_c/Python33/Lib/site-packages/PyQt4/QtXml4.dll Carla/ -cp -r $WINEPREFIX/drive_c/Python33/Lib/site-packages/PyQt4/plugins/imageformats/ Carla/ -cp -r $WINEPREFIX/drive_c/Python33/Lib/site-packages/PyQt4/plugins/iconengines/ Carla/ +# rm -rf ./data/windows/Carla +# cp ./source/carla ./source/carla.pyw +# $CXFREEZE --target-dir=".\\data\\windows\\Carla" ".\\source\\carla.pyw" +# rm -f ./source/carla.pyw +# +# # rm -rf ./data/windows/CarlaControl +# # cp ./source/carla_control.py ./source/carla_control.pyw +# # $CXFREEZE --target-dir=".\\data\\windows\\CarlaControl" ".\\source\\carla_control.pyw" +# # rm -f ./source/carla_control.pyw + +# cd data/windows +# mkdir Carla/backend +# mkdir Carla/bridges +# mkdir Carla/discovery +# cp ../../source/backend/*.dll Carla/backend/ +# cp ../../source/discovery/*.exe Carla/discovery/ +# # mv CarlaControl/carla_control.exe CarlaControl/CarlaControl.exe +# +# cp $WINEPREFIX/drive_c/windows/system32/python33.dll Carla/ +# cp $WINEPREFIX/drive_c/Python33/Lib/site-packages/PyQt4/QtCore4.dll Carla/ +# cp $WINEPREFIX/drive_c/Python33/Lib/site-packages/PyQt4/QtGui4.dll Carla/ +# cp $WINEPREFIX/drive_c/Python33/Lib/site-packages/PyQt4/QtOpenGL4.dll Carla/ +# cp $WINEPREFIX/drive_c/Python33/Lib/site-packages/PyQt4/QtSvg4.dll Carla/ +# cp $WINEPREFIX/drive_c/Python33/Lib/site-packages/PyQt4/QtXml4.dll Carla/ +# cp -r $WINEPREFIX/drive_c/Python33/Lib/site-packages/PyQt4/plugins/imageformats/ Carla/ +# cp -r $WINEPREFIX/drive_c/Python33/Lib/site-packages/PyQt4/plugins/iconengines/ Carla/ # cp $WINEPREFIX/drive_c/windows/system32/python33.dll CarlaControl/ # cp $WINEPREFIX/drive_c/Python33/Lib/site-packages/PyQt4/QtCore4.dll CarlaControl/ @@ -87,27 +87,27 @@ cp -r $WINEPREFIX/drive_c/Python33/Lib/site-packages/PyQt4/plugins/iconengines/ # cp -r $WINEPREFIX/drive_c/Python33/Lib/site-packages/PyQt4/plugins/imageformats/ CarlaControl/ # cp -r $WINEPREFIX/drive_c/Python33/Lib/site-packages/PyQt4/plugins/iconengines/ CarlaControl/ -# Build unzipfx -make -C unzipfx-carla -f Makefile.win32 -# make -C unzipfx-carla-control -f Makefile.win32 - -# Create static build -rm -f Carla.zip CarlaControl.zip -zip -r -9 Carla.zip Carla -# zip -r -9 CarlaControl.zip CarlaControl - -rm -f Carla.exe CarlaControl.exe -cat unzipfx-carla/unzipfx2cat.exe Carla.zip > Carla.exe -# cat unzipfx-carla-control/unzipfx2cat.exe CarlaControl.zip > CarlaControl.exe -chmod +x Carla.exe -# chmod +x CarlaControl.exe +# # Build unzipfx +# make -C unzipfx-carla -f Makefile.win32 +# # make -C unzipfx-carla-control -f Makefile.win32 +# +# # Create static build +# rm -f Carla.zip CarlaControl.zip +# zip -r -9 Carla.zip Carla +# # zip -r -9 CarlaControl.zip CarlaControl +# +# rm -f Carla.exe CarlaControl.exe +# cat unzipfx-carla/unzipfx2cat.exe Carla.zip > Carla.exe +# # cat unzipfx-carla-control/unzipfx2cat.exe CarlaControl.zip > CarlaControl.exe +# chmod +x Carla.exe +# # chmod +x CarlaControl.exe # Cleanup -make -C unzipfx-carla -f Makefile.win32 clean -make -C unzipfx-carla-control -f Makefile.win32 clean -rm -f Carla.zip CarlaControl.zip -rm -f unzipfx-*/*.exe +# make -C unzipfx-carla -f Makefile.win32 clean +# make -C unzipfx-carla-control -f Makefile.win32 clean +# rm -f Carla.zip CarlaControl.zip +# rm -f unzipfx-*/*.exe # Testing: -echo "export WINEPREFIX=~/.winepy3" -echo "wine $PYTHON_EXE ../../source/carla.py" +echo "export WINEPREFIX=~/.winepy3_x86" +echo "wine $PYTHON_EXE ./source/carla -platformpluginpath \"C:\\\\Python33\\\\Lib\\\\site-packages\\\\PyQt5\\\\plugins\\\\platforms\"" diff --git a/data/windows/create-wineprefixes.sh b/data/windows/create-wineprefixes.sh new file mode 100755 index 000000000..0b4fcfdc9 --- /dev/null +++ b/data/windows/create-wineprefixes.sh @@ -0,0 +1,20 @@ +#!/bin/bash + +rm -rf ~/.winepy3 +rm -rf ~/.winepy3_x86 +rm -rf ~/.winepy3_x64 + +export WINEARCH=win32 +export WINEPREFIX=~/.winepy3_x86 +wineboot +regsv32 wineasio.dll +winetricks corefonts +winetricks fontsmooth=rgb + +export WINEARCH=win64 +export WINEPREFIX=~/.winepy3_x64 +wineboot +regsv32 wineasio.dll +wine64 regsv32 wineasio.dll +winetricks corefonts +winetricks fontsmooth=rgb diff --git a/source/carla_style.py b/source/carla_style.py index aa200a0d6..f2ef54e14 100644 --- a/source/carla_style.py +++ b/source/carla_style.py @@ -67,7 +67,7 @@ class CarlaApplication(object): settings = QSettings("falkTX", appName) useProTheme = settings.value(CARLA_KEY_MAIN_USE_PRO_THEME, True, type=bool) - if not useProTheme: + if WINDOWS or not useProTheme: self._createApp(appName) return