Skip to content

Commit

Permalink
CI: Add and use manifest file to force utf-8 encoding for built windo…
Browse files Browse the repository at this point in the history
…ws/msys2 executables.
  • Loading branch information
ni4 committed Nov 10, 2024
1 parent 9077b2d commit 135775a
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/windows-msys2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
7 changes: 7 additions & 0 deletions ci/utf8-manifest
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0" xmlns:asmv3="urn:schemas-microsoft-com:asm.v3">
<asmv3:application>
<asmv3:windowsSettings xmlns="http://schemas.microsoft.com/SMI/2019/WindowsSettings">
<activeCodePage>UTF-8</activeCodePage>
</asmv3:windowsSettings>
</asmv3:application>
</assembly>

0 comments on commit 135775a

Please sign in to comment.