AssetManager: use libandroidfw instead of ARSClib for resources.arsc parsing

This reduces startup time and RAM usage. Not yet feature complete with
the ARSClib based implementation, but Gravity Defied runs already
This commit is contained in:
Julian Winkler
2024-01-26 12:42:06 +01:00
parent 6136243fec
commit 3284518418
5 changed files with 197 additions and 90 deletions

View File

@@ -25,6 +25,9 @@ libdl_bio_dep = [
libskia_dep = [
cc.find_library('SkiaSharp')
]
libandroidfw_dep = [
cc.find_library('androidfw', dirs : [ '/usr' / get_option('libdir') / 'art', '/usr/local' / get_option('libdir') / 'art', get_option('prefix') / get_option('libdir') / 'art' ]),
]
if fs.is_file('/usr' / get_option('libdir') / 'java/core-all_classes.jar')
bootclasspath = '/usr' / get_option('libdir') / 'java/core-all_classes.jar'
elif fs.is_file('/usr/local' / get_option('libdir') / 'java/core-all_classes.jar')
@@ -117,7 +120,8 @@ libtranslationlayer_so = shared_library('translation_layer_main', [
install_dir : get_option('libdir') / 'java/dex/android_translation_layer/natives',
dependencies: [
dependency('gtk4', version: '>=4.8'), dependency('gl'), dependency('egl'), dependency('wayland-client'), dependency('jni'),
dependency('libportal'), dependency('sqlite3'), libskia_dep, dependency('libavcodec', version: '>=59'), dependency('libdrm')
dependency('libportal'), dependency('sqlite3'), libskia_dep, dependency('libavcodec', version: '>=59'), dependency('libdrm'),
libandroidfw_dep
],
link_with: [ libandroid_so ],
link_args: [