Move executables out of the way where android expects native libraries to be.

git-svn-id: https://www.unprompted.com/svn/projects/tildefriends/trunk@4236 ed5197a5-7fde-0310-b194-c3ffbd925b24
This commit is contained in:
Cory McWilliams 2023-03-19 13:12:51 +00:00
parent 2dc2d9ebf6
commit 33a037e0ea
2 changed files with 6 additions and 6 deletions

View File

@ -445,12 +445,12 @@ out/apk/TildeFriends-debug.unsigned.apk: out/apk/classes.dex out/androiddebug/ti
out/apk/TildeFriends-release.unsigned.apk: out/apk/classes.dex out/androidrelease/tildefriends out/androidrelease-x86_64/tildefriends $(RAW_FILES) out/apk/res.apk
out/%.unsigned.apk:
@mkdir -p $(dir $@) out/apk$(BUILD_TYPE)/lib/aarch64/ out/apk$(BUILD_TYPE)/lib/x86_64/
@mkdir -p $(dir $@) out/apk$(BUILD_TYPE)/bin/aarch64/ out/apk$(BUILD_TYPE)/bin/x86_64/
@echo [aapt] $@
@cp out/android$(BUILD_TYPE)/tildefriends out/apk$(BUILD_TYPE)/lib/aarch64/
@cp out/android$(BUILD_TYPE)-x86_64/tildefriends out/apk$(BUILD_TYPE)/lib/x86_64/
@/usr/lib/android-sdk/ndk-bundle/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-strip out/apk$(BUILD_TYPE)/lib/aarch64/tildefriends
@/usr/lib/android-sdk/ndk-bundle/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-strip out/apk$(BUILD_TYPE)/lib/x86_64/tildefriends
@cp out/android$(BUILD_TYPE)/tildefriends out/apk$(BUILD_TYPE)/bin/aarch64/
@cp out/android$(BUILD_TYPE)-x86_64/tildefriends out/apk$(BUILD_TYPE)/bin/x86_64/
@/usr/bin/android-sdk/ndk-bundle/toolchains/llvm/prebuilt/linux-x86_64/lib/llvm-strip out/apk$(BUILD_TYPE)/bin/aarch64/tildefriends
@/usr/bin/android-sdk/ndk-bundle/toolchains/llvm/prebuilt/linux-x86_64/lib/llvm-strip out/apk$(BUILD_TYPE)/bin/x86_64/tildefriends
@cp out/apk/res.apk $@
@cp out/apk/classes.dex out/apk$(BUILD_TYPE)/
@cd out/apk$(BUILD_TYPE) && zip -u ../../$@ -q -9 -r . && cd ../../

View File

@ -54,7 +54,7 @@ public class MainActivity extends Activity {
try {
ZipInputStream zip = new ZipInputStream(new BufferedInputStream(new FileInputStream(getPackageResourcePath().toString())));
ZipEntry entry = null;
String lookup = String.format("lib/%s/tildefriends", arch);
String lookup = String.format("bin/%s/tildefriends", arch);
Log.w("tildefriends", "Looking for " + lookup);
while ((entry = zip.getNextEntry()) != null) {
if (entry.getName().equals(lookup)) {