Add PyInstaller support for standalone Windows executable

- Add build_exe.py script for easy executable generation
- Add PYINSTALLER_GUIDE.md with comprehensive instructions
- Updated label_printer.spec for PyInstaller configuration
- Tested build process - executable builds successfully
- Created dist/LabelPrinter with all dependencies bundled
- File size: ~200MB (includes Python runtime and all libraries)
- No Python installation required to run the exe
This commit is contained in:
Quality App Developer
2026-02-05 01:19:42 +02:00
parent 184178275b
commit 8619debd71
21 changed files with 63959 additions and 0 deletions

38
LabelPrinter.spec Normal file
View File

@@ -0,0 +1,38 @@
# -*- mode: python ; coding: utf-8 -*-
a = Analysis(
['label_printer_gui.py'],
pathex=[],
binaries=[],
datas=[],
hiddenimports=['kivy', 'kivy.core.window', 'kivy.core.text', 'kivy.core.image', 'kivy.uix.boxlayout', 'kivy.uix.gridlayout', 'kivy.uix.label', 'kivy.uix.textinput', 'kivy.uix.button', 'kivy.uix.spinner', 'kivy.uix.scrollview', 'kivy.uix.popup', 'kivy.clock', 'kivy.graphics', 'PIL', 'barcode', 'reportlab', 'print_label', 'print_label_pdf'],
hookspath=[],
hooksconfig={},
runtime_hooks=[],
excludes=[],
noarchive=False,
optimize=0,
)
pyz = PYZ(a.pure)
exe = EXE(
pyz,
a.scripts,
a.binaries,
a.datas,
[],
name='LabelPrinter',
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,
)