Skip to content

Commit

Permalink
Merge pull request #5276 from ChrisCatCP/fix_vc6
Browse files Browse the repository at this point in the history
fix find vc6
  • Loading branch information
waruqi committed Jun 29, 2024
2 parents dba39b4 + db8a5fb commit 6bed5ed
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion xmake/modules/detect/sdks/find_vstudio.lua
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,11 @@ function _find_vstudio(opt)
if vswhere_VCAuxiliaryBuildDir and os.isdir(vswhere_VCAuxiliaryBuildDir) then
table.insert(paths, 1, vswhere_VCAuxiliaryBuildDir)
end

if version == "6.0" and os.arch() == "x64" then
table.insert(paths, "$(reg HKEY_LOCAL_MACHINE\\SOFTWARE\\WOW6432Node\\Microsoft\\DevStudio\\6.0\\Products\\Microsoft Visual C++;ProductDir)\\Bin")
table.insert(paths, "$(reg HKEY_LOCAL_MACHINE\\SOFTWARE\\WOW6432Node\\Microsoft\\VisualStudio\\6.0\\Setup\\Microsoft Visual C++;ProductDir)\\Bin")
end

-- find vcvarsall.bat, vcvars32.bat for vs7.1
local vcvarsall = find_file("vcvarsall.bat", paths) or find_file("vcvars32.bat", paths)
if not vcvarsall then
Expand All @@ -343,6 +347,7 @@ function _find_vstudio(opt)
table.insert(paths, path.join(logical_drive, "Program Files", "Microsoft Visual Studio " .. version, "VC"))
if version == "6.0" then
table.insert(paths, path.join(logical_drive, "Program Files", "Microsoft Visual Studio", "VC98", "Bin"))
table.insert(paths, path.join(logical_drive, "Program Files (x86)", "Microsoft Visual Studio", "VC98", "Bin"))
end
end
vcvarsall = find_file("vcvarsall.bat", paths) or find_file("vcvars32.bat", paths)
Expand Down

0 comments on commit 6bed5ed

Please sign in to comment.