Skip to content

Commit fdf2528

Browse files
Merge pull request #714 from StephenHodgson/HTK-BuildFixes
Build & Deploy Window Fixes
2 parents db6fe66 + f2032aa commit fdf2528

19 files changed

+1185
-320
lines changed

Assets/HoloToolkit/Build/Editor/BuildDeployPortal.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
//
55

66
using UnityEngine;
7-
using System.Collections;
87
using System.Net;
98
using System;
109
using System.IO;
@@ -419,7 +418,7 @@ public static bool DeviceLogFile_View(string packageFamilyName, ConnectInfo conn
419418
// Open it up in default text editor
420419
System.Diagnostics.Process.Start(logFile);
421420
}
422-
catch (System.Exception ex)
421+
catch (Exception ex)
423422
{
424423
Debug.LogError(ex.ToString());
425424
return false;

Assets/HoloToolkit/Build/Editor/BuildDeployPrefs.cs

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99

1010
namespace HoloToolkit.Unity
1111
{
12-
1312
public static class BuildDeployPrefs
1413
{
1514
// Constants
@@ -28,45 +27,54 @@ public static string BuildDirectory
2827
get { return GetEditorPref(EditorPrefs_BuildDir, "WindowsStoreApp"); }
2928
set { EditorPrefs.SetString(EditorPrefs_BuildDir, value); }
3029
}
30+
3131
public static string AbsoluteBuildDirectory
3232
{
3333
get { return Path.GetFullPath(Path.Combine(Path.Combine(Application.dataPath, ".."), BuildDirectory)); }
3434
}
35+
3536
public static string MsBuildVersion
3637
{
3738
get { return GetEditorPref(EditorPrefs_MSBuildVer, BuildDeployTools.DefaultMSBuildVersion); }
3839
set { EditorPrefs.SetString(EditorPrefs_MSBuildVer, value); }
3940
}
41+
4042
public static string BuildConfig
4143
{
4244
get { return GetEditorPref(EditorPrefs_BuildConfig, "Debug"); }
4345
set { EditorPrefs.SetString(EditorPrefs_BuildConfig, value); }
4446
}
47+
4548
public static bool ForceRebuild
4649
{
4750
get { return GetEditorPref(EditorPrefs_ForceRebuild, false); }
4851
set { EditorPrefs.SetBool(EditorPrefs_ForceRebuild, value); }
4952
}
53+
5054
public static bool IncrementBuildVersion
5155
{
5256
get { return GetEditorPref(EditorPrefs_IncrementBuildVersion, true); }
5357
set { EditorPrefs.SetBool(EditorPrefs_IncrementBuildVersion, value); }
5458
}
59+
5560
public static string TargetIPs
5661
{
5762
get { return GetEditorPref(EditorPrefs_TargetIPs, "127.0.0.1"); }
5863
set { EditorPrefs.SetString(EditorPrefs_TargetIPs, value); }
5964
}
65+
6066
public static string DeviceUser
6167
{
6268
get { return GetEditorPref(EditorPrefs_DeviceUser, ""); }
6369
set { EditorPrefs.SetString(EditorPrefs_DeviceUser, value); }
6470
}
71+
6572
public static string DevicePassword
6673
{
6774
get { return GetEditorPref(EditorPrefs_DevicePwd, ""); }
6875
set { EditorPrefs.SetString(EditorPrefs_DevicePwd, value); }
6976
}
77+
7078
public static bool FullReinstall
7179
{
7280
get { return GetEditorPref(EditorPrefs_FullReinstall, true); }
@@ -79,11 +87,9 @@ private static string GetEditorPref(string key, string defaultValue)
7987
{
8088
return EditorPrefs.GetString(key);
8189
}
82-
else
83-
{
84-
EditorPrefs.SetString(key, defaultValue);
85-
return defaultValue;
86-
}
90+
91+
EditorPrefs.SetString(key, defaultValue);
92+
return defaultValue;
8793
}
8894

8995
private static bool GetEditorPref(string key, bool defaultValue)
@@ -92,11 +98,9 @@ private static bool GetEditorPref(string key, bool defaultValue)
9298
{
9399
return EditorPrefs.GetBool(key);
94100
}
95-
else
96-
{
97-
EditorPrefs.SetBool(key, defaultValue);
98-
return defaultValue;
99-
}
101+
102+
EditorPrefs.SetBool(key, defaultValue);
103+
return defaultValue;
100104
}
101105
}
102106
}

0 commit comments

Comments
 (0)