Skip to content
This repository has been archived by the owner on Mar 2, 2018. It is now read-only.

Commit

Permalink
Merge pull request #27 from googlesamples/release-urquhart
Browse files Browse the repository at this point in the history
release-urquhart
  • Loading branch information
chaosemer committed Aug 21, 2015
2 parents b8ca964 + bf96aec commit d68b8c5
Show file tree
Hide file tree
Showing 335 changed files with 6,082 additions and 8,644 deletions.
84 changes: 32 additions & 52 deletions UnityExamples/Assets/Editor/BuildTools.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,19 @@
//-----------------------------------------------------------------------
// <copyright file="BuildTools.cs" company="Google">
//
// <copyright file="BuildTools.cs" company="Google">
//
// Copyright 2015 Google Inc. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// </copyright>
//-----------------------------------------------------------------------
using System.Collections;
Expand All @@ -14,37 +25,26 @@
/// all projects.
///
/// To use this from the command line, run the following command:
/// <FULLPATH_UNITY.APP>/Contents/MacOS/Unity -batchmode -projectPath <FULLPATH> -executeMethod <METHOD_TO_RUN> -quit
/// [FULLPATH_UNITY.APP]/Contents/MacOS/Unity -batchmode -projectPath [FULLPATH] -executeMethod [METHOD_TO_RUN] -quit
///
/// For example:
/// /Applications/Unity/Unity.app/Contents/MacOS/Unity -batchmode -projectPath ~/Unity/tango-examples-unity/UnityExamples/ -executeMethod BuildTools.BuildAll -quit
///
/// For more info, goto <http://docs.unity3d.com/Manual/CommandLineArguments.html>
/// For more info, goto [http://docs.unity3d.com/Manual/CommandLineArguments.html].
/// </summary>
public class BuildTools
{
private static BuildUtil.APKSettings areaLearningAPK = new BuildUtil.APKSettings
{
ProjectName = "Unity Area Learning",
Icon = "TangoExamples/AreaLearning/Textures/icon.png",
Scenes = new string[] { "Scenes/AreaLearning.unity" },
BundleIdentifier = "com.projecttango.experiments.unityarealearning"
};

private static BuildUtil.APKSettings motionTrackingAPK = new BuildUtil.APKSettings
{
ProjectName = "Unity Motion Tracking",
Icon = "TangoExamples/MotionTracking/Textures/icon.png",
Scenes = new string[] { "Scenes/MotionTracking.unity" },
BundleIdentifier = "com.projecttango.experiments.unitymotiontracking"
};

private static BuildUtil.APKSettings pointCloudAPK = new BuildUtil.APKSettings
{
ProjectName = "Unity Point Cloud",
Icon = "TangoExamples/PointCloud/Textures/icon.png",
Scenes = new string[] { "Scenes/PointCloud.unity" },
BundleIdentifier = "com.projecttango.experiments.unitypointcloud"
private static BuildUtil.APKSettings examplesAPK = new BuildUtil.APKSettings
{
ProjectName = "Unity Examples",
Icon = "TangoExamples/Common/Textures/ProjectTango_Logo.png",
Scenes = new string[]
{
"Scenes/AreaLearning.unity",
"Scenes/MotionTracking.unity",
"Scenes/PointCloud.unity",
},
BundleIdentifier = "com.google.projecttango.examples"
};

private static BuildUtil.APKSettings augmentedRealityAPK = new BuildUtil.APKSettings
Expand All @@ -66,7 +66,7 @@ public class BuildTools
private static BuildUtil.APKSettings persistentStateAPK = new BuildUtil.APKSettings
{
ProjectName = "Unity Persistent State",
Icon = "TangoExamples/ExperimentalPersistentState/Textures/Moto-ProjectTango_Logo Only Square copy.png",
Icon = "TangoExamples/Common/Textures/ProjectTango_Logo.png",
Scenes = new string[]
{
"Scenes/ExperimentalPersistentState/ExperimentalPersistentState_StartScene.unity",
Expand Down Expand Up @@ -101,9 +101,7 @@ public class BuildTools
[MenuItem("Tango/Build/All", false, 1)]
public static void BuildAll()
{
BuildUtil.BuildAPK(areaLearningAPK);
BuildUtil.BuildAPK(motionTrackingAPK);
BuildUtil.BuildAPK(pointCloudAPK);
BuildUtil.BuildAPK(examplesAPK);
BuildUtil.BuildAPK(augmentedRealityAPK);
BuildUtil.BuildAPK(meshBuilderAPK);
BuildUtil.BuildAPK(persistentStateAPK);
Expand Down Expand Up @@ -133,28 +131,10 @@ public static void BuildSdkPlusPrefabsPackage()
/// <summary>
/// Function for UI.
/// </summary>
[MenuItem("Tango/Build/Area Learning")]
public static void BuildAreaLearning()
{
BuildUtil.BuildAPK(areaLearningAPK);
}

/// <summary>
/// Function for UI.
/// </summary>
[MenuItem("Tango/Build/Motion Tracking")]
public static void BuildMotionTracking()
{
BuildUtil.BuildAPK(motionTrackingAPK);
}

/// <summary>
/// Function for UI.
/// </summary>
[MenuItem("Tango/Build/Point Cloud")]
public static void BuildPointCloud()
[MenuItem("Tango/Build/Examples")]
public static void BuildExamples()
{
BuildUtil.BuildAPK(pointCloudAPK);
BuildUtil.BuildAPK(examplesAPK);
}

/// <summary>
Expand Down
26 changes: 23 additions & 3 deletions UnityExamples/Assets/Editor/BuildUtil.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,19 @@
//-----------------------------------------------------------------------
// <copyright file="BuildUtil.cs" company="Google">
//
// <copyright file="BuildUtil.cs" company="Google">
//
// Copyright 2015 Google Inc. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// </copyright>
//-----------------------------------------------------------------------
using System;
Expand Down Expand Up @@ -61,6 +72,7 @@ public static void BuildAPK(APKSettings settings)
string oldKeyaliasPass = PlayerSettings.Android.keyaliasPass;
string oldProductName = PlayerSettings.productName;
string oldBundleIdentifier = PlayerSettings.bundleIdentifier;
string oldAndroidSdkRoot = EditorPrefs.GetString("AndroidSdkRoot");

// make sure the product folder exists
System.IO.Directory.CreateDirectory(BUILD_DIRECTORY_W_SLASH);
Expand All @@ -84,6 +96,13 @@ public static void BuildAPK(APKSettings settings)
PlayerSettings.productName = settings.ProjectName;
PlayerSettings.bundleIdentifier = settings.BundleIdentifier;

// Unity won't remember where the Android SDK was when built on Jenkins
string sdkRoot = Environment.GetEnvironmentVariable("ANDROID_SDK_ROOT");
if (sdkRoot != String.Empty)
{
EditorPrefs.SetString("AndroidSdkRoot", sdkRoot);
}

// and finally... build it!
string[] scenesUnityPath = new string[settings.Scenes.Length];
for (int it = 0; it != settings.Scenes.Length; ++it)
Expand All @@ -101,6 +120,7 @@ public static void BuildAPK(APKSettings settings)
PlayerSettings.Android.keyaliasPass = oldKeyaliasPass;
PlayerSettings.productName = oldProductName;
PlayerSettings.bundleIdentifier = oldBundleIdentifier;
EditorPrefs.SetString("AndroidSdkRoot", oldAndroidSdkRoot);
}

/// <summary>
Expand Down
4 changes: 2 additions & 2 deletions UnityExamples/Assets/Google-Unity.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions UnityExamples/Assets/Google-Unity/Scripts.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions UnityExamples/Assets/Plugins.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions UnityExamples/Assets/Plugins/Android.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions UnityExamples/Assets/Plugins/Android/UnityUxHelper.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions UnityExamples/Assets/Plugins/Android/UnityUxHelper/bin.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

107 changes: 17 additions & 90 deletions UnityExamples/Assets/Plugins/Android/UnityUxHelper/bin/R.txt
Original file line number Diff line number Diff line change
@@ -1,90 +1,17 @@
int color gray_dark 0x7f040000
int color tango_blue 0x7f040004
int color tango_green 0x7f040003
int color tango_yellow 0x7f040005
int color text_exception_action_required 0x7f040002
int color text_exception_description 0x7f040001
int dimen connection_progress_bar_sub_margin 0x7f050000
int dimen exception_component_height 0x7f050001
int dimen exception_status_component_size 0x7f050002
int dimen shake_ok_tick_height 0x7f050004
int dimen shake_ok_tick_translation_x 0x7f050005
int dimen shake_ok_tick_translation_y 0x7f050006
int dimen shake_ok_tick_width 0x7f050003
int drawable exception_container_shadow 0x7f020000
int drawable ic_exception_i_am_dizzy 0x7f020001
int drawable ic_exception_i_am_lost 0x7f020002
int drawable ic_exception_i_cant_see 0x7f020003
int drawable ic_exception_system 0x7f020004
int drawable ic_launcher 0x7f020005
int drawable ic_shake_background 0x7f020006
int drawable ic_shake_err 0x7f020007
int drawable ic_shake_ok 0x7f020008
int drawable ic_shake_ok_tick 0x7f020009
int drawable splash_logo 0x7f02000a
int id connection_layout 0x7f08000a
int id connection_text 0x7f080007
int id exception_container 0x7f080009
int id exception_description 0x7f080002
int id exception_icon 0x7f080000
int id exception_status 0x7f080003
int id exception_title 0x7f080001
int id group_shake_icon 0x7f080004
int id image_shake_err 0x7f080006
int id image_shake_ok_tick 0x7f080005
int id layout_exceptions 0x7f08000b
int id splash_logo 0x7f080008
int layout exception_component 0x7f030000
int layout layout_connection 0x7f030001
int layout layout_splash 0x7f030002
int layout layout_tango_ux 0x7f030003
int layout tango_ux_exceptions 0x7f030004
int string action_required 0x7f060015
int string connection_layout_description 0x7f060017
int string connection_layout_message 0x7f060016
int string device_not_responding_description 0x7f06000c
int string device_not_responding_title 0x7f06000b
int string lying_on_surface_description 0x7f060010
int string lying_on_surface_title 0x7f06000f
int string motion_track_description 0x7f060012
int string motion_track_title 0x7f060011
int string moving_too_fast_description 0x7f060002
int string moving_too_fast_title 0x7f060001
int string not_enough_light_description 0x7f060008
int string not_enough_light_title 0x7f060007
int string project_tango 0x7f060000
int string run_time_mismatch_description 0x7f060014
int string run_time_mismatch_title 0x7f060013
int string service_updated_description 0x7f06000e
int string service_updated_title 0x7f06000d
int string space_not_recognized_description 0x7f060006
int string space_not_recognized_title 0x7f060005
int string too_much_light_description 0x7f06000a
int string too_much_light_title 0x7f060009
int string unable_to_detect_surface_description 0x7f060004
int string unable_to_detect_surface_title 0x7f060003
int string ux_exception_1 0x7f060019
int string ux_exception_10 0x7f060022
int string ux_exception_11 0x7f060023
int string ux_exception_2 0x7f06001a
int string ux_exception_3 0x7f06001b
int string ux_exception_4 0x7f06001c
int string ux_exception_5 0x7f06001d
int string ux_exception_6 0x7f06001e
int string ux_exception_7 0x7f06001f
int string ux_exception_8 0x7f060020
int string ux_exception_9 0x7f060021
int string ux_exception_listener 0x7f060018
int style AppBaseTheme 0x7f07000b
int style AppTheme 0x7f07000c
int style ConnectionLayoutSubtext 0x7f070003
int style ConnectionLayoutText 0x7f070002
int style DownloadProgressText 0x7f070004
int style ExceptionActionRequired 0x7f070007
int style ExceptionDescription 0x7f070006
int style ExceptionTitle 0x7f070005
int style Text20GrayDarkLight 0x7f070001
int style Text40GrayDarkThin 0x7f070000
int style TextListContentItem 0x7f07000a
int style TextListTitle 0x7f070008
int style TextListTitleItem 0x7f070009
int drawable ic_launcher 0x7f020000
int id layout_exceptions 0x7f060000
int layout tango_ux_exceptions 0x7f030000
int string ux_exception_1 0x7f040001
int string ux_exception_10 0x7f04000a
int string ux_exception_11 0x7f04000b
int string ux_exception_2 0x7f040002
int string ux_exception_3 0x7f040003
int string ux_exception_4 0x7f040004
int string ux_exception_5 0x7f040005
int string ux_exception_6 0x7f040006
int string ux_exception_7 0x7f040007
int string ux_exception_8 0x7f040008
int string ux_exception_9 0x7f040009
int string ux_exception_listener 0x7f040000
int style AppBaseTheme 0x7f050000
int style AppTheme 0x7f050001

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit d68b8c5

Please sign in to comment.