diff --git a/INSTALL.md b/INSTALL.md
index 7451c3a..1942a88 100644
--- a/INSTALL.md
+++ b/INSTALL.md
@@ -19,12 +19,12 @@ Packagers can make use of the 'PREFIX' and 'DESTDIR' variable during install, li
The required build dependencies are: (devel packages of these)
- JACK
- - Qt4
- - PyQt4 (Py3 version)
+ - Qt5
+ - PyQt5 (Py3 version)
On Debian and Ubuntu, use these commands to install all build dependencies:
-`$ sudo apt-get install libjack-dev libqt4-dev qt4-dev-tools`
-`$ sudo apt-get install python-qt4-dev python3-pyqt4 pyqt4-dev-tools`
+`$ sudo apt-get install libjack-jackd2-dev qtbase5-dev, qtbase5-dev-tools`
+`$ sudo apt-get install python3-pyqt5 python3-pyqt5.qtsvg pyqt5-dev-tools`
To run all the apps/tools, you'll additionally need:
diff --git a/Makefile b/Makefile
index 8acedc0..337ef96 100644
--- a/Makefile
+++ b/Makefile
@@ -8,14 +8,14 @@ PREFIX = /usr/local
DESTDIR =
LINK = ln -s
-PYUIC ?= pyuic4
-PYRCC ?= pyrcc4 -py3
+PYUIC ?= pyuic5
+PYRCC ?= pyrcc5
# Detect X11 rules dir
-ifeq "$(wildcard /etc/X11/xinit/xinitrc.d/ )" ""
- X11_RC_DIR = $(DESTDIR)/etc/X11/Xsession.d/
-else
+ifeq "$(wildcard /etc/X11/Xsession.d/ )" ""
X11_RC_DIR = $(DESTDIR)/etc/X11/xinit/xinitrc.d/
+else
+ X11_RC_DIR = $(DESTDIR)/etc/X11/Xsession.d/
endif
# -----------------------------------------------------------------------------------------------------------------------------------------
@@ -164,7 +164,7 @@ install:
# Install addtional stuff for Cadence
install -m 644 data/pulse2jack/* $(DESTDIR)$(PREFIX)/share/cadence/pulse2jack/
install -m 644 data/pulse2loopback/* $(DESTDIR)$(PREFIX)/share/cadence/pulse2loopback/
- install -m 644 data/61cadence-session-inject $(X11_RC_DIR)
+ install -m 755 data/61cadence-session-inject $(X11_RC_DIR)
# Install addtional stuff for Claudia
cp -r data/icons/* $(DESTDIR)$(PREFIX)/share/cadence/icons/
diff --git a/README.md b/README.md
index c774769..af5a81b 100644
--- a/README.md
+++ b/README.md
@@ -1,7 +1,7 @@
# --- README for Cadence ---
Cadence is a set of tools useful for audio production.
-It's being developed by falkTX, using Python3 and Qt4 (and some C++ where needed).
+It's being developed by falkTX, using Python3 and Qt5 (and some C++ where needed).
The tools share the same base source code, so most of them look quite similar (which is intentional).
Also, lots of custom widgets were coded when needed (like pixmapdial, pixmapkeyboard, patchcanvas and systray).
diff --git a/c++/Makefile.mk b/c++/Makefile.mk
index f8433a6..6998de2 100644
--- a/c++/Makefile.mk
+++ b/c++/Makefile.mk
@@ -10,8 +10,14 @@ CXX ?= g++
MOC ?= $(shell pkg-config --variable=moc_location QtCore)
RCC ?= $(shell pkg-config --variable=rcc_location QtCore)
UIC ?= $(shell pkg-config --variable=uic_location QtCore)
+STRIP ?= strip
WINDRES ?= windres
+HOSTBINS = $(shell pkg-config --variable=host_bins Qt5Core)
+MOC ?= $(HOSTBINS)/moc
+RCC ?= $(HOSTBINS)/rcc
+UIC ?= $(HOSTBINS)/uic
+
# --------------------------------------------------------------
DEBUG ?= false
@@ -20,10 +26,12 @@ ifeq ($(DEBUG),true)
BASE_FLAGS = -O0 -g -Wall -Wextra
BASE_FLAGS += -DDEBUG
else
-BASE_FLAGS = -O2 -ffast-math -mtune=generic -msse -mfpmath=sse -Wall -Wextra
+BASE_FLAGS = -O3 -ffast-math -Wall -Wextra
BASE_FLAGS += -DNDEBUG
endif
+BASE_FLAGS += -fPIC
+
BUILD_C_FLAGS = $(BASE_FLAGS) -std=c99 $(CFLAGS)
BUILD_CXX_FLAGS = $(BASE_FLAGS) -std=c++0x $(CXXFLAGS)
LINK_FLAGS = $(LDFLAGS)
diff --git a/c++/jackmeter/Makefile b/c++/jackmeter/Makefile
index a6ec57d..bfe3230 100644
--- a/c++/jackmeter/Makefile
+++ b/c++/jackmeter/Makefile
@@ -9,8 +9,8 @@ include ../Makefile.mk
# --------------------------------------------------------------
BUILD_CXX_FLAGS += -I../widgets
-BUILD_CXX_FLAGS += $(shell pkg-config --cflags QtCore QtGui)
-LINK_FLAGS += $(shell pkg-config --libs QtCore QtGui)
+BUILD_CXX_FLAGS += $(shell pkg-config --cflags Qt5Core Qt5Gui Qt5Widgets)
+LINK_FLAGS += $(shell pkg-config --libs Qt5Core Qt5Gui Qt5Widgets)
ifeq ($(HAVE_JACKSESSION),true)
BUILD_CXX_FLAGS += -DHAVE_JACKSESSION
diff --git a/c++/jackmeter/jackmeter.cpp b/c++/jackmeter/jackmeter.cpp
index dedbfa1..db17864 100644
--- a/c++/jackmeter/jackmeter.cpp
+++ b/c++/jackmeter/jackmeter.cpp
@@ -27,9 +27,9 @@
#include "../widgets/digitalpeakmeter.hpp"
#include
-#include
#include
-#include
+#include
+#include
// -------------------------------
@@ -134,17 +134,13 @@ void reconnect_ports()
}
else
{
- if (jack_port_t* const jRecPort1 = jackbridge_port_by_name(jClient, "system:capture_1"))
- {
+ if (jackbridge_port_by_name(jClient, "system:capture_1") != nullptr)
if (! jackbridge_port_connected_to(jPort1, "system:capture_1"))
jackbridge_connect(jClient, "system:capture_1", nameIn1.toUtf8().constData());
- }
- if (jack_port_t* const jRecPort2 = jackbridge_port_by_name(jClient, "system:capture_2"))
- {
+ if (jackbridge_port_by_name(jClient, "system:capture_2") != nullptr)
if (! jackbridge_port_connected_to(jPort2, "system:capture_2"))
jackbridge_connect(jClient, "system:capture_2", nameIn2.toUtf8().constData());
- }
}
}
diff --git a/c++/widgets/digitalpeakmeter.hpp b/c++/widgets/digitalpeakmeter.hpp
index 7bbf42f..67459cd 100644
--- a/c++/widgets/digitalpeakmeter.hpp
+++ b/c++/widgets/digitalpeakmeter.hpp
@@ -19,7 +19,7 @@
#define __DIGITALPEAKMETER_HPP__
#include
-#include
+#include
class DigitalPeakMeter : public QWidget
{
diff --git a/c++/widgets/pixmapdial.hpp b/c++/widgets/pixmapdial.hpp
index cfc7090..0d1bafd 100644
--- a/c++/widgets/pixmapdial.hpp
+++ b/c++/widgets/pixmapdial.hpp
@@ -19,7 +19,7 @@
#define __PIXMAPDIAL_HPP__
#include
-#include
+#include
class PixmapDial : public QDial
{
diff --git a/c++/widgets/pixmapkeyboard.hpp b/c++/widgets/pixmapkeyboard.hpp
index 4bca9c8..d19bccf 100644
--- a/c++/widgets/pixmapkeyboard.hpp
+++ b/c++/widgets/pixmapkeyboard.hpp
@@ -20,7 +20,7 @@
#include