SDL: support for install-time asset pack for Android app bundle

This commit is contained in:
Sergii Pylypenko
2021-06-07 00:20:09 +03:00
parent 211ab6b8be
commit 077acc6880
14 changed files with 153 additions and 31 deletions

View File

@@ -1,2 +1,3 @@
/AndroidData/*.pk3
/AndroidData/assetpack
/*.so

View File

@@ -7,10 +7,10 @@ AppName="OpenArena"
AppFullName=ws.openarena.sdl
# Application version code (integer)
AppVersionCode=08841
AppVersionCode=08844
# Application user-visible version name (string)
AppVersionName="0.8.8.41"
AppVersionName="0.8.8.44"
# Specify path to download application data in zip archive in the form 'Description|URL|MirrorURL^Description2|URL2|MirrorURL2^...'
# If you'll start Description with '!' symbol it will be enabled by default, '!!' will also hide the entry from the menu, so it cannot be disabled
@@ -20,6 +20,14 @@ AppVersionName="0.8.8.41"
# You can specify Google Play expansion files in the form 'obb:main.12345' or 'obb:patch.12345' where 12345 is the app version for the obb file
# You can mount expansion files created with jobb tool if you put 'mnt:main.12345' or 'mnt:patch.12345'
# The mount directory will be returned by calling getenv("ANDROID_OBB_MOUNT_DIR")
# Android app bundles do not support .obb files, they use asset packs instead.
# This app project includes one pre-configured install-time asset pack.
# To put your data into asset pack, copy it to the directory AndroidData/assetpack
# and run changeAppSettings.sh. The asset pack zip archive will be returned by
# getenv("ANDROID_ASSET_PACK_PATH"), this call will return NULL if the asset pack is not installed.
# You can put "assetpack" keyword to AppDataDownloadUrl, the code will check
# if the asset pack is installed and will not download the data from other URLs.
# You can extract files from the asset pack the same way you extract files from the app assets.
# You can use .zip.xz archives for better compression, but you need to add 'lzma' to CompiledLibraries
# Generate .zip.xz files like this: zip -0 -r data.zip your-data/* ; xz -8 data.zip
AppDataDownloadUrl="!Game data|mnt:main.8839|obb:main.8828|https://github.com/pelya/openarena-engine/releases/download/0.8.8.39/data-0.8.8.zip|https://sourceforge.net/projects/libsdl-android/files/OpenArena/data-0.8.8.28.zip/download^!Game logic|:baseoa/pak7-android.pk3:pak7-android.pk3"