twindows build: skip building pyinstaller if already there - electrum - Electrum Bitcoin wallet
HTML git clone https://git.parazyd.org/electrum
DIR Log
DIR Files
DIR Refs
DIR Submodules
---
DIR commit cf5bf5d1afbd785b24e90b2457d4f7cc82c902df
DIR parent 41233a4bc72d5551a197b02167a0fd0cf98fe50f
HTML Author: SomberNight <somber.night@protonmail.com>
Date: Mon, 8 Mar 2021 03:03:31 +0100
windows build: skip building pyinstaller if already there
Diffstat:
M contrib/build-wine/prepare-wine.sh | 19 ++++++++++++-------
1 file changed, 12 insertions(+), 7 deletions(-)
---
DIR diff --git a/contrib/build-wine/prepare-wine.sh b/contrib/build-wine/prepare-wine.sh
t@@ -100,6 +100,17 @@ info "Building PyInstaller."
# we build our own PyInstaller boot loader as the default one has high
# anti-virus false positives
(
+ if [ "$WIN_ARCH" = "win32" ] ; then
+ PYINST_ARCH="32bit"
+ elif [ "$WIN_ARCH" = "win64" ] ; then
+ PYINST_ARCH="64bit"
+ else
+ fail "unexpected WIN_ARCH: $WIN_ARCH"
+ fi
+ if [ -f "$CACHEDIR/pyinstaller/PyInstaller/bootloader/Windows-$PYINST_ARCH/runw.exe" ]; then
+ info "pyinstaller already built, skipping"
+ exit 0
+ fi
cd "$WINEPREFIX/drive_c/electrum"
ELECTRUM_COMMIT_HASH=$(git rev-parse HEAD)
cd "$CACHEDIR"
t@@ -126,13 +137,7 @@ info "Building PyInstaller."
-Wno-error=stringop-truncation"
popd
# sanity check bootloader is there:
- if [ "$WIN_ARCH" = "win32" ] ; then
- [[ -e PyInstaller/bootloader/Windows-32bit/runw.exe ]] || fail "Could not find runw.exe in target dir! (32bit)"
- elif [ "$WIN_ARCH" = "win64" ] ; then
- [[ -e PyInstaller/bootloader/Windows-64bit/runw.exe ]] || fail "Could not find runw.exe in target dir! (64bit)"
- else
- fail "unexpected WIN_ARCH: $WIN_ARCH"
- fi
+ [[ -e "PyInstaller/bootloader/Windows-$PYINST_ARCH/runw.exe" ]] || fail "Could not find runw.exe in target dir!"
) || fail "PyInstaller build failed"
info "Installing PyInstaller."
$WINE_PYTHON -m pip install --no-dependencies --no-warn-script-location ./pyinstaller