mirror of
https://gitlab.com/Nanolx/NanoDroid
synced 2024-10-31 09:20:23 +00:00
CommonInstaller: update swipe lib installation routine
This commit is contained in:
parent
fbb0431e88
commit
f2377b8ab6
@ -413,6 +413,51 @@ detect_arch () {
|
||||
* ) GSYNC_UNSUPPORTED=1 ;;
|
||||
esac
|
||||
|
||||
|
||||
case ${ARCH} in
|
||||
arm )
|
||||
case ${SDK_VERSION} in
|
||||
19 | 21 | 22 | 23 | 27 | 28 )
|
||||
LIBJNI_IME=lib_latinimegoogle.so_${SDK_VERSION}
|
||||
;;
|
||||
24 | 25 | 26 )
|
||||
LIBJNI_IME=lib_latinimegoogle.so_23
|
||||
;;
|
||||
* )
|
||||
SWIPE_UNSUPPORTED=1
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
|
||||
arm64 )
|
||||
case ${SDK_VERSION} in
|
||||
21 | 22 | 23 | 27 | 28 )
|
||||
LIBJNI_IME=lib_latinimegoogle.so_${SDK_VERSION}
|
||||
;;
|
||||
24 | 25 | 26 )
|
||||
LIBJNI_IME=lib_latinimegoogle.so_23
|
||||
;;
|
||||
* )
|
||||
SWIPE_UNSUPPORTED=1
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
|
||||
x86 | x86_64 )
|
||||
case ${SDK_VERSION} in
|
||||
19 | 21 | 22 )
|
||||
SWIPE_UNSUPPORTED=1
|
||||
;;
|
||||
23 | 24 | 25 | 26 | 27 | 28 )
|
||||
LIBJNI_IME=lib_latinimegoogle.so
|
||||
;;
|
||||
* )
|
||||
SWIPE_UNSUPPORTED=1
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
|
||||
if [[ "${SDK_VERSION}" -lt 21 ]]; then
|
||||
UNFOLD_APP_DIR=1
|
||||
else UNFOLD_APP_DIR=0
|
||||
@ -946,21 +991,28 @@ install_initd () {
|
||||
}
|
||||
|
||||
install_swipe () {
|
||||
if [ "${nanodroid_swipe}" -eq 1 ]; then
|
||||
ui_print " << with swipe libraries"
|
||||
if [ "${nanodroid_swipe}" ]; then
|
||||
if [ "${SWIPE_UNSUPPORTED}" -eq 1 ]; then
|
||||
ui_print " << Swipe Libraries are unsupported on pre-KitKat ROMs"
|
||||
else
|
||||
ui_print " << with swipe libraries"
|
||||
|
||||
SWIPE_SRC="${INSTALLER}/swipe/${ARCH}"
|
||||
SWIPE_DEST="/system/${SWIPE_LIBDIR}"
|
||||
SWIPE_SRC="${INSTALLER}/swipe/${ARCH}"
|
||||
SWIPE_DEST="/system/${SWIPE_LIBDIR}"
|
||||
|
||||
mkdir -p "${MODPATH}${SWIPE_DEST}"
|
||||
mkdir -p "${MODPATH}${SWIPE_DEST}"
|
||||
|
||||
for lib in latinimegoogle keyboarddecoder; do
|
||||
cp "${SWIPE_SRC}/libjni_${lib}.so" "${MODPATH}${SWIPE_DEST}" || \
|
||||
error "failed to install libjni_${lib}.so"
|
||||
set_perm_data "${MODPATH}${SWIPE_DEST}/libjni_${lib}.so"
|
||||
cp "${SWIPE_SRC}/libjni_keyboarddecoder.so" "${MODPATH}${SWIPE_DEST}" || \
|
||||
error "failed to install libjni_keyboarddecoder.so"
|
||||
set_perm_data "${MODPATH}${SWIPE_DEST}/libjni_keyboarddecoder.so"
|
||||
|
||||
installinfo_add "${SWIPE_DEST}/libjni_${lib}.so"
|
||||
done
|
||||
cp "${SWIPE_SRC}/${LIBJNI_IME}" "${MODPATH}${SWIPE_DEST}/libjni_latinimegoogle.so" || \
|
||||
error "failed to install libjni_latinimegoogle.so"
|
||||
set_perm_data "${MODPATH}${SWIPE_DEST}/libjni_latinimegoogle.so"
|
||||
|
||||
installinfo_add "${SWIPE_DEST}/libjni_keyboarddecoder.so"
|
||||
installinfo_add "${SWIPE_DEST}/libjni_latinimegoogle.so"
|
||||
fi
|
||||
else ui_print " << without swipe libraries"
|
||||
fi
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user