mirror of
https://github.com/YaoFANGUK/video-subtitle-remover.git
synced 2026-05-04 16:07:33 +08:00
- 创建PyInstaller规范文件和打包脚本 - 修复开发/打包环境路径兼容性问题 - 添加PaddleOCR运行时依赖(opencv-contrib-python, pypdfium2, pyclipper) - 支持打包后的多进程启动 - 修复图标路径和翻译文件路径 - 清理重复的模型和FFmpeg文件 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
22 lines
706 B
Python
22 lines
706 B
Python
import os
|
|
import sys
|
|
from enum import Enum
|
|
|
|
from qfluentwidgets import getIconColor, Theme, FluentIconBase
|
|
|
|
|
|
class MyFluentIcon(FluentIconBase, Enum):
|
|
Stop = "stop"
|
|
|
|
def path(self, theme=Theme.AUTO):
|
|
# getIconColor() return "white" or "black" according to current theme
|
|
# 支持打包环境和开发环境
|
|
if getattr(sys, 'frozen', False):
|
|
# 打包环境:使用 sys._MEIPASS 作为基础路径
|
|
base_path = sys._MEIPASS
|
|
else:
|
|
# 开发环境:使用相对路径
|
|
base_path = os.path.join(os.path.dirname(__file__), '..')
|
|
|
|
return os.path.join(base_path, 'ui', 'icon', f'{self.value}_{getIconColor(theme)}.svg')
|