Skip to content

Commit

Permalink
ci: modify wrap_wine to use wine64 for 64bit binaries, change windows…
Browse files Browse the repository at this point in the history
… CI to Focal

Co-Authored-By: div72 <[email protected]>
  • Loading branch information
barton2526 and div72 committed Apr 6, 2022
1 parent a6bde68 commit 29592e6
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion ci/test/00_setup_env_win32.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
export LC_ALL=C.UTF-8

export CONTAINER_NAME=ci_win32
export DOCKER_NAME_TAG=ubuntu:18.04 # Check that bionic can cross-compile to win32
export DOCKER_NAME_TAG=ubuntu:20.04 # Check that focal can cross-compile to win32
export HOST=i686-w64-mingw32
export PACKAGES="python3 nsis g++-mingw-w64-i686 wine-binfmt wine32"
export RUN_UNIT_TESTS=true
Expand Down
2 changes: 1 addition & 1 deletion ci/test/00_setup_env_win64.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
export LC_ALL=C.UTF-8

export CONTAINER_NAME=ci_win64
export DOCKER_NAME_TAG=ubuntu:18.04 # Check that bionic can cross-compile to win64
export DOCKER_NAME_TAG=ubuntu:20.04 # Check that focal can cross-compile to win64
export HOST=x86_64-w64-mingw32
export PACKAGES="python3 nsis g++-mingw-w64-x86-64 wine-binfmt wine64"
export GOAL=""
Expand Down
8 changes: 7 additions & 1 deletion ci/test/wrap-wine.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,20 @@

export LC_ALL=C.UTF-8

wine --version

for b_name in {"${BASE_OUTDIR}/bin"/*,src/secp256k1/*tests,src/univalue/{no_nul,test_json,unitester,object}}.exe; do
# shellcheck disable=SC2044
for b in $(find "${BASE_ROOT_DIR}" -executable -type f -name "$(basename $b_name)"); do
if (file "$b" | grep "Windows"); then
SUFFIX=
if (file "$b" | grep "x86-64"); then
SUFFIX=64
fi
echo "Wrap $b ..."
mv "$b" "${b}_orig"
echo '#!/usr/bin/env bash' > "$b"
echo "wine \"${b}_orig\" \"\$@\"" >> "$b"
echo "wine${SUFFIX} \"${b}_orig\" \"\$@\"" >> "$b"
chmod +x "$b"
fi
done
Expand Down

0 comments on commit 29592e6

Please sign in to comment.