summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2022-02-20 22:42:17 +0800
committerruki <[email protected]>2022-02-20 22:42:17 +0800
commit6654a889d2403e8cb940d3b6bd9ad54de17bfece (patch)
tree23d1abe0381bc76678744d10c1da6da1af0ecf0c
parent532e3fce3af71d0e0c43ce903d7343843b658289 (diff)
fix find_vstudio for winxp
-rw-r--r--xmake/modules/detect/sdks/find_vstudio.lua4
1 files changed, 3 insertions, 1 deletions
diff --git a/xmake/modules/detect/sdks/find_vstudio.lua b/xmake/modules/detect/sdks/find_vstudio.lua
index 0b3fb1361..d7d538cc0 100644
--- a/xmake/modules/detect/sdks/find_vstudio.lua
+++ b/xmake/modules/detect/sdks/find_vstudio.lua
@@ -106,7 +106,9 @@ function _load_vcvarsall(vcvarsall, vsver, arch, opt)
file:print("@echo off")
-- @note we need get utf8 output from cmd.exe
-- because some %PATH% and other envs maybe contains unicode characters
- file:print("chcp 65001")
+ if winos.version():gt("winxp") then
+ file:print("chcp 65001")
+ end
-- fix error caused by the new vsDevCmd.bat of vs2019
-- @see https://github.com/xmake-io/xmake/issues/549
if vsver and tonumber(vsver) >= 16 then