From e76624e29cbd58e91fe3b97da290e19242a6c70f Mon Sep 17 00:00:00 2001 From: Christopher Wellons Date: Tue, 2 May 2023 14:54:16 -0400 Subject: [PATCH] Higher zip compression, disable default advzip As of GDB 13.1, gdb.exe contains data triggering a bug in x64 Explorer zip integration at last as far back as Windows 7. After recompressing with advzip, gdb.exe extraction fails with 0x80004005 "Unspecified error". This happens with both 32-bit and 64-bit gdb.exe regardless of compiler flags. No other zip program has trouble with this file. Until this is resolved, give up on advzip and tell zip to use -9. Also renamed the build script option from -q (quick) to -O (optimize) and disable its use by default. --- Dockerfile | 2 +- multibuild.sh | 12 +++--------- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/Dockerfile b/Dockerfile index 59d58d2..837a11e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -496,4 +496,4 @@ RUN printf "id ICON \"$PREFIX/src/w64devkit.ico\"" >w64devkit.rc \ >>$PREFIX/COPYING.MinGW-w64-runtime.txt \ && echo $VERSION >$PREFIX/VERSION.txt ENV PREFIX=${PREFIX} -CMD zip -qXr - $PREFIX +CMD zip -q9Xr - $PREFIX diff --git a/multibuild.sh b/multibuild.sh index 0f44163..89c631f 100755 --- a/multibuild.sh +++ b/multibuild.sh @@ -9,7 +9,7 @@ set -e arch="" -compact=auto +compact=no dryrun= flavors="" suffix="$(git describe --exact-match 2>/dev/null | tr v - || true)" @@ -25,8 +25,8 @@ usage: multibuild.sh [-48abfhmnq] [-s SUFFIX] -h Print this help message -m Enable mini build (default: no) -n Dry run, print commands but do nothing + -O Compact with advzip (default: no, less compatible) -s SUFFIX Append a version suffix (e.g. "-s -1.2.3", default:auto) - -q Quick: do no compact with advzip (default: auto) EOF } @@ -40,8 +40,8 @@ while getopts 48abfhmnqs: opt; do h) usage; exit 0;; m) flavors="$flavors -mini";; n) dryrun=echo;; + O) compact=yes;; s) suffix="$OPTARG";; - q) compact=no;; ?) usage >&2; exit 1;; esac done @@ -53,12 +53,6 @@ if [ $# -gt 0 ]; then exit 1 fi -if [ $compact = auto ] && command -v advzip >/dev/null 2>&1; then - compact=yes -else - compact=no -fi - if [ -z "$arch" ]; then arch="w64devkit" fi