diff options
author | Simon McVittie <smcv@collabora.com> | 2022-06-24 17:21:00 +0100 |
---|---|---|
committer | Simon McVittie <smcv@collabora.com> | 2022-07-13 20:36:13 +0100 |
commit | 00c18a8050650f197a318f8dc97b5647e656988a (patch) | |
tree | b0e4319b0153c10e361ce13706d55f009a1cd259 /tools | |
parent | 4d0341052a825f028c08b3637e92432dc2f40f6f (diff) | |
download | dbus-00c18a8050650f197a318f8dc97b5647e656988a.tar.gz |
CI: Factor out Wine setup so that it applies equally to Meson
Signed-off-by: Simon McVittie <smcv@collabora.com>
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/ci-build.sh | 36 |
1 files changed, 21 insertions, 15 deletions
diff --git a/tools/ci-build.sh b/tools/ci-build.sh index 86da1282..b04f0413 100755 --- a/tools/ci-build.sh +++ b/tools/ci-build.sh @@ -231,6 +231,22 @@ esac cd "$builddir" +case "$ci_host" in + (*-w64-mingw32) + # If we're dynamically linking libgcc, make sure Wine will find it + if [ "$ci_test" = yes ]; then + if [ "${ci_distro%%-*}" = opensuse ] && [ "${ci_host%%-*}" = x86_64 ]; then + export WINEARCH=win64 + fi + libgcc_path= + if [ "$ci_runtime" = "shared" ]; then + libgcc_path=$(dirname "$("${ci_host}-gcc" -print-libgcc-file-name)") + fi + init_wine "${dep_prefix}/bin" "${builddir}/bin" ${libgcc_path:+"$libgcc_path"} + fi + ;; +esac + make="make -j${ci_parallel} V=1 VERBOSE=1" case "$ci_buildsys" in @@ -379,22 +395,12 @@ case "$ci_buildsys" in (*-w64-mingw32) # CFLAGS and CXXFLAGS does do work, checked with cmake 3.15 export LDFLAGS="-${ci_runtime}-libgcc" - # enable tests if supported - if [ "$ci_test" = yes ]; then - # choose correct wine architecture - if [ "${ci_distro%%-*}" = opensuse ]; then - if [ "${ci_host%%-*}" = x86_64 ]; then - export WINEARCH=win64 - cmake=mingw64-cmake - else - cmake=mingw32-cmake - fi - fi - libgcc_path= - if [ "$ci_runtime" = "shared" ]; then - libgcc_path=$(dirname "$("${ci_host}-gcc" -print-libgcc-file-name)") + if [ "${ci_distro%%-*}" = opensuse ]; then + if [ "${ci_host%%-*}" = x86_64 ]; then + cmake=mingw64-cmake + else + cmake=mingw32-cmake fi - init_wine "${dep_prefix}/bin" "$(pwd)/bin" ${libgcc_path:+"$libgcc_path"} cmdwrapper="xvfb-run -a" fi set _ "$@" |