update package

This commit is contained in:
zhukang 2025-03-02 14:28:16 +08:00
parent ff616eca13
commit 6d40a8afaf
3 changed files with 48 additions and 23 deletions

View File

@ -215,7 +215,7 @@ save_location/
2. 使用 PyInstaller 打包
```bash
.venv\Scripts\python.exe -m PyInstaller llmclipboard.spec --clean
.venv\Scripts\python.exe -m pyinstaller --clean llmclipboard.spec
```
生成的可执行文件位于 `dist` 目录下:
@ -227,6 +227,16 @@ save_location/
- 自动包含所有必要的依赖
- 包含配置文件和分类规则文件
- 支持的 Python 版本3.10+
- 支持系统托盘功能,关闭窗口时程序继续在后台运行
### 系统托盘功能
- 关闭主窗口时,应用程序不会退出,而是最小化到系统托盘
- 双击系统托盘图标可以重新打开主窗口
- 右键点击系统托盘图标可以显示菜单:
- 显示主窗口
- 启动/停止监听
- 设置选项
- 退出应用程序
## 📝 日志说明

View File

@ -609,28 +609,9 @@ class MainWindow(QMainWindow):
apply_stylesheet(self, theme='light_blue.xml')
def closeEvent(self, event):
if self.start_button.text() == "停止监听":
self.service.stop()
event.ignore()
self.hide()
self.tray_icon.showMessage(
"LLMClipboard",
"应用程序已最小化到系统托盘",
QSystemTrayIcon.Icon.Information,
2000
)
def show_message(self, message, error=False):
"""显示消息通知"""
if error:
self.status_label.setStyleSheet("color: red;")
else:
self.status_label.setStyleSheet("color: green;")
self.status_label.setText(message)
def closeEvent(self, event):
if self.start_button.text() == "停止监听":
self.service.stop()
"""窗口关闭事件处理"""
# 如果服务正在运行,不要停止它
# 只是隐藏窗口到系统托盘
event.ignore()
self.hide()
self.tray_icon.showMessage(

View File

@ -0,0 +1,34 @@
from setuptools import setup, find_packages
with open('README.md', 'r', encoding='utf-8') as f:
long_description = f.read()
setup(
name='llmclipboard',
version='0.1.0',
author='Your Name',
author_email='your.email@example.com',
description='AI-powered clipboard manager with semantic search',
long_description=long_description,
long_description_content_type='text/markdown',
packages=find_packages(),
install_requires=[
'PySide6>=6.4.0',
'openai>=0.27.0',
'python-dotenv>=0.21.0',
'nltk>=3.8.1',
'numpy>=1.24.2',
'transformers>=4.28.1'
],
entry_points={
'console_scripts': [
'llmclipboard=llmclipboard.app:main'
]
},
classifiers=[
'Programming Language :: Python :: 3',
'License :: OSI Approved :: MIT License',
'Operating System :: OS Independent',
],
python_requires='>=3.8',
)