Skip to content

Commit 9544308

Browse files
authored
Merge pull request #473 from dscho/build-installers-i686
Prepare `please.sh` for building the 32-bit mingw-w64-git in a 32-bit SDK
2 parents 8fdda7a + c463f1a commit 9544308

File tree

1 file changed

+25
-15
lines changed

1 file changed

+25
-15
lines changed

please.sh

Lines changed: 25 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -3443,23 +3443,32 @@ create_sdk_artifact () { # [--out=<directory>] [--git-sdk=<directory>] [--bitnes
34433443
mkdir -p "$output_path/mingw$bitness/bin" &&
34443444
case $bitness in
34453445
32)
3446-
BITNESS=32 ARCH=i686 "$output_path/git-cmd.exe" --command=usr\\bin\\sh.exe -l \
3446+
# copy git.exe, for the libssp test
3447+
git -C "$output_path" show HEAD:mingw32/bin/git.exe \
3448+
>"$output_path/mingw32/bin/git.exe" &&
3449+
BITNESS=32 ARCH=i686 "$output_path/git-cmd.exe" --command=usr\\bin\\sh.exe -lx \
34473450
"${this_script_path%/*}/make-file-list.sh" |
34483451
# escape the `[` in `[.exe`
34493452
sed -e 's|[][]|\\&|g' >>"$sparse_checkout_file" &&
3450-
cat <<-EOF >>"$sparse_checkout_file"
3451-
3452-
# For code-signing
3453-
/mingw32/bin/osslsigncode.exe
3454-
/mingw32/bin/libgsf-[0-9]*.dll
3455-
/mingw32/bin/libglib-[0-9]*.dll
3456-
/mingw32/bin/libgobject-[0-9]*.dll
3457-
/mingw32/bin/libgio-[0-9]*.dll
3458-
/mingw32/bin/libxml2-[0-9]*.dll
3459-
/mingw32/bin/libgmodule-[0-9]*.dll
3460-
/mingw32/bin/libzstd*.dll
3461-
/mingw32/bin/libffi-[0-9]*.dll
3462-
EOF
3453+
if git -C "$git_sdk_path" rev-parse -q --verify HEAD:.sparse/makepkg-git >/dev/null
3454+
then
3455+
printf '\n' >>"$sparse_checkout_file" &&
3456+
git -C "$git_sdk_path" show HEAD:.sparse/makepkg-git >>"$sparse_checkout_file"
3457+
else
3458+
cat <<-EOF >>"$sparse_checkout_file"
3459+
3460+
# For code-signing
3461+
/mingw32/bin/osslsigncode.exe
3462+
/mingw32/bin/libgsf-[0-9]*.dll
3463+
/mingw32/bin/libglib-[0-9]*.dll
3464+
/mingw32/bin/libgobject-[0-9]*.dll
3465+
/mingw32/bin/libgio-[0-9]*.dll
3466+
/mingw32/bin/libxml2-[0-9]*.dll
3467+
/mingw32/bin/libgmodule-[0-9]*.dll
3468+
/mingw32/bin/libzstd*.dll
3469+
/mingw32/bin/libffi-[0-9]*.dll
3470+
EOF
3471+
fi
34633472
;;
34643473
*)
34653474
git -C "$git_sdk_path" show HEAD:.sparse/minimal-sdk >"$sparse_checkout_file" &&
@@ -3543,7 +3552,8 @@ create_sdk_artifact () { # [--out=<directory>] [--git-sdk=<directory>] [--bitnes
35433552
fi &&
35443553
if test makepkg-git = $mode && test ! -x "$output_path/usr/bin/git"
35453554
then
3546-
printf '#!/bin/sh\n\nexec /mingw64/bin/git.exe "$@"\n' >"$output_path/usr/bin/git"
3555+
printf '#!/bin/sh\n\nexec %s/bin/git.exe "$@"\n' \
3556+
"/mingw$bitness" >"$output_path/usr/bin/git"
35473557
fi &&
35483558
if test makepkg-git = $mode && ! grep -q http://docbook.sourceforge.net/release/xsl-ns/current "$output_path/etc/xml/catalog"
35493559
then

0 commit comments

Comments
 (0)