diff options
author | Wolfgang Wiedmeyer <wolfgit@wiedmeyer.de> | 2017-06-23 13:04:25 +0200 |
---|---|---|
committer | Wolfgang Wiedmeyer <wolfgit@wiedmeyer.de> | 2017-06-23 13:04:25 +0200 |
commit | da76a3e2885db98a332ee125e05e09b8d8e22c03 (patch) | |
tree | 7adc49c29cf0d84f8b9752ad77f5fa2cc1c5c517 | |
parent | fbea83bdb5f78958b3672654cf9c26fbe489ee7b (diff) | |
download | vendor_replicant-da76a3e2885db98a332ee125e05e09b8d8e22c03.zip vendor_replicant-da76a3e2885db98a332ee125e05e09b8d8e22c03.tar.gz vendor_replicant-da76a3e2885db98a332ee125e05e09b8d8e22c03.tar.bz2 |
simplify (and fix) boot animation selection
Signed-off-by: Wolfgang Wiedmeyer <wolfgit@wiedmeyer.de>
-rw-r--r-- | config/common.mk | 34 | ||||
-rw-r--r-- | config/common_full_phone.mk | 2 | ||||
-rw-r--r-- | config/common_full_tablet_wifionly.mk | 2 | ||||
-rw-r--r-- | config/common_mini_phone.mk | 2 | ||||
-rw-r--r-- | config/common_mini_tablet_wifionly.mk | 2 |
5 files changed, 7 insertions, 35 deletions
diff --git a/config/common.mk b/config/common.mk index 70ab777..66d1834 100644 --- a/config/common.mk +++ b/config/common.mk @@ -1,36 +1,8 @@ PRODUCT_BRAND ?= replicant -ifneq ($(TARGET_SCREEN_WIDTH) $(TARGET_SCREEN_HEIGHT),$(space)) -# determine the smaller dimension -TARGET_BOOTANIMATION_SIZE := $(shell \ - if [ $(TARGET_SCREEN_WIDTH) -lt $(TARGET_SCREEN_HEIGHT) ]; then \ - echo $(TARGET_SCREEN_WIDTH); \ - else \ - echo $(TARGET_SCREEN_HEIGHT); \ - fi ) - -# get a sorted list of the sizes -bootanimation_sizes := $(subst .zip,, $(shell ls vendor/replicant/prebuilt/common/bootanimation)) -bootanimation_sizes := $(shell echo -e $(subst $(space),'\n',$(bootanimation_sizes)) | sort -rn) - -# find the appropriate size and set -define check_and_set_bootanimation -$(eval TARGET_BOOTANIMATION_NAME := $(shell \ - if [ -z "$(TARGET_BOOTANIMATION_NAME)" ]; then - if [ $(1) -le $(TARGET_BOOTANIMATION_SIZE) ]; then \ - echo $(1); \ - exit 0; \ - fi; - fi; - echo $(TARGET_BOOTANIMATION_NAME); )) -endef -$(foreach size,$(bootanimation_sizes), $(call check_and_set_bootanimation,$(size))) - -ifeq ($(TARGET_BOOTANIMATION_HALF_RES),true) -PRODUCT_BOOTANIMATION := vendor/replicant/prebuilt/common/bootanimation/halfres/$(TARGET_BOOTANIMATION_NAME).zip -else -PRODUCT_BOOTANIMATION := vendor/replicant/prebuilt/common/bootanimation/$(TARGET_BOOTANIMATION_NAME).zip -endif +ifneq ($(TARGET_BOOTANIMATION_NAME),) + PRODUCT_COPY_FILES += \ + vendor/replicant/prebuilt/common/bootanimation/$(TARGET_BOOTANIMATION_NAME).zip:system/media/bootanimation.zip endif PRODUCT_BUILD_PROP_OVERRIDES += BUILD_UTC_DATE=0 diff --git a/config/common_full_phone.mk b/config/common_full_phone.mk index 222e944..ff86d7a 100644 --- a/config/common_full_phone.mk +++ b/config/common_full_phone.mk @@ -8,7 +8,7 @@ PRODUCT_PACKAGES += \ # Include CM LatinIME dictionaries PRODUCT_PACKAGE_OVERLAYS += vendor/replicant/overlay/dictionaries -ifeq ($(TARGET_SCREEN_WIDTH) $(TARGET_SCREEN_HEIGHT),$(space)) +ifeq ($(TARGET_BOOTANIMATION_NAME),) PRODUCT_COPY_FILES += \ vendor/replicant/prebuilt/common/bootanimation/vertical-480x800.zip:system/media/bootanimation.zip endif diff --git a/config/common_full_tablet_wifionly.mk b/config/common_full_tablet_wifionly.mk index 0afa867..f62a146 100644 --- a/config/common_full_tablet_wifionly.mk +++ b/config/common_full_tablet_wifionly.mk @@ -8,7 +8,7 @@ PRODUCT_PACKAGES += \ # Include CM LatinIME dictionaries PRODUCT_PACKAGE_OVERLAYS += vendor/replicant/overlay/dictionaries -ifeq ($(TARGET_SCREEN_WIDTH) $(TARGET_SCREEN_HEIGHT),$(space)) +ifeq ($(TARGET_BOOTANIMATION_NAME),) PRODUCT_COPY_FILES += \ vendor/replicant/prebuilt/common/bootanimation/horizontal-1280x800.zip:system/media/bootanimation.zip endif diff --git a/config/common_mini_phone.mk b/config/common_mini_phone.mk index f5bd27f..89827ca 100644 --- a/config/common_mini_phone.mk +++ b/config/common_mini_phone.mk @@ -4,7 +4,7 @@ $(call inherit-product, vendor/replicant/config/common_mini.mk) PRODUCT_PACKAGES += \ LatinIME -ifeq ($(TARGET_SCREEN_WIDTH) $(TARGET_SCREEN_HEIGHT),$(space)) +ifeq ($(TARGET_BOOTANIMATION_NAME),) PRODUCT_COPY_FILES += \ vendor/replicant/prebuilt/common/bootanimation/vertical-320x480.zip:system/media/bootanimation.zip endif diff --git a/config/common_mini_tablet_wifionly.mk b/config/common_mini_tablet_wifionly.mk index fa00a63..e7131d4 100644 --- a/config/common_mini_tablet_wifionly.mk +++ b/config/common_mini_tablet_wifionly.mk @@ -5,7 +5,7 @@ $(call inherit-product, vendor/replicant/config/common_mini.mk) PRODUCT_PACKAGES += \ LatinIME -ifeq ($(TARGET_SCREEN_WIDTH) $(TARGET_SCREEN_HEIGHT),$(space)) +ifeq ($(TARGET_BOOTANIMATION_NAME),) PRODUCT_COPY_FILES += \ vendor/replicant/prebuilt/common/bootanimation/horizontal-1024x600.zip:system/media/bootanimation.zip endif |