aboutsummaryrefslogtreecommitdiffstats
path: root/java
diff options
context:
space:
mode:
authorPo Lu2024-06-12 16:44:21 +0800
committerPo Lu2024-06-12 16:44:21 +0800
commit02e70821b3800a082aec215a9ab8adbfafe9ad76 (patch)
tree87daf46f3c3efadaaa93ea859f48541bfe7e6b34 /java
parentf543ec18f44fa64d06e1ab45e1484326f8451ebe (diff)
downloademacs-02e70821b3800a082aec215a9ab8adbfafe9ad76.tar.gz
emacs-02e70821b3800a082aec215a9ab8adbfafe9ad76.zip
Restore functionality on Android 2.2
* java/Makefile.in (install_temp): Do not compress directory-tree and generate such files in a special format that stores file sizes. * lib-src/asset-directory-tool.c (struct directory_tree): New field st_size. (need_file_size): New variable. (main_1, main_2, main): Write file sizes before sibling offsets if `--api-8' is specified. * src/android-asset.h (struct android_asset_manager): New field open. (struct android_asset): New field name. (AAssetManager_fromJava): Load AssetManager#open. (AAssetManager_open): If a directory tree has already been loaded, search for a matching asset and load its size thence, to avoid the requirement of an AssetFileDescriptor. (AAsset_close): Don't assume asset->fd exists. Release asset->name. (AAsset_getLength): Likewise. (android_asset_create_stream): If asset->name exists, call AssetManager#open, in order to open compressed files. * src/androidvfs.c (OLD_ANDROID_ASSETS): Define to 1 on API 8. (android_extract_long, android_scan_directory_tree): Mark arguments as const. Adjust offsets when OLD_ANDROID_ASSETS. (android_is_directory, android_init_assets, android_afs_readdir): Likewise. * src/lread.c (lread_fstat): Define to sys_fstat, not fstat.
Diffstat (limited to 'java')
-rw-r--r--java/Makefile.in4
1 files changed, 3 insertions, 1 deletions
diff --git a/java/Makefile.in b/java/Makefile.in
index fd076c089ff..8cc2235b9f3 100644
--- a/java/Makefile.in
+++ b/java/Makefile.in
@@ -258,7 +258,8 @@ install_temp: $(CROSS_BINS) $(CROSS_LIBS) $(RESOURCE_FILES)
258 { hostname; date +%s; } > install_temp/assets/build_info 258 { hostname; date +%s; } > install_temp/assets/build_info
259# Produce the file index. 259# Produce the file index.
260 $(AM_V_SILENT) $(libsrc)/asset-directory-tool \ 260 $(AM_V_SILENT) $(libsrc)/asset-directory-tool \
261 install_temp/assets install_temp/assets/directory-tree 261 install_temp/assets install_temp/assets/directory-tree\
262 $(if $(ANDROID_SDK_8_OR_EARLIER),--api-8)
262# If the package targets Android 2.2, move compressable and 263# If the package targets Android 2.2, move compressable and
263# non-compressable assets to separate directories. 264# non-compressable assets to separate directories.
264 $(AM_V_SILENT) \ 265 $(AM_V_SILENT) \
@@ -266,6 +267,7 @@ install_temp: $(CROSS_BINS) $(CROSS_LIBS) $(RESOURCE_FILES)
266 echo "Moving large and gzipped files to separate directories...">&2;\ 267 echo "Moving large and gzipped files to separate directories...">&2;\
267 mkdir -p install_temp/assets_raw; \ 268 mkdir -p install_temp/assets_raw; \
268 cd install_temp/assets; \ 269 cd install_temp/assets; \
270 mv directory-tree ../assets_raw; \
269 find . \( -size +1536 -o -size 1536 \) \ 271 find . \( -size +1536 -o -size 1536 \) \
270 \( \! -name '*.gz' \) -type f > files.txt; \ 272 \( \! -name '*.gz' \) -type f > files.txt; \
271 tar cf ../assets_raw/largefiles.tar -T files.txt; \ 273 tar cf ../assets_raw/largefiles.tar -T files.txt; \