diff --git a/src/windows_registry.rs b/src/windows_registry.rs index 08b1df5..efdd393 100644 --- a/src/windows_registry.rs +++ b/src/windows_registry.rs @@ -110,11 +110,19 @@ pub fn find_tool(target: &str, tool: &str) -> Option { // environment variables like `LIB`, `INCLUDE`, and `PATH` to ensure that // the tool is actually usable. - return find_msvc_latest(tool, target, "15.0") + return find_vs2017() + .or_else(|| find_msvc_latest(tool, target, "15.0")) .or_else(|| find_msvc_latest(tool, target, "14.0")) .or_else(|| find_msvc_12(tool, target)) .or_else(|| find_msvc_11(tool, target)); + fn find_vs2017() -> Option { + let key = r"SOFTWARE\WOW6432Node\Microsoft\DevDiv\vs\Servicing\15.0"; + let key = otry!(LOCAL_MACHINE.open(key.as_ref()).ok()); + println!("{:?}", key.query_str("Core@Install")); + None + } + // For MSVC 14 or newer we need to find the Universal CRT as well as either // the Windows 10 SDK or Windows 8.1 SDK. fn find_msvc_latest(tool: &str, target: &str, ver: &str) -> Option {