electrum

Electrum Bitcoin wallet
git clone https://git.parazyd.org/electrum
Log | Files | Refs | Submodules

commit 41233a4bc72d5551a197b02167a0fd0cf98fe50f
parent dded25f39874223b0d5d6c94ca9824542f4f4584
Author: SomberNight <somber.night@protonmail.com>
Date:   Sun,  7 Mar 2021 22:58:44 +0100

windows build: minor clean-up

Diffstat:
Mcontrib/build-wine/build-electrum-git.sh | 18+++++-------------
Mcontrib/build-wine/build.sh | 5+++++
Mcontrib/build-wine/deterministic.spec | 2--
Mcontrib/build-wine/prepare-wine.sh | 14+++-----------
4 files changed, 13 insertions(+), 26 deletions(-)

diff --git a/contrib/build-wine/build-electrum-git.sh b/contrib/build-wine/build-electrum-git.sh @@ -2,20 +2,12 @@ NAME_ROOT=electrum -# These settings probably don't need any change -export WINEPREFIX=/opt/wine64 -export WINEDEBUG=-all export PYTHONDONTWRITEBYTECODE=1 -PYHOME="c:/python3" -PYTHON="wine $PYHOME/python.exe -OO -B" - # Let's begin! set -e -here="$(dirname "$(readlink -e "$0")")" - . "$CONTRIB"/build_tools_util.sh pushd $WINEPREFIX/drive_c/electrum @@ -42,19 +34,19 @@ popd # Install frozen dependencies -$PYTHON -m pip install --no-dependencies --no-warn-script-location \ +$WINE_PYTHON -m pip install --no-dependencies --no-warn-script-location \ --cache-dir "$WINE_PIP_CACHE_DIR" -r "$CONTRIB"/deterministic-build/requirements.txt -$PYTHON -m pip install --no-dependencies --no-warn-script-location \ +$WINE_PYTHON -m pip install --no-dependencies --no-warn-script-location \ --cache-dir "$WINE_PIP_CACHE_DIR" -r "$CONTRIB"/deterministic-build/requirements-binaries.txt -$PYTHON -m pip install --no-dependencies --no-warn-script-location \ +$WINE_PYTHON -m pip install --no-dependencies --no-warn-script-location \ --cache-dir "$WINE_PIP_CACHE_DIR" -r "$CONTRIB"/deterministic-build/requirements-hw.txt pushd $WINEPREFIX/drive_c/electrum # see https://github.com/pypa/pip/issues/2195 -- pip makes a copy of the entire directory info "Pip installing Electrum. This might take a long time if the project folder is large." -$PYTHON -m pip install --no-dependencies --no-warn-script-location . +$WINE_PYTHON -m pip install --no-dependencies --no-warn-script-location . popd @@ -62,7 +54,7 @@ rm -rf dist/ # build standalone and portable versions info "Running pyinstaller..." -wine "$PYHOME/scripts/pyinstaller.exe" --noconfirm --ascii --clean --name $NAME_ROOT-$VERSION -w deterministic.spec +wine "$WINE_PYHOME/scripts/pyinstaller.exe" --noconfirm --ascii --clean --name $NAME_ROOT-$VERSION -w deterministic.spec # set timestamps in dist, in order to make the installer reproducible pushd dist diff --git a/contrib/build-wine/build.sh b/contrib/build-wine/build.sh @@ -28,6 +28,11 @@ export PIP_CACHE_DIR="$CACHEDIR/wine_pip_cache" export WINE_PIP_CACHE_DIR="c:/electrum/contrib/build-wine/.cache/$WIN_ARCH/wine_pip_cache" export DLL_TARGET_DIR="$CACHEDIR/dlls" +export WINEPREFIX="/opt/wine64" +export WINEDEBUG=-all +export WINE_PYHOME="c:/python3" +export WINE_PYTHON="wine $WINE_PYHOME/python.exe -OO -B" + . "$CONTRIB"/build_tools_util.sh info "Clearing $here/build and $here/dist..." diff --git a/contrib/build-wine/deterministic.spec b/contrib/build-wine/deterministic.spec @@ -10,8 +10,6 @@ for i, x in enumerate(sys.argv): else: raise Exception('no name') -PYHOME = 'c:/python3' - home = 'C:\\electrum\\' # see https://github.com/pyinstaller/pyinstaller/issues/2005 diff --git a/contrib/build-wine/prepare-wine.sh b/contrib/build-wine/prepare-wine.sh @@ -15,14 +15,6 @@ PYINSTALLER_COMMIT="80ee4d613ecf75a1226b960a560ee01459e65ddb" PYTHON_VERSION=3.8.7 -## These settings probably don't need change -export WINEPREFIX=/opt/wine64 -export WINEDEBUG=-all - -PYTHON_FOLDER="python3" -PYHOME="c:/$PYTHON_FOLDER" -PYTHON="wine $PYHOME/python.exe -OO -B" - # Let's begin! set -e @@ -57,13 +49,13 @@ for msifile in core dev exe lib pip tools; do download_if_not_exist "$PYTHON_DOWNLOADS/${msifile}.msi" "https://www.python.org/ftp/python/$PYTHON_VERSION/$PYARCH/${msifile}.msi" download_if_not_exist "$PYTHON_DOWNLOADS/${msifile}.msi.asc" "https://www.python.org/ftp/python/$PYTHON_VERSION/$PYARCH/${msifile}.msi.asc" verify_signature "$PYTHON_DOWNLOADS/${msifile}.msi.asc" $KEYRING_PYTHON_DEV - wine msiexec /i "$PYTHON_DOWNLOADS/${msifile}.msi" /qb TARGETDIR=$PYHOME + wine msiexec /i "$PYTHON_DOWNLOADS/${msifile}.msi" /qb TARGETDIR=$WINE_PYHOME done break_legacy_easy_install info "Installing build dependencies." -$PYTHON -m pip install --no-dependencies --no-warn-script-location \ +$WINE_PYTHON -m pip install --no-dependencies --no-warn-script-location \ --cache-dir "$WINE_PIP_CACHE_DIR" -r "$CONTRIB"/deterministic-build/requirements-build-wine.txt info "Installing NSIS." @@ -143,6 +135,6 @@ info "Building PyInstaller." fi ) || fail "PyInstaller build failed" info "Installing PyInstaller." -$PYTHON -m pip install --no-dependencies --no-warn-script-location ./pyinstaller +$WINE_PYTHON -m pip install --no-dependencies --no-warn-script-location ./pyinstaller info "Wine is configured."