Skip to content

Commit

Permalink
Merge pull request #714 from StephenHodgson/HTK-BuildFixes
Browse files Browse the repository at this point in the history
Build & Deploy Window Fixes
  • Loading branch information
StephenHodgson committed Jul 10, 2017
2 parents db6fe66 + f2032aa commit fdf2528
Show file tree
Hide file tree
Showing 19 changed files with 1,185 additions and 320 deletions.
3 changes: 1 addition & 2 deletions Assets/HoloToolkit/Build/Editor/BuildDeployPortal.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
//

using UnityEngine;
using System.Collections;
using System.Net;
using System;
using System.IO;
Expand Down Expand Up @@ -419,7 +418,7 @@ public static bool DeviceLogFile_View(string packageFamilyName, ConnectInfo conn
// Open it up in default text editor
System.Diagnostics.Process.Start(logFile);
}
catch (System.Exception ex)
catch (Exception ex)
{
Debug.LogError(ex.ToString());
return false;
Expand Down
26 changes: 15 additions & 11 deletions Assets/HoloToolkit/Build/Editor/BuildDeployPrefs.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@

namespace HoloToolkit.Unity
{

public static class BuildDeployPrefs
{
// Constants
Expand All @@ -28,45 +27,54 @@ public static string BuildDirectory
get { return GetEditorPref(EditorPrefs_BuildDir, "WindowsStoreApp"); }
set { EditorPrefs.SetString(EditorPrefs_BuildDir, value); }
}

public static string AbsoluteBuildDirectory
{
get { return Path.GetFullPath(Path.Combine(Path.Combine(Application.dataPath, ".."), BuildDirectory)); }
}

public static string MsBuildVersion
{
get { return GetEditorPref(EditorPrefs_MSBuildVer, BuildDeployTools.DefaultMSBuildVersion); }
set { EditorPrefs.SetString(EditorPrefs_MSBuildVer, value); }
}

public static string BuildConfig
{
get { return GetEditorPref(EditorPrefs_BuildConfig, "Debug"); }
set { EditorPrefs.SetString(EditorPrefs_BuildConfig, value); }
}

public static bool ForceRebuild
{
get { return GetEditorPref(EditorPrefs_ForceRebuild, false); }
set { EditorPrefs.SetBool(EditorPrefs_ForceRebuild, value); }
}

public static bool IncrementBuildVersion
{
get { return GetEditorPref(EditorPrefs_IncrementBuildVersion, true); }
set { EditorPrefs.SetBool(EditorPrefs_IncrementBuildVersion, value); }
}

public static string TargetIPs
{
get { return GetEditorPref(EditorPrefs_TargetIPs, "127.0.0.1"); }
set { EditorPrefs.SetString(EditorPrefs_TargetIPs, value); }
}

public static string DeviceUser
{
get { return GetEditorPref(EditorPrefs_DeviceUser, ""); }
set { EditorPrefs.SetString(EditorPrefs_DeviceUser, value); }
}

public static string DevicePassword
{
get { return GetEditorPref(EditorPrefs_DevicePwd, ""); }
set { EditorPrefs.SetString(EditorPrefs_DevicePwd, value); }
}

public static bool FullReinstall
{
get { return GetEditorPref(EditorPrefs_FullReinstall, true); }
Expand All @@ -79,11 +87,9 @@ private static string GetEditorPref(string key, string defaultValue)
{
return EditorPrefs.GetString(key);
}
else
{
EditorPrefs.SetString(key, defaultValue);
return defaultValue;
}

EditorPrefs.SetString(key, defaultValue);
return defaultValue;
}

private static bool GetEditorPref(string key, bool defaultValue)
Expand All @@ -92,11 +98,9 @@ private static bool GetEditorPref(string key, bool defaultValue)
{
return EditorPrefs.GetBool(key);
}
else
{
EditorPrefs.SetBool(key, defaultValue);
return defaultValue;
}

EditorPrefs.SetBool(key, defaultValue);
return defaultValue;
}
}
}
Loading

0 comments on commit fdf2528

Please sign in to comment.