From 132b979b312a39923e417b4e87165509ba804fc3 Mon Sep 17 00:00:00 2001 From: Earle Lowe Date: Tue, 12 Nov 2024 11:17:08 -0800 Subject: [PATCH 1/2] Specifically add mpir_*.dll to the windows exe --- pyinstaller.spec | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/pyinstaller.spec b/pyinstaller.spec index 876ffe3..fd21af5 100644 --- a/pyinstaller.spec +++ b/pyinstaller.spec @@ -2,7 +2,8 @@ import importlib import pathlib -from PyInstaller.utils.hooks import collect_submodules +import sys +from PyInstaller.utils.hooks import collect_submodules ROOT = pathlib.Path(importlib.import_module("chia").__file__).absolute().parent.parent @@ -13,12 +14,15 @@ datas.append(("./app/core/chialisp/*.hex", "./app/core/chialisp")) datas.append(("./.env", "./")) datas.append(("./config.yaml", "./")) +bins = [] +if sys.platform == "win32": + bins.append((ROOT / "mpir_*.dll", ".")) + block_cipher = None a = Analysis( ["app/main.py"], - pathex=["./chia-blockchain"], - binaries=[], + binaries=bins, datas=datas, hiddenimports=[*collect_submodules("chia")], hookspath=[], From 0b78fed0227a5c28d6fca5a498c12c0800a0b728 Mon Sep 17 00:00:00 2001 From: Earle Lowe Date: Tue, 12 Nov 2024 11:18:49 -0800 Subject: [PATCH 2/2] whitespace fixup --- pyinstaller.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyinstaller.spec b/pyinstaller.spec index fd21af5..07962ae 100644 --- a/pyinstaller.spec +++ b/pyinstaller.spec @@ -3,7 +3,7 @@ import importlib import pathlib import sys -from PyInstaller.utils.hooks import collect_submodules +from PyInstaller.utils.hooks import collect_submodules ROOT = pathlib.Path(importlib.import_module("chia").__file__).absolute().parent.parent