Todo: 集成多平台 解决因SaiNiu线程抢占资源问题 本地提交测试环境打包 和 正式打包脚本与正式环境打包bat 提交Python32环境包 改进多日志文件生成情况修改打包日志细节
This commit is contained in:
16
main.py
16
main.py
@@ -11,12 +11,12 @@ import config
|
||||
from WebSocket.backend_singleton import get_websocket_manager
|
||||
from windows_taskbar_fix import setup_windows_taskbar_icon
|
||||
import os
|
||||
# ===================== 文件日志系统 - 同时支持开发和exe环境 =====================
|
||||
# ===================== 文件日志系统 - 已禁用 =====================
|
||||
# 重定向所有输出到文件,确保有日志记录
|
||||
from exe_file_logger import setup_file_logging, log_to_file
|
||||
# from exe_file_logger import setup_file_logging, log_to_file
|
||||
|
||||
setup_file_logging()
|
||||
print("文件日志系统已在main.py中初始化")
|
||||
# setup_file_logging() # 已禁用自动日志功能
|
||||
# print("文件日志系统已在main.py中初始化")
|
||||
|
||||
|
||||
# 新增: 用户名密码输入对话框类
|
||||
@@ -462,7 +462,9 @@ class LoginWindow(QMainWindow):
|
||||
|
||||
# 使用自定义的美观图标
|
||||
try:
|
||||
tray_icon_path = os.path.join(os.path.dirname(__file__), "static", "ai_assistant_icon_16.png")
|
||||
# 导入路径处理函数
|
||||
from windows_taskbar_fix import get_resource_path
|
||||
tray_icon_path = get_resource_path("static/ai_assistant_icon_16.png")
|
||||
if os.path.exists(tray_icon_path):
|
||||
from PyQt5.QtGui import QIcon
|
||||
self.tray_icon.setIcon(QIcon(tray_icon_path))
|
||||
@@ -702,7 +704,9 @@ def main():
|
||||
print(f"[WARNING] 图标设置失败: {e}")
|
||||
# 备用方案:使用简单的图标设置
|
||||
try:
|
||||
icon_path = os.path.join(os.path.dirname(__file__), "static", "ai_assistant_icon_32.png")
|
||||
# 导入路径处理函数
|
||||
from windows_taskbar_fix import get_resource_path
|
||||
icon_path = get_resource_path("static/ai_assistant_icon_32.png")
|
||||
if os.path.exists(icon_path):
|
||||
from PyQt5.QtGui import QIcon
|
||||
backup_icon = QIcon(icon_path)
|
||||
|
||||
Reference in New Issue
Block a user