build win/mac: do not pass custom args to pyinstaller; use envvars
custom args no longer work with pyinstaller 5.0 (see https://github.com/pyinstaller/pyinstaller/issues/6762 ) ``` option(s) not allowed: ... makespec options not valid when a .spec file is given ```
This commit is contained in:
@@ -56,7 +56,7 @@ rm -rf dist/
|
|||||||
|
|
||||||
# build standalone and portable versions
|
# build standalone and portable versions
|
||||||
info "Running pyinstaller..."
|
info "Running pyinstaller..."
|
||||||
wine "$WINE_PYHOME/scripts/pyinstaller.exe" --noconfirm --ascii --clean --name $NAME_ROOT-$VERSION -w deterministic.spec
|
ELECTRUM_CMDLINE_NAME="$NAME_ROOT-$VERSION" wine "$WINE_PYHOME/scripts/pyinstaller.exe" --noconfirm --ascii --clean -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
|
||||||
|
|||||||
@@ -2,12 +2,10 @@
|
|||||||
|
|
||||||
from PyInstaller.utils.hooks import collect_data_files, collect_submodules, collect_dynamic_libs
|
from PyInstaller.utils.hooks import collect_data_files, collect_submodules, collect_dynamic_libs
|
||||||
|
|
||||||
import sys
|
import sys, os
|
||||||
for i, x in enumerate(sys.argv):
|
|
||||||
if x == '--name':
|
cmdline_name = os.environ.get("ELECTRUM_CMDLINE_NAME")
|
||||||
cmdline_name = sys.argv[i+1]
|
if not cmdline_name:
|
||||||
break
|
|
||||||
else:
|
|
||||||
raise Exception('no name')
|
raise Exception('no name')
|
||||||
|
|
||||||
home = 'C:\\electrum\\'
|
home = 'C:\\electrum\\'
|
||||||
|
|||||||
@@ -217,7 +217,7 @@ find . -exec touch -t '200101220000' {} + || true
|
|||||||
VERSION=`git describe --tags --dirty --always`
|
VERSION=`git describe --tags --dirty --always`
|
||||||
|
|
||||||
info "Building binary"
|
info "Building binary"
|
||||||
pyinstaller --noconfirm --ascii --clean --name $VERSION contrib/osx/osx.spec || fail "Could not build binary"
|
ELECTRUM_VERSION=$VERSION pyinstaller --noconfirm --ascii --clean contrib/osx/osx.spec || fail "Could not build binary"
|
||||||
|
|
||||||
DoCodeSignMaybe "app bundle" "dist/${PACKAGE}.app"
|
DoCodeSignMaybe "app bundle" "dist/${PACKAGE}.app"
|
||||||
|
|
||||||
|
|||||||
@@ -10,11 +10,8 @@ MAIN_SCRIPT='run_electrum'
|
|||||||
ICONS_FILE=PYPKG + '/gui/icons/electrum.icns'
|
ICONS_FILE=PYPKG + '/gui/icons/electrum.icns'
|
||||||
|
|
||||||
|
|
||||||
for i, x in enumerate(sys.argv):
|
VERSION = os.environ.get("ELECTRUM_VERSION")
|
||||||
if x == '--name':
|
if not VERSION:
|
||||||
VERSION = sys.argv[i+1]
|
|
||||||
break
|
|
||||||
else:
|
|
||||||
raise Exception('no version')
|
raise Exception('no version')
|
||||||
|
|
||||||
electrum = os.path.abspath(".") + "/"
|
electrum = os.path.abspath(".") + "/"
|
||||||
|
|||||||
Reference in New Issue
Block a user