Skip to content

Commit

Permalink
smooth upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
CorySanin committed Jun 2, 2019
1 parent 7612483 commit 9f85926
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 31 deletions.
8 changes: 5 additions & 3 deletions README.md
Expand Up @@ -14,9 +14,11 @@ note: bolded sets are out-of-date and could use an update! 😉

## Installation

Install through Magisk Manager.
Install through Magisk Manager. Select the desired emoji set using the volume buttons. Upgrades will retain the selected emoji set. To undo the modification, remove the module.

## Changelog

### v1.0
- Still WIP
### v0.0.1
- Get the project off the ground
- Using any ttf files I can find
- Please help!
57 changes: 31 additions & 26 deletions common/unity_install.sh
@@ -1,48 +1,53 @@
setEmoji(){
mkdir $MODPATH
mkdir $MODPATH/system
mkdir $MODPATH/system/fonts
if [ ! -e $TMPDIR/fonts/$1 ]; then
abort "! font doesn't exist."
fi
mkdir -p $MODPATH/system/fonts
cp $TMPDIR/fonts/$1 $MODPATH/system/fonts/NotoColorEmoji.ttf
cp $TMPDIR/fonts/$1 $MODPATH/system/fonts/SamsungColorEmoji.ttf
cp $TMPDIR/fonts/$1 $MODPATH/system/fonts/hTC_ColorEmoji.ttf
echo $1 >> $MODPATH/font.txt
ui_print "Installed $1."
}

if [ ! $BOOTMODE ]; then
abort "! Flash using Magisk manager"
fi


ui_print "~~ For this install, vol up is yes and vol down is no. ~~"

ui_print "Would you like to use Twemoji?"
if $VKSEL; then
setEmoji twitter.ttf
if [ -e $TMPDIR/font.txt ]; then
setEmoji "$(cat $TMPDIR/font.txt)"
else
ui_print "Would you like to use JoyPixels?"
ui_print "~~ For this install, vol up is yes and vol down is no. ~~"

ui_print "Would you like to use Twemoji?"
if $VKSEL; then
setEmoji joypixels-android.ttf
setEmoji twitter.ttf
else
ui_print "Would you like to use Google's emojiset?"
ui_print "Would you like to use JoyPixels?"
if $VKSEL; then
setEmoji NotoColorEmoji.ttf
setEmoji joypixels-android.ttf
else
# ui_print "Would you like to use Microsoft's emojiset?"
# if $VKSEL; then
# setEmoji microsoft.ttf
# else
ui_print "Would you like to use Apple's emojiset?"
if $VKSEL; then
setEmoji apple.ttf
else
ui_print "Would you like to use Samsung's garbage emojiset?"
ui_print "Would you like to use Google's emojiset?"
if $VKSEL; then
setEmoji NotoColorEmoji.ttf
else
# ui_print "Would you like to use Microsoft's emojiset?"
# if $VKSEL; then
# setEmoji microsoft.ttf
# else
ui_print "Would you like to use Apple's emojiset?"
if $VKSEL; then
setEmoji SamsungColorEmoji.ttf
setEmoji apple.ttf
else
abort "! no emojiset was chosen."
ui_print "Would you like to use Samsung's emojiset?"
if $VKSEL; then
setEmoji SamsungColorEmoji.ttf
else
abort "! no emojiset was chosen."
fi
fi
fi
# fi
# fi
fi
fi
fi
fi
6 changes: 6 additions & 0 deletions common/unity_upgrade.sh
@@ -1,3 +1,9 @@
# Things that ONLY run during an upgrade - you probably won't need this
# A use for this would be to back up app data before it's wiped if your module includes an app
# NOTE: the normal upgrade process is just an uninstall followed by an install
mkdir -p ${MODPATH}
cp -f "${MODPATH}/../../modules/${MODID}/font.txt" "${TMPDIR}/font.txt"

if [ -e $TMPDIR/font.txt ]; then
rm -rf "${TMPDIR}/addon/Volume-Key-Selector"
fi
4 changes: 2 additions & 2 deletions module.prop
@@ -1,7 +1,7 @@
id=emoji-switch-guy
name=Emoji Switch Guy
version=v1.0
version=v0.0.1
versionCode=1
author=CorySanin
description=Systemlessly replace your emoji set
support=
support=https://github.com/CorySanin/emoji-switch-guy

0 comments on commit 9f85926

Please sign in to comment.