From 8e3fb38349c354d0a9dcc97f69f39055b94edc51 Mon Sep 17 00:00:00 2001 From: falkTX Date: Wed, 19 Oct 2022 19:03:41 +0100 Subject: [PATCH] Do not try to build frontend if either qt or pyqt is missing --- Makefile | 18 +++++++++--------- Makefile.print.mk | 4 ++-- source/Makefile.deps.mk | 11 +++++++---- 3 files changed, 18 insertions(+), 15 deletions(-) diff --git a/Makefile b/Makefile index fd5fa2153..6640beca4 100644 --- a/Makefile +++ b/Makefile @@ -22,7 +22,7 @@ else MODULEDIR := $(CURDIR)/build/modules/Release endif -# see also source/frontend/carla_shared.py and source/includes/CarlaDefines.h +# see also source/common/__init__.py and source/includes/CarlaDefines.h VERSION := 2.6.0-alpha1 -include Makefile.user.mk @@ -185,7 +185,7 @@ discovery: libs @$(MAKE) -C source/discovery frontend: libs -ifeq ($(HAVE_PYQT),true) +ifeq ($(HAVE_FRONTEND),true) @$(MAKE) -C source/frontend endif @@ -454,8 +454,8 @@ endif endif endif -ifeq ($(HAVE_PYQT),true) - # Create directories (gui) +ifeq ($(HAVE_FRONTEND),true) + # Create directories (frontend) install -d $(DESTDIR)$(LIBDIR)/carla/styles install -d $(DESTDIR)$(PREFIX)/share/appdata install -d $(DESTDIR)$(DATADIR)/applications @@ -567,7 +567,7 @@ endif # ------------------------------------------------------------------------------------------------------------- -ifeq ($(HAVE_PYQT),true) +ifeq ($(HAVE_FRONTEND),true) ifneq ($(CPPMODE),true) # Install script files (gui) install -m 755 \ @@ -752,7 +752,7 @@ endif $(foreach l,$(I18N_LANGUAGES),install -m 644 \ source/frontend/translations/carla_$(l).qm \ $(DESTDIR)$(DATADIR)/carla/resources/translations/;) -endif # HAVE_PYQT +endif # HAVE_FRONTEND # ------------------------------------------------------------------------------------------------------------- @@ -778,7 +778,7 @@ ifeq ($(LINUX),true) endif endif # CAN_GENERATE_LV2_TTL -ifeq ($(HAVE_PYQT),true) +ifeq ($(HAVE_FRONTEND),true) # Link resources for lv2 plugin rm -rf $(DESTDIR)$(LIBDIR)/lv2/carla.lv2/resources $(LINK) ../../../share/carla/resources $(DESTDIR)$(LIBDIR)/lv2/carla.lv2/resources @@ -791,7 +791,7 @@ endif # ------------------------------------------------------------------------------------------------------------- ifneq ($(HAIKU),true) -ifeq ($(HAVE_PYQT),true) +ifeq ($(HAVE_FRONTEND),true) # Install vst plugin install -d $(DESTDIR)$(LIBDIR)/vst/carla.vst @@ -822,7 +822,7 @@ endif # ------------------------------------------------------------------------------------------------------------- -ifneq ($(HAVE_PYQT),true) +ifneq ($(HAVE_FRONTEND),true) # Remove gui files for non-gui build rm $(DESTDIR)$(LIBDIR)/carla/carla-bridge-lv2-modgui ifeq ($(CAN_GENERATE_LV2_TTL),true) diff --git a/Makefile.print.mk b/Makefile.print.mk index aaf6a8c89..d1de33c34 100644 --- a/Makefile.print.mk +++ b/Makefile.print.mk @@ -26,7 +26,7 @@ endif features_print_main: @printf -- "$(tS)---> Main features $(tE)\n" -ifeq ($(HAVE_PYQT),true) +ifeq ($(HAVE_FRONTEND),true) @printf -- "Front-End: $(ANS_YES)\n" @printf -- "LV2 plugin: $(ANS_YES)\n" ifneq ($(HAIKU),true) @@ -35,7 +35,7 @@ else @printf -- "VST2 plugin: $(ANS_NO) $(mZ)Not available for Haiku$(mE)\n" endif else - @printf -- "Front-End: $(ANS_NO) $(mS)Missing PyQt$(mE)\n" + @printf -- "Front-End: $(ANS_NO) $(mS)Missing Qt and/or PyQt$(mE)\n" @printf -- "LV2 plugin: $(ANS_NO) $(mS)No front-end$(mE)\n" @printf -- "VST2 plugin: $(ANS_NO) $(mS)No front-end$(mE)\n" endif diff --git a/source/Makefile.deps.mk b/source/Makefile.deps.mk index 189154ac2..0aea098d2 100644 --- a/source/Makefile.deps.mk +++ b/source/Makefile.deps.mk @@ -319,6 +319,10 @@ else ifeq ($(WINDOWS),true) HAVE_QT = true endif +ifeq ($(HAVE_QT5),true) +HAVE_THEME = true +endif + # --------------------------------------------------------------------------------------------------------------------- # Set PyQt tools @@ -328,6 +332,9 @@ PYUIC5 ?= $(shell which pyuic5 2>/dev/null) ifneq ($(PYUIC5),) ifneq ($(PYRCC5),) HAVE_PYQT = true +ifeq ($(HAVE_QT5),true) +HAVE_FRONTEND = true +endif endif endif @@ -337,10 +344,6 @@ endif PYRCC ?= $(PYRCC5) PYUIC ?= $(PYUIC5) -ifeq ($(HAVE_QT5),true) -HAVE_THEME = true -endif - # --------------------------------------------------------------------------------------------------------------------- # Set USING_JUCE