mirror of
https://github.com/danbulant/Cosmos
synced 2026-05-19 12:30:32 +00:00
44 lines
No EOL
1.2 KiB
C#
44 lines
No EOL
1.2 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.IO;
|
|
using Microsoft.Win32;
|
|
|
|
namespace Cosmos.Debug.VSDebugEngine
|
|
{
|
|
public static class PathUtilities
|
|
{
|
|
/// <summary>
|
|
/// Gets the root of the
|
|
/// </summary>
|
|
/// <returns></returns>
|
|
public static string GetCosmosDir()
|
|
{
|
|
using(var xKey = Registry.LocalMachine.OpenSubKey("Software\\Cosmos")){
|
|
return xKey.GetValue(null).ToString();
|
|
}
|
|
//return Path.GetDirectoryName(Path.GetDirectoryName(Path.GetDirectoryName(typeof(PathUtilities).Assembly.Location)));
|
|
}
|
|
|
|
public static string GetBuildDir()
|
|
{
|
|
return Path.Combine(GetCosmosDir(), "Build");
|
|
}
|
|
|
|
public static string GetToolsDir()
|
|
{
|
|
return Path.Combine(GetBuildDir(), "Tools");
|
|
}
|
|
|
|
public static string GetQEmuDir()
|
|
{
|
|
return Path.Combine(GetToolsDir(), "qemu");
|
|
}
|
|
|
|
public static string GetVSIPDir()
|
|
{
|
|
return Path.Combine(GetBuildDir(), "VSIP");
|
|
}
|
|
}
|
|
} |