Browse Source

Update makefile and py code to allow PyQt5 for the frontend

tags/1.9.4
falkTX 11 years ago
parent
commit
cee62b42e5
25 changed files with 345 additions and 96 deletions
  1. +55
    -25
      Makefile
  2. +17
    -7
      source/Makefile.mk
  3. +4
    -1
      source/backend/Makefile.mk
  4. +4
    -1
      source/bridges/Makefile
  5. +9
    -1
      source/carla
  6. +1
    -1
      source/carla-patchbay
  7. +12
    -3
      source/carla_database.py
  8. +12
    -2
      source/carla_host.py
  9. +13
    -2
      source/carla_patchbay.py
  10. +12
    -2
      source/carla_rack.py
  11. +14
    -4
      source/carla_settings.py
  12. +17
    -4
      source/carla_shared.py
  13. +12
    -2
      source/carla_skin.py
  14. +12
    -2
      source/carla_style.py
  15. +13
    -3
      source/carla_widgets.py
  16. +4
    -1
      source/discovery/Makefile
  17. +28
    -9
      source/patchcanvas.py
  18. +12
    -3
      source/patchcanvas_theme.py
  19. +13
    -3
      source/widgets/canvaspreviewframe.py
  20. +13
    -3
      source/widgets/digitalpeakmeter.py
  21. +13
    -3
      source/widgets/ledbutton.py
  22. +14
    -4
      source/widgets/paramspinbox.py
  23. +13
    -3
      source/widgets/pixmapbutton.py
  24. +15
    -4
      source/widgets/pixmapdial.py
  25. +13
    -3
      source/widgets/pixmapkeyboard.py

+ 55
- 25
Makefile View File

@@ -13,15 +13,25 @@ DESTDIR =


SED_PREFIX = $(shell echo $(PREFIX) | sed "s/\//\\\\\\\\\//g") SED_PREFIX = $(shell echo $(PREFIX) | sed "s/\//\\\\\\\\\//g")


LINK = ln -sf
LINK = ln -sf


ifneq ($(MACOS),true) ifneq ($(MACOS),true)
ifeq ($(DEFAULT_QT),5)
PYUIC ?= pyuic5
PYRCC ?= pyrcc5
else
PYUIC ?= pyuic4 -w PYUIC ?= pyuic4 -w
PYRCC ?= pyrcc4 -py3 PYRCC ?= pyrcc4 -py3
endif
else # MACOS
ifeq ($(DEFAULT_QT),5)
PYUIC ?= pyuic5-3.3
PYRCC ?= pyrcc5-3.3
else else
PYUIC ?= pyuic4-3.3 -w PYUIC ?= pyuic4-3.3 -w
PYRCC ?= pyrcc4-3.3 -py3 PYRCC ?= pyrcc4-3.3 -py3
endif endif
endif


# -------------------------------------------------------------- # --------------------------------------------------------------


@@ -85,11 +95,19 @@ wine64:
# -------------------------------------------------------------- # --------------------------------------------------------------
# Resources # Resources


RES = source/resources_rc.py
RES = source/carla_config.py source/resources_rc.py


RES: $(RES) RES: $(RES)


source/%_rc.py: resources/%.qrc resources/*/*.png resources/*/*.svg
source/carla_config.py:
@echo "#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n" > $@
ifeq ($(DEFAULT_QT),5)
@echo "config_UseQt5 = True" >> $@
else
@echo "config_UseQt5 = False" >> $@
endif

source/resources_rc.py: resources/resources.qrc resources/*/*.png resources/*/*.svg
$(PYRCC) $< -o $@ $(PYRCC) $< -o $@


# -------------------------------------------------------------- # --------------------------------------------------------------
@@ -311,7 +329,22 @@ uninstall:


# -------------------------------------------------------------- # --------------------------------------------------------------


ifneq ($(HAIKU),true)
USE_COLORS=true
USE_VST3=false

ifeq ($(HAIKU),true)
USE_COLORS=false
endif

ifeq ($(MACOS),true)
USE_VST3=true
endif

ifeq ($(WIN32),true)
USE_VST3=true
endif

