From 3ba5b4824c7ad81720d63065f0e5681a494aa1ed Mon Sep 17 00:00:00 2001 From: wangfq Date: Fri, 31 Jul 2026 09:50:35 +0800 Subject: [PATCH] =?UTF-8?q?release:=20DLD154Tool=20v1.0.0=20=E2=80=94=20?= =?UTF-8?q?=E7=89=88=E6=9C=AC=E6=98=BE=E7=A4=BA+PyInstaller=E6=89=93?= =?UTF-8?q?=E5=8C=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- DLD154Tool/.gitignore | 2 ++ DLD154Tool/DLD154Tool.spec | 46 ++++++++++++++++++++++++++++++++++++++ DLD154Tool/main.py | 7 +++++- 3 files changed, 54 insertions(+), 1 deletion(-) create mode 100644 DLD154Tool/DLD154Tool.spec diff --git a/DLD154Tool/.gitignore b/DLD154Tool/.gitignore index bdd06af..eab2e79 100644 --- a/DLD154Tool/.gitignore +++ b/DLD154Tool/.gitignore @@ -2,3 +2,5 @@ venv/ __pycache__/ *.pyc .DS_Store +build/ +dist/ diff --git a/DLD154Tool/DLD154Tool.spec b/DLD154Tool/DLD154Tool.spec new file mode 100644 index 0000000..90df24b --- /dev/null +++ b/DLD154Tool/DLD154Tool.spec @@ -0,0 +1,46 @@ +# -*- mode: python ; coding: utf-8 -*- +# DLD154Tool PyInstaller spec — 单文件 Windows/Linux 打包 + +a = Analysis( + ['main.py'], + pathex=[], + binaries=[], + datas=[], + hiddenimports=[ + 'PySide6.QtCore', + 'PySide6.QtGui', + 'PySide6.QtWidgets', + 'PySide6.QtSerialPort', + 'serial', + ], + hookspath=[], + hooksconfig={}, + runtime_hooks=[], + excludes=[], + noarchive=False, + optimize=0, +) + +pyz = PYZ(a.pure) + +exe = EXE( + pyz, + a.scripts, + a.binaries, + a.datas, + [], + name='DLD154Tool', + 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, + icon=None, +) diff --git a/DLD154Tool/main.py b/DLD154Tool/main.py index 1468f48..3c57059 100644 --- a/DLD154Tool/main.py +++ b/DLD154Tool/main.py @@ -8,6 +8,8 @@ DLD154Tool — DLD154Pro 桌面串口调试工具 依赖: PySide6, pyserial """ + +TOOL_VERSION = "1.0.0" import sys import struct import threading @@ -553,7 +555,7 @@ class LogTab(QWidget): class MainWindow(QMainWindow): def __init__(self): super().__init__() - self.setWindowTitle("DLD154Tool — DLD154Pro 串口调试工具") + self.setWindowTitle(f"DLD154Tool v{TOOL_VERSION} — DLD154Pro 串口调试工具") self.setMinimumSize(800, 650) self._sc = SerialClient() @@ -586,6 +588,9 @@ class MainWindow(QMainWindow): self._log_tab.append("DLD154Tool 启动") + # 状态栏: 显示版本 + self.statusBar().showMessage(f"DLD154Tool v{TOOL_VERSION} | 就绪") + def _on_connect_changed(self, connected: bool): if connected: self._start_worker()