flash works when not in EXE
This commit is contained in:
@@ -3,14 +3,27 @@
|
||||
|
||||
block_cipher = None
|
||||
|
||||
import os
|
||||
import sys
|
||||
|
||||
# Hardcode the venv esptool path since PyInstaller might run from different env
|
||||
esptool_dir = os.path.join(os.path.dirname(SPECPATH), 'venv', 'Lib', 'site-packages', 'esptool')
|
||||
|
||||
# Build datas list - include all esptool data files
|
||||
datas_list = [
|
||||
('templates', 'templates'),
|
||||
('static', 'static'),
|
||||
]
|
||||
|
||||
# Add esptool targets directory (includes stub_flasher JSON files)
|
||||
if os.path.exists(os.path.join(esptool_dir, 'targets')):
|
||||
datas_list.append((os.path.join(esptool_dir, 'targets'), 'esptool/targets'))
|
||||
|
||||
a = Analysis(
|
||||
['web_flasher.py'],
|
||||
pathex=[],
|
||||
binaries=[],
|
||||
datas=[
|
||||
('templates', 'templates'),
|
||||
('static', 'static'),
|
||||
],
|
||||
datas=datas_list,
|
||||
hiddenimports=[
|
||||
'serial.tools.list_ports',
|
||||
'flask',
|
||||
@@ -19,6 +32,10 @@ a = Analysis(
|
||||
'flask_socketio',
|
||||
'socketio',
|
||||
'engineio.async_drivers.threading',
|
||||
'esptool',
|
||||
'esptool.cmds',
|
||||
'esptool.loader',
|
||||
'esptool.util',
|
||||
],
|
||||
hookspath=[],
|
||||
hooksconfig={},
|
||||
|
||||
Reference in New Issue
Block a user