summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2024-06-29 22:11:15 +0800
committerGitHub <[email protected]>2024-06-29 22:11:15 +0800
commit6bed5edd427bf382cf966f8cbff780f7fdfdad2d (patch)
tree522d999e7009ee71078a776ce59d9245373e016a
parentdba39b4f68e133258d18d0ef6207727ba1be5d55 (diff)
parentdb8a5fb7cd8f97e46501fcce938f5c6fc7609029 (diff)
Merge pull request #5276 from ChrisCatCP/fix_vc6
fix find vc6
-rw-r--r--xmake/modules/detect/sdks/find_vstudio.lua7
1 files changed, 6 insertions, 1 deletions
diff --git a/xmake/modules/detect/sdks/find_vstudio.lua b/xmake/modules/detect/sdks/find_vstudio.lua
index 31180e13b..a6b7f471e 100644
--- a/xmake/modules/detect/sdks/find_vstudio.lua
+++ b/xmake/modules/detect/sdks/find_vstudio.lua
@@ -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
@@ -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)