add spec file

This commit is contained in:
SikongJueluo 2024-07-10 21:22:25 +08:00
parent 363f4fcdca
commit d397c7bbe2
No known key found for this signature in database
GPG Key ID: D2D3D29A993716EA
4 changed files with 51 additions and 1 deletions

4
.gitignore vendored
View File

@ -1,2 +1,4 @@
.venv/ .venv/
src/__pycache__/ src/__pycache__/
build/
dist/

44
ISPController.spec Normal file
View File

@ -0,0 +1,44 @@
# -*- mode: python ; coding: utf-8 -*-
a = Analysis(
['src/main.py'],
pathex=['src'],
binaries=[],
datas=[],
hiddenimports=['tkinter','PIL','PIL._tkinter_finder'],
hookspath=[],
hooksconfig={},
runtime_hooks=[],
excludes=[],
noarchive=False,
optimize=0,
)
pyz = PYZ(a.pure)
exe = EXE(
pyz,
a.scripts,
[],
exclude_binaries=True,
name='ISPController',
debug=False,
bootloader_ignore_signals=False,
strip=False,
upx=True,
console=True,
disable_windowed_traceback=False,
argv_emulation=False,
target_arch=None,
codesign_identity=None,
entitlements_file=None,
)
coll = COLLECT(
exe,
a.binaries,
a.datas,
strip=False,
upx=True,
upx_exclude=[],
name='ISPController',
)

View File

@ -1,3 +1,4 @@
altgraph==0.17.4
CTkMessagebox==2.7 CTkMessagebox==2.7
customtkinter==5.2.2 customtkinter==5.2.2
darkdetect==0.8.0 darkdetect==0.8.0
@ -5,6 +6,8 @@ future==1.0.0
iso8601==2.1.0 iso8601==2.1.0
packaging==24.1 packaging==24.1
pillow==10.4.0 pillow==10.4.0
pyinstaller==6.9.0
pyinstaller-hooks-contrib==2024.7
pyserial==3.5 pyserial==3.5
PyYAML==6.0.1 PyYAML==6.0.1
serial==0.0.97 serial==0.0.97

View File

@ -328,6 +328,7 @@ class App(ctk.CTk):
self.serial.write(bytes.encode()) self.serial.write(bytes.encode())
else: else:
print("Please Connect to Serial") print("Please Connect to Serial")
messagebox.showError("Please Connect Serial Port")
def run(self): def run(self):
self.mainloop() self.mainloop()