From 05be6301ede7648c0d085d7fc5de562519bf8f0c Mon Sep 17 00:00:00 2001 From: falkTX Date: Tue, 13 Jul 2021 17:04:26 +0100 Subject: [PATCH] Rework how wine is handled Signed-off-by: falkTX --- bootstrap-carla.sh | 4 ++-- bootstrap-plugins.sh | 6 +++--- build-plugins.sh | 4 ++-- pack-jack2.sh | 7 +++---- pack-plugins.sh | 6 +++--- setup/env.sh | 10 +++++++++- 6 files changed, 22 insertions(+), 15 deletions(-) diff --git a/bootstrap-carla.sh b/bootstrap-carla.sh index 000a5cd..a2d2072 100755 --- a/bootstrap-carla.sh +++ b/bootstrap-carla.sh @@ -207,8 +207,8 @@ fi # --------------------------------------------------------------------------------------------------------------------- # wine bootstrap for python (needed for cross-compilation) -if [ "${WIN32}" -eq 1 ] && [ -n "${EXE_WRAPPER}" ]; then - env WINEARCH="${PAWPAW_TARGET}" WINEDLLOVERRIDES="mscoree,mshtml=" wineboot -u +if [ "${WIN32}" -eq 1 ] && [ -n "${EXE_WRAPPER}" ] && [ ! -d "${WINEPREFIX}" ]; then + wineboot -u fi # --------------------------------------------------------------------------------------------------------------------- diff --git a/bootstrap-plugins.sh b/bootstrap-plugins.sh index 86115cd..17b7438 100755 --- a/bootstrap-plugins.sh +++ b/bootstrap-plugins.sh @@ -243,10 +243,10 @@ download carla ${CARLA_VERSION} "https://github.com/falkTX/Carla.git" "" "git" build_make carla ${CARLA_VERSION} "${CARLA_EXTRAFLAGS}" # --------------------------------------------------------------------------------------------------------------------- -# wine bootstrap for python (needed for cross-compilation) +# wine bootstrap (needed for cross-compilation) -if [ "${WIN32}" -eq 1 ] && [ -n "${EXE_WRAPPER}" ]; then - env WINEARCH="${PAWPAW_TARGET}" WINEDLLOVERRIDES="mscoree,mshtml=" wineboot -u +if [ "${WIN32}" -eq 1 ] && [ -n "${EXE_WRAPPER}" ] && [ ! -d "${WINEPREFIX}" ]; then + wineboot -u fi # --------------------------------------------------------------------------------------------------------------------- diff --git a/build-plugins.sh b/build-plugins.sh index 3db9bed..3148fa7 100755 --- a/build-plugins.sh +++ b/build-plugins.sh @@ -29,8 +29,8 @@ source setup/versions.sh LV2DIR="${PAWPAW_PREFIX}/lib/lv2" -if [ "${WIN32}" -eq 1 ] && [ ! -d "${HOME}/.wine" ]; then - env WINEARCH="${PAWPAW_TARGET}" WINEDLLOVERRIDES="mscoree,mshtml=" wineboot -u +if [ "${WIN32}" -eq 1 ] && [ -n "${EXE_WRAPPER}" ] && [ ! -d "${WINEPREFIX}" ]; then + wineboot -u fi function validate_lv2_bundles() { diff --git a/pack-jack2.sh b/pack-jack2.sh index fea7ce6..290bf6b 100755 --- a/pack-jack2.sh +++ b/pack-jack2.sh @@ -49,7 +49,6 @@ if [ "${WIN32}" -eq 1 ]; then dlfile="${PAWPAW_DOWNLOADDIR}/innosetup-6.0.5.exe" innodir="${PAWPAW_BUILDDIR}/innosetup-6.0.5" iscc="${innodir}/drive_c/InnoSeup/ISCC.exe" - wine="env WINEARCH="${PAWPAW_TARGET}" WINEDLLOVERRIDES="mscoree,mshtml=" WINEPREFIX="${innodir}" wine" # download it if [ ! -f "${dlfile}" ]; then @@ -59,12 +58,12 @@ if [ "${WIN32}" -eq 1 ]; then # initialize wine if [ ! -d "${innodir}"/drive_c ]; then - ${wine}boot -u + env WINEPREFIX="${innodir}" wineboot -u fi # install innosetup in custom wineprefix if [ ! -f "${innodir}"/drive_c/InnoSeup/ISCC.exe ]; then - ${wine} "${dlfile}" /allusers /dir=C:\\InnoSeup /nocancel /norestart /verysilent + env WINEPREFIX="${innodir}" wine "${dlfile}" /allusers /dir=C:\\InnoSeup /nocancel /norestart /verysilent fi # copy jackrouter binaries @@ -84,7 +83,7 @@ if [ "${WIN32}" -eq 1 ]; then ln -sf "${PAWPAW_PREFIX}/bin/Qt5"{Core,Gui,Network,Widgets,Xml}".dll" . ln -sf "${PAWPAW_PREFIX}/lib/qt5/plugins/platforms/qwindows.dll" . ln -sf "${jack2_prefix}" "${PAWPAW_TARGET}" - ${wine} "${iscc}" "${PAWPAW_TARGET}.iss" + env WINEPREFIX="${innodir}" wine "${iscc}" "${PAWPAW_TARGET}.iss" popd # and move installer file where CI expects it to be diff --git a/pack-plugins.sh b/pack-plugins.sh index f1c4008..e511479 100755 --- a/pack-plugins.sh +++ b/pack-plugins.sh @@ -35,11 +35,11 @@ function download_and_install_innosetup { fi if [ ! -d "${pkgdir}"/drive_c ]; then - env WINEARCH="${PAWPAW_TARGET}" WINEDLLOVERRIDES="mscoree,mshtml=" WINEPREFIX="${pkgdir}" wineboot -u + env WINEPREFIX="${pkgdir}" wineboot -u fi if [ ! -f "${pkgdir}"/drive_c/InnoSeup/ISCC.exe ]; then - env WINEARCH="${PAWPAW_TARGET}" WINEPREFIX="${pkgdir}" wine "${dlfile}" /allusers /dir=C:\\InnoSeup /nocancel /norestart /verysilent + env WINEPREFIX="${pkgdir}" wine "${dlfile}" /allusers /dir=C:\\InnoSeup /nocancel /norestart /verysilent fi } @@ -48,7 +48,7 @@ function create_innosetup_exe { local iscc="${pkgdir}/drive_c/InnoSeup/ISCC.exe" echo "#define VERSION \"${VERSION}\"" > /tmp/pawpaw/version.iss - env WINEARCH="${PAWPAW_TARGET}" WINEPREFIX="${pkgdir}" wine "${iscc}" "setup/inno/${PAWPAW_TARGET}.iss" + env WINEPREFIX="${pkgdir}" wine "${iscc}" "setup/inno/${PAWPAW_TARGET}.iss" } # --------------------------------------------------------------------------------------------------------------------- diff --git a/setup/env.sh b/setup/env.sh index f2dbb06..d65af22 100644 --- a/setup/env.sh +++ b/setup/env.sh @@ -145,6 +145,9 @@ TARGET_PKG_CONFIG_PATH="${PAWPAW_PREFIX}/lib/pkgconfig" MAKE_ARGS="" WAF_ARGS="" unset EXE_WRAPPER +unset WINEARCH +unset WINEDLLOVERRIDES +unset WINEPREFIX if which nproc > /dev/null; then MAKE_ARGS+="-j $(nproc)" @@ -156,6 +159,12 @@ fi if [ "${CROSS_COMPILING}" -eq 1 ]; then MAKE_ARGS+=" CROSS_COMPILING=true" + if [ "${WIN32}" -eq 1 ]; then + export EXE_WRAPPER="wine" + export WINEARCH="${PAWPAW_TARGET}" + export WINEDLLOVERRIDES="mscoree,mshtml=" + export WINEPREFIX="${PAWPAW_PREFIX}/wine" + fi fi if [ "${MACOS}" -eq 1 ]; then @@ -170,7 +179,6 @@ elif [ "${WIN32}" -eq 1 ]; then if [ "${WIN64}" -eq 1 ]; then MAKE_ARGS+=" WIN64=true" fi - export EXE_WRAPPER="wine" fi # ---------------------------------------------------------------------------------------------------------------------