Make it at least compile again

This commit is contained in:
UnknownShadow200 2024-11-28 21:42:13 +11:00
parent 03186fa2b0
commit 51fa993fc1
3 changed files with 6 additions and 3 deletions

View File

@ -79,8 +79,8 @@ jobs:
$TOOLS_ROOT/aapt add -f obj/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 obj/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/) # sign the apk with debug key (https://stackoverflow.com/questions/16711233/)
cp obj/cc-unsigned.apk obj/cc-signed.apk cp obj/cc-unsigned.apk obj/cc-signed.apk
#jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore debug.keystore -storepass android -keypass android obj/cc-signed.apk androiddebugkey jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore debug.keystore -storepass android -keypass android obj/cc-signed.apk androiddebugkey
$TOOLS_ROOT/apksigner sign --ks debug.keystore --ks-pass pass:android obj/cc-signed.apk #$TOOLS_ROOT/apksigner sign --ks debug.keystore --ks-pass pass:android obj/cc-signed.apk
# jarsigner -verbose # jarsigner -verbose
# create aligned .apk file # create aligned .apk file
$TOOLS_ROOT/zipalign -f 4 obj/cc-signed.apk $ROOT_DIR/src/cc.apk $TOOLS_ROOT/zipalign -f 4 obj/cc-signed.apk $ROOT_DIR/src/cc.apk

View File

@ -432,7 +432,9 @@ public class MainActivity extends Activity
try { try {
CCMotionListener listener = new CCMotionListener(this); CCMotionListener listener = new CCMotionListener(this);
view.setOnGenericMotionListener(listener); view.setOnGenericMotionListener(listener);
} catch { } catch (Exception ex) {
// Unsupported on android 12
} catch (NoClassDefFoundError ex) {
// Unsupported on android 12 // Unsupported on android 12
} }
} }

View File

@ -10,6 +10,7 @@
#include <android/native_window.h> #include <android/native_window.h>
#include <android/native_window_jni.h> #include <android/native_window_jni.h>
#include <android/keycodes.h> #include <android/keycodes.h>
#include <unistd.h>
static ANativeWindow* win_handle; static ANativeWindow* win_handle;
static cc_bool winCreated; static cc_bool winCreated;