diff options
| author | Avi Halachmi (:avih) <avihpit@yahoo.com> | 2023-07-16 21:29:08 +0300 |
|---|---|---|
| committer | Avi Halachmi (:avih) <avihpit@yahoo.com> | 2023-07-22 09:40:36 +0300 |
| commit | 7aa64d90542cfc8f01f52ece38bf751c7b843875 (patch) | |
| tree | 401742bc9ccd4b28e069a3dcfa9de603a9ee9ba4 /scripts | |
| parent | 0efc74740ebc0d98af79ba4a5dfa73bfb5db3df0 (diff) | |
| download | busybox-w32-7aa64d90542cfc8f01f52ece38bf751c7b843875.tar.gz busybox-w32-7aa64d90542cfc8f01f52ece38bf751c7b843875.tar.bz2 busybox-w32-7aa64d90542cfc8f01f52ece38bf751c7b843875.zip | |
win32: add script to create mingw unicode config
Run ./scripts/mk_mingw64u_defconfig to create (or update)
configs/mingw64u_defconfig from configs/mingw64_defconfig while
enabling UTF8 manifest, UTF8 input, and unicode editing.
Diffstat (limited to 'scripts')
| -rwxr-xr-x | scripts/mk_mingw64u_defconfig | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/scripts/mk_mingw64u_defconfig b/scripts/mk_mingw64u_defconfig new file mode 100755 index 000000000..3cca78e5b --- /dev/null +++ b/scripts/mk_mingw64u_defconfig | |||
| @@ -0,0 +1,35 @@ | |||
| 1 | #!/bin/sh | ||
| 2 | |||
| 3 | configs=$(dirname -- "$0")/../configs | ||
| 4 | |||
| 5 | # replace each FOO=bar argument with -e 's/.*FOO.*/FOO=bar/', then sed "$@" | ||
| 6 | set_build_opts() { | ||
| 7 | for v; do | ||
| 8 | set -- "$@" -e "s/.*${v%%=*}.*/$v/" | ||
| 9 | shift | ||
| 10 | done | ||
| 11 | sed "$@" | ||
| 12 | } | ||
| 13 | |||
| 14 | |||
| 15 | # Create unicode configs/mingw64u_defconfig from configs/mingw64_defconfig | ||
| 16 | # by flipping some build options to enable: | ||
| 17 | # - UTF8 manifest to support unicode on win 10 (filenames, etc). | ||
| 18 | # - UTF8 terminal input (shell prompt, read). | ||
| 19 | # - UTF8 editing - codepoint awareness (prompt, read): | ||
| 20 | # - Builtin libc unicode functions (mbstowcs etc - no UNICODE_USING_LOCALE). | ||
| 21 | # - Dynamic unicode based on ANSI codepage and ENV (CHECK_UNICODE_IN_ENV). | ||
| 22 | # - Screen-width awareness (COMBINING_WCHARS, WIDE_WCHARS) | ||
| 23 | # - Full unicode range (U+10FFFF - LAST_SUPPORTED_WCHAR=1114111) | ||
| 24 | |||
| 25 | set_build_opts \ | ||
| 26 | CONFIG_FEATURE_UTF8_MANIFEST=y \ | ||
| 27 | CONFIG_FEATURE_UTF8_INPUT=y \ | ||
| 28 | CONFIG_UNICODE_SUPPORT=y \ | ||
| 29 | CONFIG_FEATURE_CHECK_UNICODE_IN_ENV=y \ | ||
| 30 | CONFIG_SUBST_WCHAR=63 \ | ||
| 31 | CONFIG_LAST_SUPPORTED_WCHAR=1114111 \ | ||
| 32 | CONFIG_UNICODE_COMBINING_WCHARS=y \ | ||
| 33 | CONFIG_UNICODE_WIDE_WCHARS=y \ | ||
| 34 | < "$configs"/mingw64_defconfig \ | ||
| 35 | > "$configs"/mingw64u_defconfig | ||
