Skip to content
This repository has been archived by the owner on Jul 22, 2024. It is now read-only.

Commit

Permalink
Picovr suffix
Browse files Browse the repository at this point in the history
  • Loading branch information
keianhzo committed May 20, 2020
1 parent eda7d95 commit 3d0ce8f
Show file tree
Hide file tree
Showing 5 changed files with 46 additions and 5 deletions.
29 changes: 28 additions & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ android {
arguments "-DVR_SDK_LIB=wavevr-lib", "-DWAVEVR=ON"
}
}
applicationIdSuffix ".wavevr"
applicationIdSuffix ".internal"
}

wavevrStore {
Expand All @@ -191,6 +191,17 @@ android {
arguments "-DPICOVR=ON"
}
}
applicationIdSuffix ".internal"
}

picovrStore {
dimension "platform"
externalNativeBuild {
cmake {
cppFlags " -DPICOVR"
arguments "-DPICOVR=ON"
}
}
}

noapi {
Expand Down Expand Up @@ -229,6 +240,8 @@ android {
'oculusvr3dofStoreArm64Release',
'picovrArm64Debug',
'picovrArm64Release',
'picovrStoreArm64Debug',
'picovrStoreArm64Release',
'wavevrArm64Debug',
'wavevrArm64Release',
'wavevrStoreArm64Debug',
Expand Down Expand Up @@ -345,6 +358,19 @@ android {
jniLibs.srcDirs = ["${project.rootDir}/third_party/picovr"]
}

picovrStore {
java.srcDirs = [
'src/picovr/java'
]
assets.srcDirs = [
'src/picovr/assets'
]
res.srcDirs = [
'src/picovr/res'
]
jniLibs.srcDirs = ["${project.rootDir}/third_party/picovr"]
}

noapi {
java.srcDirs = [
'src/noapi/java'
Expand Down Expand Up @@ -438,6 +464,7 @@ dependencies {

// Pico
picovrImplementation fileTree(dir: "${project.rootDir}/third_party/picovr/", include: ['*.aar'])
picovrStoreImplementation fileTree(dir: "${project.rootDir}/third_party/picovr/", include: ['*.aar'])
}

if (findProject(':servo')) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ public static void newWindowOpenEvent() {
}

private static void setStartupMetrics() {
Distribution.INSTANCE.channelName().set(DeviceType.isOculusBuild() ? "oculusvr" : BuildConfig.FLAVOR_platform);
Distribution.INSTANCE.channelName().set(DeviceType.getDeviceTypeId());
}

@VisibleForTesting
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ public static void init(Context aContext) {
final boolean telemetryEnabled = SettingsStore.getInstance(aContext).isTelemetryEnabled();
final TelemetryConfiguration configuration = new TelemetryConfiguration(aContext)
.setServerEndpoint("https://incoming.telemetry.mozilla.org")
.setAppName(APP_NAME + "_" + (DeviceType.isOculusBuild() ? "oculusvr" : BuildConfig.FLAVOR_platform))
.setAppName(APP_NAME + "_" + DeviceType.getDeviceTypeId())
.setUpdateChannel(BuildConfig.BUILD_TYPE)
.setPreferencesImportantForTelemetry(resources.getString(R.string.settings_key_locale))
.setCollectionEnabled(telemetryEnabled)
Expand Down
13 changes: 13 additions & 0 deletions app/src/common/shared/org/mozilla/vrbrowser/utils/DeviceType.java
Original file line number Diff line number Diff line change
Expand Up @@ -66,4 +66,17 @@ public static boolean isWaveBuild() {
public static boolean isPicoVR() {
return BuildConfig.FLAVOR_platform.toLowerCase().contains("picovr");
}

public static String getDeviceTypeId() {
String type = BuildConfig.FLAVOR_platform;
if (DeviceType.isOculusBuild()) {
type = "oculusvr";
} else if (DeviceType.isPicoVR()) {
type = "picovr";
} else if (DeviceType.isWaveBuild()) {
type = "wavevrStore";
}

return type;
}
}
5 changes: 3 additions & 2 deletions tools/taskcluster/build_targets.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@
This is the default behaviour with no options. Only the Release build of each
architecture for each supported platform is built:
$ python build_targets.py 1.1.4a
assembleNoapiArm64Release assembleNoapiX86_64Release assembleOculusvrArm64Release assembleWavevrstoreArm64Release assemblePicovrArm64Release assembleOculusvrstoreArm64Release assembleWavevrArm64Release assembleOculusvr3dofstoreArm64Release
assembleNoapiArm64Release assembleNoapiX86_64Release assembleOculusvrArm64Release assembleWavevrstoreArm64Release assemblePicovrArm64Release assemblePicovrStoreArm64Release assembleOculusvrstoreArm64Release assembleWavevrArm64Release assembleOculusvr3dofstoreArm64Release
Specifies only build the OculusVR platform:
$ python build_targets.py 1.1.4b+oculusvr
assembleOculusvrArm64Release
Specifies all build types including Release and Debug:
$ python build_targets.py 1.1.4c=all
assembleNoapiArm64 assembleNoapiX86_64 assembleOculusvrArm64 assembleWavevrstoreArm64 assemblePicovrArm64 assembleOculusvrstoreArm64 assembleWavevrArm64 assembleOculusvr3dofstoreArm64
assembleNoapiArm64 assembleNoapiX86_64 assembleOculusvrArm64 assembleWavevrstoreArm64 assemblePicovrArm64 assemblePicovrStoreArm64 assembleOculusvrstoreArm64 assembleWavevrArm64 assembleOculusvr3dofstoreArm64
Specifies Release builds of Arm64 OculusVR, Arm64 WaveVR, and x86_64 NoAPI:
$ python build_targets.py 1.1.4d+oculusvr+wavevr+noapi=x86_64
Expand All @@ -39,6 +39,7 @@
'wavevr': ['arm64'],
'wavevrStore': ['arm64'],
'picovr': ['arm64'],
'picovrStore': ['arm64'],
'noapi': ['arm64', 'x86_64'],
}

Expand Down

0 comments on commit 3d0ce8f

Please sign in to comment.