From 135775a0f6a20d06af065f893be5244e834ea75c Mon Sep 17 00:00:00 2001 From: Nickolay Olshevsky Date: Mon, 4 Nov 2024 13:58:52 +0200 Subject: [PATCH] CI: Add and use manifest file to force utf-8 encoding for built windows/msys2 executables. --- .github/workflows/windows-msys2.yml | 8 ++++++++ ci/utf8-manifest | 7 +++++++ 2 files changed, 15 insertions(+) create mode 100644 ci/utf8-manifest diff --git a/.github/workflows/windows-msys2.yml b/.github/workflows/windows-msys2.yml index 9377ee0f92..c187476ba8 100644 --- a/.github/workflows/windows-msys2.yml +++ b/.github/workflows/windows-msys2.yml @@ -127,6 +127,14 @@ jobs: - name: Test run: | + # Add mt.exe (manifest tool) to the PATH + win_sdk=$(reg query "HKLM\SOFTWARE\Microsoft\Windows Kits\Installed Roots" | sort -r | head -n 1 | sed 's/.*\\//') + echo "Windows SDK: $win_sdk" + export PATH="/c/Program Files (x86)/Windows Kits/10/bin/$win_sdk/x64/":$PATH + # Add manifest which forces utf-8 encoding + for exe in "tests/rnp_tests" "rnp/rnp" "rnpkeys/rnpkeys"; do + mt.exe -manifest ./ci/utf8-manifest "-outputresource:./build/src/${exe}.exe;1" > /dev/null + done mkdir -p "build/Testing/Temporary" cp "cmake/CTestCostData.txt" "build/Testing/Temporary" export PATH="$PWD/build/src/lib:$PATH" diff --git a/ci/utf8-manifest b/ci/utf8-manifest new file mode 100644 index 0000000000..84eca6d8c0 --- /dev/null +++ b/ci/utf8-manifest @@ -0,0 +1,7 @@ + + + + UTF-8 + + +