diff --git a/.gitignore b/.gitignore index 247b59159..054c9f516 100644 --- a/.gitignore +++ b/.gitignore @@ -58,20 +58,6 @@ ui_*.py *.xz *.zip -# PyQt widgets -source/canvaspreviewframe.py -source/carla_config.py -source/digitalpeakmeter.py -source/draggablegraphicsview.py -source/ledbutton.py -source/paramspinbox.py -source/pianoroll.py -source/pixmapbutton.py -source/pixmapdial.py -source/pixmapkeyboard.py -source/racklistwidget.py -source/widgets/carla_config.py - # Binaries carla-bridge-qtcreator carla-bridge-native @@ -99,15 +85,11 @@ zynaddsubfx-ui stoat-output.png -data/linux/unzipfx2cat32 -data/linux/unzipfx2cat64 data/macos/*-svn/ data/windows/Carla data/windows/CarlaControl data/windows/Carla-*-win32/ data/windows/Carla-*-win64/ -source/bridges/jackplugin/libjack.so.0 -source/frontend/Makefile source/tests/ansi-pedantic-test_* source/tests/CachedPlugins source/tests/CarlaRingBuffer diff --git a/Makefile b/Makefile index 4bdaf1c2b..8c9cd626c 100644 --- a/Makefile +++ b/Makefile @@ -9,24 +9,6 @@ include source/Makefile.mk # --------------------------------------------------------------------------------------------------------------------- -LINK := ln -sf - -ifeq ($(DEFAULT_QT),4) -PYUIC ?= pyuic4 -w -PYRCC ?= pyrcc4 -py3 -ifeq ($(HAVE_QT4),true) -HAVE_THEME = true -endif -else -PYUIC ?= pyuic5 -PYRCC ?= pyrcc5 -ifeq ($(HAVE_QT5),true) -HAVE_THEME = true -endif -endif - -# --------------------------------------------------------------------------------------------------------------------- - PREFIX := /usr/local BINDIR := $(PREFIX)/bin LIBDIR := $(PREFIX)/lib @@ -42,15 +24,11 @@ endif # --------------------------------------------------------------------------------------------------------------------- -all: BIN RES UI WIDGETS +all: backend discovery bridges-plugin bridges-ui frontend interposer libjack plugin theme # --------------------------------------------------------------------------------------------------------------------- # Binaries (native) -BIN: backend discovery bridges-plugin bridges-ui interposer libjack plugin theme - -# --------------------------------------------------------------------------------------------------------------------- - ALL_LIBS += $(MODULEDIR)/carla_engine.a ALL_LIBS += $(MODULEDIR)/carla_engine_plugin.a ALL_LIBS += $(MODULEDIR)/carla_plugin.a @@ -152,6 +130,11 @@ bridges-ui: libs discovery: libs @$(MAKE) -C source/discovery +frontend: +ifeq ($(HAVE_PYQT),true) + @$(MAKE) -C source/frontend +endif + interposer: ifeq ($(LINUX),true) @$(MAKE) -C source/interposer @@ -236,126 +219,6 @@ wine64: $(MAKE) -C source/jackbridge wine64 cp -f $(MODULEDIR)/jackbridge-wine64.dll.so $(CURDIR)/bin/jackbridge-wine64.dll -# --------------------------------------------------------------------------------------------------------------------- -# Resources - -ifeq ($(HAVE_PYQT),true) -RES = \ - bin/resources/carla_app.py \ - bin/resources/carla_backend.py \ - bin/resources/carla_backend_qt.py \ - bin/resources/carla_config.py \ - bin/resources/carla_control.py \ - bin/resources/carla_database.py \ - bin/resources/carla_host.py \ - bin/resources/carla_settings.py \ - bin/resources/carla_skin.py \ - bin/resources/carla_shared.py \ - bin/resources/carla_utils.py \ - bin/resources/carla_widgets.py \ - bin/resources/canvaspreviewframe.py \ - bin/resources/digitalpeakmeter.py \ - bin/resources/draggablegraphicsview.py \ - bin/resources/externalui.py \ - bin/resources/ledbutton.py \ - bin/resources/paramspinbox.py \ - bin/resources/patchcanvas.py \ - bin/resources/patchcanvas_theme.py \ - bin/resources/pianoroll.py \ - bin/resources/pixmapbutton.py \ - bin/resources/pixmapdial.py \ - bin/resources/pixmapkeyboard.py \ - bin/resources/racklistwidget.py \ - bin/resources/resources_rc.py \ - bin/resources/ui_carla_about.py \ - bin/resources/ui_carla_add_jack.py \ - bin/resources/ui_carla_database.py \ - bin/resources/ui_carla_edit.py \ - bin/resources/ui_carla_host.py \ - bin/resources/ui_carla_parameter.py \ - bin/resources/ui_carla_plugin_calf.py \ - bin/resources/ui_carla_plugin_classic.py \ - bin/resources/ui_carla_plugin_compact.py \ - bin/resources/ui_carla_plugin_default.py \ - bin/resources/ui_carla_plugin_presets.py \ - bin/resources/ui_carla_refresh.py \ - bin/resources/ui_carla_settings.py \ - bin/resources/ui_carla_settings_driver.py \ - bin/resources/ui_inputdialog_value.py \ - bin/resources/ui_midipattern.py \ - source/carla_config.py \ - source/resources_rc.py - -RES: $(RES) - -source/carla_config.py: - @echo "#!/usr/bin/env python3" > $@ - @echo "# -*- coding: utf-8 -*-" >> $@ -ifeq ($(DEFAULT_QT),4) - @echo "config_UseQt5 = False" >> $@ -else - @echo "config_UseQt5 = True" >> $@ -endif - -source/resources_rc.py: resources/resources.qrc resources/*/*.png resources/*/*.svg - $(PYRCC) $< -o $@ - -bin/resources/%.py: source/%.py - $(LINK) $(CURDIR)/source/$*.py bin/resources/ -else -RES: -endif - -# --------------------------------------------------------------------------------------------------------------------- -# UI code - -ifeq ($(HAVE_PYQT),true) -UIs = \ - source/ui_carla_about.py \ - source/ui_carla_add_jack.py \ - source/ui_carla_database.py \ - source/ui_carla_edit.py \ - source/ui_carla_host.py \ - source/ui_carla_parameter.py \ - source/ui_carla_plugin_calf.py \ - source/ui_carla_plugin_classic.py \ - source/ui_carla_plugin_compact.py \ - source/ui_carla_plugin_default.py \ - source/ui_carla_plugin_presets.py \ - source/ui_carla_refresh.py \ - source/ui_carla_settings.py \ - source/ui_carla_settings_driver.py \ - source/ui_inputdialog_value.py \ - source/ui_midipattern.py - -UI: $(UIs) - -source/ui_%.py: resources/ui/%.ui - $(PYUIC) $< -o $@ -else -UI: -endif - -# --------------------------------------------------------------------------------------------------------------------- -# Widgets - -WIDGETS = \ - source/canvaspreviewframe.py \ - source/digitalpeakmeter.py \ - source/draggablegraphicsview.py \ - source/ledbutton.py \ - source/paramspinbox.py \ - source/pianoroll.py \ - source/pixmapbutton.py \ - source/pixmapdial.py \ - source/pixmapkeyboard.py \ - source/racklistwidget.py - -WIDGETS: $(WIDGETS) - -source/%.py: source/widgets/%.py - $(LINK) widgets/$*.py $@ - # --------------------------------------------------------------------------------------------------------------------- clean: @@ -363,16 +226,14 @@ clean: $(MAKE) clean -C source/bridges-plugin $(MAKE) clean -C source/bridges-ui $(MAKE) clean -C source/discovery + $(MAKE) clean -C source/frontend $(MAKE) clean -C source/interposer $(MAKE) clean -C source/libjack $(MAKE) clean -C source/modules $(MAKE) clean -C source/native-plugins $(MAKE) clean -C source/plugin $(MAKE) clean -C source/theme - rm -f $(RES) - rm -f $(UIs) - rm -f $(WIDGETS) - rm -f *~ source/*~ source/*.pyc source/*_rc.py source/ui_*.py + rm -f *~ source/*~ distclean: clean rm -f bin/*.exe bin/*.dll bin/*.dylib bin/*.so @@ -403,7 +264,6 @@ else install -d $(DESTDIR)$(LIBDIR)/carla endif install -d $(DESTDIR)$(LIBDIR)/pkgconfig - install -d $(DESTDIR)$(DATADIR)/carla/resources install -d $(DESTDIR)$(INCLUDEDIR)/carla/includes ifeq ($(HAVE_PYQT),true) @@ -416,6 +276,8 @@ ifeq ($(HAVE_PYQT),true) install -d $(DESTDIR)$(DATADIR)/icons/hicolor/256x256/apps install -d $(DESTDIR)$(DATADIR)/icons/hicolor/scalable/apps install -d $(DESTDIR)$(DATADIR)/mime/packages + install -d $(DESTDIR)$(DATADIR)/carla/resources + install -d $(DESTDIR)$(DATADIR)/carla/widgets endif # ------------------------------------------------------------------------------------------------------------- @@ -513,16 +375,20 @@ ifeq ($(HAVE_LIBLO),true) $(DESTDIR)$(BINDIR)/carla-control endif - # Install python code (gui) + # Install frontend install -m 644 \ - source/carla \ - source/carla-control \ - source/carla-jack-multi \ - source/carla-jack-single \ - source/carla-patchbay \ - source/carla-rack \ - source/*.py \ - $(DESTDIR)$(DATADIR)/carla + source/frontend/carla \ + source/frontend/carla-control \ + source/frontend/carla-jack-multi \ + source/frontend/carla-jack-single \ + source/frontend/carla-patchbay \ + source/frontend/carla-rack \ + source/frontend/*.py \ + $(DESTDIR)$(DATADIR)/carla/ + + install -m 644 \ + source/frontend/widgets/*.py \ + $(DESTDIR)$(DATADIR)/carla/widgets/ # Adjust LIBDIR and DATADIR value in python code sed $(SED_ARGS) 's?X_LIBDIR_X = None?X_LIBDIR_X = "$(LIBDIR)"?' \ @@ -575,6 +441,7 @@ endif install -m 644 resources/scalable/carla-control.svg $(DESTDIR)$(DATADIR)/icons/hicolor/scalable/apps # Install resources (re-use python files) + $(LINK) ../widgets $(DESTDIR)$(DATADIR)/carla/resources $(LINK) ../carla_app.py $(DESTDIR)$(DATADIR)/carla/resources $(LINK) ../carla_backend.py $(DESTDIR)$(DATADIR)/carla/resources $(LINK) ../carla_backend_qt.py $(DESTDIR)$(DATADIR)/carla/resources @@ -587,19 +454,9 @@ endif $(LINK) ../carla_shared.py $(DESTDIR)$(DATADIR)/carla/resources $(LINK) ../carla_utils.py $(DESTDIR)$(DATADIR)/carla/resources $(LINK) ../carla_widgets.py $(DESTDIR)$(DATADIR)/carla/resources - $(LINK) ../canvaspreviewframe.py $(DESTDIR)$(DATADIR)/carla/resources - $(LINK) ../digitalpeakmeter.py $(DESTDIR)$(DATADIR)/carla/resources - $(LINK) ../draggablegraphicsview.py $(DESTDIR)$(DATADIR)/carla/resources $(LINK) ../externalui.py $(DESTDIR)$(DATADIR)/carla/resources - $(LINK) ../ledbutton.py $(DESTDIR)$(DATADIR)/carla/resources - $(LINK) ../paramspinbox.py $(DESTDIR)$(DATADIR)/carla/resources $(LINK) ../patchcanvas.py $(DESTDIR)$(DATADIR)/carla/resources $(LINK) ../patchcanvas_theme.py $(DESTDIR)$(DATADIR)/carla/resources - $(LINK) ../pianoroll.py $(DESTDIR)$(DATADIR)/carla/resources - $(LINK) ../pixmapbutton.py $(DESTDIR)$(DATADIR)/carla/resources - $(LINK) ../pixmapdial.py $(DESTDIR)$(DATADIR)/carla/resources - $(LINK) ../pixmapkeyboard.py $(DESTDIR)$(DATADIR)/carla/resources - $(LINK) ../racklistwidget.py $(DESTDIR)$(DATADIR)/carla/resources $(LINK) ../resources_rc.py $(DESTDIR)$(DATADIR)/carla/resources $(LINK) ../ui_carla_about.py $(DESTDIR)$(DATADIR)/carla/resources $(LINK) ../ui_carla_add_jack.py $(DESTDIR)$(DATADIR)/carla/resources @@ -617,7 +474,7 @@ endif $(LINK) ../ui_carla_settings_driver.py $(DESTDIR)$(DATADIR)/carla/resources $(LINK) ../ui_inputdialog_value.py $(DESTDIR)$(DATADIR)/carla/resources $(LINK) ../ui_midipattern.py $(DESTDIR)$(DATADIR)/carla/resources -endif +endif # HAVE_PYQT # ------------------------------------------------------------------------------------------------------------- diff --git a/resources/ui/carla_edit.ui b/resources/ui/carla_edit.ui index 992617a51..0f5b0e5fa 100644 --- a/resources/ui/carla_edit.ui +++ b/resources/ui/carla_edit.ui @@ -837,7 +837,7 @@ Plugin Name PixmapDial QDial -
pixmapdial.h
+
widgets/pixmapdial.h
diff --git a/resources/ui/carla_host.ui b/resources/ui/carla_host.ui index a8d80bc5f..6b412a7dd 100644 --- a/resources/ui/carla_host.ui +++ b/resources/ui/carla_host.ui @@ -1145,24 +1145,24 @@ DigitalPeakMeter QWidget -
digitalpeakmeter.h
+
widgets/digitalpeakmeter.h
1
CanvasPreviewFrame QFrame -
canvaspreviewframe.h
+
widgets/canvaspreviewframe.h
1
RackListWidget QListWidget -
racklistwidget.h
+
widgets/racklistwidget.h
DraggableGraphicsView QGraphicsView -
draggablegraphicsview.h
+
widgets/draggablegraphicsview.h
diff --git a/resources/ui/carla_parameter.ui b/resources/ui/carla_parameter.ui index dc6b60887..288abe345 100644 --- a/resources/ui/carla_parameter.ui +++ b/resources/ui/carla_parameter.ui @@ -87,7 +87,7 @@ ParamSpinBox QWidget -
paramspinbox.h
+
widgets/paramspinbox.h
1
diff --git a/resources/ui/carla_plugin_calf.ui b/resources/ui/carla_plugin_calf.ui index 7127647e2..9a362aa2c 100644 --- a/resources/ui/carla_plugin_calf.ui +++ b/resources/ui/carla_plugin_calf.ui @@ -396,18 +396,18 @@ DigitalPeakMeter QWidget -
digitalpeakmeter.h
+
widgets/digitalpeakmeter.h
1
LEDButton QPushButton -
ledbutton.h
+
widgets/ledbutton.h
PixmapButton QPushButton -
pixmapbutton.h
+
widgets/pixmapbutton.h
diff --git a/resources/ui/carla_plugin_classic.ui b/resources/ui/carla_plugin_classic.ui index b252f9cff..eb1a38d0c 100644 --- a/resources/ui/carla_plugin_classic.ui +++ b/resources/ui/carla_plugin_classic.ui @@ -335,18 +335,18 @@ DigitalPeakMeter QWidget -
digitalpeakmeter.h
+
widgets/digitalpeakmeter.h
1
LEDButton QPushButton -
ledbutton.h
+
widgets/ledbutton.h
PixmapButton QPushButton -
pixmapbutton.h
+
widgets/pixmapbutton.h
diff --git a/resources/ui/carla_plugin_compact.ui b/resources/ui/carla_plugin_compact.ui index a7b5f4a5f..6d3d48913 100644 --- a/resources/ui/carla_plugin_compact.ui +++ b/resources/ui/carla_plugin_compact.ui @@ -396,18 +396,18 @@ DigitalPeakMeter QWidget -
digitalpeakmeter.h
+
widgets/digitalpeakmeter.h
1
LEDButton QPushButton -
ledbutton.h
+
widgets/ledbutton.h
PixmapButton QPushButton -
pixmapbutton.h
+
widgets/pixmapbutton.h
diff --git a/resources/ui/carla_plugin_default.ui b/resources/ui/carla_plugin_default.ui index 7a93840c2..c22a0a2ce 100644 --- a/resources/ui/carla_plugin_default.ui +++ b/resources/ui/carla_plugin_default.ui @@ -463,18 +463,18 @@ DigitalPeakMeter QWidget -
digitalpeakmeter.h
+
widgets/digitalpeakmeter.h
1
LEDButton QPushButton -
ledbutton.h
+
widgets/ledbutton.h
PixmapButton QPushButton -
pixmapbutton.h
+
widgets/pixmapbutton.h
diff --git a/resources/ui/carla_plugin_presets.ui b/resources/ui/carla_plugin_presets.ui index 000ade0e9..7f88570cd 100644 --- a/resources/ui/carla_plugin_presets.ui +++ b/resources/ui/carla_plugin_presets.ui @@ -496,18 +496,18 @@ DigitalPeakMeter QWidget -
digitalpeakmeter.h
+
widgets/digitalpeakmeter.h
1
LEDButton QPushButton -
ledbutton.h
+
widgets/ledbutton.h
PixmapButton QPushButton -
pixmapbutton.h
+
widgets/pixmapbutton.h
diff --git a/resources/ui/midipattern.ui b/resources/ui/midipattern.ui index 3d1993e34..a982f3092 100644 --- a/resources/ui/midipattern.ui +++ b/resources/ui/midipattern.ui @@ -464,12 +464,12 @@ PianoRollView QGraphicsView -
pianoroll.h
+
widgets/pianoroll.h
ModeIndicator QWidget -
pianoroll.h
+
widgets/pianoroll.h
1
diff --git a/source/Makefile.mk b/source/Makefile.mk index e32e9f525..2c7500fe1 100644 --- a/source/Makefile.mk +++ b/source/Makefile.mk @@ -307,6 +307,23 @@ else DEFAULT_QT ?= 4 endif +# --------------------------------------------------------------------------------------------------------------------- +# Set PyQt tools, part2 + +ifeq ($(DEFAULT_QT),4) +PYUIC ?= pyuic4 -w +PYRCC ?= pyrcc4 -py3 +ifeq ($(HAVE_QT4),true) +HAVE_THEME = true +endif +else +PYUIC ?= pyuic5 +PYRCC ?= pyrcc5 +ifeq ($(HAVE_QT5),true) +HAVE_THEME = true +endif +endif + # --------------------------------------------------------------------------------------------------------------------- # Set base defines @@ -542,6 +559,11 @@ else SED_ARGS=-i -e endif +# --------------------------------------------------------------------------------------------------------------------- +# Set command used for file symlinking + +LINK := ln -sf + # --------------------------------------------------------------------------------------------------------------------- ifneq (,$(wildcard $(CWD)/native-plugins/external/Makefile.mk)) diff --git a/source/frontend/Makefile b/source/frontend/Makefile new file mode 100644 index 000000000..98e7867bd --- /dev/null +++ b/source/frontend/Makefile @@ -0,0 +1,116 @@ +#!/usr/bin/make -f +# Makefile for carla-frontend # +# --------------------------- # +# Created by falkTX +# + +CWD=.. +include $(CWD)/Makefile.mk + +# ---------------------------------------------------------------------------------------------------------------------- + +BINDIR := $(CWD)/../bin +RESDIR := $(CWD)/../resources + +ifeq ($(DEBUG),true) +OBJDIR := $(CWD)/../build/frontend/Debug +MODULEDIR := $(CWD)/../build/modules/Debug +else +OBJDIR := $(CWD)/../build/frontend/Release +MODULEDIR := $(CWD)/../build/modules/Release +endif + +# --------------------------------------------------------------------------------------------------------------------- +# UI code + +UIs = \ + ui_carla_about.py \ + ui_carla_add_jack.py \ + ui_carla_database.py \ + ui_carla_edit.py \ + ui_carla_host.py \ + ui_carla_parameter.py \ + ui_carla_plugin_calf.py \ + ui_carla_plugin_classic.py \ + ui_carla_plugin_compact.py \ + ui_carla_plugin_default.py \ + ui_carla_plugin_presets.py \ + ui_carla_refresh.py \ + ui_carla_settings.py \ + ui_carla_settings_driver.py \ + ui_inputdialog_value.py \ + ui_midipattern.py + +# --------------------------------------------------------------------------------------------------------------------- +# Resources + +RES = \ + carla_config.py \ + resources_rc.py \ + $(BINDIR)/resources/widgets \ + $(BINDIR)/resources/carla_app.py \ + $(BINDIR)/resources/carla_backend.py \ + $(BINDIR)/resources/carla_backend_qt.py \ + $(BINDIR)/resources/carla_config.py \ + $(BINDIR)/resources/carla_control.py \ + $(BINDIR)/resources/carla_database.py \ + $(BINDIR)/resources/carla_host.py \ + $(BINDIR)/resources/carla_settings.py \ + $(BINDIR)/resources/carla_skin.py \ + $(BINDIR)/resources/carla_shared.py \ + $(BINDIR)/resources/carla_utils.py \ + $(BINDIR)/resources/carla_widgets.py \ + $(BINDIR)/resources/externalui.py \ + $(BINDIR)/resources/patchcanvas.py \ + $(BINDIR)/resources/patchcanvas_theme.py \ + $(BINDIR)/resources/resources_rc.py \ + $(BINDIR)/resources/ui_carla_about.py \ + $(BINDIR)/resources/ui_carla_add_jack.py \ + $(BINDIR)/resources/ui_carla_database.py \ + $(BINDIR)/resources/ui_carla_edit.py \ + $(BINDIR)/resources/ui_carla_host.py \ + $(BINDIR)/resources/ui_carla_parameter.py \ + $(BINDIR)/resources/ui_carla_plugin_calf.py \ + $(BINDIR)/resources/ui_carla_plugin_classic.py \ + $(BINDIR)/resources/ui_carla_plugin_compact.py \ + $(BINDIR)/resources/ui_carla_plugin_default.py \ + $(BINDIR)/resources/ui_carla_plugin_presets.py \ + $(BINDIR)/resources/ui_carla_refresh.py \ + $(BINDIR)/resources/ui_carla_settings.py \ + $(BINDIR)/resources/ui_carla_settings_driver.py \ + $(BINDIR)/resources/ui_inputdialog_value.py \ + $(BINDIR)/resources/ui_midipattern.py + +# ---------------------------------------------------------------------------------------------------------------------- + +all: $(UIs) $(RES) + +# ---------------------------------------------------------------------------------------------------------------------- + +ui_%.py: $(RESDIR)/ui/%.ui + $(PYUIC) $< -o $@ + +carla_config.py: + @echo "#!/usr/bin/env python3" > $@ + @echo "# -*- coding: utf-8 -*-" >> $@ +ifeq ($(DEFAULT_QT),4) + @echo "config_UseQt5 = False" >> $@ +else + @echo "config_UseQt5 = True" >> $@ +endif + +resources_rc.py: $(RESDIR)/resources.qrc $(RESDIR)/*/*.png $(RESDIR)/*/*.svg + $(PYRCC) $< -o $@ + +$(BINDIR)/resources/%: % + $(LINK) $(CURDIR)/$* $(BINDIR)/resources/ + +# ---------------------------------------------------------------------------------------------------------------------- + +clean: + rm -rf $(UIs) $(RES) __pycache__ *.pyc + +debug: + $(MAKE) DEBUG=true + +# ---------------------------------------------------------------------------------------------------------------------- diff --git a/source/carla b/source/frontend/carla similarity index 100% rename from source/carla rename to source/frontend/carla diff --git a/source/carla-control b/source/frontend/carla-control similarity index 100% rename from source/carla-control rename to source/frontend/carla-control diff --git a/source/carla-jack-multi b/source/frontend/carla-jack-multi similarity index 100% rename from source/carla-jack-multi rename to source/frontend/carla-jack-multi diff --git a/source/carla-jack-single b/source/frontend/carla-jack-single similarity index 100% rename from source/carla-jack-single rename to source/frontend/carla-jack-single diff --git a/source/carla-patchbay b/source/frontend/carla-patchbay similarity index 100% rename from source/carla-patchbay rename to source/frontend/carla-patchbay diff --git a/source/carla-rack b/source/frontend/carla-rack similarity index 100% rename from source/carla-rack rename to source/frontend/carla-rack diff --git a/source/carla-rest-frontend b/source/frontend/carla-rest-frontend similarity index 100% rename from source/carla-rest-frontend rename to source/frontend/carla-rest-frontend diff --git a/source/carla_app.py b/source/frontend/carla_app.py similarity index 100% rename from source/carla_app.py rename to source/frontend/carla_app.py diff --git a/source/carla_backend.py b/source/frontend/carla_backend.py similarity index 100% rename from source/carla_backend.py rename to source/frontend/carla_backend.py diff --git a/source/carla_backend_qt.py b/source/frontend/carla_backend_qt.py similarity index 100% rename from source/carla_backend_qt.py rename to source/frontend/carla_backend_qt.py diff --git a/source/carla_backend_qtweb.py b/source/frontend/carla_backend_qtweb.py similarity index 100% rename from source/carla_backend_qtweb.py rename to source/frontend/carla_backend_qtweb.py diff --git a/source/carla_control.py b/source/frontend/carla_control.py similarity index 100% rename from source/carla_control.py rename to source/frontend/carla_control.py diff --git a/source/carla_database.py b/source/frontend/carla_database.py similarity index 100% rename from source/carla_database.py rename to source/frontend/carla_database.py diff --git a/source/carla_host.py b/source/frontend/carla_host.py similarity index 99% rename from source/carla_host.py rename to source/frontend/carla_host.py index 7d34eb954..cc91416e6 100644 --- a/source/carla_host.py +++ b/source/frontend/carla_host.py @@ -47,8 +47,8 @@ from carla_settings import * from carla_utils import * from carla_widgets import * -from digitalpeakmeter import DigitalPeakMeter -from pixmapkeyboard import PixmapKeyboardHArea +from widgets.digitalpeakmeter import DigitalPeakMeter +from widgets.pixmapkeyboard import PixmapKeyboardHArea # ------------------------------------------------------------------------------------------------------------ # Try Import OpenGL diff --git a/source/carla_settings.py b/source/frontend/carla_settings.py similarity index 100% rename from source/carla_settings.py rename to source/frontend/carla_settings.py diff --git a/source/carla_shared.py b/source/frontend/carla_shared.py similarity index 99% rename from source/carla_shared.py rename to source/frontend/carla_shared.py index 3780c9cca..0b81aa6f9 100644 --- a/source/carla_shared.py +++ b/source/frontend/carla_shared.py @@ -636,8 +636,8 @@ def getPaths(libPrefix = None): pathResources = os.path.join(libPrefix, datadir, "carla", "resources") # standalone, local source - elif CWDl.endswith("source"): - pathBinaries = os.path.abspath(os.path.join(CWD, "..", "bin")) + elif CWDl.endswith("frontend"): + pathBinaries = os.path.abspath(os.path.join(CWD, "..", "..", "bin")) pathResources = os.path.join(pathBinaries, "resources") # plugin diff --git a/source/carla_skin.py b/source/frontend/carla_skin.py similarity index 99% rename from source/carla_skin.py rename to source/frontend/carla_skin.py index 76db1654a..07a49d0ca 100755 --- a/source/carla_skin.py +++ b/source/frontend/carla_skin.py @@ -43,8 +43,8 @@ import ui_carla_plugin_default import ui_carla_plugin_presets from carla_widgets import * -from digitalpeakmeter import DigitalPeakMeter -from pixmapdial import PixmapDial +from widgets.digitalpeakmeter import DigitalPeakMeter +from widgets.pixmapdial import PixmapDial # ------------------------------------------------------------------------------------------------------------ # Plugin Skin Rules (WORK IN PROGRESS) @@ -1882,6 +1882,7 @@ def getColorAndSkinStyle(host, pluginId): progCount = host.get_midi_program_count(pluginId) color = getColorFromCategory(pluginInfo['category']) + print(color, pluginInfo['type'], pluginName) # Samplers if pluginInfo['type'] == PLUGIN_SF2: @@ -1920,7 +1921,7 @@ def getColorAndSkinStyle(host, pluginId): # DISTRHO Plugins (needs to be last) if pluginMaker.startswith("falkTX, ") or pluginMaker == "DISTRHO" or pluginLabel.startswith("http://distrho.sf.net/plugins/"): - return pluginLabel.replace("http://distrho.sf.net/plugins/","") + return (color, pluginLabel.replace("http://distrho.sf.net/plugins/","")) return (color, "default") diff --git a/source/carla_utils.py b/source/frontend/carla_utils.py similarity index 100% rename from source/carla_utils.py rename to source/frontend/carla_utils.py diff --git a/source/carla_widgets.py b/source/frontend/carla_widgets.py similarity index 99% rename from source/carla_widgets.py rename to source/frontend/carla_widgets.py index b34a36633..45da84cc7 100755 --- a/source/carla_widgets.py +++ b/source/frontend/carla_widgets.py @@ -42,8 +42,8 @@ import ui_carla_parameter from carla_shared import * from carla_utils import * -from paramspinbox import CustomInputDialog -from pixmapkeyboard import PixmapKeyboardHArea +from widgets.paramspinbox import CustomInputDialog +from widgets.pixmapkeyboard import PixmapKeyboardHArea # ------------------------------------------------------------------------------------------------------------ # Carla GUI defines diff --git a/source/externalui.py b/source/frontend/externalui.py similarity index 100% rename from source/externalui.py rename to source/frontend/externalui.py diff --git a/source/ladspa_rdf.py b/source/frontend/ladspa_rdf.py similarity index 100% rename from source/ladspa_rdf.py rename to source/frontend/ladspa_rdf.py diff --git a/source/patchcanvas.py b/source/frontend/patchcanvas.py similarity index 100% rename from source/patchcanvas.py rename to source/frontend/patchcanvas.py diff --git a/source/patchcanvas_theme.py b/source/frontend/patchcanvas_theme.py similarity index 100% rename from source/patchcanvas_theme.py rename to source/frontend/patchcanvas_theme.py diff --git a/source/widgets/Makefile b/source/frontend/widgets/Makefile similarity index 100% rename from source/widgets/Makefile rename to source/frontend/widgets/Makefile diff --git a/source/frontend/widgets/__init__.py b/source/frontend/widgets/__init__.py new file mode 100644 index 000000000..8d1c8b69c --- /dev/null +++ b/source/frontend/widgets/__init__.py @@ -0,0 +1 @@ + diff --git a/source/widgets/canvaspreviewframe.py b/source/frontend/widgets/canvaspreviewframe.py similarity index 100% rename from source/widgets/canvaspreviewframe.py rename to source/frontend/widgets/canvaspreviewframe.py diff --git a/source/widgets/digitalpeakmeter.cpp b/source/frontend/widgets/digitalpeakmeter.cpp similarity index 100% rename from source/widgets/digitalpeakmeter.cpp rename to source/frontend/widgets/digitalpeakmeter.cpp diff --git a/source/widgets/digitalpeakmeter.hpp b/source/frontend/widgets/digitalpeakmeter.hpp similarity index 100% rename from source/widgets/digitalpeakmeter.hpp rename to source/frontend/widgets/digitalpeakmeter.hpp diff --git a/source/widgets/digitalpeakmeter.py b/source/frontend/widgets/digitalpeakmeter.py similarity index 100% rename from source/widgets/digitalpeakmeter.py rename to source/frontend/widgets/digitalpeakmeter.py diff --git a/source/widgets/draggablegraphicsview.py b/source/frontend/widgets/draggablegraphicsview.py similarity index 100% rename from source/widgets/draggablegraphicsview.py rename to source/frontend/widgets/draggablegraphicsview.py diff --git a/source/widgets/ledbutton.cpp b/source/frontend/widgets/ledbutton.cpp similarity index 100% rename from source/widgets/ledbutton.cpp rename to source/frontend/widgets/ledbutton.cpp diff --git a/source/widgets/ledbutton.hpp b/source/frontend/widgets/ledbutton.hpp similarity index 100% rename from source/widgets/ledbutton.hpp rename to source/frontend/widgets/ledbutton.hpp diff --git a/source/widgets/ledbutton.py b/source/frontend/widgets/ledbutton.py similarity index 100% rename from source/widgets/ledbutton.py rename to source/frontend/widgets/ledbutton.py diff --git a/source/widgets/paramspinbox.cpp b/source/frontend/widgets/paramspinbox.cpp similarity index 100% rename from source/widgets/paramspinbox.cpp rename to source/frontend/widgets/paramspinbox.cpp diff --git a/source/widgets/paramspinbox.hpp b/source/frontend/widgets/paramspinbox.hpp similarity index 100% rename from source/widgets/paramspinbox.hpp rename to source/frontend/widgets/paramspinbox.hpp diff --git a/source/widgets/paramspinbox.py b/source/frontend/widgets/paramspinbox.py similarity index 100% rename from source/widgets/paramspinbox.py rename to source/frontend/widgets/paramspinbox.py diff --git a/source/widgets/pianoroll.py b/source/frontend/widgets/pianoroll.py similarity index 100% rename from source/widgets/pianoroll.py rename to source/frontend/widgets/pianoroll.py diff --git a/source/widgets/pixmapbutton.py b/source/frontend/widgets/pixmapbutton.py similarity index 100% rename from source/widgets/pixmapbutton.py rename to source/frontend/widgets/pixmapbutton.py diff --git a/source/widgets/pixmapdial.cpp b/source/frontend/widgets/pixmapdial.cpp similarity index 100% rename from source/widgets/pixmapdial.cpp rename to source/frontend/widgets/pixmapdial.cpp diff --git a/source/widgets/pixmapdial.hpp b/source/frontend/widgets/pixmapdial.hpp similarity index 100% rename from source/widgets/pixmapdial.hpp rename to source/frontend/widgets/pixmapdial.hpp diff --git a/source/widgets/pixmapdial.py b/source/frontend/widgets/pixmapdial.py similarity index 100% rename from source/widgets/pixmapdial.py rename to source/frontend/widgets/pixmapdial.py diff --git a/source/widgets/pixmapkeyboard.cpp b/source/frontend/widgets/pixmapkeyboard.cpp similarity index 100% rename from source/widgets/pixmapkeyboard.cpp rename to source/frontend/widgets/pixmapkeyboard.cpp diff --git a/source/widgets/pixmapkeyboard.hpp b/source/frontend/widgets/pixmapkeyboard.hpp similarity index 100% rename from source/widgets/pixmapkeyboard.hpp rename to source/frontend/widgets/pixmapkeyboard.hpp diff --git a/source/widgets/pixmapkeyboard.py b/source/frontend/widgets/pixmapkeyboard.py similarity index 100% rename from source/widgets/pixmapkeyboard.py rename to source/frontend/widgets/pixmapkeyboard.py diff --git a/source/widgets/racklistwidget.py b/source/frontend/widgets/racklistwidget.py similarity index 100% rename from source/widgets/racklistwidget.py rename to source/frontend/widgets/racklistwidget.py diff --git a/source/native-plugins/resources/bigmeter-ui b/source/native-plugins/resources/bigmeter-ui index 57ba547ef..4a2c0a165 100755 --- a/source/native-plugins/resources/bigmeter-ui +++ b/source/native-plugins/resources/bigmeter-ui @@ -40,7 +40,7 @@ from carla_utils import * from carla_app import CarlaApplication from externalui import ExternalUI -from digitalpeakmeter import DigitalPeakMeter +from widgets.digitalpeakmeter import DigitalPeakMeter # ----------------------------------------------------------------------- # External UI diff --git a/source/native-plugins/resources/midipattern-ui b/source/native-plugins/resources/midipattern-ui index e244de8e4..94c3c246a 100755 --- a/source/native-plugins/resources/midipattern-ui +++ b/source/native-plugins/resources/midipattern-ui @@ -38,7 +38,7 @@ else: from carla_shared import * from carla_utils import * -from pianoroll import * +from widgets.pianoroll import * import ui_midipattern diff --git a/source/native-plugins/resources/notes-ui b/source/native-plugins/resources/notes-ui index ed04c6188..49afef68e 100755 --- a/source/native-plugins/resources/notes-ui +++ b/source/native-plugins/resources/notes-ui @@ -42,7 +42,7 @@ from carla_utils import * from carla_app import CarlaApplication from externalui import ExternalUI -from paramspinbox import ParamSpinBox +from widgets.paramspinbox import ParamSpinBox # ----------------------------------------------------------------------- # External UI