Skip to content

Commit bb2b417

Browse files
authored
Merge pull request #1064 from StephenHodgson/MRTK-Dev2017.2-MasterMergeUpdate
Mrtk dev2017.2 master merge update
2 parents b6b8bf9 + fd4efe6 commit bb2b417

35 files changed

+436
-254
lines changed

Assets/HoloToolkit-Examples/Prototyping/Shaders/UnlitTransparentTriplanar.shader

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
///
55
/// Simple vertex shader that blends static lighting and camera lighting.
66
///
7-
Shader "HoloToolkit/Examples/UnlitTransparentTriplanar"
7+
Shader "MixedRealityToolkit/Examples/UnlitTransparentTriplanar"
88
{
99
Properties
1010
{

Assets/HoloToolkit-Examples/Prototyping/Shaders/UnlitTriplanar.shader

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
// Licensed under the MIT License. See LICENSE in the project root for license information.
33

44
///
5-
/// Simple vertex shader that blends static lighting and camera lighting.
5+
/// Simple vertex shader that blends static lighting and camera lighting.
66
///
7-
Shader "HoloToolkit/Examples/UnlitTriplanar"
7+
Shader "MixedRealityToolkit/Examples/UnlitTriplanar"
88
{
99
Properties
1010
{

Assets/HoloToolkit/BuildAndDeploy/Editor/BuildDeployPrefs.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ public static class BuildDeployPrefs
1111
// Constants
1212
private const string EditorPrefs_BuildDir = "_BuildDeployWindow_BuildDir";
1313
private const string EditorPrefs_BuildConfig = "_BuildDeployWindow_BuildConfig";
14+
private const string EditorPrefs_BuildPlatform = "_BuildDeployWindow_BuildPlatform";
1415
private const string EditorPrefs_ForceRebuild = "_BuildDeployWindow_ForceBuild";
1516
private const string EditorPrefs_IncrementBuildVersion = "_BuildDeployWindow_IncrementBuildVersion";
1617
private const string EditorPrefs_MSBuildVer = "_BuildDeployWindow_MSBuildVer";
@@ -42,6 +43,12 @@ public static string BuildConfig
4243
set { EditorPrefsUtility.SetEditorPref(EditorPrefs_BuildConfig, value); }
4344
}
4445

46+
public static string BuildPlatform
47+
{
48+
get { return EditorPrefsUtility.GetEditorPref(EditorPrefs_BuildPlatform, "Any CPU"); }
49+
set { EditorPrefsUtility.SetEditorPref(EditorPrefs_BuildPlatform, value); }
50+
}
51+
4552
public static bool ForceRebuild
4653
{
4754
get { return EditorPrefsUtility.GetEditorPref(EditorPrefs_ForceRebuild, false); }

Assets/HoloToolkit/BuildAndDeploy/Editor/BuildDeployTools.cs

Lines changed: 26 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,26 @@ public class BuildDeployTools
2020
{
2121
public static readonly string DefaultMSBuildVersion = "14.0";
2222

23+
public static bool CanBuild()
24+
{
25+
if (PlayerSettings.GetScriptingBackend(BuildTargetGroup.WSA) == ScriptingImplementation.IL2CPP && IsIl2CppAvailable())
26+
{
27+
return true;
28+
}
29+
30+
return PlayerSettings.GetScriptingBackend(BuildTargetGroup.WSA) == ScriptingImplementation.WinRTDotNET && IsDotNetAvailable();
31+
}
32+
33+
public static bool IsDotNetAvailable()
34+
{
35+
return Directory.Exists(EditorApplication.applicationContentsPath + "\\PlaybackEngines\\MetroSupport\\Managed\\UAP");
36+
}
37+
38+
public static bool IsIl2CppAvailable()
39+
{
40+
return Directory.Exists(EditorApplication.applicationContentsPath + "\\PlaybackEngines\\MetroSupport\\Managed\\il2cpp");
41+
}
42+
2343
public static bool BuildSLN(string buildDirectory, bool showDialog = true)
2444
{
2545
// Use BuildSLNUtilities to create the SLN
@@ -53,6 +73,7 @@ public static bool BuildSLN(string buildDirectory, bool showDialog = true)
5373
BuildDeployPrefs.MsBuildVersion,
5474
BuildDeployPrefs.ForceRebuild,
5575
BuildDeployPrefs.BuildConfig,
76+
BuildDeployPrefs.BuildPlatform,
5677
BuildDeployPrefs.BuildDirectory,
5778
BuildDeployPrefs.IncrementBuildVersion);
5879
}
@@ -80,7 +101,7 @@ public static string CalcMSBuildPath(string msBuildVersion)
80101
{
81102
if (key != null)
82103
{
83-
var msBuildBinFolder = (string) key.GetValue("MSBuildToolsPath");
104+
var msBuildBinFolder = (string)key.GetValue("MSBuildToolsPath");
84105
return Path.Combine(msBuildBinFolder, "msbuild.exe");
85106
}
86107
}
@@ -156,7 +177,7 @@ public static bool RestoreNugetPackages(string nugetPath, string storePath)
156177
return File.Exists(storePath + "\\project.lock.json");
157178
}
158179

159-
public static bool BuildAppxFromSLN(string productName, string msBuildVersion, bool forceRebuildAppx, string buildConfig, string buildDirectory, bool incrementVersion, bool showDialog = true)
180+
public static bool BuildAppxFromSLN(string productName, string msBuildVersion, bool forceRebuildAppx, string buildConfig, string buildPlatform, string buildDirectory, bool incrementVersion, bool showDialog = true)
160181
{
161182
EditorUtility.DisplayProgressBar("Build AppX", "Building AppX Package...", 0);
162183
string slnFilename = Path.Combine(buildDirectory, PlayerSettings.productName + ".sln");
@@ -218,10 +239,11 @@ public static bool BuildAppxFromSLN(string productName, string msBuildVersion, b
218239
{
219240
FileName = vs,
220241
CreateNoWindow = false,
221-
Arguments = string.Format("\"{0}\" /t:{2} /p:Configuration={1} /p:Platform=x86 /verbosity:m",
242+
Arguments = string.Format("\"{0}\" /t:{1} /p:Configuration={2} /p:Platform={3} /verbosity:m",
222243
solutionProjectPath,
244+
forceRebuildAppx ? "Rebuild" : "Build",
223245
buildConfig,
224-
forceRebuildAppx ? "Rebuild" : "Build")
246+
buildPlatform)
225247
};
226248

227249
// Uncomment out to debug by copying into command window

0 commit comments

Comments
 (0)