From cf0716b044729fe0b27ea1b78f4f5920c6406180 Mon Sep 17 00:00:00 2001 From: falkTX Date: Tue, 20 May 2014 22:52:15 +0100 Subject: [PATCH] Misc --- data/macos/build-deps.sh | 24 ++++++++++++------------ data/macos/build.sh | 3 +-- data/macos/env-vars.sh | 7 ++----- source/Makefile.mk | 4 ++-- source/carla | 2 +- source/carla_settings.py | 6 +++--- source/carla_shared.py | 4 ++-- source/carla_style.py | 2 +- source/patchcanvas.py | 14 +++++++------- 9 files changed, 31 insertions(+), 35 deletions(-) diff --git a/data/macos/build-deps.sh b/data/macos/build-deps.sh index c246a60d5..7678e0837 100755 --- a/data/macos/build-deps.sh +++ b/data/macos/build-deps.sh @@ -124,19 +124,19 @@ fi # qt5 if [ ! -d qtbase5-mac10.5 ]; then -git clone git://github.com/falkTX/qtbase5-mac10.5 --depth 1 +/opt/local/bin/git clone git://github.com/falkTX/qtbase5-mac10.5 --depth 1 fi if [ ! -f qtbase5-mac10.5/bin/moc ]; then cd qtbase5-mac10.5 export QMAKESPEC=macx-g++42 -./configure -release -static -opensource -confirm-license -force-pkg-config \ +./configure -release -shared -opensource -confirm-license -force-pkg-config \ -prefix /opt/kxstudio -plugindir /opt/kxstudio/lib/qt5/plugins -headerdir /opt/kxstudio/include/qt5 \ -qt-freetype -qt-libjpeg -qt-libpng -qt-pcre -qt-sql-sqlite -qt-zlib -opengl no -no-c++11 -no-framework -qpa cocoa \ -no-directfb -no-eglfs -no-kms -no-linuxfb -no-mtdev -no-xcb -no-xcb-xlib \ -no-sse3 -no-ssse3 -no-sse4.1 -no-sse4.2 -no-avx -no-avx2 -no-neon -no-mips_dsp -no-mips_dspr2 \ -no-cups -no-dbus -no-fontconfig -no-harfbuzz -no-iconv -no-icu -no-gif -no-glib -no-nis -no-openssl -no-pch -no-sql-ibase -no-sql-odbc \ - -no-audio-backend -no-javascript-jit -no-qml-debug -no-rpath -no-separate-debug-info \ + -no-audio-backend -no-javascript-jit -no-qml-debug -no-separate-debug-info \ -no-compile-examples -nomake examples -nomake tests -make libs -make tools make -j 2 sudo make install @@ -167,13 +167,13 @@ curl -L http://download.sourceforge.net/pyqt/sip-4.15.5.tar.gz -o sip-4.15.5.tar tar -xf sip-4.15.5.tar.gz fi -if [ ! -f sip-4.15.5/Makefile ]; then -cd sip-4.15.5 -python3 configure.py -make -sudo make install -cd .. -fi +# if [ ! -f sip-4.15.5/Makefile ]; then +# cd sip-4.15.5 +# python3 configure.py +# make +# sudo make install +# cd .. +# fi # ------------------------------------------------------------------------------------ # pyqt @@ -201,8 +201,8 @@ fi if [ ! -f PyQt-gpl-5.2.1/Makefile ]; then cd PyQt-gpl-5.2.1 -python3 configure.py -g --confirm-license -cp _qt/*.h qpy/QtCore/ +python3 configure.py --confirm-license +# cp _qt/*.h qpy/QtCore/ make sudo make install cd .. diff --git a/data/macos/build.sh b/data/macos/build.sh index 15ae4745f..8c57daab1 100755 --- a/data/macos/build.sh +++ b/data/macos/build.sh @@ -36,7 +36,6 @@ rm -rf ./data/macos/Carla cp ./source/carla ./source/carla.pyw # python3 ./data/macos/bundle.py bdist_mac --bundle-name=Carla $CXFREEZE --include-modules=re,sip,subprocess,inspect --target-dir=./data/macos/Carla ./source/carla.pyw -rm -rf ./data/macos/Carla/imageformats/ rm ./source/carla.pyw cd data/macos @@ -46,6 +45,6 @@ mkdir Carla/bridges mkdir Carla/discovery cp ../../source/backend/*.dylib Carla/backend/ cp ../../source/discovery/carla-discovery-* Carla/discovery/ -# cp -r ../../source/modules/theme/styles Carla/ +cp -r ../../source/modules/theme/styles Carla/ cd ../.. diff --git a/data/macos/env-vars.sh b/data/macos/env-vars.sh index 3f0619d66..981b2591b 100755 --- a/data/macos/env-vars.sh +++ b/data/macos/env-vars.sh @@ -1,11 +1,8 @@ #!/bin/bash export MACOS="true" -export CC="gcc-4.2" -export CXX="g++-4.2" +export CC="/opt/local/bin/clang" +export CXX="/opt/local/bin/clang++" export CXXFLAGS="-DMAC_OS_X_VERSION_MIN_REQUIRED=MAC_OS_X_VERSION_10_5 -DMAC_OS_X_VERSION_MAX_ALLOWED=MAC_OS_X_VERSION_10_5" export PATH=/opt/kxstudio/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin export PKG_CONFIG_PATH=/opt/kxstudio/lib/pkgconfig - -# export PYRCC="pyrcc4-3.3 -py3" -# export PYUIC="pyuic4-3.3 -w" diff --git a/source/Makefile.mk b/source/Makefile.mk index 18d135423..7b0338c70 100644 --- a/source/Makefile.mk +++ b/source/Makefile.mk @@ -115,8 +115,8 @@ CFLAGS += -isystem /opt/kxstudio/include CXXFLAGS += -isystem /opt/kxstudio/include -isystem /usr/include/qt4 endif ifeq ($(MACOS),true) -CFLAGS += -isystem /opt/local/include/ -CXXFLAGS += -isystem /opt/local/include/ +CFLAGS += -isystem /opt/kxstudio/include +CXXFLAGS += -isystem /opt/kxstudio/include -isystem /opt/kxstudio/include/qt5 endif ifeq ($(WIN32),true) CFLAGS += -isystem /opt/mingw32/include diff --git a/source/carla b/source/carla index f5830a47f..8a19b70f5 100755 --- a/source/carla +++ b/source/carla @@ -230,7 +230,7 @@ class CarlaHostW(HostWindow): self.fInfoLabel.setAlignment(Qt.AlignRight|Qt.AlignVCenter) self.fInfoLabel.setText("Engine stopped") - if MACOS: # TODO: check if NOT using pro theme + if MACOS and False: # TODO: check if NOT using pro theme self.fInfoLabel.hide() self.setUnifiedTitleAndToolBarOnMac(True) diff --git a/source/carla_settings.py b/source/carla_settings.py index dd6ce6da1..aa7cb9985 100755 --- a/source/carla_settings.py +++ b/source/carla_settings.py @@ -83,8 +83,8 @@ CARLA_DEFAULT_AUDIO_SAMPLE_RATE = 44100 if WINDOWS: CARLA_DEFAULT_AUDIO_DRIVER = "DirectSound" -elif MACOS: - CARLA_DEFAULT_AUDIO_DRIVER = "CoreAudio" +#elif MACOS: + #CARLA_DEFAULT_AUDIO_DRIVER = "CoreAudio" else: CARLA_DEFAULT_AUDIO_DRIVER = "JACK" @@ -284,7 +284,7 @@ class CarlaSettingsW(QDialog): if gCarla.isPlugin: self.ui.lw_page.hideRow(self.TAB_INDEX_PATHS) - if WINDOWS or MACOS: + if WINDOWS: 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 48aab0988..44dad96b8 100644 --- a/source/carla_shared.py +++ b/source/carla_shared.py @@ -482,9 +482,9 @@ else: CWD = sys.path[0] # make it work with cxfreeze -if WINDOWS and CWD.endswith(".exe"): +if WINDOWS and CWD.lower().endswith(".exe"): CWD = CWD.rsplit("\\", 1)[0] -elif CWD.endswith(("/carla", "/carla-plugin", "/carla-patchbay", "/carla-rack")): +elif CWD.lower().endswith(("/carla", "/carla-plugin", "/carla-patchbay", "/carla-rack")): CWD = CWD.rsplit("/", 1)[0] # find tool diff --git a/source/carla_style.py b/source/carla_style.py index e1c0398ed..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 WINDOWS or MACOS or not useProTheme: + if WINDOWS or not useProTheme: self._createApp(appName) return diff --git a/source/patchcanvas.py b/source/patchcanvas.py index 3ca32f2a0..4cc66d5fe 100644 --- a/source/patchcanvas.py +++ b/source/patchcanvas.py @@ -29,7 +29,7 @@ if config_UseQt5: from PyQt5.QtCore import QAbstractAnimation, QLineF, QPointF, QRectF, QSizeF, QSettings, QTimer from PyQt5.QtGui import QColor, QLinearGradient, QPen, QPolygonF, QPainter, QPainterPath from PyQt5.QtGui import QCursor, QFont, QFontMetrics - from PyQt5.QtSvg import QGraphicsSvgItem, QSvgRenderer + #from PyQt5.QtSvg import QGraphicsSvgItem, QSvgRenderer from PyQt5.QtWidgets import QGraphicsScene, QGraphicsItem, QGraphicsLineItem, QGraphicsPathItem from PyQt5.QtWidgets import QGraphicsColorizeEffect, QGraphicsDropShadowEffect from PyQt5.QtWidgets import QInputDialog, QLineEdit, QMenu @@ -2187,10 +2187,10 @@ class CanvasBox(QGraphicsItem): self.m_font_port.setWeight(canvas.theme.port_font_state) # Icon - if canvas.theme.box_use_icon: - self.icon_svg = CanvasIcon(icon, self.m_group_name, self) - else: - self.icon_svg = None + #if canvas.theme.box_use_icon: + #self.icon_svg = CanvasIcon(icon, self.m_group_name, self) + #else: + self.icon_svg = None # Shadow if options.eyecandy: @@ -2761,9 +2761,9 @@ class CanvasBox(QGraphicsItem): # ------------------------------------------------------------------------------ # canvasicon.cpp -class CanvasIcon(QGraphicsSvgItem): +class CanvasIcon(QGraphicsItem): def __init__(self, icon, name, parent): - QGraphicsSvgItem.__init__(self, parent) + QGraphicsItem.__init__(self, parent) self.m_renderer = None self.p_size = QRectF(0, 0, 0, 0)