From 66b1e725521717ae2c76353b9fb79b3d137e610a Mon Sep 17 00:00:00 2001 From: Preston Hager Date: Sat, 17 Jan 2026 21:51:39 -0700 Subject: [PATCH 1/3] Fix PyInstaller spec to create single-file exe on Windows The NSIS installer script expects a single executable at dist/Wordweaver.exe, but the spec was creating a folder-based build. Now Windows builds use onefile mode while macOS/Linux keep the folder-based build for app bundles. --- src/Wordweaver.spec | 82 +++++++++++++++++++++++++++++---------------- 1 file changed, 54 insertions(+), 28 deletions(-) diff --git a/src/Wordweaver.spec b/src/Wordweaver.spec index ebde56f..893474f 100644 --- a/src/Wordweaver.spec +++ b/src/Wordweaver.spec @@ -41,35 +41,61 @@ a = Analysis( pyz = PYZ(a.pure, a.zipped_data, cipher=block_cipher) -exe = EXE( - pyz, - a.scripts, - [], - exclude_binaries=True, - name='Wordweaver', - debug=False, - bootloader_ignore_signals=False, - strip=False, - upx=True, - console=False, - disable_windowed_traceback=False, - argv_emulation=False, - target_arch=None, - codesign_identity=None, - entitlements_file=None, - icon=icon_file, -) +# Windows: single-file executable for NSIS installer +# macOS/Linux: folder-based for app bundle +if sys.platform == 'win32': + exe = EXE( + pyz, + a.scripts, + a.binaries, + a.zipfiles, + a.datas, + [], + name='Wordweaver', + debug=False, + bootloader_ignore_signals=False, + strip=False, + upx=True, + upx_exclude=[], + runtime_tmpdir=None, + console=False, + disable_windowed_traceback=False, + argv_emulation=False, + target_arch=None, + codesign_identity=None, + entitlements_file=None, + icon=icon_file, + ) +else: + exe = EXE( + pyz, + a.scripts, + [], + exclude_binaries=True, + name='Wordweaver', + debug=False, + bootloader_ignore_signals=False, + strip=False, + upx=True, + console=False, + disable_windowed_traceback=False, + argv_emulation=False, + target_arch=None, + codesign_identity=None, + entitlements_file=None, + icon=icon_file, + ) -coll = COLLECT( - exe, - a.binaries, - a.zipfiles, - a.datas, - strip=False, - upx=True, - upx_exclude=[], - name='Wordweaver', -) + coll = COLLECT( + exe, + a.binaries, + a.zipfiles, + a.datas, + strip=False, + upx=True, + upx_exclude=[], + name='Wordweaver', + ) # macOS app bundle if sys.platform == 'darwin': From a0d93271f7ffe1c1957ac704d41acef9133d29ec Mon Sep 17 00:00:00 2001 From: Preston Hager Date: Sat, 17 Jan 2026 21:53:27 -0700 Subject: [PATCH 2/3] Fix NSIS script paths to be relative to project root NSIS resolves paths relative to where makensis is invoked, not the NSI file location. Since the workflow runs makensis from the project root, the paths need to be relative to that directory. --- src/wordweaver.nsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/wordweaver.nsi b/src/wordweaver.nsi index a82a4f7..43fe939 100644 --- a/src/wordweaver.nsi +++ b/src/wordweaver.nsi @@ -5,7 +5,7 @@ Name "Wordweaver" ; The file to write -OutFile "..\dist\Wordweaver-install.exe" +OutFile "dist\Wordweaver-install.exe" ; Request application privileges for Windows Vista and higher RequestExecutionLevel admin @@ -42,7 +42,7 @@ Section "Wordweaver (required)" SetOutPath $INSTDIR ; Put file there - File "..\dist\Wordweaver.exe" + File "dist\Wordweaver.exe" ; Write the installation path into the registry WriteRegStr HKLM "SOFTWARE\Wordweaver" "Install_Dir" "$INSTDIR" From a9ea5eb60800ae16fd8b4882c748b0afd0dfcbe3 Mon Sep 17 00:00:00 2001 From: Preston Hager Date: Sat, 17 Jan 2026 21:55:13 -0700 Subject: [PATCH 3/3] Use folder-based build on all platforms Reverts to consistent folder-based output (dist/Wordweaver/) on all platforms. Updates NSIS script to expect dist/Wordweaver/Wordweaver.exe. --- src/Wordweaver.spec | 82 ++++++++++++++++----------------------------- src/wordweaver.nsi | 2 +- 2 files changed, 29 insertions(+), 55 deletions(-) diff --git a/src/Wordweaver.spec b/src/Wordweaver.spec index 893474f..ebde56f 100644 --- a/src/Wordweaver.spec +++ b/src/Wordweaver.spec @@ -41,61 +41,35 @@ a = Analysis( pyz = PYZ(a.pure, a.zipped_data, cipher=block_cipher) -# Windows: single-file executable for NSIS installer -# macOS/Linux: folder-based for app bundle -if sys.platform == 'win32': - exe = EXE( - pyz, - a.scripts, - a.binaries, - a.zipfiles, - a.datas, - [], - name='Wordweaver', - debug=False, - bootloader_ignore_signals=False, - strip=False, - upx=True, - upx_exclude=[], - runtime_tmpdir=None, - console=False, - disable_windowed_traceback=False, - argv_emulation=False, - target_arch=None, - codesign_identity=None, - entitlements_file=None, - icon=icon_file, - ) -else: - exe = EXE( - pyz, - a.scripts, - [], - exclude_binaries=True, - name='Wordweaver', - debug=False, - bootloader_ignore_signals=False, - strip=False, - upx=True, - console=False, - disable_windowed_traceback=False, - argv_emulation=False, - target_arch=None, - codesign_identity=None, - entitlements_file=None, - icon=icon_file, - ) +exe = EXE( + pyz, + a.scripts, + [], + exclude_binaries=True, + name='Wordweaver', + debug=False, + bootloader_ignore_signals=False, + strip=False, + upx=True, + console=False, + disable_windowed_traceback=False, + argv_emulation=False, + target_arch=None, + codesign_identity=None, + entitlements_file=None, + icon=icon_file, +) - coll = COLLECT( - exe, - a.binaries, - a.zipfiles, - a.datas, - strip=False, - upx=True, - upx_exclude=[], - name='Wordweaver', - ) +coll = COLLECT( + exe, + a.binaries, + a.zipfiles, + a.datas, + strip=False, + upx=True, + upx_exclude=[], + name='Wordweaver', +) # macOS app bundle if sys.platform == 'darwin': diff --git a/src/wordweaver.nsi b/src/wordweaver.nsi index 43fe939..a782fc2 100644 --- a/src/wordweaver.nsi +++ b/src/wordweaver.nsi @@ -42,7 +42,7 @@ Section "Wordweaver (required)" SetOutPath $INSTDIR ; Put file there - File "dist\Wordweaver.exe" + File "dist\Wordweaver\Wordweaver.exe" ; Write the installation path into the registry WriteRegStr HKLM "SOFTWARE\Wordweaver" "Install_Dir" "$INSTDIR"