mirror of
https://github.com/ARMSX2/ARMSX1.git
synced 2026-08-24 16:53:35 -07:00
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:
@@ -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"))
|
||||
|
||||
Reference in New Issue
Block a user