aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRon Yorston <rmy@pobox.com>2023-06-20 15:33:10 +0100
committerRon Yorston <rmy@pobox.com>2023-06-20 15:33:10 +0100
commit830e2cfae63a20beddd81d9db00dc906265a0e34 (patch)
treea836416a6dfb90c2c07047d741593a1a9291fb9b
parent3c910ba8be077e4702b040e5a7d445e1b9d85695 (diff)
downloadbusybox-w32-830e2cfae63a20beddd81d9db00dc906265a0e34.tar.gz
busybox-w32-830e2cfae63a20beddd81d9db00dc906265a0e34.tar.bz2
busybox-w32-830e2cfae63a20beddd81d9db00dc906265a0e34.zip
win32: include UTF-8 manifest
Include a manifest in the binary to set the process code page to UTF-8. This only has an effect from Windows 10 version 1903. Controlled by the FEATURE_UTF8_MANIFEST config setting, disabled by default.
-rw-r--r--.gitignore1
-rw-r--r--Config.in7
-rw-r--r--win32/resources/Kbuild.src1
-rw-r--r--win32/resources/resources.rc4
-rw-r--r--win32/resources/utf8.manifest9
5 files changed, 21 insertions, 1 deletions
diff --git a/.gitignore b/.gitignore
index 764cc058a..a4031f6ec 100644
--- a/.gitignore
+++ b/.gitignore
@@ -22,7 +22,6 @@ Config.in
22/busybox_old 22/busybox_old
23/busybox_old.exe 23/busybox_old.exe
24/busybox_unstripped* 24/busybox_unstripped*
25win32/resources/busybox-w32.manifest
26 25
27# 26#
28# Backups / patches 27# Backups / patches
diff --git a/Config.in b/Config.in
index 2da0a6aec..917712c0c 100644
--- a/Config.in
+++ b/Config.in
@@ -432,6 +432,13 @@ config FEATURE_VERSIONINFO
432 help 432 help
433 Include version information in the application. 433 Include version information in the application.
434 434
435config FEATURE_UTF8_MANIFEST
436 bool "Include UTF-8 manifest in binary"
437 default n
438 depends on FEATURE_RESOURCES
439 help
440 Include a manifest which sets the process code page to UTF-8.
441
435config FEATURE_ICON 442config FEATURE_ICON
436 bool "Include application icon in binary" 443 bool "Include application icon in binary"
437 default y 444 default y
diff --git a/win32/resources/Kbuild.src b/win32/resources/Kbuild.src
index 9e5fe4e10..c4cb9642f 100644
--- a/win32/resources/Kbuild.src
+++ b/win32/resources/Kbuild.src
@@ -26,3 +26,4 @@ quiet_cmd_windres = WINDRES $@
26 26
27win32/resources/resources.o: win32/resources/resources.rc .config 27win32/resources/resources.o: win32/resources/resources.rc .config
28win32/resources/resources.o: win32/resources/aterm.ico win32/resources/sterm.ico 28win32/resources/resources.o: win32/resources/aterm.ico win32/resources/sterm.ico
29win32/resources/resources.o: win32/resources/utf8.manifest
diff --git a/win32/resources/resources.rc b/win32/resources/resources.rc
index f459ebb73..b7d82d767 100644
--- a/win32/resources/resources.rc
+++ b/win32/resources/resources.rc
@@ -34,3 +34,7 @@ BEGIN
34 END 34 END
35END 35END
36#endif 36#endif
37
38#if ENABLE_FEATURE_UTF8_MANIFEST
391 MANIFEST "utf8.manifest"
40#endif
diff --git a/win32/resources/utf8.manifest b/win32/resources/utf8.manifest
new file mode 100644
index 000000000..cb9a81e5c
--- /dev/null
+++ b/win32/resources/utf8.manifest
@@ -0,0 +1,9 @@
1<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
2<assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1">
3 <assemblyIdentity type="win32" name="busybox.exe" version="6.0.0.0"/>
4 <application>
5 <windowsSettings>
6 <activeCodePage xmlns="http://schemas.microsoft.com/SMI/2019/WindowsSettings">UTF-8</activeCodePage>
7 </windowsSettings>
8 </application>
9</assembly>