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:
61
label_printer.spec
Normal file
61
label_printer.spec
Normal 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,
|
||||
)
|
||||
Reference in New Issue
Block a user