From 612996410aa0848f5ae179d3ee66be08d730a355 Mon Sep 17 00:00:00 2001 From: UnknownShadow200 Date: Thu, 28 Nov 2024 00:16:54 +1100 Subject: [PATCH] android test --- .github/workflows/build_android2.yml | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/.github/workflows/build_android2.yml b/.github/workflows/build_android2.yml index a88c15c..b29d7b6 100644 --- a/.github/workflows/build_android2.yml +++ b/.github/workflows/build_android2.yml @@ -32,19 +32,19 @@ jobs: cd $ROOT_DIR/src $NDK_ROOT/armv7a-linux-androideabi21-clang *.c $DROID_FLAGS -march=armv5 $DROID_LIBS $LATEST_FLAG -o cc-droid-arm_16 - #$NDK_ROOT/armv7a-linux-androideabi21-clang *.c $DROID_FLAGS $DROID_LIBS $LATEST_FLAG -o cc-droid-arm_32 - #$NDK_ROOT/aarch64-linux-android21-clang *.c $DROID_FLAGS $DROID_LIBS $LATEST_FLAG -o cc-droid-arm_64 - #$NDK_ROOT/i686-linux-android21-clang *.c $DROID_FLAGS $DROID_LIBS $LATEST_FLAG -o cc-droid-x86_32 - #$NDK_ROOT/x86_64-linux-android21-clang *.c $DROID_FLAGS $DROID_LIBS $LATEST_FLAG -o cc-droid-x86_64 + $NDK_ROOT/armv7a-linux-androideabi21-clang *.c $DROID_FLAGS $DROID_LIBS $LATEST_FLAG -o cc-droid-arm_32 + $NDK_ROOT/aarch64-linux-android21-clang *.c $DROID_FLAGS $DROID_LIBS $LATEST_FLAG -o cc-droid-arm_64 + $NDK_ROOT/i686-linux-android21-clang *.c $DROID_FLAGS $DROID_LIBS $LATEST_FLAG -o cc-droid-x86_32 + $NDK_ROOT/x86_64-linux-android21-clang *.c $DROID_FLAGS $DROID_LIBS $LATEST_FLAG -o cc-droid-x86_64 cd $ROOT_DIR/android/app/src/main # copy required native libraries mkdir lib lib/armeabi lib/armeabi-v7a lib/arm64-v8a lib/x86 lib/x86_64 cp $ROOT_DIR/src/cc-droid-arm_16 lib/armeabi/libclassicube.so - #cp $ROOT_DIR/src/cc-droid-arm_32 lib/armeabi-v7a/libclassicube.so - #cp $ROOT_DIR/src/cc-droid-arm_64 lib/arm64-v8a/libclassicube.so - #cp $ROOT_DIR/src/cc-droid-x86_32 lib/x86/libclassicube.so - #cp $ROOT_DIR/src/cc-droid-x86_64 lib/x86_64/libclassicube.so + cp $ROOT_DIR/src/cc-droid-arm_32 lib/armeabi-v7a/libclassicube.so + cp $ROOT_DIR/src/cc-droid-arm_64 lib/arm64-v8a/libclassicube.so + cp $ROOT_DIR/src/cc-droid-x86_32 lib/x86/libclassicube.so + cp $ROOT_DIR/src/cc-droid-x86_64 lib/x86_64/libclassicube.so # The following commands are for manually building an .apk, see # https://spin.atomicobject.com/2011/08/22/building-android-application-bundles-apks-by-hand/ @@ -60,16 +60,13 @@ jobs: cd $ROOT_DIR/android/app/src/main # get debug signing key echo -n "${{ secrets.ANDROID_SIGNING_KEY_BASE64 }}" | base64 --decode > debug.keystore - find $ROOT_DIR -name "*.class" CLASSES_LIST="$(find $ROOT_DIR -name "*.class" -printf '%p ')" - echo $CLASSES_LIST # compile the multiple .class files into one .dex file $TOOLS_ROOT/d8 $CLASSES_LIST --lib $SDK_ROOT/android.jar # create initial .apk with packaged version of resources $TOOLS_ROOT/aapt package -f -M AndroidManifest.xml -S res -F cc-unsigned.apk -I $SDK_ROOT/android.jar - #$TOOLS_ROOT/aapt add -f cc-unsigned.apk classes.dex lib/armeabi/libclassicube.so lib/armeabi-v7a/libclassicube.so lib/arm64-v8a/libclassicube.so lib/x86/libclassicube.so lib/x86_64/libclassicube.so - $TOOLS_ROOT/aapt add -f cc-unsigned.apk classes.dex lib/armeabi/libclassicube.so + $TOOLS_ROOT/aapt add -f cc-unsigned.apk classes.dex lib/armeabi/libclassicube.so lib/armeabi-v7a/libclassicube.so lib/arm64-v8a/libclassicube.so lib/x86/libclassicube.so lib/x86_64/libclassicube.so # sign the apk with debug key (https://stackoverflow.com/questions/16711233/) cp cc-unsigned.apk cc-signed.apk #jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore debug.keystore -storepass android -keypass android cc-signed.apk androiddebugkey