cm: Revert the new boot animation generation process
The servers do not have ImageMagick installed right now,
breaking the automated builds.
Revert this for now.
This reverts the following commits:
840e781408dc0de9efd8c18a65f69fbf6fab63ef bootanim: Use a for loop to make part# folders
ce5405d1f7dec6f1f2530f4604f2d6e88fa9fc3b Fix wrong bootanimation.zip from mkdir .../part{0..2}
6179d9494f6a1ab1da6258dd69a6949b6002f2f2 cm: Build bootanimation.zip
67ddf3728104a07902e8199e1980939c8798c42b cm: Rework boot animation generation
Change-Id: I63fc43da9b1a6afea5f791e879f0bfc9a385d98d
diff --git a/config/common.mk b/config/common.mk
index 3a5b0e4..0c1160e 100644
--- a/config/common.mk
+++ b/config/common.mk
@@ -1,5 +1,37 @@
PRODUCT_BRAND ?= cyanogenmod
+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 -1 vendor/cm/prebuilt/common/bootanimation | 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/cm/prebuilt/common/bootanimation/halfres/$(TARGET_BOOTANIMATION_NAME).zip
+else
+PRODUCT_BOOTANIMATION := vendor/cm/prebuilt/common/bootanimation/$(TARGET_BOOTANIMATION_NAME).zip
+endif
+endif
+
PRODUCT_BUILD_PROP_OVERRIDES += BUILD_UTC_DATE=0
ifeq ($(PRODUCT_GMS_CLIENTID_BASE),)
@@ -98,10 +130,6 @@
include vendor/cm/config/cmsdk_common.mk
endif
-# Bootanimation
-PRODUCT_PACKAGES += \
- bootanimation.zip
-
# Required CM packages
PRODUCT_PACKAGES += \
BluetoothExt \
diff --git a/config/common_full_phone.mk b/config/common_full_phone.mk
index 94798dc..6ee8c00 100644
--- a/config/common_full_phone.mk
+++ b/config/common_full_phone.mk
@@ -8,4 +8,9 @@
# Include CM LatinIME dictionaries
PRODUCT_PACKAGE_OVERLAYS += vendor/cm/overlay/dictionaries
+ifeq ($(TARGET_SCREEN_WIDTH) $(TARGET_SCREEN_HEIGHT),$(space))
+ PRODUCT_COPY_FILES += \
+ vendor/cm/prebuilt/common/bootanimation/480.zip:system/media/bootanimation.zip
+endif
+
$(call inherit-product, vendor/cm/config/telephony.mk)
diff --git a/config/common_full_tablet_wifionly.mk b/config/common_full_tablet_wifionly.mk
index 47e7845..8dc9332 100644
--- a/config/common_full_tablet_wifionly.mk
+++ b/config/common_full_tablet_wifionly.mk
@@ -7,3 +7,8 @@
# Include CM LatinIME dictionaries
PRODUCT_PACKAGE_OVERLAYS += vendor/cm/overlay/dictionaries
+
+ifeq ($(TARGET_SCREEN_WIDTH) $(TARGET_SCREEN_HEIGHT),$(space))
+ PRODUCT_COPY_FILES += \
+ vendor/cm/prebuilt/common/bootanimation/800.zip:system/media/bootanimation.zip
+endif
diff --git a/config/common_full_tv.mk b/config/common_full_tv.mk
index 10b2a5c..779b918 100644
--- a/config/common_full_tv.mk
+++ b/config/common_full_tv.mk
@@ -1,2 +1,7 @@
# Inherit common CM stuff
$(call inherit-product, vendor/cm/config/common_full.mk)
+
+ifeq ($(TARGET_SCREEN_WIDTH) $(TARGET_SCREEN_HEIGHT),$(space))
+ PRODUCT_COPY_FILES += \
+ vendor/cm/prebuilt/common/bootanimation/800.zip:system/media/bootanimation.zip
+endif
diff --git a/config/common_mini_phone.mk b/config/common_mini_phone.mk
index b4c0cb3..828b5b9 100644
--- a/config/common_mini_phone.mk
+++ b/config/common_mini_phone.mk
@@ -4,4 +4,9 @@
PRODUCT_PACKAGES += \
LatinIME
+ifeq ($(TARGET_SCREEN_WIDTH) $(TARGET_SCREEN_HEIGHT),$(space))
+ PRODUCT_COPY_FILES += \
+ vendor/cm/prebuilt/common/bootanimation/320.zip:system/media/bootanimation.zip
+endif
+
$(call inherit-product, vendor/cm/config/telephony.mk)
diff --git a/config/common_mini_tablet_wifionly.mk b/config/common_mini_tablet_wifionly.mk
index 285a55d..1d5810f 100644
--- a/config/common_mini_tablet_wifionly.mk
+++ b/config/common_mini_tablet_wifionly.mk
@@ -4,3 +4,8 @@
# Required CM packages
PRODUCT_PACKAGES += \
LatinIME
+
+ifeq ($(TARGET_SCREEN_WIDTH) $(TARGET_SCREEN_HEIGHT),$(space))
+ PRODUCT_COPY_FILES += \
+ vendor/cm/prebuilt/common/bootanimation/800.zip:system/media/bootanimation.zip
+endif
diff --git a/config/common_mini_tv.mk b/config/common_mini_tv.mk
index 86f1a6b..63f2bcf 100644
--- a/config/common_mini_tv.mk
+++ b/config/common_mini_tv.mk
@@ -1,2 +1,7 @@
# Inherit common CM stuff
$(call inherit-product, vendor/cm/config/common_mini.mk)
+
+ifeq ($(TARGET_SCREEN_WIDTH) $(TARGET_SCREEN_HEIGHT),$(space))
+ PRODUCT_COPY_FILES += \
+ vendor/cm/prebuilt/common/bootanimation/800.zip:system/media/bootanimation.zip
+endif