gui: Fix Android.mk for TW_CUSTOM_THEME

Change-Id: I7814e3960914ebefdc03cf9cf6f44e193efea932
This commit is contained in:
nkk71
2017-01-19 16:56:07 +02:00
committed by Dees Troy
parent e7c8856555
commit 6e4114f8b7
+22 -16
View File
@@ -90,6 +90,13 @@ LOCAL_MODULE_TAGS := eng
LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)$(TWRES_PATH)
TWRP_RES := $(commands_recovery_local_path)/gui/theme/common/fonts
TWRP_RES += $(commands_recovery_local_path)/gui/theme/common/languages
ifeq ($(TW_EXTRA_LANGUAGES),true)
TWRP_RES += $(commands_recovery_local_path)/gui/theme/extra-languages/fonts
TWRP_RES += $(commands_recovery_local_path)/gui/theme/extra-languages/languages
endif
ifeq ($(TW_CUSTOM_THEME),)
ifeq ($(TW_THEME),)
ifeq ($(DEVICE_RESOLUTION),)
@@ -114,31 +121,30 @@ ifeq ($(TW_CUSTOM_THEME),)
endif
endif
TWRP_THEME_LOC := $(commands_recovery_local_path)/gui/theme/$(TW_THEME)
TWRP_RES := $(commands_recovery_local_path)/gui/theme/common/fonts
TWRP_RES += $(commands_recovery_local_path)/gui/theme/common/languages
TWRP_RES += $(commands_recovery_local_path)/gui/theme/common/$(word 1,$(subst _, ,$(TW_THEME))).xml
ifeq ($(TW_EXTRA_LANGUAGES),true)
TWRP_RES += $(commands_recovery_local_path)/gui/theme/extra-languages/fonts
TWRP_RES += $(commands_recovery_local_path)/gui/theme/extra-languages/languages
TWRP_THEME_LOC := $(commands_recovery_local_path)/gui/theme/$(TW_THEME)
TWRP_RES += $(commands_recovery_local_path)/gui/theme/common/$(word 1,$(subst _, ,$(TW_THEME))).xml
# for future copying of used include xmls and fonts:
# UI_XML := $(TWRP_THEME_LOC)/ui.xml
# TWRP_INCLUDE_XMLS := $(shell xmllint --xpath '/recovery/include/xmlfile/@name' $(UI_XML)|sed -n 's/[^\"]*\"\([^\"]*\)\"[^\"]*/\1\n/gp'|sort|uniq)
# TWRP_FONTS_TTF := $(shell xmllint --xpath '/recovery/resources/font/@filename' $(UI_XML)|sed -n 's/[^\"]*\"\([^\"]*\)\"[^\"]*/\1\n/gp'|sort|uniq)niq)
else
TWRP_THEME_LOC := $(TW_CUSTOM_THEME)
endif
# for future copying of used include xmls and fonts:
# UI_XML := $(TWRP_THEME_LOC)/ui.xml
# TWRP_INCLUDE_XMLS := $(shell xmllint --xpath '/recovery/include/xmlfile/@name' $(UI_XML)|sed -n 's/[^\"]*\"\([^\"]*\)\"[^\"]*/\1\n/gp'|sort|uniq)
# TWRP_FONTS_TTF := $(shell xmllint --xpath '/recovery/resources/font/@filename' $(UI_XML)|sed -n 's/[^\"]*\"\([^\"]*\)\"[^\"]*/\1\n/gp'|sort|uniq)niq)
TWRP_RES += $(TW_ADDITIONAL_RES)
ifeq ($(wildcard $(TWRP_THEME_LOC)/ui.xml),)
$(warning ****************************************************************************)
$(warning * TW_THEME is not valid: '$(TW_THEME)')
ifeq ($(TW_CUSTOM_THEME),)
$(warning * TW_THEME is not valid: '$(TW_THEME)')
else
$(warning * TW_CUSTOM_THEME is not valid: '$(TW_CUSTOM_THEME)')
endif
$(warning * Please choose an appropriate TW_THEME or create a new one for your device.)
$(warning * Available themes:)
$(warning * $(notdir $(wildcard $(commands_recovery_local_path)/gui/theme/*_*)))
$(warning ****************************************************************************)
$(error stopping)
endif
else
TWRP_THEME_LOC := $(TW_CUSTOM_THEME)
endif
TWRP_RES += $(TW_ADDITIONAL_RES)
TWRP_RES_GEN := $(intermediates)/twrp
$(TWRP_RES_GEN):