Merge branch 'feat/deprecate-nvram' of Common/Utils into dev

This commit is contained in:
Chris Cameron
2018-10-26 18:34:32 +00:00
committed by Gogs
2 changed files with 22 additions and 15 deletions

View File

@@ -26,10 +26,23 @@ namespace ICD.Common.Utils
public static string ProgramPath { get { return IcdDirectory.GetApplicationDirectory(); } } public static string ProgramPath { get { return IcdDirectory.GetApplicationDirectory(); } }
/// <summary> /// <summary>
/// Gets the path to the NVRAM directory. /// Gets the path to the root config directory,
/// which contains common and program-specific config directories.
/// </summary> /// </summary>
[PublicAPI] [PublicAPI]
public static string NvramPath { get { return Join(RootPath, "NVRAM"); } } public static string RootConfigPath
{
get
{
#if SIMPLSHARP
return Join(RootPath, "USER");
#elif LINUX
return Join(RootPath, "opt", "ICD.Connect");
#else
return Join(RootPath, "ProgramData", "ICD.Connect");
#endif
}
}
/// <summary> /// <summary>
/// Returns the absolute path to the configuration directory. /// Returns the absolute path to the configuration directory.
@@ -41,7 +54,7 @@ namespace ICD.Common.Utils
get get
{ {
string directoryName = string.Format("Program{0:D2}Config", ProgramUtils.ProgramNumber); string directoryName = string.Format("Program{0:D2}Config", ProgramUtils.ProgramNumber);
return Join(NvramPath, directoryName); return Join(RootConfigPath, directoryName);
} }
} }
@@ -49,7 +62,7 @@ namespace ICD.Common.Utils
/// Returns the absolute path to the common configuration directory. /// Returns the absolute path to the common configuration directory.
/// </summary> /// </summary>
[PublicAPI] [PublicAPI]
public static string CommonConfigPath { get { return Join(NvramPath, "CommonConfig"); } } public static string CommonConfigPath { get { return Join(RootConfigPath, "CommonConfig"); } }
/// <summary> /// <summary>
/// Returns the absolute path to the common config library directory. /// Returns the absolute path to the common config library directory.

View File

@@ -12,13 +12,7 @@ namespace ICD.Common.Utils
/// Gets the program number. /// Gets the program number.
/// </summary> /// </summary>
[PublicAPI] [PublicAPI]
public static uint ProgramNumber public static uint ProgramNumber { get; set; } = 1;
{
get
{
return 1;
}
}
/// <summary> /// <summary>
/// Gets the compile date of the program. /// Gets the compile date of the program.