ifeq ($(USE_COLORS),true)
ANS_NO=\033[31m NO \033[0m ANS_NO=\033[31m NO \033[0m
ANS_YES=\033[32m YES \033[0m ANS_YES=\033[32m YES \033[0m
mS=\033[33m[ mS=\033[33m[
@@ -363,6 +396,11 @@ ifeq ($(CARLA_PLUGIN_SUPPORT),true)
@echo "DSSI: $(ANS_YES)" @echo "DSSI: $(ANS_YES)"
@echo "LV2: $(ANS_YES)" @echo "LV2: $(ANS_YES)"
@echo "VST: $(ANS_YES)" @echo "VST: $(ANS_YES)"
ifeq ($(USE_VST3),true)
@echo "VST3: $(ANS_YES) $(mZ)MacOS only$(mE)"
else
@echo "VST3: $(ANS_NO) $(mZ)Windows and MacOS only$(mE)"
endif
ifeq ($(MACOS),true) ifeq ($(MACOS),true)
@echo "AU: $(ANS_YES)" @echo "AU: $(ANS_YES)"
else else
@@ -379,8 +417,7 @@ endif


ifeq ($(CARLA_PLUGIN_SUPPORT),true) ifeq ($(CARLA_PLUGIN_SUPPORT),true)
@echo "$(tS)---> LV2 UI toolkit support: $(tE)" @echo "$(tS)---> LV2 UI toolkit support: $(tE)"
@echo "External:$(ANS_YES) (direct+bridge)"
ifeq ($(LINUX),true)
# @echo "External:$(ANS_YES) (direct+bridge)"
ifeq ($(HAVE_GTK2),true) ifeq ($(HAVE_GTK2),true)
@echo "Gtk2: $(ANS_YES) (bridge)" @echo "Gtk2: $(ANS_YES) (bridge)"
else else
@@ -402,23 +439,16 @@ else
@echo "Qt5: $(ANS_NO) $(mS)Qt5 missing$(mE)" @echo "Qt5: $(ANS_NO) $(mS)Qt5 missing$(mE)"
endif endif
@echo "X11: $(ANS_YES) (direct+bridge)" @echo "X11: $(ANS_YES) (direct+bridge)"
else
@echo "Gtk2: $(ANS_NO) $(mZ)Linux only$(mE)"
@echo "Gtk3: $(ANS_NO) $(mZ)Linux only$(mE)"
@echo "Qt4: $(ANS_NO) $(mZ)Linux only$(mE)"
@echo "Qt5: $(ANS_NO) $(mZ)Linux only$(mE)"
@echo "X11: $(ANS_NO) $(mZ)Linux only$(mE)"
endif
ifeq ($(MACOS),true)
@echo "Cocoa: $(ANS_YES) (direct+bridge)"
else
@echo "Cocoa: $(ANS_NO) $(mZ)MacOS only$(mE)"
endif
ifeq ($(WIN32),true)
@echo "Windows: $(ANS_YES) (direct+bridge)"
else
@echo "Windows: $(ANS_NO) $(mZ)Windows only$(mE)"
endif
# ifeq ($(MACOS),true)
# @echo "Cocoa: $(ANS_YES) (direct+bridge)"
# else
# @echo "Cocoa: $(ANS_NO) $(mZ)MacOS only$(mE)"
# endif
# ifeq ($(WIN32),true)
# @echo "Windows: $(ANS_YES) (direct+bridge)"
# else
# @echo "Windows: $(ANS_NO) $(mZ)Windows only$(mE)"
# endif
@echo "" @echo ""
endif endif


@@ -456,7 +486,7 @@ ifeq ($(HAVE_AF_DEPS),true)
ifeq ($(HAVE_FFMPEG),true) ifeq ($(HAVE_FFMPEG),true)
@echo "AudioFile: $(ANS_YES) (with ffmpeg)" @echo "AudioFile: $(ANS_YES) (with ffmpeg)"
else else
@echo "AudioFile: $(ANS_YES) (without ffmpeg) $(mS)ffmpeg/libav missing or too new$(mE)"
@echo "AudioFile: $(ANS_YES) (without ffmpeg) $(mS)ffmpeg/libav missing$(mE)"
endif endif
else else
@echo "AudioFile: $(ANS_NO) $(mS)libsndfile missing$(mE)" @echo "AudioFile: $(ANS_NO) $(mS)libsndfile missing$(mE)"
@@ -466,7 +496,7 @@ ifeq ($(HAVE_MF_DEPS),true)
else else
@echo "MidiFile: $(ANS_NO) $(mS)LibSMF missing$(mE)" @echo "MidiFile: $(ANS_NO) $(mS)LibSMF missing$(mE)"
endif endif
ifeq ($(HAVE_OPENGL),true)
ifeq ($(HAVE_DGL),true)
@echo "DISTRHO: $(ANS_YES)" @echo "DISTRHO: $(ANS_YES)"
else else
@echo "DISTRHO: $(ANS_NO) $(mS)OpenGL missing$(mE)" @echo "DISTRHO: $(ANS_NO) $(mS)OpenGL missing$(mE)"


+ 17
- 7
source/Makefile.mk View File

@@ -117,6 +117,20 @@ BUILD_CXX_FLAGS = $(BASE_FLAGS) $(32BIT_FLAGS) $(CXXFLAGS)
LINK_FLAGS = $(32BIT_FLAGS) $(LDFLAGS) LINK_FLAGS = $(32BIT_FLAGS) $(LDFLAGS)
endif endif


# --------------------------------------------------------------
# Check for qt, set default version (prefer qt4)

HAVE_QT4 = $(shell pkg-config --exists QtCore QtGui && echo true)
HAVE_QT5 = $(shell pkg-config --exists Qt5Core Qt5Gui Qt5Widgets && echo true)

ifeq ($(HAVE_QT5),true)
DEFAULT_QT=5
endif

ifeq ($(HAVE_QT4),true)
DEFAULT_QT=4
endif

# -------------------------------------------------------------- # --------------------------------------------------------------
# Check for required libs # Check for required libs


@@ -124,12 +138,10 @@ ifneq ($(shell pkg-config --exists liblo && echo true),true)
$(error liblo missing, cannot continue) $(error liblo missing, cannot continue)
endif endif


ifneq ($(shell pkg-config --exists QtCore && echo true),true)
$(error QtCore missing, cannot continue)
ifneq ($(HAVE_QT4),true)
ifneq ($(HAVE_QT5),true)
$(error Qt missing, cannot continue)
endif endif

ifneq ($(shell pkg-config --exists QtXml && echo true),true)
$(error QtXml missing, cannot continue)
endif endif


# -------------------------------------------------------------- # --------------------------------------------------------------
@@ -176,8 +188,6 @@ endif
HAVE_FFMPEG = $(shell pkg-config --exists libavcodec libavformat libavutil && echo true) HAVE_FFMPEG = $(shell pkg-config --exists libavcodec libavformat libavutil && echo true)
HAVE_GTK2 = $(shell pkg-config --exists gtk+-2.0 && echo true) HAVE_GTK2 = $(shell pkg-config --exists gtk+-2.0 && echo true)
HAVE_GTK3 = $(shell pkg-config --exists gtk+-3.0 && echo true) HAVE_GTK3 = $(shell pkg-config --exists gtk+-3.0 && echo true)
HAVE_QT4 = $(shell pkg-config --exists QtCore QtGui && echo true)
HAVE_QT5 = $(shell pkg-config --exists Qt5Core Qt5Gui Qt5Widgets && echo true)
HAVE_X11 = $(shell pkg-config --exists x11 && echo true) HAVE_X11 = $(shell pkg-config --exists x11 && echo true)


ifeq ($(LINUX),true) ifeq ($(LINUX),true)


+ 4
- 1
source/backend/Makefile.mk View File

@@ -16,7 +16,10 @@ BUILD_CXX_FLAGS += $(LIBLO_FLAGS)
BUILD_CXX_FLAGS += -DWANT_NATIVE BUILD_CXX_FLAGS += -DWANT_NATIVE


ifeq ($(CARLA_PLUGIN_SUPPORT),true) ifeq ($(CARLA_PLUGIN_SUPPORT),true)
BUILD_CXX_FLAGS += -DWANT_LADSPA -DWANT_DSSI -DWANT_LV2 -DWANT_VST -DWANT_VST3 -DWANT_AU -DWANT_REWIRE
BUILD_CXX_FLAGS += -DWANT_LADSPA -DWANT_DSSI -DWANT_LV2 -DWANT_VST -DWANT_VST3 -DWANT_REWIRE
ifeq ($(MACOS),true)
BUILD_CXX_FLAGS += -DWANT_AU
endif
ifeq ($(CARLA_VESTIGE_HEADER),true) ifeq ($(CARLA_VESTIGE_HEADER),true)
BUILD_CXX_FLAGS += -DVESTIGE_HEADER BUILD_CXX_FLAGS += -DVESTIGE_HEADER
endif endif


+ 4
- 1
source/bridges/Makefile View File

@@ -25,7 +25,10 @@ LINK_PLUGIN_FLAGS = $(LINK_FLAGS)
LINK_PLUGIN_FLAGS += $(QTCORE_LIBS) $(QTXML_LIBS) LINK_PLUGIN_FLAGS += $(QTCORE_LIBS) $(QTXML_LIBS)


ifeq ($(CARLA_PLUGIN_SUPPORT),true) ifeq ($(CARLA_PLUGIN_SUPPORT),true)
BUILD_PLUGIN_FLAGS += -DWANT_LADSPA -DWANT_DSSI -DWANT_LV2 -DWANT_VST -DWANT_VST3 -DWANT_AU -DWANT_REWIRE
BUILD_PLUGIN_FLAGS += -DWANT_LADSPA -DWANT_DSSI -DWANT_LV2 -DWANT_VST -DWANT_VST3 -DWANT_REWIRE
ifeq ($(MACOS),true)
BUILD_CXX_FLAGS += -DWANT_AU
endif
ifeq ($(CARLA_VESTIGE_HEADER),true) ifeq ($(CARLA_VESTIGE_HEADER),true)
BUILD_PLUGIN_FLAGS += -DVESTIGE_HEADER BUILD_PLUGIN_FLAGS += -DVESTIGE_HEADER
endif endif


+ 9
- 1
source/carla View File

@@ -16,10 +16,18 @@
# #
# For a full copy of the GNU General Public License see the GPL.txt file # For a full copy of the GNU General Public License see the GPL.txt file


# ------------------------------------------------------------------------------------------------------------
# Imports (Config)

from carla_config import *

# ------------------------------------------------------------------------------------------------------------ # ------------------------------------------------------------------------------------------------------------
# Imports (Global) # Imports (Global)


from PyQt4.QtGui import QLabel, QTabWidget
if config_UseQt5:
from PyQt5.QtWidgets import QLabel, QTabWidget
else:
from PyQt4.QtGui import QLabel, QTabWidget


# ------------------------------------------------------------------------------------------------------------ # ------------------------------------------------------------------------------------------------------------
# Imports (Custom Stuff) # Imports (Custom Stuff)


+ 1
- 1
source/carla-patchbay View File

@@ -2,7 +2,7 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-


# Carla plugin host # Carla plugin host
# Copyright (C) 2011-2013 Filipe Coelho <falktx@falktx.com>
# Copyright (C) 2011-2014 Filipe Coelho <falktx@falktx.com>
# #
# This program is free software; you can redistribute it and/or # This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as # modify it under the terms of the GNU General Public License as


+ 12
- 3
source/carla_database.py View File

@@ -2,7 +2,7 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-


# Carla plugin database code # Carla plugin database code
# Copyright (C) 2011-2013 Filipe Coelho <falktx@falktx.com>
# Copyright (C) 2011-2014 Filipe Coelho <falktx@falktx.com>
# #
# This program is free software; you can redistribute it and/or # This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as # modify it under the terms of the GNU General Public License as
@@ -16,14 +16,23 @@
# #
# For a full copy of the GNU General Public License see the doc/GPL.txt file. # For a full copy of the GNU General Public License see the doc/GPL.txt file.


# ------------------------------------------------------------------------------------------------------------
# Imports (Config)

from carla_config import *

# ------------------------------------------------------------------------------------------------------------ # ------------------------------------------------------------------------------------------------------------
# Imports (Global) # Imports (Global)


from copy import deepcopy from copy import deepcopy
from subprocess import Popen, PIPE from subprocess import Popen, PIPE


from PyQt4.QtCore import pyqtSignal, pyqtSlot, Qt, QThread, QSettings
from PyQt4.QtGui import QDialog, QTableWidgetItem
if config_UseQt5:
from PyQt5.QtCore import pyqtSignal, pyqtSlot, Qt, QThread, QSettings
from PyQt5.QtWidgets import QDialog, QTableWidgetItem
else:
from PyQt4.QtCore import pyqtSignal, pyqtSlot, Qt, QThread, QSettings
from PyQt4.QtGui import QDialog, QTableWidgetItem


# ------------------------------------------------------------------------------------------------------------ # ------------------------------------------------------------------------------------------------------------
# Imports (Custom) # Imports (Custom)


+ 12
- 2
source/carla_host.py View File

@@ -16,11 +16,21 @@
# #
# For a full copy of the GNU General Public License see the doc/GPL.txt file. # For a full copy of the GNU General Public License see the doc/GPL.txt file.


# ------------------------------------------------------------------------------------------------------------
# Imports (Config)

from carla_config import *

# ------------------------------------------------------------------------------------------------------------ # ------------------------------------------------------------------------------------------------------------
# Imports (Global) # Imports (Global)


from PyQt4.QtCore import qCritical, QModelIndex, QTimer
from PyQt4.QtGui import QApplication, QFileSystemModel, QListWidgetItem, QMainWindow, QPalette
if config_UseQt5:
from PyQt5.QtCore import qCritical, QModelIndex, QTimer
from PyQt5.QtGui import QPalette
from PyQt5.QtWidgets import QApplication, QFileSystemModel, QListWidgetItem, QMainWindow
else:
from PyQt4.QtCore import qCritical, QModelIndex, QTimer
from PyQt4.QtGui import QApplication, QFileSystemModel, QListWidgetItem, QMainWindow, QPalette


# ------------------------------------------------------------------------------------------------------------ # ------------------------------------------------------------------------------------------------------------
# Imports (Custom) # Imports (Custom)


+ 13
- 2
source/carla_patchbay.py View File

@@ -16,11 +16,22 @@
# #
# For a full copy of the GNU General Public License see the doc/GPL.txt file. # For a full copy of the GNU General Public License see the doc/GPL.txt file.


# ------------------------------------------------------------------------------------------------------------
# Imports (Config)

from carla_config import *

# ------------------------------------------------------------------------------------------------------------ # ------------------------------------------------------------------------------------------------------------
# Imports (Global) # Imports (Global)


from PyQt4.QtCore import QPointF, QTimer
from PyQt4.QtGui import QFrame, QGraphicsView, QGridLayout, QImage, QPrinter, QPrintDialog
if config_UseQt5:
from PyQt5.QtCore import QPointF, QTimer
from PyQt5.QtGui import QImage
from PyQt5.QtPrintSupport import QPrinter, QPrintDialog
from PyQt5.QtWidgets import QFrame, QGraphicsView, QGridLayout
else:
from PyQt4.QtCore import QPointF, QTimer
from PyQt4.QtGui import QFrame, QGraphicsView, QGridLayout, QImage, QPrinter, QPrintDialog


# ------------------------------------------------------------------------------------------------------------ # ------------------------------------------------------------------------------------------------------------
# Imports (Custom Stuff) # Imports (Custom Stuff)


+ 12
- 2
source/carla_rack.py View File

@@ -16,11 +16,21 @@
# #
# For a full copy of the GNU General Public License see the doc/GPL.txt file. # For a full copy of the GNU General Public License see the doc/GPL.txt file.


# ------------------------------------------------------------------------------------------------------------
# Imports (Config)

from carla_config import *

# ------------------------------------------------------------------------------------------------------------ # ------------------------------------------------------------------------------------------------------------
# Imports (Global) # Imports (Global)


from PyQt4.QtCore import Qt, QSize, QTimer
from PyQt4.QtGui import QAbstractItemView, QApplication, QHBoxLayout, QLabel, QListWidget, QListWidgetItem, QPixmap, QScrollBar
if config_UseQt5:
from PyQt5.QtCore import Qt, QSize, QTimer
from PyQt5.QtGui import QPixmap
from PyQt5.QtWidgets import QAbstractItemView, QApplication, QHBoxLayout, QLabel, QListWidget, QListWidgetItem, QScrollBar
else:
from PyQt4.QtCore import Qt, QSize, QTimer
from PyQt4.QtGui import QAbstractItemView, QApplication, QHBoxLayout, QLabel, QListWidget, QListWidgetItem, QPixmap, QScrollBar


# ------------------------------------------------------------------------------------------------------------ # ------------------------------------------------------------------------------------------------------------
# Imports (Custom Stuff) # Imports (Custom Stuff)


+ 14
- 4
source/carla_settings.py View File

@@ -2,7 +2,7 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-


# Carla settings code # Carla settings code
# Copyright (C) 2011-2013 Filipe Coelho <falktx@falktx.com>
# Copyright (C) 2011-2014 Filipe Coelho <falktx@falktx.com>
# #
# This program is free software; you can redistribute it and/or # This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as # modify it under the terms of the GNU General Public License as
@@ -16,12 +16,22 @@
# #
# For a full copy of the GNU General Public License see the doc/GPL.txt file. # For a full copy of the GNU General Public License see the doc/GPL.txt file.


# ------------------------------------------------------------------------------------------------------------
# Imports (Config)

from carla_config import *

# ------------------------------------------------------------------------------------------------------------ # ------------------------------------------------------------------------------------------------------------
# Imports (Global) # Imports (Global)


from PyQt4.QtCore import pyqtSlot, QByteArray, QDir, QSettings
from PyQt4.QtGui import QColor, QCursor, QFontMetrics, QPainter, QPainterPath
from PyQt4.QtGui import QDialog, QDialogButtonBox, QFrame, QInputDialog, QLineEdit, QMenu, QVBoxLayout, QWidget
if config_UseQt5:
from PyQt5.QtCore import pyqtSlot, QByteArray, QDir, QSettings
from PyQt5.QtGui import QColor, QCursor, QFontMetrics, QPainter, QPainterPath
from PyQt5.QtWidgets import QDialog, QDialogButtonBox, QFrame, QInputDialog, QLineEdit, QMenu, QVBoxLayout, QWidget
else:
from PyQt4.QtCore import pyqtSlot, QByteArray, QDir, QSettings
from PyQt4.QtGui import QColor, QCursor, QFontMetrics, QPainter, QPainterPath
from PyQt4.QtGui import QDialog, QDialogButtonBox, QFrame, QInputDialog, QLineEdit, QMenu, QVBoxLayout, QWidget


# ------------------------------------------------------------------------------------------------------------ # ------------------------------------------------------------------------------------------------------------
# Imports (Custom) # Imports (Custom)


+ 17
- 4
source/carla_shared.py View File

@@ -16,15 +16,24 @@
# #
# For a full copy of the GNU General Public License see the doc/GPL.txt file. # For a full copy of the GNU General Public License see the doc/GPL.txt file.


# ------------------------------------------------------------------------------------------------------------
# Imports (Config)

from carla_config import *

# ------------------------------------------------------------------------------------------------------------ # ------------------------------------------------------------------------------------------------------------
# Imports (Global) # Imports (Global)


import os import os
import sys import sys


from PyQt4.QtCore import qFatal, qWarning, QDir
from PyQt4.QtGui import QIcon
from PyQt4.QtGui import QFileDialog, QMessageBox
if config_UseQt5:
from PyQt5.QtCore import qFatal, qWarning, QDir
from PyQt5.QtGui import QIcon
from PyQt5.QtWidgets import QFileDialog, QMessageBox
else:
from PyQt4.QtCore import qFatal, qWarning, QDir
from PyQt4.QtGui import QFileDialog, QIcon, QMessageBox


# ------------------------------------------------------------------------------------------------------------ # ------------------------------------------------------------------------------------------------------------
# Import Signal # Import Signal
@@ -46,8 +55,12 @@ from carla_backend import *
# Platform specific stuff # Platform specific stuff


if MACOS: if MACOS:
from PyQt4.QtGui import qt_mac_set_menubar_icons
if config_UseQt5:
from PyQt5.QtGui import qt_mac_set_menubar_icons
else:
from PyQt4.QtGui import qt_mac_set_menubar_icons
qt_mac_set_menubar_icons(False) qt_mac_set_menubar_icons(False)

elif WINDOWS: elif WINDOWS:
WINDIR = os.getenv("WINDIR") WINDIR = os.getenv("WINDIR")




+ 12
- 2
source/carla_skin.py View File

@@ -16,11 +16,21 @@
# #
# For a full copy of the GNU General Public License see the doc/GPL.txt file. # For a full copy of the GNU General Public License see the doc/GPL.txt file.


# ------------------------------------------------------------------------------------------------------------
# Imports (Config)

from carla_config import *

# ------------------------------------------------------------------------------------------------------------ # ------------------------------------------------------------------------------------------------------------
# Imports (Global) # Imports (Global)


from PyQt4.QtCore import Qt
from PyQt4.QtGui import QFont, QFrame, QPen, QPushButton
if config_UseQt5:
from PyQt5.QtCore import Qt
from PyQt5.QtGui import QFont, QPen
from PyQt5.QtWidgets import QFrame, QPushButton
else:
from PyQt4.QtCore import Qt
from PyQt4.QtGui import QFont, QFrame, QPen, QPushButton


# ------------------------------------------------------------------------------------------------------------ # ------------------------------------------------------------------------------------------------------------
# Imports (Custom) # Imports (Custom)


+ 12
- 2
source/carla_style.py View File

@@ -16,11 +16,21 @@
# #
# For a full copy of the GNU General Public License see the GPL.txt file # For a full copy of the GNU General Public License see the GPL.txt file


# ------------------------------------------------------------------------------------------------------------
# Imports (Config)

from carla_config import *

# ------------------------------------------------------------------------------------------------------------ # ------------------------------------------------------------------------------------------------------------
# Imports (Global) # Imports (Global)


from PyQt4.QtCore import QSettings
from PyQt4.QtGui import QApplication, QColor, QFont, QPalette
if config_UseQt5:
from PyQt5.QtCore import QSettings
from PyQt5.QtGui import QColor, QFont, QPalette
from PyQt5.QtWidgets import QApplication
else:
from PyQt4.QtCore import QSettings
from PyQt4.QtGui import QApplication, QColor, QFont, QPalette


# ------------------------------------------------------------------------------------------------------------ # ------------------------------------------------------------------------------------------------------------
# Imports (Custom) # Imports (Custom)


+ 13
- 3
source/carla_widgets.py View File

@@ -16,12 +16,22 @@
# #
# For a full copy of the GNU General Public License see the doc/GPL.txt file. # For a full copy of the GNU General Public License see the doc/GPL.txt file.


# ------------------------------------------------------------------------------------------------------------
# Imports (Config)

from carla_config import *

# ------------------------------------------------------------------------------------------------------------ # ------------------------------------------------------------------------------------------------------------
# Imports (Global) # Imports (Global)


from PyQt4.QtCore import pyqtSignal, pyqtSlot, QByteArray, QSettings
from PyQt4.QtGui import QColor, QCursor, QFontMetrics, QPainter, QPainterPath
from PyQt4.QtGui import QDialog, QInputDialog, QLineEdit, QMenu, QVBoxLayout, QWidget
if config_UseQt5:
from PyQt5.QtCore import pyqtSignal, pyqtSlot, QByteArray, QSettings
from PyQt5.QtGui import QColor, QCursor, QFontMetrics, QPainter, QPainterPath
from PyQt5.QtWidgets import QDialog, QInputDialog, QLineEdit, QMenu, QVBoxLayout, QWidget
else:
from PyQt4.QtCore import pyqtSignal, pyqtSlot, QByteArray, QSettings
from PyQt4.QtGui import QColor, QCursor, QFontMetrics, QPainter, QPainterPath
from PyQt4.QtGui import QDialog, QInputDialog, QLineEdit, QMenu, QVBoxLayout, QWidget


# ------------------------------------------------------------------------------------------------------------ # ------------------------------------------------------------------------------------------------------------
# Imports (Custom) # Imports (Custom)


+ 4
- 1
source/discovery/Makefile View File

@@ -29,7 +29,10 @@ LINK_FLAGS += $(QTCORE_LIBS)
BUILD_CXX_FLAGS += -DWANT_NATIVE BUILD_CXX_FLAGS += -DWANT_NATIVE


ifeq ($(CARLA_PLUGIN_SUPPORT),true) ifeq ($(CARLA_PLUGIN_SUPPORT),true)
BUILD_CXX_FLAGS += -DWANT_LADSPA -DWANT_DSSI -DWANT_LV2 -DWANT_VST -DWANT_VST3 -DWANT_AU
BUILD_CXX_FLAGS += -DWANT_LADSPA -DWANT_DSSI -DWANT_LV2 -DWANT_VST -DWANT_VST3
ifeq ($(MACOS),true)
BUILD_CXX_FLAGS += -DWANT_AU
endif
ifeq ($(CARLA_VESTIGE_HEADER),true) ifeq ($(CARLA_VESTIGE_HEADER),true)
BUILD_CXX_FLAGS += -DVESTIGE_HEADER BUILD_CXX_FLAGS += -DVESTIGE_HEADER
endif endif


+ 28
- 9
source/patchcanvas.py View File

@@ -2,7 +2,7 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-


# PatchBay Canvas engine using QGraphicsView/Scene # PatchBay Canvas engine using QGraphicsView/Scene
# Copyright (C) 2010-2013 Filipe Coelho <falktx@falktx.com>
# Copyright (C) 2010-2014 Filipe Coelho <falktx@falktx.com>
# #
# This program is free software; you can redistribute it and/or # This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as # modify it under the terms of the GNU General Public License as
@@ -16,17 +16,36 @@
# #
# For a full copy of the GNU General Public License see the doc/GPL.txt file. # For a full copy of the GNU General Public License see the doc/GPL.txt file.


# ------------------------------------------------------------------------------------------------------------
# Imports (Config)

from carla_config import *

# ------------------------------------------------------------------------------------------------------------
# Imports (Global) # Imports (Global)
from PyQt4.QtCore import pyqtSignal, pyqtSlot, qDebug, qCritical, qFatal, qWarning, Qt, QObject
from PyQt4.QtCore import QAbstractAnimation, QLineF, QPointF, QRectF, QSizeF, QSettings, QTimer
from PyQt4.QtGui import QColor, QLinearGradient, QPen, QPolygonF, QPainter, QPainterPath
from PyQt4.QtGui import QCursor, QFont, QFontMetrics
from PyQt4.QtGui import QGraphicsScene, QGraphicsItem, QGraphicsLineItem, QGraphicsPathItem
from PyQt4.QtGui import QGraphicsColorizeEffect, QGraphicsDropShadowEffect
from PyQt4.QtGui import QInputDialog, QLineEdit, QMenu
from PyQt4.QtSvg import QGraphicsSvgItem, QSvgRenderer


if config_UseQt5:
from PyQt5.QtCore import pyqtSignal, pyqtSlot, qDebug, qCritical, qFatal, qWarning, Qt, QObject
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.QtWidgets import QGraphicsScene, QGraphicsItem, QGraphicsLineItem, QGraphicsPathItem
from PyQt5.QtWidgets import QGraphicsColorizeEffect, QGraphicsDropShadowEffect
from PyQt5.QtWidgets import QInputDialog, QLineEdit, QMenu
else:
from PyQt4.QtCore import pyqtSignal, pyqtSlot, qDebug, qCritical, qFatal, qWarning, Qt, QObject
from PyQt4.QtCore import QAbstractAnimation, QLineF, QPointF, QRectF, QSizeF, QSettings, QTimer
from PyQt4.QtGui import QColor, QLinearGradient, QPen, QPolygonF, QPainter, QPainterPath
from PyQt4.QtGui import QCursor, QFont, QFontMetrics
from PyQt4.QtGui import QGraphicsScene, QGraphicsItem, QGraphicsLineItem, QGraphicsPathItem
from PyQt4.QtGui import QGraphicsColorizeEffect, QGraphicsDropShadowEffect
from PyQt4.QtGui import QInputDialog, QLineEdit, QMenu
from PyQt4.QtSvg import QGraphicsSvgItem, QSvgRenderer

# ------------------------------------------------------------------------------------------------------------
# Imports (Theme) # Imports (Theme)

from patchcanvas_theme import * from patchcanvas_theme import *


# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------


+ 12
- 3
source/patchcanvas_theme.py View File

@@ -2,7 +2,7 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-


# PatchBay Canvas Themes # PatchBay Canvas Themes
# Copyright (C) 2010-2012 Filipe Coelho <falktx@falktx.com>
# Copyright (C) 2010-2014 Filipe Coelho <falktx@falktx.com>
# #
# This program is free software; you can redistribute it and/or # This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as # modify it under the terms of the GNU General Public License as
@@ -16,11 +16,20 @@
# #
# For a full copy of the GNU General Public License see the doc/GPL.txt file. # For a full copy of the GNU General Public License see the doc/GPL.txt file.


# ------------------------------------------------------------------------------------------------------------
# Imports (Config)

from carla_config import *

# ------------------------------------------------------------------------------------------------------------ # ------------------------------------------------------------------------------------------------------------
# Imports (Global) # Imports (Global)


from PyQt4.QtCore import Qt
from PyQt4.QtGui import QColor, QFont, QPen, QPixmap
if config_UseQt5:
from PyQt5.QtCore import Qt
from PyQt5.QtGui import QColor, QFont, QPen, QPixmap
else:
from PyQt4.QtCore import Qt
from PyQt4.QtGui import QColor, QFont, QPen, QPixmap


# ------------------------------------------------------------------------------------------------------------ # ------------------------------------------------------------------------------------------------------------
# patchcanvas-theme.cpp # patchcanvas-theme.cpp


+ 13
- 3
source/widgets/canvaspreviewframe.py View File

@@ -2,7 +2,7 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-


# Custom Mini Canvas Preview, a custom Qt4 widget # Custom Mini Canvas Preview, a custom Qt4 widget
# Copyright (C) 2011-2013 Filipe Coelho <falktx@falktx.com>
# Copyright (C) 2011-2014 Filipe Coelho <falktx@falktx.com>
# #
# This program is free software; you can redistribute it and/or # This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as # modify it under the terms of the GNU General Public License as
@@ -16,11 +16,21 @@
# #
# For a full copy of the GNU General Public License see the doc/GPL.txt file. # For a full copy of the GNU General Public License see the doc/GPL.txt file.


# ------------------------------------------------------------------------------------------------------------
# Imports (Config)

from carla_config import *

# ------------------------------------------------------------------------------------------------------------ # ------------------------------------------------------------------------------------------------------------
# Imports (Global) # Imports (Global)


from PyQt4.QtCore import pyqtSignal, Qt, QRectF, QTimer
from PyQt4.QtGui import QBrush, QColor, QCursor, QFrame, QPainter, QPen
if config_UseQt5:
from PyQt5.QtCore import pyqtSignal, Qt, QRectF, QTimer
from PyQt5.QtGui import QBrush, QColor, QCursor, QPainter, QPen
from PyQt5.QtWidgets import QFrame
else:
from PyQt4.QtCore import pyqtSignal, Qt, QRectF, QTimer
from PyQt4.QtGui import QBrush, QColor, QCursor, QFrame, QPainter, QPen


# ------------------------------------------------------------------------------------------------------------ # ------------------------------------------------------------------------------------------------------------
# Static Variables # Static Variables


+ 13
- 3
source/widgets/digitalpeakmeter.py View File

@@ -2,7 +2,7 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-


# Digital Peak Meter, a custom Qt4 widget # Digital Peak Meter, a custom Qt4 widget
# Copyright (C) 2011-2013 Filipe Coelho <falktx@falktx.com>
# Copyright (C) 2011-2014 Filipe Coelho <falktx@falktx.com>
# #
# This program is free software; you can redistribute it and/or # This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as # modify it under the terms of the GNU General Public License as
@@ -16,11 +16,21 @@
# #
# For a full copy of the GNU General Public License see the doc/GPL.txt file. # For a full copy of the GNU General Public License see the doc/GPL.txt file.


# ------------------------------------------------------------------------------------------------------------
# Imports (Config)

from carla_config import *

# ------------------------------------------------------------------------------------------------------------ # ------------------------------------------------------------------------------------------------------------
# Imports (Global) # Imports (Global)


from PyQt4.QtCore import qCritical, Qt, QTimer, QSize
from PyQt4.QtGui import QColor, QLinearGradient, QPainter, QWidget
if config_UseQt5:
from PyQt5.QtCore import qCritical, Qt, QTimer, QSize
from PyQt5.QtGui import QColor, QLinearGradient, QPainter
from PyQt5.QtWidgets import QWidget
else:
from PyQt4.QtCore import qCritical, Qt, QTimer, QSize
from PyQt4.QtGui import QColor, QLinearGradient, QPainter, QWidget


# ------------------------------------------------------------------------------------------------------------ # ------------------------------------------------------------------------------------------------------------
# Widget Class # Widget Class


+ 13
- 3
source/widgets/ledbutton.py View File

@@ -2,7 +2,7 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-


# LED Button, a custom Qt4 widget # LED Button, a custom Qt4 widget
# Copyright (C) 2011-2013 Filipe Coelho <falktx@falktx.com>
# Copyright (C) 2011-2014 Filipe Coelho <falktx@falktx.com>
# #
# This program is free software; you can redistribute it and/or # This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as # modify it under the terms of the GNU General Public License as
@@ -16,11 +16,21 @@
# #
# For a full copy of the GNU General Public License see the doc/GPL.txt file. # For a full copy of the GNU General Public License see the doc/GPL.txt file.


# ------------------------------------------------------------------------------------------------------------
# Imports (Config)

from carla_config import *

# ------------------------------------------------------------------------------------------------------------ # ------------------------------------------------------------------------------------------------------------
# Imports (Global) # Imports (Global)


from PyQt4.QtCore import qCritical, QRectF
from PyQt4.QtGui import QPainter, QPixmap, QPushButton
if config_UseQt5:
from PyQt5.QtCore import qCritical, QRectF
from PyQt5.QtGui import QPainter, QPixmap
from PyQt5.QtWidgets import QPushButton
else:
from PyQt4.QtCore import qCritical, QRectF
from PyQt4.QtGui import QPainter, QPixmap, QPushButton


# ------------------------------------------------------------------------------------------------------------ # ------------------------------------------------------------------------------------------------------------
# Widget Class # Widget Class


+ 14
- 4
source/widgets/paramspinbox.py View File

@@ -2,7 +2,7 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-


# Parameter SpinBox, a custom Qt4 widget # Parameter SpinBox, a custom Qt4 widget
# Copyright (C) 2011-2013 Filipe Coelho <falktx@falktx.com>
# Copyright (C) 2011-2014 Filipe Coelho <falktx@falktx.com>
# #
# This program is free software; you can redistribute it and/or # This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as # modify it under the terms of the GNU General Public License as
@@ -17,14 +17,24 @@
# For a full copy of the GNU General Public License see the doc/GPL.txt file. # For a full copy of the GNU General Public License see the doc/GPL.txt file.


# ------------------------------------------------------------------------------------------------------------ # ------------------------------------------------------------------------------------------------------------
# Imports (Global)
# Imports (Config)


from PyQt4.QtCore import pyqtSignal, pyqtSlot, Qt, QTimer
from PyQt4.QtGui import QAbstractSpinBox, QApplication, QComboBox, QCursor, QDialog, QMenu, QProgressBar
from carla_config import *

# ------------------------------------------------------------------------------------------------------------
# Imports (Global)


from math import isnan from math import isnan
from random import random from random import random


if config_UseQt5:
from PyQt5.QtCore import pyqtSignal, pyqtSlot, Qt, QTimer
from PyQt5.QtGui import QCursor
from PyQt5.QtWidgets import QAbstractSpinBox, QApplication, QComboBox, QDialog, QMenu, QProgressBar
else:
from PyQt4.QtCore import pyqtSignal, pyqtSlot, Qt, QTimer
from PyQt4.QtGui import QAbstractSpinBox, QApplication, QComboBox, QCursor, QDialog, QMenu, QProgressBar

# ------------------------------------------------------------------------------------------------------------ # ------------------------------------------------------------------------------------------------------------
# Imports (Custom) # Imports (Custom)




+ 13
- 3
source/widgets/pixmapbutton.py View File

@@ -2,7 +2,7 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-


# Pixmap Button, a custom Qt4 widget # Pixmap Button, a custom Qt4 widget
# Copyright (C) 2013 Filipe Coelho <falktx@falktx.com>
# Copyright (C) 2013-2014 Filipe Coelho <falktx@falktx.com>
# #
# This program is free software; you can redistribute it and/or # This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as # modify it under the terms of the GNU General Public License as
@@ -16,11 +16,21 @@
# #
# For a full copy of the GNU General Public License see the doc/GPL.txt file. # For a full copy of the GNU General Public License see the doc/GPL.txt file.


# ------------------------------------------------------------------------------------------------------------
# Imports (Config)

from carla_config import *

# ------------------------------------------------------------------------------------------------------------ # ------------------------------------------------------------------------------------------------------------
# Imports (Global) # Imports (Global)


from PyQt4.QtCore import QPointF, QRectF
from PyQt4.QtGui import QColor, QFont, QPainter, QPixmap, QPushButton
if config_UseQt5:
from PyQt5.QtCore import QPointF, QRectF
from PyQt5.QtGui import QColor, QFont, QPainter, QPixmap
from PyQt5.QtWidgets import QPushButton
else:
from PyQt4.QtCore import QPointF, QRectF
from PyQt4.QtGui import QColor, QFont, QPainter, QPixmap, QPushButton


# ------------------------------------------------------------------------------------------------------------ # ------------------------------------------------------------------------------------------------------------
# Widget Class # Widget Class


+ 15
- 4
source/widgets/pixmapdial.py View File

@@ -17,14 +17,25 @@
# For a full copy of the GNU General Public License see the doc/GPL.txt file. # For a full copy of the GNU General Public License see the doc/GPL.txt file.


# ------------------------------------------------------------------------------------------------------------ # ------------------------------------------------------------------------------------------------------------
# Imports (Global)
# Imports (Config)


from PyQt4.QtCore import Qt, QPointF, QRectF, QTimer, QSize
from PyQt4.QtGui import QColor, QConicalGradient, QFont, QFontMetrics
from PyQt4.QtGui import QDial, QLinearGradient, QPainter, QPainterPath, QPen, QPixmap
from carla_config import *

# ------------------------------------------------------------------------------------------------------------
# Imports (Global)


from math import cos, floor, pi, sin from math import cos, floor, pi, sin


if config_UseQt5:
from PyQt5.QtCore import Qt, QPointF, QRectF, QTimer, QSize
from PyQt5.QtGui import QColor, QConicalGradient, QFont, QFontMetrics
from PyQt5.QtGui import QLinearGradient, QPainter, QPainterPath, QPen, QPixmap
from PyQt5.QtWidgets import QDial
else:
from PyQt4.QtCore import Qt, QPointF, QRectF, QTimer, QSize
from PyQt4.QtGui import QColor, QConicalGradient, QFont, QFontMetrics
from PyQt4.QtGui import QDial, QLinearGradient, QPainter, QPainterPath, QPen, QPixmap

# ------------------------------------------------------------------------------------------------------------ # ------------------------------------------------------------------------------------------------------------
# Widget Class # Widget Class




+ 13
- 3
source/widgets/pixmapkeyboard.py View File

@@ -16,11 +16,21 @@
# #
# For a full copy of the GNU General Public License see the doc/GPL.txt file. # For a full copy of the GNU General Public License see the doc/GPL.txt file.


# ------------------------------------------------------------------------------------------------------------
# Imports (Config)

from carla_config import *

# ------------------------------------------------------------------------------------------------------------ # ------------------------------------------------------------------------------------------------------------
# Imports (Global) # Imports (Global)


from PyQt4.QtCore import pyqtSignal, pyqtSlot, qCritical, Qt, QPointF, QRectF, QTimer, QSize
from PyQt4.QtGui import QColor, QFont, QPainter, QPixmap, QScrollArea, QWidget
if config_UseQt5:
from PyQt5.QtCore import pyqtSignal, pyqtSlot, qCritical, Qt, QPointF, QRectF, QTimer, QSize
from PyQt5.QtGui import QColor, QFont, QPainter, QPixmap
from PyQt5.QtWidgets import QScrollArea, QWidget
else:
from PyQt4.QtCore import pyqtSignal, pyqtSlot, qCritical, Qt, QPointF, QRectF, QTimer, QSize
from PyQt4.QtGui import QColor, QFont, QPainter, QPixmap, QScrollArea, QWidget


# ------------------------------------------------------------------------------------------------------------ # ------------------------------------------------------------------------------------------------------------


@@ -473,7 +483,7 @@ class PixmapKeyboardHArea(QScrollArea):


if __name__ == '__main__': if __name__ == '__main__':
import sys import sys
from PyQt4.QtGui import QApplication
from PyQt5.QtWidgets import QApplication
import resources_rc import resources_rc


app = QApplication(sys.argv) app = QApplication(sys.argv)


Loading…
Cancel
Save