1
0
mirror of https://github.com/skeeto/w64devkit.git synced 2025-11-04 13:11:39 +03:00

busybox-w32: Enable UTF-8 in 64-bit builds

The x86 build supports Windows XP, but the x64 build supports no earlier
than Windows 7 (my personal favorite). Windows XP outright rejects EXEs
with a UTF-8 manifest, but Windows 7 simply ignores it. That permits GCC
to continue operating on Windows 7 with a UTF-8 manifest (as of GCC 13),
which must be disabled entirely in x86 builds for Windows XP. The same
can be done with busybox-w32 by disabling the UTF-8 check and gracefully
degrading to original "ANSI-only" behavior when the manifest is ignored.
This commit is contained in:
Christopher Wellons
2024-09-10 15:49:25 -04:00
parent f60a892e13
commit 3cacd96206
3 changed files with 14 additions and 1 deletions

View File

@@ -382,7 +382,7 @@ RUN /make-$MAKE_VERSION/configure \
WORKDIR /busybox-w32 WORKDIR /busybox-w32
COPY src/busybox-* $PREFIX/src/ COPY src/busybox-* $PREFIX/src/
RUN cat $PREFIX/src/busybox-*.patch | patch -p1 \ RUN cat $PREFIX/src/busybox-*.patch | patch -p1 \
&& make mingw64_defconfig \ && make mingw64u_defconfig \
&& sed -ri 's/^(CONFIG_AR)=y/\1=n/' .config \ && sed -ri 's/^(CONFIG_AR)=y/\1=n/' .config \
&& sed -ri 's/^(CONFIG_ASCII)=y/\1=n/' .config \ && sed -ri 's/^(CONFIG_ASCII)=y/\1=n/' .config \
&& sed -ri 's/^(CONFIG_DPKG\w*)=y/\1=n/' .config \ && sed -ri 's/^(CONFIG_DPKG\w*)=y/\1=n/' .config \

View File

@@ -0,0 +1,8 @@
Allow it to run without UTF-8 support, such as on Windows 7.
--- a/libbb/appletlib.c
+++ b/libbb/appletlib.c
@@ -1331,3 +1331,3 @@
#if ENABLE_PLATFORM_MINGW32
-# if ENABLE_FEATURE_UTF8_MANIFEST
+# if ENABLE_FEATURE_UTF8_MANIFEST && 0
if (GetACP() != CP_UTF8) {

View File

@@ -39,3 +39,8 @@
--disable-win32-registry \ --disable-win32-registry \
+ --disable-win32-utf8-manifest \ + --disable-win32-utf8-manifest \
--enable-mingw-wildcard \ --enable-mingw-wildcard \
@@ -384,3 +389,3 @@
RUN cat $PREFIX/src/busybox-*.patch | patch -p1 \
- && make mingw64u_defconfig \
+ && make mingw64_defconfig \
&& sed -ri 's/^(CONFIG_AR)=y/\1=n/' .config \