diff options
author | Tor Lillqvist <tml@iki.fi> | 2012-11-21 14:55:09 +0200 |
---|---|---|
committer | Tor Lillqvist <tlillqvist@suse.com> | 2012-11-21 15:05:13 +0200 |
commit | 970b53e050014006997410be046366fd8f1023f1 (patch) | |
tree | 585ab80ffcda3ab6237fbaca48de9120d050a592 /android | |
parent | f5cc79a1202f3c8933d846756cf0a9fe8df49682 (diff) |
Enable storing some files gzipped in the .apk
We gzip them separately in the Makefile and the gzipped result will be
stored without (further) compression in the .apk.
Use this to store the ttf font files. Shaves off a bit .apk size.
This might seem a bit odd way to do it, why not store these files in
the normal Zip compressed fashion in the .apk? It seems hard to tell
Ant (based on path, not extension) what files to compress and what
not, so we have to keep telling it to not (further) compress any files
at all.
Change-Id: I0d40d8811e6c9df6b28c285845b1db225507f5d4
Diffstat (limited to 'android')
-rw-r--r-- | android/Bootstrap/src/org/libreoffice/android/Bootstrap.java | 6 | ||||
-rw-r--r-- | android/experimental/LibreOffice4Android/Makefile | 8 |
2 files changed, 9 insertions, 5 deletions
diff --git a/android/Bootstrap/src/org/libreoffice/android/Bootstrap.java b/android/Bootstrap/src/org/libreoffice/android/Bootstrap.java index 2c8d2e7b31d1..7b01eb89921e 100644 --- a/android/Bootstrap/src/org/libreoffice/android/Bootstrap.java +++ b/android/Bootstrap/src/org/libreoffice/android/Bootstrap.java @@ -59,6 +59,7 @@ public class Bootstrap extends NativeActivity // seems. private static native boolean setup(String dataDir, + String cacheDir, String apkFile, String[] ld_library_path); @@ -133,7 +134,10 @@ public class Bootstrap extends NativeActivity String[] llpa = llp.split(":"); - if (!setup(dataDir, activity.getApplication().getPackageResourcePath(), llpa)) + if (!setup(dataDir, + activity.getApplication().getCacheDir().getAbsolutePath(), + activity.getApplication().getPackageResourcePath(), + llpa)) return; // Extract files from the .apk that can't be used mmapped directly from it diff --git a/android/experimental/LibreOffice4Android/Makefile b/android/experimental/LibreOffice4Android/Makefile index bbe1587a2252..c48635ca128d 100644 --- a/android/experimental/LibreOffice4Android/Makefile +++ b/android/experimental/LibreOffice4Android/Makefile @@ -118,13 +118,13 @@ copy-stuff: # understand "/assets" paths. mkdir -p assets/unpack/etc/fonts cp fonts.conf assets/unpack/etc/fonts - mkdir -p assets/unpack/user/fonts # $UserInstallation/user/fonts is added to the fontconfig path in # vcl/generic/fontmanager/helper.cxx: psp::getFontPath(). UserInstallation is # set to the app's data dir above. - cp $(OUTDIR)/pck/Liberation*.ttf assets/unpack/user/fonts - cp $(OUTDIR)/pck/Gen*.ttf assets/unpack/user/fonts - cp $(OUTDIR)/pck/opens___.ttf assets/unpack/user/fonts + mkdir -p assets/gz.unpack/user/fonts + for F in $(OUTDIR)/pck/Liberation*.ttf $(OUTDIR)/pck/Gen*.ttf $(OUTDIR)/pck/opens___.ttf; do \ + gzip -9 <$$F >assets/gz.unpack/user/fonts/`basename $$F`; \ + done # # Then gdbserver and gdb.setup so that we can debug with ndk-gdb. # |