wine build: dedupe PYTHON_VERSION

This commit is contained in:
SomberNight 2018-12-09 07:17:37 +01:00
parent f59a4f85db
commit 762082e13d
No known key found for this signature in database
GPG key ID: B33B5F232C6271E9
4 changed files with 8 additions and 9 deletions

View file

@ -1,14 +1,13 @@
#!/bin/bash
NAME_ROOT=electrum
PYTHON_VERSION=3.6.6
# These settings probably don't need any change
export WINEPREFIX=/opt/wine64
export PYTHONDONTWRITEBYTECODE=1
export PYTHONHASHSEED=22
PYHOME=c:/python$PYTHON_VERSION
PYHOME=c:/python3
PYTHON="wine $PYHOME/python.exe -OO -B"
@ -60,7 +59,7 @@ cd ..
rm -rf dist/
# build standalone and portable versions
wine "C:/python$PYTHON_VERSION/scripts/pyinstaller.exe" --noconfirm --ascii --clean --name $NAME_ROOT-$VERSION -w deterministic.spec
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

View file

@ -10,8 +10,7 @@ for i, x in enumerate(sys.argv):
else:
raise Exception('no name')
PYTHON_VERSION = '3.6.6'
PYHOME = 'c:/python' + PYTHON_VERSION
PYHOME = 'c:/python3'
home = 'C:\\electrum\\'

View file

@ -42,7 +42,7 @@ folder.
And then build from this directory:
```
$ git checkout $REV
$ sudo docker run \
$ sudo docker run -it \
--name electrum-wine-builder-cont \
-v $PWD:/opt/wine64/drive_c/electrum \
--rm \

View file

@ -19,7 +19,8 @@ PYTHON_VERSION=3.6.6
export WINEPREFIX=/opt/wine64
#export WINEARCH='win32'
PYHOME=c:/python$PYTHON_VERSION
PYTHON_FOLDER="python3"
PYHOME="c:/$PYTHON_FOLDER"
PYTHON="wine $PYHOME/python.exe -OO -B"
@ -105,7 +106,7 @@ for msifile in core dev exe lib pip tools; do
wget -N -c "https://www.python.org/ftp/python/$PYTHON_VERSION/win32/${msifile}.msi"
wget -N -c "https://www.python.org/ftp/python/$PYTHON_VERSION/win32/${msifile}.msi.asc"
verify_signature "${msifile}.msi.asc" $KEYRING_PYTHON_DEV
wine msiexec /i "${msifile}.msi" /qb TARGETDIR=C:/python$PYTHON_VERSION
wine msiexec /i "${msifile}.msi" /qb TARGETDIR=$PYHOME
done
# upgrade pip
@ -136,7 +137,7 @@ download_if_not_exist $LIBUSB_FILENAME "$LIBUSB_URL"
verify_hash $LIBUSB_FILENAME "$LIBUSB_SHA256"
7z x -olibusb $LIBUSB_FILENAME -aoa
cp libusb/MS32/dll/libusb-1.0.dll $WINEPREFIX/drive_c/python$PYTHON_VERSION/
cp libusb/MS32/dll/libusb-1.0.dll $WINEPREFIX/drive_c/$PYTHON_FOLDER/
mkdir -p $WINEPREFIX/drive_c/tmp
cp secp256k1/libsecp256k1.dll $WINEPREFIX/drive_c/tmp/