qb: Add '--disable-menu'. (#7910)

This adds '--disable-menu' which will disable all of the menu drivers
including Qt. This will also allow disabling only rgui and not the other
menu drivers.
This commit is contained in:
orbea 2019-01-06 14:30:50 -08:00 committed by bparker06
parent 5428d2a833
commit 65c6caf5a6
8 changed files with 73 additions and 51 deletions

View File

@ -642,7 +642,7 @@ ifeq ($(HAVE_NEON),1)
$(LIBRETRO_COMM_DIR)/audio/conversion/float_to_s16_neon.o
endif
HW_CONTEXT_MENU_DRIVERS=$(HAVE_RGUI)
HW_CONTEXT_MENU_DRIVERS=$(HAVE_MENU)
ifeq ($(HW_CONTEXT_MENU_DRIVERS),0)
ifeq ($(HAVE_GL_CONTEXT),1)
@ -659,6 +659,10 @@ ifeq ($(HW_CONTEXT_MENU_DRIVERS), 1)
HAVE_ZARCH = 0
endif
ifeq ($(HAVE_RGUI),)
HAVE_RGUI = 1
endif
ifeq ($(HAVE_MATERIALUI),)
HAVE_MATERIALUI = 1
endif
@ -680,6 +684,7 @@ ifeq ($(HW_CONTEXT_MENU_DRIVERS), 1)
endif
else
HAVE_ZARCH ?= 0
HAVE_RGUI ?= 0
HAVE_MATERIALUI ?= 0
HAVE_NUKLEAR ?= 0
HAVE_XMB ?= 0
@ -687,53 +692,57 @@ else
HAVE_OZONE ?= 0
endif
ifeq ($(HAVE_RGUI), 1)
OBJ += menu/drivers/rgui.o
DEFINES += -DHAVE_MENU -DHAVE_RGUI
ifeq ($(HAVE_MENU), 1)
DEFINES += -DHAVE_MENU
HAVE_MENU_COMMON = 1
ifeq ($(HAVE_RGUI), 1)
OBJ += menu/drivers/rgui.o
DEFINES += -DHAVE_RGUI
endif
ifeq ($(HAVE_MATERIALUI), 1)
OBJ += menu/drivers/materialui.o
DEFINES += -DHAVE_MATERIALUI
HAVE_MENU_COMMON = 1
HAVE_ASSETS = 1
endif
ifeq ($(HAVE_NUKLEAR), 1)
OBJ += menu/drivers/nuklear/nk_common.o
OBJ += menu/drivers/nuklear/nk_menu.o
OBJ += menu/drivers/nuklear/nk_wnd_debug.o
OBJ += menu/drivers/nuklear.o
OBJ += menu/drivers/nuklear/nk_common.o \
menu/drivers/nuklear/nk_menu.o \
menu/drivers/nuklear/nk_wnd_debug.o \
menu/drivers/nuklear.o
DEFINES += -DHAVE_NUKLEAR
HAVE_ASSETS = 1
endif
ifeq ($(HAVE_ZARCH), 1)
OBJ += menu/drivers/zarch.o
DEFINES += -DHAVE_ZARCH
HAVE_ASSETS = 1
endif
endif
ifeq ($(HAVE_XMB), 1)
OBJ += menu/drivers/xmb.o
DEFINES += -DHAVE_XMB
HAVE_MENU_COMMON = 1
HAVE_ASSETS = 1
endif
ifeq ($(HAVE_XMB), 1)
OBJ += menu/drivers/xmb.o
DEFINES += -DHAVE_XMB
HAVE_ASSETS = 1
endif
ifeq ($(HAVE_OZONE), 1)
OBJ += menu/drivers/ozone/ozone.o
OBJ += menu/drivers/ozone/ozone_entries.o
OBJ += menu/drivers/ozone/ozone_display.o
OBJ += menu/drivers/ozone/ozone_texture.o
OBJ += menu/drivers/ozone/ozone_theme.o
OBJ += menu/drivers/ozone/ozone_sidebar.o
DEFINES += -DHAVE_OZONE
HAVE_MENU_COMMON = 1
HAVE_ASSETS = 1
endif
ifeq ($(HAVE_OZONE), 1)
OBJ += menu/drivers/ozone/ozone.o \
menu/drivers/ozone/ozone_entries.o \
menu/drivers/ozone/ozone_display.o \
menu/drivers/ozone/ozone_texture.o \
menu/drivers/ozone/ozone_theme.o \
menu/drivers/ozone/ozone_sidebar.o
DEFINES += -DHAVE_OZONE
HAVE_ASSETS = 1
endif
ifeq ($(HAVE_STRIPES), 1)
OBJ += menu/drivers/stripes.o
DEFINES += -DHAVE_STRIPES
ifeq ($(HAVE_STRIPES), 1)
OBJ += menu/drivers/stripes.o
DEFINES += -DHAVE_STRIPES
endif
endif
ifeq ($(HAVE_LAKKA), 1)
@ -1118,9 +1127,10 @@ ifeq ($(HAVE_GL_CONTEXT), 1)
gfx/common/metal_common.o \
gfx/drivers/metal.o \
gfx/drivers_font/metal_raster_font.o
ifeq ($(HAVE_MENU_COMMON), 1)
OBJ += menu/drivers_display/menu_display_metal.o
endif
ifeq ($(HAVE_MENU_COMMON), 1)
OBJ += menu/drivers_display/menu_display_metal.o
endif
endif
ifeq ($(HAVE_MPV), 1)
@ -1304,8 +1314,8 @@ ifeq ($(HAVE_D3D10), 1)
gfx/common/d3d10_common.o \
gfx/drivers_font/d3d10_font.o
ifeq ($(HAVE_MENU_COMMON), 1)
OBJ += menu/drivers_display/menu_display_d3d10.o
endif
OBJ += menu/drivers_display/menu_display_d3d10.o
endif
DEFINES += -DHAVE_D3D10
endif
@ -1327,8 +1337,8 @@ ifeq ($(HAVE_D3D12), 1)
gfx/common/d3d12_common.o \
gfx/drivers_font/d3d12_font.o
ifeq ($(HAVE_MENU_COMMON), 1)
OBJ += menu/drivers_display/menu_display_d3d12.o
endif
OBJ += menu/drivers_display/menu_display_d3d12.o
endif
DEFINES += -DHAVE_D3D12
HAVE_SLANG = 1
HAVE_GLSLANG = 1

View File

@ -62,6 +62,7 @@ else
HAVE_RPNG = 1
HAVE_RJPEG = 1
HAVE_RBMP = 1
HAVE_MENU = 1
HAVE_RGUI = 1
HAVE_ZLIB = 1
HAVE_7ZIP = 1

View File

@ -16,6 +16,7 @@ HAVE_OPENGLES = 1
HAVE_RJPEG = 0
HAVE_RPNG = 1
HAVE_EMSCRIPTEN = 1
HAVE_MENU = 1
HAVE_RGUI = 1
HAVE_SDL = 0
HAVE_SDL2 = 0

View File

@ -29,6 +29,7 @@ HAVE_WINMM := 1
HAVE_RPNG := 1
HAVE_ZLIB := 1
WANT_ZLIB := 1
HAVE_MENU := 1
HAVE_RGUI := 1
HAVE_XMB := 1
HAVE_MATERIALUI := 1

View File

@ -115,6 +115,7 @@ endif
HAVE_RPNG = 1
HAVE_RJPEG = 1
HAVE_RBMP = 1
HAVE_MENU = 1
HAVE_RGUI = 1
HAVE_ZLIB = 1
HAVE_7ZIP = 1

View File

@ -12,6 +12,7 @@ HAVE_NETPLAYDISCOVERY = 1
HAVE_STDIN_CMD = 1
HAVE_COMMAND = 1
HAVE_THREADS = 1
HAVE_MENU = 1
HAVE_RGUI = 1
HAVE_MATERIALUI = 1
HAVE_7ZIP = 1

View File

@ -277,7 +277,7 @@ check_val '' SDL2 -lSDL2 SDL2
check_enabled QT 'Qt companion'
if [ "$HAVE_QT" != 'no' ] && [ "$MOC_PATH" != 'none' ]; then
if [ "$HAVE_QT" != 'no' ] && [ "$MOC_PATH" != 'none' ] && [ "$HAVE_MENU" != 'no' ]; then
check_pkgconf QT5CORE Qt5Core 5.2
check_pkgconf QT5GUI Qt5Gui 5.2
check_pkgconf QT5WIDGETS Qt5Widgets 5.2
@ -562,16 +562,21 @@ fi
check_pkgconf PYTHON python3
if [ "$HAVE_MATERIALUI" != 'no' ] || [ "$HAVE_XMB" != 'no' ] || [ "$HAVE_ZARCH" != 'no' ] || [ "$HAVE_OZONE" != 'no' ]; then
if [ "$HAVE_RGUI" = 'no' ]; then
HAVE_MATERIALUI=no
HAVE_XMB=no
HAVE_STRIPES=no
HAVE_ZARCH=no
HAVE_OZONE=no
HAVE_QT=no
die : 'Notice: RGUI not available, other menus will also be disabled.'
elif [ "$HAVE_OPENGL" = 'no' ] && [ "$HAVE_OPENGLES" = 'no' ] && [ "$HAVE_VULKAN" = 'no' ]; then
if [ "$HAVE_MATERIALUI" = no ] &&
[ "$HAVE_OZONE" = no ] &&
[ "$HAVE_RGUI" = no ] &&
[ "$HAVE_XMB" = no ] &&
[ "$HAVE_NUKLEAR" = no ] &&
[ "$HAVE_STRIPES" = no ] &&
[ "$HAVE_ZARCH" = no ]; then
HAVE_MENU=no
HAVE_QT=no
die : 'Notice: No menu drivers available, the Qt menu will also be disabled.'
# TODO: RetroArch will crash on start if only the Qt menu driver is enabled.
fi
if [ "$HAVE_MENU" != 'no' ]; then
if [ "$HAVE_OPENGL" = 'no' ] && [ "$HAVE_OPENGLES" = 'no' ] && [ "$HAVE_VULKAN" = 'no' ]; then
if [ "$OS" = 'Win32' ]; then
HAVE_SHADERPIPELINE=no
HAVE_VULKAN=no
@ -580,11 +585,12 @@ if [ "$HAVE_MATERIALUI" != 'no' ] || [ "$HAVE_XMB" != 'no' ] || [ "$HAVE_ZARCH"
die : 'Notice: Hardware rendering context not available.'
else
HAVE_MATERIALUI=no
HAVE_OZONE=no
HAVE_XMB=no
HAVE_NUKLEAR=no
HAVE_STRIPES=no
HAVE_ZARCH=no
HAVE_OZONE=no
die : 'Notice: Hardware rendering context not available, XMB, MaterialUI, Ozone and ZARCH will also be disabled.'
die : 'Notice: Hardware rendering context not available, menu drivers will also be disabled.'
fi
fi
fi

View File

@ -7,7 +7,8 @@ HAVE_OPENGLES_CFLAGS= # C-flags for custom GLES library
HAVE_CACA=no # Libcaca support
HAVE_SIXEL=no # Libsixel support
HAVE_LIBRETRODB=yes # Libretrodb support
HAVE_RGUI=yes # RGUI menu
HAVE_MENU=yes # Enables menu drivers
HAVE_RGUI=auto # RGUI menu
HAVE_MATERIALUI=auto # MaterialUI menu
HAVE_XMB=auto # XMB menu
HAVE_OZONE=auto # Ozone menu