Skip to content

Commit

Permalink
Remove the WaveVR backend
Browse files Browse the repository at this point in the history
This came from FxR and was mainly used by HTC devices. We haven't
released any official version of Wolvic for HTC so this means that
this port has been basically unmaintained for years. It has been
mainly a maintenance burden forcing us to upgrade APIs just for
the sake of keeping it building. It's time to remove it.
  • Loading branch information
svillar committed Feb 14, 2025
1 parent 8a40a50 commit 3e5ece8
Show file tree
Hide file tree
Showing 31 changed files with 3 additions and 1,763 deletions.
16 changes: 2 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ This repo is only available to Igalia members. If you have access to the relevan

- `third_party/OVRPlatformSDK/` for Oculus (should contain a `Android` and `Include` folders)
- `third_party/hvr/` for Huawei (should contain `arm64-v8a`, `armeabi-v7a` and `include` folders)
- `third_party/wavesdk/` for Vive (should contain a `build` folder, among other things)
- `third_party/picoxr` [Pico OpenXR Mobile SDK](https://developer-global.pico-interactive.com/sdk?deviceId=1&platformId=3&itemId=11) (should contain `libs` folders, among other things that are not necessary for Wolvic)
- `third_party/spaces` [for Snapdragon Spaces](https://spaces.qualcomm.com/)(should contain `libopenxr_loader.aar`)
- `third_party/aliceimu/` for [Huawei Vision Glass](https://consumer.huawei.com/cn/wearables/vision-glass/) (should contain an `.aar` file with the IMU library for the glasses)
Expand All @@ -67,33 +66,22 @@ You can build for different devices:

- **`oculusvr`**: Oculus Quest
- **`hvr`**: Huawei VR Glasses
- **`wavevr`**: VIVE Focus
- **`picoxr`**: Pico 4 and (untested) Pico Neo 3
- **`lynx`**: Lynx R1
- **`spaces`**: Lenovo A3
- **`visionglass`**: Huawei Vision Glass
- **`aosp`**: MagicLeap2 (but should work for any other AOSP device using OpenXR)

For testing on a non-VR device:

- **`noapi`**: Runs on standard Android phones without a headset

Building for Huawei and WaveVR requires access to their respective SDKs which are not included in this repo.
Building for Huawei requires access to its SDKs which is not included in this repo.

The command line version of `gradlew` requires JDK 11. If you see an error that Gradle doesn't understand your Java version, check which version of you're using by running `java -showversion` or `java -version`. You're probably using and older JDK, which won't work.

*Open the project with [Android Studio](https://developer.android.com/studio/index.html)* then build and run it. Depending on what you already have installed in Android Studio, the build may fail and then may prompt you to install dependencies. Just keep doing as it suggests. To select the device to build for, go to `Tool Windows > Build Variants` and select a build variant corresponding to your device.

*If you want to build Wolvic for WaveVR SDK:*

Download the [VIVE Wave SDK](https://developer.vive.com/resources/knowledgebase/wave-sdk/) from the [VIVE Developer Resources](https://developer.vive.com/resources/vive-wave/download/archive/320/), and unzip it. Then, from the top-level project directory, run:

```bash
mkdir -p third_party/wavesdk
cp wave_3.2.0_native_1/repo/com/htc/vr/wvr_client/3.2.0/wvr_client-3.2.0.aar third_party/wavesdk/wvr_client.aar
```

Make certain to set the build flavor to `wavevrDebug` in Android Studio before building the project.

## Local Development

> By default Wolvic will try to download prebuilt GeckoView libraries from [Mozilla's maven repositories](https://maven.mozilla.org/maven2/org/mozilla/geckoview/?prefix=maven2/org/mozilla/geckoview/), where WebXR won't work and that should be used just for testing the 2D browser or to download browser features. If you want to have this, just skip the *GeckoView local substitution* part of the [Setup instructions](#setup-instructions).
Expand Down
1 change: 0 additions & 1 deletion app/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,3 @@
/oculusvr*
/noapi*
/svr*
/wavevr*
13 changes: 1 addition & 12 deletions app/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -51,14 +51,7 @@ add_library( # Sets the name of the library.
src/main/cpp/WidgetResizer.cpp
)

if(WAVEVR)
target_sources(
native-lib
PUBLIC
${CMAKE_SOURCE_DIR}/src/wavevr/cpp/native-lib.cpp
${CMAKE_SOURCE_DIR}/src/wavevr/cpp/DeviceDelegateWaveVR.cpp
)
elseif(NOAPI)
if(NOAPI)
target_sources(
native-lib
PUBLIC
Expand Down Expand Up @@ -165,10 +158,6 @@ add_library(ovrplatform-lib SHARED IMPORTED)
set_target_properties(ovrplatform-lib PROPERTIES IMPORTED_LOCATION
${CMAKE_SOURCE_DIR}/../third_party/OVRPlatformSDK/Android/libs/${ANDROID_ABI}/libovrplatformloader.so )

add_library(wavevr-lib SHARED IMPORTED)
set_target_properties(wavevr-lib PROPERTIES IMPORTED_LOCATION
${CMAKE_SOURCE_DIR}/../third_party/wavesdk/build/wvr_client-${WAVE_SDK_VERSION}/jni/${ANDROID_ABI}/libwvr_api.so )

add_library(hvr-lib SHARED IMPORTED)
set_target_properties(hvr-lib PROPERTIES IMPORTED_LOCATION
${CMAKE_SOURCE_DIR}/../third_party/hvr/${ANDROID_ABI}/libxr_loader.so)
Expand Down
115 changes: 0 additions & 115 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -217,33 +217,6 @@ android {
manifestPlaceholders = [ headtrackingRequired:"false", permissionToRemove:"android.permission.RECEIVE_BOOT_COMPLETED" ]
}

wavevr {
minSdkVersion build_versions.min_sdk_wave
targetSdkVersion build_versions.target_sdk_wave
dimension "platform"
externalNativeBuild {
cmake {
cppFlags " -I" + file("${project.rootDir}/third_party/wavesdk/build/wvr_client-${versions.wavevr}/include").absolutePath +
" -DWAVEVR"
arguments "-DVR_SDK_LIB=wavevr-lib", "-DWAVEVR=ON", "-DWAVE_SDK_VERSION=${versions.wavevr}"
}
}
applicationIdSuffix ".internal"
}

wavevrStore {
minSdkVersion build_versions.min_sdk_wave
targetSdkVersion build_versions.target_sdk_wave
dimension "platform"
externalNativeBuild {
cmake {
cppFlags " -I" + file("${project.rootDir}/third_party/wavesdk/build/wvr_client-${versions.wavevr}/include").absolutePath +
" -DWAVEVR"
arguments "-DVR_SDK_LIB=wavevr-lib", "-DWAVEVR=ON", "-DWAVE_SDK_VERSION=${versions.wavevr}"
}
}
}

picoxr {
dimension "platform"
externalNativeBuild {
Expand Down Expand Up @@ -459,72 +432,6 @@ android {
]
}

wavevr {
java.srcDirs = [
'src/wavevr/java'
]
res.srcDirs = [
'src/wavevr/res'
]
jniLibs.srcDirs = ["${project.rootDir}/third_party/wavesdk/build/wvr_client-${versions.wavevr}/jni"]
packagingOptions {
jniLibs.pickFirsts.add("lib/**/libwvr_api.so")
jniLibs.pickFirsts.add("lib/**/liboverlay_api.so")
jniLibs.pickFirsts.add("lib/**/libwvr_internal_using_assimp.so")
jniLibs.pickFirsts.add("lib/**/libdummy.so")
jniLibs.pickFirsts.add("lib/**/libvrcore_component.so")
jniLibs.pickFirsts.add("lib/**/libwvr_monitor.so")
jniLibs.pickFirsts.add("lib/**/libdummy.so")
jniLibs.pickFirsts.add("lib/**/libwvr_runtime.so")
jniLibs.pickFirsts.add("lib/**/libvr_jni.so")
jniLibs.pickFirsts.add("lib/**/libvrcore_component.so")
jniLibs.pickFirsts.add("lib/**/libwvr_runtime.so")
jniLibs.pickFirsts.add("lib/**/libwvr_ctf_internal_common.so")
jniLibs.pickFirsts.add("lib/**/libwvr_internal_using_assimp.so")
jniLibs.pickFirsts.add("lib/**/libvrcore.so")
jniLibs.pickFirsts.add("lib/**/libwvr_ctf_internal_common.so")
jniLibs.pickFirsts.add("lib/**/libvr_jni.so")
jniLibs.pickFirsts.add("lib/**/libvrcore.so")
jniLibs.pickFirsts.add("lib/**/libwvr_monitor.so")
jniLibs.pickFirsts.add("lib/**/libsvrapi.so")
}
}

wavevrStore {
java.srcDirs = [
'src/wavevr/java'
]
res.srcDirs = [
'src/wavevr/res'
]
assets.srcDirs = [
'src/wavevr/assets'
]
jniLibs.srcDirs = ["${project.rootDir}/third_party/wavesdk/build/wvr_client-${versions.wavevr}/jni"]
manifest.srcFile "src/wavevr/AndroidManifest.xml"
packagingOptions {
jniLibs.pickFirsts.add("lib/**/libwvr_api.so")
jniLibs.pickFirsts.add("lib/**/liboverlay_api.so")
jniLibs.pickFirsts.add("lib/**/libwvr_internal_using_assimp.so")
jniLibs.pickFirsts.add("lib/**/libdummy.so")
jniLibs.pickFirsts.add("lib/**/libvrcore_component.so")
jniLibs.pickFirsts.add("lib/**/libwvr_monitor.so")
jniLibs.pickFirsts.add("lib/**/libdummy.so")
jniLibs.pickFirsts.add("lib/**/libwvr_runtime.so")
jniLibs.pickFirsts.add("lib/**/libvr_jni.so")
jniLibs.pickFirsts.add("lib/**/libvrcore_component.so")
jniLibs.pickFirsts.add("lib/**/libwvr_runtime.so")
jniLibs.pickFirsts.add("lib/**/libwvr_ctf_internal_common.so")
jniLibs.pickFirsts.add("lib/**/libwvr_internal_using_assimp.so")
jniLibs.pickFirsts.add("lib/**/libvrcore.so")
jniLibs.pickFirsts.add("lib/**/libwvr_ctf_internal_common.so")
jniLibs.pickFirsts.add("lib/**/libvr_jni.so")
jniLibs.pickFirsts.add("lib/**/libvrcore.so")
jniLibs.pickFirsts.add("lib/**/libwvr_monitor.so")
jniLibs.pickFirsts.add("lib/**/libsvrapi.so")
}
}

hvr {
java.srcDirs = [
'src/hvr/java',
Expand Down Expand Up @@ -742,28 +649,6 @@ dependencies {
visionglassImplementation 'com.huawei.agconnect:agconnect-core:1.9.1.301'
visionglassImplementation 'com.huawei.hms:ml-computer-voice-asr:3.1.0.300'

// HTC Vive
if (!gradle.startParameter.taskNames.isEmpty() &&
gradle.startParameter.taskNames.get(0).toLowerCase().contains("wavevr")) {
configurations.maybeCreate("default")
artifacts.add("default", file('wvr_client.aar'))

def aarFilename = "wvr_client"

// unzip aar
def unzipDir = file("${rootDir}/third_party/wavesdk/build/${aarFilename}-${versions.wavevr}")
def aarFile = file("${rootDir}/third_party/wavesdk/${aarFilename}.aar")
if (aarFile != null) {
copy {
println 'unzip ' + aarFile
from zipTree(aarFile)
into unzipDir
}
wavevrImplementation fileTree(dir: "${rootDir}/third_party/wavesdk/", include: ['*.aar'])
wavevrStoreImplementation fileTree(dir: "${rootDir}/third_party/wavesdk/", include: ['*.aar'])
}
}

// gecko
def branch = "nightly" // "release", "nightly" or "beta"
geckoImplementation deps.gecko_view."${branch}_x86_64"
Expand Down
6 changes: 0 additions & 6 deletions app/src/common/shared/com/igalia/wolvic/utils/DeviceType.java
Original file line number Diff line number Diff line change
Expand Up @@ -106,10 +106,6 @@ public static boolean isOculus6DOFBuild() {
return BuildConfig.FLAVOR_platform.equalsIgnoreCase("oculusvr") || BuildConfig.FLAVOR_platform.equalsIgnoreCase("oculusvrStore");
}

public static boolean isWaveBuild() {
return BuildConfig.FLAVOR_platform.toLowerCase().contains("wavevr");
}

public static boolean isHVRBuild() {
return BuildConfig.FLAVOR_platform.toLowerCase().contains("hvr");
}
Expand All @@ -132,8 +128,6 @@ public static String getDeviceTypeId() {
type = "oculusvr";
} else if (DeviceType.isPicoXR()) {
type = "picoxr";
} else if (DeviceType.isWaveBuild()) {
type = "wavevrStore";
} else if (DeviceType.isLynx()) {
type = "lynx";
} else if (DeviceType.isSnapdragonSpaces()) {
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
27 changes: 0 additions & 27 deletions app/src/wavevr/AndroidManifest.xml

This file was deleted.

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed app/src/wavevr/assets/vr_controller_focus_tex.ktx
Binary file not shown.
Binary file not shown.
Loading

0 comments on commit 3e5ece8

Please sign in to comment.