summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2025-03-07 08:51:11 +0800
committerGitHub <[email protected]>2025-03-07 08:51:11 +0800
commitcd0d9331b49b98ab19ceaffffad231e3ba6680e5 (patch)
treebc07ff08dda6d8350d25f56924551ba8f34c9dbf
parentd679ae73f4cbd996e37cb2f63636d197b6354a7c (diff)
parenta697325de5e02b1e94e2e79bc52dae4184331136 (diff)
Merge branch 'dev' into clang
-rw-r--r--.github/workflows/windows.yml4
-rw-r--r--xmake/modules/private/tools/vstool.lua6
2 files changed, 6 insertions, 4 deletions
diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml
index 68f2e55d7..8d853a0df 100644
--- a/.github/workflows/windows.yml
+++ b/.github/workflows/windows.yml
@@ -10,7 +10,7 @@ jobs:
build:
strategy:
matrix:
- os: [windows-2019, windows-2022]
+ os: [windows-2019, windows-2025]
arch: [x64, x86, arm64]
runs-on: ${{ matrix.os }}
@@ -41,7 +41,7 @@ jobs:
# Cache xmake dependencies
- name: Retrieve xmake cache for packages
- uses: actions/cache@v2
+ uses: actions/cache@v3
with:
path: xmake-cache
key: ${{ matrix.os }}-${{ matrix.arch }}
diff --git a/xmake/modules/private/tools/vstool.lua b/xmake/modules/private/tools/vstool.lua
index 56601ba6c..d687bb750 100644
--- a/xmake/modules/private/tools/vstool.lua
+++ b/xmake/modules/private/tools/vstool.lua
@@ -51,7 +51,8 @@ function runv(program, argv, opt)
if ok ~= 0 then
-- read errors
- local outdata = os.isfile(outpath) and io.readfile(outpath, {encoding = "utf16le"}) or nil
+ local encoding = is_host("windows") and "utf16le" or nil
+ local outdata = os.isfile(outpath) and io.readfile(outpath, {encoding = encoding}) or nil
local errdata = os.isfile(errpath) and io.readfile(errpath) or nil
local errors = errdata or ""
if #errors:trim() == 0 then
@@ -116,7 +117,8 @@ function iorunv(program, argv, opt)
-- get output and error data
outfile:close()
- local outdata = os.isfile(outpath) and io.readfile(outpath, {encoding = "utf16le"}) or nil
+ local encoding = is_host("windows") and "utf16le" or nil
+ local outdata = os.isfile(outpath) and io.readfile(outpath, {encoding = encoding}) or nil
local errdata = os.isfile(errpath) and io.readfile(errpath) or nil
-- remove the temporary output and error file