|
|
|
@ -305,7 +305,7 @@ namespace CppSharp
@@ -305,7 +305,7 @@ namespace CppSharp
|
|
|
|
|
var dirPrefix = windowsSdkMajorVer + "."; |
|
|
|
|
var includeDir = |
|
|
|
|
(from dir in Directory.EnumerateDirectories(parentIncludeDir).OrderByDescending(d => d) |
|
|
|
|
where Path.GetFileName(dir).StartsWith(dirPrefix) |
|
|
|
|
where Path.GetFileName(dir).StartsWith(dirPrefix, StringComparison.Ordinal) |
|
|
|
|
select Path.Combine(windowsKitSdk.Directory, include, dir)).FirstOrDefault(); |
|
|
|
|
if (!string.IsNullOrEmpty(includeDir)) |
|
|
|
|
includes.Add(Path.Combine(includeDir, Path.GetFileName(path))); |
|
|
|
@ -570,22 +570,22 @@ namespace CppSharp
@@ -570,22 +570,22 @@ namespace CppSharp
|
|
|
|
|
var hive = (RegistryHive)0; |
|
|
|
|
subKey = null; |
|
|
|
|
|
|
|
|
|
if (keyPath.StartsWith("HKEY_CLASSES_ROOT\\")) |
|
|
|
|
if (keyPath.StartsWith("HKEY_CLASSES_ROOT\\", StringComparison.Ordinal)) |
|
|
|
|
{ |
|
|
|
|
hive = RegistryHive.ClassesRoot; |
|
|
|
|
subKey = keyPath.Substring(18); |
|
|
|
|
} |
|
|
|
|
else if (keyPath.StartsWith("HKEY_USERS\\")) |
|
|
|
|
else if (keyPath.StartsWith("HKEY_USERS\\", StringComparison.Ordinal)) |
|
|
|
|
{ |
|
|
|
|
hive = RegistryHive.Users; |
|
|
|
|
subKey = keyPath.Substring(11); |
|
|
|
|
} |
|
|
|
|
else if (keyPath.StartsWith("HKEY_LOCAL_MACHINE\\")) |
|
|
|
|
else if (keyPath.StartsWith("HKEY_LOCAL_MACHINE\\", StringComparison.Ordinal)) |
|
|
|
|
{ |
|
|
|
|
hive = RegistryHive.LocalMachine; |
|
|
|
|
subKey = keyPath.Substring(19); |
|
|
|
|
} |
|
|
|
|
else if (keyPath.StartsWith("HKEY_CURRENT_USER\\")) |
|
|
|
|
else if (keyPath.StartsWith("HKEY_CURRENT_USER\\", StringComparison.Ordinal)) |
|
|
|
|
{ |
|
|
|
|
hive = RegistryHive.CurrentUser; |
|
|
|
|
subKey = keyPath.Substring(18); |
|
|
|
@ -612,8 +612,6 @@ namespace CppSharp
@@ -612,8 +612,6 @@ namespace CppSharp
|
|
|
|
|
var query2 = (ISetupConfiguration2) query; |
|
|
|
|
var e = query2.EnumAllInstances(); |
|
|
|
|
|
|
|
|
|
var helper = (ISetupHelper)query; |
|
|
|
|
|
|
|
|
|
int fetched; |
|
|
|
|
var instances = new ISetupInstance[1]; |
|
|
|
|
do |
|
|
|
@ -710,11 +708,10 @@ namespace CppSharp
@@ -710,11 +708,10 @@ namespace CppSharp
|
|
|
|
|
if (fetched > 0) |
|
|
|
|
{ |
|
|
|
|
var instance = (ISetupInstance2) instances[0]; |
|
|
|
|
var packages = instance.GetPackages(); |
|
|
|
|
var toolchain = new ToolchainVersion |
|
|
|
|
{ |
|
|
|
|
Directory = instance.GetInstallationPath() + @"\Common7\IDE", |
|
|
|
|
Version = Single.Parse(instance.GetInstallationVersion().Remove(2)), |
|
|
|
|
Version = float.Parse(instance.GetInstallationVersion().Remove(2)), |
|
|
|
|
Value = null // Not used currently
|
|
|
|
|
}; |
|
|
|
|
versions.Add(toolchain); |
|
|
|
|