rm Android flavors for now;

There used to be oculus and pico but pico doesn't work anymore.

Eventually things will converge on the standard loader and we won't
need different loaders, but manifests may require flavors.
This commit is contained in:
bjorn 2022-11-09 00:21:49 -08:00
parent 8dc1d3192b
commit b81f86b5ad
5 changed files with 5 additions and 36 deletions

View File

@ -60,7 +60,6 @@ if(EMSCRIPTEN)
set(LOVR_USE_WEBGPU ON)
set(LOVR_USE_VULKAN OFF)
elseif(ANDROID)
set(ANDROID_FLAVOR "oculus" CACHE STRING "Which Android flavor to build (oculus or pico)")
find_package(Java REQUIRED)
set(LOVR_USE_DESKTOP OFF)
if(LOVR_BUILD_EXE)
@ -189,8 +188,6 @@ if(LOVR_USE_GLSLANG)
"${CMAKE_CURRENT_SOURCE_DIR}/deps/glslang/StandAlone/resource_limits_c.cpp"
)
target_link_libraries(lovr_glslang PUBLIC glslang)
set(LOVR_GLSLANG lovr_glslang SPIRV)
endif()
@ -206,15 +203,8 @@ if(LOVR_ENABLE_HEADSET AND LOVR_USE_OPENXR)
if(ANDROID)
add_library(openxr_loader SHARED IMPORTED)
set(LOVR_OPENXR openxr_loader)
if(ANDROID_FLAVOR STREQUAL "oculus")
set(LOVR_OPENXR_OCULUS_PATH "${CMAKE_CURRENT_SOURCE_DIR}/deps/oculus-openxr" CACHE STRING "The path to the Oculus OpenXR loader")
set_target_properties(openxr_loader PROPERTIES IMPORTED_LOCATION "${LOVR_OPENXR_OCULUS_PATH}/Libs/Android/${ANDROID_ABI}/Release/libopenxr_loader.so")
elseif(ANDROID_FLAVOR STREQUAL "pico")
set(LOVR_OPENXR_PICO_PATH "${CMAKE_CURRENT_SOURCE_DIR}/deps/pico-openxr" CACHE STRING "The path to the Pico OpenXR loader")
set_target_properties(openxr_loader PROPERTIES IMPORTED_LOCATION "${LOVR_OPENXR_PICO_PATH}/Libs/Android/${ANDROID_ABI}/libopenxr_loader.so")
else()
message(FATAL_ERROR "Unsupported Android flavor (expected: oculus or pico)")
endif()
set(LOVR_OPENXR_OCULUS_PATH "${CMAKE_CURRENT_SOURCE_DIR}/deps/oculus-openxr" CACHE STRING "The path to the Oculus OpenXR loader")
set_target_properties(openxr_loader PROPERTIES IMPORTED_LOCATION "${LOVR_OPENXR_OCULUS_PATH}/Libs/Android/${ANDROID_ABI}/Release/libopenxr_loader.so")
else()
if(LOVR_SYSTEM_OPENXR)
pkg_search_module(OPENXR openxr)
@ -725,7 +715,7 @@ elseif(ANDROID)
if(LOVR_BUILD_EXE)
set(ANDROID_JAR "${ANDROID_SDK}/platforms/${ANDROID_PLATFORM}/android.jar")
set(ANDROID_TOOLS "${ANDROID_SDK}/build-tools/${ANDROID_BUILD_TOOLS_VERSION}")
set(ANDROID_MANIFEST "${CMAKE_CURRENT_SOURCE_DIR}/etc/AndroidManifest_${ANDROID_FLAVOR}.xml" CACHE STRING "The AndroidManifest.xml file to use")
set(ANDROID_MANIFEST "${CMAKE_CURRENT_SOURCE_DIR}/etc/AndroidManifest.xml" CACHE STRING "The AndroidManifest.xml file to use")
# If assets are included in the apk then add '-A assets' to aapt, otherwise don't add any flags
if(ANDROID_ASSETS)

View File

@ -22,7 +22,7 @@ Features
---
- **Cross-Platform** - Runs on Windows, Mac, Linux, Android, WebXR.
- **Cross-Device** - Supports Vive/Index, Oculus Rift/Quest, Pico, Windows MR, and has a VR simulator.
- **Cross-Device** - Supports Vive/Index, Oculus Rift/Quest, Windows MR, and has a VR simulator.
- **Beginner-friendly** - Simple VR scenes can be created in just a few lines of Lua.
- **Fast** - Writen in C11 and scripted with LuaJIT, includes optimized single-pass stereo rendering.
- **Asset Import** - Supports 3D models (glTF, OBJ), skeletal animation, HDR textures, cubemaps, fonts, etc.

View File

@ -41,7 +41,6 @@ config = {
buildtools = '30.0.3',
keystore = '/path/to/keystore',
keystorepass = 'pass:password',
flavor = 'oculus',
manifest = nil,
package = nil,
project = nil
@ -54,7 +53,6 @@ config = {
-- sanitize adds checks for memory leaks and undefined behavior (reduces performance)
-- strict will make warnings fail the build
-- luajit and headsets.openxr should be a path to a folder with the lib (tup can't build them yet)
-- android.flavor can be 'oculus' or 'pico'
-- android.package should be something like 'org.lovr.app'
-- android.project is a path to a lovr project folder that will be included in the apk
-- tup.config can also be used to override properties without modifying this file:
@ -494,7 +492,7 @@ if target == 'android' then
unsigned = 'bin/.lovr.apk.unsigned'
apk = 'bin/lovr.apk'
manifest = config.android.manifest or ('etc/AndroidManifest_%s.xml'):format(config.android.flavor)
manifest = config.android.manifest or 'etc/AndroidManifest.xml'
package = config.android.package and #config.android.package > 0 and ('--rename-manifest-package ' .. config.android.package) or ''
project = config.android.project and #config.android.project > 0 and ('-A ' .. config.android.project) or ''

View File

@ -1,19 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="org.lovr.app">
<uses-sdk android:minSdkVersion="27" android:targetSdkVersion="27"/>
<uses-feature android:name="android.hardware.vr.headtracking" android:required="true"/>
<uses-feature android:glEsVersion="0x00030002" android:required="true"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.RECORD_AUDIO"/>
<application android:allowBackup="false" android:label="LÖVR">
<meta-data android:name="pvr.app.type" android:value="vr"/>
<activity android:name="Activity" android:launchMode="singleTask" android:theme="@android:style/Theme.Black.NoTitleBar.Fullscreen">
<meta-data android:name="android.app.lib_name" android:value="lovr"/>
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
</application>
</manifest>