Skip to content

Commit

Permalink
OpenXR - Use a build variant instead of a module
Browse files Browse the repository at this point in the history
  • Loading branch information
lvonasek committed Jul 31, 2022
1 parent 89f5038 commit 4691b37
Show file tree
Hide file tree
Showing 9 changed files with 53 additions and 340 deletions.
20 changes: 20 additions & 0 deletions android/QuestManifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">

<uses-feature android:name="android.hardware.vr.headtracking" android:version="1" android:required="true" />

<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:logo="@drawable/ic_banner"
android:isGame="true"
android:banner="@drawable/tv_banner"
android:requestLegacyExternalStorage="true"
android:preserveLegacyExternalStorage="true">

<meta-data android:name="com.samsung.android.vr.application.mode" android:value="vr_only"/>
<meta-data android:name="com.oculus.supportedDevices" android:value="quest|quest2"/>
</application>
</manifest>
36 changes: 32 additions & 4 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,6 @@ android {
versionCode ANDROID_VERSION_CODE
versionName ANDROID_VERSION_NAME
}
ndk {
abiFilters 'armeabi-v7a', 'arm64-v8a', 'x86', 'x86_64'
}
signingConfig signingConfigs.debug
}
buildTypes {
Expand Down Expand Up @@ -106,6 +103,9 @@ android {
gold {
res.srcDirs = ['gold/res']
}
quest {
manifest.srcFile 'QuestManifest.xml'
}
}
productFlavors {
normal {
Expand All @@ -122,6 +122,9 @@ android {
'-DANDROID_ARM_NEON=TRUE'
}
}
ndk {
abiFilters 'armeabi-v7a', 'arm64-v8a', 'x86', 'x86_64'
}
}
gold {
applicationId 'org.ppsspp.ppssppgold'
Expand All @@ -138,14 +141,39 @@ android {
'-DGOLD=TRUE'
}
}
ndk {
abiFilters 'armeabi-v7a', 'arm64-v8a', 'x86', 'x86_64'
}
}
quest {
applicationId 'org.ppsspp.ppsspp'
dimension "variant"
externalNativeBuild {
cmake {
// Available arguments listed at https://developer.android.com/ndk/guides/cmake.html
arguments '-DANDROID=true',
'-DANDROID_PLATFORM=android-16',
'-DANDROID_TOOLCHAIN=clang',
'-DANDROID_CPP_FEATURES=',
'-DANDROID_STL=c++_static',
'-DANDROID_ARM_NEON=TRUE',
'-DOPENXR=TRUE'
}
}
ndk {
abiFilters 'arm64-v8a'
}
}
}
variantFilter { variant ->
def needed = variant.name in [
'normalDebug', // for debugging
'normalOptimized', // for testing
'normalRelease', // for Google Play releases
'goldRelease' // for Google Play releases
'goldRelease', // for Google Play releases
'questDebug', // for VR debugging
'questOptimized', // for VR testing
'questRelease', // for VR releases
]
variant.setIgnore(!needed)
}
Expand Down
9 changes: 0 additions & 9 deletions quest/.gitignore

This file was deleted.

127 changes: 0 additions & 127 deletions quest/AndroidManifest.xml

This file was deleted.

164 changes: 0 additions & 164 deletions quest/build.gradle

This file was deleted.

3 changes: 0 additions & 3 deletions quest/gradle.properties

This file was deleted.

Loading

0 comments on commit 4691b37

Please sign in to comment.