@@ -48,21 +48,21 @@ class AndroidBuild extends JavaBuild {
48
48
static public final int FRAGMENT = 0 ;
49
49
static public final int WALLPAPER = 1 ;
50
50
static public final int WATCHFACE = 2 ;
51
- static public final int CARDBOARD = 3 ;
51
+ static public final int VR = 3 ;
52
52
53
53
static public final String DEFAULT_COMPONENT = "app" ;
54
54
55
55
static private final String FRAGMENT_ACTIVITY_TEMPLATE = "FragmentActivity.java.tmpl" ;
56
56
static private final String WALLPAPER_SERVICE_TEMPLATE = "WallpaperService.java.tmpl" ;
57
57
static private final String WATCHFACE_SERVICE_TEMPLATE = "WatchFaceService.java.tmpl" ;
58
- static private final String CARDBOARD_ACTIVITY_TEMPLATE = "CardboardActivity .java.tmpl" ;
58
+ static private final String VR_ACTIVITY_TEMPLATE = "VRActivity .java.tmpl" ;
59
59
static private final String HANDHELD_ACTIVITY_TEMPLATE = "HandheldActivity.java.tmpl" ;
60
60
static private final String HANDHELD_MANIFEST_TEMPLATE = "HandheldManifest.xml.tmpl" ;
61
61
static private final String HANDHELD_LAYOUT_TEMPLATE = "HandheldLayout.xml.tmpl" ;
62
62
static private final String WEARABLE_DESCRIPTION_TEMPLATE = "WearableDescription.xml.tmpl" ;
63
63
static private final String LAYOUT_ACTIVITY_TEMPLATE = "LayoutActivity.xml.tmpl" ;
64
64
static private final String STYLES_FRAGMENT_TEMPLATE = "StylesFragment.xml.tmpl" ;
65
- static private final String STYLES_CARDBOARD_TEMPLATE = "StylesCardboard .xml.tmpl" ;
65
+ static private final String STYLES_VR_TEMPLATE = "StylesVR .xml.tmpl" ;
66
66
static private final String XML_WALLPAPER_TEMPLATE = "XMLWallpaper.xml.tmpl" ;
67
67
static private final String STRINGS_WALLPAPER_TEMPLATE = "StringsWallpaper.xml.tmpl" ;
68
68
static private final String XML_WATCHFACE_TEMPLATE = "XMLWatchFace.xml.tmpl" ;
@@ -74,7 +74,7 @@ class AndroidBuild extends JavaBuild {
74
74
static private final String APP_GRADLE_BUILD_TEMPLATE = "FragmentBuild.gradle.tmpl" ;
75
75
static private final String HANDHELD_GRADLE_BUILD_TEMPLATE = "HandheldBuild.gradle.tmpl" ;
76
76
static private final String WEARABLE_GRADLE_BUILD_TEMPLATE = "WearableBuild.gradle.tmpl" ;
77
- static private final String CARDBOARD_GRADLE_BUILD_TEMPLATE = "CardboardBuild .gradle.tmpl" ;
77
+ static private final String VR_GRADLE_BUILD_TEMPLATE = "VRBuild .gradle.tmpl" ;
78
78
79
79
// TODO: ask base package name when exporting signed apk
80
80
// static final String basePackage = "changethispackage.beforesubmitting.tothemarket";
@@ -91,7 +91,7 @@ class AndroidBuild extends JavaBuild {
91
91
// which allows us to exactly determine the size of the screen.
92
92
static public final String min_sdk_fragment = "16" ; // Jelly Bean (4.1)
93
93
static public final String min_sdk_wallpaper = "16" ; //
94
- static public final String min_sdk_cardboard = "19" ; // KitKat (4.4)
94
+ static public final String min_sdk_gvr = "19" ; // KitKat (4.4)
95
95
static public final String min_sdk_handheld = "21" ; // Lollipop (5.0)
96
96
static public final String min_sdk_watchface = "23" ; // Marshmallow (6.0)
97
97
@@ -269,7 +269,7 @@ public File createProject(String targetID, boolean wear)
269
269
if (getAppComponent () == FRAGMENT ) {
270
270
copyAppCompatLib (targetID , tmpFolder , libsFolder );
271
271
}
272
- if (getAppComponent () == CARDBOARD ) {
272
+ if (getAppComponent () == VR ) {
273
273
copyGVRLibs (targetID , libsFolder );
274
274
}
275
275
@@ -923,9 +923,9 @@ private void writeRes(File resFolder) throws SketchException {
923
923
writeResStringsWallpaper (valuesFolder );
924
924
}
925
925
926
- if (comp == CARDBOARD ) {
926
+ if (comp == VR ) {
927
927
File valuesFolder = mkdirs (resFolder , "values" );
928
- writeResStylesCardboard (valuesFolder );
928
+ writeResStylesVR (valuesFolder );
929
929
}
930
930
931
931
File sketchFolder = sketch .getFolder ();
@@ -1099,8 +1099,8 @@ private void writeMainClass(final File srcDirectory, String renderer) {
1099
1099
} else {
1100
1100
writeWatchFaceCanvasService (srcDirectory , permissions );
1101
1101
}
1102
- } else if (comp == CARDBOARD ) {
1103
- writeCardboardActivity (srcDirectory , permissions );
1102
+ } else if (comp == VR ) {
1103
+ writeVRActivity (srcDirectory , permissions );
1104
1104
}
1105
1105
}
1106
1106
@@ -1155,8 +1155,8 @@ private void writeWatchFaceCanvasService(final File srcDirectory, String[] permi
1155
1155
}
1156
1156
1157
1157
1158
- private void writeCardboardActivity (final File srcDirectory , String [] permissions ) {
1159
- File javaTemplate = mode .getContentFile ("templates/" + CARDBOARD_ACTIVITY_TEMPLATE );
1158
+ private void writeVRActivity (final File srcDirectory , String [] permissions ) {
1159
+ File javaTemplate = mode .getContentFile ("templates/" + VR_ACTIVITY_TEMPLATE );
1160
1160
File javaFile = new File (new File (srcDirectory , getPackageName ().replace ("." , "/" )), "MainActivity.java" );
1161
1161
1162
1162
HashMap <String , String > replaceMap = new HashMap <String , String >();
@@ -1185,8 +1185,8 @@ private void writeResStylesFragment(final File valuesFolder) {
1185
1185
}
1186
1186
1187
1187
1188
- private void writeResStylesCardboard (final File valuesFolder ) {
1189
- File xmlTemplate = mode .getContentFile ("templates/" + STYLES_CARDBOARD_TEMPLATE );
1188
+ private void writeResStylesVR (final File valuesFolder ) {
1189
+ File xmlTemplate = mode .getContentFile ("templates/" + STYLES_VR_TEMPLATE );
1190
1190
File xmlFile = new File (valuesFolder , "styles.xml" );
1191
1191
AndroidMode .createFileFromTemplate (xmlTemplate , xmlFile );
1192
1192
}
@@ -1360,9 +1360,9 @@ private void createAppModule(File projectFolder, File exportFolder, String build
1360
1360
1361
1361
String minSdk ;
1362
1362
String tmplFile ;
1363
- if (appComponent == CARDBOARD ) {
1364
- minSdk = min_sdk_cardboard ;
1365
- tmplFile = CARDBOARD_GRADLE_BUILD_TEMPLATE ;
1363
+ if (appComponent == VR ) {
1364
+ minSdk = min_sdk_gvr ;
1365
+ tmplFile = VR_GRADLE_BUILD_TEMPLATE ;
1366
1366
} else {
1367
1367
minSdk = min_sdk_fragment ;
1368
1368
tmplFile = APP_GRADLE_BUILD_TEMPLATE ;
@@ -1389,9 +1389,9 @@ private void createAppModule(File projectFolder, File exportFolder, String build
1389
1389
File libsFolder = mkdirs (moduleFolder , "libs" );
1390
1390
Util .copyFile (coreFile , new File (libsFolder , "processing-core.jar" ));
1391
1391
1392
- if (appComponent == CARDBOARD ) {
1393
- File cardboardFile = new File (projectFolder , "libs/cardboard .jar" );
1394
- Util .copyFile (cardboardFile , new File (libsFolder , "cardboard .jar" ));
1392
+ if (appComponent == VR ) {
1393
+ File vrFile = new File (projectFolder , "libs/vr .jar" );
1394
+ Util .copyFile (vrFile , new File (libsFolder , "vr .jar" ));
1395
1395
}
1396
1396
1397
1397
File mainFolder = mkdirs (moduleFolder , "src/main" );
@@ -1551,15 +1551,15 @@ private void copyAppCompatLib(String targetID, File tmpFolder, File libsFolder)
1551
1551
}
1552
1552
1553
1553
private void copyGVRLibs (String targetID , File libsFolder ) throws IOException {
1554
- // TODO: temporary hack until I find a better way to include the cardboard aar
1555
- // packages included in the cardboard SDK:
1554
+ // TODO: temporary hack until I find a better way to include the VR aar
1555
+ // packages included in the GVR SDK:
1556
1556
1557
1557
////////////////////////////////////////////////////////////////////////
1558
- // first step: unpack the cardboard packages in the project's
1558
+ // first step: unpack the VR packages in the project's
1559
1559
// libs folder:
1560
- File baseZipFile = mode .getContentFile ("libraries/cardboard /gvrsdk/" + gvr_sdk_version + "/sdk-base.zip" );
1561
- File commonZipFile = mode .getContentFile ("libraries/cardboard /gvrsdk/" + gvr_sdk_version + "/sdk-common.zip" );
1562
- File audioZipFile = mode .getContentFile ("libraries/cardboard /gvrsdk/" + gvr_sdk_version + "/sdk-audio.zip" );
1560
+ File baseZipFile = mode .getContentFile ("libraries/vr /gvrsdk/" + gvr_sdk_version + "/sdk-base.zip" );
1561
+ File commonZipFile = mode .getContentFile ("libraries/vr /gvrsdk/" + gvr_sdk_version + "/sdk-common.zip" );
1562
+ File audioZipFile = mode .getContentFile ("libraries/vr /gvrsdk/" + gvr_sdk_version + "/sdk-audio.zip" );
1563
1563
AndroidMode .extractFolder (baseZipFile , libsFolder , true );
1564
1564
AndroidMode .extractFolder (commonZipFile , libsFolder , true );
1565
1565
AndroidMode .extractFolder (audioZipFile , libsFolder , true );
0 commit comments