Skip to content
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

running ./build.sh opentyrian results in an apk missing the assets files #126

Open
HeinousGames opened this issue Feb 11, 2021 · 2 comments

Comments

@HeinousGames
Copy link

I can successfully generate a release apk, but it fails to bundle the zip files from the ApplicationData directory into the assets directory. Manually copying them to the assets directory and running ./build.sh debug opentyrian results in a debug apk without the missing zip files, but I cannot generate a release apk with the zips/assets.

@pelya
Copy link
Owner

pelya commented Feb 13, 2021 via email

@HeinousGames
Copy link
Author

++ install_apk=false
++ run_apk=false
++ sign_apk=false
++ sign_bundle=false
++ build_release=true
++ getopts sirqbh OPT
+++ expr 1 - 1
++ shift 0
++ '[' 1 -gt 0 -a opentyrian = release ']'
++ '[' 1 -gt 0 -a opentyrian = debug ']'
++ '[' 1 -gt 0 -a opentyrian '!=' -h ']'
++ echo 'Switching build target to opentyrian'
Switching build target to opentyrian
++ '[' -e project/jni/application/opentyrian ']'
++ rm -f project/jni/application/src
++ ln -s opentyrian project/jni/application/src
++ shift
++ '[' -e project/local.properties ']'
+++ grep AppFullName= AndroidAppSettings.cfg
+++ sed 's/.=//'
++ grep 'package com.googlecode.opentyrian;' project/src/Globals.java
+++ readlink AndroidAppSettings.cfg
++ '[' project/jni/application/src/AndroidAppSettings.cfg -ot project/src/Globals.java ']'
+++ find project/java/Accelerometer.java project/java/Advertisement.java project/java/Audio.java project/java/Clipboard.java project/java/CloudSave.java project/java/DataDownloader.java project/java/DummyService.java project/java/GLSurfaceView_SDL.java project/java/Globals.java project/java/Keycodes.java project/java/MainActivity.java project/java/RestartMainActivity.java project/java/Settings.java project/java/SettingsMenu.java project/java/SettingsMenuKeyboard.java project/java/SettingsMenuMisc.java project/java/SettingsMenuMouse.java project/java/Video.java project/java/XZInputStream.java project/java/admob project/java/googleplaygameservices project/java/translations project/AndroidManifestTemplate.xml -cnewer project/src/Globals.java
++ '[' -z '' ']'
++ true
++ MYARCH=linux-x86_64
++ '[' -z '' ']'
++ NCPU=8
++ uname -s
++ grep -i linux
++ uname -s
++ grep -i darwin
++ MYARCH=darwin-x86_64
++ uname -s
++ grep -i windows
++ export BUILD_NUM_CPUS=8
++ BUILD_NUM_CPUS=8
++ '[' -z '' ']'
+++ which ndk-build
+++ sed s@/ndk-build@@
++ export ANDROID_NDK_HOME=/Users/stevenhanus/Library/Android/sdk/ndk-bundle
++ ANDROID_NDK_HOME=/Users/stevenhanus/Library/Android/sdk/ndk-bundle
++ '[' -x project/jni/application/src/AndroidPreBuild.sh ']'
+++ grep CustomBuildScript=y AndroidAppSettings.cfg
++ '[' -n '' ']'
++ ndk-build -C project -j8 V=1 NDK_APP_STRIP_MODE=none
make: Entering directory '/Users/stevenhanus/Documents/git/commandergenius/project'
Android NDK: WARNING: APP_PLATFORM android-16 is higher than android:minSdkVersion 1 in jni/../AndroidManifest.xml. NDK binaries will not be compatible with devices older than android-16. See https://android.googlesource.com/platform/ndk/+/master/docs/user/common_problems.md for more information.
make: Leaving directory '/Users/stevenhanus/Documents/git/commandergenius/project'
make: Entering directory '/Users/stevenhanus/Documents/git/commandergenius/project'
rm -f ./libs/arm64-v8a/
./libs/x86_64/* ./libs/armeabi-v7a/* ./libs/x86/*
rm -f ./libs/arm64-v8a/gdbserver ./libs/x86_64/gdbserver ./libs/armeabi-v7a/gdbserver ./libs/x86/gdbserver
rm -f ./libs/arm64-v8a/gdb.setup ./libs/x86_64/gdb.setup ./libs/armeabi-v7a/gdb.setup ./libs/x86/gdb.setup
make: Leaving directory '/Users/stevenhanus/Documents/git/commandergenius/project'
make: Entering directory '/Users/stevenhanus/Documents/git/commandergenius/project'
[arm64-v8a] Install : libsdl_native_helpers.so => libs/arm64-v8a/libsdl_native_helpers.so
install -p ./obj/local/arm64-v8a/libsdl_native_helpers.so ./libs/arm64-v8a/libsdl_native_helpers.so
make: Leaving directory '/Users/stevenhanus/Documents/git/commandergenius/project'
make: Entering directory '/Users/stevenhanus/Documents/git/commandergenius/project'
[arm64-v8a] Install : libsdl_net.so => libs/arm64-v8a/libsdl_net.so
install -p ./obj/local/arm64-v8a/libsdl_net.so ./libs/arm64-v8a/libsdl_net.so
make: Leaving directory '/Users/stevenhanus/Documents/git/commandergenius/project'
make: Entering directory '/Users/stevenhanus/Documents/git/commandergenius/project'
[arm64-v8a] Install : libsdl-1.2.so => libs/arm64-v8a/libsdl-1.2.so
install -p ./obj/local/arm64-v8a/libsdl-1.2.so ./libs/arm64-v8a/libsdl-1.2.so
make: Leaving directory '/Users/stevenhanus/Documents/git/commandergenius/project'
make: Entering directory '/Users/stevenhanus/Documents/git/commandergenius/project'
[arm64-v8a] Install : libsdl_main.so => libs/arm64-v8a/libsdl_main.so
install -p ./obj/local/arm64-v8a/libsdl_main.so ./libs/arm64-v8a/libsdl_main.so
make: Leaving directory '/Users/stevenhanus/Documents/git/commandergenius/project'
make: Entering directory '/Users/stevenhanus/Documents/git/commandergenius/project'
[arm64-v8a] Install : libsdl_image.so => libs/arm64-v8a/libsdl_image.so
install -p ./obj/local/arm64-v8a/libsdl_image.so ./libs/arm64-v8a/libsdl_image.so
make: Leaving directory '/Users/stevenhanus/Documents/git/commandergenius/project'
make: Entering directory '/Users/stevenhanus/Documents/git/commandergenius/project'
[x86_64] Install : libsdl_native_helpers.so => libs/x86_64/libsdl_native_helpers.so
install -p ./obj/local/x86_64/libsdl_native_helpers.so ./libs/x86_64/libsdl_native_helpers.so
make: Leaving directory '/Users/stevenhanus/Documents/git/commandergenius/project'
make: Entering directory '/Users/stevenhanus/Documents/git/commandergenius/project'
[x86_64] Install : libsdl_net.so => libs/x86_64/libsdl_net.so
install -p ./obj/local/x86_64/libsdl_net.so ./libs/x86_64/libsdl_net.so
make: Leaving directory '/Users/stevenhanus/Documents/git/commandergenius/project'
make: Entering directory '/Users/stevenhanus/Documents/git/commandergenius/project'
[arm64-v8a] Install : libapplication.so => libs/arm64-v8a/libapplication.so
install -p ./obj/local/arm64-v8a/libapplication.so ./libs/arm64-v8a/libapplication.so
make: Leaving directory '/Users/stevenhanus/Documents/git/commandergenius/project'
make: Entering directory '/Users/stevenhanus/Documents/git/commandergenius/project'
[x86_64] Install : libsdl-1.2.so => libs/x86_64/libsdl-1.2.so
install -p ./obj/local/x86_64/libsdl-1.2.so ./libs/x86_64/libsdl-1.2.so
make: Leaving directory '/Users/stevenhanus/Documents/git/commandergenius/project'
make: Entering directory '/Users/stevenhanus/Documents/git/commandergenius/project'
[x86_64] Install : libsdl_main.so => libs/x86_64/libsdl_main.so
install -p ./obj/local/x86_64/libsdl_main.so ./libs/x86_64/libsdl_main.so
make: Leaving directory '/Users/stevenhanus/Documents/git/commandergenius/project'
make: Entering directory '/Users/stevenhanus/Documents/git/commandergenius/project'
[x86_64] Install : libsdl_image.so => libs/x86_64/libsdl_image.so
install -p ./obj/local/x86_64/libsdl_image.so ./libs/x86_64/libsdl_image.so
make: Leaving directory '/Users/stevenhanus/Documents/git/commandergenius/project'
make: Entering directory '/Users/stevenhanus/Documents/git/commandergenius/project'
[x86_64] Install : libapplication.so => libs/x86_64/libapplication.so
install -p ./obj/local/x86_64/libapplication.so ./libs/x86_64/libapplication.so
make: Leaving directory '/Users/stevenhanus/Documents/git/commandergenius/project'
make: Entering directory '/Users/stevenhanus/Documents/git/commandergenius/project'
[armeabi-v7a] Install : libsdl-1.2.so => libs/armeabi-v7a/libsdl-1.2.so
install -p ./obj/local/armeabi-v7a/libsdl-1.2.so ./libs/armeabi-v7a/libsdl-1.2.so
make: Leaving directory '/Users/stevenhanus/Documents/git/commandergenius/project'
make: Entering directory '/Users/stevenhanus/Documents/git/commandergenius/project'
[armeabi-v7a] Install : libsdl_native_helpers.so => libs/armeabi-v7a/libsdl_native_helpers.so
install -p ./obj/local/armeabi-v7a/libsdl_native_helpers.so ./libs/armeabi-v7a/libsdl_native_helpers.so
make: Leaving directory '/Users/stevenhanus/Documents/git/commandergenius/project'
make: Entering directory '/Users/stevenhanus/Documents/git/commandergenius/project'
[armeabi-v7a] Install : libsdl_net.so => libs/armeabi-v7a/libsdl_net.so
install -p ./obj/local/armeabi-v7a/libsdl_net.so ./libs/armeabi-v7a/libsdl_net.so
make: Leaving directory '/Users/stevenhanus/Documents/git/commandergenius/project'
make: Entering directory '/Users/stevenhanus/Documents/git/commandergenius/project'
[armeabi-v7a] Install : libsdl_image.so => libs/armeabi-v7a/libsdl_image.so
install -p ./obj/local/armeabi-v7a/libsdl_image.so ./libs/armeabi-v7a/libsdl_image.so
make: Leaving directory '/Users/stevenhanus/Documents/git/commandergenius/project'
make: Entering directory '/Users/stevenhanus/Documents/git/commandergenius/project'
[armeabi-v7a] Install : libapplication.so => libs/armeabi-v7a/libapplication.so
install -p ./obj/local/armeabi-v7a/libapplication.so ./libs/armeabi-v7a/libapplication.so
make: Leaving directory '/Users/stevenhanus/Documents/git/commandergenius/project'
make: Entering directory '/Users/stevenhanus/Documents/git/commandergenius/project'
[armeabi-v7a] Install : libsdl_main.so => libs/armeabi-v7a/libsdl_main.so
install -p ./obj/local/armeabi-v7a/libsdl_main.so ./libs/armeabi-v7a/libsdl_main.so
make: Leaving directory '/Users/stevenhanus/Documents/git/commandergenius/project'
make: Entering directory '/Users/stevenhanus/Documents/git/commandergenius/project'
[x86] Install : libsdl-1.2.so => libs/x86/libsdl-1.2.so
install -p ./obj/local/x86/libsdl-1.2.so ./libs/x86/libsdl-1.2.so
make: Leaving directory '/Users/stevenhanus/Documents/git/commandergenius/project'
make: Entering directory '/Users/stevenhanus/Documents/git/commandergenius/project'
[x86] Install : libsdl_native_helpers.so => libs/x86/libsdl_native_helpers.so
install -p ./obj/local/x86/libsdl_native_helpers.so ./libs/x86/libsdl_native_helpers.so
make: Leaving directory '/Users/stevenhanus/Documents/git/commandergenius/project'
make: Entering directory '/Users/stevenhanus/Documents/git/commandergenius/project'
[x86] Install : libsdl_net.so => libs/x86/libsdl_net.so
install -p ./obj/local/x86/libsdl_net.so ./libs/x86/libsdl_net.so
make: Leaving directory '/Users/stevenhanus/Documents/git/commandergenius/project'
make: Entering directory '/Users/stevenhanus/Documents/git/commandergenius/project'
[x86] Install : libsdl_image.so => libs/x86/libsdl_image.so
install -p ./obj/local/x86/libsdl_image.so ./libs/x86/libsdl_image.so
make: Leaving directory '/Users/stevenhanus/Documents/git/commandergenius/project'
make: Entering directory '/Users/stevenhanus/Documents/git/commandergenius/project'
[x86] Install : libsdl_main.so => libs/x86/libsdl_main.so
install -p ./obj/local/x86/libsdl_main.so ./libs/x86/libsdl_main.so
make: Leaving directory '/Users/stevenhanus/Documents/git/commandergenius/project'
make: Entering directory '/Users/stevenhanus/Documents/git/commandergenius/project'
[x86] Install : libapplication.so => libs/x86/libapplication.so
install -p ./obj/local/x86/libapplication.so ./libs/x86/libapplication.so
make: Leaving directory '/Users/stevenhanus/Documents/git/commandergenius/project'
++ ./copyAssets.sh
+++ ARCHES='arm64-v8a armeabi-v7a x86 x86_64'
+++ '[' '' = pack-binaries -o '' = pack-binaries-bundle ']'
+++ echo 'Copying app data files from project/jni/application/src/AndroidData to project/assets'
Copying app data files from project/jni/application/src/AndroidData to project/assets
+++ mkdir -p project/assets
+++ rm -f -r 'project/assets/*'
+++ '[' -d project/jni/application/src/AndroidData ']'
+++ cp -L -r project/jni/application/src/AndroidData/tutorial.zip project/jni/application/src/AndroidData/tyrian21-data.zip project/assets/
cp: the -H, -L, and -P options may not be specified with the -r option.
+++ rm -rf project/assets/lib
+++ exit 0
++ cd project
++ true
++ ./gradlew assembleRelease

BUILD SUCCESSFUL in 6s
29 actionable tasks: 1 executed, 28 up-to-date
++ '[' '!' -x jni/application/src/AndroidPostBuild.sh ']'
++ ../copyAssets.sh pack-binaries app/build/outputs/apk/release/app-release-unsigned.apk
+++ ARCHES='arm64-v8a armeabi-v7a x86 x86_64'
+++ '[' pack-binaries = pack-binaries -o pack-binaries = pack-binaries-bundle ']'
+++ '[' -e jni/application/src/AndroidData/lib ']'
+++ exit 0
++ rm -f app/build/outputs/apk/release/app-release.apk
++ zipalign 4 app/build/outputs/apk/release/app-release-unsigned.apk app/build/outputs/apk/release/app-release.apk
++ apksigner sign --ks /Users/stevenhanus/.android/debug.keystore --ks-key-alias androiddebugkey --ks-pass pass:android app/build/outputs/apk/release/app-release.apk
++ false
++ true
++ false
++ true
++ false
++ true
++ false
++ true

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants