diff options
author | Ron Yorston <rmy@pobox.com> | 2023-09-14 16:07:50 +0100 |
---|---|---|
committer | Ron Yorston <rmy@pobox.com> | 2023-09-14 16:07:50 +0100 |
commit | b822f427d894f46a85d3ce5ff785d3ea2cef972f (patch) | |
tree | bc909f3a5f6a1983e1fabe1894cfed2cd43816e4 | |
parent | 0475b7a649209487269e35cbe49662a33524e6ae (diff) | |
download | busybox-w32-b822f427d894f46a85d3ce5ff785d3ea2cef972f.tar.gz busybox-w32-b822f427d894f46a85d3ce5ff785d3ea2cef972f.tar.bz2 busybox-w32-b822f427d894f46a85d3ce5ff785d3ea2cef972f.zip |
win32: improved support for manifests
The UTF-8 manifest has been updated to include features from the
standard application manifest.
Include a copy of the standard application manifest for toolchains
that don't provide one.
(GitHub issue #366)
-rw-r--r-- | Config.in | 27 | ||||
-rw-r--r-- | configs/make32_defconfig | 4 | ||||
-rw-r--r-- | configs/make64_defconfig | 4 | ||||
-rw-r--r-- | configs/mingw32_defconfig | 4 | ||||
-rw-r--r-- | configs/mingw64_defconfig | 4 | ||||
-rw-r--r-- | configs/mingw64u_defconfig | 4 | ||||
-rw-r--r-- | win32/resources/Kbuild.src | 1 | ||||
-rw-r--r-- | win32/resources/app.manifest | 24 | ||||
-rw-r--r-- | win32/resources/resources.rc | 4 | ||||
-rw-r--r-- | win32/resources/utf8.manifest | 21 |
10 files changed, 89 insertions, 8 deletions
@@ -432,15 +432,36 @@ config FEATURE_VERSIONINFO | |||
432 | help | 432 | help |
433 | Include version information in the application. | 433 | Include version information in the application. |
434 | 434 | ||
435 | config FEATURE_UTF8_MANIFEST | 435 | choice |
436 | bool "Include UTF-8 manifest in binary" | 436 | prompt "Manifest" |
437 | default n | 437 | default FEATURE_TOOLCHAIN_MANIFEST |
438 | depends on FEATURE_RESOURCES | 438 | depends on FEATURE_RESOURCES |
439 | help | 439 | help |
440 | Manifest to include in resources. | ||
441 | |||
442 | config FEATURE_TOOLCHAIN_MANIFEST | ||
443 | bool "Toolchain default" | ||
444 | help | ||
445 | Include the default application manifest provided by the build | ||
446 | toolchain, if any. | ||
447 | |||
448 | config FEATURE_APP_MANIFEST | ||
449 | bool "Application" | ||
450 | help | ||
451 | Include a manifest which declares privileges required by the | ||
452 | application and supported versions of Windows. Enable this | ||
453 | if your build toolchain doesn't include it by default. | ||
454 | |||
455 | config FEATURE_UTF8_MANIFEST | ||
456 | bool "UTF-8" | ||
457 | help | ||
440 | Include a manifest which sets the process code page to UTF-8. | 458 | Include a manifest which sets the process code page to UTF-8. |
459 | This also includes details from the standard application manifest. | ||
441 | Users who enable this may also wish to enable FEATURE_UTF8_INPUT | 460 | Users who enable this may also wish to enable FEATURE_UTF8_INPUT |
442 | and/or FEATURE_UTF8_OUTPUT. | 461 | and/or FEATURE_UTF8_OUTPUT. |
443 | 462 | ||
463 | endchoice | ||
464 | |||
444 | config FEATURE_ICON | 465 | config FEATURE_ICON |
445 | bool "Include application icon in binary" | 466 | bool "Include application icon in binary" |
446 | default y | 467 | default y |
diff --git a/configs/make32_defconfig b/configs/make32_defconfig index 9e127b2f5..0892801d3 100644 --- a/configs/make32_defconfig +++ b/configs/make32_defconfig | |||
@@ -1,7 +1,7 @@ | |||
1 | # | 1 | # |
2 | # Automatically generated make config: don't edit | 2 | # Automatically generated make config: don't edit |
3 | # Busybox version: 1.37.0.git | 3 | # Busybox version: 1.37.0.git |
4 | # Thu Aug 10 10:24:35 2023 | 4 | # Thu Sep 14 16:00:50 2023 |
5 | # | 5 | # |
6 | CONFIG_HAVE_DOT_CONFIG=y | 6 | CONFIG_HAVE_DOT_CONFIG=y |
7 | # CONFIG_PLATFORM_POSIX is not set | 7 | # CONFIG_PLATFORM_POSIX is not set |
@@ -48,6 +48,8 @@ CONFIG_FEATURE_PRNG_SHELL=y | |||
48 | # CONFIG_FEATURE_PRNG_ISAAC is not set | 48 | # CONFIG_FEATURE_PRNG_ISAAC is not set |
49 | # CONFIG_FEATURE_RESOURCES is not set | 49 | # CONFIG_FEATURE_RESOURCES is not set |
50 | # CONFIG_FEATURE_VERSIONINFO is not set | 50 | # CONFIG_FEATURE_VERSIONINFO is not set |
51 | CONFIG_FEATURE_TOOLCHAIN_MANIFEST=y | ||
52 | # CONFIG_FEATURE_APP_MANIFEST is not set | ||
51 | # CONFIG_FEATURE_UTF8_MANIFEST is not set | 53 | # CONFIG_FEATURE_UTF8_MANIFEST is not set |
52 | # CONFIG_FEATURE_ICON is not set | 54 | # CONFIG_FEATURE_ICON is not set |
53 | # CONFIG_FEATURE_ICON_ATERM is not set | 55 | # CONFIG_FEATURE_ICON_ATERM is not set |
diff --git a/configs/make64_defconfig b/configs/make64_defconfig index 5a126c9b6..8c372ae54 100644 --- a/configs/make64_defconfig +++ b/configs/make64_defconfig | |||
@@ -1,7 +1,7 @@ | |||
1 | # | 1 | # |
2 | # Automatically generated make config: don't edit | 2 | # Automatically generated make config: don't edit |
3 | # Busybox version: 1.37.0.git | 3 | # Busybox version: 1.37.0.git |
4 | # Thu Aug 10 10:24:35 2023 | 4 | # Thu Sep 14 16:00:50 2023 |
5 | # | 5 | # |
6 | CONFIG_HAVE_DOT_CONFIG=y | 6 | CONFIG_HAVE_DOT_CONFIG=y |
7 | # CONFIG_PLATFORM_POSIX is not set | 7 | # CONFIG_PLATFORM_POSIX is not set |
@@ -48,6 +48,8 @@ CONFIG_FEATURE_PRNG_SHELL=y | |||
48 | # CONFIG_FEATURE_PRNG_ISAAC is not set | 48 | # CONFIG_FEATURE_PRNG_ISAAC is not set |
49 | # CONFIG_FEATURE_RESOURCES is not set | 49 | # CONFIG_FEATURE_RESOURCES is not set |
50 | # CONFIG_FEATURE_VERSIONINFO is not set | 50 | # CONFIG_FEATURE_VERSIONINFO is not set |
51 | CONFIG_FEATURE_TOOLCHAIN_MANIFEST=y | ||
52 | # CONFIG_FEATURE_APP_MANIFEST is not set | ||
51 | # CONFIG_FEATURE_UTF8_MANIFEST is not set | 53 | # CONFIG_FEATURE_UTF8_MANIFEST is not set |
52 | # CONFIG_FEATURE_ICON is not set | 54 | # CONFIG_FEATURE_ICON is not set |
53 | # CONFIG_FEATURE_ICON_ATERM is not set | 55 | # CONFIG_FEATURE_ICON_ATERM is not set |
diff --git a/configs/mingw32_defconfig b/configs/mingw32_defconfig index 7af208171..9a822e351 100644 --- a/configs/mingw32_defconfig +++ b/configs/mingw32_defconfig | |||
@@ -1,7 +1,7 @@ | |||
1 | # | 1 | # |
2 | # Automatically generated make config: don't edit | 2 | # Automatically generated make config: don't edit |
3 | # Busybox version: 1.37.0.git | 3 | # Busybox version: 1.37.0.git |
4 | # Thu Aug 10 10:20:52 2023 | 4 | # Thu Sep 14 16:00:50 2023 |
5 | # | 5 | # |
6 | CONFIG_HAVE_DOT_CONFIG=y | 6 | CONFIG_HAVE_DOT_CONFIG=y |
7 | # CONFIG_PLATFORM_POSIX is not set | 7 | # CONFIG_PLATFORM_POSIX is not set |
@@ -48,6 +48,8 @@ CONFIG_FEATURE_PRNG_SHELL=y | |||
48 | # CONFIG_FEATURE_PRNG_ISAAC is not set | 48 | # CONFIG_FEATURE_PRNG_ISAAC is not set |
49 | CONFIG_FEATURE_RESOURCES=y | 49 | CONFIG_FEATURE_RESOURCES=y |
50 | CONFIG_FEATURE_VERSIONINFO=y | 50 | CONFIG_FEATURE_VERSIONINFO=y |
51 | CONFIG_FEATURE_TOOLCHAIN_MANIFEST=y | ||
52 | # CONFIG_FEATURE_APP_MANIFEST is not set | ||
51 | # CONFIG_FEATURE_UTF8_MANIFEST is not set | 53 | # CONFIG_FEATURE_UTF8_MANIFEST is not set |
52 | CONFIG_FEATURE_ICON=y | 54 | CONFIG_FEATURE_ICON=y |
53 | # CONFIG_FEATURE_ICON_ATERM is not set | 55 | # CONFIG_FEATURE_ICON_ATERM is not set |
diff --git a/configs/mingw64_defconfig b/configs/mingw64_defconfig index 92ceee1b9..7a83a096f 100644 --- a/configs/mingw64_defconfig +++ b/configs/mingw64_defconfig | |||
@@ -1,7 +1,7 @@ | |||
1 | # | 1 | # |
2 | # Automatically generated make config: don't edit | 2 | # Automatically generated make config: don't edit |
3 | # Busybox version: 1.37.0.git | 3 | # Busybox version: 1.37.0.git |
4 | # Thu Aug 10 10:20:52 2023 | 4 | # Thu Sep 14 16:00:50 2023 |
5 | # | 5 | # |
6 | CONFIG_HAVE_DOT_CONFIG=y | 6 | CONFIG_HAVE_DOT_CONFIG=y |
7 | # CONFIG_PLATFORM_POSIX is not set | 7 | # CONFIG_PLATFORM_POSIX is not set |
@@ -48,6 +48,8 @@ CONFIG_FEATURE_PRNG_SHELL=y | |||
48 | # CONFIG_FEATURE_PRNG_ISAAC is not set | 48 | # CONFIG_FEATURE_PRNG_ISAAC is not set |
49 | CONFIG_FEATURE_RESOURCES=y | 49 | CONFIG_FEATURE_RESOURCES=y |
50 | CONFIG_FEATURE_VERSIONINFO=y | 50 | CONFIG_FEATURE_VERSIONINFO=y |
51 | CONFIG_FEATURE_TOOLCHAIN_MANIFEST=y | ||
52 | # CONFIG_FEATURE_APP_MANIFEST is not set | ||
51 | # CONFIG_FEATURE_UTF8_MANIFEST is not set | 53 | # CONFIG_FEATURE_UTF8_MANIFEST is not set |
52 | CONFIG_FEATURE_ICON=y | 54 | CONFIG_FEATURE_ICON=y |
53 | # CONFIG_FEATURE_ICON_ATERM is not set | 55 | # CONFIG_FEATURE_ICON_ATERM is not set |
diff --git a/configs/mingw64u_defconfig b/configs/mingw64u_defconfig index 38ddc0111..e9425d45b 100644 --- a/configs/mingw64u_defconfig +++ b/configs/mingw64u_defconfig | |||
@@ -1,7 +1,7 @@ | |||
1 | # | 1 | # |
2 | # Automatically generated make config: don't edit | 2 | # Automatically generated make config: don't edit |
3 | # Busybox version: 1.37.0.git | 3 | # Busybox version: 1.37.0.git |
4 | # Thu Aug 10 10:20:52 2023 | 4 | # Thu Sep 14 16:00:50 2023 |
5 | # | 5 | # |
6 | CONFIG_HAVE_DOT_CONFIG=y | 6 | CONFIG_HAVE_DOT_CONFIG=y |
7 | # CONFIG_PLATFORM_POSIX is not set | 7 | # CONFIG_PLATFORM_POSIX is not set |
@@ -48,6 +48,8 @@ CONFIG_FEATURE_PRNG_SHELL=y | |||
48 | # CONFIG_FEATURE_PRNG_ISAAC is not set | 48 | # CONFIG_FEATURE_PRNG_ISAAC is not set |
49 | CONFIG_FEATURE_RESOURCES=y | 49 | CONFIG_FEATURE_RESOURCES=y |
50 | CONFIG_FEATURE_VERSIONINFO=y | 50 | CONFIG_FEATURE_VERSIONINFO=y |
51 | # CONFIG_FEATURE_TOOLCHAIN_MANIFEST is not set | ||
52 | # CONFIG_FEATURE_APP_MANIFEST is not set | ||
51 | CONFIG_FEATURE_UTF8_MANIFEST=y | 53 | CONFIG_FEATURE_UTF8_MANIFEST=y |
52 | CONFIG_FEATURE_ICON=y | 54 | CONFIG_FEATURE_ICON=y |
53 | # CONFIG_FEATURE_ICON_ATERM is not set | 55 | # CONFIG_FEATURE_ICON_ATERM is not set |
diff --git a/win32/resources/Kbuild.src b/win32/resources/Kbuild.src index c4cb9642f..e2d884e98 100644 --- a/win32/resources/Kbuild.src +++ b/win32/resources/Kbuild.src | |||
@@ -27,3 +27,4 @@ quiet_cmd_windres = WINDRES $@ | |||
27 | win32/resources/resources.o: win32/resources/resources.rc .config | 27 | win32/resources/resources.o: win32/resources/resources.rc .config |
28 | win32/resources/resources.o: win32/resources/aterm.ico win32/resources/sterm.ico | 28 | win32/resources/resources.o: win32/resources/aterm.ico win32/resources/sterm.ico |
29 | win32/resources/resources.o: win32/resources/utf8.manifest | 29 | win32/resources/resources.o: win32/resources/utf8.manifest |
30 | win32/resources/resources.o: win32/resources/app.manifest | ||
diff --git a/win32/resources/app.manifest b/win32/resources/app.manifest new file mode 100644 index 000000000..5e76b7b8e --- /dev/null +++ b/win32/resources/app.manifest | |||
@@ -0,0 +1,24 @@ | |||
1 | <?xml version="1.0" encoding="UTF-8" standalone="yes"?> | ||
2 | <assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0"> | ||
3 | <trustInfo xmlns="urn:schemas-microsoft-com:asm.v3"> | ||
4 | <security> | ||
5 | <requestedPrivileges> | ||
6 | <requestedExecutionLevel level="asInvoker"/> | ||
7 | </requestedPrivileges> | ||
8 | </security> | ||
9 | </trustInfo> | ||
10 | <compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1"> | ||
11 | <application> | ||
12 | <!--The ID below indicates application support for Windows Vista --> | ||
13 | <supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}"/> | ||
14 | <!--The ID below indicates application support for Windows 7 --> | ||
15 | <supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/> | ||
16 | <!--The ID below indicates application support for Windows 8 --> | ||
17 | <supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}"/> | ||
18 | <!--The ID below indicates application support for Windows 8.1 --> | ||
19 | <supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}"/> | ||
20 | <!--The ID below indicates application support for Windows 10 --> | ||
21 | <supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}"/> | ||
22 | </application> | ||
23 | </compatibility> | ||
24 | </assembly> | ||
diff --git a/win32/resources/resources.rc b/win32/resources/resources.rc index b7d82d767..e75bec6ea 100644 --- a/win32/resources/resources.rc +++ b/win32/resources/resources.rc | |||
@@ -38,3 +38,7 @@ END | |||
38 | #if ENABLE_FEATURE_UTF8_MANIFEST | 38 | #if ENABLE_FEATURE_UTF8_MANIFEST |
39 | 1 MANIFEST "utf8.manifest" | 39 | 1 MANIFEST "utf8.manifest" |
40 | #endif | 40 | #endif |
41 | |||
42 | #if ENABLE_FEATURE_APP_MANIFEST | ||
43 | 1 MANIFEST "app.manifest" | ||
44 | #endif | ||
diff --git a/win32/resources/utf8.manifest b/win32/resources/utf8.manifest index cb9a81e5c..efe6a3d2f 100644 --- a/win32/resources/utf8.manifest +++ b/win32/resources/utf8.manifest | |||
@@ -6,4 +6,25 @@ | |||
6 | <activeCodePage xmlns="http://schemas.microsoft.com/SMI/2019/WindowsSettings">UTF-8</activeCodePage> | 6 | <activeCodePage xmlns="http://schemas.microsoft.com/SMI/2019/WindowsSettings">UTF-8</activeCodePage> |
7 | </windowsSettings> | 7 | </windowsSettings> |
8 | </application> | 8 | </application> |
9 | <trustInfo xmlns="urn:schemas-microsoft-com:asm.v3"> | ||
10 | <security> | ||
11 | <requestedPrivileges> | ||
12 | <requestedExecutionLevel level="asInvoker"/> | ||
13 | </requestedPrivileges> | ||
14 | </security> | ||
15 | </trustInfo> | ||
16 | <compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1"> | ||
17 | <application> | ||
18 | <!--The ID below indicates application support for Windows Vista --> | ||
19 | <supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}"/> | ||
20 | <!--The ID below indicates application support for Windows 7 --> | ||
21 | <supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/> | ||
22 | <!--The ID below indicates application support for Windows 8 --> | ||
23 | <supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}"/> | ||
24 | <!--The ID below indicates application support for Windows 8.1 --> | ||
25 | <supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}"/> | ||
26 | <!--The ID below indicates application support for Windows 10 --> | ||
27 | <supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}"/> | ||
28 | </application> | ||
29 | </compatibility> | ||
9 | </assembly> | 30 | </assembly> |