From accb8bba374240f783f817832af5fd1c7024f87e Mon Sep 17 00:00:00 2001 From: Tad Date: Mon, 25 Jun 2018 09:34:50 -0400 Subject: [PATCH] Implement choice between gradient and plasma for boot animation shine --- Scripts/Common/Functions.sh | 10 +++++++--- Scripts/LineageOS-14.1/Rebrand.sh | 2 +- Scripts/LineageOS-15.1/Rebrand.sh | 2 +- Scripts/init.sh | 1 + 4 files changed, 10 insertions(+), 5 deletions(-) diff --git a/Scripts/Common/Functions.sh b/Scripts/Common/Functions.sh index 296ddb66..73beb4bd 100644 --- a/Scripts/Common/Functions.sh +++ b/Scripts/Common/Functions.sh @@ -97,9 +97,13 @@ export -f generateBootAnimationMask; generateBootAnimationShine() { color=$1; - output=$2; - #convert -size 1024x128 -define gradient:angle=90 plasma:"$color" \( +clone -flop \) +append "$output"; - convert -size 2048x128 plasma:"$color" "$output"; + style=$2; + output=$3; + if [ "$style" = "gradient"]; then + convert -size 1024x128 -define gradient:angle=90 plasma:"$color" \( +clone -flop \) +append "$output"; + elif [ "$style" = "plasma" ]; then + convert -size 2048x128 plasma:"$color" "$output"; + fi; } export -f generateBootAnimationShine; diff --git a/Scripts/LineageOS-14.1/Rebrand.sh b/Scripts/LineageOS-14.1/Rebrand.sh index 5128c8ad..7ec867bc 100644 --- a/Scripts/LineageOS-14.1/Rebrand.sh +++ b/Scripts/LineageOS-14.1/Rebrand.sh @@ -30,7 +30,7 @@ sed -i '/CM_TARGET_PACKAGE/s/lineage/'"$REBRAND_ZIP_PREFIX"'/' core/Makefile; enter "frameworks/base"; generateBootAnimationMask "$REBRAND_NAME" "$REBRAND_BOOTANIMATION_FONT" core/res/assets/images/android-logo-mask.png; -generateBootAnimationShine "$REBRAND_BOOTANIMATION_COLOR" core/res/assets/images/android-logo-shine.png; +generateBootAnimationShine "$REBRAND_BOOTANIMATION_COLOR" "$REBRAND_BOOTANIMATION_STYLE" core/res/assets/images/android-logo-shine.png; enter "packages/apps/Settings"; sed -i '/.*cmlicense_title/s/LineageOS/'"$REBRAND_NAME"'/' res/values*/cm_strings.xml; diff --git a/Scripts/LineageOS-15.1/Rebrand.sh b/Scripts/LineageOS-15.1/Rebrand.sh index 277942bf..6d6c2437 100644 --- a/Scripts/LineageOS-15.1/Rebrand.sh +++ b/Scripts/LineageOS-15.1/Rebrand.sh @@ -36,7 +36,7 @@ sed -i 's|echo "ro.build.host=`hostname`"|echo "ro.build.host=dosbm"|' tools/bui enter "frameworks/base"; generateBootAnimationMask "$REBRAND_NAME" "$REBRAND_BOOTANIMATION_FONT" core/res/assets/images/android-logo-mask.png; -generateBootAnimationShine "$REBRAND_BOOTANIMATION_COLOR" core/res/assets/images/android-logo-shine.png; +generateBootAnimationShine "$REBRAND_BOOTANIMATION_COLOR" "$REBRAND_BOOTANIMATION_STYLE" core/res/assets/images/android-logo-shine.png; enter "lineage-sdk"; sed -i '/.*lineage_version/s/LineageOS/'"$REBRAND_NAME"'/' lineage/res/res/values*/strings.xml; diff --git a/Scripts/init.sh b/Scripts/init.sh index 42b67fc7..3ea7b103 100644 --- a/Scripts/init.sh +++ b/Scripts/init.sh @@ -36,6 +36,7 @@ export NON_COMMERCIAL_USE_PATCHES=false; #Switch to false to prevent inclusion o export REBRAND_NAME="DivestOS"; export REBRAND_ZIP_PREFIX="divested"; export REBRAND_BOOTANIMATION_FONT="Fira-Sans-Bold"; #Options: $ convert -list font +export REBRAND_BOOTANIMATION_STYLE="plasma"; #Options: gradient, plasma #export REBRAND_BOOTANIMATION_COLOR="#FF5722-#FF8A65"; #gradient export REBRAND_BOOTANIMATION_COLOR="#FF5722-#03A9F4"; #plasma export REBRAND_LEGAL="https://divestos.xyz/index.php?page=privacy_policy";