From 61210804c640837b93969674d988e5805b56da92 Mon Sep 17 00:00:00 2001 From: falkTX Date: Tue, 29 Jul 2014 06:52:05 +0100 Subject: [PATCH] Some fixes for Windows builds --- data/windows/build-win32.sh | 92 +++++++++-------------------- data/windows/build-win64.sh | 92 +++++++++-------------------- data/windows/create-wineprefixes.sh | 2 + source/carla_patchbay.py | 2 +- source/carla_settings.py | 2 +- source/carla_shared.py | 2 +- source/carla_style.py | 8 ++- source/utils/CarlaThread.hpp | 10 ++-- 8 files changed, 72 insertions(+), 138 deletions(-) diff --git a/data/windows/build-win32.sh b/data/windows/build-win32.sh index 8551fcaec..c31128ab9 100755 --- a/data/windows/build-win32.sh +++ b/data/windows/build-win32.sh @@ -23,35 +23,31 @@ export UIC=$MINGW-uic export STRIP=$MINGW-strip export WINDRES=$MINGW-windres -export CFLAGS="-DPTW32_STATIC_LIB -I$MINGW_PATH/include" -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_x86 -export PYTHON_EXE="C:\\\\Python33\\\\python.exe" +export PYTHON_EXE="C:\\\\Python34\\\\python.exe" -export CXFREEZE="wine $PYTHON_EXE C:\\\\Python33\\\\Scripts\\\\cxfreeze" +export CXFREEZE="wine $PYTHON_EXE C:\\\\Python34\\\\Scripts\\\\cxfreeze" export PYUIC="wine $PYTHON_EXE -m PyQt5.uic.pyuic" -export PYRCC="wine C:\\\\Python33\\\\Lib\\\\site-packages\\\\PyQt5\\\\pyrcc5.exe" +export PYRCC="wine C:\\\\Python34\\\\Lib\\\\site-packages\\\\PyQt5\\\\pyrcc5.exe" + +export DEFAULT_QT=5 # Clean build make clean # Build PyQt5 resources -make source/carla_config.py -sed "s/config_UseQt5 = False/config_UseQt5 = True/" -i source/carla_config.py make $JOBS UI RES WIDGETS # Build discovery -make $JOBS discovery EXTRA_LIBS="$EXTRA_LIBS" -mv source/discovery/carla-discovery-native.exe source/discovery/carla-discovery-win32.exe +make $JOBS discovery +mv bin/carla-discovery-native.exe bin/carla-discovery-win32.exe # Build backend -make $JOBS backend EXTRA_LIBS="$EXTRA_LIBS" +make $JOBS backend # Build Plugin bridges -# make $JOBS bridges EXTRA_LIBS="$EXTRA_LIBS" +# make $JOBS bridges # Build UI bridges # make $JOBS -C source/bridges ui_lv2-win32 ui_vst-hwnd @@ -61,67 +57,35 @@ cp ./source/carla ./source/carla.pyw $CXFREEZE --include-modules=subprocess,inspect --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 --include-modules=subprocess,inspect --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 - -# rm -f Carla/imageformats/*.so - -cp $WINEPREFIX/drive_c/Python33/python33.dll Carla/ -cp $WINEPREFIX/drive_c/Python33/Lib/site-packages/PyQt5/libEGL.dll Carla/ -cp $WINEPREFIX/drive_c/Python33/Lib/site-packages/PyQt5/libGLESv2.dll Carla/ -cp $WINEPREFIX/drive_c/Python33/Lib/site-packages/PyQt5/icuin49.dll Carla/ -cp $WINEPREFIX/drive_c/Python33/Lib/site-packages/PyQt5/icuuc49.dll Carla/ -cp $WINEPREFIX/drive_c/Python33/Lib/site-packages/PyQt5/icudt49.dll Carla/ -cp $WINEPREFIX/drive_c/Python33/Lib/site-packages/PyQt5/Qt5Core.dll Carla/ -cp $WINEPREFIX/drive_c/Python33/Lib/site-packages/PyQt5/Qt5Gui.dll Carla/ -cp $WINEPREFIX/drive_c/Python33/Lib/site-packages/PyQt5/Qt5Widgets.dll Carla/ -cp $WINEPREFIX/drive_c/Python33/Lib/site-packages/PyQt5/Qt5OpenGL.dll Carla/ -cp $WINEPREFIX/drive_c/Python33/Lib/site-packages/PyQt5/Qt5PrintSupport.dll Carla/ -cp $WINEPREFIX/drive_c/Python33/Lib/site-packages/PyQt5/Qt5Svg.dll Carla/ -cp -r $WINEPREFIX/drive_c/Python33/Lib/site-packages/PyQt5/plugins/imageformats/ Carla/ -cp -r $WINEPREFIX/drive_c/Python33/Lib/site-packages/PyQt5/plugins/iconengines/ Carla/ -cp -r $WINEPREFIX/drive_c/Python33/Lib/site-packages/PyQt5/plugins/platforms/ Carla/ - -# cp $WINEPREFIX/drive_c/Python33/python33.dll CarlaControl/ -# cp $WINEPREFIX/drive_c/Python33/Lib/site-packages/PyQt5/libEGL.dll CarlaControl/ -# cp $WINEPREFIX/drive_c/Python33/Lib/site-packages/PyQt5/libGLESv2.dll CarlaControl/ -# cp $WINEPREFIX/drive_c/Python33/Lib/site-packages/PyQt5/icuin49.dll CarlaControl/ -# cp $WINEPREFIX/drive_c/Python33/Lib/site-packages/PyQt5/icuuc49.dll CarlaControl/ -# cp $WINEPREFIX/drive_c/Python33/Lib/site-packages/PyQt5/icudt49.dll CarlaControl/ -# cp $WINEPREFIX/drive_c/Python33/Lib/site-packages/PyQt5/Qt5Core.dll CarlaControl/ -# cp $WINEPREFIX/drive_c/Python33/Lib/site-packages/PyQt5/Qt5Gui.dll CarlaControl/ -# cp $WINEPREFIX/drive_c/Python33/Lib/site-packages/PyQt5/Qt5Widgets.dll CarlaControl/ -# cp $WINEPREFIX/drive_c/Python33/Lib/site-packages/PyQt5/Qt5OpenGL.dll CarlaControl/ -# cp $WINEPREFIX/drive_c/Python33/Lib/site-packages/PyQt5/Qt5PrintSupport.dll CarlaControl/ -# cp $WINEPREFIX/drive_c/Python33/Lib/site-packages/PyQt5/Qt5Svg.dll CarlaControl/ -# cp -r $WINEPREFIX/drive_c/Python33/Lib/site-packages/PyQt5/plugins/imageformats/ CarlaControl/ -# cp -r $WINEPREFIX/drive_c/Python33/Lib/site-packages/PyQt5/plugins/iconengines/ CarlaControl/ -# cp -r $WINEPREFIX/drive_c/Python33/Lib/site-packages/PyQt5/plugins/platforms/ CarlaControl/ +cd data/windows/ +cp ../../bin/*.dll Carla/ +cp ../../bin/*.exe Carla/ + +rm -f Carla/PyQt5.Qsci.pyd Carla/PyQt5.QtNetwork.pyd Carla/PyQt5.QtSql.pyd Carla/PyQt5.QtTest.pyd + +cp $WINEPREFIX/drive_c/Python34/python34.dll Carla/ +cp $WINEPREFIX/drive_c/Python34/Lib/site-packages/PyQt5/icudt49.dll Carla/ +cp $WINEPREFIX/drive_c/Python34/Lib/site-packages/PyQt5/icuin49.dll Carla/ +cp $WINEPREFIX/drive_c/Python34/Lib/site-packages/PyQt5/icuuc49.dll Carla/ +cp $WINEPREFIX/drive_c/Python34/Lib/site-packages/PyQt5/libEGL.dll Carla/ +cp $WINEPREFIX/drive_c/Python34/Lib/site-packages/PyQt5/libGLESv2.dll Carla/ +cp $WINEPREFIX/drive_c/Python34/Lib/site-packages/PyQt5/Qt5Core.dll Carla/ +cp $WINEPREFIX/drive_c/Python34/Lib/site-packages/PyQt5/Qt5Gui.dll Carla/ +cp $WINEPREFIX/drive_c/Python34/Lib/site-packages/PyQt5/Qt5Widgets.dll Carla/ +cp $WINEPREFIX/drive_c/Python34/Lib/site-packages/PyQt5/Qt5OpenGL.dll Carla/ +cp $WINEPREFIX/drive_c/Python34/Lib/site-packages/PyQt5/Qt5PrintSupport.dll Carla/ +cp $WINEPREFIX/drive_c/Python34/Lib/site-packages/PyQt5/Qt5Svg.dll Carla/ # 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 @@ -133,4 +97,4 @@ cd ../.. # Testing: echo "export WINEPREFIX=~/.winepy3_x86" -echo "wine $PYTHON_EXE ./source/carla -platformpluginpath \"C:\\\\Python33\\\\Lib\\\\site-packages\\\\PyQt5\\\\plugins\\\\platforms\"" +echo "wine $PYTHON_EXE ./source/carla -platformpluginpath \"C:\\\\Python34\\\\Lib\\\\site-packages\\\\PyQt5\\\\plugins\\\\platforms\"" diff --git a/data/windows/build-win64.sh b/data/windows/build-win64.sh index 880f9a9eb..bdd66001d 100755 --- a/data/windows/build-win64.sh +++ b/data/windows/build-win64.sh @@ -24,35 +24,31 @@ export UIC=$MINGW-uic export STRIP=$MINGW-strip export WINDRES=$MINGW-windres -export CFLAGS="-DPTW32_STATIC_LIB -I$MINGW_PATH/include" -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=win64 export WINEPREFIX=~/.winepy3_x64 -export PYTHON_EXE="C:\\\\Python33\\\\python.exe" +export PYTHON_EXE="C:\\\\Python34\\\\python.exe" -export CXFREEZE="wine $PYTHON_EXE C:\\\\Python33\\\\Scripts\\\\cxfreeze" +export CXFREEZE="wine $PYTHON_EXE C:\\\\Python34\\\\Scripts\\\\cxfreeze" export PYUIC="wine $PYTHON_EXE -m PyQt5.uic.pyuic" -export PYRCC="wine C:\\\\Python33\\\\Lib\\\\site-packages\\\\PyQt5\\\\pyrcc5.exe" +export PYRCC="wine C:\\\\Python34\\\\Lib\\\\site-packages\\\\PyQt5\\\\pyrcc5.exe" + +export DEFAULT_QT=5 # Clean build make clean # Build PyQt5 resources -make source/carla_config.py -sed "s/config_UseQt5 = False/config_UseQt5 = True/" -i source/carla_config.py make $JOBS UI RES WIDGETS # Build discovery -make $JOBS discovery EXTRA_LIBS="$EXTRA_LIBS" -mv source/discovery/carla-discovery-native.exe source/discovery/carla-discovery-win64.exe +make $JOBS discovery +mv bin/carla-discovery-native.exe bin/carla-discovery-win64.exe # Build backend -make $JOBS backend EXTRA_LIBS="$EXTRA_LIBS" +make $JOBS backend # Build Plugin bridges -# make $JOBS bridges EXTRA_LIBS="$EXTRA_LIBS" +# make $JOBS bridges # Build UI bridges # make $JOBS -C source/bridges ui_lv2-win32 ui_vst-hwnd @@ -62,67 +58,35 @@ cp ./source/carla ./source/carla.pyw $CXFREEZE --include-modules=subprocess,inspect --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 --include-modules=subprocess,inspect --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 - -# rm -f Carla/imageformats/*.so - -cp $WINEPREFIX/drive_c/Python33/python33.dll Carla/ -cp $WINEPREFIX/drive_c/Python33/Lib/site-packages/PyQt5/libEGL.dll Carla/ -cp $WINEPREFIX/drive_c/Python33/Lib/site-packages/PyQt5/libGLESv2.dll Carla/ -cp $WINEPREFIX/drive_c/Python33/Lib/site-packages/PyQt5/icuin49.dll Carla/ -cp $WINEPREFIX/drive_c/Python33/Lib/site-packages/PyQt5/icuuc49.dll Carla/ -cp $WINEPREFIX/drive_c/Python33/Lib/site-packages/PyQt5/icudt49.dll Carla/ -cp $WINEPREFIX/drive_c/Python33/Lib/site-packages/PyQt5/Qt5Core.dll Carla/ -cp $WINEPREFIX/drive_c/Python33/Lib/site-packages/PyQt5/Qt5Gui.dll Carla/ -cp $WINEPREFIX/drive_c/Python33/Lib/site-packages/PyQt5/Qt5Widgets.dll Carla/ -cp $WINEPREFIX/drive_c/Python33/Lib/site-packages/PyQt5/Qt5OpenGL.dll Carla/ -cp $WINEPREFIX/drive_c/Python33/Lib/site-packages/PyQt5/Qt5PrintSupport.dll Carla/ -cp $WINEPREFIX/drive_c/Python33/Lib/site-packages/PyQt5/Qt5Svg.dll Carla/ -cp -r $WINEPREFIX/drive_c/Python33/Lib/site-packages/PyQt5/plugins/imageformats/ Carla/ -cp -r $WINEPREFIX/drive_c/Python33/Lib/site-packages/PyQt5/plugins/iconengines/ Carla/ -cp -r $WINEPREFIX/drive_c/Python33/Lib/site-packages/PyQt5/plugins/platforms/ Carla/ - -# cp $WINEPREFIX/drive_c/Python33/python33.dll CarlaControl/ -# cp $WINEPREFIX/drive_c/Python33/Lib/site-packages/PyQt5/libEGL.dll CarlaControl/ -# cp $WINEPREFIX/drive_c/Python33/Lib/site-packages/PyQt5/libGLESv2.dll CarlaControl/ -# cp $WINEPREFIX/drive_c/Python33/Lib/site-packages/PyQt5/icuin49.dll CarlaControl/ -# cp $WINEPREFIX/drive_c/Python33/Lib/site-packages/PyQt5/icuuc49.dll CarlaControl/ -# cp $WINEPREFIX/drive_c/Python33/Lib/site-packages/PyQt5/icudt49.dll CarlaControl/ -# cp $WINEPREFIX/drive_c/Python33/Lib/site-packages/PyQt5/Qt5Core.dll CarlaControl/ -# cp $WINEPREFIX/drive_c/Python33/Lib/site-packages/PyQt5/Qt5Gui.dll CarlaControl/ -# cp $WINEPREFIX/drive_c/Python33/Lib/site-packages/PyQt5/Qt5Widgets.dll CarlaControl/ -# cp $WINEPREFIX/drive_c/Python33/Lib/site-packages/PyQt5/Qt5OpenGL.dll CarlaControl/ -# cp $WINEPREFIX/drive_c/Python33/Lib/site-packages/PyQt5/Qt5PrintSupport.dll CarlaControl/ -# cp $WINEPREFIX/drive_c/Python33/Lib/site-packages/PyQt5/Qt5Svg.dll CarlaControl/ -# cp -r $WINEPREFIX/drive_c/Python33/Lib/site-packages/PyQt5/plugins/imageformats/ CarlaControl/ -# cp -r $WINEPREFIX/drive_c/Python33/Lib/site-packages/PyQt5/plugins/iconengines/ CarlaControl/ -# cp -r $WINEPREFIX/drive_c/Python33/Lib/site-packages/PyQt5/plugins/platforms/ CarlaControl/ +cd data/windows/ +cp ../../bin/*.dll Carla/ +cp ../../bin/*.exe Carla/ + +rm -f Carla/PyQt5.Qsci.pyd Carla/PyQt5.QtNetwork.pyd Carla/PyQt5.QtSql.pyd Carla/PyQt5.QtTest.pyd + +cp $WINEPREFIX/drive_c/Python34/python34.dll Carla/ +cp $WINEPREFIX/drive_c/Python34/Lib/site-packages/PyQt5/icudt49.dll Carla/ +cp $WINEPREFIX/drive_c/Python34/Lib/site-packages/PyQt5/icuin49.dll Carla/ +cp $WINEPREFIX/drive_c/Python34/Lib/site-packages/PyQt5/icuuc49.dll Carla/ +cp $WINEPREFIX/drive_c/Python34/Lib/site-packages/PyQt5/libEGL.dll Carla/ +cp $WINEPREFIX/drive_c/Python34/Lib/site-packages/PyQt5/libGLESv2.dll Carla/ +cp $WINEPREFIX/drive_c/Python34/Lib/site-packages/PyQt5/Qt5Core.dll Carla/ +cp $WINEPREFIX/drive_c/Python34/Lib/site-packages/PyQt5/Qt5Gui.dll Carla/ +cp $WINEPREFIX/drive_c/Python34/Lib/site-packages/PyQt5/Qt5Widgets.dll Carla/ +cp $WINEPREFIX/drive_c/Python34/Lib/site-packages/PyQt5/Qt5OpenGL.dll Carla/ +cp $WINEPREFIX/drive_c/Python34/Lib/site-packages/PyQt5/Qt5PrintSupport.dll Carla/ +cp $WINEPREFIX/drive_c/Python34/Lib/site-packages/PyQt5/Qt5Svg.dll Carla/ # 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 @@ -134,4 +98,4 @@ cd ../.. # Testing: echo "export WINEPREFIX=~/.winepy3_x64" -echo "wine $PYTHON_EXE ./source/carla -platformpluginpath \"C:\\\\Python33\\\\Lib\\\\site-packages\\\\PyQt5\\\\plugins\\\\platforms\"" +echo "wine $PYTHON_EXE ./source/carla -platformpluginpath \"C:\\\\Python34\\\\Lib\\\\site-packages\\\\PyQt5\\\\plugins\\\\platforms\"" diff --git a/data/windows/create-wineprefixes.sh b/data/windows/create-wineprefixes.sh index ccae5f650..dfcf71f26 100755 --- a/data/windows/create-wineprefixes.sh +++ b/data/windows/create-wineprefixes.sh @@ -8,6 +8,7 @@ export WINEARCH=win32 export WINEPREFIX=~/.winepy3_x86 wineboot regsvr32 wineasio.dll +winetricks vcrun2010 winetricks corefonts winetricks fontsmooth=rgb @@ -22,6 +23,7 @@ export WINEPREFIX=~/.winepy3_x64 wineboot regsvr32 wineasio.dll wine64 regsvr32 wineasio.dll +winetricks vcrun2010 winetricks corefonts winetricks fontsmooth=rgb diff --git a/source/carla_patchbay.py b/source/carla_patchbay.py index 14d66e1ca..98014cd2d 100644 --- a/source/carla_patchbay.py +++ b/source/carla_patchbay.py @@ -189,7 +189,7 @@ class CarlaPatchbayW(QFrame): self.fPeaksIn.setVisible(showMeters) self.fPeaksOut.setVisible(showMeters) - showKeyboard = settings.value("ShowKeyboard", True, type=bool) + showKeyboard = settings.value("ShowKeyboard", not(MACOS or WINDOWS), type=bool) self.fParent.ui.act_settings_show_keyboard.setChecked(showKeyboard) self.fKeys.setVisible(showKeyboard) diff --git a/source/carla_settings.py b/source/carla_settings.py index 251ef0384..2eaf038f9 100755 --- a/source/carla_settings.py +++ b/source/carla_settings.py @@ -283,7 +283,7 @@ class CarlaSettingsW(QDialog): if gCarla.isPlugin: self.ui.lw_page.hideRow(self.TAB_INDEX_PATHS) - if WINDOWS: + if WINDOWS and not config_UseQt5: self.ui.group_main_theme.setEnabled(False) self.ui.ch_main_theme_pro.setChecked(False) diff --git a/source/carla_shared.py b/source/carla_shared.py index d15a88dcd..055eef4b0 100644 --- a/source/carla_shared.py +++ b/source/carla_shared.py @@ -535,7 +535,7 @@ def initHost(initName, libPrefix = None, failError = True): elif CWDl.endswith("source"): gCarla.pathBinaries = os.path.abspath(os.path.join(CWD, "..", "bin")) - elif CWDl.endswith("bin"): + elif CWDl.endswith("bin") or os.path.isfile(sys.path[0]): gCarla.pathBinaries = CWD # ------------------------------------------------------------- diff --git a/source/carla_style.py b/source/carla_style.py index c5c8b812c..da9488da9 100644 --- a/source/carla_style.py +++ b/source/carla_style.py @@ -54,7 +54,7 @@ class CarlaApplication(object): elif CWDl.endswith("resources"): if CWDl.endswith("native-plugins%sresources" % os.sep): stylesDir = os.path.abspath(os.path.join(CWD, "..", "..", "..", "..", "bin")) - elif "carla-native.lv2" in sys.argv[0]: + elif "carla-native.lv2" in sys.argv[0].lower(): stylesDir = os.path.abspath(os.path.join(CWD, "..", "..", "..", "lib", "lv2", "carla-native.lv2")) else: stylesDir = os.path.abspath(os.path.join(CWD, "..", "..", "..", "lib", "carla")) @@ -62,7 +62,7 @@ class CarlaApplication(object): elif CWDl.endswith("source"): stylesDir = os.path.abspath(os.path.join(CWD, "..", "bin")) - if stylesDir: + if stylesDir and os.path.exists(stylesDir): QApplication.addLibraryPath(stylesDir) elif not config_UseQt5: @@ -91,6 +91,10 @@ class CarlaApplication(object): QApplication.setDesktopSettingsAware(False) QApplication.setFont(customFont) + # fix Qt5 not finding plarform dir on Windows + if WINDOWS: + QApplication.addLibraryPath(CWD) + # set style QApplication.setStyle("carla" if stylesDir else "fusion") diff --git a/source/utils/CarlaThread.hpp b/source/utils/CarlaThread.hpp index 858aa9ec9..e6522b0ca 100644 --- a/source/utils/CarlaThread.hpp +++ b/source/utils/CarlaThread.hpp @@ -66,7 +66,7 @@ public: */ bool isThreadRunning() const noexcept { -#ifdef CARLA_OS_WIN +#ifdef PTW32_DLLPORT return (fHandle.p != nullptr); #else return (fHandle != 0); @@ -97,7 +97,7 @@ public: if (pthread_create(&handle, nullptr, _entryPoint, this) == 0) { -#ifdef CARLA_OS_WIN +#ifdef PTW32_DLLPORT CARLA_SAFE_ASSERT_RETURN(handle.p != nullptr, false); #else CARLA_SAFE_ASSERT_RETURN(handle != 0, false); @@ -215,7 +215,7 @@ private: */ void _init() noexcept { -#ifdef CARLA_OS_WIN +#ifdef PTW32_DLLPORT fHandle.p = nullptr; fHandle.x = 0; #else @@ -228,7 +228,7 @@ private: */ void _copyFrom(const pthread_t& handle) noexcept { -#ifdef CARLA_OS_WIN +#ifdef PTW32_DLLPORT fHandle.p = handle.p; fHandle.x = handle.x; #else @@ -241,7 +241,7 @@ private: */ void _copyTo(volatile pthread_t& handle) const noexcept { -#ifdef CARLA_OS_WIN +#ifdef PTW32_DLLPORT handle.p = fHandle.p; handle.x = fHandle.x; #else