From b81f86b5adf7e292a76ecc9ab4d84534b0327185 Mon Sep 17 00:00:00 2001 From: bjorn Date: Wed, 9 Nov 2022 00:21:49 -0800 Subject: [PATCH] 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. --- CMakeLists.txt | 16 +++------------- README.md | 2 +- Tupfile.lua | 4 +--- ...anifest_oculus.xml => AndroidManifest.xml} | 0 etc/AndroidManifest_pico.xml | 19 ------------------- 5 files changed, 5 insertions(+), 36 deletions(-) rename etc/{AndroidManifest_oculus.xml => AndroidManifest.xml} (100%) delete mode 100644 etc/AndroidManifest_pico.xml diff --git a/CMakeLists.txt b/CMakeLists.txt index a22a1f3b..9294658b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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) diff --git a/README.md b/README.md index 7dcf5fe7..106b5f74 100644 --- a/README.md +++ b/README.md @@ -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. diff --git a/Tupfile.lua b/Tupfile.lua index d79ecbf5..de1a4523 100644 --- a/Tupfile.lua +++ b/Tupfile.lua @@ -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 '' diff --git a/etc/AndroidManifest_oculus.xml b/etc/AndroidManifest.xml similarity index 100% rename from etc/AndroidManifest_oculus.xml rename to etc/AndroidManifest.xml diff --git a/etc/AndroidManifest_pico.xml b/etc/AndroidManifest_pico.xml deleted file mode 100644 index e7b82156..00000000 --- a/etc/AndroidManifest_pico.xml +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - - - - - - - - - - - - -