From 33a037e0ea0d87e8d84ba1c136d10684cccedb70 Mon Sep 17 00:00:00 2001 From: Cory McWilliams Date: Sun, 19 Mar 2023 13:12:51 +0000 Subject: [PATCH] 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 --- Makefile | 10 +++++----- .../com/unprompted/tildefriends/MainActivity.java | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index 3dd73602..a9ca8267 100644 --- a/Makefile +++ b/Makefile @@ -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 ../../ diff --git a/src/android/com/unprompted/tildefriends/MainActivity.java b/src/android/com/unprompted/tildefriends/MainActivity.java index 00ce6c9f..960bd633 100644 --- a/src/android/com/unprompted/tildefriends/MainActivity.java +++ b/src/android/com/unprompted/tildefriends/MainActivity.java @@ -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)) {