Skip to content

Commit 25b95c6

Browse files
zdimensionChrisDenton
authored andcommitted
Fix location of atlmfc directory on MSVC 15+
Old code was expecting {VC}\Tools\MSVC\{Version}\bin\x64\atlmfc, correct path is {VC}\Tools\MSVC\{Version}\atlmfc
1 parent 66005c8 commit 25b95c6

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/windows_registry.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -431,7 +431,7 @@ mod impl_ {
431431
target: &str,
432432
instance_path: &PathBuf,
433433
) -> Option<Tool> {
434-
let (bin_path, host_dylib_path, lib_path, include_path) =
434+
let (root_path, bin_path, host_dylib_path, lib_path, include_path) =
435435
vs15plus_vc_paths(target, instance_path)?;
436436
let tool_path = bin_path.join(tool);
437437
if !tool_path.exists() {
@@ -444,7 +444,7 @@ mod impl_ {
444444
tool.libs.push(lib_path);
445445
tool.include.push(include_path);
446446

447-
if let Some((atl_lib_path, atl_include_path)) = atl_paths(target, &bin_path) {
447+
if let Some((atl_lib_path, atl_include_path)) = atl_paths(target, &root_path) {
448448
tool.libs.push(atl_lib_path);
449449
tool.include.push(atl_include_path);
450450
}
@@ -457,7 +457,7 @@ mod impl_ {
457457
fn vs15plus_vc_paths(
458458
target: &str,
459459
instance_path: &PathBuf,
460-
) -> Option<(PathBuf, PathBuf, PathBuf, PathBuf)> {
460+
) -> Option<(PathBuf, PathBuf, PathBuf, PathBuf, PathBuf)> {
461461
let version_path =
462462
instance_path.join(r"VC\Auxiliary\Build\Microsoft.VCToolsVersion.default.txt");
463463
let mut version_file = File::open(version_path).ok()?;
@@ -490,7 +490,7 @@ mod impl_ {
490490
.join(&host.to_lowercase());
491491
let lib_path = path.join("lib").join(&target);
492492
let include_path = path.join("include");
493-
Some((bin_path, host_dylib_path, lib_path, include_path))
493+
Some((path, bin_path, host_dylib_path, lib_path, include_path))
494494
}
495495

496496
fn atl_paths(target: &str, path: &Path) -> Option<(PathBuf, PathBuf)> {

0 commit comments

Comments
 (0)