feat(android): add support for building SDL2/libarmsx for Android

- Updated .gitignore to include Android native libraries and dependencies.
- Modified android/app/build.gradle to register a new task for preparing native binaries.
- Enhanced build.sh to support building SDL2/libarmsx for Android, including NDK setup and BIOS handling.
- Refactored iOS AppDelegate to integrate RNOverlayController and EmulatorRunner for better overlay management.
- Introduced EmulatorRunner class to handle the emulator lifecycle and argument passing.
- Created RNOverlayController to manage the React Native overlay, including mounting and unmounting logic.
- Updated Xcode project files to reflect new source files and dependencies.
This commit is contained in:
moonpower
2025-11-23 05:24:54 +03:00
parent 7a11440e97
commit 40ff6e2d15
10 changed files with 438 additions and 226 deletions
+19
View File
@@ -65,6 +65,7 @@ android {
java.srcDirs += ['../../third_party/SDL/android-project/app/src/main/java']
res.srcDirs += ['src/main/res', '../../third_party/SDL/android-project/app/src/main/res']
assets.srcDirs += ['src/main/assets']
jniLibs.srcDirs += ['src/main/jniLibs']
}
}
}
@@ -87,3 +88,21 @@ dependencies {
implementation 'com.facebook.react:react-android:0.76.0'
implementation 'com.facebook.react:hermes-android:0.76.0'
}
def repoRootDir = rootProject.projectDir.parentFile
def nativeOutput = file("$projectDir/src/main/jniLibs/arm64-v8a/libarmsx.so")
tasks.register("prepareNativeBinaries") {
group = "native"
description = "Build SDL2/libarmsx via build.sh android."
inputs.file(new File(repoRootDir, "build.sh"))
outputs.file(nativeOutput)
doLast {
exec {
workingDir repoRootDir
commandLine "./build.sh", "android"
}
}
}
preBuild.dependsOn(tasks.named("prepareNativeBinaries"))