From ffbc64bd8019d00c78b48ed084e87f1fb7dcd374 Mon Sep 17 00:00:00 2001 From: Andrew Chow Date: Thu, 16 Jan 2020 15:04:54 -0500 Subject: [PATCH] Distribute firmwaredl binary --- contrib/build_bin.sh | 3 ++- contrib/build_wine.sh | 3 ++- firmwaredl.spec | 32 ++++++++++++++++++++++++++++++++ 3 files changed, 36 insertions(+), 2 deletions(-) create mode 100644 firmwaredl.spec diff --git a/contrib/build_bin.sh b/contrib/build_bin.sh index a96c72697..c4e81a5cc 100755 --- a/contrib/build_bin.sh +++ b/contrib/build_bin.sh @@ -27,6 +27,7 @@ export PYTHONHASHSEED=42 poetry run pyinstaller hwi.spec poetry run contrib/generate-ui.sh poetry run pyinstaller hwi-qt.spec +poetry run pyinstaller firmwaredl.spec unset PYTHONHASHSEED # Make the final compressed package @@ -36,5 +37,5 @@ OS=`uname | tr '[:upper:]' '[:lower:]'` if [[ $OS == "darwin" ]]; then OS="mac" fi -tar -czf "hwi-${VERSION}-${OS}-amd64.tar.gz" hwi hwi-qt +tar -czf "hwi-${VERSION}-${OS}-amd64.tar.gz" hwi hwi-qt firmwaredl popd diff --git a/contrib/build_wine.sh b/contrib/build_wine.sh index c09a67b58..bbc775e48 100755 --- a/contrib/build_wine.sh +++ b/contrib/build_wine.sh @@ -83,10 +83,11 @@ popd export PYTHONHASHSEED=42 $POETRY run pyinstaller hwi.spec $POETRY run pyinstaller hwi-qt.spec +$POETRY run pyinstaller firmwaredl.spec unset PYTHONHASHSEED # Make the final compressed package pushd dist VERSION=`$POETRY run hwi --version | cut -d " " -f 2 | dos2unix` -zip "hwi-${VERSION}-windows-amd64.zip" hwi.exe hwi-qt.exe +zip "hwi-${VERSION}-windows-amd64.zip" hwi.exe hwi-qt.exe firmwaredl.exe popd diff --git a/firmwaredl.spec b/firmwaredl.spec new file mode 100644 index 000000000..d9e44a04e --- /dev/null +++ b/firmwaredl.spec @@ -0,0 +1,32 @@ +# -*- mode: python ; coding: utf-8 -*- + +block_cipher = None + + +a = Analysis(['firmwaredl.py'], + binaries=[], + datas=[], + hiddenimports=[], + hookspath=['contrib/pyinstaller-hooks/'], + runtime_hooks=[], + excludes=[], + win_no_prefer_redirects=False, + win_private_assemblies=False, + cipher=block_cipher, + noarchive=False) +pyz = PYZ(a.pure, a.zipped_data, + cipher=block_cipher) +exe = EXE(pyz, + a.scripts, + a.binaries, + a.zipfiles, + a.datas, + [], + name='firmwaredl', + debug=False, + bootloader_ignore_signals=False, + strip=False, + upx=True, + upx_exclude=[], + runtime_tmpdir=None, + console=True )