Skip to content

Commit 17bd90f

Browse files
committed
update to GVR 1.40.0
1 parent 41623cd commit 17bd90f

File tree

12 files changed

+20
-18
lines changed

12 files changed

+20
-18
lines changed
-909 KB
Binary file not shown.
-2.01 MB
Binary file not shown.
-547 KB
Binary file not shown.
912 KB
Binary file not shown.
2.02 MB
Binary file not shown.
581 KB
Binary file not shown.

libraries/vr/lib/gvr-audio.jar

3 KB
Binary file not shown.

libraries/vr/lib/gvr-base.jar

3.12 KB
Binary file not shown.

libraries/vr/lib/gvr-common.jar

39 KB
Binary file not shown.

libraries/vr/src/processing/vr/PSurfaceVR.java

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@
3838
import android.app.ActivityManager;
3939
import android.content.Context;
4040
import android.content.Intent;
41-
import android.content.pm.ActivityInfo;
4241
import android.content.pm.ConfigurationInfo;
4342
import android.content.res.AssetManager;
4443
import android.view.MotionEvent;
@@ -141,13 +140,7 @@ public String getName() {
141140

142141
@Override
143142
public void setOrientation(int which) {
144-
if (component.getKind() == AppComponent.FRAGMENT) {
145-
if (which == PORTRAIT) {
146-
activity.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
147-
} else if (which == LANDSCAPE) {
148-
activity.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);
149-
}
150-
}
143+
PGraphics.showWarning("Orientation in VR apps cannot be changed");
151144
}
152145

153146
@Override

scripts/gvrsdk-update.sh

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,10 @@ nano=3.1.0
1717

1818
mkdir ../libraries/vr/gvrsdk/$ver
1919

20-
wget https://github.com/googlevr/gvr-android-sdk/archive/$sdk.zip
20+
#wget https://github.com/googlevr/gvr-android-sdk/archive/$sdk.zip
21+
22+
# curl is the default on Mac now
23+
curl -o $sdk.zip -L https://github.com/googlevr/gvr-android-sdk/archive/$sdk.zip
2124

2225
unzip $sdk.zip
2326

@@ -26,6 +29,17 @@ unzip gvr-android-sdk-$ver/libraries/sdk-base-$ver.aar -d base.aar
2629
unzip gvr-android-sdk-$ver/libraries/sdk-common-$ver.aar -d common.aar
2730
unzip gvr-android-sdk-$ver/libraries/sdk-audio-$ver.aar -d audio.aar
2831

32+
################################################
33+
# protobuf-javanano
34+
35+
# protobuf-javanano was unbundled from the SDK:
36+
# https://github.com/googlevr/gvr-android-sdk/issues/264
37+
# but required by sdk-common, the correspond pom file alongside the aar contains the
38+
# details of the dependency.
39+
#wget http://central.maven.org/maven2/com/google/protobuf/nano/protobuf-javanano/$nano/protobuf-javanano-$nano.jar
40+
nanojar=protobuf-javanano-$nano.jar
41+
curl -o $nanojar -L http://central.maven.org/maven2/com/google/protobuf/nano/protobuf-javanano/$nano/$nanojar
42+
2943
################################################
3044
# Base package
3145
mkdir sdk-base
@@ -56,7 +70,6 @@ cp sdk-base/libs/gvr-base.jar ../libraries/vr/lib
5670
zip -r sdk-base.zip sdk-base
5771
mv sdk-base.zip ../libraries/vr/gvrsdk/$ver
5872

59-
6073
################################################
6174
# Common package
6275
mkdir sdk-common
@@ -78,12 +91,7 @@ jar cf gvr-common.jar -C sdk-common/libs/common .
7891
rm -Rf sdk-common/libs/common
7992
mv gvr-common.jar sdk-common/libs
8093

81-
# protobuf-javanano was unbundled from the SDK:
82-
# https://github.com/googlevr/gvr-android-sdk/issues/264
83-
# but required by sdk-common, the correspond pom file alongside the aar contains the
84-
# details of the dependency.
85-
wget http://central.maven.org/maven2/com/google/protobuf/nano/protobuf-javanano/$nano/protobuf-javanano-$nano.jar
86-
mv protobuf-javanano-$nano.jar sdk-common/libs
94+
mv $nanojar sdk-common/libs
8795

8896
# Need the jar also in VR's lib folder
8997
cp sdk-common/libs/gvr-common.jar ../libraries/vr/lib

src/processing/mode/android/AndroidBuild.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ class AndroidBuild extends JavaBuild {
106106
static public final String support_version = "25.2.0";
107107
static public final String play_services_version = "10.2.0";
108108
static public final String wear_version = "2.0.0";
109-
static public final String gvr_sdk_version = "1.20.0";
109+
static public final String gvr_sdk_version = "1.40.0";
110110

111111
private boolean runOnEmulator = false;
112112
private int appComponent = FRAGMENT;
@@ -1556,7 +1556,8 @@ private void copyGVRLibs(String targetID, File libsFolder) throws IOException {
15561556

15571557
////////////////////////////////////////////////////////////////////////
15581558
// first step: unpack the VR packages in the project's
1559-
// libs folder:
1559+
// libs folder:
1560+
PApplet.println("GVR version to use", gvr_sdk_version);
15601561
File baseZipFile = mode.getContentFile("libraries/vr/gvrsdk/" + gvr_sdk_version + "/sdk-base.zip");
15611562
File commonZipFile = mode.getContentFile("libraries/vr/gvrsdk/" + gvr_sdk_version + "/sdk-common.zip");
15621563
File audioZipFile = mode.getContentFile("libraries/vr/gvrsdk/" + gvr_sdk_version + "/sdk-audio.zip");

0 commit comments

Comments
 (0)