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

61
label_printer.spec Normal file
View File

@@ -0,0 +1,61 @@
# -*- mode: python ; coding: utf-8 -*-
"""
PyInstaller spec file for Label Printer GUI
This creates a standalone Windows executable
"""
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',
],
hookspath=[],
hooksconfig={},
runtime_hooks=[],
excludedimports=[],
noarchive=False,
)
pyz = PYZ(a.pure, a.zipped_data, cipher=None)
exe = EXE(
pyz,
a.scripts,
a.binaries,
a.zipfiles,
a.datas,
[],
name='LabelPrinter',
debug=False,
bootloader_ignore_signals=False,
strip=False,
upx=True,
upx_exclude=[],
runtime_tmpdir=None,
console=False, # No console window
disable_windowed_traceback=False,
argv_emulation=False,
target_arch=None,
codesign_identity=None,
entitlements_file=None,
icon=None,
)