windows build: minor clean-up
This commit is contained in:
@@ -2,20 +2,12 @@
|
|||||||
|
|
||||||
NAME_ROOT=electrum
|
NAME_ROOT=electrum
|
||||||
|
|
||||||
# These settings probably don't need any change
|
|
||||||
export WINEPREFIX=/opt/wine64
|
|
||||||
export WINEDEBUG=-all
|
|
||||||
export PYTHONDONTWRITEBYTECODE=1
|
export PYTHONDONTWRITEBYTECODE=1
|
||||||
|
|
||||||
PYHOME="c:/python3"
|
|
||||||
PYTHON="wine $PYHOME/python.exe -OO -B"
|
|
||||||
|
|
||||||
|
|
||||||
# Let's begin!
|
# Let's begin!
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
here="$(dirname "$(readlink -e "$0")")"
|
|
||||||
|
|
||||||
. "$CONTRIB"/build_tools_util.sh
|
. "$CONTRIB"/build_tools_util.sh
|
||||||
|
|
||||||
pushd $WINEPREFIX/drive_c/electrum
|
pushd $WINEPREFIX/drive_c/electrum
|
||||||
@@ -42,19 +34,19 @@ popd
|
|||||||
|
|
||||||
|
|
||||||
# Install frozen dependencies
|
# 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
|
--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
|
--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
|
--cache-dir "$WINE_PIP_CACHE_DIR" -r "$CONTRIB"/deterministic-build/requirements-hw.txt
|
||||||
|
|
||||||
pushd $WINEPREFIX/drive_c/electrum
|
pushd $WINEPREFIX/drive_c/electrum
|
||||||
# see https://github.com/pypa/pip/issues/2195 -- pip makes a copy of the entire directory
|
# 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."
|
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
|
popd
|
||||||
|
|
||||||
|
|
||||||
@@ -62,7 +54,7 @@ rm -rf dist/
|
|||||||
|
|
||||||
# build standalone and portable versions
|
# build standalone and portable versions
|
||||||
info "Running pyinstaller..."
|
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
|
# set timestamps in dist, in order to make the installer reproducible
|
||||||
pushd dist
|
pushd dist
|
||||||
|
|||||||
@@ -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 WINE_PIP_CACHE_DIR="c:/electrum/contrib/build-wine/.cache/$WIN_ARCH/wine_pip_cache"
|
||||||
export DLL_TARGET_DIR="$CACHEDIR/dlls"
|
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
|
. "$CONTRIB"/build_tools_util.sh
|
||||||
|
|
||||||
info "Clearing $here/build and $here/dist..."
|
info "Clearing $here/build and $here/dist..."
|
||||||
|
|||||||
@@ -10,8 +10,6 @@ for i, x in enumerate(sys.argv):
|
|||||||
else:
|
else:
|
||||||
raise Exception('no name')
|
raise Exception('no name')
|
||||||
|
|
||||||
PYHOME = 'c:/python3'
|
|
||||||
|
|
||||||
home = 'C:\\electrum\\'
|
home = 'C:\\electrum\\'
|
||||||
|
|
||||||
# see https://github.com/pyinstaller/pyinstaller/issues/2005
|
# see https://github.com/pyinstaller/pyinstaller/issues/2005
|
||||||
|
|||||||
@@ -15,14 +15,6 @@ PYINSTALLER_COMMIT="80ee4d613ecf75a1226b960a560ee01459e65ddb"
|
|||||||
|
|
||||||
PYTHON_VERSION=3.8.7
|
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!
|
# Let's begin!
|
||||||
set -e
|
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" "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"
|
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
|
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
|
done
|
||||||
|
|
||||||
break_legacy_easy_install
|
break_legacy_easy_install
|
||||||
|
|
||||||
info "Installing build dependencies."
|
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
|
--cache-dir "$WINE_PIP_CACHE_DIR" -r "$CONTRIB"/deterministic-build/requirements-build-wine.txt
|
||||||
|
|
||||||
info "Installing NSIS."
|
info "Installing NSIS."
|
||||||
@@ -143,6 +135,6 @@ info "Building PyInstaller."
|
|||||||
fi
|
fi
|
||||||
) || fail "PyInstaller build failed"
|
) || fail "PyInstaller build failed"
|
||||||
info "Installing PyInstaller."
|
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."
|
info "Wine is configured."
|
||||||
|
|||||||
Reference in New Issue
Block a user