-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
migrate from lzma to zip file. #5264
Conversation
d0a69ea
to
3a8beda
Compare
Also needs: diff --git a/kodev b/kodev
index e44e064b..4f8b7d15 100755
--- a/kodev
+++ b/kodev
@@ -9,15 +9,7 @@ fi
# Default Android build to arm.
ANDROID_ARCH="${ANDROID_ARCH:-arm}"
-if [ -z "${ANDROID_FULL_ARCH}" ]; then
- if [ "${ANDROID_ARCH}" = "arm" ]; then
- ANDROID_FULL_ARCH_APK="${ANDROID_FULL_ARCH_APK:-arm-linux-androideabi}"
- elif [ "${ANDROID_ARCH}" = "x86" ]; then
- ANDROID_FULL_ARCH_APK="${ANDROID_FULL_ARCH_APK:-i686-linux-android}"
- else
- ANDROID_FULL_ARCH_APK="${ANDROID_ARCH}"
- fi
-fi
+
# Default to Android 4.0+; required for NDK 15 but with a custom NDK the strict minimum is 9.
NDKABI=${NDKABI:-14}
export NDKABI
@@ -625,7 +617,7 @@ TARGET:
# uninstall existing package to make sure *everything* is gone from memory
# no assert_ret_zero; uninstall is allowed to fail if there's nothing to uninstall
adb uninstall "org.koreader.launcher"
- adb install "koreader-android-${ANDROID_FULL_ARCH_APK}${KODEBUG_SUFFIX}-${VERSION}.apk"
+ adb install "koreader-android-${ANDROID_ARCH}${KODEBUG_SUFFIX}-${VERSION}.apk"
assert_ret_zero $?
# there's no adb run so we do this…
adb shell monkey -p org.koreader.launcher -c android.intent.category.LAUNCHER 1 |
@pazos I seem to be missing some libraries in my APK:
But they also exist here? Bit confused tbh.
|
Ops, I didn't notice. Good catch!
|
Oh, you're right. I hadn't noticed.
|
So the change from lzma to zip increases the assets 3'1MB on release builds. (Lastest x86 nightly has a 7z package of 32,9MB while the same assets compressed as a zip take 36MB) There are a few micro optimizations that can save us a few KB:
I think we need to take a decission about Noto: NotoSansCJKsc-Regular has a size of 17,3MB. All the rest of Noto fonts have a size of 4MB together. If we want to keep CJK support in place we might to remove the rest of Noto fonts and use Roboto instead. Probably all phones with 4.0+ on CJK countries have NotoSans/NotoSerif CJK available as a system font. This is difficult to check for me :/ |
@pazos: At worst we've established that mostly everything should have Droid Fallback, so, eh, that's good enough for me. That already used to be our CJK fallback back in the day. |
Yeah, older Androids have Droid Fallback until Noto showed up. The only exception would be if a manufacturer removed the default fonts, which would be pretty crazy but then again it's Android. One can of course always just grab the fonts from https://github.com/koreader/koreader-fonts/tree/master/noto and stick 'em in |
3a8beda
to
87e771f
Compare
@Frenzie: as the libs thingy is going to take some time I think we can move to zip and do the fonts thing before. |
Sure, just merge the zip migration when ready and then I can look into the font thing tomorrow. |
no need to chmod binaries as they are uncompressed on each update, A becomes android
87e771f
to
7381e1d
Compare
Just a note, not sure it's related, but letting you know. I then just uninstalled koreader and installed that same nightly: got the rolling thingy only once - no more on each launch. (Dunno if we need/can do something, users will get that if they don't think about reinstalling.) |
@poire-z: it happened to me a few times before the change but I couldn't manage to reproduce after the change. In any case we shouldn't show the dialog unless we are extracting something. |
Follow-up to <koreader#5252>. This greatly reduces the Android package size. See discussion in <koreader#5264 (comment)>.
Follow-up to <#5252>. This greatly reduces the Android package size. See discussion in <#5264 (comment)>.
Follow-up to <koreader#5252>. This greatly reduces the Android package size. See discussion in <koreader#5264 (comment)>.
Requires koreader/android-luajit-launcher#174
and koreader/android-luajit-launcher#175The main benefit of having the libraries outside the zip file is that they will be installed when installing the application instead of copying them on the first run (it could save a few seconds)
Edit: I'm leaving the libs thingy for the future.