diff options
| author | ruki <[email protected]> | 2024-06-29 20:00:25 +0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2024-06-29 20:00:25 +0800 |
| commit | db8a5fb7cd8f97e46501fcce938f5c6fc7609029 (patch) | |
| tree | cf087c4d7c93a9180e9a2ffb455f7f8d05fcfc81 | |
| parent | cb8554de6bc050bc325c0eb3e146409d5aae819d (diff) | |
Update find_vstudio.lua
| -rw-r--r-- | xmake/modules/detect/sdks/find_vstudio.lua | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/xmake/modules/detect/sdks/find_vstudio.lua b/xmake/modules/detect/sdks/find_vstudio.lua index cae457d68..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 @@ -348,13 +352,6 @@ function _find_vstudio(opt) end vcvarsall = find_file("vcvarsall.bat", paths) or find_file("vcvars32.bat", paths) end - if not vcvarsall and version == "6.0" then - local paths = { - "$(reg HKEY_LOCAL_MACHINE\\SOFTWARE\\WOW6432Node\\Microsoft\\DevStudio\\6.0\\Products\\Microsoft Visual C++;ProductDir)\\Bin", - "$(reg HKEY_LOCAL_MACHINE\\SOFTWARE\\WOW6432Node\\Microsoft\\VisualStudio\\6.0\\Setup\\Microsoft Visual C++;ProductDir)\\Bin" - } - vcvarsall = find_file("vcvars32.bat", paths) - end if not vcvarsall then local paths = { format("$(reg HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\SxS\\VS7;%s)\\Common7\\Tools", version), |
